gear-second 3.1.1 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +7 -7
- package/package.json +4 -2
package/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
(function(
|
|
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,vt)=>me in rt?Wm(rt,me,{enumerable:!0,configurable:!0,writable:!0,value:vt}):rt[me]=vt;var Me=(rt,me,vt)=>Um(rt,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
|
|
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={},vt=[],kt=()=>{},Tr=()=>!1,ro=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,Se=(e,t)=>Ua.call(e,t),re=Array.isArray,mn=e=>Pn(e)==="[object Map]",so=e=>Pn(e)==="[object Set]",Mr=e=>Pn(e)==="[object Date]",fe=e=>typeof e=="function",$e=e=>typeof e=="string",bt=e=>typeof e=="symbol",Ce=e=>e!==null&&typeof e=="object",Pr=e=>(Ce(e)||fe(e))&&fe(e.then)&&fe(e.catch),Er=Object.prototype.toString,Pn=e=>Er.call(e),qa=e=>Pn(e).slice(8,-1),lo=e=>Pn(e)==="[object Object]",ci=e=>$e(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,En=rt(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ao=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Ka=/-\w/g,He=ao(e=>e.replace(Ka,t=>t.slice(1).toUpperCase())),Za=/\B([A-Z])/g,et=ao(e=>e.replace(Za,"-$1").toLowerCase()),co=ao(e=>e.charAt(0).toUpperCase()+e.slice(1)),ui=ao(e=>e?`on${co(e)}`:""),tt=(e,t)=>!Object.is(e,t),uo=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Ir=(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 Or;const fo=()=>Or||(Or=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function ke(e){if(re(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],i=$e(o)?Ja(o):ke(o);if(i)for(const r in i)t[r]=i[r]}return t}else if($e(e)||Ce(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(Ce(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const Qa=rt("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function $r(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=po(e[o],t[o]);return n}function po(e,t){if(e===t)return!0;let n=Mr(e),o=Mr(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=Ce(e),o=Ce(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||!po(e[s],t[s]))return!1}}return String(e)===String(t)}function zr(e,t){return e.findIndex(n=>po(n,t))}const Dr=e=>!!(e&&e.__v_isRef===!0),Fe=e=>$e(e)?e:e==null?"":re(e)||Ce(e)&&(e.toString===Er||!fe(e.toString))?Dr(e)?Fe(e.value):JSON.stringify(e,Ar,2):String(e),Ar=(e,t)=>Dr(t)?Ar(e,t.value):mn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[o,i],r)=>(n[pi(o,r)+" =>"]=i,n),{})}:so(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>pi(n))}:bt(t)?pi(t):Ce(t)&&!re(t)&&!lo(t)?String(t):t,pi=(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 fi(){return We}function nc(e,t=!1){We&&We.cleanups.push(e)}let Me;const pi=new WeakSet;class Dr{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,pi.has(this)&&(pi.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Lr(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Rr(this),jr(this);const t=Me,n=yt;Me=this,yt=!0;try{return this.fn()}finally{Br(this),Me=t,yt=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)vi(t);this.deps=this.depsTail=void 0,Rr(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?pi.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){mi(this)&&this.run()}get dirty(){return mi(this)}}let Ar=0,En,In;function Lr(e,t=!1){if(e.flags|=8,t){e.next=In,In=e;return}e.next=En,En=e}function hi(){Ar++}function gi(){if(--Ar>0)return;if(In){let t=In;for(In=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;En;){let t=En;for(En=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 jr(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Br(e){let t,n=e.depsTail,o=n;for(;o;){const i=o.prevDep;o.version===-1?(o===n&&(n=i),vi(o),oc(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=i}e.deps=t,e.depsTail=n}function mi(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===$n)||(e.globalVersion=$n,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!mi(e))))return;e.flags|=2;const t=e.dep,n=Me,o=yt;Me=e,yt=!0;try{jr(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{Me=n,yt=o,Br(e),e.flags&=-3}}function vi(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)vi(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 Nr=[];function Ct(){Nr.push(yt),yt=!1}function Tt(){const e=Nr.pop();yt=e===void 0?!0:e}function Rr(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Me;Me=void 0;try{t()}finally{Me=n}}}let $n=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 po{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(!Me||!yt||Me===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Me)n=this.activeLink=new ic(Me,this),Me.deps?(n.prevDep=Me.depsTail,Me.depsTail.nextDep=n,Me.depsTail=n):Me.deps=Me.depsTail=n,Hr(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=Me.depsTail,n.nextDep=void 0,Me.depsTail.nextDep=n,Me.depsTail=n,Me.deps===n&&(Me.deps=o)}return n}trigger(t){this.version++,$n++,this.notify(t)}notify(t){hi();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{gi()}}}function Hr(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)Hr(o)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const ho=new WeakMap,on=Symbol(""),bi=Symbol(""),On=Symbol("");function Ue(e,t,n){if(yt&&Me){let o=ho.get(e);o||ho.set(e,o=new Map);let i=o.get(n);i||(o.set(n,i=new po),i.map=o,i.key=n),i.track()}}function Bt(e,t,n,o,i,r){const s=ho.get(e);if(!s){$n++;return}const l=a=>{a&&a.trigger()};if(hi(),t==="clear")s.forEach(l);else{const a=ie(e),u=a&&li(n);if(a&&n==="length"){const c=Number(o);s.forEach((d,f)=>{(f==="length"||f===On||!bt(f)&&f>=c)&&l(d)})}else switch((n!==void 0||s.has(void 0))&&l(s.get(n)),u&&l(s.get(On)),t){case"add":a?u&&l(s.get("length")):(l(s.get(on)),vn(e)&&l(s.get(bi)));break;case"delete":a||(l(s.get(on)),vn(e)&&l(s.get(bi)));break;case"set":vn(e)&&l(s.get(on));break}}gi()}function rc(e,t){const n=ho.get(e);return n&&n.get(t)}function bn(e){const t=ye(e);return t===e?t:(Ue(t,"iterate",On),dt(e)?t:t.map(Ve))}function go(e){return Ue(e=ye(e),"iterate",On),e}const sc={__proto__:null,[Symbol.iterator](){return yi(this,Symbol.iterator,Ve)},concat(...e){return bn(this).concat(...e.map(t=>ie(t)?bn(t):t))},entries(){return yi(this,"entries",e=>(e[1]=Ve(e[1]),e))},every(e,t){return Vt(this,"every",e,t,void 0,arguments)},filter(e,t){return Vt(this,"filter",e,t,n=>n.map(Ve),arguments)},find(e,t){return Vt(this,"find",e,t,Ve,arguments)},findIndex(e,t){return Vt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Vt(this,"findLast",e,t,Ve,arguments)},findLastIndex(e,t){return Vt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Vt(this,"forEach",e,t,void 0,arguments)},includes(...e){return wi(this,"includes",e)},indexOf(...e){return wi(this,"indexOf",e)},join(e){return bn(this).join(e)},lastIndexOf(...e){return wi(this,"lastIndexOf",e)},map(e,t){return Vt(this,"map",e,t,void 0,arguments)},pop(){return zn(this,"pop")},push(...e){return zn(this,"push",e)},reduce(e,...t){return Fr(this,"reduce",e,t)},reduceRight(e,...t){return Fr(this,"reduceRight",e,t)},shift(){return zn(this,"shift")},some(e,t){return Vt(this,"some",e,t,void 0,arguments)},splice(...e){return zn(this,"splice",e)},toReversed(){return bn(this).toReversed()},toSorted(e){return bn(this).toSorted(e)},toSpliced(...e){return bn(this).toSpliced(...e)},unshift(...e){return zn(this,"unshift",e)},values(){return yi(this,"values",Ve)}};function yi(e,t,n){const o=go(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 Vt(e,t,n,o,i,r){const s=go(e),l=s!==e&&!dt(e),a=s[t];if(a!==lc[t]){const d=a.apply(e,r);return l?Ve(d):d}let u=n;s!==e&&(l?u=function(d,f){return n.call(this,Ve(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 Fr(e,t,n,o){const i=go(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,Ve(l),a,e)}),i[t](r,...o)}function wi(e,t,n){const o=ye(e);Ue(o,"iterate",On);const i=o[t](...n);return(i===-1||i===!1)&&_i(n[0])?(n[0]=ye(n[0]),o[t](...n)):i}function zn(e,t,n=[]){Ct(),hi();const o=ye(e)[t].apply(e,n);return gi(),Tt(),o}const ac=st("__proto__,__v_isRef,__isVue"),Wr=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=ye(this);return Ue(t,"has",e),t.hasOwnProperty(e)}class Ur{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?Gr:Xr:r?Yr:Zr).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const s=ie(t);if(!i){let a;if(s&&(a=sc[n]))return a;if(n==="hasOwnProperty")return cc}const l=Reflect.get(t,n,Oe(t)?t:o);if((bt(n)?Wr.has(n):ac(n))||(i||Ue(t,"get",n),r))return l;if(Oe(l)){const a=s&&li(n)?l:l.value;return i&&Ce(a)?Dn(a):a}return Ce(l)?i?Dn(l):yo(l):l}}class qr extends Ur{constructor(t=!1){super(!1,t)}set(t,n,o,i){let r=t[n];if(!this._isShallow){const a=Kt(r);if(!dt(o)&&!Kt(o)&&(r=ye(r),o=ye(o)),!ie(t)&&Oe(r)&&!Oe(o))return a||(r.value=o),!0}const s=ie(t)&&li(n)?Number(n)<t.length:_e(t,n),l=Reflect.set(t,n,o,Oe(t)?t:i);return t===ye(i)&&(s?tt(o,r)&&Bt(t,"set",n,o):Bt(t,"add",n,o)),l}deleteProperty(t,n){const o=_e(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)||!Wr.has(n))&&Ue(t,"has",n),o}ownKeys(t){return Ue(t,"iterate",ie(t)?"length":on),Reflect.ownKeys(t)}}class Kr extends Ur{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const uc=new qr,dc=new Kr,fc=new qr(!0),pc=new Kr(!0),xi=e=>e,mo=e=>Reflect.getPrototypeOf(e);function hc(e,t,n){return function(...o){const i=this.__v_raw,r=ye(i),s=vn(r),l=e==="entries"||e===Symbol.iterator&&s,a=e==="keys"&&s,u=i[e](...o),c=n?xi:t?xo:Ve;return!t&&Ue(r,"iterate",a?bi: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 vo(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=ye(r),l=ye(i);e||(tt(i,l)&&Ue(s,"get",i),Ue(s,"get",l));const{has:a}=mo(s),u=t?xi:e?xo:Ve;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(ye(i),"iterate",on),i.size},has(i){const r=this.__v_raw,s=ye(r),l=ye(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=ye(l),u=t?xi:e?xo:Ve;return!e&&Ue(a,"iterate",on),l.forEach((c,d)=>i.call(r,u(c),u(d),s))}};return Ie(n,e?{add:vo("add"),set:vo("set"),delete:vo("delete"),clear:vo("clear")}:{add(i){!t&&!dt(i)&&!Kt(i)&&(i=ye(i));const r=ye(this);return mo(r).has.call(r,i)||(r.add(i),Bt(r,"add",i,i)),this},set(i,r){!t&&!dt(r)&&!Kt(r)&&(r=ye(r));const s=ye(this),{has:l,get:a}=mo(s);let u=l.call(s,i);u||(i=ye(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=ye(this),{has:s,get:l}=mo(r);let a=s.call(r,i);a||(i=ye(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=ye(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 bo(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(_e(n,i)&&i in o?n:o,i,r)}const mc={get:bo(!1,!1)},vc={get:bo(!1,!0)},bc={get:bo(!0,!1)},yc={get:bo(!0,!0)},Zr=new WeakMap,Yr=new WeakMap,Xr=new WeakMap,Gr=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 yo(e){return Kt(e)?e:wo(e,!1,uc,mc,Zr)}function _c(e){return wo(e,!1,fc,vc,Yr)}function Dn(e){return wo(e,!0,dc,bc,Xr)}function Km(e){return wo(e,!0,pc,yc,Gr)}function wo(e,t,n,o,i){if(!Ce(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 yn(e){return Kt(e)?yn(e.__v_raw):!!(e&&e.__v_isReactive)}function Kt(e){return!!(e&&e.__v_isReadonly)}function dt(e){return!!(e&&e.__v_isShallow)}function _i(e){return e?!!e.__v_raw:!1}function ye(e){const t=e&&e.__v_raw;return t?ye(t):e}function Sc(e){return!_e(e,"__v_skip")&&Object.isExtensible(e)&&Mr(e,"__v_skip",!0),e}const Ve=e=>Ce(e)?yo(e):e,xo=e=>Ce(e)?Dn(e):e;function Oe(e){return e?e.__v_isRef===!0:!1}function ee(e){return Jr(e,!1)}function ft(e){return Jr(e,!0)}function Jr(e,t){return Oe(e)?e:new kc(e,t)}class kc{constructor(t,n){this.dep=new po,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:ye(t),this._value=n?t:Ve(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)||Kt(t);t=o?t:ye(t),tt(t,n)&&(this._rawValue=t,this._value=o?t:Ve(t),this.dep.trigger())}}function X(e){return Oe(e)?e.value:e}function pt(e){return de(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 Oe(i)&&!Oe(n)?(i.value=n,!0):Reflect.set(e,t,n,o)}};function Qr(e){return yn(e)?e:new Proxy(e,Cc)}class Tc{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new po,{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 es(e){return new Tc(e)}class Pc{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(ye(this._object),this._key)}}class Mc{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 Oe(e)?e:de(e)?new Mc(e):Ce(e)&&arguments.length>1?Ic(e,t,n):ee(e)}function Ic(e,t,n){const o=e[t];return Oe(o)?o:new Pc(e,t,n)}class $c{constructor(t,n,o){this.fn=t,this.setter=n,this._value=void 0,this.dep=new po(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=$n-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=o}notify(){if(this.flags|=16,!(this.flags&8)&&Me!==this)return Lr(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 Oc(e,t,n=!1){let o,i;return de(e)?o=e:(o=e.get,i=e.set),new $c(o,i,n)}const _o={},So=new WeakMap;let rn;function zc(e,t=!1,n=rn){if(n){let o=So.get(n);o||So.set(n,o=[]),o.push(e)}}function Dc(e,t,n=pe){const{immediate:o,deep:i,once:r,scheduler:s,augmentJob:l,call:a}=n,u=y=>i?y:dt(y)||i===!1||i===0?Nt(y,1):Nt(y);let c,d,f,p,_=!1,S=!1;if(Oe(e)?(d=()=>e.value,_=dt(e)):yn(e)?(d=()=>u(e),_=!0):ie(e)?(S=!0,_=e.some(y=>yn(y)||dt(y)),d=()=>e.map(y=>{if(Oe(y))return y.value;if(yn(y))return u(y);if(de(y))return a?a(y,2):y()})):de(e)?t?d=a?()=>a(e,2):e:d=()=>{if(f){Ct();try{f()}finally{Tt()}}const y=rn;rn=c;try{return a?a(e,3,[p]):e(p)}finally{rn=y}}:d=kt,t&&i){const y=d,b=i===!0?1/0:i;d=()=>Nt(y(),b)}const z=fi(),w=()=>{c.stop(),z&&z.active&&si(z.effects,c)};if(r&&t){const y=t;t=(...b)=>{y(...b),w()}}let x=S?new Array(e.length).fill(_o):_o;const D=y=>{if(!(!(c.flags&1)||!c.dirty&&!y))if(t){const b=c.run();if(i||_||(S?b.some((O,W)=>tt(O,x[W])):tt(b,x))){f&&f();const O=rn;rn=c;try{const W=[b,x===_o?void 0:S&&x[0]===_o?[]:x,p];x=b,a?a(t,3,W):t(...W)}finally{rn=O}}}else c.run()};return l&&l(D),c=new Dr(d),c.scheduler=s?()=>s(D,!1):D,p=y=>zc(y,!1,c),f=c.onStop=()=>{const y=So.get(c);if(y){if(a)a(y,4);else for(const b of y)b();So.delete(c)}},t?o?D(!0):x=c.run():s?s(D.bind(null,!0),!0):c.run(),w.pause=c.pause.bind(c),w.resume=c.resume.bind(c),w.stop=w,w}function Nt(e,t=1/0,n){if(t<=0||!Ce(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Oe(e))Nt(e.value,t,n);else if(ie(e))for(let o=0;o<e.length;o++)Nt(e[o],t,n);else if(ro(e)||vn(e))e.forEach(o=>{Nt(o,t,n)});else if(so(e)){for(const o in e)Nt(e[o],t,n);for(const o of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,o)&&Nt(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 hi(){return We}function nc(e,t=!1){We&&We.cleanups.push(e)}let Pe;const gi=new WeakSet;class Lr{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||Br(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Fr(this),Nr(this);const t=Pe,n=yt;Pe=this,yt=!0;try{return this.fn()}finally{Vr(this),Pe=t,yt=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,Fr(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 jr=0,In,On;function Br(e,t=!1){if(e.flags|=8,t){e.next=On,On=e;return}e.next=In,In=e}function mi(){jr++}function vi(){if(--jr>0)return;if(On){let t=On;for(On=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;In;){let t=In;for(In=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 Nr(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Vr(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&&(Rr(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Rr(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===$n)||(e.globalVersion=$n,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!bi(e))))return;e.flags|=2;const t=e.dep,n=Pe,o=yt;Pe=e,yt=!0;try{Nr(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{Pe=n,yt=o,Vr(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 yt=!0;const Hr=[];function Ct(){Hr.push(yt),yt=!1}function Tt(){const e=Hr.pop();yt=e===void 0?!0:e}function Fr(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Pe;Pe=void 0;try{t()}finally{Pe=n}}}let $n=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 ho{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(!Pe||!yt||Pe===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Pe)n=this.activeLink=new ic(Pe,this),Pe.deps?(n.prevDep=Pe.depsTail,Pe.depsTail.nextDep=n,Pe.depsTail=n):Pe.deps=Pe.depsTail=n,Wr(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=Pe.depsTail,n.nextDep=void 0,Pe.depsTail.nextDep=n,Pe.depsTail=n,Pe.deps===n&&(Pe.deps=o)}return n}trigger(t){this.version++,$n++,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 Wr(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)Wr(o)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const go=new WeakMap,on=Symbol(""),wi=Symbol(""),zn=Symbol("");function Ue(e,t,n){if(yt&&Pe){let o=go.get(e);o||go.set(e,o=new Map);let i=o.get(n);i||(o.set(n,i=new ho),i.map=o,i.key=n),i.track()}}function Bt(e,t,n,o,i,r){const s=go.get(e);if(!s){$n++;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===zn||!bt(f)&&f>=c)&&l(d)})}else switch((n!==void 0||s.has(void 0))&&l(s.get(n)),u&&l(s.get(zn)),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=go.get(e);return n&&n.get(t)}function vn(e){const t=we(e);return t===e?t:(Ue(t,"iterate",zn),dt(e)?t:t.map(Ne))}function mo(e){return Ue(e=we(e),"iterate",zn),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 Dn(this,"pop")},push(...e){return Dn(this,"push",e)},reduce(e,...t){return Ur(this,"reduce",e,t)},reduceRight(e,...t){return Ur(this,"reduceRight",e,t)},shift(){return Dn(this,"shift")},some(e,t){return Nt(this,"some",e,t,void 0,arguments)},splice(...e){return Dn(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 Dn(this,"unshift",e)},values(){return xi(this,"values",Ne)}};function xi(e,t,n){const o=mo(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=mo(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 Ur(e,t,n,o){const i=mo(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=we(e);Ue(o,"iterate",zn);const i=o[t](...n);return(i===-1||i===!1)&&ki(n[0])?(n[0]=we(n[0]),o[t](...n)):i}function Dn(e,t,n=[]){Ct(),mi();const o=we(e)[t].apply(e,n);return vi(),Tt(),o}const ac=rt("__proto__,__v_isRef,__isVue"),qr=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=we(this);return Ue(t,"has",e),t.hasOwnProperty(e)}class Kr{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?Qr:Jr:r?Gr:Xr).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)?qr.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&&Ce(a)?An(a):a}return Ce(l)?i?An(l):wo(l):l}}class Zr extends Kr{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=we(r),o=we(o)),!re(t)&&ze(r)&&!ze(o))return a||(r.value=o),!0}const s=re(t)&&ci(n)?Number(n)<t.length:Se(t,n),l=Reflect.set(t,n,o,ze(t)?t:i);return t===we(i)&&(s?tt(o,r)&&Bt(t,"set",n,o):Bt(t,"add",n,o)),l}deleteProperty(t,n){const o=Se(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)||!qr.has(n))&&Ue(t,"has",n),o}ownKeys(t){return Ue(t,"iterate",re(t)?"length":on),Reflect.ownKeys(t)}}class Yr extends Kr{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const uc=new Zr,dc=new Yr,fc=new Zr(!0),pc=new Yr(!0),Si=e=>e,vo=e=>Reflect.getPrototypeOf(e);function hc(e,t,n){return function(...o){const i=this.__v_raw,r=we(i),s=mn(r),l=e==="entries"||e===Symbol.iterator&&s,a=e==="keys"&&s,u=i[e](...o),c=n?Si:t?_o: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 bo(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=we(r),l=we(i);e||(tt(i,l)&&Ue(s,"get",i),Ue(s,"get",l));const{has:a}=vo(s),u=t?Si:e?_o: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(we(i),"iterate",on),i.size},has(i){const r=this.__v_raw,s=we(r),l=we(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=we(l),u=t?Si:e?_o:Ne;return!e&&Ue(a,"iterate",on),l.forEach((c,d)=>i.call(r,u(c),u(d),s))}};return Oe(n,e?{add:bo("add"),set:bo("set"),delete:bo("delete"),clear:bo("clear")}:{add(i){!t&&!dt(i)&&!Zt(i)&&(i=we(i));const r=we(this);return vo(r).has.call(r,i)||(r.add(i),Bt(r,"add",i,i)),this},set(i,r){!t&&!dt(r)&&!Zt(r)&&(r=we(r));const s=we(this),{has:l,get:a}=vo(s);let u=l.call(s,i);u||(i=we(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=we(this),{has:s,get:l}=vo(r);let a=s.call(r,i);a||(i=we(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=we(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 yo(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(Se(n,i)&&i in o?n:o,i,r)}const mc={get:yo(!1,!1)},vc={get:yo(!1,!0)},bc={get:yo(!0,!1)},yc={get:yo(!0,!0)},Xr=new WeakMap,Gr=new WeakMap,Jr=new WeakMap,Qr=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 wo(e){return Zt(e)?e:xo(e,!1,uc,mc,Xr)}function _c(e){return xo(e,!1,fc,vc,Gr)}function An(e){return xo(e,!0,dc,bc,Jr)}function Km(e){return xo(e,!0,pc,yc,Qr)}function xo(e,t,n,o,i){if(!Ce(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 we(e){const t=e&&e.__v_raw;return t?we(t):e}function Sc(e){return!Se(e,"__v_skip")&&Object.isExtensible(e)&&Ir(e,"__v_skip",!0),e}const Ne=e=>Ce(e)?wo(e):e,_o=e=>Ce(e)?An(e):e;function ze(e){return e?e.__v_isRef===!0:!1}function ee(e){return es(e,!1)}function ft(e){return es(e,!0)}function es(e,t){return ze(e)?e:new kc(e,t)}class kc{constructor(t,n){this.dep=new ho,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:we(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:we(t),tt(t,n)&&(this._rawValue=t,this._value=o?t:Ne(t),this.dep.trigger())}}function X(e){return ze(e)?e.value:e}function pt(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 ts(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 ho,{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 ns(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(we(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):Ce(e)&&arguments.length>1?Ic(e,t,n):ee(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 ho(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=$n-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=o}notify(){if(this.flags|=16,!(this.flags&8)&&Pe!==this)return Br(this,!0),!0}get value(){const t=this.dep.track();return Rr(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 So={},ko=new WeakMap;let rn;function zc(e,t=!1,n=rn){if(n){let o=ko.get(n);o||ko.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=g=>i?g:dt(g)||i===!1||i===0?Vt(g,1):Vt(g);let c,d,f,p,y=!1,w=!1;if(ze(e)?(d=()=>e.value,y=dt(e)):bn(e)?(d=()=>u(e),y=!0):re(e)?(w=!0,y=e.some(g=>bn(g)||dt(g)),d=()=>e.map(g=>{if(ze(g))return g.value;if(bn(g))return u(g);if(fe(g))return a?a(g,2):g()})):fe(e)?t?d=a?()=>a(e,2):e:d=()=>{if(f){Ct();try{f()}finally{Tt()}}const g=rn;rn=c;try{return a?a(e,3,[p]):e(p)}finally{rn=g}}:d=kt,t&&i){const g=d,m=i===!0?1/0:i;d=()=>Vt(g(),m)}const z=hi(),E=()=>{c.stop(),z&&z.active&&ai(z.effects,c)};if(r&&t){const g=t;t=(...m)=>{g(...m),E()}}let T=w?new Array(e.length).fill(So):So;const _=g=>{if(!(!(c.flags&1)||!c.dirty&&!g))if(t){const m=c.run();if(i||y||(w?m.some((D,H)=>tt(D,T[H])):tt(m,T))){f&&f();const D=rn;rn=c;try{const H=[m,T===So?void 0:w&&T[0]===So?[]:T,p];T=m,a?a(t,3,H):t(...H)}finally{rn=D}}}else c.run()};return l&&l(_),c=new Lr(d),c.scheduler=s?()=>s(_,!1):_,p=g=>zc(g,!1,c),f=c.onStop=()=>{const g=ko.get(c);if(g){if(a)a(g,4);else for(const m of g)m();ko.delete(c)}},t?o?_(!0):T=c.run():s?s(_.bind(null,!0),!0):c.run(),E.pause=c.pause.bind(c),E.resume=c.resume.bind(c),E.stop=E,E}function Vt(e,t=1/0,n){if(t<=0||!Ce(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(so(e)||mn(e))e.forEach(o=>{Vt(o,t,n)});else if(lo(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
|
|
13
|
+
**/const Ln=[];let Ci=!1;function Zm(e,...t){if(Ci)return;Ci=!0,Ct();const n=Ln.length?Ln[Ln.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 <${il(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(),
|
|
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 <${nl(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(...ts(o,e[o]))}),n.length>3&&t.push(" ..."),t}function ts(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}`]:Oe(t)?(t=ts(e,ye(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):de(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=ye(t),n?t:[`${e}=`,t])}function wn(e,t,n,o){try{return o?e(...o):e()}catch(i){ko(i,t,n)}}function wt(e,t,n,o){if(de(e)){const i=wn(e,t,n,o);return i&&Tr(i)&&i.catch(r=>{ko(r,t,n)}),i}if(ie(e)){const i=[];for(let r=0;r<e.length;r++)i.push(wt(e[r],t,n,o));return i}}function ko(e,t,n,o=!0){const i=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:s}=t&&t.appContext.config||pe;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(),wn(r,null,10,[e,a,u]),Tt();return}}Vc(e,n,i,o,s)}function Vc(e,t,n,o=!0,i=!1){if(i)throw e;console.error(e)}const Ze=[];let Pt=-1;const xn=[];let Zt=null,_n=0;const ns=Promise.resolve();let Co=null;function xt(e){const t=Co||ns;return e?t.then(this?e.bind(this):e):t}function Nc(e){let t=Pt+1,n=Ze.length;for(;t<n;){const o=t+n>>>1,i=Ze[o],r=Ln(i);r<e||r===e&&i.flags&2?t=o+1:n=o}return t}function ki(e){if(!(e.flags&1)){const t=Ln(e),n=Ze[Ze.length-1];!n||!(e.flags&2)&&t>=Ln(n)?Ze.push(e):Ze.splice(Nc(t),0,e),e.flags|=1,os()}}function os(){Co||(Co=ns.then(ss))}function Rc(e){ie(e)?xn.push(...e):Zt&&e.id===-1?Zt.splice(_n+1,0,e):e.flags&1||(xn.push(e),e.flags|=1),os()}function is(e,t,n=Pt+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 rs(e){if(xn.length){const t=[...new Set(xn)].sort((n,o)=>Ln(n)-Ln(o));if(xn.length=0,Zt){Zt.push(...t);return}for(Zt=t,_n=0;_n<Zt.length;_n++){const n=Zt[_n];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Zt=null,_n=0}}const Ln=e=>e.id==null?e.flags&2?-1:1/0:e.id;function ss(e){try{for(Pt=0;Pt<Ze.length;Pt++){const t=Ze[Pt];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),wn(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Pt<Ze.length;Pt++){const t=Ze[Pt];t&&(t.flags&=-2)}Pt=-1,Ze.length=0,rs(),Co=null,(Ze.length||xn.length)&&ss()}}let Ne=null,ls=null;function To(e){const t=Ne;return Ne=e,ls=e&&e.type.__scopeId||null,t}function ne(e,t=Ne,n){if(!t||e._n)return e;const o=(...i)=>{o._d&&jo(-1);const r=To(t);let s;try{s=e(...i)}finally{To(r),o._d&&jo(1)}return s};return o._n=!0,o._c=!0,o._d=!0,o}function Le(e,t){if(Ne===null)return e;const n=No(Ne),o=e.dirs||(e.dirs=[]);for(let i=0;i<t.length;i++){let[r,s,l,a=pe]=t[i];r&&(de(r)&&(r={mounted:r,updated:r}),r.deep&&Nt(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(),wt(a,n,8,[e.el,l,e,t]),Tt())}}const Hc=Symbol("_vte"),as=e=>e.__isTeleport,Rt=Symbol("_leaveCb"),Po=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],cs={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},us=e=>{const t=e.subTree;return t.component?us(t.component):t},Wc={name:"BaseTransition",props:cs,setup(e,{slots:t}){const n=un(),o=Fc();return()=>{const i=t.default&&hs(t.default(),!0);if(!i||!i.length)return;const r=ds(i),s=ye(e),{mode:l}=s;if(o.isLeaving)return Ti(r);const a=ps(r);if(!a)return Ti(r);let u=Ci(a,s,o,n,d=>u=d);a.type!==qe&&jn(a,u);let c=n.subTree&&ps(n.subTree);if(c&&c.type!==qe&&!cn(c,a)&&us(n).type!==qe){let d=Ci(c,s,o,n);if(jn(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},Ti(r);l==="in-out"&&a.type!==qe?d.delayLeave=(f,p,_)=>{const S=fs(o,c);S[String(c.key)]=c,f[Rt]=()=>{p(),f[Rt]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{_(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return r}}};function ds(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 fs(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 Ci(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:_,onLeaveCancelled:S,onBeforeAppear:z,onAppear:w,onAfterAppear:x,onAppearCancelled:D}=t,y=String(e.key),b=fs(n,e),O=(N,U)=>{N&&wt(N,o,9,U)},W=(N,U)=>{const F=U[1];O(N,U),ie(N)?N.every(P=>P.length<=1)&&F():N.length<=1&&F()},Y={mode:s,persisted:l,beforeEnter(N){let U=a;if(!n.isMounted)if(r)U=z||a;else return;N[Rt]&&N[Rt](!0);const F=b[y];F&&cn(e,F)&&F.el[Rt]&&F.el[Rt](),O(U,[N])},enter(N){let U=u,F=c,P=d;if(!n.isMounted)if(r)U=w||u,F=x||c,P=D||d;else return;let Z=!1;const k=N[Po]=G=>{Z||(Z=!0,G?O(P,[N]):O(F,[N]),Y.delayedLeave&&Y.delayedLeave(),N[Po]=void 0)};U?W(U,[N,k]):k()},leave(N,U){const F=String(e.key);if(N[Po]&&N[Po](!0),n.isUnmounting)return U();O(f,[N]);let P=!1;const Z=N[Rt]=k=>{P||(P=!0,U(),k?O(S,[N]):O(_,[N]),N[Rt]=void 0,b[F]===e&&delete b[F])};b[F]=e,p?W(p,[N,Z]):Z()},clone(N){const U=Ci(N,t,n,o,i);return i&&i(U),U}};return Y}function Ti(e){if(Eo(e))return e=Xt(e),e.children=null,e}function ps(e){if(!Eo(e))return as(e.type)&&e.children?ds(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&&de(n.default))return n.default()}}function jn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,jn(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 hs(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===be?(s.patchFlag&128&&i++,o=o.concat(hs(s.children,t,l))):(t||s.type!==qe)&&o.push(l!=null?Xt(s,{key:l}):s)}if(i>1)for(let r=0;r<o.length;r++)o[r].patchFlag=-2;return o}function fe(e,t){return de(e)?Ie({name:e.name},t,{setup:e}):e}function gs(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const Mo=new WeakMap;function Bn(e,t,n,o,i=!1){if(ie(e)){e.forEach((_,S)=>Bn(_,t&&(ie(t)?t[S]:t),n,o,i));return}if(Sn(o)&&!i){o.shapeFlag&512&&o.type.__asyncResolved&&o.component.subTree.component&&Bn(e,t,n,o.component.subTree);return}const r=o.shapeFlag&4?No(o.component):o.el,s=i?null:r,{i:l,r:a}=e,u=t&&t.r,c=l.refs===pe?l.refs={}:l.refs,d=l.setupState,f=ye(d),p=d===pe?kr:_=>_e(f,_);if(u!=null&&u!==a){if(ms(t),$e(u))c[u]=null,p(u)&&(d[u]=null);else if(Oe(u)){u.value=null;const _=t;_.k&&(c[_.k]=null)}}if(de(a))wn(a,l,12,[s,c]);else{const _=$e(a),S=Oe(a);if(_||S){const z=()=>{if(e.f){const w=_?p(a)?d[a]:c[a]:a.value;if(i)ie(w)&&si(w,r);else if(ie(w))w.includes(r)||w.push(r);else if(_)c[a]=[r],p(a)&&(d[a]=c[a]);else{const x=[r];a.value=x,e.k&&(c[e.k]=x)}}else _?(c[a]=s,p(a)&&(d[a]=s)):S&&(a.value=s,e.k&&(c[e.k]=s))};if(s){const w=()=>{z(),Mo.delete(e)};w.id=-1,Mo.set(e,w),lt(w,n)}else ms(e),z()}}}function ms(e){const t=Mo.get(e);t&&(t.flags|=8,Mo.delete(e))}uo().requestIdleCallback,uo().cancelIdleCallback;const Sn=e=>!!e.type.__asyncLoader,Eo=e=>e.type.__isKeepAlive;function qc(e,t){vs(e,"a",t)}function Kc(e,t){vs(e,"da",t)}function vs(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(Io(t,o,n),n){let i=n.parent;for(;i&&i.parent;)Eo(i.parent.vnode)&&Zc(o,t,n,i),i=i.parent}}function Zc(e,t,n,o){const i=Io(t,e,o,!0);Mt(()=>{si(o[t],i)},n)}function Io(e,t,n=Ke,o=!1){if(n){const i=n[e]||(n[e]=[]),r=t.__weh||(t.__weh=(...s)=>{Ct();const l=Un(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)=>{(!qn||e==="sp")&&Io(e,(...o)=>t(...o),n)},Yc=Ht("bm"),je=Ht("m"),Xc=Ht("bu"),Gc=Ht("u"),Pi=Ht("bum"),Mt=Ht("um"),Jc=Ht("sp"),Qc=Ht("rtg"),eu=Ht("rtc");function bs(e,t=Ke){Io("ec",e,t)}const tu="components",ys=Symbol.for("v-ndc");function ws(e){return $e(e)?nu(tu,e,!1)||e:e||ys}function nu(e,t,n=!0,o=!1){const i=Ne||Ke;if(i){const r=i.type;{const l=tl(r,!1);if(l&&(l===t||l===He(t)||l===ao(He(t))))return r}const s=xs(i[e]||r[e],t)||xs(i.appContext[e],t);return!s&&o?r:s}}function xs(e,t){return e&&(e[t]||e[He(t)]||e[ao(He(t))])}function Yt(e,t,n,o){let i;const r=n,s=ie(e);if(s||$e(e)){const l=s&&yn(e);let a=!1,u=!1;l&&(a=!dt(e),u=Kt(e),e=go(e)),i=new Array(e.length);for(let c=0,d=e.length;c<d;c++)i[c]=t(a?u?xo(Ve(e[c])):Ve(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(Ce(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 Mi(e,t){for(let n=0;n<t.length;n++){const o=t[n];if(ie(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 xe(e,t,n={},o,i){if(Ne.ce||Ne.parent&&Sn(Ne.parent)&&Ne.parent.ce){const u=Object.keys(n).length>0;return t!=="default"&&(n.name=t),v(),oe(be,null,[L("slot",n,o&&o())],u?-2:64)}let r=e[t];r&&r._c&&(r._d=!1),v();const s=r&&_s(r(n)),l=n.key||s&&s.key,a=oe(be,{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 _s(e){return e.some(t=>Wn(t)?!(t.type===qe||t.type===be&&!_s(t.children)):!0)?e:null}const Ei=e=>e?Js(e)?No(e):Ei(e.parent):null,Vn=Ie(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=>Ei(e.parent),$root:e=>Ei(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Cs(e),$forceUpdate:e=>e.f||(e.f=()=>{ki(e.update)}),$nextTick:e=>e.n||(e.n=xt.bind(e.proxy)),$watch:e=>ku.bind(e)}),Ii=(e,t)=>e!==pe&&!e.__isScriptSetup&&_e(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(Ii(o,t))return s[t]=1,o[t];if(i!==pe&&_e(i,t))return s[t]=2,i[t];if((u=e.propsOptions[0])&&_e(u,t))return s[t]=3,r[t];if(n!==pe&&_e(n,t))return s[t]=4,n[t];$i&&(s[t]=0)}}const c=Vn[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!==pe&&_e(n,t))return s[t]=4,n[t];if(f=a.config.globalProperties,_e(f,t))return f[t]},set({_:e},t,n){const{data:o,setupState:i,ctx:r}=e;return Ii(i,t)?(i[t]=n,!0):o!==pe&&_e(o,t)?(o[t]=n,!0):_e(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!==pe&&l[0]!=="$"&&_e(e,l)||Ii(t,l)||(a=r[0])&&_e(a,l)||_e(o,l)||_e(Vn,l)||_e(i.config.globalProperties,l)||(u=s.__cssModules)&&u[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:_e(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function $o(e){return ie(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function Ye(e,t){return!e||!t?e||t:ie(e)&&ie(t)?e.concat(t):Ie({},$o(e),$o(t))}let $i=!0;function iu(e){const t=Cs(e),n=e.proxy,o=e.ctx;$i=!1,t.beforeCreate&&Ss(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:_,activated:S,deactivated:z,beforeDestroy:w,beforeUnmount:x,destroyed:D,unmounted:y,render:b,renderTracked:O,renderTriggered:W,errorCaptured:Y,serverPrefetch:N,expose:U,inheritAttrs:F,components:P,directives:Z,filters:k}=t;if(u&&ru(u,o,null),s)for(const g in s){const T=s[g];de(T)&&(o[g]=T.bind(n))}if(i){const g=i.call(n,n);Ce(g)&&(e.data=yo(g))}if($i=!0,r)for(const g in r){const T=r[g],R=de(T)?T.bind(n,n):de(T.get)?T.get.bind(n,n):kt,$=!de(T)&&de(T.set)?T.set.bind(n):kt,ge=Q({get:R,set:$});Object.defineProperty(o,g,{enumerable:!0,configurable:!0,get:()=>ge.value,set:ae=>ge.value=ae})}if(l)for(const g in l)ks(l[g],o,n,g);if(a){const g=de(a)?a.call(n):a;Reflect.ownKeys(g).forEach(T=>{Rn(T,g[T])})}c&&Ss(c,e,"c");function q(g,T){ie(T)?T.forEach(R=>g(R.bind(n))):T&&g(T.bind(n))}if(q(Yc,d),q(je,f),q(Xc,p),q(Gc,_),q(qc,S),q(Kc,z),q(bs,Y),q(eu,O),q(Qc,W),q(Pi,x),q(Mt,y),q(Jc,N),ie(U))if(U.length){const g=e.exposed||(e.exposed={});U.forEach(T=>{Object.defineProperty(g,T,{get:()=>n[T],set:R=>n[T]=R,enumerable:!0})})}else e.exposed||(e.exposed={});b&&e.render===kt&&(e.render=b),F!=null&&(e.inheritAttrs=F),P&&(e.components=P),Z&&(e.directives=Z),N&&gs(e)}function ru(e,t,n=kt){ie(e)&&(e=Oi(e));for(const o in e){const i=e[o];let r;Ce(i)?"default"in i?r=Ft(i.from||o,i.default,!0):r=Ft(i.from||o):r=Ft(i),Oe(r)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>r.value,set:s=>r.value=s}):t[o]=r}}function Ss(e,t,n){wt(ie(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function ks(e,t,n,o){let i=o.includes(".")?Fs(n,o):()=>n[o];if($e(e)){const r=t[e];de(r)&&ue(i,r)}else if(de(e))ue(i,e.bind(n));else if(Ce(e))if(ie(e))e.forEach(r=>ks(r,t,n,o));else{const r=de(e.handler)?e.handler.bind(n):t[e.handler];de(r)&&ue(i,r,e)}}function Cs(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=>Oo(a,u,s,!0)),Oo(a,t,s)),Ce(t)&&r.set(t,a),a}function Oo(e,t,n,o=!1){const{mixins:i,extends:r}=t;r&&Oo(e,r,n,!0),i&&i.forEach(s=>Oo(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:Ts,props:Ps,emits:Ps,methods:Nn,computed:Nn,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:Nn,directives:Nn,watch:au,provide:Ts,inject:lu};function Ts(e,t){return t?e?function(){return Ie(de(e)?e.call(this,this):e,de(t)?t.call(this,this):t)}:t:e}function lu(e,t){return Nn(Oi(e),Oi(t))}function Oi(e){if(ie(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 Nn(e,t){return e?Ie(Object.create(null),e,t):t}function Ps(e,t){return e?ie(e)&&ie(t)?[...new Set([...e,...t])]:Ie(Object.create(null),$o(e),$o(t??{})):t}function au(e,t){if(!e)return t;if(!t)return e;const n=Ie(Object.create(null),e);for(const o in t)n[o]=Xe(e[o],t[o]);return n}function Ms(){return{app:null,config:{isNativeTag:kr,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){de(o)||(o=Ie({},o)),i!=null&&!Ce(i)&&(i=null);const r=Ms(),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&&de(c.install)?(s.add(c),c.install(u,...d)):de(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||L(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,No(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=ln;ln=u;try{return c()}finally{ln=d}}};return u}}let ln=null;function Rn(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&&de(t)?t.call(o&&o.proxy):t}}function Es(){return!!(un()||ln)}const Is={},$s=()=>Object.create(Is),Os=e=>Object.getPrototypeOf(e)===Is;function du(e,t,n,o=!1){const i={},r=$s();e.propsDefaults=Object.create(null),zs(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=ye(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(Do(e.emitsOptions,f))continue;const p=t[f];if(a)if(_e(r,f))p!==r[f]&&(r[f]=p,u=!0);else{const _=He(f);i[_]=zi(a,l,_,p,e,!1)}else p!==r[f]&&(r[f]=p,u=!0)}}}else{zs(e,t,i,r)&&(u=!0);let c;for(const d in l)(!t||!_e(t,d)&&((c=et(d))===d||!_e(t,c)))&&(a?n&&(n[d]!==void 0||n[c]!==void 0)&&(i[d]=zi(a,l,d,void 0,e,!0)):delete i[d]);if(r!==l)for(const d in r)(!t||!_e(t,d))&&(delete r[d],u=!0)}u&&Bt(e.attrs,"set","")}function zs(e,t,n,o){const[i,r]=e.propsOptions;let s=!1,l;if(t)for(let a in t){if(Mn(a))continue;const u=t[a];let c;i&&_e(i,c=He(a))?!r||!r.includes(c)?n[c]=u:(l||(l={}))[c]=u:Do(e.emitsOptions,a)||(!(a in o)||u!==o[a])&&(o[a]=u,s=!0)}if(r){const a=ye(n),u=l||pe;for(let c=0;c<r.length;c++){const d=r[c];n[d]=zi(i,a,d,u[d],e,!_e(u,d))}}return s}function zi(e,t,n,o,i,r){const s=e[n];if(s!=null){const l=_e(s,"default");if(l&&o===void 0){const a=s.default;if(s.type!==Function&&!s.skipFactory&&de(a)){const{propsDefaults:u}=i;if(n in u)o=u[n];else{const c=Un(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 Ds(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(!de(e)){const c=d=>{a=!0;const[f,p]=Ds(d,t,!0);Ie(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 Ce(e)&&o.set(e,vt),vt;if(ie(r))for(let c=0;c<r.length;c++){const d=He(r[c]);As(d)&&(s[d]=pe)}else if(r)for(const c in r){const d=He(c);if(As(d)){const f=r[c],p=s[d]=ie(f)||de(f)?{type:f}:Ie({},f),_=p.type;let S=!1,z=!0;if(ie(_))for(let w=0;w<_.length;++w){const x=_[w],D=de(x)&&x.name;if(D==="Boolean"){S=!0;break}else D==="String"&&(z=!1)}else S=de(_)&&_.name==="Boolean";p[0]=S,p[1]=z,(S||_e(p,"default"))&&l.push(d)}}const u=[s,l];return Ce(e)&&o.set(e,u),u}function As(e){return e[0]!=="$"&&!Mn(e)}const Di=e=>e==="_"||e==="_ctx"||e==="$stable",Ai=e=>ie(e)?e.map(Et):[Et(e)],hu=(e,t,n)=>{if(t._n)return t;const o=ne((...i)=>Ai(t(...i)),n);return o._c=!1,o},Ls=(e,t,n)=>{const o=e._ctx;for(const i in e){if(Di(i))continue;const r=e[i];if(de(r))t[i]=hu(i,r,o);else if(r!=null){const s=Ai(r);t[i]=()=>s}}},js=(e,t)=>{const n=Ai(t);e.slots.default=()=>n},Bs=(e,t,n)=>{for(const o in t)(n||!Di(o))&&(e[o]=t[o])},gu=(e,t,n)=>{const o=e.slots=$s();if(e.vnode.shapeFlag&32){const i=t._;i?(Bs(o,t,n),n&&Mr(o,"_",i,!0)):Ls(t,o)}else t&&js(e,t)},mu=(e,t,n)=>{const{vnode:o,slots:i}=e;let r=!0,s=pe;if(o.shapeFlag&32){const l=t._;l?n&&l===1?r=!1:Bs(i,t,n):(r=!t.$stable,Ls(t,i)),s=t}else t&&(js(e,t),s={default:1});if(r)for(const l in i)!Di(l)&&s[l]==null&&delete i[l]},lt=$u;function vu(e){return bu(e)}function bu(e,t){const n=uo();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:_}=e,S=(h,m,M,H=null,j=null,V=null,E=void 0,C=null,B=!!m.dynamicChildren)=>{if(h===m)return;h&&!cn(h,m)&&(H=Re(h),ae(h,j,V,!0),h=null),m.patchFlag===-2&&(B=!1,m.dynamicChildren=null);const{type:A,ref:re,shapeFlag:te}=m;switch(A){case Ao:z(h,m,M,H);break;case qe:w(h,m,M,H);break;case Lo:h==null&&x(m,M,H,E);break;case be:P(h,m,M,H,j,V,E,C,B);break;default:te&1?b(h,m,M,H,j,V,E,C,B):te&6?Z(h,m,M,H,j,V,E,C,B):(te&64||te&128)&&A.process(h,m,M,H,j,V,E,C,B,Qe)}re!=null&&j?Bn(re,h&&h.ref,V,m||h,!m):re==null&&h&&h.ref!=null&&Bn(h.ref,null,V,h,!0)},z=(h,m,M,H)=>{if(h==null)o(m.el=l(m.children),M,H);else{const j=m.el=h.el;m.children!==h.children&&u(j,m.children)}},w=(h,m,M,H)=>{h==null?o(m.el=a(m.children||""),M,H):m.el=h.el},x=(h,m,M,H)=>{[h.el,h.anchor]=_(h.children,m,M,H,h.el,h.anchor)},D=({el:h,anchor:m},M,H)=>{let j;for(;h&&h!==m;)j=f(h),o(h,M,H),h=j;o(m,M,H)},y=({el:h,anchor:m})=>{let M;for(;h&&h!==m;)M=f(h),i(h),h=M;i(m)},b=(h,m,M,H,j,V,E,C,B)=>{if(m.type==="svg"?E="svg":m.type==="math"&&(E="mathml"),h==null)O(m,M,H,j,V,E,C,B);else{const A=h.el&&h.el._isVueCE?h.el:null;try{A&&A._beginPatch(),N(h,m,j,V,E,C,B)}finally{A&&A._endPatch()}}},O=(h,m,M,H,j,V,E,C)=>{let B,A;const{props:re,shapeFlag:te,transition:J,dirs:le}=h;if(B=h.el=s(h.type,V,re&&re.is,re),te&8?c(B,h.children):te&16&&Y(h.children,B,null,H,j,Li(h,V),E,C),le&&sn(h,null,H,"created"),W(B,h,h.scopeId,E,H),re){for(const Ee in re)Ee!=="value"&&!Mn(Ee)&&r(B,Ee,null,re[Ee],V,H);"value"in re&&r(B,"value",null,re.value,V),(A=re.onVnodeBeforeMount)&&It(A,H,h)}le&&sn(h,null,H,"beforeMount");const we=yu(j,J);we&&J.beforeEnter(B),o(B,m,M),((A=re&&re.onVnodeMounted)||we||le)&<(()=>{A&&It(A,H,h),we&&J.enter(B),le&&sn(h,null,H,"mounted")},j)},W=(h,m,M,H,j)=>{if(M&&p(h,M),H)for(let V=0;V<H.length;V++)p(h,H[V]);if(j){let V=j.subTree;if(m===V||Zs(V.type)&&(V.ssContent===m||V.ssFallback===m)){const E=j.vnode;W(h,E,E.scopeId,E.slotScopeIds,j.parent)}}},Y=(h,m,M,H,j,V,E,C,B=0)=>{for(let A=B;A<h.length;A++){const re=h[A]=C?Gt(h[A]):Et(h[A]);S(null,re,m,M,H,j,V,E,C)}},N=(h,m,M,H,j,V,E)=>{const C=m.el=h.el;let{patchFlag:B,dynamicChildren:A,dirs:re}=m;B|=h.patchFlag&16;const te=h.props||pe,J=m.props||pe;let le;if(M&&an(M,!1),(le=J.onVnodeBeforeUpdate)&&It(le,M,m,h),re&&sn(m,h,M,"beforeUpdate"),M&&an(M,!0),(te.innerHTML&&J.innerHTML==null||te.textContent&&J.textContent==null)&&c(C,""),A?U(h.dynamicChildren,A,C,M,H,Li(m,j),V):E||T(h,m,C,null,M,H,Li(m,j),V,!1),B>0){if(B&16)F(C,te,J,M,j);else if(B&2&&te.class!==J.class&&r(C,"class",null,J.class,j),B&4&&r(C,"style",te.style,J.style,j),B&8){const we=m.dynamicProps;for(let Ee=0;Ee<we.length;Ee++){const Pe=we[Ee],it=te[Pe],rt=J[Pe];(rt!==it||Pe==="value")&&r(C,Pe,it,rt,j,M)}}B&1&&h.children!==m.children&&c(C,m.children)}else!E&&A==null&&F(C,te,J,M,j);((le=J.onVnodeUpdated)||re)&<(()=>{le&&It(le,M,m,h),re&&sn(m,h,M,"updated")},H)},U=(h,m,M,H,j,V,E)=>{for(let C=0;C<m.length;C++){const B=h[C],A=m[C],re=B.el&&(B.type===be||!cn(B,A)||B.shapeFlag&198)?d(B.el):M;S(B,A,re,null,H,j,V,E,!0)}},F=(h,m,M,H,j)=>{if(m!==M){if(m!==pe)for(const V in m)!Mn(V)&&!(V in M)&&r(h,V,m[V],null,j,H);for(const V in M){if(Mn(V))continue;const E=M[V],C=m[V];E!==C&&V!=="value"&&r(h,V,C,E,j,H)}"value"in M&&r(h,"value",m.value,M.value,j)}},P=(h,m,M,H,j,V,E,C,B)=>{const A=m.el=h?h.el:l(""),re=m.anchor=h?h.anchor:l("");let{patchFlag:te,dynamicChildren:J,slotScopeIds:le}=m;le&&(C=C?C.concat(le):le),h==null?(o(A,M,H),o(re,M,H),Y(m.children||[],M,re,j,V,E,C,B)):te>0&&te&64&&J&&h.dynamicChildren?(U(h.dynamicChildren,J,M,j,V,E,C),(m.key!=null||j&&m===j.subTree)&&Vs(h,m,!0)):T(h,m,M,re,j,V,E,C,B)},Z=(h,m,M,H,j,V,E,C,B)=>{m.slotScopeIds=C,h==null?m.shapeFlag&512?j.ctx.activate(m,M,H,E,B):k(m,M,H,j,V,E,B):G(h,m,B)},k=(h,m,M,H,j,V,E)=>{const C=h.component=Bu(h,H,j);if(Eo(h)&&(C.ctx.renderer=Qe),Vu(C,!1,E),C.asyncDep){if(j&&j.registerDep(C,q,E),!h.el){const B=C.subTree=L(qe);w(null,B,m,M),h.placeholder=B.el}}else q(C,h,m,M,j,V,E)},G=(h,m,M)=>{const H=m.component=h.component;if(Eu(h,m,M))if(H.asyncDep&&!H.asyncResolved){g(H,m,M);return}else H.next=m,H.update();else m.el=h.el,H.vnode=m},q=(h,m,M,H,j,V,E)=>{const C=()=>{if(h.isMounted){let{next:te,bu:J,u:le,parent:we,vnode:Ee}=h;{const Lt=Ns(h);if(Lt){te&&(te.el=Ee.el,g(h,te,E)),Lt.asyncDep.then(()=>{h.isUnmounted||C()});return}}let Pe=te,it;an(h,!1),te?(te.el=Ee.el,g(h,te,E)):te=Ee,J&&co(J),(it=te.props&&te.props.onVnodeBeforeUpdate)&&It(it,we,te,Ee),an(h,!0);const rt=qs(h),At=h.subTree;h.subTree=rt,S(At,rt,d(At.el),Re(At),h,j,V),te.el=rt.el,Pe===null&&Iu(h,rt.el),le&<(le,j),(it=te.props&&te.props.onVnodeUpdated)&<(()=>It(it,we,te,Ee),j)}else{let te;const{el:J,props:le}=m,{bm:we,m:Ee,parent:Pe,root:it,type:rt}=h,At=Sn(m);an(h,!1),we&&co(we),!At&&(te=le&&le.onVnodeBeforeMount)&&It(te,Pe,m),an(h,!0);{it.ce&&it.ce._def.shadowRoot!==!1&&it.ce._injectChildStyle(rt);const Lt=h.subTree=qs(h);S(null,Lt,M,H,h,j,V),m.el=Lt.el}if(Ee&<(Ee,j),!At&&(te=le&&le.onVnodeMounted)){const Lt=m;lt(()=>It(te,Pe,Lt),j)}(m.shapeFlag&256||Pe&&Sn(Pe.vnode)&&Pe.vnode.shapeFlag&256)&&h.a&<(h.a,j),h.isMounted=!0,m=M=H=null}};h.scope.on();const B=h.effect=new Dr(C);h.scope.off();const A=h.update=B.run.bind(B),re=h.job=B.runIfDirty.bind(B);re.i=h,re.id=h.uid,B.scheduler=()=>ki(re),an(h,!0),A()},g=(h,m,M)=>{m.component=h;const H=h.vnode.props;h.vnode=m,h.next=null,fu(h,m.props,H,M),mu(h,m.children,M),Ct(),is(h),Tt()},T=(h,m,M,H,j,V,E,C,B=!1)=>{const A=h&&h.children,re=h?h.shapeFlag:0,te=m.children,{patchFlag:J,shapeFlag:le}=m;if(J>0){if(J&128){$(A,te,M,H,j,V,E,C,B);return}else if(J&256){R(A,te,M,H,j,V,E,C,B);return}}le&8?(re&16&&De(A,j,V),te!==A&&c(M,te)):re&16?le&16?$(A,te,M,H,j,V,E,C,B):De(A,j,V,!0):(re&8&&c(M,""),le&16&&Y(te,M,H,j,V,E,C,B))},R=(h,m,M,H,j,V,E,C,B)=>{h=h||vt,m=m||vt;const A=h.length,re=m.length,te=Math.min(A,re);let J;for(J=0;J<te;J++){const le=m[J]=B?Gt(m[J]):Et(m[J]);S(h[J],le,M,null,j,V,E,C,B)}A>re?De(h,j,V,!0,!1,te):Y(m,M,H,j,V,E,C,B,te)},$=(h,m,M,H,j,V,E,C,B)=>{let A=0;const re=m.length;let te=h.length-1,J=re-1;for(;A<=te&&A<=J;){const le=h[A],we=m[A]=B?Gt(m[A]):Et(m[A]);if(cn(le,we))S(le,we,M,null,j,V,E,C,B);else break;A++}for(;A<=te&&A<=J;){const le=h[te],we=m[J]=B?Gt(m[J]):Et(m[J]);if(cn(le,we))S(le,we,M,null,j,V,E,C,B);else break;te--,J--}if(A>te){if(A<=J){const le=J+1,we=le<re?m[le].el:H;for(;A<=J;)S(null,m[A]=B?Gt(m[A]):Et(m[A]),M,we,j,V,E,C,B),A++}}else if(A>J)for(;A<=te;)ae(h[A],j,V,!0),A++;else{const le=A,we=A,Ee=new Map;for(A=we;A<=J;A++){const ut=m[A]=B?Gt(m[A]):Et(m[A]);ut.key!=null&&Ee.set(ut.key,A)}let Pe,it=0;const rt=J-we+1;let At=!1,Lt=0;const oo=new Array(rt);for(A=0;A<rt;A++)oo[A]=0;for(A=le;A<=te;A++){const ut=h[A];if(it>=rt){ae(ut,j,V,!0);continue}let jt;if(ut.key!=null)jt=Ee.get(ut.key);else for(Pe=we;Pe<=J;Pe++)if(oo[Pe-we]===0&&cn(ut,m[Pe])){jt=Pe;break}jt===void 0?ae(ut,j,V,!0):(oo[jt-we]=A+1,jt>=Lt?Lt=jt:At=!0,S(ut,m[jt],M,null,j,V,E,C,B),it++)}const Ha=At?wu(oo):vt;for(Pe=Ha.length-1,A=rt-1;A>=0;A--){const ut=we+A,jt=m[ut],Fa=m[ut+1],Wa=ut+1<re?Fa.el||Fa.placeholder:H;oo[A]===0?S(null,jt,M,Wa,j,V,E,C,B):At&&(Pe<0||A!==Ha[Pe]?ge(jt,M,Wa,2):Pe--)}}},ge=(h,m,M,H,j=null)=>{const{el:V,type:E,transition:C,children:B,shapeFlag:A}=h;if(A&6){ge(h.component.subTree,m,M,H);return}if(A&128){h.suspense.move(m,M,H);return}if(A&64){E.move(h,m,M,Qe);return}if(E===be){o(V,m,M);for(let te=0;te<B.length;te++)ge(B[te],m,M,H);o(h.anchor,m,M);return}if(E===Lo){D(h,m,M);return}if(H!==2&&A&1&&C)if(H===0)C.beforeEnter(V),o(V,m,M),lt(()=>C.enter(V),j);else{const{leave:te,delayLeave:J,afterLeave:le}=C,we=()=>{h.ctx.isUnmounted?i(V):o(V,m,M)},Ee=()=>{V._isLeaving&&V[Rt](!0),te(V,()=>{we(),le&&le()})};J?J(V,we,Ee):Ee()}else o(V,m,M)},ae=(h,m,M,H=!1,j=!1)=>{const{type:V,props:E,ref:C,children:B,dynamicChildren:A,shapeFlag:re,patchFlag:te,dirs:J,cacheIndex:le}=h;if(te===-2&&(j=!1),C!=null&&(Ct(),Bn(C,null,M,h,!0),Tt()),le!=null&&(m.renderCache[le]=void 0),re&256){m.ctx.deactivate(h);return}const we=re&1&&J,Ee=!Sn(h);let Pe;if(Ee&&(Pe=E&&E.onVnodeBeforeUnmount)&&It(Pe,m,h),re&6)Te(h.component,M,H);else{if(re&128){h.suspense.unmount(M,H);return}we&&sn(h,null,m,"beforeUnmount"),re&64?h.type.remove(h,m,M,Qe,H):A&&!A.hasOnce&&(V!==be||te>0&&te&64)?De(A,m,M,!1,!0):(V===be&&te&384||!j&&re&16)&&De(B,m,M),H&&he(h)}(Ee&&(Pe=E&&E.onVnodeUnmounted)||we)&<(()=>{Pe&&It(Pe,m,h),we&&sn(h,null,m,"unmounted")},M)},he=h=>{const{type:m,el:M,anchor:H,transition:j}=h;if(m===be){me(M,H);return}if(m===Lo){y(h);return}const V=()=>{i(M),j&&!j.persisted&&j.afterLeave&&j.afterLeave()};if(h.shapeFlag&1&&j&&!j.persisted){const{leave:E,delayLeave:C}=j,B=()=>E(M,V);C?C(h.el,V,B):B()}else V()},me=(h,m)=>{let M;for(;h!==m;)M=f(h),i(h),h=M;i(m)},Te=(h,m,M)=>{const{bum:H,scope:j,job:V,subTree:E,um:C,m:B,a:A}=h;Rs(B),Rs(A),H&&co(H),j.stop(),V&&(V.flags|=8,ae(E,h,m,M)),C&<(C,m),lt(()=>{h.isUnmounted=!0},m)},De=(h,m,M,H=!1,j=!1,V=0)=>{for(let E=V;E<h.length;E++)ae(h[E],m,M,H,j)},Re=h=>{if(h.shapeFlag&6)return Re(h.component.subTree);if(h.shapeFlag&128)return h.suspense.next();const m=f(h.anchor||h.el),M=m&&m[Hc];return M?f(M):m};let ot=!1;const ze=(h,m,M)=>{h==null?m._vnode&&ae(m._vnode,null,null,!0):S(m._vnode||null,h,m,null,null,null,M),m._vnode=h,ot||(ot=!0,is(),rs(),ot=!1)},Qe={p:S,um:ae,m:ge,r:he,mt:k,mc:Y,pc:T,pbc:U,n:Re,o:e};return{render:ze,hydrate:void 0,createApp:uu(ze)}}function Li({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(ie(o)&&ie(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]=Gt(i[r]),l.el=s.el),!n&&l.patchFlag!==-2&&Vs(s,l)),l.type===Ao&&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 Ns(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ns(t)}function Rs(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 Hs(e,t){return zo(e,null,t)}function Su(e,t){return zo(e,null,{flush:"sync"})}function ue(e,t,n){return zo(e,t,n)}function zo(e,t,n=pe){const{immediate:o,deep:i,flush:r,once:s}=n,l=Ie({},n),a=t&&o||!t&&r!=="post";let u;if(qn){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,_,S)=>wt(p,c,_,S);let d=!1;r==="post"?l.scheduler=p=>{lt(p,c&&c.suspense)}:r!=="sync"&&(d=!0,l.scheduler=(p,_)=>{_?p():ki(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 qn&&(u?u.push(f):a&&f()),f}function ku(e,t,n){const o=this.proxy,i=$e(e)?e.includes(".")?Fs(o,e):()=>o[e]:e.bind(o,o);let r;de(t)?r=t:(r=t.handler,n=t);const s=Un(this),l=zo(i,r.bind(o),n);return s(),l}function Fs(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 at(e,t,n=pe){const o=un(),i=He(t),r=et(t),s=Ws(e,i),l=es((a,u)=>{let c,d=pe,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 _=n.set?n.set(p):p;if(!tt(_,c)&&!(d!==pe&&tt(p,d)))return;const S=o.vnode.props;S&&(t in S||i in S||r in S)&&(`onUpdate:${t}`in S||`onUpdate:${i}`in S||`onUpdate:${r}`in S)||(c=p,u()),o.emit(`update:${t}`,_),tt(p,_)&&tt(p,d)&&!tt(_,f)&&u(),d=p,f=_}}});return l[Symbol.iterator]=()=>{let a=0;return{next(){return a<2?{value:a++?s||pe:l,done:!1}:{done:!0}}}},l}const Ws=(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||pe;let i=n;const r=t.startsWith("update:"),s=r&&Ws(o,t.slice(7));s&&(s.trim&&(i=n.map(c=>$e(c)?c.trim():c)),s.number&&(i=n.map(ci)));let l,a=o[l=ai(t)]||o[l=ai(He(t))];!a&&r&&(a=o[l=ai(et(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 Us(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(!de(e)){const a=u=>{const c=Us(u,t,!0);c&&(l=!0,Ie(s,c))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!r&&!l?(Ce(e)&&o.set(e,null),null):(ie(r)?r.forEach(a=>s[a]=null):Ie(s,r),Ce(e)&&o.set(e,s),s)}function Do(e,t){return!e||!io(t)?!1:(t=t.slice(2).replace(/Once$/,""),_e(e,t[0].toLowerCase()+t.slice(1))||_e(e,et(t))||_e(e,t))}function Ym(){}function qs(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:_,inheritAttrs:S}=e,z=To(e);let w,x;try{if(n.shapeFlag&4){const y=i||o,b=y;w=Et(u.call(b,y,c,d,p,f,_)),x=l}else{const y=t;w=Et(y.length>1?y(d,{attrs:l,slots:s,emit:a}):y(d,null)),x=t.props?l:Pu(l)}}catch(y){Hn.length=0,ko(y,e,1),w=L(qe)}let D=w;if(x&&S!==!1){const y=Object.keys(x),{shapeFlag:b}=D;y.length&&b&7&&(r&&y.some(ri)&&(x=Mu(x,r)),D=Xt(D,x,!1,!0))}return n.dirs&&(D=Xt(D,null,!1,!0),D.dirs=D.dirs?D.dirs.concat(n.dirs):n.dirs),n.transition&&jn(D,n.transition),w=D,To(z),w}const Pu=e=>{let t;for(const n in e)(n==="class"||n==="style"||io(n))&&((t||(t={}))[n]=e[n]);return t},Mu=(e,t)=>{const n={};for(const o in e)(!ri(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?Ks(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]&&!Do(u,f))return!0}}}else return(i||l)&&(!l||!l.$stable)?!0:o===s?!1:o?s?Ks(o,s,u):!0:!!s;return!1}function Ks(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]&&!Do(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 Zs=e=>e.__isSuspense;function $u(e,t){t&&t.pendingBranch?ie(e)?t.effects.push(...e):t.effects.push(e):Rc(e)}const be=Symbol.for("v-fgt"),Ao=Symbol.for("v-txt"),qe=Symbol.for("v-cmt"),Lo=Symbol.for("v-stc"),Hn=[];let ct=null;function v(e=!1){Hn.push(ct=e?null:[])}function Ou(){Hn.pop(),ct=Hn[Hn.length-1]||null}let Fn=1;function jo(e,t=!1){Fn+=e,e<0&&ct&&t&&(ct.hasOnce=!0)}function Ys(e){return e.dynamicChildren=Fn>0?ct||vt:null,Ou(),Fn>0&&ct&&ct.push(e),e}function I(e,t,n,o,i,r){return Ys(K(e,t,n,o,i,r,!0))}function oe(e,t,n,o,i){return Ys(L(e,t,n,o,i,!0))}function Wn(e){return e?e.__v_isVNode===!0:!1}function cn(e,t){return e.type===t.type&&e.key===t.key}const Xs=({key:e})=>e??null,Bo=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?$e(e)||Oe(e)||de(e)?{i:Ne,r:e,k:t,f:!!n}:e:null);function K(e,t=null,n=null,o=0,i=null,r=e===be?0:1,s=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Xs(t),ref:t&&Bo(t),scopeId:ls,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:Ne};return l?(ji(a,n),r&128&&e.normalize(a)):n&&(a.shapeFlag|=$e(n)?8:16),Fn>0&&!s&&ct&&(a.patchFlag>0||r&6)&&a.patchFlag!==32&&ct.push(a),a}const L=zu;function zu(e,t=null,n=null,o=0,i=null,r=!1){if((!e||e===ys)&&(e=qe),Wn(e)){const l=Xt(e,t,!0);return n&&ji(l,n),Fn>0&&!r&&ct&&(l.shapeFlag&6?ct[ct.indexOf(e)]=l:ct.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=ce(l)),Ce(a)&&(_i(a)&&!ie(a)&&(a=Ie({},a)),t.style=Se(a))}const s=$e(e)?1:Zs(e)?128:as(e)?64:Ce(e)?4:de(e)?2:0;return K(e,t,n,o,i,s,r,!0)}function Du(e){return e?_i(e)||Os(e)?Ie({},e):e:null}function Xt(e,t,n=!1,o=!1){const{props:i,ref:r,patchFlag:s,children:l,transition:a}=e,u=t?kn(i||{},t):i,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&Xs(u),ref:t&&t.ref?n&&r?ie(r)?r.concat(Bo(t)):[r,Bo(t)]:Bo(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!==be?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&&Xt(e.ssContent),ssFallback:e.ssFallback&&Xt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&o&&jn(c,a.clone(c)),c}function Wt(e=" ",t=0){return L(Ao,null,e,t)}function Au(e,t){const n=L(Lo,null,e);return n.staticCount=t,n}function se(e="",t=!1){return t?(v(),oe(qe,null,e)):L(qe,null,e)}function Et(e){return e==null||typeof e=="boolean"?L(qe):ie(e)?L(be,null,e.slice()):Wn(e)?Gt(e):L(Ao,null,String(e))}function Gt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Xt(e)}function ji(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(ie(t))n=16;else if(typeof t=="object")if(o&65){const i=t.default;i&&(i._c&&(i._d=!1),ji(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!Os(t)?t._ctx=Ne:i===3&&Ne&&(Ne.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else de(t)?(t={default:t,_ctx:Ne},n=32):(t=String(t),o&64?(n=16,t=[Wt(t)]):n=8);e.children=t,e.shapeFlag|=n}function kn(...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=ce([t.class,o.class]));else if(i==="style")t.style=Se([t.style,o.style]);else if(io(i)){const r=t[i],s=o[i];s&&r!==s&&!(ie(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=Ms();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:Ds(o,i),emitsOptions:Us(o,i),emit:null,emitted:null,propsDefaults:pe,inheritAttrs:o.inheritAttrs,ctx:pe,data:pe,props:pe,attrs:pe,slots:pe,refs:pe,setupState:pe,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||Ne;let Vo,Bi;{const e=uo(),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)}};Vo=t("__VUE_INSTANCE_SETTERS__",n=>Ke=n),Bi=t("__VUE_SSR_SETTERS__",n=>qn=n)}const Un=e=>{const t=Ke;return Vo(e),e.scope.on(),()=>{e.scope.off(),Vo(t)}},Gs=()=>{Ke&&Ke.scope.off(),Vo(null)};function Js(e){return e.vnode.shapeFlag&4}let qn=!1;function Vu(e,t=!1,n=!1){t&&Bi(t);const{props:o,children:i}=e.vnode,r=Js(e);du(e,o,r,t),gu(e,i,n||t);const s=r?Nu(e,t):void 0;return t&&Bi(!1),s}function Nu(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=Un(e),s=wn(o,e,0,[e.props,i]),l=Tr(s);if(Tt(),r(),(l||e.sp)&&!Sn(e)&&gs(e),l){if(s.then(Gs,Gs),t)return s.then(a=>{Qs(e,a)}).catch(a=>{ko(a,e,0)});e.asyncDep=s}else Qs(e,s)}else el(e)}function Qs(e,t,n){de(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ce(t)&&(e.setupState=Qr(t)),el(e)}function el(e,t,n){const o=e.type;e.render||(e.render=o.render||kt);{const i=Un(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 No(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Qr(Sc(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Vn)return Vn[n](e)},has(t,n){return n in t||n in Vn}})):e.proxy}const Fu=/(?:^|[-_])\w/g,Wu=e=>e.replace(Fu,t=>t.toUpperCase()).replace(/[-_]/g,"");function tl(e,t=!0){return de(e)?e.displayName||e.name:e.name||t&&e.__name}function nl(e,t,n=!1){let o=tl(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 de(e)&&"__vccOpts"in e}const Q=(e,t)=>Oc(e,t,qn);function ol(e,t,n){try{jo(-1);const o=arguments.length;return o===2?Ce(t)&&!ie(t)?Wn(t)?L(e,null,[t]):L(e,t):L(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&Wn(n)&&(n=[n]),L(e,t,n))}finally{jo(1)}}const qu="3.5.24";/**
|
|
15
|
+
`,...Lc(i)),console.warn(...r)}Tt(),Ci=!1}function Ac(){let e=Ln[Ln.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 <${il(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(...os(o,e[o]))}),n.length>3&&t.push(" ..."),t}function os(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=os(e,we(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):fe(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=we(t),n?t:[`${e}=`,t])}function yn(e,t,n,o){try{return o?e(...o):e()}catch(i){Co(i,t,n)}}function wt(e,t,n,o){if(fe(e)){const i=yn(e,t,n,o);return i&&Pr(i)&&i.catch(r=>{Co(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 Co(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 is=Promise.resolve();let To=null;function xt(e){const t=To||is;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=jn(i);r<e||r===e&&i.flags&2?t=o+1:n=o}return t}function Ti(e){if(!(e.flags&1)){const t=jn(e),n=Ze[Ze.length-1];!n||!(e.flags&2)&&t>=jn(n)?Ze.push(e):Ze.splice(Vc(t),0,e),e.flags|=1,rs()}}function rs(){To||(To=is.then(as))}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),rs()}function ss(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 ls(e){if(wn.length){const t=[...new Set(wn)].sort((n,o)=>jn(n)-jn(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 jn=e=>e.id==null?e.flags&2?-1:1/0:e.id;function as(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,ls(),To=null,(Ze.length||wn.length)&&as()}}let Ve=null,cs=null;function Mo(e){const t=Ve;return Ve=e,cs=e&&e.type.__scopeId||null,t}function ne(e,t=Ve,n){if(!t||e._n)return e;const o=(...i)=>{o._d&&Bo(-1);const r=Mo(t);let s;try{s=e(...i)}finally{Mo(r),o._d&&Bo(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=Ro(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(),wt(a,n,8,[e.el,l,e,t]),Tt())}}const Hc=Symbol("_vte"),us=e=>e.__isTeleport,Rt=Symbol("_leaveCb"),Po=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 ht=[Function,Array],ds={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},fs=e=>{const t=e.subTree;return t.component?fs(t.component):t},Wc={name:"BaseTransition",props:ds,setup(e,{slots:t}){const n=un(),o=Fc();return()=>{const i=t.default&&ms(t.default(),!0);if(!i||!i.length)return;const r=ps(i),s=we(e),{mode:l}=s;if(o.isLeaving)return Pi(r);const a=gs(r);if(!a)return Pi(r);let u=Mi(a,s,o,n,d=>u=d);a.type!==qe&&Bn(a,u);let c=n.subTree&&gs(n.subTree);if(c&&c.type!==qe&&!cn(c,a)&&fs(n).type!==qe){let d=Mi(c,s,o,n);if(Bn(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,y)=>{const w=hs(o,c);w[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 ps(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 hs(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:y,onLeaveCancelled:w,onBeforeAppear:z,onAppear:E,onAfterAppear:T,onAppearCancelled:_}=t,g=String(e.key),m=hs(n,e),D=(R,q)=>{R&&wt(R,o,9,q)},H=(R,q)=>{const W=q[1];D(R,q),re(R)?R.every(M=>M.length<=1)&&W():R.length<=1&&W()},Y={mode:s,persisted:l,beforeEnter(R){let q=a;if(!n.isMounted)if(r)q=z||a;else return;R[Rt]&&R[Rt](!0);const W=m[g];W&&cn(e,W)&&W.el[Rt]&&W.el[Rt](),D(q,[R])},enter(R){let q=u,W=c,M=d;if(!n.isMounted)if(r)q=E||u,W=T||c,M=_||d;else return;let Z=!1;const k=R[Po]=Q=>{Z||(Z=!0,Q?D(M,[R]):D(W,[R]),Y.delayedLeave&&Y.delayedLeave(),R[Po]=void 0)};q?H(q,[R,k]):k()},leave(R,q){const W=String(e.key);if(R[Po]&&R[Po](!0),n.isUnmounting)return q();D(f,[R]);let M=!1;const Z=R[Rt]=k=>{M||(M=!0,q(),k?D(w,[R]):D(y,[R]),R[Rt]=void 0,m[W]===e&&delete m[W])};m[W]=e,p?H(p,[R,Z]):Z()},clone(R){const q=Mi(R,t,n,o,i);return i&&i(q),q}};return Y}function Pi(e){if(Io(e))return e=Gt(e),e.children=null,e}function gs(e){if(!Io(e))return us(e.type)&&e.children?ps(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 Bn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Bn(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 ms(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===be?(s.patchFlag&128&&i++,o=o.concat(ms(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 vs(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const Eo=new WeakMap;function Nn(e,t,n,o,i=!1){if(re(e)){e.forEach((y,w)=>Nn(y,t&&(re(t)?t[w]:t),n,o,i));return}if(_n(o)&&!i){o.shapeFlag&512&&o.type.__asyncResolved&&o.component.subTree.component&&Nn(e,t,n,o.component.subTree);return}const r=o.shapeFlag&4?Ro(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=we(d),p=d===me?Tr:y=>Se(f,y);if(u!=null&&u!==a){if(bs(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),w=ze(a);if(y||w){const z=()=>{if(e.f){const E=y?p(a)?d[a]:c[a]:a.value;if(i)re(E)&&ai(E,r);else if(re(E))E.includes(r)||E.push(r);else if(y)c[a]=[r],p(a)&&(d[a]=c[a]);else{const T=[r];a.value=T,e.k&&(c[e.k]=T)}}else y?(c[a]=s,p(a)&&(d[a]=s)):w&&(a.value=s,e.k&&(c[e.k]=s))};if(s){const E=()=>{z(),Eo.delete(e)};E.id=-1,Eo.set(e,E),st(E,n)}else bs(e),z()}}}function bs(e){const t=Eo.get(e);t&&(t.flags|=8,Eo.delete(e))}fo().requestIdleCallback,fo().cancelIdleCallback;const _n=e=>!!e.type.__asyncLoader,Io=e=>e.type.__isKeepAlive;function qc(e,t){ys(e,"a",t)}function Kc(e,t){ys(e,"da",t)}function ys(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(Oo(t,o,n),n){let i=n.parent;for(;i&&i.parent;)Io(i.parent.vnode)&&Zc(o,t,n,i),i=i.parent}}function Zc(e,t,n,o){const i=Oo(t,e,o,!0);Pt(()=>{ai(o[t],i)},n)}function Oo(e,t,n=Ke,o=!1){if(n){const i=n[e]||(n[e]=[]),r=t.__weh||(t.__weh=(...s)=>{Ct();const l=qn(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)=>{(!Kn||e==="sp")&&Oo(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 ws(e,t=Ke){Oo("ec",e,t)}const tu="components",xs=Symbol.for("v-ndc");function _s(e){return $e(e)?nu(tu,e,!1)||e:e||xs}function nu(e,t,n=!0,o=!1){const i=Ve||Ke;if(i){const r=i.type;{const l=ol(r,!1);if(l&&(l===t||l===He(t)||l===co(He(t))))return r}const s=Ss(i[e]||r[e],t)||Ss(i.appContext[e],t);return!s&&o?r:s}}function Ss(e,t){return e&&(e[t]||e[He(t)]||e[co(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=mo(e)),i=new Array(e.length);for(let c=0,d=e.length;c<d;c++)i[c]=t(a?u?_o(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(Ce(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 _e(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(be,null,[j("slot",n,o&&o())],u?-2:64)}let r=e[t];r&&r._c&&(r._d=!1),b();const s=r&&ks(r(n)),l=n.key||s&&s.key,a=ie(be,{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 ks(e){return e.some(t=>Un(t)?!(t.type===qe||t.type===be&&!ks(t.children)):!0)?e:null}const Oi=e=>e?el(e)?Ro(e):Oi(e.parent):null,Vn=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=>Ms(e),$forceUpdate:e=>e.f||(e.f=()=>{Ti(e.update)}),$nextTick:e=>e.n||(e.n=xt.bind(e.proxy)),$watch:e=>ku.bind(e)}),$i=(e,t)=>e!==me&&!e.__isScriptSetup&&Se(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&&Se(i,t))return s[t]=2,i[t];if((u=e.propsOptions[0])&&Se(u,t))return s[t]=3,r[t];if(n!==me&&Se(n,t))return s[t]=4,n[t];zi&&(s[t]=0)}}const c=Vn[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&&Se(n,t))return s[t]=4,n[t];if(f=a.config.globalProperties,Se(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&&Se(o,t)?(o[t]=n,!0):Se(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]!=="$"&&Se(e,l)||$i(t,l)||(a=r[0])&&Se(a,l)||Se(o,l)||Se(Vn,l)||Se(i.config.globalProperties,l)||(u=s.__cssModules)&&u[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Se(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function $o(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({},$o(e),$o(t))}let zi=!0;function iu(e){const t=Ms(e),n=e.proxy,o=e.ctx;zi=!1,t.beforeCreate&&Cs(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:w,deactivated:z,beforeDestroy:E,beforeUnmount:T,destroyed:_,unmounted:g,render:m,renderTracked:D,renderTriggered:H,errorCaptured:Y,serverPrefetch:R,expose:q,inheritAttrs:W,components:M,directives:Z,filters:k}=t;if(u&&ru(u,o,null),s)for(const x in s){const S=s[x];fe(S)&&(o[x]=S.bind(n))}if(i){const x=i.call(n,n);Ce(x)&&(e.data=wo(x))}if(zi=!0,r)for(const x in r){const S=r[x],O=fe(S)?S.bind(n,n):fe(S.get)?S.get.bind(n,n):kt,A=!fe(S)&&fe(S.set)?S.set.bind(n):kt,ae=J({get:O,set:A});Object.defineProperty(o,x,{enumerable:!0,configurable:!0,get:()=>ae.value,set:oe=>ae.value=oe})}if(l)for(const x in l)Ts(l[x],o,n,x);if(a){const x=fe(a)?a.call(n):a;Reflect.ownKeys(x).forEach(S=>{Hn(S,x[S])})}c&&Cs(c,e,"c");function U(x,S){re(S)?S.forEach(O=>x(O.bind(n))):S&&x(S.bind(n))}if(U(Yc,d),U(je,f),U(Xc,p),U(Gc,y),U(qc,w),U(Kc,z),U(ws,Y),U(eu,D),U(Qc,H),U(Ei,T),U(Pt,g),U(Jc,R),re(q))if(q.length){const x=e.exposed||(e.exposed={});q.forEach(S=>{Object.defineProperty(x,S,{get:()=>n[S],set:O=>n[S]=O,enumerable:!0})})}else e.exposed||(e.exposed={});m&&e.render===kt&&(e.render=m),W!=null&&(e.inheritAttrs=W),M&&(e.components=M),Z&&(e.directives=Z),R&&vs(e)}function ru(e,t,n=kt){re(e)&&(e=Di(e));for(const o in e){const i=e[o];let r;Ce(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 Cs(e,t,n){wt(re(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function Ts(e,t,n,o){let i=o.includes(".")?Us(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(Ce(e))if(re(e))e.forEach(r=>Ts(r,t,n,o));else{const r=fe(e.handler)?e.handler.bind(n):t[e.handler];fe(r)&&de(i,r,e)}}function Ms(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=>zo(a,u,s,!0)),zo(a,t,s)),Ce(t)&&r.set(t,a),a}function zo(e,t,n,o=!1){const{mixins:i,extends:r}=t;r&&zo(e,r,n,!0),i&&i.forEach(s=>zo(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:Ps,props:Es,emits:Es,methods:Rn,computed:Rn,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:Rn,directives:Rn,watch:au,provide:Ps,inject:lu};function Ps(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 Rn(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 Rn(e,t){return e?Oe(Object.create(null),e,t):t}function Es(e,t){return e?re(e)&&re(t)?[...new Set([...e,...t])]:Oe(Object.create(null),$o(e),$o(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 Is(){return{app:null,config:{isNativeTag:Tr,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&&!Ce(i)&&(i=null);const r=Is(),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||j(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,Ro(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=ln;ln=u;try{return c()}finally{ln=d}}};return u}}let ln=null;function Hn(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 Os(){return!!(un()||ln)}const $s={},zs=()=>Object.create($s),Ds=e=>Object.getPrototypeOf(e)===$s;function du(e,t,n,o=!1){const i={},r=zs();e.propsDefaults=Object.create(null),As(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=we(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(Ao(e.emitsOptions,f))continue;const p=t[f];if(a)if(Se(r,f))p!==r[f]&&(r[f]=p,u=!0);else{const y=He(f);i[y]=Ai(a,l,y,p,e,!1)}else p!==r[f]&&(r[f]=p,u=!0)}}}else{As(e,t,i,r)&&(u=!0);let c;for(const d in l)(!t||!Se(t,d)&&((c=et(d))===d||!Se(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||!Se(t,d))&&(delete r[d],u=!0)}u&&Bt(e.attrs,"set","")}function As(e,t,n,o){const[i,r]=e.propsOptions;let s=!1,l;if(t)for(let a in t){if(En(a))continue;const u=t[a];let c;i&&Se(i,c=He(a))?!r||!r.includes(c)?n[c]=u:(l||(l={}))[c]=u:Ao(e.emitsOptions,a)||(!(a in o)||u!==o[a])&&(o[a]=u,s=!0)}if(r){const a=we(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,!Se(u,d))}}return s}function Ai(e,t,n,o,i,r){const s=e[n];if(s!=null){const l=Se(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=qn(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 Ls(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]=Ls(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 Ce(e)&&o.set(e,vt),vt;if(re(r))for(let c=0;c<r.length;c++){const d=He(r[c]);js(d)&&(s[d]=me)}else if(r)for(const c in r){const d=He(c);if(js(d)){const f=r[c],p=s[d]=re(f)||fe(f)?{type:f}:Oe({},f),y=p.type;let w=!1,z=!0;if(re(y))for(let E=0;E<y.length;++E){const T=y[E],_=fe(T)&&T.name;if(_==="Boolean"){w=!0;break}else _==="String"&&(z=!1)}else w=fe(y)&&y.name==="Boolean";p[0]=w,p[1]=z,(w||Se(p,"default"))&&l.push(d)}}const u=[s,l];return Ce(e)&&o.set(e,u),u}function js(e){return e[0]!=="$"&&!En(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=ne((...i)=>ji(t(...i)),n);return o._c=!1,o},Bs=(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}}},Ns=(e,t)=>{const n=ji(t);e.slots.default=()=>n},Vs=(e,t,n)=>{for(const o in t)(n||!Li(o))&&(e[o]=t[o])},gu=(e,t,n)=>{const o=e.slots=zs();if(e.vnode.shapeFlag&32){const i=t._;i?(Vs(o,t,n),n&&Ir(o,"_",i,!0)):Bs(t,o)}else t&&Ns(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:Vs(i,t,n):(r=!t.$stable,Bs(t,i)),s=t}else t&&(Ns(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=fo();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,w=(h,v,P,F=null,B=null,V=null,I=void 0,C=null,N=!!v.dynamicChildren)=>{if(h===v)return;h&&!cn(h,v)&&(F=Ae(h),oe(h,B,V,!0),h=null),v.patchFlag===-2&&(N=!1,v.dynamicChildren=null);const{type:L,ref:se,shapeFlag:te}=v;switch(L){case Lo:z(h,v,P,F);break;case qe:E(h,v,P,F);break;case jo:h==null&&T(v,P,F,I);break;case be:M(h,v,P,F,B,V,I,C,N);break;default:te&1?m(h,v,P,F,B,V,I,C,N):te&6?Z(h,v,P,F,B,V,I,C,N):(te&64||te&128)&&L.process(h,v,P,F,B,V,I,C,N,De)}se!=null&&B?Nn(se,h&&h.ref,V,v||h,!v):se==null&&h&&h.ref!=null&&Nn(h.ref,null,V,h,!0)},z=(h,v,P,F)=>{if(h==null)o(v.el=l(v.children),P,F);else{const B=v.el=h.el;v.children!==h.children&&u(B,v.children)}},E=(h,v,P,F)=>{h==null?o(v.el=a(v.children||""),P,F):v.el=h.el},T=(h,v,P,F)=>{[h.el,h.anchor]=y(h.children,v,P,F,h.el,h.anchor)},_=({el:h,anchor:v},P,F)=>{let B;for(;h&&h!==v;)B=f(h),o(h,P,F),h=B;o(v,P,F)},g=({el:h,anchor:v})=>{let P;for(;h&&h!==v;)P=f(h),i(h),h=P;i(v)},m=(h,v,P,F,B,V,I,C,N)=>{if(v.type==="svg"?I="svg":v.type==="math"&&(I="mathml"),h==null)D(v,P,F,B,V,I,C,N);else{const L=h.el&&h.el._isVueCE?h.el:null;try{L&&L._beginPatch(),R(h,v,B,V,I,C,N)}finally{L&&L._endPatch()}}},D=(h,v,P,F,B,V,I,C)=>{let N,L;const{props:se,shapeFlag:te,transition:G,dirs:ce}=h;if(N=h.el=s(h.type,V,se&&se.is,se),te&8?c(N,h.children):te&16&&Y(h.children,N,null,F,B,Bi(h,V),I,C),ce&&sn(h,null,F,"created"),H(N,h,h.scopeId,I,F),se){for(const Ie in se)Ie!=="value"&&!En(Ie)&&r(N,Ie,null,se[Ie],V,F);"value"in se&&r(N,"value",null,se.value,V),(L=se.onVnodeBeforeMount)&&It(L,F,h)}ce&&sn(h,null,F,"beforeMount");const xe=yu(B,G);xe&&G.beforeEnter(N),o(N,v,P),((L=se&&se.onVnodeMounted)||xe||ce)&&st(()=>{L&&It(L,F,h),xe&&G.enter(N),ce&&sn(h,null,F,"mounted")},B)},H=(h,v,P,F,B)=>{if(P&&p(h,P),F)for(let V=0;V<F.length;V++)p(h,F[V]);if(B){let V=B.subTree;if(v===V||Xs(V.type)&&(V.ssContent===v||V.ssFallback===v)){const I=B.vnode;H(h,I,I.scopeId,I.slotScopeIds,B.parent)}}},Y=(h,v,P,F,B,V,I,C,N=0)=>{for(let L=N;L<h.length;L++){const se=h[L]=C?Jt(h[L]):Et(h[L]);w(null,se,v,P,F,B,V,I,C)}},R=(h,v,P,F,B,V,I)=>{const C=v.el=h.el;let{patchFlag:N,dynamicChildren:L,dirs:se}=v;N|=h.patchFlag&16;const te=h.props||me,G=v.props||me;let ce;if(P&&an(P,!1),(ce=G.onVnodeBeforeUpdate)&&It(ce,P,v,h),se&&sn(v,h,P,"beforeUpdate"),P&&an(P,!0),(te.innerHTML&&G.innerHTML==null||te.textContent&&G.textContent==null)&&c(C,""),L?q(h.dynamicChildren,L,C,P,F,Bi(v,B),V):I||S(h,v,C,null,P,F,Bi(v,B),V,!1),N>0){if(N&16)W(C,te,G,P,B);else if(N&2&&te.class!==G.class&&r(C,"class",null,G.class,B),N&4&&r(C,"style",te.style,G.style,B),N&8){const xe=v.dynamicProps;for(let Ie=0;Ie<xe.length;Ie++){const Te=xe[Ie],ot=te[Te],it=G[Te];(it!==ot||Te==="value")&&r(C,Te,ot,it,B,P)}}N&1&&h.children!==v.children&&c(C,v.children)}else!I&&L==null&&W(C,te,G,P,B);((ce=G.onVnodeUpdated)||se)&&st(()=>{ce&&It(ce,P,v,h),se&&sn(v,h,P,"updated")},F)},q=(h,v,P,F,B,V,I)=>{for(let C=0;C<v.length;C++){const N=h[C],L=v[C],se=N.el&&(N.type===be||!cn(N,L)||N.shapeFlag&198)?d(N.el):P;w(N,L,se,null,F,B,V,I,!0)}},W=(h,v,P,F,B)=>{if(v!==P){if(v!==me)for(const V in v)!En(V)&&!(V in P)&&r(h,V,v[V],null,B,F);for(const V in P){if(En(V))continue;const I=P[V],C=v[V];I!==C&&V!=="value"&&r(h,V,C,I,B,F)}"value"in P&&r(h,"value",v.value,P.value,B)}},M=(h,v,P,F,B,V,I,C,N)=>{const L=v.el=h?h.el:l(""),se=v.anchor=h?h.anchor:l("");let{patchFlag:te,dynamicChildren:G,slotScopeIds:ce}=v;ce&&(C=C?C.concat(ce):ce),h==null?(o(L,P,F),o(se,P,F),Y(v.children||[],P,se,B,V,I,C,N)):te>0&&te&64&&G&&h.dynamicChildren?(q(h.dynamicChildren,G,P,B,V,I,C),(v.key!=null||B&&v===B.subTree)&&Rs(h,v,!0)):S(h,v,P,se,B,V,I,C,N)},Z=(h,v,P,F,B,V,I,C,N)=>{v.slotScopeIds=C,h==null?v.shapeFlag&512?B.ctx.activate(v,P,F,I,N):k(v,P,F,B,V,I,N):Q(h,v,N)},k=(h,v,P,F,B,V,I)=>{const C=h.component=Bu(h,F,B);if(Io(h)&&(C.ctx.renderer=De),Nu(C,!1,I),C.asyncDep){if(B&&B.registerDep(C,U,I),!h.el){const N=C.subTree=j(qe);E(null,N,v,P),h.placeholder=N.el}}else U(C,h,v,P,B,V,I)},Q=(h,v,P)=>{const F=v.component=h.component;if(Eu(h,v,P))if(F.asyncDep&&!F.asyncResolved){x(F,v,P);return}else F.next=v,F.update();else v.el=h.el,F.vnode=v},U=(h,v,P,F,B,V,I)=>{const C=()=>{if(h.isMounted){let{next:te,bu:G,u:ce,parent:xe,vnode:Ie}=h;{const Lt=Hs(h);if(Lt){te&&(te.el=Ie.el,x(h,te,I)),Lt.asyncDep.then(()=>{h.isUnmounted||C()});return}}let Te=te,ot;an(h,!1),te?(te.el=Ie.el,x(h,te,I)):te=Ie,G&&uo(G),(ot=te.props&&te.props.onVnodeBeforeUpdate)&&It(ot,xe,te,Ie),an(h,!0);const it=Zs(h),At=h.subTree;h.subTree=it,w(At,it,d(At.el),Ae(At),h,B,V),te.el=it.el,Te===null&&Iu(h,it.el),ce&&st(ce,B),(ot=te.props&&te.props.onVnodeUpdated)&&st(()=>It(ot,xe,te,Ie),B)}else{let te;const{el:G,props:ce}=v,{bm:xe,m:Ie,parent:Te,root:ot,type:it}=h,At=_n(v);an(h,!1),xe&&uo(xe),!At&&(te=ce&&ce.onVnodeBeforeMount)&&It(te,Te,v),an(h,!0);{ot.ce&&ot.ce._def.shadowRoot!==!1&&ot.ce._injectChildStyle(it);const Lt=h.subTree=Zs(h);w(null,Lt,P,F,h,B,V),v.el=Lt.el}if(Ie&&st(Ie,B),!At&&(te=ce&&ce.onVnodeMounted)){const Lt=v;st(()=>It(te,Te,Lt),B)}(v.shapeFlag&256||Te&&_n(Te.vnode)&&Te.vnode.shapeFlag&256)&&h.a&&st(h.a,B),h.isMounted=!0,v=P=F=null}};h.scope.on();const N=h.effect=new Lr(C);h.scope.off();const L=h.update=N.run.bind(N),se=h.job=N.runIfDirty.bind(N);se.i=h,se.id=h.uid,N.scheduler=()=>Ti(se),an(h,!0),L()},x=(h,v,P)=>{v.component=h;const F=h.vnode.props;h.vnode=v,h.next=null,fu(h,v.props,F,P),mu(h,v.children,P),Ct(),ss(h),Tt()},S=(h,v,P,F,B,V,I,C,N=!1)=>{const L=h&&h.children,se=h?h.shapeFlag:0,te=v.children,{patchFlag:G,shapeFlag:ce}=v;if(G>0){if(G&128){A(L,te,P,F,B,V,I,C,N);return}else if(G&256){O(L,te,P,F,B,V,I,C,N);return}}ce&8?(se&16&&Ee(L,B,V),te!==L&&c(P,te)):se&16?ce&16?A(L,te,P,F,B,V,I,C,N):Ee(L,B,V,!0):(se&8&&c(P,""),ce&16&&Y(te,P,F,B,V,I,C,N))},O=(h,v,P,F,B,V,I,C,N)=>{h=h||vt,v=v||vt;const L=h.length,se=v.length,te=Math.min(L,se);let G;for(G=0;G<te;G++){const ce=v[G]=N?Jt(v[G]):Et(v[G]);w(h[G],ce,P,null,B,V,I,C,N)}L>se?Ee(h,B,V,!0,!1,te):Y(v,P,F,B,V,I,C,N,te)},A=(h,v,P,F,B,V,I,C,N)=>{let L=0;const se=v.length;let te=h.length-1,G=se-1;for(;L<=te&&L<=G;){const ce=h[L],xe=v[L]=N?Jt(v[L]):Et(v[L]);if(cn(ce,xe))w(ce,xe,P,null,B,V,I,C,N);else break;L++}for(;L<=te&&L<=G;){const ce=h[te],xe=v[G]=N?Jt(v[G]):Et(v[G]);if(cn(ce,xe))w(ce,xe,P,null,B,V,I,C,N);else break;te--,G--}if(L>te){if(L<=G){const ce=G+1,xe=ce<se?v[ce].el:F;for(;L<=G;)w(null,v[L]=N?Jt(v[L]):Et(v[L]),P,xe,B,V,I,C,N),L++}}else if(L>G)for(;L<=te;)oe(h[L],B,V,!0),L++;else{const ce=L,xe=L,Ie=new Map;for(L=xe;L<=G;L++){const ut=v[L]=N?Jt(v[L]):Et(v[L]);ut.key!=null&&Ie.set(ut.key,L)}let Te,ot=0;const it=G-xe+1;let At=!1,Lt=0;const io=new Array(it);for(L=0;L<it;L++)io[L]=0;for(L=ce;L<=te;L++){const ut=h[L];if(ot>=it){oe(ut,B,V,!0);continue}let jt;if(ut.key!=null)jt=Ie.get(ut.key);else for(Te=xe;Te<=G;Te++)if(io[Te-xe]===0&&cn(ut,v[Te])){jt=Te;break}jt===void 0?oe(ut,B,V,!0):(io[jt-xe]=L+1,jt>=Lt?Lt=jt:At=!0,w(ut,v[jt],P,null,B,V,I,C,N),ot++)}const Ha=At?wu(io):vt;for(Te=Ha.length-1,L=it-1;L>=0;L--){const ut=xe+L,jt=v[ut],Fa=v[ut+1],Wa=ut+1<se?Fa.el||Fa.placeholder:F;io[L]===0?w(null,jt,P,Wa,B,V,I,C,N):At&&(Te<0||L!==Ha[Te]?ae(jt,P,Wa,2):Te--)}}},ae=(h,v,P,F,B=null)=>{const{el:V,type:I,transition:C,children:N,shapeFlag:L}=h;if(L&6){ae(h.component.subTree,v,P,F);return}if(L&128){h.suspense.move(v,P,F);return}if(L&64){I.move(h,v,P,De);return}if(I===be){o(V,v,P);for(let te=0;te<N.length;te++)ae(N[te],v,P,F);o(h.anchor,v,P);return}if(I===jo){_(h,v,P);return}if(F!==2&&L&1&&C)if(F===0)C.beforeEnter(V),o(V,v,P),st(()=>C.enter(V),B);else{const{leave:te,delayLeave:G,afterLeave:ce}=C,xe=()=>{h.ctx.isUnmounted?i(V):o(V,v,P)},Ie=()=>{V._isLeaving&&V[Rt](!0),te(V,()=>{xe(),ce&&ce()})};G?G(V,xe,Ie):Ie()}else o(V,v,P)},oe=(h,v,P,F=!1,B=!1)=>{const{type:V,props:I,ref:C,children:N,dynamicChildren:L,shapeFlag:se,patchFlag:te,dirs:G,cacheIndex:ce}=h;if(te===-2&&(B=!1),C!=null&&(Ct(),Nn(C,null,P,h,!0),Tt()),ce!=null&&(v.renderCache[ce]=void 0),se&256){v.ctx.deactivate(h);return}const xe=se&1&&G,Ie=!_n(h);let Te;if(Ie&&(Te=I&&I.onVnodeBeforeUnmount)&&It(Te,v,h),se&6)ye(h.component,P,F);else{if(se&128){h.suspense.unmount(P,F);return}xe&&sn(h,null,v,"beforeUnmount"),se&64?h.type.remove(h,v,P,De,F):L&&!L.hasOnce&&(V!==be||te>0&&te&64)?Ee(L,v,P,!1,!0):(V===be&&te&384||!B&&se&16)&&Ee(N,v,P),F&&ge(h)}(Ie&&(Te=I&&I.onVnodeUnmounted)||xe)&&st(()=>{Te&&It(Te,v,h),xe&&sn(h,null,v,"unmounted")},P)},ge=h=>{const{type:v,el:P,anchor:F,transition:B}=h;if(v===be){pe(P,F);return}if(v===jo){g(h);return}const V=()=>{i(P),B&&!B.persisted&&B.afterLeave&&B.afterLeave()};if(h.shapeFlag&1&&B&&!B.persisted){const{leave:I,delayLeave:C}=B,N=()=>I(P,V);C?C(h.el,V,N):N()}else V()},pe=(h,v)=>{let P;for(;h!==v;)P=f(h),i(h),h=P;i(v)},ye=(h,v,P)=>{const{bum:F,scope:B,job:V,subTree:I,um:C,m:N,a:L}=h;Fs(N),Fs(L),F&&uo(F),B.stop(),V&&(V.flags|=8,oe(I,h,v,P)),C&&st(C,v),st(()=>{h.isUnmounted=!0},v)},Ee=(h,v,P,F=!1,B=!1,V=0)=>{for(let I=V;I<h.length;I++)oe(h[I],v,P,F,B)},Ae=h=>{if(h.shapeFlag&6)return Ae(h.component.subTree);if(h.shapeFlag&128)return h.suspense.next();const v=f(h.anchor||h.el),P=v&&v[Hc];return P?f(P):v};let ct=!1;const Qe=(h,v,P)=>{h==null?v._vnode&&oe(v._vnode,null,null,!0):w(v._vnode||null,h,v,null,null,null,P),v._vnode=h,ct||(ct=!0,ss(),ls(),ct=!1)},De={p:w,um:oe,m:ae,r:ge,mt:k,mc:Y,pc:S,pbc:q,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 Rs(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&&Rs(s,l)),l.type===Lo&&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 Hs(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Hs(t)}function Fs(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 Ws(e,t){return Do(e,null,t)}function Su(e,t){return Do(e,null,{flush:"sync"})}function de(e,t,n){return Do(e,t,n)}function Do(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(Kn){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,w)=>wt(p,c,y,w);let d=!1;r==="post"?l.scheduler=p=>{st(p,c&&c.suspense)}:r!=="sync"&&(d=!0,l.scheduler=(p,y)=>{y?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 Kn&&(u?u.push(f):a&&f()),f}function ku(e,t,n){const o=this.proxy,i=$e(e)?e.includes(".")?Us(o,e):()=>o[e]:e.bind(o,o);let r;fe(t)?r=t:(r=t.handler,n=t);const s=qn(this),l=Do(i,r.bind(o),n);return s(),l}function Us(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=qs(e,i),l=ns((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 y=n.set?n.set(p):p;if(!tt(y,c)&&!(d!==me&&tt(p,d)))return;const w=o.vnode.props;w&&(t in w||i in w||r in w)&&(`onUpdate:${t}`in w||`onUpdate:${i}`in w||`onUpdate:${r}`in w)||(c=p,u()),o.emit(`update:${t}`,y),tt(p,y)&&tt(p,d)&&!tt(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 qs=(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&&qs(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&&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 Ks(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=Ks(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?(Ce(e)&&o.set(e,null),null):(re(r)?r.forEach(a=>s[a]=null):Oe(s,r),Ce(e)&&o.set(e,s),s)}function Ao(e,t){return!e||!ro(t)?!1:(t=t.slice(2).replace(/Once$/,""),Se(e,t[0].toLowerCase()+t.slice(1))||Se(e,et(t))||Se(e,t))}function Ym(){}function Zs(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:w}=e,z=Mo(e);let E,T;try{if(n.shapeFlag&4){const g=i||o,m=g;E=Et(u.call(m,g,c,d,p,f,y)),T=l}else{const g=t;E=Et(g.length>1?g(d,{attrs:l,slots:s,emit:a}):g(d,null)),T=t.props?l:Mu(l)}}catch(g){Fn.length=0,Co(g,e,1),E=j(qe)}let _=E;if(T&&w!==!1){const g=Object.keys(T),{shapeFlag:m}=_;g.length&&m&7&&(r&&g.some(li)&&(T=Pu(T,r)),_=Gt(_,T,!1,!0))}return n.dirs&&(_=Gt(_,null,!1,!0),_.dirs=_.dirs?_.dirs.concat(n.dirs):n.dirs),n.transition&&Bn(_,n.transition),E=_,Mo(z),E}const Mu=e=>{let t;for(const n in e)(n==="class"||n==="style"||ro(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?Ys(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]&&!Ao(u,f))return!0}}}else return(i||l)&&(!l||!l.$stable)?!0:o===s?!1:o?s?Ys(o,s,u):!0:!!s;return!1}function Ys(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]&&!Ao(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 Xs=e=>e.__isSuspense;function Ou(e,t){t&&t.pendingBranch?re(e)?t.effects.push(...e):t.effects.push(e):Rc(e)}const be=Symbol.for("v-fgt"),Lo=Symbol.for("v-txt"),qe=Symbol.for("v-cmt"),jo=Symbol.for("v-stc"),Fn=[];let at=null;function b(e=!1){Fn.push(at=e?null:[])}function $u(){Fn.pop(),at=Fn[Fn.length-1]||null}let Wn=1;function Bo(e,t=!1){Wn+=e,e<0&&at&&t&&(at.hasOnce=!0)}function Gs(e){return e.dynamicChildren=Wn>0?at||vt:null,$u(),Wn>0&&at&&at.push(e),e}function $(e,t,n,o,i,r){return Gs(K(e,t,n,o,i,r,!0))}function ie(e,t,n,o,i){return Gs(j(e,t,n,o,i,!0))}function Un(e){return e?e.__v_isVNode===!0:!1}function cn(e,t){return e.type===t.type&&e.key===t.key}const Js=({key:e})=>e??null,No=({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 K(e,t=null,n=null,o=0,i=null,r=e===be?0:1,s=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Js(t),ref:t&&No(t),scopeId:cs,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),Wn>0&&!s&&at&&(a.patchFlag>0||r&6)&&a.patchFlag!==32&&at.push(a),a}const j=zu;function zu(e,t=null,n=null,o=0,i=null,r=!1){if((!e||e===xs)&&(e=qe),Un(e)){const l=Gt(e,t,!0);return n&&Ni(l,n),Wn>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)),Ce(a)&&(ki(a)&&!re(a)&&(a=Oe({},a)),t.style=ke(a))}const s=$e(e)?1:Xs(e)?128:us(e)?64:Ce(e)?4:fe(e)?2:0;return K(e,t,n,o,i,s,r,!0)}function Du(e){return e?ki(e)||Ds(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&&Js(u),ref:t&&t.ref?n&&r?re(r)?r.concat(No(t)):[r,No(t)]:No(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!==be?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&&Bn(c,a.clone(c)),c}function Wt(e=" ",t=0){return j(Lo,null,e,t)}function Au(e,t){const n=j(jo,null,e);return n.staticCount=t,n}function le(e="",t=!1){return t?(b(),ie(qe,null,e)):j(qe,null,e)}function Et(e){return e==null||typeof e=="boolean"?j(qe):re(e)?j(be,null,e.slice()):Un(e)?Jt(e):j(Lo,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&&!Ds(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=ke([t.style,o.style]);else if(ro(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=Is();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:Ls(o,i),emitsOptions:Ks(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 Vo,Vi;{const e=fo(),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)}};Vo=t("__VUE_INSTANCE_SETTERS__",n=>Ke=n),Vi=t("__VUE_SSR_SETTERS__",n=>Kn=n)}const qn=e=>{const t=Ke;return Vo(e),e.scope.on(),()=>{e.scope.off(),Vo(t)}},Qs=()=>{Ke&&Ke.scope.off(),Vo(null)};function el(e){return e.vnode.shapeFlag&4}let Kn=!1;function Nu(e,t=!1,n=!1){t&&Vi(t);const{props:o,children:i}=e.vnode,r=el(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=qn(e),s=yn(o,e,0,[e.props,i]),l=Pr(s);if(Tt(),r(),(l||e.sp)&&!_n(e)&&vs(e),l){if(s.then(Qs,Qs),t)return s.then(a=>{tl(e,a)}).catch(a=>{Co(a,e,0)});e.asyncDep=s}else tl(e,s)}else nl(e)}function tl(e,t,n){fe(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ce(t)&&(e.setupState=ts(t)),nl(e)}function nl(e,t,n){const o=e.type;e.render||(e.render=o.render||kt);{const i=qn(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 Ro(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(ts(Sc(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Vn)return Vn[n](e)},has(t,n){return n in t||n in Vn}})):e.proxy}const Fu=/(?:^|[-_])\w/g,Wu=e=>e.replace(Fu,t=>t.toUpperCase()).replace(/[-_]/g,"");function ol(e,t=!0){return fe(e)?e.displayName||e.name:e.name||t&&e.__name}function il(e,t,n=!1){let o=ol(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,Kn);function rl(e,t,n){try{Bo(-1);const o=arguments.length;return o===2?Ce(t)&&!re(t)?Un(t)?j(e,null,[t]):j(e,t):j(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&Un(n)&&(n=[n]),j(e,t,n))}finally{Bo(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 Vi;const il=typeof window<"u"&&window.trustedTypes;if(il)try{Vi=il.createPolicy("vue",{createHTML:e=>e})}catch{}const rl=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,sl=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{sl.innerHTML=rl(o==="svg"?`<svg>${e}</svg>`:o==="mathml"?`<math>${e}</math>`:e);const l=sl.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]}},Jt="transition",Kn="animation",Zn=Symbol("_vtc"),ll={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=Ie({},cs,ll),Ro=(e=>(e.displayName="Transition",e.props=Xu,e))((e,{slots:t})=>ol(Uc,Gu(e),t)),dn=(e,t=[])=>{ie(e)?e.forEach(n=>n(...t)):e&&e(...t)},al=e=>e?ie(e)?e.some(t=>t.length>1):e.length>1:!1;function Gu(e){const t={};for(const P in e)P in ll||(t[P]=e[P]);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,_=Ju(i),S=_&&_[0],z=_&&_[1],{onBeforeEnter:w,onEnter:x,onEnterCancelled:D,onLeave:y,onLeaveCancelled:b,onBeforeAppear:O=w,onAppear:W=x,onAppearCancelled:Y=D}=t,N=(P,Z,k,G)=>{P._enterCancelled=G,fn(P,Z?c:l),fn(P,Z?u:s),k&&k()},U=(P,Z)=>{P._isLeaving=!1,fn(P,d),fn(P,p),fn(P,f),Z&&Z()},F=P=>(Z,k)=>{const G=P?W:x,q=()=>N(Z,P,k);dn(G,[Z,q]),cl(()=>{fn(Z,P?a:r),qt(Z,P?c:l),al(G)||ul(Z,o,S,q)})};return Ie(t,{onBeforeEnter(P){dn(w,[P]),qt(P,r),qt(P,s)},onBeforeAppear(P){dn(O,[P]),qt(P,a),qt(P,u)},onEnter:F(!1),onAppear:F(!0),onLeave(P,Z){P._isLeaving=!0;const k=()=>U(P,Z);qt(P,d),P._enterCancelled?(qt(P,f),pl(P)):(pl(P),qt(P,f)),cl(()=>{P._isLeaving&&(fn(P,d),qt(P,p),al(y)||ul(P,o,z,k))}),dn(y,[P,k])},onEnterCancelled(P){N(P,!1,void 0,!0),dn(D,[P])},onAppearCancelled(P){N(P,!0,void 0,!0),dn(Y,[P])},onLeaveCancelled(P){U(P),dn(b,[P])}})}function Ju(e){if(e==null)return null;if(Ce(e))return[Ni(e.enter),Ni(e.leave)];{const t=Ni(e);return[t,t]}}function Ni(e){return ui(e)}function qt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Zn]||(e[Zn]=new Set)).add(t)}function fn(e,t){t.split(/\s+/).forEach(o=>o&&e.classList.remove(o));const n=e[Zn];n&&(n.delete(t),n.size||(e[Zn]=void 0))}function cl(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Qu=0;function ul(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=_=>(n[_]||"").split(", "),i=o(`${Jt}Delay`),r=o(`${Jt}Duration`),s=dl(i,r),l=o(`${Kn}Delay`),a=o(`${Kn}Duration`),u=dl(l,a);let c=null,d=0,f=0;t===Jt?s>0&&(c=Jt,d=s,f=r.length):t===Kn?u>0&&(c=Kn,d=u,f=a.length):(d=Math.max(s,u),c=d>0?s>u?Jt:Kn:null,f=c?c===Jt?r.length:a.length:0);const p=c===Jt&&/\b(?:transform|all)(?:,|$)/.test(o(`${Jt}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:p}}function dl(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,o)=>fl(n)+fl(e[o])))}function fl(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function pl(e){return(e?e.ownerDocument:document).body.offsetHeight}function td(e,t,n){const o=e[Zn];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Ho=Symbol("_vod"),hl=Symbol("_vsh"),gl={name:"show",beforeMount(e,{value:t},{transition:n}){e[Ho]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Yn(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),Yn(e,!0),o.enter(e)):o.leave(e,()=>{Yn(e,!1)}):Yn(e,t))},beforeUnmount(e,{value:t}){Yn(e,t)}};function Yn(e,t){e.style.display=t?e[Ho]:"none",e[hl]=!t}const nd=Symbol(""),od=/(?:^|;)\s*display\s*:/;function id(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&&Fo(o,l,"")}else for(const s in t)n[s]==null&&Fo(o,s,"");for(const s in n)s==="display"&&(r=!0),Fo(o,s,n[s])}else if(i){if(t!==n){const s=o[nd];s&&(n+=";"+s),o.cssText=n,r=od.test(n)}}else t&&e.removeAttribute("style");Ho in e&&(e[Ho]=r?o.display:"",e[hl]&&(o.display="none"))}const ml=/\s*!important$/;function Fo(e,t,n){if(ie(n))n.forEach(o=>Fo(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=rd(e,t);ml.test(n)?e.setProperty(et(o),n.replace(ml,""),"important"):e[o]=n}}const vl=["Webkit","Moz","ms"],Ri={};function rd(e,t){const n=Ri[t];if(n)return n;let o=He(t);if(o!=="filter"&&o in e)return Ri[t]=o;o=ao(o);for(let i=0;i<vl.length;i++){const r=vl[i]+o;if(r in e)return Ri[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&&!Ir(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"?rl(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=Ir(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 sd(e,t,n,o){e.removeEventListener(t,n,o)}const xl=Symbol("_vei");function ld(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]=ad(t);if(o){const u=r[t]=dd(o,i);pn(e,l,u,a)}else s&&(sd(e,l,s,a),r[t]=void 0)}}const _l=/(?:Once|Passive|Capture)$/;function ad(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 Hi=0;const cd=Promise.resolve(),ud=()=>Hi||(cd.then(()=>Hi=0),Hi=Date.now());function dd(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;wt(fd(o,n.value),t,5,[o])};return n.value=e,n.attached=ud(),n}function fd(e,t){if(ie(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,pd=(e,t,n,o,i,r)=>{const s=i==="svg";t==="class"?td(e,o,s):t==="style"?id(e,n,o):io(t)?ri(t)||ld(e,t,n,o,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):hd(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 hd(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&Sl(t)&&de(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 gd(e,t,n){let o=fe(e,t);so(o)&&(o=Ie({},o,t));class i extends Fi{constructor(s){super(o,s,n)}}return i.def=o,i}const md=typeof HTMLElement<"u"?HTMLElement:class{};class Fi extends md{constructor(t,n={},o=$l){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!==$l?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow(Ie({},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 Fi){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,xt(()=>{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&&!ie(r))for(const a in r){const u=r[a];(u===Number||u&&u.type===Number)&&(a in this._props&&(this._props[a]=ui(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)_e(this,o)||Object.defineProperty(this,o,{get:()=>X(n[o])})}_resolveProps(t){const{props:n}=t,o=ie(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=ui(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),Cd(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const n=L(this._def,Ie(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,so(s[0])?Ie({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 Wo=e=>{const t=e.props["onUpdate:modelValue"]||!1;return ie(t)?n=>co(t,n):t};function vd(e){e.target.composing=!0}function Cl(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Cn=Symbol("_assign");function Tl(e,t,n){return t&&(e=e.trim()),n&&(e=ci(e)),e}const bd={created(e,{modifiers:{lazy:t,trim:n,number:o}},i){e[Cn]=Wo(i);const r=o||i.props&&i.props.type==="number";pn(e,t?"change":"input",s=>{s.target.composing||e[Cn](Tl(e.value,n,r))}),(n||r)&&pn(e,"change",()=>{e.value=Tl(e.value,n,r)}),t||(pn(e,"compositionstart",vd),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[Cn]=Wo(s),e.composing)return;const l=(r||e.type==="number")&&!/^0\d/.test(e.value)?ci(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))}},yd={deep:!0,created(e,t,n){e[Cn]=Wo(n),pn(e,"change",()=>{const o=e._modelValue,i=wd(e),r=e.checked,s=e[Cn];if(ie(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(ro(o)){const l=new Set(o);r?l.add(i):l.delete(i),s(l)}else s(Ml(e,r))})},mounted:Pl,beforeUpdate(e,t,n){e[Cn]=Wo(n),Pl(e,t,n)}};function Pl(e,{value:t,oldValue:n},o){e._modelValue=t;let i;if(ie(t))i=$r(t,o.props.value)>-1;else if(ro(t))i=t.has(o.props.value);else{if(t===n)return;i=fo(t,Ml(e,!0))}e.checked!==i&&(e.checked=i)}function wd(e){return"_value"in e?e._value:e.value}function Ml(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const xd=["ctrl","shift","alt","meta"],_d={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)=>xd.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=_d[t[s]];if(l&&l(i,t))return}return e(i,...r)})},Sd={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Uo=(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||Sd[s]===r))return e(i)})},kd=Ie({patchProp:pd},Yu);let El;function Il(){return El||(El=vu(kd))}const Cd=(...e)=>{Il().render(...e)},$l=(...e)=>{const t=Il().createApp(...e),{mount:n}=t;return t.mount=o=>{const i=Pd(o);if(!i)return;const r=t._component;!de(r)&&!r.render&&!r.template&&(r.template=i.innerHTML),i.nodeType===1&&(i.textContent="");const s=n(i,!1,Td(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),s},t};function Td(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 Wi(e,t){return fi()?(nc(e,t),!0):!1}const Ui=new WeakMap,Md=(...e)=>{var t;const n=e[0],o=(t=un())===null||t===void 0?void 0:t.proxy,i=o??fi();if(i==null&&!Es())throw new Error("injectLocal must be called in setup");return i&&Ui.has(i)&&n in Ui.get(i)?Ui.get(i)[n]:Ft(...e)},Ol=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Ed=e=>e!=null,Id=Object.prototype.toString,$d=e=>Id.call(e)==="[object Object]",Tn=()=>{};function Od(...e){if(e.length!==1)return Ec(...e);const t=e[0];return typeof t=="function"?Dn(es(()=>({get:t,set:Tn}))):ee(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 zd(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 Dd(e=Dl,t={}){const{initialState:n="active"}=t,o=Od(n==="active");function i(){o.value=!1}function r(){o.value=!0}const s=(...l)=>{o.value&&e(...l)};return{isActive:Dn(o),pause:i,resume:r,eventFilter:s}}function Al(e){return e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e)}function Xn(e){return Array.isArray(e)?e:[e]}function Ad(e){return un()}function gt(e,t=200,n={}){return zl(zd(t,n),e)}function Ld(e,t,n={}){const{eventFilter:o=Dl,...i}=n;return ue(e,zl(o,t),i)}function jd(e,t,n={}){const{eventFilter:o,initialState:i="active",...r}=n,{eventFilter:s,pause:l,resume:a,isActive:u}=Dd(o,{initialState:i});return{stop:Ld(e,t,{...r,eventFilter:s}),pause:l,resume:a,isActive:u}}const Bd=jd;function qi(e,t=!0,n){Ad()?je(e,n):t?e():xt(e)}function Vd(e,t,n){return ue(e,t,{...n,immediate:!0})}const _t=Ol?window:void 0,Nd=Ol?window.document:void 0;function $t(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=Q(()=>{const l=Xn(pt(e[0])).filter(a=>a!=null);return l.every(a=>typeof a!="string")?l:void 0}),r=Vd(()=>{var l,a;return[(l=(a=i.value)===null||a===void 0?void 0:a.map(u=>$t(u)))!==null&&l!==void 0?l:[_t].filter(u=>u!=null),Xn(pt(i.value?e[1]:e[0])),Xn(X(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=$d(c)?{...c}:c;t.push(...l.flatMap(f=>a.flatMap(p=>u.map(_=>o(f,p,_,d)))))},{flush:"post"}),s=()=>{r(),n()};return Wi(n),s}function Rd(){const e=ft(!1),t=un();return t&&je(()=>{e.value=!0},t),e}function Ki(e){const t=Rd();return Q(()=>(t.value,!!e()))}const Hd=Symbol("vueuse-ssr-width");function Fd(){const e=Es()?Md(Hd,null):null;return typeof e=="number"?e:void 0}function Wd(e,t={}){const{window:n=_t,ssrWidth:o=Fd()}=t,i=Ki(()=>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 Hs(()=>{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}),Q(()=>l.value)}const qo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ko="__vueuse_ssr_handlers__",Ud=qd();function qd(){return Ko in qo||(qo[Ko]=qo[Ko]||{}),qo[Ko]}function Kd(e,t){return Ud[e]||t}function Zd(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 Yd={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 Xd(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=k=>{console.error(k)},initOnMounted:_}=o,S=(c?ft:ee)(typeof t=="function"?t():t),z=Q(()=>pt(e));if(!n)try{n=Kd("getDefaultStorage",()=>_t==null?void 0:_t.localStorage)()}catch(k){p(k)}if(!n)return S;const w=pt(t),x=Zd(w),D=(i=o.serializer)!==null&&i!==void 0?i:Yd[x],{pause:y,resume:b}=Bd(S,k=>U(k),{flush:r,deep:s,eventFilter:f});ue(z,()=>P(),{flush:r});let O=!1;const W=k=>{_&&!O||P(k)},Y=k=>{_&&!O||Z(k)};d&&l&&(n instanceof Storage?St(d,"storage",W,{passive:!0}):St(d,Ll,Y)),_?qi(()=>{O=!0,P()}):P();function N(k,G){if(d){const q={key:z.value,oldValue:k,newValue:G,storageArea:n};d.dispatchEvent(n instanceof Storage?new StorageEvent("storage",q):new CustomEvent(Ll,{detail:q}))}}function U(k){try{const G=n.getItem(z.value);if(k==null)N(G,null),n.removeItem(z.value);else{const q=D.write(k);G!==q&&(n.setItem(z.value,q),N(G,q))}}catch(G){p(G)}}function F(k){const G=k?k.newValue:n.getItem(z.value);if(G==null)return a&&w!=null&&n.setItem(z.value,D.write(w)),w;if(!k&&u){const q=D.read(G);return typeof u=="function"?u(q,w):x==="object"&&!Array.isArray(q)?{...w,...q}:q}else return typeof G!="string"?G:D.read(G)}function P(k){if(!(k&&k.storageArea!==n)){if(k&&k.key==null){S.value=w;return}if(!(k&&k.key!==z.value)){y();try{const G=D.write(S.value);(k===void 0||(k==null?void 0:k.newValue)!==G)&&(S.value=F(k))}catch(G){p(G)}finally{k?xt(b):b()}}}}function Z(k){P(k.detail)}return S}function Zi(e={}){const{document:t=Nd}=e;if(!t)return ft("visible");const n=ft(t.visibilityState);return St(t,"visibilitychange",()=>{n.value=t.visibilityState},{passive:!0}),n}function Gd(e,t,n={}){const{window:o=_t,...i}=n;let r;const s=Ki(()=>o&&"ResizeObserver"in o),l=()=>{r&&(r.disconnect(),r=void 0)},a=ue(Q(()=>{const c=pt(e);return Array.isArray(c)?c.map(d=>$t(d)):[$t(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 Wi(u),{isSupported:s,stop:u}}function jl(e,t={width:0,height:0},n={}){const{window:o=_t,box:i="content-box"}=n,r=Q(()=>{var d;return(d=$t(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}=Gd(e,([d])=>{const f=i==="border-box"?d.borderBoxSize:i==="content-box"?d.contentBoxSize:d.devicePixelContentBoxSize;if(o&&r.value){const p=$t(e);if(p){const _=p.getBoundingClientRect();s.value=_.width,l.value=_.height}}else if(f){const p=Xn(f);s.value=p.reduce((_,{inlineSize:S})=>_+S,0),l.value=p.reduce((_,{blockSize:S})=>_+S,0)}else s.value=d.contentRect.width,l.value=d.contentRect.height},n);qi(()=>{const d=$t(e);d&&(s.value="offsetWidth"in d?d.offsetWidth:t.width,l.value="offsetHeight"in d?d.offsetHeight:t.height)});const u=ue(()=>$t(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 Bl(e,t,n={}){const{root:o,rootMargin:i="0px",threshold:r=0,window:s=_t,immediate:l=!0}=n,a=Ki(()=>s&&"IntersectionObserver"in s),u=Q(()=>Xn(pt(e)).map($t).filter(Ed));let c=Tn;const d=ft(l),f=a.value?ue(()=>[u.value,$t(o),d.value],([_,S])=>{if(c(),!d.value||!_.length)return;const z=new IntersectionObserver(t,{root:$t(S),rootMargin:i,threshold:r});_.forEach(w=>w&&z.observe(w)),c=()=>{z.disconnect(),c=Tn}},{immediate:l,flush:"post"}):Tn,p=()=>{c(),f(),d.value=!1};return Wi(p),{isSupported:a,isActive:d,pause(){c(),d.value=!1},resume(){d.value=!0},stop:p}}function Jd(e,t,n={}){const{window:o=_t}=n;return Xd(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(),qi(u);const c={passive:!0};return St("resize",u,c),t&&s==="visual"&&t.visualViewport&&St(t.visualViewport,"resize",u,c),i&&ue(Wd("(orientation: portrait)"),()=>u()),{width:l,height:a}}class Gn{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=[]}}ke(Gn,"handlers",[]);function Yi(e){je(()=>Gn.register(e)),Mt(()=>Gn.unregister(e))}const Vl=fe({__name:"HelpScreen",props:{touchDevice:{type:Boolean}},emits:["hide"],setup(e,{emit:t}){const n=e,o=t,i=ee(null),r=ee([]);Yi(()=>(o("hide"),!0)),je(async()=>{const u=jl(i),c=gt(()=>{s({width:u.width.value,height:u.height.value})},50);c(),ue(u.width,c),ue(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,_=0;const S=50,z=25;u.forEach(b=>{var U;const O=(U=b.getAttribute("title"))==null?void 0:U.trim(),W=b.getBoundingClientRect();if(!O||!W.height||!W.width)return;const Y=Math.ceil((W.top-10)/S),N=Math.ceil((W.left-10)/S);f.push({isTour:!1,title:O,rect:W,fromX:N,toX:Math.max(N+1,Math.ceil((W.right+10)/S)),fromY:Y,toY:Math.max(Y+1,Math.ceil((W.bottom+10)/S))})}),f.forEach(b=>{for(let O=b.fromY;O<b.toY;O++){d[O]??(d[O]=[]);for(let W=b.fromX;W<b.toX;W++)d[O][W]=b;b.toY>p+1&&(p=b.toY-1),b.toX>_+1&&(_=b.toX-1)}});let w=_/2;f.forEach(b=>{b.isAlignRight=b.fromX>w});const x=(b,O)=>{d[O]??(d[O]=[]);const W=O>=b.toY;if(b.isTour)for(let Y=b.fromX;Y<b.toX;Y++)delete d[b.fromY][Y],b.fromY=O,b.toY=O+(W?1:-1),d[O][Y]=b;else{const Y=b.isAlignRight?b.fromX-3:b.fromX,N=Y+3;b.helpItem={fromX:Y,toX:N,fromY:O,toY:O+1,isTour:!0,isAlignRight:b.isAlignRight};for(let U=Y;U<N;U++)d[O][U]=b.helpItem}},D=(b,O)=>{if(O>p||O<0)return!1;const W=O>=b.toY,Y=d[O];if(!Y)return x(b,O),!0;const N=Y[b.fromX];if(N&&!N.isTour)return!1;if(N&&N.isTour)return D(N,W?O+1:O-1)?(x(b,O),!0):!1;if(!N){const U=b.isAlignRight?-1:1;return Y[b.fromX+U]||Y[b.fromX+U*2]?D(b,W?O+1:O-1):(x(b,O),!0)}return!1};f.forEach(b=>{if(!D(b,b.toY)){if(b.isAlignRight){const O=d[b.fromY]??[];if(!O.slice(b.fromX-3,b.fromX).filter(Boolean).length){const Y=b.fromX-3,N=b.fromX;b.helpItem={isTour:!0,isAlignRight:!0,fromX:Y,toX:N,fromY:b.fromY,toY:b.toY};for(let U=b.fromX-3;U<b.fromX;U++)O[U]=b.helpItem;return}}D(b,b.fromY-1)}});const y=[];return f.forEach(b=>{const{title:O,helpItem:W,rect:Y,isAlignRight:N,fromX:U,fromY:F,toY:P}=b;if(!O||!W||!Y)return;const Z=W.fromY>=P,k=W.toY<=F;y.push({title:a(O),style:{top:Z?`${Y.bottom+(W.fromY-P)*S+z}px`:k?void 0:`${Y.top+8}px`,bottom:k?`${c.height-Y.top+(W.toY-F)*S+z}px`:void 0,left:N?void 0:`${Y.left}px`,right:N?Z?`${c.width-Y.right}px`:`${c.width-Y.right+Y.width+z}px`:void 0},arrowStyle:{width:k||Z?"2px":`${Math.abs(W.toX-U)*S+z-5}px`,height:k||Z?`${(Z?W.fromY-P:F-W.toY)*S+z}px`:"2px",top:Z?`${Y.bottom}px`:k?void 0:`${Y.top+20}px`,bottom:k?`${c.height-Y.top}px`:void 0,left:N?void 0:`${Y.left+Y.width/2}px`,right:N?Z?`${c.width-Y.right+Y.width/2}px`:`${c.width-Y.right+Y.width}px`:void 0}})}),y}function a(u){return n.touchDevice?u.split("(")[0].trim():u}return(u,c)=>(v(),I(be,null,[c[1]||(c[1]=K("div",{class:"fixed inset-0 bg-black bg-opacity-90"},null,-1)),K("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),I(be,null,Yt(r.value,d=>(v(),I(be,{key:d.title},[K("div",{class:"absolute",style:Se(d.style)},Fe(d.title),5),K("div",{class:"absolute bg-stone-300 rounded-lg",style:Se(d.arrowStyle)},null,4)],64))),128))],512)],64))}}),Qd=Object.freeze(Object.defineProperty({__proto__:null,default:Vl},Symbol.toStringTag,{value:"Module"}));function Jn(e,t){let n=null;return(...o)=>{n===null&&(n=setTimeout(()=>{n=null,e(...o)},t))}}const ef=fe({__name:"ReaderTour",emits:["hide"],setup(e,{emit:t}){const n=t,o=ee(null),i=ee(0),r=ee([]),s=Q(()=>r.value[i.value]),l=Jn(a,500);je(()=>{const d=jl(o),f=gt(()=>u({width:d.width.value,height:d.height.value}),50);f(),ue(d.width,f),ue(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:_})=>{const S=p.top<d.height-p.bottom,z=p.left<d.width-p.right;return{text:_,style:{left:`${p.left}px`,top:`${p.top}px`,width:`${p.width}px`,height:`${p.height}px`},textStyle:{left:z?`${p.left-12}px`:void 0,right:z?void 0:`${d.width-p.left}px`,top:S?`${p.bottom+12}px`:`${p.top+20}px`,textAlign:S?void 0:"right",transform:S?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(_=>{var w;const S=(w=_.getAttribute("data-tour"))==null?void 0:w.trim();if(!(S!=null&&S.length))return;const z=_.getBoundingClientRect();f.push({rect:z,text:S})}),f}return(d,f)=>{var p,_;return v(),I(be,null,[K("div",{class:ce(["fixed inset-0 bg-black bg-opacity-50 duration-500",{"opacity-0":!s.value,"opacity-100":!!s.value}])},null,2),K("div",{ref_key:"root",ref:o,class:"tour",onClick:f[0]||(f[0]=Be((...S)=>X(l)&&X(l)(...S),["stop"]))},[s.value?(v(),I("div",{key:i.value,class:"tour__target",style:Se(s.value.style)},null,4)):se("",!0),(v(),I("div",{key:i.value,class:"tour__text",style:Se((p=s.value)==null?void 0:p.textStyle)},Fe(((_=s.value)==null?void 0:_.text)??""),5))],512)],64)}}}),tf=".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}}",ve=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n},Nl=ve(ef,[["styles",[tf]]]),nf=Object.freeze(Object.defineProperty({__proto__:null,default:Nl},Symbol.toStringTag,{value:"Module"}));function of({touchDevice:e}){const t=ee(!1);let n=0;return Rn("busy:touchDevice",e),Rn("setBusyState",o=>{n+=o?1:-1;const i=n>0;t.value!=i&&(t.value=i)}),Q(()=>t.value)}function Zo(){const e=Ft("busy:touchDevice"),t=Ft("setBusyState");let n=!1;return Mt(()=>{n&&(t==null||t(!1))}),(o,{desktopOnly:i=!1}={})=>{i&&e||(n=o,t==null||t(o))}}function rf(e){Rn("hapticFeedback",e)}function Yo(){return Ft("hapticFeedback")}class sf{constructor(){ke(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 lf(){const e=new sf;return Mt(()=>e.dispose()),Rn("keyController",e),e}function Ot(e){const t=Ft("keyController");je(()=>t.addListener(e)),Mt(()=>t.removeListener(e))}function af(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=ee(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 cf(){sessionStorage.removeItem("tk:page"),sessionStorage.removeItem("tk:page:path")}const uf=(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=>uf(e,n))},updated:(e,t)=>{e.setAttribute("data-ripple",t.value)}},df={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"},Xi=fe({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=Zo(),r=Yo();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)=>Le((v(),oe(ws(e.href?"a":"button"),kn({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:ne(()=>[K("div",df,[xe(c.$slots,"default")])]),_:3},16,["class"])),[[X(zt),e.disabled?0:15]])}}),ff=Object.freeze(Object.defineProperty({__proto__:null,default:Xi},Symbol.toStringTag,{value:"Module"})),pf={},hf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function gf(e,t){return v(),I("svg",hf,[...t[0]||(t[0]=[K("path",{fill:"currentColor",d:"M19 12.998h-6v6h-2v-6H5v-2h6v-6h2v6h6z"},null,-1)])])}const Rl=ve(pf,[["render",gf]]),mf=Object.freeze(Object.defineProperty({__proto__:null,default:Rl},Symbol.toStringTag,{value:"Module"})),vf={class:"inline-flex p-6 gap-6 text-base text-stone-300 select-none"},bf={key:0,class:"inline-block rounded-full relative w-28 h-12 overflow-hidden"},yf={key:0,class:"absolute bottom-0 left-0 right-0 flex justify-center pb-7 md:pb-6 lg:pb-4"},wf={class:"flex justify-center items-center gap-1 pl-1 pr-2 h-full"},Gi=ve(fe({__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=ee(null),r=ee(null),s=ee(!1),l=ee(!1),a=ee(n.seconds),u=ee(n.seconds<=0),c=ee(n.seconds),d=Yo();je(()=>{let _;Bl(r,S=>{const z=S.some(w=>w.isIntersecting);z!==l.value&&(l.value=z,o("visibility-changed",z),u.value=n.seconds<=0,a.value=n.seconds,c.value=n.seconds,_&&(clearInterval(_),_=void 0),!(!l.value||u.value)&&(_=setInterval(()=>{a.value-=1,a.value<=0&&(clearInterval(_),_=void 0,o("next"))},1e3)))}),Bl(i,S=>{s.value=S.some(z=>z.isIntersecting)}),Mt(()=>_&&clearInterval(_))});function f(){o("next"),d()}function p(){o("hide")}return(_,S)=>(v(),I("div",{ref_key:"root",ref:i,class:"h-full w-full flex justify-center items-center relative"},[Le(K("div",vf,[e.hasNext?(v(),I("div",bf,[l.value?(v(),I("div",{key:0,class:"absolute left-0 top-0 bottom-0 h-full bg-stone-600 bg-opacity-50",style:Se(u.value?{}:{animation:`auto-next ${c.value}s linear forwards`})},null,4)):se("",!0),Le((v(),I("button",{ref_key:"nextButton",ref:r,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(f,["stop"])},[Wt(Fe(u.value?"Next":`Next in ${a.value}`),1)])),[[X(zt)]])])):se("",!0),Le((v(),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(p,["stop"])},[Wt(Fe(e.offlineMode?"Close":"Hide"),1)])),[[X(zt)]])],512),[[gl,s.value||!e.hasNext]]),e.showAddButton?(v(),I("div",yf,[L(Xi,{class:"bg-primary w-min !h-9 !bg-opacity-100",onClick:S[0]||(S[0]=()=>o("add-to-library"))},{default:ne(()=>[K("div",wf,[L(Rl,{class:"flex-shrink-0 w-auto"}),S[1]||(S[1]=K("span",{class:"text-sm text-stone-50"},"Add to library",-1))])]),_:1})])):se("",!0)],512))}}),[["styles",[".animate-auto-next{animation:auto-next 5s linear forwards}@keyframes auto-next{0%{width:0}to{width:100%}}"]]]),xf=Object.freeze(Object.defineProperty({__proto__:null,default:Gi},Symbol.toStringTag,{value:"Module"})),Ge=fe({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(),oe(Xi,{class:ce(["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:ne(()=>[xe(o.$slots,"default")]),_:3},8,["class","disabled","href","title","transparent","enable-haptic-feedback"]))}}),_f=Object.freeze(Object.defineProperty({__proto__:null,default:Ge},Symbol.toStringTag,{value:"Module"})),Sf={},kf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Cf(e,t){return v(),I("svg",kf,[...t[0]||(t[0]=[K("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 Hl=ve(Sf,[["render",Cf]]),Tf=Object.freeze(Object.defineProperty({__proto__:null,default:Hl},Symbol.toStringTag,{value:"Module"}));var Qt=(e=>(e[e.manga=1]="manga",e[e.novel=2]="novel",e[e.anime=3]="anime",e))(Qt||{});const Ji=fe({__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(),oe(Ge,{href:e.offlineMode||!e.raw?"#":e.raw.title.url,title:`Back to ${((l=e.raw)==null?void 0:l.contentType)===X(Qt).novel?"novel":"manga"}`,transparent:e.transparent,"enable-haptic-feedback":"",onClick:i},{default:ne(()=>[L(Hl)]),_:1},8,["href","title","transparent"])}}}),Pf=Object.freeze(Object.defineProperty({__proto__:null,default:Ji},Symbol.toStringTag,{value:"Module"})),Mf={},Ef={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function If(e,t){return v(),I("svg",Ef,[...t[0]||(t[0]=[K("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 Fl=ve(Mf,[["render",If]]),$f=Object.freeze(Object.defineProperty({__proto__:null,default:Fl},Symbol.toStringTag,{value:"Module"})),Of={},zf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Df(e,t){return v(),I("svg",zf,[...t[0]||(t[0]=[K("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 Wl=ve(Of,[["render",Df]]),Af=Object.freeze(Object.defineProperty({__proto__:null,default:Wl},Symbol.toStringTag,{value:"Module"})),Qi=fe({__name:"ButtonEntry",props:{entryId:{type:null},transparent:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=t;Ot({onKeyUp:i=>{i.key==="t"&&!i.metaKey&&!i.ctrlKey&&n("click")}});function o(){n("click")}return(i,r)=>(v(),oe(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:ne(()=>[e.entryId?(v(),oe(Fl,{key:0})):(v(),oe(Wl,{key:1}))]),_:1},8,["transparent","title"]))}}),Lf=Object.freeze(Object.defineProperty({__proto__:null,default:Qi},Symbol.toStringTag,{value:"Module"})),jf={},Bf={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function Vf(e,t){return v(),I("svg",Bf,[...t[0]||(t[0]=[K("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 Ul=ve(jf,[["render",Vf]]),Nf=Object.freeze(Object.defineProperty({__proto__:null,default:Ul},Symbol.toStringTag,{value:"Module"})),Xo=fe({inheritAttrs:!1,__name:"ButtonHide",props:{transparent:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=t;return(o,i)=>(v(),oe(Ge,{title:"Hide reader","data-tour":"You have entered reader mode, press here to return to the original page",class:ce(o.$attrs.class),transparent:e.transparent,onClick:i[0]||(i[0]=()=>n("click"))},{default:ne(()=>[L(Ul)]),_:1},8,["class","transparent"]))}}),Rf=Object.freeze(Object.defineProperty({__proto__:null,default:Xo},Symbol.toStringTag,{value:"Module"})),Hf={},Ff={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function Wf(e,t){return v(),I("svg",Ff,[...t[0]||(t[0]=[K("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),K("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 er=ve(Hf,[["render",Wf]]),Uf=Object.freeze(Object.defineProperty({__proto__:null,default:er},Symbol.toStringTag,{value:"Module"})),qf={},Kf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function Zf(e,t){return v(),I("svg",Kf,[...t[0]||(t[0]=[K("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 tr=ve(qf,[["render",Zf]]),Yf=Object.freeze(Object.defineProperty({__proto__:null,default:tr},Symbol.toStringTag,{value:"Module"})),nr=fe({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 Ot({onKeyDown(i){!n.disabled&&i.key===" "&&(i.preventDefault(),o("click"))}}),(i,r)=>(v(),oe(Ge,{transparent:e.transparent,class:ce(i.$attrs.class),"data-tour":e.tourMessage,title:`${e.playing?"Pause":"Play"} (Space)`,disabled:e.disabled,onClick:r[0]||(r[0]=()=>o("click"))},{default:ne(()=>[e.playing?(v(),oe(er,{key:0})):(v(),oe(tr,{key:1}))]),_:1},8,["transparent","class","data-tour","title","disabled"]))}}),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 32 32"};function Qf(e,t){return v(),I("svg",Jf,[...t[0]||(t[0]=[K("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[K("circle",{cx:"14",cy:"14",r:"12"}),K("path",{d:"m23 23l7 7M9 12V9h3m4 0h3v3M9 16v3h3m7-3v3h-3"})],-1)])])}const ql=ve(Gf,[["render",Qf]]),ep=Object.freeze(Object.defineProperty({__proto__:null,default:ql},Symbol.toStringTag,{value:"Module"})),tp={class:"block w-4 h-4"},np={class:"w-12"},Kl=fe({__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(),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"])},[K("div",tp,[L(ql)]),K("div",np,Fe(Math.ceil(e.zoom*100))+"%",1)]))}}),op=Object.freeze(Object.defineProperty({__proto__:null,default:Kl},Symbol.toStringTag,{value:"Module"})),ip={},rp={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 36 36"};function sp(e,t){return v(),I("svg",rp,[...t[0]||(t[0]=[K("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),K("path",{fill:"none",d:"M0 0h36v36H0z"},null,-1)])])}const Zl=ve(ip,[["render",sp]]),lp=Object.freeze(Object.defineProperty({__proto__:null,default:Zl},Symbol.toStringTag,{value:"Module"})),or=fe({__name:"ButtonSettings",props:{disabled:{type:Boolean},transparent:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=t;return Ot({onKeyUp:o=>{o.key==="s"&&!o.metaKey&&!o.ctrlKey&&n("click")}}),(o,i)=>(v(),oe(Ge,{transparent:e.transparent,title:"Reader preferences (S)",disabled:e.disabled,onClick:i[0]||(i[0]=()=>n("click"))},{default:ne(()=>[L(Zl)]),_:1},8,["transparent","disabled"]))}}),ap=Object.freeze(Object.defineProperty({__proto__:null,default:or},Symbol.toStringTag,{value:"Module"})),cp={},up={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function dp(e,t){return v(),I("svg",up,[...t[0]||(t[0]=[K("path",{fill:"currentColor",d:"M4 4h6v2H6v4H4V4Zm10 0h6v6h-2V6h-4V4ZM6 14v4h4v2H4v-6h2Zm14 0v6h-6v-2h4v-4h2Z"},null,-1)])])}const Yl=ve(cp,[["render",dp]]),fp=Object.freeze(Object.defineProperty({__proto__:null,default:Yl},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(),I("svg",hp,[...t[0]||(t[0]=[K("path",{fill:"currentColor",d:"M14 20v-6h6v2h-4v4h-2Zm-6 0v-4H4v-2h6v6H8Zm12-10h-6V4h2v4h4v2Zm-10 0H4V8h4V4h2v6Z"},null,-1)])])}const Xl=ve(pp,[["render",gp]]),mp=Object.freeze(Object.defineProperty({__proto__:null,default:Xl},Symbol.toStringTag,{value:"Module"})),ir=fe({__name:"ButtonWebFullScreen",props:{transparent:{type:Boolean}},emits:["request-full-screen"],setup(e,{emit:t}){const n=t,o=ee(!1);Ot({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)=>(v(),oe(Ge,{transparent:e.transparent,title:`${o.value?"Exit":"Enter"} fullscreen (F)`,onClick:i},{default:ne(()=>[o.value?(v(),oe(Xl,{key:0})):(v(),oe(Yl,{key:1}))]),_:1},8,["transparent","title"]))}}),vp=Object.freeze(Object.defineProperty({__proto__:null,default:ir},Symbol.toStringTag,{value:"Module"}));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)})}const bp=["aria-hidden"],yp=["onClick"],Gl=fe({__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=at(e,"modelValue"),r=ee(null),s=ee(!1),l=ee(!1),a=ee(!1),u=ee(!1),c={mounted:y=>{var b;i.value&&((b=y.children[i.value])==null||b.scrollIntoView({behavior:"auto",block:"center",inline:"center"}))}};Ot({onKeyDown:z}),Yi(()=>{const y=s.value;return y&&(s.value=!1),y});const d=Zo(),f=Yo();async function p(y){s.value=y??!s.value,d(s.value),s.value?(_(),x(r.value)):setTimeout(D,250)}function _(){const y=r.value;if(y){const b=y.getBoundingClientRect(),O=b.x+b.width/2;l.value=b.y>window.innerHeight/2,a.value=O<window.innerWidth/3,u.value=O>window.innerWidth/3*2}}function S(y,b){p(),y!=i.value&&(i.value=y,o("select",y,b),n.enableHapticFeedback&&f())}function z(y){s.value&&y.key==="Escape"&&(p(),y.preventDefault())}let w=[];function x(y){const b=window.getComputedStyle(y).zIndex,O=y.style.zIndex;(!b||!(+b>0))&&((!y.parentElement||y.parentElement.childElementCount>1)&&(y.style.zIndex="1",w.push({el:y,zIndex:O})),y.parentElement&&x(y.parentElement))}function D(){w.forEach(({el:y,zIndex:b})=>{y.style.zIndex=b??""}),w=[]}return(y,b)=>(v(),I("div",{ref_key:"root",ref:r,class:"select-none relative inline-flex"},[s.value?(v(),I("div",{key:0,class:"fixed inset-0 bg-transparent",onClick:b[0]||(b[0]=()=>p())})):se("",!0),e.items.length?(v(),oe(Ro,{key:1,name:"slide-fade","enter-from-class":"scale-y-90 opacity-0 pointer-events-none","leave-to-class":"scale-y-90 opacity-0 pointer-events-none"},{default:ne(()=>[s.value?Le((v(),I("ul",{key:0,ref:"list","aria-hidden":!s.value,class:ce(["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:b[1]||(b[1]=Be(()=>{},["stop"])),onTouchmove:b[2]||(b[2]=Be(()=>{},["stop"]))},[(v(!0),I(be,null,Yt(e.items,(O,W)=>Le((v(),I("li",{key:W,tabindex:"-1",class:ce(["h-10 px-4 last:border-b-transparent cursor-pointer hover:bg-stone-100 hover:bg-opacity-10 duration-100",{"text-textPrimary":W===i.value}]),onClick:Y=>S(W,Y)},[K("div",{class:ce(["h-full py-2",{"border-t-[1px] border-solid border-stone-400 border-opacity-30":W>0}])},[xe(y.$slots,"item",{item:O},()=>[Wt(Fe(O),1)])],2)],10,yp)),[[X(zt),30]])),128))],42,bp)),[[c]]):se("",!0)]),_:3})):se("",!0),xe(y.$slots,"default",{toggle:p,isOpen:s.value,isAlignTop:l.value})],512))}}),wp=Object.freeze(Object.defineProperty({__proto__:null,default:Gl},Symbol.toStringTag,{value:"Module"})),xp={},_p={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Sp(e,t){return v(),I("svg",_p,[...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 Jl=ve(xp,[["render",Sp]]),kp=Object.freeze(Object.defineProperty({__proto__:null,default:Jl},Symbol.toStringTag,{value:"Module"})),Cp={},Tp={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Pp(e,t){return v(),I("svg",Tp,[...t[0]||(t[0]=[K("path",{fill:"currentColor",d:"m7 10l5 5l5-5z"},null,-1)])])}const Ql=ve(Cp,[["render",Pp]]),Mp=Object.freeze(Object.defineProperty({__proto__:null,default:Ql},Symbol.toStringTag,{value:"Module"})),Ep=["onClick"],Ip={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"},$p={class:"whitespace-nowrap"},rr=fe({__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=at(e,"modelValue"),r=ee(!1),s=Zo();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(),oe(Gl,{modelValue:i.value,"onUpdate:modelValue":p[0]||(p[0]=_=>i.value=_),items:e.items,"enable-haptic-feedback":e.enableHapticFeedback,onSelect:p[1]||(p[1]=(_,S)=>o("select",_,S))},Mi({default:ne(({toggle:_,isOpen:S,isAlignTop:z})=>[Le((v(),I("button",kn({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(S,_),["stop"]),onMouseenter:c,onMouseleave:d}),[K("div",Ip,[K("span",$p,Fe(e.label),1),e.items.length||e.canLoadItems?(v(),I("span",{key:0,class:ce(["w-4 h-4 flex ml-1 -mr-3 flex-shrink-0",{"rotate-180":z}]),"aria-hidden":"true"},[r.value?(v(),oe(Jl,{key:0})):(v(),oe(Ql,{key:1}))],2)):se("",!0)])],16,Ep)),[[X(zt),30]])]),_:2},[f.$slots.item?{name:"item",fn:ne(({item:_})=>[xe(f.$slots,"item",{item:_})]),key:"0"}:void 0]),1032,["modelValue","items","enable-haptic-feedback"]))}}),Op=Object.freeze(Object.defineProperty({__proto__:null,default:rr},Symbol.toStringTag,{value:"Module"})),zp={},Dp={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Ap(e,t){return v(),I("svg",Dp,[...t[0]||(t[0]=[K("path",{fill:"currentColor",d:"M15.41 7.41L14 6l-6 6l6 6l1.41-1.41L10.83 12z"},null,-1)])])}const ea=ve(zp,[["render",Ap]]),Lp=Object.freeze(Object.defineProperty({__proto__:null,default:ea},Symbol.toStringTag,{value:"Module"})),jp={},Bp={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Vp(e,t){return v(),I("svg",Bp,[...t[0]||(t[0]=[K("path",{fill:"currentColor",d:"M10 6L8.59 7.41L13.17 12l-4.58 4.59L10 18l6-6z"},null,-1)])])}const ta=ve(jp,[["render",Vp]]),Np=Object.freeze(Object.defineProperty({__proto__:null,default:ta},Symbol.toStringTag,{value:"Module"})),Rp={key:0,class:"ml-auto inline-flex gap-[1px] scale-95 origin-right"},sr=fe({__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||!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,_;(_=(p=(f=n.data)==null?void 0:f.chapters)==null?void 0:p[c])==null||_.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 v(),I(be,null,[L(rr,{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:ne(({item:p})=>[Wt(Fe(p.label),1)]),_:1},8,["modelValue","label","transparent","items","can-load-items"]),e.data.next||e.data.prev?(v(),I("div",Rp,[L(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:ne(()=>[L(ea)]),_:1},8,["title","disabled","transparent"]),L(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:ne(()=>[L(ta)]),_:1},8,["title","disabled","transparent"])])):se("",!0)],64)}}}),Hp=Object.freeze(Object.defineProperty({__proto__:null,default:sr},Symbol.toStringTag,{value:"Module"})),Fp=["min","max","step"],Wp={class:"flex-shrink-0 w-12 inline-block text-right"},tn=ve(fe({__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=at(e,"modelValue"),n=Q({get(){return t.value},set(o){t.value=+o}});return(o,i)=>{var r;return v(),I("div",{class:"flex items-center gap-3 pl-1",style:Se({"--percentage":`${(n.value-e.min)/(e.max-e.min)*100}%`})},[Le(K("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,Fp),[[bd,n.value]]),K("span",Wp,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}"]]]),Up=Object.freeze(Object.defineProperty({__proto__:null,default:tn},Symbol.toStringTag,{value:"Module"})),qp={ref:"root",class:"flex text-sm flex-wrap gap-2 leading-none"},Kp=["onClick","onKeyup"],mt=fe({__name:"InputSelect",props:Ye({items:{type:Array}},{modelValue:{type:Number,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=at(e,"modelValue");function o(i){i!==n.value&&(n.value=i)}return(i,r)=>(v(),I("div",qp,[(v(!0),I(be,null,Yt(t.items,(s,l)=>Le((v(),I("div",{key:l,tabindex:"0",class:ce(["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:[Uo(()=>o(l),["enter"]),Uo(()=>o(l),["space"])]},[Wt(Fe(s),1)],42,Kp)),[[X(zt),30]])),128))],512))}}),Zp=Object.freeze(Object.defineProperty({__proto__:null,default:mt},Symbol.toStringTag,{value:"Module"})),Yp={class:"flex w-full items-center justify-between cursor-pointer mb-5 last:mb-0"},Xp={class:"text-sm py-1"},Gp={class:"switcher p-1"},lr=ve(fe({__name:"InputSwitcher",props:Ye({label:{type:String}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=at(e,"modelValue");return(n,o)=>(v(),I("label",Yp,[K("span",Xp,Fe(e.label),1),K("div",Gp,[Le(K("input",{"onUpdate:modelValue":o[0]||(o[0]=i=>t.value=i),type:"checkbox"},null,512),[[yd,t.value]]),o[1]||(o[1]=K("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))}']]]),Jp=Object.freeze(Object.defineProperty({__proto__:null,default:lr},Symbol.toStringTag,{value:"Module"})),Qp={class:"flex-grow mb-5 last:mb-0"},Ae=fe({__name:"TableField",props:{label:{type:String},disabled:{type:Boolean}},setup(e){return(t,n)=>(v(),I(be,null,[K("div",{class:ce(["flex-shrink-0 mb-2 whitespace-nowrap text-sm",{"opacity-50":e.disabled}])},Fe(e.label),3),K("div",Qp,[xe(t.$slots,"default")])],64))}}),eh=Object.freeze(Object.defineProperty({__proto__:null,default:Ae},Symbol.toStringTag,{value:"Module"})),na=fe({__name:"FieldContrast",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=at(e,"modelValue"),n=Q({get(){return Math.round(t.value*100)},set(o){t.value=Math.round(o)/100}});return(o,i)=>(v(),oe(Ae,{label:"Contrast"},{default:ne(()=>[L(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}))}}),th=Object.freeze(Object.defineProperty({__proto__:null,default:na},Symbol.toStringTag,{value:"Module"})),nh={},oh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function ih(e,t){return v(),I("svg",oh,[...t[0]||(t[0]=[K("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 oa=ve(nh,[["render",ih]]),rh=Object.freeze(Object.defineProperty({__proto__:null,default:oa},Symbol.toStringTag,{value:"Module"})),sh={},lh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function ah(e,t){return v(),I("svg",lh,[...t[0]||(t[0]=[K("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 ia=ve(sh,[["render",ah]]),ch=Object.freeze(Object.defineProperty({__proto__:null,default:ia},Symbol.toStringTag,{value:"Module"})),ar=fe({inheritAttrs:!1,__name:"ButtonOutline",emits:["click"],setup(e,{emit:t}){const n=t,o=Yo();function i(){o(),n("click")}return(r,s)=>Le((v(),I("button",{class:ce([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},[xe(r.$slots,"default")],2)),[[X(zt),24]])}}),uh=Object.freeze(Object.defineProperty({__proto__:null,default:ar},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 cr=[{name:"System",value:"system-ui, sans-serif"},{name:"Charter",value:'Charter, "Times New Roman", serif'},{name:"Georgia",value:"Georgia, serif"}],ra=fe({__name:"FieldFontFamily",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=at(e,"modelValue"),n=Q({get(){const o=cr.findIndex(i=>i.value===t.value);return o===-1?0:o},set(o){t.value=cr[o].value}});return(o,i)=>(v(),oe(Ae,{label:"Font family"},{default:ne(()=>[L(mt,{modelValue:n.value,"onUpdate:modelValue":i[0]||(i[0]=r=>n.value=r),items:X(cr).map(r=>r.name)},null,8,["modelValue","items"])]),_:1}))}}),dh=Object.freeze(Object.defineProperty({__proto__:null,default:ra},Symbol.toStringTag,{value:"Module"}));function fh(e){if(e)try{return JSON.parse(e)}catch{return}}function ph(){const{width:e,height:t}=hn();return Q(()=>e.value>t.value)}function sa(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 Go=.25,Jo=5,ur=.25,Qo=.2,ei=5,hh=.05,gh=0,mh=5;function vh(e){var b,O,W,Y,N,U;const n=e.touchDevice&&(window.innerHeight<=600||window.innerWidth<=600)?ph():void 0,{titleName:o,isWebtoon:i}=e,r=o?sa(o):location.hostname,s=ee(bh(`tkr:${r}`)),l=F=>{s.value=F;const P=`tkr:${r}`;!F||!Object.keys(F).length?localStorage.removeItem(P):localStorage.setItem(P,JSON.stringify(F))},a=F=>{if(!s.value){l(F);return}const P={...s.value};Object.entries(F).forEach(([Z,k])=>{k===void 0?delete P[Z]:P[Z]=k}),l(P)},u=ee((b=s.value)==null?void 0:b.style),c=ee((O=s.value)==null?void 0:O.direction),d=ee((W=s.value)==null?void 0:W.gap),f=ee((Y=s.value)==null?void 0:Y.speed),p=ee((N=s.value)==null?void 0:N.zoom),_=ee(((U=s.value)==null?void 0:U.breakFirst)??!1),S=Q({get(){if(i.value)return Dt.longStrip;if(u.value!==void 0)return u.value;const{landscapeStyle:F,readerStyle:P}=e.defaultPreferences.value;return n!=null&&n.value?F??P:P},set:F=>{if(u.value===F)return;const P=S.value===Dt.longStrip,Z=F===Dt.longStrip;u.value=F,a({style:F}),P!==Z&&(z.value=Z?nt.vertical:nt.rtl)}}),z=Q({get(){if(i.value)return nt.vertical;if(c.value!==void 0)return c.value;const{direction:F,landscapeDirection:P}=e.defaultPreferences.value;return n!=null&&n.value?P??F:F},set:F=>{c.value=F,a({direction:F})}}),w=Q({get:()=>d.value??e.defaultPreferences.value.gap,set(F){d.value=F,a({gap:F})}}),x=Q({get:()=>f.value??e.defaultPreferences.value.speed,set(F){f.value=F,a({speed:F===1?void 0:F})}}),D=Q({get:()=>p.value??1,set(F){p.value=F,a({zoom:F===1?void 0:F})}}),y=Q({get:()=>_.value,set(F){_.value=F,a({breakFirst:F?!0:void 0})}});return{direction:z,style:S,gap:w,speed:x,zoom:D,isLongStrip:Q(()=>S.value===Dt.longStrip),isDouble:Q(()=>S.value===Dt.double),isRTL:Q(()=>z.value===nt.rtl),isVertical:Q(()=>z.value===nt.vertical),breakFirst:y}}function bh(e){const t=localStorage.getItem(e),n=fh(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>=gh&&n.gap<=mh&&(o.gap=n.gap),n.speed!==void 0&&n.speed>=Go&&n.speed<=Jo&&(o.speed=n.speed),n.zoom!==void 0&&n.zoom>=Qo&&n.zoom<=ei&&(o.zoom=n.zoom),n.breakFirst===!0&&(o.breakFirst=!0),Object.keys(o).length?o:void 0):o}const dr=fe({__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=at(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(),I(be,null,[L(ra,{"model-value":i.value.fontFamily,"onUpdate:modelValue":a[0]||(a[0]=u=>s({fontFamily:u}))},null,8,["model-value"]),L(Ae,{label:"Text size"},{default:ne(()=>[L(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}),L(Ae,{label:"Line height"},{default:ne(()=>[L(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}),L(Ae,{label:"Play speed"},{default:ne(()=>[L(tn,{"model-value":i.value.speed,min:X(Go),max:X(Jo),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(),I("div",{key:0,class:ce(["w-full flex justify-center pt-1 duration-200",{"pointer-events-none opacity-0":!r.value,"opacity-90":r.value}])},[L(ar,{class:"w-2/3",onClick:a[4]||(a[4]=()=>o("reset"))},{default:ne(()=>[...a[5]||(a[5]=[Wt(" Reset to default ",-1)])]),_:1})],2)):se("",!0)],64))}}),yh=Object.freeze(Object.defineProperty({__proto__:null,default:dr},Symbol.toStringTag,{value:"Module"})),wh={key:1,class:"mb-3 border-stone-500 border-opacity-70"},xh={key:2,class:"flex justify-end"},_h={class:"h-6 border border-stone-500 rounded-md cursor-pointer flex items-center"},Sh={key:3,class:"mt-5 mb-3 border-stone-500 border-opacity-70"},fr=fe({__name:"DefaultPreferencesForm",props:Ye({touchDevice:{type:Boolean},isNovel:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=at(e,"modelValue"),o=ee(!1),i=ee(!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)=>(v(),I(be,null,[e.isNovel?(v(),I(be,{key:0},[L(dr,{modelValue:n.value,"onUpdate:modelValue":a[0]||(a[0]=u=>n.value=u)},null,8,["modelValue"]),L(na,{"model-value":n.value.contrast,"onUpdate:modelValue":a[1]||(a[1]=u=>s({contrast:u}))},null,8,["model-value"])],64)):(v(),I(be,{key:1},[L(lr,{"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(),oe(lr,{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"])):se("",!0),o.value?(v(),I("hr",wh)):se("",!0),o.value?(v(),I("div",xh,[K("div",_h,[Le((v(),I("button",{class:ce(["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)},[L(ia)],2)),[[X(zt),24]]),Le((v(),I("button",{class:ce(["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)},[L(oa)],2)),[[X(zt),24]])])])):se("",!0),L(Ae,{label:"Style"},{default:ne(()=>[L(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}),L(Ae,{label:"Direction"},{default:ne(()=>[L(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(),I("hr",Sh)):se("",!0),L(Ae,{label:"Gap size"},{default:ne(()=>[L(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)),L(Ae,{label:"Progress size"},{default:ne(()=>[L(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}),L(Ae,{label:"Auto next"},{default:ne(()=>[L(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}),L(Ae,{label:"Hide controls"},{default:ne(()=>[L(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?se("",!0):(v(),I(be,{key:2},[L(Ae,{label:"Play speed"},{default:ne(()=>[L(tn,{"model-value":n.value.speed,min:X(Go),max:X(Jo),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}),L(Ae,{label:e.touchDevice?"Tap zones":"Click zones"},{default:ne(()=>[L(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))}}),kh=Object.freeze(Object.defineProperty({__proto__:null,default:fr},Symbol.toStringTag,{value:"Module"})),Ch={},Th={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Ph(e,t){return v(),I("svg",Th,[...t[0]||(t[0]=[K("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 Qn=ve(Ch,[["render",Ph]]),Mh=Object.freeze(Object.defineProperty({__proto__:null,default:Qn},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 la={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]}},aa=fe({__name:"TapZonePreview",props:{tapZone:{type:Number},direction:{type:Number}},setup(e){const t=e,{width:n,height:o}=hn(),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===nt.vertical),l=Q(()=>t.direction===nt.rtl),a=Q(()=>{if(!t.tapZone)return;const{prevZones:u,nextZones:c}=la[t.tapZone];return Array.from({length:9},(d,f)=>{const p=u.includes(f),_=!p&&c.includes(f);return{isPrev:p,isNext:_,hasArrow:f===u[0]||f===c[0]}})});return(u,c)=>(v(),I("div",{class:ce(["p-2 bg-black bg-opacity-40 rounded-2xl",{"w-28":r.value,"h-28":!r.value}]),style:Se({"aspect-ratio":i.value})},[e.tapZone===X(pr).none?(v(),I("div",{key:0,class:ce(["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(nt).vertical,"rotate-180":e.direction===X(nt).rtl}])},[L(Qn)],2)):a.value?(v(),I("div",{key:2,class:ce(["w-full h-full overflow-hidden rounded-xl flex flex-wrap",{"flex-row-reverse":l.value}])},[(v(!0),I(be,null,Yt(a.value,(d,f)=>(v(),I("div",{key:`zone-${f}`,class:ce(["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(),I("span",{key:0,class:"w-5 h-5 max-w-full max-h-full inline-block transform text-stone-800",style:Se({transform:`rotate(${s.value?d.isNext?90:-90:(l.value?d.isPrev:d.isNext)?0:180}deg)`})},[L(Qn)],4)):se("",!0)],2))),128))],2)):(v(),I("div",{key:1,class:ce(["w-full h-full overflow-hidden rounded-xl flex flex-nowrap",{"flex-col":s.value}])},[K("div",{class:ce(["flex-grow w-full h-full flex justify-center items-center bg-stone-100",{"bg-opacity-50":!l.value}])},[K("span",{class:ce(["w-5 h-5 inline-block transform text-stone-800",{"-rotate-90":s.value,"rotate-180":!s.value}])},[L(Qn)],2)],2),c[0]||(c[0]=K("div",{class:"flex-grow w-full h-full"},null,-1)),c[1]||(c[1]=K("div",{class:"flex-grow w-full h-full"},null,-1)),K("div",{class:ce(["flex-grow w-full h-full flex justify-center items-center bg-stone-100",{"bg-opacity-50":l.value}])},[K("span",{class:ce(["w-5 h-5 inline-block text-stone-800",{"transform rotate-90":s.value}])},[L(Qn)],2)],2)],2))],6))}}),Eh=Object.freeze(Object.defineProperty({__proto__:null,default:aa},Symbol.toStringTag,{value:"Module"})),Ih={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"},ca=fe({__name:"DirectionToast",props:{direction:{type:Number},tapZone:{type:Number}},setup(e){const t=e,n=sessionStorage.getItem("tk:dir"),o=ee(typeof n!="string"||+n!==t.direction),i=gt(()=>o.value=!1,1500);ue(()=>[t.direction,t.tapZone],()=>{r(),o.value=!0,i()}),je(()=>{r(),i();let s;ue(Zi(),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(),oe(Ro,{name:"slow-fade","enter-from-class":"opacity-0","leave-to-class":"opacity-0"},{default:ne(()=>[o.value?(v(),I("div",Ih,[L(aa,{direction:e.direction,"tap-zone":e.tapZone},null,8,["direction","tap-zone"])])):se("",!0)]),_:1}))}}),$h=Object.freeze(Object.defineProperty({__proto__:null,default:ca},Symbol.toStringTag,{value:"Module"})),Oh={class:"flex justify-between items-end"},zh={class:"fixed pointer-events-none left-0 right-0 bottom-0"},ua=fe({__name:"GearControlsLayout",props:{visible:{type:Boolean},spaceTop:{type:null}},setup(e){return(t,n)=>(v(),I("div",{id:"controls",class:ce(["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}])},[xe(t.$slots,"default"),K("div",{class:ce(["flex gap-1 items-center relative z-30 flex-shrink-0 2xs:gap-3",{"children-pointer-events-auto":e.visible}]),style:Se({paddingTop:`${e.spaceTop||0}px`})},[xe(t.$slots,"top")],6),K("div",Oh,[K("div",{class:ce(["inline-block",{"children-pointer-events-auto":e.visible}])},[xe(t.$slots,"bottom-left")],2),K("div",{class:ce(["inline-flex flex-col items-end gap-4",{"children-pointer-events-auto":e.visible}])},[xe(t.$slots,"bottom-right")],2)]),K("div",zh,[xe(t.$slots,"progress")])],2))}}),Dh=Object.freeze(Object.defineProperty({__proto__:null,default:ua},Symbol.toStringTag,{value:"Module"})),Ah='.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}}',Lh={},jh={class:"loading-indicator"};function Bh(e,t){return v(),I("div",jh)}const ti=ve(Lh,[["render",Bh],["styles",[Ah]]]),Vh=Object.freeze(Object.defineProperty({__proto__:null,default:ti},Symbol.toStringTag,{value:"Module"})),Nh={class:"max-h-none max-w-none h-full w-full m-0 p-0 border-none outline-none"},Rh={key:0,class:"fixed inset-0 h-[101%] flex justify-center items-center z-10 bg-black"},hr=ve(fe({inheritAttrs:!1,__name:"GearLayout",props:{loading:{type:Boolean},immediate:{type:Boolean},idle:{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=ee(null);return t({rootEl:o}),(i,r)=>Le((v(),I("dialog",Nh,[K("div",{ref_key:"rootEl",ref:o,id:"gear-layout",class:ce({"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,[`${i.$attrs.class??""}`]:!0}),style:Se(e.style??{})},[e.loading&&e.immediate?(v(),I("div",Rh,[L(ti)])):se("",!0),xe(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%}"]]]),Hh=Object.freeze(Object.defineProperty({__proto__:null,default:hr},Symbol.toStringTag,{value:"Module"})),Fh={},Wh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 56 56"};function Uh(e,t){return v(),I("svg",Wh,[...t[0]||(t[0]=[K("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 da=ve(Fh,[["render",Uh]]),qh=Object.freeze(Object.defineProperty({__proto__:null,default:da},Symbol.toStringTag,{value:"Module"})),Kh={},Zh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Yh(e,t){return v(),I("svg",Zh,[...t[0]||(t[0]=[K("g",{fill:"none"},[K("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"}),K("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 fa=ve(Kh,[["render",Yh]]),Xh=Object.freeze(Object.defineProperty({__proto__:null,default:fa},Symbol.toStringTag,{value:"Module"})),Gh={key:1,class:"h-5"},pa=fe({__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(),I(be,null,[L(Ae,{label:"Style"},{default:ne(()=>[L(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}),L(Ae,{label:"Direction"},{default:ne(()=>[L(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}),L(Ae,{label:"Gap size"},{default:ne(()=>[L(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}),L(Ae,{label:"Play speed"},{default:ne(()=>[L(tn,{"model-value":e.speed,min:X(Go),max:X(Jo),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}),L(Ae,{label:"Zoom"},{default:ne(()=>[L(tn,{"model-value":Math.ceil(e.zoom*100),min:X(Qo)*100,max:X(ei)*100,step:X(hh)*100,format:c=>`${Math.ceil(c)}%`,"onUpdate:modelValue":s},null,8,["model-value","min","max","step","format"])]),_:1}),e.enableReset?(v(),I("div",{key:0,class:ce(["w-full flex justify-center pt-1 duration-200",{"pointer-events-none opacity-0":!r.value,"opacity-90":r.value}])},[L(ar,{class:"w-2/3",onClick:l},{default:ne(()=>[...u[4]||(u[4]=[Wt(" Reset to default ",-1)])]),_:1})],2)):(v(),I("div",Gh))],64))}}),Jh=Object.freeze(Object.defineProperty({__proto__:null,default:pa},Symbol.toStringTag,{value:"Module"})),ha=fe({__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=at(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(),oe(rr,{"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"]))}}),Qh=Object.freeze(Object.defineProperty({__proto__:null,default:ha},Symbol.toStringTag,{value:"Module"})),gr=ve(fe({__name:"PauseToast",props:{playing:{type:Boolean}},setup(e){const t=e,n=ee(0);return ue(()=>t.playing,()=>{n.value=Date.now()}),(o,i)=>n.value?(v(),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?(v(),oe(tr,{key:0})):(v(),oe(er,{key:1}))])):se("",!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)}}"]]]),eg=Object.freeze(Object.defineProperty({__proto__:null,default:gr},Symbol.toStringTag,{value:"Module"})),tg=30,mr=ve(fe({__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=hn().width,r=Q(()=>t.total!==void 0&&i.value/t.total>=tg);return(s,l)=>(v(),I("div",{class:ce(["rprog",{"rprog--rtl":e.rtl}]),style:Se({height:o.value,opacity:e.opacity??.8})},[r.value?(v(!0),I(be,{key:0},Yt(e.total,a=>(v(),I("span",{key:a,class:ce(["rprog__item",{"rprog__item--active":n.value===a}]),style:Se(!e.longStrip||n.value!==a?{}:{"--portion":`${e.value%1*100}%`})},null,6))),128)):(v(),I("div",{key:1,style:Se({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)}']]]),ng=Object.freeze(Object.defineProperty({__proto__:null,default:mr},Symbol.toStringTag,{value:"Module"})),ga=fe({__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=ee(null),s=ee(Math.min(ei,Math.max(Qo,o.zoom))),l=ee(!1),a=ee(!1),u={isZoomIn:!1,isZoomOut:!1,initial:void 0};t({rootEl:r}),ue(()=>o.zoom,g=>q(g)),je(()=>{o.touchDevice?St(r,"touchstart",w):(St(r,"mousedown",p),St(window,"wheel",W))}),Ot({onKeyDown:g=>{var T;if(!o.busy&&((T=r.value)==null||T.focus(),!(g.key==="Meta"||g.key==="Control")&&(g.ctrlKey||g.metaKey)))switch(g.key){case"0":q(1);break;case"-":q(s.value-.2),g.preventDefault();break;case"=":case"+":q(s.value+.2),g.preventDefault();break}},onKeyUp:g=>{o.zooming&&!(g.ctrlKey||g.metaKey)&&Z()}});function c(g){a.value!==g&&(a.value=g,g?o.playController.pause():(i("dragEnd"),o.playController.resume()))}let d={x:0,y:0},f={x:0,y:0};function p(g){if(g.button!==0)return;const T=r.value;T&&(d={x:g.clientX,y:g.clientY},f={x:T.scrollLeft,y:T.scrollTop},window.addEventListener("mousemove",_),window.addEventListener("mouseup",()=>{window.removeEventListener("mousemove",_),setTimeout(()=>c(!1))},{once:!0}),g.preventDefault(),g.stopPropagation())}function _(g){const T=g.clientX-d.x,R=g.clientY-d.y;if(!a.value&&Math.abs(T)<.5&&Math.abs(R)<.5)return;c(!0);const $=r.value;$&&($.scrollLeft=f.x-T,$.scrollTop=f.y-R)}let S={distance:0,zoom:s.value,x:0,y:0},z=!1;function w(g){o.busy||(z=o.pinchToZoome&&g.touches.length===2,z&&(i("update:zooming",!0),c(!0),g.stopPropagation(),g.preventDefault(),S={distance:Y(g),zoom:s.value,x:(g.touches[0].clientX+g.touches[1].clientX)/2,y:(g.touches[0].clientY+g.touches[1].clientY)/2}),(z||o.longStrip&&o.playController.isPlaying.value)&&window.addEventListener("touchend",x,{once:!0}))}function x(){var $;if(z=!1,o.zooming){c(!1),Z();return}if(!a.value)return;const g=gt(()=>{var ge;c(!1),(ge=r.value)==null||ge.removeEventListener("scroll",R)},200),T=setTimeout(g,200);($=r.value)==null||$.addEventListener("scroll",R);function R(){clearTimeout(T),g()}}function D(g){if(!z&&!(o.longStrip&&o.playController.isPlaying.value)||(c(!0),!o.zooming)||(g.stopPropagation(),g.preventDefault(),g.touches.length<2))return;const R=Y(g)/S.distance;G(Math.ceil(R*S.zoom*100)/100,S)}const y=gt(()=>l.value=!1,100);let b=!1;const O=gt(()=>{b=!1},30);function W(g){if(o.busy)return;let T=o.zooming;if(b||(b=!0,T=g.ctrlKey||g.metaKey,T&&i("update:zooming",!0)),O(),T){g.stopPropagation(),g.preventDefault();const R=Math.ceil((s.value+g.deltaY*-.01)*100)/100;G(R,{x:g.clientX,y:g.clientY});return}o.horizontal&&(l.value||(l.value=!0),y(),g.deltaY&&(r.value&&(r.value.scrollLeft+=g.deltaY*(o.rtl?-1:1)),g.stopPropagation()))}function Y(g){return Math.hypot(g.touches[0].clientX-g.touches[1].clientX,g.touches[0].clientY-g.touches[1].clientY)}const N={x:0,y:0,ts:0};function U(g){if(a.value||o.zooming)return;const T=r.value;if(!T||F(T,g)||(i("click"),o.playController.isPlaying.value))return;const{clientX:R,clientY:$}=g,{x:ge,y:ae,ts:he}=N;N.x=R,N.y=$,N.ts=new Date().getTime();const me=N.ts-he;me>250||me<10||Math.abs(ge-R)>40||Math.abs(ae-$)>40||(N.ts=0,N.x=0,N.y=0,P(R,$))}function F(g,T){if(o.playController.isPlaying.value)return!1;const R=o.tapZone;if(R===pr.none)return!1;const $=o.controlsVisible?o.spaceTop:0,ge=g.clientHeight-$,ae=Math.max(0,T.clientY-$),he=o.horizontal?g.clientWidth:ge;let me=!1,Te=!1;if(R){const{prevZones:De,nextZones:Re}=la[o.tapZone],ot=Math.floor(ae/ge*3);let ze=Math.floor(T.clientX/g.clientWidth*3);o.rtl&&(ze=2-ze);const Qe=ot*3+ze;me=De.includes(Qe),Te=!me&&Re.includes(Qe)}else{const Re=(o.horizontal?o.rtl?he-T.clientX:T.clientX:ae)/he,ot=o.horizontal?.2:.15;me=Re<=ot&&o.pageIndex>0,Te=!me&&Re>=1-ot}if(!me&&!Te)return!1;if(o.longStrip){const De=(me?-1:1)*.75*he;o.horizontal?g.scrollLeft=g.scrollLeft+(o.rtl?-1:1)*De:g.scrollTop=Math.max(0,g.scrollTop+De)}else me?i("prev"):Te&&i("next");return!0}async function P(g,T){const R=s.value===1?2:1;await q(R,{x:g,y:T}),Z()}function Z(){i("update:zooming",!1),u.initial=void 0,u.isZoomIn=!1,u.isZoomOut=!1}function k(){if(u.initial)return;const g=r.value;if(!g)return;const T=g.querySelector(`[data-index="${o.pageIndex}"],[data-index2="${o.pageIndex}"]`)??void 0;T&&(u.initial={el:T,rect:T.getBoundingClientRect()})}function G(g,T){if(u.isZoomIn=u.isZoomIn||!u.isZoomOut&&g>1,u.isZoomIn&&g<1){q(1,T);return}if(u.isZoomOut=u.isZoomOut||!u.isZoomIn&&g<1,u.isZoomOut&&g>1){q(1,T);return}q(g,T)}async function q(g,T){const R=r.value,$=Math.min(ei,Math.max(Qo,g));if(!R||s.value===$)return;k();const{initial:ge}=u;if(!ge)return;const ae=(T==null?void 0:T.x)??R.clientWidth/2,he=(T==null?void 0:T.y)??R.clientHeight/2;s.value=$,i("update:zoom",$),await xt();const{el:me,rect:Te}=ge,De=me.offsetWidth/Te.width,Re=me.offsetHeight/Te.height;R.scrollLeft=me.offsetLeft-Te.left*De+ae*(De-1),R.scrollTop=me.offsetTop-Te.top*Re+he*(Re-1)}return(g,T)=>(v(),I("div",{ref_key:"rootEl",ref:r,tabindex:"0",class:ce(["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:Se({"font-size":`${s.value}px`}),onClick:Be(U,["stop"]),onTouchmoveCapture:Be(D,["stop"])},[xe(g.$slots,"default")],38))}}),og=Object.freeze(Object.defineProperty({__proto__:null,default:ga},Symbol.toStringTag,{value:"Module"})),ig=["src"],vr=fe({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(),I("img",{key:0,src:e.src,class:ce(i.$attrs.class??""),style:Se(e.style)},null,14,ig)):Le((v(),I("div",{key:1,class:ce(i.$attrs.class??""),style:Se(e.style)},null,6)),[[o]])}}),rg=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 sg=["data-index"],lg={key:0,class:"rbod__page rbod__page--loading"},ag=["data-index"],ma=ve(fe({__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=ee(null),s=Q(()=>{var x;return(x=r.value)==null?void 0:x.rootEl});t({rootEl:s});const l=hn(),a=Q(()=>{const{width:x,height:D}=l,y=o.isLongStrip?o.isVertical?x.value:D.value:Math.min(x.value,D.value);return Math.min(4,Math.max(1,Math.ceil(y/400-1)))*o.gap}),u=ee(o.isLongStrip?{min:o.pageIndex-1,max:o.pageIndex}:S()),c=Q(()=>{const{min:x,max:D}=u.value,y={};for(let b=x;b<=D;b++)y[b]=!0;return y}),d=ee(p()),f=Jn(()=>{d.value=p()},100);ue(l.width,f),ue(l.height,f),ue(()=>o.pages,f),ue(()=>o.isLongStrip,f),ue(()=>o.isVertical,f);function p(){const x=l.width.value,D=l.height.value,{pages:y,isLongStrip:b,isVertical:O}=o;return y.map(W=>{var q;const Y=W.some(g=>{var T;return(T=g.img)==null?void 0:T.isLoading}),N=W.map(g=>g.index),U={isLoading:Y,indexes:N,visible:!1};if(Y)return U;const F=W.map(({img:g})=>g).filter(Boolean);if(!F.length||(U.srcs=F.map(({src:g})=>g),F.every(g=>g.hasError)))return U;const Z=(q=F.find(g=>!g.hasError))==null?void 0:q.size;if(!Z)return U;const k=F.reduce((g,T)=>{var R;return g+(((R=T.size)==null?void 0:R.width)??Z.width)},0),G=F.reduce((g,T)=>{var R;return g+(((R=T.size)==null?void 0:R.height)??Z.height)},0)/F.length;return b&&O||!b&&x/k<D/G?(U.width=Math.min(x,k),U.height=G*(U.width/k)):(U.height=Math.min(D,G),U.width=k*(U.height/G)),U.width&&U.height&&(U.style={width:`${U.width}em`,height:`${U.height}em`}),U})}const _=Q(()=>{const x=o.isVertical?"width":"height";return d.value.map(D=>D[x]).filter(Boolean).sort((D,y)=>y-D)[0]});je(()=>{const x=br(s.value,o.pageIndex);x==null||x.scrollIntoView({behavior:"instant",block:"start"});let D,y=!1;Hs(()=>{D!==o.pageIndex&&(D=o.pageIndex,b(),y||(y=!0,xt(()=>i("ready"))))});async function b(){if(!o.isLongStrip){u.value=S();return}const O=Math.floor(o.page),W=br(s.value,O);if(!W)return;const Y=+z(W).getAttribute("data-index"),N=+w(W).getAttribute("data-index");(Y!==u.value.min||N!==u.value.max)&&(u.value={min:Y,max:N})}});function S(){const{pageIndex:x}=o;return{min:x-(o.isDouble?5:3),max:x+(o.isDouble?6:3)}}function z(x,D=0){const y=x.previousElementSibling;if(!y)return x;const b=D+(o.isVertical?y.clientHeight:y.clientWidth);return(o.isVertical?b>l.height.value*1.5:o.isRTL?b>l.width.value*2.5:b>l.width.value*1.5)?y:z(y,b)}function w(x,D=0){const y=x.nextElementSibling;if(!y)return x;const b=D+(o.isVertical?y.clientHeight:y.clientWidth);return(o.isVertical?b>l.height.value*3.5:o.isRTL?b>l.width.value*1.5:b>l.width.value*2.5)?y:w(y,b)}return(x,D)=>(v(),oe(ga,{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:ce(["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:Se({"--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":_.value+"em"}:{}}),"onUpdate:zoom":D[0]||(D[0]=y=>i("update:zoom",y)),"onUpdate:zooming":D[1]||(D[1]=y=>i("update:zooming",y)),onDragEnd:D[2]||(D[2]=()=>i("dragEnd")),onClick:D[3]||(D[3]=()=>i("click")),onPrev:D[4]||(D[4]=()=>i("prev")),onNext:D[5]||(D[5]=()=>i("next"))},{default:ne(()=>[(v(!0),I(be,null,Yt(d.value,y=>{var b;return v(),I("div",kn({key:e.direction+"_"+y.indexes[0],"data-index":y.indexes[0]},{ref_for:!0},y.indexes.length>1?{"data-index2":y.indexes[1]}:{}),[!((b=y.srcs)!=null&&b.length)||y.isLoading?(v(),I("div",lg,[c.value[y.indexes[0]]?(v(),oe(ti,{key:0})):se("",!0)])):y.srcs.length==1?(v(),I(be,{key:1},[c.value[y.indexes[0]]?(v(),oe(vr,{key:1,class:"rbod__page img",src:y.srcs[0],style:Se(y.style)},null,8,["src","style"])):(v(),I("div",{key:0,class:"rbod__page",style:Se(y.style)},null,4))],64)):(v(),I("div",{key:2,class:ce(["rbod__page rbod__page--double",{"flex-row-reverse":e.isRTL}]),style:Se(y.style)},[y.indexes.some(O=>c.value[O])?(v(!0),I(be,{key:0},Yt(y.srcs,(O,W)=>(v(),I("div",{key:typeof O=="string"?O:`${W}-${y.height}`},[L(vr,{src:O,class:"img"},null,8,["src"])]))),128)):se("",!0)],6))],16,sg)}),128)),K("div",{class:"last","data-index":e.totalImgs},[xe(x.$slots,"end")],8,ag)]),_: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%}"]]]),cg=Object.freeze(Object.defineProperty({__proto__:null,default:ma},Symbol.toStringTag,{value:"Module"})),ug={},dg={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function fg(e,t){return v(),I("svg",dg,[...t[0]||(t[0]=[K("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 va=ve(ug,[["render",fg]]),pg=Object.freeze(Object.defineProperty({__proto__:null,default:va},Symbol.toStringTag,{value:"Module"})),hg={class:"flex w-full flex-shrink-0 justify-between items-center h-16 px-3"},ba=fe({__name:"BottomSheet",props:Ye({spaceTop:{type:Number}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=at(e,"modelValue"),n=ee(null),o=ee(!1),i=ee(0);Ot({onKeyDown:s});const r=Zo();ue(t,c=>r(c)),Yi(()=>{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,_=p>0?p:0;_!=i.value&&(i.value=_);const S=_>0;S!==o.value&&(o.value=S)}async function u(){o.value=!1,l.y=-1,await xt();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(),I("div",{class:ce(["fixed inset-0 flex flex-col items-center justify-end select-none z-40 text-stone-100",{"!pointer-events-none":!t.value}]),style:Se({"padding-top":(e.spaceTop??0)+60+"px"}),onClick:d[3]||(d[3]=()=>t.value=!1)},[L(Ro,{name:"slide","enter-from-class":"!translate-y-full","leave-to-class":"!translate-y-full"},{default:ne(()=>[t.value?(v(),I("div",{key:0,class:ce(["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:Se(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},[K("div",hg,[L(Ge,{transparent:"",onClick:d[0]||(d[0]=()=>t.value=!1)},{default:ne(()=>[L(va)]),_:1}),xe(c.$slots,"name"),xe(c.$slots,"actions")]),K("div",{ref_key:"scrollEl",ref:n,class:"overflow-auto px-6 md:px-8 lg:px-10 xl:px-12 pt-1.5 pb-8 md:pb-6 flex-grow scrollbar-sm",style:{"max-height":"calc(100% - 4rem)"}},[xe(c.$slots,"default")],512)],38)):se("",!0)]),_:3})],6))}}),gg=Object.freeze(Object.defineProperty({__proto__:null,default:ba},Symbol.toStringTag,{value:"Module"})),mg=["onClick","onKeyup"],ya=ve(fe({__name:"TabBar",props:Ye({items:{type:Array}},{modelValue:{type:Number,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=at(e,"modelValue"),o=ee(null),i=ee({width:"",left:""}),r=ee(!1);je(()=>{const l=Date.now();ue(n,async a=>{var c;await xt();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(),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:{}},[K("div",{class:ce(["bg-stone-300 h-6 rounded-2xl absolute top-1 pointer-events-none",{"duration-200":r.value}]),style:Se(i.value)},null,6),(v(!0),I(be,null,Yt(t.items,(u,c)=>Le((v(),I("div",{key:c,tabindex:"0",class:ce(["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:[Uo(()=>s(c),["enter"]),Uo(()=>s(c),["space"])]},[Wt(Fe(u),1)],42,mg)),[[X(zt),30]])),128))],512))}}),[["styles",[".scrollbar-none{scrollbar-width:none}.scrollbar-none::-webkit-scrollbar{display:none}"]]]),vg=Object.freeze(Object.defineProperty({__proto__:null,default:ya},Symbol.toStringTag,{value:"Module"})),bg={},yg={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function wg(e,t){return v(),I("svg",yg,[...t[0]||(t[0]=[K("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 wa=ve(bg,[["render",wg]]),xg=Object.freeze(Object.defineProperty({__proto__:null,default:wa},Symbol.toStringTag,{value:"Module"})),_g={},Sg={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28"};function kg(e,t){return v(),I("svg",Sg,[...t[0]||(t[0]=[K("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 xa=ve(_g,[["render",kg]]),Cg=Object.freeze(Object.defineProperty({__proto__:null,default:xa},Symbol.toStringTag,{value:"Module"})),Tg={key:1,class:"w-full text-center text-xl whitespace-nowrap text-ellipsis flex-shrink overflow-hidden px-5 select-text"},Pg={class:"opacity-90"},Mg={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"},yr=fe({__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=at(e,"modelValue"),r=ee(0),s=Q(()=>n.name??location.hostname);Ot({onKeyUp:a=>{a.key==="s"&&!a.metaKey&&!a.ctrlKey&&(i.value=!0)}}),je(()=>{ue(i,a=>{a||setTimeout(()=>{r.value!==0&&(r.value=0)},300)})});function l(){o("help"),i.value=!1}return(a,u)=>(v(),oe(ba,{modelValue:i.value,"onUpdate:modelValue":u[2]||(u[2]=c=>i.value=c),"space-top":e.spaceTop},{name:ne(()=>[e.enableDefaultPreferences?(v(),oe(ya,{key:0,modelValue:r.value,"onUpdate:modelValue":u[0]||(u[0]=c=>r.value=c),items:["Preferences","Default"]},null,8,["modelValue"])):(v(),I("h3",Tg,Fe(s.value),1))]),actions:ne(()=>[e.enableDefaultPreferences?(v(),oe(Ge,{key:0,transparent:"",class:ce(e.enableHelp?"":"opacity-0 pointer-events-none"),onClick:l},{default:ne(()=>[K("span",Pg,[L(wa)])]),_:1},8,["class"])):(v(),oe(Ge,{key:1,transparent:"",onClick:u[1]||(u[1]=()=>o("more"))},{default:ne(()=>[L(xa)]),_:1}))]),default:ne(()=>[r.value===0?(v(),I(be,{key:0},[e.enableDefaultPreferences?(v(),I("h3",Mg,Fe(s.value),1)):se("",!0),xe(a.$slots,"tab-preferences")],64)):(v(),I(be,{key:1},[xe(a.$slots,"tab-default"),u[3]||(u[3]=K("div",{class:"h-6"},null,-1))],64))]),_:3},8,["modelValue","space-top"]))}}),Eg=Object.freeze(Object.defineProperty({__proto__:null,default:yr},Symbol.toStringTag,{value:"Module"}));function eo(e=0){return new Promise(t=>setTimeout(t,e))}const to={};async function _a(e){Ig();const t=await Sa(e);if(t)return t;const n=$g(e);if(!n)return;const o=await Sa(n);return o&&await ka(o)?o:await zg(n)?Og(n,e.getBoundingClientRect()):void 0}function Ig(){var o,i;if(to.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;to.toBlob=(n==null?void 0:n.toBlob)??HTMLCanvasElement.prototype.toBlob,to.toDataURL=(n==null?void 0:n.toDataUrl)??HTMLCanvasElement.prototype.toDataURL,t&&document.body.removeChild(t)}function $g(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 Sa(e){return new Promise(t=>{const n=o=>{if(!o)return t(void 0);const i=URL.createObjectURL(o);t(i)};try{to.toBlob.call(e,n,"image/jpeg",1)}catch{t(void 0)}})}function Og(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}async function zg(e){try{const t=to.toDataURL.call(e);return await ka(t)}catch{return!0}}function ka(e){return new Promise(t=>{const n=new Image;n.onerror=()=>t(!1),n.onload=()=>{t(n.naturalWidth>10)},n.src=e})}let ni;async function Dg(e,t){if(ni||!t.startsWith("blob:"))return t;if(ni===void 0){try{if((await fetch(t)).ok)return ni=!0,t}catch{}ni=!1}e.complete||await new Promise(a=>{let u=0;const c=setInterval(()=>{e.complete?(a(),clearInterval(c)):++u>=30&&a()},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 _a(r)}function Ag(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)}function oi(e,t){return e>=75&&t>=50&&(e>=200||t>=200)}class Lg{constructor({onChanged:t}){ke(this,"isMounted",!0);ke(this,"elsDisposeCallbacksMap",new Map);ke(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,o=!!n&&n instanceof HTMLImageElement,i=n?o?Ag(n):[await _a(n)].filter(Boolean):[t.src].filter(Boolean);if(!(!n&&!i.length||!this.isMounted)){if(n&&!this.elsDisposeCallbacksMap.has(n))if(o){let r=i.slice(-1)[0];const s=new MutationObserver(l=>{l.some(u=>{if(u.attributeName!=="src")return!1;const c=r;return r=n.getAttribute("src"),!!r&&c!==r})&&this.download(t)});s.observe(n,{attributes:!0}),this.elsDisposeCallbacksMap.set(n,()=>s.disconnect())}else{const r=n.getContext("2d");if(r){const s=r.drawImage.bind(r),l=r.putImageData.bind(r),a=(u,c,d)=>(setTimeout(()=>this.download(t),100),u.apply(c,d));try{r.drawImage=new Proxy(s,{apply:a}),r.putImageData=new Proxy(l,{apply:a})}catch{}this.elsDisposeCallbacksMap.set(n,()=>{try{r.drawImage=s,r.putImageData=l}catch{}})}}i.length&&(this.onChanged(t,{src:i[0],isLoading:!0,hasError:!1}),await this.downloadRawImage(t,i))}}async downloadRawImage(t,n){const o=t.el instanceof HTMLImageElement?t.el:void 0;for(let i=0;i<n.length;i++){const r=n[i],s=o?await Dg(o,r):r;if(!s||!this.isMounted)return;if(s instanceof HTMLElement){const a=s instanceof HTMLCanvasElement||s instanceof HTMLImageElement?s:s.getBoundingClientRect();this.onChanged(t,{src:s,size:{width:a.width,height:a.height},isLoading:!1,hasError:!1});return}const l=await jg(s,o,a=>{this.isMounted&&this.onChanged(t,{src:s,size:a,isLoading:!1,hasError:!1})});if(l.ok||!this.isMounted)return;i===n.length-1&&this.onChanged(t,{src:s,isLoading:!1,hasError:!!l.error,invalid:!!l.invalid,size:l.size})}}}async function jg(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};oi(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 Bg=3;class Vg{constructor(t){ke(this,"download");ke(this,"threads");ke(this,"completedItems");ke(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 Ng(Bg,()=>{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 Ng{constructor(t,n){ke(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 eo(20),this.next())}}class Ca{constructor(){ke(this,"elsPool",new Map)}check(t){if(!t||t===document.body)return!0;const n=this.elsPool.get(t);if(n!==void 0)return n;const o=getComputedStyle(t);if(!(o.display!=="none"&&+(o.opacity??"1")>.1))return this.elsPool.set(t,!1),!1;const r=this.check(t.parentElement);return this.elsPool.set(t,r),r}}function Rg(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 no(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}))}async function Hg(e){const{lstrip:t,lstripBtn:n}=e||{};if(!t||!n||!!document.querySelector(t))return!1;const i=n.split(";");for(const r of i)if(!await Fg(r.trim()))return!1;return!0}async function Fg(e){const t=await en(50,30,()=>document.querySelector(e));return t?(no(t),await eo(),!0):!1}class Wg{constructor({spec:t,onChanged:n}){ke(this,"spec");ke(this,"onChanged");ke(this,"rawImages",[]);ke(this,"isMounted",!0);ke(this,"loadRawImagesTs");ke(this,"imgListenersMap",new Map);ke(this,"disconnectObservers");ke(this,"contentEl");ke(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.el===i.el&&s.parentEl===i.parentEl&&s.src===i.src?s:(n=!0,i)});(n||!o.length)&&(this.rawImages=o,this.onChanged(t))}async loadContentEl(t){var l;const n=await Hg(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=Rg(n,t);if(!o.length)return this.loadFromContentEl(t);const i=new Ca;return o.map(s=>{const l=Array.from(s.querySelectorAll("img,canvas"));for(const a of l){if(!i.check(a)){this.observeInvalidImgEl(a);continue}if(a instanceof HTMLCanvasElement){if(Ta(a))return{el:a,parentEl:s}}else if(a instanceof HTMLImageElement){if(Pa(a))return{el:a,parentEl:s};this.observeInvalidImgEl(a)}}return{parentEl:s}})}loadFromContentEl(t){const n=[],o={},i=new Ca;return Array.from(t.querySelectorAll("img,canvas")).forEach(s=>{if(!i.check(s)){this.observeInvalidImgEl(s);return}if(s instanceof HTMLCanvasElement)Ta(s)&&n.push({el:s});else if(s instanceof HTMLImageElement)if(Pa(s)){const l=s.getAttribute("src");if(l){const a=o[l];if(a!==void 0&&a!==-1){n.splice(a,1);return}o[l]=n.length}n.push({el:s})}else this.observeInvalidImgEl(s)}),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 Ta(e){return e.isConnected&&oi(e.width,e.height)}function Pa(e){if(!e.isConnected)return!1;const t=e.getBoundingClientRect();return!t.width&&!e.naturalWidth||!t.height&&!e.naturalHeight||oi(t.width,t.height)}const ii="mp-scroll-container";class wr{constructor(){ke(this,"scrollEl")}dispose(){var t;(t=this.scrollEl)==null||t.classList.remove(ii)}scrollTo({rawImages:t,page:n,skipIfVisible:o,isScrollDown:i,isScrollExact:r,fallbackScrollEl:s}){var z;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=wr.getScrollable(u,s);if(!d)return;const{el:f,top:p}=d;s!==document.documentElement&&!f.classList.contains(ii)&&(f!==this.scrollEl&&((z=this.scrollEl)==null||z.classList.remove(ii),this.scrollEl=f),f.classList.add(ii));const _=n>=t.length?c.height:r?n%1*c.height:i?Math.max(0,c.height-window.innerHeight/2):-window.innerHeight/2,S={top:p+_,behavior:"instant"};f.scrollTo(S),f!==document.documentElement&&document.documentElement.scrollTo(S)}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 Ug(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 qg(e){var N,U,F;const t=(N=e.raw.value)==null?void 0:N.isWebtoon,n=ee(t===!1),o=ee(t);let i=!1;const r=e.touchDevice&&!navigator.userAgent.toLowerCase().includes("android"),s=((F=(U=e.raw.value)==null?void 0:U.imgs)==null?void 0:F.filter(Boolean))??[];let l=e.isAutoShow!==!1?e.page.value:s.length?Ug(s):void 0,a=s.map(P=>({src:P})),u,c;const d=new Map,f=({src:P,el:Z})=>{const k=Z??P;return k?d.get(k):void 0},p=ee(s.map(P=>({src:P,isLoading:!0,hasError:!1}))),_=()=>{const P=[];a.forEach(Z=>{const{src:k,el:G}=Z,q=G??k,g=q?d.get(q):void 0;(q&&!(g!=null&&g.invalid)||Z.parentEl)&&P.push(g)}),p.value=P};let S=setTimeout(e.onTimeout,2e4);const z=()=>{S&&(clearTimeout(S),S=void 0)};let w=0,x=0;const D=4,y=new Lg({onChanged(P,Z){const k=P.el??P.src;if(!k||(d.set(k,Z),_(),Z.isLoading))return;if(Z.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:G,invalid:q}=Z;if(!(!G||q)){if(!o.value&&x<D){const g=i?a:a.filter(({el:he,src:me})=>me||!(he&&he instanceof HTMLImageElement&&!d.has(he)));let T=g.indexOf(P);if(i&&T>4||T===-1&&(P.el&&(T=g.findIndex(he=>he.el===P.el)),T===-1))return;const R=T>Math.min(1,g.length-3)&&T<Math.max(g.length-2,3),$=G.width/G.height;$>2&&w++;const ge=$<.5||w>=D,ae=!ge&&.65<$&&$<.75;ae&&x++,o.value!==ge&&(R||ge)&&(o.value=ge),R&&n.value!=ae&&(n.value=!0),o.value===void 0&&ae&&x===D&&(o.value=!1)}Y()}}}),b=new Vg({download:async P=>{!(P.el&&d.has(P.el))&&!(P.src&&d.has(P.src))&&await y.download(P)}}),O=()=>{b.run({items:a,activeIndex:Math.min(a.length-1,Math.floor(e.page.value))})},W=new wr;if(s.length)O();else{let P=!1;u=new Wg({spec:e.spec,async onChanged(Z){var k;if(a=Z,_(),!e.raw.value&&!Z.length){e.onError("no_img");return}(k=e.spec)!=null&&k.imgDivs&&!P&&e.isAutoShow!==!1&&e.page.value&&(P=!0,W.scrollTo({rawImages:Z,page:e.page.value,skipIfVisible:!0,fallbackScrollEl:r?document.body:document.documentElement,isScrollDown:!0}),await eo(1)),l===void 0&&e.isAutoShow===!1&&(l=Ma(Z)),O()}})}Pi(()=>{y.dispose(),b.dispose(),u==null||u.dispose(),c&&clearTimeout(c),W.dispose(),i&&W.scrollTo({rawImages:a,page:e.page.value,fallbackScrollEl:document.documentElement,isScrollExact:!0})});function Y(){if(i||o.value===void 0||l===void 0)return;const P=Math.max(0,Math.min(l,a.length)),Z=Math.min(Math.floor(P),a.length-1);if(Z>=1){const G=a[Z];if(!G||!f(G)){e.isAutoShow&&W.scrollTo({rawImages:a,page:Z,fallbackScrollEl:r?document.body:document.documentElement,isScrollDown:!0});return}for(let q=Z;q<a.length;q++){const g=f(a[q]);if(!g)return;if(!g.invalid){if(!g.size&&!g.hasError)return;break}}for(let q=Z-1;q>=0;q--){const{src:g,el:T}=a[q],R=T??g;if(!R)break;const $=d.get(R);if(!$)return;if(!$.invalid){if(!$.size&&!$.hasError)return;break}}}if(i)return;i=!0,z(),e.onReady(P);let k=!0;ue(()=>Math.floor(e.page.value),(G,q)=>{G===q&&!k||(W.scrollTo({rawImages:a,page:G,isScrollDown:q===void 0||G>q||a.length===1,skipIfVisible:k&&a.length>1,fallbackScrollEl:r?document.body:document.documentElement}),k=!1,q??(q=-1),O())},{immediate:!0})}return{asyncImgs:Q(()=>p.value),isWebtoon:Q(()=>o.value??!1),isManga:Q(()=>n.value)}}function Ea({touchDevice:e,isBusy:t,isPlaying:n,isIdle:o,hideControlsEvent:i,scrollEl:r,moveThreshold:s}){const l=ee(!0);let a=!1,u=!1;const c={x:0,y:0};let d;function f(w){if(i.value===nn.never||t.value&&l.value)return;const x=typeof w=="boolean"?w:!l.value;x!==l.value&&(l.value=x,!a&&!x&&(a=!0))}function p(){r.value&&(c.x=r.value.scrollLeft,c.y=r.value.scrollTop)}function _(){const w=i.value===nn.firstMove,x=r.value;if(!x)return;const D=Jn(()=>{if(!l.value){Kg(x)&&f(!0);return}if(w&&a)return;const y=Math.abs(x.scrollTop-c.y)||Math.abs(x.scrollLeft-c.x),b=s??(w?c.y===0?300:200:150);y>b&&f(!1)},100);x.addEventListener("scroll",D),d=()=>{x.removeEventListener("scroll",D)}}function S(){switch(d==null||d(),d=void 0,i.value){case nn.onLoad:a||f(!1);break;case nn.firstMove:_();break;case nn.move:_();break;case nn.never:l.value||(l.value=!0);break}}function z(){u||(u=!0,p(),S(),e&&ue(Zi(),x=>{x==="hidden"&&!n.value&&!l.value&&f(!0)}),ue(t,w=>{w&&!l.value&&f()}),ue(n,w=>{w||f(!0)}),ue(o,w=>{n.value&&f(!w)}),ue(l,w=>{w&&p()}),ue(i,()=>S()),ue(r,()=>S()),Mt(()=>{d==null||d(),d=void 0}))}return{visible:Q(()=>l.value),toggle:f,activate:z}}function Kg(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 Zg(e,t,n){return Q(()=>t.value?Ia(e.value,n.value):e.value.map((o,i)=>[{img:o,index:i}]))}function Ia(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})),...Ia(e.slice(r.length),t&&i,n+r.length)]}const xr=40;function Yg({page:e,totalImgs: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,_=!1,S,z=!1,w;const x=gt(N,300),D=Jn(()=>{N(),x()},300);function y(){const g=new Promise(T=>{S=()=>{S=void 0,T()}});return W(e.value,{smooth:!1,ensureLastImgVisibility:!0}),g}function b(){var g;_=!0,S==null||S(),U(),(g=a.value)==null||g.addEventListener("scroll",D),setTimeout(()=>{const{width:T,height:R}=hn();ue(()=>`${R.value}-${T.value}`,O),ue(o,O),ue(n,O),/iPad|iPhone|iPod/.test(navigator.userAgent)&&ue(t,()=>{s.value&&O()})},300)}function O(){const g=a.value;if(!g)return;const{scrollWidth:T,scrollHeight:R}=g,$=e.value;en(20,10,()=>{if(!(g.scrollWidth===T&&g.scrollHeight===R))return W($),!0})}function W(g,{smooth:T,ensureLastImgVisibility:R=!1}={smooth:!1}){const $=a.value;if(!$)return;p=!0;const ge=async()=>{await xt(),p=!1,_||b()},ae=Math.floor(g),he=br($,ae);if(!he){ge();return}c(async()=>{await Y($,!i.value&&T,async()=>{await q($,he,{smooth:T,page:g,ensureLastImgVisibility:R})}),await ge()})}async function Y(g,T,R){T&&g.style.setProperty("scroll-snap-type","none"),await R(),T&&g.style.removeProperty("scroll-snap-type")}function N(){if(p)return;const g=P();g!==void 0&&g!==e.value&&d(g),U()}function U(){z||!z&&F()&&(z=!0,f())}function F(){const g=a.value;if(!g)return!1;const T=!i.value||u.value?3:!r.value&&g.clientWidth>g.clientHeight?2.25:2.5;return r.value?g.scrollHeight-g.scrollTop<g.clientHeight*T:g.scrollWidth-(s.value?-g.scrollLeft:g.scrollLeft)<g.clientWidth*T}function P(){const g=Z();return g?(+g.getAttribute("data-index")||0)+(i.value?k(g):0):void 0}function Z(){var T;if(w??(w=a.value.getRootNode()),!w)return;const g=(T=w.elementsFromPoint)==null?void 0:T.call(w,r.value||!i.value?window.innerWidth/2:s.value?window.innerWidth-xr:xr,r.value&&i.value?l.value||xr:window.innerHeight/2);if(g)for(let R=0;R<g.length;R++){const $=g[R];if($.hasAttribute("data-index"))return $;if($===a.value)break}}function k(g){const T=g.getBoundingClientRect();return r.value?Math.abs(T.top-l.value)/T.height:s.value?Math.max(0,T.right-a.value.clientWidth)/T.width:Math.abs(T.left)/T.width}let G=!1;async function q(g,T,R){if(G)return;const $=T.getBoundingClientRect();if(!i.value){if(r.value){if($.top<=0&&$.bottom>=g.clientHeight)return}else if($.left<=0&&$.right>=g.clientWidth)return}G=!0;const ge=r.value?g.scrollTop:g.scrollLeft,ae=R.page,he=i.value?ae%1:0,me=await en(30,10,async()=>{await eo();let ze;if(!(T.offsetHeight<10))return i.value?r.value?ze=T.offsetTop+he*T.offsetHeight-l.value:s.value?ze=T.offsetLeft-g.clientWidth+T.offsetWidth-he*T.offsetWidth:ze=T.offsetLeft+he*T.offsetWidth:r.value?ze=T.offsetTop+($.top>0?0:$.height-g.clientHeight):ze=T.offsetLeft+($.left>0?0:$.width-g.clientWidth),ae>.5&&Math.abs(ze)<100?void 0:ze})??0,Te=R.ensureLastImgVisibility?r.value?Math.min(me,g.scrollHeight-g.clientHeight*2):s.value?Math.max(me,-(g.scrollWidth-g.clientWidth*2)):Math.min(me,g.scrollWidth-g.clientWidth*2):me;if(!R.smooth){r.value?g.scrollTop=Te:g.scrollLeft=Te,G=!1;return}const De=Te-ge,Re=30;let ot=0;return new Promise(ze=>{(function Qe(){const mn=Xg(ot,ge,De,Re);r.value?g.scrollTop=mn:g.scrollLeft=mn,ot++,ot<=Re?requestAnimationFrame(Qe):(ze(),G=!1)})()})}return{init:y,goToPage:W}}function Xg(e,t,n,o){return n*(Math.pow(e/o-1,3)+1)+t}class Gg{constructor(t){ke(this,"player");ke(this,"debounceStartPlayer");ke(this,"isPlaying");ke(this,"isIdle",ee(!1));ke(this,"onIdle");this.player=t.player,this.debounceStartPlayer=gt(()=>this.player.start(),100);const n=ee(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||St(window,"mousemove",()=>this.awake()),je(()=>{t.touchDevice||ue(Zi(),i=>{this.isPlaying.value&&(i==="visible"?this.player.start():this.player.stop())}),ue(t.speed,()=>this.interfere()),ue(t.isBusy,o=>{!o&&this.isIdle.value&&this.awake()})}),Mt(()=>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 xt(),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 $a extends Gg{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 _=Date.now(),S=_-d;d=_;const z=c*S+f;z>=1?(f=z%1,this.setScrollOffset(s,z-f)):f=z,setTimeout(p,1)};p()}}})}}class Jg extends $a{constructor(n){super(n);ke(this,"isLongStrip");ke(this,"isVertical");ke(this,"isRTL");const{isLongStrip:o,isVertical:i,isRTL:r}=n;this.isLongStrip=o,this.isVertical=i,this.isRTL=r,o!==void 0&&je(()=>{ue(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 Qg(e){return new Jg(e)}function em({speed:e,fontSize:t,lineHeight:n,...o}){const i=hn().width;return new $a({...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 tm={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=fe({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 j,V;const n=e,o=t,i=ee(!1),r=ee(!1),s=Q(()=>n.busy),l=Q(()=>n.page),a=Q(()=>n.immediate||i.value?n.spaceTop??0:0),u=Q(()=>!n.touchDevice&&k.isIdle.value&&!n.busy&&!O.value),{asyncImgs:c,isWebtoon:d}=qg({raw:Q(()=>n.raw),spec:n.spec,page:l,touchDevice:n.touchDevice,isAutoShow:n.isAutoShow,async onReady(E){he(E),i.value=!0},onError:()=>o("error"),onTimeout:()=>o("timeout")}),{direction:f,style:p,isRTL:_,isDouble:S,isVertical:z,isLongStrip:w,gap:x,speed:D,zoom:y,breakFirst:b}=vh({touchDevice:n.touchDevice,isWebtoon:d,titleName:(j=n.raw)==null?void 0:j.title.name,defaultPreferences:Q(()=>n.defaultPreferences)}),O=ee(!1),W=Zg(c,S,b),Y=Q(()=>c.value.length),N=Q(()=>l.value>=Y.value),U=ee(null),F=ee(null),P=Q(()=>{var E;return(E=F.value)==null?void 0:E.rootEl}),Z=ee(!1),k=Qg({autoPlay:!n.tourEnabled&&(((V=n.defaultPreferences)==null?void 0:V.autoPlay)??!1),touchDevice:n.touchDevice,scrollEl:P,speed:D,isRTL:_,isVertical:z,isLongStrip:w,isBusy:s}),G=Q({get(){return y.value},set(E){k.interfere(()=>{y.value=E})}}),q=Ea({touchDevice:n.touchDevice,isBusy:s,isPlaying:Q(()=>k.isPlaying.value),isIdle:Q(()=>k.isIdle.value),hideControlsEvent:Q(()=>n.defaultPreferences.hideControlsEvent),scrollEl:P}),g=q.visible,T=Yg({page:l,totalImgs:Y,style:p,direction:f,isLongStrip:w,isVertical:z,isRTL:_,spaceTop:a,isWebtoon:d,scrollEl:Q(()=>{var E;return(E=F.value)==null?void 0:E.rootEl}),interferePlayer:E=>k.interfere(E),onChangedPage:he,onFinished:()=>o("finished")}),R=Q(()=>Math.floor(l.value)),$=Q(()=>w.value?l.value:S.value?mn():Math.floor(l.value)),ge=()=>k.interfere(()=>eo(100));Ot({onKeyDown:E=>{if(n.tourEnabled)return!0;const C=w.value&&z.value,B=w.value&&!z.value,A=!w.value&&z.value,re=!w.value&&!z.value;switch(E.key){case" ":E.preventDefault(),w.value||h();break;case"ArrowUp":case"PageUp":C?ge():A&&R.value!==0&&(E.preventDefault(),ze());break;case"ArrowDown":case"PageDown":C?ge():A&&!N.value&&(E.preventDefault(),Qe());break;case"ArrowLeft":B?ge():re?(E.preventDefault(),Re()):z.value&&De();break;case"ArrowRight":B?ge():re?(E.preventDefault(),ot()):z.value&&Te();break;case"Escape":E.preventDefault();break}},onKeyUp:E=>{switch(E.key){case"b":b.value=!b.value;break}}}),ue(k.isPlaying,E=>{o("playingChanged",E)}),ue(g,E=>{o("controlsVisibilityChanged",E)});async function ae(){await T.init(),o("ready"),r.value=!0,q.activate(),k.activate()}function he(E){if(l.value===E)return;const C=c.value.length;if(E<0||E>=C+1)return;const B=l.value;if(o("pageChanged",E),E<.01&&B>E){k.awake();return}}function me(){!n.touchDevice&&!w.value&&T.goToPage(R.value,{smooth:!0})}function Te(E=!1){var C,B;(B=(C=n.chapterNavData)==null?void 0:C.next)==null||B.call(C,E)}function De(E=!1){var C,B;(B=(C=n.chapterNavData)==null?void 0:C.prev)==null||B.call(C,E)}function Re(){_.value?Qe():ze()}function ot(){_.value?ze():Qe()}function ze(){var B;const E=W.value,C=N.value?E[E.length-1][0].index:(B=E[mn()-1])==null?void 0:B[0].index;C!==void 0?T.goToPage(C):De()}function Qe(){var E,C;if(N.value)Te();else{const B=((C=(E=W.value[mn()+1])==null?void 0:E[0])==null?void 0:C.index)??c.value.length;T.goToPage(B)}}function mn(){const E=R.value,C=W.value.findIndex(B=>B.some(({index:A})=>A===E));return C===-1?W.value.length-1:C}function h(E){q.toggle(E)}function m(){if(k.isPlaying.value){g.value||!n.touchDevice?k.stop():(k.awake(),q.toggle(!0));return}q.toggle()}function M(){k.stop(),o("clickEntryButton")}function H(){q.toggle(!1),k.isPlaying.value&&k.stop(),o("openHelpScreen")}return(E,C)=>e.immediate||i.value?(v(),oe(hr,{key:0,ref_key:"gearLayout",ref:U,loading:!r.value,immediate:!!e.immediate,idle:u.value,class:"text-stone-100",onClick:C[20]||(C[20]=Be(()=>{},["stop"]))},{default:ne(()=>{var B,A,re,te;return[i.value?(v(),oe(ma,{key:0,ref_key:"body",ref:F,zoom:G.value,"onUpdate:zoom":C[1]||(C[1]=J=>G.value=J),zooming:O.value,"onUpdate:zooming":C[2]||(C[2]=J=>O.value=J),page:l.value,"page-index":R.value,pages:X(W),"total-imgs":X(c).length,direction:X(f),gap:X(x),"is-long-strip":X(w),isRTL:X(_),"is-double":X(S),"is-vertical":X(z),"space-top":a.value||0,busy:s.value,"play-controller":X(k),"touch-device":e.touchDevice,"pinch-to-zoome":((B=e.defaultPreferences)==null?void 0:B.pinchToZoom)??!0,"tap-zone":(A=e.defaultPreferences)==null?void 0:A.tapZone,"controls-visible":X(g),onReady:ae,onPrev:ze,onNext:Qe,onClick:m,onDragEnd:me,onWheelPassive:C[3]||(C[3]=()=>X(k).interfere())},Mi({_:2},[i.value&&X(c).length?{name:"end",fn:ne(()=>{var J,le;return[L(Gi,{"has-next":!!((J=e.chapterNavData)!=null&&J.next),"offline-mode":!!e.offlineMode,seconds:((le=e.defaultPreferences)==null?void 0:le.autoNextSeconds)??5,"show-add-button":X(y)===1&&!e.entryId&&!!e.raw&&!e.offlineMode,onNext:Te,onAddToLibrary:M,onHide:C[0]||(C[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"])):se("",!0),L(yr,{modelValue:Z.value,"onUpdate:modelValue":C[10]||(C[10]=J=>Z.value=J),"enable-help":"",name:(re=e.raw)==null?void 0:re.title.name,"space-top":a.value,"enable-default-preferences":!e.touchDevice||!!e.appVersion,onHelp:H,onMore:C[11]||(C[11]=()=>o("openDefaultPreferences"))},{"tab-preferences":ne(()=>[L(pa,{"enable-reset":!e.touchDevice||!!e.appVersion,webtoon:X(d),"reader-style":X(p),"onUpdate:readerStyle":C[4]||(C[4]=J=>Oe(p)?p.value=J:null),direction:X(f),"onUpdate:direction":C[5]||(C[5]=J=>Oe(f)?f.value=J:null),gap:X(x),"onUpdate:gap":C[6]||(C[6]=J=>Oe(x)?x.value=J:null),speed:X(D),"onUpdate:speed":C[7]||(C[7]=J=>Oe(D)?D.value=J:null),zoom:G.value,"onUpdate:zoom":C[8]||(C[8]=J=>G.value=J),"default-preferences":e.defaultPreferences},null,8,["enable-reset","webtoon","reader-style","direction","gap","speed","zoom","default-preferences"])]),"tab-default":ne(()=>[L(fr,{"model-value":e.defaultPreferences,"onUpdate:modelValue":C[9]||(C[9]=J=>o("defaultPreferencesChanged",J))},null,8,["model-value"])]),_:1},8,["modelValue","name","space-top","enable-default-preferences"]),r.value&&!N.value&&!e.tourEnabled?(v(),oe(ca,{key:1,direction:X(f),"tap-zone":(te=e.defaultPreferences)==null?void 0:te.tapZone},null,8,["direction","tap-zone"])):se("",!0),r.value&&!N.value?(v(),oe(gr,{key:2,playing:X(k).isPlaying.value},null,8,["playing"])):se("",!0),L(ua,{visible:X(g),"space-top":a.value},Mi({top:ne(()=>{var J;return[e.raw||e.offlineMode?(v(),oe(Ji,{key:0,"offline-mode":e.offlineMode,raw:e.raw,onClick:C[12]||(C[12]=()=>o("pressedBack"))},null,8,["offline-mode","raw"])):se("",!0),!e.touchDevice&&!e.offlineMode?(v(),oe(Xo,{key:1,onClick:C[13]||(C[13]=()=>o("hideReader"))})):se("",!0),e.chapterNavData?(v(),oe(sr,{key:2,"touch-device":e.touchDevice,"chapter-spec":(J=e.spec)==null?void 0:J.chapter,data:e.chapterNavData,rtl:X(_),onGetHiddenChapters:C[14]||(C[14]=()=>o("getHiddenChapters")),onPrev:De,onNext:Te},null,8,["touch-device","chapter-spec","data","rtl"])):se("",!0)]}),"bottom-right":ne(()=>[!e.offlineMode&&e.raw?(v(),oe(Qi,{key:0,"entry-id":e.entryId,onClick:M},null,8,["entry-id"])):se("",!0),L(or,{disabled:!i.value,onClick:C[15]||(C[15]=()=>Z.value=!0)},null,8,["disabled"]),e.touchDevice?se("",!0):(v(),oe(ir,{key:1,onRequestFullScreen:C[16]||(C[16]=()=>{var J,le;return(le=(J=U.value)==null?void 0:J.rootEl)==null?void 0:le.requestFullscreen()})})),X(w)?(v(),oe(nr,{key:2,"tour-message":"Press here to play like a video",playing:X(k).isPlaying.value,disabled:!r.value,onClick:C[17]||(C[17]=()=>X(k).toggle())},null,8,["playing","disabled"])):se("",!0),X(S)?(v(),oe(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:C[18]||(C[18]=()=>b.value=!X(b))},{default:ne(()=>[X(b)?(v(),oe(fa,{key:0})):(v(),oe(da,{key:1}))]),_:1},8,["disabled"])):se("",!0)]),progress:ne(()=>{var J,le;return[((J=e.defaultPreferences)==null?void 0:J.progressSize)!==0&&!N.value?(v(),oe(mr,{key:0,value:$.value,total:X(W).length,"long-strip":X(w),height:((le=e.defaultPreferences)==null?void 0:le.progressSize)??2,rtl:X(_)},null,8,["value","total","long-strip","height","rtl"])):se("",!0)]}),default:ne(()=>[e.appVersion&&a.value&&!e.offlineMode?(v(),I("div",{key:0,class:"fixed top-0 left-0 right-0 bg-black bg-opacity-70 pointer-events-auto",style:Se({height:`${a.value}px`})},null,4)):se("",!0)]),_:2},[X(W).length?{name:"bottom-left",fn:ne(()=>[L(ha,{"model-value":R.value,disabled:!r.value,pages:X(W),"total-imgs":X(c).length,"onUpdate:modelValue":X(T).goToPage},null,8,["model-value","disabled","pages","total-imgs","onUpdate:modelValue"])]),key:"0"}:void 0]),1032,["visible","space-top"]),X(g)||O.value?(v(),I("div",tm,[L(Ro,{name:"fade","enter-from-class":"opacity-0","leave-to-class":"opacity-0"},{default:ne(()=>[O.value||X(y)!==1?(v(),oe(Kl,{key:0,zoom:G.value,onClick:C[19]||(C[19]=Be(()=>G.value=1,["stop"])),class:"duration-200"},null,8,["zoom"])):se("",!0)]),_:1})])):se("",!0),xe(E.$slots,"default")]}),_:3},8,["loading","immediate","idle"])):se("",!0)}}),nm=Object.freeze(Object.defineProperty({__proto__:null,default:Oa},Symbol.toStringTag,{value:"Module"}));function om({sel:e,heading:t}){const o="h1, h2, h3, h4, h5, h6, p, blockquote, pre, code, strong, b, em, i, small, sub, sup, mark, time, abbr, br, hr".split(",").map(d=>d.trim()),i=["br","hr"],r=["button","figure","img","script","select","input","form","iframe","nav","footer","aside","table"],s=im(e),l=rm(s),a=u(s);if(!a)return;if(t){const d=document.createElement("h1");d.innerText=t,a.prepend(d)}return{el:a,isRTL:l};function u(d){let f=0,p=!1,_=0,S=!1;const z=w(d);if(!z)return;sm(z),c(z);function w(x,D=!1){var Z;if(S)return;if(x.nodeType===Node.TEXT_NODE)return D||(Z=x.textContent)!=null&&Z.trim()?x.cloneNode():void 0;if(x.nodeType!==Node.ELEMENT_NODE)return;const b=x.tagName.toLocaleLowerCase();if(r.includes(b)||b==="a"&&!D||x.getAttribute("aria-hidden")==="true")return;const O=window.getComputedStyle(x);if(!(O.display!=="none"&&+(O.opacity??"1")>.1&&O.position!=="fixed"))return;const Y=Array.from(x.childNodes);if(!Y.length)return i.includes(b)?document.createElement(x.tagName):void 0;const N=D||o.includes(b),U=[];if(Y.forEach(k=>{if(S)return;const G=w(k,N);G?(U.push(G),p?_=0:++f>30&&(p=!0)):p&&++_>30&&(S=!0)}),!U.length)return;const F=document.createElement(b==="body"?"div":b==="a"?"span":b),P=x.getAttribute("dir");return P&&P!=="auto"&&F.setAttribute("dir",P),U.forEach(k=>F.appendChild(k)),F}return z}function c(d){za(d,f=>{if(f===d||o.includes(f.tagName.toLowerCase()))return;const p=f.parentElement;if((p==null?void 0:p.childNodes.length)===1){Array.from(f.childNodes).forEach(z=>{p.appendChild(z)}),p.removeChild(f);return}f.childNodes.length===1&&f.replaceWith(f.childNodes[0])})}}function im(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 rm(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 sm(e){_r(e,t=>Array.from(t.children),t=>!t.textContent.trim()),_r(e,t=>Array.from(t.children).reverse(),t=>{if(!t.textContent.trim())return!0;const n=t.tagName;return n.length===2&&n.startsWith("H")})}function za(e,t){Array.from(e.children).forEach(o=>{za(o,t)}),t(e)}function _r(e,t,n){const o=t(e);for(let i=0;i<o.length;i++){const r=o[i];if(!_r(r,t,n))return!1;lm(r)}return n(e)}function lm(e){var t;(t=e.parentNode)==null||t.removeChild(e)}const am={key:1,class:"h-14 sm:h-16 px-2 2xs:px-3 flex gap-1 2xs:gap-3 items-center"},cm={class:"md:fixed left-0 right-0 bottom-0"},um={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=fe({__name:"GearThirdControlsLayout",props:{visible:{type:Boolean},hideTopControls:{type:Boolean},spaceTop:{type:null}},setup(e){return(t,n)=>(v(),I(be,null,[K("div",{class:ce(["fixed left-0 right-0 top-0 bg-inherit z-30",{"opacity-0 pointer-events-none":!e.visible}])},[e.spaceTop?(v(),I("div",{key:0,style:Se({height:`${e.spaceTop}px`}),class:"bg-gradient-to-b from-black to-transparent"},null,4)):se("",!0),e.hideTopControls?se("",!0):(v(),I("div",am,[xe(t.$slots,"top-controls")]))],2),K("div",{class:ce(["fixed left-0 right-0 bottom-0 md:left-auto z-30 bg-inherit md:bg-transparent",{"opacity-0 pointer-events-none":!e.visible}])},[K("div",cm,[xe(t.$slots,"progress")]),K("div",um,[xe(t.$slots,"bottom-controls")])],2),xe(t.$slots,"default")],64))}}),dm=Object.freeze(Object.defineProperty({__proto__:null,default:Da},Symbol.toStringTag,{value:"Module"})),fm={},pm={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function hm(e,t){return v(),I("svg",pm,[...t[0]||(t[0]=[K("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=ve(fm,[["render",hm]]),gm=Object.freeze(Object.defineProperty({__proto__:null,default:Aa},Symbol.toStringTag,{value:"Module"})),mm={},vm={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function bm(e,t){return v(),I("svg",vm,[...t[0]||(t[0]=[K("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=ve(mm,[["render",bm]]),ym=Object.freeze(Object.defineProperty({__proto__:null,default:La},Symbol.toStringTag,{value:"Module"})),ja=ve(fe({__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=ee(!1),s=ee(),l=ee(),a=Jn(()=>{const c=s.value;if(!c)return;const{clientHeight:d,scrollHeight:f,scrollTop:p}=c,_=f-2*d,S=p/_;i("progressChanged",Math.max(0,Math.min(1,S)))},30);t({scrollEl:s}),Ot({onKeyDown(){var c;o.busy||(c=s.value)==null||c.focus()}}),je(()=>{ue(()=>o.content,d=>{const f=l.value;f&&(Array.from(f.children).forEach(p=>{f.removeChild(p)}),f.appendChild(d),setTimeout(()=>{const p=s.value;if(p){f.offsetHeight<=p.clientHeight&&i("finished");const{progress:_}=o;_&&u(_)}r.value=!0,i("ready")}))},{immediate:!0});const c=hn();ue(()=>{const{fontFamily:d,fontSize:f,lineHeight:p}=o.titlePreferences;return`${d}-${f}-${p}-${c.width.value}`},async()=>{const d=o.progress;await xt(),u(d)})});function u(c){const d=s.value;d&&(d.scrollTop=c*(d.scrollHeight-2*d.clientHeight))}return(c,d)=>(v(),I("div",{ref_key:"scrollContainer",ref:s,tabindex:"0",class:ce(["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:Se({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))},[K("div",kn({ref_key:"contentContainer",ref:l,class:"novel-body__content"},e.rtl?{dir:"rtl"}:{}),null,16),xe(c.$slots,"end")],38))}}),[["styles",['.novel-body{top:0;right:0;bottom:0;left:0;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:1040px;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}']]]),wm=Object.freeze(Object.defineProperty({__proto__:null,default:ja},Symbol.toStringTag,{value:"Module"})),Ba=fe({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 Z,k,G,q,g,T;const n=e,o=t,i=ee(null),r=((Z=n.raw)==null?void 0:Z.novel)??om({sel:(k=n.spec)==null?void 0:k.content,heading:(G=n.raw)==null?void 0:G.name});r===void 0&&o("error");const s=ee(r==null?void 0:r.el),l=ee(!!(r!=null&&r.isRTL)),a=ee(!1),u=ee(!1),c=Q(()=>n.page),d=Q(()=>n.busy),f=ee(null),p=Q(()=>{var R;return(R=f.value)==null?void 0:R.scrollEl}),_=(g=(q=n.raw)==null?void 0:q.title)==null?void 0:g.name,S=_?sa(_):location.hostname,z=Jd(`mpr:${S}`,{}),w=Q({get(){var ae,he;const R=n.defaultPreferences,$=((ae=z.value)==null?void 0:ae.fontSize)??R.fontSize,ge=Math.max($,((he=z.value)==null?void 0:he.lineHeight)??R.lineHeight);return{fontFamily:R.fontFamily,speed:R.speed,...z.value,contrast:R.contrast,fontSize:$,lineHeight:ge}},set(R){const $={...R},ge=n.defaultPreferences;Object.keys($).forEach(ae=>{$[ae]===ge[ae]&&delete $[ae]}),z.value=$}}),x=em({isBusy:d,speed:Q(()=>w.value.speed),fontSize:Q(()=>w.value.fontSize),lineHeight:Q(()=>w.value.lineHeight),autoPlay:!!((T=n.defaultPreferences)!=null&&T.autoPlay),touchDevice:n.touchDevice,scrollEl:p}),D=Q(()=>!n.touchDevice&&x.isIdle.value&&!d.value),y=Ea({touchDevice:n.touchDevice,moveThreshold:50,isBusy:d,isPlaying:Q(()=>x.isPlaying.value),isIdle:Q(()=>x.isIdle.value),hideControlsEvent:Q(()=>n.defaultPreferences.hideControlsEvent),scrollEl:p}),b=y.visible;ue(x.isPlaying,R=>{o("playingChanged",R)}),ue(b,R=>{o("controlsVisibilityChanged",R)}),O(document.documentElement),O(document.body);function O(R){const $=R.style.getPropertyValue("overflow");$!=="hidden"&&(R.style.setProperty("overflow","hidden","important"),Mt(()=>{$?R.style.setProperty("overflow",$):R.style.removeProperty("overflow")}))}function W(){o("ready"),y.activate(),x.activate()}function Y(){x.stop(),o("clickEntryButton")}function N(R){u.value=R}function U(){if(x.isPlaying.value){b.value||!n.touchDevice?x.stop():(x.awake(),y.toggle(!0));return}y.toggle()}function F(R){R!==n.page&&(o("pageChanged",Math.min(1,R)),R===1&&o("finished"))}function P(R){const $=w.value.fontSize+R;$>48||$<10||(w.value={...w.value,fontSize:$,lineHeight:Math.max(10,Math.min(96,Math.round(w.value.lineHeight/w.value.fontSize*$)))})}return(R,$)=>s.value?(v(),oe(hr,{key:0,ref_key:"gearLayout",ref:i,immediate:"",idle:D.value,class:"bg-stone-900",style:Se({color:`rgba(255, 255, 255, ${e.defaultPreferences.contrast})`})},{default:ne(()=>{var ge;return[L(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":w.value,"default-preferences":e.defaultPreferences,"hide-top-controls":!e.raw,onClick:U,onProgressChanged:F,onReady:W},{end:ne(()=>{var ae,he;return[L(Gi,{"has-next":!!((ae=e.chapterNavData)!=null&&ae.next),"offline-mode":!!e.offlineMode,seconds:((he=e.defaultPreferences)==null?void 0:he.autoNextSeconds)??5,onNext:$[0]||($[0]=()=>{var me,Te;return(Te=(me=e.chapterNavData)==null?void 0:me.next)==null?void 0:Te.call(me,!1)}),onVisibilityChanged:N,onHide:$[1]||($[1]=()=>o("hideReader")),onFinished:$[2]||($[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?Le((v(),oe(Xo,{key:0,class:"hidden md:inline-block fixed left-3 top-2",transparent:"",onClick:$[3]||($[3]=()=>o("hideReader"))},null,512)),[[gl,X(b)]]):se("",!0),L(Da,{visible:X(b),"hide-top-controls":!e.raw,"space-top":e.spaceTop},{"top-controls":ne(()=>{var ae;return[e.raw||e.offlineMode?(v(),oe(Ji,{key:0,"offline-mode":e.offlineMode,raw:e.raw,transparent:"",onClick:$[4]||($[4]=()=>o("pressedBack"))},null,8,["offline-mode","raw"])):se("",!0),e.raw&&!e.touchDevice&&!e.offlineMode?(v(),oe(Xo,{key:1,transparent:"",onClick:$[5]||($[5]=()=>o("hideReader"))})):se("",!0),e.chapterNavData?(v(),oe(sr,{key:2,transparent:"","touch-device":e.touchDevice,"chapter-spec":(ae=e.spec)==null?void 0:ae.chapter,data:e.chapterNavData,rtl:l.value,onGetHiddenChapters:$[6]||($[6]=()=>o("getHiddenChapters")),onPrev:$[7]||($[7]=he=>{var me,Te;return(Te=(me=e.chapterNavData)==null?void 0:me.prev)==null?void 0:Te.call(me,he)}),onNext:$[8]||($[8]=he=>{var me,Te;return(Te=(me=e.chapterNavData)==null?void 0:me.next)==null?void 0:Te.call(me,he)})},null,8,["touch-device","chapter-spec","data","rtl"])):se("",!0)]}),"bottom-controls":ne(()=>[!e.offlineMode&&e.raw?(v(),I(be,{key:0},[L(Qi,{"entry-id":e.entryId,transparent:"",onClick:Y},null,8,["entry-id"]),$[19]||($[19]=K("div",{class:"hidden 2xs:inline-block md:hidden flex-grow"},null,-1))],64)):se("",!0),L(Ge,{transparent:"",onClick:$[9]||($[9]=()=>P(-1))},{default:ne(()=>[L(Aa)]),_:1}),L(Ge,{transparent:"",onClick:$[10]||($[10]=()=>P(1))},{default:ne(()=>[L(La)]),_:1}),L(or,{transparent:"",onClick:$[11]||($[11]=()=>a.value=!0)}),e.touchDevice?se("",!0):(v(),oe(ir,{key:1,transparent:"",onRequestFullScreen:$[12]||($[12]=()=>{var ae,he;return(he=(ae=i.value)==null?void 0:ae.rootEl)==null?void 0:he.requestFullscreen()})})),L(nr,{transparent:"","tour-message":"Press here to start listening",playing:X(x).isPlaying.value,class:"order-2 md:order-4",onClick:$[13]||($[13]=()=>X(x).toggle())},null,8,["playing"])]),progress:ne(()=>{var ae,he;return[((ae=e.defaultPreferences)==null?void 0:ae.progressSize)!==0?(v(),oe(mr,{key:0,value:c.value,height:((he=e.defaultPreferences)==null?void 0:he.progressSize)??2,rtl:l.value,opacity:e.defaultPreferences.contrast},null,8,["value","height","rtl","opacity"])):se("",!0)]}),_:1},8,["visible","hide-top-controls","space-top"]),u.value?se("",!0):(v(),oe(gr,{key:1,playing:X(x).isPlaying.value},null,8,["playing"])),L(yr,{modelValue:a.value,"onUpdate:modelValue":$[17]||($[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:$[18]||($[18]=()=>o("openDefaultPreferences"))},{"tab-preferences":ne(()=>[L(dr,{modelValue:w.value,"onUpdate:modelValue":$[14]||($[14]=ae=>w.value=ae),"default-preferences":e.defaultPreferences,"enable-reset":!e.touchDevice||!!e.appVersion,onReset:$[15]||($[15]=()=>z.value=null)},null,8,["modelValue","default-preferences","enable-reset"])]),"tab-default":ne(()=>[L(fr,{"is-novel":"","model-value":e.defaultPreferences,"onUpdate:modelValue":$[16]||($[16]=ae=>o("defaultPreferencesChanged",ae))},null,8,["model-value"])]),_:1},8,["modelValue","name","space-top","enable-default-preferences"]),xe(R.$slots,"default")]}),_:3},8,["idle","style"])):se("",!0)}}),xm=Object.freeze(Object.defineProperty({__proto__:null,default:Ba},Symbol.toStringTag,{value:"Module"}));async function _m({siteMeta:e,spec:t}){const n=e==null?void 0:e.contentTypes,o=!e||(n==null?void 0:n.includes(Qt.novel)),i=!n||n.includes(Qt.manga);if(!i&&!o)return;const r=(t==null?void 0:t.content)??"body",s=i?(r==null?void 0:r.split(",").map(l=>l.trim()).filter(Boolean).map(l=>`${l} img:not(figure > img), ${l} canvas`).join(","))??r:void 0;return await en(200,50,async()=>{const l=document.querySelector(r);if(l){if(o){const a=Array.from(l.querySelectorAll("p"));if(a.length){let u=!1,c=0;for(let d=0;d<a.length;d++)if(a[d].textContent.split(" ").filter(Boolean).length>25&&(c+=1,c===10)){u=!0;break}if(u)return Qt.novel}}if(s&&Array.from(l.querySelectorAll(s)).some(c=>Sm(c)))return Qt.manga}})}function Sm(e){const t=e.getBoundingClientRect();return oi(t.width,t.height)}function km({raw:e,spec:t,siteMeta:n,offlineMode:o,onSelect:i}){var F,P,Z;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(k,G){if(o){i({...k});return}if(k.slug){_(k.slug,G);return}if(k.elIndex===void 0||!(d!=null&&d.sel))return;let q=null;document.querySelector(d.sel)||(d!=null&&d.trigger&&(q=document.querySelector(d.trigger)),q&&(no(q),await new Promise(T=>setTimeout(()=>T(),50))));const g=d&&d.sel&&!d.url?document.querySelectorAll(d.sel):void 0;g!=null&&g[k.elIndex]&&(no(g[k.elIndex]),q&&document.querySelector(d.sel)&&no(q))}function _(k,G){const q=Cm(c,k,(n==null?void 0:n.trailing)??!0);G?window.open(q,"_blank","noopener"):location.href=q}function S(k){const G=y[k];return G?q=>p(G,q):void 0}function z(k,G,q){if(G)_(G,q);else if(k){const g=document.querySelector(k);g&&no(g,{preventDefault:!1})}}const w=r??s,x=d==null?void 0:d.url,D=((F=a.chapters)==null?void 0:F.filter(k=>k.slug||!x&&k.elIndex!==void 0))??[],y=D.length>1?D:[],b=(P=e.prev)==null?void 0:P.slug,O=(Z=e.next)==null?void 0:Z.slug,W=t!=null&&t.prev&&typeof t.prev!="string"?t.prev.sel??t.prevBtn:t==null?void 0:t.prevBtn,Y=t!=null&&t.next&&typeof t.next!="string"?t.next.sel??t.nextBtn:t==null?void 0:t.nextBtn;let N=b||W&&!y.length&&document.body.querySelector(W)?k=>z(W,b,k):void 0,U=O||Y&&!y.length&&document.body.querySelector(Y)?k=>z(Y,O,k):void 0;if(y.length){if(x&&(f=y.findIndex(k=>k.slug===e.slug)),f===-1&&(f=y.findIndex(k=>(k.vol??k.inferVol)===w&&k.chap===l)),x&&f===-1&&(f=y.findIndex(k=>k.slug&&u.startsWith(`${k.slug}-`)&&u.length-k.slug.length>3)),f!==-1)N??(N=S(f+1)),U??(U=S(f-1));else if(!b&&!O){const k=y.findIndex(G=>{const q=G.vol??G.inferVol;return w===void 0||q===void 0||w===q?G.chap<l:q<w});k!==-1?(N=S(k),U=S(k-1)):U=S(y.length-1)}}return{activeIndex:f,activeLabel:Va({vol:r,chap:l}),prev:N,next:U,chapters:y.map(k=>({label:Va(k),select:G=>p(k,G)}))}}function Va({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 Na=ve(fe({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}){const n=e,o=t;let i=!1;bs((w,x,D)=>{if(!i){i=!0;const b=`(3.1.1) ${(x==null?void 0:x.$options.name)??(x==null?void 0:x.$options.__name)??(x==null?void 0:x.$options.__file)}.${D}: ${Tm(w)}`;o("crash",b)}return!1});const r=ee(n.raw?n.raw.contentType??Qt.manga:void 0);r.value===void 0&&_m({siteMeta:n.siteMeta,spec:n.spec}).then(w=>{w?r.value=w:o("error")});const s=ee(!1),l=of({touchDevice:n.touchDevice}),a=af(n.page,n.isAutoShow),u=Q(()=>n.raw?km({raw:n.raw,spec:n.spec,siteMeta:n.siteMeta,offlineMode:n.offlineMode,onSelect:w=>o("selectChapter",w)}):void 0);lf().addListener({onKeyUp:w=>{switch(w.key){case"h":S();break}}}),rf(()=>o("hapticFeedback"));const d=Q(()=>{var y,b;const w=n.defaultPreferences,x=((y=n.defaultPreferences)==null?void 0:y.fontSize)??16,D=Math.max(x,((b=n.defaultPreferences)==null?void 0:b.lineHeight)??28);return{...w,speed:(w==null?void 0:w.speed)??1,progressSize:(w==null?void 0:w.progressSize)??2,autoNextSeconds:(w==null?void 0:w.autoNextSeconds)??5,hideControlsEvent:(w==null?void 0:w.hideControlsEvent)??nn.firstMove,autoPlay:(w==null?void 0:w.autoPlay)??!1,pinchToZoom:(w==null?void 0:w.pinchToZoom)??!0,readerStyle:(w==null?void 0:w.readerStyle)??Dt.longStrip,direction:(w==null?void 0:w.direction)??nt.vertical,gap:(w==null?void 0:w.gap)??0,fontFamily:"system-ui, sans-serif",contrast:.8,fontSize:x,lineHeight:D}});function f(){if(n.offlineMode){o("pressedBack");return}cf(),o("dispose")}function p(w){const x=Math.floor(w*100)/100;x!==Math.floor(a.value*100)/100&&(a.value=w,o("pageChanged",x))}function _(){n.entryId?o("openEntry",n.entryId):o("addEntry")}function S(w){s.value!==w&&(s.value=w??!s.value)}function z(){o("error"),f()}return(w,x)=>r.value!==void 0?(v(),oe(ws(r.value===X(Qt).novel?Ba:Oa),kn({key:0,ref:"root"},n,{page:X(a),busy:X(l),"chapter-nav-data":u.value,"default-preferences":d.value,onOpenDefaultPreferences:x[1]||(x[1]=()=>o("openDefaultPreferences")),onDefaultPreferencesChanged:x[2]||(x[2]=D=>o("defaultPreferencesChanged",D)),onTimeout:x[3]||(x[3]=()=>o("timeout")),onReady:x[4]||(x[4]=()=>o("ready")),onFinished:x[5]||(x[5]=()=>o("finished")),onPlayingChanged:x[6]||(x[6]=D=>o("playingChanged",D)),onControlsVisibilityChanged:x[7]||(x[7]=D=>o("controlsVisibilityChanged",D)),onPressedBack:x[8]||(x[8]=()=>o("pressedBack")),onGetHiddenChapters:x[9]||(x[9]=()=>o("getHiddenChapters")),onError:z,onHideReader:f,onPageChanged:p,onClickEntryButton:_,onOpenHelpScreen:x[10]||(x[10]=()=>S(!0))}),{default:ne(()=>[s.value?(v(),oe(Vl,{key:0,"touch-device":e.touchDevice,onHide:S},null,8,["touch-device"])):se("",!0),e.tourEnabled?(v(),oe(Nl,{key:1,onHide:x[0]||(x[0]=()=>o("tourEnabledChanged",!1))})):se("",!0)]),_:1},16,["page","busy","chapter-nav-data","default-preferences"])):se("",!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%}.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}.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-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-none{background-image:none}.from-black{--tw-gradient-from:#000 var(--tw-gradient-from-position);--tw-gradient-to:transparent var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.to-transparent{--tw-gradient-to:transparent var(--tw-gradient-to-position)}.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\\:inline-block{display:inline-block}.\\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\\:hidden{display:none}.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}}']]]),Pm=Object.freeze(Object.defineProperty({__proto__:null,default:Na},Symbol.toStringTag,{value:"Module"})),Mm={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"},$m={class:"inline-block children-pointer-events-auto"},Om={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:ve(fe({__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=ee(null);return t({rootEl:o}),(i,r)=>Le((v(),I("dialog",Mm,[K("div",{ref_key:"rootEl",ref:o,id:"reader-layout",class:ce({"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(),I("div",Em,[L(ti)])):se("",!0),xe(i.$slots,"default"),K("div",{id:"controls",class:ce(["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}])},[K("div",{class:"flex gap-1 items-center children-pointer-events-auto relative z-30 flex-shrink-0 2xs:gap-3",style:Se({paddingTop:`${e.spaceTop||0}px`})},[xe(i.$slots,"top-controls")],4),K("div",Im,[K("div",$m,[xe(i.$slots,"bottom-left-controls")]),K("div",Om,[xe(i.$slots,"bottom-right-controls")])]),K("div",zm,[xe(i.$slots,"progress")])],2),e.controlsVisible||e.zooming?(v(),I("div",Dm,[xe(i.$slots,"reset-zoom")])):se("",!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 v(),I("svg",jm,[...t[0]||(t[0]=[K("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 Vm=Object.freeze(Object.defineProperty({__proto__:null,default:ve(Lm,[["render",Bm]])},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}",gn="gear-second",Sr={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:yo({...Sr})};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,Sr),Je.promise=void 0,Gn.clear())},u=gt(f=>{var p;return!n&&((p=e.onPageChanged)==null?void 0:p.call(e,f))},300);Object.assign(Je.data,Sr,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,_;(p=e.onFullScreenChanged)==null||p.call(e,!f),(_=e.onControlsVisibilityChanged)==null||_.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:()=>Gn.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=Nm;e.appendChild(document.createTextNode(t)),document.head.appendChild(e);const n=gd({styles:[await Fm()],data:()=>({readerData:Je.data}),render(){return ol(Na,this.readerData)}});window.customElements.define(gn,n)}async function Fm(){const e=Object.assign({"./App.vue":Pm,"./GearSecond.vue":nm,"./GearThird.vue":xm,"./components/AutoNext.vue":xf,"./components/ButtonWebFullScreen.vue":vp,"./components/ChapterNav.vue":Hp,"./components/DefaultPreferencesForm.vue":kh,"./components/DirectionToast.vue":$h,"./components/GearControlsLayout.vue":Dh,"./components/GearLayout.vue":Hh,"./components/GearThirdControlsLayout.vue":dm,"./components/GesturesContainer.vue":og,"./components/HelpScreen.vue":Qd,"./components/MangaPreferencesForm.vue":Jh,"./components/NovelBody.vue":wm,"./components/NovelPreferencesForm.vue":yh,"./components/PageNav.vue":Qh,"./components/PauseToast.vue":eg,"./components/ProgressBar.vue":ng,"./components/ReaderBody.vue":cg,"./components/ReaderImg.vue":rg,"./components/ReaderLayout.vue":Am,"./components/ReaderTour.vue":nf,"./components/SettingsBottomSheet.vue":Eg,"./components/TapZonePreview.vue":Eh,"./components/base/BaseButton.vue":ff,"./components/base/BottomSheet.vue":gg,"./components/base/ButtonDropdown.vue":Op,"./components/base/ButtonIcon.vue":_f,"./components/base/ButtonOutline.vue":uh,"./components/base/DropdownMenu.vue":wp,"./components/base/InputPercentage.vue":Up,"./components/base/InputSelect.vue":Zp,"./components/base/InputSwitcher.vue":Jp,"./components/base/LoadingIndicator.vue":Vh,"./components/base/TabBar.vue":vg,"./components/base/TableField.vue":eh,"./components/buttons/ButtonBack.vue":Pf,"./components/buttons/ButtonEntry.vue":Lf,"./components/buttons/ButtonHide.vue":Rf,"./components/buttons/ButtonPlay.vue":Xf,"./components/buttons/ButtonResetZoom.vue":op,"./components/buttons/ButtonSettings.vue":ap,"./components/fields/FieldContrast.vue":th,"./components/fields/FieldFontFamily.vue":dh,"./components/icons/IconBack.vue":Tf,"./components/icons/IconBookmarkNew.vue":Af,"./components/icons/IconBookmarked.vue":$f,"./components/icons/IconChevronLeft.vue":Lp,"./components/icons/IconChevronRight.vue":Np,"./components/icons/IconClose.vue":pg,"./components/icons/IconDouble.vue":qh,"./components/icons/IconDoubleSkip.vue":Xh,"./components/icons/IconExclamationCircle.vue":Vm,"./components/icons/IconFullscreen.vue":fp,"./components/icons/IconFullscreenExit.vue":mp,"./components/icons/IconHelp.vue":xg,"./components/icons/IconLandscape.vue":rh,"./components/icons/IconLoading.vue":kp,"./components/icons/IconMoreVert.vue":Cg,"./components/icons/IconNext.vue":Mh,"./components/icons/IconPause.vue":Uf,"./components/icons/IconPlay.vue":Yf,"./components/icons/IconPlus.vue":mf,"./components/icons/IconPortrait.vue":ch,"./components/icons/IconReaderExit.vue":Nf,"./components/icons/IconSettings.vue":lp,"./components/icons/IconTextDecre.vue":gm,"./components/icons/IconTextIncre.vue":ym,"./components/icons/IconTriangle.vue":Mp,"./components/icons/IconZoom.vue":ep}),t=[];for(const n in e){const o=e[n];t.push(o.default.styles)}return t.join("")}return Rm});
|
|
20
|
+
**/let Ri;const sl=typeof window<"u"&&window.trustedTypes;if(sl)try{Ri=sl.createPolicy("vue",{createHTML:e=>e})}catch{}const ll=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,al=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{al.innerHTML=ll(o==="svg"?`<svg>${e}</svg>`:o==="mathml"?`<math>${e}</math>`:e);const l=al.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",Zn="animation",Yn=Symbol("_vtc"),cl={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({},ds,cl),Xn=(e=>(e.displayName="Transition",e.props=Xu,e))((e,{slots:t})=>rl(Uc,Gu(e),t)),dn=(e,t=[])=>{re(e)?e.forEach(n=>n(...t)):e&&e(...t)},ul=e=>e?re(e)?e.some(t=>t.length>1):e.length>1:!1;function Gu(e){const t={};for(const M in e)M in cl||(t[M]=e[M]);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),w=y&&y[0],z=y&&y[1],{onBeforeEnter:E,onEnter:T,onEnterCancelled:_,onLeave:g,onLeaveCancelled:m,onBeforeAppear:D=E,onAppear:H=T,onAppearCancelled:Y=_}=t,R=(M,Z,k,Q)=>{M._enterCancelled=Q,fn(M,Z?c:l),fn(M,Z?u:s),k&&k()},q=(M,Z)=>{M._isLeaving=!1,fn(M,d),fn(M,p),fn(M,f),Z&&Z()},W=M=>(Z,k)=>{const Q=M?H:T,U=()=>R(Z,M,k);dn(Q,[Z,U]),dl(()=>{fn(Z,M?a:r),qt(Z,M?c:l),ul(Q)||fl(Z,o,w,U)})};return Oe(t,{onBeforeEnter(M){dn(E,[M]),qt(M,r),qt(M,s)},onBeforeAppear(M){dn(D,[M]),qt(M,a),qt(M,u)},onEnter:W(!1),onAppear:W(!0),onLeave(M,Z){M._isLeaving=!0;const k=()=>q(M,Z);qt(M,d),M._enterCancelled?(qt(M,f),gl(M)):(gl(M),qt(M,f)),dl(()=>{M._isLeaving&&(fn(M,d),qt(M,p),ul(g)||fl(M,o,z,k))}),dn(g,[M,k])},onEnterCancelled(M){R(M,!1,void 0,!0),dn(_,[M])},onAppearCancelled(M){R(M,!0,void 0,!0),dn(Y,[M])},onLeaveCancelled(M){q(M),dn(m,[M])}})}function Ju(e){if(e==null)return null;if(Ce(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[Yn]||(e[Yn]=new Set)).add(t)}function fn(e,t){t.split(/\s+/).forEach(o=>o&&e.classList.remove(o));const n=e[Yn];n&&(n.delete(t),n.size||(e[Yn]=void 0))}function dl(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Qu=0;function fl(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=pl(i,r),l=o(`${Zn}Delay`),a=o(`${Zn}Duration`),u=pl(l,a);let c=null,d=0,f=0;t===Qt?s>0&&(c=Qt,d=s,f=r.length):t===Zn?u>0&&(c=Zn,d=u,f=a.length):(d=Math.max(s,u),c=d>0?s>u?Qt:Zn: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 pl(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,o)=>hl(n)+hl(e[o])))}function hl(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function gl(e){return(e?e.ownerDocument:document).body.offsetHeight}function td(e,t,n){const o=e[Yn];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Ho=Symbol("_vod"),ml=Symbol("_vsh"),nd={name:"show",beforeMount(e,{value:t},{transition:n}){e[Ho]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Gn(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),Gn(e,!0),o.enter(e)):o.leave(e,()=>{Gn(e,!1)}):Gn(e,t))},beforeUnmount(e,{value:t}){Gn(e,t)}};function Gn(e,t){e.style.display=t?e[Ho]:"none",e[ml]=!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&&Fo(o,l,"")}else for(const s in t)n[s]==null&&Fo(o,s,"");for(const s in n)s==="display"&&(r=!0),Fo(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");Ho in e&&(e[Ho]=r?o.display:"",e[ml]&&(o.display="none"))}const vl=/\s*!important$/;function Fo(e,t,n){if(re(n))n.forEach(o=>Fo(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=sd(e,t);vl.test(n)?e.setProperty(et(o),n.replace(vl,""),"important"):e[o]=n}}const bl=["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=co(o);for(let i=0;i<bl.length;i++){const r=bl[i]+o;if(r in e)return Fi[t]=r}return t}const yl="http://www.w3.org/1999/xlink";function wl(e,t,n,o,i,r=Qa(t)){o&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(yl,t.slice(6,t.length)):e.setAttributeNS(yl,t,n):n==null||r&&!$r(n)?e.removeAttribute(t):e.setAttribute(t,r?"":bt(n)?String(n):n)}function xl(e,t,n,o,i){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?ll(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=$r(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 _l=Symbol("_vei");function ad(e,t,n,o,i=null){const r=e[_l]||(e[_l]={}),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 Sl=/(?:Once|Passive|Capture)$/;function cd(e){let t;if(Sl.test(e)){t={};let o;for(;o=e.match(Sl);)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;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 kl=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):ro(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))?(xl(e,t,o),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&wl(e,t,o,s,r,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!$e(o))?xl(e,He(t),o,r,t):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),wl(e,t,o,s))};function gd(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&kl(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 kl(t)&&$e(n)?!1:t in e}const Cl={};function md(e,t,n){let o=he(e,t);lo(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=$l){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!==$l?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,xt(()=>{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)Se(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):Cl;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===Cl?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=j(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,lo(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 Wo=e=>{const t=e.props["onUpdate:modelValue"]||!1;return re(t)?n=>uo(t,n):t};function bd(e){e.target.composing=!0}function Tl(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const kn=Symbol("_assign");function Ml(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]=Wo(i);const r=o||i.props&&i.props.type==="number";pn(e,t?"change":"input",s=>{s.target.composing||e[kn](Ml(e.value,n,r))}),(n||r)&&pn(e,"change",()=>{e.value=Ml(e.value,n,r)}),t||(pn(e,"compositionstart",bd),pn(e,"compositionend",Tl),pn(e,"change",Tl))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:o,trim:i,number:r}},s){if(e[kn]=Wo(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]=Wo(n),pn(e,"change",()=>{const o=e._modelValue,i=xd(e),r=e.checked,s=e[kn];if(re(o)){const l=zr(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(so(o)){const l=new Set(o);r?l.add(i):l.delete(i),s(l)}else s(El(e,r))})},mounted:Pl,beforeUpdate(e,t,n){e[kn]=Wo(n),Pl(e,t,n)}};function Pl(e,{value:t,oldValue:n},o){e._modelValue=t;let i;if(re(t))i=zr(t,o.props.value)>-1;else if(so(t))i=t.has(o.props.value);else{if(t===n)return;i=po(t,El(e,!0))}e.checked!==i&&(e.checked=i)}function xd(e){return"_value"in e?e._value:e.value}function El(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"},Uo=(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 Il;function Ol(){return Il||(Il=vu(Cd))}const Td=(...e)=>{Ol().render(...e)},$l=(...e)=>{const t=Ol().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 Jn(e){return e.checkVisibility({opacityProperty:!0,visibilityProperty:!1,contentVisibilityAuto:!0})}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)})}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"],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=!r||r.includes(Kt.manga),l=!r||r.includes(Kt.novel);let a=0;return await en(i/50,50,()=>{const d=document.querySelector(e);if(d){if(l&&a++%3===0&&u(d))return Kt.novel;if(s&&c(d,t==null?void 0:t.validateImgSize))return Kt.manga}});function u(d){let f=0,p=0,y=0,w=!1;return z(d),w;function z(E){const T=Array.from(E.children);for(let _=0;_<T.length;_++){const g=T[_],m=g.tagName;if(!(n.includes(m)||!Jn(g)||window.getComputedStyle(g).position==="fixed")){if(m==="P"){if(f+=g.textContent.split(" ").filter(Boolean).length,p++,y=0,!s&&f>50||p>10&&f>120||p>5&&f>250||f>400){w=!0;break}continue}p>0&&++y>4&&(p=0,f=0),z(g)}}}}function c(d,f){const p=Array.from(d.querySelectorAll(o));return f!==!1?p.length>0:p.some(y=>Id(y))}}function Id(e){const{width:t,height:n}=e.getBoundingClientRect();return t>=280&&n>=50}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&&!Os())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)},zl=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]",Cn=()=>{};function Ad(...e){if(e.length!==1)return Ec(...e);const t=e[0];return typeof t=="function"?An(ns(()=>({get:t,set:Cn}))):ee(t)}function Dl(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 Al=e=>e();function Ld(e,t={}){let n,o,i=Cn;const r=a=>{clearTimeout(a),i(),i=Cn};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=Al,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:An(o),pause:i,resume:r,eventFilter:s}}function Ll(e){return e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e)}function Qn(e){return Array.isArray(e)?e:[e]}function Bd(e){return un()}function gt(e,t=200,n={}){return Dl(Ld(t,n),e)}function Nd(e,t,n={}){const{eventFilter:o=Al,...i}=n;return de(e,Dl(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():xt(e)}function Hd(e,t,n){return de(e,t,{...n,immediate:!0})}const _t=zl?window:void 0,Fd=zl?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=Qn(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),Qn(pt(i.value?e[1]:e[0])),Qn(X(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(y=>o(f,p,y,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=Os()?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 Ws(()=>{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>=Ll(d[1])),f&&p&&(p=o<=Ll(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 qo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ko="__vueuse_ssr_handlers__",Zd=Yd();function Yd(){return Ko in qo||(qo[Ko]=qo[Ko]||{}),qo[Ko]}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()}},jl="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=k=>{console.error(k)},initOnMounted:y}=o,w=(c?ft:ee)(typeof t=="function"?t():t),z=J(()=>pt(e));if(!n)try{n=Xd("getDefaultStorage",()=>_t==null?void 0:_t.localStorage)()}catch(k){p(k)}if(!n)return w;const E=pt(t),T=Gd(E),_=(i=o.serializer)!==null&&i!==void 0?i:Jd[T],{pause:g,resume:m}=Rd(w,k=>q(k),{flush:r,deep:s,eventFilter:f});de(z,()=>M(),{flush:r});let D=!1;const H=k=>{y&&!D||M(k)},Y=k=>{y&&!D||Z(k)};d&&l&&(n instanceof Storage?St(d,"storage",H,{passive:!0}):St(d,jl,Y)),y?Zi(()=>{D=!0,M()}):M();function R(k,Q){if(d){const U={key:z.value,oldValue:k,newValue:Q,storageArea:n};d.dispatchEvent(n instanceof Storage?new StorageEvent("storage",U):new CustomEvent(jl,{detail:U}))}}function q(k){try{const Q=n.getItem(z.value);if(k==null)R(Q,null),n.removeItem(z.value);else{const U=_.write(k);Q!==U&&(n.setItem(z.value,U),R(Q,U))}}catch(Q){p(Q)}}function W(k){const Q=k?k.newValue:n.getItem(z.value);if(Q==null)return a&&E!=null&&n.setItem(z.value,_.write(E)),E;if(!k&&u){const U=_.read(Q);return typeof u=="function"?u(U,E):T==="object"&&!Array.isArray(U)?{...E,...U}:U}else return typeof Q!="string"?Q:_.read(Q)}function M(k){if(!(k&&k.storageArea!==n)){if(k&&k.key==null){w.value=E;return}if(!(k&&k.key!==z.value)){g();try{const Q=_.write(w.value);(k===void 0||(k==null?void 0:k.newValue)!==Q)&&(w.value=W(k))}catch(Q){p(Q)}finally{k?xt(m):m()}}}}function Z(k){M(k.detail)}return w}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 Bl(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 y=p.getBoundingClientRect();s.value=y.width,l.value=y.height}}else if(f){const p=Qn(f);s.value=p.reduce((y,{inlineSize:w})=>y+w,0),l.value=p.reduce((y,{blockSize:w})=>y+w,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(()=>Qn(pt(e)).map(Ot).filter($d));let c=Cn;const d=ft(l),f=a.value?de(()=>[u.value,Ot(o),d.value],([y,w])=>{if(c(),!d.value||!y.length)return;const z=new IntersectionObserver(t,{root:Ot(w),rootMargin:i,threshold:r});y.forEach(E=>E&&z.observe(E)),c=()=>{z.disconnect(),c=Cn}},{immediate:l,flush:"post"}):Cn,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 eo{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=[]}}Me(eo,"handlers",[]);function Gi(e){je(()=>eo.register(e)),Pt(()=>eo.unregister(e))}const Nl=he({__name:"HelpScreen",props:{touchDevice:{type:Boolean}},emits:["hide"],setup(e,{emit:t}){const n=e,o=t,i=ee(null),r=ee([]);Gi(()=>(o("hide"),!0)),je(async()=>{const u=Bl(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 w=50,z=25;u.forEach(m=>{var q;const D=(q=m.getAttribute("title"))==null?void 0:q.trim(),H=m.getBoundingClientRect();if(!D||!H.height||!H.width)return;const Y=Math.ceil((H.top-10)/w),R=Math.ceil((H.left-10)/w);f.push({isTour:!1,title:D,rect:H,fromX:R,toX:Math.max(R+1,Math.ceil((H.right+10)/w)),fromY:Y,toY:Math.max(Y+1,Math.ceil((H.bottom+10)/w))})}),f.forEach(m=>{for(let D=m.fromY;D<m.toY;D++){d[D]??(d[D]=[]);for(let H=m.fromX;H<m.toX;H++)d[D][H]=m;m.toY>p+1&&(p=m.toY-1),m.toX>y+1&&(y=m.toX-1)}});let E=y/2;f.forEach(m=>{m.isAlignRight=m.fromX>E});const T=(m,D)=>{d[D]??(d[D]=[]);const H=D>=m.toY;if(m.isTour)for(let Y=m.fromX;Y<m.toX;Y++)delete d[m.fromY][Y],m.fromY=D,m.toY=D+(H?1:-1),d[D][Y]=m;else{const Y=m.isAlignRight?m.fromX-3:m.fromX,R=Y+3;m.helpItem={fromX:Y,toX:R,fromY:D,toY:D+1,isTour:!0,isAlignRight:m.isAlignRight};for(let q=Y;q<R;q++)d[D][q]=m.helpItem}},_=(m,D)=>{if(D>p||D<0)return!1;const H=D>=m.toY,Y=d[D];if(!Y)return T(m,D),!0;const R=Y[m.fromX];if(R&&!R.isTour)return!1;if(R&&R.isTour)return _(R,H?D+1:D-1)?(T(m,D),!0):!1;if(!R){const q=m.isAlignRight?-1:1;return Y[m.fromX+q]||Y[m.fromX+q*2]?_(m,H?D+1:D-1):(T(m,D),!0)}return!1};f.forEach(m=>{if(!_(m,m.toY)){if(m.isAlignRight){const D=d[m.fromY]??[];if(!D.slice(m.fromX-3,m.fromX).filter(Boolean).length){const Y=m.fromX-3,R=m.fromX;m.helpItem={isTour:!0,isAlignRight:!0,fromX:Y,toX:R,fromY:m.fromY,toY:m.toY};for(let q=m.fromX-3;q<m.fromX;q++)D[q]=m.helpItem;return}}_(m,m.fromY-1)}});const g=[];return f.forEach(m=>{const{title:D,helpItem:H,rect:Y,isAlignRight:R,fromX:q,fromY:W,toY:M}=m;if(!D||!H||!Y)return;const Z=H.fromY>=M,k=H.toY<=W;g.push({title:a(D),style:{top:Z?`${Y.bottom+(H.fromY-M)*w+z}px`:k?void 0:`${Y.top+8}px`,bottom:k?`${c.height-Y.top+(H.toY-W)*w+z}px`:void 0,left:R?void 0:`${Y.left}px`,right:R?Z?`${c.width-Y.right}px`:`${c.width-Y.right+Y.width+z}px`:void 0},arrowStyle:{width:k||Z?"2px":`${Math.abs(H.toX-q)*w+z-5}px`,height:k||Z?`${(Z?H.fromY-M:W-H.toY)*w+z}px`:"2px",top:Z?`${Y.bottom}px`:k?void 0:`${Y.top+20}px`,bottom:k?`${c.height-Y.top}px`:void 0,left:R?void 0:`${Y.left+Y.width/2}px`,right:R?Z?`${c.width-Y.right+Y.width/2}px`:`${c.width-Y.right+Y.width}px`:void 0}})}),g}function a(u){return n.touchDevice?u.split("(")[0].trim():u}return(u,c)=>(b(),$(be,null,[c[1]||(c[1]=K("div",{class:"fixed inset-0 bg-black bg-opacity-90"},null,-1)),K("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),$(be,null,Xt(r.value,d=>(b(),$(be,{key:d.title},[K("div",{class:"absolute",style:ke(d.style)},Fe(d.title),5),K("div",{class:"absolute bg-stone-300 rounded-lg",style:ke(d.arrowStyle)},null,4)],64))),128))],512)],64))}}),of=Object.freeze(Object.defineProperty({__proto__:null,default:Nl},Symbol.toStringTag,{value:"Module"}));function Tn(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=ee(null),i=ee(0),r=ee([]),s=J(()=>r.value[i.value]),l=Tn(a,500);je(()=>{const d=Bl(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 w=p.top<d.height-p.bottom,z=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:z?`${p.left-12}px`:void 0,right:z?void 0:`${d.width-p.left}px`,top:w?`${p.bottom+12}px`:`${p.top+20}px`,textAlign:w?void 0:"right",transform:w?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 E;const w=(E=y.getAttribute("data-tour"))==null?void 0:E.trim();if(!(w!=null&&w.length))return;const z=y.getBoundingClientRect();f.push({rect:z,text:w})}),f}return(d,f)=>{var p,y;return b(),$(be,null,[K("div",{class:ue(["fixed inset-0 bg-black bg-opacity-50 duration-500",{"opacity-0":!s.value,"opacity-100":!!s.value}])},null,2),K("div",{ref_key:"root",ref:o,class:"tour",onClick:f[0]||(f[0]=Be((...w)=>X(l)&&X(l)(...w),["stop"]))},[s.value?(b(),$("div",{key:i.value,class:"tour__target",style:ke(s.value.style)},null,4)):le("",!0),(b(),$("div",{key:i.value,class:"tour__text",style:ke((p=s.value)==null?void 0:p.textStyle)},Fe(((y=s.value)==null?void 0:y.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}}",ve=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n},Vl=ve(rf,[["styles",[sf]]]),lf=Object.freeze(Object.defineProperty({__proto__:null,default:Vl},Symbol.toStringTag,{value:"Module"}));function af({touchDevice:e}){const t=ee(!1);let n=0;return Hn("busy:touchDevice",e),Hn("setBusyState",o=>{n+=o?1:-1;const i=n>0;t.value!=i&&(t.value=i)}),J(()=>t.value)}function Zo(){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){Hn("hapticFeedback",e)}function Yo(){return Ft("hapticFeedback")}class uf{constructor(){Me(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()),Hn("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=ee(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=Zo(),r=Yo();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(_s(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:ne(()=>[K("div",gf,[_e(c.$slots,"default")])]),_:3},16,["class"])),[[X(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(),$("svg",bf,[...t[0]||(t[0]=[K("path",{fill:"currentColor",d:"M19 12.998h-6v6h-2v-6H5v-2h6v-6h2v6h6z"},null,-1)])])}const Rl=ve(vf,[["render",yf]]),wf=Object.freeze(Object.defineProperty({__proto__:null,default:Rl},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=ve(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=ee(null),r=ee(!1),s=ee(n.seconds),l=ee(n.seconds<=0),a=ee(n.seconds),u=Yo();je(()=>{let f;tf(i,p=>{const y=p.some(w=>w.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)=>(b(),$("div",xf,[K("div",{ref_key:"main",ref:i,class:"inline-flex text-base text-stone-300 select-none"},[j(Xn,{"enter-from-class":"opacity-0","leave-to-class":"opacity-0"},{default:ne(()=>[r.value?(b(),$("div",_f,[e.hasNext?(b(),$("div",Sf,[r.value?(b(),$("div",{key:0,class:"absolute left-0 top-0 bottom-0 h-full bg-stone-600 bg-opacity-50",style:ke(l.value?{}:{animation:`auto-next ${a.value}s linear forwards`})},null,4)):le("",!0),Re((b(),$("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((b(),$("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?(b(),$("div",kf,[j(Ji,{class:"bg-primary w-min !h-9 !bg-opacity-100",onClick:p[0]||(p[0]=()=>o("add-to-library"))},{default:ne(()=>[K("div",Cf,[j(Rl,{class:"flex-shrink-0 w-auto"}),p[1]||(p[1]=K("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:ne(()=>[_e(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(),$("svg",Ef,[...t[0]||(t[0]=[K("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 Hl=ve(Pf,[["render",If]]),Of=Object.freeze(Object.defineProperty({__proto__:null,default:Hl},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)===X(Kt).novel?"novel":"manga"}`,transparent:e.transparent,"enable-haptic-feedback":"",onClick:i},{default:ne(()=>[j(Hl)]),_: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(),$("svg",Df,[...t[0]||(t[0]=[K("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 Fl=ve(zf,[["render",Af]]),Lf=Object.freeze(Object.defineProperty({__proto__:null,default:Fl},Symbol.toStringTag,{value:"Module"})),jf={},Bf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Nf(e,t){return b(),$("svg",Bf,[...t[0]||(t[0]=[K("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 Wl=ve(jf,[["render",Nf]]),Vf=Object.freeze(Object.defineProperty({__proto__:null,default:Wl},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:ne(()=>[e.entryId?(b(),ie(Fl,{key:0})):(b(),ie(Wl,{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(),$("svg",Ff,[...t[0]||(t[0]=[K("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 Ul=ve(Hf,[["render",Wf]]),Uf=Object.freeze(Object.defineProperty({__proto__:null,default:Ul},Symbol.toStringTag,{value:"Module"})),Xo=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:ne(()=>[j(Ul)]),_:1},8,["class","transparent"]))}}),qf=Object.freeze(Object.defineProperty({__proto__:null,default:Xo},Symbol.toStringTag,{value:"Module"})),Kf={},Zf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function Yf(e,t){return b(),$("svg",Zf,[...t[0]||(t[0]=[K("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),K("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=ve(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(),$("svg",Jf,[...t[0]||(t[0]=[K("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=ve(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:ne(()=>[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(),$("svg",op,[...t[0]||(t[0]=[K("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[K("circle",{cx:"14",cy:"14",r:"12"}),K("path",{d:"m23 23l7 7M9 12V9h3m4 0h3v3M9 16v3h3m7-3v3h-3"})],-1)])])}const ql=ve(np,[["render",ip]]),rp=Object.freeze(Object.defineProperty({__proto__:null,default:ql},Symbol.toStringTag,{value:"Module"})),sp={class:"block w-4 h-4"},lp={class:"w-12"},Kl=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(),$("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"])},[K("div",sp,[j(ql)]),K("div",lp,Fe(Math.ceil(e.zoom*100))+"%",1)]))}}),ap=Object.freeze(Object.defineProperty({__proto__:null,default:Kl},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(),$("svg",up,[...t[0]||(t[0]=[K("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),K("path",{fill:"none",d:"M0 0h36v36H0z"},null,-1)])])}const Zl=ve(cp,[["render",dp]]),fp=Object.freeze(Object.defineProperty({__proto__:null,default:Zl},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:ne(()=>[j(Zl)]),_: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(),$("svg",gp,[...t[0]||(t[0]=[K("path",{fill:"currentColor",d:"M4 4h6v2H6v4H4V4Zm10 0h6v6h-2V6h-4V4ZM6 14v4h4v2H4v-6h2Zm14 0v6h-6v-2h4v-4h2Z"},null,-1)])])}const Yl=ve(hp,[["render",mp]]),vp=Object.freeze(Object.defineProperty({__proto__:null,default:Yl},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(),$("svg",yp,[...t[0]||(t[0]=[K("path",{fill:"currentColor",d:"M14 20v-6h6v2h-4v4h-2Zm-6 0v-4H4v-2h6v6H8Zm12-10h-6V4h2v4h4v2Zm-10 0H4V8h4V4h2v6Z"},null,-1)])])}const Xl=ve(bp,[["render",wp]]),xp=Object.freeze(Object.defineProperty({__proto__:null,default:Xl},Symbol.toStringTag,{value:"Module"})),sr=he({__name:"ButtonWebFullScreen",props:{transparent:{type:Boolean}},emits:["request-full-screen"],setup(e,{emit:t}){const n=t,o=ee(!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:ne(()=>[o.value?(b(),ie(Xl,{key:0})):(b(),ie(Yl,{key:1}))]),_:1},8,["transparent","title"]))}}),_p=Object.freeze(Object.defineProperty({__proto__:null,default:sr},Symbol.toStringTag,{value:"Module"})),Sp=["aria-hidden"],kp=["onClick"],Gl=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=ee(null),s=ee(!1),l=ee(!1),a=ee(!1),u=ee(!1),c={mounted:g=>{var m;i.value&&((m=g.children[i.value])==null||m.scrollIntoView({behavior:"auto",block:"center",inline:"center"}))}};$t({onKeyDown:z}),Gi(()=>{const g=s.value;return g&&(s.value=!1),g});const d=Zo(),f=Yo();async function p(g){s.value=g??!s.value,d(s.value),s.value?(y(),T(r.value)):setTimeout(_,250)}function y(){const g=r.value;if(g){const m=g.getBoundingClientRect(),D=m.x+m.width/2;l.value=m.y>window.innerHeight/2,a.value=D<window.innerWidth/3,u.value=D>window.innerWidth/3*2}}function w(g,m){p(),g!=i.value&&(i.value=g,o("select",g,m),n.enableHapticFeedback&&f())}function z(g){s.value&&g.key==="Escape"&&(p(),g.preventDefault())}let E=[];function T(g){const m=window.getComputedStyle(g).zIndex,D=g.style.zIndex;(!m||!(+m>0))&&((!g.parentElement||g.parentElement.childElementCount>1)&&(g.style.zIndex="1",E.push({el:g,zIndex:D})),g.parentElement&&T(g.parentElement))}function _(){E.forEach(({el:g,zIndex:m})=>{g.style.zIndex=m??""}),E=[]}return(g,m)=>(b(),$("div",{ref_key:"root",ref:r,class:"select-none relative inline-flex"},[s.value?(b(),$("div",{key:0,class:"fixed inset-0 bg-transparent",onClick:m[0]||(m[0]=()=>p())})):le("",!0),e.items.length?(b(),ie(Xn,{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:ne(()=>[s.value?Re((b(),$("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:m[1]||(m[1]=Be(()=>{},["stop"])),onTouchmove:m[2]||(m[2]=Be(()=>{},["stop"]))},[(b(!0),$(be,null,Xt(e.items,(D,H)=>Re((b(),$("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:Y=>w(H,Y)},[K("div",{class:ue(["h-full py-2",{"border-t-[1px] border-solid border-stone-400 border-opacity-30":H>0}])},[_e(g.$slots,"item",{item:D},()=>[Wt(Fe(D),1)])],2)],10,kp)),[[X(zt),30]])),128))],42,Sp)),[[c]]):le("",!0)]),_:3})):le("",!0),_e(g.$slots,"default",{toggle:p,isOpen:s.value,isAlignTop:l.value})],512))}}),Cp=Object.freeze(Object.defineProperty({__proto__:null,default:Gl},Symbol.toStringTag,{value:"Module"})),Tp={},Mp={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Pp(e,t){return b(),$("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 Jl=ve(Tp,[["render",Pp]]),Ep=Object.freeze(Object.defineProperty({__proto__:null,default:Jl},Symbol.toStringTag,{value:"Module"})),Ip={},Op={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function $p(e,t){return b(),$("svg",Op,[...t[0]||(t[0]=[K("path",{fill:"currentColor",d:"m7 10l5 5l5-5z"},null,-1)])])}const Ql=ve(Ip,[["render",$p]]),zp=Object.freeze(Object.defineProperty({__proto__:null,default:Ql},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=ee(!1),s=Zo();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(Gl,{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,w)=>o("select",y,w))},Ii({default:ne(({toggle:y,isOpen:w,isAlignTop:z})=>[Re((b(),$("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(w,y),["stop"]),onMouseenter:c,onMouseleave:d}),[K("div",Ap,[K("span",Lp,Fe(e.label),1),e.items.length||e.canLoadItems?(b(),$("span",{key:0,class:ue(["w-4 h-4 flex ml-1 -mr-3 flex-shrink-0",{"rotate-180":z}]),"aria-hidden":"true"},[r.value?(b(),ie(Jl,{key:0})):(b(),ie(Ql,{key:1}))],2)):le("",!0)])],16,Dp)),[[X(zt),30]])]),_:2},[f.$slots.item?{name:"item",fn:ne(({item:y})=>[_e(f.$slots,"item",{item:y})]),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(),$("svg",Np,[...t[0]||(t[0]=[K("path",{fill:"currentColor",d:"M15.41 7.41L14 6l-6 6l6 6l1.41-1.41L10.83 12z"},null,-1)])])}const ea=ve(Bp,[["render",Vp]]),Rp=Object.freeze(Object.defineProperty({__proto__:null,default:ea},Symbol.toStringTag,{value:"Module"})),Hp={},Fp={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Wp(e,t){return b(),$("svg",Fp,[...t[0]||(t[0]=[K("path",{fill:"currentColor",d:"M10 6L8.59 7.41L13.17 12l-4.58 4.59L10 18l6-6z"},null,-1)])])}const ta=ve(Hp,[["render",Wp]]),Up=Object.freeze(Object.defineProperty({__proto__:null,default:ta},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||!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,y;(y=(p=(f=n.data)==null?void 0:f.chapters)==null?void 0:p[c])==null||y.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(),$(be,null,[j(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:ne(({item:p})=>[Wt(Fe(p.label),1)]),_:1},8,["modelValue","label","transparent","items","can-load-items"]),e.data.next||e.data.prev?(b(),$("div",qp,[j(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:ne(()=>[j(ea)]),_:1},8,["title","disabled","transparent"]),j(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:ne(()=>[j(ta)]),_: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=ve(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(),$("div",{class:"flex items-center gap-3 pl-1",style:ke({"--percentage":`${(n.value-e.min)/(e.max-e.min)*100}%`})},[Re(K("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]]),K("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"],mt=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(),$("div",Gp,[(b(!0),$(be,null,Xt(t.items,(s,l)=>Re((b(),$("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:[Uo(()=>o(l),["enter"]),Uo(()=>o(l),["space"])]},[Wt(Fe(s),1)],42,Jp)),[[X(zt),30]])),128))],512))}}),Qp=Object.freeze(Object.defineProperty({__proto__:null,default:mt},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=ve(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(),$("label",eh,[K("span",th,Fe(e.label),1),K("div",nh,[Re(K("input",{"onUpdate:modelValue":o[0]||(o[0]=i=>t.value=i),type:"checkbox"},null,512),[[wd,t.value]]),o[1]||(o[1]=K("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(),$(be,null,[K("div",{class:ue(["flex-shrink-0 mb-2 whitespace-nowrap text-sm",{"opacity-50":e.disabled}])},Fe(e.label),3),K("div",ih,[_e(t.$slots,"default")])],64))}}),rh=Object.freeze(Object.defineProperty({__proto__:null,default:Le},Symbol.toStringTag,{value:"Module"})),na=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:ne(()=>[j(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:na},Symbol.toStringTag,{value:"Module"})),lh={},ah={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function ch(e,t){return b(),$("svg",ah,[...t[0]||(t[0]=[K("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 oa=ve(lh,[["render",ch]]),uh=Object.freeze(Object.defineProperty({__proto__:null,default:oa},Symbol.toStringTag,{value:"Module"})),dh={},fh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function ph(e,t){return b(),$("svg",fh,[...t[0]||(t[0]=[K("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 ia=ve(dh,[["render",ph]]),hh=Object.freeze(Object.defineProperty({__proto__:null,default:ia},Symbol.toStringTag,{value:"Module"})),ur=he({inheritAttrs:!1,__name:"ButtonOutline",emits:["click"],setup(e,{emit:t}){const n=t,o=Yo();function i(){o(),n("click")}return(r,s)=>Re((b(),$("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},[_e(r.$slots,"default")],2)),[[X(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 Go=[{name:"System",value:"system-ui, sans-serif"},{name:"Charter",value:'Charter, "Times New Roman", serif'},{name:"Georgia",value:"Georgia, serif"}],ra=he({__name:"FieldFontFamily",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=lt(e,"modelValue"),n=J({get(){const o=Go.findIndex(i=>i.value===t.value);return o===-1?0:o},set(o){t.value=Go[o].value}});return(o,i)=>(b(),ie(Le,{label:"Font family"},{default:ne(()=>[j(mt,{modelValue:n.value,"onUpdate:modelValue":i[0]||(i[0]=r=>n.value=r),items:X(Go).map(r=>r.name)},null,8,["modelValue","items"])]),_:1}))}}),mh=Object.freeze(Object.defineProperty({__proto__:null,default:ra},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 sa(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 Jo=.25,Qo=5,dr=.25,ei=.2,ti=5,yh=.05,wh=0,xh=5;function _h(e){var m,D,H,Y,R,q;const n=e.touchDevice&&(window.innerHeight<=600||window.innerWidth<=600)?bh():void 0,{titleName:o,isWebtoon:i}=e,r=o?sa(o):location.hostname,s=ee(Sh(`tkr:${r}`)),l=W=>{s.value=W;const M=`tkr:${r}`;!W||!Object.keys(W).length?localStorage.removeItem(M):localStorage.setItem(M,JSON.stringify(W))},a=W=>{if(!s.value){l(W);return}const M={...s.value};Object.entries(W).forEach(([Z,k])=>{k===void 0?delete M[Z]:M[Z]=k}),l(M)},u=ee((m=s.value)==null?void 0:m.style),c=ee((D=s.value)==null?void 0:D.direction),d=ee((H=s.value)==null?void 0:H.gap),f=ee((Y=s.value)==null?void 0:Y.speed),p=ee((R=s.value)==null?void 0:R.zoom),y=ee(((q=s.value)==null?void 0:q.breakFirst)??!1),w=J({get(){if(i.value)return Dt.longStrip;if(u.value!==void 0)return u.value;const{landscapeStyle:W,readerStyle:M}=e.defaultPreferences.value;return n!=null&&n.value?W??M:M},set:W=>{if(u.value===W)return;const M=w.value===Dt.longStrip,Z=W===Dt.longStrip;u.value=W,a({style:W}),M!==Z&&(z.value=Z?nt.vertical:nt.rtl)}}),z=J({get(){if(i.value)return nt.vertical;if(c.value!==void 0)return c.value;const{direction:W,landscapeDirection:M}=e.defaultPreferences.value;return n!=null&&n.value?M??W:W},set:W=>{c.value=W,a({direction:W})}}),E=J({get:()=>d.value??e.defaultPreferences.value.gap,set(W){d.value=W,a({gap:W})}}),T=J({get:()=>f.value??e.defaultPreferences.value.speed,set(W){f.value=W,a({speed:W===1?void 0:W})}}),_=J({get:()=>p.value??1,set(W){p.value=W,a({zoom:W===1?void 0:W})}}),g=J({get:()=>y.value,set(W){y.value=W,a({breakFirst:W?!0:void 0})}});return{direction:z,style:w,gap:E,speed:T,zoom:_,isLongStrip:J(()=>w.value===Dt.longStrip),isDouble:J(()=>w.value===Dt.double),isRTL:J(()=>z.value===nt.rtl),isVertical:J(()=>z.value===nt.vertical),breakFirst:g}}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>=Jo&&n.speed<=Qo&&(o.speed=n.speed),n.zoom!==void 0&&n.zoom>=ei&&n.zoom<=ti&&(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(),$(be,null,[j(ra,{"model-value":i.value.fontFamily,"onUpdate:modelValue":a[0]||(a[0]=u=>s({fontFamily:u}))},null,8,["model-value"]),j(Le,{label:"Text size"},{default:ne(()=>[j(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}),j(Le,{label:"Line height"},{default:ne(()=>[j(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}),j(Le,{label:"Play speed"},{default:ne(()=>[j(tn,{"model-value":i.value.speed,min:X(Jo),max:X(Qo),step:X(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(),$("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}])},[j(ur,{class:"w-2/3",onClick:a[4]||(a[4]=()=>o("reset"))},{default:ne(()=>[...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=ee(!1),i=ee(!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(),$(be,null,[e.isNovel?(b(),$(be,{key:0},[j(fr,{modelValue:n.value,"onUpdate:modelValue":a[0]||(a[0]=u=>n.value=u)},null,8,["modelValue"]),j(na,{"model-value":n.value.contrast,"onUpdate:modelValue":a[1]||(a[1]=u=>s({contrast:u}))},null,8,["model-value"])],64)):(b(),$(be,{key:1},[j(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(),$("hr",Ch)):le("",!0),o.value?(b(),$("div",Th,[K("div",Mh,[Re((b(),$("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)},[j(ia)],2)),[[X(zt),24]]),Re((b(),$("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)},[j(oa)],2)),[[X(zt),24]])])])):le("",!0),j(Le,{label:"Style"},{default:ne(()=>[j(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}),j(Le,{label:"Direction"},{default:ne(()=>[j(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?(b(),$("hr",Ph)):le("",!0),j(Le,{label:"Gap size"},{default:ne(()=>[j(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)),j(Le,{label:"Progress size"},{default:ne(()=>[j(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}),j(Le,{label:"Auto next"},{default:ne(()=>[j(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}),j(Le,{label:"Hide controls"},{default:ne(()=>[j(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):(b(),$(be,{key:2},[j(Le,{label:"Play speed"},{default:ne(()=>[j(tn,{"model-value":n.value.speed,min:X(Jo),max:X(Qo),step:X(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}),j(Le,{label:e.touchDevice?"Tap zones":"Click zones"},{default:ne(()=>[j(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))}}),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(),$("svg",Oh,[...t[0]||(t[0]=[K("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 to=ve(Ih,[["render",$h]]),zh=Object.freeze(Object.defineProperty({__proto__:null,default:to},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 la={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]}},aa=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}=la[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)=>(b(),$("div",{class:ue(["p-2 bg-black bg-opacity-40 rounded-2xl",{"w-28":r.value,"h-28":!r.value}]),style:ke({"aspect-ratio":i.value})},[e.tapZone===X(hr).none?(b(),$("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(nt).vertical,"rotate-180":e.direction===X(nt).rtl}])},[j(to)],2)):a.value?(b(),$("div",{key:2,class:ue(["w-full h-full overflow-hidden rounded-xl flex flex-wrap",{"flex-row-reverse":l.value}])},[(b(!0),$(be,null,Xt(a.value,(d,f)=>(b(),$("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(),$("span",{key:0,class:"w-5 h-5 max-w-full max-h-full inline-block transform text-stone-800",style:ke({transform:`rotate(${s.value?d.isNext?90:-90:(l.value?d.isPrev:d.isNext)?0:180}deg)`})},[j(to)],4)):le("",!0)],2))),128))],2)):(b(),$("div",{key:1,class:ue(["w-full h-full overflow-hidden rounded-xl flex flex-nowrap",{"flex-col":s.value}])},[K("div",{class:ue(["flex-grow w-full h-full flex justify-center items-center bg-stone-100",{"bg-opacity-50":!l.value}])},[K("span",{class:ue(["w-5 h-5 inline-block transform text-stone-800",{"-rotate-90":s.value,"rotate-180":!s.value}])},[j(to)],2)],2),c[0]||(c[0]=K("div",{class:"flex-grow w-full h-full"},null,-1)),c[1]||(c[1]=K("div",{class:"flex-grow w-full h-full"},null,-1)),K("div",{class:ue(["flex-grow w-full h-full flex justify-center items-center bg-stone-100",{"bg-opacity-50":l.value}])},[K("span",{class:ue(["w-5 h-5 inline-block text-stone-800",{"transform rotate-90":s.value}])},[j(to)],2)],2)],2))],6))}}),Dh=Object.freeze(Object.defineProperty({__proto__:null,default:aa},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"},ca=he({__name:"DirectionToast",props:{direction:{type:Number},tapZone:{type:Number}},setup(e){const t=e,n=sessionStorage.getItem("tk:dir"),o=ee(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(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(Xn,{"enter-from-class":"opacity-0","leave-to-class":"opacity-0"},{default:ne(()=>[o.value?(b(),$("div",Ah,[j(aa,{direction:e.direction,"tap-zone":e.tapZone},null,8,["direction","tap-zone"])])):le("",!0)]),_:1}))}}),Lh=Object.freeze(Object.defineProperty({__proto__:null,default:ca},Symbol.toStringTag,{value:"Module"})),jh={class:"flex justify-between items-end"},Bh={class:"fixed pointer-events-none left-0 right-0 bottom-0"},ua=he({__name:"GearControlsLayout",props:{visible:{type:Boolean},spaceTop:{type:null}},setup(e){return(t,n)=>(b(),$("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}])},[_e(t.$slots,"default"),K("div",{class:ue(["flex gap-1 items-center relative z-30 flex-shrink-0 2xs:gap-3",{"children-pointer-events-auto":e.visible}]),style:ke({paddingTop:`${e.spaceTop||0}px`})},[_e(t.$slots,"top")],6),K("div",jh,[K("div",{class:ue(["inline-block",{"children-pointer-events-auto":e.visible}])},[_e(t.$slots,"bottom-left")],2),K("div",{class:ue(["inline-flex flex-col items-end gap-4",{"children-pointer-events-auto":e.visible}])},[_e(t.$slots,"bottom-right")],2)]),K("div",Bh,[_e(t.$slots,"progress")])],2))}}),Nh=Object.freeze(Object.defineProperty({__proto__:null,default:ua},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(),$("div",Hh)}const ni=ve(Rh,[["render",Fh],["styles",[Vh]]]),Wh=Object.freeze(Object.defineProperty({__proto__:null,default:ni},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=ve(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=ee(null);return t({rootEl:o}),(i,r)=>Re((b(),$("dialog",Uh,[K("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:ke(e.style??{})},[e.loading&&e.immediate?(b(),$("div",qh,[j(ni)])):le("",!0),_e(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(),$("svg",Yh,[...t[0]||(t[0]=[K("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 da=ve(Zh,[["render",Xh]]),Gh=Object.freeze(Object.defineProperty({__proto__:null,default:da},Symbol.toStringTag,{value:"Module"})),Jh={},Qh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function eg(e,t){return b(),$("svg",Qh,[...t[0]||(t[0]=[K("g",{fill:"none"},[K("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"}),K("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 fa=ve(Jh,[["render",eg]]),tg=Object.freeze(Object.defineProperty({__proto__:null,default:fa},Symbol.toStringTag,{value:"Module"})),ng={key:1,class:"h-5"},pa=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(),$(be,null,[j(Le,{label:"Style"},{default:ne(()=>[j(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}),j(Le,{label:"Direction"},{default:ne(()=>[j(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}),j(Le,{label:"Gap size"},{default:ne(()=>[j(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}),j(Le,{label:"Play speed"},{default:ne(()=>[j(tn,{"model-value":e.speed,min:X(Jo),max:X(Qo),step:X(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}),j(Le,{label:"Zoom"},{default:ne(()=>[j(tn,{"model-value":Math.ceil(e.zoom*100),min:X(ei)*100,max:X(ti)*100,step:X(yh)*100,format:c=>`${Math.ceil(c)}%`,"onUpdate:modelValue":s},null,8,["model-value","min","max","step","format"])]),_:1}),e.enableReset?(b(),$("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}])},[j(ur,{class:"w-2/3",onClick:l},{default:ne(()=>[...u[4]||(u[4]=[Wt(" Reset to default ",-1)])]),_:1})],2)):(b(),$("div",ng))],64))}}),og=Object.freeze(Object.defineProperty({__proto__:null,default:pa},Symbol.toStringTag,{value:"Module"})),ha=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:ha},Symbol.toStringTag,{value:"Module"})),mr=ve(he({__name:"PauseToast",props:{playing:{type:Boolean}},setup(e){const t=e,n=ee(0);return de(()=>t.playing,()=>{n.value=Date.now()}),(o,i)=>n.value?(b(),$("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=ve(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(),$("div",{class:ue(["rprog",{"rprog--rtl":e.rtl}]),style:ke({height:o.value,opacity:e.opacity??.8})},[r.value?(b(!0),$(be,{key:0},Xt(e.total,a=>(b(),$("span",{key:a,class:ue(["rprog__item",{"rprog__item--active":n.value===a}]),style:ke(!e.longStrip||n.value!==a?{}:{"--portion":`${e.value%1*100}%`})},null,6))),128)):(b(),$("div",{key:1,style:ke({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"})),ga=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=ee(null),s=ee(Math.min(ti,Math.max(ei,o.zoom))),l=ee(!1),a=ee(!1),u={isZoomIn:!1,isZoomOut:!1,initial:void 0};t({rootEl:r}),de(()=>o.zoom,x=>U(x)),je(()=>{o.touchDevice?St(r,"touchstart",E):(St(r,"mousedown",p),St(window,"wheel",H))}),$t({onKeyDown:x=>{var S;if(!o.busy&&((S=r.value)==null||S.focus(),!(x.key==="Meta"||x.key==="Control")&&(x.ctrlKey||x.metaKey)))switch(x.key){case"0":U(1);break;case"-":U(s.value-.2),x.preventDefault();break;case"=":case"+":U(s.value+.2),x.preventDefault();break}},onKeyUp:x=>{o.zooming&&!(x.ctrlKey||x.metaKey)&&Z()}});function c(x){a.value!==x&&(a.value=x,x?o.playController.pause():(i("dragEnd"),o.playController.resume()))}let d={x:0,y:0},f={x:0,y:0};function p(x){if(x.button!==0)return;const S=r.value;S&&(d={x:x.clientX,y:x.clientY},f={x:S.scrollLeft,y:S.scrollTop},window.addEventListener("mousemove",y),window.addEventListener("mouseup",()=>{window.removeEventListener("mousemove",y),setTimeout(()=>c(!1))},{once:!0}),x.preventDefault(),x.stopPropagation())}function y(x){const S=x.clientX-d.x,O=x.clientY-d.y;if(!a.value&&Math.abs(S)<.5&&Math.abs(O)<.5)return;c(!0);const A=r.value;A&&(A.scrollLeft=f.x-S,A.scrollTop=f.y-O)}let w={distance:0,zoom:s.value,x:0,y:0},z=!1;function E(x){o.busy||(z=o.pinchToZoome&&x.touches.length===2,z&&(i("update:zooming",!0),c(!0),x.stopPropagation(),x.preventDefault(),w={distance:Y(x),zoom:s.value,x:(x.touches[0].clientX+x.touches[1].clientX)/2,y:(x.touches[0].clientY+x.touches[1].clientY)/2}),(z||o.longStrip&&o.playController.isPlaying.value)&&window.addEventListener("touchend",T,{once:!0}))}function T(){var A;if(z=!1,o.zooming){c(!1),Z();return}if(!a.value)return;const x=gt(()=>{var ae;c(!1),(ae=r.value)==null||ae.removeEventListener("scroll",O)},200),S=setTimeout(x,200);(A=r.value)==null||A.addEventListener("scroll",O);function O(){clearTimeout(S),x()}}function _(x){if(!z&&!(o.longStrip&&o.playController.isPlaying.value)||(c(!0),!o.zooming)||(x.stopPropagation(),x.preventDefault(),x.touches.length<2))return;const O=Y(x)/w.distance;Q(Math.ceil(O*w.zoom*100)/100,w)}const g=gt(()=>l.value=!1,100);let m=!1;const D=gt(()=>{m=!1},30);function H(x){if(o.busy)return;let S=o.zooming;if(m||(m=!0,S=x.ctrlKey||x.metaKey,S&&i("update:zooming",!0)),D(),S){x.stopPropagation(),x.preventDefault();const O=Math.ceil((s.value+x.deltaY*-.01)*100)/100;Q(O,{x:x.clientX,y:x.clientY});return}o.horizontal&&(l.value||(l.value=!0),g(),x.deltaY&&(r.value&&(r.value.scrollLeft+=x.deltaY*(o.rtl?-1:1)),x.stopPropagation()))}function Y(x){return Math.hypot(x.touches[0].clientX-x.touches[1].clientX,x.touches[0].clientY-x.touches[1].clientY)}const R={x:0,y:0,ts:0};function q(x){if(a.value||o.zooming)return;const S=r.value;if(!S||W(S,x)||(i("click"),o.playController.isPlaying.value))return;const{clientX:O,clientY:A}=x,{x:ae,y:oe,ts:ge}=R;R.x=O,R.y=A,R.ts=new Date().getTime();const pe=R.ts-ge;pe>250||pe<10||Math.abs(ae-O)>40||Math.abs(oe-A)>40||(R.ts=0,R.x=0,R.y=0,M(O,A))}function W(x,S){if(o.playController.isPlaying.value)return!1;const O=o.tapZone;if(O===hr.none)return!1;const A=o.controlsVisible?o.spaceTop:0,ae=x.clientHeight-A,oe=Math.max(0,S.clientY-A),ge=o.horizontal?x.clientWidth:ae;let pe=!1,ye=!1;if(O){const{prevZones:Ee,nextZones:Ae}=la[o.tapZone],ct=Math.floor(oe/ae*3);let Qe=Math.floor(S.clientX/x.clientWidth*3);o.rtl&&(Qe=2-Qe);const De=ct*3+Qe;pe=Ee.includes(De),ye=!pe&&Ae.includes(De)}else{const Ae=(o.horizontal?o.rtl?ge-S.clientX:S.clientX:oe)/ge,ct=o.horizontal?.2:.15;pe=Ae<=ct&&o.pageIndex>0,ye=!pe&&Ae>=1-ct}if(!pe&&!ye)return!1;if(o.longStrip){const Ee=(pe?-1:1)*.75*ge;o.horizontal?x.scrollLeft=x.scrollLeft+(o.rtl?-1:1)*Ee:x.scrollTop=Math.max(0,x.scrollTop+Ee)}else pe?i("prev"):ye&&i("next");return!0}async function M(x,S){const O=s.value===1?2:1;await U(O,{x,y:S}),Z()}function Z(){i("update:zooming",!1),u.initial=void 0,u.isZoomIn=!1,u.isZoomOut=!1}function k(){if(u.initial)return;const x=r.value;if(!x)return;const S=x.querySelector(`[data-index="${o.pageIndex}"],[data-index2="${o.pageIndex}"]`)??void 0;S&&(u.initial={el:S,rect:S.getBoundingClientRect()})}function Q(x,S){if(u.isZoomIn=u.isZoomIn||!u.isZoomOut&&x>1,u.isZoomIn&&x<1){U(1,S);return}if(u.isZoomOut=u.isZoomOut||!u.isZoomIn&&x<1,u.isZoomOut&&x>1){U(1,S);return}U(x,S)}async function U(x,S){const O=r.value,A=Math.min(ti,Math.max(ei,x));if(!O||s.value===A)return;k();const{initial:ae}=u;if(!ae)return;const oe=(S==null?void 0:S.x)??O.clientWidth/2,ge=(S==null?void 0:S.y)??O.clientHeight/2;s.value=A,i("update:zoom",A),await xt();const{el:pe,rect:ye}=ae,Ee=pe.offsetWidth/ye.width,Ae=pe.offsetHeight/ye.height;O.scrollLeft=pe.offsetLeft-ye.left*Ee+oe*(Ee-1),O.scrollTop=pe.offsetTop-ye.top*Ae+ge*(Ae-1)}return(x,S)=>(b(),$("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:ke({"font-size":`${s.value}px`}),onClick:Be(q,["stop"]),onTouchmoveCapture:Be(_,["stop"])},[_e(x.$slots,"default")],38))}}),ag=Object.freeze(Object.defineProperty({__proto__:null,default:ga},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(),$("img",{key:0,src:e.src,class:ue(i.$attrs.class??""),style:ke(e.style)},null,14,cg)):Re((b(),$("div",{key:1,class:ue(i.$attrs.class??""),style:ke(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"],ma=ve(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=ee(null),s=J(()=>{var T;return(T=r.value)==null?void 0:T.rootEl});t({rootEl:s});const l=hn(),a=J(()=>{const{width:T,height:_}=l,g=o.isLongStrip?o.isVertical?T.value:_.value:Math.min(T.value,_.value);return Math.min(4,Math.max(1,Math.ceil(g/400-1)))*o.gap}),u=ee(o.isLongStrip?{min:o.pageIndex-1,max:o.pageIndex}:w()),c=J(()=>{const{min:T,max:_}=u.value,g={};for(let m=T;m<=_;m++)g[m]=!0;return g}),d=ee(p()),f=Tn(()=>{d.value=p()},100);de(l.width,f),de(l.height,f),de(()=>o.pages,f),de(()=>o.isLongStrip,f),de(()=>o.isVertical,f);function p(){const T=l.width.value,_=l.height.value,{pages:g,isLongStrip:m,isVertical:D}=o;return g.map(H=>{var U;const Y=H.some(x=>{var S;return(S=x.img)==null?void 0:S.isLoading}),R=H.map(x=>x.index),q={isLoading:Y,indexes:R,visible:!1};if(Y)return q;const W=H.map(({img:x})=>x).filter(Boolean);if(!W.length||(q.srcs=W.map(({src:x})=>x),W.every(x=>x.hasError)))return q;const Z=(U=W.find(x=>!x.hasError))==null?void 0:U.size;if(!Z)return q;const k=W.reduce((x,S)=>{var O;return x+(((O=S.size)==null?void 0:O.width)??Z.width)},0),Q=W.reduce((x,S)=>{var O;return x+(((O=S.size)==null?void 0:O.height)??Z.height)},0)/W.length;return m&&D||!m&&T/k<_/Q?(q.width=Math.min(T,k),q.height=Q*(q.width/k)):(q.height=Math.min(_,Q),q.width=k*(q.height/Q)),q.width&&q.height&&(q.style={width:`${q.width}em`,height:`${q.height}em`}),q})}const y=J(()=>{const T=o.isVertical?"width":"height";return d.value.map(_=>_[T]).filter(Boolean).sort((_,g)=>g-_)[0]});je(()=>{const T=yr(s.value,o.pageIndex);T==null||T.scrollIntoView({behavior:"instant",block:"start"});let _,g=!1;Ws(()=>{_!==o.pageIndex&&(_=o.pageIndex,m(),g||(g=!0,xt(()=>i("ready"))))});async function m(){if(!o.isLongStrip){u.value=w();return}const D=Math.floor(o.page),H=yr(s.value,D);if(!H)return;const Y=+z(H).getAttribute("data-index"),R=+E(H).getAttribute("data-index");(Y!==u.value.min||R!==u.value.max)&&(u.value={min:Y,max:R})}});function w(){const{pageIndex:T}=o;return{min:T-(o.isDouble?5:3),max:T+(o.isDouble?6:3)}}function z(T,_=0){const g=T.previousElementSibling;if(!g)return T;const m=_+(o.isVertical?g.clientHeight:g.clientWidth);return(o.isVertical?m>l.height.value*1.5:o.isRTL?m>l.width.value*2.5:m>l.width.value*1.5)?g:z(g,m)}function E(T,_=0){const g=T.nextElementSibling;if(!g)return T;const m=_+(o.isVertical?g.clientHeight:g.clientWidth);return(o.isVertical?m>l.height.value*3.5:o.isRTL?m>l.width.value*1.5:m>l.width.value*2.5)?g:E(g,m)}return(T,_)=>(b(),ie(ga,{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:ke({"--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":_[0]||(_[0]=g=>i("update:zoom",g)),"onUpdate:zooming":_[1]||(_[1]=g=>i("update:zooming",g)),onDragEnd:_[2]||(_[2]=()=>i("dragEnd")),onClick:_[3]||(_[3]=()=>i("click")),onPrev:_[4]||(_[4]=()=>i("prev")),onNext:_[5]||(_[5]=()=>i("next"))},{default:ne(()=>[(b(!0),$(be,null,Xt(d.value,g=>{var m;return b(),$("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]}:{}),[!((m=g.srcs)!=null&&m.length)||g.isLoading?(b(),$("div",fg,[c.value[g.indexes[0]]?(b(),ie(ni,{key:0})):le("",!0)])):g.srcs.length==1?(b(),$(be,{key:1},[c.value[g.indexes[0]]?(b(),ie(br,{key:1,class:"rbod__page img",src:g.srcs[0],style:ke(g.style)},null,8,["src","style"])):(b(),$("div",{key:0,class:"rbod__page",style:ke(g.style)},null,4))],64)):(b(),$("div",{key:2,class:ue(["rbod__page rbod__page--double",{"flex-row-reverse":e.isRTL}]),style:ke(g.style)},[g.indexes.some(D=>c.value[D])?(b(!0),$(be,{key:0},Xt(g.srcs,(D,H)=>(b(),$("div",{key:typeof D=="string"?D:`${H}-${g.height}`},[j(br,{src:D,class:"img"},null,8,["src"])]))),128)):le("",!0)],6))],16,dg)}),128)),K("div",{class:"last","data-index":e.totalImgs},[_e(T.$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:ma},Symbol.toStringTag,{value:"Module"})),gg={},mg={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function vg(e,t){return b(),$("svg",mg,[...t[0]||(t[0]=[K("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 va=ve(gg,[["render",vg]]),bg=Object.freeze(Object.defineProperty({__proto__:null,default:va},Symbol.toStringTag,{value:"Module"})),yg={class:"flex w-full flex-shrink-0 justify-between items-center h-16 px-3"},ba=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=ee(null),o=ee(!1),i=ee(0);$t({onKeyDown:s});const r=Zo();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,y=p>0?p:0;y!=i.value&&(i.value=y);const w=y>0;w!==o.value&&(o.value=w)}async function u(){o.value=!1,l.y=-1,await xt();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(),$("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:ke({"padding-top":(e.spaceTop??0)+60+"px"}),onClick:d[3]||(d[3]=()=>t.value=!1)},[j(Xn,{"enter-from-class":"!translate-y-full","leave-to-class":"!translate-y-full"},{default:ne(()=>[t.value?(b(),$("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:ke(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},[K("div",yg,[j(Ge,{transparent:"",onClick:d[0]||(d[0]=()=>t.value=!1)},{default:ne(()=>[j(va)]),_:1}),_e(c.$slots,"name"),_e(c.$slots,"actions")]),K("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)"}},[_e(c.$slots,"default")],2)],38)):le("",!0)]),_:3})],6))}}),wg=Object.freeze(Object.defineProperty({__proto__:null,default:ba},Symbol.toStringTag,{value:"Module"})),xg=["onClick","onKeyup"],ya=ve(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=ee(null),i=ee({width:"",left:""}),r=ee(!1);je(()=>{const l=Date.now();de(n,async a=>{var c;await xt();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(),$("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:{}},[K("div",{class:ue(["bg-stone-300 h-6 rounded-2xl absolute top-1 pointer-events-none",{"duration-200":r.value}]),style:ke(i.value)},null,6),(b(!0),$(be,null,Xt(t.items,(u,c)=>Re((b(),$("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:[Uo(()=>s(c),["enter"]),Uo(()=>s(c),["space"])]},[Wt(Fe(u),1)],42,xg)),[[X(zt),30]])),128))],512))}}),[["styles",[".scrollbar-none{scrollbar-width:none}.scrollbar-none::-webkit-scrollbar{display:none}"]]]),_g=Object.freeze(Object.defineProperty({__proto__:null,default:ya},Symbol.toStringTag,{value:"Module"})),Sg={},kg={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Cg(e,t){return b(),$("svg",kg,[...t[0]||(t[0]=[K("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 wa=ve(Sg,[["render",Cg]]),Tg=Object.freeze(Object.defineProperty({__proto__:null,default:wa},Symbol.toStringTag,{value:"Module"})),Mg={},Pg={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28"};function Eg(e,t){return b(),$("svg",Pg,[...t[0]||(t[0]=[K("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 xa=ve(Mg,[["render",Eg]]),Ig=Object.freeze(Object.defineProperty({__proto__:null,default:xa},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=ee(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(ba,{modelValue:i.value,"onUpdate:modelValue":u[2]||(u[2]=c=>i.value=c),"space-top":e.spaceTop},{name:ne(()=>[e.enableDefaultPreferences?(b(),ie(ya,{key:0,modelValue:r.value,"onUpdate:modelValue":u[0]||(u[0]=c=>r.value=c),items:["Preferences","Default"]},null,8,["modelValue"])):(b(),$("h3",Og,Fe(s.value),1))]),actions:ne(()=>[e.enableDefaultPreferences?(b(),ie(Ge,{key:0,transparent:"",class:ue(e.enableHelp?"":"opacity-0 pointer-events-none"),onClick:l},{default:ne(()=>[K("span",$g,[j(wa)])]),_:1},8,["class"])):(b(),ie(Ge,{key:1,transparent:"",onClick:u[1]||(u[1]=()=>o("more"))},{default:ne(()=>[j(xa)]),_:1}))]),default:ne(()=>[r.value===0?(b(),$(be,{key:0},[e.enableDefaultPreferences?(b(),$("h3",zg,Fe(s.value),1)):le("",!0),_e(a.$slots,"tab-preferences")],64)):(b(),$(be,{key:1},[_e(a.$slots,"tab-default"),u[3]||(u[3]=K("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 no(e=0){return new Promise(t=>setTimeout(t,e))}const oi={};async function _a(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 Sa(e);if(n)return{size:t,src:n};const o=Lg(e);if(!o)return;const i=await Sa(o);return i?{size:t,src:i}:{size:t,src:jg(o,t)}}function Ag(){var o,i;if(oi.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;oi.toBlob=(n==null?void 0:n.toBlob)??HTMLCanvasElement.prototype.toBlob,oi.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 Sa(e){return new Promise(t=>{const n=o=>{if(!o)return t(void 0);const i=URL.createObjectURL(o);t(i)};try{oi.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 ii;async function Bg(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 _a(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)}function ri(e,t){return e>=280&&t>=50}class Vg{constructor({onChanged:t}){Me(this,"isMounted",!0);Me(this,"elsDisposeCallbacksMap",new Map);Me(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(!Jn(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 _a(n);!o||!this.isMounted||this.onChanged(t,{...o,isLoading:!1,hasError:!1,invalid:!ri(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=Tn(()=>{this.isMounted&&this.download(n)},100),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 ka(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 ka(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 ka(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};ri(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){Me(this,"download");Me(this,"threads");Me(this,"completedItems");Me(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){Me(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 no(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 oo(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 Ca(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||!!Ca(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,()=>Ca(e));return t?(oo(t),await no(),!0):!1}class Kg{constructor({spec:t,onChanged:n}){Me(this,"spec");Me(this,"onChanged");Me(this,"rawImages",[]);Me(this,"isMounted",!0);Me(this,"loadRawImagesTs");Me(this,"imgListenersMap",new Map);Me(this,"disconnectObservers");Me(this,"contentEl");Me(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.el===i.el&&s.parentEl===i.parentEl&&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(!Jn(l)){this.observeInvalidImgEl(l);continue}if(l instanceof HTMLCanvasElement){if(Ta(l))return{el:l,parentEl:r}}else if(l instanceof HTMLImageElement){if(Ma(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(!Jn(r))return!1;if(r instanceof HTMLCanvasElement){if(Ta(r))return n.push({el:r}),!0}else if(Ma(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 Ta(e){return e.isConnected&&ri(e.width,e.height)}function Ma(e){if(!e.isConnected)return!1;const t=e.getBoundingClientRect();return!t.width&&!e.naturalWidth||!t.height&&!e.naturalHeight||ri(t.width,t.height)}const si="mp-scroll-container";class xr{constructor(){Me(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 z;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&&((z=this.scrollEl)==null||z.classList.remove(si),this.scrollEl=f),f.classList.add(si));const y=n>=t.length?c.height:r?n%1*c.height:i?Math.max(0,c.height-window.innerHeight/2):-window.innerHeight/2,w={top:p+y,behavior:"instant"};f.scrollTo(w),f!==document.documentElement&&document.documentElement.scrollTo(w)}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 Pa(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 Pa(n)}function Yg(e){var R,q,W;const t=(R=e.raw.value)==null?void 0:R.isWebtoon,n=ee(t===!1),o=ee(t);let i=!1;const r=e.touchDevice&&!navigator.userAgent.toLowerCase().includes("android"),s=((W=(q=e.raw.value)==null?void 0:q.imgs)==null?void 0:W.filter(Boolean))??[];let l=e.isAutoShow!==!1?e.page.value:s.length?Zg(s):void 0,a=s.map(M=>({src:M})),u,c;const d=new Map,f=({src:M,el:Z})=>{const k=Z??M;return k?d.get(k):void 0},p=ee(s.map(M=>({src:M,isLoading:!0,hasError:!1}))),y=()=>{const M=[];a.forEach(Z=>{const{src:k,el:Q}=Z,U=Q??k,x=U?d.get(U):void 0;(U&&!(x!=null&&x.invalid)||Z.parentEl)&&M.push(x)}),p.value=M};let w=setTimeout(e.onTimeout,2e4);const z=()=>{w&&(clearTimeout(w),w=void 0)};let E=0,T=0;const _=4,g=new Vg({onChanged(M,Z){const k=M.el??M.src;if(!k||(d.set(k,Z),y(),Z.isLoading))return;if(Z.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:U}=Z;if(!(!Q||U)){if(!o.value&&T<_){const x=i?a:a.filter(({el:ge,src:pe})=>pe||!(ge&&ge instanceof HTMLImageElement&&!d.has(ge)));let S=x.indexOf(M);if(i&&S>4||S===-1&&(M.el&&(S=x.findIndex(ge=>ge.el===M.el)),S===-1))return;const O=S>Math.min(1,x.length-3)&&S<Math.max(x.length-2,3),A=Q.width/Q.height;A>2&&E++;const ae=A<.5||E>=_,oe=!ae&&.65<A&&A<.75;oe&&T++,o.value!==ae&&(O||ae)&&(o.value=ae),O&&n.value!=oe&&(n.value=!0),o.value===void 0&&oe&&T===_&&(o.value=!1)}Y()}}}),m=new Hg({download:async M=>{!(M.el&&d.has(M.el))&&!(M.src&&d.has(M.src))&&await g.download(M)}}),D=()=>{m.run({items:a,activeIndex:Math.min(a.length-1,Math.floor(e.page.value))})},H=new xr;if(s.length)D();else{let M=!1;u=new Kg({spec:e.spec,async onChanged(Z){var k;if(a=Z,y(),!e.raw.value&&!Z.length){e.onError("no_img");return}(k=e.spec)!=null&&k.imgDivs&&!M&&e.isAutoShow!==!1&&e.page.value&&(M=!0,H.scrollTo({rawImages:Z,page:e.page.value,skipIfVisible:!0,fallbackScrollEl:r?document.body:document.documentElement,isScrollDown:!0}),await no(1)),l===void 0&&e.isAutoShow===!1&&(l=Pa(Z)),D()}})}Ei(()=>{g.dispose(),m.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 Y(){if(i||o.value===void 0||l===void 0)return;const M=Math.max(0,Math.min(l,a.length)),Z=Math.min(Math.floor(M),a.length-1);if(Z>=1){const Q=a[Z];if(!Q||!f(Q)){e.isAutoShow&&H.scrollTo({rawImages:a,page:Z,fallbackScrollEl:r?document.body:document.documentElement,isScrollDown:!0});return}for(let U=Z;U<a.length;U++){const x=f(a[U]);if(!x)return;if(!x.invalid){if(!x.size&&!x.hasError)return;break}}for(let U=Z-1;U>=0;U--){const{src:x,el:S}=a[U],O=S??x;if(!O)break;const A=d.get(O);if(!A)return;if(!A.invalid){if(!A.size&&!A.hasError)return;break}}}if(i)return;i=!0,z(),e.onReady(M);let k=!0;de(()=>Math.floor(e.page.value),(Q,U)=>{Q===U&&!k||(H.scrollTo({rawImages:a,page:Q,isScrollDown:U===void 0||Q>U||a.length===1,skipIfVisible:k&&a.length>1,fallbackScrollEl:r?document.body:document.documentElement}),k=!1,U??(U=-1),D())},{immediate:!0})}return{asyncImgs:J(()=>p.value),isWebtoon:J(()=>o.value??!1),isManga:J(()=>n.value)}}function Ea({touchDevice:e,isBusy:t,isPlaying:n,isIdle:o,hideControlsEvent:i,scrollEl:r,moveThreshold:s}){const l=ee(!0);let a=!1,u=!1;const c={x:0,y:0};let d;Pt(()=>{d==null||d(),d=void 0});function f(E){if(i.value===nn.never||t.value&&l.value)return;const T=typeof E=="boolean"?E:!l.value;T!==l.value&&(l.value=T,!a&&!T&&(a=!0))}function p(){r.value&&(c.x=r.value.scrollLeft,c.y=r.value.scrollTop)}function y(){const E=i.value===nn.firstMove,T=r.value;if(!T)return;const _=Tn(()=>{if(!l.value){Xg(T)&&f(!0);return}if(E&&a)return;const g=Math.abs(T.scrollTop-c.y)||Math.abs(T.scrollLeft-c.x),m=s??(E?c.y===0?300:200:150);g>m&&f(!1)},100);T.addEventListener("scroll",_),d=()=>{T.removeEventListener("scroll",_)}}function w(){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 z(){u||(u=!0,p(),w(),e&&de(Xi(),T=>{T==="hidden"&&!n.value&&!l.value&&f(!0)}),de(t,E=>{E&&!l.value&&f()}),de(n,E=>{E||f(!0)}),de(o,E=>{n.value&&f(!E)}),de(l,E=>{E&&p()}),de(i,()=>w()),de(r,()=>w()))}return{visible:J(()=>l.value),toggle:f,activate:z}}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?Ia(e.value,n.value):e.value.map((o,i)=>[{img:o,index:i}]))}function Ia(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})),...Ia(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,y=!1,w,z=!1,E,T;const _=gt(q,300),g=Tn(()=>{q(),_()},300);function m(){const S=new Promise(O=>{w=()=>{w=void 0,O()}});return Y(e.value,{smooth:!1,ensureLastImgVisibility:!0}),S}function D(){var S;y=!0,w==null||w(),W(),(S=a.value)==null||S.addEventListener("scroll",g),setTimeout(()=>{const{width:O,height:A}=hn();de(()=>`${A.value}-${O.value}`,H),de(o,H),de(n,H),de(()=>t.value,(ae,oe)=>{!oe||ae.length===oe.length||s.value&&H()})},300)}function H(){const S=a.value;if(!S)return;const O=Date.now();T=O;const{scrollWidth:A,scrollHeight:ae}=S,oe=e.value,ge=Math.floor(oe),pe=t.value[ge];en(20,10,async()=>{if(T!==O)return!0;if(S.scrollWidth===A&&S.scrollHeight===ae)return;let ye=oe;if(pe){const Ee=t.value.findIndex(Ae=>Ae===pe||(Ae==null?void 0:Ae.src)===pe.src);Ee!==-1&&ge!==Ee&&(ye=Ee+oe-ge)}return await Y(ye),!0})}async function Y(S,{smooth:O,ensureLastImgVisibility:A=!1}={smooth:!1}){return new Promise(ae=>{const oe=a.value;if(!oe){ae();return}p=!0;const ge=async()=>{await xt(),p=!1,y||D(),ae()},pe=Math.floor(S),ye=yr(oe,pe);if(!ye){ge();return}c(async()=>{await R(oe,!i.value&&O,async()=>{await x(oe,ye,{smooth:O,page:S,ensureLastImgVisibility:A})}),await ge()})})}async function R(S,O,A){O&&S.style.setProperty("scroll-snap-type","none"),await A(),O&&S.style.removeProperty("scroll-snap-type")}function q(){if(p)return;const S=Z();S!==void 0&&S!==e.value&&d(S),W()}function W(){z||!z&&M()&&(z=!0,f())}function M(){const S=a.value;if(!S)return!1;const O=!i.value||u.value?3:!r.value&&S.clientWidth>S.clientHeight?2.25:2.5;return r.value?S.scrollHeight-S.scrollTop<S.clientHeight*O:S.scrollWidth-(s.value?-S.scrollLeft:S.scrollLeft)<S.clientWidth*O}function Z(){const S=k();return S?(+S.getAttribute("data-index")||0)+(i.value?Q(S):0):void 0}function k(){var O;if(E??(E=a.value.getRootNode()),!E)return;const S=(O=E.elementsFromPoint)==null?void 0:O.call(E,r.value||!i.value?window.innerWidth/2:s.value?window.innerWidth-_r:_r,r.value&&i.value?l.value||_r:window.innerHeight/2);if(S)for(let A=0;A<S.length;A++){const ae=S[A];if(ae.hasAttribute("data-index"))return ae;if(ae===a.value)break}}function Q(S){const O=S.getBoundingClientRect();return r.value?Math.abs(O.top-l.value)/O.height:s.value?Math.max(0,O.right-a.value.clientWidth)/O.width:Math.abs(O.left)/O.width}let U=!1;async function x(S,O,A){if(U)return;const ae=O.getBoundingClientRect();if(!i.value){if(r.value){if(ae.top<=0&&ae.bottom>=S.clientHeight)return}else if(ae.left<=0&&ae.right>=S.clientWidth)return}U=!0;const oe=r.value?S.scrollTop:S.scrollLeft,ge=A.page,pe=i.value?ge%1:0,ye=await en(30,10,async()=>{await no();let De;if(!(O.offsetHeight<10))return i.value?r.value?De=O.offsetTop+pe*O.offsetHeight-l.value:s.value?De=O.offsetLeft-S.clientWidth+O.offsetWidth-pe*O.offsetWidth:De=O.offsetLeft+pe*O.offsetWidth:r.value?De=O.offsetTop+(ae.top>0?0:ae.height-S.clientHeight):De=O.offsetLeft+(ae.left>0?0:ae.width-S.clientWidth),ge>.5&&Math.abs(De)<100?void 0:De})??0,Ee=A.ensureLastImgVisibility?r.value?Math.min(ye,S.scrollHeight-S.clientHeight*2):s.value?Math.max(ye,-(S.scrollWidth-S.clientWidth*2)):Math.min(ye,S.scrollWidth-S.clientWidth*2):ye;if(!A.smooth){r.value?S.scrollTop=Ee:S.scrollLeft=Ee,U=!1;return}const Ae=Ee-oe,ct=30;let Qe=0;return new Promise(De=>{(function Mn(){const h=Qg(Qe,oe,Ae,ct);r.value?S.scrollTop=h:S.scrollLeft=h,Qe++,Qe<=ct?requestAnimationFrame(Mn):(De(),U=!1)})()})}return{init:m,goToPage:Y}}function Qg(e,t,n,o){return n*(Math.pow(e/o-1,3)+1)+t}class em{constructor(t){Me(this,"player");Me(this,"debounceStartPlayer");Me(this,"isPlaying");Me(this,"isIdle",ee(!1));Me(this,"onIdle");this.player=t.player,this.debounceStartPlayer=gt(()=>this.player.start(),100);const n=ee(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=gt(()=>{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 xt(),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 Oa 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 y=Date.now(),w=y-d;d=y;const z=c*w+f;z>=1?(f=z%1,this.setScrollOffset(s,z-f)):f=z,setTimeout(p,1)};p()}}})}}class tm extends Oa{constructor(n){super(n);Me(this,"isLongStrip");Me(this,"isVertical");Me(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 Oa({...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"},$a=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 B,V;const n=e,o=t,i=ee(!1),r=ee(!1),s=J(()=>n.busy),l=J(()=>n.page),a=J(()=>n.immediate||i.value?n.spaceTop??0:0),u=J(()=>!n.touchDevice&&k.isIdle.value&&!n.busy&&!D.value),{asyncImgs:c,isWebtoon:d}=Yg({raw:J(()=>n.raw),spec:n.spec,page:l,touchDevice:n.touchDevice,isAutoShow:n.isAutoShow,async onReady(I){ge(I),i.value=!0},onError:()=>o("error"),onTimeout:()=>o("timeout")}),{direction:f,style:p,isRTL:y,isDouble:w,isVertical:z,isLongStrip:E,gap:T,speed:_,zoom:g,breakFirst:m}=_h({touchDevice:n.touchDevice,isWebtoon:d,titleName:(B=n.raw)==null?void 0:B.title.name,defaultPreferences:J(()=>n.defaultPreferences)}),D=ee(!1),H=Gg(c,w,m),Y=J(()=>c.value.length),R=J(()=>l.value>=Y.value),q=ee(null),W=ee(null),M=J(()=>{var I;return(I=W.value)==null?void 0:I.rootEl}),Z=ee(!1),k=nm({autoPlay:!n.tourEnabled&&(((V=n.defaultPreferences)==null?void 0:V.autoPlay)??!1),touchDevice:n.touchDevice,scrollEl:M,speed:_,isRTL:y,isVertical:z,isLongStrip:E,isBusy:s}),Q=J({get(){return g.value},set(I){k.interfere(()=>{g.value=I})}}),U=Ea({touchDevice:n.touchDevice,isBusy:s,isPlaying:J(()=>k.isPlaying.value),isIdle:J(()=>k.isIdle.value),hideControlsEvent:J(()=>n.defaultPreferences.hideControlsEvent),scrollEl:M}),x=U.visible,S=Jg({page:l,asyncImgs:c,style:p,direction:f,isLongStrip:E,isVertical:z,isRTL:y,spaceTop:a,isWebtoon:d,scrollEl:J(()=>{var I;return(I=W.value)==null?void 0:I.rootEl}),interferePlayer:I=>k.interfere(I),onChangedPage:ge,onFinished:()=>o("finished")}),O=J(()=>Math.floor(l.value)),A=J(()=>E.value?l.value:w.value?Mn():Math.floor(l.value)),ae=()=>k.interfere(()=>no(100));$t({onKeyDown:I=>{if(n.tourEnabled)return!0;const C=E.value&&z.value,N=E.value&&!z.value,L=!E.value&&z.value,se=!E.value&&!z.value;switch(I.key){case" ":I.preventDefault(),E.value||h();break;case"ArrowUp":case"PageUp":C?ae():L&&O.value!==0&&(I.preventDefault(),Qe());break;case"ArrowDown":case"PageDown":C?ae():L&&!R.value&&(I.preventDefault(),De());break;case"ArrowLeft":N?ae():se?(I.preventDefault(),Ae()):z.value&&Ee();break;case"ArrowRight":N?ae():se?(I.preventDefault(),ct()):z.value&&ye();break;case"Escape":I.preventDefault();break}},onKeyUp:I=>{switch(I.key){case"b":m.value=!m.value;break}}}),de(k.isPlaying,I=>{o("playingChanged",I)}),de(x,I=>{o("controlsVisibilityChanged",I)});async function oe(){await S.init(),o("ready"),r.value=!0,U.activate(),k.activate()}function ge(I){if(l.value===I)return;const C=c.value.length;if(I<0||I>=C+1)return;const N=l.value;if(o("pageChanged",I),I<.01&&N>I){k.awake();return}}function pe(){!n.touchDevice&&!E.value&&S.goToPage(O.value,{smooth:!0})}function ye(I=!1){var C,N;(N=(C=n.chapterNavData)==null?void 0:C.next)==null||N.call(C,I)}function Ee(I=!1){var C,N;(N=(C=n.chapterNavData)==null?void 0:C.prev)==null||N.call(C,I)}function Ae(){y.value?De():Qe()}function ct(){y.value?Qe():De()}function Qe(){var N;const I=H.value,C=R.value?I[I.length-1][0].index:(N=I[Mn()-1])==null?void 0:N[0].index;C!==void 0?S.goToPage(C):Ee()}function De(){var I,C;if(R.value)ye();else{const N=((C=(I=H.value[Mn()+1])==null?void 0:I[0])==null?void 0:C.index)??c.value.length;S.goToPage(N)}}function Mn(){const I=O.value,C=H.value.findIndex(N=>N.some(({index:L})=>L===I));return C===-1?H.value.length-1:C}function h(I){U.toggle(I)}function v(){if(k.isPlaying.value){x.value||!n.touchDevice?k.stop():(k.awake(),U.toggle(!0));return}U.toggle()}function P(){k.stop(),o("clickEntryButton")}function F(){U.toggle(!1),k.isPlaying.value&&k.stop(),o("openHelpScreen")}return(I,C)=>e.immediate||i.value?(b(),ie(gr,{key:0,ref_key:"gearLayout",ref:q,loading:!r.value,immediate:!!e.immediate,"hide-cursor":u.value,class:"text-stone-100",onClick:C[20]||(C[20]=Be(()=>{},["stop"]))},{default:ne(()=>{var N,L,se,te;return[i.value?(b(),ie(ma,{key:0,ref_key:"body",ref:W,zoom:Q.value,"onUpdate:zoom":C[1]||(C[1]=G=>Q.value=G),zooming:D.value,"onUpdate:zooming":C[2]||(C[2]=G=>D.value=G),page:l.value,"page-index":O.value,pages:X(H),"total-imgs":X(c).length,direction:X(f),gap:X(T),"is-long-strip":X(E),isRTL:X(y),"is-double":X(w),"is-vertical":X(z),"space-top":a.value||0,busy:s.value,"play-controller":X(k),"touch-device":e.touchDevice,"pinch-to-zoome":((N=e.defaultPreferences)==null?void 0:N.pinchToZoom)??!0,"tap-zone":(L=e.defaultPreferences)==null?void 0:L.tapZone,"controls-visible":X(x),onReady:oe,onPrev:Qe,onNext:De,onClick:v,onDragEnd:pe,onWheelPassive:C[3]||(C[3]=()=>X(k).interfere())},Ii({_:2},[i.value&&X(c).length?{name:"end",fn:ne(()=>{var G,ce;return[j(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":X(g)===1&&!e.entryId&&!!e.raw&&!e.offlineMode,onNext:ye,onAddToLibrary:P,onHide:C[0]||(C[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),j(wr,{modelValue:Z.value,"onUpdate:modelValue":C[10]||(C[10]=G=>Z.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:F,onMore:C[11]||(C[11]=()=>o("openDefaultPreferences"))},{"tab-preferences":ne(()=>[j(pa,{"enable-reset":!e.touchDevice||!!e.appVersion,webtoon:X(d),"reader-style":X(p),"onUpdate:readerStyle":C[4]||(C[4]=G=>ze(p)?p.value=G:null),direction:X(f),"onUpdate:direction":C[5]||(C[5]=G=>ze(f)?f.value=G:null),gap:X(T),"onUpdate:gap":C[6]||(C[6]=G=>ze(T)?T.value=G:null),speed:X(_),"onUpdate:speed":C[7]||(C[7]=G=>ze(_)?_.value=G:null),zoom:Q.value,"onUpdate:zoom":C[8]||(C[8]=G=>Q.value=G),"default-preferences":e.defaultPreferences},null,8,["enable-reset","webtoon","reader-style","direction","gap","speed","zoom","default-preferences"])]),"tab-default":ne(()=>[j(pr,{"model-value":e.defaultPreferences,"onUpdate:modelValue":C[9]||(C[9]=G=>o("defaultPreferencesChanged",G))},null,8,["model-value"])]),_:1},8,["modelValue","name","space-top","enable-default-preferences"]),r.value&&!R.value&&!e.tourEnabled?(b(),ie(ca,{key:1,direction:X(f),"tap-zone":(te=e.defaultPreferences)==null?void 0:te.tapZone},null,8,["direction","tap-zone"])):le("",!0),r.value&&!R.value?(b(),ie(mr,{key:2,playing:X(k).isPlaying.value},null,8,["playing"])):le("",!0),j(ua,{visible:X(x),"space-top":a.value},Ii({top:ne(()=>{var G;return[e.raw||e.offlineMode?(b(),ie(er,{key:0,"offline-mode":e.offlineMode,raw:e.raw,onClick:C[12]||(C[12]=()=>o("pressedBack"))},null,8,["offline-mode","raw"])):le("",!0),!e.touchDevice&&!e.offlineMode?(b(),ie(Xo,{key:1,onClick:C[13]||(C[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:X(y),onGetHiddenChapters:C[14]||(C[14]=()=>o("getHiddenChapters")),onPrev:Ee,onNext:ye},null,8,["touch-device","chapter-spec","data","rtl"])):le("",!0)]}),"bottom-right":ne(()=>[!e.offlineMode&&e.raw?(b(),ie(tr,{key:0,"entry-id":e.entryId,onClick:P},null,8,["entry-id"])):le("",!0),j(rr,{disabled:!i.value,onClick:C[15]||(C[15]=()=>Z.value=!0)},null,8,["disabled"]),e.touchDevice?le("",!0):(b(),ie(sr,{key:1,onRequestFullScreen:C[16]||(C[16]=()=>{var G,ce;return(ce=(G=q.value)==null?void 0:G.rootEl)==null?void 0:ce.requestFullscreen()})})),X(E)?(b(),ie(ir,{key:2,"tour-message":"Press here to play like a video",playing:X(k).isPlaying.value,disabled:!r.value,onClick:C[17]||(C[17]=()=>X(k).toggle())},null,8,["playing","disabled"])):le("",!0),X(w)?(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:C[18]||(C[18]=()=>m.value=!X(m))},{default:ne(()=>[X(m)?(b(),ie(fa,{key:0})):(b(),ie(da,{key:1}))]),_:1},8,["disabled"])):le("",!0)]),progress:ne(()=>{var G,ce;return[((G=e.defaultPreferences)==null?void 0:G.progressSize)!==0&&!R.value?(b(),ie(vr,{key:0,value:A.value,total:X(H).length,"long-strip":X(E),height:((ce=e.defaultPreferences)==null?void 0:ce.progressSize)??2,rtl:X(y)},null,8,["value","total","long-strip","height","rtl"])):le("",!0)]}),default:ne(()=>[e.appVersion&&a.value&&!e.offlineMode?(b(),$("div",{key:0,class:"fixed top-0 left-0 right-0 bg-black bg-opacity-70 pointer-events-auto",style:ke({height:`${a.value}px`})},null,4)):le("",!0)]),_:2},[X(H).length?{name:"bottom-left",fn:ne(()=>[j(ha,{"model-value":O.value,disabled:!r.value,pages:X(H),"total-imgs":X(c).length,"onUpdate:modelValue":X(S).goToPage},null,8,["model-value","disabled","pages","total-imgs","onUpdate:modelValue"])]),key:"0"}:void 0]),1032,["visible","space-top"]),X(x)||D.value?(b(),$("div",im,[j(Xn,{"enter-from-class":"opacity-0","leave-to-class":"opacity-0"},{default:ne(()=>[D.value||X(g)!==1?(b(),ie(Kl,{key:0,zoom:Q.value,onClick:C[19]||(C[19]=Be(()=>Q.value=1,["stop"])),class:"duration-200"},null,8,["zoom"])):le("",!0)]),_:1})])):le("",!0),_e(I.$slots,"default")]}),_:3},8,["loading","immediate","hide-cursor"])):le("",!0)}}),rm=Object.freeze(Object.defineProperty({__proto__:null,default:$a},Symbol.toStringTag,{value:"Module"}));function sm({sel:e,heading:t}){const n=["H1","H2","H3","H4","H5","H6","P","BLOCKQUOTE","PRE","CODE","STRONG","B","EM","I","SMALL","SUB","SUP","MARK","TIME","ABBR"],o=["BR","HR"],i=["BUTTON","FIGURE","IMG","SCRIPT","SELECT","INPUT","FORM","IFRAME","NAV","FOOTER","ASIDE","TABLE"],r=lm(e),s=am(r),l=a(r);if(!l)return;return{el:l,isRTL:s};function a(d){let f=0,p=!1,y=0,w=!1;const z=E(d);if(!z)return;if(t){const T=document.createElement("h1");T.innerText=t,z.prepend(T)}return c(z),u(z),z;function E(T,_=!1){var M;if(w)return;if(T.nodeType===Node.TEXT_NODE)return _||(M=T.textContent)!=null&&M.trim()?T.cloneNode():void 0;if(T.nodeType!==Node.ELEMENT_NODE)return;const m=T.tagName;if(i.includes(m)||m==="A"&&!_)return;if(o.includes(m))return _?document.createElement(m):!1;if(T.getAttribute("aria-hidden")==="true"||!Jn(T)||window.getComputedStyle(T).position==="fixed")return;const H=Array.from(T.childNodes);if(!H.length)return;const Y=_||n.includes(m),R=[];if(H.forEach(Z=>{if(w)return;const k=E(Z,Y);k!==!1&&(k?(R.push(k),p?y=0:++f>30&&(p=!0)):p&&++y>30&&(w=!0))}),!R.length)return;const q=document.createElement(m==="BODY"?"div":m==="a"?"span":m),W=T.getAttribute("dir");return W&&W!=="auto"&&q.setAttribute("dir",W),R.forEach(Z=>q.appendChild(Z)),q}}function u(d){za(d,f=>{if(f===d)return;const p=f.tagName;if(o.includes(p)||n.includes(p))return;const y=f.parentElement;if((y==null?void 0:y.childNodes.length)===1){Array.from(f.childNodes).forEach(E=>{y.appendChild(E)}),y.removeChild(f);return}f.childNodes.length===1&&f.replaceWith(f.childNodes[0])})}function c(d){let f;const p=[];let y=!1;kr(d,w=>n.includes(w.tagName)?[]:Array.from(w.children),w=>{const z=w.textContent.trim();if(!z)return!0;if(f===void 0&&(f=Sr(w),f)){p.push(z);return}if(!f)return!1;if(p.includes(z))return!0;if(y||(y=!Sr(w)),y)return!1;p.push(z)}),kr(d,w=>n.includes(w.tagName)?[]:Array.from(w.children).reverse(),w=>!w.textContent.trim()||Sr(w))}}function Sr(e){const t=e.tagName;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 kr(e,t,n){const o=t(e);let i=!1;for(let r=0;r<o.length;r++){const s=o[r],l=kr(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(),$(be,null,[K("div",{class:ue(["fixed left-0 right-0 top-0 bg-inherit z-30",{"opacity-0 pointer-events-none":!e.visible}])},[e.spaceTop?(b(),$("div",{key:0,style:ke({height:`${e.spaceTop}px`}),class:"bg-gradient-to-b from-black to-transparent"},null,4)):le("",!0),e.hideTopControls?le("",!0):(b(),$("div",um,[_e(t.$slots,"top-controls")]))],2),K("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}])},[K("div",dm,[_e(t.$slots,"progress")]),K("div",fm,[_e(t.$slots,"bottom-controls")])],2),_e(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(),$("svg",gm,[...t[0]||(t[0]=[K("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=ve(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(),$("svg",ym,[...t[0]||(t[0]=[K("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=ve(bm,[["render",wm]]),xm=Object.freeze(Object.defineProperty({__proto__:null,default:La},Symbol.toStringTag,{value:"Module"})),ja=ve(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=ee(!1),s=ee(),l=ee(),a=Tn(()=>{const c=s.value;if(!c)return;const{clientHeight:d,scrollHeight:f,scrollTop:p}=c,y=f-2*d,w=p/y;i("progressChanged",Math.max(0,Math.min(1,w)))},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(()=>{const p=s.value;if(p){f.offsetHeight<=p.clientHeight&&i("finished");const{progress:y}=o;y&&u(y)}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 xt(),u(d)})});function u(c){const d=s.value;d&&(d.scrollTop=c*(d.scrollHeight-2*d.clientHeight))}return(c,d)=>(b(),$("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:ke({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))},[K("div",Sn({ref_key:"contentContainer",ref:l,class:"novel-body__content"},e.rtl?{dir:"rtl"}:{}),null,16),_e(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 Z,k,Q,U,x,S;const n=e,o=t,i=ee(null),r=((Z=n.raw)==null?void 0:Z.novel)??sm({sel:(k=n.spec)==null?void 0:k.content,heading:(Q=n.raw)==null?void 0:Q.name});r===void 0&&o("error");const s=ee(r==null?void 0:r.el),l=ee(!!(r!=null&&r.isRTL)),a=ee(!1),u=ee(!1),c=J(()=>n.page),d=J(()=>n.busy),f=ee(null),p=J(()=>{var O;return(O=f.value)==null?void 0:O.scrollEl}),y=(x=(U=n.raw)==null?void 0:U.title)==null?void 0:x.name,w=y?sa(y):location.hostname,z=nf(`mpr:${w}`,{}),E=J({get(){var oe,ge;const O=n.defaultPreferences,A=((oe=z.value)==null?void 0:oe.fontSize)??O.fontSize,ae=Math.max(A,((ge=z.value)==null?void 0:ge.lineHeight)??O.lineHeight);return{fontFamily:O.fontFamily,speed:O.speed,...z.value,contrast:O.contrast,fontSize:A,lineHeight:ae}},set(O){const A={...O},ae=n.defaultPreferences;Object.keys(A).forEach(oe=>{A[oe]===ae[oe]&&delete A[oe]}),z.value=A}}),T=om({isBusy:d,speed:J(()=>E.value.speed),fontSize:J(()=>E.value.fontSize),lineHeight:J(()=>E.value.lineHeight),autoPlay:!!((S=n.defaultPreferences)!=null&&S.autoPlay),touchDevice:n.touchDevice,scrollEl:p}),_=J(()=>!n.touchDevice&&T.isIdle.value&&!d.value),g=Ea({touchDevice:n.touchDevice,moveThreshold:50,isBusy:d,isPlaying:J(()=>T.isPlaying.value),isIdle:J(()=>T.isIdle.value),hideControlsEvent:J(()=>n.defaultPreferences.hideControlsEvent),scrollEl:p}),m=g.visible;de(T.isPlaying,O=>{o("playingChanged",O)}),de(m,O=>{o("controlsVisibilityChanged",O)}),D(document.documentElement),D(document.body);function D(O){const A=O.style.getPropertyValue("overflow");A!=="hidden"&&(O.style.setProperty("overflow","hidden","important"),Pt(()=>{A?O.style.setProperty("overflow",A):O.style.removeProperty("overflow")}))}function H(){o("ready"),g.activate(),T.activate()}function Y(){T.stop(),o("clickEntryButton")}function R(O){u.value=O}function q(){if(T.isPlaying.value){m.value||!n.touchDevice?T.stop():(T.awake(),g.toggle(!0));return}g.toggle()}function W(O){O!==n.page&&(o("pageChanged",Math.min(1,O)),O===1&&o("finished"))}function M(O){const A=E.value.fontSize+O;A>48||A<10||(E.value={...E.value,fontSize:A,lineHeight:Math.max(10,Math.min(96,Math.round(E.value.lineHeight/E.value.fontSize*A)))})}return(O,A)=>s.value?(b(),ie(gr,{key:0,ref_key:"gearLayout",ref:i,immediate:"","hide-cursor":_.value,class:"bg-stone-900",style:ke({color:`rgba(255, 255, 255, ${e.defaultPreferences.contrast})`})},{default:ne(()=>{var ae;return[j(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":E.value,"default-preferences":e.defaultPreferences,"hide-top-controls":!e.raw,onClick:q,onProgressChanged:W,onReady:H},{end:ne(()=>{var oe,ge;return[j(Qi,{"has-next":!!((oe=e.chapterNavData)!=null&&oe.next),"offline-mode":!!e.offlineMode,seconds:((ge=e.defaultPreferences)==null?void 0:ge.autoNextSeconds)??5,onNext:A[0]||(A[0]=()=>{var pe,ye;return(ye=(pe=e.chapterNavData)==null?void 0:pe.next)==null?void 0:ye.call(pe,!1)}),onVisibilityChanged:R,onHide:A[1]||(A[1]=()=>o("hideReader")),onFinished:A[2]||(A[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(Xo,{key:0,class:"hidden md:inline-block fixed left-3 top-2",transparent:"",onClick:A[3]||(A[3]=()=>o("hideReader"))},null,512)),[[nd,X(m)]]):le("",!0),j(Da,{visible:X(m),"hide-top-controls":!e.raw,"space-top":e.spaceTop},{"top-controls":ne(()=>{var oe;return[e.raw||e.offlineMode?(b(),ie(er,{key:0,"offline-mode":e.offlineMode,raw:e.raw,transparent:"",onClick:A[4]||(A[4]=()=>o("pressedBack"))},null,8,["offline-mode","raw"])):le("",!0),e.raw&&!e.touchDevice&&!e.offlineMode?(b(),ie(Xo,{key:1,transparent:"",onClick:A[5]||(A[5]=()=>o("hideReader"))})):le("",!0),e.chapterNavData?(b(),ie(ar,{key:2,transparent:"","touch-device":e.touchDevice,"chapter-spec":(oe=e.spec)==null?void 0:oe.chapter,data:e.chapterNavData,rtl:l.value,onGetHiddenChapters:A[6]||(A[6]=()=>o("getHiddenChapters")),onPrev:A[7]||(A[7]=ge=>{var pe,ye;return(ye=(pe=e.chapterNavData)==null?void 0:pe.prev)==null?void 0:ye.call(pe,ge)}),onNext:A[8]||(A[8]=ge=>{var pe,ye;return(ye=(pe=e.chapterNavData)==null?void 0:pe.next)==null?void 0:ye.call(pe,ge)})},null,8,["touch-device","chapter-spec","data","rtl"])):le("",!0)]}),"bottom-controls":ne(()=>[!e.offlineMode&&e.raw?(b(),ie(tr,{key:0,"entry-id":e.entryId,transparent:"",onClick:Y},null,8,["entry-id"])):le("",!0),j(Ge,{transparent:"",onClick:A[9]||(A[9]=()=>M(-1))},{default:ne(()=>[j(Aa)]),_:1}),j(Ge,{transparent:"",onClick:A[10]||(A[10]=()=>M(1))},{default:ne(()=>[j(La)]),_:1}),j(rr,{transparent:"",onClick:A[11]||(A[11]=()=>a.value=!0)}),e.touchDevice?le("",!0):(b(),ie(sr,{key:1,transparent:"",onRequestFullScreen:A[12]||(A[12]=()=>{var oe,ge;return(ge=(oe=i.value)==null?void 0:oe.rootEl)==null?void 0:ge.requestFullscreen()})})),j(ir,{transparent:"","tour-message":"Press here to start listening",playing:X(T).isPlaying.value,class:"order-2 md:order-4",onClick:A[13]||(A[13]=()=>X(T).toggle())},null,8,["playing"])]),progress:ne(()=>{var oe,ge;return[((oe=e.defaultPreferences)==null?void 0:oe.progressSize)!==0?(b(),ie(vr,{key:0,value:c.value,height:((ge=e.defaultPreferences)==null?void 0:ge.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:X(T).isPlaying.value},null,8,["playing"])),j(wr,{modelValue:a.value,"onUpdate:modelValue":A[17]||(A[17]=oe=>a.value=oe),name:(ae=e.raw)==null?void 0:ae.title.name,"space-top":(e.spaceTop??0)+80,"enable-default-preferences":!e.touchDevice||!!e.appVersion,onMore:A[18]||(A[18]=()=>o("openDefaultPreferences"))},{"tab-preferences":ne(()=>[j(fr,{modelValue:E.value,"onUpdate:modelValue":A[14]||(A[14]=oe=>E.value=oe),"default-preferences":e.defaultPreferences,"enable-reset":!e.touchDevice||!!e.appVersion,onReset:A[15]||(A[15]=()=>z.value=null)},null,8,["modelValue","default-preferences","enable-reset"])]),"tab-default":ne(()=>[j(pr,{"is-novel":"","model-value":e.defaultPreferences,"onUpdate:modelValue":A[16]||(A[16]=oe=>o("defaultPreferencesChanged",oe))},null,8,["model-value"])]),_:1},8,["modelValue","name","space-top","enable-default-preferences"]),_e(O.$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 W,M,Z;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(k,Q){if(o){i({...k});return}if(k.slug){y(k.slug,Q);return}if(k.elIndex===void 0||!(d!=null&&d.sel))return;let U=null;document.querySelector(d.sel)||(d!=null&&d.trigger&&(U=document.querySelector(d.trigger)),U&&(oo(U),await new Promise(S=>setTimeout(()=>S(),50))));const x=d&&d.sel&&!d.url?document.querySelectorAll(d.sel):void 0;x!=null&&x[k.elIndex]&&(oo(x[k.elIndex]),U&&document.querySelector(d.sel)&&oo(U))}function y(k,Q){const U=Cm(c,k,(n==null?void 0:n.trailing)??!0);Q?window.open(U,"_blank","noopener"):location.href=U}function w(k){const Q=g[k];return Q?U=>p(Q,U):void 0}function z(k,Q,U){if(Q)y(Q,U);else if(k){const x=document.querySelector(k);x&&oo(x,{preventDefault:!1})}}const E=r??s,T=d==null?void 0:d.url,_=((W=a.chapters)==null?void 0:W.filter(k=>k.slug||!T&&k.elIndex!==void 0))??[],g=_.length>1?_:[],m=(M=e.prev)==null?void 0:M.slug,D=(Z=e.next)==null?void 0:Z.slug,H=t!=null&&t.prev&&typeof t.prev!="string"?t.prev.sel:void 0,Y=t!=null&&t.next&&typeof t.next!="string"?t.next.sel:void 0;let R=m||H&&!g.length&&document.body.querySelector(H)?k=>z(H,m,k):void 0,q=D||Y&&!g.length&&document.body.querySelector(Y)?k=>z(Y,D,k):void 0;if(g.length){if(T&&(f=g.findIndex(k=>k.slug===e.slug)),f===-1&&(f=g.findIndex(k=>(k.vol??k.inferVol)===E&&k.chap===l)),T&&f===-1&&(f=g.findIndex(k=>k.slug&&u.startsWith(`${k.slug}-`)&&u.length-k.slug.length>3)),f!==-1)R??(R=w(f+1)),q??(q=w(f-1));else if(!m&&!D){const k=g.findIndex(Q=>{const U=Q.vol??Q.inferVol;return E===void 0||U===void 0||E===U?Q.chap<l:U<E});k!==-1?(R=w(k),q=w(k-1)):q=w(g.length-1)}}return{activeIndex:f,activeLabel:Na({vol:r,chap:l}),prev:R,next:q,chapters:g.map(k=>({label:Na(k),select:Q=>p(k,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=ve(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 E,T;const n=e,o=t;let i=!1;ws((_,g,m)=>{if(!i){i=!0;const H=`(3.2.0) ${(g==null?void 0:g.$options.name)??(g==null?void 0:g.$options.__name)??(g==null?void 0:g.$options.__file)}.${m}: ${Tm(_)}`;o("crash",H)}return!1});const r=ee(n.raw?n.raw.contentType??Kt.manga:void 0);r.value===void 0&&Ed(((E=n.spec)==null?void 0:E.content)??"body",{include:(T=n.siteMeta)==null?void 0:T.contentTypes,timeoutMs:3e3}).then(_=>{_?r.value=_:o("error")});const s=ee(!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:_=>o("selectChapter",_)}):void 0);df().addListener({onKeyUp:_=>{switch(_.key){case"h":w();break}}}),cf(()=>o("hapticFeedback"));const d=J(()=>{var D,H;const _=n.defaultPreferences,g=((D=n.defaultPreferences)==null?void 0:D.fontSize)??16,m=Math.max(g,((H=n.defaultPreferences)==null?void 0:H.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)??nt.vertical,gap:(_==null?void 0:_.gap)??0,fontFamily:(_==null?void 0:_.fontFamily)??Go[0].value,contrast:(_==null?void 0:_.contrast)??.8,fontSize:g,lineHeight:m}});function f(){if(n.offlineMode){o("pressedBack");return}pf(),o("dispose")}function p(_){const g=Math.floor(_*100)/100;g!==Math.floor(a.value*100)/100&&(a.value=_,o("pageChanged",g))}function y(){n.entryId?o("openEntry",n.entryId):o("addEntry")}function w(_){s.value!==_&&(s.value=_??!s.value)}function z(){o("error"),f()}return(_,g)=>r.value!==void 0?(b(),ie(_s(r.value===X(Kt).novel?Ba:$a),Sn({key:0,ref:"root"},n,{page:X(a),busy:X(l),"chapter-nav-data":u.value,"default-preferences":d.value,onOpenDefaultPreferences:g[1]||(g[1]=()=>o("openDefaultPreferences")),onDefaultPreferencesChanged:g[2]||(g[2]=m=>o("defaultPreferencesChanged",m)),onTimeout:g[3]||(g[3]=()=>o("timeout")),onReady:g[4]||(g[4]=()=>o("ready")),onFinished:g[5]||(g[5]=()=>o("finished")),onPlayingChanged:g[6]||(g[6]=m=>o("playingChanged",m)),onControlsVisibilityChanged:g[7]||(g[7]=m=>o("controlsVisibilityChanged",m)),onPressedBack:g[8]||(g[8]=()=>o("pressedBack")),onGetHiddenChapters:g[9]||(g[9]=()=>o("getHiddenChapters")),onError:z,onHideReader:f,onPageChanged:p,onClickEntryButton:y,onOpenHelpScreen:g[10]||(g[10]=()=>w(!0))}),{default:ne(()=>[s.value?(b(),ie(Nl,{key:0,"touch-device":e.touchDevice,onHide:w},null,8,["touch-device"])):le("",!0),e.tourEnabled?(b(),ie(Vl,{key:1,onHide:g[0]||(g[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-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-none{background-image:none}.from-black{--tw-gradient-from:#000 var(--tw-gradient-from-position);--tw-gradient-to:transparent var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.to-transparent{--tw-gradient-to:transparent var(--tw-gradient-to-position)}.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:ve(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=ee(null);return t({rootEl:o}),(i,r)=>Re((b(),$("dialog",Pm,[K("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(),$("div",Em,[j(ni)])):le("",!0),_e(i.$slots,"default"),K("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}])},[K("div",{class:"flex gap-1 items-center children-pointer-events-auto relative z-30 flex-shrink-0 2xs:gap-3",style:ke({paddingTop:`${e.spaceTop||0}px`})},[_e(i.$slots,"top-controls")],4),K("div",Im,[K("div",Om,[_e(i.$slots,"bottom-left-controls")]),K("div",$m,[_e(i.$slots,"bottom-right-controls")])]),K("div",zm,[_e(i.$slots,"progress")])],2),e.controlsVisible||e.zooming?(b(),$("div",Dm,[_e(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(),$("svg",jm,[...t[0]||(t[0]=[K("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:ve(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",Cr={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:wo({...Cr})};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,Cr),Je.promise=void 0,eo.clear())},u=gt(f=>{var p;return!n&&((p=e.onPageChanged)==null?void 0:p.call(e,f))},300);Object.assign(Je.data,Cr,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,y;(p=e.onFullScreenChanged)==null||p.call(e,!f),(y=e.onControlsVisibilityChanged)==null||y.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:()=>eo.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 rl(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});
|