gear-second 3.3.1 → 3.5.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.
Files changed (2) hide show
  1. package/index.js +7 -7
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,20 +1,20 @@
1
- (function(rt,me){typeof exports=="object"&&typeof module<"u"?module.exports=me():typeof define=="function"&&define.amd?define(me):(rt=typeof globalThis<"u"?globalThis:rt||self,rt._gearSecond_=me())})(this,function(){"use strict";var Wm=Object.defineProperty;var Um=(rt,me,bt)=>me in rt?Wm(rt,me,{enumerable:!0,configurable:!0,writable:!0,value:bt}):rt[me]=bt;var Pe=(rt,me,bt)=>Um(rt,typeof me!="symbol"?me+"":me,bt);/**
1
+ (function(it,me){typeof exports=="object"&&typeof module<"u"?module.exports=me():typeof define=="function"&&define.amd?define(me):(it=typeof globalThis<"u"?globalThis:it||self,it._gearSecond_=me())})(this,function(){"use strict";var Fm=Object.defineProperty;var Wm=(it,me,vt)=>me in it?Fm(it,me,{enumerable:!0,configurable:!0,writable:!0,value:vt}):it[me]=vt;var Pe=(it,me,vt)=>Wm(it,typeof me!="symbol"?me+"":me,vt);/**
2
2
  * @vue/shared v3.5.24
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
- **/function rt(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const me={},bt=[],kt=()=>{},Cr=()=>!1,so=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),li=e=>e.startsWith("onUpdate:"),Oe=Object.assign,ai=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Ua=Object.prototype.hasOwnProperty,ke=(e,t)=>Ua.call(e,t),re=Array.isArray,mn=e=>En(e)==="[object Map]",lo=e=>En(e)==="[object Set]",Tr=e=>En(e)==="[object Date]",fe=e=>typeof e=="function",$e=e=>typeof e=="string",yt=e=>typeof e=="symbol",Te=e=>e!==null&&typeof e=="object",Mr=e=>(Te(e)||fe(e))&&fe(e.then)&&fe(e.catch),Pr=Object.prototype.toString,En=e=>Pr.call(e),qa=e=>En(e).slice(8,-1),ao=e=>En(e)==="[object Object]",ci=e=>$e(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,In=rt(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),co=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Ka=/-\w/g,He=co(e=>e.replace(Ka,t=>t.slice(1).toUpperCase())),Za=/\B([A-Z])/g,et=co(e=>e.replace(Za,"-$1").toLowerCase()),uo=co(e=>e.charAt(0).toUpperCase()+e.slice(1)),ui=co(e=>e?`on${uo(e)}`:""),tt=(e,t)=>!Object.is(e,t),fo=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Er=(e,t,n,o=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:o,value:n})},di=e=>{const t=parseFloat(e);return isNaN(t)?e:t},fi=e=>{const t=$e(e)?Number(e):NaN;return isNaN(t)?e:t};let Ir;const po=()=>Ir||(Ir=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ce(e){if(re(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],i=$e(o)?Ja(o):Ce(o);if(i)for(const r in i)t[r]=i[r]}return t}else if($e(e)||Te(e))return e}const Ya=/;(?![^(]*\))/g,Xa=/:([^]+)/,Ga=/\/\*[^]*?\*\//g;function Ja(e){const t={};return e.replace(Ga,"").split(Ya).forEach(n=>{if(n){const o=n.split(Xa);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function ue(e){let t="";if($e(e))t=e;else if(re(e))for(let n=0;n<e.length;n++){const o=ue(e[n]);o&&(t+=o+" ")}else if(Te(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const Qa=rt("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function Or(e){return!!e||e===""}function ec(e,t){if(e.length!==t.length)return!1;let n=!0;for(let o=0;n&&o<e.length;o++)n=ho(e[o],t[o]);return n}function ho(e,t){if(e===t)return!0;let n=Tr(e),o=Tr(t);if(n||o)return n&&o?e.getTime()===t.getTime():!1;if(n=yt(e),o=yt(t),n||o)return e===t;if(n=re(e),o=re(t),n||o)return n&&o?ec(e,t):!1;if(n=Te(e),o=Te(t),n||o){if(!n||!o)return!1;const i=Object.keys(e).length,r=Object.keys(t).length;if(i!==r)return!1;for(const s in e){const l=e.hasOwnProperty(s),a=t.hasOwnProperty(s);if(l&&!a||!l&&a||!ho(e[s],t[s]))return!1}}return String(e)===String(t)}function $r(e,t){return e.findIndex(n=>ho(n,t))}const zr=e=>!!(e&&e.__v_isRef===!0),Fe=e=>$e(e)?e:e==null?"":re(e)||Te(e)&&(e.toString===Pr||!fe(e.toString))?zr(e)?Fe(e.value):JSON.stringify(e,Dr,2):String(e),Dr=(e,t)=>zr(t)?Dr(e,t.value):mn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[o,i],r)=>(n[pi(o,r)+" =>"]=i,n),{})}:lo(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>pi(n))}:yt(t)?pi(t):Te(t)&&!re(t)&&!ao(t)?String(t):t,pi=(e,t="")=>{var n;return yt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
5
+ **/function it(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const me={},vt=[],kt=()=>{},Cr=()=>!1,so=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),si=e=>e.startsWith("onUpdate:"),Oe=Object.assign,li=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Ua=Object.prototype.hasOwnProperty,ke=(e,t)=>Ua.call(e,t),re=Array.isArray,mn=e=>En(e)==="[object Map]",lo=e=>En(e)==="[object Set]",Tr=e=>En(e)==="[object Date]",fe=e=>typeof e=="function",$e=e=>typeof e=="string",bt=e=>typeof e=="symbol",Te=e=>e!==null&&typeof e=="object",Mr=e=>(Te(e)||fe(e))&&fe(e.then)&&fe(e.catch),Pr=Object.prototype.toString,En=e=>Pr.call(e),qa=e=>En(e).slice(8,-1),ao=e=>En(e)==="[object Object]",ai=e=>$e(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,In=it(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),co=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Ka=/-\w/g,He=co(e=>e.replace(Ka,t=>t.slice(1).toUpperCase())),Za=/\B([A-Z])/g,Qe=co(e=>e.replace(Za,"-$1").toLowerCase()),uo=co(e=>e.charAt(0).toUpperCase()+e.slice(1)),ci=co(e=>e?`on${uo(e)}`:""),et=(e,t)=>!Object.is(e,t),fo=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Er=(e,t,n,o=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:o,value:n})},ui=e=>{const t=parseFloat(e);return isNaN(t)?e:t},di=e=>{const t=$e(e)?Number(e):NaN;return isNaN(t)?e:t};let Ir;const po=()=>Ir||(Ir=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ce(e){if(re(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],i=$e(o)?Ja(o):Ce(o);if(i)for(const r in i)t[r]=i[r]}return t}else if($e(e)||Te(e))return e}const Ya=/;(?![^(]*\))/g,Xa=/:([^]+)/,Ga=/\/\*[^]*?\*\//g;function Ja(e){const t={};return e.replace(Ga,"").split(Ya).forEach(n=>{if(n){const o=n.split(Xa);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function ue(e){let t="";if($e(e))t=e;else if(re(e))for(let n=0;n<e.length;n++){const o=ue(e[n]);o&&(t+=o+" ")}else if(Te(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const Qa=it("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function Or(e){return!!e||e===""}function ec(e,t){if(e.length!==t.length)return!1;let n=!0;for(let o=0;n&&o<e.length;o++)n=ho(e[o],t[o]);return n}function ho(e,t){if(e===t)return!0;let n=Tr(e),o=Tr(t);if(n||o)return n&&o?e.getTime()===t.getTime():!1;if(n=bt(e),o=bt(t),n||o)return e===t;if(n=re(e),o=re(t),n||o)return n&&o?ec(e,t):!1;if(n=Te(e),o=Te(t),n||o){if(!n||!o)return!1;const i=Object.keys(e).length,r=Object.keys(t).length;if(i!==r)return!1;for(const s in e){const l=e.hasOwnProperty(s),a=t.hasOwnProperty(s);if(l&&!a||!l&&a||!ho(e[s],t[s]))return!1}}return String(e)===String(t)}function $r(e,t){return e.findIndex(n=>ho(n,t))}const zr=e=>!!(e&&e.__v_isRef===!0),Fe=e=>$e(e)?e:e==null?"":re(e)||Te(e)&&(e.toString===Pr||!fe(e.toString))?zr(e)?Fe(e.value):JSON.stringify(e,Dr,2):String(e),Dr=(e,t)=>zr(t)?Dr(e,t.value):mn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[o,i],r)=>(n[fi(o,r)+" =>"]=i,n),{})}:lo(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>fi(n))}:bt(t)?fi(t):Te(t)&&!re(t)&&!ao(t)?String(t):t,fi=(e,t="")=>{var n;return bt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
6
6
  * @vue/reactivity v3.5.24
7
7
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
8
8
  * @license MIT
9
- **/let We;class tc{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=We,!t&&We&&(this.index=(We.scopes||(We.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=We;try{return We=this,t()}finally{We=n}}}on(){++this._on===1&&(this.prevScope=We,We=this)}off(){this._on>0&&--this._on===0&&(We=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,o;for(n=0,o=this.effects.length;n<o;n++)this.effects[n].stop();for(this.effects.length=0,n=0,o=this.cleanups.length;n<o;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,o=this.scopes.length;n<o;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0}}}function hi(){return We}function nc(e,t=!1){We&&We.cleanups.push(e)}let Ee;const gi=new WeakSet;class Ar{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,We&&We.active&&We.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,gi.has(this)&&(gi.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||jr(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Hr(this),Br(this);const t=Ee,n=wt;Ee=this,wt=!0;try{return this.fn()}finally{Nr(this),Ee=t,wt=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)yi(t);this.deps=this.depsTail=void 0,Hr(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?gi.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){bi(this)&&this.run()}get dirty(){return bi(this)}}let Lr=0,On,$n;function jr(e,t=!1){if(e.flags|=8,t){e.next=$n,$n=e;return}e.next=On,On=e}function mi(){Lr++}function vi(){if(--Lr>0)return;if($n){let t=$n;for($n=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;On;){let t=On;for(On=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(o){e||(e=o)}t=n}}if(e)throw e}function Br(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Nr(e){let t,n=e.depsTail,o=n;for(;o;){const i=o.prevDep;o.version===-1?(o===n&&(n=i),yi(o),oc(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=i}e.deps=t,e.depsTail=n}function bi(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Vr(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Vr(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===zn)||(e.globalVersion=zn,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!bi(e))))return;e.flags|=2;const t=e.dep,n=Ee,o=wt;Ee=e,wt=!0;try{Br(e);const i=e.fn(e._value);(t.version===0||tt(i,e._value))&&(e.flags|=128,e._value=i,t.version++)}catch(i){throw t.version++,i}finally{Ee=n,wt=o,Nr(e),e.flags&=-3}}function yi(e,t=!1){const{dep:n,prevSub:o,nextSub:i}=e;if(o&&(o.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=o,e.nextSub=void 0),n.subs===e&&(n.subs=o,!o&&n.computed)){n.computed.flags&=-5;for(let r=n.computed.deps;r;r=r.nextDep)yi(r,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function oc(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let wt=!0;const Rr=[];function Ct(){Rr.push(wt),wt=!1}function Tt(){const e=Rr.pop();wt=e===void 0?!0:e}function Hr(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Ee;Ee=void 0;try{t()}finally{Ee=n}}}let zn=0;class ic{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class go{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Ee||!wt||Ee===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Ee)n=this.activeLink=new ic(Ee,this),Ee.deps?(n.prevDep=Ee.depsTail,Ee.depsTail.nextDep=n,Ee.depsTail=n):Ee.deps=Ee.depsTail=n,Fr(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const o=n.nextDep;o.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=o),n.prevDep=Ee.depsTail,n.nextDep=void 0,Ee.depsTail.nextDep=n,Ee.depsTail=n,Ee.deps===n&&(Ee.deps=o)}return n}trigger(t){this.version++,zn++,this.notify(t)}notify(t){mi();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{vi()}}}function Fr(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let o=t.deps;o;o=o.nextDep)Fr(o)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const mo=new WeakMap,on=Symbol(""),wi=Symbol(""),Dn=Symbol("");function Ue(e,t,n){if(wt&&Ee){let o=mo.get(e);o||mo.set(e,o=new Map);let i=o.get(n);i||(o.set(n,i=new go),i.map=o,i.key=n),i.track()}}function Bt(e,t,n,o,i,r){const s=mo.get(e);if(!s){zn++;return}const l=a=>{a&&a.trigger()};if(mi(),t==="clear")s.forEach(l);else{const a=re(e),u=a&&ci(n);if(a&&n==="length"){const c=Number(o);s.forEach((d,f)=>{(f==="length"||f===Dn||!yt(f)&&f>=c)&&l(d)})}else switch((n!==void 0||s.has(void 0))&&l(s.get(n)),u&&l(s.get(Dn)),t){case"add":a?u&&l(s.get("length")):(l(s.get(on)),mn(e)&&l(s.get(wi)));break;case"delete":a||(l(s.get(on)),mn(e)&&l(s.get(wi)));break;case"set":mn(e)&&l(s.get(on));break}}vi()}function rc(e,t){const n=mo.get(e);return n&&n.get(t)}function vn(e){const t=xe(e);return t===e?t:(Ue(t,"iterate",Dn),dt(e)?t:t.map(Ne))}function vo(e){return Ue(e=xe(e),"iterate",Dn),e}const sc={__proto__:null,[Symbol.iterator](){return xi(this,Symbol.iterator,Ne)},concat(...e){return vn(this).concat(...e.map(t=>re(t)?vn(t):t))},entries(){return xi(this,"entries",e=>(e[1]=Ne(e[1]),e))},every(e,t){return Nt(this,"every",e,t,void 0,arguments)},filter(e,t){return Nt(this,"filter",e,t,n=>n.map(Ne),arguments)},find(e,t){return Nt(this,"find",e,t,Ne,arguments)},findIndex(e,t){return Nt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Nt(this,"findLast",e,t,Ne,arguments)},findLastIndex(e,t){return Nt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Nt(this,"forEach",e,t,void 0,arguments)},includes(...e){return _i(this,"includes",e)},indexOf(...e){return _i(this,"indexOf",e)},join(e){return vn(this).join(e)},lastIndexOf(...e){return _i(this,"lastIndexOf",e)},map(e,t){return Nt(this,"map",e,t,void 0,arguments)},pop(){return An(this,"pop")},push(...e){return An(this,"push",e)},reduce(e,...t){return Wr(this,"reduce",e,t)},reduceRight(e,...t){return Wr(this,"reduceRight",e,t)},shift(){return An(this,"shift")},some(e,t){return Nt(this,"some",e,t,void 0,arguments)},splice(...e){return An(this,"splice",e)},toReversed(){return vn(this).toReversed()},toSorted(e){return vn(this).toSorted(e)},toSpliced(...e){return vn(this).toSpliced(...e)},unshift(...e){return An(this,"unshift",e)},values(){return xi(this,"values",Ne)}};function xi(e,t,n){const o=vo(e),i=o[t]();return o!==e&&!dt(e)&&(i._next=i.next,i.next=()=>{const r=i._next();return r.done||(r.value=n(r.value)),r}),i}const lc=Array.prototype;function Nt(e,t,n,o,i,r){const s=vo(e),l=s!==e&&!dt(e),a=s[t];if(a!==lc[t]){const d=a.apply(e,r);return l?Ne(d):d}let u=n;s!==e&&(l?u=function(d,f){return n.call(this,Ne(d),f,e)}:n.length>2&&(u=function(d,f){return n.call(this,d,f,e)}));const c=a.call(s,u,o);return l&&i?i(c):c}function Wr(e,t,n,o){const i=vo(e);let r=n;return i!==e&&(dt(e)?n.length>3&&(r=function(s,l,a){return n.call(this,s,l,a,e)}):r=function(s,l,a){return n.call(this,s,Ne(l),a,e)}),i[t](r,...o)}function _i(e,t,n){const o=xe(e);Ue(o,"iterate",Dn);const i=o[t](...n);return(i===-1||i===!1)&&ki(n[0])?(n[0]=xe(n[0]),o[t](...n)):i}function An(e,t,n=[]){Ct(),mi();const o=xe(e)[t].apply(e,n);return vi(),Tt(),o}const ac=rt("__proto__,__v_isRef,__isVue"),Ur=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(yt));function cc(e){yt(e)||(e=String(e));const t=xe(this);return Ue(t,"has",e),t.hasOwnProperty(e)}class qr{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,o){if(n==="__v_skip")return t.__v_skip;const i=this._isReadonly,r=this._isShallow;if(n==="__v_isReactive")return!i;if(n==="__v_isReadonly")return i;if(n==="__v_isShallow")return r;if(n==="__v_raw")return o===(i?r?Jr:Gr:r?Xr:Yr).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const s=re(t);if(!i){let a;if(s&&(a=sc[n]))return a;if(n==="hasOwnProperty")return cc}const l=Reflect.get(t,n,ze(t)?t:o);if((yt(n)?Ur.has(n):ac(n))||(i||Ue(t,"get",n),r))return l;if(ze(l)){const a=s&&ci(n)?l:l.value;return i&&Te(a)?Ln(a):a}return Te(l)?i?Ln(l):xo(l):l}}class Kr extends qr{constructor(t=!1){super(!1,t)}set(t,n,o,i){let r=t[n];if(!this._isShallow){const a=Zt(r);if(!dt(o)&&!Zt(o)&&(r=xe(r),o=xe(o)),!re(t)&&ze(r)&&!ze(o))return a||(r.value=o),!0}const s=re(t)&&ci(n)?Number(n)<t.length:ke(t,n),l=Reflect.set(t,n,o,ze(t)?t:i);return t===xe(i)&&(s?tt(o,r)&&Bt(t,"set",n,o):Bt(t,"add",n,o)),l}deleteProperty(t,n){const o=ke(t,n);t[n];const i=Reflect.deleteProperty(t,n);return i&&o&&Bt(t,"delete",n,void 0),i}has(t,n){const o=Reflect.has(t,n);return(!yt(n)||!Ur.has(n))&&Ue(t,"has",n),o}ownKeys(t){return Ue(t,"iterate",re(t)?"length":on),Reflect.ownKeys(t)}}class Zr extends qr{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const uc=new Kr,dc=new Zr,fc=new Kr(!0),pc=new Zr(!0),Si=e=>e,bo=e=>Reflect.getPrototypeOf(e);function hc(e,t,n){return function(...o){const i=this.__v_raw,r=xe(i),s=mn(r),l=e==="entries"||e===Symbol.iterator&&s,a=e==="keys"&&s,u=i[e](...o),c=n?Si:t?So:Ne;return!t&&Ue(r,"iterate",a?wi:on),{next(){const{value:d,done:f}=u.next();return f?{value:d,done:f}:{value:l?[c(d[0]),c(d[1])]:c(d),done:f}},[Symbol.iterator](){return this}}}}function yo(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function gc(e,t){const n={get(i){const r=this.__v_raw,s=xe(r),l=xe(i);e||(tt(i,l)&&Ue(s,"get",i),Ue(s,"get",l));const{has:a}=bo(s),u=t?Si:e?So:Ne;if(a.call(s,i))return u(r.get(i));if(a.call(s,l))return u(r.get(l));r!==s&&r.get(i)},get size(){const i=this.__v_raw;return!e&&Ue(xe(i),"iterate",on),i.size},has(i){const r=this.__v_raw,s=xe(r),l=xe(i);return e||(tt(i,l)&&Ue(s,"has",i),Ue(s,"has",l)),i===l?r.has(i):r.has(i)||r.has(l)},forEach(i,r){const s=this,l=s.__v_raw,a=xe(l),u=t?Si:e?So:Ne;return!e&&Ue(a,"iterate",on),l.forEach((c,d)=>i.call(r,u(c),u(d),s))}};return Oe(n,e?{add:yo("add"),set:yo("set"),delete:yo("delete"),clear:yo("clear")}:{add(i){!t&&!dt(i)&&!Zt(i)&&(i=xe(i));const r=xe(this);return bo(r).has.call(r,i)||(r.add(i),Bt(r,"add",i,i)),this},set(i,r){!t&&!dt(r)&&!Zt(r)&&(r=xe(r));const s=xe(this),{has:l,get:a}=bo(s);let u=l.call(s,i);u||(i=xe(i),u=l.call(s,i));const c=a.call(s,i);return s.set(i,r),u?tt(r,c)&&Bt(s,"set",i,r):Bt(s,"add",i,r),this},delete(i){const r=xe(this),{has:s,get:l}=bo(r);let a=s.call(r,i);a||(i=xe(i),a=s.call(r,i)),l&&l.call(r,i);const u=r.delete(i);return a&&Bt(r,"delete",i,void 0),u},clear(){const i=xe(this),r=i.size!==0,s=i.clear();return r&&Bt(i,"clear",void 0,void 0),s}}),["keys","values","entries",Symbol.iterator].forEach(i=>{n[i]=hc(i,e,t)}),n}function wo(e,t){const n=gc(e,t);return(o,i,r)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?o:Reflect.get(ke(n,i)&&i in o?n:o,i,r)}const mc={get:wo(!1,!1)},vc={get:wo(!1,!0)},bc={get:wo(!0,!1)},yc={get:wo(!0,!0)},Yr=new WeakMap,Xr=new WeakMap,Gr=new WeakMap,Jr=new WeakMap;function wc(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function xc(e){return e.__v_skip||!Object.isExtensible(e)?0:wc(qa(e))}function xo(e){return Zt(e)?e:_o(e,!1,uc,mc,Yr)}function _c(e){return _o(e,!1,fc,vc,Xr)}function Ln(e){return _o(e,!0,dc,bc,Gr)}function Km(e){return _o(e,!0,pc,yc,Jr)}function _o(e,t,n,o,i){if(!Te(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const r=xc(e);if(r===0)return e;const s=i.get(e);if(s)return s;const l=new Proxy(e,r===2?o:n);return i.set(e,l),l}function bn(e){return Zt(e)?bn(e.__v_raw):!!(e&&e.__v_isReactive)}function Zt(e){return!!(e&&e.__v_isReadonly)}function dt(e){return!!(e&&e.__v_isShallow)}function ki(e){return e?!!e.__v_raw:!1}function xe(e){const t=e&&e.__v_raw;return t?xe(t):e}function Sc(e){return!ke(e,"__v_skip")&&Object.isExtensible(e)&&Er(e,"__v_skip",!0),e}const Ne=e=>Te(e)?xo(e):e,So=e=>Te(e)?Ln(e):e;function ze(e){return e?e.__v_isRef===!0:!1}function te(e){return Qr(e,!1)}function ft(e){return Qr(e,!0)}function Qr(e,t){return ze(e)?e:new kc(e,t)}class kc{constructor(t,n){this.dep=new go,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:xe(t),this._value=n?t:Ne(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,o=this.__v_isShallow||dt(t)||Zt(t);t=o?t:xe(t),tt(t,n)&&(this._rawValue=t,this._value=o?t:Ne(t),this.dep.trigger())}}function Y(e){return ze(e)?e.value:e}function pt(e){return fe(e)?e():Y(e)}const Cc={get:(e,t,n)=>t==="__v_raw"?e:Y(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const i=e[t];return ze(i)&&!ze(n)?(i.value=n,!0):Reflect.set(e,t,n,o)}};function es(e){return bn(e)?e:new Proxy(e,Cc)}class Tc{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new go,{get:o,set:i}=t(n.track.bind(n),n.trigger.bind(n));this._get=o,this._set=i}get value(){return this._value=this._get()}set value(t){this._set(t)}}function ts(e){return new Tc(e)}class Mc{constructor(t,n,o){this._object=t,this._key=n,this._defaultValue=o,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return rc(xe(this._object),this._key)}}class Pc{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function Ec(e,t,n){return ze(e)?e:fe(e)?new Pc(e):Te(e)&&arguments.length>1?Ic(e,t,n):te(e)}function Ic(e,t,n){const o=e[t];return ze(o)?o:new Mc(e,t,n)}class Oc{constructor(t,n,o){this.fn=t,this.setter=n,this._value=void 0,this.dep=new go(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=zn-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=o}notify(){if(this.flags|=16,!(this.flags&8)&&Ee!==this)return jr(this,!0),!0}get value(){const t=this.dep.track();return Vr(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function $c(e,t,n=!1){let o,i;return fe(e)?o=e:(o=e.get,i=e.set),new Oc(o,i,n)}const ko={},Co=new WeakMap;let rn;function zc(e,t=!1,n=rn){if(n){let o=Co.get(n);o||Co.set(n,o=[]),o.push(e)}}function Dc(e,t,n=me){const{immediate:o,deep:i,once:r,scheduler:s,augmentJob:l,call:a}=n,u=m=>i?m:dt(m)||i===!1||i===0?Vt(m,1):Vt(m);let c,d,f,p,w=!1,y=!1;if(ze(e)?(d=()=>e.value,w=dt(e)):bn(e)?(d=()=>u(e),w=!0):re(e)?(y=!0,w=e.some(m=>bn(m)||dt(m)),d=()=>e.map(m=>{if(ze(m))return m.value;if(bn(m))return u(m);if(fe(m))return a?a(m,2):m()})):fe(e)?t?d=a?()=>a(e,2):e:d=()=>{if(f){Ct();try{f()}finally{Tt()}}const m=rn;rn=c;try{return a?a(e,3,[p]):e(p)}finally{rn=m}}:d=kt,t&&i){const m=d,h=i===!0?1/0:i;d=()=>Vt(m(),h)}const O=hi(),M=()=>{c.stop(),O&&O.active&&ai(O.effects,c)};if(r&&t){const m=t;t=(...h)=>{m(...h),M()}}let L=y?new Array(e.length).fill(ko):ko;const $=m=>{if(!(!(c.flags&1)||!c.dirty&&!m))if(t){const h=c.run();if(i||w||(y?h.some((T,H)=>tt(T,L[H])):tt(h,L))){f&&f();const T=rn;rn=c;try{const H=[h,L===ko?void 0:y&&L[0]===ko?[]:L,p];L=h,a?a(t,3,H):t(...H)}finally{rn=T}}}else c.run()};return l&&l($),c=new Ar(d),c.scheduler=s?()=>s($,!1):$,p=m=>zc(m,!1,c),f=c.onStop=()=>{const m=Co.get(c);if(m){if(a)a(m,4);else for(const h of m)h();Co.delete(c)}},t?o?$(!0):L=c.run():s?s($.bind(null,!0),!0):c.run(),M.pause=c.pause.bind(c),M.resume=c.resume.bind(c),M.stop=M,M}function Vt(e,t=1/0,n){if(t<=0||!Te(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,ze(e))Vt(e.value,t,n);else if(re(e))for(let o=0;o<e.length;o++)Vt(e[o],t,n);else if(lo(e)||mn(e))e.forEach(o=>{Vt(o,t,n)});else if(ao(e)){for(const o in e)Vt(e[o],t,n);for(const o of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,o)&&Vt(e[o],t,n)}return e}/**
9
+ **/let We;class tc{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=We,!t&&We&&(this.index=(We.scopes||(We.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=We;try{return We=this,t()}finally{We=n}}}on(){++this._on===1&&(this.prevScope=We,We=this)}off(){this._on>0&&--this._on===0&&(We=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,o;for(n=0,o=this.effects.length;n<o;n++)this.effects[n].stop();for(this.effects.length=0,n=0,o=this.cleanups.length;n<o;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,o=this.scopes.length;n<o;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0}}}function pi(){return We}function nc(e,t=!1){We&&We.cleanups.push(e)}let Ee;const hi=new WeakSet;class Ar{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,We&&We.active&&We.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,hi.has(this)&&(hi.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||jr(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Hr(this),Br(this);const t=Ee,n=yt;Ee=this,yt=!0;try{return this.fn()}finally{Nr(this),Ee=t,yt=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)bi(t);this.deps=this.depsTail=void 0,Hr(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?hi.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){vi(this)&&this.run()}get dirty(){return vi(this)}}let Lr=0,On,$n;function jr(e,t=!1){if(e.flags|=8,t){e.next=$n,$n=e;return}e.next=On,On=e}function gi(){Lr++}function mi(){if(--Lr>0)return;if($n){let t=$n;for($n=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;On;){let t=On;for(On=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(o){e||(e=o)}t=n}}if(e)throw e}function Br(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Nr(e){let t,n=e.depsTail,o=n;for(;o;){const i=o.prevDep;o.version===-1?(o===n&&(n=i),bi(o),oc(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=i}e.deps=t,e.depsTail=n}function vi(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Vr(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Vr(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===zn)||(e.globalVersion=zn,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!vi(e))))return;e.flags|=2;const t=e.dep,n=Ee,o=yt;Ee=e,yt=!0;try{Br(e);const i=e.fn(e._value);(t.version===0||et(i,e._value))&&(e.flags|=128,e._value=i,t.version++)}catch(i){throw t.version++,i}finally{Ee=n,yt=o,Nr(e),e.flags&=-3}}function bi(e,t=!1){const{dep:n,prevSub:o,nextSub:i}=e;if(o&&(o.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=o,e.nextSub=void 0),n.subs===e&&(n.subs=o,!o&&n.computed)){n.computed.flags&=-5;for(let r=n.computed.deps;r;r=r.nextDep)bi(r,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function oc(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let yt=!0;const Rr=[];function Ct(){Rr.push(yt),yt=!1}function Tt(){const e=Rr.pop();yt=e===void 0?!0:e}function Hr(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Ee;Ee=void 0;try{t()}finally{Ee=n}}}let zn=0;class ic{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class go{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Ee||!yt||Ee===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Ee)n=this.activeLink=new ic(Ee,this),Ee.deps?(n.prevDep=Ee.depsTail,Ee.depsTail.nextDep=n,Ee.depsTail=n):Ee.deps=Ee.depsTail=n,Fr(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const o=n.nextDep;o.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=o),n.prevDep=Ee.depsTail,n.nextDep=void 0,Ee.depsTail.nextDep=n,Ee.depsTail=n,Ee.deps===n&&(Ee.deps=o)}return n}trigger(t){this.version++,zn++,this.notify(t)}notify(t){gi();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{mi()}}}function Fr(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let o=t.deps;o;o=o.nextDep)Fr(o)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const mo=new WeakMap,rn=Symbol(""),yi=Symbol(""),Dn=Symbol("");function Ue(e,t,n){if(yt&&Ee){let o=mo.get(e);o||mo.set(e,o=new Map);let i=o.get(n);i||(o.set(n,i=new go),i.map=o,i.key=n),i.track()}}function Bt(e,t,n,o,i,r){const s=mo.get(e);if(!s){zn++;return}const l=a=>{a&&a.trigger()};if(gi(),t==="clear")s.forEach(l);else{const a=re(e),u=a&&ai(n);if(a&&n==="length"){const c=Number(o);s.forEach((d,f)=>{(f==="length"||f===Dn||!bt(f)&&f>=c)&&l(d)})}else switch((n!==void 0||s.has(void 0))&&l(s.get(n)),u&&l(s.get(Dn)),t){case"add":a?u&&l(s.get("length")):(l(s.get(rn)),mn(e)&&l(s.get(yi)));break;case"delete":a||(l(s.get(rn)),mn(e)&&l(s.get(yi)));break;case"set":mn(e)&&l(s.get(rn));break}}mi()}function rc(e,t){const n=mo.get(e);return n&&n.get(t)}function vn(e){const t=xe(e);return t===e?t:(Ue(t,"iterate",Dn),ut(e)?t:t.map(Ne))}function vo(e){return Ue(e=xe(e),"iterate",Dn),e}const sc={__proto__:null,[Symbol.iterator](){return wi(this,Symbol.iterator,Ne)},concat(...e){return vn(this).concat(...e.map(t=>re(t)?vn(t):t))},entries(){return wi(this,"entries",e=>(e[1]=Ne(e[1]),e))},every(e,t){return Nt(this,"every",e,t,void 0,arguments)},filter(e,t){return Nt(this,"filter",e,t,n=>n.map(Ne),arguments)},find(e,t){return Nt(this,"find",e,t,Ne,arguments)},findIndex(e,t){return Nt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Nt(this,"findLast",e,t,Ne,arguments)},findLastIndex(e,t){return Nt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Nt(this,"forEach",e,t,void 0,arguments)},includes(...e){return xi(this,"includes",e)},indexOf(...e){return xi(this,"indexOf",e)},join(e){return vn(this).join(e)},lastIndexOf(...e){return xi(this,"lastIndexOf",e)},map(e,t){return Nt(this,"map",e,t,void 0,arguments)},pop(){return An(this,"pop")},push(...e){return An(this,"push",e)},reduce(e,...t){return Wr(this,"reduce",e,t)},reduceRight(e,...t){return Wr(this,"reduceRight",e,t)},shift(){return An(this,"shift")},some(e,t){return Nt(this,"some",e,t,void 0,arguments)},splice(...e){return An(this,"splice",e)},toReversed(){return vn(this).toReversed()},toSorted(e){return vn(this).toSorted(e)},toSpliced(...e){return vn(this).toSpliced(...e)},unshift(...e){return An(this,"unshift",e)},values(){return wi(this,"values",Ne)}};function wi(e,t,n){const o=vo(e),i=o[t]();return o!==e&&!ut(e)&&(i._next=i.next,i.next=()=>{const r=i._next();return r.done||(r.value=n(r.value)),r}),i}const lc=Array.prototype;function Nt(e,t,n,o,i,r){const s=vo(e),l=s!==e&&!ut(e),a=s[t];if(a!==lc[t]){const d=a.apply(e,r);return l?Ne(d):d}let u=n;s!==e&&(l?u=function(d,f){return n.call(this,Ne(d),f,e)}:n.length>2&&(u=function(d,f){return n.call(this,d,f,e)}));const c=a.call(s,u,o);return l&&i?i(c):c}function Wr(e,t,n,o){const i=vo(e);let r=n;return i!==e&&(ut(e)?n.length>3&&(r=function(s,l,a){return n.call(this,s,l,a,e)}):r=function(s,l,a){return n.call(this,s,Ne(l),a,e)}),i[t](r,...o)}function xi(e,t,n){const o=xe(e);Ue(o,"iterate",Dn);const i=o[t](...n);return(i===-1||i===!1)&&Si(n[0])?(n[0]=xe(n[0]),o[t](...n)):i}function An(e,t,n=[]){Ct(),gi();const o=xe(e)[t].apply(e,n);return mi(),Tt(),o}const ac=it("__proto__,__v_isRef,__isVue"),Ur=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(bt));function cc(e){bt(e)||(e=String(e));const t=xe(this);return Ue(t,"has",e),t.hasOwnProperty(e)}class qr{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,o){if(n==="__v_skip")return t.__v_skip;const i=this._isReadonly,r=this._isShallow;if(n==="__v_isReactive")return!i;if(n==="__v_isReadonly")return i;if(n==="__v_isShallow")return r;if(n==="__v_raw")return o===(i?r?Jr:Gr:r?Xr:Yr).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const s=re(t);if(!i){let a;if(s&&(a=sc[n]))return a;if(n==="hasOwnProperty")return cc}const l=Reflect.get(t,n,ze(t)?t:o);if((bt(n)?Ur.has(n):ac(n))||(i||Ue(t,"get",n),r))return l;if(ze(l)){const a=s&&ai(n)?l:l.value;return i&&Te(a)?Ln(a):a}return Te(l)?i?Ln(l):xo(l):l}}class Kr extends qr{constructor(t=!1){super(!1,t)}set(t,n,o,i){let r=t[n];if(!this._isShallow){const a=Zt(r);if(!ut(o)&&!Zt(o)&&(r=xe(r),o=xe(o)),!re(t)&&ze(r)&&!ze(o))return a||(r.value=o),!0}const s=re(t)&&ai(n)?Number(n)<t.length:ke(t,n),l=Reflect.set(t,n,o,ze(t)?t:i);return t===xe(i)&&(s?et(o,r)&&Bt(t,"set",n,o):Bt(t,"add",n,o)),l}deleteProperty(t,n){const o=ke(t,n);t[n];const i=Reflect.deleteProperty(t,n);return i&&o&&Bt(t,"delete",n,void 0),i}has(t,n){const o=Reflect.has(t,n);return(!bt(n)||!Ur.has(n))&&Ue(t,"has",n),o}ownKeys(t){return Ue(t,"iterate",re(t)?"length":rn),Reflect.ownKeys(t)}}class Zr extends qr{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const uc=new Kr,dc=new Zr,fc=new Kr(!0),pc=new Zr(!0),_i=e=>e,bo=e=>Reflect.getPrototypeOf(e);function hc(e,t,n){return function(...o){const i=this.__v_raw,r=xe(i),s=mn(r),l=e==="entries"||e===Symbol.iterator&&s,a=e==="keys"&&s,u=i[e](...o),c=n?_i:t?So:Ne;return!t&&Ue(r,"iterate",a?yi:rn),{next(){const{value:d,done:f}=u.next();return f?{value:d,done:f}:{value:l?[c(d[0]),c(d[1])]:c(d),done:f}},[Symbol.iterator](){return this}}}}function yo(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function gc(e,t){const n={get(i){const r=this.__v_raw,s=xe(r),l=xe(i);e||(et(i,l)&&Ue(s,"get",i),Ue(s,"get",l));const{has:a}=bo(s),u=t?_i:e?So:Ne;if(a.call(s,i))return u(r.get(i));if(a.call(s,l))return u(r.get(l));r!==s&&r.get(i)},get size(){const i=this.__v_raw;return!e&&Ue(xe(i),"iterate",rn),i.size},has(i){const r=this.__v_raw,s=xe(r),l=xe(i);return e||(et(i,l)&&Ue(s,"has",i),Ue(s,"has",l)),i===l?r.has(i):r.has(i)||r.has(l)},forEach(i,r){const s=this,l=s.__v_raw,a=xe(l),u=t?_i:e?So:Ne;return!e&&Ue(a,"iterate",rn),l.forEach((c,d)=>i.call(r,u(c),u(d),s))}};return Oe(n,e?{add:yo("add"),set:yo("set"),delete:yo("delete"),clear:yo("clear")}:{add(i){!t&&!ut(i)&&!Zt(i)&&(i=xe(i));const r=xe(this);return bo(r).has.call(r,i)||(r.add(i),Bt(r,"add",i,i)),this},set(i,r){!t&&!ut(r)&&!Zt(r)&&(r=xe(r));const s=xe(this),{has:l,get:a}=bo(s);let u=l.call(s,i);u||(i=xe(i),u=l.call(s,i));const c=a.call(s,i);return s.set(i,r),u?et(r,c)&&Bt(s,"set",i,r):Bt(s,"add",i,r),this},delete(i){const r=xe(this),{has:s,get:l}=bo(r);let a=s.call(r,i);a||(i=xe(i),a=s.call(r,i)),l&&l.call(r,i);const u=r.delete(i);return a&&Bt(r,"delete",i,void 0),u},clear(){const i=xe(this),r=i.size!==0,s=i.clear();return r&&Bt(i,"clear",void 0,void 0),s}}),["keys","values","entries",Symbol.iterator].forEach(i=>{n[i]=hc(i,e,t)}),n}function wo(e,t){const n=gc(e,t);return(o,i,r)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?o:Reflect.get(ke(n,i)&&i in o?n:o,i,r)}const mc={get:wo(!1,!1)},vc={get:wo(!1,!0)},bc={get:wo(!0,!1)},yc={get:wo(!0,!0)},Yr=new WeakMap,Xr=new WeakMap,Gr=new WeakMap,Jr=new WeakMap;function wc(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function xc(e){return e.__v_skip||!Object.isExtensible(e)?0:wc(qa(e))}function xo(e){return Zt(e)?e:_o(e,!1,uc,mc,Yr)}function _c(e){return _o(e,!1,fc,vc,Xr)}function Ln(e){return _o(e,!0,dc,bc,Gr)}function qm(e){return _o(e,!0,pc,yc,Jr)}function _o(e,t,n,o,i){if(!Te(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const r=xc(e);if(r===0)return e;const s=i.get(e);if(s)return s;const l=new Proxy(e,r===2?o:n);return i.set(e,l),l}function bn(e){return Zt(e)?bn(e.__v_raw):!!(e&&e.__v_isReactive)}function Zt(e){return!!(e&&e.__v_isReadonly)}function ut(e){return!!(e&&e.__v_isShallow)}function Si(e){return e?!!e.__v_raw:!1}function xe(e){const t=e&&e.__v_raw;return t?xe(t):e}function Sc(e){return!ke(e,"__v_skip")&&Object.isExtensible(e)&&Er(e,"__v_skip",!0),e}const Ne=e=>Te(e)?xo(e):e,So=e=>Te(e)?Ln(e):e;function ze(e){return e?e.__v_isRef===!0:!1}function te(e){return Qr(e,!1)}function dt(e){return Qr(e,!0)}function Qr(e,t){return ze(e)?e:new kc(e,t)}class kc{constructor(t,n){this.dep=new go,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:xe(t),this._value=n?t:Ne(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,o=this.__v_isShallow||ut(t)||Zt(t);t=o?t:xe(t),et(t,n)&&(this._rawValue=t,this._value=o?t:Ne(t),this.dep.trigger())}}function X(e){return ze(e)?e.value:e}function ft(e){return fe(e)?e():X(e)}const Cc={get:(e,t,n)=>t==="__v_raw"?e:X(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const i=e[t];return ze(i)&&!ze(n)?(i.value=n,!0):Reflect.set(e,t,n,o)}};function es(e){return bn(e)?e:new Proxy(e,Cc)}class Tc{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new go,{get:o,set:i}=t(n.track.bind(n),n.trigger.bind(n));this._get=o,this._set=i}get value(){return this._value=this._get()}set value(t){this._set(t)}}function ts(e){return new Tc(e)}class Mc{constructor(t,n,o){this._object=t,this._key=n,this._defaultValue=o,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return rc(xe(this._object),this._key)}}class Pc{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function Ec(e,t,n){return ze(e)?e:fe(e)?new Pc(e):Te(e)&&arguments.length>1?Ic(e,t,n):te(e)}function Ic(e,t,n){const o=e[t];return ze(o)?o:new Mc(e,t,n)}class Oc{constructor(t,n,o){this.fn=t,this.setter=n,this._value=void 0,this.dep=new go(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=zn-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=o}notify(){if(this.flags|=16,!(this.flags&8)&&Ee!==this)return jr(this,!0),!0}get value(){const t=this.dep.track();return Vr(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function $c(e,t,n=!1){let o,i;return fe(e)?o=e:(o=e.get,i=e.set),new Oc(o,i,n)}const ko={},Co=new WeakMap;let sn;function zc(e,t=!1,n=sn){if(n){let o=Co.get(n);o||Co.set(n,o=[]),o.push(e)}}function Dc(e,t,n=me){const{immediate:o,deep:i,once:r,scheduler:s,augmentJob:l,call:a}=n,u=w=>i?w:ut(w)||i===!1||i===0?Vt(w,1):Vt(w);let c,d,f,p,y=!1,b=!1;if(ze(e)?(d=()=>e.value,y=ut(e)):bn(e)?(d=()=>u(e),y=!0):re(e)?(b=!0,y=e.some(w=>bn(w)||ut(w)),d=()=>e.map(w=>{if(ze(w))return w.value;if(bn(w))return u(w);if(fe(w))return a?a(w,2):w()})):fe(e)?t?d=a?()=>a(e,2):e:d=()=>{if(f){Ct();try{f()}finally{Tt()}}const w=sn;sn=c;try{return a?a(e,3,[p]):e(p)}finally{sn=w}}:d=kt,t&&i){const w=d,g=i===!0?1/0:i;d=()=>Vt(w(),g)}const $=pi(),M=()=>{c.stop(),$&&$.active&&li($.effects,c)};if(r&&t){const w=t;t=(...g)=>{w(...g),M()}}let L=b?new Array(e.length).fill(ko):ko;const D=w=>{if(!(!(c.flags&1)||!c.dirty&&!w))if(t){const g=c.run();if(i||y||(b?g.some((E,U)=>et(E,L[U])):et(g,L))){f&&f();const E=sn;sn=c;try{const U=[g,L===ko?void 0:b&&L[0]===ko?[]:L,p];L=g,a?a(t,3,U):t(...U)}finally{sn=E}}}else c.run()};return l&&l(D),c=new Ar(d),c.scheduler=s?()=>s(D,!1):D,p=w=>zc(w,!1,c),f=c.onStop=()=>{const w=Co.get(c);if(w){if(a)a(w,4);else for(const g of w)g();Co.delete(c)}},t?o?D(!0):L=c.run():s?s(D.bind(null,!0),!0):c.run(),M.pause=c.pause.bind(c),M.resume=c.resume.bind(c),M.stop=M,M}function Vt(e,t=1/0,n){if(t<=0||!Te(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,ze(e))Vt(e.value,t,n);else if(re(e))for(let o=0;o<e.length;o++)Vt(e[o],t,n);else if(lo(e)||mn(e))e.forEach(o=>{Vt(o,t,n)});else if(ao(e)){for(const o in e)Vt(e[o],t,n);for(const o of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,o)&&Vt(e[o],t,n)}return e}/**
10
10
  * @vue/runtime-core v3.5.24
11
11
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
12
12
  * @license MIT
13
- **/const jn=[];let Ci=!1;function Zm(e,...t){if(Ci)return;Ci=!0,Ct();const n=jn.length?jn[jn.length-1].component:null,o=n&&n.appContext.config.warnHandler,i=Ac();if(o)yn(o,n,11,[e+t.map(r=>{var s,l;return(l=(s=r.toString)==null?void 0:s.call(r))!=null?l:JSON.stringify(r)}).join(""),n&&n.proxy,i.map(({vnode:r})=>`at <${ol(n,r.type)}>`).join(`
13
+ **/const jn=[];let ki=!1;function Km(e,...t){if(ki)return;ki=!0,Ct();const n=jn.length?jn[jn.length-1].component:null,o=n&&n.appContext.config.warnHandler,i=Ac();if(o)yn(o,n,11,[e+t.map(r=>{var s,l;return(l=(s=r.toString)==null?void 0:s.call(r))!=null?l:JSON.stringify(r)}).join(""),n&&n.proxy,i.map(({vnode:r})=>`at <${ol(n,r.type)}>`).join(`
14
14
  `),i]);else{const r=[`[Vue warn]: ${e}`,...t];i.length&&r.push(`
15
- `,...Lc(i)),console.warn(...r)}Tt(),Ci=!1}function Ac(){let e=jn[jn.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const o=e.component&&e.component.parent;e=o&&o.vnode}return t}function Lc(e){const t=[];return e.forEach((n,o)=>{t.push(...o===0?[]:[`
16
- `],...jc(n))}),t}function jc({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",o=e.component?e.component.parent==null:!1,i=` at <${ol(e.component,e.type,o)}`,r=">"+n;return e.props?[i,...Bc(e.props),r]:[i+r]}function Bc(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(o=>{t.push(...ns(o,e[o]))}),n.length>3&&t.push(" ..."),t}function ns(e,t,n){return $e(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:ze(t)?(t=ns(e,xe(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):fe(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=xe(t),n?t:[`${e}=`,t])}function yn(e,t,n,o){try{return o?e(...o):e()}catch(i){To(i,t,n)}}function xt(e,t,n,o){if(fe(e)){const i=yn(e,t,n,o);return i&&Mr(i)&&i.catch(r=>{To(r,t,n)}),i}if(re(e)){const i=[];for(let r=0;r<e.length;r++)i.push(xt(e[r],t,n,o));return i}}function To(e,t,n,o=!0){const i=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:s}=t&&t.appContext.config||me;if(t){let l=t.parent;const a=t.proxy,u=`https://vuejs.org/error-reference/#runtime-${n}`;for(;l;){const c=l.ec;if(c){for(let d=0;d<c.length;d++)if(c[d](e,a,u)===!1)return}l=l.parent}if(r){Ct(),yn(r,null,10,[e,a,u]),Tt();return}}Nc(e,n,i,o,s)}function Nc(e,t,n,o=!0,i=!1){if(i)throw e;console.error(e)}const Ze=[];let Mt=-1;const wn=[];let Yt=null,xn=0;const os=Promise.resolve();let Mo=null;function ht(e){const t=Mo||os;return e?t.then(this?e.bind(this):e):t}function Vc(e){let t=Mt+1,n=Ze.length;for(;t<n;){const o=t+n>>>1,i=Ze[o],r=Bn(i);r<e||r===e&&i.flags&2?t=o+1:n=o}return t}function Ti(e){if(!(e.flags&1)){const t=Bn(e),n=Ze[Ze.length-1];!n||!(e.flags&2)&&t>=Bn(n)?Ze.push(e):Ze.splice(Vc(t),0,e),e.flags|=1,is()}}function is(){Mo||(Mo=os.then(ls))}function Rc(e){re(e)?wn.push(...e):Yt&&e.id===-1?Yt.splice(xn+1,0,e):e.flags&1||(wn.push(e),e.flags|=1),is()}function rs(e,t,n=Mt+1){for(;n<Ze.length;n++){const o=Ze[n];if(o&&o.flags&2){if(e&&o.id!==e.uid)continue;Ze.splice(n,1),n--,o.flags&4&&(o.flags&=-2),o(),o.flags&4||(o.flags&=-2)}}}function ss(e){if(wn.length){const t=[...new Set(wn)].sort((n,o)=>Bn(n)-Bn(o));if(wn.length=0,Yt){Yt.push(...t);return}for(Yt=t,xn=0;xn<Yt.length;xn++){const n=Yt[xn];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Yt=null,xn=0}}const Bn=e=>e.id==null?e.flags&2?-1:1/0:e.id;function ls(e){try{for(Mt=0;Mt<Ze.length;Mt++){const t=Ze[Mt];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),yn(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Mt<Ze.length;Mt++){const t=Ze[Mt];t&&(t.flags&=-2)}Mt=-1,Ze.length=0,ss(),Mo=null,(Ze.length||wn.length)&&ls()}}let Ve=null,as=null;function Po(e){const t=Ve;return Ve=e,as=e&&e.type.__scopeId||null,t}function oe(e,t=Ve,n){if(!t||e._n)return e;const o=(...i)=>{o._d&&No(-1);const r=Po(t);let s;try{s=e(...i)}finally{Po(r),o._d&&No(1)}return s};return o._n=!0,o._c=!0,o._d=!0,o}function Re(e,t){if(Ve===null)return e;const n=Ho(Ve),o=e.dirs||(e.dirs=[]);for(let i=0;i<t.length;i++){let[r,s,l,a=me]=t[i];r&&(fe(r)&&(r={mounted:r,updated:r}),r.deep&&Vt(s),o.push({dir:r,instance:n,value:s,oldValue:void 0,arg:l,modifiers:a}))}return e}function sn(e,t,n,o){const i=e.dirs,r=t&&t.dirs;for(let s=0;s<i.length;s++){const l=i[s];r&&(l.oldValue=r[s].value);let a=l.dir[o];a&&(Ct(),xt(a,n,8,[e.el,l,e,t]),Tt())}}const Hc=Symbol("_vte"),cs=e=>e.__isTeleport,Rt=Symbol("_leaveCb"),Eo=Symbol("_enterCb");function Fc(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return je(()=>{e.isMounted=!0}),Ei(()=>{e.isUnmounting=!0}),e}const gt=[Function,Array],us={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:gt,onEnter:gt,onAfterEnter:gt,onEnterCancelled:gt,onBeforeLeave:gt,onLeave:gt,onAfterLeave:gt,onLeaveCancelled:gt,onBeforeAppear:gt,onAppear:gt,onAfterAppear:gt,onAppearCancelled:gt},ds=e=>{const t=e.subTree;return t.component?ds(t.component):t},Wc={name:"BaseTransition",props:us,setup(e,{slots:t}){const n=un(),o=Fc();return()=>{const i=t.default&&gs(t.default(),!0);if(!i||!i.length)return;const r=fs(i),s=xe(e),{mode:l}=s;if(o.isLeaving)return Pi(r);const a=hs(r);if(!a)return Pi(r);let u=Mi(a,s,o,n,d=>u=d);a.type!==qe&&Nn(a,u);let c=n.subTree&&hs(n.subTree);if(c&&c.type!==qe&&!cn(c,a)&&ds(n).type!==qe){let d=Mi(c,s,o,n);if(Nn(c,d),l==="out-in"&&a.type!==qe)return o.isLeaving=!0,d.afterLeave=()=>{o.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,c=void 0},Pi(r);l==="in-out"&&a.type!==qe?d.delayLeave=(f,p,w)=>{const y=ps(o,c);y[String(c.key)]=c,f[Rt]=()=>{p(),f[Rt]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{w(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return r}}};function fs(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==qe){t=n;break}}return t}const Uc=Wc;function ps(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function Mi(e,t,n,o,i){const{appear:r,mode:s,persisted:l=!1,onBeforeEnter:a,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:f,onLeave:p,onAfterLeave:w,onLeaveCancelled:y,onBeforeAppear:O,onAppear:M,onAfterAppear:L,onAppearCancelled:$}=t,m=String(e.key),h=ps(n,e),T=(U,ee)=>{U&&xt(U,o,9,ee)},H=(U,ee)=>{const B=ee[1];T(U,ee),re(U)?U.every(C=>C.length<=1)&&B():U.length<=1&&B()},W={mode:s,persisted:l,beforeEnter(U){let ee=a;if(!n.isMounted)if(r)ee=O||a;else return;U[Rt]&&U[Rt](!0);const B=h[m];B&&cn(e,B)&&B.el[Rt]&&B.el[Rt](),T(ee,[U])},enter(U){let ee=u,B=c,C=d;if(!n.isMounted)if(r)ee=M||u,B=L||c,C=$||d;else return;let X=!1;const S=U[Eo]=Q=>{X||(X=!0,Q?T(C,[U]):T(B,[U]),W.delayedLeave&&W.delayedLeave(),U[Eo]=void 0)};ee?H(ee,[U,S]):S()},leave(U,ee){const B=String(e.key);if(U[Eo]&&U[Eo](!0),n.isUnmounting)return ee();T(f,[U]);let C=!1;const X=U[Rt]=S=>{C||(C=!0,ee(),S?T(y,[U]):T(w,[U]),U[Rt]=void 0,h[B]===e&&delete h[B])};h[B]=e,p?H(p,[U,X]):X()},clone(U){const ee=Mi(U,t,n,o,i);return i&&i(ee),ee}};return W}function Pi(e){if(Oo(e))return e=Gt(e),e.children=null,e}function hs(e){if(!Oo(e))return cs(e.type)&&e.children?fs(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&fe(n.default))return n.default()}}function Nn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Nn(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function gs(e,t=!1,n){let o=[],i=0;for(let r=0;r<e.length;r++){let s=e[r];const l=n==null?s.key:String(n)+String(s.key!=null?s.key:r);s.type===ye?(s.patchFlag&128&&i++,o=o.concat(gs(s.children,t,l))):(t||s.type!==qe)&&o.push(l!=null?Gt(s,{key:l}):s)}if(i>1)for(let r=0;r<o.length;r++)o[r].patchFlag=-2;return o}function he(e,t){return fe(e)?Oe({name:e.name},t,{setup:e}):e}function ms(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const Io=new WeakMap;function Vn(e,t,n,o,i=!1){if(re(e)){e.forEach((w,y)=>Vn(w,t&&(re(t)?t[y]:t),n,o,i));return}if(_n(o)&&!i){o.shapeFlag&512&&o.type.__asyncResolved&&o.component.subTree.component&&Vn(e,t,n,o.component.subTree);return}const r=o.shapeFlag&4?Ho(o.component):o.el,s=i?null:r,{i:l,r:a}=e,u=t&&t.r,c=l.refs===me?l.refs={}:l.refs,d=l.setupState,f=xe(d),p=d===me?Cr:w=>ke(f,w);if(u!=null&&u!==a){if(vs(t),$e(u))c[u]=null,p(u)&&(d[u]=null);else if(ze(u)){u.value=null;const w=t;w.k&&(c[w.k]=null)}}if(fe(a))yn(a,l,12,[s,c]);else{const w=$e(a),y=ze(a);if(w||y){const O=()=>{if(e.f){const M=w?p(a)?d[a]:c[a]:a.value;if(i)re(M)&&ai(M,r);else if(re(M))M.includes(r)||M.push(r);else if(w)c[a]=[r],p(a)&&(d[a]=c[a]);else{const L=[r];a.value=L,e.k&&(c[e.k]=L)}}else w?(c[a]=s,p(a)&&(d[a]=s)):y&&(a.value=s,e.k&&(c[e.k]=s))};if(s){const M=()=>{O(),Io.delete(e)};M.id=-1,Io.set(e,M),st(M,n)}else vs(e),O()}}}function vs(e){const t=Io.get(e);t&&(t.flags|=8,Io.delete(e))}po().requestIdleCallback,po().cancelIdleCallback;const _n=e=>!!e.type.__asyncLoader,Oo=e=>e.type.__isKeepAlive;function qc(e,t){bs(e,"a",t)}function Kc(e,t){bs(e,"da",t)}function bs(e,t,n=Ke){const o=e.__wdc||(e.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if($o(t,o,n),n){let i=n.parent;for(;i&&i.parent;)Oo(i.parent.vnode)&&Zc(o,t,n,i),i=i.parent}}function Zc(e,t,n,o){const i=$o(t,e,o,!0);Pt(()=>{ai(o[t],i)},n)}function $o(e,t,n=Ke,o=!1){if(n){const i=n[e]||(n[e]=[]),r=t.__weh||(t.__weh=(...s)=>{Ct();const l=Kn(n),a=xt(t,n,e,s);return l(),Tt(),a});return o?i.unshift(r):i.push(r),r}}const Ht=e=>(t,n=Ke)=>{(!Zn||e==="sp")&&$o(e,(...o)=>t(...o),n)},Yc=Ht("bm"),je=Ht("m"),Xc=Ht("bu"),Gc=Ht("u"),Ei=Ht("bum"),Pt=Ht("um"),Jc=Ht("sp"),Qc=Ht("rtg"),eu=Ht("rtc");function ys(e,t=Ke){$o("ec",e,t)}const tu="components",ws=Symbol.for("v-ndc");function xs(e){return $e(e)?nu(tu,e,!1)||e:e||ws}function nu(e,t,n=!0,o=!1){const i=Ve||Ke;if(i){const r=i.type;{const l=nl(r,!1);if(l&&(l===t||l===He(t)||l===uo(He(t))))return r}const s=_s(i[e]||r[e],t)||_s(i.appContext[e],t);return!s&&o?r:s}}function _s(e,t){return e&&(e[t]||e[He(t)]||e[uo(He(t))])}function Xt(e,t,n,o){let i;const r=n,s=re(e);if(s||$e(e)){const l=s&&bn(e);let a=!1,u=!1;l&&(a=!dt(e),u=Zt(e),e=vo(e)),i=new Array(e.length);for(let c=0,d=e.length;c<d;c++)i[c]=t(a?u?So(Ne(e[c])):Ne(e[c]):e[c],c,void 0,r)}else if(typeof e=="number"){i=new Array(e);for(let l=0;l<e;l++)i[l]=t(l+1,l,void 0,r)}else if(Te(e))if(e[Symbol.iterator])i=Array.from(e,(l,a)=>t(l,a,void 0,r));else{const l=Object.keys(e);i=new Array(l.length);for(let a=0,u=l.length;a<u;a++){const c=l[a];i[a]=t(e[c],c,a,r)}}else i=[];return i}function Ii(e,t){for(let n=0;n<t.length;n++){const o=t[n];if(re(o))for(let i=0;i<o.length;i++)e[o[i].name]=o[i].fn;else o&&(e[o.name]=o.key?(...i)=>{const r=o.fn(...i);return r&&(r.key=o.key),r}:o.fn)}return e}function Se(e,t,n={},o,i){if(Ve.ce||Ve.parent&&_n(Ve.parent)&&Ve.parent.ce){const u=Object.keys(n).length>0;return t!=="default"&&(n.name=t),b(),ie(ye,null,[A("slot",n,o&&o())],u?-2:64)}let r=e[t];r&&r._c&&(r._d=!1),b();const s=r&&Ss(r(n)),l=n.key||s&&s.key,a=ie(ye,{key:(l&&!yt(l)?l:`_${t}`)+(!s&&o?"_fb":"")},s||(o?o():[]),s&&e._===1?64:-2);return a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),r&&r._c&&(r._d=!0),a}function Ss(e){return e.some(t=>qn(t)?!(t.type===qe||t.type===ye&&!Ss(t.children)):!0)?e:null}const Oi=e=>e?Qs(e)?Ho(e):Oi(e.parent):null,Rn=Oe(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=>Oi(e.parent),$root:e=>Oi(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Ts(e),$forceUpdate:e=>e.f||(e.f=()=>{Ti(e.update)}),$nextTick:e=>e.n||(e.n=ht.bind(e.proxy)),$watch:e=>ku.bind(e)}),$i=(e,t)=>e!==me&&!e.__isScriptSetup&&ke(e,t),ou={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:o,data:i,props:r,accessCache:s,type:l,appContext:a}=e;let u;if(t[0]!=="$"){const p=s[t];if(p!==void 0)switch(p){case 1:return o[t];case 2:return i[t];case 4:return n[t];case 3:return r[t]}else{if($i(o,t))return s[t]=1,o[t];if(i!==me&&ke(i,t))return s[t]=2,i[t];if((u=e.propsOptions[0])&&ke(u,t))return s[t]=3,r[t];if(n!==me&&ke(n,t))return s[t]=4,n[t];zi&&(s[t]=0)}}const c=Rn[t];let d,f;if(c)return t==="$attrs"&&Ue(e.attrs,"get",""),c(e);if((d=l.__cssModules)&&(d=d[t]))return d;if(n!==me&&ke(n,t))return s[t]=4,n[t];if(f=a.config.globalProperties,ke(f,t))return f[t]},set({_:e},t,n){const{data:o,setupState:i,ctx:r}=e;return $i(i,t)?(i[t]=n,!0):o!==me&&ke(o,t)?(o[t]=n,!0):ke(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(r[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:i,propsOptions:r,type:s}},l){let a,u;return!!(n[l]||e!==me&&l[0]!=="$"&&ke(e,l)||$i(t,l)||(a=r[0])&&ke(a,l)||ke(o,l)||ke(Rn,l)||ke(i.config.globalProperties,l)||(u=s.__cssModules)&&u[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:ke(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function zo(e){return re(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function Ye(e,t){return!e||!t?e||t:re(e)&&re(t)?e.concat(t):Oe({},zo(e),zo(t))}let zi=!0;function iu(e){const t=Ts(e),n=e.proxy,o=e.ctx;zi=!1,t.beforeCreate&&ks(t.beforeCreate,e,"bc");const{data:i,computed:r,methods:s,watch:l,provide:a,inject:u,created:c,beforeMount:d,mounted:f,beforeUpdate:p,updated:w,activated:y,deactivated:O,beforeDestroy:M,beforeUnmount:L,destroyed:$,unmounted:m,render:h,renderTracked:T,renderTriggered:H,errorCaptured:W,serverPrefetch:U,expose:ee,inheritAttrs:B,components:C,directives:X,filters:S}=t;if(u&&ru(u,o,null),s)for(const _ in s){const x=s[_];fe(x)&&(o[_]=x.bind(n))}if(i){const _=i.call(n,n);Te(_)&&(e.data=xo(_))}if(zi=!0,r)for(const _ in r){const x=r[_],j=fe(x)?x.bind(n,n):fe(x.get)?x.get.bind(n,n):kt,K=!fe(x)&&fe(x.set)?x.set.bind(n):kt,D=J({get:j,set:K});Object.defineProperty(o,_,{enumerable:!0,configurable:!0,get:()=>D.value,set:ge=>D.value=ge})}if(l)for(const _ in l)Cs(l[_],o,n,_);if(a){const _=fe(a)?a.call(n):a;Reflect.ownKeys(_).forEach(x=>{Fn(x,_[x])})}c&&ks(c,e,"c");function F(_,x){re(x)?x.forEach(j=>_(j.bind(n))):x&&_(x.bind(n))}if(F(Yc,d),F(je,f),F(Xc,p),F(Gc,w),F(qc,y),F(Kc,O),F(ys,W),F(eu,T),F(Qc,H),F(Ei,L),F(Pt,m),F(Jc,U),re(ee))if(ee.length){const _=e.exposed||(e.exposed={});ee.forEach(x=>{Object.defineProperty(_,x,{get:()=>n[x],set:j=>n[x]=j,enumerable:!0})})}else e.exposed||(e.exposed={});h&&e.render===kt&&(e.render=h),B!=null&&(e.inheritAttrs=B),C&&(e.components=C),X&&(e.directives=X),U&&ms(e)}function ru(e,t,n=kt){re(e)&&(e=Di(e));for(const o in e){const i=e[o];let r;Te(i)?"default"in i?r=Ft(i.from||o,i.default,!0):r=Ft(i.from||o):r=Ft(i),ze(r)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>r.value,set:s=>r.value=s}):t[o]=r}}function ks(e,t,n){xt(re(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function Cs(e,t,n,o){let i=o.includes(".")?Ws(n,o):()=>n[o];if($e(e)){const r=t[e];fe(r)&&de(i,r)}else if(fe(e))de(i,e.bind(n));else if(Te(e))if(re(e))e.forEach(r=>Cs(r,t,n,o));else{const r=fe(e.handler)?e.handler.bind(n):t[e.handler];fe(r)&&de(i,r,e)}}function Ts(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:i,optionsCache:r,config:{optionMergeStrategies:s}}=e.appContext,l=r.get(t);let a;return l?a=l:!i.length&&!n&&!o?a=t:(a={},i.length&&i.forEach(u=>Do(a,u,s,!0)),Do(a,t,s)),Te(t)&&r.set(t,a),a}function Do(e,t,n,o=!1){const{mixins:i,extends:r}=t;r&&Do(e,r,n,!0),i&&i.forEach(s=>Do(e,s,n,!0));for(const s in t)if(!(o&&s==="expose")){const l=su[s]||n&&n[s];e[s]=l?l(e[s],t[s]):t[s]}return e}const su={data:Ms,props:Ps,emits:Ps,methods:Hn,computed:Hn,beforeCreate:Xe,created:Xe,beforeMount:Xe,mounted:Xe,beforeUpdate:Xe,updated:Xe,beforeDestroy:Xe,beforeUnmount:Xe,destroyed:Xe,unmounted:Xe,activated:Xe,deactivated:Xe,errorCaptured:Xe,serverPrefetch:Xe,components:Hn,directives:Hn,watch:au,provide:Ms,inject:lu};function Ms(e,t){return t?e?function(){return Oe(fe(e)?e.call(this,this):e,fe(t)?t.call(this,this):t)}:t:e}function lu(e,t){return Hn(Di(e),Di(t))}function Di(e){if(re(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Xe(e,t){return e?[...new Set([].concat(e,t))]:t}function Hn(e,t){return e?Oe(Object.create(null),e,t):t}function Ps(e,t){return e?re(e)&&re(t)?[...new Set([...e,...t])]:Oe(Object.create(null),zo(e),zo(t??{})):t}function au(e,t){if(!e)return t;if(!t)return e;const n=Oe(Object.create(null),e);for(const o in t)n[o]=Xe(e[o],t[o]);return n}function Es(){return{app:null,config:{isNativeTag:Cr,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let cu=0;function uu(e,t){return function(o,i=null){fe(o)||(o=Oe({},o)),i!=null&&!Te(i)&&(i=null);const r=Es(),s=new WeakSet,l=[];let a=!1;const u=r.app={_uid:cu++,_component:o,_props:i,_container:null,_context:r,_instance:null,version:qu,get config(){return r.config},set config(c){},use(c,...d){return s.has(c)||(c&&fe(c.install)?(s.add(c),c.install(u,...d)):fe(c)&&(s.add(c),c(u,...d))),u},mixin(c){return r.mixins.includes(c)||r.mixins.push(c),u},component(c,d){return d?(r.components[c]=d,u):r.components[c]},directive(c,d){return d?(r.directives[c]=d,u):r.directives[c]},mount(c,d,f){if(!a){const p=u._ceVNode||A(o,i);return p.appContext=r,f===!0?f="svg":f===!1&&(f=void 0),e(p,c,f),a=!0,u._container=c,c.__vue_app__=u,Ho(p.component)}},onUnmount(c){l.push(c)},unmount(){a&&(xt(l,u._instance,16),e(null,u._container),delete u._container.__vue_app__)},provide(c,d){return r.provides[c]=d,u},runWithContext(c){const d=ln;ln=u;try{return c()}finally{ln=d}}};return u}}let ln=null;function Fn(e,t){if(Ke){let n=Ke.provides;const o=Ke.parent&&Ke.parent.provides;o===n&&(n=Ke.provides=Object.create(o)),n[e]=t}}function Ft(e,t,n=!1){const o=un();if(o||ln){let i=ln?ln._context.provides:o?o.parent==null||o.ce?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return n&&fe(t)?t.call(o&&o.proxy):t}}function Is(){return!!(un()||ln)}const Os={},$s=()=>Object.create(Os),zs=e=>Object.getPrototypeOf(e)===Os;function du(e,t,n,o=!1){const i={},r=$s();e.propsDefaults=Object.create(null),Ds(e,t,i,r);for(const s in e.propsOptions[0])s in i||(i[s]=void 0);n?e.props=o?i:_c(i):e.type.props?e.props=i:e.props=r,e.attrs=r}function fu(e,t,n,o){const{props:i,attrs:r,vnode:{patchFlag:s}}=e,l=xe(i),[a]=e.propsOptions;let u=!1;if((o||s>0)&&!(s&16)){if(s&8){const c=e.vnode.dynamicProps;for(let d=0;d<c.length;d++){let f=c[d];if(Lo(e.emitsOptions,f))continue;const p=t[f];if(a)if(ke(r,f))p!==r[f]&&(r[f]=p,u=!0);else{const w=He(f);i[w]=Ai(a,l,w,p,e,!1)}else p!==r[f]&&(r[f]=p,u=!0)}}}else{Ds(e,t,i,r)&&(u=!0);let c;for(const d in l)(!t||!ke(t,d)&&((c=et(d))===d||!ke(t,c)))&&(a?n&&(n[d]!==void 0||n[c]!==void 0)&&(i[d]=Ai(a,l,d,void 0,e,!0)):delete i[d]);if(r!==l)for(const d in r)(!t||!ke(t,d))&&(delete r[d],u=!0)}u&&Bt(e.attrs,"set","")}function Ds(e,t,n,o){const[i,r]=e.propsOptions;let s=!1,l;if(t)for(let a in t){if(In(a))continue;const u=t[a];let c;i&&ke(i,c=He(a))?!r||!r.includes(c)?n[c]=u:(l||(l={}))[c]=u:Lo(e.emitsOptions,a)||(!(a in o)||u!==o[a])&&(o[a]=u,s=!0)}if(r){const a=xe(n),u=l||me;for(let c=0;c<r.length;c++){const d=r[c];n[d]=Ai(i,a,d,u[d],e,!ke(u,d))}}return s}function Ai(e,t,n,o,i,r){const s=e[n];if(s!=null){const l=ke(s,"default");if(l&&o===void 0){const a=s.default;if(s.type!==Function&&!s.skipFactory&&fe(a)){const{propsDefaults:u}=i;if(n in u)o=u[n];else{const c=Kn(i);o=u[n]=a.call(null,t),c()}}else o=a;i.ce&&i.ce._setProp(n,o)}s[0]&&(r&&!l?o=!1:s[1]&&(o===""||o===et(n))&&(o=!0))}return o}const pu=new WeakMap;function As(e,t,n=!1){const o=n?pu:t.propsCache,i=o.get(e);if(i)return i;const r=e.props,s={},l=[];let a=!1;if(!fe(e)){const c=d=>{a=!0;const[f,p]=As(d,t,!0);Oe(s,f),p&&l.push(...p)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!r&&!a)return Te(e)&&o.set(e,bt),bt;if(re(r))for(let c=0;c<r.length;c++){const d=He(r[c]);Ls(d)&&(s[d]=me)}else if(r)for(const c in r){const d=He(c);if(Ls(d)){const f=r[c],p=s[d]=re(f)||fe(f)?{type:f}:Oe({},f),w=p.type;let y=!1,O=!0;if(re(w))for(let M=0;M<w.length;++M){const L=w[M],$=fe(L)&&L.name;if($==="Boolean"){y=!0;break}else $==="String"&&(O=!1)}else y=fe(w)&&w.name==="Boolean";p[0]=y,p[1]=O,(y||ke(p,"default"))&&l.push(d)}}const u=[s,l];return Te(e)&&o.set(e,u),u}function Ls(e){return e[0]!=="$"&&!In(e)}const Li=e=>e==="_"||e==="_ctx"||e==="$stable",ji=e=>re(e)?e.map(Et):[Et(e)],hu=(e,t,n)=>{if(t._n)return t;const o=oe((...i)=>ji(t(...i)),n);return o._c=!1,o},js=(e,t,n)=>{const o=e._ctx;for(const i in e){if(Li(i))continue;const r=e[i];if(fe(r))t[i]=hu(i,r,o);else if(r!=null){const s=ji(r);t[i]=()=>s}}},Bs=(e,t)=>{const n=ji(t);e.slots.default=()=>n},Ns=(e,t,n)=>{for(const o in t)(n||!Li(o))&&(e[o]=t[o])},gu=(e,t,n)=>{const o=e.slots=$s();if(e.vnode.shapeFlag&32){const i=t._;i?(Ns(o,t,n),n&&Er(o,"_",i,!0)):js(t,o)}else t&&Bs(e,t)},mu=(e,t,n)=>{const{vnode:o,slots:i}=e;let r=!0,s=me;if(o.shapeFlag&32){const l=t._;l?n&&l===1?r=!1:Ns(i,t,n):(r=!t.$stable,js(t,i)),s=t}else t&&(Bs(e,t),s={default:1});if(r)for(const l in i)!Li(l)&&s[l]==null&&delete i[l]},st=Ou;function vu(e){return bu(e)}function bu(e,t){const n=po();n.__VUE__=!0;const{insert:o,remove:i,patchProp:r,createElement:s,createText:l,createComment:a,setText:u,setElementText:c,parentNode:d,nextSibling:f,setScopeId:p=kt,insertStaticContent:w}=e,y=(g,v,P,q=null,N=null,R=null,E=void 0,k=null,V=!!v.dynamicChildren)=>{if(g===v)return;g&&!cn(g,v)&&(q=Ae(g),ge(g,N,R,!0),g=null),v.patchFlag===-2&&(V=!1,v.dynamicChildren=null);const{type:z,ref:se,shapeFlag:ne}=v;switch(z){case jo:O(g,v,P,q);break;case qe:M(g,v,P,q);break;case Bo:g==null&&L(v,P,q,E);break;case ye:C(g,v,P,q,N,R,E,k,V);break;default:ne&1?h(g,v,P,q,N,R,E,k,V):ne&6?X(g,v,P,q,N,R,E,k,V):(ne&64||ne&128)&&z.process(g,v,P,q,N,R,E,k,V,De)}se!=null&&N?Vn(se,g&&g.ref,R,v||g,!v):se==null&&g&&g.ref!=null&&Vn(g.ref,null,R,g,!0)},O=(g,v,P,q)=>{if(g==null)o(v.el=l(v.children),P,q);else{const N=v.el=g.el;v.children!==g.children&&u(N,v.children)}},M=(g,v,P,q)=>{g==null?o(v.el=a(v.children||""),P,q):v.el=g.el},L=(g,v,P,q)=>{[g.el,g.anchor]=w(g.children,v,P,q,g.el,g.anchor)},$=({el:g,anchor:v},P,q)=>{let N;for(;g&&g!==v;)N=f(g),o(g,P,q),g=N;o(v,P,q)},m=({el:g,anchor:v})=>{let P;for(;g&&g!==v;)P=f(g),i(g),g=P;i(v)},h=(g,v,P,q,N,R,E,k,V)=>{if(v.type==="svg"?E="svg":v.type==="math"&&(E="mathml"),g==null)T(v,P,q,N,R,E,k,V);else{const z=g.el&&g.el._isVueCE?g.el:null;try{z&&z._beginPatch(),U(g,v,N,R,E,k,V)}finally{z&&z._endPatch()}}},T=(g,v,P,q,N,R,E,k)=>{let V,z;const{props:se,shapeFlag:ne,transition:G,dirs:ce}=g;if(V=g.el=s(g.type,R,se&&se.is,se),ne&8?c(V,g.children):ne&16&&W(g.children,V,null,q,N,Bi(g,R),E,k),ce&&sn(g,null,q,"created"),H(V,g,g.scopeId,E,q),se){for(const Ie in se)Ie!=="value"&&!In(Ie)&&r(V,Ie,null,se[Ie],R,q);"value"in se&&r(V,"value",null,se.value,R),(z=se.onVnodeBeforeMount)&&It(z,q,g)}ce&&sn(g,null,q,"beforeMount");const _e=yu(N,G);_e&&G.beforeEnter(V),o(V,v,P),((z=se&&se.onVnodeMounted)||_e||ce)&&st(()=>{z&&It(z,q,g),_e&&G.enter(V),ce&&sn(g,null,q,"mounted")},N)},H=(g,v,P,q,N)=>{if(P&&p(g,P),q)for(let R=0;R<q.length;R++)p(g,q[R]);if(N){let R=N.subTree;if(v===R||Ys(R.type)&&(R.ssContent===v||R.ssFallback===v)){const E=N.vnode;H(g,E,E.scopeId,E.slotScopeIds,N.parent)}}},W=(g,v,P,q,N,R,E,k,V=0)=>{for(let z=V;z<g.length;z++){const se=g[z]=k?Jt(g[z]):Et(g[z]);y(null,se,v,P,q,N,R,E,k)}},U=(g,v,P,q,N,R,E)=>{const k=v.el=g.el;let{patchFlag:V,dynamicChildren:z,dirs:se}=v;V|=g.patchFlag&16;const ne=g.props||me,G=v.props||me;let ce;if(P&&an(P,!1),(ce=G.onVnodeBeforeUpdate)&&It(ce,P,v,g),se&&sn(v,g,P,"beforeUpdate"),P&&an(P,!0),(ne.innerHTML&&G.innerHTML==null||ne.textContent&&G.textContent==null)&&c(k,""),z?ee(g.dynamicChildren,z,k,P,q,Bi(v,N),R):E||x(g,v,k,null,P,q,Bi(v,N),R,!1),V>0){if(V&16)B(k,ne,G,P,N);else if(V&2&&ne.class!==G.class&&r(k,"class",null,G.class,N),V&4&&r(k,"style",ne.style,G.style,N),V&8){const _e=v.dynamicProps;for(let Ie=0;Ie<_e.length;Ie++){const Me=_e[Ie],ot=ne[Me],it=G[Me];(it!==ot||Me==="value")&&r(k,Me,ot,it,N,P)}}V&1&&g.children!==v.children&&c(k,v.children)}else!E&&z==null&&B(k,ne,G,P,N);((ce=G.onVnodeUpdated)||se)&&st(()=>{ce&&It(ce,P,v,g),se&&sn(v,g,P,"updated")},q)},ee=(g,v,P,q,N,R,E)=>{for(let k=0;k<v.length;k++){const V=g[k],z=v[k],se=V.el&&(V.type===ye||!cn(V,z)||V.shapeFlag&198)?d(V.el):P;y(V,z,se,null,q,N,R,E,!0)}},B=(g,v,P,q,N)=>{if(v!==P){if(v!==me)for(const R in v)!In(R)&&!(R in P)&&r(g,R,v[R],null,N,q);for(const R in P){if(In(R))continue;const E=P[R],k=v[R];E!==k&&R!=="value"&&r(g,R,k,E,N,q)}"value"in P&&r(g,"value",v.value,P.value,N)}},C=(g,v,P,q,N,R,E,k,V)=>{const z=v.el=g?g.el:l(""),se=v.anchor=g?g.anchor:l("");let{patchFlag:ne,dynamicChildren:G,slotScopeIds:ce}=v;ce&&(k=k?k.concat(ce):ce),g==null?(o(z,P,q),o(se,P,q),W(v.children||[],P,se,N,R,E,k,V)):ne>0&&ne&64&&G&&g.dynamicChildren?(ee(g.dynamicChildren,G,P,N,R,E,k),(v.key!=null||N&&v===N.subTree)&&Vs(g,v,!0)):x(g,v,P,se,N,R,E,k,V)},X=(g,v,P,q,N,R,E,k,V)=>{v.slotScopeIds=k,g==null?v.shapeFlag&512?N.ctx.activate(v,P,q,E,V):S(v,P,q,N,R,E,V):Q(g,v,V)},S=(g,v,P,q,N,R,E)=>{const k=g.component=Bu(g,q,N);if(Oo(g)&&(k.ctx.renderer=De),Nu(k,!1,E),k.asyncDep){if(N&&N.registerDep(k,F,E),!g.el){const V=k.subTree=A(qe);M(null,V,v,P),g.placeholder=V.el}}else F(k,g,v,P,N,R,E)},Q=(g,v,P)=>{const q=v.component=g.component;if(Eu(g,v,P))if(q.asyncDep&&!q.asyncResolved){_(q,v,P);return}else q.next=v,q.update();else v.el=g.el,q.vnode=v},F=(g,v,P,q,N,R,E)=>{const k=()=>{if(g.isMounted){let{next:ne,bu:G,u:ce,parent:_e,vnode:Ie}=g;{const Lt=Rs(g);if(Lt){ne&&(ne.el=Ie.el,_(g,ne,E)),Lt.asyncDep.then(()=>{g.isUnmounted||k()});return}}let Me=ne,ot;an(g,!1),ne?(ne.el=Ie.el,_(g,ne,E)):ne=Ie,G&&fo(G),(ot=ne.props&&ne.props.onVnodeBeforeUpdate)&&It(ot,_e,ne,Ie),an(g,!0);const it=Ks(g),At=g.subTree;g.subTree=it,y(At,it,d(At.el),Ae(At),g,N,R),ne.el=it.el,Me===null&&Iu(g,it.el),ce&&st(ce,N),(ot=ne.props&&ne.props.onVnodeUpdated)&&st(()=>It(ot,_e,ne,Ie),N)}else{let ne;const{el:G,props:ce}=v,{bm:_e,m:Ie,parent:Me,root:ot,type:it}=g,At=_n(v);an(g,!1),_e&&fo(_e),!At&&(ne=ce&&ce.onVnodeBeforeMount)&&It(ne,Me,v),an(g,!0);{ot.ce&&ot.ce._def.shadowRoot!==!1&&ot.ce._injectChildStyle(it);const Lt=g.subTree=Ks(g);y(null,Lt,P,q,g,N,R),v.el=Lt.el}if(Ie&&st(Ie,N),!At&&(ne=ce&&ce.onVnodeMounted)){const Lt=v;st(()=>It(ne,Me,Lt),N)}(v.shapeFlag&256||Me&&_n(Me.vnode)&&Me.vnode.shapeFlag&256)&&g.a&&st(g.a,N),g.isMounted=!0,v=P=q=null}};g.scope.on();const V=g.effect=new Ar(k);g.scope.off();const z=g.update=V.run.bind(V),se=g.job=V.runIfDirty.bind(V);se.i=g,se.id=g.uid,V.scheduler=()=>Ti(se),an(g,!0),z()},_=(g,v,P)=>{v.component=g;const q=g.vnode.props;g.vnode=v,g.next=null,fu(g,v.props,q,P),mu(g,v.children,P),Ct(),rs(g),Tt()},x=(g,v,P,q,N,R,E,k,V=!1)=>{const z=g&&g.children,se=g?g.shapeFlag:0,ne=v.children,{patchFlag:G,shapeFlag:ce}=v;if(G>0){if(G&128){K(z,ne,P,q,N,R,E,k,V);return}else if(G&256){j(z,ne,P,q,N,R,E,k,V);return}}ce&8?(se&16&&we(z,N,R),ne!==z&&c(P,ne)):se&16?ce&16?K(z,ne,P,q,N,R,E,k,V):we(z,N,R,!0):(se&8&&c(P,""),ce&16&&W(ne,P,q,N,R,E,k,V))},j=(g,v,P,q,N,R,E,k,V)=>{g=g||bt,v=v||bt;const z=g.length,se=v.length,ne=Math.min(z,se);let G;for(G=0;G<ne;G++){const ce=v[G]=V?Jt(v[G]):Et(v[G]);y(g[G],ce,P,null,N,R,E,k,V)}z>se?we(g,N,R,!0,!1,ne):W(v,P,q,N,R,E,k,V,ne)},K=(g,v,P,q,N,R,E,k,V)=>{let z=0;const se=v.length;let ne=g.length-1,G=se-1;for(;z<=ne&&z<=G;){const ce=g[z],_e=v[z]=V?Jt(v[z]):Et(v[z]);if(cn(ce,_e))y(ce,_e,P,null,N,R,E,k,V);else break;z++}for(;z<=ne&&z<=G;){const ce=g[ne],_e=v[G]=V?Jt(v[G]):Et(v[G]);if(cn(ce,_e))y(ce,_e,P,null,N,R,E,k,V);else break;ne--,G--}if(z>ne){if(z<=G){const ce=G+1,_e=ce<se?v[ce].el:q;for(;z<=G;)y(null,v[z]=V?Jt(v[z]):Et(v[z]),P,_e,N,R,E,k,V),z++}}else if(z>G)for(;z<=ne;)ge(g[z],N,R,!0),z++;else{const ce=z,_e=z,Ie=new Map;for(z=_e;z<=G;z++){const ut=v[z]=V?Jt(v[z]):Et(v[z]);ut.key!=null&&Ie.set(ut.key,z)}let Me,ot=0;const it=G-_e+1;let At=!1,Lt=0;const ro=new Array(it);for(z=0;z<it;z++)ro[z]=0;for(z=ce;z<=ne;z++){const ut=g[z];if(ot>=it){ge(ut,N,R,!0);continue}let jt;if(ut.key!=null)jt=Ie.get(ut.key);else for(Me=_e;Me<=G;Me++)if(ro[Me-_e]===0&&cn(ut,v[Me])){jt=Me;break}jt===void 0?ge(ut,N,R,!0):(ro[jt-_e]=z+1,jt>=Lt?Lt=jt:At=!0,y(ut,v[jt],P,null,N,R,E,k,V),ot++)}const Ha=At?wu(ro):bt;for(Me=Ha.length-1,z=it-1;z>=0;z--){const ut=_e+z,jt=v[ut],Fa=v[ut+1],Wa=ut+1<se?Fa.el||Fa.placeholder:q;ro[z]===0?y(null,jt,P,Wa,N,R,E,k,V):At&&(Me<0||z!==Ha[Me]?D(jt,P,Wa,2):Me--)}}},D=(g,v,P,q,N=null)=>{const{el:R,type:E,transition:k,children:V,shapeFlag:z}=g;if(z&6){D(g.component.subTree,v,P,q);return}if(z&128){g.suspense.move(v,P,q);return}if(z&64){E.move(g,v,P,De);return}if(E===ye){o(R,v,P);for(let ne=0;ne<V.length;ne++)D(V[ne],v,P,q);o(g.anchor,v,P);return}if(E===Bo){$(g,v,P);return}if(q!==2&&z&1&&k)if(q===0)k.beforeEnter(R),o(R,v,P),st(()=>k.enter(R),N);else{const{leave:ne,delayLeave:G,afterLeave:ce}=k,_e=()=>{g.ctx.isUnmounted?i(R):o(R,v,P)},Ie=()=>{R._isLeaving&&R[Rt](!0),ne(R,()=>{_e(),ce&&ce()})};G?G(R,_e,Ie):Ie()}else o(R,v,P)},ge=(g,v,P,q=!1,N=!1)=>{const{type:R,props:E,ref:k,children:V,dynamicChildren:z,shapeFlag:se,patchFlag:ne,dirs:G,cacheIndex:ce}=g;if(ne===-2&&(N=!1),k!=null&&(Ct(),Vn(k,null,P,g,!0),Tt()),ce!=null&&(v.renderCache[ce]=void 0),se&256){v.ctx.deactivate(g);return}const _e=se&1&&G,Ie=!_n(g);let Me;if(Ie&&(Me=E&&E.onVnodeBeforeUnmount)&&It(Me,v,g),se&6)ve(g.component,P,q);else{if(se&128){g.suspense.unmount(P,q);return}_e&&sn(g,null,v,"beforeUnmount"),se&64?g.type.remove(g,v,P,De,q):z&&!z.hasOnce&&(R!==ye||ne>0&&ne&64)?we(z,v,P,!1,!0):(R===ye&&ne&384||!N&&se&16)&&we(V,v,P),q&&ae(g)}(Ie&&(Me=E&&E.onVnodeUnmounted)||_e)&&st(()=>{Me&&It(Me,v,g),_e&&sn(g,null,v,"unmounted")},P)},ae=g=>{const{type:v,el:P,anchor:q,transition:N}=g;if(v===ye){pe(P,q);return}if(v===Bo){m(g);return}const R=()=>{i(P),N&&!N.persisted&&N.afterLeave&&N.afterLeave()};if(g.shapeFlag&1&&N&&!N.persisted){const{leave:E,delayLeave:k}=N,V=()=>E(P,R);k?k(g.el,R,V):V()}else R()},pe=(g,v)=>{let P;for(;g!==v;)P=f(g),i(g),g=P;i(v)},ve=(g,v,P)=>{const{bum:q,scope:N,job:R,subTree:E,um:k,m:V,a:z}=g;Hs(V),Hs(z),q&&fo(q),N.stop(),R&&(R.flags|=8,ge(E,g,v,P)),k&&st(k,v),st(()=>{g.isUnmounted=!0},v)},we=(g,v,P,q=!1,N=!1,R=0)=>{for(let E=R;E<g.length;E++)ge(g[E],v,P,q,N)},Ae=g=>{if(g.shapeFlag&6)return Ae(g.component.subTree);if(g.shapeFlag&128)return g.suspense.next();const v=f(g.anchor||g.el),P=v&&v[Hc];return P?f(P):v};let ct=!1;const Qe=(g,v,P)=>{g==null?v._vnode&&ge(v._vnode,null,null,!0):y(v._vnode||null,g,v,null,null,null,P),v._vnode=g,ct||(ct=!0,rs(),ss(),ct=!1)},De={p:y,um:ge,m:D,r:ae,mt:S,mc:W,pc:x,pbc:ee,n:Ae,o:e};return{render:Qe,hydrate:void 0,createApp:uu(Qe)}}function Bi({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 an({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function yu(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Vs(e,t,n=!1){const o=e.children,i=t.children;if(re(o)&&re(i))for(let r=0;r<o.length;r++){const s=o[r];let l=i[r];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=i[r]=Jt(i[r]),l.el=s.el),!n&&l.patchFlag!==-2&&Vs(s,l)),l.type===jo&&l.patchFlag!==-1&&(l.el=s.el),l.type===qe&&!l.el&&(l.el=s.el)}}function wu(e){const t=e.slice(),n=[0];let o,i,r,s,l;const a=e.length;for(o=0;o<a;o++){const u=e[o];if(u!==0){if(i=n[n.length-1],e[i]<u){t[o]=i,n.push(o);continue}for(r=0,s=n.length-1;r<s;)l=r+s>>1,e[n[l]]<u?r=l+1:s=l;u<e[n[r]]&&(r>0&&(t[o]=n[r-1]),n[r]=o)}}for(r=n.length,s=n[r-1];r-- >0;)n[r]=s,s=t[s];return n}function Rs(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Rs(t)}function Hs(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const xu=Symbol.for("v-scx"),_u=()=>Ft(xu);function Fs(e,t){return Ao(e,null,t)}function Su(e,t){return Ao(e,null,{flush:"sync"})}function de(e,t,n){return Ao(e,t,n)}function Ao(e,t,n=me){const{immediate:o,deep:i,flush:r,once:s}=n,l=Oe({},n),a=t&&o||!t&&r!=="post";let u;if(Zn){if(r==="sync"){const p=_u();u=p.__watcherHandles||(p.__watcherHandles=[])}else if(!a){const p=()=>{};return p.stop=kt,p.resume=kt,p.pause=kt,p}}const c=Ke;l.call=(p,w,y)=>xt(p,c,w,y);let d=!1;r==="post"?l.scheduler=p=>{st(p,c&&c.suspense)}:r!=="sync"&&(d=!0,l.scheduler=(p,w)=>{w?p():Ti(p)}),l.augmentJob=p=>{t&&(p.flags|=4),d&&(p.flags|=2,c&&(p.id=c.uid,p.i=c))};const f=Dc(e,t,l);return Zn&&(u?u.push(f):a&&f()),f}function ku(e,t,n){const o=this.proxy,i=$e(e)?e.includes(".")?Ws(o,e):()=>o[e]:e.bind(o,o);let r;fe(t)?r=t:(r=t.handler,n=t);const s=Kn(this),l=Ao(i,r.bind(o),n);return s(),l}function Ws(e,t){const n=t.split(".");return()=>{let o=e;for(let i=0;i<n.length&&o;i++)o=o[n[i]];return o}}function lt(e,t,n=me){const o=un(),i=He(t),r=et(t),s=Us(e,i),l=ts((a,u)=>{let c,d=me,f;return Su(()=>{const p=e[i];tt(c,p)&&(c=p,u())}),{get(){return a(),n.get?n.get(c):c},set(p){const w=n.set?n.set(p):p;if(!tt(w,c)&&!(d!==me&&tt(p,d)))return;const y=o.vnode.props;y&&(t in y||i in y||r in y)&&(`onUpdate:${t}`in y||`onUpdate:${i}`in y||`onUpdate:${r}`in y)||(c=p,u()),o.emit(`update:${t}`,w),tt(p,w)&&tt(p,d)&&!tt(w,f)&&u(),d=p,f=w}}});return l[Symbol.iterator]=()=>{let a=0;return{next(){return a<2?{value:a++?s||me:l,done:!1}:{done:!0}}}},l}const Us=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${He(t)}Modifiers`]||e[`${et(t)}Modifiers`];function Cu(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||me;let i=n;const r=t.startsWith("update:"),s=r&&Us(o,t.slice(7));s&&(s.trim&&(i=n.map(c=>$e(c)?c.trim():c)),s.number&&(i=n.map(di)));let l,a=o[l=ui(t)]||o[l=ui(He(t))];!a&&r&&(a=o[l=ui(et(t))]),a&&xt(a,e,6,i);const u=o[l+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,xt(u,e,6,i)}}const Tu=new WeakMap;function qs(e,t,n=!1){const o=n?Tu:t.emitsCache,i=o.get(e);if(i!==void 0)return i;const r=e.emits;let s={},l=!1;if(!fe(e)){const a=u=>{const c=qs(u,t,!0);c&&(l=!0,Oe(s,c))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!r&&!l?(Te(e)&&o.set(e,null),null):(re(r)?r.forEach(a=>s[a]=null):Oe(s,r),Te(e)&&o.set(e,s),s)}function Lo(e,t){return!e||!so(t)?!1:(t=t.slice(2).replace(/Once$/,""),ke(e,t[0].toLowerCase()+t.slice(1))||ke(e,et(t))||ke(e,t))}function Ym(){}function Ks(e){const{type:t,vnode:n,proxy:o,withProxy:i,propsOptions:[r],slots:s,attrs:l,emit:a,render:u,renderCache:c,props:d,data:f,setupState:p,ctx:w,inheritAttrs:y}=e,O=Po(e);let M,L;try{if(n.shapeFlag&4){const m=i||o,h=m;M=Et(u.call(h,m,c,d,p,f,w)),L=l}else{const m=t;M=Et(m.length>1?m(d,{attrs:l,slots:s,emit:a}):m(d,null)),L=t.props?l:Mu(l)}}catch(m){Wn.length=0,To(m,e,1),M=A(qe)}let $=M;if(L&&y!==!1){const m=Object.keys(L),{shapeFlag:h}=$;m.length&&h&7&&(r&&m.some(li)&&(L=Pu(L,r)),$=Gt($,L,!1,!0))}return n.dirs&&($=Gt($,null,!1,!0),$.dirs=$.dirs?$.dirs.concat(n.dirs):n.dirs),n.transition&&Nn($,n.transition),M=$,Po(O),M}const Mu=e=>{let t;for(const n in e)(n==="class"||n==="style"||so(n))&&((t||(t={}))[n]=e[n]);return t},Pu=(e,t)=>{const n={};for(const o in e)(!li(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n};function Eu(e,t,n){const{props:o,children:i,component:r}=e,{props:s,children:l,patchFlag:a}=t,u=r.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return o?Zs(o,s,u):!!s;if(a&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const f=c[d];if(s[f]!==o[f]&&!Lo(u,f))return!0}}}else return(i||l)&&(!l||!l.$stable)?!0:o===s?!1:o?s?Zs(o,s,u):!0:!!s;return!1}function Zs(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let i=0;i<o.length;i++){const r=o[i];if(t[r]!==e[r]&&!Lo(n,r))return!0}return!1}function Iu({vnode:e,parent:t},n){for(;t;){const o=t.subTree;if(o.suspense&&o.suspense.activeBranch===e&&(o.el=e.el),o===e)(e=t.vnode).el=n,t=t.parent;else break}}const Ys=e=>e.__isSuspense;function Ou(e,t){t&&t.pendingBranch?re(e)?t.effects.push(...e):t.effects.push(e):Rc(e)}const ye=Symbol.for("v-fgt"),jo=Symbol.for("v-txt"),qe=Symbol.for("v-cmt"),Bo=Symbol.for("v-stc"),Wn=[];let at=null;function b(e=!1){Wn.push(at=e?null:[])}function $u(){Wn.pop(),at=Wn[Wn.length-1]||null}let Un=1;function No(e,t=!1){Un+=e,e<0&&at&&t&&(at.hasOnce=!0)}function Xs(e){return e.dynamicChildren=Un>0?at||bt:null,$u(),Un>0&&at&&at.push(e),e}function I(e,t,n,o,i,r){return Xs(Z(e,t,n,o,i,r,!0))}function ie(e,t,n,o,i){return Xs(A(e,t,n,o,i,!0))}function qn(e){return e?e.__v_isVNode===!0:!1}function cn(e,t){return e.type===t.type&&e.key===t.key}const Gs=({key:e})=>e??null,Vo=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?$e(e)||ze(e)||fe(e)?{i:Ve,r:e,k:t,f:!!n}:e:null);function Z(e,t=null,n=null,o=0,i=null,r=e===ye?0:1,s=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Gs(t),ref:t&&Vo(t),scopeId:as,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:o,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:Ve};return l?(Ni(a,n),r&128&&e.normalize(a)):n&&(a.shapeFlag|=$e(n)?8:16),Un>0&&!s&&at&&(a.patchFlag>0||r&6)&&a.patchFlag!==32&&at.push(a),a}const A=zu;function zu(e,t=null,n=null,o=0,i=null,r=!1){if((!e||e===ws)&&(e=qe),qn(e)){const l=Gt(e,t,!0);return n&&Ni(l,n),Un>0&&!r&&at&&(l.shapeFlag&6?at[at.indexOf(e)]=l:at.push(l)),l.patchFlag=-2,l}if(Uu(e)&&(e=e.__vccOpts),t){t=Du(t);let{class:l,style:a}=t;l&&!$e(l)&&(t.class=ue(l)),Te(a)&&(ki(a)&&!re(a)&&(a=Oe({},a)),t.style=Ce(a))}const s=$e(e)?1:Ys(e)?128:cs(e)?64:Te(e)?4:fe(e)?2:0;return Z(e,t,n,o,i,s,r,!0)}function Du(e){return e?ki(e)||zs(e)?Oe({},e):e:null}function Gt(e,t,n=!1,o=!1){const{props:i,ref:r,patchFlag:s,children:l,transition:a}=e,u=t?Sn(i||{},t):i,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&Gs(u),ref:t&&t.ref?n&&r?re(r)?r.concat(Vo(t)):[r,Vo(t)]:Vo(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ye?s===-1?16:s|16:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Gt(e.ssContent),ssFallback:e.ssFallback&&Gt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&o&&Nn(c,a.clone(c)),c}function Wt(e=" ",t=0){return A(jo,null,e,t)}function Au(e,t){const n=A(Bo,null,e);return n.staticCount=t,n}function le(e="",t=!1){return t?(b(),ie(qe,null,e)):A(qe,null,e)}function Et(e){return e==null||typeof e=="boolean"?A(qe):re(e)?A(ye,null,e.slice()):qn(e)?Jt(e):A(jo,null,String(e))}function Jt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Gt(e)}function Ni(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(re(t))n=16;else if(typeof t=="object")if(o&65){const i=t.default;i&&(i._c&&(i._d=!1),Ni(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!zs(t)?t._ctx=Ve:i===3&&Ve&&(Ve.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else fe(t)?(t={default:t,_ctx:Ve},n=32):(t=String(t),o&64?(n=16,t=[Wt(t)]):n=8);e.children=t,e.shapeFlag|=n}function Sn(...e){const t={};for(let n=0;n<e.length;n++){const o=e[n];for(const i in o)if(i==="class")t.class!==o.class&&(t.class=ue([t.class,o.class]));else if(i==="style")t.style=Ce([t.style,o.style]);else if(so(i)){const r=t[i],s=o[i];s&&r!==s&&!(re(r)&&r.includes(s))&&(t[i]=r?[].concat(r,s):s)}else i!==""&&(t[i]=o[i])}return t}function It(e,t,n,o=null){xt(e,t,7,[n,o])}const Lu=Es();let ju=0;function Bu(e,t,n){const o=e.type,i=(t?t.appContext:e.appContext)||Lu,r={uid:ju++,vnode:e,type:o,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new tc(!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:As(o,i),emitsOptions:qs(o,i),emit:null,emitted:null,propsDefaults:me,inheritAttrs:o.inheritAttrs,ctx:me,data:me,props:me,attrs:me,slots:me,refs:me,setupState:me,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return r.ctx={_:r},r.root=t?t.root:r,r.emit=Cu.bind(null,r),e.ce&&e.ce(r),r}let Ke=null;const un=()=>Ke||Ve;let Ro,Vi;{const e=po(),t=(n,o)=>{let i;return(i=e[n])||(i=e[n]=[]),i.push(o),r=>{i.length>1?i.forEach(s=>s(r)):i[0](r)}};Ro=t("__VUE_INSTANCE_SETTERS__",n=>Ke=n),Vi=t("__VUE_SSR_SETTERS__",n=>Zn=n)}const Kn=e=>{const t=Ke;return Ro(e),e.scope.on(),()=>{e.scope.off(),Ro(t)}},Js=()=>{Ke&&Ke.scope.off(),Ro(null)};function Qs(e){return e.vnode.shapeFlag&4}let Zn=!1;function Nu(e,t=!1,n=!1){t&&Vi(t);const{props:o,children:i}=e.vnode,r=Qs(e);du(e,o,r,t),gu(e,i,n||t);const s=r?Vu(e,t):void 0;return t&&Vi(!1),s}function Vu(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,ou);const{setup:o}=n;if(o){Ct();const i=e.setupContext=o.length>1?Hu(e):null,r=Kn(e),s=yn(o,e,0,[e.props,i]),l=Mr(s);if(Tt(),r(),(l||e.sp)&&!_n(e)&&ms(e),l){if(s.then(Js,Js),t)return s.then(a=>{el(e,a)}).catch(a=>{To(a,e,0)});e.asyncDep=s}else el(e,s)}else tl(e)}function el(e,t,n){fe(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Te(t)&&(e.setupState=es(t)),tl(e)}function tl(e,t,n){const o=e.type;e.render||(e.render=o.render||kt);{const i=Kn(e);Ct();try{iu(e)}finally{Tt(),i()}}}const Ru={get(e,t){return Ue(e,"get",""),e[t]}};function Hu(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Ru),slots:e.slots,emit:e.emit,expose:t}}function Ho(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(es(Sc(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Rn)return Rn[n](e)},has(t,n){return n in t||n in Rn}})):e.proxy}const Fu=/(?:^|[-_])\w/g,Wu=e=>e.replace(Fu,t=>t.toUpperCase()).replace(/[-_]/g,"");function nl(e,t=!0){return fe(e)?e.displayName||e.name:e.name||t&&e.__name}function ol(e,t,n=!1){let o=nl(t);if(!o&&t.__file){const i=t.__file.match(/([^/\\]+)\.\w+$/);i&&(o=i[1])}if(!o&&e&&e.parent){const i=r=>{for(const s in r)if(r[s]===t)return s};o=i(e.components||e.parent.type.components)||i(e.appContext.components)}return o?Wu(o):n?"App":"Anonymous"}function Uu(e){return fe(e)&&"__vccOpts"in e}const J=(e,t)=>$c(e,t,Zn);function il(e,t,n){try{No(-1);const o=arguments.length;return o===2?Te(t)&&!re(t)?qn(t)?A(e,null,[t]):A(e,t):A(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&qn(n)&&(n=[n]),A(e,t,n))}finally{No(1)}}const qu="3.5.24";/**
15
+ `,...Lc(i)),console.warn(...r)}Tt(),ki=!1}function Ac(){let e=jn[jn.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const o=e.component&&e.component.parent;e=o&&o.vnode}return t}function Lc(e){const t=[];return e.forEach((n,o)=>{t.push(...o===0?[]:[`
16
+ `],...jc(n))}),t}function jc({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",o=e.component?e.component.parent==null:!1,i=` at <${ol(e.component,e.type,o)}`,r=">"+n;return e.props?[i,...Bc(e.props),r]:[i+r]}function Bc(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(o=>{t.push(...ns(o,e[o]))}),n.length>3&&t.push(" ..."),t}function ns(e,t,n){return $e(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:ze(t)?(t=ns(e,xe(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):fe(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=xe(t),n?t:[`${e}=`,t])}function yn(e,t,n,o){try{return o?e(...o):e()}catch(i){To(i,t,n)}}function wt(e,t,n,o){if(fe(e)){const i=yn(e,t,n,o);return i&&Mr(i)&&i.catch(r=>{To(r,t,n)}),i}if(re(e)){const i=[];for(let r=0;r<e.length;r++)i.push(wt(e[r],t,n,o));return i}}function To(e,t,n,o=!0){const i=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:s}=t&&t.appContext.config||me;if(t){let l=t.parent;const a=t.proxy,u=`https://vuejs.org/error-reference/#runtime-${n}`;for(;l;){const c=l.ec;if(c){for(let d=0;d<c.length;d++)if(c[d](e,a,u)===!1)return}l=l.parent}if(r){Ct(),yn(r,null,10,[e,a,u]),Tt();return}}Nc(e,n,i,o,s)}function Nc(e,t,n,o=!0,i=!1){if(i)throw e;console.error(e)}const Ze=[];let Mt=-1;const wn=[];let Yt=null,xn=0;const os=Promise.resolve();let Mo=null;function pt(e){const t=Mo||os;return e?t.then(this?e.bind(this):e):t}function Vc(e){let t=Mt+1,n=Ze.length;for(;t<n;){const o=t+n>>>1,i=Ze[o],r=Bn(i);r<e||r===e&&i.flags&2?t=o+1:n=o}return t}function Ci(e){if(!(e.flags&1)){const t=Bn(e),n=Ze[Ze.length-1];!n||!(e.flags&2)&&t>=Bn(n)?Ze.push(e):Ze.splice(Vc(t),0,e),e.flags|=1,is()}}function is(){Mo||(Mo=os.then(ls))}function Rc(e){re(e)?wn.push(...e):Yt&&e.id===-1?Yt.splice(xn+1,0,e):e.flags&1||(wn.push(e),e.flags|=1),is()}function rs(e,t,n=Mt+1){for(;n<Ze.length;n++){const o=Ze[n];if(o&&o.flags&2){if(e&&o.id!==e.uid)continue;Ze.splice(n,1),n--,o.flags&4&&(o.flags&=-2),o(),o.flags&4||(o.flags&=-2)}}}function ss(e){if(wn.length){const t=[...new Set(wn)].sort((n,o)=>Bn(n)-Bn(o));if(wn.length=0,Yt){Yt.push(...t);return}for(Yt=t,xn=0;xn<Yt.length;xn++){const n=Yt[xn];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Yt=null,xn=0}}const Bn=e=>e.id==null?e.flags&2?-1:1/0:e.id;function ls(e){try{for(Mt=0;Mt<Ze.length;Mt++){const t=Ze[Mt];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),yn(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Mt<Ze.length;Mt++){const t=Ze[Mt];t&&(t.flags&=-2)}Mt=-1,Ze.length=0,ss(),Mo=null,(Ze.length||wn.length)&&ls()}}let Ve=null,as=null;function Po(e){const t=Ve;return Ve=e,as=e&&e.type.__scopeId||null,t}function oe(e,t=Ve,n){if(!t||e._n)return e;const o=(...i)=>{o._d&&No(-1);const r=Po(t);let s;try{s=e(...i)}finally{Po(r),o._d&&No(1)}return s};return o._n=!0,o._c=!0,o._d=!0,o}function Re(e,t){if(Ve===null)return e;const n=Ho(Ve),o=e.dirs||(e.dirs=[]);for(let i=0;i<t.length;i++){let[r,s,l,a=me]=t[i];r&&(fe(r)&&(r={mounted:r,updated:r}),r.deep&&Vt(s),o.push({dir:r,instance:n,value:s,oldValue:void 0,arg:l,modifiers:a}))}return e}function ln(e,t,n,o){const i=e.dirs,r=t&&t.dirs;for(let s=0;s<i.length;s++){const l=i[s];r&&(l.oldValue=r[s].value);let a=l.dir[o];a&&(Ct(),wt(a,n,8,[e.el,l,e,t]),Tt())}}const Hc=Symbol("_vte"),cs=e=>e.__isTeleport,Rt=Symbol("_leaveCb"),Eo=Symbol("_enterCb");function Fc(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return je(()=>{e.isMounted=!0}),Pi(()=>{e.isUnmounting=!0}),e}const ht=[Function,Array],us={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:ht,onEnter:ht,onAfterEnter:ht,onEnterCancelled:ht,onBeforeLeave:ht,onLeave:ht,onAfterLeave:ht,onLeaveCancelled:ht,onBeforeAppear:ht,onAppear:ht,onAfterAppear:ht,onAppearCancelled:ht},ds=e=>{const t=e.subTree;return t.component?ds(t.component):t},Wc={name:"BaseTransition",props:us,setup(e,{slots:t}){const n=dn(),o=Fc();return()=>{const i=t.default&&gs(t.default(),!0);if(!i||!i.length)return;const r=fs(i),s=xe(e),{mode:l}=s;if(o.isLeaving)return Mi(r);const a=hs(r);if(!a)return Mi(r);let u=Ti(a,s,o,n,d=>u=d);a.type!==qe&&Nn(a,u);let c=n.subTree&&hs(n.subTree);if(c&&c.type!==qe&&!un(c,a)&&ds(n).type!==qe){let d=Ti(c,s,o,n);if(Nn(c,d),l==="out-in"&&a.type!==qe)return o.isLeaving=!0,d.afterLeave=()=>{o.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,c=void 0},Mi(r);l==="in-out"&&a.type!==qe?d.delayLeave=(f,p,y)=>{const b=ps(o,c);b[String(c.key)]=c,f[Rt]=()=>{p(),f[Rt]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{y(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return r}}};function fs(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==qe){t=n;break}}return t}const Uc=Wc;function ps(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function Ti(e,t,n,o,i){const{appear:r,mode:s,persisted:l=!1,onBeforeEnter:a,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:f,onLeave:p,onAfterLeave:y,onLeaveCancelled:b,onBeforeAppear:$,onAppear:M,onAfterAppear:L,onAppearCancelled:D}=t,w=String(e.key),g=ps(n,e),E=(_,z)=>{_&&wt(_,o,9,z)},U=(_,z)=>{const A=z[1];E(_,z),re(_)?_.every(T=>T.length<=1)&&A():_.length<=1&&A()},K={mode:s,persisted:l,beforeEnter(_){let z=a;if(!n.isMounted)if(r)z=$||a;else return;_[Rt]&&_[Rt](!0);const A=g[w];A&&un(e,A)&&A.el[Rt]&&A.el[Rt](),E(z,[_])},enter(_){let z=u,A=c,T=d;if(!n.isMounted)if(r)z=M||u,A=L||c,T=D||d;else return;let G=!1;const C=_[Eo]=ee=>{G||(G=!0,ee?E(T,[_]):E(A,[_]),K.delayedLeave&&K.delayedLeave(),_[Eo]=void 0)};z?U(z,[_,C]):C()},leave(_,z){const A=String(e.key);if(_[Eo]&&_[Eo](!0),n.isUnmounting)return z();E(f,[_]);let T=!1;const G=_[Rt]=C=>{T||(T=!0,z(),C?E(b,[_]):E(y,[_]),_[Rt]=void 0,g[A]===e&&delete g[A])};g[A]=e,p?U(p,[_,G]):G()},clone(_){const z=Ti(_,t,n,o,i);return i&&i(z),z}};return K}function Mi(e){if(Oo(e))return e=Gt(e),e.children=null,e}function hs(e){if(!Oo(e))return cs(e.type)&&e.children?fs(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&fe(n.default))return n.default()}}function Nn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Nn(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function gs(e,t=!1,n){let o=[],i=0;for(let r=0;r<e.length;r++){let s=e[r];const l=n==null?s.key:String(n)+String(s.key!=null?s.key:r);s.type===ye?(s.patchFlag&128&&i++,o=o.concat(gs(s.children,t,l))):(t||s.type!==qe)&&o.push(l!=null?Gt(s,{key:l}):s)}if(i>1)for(let r=0;r<o.length;r++)o[r].patchFlag=-2;return o}function he(e,t){return fe(e)?Oe({name:e.name},t,{setup:e}):e}function ms(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const Io=new WeakMap;function Vn(e,t,n,o,i=!1){if(re(e)){e.forEach((y,b)=>Vn(y,t&&(re(t)?t[b]:t),n,o,i));return}if(_n(o)&&!i){o.shapeFlag&512&&o.type.__asyncResolved&&o.component.subTree.component&&Vn(e,t,n,o.component.subTree);return}const r=o.shapeFlag&4?Ho(o.component):o.el,s=i?null:r,{i:l,r:a}=e,u=t&&t.r,c=l.refs===me?l.refs={}:l.refs,d=l.setupState,f=xe(d),p=d===me?Cr:y=>ke(f,y);if(u!=null&&u!==a){if(vs(t),$e(u))c[u]=null,p(u)&&(d[u]=null);else if(ze(u)){u.value=null;const y=t;y.k&&(c[y.k]=null)}}if(fe(a))yn(a,l,12,[s,c]);else{const y=$e(a),b=ze(a);if(y||b){const $=()=>{if(e.f){const M=y?p(a)?d[a]:c[a]:a.value;if(i)re(M)&&li(M,r);else if(re(M))M.includes(r)||M.push(r);else if(y)c[a]=[r],p(a)&&(d[a]=c[a]);else{const L=[r];a.value=L,e.k&&(c[e.k]=L)}}else y?(c[a]=s,p(a)&&(d[a]=s)):b&&(a.value=s,e.k&&(c[e.k]=s))};if(s){const M=()=>{$(),Io.delete(e)};M.id=-1,Io.set(e,M),rt(M,n)}else vs(e),$()}}}function vs(e){const t=Io.get(e);t&&(t.flags|=8,Io.delete(e))}po().requestIdleCallback,po().cancelIdleCallback;const _n=e=>!!e.type.__asyncLoader,Oo=e=>e.type.__isKeepAlive;function qc(e,t){bs(e,"a",t)}function Kc(e,t){bs(e,"da",t)}function bs(e,t,n=Ke){const o=e.__wdc||(e.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if($o(t,o,n),n){let i=n.parent;for(;i&&i.parent;)Oo(i.parent.vnode)&&Zc(o,t,n,i),i=i.parent}}function Zc(e,t,n,o){const i=$o(t,e,o,!0);Pt(()=>{li(o[t],i)},n)}function $o(e,t,n=Ke,o=!1){if(n){const i=n[e]||(n[e]=[]),r=t.__weh||(t.__weh=(...s)=>{Ct();const l=Kn(n),a=wt(t,n,e,s);return l(),Tt(),a});return o?i.unshift(r):i.push(r),r}}const Ht=e=>(t,n=Ke)=>{(!Zn||e==="sp")&&$o(e,(...o)=>t(...o),n)},Yc=Ht("bm"),je=Ht("m"),Xc=Ht("bu"),Gc=Ht("u"),Pi=Ht("bum"),Pt=Ht("um"),Jc=Ht("sp"),Qc=Ht("rtg"),eu=Ht("rtc");function ys(e,t=Ke){$o("ec",e,t)}const tu="components",ws=Symbol.for("v-ndc");function xs(e){return $e(e)?nu(tu,e,!1)||e:e||ws}function nu(e,t,n=!0,o=!1){const i=Ve||Ke;if(i){const r=i.type;{const l=nl(r,!1);if(l&&(l===t||l===He(t)||l===uo(He(t))))return r}const s=_s(i[e]||r[e],t)||_s(i.appContext[e],t);return!s&&o?r:s}}function _s(e,t){return e&&(e[t]||e[He(t)]||e[uo(He(t))])}function Xt(e,t,n,o){let i;const r=n,s=re(e);if(s||$e(e)){const l=s&&bn(e);let a=!1,u=!1;l&&(a=!ut(e),u=Zt(e),e=vo(e)),i=new Array(e.length);for(let c=0,d=e.length;c<d;c++)i[c]=t(a?u?So(Ne(e[c])):Ne(e[c]):e[c],c,void 0,r)}else if(typeof e=="number"){i=new Array(e);for(let l=0;l<e;l++)i[l]=t(l+1,l,void 0,r)}else if(Te(e))if(e[Symbol.iterator])i=Array.from(e,(l,a)=>t(l,a,void 0,r));else{const l=Object.keys(e);i=new Array(l.length);for(let a=0,u=l.length;a<u;a++){const c=l[a];i[a]=t(e[c],c,a,r)}}else i=[];return i}function Ei(e,t){for(let n=0;n<t.length;n++){const o=t[n];if(re(o))for(let i=0;i<o.length;i++)e[o[i].name]=o[i].fn;else o&&(e[o.name]=o.key?(...i)=>{const r=o.fn(...i);return r&&(r.key=o.key),r}:o.fn)}return e}function Se(e,t,n={},o,i){if(Ve.ce||Ve.parent&&_n(Ve.parent)&&Ve.parent.ce){const u=Object.keys(n).length>0;return t!=="default"&&(n.name=t),v(),ie(ye,null,[N("slot",n,o&&o())],u?-2:64)}let r=e[t];r&&r._c&&(r._d=!1),v();const s=r&&Ss(r(n)),l=n.key||s&&s.key,a=ie(ye,{key:(l&&!bt(l)?l:`_${t}`)+(!s&&o?"_fb":"")},s||(o?o():[]),s&&e._===1?64:-2);return a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),r&&r._c&&(r._d=!0),a}function Ss(e){return e.some(t=>qn(t)?!(t.type===qe||t.type===ye&&!Ss(t.children)):!0)?e:null}const Ii=e=>e?Qs(e)?Ho(e):Ii(e.parent):null,Rn=Oe(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=>Ts(e),$forceUpdate:e=>e.f||(e.f=()=>{Ci(e.update)}),$nextTick:e=>e.n||(e.n=pt.bind(e.proxy)),$watch:e=>ku.bind(e)}),Oi=(e,t)=>e!==me&&!e.__isScriptSetup&&ke(e,t),ou={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:o,data:i,props:r,accessCache:s,type:l,appContext:a}=e;let u;if(t[0]!=="$"){const p=s[t];if(p!==void 0)switch(p){case 1:return o[t];case 2:return i[t];case 4:return n[t];case 3:return r[t]}else{if(Oi(o,t))return s[t]=1,o[t];if(i!==me&&ke(i,t))return s[t]=2,i[t];if((u=e.propsOptions[0])&&ke(u,t))return s[t]=3,r[t];if(n!==me&&ke(n,t))return s[t]=4,n[t];$i&&(s[t]=0)}}const c=Rn[t];let d,f;if(c)return t==="$attrs"&&Ue(e.attrs,"get",""),c(e);if((d=l.__cssModules)&&(d=d[t]))return d;if(n!==me&&ke(n,t))return s[t]=4,n[t];if(f=a.config.globalProperties,ke(f,t))return f[t]},set({_:e},t,n){const{data:o,setupState:i,ctx:r}=e;return Oi(i,t)?(i[t]=n,!0):o!==me&&ke(o,t)?(o[t]=n,!0):ke(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(r[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:i,propsOptions:r,type:s}},l){let a,u;return!!(n[l]||e!==me&&l[0]!=="$"&&ke(e,l)||Oi(t,l)||(a=r[0])&&ke(a,l)||ke(o,l)||ke(Rn,l)||ke(i.config.globalProperties,l)||(u=s.__cssModules)&&u[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:ke(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function zo(e){return re(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function Ye(e,t){return!e||!t?e||t:re(e)&&re(t)?e.concat(t):Oe({},zo(e),zo(t))}let $i=!0;function iu(e){const t=Ts(e),n=e.proxy,o=e.ctx;$i=!1,t.beforeCreate&&ks(t.beforeCreate,e,"bc");const{data:i,computed:r,methods:s,watch:l,provide:a,inject:u,created:c,beforeMount:d,mounted:f,beforeUpdate:p,updated:y,activated:b,deactivated:$,beforeDestroy:M,beforeUnmount:L,destroyed:D,unmounted:w,render:g,renderTracked:E,renderTriggered:U,errorCaptured:K,serverPrefetch:_,expose:z,inheritAttrs:A,components:T,directives:G,filters:C}=t;if(u&&ru(u,o,null),s)for(const S in s){const x=s[S];fe(x)&&(o[S]=x.bind(n))}if(i){const S=i.call(n,n);Te(S)&&(e.data=xo(S))}if($i=!0,r)for(const S in r){const x=r[S],V=fe(x)?x.bind(n,n):fe(x.get)?x.get.bind(n,n):kt,Z=!fe(x)&&fe(x.set)?x.set.bind(n):kt,j=Q({get:V,set:Z});Object.defineProperty(o,S,{enumerable:!0,configurable:!0,get:()=>j.value,set:ge=>j.value=ge})}if(l)for(const S in l)Cs(l[S],o,n,S);if(a){const S=fe(a)?a.call(n):a;Reflect.ownKeys(S).forEach(x=>{Fn(x,S[x])})}c&&ks(c,e,"c");function W(S,x){re(x)?x.forEach(V=>S(V.bind(n))):x&&S(x.bind(n))}if(W(Yc,d),W(je,f),W(Xc,p),W(Gc,y),W(qc,b),W(Kc,$),W(ys,K),W(eu,E),W(Qc,U),W(Pi,L),W(Pt,w),W(Jc,_),re(z))if(z.length){const S=e.exposed||(e.exposed={});z.forEach(x=>{Object.defineProperty(S,x,{get:()=>n[x],set:V=>n[x]=V,enumerable:!0})})}else e.exposed||(e.exposed={});g&&e.render===kt&&(e.render=g),A!=null&&(e.inheritAttrs=A),T&&(e.components=T),G&&(e.directives=G),_&&ms(e)}function ru(e,t,n=kt){re(e)&&(e=zi(e));for(const o in e){const i=e[o];let r;Te(i)?"default"in i?r=Ft(i.from||o,i.default,!0):r=Ft(i.from||o):r=Ft(i),ze(r)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>r.value,set:s=>r.value=s}):t[o]=r}}function ks(e,t,n){wt(re(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function Cs(e,t,n,o){let i=o.includes(".")?Ws(n,o):()=>n[o];if($e(e)){const r=t[e];fe(r)&&de(i,r)}else if(fe(e))de(i,e.bind(n));else if(Te(e))if(re(e))e.forEach(r=>Cs(r,t,n,o));else{const r=fe(e.handler)?e.handler.bind(n):t[e.handler];fe(r)&&de(i,r,e)}}function Ts(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:i,optionsCache:r,config:{optionMergeStrategies:s}}=e.appContext,l=r.get(t);let a;return l?a=l:!i.length&&!n&&!o?a=t:(a={},i.length&&i.forEach(u=>Do(a,u,s,!0)),Do(a,t,s)),Te(t)&&r.set(t,a),a}function Do(e,t,n,o=!1){const{mixins:i,extends:r}=t;r&&Do(e,r,n,!0),i&&i.forEach(s=>Do(e,s,n,!0));for(const s in t)if(!(o&&s==="expose")){const l=su[s]||n&&n[s];e[s]=l?l(e[s],t[s]):t[s]}return e}const su={data:Ms,props:Ps,emits:Ps,methods:Hn,computed:Hn,beforeCreate:Xe,created:Xe,beforeMount:Xe,mounted:Xe,beforeUpdate:Xe,updated:Xe,beforeDestroy:Xe,beforeUnmount:Xe,destroyed:Xe,unmounted:Xe,activated:Xe,deactivated:Xe,errorCaptured:Xe,serverPrefetch:Xe,components:Hn,directives:Hn,watch:au,provide:Ms,inject:lu};function Ms(e,t){return t?e?function(){return Oe(fe(e)?e.call(this,this):e,fe(t)?t.call(this,this):t)}:t:e}function lu(e,t){return Hn(zi(e),zi(t))}function zi(e){if(re(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Xe(e,t){return e?[...new Set([].concat(e,t))]:t}function Hn(e,t){return e?Oe(Object.create(null),e,t):t}function Ps(e,t){return e?re(e)&&re(t)?[...new Set([...e,...t])]:Oe(Object.create(null),zo(e),zo(t??{})):t}function au(e,t){if(!e)return t;if(!t)return e;const n=Oe(Object.create(null),e);for(const o in t)n[o]=Xe(e[o],t[o]);return n}function Es(){return{app:null,config:{isNativeTag:Cr,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let cu=0;function uu(e,t){return function(o,i=null){fe(o)||(o=Oe({},o)),i!=null&&!Te(i)&&(i=null);const r=Es(),s=new WeakSet,l=[];let a=!1;const u=r.app={_uid:cu++,_component:o,_props:i,_container:null,_context:r,_instance:null,version:qu,get config(){return r.config},set config(c){},use(c,...d){return s.has(c)||(c&&fe(c.install)?(s.add(c),c.install(u,...d)):fe(c)&&(s.add(c),c(u,...d))),u},mixin(c){return r.mixins.includes(c)||r.mixins.push(c),u},component(c,d){return d?(r.components[c]=d,u):r.components[c]},directive(c,d){return d?(r.directives[c]=d,u):r.directives[c]},mount(c,d,f){if(!a){const p=u._ceVNode||N(o,i);return p.appContext=r,f===!0?f="svg":f===!1&&(f=void 0),e(p,c,f),a=!0,u._container=c,c.__vue_app__=u,Ho(p.component)}},onUnmount(c){l.push(c)},unmount(){a&&(wt(l,u._instance,16),e(null,u._container),delete u._container.__vue_app__)},provide(c,d){return r.provides[c]=d,u},runWithContext(c){const d=an;an=u;try{return c()}finally{an=d}}};return u}}let an=null;function Fn(e,t){if(Ke){let n=Ke.provides;const o=Ke.parent&&Ke.parent.provides;o===n&&(n=Ke.provides=Object.create(o)),n[e]=t}}function Ft(e,t,n=!1){const o=dn();if(o||an){let i=an?an._context.provides:o?o.parent==null||o.ce?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return n&&fe(t)?t.call(o&&o.proxy):t}}function Is(){return!!(dn()||an)}const Os={},$s=()=>Object.create(Os),zs=e=>Object.getPrototypeOf(e)===Os;function du(e,t,n,o=!1){const i={},r=$s();e.propsDefaults=Object.create(null),Ds(e,t,i,r);for(const s in e.propsOptions[0])s in i||(i[s]=void 0);n?e.props=o?i:_c(i):e.type.props?e.props=i:e.props=r,e.attrs=r}function fu(e,t,n,o){const{props:i,attrs:r,vnode:{patchFlag:s}}=e,l=xe(i),[a]=e.propsOptions;let u=!1;if((o||s>0)&&!(s&16)){if(s&8){const c=e.vnode.dynamicProps;for(let d=0;d<c.length;d++){let f=c[d];if(Lo(e.emitsOptions,f))continue;const p=t[f];if(a)if(ke(r,f))p!==r[f]&&(r[f]=p,u=!0);else{const y=He(f);i[y]=Di(a,l,y,p,e,!1)}else p!==r[f]&&(r[f]=p,u=!0)}}}else{Ds(e,t,i,r)&&(u=!0);let c;for(const d in l)(!t||!ke(t,d)&&((c=Qe(d))===d||!ke(t,c)))&&(a?n&&(n[d]!==void 0||n[c]!==void 0)&&(i[d]=Di(a,l,d,void 0,e,!0)):delete i[d]);if(r!==l)for(const d in r)(!t||!ke(t,d))&&(delete r[d],u=!0)}u&&Bt(e.attrs,"set","")}function Ds(e,t,n,o){const[i,r]=e.propsOptions;let s=!1,l;if(t)for(let a in t){if(In(a))continue;const u=t[a];let c;i&&ke(i,c=He(a))?!r||!r.includes(c)?n[c]=u:(l||(l={}))[c]=u:Lo(e.emitsOptions,a)||(!(a in o)||u!==o[a])&&(o[a]=u,s=!0)}if(r){const a=xe(n),u=l||me;for(let c=0;c<r.length;c++){const d=r[c];n[d]=Di(i,a,d,u[d],e,!ke(u,d))}}return s}function Di(e,t,n,o,i,r){const s=e[n];if(s!=null){const l=ke(s,"default");if(l&&o===void 0){const a=s.default;if(s.type!==Function&&!s.skipFactory&&fe(a)){const{propsDefaults:u}=i;if(n in u)o=u[n];else{const c=Kn(i);o=u[n]=a.call(null,t),c()}}else o=a;i.ce&&i.ce._setProp(n,o)}s[0]&&(r&&!l?o=!1:s[1]&&(o===""||o===Qe(n))&&(o=!0))}return o}const pu=new WeakMap;function As(e,t,n=!1){const o=n?pu:t.propsCache,i=o.get(e);if(i)return i;const r=e.props,s={},l=[];let a=!1;if(!fe(e)){const c=d=>{a=!0;const[f,p]=As(d,t,!0);Oe(s,f),p&&l.push(...p)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!r&&!a)return Te(e)&&o.set(e,vt),vt;if(re(r))for(let c=0;c<r.length;c++){const d=He(r[c]);Ls(d)&&(s[d]=me)}else if(r)for(const c in r){const d=He(c);if(Ls(d)){const f=r[c],p=s[d]=re(f)||fe(f)?{type:f}:Oe({},f),y=p.type;let b=!1,$=!0;if(re(y))for(let M=0;M<y.length;++M){const L=y[M],D=fe(L)&&L.name;if(D==="Boolean"){b=!0;break}else D==="String"&&($=!1)}else b=fe(y)&&y.name==="Boolean";p[0]=b,p[1]=$,(b||ke(p,"default"))&&l.push(d)}}const u=[s,l];return Te(e)&&o.set(e,u),u}function Ls(e){return e[0]!=="$"&&!In(e)}const Ai=e=>e==="_"||e==="_ctx"||e==="$stable",Li=e=>re(e)?e.map(Et):[Et(e)],hu=(e,t,n)=>{if(t._n)return t;const o=oe((...i)=>Li(t(...i)),n);return o._c=!1,o},js=(e,t,n)=>{const o=e._ctx;for(const i in e){if(Ai(i))continue;const r=e[i];if(fe(r))t[i]=hu(i,r,o);else if(r!=null){const s=Li(r);t[i]=()=>s}}},Bs=(e,t)=>{const n=Li(t);e.slots.default=()=>n},Ns=(e,t,n)=>{for(const o in t)(n||!Ai(o))&&(e[o]=t[o])},gu=(e,t,n)=>{const o=e.slots=$s();if(e.vnode.shapeFlag&32){const i=t._;i?(Ns(o,t,n),n&&Er(o,"_",i,!0)):js(t,o)}else t&&Bs(e,t)},mu=(e,t,n)=>{const{vnode:o,slots:i}=e;let r=!0,s=me;if(o.shapeFlag&32){const l=t._;l?n&&l===1?r=!1:Ns(i,t,n):(r=!t.$stable,js(t,i)),s=t}else t&&(Bs(e,t),s={default:1});if(r)for(const l in i)!Ai(l)&&s[l]==null&&delete i[l]},rt=Ou;function vu(e){return bu(e)}function bu(e,t){const n=po();n.__VUE__=!0;const{insert:o,remove:i,patchProp:r,createElement:s,createText:l,createComment:a,setText:u,setElementText:c,parentNode:d,nextSibling:f,setScopeId:p=kt,insertStaticContent:y}=e,b=(h,m,P,q=null,R=null,F=null,I=void 0,k=null,H=!!m.dynamicChildren)=>{if(h===m)return;h&&!un(h,m)&&(q=Ae(h),ge(h,R,F,!0),h=null),m.patchFlag===-2&&(H=!1,m.dynamicChildren=null);const{type:B,ref:se,shapeFlag:ne}=m;switch(B){case jo:$(h,m,P,q);break;case qe:M(h,m,P,q);break;case Bo:h==null&&L(m,P,q,I);break;case ye:T(h,m,P,q,R,F,I,k,H);break;default:ne&1?g(h,m,P,q,R,F,I,k,H):ne&6?G(h,m,P,q,R,F,I,k,H):(ne&64||ne&128)&&B.process(h,m,P,q,R,F,I,k,H,De)}se!=null&&R?Vn(se,h&&h.ref,F,m||h,!m):se==null&&h&&h.ref!=null&&Vn(h.ref,null,F,h,!0)},$=(h,m,P,q)=>{if(h==null)o(m.el=l(m.children),P,q);else{const R=m.el=h.el;m.children!==h.children&&u(R,m.children)}},M=(h,m,P,q)=>{h==null?o(m.el=a(m.children||""),P,q):m.el=h.el},L=(h,m,P,q)=>{[h.el,h.anchor]=y(h.children,m,P,q,h.el,h.anchor)},D=({el:h,anchor:m},P,q)=>{let R;for(;h&&h!==m;)R=f(h),o(h,P,q),h=R;o(m,P,q)},w=({el:h,anchor:m})=>{let P;for(;h&&h!==m;)P=f(h),i(h),h=P;i(m)},g=(h,m,P,q,R,F,I,k,H)=>{if(m.type==="svg"?I="svg":m.type==="math"&&(I="mathml"),h==null)E(m,P,q,R,F,I,k,H);else{const B=h.el&&h.el._isVueCE?h.el:null;try{B&&B._beginPatch(),_(h,m,R,F,I,k,H)}finally{B&&B._endPatch()}}},E=(h,m,P,q,R,F,I,k)=>{let H,B;const{props:se,shapeFlag:ne,transition:J,dirs:ce}=h;if(H=h.el=s(h.type,F,se&&se.is,se),ne&8?c(H,h.children):ne&16&&K(h.children,H,null,q,R,ji(h,F),I,k),ce&&ln(h,null,q,"created"),U(H,h,h.scopeId,I,q),se){for(const Ie in se)Ie!=="value"&&!In(Ie)&&r(H,Ie,null,se[Ie],F,q);"value"in se&&r(H,"value",null,se.value,F),(B=se.onVnodeBeforeMount)&&It(B,q,h)}ce&&ln(h,null,q,"beforeMount");const _e=yu(R,J);_e&&J.beforeEnter(H),o(H,m,P),((B=se&&se.onVnodeMounted)||_e||ce)&&rt(()=>{B&&It(B,q,h),_e&&J.enter(H),ce&&ln(h,null,q,"mounted")},R)},U=(h,m,P,q,R)=>{if(P&&p(h,P),q)for(let F=0;F<q.length;F++)p(h,q[F]);if(R){let F=R.subTree;if(m===F||Ys(F.type)&&(F.ssContent===m||F.ssFallback===m)){const I=R.vnode;U(h,I,I.scopeId,I.slotScopeIds,R.parent)}}},K=(h,m,P,q,R,F,I,k,H=0)=>{for(let B=H;B<h.length;B++){const se=h[B]=k?Jt(h[B]):Et(h[B]);b(null,se,m,P,q,R,F,I,k)}},_=(h,m,P,q,R,F,I)=>{const k=m.el=h.el;let{patchFlag:H,dynamicChildren:B,dirs:se}=m;H|=h.patchFlag&16;const ne=h.props||me,J=m.props||me;let ce;if(P&&cn(P,!1),(ce=J.onVnodeBeforeUpdate)&&It(ce,P,m,h),se&&ln(m,h,P,"beforeUpdate"),P&&cn(P,!0),(ne.innerHTML&&J.innerHTML==null||ne.textContent&&J.textContent==null)&&c(k,""),B?z(h.dynamicChildren,B,k,P,q,ji(m,R),F):I||x(h,m,k,null,P,q,ji(m,R),F,!1),H>0){if(H&16)A(k,ne,J,P,R);else if(H&2&&ne.class!==J.class&&r(k,"class",null,J.class,R),H&4&&r(k,"style",ne.style,J.style,R),H&8){const _e=m.dynamicProps;for(let Ie=0;Ie<_e.length;Ie++){const Me=_e[Ie],nt=ne[Me],ot=J[Me];(ot!==nt||Me==="value")&&r(k,Me,nt,ot,R,P)}}H&1&&h.children!==m.children&&c(k,m.children)}else!I&&B==null&&A(k,ne,J,P,R);((ce=J.onVnodeUpdated)||se)&&rt(()=>{ce&&It(ce,P,m,h),se&&ln(m,h,P,"updated")},q)},z=(h,m,P,q,R,F,I)=>{for(let k=0;k<m.length;k++){const H=h[k],B=m[k],se=H.el&&(H.type===ye||!un(H,B)||H.shapeFlag&198)?d(H.el):P;b(H,B,se,null,q,R,F,I,!0)}},A=(h,m,P,q,R)=>{if(m!==P){if(m!==me)for(const F in m)!In(F)&&!(F in P)&&r(h,F,m[F],null,R,q);for(const F in P){if(In(F))continue;const I=P[F],k=m[F];I!==k&&F!=="value"&&r(h,F,k,I,R,q)}"value"in P&&r(h,"value",m.value,P.value,R)}},T=(h,m,P,q,R,F,I,k,H)=>{const B=m.el=h?h.el:l(""),se=m.anchor=h?h.anchor:l("");let{patchFlag:ne,dynamicChildren:J,slotScopeIds:ce}=m;ce&&(k=k?k.concat(ce):ce),h==null?(o(B,P,q),o(se,P,q),K(m.children||[],P,se,R,F,I,k,H)):ne>0&&ne&64&&J&&h.dynamicChildren?(z(h.dynamicChildren,J,P,R,F,I,k),(m.key!=null||R&&m===R.subTree)&&Vs(h,m,!0)):x(h,m,P,se,R,F,I,k,H)},G=(h,m,P,q,R,F,I,k,H)=>{m.slotScopeIds=k,h==null?m.shapeFlag&512?R.ctx.activate(m,P,q,I,H):C(m,P,q,R,F,I,H):ee(h,m,H)},C=(h,m,P,q,R,F,I)=>{const k=h.component=Bu(h,q,R);if(Oo(h)&&(k.ctx.renderer=De),Nu(k,!1,I),k.asyncDep){if(R&&R.registerDep(k,W,I),!h.el){const H=k.subTree=N(qe);M(null,H,m,P),h.placeholder=H.el}}else W(k,h,m,P,R,F,I)},ee=(h,m,P)=>{const q=m.component=h.component;if(Eu(h,m,P))if(q.asyncDep&&!q.asyncResolved){S(q,m,P);return}else q.next=m,q.update();else m.el=h.el,q.vnode=m},W=(h,m,P,q,R,F,I)=>{const k=()=>{if(h.isMounted){let{next:ne,bu:J,u:ce,parent:_e,vnode:Ie}=h;{const Lt=Rs(h);if(Lt){ne&&(ne.el=Ie.el,S(h,ne,I)),Lt.asyncDep.then(()=>{h.isUnmounted||k()});return}}let Me=ne,nt;cn(h,!1),ne?(ne.el=Ie.el,S(h,ne,I)):ne=Ie,J&&fo(J),(nt=ne.props&&ne.props.onVnodeBeforeUpdate)&&It(nt,_e,ne,Ie),cn(h,!0);const ot=Ks(h),At=h.subTree;h.subTree=ot,b(At,ot,d(At.el),Ae(At),h,R,F),ne.el=ot.el,Me===null&&Iu(h,ot.el),ce&&rt(ce,R),(nt=ne.props&&ne.props.onVnodeUpdated)&&rt(()=>It(nt,_e,ne,Ie),R)}else{let ne;const{el:J,props:ce}=m,{bm:_e,m:Ie,parent:Me,root:nt,type:ot}=h,At=_n(m);cn(h,!1),_e&&fo(_e),!At&&(ne=ce&&ce.onVnodeBeforeMount)&&It(ne,Me,m),cn(h,!0);{nt.ce&&nt.ce._def.shadowRoot!==!1&&nt.ce._injectChildStyle(ot);const Lt=h.subTree=Ks(h);b(null,Lt,P,q,h,R,F),m.el=Lt.el}if(Ie&&rt(Ie,R),!At&&(ne=ce&&ce.onVnodeMounted)){const Lt=m;rt(()=>It(ne,Me,Lt),R)}(m.shapeFlag&256||Me&&_n(Me.vnode)&&Me.vnode.shapeFlag&256)&&h.a&&rt(h.a,R),h.isMounted=!0,m=P=q=null}};h.scope.on();const H=h.effect=new Ar(k);h.scope.off();const B=h.update=H.run.bind(H),se=h.job=H.runIfDirty.bind(H);se.i=h,se.id=h.uid,H.scheduler=()=>Ci(se),cn(h,!0),B()},S=(h,m,P)=>{m.component=h;const q=h.vnode.props;h.vnode=m,h.next=null,fu(h,m.props,q,P),mu(h,m.children,P),Ct(),rs(h),Tt()},x=(h,m,P,q,R,F,I,k,H=!1)=>{const B=h&&h.children,se=h?h.shapeFlag:0,ne=m.children,{patchFlag:J,shapeFlag:ce}=m;if(J>0){if(J&128){Z(B,ne,P,q,R,F,I,k,H);return}else if(J&256){V(B,ne,P,q,R,F,I,k,H);return}}ce&8?(se&16&&we(B,R,F),ne!==B&&c(P,ne)):se&16?ce&16?Z(B,ne,P,q,R,F,I,k,H):we(B,R,F,!0):(se&8&&c(P,""),ce&16&&K(ne,P,q,R,F,I,k,H))},V=(h,m,P,q,R,F,I,k,H)=>{h=h||vt,m=m||vt;const B=h.length,se=m.length,ne=Math.min(B,se);let J;for(J=0;J<ne;J++){const ce=m[J]=H?Jt(m[J]):Et(m[J]);b(h[J],ce,P,null,R,F,I,k,H)}B>se?we(h,R,F,!0,!1,ne):K(m,P,q,R,F,I,k,H,ne)},Z=(h,m,P,q,R,F,I,k,H)=>{let B=0;const se=m.length;let ne=h.length-1,J=se-1;for(;B<=ne&&B<=J;){const ce=h[B],_e=m[B]=H?Jt(m[B]):Et(m[B]);if(un(ce,_e))b(ce,_e,P,null,R,F,I,k,H);else break;B++}for(;B<=ne&&B<=J;){const ce=h[ne],_e=m[J]=H?Jt(m[J]):Et(m[J]);if(un(ce,_e))b(ce,_e,P,null,R,F,I,k,H);else break;ne--,J--}if(B>ne){if(B<=J){const ce=J+1,_e=ce<se?m[ce].el:q;for(;B<=J;)b(null,m[B]=H?Jt(m[B]):Et(m[B]),P,_e,R,F,I,k,H),B++}}else if(B>J)for(;B<=ne;)ge(h[B],R,F,!0),B++;else{const ce=B,_e=B,Ie=new Map;for(B=_e;B<=J;B++){const ct=m[B]=H?Jt(m[B]):Et(m[B]);ct.key!=null&&Ie.set(ct.key,B)}let Me,nt=0;const ot=J-_e+1;let At=!1,Lt=0;const ro=new Array(ot);for(B=0;B<ot;B++)ro[B]=0;for(B=ce;B<=ne;B++){const ct=h[B];if(nt>=ot){ge(ct,R,F,!0);continue}let jt;if(ct.key!=null)jt=Ie.get(ct.key);else for(Me=_e;Me<=J;Me++)if(ro[Me-_e]===0&&un(ct,m[Me])){jt=Me;break}jt===void 0?ge(ct,R,F,!0):(ro[jt-_e]=B+1,jt>=Lt?Lt=jt:At=!0,b(ct,m[jt],P,null,R,F,I,k,H),nt++)}const Ha=At?wu(ro):vt;for(Me=Ha.length-1,B=ot-1;B>=0;B--){const ct=_e+B,jt=m[ct],Fa=m[ct+1],Wa=ct+1<se?Fa.el||Fa.placeholder:q;ro[B]===0?b(null,jt,P,Wa,R,F,I,k,H):At&&(Me<0||B!==Ha[Me]?j(jt,P,Wa,2):Me--)}}},j=(h,m,P,q,R=null)=>{const{el:F,type:I,transition:k,children:H,shapeFlag:B}=h;if(B&6){j(h.component.subTree,m,P,q);return}if(B&128){h.suspense.move(m,P,q);return}if(B&64){I.move(h,m,P,De);return}if(I===ye){o(F,m,P);for(let ne=0;ne<H.length;ne++)j(H[ne],m,P,q);o(h.anchor,m,P);return}if(I===Bo){D(h,m,P);return}if(q!==2&&B&1&&k)if(q===0)k.beforeEnter(F),o(F,m,P),rt(()=>k.enter(F),R);else{const{leave:ne,delayLeave:J,afterLeave:ce}=k,_e=()=>{h.ctx.isUnmounted?i(F):o(F,m,P)},Ie=()=>{F._isLeaving&&F[Rt](!0),ne(F,()=>{_e(),ce&&ce()})};J?J(F,_e,Ie):Ie()}else o(F,m,P)},ge=(h,m,P,q=!1,R=!1)=>{const{type:F,props:I,ref:k,children:H,dynamicChildren:B,shapeFlag:se,patchFlag:ne,dirs:J,cacheIndex:ce}=h;if(ne===-2&&(R=!1),k!=null&&(Ct(),Vn(k,null,P,h,!0),Tt()),ce!=null&&(m.renderCache[ce]=void 0),se&256){m.ctx.deactivate(h);return}const _e=se&1&&J,Ie=!_n(h);let Me;if(Ie&&(Me=I&&I.onVnodeBeforeUnmount)&&It(Me,m,h),se&6)ve(h.component,P,q);else{if(se&128){h.suspense.unmount(P,q);return}_e&&ln(h,null,m,"beforeUnmount"),se&64?h.type.remove(h,m,P,De,q):B&&!B.hasOnce&&(F!==ye||ne>0&&ne&64)?we(B,m,P,!1,!0):(F===ye&&ne&384||!R&&se&16)&&we(H,m,P),q&&ae(h)}(Ie&&(Me=I&&I.onVnodeUnmounted)||_e)&&rt(()=>{Me&&It(Me,m,h),_e&&ln(h,null,m,"unmounted")},P)},ae=h=>{const{type:m,el:P,anchor:q,transition:R}=h;if(m===ye){pe(P,q);return}if(m===Bo){w(h);return}const F=()=>{i(P),R&&!R.persisted&&R.afterLeave&&R.afterLeave()};if(h.shapeFlag&1&&R&&!R.persisted){const{leave:I,delayLeave:k}=R,H=()=>I(P,F);k?k(h.el,F,H):H()}else F()},pe=(h,m)=>{let P;for(;h!==m;)P=f(h),i(h),h=P;i(m)},ve=(h,m,P)=>{const{bum:q,scope:R,job:F,subTree:I,um:k,m:H,a:B}=h;Hs(H),Hs(B),q&&fo(q),R.stop(),F&&(F.flags|=8,ge(I,h,m,P)),k&&rt(k,m),rt(()=>{h.isUnmounted=!0},m)},we=(h,m,P,q=!1,R=!1,F=0)=>{for(let I=F;I<h.length;I++)ge(h[I],m,P,q,R)},Ae=h=>{if(h.shapeFlag&6)return Ae(h.component.subTree);if(h.shapeFlag&128)return h.suspense.next();const m=f(h.anchor||h.el),P=m&&m[Hc];return P?f(P):m};let at=!1;const Je=(h,m,P)=>{h==null?m._vnode&&ge(m._vnode,null,null,!0):b(m._vnode||null,h,m,null,null,null,P),m._vnode=h,at||(at=!0,rs(),ss(),at=!1)},De={p:b,um:ge,m:j,r:ae,mt:C,mc:K,pc:x,pbc:z,n:Ae,o:e};return{render:Je,hydrate:void 0,createApp:uu(Je)}}function ji({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 cn({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function yu(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Vs(e,t,n=!1){const o=e.children,i=t.children;if(re(o)&&re(i))for(let r=0;r<o.length;r++){const s=o[r];let l=i[r];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=i[r]=Jt(i[r]),l.el=s.el),!n&&l.patchFlag!==-2&&Vs(s,l)),l.type===jo&&l.patchFlag!==-1&&(l.el=s.el),l.type===qe&&!l.el&&(l.el=s.el)}}function wu(e){const t=e.slice(),n=[0];let o,i,r,s,l;const a=e.length;for(o=0;o<a;o++){const u=e[o];if(u!==0){if(i=n[n.length-1],e[i]<u){t[o]=i,n.push(o);continue}for(r=0,s=n.length-1;r<s;)l=r+s>>1,e[n[l]]<u?r=l+1:s=l;u<e[n[r]]&&(r>0&&(t[o]=n[r-1]),n[r]=o)}}for(r=n.length,s=n[r-1];r-- >0;)n[r]=s,s=t[s];return n}function Rs(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Rs(t)}function Hs(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const xu=Symbol.for("v-scx"),_u=()=>Ft(xu);function Fs(e,t){return Ao(e,null,t)}function Su(e,t){return Ao(e,null,{flush:"sync"})}function de(e,t,n){return Ao(e,t,n)}function Ao(e,t,n=me){const{immediate:o,deep:i,flush:r,once:s}=n,l=Oe({},n),a=t&&o||!t&&r!=="post";let u;if(Zn){if(r==="sync"){const p=_u();u=p.__watcherHandles||(p.__watcherHandles=[])}else if(!a){const p=()=>{};return p.stop=kt,p.resume=kt,p.pause=kt,p}}const c=Ke;l.call=(p,y,b)=>wt(p,c,y,b);let d=!1;r==="post"?l.scheduler=p=>{rt(p,c&&c.suspense)}:r!=="sync"&&(d=!0,l.scheduler=(p,y)=>{y?p():Ci(p)}),l.augmentJob=p=>{t&&(p.flags|=4),d&&(p.flags|=2,c&&(p.id=c.uid,p.i=c))};const f=Dc(e,t,l);return Zn&&(u?u.push(f):a&&f()),f}function ku(e,t,n){const o=this.proxy,i=$e(e)?e.includes(".")?Ws(o,e):()=>o[e]:e.bind(o,o);let r;fe(t)?r=t:(r=t.handler,n=t);const s=Kn(this),l=Ao(i,r.bind(o),n);return s(),l}function Ws(e,t){const n=t.split(".");return()=>{let o=e;for(let i=0;i<n.length&&o;i++)o=o[n[i]];return o}}function st(e,t,n=me){const o=dn(),i=He(t),r=Qe(t),s=Us(e,i),l=ts((a,u)=>{let c,d=me,f;return Su(()=>{const p=e[i];et(c,p)&&(c=p,u())}),{get(){return a(),n.get?n.get(c):c},set(p){const y=n.set?n.set(p):p;if(!et(y,c)&&!(d!==me&&et(p,d)))return;const b=o.vnode.props;b&&(t in b||i in b||r in b)&&(`onUpdate:${t}`in b||`onUpdate:${i}`in b||`onUpdate:${r}`in b)||(c=p,u()),o.emit(`update:${t}`,y),et(p,y)&&et(p,d)&&!et(y,f)&&u(),d=p,f=y}}});return l[Symbol.iterator]=()=>{let a=0;return{next(){return a<2?{value:a++?s||me:l,done:!1}:{done:!0}}}},l}const Us=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${He(t)}Modifiers`]||e[`${Qe(t)}Modifiers`];function Cu(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||me;let i=n;const r=t.startsWith("update:"),s=r&&Us(o,t.slice(7));s&&(s.trim&&(i=n.map(c=>$e(c)?c.trim():c)),s.number&&(i=n.map(ui)));let l,a=o[l=ci(t)]||o[l=ci(He(t))];!a&&r&&(a=o[l=ci(Qe(t))]),a&&wt(a,e,6,i);const u=o[l+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,wt(u,e,6,i)}}const Tu=new WeakMap;function qs(e,t,n=!1){const o=n?Tu:t.emitsCache,i=o.get(e);if(i!==void 0)return i;const r=e.emits;let s={},l=!1;if(!fe(e)){const a=u=>{const c=qs(u,t,!0);c&&(l=!0,Oe(s,c))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!r&&!l?(Te(e)&&o.set(e,null),null):(re(r)?r.forEach(a=>s[a]=null):Oe(s,r),Te(e)&&o.set(e,s),s)}function Lo(e,t){return!e||!so(t)?!1:(t=t.slice(2).replace(/Once$/,""),ke(e,t[0].toLowerCase()+t.slice(1))||ke(e,Qe(t))||ke(e,t))}function Zm(){}function Ks(e){const{type:t,vnode:n,proxy:o,withProxy:i,propsOptions:[r],slots:s,attrs:l,emit:a,render:u,renderCache:c,props:d,data:f,setupState:p,ctx:y,inheritAttrs:b}=e,$=Po(e);let M,L;try{if(n.shapeFlag&4){const w=i||o,g=w;M=Et(u.call(g,w,c,d,p,f,y)),L=l}else{const w=t;M=Et(w.length>1?w(d,{attrs:l,slots:s,emit:a}):w(d,null)),L=t.props?l:Mu(l)}}catch(w){Wn.length=0,To(w,e,1),M=N(qe)}let D=M;if(L&&b!==!1){const w=Object.keys(L),{shapeFlag:g}=D;w.length&&g&7&&(r&&w.some(si)&&(L=Pu(L,r)),D=Gt(D,L,!1,!0))}return n.dirs&&(D=Gt(D,null,!1,!0),D.dirs=D.dirs?D.dirs.concat(n.dirs):n.dirs),n.transition&&Nn(D,n.transition),M=D,Po($),M}const Mu=e=>{let t;for(const n in e)(n==="class"||n==="style"||so(n))&&((t||(t={}))[n]=e[n]);return t},Pu=(e,t)=>{const n={};for(const o in e)(!si(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n};function Eu(e,t,n){const{props:o,children:i,component:r}=e,{props:s,children:l,patchFlag:a}=t,u=r.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return o?Zs(o,s,u):!!s;if(a&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const f=c[d];if(s[f]!==o[f]&&!Lo(u,f))return!0}}}else return(i||l)&&(!l||!l.$stable)?!0:o===s?!1:o?s?Zs(o,s,u):!0:!!s;return!1}function Zs(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let i=0;i<o.length;i++){const r=o[i];if(t[r]!==e[r]&&!Lo(n,r))return!0}return!1}function Iu({vnode:e,parent:t},n){for(;t;){const o=t.subTree;if(o.suspense&&o.suspense.activeBranch===e&&(o.el=e.el),o===e)(e=t.vnode).el=n,t=t.parent;else break}}const Ys=e=>e.__isSuspense;function Ou(e,t){t&&t.pendingBranch?re(e)?t.effects.push(...e):t.effects.push(e):Rc(e)}const ye=Symbol.for("v-fgt"),jo=Symbol.for("v-txt"),qe=Symbol.for("v-cmt"),Bo=Symbol.for("v-stc"),Wn=[];let lt=null;function v(e=!1){Wn.push(lt=e?null:[])}function $u(){Wn.pop(),lt=Wn[Wn.length-1]||null}let Un=1;function No(e,t=!1){Un+=e,e<0&&lt&&t&&(lt.hasOnce=!0)}function Xs(e){return e.dynamicChildren=Un>0?lt||vt:null,$u(),Un>0&&lt&&lt.push(e),e}function O(e,t,n,o,i,r){return Xs(Y(e,t,n,o,i,r,!0))}function ie(e,t,n,o,i){return Xs(N(e,t,n,o,i,!0))}function qn(e){return e?e.__v_isVNode===!0:!1}function un(e,t){return e.type===t.type&&e.key===t.key}const Gs=({key:e})=>e??null,Vo=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?$e(e)||ze(e)||fe(e)?{i:Ve,r:e,k:t,f:!!n}:e:null);function Y(e,t=null,n=null,o=0,i=null,r=e===ye?0:1,s=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Gs(t),ref:t&&Vo(t),scopeId:as,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:o,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:Ve};return l?(Bi(a,n),r&128&&e.normalize(a)):n&&(a.shapeFlag|=$e(n)?8:16),Un>0&&!s&&lt&&(a.patchFlag>0||r&6)&&a.patchFlag!==32&&lt.push(a),a}const N=zu;function zu(e,t=null,n=null,o=0,i=null,r=!1){if((!e||e===ws)&&(e=qe),qn(e)){const l=Gt(e,t,!0);return n&&Bi(l,n),Un>0&&!r&&lt&&(l.shapeFlag&6?lt[lt.indexOf(e)]=l:lt.push(l)),l.patchFlag=-2,l}if(Uu(e)&&(e=e.__vccOpts),t){t=Du(t);let{class:l,style:a}=t;l&&!$e(l)&&(t.class=ue(l)),Te(a)&&(Si(a)&&!re(a)&&(a=Oe({},a)),t.style=Ce(a))}const s=$e(e)?1:Ys(e)?128:cs(e)?64:Te(e)?4:fe(e)?2:0;return Y(e,t,n,o,i,s,r,!0)}function Du(e){return e?Si(e)||zs(e)?Oe({},e):e:null}function Gt(e,t,n=!1,o=!1){const{props:i,ref:r,patchFlag:s,children:l,transition:a}=e,u=t?Sn(i||{},t):i,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&Gs(u),ref:t&&t.ref?n&&r?re(r)?r.concat(Vo(t)):[r,Vo(t)]:Vo(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ye?s===-1?16:s|16:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Gt(e.ssContent),ssFallback:e.ssFallback&&Gt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&o&&Nn(c,a.clone(c)),c}function Wt(e=" ",t=0){return N(jo,null,e,t)}function Au(e,t){const n=N(Bo,null,e);return n.staticCount=t,n}function le(e="",t=!1){return t?(v(),ie(qe,null,e)):N(qe,null,e)}function Et(e){return e==null||typeof e=="boolean"?N(qe):re(e)?N(ye,null,e.slice()):qn(e)?Jt(e):N(jo,null,String(e))}function Jt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Gt(e)}function Bi(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(re(t))n=16;else if(typeof t=="object")if(o&65){const i=t.default;i&&(i._c&&(i._d=!1),Bi(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!zs(t)?t._ctx=Ve:i===3&&Ve&&(Ve.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else fe(t)?(t={default:t,_ctx:Ve},n=32):(t=String(t),o&64?(n=16,t=[Wt(t)]):n=8);e.children=t,e.shapeFlag|=n}function Sn(...e){const t={};for(let n=0;n<e.length;n++){const o=e[n];for(const i in o)if(i==="class")t.class!==o.class&&(t.class=ue([t.class,o.class]));else if(i==="style")t.style=Ce([t.style,o.style]);else if(so(i)){const r=t[i],s=o[i];s&&r!==s&&!(re(r)&&r.includes(s))&&(t[i]=r?[].concat(r,s):s)}else i!==""&&(t[i]=o[i])}return t}function It(e,t,n,o=null){wt(e,t,7,[n,o])}const Lu=Es();let ju=0;function Bu(e,t,n){const o=e.type,i=(t?t.appContext:e.appContext)||Lu,r={uid:ju++,vnode:e,type:o,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new tc(!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:As(o,i),emitsOptions:qs(o,i),emit:null,emitted:null,propsDefaults:me,inheritAttrs:o.inheritAttrs,ctx:me,data:me,props:me,attrs:me,slots:me,refs:me,setupState:me,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return r.ctx={_:r},r.root=t?t.root:r,r.emit=Cu.bind(null,r),e.ce&&e.ce(r),r}let Ke=null;const dn=()=>Ke||Ve;let Ro,Ni;{const e=po(),t=(n,o)=>{let i;return(i=e[n])||(i=e[n]=[]),i.push(o),r=>{i.length>1?i.forEach(s=>s(r)):i[0](r)}};Ro=t("__VUE_INSTANCE_SETTERS__",n=>Ke=n),Ni=t("__VUE_SSR_SETTERS__",n=>Zn=n)}const Kn=e=>{const t=Ke;return Ro(e),e.scope.on(),()=>{e.scope.off(),Ro(t)}},Js=()=>{Ke&&Ke.scope.off(),Ro(null)};function Qs(e){return e.vnode.shapeFlag&4}let Zn=!1;function Nu(e,t=!1,n=!1){t&&Ni(t);const{props:o,children:i}=e.vnode,r=Qs(e);du(e,o,r,t),gu(e,i,n||t);const s=r?Vu(e,t):void 0;return t&&Ni(!1),s}function Vu(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,ou);const{setup:o}=n;if(o){Ct();const i=e.setupContext=o.length>1?Hu(e):null,r=Kn(e),s=yn(o,e,0,[e.props,i]),l=Mr(s);if(Tt(),r(),(l||e.sp)&&!_n(e)&&ms(e),l){if(s.then(Js,Js),t)return s.then(a=>{el(e,a)}).catch(a=>{To(a,e,0)});e.asyncDep=s}else el(e,s)}else tl(e)}function el(e,t,n){fe(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Te(t)&&(e.setupState=es(t)),tl(e)}function tl(e,t,n){const o=e.type;e.render||(e.render=o.render||kt);{const i=Kn(e);Ct();try{iu(e)}finally{Tt(),i()}}}const Ru={get(e,t){return Ue(e,"get",""),e[t]}};function Hu(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Ru),slots:e.slots,emit:e.emit,expose:t}}function Ho(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(es(Sc(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Rn)return Rn[n](e)},has(t,n){return n in t||n in Rn}})):e.proxy}const Fu=/(?:^|[-_])\w/g,Wu=e=>e.replace(Fu,t=>t.toUpperCase()).replace(/[-_]/g,"");function nl(e,t=!0){return fe(e)?e.displayName||e.name:e.name||t&&e.__name}function ol(e,t,n=!1){let o=nl(t);if(!o&&t.__file){const i=t.__file.match(/([^/\\]+)\.\w+$/);i&&(o=i[1])}if(!o&&e&&e.parent){const i=r=>{for(const s in r)if(r[s]===t)return s};o=i(e.components||e.parent.type.components)||i(e.appContext.components)}return o?Wu(o):n?"App":"Anonymous"}function Uu(e){return fe(e)&&"__vccOpts"in e}const Q=(e,t)=>$c(e,t,Zn);function il(e,t,n){try{No(-1);const o=arguments.length;return o===2?Te(t)&&!re(t)?qn(t)?N(e,null,[t]):N(e,t):N(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&qn(n)&&(n=[n]),N(e,t,n))}finally{No(1)}}const qu="3.5.24";/**
17
17
  * @vue/runtime-dom v3.5.24
18
18
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
19
19
  * @license MIT
20
- **/let Ri;const rl=typeof window<"u"&&window.trustedTypes;if(rl)try{Ri=rl.createPolicy("vue",{createHTML:e=>e})}catch{}const sl=Ri?e=>Ri.createHTML(e):e=>e,Ku="http://www.w3.org/2000/svg",Zu="http://www.w3.org/1998/Math/MathML",Ut=typeof document<"u"?document:null,ll=Ut&&Ut.createElement("template"),Yu={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const i=t==="svg"?Ut.createElementNS(Ku,e):t==="mathml"?Ut.createElementNS(Zu,e):n?Ut.createElement(e,{is:n}):Ut.createElement(e);return e==="select"&&o&&o.multiple!=null&&i.setAttribute("multiple",o.multiple),i},createText:e=>Ut.createTextNode(e),createComment:e=>Ut.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ut.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,i,r){const s=n?n.previousSibling:t.lastChild;if(i&&(i===r||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===r||!(i=i.nextSibling)););else{ll.innerHTML=sl(o==="svg"?`<svg>${e}</svg>`:o==="mathml"?`<math>${e}</math>`:e);const l=ll.content;if(o==="svg"||o==="mathml"){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}t.insertBefore(l,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Qt="transition",Yn="animation",Xn=Symbol("_vtc"),al={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},Xu=Oe({},us,al),Gn=(e=>(e.displayName="Transition",e.props=Xu,e))((e,{slots:t})=>il(Uc,Gu(e),t)),dn=(e,t=[])=>{re(e)?e.forEach(n=>n(...t)):e&&e(...t)},cl=e=>e?re(e)?e.some(t=>t.length>1):e.length>1:!1;function Gu(e){const t={};for(const C in e)C in al||(t[C]=e[C]);if(e.css===!1)return t;const{name:n="v",type:o,duration:i,enterFromClass:r=`${n}-enter-from`,enterActiveClass:s=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:a=r,appearActiveClass:u=s,appearToClass:c=l,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,w=Ju(i),y=w&&w[0],O=w&&w[1],{onBeforeEnter:M,onEnter:L,onEnterCancelled:$,onLeave:m,onLeaveCancelled:h,onBeforeAppear:T=M,onAppear:H=L,onAppearCancelled:W=$}=t,U=(C,X,S,Q)=>{C._enterCancelled=Q,fn(C,X?c:l),fn(C,X?u:s),S&&S()},ee=(C,X)=>{C._isLeaving=!1,fn(C,d),fn(C,p),fn(C,f),X&&X()},B=C=>(X,S)=>{const Q=C?H:L,F=()=>U(X,C,S);dn(Q,[X,F]),ul(()=>{fn(X,C?a:r),qt(X,C?c:l),cl(Q)||dl(X,o,y,F)})};return Oe(t,{onBeforeEnter(C){dn(M,[C]),qt(C,r),qt(C,s)},onBeforeAppear(C){dn(T,[C]),qt(C,a),qt(C,u)},onEnter:B(!1),onAppear:B(!0),onLeave(C,X){C._isLeaving=!0;const S=()=>ee(C,X);qt(C,d),C._enterCancelled?(qt(C,f),hl(C)):(hl(C),qt(C,f)),ul(()=>{C._isLeaving&&(fn(C,d),qt(C,p),cl(m)||dl(C,o,O,S))}),dn(m,[C,S])},onEnterCancelled(C){U(C,!1,void 0,!0),dn($,[C])},onAppearCancelled(C){U(C,!0,void 0,!0),dn(W,[C])},onLeaveCancelled(C){ee(C),dn(h,[C])}})}function Ju(e){if(e==null)return null;if(Te(e))return[Hi(e.enter),Hi(e.leave)];{const t=Hi(e);return[t,t]}}function Hi(e){return fi(e)}function qt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Xn]||(e[Xn]=new Set)).add(t)}function fn(e,t){t.split(/\s+/).forEach(o=>o&&e.classList.remove(o));const n=e[Xn];n&&(n.delete(t),n.size||(e[Xn]=void 0))}function ul(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Qu=0;function dl(e,t,n,o){const i=e._endId=++Qu,r=()=>{i===e._endId&&o()};if(n!=null)return setTimeout(r,n);const{type:s,timeout:l,propCount:a}=ed(e,t);if(!s)return o();const u=s+"end";let c=0;const d=()=>{e.removeEventListener(u,f),r()},f=p=>{p.target===e&&++c>=a&&d()};setTimeout(()=>{c<a&&d()},l+1),e.addEventListener(u,f)}function ed(e,t){const n=window.getComputedStyle(e),o=w=>(n[w]||"").split(", "),i=o(`${Qt}Delay`),r=o(`${Qt}Duration`),s=fl(i,r),l=o(`${Yn}Delay`),a=o(`${Yn}Duration`),u=fl(l,a);let c=null,d=0,f=0;t===Qt?s>0&&(c=Qt,d=s,f=r.length):t===Yn?u>0&&(c=Yn,d=u,f=a.length):(d=Math.max(s,u),c=d>0?s>u?Qt:Yn:null,f=c?c===Qt?r.length:a.length:0);const p=c===Qt&&/\b(?:transform|all)(?:,|$)/.test(o(`${Qt}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:p}}function fl(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,o)=>pl(n)+pl(e[o])))}function pl(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function hl(e){return(e?e.ownerDocument:document).body.offsetHeight}function td(e,t,n){const o=e[Xn];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Fo=Symbol("_vod"),gl=Symbol("_vsh"),nd={name:"show",beforeMount(e,{value:t},{transition:n}){e[Fo]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Jn(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),Jn(e,!0),o.enter(e)):o.leave(e,()=>{Jn(e,!1)}):Jn(e,t))},beforeUnmount(e,{value:t}){Jn(e,t)}};function Jn(e,t){e.style.display=t?e[Fo]:"none",e[gl]=!t}const od=Symbol(""),id=/(?:^|;)\s*display\s*:/;function rd(e,t,n){const o=e.style,i=$e(n);let r=!1;if(n&&!i){if(t)if($e(t))for(const s of t.split(";")){const l=s.slice(0,s.indexOf(":")).trim();n[l]==null&&Wo(o,l,"")}else for(const s in t)n[s]==null&&Wo(o,s,"");for(const s in n)s==="display"&&(r=!0),Wo(o,s,n[s])}else if(i){if(t!==n){const s=o[od];s&&(n+=";"+s),o.cssText=n,r=id.test(n)}}else t&&e.removeAttribute("style");Fo in e&&(e[Fo]=r?o.display:"",e[gl]&&(o.display="none"))}const ml=/\s*!important$/;function Wo(e,t,n){if(re(n))n.forEach(o=>Wo(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=sd(e,t);ml.test(n)?e.setProperty(et(o),n.replace(ml,""),"important"):e[o]=n}}const vl=["Webkit","Moz","ms"],Fi={};function sd(e,t){const n=Fi[t];if(n)return n;let o=He(t);if(o!=="filter"&&o in e)return Fi[t]=o;o=uo(o);for(let i=0;i<vl.length;i++){const r=vl[i]+o;if(r in e)return Fi[t]=r}return t}const bl="http://www.w3.org/1999/xlink";function yl(e,t,n,o,i,r=Qa(t)){o&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(bl,t.slice(6,t.length)):e.setAttributeNS(bl,t,n):n==null||r&&!Or(n)?e.removeAttribute(t):e.setAttribute(t,r?"":yt(n)?String(n):n)}function wl(e,t,n,o,i){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?sl(n):n);return}const r=e.tagName;if(t==="value"&&r!=="PROGRESS"&&!r.includes("-")){const l=r==="OPTION"?e.getAttribute("value")||"":e.value,a=n==null?e.type==="checkbox"?"on":"":String(n);(l!==a||!("_value"in e))&&(e.value=a),n==null&&e.removeAttribute(t),e._value=n;return}let s=!1;if(n===""||n==null){const l=typeof e[t];l==="boolean"?n=Or(n):n==null&&l==="string"?(n="",s=!0):l==="number"&&(n=0,s=!0)}try{e[t]=n}catch{}s&&e.removeAttribute(i||t)}function pn(e,t,n,o){e.addEventListener(t,n,o)}function ld(e,t,n,o){e.removeEventListener(t,n,o)}const xl=Symbol("_vei");function ad(e,t,n,o,i=null){const r=e[xl]||(e[xl]={}),s=r[t];if(o&&s)s.value=o;else{const[l,a]=cd(t);if(o){const u=r[t]=fd(o,i);pn(e,l,u,a)}else s&&(ld(e,l,s,a),r[t]=void 0)}}const _l=/(?:Once|Passive|Capture)$/;function cd(e){let t;if(_l.test(e)){t={};let o;for(;o=e.match(_l);)e=e.slice(0,e.length-o[0].length),t[o[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):et(e.slice(2)),t]}let Wi=0;const ud=Promise.resolve(),dd=()=>Wi||(ud.then(()=>Wi=0),Wi=Date.now());function fd(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;xt(pd(o,n.value),t,5,[o])};return n.value=e,n.attached=dd(),n}function pd(e,t){if(re(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(o=>i=>!i._stopped&&o&&o(i))}else return t}const Sl=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,hd=(e,t,n,o,i,r)=>{const s=i==="svg";t==="class"?td(e,o,s):t==="style"?rd(e,n,o):so(t)?li(t)||ad(e,t,n,o,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):gd(e,t,o,s))?(wl(e,t,o),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&yl(e,t,o,s,r,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!$e(o))?wl(e,He(t),o,r,t):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),yl(e,t,o,s))};function gd(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&Sl(t)&&fe(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const i=e.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return Sl(t)&&$e(n)?!1:t in e}const kl={};function md(e,t,n){let o=he(e,t);ao(o)&&(o=Oe({},o,t));class i extends Ui{constructor(s){super(o,s,n)}}return i.def=o,i}const vd=typeof HTMLElement<"u"?HTMLElement:class{};class Ui extends vd{constructor(t,n={},o=Ol){super(),this._def=t,this._props=n,this._createApp=o,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&o!==Ol?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow(Oe({},t.shadowRootOptions,{mode:"open"})),this._root=this.shadowRoot):this._root=this}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.parentNode||t.host);)if(t instanceof Ui){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(t=this._parent){t&&(this._instance.parent=t._instance,this._inheritParentContext(t))}_inheritParentContext(t=this._parent){t&&this._app&&Object.setPrototypeOf(this._app._context.provides,t._instance.provides)}disconnectedCallback(){this._connected=!1,ht(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&(this._teleportTargets.clear(),this._teleportTargets=void 0))})}_processMutations(t){for(const n of t)this._setAttr(n.attributeName)}_resolveDef(){if(this._pendingResolve)return;for(let o=0;o<this.attributes.length;o++)this._setAttr(this.attributes[o].name);this._ob=new MutationObserver(this._processMutations.bind(this)),this._ob.observe(this,{attributes:!0});const t=(o,i=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:r,styles:s}=o;let l;if(r&&!re(r))for(const a in r){const u=r[a];(u===Number||u&&u.type===Number)&&(a in this._props&&(this._props[a]=fi(this._props[a])),(l||(l=Object.create(null)))[He(a)]=!0)}this._numberProps=l,this._resolveProps(o),this.shadowRoot&&this._applyStyles(s),this._mount(o)},n=this._def.__asyncLoader;n?this._pendingResolve=n().then(o=>{o.configureApp=this._def.configureApp,t(this._def=o,!0)}):t(this._def)}_mount(t){this._app=this._createApp(t),this._inheritParentContext(),t.configureApp&&t.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const n=this._instance&&this._instance.exposed;if(n)for(const o in n)ke(this,o)||Object.defineProperty(this,o,{get:()=>Y(n[o])})}_resolveProps(t){const{props:n}=t,o=re(n)?n:Object.keys(n||{});for(const i of Object.keys(this))i[0]!=="_"&&o.includes(i)&&this._setProp(i,this[i]);for(const i of o.map(He))Object.defineProperty(this,i,{get(){return this._getProp(i)},set(r){this._setProp(i,r,!0,!this._patching)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const n=this.hasAttribute(t);let o=n?this.getAttribute(t):kl;const i=He(t);n&&this._numberProps&&this._numberProps[i]&&(o=fi(o)),this._setProp(i,o,!1,!0)}_getProp(t){return this._props[t]}_setProp(t,n,o=!0,i=!1){if(n!==this._props[t]&&(this._dirty=!0,n===kl?delete this._props[t]:(this._props[t]=n,t==="key"&&this._app&&(this._app._ceVNode.key=n)),i&&this._instance&&this._update(),o)){const r=this._ob;r&&(this._processMutations(r.takeRecords()),r.disconnect()),n===!0?this.setAttribute(et(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(et(t),n+""):n||this.removeAttribute(et(t)),r&&r.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),Td(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const n=A(this._def,Oe(t,this._props));return this._instance||(n.ce=o=>{this._instance=o,o.ce=this,o.isCE=!0;const i=(r,s)=>{this.dispatchEvent(new CustomEvent(r,ao(s[0])?Oe({detail:s},s[0]):{detail:s}))};o.emit=(r,...s)=>{i(r,s),et(r)!==r&&i(et(r),s)},this._setParent()}),n}_applyStyles(t,n){if(!t)return;if(n){if(n===this._def||this._styleChildren.has(n))return;this._styleChildren.add(n)}const o=this._nonce;for(let i=t.length-1;i>=0;i--){const r=document.createElement("style");o&&r.setAttribute("nonce",o),r.textContent=t[i],this.shadowRoot.prepend(r)}}_parseSlots(){const t=this._slots={};let n;for(;n=this.firstChild;){const o=n.nodeType===1&&n.getAttribute("slot")||"default";(t[o]||(t[o]=[])).push(n),this.removeChild(n)}}_renderSlots(){const t=this._getSlots(),n=this._instance.type.__scopeId;for(let o=0;o<t.length;o++){const i=t[o],r=i.getAttribute("name")||"default",s=this._slots[r],l=i.parentNode;if(s)for(const a of s){if(n&&a.nodeType===1){const u=n+"-s",c=document.createTreeWalker(a,1);a.setAttribute(u,"");let d;for(;d=c.nextNode();)d.setAttribute(u,"")}l.insertBefore(a,i)}else for(;i.firstChild;)l.insertBefore(i.firstChild,i);l.removeChild(i)}}_getSlots(){const t=[this];this._teleportTargets&&t.push(...this._teleportTargets);const n=new Set;for(const o of t){const i=o.querySelectorAll("slot");for(let r=0;r<i.length;r++)n.add(i[r])}return Array.from(n)}_injectChildStyle(t){this._applyStyles(t.styles,t)}_beginPatch(){this._patching=!0,this._dirty=!1}_endPatch(){this._patching=!1,this._dirty&&this._instance&&this._update()}_removeChildStyle(t){}}const Uo=e=>{const t=e.props["onUpdate:modelValue"]||!1;return re(t)?n=>fo(t,n):t};function bd(e){e.target.composing=!0}function Cl(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const kn=Symbol("_assign");function Tl(e,t,n){return t&&(e=e.trim()),n&&(e=di(e)),e}const yd={created(e,{modifiers:{lazy:t,trim:n,number:o}},i){e[kn]=Uo(i);const r=o||i.props&&i.props.type==="number";pn(e,t?"change":"input",s=>{s.target.composing||e[kn](Tl(e.value,n,r))}),(n||r)&&pn(e,"change",()=>{e.value=Tl(e.value,n,r)}),t||(pn(e,"compositionstart",bd),pn(e,"compositionend",Cl),pn(e,"change",Cl))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:o,trim:i,number:r}},s){if(e[kn]=Uo(s),e.composing)return;const l=(r||e.type==="number")&&!/^0\d/.test(e.value)?di(e.value):e.value,a=t??"";l!==a&&(document.activeElement===e&&e.type!=="range"&&(o&&t===n||i&&e.value.trim()===a)||(e.value=a))}},wd={deep:!0,created(e,t,n){e[kn]=Uo(n),pn(e,"change",()=>{const o=e._modelValue,i=xd(e),r=e.checked,s=e[kn];if(re(o)){const l=$r(o,i),a=l!==-1;if(r&&!a)s(o.concat(i));else if(!r&&a){const u=[...o];u.splice(l,1),s(u)}}else if(lo(o)){const l=new Set(o);r?l.add(i):l.delete(i),s(l)}else s(Pl(e,r))})},mounted:Ml,beforeUpdate(e,t,n){e[kn]=Uo(n),Ml(e,t,n)}};function Ml(e,{value:t,oldValue:n},o){e._modelValue=t;let i;if(re(t))i=$r(t,o.props.value)>-1;else if(lo(t))i=t.has(o.props.value);else{if(t===n)return;i=ho(t,Pl(e,!0))}e.checked!==i&&(e.checked=i)}function xd(e){return"_value"in e?e._value:e.value}function Pl(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const _d=["ctrl","shift","alt","meta"],Sd={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)=>_d.some(n=>e[`${n}Key`]&&!t.includes(n))},Be=(e,t)=>{const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=(i,...r)=>{for(let s=0;s<t.length;s++){const l=Sd[t[s]];if(l&&l(i,t))return}return e(i,...r)})},kd={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},qo=(e,t)=>{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=i=>{if(!("key"in i))return;const r=et(i.key);if(t.some(s=>s===r||kd[s]===r))return e(i)})},Cd=Oe({patchProp:hd},Yu);let El;function Il(){return El||(El=vu(Cd))}const Td=(...e)=>{Il().render(...e)},Ol=(...e)=>{const t=Il().createApp(...e),{mount:n}=t;return t.mount=o=>{const i=Pd(o);if(!i)return;const r=t._component;!fe(r)&&!r.render&&!r.template&&(r.template=i.innerHTML),i.nodeType===1&&(i.textContent="");const s=n(i,!1,Md(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),s},t};function Md(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Pd(e){return $e(e)?document.querySelector(e):e}function Cn(e){return e.checkVisibility({opacityProperty:!0,visibilityProperty:!1,contentVisibilityAuto:!1})}async function en(e,t,n){const o=await n(()=>{e=0});if(o!==void 0)return o;if(!(e<=0))return await new Promise(i=>{setTimeout(async()=>{const r=await en(e-1,t,n);i(r)},t)})}function Qn(e,t){return e>=280&&t>=50||e>=160&&t>=320}var Kt;(function(e){e[e.manga=1]="manga",e[e.novel=2]="novel",e[e.anime=3]="anime"})(Kt||(Kt={}));async function Ed(e,t){const n=["NAV","ASIDE","FOOTER","HEADER","BR","HR","BUTTON","A"],o="img:not(nav img, header img, footer img, aside img), canvas",i=t==null?void 0:t.timeoutMs,r=t==null?void 0:t.include,s=t==null?void 0:t.paraSel,l=!r||r.includes(Kt.manga),a=!r||r.includes(Kt.novel);let u=0;return await en(i/50,50,()=>{const p=c();if(p){if(l&&f(p,t==null?void 0:t.validateImgSize))return Kt.manga;if(a&&u++%3===0&&d(p))return Kt.novel}});function c(){for(const p of e.split(",")){const w=document.querySelector(p);if(w)return w}}function d(p){const w=[`p:not(${n.map($=>`${$} p`).join(",")})`,s].filter(Boolean).join(",");if(!p.querySelector(w)&&(!s||!p.matches(s)))return!1;let y=0,O=0,M=0;return L(p);function L($){const m=$.tagName;if(n.includes(m)||!Cn($)||window.getComputedStyle($).position==="fixed")return!1;if(m==="P"||s&&$.matches(s))return y+=$.textContent.split(" ").filter(Boolean).length,O++,M=0,!l&&y>50||O>10&&y>120||O>5&&y>250||y>400;O>0&&++M>4&&(O=0,y=0);const T=Array.from($.children);for(let H=0;H<T.length;H++)if(L(T[H]))return!0;return!1}}function f(p,w){const y=Array.from(p.querySelectorAll(o));return w!==!1?y.some(O=>Cn(O)&&Id(O)):y.length>0}}function Id(e){const{width:t,height:n}=e.getBoundingClientRect();return Qn(t,n)}function qi(e,t){return hi()?(nc(e,t),!0):!1}const Ki=new WeakMap,Od=(...e)=>{var t;const n=e[0],o=(t=un())===null||t===void 0?void 0:t.proxy,i=o??hi();if(i==null&&!Is())throw new Error("injectLocal must be called in setup");return i&&Ki.has(i)&&n in Ki.get(i)?Ki.get(i)[n]:Ft(...e)},$l=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const $d=e=>e!=null,zd=Object.prototype.toString,Dd=e=>zd.call(e)==="[object Object]",Tn=()=>{};function Ad(...e){if(e.length!==1)return Ec(...e);const t=e[0];return typeof t=="function"?Ln(ts(()=>({get:t,set:Tn}))):te(t)}function zl(e,t){function n(...o){return new Promise((i,r)=>{Promise.resolve(e(()=>t.apply(this,o),{fn:t,thisArg:this,args:o})).then(i).catch(r)})}return n}const Dl=e=>e();function Ld(e,t={}){let n,o,i=Tn;const r=a=>{clearTimeout(a),i(),i=Tn};let s;return a=>{const u=pt(e),c=pt(t.maxWait);return n&&r(n),u<=0||c!==void 0&&c<=0?(o&&(r(o),o=void 0),Promise.resolve(a())):new Promise((d,f)=>{i=t.rejectOnCancel?f:d,s=a,c&&!o&&(o=setTimeout(()=>{n&&r(n),o=void 0,d(s())},c)),n=setTimeout(()=>{o&&r(o),o=void 0,d(a())},u)})}}function jd(e=Dl,t={}){const{initialState:n="active"}=t,o=Ad(n==="active");function i(){o.value=!1}function r(){o.value=!0}const s=(...l)=>{o.value&&e(...l)};return{isActive:Ln(o),pause:i,resume:r,eventFilter:s}}function Al(e){return e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e)}function eo(e){return Array.isArray(e)?e:[e]}function Bd(e){return un()}function mt(e,t=200,n={}){return zl(Ld(t,n),e)}function Nd(e,t,n={}){const{eventFilter:o=Dl,...i}=n;return de(e,zl(o,t),i)}function Vd(e,t,n={}){const{eventFilter:o,initialState:i="active",...r}=n,{eventFilter:s,pause:l,resume:a,isActive:u}=jd(o,{initialState:i});return{stop:Nd(e,t,{...r,eventFilter:s}),pause:l,resume:a,isActive:u}}const Rd=Vd;function Zi(e,t=!0,n){Bd()?je(e,n):t?e():ht(e)}function Hd(e,t,n){return de(e,t,{...n,immediate:!0})}const _t=$l?window:void 0,Fd=$l?window.document:void 0;function Ot(e){var t;const n=pt(e);return(t=n==null?void 0:n.$el)!==null&&t!==void 0?t:n}function St(...e){const t=[],n=()=>{t.forEach(l=>l()),t.length=0},o=(l,a,u,c)=>(l.addEventListener(a,u,c),()=>l.removeEventListener(a,u,c)),i=J(()=>{const l=eo(pt(e[0])).filter(a=>a!=null);return l.every(a=>typeof a!="string")?l:void 0}),r=Hd(()=>{var l,a;return[(l=(a=i.value)===null||a===void 0?void 0:a.map(u=>Ot(u)))!==null&&l!==void 0?l:[_t].filter(u=>u!=null),eo(pt(i.value?e[1]:e[0])),eo(Y(i.value?e[2]:e[1])),pt(i.value?e[3]:e[2])]},([l,a,u,c])=>{if(n(),!(l!=null&&l.length)||!(a!=null&&a.length)||!(u!=null&&u.length))return;const d=Dd(c)?{...c}:c;t.push(...l.flatMap(f=>a.flatMap(p=>u.map(w=>o(f,p,w,d)))))},{flush:"post"}),s=()=>{r(),n()};return qi(n),s}function Wd(){const e=ft(!1),t=un();return t&&je(()=>{e.value=!0},t),e}function Yi(e){const t=Wd();return J(()=>(t.value,!!e()))}const Ud=Symbol("vueuse-ssr-width");function qd(){const e=Is()?Od(Ud,null):null;return typeof e=="number"?e:void 0}function Kd(e,t={}){const{window:n=_t,ssrWidth:o=qd()}=t,i=Yi(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function"),r=ft(typeof o=="number"),s=ft(),l=ft(!1),a=u=>{l.value=u.matches};return Fs(()=>{if(r.value){r.value=!i.value,l.value=pt(e).split(",").some(u=>{const c=u.includes("not all"),d=u.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),f=u.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let p=!!(d||f);return d&&p&&(p=o>=Al(d[1])),f&&p&&(p=o<=Al(f[1])),c?!p:p});return}i.value&&(s.value=n.matchMedia(pt(e)),l.value=s.value.matches)}),St(s,"change",a,{passive:!0}),J(()=>l.value)}const Ko=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Zo="__vueuse_ssr_handlers__",Zd=Yd();function Yd(){return Zo in Ko||(Ko[Zo]=Ko[Zo]||{}),Ko[Zo]}function Xd(e,t){return Zd[e]||t}function Gd(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const Jd={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},Ll="vueuse-storage";function Qd(e,t,n,o={}){var i;const{flush:r="pre",deep:s=!0,listenToStorageChanges:l=!0,writeDefaults:a=!0,mergeDefaults:u=!1,shallow:c,window:d=_t,eventFilter:f,onError:p=S=>{console.error(S)},initOnMounted:w}=o,y=(c?ft:te)(typeof t=="function"?t():t),O=J(()=>pt(e));if(!n)try{n=Xd("getDefaultStorage",()=>_t==null?void 0:_t.localStorage)()}catch(S){p(S)}if(!n)return y;const M=pt(t),L=Gd(M),$=(i=o.serializer)!==null&&i!==void 0?i:Jd[L],{pause:m,resume:h}=Rd(y,S=>ee(S),{flush:r,deep:s,eventFilter:f});de(O,()=>C(),{flush:r});let T=!1;const H=S=>{w&&!T||C(S)},W=S=>{w&&!T||X(S)};d&&l&&(n instanceof Storage?St(d,"storage",H,{passive:!0}):St(d,Ll,W)),w?Zi(()=>{T=!0,C()}):C();function U(S,Q){if(d){const F={key:O.value,oldValue:S,newValue:Q,storageArea:n};d.dispatchEvent(n instanceof Storage?new StorageEvent("storage",F):new CustomEvent(Ll,{detail:F}))}}function ee(S){try{const Q=n.getItem(O.value);if(S==null)U(Q,null),n.removeItem(O.value);else{const F=$.write(S);Q!==F&&(n.setItem(O.value,F),U(Q,F))}}catch(Q){p(Q)}}function B(S){const Q=S?S.newValue:n.getItem(O.value);if(Q==null)return a&&M!=null&&n.setItem(O.value,$.write(M)),M;if(!S&&u){const F=$.read(Q);return typeof u=="function"?u(F,M):L==="object"&&!Array.isArray(F)?{...M,...F}:F}else return typeof Q!="string"?Q:$.read(Q)}function C(S){if(!(S&&S.storageArea!==n)){if(S&&S.key==null){y.value=M;return}if(!(S&&S.key!==O.value)){m();try{const Q=$.write(y.value);(S===void 0||(S==null?void 0:S.newValue)!==Q)&&(y.value=B(S))}catch(Q){p(Q)}finally{S?ht(h):h()}}}}function X(S){C(S.detail)}return y}function Xi(e={}){const{document:t=Fd}=e;if(!t)return ft("visible");const n=ft(t.visibilityState);return St(t,"visibilitychange",()=>{n.value=t.visibilityState},{passive:!0}),n}function ef(e,t,n={}){const{window:o=_t,...i}=n;let r;const s=Yi(()=>o&&"ResizeObserver"in o),l=()=>{r&&(r.disconnect(),r=void 0)},a=de(J(()=>{const c=pt(e);return Array.isArray(c)?c.map(d=>Ot(d)):[Ot(c)]}),c=>{if(l(),s.value&&o){r=new ResizeObserver(t);for(const d of c)d&&r.observe(d,i)}},{immediate:!0,flush:"post"}),u=()=>{l(),a()};return qi(u),{isSupported:s,stop:u}}function jl(e,t={width:0,height:0},n={}){const{window:o=_t,box:i="content-box"}=n,r=J(()=>{var d;return(d=Ot(e))===null||d===void 0||(d=d.namespaceURI)===null||d===void 0?void 0:d.includes("svg")}),s=ft(t.width),l=ft(t.height),{stop:a}=ef(e,([d])=>{const f=i==="border-box"?d.borderBoxSize:i==="content-box"?d.contentBoxSize:d.devicePixelContentBoxSize;if(o&&r.value){const p=Ot(e);if(p){const w=p.getBoundingClientRect();s.value=w.width,l.value=w.height}}else if(f){const p=eo(f);s.value=p.reduce((w,{inlineSize:y})=>w+y,0),l.value=p.reduce((w,{blockSize:y})=>w+y,0)}else s.value=d.contentRect.width,l.value=d.contentRect.height},n);Zi(()=>{const d=Ot(e);d&&(s.value="offsetWidth"in d?d.offsetWidth:t.width,l.value="offsetHeight"in d?d.offsetHeight:t.height)});const u=de(()=>Ot(e),d=>{s.value=d?t.width:0,l.value=d?t.height:0});function c(){a(),u()}return{width:s,height:l,stop:c}}function tf(e,t,n={}){const{root:o,rootMargin:i="0px",threshold:r=0,window:s=_t,immediate:l=!0}=n,a=Yi(()=>s&&"IntersectionObserver"in s),u=J(()=>eo(pt(e)).map(Ot).filter($d));let c=Tn;const d=ft(l),f=a.value?de(()=>[u.value,Ot(o),d.value],([w,y])=>{if(c(),!d.value||!w.length)return;const O=new IntersectionObserver(t,{root:Ot(y),rootMargin:i,threshold:r});w.forEach(M=>M&&O.observe(M)),c=()=>{O.disconnect(),c=Tn}},{immediate:l,flush:"post"}):Tn,p=()=>{c(),f(),d.value=!1};return qi(p),{isSupported:a,isActive:d,pause(){c(),d.value=!1},resume(){d.value=!0},stop:p}}function nf(e,t,n={}){const{window:o=_t}=n;return Qd(e,t,o==null?void 0:o.localStorage,n)}function hn(e={}){const{window:t=_t,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:o=Number.POSITIVE_INFINITY,listenOrientation:i=!0,includeScrollbar:r=!0,type:s="inner"}=e,l=ft(n),a=ft(o),u=()=>{if(t)if(s==="outer")l.value=t.outerWidth,a.value=t.outerHeight;else if(s==="visual"&&t.visualViewport){const{width:d,height:f,scale:p}=t.visualViewport;l.value=Math.round(d*p),a.value=Math.round(f*p)}else r?(l.value=t.innerWidth,a.value=t.innerHeight):(l.value=t.document.documentElement.clientWidth,a.value=t.document.documentElement.clientHeight)};u(),Zi(u);const c={passive:!0};return St("resize",u,c),t&&s==="visual"&&t.visualViewport&&St(t.visualViewport,"resize",u,c),i&&de(Kd("(orientation: portrait)"),()=>u()),{width:l,height:a}}class to{static register(t){this.handlers.push(t)}static unregister(t){const n=this.handlers.indexOf(t);n!==-1&&this.handlers.splice(n,1)}static trigger(){for(const t of this.handlers)if(t())return!0;return!1}static clear(){this.handlers=[]}}Pe(to,"handlers",[]);function Gi(e){je(()=>to.register(e)),Pt(()=>to.unregister(e))}const Bl=he({__name:"HelpScreen",props:{touchDevice:{type:Boolean}},emits:["hide"],setup(e,{emit:t}){const n=e,o=t,i=te(null),r=te([]);Gi(()=>(o("hide"),!0)),je(async()=>{const u=jl(i),c=mt(()=>{s({width:u.width.value,height:u.height.value})},50);c(),de(u.width,c),de(u.height,c)});function s(u){var f;const c=(f=i.value)==null?void 0:f.parentElement;if(!c)return;const d=Array.from(c.querySelectorAll("#controls [title], #top-controls [title], #bottom-controls [title]"));d.length&&(r.value=l(d,u))}function l(u,c){const d=[],f=[];let p=0,w=0;const y=50,O=25;u.forEach(h=>{var ee;const T=(ee=h.getAttribute("title"))==null?void 0:ee.trim(),H=h.getBoundingClientRect();if(!T||!H.height||!H.width)return;const W=Math.ceil((H.top-10)/y),U=Math.ceil((H.left-10)/y);f.push({isTour:!1,title:T,rect:H,fromX:U,toX:Math.max(U+1,Math.ceil((H.right+10)/y)),fromY:W,toY:Math.max(W+1,Math.ceil((H.bottom+10)/y))})}),f.forEach(h=>{for(let T=h.fromY;T<h.toY;T++){d[T]??(d[T]=[]);for(let H=h.fromX;H<h.toX;H++)d[T][H]=h;h.toY>p+1&&(p=h.toY-1),h.toX>w+1&&(w=h.toX-1)}});let M=w/2;f.forEach(h=>{h.isAlignRight=h.fromX>M});const L=(h,T)=>{d[T]??(d[T]=[]);const H=T>=h.toY;if(h.isTour)for(let W=h.fromX;W<h.toX;W++)delete d[h.fromY][W],h.fromY=T,h.toY=T+(H?1:-1),d[T][W]=h;else{const W=h.isAlignRight?h.fromX-3:h.fromX,U=W+3;h.helpItem={fromX:W,toX:U,fromY:T,toY:T+1,isTour:!0,isAlignRight:h.isAlignRight};for(let ee=W;ee<U;ee++)d[T][ee]=h.helpItem}},$=(h,T)=>{if(T>p||T<0)return!1;const H=T>=h.toY,W=d[T];if(!W)return L(h,T),!0;const U=W[h.fromX];if(U&&!U.isTour)return!1;if(U&&U.isTour)return $(U,H?T+1:T-1)?(L(h,T),!0):!1;if(!U){const ee=h.isAlignRight?-1:1;return W[h.fromX+ee]||W[h.fromX+ee*2]?$(h,H?T+1:T-1):(L(h,T),!0)}return!1};f.forEach(h=>{if(!$(h,h.toY)){if(h.isAlignRight){const T=d[h.fromY]??[];if(!T.slice(h.fromX-3,h.fromX).filter(Boolean).length){const W=h.fromX-3,U=h.fromX;h.helpItem={isTour:!0,isAlignRight:!0,fromX:W,toX:U,fromY:h.fromY,toY:h.toY};for(let ee=h.fromX-3;ee<h.fromX;ee++)T[ee]=h.helpItem;return}}$(h,h.fromY-1)}});const m=[];return f.forEach(h=>{const{title:T,helpItem:H,rect:W,isAlignRight:U,fromX:ee,fromY:B,toY:C}=h;if(!T||!H||!W)return;const X=H.fromY>=C,S=H.toY<=B;m.push({title:a(T),style:{top:X?`${W.bottom+(H.fromY-C)*y+O}px`:S?void 0:`${W.top+8}px`,bottom:S?`${c.height-W.top+(H.toY-B)*y+O}px`:void 0,left:U?void 0:`${W.left}px`,right:U?X?`${c.width-W.right}px`:`${c.width-W.right+W.width+O}px`:void 0},arrowStyle:{width:S||X?"2px":`${Math.abs(H.toX-ee)*y+O-5}px`,height:S||X?`${(X?H.fromY-C:B-H.toY)*y+O}px`:"2px",top:X?`${W.bottom}px`:S?void 0:`${W.top+20}px`,bottom:S?`${c.height-W.top}px`:void 0,left:U?void 0:`${W.left+W.width/2}px`,right:U?X?`${c.width-W.right+W.width/2}px`:`${c.width-W.right+W.width}px`:void 0}})}),m}function a(u){return n.touchDevice?u.split("(")[0].trim():u}return(u,c)=>(b(),I(ye,null,[c[1]||(c[1]=Z("div",{class:"fixed inset-0 bg-black bg-opacity-90"},null,-1)),Z("div",{ref_key:"root",ref:i,class:"fixed inset-0 z-20 overscroll-contain select-none",onClick:c[0]||(c[0]=Be(d=>o("hide"),["stop"]))},[(b(!0),I(ye,null,Xt(r.value,d=>(b(),I(ye,{key:d.title},[Z("div",{class:"absolute",style:Ce(d.style)},Fe(d.title),5),Z("div",{class:"absolute bg-stone-300 rounded-lg",style:Ce(d.arrowStyle)},null,4)],64))),128))],512)],64))}}),of=Object.freeze(Object.defineProperty({__proto__:null,default:Bl},Symbol.toStringTag,{value:"Module"}));function Mn(e,t){let n=null;return(...o)=>{n===null&&(n=setTimeout(()=>{n=null,e(...o)},t))}}const rf=he({__name:"ReaderTour",emits:["hide"],setup(e,{emit:t}){const n=t,o=te(null),i=te(0),r=te([]),s=J(()=>r.value[i.value]),l=Mn(a,500);je(()=>{const d=jl(o),f=mt(()=>u({width:d.width.value,height:d.height.value}),50);f(),de(d.width,f),de(d.height,f)});function a(){i.value>=r.value.length-1?n("hide"):i.value++}function u(d){const f=c();r.value=f.map(({rect:p,text:w})=>{const y=p.top<d.height-p.bottom,O=p.left<d.width-p.right;return{text:w,style:{left:`${p.left}px`,top:`${p.top}px`,width:`${p.width}px`,height:`${p.height}px`},textStyle:{left:O?`${p.left-12}px`:void 0,right:O?void 0:`${d.width-p.left}px`,top:y?`${p.bottom+12}px`:`${p.top+20}px`,textAlign:y?void 0:"right",transform:y?void 0:"translateY(-50%)"}}}),i.value>=r.value.length&&(i.value=r.value.length-1)}function c(){var p;const d=(p=o.value)==null?void 0:p.parentElement;if(!d)return[];const f=[];return d.querySelectorAll("[data-tour]").forEach(w=>{var M;const y=(M=w.getAttribute("data-tour"))==null?void 0:M.trim();if(!(y!=null&&y.length))return;const O=w.getBoundingClientRect();f.push({rect:O,text:y})}),f}return(d,f)=>{var p,w;return b(),I(ye,null,[Z("div",{class:ue(["fixed inset-0 bg-black bg-opacity-50 duration-500",{"opacity-0":!s.value,"opacity-100":!!s.value}])},null,2),Z("div",{ref_key:"root",ref:o,class:"tour",onClick:f[0]||(f[0]=Be((...y)=>Y(l)&&Y(l)(...y),["stop"]))},[s.value?(b(),I("div",{key:i.value,class:"tour__target",style:Ce(s.value.style)},null,4)):le("",!0),(b(),I("div",{key:i.value,class:"tour__text",style:Ce((p=s.value)==null?void 0:p.textStyle)},Fe(((w=s.value)==null?void 0:w.text)??""),5))],512)],64)}}}),sf=".tour{height:100%;left:0;overflow:hidden;position:fixed;top:0;width:100%;z-index:20}.tour__target{border-radius:9999px;border-width:2px;--tw-border-opacity:1;animation:tour-target-anim .5s forwards;border-color:rgb(120 113 108/var(--tw-border-opacity,1));box-shadow:0 0 0 99999px #000000e6}.tour__target,.tour__text{position:absolute}.tour__text{animation:tour-text-anim 1s forwards,tour-text-bounce .75s ease-in-out infinite alternate;max-width:320px;padding-left:12px;padding-right:12px;transition-duration:1s}@keyframes tour-target-anim{0%{transform:scale(3);--tw-border-opacity:0;opacity:0}to{transform:scale(1);--tw-border-opacity:1;opacity:.9}}@keyframes tour-text-anim{0%{opacity:0}to{opacity:1}}@keyframes tour-text-bounce{0%{margin-top:0}to{margin-top:.625}}",be=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n},Nl=be(rf,[["styles",[sf]]]),lf=Object.freeze(Object.defineProperty({__proto__:null,default:Nl},Symbol.toStringTag,{value:"Module"}));function af({touchDevice:e}){const t=te(!1);let n=0;return Fn("busy:touchDevice",e),Fn("setBusyState",o=>{n+=o?1:-1;const i=n>0;t.value!=i&&(t.value=i)}),J(()=>t.value)}function Yo(){const e=Ft("busy:touchDevice"),t=Ft("setBusyState");let n=!1;return Pt(()=>{n&&(t==null||t(!1))}),(o,{desktopOnly:i=!1}={})=>{i&&e||(n=o,t==null||t(o))}}function cf(e){Fn("hapticFeedback",e)}function Xo(){return Ft("hapticFeedback")}class uf{constructor(){Pe(this,"listeners");this.listeners=[],this.onKeyDown=this.onKeyDown.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.init()}init(){window.addEventListener("keydown",this.onKeyDown,{capture:!0}),window.addEventListener("keyup",this.onKeyUp,{capture:!0}),window.addEventListener("keypress",this.onKeyPress,{capture:!0})}dispose(){window.removeEventListener("keydown",this.onKeyDown,{capture:!0}),window.removeEventListener("keyup",this.onKeyUp,{capture:!0}),window.removeEventListener("keypress",this.onKeyPress,{capture:!0})}onKeyPress(t){t.stopImmediatePropagation(),t.stopPropagation()}onKeyDown(t){var n,o;t.stopImmediatePropagation(),t.stopPropagation();for(let i=0;i<this.listeners.length&&((o=(n=this.listeners[i]).onKeyDown)==null?void 0:o.call(n,t))!==!0;i++);}onKeyUp(t){var n,o;t.stopImmediatePropagation(),t.stopPropagation();for(let i=0;i<this.listeners.length&&((o=(n=this.listeners[i]).onKeyUp)==null?void 0:o.call(n,t))!==!0;i++);}addListener(t){this.listeners.push(t)}removeListener(t){const n=this.listeners.indexOf(t);n!==-1&&this.listeners.splice(n,1)}}function df(){const e=new uf;return Pt(()=>e.dispose()),Fn("keyController",e),e}function $t(e){const t=Ft("keyController");je(()=>t.addListener(e)),Pt(()=>t.removeListener(e))}function ff(e,t){const n=sessionStorage.getItem("tk:page:path");n!==location.pathname&&(sessionStorage.setItem("tk:page:path",location.pathname),n&&sessionStorage.removeItem("tk:page"));const o=te(t&&e>0?Math.max(0,e):+(sessionStorage.getItem("tk:page")??"0")||e);return J({get:()=>o.value,set:i=>{o.value=i,sessionStorage.setItem("tk:page",i+"")}})}function pf(){sessionStorage.removeItem("tk:page"),sessionStorage.removeItem("tk:page:path")}const hf=(e,t)=>{const n=+(e.getAttribute("data-ripple")??0);if(!n)return;const o=document.createElement("span");let i=1,r=.65;const s=setInterval(a,20);l();function l(){o.style.position="absolute",o.style.height="5px",o.style.width="5px",o.style.borderRadius="100%",o.style.backgroundColor="#f2f2f2",o.style.left=`${t.currentTarget.clientWidth/2}px`,o.style.top=`${t.currentTarget.clientHeight/2}px`,t.currentTarget.appendChild(o)}function a(){const u=+n||50;i<=u?(i++,r-=.65/u,o.style.transform=`scale(${i})`,o.style.opacity=`${r}`):(o.remove(),clearInterval(s))}},zt={mounted:(e,t)=>{e.style.position="relative",e.style.overflow="hidden",e.setAttribute("data-ripple",t.value),e.addEventListener("click",n=>hf(e,n))},updated:(e,t)=>{e.setAttribute("data-ripple",t.value)}},gf={class:"group-hover:bg-stone-100 group-hover:bg-opacity-20 transition-bg duration-200 rounđe-full p-2 w-full h-full inline-flex justify-center items-center gap-2 text-base"},Ji=he({inheritAttrs:!1,__name:"BaseButton",props:{disabled:{type:Boolean},href:{type:String},transparent:{type:Boolean},title:{type:String},enableHapticFeedback:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=e,o=t,i=Yo(),r=Xo();let s=!1;function l(){s||(s=!0,i(!0,{desktopOnly:!0}))}function a(){s&&(s=!1,i(!1,{desktopOnly:!0}))}function u(c){n.disabled?c.preventDefault():(o("click",c),n.enableHapticFeedback&&r())}return(c,d)=>Re((b(),ie(xs(e.href?"a":"button"),Sn({href:e.href,title:e.title},{class:["h-10 max-w-full max-h-full rounded-full flex-shrink-0 focus:outline-none outline-none",{"cursor-default opacity-60":e.disabled,"hover:text-stone-100 group duration-200":!e.disabled,"bg-black bg-opacity-50":!e.transparent,[`${c.$attrs.class??""}`]:!0}],onClick:Be(u,["stop"]),onMouseenter:l,onMouseleave:a}),{default:oe(()=>[Z("div",gf,[Se(c.$slots,"default")])]),_:3},16,["class"])),[[Y(zt),e.disabled?0:15]])}}),mf=Object.freeze(Object.defineProperty({__proto__:null,default:Ji},Symbol.toStringTag,{value:"Module"})),vf={},bf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function yf(e,t){return b(),I("svg",bf,[...t[0]||(t[0]=[Z("path",{fill:"currentColor",d:"M19 12.998h-6v6h-2v-6H5v-2h6v-6h2v6h6z"},null,-1)])])}const Vl=be(vf,[["render",yf]]),wf=Object.freeze(Object.defineProperty({__proto__:null,default:Vl},Symbol.toStringTag,{value:"Module"})),xf={class:"h-screen w-full flex justify-center items-center relative"},_f={key:0,class:"flex gap-6 p-6 duration-200"},Sf={key:0,class:"inline-block rounded-full relative w-28 h-12 overflow-hidden"},kf={key:0,class:"absolute bottom-0 left-0 right-0 flex justify-center pb-7 md:pb-6 lg:pb-4"},Cf={class:"flex justify-center items-center gap-1 pl-1 pr-2 h-full"},Qi=be(he({__name:"AutoNext",props:{hasNext:{type:Boolean},offlineMode:{type:Boolean},seconds:{type:Number},showAddButton:{type:Boolean}},emits:["next","hide","add-to-library","visibility-changed"],setup(e,{emit:t}){const n=e,o=t,i=te(null),r=te(!1),s=te(n.seconds),l=te(n.seconds<=0),a=te(n.seconds),u=Xo();je(()=>{let f;tf(i,p=>{const w=p.some(y=>y.isIntersecting);w!==r.value&&(r.value=w,o("visibility-changed",w),l.value=n.seconds<=0,s.value=n.seconds,a.value=n.seconds,f&&(clearInterval(f),f=void 0),!(!r.value||l.value)&&(f=setInterval(()=>{s.value-=1,s.value<=0&&(clearInterval(f),f=void 0,o("next"))},1e3)))},{rootMargin:"-108px 0px"}),Pt(()=>f&&clearInterval(f))});function c(){o("next"),u()}function d(){o("hide")}return(f,p)=>(b(),I("div",xf,[Z("div",{ref_key:"main",ref:i,class:"inline-flex text-base text-stone-300 select-none"},[A(Gn,{"enter-from-class":"opacity-0","leave-to-class":"opacity-0"},{default:oe(()=>[r.value?(b(),I("div",_f,[e.hasNext?(b(),I("div",Sf,[r.value?(b(),I("div",{key:0,class:"absolute left-0 top-0 bottom-0 h-full bg-stone-600 bg-opacity-50",style:Ce(l.value?{}:{animation:`auto-next ${a.value}s linear forwards`})},null,4)):le("",!0),Re((b(),I("button",{class:"bg-transparent rounded-full h-full w-full border-solid border-stone-600 border-2 hover:bg-stone-300 hover:bg-opacity-10 totalDuration-200",onClick:Be(c,["stop"])},[Wt(Fe(l.value?"Next":`Next in ${s.value}`),1)])),[[Y(zt)]])])):le("",!0),Re((b(),I("button",{class:"rounded-full px-6 h-12 bg-transparent border-solid border-stone-600 border-2 hover:bg-stone-300 hover:bg-opacity-10 totalDuration-200",onClick:Be(d,["stop"])},[Wt(Fe(e.offlineMode?"Close":"Hide"),1)])),[[Y(zt)]])])):le("",!0)]),_:1})],512),e.showAddButton?(b(),I("div",kf,[A(Ji,{class:"bg-primary w-min !h-9 !bg-opacity-100",onClick:p[0]||(p[0]=()=>o("add-to-library"))},{default:oe(()=>[Z("div",Cf,[A(Vl,{class:"flex-shrink-0 w-auto"}),p[1]||(p[1]=Z("span",{class:"text-sm text-stone-50"},"Add to library",-1))])]),_:1})])):le("",!0)]))}}),[["styles",[".animate-auto-next{animation:auto-next 5s linear forwards}@keyframes auto-next{0%{width:0}to{width:100%}}"]]]),Tf=Object.freeze(Object.defineProperty({__proto__:null,default:Qi},Symbol.toStringTag,{value:"Module"})),Ge=he({inheritAttrs:!1,__name:"ButtonIcon",props:{disabled:{type:Boolean},href:{type:String},title:{type:String},transparent:{type:Boolean},enableHapticFeedback:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=t;return(o,i)=>(b(),ie(Ji,{class:ue(["w-10",o.$attrs.class]),disabled:e.disabled,href:e.href,title:e.title,transparent:e.transparent,"enable-haptic-feedback":e.enableHapticFeedback,onClick:i[0]||(i[0]=r=>n("click",r))},{default:oe(()=>[Se(o.$slots,"default")]),_:3},8,["class","disabled","href","title","transparent","enable-haptic-feedback"]))}}),Mf=Object.freeze(Object.defineProperty({__proto__:null,default:Ge},Symbol.toStringTag,{value:"Module"})),Pf={},Ef={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function If(e,t){return b(),I("svg",Ef,[...t[0]||(t[0]=[Z("path",{fill:"currentColor",d:"m10.875 19.3l-6.6-6.6q-.15-.15-.213-.325T4 12q0-.2.063-.375t.212-.325l6.6-6.6q.275-.275.688-.287t.712.287q.3.275.313.688T12.3 6.1L7.4 11h11.175q.425 0 .713.288t.287.712q0 .425-.287.713t-.713.287H7.4l4.9 4.9q.275.275.288.7t-.288.7q-.275.3-.7.3t-.725-.3Z"},null,-1)])])}const Rl=be(Pf,[["render",If]]),Of=Object.freeze(Object.defineProperty({__proto__:null,default:Rl},Symbol.toStringTag,{value:"Module"})),er=he({__name:"ButtonBack",props:{offlineMode:{type:Boolean},raw:{type:null},transparent:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=e,o=t;function i(r){n.offlineMode&&(r.preventDefault(),o("click"))}return(r,s)=>{var l;return b(),ie(Ge,{href:e.offlineMode||!e.raw?"#":e.raw.title.url,title:`Back to ${((l=e.raw)==null?void 0:l.contentType)===Y(Kt).novel?"novel":"manga"}`,transparent:e.transparent,"enable-haptic-feedback":"",onClick:i},{default:oe(()=>[A(Rl)]),_:1},8,["href","title","transparent"])}}}),$f=Object.freeze(Object.defineProperty({__proto__:null,default:er},Symbol.toStringTag,{value:"Module"})),zf={},Df={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Af(e,t){return b(),I("svg",Df,[...t[0]||(t[0]=[Z("path",{fill:"currentColor",d:"M17.825 8.575q-.2 0-.375-.062t-.325-.213L15.7 6.875q-.3-.3-.3-.712t.3-.688q.275-.3.7-.3t.7.275l.725.725l2.825-2.85q.3-.3.7-.3t.725.3q.275.3.275.725t-.275.7l-3.55 3.55q-.15.15-.325.213t-.375.062ZM6.4 20.4q-.5.2-.95-.087T5 19.475V5q0-.825.588-1.413T7 3h7q-.5.75-.75 1.438T13 6q0 1.8 1.137 3.175T17 10.9q.575.075 1 .075t1-.075v8.575q0 .55-.45.838t-.95.087L12 18l-5.6 2.4Z"},null,-1)])])}const Hl=be(zf,[["render",Af]]),Lf=Object.freeze(Object.defineProperty({__proto__:null,default:Hl},Symbol.toStringTag,{value:"Module"})),jf={},Bf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Nf(e,t){return b(),I("svg",Bf,[...t[0]||(t[0]=[Z("path",{fill:"currentColor",d:"M6.4 20.4q-.5.2-.95-.087T5 19.475V5q0-.825.588-1.413T7 3h6v2H7v12.95l5-2.15l5 2.15V11h2v8.475q0 .55-.45.838t-.95.087L12 18l-5.6 2.4ZM7 5h6h-6Zm11 4q-.425 0-.713-.287T17 8V7h-1q-.425 0-.713-.288T15 6q0-.425.288-.713T16 5h1V4q0-.425.288-.713T18 3q.425 0 .713.288T19 4v1h1q.425 0 .713.288T21 6q0 .425-.288.713T20 7h-1v1q0 .425-.288.713T18 9Z"},null,-1)])])}const Fl=be(jf,[["render",Nf]]),Vf=Object.freeze(Object.defineProperty({__proto__:null,default:Fl},Symbol.toStringTag,{value:"Module"})),tr=he({__name:"ButtonEntry",props:{entryId:{type:null},transparent:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=t;$t({onKeyUp:i=>{i.key==="t"&&!i.metaKey&&!i.ctrlKey&&n("click")}});function o(){n("click")}return(i,r)=>(b(),ie(Ge,{transparent:e.transparent,title:e.entryId?"View entry (T)":"Add to library (T)","data-tour":"Prress here to add to your library",onClick:o},{default:oe(()=>[e.entryId?(b(),ie(Hl,{key:0})):(b(),ie(Fl,{key:1}))]),_:1},8,["transparent","title"]))}}),Rf=Object.freeze(Object.defineProperty({__proto__:null,default:tr},Symbol.toStringTag,{value:"Module"})),Hf={},Ff={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function Wf(e,t){return b(),I("svg",Ff,[...t[0]||(t[0]=[Z("path",{fill:"currentColor",d:"M16.5 16V8l-4 4l4 4ZM5 21q-.825 0-1.413-.588T3 19V5q0-.825.588-1.413T5 3h14q.825 0 1.413.588T21 5v14q0 .825-.588 1.413T19 21H5Zm3-2V5H5v14h3Zm2 0h9V5h-9v14Zm-2 0H5h3Z"},null,-1)])])}const Wl=be(Hf,[["render",Wf]]),Uf=Object.freeze(Object.defineProperty({__proto__:null,default:Wl},Symbol.toStringTag,{value:"Module"})),Go=he({inheritAttrs:!1,__name:"ButtonHide",props:{transparent:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=t;return(o,i)=>(b(),ie(Ge,{title:"Hide reader","data-tour":"You have entered reader mode, press here to return to the original page",class:ue(o.$attrs.class),transparent:e.transparent,onClick:i[0]||(i[0]=()=>n("click"))},{default:oe(()=>[A(Wl)]),_:1},8,["class","transparent"]))}}),qf=Object.freeze(Object.defineProperty({__proto__:null,default:Go},Symbol.toStringTag,{value:"Module"})),Kf={},Zf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function Yf(e,t){return b(),I("svg",Zf,[...t[0]||(t[0]=[Z("path",{d:"M199.9 416h-63.8c-4.5 0-8.1-3.6-8.1-8V104c0-4.4 3.6-8 8.1-8h63.8c4.5 0 8.1 3.6 8.1 8v304c0 4.4-3.6 8-8.1 8z",fill:"currentColor"},null,-1),Z("path",{d:"M375.9 416h-63.8c-4.5 0-8.1-3.6-8.1-8V104c0-4.4 3.6-8 8.1-8h63.8c4.5 0 8.1 3.6 8.1 8v304c0 4.4-3.6 8-8.1 8z",fill:"currentColor"},null,-1)])])}const nr=be(Kf,[["render",Yf]]),Xf=Object.freeze(Object.defineProperty({__proto__:null,default:nr},Symbol.toStringTag,{value:"Module"})),Gf={},Jf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function Qf(e,t){return b(),I("svg",Jf,[...t[0]||(t[0]=[Z("path",{d:"M128 104.3v303.4c0 6.4 6.5 10.4 11.7 7.2l240.5-151.7c5.1-3.2 5.1-11.1 0-14.3L139.7 97.2c-5.2-3.3-11.7.7-11.7 7.1z",fill:"currentColor"},null,-1)])])}const or=be(Gf,[["render",Qf]]),ep=Object.freeze(Object.defineProperty({__proto__:null,default:or},Symbol.toStringTag,{value:"Module"})),ir=he({inheritAttrs:!1,__name:"ButtonPlay",props:{tourMessage:{type:String},playing:{type:Boolean},disabled:{type:Boolean},transparent:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=e,o=t;return $t({onKeyDown(i){!n.disabled&&i.key===" "&&(i.preventDefault(),o("click"))}}),(i,r)=>(b(),ie(Ge,{transparent:e.transparent,class:ue(i.$attrs.class),"data-tour":e.tourMessage,title:`${e.playing?"Pause":"Play"} (Space)`,disabled:e.disabled,onClick:r[0]||(r[0]=()=>o("click"))},{default:oe(()=>[e.playing?(b(),ie(nr,{key:0})):(b(),ie(or,{key:1}))]),_:1},8,["transparent","class","data-tour","title","disabled"]))}}),tp=Object.freeze(Object.defineProperty({__proto__:null,default:ir},Symbol.toStringTag,{value:"Module"})),np={},op={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"};function ip(e,t){return b(),I("svg",op,[...t[0]||(t[0]=[Z("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[Z("circle",{cx:"14",cy:"14",r:"12"}),Z("path",{d:"m23 23l7 7M9 12V9h3m4 0h3v3M9 16v3h3m7-3v3h-3"})],-1)])])}const Ul=be(np,[["render",ip]]),rp=Object.freeze(Object.defineProperty({__proto__:null,default:Ul},Symbol.toStringTag,{value:"Module"})),sp={class:"block w-4 h-4"},lp={class:"w-12"},ql=he({__name:"ButtonResetZoom",props:{zoom:{type:Number}},emits:["click"],setup(e,{emit:t}){const n=t;function o(i){n("click",i)}return(i,r)=>(b(),I("button",{class:"h-9 rounded-full inline-flex justify-between items-center bg-black bg-opacity-50 gap-1 py-2 px-3 pointer-events-auto hover:bg-stone-900 hover:bg-opacity-50 duration-200",title:"Reset zoom",onClick:Be(o,["stop"])},[Z("div",sp,[A(Ul)]),Z("div",lp,Fe(Math.ceil(e.zoom*100))+"%",1)]))}}),ap=Object.freeze(Object.defineProperty({__proto__:null,default:ql},Symbol.toStringTag,{value:"Module"})),cp={},up={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 36 36"};function dp(e,t){return b(),I("svg",up,[...t[0]||(t[0]=[Z("path",{fill:"currentColor",d:"m32.57 15.72l-3.35-1a11.65 11.65 0 0 0-.95-2.33l1.64-3.07a.61.61 0 0 0-.11-.72l-2.39-2.4a.61.61 0 0 0-.72-.11l-3.05 1.63a11.62 11.62 0 0 0-2.36-1l-1-3.31a.61.61 0 0 0-.59-.41h-3.38a.61.61 0 0 0-.58.43l-1 3.3a11.63 11.63 0 0 0-2.38 1l-3-1.62a.61.61 0 0 0-.72.11L6.2 8.59a.61.61 0 0 0-.11.72l1.62 3a11.63 11.63 0 0 0-1 2.37l-3.31 1a.61.61 0 0 0-.43.58v3.38a.61.61 0 0 0 .43.58l3.33 1a11.62 11.62 0 0 0 1 2.33l-1.64 3.14a.61.61 0 0 0 .11.72l2.39 2.39a.61.61 0 0 0 .72.11l3.09-1.65a11.65 11.65 0 0 0 2.3.94l1 3.37a.61.61 0 0 0 .58.43h3.38a.61.61 0 0 0 .58-.43l1-3.38a11.63 11.63 0 0 0 2.28-.94l3.11 1.66a.61.61 0 0 0 .72-.11l2.39-2.39a.61.61 0 0 0 .11-.72l-1.66-3.1a11.63 11.63 0 0 0 .95-2.29l3.37-1a.61.61 0 0 0 .43-.58v-3.41a.61.61 0 0 0-.37-.59ZM18 23.5a5.5 5.5 0 1 1 5.5-5.5a5.5 5.5 0 0 1-5.5 5.5Z",class:"clr-i-solid clr-i-solid-path-1"},null,-1),Z("path",{fill:"none",d:"M0 0h36v36H0z"},null,-1)])])}const Kl=be(cp,[["render",dp]]),fp=Object.freeze(Object.defineProperty({__proto__:null,default:Kl},Symbol.toStringTag,{value:"Module"})),rr=he({__name:"ButtonSettings",props:{disabled:{type:Boolean},transparent:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=t;return $t({onKeyUp:o=>{o.key==="s"&&!o.metaKey&&!o.ctrlKey&&n("click")}}),(o,i)=>(b(),ie(Ge,{transparent:e.transparent,title:"Reader preferences (S)",disabled:e.disabled,onClick:i[0]||(i[0]=()=>n("click"))},{default:oe(()=>[A(Kl)]),_:1},8,["transparent","disabled"]))}}),pp=Object.freeze(Object.defineProperty({__proto__:null,default:rr},Symbol.toStringTag,{value:"Module"})),hp={},gp={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function mp(e,t){return b(),I("svg",gp,[...t[0]||(t[0]=[Z("path",{fill:"currentColor",d:"M4 4h6v2H6v4H4V4Zm10 0h6v6h-2V6h-4V4ZM6 14v4h4v2H4v-6h2Zm14 0v6h-6v-2h4v-4h2Z"},null,-1)])])}const Zl=be(hp,[["render",mp]]),vp=Object.freeze(Object.defineProperty({__proto__:null,default:Zl},Symbol.toStringTag,{value:"Module"})),bp={},yp={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function wp(e,t){return b(),I("svg",yp,[...t[0]||(t[0]=[Z("path",{fill:"currentColor",d:"M14 20v-6h6v2h-4v4h-2Zm-6 0v-4H4v-2h6v6H8Zm12-10h-6V4h2v4h4v2Zm-10 0H4V8h4V4h2v6Z"},null,-1)])])}const Yl=be(bp,[["render",wp]]),xp=Object.freeze(Object.defineProperty({__proto__:null,default:Yl},Symbol.toStringTag,{value:"Module"})),sr=he({__name:"ButtonWebFullScreen",props:{transparent:{type:Boolean}},emits:["request-full-screen"],setup(e,{emit:t}){const n=t,o=te(!1);$t({onKeyUp:r=>{r.key==="f"&&!r.metaKey&&!r.ctrlKey&&i()}}),St("fullscreenchange",()=>{o.value=!!document.fullscreenElement});function i(){document.fullscreenElement?document.exitFullscreen():n("request-full-screen")}return(r,s)=>(b(),ie(Ge,{transparent:e.transparent,title:`${o.value?"Exit":"Enter"} fullscreen (F)`,onClick:i},{default:oe(()=>[o.value?(b(),ie(Yl,{key:0})):(b(),ie(Zl,{key:1}))]),_:1},8,["transparent","title"]))}}),_p=Object.freeze(Object.defineProperty({__proto__:null,default:sr},Symbol.toStringTag,{value:"Module"})),Sp=["aria-hidden"],kp=["onClick"],Xl=he({__name:"DropdownMenu",props:Ye({items:{type:Array},enableHapticFeedback:{type:Boolean}},{modelValue:{type:Number,required:!1},modelModifiers:{}}),emits:Ye(["select"],["update:modelValue"]),setup(e,{emit:t}){const n=e,o=t,i=lt(e,"modelValue"),r=te(null),s=te(!1),l=te(!1),a=te(!1),u=te(!1),c={mounted:m=>{var h;i.value&&((h=m.children[i.value])==null||h.scrollIntoView({behavior:"auto",block:"center",inline:"center"}))}};$t({onKeyDown:O}),Gi(()=>{const m=s.value;return m&&(s.value=!1),m});const d=Yo(),f=Xo();async function p(m){s.value=m??!s.value,d(s.value),s.value?(w(),L(r.value)):setTimeout($,250)}function w(){const m=r.value;if(m){const h=m.getBoundingClientRect(),T=h.x+h.width/2;l.value=h.y>window.innerHeight/2,a.value=T<window.innerWidth/3,u.value=T>window.innerWidth/3*2}}function y(m,h){p(),m!=i.value&&(i.value=m,o("select",m,h),n.enableHapticFeedback&&f())}function O(m){s.value&&m.key==="Escape"&&(p(),m.preventDefault())}let M=[];function L(m){const h=window.getComputedStyle(m).zIndex,T=m.style.zIndex;(!h||!(+h>0))&&((!m.parentElement||m.parentElement.childElementCount>1)&&(m.style.zIndex="1",M.push({el:m,zIndex:T})),m.parentElement&&L(m.parentElement))}function $(){M.forEach(({el:m,zIndex:h})=>{m.style.zIndex=h??""}),M=[]}return(m,h)=>(b(),I("div",{ref_key:"root",ref:r,class:"select-none relative inline-flex"},[s.value?(b(),I("div",{key:0,class:"fixed inset-0 bg-transparent",onClick:h[0]||(h[0]=()=>p())})):le("",!0),e.items.length?(b(),ie(Gn,{key:1,"enter-from-class":"scale-y-90 opacity-0 pointer-events-none","leave-to-class":"scale-y-90 opacity-0 pointer-events-none"},{default:oe(()=>[s.value?Re((b(),I("ul",{key:0,ref:"list","aria-hidden":!s.value,class:ue(["scrollbar-sm duration-150 delay-50 absolute w-40 max-h-[70vh] list-none bg-stone-800 bg-opacity-80 backdrop-blur-md rounded-lg overflow-auto",{"origin-bottom bottom-full -translate-y-1.5":l.value,"origin-top top-full translate-y-1.5":!l.value,"left-1/2 -ml-20 text-center":!a.value&&!u.value,"right-0 text-right":u.value}]),onWheelPassive:h[1]||(h[1]=Be(()=>{},["stop"])),onTouchmove:h[2]||(h[2]=Be(()=>{},["stop"]))},[(b(!0),I(ye,null,Xt(e.items,(T,H)=>Re((b(),I("li",{key:H,tabindex:"-1",class:ue(["h-10 px-4 last:border-b-transparent cursor-pointer hover:bg-stone-100 hover:bg-opacity-10 duration-100",{"text-textPrimary":H===i.value}]),onClick:W=>y(H,W)},[Z("div",{class:ue(["h-full py-2",{"border-t-[1px] border-solid border-stone-400 border-opacity-30":H>0}])},[Se(m.$slots,"item",{item:T},()=>[Wt(Fe(T),1)])],2)],10,kp)),[[Y(zt),30]])),128))],42,Sp)),[[c]]):le("",!0)]),_:3})):le("",!0),Se(m.$slots,"default",{toggle:p,isOpen:s.value,isAlignTop:l.value})],512))}}),Cp=Object.freeze(Object.defineProperty({__proto__:null,default:Xl},Symbol.toStringTag,{value:"Module"})),Tp={},Mp={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Pp(e,t){return b(),I("svg",Mp,[...t[0]||(t[0]=[Au('<circle cx="18" cy="12" r="0" fill="currentColor"><animate attributeName="r" begin=".67" calcMode="spline" dur="1.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"></animate></circle><circle cx="12" cy="12" r="0" fill="currentColor"><animate attributeName="r" begin=".33" calcMode="spline" dur="1.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"></animate></circle><circle cx="6" cy="12" r="0" fill="currentColor"><animate attributeName="r" begin="0" calcMode="spline" dur="1.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"></animate></circle>',3)])])}const Gl=be(Tp,[["render",Pp]]),Ep=Object.freeze(Object.defineProperty({__proto__:null,default:Gl},Symbol.toStringTag,{value:"Module"})),Ip={},Op={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function $p(e,t){return b(),I("svg",Op,[...t[0]||(t[0]=[Z("path",{fill:"currentColor",d:"m7 10l5 5l5-5z"},null,-1)])])}const Jl=be(Ip,[["render",$p]]),zp=Object.freeze(Object.defineProperty({__proto__:null,default:Jl},Symbol.toStringTag,{value:"Module"})),Dp=["onClick"],Ap={class:"inline-flex items-center justify-center w-full h-full px-4 rounded-full group-hover:bg-stone-100 group-hover:bg-opacity-20 duration-200"},Lp={class:"whitespace-nowrap"},lr=he({inheritAttrs:!1,__name:"ButtonDropdown",props:Ye({label:{type:String},title:{type:String},items:{type:Array},disabled:{type:Boolean},canLoadItems:{type:Boolean},loadItems:{type:Function},enableHapticFeedback:{type:Boolean},transparent:{type:Boolean}},{modelValue:{type:Number,required:!0},modelModifiers:{}}),emits:Ye(["select"],["update:modelValue"]),setup(e,{emit:t}){const n=e,o=t,i=lt(e,"modelValue"),r=te(!1),s=Yo();async function l(f,p){if(!n.items.length&&(f||await a(),!n.items.length)){p(!1);return}p()}async function a(){r.value||n.items.length||!n.canLoadItems||!n.loadItems||(r.value=!0,await n.loadItems(),r.value=!1)}let u=!1;function c(){u||(u=!0,s(!0,{desktopOnly:!0}))}function d(){u&&(u=!1,s(!1,{desktopOnly:!0}))}return(f,p)=>(b(),ie(Xl,{modelValue:i.value,"onUpdate:modelValue":p[0]||(p[0]=w=>i.value=w),items:e.items,class:ue(f.$attrs.class),"enable-haptic-feedback":e.enableHapticFeedback,onSelect:p[1]||(p[1]=(w,y)=>o("select",w,y))},Ii({default:oe(({toggle:w,isOpen:y,isAlignTop:O})=>[Re((b(),I("button",Sn({type:"button",tabindex:"-1",class:["w-full h-10 max-h-full rounded-full group duration-100 transition-bg",{"pointer-events-none opacity-60":e.disabled||r.value,"bg-black bg-opacity-50":!e.transparent,"bg-transparent":e.transparent}]},e.title?{title:e.title}:{},{onClick:Be(()=>l(y,w),["stop"]),onMouseenter:c,onMouseleave:d}),[Z("div",Ap,[Z("span",Lp,Fe(e.label),1),e.items.length||e.canLoadItems?(b(),I("span",{key:0,class:ue(["w-4 h-4 flex ml-1 -mr-3 flex-shrink-0",{"rotate-180":O}]),"aria-hidden":"true"},[r.value?(b(),ie(Gl,{key:0})):(b(),ie(Jl,{key:1}))],2)):le("",!0)])],16,Dp)),[[Y(zt),30]])]),_:2},[f.$slots.item?{name:"item",fn:oe(({item:w})=>[Se(f.$slots,"item",{item:w})]),key:"0"}:void 0]),1032,["modelValue","items","class","enable-haptic-feedback"]))}}),jp=Object.freeze(Object.defineProperty({__proto__:null,default:lr},Symbol.toStringTag,{value:"Module"})),Bp={},Np={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Vp(e,t){return b(),I("svg",Np,[...t[0]||(t[0]=[Z("path",{fill:"currentColor",d:"M15.41 7.41L14 6l-6 6l6 6l1.41-1.41L10.83 12z"},null,-1)])])}const Ql=be(Bp,[["render",Vp]]),Rp=Object.freeze(Object.defineProperty({__proto__:null,default:Ql},Symbol.toStringTag,{value:"Module"})),Hp={},Fp={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Wp(e,t){return b(),I("svg",Fp,[...t[0]||(t[0]=[Z("path",{fill:"currentColor",d:"M10 6L8.59 7.41L13.17 12l-4.58 4.59L10 18l6-6z"},null,-1)])])}const ea=be(Hp,[["render",Wp]]),Up=Object.freeze(Object.defineProperty({__proto__:null,default:ea},Symbol.toStringTag,{value:"Module"})),qp={key:0,class:"ml-auto inline-flex gap-[1px] scale-95 origin-right"},ar=he({__name:"ChapterNav",props:{data:{type:Object},chapterSpec:{type:Object},touchDevice:{type:Boolean},rtl:{type:Boolean},transparent:{type:Boolean}},emits:["getHiddenChapters","prev","next"],setup(e,{emit:t}){const n=e,o=t;async function i(){const c=n.chapterSpec;if(!c)return;const{trigger:d,sel:f,label:p}=c;if(d&&(f===void 0||!p)){await r(d);return}o("getHiddenChapters"),await en(50,50,()=>n.data.chapters.length?!0:void 0)}async function r(c){const d=document.querySelector(c);d&&(d instanceof HTMLDialogElement?d.showModal():d.click())}function s(c,d){var f,p,w;(w=(p=(f=n.data)==null?void 0:f.chapters)==null?void 0:p[c])==null||w.select(u(d))}function l(c){n.rtl?o("next",u(c)):o("prev",u(c))}function a(c){n.rtl?o("prev",u(c)):o("next",u(c))}function u(c){return!n.touchDevice&&(c.ctrlKey||c.metaKey)}return(c,d)=>{var f;return b(),I(ye,null,[A(lr,{modelValue:e.data.activeIndex,label:e.data.activeLabel,title:"Select chapter",transparent:e.transparent,items:e.data.chapters,"can-load-items":!!((f=e.chapterSpec)!=null&&f.trigger),"load-items":i,"enable-haptic-feedback":"",onSelect:s},{item:oe(({item:p})=>[Wt(Fe(p.label),1)]),_:1},8,["modelValue","label","transparent","items","can-load-items"]),e.data.next||e.data.prev?(b(),I("div",qp,[A(Ge,{title:`${e.rtl?"Next":"Prev"} chapter (←)`,disabled:e.rtl?!e.data.next:!e.data.prev,transparent:e.transparent,class:"!rounded-r-none","enable-haptic-feedback":"",onClick:l},{default:oe(()=>[A(Ql)]),_:1},8,["title","disabled","transparent"]),A(Ge,{title:`${e.rtl?"Prev":"Next"} chapter (→)`,disabled:e.rtl?!e.data.prev:!e.data.next,transparent:e.transparent,class:"!rounded-l-none","enable-haptic-feedback":"",onClick:a},{default:oe(()=>[A(ea)]),_:1},8,["title","disabled","transparent"])])):le("",!0)],64)}}}),Kp=Object.freeze(Object.defineProperty({__proto__:null,default:ar},Symbol.toStringTag,{value:"Module"})),Zp=["min","max","step"],Yp={class:"flex-shrink-0 w-12 inline-block text-right"},tn=be(he({__name:"InputPercentage",props:Ye({min:{type:Number},max:{type:Number},step:{type:Number},format:{type:Function}},{modelValue:{type:Number,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=lt(e,"modelValue"),n=J({get(){return t.value},set(o){t.value=+o}});return(o,i)=>{var r;return b(),I("div",{class:"flex items-center gap-3 pl-1",style:Ce({"--percentage":`${(n.value-e.min)/(e.max-e.min)*100}%`})},[Re(Z("input",{"onUpdate:modelValue":i[0]||(i[0]=s=>n.value=s),type:"range",min:e.min,max:e.max,step:e.step??1,class:"flex-grow",onTouchmove:i[1]||(i[1]=Be(()=>{},["stop"]))},null,40,Zp),[[yd,n.value]]),Z("span",Yp,Fe(((r=e.format)==null?void 0:r.call(e,t.value))??t.value),1)],4)}}}),[["styles",["input[type=range]{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:linear-gradient(to right,#fb8252 var(--percentage),#5a5552 var(--percentage));border-radius:9999px;border-style:none;cursor:pointer;height:4px;opacity:.9;pointer-events:none;--tw-bg-opacity:1;background-color:rgb(251 130 82/var(--tw-bg-opacity,1));outline:2px solid transparent;outline-offset:2px}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none!important;border-radius:9999px;border-style:solid;border-width:2px;cursor:pointer;height:24px;pointer-events:auto;width:24px;--tw-border-opacity:1;border-color:rgb(251 130 82/var(--tw-border-opacity,1));--tw-bg-opacity:1;background-color:rgb(251 130 82/var(--tw-bg-opacity,1));transition-duration:.2s}input[type=range]:hover{opacity:1}"]]]),Xp=Object.freeze(Object.defineProperty({__proto__:null,default:tn},Symbol.toStringTag,{value:"Module"})),Gp={ref:"root",class:"flex text-sm flex-wrap gap-2 leading-none"},Jp=["onClick","onKeyup"],vt=he({__name:"InputSelect",props:Ye({items:{type:Array}},{modelValue:{type:Number,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=lt(e,"modelValue");function o(i){i!==n.value&&(n.value=i)}return(i,r)=>(b(),I("div",Gp,[(b(!0),I(ye,null,Xt(t.items,(s,l)=>Re((b(),I("div",{key:l,tabindex:"0",class:ue(["inline-flex justify-center items-center rounded-full px-3 py-1.5 cursor-pointer z-10 whitespace-nowrap flex-shrink-0 focus:outline-primary hover:bg-opacity-80 duration-200",{"bg-primary":l==n.value,"bg-stone-600 bg-opacity-50":l!=n.value}]),onClick:()=>o(l),onKeyup:[qo(()=>o(l),["enter"]),qo(()=>o(l),["space"])]},[Wt(Fe(s),1)],42,Jp)),[[Y(zt),30]])),128))],512))}}),Qp=Object.freeze(Object.defineProperty({__proto__:null,default:vt},Symbol.toStringTag,{value:"Module"})),eh={class:"flex w-full items-center justify-between cursor-pointer mb-5 last:mb-0"},th={class:"text-sm py-1"},nh={class:"switcher p-1"},cr=be(he({__name:"InputSwitcher",props:Ye({label:{type:String}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=lt(e,"modelValue");return(n,o)=>(b(),I("label",eh,[Z("span",th,Fe(e.label),1),Z("div",nh,[Re(Z("input",{"onUpdate:modelValue":o[0]||(o[0]=i=>t.value=i),type:"checkbox"},null,512),[[wd,t.value]]),o[1]||(o[1]=Z("span",null,null,-1))])]))}}),[["styles",['.switcher{height:24px;position:relative;width:40px}.switcher input{height:0;opacity:0;width:0}.switcher input:checked+span{border-width:1px;--tw-border-opacity:1;border-color:rgb(184 92 56/var(--tw-border-opacity,1));--tw-bg-opacity:1;background-color:rgb(184 92 56/var(--tw-bg-opacity,1))}.switcher input:checked+span:before{bottom:2px;height:18px;left:17.2px;width:18px}.switcher span{border-radius:9999px;border-width:2px;top:0;right:0;bottom:0;left:0;--tw-border-opacity:1;background-color:transparent;border-color:rgb(231 229 228/var(--tw-border-opacity,1))}.switcher span,.switcher span:before{position:absolute;transition-duration:.3s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.switcher span:before{border-radius:9999px;bottom:4px;content:"";height:12px;left:4px;width:12px;--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}']]]),oh=Object.freeze(Object.defineProperty({__proto__:null,default:cr},Symbol.toStringTag,{value:"Module"})),ih={class:"flex-grow mb-5 last:mb-0"},Le=he({__name:"TableField",props:{label:{type:String},disabled:{type:Boolean}},setup(e){return(t,n)=>(b(),I(ye,null,[Z("div",{class:ue(["flex-shrink-0 mb-2 whitespace-nowrap text-sm",{"opacity-50":e.disabled}])},Fe(e.label),3),Z("div",ih,[Se(t.$slots,"default")])],64))}}),rh=Object.freeze(Object.defineProperty({__proto__:null,default:Le},Symbol.toStringTag,{value:"Module"})),ta=he({__name:"FieldContrast",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=lt(e,"modelValue"),n=J({get(){return Math.round(t.value*100)},set(o){t.value=Math.round(o)/100}});return(o,i)=>(b(),ie(Le,{label:"Contrast"},{default:oe(()=>[A(tn,{modelValue:n.value,"onUpdate:modelValue":i[0]||(i[0]=r=>n.value=r),min:20,max:100,format:r=>`${r}%`},null,8,["modelValue","format"])]),_:1}))}}),sh=Object.freeze(Object.defineProperty({__proto__:null,default:ta},Symbol.toStringTag,{value:"Module"})),lh={},ah={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function ch(e,t){return b(),I("svg",ah,[...t[0]||(t[0]=[Z("path",{d:"M480 358.856V153.143C480 130.512 461.674 112 439.272 112H72.728C50.326 112 32 130.512 32 153.143v205.713C32 381.488 50.326 400 72.728 400h366.545C461.674 400 480 381.488 480 358.856zM112 364V148h288v216H112z",fill:"currentColor"},null,-1)])])}const na=be(lh,[["render",ch]]),uh=Object.freeze(Object.defineProperty({__proto__:null,default:na},Symbol.toStringTag,{value:"Module"})),dh={},fh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function ph(e,t){return b(),I("svg",fh,[...t[0]||(t[0]=[Z("path",{d:"M358.856 32H153.143C130.512 32 112 50.326 112 72.728v366.545C112 461.674 130.512 480 153.143 480h205.713C381.488 480 400 461.674 400 439.272V72.728C400 50.326 381.488 32 358.856 32zM364 400H148V112h216v288z",fill:"currentColor"},null,-1)])])}const oa=be(dh,[["render",ph]]),hh=Object.freeze(Object.defineProperty({__proto__:null,default:oa},Symbol.toStringTag,{value:"Module"})),ur=he({inheritAttrs:!1,__name:"ButtonOutline",emits:["click"],setup(e,{emit:t}){const n=t,o=Xo();function i(){o(),n("click")}return(r,s)=>Re((b(),I("button",{class:ue([r.$attrs.class??"","flex focus:outline-none outline-none rounded-full h-10 justify-center items-center border border-solid border-stone-600 text-stone-200 hover:bg-stone-500 hover:bg-opacity-10 duration-200"]),onClick:i},[Se(r.$slots,"default")],2)),[[Y(zt),24]])}}),gh=Object.freeze(Object.defineProperty({__proto__:null,default:ur},Symbol.toStringTag,{value:"Module"}));var nn=(e=>(e[e.never=0]="never",e[e.move=1]="move",e[e.firstMove=2]="firstMove",e[e.onLoad=3]="onLoad",e))(nn||{}),nt=(e=>(e[e.vertical=0]="vertical",e[e.ltr=1]="ltr",e[e.rtl=2]="rtl",e))(nt||{});const Jo=[{name:"System",value:"system-ui, sans-serif"},{name:"Charter",value:'Charter, "Times New Roman", serif'},{name:"Georgia",value:"Georgia, serif"}],ia=he({__name:"FieldFontFamily",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=lt(e,"modelValue"),n=J({get(){const o=Jo.findIndex(i=>i.value===t.value);return o===-1?0:o},set(o){t.value=Jo[o].value}});return(o,i)=>(b(),ie(Le,{label:"Font family"},{default:oe(()=>[A(vt,{modelValue:n.value,"onUpdate:modelValue":i[0]||(i[0]=r=>n.value=r),items:Y(Jo).map(r=>r.name)},null,8,["modelValue","items"])]),_:1}))}}),mh=Object.freeze(Object.defineProperty({__proto__:null,default:ia},Symbol.toStringTag,{value:"Module"}));function vh(e){if(e)try{return JSON.parse(e)}catch{return}}function bh(){const{width:e,height:t}=hn();return J(()=>e.value>t.value)}function ra(e){return String(e).normalize("NFKD").replace(/[\u0300-\u036f]/g,"").trim().toLowerCase().replace(/[^a-z0-9 -]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-")}var Dt=(e=>(e[e.longStrip=0]="longStrip",e[e.single=1]="single",e[e.double=2]="double",e))(Dt||{});const Qo=.25,ei=5,dr=.25,ti=.2,ni=5,yh=.05,wh=0,xh=5;function _h(e){var h,T,H,W,U,ee;const n=e.touchDevice&&(window.innerHeight<=600||window.innerWidth<=600)?bh():void 0,{titleName:o,isWebtoon:i}=e,r=o?ra(o):location.hostname,s=te(Sh(`tkr:${r}`)),l=B=>{s.value=B;const C=`tkr:${r}`;!B||!Object.keys(B).length?localStorage.removeItem(C):localStorage.setItem(C,JSON.stringify(B))},a=B=>{if(!s.value){l(B);return}const C={...s.value};Object.entries(B).forEach(([X,S])=>{S===void 0?delete C[X]:C[X]=S}),l(C)},u=te((h=s.value)==null?void 0:h.style),c=te((T=s.value)==null?void 0:T.direction),d=te((H=s.value)==null?void 0:H.gap),f=te((W=s.value)==null?void 0:W.speed),p=te((U=s.value)==null?void 0:U.zoom),w=te(((ee=s.value)==null?void 0:ee.breakFirst)??!1),y=J({get(){if(i.value)return Dt.longStrip;if(u.value!==void 0)return u.value;const{landscapeStyle:B,readerStyle:C}=e.defaultPreferences.value;return n!=null&&n.value?B??C:C},set:B=>{if(u.value===B)return;const C=y.value===Dt.longStrip,X=B===Dt.longStrip;u.value=B,a({style:B}),C!==X&&(O.value=X?nt.vertical:nt.rtl)}}),O=J({get(){if(i.value)return nt.vertical;if(c.value!==void 0)return c.value;const{direction:B,landscapeDirection:C}=e.defaultPreferences.value;return n!=null&&n.value?C??B:B},set:B=>{c.value=B,a({direction:B})}}),M=J({get:()=>d.value??e.defaultPreferences.value.gap,set(B){d.value=B,a({gap:B})}}),L=J({get:()=>f.value??e.defaultPreferences.value.speed,set(B){f.value=B,a({speed:B===1?void 0:B})}}),$=J({get:()=>p.value??1,set(B){p.value=B,a({zoom:B===1?void 0:B})}}),m=J({get:()=>w.value,set(B){w.value=B,a({breakFirst:B?!0:void 0})}});return{direction:O,style:y,gap:M,speed:L,zoom:$,isLongStrip:J(()=>y.value===Dt.longStrip),isDouble:J(()=>y.value===Dt.double),isRTL:J(()=>O.value===nt.rtl),isVertical:J(()=>O.value===nt.vertical),breakFirst:m}}function Sh(e){const t=localStorage.getItem(e),n=vh(t||void 0),o={};return n?(n.style!==void 0&&Object.values(Dt).includes(n.style)&&(o.style=n.style),n.direction!==void 0&&Object.values(nt).includes(n.direction)&&(o.direction=n.direction),n.gap!==void 0&&n.gap>=wh&&n.gap<=xh&&(o.gap=n.gap),n.speed!==void 0&&n.speed>=Qo&&n.speed<=ei&&(o.speed=n.speed),n.zoom!==void 0&&n.zoom>=ti&&n.zoom<=ni&&(o.zoom=n.zoom),n.breakFirst===!0&&(o.breakFirst=!0),Object.keys(o).length?o:void 0):o}const fr=he({__name:"NovelPreferencesForm",props:Ye({enableReset:{type:Boolean},defaultPreferences:{type:Object}},{modelValue:{required:!0},modelModifiers:{}}),emits:Ye(["reset"],["update:modelValue"]),setup(e,{emit:t}){const n=e,o=t,i=lt(e,"modelValue"),r=J(()=>Object.keys(i.value).some(l=>{var a;return i.value[l]!==((a=n.defaultPreferences)==null?void 0:a[l])}));function s(l){i.value={...i.value,...l}}return(l,a)=>(b(),I(ye,null,[A(ia,{"model-value":i.value.fontFamily,"onUpdate:modelValue":a[0]||(a[0]=u=>s({fontFamily:u}))},null,8,["model-value"]),A(Le,{label:"Text size"},{default:oe(()=>[A(tn,{"model-value":i.value.fontSize,min:10,max:48,"onUpdate:modelValue":a[1]||(a[1]=u=>s({fontSize:u,lineHeight:Math.max(i.value.lineHeight,u)}))},null,8,["model-value"])]),_:1}),A(Le,{label:"Line height"},{default:oe(()=>[A(tn,{"model-value":i.value.lineHeight,min:10,max:96,step:1,"onUpdate:modelValue":a[2]||(a[2]=u=>s({lineHeight:u,fontSize:Math.min(i.value.fontSize,u)}))},null,8,["model-value"])]),_:1}),A(Le,{label:"Play speed"},{default:oe(()=>[A(tn,{"model-value":i.value.speed,min:Y(Qo),max:Y(ei),step:Y(dr),format:u=>`${u.toFixed(2)}x`,"onUpdate:modelValue":a[3]||(a[3]=u=>s({speed:u}))},null,8,["model-value","min","max","step","format"])]),_:1}),e.enableReset?(b(),I("div",{key:0,class:ue(["w-full flex justify-center pt-1 duration-200",{"pointer-events-none opacity-0":!r.value,"opacity-90":r.value}])},[A(ur,{class:"w-2/3",onClick:a[4]||(a[4]=()=>o("reset"))},{default:oe(()=>[...a[5]||(a[5]=[Wt(" Reset to default ",-1)])]),_:1})],2)):le("",!0)],64))}}),kh=Object.freeze(Object.defineProperty({__proto__:null,default:fr},Symbol.toStringTag,{value:"Module"})),Ch={key:1,class:"mb-3 border-stone-500 border-opacity-70"},Th={key:2,class:"flex justify-end"},Mh={class:"h-6 border border-stone-500 rounded-md cursor-pointer flex items-center"},Ph={key:3,class:"mt-5 mb-3 border-stone-500 border-opacity-70"},pr=he({__name:"DefaultPreferencesForm",props:Ye({touchDevice:{type:Boolean},isNovel:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=lt(e,"modelValue"),o=te(!1),i=te(!1);je(()=>{o.value=t.touchDevice&&(window.innerHeight<=600||window.innerWidth<=600)});function r(l){const a=i.value,c=(a?n.value.landscapeStyle??n.value.readerStyle:n.value.readerStyle)!==Dt.longStrip,d=l!==Dt.longStrip;if(c===d)s(a?{landscapeStyle:l}:{readerStyle:l});else{const f=d?nt.rtl:nt.vertical;s(a?{landscapeStyle:l,landscapeDirection:f}:{readerStyle:l,direction:f})}}function s(l){n.value={...n.value,...l}}return(l,a)=>(b(),I(ye,null,[e.isNovel?(b(),I(ye,{key:0},[A(fr,{modelValue:n.value,"onUpdate:modelValue":a[0]||(a[0]=u=>n.value=u)},null,8,["modelValue"]),A(ta,{"model-value":n.value.contrast,"onUpdate:modelValue":a[1]||(a[1]=u=>s({contrast:u}))},null,8,["model-value"])],64)):(b(),I(ye,{key:1},[A(cr,{"model-value":n.value.autoPlay===!0,label:"Auto play in long strip","onUpdate:modelValue":a[2]||(a[2]=u=>s({autoPlay:u}))},null,8,["model-value"]),e.touchDevice?(b(),ie(cr,{key:0,"model-value":n.value.pinchToZoom!==!1,label:"Pinch to zoom","onUpdate:modelValue":a[3]||(a[3]=u=>s({pinchToZoom:u}))},null,8,["model-value"])):le("",!0),o.value?(b(),I("hr",Ch)):le("",!0),o.value?(b(),I("div",Th,[Z("div",Mh,[Re((b(),I("button",{class:ue(["focus:outline-none outline-none h-full flex justify-center items-center px-3 py-0.5 rounded-l-sm",{"bg-stone-500 text-stone-50":!i.value,"text-stone-400":i.value}]),onClick:a[4]||(a[4]=()=>i.value=!1)},[A(oa)],2)),[[Y(zt),24]]),Re((b(),I("button",{class:ue(["focus:outline-none outline-none h-full flex justify-center items-center px-3 py-0.5 rounded-r-sm",{"bg-stone-500 text-stone-50":i.value,"text-stone-400":!i.value}]),onClick:a[5]||(a[5]=()=>i.value=!0)},[A(na)],2)),[[Y(zt),24]])])])):le("",!0),A(Le,{label:"Style"},{default:oe(()=>[A(vt,{"model-value":i.value?n.value.landscapeStyle??n.value.readerStyle:n.value.readerStyle,items:["Long strip","Single page","Double page"],"onUpdate:modelValue":r},null,8,["model-value"])]),_:1}),A(Le,{label:"Direction"},{default:oe(()=>[A(vt,{"model-value":i.value?n.value.landscapeDirection??n.value.direction:n.value.direction,items:["Vertical","Left to right","Right to left"],"onUpdate:modelValue":a[6]||(a[6]=u=>s(i.value?{landscapeDirection:u}:{direction:u}))},null,8,["model-value"])]),_:1}),o.value?(b(),I("hr",Ph)):le("",!0),A(Le,{label:"Gap size"},{default:oe(()=>[A(vt,{"model-value":n.value.gap,items:["None","1px","2px","3px","4px","5px"],"onUpdate:modelValue":a[7]||(a[7]=u=>s({gap:u}))},null,8,["model-value"])]),_:1})],64)),A(Le,{label:"Progress size"},{default:oe(()=>[A(vt,{"model-value":n.value.progressSize/2,items:["None","2px","4px","6px","8px","10px"],"onUpdate:modelValue":a[8]||(a[8]=u=>s({progressSize:u*2}))},null,8,["model-value"])]),_:1}),A(Le,{label:"Auto next"},{default:oe(()=>[A(vt,{"model-value":n.value.autoNextSeconds,items:["None","1 sec","2 sec","3 sec","4 sec","5 sec"],"onUpdate:modelValue":a[9]||(a[9]=u=>s({autoNextSeconds:u}))},null,8,["model-value"])]),_:1}),A(Le,{label:"Hide controls"},{default:oe(()=>[A(vt,{"model-value":n.value.hideControlsEvent,items:["Never","On move","On first move","On load"],"onUpdate:modelValue":a[10]||(a[10]=u=>s({hideControlsEvent:u}))},null,8,["model-value"])]),_:1}),e.isNovel?le("",!0):(b(),I(ye,{key:2},[A(Le,{label:"Play speed"},{default:oe(()=>[A(tn,{"model-value":n.value.speed,min:Y(Qo),max:Y(ei),step:Y(dr),format:u=>`${u.toFixed(2)}x`,"onUpdate:modelValue":a[11]||(a[11]=u=>s({speed:u}))},null,8,["model-value","min","max","step","format"])]),_:1}),A(Le,{label:e.touchDevice?"Tap zones":"Click zones"},{default:oe(()=>[A(vt,{"model-value":(n.value.tapZone??-1)+1,items:["Default","None","L shaped","Kindle-ish","Edge","Right and left"],"onUpdate:modelValue":a[12]||(a[12]=u=>s({tapZone:u===0?void 0:u-1}))},null,8,["model-value"])]),_:1},8,["label"])],64))],64))}}),Eh=Object.freeze(Object.defineProperty({__proto__:null,default:pr},Symbol.toStringTag,{value:"Module"})),Ih={},Oh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function $h(e,t){return b(),I("svg",Oh,[...t[0]||(t[0]=[Z("path",{fill:"currentColor",d:"M11.3 19.3q-.275-.275-.288-.7t.263-.7l4.9-4.9H5q-.425 0-.713-.288T4 12q0-.425.288-.713T5 11h11.175l-4.9-4.9q-.275-.275-.263-.7t.288-.7q.275-.275.7-.275t.7.275l6.6 6.6q.15.125.213.313t.062.387q0 .2-.062.375t-.213.325l-6.6 6.6q-.275.275-.7.275t-.7-.275Z"},null,-1)])])}const no=be(Ih,[["render",$h]]),zh=Object.freeze(Object.defineProperty({__proto__:null,default:no},Symbol.toStringTag,{value:"Module"}));var hr=(e=>(e[e.none=0]="none",e[e.lShape=1]="lShape",e[e.kindleIsh=2]="kindleIsh",e[e.edge=3]="edge",e[e.rightAndLeft=4]="rightAndLeft",e))(hr||{});const sa={0:{prevZones:[],nextZones:[]},1:{prevZones:[0,1,2,3],nextZones:[8,7,6,5]},2:{prevZones:[6,3],nextZones:[8,7,5,4]},3:{prevZones:[7],nextZones:[5,0,2,3,6,8]},4:{prevZones:[3,0,6],nextZones:[5,2,8]}},la=he({__name:"TapZonePreview",props:{tapZone:{type:Number},direction:{type:Number}},setup(e){const t=e,{width:n,height:o}=hn(),i=J(()=>Math.min(1.25,Math.max(.75,Math.round(n.value/o.value*100)/100))),r=J(()=>i.value>=1),s=J(()=>t.direction===nt.vertical),l=J(()=>t.direction===nt.rtl),a=J(()=>{if(!t.tapZone)return;const{prevZones:u,nextZones:c}=sa[t.tapZone];return Array.from({length:9},(d,f)=>{const p=u.includes(f),w=!p&&c.includes(f);return{isPrev:p,isNext:w,hasArrow:f===u[0]||f===c[0]}})});return(u,c)=>(b(),I("div",{class:ue(["p-2 bg-black bg-opacity-40 rounded-2xl",{"w-28":r.value,"h-28":!r.value}]),style:Ce({"aspect-ratio":i.value})},[e.tapZone===Y(hr).none?(b(),I("div",{key:0,class:ue(["inline-block absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-14 h-14",{"rotate-90":e.direction===Y(nt).vertical,"rotate-180":e.direction===Y(nt).rtl}])},[A(no)],2)):a.value?(b(),I("div",{key:2,class:ue(["w-full h-full overflow-hidden rounded-xl flex flex-wrap",{"flex-row-reverse":l.value}])},[(b(!0),I(ye,null,Xt(a.value,(d,f)=>(b(),I("div",{key:`zone-${f}`,class:ue(["w-1/3 h-1/3 flex justify-center items-center p-0.5",{"bg-stone-100":d.isPrev||d.isNext,"bg-opacity-50":d.isPrev}])},[d.hasArrow?(b(),I("span",{key:0,class:"w-5 h-5 max-w-full max-h-full inline-block transform text-stone-800",style:Ce({transform:`rotate(${s.value?d.isNext?90:-90:(l.value?d.isPrev:d.isNext)?0:180}deg)`})},[A(no)],4)):le("",!0)],2))),128))],2)):(b(),I("div",{key:1,class:ue(["w-full h-full overflow-hidden rounded-xl flex flex-nowrap",{"flex-col":s.value}])},[Z("div",{class:ue(["flex-grow w-full h-full flex justify-center items-center bg-stone-100",{"bg-opacity-50":!l.value}])},[Z("span",{class:ue(["w-5 h-5 inline-block transform text-stone-800",{"-rotate-90":s.value,"rotate-180":!s.value}])},[A(no)],2)],2),c[0]||(c[0]=Z("div",{class:"flex-grow w-full h-full"},null,-1)),c[1]||(c[1]=Z("div",{class:"flex-grow w-full h-full"},null,-1)),Z("div",{class:ue(["flex-grow w-full h-full flex justify-center items-center bg-stone-100",{"bg-opacity-50":l.value}])},[Z("span",{class:ue(["w-5 h-5 inline-block text-stone-800",{"transform rotate-90":s.value}])},[A(no)],2)],2)],2))],6))}}),Dh=Object.freeze(Object.defineProperty({__proto__:null,default:la},Symbol.toStringTag,{value:"Module"})),Ah={key:0,class:"inline-block fixed z-50 left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 pointer-events-none duration-200"},aa=he({__name:"DirectionToast",props:{direction:{type:Number},tapZone:{type:Number}},setup(e){const t=e,n=sessionStorage.getItem("tk:dir"),o=te(typeof n!="string"||+n!==t.direction),i=mt(()=>o.value=!1,1500);de(()=>[t.direction,t.tapZone],()=>{r(),o.value=!0,i()}),je(()=>{r(),i();let s;de(Xi(),a=>{a!=="visible"?s=Date.now():Date.now()-s>7e3&&(o.value=!0,i())})});function r(){sessionStorage.setItem("tk:dir",t.direction+"")}return(s,l)=>(b(),ie(Gn,{"enter-from-class":"opacity-0","leave-to-class":"opacity-0"},{default:oe(()=>[o.value?(b(),I("div",Ah,[A(la,{direction:e.direction,"tap-zone":e.tapZone},null,8,["direction","tap-zone"])])):le("",!0)]),_:1}))}}),Lh=Object.freeze(Object.defineProperty({__proto__:null,default:aa},Symbol.toStringTag,{value:"Module"})),jh={class:"flex justify-between items-end"},Bh={class:"fixed pointer-events-none left-0 right-0 bottom-0"},ca=he({__name:"GearControlsLayout",props:{visible:{type:Boolean},spaceTop:{type:null}},setup(e){return(t,n)=>(b(),I("div",{id:"controls",class:ue(["fixed pointer-events-none cursor-auto left-0 top-0 w-full h-full flex flex-col justify-between p-2 sm:p-3 pb-6 md:pb-5 lg:pb-3 z-20",{"opacity-100 z-20":e.visible,"opacity-0 -z-10":!e.visible}])},[Se(t.$slots,"default"),Z("div",{class:ue(["flex gap-1 items-center relative z-30 flex-shrink-0 2xs:gap-3",{"children-pointer-events-auto":e.visible}]),style:Ce({paddingTop:`${e.spaceTop||0}px`})},[Se(t.$slots,"top")],6),Z("div",jh,[Z("div",{class:ue(["inline-block",{"children-pointer-events-auto":e.visible}])},[Se(t.$slots,"bottom-left")],2),Z("div",{class:ue(["inline-flex flex-col items-end gap-4",{"children-pointer-events-auto":e.visible}])},[Se(t.$slots,"bottom-right")],2)]),Z("div",Bh,[Se(t.$slots,"progress")])],2))}}),Nh=Object.freeze(Object.defineProperty({__proto__:null,default:ca},Symbol.toStringTag,{value:"Module"})),Vh='.loading-indicator{display:inline-block;height:80px;position:relative;width:80px}.loading-indicator:after,.loading-indicator:before{border-radius:9999px;border-style:solid;border-width:4px;box-sizing:border-box;display:block;position:absolute;--tw-border-opacity:1;animation:lds-ripple 1s cubic-bezier(0,.2,.8,1) infinite;border-color:rgb(184 92 56/var(--tw-border-opacity,1));content:"";opacity:1}.loading-indicator:after{animation-delay:-.5s}@keyframes lds-ripple{0%{height:0;left:40px;opacity:0;top:40px;width:0}4.9%{height:8px;left:36px;opacity:0;top:36px;width:8px}5%{height:8px;left:36px;opacity:1;top:36px;width:8px}to{height:80px;left:0;opacity:0;top:0;width:80px}}',Rh={},Hh={class:"loading-indicator"};function Fh(e,t){return b(),I("div",Hh)}const oi=be(Rh,[["render",Fh],["styles",[Vh]]]),Wh=Object.freeze(Object.defineProperty({__proto__:null,default:oi},Symbol.toStringTag,{value:"Module"})),Uh={class:"max-h-none max-w-none h-full w-full m-0 p-0 border-none outline-none"},qh={key:0,class:"fixed inset-0 h-[101%] flex justify-center items-center z-10 bg-black"},gr=be(he({inheritAttrs:!1,__name:"GearLayout",props:{loading:{type:Boolean},immediate:{type:Boolean},hideCursor:{type:Boolean},style:{type:Object}},setup(e,{expose:t}){const n={mounted:i=>i.isConnected&&!i.open&&i.showModal(),beforeUnmount:i=>i.isConnected&&i.open&&i.close()},o=te(null);return t({rootEl:o}),(i,r)=>Re((b(),I("dialog",Uh,[Z("div",{ref_key:"rootEl",ref:o,id:"gear-layout",class:ue({"cursor-none":e.hideCursor,"cursor-default":!e.hideCursor,"bg-black":e.immediate||!e.loading,"opacity-0":!e.immediate&&e.loading,"duration-200 transition-colors":!e.immediate,[`${i.$attrs.class??""}`]:!0}),style:Ce(e.style??{})},[e.loading&&e.immediate?(b(),I("div",qh,[A(oi)])):le("",!0),Se(i.$slots,"default")],6)])),[[n]])}}),[["styles",["#gear-layout{direction:ltr;font-family:Helvetica,sans-serif;font-size:16px;font-weight:400;height:100%;line-height:24px;overflow:hidden;overscroll-behavior:contain;pointer-events:auto;text-align:left;width:100%}"]]]),Kh=Object.freeze(Object.defineProperty({__proto__:null,default:gr},Symbol.toStringTag,{value:"Module"})),Zh={},Yh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 56 56"};function Xh(e,t){return b(),I("svg",Yh,[...t[0]||(t[0]=[Z("path",{fill:"currentColor",d:"M29.84 49.574h12.398c4.899 0 7.336-2.437 7.336-7.265V13.69c0-4.828-2.437-7.265-7.336-7.265H29.84Zm-16.055 0h12.398V6.426H13.785c-4.875 0-7.36 2.414-7.36 7.265V42.31c0 4.851 2.485 7.265 7.36 7.265"},null,-1)])])}const ua=be(Zh,[["render",Xh]]),Gh=Object.freeze(Object.defineProperty({__proto__:null,default:ua},Symbol.toStringTag,{value:"Module"})),Jh={},Qh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function eg(e,t){return b(),I("svg",Qh,[...t[0]||(t[0]=[Z("g",{fill:"none"},[Z("path",{d:"M24 0v24H0V0zM12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035c-.01-.004-.019-.001-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427c-.002-.01-.009-.017-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093c.012.004.023 0 .029-.008l.004-.014l-.034-.614c-.003-.012-.01-.02-.02-.022m-.715.002a.023.023 0 0 0-.027.006l-.006.014l-.034.614c0 .012.007.02.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z"}),Z("path",{fill:"currentColor",d:"M8 3v18H5a2 2 0 0 1-1.995-1.85L3 19V5a2 2 0 0 1 1.85-1.995L5 3zm11 0a2 2 0 0 1 1.995 1.85L21 5v14a2 2 0 0 1-1.85 1.995L19 21h-9V3z"})],-1)])])}const da=be(Jh,[["render",eg]]),tg=Object.freeze(Object.defineProperty({__proto__:null,default:da},Symbol.toStringTag,{value:"Module"})),ng={key:1,class:"h-5"},fa=he({__name:"MangaPreferencesForm",props:{direction:{type:Number},readerStyle:{type:Number},gap:{type:Number},speed:{type:Number},zoom:{type:Number},webtoon:{type:Boolean},defaultPreferences:{type:Object},enableReset:{type:Boolean}},emits:["update:reader-style","update:direction","update:gap","update:speed","update:zoom"],setup(e,{emit:t}){const n=e,o=t,i=J(()=>["Long strip",n.webtoon?void 0:"Single page",n.webtoon?void 0:"Double page"].filter(Boolean)),r=J(()=>{const a=n.defaultPreferences;return!n.webtoon&&n.readerStyle!==a.readerStyle||!n.webtoon&&n.direction!==a.direction||n.gap!==a.gap||n.speed!==a.speed});function s(a){o("update:zoom",Math.round(a)/100)}function l(){o("update:reader-style",void 0),o("update:direction",void 0),o("update:gap",void 0),o("update:speed",void 0)}return(a,u)=>(b(),I(ye,null,[A(Le,{label:"Style"},{default:oe(()=>[A(vt,{"model-value":e.readerStyle,items:i.value,"onUpdate:modelValue":u[0]||(u[0]=c=>o("update:reader-style",c))},null,8,["model-value","items"])]),_:1}),A(Le,{label:"Direction"},{default:oe(()=>[A(vt,{"model-value":e.direction,items:e.webtoon?["Vertical"]:["Vertical","Left to right","Right to left"],"onUpdate:modelValue":u[1]||(u[1]=c=>o("update:direction",c))},null,8,["model-value","items"])]),_:1}),A(Le,{label:"Gap size"},{default:oe(()=>[A(vt,{"model-value":e.gap,items:["None","1px","2px","3px","4px","5px"],"onUpdate:modelValue":u[2]||(u[2]=c=>o("update:gap",c))},null,8,["model-value"])]),_:1}),A(Le,{label:"Play speed"},{default:oe(()=>[A(tn,{"model-value":e.speed,min:Y(Qo),max:Y(ei),step:Y(dr),format:c=>`${c.toFixed(2)}x`,"onUpdate:modelValue":u[3]||(u[3]=c=>o("update:speed",c))},null,8,["model-value","min","max","step","format"])]),_:1}),A(Le,{label:"Zoom"},{default:oe(()=>[A(tn,{"model-value":Math.ceil(e.zoom*100),min:Y(ti)*100,max:Y(ni)*100,step:Y(yh)*100,format:c=>`${Math.ceil(c)}%`,"onUpdate:modelValue":s},null,8,["model-value","min","max","step","format"])]),_:1}),e.enableReset?(b(),I("div",{key:0,class:ue(["w-full flex justify-center pt-1 duration-200",{"pointer-events-none opacity-0":!r.value,"opacity-90":r.value}])},[A(ur,{class:"w-2/3",onClick:l},{default:oe(()=>[...u[4]||(u[4]=[Wt(" Reset to default ",-1)])]),_:1})],2)):(b(),I("div",ng))],64))}}),og=Object.freeze(Object.defineProperty({__proto__:null,default:fa},Symbol.toStringTag,{value:"Module"})),pa=he({__name:"PageNav",props:Ye({disabled:{type:Boolean},pages:{type:Array},totalImgs:{type:Number}},{modelValue:{type:Number,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=lt(e,"modelValue"),o=J(()=>t.pages.map(a=>a.map(({index:u})=>`${u+1}`).join("-"))),i=J(()=>{const a=n.value,u=t.pages.findIndex(c=>c.some(({index:d})=>d===a));return u===-1?t.pages.length-1:u}),r=J(()=>t.pages.length?`${o.value[i.value]}/${t.totalImgs}`:"--");function s(a){const u=t.pages[a][0].index;l(u)}function l(a){n.value=a}return(a,u)=>(b(),ie(lr,{"model-value":i.value,label:r.value,title:"Current page",items:o.value,disabled:e.disabled,"onUpdate:modelValue":s},null,8,["model-value","label","items","disabled"]))}}),ig=Object.freeze(Object.defineProperty({__proto__:null,default:pa},Symbol.toStringTag,{value:"Module"})),mr=be(he({__name:"PauseToast",props:{playing:{type:Boolean}},setup(e){const t=e,n=te(0);return de(()=>t.playing,()=>{n.value=Date.now()}),(o,i)=>n.value?(b(),I("div",{key:n.value,class:"animate-pause-fade fixed left-1/2 top-1/2 -mx-12 -my-12 pointer-events-none w-24 h-24 p-4 bg-black bg-opacity-40 rounded-full duration-500"},[e.playing?(b(),ie(or,{key:0})):(b(),ie(nr,{key:1}))])):le("",!0)}}),[["styles",[".animate-pause-fade{animation:pause-fade .4s linear forwards;transform-origin:center}@keyframes pause-fade{0%{opacity:0;transform:scale(.3)}10%{opacity:1;transform:scale(.35)}55%{opacity:1;transform:scale(.65)}to{opacity:0;transform:scale(1)}}"]]]),rg=Object.freeze(Object.defineProperty({__proto__:null,default:mr},Symbol.toStringTag,{value:"Module"})),sg=30,vr=be(he({__name:"ProgressBar",props:{value:{type:Number},total:{type:Number},longStrip:{type:Boolean},height:{type:Number},rtl:{type:Boolean},opacity:{type:Number}},setup(e){const t=e,n=J(()=>Math.floor(t.value)+1),o=J(()=>`${Math.max(2,Math.min(10,t.height))}px`),i=hn().width,r=J(()=>t.total!==void 0&&i.value/t.total>=sg);return(s,l)=>(b(),I("div",{class:ue(["rprog",{"rprog--rtl":e.rtl}]),style:Ce({height:o.value,opacity:e.opacity??.8})},[r.value?(b(!0),I(ye,{key:0},Xt(e.total,a=>(b(),I("span",{key:a,class:ue(["rprog__item",{"rprog__item--active":n.value===a}]),style:Ce(!e.longStrip||n.value!==a?{}:{"--portion":`${e.value%1*100}%`})},null,6))),128)):(b(),I("div",{key:1,style:Ce({width:`${e.value/(e.total??1)*100}%`}),class:"h-full bg-textPrimary"},null,4))],6))}}),[["styles",['.rprog{--portion:100%;display:flex;width:100%}.rprog--rtl,.rprog--rtl .rprog__item{flex-direction:row-reverse}.rprog__item{display:inline-flex;flex-grow:1;flex-shrink:0;height:100%}.rprog__item:first-child:before{display:none}.rprog__item--active:before,.rprog__item:has(~.rprog__item--active):before{background-color:rgb(0 0 0/var(--tw-bg-opacity,1));content:"";display:block;flex-shrink:0;height:100%;width:1px;--tw-bg-opacity:.25}.rprog__item--active:after,.rprog__item:has(~.rprog__item--active):after{content:"";display:block;height:100%;--tw-bg-opacity:1;background-color:rgb(251 130 82/var(--tw-bg-opacity,1));width:var(--portion)}']]]),lg=Object.freeze(Object.defineProperty({__proto__:null,default:vr},Symbol.toStringTag,{value:"Module"})),ha=he({__name:"GesturesContainer",props:{spaceTop:{type:Number},controlsVisible:{type:Boolean},zoom:{type:Number},zooming:{type:Boolean},pinchToZoome:{type:Boolean},tapZone:{type:Number},pageIndex:{type:Number},playController:{type:Object},rtl:{type:Boolean},horizontal:{type:Boolean},longStrip:{type:Boolean},touchDevice:{type:Boolean},busy:{type:Boolean}},emits:["update:zoom","update:zooming","dragEnd","click","prev","next"],setup(e,{expose:t,emit:n}){const o=e,i=n,r=te(null),s=te(Math.min(ni,Math.max(ti,o.zoom))),l=te(!1),a=te(!1),u={isZoomIn:!1,isZoomOut:!1,initial:void 0};t({rootEl:r}),de(()=>o.zoom,_=>F(_)),je(()=>{o.touchDevice?St(r,"touchstart",M):(St(r,"mousedown",p),St(window,"wheel",H))}),$t({onKeyDown:_=>{var x;if(!o.busy&&((x=r.value)==null||x.focus(),!(_.key==="Meta"||_.key==="Control")&&(_.ctrlKey||_.metaKey)))switch(_.key){case"0":F(1);break;case"-":F(s.value-.2),_.preventDefault();break;case"=":case"+":F(s.value+.2),_.preventDefault();break}},onKeyUp:_=>{o.zooming&&!(_.ctrlKey||_.metaKey)&&X()}});function c(_){a.value!==_&&(a.value=_,_?o.playController.pause():(i("dragEnd"),o.playController.resume()))}let d={x:0,y:0},f={x:0,y:0};function p(_){if(_.button!==0)return;const x=r.value;x&&(d={x:_.clientX,y:_.clientY},f={x:x.scrollLeft,y:x.scrollTop},window.addEventListener("mousemove",w),window.addEventListener("mouseup",()=>{window.removeEventListener("mousemove",w),setTimeout(()=>c(!1))},{once:!0}),_.preventDefault(),_.stopPropagation())}function w(_){const x=_.clientX-d.x,j=_.clientY-d.y;if(!a.value&&Math.abs(x)<.5&&Math.abs(j)<.5)return;c(!0);const K=r.value;K&&(K.scrollLeft=f.x-x,K.scrollTop=f.y-j)}let y={distance:0,zoom:s.value,x:0,y:0},O=!1;function M(_){o.busy||(O=o.pinchToZoome&&_.touches.length===2,O&&(i("update:zooming",!0),c(!0),_.stopPropagation(),_.preventDefault(),y={distance:W(_),zoom:s.value,x:(_.touches[0].clientX+_.touches[1].clientX)/2,y:(_.touches[0].clientY+_.touches[1].clientY)/2}),(O||o.longStrip&&o.playController.isPlaying.value)&&window.addEventListener("touchend",L,{once:!0}))}function L(){var K;if(O=!1,o.zooming){c(!1),X();return}if(!a.value)return;const _=mt(()=>{var D;c(!1),(D=r.value)==null||D.removeEventListener("scroll",j)},200),x=setTimeout(_,200);(K=r.value)==null||K.addEventListener("scroll",j);function j(){clearTimeout(x),_()}}function $(_){if(!O&&!(o.longStrip&&o.playController.isPlaying.value)||(c(!0),!o.zooming)||(_.stopPropagation(),_.preventDefault(),_.touches.length<2))return;const j=W(_)/y.distance;Q(Math.ceil(j*y.zoom*100)/100,y)}const m=mt(()=>l.value=!1,100);let h=!1;const T=mt(()=>{h=!1},30);function H(_){if(o.busy)return;let x=o.zooming;if(h||(h=!0,x=_.ctrlKey||_.metaKey,x&&i("update:zooming",!0)),T(),x){_.stopPropagation(),_.preventDefault();const j=Math.ceil((s.value+_.deltaY*-.01)*100)/100;Q(j,{x:_.clientX,y:_.clientY});return}o.horizontal&&(l.value||(l.value=!0),m(),_.deltaY&&(r.value&&(r.value.scrollLeft+=_.deltaY*(o.rtl?-1:1)),_.stopPropagation()))}function W(_){return Math.hypot(_.touches[0].clientX-_.touches[1].clientX,_.touches[0].clientY-_.touches[1].clientY)}const U={x:0,y:0,ts:0};function ee(_){if(a.value||o.zooming)return;const x=r.value;if(!x||B(x,_)||(i("click"),o.playController.isPlaying.value))return;const{clientX:j,clientY:K}=_,{x:D,y:ge,ts:ae}=U;U.x=j,U.y=K,U.ts=new Date().getTime();const pe=U.ts-ae;pe>250||pe<10||Math.abs(D-j)>40||Math.abs(ge-K)>40||(U.ts=0,U.x=0,U.y=0,C(j,K))}function B(_,x){if(o.playController.isPlaying.value)return!1;const j=o.tapZone;if(j===hr.none)return!1;const K=o.controlsVisible?o.spaceTop:0,D=_.clientHeight-K,ge=Math.max(0,x.clientY-K),ae=o.horizontal?_.clientWidth:D;let pe=!1,ve=!1;if(j){const{prevZones:we,nextZones:Ae}=sa[o.tapZone],ct=Math.floor(ge/D*3);let Qe=Math.floor(x.clientX/_.clientWidth*3);o.rtl&&(Qe=2-Qe);const De=ct*3+Qe;pe=we.includes(De),ve=!pe&&Ae.includes(De)}else{const Ae=(o.horizontal?o.rtl?ae-x.clientX:x.clientX:ge)/ae,ct=o.horizontal?.2:.15;pe=Ae<=ct&&o.pageIndex>0,ve=!pe&&Ae>=1-ct}if(!pe&&!ve)return!1;if(o.longStrip){const we=(pe?-1:1)*.75*ae;o.horizontal?_.scrollLeft=_.scrollLeft+(o.rtl?-1:1)*we:_.scrollTop=Math.max(0,_.scrollTop+we)}else pe?i("prev"):ve&&i("next");return!0}async function C(_,x){const j=s.value===1?2:1;await F(j,{x:_,y:x}),X()}function X(){i("update:zooming",!1),u.initial=void 0,u.isZoomIn=!1,u.isZoomOut=!1}function S(){if(u.initial)return;const _=r.value;if(!_)return;const x=_.querySelector(`[data-index="${o.pageIndex}"],[data-index2="${o.pageIndex}"]`)??void 0;x&&(u.initial={el:x,rect:x.getBoundingClientRect()})}function Q(_,x){if(u.isZoomIn=u.isZoomIn||!u.isZoomOut&&_>1,u.isZoomIn&&_<1){F(1,x);return}if(u.isZoomOut=u.isZoomOut||!u.isZoomIn&&_<1,u.isZoomOut&&_>1){F(1,x);return}F(_,x)}async function F(_,x){const j=r.value,K=Math.min(ni,Math.max(ti,_));if(!j||s.value===K)return;S();const{initial:D}=u;if(!D)return;const ge=(x==null?void 0:x.x)??j.clientWidth/2,ae=(x==null?void 0:x.y)??j.clientHeight/2;s.value=K,i("update:zoom",K),await ht();const{el:pe,rect:ve}=D,we=pe.offsetWidth/ve.width,Ae=pe.offsetHeight/ve.height;j.scrollLeft=pe.offsetLeft-ve.left*we+ge*(we-1),j.scrollTop=pe.offsetTop-ve.top*Ae+ae*(Ae-1)}return(_,x)=>(b(),I("div",{ref_key:"rootEl",ref:r,tabindex:"0",class:ue(["w-full h-full overflow-auto scrollbar-none overscroll-contain scrollbar-none focus:outline-none touch-pan-x touch-pan-y",{"!snap-none":!e.longStrip&&(a.value||l.value||e.zooming),"cursor-grabbing":!e.touchDevice&&a.value,"overflow-hidden":e.zooming}]),style:Ce({"font-size":`${s.value}px`}),onClick:Be(ee,["stop"]),onTouchmoveCapture:Be($,["stop"])},[Se(_.$slots,"default")],38))}}),ag=Object.freeze(Object.defineProperty({__proto__:null,default:ha},Symbol.toStringTag,{value:"Module"})),cg=["src"],br=he({inheritAttrs:!1,__name:"ReaderImg",props:{src:{type:null},style:{type:Object}},setup(e){const t=e;let n;const o={mounted:i=>{if(t.src instanceof HTMLElement){const r=t.src.getBoundingClientRect();n=document.createElement("div"),n.style.setProperty("width",`${r.width}px`),n.style.setProperty("height",`${r.height}px`),t.src.replaceWith(n),i.appendChild(t.src)}},beforeUnmount:i=>{const r=i.children[0];n&&r&&(n.replaceWith(r),n=void 0)}};return(i,r)=>typeof e.src=="string"?(b(),I("img",{key:0,src:e.src,class:ue(i.$attrs.class??""),style:Ce(e.style)},null,14,cg)):Re((b(),I("div",{key:1,class:ue(i.$attrs.class??""),style:Ce(e.style)},null,6)),[[o]])}}),ug=Object.freeze(Object.defineProperty({__proto__:null,default:br},Symbol.toStringTag,{value:"Module"}));function yr(e,t){return(e==null?void 0:e.querySelector(`[data-index="${t}"],[data-index2="${t}"]`))??void 0}const dg=["data-index"],fg={key:0,class:"rbod__page rbod__page--loading"},pg=["data-index"],ga=be(he({__name:"ReaderBody",props:{page:{type:Number},pageIndex:{type:Number},direction:{type:Number},isLongStrip:{type:Boolean},isVertical:{type:Boolean},isDouble:{type:Boolean},isRTL:{type:Boolean},pages:{type:Array},totalImgs:{type:Number},gap:{type:Number},zoom:{type:Number},zooming:{type:Boolean},pinchToZoome:{type:Boolean},tapZone:{type:Number},spaceTop:{type:Number},touchDevice:{type:Boolean},playController:{type:Object},busy:{type:Boolean},controlsVisible:{type:Boolean}},emits:["ready","update:zoom","update:zooming","update:playing","dragEnd","click","end","prev","next"],setup(e,{expose:t,emit:n}){const o=e,i=n,r=te(null),s=J(()=>{var $;return($=r.value)==null?void 0:$.rootEl});t({rootEl:s});const l=hn(),a=J(()=>{const{width:$,height:m}=l,h=o.isLongStrip?o.isVertical?$.value:m.value:Math.min($.value,m.value);return Math.min(4,Math.max(1,Math.ceil(h/400-1)))*o.gap}),u=te(o.isLongStrip?{min:o.pageIndex-1,max:o.pageIndex}:O()),c=J(()=>{const{min:$,max:m}=u.value,h={};for(let T=$;T<=m;T++)h[T]=!0;return h}),d=te(p()),f=Mn(()=>{d.value=p(),ht(()=>y())},100);de(l.width,f),de(l.height,f),de(()=>o.pages,f),de(()=>o.isLongStrip,f),de(()=>o.isVertical,f);function p(){const $=l.width.value,m=l.height.value,{pages:h,isLongStrip:T,isVertical:H}=o;return h.map(W=>{var _;const U=W.some(x=>{var j;return(j=x.img)==null?void 0:j.isLoading}),ee=W.map(x=>x.index),B={isLoading:U,indexes:ee,visible:!1};if(U)return B;const C=W.map(({img:x})=>x).filter(Boolean);if(!C.length||(B.srcs=C.map(({src:x})=>x),C.every(x=>x.hasError)))return B;const S=(_=C.find(x=>!x.hasError))==null?void 0:_.size;if(!S)return B;const Q=C.reduce((x,j)=>{var K;return x+(((K=j.size)==null?void 0:K.width)??S.width)},0),F=C.reduce((x,j)=>{var K;return x+(((K=j.size)==null?void 0:K.height)??S.height)},0)/C.length;return T&&H||!T&&$/Q<m/F?(B.width=Math.min($,Q),B.height=F*(B.width/Q)):(B.height=Math.min(m,F),B.width=Q*(B.height/F)),B.width&&B.height&&(B.style={width:`${B.width}em`,height:`${B.height}em`}),B})}const w=J(()=>{const $=o.isVertical?"width":"height";return d.value.map(m=>m[$]).filter(Boolean).sort((m,h)=>h-m)[0]});je(()=>{const $=yr(s.value,o.pageIndex);$==null||$.scrollIntoView({behavior:"instant",block:"start"});let m,h=!1;Fs(()=>{m!==o.pageIndex&&(m=o.pageIndex,y(),h||(h=!0,ht(()=>i("ready"))))})});async function y(){if(!o.isLongStrip){u.value=O();return}const $=Math.floor(o.page),m=yr(s.value,$);if(!m)return;const h=+M(m).getAttribute("data-index"),T=+L(m).getAttribute("data-index");(h!==u.value.min||T!==u.value.max)&&(u.value={min:h,max:T})}function O(){const{pageIndex:$}=o;return{min:$-(o.isDouble?5:3),max:$+(o.isDouble?6:3)}}function M($,m=0){const h=$.previousElementSibling;if(!h)return $;const T=m+(o.isVertical?h.clientHeight:h.clientWidth);return(o.isVertical?T>l.height.value*1.5:o.isRTL?T>l.width.value*2.5:T>l.width.value*1.5)?h:M(h,T)}function L($,m=0){const h=$.nextElementSibling;if(!h)return $;const T=m+(o.isVertical?h.clientHeight:h.clientWidth);return(o.isVertical?T>l.height.value*3.5:o.isRTL?T>l.width.value*1.5:T>l.width.value*2.5)?h:L(h,T)}return($,m)=>(b(),ie(ha,{ref_key:"gestureContainer",ref:r,"space-top":e.spaceTop,"controls-visible":e.controlsVisible,zoom:e.zoom,zooming:e.zooming,"pinch-to-zoome":e.pinchToZoome,"tap-zone":e.tapZone,"page-index":e.pageIndex,class:ue(["rbod",{"rbod--long-strip":e.isLongStrip,"rbod--paging":!e.isLongStrip,"rbod--vertical":e.isVertical,"rbod--rtl":e.isRTL,"rbod--1page":d.value.length===1}]),"play-controller":e.playController,horizontal:!e.isVertical,rtl:e.isRTL,"touch-device":e.touchDevice,busy:e.busy,"long-strip":e.isLongStrip,style:Ce({"--gap":`${a.value}em`,"--space-top":`${e.spaceTop}px`,"--screen-width-em":Y(l).width.value+"em","--screen-height-em":Y(l).height.value+"em",...e.isLongStrip?{"--max-size-em":w.value+"em"}:{}}),"onUpdate:zoom":m[0]||(m[0]=h=>i("update:zoom",h)),"onUpdate:zooming":m[1]||(m[1]=h=>i("update:zooming",h)),onDragEnd:m[2]||(m[2]=()=>i("dragEnd")),onClick:m[3]||(m[3]=()=>i("click")),onPrev:m[4]||(m[4]=()=>i("prev")),onNext:m[5]||(m[5]=()=>i("next"))},{default:oe(()=>[(b(!0),I(ye,null,Xt(d.value,h=>{var T;return b(),I("div",Sn({key:e.direction+"_"+h.indexes[0],"data-index":h.indexes[0]},{ref_for:!0},h.indexes.length>1?{"data-index2":h.indexes[1]}:{}),[!((T=h.srcs)!=null&&T.length)||h.isLoading?(b(),I("div",fg,[c.value[h.indexes[0]]?(b(),ie(oi,{key:0})):le("",!0)])):h.srcs.length==1?(b(),I(ye,{key:1},[c.value[h.indexes[0]]?(b(),ie(br,{key:1,class:"rbod__page img",src:h.srcs[0],style:Ce(h.style)},null,8,["src","style"])):(b(),I("div",{key:0,class:"rbod__page",style:Ce(h.style)},null,4))],64)):(b(),I("div",{key:2,class:ue(["rbod__page rbod__page--double",{"flex-row-reverse":e.isRTL}]),style:Ce(h.style)},[h.indexes.some(H=>c.value[H])?(b(!0),I(ye,{key:0},Xt(h.srcs,(H,W)=>(b(),I("div",{key:typeof H=="string"?H:`${W}-${h.height}`},[A(br,{src:H,class:"img"},null,8,["src"])]))),128)):le("",!0)],6))],16,dg)}),128)),Z("div",{class:"last","data-index":e.totalImgs},[Se($.$slots,"end")],8,pg)]),_:3},8,["space-top","controls-visible","zoom","zooming","pinch-to-zoome","tap-zone","page-index","play-controller","horizontal","rtl","touch-device","busy","long-strip","class","style"]))}}),[["styles",[".rbod{--tw-translate-y:0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media (min-width:1024px){.rbod{transform:none}}.rbod--rtl{flex-direction:row-reverse}.rbod.rbod--vertical>div{padding:calc(var(--gap)/2) 0}.rbod:not(.rbod--vertical){align-items:center;display:flex;height:100%;justify-content:flex-start}.rbod:not(.rbod--vertical)>div{padding:0 calc(var(--gap)/2)}.rbod--long-strip.rbod--vertical.rbod--1page>div:first-child{min-height:100vh}.rbod--long-strip.rbod--vertical>div:first-child{margin-top:var(--space-top);padding-top:0}.rbod--long-strip.rbod--vertical>div:last-child{padding-bottom:0}.rbod--long-strip.rbod--vertical>div{width:var(--max-size-em)}.rbod--long-strip.rbod--vertical .rbod__page--loading{height:75vh;width:100%}.rbod--long-strip.rbod--vertical .last{height:100vh}.rbod--long-strip:not(.rbod--vertical).rbod--1page>div:first-child{min-width:100vw}.rbod--long-strip:not(.rbod--vertical)>div{align-items:center;display:flex;height:var(--max-size-em)}.rbod--long-strip:not(.rbod--vertical) .rbod__page--loading{height:100%;max-width:100vw;width:680px}.rbod--long-strip:not(.rbod--vertical) .last{width:100vw}.rbod--long-strip>div>.img{flex-shrink:0;margin:auto}.rbod--paging>div{align-items:center;display:grid;justify-content:center;min-height:100vh;min-width:100vw;scroll-snap-align:center;scroll-snap-stop:always}.rbod--paging.rbod--vertical{scroll-snap-type:y var(--tw-scroll-snap-strictness);--tw-scroll-snap-strictness:mandatory}.rbod--paging.rbod--vertical>div{width:var(--screen-width-em)}.rbod--paging:not(.rbod--vertical){scroll-snap-type:x var(--tw-scroll-snap-strictness);--tw-scroll-snap-strictness:mandatory}.rbod--paging:not(.rbod--vertical)>div{height:var(--screen-height-em)}.rbod--paging .rbod__page--loading{height:100%;width:100%}.rbod--paging .rbod__page.rbod__page--double{align-items:center;background-color:transparent;display:flex;gap:var(--gap);justify-content:center}.rbod--paging .rbod__page.rbod__page--double div{display:flex;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.rbod--paging .rbod__page.rbod__page--double div .img{flex-shrink:0;max-height:100%;max-width:100%;-o-object-fit:contain;object-fit:contain}.rbod>div{flex-shrink:0}.rbod .rbod__page,.rbod>div{margin:auto;-webkit-user-select:none;-moz-user-select:none;user-select:none}.rbod .rbod__page{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));-o-object-fit:contain;object-fit:contain}.rbod .rbod__page--loading{align-items:center;background-color:transparent;display:flex;justify-content:center}.rbod .img canvas,.rbod .img img{height:100%;max-height:100%;max-width:100%;width:100%}"]]]),hg=Object.freeze(Object.defineProperty({__proto__:null,default:ga},Symbol.toStringTag,{value:"Module"})),gg={},mg={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function vg(e,t){return b(),I("svg",mg,[...t[0]||(t[0]=[Z("path",{fill:"currentColor",d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12z"},null,-1)])])}const ma=be(gg,[["render",vg]]),bg=Object.freeze(Object.defineProperty({__proto__:null,default:ma},Symbol.toStringTag,{value:"Module"})),yg={class:"flex w-full flex-shrink-0 justify-between items-center h-16 px-3"},va=he({__name:"BottomSheet",props:Ye({spaceTop:{type:Number}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=lt(e,"modelValue"),n=te(null),o=te(!1),i=te(0);$t({onKeyDown:s});const r=Yo();de(t,c=>r(c)),Gi(()=>{const c=t.value;return c&&(t.value=!1),c});function s(c){t.value&&c.key==="Escape"&&(t.value=!1,c.preventDefault())}const l={y:-1};function a(c){const d=n.value;if(!d)return;if(d.scrollTop>0){l.y=-1;return}if(l.y===-1){l.y=Math.max(0,c.touches[0].clientY);return}const p=c.touches[0].clientY-l.y,w=p>0?p:0;w!=i.value&&(i.value=w);const y=w>0;y!==o.value&&(o.value=y)}async function u(){o.value=!1,l.y=-1,await ht();const c=n.value;c&&c.offsetHeight-i.value<window.innerHeight/2&&i.value>c.offsetHeight*.3&&(t.value=!1),i.value=0}return(c,d)=>(b(),I("div",{class:ue(["fixed inset-0 flex flex-col items-center justify-end select-none z-40 text-stone-100",{"!pointer-events-none":!t.value}]),style:Ce({"padding-top":(e.spaceTop??0)+60+"px"}),onClick:d[3]||(d[3]=()=>t.value=!1)},[A(Gn,{"enter-from-class":"!translate-y-full","leave-to-class":"!translate-y-full"},{default:oe(()=>[t.value?(b(),I("div",{key:0,class:ue(["w-full sm:w-[31rem] bg-stone-900 bg-opacity-90 backdrop-blur-md rounded-t-xl max-w-full overflow-hidden shadow-lg shadow-neutral-950",{"duration-0":o.value,"duration-200":!o.value}]),style:Ce(i.value?{transform:`translateY(${i.value}px)`}:{}),onClick:d[1]||(d[1]=Be(()=>{},["stop"])),onWheelPassive:d[2]||(d[2]=Be(()=>{},["stop"])),onTouchmove:Be(a,["stop"]),onTouchend:u},[Z("div",yg,[A(Ge,{transparent:"",onClick:d[0]||(d[0]=()=>t.value=!1)},{default:oe(()=>[A(ma)]),_:1}),Se(c.$slots,"name"),Se(c.$slots,"actions")]),Z("div",{ref_key:"scrollEl",ref:n,class:ue(["overflow-auto overscroll-none px-6 md:px-8 lg:px-10 xl:px-12 pt-1.5 pb-8 md:pb-6 flex-grow scrollbar-sm",{"overflow-hidden":o.value}]),style:{"max-height":"calc(100% - 4rem)"}},[Se(c.$slots,"default")],2)],38)):le("",!0)]),_:3})],6))}}),wg=Object.freeze(Object.defineProperty({__proto__:null,default:va},Symbol.toStringTag,{value:"Module"})),xg=["onClick","onKeyup"],ba=be(he({__name:"TabBar",props:Ye({items:{type:Array}},{modelValue:{type:Number,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=lt(e,"modelValue"),o=te(null),i=te({width:"",left:""}),r=te(!1);je(()=>{const l=Date.now();de(n,async a=>{var c;await ht();const u=(c=o.value)==null?void 0:c.children[a+1];u&&(i.value={width:u.offsetWidth+"px",left:u.offsetLeft+"px"},!r.value&&Date.now()-l>500&&(r.value=!0),u.scrollIntoView({behavior:r.value?"smooth":"auto",block:"center",inline:"center"}))},{immediate:!0})});function s(l){n.value=l}return(l,a)=>(b(),I("div",{ref_key:"root",ref:o,class:"relative h-8 rounded-[2.5rem] inline-flex bg-black bg-opacity-50 p-1 font-medium max-w-full leading-none overflow-auto scrollbar-none",style:{}},[Z("div",{class:ue(["bg-stone-300 h-6 rounded-2xl absolute top-1 pointer-events-none",{"duration-200":r.value}]),style:Ce(i.value)},null,6),(b(!0),I(ye,null,Xt(t.items,(u,c)=>Re((b(),I("div",{key:c,tabindex:"0",class:ue(["text-sm inline-flex justify-center items-center h-6 rounded-2xl px-4 cursor-pointer relative z-10 whitespace-nowrap flex-shrink-0 focus:outline-primary hover:bg-stone-50 hover:bg-opacity-10 duration-200",{"text-stone-900":c==n.value,"text-stone-400":c!=n.value}]),onClick:Be(()=>s(c),["stop"]),onKeyup:[qo(()=>s(c),["enter"]),qo(()=>s(c),["space"])]},[Wt(Fe(u),1)],42,xg)),[[Y(zt),30]])),128))],512))}}),[["styles",[".scrollbar-none{scrollbar-width:none}.scrollbar-none::-webkit-scrollbar{display:none}"]]]),_g=Object.freeze(Object.defineProperty({__proto__:null,default:ba},Symbol.toStringTag,{value:"Module"})),Sg={},kg={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Cg(e,t){return b(),I("svg",kg,[...t[0]||(t[0]=[Z("path",{fill:"currentColor",d:"M11 18h2v-2h-2v2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8s8 3.59 8 8s-3.59 8-8 8zm0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5c0-2.21-1.79-4-4-4z"},null,-1)])])}const ya=be(Sg,[["render",Cg]]),Tg=Object.freeze(Object.defineProperty({__proto__:null,default:ya},Symbol.toStringTag,{value:"Module"})),Mg={},Pg={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28"};function Eg(e,t){return b(),I("svg",Pg,[...t[0]||(t[0]=[Z("path",{fill:"currentColor",d:"M14 8.25a2.25 2.25 0 1 1 0-4.5a2.25 2.25 0 0 1 0 4.5m0 8a2.25 2.25 0 1 1 0-4.5a2.25 2.25 0 0 1 0 4.5M11.75 22a2.25 2.25 0 1 0 4.5 0a2.25 2.25 0 0 0-4.5 0"},null,-1)])])}const wa=be(Mg,[["render",Eg]]),Ig=Object.freeze(Object.defineProperty({__proto__:null,default:wa},Symbol.toStringTag,{value:"Module"})),Og={key:1,class:"w-full text-center text-xl whitespace-nowrap text-ellipsis flex-shrink overflow-hidden px-5 select-text"},$g={class:"opacity-90"},zg={key:0,class:"w-full text-center text-sm text-stone-400 whitespace-nowrap text-ellipsis flex-shrink overflow-hidden mb-3 -mt-2 select-text"},wr=he({__name:"SettingsBottomSheet",props:Ye({name:{type:String},spaceTop:{type:Number},enableHelp:{type:Boolean},enableDefaultPreferences:{type:Boolean}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:Ye(["help","more"],["update:modelValue"]),setup(e,{emit:t}){const n=e,o=t,i=lt(e,"modelValue"),r=te(0),s=J(()=>n.name??location.hostname);$t({onKeyUp:a=>{a.key==="s"&&!a.metaKey&&!a.ctrlKey&&(i.value=!0)}}),je(()=>{de(i,a=>{a||setTimeout(()=>{r.value!==0&&(r.value=0)},300)})});function l(){o("help"),i.value=!1}return(a,u)=>(b(),ie(va,{modelValue:i.value,"onUpdate:modelValue":u[2]||(u[2]=c=>i.value=c),"space-top":e.spaceTop},{name:oe(()=>[e.enableDefaultPreferences?(b(),ie(ba,{key:0,modelValue:r.value,"onUpdate:modelValue":u[0]||(u[0]=c=>r.value=c),items:["Preferences","Default"]},null,8,["modelValue"])):(b(),I("h3",Og,Fe(s.value),1))]),actions:oe(()=>[e.enableDefaultPreferences?(b(),ie(Ge,{key:0,transparent:"",class:ue(e.enableHelp?"":"opacity-0 pointer-events-none"),onClick:l},{default:oe(()=>[Z("span",$g,[A(ya)])]),_:1},8,["class"])):(b(),ie(Ge,{key:1,transparent:"",onClick:u[1]||(u[1]=()=>o("more"))},{default:oe(()=>[A(wa)]),_:1}))]),default:oe(()=>[r.value===0?(b(),I(ye,{key:0},[e.enableDefaultPreferences?(b(),I("h3",zg,Fe(s.value),1)):le("",!0),Se(a.$slots,"tab-preferences")],64)):(b(),I(ye,{key:1},[Se(a.$slots,"tab-default"),u[3]||(u[3]=Z("div",{class:"h-6"},null,-1))],64))]),_:3},8,["modelValue","space-top"]))}}),Dg=Object.freeze(Object.defineProperty({__proto__:null,default:wr},Symbol.toStringTag,{value:"Module"}));function oo(e=0){return new Promise(t=>setTimeout(t,e))}const ii={};async function xa(e){Ag();const t=(()=>{const r=e.width,s=e.height;if(r&&s)return{width:r,height:s};const l=e.getBoundingClientRect();return{width:l.width,height:l.height}})(),n=await _a(e);if(n)return{size:t,src:n};const o=Lg(e);if(!o)return;const i=await _a(o);return i?{size:t,src:i}:{size:t,src:jg(o,t)}}function Ag(){var o,i;if(ii.toBlob)return;const e=document.createElement("template");e.innerHTML="<iframe></iframe>";const t=e.content.querySelector("iframe");t&&(t==null||t.style.setProperty("style","none"),document.body.appendChild(t));const n=(i=(o=t==null?void 0:t.contentWindow)==null?void 0:o.HTMLCanvasElement)==null?void 0:i.prototype;ii.toBlob=(n==null?void 0:n.toBlob)??HTMLCanvasElement.prototype.toBlob,ii.toDataURL=(n==null?void 0:n.toDataUrl)??HTMLCanvasElement.prototype.toDataURL,t&&document.body.removeChild(t)}function Lg(e){var o;const t=e.cloneNode(),n=(o=t.getContext)==null?void 0:o.call(t,"2d");if(n){try{n.drawImage(e,0,0)}catch{return}return t}}function _a(e){return new Promise(t=>{const n=o=>{if(!o)return t(void 0);const i=URL.createObjectURL(o);t(i)};try{ii.toBlob.call(e,n,"image/jpeg",1)}catch{t(void 0)}})}function jg(e,t){const n=Array.from(e.attributes);return n.forEach(o=>{o.name!=="width"&&o.name!=="height"&&e.removeAttribute(o.name)}),n.some(o=>o.name==="width")||e.setAttribute("width",`${t.width}`),n.some(o=>o.name==="height")||e.setAttribute("height",`${t.height}`),e}let ri;async function Bg(e,t){if(ri||!t.startsWith("blob:"))return t;if(ri===void 0){try{if((await fetch(t)).ok)return ri=!0,t}catch{}ri=!1}e.complete||await new Promise(l=>{let a=0;const u=setInterval(()=>{e.complete?(l(),clearInterval(u)):++a>=30&&l()},100)});const o=e.naturalWidth,i=e.naturalHeight;if(!o||!i)return;const r=document.createElement("canvas"),s=r.getContext("2d");return r.width=o,r.height=i,s==null||s.drawImage(e,0,0,o,i),await xa(r)}function Ng(e){const t=new Set,n=e.getAttributeNames(),o=n.indexOf("src"),i=o!==-1;i&&(n.splice(o,1),n.push("src"));for(const r of n){if(r==="srcset"||i&&r===":src"||r!=="data-url"&&r!=="data-original"&&!r.includes("src"))continue;const s=e.getAttribute(r);s&&(r==="src"&&e.naturalWidth&&e.naturalWidth<200||t.add(s.replace(/(\n|\t)/g," ").trim()))}return Array.from(t)}class Vg{constructor({onChanged:t}){Pe(this,"isMounted",!0);Pe(this,"elsDisposeCallbacksMap",new Map);Pe(this,"onChanged");this.onChanged=t}dispose(){this.isMounted=!1,this.elsDisposeCallbacksMap.forEach(t=>t()),this.elsDisposeCallbacksMap=new Map,this.onChanged=()=>{}}async download(t){if(!this.isMounted)return;const n=t.el;if(n){if(!Cn(n)){this.onChanged(t,{src:"",isLoading:!1,hasError:!1,invalid:!0});return}if(n instanceof HTMLCanvasElement)return await this.downloadCanvas(t,n);if(n instanceof HTMLImageElement)return await this.downloadImgEl(t,n)}t.src&&await this.downloadRawSrc(t,t.src)}async downloadCanvas(t,n){this.setupCanvasObserver(n,t);const o=await xa(n);!o||!this.isMounted||this.onChanged(t,{src:o.src,size:o.size,isLoading:!1,hasError:!1,invalid:!Qn(o.size.width,o.size.height)})}setupCanvasObserver(t,n){if(this.elsDisposeCallbacksMap.has(t))return;const o=t.getContext("2d");if(o){const i=o.drawImage.bind(o),r=o.putImageData.bind(o),s=Mn(()=>{this.isMounted&&this.download(n)},120),l=(a,u,c)=>(s(),Reflect.apply(a,u,c));try{o.drawImage=new Proxy(i,{apply:l}),o.putImageData=new Proxy(r,{apply:l})}catch{}this.elsDisposeCallbacksMap.set(t,()=>{try{o.drawImage=i,o.putImageData=r}catch{}})}}async downloadImgEl(t,n){this.setupImgElObserver(n,t);const o=Ng(n);if(o.length){this.onChanged(t,{src:o[0],isLoading:!0,hasError:!1});for(let i=0;i<o.length;i++){const r=o[i],s=await Bg(n,r);if(!s)continue;if(s&&typeof s!="string"){this.onChanged(t,{src:s.src,size:s.size,isLoading:!1,hasError:!1});return}const l=await Sa(s,n,a=>{this.isMounted&&this.onChanged(t,{src:s,size:a,isLoading:!1,hasError:!1})});if(l.ok||!this.isMounted)return;i===o.length-1&&this.onChanged(t,{src:s,isLoading:!1,hasError:!!l.error,invalid:!!l.invalid,size:l.size})}}}setupImgElObserver(t,n){if(this.elsDisposeCallbacksMap.has(t))return;let o=t.getAttribute("src");const i=new MutationObserver(r=>{r.some(l=>{if(l.attributeName!=="src")return!1;const a=o;return o=t.getAttribute("src"),!!o&&a!==o})&&this.download(n)});i.observe(t,{attributes:!0}),this.elsDisposeCallbacksMap.set(t,()=>i.disconnect())}async downloadRawSrc(t,n){this.onChanged(t,{src:n,isLoading:!0,hasError:!1});const o=await Sa(n,void 0,i=>{this.isMounted&&this.onChanged(t,{src:n,size:i,isLoading:!1,hasError:!1})});o.ok||!this.isMounted||this.onChanged(t,{src:n,isLoading:!1,hasError:!!o.error,invalid:!!o.invalid,size:o.size})}}async function Sa(e,t,n){return(t==null?void 0:t.src)===e&&t.naturalWidth&&t.naturalHeight?(n({width:t.naturalWidth,height:t.naturalHeight}),t.complete?{ok:!0}:new Promise(o=>{t.addEventListener("load",()=>o({ok:!0}),{once:!0})})):await new Promise(o=>{const i=new Image,r=setInterval(()=>{const{naturalWidth:s,naturalHeight:l}=i;if(l&&s){const a={width:s,height:l};Qn(s,l)?n(a):o({invalid:!0,size:a}),clearInterval(r)}},20);i.onerror=()=>{o({error:!0}),clearInterval(r)},i.onload=()=>setTimeout(()=>o({ok:!0}),25),i.src=e})}const Rg=3;class Hg{constructor(t){Pe(this,"download");Pe(this,"threads");Pe(this,"completedItems");Pe(this,"promisesMap",new Map);this.download=t.download}dispose(){var t;(t=this.threads)==null||t.dispose(),this.threads=void 0,this.completedItems=void 0}run({activeIndex:t,items:n}){var r;if(this.completedItems===n)return;this.completedItems=void 0,(r=this.threads)==null||r.dispose();let o=Math.max(0,t-1),i=!0;this.threads=new Fg(Rg,()=>{const s=n[o];if(!s){this.completedItems=n;return}i&&o===n.length-1?(i=!1,o=t-2):i?o++:o--;const l=s.src??s.el;if(l){const u=this.promisesMap.get(l);if(u)return u}const a=this.download(s);return l&&this.promisesMap.set(l,a),a}),this.threads.exec()}}class Fg{constructor(t,n){Pe(this,"isDisposed",!1);this.limit=t,this.getNext=n}dispose(){this.isDisposed=!0}exec(){for(let t=0;t<this.limit;t++)this.next()}async next(){if(this.isDisposed)return;const t=this.getNext();t&&(await t,await oo(20),this.next())}}function Wg(e,t){let n=[t??document.documentElement];const o=e.split("->");for(let i=0;i<o.length;i++){const r=o[i];n=n.map(s=>Array.from((s.shadowRoot??s).querySelectorAll(r))).flat()}return n}function io(e,t){if(e instanceof HTMLOptionElement){const n=e.parentElement instanceof HTMLOptGroupElement?e.parentElement.parentElement:e.parentElement;if(!n||!(n instanceof HTMLSelectElement))return;const o=e.getAttribute("value")||"";if(n.value===o)return;n.value=o,n.dispatchEvent(new Event("change"));return}e instanceof HTMLAnchorElement&&(t==null?void 0:t.preventDefault)!==!1&&e.addEventListener("click",n=>n.preventDefault(),{once:!0}),e.click(),e.dispatchEvent(new PointerEvent("pointerdown",{bubbles:!0,cancelable:!0,pointerType:"mouse",button:0})),e.dispatchEvent(new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window,button:0}))}function ka(e,t){const n=document;if(e.startsWith("//")){const i=document.evaluate(e,document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue;return i instanceof HTMLElement?i:void 0}return n.querySelector(e)??void 0}async function Ug(e){const{lstrip:t,lstripBtn:n}=e||{};if(!t||!n||!!ka(t))return!1;const i=n.split(";");for(const r of i)if(!await qg(r.trim()))return!1;return!0}async function qg(e){const t=await en(50,30,()=>ka(e));return t?(io(t),await oo(),!0):!1}class Kg{constructor({spec:t,onChanged:n}){Pe(this,"spec");Pe(this,"onChanged");Pe(this,"rawImages",[]);Pe(this,"isMounted",!0);Pe(this,"loadRawImagesTs");Pe(this,"imgListenersMap",new Map);Pe(this,"disconnectObservers");Pe(this,"contentEl");Pe(this,"reloadRawImages",mt(()=>{this.contentEl&&this.loadRawImages(this.contentEl)},100));this.spec=t,this.onChanged=n,this.init()}dispose(){var t;this.isMounted=!1,(t=this.disconnectObservers)==null||t.call(this),this.disconnectObservers=void 0,this.onChanged=()=>{}}init(){var i;const t=new MutationObserver(this.reloadRawImages),n=(i=this.spec)!=null&&i.imgDivs?void 0:(()=>{let r=window.innerWidth;return new ResizeObserver(mt(()=>{const s=window.innerWidth;if(s!==r){r=s;return}this.reloadRawImages()},50))})();this.disconnectObservers=async()=>{t.disconnect(),n==null||n.disconnect()};let o=!1;this.loadContentEl(r=>{this.contentEl!==r&&(this.contentEl=r,t.disconnect(),n==null||n.disconnect(),t.observe(this.contentEl,{childList:!0,subtree:!0}),n==null||n.observe(this.contentEl),o?this.reloadRawImages():(o=!0,this.loadRawImages(this.contentEl)))})}setRawImages(t){let n=!1;const o=t.map((i,r)=>{const s=this.rawImages[r];return s&&s.parentEl===i.parentEl&&(s.el===i.el||s.parentEl&&s.el&&!i.el)&&s.src===i.src?s:(n=!0,i)});(n||o.length!==this.rawImages.length)&&(this.rawImages=o,this.onChanged(t))}async loadContentEl(t){var l;const n=await Ug(this.spec),o=(l=this.spec)==null?void 0:l.content;if(!o){t(document.body);return}let i=await en(n?100:1,10,()=>{for(const a of o.split(",")){const u=document.querySelector(a);if(u)return u}});if(!i)return;t(i);let r=0;const s=async()=>{if(this.isMounted&&!(i!=null&&i.isConnected)){if(r=0,i=await en(50,20,()=>{const a=document.querySelector(o);return a!=null&&a.isConnected&&a!==i?a:void 0}),!i)return;t(i)}!this.isMounted||++r>=10||setTimeout(s,200)};setTimeout(s,200)}async loadRawImages(t){var r;if(!this.isMounted||!t.isConnected)return;const n=Date.now();this.loadRawImagesTs=n;const o=(r=this.spec)==null?void 0:r.imgDivs,i=o?await this.loadFromImgDivs(t,o):this.loadFromContentEl(t);this.loadRawImagesTs!==n||!t.isConnected||!this.isMounted||this.setRawImages(i)}async loadFromImgDivs(t,n){const o=Wg(n,t);return o.length?o.map(r=>{const s=Array.from(r.querySelectorAll("img:not(nav img, header img, footer img, aside img),canvas"));for(const l of s){if(!Cn(l)){this.observeInvalidImgEl(l);continue}if(l instanceof HTMLCanvasElement){if(Ca(l))return{el:l,parentEl:r}}else if(l instanceof HTMLImageElement){if(Ta(l))return{el:l,parentEl:r};this.observeInvalidImgEl(l)}}return{parentEl:r}}):this.loadFromContentEl(t)}loadFromContentEl(t){const n=[],o=Array.from(t.querySelectorAll("img:not(nav img, header img, footer img, aside img),canvas")),i=r=>{if(!Cn(r))return!1;if(r instanceof HTMLCanvasElement){if(Ca(r))return n.push({el:r}),!0}else if(Ta(r))return n.push({el:r}),!0;return!1};return o.forEach(r=>{i(r)||this.observeInvalidImgEl(r)}),n}observeInvalidImgEl(t){if(!(t instanceof HTMLImageElement)||this.imgListenersMap.has(t))return;const n=()=>{t.removeEventListener("load",n),this.imgListenersMap.delete(t),this.reloadRawImages()};this.imgListenersMap.set(t,n),t.addEventListener("load",n)}}function Ca(e){return e.isConnected&&Qn(e.width,e.height)}function Ta(e){if(!e.isConnected)return!1;const t=e.getBoundingClientRect();return!t.width&&!e.naturalWidth||!t.height&&!e.naturalHeight||Qn(t.width,t.height)}const si="mp-scroll-container";class xr{constructor(){Pe(this,"scrollEl")}dispose(){var t;(t=this.scrollEl)==null||t.classList.remove(si)}scrollTo({rawImages:t,page:n,skipIfVisible:o,isScrollDown:i,isScrollExact:r,fallbackScrollEl:s}){var O;const l=Math.floor(n),a=t[Math.min(t.length-1,l)];if(!a)return;const u=a.el??a.parentEl??(a.src?document.querySelector(`img[src^="${a.src}"]`):void 0);if(!u)return;const c=u.getBoundingClientRect();if(o&&c.top<=0&&c.top+c.height>0)return;const d=xr.getScrollable(u,s);if(!d)return;const{el:f,top:p}=d;s!==document.documentElement&&!f.classList.contains(si)&&(f!==this.scrollEl&&((O=this.scrollEl)==null||O.classList.remove(si),this.scrollEl=f),f.classList.add(si));const w=n>=t.length?c.height:r?n%1*c.height:i?Math.max(0,c.height-window.innerHeight/2):-window.innerHeight/2,y={top:p+w,behavior:"instant"};f.scrollTo(y),f!==document.documentElement&&document.documentElement.scrollTo(y)}static getScrollable(t,n){const o=(i,r)=>{if(!i)return;const{offsetTop:s,offsetParent:l}=i;if(l&&s&&r.set(l,Math.max(r.get(l)??0,s)),!(i===n||i.scrollHeight-i.clientHeight>=10&&window.getComputedStyle(i).overflow!=="visible"))return o(i.parentElement,r);let u=0;return r.forEach((c,d)=>{u+=d===l?c-s:c}),{el:i,top:u}};return o(t,new Map)}}function Ma(e){var t,n;for(let o=0;o<e.length;o++){const i=((t=e[o])==null?void 0:t.el)??((n=e[o])==null?void 0:n.parentEl),r=i==null?void 0:i.getBoundingClientRect();if(!r||r.bottom<=0)continue;const s=r.top;return o+(s>=0?0:-s/r.height)}return 0}function Zg(e){if(document.documentElement.scrollTop<700)return 0;const n=Array.from(document.querySelectorAll("img[src]")).filter(o=>e.includes(o.src)).map(o=>({el:o}));return Ma(n)}function Yg(e){var U,ee,B;const t=(U=e.raw.value)==null?void 0:U.isWebtoon,n=te(t===!1),o=te(t);let i=!1;const r=e.touchDevice&&!navigator.userAgent.toLowerCase().includes("android"),s=((B=(ee=e.raw.value)==null?void 0:ee.imgs)==null?void 0:B.filter(Boolean))??[];let l=e.isAutoShow!==!1?e.page.value:s.length?Zg(s):void 0,a=s.map(C=>({src:C})),u,c;const d=new Map,f=({src:C,el:X})=>{const S=X??C;return S?d.get(S):void 0},p=te(s.map(C=>({src:C,isLoading:!0,hasError:!1}))),w=()=>{const C=[];a.forEach(X=>{const{src:S,el:Q}=X,F=Q??S,_=F?d.get(F):void 0;(F&&!(_!=null&&_.invalid)||X.parentEl)&&C.push(_)}),p.value=C};let y=setTimeout(e.onTimeout,2e4);const O=()=>{y&&(clearTimeout(y),y=void 0)};let M=0,L=0;const $=4,m=new Vg({onChanged(C,X){const S=C.el??C.src;if(!S||(d.set(S,X),w(),X.isLoading))return;if(X.hasError){if(c||o.value!==void 0)return;c=setTimeout(()=>{c=void 0,o.value===void 0&&e.onError("Failed to load images")},3e3);return}const{size:Q,invalid:F}=X;if(!(!Q||F)){if(!o.value&&L<$){const _=i?a:a.filter(({el:ae,src:pe})=>pe||!(ae&&ae instanceof HTMLImageElement&&!d.has(ae)));let x=_.indexOf(C);if(i&&x>4||x===-1&&(C.el&&(x=_.findIndex(ae=>ae.el===C.el)),x===-1))return;const j=x>Math.min(1,_.length-3)&&x<Math.max(_.length-2,3),K=Q.width/Q.height;K>2&&M++;const D=K<.5||M>=$,ge=!D&&.65<K&&K<.75;ge&&L++,o.value!==D&&(j||D)&&(o.value=D),j&&n.value!=ge&&(n.value=!0),o.value===void 0&&ge&&L===$&&(o.value=!1)}W()}}}),h=new Hg({download:async C=>{!(C.el&&d.has(C.el))&&!(C.src&&d.has(C.src))&&await m.download(C)}}),T=()=>{h.run({items:a,activeIndex:Math.min(a.length-1,Math.floor(e.page.value))})},H=new xr;if(s.length)T();else{let C=!1;u=new Kg({spec:e.spec,async onChanged(X){var S;if(a=X,w(),!e.raw.value&&!X.length){e.onError("no_img");return}(S=e.spec)!=null&&S.imgDivs&&!C&&e.isAutoShow!==!1&&e.page.value&&(C=!0,H.scrollTo({rawImages:X,page:e.page.value,skipIfVisible:!0,fallbackScrollEl:r?document.body:document.documentElement,isScrollDown:!0}),await oo(1)),l===void 0&&e.isAutoShow===!1&&(l=Ma(X)),T()}})}Ei(()=>{m.dispose(),h.dispose(),u==null||u.dispose(),c&&clearTimeout(c),H.dispose(),i&&H.scrollTo({rawImages:a,page:e.page.value,fallbackScrollEl:document.documentElement,isScrollExact:!0})});function W(){if(i||o.value===void 0||l===void 0)return;const C=Math.max(0,Math.min(l,a.length)),X=Math.min(Math.floor(C),a.length-1);if(X>=1){const Q=a[X];if(!Q||!f(Q)){e.isAutoShow&&H.scrollTo({rawImages:a,page:X,fallbackScrollEl:r?document.body:document.documentElement,isScrollDown:!0});return}for(let F=X;F<a.length;F++){const _=f(a[F]);if(!_)return;if(!_.invalid){if(!_.size&&!_.hasError)return;break}}for(let F=X-1;F>=0;F--){const{src:_,el:x}=a[F],j=x??_;if(!j)break;const K=d.get(j);if(!K)return;if(!K.invalid){if(!K.size&&!K.hasError)return;break}}}if(i)return;i=!0,O(),e.onReady(C);let S=!0;de(()=>Math.floor(e.page.value),(Q,F)=>{Q===F&&!S||(H.scrollTo({rawImages:a,page:Q,isScrollDown:F===void 0||Q>F||a.length===1,skipIfVisible:S&&a.length>1,fallbackScrollEl:r?document.body:document.documentElement}),S=!1,F??(F=-1),T())},{immediate:!0})}return{asyncImgs:J(()=>p.value),isWebtoon:J(()=>o.value??!1),isManga:J(()=>n.value)}}function Pa({touchDevice:e,isBusy:t,isPlaying:n,isIdle:o,hideControlsEvent:i,scrollEl:r,moveThreshold:s}){const l=te(!0);let a=!1,u=!1;const c={x:0,y:0};let d;Pt(()=>{d==null||d(),d=void 0});function f(M){if(i.value===nn.never||t.value&&l.value)return;const L=typeof M=="boolean"?M:!l.value;L!==l.value&&(l.value=L,!a&&!L&&(a=!0))}function p(){r.value&&(c.x=r.value.scrollLeft,c.y=r.value.scrollTop)}function w(){const M=i.value===nn.firstMove,L=r.value;if(!L)return;const $=Mn(()=>{if(!l.value){Xg(L)&&f(!0);return}if(M&&a)return;const m=Math.abs(L.scrollTop-c.y)||Math.abs(L.scrollLeft-c.x),h=s??(M?c.y===0?300:200:150);m>h&&f(!1)},100);L.addEventListener("scroll",$),d=()=>{L.removeEventListener("scroll",$)}}function y(){switch(d==null||d(),d=void 0,i.value){case nn.onLoad:a||f(!1);break;case nn.firstMove:w();break;case nn.move:w();break;case nn.never:l.value||(l.value=!0);break}}function O(){u||(u=!0,p(),y(),e&&de(Xi(),L=>{L==="hidden"&&!n.value&&!l.value&&f(!0)}),de(t,M=>{M&&!l.value&&f()}),de(n,M=>{M||f(!0)}),de(o,M=>{n.value&&f(!M)}),de(l,M=>{M&&p()}),de(i,()=>y()),de(r,()=>y()))}return{visible:J(()=>l.value),toggle:f,activate:O}}function Xg(e){const t=Math.max(0,e.scrollTop),n=Math.abs(e.scrollLeft);if(n<10&&t<10)return!0;const{scrollHeight:o,clientHeight:i}=e;if(o>i)return t>o-i-10;const{scrollWidth:s,clientWidth:l}=e;return s>l&&n>s-l-10}function Gg(e,t,n){return J(()=>t.value?Ea(e.value,n.value):e.value.map((o,i)=>[{img:o,index:i}]))}function Ea(e,t,n=0){if(e.length===0)return[];const o=e.slice(0,2),i=o.some(s=>(s==null?void 0:s.size)&&s.size.width>s.size.height),r=i||t?[o[0]]:o;return[r.map((s,l)=>({img:s,index:n+l})),...Ea(e.slice(r.length),t&&i,n+r.length)]}const _r=40;function Jg({page:e,asyncImgs:t,direction:n,style:o,isLongStrip:i,isVertical:r,isRTL:s,spaceTop:l,scrollEl:a,isWebtoon:u,interferePlayer:c,onChangedPage:d,onFinished:f}){let p=!1,w=!1,y,O=!1,M,L;const $=mt(ee,300),m=Mn(()=>{ee(),$()},300);function h(){const x=new Promise(j=>{y=()=>{y=void 0,j()}});return W(e.value,{smooth:!1,ensureLastImgVisibility:!0}),x}function T(){var x;w=!0,y==null||y(),B(),(x=a.value)==null||x.addEventListener("scroll",m),setTimeout(()=>{const{width:j,height:K}=hn();de(()=>`${K.value}-${j.value}`,H),de(o,H),de(n,H),de(()=>t.value,(D,ge)=>{!ge||D.length===ge.length||s.value&&H()})},300)}function H(){const x=a.value;if(!x)return;const j=Date.now();L=j;const{scrollWidth:K,scrollHeight:D}=x,ge=e.value,ae=Math.floor(ge),pe=t.value[ae];en(20,10,async()=>{if(L!==j)return!0;if(x.scrollWidth===K&&x.scrollHeight===D)return;let ve=ge;if(pe){const we=t.value.findIndex(Ae=>Ae===pe||(Ae==null?void 0:Ae.src)===pe.src);we!==-1&&ae!==we&&(ve=we+ge-ae)}return await W(ve),!0})}async function W(x,{smooth:j,ensureLastImgVisibility:K=!1}={smooth:!1}){return new Promise(D=>{const ge=a.value;if(!ge){D();return}p=!0;const ae=async()=>{await ht(),p=!1,w||T(),D()},pe=Math.floor(x),ve=yr(ge,pe);if(!ve){ae();return}c(async()=>{await U(ge,!i.value&&j,async()=>{await _(ge,ve,{smooth:j,page:x,ensureLastImgVisibility:K})}),await ae()})})}async function U(x,j,K){j&&x.style.setProperty("scroll-snap-type","none"),await K(),j&&x.style.removeProperty("scroll-snap-type")}function ee(){if(p)return;const x=X();x!==void 0&&x!==e.value&&d(x),B()}function B(){O||!O&&C()&&(O=!0,f())}function C(){const x=a.value;if(!x)return!1;const j=!i.value||u.value?3:!r.value&&x.clientWidth>x.clientHeight?2.25:2.5;return r.value?x.scrollHeight-x.scrollTop<x.clientHeight*j:x.scrollWidth-(s.value?-x.scrollLeft:x.scrollLeft)<x.clientWidth*j}function X(){const x=S();return x?(+x.getAttribute("data-index")||0)+(i.value?Q(x):0):void 0}function S(){var j;if(M??(M=a.value.getRootNode()),!M)return;const x=(j=M.elementsFromPoint)==null?void 0:j.call(M,r.value||!i.value?window.innerWidth/2:s.value?window.innerWidth-_r:_r,r.value&&i.value?l.value||_r:window.innerHeight/2);if(x)for(let K=0;K<x.length;K++){const D=x[K];if(D.hasAttribute("data-index"))return D;if(D===a.value)break}}function Q(x){const j=x.getBoundingClientRect();return r.value?Math.abs(j.top-l.value)/j.height:s.value?Math.max(0,j.right-a.value.clientWidth)/j.width:Math.abs(j.left)/j.width}let F=!1;async function _(x,j,K){if(F)return;const D=j.getBoundingClientRect();if(!i.value){if(r.value){if(D.top<=0&&D.bottom>=x.clientHeight)return}else if(D.left<=0&&D.right>=x.clientWidth)return}F=!0;const ge=r.value?x.scrollTop:x.scrollLeft,ae=K.page,pe=i.value?ae%1:0,ve=await en(30,10,async()=>{await oo();let De;if(!(j.offsetHeight<10))return i.value?r.value?De=j.offsetTop+pe*j.offsetHeight-l.value:s.value?De=j.offsetLeft-x.clientWidth+j.offsetWidth-pe*j.offsetWidth:De=j.offsetLeft+pe*j.offsetWidth:r.value?De=j.offsetTop+(D.top>0?0:D.height-x.clientHeight):De=j.offsetLeft+(D.left>0?0:D.width-x.clientWidth),ae>.5&&Math.abs(De)<100?void 0:De})??0,we=K.ensureLastImgVisibility?r.value?Math.min(ve,x.scrollHeight-x.clientHeight*2):s.value?Math.max(ve,-(x.scrollWidth-x.clientWidth*2)):Math.min(ve,x.scrollWidth-x.clientWidth*2):ve;if(!K.smooth){r.value?x.scrollTop=we:x.scrollLeft=we,F=!1;return}const Ae=we-ge,ct=30;let Qe=0;return new Promise(De=>{(function Pn(){const g=Qg(Qe,ge,Ae,ct);r.value?x.scrollTop=g:x.scrollLeft=g,Qe++,Qe<=ct?requestAnimationFrame(Pn):(De(),F=!1)})()})}return{init:h,goToPage:W}}function Qg(e,t,n,o){return n*(Math.pow(e/o-1,3)+1)+t}class em{constructor(t){Pe(this,"player");Pe(this,"debounceStartPlayer");Pe(this,"isPlaying");Pe(this,"isIdle",te(!1));Pe(this,"onIdle");this.player=t.player,this.debounceStartPlayer=mt(()=>this.player.start(),100);const n=te(t.autoPlay||sessionStorage.getItem("mp:playing")==="true");this.isPlaying=J({get:()=>n.value,set:o=>{n.value=o,sessionStorage.setItem("mp:playing",o?"true":"false")}}),this.onIdle=mt(()=>{this.isIdle.value=!0},t.touchDevice?2e3:1e3),this.awake(),t.touchDevice||St(window,"mousemove",()=>this.awake()),je(()=>{t.touchDevice||de(Xi(),i=>{this.isPlaying.value&&(i==="visible"?this.player.start():this.player.stop())}),de(t.speed,()=>this.interfere()),de(t.isBusy,o=>{!o&&this.isIdle.value&&this.awake()})}),Pt(()=>this.stop())}activate(){this.isPlaying.value&&this.player.start()}toggle(){this.isPlaying.value?this.stop():this.start()}async interfere(t){this.isPlaying.value&&this.player.stop(),t&&(await ht(),await t()),this.isPlaying.value&&this.debounceStartPlayer()}stop(){this.isPlaying.value&&(this.isPlaying.value=!1,this.player.stop(),this.awake())}start(){this.isPlaying.value||(this.isPlaying.value=!0,this.player.start(),this.awake())}pause(){this.player.stop()}resume(){this.player.start()}awake(){setTimeout(()=>{this.isIdle.value=!1,this.onIdle()},30)}}class Ia extends em{getMaxOffset(t){return t.scrollHeight-t.clientHeight}getScrollOffset(t){return t.scrollTop}setScrollOffset(t,n){t.scrollTop+=n}constructor(t){let n,o;const{scrollEl:i,speed:r}=t;super({...t,player:{stop:()=>o==null?void 0:o(),start:()=>{const s=i.value;if(!this.isPlaying.value||!s)return;const l=this.getMaxOffset(s),a=this.getScrollOffset(s);if(l<=a){this.stop();return}o=()=>{n=Date.now(),o=void 0};const u=Date.now();n=u;const c=.1*r.value;let d=Date.now(),f=0;const p=()=>{if(n!==u)return;const w=Date.now(),y=w-d;d=w;const O=c*y+f;O>=1?(f=O%1,this.setScrollOffset(s,O-f)):f=O,setTimeout(p,1)};p()}}})}}class tm extends Ia{constructor(n){super(n);Pe(this,"isLongStrip");Pe(this,"isVertical");Pe(this,"isRTL");const{isLongStrip:o,isVertical:i,isRTL:r}=n;this.isLongStrip=o,this.isVertical=i,this.isRTL=r,o!==void 0&&je(()=>{de(o,s=>{s||stop()})})}getMaxOffset(n){return this.isVertical.value?n.scrollHeight-n.clientHeight:n.scrollWidth-n.clientWidth}getScrollOffset(n){return this.isVertical.value?n.scrollTop:this.isRTL.value?-n.scrollLeft:n.scrollLeft}setScrollOffset(n,o){n[this.isVertical.value?"scrollTop":"scrollLeft"]+=o*(this.isRTL.value?-1:1)}start(){var n;((n=this.isLongStrip)==null?void 0:n.value)!==!1&&super.start()}}function nm(e){return new tm(e)}function om({speed:e,fontSize:t,lineHeight:n,...o}){const i=hn().width;return new Ia({...o,speed:J(()=>{const r=900/Math.min(900,i.value)/3.5,s=t.value/48*1.75,l=n.value/96*1.75,a=r*s*l;return e.value*a})})}const im={key:3,class:"fixed inline-block left-1/2 -translate-x-1/2 bottom-0 p-2 sm:p-3 pb-6 md:pb-5 lg:pb-3"},Oa=he({inheritAttrs:!1,__name:"GearSecond",props:{chapterNavData:{type:Object},busy:{type:Boolean},defaultPreferences:{type:Object},immediate:{type:Boolean},appVersion:{type:String},raw:{type:Object},spec:{type:Object},siteMeta:{type:null},page:{type:Number},spaceTop:{type:Number},touchDevice:{type:Boolean},entryId:{type:String},isAutoShow:{type:Boolean},tourEnabled:{type:Boolean},offlineMode:{type:Boolean}},emits:["clickEntryButton","hideReader","openHelpScreen","error","crash","ready","pageChanged","playingChanged","tourEnabledChanged","dispose","openEntry","addEntry","finished","getHiddenChapters","hapticFeedback","pressedBack","selectChapter","timeout","openDefaultPreferences","defaultPreferencesChanged","controlsVisibilityChanged"],setup(e,{emit:t}){var N,R;const n=e,o=t,i=te(!1),r=te(!1),s=J(()=>n.busy),l=J(()=>n.page),a=J(()=>n.immediate||i.value?n.spaceTop??0:0),u=J(()=>!n.touchDevice&&S.isIdle.value&&!n.busy&&!T.value),{asyncImgs:c,isWebtoon:d}=Yg({raw:J(()=>n.raw),spec:n.spec,page:l,touchDevice:n.touchDevice,isAutoShow:n.isAutoShow,async onReady(E){ae(E),i.value=!0},onError:()=>o("error"),onTimeout:()=>o("timeout")}),{direction:f,style:p,isRTL:w,isDouble:y,isVertical:O,isLongStrip:M,gap:L,speed:$,zoom:m,breakFirst:h}=_h({touchDevice:n.touchDevice,isWebtoon:d,titleName:(N=n.raw)==null?void 0:N.title.name,defaultPreferences:J(()=>n.defaultPreferences)}),T=te(!1),H=Gg(c,y,h),W=J(()=>c.value.length),U=J(()=>l.value>=W.value),ee=te(null),B=te(null),C=J(()=>{var E;return(E=B.value)==null?void 0:E.rootEl}),X=te(!1),S=nm({autoPlay:!n.tourEnabled&&(((R=n.defaultPreferences)==null?void 0:R.autoPlay)??!1),touchDevice:n.touchDevice,scrollEl:C,speed:$,isRTL:w,isVertical:O,isLongStrip:M,isBusy:s}),Q=J({get(){return m.value},set(E){S.interfere(()=>{m.value=E})}}),F=Pa({touchDevice:n.touchDevice,isBusy:s,isPlaying:J(()=>S.isPlaying.value),isIdle:J(()=>S.isIdle.value),hideControlsEvent:J(()=>n.defaultPreferences.hideControlsEvent),scrollEl:C}),_=F.visible,x=Jg({page:l,asyncImgs:c,style:p,direction:f,isLongStrip:M,isVertical:O,isRTL:w,spaceTop:a,isWebtoon:d,scrollEl:J(()=>{var E;return(E=B.value)==null?void 0:E.rootEl}),interferePlayer:E=>S.interfere(E),onChangedPage:ae,onFinished:()=>o("finished")}),j=J(()=>Math.floor(l.value)),K=J(()=>M.value?l.value:y.value?Pn():Math.floor(l.value)),D=()=>S.interfere(()=>oo(100));$t({onKeyDown:E=>{if(n.tourEnabled)return!0;const k=M.value&&O.value,V=M.value&&!O.value,z=!M.value&&O.value,se=!M.value&&!O.value;switch(E.key){case" ":E.preventDefault(),M.value||g();break;case"ArrowUp":case"PageUp":k?D():z&&j.value!==0&&(E.preventDefault(),Qe());break;case"ArrowDown":case"PageDown":k?D():z&&!U.value&&(E.preventDefault(),De());break;case"ArrowLeft":V?D():se?(E.preventDefault(),Ae()):O.value&&we();break;case"ArrowRight":V?D():se?(E.preventDefault(),ct()):O.value&&ve();break}},onKeyUp:E=>{switch(E.key){case"b":h.value=!h.value;break}}}),de(S.isPlaying,E=>{o("playingChanged",E)}),de(_,E=>{o("controlsVisibilityChanged",E)});async function ge(){await x.init(),o("ready"),r.value=!0,F.activate(),S.activate()}function ae(E){if(l.value===E)return;const k=c.value.length;if(E<0||E>=k+1)return;const V=l.value;if(o("pageChanged",E),E<.01&&V>E){S.awake();return}}function pe(){!n.touchDevice&&!M.value&&x.goToPage(j.value,{smooth:!0})}function ve(E=!1){var k,V;(V=(k=n.chapterNavData)==null?void 0:k.next)==null||V.call(k,E)}function we(E=!1){var k,V;(V=(k=n.chapterNavData)==null?void 0:k.prev)==null||V.call(k,E)}function Ae(){w.value?De():Qe()}function ct(){w.value?Qe():De()}function Qe(){var V;const E=H.value,k=U.value?E[E.length-1][0].index:(V=E[Pn()-1])==null?void 0:V[0].index;k!==void 0?x.goToPage(k):we()}function De(){var E,k;if(U.value)ve();else{const V=((k=(E=H.value[Pn()+1])==null?void 0:E[0])==null?void 0:k.index)??c.value.length;x.goToPage(V)}}function Pn(){const E=j.value,k=H.value.findIndex(V=>V.some(({index:z})=>z===E));return k===-1?H.value.length-1:k}function g(E){F.toggle(E)}function v(){if(S.isPlaying.value){_.value||!n.touchDevice?S.stop():(S.awake(),F.toggle(!0));return}F.toggle()}function P(){S.stop(),o("clickEntryButton")}function q(){F.toggle(!1),S.isPlaying.value&&S.stop(),o("openHelpScreen")}return(E,k)=>e.immediate||i.value?(b(),ie(gr,{key:0,ref_key:"gearLayout",ref:ee,loading:!r.value,immediate:!!e.immediate,"hide-cursor":u.value,class:"text-stone-100",onClick:k[20]||(k[20]=Be(()=>{},["stop"]))},{default:oe(()=>{var V,z,se,ne;return[i.value?(b(),ie(ga,{key:0,ref_key:"body",ref:B,zoom:Q.value,"onUpdate:zoom":k[1]||(k[1]=G=>Q.value=G),zooming:T.value,"onUpdate:zooming":k[2]||(k[2]=G=>T.value=G),page:l.value,"page-index":j.value,pages:Y(H),"total-imgs":Y(c).length,direction:Y(f),gap:Y(L),"is-long-strip":Y(M),isRTL:Y(w),"is-double":Y(y),"is-vertical":Y(O),"space-top":a.value||0,busy:s.value,"play-controller":Y(S),"touch-device":e.touchDevice,"pinch-to-zoome":((V=e.defaultPreferences)==null?void 0:V.pinchToZoom)??!0,"tap-zone":(z=e.defaultPreferences)==null?void 0:z.tapZone,"controls-visible":Y(_),onReady:ge,onPrev:Qe,onNext:De,onClick:v,onDragEnd:pe,onWheelPassive:k[3]||(k[3]=()=>Y(S).interfere())},Ii({_:2},[i.value&&Y(c).length?{name:"end",fn:oe(()=>{var G,ce;return[A(Qi,{"has-next":!!((G=e.chapterNavData)!=null&&G.next),"offline-mode":!!e.offlineMode,seconds:((ce=e.defaultPreferences)==null?void 0:ce.autoNextSeconds)??5,"show-add-button":Y(m)===1&&!e.entryId&&!!e.raw&&!e.offlineMode,onNext:ve,onAddToLibrary:P,onHide:k[0]||(k[0]=()=>o("hideReader"))},null,8,["has-next","offline-mode","seconds","show-add-button"])]}),key:"0"}:void 0]),1032,["zoom","zooming","page","page-index","pages","total-imgs","direction","gap","is-long-strip","isRTL","is-double","is-vertical","space-top","busy","play-controller","touch-device","pinch-to-zoome","tap-zone","controls-visible"])):le("",!0),A(wr,{modelValue:X.value,"onUpdate:modelValue":k[10]||(k[10]=G=>X.value=G),"enable-help":"",name:(se=e.raw)==null?void 0:se.title.name,"space-top":a.value,"enable-default-preferences":!e.touchDevice||!!e.appVersion,onHelp:q,onMore:k[11]||(k[11]=()=>o("openDefaultPreferences"))},{"tab-preferences":oe(()=>[A(fa,{"enable-reset":!e.touchDevice||!!e.appVersion,webtoon:Y(d),"reader-style":Y(p),"onUpdate:readerStyle":k[4]||(k[4]=G=>ze(p)?p.value=G:null),direction:Y(f),"onUpdate:direction":k[5]||(k[5]=G=>ze(f)?f.value=G:null),gap:Y(L),"onUpdate:gap":k[6]||(k[6]=G=>ze(L)?L.value=G:null),speed:Y($),"onUpdate:speed":k[7]||(k[7]=G=>ze($)?$.value=G:null),zoom:Q.value,"onUpdate:zoom":k[8]||(k[8]=G=>Q.value=G),"default-preferences":e.defaultPreferences},null,8,["enable-reset","webtoon","reader-style","direction","gap","speed","zoom","default-preferences"])]),"tab-default":oe(()=>[A(pr,{"model-value":e.defaultPreferences,"onUpdate:modelValue":k[9]||(k[9]=G=>o("defaultPreferencesChanged",G))},null,8,["model-value"])]),_:1},8,["modelValue","name","space-top","enable-default-preferences"]),r.value&&!U.value&&!e.tourEnabled?(b(),ie(aa,{key:1,direction:Y(f),"tap-zone":(ne=e.defaultPreferences)==null?void 0:ne.tapZone},null,8,["direction","tap-zone"])):le("",!0),r.value&&!U.value?(b(),ie(mr,{key:2,playing:Y(S).isPlaying.value},null,8,["playing"])):le("",!0),A(ca,{visible:Y(_),"space-top":a.value},Ii({top:oe(()=>{var G;return[e.raw||e.offlineMode?(b(),ie(er,{key:0,"offline-mode":e.offlineMode,raw:e.raw,onClick:k[12]||(k[12]=()=>o("pressedBack"))},null,8,["offline-mode","raw"])):le("",!0),!e.touchDevice&&!e.offlineMode?(b(),ie(Go,{key:1,onClick:k[13]||(k[13]=()=>o("hideReader"))})):le("",!0),e.chapterNavData?(b(),ie(ar,{key:2,"touch-device":e.touchDevice,"chapter-spec":(G=e.spec)==null?void 0:G.chapter,data:e.chapterNavData,rtl:Y(w),onGetHiddenChapters:k[14]||(k[14]=()=>o("getHiddenChapters")),onPrev:we,onNext:ve},null,8,["touch-device","chapter-spec","data","rtl"])):le("",!0)]}),"bottom-right":oe(()=>[!e.offlineMode&&e.raw?(b(),ie(tr,{key:0,"entry-id":e.entryId,onClick:P},null,8,["entry-id"])):le("",!0),A(rr,{disabled:!i.value,onClick:k[15]||(k[15]=()=>X.value=!0)},null,8,["disabled"]),e.touchDevice?le("",!0):(b(),ie(sr,{key:1,onRequestFullScreen:k[16]||(k[16]=()=>{var G,ce;return(ce=(G=ee.value)==null?void 0:G.rootEl)==null?void 0:ce.requestFullscreen()})})),Y(M)?(b(),ie(ir,{key:2,"tour-message":"Press here to play like a video",playing:Y(S).isPlaying.value,disabled:!r.value,onClick:k[17]||(k[17]=()=>Y(S).toggle())},null,8,["playing","disabled"])):le("",!0),Y(y)?(b(),ie(Ge,{key:3,title:"Break 1st page (B)","data-tour":"Press here to separate the first page from double-page mode",disabled:!r.value,onClick:k[18]||(k[18]=()=>h.value=!Y(h))},{default:oe(()=>[Y(h)?(b(),ie(da,{key:0})):(b(),ie(ua,{key:1}))]),_:1},8,["disabled"])):le("",!0)]),progress:oe(()=>{var G,ce;return[((G=e.defaultPreferences)==null?void 0:G.progressSize)!==0&&!U.value?(b(),ie(vr,{key:0,value:K.value,total:Y(H).length,"long-strip":Y(M),height:((ce=e.defaultPreferences)==null?void 0:ce.progressSize)??2,rtl:Y(w)},null,8,["value","total","long-strip","height","rtl"])):le("",!0)]}),default:oe(()=>[e.appVersion&&a.value&&!e.offlineMode?(b(),I("div",{key:0,class:"fixed top-0 left-0 right-0 bg-black bg-opacity-70 pointer-events-auto",style:Ce({height:`${a.value}px`})},null,4)):le("",!0)]),_:2},[Y(H).length?{name:"bottom-left",fn:oe(()=>[A(pa,{"model-value":j.value,disabled:!r.value,pages:Y(H),"total-imgs":Y(c).length,"onUpdate:modelValue":Y(x).goToPage},null,8,["model-value","disabled","pages","total-imgs","onUpdate:modelValue"])]),key:"0"}:void 0]),1032,["visible","space-top"]),Y(_)||T.value?(b(),I("div",im,[A(Gn,{"enter-from-class":"opacity-0","leave-to-class":"opacity-0"},{default:oe(()=>[T.value||Y(m)!==1?(b(),ie(ql,{key:0,zoom:Q.value,onClick:k[19]||(k[19]=Be(()=>Q.value=1,["stop"])),class:"duration-200"},null,8,["zoom"])):le("",!0)]),_:1})])):le("",!0),Se(E.$slots,"default")]}),_:3},8,["loading","immediate","hide-cursor"])):le("",!0)}}),rm=Object.freeze(Object.defineProperty({__proto__:null,default:Oa},Symbol.toStringTag,{value:"Module"}));function sm({sel:e,heading:t,paraSel:n}){const o=["H1","H2","H3","H4","H5","H6","P","BLOCKQUOTE","PRE","CODE"],i=["BR","HR"],r=["BUTTON","FIGURE","IMG","SCRIPT","SELECT","INPUT","FORM","IFRAME","NAV","FOOTER","ASIDE","TABLE"],s=lm(e),l=am(s),a=u(s);if(!a)return;return{el:a,isRTL:l};function u(f){var m;let p=0,w=!1,y=0,O=0,M=!1;const L=(m=$(f,o.includes(f.tagName)||!!n&&f.matches(n)))==null?void 0:m.node;if(!L)return;if(t){const h=document.createElement("h1");h.innerText=t,L.prepend(h)}return d(L),c(L),L;function $(h,T=!1){var _;if(M)return;if(h.nodeType===Node.TEXT_NODE)return T&&((_=h.textContent)!=null&&_.trim())?{node:h.cloneNode()}:void 0;if(h.nodeType!==Node.ELEMENT_NODE)return;const W=h.tagName;if(r.includes(W)||W==="A"&&(w||!T))return;if(i.includes(W))return T?{node:document.createElement(W),isEmpty:!0}:{aborted:!0};if(h.getAttribute("aria-hidden")==="true"||!Cn(h)||window.getComputedStyle(h).position==="fixed")return;const ee=!!n&&h.matches(n),B=ee||o.includes(W),C=T||B,X=[];if(Array.from(h.childNodes).forEach(x=>{if(M)return;const j=$(x,C);if(j!=null&&j.aborted)return;const K=j==null?void 0:j.node;if(K){if(O=j!=null&&j.isEmpty?O+1:0,O>2)return;X.push(K),w?y=0:++p>30&&(w=!0)}else w&&++y>30&&(M=!0)}),!X.length)return B?{node:document.createElement("br"),isEmpty:!0}:void 0;const Q=document.createElement(ee?"p":W==="BODY"?"div":W==="a"?"span":W),F=h.getAttribute("dir");return F&&F!=="auto"&&Q.setAttribute("dir",F),X.forEach(x=>Q.appendChild(x)),{node:Q}}}function c(f){za(f,p=>{if(p===f)return;const w=p.tagName;if(i.includes(w)||o.includes(w))return;const y=p.parentElement;if((y==null?void 0:y.childNodes.length)===1){Array.from(p.childNodes).forEach(L=>{y.appendChild(L)}),y.removeChild(p);return}p.childNodes.length===1&&p.replaceWith(p.childNodes[0])})}function d(f){let p=!1;const w=[];Sr(f,y=>o.includes(y.tagName)?[]:Array.from(y.children),y=>{const O=y.textContent.trim();if(!O)return!0;if(p)return!1;if(p=!$a(y),w.includes(O))return!0;if(p)return!1;w.push(O)}),Sr(f,y=>o.includes(y.tagName)?[]:Array.from(y.children).reverse(),y=>!y.textContent.trim()||$a(y))}}function $a(e){const t=e.nodeName;return t.length===2&&t.startsWith("H")}function lm(e){const t=(e??"main,article").split(",").filter(Boolean);for(const o of t){const i=document.querySelector(o);if(i)return i}const n=document.querySelector("p:has(+ p), h1, h2");if(n){let o=n;for(;o!==document.body;)o=o.parentElement;return o}return document.body}function am(e){if(e.getAttribute("dir")==="rtl")return!0;const t=e.querySelector("p")||e.querySelector("div:not(:empty)")||e;return t.getAttribute("dir")==="rtl"?!0:window.getComputedStyle(t).direction==="rtl"}function za(e,t){Array.from(e.children).forEach(o=>{za(o,t)}),t(e)}function Sr(e,t,n){const o=t(e);let i=!1;for(let r=0;r<o.length;r++){const s=o[r],l=Sr(s,t,n);if(l!==void 0){if(!l)return!1;cm(s)}else i=!0}if(!i)return n(e)}function cm(e){var t;(t=e.parentNode)==null||t.removeChild(e)}const um={key:1,class:"h-14 sm:h-16 px-2 2xs:px-3 flex gap-1 2xs:gap-3 items-center"},dm={class:"md:fixed left-0 right-0 bottom-0"},fm={class:"p-2 2xs:px-3 sm:py-3 pb-6 md:pb-5 lg:pb-3 flex md:flex-col gap-4 justify-between items-center"},Da=he({__name:"GearThirdControlsLayout",props:{visible:{type:Boolean},hideTopControls:{type:Boolean},spaceTop:{type:null}},setup(e){return(t,n)=>(b(),I(ye,null,[Z("div",{class:ue(["fixed left-0 right-0 top-0 bg-inherit z-30",{"opacity-0 pointer-events-none":!e.visible}])},[e.spaceTop?(b(),I("div",{key:0,style:Ce({height:`${e.spaceTop}px`})},null,4)):le("",!0),e.hideTopControls?le("",!0):(b(),I("div",um,[Se(t.$slots,"top-controls")]))],2),Z("div",{class:ue(["fixed left-0 right-0 bottom-0 md:left-auto z-30 bg-inherit md:bg-transparent",{"opacity-0 pointer-events-none":!e.visible}])},[Z("div",dm,[Se(t.$slots,"progress")]),Z("div",fm,[Se(t.$slots,"bottom-controls")])],2),Se(t.$slots,"default")],64))}}),pm=Object.freeze(Object.defineProperty({__proto__:null,default:Da},Symbol.toStringTag,{value:"Module"})),hm={},gm={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function mm(e,t){return b(),I("svg",gm,[...t[0]||(t[0]=[Z("path",{fill:"currentColor",d:"M16 13q-.425 0-.712-.288T15 12t.288-.712T16 11h6q.425 0 .713.288T23 12t-.288.713T22 13zM4.675 15.425l-1.025 2.85q-.125.35-.4.538T2.625 19q-.575 0-.913-.487t-.137-1.038l4.4-11.725Q6.1 5.4 6.4 5.2t.65-.2h.9q.375 0 .663.2t.412.55L13.45 17.5q.2.55-.137 1.025T12.4 19q-.35 0-.65-.2t-.425-.55l-1-2.825zM5.4 13.4h4.2L7.55 7.6h-.1z"},null,-1)])])}const Aa=be(hm,[["render",mm]]),vm=Object.freeze(Object.defineProperty({__proto__:null,default:Aa},Symbol.toStringTag,{value:"Module"})),bm={},ym={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function wm(e,t){return b(),I("svg",ym,[...t[0]||(t[0]=[Z("path",{fill:"currentColor",d:"m4.675 15.425l-1.025 2.85q-.125.35-.4.538T2.625 19q-.575 0-.913-.487t-.137-1.038l4.4-11.725Q6.1 5.4 6.4 5.2t.65-.2h.9q.375 0 .663.2t.412.55L13.45 17.5q.2.55-.137 1.025T12.4 19q-.35 0-.65-.2t-.425-.55l-1-2.825zM5.4 13.4h4.2L7.55 7.6h-.1zM18 13h-2q-.425 0-.712-.288T15 12t.288-.712T16 11h2V9q0-.425.288-.712T19 8t.713.288T20 9v2h2q.425 0 .713.288T23 12t-.288.713T22 13h-2v2q0 .425-.288.713T19 16t-.712-.288T18 15z"},null,-1)])])}const La=be(bm,[["render",wm]]),xm=Object.freeze(Object.defineProperty({__proto__:null,default:La},Symbol.toStringTag,{value:"Module"})),ja=be(he({__name:"NovelBody",props:{hideTopControls:{type:Boolean},progress:{type:Number},touchDevice:{type:Boolean},busy:{type:Boolean},spaceTop:{type:null},content:{type:null},rtl:{type:Boolean},titlePreferences:{type:Object},defaultPreferences:{type:Object}},emits:["ready","click","progressChanged","finished"],setup(e,{expose:t,emit:n}){const o=e,i=n,r=te(!1),s=te(),l=te(),a=Mn(()=>{const c=s.value;if(!c)return;const{clientHeight:d,scrollHeight:f,scrollTop:p}=c,w=Math.max(p,f-2*d);if(w<=0)i("progressChanged",1);else{const y=p/w;i("progressChanged",Math.max(0,Math.min(1,y)))}},30);t({scrollEl:s}),$t({onKeyDown(){var c;o.busy||(c=s.value)==null||c.focus()}}),je(()=>{de(()=>o.content,d=>{const f=l.value;f&&(Array.from(f.children).forEach(p=>{f.removeChild(p)}),f.appendChild(d),setTimeout(()=>{if(s.value){const{progress:w}=o;w&&u(w)}r.value=!0,i("ready")}))},{immediate:!0});const c=hn();de(()=>{const{fontFamily:d,fontSize:f,lineHeight:p}=o.titlePreferences;return`${d}-${f}-${p}-${c.width.value}`},async()=>{const d=o.progress;await ht(),u(d)})});function u(c){const d=s.value;d&&(d.scrollTop=c*(d.scrollHeight-2*d.clientHeight))}return(c,d)=>(b(),I("div",{ref_key:"scrollContainer",ref:s,tabindex:"0",class:ue(["novel-body",{"scrollbar-sm":!e.touchDevice,"scrollbar-none":e.touchDevice,"opacity-0":!r.value,"pt-16 sm:pt-18 md:pt-20":!e.hideTopControls,"pt-5 sm:pt-9 md:pt-12":e.hideTopControls}]),style:Ce({fontFamily:e.titlePreferences.fontFamily,"--font-size":`${e.titlePreferences.fontSize}px`,"--line-height":`${e.titlePreferences.lineHeight}px`,"--space-top":e.spaceTop?`${e.spaceTop}px`:void 0}),onClick:d[0]||(d[0]=()=>i("click")),onScroll:d[1]||(d[1]=(...f)=>Y(a)&&Y(a)(...f))},[Z("div",Sn({ref_key:"contentContainer",ref:l,class:"novel-body__content"},e.rtl?{dir:"rtl"}:{}),null,16),Se(c.$slots,"end")],38))}}),[["styles",['.novel-body{top:0;right:0;bottom:0;left:0;overflow-wrap:break-word;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;padding-left:32px;padding-right:32px;position:fixed}.novel-body:focus{outline:2px solid transparent;outline-offset:2px}@media (min-width:640px){.novel-body{padding-left:48px;padding-right:48px}}@media (min-width:768px){.novel-body{padding-left:56px;padding-right:56px}}@media (min-width:1024px){.novel-body{padding-left:64px;padding-right:64px}}@media (min-width:1280px){.novel-body{padding-left:80px;padding-right:80px}}.novel-body{font-size:var(--font-size);letter-spacing:.01em;line-height:var(--line-height)}.novel-body:before{content:"";display:block;height:var(--space-top,0)}.novel-body__content{margin-left:auto;margin-right:auto;max-width:768px;min-height:100%}.novel-body hr{--tw-border-opacity:1;border-color:rgb(87 83 78/var(--tw-border-opacity,1));margin:calc(var(--line-height)*.5) 0}.novel-body h1,.novel-body h2,.novel-body h3,.novel-body h4,.novel-body h5,.novel-body h6{font-weight:500}.novel-body h1{font-size:calc(var(--font-size)*1.5);line-height:calc(var(--font-size)*.5 + var(--line-height))}.novel-body h2{font-size:calc(var(--font-size)*1.25);line-height:calc(var(--font-size)*.25 + var(--line-height))}.novel-body h3{font-size:calc(var(--font-size)*1.125);line-height:calc(var(--font-size)*.125 + var(--line-height))}.novel-body h5,.novel-body h6,.novel-body p{font-size:inherit;line-height:inherit}.novel-body blockquote,.novel-body figure,.novel-body h1,.novel-body h2,.novel-body h3,.novel-body h4,.novel-body h5,.novel-body h6,.novel-body img,.novel-body ol,.novel-body p,.novel-body ul{margin-bottom:calc(var(--line-height)*.5)}.novel-body pre{background-color:transparent;border-style:none;display:block;font-family:inherit;margin:0;padding:0;white-space:normal}']]]),_m=Object.freeze(Object.defineProperty({__proto__:null,default:ja},Symbol.toStringTag,{value:"Module"})),Ba=he({inheritAttrs:!1,__name:"GearThird",props:{chapterNavData:{type:Object},busy:{type:Boolean},defaultPreferences:{type:Object},immediate:{type:Boolean},appVersion:{type:String},raw:{type:Object},spec:{type:Object},siteMeta:{type:null},page:{type:Number},spaceTop:{type:Number},touchDevice:{type:Boolean},entryId:{type:String},isAutoShow:{type:Boolean},tourEnabled:{type:Boolean},offlineMode:{type:Boolean}},emits:["clickEntryButton","hideReader","openHelpScreen","error","crash","ready","pageChanged","playingChanged","tourEnabledChanged","dispose","openEntry","addEntry","finished","getHiddenChapters","hapticFeedback","pressedBack","selectChapter","timeout","openDefaultPreferences","defaultPreferencesChanged","controlsVisibilityChanged"],setup(e,{emit:t}){var X,S,Q,F,_,x,j;const n=e,o=t,i=te(null),r=((X=n.raw)==null?void 0:X.novel)??sm({sel:(S=n.spec)==null?void 0:S.content,heading:(Q=n.raw)==null?void 0:Q.name,paraSel:(F=n.spec)==null?void 0:F.para});r===void 0&&o("error");const s=te(r==null?void 0:r.el),l=te(!!(r!=null&&r.isRTL)),a=te(!1),u=te(!1),c=J(()=>n.page),d=J(()=>n.busy),f=te(null),p=J(()=>{var K;return(K=f.value)==null?void 0:K.scrollEl}),w=(x=(_=n.raw)==null?void 0:_.title)==null?void 0:x.name,y=w?ra(w):location.hostname,O=nf(`mpr:${y}`,{}),M=J({get(){var ae,pe;const K=n.defaultPreferences,D=((ae=O.value)==null?void 0:ae.fontSize)??K.fontSize,ge=Math.max(D,((pe=O.value)==null?void 0:pe.lineHeight)??K.lineHeight);return{fontFamily:K.fontFamily,speed:K.speed,...O.value,contrast:K.contrast,fontSize:D,lineHeight:ge}},set(K){const D={...K},ge=n.defaultPreferences;Object.keys(D).forEach(ae=>{D[ae]===ge[ae]&&delete D[ae]}),O.value=D}}),L=om({isBusy:d,speed:J(()=>M.value.speed),fontSize:J(()=>M.value.fontSize),lineHeight:J(()=>M.value.lineHeight),autoPlay:!!((j=n.defaultPreferences)!=null&&j.autoPlay),touchDevice:n.touchDevice,scrollEl:p}),$=J(()=>!n.touchDevice&&L.isIdle.value&&!d.value),m=Pa({touchDevice:n.touchDevice,moveThreshold:50,isBusy:d,isPlaying:J(()=>L.isPlaying.value),isIdle:J(()=>L.isIdle.value),hideControlsEvent:J(()=>n.defaultPreferences.hideControlsEvent),scrollEl:p}),h=m.visible;de(L.isPlaying,K=>{o("playingChanged",K)}),de(h,K=>{o("controlsVisibilityChanged",K)}),T(document.documentElement),T(document.body);function T(K){const D=K.style.getPropertyValue("overflow");D!=="hidden"&&(K.style.setProperty("overflow","hidden","important"),Pt(()=>{D?K.style.setProperty("overflow",D):K.style.removeProperty("overflow")}))}function H(){o("ready"),m.activate(),L.activate()}function W(){L.stop(),o("clickEntryButton")}function U(K){u.value=K}function ee(){if(L.isPlaying.value){h.value||!n.touchDevice?L.stop():(L.awake(),m.toggle(!0));return}m.toggle()}function B(K){K!==n.page&&(o("pageChanged",Math.min(1,K)),K>=1&&o("finished"))}function C(K){const D=M.value.fontSize+K;D>48||D<10||(M.value={...M.value,fontSize:D,lineHeight:Math.max(10,Math.min(96,Math.round(M.value.lineHeight/M.value.fontSize*D)))})}return(K,D)=>s.value?(b(),ie(gr,{key:0,ref_key:"gearLayout",ref:i,immediate:"","hide-cursor":$.value,class:"bg-stone-900",style:Ce({color:`rgba(255, 255, 255, ${e.defaultPreferences.contrast})`})},{default:oe(()=>{var ge;return[A(ja,{ref_key:"body",ref:f,progress:c.value,"touch-device":e.touchDevice,busy:d.value,"space-top":e.spaceTop,content:s.value,rtl:l.value,"title-preferences":M.value,"default-preferences":e.defaultPreferences,"hide-top-controls":!e.raw,onClick:ee,onProgressChanged:B,onReady:H},{end:oe(()=>{var ae,pe;return[A(Qi,{"has-next":!!((ae=e.chapterNavData)!=null&&ae.next),"offline-mode":!!e.offlineMode,seconds:((pe=e.defaultPreferences)==null?void 0:pe.autoNextSeconds)??5,onNext:D[0]||(D[0]=()=>{var ve,we;return(we=(ve=e.chapterNavData)==null?void 0:ve.next)==null?void 0:we.call(ve,!1)}),onVisibilityChanged:U,onHide:D[1]||(D[1]=()=>o("hideReader")),onFinished:D[2]||(D[2]=()=>o("finished"))},null,8,["has-next","offline-mode","seconds"])]}),_:1},8,["progress","touch-device","busy","space-top","content","rtl","title-preferences","default-preferences","hide-top-controls"]),!e.touchDevice&&!e.raw&&!e.offlineMode?Re((b(),ie(Go,{key:0,class:"hidden md:inline-block fixed left-3 top-2",transparent:"",onClick:D[3]||(D[3]=()=>o("hideReader"))},null,512)),[[nd,Y(h)]]):le("",!0),A(Da,{visible:Y(h),"hide-top-controls":!e.raw,"space-top":e.spaceTop},{"top-controls":oe(()=>{var ae;return[e.raw||e.offlineMode?(b(),ie(er,{key:0,"offline-mode":e.offlineMode,raw:e.raw,transparent:"",onClick:D[4]||(D[4]=()=>o("pressedBack"))},null,8,["offline-mode","raw"])):le("",!0),e.raw&&!e.touchDevice&&!e.offlineMode?(b(),ie(Go,{key:1,transparent:"",onClick:D[5]||(D[5]=()=>o("hideReader"))})):le("",!0),e.chapterNavData?(b(),ie(ar,{key:2,transparent:"","touch-device":e.touchDevice,"chapter-spec":(ae=e.spec)==null?void 0:ae.chapter,data:e.chapterNavData,rtl:l.value,onGetHiddenChapters:D[6]||(D[6]=()=>o("getHiddenChapters")),onPrev:D[7]||(D[7]=pe=>{var ve,we;return(we=(ve=e.chapterNavData)==null?void 0:ve.prev)==null?void 0:we.call(ve,pe)}),onNext:D[8]||(D[8]=pe=>{var ve,we;return(we=(ve=e.chapterNavData)==null?void 0:ve.next)==null?void 0:we.call(ve,pe)})},null,8,["touch-device","chapter-spec","data","rtl"])):le("",!0)]}),"bottom-controls":oe(()=>[!e.offlineMode&&e.raw?(b(),ie(tr,{key:0,"entry-id":e.entryId,transparent:"",onClick:W},null,8,["entry-id"])):le("",!0),A(Ge,{transparent:"",onClick:D[9]||(D[9]=()=>C(-1))},{default:oe(()=>[A(Aa)]),_:1}),A(Ge,{transparent:"",onClick:D[10]||(D[10]=()=>C(1))},{default:oe(()=>[A(La)]),_:1}),A(rr,{transparent:"",onClick:D[11]||(D[11]=()=>a.value=!0)}),e.touchDevice?le("",!0):(b(),ie(sr,{key:1,transparent:"",onRequestFullScreen:D[12]||(D[12]=()=>{var ae,pe;return(pe=(ae=i.value)==null?void 0:ae.rootEl)==null?void 0:pe.requestFullscreen()})})),A(ir,{transparent:"","tour-message":"Press here to start listening",playing:Y(L).isPlaying.value,class:"order-2 md:order-4",onClick:D[13]||(D[13]=()=>Y(L).toggle())},null,8,["playing"])]),progress:oe(()=>{var ae,pe;return[((ae=e.defaultPreferences)==null?void 0:ae.progressSize)!==0?(b(),ie(vr,{key:0,value:c.value,height:((pe=e.defaultPreferences)==null?void 0:pe.progressSize)??2,rtl:l.value,opacity:e.defaultPreferences.contrast},null,8,["value","height","rtl","opacity"])):le("",!0)]}),_:1},8,["visible","hide-top-controls","space-top"]),u.value?le("",!0):(b(),ie(mr,{key:1,playing:Y(L).isPlaying.value},null,8,["playing"])),A(wr,{modelValue:a.value,"onUpdate:modelValue":D[17]||(D[17]=ae=>a.value=ae),name:(ge=e.raw)==null?void 0:ge.title.name,"space-top":(e.spaceTop??0)+80,"enable-default-preferences":!e.touchDevice||!!e.appVersion,onMore:D[18]||(D[18]=()=>o("openDefaultPreferences"))},{"tab-preferences":oe(()=>[A(fr,{modelValue:M.value,"onUpdate:modelValue":D[14]||(D[14]=ae=>M.value=ae),"default-preferences":e.defaultPreferences,"enable-reset":!e.touchDevice||!!e.appVersion,onReset:D[15]||(D[15]=()=>O.value=null)},null,8,["modelValue","default-preferences","enable-reset"])]),"tab-default":oe(()=>[A(pr,{"is-novel":"","model-value":e.defaultPreferences,"onUpdate:modelValue":D[16]||(D[16]=ae=>o("defaultPreferencesChanged",ae))},null,8,["model-value"])]),_:1},8,["modelValue","name","space-top","enable-default-preferences"]),Se(K.$slots,"default")]}),_:3},8,["hide-cursor","style"])):le("",!0)}}),Sm=Object.freeze(Object.defineProperty({__proto__:null,default:Ba},Symbol.toStringTag,{value:"Module"}));function km({raw:e,spec:t,siteMeta:n,offlineMode:o,onSelect:i}){var B,C,X;const{vol:r,inferVol:s,chap:l,title:a,slug:u,basePath:c}=e,d=t==null?void 0:t.chapter;let f=-1;async function p(S,Q){if(o){i({...S});return}if(S.slug){w(S.slug,Q);return}if(S.elIndex===void 0||!(d!=null&&d.sel))return;let F=null;document.querySelector(d.sel)||(d!=null&&d.trigger&&(F=document.querySelector(d.trigger)),F&&(io(F),await new Promise(x=>setTimeout(()=>x(),50))));const _=d&&d.sel&&!d.url?document.querySelectorAll(d.sel):void 0;_!=null&&_[S.elIndex]&&(io(_[S.elIndex]),F&&document.querySelector(d.sel)&&io(F))}function w(S,Q){const F=Cm(c,S,(n==null?void 0:n.trailing)??!0);Q?window.open(F,"_blank","noopener"):location.href=F}function y(S){const Q=m[S];return Q?F=>p(Q,F):void 0}function O(S,Q,F){if(Q)w(Q,F);else if(S){const _=document.querySelector(S);_&&io(_,{preventDefault:!1})}}const M=r??s,L=d==null?void 0:d.url,$=((B=a.chapters)==null?void 0:B.filter(S=>S.slug||!L&&S.elIndex!==void 0))??[],m=$.length>1?$:[],h=(C=e.prev)==null?void 0:C.slug,T=(X=e.next)==null?void 0:X.slug,H=t!=null&&t.prev&&typeof t.prev!="string"?t.prev.sel:void 0,W=t!=null&&t.next&&typeof t.next!="string"?t.next.sel:void 0;let U=h||H&&!m.length&&document.body.querySelector(H)?S=>O(H,h,S):void 0,ee=T||W&&!m.length&&document.body.querySelector(W)?S=>O(W,T,S):void 0;if(m.length){if(L&&(f=m.findIndex(S=>S.slug===e.slug)),f===-1&&(f=m.findIndex(S=>(S.vol??S.inferVol)===M&&S.chap===l)),L&&f===-1&&(f=m.findIndex(S=>S.slug&&u.startsWith(`${S.slug}-`)&&u.length-S.slug.length>3)),f!==-1)U??(U=y(f+1)),ee??(ee=y(f-1));else if(!h&&!T){const S=m.findIndex(Q=>{const F=Q.vol??Q.inferVol;return M===void 0||F===void 0||M===F?Q.chap<l:F<M});S!==-1?(U=y(S),ee=y(S-1)):ee=y(m.length-1)}}return{activeIndex:f,activeLabel:Na({vol:r,chap:l}),prev:U,next:ee,chapters:m.map(S=>({label:Na(S),select:Q=>p(S,Q)}))}}function Na({vol:e,chap:t}){return e==null?`Ch.${t}`:`Vol.${e} ch.${t}`}function Cm(e,t,n){const o=!t||t.includes("//")||t.startsWith("/")?t:"/"+[...e.split("/"),...t.split("/")].filter(Boolean).join("/"),[i,r]=(o.includes("//")?o:location.origin+o).split("?");return[i.endsWith("/")===n?i:n?i+"/":i.substring(0,-1),r].filter(Boolean).join("?")}function Tm(e){return e instanceof Error?JSON.stringify(e,Object.getOwnPropertyNames(e)):e}const Va=be(he({inheritAttrs:!1,__name:"App",props:{immediate:{type:Boolean},appVersion:{type:String},raw:{type:Object},spec:{type:Object},siteMeta:{type:null},page:{type:Number},spaceTop:{type:Number},touchDevice:{type:Boolean},entryId:{type:String},defaultPreferences:{type:Object},isAutoShow:{type:Boolean},tourEnabled:{type:Boolean},offlineMode:{type:Boolean}},emits:["error","crash","ready","pageChanged","playingChanged","tourEnabledChanged","dispose","openEntry","addEntry","finished","getHiddenChapters","hapticFeedback","pressedBack","selectChapter","timeout","openDefaultPreferences","defaultPreferencesChanged","controlsVisibilityChanged"],setup(e,{emit:t}){var M,L,$;const n=e,o=t;let i=!1;ys((m,h,T)=>{if(!i){i=!0;const W=`(3.3.0) ${(h==null?void 0:h.$options.name)??(h==null?void 0:h.$options.__name)??(h==null?void 0:h.$options.__file)}.${T}: ${Tm(m)}`;o("crash",W)}return!1});const r=te(n.raw?n.raw.contentType??Kt.manga:void 0);r.value===void 0&&Ed(((M=n.spec)==null?void 0:M.content)??"body",{paraSel:(L=n.spec)==null?void 0:L.para,include:($=n.siteMeta)==null?void 0:$.contentTypes,timeoutMs:3e3}).then(m=>{m?r.value=m:o("error")});const s=te(!1),l=af({touchDevice:n.touchDevice}),a=ff(n.page,n.isAutoShow),u=J(()=>n.raw?km({raw:n.raw,spec:n.spec,siteMeta:n.siteMeta,offlineMode:n.offlineMode,onSelect:m=>o("selectChapter",m)}):void 0);df().addListener({onKeyDown:m=>{switch(m.key){case"Escape":m.preventDefault();break}},onKeyUp:m=>{switch(m.key){case"h":y();break}}}),cf(()=>o("hapticFeedback"));const d=J(()=>{var H,W;const m=n.defaultPreferences,h=((H=n.defaultPreferences)==null?void 0:H.fontSize)??16,T=Math.max(h,((W=n.defaultPreferences)==null?void 0:W.lineHeight)??28);return{...m,speed:(m==null?void 0:m.speed)??1,progressSize:(m==null?void 0:m.progressSize)??2,autoNextSeconds:(m==null?void 0:m.autoNextSeconds)??5,hideControlsEvent:(m==null?void 0:m.hideControlsEvent)??nn.firstMove,autoPlay:(m==null?void 0:m.autoPlay)??!1,pinchToZoom:(m==null?void 0:m.pinchToZoom)??!0,readerStyle:(m==null?void 0:m.readerStyle)??Dt.longStrip,direction:(m==null?void 0:m.direction)??nt.vertical,gap:(m==null?void 0:m.gap)??0,fontFamily:(m==null?void 0:m.fontFamily)??Jo[0].value,contrast:(m==null?void 0:m.contrast)??.8,fontSize:h,lineHeight:T}});function f(){if(n.offlineMode){o("pressedBack");return}pf(),o("dispose")}function p(m){const h=Math.floor(m*100)/100;h!==Math.floor(a.value*100)/100&&(a.value=m,o("pageChanged",h))}function w(){n.entryId?o("openEntry",n.entryId):o("addEntry")}function y(m){s.value!==m&&(s.value=m??!s.value)}function O(){o("error"),f()}return(m,h)=>r.value!==void 0?(b(),ie(xs(r.value===Y(Kt).novel?Ba:Oa),Sn({key:0,ref:"root"},n,{page:Y(a),busy:Y(l),"chapter-nav-data":u.value,"default-preferences":d.value,onOpenDefaultPreferences:h[1]||(h[1]=()=>o("openDefaultPreferences")),onDefaultPreferencesChanged:h[2]||(h[2]=T=>o("defaultPreferencesChanged",T)),onTimeout:h[3]||(h[3]=()=>o("timeout")),onReady:h[4]||(h[4]=()=>o("ready")),onFinished:h[5]||(h[5]=()=>o("finished")),onPlayingChanged:h[6]||(h[6]=T=>o("playingChanged",T)),onControlsVisibilityChanged:h[7]||(h[7]=T=>o("controlsVisibilityChanged",T)),onPressedBack:h[8]||(h[8]=()=>o("pressedBack")),onGetHiddenChapters:h[9]||(h[9]=()=>o("getHiddenChapters")),onError:O,onHideReader:f,onPageChanged:p,onClickEntryButton:w,onOpenHelpScreen:h[10]||(h[10]=()=>y(!0))}),{default:oe(()=>[s.value?(b(),ie(Bl,{key:0,"touch-device":e.touchDevice,onHide:y},null,8,["touch-device"])):le("",!0),e.tourEnabled?(b(),ie(Nl,{key:1,onHide:h[0]||(h[0]=()=>o("tourEnabledChanged",!1))})):le("",!0)]),_:1},16,["page","busy","chapter-nav-data","default-preferences"])):le("",!0)}}),[["styles",['*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.18 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:Helvetica,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}*{-webkit-tap-highlight-color:rgba(0,0,0,0)!important}button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-image:none;border-style:none;cursor:pointer;outline:2px solid transparent;outline-offset:2px;white-space:nowrap}button[disabled]{cursor:default!important}svg{height:100%}.container,svg{width:100%}@media (min-width:300px){.container{max-width:300px}}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.scrollbar-none{scrollbar-width:none}.scrollbar-none::-webkit-scrollbar{display:none}.scrollbar-sm{scrollbar-color:#777 transparent;scrollbar-width:thin}.scrollbar-sm::-webkit-scrollbar{background-color:transparent;height:4px;width:4px}.scrollbar-sm::-webkit-scrollbar-track{background:transparent}.scrollbar-sm::-webkit-scrollbar-thumb{background-color:#777;border-radius:2px}.\\!pointer-events-none{pointer-events:none!important}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.\\!visible{visibility:visible!important}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-0{bottom:0}.bottom-1{bottom:4px}.bottom-full{bottom:100%}.left-0{left:0}.left-1{left:4px}.left-1\\/2{left:50%}.left-10{left:40px}.left-3{left:12px}.left-9{left:36px}.right-0{right:0}.top-0{top:0}.top-1{top:4px}.top-1\\/2{top:50%}.top-10{top:40px}.top-2{top:8px}.top-9{top:36px}.top-full{top:100%}.-z-10{z-index:-10}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.order-2{order:2}.m-0{margin:0}.m-auto{margin:auto}.-mx-12{margin-left:-48px;margin-right:-48px}.-my-12{margin-bottom:-48px;margin-top:-48px}.-ml-20{margin-left:-80px}.-mr-3{margin-right:-12px}.-mt-2{margin-top:-8px}.mb-2{margin-bottom:8px}.mb-3{margin-bottom:12px}.mb-5{margin-bottom:20px}.ml-1{margin-left:4px}.ml-auto{margin-left:auto}.mt-5{margin-top:20px}.box-border{box-sizing:border-box}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.\\!h-9{height:36px!important}.h-0{height:0}.h-1{height:4px}.h-1\\/3{height:33.333333%}.h-10{height:40px}.h-12{height:48px}.h-14{height:56px}.h-16{height:64px}.h-2{height:8px}.h-20{height:80px}.h-24{height:96px}.h-28{height:112px}.h-3{height:12px}.h-4{height:16px}.h-5{height:20px}.h-6{height:24px}.h-8{height:32px}.h-9{height:36px}.h-\\[101\\%\\]{height:101%}.h-full{height:100%}.h-screen{height:100vh}.max-h-\\[70vh\\]{max-height:70vh}.max-h-full{max-height:100%}.max-h-none{max-height:none}.min-h-full{min-height:100%}.w-0{width:0}.w-1{width:4px}.w-1\\/3{width:33.333333%}.w-10{width:40px}.w-12{width:48px}.w-14{width:56px}.w-2{width:8px}.w-2\\/3{width:66.666667%}.w-20{width:80px}.w-24{width:96px}.w-28{width:112px}.w-3{width:12px}.w-4{width:16px}.w-40{width:160px}.w-5{width:20px}.w-6{width:24px}.w-auto{width:auto}.w-full{width:100%}.w-min{width:-moz-min-content;width:min-content}.max-w-full{max-width:100%}.max-w-none{max-width:none}.max-w-xs{max-width:320px}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.origin-bottom{transform-origin:bottom}.origin-right{transform-origin:right}.origin-top{transform-origin:top}.\\!translate-y-full{--tw-translate-y:100%!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.-translate-y-1\\.5{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\.5{--tw-translate-y:-6px}.-translate-y-1\\/2{--tw-translate-y:-50%}.-translate-y-1\\/2,.translate-y-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y:0px}.translate-y-1\\.5{--tw-translate-y:6px}.-rotate-90,.translate-y-1\\.5{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-90{--tw-rotate:-90deg}.rotate-180{--tw-rotate:180deg}.rotate-180,.rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate:90deg}.scale-95{--tw-scale-x:.95;--tw-scale-y:.95}.scale-95,.scale-y-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-y-90{--tw-scale-y:.9}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-auto{cursor:auto}.cursor-default{cursor:default}.cursor-grabbing{cursor:grabbing}.cursor-none{cursor:none}.cursor-pointer{cursor:pointer}.touch-pan-x{--tw-pan-x:pan-x}.touch-pan-x,.touch-pan-y{touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-y{--tw-pan-y:pan-y}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}.resize{resize:both}.\\!snap-none{scroll-snap-type:none!important}.snap-x{scroll-snap-type:x var(--tw-scroll-snap-strictness)}.snap-y{scroll-snap-type:y var(--tw-scroll-snap-strictness)}.snap-center{scroll-snap-align:center}.list-none{list-style-type:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:4px}.gap-2{gap:8px}.gap-3{gap:12px}.gap-4{gap:16px}.gap-6{gap:24px}.gap-\\[1px\\]{gap:1px}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overscroll-contain{overscroll-behavior:contain}.overscroll-none{overscroll-behavior:none}.text-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:4px}.rounded-2xl{border-radius:16px}.rounded-\\[2\\.5rem\\]{border-radius:40px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:8px}.rounded-md{border-radius:6px}.rounded-xl{border-radius:12px}.\\!rounded-l-none{border-bottom-left-radius:0!important;border-top-left-radius:0!important}.\\!rounded-r-none{border-bottom-right-radius:0!important;border-top-right-radius:0!important}.rounded-l-sm{border-bottom-left-radius:2px;border-top-left-radius:2px}.rounded-r-sm{border-bottom-right-radius:2px;border-top-right-radius:2px}.rounded-t-xl{border-top-left-radius:12px;border-top-right-radius:12px}.border{border-width:1px}.border-2{border-width:2px}.border-4{border-width:4px}.border-t-\\[1px\\]{border-top-width:1px}.border-solid{border-style:solid}.border-none{border-style:none}.border-primary{--tw-border-opacity:1;border-color:rgb(184 92 56/var(--tw-border-opacity,1))}.border-stone-200{--tw-border-opacity:1;border-color:rgb(231 229 228/var(--tw-border-opacity,1))}.border-stone-400{--tw-border-opacity:1;border-color:rgb(168 162 158/var(--tw-border-opacity,1))}.border-stone-500{--tw-border-opacity:1;border-color:rgb(120 113 108/var(--tw-border-opacity,1))}.border-stone-600{--tw-border-opacity:1;border-color:rgb(87 83 78/var(--tw-border-opacity,1))}.border-textPrimary{--tw-border-opacity:1;border-color:rgb(251 130 82/var(--tw-border-opacity,1))}.border-opacity-30{--tw-border-opacity:.3}.border-opacity-70{--tw-border-opacity:.7}.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.bg-inherit{background-color:inherit}.bg-primary{--tw-bg-opacity:1;background-color:rgb(184 92 56/var(--tw-bg-opacity,1))}.bg-stone-100{--tw-bg-opacity:1;background-color:rgb(245 245 244/var(--tw-bg-opacity,1))}.bg-stone-300{--tw-bg-opacity:1;background-color:rgb(214 211 209/var(--tw-bg-opacity,1))}.bg-stone-500{--tw-bg-opacity:1;background-color:rgb(120 113 108/var(--tw-bg-opacity,1))}.bg-stone-600{--tw-bg-opacity:1;background-color:rgb(87 83 78/var(--tw-bg-opacity,1))}.bg-stone-800{--tw-bg-opacity:1;background-color:rgb(41 37 36/var(--tw-bg-opacity,1))}.bg-stone-900{--tw-bg-opacity:1;background-color:rgb(28 25 23/var(--tw-bg-opacity,1))}.bg-textPrimary{--tw-bg-opacity:1;background-color:rgb(251 130 82/var(--tw-bg-opacity,1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.\\!bg-opacity-100{--tw-bg-opacity:1!important}.bg-opacity-40{--tw-bg-opacity:.4}.bg-opacity-50{--tw-bg-opacity:.5}.bg-opacity-70{--tw-bg-opacity:.7}.bg-opacity-80{--tw-bg-opacity:.8}.bg-opacity-90{--tw-bg-opacity:.9}.bg-none{background-image:none}.object-contain{-o-object-fit:contain;object-fit:contain}.p-0{padding:0}.p-0\\.5{padding:2px}.p-1{padding:4px}.p-2{padding:8px}.p-4{padding:16px}.p-6{padding:24px}.px-2{padding-left:8px;padding-right:8px}.px-3{padding-left:12px;padding-right:12px}.px-4{padding-left:16px;padding-right:16px}.px-5{padding-left:20px;padding-right:20px}.px-6{padding-left:24px;padding-right:24px}.px-8{padding-left:32px;padding-right:32px}.py-0\\.5{padding-bottom:2px;padding-top:2px}.py-1{padding-bottom:4px;padding-top:4px}.py-1\\.5{padding-bottom:6px;padding-top:6px}.py-2{padding-bottom:8px;padding-top:8px}.pb-6{padding-bottom:24px}.pb-7{padding-bottom:28px}.pb-8{padding-bottom:32px}.pl-1{padding-left:4px}.pr-2{padding-right:8px}.pt-1{padding-top:4px}.pt-1\\.5{padding-top:6px}.pt-12{padding-top:48px}.pt-16{padding-top:64px}.pt-20{padding-top:80px}.pt-5{padding-top:20px}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-sans{font-family:Helvetica,sans-serif}.text-base{font-size:16px;line-height:24px}.text-sm{font-size:14px;line-height:20px}.text-xl{font-size:20px;line-height:28px}.font-medium{font-weight:500}.font-normal{font-weight:400}.lowercase{text-transform:lowercase}.leading-none{line-height:1}.text-stone-100{--tw-text-opacity:1;color:rgb(245 245 244/var(--tw-text-opacity,1))}.text-stone-200{--tw-text-opacity:1;color:rgb(231 229 228/var(--tw-text-opacity,1))}.text-stone-300{--tw-text-opacity:1;color:rgb(214 211 209/var(--tw-text-opacity,1))}.text-stone-400{--tw-text-opacity:1;color:rgb(168 162 158/var(--tw-text-opacity,1))}.text-stone-50{--tw-text-opacity:1;color:rgb(250 250 249/var(--tw-text-opacity,1))}.text-stone-800{--tw-text-opacity:1;color:rgb(41 37 36/var(--tw-text-opacity,1))}.text-stone-900{--tw-text-opacity:1;color:rgb(28 25 23/var(--tw-text-opacity,1))}.text-textPrimary{--tw-text-opacity:1;color:rgb(251 130 82/var(--tw-text-opacity,1))}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-90{opacity:.9}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-neutral-950{--tw-shadow-color:#0a0a0a;--tw-shadow:var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-md{--tw-backdrop-blur:blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-bg{transition-duration:.15s;transition-property:background-color;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-0{transition-duration:0s}.duration-100{transition-duration:.1s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-500{transition-duration:.5s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.children-pointer-events-auto>*{pointer-events:auto}.last\\:mb-0:last-child{margin-bottom:0}.last\\:border-b-transparent:last-child{border-bottom-color:transparent}@media (hover:hover) and (pointer:fine){.hover\\:bg-stone-100:hover{--tw-bg-opacity:1;background-color:rgb(245 245 244/var(--tw-bg-opacity,1))}.hover\\:bg-stone-300:hover{--tw-bg-opacity:1;background-color:rgb(214 211 209/var(--tw-bg-opacity,1))}.hover\\:bg-stone-50:hover{--tw-bg-opacity:1;background-color:rgb(250 250 249/var(--tw-bg-opacity,1))}.hover\\:bg-stone-500:hover{--tw-bg-opacity:1;background-color:rgb(120 113 108/var(--tw-bg-opacity,1))}.hover\\:bg-stone-900:hover{--tw-bg-opacity:1;background-color:rgb(28 25 23/var(--tw-bg-opacity,1))}.hover\\:bg-opacity-10:hover{--tw-bg-opacity:.1}.hover\\:bg-opacity-50:hover{--tw-bg-opacity:.5}.hover\\:bg-opacity-80:hover{--tw-bg-opacity:.8}.hover\\:text-stone-100:hover{--tw-text-opacity:1;color:rgb(245 245 244/var(--tw-text-opacity,1))}}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:outline-primary:focus{outline-color:#b85c38}@media (hover:hover) and (pointer:fine){.group:hover .group-hover\\:bg-stone-100{--tw-bg-opacity:1;background-color:rgb(245 245 244/var(--tw-bg-opacity,1))}.group:hover .group-hover\\:bg-opacity-20{--tw-bg-opacity:.2}}@media (min-width:300px){.\\32xs\\:gap-3{gap:12px}.\\32xs\\:px-3{padding-left:12px;padding-right:12px}}@media (min-width:640px){.sm\\:h-16{height:64px}.sm\\:w-\\[31rem\\]{width:496px}.sm\\:p-3{padding:12px}.sm\\:px-12{padding-left:48px;padding-right:48px}.sm\\:py-3{padding-bottom:12px;padding-top:12px}.sm\\:pt-18{padding-top:72px}.sm\\:pt-9{padding-top:36px}}@media (min-width:768px){.md\\:fixed{position:fixed}.md\\:left-auto{left:auto}.md\\:order-4{order:4}.md\\:inline-block{display:inline-block}.md\\:flex-col{flex-direction:column}.md\\:bg-transparent{background-color:transparent}.md\\:px-14{padding-left:56px;padding-right:56px}.md\\:px-8{padding-left:32px;padding-right:32px}.md\\:pb-5{padding-bottom:20px}.md\\:pb-6{padding-bottom:24px}.md\\:pt-12{padding-top:48px}.md\\:pt-20{padding-top:80px}}@media (min-width:1024px){.lg\\:px-10{padding-left:40px;padding-right:40px}.lg\\:px-16{padding-left:64px;padding-right:64px}.lg\\:pb-3{padding-bottom:12px}.lg\\:pb-4{padding-bottom:16px}}@media (min-width:1280px){.xl\\:px-12{padding-left:48px;padding-right:48px}.xl\\:px-20{padding-left:80px;padding-right:80px}}']]]),Mm=Object.freeze(Object.defineProperty({__proto__:null,default:Va},Symbol.toStringTag,{value:"Module"})),Pm={class:"max-h-none max-w-none h-full w-full m-0 p-0 border-none outline-none"},Em={key:0,class:"fixed inset-0 h-[101%] flex justify-center items-center z-10 bg-black"},Im={class:"flex justify-between items-end"},Om={class:"inline-block children-pointer-events-auto"},$m={class:"inline-flex flex-col items-end gap-4 children-pointer-events-auto"},zm={class:"fixed pointer-events-none left-0 right-0 bottom-0"},Dm={key:1,class:"fixed inline-block left-1/2 -translate-x-1/2 bottom-0 p-2 sm:p-3 pb-6 md:pb-5 lg:pb-3"},Am=Object.freeze(Object.defineProperty({__proto__:null,default:be(he({__name:"ReaderLayout",props:{loading:{type:Boolean},immediate:{type:Boolean},idle:{type:Boolean},controlsVisible:{type:Boolean},zooming:{type:Boolean},spaceTop:{type:null}},setup(e,{expose:t}){const n={mounted:i=>i.showModal(),beforeUnmount:i=>i.close()},o=te(null);return t({rootEl:o}),(i,r)=>Re((b(),I("dialog",Pm,[Z("div",{ref_key:"rootEl",ref:o,id:"reader-layout",class:ue({"cursor-none":e.idle,"cursor-default":!e.idle,"bg-black":e.immediate||!e.loading,"opacity-0":!e.immediate&&e.loading,"duration-200 transition-colors":!e.immediate})},[e.loading&&e.immediate?(b(),I("div",Em,[A(oi)])):le("",!0),Se(i.$slots,"default"),Z("div",{id:"controls",class:ue(["fixed pointer-events-none cursor-auto left-0 top-0 w-full h-full flex flex-col justify-between p-2 sm:p-3 pb-6 md:pb-5 lg:pb-3",{"opacity-100 z-20":e.controlsVisible,"opacity-0 -z-10":!e.controlsVisible}])},[Z("div",{class:"flex gap-1 items-center children-pointer-events-auto relative z-30 flex-shrink-0 2xs:gap-3",style:Ce({paddingTop:`${e.spaceTop||0}px`})},[Se(i.$slots,"top-controls")],4),Z("div",Im,[Z("div",Om,[Se(i.$slots,"bottom-left-controls")]),Z("div",$m,[Se(i.$slots,"bottom-right-controls")])]),Z("div",zm,[Se(i.$slots,"progress")])],2),e.controlsVisible||e.zooming?(b(),I("div",Dm,[Se(i.$slots,"reset-zoom")])):le("",!0)],2)])),[[n]])}}),[["styles",["#reader-layout{direction:ltr;font-family:Helvetica,sans-serif;font-size:16px;font-weight:400;height:100%;line-height:24px;overflow:hidden;overscroll-behavior:contain;pointer-events:auto;text-align:left;width:100%;--tw-text-opacity:1;color:rgb(245 245 244/var(--tw-text-opacity,1))}"]]])},Symbol.toStringTag,{value:"Module"})),Lm={},jm={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function Bm(e,t){return b(),I("svg",jm,[...t[0]||(t[0]=[Z("path",{fill:"currentColor",d:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46s46-20.595 46-46s-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1)])])}const Nm=Object.freeze(Object.defineProperty({__proto__:null,default:be(Lm,[["render",Bm]])},Symbol.toStringTag,{value:"Module"})),Vm="gear-second{height:0!important;opacity:0!important;pointer-events:none!important;width:0!important;z-index:-10!important}html.gear-second,html.gear-second *{scroll-behavior:auto!important;scrollbar-width:none!important}html.gear-second ::-webkit-scrollbar,html.gear-second::-webkit-scrollbar{display:none!important}html.gear-second body{touch-action:pan-x pan-y!important}html.gear-second body .m-content #progress-bar{display:none!important}html.gear-second body>:not(dialog[open]),html.gear-second>body~*{visibility:hidden!important}html.gear-second>body~*{display:none!important;height:0!important;left:100%!important;max-height:0!important;max-width:0!important;opacity:0!important;pointer-events:none!important;top:100%!important;width:0!important}.mp-scroll-container{max-height:100vh!important;overflow:hidden!important}html:has(body.mp-scroll-container){overflow:auto!important}",gn="gear-second",kr={appVersion:void 0,immediate:void 0,raw:void 0,spec:void 0,siteMeta:void 0,page:0,spaceTop:void 0,touchDevice:void 0,entryId:void 0,isAutoShow:void 0,tourEnabled:void 0,offlineMode:void 0,defaultPreferences:void 0,onError:void 0,onCrash:void 0,onDispose:void 0,onFullScreenChanged:void 0,onControlsVisibilityChanged:void 0,onPageChanged:void 0,onOpenEntry:void 0,onAddEntry:void 0,onFinished:void 0,onHapticFeedback:void 0,onPressedBack:void 0,onSelectChapter:void 0,onTimeout:void 0,onDefaultPreferencesChanged:void 0,onOpenDefaultPreferences:void 0},Je={promise:void 0,data:xo({...kr})};async function Rm(e){return Je.promise?(Je.data.raw=e.raw,await Je.promise):(Je.promise=new Promise(t=>{let n=!1,o=!1,i,r,s=0;const l=!!e.spaceTop||!!e.isAutoShow&&!!e.page,a=()=>{n||(n=!0,clearInterval(i),i=void 0,r!=null&&r.isConnected&&document.body.removeChild(r),document.documentElement.classList.remove(gn),Je.data.touchDevice||Object.assign(Je.data,kr),Je.promise=void 0,to.clear())},u=mt(f=>{var p;return!n&&((p=e.onPageChanged)==null?void 0:p.call(e,f))},300);Object.assign(Je.data,kr,e.appVersion?e:Ra(e),{immediate:l,onReady(){l||(c(),document.documentElement.classList.add(gn))},onError(){var f,p;a(),o?((f=e.onDispose)==null||f.call(e),(p=e.onError)==null||p.call(e)):d()},onDispose:()=>{var f;a(),(f=e==null?void 0:e.onDispose)==null||f.call(e)},onControlsVisibilityChanged(f){var p,w;(p=e.onFullScreenChanged)==null||p.call(e,!f),(w=e.onControlsVisibilityChanged)==null||w.call(e,f)},onPageChanged:f=>{Je.data.page=f,!(s>=f)&&(s=f,u(f))},onTourEnabledChanged:f=>{Je.data.tourEnabled=f},onDefaultPreferencesChanged:f=>{var p;Je.data.defaultPreferences=f,(p=e.onDefaultPreferencesChanged)==null||p.call(e,f)}}),Hm().then(()=>{if(n){d();return}r=document.createElement(gn),l?(document.documentElement.classList.add(gn),document.body.appendChild(r),setTimeout(c)):document.body.appendChild(r);let f=0;i=setInterval(()=>{if(++f===30||n){clearInterval(i),i=void 0;return}r.isConnected||(document.documentElement.classList.add(gn),document.body.appendChild(r))},100)});function c(){o||(o=!0,t({updateArgs(f){Object.assign(Je.data,Je.data.appVersion?f:Ra(f))},dispose:a,back:()=>to.trigger()}))}function d(){o||t(void 0)}}),await Je.promise)}function Ra(e){if(!["autoPlay","readerStyle","direction","autoNextSeconds","defaultSpeed","defaultGap","hideControlsEvent","progressSize","pinchToZoom","tapZone"].some(p=>p in e))return e;const{autoPlay:n,readerStyle:o,direction:i,autoNextSeconds:r,defaultSpeed:s,defaultGap:l,hideControlsEvent:a,progressSize:u,pinchToZoom:c,tapZone:d,...f}=e;return{...f,defaultPreferences:{autoPlay:n,readerStyle:o,direction:i,autoNextSeconds:r,speed:s,gap:l,hideControlsEvent:a,progressSize:u,pinchToZoom:c,tapZone:d}}}async function Hm(){if(window.customElements.get(gn))return;const e=document.createElement("style"),t=Vm;e.appendChild(document.createTextNode(t)),document.head.appendChild(e);const n=md({styles:[await Fm()],data:()=>({readerData:Je.data}),render(){return il(Va,this.readerData)}});window.customElements.define(gn,n)}async function Fm(){const e=Object.assign({"./App.vue":Mm,"./GearSecond.vue":rm,"./GearThird.vue":Sm,"./components/AutoNext.vue":Tf,"./components/ButtonWebFullScreen.vue":_p,"./components/ChapterNav.vue":Kp,"./components/DefaultPreferencesForm.vue":Eh,"./components/DirectionToast.vue":Lh,"./components/GearControlsLayout.vue":Nh,"./components/GearLayout.vue":Kh,"./components/GearThirdControlsLayout.vue":pm,"./components/GesturesContainer.vue":ag,"./components/HelpScreen.vue":of,"./components/MangaPreferencesForm.vue":og,"./components/NovelBody.vue":_m,"./components/NovelPreferencesForm.vue":kh,"./components/PageNav.vue":ig,"./components/PauseToast.vue":rg,"./components/ProgressBar.vue":lg,"./components/ReaderBody.vue":hg,"./components/ReaderImg.vue":ug,"./components/ReaderLayout.vue":Am,"./components/ReaderTour.vue":lf,"./components/SettingsBottomSheet.vue":Dg,"./components/TapZonePreview.vue":Dh,"./components/base/BaseButton.vue":mf,"./components/base/BottomSheet.vue":wg,"./components/base/ButtonDropdown.vue":jp,"./components/base/ButtonIcon.vue":Mf,"./components/base/ButtonOutline.vue":gh,"./components/base/DropdownMenu.vue":Cp,"./components/base/InputPercentage.vue":Xp,"./components/base/InputSelect.vue":Qp,"./components/base/InputSwitcher.vue":oh,"./components/base/LoadingIndicator.vue":Wh,"./components/base/TabBar.vue":_g,"./components/base/TableField.vue":rh,"./components/buttons/ButtonBack.vue":$f,"./components/buttons/ButtonEntry.vue":Rf,"./components/buttons/ButtonHide.vue":qf,"./components/buttons/ButtonPlay.vue":tp,"./components/buttons/ButtonResetZoom.vue":ap,"./components/buttons/ButtonSettings.vue":pp,"./components/fields/FieldContrast.vue":sh,"./components/fields/FieldFontFamily.vue":mh,"./components/icons/IconBack.vue":Of,"./components/icons/IconBookmarkNew.vue":Vf,"./components/icons/IconBookmarked.vue":Lf,"./components/icons/IconChevronLeft.vue":Rp,"./components/icons/IconChevronRight.vue":Up,"./components/icons/IconClose.vue":bg,"./components/icons/IconDouble.vue":Gh,"./components/icons/IconDoubleSkip.vue":tg,"./components/icons/IconExclamationCircle.vue":Nm,"./components/icons/IconFullscreen.vue":vp,"./components/icons/IconFullscreenExit.vue":xp,"./components/icons/IconHelp.vue":Tg,"./components/icons/IconLandscape.vue":uh,"./components/icons/IconLoading.vue":Ep,"./components/icons/IconMoreVert.vue":Ig,"./components/icons/IconNext.vue":zh,"./components/icons/IconPause.vue":Xf,"./components/icons/IconPlay.vue":ep,"./components/icons/IconPlus.vue":wf,"./components/icons/IconPortrait.vue":hh,"./components/icons/IconReaderExit.vue":Uf,"./components/icons/IconSettings.vue":fp,"./components/icons/IconTextDecre.vue":vm,"./components/icons/IconTextIncre.vue":xm,"./components/icons/IconTriangle.vue":zp,"./components/icons/IconZoom.vue":rp}),t=[];for(const n in e){const o=e[n];t.push(o.default.styles)}return t.join("")}return Rm});
20
+ **/let Vi;const rl=typeof window<"u"&&window.trustedTypes;if(rl)try{Vi=rl.createPolicy("vue",{createHTML:e=>e})}catch{}const sl=Vi?e=>Vi.createHTML(e):e=>e,Ku="http://www.w3.org/2000/svg",Zu="http://www.w3.org/1998/Math/MathML",Ut=typeof document<"u"?document:null,ll=Ut&&Ut.createElement("template"),Yu={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const i=t==="svg"?Ut.createElementNS(Ku,e):t==="mathml"?Ut.createElementNS(Zu,e):n?Ut.createElement(e,{is:n}):Ut.createElement(e);return e==="select"&&o&&o.multiple!=null&&i.setAttribute("multiple",o.multiple),i},createText:e=>Ut.createTextNode(e),createComment:e=>Ut.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ut.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,i,r){const s=n?n.previousSibling:t.lastChild;if(i&&(i===r||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===r||!(i=i.nextSibling)););else{ll.innerHTML=sl(o==="svg"?`<svg>${e}</svg>`:o==="mathml"?`<math>${e}</math>`:e);const l=ll.content;if(o==="svg"||o==="mathml"){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}t.insertBefore(l,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Qt="transition",Yn="animation",Xn=Symbol("_vtc"),al={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},Xu=Oe({},us,al),Gn=(e=>(e.displayName="Transition",e.props=Xu,e))((e,{slots:t})=>il(Uc,Gu(e),t)),fn=(e,t=[])=>{re(e)?e.forEach(n=>n(...t)):e&&e(...t)},cl=e=>e?re(e)?e.some(t=>t.length>1):e.length>1:!1;function Gu(e){const t={};for(const T in e)T in al||(t[T]=e[T]);if(e.css===!1)return t;const{name:n="v",type:o,duration:i,enterFromClass:r=`${n}-enter-from`,enterActiveClass:s=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:a=r,appearActiveClass:u=s,appearToClass:c=l,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,y=Ju(i),b=y&&y[0],$=y&&y[1],{onBeforeEnter:M,onEnter:L,onEnterCancelled:D,onLeave:w,onLeaveCancelled:g,onBeforeAppear:E=M,onAppear:U=L,onAppearCancelled:K=D}=t,_=(T,G,C,ee)=>{T._enterCancelled=ee,pn(T,G?c:l),pn(T,G?u:s),C&&C()},z=(T,G)=>{T._isLeaving=!1,pn(T,d),pn(T,p),pn(T,f),G&&G()},A=T=>(G,C)=>{const ee=T?U:L,W=()=>_(G,T,C);fn(ee,[G,W]),ul(()=>{pn(G,T?a:r),qt(G,T?c:l),cl(ee)||dl(G,o,b,W)})};return Oe(t,{onBeforeEnter(T){fn(M,[T]),qt(T,r),qt(T,s)},onBeforeAppear(T){fn(E,[T]),qt(T,a),qt(T,u)},onEnter:A(!1),onAppear:A(!0),onLeave(T,G){T._isLeaving=!0;const C=()=>z(T,G);qt(T,d),T._enterCancelled?(qt(T,f),hl(T)):(hl(T),qt(T,f)),ul(()=>{T._isLeaving&&(pn(T,d),qt(T,p),cl(w)||dl(T,o,$,C))}),fn(w,[T,C])},onEnterCancelled(T){_(T,!1,void 0,!0),fn(D,[T])},onAppearCancelled(T){_(T,!0,void 0,!0),fn(K,[T])},onLeaveCancelled(T){z(T),fn(g,[T])}})}function Ju(e){if(e==null)return null;if(Te(e))return[Ri(e.enter),Ri(e.leave)];{const t=Ri(e);return[t,t]}}function Ri(e){return di(e)}function qt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Xn]||(e[Xn]=new Set)).add(t)}function pn(e,t){t.split(/\s+/).forEach(o=>o&&e.classList.remove(o));const n=e[Xn];n&&(n.delete(t),n.size||(e[Xn]=void 0))}function ul(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Qu=0;function dl(e,t,n,o){const i=e._endId=++Qu,r=()=>{i===e._endId&&o()};if(n!=null)return setTimeout(r,n);const{type:s,timeout:l,propCount:a}=ed(e,t);if(!s)return o();const u=s+"end";let c=0;const d=()=>{e.removeEventListener(u,f),r()},f=p=>{p.target===e&&++c>=a&&d()};setTimeout(()=>{c<a&&d()},l+1),e.addEventListener(u,f)}function ed(e,t){const n=window.getComputedStyle(e),o=y=>(n[y]||"").split(", "),i=o(`${Qt}Delay`),r=o(`${Qt}Duration`),s=fl(i,r),l=o(`${Yn}Delay`),a=o(`${Yn}Duration`),u=fl(l,a);let c=null,d=0,f=0;t===Qt?s>0&&(c=Qt,d=s,f=r.length):t===Yn?u>0&&(c=Yn,d=u,f=a.length):(d=Math.max(s,u),c=d>0?s>u?Qt:Yn:null,f=c?c===Qt?r.length:a.length:0);const p=c===Qt&&/\b(?:transform|all)(?:,|$)/.test(o(`${Qt}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:p}}function fl(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,o)=>pl(n)+pl(e[o])))}function pl(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function hl(e){return(e?e.ownerDocument:document).body.offsetHeight}function td(e,t,n){const o=e[Xn];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Fo=Symbol("_vod"),gl=Symbol("_vsh"),nd={name:"show",beforeMount(e,{value:t},{transition:n}){e[Fo]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Jn(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),Jn(e,!0),o.enter(e)):o.leave(e,()=>{Jn(e,!1)}):Jn(e,t))},beforeUnmount(e,{value:t}){Jn(e,t)}};function Jn(e,t){e.style.display=t?e[Fo]:"none",e[gl]=!t}const od=Symbol(""),id=/(?:^|;)\s*display\s*:/;function rd(e,t,n){const o=e.style,i=$e(n);let r=!1;if(n&&!i){if(t)if($e(t))for(const s of t.split(";")){const l=s.slice(0,s.indexOf(":")).trim();n[l]==null&&Wo(o,l,"")}else for(const s in t)n[s]==null&&Wo(o,s,"");for(const s in n)s==="display"&&(r=!0),Wo(o,s,n[s])}else if(i){if(t!==n){const s=o[od];s&&(n+=";"+s),o.cssText=n,r=id.test(n)}}else t&&e.removeAttribute("style");Fo in e&&(e[Fo]=r?o.display:"",e[gl]&&(o.display="none"))}const ml=/\s*!important$/;function Wo(e,t,n){if(re(n))n.forEach(o=>Wo(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=sd(e,t);ml.test(n)?e.setProperty(Qe(o),n.replace(ml,""),"important"):e[o]=n}}const vl=["Webkit","Moz","ms"],Hi={};function sd(e,t){const n=Hi[t];if(n)return n;let o=He(t);if(o!=="filter"&&o in e)return Hi[t]=o;o=uo(o);for(let i=0;i<vl.length;i++){const r=vl[i]+o;if(r in e)return Hi[t]=r}return t}const bl="http://www.w3.org/1999/xlink";function yl(e,t,n,o,i,r=Qa(t)){o&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(bl,t.slice(6,t.length)):e.setAttributeNS(bl,t,n):n==null||r&&!Or(n)?e.removeAttribute(t):e.setAttribute(t,r?"":bt(n)?String(n):n)}function wl(e,t,n,o,i){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?sl(n):n);return}const r=e.tagName;if(t==="value"&&r!=="PROGRESS"&&!r.includes("-")){const l=r==="OPTION"?e.getAttribute("value")||"":e.value,a=n==null?e.type==="checkbox"?"on":"":String(n);(l!==a||!("_value"in e))&&(e.value=a),n==null&&e.removeAttribute(t),e._value=n;return}let s=!1;if(n===""||n==null){const l=typeof e[t];l==="boolean"?n=Or(n):n==null&&l==="string"?(n="",s=!0):l==="number"&&(n=0,s=!0)}try{e[t]=n}catch{}s&&e.removeAttribute(i||t)}function hn(e,t,n,o){e.addEventListener(t,n,o)}function ld(e,t,n,o){e.removeEventListener(t,n,o)}const xl=Symbol("_vei");function ad(e,t,n,o,i=null){const r=e[xl]||(e[xl]={}),s=r[t];if(o&&s)s.value=o;else{const[l,a]=cd(t);if(o){const u=r[t]=fd(o,i);hn(e,l,u,a)}else s&&(ld(e,l,s,a),r[t]=void 0)}}const _l=/(?:Once|Passive|Capture)$/;function cd(e){let t;if(_l.test(e)){t={};let o;for(;o=e.match(_l);)e=e.slice(0,e.length-o[0].length),t[o[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Qe(e.slice(2)),t]}let Fi=0;const ud=Promise.resolve(),dd=()=>Fi||(ud.then(()=>Fi=0),Fi=Date.now());function fd(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;wt(pd(o,n.value),t,5,[o])};return n.value=e,n.attached=dd(),n}function pd(e,t){if(re(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(o=>i=>!i._stopped&&o&&o(i))}else return t}const Sl=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,hd=(e,t,n,o,i,r)=>{const s=i==="svg";t==="class"?td(e,o,s):t==="style"?rd(e,n,o):so(t)?si(t)||ad(e,t,n,o,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):gd(e,t,o,s))?(wl(e,t,o),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&yl(e,t,o,s,r,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!$e(o))?wl(e,He(t),o,r,t):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),yl(e,t,o,s))};function gd(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&Sl(t)&&fe(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const i=e.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return Sl(t)&&$e(n)?!1:t in e}const kl={};function md(e,t,n){let o=he(e,t);ao(o)&&(o=Oe({},o,t));class i extends Wi{constructor(s){super(o,s,n)}}return i.def=o,i}const vd=typeof HTMLElement<"u"?HTMLElement:class{};class Wi extends vd{constructor(t,n={},o=Ol){super(),this._def=t,this._props=n,this._createApp=o,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&o!==Ol?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow(Oe({},t.shadowRootOptions,{mode:"open"})),this._root=this.shadowRoot):this._root=this}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.parentNode||t.host);)if(t instanceof Wi){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(t=this._parent){t&&(this._instance.parent=t._instance,this._inheritParentContext(t))}_inheritParentContext(t=this._parent){t&&this._app&&Object.setPrototypeOf(this._app._context.provides,t._instance.provides)}disconnectedCallback(){this._connected=!1,pt(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&(this._teleportTargets.clear(),this._teleportTargets=void 0))})}_processMutations(t){for(const n of t)this._setAttr(n.attributeName)}_resolveDef(){if(this._pendingResolve)return;for(let o=0;o<this.attributes.length;o++)this._setAttr(this.attributes[o].name);this._ob=new MutationObserver(this._processMutations.bind(this)),this._ob.observe(this,{attributes:!0});const t=(o,i=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:r,styles:s}=o;let l;if(r&&!re(r))for(const a in r){const u=r[a];(u===Number||u&&u.type===Number)&&(a in this._props&&(this._props[a]=di(this._props[a])),(l||(l=Object.create(null)))[He(a)]=!0)}this._numberProps=l,this._resolveProps(o),this.shadowRoot&&this._applyStyles(s),this._mount(o)},n=this._def.__asyncLoader;n?this._pendingResolve=n().then(o=>{o.configureApp=this._def.configureApp,t(this._def=o,!0)}):t(this._def)}_mount(t){this._app=this._createApp(t),this._inheritParentContext(),t.configureApp&&t.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const n=this._instance&&this._instance.exposed;if(n)for(const o in n)ke(this,o)||Object.defineProperty(this,o,{get:()=>X(n[o])})}_resolveProps(t){const{props:n}=t,o=re(n)?n:Object.keys(n||{});for(const i of Object.keys(this))i[0]!=="_"&&o.includes(i)&&this._setProp(i,this[i]);for(const i of o.map(He))Object.defineProperty(this,i,{get(){return this._getProp(i)},set(r){this._setProp(i,r,!0,!this._patching)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const n=this.hasAttribute(t);let o=n?this.getAttribute(t):kl;const i=He(t);n&&this._numberProps&&this._numberProps[i]&&(o=di(o)),this._setProp(i,o,!1,!0)}_getProp(t){return this._props[t]}_setProp(t,n,o=!0,i=!1){if(n!==this._props[t]&&(this._dirty=!0,n===kl?delete this._props[t]:(this._props[t]=n,t==="key"&&this._app&&(this._app._ceVNode.key=n)),i&&this._instance&&this._update(),o)){const r=this._ob;r&&(this._processMutations(r.takeRecords()),r.disconnect()),n===!0?this.setAttribute(Qe(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(Qe(t),n+""):n||this.removeAttribute(Qe(t)),r&&r.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),Td(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const n=N(this._def,Oe(t,this._props));return this._instance||(n.ce=o=>{this._instance=o,o.ce=this,o.isCE=!0;const i=(r,s)=>{this.dispatchEvent(new CustomEvent(r,ao(s[0])?Oe({detail:s},s[0]):{detail:s}))};o.emit=(r,...s)=>{i(r,s),Qe(r)!==r&&i(Qe(r),s)},this._setParent()}),n}_applyStyles(t,n){if(!t)return;if(n){if(n===this._def||this._styleChildren.has(n))return;this._styleChildren.add(n)}const o=this._nonce;for(let i=t.length-1;i>=0;i--){const r=document.createElement("style");o&&r.setAttribute("nonce",o),r.textContent=t[i],this.shadowRoot.prepend(r)}}_parseSlots(){const t=this._slots={};let n;for(;n=this.firstChild;){const o=n.nodeType===1&&n.getAttribute("slot")||"default";(t[o]||(t[o]=[])).push(n),this.removeChild(n)}}_renderSlots(){const t=this._getSlots(),n=this._instance.type.__scopeId;for(let o=0;o<t.length;o++){const i=t[o],r=i.getAttribute("name")||"default",s=this._slots[r],l=i.parentNode;if(s)for(const a of s){if(n&&a.nodeType===1){const u=n+"-s",c=document.createTreeWalker(a,1);a.setAttribute(u,"");let d;for(;d=c.nextNode();)d.setAttribute(u,"")}l.insertBefore(a,i)}else for(;i.firstChild;)l.insertBefore(i.firstChild,i);l.removeChild(i)}}_getSlots(){const t=[this];this._teleportTargets&&t.push(...this._teleportTargets);const n=new Set;for(const o of t){const i=o.querySelectorAll("slot");for(let r=0;r<i.length;r++)n.add(i[r])}return Array.from(n)}_injectChildStyle(t){this._applyStyles(t.styles,t)}_beginPatch(){this._patching=!0,this._dirty=!1}_endPatch(){this._patching=!1,this._dirty&&this._instance&&this._update()}_removeChildStyle(t){}}const Uo=e=>{const t=e.props["onUpdate:modelValue"]||!1;return re(t)?n=>fo(t,n):t};function bd(e){e.target.composing=!0}function Cl(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const kn=Symbol("_assign");function Tl(e,t,n){return t&&(e=e.trim()),n&&(e=ui(e)),e}const yd={created(e,{modifiers:{lazy:t,trim:n,number:o}},i){e[kn]=Uo(i);const r=o||i.props&&i.props.type==="number";hn(e,t?"change":"input",s=>{s.target.composing||e[kn](Tl(e.value,n,r))}),(n||r)&&hn(e,"change",()=>{e.value=Tl(e.value,n,r)}),t||(hn(e,"compositionstart",bd),hn(e,"compositionend",Cl),hn(e,"change",Cl))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:o,trim:i,number:r}},s){if(e[kn]=Uo(s),e.composing)return;const l=(r||e.type==="number")&&!/^0\d/.test(e.value)?ui(e.value):e.value,a=t??"";l!==a&&(document.activeElement===e&&e.type!=="range"&&(o&&t===n||i&&e.value.trim()===a)||(e.value=a))}},wd={deep:!0,created(e,t,n){e[kn]=Uo(n),hn(e,"change",()=>{const o=e._modelValue,i=xd(e),r=e.checked,s=e[kn];if(re(o)){const l=$r(o,i),a=l!==-1;if(r&&!a)s(o.concat(i));else if(!r&&a){const u=[...o];u.splice(l,1),s(u)}}else if(lo(o)){const l=new Set(o);r?l.add(i):l.delete(i),s(l)}else s(Pl(e,r))})},mounted:Ml,beforeUpdate(e,t,n){e[kn]=Uo(n),Ml(e,t,n)}};function Ml(e,{value:t,oldValue:n},o){e._modelValue=t;let i;if(re(t))i=$r(t,o.props.value)>-1;else if(lo(t))i=t.has(o.props.value);else{if(t===n)return;i=ho(t,Pl(e,!0))}e.checked!==i&&(e.checked=i)}function xd(e){return"_value"in e?e._value:e.value}function Pl(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const _d=["ctrl","shift","alt","meta"],Sd={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)=>_d.some(n=>e[`${n}Key`]&&!t.includes(n))},Be=(e,t)=>{const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=(i,...r)=>{for(let s=0;s<t.length;s++){const l=Sd[t[s]];if(l&&l(i,t))return}return e(i,...r)})},kd={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},qo=(e,t)=>{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=i=>{if(!("key"in i))return;const r=Qe(i.key);if(t.some(s=>s===r||kd[s]===r))return e(i)})},Cd=Oe({patchProp:hd},Yu);let El;function Il(){return El||(El=vu(Cd))}const Td=(...e)=>{Il().render(...e)},Ol=(...e)=>{const t=Il().createApp(...e),{mount:n}=t;return t.mount=o=>{const i=Pd(o);if(!i)return;const r=t._component;!fe(r)&&!r.render&&!r.template&&(r.template=i.innerHTML),i.nodeType===1&&(i.textContent="");const s=n(i,!1,Md(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),s},t};function Md(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Pd(e){return $e(e)?document.querySelector(e):e}function Cn(e){return e.checkVisibility({opacityProperty:!0,visibilityProperty:!1,contentVisibilityAuto:!1})}async function en(e,t,n){const o=await n(()=>{e=0});if(o!==void 0)return o;if(!(e<=0))return await new Promise(i=>{setTimeout(async()=>{const r=await en(e-1,t,n);i(r)},t)})}function Qn(e,t){return e>=280&&t>=50||e>=160&&t>=280}var Kt;(function(e){e[e.manga=1]="manga",e[e.novel=2]="novel",e[e.anime=3]="anime"})(Kt||(Kt={}));async function Ed(e,t){const n=["NAV","ASIDE","FOOTER","HEADER","BR","HR","BUTTON","A"],o="img:not(nav img, header img, footer img, aside img), canvas",i=t==null?void 0:t.timeoutMs,r=t==null?void 0:t.include,s=t==null?void 0:t.paraSel,l=!r||r.includes(Kt.manga),a=!r||r.includes(Kt.novel);let u=0;return await en(i/50,50,()=>{const p=c();if(p){if(l&&f(p,t==null?void 0:t.validateImgSize))return Kt.manga;if(a&&u++%3===0&&d(p))return Kt.novel}});function c(){for(const p of e.split(",")){const y=document.querySelector(p);if(y)return y}}function d(p){const y=[`p:not(${n.map(D=>`${D} p`).join(",")})`,s].filter(Boolean).join(",");if(!p.querySelector(y)&&(!s||!p.matches(s)))return!1;let b=0,$=0,M=0;return L(p);function L(D){const w=D.tagName;if(n.includes(w)||!Cn(D)||window.getComputedStyle(D).position==="fixed")return!1;if(w==="P"||s&&D.matches(s))return b+=D.textContent.split(" ").filter(Boolean).length,$++,M=0,!l&&b>50||$>10&&b>120||$>5&&b>250||b>400;$>0&&++M>4&&($=0,b=0);const E=Array.from(D.children);for(let U=0;U<E.length;U++)if(L(E[U]))return!0;return!1}}function f(p,y){const b=Array.from(p.querySelectorAll(o));if(y===!1)return b.length>0;const $=Math.min(window.innerWidth*.9,500);let M=0;for(let L=0;L<b.length;L++){const D=b[L];if(!Cn(D))continue;const{width:w,height:g}=D.getBoundingClientRect();if(Qn(w,g)&&(w>=$||(M+=g,M>=$)))return!0}return!1}}function Ui(e,t){return pi()?(nc(e,t),!0):!1}const qi=new WeakMap,Id=(...e)=>{var t;const n=e[0],o=(t=dn())===null||t===void 0?void 0:t.proxy,i=o??pi();if(i==null&&!Is())throw new Error("injectLocal must be called in setup");return i&&qi.has(i)&&n in qi.get(i)?qi.get(i)[n]:Ft(...e)},$l=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Od=e=>e!=null,$d=Object.prototype.toString,zd=e=>$d.call(e)==="[object Object]",Tn=()=>{};function Dd(...e){if(e.length!==1)return Ec(...e);const t=e[0];return typeof t=="function"?Ln(ts(()=>({get:t,set:Tn}))):te(t)}function zl(e,t){function n(...o){return new Promise((i,r)=>{Promise.resolve(e(()=>t.apply(this,o),{fn:t,thisArg:this,args:o})).then(i).catch(r)})}return n}const Dl=e=>e();function Ad(e,t={}){let n,o,i=Tn;const r=a=>{clearTimeout(a),i(),i=Tn};let s;return a=>{const u=ft(e),c=ft(t.maxWait);return n&&r(n),u<=0||c!==void 0&&c<=0?(o&&(r(o),o=void 0),Promise.resolve(a())):new Promise((d,f)=>{i=t.rejectOnCancel?f:d,s=a,c&&!o&&(o=setTimeout(()=>{n&&r(n),o=void 0,d(s())},c)),n=setTimeout(()=>{o&&r(o),o=void 0,d(a())},u)})}}function Ld(e=Dl,t={}){const{initialState:n="active"}=t,o=Dd(n==="active");function i(){o.value=!1}function r(){o.value=!0}const s=(...l)=>{o.value&&e(...l)};return{isActive:Ln(o),pause:i,resume:r,eventFilter:s}}function Al(e){return e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e)}function eo(e){return Array.isArray(e)?e:[e]}function jd(e){return dn()}function gt(e,t=200,n={}){return zl(Ad(t,n),e)}function Bd(e,t,n={}){const{eventFilter:o=Dl,...i}=n;return de(e,zl(o,t),i)}function Nd(e,t,n={}){const{eventFilter:o,initialState:i="active",...r}=n,{eventFilter:s,pause:l,resume:a,isActive:u}=Ld(o,{initialState:i});return{stop:Bd(e,t,{...r,eventFilter:s}),pause:l,resume:a,isActive:u}}const Vd=Nd;function Ki(e,t=!0,n){jd()?je(e,n):t?e():pt(e)}function Rd(e,t,n){return de(e,t,{...n,immediate:!0})}const xt=$l?window:void 0,Hd=$l?window.document:void 0;function Ot(e){var t;const n=ft(e);return(t=n==null?void 0:n.$el)!==null&&t!==void 0?t:n}function _t(...e){const t=[],n=()=>{t.forEach(l=>l()),t.length=0},o=(l,a,u,c)=>(l.addEventListener(a,u,c),()=>l.removeEventListener(a,u,c)),i=Q(()=>{const l=eo(ft(e[0])).filter(a=>a!=null);return l.every(a=>typeof a!="string")?l:void 0}),r=Rd(()=>{var l,a;return[(l=(a=i.value)===null||a===void 0?void 0:a.map(u=>Ot(u)))!==null&&l!==void 0?l:[xt].filter(u=>u!=null),eo(ft(i.value?e[1]:e[0])),eo(X(i.value?e[2]:e[1])),ft(i.value?e[3]:e[2])]},([l,a,u,c])=>{if(n(),!(l!=null&&l.length)||!(a!=null&&a.length)||!(u!=null&&u.length))return;const d=zd(c)?{...c}:c;t.push(...l.flatMap(f=>a.flatMap(p=>u.map(y=>o(f,p,y,d)))))},{flush:"post"}),s=()=>{r(),n()};return Ui(n),s}function Fd(){const e=dt(!1),t=dn();return t&&je(()=>{e.value=!0},t),e}function Zi(e){const t=Fd();return Q(()=>(t.value,!!e()))}const Wd=Symbol("vueuse-ssr-width");function Ud(){const e=Is()?Id(Wd,null):null;return typeof e=="number"?e:void 0}function qd(e,t={}){const{window:n=xt,ssrWidth:o=Ud()}=t,i=Zi(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function"),r=dt(typeof o=="number"),s=dt(),l=dt(!1),a=u=>{l.value=u.matches};return Fs(()=>{if(r.value){r.value=!i.value,l.value=ft(e).split(",").some(u=>{const c=u.includes("not all"),d=u.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),f=u.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let p=!!(d||f);return d&&p&&(p=o>=Al(d[1])),f&&p&&(p=o<=Al(f[1])),c?!p:p});return}i.value&&(s.value=n.matchMedia(ft(e)),l.value=s.value.matches)}),_t(s,"change",a,{passive:!0}),Q(()=>l.value)}const Ko=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Zo="__vueuse_ssr_handlers__",Kd=Zd();function Zd(){return Zo in Ko||(Ko[Zo]=Ko[Zo]||{}),Ko[Zo]}function Yd(e,t){return Kd[e]||t}function Xd(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const Gd={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},Ll="vueuse-storage";function Jd(e,t,n,o={}){var i;const{flush:r="pre",deep:s=!0,listenToStorageChanges:l=!0,writeDefaults:a=!0,mergeDefaults:u=!1,shallow:c,window:d=xt,eventFilter:f,onError:p=C=>{console.error(C)},initOnMounted:y}=o,b=(c?dt:te)(typeof t=="function"?t():t),$=Q(()=>ft(e));if(!n)try{n=Yd("getDefaultStorage",()=>xt==null?void 0:xt.localStorage)()}catch(C){p(C)}if(!n)return b;const M=ft(t),L=Xd(M),D=(i=o.serializer)!==null&&i!==void 0?i:Gd[L],{pause:w,resume:g}=Vd(b,C=>z(C),{flush:r,deep:s,eventFilter:f});de($,()=>T(),{flush:r});let E=!1;const U=C=>{y&&!E||T(C)},K=C=>{y&&!E||G(C)};d&&l&&(n instanceof Storage?_t(d,"storage",U,{passive:!0}):_t(d,Ll,K)),y?Ki(()=>{E=!0,T()}):T();function _(C,ee){if(d){const W={key:$.value,oldValue:C,newValue:ee,storageArea:n};d.dispatchEvent(n instanceof Storage?new StorageEvent("storage",W):new CustomEvent(Ll,{detail:W}))}}function z(C){try{const ee=n.getItem($.value);if(C==null)_(ee,null),n.removeItem($.value);else{const W=D.write(C);ee!==W&&(n.setItem($.value,W),_(ee,W))}}catch(ee){p(ee)}}function A(C){const ee=C?C.newValue:n.getItem($.value);if(ee==null)return a&&M!=null&&n.setItem($.value,D.write(M)),M;if(!C&&u){const W=D.read(ee);return typeof u=="function"?u(W,M):L==="object"&&!Array.isArray(W)?{...M,...W}:W}else return typeof ee!="string"?ee:D.read(ee)}function T(C){if(!(C&&C.storageArea!==n)){if(C&&C.key==null){b.value=M;return}if(!(C&&C.key!==$.value)){w();try{const ee=D.write(b.value);(C===void 0||(C==null?void 0:C.newValue)!==ee)&&(b.value=A(C))}catch(ee){p(ee)}finally{C?pt(g):g()}}}}function G(C){T(C.detail)}return b}function Yi(e={}){const{document:t=Hd}=e;if(!t)return dt("visible");const n=dt(t.visibilityState);return _t(t,"visibilitychange",()=>{n.value=t.visibilityState},{passive:!0}),n}function Qd(e,t,n={}){const{window:o=xt,...i}=n;let r;const s=Zi(()=>o&&"ResizeObserver"in o),l=()=>{r&&(r.disconnect(),r=void 0)},a=de(Q(()=>{const c=ft(e);return Array.isArray(c)?c.map(d=>Ot(d)):[Ot(c)]}),c=>{if(l(),s.value&&o){r=new ResizeObserver(t);for(const d of c)d&&r.observe(d,i)}},{immediate:!0,flush:"post"}),u=()=>{l(),a()};return Ui(u),{isSupported:s,stop:u}}function jl(e,t={width:0,height:0},n={}){const{window:o=xt,box:i="content-box"}=n,r=Q(()=>{var d;return(d=Ot(e))===null||d===void 0||(d=d.namespaceURI)===null||d===void 0?void 0:d.includes("svg")}),s=dt(t.width),l=dt(t.height),{stop:a}=Qd(e,([d])=>{const f=i==="border-box"?d.borderBoxSize:i==="content-box"?d.contentBoxSize:d.devicePixelContentBoxSize;if(o&&r.value){const p=Ot(e);if(p){const y=p.getBoundingClientRect();s.value=y.width,l.value=y.height}}else if(f){const p=eo(f);s.value=p.reduce((y,{inlineSize:b})=>y+b,0),l.value=p.reduce((y,{blockSize:b})=>y+b,0)}else s.value=d.contentRect.width,l.value=d.contentRect.height},n);Ki(()=>{const d=Ot(e);d&&(s.value="offsetWidth"in d?d.offsetWidth:t.width,l.value="offsetHeight"in d?d.offsetHeight:t.height)});const u=de(()=>Ot(e),d=>{s.value=d?t.width:0,l.value=d?t.height:0});function c(){a(),u()}return{width:s,height:l,stop:c}}function ef(e,t,n={}){const{root:o,rootMargin:i="0px",threshold:r=0,window:s=xt,immediate:l=!0}=n,a=Zi(()=>s&&"IntersectionObserver"in s),u=Q(()=>eo(ft(e)).map(Ot).filter(Od));let c=Tn;const d=dt(l),f=a.value?de(()=>[u.value,Ot(o),d.value],([y,b])=>{if(c(),!d.value||!y.length)return;const $=new IntersectionObserver(t,{root:Ot(b),rootMargin:i,threshold:r});y.forEach(M=>M&&$.observe(M)),c=()=>{$.disconnect(),c=Tn}},{immediate:l,flush:"post"}):Tn,p=()=>{c(),f(),d.value=!1};return Ui(p),{isSupported:a,isActive:d,pause(){c(),d.value=!1},resume(){d.value=!0},stop:p}}function tf(e,t,n={}){const{window:o=xt}=n;return Jd(e,t,o==null?void 0:o.localStorage,n)}function gn(e={}){const{window:t=xt,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:o=Number.POSITIVE_INFINITY,listenOrientation:i=!0,includeScrollbar:r=!0,type:s="inner"}=e,l=dt(n),a=dt(o),u=()=>{if(t)if(s==="outer")l.value=t.outerWidth,a.value=t.outerHeight;else if(s==="visual"&&t.visualViewport){const{width:d,height:f,scale:p}=t.visualViewport;l.value=Math.round(d*p),a.value=Math.round(f*p)}else r?(l.value=t.innerWidth,a.value=t.innerHeight):(l.value=t.document.documentElement.clientWidth,a.value=t.document.documentElement.clientHeight)};u(),Ki(u);const c={passive:!0};return _t("resize",u,c),t&&s==="visual"&&t.visualViewport&&_t(t.visualViewport,"resize",u,c),i&&de(qd("(orientation: portrait)"),()=>u()),{width:l,height:a}}class to{static register(t){this.handlers.push(t)}static unregister(t){const n=this.handlers.indexOf(t);n!==-1&&this.handlers.splice(n,1)}static trigger(){for(const t of this.handlers)if(t())return!0;return!1}static clear(){this.handlers=[]}}Pe(to,"handlers",[]);function Xi(e){je(()=>to.register(e)),Pt(()=>to.unregister(e))}const Bl=he({__name:"HelpScreen",props:{touchDevice:{type:Boolean}},emits:["hide"],setup(e,{emit:t}){const n=e,o=t,i=te(null),r=te([]);Xi(()=>(o("hide"),!0)),je(async()=>{const u=jl(i),c=gt(()=>{s({width:u.width.value,height:u.height.value})},50);c(),de(u.width,c),de(u.height,c)});function s(u){var f;const c=(f=i.value)==null?void 0:f.parentElement;if(!c)return;const d=Array.from(c.querySelectorAll("#controls [title], #top-controls [title], #bottom-controls [title]"));d.length&&(r.value=l(d,u))}function l(u,c){const d=[],f=[];let p=0,y=0;const b=50,$=25;u.forEach(g=>{var z;const E=(z=g.getAttribute("title"))==null?void 0:z.trim(),U=g.getBoundingClientRect();if(!E||!U.height||!U.width)return;const K=Math.ceil((U.top-10)/b),_=Math.ceil((U.left-10)/b);f.push({isTour:!1,title:E,rect:U,fromX:_,toX:Math.max(_+1,Math.ceil((U.right+10)/b)),fromY:K,toY:Math.max(K+1,Math.ceil((U.bottom+10)/b))})}),f.forEach(g=>{for(let E=g.fromY;E<g.toY;E++){d[E]??(d[E]=[]);for(let U=g.fromX;U<g.toX;U++)d[E][U]=g;g.toY>p+1&&(p=g.toY-1),g.toX>y+1&&(y=g.toX-1)}});let M=y/2;f.forEach(g=>{g.isAlignRight=g.fromX>M});const L=(g,E)=>{d[E]??(d[E]=[]);const U=E>=g.toY;if(g.isTour)for(let K=g.fromX;K<g.toX;K++)delete d[g.fromY][K],g.fromY=E,g.toY=E+(U?1:-1),d[E][K]=g;else{const K=g.isAlignRight?g.fromX-3:g.fromX,_=K+3;g.helpItem={fromX:K,toX:_,fromY:E,toY:E+1,isTour:!0,isAlignRight:g.isAlignRight};for(let z=K;z<_;z++)d[E][z]=g.helpItem}},D=(g,E)=>{if(E>p||E<0)return!1;const U=E>=g.toY,K=d[E];if(!K)return L(g,E),!0;const _=K[g.fromX];if(_&&!_.isTour)return!1;if(_&&_.isTour)return D(_,U?E+1:E-1)?(L(g,E),!0):!1;if(!_){const z=g.isAlignRight?-1:1;return K[g.fromX+z]||K[g.fromX+z*2]?D(g,U?E+1:E-1):(L(g,E),!0)}return!1};f.forEach(g=>{if(!D(g,g.toY)){if(g.isAlignRight){const E=d[g.fromY]??[];if(!E.slice(g.fromX-3,g.fromX).filter(Boolean).length){const K=g.fromX-3,_=g.fromX;g.helpItem={isTour:!0,isAlignRight:!0,fromX:K,toX:_,fromY:g.fromY,toY:g.toY};for(let z=g.fromX-3;z<g.fromX;z++)E[z]=g.helpItem;return}}D(g,g.fromY-1)}});const w=[];return f.forEach(g=>{const{title:E,helpItem:U,rect:K,isAlignRight:_,fromX:z,fromY:A,toY:T}=g;if(!E||!U||!K)return;const G=U.fromY>=T,C=U.toY<=A;w.push({title:a(E),style:{top:G?`${K.bottom+(U.fromY-T)*b+$}px`:C?void 0:`${K.top+8}px`,bottom:C?`${c.height-K.top+(U.toY-A)*b+$}px`:void 0,left:_?void 0:`${K.left}px`,right:_?G?`${c.width-K.right}px`:`${c.width-K.right+K.width+$}px`:void 0},arrowStyle:{width:C||G?"2px":`${Math.abs(U.toX-z)*b+$-5}px`,height:C||G?`${(G?U.fromY-T:A-U.toY)*b+$}px`:"2px",top:G?`${K.bottom}px`:C?void 0:`${K.top+20}px`,bottom:C?`${c.height-K.top}px`:void 0,left:_?void 0:`${K.left+K.width/2}px`,right:_?G?`${c.width-K.right+K.width/2}px`:`${c.width-K.right+K.width}px`:void 0}})}),w}function a(u){return n.touchDevice?u.split("(")[0].trim():u}return(u,c)=>(v(),O(ye,null,[c[1]||(c[1]=Y("div",{class:"fixed inset-0 bg-black bg-opacity-90"},null,-1)),Y("div",{ref_key:"root",ref:i,class:"fixed inset-0 z-20 overscroll-contain select-none",onClick:c[0]||(c[0]=Be(d=>o("hide"),["stop"]))},[(v(!0),O(ye,null,Xt(r.value,d=>(v(),O(ye,{key:d.title},[Y("div",{class:"absolute",style:Ce(d.style)},Fe(d.title),5),Y("div",{class:"absolute bg-stone-300 rounded-lg",style:Ce(d.arrowStyle)},null,4)],64))),128))],512)],64))}}),nf=Object.freeze(Object.defineProperty({__proto__:null,default:Bl},Symbol.toStringTag,{value:"Module"}));function Mn(e,t){let n=null;return(...o)=>{n===null&&(n=setTimeout(()=>{n=null,e(...o)},t))}}const of=he({__name:"ReaderTour",emits:["hide"],setup(e,{emit:t}){const n=t,o=te(null),i=te(0),r=te([]),s=Q(()=>r.value[i.value]),l=Mn(a,500);je(()=>{const d=jl(o),f=gt(()=>u({width:d.width.value,height:d.height.value}),50);f(),de(d.width,f),de(d.height,f)});function a(){i.value>=r.value.length-1?n("hide"):i.value++}function u(d){const f=c();r.value=f.map(({rect:p,text:y})=>{const b=p.top<d.height-p.bottom,$=p.left<d.width-p.right;return{text:y,style:{left:`${p.left}px`,top:`${p.top}px`,width:`${p.width}px`,height:`${p.height}px`},textStyle:{left:$?`${p.left-12}px`:void 0,right:$?void 0:`${d.width-p.left}px`,top:b?`${p.bottom+12}px`:`${p.top+20}px`,textAlign:b?void 0:"right",transform:b?void 0:"translateY(-50%)"}}}),i.value>=r.value.length&&(i.value=r.value.length-1)}function c(){var p;const d=(p=o.value)==null?void 0:p.parentElement;if(!d)return[];const f=[];return d.querySelectorAll("[data-tour]").forEach(y=>{var M;const b=(M=y.getAttribute("data-tour"))==null?void 0:M.trim();if(!(b!=null&&b.length))return;const $=y.getBoundingClientRect();f.push({rect:$,text:b})}),f}return(d,f)=>{var p,y;return v(),O(ye,null,[Y("div",{class:ue(["fixed inset-0 bg-black bg-opacity-50 duration-500",{"opacity-0":!s.value,"opacity-100":!!s.value}])},null,2),Y("div",{ref_key:"root",ref:o,class:"tour",onClick:f[0]||(f[0]=Be((...b)=>X(l)&&X(l)(...b),["stop"]))},[s.value?(v(),O("div",{key:i.value,class:"tour__target",style:Ce(s.value.style)},null,4)):le("",!0),(v(),O("div",{key:i.value,class:"tour__text",style:Ce((p=s.value)==null?void 0:p.textStyle)},Fe(((y=s.value)==null?void 0:y.text)??""),5))],512)],64)}}}),rf=".tour{height:100%;left:0;overflow:hidden;position:fixed;top:0;width:100%;z-index:20}.tour__target{border-radius:9999px;border-width:2px;--tw-border-opacity:1;animation:tour-target-anim .5s forwards;border-color:rgb(120 113 108/var(--tw-border-opacity,1));box-shadow:0 0 0 99999px #000000e6}.tour__target,.tour__text{position:absolute}.tour__text{animation:tour-text-anim 1s forwards,tour-text-bounce .75s ease-in-out infinite alternate;max-width:320px;padding-left:12px;padding-right:12px;transition-duration:1s}@keyframes tour-target-anim{0%{transform:scale(3);--tw-border-opacity:0;opacity:0}to{transform:scale(1);--tw-border-opacity:1;opacity:.9}}@keyframes tour-text-anim{0%{opacity:0}to{opacity:1}}@keyframes tour-text-bounce{0%{margin-top:0}to{margin-top:.625}}",be=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n},Nl=be(of,[["styles",[rf]]]),sf=Object.freeze(Object.defineProperty({__proto__:null,default:Nl},Symbol.toStringTag,{value:"Module"}));function lf({touchDevice:e}){const t=te(!1);let n=0;return Fn("busy:touchDevice",e),Fn("setBusyState",o=>{n+=o?1:-1;const i=n>0;t.value!=i&&(t.value=i)}),Q(()=>t.value)}function Yo(){const e=Ft("busy:touchDevice"),t=Ft("setBusyState");let n=!1;return Pt(()=>{n&&(t==null||t(!1))}),(o,{desktopOnly:i=!1}={})=>{i&&e||(n=o,t==null||t(o))}}function af(e){Fn("hapticFeedback",e)}function Xo(){return Ft("hapticFeedback")}class cf{constructor(){Pe(this,"listeners");this.listeners=[],this.onKeyDown=this.onKeyDown.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.init()}init(){window.addEventListener("keydown",this.onKeyDown,{capture:!0}),window.addEventListener("keyup",this.onKeyUp,{capture:!0}),window.addEventListener("keypress",this.onKeyPress,{capture:!0})}dispose(){window.removeEventListener("keydown",this.onKeyDown,{capture:!0}),window.removeEventListener("keyup",this.onKeyUp,{capture:!0}),window.removeEventListener("keypress",this.onKeyPress,{capture:!0})}onKeyPress(t){t.stopImmediatePropagation(),t.stopPropagation()}onKeyDown(t){var n,o;t.stopImmediatePropagation(),t.stopPropagation();for(let i=0;i<this.listeners.length&&((o=(n=this.listeners[i]).onKeyDown)==null?void 0:o.call(n,t))!==!0;i++);}onKeyUp(t){var n,o;t.stopImmediatePropagation(),t.stopPropagation();for(let i=0;i<this.listeners.length&&((o=(n=this.listeners[i]).onKeyUp)==null?void 0:o.call(n,t))!==!0;i++);}addListener(t){this.listeners.push(t)}removeListener(t){const n=this.listeners.indexOf(t);n!==-1&&this.listeners.splice(n,1)}}function uf(){const e=new cf;return Pt(()=>e.dispose()),Fn("keyController",e),e}function $t(e){const t=Ft("keyController");je(()=>t.addListener(e)),Pt(()=>t.removeListener(e))}function df(e,t){const n=sessionStorage.getItem("tk:page:path");n!==location.pathname&&(sessionStorage.setItem("tk:page:path",location.pathname),n&&sessionStorage.removeItem("tk:page"));const o=te(t&&e>0?Math.max(0,e):+(sessionStorage.getItem("tk:page")??"0")||e);return Q({get:()=>o.value,set:i=>{o.value=i,sessionStorage.setItem("tk:page",i+"")}})}function ff(){sessionStorage.removeItem("tk:page"),sessionStorage.removeItem("tk:page:path")}const pf=(e,t)=>{const n=+(e.getAttribute("data-ripple")??0);if(!n)return;const o=document.createElement("span");let i=1,r=.65;const s=setInterval(a,20);l();function l(){o.style.position="absolute",o.style.height="5px",o.style.width="5px",o.style.borderRadius="100%",o.style.backgroundColor="#f2f2f2",o.style.left=`${t.currentTarget.clientWidth/2}px`,o.style.top=`${t.currentTarget.clientHeight/2}px`,t.currentTarget.appendChild(o)}function a(){const u=+n||50;i<=u?(i++,r-=.65/u,o.style.transform=`scale(${i})`,o.style.opacity=`${r}`):(o.remove(),clearInterval(s))}},zt={mounted:(e,t)=>{e.style.position="relative",e.style.overflow="hidden",e.setAttribute("data-ripple",t.value),e.addEventListener("click",n=>pf(e,n))},updated:(e,t)=>{e.setAttribute("data-ripple",t.value)}},hf={class:"group-hover:bg-stone-100 group-hover:bg-opacity-20 transition-bg duration-200 rounđe-full p-2 w-full h-full inline-flex justify-center items-center gap-2 text-base"},Gi=he({inheritAttrs:!1,__name:"BaseButton",props:{disabled:{type:Boolean},href:{type:String},transparent:{type:Boolean},title:{type:String},enableHapticFeedback:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=e,o=t,i=Yo(),r=Xo();let s=!1;function l(){s||(s=!0,i(!0,{desktopOnly:!0}))}function a(){s&&(s=!1,i(!1,{desktopOnly:!0}))}function u(c){n.disabled?c.preventDefault():(o("click",c),n.enableHapticFeedback&&r())}return(c,d)=>Re((v(),ie(xs(e.href?"a":"button"),Sn({href:e.href,title:e.title},{class:["h-10 max-w-full max-h-full rounded-full flex-shrink-0 focus:outline-none outline-none",{"cursor-default opacity-60":e.disabled,"hover:text-stone-100 group duration-200":!e.disabled,"bg-black bg-opacity-50":!e.transparent,[`${c.$attrs.class??""}`]:!0}],onClick:Be(u,["stop"]),onMouseenter:l,onMouseleave:a}),{default:oe(()=>[Y("div",hf,[Se(c.$slots,"default")])]),_:3},16,["class"])),[[X(zt),e.disabled?0:15]])}}),gf=Object.freeze(Object.defineProperty({__proto__:null,default:Gi},Symbol.toStringTag,{value:"Module"})),mf={},vf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function bf(e,t){return v(),O("svg",vf,[...t[0]||(t[0]=[Y("path",{fill:"currentColor",d:"M19 12.998h-6v6h-2v-6H5v-2h6v-6h2v6h6z"},null,-1)])])}const Vl=be(mf,[["render",bf]]),yf=Object.freeze(Object.defineProperty({__proto__:null,default:Vl},Symbol.toStringTag,{value:"Module"})),wf={class:"h-screen w-full flex justify-center items-center relative"},xf={key:0,class:"flex gap-6 p-6 duration-200"},_f={key:0,class:"inline-block rounded-full relative w-28 h-12 overflow-hidden"},Sf={key:0,class:"absolute bottom-0 left-0 right-0 flex justify-center pb-7 md:pb-6 lg:pb-4"},kf={class:"flex justify-center items-center gap-1 pl-1 pr-2 h-full"},Ji=be(he({__name:"AutoNext",props:{hasNext:{type:Boolean},offlineMode:{type:Boolean},seconds:{type:Number},showAddButton:{type:Boolean}},emits:["next","hide","add-to-library","visibility-changed"],setup(e,{emit:t}){const n=e,o=t,i=te(null),r=te(!1),s=te(n.seconds),l=te(n.seconds<=0),a=te(n.seconds),u=Xo();je(()=>{let f;ef(i,p=>{const y=p.some(b=>b.isIntersecting);y!==r.value&&(r.value=y,o("visibility-changed",y),l.value=n.seconds<=0,s.value=n.seconds,a.value=n.seconds,f&&(clearInterval(f),f=void 0),!(!r.value||l.value)&&(f=setInterval(()=>{s.value-=1,s.value<=0&&(clearInterval(f),f=void 0,o("next"))},1e3)))},{rootMargin:"-108px 0px"}),Pt(()=>f&&clearInterval(f))});function c(){o("next"),u()}function d(){o("hide")}return(f,p)=>(v(),O("div",wf,[Y("div",{ref_key:"main",ref:i,class:"inline-flex text-base text-stone-300 select-none"},[N(Gn,{"enter-from-class":"opacity-0","leave-to-class":"opacity-0"},{default:oe(()=>[r.value?(v(),O("div",xf,[e.hasNext?(v(),O("div",_f,[r.value?(v(),O("div",{key:0,class:"absolute left-0 top-0 bottom-0 h-full bg-stone-600 bg-opacity-50",style:Ce(l.value?{}:{animation:`auto-next ${a.value}s linear forwards`})},null,4)):le("",!0),Re((v(),O("button",{class:"bg-transparent rounded-full h-full w-full border-solid border-stone-600 border-2 hover:bg-stone-300 hover:bg-opacity-10 totalDuration-200",onClick:Be(c,["stop"])},[Wt(Fe(l.value?"Next":`Next in ${s.value}`),1)])),[[X(zt)]])])):le("",!0),Re((v(),O("button",{class:"rounded-full px-6 h-12 bg-transparent border-solid border-stone-600 border-2 hover:bg-stone-300 hover:bg-opacity-10 totalDuration-200",onClick:Be(d,["stop"])},[Wt(Fe(e.offlineMode?"Close":"Hide"),1)])),[[X(zt)]])])):le("",!0)]),_:1})],512),e.showAddButton?(v(),O("div",Sf,[N(Gi,{class:"bg-primary w-min !h-9 !bg-opacity-100",onClick:p[0]||(p[0]=()=>o("add-to-library"))},{default:oe(()=>[Y("div",kf,[N(Vl,{class:"flex-shrink-0 w-auto"}),p[1]||(p[1]=Y("span",{class:"text-sm text-stone-50"},"Add to library",-1))])]),_:1})])):le("",!0)]))}}),[["styles",[".animate-auto-next{animation:auto-next 5s linear forwards}@keyframes auto-next{0%{width:0}to{width:100%}}"]]]),Cf=Object.freeze(Object.defineProperty({__proto__:null,default:Ji},Symbol.toStringTag,{value:"Module"})),Ge=he({inheritAttrs:!1,__name:"ButtonIcon",props:{disabled:{type:Boolean},href:{type:String},title:{type:String},transparent:{type:Boolean},enableHapticFeedback:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=t;return(o,i)=>(v(),ie(Gi,{class:ue(["w-10",o.$attrs.class]),disabled:e.disabled,href:e.href,title:e.title,transparent:e.transparent,"enable-haptic-feedback":e.enableHapticFeedback,onClick:i[0]||(i[0]=r=>n("click",r))},{default:oe(()=>[Se(o.$slots,"default")]),_:3},8,["class","disabled","href","title","transparent","enable-haptic-feedback"]))}}),Tf=Object.freeze(Object.defineProperty({__proto__:null,default:Ge},Symbol.toStringTag,{value:"Module"})),Mf={},Pf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Ef(e,t){return v(),O("svg",Pf,[...t[0]||(t[0]=[Y("path",{fill:"currentColor",d:"m10.875 19.3l-6.6-6.6q-.15-.15-.213-.325T4 12q0-.2.063-.375t.212-.325l6.6-6.6q.275-.275.688-.287t.712.287q.3.275.313.688T12.3 6.1L7.4 11h11.175q.425 0 .713.288t.287.712q0 .425-.287.713t-.713.287H7.4l4.9 4.9q.275.275.288.7t-.288.7q-.275.3-.7.3t-.725-.3Z"},null,-1)])])}const Rl=be(Mf,[["render",Ef]]),If=Object.freeze(Object.defineProperty({__proto__:null,default:Rl},Symbol.toStringTag,{value:"Module"})),Qi=he({__name:"ButtonBack",props:{offlineMode:{type:Boolean},raw:{type:null},transparent:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=e,o=t;function i(r){n.offlineMode&&(r.preventDefault(),o("click"))}return(r,s)=>{var l;return v(),ie(Ge,{href:e.offlineMode||!e.raw?"#":e.raw.title.url,title:`Back to ${((l=e.raw)==null?void 0:l.contentType)===X(Kt).novel?"novel":"manga"}`,transparent:e.transparent,"enable-haptic-feedback":"",onClick:i},{default:oe(()=>[N(Rl)]),_:1},8,["href","title","transparent"])}}}),Of=Object.freeze(Object.defineProperty({__proto__:null,default:Qi},Symbol.toStringTag,{value:"Module"})),$f={},zf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Df(e,t){return v(),O("svg",zf,[...t[0]||(t[0]=[Y("path",{fill:"currentColor",d:"M17.825 8.575q-.2 0-.375-.062t-.325-.213L15.7 6.875q-.3-.3-.3-.712t.3-.688q.275-.3.7-.3t.7.275l.725.725l2.825-2.85q.3-.3.7-.3t.725.3q.275.3.275.725t-.275.7l-3.55 3.55q-.15.15-.325.213t-.375.062ZM6.4 20.4q-.5.2-.95-.087T5 19.475V5q0-.825.588-1.413T7 3h7q-.5.75-.75 1.438T13 6q0 1.8 1.137 3.175T17 10.9q.575.075 1 .075t1-.075v8.575q0 .55-.45.838t-.95.087L12 18l-5.6 2.4Z"},null,-1)])])}const Hl=be($f,[["render",Df]]),Af=Object.freeze(Object.defineProperty({__proto__:null,default:Hl},Symbol.toStringTag,{value:"Module"})),Lf={},jf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Bf(e,t){return v(),O("svg",jf,[...t[0]||(t[0]=[Y("path",{fill:"currentColor",d:"M6.4 20.4q-.5.2-.95-.087T5 19.475V5q0-.825.588-1.413T7 3h6v2H7v12.95l5-2.15l5 2.15V11h2v8.475q0 .55-.45.838t-.95.087L12 18l-5.6 2.4ZM7 5h6h-6Zm11 4q-.425 0-.713-.287T17 8V7h-1q-.425 0-.713-.288T15 6q0-.425.288-.713T16 5h1V4q0-.425.288-.713T18 3q.425 0 .713.288T19 4v1h1q.425 0 .713.288T21 6q0 .425-.288.713T20 7h-1v1q0 .425-.288.713T18 9Z"},null,-1)])])}const Fl=be(Lf,[["render",Bf]]),Nf=Object.freeze(Object.defineProperty({__proto__:null,default:Fl},Symbol.toStringTag,{value:"Module"})),er=he({__name:"ButtonEntry",props:{entryId:{type:null},transparent:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=t;$t({onKeyUp:i=>{i.key==="t"&&!i.metaKey&&!i.ctrlKey&&n("click")}});function o(){n("click")}return(i,r)=>(v(),ie(Ge,{transparent:e.transparent,title:e.entryId?"View entry (T)":"Add to library (T)","data-tour":"Prress here to add to your library",onClick:o},{default:oe(()=>[e.entryId?(v(),ie(Hl,{key:0})):(v(),ie(Fl,{key:1}))]),_:1},8,["transparent","title"]))}}),Vf=Object.freeze(Object.defineProperty({__proto__:null,default:er},Symbol.toStringTag,{value:"Module"})),Rf={},Hf={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function Ff(e,t){return v(),O("svg",Hf,[...t[0]||(t[0]=[Y("path",{fill:"currentColor",d:"M16.5 16V8l-4 4l4 4ZM5 21q-.825 0-1.413-.588T3 19V5q0-.825.588-1.413T5 3h14q.825 0 1.413.588T21 5v14q0 .825-.588 1.413T19 21H5Zm3-2V5H5v14h3Zm2 0h9V5h-9v14Zm-2 0H5h3Z"},null,-1)])])}const Wl=be(Rf,[["render",Ff]]),Wf=Object.freeze(Object.defineProperty({__proto__:null,default:Wl},Symbol.toStringTag,{value:"Module"})),Go=he({inheritAttrs:!1,__name:"ButtonHide",props:{transparent:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=t;return(o,i)=>(v(),ie(Ge,{title:"Hide reader","data-tour":"You have entered reader mode, press here to return to the original page",class:ue(o.$attrs.class),transparent:e.transparent,onClick:i[0]||(i[0]=()=>n("click"))},{default:oe(()=>[N(Wl)]),_:1},8,["class","transparent"]))}}),Uf=Object.freeze(Object.defineProperty({__proto__:null,default:Go},Symbol.toStringTag,{value:"Module"})),qf={},Kf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function Zf(e,t){return v(),O("svg",Kf,[...t[0]||(t[0]=[Y("path",{d:"M199.9 416h-63.8c-4.5 0-8.1-3.6-8.1-8V104c0-4.4 3.6-8 8.1-8h63.8c4.5 0 8.1 3.6 8.1 8v304c0 4.4-3.6 8-8.1 8z",fill:"currentColor"},null,-1),Y("path",{d:"M375.9 416h-63.8c-4.5 0-8.1-3.6-8.1-8V104c0-4.4 3.6-8 8.1-8h63.8c4.5 0 8.1 3.6 8.1 8v304c0 4.4-3.6 8-8.1 8z",fill:"currentColor"},null,-1)])])}const tr=be(qf,[["render",Zf]]),Yf=Object.freeze(Object.defineProperty({__proto__:null,default:tr},Symbol.toStringTag,{value:"Module"})),Xf={},Gf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function Jf(e,t){return v(),O("svg",Gf,[...t[0]||(t[0]=[Y("path",{d:"M128 104.3v303.4c0 6.4 6.5 10.4 11.7 7.2l240.5-151.7c5.1-3.2 5.1-11.1 0-14.3L139.7 97.2c-5.2-3.3-11.7.7-11.7 7.1z",fill:"currentColor"},null,-1)])])}const nr=be(Xf,[["render",Jf]]),Qf=Object.freeze(Object.defineProperty({__proto__:null,default:nr},Symbol.toStringTag,{value:"Module"})),or=he({inheritAttrs:!1,__name:"ButtonPlay",props:{tourMessage:{type:String},playing:{type:Boolean},disabled:{type:Boolean},transparent:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=e,o=t;return $t({onKeyDown(i){!n.disabled&&i.key===" "&&(i.preventDefault(),o("click"))}}),(i,r)=>(v(),ie(Ge,{transparent:e.transparent,class:ue(i.$attrs.class),"data-tour":e.tourMessage,title:`${e.playing?"Pause":"Play"} (Space)`,disabled:e.disabled,onClick:r[0]||(r[0]=()=>o("click"))},{default:oe(()=>[e.playing?(v(),ie(tr,{key:0})):(v(),ie(nr,{key:1}))]),_:1},8,["transparent","class","data-tour","title","disabled"]))}}),ep=Object.freeze(Object.defineProperty({__proto__:null,default:or},Symbol.toStringTag,{value:"Module"})),tp={},np={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"};function op(e,t){return v(),O("svg",np,[...t[0]||(t[0]=[Y("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[Y("circle",{cx:"14",cy:"14",r:"12"}),Y("path",{d:"m23 23l7 7M9 12V9h3m4 0h3v3M9 16v3h3m7-3v3h-3"})],-1)])])}const Ul=be(tp,[["render",op]]),ip=Object.freeze(Object.defineProperty({__proto__:null,default:Ul},Symbol.toStringTag,{value:"Module"})),rp={class:"block w-4 h-4"},sp={class:"w-12"},ql=he({__name:"ButtonResetZoom",props:{zoom:{type:Number}},emits:["click"],setup(e,{emit:t}){const n=t;function o(i){n("click",i)}return(i,r)=>(v(),O("button",{class:"h-9 rounded-full inline-flex justify-between items-center bg-black bg-opacity-50 gap-1 py-2 px-3 pointer-events-auto hover:bg-stone-900 hover:bg-opacity-50 duration-200",title:"Reset zoom",onClick:Be(o,["stop"])},[Y("div",rp,[N(Ul)]),Y("div",sp,Fe(Math.ceil(e.zoom*100))+"%",1)]))}}),lp=Object.freeze(Object.defineProperty({__proto__:null,default:ql},Symbol.toStringTag,{value:"Module"})),ap={},cp={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 36 36"};function up(e,t){return v(),O("svg",cp,[...t[0]||(t[0]=[Y("path",{fill:"currentColor",d:"m32.57 15.72l-3.35-1a11.65 11.65 0 0 0-.95-2.33l1.64-3.07a.61.61 0 0 0-.11-.72l-2.39-2.4a.61.61 0 0 0-.72-.11l-3.05 1.63a11.62 11.62 0 0 0-2.36-1l-1-3.31a.61.61 0 0 0-.59-.41h-3.38a.61.61 0 0 0-.58.43l-1 3.3a11.63 11.63 0 0 0-2.38 1l-3-1.62a.61.61 0 0 0-.72.11L6.2 8.59a.61.61 0 0 0-.11.72l1.62 3a11.63 11.63 0 0 0-1 2.37l-3.31 1a.61.61 0 0 0-.43.58v3.38a.61.61 0 0 0 .43.58l3.33 1a11.62 11.62 0 0 0 1 2.33l-1.64 3.14a.61.61 0 0 0 .11.72l2.39 2.39a.61.61 0 0 0 .72.11l3.09-1.65a11.65 11.65 0 0 0 2.3.94l1 3.37a.61.61 0 0 0 .58.43h3.38a.61.61 0 0 0 .58-.43l1-3.38a11.63 11.63 0 0 0 2.28-.94l3.11 1.66a.61.61 0 0 0 .72-.11l2.39-2.39a.61.61 0 0 0 .11-.72l-1.66-3.1a11.63 11.63 0 0 0 .95-2.29l3.37-1a.61.61 0 0 0 .43-.58v-3.41a.61.61 0 0 0-.37-.59ZM18 23.5a5.5 5.5 0 1 1 5.5-5.5a5.5 5.5 0 0 1-5.5 5.5Z",class:"clr-i-solid clr-i-solid-path-1"},null,-1),Y("path",{fill:"none",d:"M0 0h36v36H0z"},null,-1)])])}const Kl=be(ap,[["render",up]]),dp=Object.freeze(Object.defineProperty({__proto__:null,default:Kl},Symbol.toStringTag,{value:"Module"})),ir=he({__name:"ButtonSettings",props:{disabled:{type:Boolean},transparent:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=t;return $t({onKeyUp:o=>{o.key==="s"&&!o.metaKey&&!o.ctrlKey&&n("click")}}),(o,i)=>(v(),ie(Ge,{transparent:e.transparent,title:"Reader preferences (S)",disabled:e.disabled,onClick:i[0]||(i[0]=()=>n("click"))},{default:oe(()=>[N(Kl)]),_:1},8,["transparent","disabled"]))}}),fp=Object.freeze(Object.defineProperty({__proto__:null,default:ir},Symbol.toStringTag,{value:"Module"})),pp={},hp={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function gp(e,t){return v(),O("svg",hp,[...t[0]||(t[0]=[Y("path",{fill:"currentColor",d:"M4 4h6v2H6v4H4V4Zm10 0h6v6h-2V6h-4V4ZM6 14v4h4v2H4v-6h2Zm14 0v6h-6v-2h4v-4h2Z"},null,-1)])])}const Zl=be(pp,[["render",gp]]),mp=Object.freeze(Object.defineProperty({__proto__:null,default:Zl},Symbol.toStringTag,{value:"Module"})),vp={},bp={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function yp(e,t){return v(),O("svg",bp,[...t[0]||(t[0]=[Y("path",{fill:"currentColor",d:"M14 20v-6h6v2h-4v4h-2Zm-6 0v-4H4v-2h6v6H8Zm12-10h-6V4h2v4h4v2Zm-10 0H4V8h4V4h2v6Z"},null,-1)])])}const Yl=be(vp,[["render",yp]]),wp=Object.freeze(Object.defineProperty({__proto__:null,default:Yl},Symbol.toStringTag,{value:"Module"})),rr=he({__name:"ButtonWebFullScreen",props:{transparent:{type:Boolean}},emits:["request-full-screen"],setup(e,{emit:t}){const n=t,o=te(!1);$t({onKeyUp:r=>{r.key==="f"&&!r.metaKey&&!r.ctrlKey&&i()}}),_t("fullscreenchange",()=>{o.value=!!document.fullscreenElement});function i(){document.fullscreenElement?document.exitFullscreen():n("request-full-screen")}return(r,s)=>(v(),ie(Ge,{transparent:e.transparent,title:`${o.value?"Exit":"Enter"} fullscreen (F)`,onClick:i},{default:oe(()=>[o.value?(v(),ie(Yl,{key:0})):(v(),ie(Zl,{key:1}))]),_:1},8,["transparent","title"]))}}),xp=Object.freeze(Object.defineProperty({__proto__:null,default:rr},Symbol.toStringTag,{value:"Module"})),_p=["aria-hidden"],Sp=["onClick"],Xl=he({__name:"DropdownMenu",props:Ye({items:{type:Array},enableHapticFeedback:{type:Boolean}},{modelValue:{type:Number,required:!1},modelModifiers:{}}),emits:Ye(["select"],["update:modelValue"]),setup(e,{emit:t}){const n=e,o=t,i=st(e,"modelValue"),r=te(null),s=te(!1),l=te(!1),a=te(!1),u=te(!1),c={mounted:w=>{var g;i.value&&((g=w.children[i.value])==null||g.scrollIntoView({behavior:"auto",block:"center",inline:"center"}))}};$t({onKeyDown:$}),Xi(()=>{const w=s.value;return w&&(s.value=!1),w});const d=Yo(),f=Xo();async function p(w){s.value=w??!s.value,d(s.value),s.value?(y(),L(r.value)):setTimeout(D,250)}function y(){const w=r.value;if(w){const g=w.getBoundingClientRect(),E=g.x+g.width/2;l.value=g.y>window.innerHeight/2,a.value=E<window.innerWidth/3,u.value=E>window.innerWidth/3*2}}function b(w,g){p(),w!=i.value&&(i.value=w,o("select",w,g),n.enableHapticFeedback&&f())}function $(w){s.value&&w.key==="Escape"&&(p(),w.preventDefault())}let M=[];function L(w){const g=window.getComputedStyle(w).zIndex,E=w.style.zIndex;(!g||!(+g>0))&&((!w.parentElement||w.parentElement.childElementCount>1)&&(w.style.zIndex="1",M.push({el:w,zIndex:E})),w.parentElement&&L(w.parentElement))}function D(){M.forEach(({el:w,zIndex:g})=>{w.style.zIndex=g??""}),M=[]}return(w,g)=>(v(),O("div",{ref_key:"root",ref:r,class:"select-none relative inline-flex"},[s.value?(v(),O("div",{key:0,class:"fixed inset-0 bg-transparent",onClick:g[0]||(g[0]=()=>p())})):le("",!0),e.items.length?(v(),ie(Gn,{key:1,"enter-from-class":"scale-y-90 opacity-0 pointer-events-none","leave-to-class":"scale-y-90 opacity-0 pointer-events-none"},{default:oe(()=>[s.value?Re((v(),O("ul",{key:0,ref:"list","aria-hidden":!s.value,class:ue(["scrollbar-sm duration-150 delay-50 absolute w-40 max-h-[70vh] list-none bg-stone-800 bg-opacity-80 backdrop-blur-md rounded-lg overflow-auto",{"origin-bottom bottom-full -translate-y-1.5":l.value,"origin-top top-full translate-y-1.5":!l.value,"left-1/2 -ml-20 text-center":!a.value&&!u.value,"right-0 text-right":u.value}]),onWheelPassive:g[1]||(g[1]=Be(()=>{},["stop"])),onTouchmove:g[2]||(g[2]=Be(()=>{},["stop"]))},[(v(!0),O(ye,null,Xt(e.items,(E,U)=>Re((v(),O("li",{key:U,tabindex:"-1",class:ue(["h-10 px-4 last:border-b-transparent cursor-pointer hover:bg-stone-100 hover:bg-opacity-10 duration-100",{"text-textPrimary":U===i.value}]),onClick:K=>b(U,K)},[Y("div",{class:ue(["h-full py-2",{"border-t-[1px] border-solid border-stone-400 border-opacity-30":U>0}])},[Se(w.$slots,"item",{item:E},()=>[Wt(Fe(E),1)])],2)],10,Sp)),[[X(zt),30]])),128))],42,_p)),[[c]]):le("",!0)]),_:3})):le("",!0),Se(w.$slots,"default",{toggle:p,isOpen:s.value,isAlignTop:l.value})],512))}}),kp=Object.freeze(Object.defineProperty({__proto__:null,default:Xl},Symbol.toStringTag,{value:"Module"})),Cp={},Tp={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Mp(e,t){return v(),O("svg",Tp,[...t[0]||(t[0]=[Au('<circle cx="18" cy="12" r="0" fill="currentColor"><animate attributeName="r" begin=".67" calcMode="spline" dur="1.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"></animate></circle><circle cx="12" cy="12" r="0" fill="currentColor"><animate attributeName="r" begin=".33" calcMode="spline" dur="1.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"></animate></circle><circle cx="6" cy="12" r="0" fill="currentColor"><animate attributeName="r" begin="0" calcMode="spline" dur="1.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"></animate></circle>',3)])])}const Gl=be(Cp,[["render",Mp]]),Pp=Object.freeze(Object.defineProperty({__proto__:null,default:Gl},Symbol.toStringTag,{value:"Module"})),Ep={},Ip={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Op(e,t){return v(),O("svg",Ip,[...t[0]||(t[0]=[Y("path",{fill:"currentColor",d:"m7 10l5 5l5-5z"},null,-1)])])}const Jl=be(Ep,[["render",Op]]),$p=Object.freeze(Object.defineProperty({__proto__:null,default:Jl},Symbol.toStringTag,{value:"Module"})),zp=["onClick"],Dp={class:"inline-flex items-center justify-center w-full h-full px-4 rounded-full group-hover:bg-stone-100 group-hover:bg-opacity-20 duration-200"},Ap={class:"whitespace-nowrap"},sr=he({inheritAttrs:!1,__name:"ButtonDropdown",props:Ye({label:{type:String},title:{type:String},items:{type:Array},disabled:{type:Boolean},canLoadItems:{type:Boolean},loadItems:{type:Function},enableHapticFeedback:{type:Boolean},transparent:{type:Boolean}},{modelValue:{type:Number,required:!0},modelModifiers:{}}),emits:Ye(["select"],["update:modelValue"]),setup(e,{emit:t}){const n=e,o=t,i=st(e,"modelValue"),r=te(!1),s=Yo();async function l(f,p){if(!n.items.length&&(f||await a(),!n.items.length)){p(!1);return}p()}async function a(){r.value||n.items.length||!n.canLoadItems||!n.loadItems||(r.value=!0,await n.loadItems(),r.value=!1)}let u=!1;function c(){u||(u=!0,s(!0,{desktopOnly:!0}))}function d(){u&&(u=!1,s(!1,{desktopOnly:!0}))}return(f,p)=>(v(),ie(Xl,{modelValue:i.value,"onUpdate:modelValue":p[0]||(p[0]=y=>i.value=y),items:e.items,class:ue(f.$attrs.class),"enable-haptic-feedback":e.enableHapticFeedback,onSelect:p[1]||(p[1]=(y,b)=>o("select",y,b))},Ei({default:oe(({toggle:y,isOpen:b,isAlignTop:$})=>[Re((v(),O("button",Sn({type:"button",tabindex:"-1",class:["w-full h-10 max-h-full rounded-full group duration-100 transition-bg",{"pointer-events-none opacity-60":e.disabled||r.value,"bg-black bg-opacity-50":!e.transparent,"bg-transparent":e.transparent}]},e.title?{title:e.title}:{},{onClick:Be(()=>l(b,y),["stop"]),onMouseenter:c,onMouseleave:d}),[Y("div",Dp,[Y("span",Ap,Fe(e.label),1),e.items.length||e.canLoadItems?(v(),O("span",{key:0,class:ue(["w-4 h-4 flex ml-1 -mr-3 flex-shrink-0",{"rotate-180":$}]),"aria-hidden":"true"},[r.value?(v(),ie(Gl,{key:0})):(v(),ie(Jl,{key:1}))],2)):le("",!0)])],16,zp)),[[X(zt),30]])]),_:2},[f.$slots.item?{name:"item",fn:oe(({item:y})=>[Se(f.$slots,"item",{item:y})]),key:"0"}:void 0]),1032,["modelValue","items","class","enable-haptic-feedback"]))}}),Lp=Object.freeze(Object.defineProperty({__proto__:null,default:sr},Symbol.toStringTag,{value:"Module"})),jp={},Bp={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Np(e,t){return v(),O("svg",Bp,[...t[0]||(t[0]=[Y("path",{fill:"currentColor",d:"M15.41 7.41L14 6l-6 6l6 6l1.41-1.41L10.83 12z"},null,-1)])])}const Ql=be(jp,[["render",Np]]),Vp=Object.freeze(Object.defineProperty({__proto__:null,default:Ql},Symbol.toStringTag,{value:"Module"})),Rp={},Hp={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Fp(e,t){return v(),O("svg",Hp,[...t[0]||(t[0]=[Y("path",{fill:"currentColor",d:"M10 6L8.59 7.41L13.17 12l-4.58 4.59L10 18l6-6z"},null,-1)])])}const ea=be(Rp,[["render",Fp]]),Wp=Object.freeze(Object.defineProperty({__proto__:null,default:ea},Symbol.toStringTag,{value:"Module"})),Up={key:0,class:"ml-auto inline-flex gap-[1px] scale-95 origin-right"},lr=he({__name:"ChapterNav",props:{data:{type:Object},chapterSpec:{type:[Object,String]},touchDevice:{type:Boolean},rtl:{type:Boolean},transparent:{type:Boolean}},emits:["getHiddenChapters","prev","next","dialogOpened"],setup(e,{emit:t}){const n=e,o=t,i=Q(()=>{var d;return typeof n.chapterSpec!="string"&&!!((d=n.chapterSpec)!=null&&d.trigger)});async function r(){const d=typeof n.chapterSpec=="string"?{sel:n.chapterSpec}:n.chapterSpec;if(!d)return;const{trigger:f,sel:p,label:y}=d;if(f&&(p===void 0||!y)){await s(f);return}o("getHiddenChapters"),await en(50,50,()=>n.data.chapters.length?!0:void 0)}async function s(d){const f=document.querySelector(d);f&&(f instanceof HTMLDialogElement?f.showModal():f.click(),o("dialogOpened"))}function l(d,f){var p,y,b;(b=(y=(p=n.data)==null?void 0:p.chapters)==null?void 0:y[d])==null||b.select(c(f))}function a(d){n.rtl?o("next",c(d)):o("prev",c(d))}function u(d){n.rtl?o("prev",c(d)):o("next",c(d))}function c(d){return!n.touchDevice&&(d.ctrlKey||d.metaKey)}return(d,f)=>(v(),O(ye,null,[N(sr,{modelValue:e.data.activeIndex,label:e.data.activeLabel,title:"Select chapter",transparent:e.transparent,items:e.data.chapters,"can-load-items":i.value,"load-items":r,"enable-haptic-feedback":"",onSelect:l},{item:oe(({item:p})=>[Wt(Fe(p.label),1)]),_:1},8,["modelValue","label","transparent","items","can-load-items"]),e.data.next||e.data.prev?(v(),O("div",Up,[N(Ge,{title:`${e.rtl?"Next":"Prev"} chapter (←)`,disabled:e.rtl?!e.data.next:!e.data.prev,transparent:e.transparent,class:"!rounded-r-none","enable-haptic-feedback":"",onClick:a},{default:oe(()=>[N(Ql)]),_:1},8,["title","disabled","transparent"]),N(Ge,{title:`${e.rtl?"Prev":"Next"} chapter (→)`,disabled:e.rtl?!e.data.prev:!e.data.next,transparent:e.transparent,class:"!rounded-l-none","enable-haptic-feedback":"",onClick:u},{default:oe(()=>[N(ea)]),_:1},8,["title","disabled","transparent"])])):le("",!0)],64))}}),qp=Object.freeze(Object.defineProperty({__proto__:null,default:lr},Symbol.toStringTag,{value:"Module"})),Kp=["min","max","step"],Zp={class:"flex-shrink-0 w-12 inline-block text-right"},tn=be(he({__name:"InputPercentage",props:Ye({min:{type:Number},max:{type:Number},step:{type:Number},format:{type:Function}},{modelValue:{type:Number,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=st(e,"modelValue"),n=Q({get(){return t.value},set(o){t.value=+o}});return(o,i)=>{var r;return v(),O("div",{class:"flex items-center gap-3 pl-1",style:Ce({"--percentage":`${(n.value-e.min)/(e.max-e.min)*100}%`})},[Re(Y("input",{"onUpdate:modelValue":i[0]||(i[0]=s=>n.value=s),type:"range",min:e.min,max:e.max,step:e.step??1,class:"flex-grow",onTouchmove:i[1]||(i[1]=Be(()=>{},["stop"]))},null,40,Kp),[[yd,n.value]]),Y("span",Zp,Fe(((r=e.format)==null?void 0:r.call(e,t.value))??t.value),1)],4)}}}),[["styles",["input[type=range]{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:linear-gradient(to right,#fb8252 var(--percentage),#5a5552 var(--percentage));border-radius:9999px;border-style:none;cursor:pointer;height:4px;opacity:.9;pointer-events:none;--tw-bg-opacity:1;background-color:rgb(251 130 82/var(--tw-bg-opacity,1));outline:2px solid transparent;outline-offset:2px}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none!important;border-radius:9999px;border-style:solid;border-width:2px;cursor:pointer;height:24px;pointer-events:auto;width:24px;--tw-border-opacity:1;border-color:rgb(251 130 82/var(--tw-border-opacity,1));--tw-bg-opacity:1;background-color:rgb(251 130 82/var(--tw-bg-opacity,1));transition-duration:.2s}input[type=range]:hover{opacity:1}"]]]),Yp=Object.freeze(Object.defineProperty({__proto__:null,default:tn},Symbol.toStringTag,{value:"Module"})),Xp={ref:"root",class:"flex text-sm flex-wrap gap-2 leading-none"},Gp=["onClick","onKeyup"],mt=he({__name:"InputSelect",props:Ye({items:{type:Array}},{modelValue:{type:Number,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=st(e,"modelValue");function o(i){i!==n.value&&(n.value=i)}return(i,r)=>(v(),O("div",Xp,[(v(!0),O(ye,null,Xt(t.items,(s,l)=>Re((v(),O("div",{key:l,tabindex:"0",class:ue(["inline-flex justify-center items-center rounded-full px-3 py-1.5 cursor-pointer z-10 whitespace-nowrap flex-shrink-0 focus:outline-primary hover:bg-opacity-80 duration-200",{"bg-primary":l==n.value,"bg-stone-600 bg-opacity-50":l!=n.value}]),onClick:()=>o(l),onKeyup:[qo(()=>o(l),["enter"]),qo(()=>o(l),["space"])]},[Wt(Fe(s),1)],42,Gp)),[[X(zt),30]])),128))],512))}}),Jp=Object.freeze(Object.defineProperty({__proto__:null,default:mt},Symbol.toStringTag,{value:"Module"})),Qp={class:"flex w-full items-center justify-between cursor-pointer mb-5 last:mb-0"},eh={class:"text-sm py-1"},th={class:"switcher p-1"},ar=be(he({__name:"InputSwitcher",props:Ye({label:{type:String}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=st(e,"modelValue");return(n,o)=>(v(),O("label",Qp,[Y("span",eh,Fe(e.label),1),Y("div",th,[Re(Y("input",{"onUpdate:modelValue":o[0]||(o[0]=i=>t.value=i),type:"checkbox"},null,512),[[wd,t.value]]),o[1]||(o[1]=Y("span",null,null,-1))])]))}}),[["styles",['.switcher{height:24px;position:relative;width:40px}.switcher input{height:0;opacity:0;width:0}.switcher input:checked+span{border-width:1px;--tw-border-opacity:1;border-color:rgb(184 92 56/var(--tw-border-opacity,1));--tw-bg-opacity:1;background-color:rgb(184 92 56/var(--tw-bg-opacity,1))}.switcher input:checked+span:before{bottom:2px;height:18px;left:17.2px;width:18px}.switcher span{border-radius:9999px;border-width:2px;top:0;right:0;bottom:0;left:0;--tw-border-opacity:1;background-color:transparent;border-color:rgb(231 229 228/var(--tw-border-opacity,1))}.switcher span,.switcher span:before{position:absolute;transition-duration:.3s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.switcher span:before{border-radius:9999px;bottom:4px;content:"";height:12px;left:4px;width:12px;--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}']]]),nh=Object.freeze(Object.defineProperty({__proto__:null,default:ar},Symbol.toStringTag,{value:"Module"})),oh={class:"flex-grow mb-5 last:mb-0"},Le=he({__name:"TableField",props:{label:{type:String},disabled:{type:Boolean}},setup(e){return(t,n)=>(v(),O(ye,null,[Y("div",{class:ue(["flex-shrink-0 mb-2 whitespace-nowrap text-sm",{"opacity-50":e.disabled}])},Fe(e.label),3),Y("div",oh,[Se(t.$slots,"default")])],64))}}),ih=Object.freeze(Object.defineProperty({__proto__:null,default:Le},Symbol.toStringTag,{value:"Module"})),ta=he({__name:"FieldContrast",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=st(e,"modelValue"),n=Q({get(){return Math.round(t.value*100)},set(o){t.value=Math.round(o)/100}});return(o,i)=>(v(),ie(Le,{label:"Contrast"},{default:oe(()=>[N(tn,{modelValue:n.value,"onUpdate:modelValue":i[0]||(i[0]=r=>n.value=r),min:20,max:100,format:r=>`${r}%`},null,8,["modelValue","format"])]),_:1}))}}),rh=Object.freeze(Object.defineProperty({__proto__:null,default:ta},Symbol.toStringTag,{value:"Module"})),sh={},lh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function ah(e,t){return v(),O("svg",lh,[...t[0]||(t[0]=[Y("path",{d:"M480 358.856V153.143C480 130.512 461.674 112 439.272 112H72.728C50.326 112 32 130.512 32 153.143v205.713C32 381.488 50.326 400 72.728 400h366.545C461.674 400 480 381.488 480 358.856zM112 364V148h288v216H112z",fill:"currentColor"},null,-1)])])}const na=be(sh,[["render",ah]]),ch=Object.freeze(Object.defineProperty({__proto__:null,default:na},Symbol.toStringTag,{value:"Module"})),uh={},dh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function fh(e,t){return v(),O("svg",dh,[...t[0]||(t[0]=[Y("path",{d:"M358.856 32H153.143C130.512 32 112 50.326 112 72.728v366.545C112 461.674 130.512 480 153.143 480h205.713C381.488 480 400 461.674 400 439.272V72.728C400 50.326 381.488 32 358.856 32zM364 400H148V112h216v288z",fill:"currentColor"},null,-1)])])}const oa=be(uh,[["render",fh]]),ph=Object.freeze(Object.defineProperty({__proto__:null,default:oa},Symbol.toStringTag,{value:"Module"})),cr=he({inheritAttrs:!1,__name:"ButtonOutline",emits:["click"],setup(e,{emit:t}){const n=t,o=Xo();function i(){o(),n("click")}return(r,s)=>Re((v(),O("button",{class:ue([r.$attrs.class??"","flex focus:outline-none outline-none rounded-full h-10 justify-center items-center border border-solid border-stone-600 text-stone-200 hover:bg-stone-500 hover:bg-opacity-10 duration-200"]),onClick:i},[Se(r.$slots,"default")],2)),[[X(zt),24]])}}),hh=Object.freeze(Object.defineProperty({__proto__:null,default:cr},Symbol.toStringTag,{value:"Module"}));var nn=(e=>(e[e.never=0]="never",e[e.move=1]="move",e[e.firstMove=2]="firstMove",e[e.onLoad=3]="onLoad",e))(nn||{}),tt=(e=>(e[e.vertical=0]="vertical",e[e.ltr=1]="ltr",e[e.rtl=2]="rtl",e))(tt||{});const Jo=[{name:"System",value:"system-ui, sans-serif"},{name:"Charter",value:'Charter, "Times New Roman", serif'},{name:"Georgia",value:"Georgia, serif"}],ia=he({__name:"FieldFontFamily",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=st(e,"modelValue"),n=Q({get(){const o=Jo.findIndex(i=>i.value===t.value);return o===-1?0:o},set(o){t.value=Jo[o].value}});return(o,i)=>(v(),ie(Le,{label:"Font family"},{default:oe(()=>[N(mt,{modelValue:n.value,"onUpdate:modelValue":i[0]||(i[0]=r=>n.value=r),items:X(Jo).map(r=>r.name)},null,8,["modelValue","items"])]),_:1}))}}),gh=Object.freeze(Object.defineProperty({__proto__:null,default:ia},Symbol.toStringTag,{value:"Module"}));function mh(e){if(e)try{return JSON.parse(e)}catch{return}}function vh(){const{width:e,height:t}=gn();return Q(()=>e.value>t.value)}function ra(e){return String(e).normalize("NFKD").replace(/[\u0300-\u036f]/g,"").trim().toLowerCase().replace(/[^a-z0-9 -]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-")}var Dt=(e=>(e[e.longStrip=0]="longStrip",e[e.single=1]="single",e[e.double=2]="double",e))(Dt||{});const Qo=.25,ei=5,ur=.25,ti=.2,ni=5,bh=.05,yh=0,wh=5;function xh(e){var g,E,U,K,_,z;const n=e.touchDevice&&(window.innerHeight<=600||window.innerWidth<=600)?vh():void 0,{titleName:o,isWebtoon:i}=e,r=o?ra(o):location.hostname,s=te(_h(`tkr:${r}`)),l=A=>{s.value=A;const T=`tkr:${r}`;!A||!Object.keys(A).length?localStorage.removeItem(T):localStorage.setItem(T,JSON.stringify(A))},a=A=>{if(!s.value){l(A);return}const T={...s.value};Object.entries(A).forEach(([G,C])=>{C===void 0?delete T[G]:T[G]=C}),l(T)},u=te((g=s.value)==null?void 0:g.style),c=te((E=s.value)==null?void 0:E.direction),d=te((U=s.value)==null?void 0:U.gap),f=te((K=s.value)==null?void 0:K.speed),p=te((_=s.value)==null?void 0:_.zoom),y=te(((z=s.value)==null?void 0:z.breakFirst)??!1),b=Q({get(){if(i.value)return Dt.longStrip;if(u.value!==void 0)return u.value;const{landscapeStyle:A,readerStyle:T}=e.defaultPreferences.value;return n!=null&&n.value?A??T:T},set:A=>{if(u.value===A)return;const T=b.value===Dt.longStrip,G=A===Dt.longStrip;u.value=A,a({style:A}),T!==G&&($.value=G?tt.vertical:tt.rtl)}}),$=Q({get(){if(i.value)return tt.vertical;if(c.value!==void 0)return c.value;const{direction:A,landscapeDirection:T}=e.defaultPreferences.value;return n!=null&&n.value?T??A:A},set:A=>{c.value=A,a({direction:A})}}),M=Q({get:()=>d.value??e.defaultPreferences.value.gap,set(A){d.value=A,a({gap:A})}}),L=Q({get:()=>f.value??e.defaultPreferences.value.speed,set(A){f.value=A,a({speed:A===1?void 0:A})}}),D=Q({get:()=>p.value??1,set(A){p.value=A,a({zoom:A===1?void 0:A})}}),w=Q({get:()=>y.value,set(A){y.value=A,a({breakFirst:A?!0:void 0})}});return{direction:$,style:b,gap:M,speed:L,zoom:D,isLongStrip:Q(()=>b.value===Dt.longStrip),isDouble:Q(()=>b.value===Dt.double),isRTL:Q(()=>$.value===tt.rtl),isVertical:Q(()=>$.value===tt.vertical),breakFirst:w}}function _h(e){const t=localStorage.getItem(e),n=mh(t||void 0),o={};return n?(n.style!==void 0&&Object.values(Dt).includes(n.style)&&(o.style=n.style),n.direction!==void 0&&Object.values(tt).includes(n.direction)&&(o.direction=n.direction),n.gap!==void 0&&n.gap>=yh&&n.gap<=wh&&(o.gap=n.gap),n.speed!==void 0&&n.speed>=Qo&&n.speed<=ei&&(o.speed=n.speed),n.zoom!==void 0&&n.zoom>=ti&&n.zoom<=ni&&(o.zoom=n.zoom),n.breakFirst===!0&&(o.breakFirst=!0),Object.keys(o).length?o:void 0):o}const dr=he({__name:"NovelPreferencesForm",props:Ye({enableReset:{type:Boolean},defaultPreferences:{type:Object}},{modelValue:{required:!0},modelModifiers:{}}),emits:Ye(["reset"],["update:modelValue"]),setup(e,{emit:t}){const n=e,o=t,i=st(e,"modelValue"),r=Q(()=>Object.keys(i.value).some(l=>{var a;return i.value[l]!==((a=n.defaultPreferences)==null?void 0:a[l])}));function s(l){i.value={...i.value,...l}}return(l,a)=>(v(),O(ye,null,[N(ia,{"model-value":i.value.fontFamily,"onUpdate:modelValue":a[0]||(a[0]=u=>s({fontFamily:u}))},null,8,["model-value"]),N(Le,{label:"Text size"},{default:oe(()=>[N(tn,{"model-value":i.value.fontSize,min:10,max:48,"onUpdate:modelValue":a[1]||(a[1]=u=>s({fontSize:u,lineHeight:Math.max(i.value.lineHeight,u)}))},null,8,["model-value"])]),_:1}),N(Le,{label:"Line height"},{default:oe(()=>[N(tn,{"model-value":i.value.lineHeight,min:10,max:96,step:1,"onUpdate:modelValue":a[2]||(a[2]=u=>s({lineHeight:u,fontSize:Math.min(i.value.fontSize,u)}))},null,8,["model-value"])]),_:1}),N(Le,{label:"Play speed"},{default:oe(()=>[N(tn,{"model-value":i.value.speed,min:X(Qo),max:X(ei),step:X(ur),format:u=>`${u.toFixed(2)}x`,"onUpdate:modelValue":a[3]||(a[3]=u=>s({speed:u}))},null,8,["model-value","min","max","step","format"])]),_:1}),e.enableReset?(v(),O("div",{key:0,class:ue(["w-full flex justify-center pt-1 duration-200",{"pointer-events-none opacity-0":!r.value,"opacity-90":r.value}])},[N(cr,{class:"w-2/3",onClick:a[4]||(a[4]=()=>o("reset"))},{default:oe(()=>[...a[5]||(a[5]=[Wt(" Reset to default ",-1)])]),_:1})],2)):le("",!0)],64))}}),Sh=Object.freeze(Object.defineProperty({__proto__:null,default:dr},Symbol.toStringTag,{value:"Module"})),kh={key:1,class:"mb-3 border-stone-500 border-opacity-70"},Ch={key:2,class:"flex justify-end"},Th={class:"h-6 border border-stone-500 rounded-md cursor-pointer flex items-center"},Mh={key:3,class:"mt-5 mb-3 border-stone-500 border-opacity-70"},fr=he({__name:"DefaultPreferencesForm",props:Ye({touchDevice:{type:Boolean},isNovel:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=st(e,"modelValue"),o=te(!1),i=te(!1);je(()=>{o.value=t.touchDevice&&(window.innerHeight<=600||window.innerWidth<=600)});function r(l){const a=i.value,c=(a?n.value.landscapeStyle??n.value.readerStyle:n.value.readerStyle)!==Dt.longStrip,d=l!==Dt.longStrip;if(c===d)s(a?{landscapeStyle:l}:{readerStyle:l});else{const f=d?tt.rtl:tt.vertical;s(a?{landscapeStyle:l,landscapeDirection:f}:{readerStyle:l,direction:f})}}function s(l){n.value={...n.value,...l}}return(l,a)=>(v(),O(ye,null,[e.isNovel?(v(),O(ye,{key:0},[N(dr,{modelValue:n.value,"onUpdate:modelValue":a[0]||(a[0]=u=>n.value=u)},null,8,["modelValue"]),N(ta,{"model-value":n.value.contrast,"onUpdate:modelValue":a[1]||(a[1]=u=>s({contrast:u}))},null,8,["model-value"])],64)):(v(),O(ye,{key:1},[N(ar,{"model-value":n.value.autoPlay===!0,label:"Auto play in long strip","onUpdate:modelValue":a[2]||(a[2]=u=>s({autoPlay:u}))},null,8,["model-value"]),e.touchDevice?(v(),ie(ar,{key:0,"model-value":n.value.pinchToZoom!==!1,label:"Pinch to zoom","onUpdate:modelValue":a[3]||(a[3]=u=>s({pinchToZoom:u}))},null,8,["model-value"])):le("",!0),o.value?(v(),O("hr",kh)):le("",!0),o.value?(v(),O("div",Ch,[Y("div",Th,[Re((v(),O("button",{class:ue(["focus:outline-none outline-none h-full flex justify-center items-center px-3 py-0.5 rounded-l-sm",{"bg-stone-500 text-stone-50":!i.value,"text-stone-400":i.value}]),onClick:a[4]||(a[4]=()=>i.value=!1)},[N(oa)],2)),[[X(zt),24]]),Re((v(),O("button",{class:ue(["focus:outline-none outline-none h-full flex justify-center items-center px-3 py-0.5 rounded-r-sm",{"bg-stone-500 text-stone-50":i.value,"text-stone-400":!i.value}]),onClick:a[5]||(a[5]=()=>i.value=!0)},[N(na)],2)),[[X(zt),24]])])])):le("",!0),N(Le,{label:"Style"},{default:oe(()=>[N(mt,{"model-value":i.value?n.value.landscapeStyle??n.value.readerStyle:n.value.readerStyle,items:["Long strip","Single page","Double page"],"onUpdate:modelValue":r},null,8,["model-value"])]),_:1}),N(Le,{label:"Direction"},{default:oe(()=>[N(mt,{"model-value":i.value?n.value.landscapeDirection??n.value.direction:n.value.direction,items:["Vertical","Left to right","Right to left"],"onUpdate:modelValue":a[6]||(a[6]=u=>s(i.value?{landscapeDirection:u}:{direction:u}))},null,8,["model-value"])]),_:1}),o.value?(v(),O("hr",Mh)):le("",!0),N(Le,{label:"Gap size"},{default:oe(()=>[N(mt,{"model-value":n.value.gap,items:["None","1px","2px","3px","4px","5px"],"onUpdate:modelValue":a[7]||(a[7]=u=>s({gap:u}))},null,8,["model-value"])]),_:1})],64)),N(Le,{label:"Progress size"},{default:oe(()=>[N(mt,{"model-value":n.value.progressSize/2,items:["None","2px","4px","6px","8px","10px"],"onUpdate:modelValue":a[8]||(a[8]=u=>s({progressSize:u*2}))},null,8,["model-value"])]),_:1}),N(Le,{label:"Auto next"},{default:oe(()=>[N(mt,{"model-value":n.value.autoNextSeconds,items:["None","1 sec","2 sec","3 sec","4 sec","5 sec"],"onUpdate:modelValue":a[9]||(a[9]=u=>s({autoNextSeconds:u}))},null,8,["model-value"])]),_:1}),N(Le,{label:"Hide controls"},{default:oe(()=>[N(mt,{"model-value":n.value.hideControlsEvent,items:["Never","On move","On first move","On load"],"onUpdate:modelValue":a[10]||(a[10]=u=>s({hideControlsEvent:u}))},null,8,["model-value"])]),_:1}),e.isNovel?le("",!0):(v(),O(ye,{key:2},[N(Le,{label:"Play speed"},{default:oe(()=>[N(tn,{"model-value":n.value.speed,min:X(Qo),max:X(ei),step:X(ur),format:u=>`${u.toFixed(2)}x`,"onUpdate:modelValue":a[11]||(a[11]=u=>s({speed:u}))},null,8,["model-value","min","max","step","format"])]),_:1}),N(Le,{label:e.touchDevice?"Tap zones":"Click zones"},{default:oe(()=>[N(mt,{"model-value":(n.value.tapZone??-1)+1,items:["Default","None","L shaped","Kindle-ish","Edge","Right and left"],"onUpdate:modelValue":a[12]||(a[12]=u=>s({tapZone:u===0?void 0:u-1}))},null,8,["model-value"])]),_:1},8,["label"])],64))],64))}}),Ph=Object.freeze(Object.defineProperty({__proto__:null,default:fr},Symbol.toStringTag,{value:"Module"})),Eh={},Ih={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Oh(e,t){return v(),O("svg",Ih,[...t[0]||(t[0]=[Y("path",{fill:"currentColor",d:"M11.3 19.3q-.275-.275-.288-.7t.263-.7l4.9-4.9H5q-.425 0-.713-.288T4 12q0-.425.288-.713T5 11h11.175l-4.9-4.9q-.275-.275-.263-.7t.288-.7q.275-.275.7-.275t.7.275l6.6 6.6q.15.125.213.313t.062.387q0 .2-.062.375t-.213.325l-6.6 6.6q-.275.275-.7.275t-.7-.275Z"},null,-1)])])}const no=be(Eh,[["render",Oh]]),$h=Object.freeze(Object.defineProperty({__proto__:null,default:no},Symbol.toStringTag,{value:"Module"}));var pr=(e=>(e[e.none=0]="none",e[e.lShape=1]="lShape",e[e.kindleIsh=2]="kindleIsh",e[e.edge=3]="edge",e[e.rightAndLeft=4]="rightAndLeft",e))(pr||{});const sa={0:{prevZones:[],nextZones:[]},1:{prevZones:[0,1,2,3],nextZones:[8,7,6,5]},2:{prevZones:[6,3],nextZones:[8,7,5,4]},3:{prevZones:[7],nextZones:[5,0,2,3,6,8]},4:{prevZones:[3,0,6],nextZones:[5,2,8]}},la=he({__name:"TapZonePreview",props:{tapZone:{type:Number},direction:{type:Number}},setup(e){const t=e,{width:n,height:o}=gn(),i=Q(()=>Math.min(1.25,Math.max(.75,Math.round(n.value/o.value*100)/100))),r=Q(()=>i.value>=1),s=Q(()=>t.direction===tt.vertical),l=Q(()=>t.direction===tt.rtl),a=Q(()=>{if(!t.tapZone)return;const{prevZones:u,nextZones:c}=sa[t.tapZone];return Array.from({length:9},(d,f)=>{const p=u.includes(f),y=!p&&c.includes(f);return{isPrev:p,isNext:y,hasArrow:f===u[0]||f===c[0]}})});return(u,c)=>(v(),O("div",{class:ue(["p-2 bg-black bg-opacity-40 rounded-2xl",{"w-28":r.value,"h-28":!r.value}]),style:Ce({"aspect-ratio":i.value})},[e.tapZone===X(pr).none?(v(),O("div",{key:0,class:ue(["inline-block absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-14 h-14",{"rotate-90":e.direction===X(tt).vertical,"rotate-180":e.direction===X(tt).rtl}])},[N(no)],2)):a.value?(v(),O("div",{key:2,class:ue(["w-full h-full overflow-hidden rounded-xl flex flex-wrap",{"flex-row-reverse":l.value}])},[(v(!0),O(ye,null,Xt(a.value,(d,f)=>(v(),O("div",{key:`zone-${f}`,class:ue(["w-1/3 h-1/3 flex justify-center items-center p-0.5",{"bg-stone-100":d.isPrev||d.isNext,"bg-opacity-50":d.isPrev}])},[d.hasArrow?(v(),O("span",{key:0,class:"w-5 h-5 max-w-full max-h-full inline-block transform text-stone-800",style:Ce({transform:`rotate(${s.value?d.isNext?90:-90:(l.value?d.isPrev:d.isNext)?0:180}deg)`})},[N(no)],4)):le("",!0)],2))),128))],2)):(v(),O("div",{key:1,class:ue(["w-full h-full overflow-hidden rounded-xl flex flex-nowrap",{"flex-col":s.value}])},[Y("div",{class:ue(["flex-grow w-full h-full flex justify-center items-center bg-stone-100",{"bg-opacity-50":!l.value}])},[Y("span",{class:ue(["w-5 h-5 inline-block transform text-stone-800",{"-rotate-90":s.value,"rotate-180":!s.value}])},[N(no)],2)],2),c[0]||(c[0]=Y("div",{class:"flex-grow w-full h-full"},null,-1)),c[1]||(c[1]=Y("div",{class:"flex-grow w-full h-full"},null,-1)),Y("div",{class:ue(["flex-grow w-full h-full flex justify-center items-center bg-stone-100",{"bg-opacity-50":l.value}])},[Y("span",{class:ue(["w-5 h-5 inline-block text-stone-800",{"transform rotate-90":s.value}])},[N(no)],2)],2)],2))],6))}}),zh=Object.freeze(Object.defineProperty({__proto__:null,default:la},Symbol.toStringTag,{value:"Module"})),Dh={key:0,class:"inline-block fixed z-50 left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 pointer-events-none duration-200"},aa=he({__name:"DirectionToast",props:{direction:{type:Number},tapZone:{type:Number}},setup(e){const t=e,n=sessionStorage.getItem("tk:dir"),o=te(typeof n!="string"||+n!==t.direction),i=gt(()=>o.value=!1,1500);de(()=>[t.direction,t.tapZone],()=>{r(),o.value=!0,i()}),je(()=>{r(),i();let s;de(Yi(),a=>{a!=="visible"?s=Date.now():Date.now()-s>7e3&&(o.value=!0,i())})});function r(){sessionStorage.setItem("tk:dir",t.direction+"")}return(s,l)=>(v(),ie(Gn,{"enter-from-class":"opacity-0","leave-to-class":"opacity-0"},{default:oe(()=>[o.value?(v(),O("div",Dh,[N(la,{direction:e.direction,"tap-zone":e.tapZone},null,8,["direction","tap-zone"])])):le("",!0)]),_:1}))}}),Ah=Object.freeze(Object.defineProperty({__proto__:null,default:aa},Symbol.toStringTag,{value:"Module"})),Lh={class:"flex justify-between items-end"},jh={class:"fixed pointer-events-none left-0 right-0 bottom-0"},ca=he({__name:"GearControlsLayout",props:{visible:{type:Boolean},spaceTop:{type:null}},setup(e){return(t,n)=>(v(),O("div",{id:"controls",class:ue(["fixed pointer-events-none cursor-auto left-0 top-0 w-full h-full flex flex-col justify-between p-2 sm:p-3 pb-6 md:pb-5 lg:pb-3 z-20",{"opacity-100 z-20":e.visible,"opacity-0 -z-10":!e.visible}])},[Se(t.$slots,"default"),Y("div",{class:ue(["flex gap-1 items-center relative z-30 flex-shrink-0 2xs:gap-3",{"children-pointer-events-auto":e.visible}]),style:Ce({paddingTop:`${e.spaceTop||0}px`})},[Se(t.$slots,"top")],6),Y("div",Lh,[Y("div",{class:ue(["inline-block",{"children-pointer-events-auto":e.visible}])},[Se(t.$slots,"bottom-left")],2),Y("div",{class:ue(["inline-flex flex-col items-end gap-4",{"children-pointer-events-auto":e.visible}])},[Se(t.$slots,"bottom-right")],2)]),Y("div",jh,[Se(t.$slots,"progress")])],2))}}),Bh=Object.freeze(Object.defineProperty({__proto__:null,default:ca},Symbol.toStringTag,{value:"Module"})),Nh='.loading-indicator{display:inline-block;height:80px;position:relative;width:80px}.loading-indicator:after,.loading-indicator:before{border-radius:9999px;border-style:solid;border-width:4px;box-sizing:border-box;display:block;position:absolute;--tw-border-opacity:1;animation:lds-ripple 1s cubic-bezier(0,.2,.8,1) infinite;border-color:rgb(184 92 56/var(--tw-border-opacity,1));content:"";opacity:1}.loading-indicator:after{animation-delay:-.5s}@keyframes lds-ripple{0%{height:0;left:40px;opacity:0;top:40px;width:0}4.9%{height:8px;left:36px;opacity:0;top:36px;width:8px}5%{height:8px;left:36px;opacity:1;top:36px;width:8px}to{height:80px;left:0;opacity:0;top:0;width:80px}}',Vh={},Rh={class:"loading-indicator"};function Hh(e,t){return v(),O("div",Rh)}const oi=be(Vh,[["render",Hh],["styles",[Nh]]]),Fh=Object.freeze(Object.defineProperty({__proto__:null,default:oi},Symbol.toStringTag,{value:"Module"})),Wh={class:"max-h-none max-w-none h-full w-full m-0 p-0 border-none outline-none"},Uh={key:0,class:"fixed inset-0 h-[101%] flex justify-center items-center z-10 bg-black"},hr=be(he({inheritAttrs:!1,__name:"GearLayout",props:{loading:{type:Boolean},immediate:{type:Boolean},hideCursor:{type:Boolean},style:{type:Object}},setup(e,{expose:t}){const n={mounted:i=>i.isConnected&&!i.open&&i.showModal(),beforeUnmount:i=>i.isConnected&&i.open&&i.close()},o=te(null);return t({rootEl:o}),(i,r)=>Re((v(),O("dialog",Wh,[Y("div",{ref_key:"rootEl",ref:o,id:"gear-layout",class:ue({"cursor-none":e.hideCursor,"cursor-default":!e.hideCursor,"bg-black":e.immediate||!e.loading,"opacity-0":!e.immediate&&e.loading,"duration-200 transition-colors":!e.immediate,[`${i.$attrs.class??""}`]:!0}),style:Ce(e.style??{})},[e.loading&&e.immediate?(v(),O("div",Uh,[N(oi)])):le("",!0),Se(i.$slots,"default")],6)])),[[n]])}}),[["styles",["#gear-layout{direction:ltr;font-family:Helvetica,sans-serif;font-size:16px;font-weight:400;height:100%;line-height:24px;overflow:hidden;overscroll-behavior:contain;pointer-events:auto;text-align:left;width:100%}"]]]),qh=Object.freeze(Object.defineProperty({__proto__:null,default:hr},Symbol.toStringTag,{value:"Module"})),Kh={},Zh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 56 56"};function Yh(e,t){return v(),O("svg",Zh,[...t[0]||(t[0]=[Y("path",{fill:"currentColor",d:"M29.84 49.574h12.398c4.899 0 7.336-2.437 7.336-7.265V13.69c0-4.828-2.437-7.265-7.336-7.265H29.84Zm-16.055 0h12.398V6.426H13.785c-4.875 0-7.36 2.414-7.36 7.265V42.31c0 4.851 2.485 7.265 7.36 7.265"},null,-1)])])}const ua=be(Kh,[["render",Yh]]),Xh=Object.freeze(Object.defineProperty({__proto__:null,default:ua},Symbol.toStringTag,{value:"Module"})),Gh={},Jh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Qh(e,t){return v(),O("svg",Jh,[...t[0]||(t[0]=[Y("g",{fill:"none"},[Y("path",{d:"M24 0v24H0V0zM12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035c-.01-.004-.019-.001-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427c-.002-.01-.009-.017-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093c.012.004.023 0 .029-.008l.004-.014l-.034-.614c-.003-.012-.01-.02-.02-.022m-.715.002a.023.023 0 0 0-.027.006l-.006.014l-.034.614c0 .012.007.02.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z"}),Y("path",{fill:"currentColor",d:"M8 3v18H5a2 2 0 0 1-1.995-1.85L3 19V5a2 2 0 0 1 1.85-1.995L5 3zm11 0a2 2 0 0 1 1.995 1.85L21 5v14a2 2 0 0 1-1.85 1.995L19 21h-9V3z"})],-1)])])}const da=be(Gh,[["render",Qh]]),eg=Object.freeze(Object.defineProperty({__proto__:null,default:da},Symbol.toStringTag,{value:"Module"})),tg={key:1,class:"h-5"},fa=he({__name:"MangaPreferencesForm",props:{direction:{type:Number},readerStyle:{type:Number},gap:{type:Number},speed:{type:Number},zoom:{type:Number},webtoon:{type:Boolean},defaultPreferences:{type:Object},enableReset:{type:Boolean}},emits:["update:reader-style","update:direction","update:gap","update:speed","update:zoom"],setup(e,{emit:t}){const n=e,o=t,i=Q(()=>["Long strip",n.webtoon?void 0:"Single page",n.webtoon?void 0:"Double page"].filter(Boolean)),r=Q(()=>{const a=n.defaultPreferences;return!n.webtoon&&n.readerStyle!==a.readerStyle||!n.webtoon&&n.direction!==a.direction||n.gap!==a.gap||n.speed!==a.speed});function s(a){o("update:zoom",Math.round(a)/100)}function l(){o("update:reader-style",void 0),o("update:direction",void 0),o("update:gap",void 0),o("update:speed",void 0)}return(a,u)=>(v(),O(ye,null,[N(Le,{label:"Style"},{default:oe(()=>[N(mt,{"model-value":e.readerStyle,items:i.value,"onUpdate:modelValue":u[0]||(u[0]=c=>o("update:reader-style",c))},null,8,["model-value","items"])]),_:1}),N(Le,{label:"Direction"},{default:oe(()=>[N(mt,{"model-value":e.direction,items:e.webtoon?["Vertical"]:["Vertical","Left to right","Right to left"],"onUpdate:modelValue":u[1]||(u[1]=c=>o("update:direction",c))},null,8,["model-value","items"])]),_:1}),N(Le,{label:"Gap size"},{default:oe(()=>[N(mt,{"model-value":e.gap,items:["None","1px","2px","3px","4px","5px"],"onUpdate:modelValue":u[2]||(u[2]=c=>o("update:gap",c))},null,8,["model-value"])]),_:1}),N(Le,{label:"Play speed"},{default:oe(()=>[N(tn,{"model-value":e.speed,min:X(Qo),max:X(ei),step:X(ur),format:c=>`${c.toFixed(2)}x`,"onUpdate:modelValue":u[3]||(u[3]=c=>o("update:speed",c))},null,8,["model-value","min","max","step","format"])]),_:1}),N(Le,{label:"Zoom"},{default:oe(()=>[N(tn,{"model-value":Math.ceil(e.zoom*100),min:X(ti)*100,max:X(ni)*100,step:X(bh)*100,format:c=>`${Math.ceil(c)}%`,"onUpdate:modelValue":s},null,8,["model-value","min","max","step","format"])]),_:1}),e.enableReset?(v(),O("div",{key:0,class:ue(["w-full flex justify-center pt-1 duration-200",{"pointer-events-none opacity-0":!r.value,"opacity-90":r.value}])},[N(cr,{class:"w-2/3",onClick:l},{default:oe(()=>[...u[4]||(u[4]=[Wt(" Reset to default ",-1)])]),_:1})],2)):(v(),O("div",tg))],64))}}),ng=Object.freeze(Object.defineProperty({__proto__:null,default:fa},Symbol.toStringTag,{value:"Module"})),pa=he({__name:"PageNav",props:Ye({disabled:{type:Boolean},pages:{type:Array},totalImgs:{type:Number}},{modelValue:{type:Number,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=st(e,"modelValue"),o=Q(()=>t.pages.map(a=>a.map(({index:u})=>`${u+1}`).join("-"))),i=Q(()=>{const a=n.value,u=t.pages.findIndex(c=>c.some(({index:d})=>d===a));return u===-1?t.pages.length-1:u}),r=Q(()=>t.pages.length?`${o.value[i.value]}/${t.totalImgs}`:"--");function s(a){const u=t.pages[a][0].index;l(u)}function l(a){n.value=a}return(a,u)=>(v(),ie(sr,{"model-value":i.value,label:r.value,title:"Current page",items:o.value,disabled:e.disabled,"onUpdate:modelValue":s},null,8,["model-value","label","items","disabled"]))}}),og=Object.freeze(Object.defineProperty({__proto__:null,default:pa},Symbol.toStringTag,{value:"Module"})),gr=be(he({__name:"PauseToast",props:{playing:{type:Boolean}},setup(e){const t=e,n=te(0);return de(()=>t.playing,()=>{n.value=Date.now()}),(o,i)=>n.value?(v(),O("div",{key:n.value,class:"animate-pause-fade fixed left-1/2 top-1/2 -mx-12 -my-12 pointer-events-none w-24 h-24 p-4 bg-black bg-opacity-40 rounded-full duration-500"},[e.playing?(v(),ie(nr,{key:0})):(v(),ie(tr,{key:1}))])):le("",!0)}}),[["styles",[".animate-pause-fade{animation:pause-fade .4s linear forwards;transform-origin:center}@keyframes pause-fade{0%{opacity:0;transform:scale(.3)}10%{opacity:1;transform:scale(.35)}55%{opacity:1;transform:scale(.65)}to{opacity:0;transform:scale(1)}}"]]]),ig=Object.freeze(Object.defineProperty({__proto__:null,default:gr},Symbol.toStringTag,{value:"Module"})),rg=30,mr=be(he({__name:"ProgressBar",props:{value:{type:Number},total:{type:Number},longStrip:{type:Boolean},height:{type:Number},rtl:{type:Boolean},opacity:{type:Number}},setup(e){const t=e,n=Q(()=>Math.floor(t.value)+1),o=Q(()=>`${Math.max(2,Math.min(10,t.height))}px`),i=gn().width,r=Q(()=>t.total!==void 0&&i.value/t.total>=rg);return(s,l)=>(v(),O("div",{class:ue(["rprog",{"rprog--rtl":e.rtl}]),style:Ce({height:o.value,opacity:e.opacity??.8})},[r.value?(v(!0),O(ye,{key:0},Xt(e.total,a=>(v(),O("span",{key:a,class:ue(["rprog__item",{"rprog__item--active":n.value===a}]),style:Ce(!e.longStrip||n.value!==a?{}:{"--portion":`${e.value%1*100}%`})},null,6))),128)):(v(),O("div",{key:1,style:Ce({width:`${e.value/(e.total??1)*100}%`}),class:"h-full bg-textPrimary"},null,4))],6))}}),[["styles",['.rprog{--portion:100%;display:flex;width:100%}.rprog--rtl,.rprog--rtl .rprog__item{flex-direction:row-reverse}.rprog__item{display:inline-flex;flex-grow:1;flex-shrink:0;height:100%}.rprog__item:first-child:before{display:none}.rprog__item--active:before,.rprog__item:has(~.rprog__item--active):before{background-color:rgb(0 0 0/var(--tw-bg-opacity,1));content:"";display:block;flex-shrink:0;height:100%;width:1px;--tw-bg-opacity:.25}.rprog__item--active:after,.rprog__item:has(~.rprog__item--active):after{content:"";display:block;height:100%;--tw-bg-opacity:1;background-color:rgb(251 130 82/var(--tw-bg-opacity,1));width:var(--portion)}']]]),sg=Object.freeze(Object.defineProperty({__proto__:null,default:mr},Symbol.toStringTag,{value:"Module"})),ha=he({__name:"GesturesContainer",props:{spaceTop:{type:Number},controlsVisible:{type:Boolean},zoom:{type:Number},zooming:{type:Boolean},pinchToZoome:{type:Boolean},tapZone:{type:Number},pageIndex:{type:Number},playController:{type:Object},rtl:{type:Boolean},horizontal:{type:Boolean},longStrip:{type:Boolean},touchDevice:{type:Boolean},busy:{type:Boolean}},emits:["update:zoom","update:zooming","dragEnd","click","prev","next"],setup(e,{expose:t,emit:n}){const o=e,i=n,r=te(null),s=te(Math.min(ni,Math.max(ti,o.zoom))),l=te(!1),a=te(!1),u={isZoomIn:!1,isZoomOut:!1,initial:void 0};t({rootEl:r}),de(()=>o.zoom,S=>W(S)),je(()=>{o.touchDevice?_t(r,"touchstart",M):(_t(r,"mousedown",p),_t(window,"wheel",U))}),$t({onKeyDown:S=>{var x;if(!o.busy&&((x=r.value)==null||x.focus(),!(S.key==="Meta"||S.key==="Control")&&(S.ctrlKey||S.metaKey)))switch(S.key){case"0":W(1);break;case"-":W(s.value-.2),S.preventDefault();break;case"=":case"+":W(s.value+.2),S.preventDefault();break}},onKeyUp:S=>{o.zooming&&!(S.ctrlKey||S.metaKey)&&G()}});function c(S){a.value!==S&&(a.value=S,S?o.playController.pause():(i("dragEnd"),o.playController.resume()))}let d={x:0,y:0},f={x:0,y:0};function p(S){if(S.button!==0)return;const x=r.value;x&&(d={x:S.clientX,y:S.clientY},f={x:x.scrollLeft,y:x.scrollTop},window.addEventListener("mousemove",y),window.addEventListener("mouseup",()=>{window.removeEventListener("mousemove",y),setTimeout(()=>c(!1))},{once:!0}),S.preventDefault(),S.stopPropagation())}function y(S){const x=S.clientX-d.x,V=S.clientY-d.y;if(!a.value&&Math.abs(x)<.5&&Math.abs(V)<.5)return;c(!0);const Z=r.value;Z&&(Z.scrollLeft=f.x-x,Z.scrollTop=f.y-V)}let b={distance:0,zoom:s.value,x:0,y:0},$=!1;function M(S){o.busy||($=o.pinchToZoome&&S.touches.length===2,$&&(i("update:zooming",!0),c(!0),S.stopPropagation(),S.preventDefault(),b={distance:K(S),zoom:s.value,x:(S.touches[0].clientX+S.touches[1].clientX)/2,y:(S.touches[0].clientY+S.touches[1].clientY)/2}),($||o.longStrip&&o.playController.isPlaying.value)&&window.addEventListener("touchend",L,{once:!0}))}function L(){var Z;if($=!1,o.zooming){c(!1),G();return}if(!a.value)return;const S=gt(()=>{var j;c(!1),(j=r.value)==null||j.removeEventListener("scroll",V)},200),x=setTimeout(S,200);(Z=r.value)==null||Z.addEventListener("scroll",V);function V(){clearTimeout(x),S()}}function D(S){if(!$&&!(o.longStrip&&o.playController.isPlaying.value)||(c(!0),!o.zooming)||(S.stopPropagation(),S.preventDefault(),S.touches.length<2))return;const V=K(S)/b.distance;ee(Math.ceil(V*b.zoom*100)/100,b)}const w=gt(()=>l.value=!1,100);let g=!1;const E=gt(()=>{g=!1},30);function U(S){if(o.busy)return;let x=o.zooming;if(g||(g=!0,x=S.ctrlKey||S.metaKey,x&&i("update:zooming",!0)),E(),x){S.stopPropagation(),S.preventDefault();const V=Math.ceil((s.value+S.deltaY*-.01)*100)/100;ee(V,{x:S.clientX,y:S.clientY});return}o.horizontal&&(l.value||(l.value=!0),w(),S.deltaY&&(r.value&&(r.value.scrollLeft+=S.deltaY*(o.rtl?-1:1)),S.stopPropagation()))}function K(S){return Math.hypot(S.touches[0].clientX-S.touches[1].clientX,S.touches[0].clientY-S.touches[1].clientY)}const _={x:0,y:0,ts:0};function z(S){if(a.value||o.zooming)return;const x=r.value;if(!x||A(x,S)||(i("click"),o.playController.isPlaying.value))return;const{clientX:V,clientY:Z}=S,{x:j,y:ge,ts:ae}=_;_.x=V,_.y=Z,_.ts=new Date().getTime();const pe=_.ts-ae;pe>250||pe<10||Math.abs(j-V)>40||Math.abs(ge-Z)>40||(_.ts=0,_.x=0,_.y=0,T(V,Z))}function A(S,x){if(o.playController.isPlaying.value)return!1;const V=o.tapZone;if(V===pr.none)return!1;const Z=o.controlsVisible?o.spaceTop:0,j=S.clientHeight-Z,ge=Math.max(0,x.clientY-Z),ae=o.horizontal?S.clientWidth:j;let pe=!1,ve=!1;if(V){const{prevZones:we,nextZones:Ae}=sa[o.tapZone],at=Math.floor(ge/j*3);let Je=Math.floor(x.clientX/S.clientWidth*3);o.rtl&&(Je=2-Je);const De=at*3+Je;pe=we.includes(De),ve=!pe&&Ae.includes(De)}else{const Ae=(o.horizontal?o.rtl?ae-x.clientX:x.clientX:ge)/ae,at=o.horizontal?.2:.15;pe=Ae<=at&&o.pageIndex>0,ve=!pe&&Ae>=1-at}if(!pe&&!ve)return!1;if(o.longStrip){const we=(pe?-1:1)*.75*ae;o.horizontal?S.scrollLeft=S.scrollLeft+(o.rtl?-1:1)*we:S.scrollTop=Math.max(0,S.scrollTop+we)}else pe?i("prev"):ve&&i("next");return!0}async function T(S,x){const V=s.value===1?2:1;await W(V,{x:S,y:x}),G()}function G(){i("update:zooming",!1),u.initial=void 0,u.isZoomIn=!1,u.isZoomOut=!1}function C(){if(u.initial)return;const S=r.value;if(!S)return;const x=S.querySelector(`[data-index="${o.pageIndex}"],[data-index2="${o.pageIndex}"]`)??void 0;x&&(u.initial={el:x,rect:x.getBoundingClientRect()})}function ee(S,x){if(u.isZoomIn=u.isZoomIn||!u.isZoomOut&&S>1,u.isZoomIn&&S<1){W(1,x);return}if(u.isZoomOut=u.isZoomOut||!u.isZoomIn&&S<1,u.isZoomOut&&S>1){W(1,x);return}W(S,x)}async function W(S,x){const V=r.value,Z=Math.min(ni,Math.max(ti,S));if(!V||s.value===Z)return;C();const{initial:j}=u;if(!j)return;const ge=(x==null?void 0:x.x)??V.clientWidth/2,ae=(x==null?void 0:x.y)??V.clientHeight/2;s.value=Z,i("update:zoom",Z),await pt();const{el:pe,rect:ve}=j,we=pe.offsetWidth/ve.width,Ae=pe.offsetHeight/ve.height;V.scrollLeft=pe.offsetLeft-ve.left*we+ge*(we-1),V.scrollTop=pe.offsetTop-ve.top*Ae+ae*(Ae-1)}return(S,x)=>(v(),O("div",{ref_key:"rootEl",ref:r,tabindex:"0",class:ue(["w-full h-full overflow-auto scrollbar-none overscroll-contain scrollbar-none focus:outline-none touch-pan-x touch-pan-y",{"!snap-none":!e.longStrip&&(a.value||l.value||e.zooming),"cursor-grabbing":!e.touchDevice&&a.value,"overflow-hidden":e.zooming}]),style:Ce({"font-size":`${s.value}px`}),onClick:Be(z,["stop"]),onTouchmoveCapture:Be(D,["stop"])},[Se(S.$slots,"default")],38))}}),lg=Object.freeze(Object.defineProperty({__proto__:null,default:ha},Symbol.toStringTag,{value:"Module"})),ag=["src"],vr=he({inheritAttrs:!1,__name:"ReaderImg",props:{src:{type:null},style:{type:Object}},setup(e){const t=e;let n;const o={mounted:i=>{if(t.src instanceof HTMLElement){const r=t.src.getBoundingClientRect();n=document.createElement("div"),n.style.setProperty("width",`${r.width}px`),n.style.setProperty("height",`${r.height}px`),t.src.replaceWith(n),i.appendChild(t.src)}},beforeUnmount:i=>{const r=i.children[0];n&&r&&(n.replaceWith(r),n=void 0)}};return(i,r)=>typeof e.src=="string"?(v(),O("img",{key:0,src:e.src,class:ue(i.$attrs.class??""),style:Ce(e.style)},null,14,ag)):Re((v(),O("div",{key:1,class:ue(i.$attrs.class??""),style:Ce(e.style)},null,6)),[[o]])}}),cg=Object.freeze(Object.defineProperty({__proto__:null,default:vr},Symbol.toStringTag,{value:"Module"}));function br(e,t){return(e==null?void 0:e.querySelector(`[data-index="${t}"],[data-index2="${t}"]`))??void 0}const ug=["data-index"],dg={key:0,class:"rbod__page rbod__page--loading"},fg=["data-index"],ga=be(he({__name:"ReaderBody",props:{page:{type:Number},pageIndex:{type:Number},direction:{type:Number},isLongStrip:{type:Boolean},isVertical:{type:Boolean},isDouble:{type:Boolean},isRTL:{type:Boolean},pages:{type:Array},totalImgs:{type:Number},gap:{type:Number},zoom:{type:Number},zooming:{type:Boolean},pinchToZoome:{type:Boolean},tapZone:{type:Number},spaceTop:{type:Number},touchDevice:{type:Boolean},playController:{type:Object},busy:{type:Boolean},controlsVisible:{type:Boolean}},emits:["ready","update:zoom","update:zooming","update:playing","dragEnd","click","end","prev","next"],setup(e,{expose:t,emit:n}){const o=e,i=n,r=te(null),s=Q(()=>{var D;return(D=r.value)==null?void 0:D.rootEl});t({rootEl:s});const l=gn(),a=Q(()=>{const{width:D,height:w}=l,g=o.isLongStrip?o.isVertical?D.value:w.value:Math.min(D.value,w.value);return Math.min(4,Math.max(1,Math.ceil(g/400-1)))*o.gap}),u=te(o.isLongStrip?{min:o.pageIndex-1,max:o.pageIndex}:$()),c=Q(()=>{const{min:D,max:w}=u.value,g={};for(let E=D;E<=w;E++)g[E]=!0;return g}),d=te(p()),f=Mn(()=>{d.value=p(),pt(()=>b())},100);de(l.width,f),de(l.height,f),de(()=>o.pages,f),de(()=>o.isLongStrip,f),de(()=>o.isVertical,f);function p(){const D=l.width.value,w=l.height.value,{pages:g,isLongStrip:E,isVertical:U}=o;return g.map(K=>{var S;const _=K.some(x=>{var V;return(V=x.img)==null?void 0:V.isLoading}),z=K.map(x=>x.index),A={isLoading:_,indexes:z,visible:!1};if(_)return A;const T=K.map(({img:x})=>x).filter(Boolean);if(!T.length||(A.srcs=T.map(({src:x})=>x),T.every(x=>x.hasError)))return A;const C=(S=T.find(x=>!x.hasError))==null?void 0:S.size;if(!C)return A;const ee=T.reduce((x,V)=>{var Z;return x+(((Z=V.size)==null?void 0:Z.width)??C.width)},0),W=T.reduce((x,V)=>{var Z;return x+(((Z=V.size)==null?void 0:Z.height)??C.height)},0)/T.length;return E&&U||!E&&D/ee<w/W?(A.width=Math.min(D,ee),A.height=W*(A.width/ee)):(A.height=Math.min(w,W),A.width=ee*(A.height/W)),A.width&&A.height&&(A.style={width:`${A.width}em`,height:`${A.height}em`}),A})}const y=Q(()=>{const D=o.isVertical?"width":"height";return d.value.map(w=>w[D]).filter(Boolean).sort((w,g)=>g-w)[0]});je(()=>{const D=br(s.value,o.pageIndex);D==null||D.scrollIntoView({behavior:"instant",block:"start"});let w,g=!1;Fs(()=>{w!==o.pageIndex&&(w=o.pageIndex,b(),g||(g=!0,pt(()=>i("ready"))))})});async function b(){if(!o.isLongStrip){u.value=$();return}const D=Math.floor(o.page),w=br(s.value,D);if(!w)return;const g=+M(w).getAttribute("data-index"),E=+L(w).getAttribute("data-index");(g!==u.value.min||E!==u.value.max)&&(u.value={min:g,max:E})}function $(){const{pageIndex:D}=o;return{min:D-(o.isDouble?5:3),max:D+(o.isDouble?6:3)}}function M(D,w=0){const g=D.previousElementSibling;if(!g)return D;const E=w+(o.isVertical?g.clientHeight:g.clientWidth);return(o.isVertical?E>l.height.value*1.5:o.isRTL?E>l.width.value*2.5:E>l.width.value*1.5)?g:M(g,E)}function L(D,w=0){const g=D.nextElementSibling;if(!g)return D;const E=w+(o.isVertical?g.clientHeight:g.clientWidth);return(o.isVertical?E>l.height.value*3.5:o.isRTL?E>l.width.value*1.5:E>l.width.value*2.5)?g:L(g,E)}return(D,w)=>(v(),ie(ha,{ref_key:"gestureContainer",ref:r,"space-top":e.spaceTop,"controls-visible":e.controlsVisible,zoom:e.zoom,zooming:e.zooming,"pinch-to-zoome":e.pinchToZoome,"tap-zone":e.tapZone,"page-index":e.pageIndex,class:ue(["rbod",{"rbod--long-strip":e.isLongStrip,"rbod--paging":!e.isLongStrip,"rbod--vertical":e.isVertical,"rbod--rtl":e.isRTL,"rbod--1page":d.value.length===1}]),"play-controller":e.playController,horizontal:!e.isVertical,rtl:e.isRTL,"touch-device":e.touchDevice,busy:e.busy,"long-strip":e.isLongStrip,style:Ce({"--gap":`${a.value}em`,"--space-top":`${e.spaceTop}px`,"--screen-width-em":X(l).width.value+"em","--screen-height-em":X(l).height.value+"em",...e.isLongStrip?{"--max-size-em":y.value+"em"}:{}}),"onUpdate:zoom":w[0]||(w[0]=g=>i("update:zoom",g)),"onUpdate:zooming":w[1]||(w[1]=g=>i("update:zooming",g)),onDragEnd:w[2]||(w[2]=()=>i("dragEnd")),onClick:w[3]||(w[3]=()=>i("click")),onPrev:w[4]||(w[4]=()=>i("prev")),onNext:w[5]||(w[5]=()=>i("next"))},{default:oe(()=>[(v(!0),O(ye,null,Xt(d.value,g=>{var E;return v(),O("div",Sn({key:e.direction+"_"+g.indexes[0],"data-index":g.indexes[0]},{ref_for:!0},g.indexes.length>1?{"data-index2":g.indexes[1]}:{}),[!((E=g.srcs)!=null&&E.length)||g.isLoading?(v(),O("div",dg,[c.value[g.indexes[0]]?(v(),ie(oi,{key:0})):le("",!0)])):g.srcs.length==1?(v(),O(ye,{key:1},[c.value[g.indexes[0]]?(v(),ie(vr,{key:1,class:"rbod__page img",src:g.srcs[0],style:Ce(g.style)},null,8,["src","style"])):(v(),O("div",{key:0,class:"rbod__page",style:Ce(g.style)},null,4))],64)):(v(),O("div",{key:2,class:ue(["rbod__page rbod__page--double",{"flex-row-reverse":e.isRTL}]),style:Ce(g.style)},[g.indexes.some(U=>c.value[U])?(v(!0),O(ye,{key:0},Xt(g.srcs,(U,K)=>(v(),O("div",{key:typeof U=="string"?U:`${K}-${g.height}`},[N(vr,{src:U,class:"img"},null,8,["src"])]))),128)):le("",!0)],6))],16,ug)}),128)),Y("div",{class:"last","data-index":e.totalImgs},[Se(D.$slots,"end")],8,fg)]),_:3},8,["space-top","controls-visible","zoom","zooming","pinch-to-zoome","tap-zone","page-index","play-controller","horizontal","rtl","touch-device","busy","long-strip","class","style"]))}}),[["styles",[".rbod{--tw-translate-y:0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media (min-width:1024px){.rbod{transform:none}}.rbod--rtl{flex-direction:row-reverse}.rbod.rbod--vertical>div{padding:calc(var(--gap)/2) 0}.rbod:not(.rbod--vertical){align-items:center;display:flex;height:100%;justify-content:flex-start}.rbod:not(.rbod--vertical)>div{padding:0 calc(var(--gap)/2)}.rbod--long-strip.rbod--vertical.rbod--1page>div:first-child{min-height:100vh}.rbod--long-strip.rbod--vertical>div:first-child{margin-top:var(--space-top);padding-top:0}.rbod--long-strip.rbod--vertical>div:last-child{padding-bottom:0}.rbod--long-strip.rbod--vertical>div{width:var(--max-size-em)}.rbod--long-strip.rbod--vertical .rbod__page--loading{height:75vh;width:100%}.rbod--long-strip.rbod--vertical .last{height:100vh}.rbod--long-strip:not(.rbod--vertical).rbod--1page>div:first-child{min-width:100vw}.rbod--long-strip:not(.rbod--vertical)>div{align-items:center;display:flex;height:var(--max-size-em)}.rbod--long-strip:not(.rbod--vertical) .rbod__page--loading{height:100%;max-width:100vw;width:680px}.rbod--long-strip:not(.rbod--vertical) .last{width:100vw}.rbod--long-strip>div>.img{flex-shrink:0;margin:auto}.rbod--paging>div{align-items:center;display:grid;justify-content:center;min-height:100vh;min-width:100vw;scroll-snap-align:center;scroll-snap-stop:always}.rbod--paging.rbod--vertical{scroll-snap-type:y var(--tw-scroll-snap-strictness);--tw-scroll-snap-strictness:mandatory}.rbod--paging.rbod--vertical>div{width:var(--screen-width-em)}.rbod--paging:not(.rbod--vertical){scroll-snap-type:x var(--tw-scroll-snap-strictness);--tw-scroll-snap-strictness:mandatory}.rbod--paging:not(.rbod--vertical)>div{height:var(--screen-height-em)}.rbod--paging .rbod__page--loading{height:100%;width:100%}.rbod--paging .rbod__page.rbod__page--double{align-items:center;background-color:transparent;display:flex;gap:var(--gap);justify-content:center}.rbod--paging .rbod__page.rbod__page--double div{display:flex;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.rbod--paging .rbod__page.rbod__page--double div .img{flex-shrink:0;max-height:100%;max-width:100%;-o-object-fit:contain;object-fit:contain}.rbod>div{flex-shrink:0}.rbod .rbod__page,.rbod>div{margin:auto;-webkit-user-select:none;-moz-user-select:none;user-select:none}.rbod .rbod__page{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));-o-object-fit:contain;object-fit:contain}.rbod .rbod__page--loading{align-items:center;background-color:transparent;display:flex;justify-content:center}.rbod .img canvas,.rbod .img img{height:100%;max-height:100%;max-width:100%;width:100%}"]]]),pg=Object.freeze(Object.defineProperty({__proto__:null,default:ga},Symbol.toStringTag,{value:"Module"})),hg={},gg={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function mg(e,t){return v(),O("svg",gg,[...t[0]||(t[0]=[Y("path",{fill:"currentColor",d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12z"},null,-1)])])}const ma=be(hg,[["render",mg]]),vg=Object.freeze(Object.defineProperty({__proto__:null,default:ma},Symbol.toStringTag,{value:"Module"})),bg={class:"flex w-full flex-shrink-0 justify-between items-center h-16 px-3"},va=he({__name:"BottomSheet",props:Ye({spaceTop:{type:Number}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=st(e,"modelValue"),n=te(null),o=te(!1),i=te(0);$t({onKeyDown:s});const r=Yo();de(t,c=>r(c)),Xi(()=>{const c=t.value;return c&&(t.value=!1),c});function s(c){t.value&&c.key==="Escape"&&(t.value=!1,c.preventDefault())}const l={y:-1};function a(c){const d=n.value;if(!d)return;if(d.scrollTop>0){l.y=-1;return}if(l.y===-1){l.y=Math.max(0,c.touches[0].clientY);return}const p=c.touches[0].clientY-l.y,y=p>0?p:0;y!=i.value&&(i.value=y);const b=y>0;b!==o.value&&(o.value=b)}async function u(){o.value=!1,l.y=-1,await pt();const c=n.value;c&&c.offsetHeight-i.value<window.innerHeight/2&&i.value>c.offsetHeight*.3&&(t.value=!1),i.value=0}return(c,d)=>(v(),O("div",{class:ue(["fixed inset-0 flex flex-col items-center justify-end select-none z-40 text-stone-100",{"!pointer-events-none":!t.value}]),style:Ce({"padding-top":(e.spaceTop??0)+60+"px"}),onClick:d[3]||(d[3]=()=>t.value=!1)},[N(Gn,{"enter-from-class":"!translate-y-full","leave-to-class":"!translate-y-full"},{default:oe(()=>[t.value?(v(),O("div",{key:0,class:ue(["w-full sm:w-[31rem] bg-stone-900 bg-opacity-90 backdrop-blur-md rounded-t-xl max-w-full overflow-hidden shadow-lg shadow-neutral-950",{"duration-0":o.value,"duration-200":!o.value}]),style:Ce(i.value?{transform:`translateY(${i.value}px)`}:{}),onClick:d[1]||(d[1]=Be(()=>{},["stop"])),onWheelPassive:d[2]||(d[2]=Be(()=>{},["stop"])),onTouchmove:Be(a,["stop"]),onTouchend:u},[Y("div",bg,[N(Ge,{transparent:"",onClick:d[0]||(d[0]=()=>t.value=!1)},{default:oe(()=>[N(ma)]),_:1}),Se(c.$slots,"name"),Se(c.$slots,"actions")]),Y("div",{ref_key:"scrollEl",ref:n,class:ue(["overflow-auto overscroll-none px-6 md:px-8 lg:px-10 xl:px-12 pt-1.5 pb-8 md:pb-6 flex-grow scrollbar-sm",{"overflow-hidden":o.value}]),style:{"max-height":"calc(100% - 4rem)"}},[Se(c.$slots,"default")],2)],38)):le("",!0)]),_:3})],6))}}),yg=Object.freeze(Object.defineProperty({__proto__:null,default:va},Symbol.toStringTag,{value:"Module"})),wg=["onClick","onKeyup"],ba=be(he({__name:"TabBar",props:Ye({items:{type:Array}},{modelValue:{type:Number,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=st(e,"modelValue"),o=te(null),i=te({width:"",left:""}),r=te(!1);je(()=>{const l=Date.now();de(n,async a=>{var c;await pt();const u=(c=o.value)==null?void 0:c.children[a+1];u&&(i.value={width:u.offsetWidth+"px",left:u.offsetLeft+"px"},!r.value&&Date.now()-l>500&&(r.value=!0),u.scrollIntoView({behavior:r.value?"smooth":"auto",block:"center",inline:"center"}))},{immediate:!0})});function s(l){n.value=l}return(l,a)=>(v(),O("div",{ref_key:"root",ref:o,class:"relative h-8 rounded-[2.5rem] inline-flex bg-black bg-opacity-50 p-1 font-medium max-w-full leading-none overflow-auto scrollbar-none",style:{}},[Y("div",{class:ue(["bg-stone-300 h-6 rounded-2xl absolute top-1 pointer-events-none",{"duration-200":r.value}]),style:Ce(i.value)},null,6),(v(!0),O(ye,null,Xt(t.items,(u,c)=>Re((v(),O("div",{key:c,tabindex:"0",class:ue(["text-sm inline-flex justify-center items-center h-6 rounded-2xl px-4 cursor-pointer relative z-10 whitespace-nowrap flex-shrink-0 focus:outline-primary hover:bg-stone-50 hover:bg-opacity-10 duration-200",{"text-stone-900":c==n.value,"text-stone-400":c!=n.value}]),onClick:Be(()=>s(c),["stop"]),onKeyup:[qo(()=>s(c),["enter"]),qo(()=>s(c),["space"])]},[Wt(Fe(u),1)],42,wg)),[[X(zt),30]])),128))],512))}}),[["styles",[".scrollbar-none{scrollbar-width:none}.scrollbar-none::-webkit-scrollbar{display:none}"]]]),xg=Object.freeze(Object.defineProperty({__proto__:null,default:ba},Symbol.toStringTag,{value:"Module"})),_g={},Sg={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function kg(e,t){return v(),O("svg",Sg,[...t[0]||(t[0]=[Y("path",{fill:"currentColor",d:"M11 18h2v-2h-2v2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8s8 3.59 8 8s-3.59 8-8 8zm0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5c0-2.21-1.79-4-4-4z"},null,-1)])])}const ya=be(_g,[["render",kg]]),Cg=Object.freeze(Object.defineProperty({__proto__:null,default:ya},Symbol.toStringTag,{value:"Module"})),Tg={},Mg={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28"};function Pg(e,t){return v(),O("svg",Mg,[...t[0]||(t[0]=[Y("path",{fill:"currentColor",d:"M14 8.25a2.25 2.25 0 1 1 0-4.5a2.25 2.25 0 0 1 0 4.5m0 8a2.25 2.25 0 1 1 0-4.5a2.25 2.25 0 0 1 0 4.5M11.75 22a2.25 2.25 0 1 0 4.5 0a2.25 2.25 0 0 0-4.5 0"},null,-1)])])}const wa=be(Tg,[["render",Pg]]),Eg=Object.freeze(Object.defineProperty({__proto__:null,default:wa},Symbol.toStringTag,{value:"Module"})),Ig={key:1,class:"w-full text-center text-xl whitespace-nowrap text-ellipsis flex-shrink overflow-hidden px-5 select-text"},Og={class:"opacity-90"},$g={key:0,class:"w-full text-center text-sm text-stone-400 whitespace-nowrap text-ellipsis flex-shrink overflow-hidden mb-3 -mt-2 select-text px-4"},yr=he({__name:"SettingsBottomSheet",props:Ye({name:{type:String},spaceTop:{type:Number},enableHelp:{type:Boolean},enableDefaultPreferences:{type:Boolean}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:Ye(["help","more"],["update:modelValue"]),setup(e,{emit:t}){const n=e,o=t,i=st(e,"modelValue"),r=te(0),s=Q(()=>n.name??location.hostname);$t({onKeyUp:a=>{a.key==="s"&&!a.metaKey&&!a.ctrlKey&&(i.value=!0)}}),je(()=>{de(i,a=>{a||setTimeout(()=>{r.value!==0&&(r.value=0)},300)})});function l(){o("help"),i.value=!1}return(a,u)=>(v(),ie(va,{modelValue:i.value,"onUpdate:modelValue":u[2]||(u[2]=c=>i.value=c),"space-top":e.spaceTop},{name:oe(()=>[e.enableDefaultPreferences?(v(),ie(ba,{key:0,modelValue:r.value,"onUpdate:modelValue":u[0]||(u[0]=c=>r.value=c),items:["Preferences","Default"]},null,8,["modelValue"])):(v(),O("h3",Ig,Fe(s.value),1))]),actions:oe(()=>[e.enableDefaultPreferences?(v(),ie(Ge,{key:0,transparent:"",class:ue(e.enableHelp?"":"opacity-0 pointer-events-none"),onClick:l},{default:oe(()=>[Y("span",Og,[N(ya)])]),_:1},8,["class"])):(v(),ie(Ge,{key:1,transparent:"",onClick:u[1]||(u[1]=()=>o("more"))},{default:oe(()=>[N(wa)]),_:1}))]),default:oe(()=>[r.value===0?(v(),O(ye,{key:0},[e.enableDefaultPreferences?(v(),O("h3",$g,Fe(s.value),1)):le("",!0),Se(a.$slots,"tab-preferences")],64)):(v(),O(ye,{key:1},[Se(a.$slots,"tab-default"),u[3]||(u[3]=Y("div",{class:"h-6"},null,-1))],64))]),_:3},8,["modelValue","space-top"]))}}),zg=Object.freeze(Object.defineProperty({__proto__:null,default:yr},Symbol.toStringTag,{value:"Module"}));function oo(e=0){return new Promise(t=>setTimeout(t,e))}const wr={};async function xa(e){Dg();const t=(()=>{const r=e.width,s=e.height;if(r&&s)return{width:r,height:s};const l=e.getBoundingClientRect();return{width:l.width,height:l.height}})(),n=await _a(e);if(n)return{size:t,src:n};const o=Ag(e);if(!o)return;const i=await _a(o);return i?{size:t,src:i}:{size:t,src:Lg(o,t)}}function Dg(){var o,i;if(wr.toBlob)return;const e=document.createElement("template");e.innerHTML="<iframe></iframe>";const t=e.content.querySelector("iframe");t&&(t==null||t.style.setProperty("style","none"),document.body.appendChild(t));const n=(i=(o=t==null?void 0:t.contentWindow)==null?void 0:o.HTMLCanvasElement)==null?void 0:i.prototype;wr.toBlob=(n==null?void 0:n.toBlob)??HTMLCanvasElement.prototype.toBlob,t&&document.body.removeChild(t)}function Ag(e){var o;const t=e.cloneNode(),n=(o=t.getContext)==null?void 0:o.call(t,"2d");if(n){try{n.drawImage(e,0,0)}catch{return}return t}}function _a(e){return new Promise(t=>{const n=o=>{if(!o)return t(void 0);const i=URL.createObjectURL(o);t(i)};try{wr.toBlob.call(e,n,"image/jpeg",1)}catch{t(void 0)}})}function Lg(e,t){const n=Array.from(e.attributes);return n.forEach(o=>{o.name!=="width"&&o.name!=="height"&&e.removeAttribute(o.name)}),n.some(o=>o.name==="width")||e.setAttribute("width",`${t.width}`),n.some(o=>o.name==="height")||e.setAttribute("height",`${t.height}`),e}let ii;async function jg(e,t){if(ii||!t.startsWith("blob:"))return t;if(ii===void 0){try{if((await fetch(t)).ok)return ii=!0,t}catch{}ii=!1}e.complete||await new Promise(l=>{let a=0;const u=setInterval(()=>{e.complete?(l(),clearInterval(u)):++a>=30&&l()},100)});const o=e.naturalWidth,i=e.naturalHeight;if(!o||!i)return;const r=document.createElement("canvas"),s=r.getContext("2d");return r.width=o,r.height=i,s==null||s.drawImage(e,0,0,o,i),await xa(r)}function Bg(e){const t=new Set,n=e.getAttributeNames(),o=n.indexOf("src"),i=o!==-1;i&&(n.splice(o,1),n.push("src"));for(const r of n){if(r==="srcset"||i&&r===":src"||r!=="data-url"&&r!=="data-original"&&!r.includes("src"))continue;const s=e.getAttribute(r);s&&(r==="src"&&e.naturalWidth&&e.naturalWidth<200||t.add(s.replace(/(\n|\t)/g," ").trim()))}return Array.from(t)}class Ng{constructor({onChanged:t}){Pe(this,"isMounted",!0);Pe(this,"elsDisposeCallbacksMap",new Map);Pe(this,"onChanged");this.onChanged=t}dispose(){this.isMounted=!1,this.elsDisposeCallbacksMap.forEach(t=>t()),this.elsDisposeCallbacksMap=new Map,this.onChanged=()=>{}}async download(t){if(!this.isMounted)return;const n=t.el;if(n){if(!Cn(n)){this.onChanged(t,{src:"",isLoading:!1,hasError:!1,invalid:!0});return}if(n instanceof HTMLCanvasElement)return await this.downloadCanvas(t,n);if(n instanceof HTMLImageElement)return await this.downloadImgEl(t,n)}t.src&&await this.downloadRawSrc(t,t.src)}async downloadCanvas(t,n){this.setupCanvasObserver(n,t);const o=await xa(n);!o||!this.isMounted||this.onChanged(t,{src:o.src,size:o.size,isLoading:!1,hasError:!1,invalid:!Qn(o.size.width,o.size.height)})}setupCanvasObserver(t,n){if(this.elsDisposeCallbacksMap.has(t))return;const o=t.getContext("2d");if(o){const i=o.drawImage.bind(o),r=o.putImageData.bind(o),s=Mn(()=>{this.isMounted&&this.download(n)},120),l=(a,u,c)=>(s(),Reflect.apply(a,u,c));try{o.drawImage=new Proxy(i,{apply:l}),o.putImageData=new Proxy(r,{apply:l})}catch{}this.elsDisposeCallbacksMap.set(t,()=>{try{o.drawImage=i,o.putImageData=r}catch{}})}}async downloadImgEl(t,n){this.setupImgElObserver(n,t);const o=Bg(n);if(o.length){this.onChanged(t,{src:o[0],isLoading:!0,hasError:!1});for(let i=0;i<o.length;i++){const r=o[i],s=await jg(n,r);if(!s)continue;if(s&&typeof s!="string"){this.onChanged(t,{src:s.src,size:s.size,isLoading:!1,hasError:!1});return}const l=await Sa(s,n,a=>{this.isMounted&&this.onChanged(t,{src:s,size:a,isLoading:!1,hasError:!1})});if(l.ok||!this.isMounted)return;i===o.length-1&&this.onChanged(t,{src:s,isLoading:!1,hasError:!!l.error,invalid:!!l.invalid,size:l.size})}}}setupImgElObserver(t,n){if(this.elsDisposeCallbacksMap.has(t))return;let o=t.getAttribute("src");const i=new MutationObserver(r=>{r.some(l=>{if(l.attributeName!=="src")return!1;const a=o;return o=t.getAttribute("src"),!!o&&a!==o})&&this.download(n)});i.observe(t,{attributes:!0}),this.elsDisposeCallbacksMap.set(t,()=>i.disconnect())}async downloadRawSrc(t,n){this.onChanged(t,{src:n,isLoading:!0,hasError:!1});const o=await Sa(n,void 0,i=>{this.isMounted&&this.onChanged(t,{src:n,size:i,isLoading:!1,hasError:!1})});o.ok||!this.isMounted||this.onChanged(t,{src:n,isLoading:!1,hasError:!!o.error,invalid:!!o.invalid,size:o.size})}}async function Sa(e,t,n){return(t==null?void 0:t.src)===e&&t.naturalWidth&&t.naturalHeight?(n({width:t.naturalWidth,height:t.naturalHeight}),t.complete?{ok:!0}:new Promise(o=>{t.addEventListener("load",()=>o({ok:!0}),{once:!0})})):await new Promise(o=>{const i=new Image,r=setInterval(()=>{const{naturalWidth:s,naturalHeight:l}=i;if(l&&s){const a={width:s,height:l};Qn(s,l)?n(a):o({invalid:!0,size:a}),clearInterval(r)}},20);i.onerror=()=>{o({error:!0}),clearInterval(r)},i.onload=()=>setTimeout(()=>o({ok:!0}),25),i.src=e})}const Vg=3;class Rg{constructor(t){Pe(this,"download");Pe(this,"threads");Pe(this,"completedItems");Pe(this,"promisesMap",new Map);this.download=t.download}dispose(){var t;(t=this.threads)==null||t.dispose(),this.threads=void 0,this.completedItems=void 0}run({activeIndex:t,items:n}){var r;if(this.completedItems===n)return;this.completedItems=void 0,(r=this.threads)==null||r.dispose();let o=Math.max(0,t-1),i=!0;this.threads=new Hg(Vg,()=>{const s=n[o];if(!s){this.completedItems=n;return}i&&o===n.length-1?(i=!1,o=t-2):i?o++:o--;const l=s.src??s.el;if(l){const u=this.promisesMap.get(l);if(u)return u}const a=this.download(s);return l&&this.promisesMap.set(l,a),a}),this.threads.exec()}}class Hg{constructor(t,n){Pe(this,"isDisposed",!1);this.limit=t,this.getNext=n}dispose(){this.isDisposed=!0}exec(){for(let t=0;t<this.limit;t++)this.next()}async next(){if(this.isDisposed)return;const t=this.getNext();t&&(await t,await oo(20),this.next())}}function Fg(e,t){let n=[t??document.documentElement];const o=e.split("->");for(let i=0;i<o.length;i++){const r=o[i];n=n.map(s=>Array.from((s.shadowRoot??s).querySelectorAll(r))).flat()}return n}function io(e,t){if(e instanceof HTMLOptionElement){const n=e.parentElement instanceof HTMLOptGroupElement?e.parentElement.parentElement:e.parentElement;if(!n||!(n instanceof HTMLSelectElement))return;const o=e.getAttribute("value")||"";if(n.value===o)return;n.value=o,n.dispatchEvent(new Event("change"));return}e instanceof HTMLAnchorElement&&(t==null?void 0:t.preventDefault)!==!1&&e.addEventListener("click",n=>n.preventDefault(),{once:!0}),e.click(),e.dispatchEvent(new PointerEvent("pointerdown",{bubbles:!0,cancelable:!0,pointerType:"mouse",button:0})),e.dispatchEvent(new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window,button:0}))}function ka(e,t){const n=document;if(e.startsWith("//")){const i=document.evaluate(e,document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue;return i instanceof HTMLElement?i:void 0}return n.querySelector(e)??void 0}async function Wg(e){const{lstrip:t,lstripBtn:n}=e||{};if(!t||!n||!!ka(t))return!1;const i=n.split(";");for(const r of i)if(!await Ug(r.trim()))return!1;return!0}async function Ug(e){const t=await en(50,30,()=>ka(e));return t?(io(t),await oo(),!0):!1}class qg{constructor({spec:t,onChanged:n}){Pe(this,"spec");Pe(this,"onChanged");Pe(this,"rawImages",[]);Pe(this,"isMounted",!0);Pe(this,"loadRawImagesTs");Pe(this,"imgListenersMap",new Map);Pe(this,"disconnectObservers");Pe(this,"contentEl");Pe(this,"reloadRawImages",gt(()=>{this.contentEl&&this.loadRawImages(this.contentEl)},100));this.spec=t,this.onChanged=n,this.init()}dispose(){var t;this.isMounted=!1,(t=this.disconnectObservers)==null||t.call(this),this.disconnectObservers=void 0,this.onChanged=()=>{}}init(){var i;const t=new MutationObserver(this.reloadRawImages),n=(i=this.spec)!=null&&i.imgDivs?void 0:(()=>{let r=window.innerWidth;return new ResizeObserver(gt(()=>{const s=window.innerWidth;if(s!==r){r=s;return}this.reloadRawImages()},50))})();this.disconnectObservers=async()=>{t.disconnect(),n==null||n.disconnect()};let o=!1;this.loadContentEl(r=>{this.contentEl!==r&&(this.contentEl=r,t.disconnect(),n==null||n.disconnect(),t.observe(this.contentEl,{childList:!0,subtree:!0}),n==null||n.observe(this.contentEl),o?this.reloadRawImages():(o=!0,this.loadRawImages(this.contentEl)))})}setRawImages(t){let n=!1;const o=t.map((i,r)=>{const s=this.rawImages[r];return s&&s.parentEl===i.parentEl&&(s.el===i.el||s.parentEl&&s.el&&!i.el)&&s.src===i.src?s:(n=!0,i)});(n||o.length!==this.rawImages.length)&&(this.rawImages=o,this.onChanged(t))}async loadContentEl(t){var l;const n=await Wg(this.spec),o=(l=this.spec)==null?void 0:l.content;if(!o){t(document.body);return}let i=await en(n?100:1,10,()=>{for(const a of o.split(",")){const u=document.querySelector(a);if(u)return u}});if(!i)return;t(i);let r=0;const s=async()=>{if(this.isMounted&&!(i!=null&&i.isConnected)){if(r=0,i=await en(50,20,()=>{const a=document.querySelector(o);return a!=null&&a.isConnected&&a!==i?a:void 0}),!i)return;t(i)}!this.isMounted||++r>=10||setTimeout(s,200)};setTimeout(s,200)}async loadRawImages(t){var r;if(!this.isMounted||!t.isConnected)return;const n=Date.now();this.loadRawImagesTs=n;const o=(r=this.spec)==null?void 0:r.imgDivs,i=o?await this.loadFromImgDivs(t,o):this.loadFromContentEl(t);this.loadRawImagesTs!==n||!t.isConnected||!this.isMounted||this.setRawImages(i)}async loadFromImgDivs(t,n){const o=Fg(n,t);return o.length?o.map(r=>{const s=Array.from(r.querySelectorAll("img:not(nav img, header img, footer img, aside img),canvas"));for(const l of s){if(!Cn(l)){this.observeInvalidImgEl(l);continue}if(l instanceof HTMLCanvasElement){if(Ca(l))return{el:l,parentEl:r}}else if(l instanceof HTMLImageElement){if(Ta(l))return{el:l,parentEl:r};this.observeInvalidImgEl(l)}}return{parentEl:r}}):this.loadFromContentEl(t)}loadFromContentEl(t){const n=[],o=Array.from(t.querySelectorAll("img:not(nav img, header img, footer img, aside img),canvas")),i=r=>{if(!Cn(r))return!1;if(r instanceof HTMLCanvasElement){if(Ca(r))return n.push({el:r}),!0}else if(Ta(r))return n.push({el:r}),!0;return!1};return o.forEach(r=>{i(r)||this.observeInvalidImgEl(r)}),n}observeInvalidImgEl(t){if(!(t instanceof HTMLImageElement)||this.imgListenersMap.has(t))return;const n=()=>{t.removeEventListener("load",n),this.imgListenersMap.delete(t),this.reloadRawImages()};this.imgListenersMap.set(t,n),t.addEventListener("load",n)}}function Ca(e){return e.isConnected&&Qn(e.width,e.height)}function Ta(e){if(!e.isConnected)return!1;const t=e.getBoundingClientRect();return!t.width&&!e.naturalWidth||!t.height&&!e.naturalHeight||Qn(t.width,t.height)}const ri="mp-scroll-container";class xr{constructor(){Pe(this,"scrollEl")}dispose(){var t;(t=this.scrollEl)==null||t.classList.remove(ri)}scrollTo({rawImages:t,page:n,skipIfVisible:o,isScrollDown:i,isScrollExact:r,fallbackScrollEl:s}){var $;const l=Math.floor(n),a=t[Math.min(t.length-1,l)];if(!a)return;const u=a.el??a.parentEl??(a.src?document.querySelector(`img[src^="${a.src}"]`):void 0);if(!u)return;const c=u.getBoundingClientRect();if(o&&c.top<=0&&c.top+c.height>0)return;const d=xr.getScrollable(u,s);if(!d)return;const{el:f,top:p}=d;s!==document.documentElement&&!f.classList.contains(ri)&&(f!==this.scrollEl&&(($=this.scrollEl)==null||$.classList.remove(ri),this.scrollEl=f),f.classList.add(ri));const y=n>=t.length?c.height:r?n%1*c.height:i?Math.max(0,c.height-window.innerHeight/2):-window.innerHeight/2,b={top:p+y,behavior:"instant"};f.scrollTo(b),f!==document.documentElement&&document.documentElement.scrollTo(b)}static getScrollable(t,n){const o=(i,r)=>{if(!i)return;const{offsetTop:s,offsetParent:l}=i;if(l&&s&&r.set(l,Math.max(r.get(l)??0,s)),!(i===n||i.scrollHeight-i.clientHeight>=10&&window.getComputedStyle(i).overflow!=="visible"))return o(i.parentElement,r);let u=0;return r.forEach((c,d)=>{u+=d===l?c-s:c}),{el:i,top:u}};return o(t,new Map)}}function Ma(e){var t,n;for(let o=0;o<e.length;o++){const i=((t=e[o])==null?void 0:t.el)??((n=e[o])==null?void 0:n.parentEl),r=i==null?void 0:i.getBoundingClientRect();if(!r||r.bottom<=0)continue;const s=r.top;return o+(s>=0?0:-s/r.height)}return 0}function Kg(e){if(document.documentElement.scrollTop<700)return 0;const n=Array.from(document.querySelectorAll("img[src]")).filter(o=>e.includes(o.src)).map(o=>({el:o}));return Ma(n)}function Zg(e){var _,z,A;const t=(_=e.raw.value)==null?void 0:_.isWebtoon,n=te(t===!1),o=te(t);let i=!1;const r=e.touchDevice&&!navigator.userAgent.toLowerCase().includes("android"),s=((A=(z=e.raw.value)==null?void 0:z.imgs)==null?void 0:A.filter(Boolean))??[];let l=e.isAutoShow!==!1?e.page.value:s.length?Kg(s):void 0,a=s.map(T=>({src:T})),u,c;const d=new Map,f=({src:T,el:G})=>{const C=G??T;return C?d.get(C):void 0},p=te(s.map(T=>({src:T,isLoading:!0,hasError:!1}))),y=()=>{const T=[];a.forEach(G=>{const{src:C,el:ee}=G,W=ee??C,S=W?d.get(W):void 0;(W&&!(S!=null&&S.invalid)||G.parentEl)&&T.push(S)}),p.value=T};let b=setTimeout(e.onTimeout,2e4);const $=()=>{b&&(clearTimeout(b),b=void 0)};let M=0,L=0;const D=4,w=new Ng({onChanged(T,G){const C=T.el??T.src;if(!C||(d.set(C,G),y(),G.isLoading))return;if(G.hasError){if(c||o.value!==void 0)return;c=setTimeout(()=>{c=void 0,o.value===void 0&&e.onError("Failed to load images")},3e3);return}const{size:ee,invalid:W}=G;if(!(!ee||W)){if(!o.value&&L<D){const S=i?a:a.filter(({el:ae,src:pe})=>pe||!(ae&&ae instanceof HTMLImageElement&&!d.has(ae)));let x=S.indexOf(T);if(i&&x>4||x===-1&&(T.el&&(x=S.findIndex(ae=>ae.el===T.el)),x===-1))return;const V=x>Math.min(1,S.length-3)&&x<Math.max(S.length-2,3),Z=ee.width/ee.height;Z>2&&M++;const j=Z<.5||M>=D,ge=!j&&.65<Z&&Z<.75;ge&&L++,o.value!==j&&(V||j)&&(o.value=j),V&&n.value!=ge&&(n.value=!0),o.value===void 0&&ge&&L===D&&(o.value=!1)}K()}}}),g=new Rg({download:async T=>{!(T.el&&d.has(T.el))&&!(T.src&&d.has(T.src))&&await w.download(T)}}),E=()=>{g.run({items:a,activeIndex:Math.min(a.length-1,Math.floor(e.page.value))})},U=new xr;if(s.length)E();else{let T=!1;u=new qg({spec:e.spec,async onChanged(G){var C;if(a=G,y(),!e.raw.value&&!G.length){e.onError("no_img");return}(C=e.spec)!=null&&C.imgDivs&&!T&&e.isAutoShow!==!1&&e.page.value&&(T=!0,U.scrollTo({rawImages:G,page:e.page.value,skipIfVisible:!0,fallbackScrollEl:r?document.body:document.documentElement,isScrollDown:!0}),await oo(1)),l===void 0&&e.isAutoShow===!1&&(l=Ma(G)),E()}})}Pi(()=>{w.dispose(),g.dispose(),u==null||u.dispose(),c&&clearTimeout(c),U.dispose(),i&&U.scrollTo({rawImages:a,page:e.page.value,fallbackScrollEl:document.documentElement,isScrollExact:!0})});function K(){if(i||o.value===void 0||l===void 0)return;const T=Math.max(0,Math.min(l,a.length)),G=Math.min(Math.floor(T),a.length-1);if(G>=1){const ee=a[G];if(!ee||!f(ee)){e.isAutoShow&&U.scrollTo({rawImages:a,page:G,fallbackScrollEl:r?document.body:document.documentElement,isScrollDown:!0});return}for(let W=G;W<a.length;W++){const S=f(a[W]);if(!S)return;if(!S.invalid){if(!S.size&&!S.hasError)return;break}}for(let W=G-1;W>=0;W--){const{src:S,el:x}=a[W],V=x??S;if(!V)break;const Z=d.get(V);if(!Z)return;if(!Z.invalid){if(!Z.size&&!Z.hasError)return;break}}}if(i)return;i=!0,$(),e.onReady(T);let C=!0;de(()=>Math.floor(e.page.value),(ee,W)=>{ee===W&&!C||(U.scrollTo({rawImages:a,page:ee,isScrollDown:W===void 0||ee>W||a.length===1,skipIfVisible:C&&a.length>1,fallbackScrollEl:r?document.body:document.documentElement}),C=!1,W??(W=-1),E())},{immediate:!0})}return{asyncImgs:Q(()=>p.value),isWebtoon:Q(()=>o.value??!1),isManga:Q(()=>n.value)}}function Pa({touchDevice:e,isBusy:t,isPlaying:n,isIdle:o,hideControlsEvent:i,scrollEl:r,moveThreshold:s}){const l=te(!0);let a=!1,u=!1;const c={x:0,y:0};let d;Pt(()=>{d==null||d(),d=void 0});function f(M){if(i.value===nn.never||t.value&&l.value)return;const L=typeof M=="boolean"?M:!l.value;L!==l.value&&(l.value=L,!a&&!L&&(a=!0))}function p(){r.value&&(c.x=r.value.scrollLeft,c.y=r.value.scrollTop)}function y(){const M=i.value===nn.firstMove,L=r.value;if(!L)return;const D=Mn(()=>{if(!l.value){Yg(L)&&f(!0);return}if(M&&a)return;const w=Math.abs(L.scrollTop-c.y)||Math.abs(L.scrollLeft-c.x),g=s??(M?c.y===0?300:200:150);w>g&&f(!1)},100);L.addEventListener("scroll",D),d=()=>{L.removeEventListener("scroll",D)}}function b(){switch(d==null||d(),d=void 0,i.value){case nn.onLoad:a||f(!1);break;case nn.firstMove:y();break;case nn.move:y();break;case nn.never:l.value||(l.value=!0);break}}function $(){u||(u=!0,p(),b(),e&&de(Yi(),L=>{L==="hidden"&&!n.value&&!l.value&&f(!0)}),de(t,M=>{M&&!l.value&&f()}),de(n,M=>{M||f(!0)}),de(o,M=>{n.value&&f(!M)}),de(l,M=>{M&&p()}),de(i,()=>b()),de(r,()=>b()))}return{visible:Q(()=>l.value),toggle:f,activate:$}}function Yg(e){const t=Math.max(0,e.scrollTop),n=Math.abs(e.scrollLeft);if(n<10&&t<10)return!0;const{scrollHeight:o,clientHeight:i}=e;if(o>i)return t>o-i-10;const{scrollWidth:s,clientWidth:l}=e;return s>l&&n>s-l-10}function Xg(e,t,n){return Q(()=>t.value?Ea(e.value,n.value):e.value.map((o,i)=>[{img:o,index:i}]))}function Ea(e,t,n=0){if(e.length===0)return[];const o=e.slice(0,2),i=o.some(s=>(s==null?void 0:s.size)&&s.size.width>s.size.height),r=i||t?[o[0]]:o;return[r.map((s,l)=>({img:s,index:n+l})),...Ea(e.slice(r.length),t&&i,n+r.length)]}const _r=40;function Gg({page:e,asyncImgs:t,direction:n,style:o,isLongStrip:i,isVertical:r,isRTL:s,spaceTop:l,scrollEl:a,isWebtoon:u,interferePlayer:c,onChangedPage:d,onFinished:f}){let p=!1,y=!1,b,$=!1,M,L;const D=gt(z,300),w=Mn(()=>{z(),D()},300);function g(){const x=new Promise(V=>{b=()=>{b=void 0,V()}});return K(e.value,{smooth:!1,ensureLastImgVisibility:!0}),x}function E(){var x;y=!0,b==null||b(),A(),(x=a.value)==null||x.addEventListener("scroll",w),setTimeout(()=>{const{width:V,height:Z}=gn();de(()=>`${Z.value}-${V.value}`,U),de(o,U),de(n,U),de(()=>t.value,(j,ge)=>{!ge||j.length===ge.length||s.value&&U()})},300)}function U(){const x=a.value;if(!x)return;const V=Date.now();L=V;const{scrollWidth:Z,scrollHeight:j}=x,ge=e.value,ae=Math.floor(ge),pe=t.value[ae];en(20,10,async()=>{if(L!==V)return!0;if(x.scrollWidth===Z&&x.scrollHeight===j)return;let ve=ge;if(pe){const we=t.value.findIndex(Ae=>Ae===pe||(Ae==null?void 0:Ae.src)===pe.src);we!==-1&&ae!==we&&(ve=we+ge-ae)}return await K(ve),!0})}async function K(x,{smooth:V,ensureLastImgVisibility:Z=!1}={smooth:!1}){return new Promise(j=>{const ge=a.value;if(!ge){j();return}p=!0;const ae=async()=>{await pt(),p=!1,y||E(),j()},pe=Math.floor(x),ve=br(ge,pe);if(!ve){ae();return}c(async()=>{await _(ge,!i.value&&V,async()=>{await S(ge,ve,{smooth:V,page:x,ensureLastImgVisibility:Z})}),await ae()})})}async function _(x,V,Z){V&&x.style.setProperty("scroll-snap-type","none"),await Z(),V&&x.style.removeProperty("scroll-snap-type")}function z(){if(p)return;const x=G();x!==void 0&&x!==e.value&&d(x),A()}function A(){$||!$&&T()&&($=!0,f())}function T(){const x=a.value;if(!x)return!1;const V=!i.value||u.value?3:!r.value&&x.clientWidth>x.clientHeight?2.25:2.5;return r.value?x.scrollHeight-x.scrollTop<x.clientHeight*V:x.scrollWidth-(s.value?-x.scrollLeft:x.scrollLeft)<x.clientWidth*V}function G(){const x=C();return x?(+x.getAttribute("data-index")||0)+(i.value?ee(x):0):void 0}function C(){var V;if(M??(M=a.value.getRootNode()),!M)return;const x=(V=M.elementsFromPoint)==null?void 0:V.call(M,r.value||!i.value?window.innerWidth/2:s.value?window.innerWidth-_r:_r,r.value&&i.value?l.value||_r:window.innerHeight/2);if(x)for(let Z=0;Z<x.length;Z++){const j=x[Z];if(j.hasAttribute("data-index"))return j;if(j===a.value)break}}function ee(x){const V=x.getBoundingClientRect();return r.value?Math.abs(V.top-l.value)/V.height:s.value?Math.max(0,V.right-a.value.clientWidth)/V.width:Math.abs(V.left)/V.width}let W=!1;async function S(x,V,Z){if(W)return;const j=V.getBoundingClientRect();if(!i.value){if(r.value){if(j.top<=0&&j.bottom>=x.clientHeight)return}else if(j.left<=0&&j.right>=x.clientWidth)return}W=!0;const ge=r.value?x.scrollTop:x.scrollLeft,ae=Z.page,pe=i.value?ae%1:0,ve=await en(30,10,async()=>{await oo();let De;if(!(V.offsetHeight<10))return i.value?r.value?De=V.offsetTop+pe*V.offsetHeight-l.value:s.value?De=V.offsetLeft-x.clientWidth+V.offsetWidth-pe*V.offsetWidth:De=V.offsetLeft+pe*V.offsetWidth:r.value?De=V.offsetTop+(j.top>0?0:j.height-x.clientHeight):De=V.offsetLeft+(j.left>0?0:j.width-x.clientWidth),ae>.5&&Math.abs(De)<100?void 0:De})??0,we=Z.ensureLastImgVisibility?r.value?Math.min(ve,x.scrollHeight-x.clientHeight*2):s.value?Math.max(ve,-(x.scrollWidth-x.clientWidth*2)):Math.min(ve,x.scrollWidth-x.clientWidth*2):ve;if(!Z.smooth){r.value?x.scrollTop=we:x.scrollLeft=we,W=!1;return}const Ae=we-ge,at=30;let Je=0;return new Promise(De=>{(function Pn(){const h=Jg(Je,ge,Ae,at);r.value?x.scrollTop=h:x.scrollLeft=h,Je++,Je<=at?requestAnimationFrame(Pn):(De(),W=!1)})()})}return{init:g,goToPage:K}}function Jg(e,t,n,o){return n*(Math.pow(e/o-1,3)+1)+t}class Qg{constructor(t){Pe(this,"player");Pe(this,"debounceStartPlayer");Pe(this,"isPlaying");Pe(this,"isIdle",te(!1));Pe(this,"onIdle");this.player=t.player,this.debounceStartPlayer=gt(()=>this.player.start(),100);const n=te(t.autoPlay||sessionStorage.getItem("mp:playing")==="true");this.isPlaying=Q({get:()=>n.value,set:o=>{n.value=o,sessionStorage.setItem("mp:playing",o?"true":"false")}}),this.onIdle=gt(()=>{this.isIdle.value=!0},t.touchDevice?2e3:1e3),this.awake(),t.touchDevice||_t(window,"mousemove",()=>this.awake()),je(()=>{t.touchDevice||de(Yi(),i=>{this.isPlaying.value&&(i==="visible"?this.player.start():this.player.stop())}),de(t.speed,()=>this.interfere()),de(t.isBusy,o=>{!o&&this.isIdle.value&&this.awake()})}),Pt(()=>this.stop())}activate(){this.isPlaying.value&&this.player.start()}toggle(){this.isPlaying.value?this.stop():this.start()}async interfere(t){this.isPlaying.value&&this.player.stop(),t&&(await pt(),await t()),this.isPlaying.value&&this.debounceStartPlayer()}stop(){this.isPlaying.value&&(this.isPlaying.value=!1,this.player.stop(),this.awake())}start(){this.isPlaying.value||(this.isPlaying.value=!0,this.player.start(),this.awake())}pause(){this.player.stop()}resume(){this.player.start()}awake(){setTimeout(()=>{this.isIdle.value=!1,this.onIdle()},30)}}class Ia extends Qg{getMaxOffset(t){return t.scrollHeight-t.clientHeight}getScrollOffset(t){return t.scrollTop}setScrollOffset(t,n){t.scrollTop+=n}constructor(t){let n,o;const{scrollEl:i,speed:r}=t;super({...t,player:{stop:()=>o==null?void 0:o(),start:()=>{const s=i.value;if(!this.isPlaying.value||!s)return;const l=this.getMaxOffset(s),a=this.getScrollOffset(s);if(l<=a){this.stop();return}o=()=>{n=Date.now(),o=void 0};const u=Date.now();n=u;const c=.1*r.value;let d=Date.now(),f=0;const p=()=>{if(n!==u)return;const y=Date.now(),b=y-d;d=y;const $=c*b+f;$>=1?(f=$%1,this.setScrollOffset(s,$-f)):f=$,setTimeout(p,1)};p()}}})}}class em extends Ia{constructor(n){super(n);Pe(this,"isLongStrip");Pe(this,"isVertical");Pe(this,"isRTL");const{isLongStrip:o,isVertical:i,isRTL:r}=n;this.isLongStrip=o,this.isVertical=i,this.isRTL=r,o!==void 0&&je(()=>{de(o,s=>{s||stop()})})}getMaxOffset(n){return this.isVertical.value?n.scrollHeight-n.clientHeight:n.scrollWidth-n.clientWidth}getScrollOffset(n){return this.isVertical.value?n.scrollTop:this.isRTL.value?-n.scrollLeft:n.scrollLeft}setScrollOffset(n,o){n[this.isVertical.value?"scrollTop":"scrollLeft"]+=o*(this.isRTL.value?-1:1)}start(){var n;((n=this.isLongStrip)==null?void 0:n.value)!==!1&&super.start()}}function tm(e){return new em(e)}function nm({speed:e,fontSize:t,lineHeight:n,...o}){const i=gn().width;return new Ia({...o,speed:Q(()=>{const r=900/Math.min(900,i.value)/3.5,s=t.value/48*1.75,l=n.value/96*1.75,a=r*s*l;return e.value*a})})}const om={key:3,class:"fixed inline-block left-1/2 -translate-x-1/2 bottom-0 p-2 sm:p-3 pb-6 md:pb-5 lg:pb-3"},Oa=he({inheritAttrs:!1,__name:"GearSecond",props:{chapterNavData:{type:Object},busy:{type:Boolean},defaultPreferences:{type:Object},immediate:{type:Boolean},appVersion:{type:String},raw:{type:Object},spec:{type:Object},siteMeta:{type:null},page:{type:Number},spaceTop:{type:Number},touchDevice:{type:Boolean},entryId:{type:String},isAutoShow:{type:Boolean},tourEnabled:{type:Boolean},offlineMode:{type:Boolean}},emits:["clickEntryButton","hideReader","openHelpScreen","error","crash","ready","pageChanged","playingChanged","dispose","openEntry","addEntry","finished","getHiddenChapters","hapticFeedback","pressedBack","selectChapter","timeout","openDefaultPreferences","defaultPreferencesChanged","controlsVisibilityChanged"],setup(e,{emit:t}){var R,F;const n=e,o=t,i=te(!1),r=te(!1),s=Q(()=>n.busy),l=Q(()=>n.page),a=Q(()=>n.immediate||i.value?n.spaceTop??0:0),u=Q(()=>!n.touchDevice&&C.isIdle.value&&!n.busy&&!E.value),{asyncImgs:c,isWebtoon:d}=Zg({raw:Q(()=>n.raw),spec:n.spec,page:l,touchDevice:n.touchDevice,isAutoShow:n.isAutoShow,async onReady(I){ae(I),i.value=!0},onError:()=>o("error"),onTimeout:()=>o("timeout")}),{direction:f,style:p,isRTL:y,isDouble:b,isVertical:$,isLongStrip:M,gap:L,speed:D,zoom:w,breakFirst:g}=xh({touchDevice:n.touchDevice,isWebtoon:d,titleName:(R=n.raw)==null?void 0:R.title.name,defaultPreferences:Q(()=>n.defaultPreferences)}),E=te(!1),U=Xg(c,b,g),K=Q(()=>c.value.length),_=Q(()=>l.value>=K.value),z=te(null),A=te(null),T=Q(()=>{var I;return(I=A.value)==null?void 0:I.rootEl}),G=te(!1),C=tm({autoPlay:!n.tourEnabled&&(((F=n.defaultPreferences)==null?void 0:F.autoPlay)??!1),touchDevice:n.touchDevice,scrollEl:T,speed:D,isRTL:y,isVertical:$,isLongStrip:M,isBusy:s}),ee=Q({get(){return w.value},set(I){C.interfere(()=>{w.value=I})}}),W=Pa({touchDevice:n.touchDevice,isBusy:s,isPlaying:Q(()=>C.isPlaying.value),isIdle:Q(()=>C.isIdle.value),hideControlsEvent:Q(()=>n.defaultPreferences.hideControlsEvent),scrollEl:T}),S=W.visible,x=Gg({page:l,asyncImgs:c,style:p,direction:f,isLongStrip:M,isVertical:$,isRTL:y,spaceTop:a,isWebtoon:d,scrollEl:Q(()=>{var I;return(I=A.value)==null?void 0:I.rootEl}),interferePlayer:I=>C.interfere(I),onChangedPage:ae,onFinished:()=>o("finished")}),V=Q(()=>Math.floor(l.value)),Z=Q(()=>M.value?l.value:b.value?Pn():Math.floor(l.value)),j=()=>C.interfere(()=>oo(100));$t({onKeyDown:I=>{if(n.tourEnabled)return!0;const k=M.value&&$.value,H=M.value&&!$.value,B=!M.value&&$.value,se=!M.value&&!$.value;switch(I.key){case" ":I.preventDefault(),M.value||h();break;case"ArrowUp":case"PageUp":k?j():B&&V.value!==0&&(I.preventDefault(),Je());break;case"ArrowDown":case"PageDown":k?j():B&&!_.value&&(I.preventDefault(),De());break;case"ArrowLeft":H?j():se?(I.preventDefault(),Ae()):$.value&&we();break;case"ArrowRight":H?j():se?(I.preventDefault(),at()):$.value&&ve();break}},onKeyUp:I=>{switch(I.key){case"b":g.value=!g.value;break}}}),de(C.isPlaying,I=>{o("playingChanged",I)}),de(S,I=>{o("controlsVisibilityChanged",I)});async function ge(){await x.init(),o("ready"),r.value=!0,W.activate(),C.activate()}function ae(I){if(l.value===I)return;const k=c.value.length;if(I<0||I>=k+1)return;const H=l.value;if(o("pageChanged",I),I<.01&&H>I){C.awake();return}}function pe(){!n.touchDevice&&!M.value&&x.goToPage(V.value,{smooth:!0})}function ve(I=!1){var k,H;(H=(k=n.chapterNavData)==null?void 0:k.next)==null||H.call(k,I)}function we(I=!1){var k,H;(H=(k=n.chapterNavData)==null?void 0:k.prev)==null||H.call(k,I)}function Ae(){y.value?De():Je()}function at(){y.value?Je():De()}function Je(){var H;const I=U.value,k=_.value?I[I.length-1][0].index:(H=I[Pn()-1])==null?void 0:H[0].index;k!==void 0?x.goToPage(k):we()}function De(){var I,k;if(_.value)ve();else{const H=((k=(I=U.value[Pn()+1])==null?void 0:I[0])==null?void 0:k.index)??c.value.length;x.goToPage(H)}}function Pn(){const I=V.value,k=U.value.findIndex(H=>H.some(({index:B})=>B===I));return k===-1?U.value.length-1:k}function h(I){W.toggle(I)}function m(){if(C.isPlaying.value){S.value||!n.touchDevice?C.stop():(C.awake(),W.toggle(!0));return}W.toggle()}function P(){C.stop(),o("clickEntryButton")}function q(){W.toggle(!1),C.isPlaying.value&&C.stop(),o("openHelpScreen")}return(I,k)=>e.immediate||i.value?(v(),ie(hr,{key:0,ref_key:"gearLayout",ref:z,loading:!r.value,immediate:!!e.immediate,"hide-cursor":u.value,class:"text-stone-100",onClick:k[21]||(k[21]=Be(()=>{},["stop"]))},{default:oe(()=>{var H,B,se,ne;return[i.value?(v(),ie(ga,{key:0,ref_key:"body",ref:A,zoom:ee.value,"onUpdate:zoom":k[1]||(k[1]=J=>ee.value=J),zooming:E.value,"onUpdate:zooming":k[2]||(k[2]=J=>E.value=J),page:l.value,"page-index":V.value,pages:X(U),"total-imgs":X(c).length,direction:X(f),gap:X(L),"is-long-strip":X(M),isRTL:X(y),"is-double":X(b),"is-vertical":X($),"space-top":a.value||0,busy:s.value,"play-controller":X(C),"touch-device":e.touchDevice,"pinch-to-zoome":((H=e.defaultPreferences)==null?void 0:H.pinchToZoom)??!0,"tap-zone":(B=e.defaultPreferences)==null?void 0:B.tapZone,"controls-visible":X(S),onReady:ge,onPrev:Je,onNext:De,onClick:m,onDragEnd:pe,onWheelPassive:k[3]||(k[3]=()=>X(C).interfere())},Ei({_:2},[i.value&&X(c).length?{name:"end",fn:oe(()=>{var J,ce;return[N(Ji,{"has-next":!!((J=e.chapterNavData)!=null&&J.next),"offline-mode":!!e.offlineMode,seconds:((ce=e.defaultPreferences)==null?void 0:ce.autoNextSeconds)??5,"show-add-button":X(w)===1&&!e.entryId&&!!e.raw&&!e.offlineMode,onNext:ve,onAddToLibrary:P,onHide:k[0]||(k[0]=()=>o("hideReader"))},null,8,["has-next","offline-mode","seconds","show-add-button"])]}),key:"0"}:void 0]),1032,["zoom","zooming","page","page-index","pages","total-imgs","direction","gap","is-long-strip","isRTL","is-double","is-vertical","space-top","busy","play-controller","touch-device","pinch-to-zoome","tap-zone","controls-visible"])):le("",!0),N(yr,{modelValue:G.value,"onUpdate:modelValue":k[10]||(k[10]=J=>G.value=J),"enable-help":"",name:(se=e.raw)==null?void 0:se.title.name,"space-top":a.value,"enable-default-preferences":!e.touchDevice||!!e.appVersion,onHelp:q,onMore:k[11]||(k[11]=()=>o("openDefaultPreferences"))},{"tab-preferences":oe(()=>[N(fa,{"enable-reset":!e.touchDevice||!!e.appVersion,webtoon:X(d),"reader-style":X(p),"onUpdate:readerStyle":k[4]||(k[4]=J=>ze(p)?p.value=J:null),direction:X(f),"onUpdate:direction":k[5]||(k[5]=J=>ze(f)?f.value=J:null),gap:X(L),"onUpdate:gap":k[6]||(k[6]=J=>ze(L)?L.value=J:null),speed:X(D),"onUpdate:speed":k[7]||(k[7]=J=>ze(D)?D.value=J:null),zoom:ee.value,"onUpdate:zoom":k[8]||(k[8]=J=>ee.value=J),"default-preferences":e.defaultPreferences},null,8,["enable-reset","webtoon","reader-style","direction","gap","speed","zoom","default-preferences"])]),"tab-default":oe(()=>[N(fr,{"model-value":e.defaultPreferences,"onUpdate:modelValue":k[9]||(k[9]=J=>o("defaultPreferencesChanged",J))},null,8,["model-value"])]),_:1},8,["modelValue","name","space-top","enable-default-preferences"]),r.value&&!_.value&&!e.tourEnabled?(v(),ie(aa,{key:1,direction:X(f),"tap-zone":(ne=e.defaultPreferences)==null?void 0:ne.tapZone},null,8,["direction","tap-zone"])):le("",!0),r.value&&!_.value?(v(),ie(gr,{key:2,playing:X(C).isPlaying.value},null,8,["playing"])):le("",!0),N(ca,{visible:X(S),"space-top":a.value},Ei({top:oe(()=>{var J;return[e.raw||e.offlineMode?(v(),ie(Qi,{key:0,"offline-mode":e.offlineMode,raw:e.raw,onClick:k[12]||(k[12]=()=>o("pressedBack"))},null,8,["offline-mode","raw"])):le("",!0),!e.touchDevice&&!e.offlineMode?(v(),ie(Go,{key:1,onClick:k[13]||(k[13]=()=>o("hideReader"))})):le("",!0),e.chapterNavData?(v(),ie(lr,{key:2,"touch-device":e.touchDevice,"chapter-spec":(J=e.spec)==null?void 0:J.chapter,data:e.chapterNavData,rtl:X(y),onGetHiddenChapters:k[14]||(k[14]=()=>o("getHiddenChapters")),onPrev:we,onNext:ve,onDialogOpened:k[15]||(k[15]=()=>X(W).toggle(!1))},null,8,["touch-device","chapter-spec","data","rtl"])):le("",!0)]}),"bottom-right":oe(()=>[!e.offlineMode&&e.raw?(v(),ie(er,{key:0,"entry-id":e.entryId,onClick:P},null,8,["entry-id"])):le("",!0),N(ir,{disabled:!i.value,onClick:k[16]||(k[16]=()=>G.value=!0)},null,8,["disabled"]),e.touchDevice?le("",!0):(v(),ie(rr,{key:1,onRequestFullScreen:k[17]||(k[17]=()=>{var J,ce;return(ce=(J=z.value)==null?void 0:J.rootEl)==null?void 0:ce.requestFullscreen()})})),X(M)?(v(),ie(or,{key:2,"tour-message":"Press here to play like a video",playing:X(C).isPlaying.value,disabled:!r.value,onClick:k[18]||(k[18]=()=>X(C).toggle())},null,8,["playing","disabled"])):le("",!0),X(b)?(v(),ie(Ge,{key:3,title:"Break 1st page (B)","data-tour":"Press here to separate the first page from double-page mode",disabled:!r.value,onClick:k[19]||(k[19]=()=>g.value=!X(g))},{default:oe(()=>[X(g)?(v(),ie(da,{key:0})):(v(),ie(ua,{key:1}))]),_:1},8,["disabled"])):le("",!0)]),progress:oe(()=>{var J,ce;return[((J=e.defaultPreferences)==null?void 0:J.progressSize)!==0&&!_.value?(v(),ie(mr,{key:0,value:Z.value,total:X(U).length,"long-strip":X(M),height:((ce=e.defaultPreferences)==null?void 0:ce.progressSize)??2,rtl:X(y)},null,8,["value","total","long-strip","height","rtl"])):le("",!0)]}),default:oe(()=>[e.appVersion&&a.value&&!e.offlineMode?(v(),O("div",{key:0,class:"fixed top-0 left-0 right-0 bg-black bg-opacity-70 pointer-events-auto",style:Ce({height:`${a.value}px`})},null,4)):le("",!0)]),_:2},[X(U).length?{name:"bottom-left",fn:oe(()=>[N(pa,{"model-value":V.value,disabled:!r.value,pages:X(U),"total-imgs":X(c).length,"onUpdate:modelValue":X(x).goToPage},null,8,["model-value","disabled","pages","total-imgs","onUpdate:modelValue"])]),key:"0"}:void 0]),1032,["visible","space-top"]),X(S)||E.value?(v(),O("div",om,[N(Gn,{"enter-from-class":"opacity-0","leave-to-class":"opacity-0"},{default:oe(()=>[E.value||X(w)!==1?(v(),ie(ql,{key:0,zoom:ee.value,onClick:k[20]||(k[20]=Be(()=>ee.value=1,["stop"])),class:"duration-200"},null,8,["zoom"])):le("",!0)]),_:1})])):le("",!0),Se(I.$slots,"default")]}),_:3},8,["loading","immediate","hide-cursor"])):le("",!0)}}),im=Object.freeze(Object.defineProperty({__proto__:null,default:Oa},Symbol.toStringTag,{value:"Module"}));function rm({sel:e,heading:t,paraSel:n}){const o=["H1","H2","H3","H4","H5","H6","P","BLOCKQUOTE","PRE","CODE"],i=["BR","HR"],r=["BUTTON","FIGURE","IMG","SCRIPT","SELECT","INPUT","FORM","IFRAME","NAV","FOOTER","ASIDE","TABLE"],s=sm(e),l=lm(s),a=u(s);if(!a)return;return{el:a,isRTL:l};function u(f){var w;let p=0,y=!1,b=0,$=0,M=!1;const L=(w=D(f,o.includes(f.tagName)||!!n&&f.matches(n)))==null?void 0:w.node;if(!L)return;if(t){const g=document.createElement("h1");g.innerText=t,L.prepend(g)}return d(L),c(L),L;function D(g,E=!1){var S;if(M)return;if(g.nodeType===Node.TEXT_NODE)return E&&((S=g.textContent)!=null&&S.trim())?{node:g.cloneNode()}:void 0;if(g.nodeType!==Node.ELEMENT_NODE)return;const K=g.tagName;if(r.includes(K)||K==="A"&&(y||!E))return;if(i.includes(K))return E?{node:document.createElement(K),isEmpty:!0}:{aborted:!0};if(g.getAttribute("aria-hidden")==="true"||!Cn(g)||window.getComputedStyle(g).position==="fixed")return;const z=!!n&&g.matches(n),A=z||o.includes(K),T=E||A,G=[];if(Array.from(g.childNodes).forEach(x=>{if(M)return;const V=D(x,T);if(V!=null&&V.aborted)return;const Z=V==null?void 0:V.node;if(Z){if($=V!=null&&V.isEmpty?$+1:0,$>2)return;G.push(Z),y?b=0:++p>30&&(y=!0)}else y&&++b>30&&(M=!0)}),!G.length)return A?{node:document.createElement("br"),isEmpty:!0}:void 0;const ee=document.createElement(z?"p":K==="BODY"?"div":K==="a"?"span":K),W=g.getAttribute("dir");return W&&W!=="auto"&&ee.setAttribute("dir",W),G.forEach(x=>ee.appendChild(x)),{node:ee}}}function c(f){za(f,p=>{if(p===f)return;const y=p.tagName;if(i.includes(y)||o.includes(y))return;const b=p.parentElement;if((b==null?void 0:b.childNodes.length)===1){Array.from(p.childNodes).forEach(L=>{b.appendChild(L)}),b.removeChild(p);return}p.childNodes.length===1&&p.replaceWith(p.childNodes[0])})}function d(f){let p=!1;const y=[];Sr(f,b=>o.includes(b.tagName)?[]:Array.from(b.children),b=>{const $=b.textContent.trim();if(!$)return!0;if(p)return!1;if(p=!$a(b),y.includes($))return!0;if(p)return!1;y.push($)}),Sr(f,b=>o.includes(b.tagName)?[]:Array.from(b.children).reverse(),b=>!b.textContent.trim()||$a(b))}}function $a(e){const t=e.nodeName;return t.length===2&&t.startsWith("H")}function sm(e){const t=(e??"main,article").split(",").filter(Boolean);for(const o of t){const i=document.querySelector(o);if(i)return i}const n=document.querySelector("p:has(+ p), h1, h2");if(n){let o=n;for(;o!==document.body;)o=o.parentElement;return o}return document.body}function lm(e){if(e.getAttribute("dir")==="rtl")return!0;const t=e.querySelector("p")||e.querySelector("div:not(:empty)")||e;return t.getAttribute("dir")==="rtl"?!0:window.getComputedStyle(t).direction==="rtl"}function za(e,t){Array.from(e.children).forEach(o=>{za(o,t)}),t(e)}function Sr(e,t,n){const o=t(e);let i=!1;for(let r=0;r<o.length;r++){const s=o[r],l=Sr(s,t,n);if(l!==void 0){if(!l)return!1;am(s)}else i=!0}if(!i)return n(e)}function am(e){var t;(t=e.parentNode)==null||t.removeChild(e)}const cm={key:1,class:"h-14 sm:h-16 px-2 2xs:px-3 flex gap-1 2xs:gap-3 items-center"},um={class:"md:fixed left-0 right-0 bottom-0"},dm={class:"p-2 2xs:px-3 sm:py-3 pb-6 md:pb-5 lg:pb-3 flex md:flex-col gap-4 justify-between items-center"},Da=he({__name:"GearThirdControlsLayout",props:{visible:{type:Boolean},hideTopControls:{type:Boolean},spaceTop:{type:null}},setup(e){return(t,n)=>(v(),O(ye,null,[Y("div",{class:ue(["fixed left-0 right-0 top-0 bg-inherit z-30",{"opacity-0 pointer-events-none":!e.visible}])},[e.spaceTop?(v(),O("div",{key:0,style:Ce({height:`${e.spaceTop}px`})},null,4)):le("",!0),e.hideTopControls?le("",!0):(v(),O("div",cm,[Se(t.$slots,"top-controls")]))],2),Y("div",{class:ue(["fixed left-0 right-0 bottom-0 md:left-auto z-30 bg-inherit md:bg-transparent",{"opacity-0 pointer-events-none":!e.visible}])},[Y("div",um,[Se(t.$slots,"progress")]),Y("div",dm,[Se(t.$slots,"bottom-controls")])],2),Se(t.$slots,"default")],64))}}),fm=Object.freeze(Object.defineProperty({__proto__:null,default:Da},Symbol.toStringTag,{value:"Module"})),pm={},hm={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function gm(e,t){return v(),O("svg",hm,[...t[0]||(t[0]=[Y("path",{fill:"currentColor",d:"M16 13q-.425 0-.712-.288T15 12t.288-.712T16 11h6q.425 0 .713.288T23 12t-.288.713T22 13zM4.675 15.425l-1.025 2.85q-.125.35-.4.538T2.625 19q-.575 0-.913-.487t-.137-1.038l4.4-11.725Q6.1 5.4 6.4 5.2t.65-.2h.9q.375 0 .663.2t.412.55L13.45 17.5q.2.55-.137 1.025T12.4 19q-.35 0-.65-.2t-.425-.55l-1-2.825zM5.4 13.4h4.2L7.55 7.6h-.1z"},null,-1)])])}const Aa=be(pm,[["render",gm]]),mm=Object.freeze(Object.defineProperty({__proto__:null,default:Aa},Symbol.toStringTag,{value:"Module"})),vm={},bm={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function ym(e,t){return v(),O("svg",bm,[...t[0]||(t[0]=[Y("path",{fill:"currentColor",d:"m4.675 15.425l-1.025 2.85q-.125.35-.4.538T2.625 19q-.575 0-.913-.487t-.137-1.038l4.4-11.725Q6.1 5.4 6.4 5.2t.65-.2h.9q.375 0 .663.2t.412.55L13.45 17.5q.2.55-.137 1.025T12.4 19q-.35 0-.65-.2t-.425-.55l-1-2.825zM5.4 13.4h4.2L7.55 7.6h-.1zM18 13h-2q-.425 0-.712-.288T15 12t.288-.712T16 11h2V9q0-.425.288-.712T19 8t.713.288T20 9v2h2q.425 0 .713.288T23 12t-.288.713T22 13h-2v2q0 .425-.288.713T19 16t-.712-.288T18 15z"},null,-1)])])}const La=be(vm,[["render",ym]]),wm=Object.freeze(Object.defineProperty({__proto__:null,default:La},Symbol.toStringTag,{value:"Module"})),ja=be(he({__name:"NovelBody",props:{hideTopControls:{type:Boolean},progress:{type:Number},touchDevice:{type:Boolean},busy:{type:Boolean},spaceTop:{type:null},content:{type:null},rtl:{type:Boolean},titlePreferences:{type:Object},defaultPreferences:{type:Object}},emits:["ready","click","progressChanged","finished"],setup(e,{expose:t,emit:n}){const o=e,i=n,r=te(!1),s=te(),l=te(),a=Mn(()=>{const c=s.value;if(!c)return;const{clientHeight:d,scrollHeight:f,scrollTop:p}=c,y=Math.max(p,f-2*d);if(y<=0)i("progressChanged",1);else{const b=p/y;i("progressChanged",Math.max(0,Math.min(1,b)))}},30);t({scrollEl:s}),$t({onKeyDown(){var c;o.busy||(c=s.value)==null||c.focus()}}),je(()=>{de(()=>o.content,d=>{const f=l.value;f&&(Array.from(f.children).forEach(p=>{f.removeChild(p)}),f.appendChild(d),setTimeout(()=>{if(s.value){const{progress:y}=o;y&&u(y)}r.value=!0,i("ready")}))},{immediate:!0});const c=gn();de(()=>{const{fontFamily:d,fontSize:f,lineHeight:p}=o.titlePreferences;return`${d}-${f}-${p}-${c.width.value}`},async()=>{const d=o.progress;await pt(),u(d)})});function u(c){const d=s.value;d&&(d.scrollTop=c*(d.scrollHeight-2*d.clientHeight))}return(c,d)=>(v(),O("div",{ref_key:"scrollContainer",ref:s,tabindex:"0",class:ue(["novel-body",{"scrollbar-sm":!e.touchDevice,"scrollbar-none":e.touchDevice,"opacity-0":!r.value,"pt-16 sm:pt-18 md:pt-20":!e.hideTopControls,"pt-5 sm:pt-9 md:pt-12":e.hideTopControls}]),style:Ce({fontFamily:e.titlePreferences.fontFamily,"--font-size":`${e.titlePreferences.fontSize}px`,"--line-height":`${e.titlePreferences.lineHeight}px`,"--space-top":e.spaceTop?`${e.spaceTop}px`:void 0}),onClick:d[0]||(d[0]=()=>i("click")),onScroll:d[1]||(d[1]=(...f)=>X(a)&&X(a)(...f))},[Y("div",Sn({ref_key:"contentContainer",ref:l,class:"novel-body__content"},e.rtl?{dir:"rtl"}:{}),null,16),Se(c.$slots,"end")],38))}}),[["styles",['.novel-body{top:0;right:0;bottom:0;left:0;overflow-wrap:break-word;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;padding-left:32px;padding-right:32px;position:fixed}.novel-body:focus{outline:2px solid transparent;outline-offset:2px}@media (min-width:640px){.novel-body{padding-left:48px;padding-right:48px}}@media (min-width:768px){.novel-body{padding-left:56px;padding-right:56px}}@media (min-width:1024px){.novel-body{padding-left:64px;padding-right:64px}}@media (min-width:1280px){.novel-body{padding-left:80px;padding-right:80px}}.novel-body{font-size:var(--font-size);letter-spacing:.01em;line-height:var(--line-height)}.novel-body:before{content:"";display:block;height:var(--space-top,0)}.novel-body__content{margin-left:auto;margin-right:auto;max-width:768px;min-height:100%}.novel-body hr{--tw-border-opacity:1;border-color:rgb(87 83 78/var(--tw-border-opacity,1));margin:calc(var(--line-height)*.5) 0}.novel-body h1,.novel-body h2,.novel-body h3,.novel-body h4,.novel-body h5,.novel-body h6{font-weight:500}.novel-body h1{font-size:calc(var(--font-size)*1.5);line-height:calc(var(--font-size)*.5 + var(--line-height))}.novel-body h2{font-size:calc(var(--font-size)*1.25);line-height:calc(var(--font-size)*.25 + var(--line-height))}.novel-body h3{font-size:calc(var(--font-size)*1.125);line-height:calc(var(--font-size)*.125 + var(--line-height))}.novel-body h5,.novel-body h6,.novel-body p{font-size:inherit;line-height:inherit}.novel-body blockquote,.novel-body figure,.novel-body h1,.novel-body h2,.novel-body h3,.novel-body h4,.novel-body h5,.novel-body h6,.novel-body img,.novel-body ol,.novel-body p,.novel-body ul{margin-bottom:calc(var(--line-height)*.5)}.novel-body pre{background-color:transparent;border-style:none;display:block;font-family:inherit;margin:0;padding:0;white-space:normal}']]]),xm=Object.freeze(Object.defineProperty({__proto__:null,default:ja},Symbol.toStringTag,{value:"Module"})),Ba=he({inheritAttrs:!1,__name:"GearThird",props:{chapterNavData:{type:Object},busy:{type:Boolean},defaultPreferences:{type:Object},immediate:{type:Boolean},appVersion:{type:String},raw:{type:Object},spec:{type:Object},siteMeta:{type:null},page:{type:Number},spaceTop:{type:Number},touchDevice:{type:Boolean},entryId:{type:String},isAutoShow:{type:Boolean},tourEnabled:{type:Boolean},offlineMode:{type:Boolean}},emits:["clickEntryButton","hideReader","openHelpScreen","error","crash","ready","pageChanged","playingChanged","dispose","openEntry","addEntry","finished","getHiddenChapters","hapticFeedback","pressedBack","selectChapter","timeout","openDefaultPreferences","defaultPreferencesChanged","controlsVisibilityChanged"],setup(e,{emit:t}){var G,C,ee,W,S,x,V;const n=e,o=t,i=te(null),r=((G=n.raw)==null?void 0:G.novel)??rm({sel:(C=n.spec)==null?void 0:C.content,heading:(ee=n.raw)==null?void 0:ee.name,paraSel:(W=n.spec)==null?void 0:W.para});r===void 0&&o("error");const s=te(r==null?void 0:r.el),l=te(!!(r!=null&&r.isRTL)),a=te(!1),u=te(!1),c=Q(()=>n.page),d=Q(()=>n.busy),f=te(null),p=Q(()=>{var Z;return(Z=f.value)==null?void 0:Z.scrollEl}),y=(x=(S=n.raw)==null?void 0:S.title)==null?void 0:x.name,b=y?ra(y):location.hostname,$=tf(`mpr:${b}`,{}),M=Q({get(){var ae,pe;const Z=n.defaultPreferences,j=((ae=$.value)==null?void 0:ae.fontSize)??Z.fontSize,ge=Math.max(j,((pe=$.value)==null?void 0:pe.lineHeight)??Z.lineHeight);return{fontFamily:Z.fontFamily,speed:Z.speed,...$.value,contrast:Z.contrast,fontSize:j,lineHeight:ge}},set(Z){const j={...Z},ge=n.defaultPreferences;Object.keys(j).forEach(ae=>{j[ae]===ge[ae]&&delete j[ae]}),$.value=j}}),L=nm({isBusy:d,speed:Q(()=>M.value.speed),fontSize:Q(()=>M.value.fontSize),lineHeight:Q(()=>M.value.lineHeight),autoPlay:!!((V=n.defaultPreferences)!=null&&V.autoPlay),touchDevice:n.touchDevice,scrollEl:p}),D=Q(()=>!n.touchDevice&&L.isIdle.value&&!d.value),w=Pa({touchDevice:n.touchDevice,moveThreshold:50,isBusy:d,isPlaying:Q(()=>L.isPlaying.value),isIdle:Q(()=>L.isIdle.value),hideControlsEvent:Q(()=>n.defaultPreferences.hideControlsEvent),scrollEl:p}),g=w.visible;de(L.isPlaying,Z=>{o("playingChanged",Z)}),de(g,Z=>{o("controlsVisibilityChanged",Z)}),E(document.documentElement),E(document.body);function E(Z){const j=Z.style.getPropertyValue("overflow");j!=="hidden"&&(Z.style.setProperty("overflow","hidden","important"),Pt(()=>{j?Z.style.setProperty("overflow",j):Z.style.removeProperty("overflow")}))}function U(){o("ready"),w.activate(),L.activate()}function K(){L.stop(),o("clickEntryButton")}function _(Z){u.value=Z}function z(){if(L.isPlaying.value){g.value||!n.touchDevice?L.stop():(L.awake(),w.toggle(!0));return}w.toggle()}function A(Z){Z!==n.page&&(o("pageChanged",Math.min(1,Z)),Z>=1&&o("finished"))}function T(Z){const j=M.value.fontSize+Z;j>48||j<10||(M.value={...M.value,fontSize:j,lineHeight:Math.max(10,Math.min(96,Math.round(M.value.lineHeight/M.value.fontSize*j)))})}return(Z,j)=>s.value?(v(),ie(hr,{key:0,ref_key:"gearLayout",ref:i,immediate:"","hide-cursor":D.value,class:"bg-stone-900",style:Ce({color:`rgba(255, 255, 255, ${e.defaultPreferences.contrast})`})},{default:oe(()=>{var ge;return[N(ja,{ref_key:"body",ref:f,progress:c.value,"touch-device":e.touchDevice,busy:d.value,"space-top":e.spaceTop,content:s.value,rtl:l.value,"title-preferences":M.value,"default-preferences":e.defaultPreferences,"hide-top-controls":!e.raw,onClick:z,onProgressChanged:A,onReady:U},{end:oe(()=>{var ae,pe;return[N(Ji,{"has-next":!!((ae=e.chapterNavData)!=null&&ae.next),"offline-mode":!!e.offlineMode,seconds:((pe=e.defaultPreferences)==null?void 0:pe.autoNextSeconds)??5,onNext:j[0]||(j[0]=()=>{var ve,we;return(we=(ve=e.chapterNavData)==null?void 0:ve.next)==null?void 0:we.call(ve,!1)}),onVisibilityChanged:_,onHide:j[1]||(j[1]=()=>o("hideReader")),onFinished:j[2]||(j[2]=()=>o("finished"))},null,8,["has-next","offline-mode","seconds"])]}),_:1},8,["progress","touch-device","busy","space-top","content","rtl","title-preferences","default-preferences","hide-top-controls"]),!e.touchDevice&&!e.raw&&!e.offlineMode?Re((v(),ie(Go,{key:0,class:"hidden md:inline-block fixed left-3 top-2",transparent:"",onClick:j[3]||(j[3]=()=>o("hideReader"))},null,512)),[[nd,X(g)]]):le("",!0),N(Da,{visible:X(g),"hide-top-controls":!e.raw,"space-top":e.spaceTop},{"top-controls":oe(()=>{var ae;return[e.raw||e.offlineMode?(v(),ie(Qi,{key:0,"offline-mode":e.offlineMode,raw:e.raw,transparent:"",onClick:j[4]||(j[4]=()=>o("pressedBack"))},null,8,["offline-mode","raw"])):le("",!0),e.raw&&!e.touchDevice&&!e.offlineMode?(v(),ie(Go,{key:1,transparent:"",onClick:j[5]||(j[5]=()=>o("hideReader"))})):le("",!0),e.chapterNavData?(v(),ie(lr,{key:2,transparent:"","touch-device":e.touchDevice,"chapter-spec":(ae=e.spec)==null?void 0:ae.chapter,data:e.chapterNavData,rtl:l.value,onGetHiddenChapters:j[6]||(j[6]=()=>o("getHiddenChapters")),onPrev:j[7]||(j[7]=pe=>{var ve,we;return(we=(ve=e.chapterNavData)==null?void 0:ve.prev)==null?void 0:we.call(ve,pe)}),onNext:j[8]||(j[8]=pe=>{var ve,we;return(we=(ve=e.chapterNavData)==null?void 0:ve.next)==null?void 0:we.call(ve,pe)}),onDialogOpened:j[9]||(j[9]=()=>X(w).toggle(!1))},null,8,["touch-device","chapter-spec","data","rtl"])):le("",!0)]}),"bottom-controls":oe(()=>[!e.offlineMode&&e.raw?(v(),ie(er,{key:0,"entry-id":e.entryId,transparent:"",onClick:K},null,8,["entry-id"])):le("",!0),N(Ge,{transparent:"",onClick:j[10]||(j[10]=()=>T(-1))},{default:oe(()=>[N(Aa)]),_:1}),N(Ge,{transparent:"",onClick:j[11]||(j[11]=()=>T(1))},{default:oe(()=>[N(La)]),_:1}),N(ir,{transparent:"",onClick:j[12]||(j[12]=()=>a.value=!0)}),e.touchDevice?le("",!0):(v(),ie(rr,{key:1,transparent:"",onRequestFullScreen:j[13]||(j[13]=()=>{var ae,pe;return(pe=(ae=i.value)==null?void 0:ae.rootEl)==null?void 0:pe.requestFullscreen()})})),N(or,{transparent:"","tour-message":"Press here to start listening",playing:X(L).isPlaying.value,class:"order-2 md:order-4",onClick:j[14]||(j[14]=()=>X(L).toggle())},null,8,["playing"])]),progress:oe(()=>{var ae,pe;return[((ae=e.defaultPreferences)==null?void 0:ae.progressSize)!==0?(v(),ie(mr,{key:0,value:c.value,height:((pe=e.defaultPreferences)==null?void 0:pe.progressSize)??2,rtl:l.value,opacity:e.defaultPreferences.contrast},null,8,["value","height","rtl","opacity"])):le("",!0)]}),_:1},8,["visible","hide-top-controls","space-top"]),u.value?le("",!0):(v(),ie(gr,{key:1,playing:X(L).isPlaying.value},null,8,["playing"])),N(yr,{modelValue:a.value,"onUpdate:modelValue":j[18]||(j[18]=ae=>a.value=ae),name:(ge=e.raw)==null?void 0:ge.title.name,"space-top":(e.spaceTop??0)+80,"enable-default-preferences":!e.touchDevice||!!e.appVersion,onMore:j[19]||(j[19]=()=>o("openDefaultPreferences"))},{"tab-preferences":oe(()=>[N(dr,{modelValue:M.value,"onUpdate:modelValue":j[15]||(j[15]=ae=>M.value=ae),"default-preferences":e.defaultPreferences,"enable-reset":!e.touchDevice||!!e.appVersion,onReset:j[16]||(j[16]=()=>$.value=null)},null,8,["modelValue","default-preferences","enable-reset"])]),"tab-default":oe(()=>[N(fr,{"is-novel":"","model-value":e.defaultPreferences,"onUpdate:modelValue":j[17]||(j[17]=ae=>o("defaultPreferencesChanged",ae))},null,8,["model-value"])]),_:1},8,["modelValue","name","space-top","enable-default-preferences"]),Se(Z.$slots,"default")]}),_:3},8,["hide-cursor","style"])):le("",!0)}}),_m=Object.freeze(Object.defineProperty({__proto__:null,default:Ba},Symbol.toStringTag,{value:"Module"}));function Sm({raw:e,spec:t,siteMeta:n,offlineMode:o,onSelect:i}){var A,T,G;const{vol:r,inferVol:s,chap:l,title:a,slug:u,basePath:c}=e,d=typeof(t==null?void 0:t.chapter)=="string"?{sel:t.chapter}:t==null?void 0:t.chapter;let f=-1;async function p(C,ee){if(o){i({...C});return}if(C.slug){y(C.slug,ee);return}if(C.elIndex===void 0||!(d!=null&&d.sel))return;let W=null;document.querySelector(d.sel)||(d!=null&&d.trigger&&(W=document.querySelector(d.trigger)),W&&(io(W),await new Promise(x=>setTimeout(()=>x(),50))));const S=d&&d.sel&&!d.url?document.querySelectorAll(d.sel):void 0;S!=null&&S[C.elIndex]&&(io(S[C.elIndex]),W&&document.querySelector(d.sel)&&io(W))}function y(C,ee){const W=km(c,C,(n==null?void 0:n.trailing)??!0);ee?window.open(W,"_blank","noopener"):location.href=W}function b(C){const ee=w[C];return ee?W=>p(ee,W):void 0}function $(C,ee,W){if(ee)y(ee,W);else if(C){const S=document.querySelector(C);S&&io(S,{preventDefault:!1})}}const M=r??s,L=d==null?void 0:d.url,D=((A=a.chapters)==null?void 0:A.filter(C=>C.slug||!L&&C.elIndex!==void 0))??[],w=D.length>1?D:[],g=(T=e.prev)==null?void 0:T.slug,E=(G=e.next)==null?void 0:G.slug,U=t!=null&&t.prev&&typeof t.prev!="string"?t.prev.btn??t.prev.sel:void 0,K=t!=null&&t.next&&typeof t.next!="string"?t.next.btn??t.next.sel:void 0;let _=g||U&&!w.length&&document.body.querySelector(U)?C=>$(U,g,C):void 0,z=E||K&&!w.length&&document.body.querySelector(K)?C=>$(K,E,C):void 0;if(w.length){if(L&&(f=w.findIndex(C=>C.slug===e.slug)),f===-1&&(f=w.findIndex(C=>(C.vol??C.inferVol)===M&&C.chap===l)),L&&f===-1&&(f=w.findIndex(C=>C.slug&&u.startsWith(`${C.slug}-`)&&u.length-C.slug.length>3)),f!==-1)_??(_=b(f+1)),z??(z=b(f-1));else if(!g&&!E){const C=w.findIndex(ee=>{const W=ee.vol??ee.inferVol;return M===void 0||W===void 0||M===W?ee.chap<l:W<M});C!==-1?(_=b(C),z=b(C-1)):z=b(w.length-1)}}return{activeIndex:f,activeLabel:Na({vol:r,chap:l}),prev:_,next:z,chapters:w.map(C=>({label:Na(C),select:ee=>p(C,ee)}))}}function Na({vol:e,chap:t}){return e==null?`Ch.${t}`:`Vol.${e} ch.${t}`}function km(e,t,n){const o=!t||t.includes("//")||t.startsWith("/")?t:"/"+[...e.split("/"),...t.split("/")].filter(Boolean).join("/"),[i,r]=(o.includes("//")?o:location.origin+o).split("?");return[i.endsWith("/")===n?i:n?i+"/":i.substring(0,-1),r].filter(Boolean).join("?")}function Cm(e){return e instanceof Error?JSON.stringify(e,Object.getOwnPropertyNames(e)):e}const Va=be(he({inheritAttrs:!1,__name:"App",props:{immediate:{type:Boolean},appVersion:{type:String},raw:{type:Object},spec:{type:Object},siteMeta:{type:null},page:{type:Number},spaceTop:{type:Number},touchDevice:{type:Boolean},entryId:{type:String},defaultPreferences:{type:Object},isAutoShow:{type:Boolean},tourEnabled:{type:Boolean},offlineMode:{type:Boolean}},emits:["error","crash","ready","pageChanged","playingChanged","dispose","openEntry","addEntry","finished","getHiddenChapters","hapticFeedback","pressedBack","selectChapter","timeout","openDefaultPreferences","defaultPreferencesChanged","controlsVisibilityChanged"],setup(e,{emit:t}){var E,U,K;const n=e,o=t;let i=!1,r=0;ys((_,z,A)=>{if(!i){i=!0;const G=`(3.4.0) ${(z==null?void 0:z.$options.name)??(z==null?void 0:z.$options.__name)??(z==null?void 0:z.$options.__file)}.${A}: ${Cm(_)}`;o("crash",G)}return!1});const s=te(n.raw?n.raw.contentType??Kt.manga:void 0);s.value===void 0&&Ed(((E=n.spec)==null?void 0:E.content)??"body",{paraSel:(U=n.spec)==null?void 0:U.para,include:(K=n.siteMeta)==null?void 0:K.contentTypes,timeoutMs:3e3}).then(_=>{_?s.value=_:o("error")});const l=te(!1),a=te(n.tourEnabled),u=lf({touchDevice:n.touchDevice}),c=df(n.page,n.isAutoShow),d=Q(()=>n.raw?Sm({raw:n.raw,spec:n.spec,siteMeta:n.siteMeta,offlineMode:n.offlineMode,onSelect:_=>o("selectChapter",_)}):void 0);uf().addListener({onKeyDown:_=>{switch(_.key){case"Escape":_.preventDefault();break}},onKeyUp:_=>{switch(_.key){case"h":w();break}}}),af(()=>o("hapticFeedback"));const p=gt(_=>o("pageChanged",_),300),y=te(b(n.defaultPreferences));de(()=>n.defaultPreferences,_=>y.value=b(_));function b(_){const z=(_==null?void 0:_.fontSize)??16,A=Math.max(z,(_==null?void 0:_.lineHeight)??28);return{..._,speed:(_==null?void 0:_.speed)??1,progressSize:(_==null?void 0:_.progressSize)??2,autoNextSeconds:(_==null?void 0:_.autoNextSeconds)??5,hideControlsEvent:(_==null?void 0:_.hideControlsEvent)??nn.firstMove,autoPlay:(_==null?void 0:_.autoPlay)??!1,pinchToZoom:(_==null?void 0:_.pinchToZoom)??!0,readerStyle:(_==null?void 0:_.readerStyle)??Dt.longStrip,direction:(_==null?void 0:_.direction)??tt.vertical,gap:(_==null?void 0:_.gap)??0,fontFamily:(_==null?void 0:_.fontFamily)??Jo[0].value,contrast:(_==null?void 0:_.contrast)??.8,fontSize:z,lineHeight:A}}function $(_){y.value=b(_),o("defaultPreferencesChanged",_)}function M(){if(n.offlineMode){o("pressedBack");return}ff(),o("dispose")}function L(_){const z=Math.floor(_*100)/100;z!==Math.floor(c.value*100)/100&&(c.value=_,!(r>=z)&&(r=z,p(z)))}function D(){n.entryId?o("openEntry",n.entryId):o("addEntry")}function w(_){l.value!==_&&(l.value=_??!l.value)}function g(){o("error"),M()}return(_,z)=>s.value!==void 0?(v(),ie(xs(s.value===X(Kt).novel?Ba:Oa),Sn({key:0,ref:"root"},n,{page:X(c),busy:X(u),"chapter-nav-data":d.value,"default-preferences":y.value,onOpenDefaultPreferences:z[1]||(z[1]=()=>o("openDefaultPreferences")),onTimeout:z[2]||(z[2]=()=>o("timeout")),onReady:z[3]||(z[3]=()=>o("ready")),onFinished:z[4]||(z[4]=()=>o("finished")),onPlayingChanged:z[5]||(z[5]=A=>o("playingChanged",A)),onControlsVisibilityChanged:z[6]||(z[6]=A=>o("controlsVisibilityChanged",A)),onPressedBack:z[7]||(z[7]=()=>o("pressedBack")),onGetHiddenChapters:z[8]||(z[8]=()=>o("getHiddenChapters")),onError:g,onHideReader:M,onPageChanged:L,onClickEntryButton:D,onDefaultPreferencesChanged:$,onOpenHelpScreen:z[9]||(z[9]=()=>w(!0))}),{default:oe(()=>[l.value?(v(),ie(Bl,{key:0,"touch-device":e.touchDevice,onHide:w},null,8,["touch-device"])):le("",!0),a.value?(v(),ie(Nl,{key:1,onHide:z[0]||(z[0]=()=>a.value=!1)})):le("",!0)]),_:1},16,["page","busy","chapter-nav-data","default-preferences"])):le("",!0)}}),[["styles",['*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.18 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:Helvetica,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}*{-webkit-tap-highlight-color:rgba(0,0,0,0)!important}button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-image:none;border-style:none;cursor:pointer;outline:2px solid transparent;outline-offset:2px;white-space:nowrap}button[disabled]{cursor:default!important}svg{height:100%}.container,svg{width:100%}@media (min-width:300px){.container{max-width:300px}}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.scrollbar-none{scrollbar-width:none}.scrollbar-none::-webkit-scrollbar{display:none}.scrollbar-sm{scrollbar-color:#777 transparent;scrollbar-width:thin}.scrollbar-sm::-webkit-scrollbar{background-color:transparent;height:4px;width:4px}.scrollbar-sm::-webkit-scrollbar-track{background:transparent}.scrollbar-sm::-webkit-scrollbar-thumb{background-color:#777;border-radius:2px}.\\!pointer-events-none{pointer-events:none!important}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.\\!visible{visibility:visible!important}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-0{bottom:0}.bottom-1{bottom:4px}.bottom-full{bottom:100%}.left-0{left:0}.left-1{left:4px}.left-1\\/2{left:50%}.left-10{left:40px}.left-3{left:12px}.left-9{left:36px}.right-0{right:0}.top-0{top:0}.top-1{top:4px}.top-1\\/2{top:50%}.top-10{top:40px}.top-2{top:8px}.top-9{top:36px}.top-full{top:100%}.-z-10{z-index:-10}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.order-2{order:2}.m-0{margin:0}.m-auto{margin:auto}.-mx-12{margin-left:-48px;margin-right:-48px}.-my-12{margin-bottom:-48px;margin-top:-48px}.-ml-20{margin-left:-80px}.-mr-3{margin-right:-12px}.-mt-2{margin-top:-8px}.mb-2{margin-bottom:8px}.mb-3{margin-bottom:12px}.mb-5{margin-bottom:20px}.ml-1{margin-left:4px}.ml-auto{margin-left:auto}.mt-5{margin-top:20px}.box-border{box-sizing:border-box}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.\\!h-9{height:36px!important}.h-0{height:0}.h-1{height:4px}.h-1\\/3{height:33.333333%}.h-10{height:40px}.h-12{height:48px}.h-14{height:56px}.h-16{height:64px}.h-2{height:8px}.h-20{height:80px}.h-24{height:96px}.h-28{height:112px}.h-3{height:12px}.h-4{height:16px}.h-5{height:20px}.h-6{height:24px}.h-8{height:32px}.h-9{height:36px}.h-\\[101\\%\\]{height:101%}.h-full{height:100%}.h-screen{height:100vh}.max-h-\\[70vh\\]{max-height:70vh}.max-h-full{max-height:100%}.max-h-none{max-height:none}.min-h-full{min-height:100%}.w-0{width:0}.w-1{width:4px}.w-1\\/3{width:33.333333%}.w-10{width:40px}.w-12{width:48px}.w-14{width:56px}.w-2{width:8px}.w-2\\/3{width:66.666667%}.w-20{width:80px}.w-24{width:96px}.w-28{width:112px}.w-3{width:12px}.w-4{width:16px}.w-40{width:160px}.w-5{width:20px}.w-6{width:24px}.w-auto{width:auto}.w-full{width:100%}.w-min{width:-moz-min-content;width:min-content}.max-w-full{max-width:100%}.max-w-none{max-width:none}.max-w-xs{max-width:320px}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.origin-bottom{transform-origin:bottom}.origin-right{transform-origin:right}.origin-top{transform-origin:top}.\\!translate-y-full{--tw-translate-y:100%!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.-translate-y-1\\.5{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\.5{--tw-translate-y:-6px}.-translate-y-1\\/2{--tw-translate-y:-50%}.-translate-y-1\\/2,.translate-y-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y:0px}.translate-y-1\\.5{--tw-translate-y:6px}.-rotate-90,.translate-y-1\\.5{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-90{--tw-rotate:-90deg}.rotate-180{--tw-rotate:180deg}.rotate-180,.rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate:90deg}.scale-95{--tw-scale-x:.95;--tw-scale-y:.95}.scale-95,.scale-y-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-y-90{--tw-scale-y:.9}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-auto{cursor:auto}.cursor-default{cursor:default}.cursor-grabbing{cursor:grabbing}.cursor-none{cursor:none}.cursor-pointer{cursor:pointer}.touch-pan-x{--tw-pan-x:pan-x}.touch-pan-x,.touch-pan-y{touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-y{--tw-pan-y:pan-y}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}.resize{resize:both}.\\!snap-none{scroll-snap-type:none!important}.snap-x{scroll-snap-type:x var(--tw-scroll-snap-strictness)}.snap-y{scroll-snap-type:y var(--tw-scroll-snap-strictness)}.snap-center{scroll-snap-align:center}.list-none{list-style-type:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:4px}.gap-2{gap:8px}.gap-3{gap:12px}.gap-4{gap:16px}.gap-6{gap:24px}.gap-\\[1px\\]{gap:1px}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overscroll-contain{overscroll-behavior:contain}.overscroll-none{overscroll-behavior:none}.text-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:4px}.rounded-2xl{border-radius:16px}.rounded-\\[2\\.5rem\\]{border-radius:40px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:8px}.rounded-md{border-radius:6px}.rounded-xl{border-radius:12px}.\\!rounded-l-none{border-bottom-left-radius:0!important;border-top-left-radius:0!important}.\\!rounded-r-none{border-bottom-right-radius:0!important;border-top-right-radius:0!important}.rounded-l-sm{border-bottom-left-radius:2px;border-top-left-radius:2px}.rounded-r-sm{border-bottom-right-radius:2px;border-top-right-radius:2px}.rounded-t-xl{border-top-left-radius:12px;border-top-right-radius:12px}.border{border-width:1px}.border-2{border-width:2px}.border-4{border-width:4px}.border-t-\\[1px\\]{border-top-width:1px}.border-solid{border-style:solid}.border-none{border-style:none}.border-primary{--tw-border-opacity:1;border-color:rgb(184 92 56/var(--tw-border-opacity,1))}.border-stone-200{--tw-border-opacity:1;border-color:rgb(231 229 228/var(--tw-border-opacity,1))}.border-stone-400{--tw-border-opacity:1;border-color:rgb(168 162 158/var(--tw-border-opacity,1))}.border-stone-500{--tw-border-opacity:1;border-color:rgb(120 113 108/var(--tw-border-opacity,1))}.border-stone-600{--tw-border-opacity:1;border-color:rgb(87 83 78/var(--tw-border-opacity,1))}.border-textPrimary{--tw-border-opacity:1;border-color:rgb(251 130 82/var(--tw-border-opacity,1))}.border-opacity-30{--tw-border-opacity:.3}.border-opacity-70{--tw-border-opacity:.7}.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.bg-inherit{background-color:inherit}.bg-primary{--tw-bg-opacity:1;background-color:rgb(184 92 56/var(--tw-bg-opacity,1))}.bg-stone-100{--tw-bg-opacity:1;background-color:rgb(245 245 244/var(--tw-bg-opacity,1))}.bg-stone-300{--tw-bg-opacity:1;background-color:rgb(214 211 209/var(--tw-bg-opacity,1))}.bg-stone-500{--tw-bg-opacity:1;background-color:rgb(120 113 108/var(--tw-bg-opacity,1))}.bg-stone-600{--tw-bg-opacity:1;background-color:rgb(87 83 78/var(--tw-bg-opacity,1))}.bg-stone-800{--tw-bg-opacity:1;background-color:rgb(41 37 36/var(--tw-bg-opacity,1))}.bg-stone-900{--tw-bg-opacity:1;background-color:rgb(28 25 23/var(--tw-bg-opacity,1))}.bg-textPrimary{--tw-bg-opacity:1;background-color:rgb(251 130 82/var(--tw-bg-opacity,1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.\\!bg-opacity-100{--tw-bg-opacity:1!important}.bg-opacity-40{--tw-bg-opacity:.4}.bg-opacity-50{--tw-bg-opacity:.5}.bg-opacity-70{--tw-bg-opacity:.7}.bg-opacity-80{--tw-bg-opacity:.8}.bg-opacity-90{--tw-bg-opacity:.9}.bg-none{background-image:none}.object-contain{-o-object-fit:contain;object-fit:contain}.p-0{padding:0}.p-0\\.5{padding:2px}.p-1{padding:4px}.p-2{padding:8px}.p-4{padding:16px}.p-6{padding:24px}.px-2{padding-left:8px;padding-right:8px}.px-3{padding-left:12px;padding-right:12px}.px-4{padding-left:16px;padding-right:16px}.px-5{padding-left:20px;padding-right:20px}.px-6{padding-left:24px;padding-right:24px}.px-8{padding-left:32px;padding-right:32px}.py-0\\.5{padding-bottom:2px;padding-top:2px}.py-1{padding-bottom:4px;padding-top:4px}.py-1\\.5{padding-bottom:6px;padding-top:6px}.py-2{padding-bottom:8px;padding-top:8px}.pb-6{padding-bottom:24px}.pb-7{padding-bottom:28px}.pb-8{padding-bottom:32px}.pl-1{padding-left:4px}.pr-2{padding-right:8px}.pt-1{padding-top:4px}.pt-1\\.5{padding-top:6px}.pt-12{padding-top:48px}.pt-16{padding-top:64px}.pt-20{padding-top:80px}.pt-5{padding-top:20px}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-sans{font-family:Helvetica,sans-serif}.text-base{font-size:16px;line-height:24px}.text-sm{font-size:14px;line-height:20px}.text-xl{font-size:20px;line-height:28px}.font-medium{font-weight:500}.font-normal{font-weight:400}.lowercase{text-transform:lowercase}.leading-none{line-height:1}.text-stone-100{--tw-text-opacity:1;color:rgb(245 245 244/var(--tw-text-opacity,1))}.text-stone-200{--tw-text-opacity:1;color:rgb(231 229 228/var(--tw-text-opacity,1))}.text-stone-300{--tw-text-opacity:1;color:rgb(214 211 209/var(--tw-text-opacity,1))}.text-stone-400{--tw-text-opacity:1;color:rgb(168 162 158/var(--tw-text-opacity,1))}.text-stone-50{--tw-text-opacity:1;color:rgb(250 250 249/var(--tw-text-opacity,1))}.text-stone-800{--tw-text-opacity:1;color:rgb(41 37 36/var(--tw-text-opacity,1))}.text-stone-900{--tw-text-opacity:1;color:rgb(28 25 23/var(--tw-text-opacity,1))}.text-textPrimary{--tw-text-opacity:1;color:rgb(251 130 82/var(--tw-text-opacity,1))}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-90{opacity:.9}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-neutral-950{--tw-shadow-color:#0a0a0a;--tw-shadow:var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-md{--tw-backdrop-blur:blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-bg{transition-duration:.15s;transition-property:background-color;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-0{transition-duration:0s}.duration-100{transition-duration:.1s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-500{transition-duration:.5s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.children-pointer-events-auto>*{pointer-events:auto}.last\\:mb-0:last-child{margin-bottom:0}.last\\:border-b-transparent:last-child{border-bottom-color:transparent}@media (hover:hover) and (pointer:fine){.hover\\:bg-stone-100:hover{--tw-bg-opacity:1;background-color:rgb(245 245 244/var(--tw-bg-opacity,1))}.hover\\:bg-stone-300:hover{--tw-bg-opacity:1;background-color:rgb(214 211 209/var(--tw-bg-opacity,1))}.hover\\:bg-stone-50:hover{--tw-bg-opacity:1;background-color:rgb(250 250 249/var(--tw-bg-opacity,1))}.hover\\:bg-stone-500:hover{--tw-bg-opacity:1;background-color:rgb(120 113 108/var(--tw-bg-opacity,1))}.hover\\:bg-stone-900:hover{--tw-bg-opacity:1;background-color:rgb(28 25 23/var(--tw-bg-opacity,1))}.hover\\:bg-opacity-10:hover{--tw-bg-opacity:.1}.hover\\:bg-opacity-50:hover{--tw-bg-opacity:.5}.hover\\:bg-opacity-80:hover{--tw-bg-opacity:.8}.hover\\:text-stone-100:hover{--tw-text-opacity:1;color:rgb(245 245 244/var(--tw-text-opacity,1))}}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:outline-primary:focus{outline-color:#b85c38}@media (hover:hover) and (pointer:fine){.group:hover .group-hover\\:bg-stone-100{--tw-bg-opacity:1;background-color:rgb(245 245 244/var(--tw-bg-opacity,1))}.group:hover .group-hover\\:bg-opacity-20{--tw-bg-opacity:.2}}@media (min-width:300px){.\\32xs\\:gap-3{gap:12px}.\\32xs\\:px-3{padding-left:12px;padding-right:12px}}@media (min-width:640px){.sm\\:h-16{height:64px}.sm\\:w-\\[31rem\\]{width:496px}.sm\\:p-3{padding:12px}.sm\\:px-12{padding-left:48px;padding-right:48px}.sm\\:py-3{padding-bottom:12px;padding-top:12px}.sm\\:pt-18{padding-top:72px}.sm\\:pt-9{padding-top:36px}}@media (min-width:768px){.md\\:fixed{position:fixed}.md\\:left-auto{left:auto}.md\\:order-4{order:4}.md\\:inline-block{display:inline-block}.md\\:flex-col{flex-direction:column}.md\\:bg-transparent{background-color:transparent}.md\\:px-14{padding-left:56px;padding-right:56px}.md\\:px-8{padding-left:32px;padding-right:32px}.md\\:pb-5{padding-bottom:20px}.md\\:pb-6{padding-bottom:24px}.md\\:pt-12{padding-top:48px}.md\\:pt-20{padding-top:80px}}@media (min-width:1024px){.lg\\:px-10{padding-left:40px;padding-right:40px}.lg\\:px-16{padding-left:64px;padding-right:64px}.lg\\:pb-3{padding-bottom:12px}.lg\\:pb-4{padding-bottom:16px}}@media (min-width:1280px){.xl\\:px-12{padding-left:48px;padding-right:48px}.xl\\:px-20{padding-left:80px;padding-right:80px}}']]]),Tm=Object.freeze(Object.defineProperty({__proto__:null,default:Va},Symbol.toStringTag,{value:"Module"})),Mm={class:"max-h-none max-w-none h-full w-full m-0 p-0 border-none outline-none"},Pm={key:0,class:"fixed inset-0 h-[101%] flex justify-center items-center z-10 bg-black"},Em={class:"flex justify-between items-end"},Im={class:"inline-block children-pointer-events-auto"},Om={class:"inline-flex flex-col items-end gap-4 children-pointer-events-auto"},$m={class:"fixed pointer-events-none left-0 right-0 bottom-0"},zm={key:1,class:"fixed inline-block left-1/2 -translate-x-1/2 bottom-0 p-2 sm:p-3 pb-6 md:pb-5 lg:pb-3"},Dm=Object.freeze(Object.defineProperty({__proto__:null,default:be(he({__name:"ReaderLayout",props:{loading:{type:Boolean},immediate:{type:Boolean},idle:{type:Boolean},controlsVisible:{type:Boolean},zooming:{type:Boolean},spaceTop:{type:null}},setup(e,{expose:t}){const n={mounted:i=>i.showModal(),beforeUnmount:i=>i.close()},o=te(null);return t({rootEl:o}),(i,r)=>Re((v(),O("dialog",Mm,[Y("div",{ref_key:"rootEl",ref:o,id:"reader-layout",class:ue({"cursor-none":e.idle,"cursor-default":!e.idle,"bg-black":e.immediate||!e.loading,"opacity-0":!e.immediate&&e.loading,"duration-200 transition-colors":!e.immediate})},[e.loading&&e.immediate?(v(),O("div",Pm,[N(oi)])):le("",!0),Se(i.$slots,"default"),Y("div",{id:"controls",class:ue(["fixed pointer-events-none cursor-auto left-0 top-0 w-full h-full flex flex-col justify-between p-2 sm:p-3 pb-6 md:pb-5 lg:pb-3",{"opacity-100 z-20":e.controlsVisible,"opacity-0 -z-10":!e.controlsVisible}])},[Y("div",{class:"flex gap-1 items-center children-pointer-events-auto relative z-30 flex-shrink-0 2xs:gap-3",style:Ce({paddingTop:`${e.spaceTop||0}px`})},[Se(i.$slots,"top-controls")],4),Y("div",Em,[Y("div",Im,[Se(i.$slots,"bottom-left-controls")]),Y("div",Om,[Se(i.$slots,"bottom-right-controls")])]),Y("div",$m,[Se(i.$slots,"progress")])],2),e.controlsVisible||e.zooming?(v(),O("div",zm,[Se(i.$slots,"reset-zoom")])):le("",!0)],2)])),[[n]])}}),[["styles",["#reader-layout{direction:ltr;font-family:Helvetica,sans-serif;font-size:16px;font-weight:400;height:100%;line-height:24px;overflow:hidden;overscroll-behavior:contain;pointer-events:auto;text-align:left;width:100%;--tw-text-opacity:1;color:rgb(245 245 244/var(--tw-text-opacity,1))}"]]])},Symbol.toStringTag,{value:"Module"})),Am={},Lm={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function jm(e,t){return v(),O("svg",Lm,[...t[0]||(t[0]=[Y("path",{fill:"currentColor",d:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46s46-20.595 46-46s-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1)])])}const Bm=Object.freeze(Object.defineProperty({__proto__:null,default:be(Am,[["render",jm]])},Symbol.toStringTag,{value:"Module"})),Nm="gear-second{height:0!important;opacity:0!important;pointer-events:none!important;width:0!important;z-index:-10!important}html.gear-second,html.gear-second *{scroll-behavior:auto!important;scrollbar-width:none!important}html.gear-second ::-webkit-scrollbar,html.gear-second::-webkit-scrollbar{display:none!important}html.gear-second body{touch-action:pan-x pan-y!important}html.gear-second body .m-content #progress-bar{display:none!important}html.gear-second body>:not(dialog[open]),html.gear-second>body~*{visibility:hidden!important}html.gear-second>body~*{display:none!important;height:0!important;left:100%!important;max-height:0!important;max-width:0!important;opacity:0!important;pointer-events:none!important;top:100%!important;width:0!important}.mp-scroll-container{max-height:100vh!important;overflow:hidden!important}html:has(body.mp-scroll-container){overflow:auto!important}",on="gear-second",kr={appVersion:void 0,immediate:void 0,raw:void 0,spec:void 0,siteMeta:void 0,page:0,spaceTop:void 0,touchDevice:void 0,entryId:void 0,isAutoShow:void 0,tourEnabled:void 0,offlineMode:void 0,defaultPreferences:void 0,onError:void 0,onCrash:void 0,onDispose:void 0,onFullScreenChanged:void 0,onControlsVisibilityChanged:void 0,onPageChanged:void 0,onOpenEntry:void 0,onAddEntry:void 0,onFinished:void 0,onHapticFeedback:void 0,onPressedBack:void 0,onSelectChapter:void 0,onTimeout:void 0,onDefaultPreferencesChanged:void 0,onOpenDefaultPreferences:void 0},St={promise:void 0,data:xo({...kr})};async function Vm(e){let t=!1,n=!1,o,i,r,s;const l=!!e.spaceTop||!!e.isAutoShow&&!!e.page,a=()=>{t||(t=!0,clearInterval(o),o=void 0,i!=null&&i.isConnected&&document.body.removeChild(i),document.documentElement.classList.remove(on),St.data.touchDevice||Object.assign(St.data,kr),St.promise=void 0,to.clear())};if(Object.assign(St.data,kr,e.appVersion?e:Ra(e),{immediate:l,onReady(){l||(r==null||r(),document.documentElement.classList.add(on))},onError(){var c,d;a(),n?((c=e.onDispose)==null||c.call(e),(d=e.onError)==null||d.call(e)):s==null||s()},onDispose:()=>{var c;a(),(c=e==null?void 0:e.onDispose)==null||c.call(e)},onControlsVisibilityChanged(c){var d,f;(d=e.onFullScreenChanged)==null||d.call(e,!c),(f=e.onControlsVisibilityChanged)==null||f.call(e,c)}}),St.promise)return await St.promise;const u=c=>{Object.assign(St.data,St.data.appVersion?c:Ra(c))};return St.promise=new Promise(c=>{r=()=>{n||(n=!0,c({updateArgs:u,dispose:a,back:()=>to.trigger()}))},s=()=>{n||c(void 0)},Rm().then(()=>{if(t){s==null||s();return}i=document.createElement(on),l?(document.documentElement.classList.add(on),document.body.appendChild(i),setTimeout(()=>r==null?void 0:r())):document.body.appendChild(i);let d=0;o=setInterval(()=>{if(++d===30||t){clearInterval(o),o=void 0;return}i.isConnected||(document.documentElement.classList.add(on),document.body.appendChild(i))},100)})}),await St.promise}function Ra(e){if(!["autoPlay","readerStyle","direction","autoNextSeconds","defaultSpeed","defaultGap","hideControlsEvent","progressSize","pinchToZoom","tapZone"].some(p=>p in e))return e;const{autoPlay:n,readerStyle:o,direction:i,autoNextSeconds:r,defaultSpeed:s,defaultGap:l,hideControlsEvent:a,progressSize:u,pinchToZoom:c,tapZone:d,...f}=e;return{...f,defaultPreferences:{autoPlay:n,readerStyle:o,direction:i,autoNextSeconds:r,speed:s,gap:l,hideControlsEvent:a,progressSize:u,pinchToZoom:c,tapZone:d}}}async function Rm(){if(window.customElements.get(on))return;const e=await Hm();if(window.customElements.get(on))return;const t=document.createElement("style"),n=Nm;t.appendChild(document.createTextNode(n)),document.head.appendChild(t);const o=md({styles:[e],data:()=>({readerData:St.data}),render(){return il(Va,this.readerData)}});window.customElements.define(on,o)}async function Hm(){const e=Object.assign({"./App.vue":Tm,"./GearSecond.vue":im,"./GearThird.vue":_m,"./components/AutoNext.vue":Cf,"./components/ButtonWebFullScreen.vue":xp,"./components/ChapterNav.vue":qp,"./components/DefaultPreferencesForm.vue":Ph,"./components/DirectionToast.vue":Ah,"./components/GearControlsLayout.vue":Bh,"./components/GearLayout.vue":qh,"./components/GearThirdControlsLayout.vue":fm,"./components/GesturesContainer.vue":lg,"./components/HelpScreen.vue":nf,"./components/MangaPreferencesForm.vue":ng,"./components/NovelBody.vue":xm,"./components/NovelPreferencesForm.vue":Sh,"./components/PageNav.vue":og,"./components/PauseToast.vue":ig,"./components/ProgressBar.vue":sg,"./components/ReaderBody.vue":pg,"./components/ReaderImg.vue":cg,"./components/ReaderLayout.vue":Dm,"./components/ReaderTour.vue":sf,"./components/SettingsBottomSheet.vue":zg,"./components/TapZonePreview.vue":zh,"./components/base/BaseButton.vue":gf,"./components/base/BottomSheet.vue":yg,"./components/base/ButtonDropdown.vue":Lp,"./components/base/ButtonIcon.vue":Tf,"./components/base/ButtonOutline.vue":hh,"./components/base/DropdownMenu.vue":kp,"./components/base/InputPercentage.vue":Yp,"./components/base/InputSelect.vue":Jp,"./components/base/InputSwitcher.vue":nh,"./components/base/LoadingIndicator.vue":Fh,"./components/base/TabBar.vue":xg,"./components/base/TableField.vue":ih,"./components/buttons/ButtonBack.vue":Of,"./components/buttons/ButtonEntry.vue":Vf,"./components/buttons/ButtonHide.vue":Uf,"./components/buttons/ButtonPlay.vue":ep,"./components/buttons/ButtonResetZoom.vue":lp,"./components/buttons/ButtonSettings.vue":fp,"./components/fields/FieldContrast.vue":rh,"./components/fields/FieldFontFamily.vue":gh,"./components/icons/IconBack.vue":If,"./components/icons/IconBookmarkNew.vue":Nf,"./components/icons/IconBookmarked.vue":Af,"./components/icons/IconChevronLeft.vue":Vp,"./components/icons/IconChevronRight.vue":Wp,"./components/icons/IconClose.vue":vg,"./components/icons/IconDouble.vue":Xh,"./components/icons/IconDoubleSkip.vue":eg,"./components/icons/IconExclamationCircle.vue":Bm,"./components/icons/IconFullscreen.vue":mp,"./components/icons/IconFullscreenExit.vue":wp,"./components/icons/IconHelp.vue":Cg,"./components/icons/IconLandscape.vue":ch,"./components/icons/IconLoading.vue":Pp,"./components/icons/IconMoreVert.vue":Eg,"./components/icons/IconNext.vue":$h,"./components/icons/IconPause.vue":Yf,"./components/icons/IconPlay.vue":Qf,"./components/icons/IconPlus.vue":yf,"./components/icons/IconPortrait.vue":ph,"./components/icons/IconReaderExit.vue":Wf,"./components/icons/IconSettings.vue":dp,"./components/icons/IconTextDecre.vue":mm,"./components/icons/IconTextIncre.vue":wm,"./components/icons/IconTriangle.vue":$p,"./components/icons/IconZoom.vue":ip}),t=[];for(const n in e){const o=e[n];t.push(o.default.styles)}return t.join("")}return Vm});