gear-second 1.5.4 → 1.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +1 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -23,6 +23,6 @@
23
23
  `]]]),Sd=Object.freeze(Object.defineProperty({__proto__:null,default:Zs},Symbol.toStringTag,{value:"Module"})),Cd=X("div",{class:"fixed-screen bg-black bg-opacity-90"},null,-1),Gs=Te({__name:"HelpScreen",props:{touchDevice:{type:Boolean}},emits:["hide"],setup(e,{emit:t}){const n=e,o=t,r=G(null),i=G([]);tt(async()=>{const c=yr(r),u=We(()=>{s({width:c.width.value,height:c.height.value})},50);u(),_e(c.width,u),_e(c.height,u)});function s(c){var h;const u=(h=r.value)==null?void 0:h.parentElement;if(!u)return;const d=Array.from(u.querySelectorAll("#controls [title]"));d.length&&(i.value=l(d,c))}function l(c,u){const d=[],h=[];let x=0,w=0;const v=50,z=25;c.forEach(S=>{var B;const m=(B=S.getAttribute("title"))==null?void 0:B.trim(),W=S.getBoundingClientRect();if(!m||!W.height||!W.width)return;const _=Math.ceil((W.top-10)/v),Y=Math.ceil((W.left-10)/v);h.push({isTour:!1,title:m,rect:W,fromX:Y,toX:Math.max(Y+1,Math.ceil((W.right+10)/v)),fromY:_,toY:Math.max(_+1,Math.ceil((W.bottom+10)/v))})}),h.forEach(S=>{for(let m=S.fromY;m<S.toY;m++){d[m]??(d[m]=[]);for(let W=S.fromX;W<S.toX;W++)d[m][W]=S;S.toY>x+1&&(x=S.toY-1),S.toX>w+1&&(w=S.toX-1)}});let j=w/2;h.forEach(S=>{S.isAlignRight=S.fromX>j});const re=(S,m)=>{d[m]??(d[m]=[]);const W=m>=S.toY;if(S.isTour)for(let _=S.fromX;_<S.toX;_++)delete d[S.fromY][_],S.fromY=m,S.toY=m+(W?1:-1),d[m][_]=S;else{const _=S.isAlignRight?S.fromX-3:S.fromX,Y=_+3;S.helpItem={fromX:_,toX:Y,fromY:m,toY:m+1,isTour:!0,isAlignRight:S.isAlignRight};for(let B=_;B<Y;B++)d[m][B]=S.helpItem}},C=(S,m)=>{if(m>x||m<0)return!1;const W=m>=S.toY,_=d[m];if(!_)return re(S,m),!0;const Y=_[S.fromX];if(Y&&!Y.isTour)return!1;if(Y&&Y.isTour)return C(Y,W?m+1:m-1)?(re(S,m),!0):!1;if(!Y){const B=S.isAlignRight?-1:1;return _[S.fromX+B]||_[S.fromX+B*2]?C(S,W?m+1:m-1):(re(S,m),!0)}return!1};h.forEach(S=>{if(!C(S,S.toY)){if(S.isAlignRight){const m=d[S.fromY]??[];if(!m.slice(S.fromX-3,S.fromX).filter(Boolean).length){const _=S.fromX-3,Y=S.fromX;S.helpItem={isTour:!0,isAlignRight:!0,fromX:_,toX:Y,fromY:S.fromY,toY:S.toY};for(let B=S.fromX-3;B<S.fromX;B++)m[B]=S.helpItem;return}}C(S,S.fromY-1)}});const $=[];return h.forEach(S=>{const{title:m,helpItem:W,rect:_,isAlignRight:Y,fromX:B,fromY:se,toY:N}=S;if(!m||!W||!_)return;const ie=W.fromY>=N,pe=W.toY<=se;$.push({title:a(m),style:{top:ie?`${_.bottom+(W.fromY-N)*v+z}px`:pe?void 0:`${_.top+8}px`,bottom:pe?`${u.height-_.top+(W.toY-se)*v+z}px`:void 0,left:Y?void 0:`${_.left}px`,right:Y?ie?`${u.width-_.right}px`:`${u.width-_.right+_.width+z}px`:void 0},arrowStyle:{width:pe||ie?"2px":`${Math.abs(W.toX-B)*v+z-5}px`,height:pe||ie?`${(ie?W.fromY-N:se-W.toY)*v+z}px`:"2px",top:ie?`${_.bottom}px`:pe?void 0:`${_.top+20}px`,bottom:pe?`${u.height-_.top}px`:void 0,left:Y?void 0:`${_.left+_.width/2}px`,right:Y?ie?`${u.width-_.right+_.width/2}px`:`${u.width-_.right+_.width}px`:void 0}})}),$}function a(c){return n.touchDevice?c.split("(")[0].trim():c}return(c,u)=>(R(),Z(Ie,null,[Cd,X("div",{ref_key:"root",ref:r,class:"fixed-screen z-20 overscroll-contain select-none",onClick:u[0]||(u[0]=ot(d=>o("hide"),["stop"]))},[(R(!0),Z(Ie,null,gn(i.value,d=>(R(),Z(Ie,{key:d.title},[X("div",{class:"absolute",style:Be(d.style)},Je(d.title),5),X("div",{class:"absolute bg-stone-300 rounded-lg",style:Be(d.arrowStyle)},null,4)],64))),128))],512)],64))}}),kd=Object.freeze(Object.defineProperty({__proto__:null,default:Gs},Symbol.toStringTag,{value:"Module"})),Js=we(Te({__name:"PauseToast",props:{playing:{type:Boolean}},setup(e){const t=e,n=G(0);return _e(()=>t.playing,()=>{n.value=Date.now()}),(o,r)=>{const i=hr,s=gr;return n.value?(R(),Z("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"},[o.playing?(R(),xe(i,{key:0})):(R(),xe(s,{key:1}))])):Ae("",!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)}}
24
24
  `]]]),Id=Object.freeze(Object.defineProperty({__proto__:null,default:Js},Symbol.toStringTag,{value:"Module"})),Td={},$d={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Ed=[X("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)];function Pd(e,t){return R(),Z("svg",$d,Ed)}const Qs=we(Td,[["render",Pd]]),Od=Object.freeze(Object.defineProperty({__proto__:null,default:Qs},Symbol.toStringTag,{value:"Module"})),el=Te({__name:"DirectionToast",props:{direction:{}},setup(e){const t=e,n=sessionStorage.getItem("tk:dir"),o=G(typeof n!="string"||+n!==t.direction),r=We(()=>o.value=!1,1250);_e(()=>t.direction,()=>{i(),o.value=!0,r()}),tt(()=>{i(),r();let s;const l=Ks();_e(l,a=>{a!=="visible"?s=Date.now():Date.now()-s>3e4&&(o.value=!0,r())})});function i(){sessionStorage.setItem("tk:dir",t.direction+"")}return(s,l)=>{const a=Qs;return R(),xe(on,{name:"slow-fade","enter-from-class":"opacity-0","leave-to-class":"opacity-0"},{default:fe(()=>[o.value?(R(),Z("div",{key:0,class:Oe(["fixed z-50 left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 pointer-events-none w-28 h-24 p-4 bg-black bg-opacity-40 rounded-2xl duration-500",{"rotate-90":s.direction===te(ft).vertical,"rotate-180":s.direction===te(ft).rtl}])},[Q(a)],2)):Ae("",!0)]),_:1})}}}),Md=Object.freeze(Object.defineProperty({__proto__:null,default:el},Symbol.toStringTag,{value:"Module"})),ho=[];function Ld(e){ho.push(e),at(()=>{const t=ho.indexOf(e);t!==-1&&ho.splice(t,1)})}function Ad(e,t){const{innerWidth:n,innerHeight:o}=window,r=e*n,i=t*o;ho.forEach(s=>s(r,i))}const tl=Te({__name:"ZoomWrapper",props:Ht({pageIndex:{},playController:{},rtl:{type:Boolean},horizontal:{type:Boolean},longStrip:{type:Boolean},touchDevice:{type:Boolean},busy:{type:Boolean}},{modelValue:{type:Number,required:!0},modelModifiers:{}}),emits:Ht(["dragEnd","click"],["update:modelValue"]),setup(e,{emit:t}){const n=e,o=t,r=nn(e,"modelValue"),i=G(null),s=G(Math.min(kn,Math.max(Cn,r.value))),l=G(!1),a=G(!1),c=G(!1);_e(r,P=>pe(P)),tt(()=>{n.touchDevice?(zt(i,"touchstart",j),!navigator.userAgent.toLowerCase().includes("android")&&Ld(B)):(zt(i,"mousedown",x),zt(window,"wheel",S))}),fo({onKeyDown:P=>{var J;if(!n.busy&&((J=i.value)==null||J.focus(),!(P.key==="Meta"||P.key==="Control")&&(P.ctrlKey||P.metaKey)))switch(P.key){case"0":pe(1);break;case"-":pe(s.value-.2),P.preventDefault();break;case"=":case"+":pe(s.value+.2),P.preventDefault();break}}});function u(P){a.value!==P&&(a.value=P,P?n.playController.pause():(o("dragEnd"),n.playController.resume()))}let d={x:0,y:0},h={x:0,y:0};function x(P){P.button===0&&(d={x:P.clientX,y:P.clientY},h={x:i.value.scrollLeft,y:i.value.scrollTop},window.addEventListener("mousemove",w),window.addEventListener("mouseup",()=>{window.removeEventListener("mousemove",w),setTimeout(()=>u(!1))},{once:!0}),P.preventDefault(),P.stopPropagation())}function w(P){u(!0);const J=P.clientX-d.x,y=P.clientY-d.y,H=i.value;H.scrollLeft=h.x-J,H.scrollTop=h.y-y}let v=!1,z={distance:0,zoom:s.value,x:0,y:0};function j(P){n.busy||(v=P.touches.length===2,v&&(u(!0),P.stopPropagation(),P.preventDefault(),z={distance:m(P),zoom:s.value,x:(P.touches[0].clientX+P.touches[1].clientX)/2,y:(P.touches[0].clientY+P.touches[1].clientY)/2}),(v||n.playController.isPlaying.value&&n.longStrip)&&(window.addEventListener("touchmove",C),window.addEventListener("touchend",re,{once:!0})))}function re(){if(window.removeEventListener("touchmove",C),v){u(!1),v=!1;return}if(!a.value)return;const P=We(()=>{u(!1),i.value.removeEventListener("scroll",y)},200),J=setTimeout(P,200);i.value.addEventListener("scroll",y);function y(){clearTimeout(J),P()}}function C(P){if(u(!0),v){P.stopPropagation(),P.preventDefault();const y=m(P)/z.distance;pe(Math.ceil(y*z.zoom*100)/100,z)}}const $=We(()=>l.value=!1,100);function S(P){if(!n.busy){if(P.ctrlKey||P.metaKey){P.stopPropagation(),P.preventDefault();const J=Math.ceil((s.value+P.deltaY*-.01)*100)/100;pe(J,{x:P.clientX,y:P.clientY});return}n.horizontal&&(l.value||(l.value=!0),$(),P.deltaY&&(i.value&&(i.value.scrollLeft+=P.deltaY*(n.rtl?-1:1)),P.stopPropagation(),P.preventDefault()))}}function m(P){return Math.hypot(P.touches[0].clientX-P.touches[1].clientX,P.touches[0].clientY-P.touches[1].clientY)}let W=0,_;function Y(P){if(!a.value){if(!n.touchDevice){o("click",P);return}W++,_&&clearTimeout(_),W===2&&B(P.clientX,P.clientY),_=setTimeout(()=>{!a.value&&W===1&&o("click",P),_=void 0,W=0},300)}}function B(P,J){if(!W)return;W=0;const y=s.value===1?2:1;pe(y,{x:P,y:J})}let se;const N=We(()=>{c.value=!1,se=void 0},150);function ie(){if(!c.value){const P=i.value;if(!P)return;const J=P.querySelector(`[data-index="${n.pageIndex}"],[data-index2="${n.pageIndex}"]`)??void 0;J&&(se={el:J,rect:J.getBoundingClientRect()},c.value=!0)}if(se)return N(),se}async function pe(P,J){const y=i.value,H=Math.min(kn,Math.max(Cn,P));if(!y||s.value===H)return;const O=ie();if(!O)return;const K=(J==null?void 0:J.x)??y.clientWidth/2,M=(J==null?void 0:J.y)??y.clientHeight/2;s.value=H,r.value=H,await vt();const{el:D,rect:ne}=O,ce=D.offsetWidth/ne.width,ge=D.offsetHeight/ne.height;y.scrollLeft=D.offsetLeft-ne.left*ce+K*(ce-1),y.scrollTop=D.offsetTop-ne.top*ge+M*(ge-1)}return(P,J)=>(R(),Z("div",{ref_key:"root",ref:i,tabindex:"0",class:Oe(["w-full h-full overflow-auto overscroll-contain scrollbar-none focus:outline-none touch-pan-x touch-pan-y",{"!snap-none":!P.longStrip&&(a.value||l.value||c.value),"cursor-grabbing":a.value,"overflow-hidden":c.value}]),style:Be({"font-size":`${s.value}px`}),onClick:ot(Y,["stop"])},[$e(P.$slots,"default")],6))}}),zd=Object.freeze(Object.defineProperty({__proto__:null,default:tl},Symbol.toStringTag,{value:"Module"})),nl=Te({__name:"IntersectionWrapper",emits:["visible"],setup(e,{emit:t}){const n=t,o=G(null),r=G(!1);return tt(async()=>{await vt();let i=!1;wr(o,s=>{r.value=s.some(l=>l.isIntersecting),r.value&&!i&&n("visible")})}),(i,s)=>(R(),Z("div",{ref_key:"root",ref:o},[$e(i.$slots,"default",{visible:r.value})],512))}}),jd=Object.freeze(Object.defineProperty({__proto__:null,default:nl},Symbol.toStringTag,{value:"Module"}));function Bd({pageIndex:e,isLongStrip:t}){let n=e.value,o=e.value+3;const r=G(n),i=G(o),s=We(l,50);_e(e,a=>{n>a&&(n=a)});function l(){r.value!==n&&(r.value=n),i.value!==o&&(i.value=o)}return{min:r,max:i,onPageVisible(a){o<a&&(o=a),s()},onScroll(){t.value?l():s()}}}const Dd={key:0,class:"page--loading"},Rd=["src"],Vd=["src"],Nd=["data-index"],ol=we(Te({__name:"ReaderBody",props:{pageIndex:{},direction:{},isLongStrip:{type:Boolean},isVertical:{type:Boolean},isRTL:{type:Boolean},pages:{},totalImgs:{},gap:{},zoom:{},spaceTop:{},touchDevice:{type:Boolean},playController:{},busy:{type:Boolean},idle:{type:Boolean}},emits:["update:zoom","update:playing","dragEnd","click","end","prev","next"],setup(e,{emit:t}){const n=e,o=t,r=G(null),i=ae(()=>{var w;return(w=r.value)==null?void 0:w.$el}),s=G(null),l=yr(i),a=ae(()=>{const{width:w,height:v}=l,z=n.isLongStrip?n.isVertical?w.value:v.value:Math.min(w.value,v.value);return Math.min(4,Math.max(1,Math.ceil(z/400-1)))*n.gap}),c=Bd({pageIndex:ae(()=>n.pageIndex),isLongStrip:ae(()=>n.isLongStrip)}),u=ae(()=>{const{width:{value:w},height:{value:v}}=l;return n.pages.map(z=>{var Y;const j=z.some(B=>{var se;return(se=B.img)==null?void 0:se.isLoading}),re=z.map(B=>B.index),C={isLoading:j,indexes:re};if(j||re[re.length-1]<c.min.value-1||re[0]>c.max.value+2)return C;const $=z.map(({img:B})=>B).filter(Boolean);if(!$.length||(C.srcs=$.map(({src:B})=>B),$.every(B=>B.hasError)))return C;const m=(Y=$.find(B=>!B.hasError))==null?void 0:Y.size,W=$.reduce((B,se)=>{var N;return B+(((N=se.size)==null?void 0:N.width)??m.width)},0),_=$.reduce((B,se)=>{var N;return B+(((N=se.size)==null?void 0:N.height)??m.height)},0)/$.length;return n.isLongStrip&&n.isVertical||!n.isLongStrip&&w/W<v/_?(C.width=Math.min(w,W),C.height=_*C.width/W):C.height=Math.min(v,_),C})}),d=ae(()=>{const w=n.isVertical?"width":"height";return u.value.map(v=>v[w]).filter(Boolean).sort((v,z)=>z-v)[0]});function h({indexes:w}){const v=w[w.length-1];v!==void 0&&c.onPageVisible(v)}function x(w){if(!n.isLongStrip){const v=n.isVertical?l.height.value:l.width.value,j=(n.isVertical?w.clientY:n.isRTL?v-w.clientX:w.clientX)/v;if(j<=.2&&n.pageIndex>0){o("prev");return}else if(j>=.8&&n.pageIndex<n.totalImgs){o("next");return}}o("click")}return(w,v)=>{const z=pr,j=nl,re=tl;return R(),xe(re,{ref_key:"root",ref:r,"model-value":w.zoom,"page-index":w.pageIndex,class:Oe(["reader-body",{"reader-body--long-strip":w.isLongStrip,"reader-body--pages":!w.isLongStrip,"reader-body--vertical":w.isVertical,"reader-body--rtl":w.isRTL,"reader-body--idle":w.idle,"reader-body--first":!w.isLongStrip&&w.pageIndex==0,"reader-body--last":!w.isLongStrip&&w.pageIndex==w.totalImgs}]),"play-controller":w.playController,horizontal:!w.isVertical,rtl:w.isRTL,"touch-device":w.touchDevice,busy:w.busy,"long-strip":w.isLongStrip,style:Be({"--gap":`${a.value}em`,"--space-top":(w.spaceTop||0)+"px","--screen-width-em":te(l).width.value+"em","--screen-height-em":te(l).height.value+"em",...w.isLongStrip?{"--max-size-em":d.value+"em"}:{}}),"onUpdate:modelValue":v[0]||(v[0]=C=>o("update:zoom",C)),onDragEnd:v[1]||(v[1]=()=>o("dragEnd")),onClick:x,onScroll:te(c).onScroll},{default:fe(()=>[(R(!0),Z(Ie,null,gn(u.value,C=>(R(),xe(j,so({key:w.direction+"_"+C.indexes[0],"data-index":C.indexes[0]},C.indexes.length>1?{"data-index2":C.indexes[1]}:{},{onVisible:()=>h(C)}),{default:fe(({visible:$})=>{var S;return[!((S=C.srcs)!=null&&S.length)||C.isLoading?(R(),Z("div",Dd,[_t(Q(z,null,null,512),[[is,$]])])):C.srcs.length==1?(R(),Z("img",{key:1,src:C.srcs[0],style:Be({height:C.height!==void 0?C.height+"em":""})},null,12,Rd)):(R(),Z("div",{key:2,class:Oe(["page--double",{"flex-row-reverse":w.isRTL}]),style:Be({width:C.width!==void 0?C.width+"em":"",height:C.height!==void 0?C.height+"em":""})},[(R(!0),Z(Ie,null,gn(C.srcs,m=>(R(),Z("div",{key:m},[X("img",{src:m},null,8,Vd)]))),128))],6))]}),_:2},1040,["data-index","onVisible"]))),128)),X("div",{ref_key:"autoNextEl",ref:s,class:"last","data-index":w.totalImgs},[$e(w.$slots,"end")],8,Nd)]),_:3},8,["model-value","page-index","play-controller","horizontal","rtl","touch-device","busy","long-strip","class","style","onScroll"])}}}),[["styles",[`.reader-body{--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){.reader-body{transform:none}}.reader-body--rtl{flex-direction:row-reverse}.reader-body.reader-body--vertical>div{padding:calc(var(--gap)/2) 0}.reader-body:not(.reader-body--vertical){align-items:center;display:flex;height:100%;justify-content:flex-start}.reader-body:not(.reader-body--vertical)>div{padding:0 calc(var(--gap)/2)}.reader-body--long-strip.reader-body--vertical>div:first-child{margin-top:var(--space-top);padding-top:0}.reader-body--long-strip.reader-body--vertical>div:last-child{padding-bottom:0}.reader-body--long-strip.reader-body--vertical>div{width:var(--max-size-em)}.reader-body--long-strip.reader-body--vertical .page--loading{height:75vh;max-width:100%;width:100vw}.reader-body--long-strip.reader-body--vertical .last{height:100vh}.reader-body--long-strip:not(.reader-body--vertical)>div{align-items:center;display:flex;height:var(--max-size-em)}.reader-body--long-strip:not(.reader-body--vertical) .page--loading{height:100vh;max-height:100%;max-width:100vw;width:680px}.reader-body--long-strip:not(.reader-body--vertical) .last{width:100vw}.reader-body--long-strip>div>img{flex-shrink:0;margin:auto}.reader-body--pages:after,.reader-body--pages:before{content:"";cursor:pointer;display:block;position:fixed;z-index:10}.reader-body--pages.reader-body--first:before,.reader-body--pages.reader-body--last:after{cursor:default}.reader-body--pages.reader-body--idle:after,.reader-body--pages.reader-body--idle:before{cursor:none}.reader-body--pages>div{align-items:center;display:grid;justify-content:center;min-height:100vh;min-width:100vw;scroll-snap-align:center}.reader-body--pages.reader-body--vertical{--tw-scroll-snap-strictness:mandatory;scroll-snap-type:y var(--tw-scroll-snap-strictness)}.reader-body--pages.reader-body--vertical:after,.reader-body--pages.reader-body--vertical:before{height:20vw;left:0;right:0}.reader-body--pages.reader-body--vertical:before{top:0}.reader-body--pages.reader-body--vertical:after{bottom:0}.reader-body--pages.reader-body--vertical>div{width:var(--screen-width-em)}.reader-body--pages:not(.reader-body--vertical){--tw-scroll-snap-strictness:mandatory;scroll-snap-type:x var(--tw-scroll-snap-strictness)}.reader-body--pages:not(.reader-body--vertical).reader-body--rtl:before{right:0}.reader-body--pages:not(.reader-body--vertical).reader-body--rtl:after,.reader-body--pages:not(.reader-body--vertical):not(.reader-body--rtl):before{left:0}.reader-body--pages:not(.reader-body--vertical):not(.reader-body--rtl):after{right:0}.reader-body--pages:not(.reader-body--vertical):after,.reader-body--pages:not(.reader-body--vertical):before{bottom:0;top:0;width:20vw}.reader-body--pages:not(.reader-body--vertical)>div{height:var(--screen-height-em)}.reader-body--pages .page--loading{height:100vh;width:100vw}.reader-body--pages .page--double{align-items:center;display:flex;gap:var(--gap);justify-content:center}.reader-body--pages .page--double div{display:flex;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none}.reader-body--pages .page--double div img{flex-shrink:0;max-height:100%;max-width:100%;-o-object-fit:contain;object-fit:contain}.reader-body>div{flex-shrink:0;margin:auto;-webkit-user-select:none;-moz-user-select:none;user-select:none}.reader-body .page--loading{align-items:center;display:flex;justify-content:center}.reader-body img{--tw-bg-opacity:1!important;background-color:rgb(41 37 36/var(--tw-bg-opacity))!important;-o-object-fit:contain!important;object-fit:contain!important;-webkit-user-select:none!important;-moz-user-select:none!important;user-select:none!important}
25
25
  `]]]),Hd=Object.freeze(Object.defineProperty({__proto__:null,default:ol},Symbol.toStringTag,{value:"Module"})),Fd={class:"inline-flex p-6 gap-6 text-base text-stone-300 select-none"},Wd={key:0,class:"inline-block rounded-full relative w-28 h-12 overflow-hidden"},Kd={key:0,class:"animate-auto-next absolute left-0 top-0 bottom-0 h-full bg-stone-600 bg-opacity-50 animate-auto-next"},rl=we(Te({__name:"AutoNext",props:{hasNext:{type:Boolean}},emits:["next","hide"],setup(e,{emit:t}){const n=t,o=G(null),r=G(null),i=G(!1),s=G(!1),l=G(3);return tt(()=>{let a;wr(r,c=>{s.value=c.some(u=>u.isIntersecting),l.value=5,a&&(clearInterval(a),a=void 0),s.value&&(a=setInterval(()=>{l.value-=1,l.value<=0&&(clearInterval(a),a=void 0,n("next"))},1e3))}),wr(o,c=>{i.value=c.some(u=>u.isIntersecting)}),at(()=>a&&clearInterval(a))}),(a,c)=>(R(),Z("div",{ref_key:"root",ref:o,class:"h-full w-full flex justify-center items-center"},[_t(X("div",Fd,[a.hasNext?(R(),Z("div",Wd,[s.value?(R(),Z("div",Kd)):Ae("",!0),_t((R(),Z("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 duration-200",onClick:c[0]||(c[0]=ot(()=>n("next"),["stop"]))},[Et(" Next in "+Je(l.value),1)])),[[te(sn)]])])):Ae("",!0),_t((R(),Z("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 duration-200",onClick:c[1]||(c[1]=ot(()=>n("hide"),["stop"]))},[Et(" Hide ")])),[[te(sn)]])],512),[[is,i.value||!a.hasNext]])],512))}}),[["styles",[`.animate-auto-next{animation:auto-next 5s linear forwards}@keyframes auto-next{0%{width:0}to{width:100%}}
26
- `]]]),Ud=Object.freeze(Object.defineProperty({__proto__:null,default:rl},Symbol.toStringTag,{value:"Module"}));async function Tn(e,t,n){const o=await n(()=>{e=0});if(o!==void 0)return o;if(!(e<=0))return await new Promise(r=>{setTimeout(async()=>{const i=await Tn(e-1,t,n);r(i)},t)})}function ln(e=0){return new Promise(t=>setTimeout(t,e))}const il=3;function Yd(e){var P,J,y,H;const t=((J=(P=e.raw.value)==null?void 0:P.imgs)==null?void 0:J.filter(Boolean))??[];let n=!!t.length,o=t.map(O=>({src:O}));const r=an({}),i=[],s=G((y=e.raw.value)==null?void 0:y.isWebtoon),l=G((H=e.raw.value)==null?void 0:H.isWebtoon),a=Date.now(),c=e.touchDevice&&!navigator.userAgent.toLowerCase().includes("android");let u=!0,d=!1,h=!1,x=0,w=0,v,z=e.isAutoShow!==!1?e.page.value:n?Gd(t):void 0,j=!1;const re=We(m,50),C=()=>{j?re():(j=!0,m())};n?C():B(),_e(()=>{var O;return(O=e.raw.value)==null?void 0:O.imgs},O=>{O!=null&&O.length&&O.length!==o.length&&(n=!0,S(O.map(K=>({src:K}))))}),at(()=>{u=!1,i.forEach(O=>URL.revokeObjectURL(O))}),Gn(()=>{d&&mo({contentEl:v,images:o,page:e.page.value})});function $(){var ne,ce,ge,ue;if(d||s.value===void 0||z===void 0)return;const O=Math.max(0,Math.min(z,o.length)),K=o.length-1,M=Math.min(Math.floor(O),K);if(M>=1){const Se=(ne=o[M])==null?void 0:ne.src;if(!Se){e.isAutoShow&&mo({contentEl:v,images:o,page:M});return}const Ee=(ce=o[M-1])==null?void 0:ce.src;if(Ee&&!((ge=r[Ee])!=null&&ge.size)||!((ue=r[Se])!=null&&ue.size))return}if(d)return;d=!0,e.onReady(O);let D=!0;_e(()=>Math.floor(e.page.value),(Se,Ee)=>{mo({images:o,page:Se,smooth:c,isScrollDown:Ee===void 0||Se>Ee,skipIfVisible:D}),D=!1,Ee??(Ee=-1),Se!==Ee&&(x=Math.max(0,x-Math.abs(Se-Ee))),C()},{immediate:!0})}function S(O){(O.length!==o.length||O.some((M,D)=>{const ne=o[D];return(ne==null?void 0:ne.el)!==(M==null?void 0:M.el)||(ne==null?void 0:ne.src)!==(M==null?void 0:M.src)}))&&(o=O,e.isAutoShow===!1&&z===void 0&&(z=ll(O)),C())}async function m(){if(!u)return;const O=async M=>{x++,W(o[M],M).then(()=>{x--,re()}),await ln()},K=Math.max(0,Math.min(o.length-1,Math.floor(e.page.value-1)));for(let M=K;M<o.length;M++){if(x>=il)return;await O(M)}for(let M=K-1;M>=0;M--){if(x>=il)return;await O(M)}}async function W(O,K){const M=O.el;let D=O.src;if(!M&&!D||D&&r[D])return;const ne=M instanceof HTMLImageElement,ce=M instanceof HTMLCanvasElement;if(M){if(M._tkLoadId_===a)return;if(M._tkLoadId_=a,ne){const ue=()=>_(M);M.addEventListener("load",ue),at(()=>M.removeEventListener("load",ue))}}if(ne&&!D){if(D=go(M),!D)return;O.src=D}else ce&&!D&&(D=await sl(M),D&&i.push(D));if(!D)return;const ge=ne&&D.startsWith("blob");ge&&!M.complete||(r[D]={src:D,isLoading:!0,hasError:!1},ge&&c&&await ln(300),Y({imgEl:ne?M:void 0,src:D,index:K}))}async function _(O){if(!u)return;const K=o.findIndex(D=>D.el===O);if(K===-1)return;const M=go(O);M&&(!M.startsWith("blob")&&o[K].src===M||(o[K].src=M,r[M]??(r[M]={src:M,isLoading:!0,hasError:!1}),Y({imgEl:O,src:M,index:K})))}async function Y({imgEl:O,src:K,index:M}){const D=O?await Xd(O,K):K;if(!D)return;O&&D!==K&&i.push(D);const ne=await Zd(D,O),ce=!!ne&&(ne.width<200||ne.height<200);if(r[K]={src:D,size:ne,isLoading:!1,hasError:!ne,invalid:ce},ne&&!s.value&&M>Math.min(1,o.length-3)&&M<Math.max(o.length-2,3)){const ge=ne.height/ne.width,ue=ge>2||ge<.5,Se=ge>1.6||ge<.6;s.value!==ue&&(s.value=ue),l.value!==Se&&(l.value=Se)}$()}function B(){var ne;const O=We(()=>{v&&N(v)},100),K=new MutationObserver(O),M=(ne=e.spec)!=null&&ne.imgDivs?void 0:(()=>{let ce=window.innerWidth;return new ResizeObserver(We(()=>{const ge=window.innerWidth;if(ge!==ce){ce=ge;return}O()},50))})();Gn(async()=>{K.disconnect(),M==null||M.disconnect()});let D=!1;se(ce=>{v!==ce&&(v=ce,K.disconnect(),M==null||M.disconnect(),K.observe(v,{childList:!0,subtree:!0}),M==null||M.observe(v),D?O():(D=!0,N(v)))})}async function se(O){var ge;const K=(ge=e.spec)==null?void 0:ge.content;if(!K){O(document.body);return}const M=await qd(e.spec);let D=K?await Tn(M?100:1,10,()=>document.querySelector(K)):void 0;if(!D)return;O(D);let ne=0;const ce=async()=>{if(u&&!(D!=null&&D.isConnected)&&!n){if(ne=0,D=await Tn(50,20,()=>{const ue=document.querySelector(K);return ue!=null&&ue.isConnected&&ue!==D?ue:void 0}),!D)return;O(D)}!u||n||++ne>=10||setTimeout(ce,200)};setTimeout(ce,200)}async function N(O){var ne;if(!u||!O.isConnected||n)return;const K=Date.now();w=K;const M=(ne=e.spec)==null?void 0:ne.imgDivs,D=M?await ie(O,M):pe(O);if(!(w!==K||!O.isConnected||!u||n)){if(!e.raw.value&&!D.length){e.onError("no_img");return}S(D)}}async function ie(O,K){const M=Array.from(O.querySelectorAll(K)),D=new Map,ne=M.map(ce=>{const ge=ce.querySelectorAll("img,canvas");for(const ue of ge)if(xr(ue,D)){if(ue instanceof HTMLCanvasElement){if(al(ue))return{el:ue,parentEl:ce}}else if(ue instanceof HTMLImageElement&&cl(ue)){const Se=go(ue);return{el:ue,src:Se,parentEl:ce}}}return{parentEl:ce}});return!h&&e.isAutoShow!==!1&&e.page.value&&(h=!0,mo({contentEl:O,images:ne,page:e.page.value,skipIfVisible:!0}),await ln(1)),ne}function pe(O){const K=[],M={},D=new Map;return Array.from(O.querySelectorAll("img,canvas")).forEach(ce=>{if(xr(ce,D)){if(ce instanceof HTMLCanvasElement)al(ce)&&K.push({el:ce});else if(ce instanceof HTMLImageElement&&cl(ce)){const ge=go(ce);if(ge){const ue=M[ge];if(ue!==void 0&&ue!==-1){K.splice(ue,1);return}M[ge]=K.length}K.push({el:ce,src:ge})}}}),K}return{asyncImgs:ae(()=>{Object.values(r);const O=[];return o.forEach(({src:K,parentEl:M})=>{const D=K?r[K]:void 0;(K&&!(D!=null&&D.invalid)||M)&&O.push(D)}),O}),isWebtoon:ae(()=>s.value??!1),maybeWebtoon:ae(()=>l.value??!1)}}async function qd(e){const{lstrip:t,lstripBtn:n}=e||{};if(!n||!!t&&!!document.querySelector(t))return!1;const r=await Tn(50,30,()=>document.querySelector(n));if(!r)return!1;if(r.tagName.toLowerCase()==="a"&&!r._tkDirty_){r._tkDirty_=!0;const i=s=>s.preventDefault();r.addEventListener("click",i),at(()=>{delete r._tkDirty_,r.removeEventListener("click",i)})}return r.click(),await ln(),!0}function sl(e){return new Promise(t=>{const n=o=>{if(!o)return t(void 0);const r=URL.createObjectURL(o);t(r)};e.toBlob(n,"image/jpeg",1)})}async function Xd(e,t){if(!t.startsWith("blob:"))return t;if(!e.naturalWidth||!e.naturalHeight)return;const o=document.createElement("canvas"),r=o.getContext("2d"),i=e.naturalWidth,s=e.naturalHeight;return o.width=i,o.height=s,r==null||r.drawImage(e,0,0,i,s),await sl(o)}async function Zd(e,t){return(t==null?void 0:t.src)===e&&t.naturalWidth&&t.naturalHeight?{width:t.naturalWidth,height:t.naturalHeight}:await new Promise(n=>{const o=new Image,r=setInterval(()=>{const{naturalWidth:i,naturalHeight:s}=o;s&&i&&(n({width:i,height:s}),clearInterval(r))},20);o.onerror=()=>{n(void 0),clearInterval(r)},o.src=e})}function Gd(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 ll(n)}function ll(e){var t,n;for(let o=0;o<e.length;o++){const r=((t=e[o])==null?void 0:t.el)??((n=e[o])==null?void 0:n.parentEl),i=r==null?void 0:r.getBoundingClientRect();if(!i||i.bottom<=0)continue;const s=i.top;return o+(s>=0?0:-s/i.height)}return 0}function al(e){return e.isConnected&&e.width>=200&&e.height>=200}function cl(e){if(!e.isConnected)return!1;const t=e.getBoundingClientRect();return!t.width||!t.height||t.width>=200&&t.height>=200}function go(e){const t=e.getAttributeNames(),n=t.indexOf("src");n!==-1&&(t.splice(n,1),t.push("src"));for(const o of t){if(o==="srcset"||o!=="data-url"&&o!=="data-original"&&!o.includes("src"))continue;const r=e.getAttribute(o);if(r)return o==="src"&&e.naturalWidth&&e.naturalWidth<200?void 0:r.split(" ")[0].replace(/(\n|\t)/g," ").trim()}}function xr(e,t){if(!e||e===document.body)return!0;const n=t.get(e);if(n!==void 0)return n;const o=getComputedStyle(e);if(!(o.display!=="none"&&o.visibility!=="hidden"&&+(o.opacity??"1")>.1))return t.set(e,!1),!1;const i=xr(e.parentElement,t);return t.set(e,i),i}function mo({contentEl:e,images:t,page:n,smooth:o,skipIfVisible:r,isScrollDown:i}){const s=Math.floor(n),l=t[Math.min(t.length-1,s)];if(!l)return;const a=l.el??l.parentEl??document.querySelector(`img[src^="${l.src}"]`);if(!a)return;const c=o?"smooth":"instant";if(n>=t.length){a==null||a.scrollIntoView({block:"end",behavior:c});return}const d=a.getBoundingClientRect();if(r&&d.top<=0&&d.top+d.height>0)return;a.scrollIntoView({block:i?"end":"start",behavior:c});const h=n%1;if(h){const x=h*d.height,w=Sr(e??document.documentElement);setTimeout(()=>w==null?void 0:w.scrollBy({top:x}))}}function Sr(e){if(e)return e.scrollHeight>e.clientHeight?e===document.body?Sr(document.documentElement)??e:e:Sr(e.parentElement??void 0)}function Jd(e,t){return ae(()=>t.value?ul(e.value):e.value.map((n,o)=>[{img:n,index:o}]))}function ul(e,t=0){if(e.length===0)return[];const n=e.slice(0,2),r=n.some(i=>(i==null?void 0:i.size)&&i.size.width>i.size.height)?[n[0]]:n;return[r.map((i,s)=>({img:i,index:t+s})),...ul(e.slice(r.length),t+r.length)]}function Qd(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=G(t&&e>0?Math.max(0,e):+(sessionStorage.getItem("tk:page")??"0")||e);return ae({get:()=>o.value,set:r=>{o.value=r,sessionStorage.setItem("tk:page",r+"")}})}function ep(){sessionStorage.removeItem("tk:page"),sessionStorage.removeItem("tk:page:path")}const Cr=40;function tp({page:e,direction:t,style:n,isLongStrip:o,isVertical:r,isRTL:i,spaceTop:s,scrollEl:l,isWebtoon:a,interferePlayer:c,onChangedPage:u,onInitialized:d,onFinished:h}){let x=!1,w=!1,v=!1,z;const j=We(Y,300),re=Vs(()=>{Y(),j()},300),C=We(m,50);async function $(){W(e.value,{smooth:!1,ensureLastImgVisibility:!0})}function S(){var y;w=!0,d(),B(),(y=l.value)==null||y.addEventListener("scroll",re),setTimeout(()=>{const{width:H,height:O}=xd();_e(H,()=>{r.value&&C()}),_e(O,()=>{r.value||C()}),_e(n,m),_e(t,m)},300)}async function m(){if(!w||x)return;x=!0,await vt();const y=e.value;if(N()===y){x=!1;return}W(y)}function W(y,{smooth:H,ensureLastImgVisibility:O=!1}={smooth:!1}){const K=l.value;if(!K)return;x=!0;const M=async()=>{await vt(),x=!1,w||S()},D=Math.floor(y),ne=K.querySelector(`[data-index="${D}"],[data-index2="${D}"]`);if(!ne){M();return}c(async()=>{await _(K,!o.value&&H,async()=>{await J(K,ne,{smooth:H,page:y,ensureLastImgVisibility:O})}),await M()})}async function _(y,H,O){H&&y.style.setProperty("scroll-snap-type","none"),await O(),H&&y.style.removeProperty("scroll-snap-type")}function Y(){if(x)return;const y=N();y!==void 0&&y!==e.value&&u(y),B()}function B(){v||!v&&se()&&(v=!0,h())}function se(){const y=l.value;if(!y)return!1;const H=o.value?a.value?3:!r.value&&y.clientWidth>y.clientHeight?2.25:2.5:2;return r.value?y.scrollHeight-y.scrollTop<y.clientHeight*H:y.scrollWidth-(i.value?-y.scrollLeft:y.scrollLeft)<y.clientWidth*H}function N(){const y=ie();return y?(+y.getAttribute("data-index")||0)+(o.value?pe(y):0):void 0}function ie(){var H;if(z??(z=l.value.getRootNode()),!z)return;const y=(H=z.elementsFromPoint)==null?void 0:H.call(z,r.value||!o.value?window.innerWidth/2:i.value?window.innerWidth-Cr:Cr,r.value&&o.value?s.value||Cr:window.innerHeight/2);if(y)for(let O=0;O<y.length;O++){const K=y[O];if(K.hasAttribute("data-index"))return K;if(K===l.value)break}}function pe(y){const H=y.getBoundingClientRect();return r.value?Math.abs(H.top-s.value)/H.height:i.value?Math.max(0,H.right-l.value.clientWidth)/H.width:Math.abs(H.left)/H.width}let P=!1;async function J(y,H,O){if(P)return;const K=H.getBoundingClientRect();if(!o.value){if(r.value){if(K.top<=0&&K.bottom>=y.clientHeight)return}else if(K.left<=0&&K.right>=y.clientWidth)return}P=!0;const M=r.value?y.scrollTop:y.scrollLeft,D=O.page,ne=o.value?D%1:0,ce=await Tn(30,10,async()=>{await ln();let Re;if(!(H.offsetHeight<10))return o.value?r.value?Re=H.offsetTop+ne*H.offsetHeight-s.value:i.value?Re=H.offsetLeft-y.clientWidth+H.offsetWidth-ne*H.offsetWidth:Re=H.offsetLeft+ne*H.offsetWidth:r.value?Re=H.offsetTop+(K.top>0?0:K.height-y.clientHeight):Re=H.offsetLeft+(K.left>0?0:K.width-y.clientWidth),D>.5&&Math.abs(Re)<100?void 0:Re})??0,ge=O.ensureLastImgVisibility?r.value?Math.min(ce,y.scrollHeight-y.clientHeight*2):i.value?Math.max(ce,-(y.scrollWidth-y.clientWidth*2)):Math.min(ce,y.scrollWidth-y.clientWidth*2):ce;if(!O.smooth){r.value?y.scrollTop=ge:y.scrollLeft=ge,P=!1;return}const ue=ge-M,Se=30;let Ee=0;return new Promise(Re=>{(function dt(){const pt=np(Ee,M,ue,Se);r.value?y.scrollTop=pt:y.scrollLeft=pt,Ee++,Ee<=Se?requestAnimationFrame(dt):(Re(),P=!1)})()})}return{init:$,goToPage:W}}function np(e,t,n,o){return n*(Math.pow(e/o-1,3)+1)+t}function op({autoPlay:e,touchDevice:t,scrollEl:n,isVertical:o,isRTL:r,isLongStrip:i,speed:s}){const l=sessionStorage.getItem("tk:playing"),a=G(typeof l=="string"?l==="true":e),c=ae({get:()=>a.value,set:_=>{a.value=_,sessionStorage.setItem("tk:playing",_?"true":"false")}}),u=G(!1);let d,h;const x=We(m,100),w=We(()=>{u.value=!0},t?2e3:1e3),v=()=>setTimeout(()=>{u.value=!1,w()},30);v(),t||zt(window,"mousemove",v);const z=Ks();tt(()=>{_e(z,_=>{c.value&&(_==="visible"?m():h==null||h())}),_e(s,()=>j()),_e(i,_=>{_||C()})});async function j(_){c.value&&(h==null||h()),_&&(await vt(),await _()),c.value&&x()}function re(){c.value?C():$()}function C(){c.value&&(c.value=!1,h==null||h(),v())}function $(){!c.value&&i.value&&(c.value=!0,m(),v())}function S(){h==null||h()}function m(){const _=n.value;if(!c.value||!_)return;const Y=o.value?_.scrollHeight-_.clientHeight:_.scrollWidth-_.clientWidth,B=W();if(Y<=B){C();return}h=()=>{d=Date.now(),h=void 0};const se=Date.now();d=se;const N=.05*s.value,ie=o.value?"scrollTop":"scrollLeft";let pe=Date.now(),P=0;const J=()=>{if(d!==se)return;const y=Date.now(),H=y-pe;pe=y;const O=N*H+P;O>=1?(P=O%1,_[ie]+=(O-P)*(r.value?-1:1)):P=O,setTimeout(J,1)};J()}function W(){const _=n.value;return o.value?_.scrollTop:r.value?-_.scrollLeft:_.scrollLeft}return{isPlaying:c,isIdle:u,toggle:re,play:$,pause:S,resume:m,stop:C,interfere:j,awake:v}}function rp(e){var x,w,v,z,j,re;let t=-1,n=(x=e.prev)==null?void 0:x.slug,o=(w=e.next)==null?void 0:w.slug;const{vol:r,inferVol:i,chap:s,title:l,slug:a,basePath:c}=e,u=r??i,d=((v=l.chapters)==null?void 0:v.filter(C=>C.slug))??[],h=d.length>1?d:[];if(h.length){if(t=h.findIndex(C=>C.slug===e.slug),t===-1&&(t=h.findIndex(C=>(C.vol??C.inferVol)===u&&C.chap===s)),t===-1&&(t=h.findIndex(C=>a.startsWith(`${C.slug}-`)&&a.length-C.slug.length>3)),t!==-1)n??(n=(z=h[t+1])==null?void 0:z.slug),o??(o=(j=h[t-1])==null?void 0:j.slug);else if(!n&&!o){const C=h.findIndex($=>{const S=$.vol??$.inferVol;return u===void 0||S===void 0||u===S?$.chap<s:S<u});C!==-1?(n=h[C].slug,o=(re=h[C-1])==null?void 0:re.slug):o=h[h.length-1].slug}}return{activeIndex:t,activeLabel:fl({vol:r,chap:s}),chapters:h.map(C=>({label:fl(C),path:kr(c,C.slug)})),prevPath:kr(c,n),nextPath:kr(c,o)}}function kr(e,t){return!t||t.includes("//")||t.startsWith("/")?t:(e||"/")+t}function fl({vol:e,chap:t}){return e==null?`Ch.${t}`:`Vol.${e} ch.${t}`}const ip={key:0,class:"ml-auto inline-flex gap-[1px] scale-95 origin-right"},dl=we(Te({inheritAttrs:!1,__name:"TrackkunReader",props:{immediate:{type:Boolean},raw:{},spec:{},page:{},spaceTop:{},fullScreen:{type:Boolean},touchDevice:{type:Boolean},entryId:{},autoPlay:{type:Boolean},readerStyle:{},direction:{},isGuest:{type:Boolean},isAutoShow:{type:Boolean},tourEnabled:{type:Boolean}},emits:["error","ready","pageChanged","fullScreenChanged","playingChanged","tourEnabledChanged","dispose","openEntry","addEntry","finished"],setup(e,{emit:t}){const n=e,o=t;let r=!1,i,s=-1;const l=G(!1),a=G(!1),c=wu({touchDevice:n.touchDevice}),u=Qd(n.page,n.isAutoShow),d=ae(()=>n.spaceTop??0),{asyncImgs:h,isWebtoon:x,maybeWebtoon:w}=Yd({raw:ae(()=>n.raw),spec:n.spec,page:u,touchDevice:n.touchDevice,isAutoShow:n.isAutoShow,spaceTop:d,async onReady(g){ce(g),l.value=!0},onError:()=>{o("error"),T()}}),{direction:v,style:z,isRTL:j,isDouble:re,isVertical:C,isLongStrip:$,gap:S,speed:m,zoom:W}=cf({titleName:ae(()=>{var g;return(g=n.raw)==null?void 0:g.title.name}),isWebtoon:x,maybeWebtoon:w,defaultStyle:n.readerStyle,defaultDirection:n.direction}),_=Jd(h,re),Y=ae(()=>u.value>=h.value.length),B=ae(()=>n.raw?rp(n.raw):void 0),se=ae(()=>{var g,k;return j.value?(g=B.value)==null?void 0:g.nextPath:(k=B.value)==null?void 0:k.prevPath}),N=ae(()=>{var g,k;return j.value?(g=B.value)==null?void 0:g.prevPath:(k=B.value)==null?void 0:k.nextPath}),ie=G(null),pe=G(null),P=G(!1),J=G(!1),y=op({autoPlay:!n.tourEnabled&&n.autoPlay,touchDevice:n.touchDevice,scrollEl:ae(()=>{var g;return(g=ie.value)==null?void 0:g.$el}),speed:m,isRTL:j,isVertical:C,isLongStrip:$}),H=ae(()=>!n.touchDevice&&y.isIdle.value&&!c.value),O=ae({get(){return W.value},set(g){y.interfere(()=>{W.value=g})}}),K=tp({page:u,style:z,direction:v,isLongStrip:$,isVertical:C,isRTL:j,spaceTop:d,isWebtoon:x,scrollEl:ae(()=>{var g;return(g=ie.value)==null?void 0:g.$el}),interferePlayer:g=>y.interfere(g),onChangedPage:ce,onInitialized(){o("ready"),a.value=!0,n.touchDevice&&(i=ge())},onFinished:()=>o("finished")}),M=ae(()=>Math.floor(u.value)),D=()=>y.interfere(()=>ln(100));Ou().addListener({onKeyDown:g=>{if(n.tourEnabled)return;const k=$.value&&C.value,q=$.value&&!C.value,oe=!$.value&&C.value,he=!$.value&&!C.value;switch(g.key){case" ":g.preventDefault(),$.value?(U(!1),y.toggle()):b();break;case"ArrowUp":case"PageUp":k?D():oe&&M.value!==0&&(g.preventDefault(),p());break;case"ArrowDown":case"PageDown":k?D():oe&&!Y.value&&(g.preventDefault(),b());break;case"ArrowLeft":q?D():he?(g.preventDefault(),En()):C.value&&Re();break;case"ArrowRight":q?D():he?(g.preventDefault(),f()):C.value&&Ee();break}},onKeyUp:g=>{switch(g.key){case"f":A();break;case"t":F();break;case"h":U();break}}}),zt("fullscreenchange",()=>{P.value=!!document.fullscreenElement}),_e(y.isPlaying,g=>{g||L(!1),o("playingChanged",g)}),_e(y.isIdle,g=>{y.isPlaying.value&&L(g)}),_e(c,g=>{!g&&y.isIdle.value?y.awake():g&&n.fullScreen&&L()});function ce(g){if(u.value===g)return;const k=h.value.length;if(g<0||g>=k+1)return;const q=u.value;u.value=g;const oe=Math.floor(g*100)/100;oe!==s&&(s=oe,o("pageChanged",oe)),g>=k?(L(!1),y.stop()):g<.01?(L(!1),y.awake()):n.touchDevice&&!r&&($.value?i!==void 0&&ge()-i>300&&L(!0):Math.abs(q-g)===1&&L(!0))}function ge(){var k;const g=(k=ie.value)==null?void 0:k.$el;return g?C.value?g.scrollTop:j.value?-g.scrollLeft:g.scrollLeft:0}function ue(){!n.touchDevice&&!$.value&&K.goToPage(M.value,{smooth:!0})}function Se(){if(y.isPlaying.value){!n.fullScreen||!n.touchDevice?y.stop():y.awake();return}L()}function Ee(){var g;pt((g=B.value)==null?void 0:g.nextPath)}function Re(){var g;pt((g=B.value)==null?void 0:g.prevPath)}function dt(g){var q,oe,he;const k=(he=(oe=(q=B.value)==null?void 0:q.chapters)==null?void 0:oe[g])==null?void 0:he.path;k&&pt(k)}function pt(g){g&&(location.href=g.includes("://")?g:location.origin+g)}function En(){j.value?b():p()}function f(){j.value?p():b()}function p(){var q;const g=_.value,k=Y.value?g[g.length-1][0].index:(q=g[I()-1])==null?void 0:q[0].index;k!==void 0?K.goToPage(k):Re()}function b(){var g,k;if(Y.value)Ee();else{const q=((k=(g=_.value[I()+1])==null?void 0:g[0])==null?void 0:k.index)??h.value.length;K.goToPage(q)}}function I(){const g=M.value,k=_.value.findIndex(q=>q.some(({index:oe})=>oe===g));return k===-1?_.value.length-1:k}function T(){ep(),y.stop(),o("dispose")}async function L(g){if(c.value&&!n.fullScreen)return;r=!0;const k=typeof g=="boolean"?g:!n.fullScreen;o("fullScreenChanged",k),k&&setTimeout(()=>{n.fullScreen&&c.value&&o("fullScreenChanged",!1)},100)}function F(){n.entryId?E():V()}function A(){var g,k;document.fullscreenElement?document.exitFullscreen():(k=(g=pe.value)==null?void 0:g.$el)==null||k.requestFullscreen()}function V(){y.stop(),o("addEntry")}function E(){y.stop(),o("openEntry",n.entryId)}function U(g){J.value!==g&&(J.value=!J.value,J.value&&y.isPlaying.value&&y.stop())}return(g,k)=>{const q=rl,oe=ol,he=el,be=Js,Pe=Gs,Ze=Zs,jt=Bs,ht=uo,Zt=js,vo=vr,Ve=zs,rt=As,_o=Ls,mp=Os,vp=Ps,_p=Es,bp=$s,yp=Ts,wp=gr,xp=hr,Sp=bs,Cp=vs;return g.immediate||l.value?(R(),xe(Cp,{key:0,ref_key:"root",ref:pe,loading:!a.value,immediate:!!g.immediate,"full-screen":!!g.fullScreen,idle:H.value,"space-top":d.value,rtl:te(j),onClick:k[10]||(k[10]=ot(()=>{},["stop"]))},Si({settings:fe(()=>{var yt;return[Q(yp,{"reader-style":te(z),"onUpdate:readerStyle":k[3]||(k[3]=wt=>Me(z)?z.value=wt:null),direction:te(v),"onUpdate:direction":k[4]||(k[4]=wt=>Me(v)?v.value=wt:null),gap:te(S),"onUpdate:gap":k[5]||(k[5]=wt=>Me(S)?S.value=wt:null),speed:te(m),"onUpdate:speed":k[6]||(k[6]=wt=>Me(m)?m.value=wt:null),zoom:O.value,"onUpdate:zoom":k[7]||(k[7]=wt=>O.value=wt),name:(yt=g.raw)==null?void 0:yt.title.name,webtoon:te(x),disabled:!l.value,onHelp:U},null,8,["reader-style","direction","gap","speed","zoom","name","webtoon","disabled"])]}),"reset-zoom":fe(()=>[Q(on,{name:"fade","enter-from-class":"opacity-0","leave-to-class":"opacity-0"},{default:fe(()=>[Q(Sp,{zoom:O.value,onClick:k[9]||(k[9]=ot(()=>O.value=1,["stop"])),class:"duration-200"},null,8,["zoom"])]),_:1})]),progress:fe(()=>[X("div",{class:"h-0.5 rounded-t-sm max-w-full bg-orange-500 duration-500",style:Be({width:`${te(u)/(te(h).length-1)*100}%`})},null,4)]),default:fe(()=>[l.value?(R(),xe(oe,{key:0,ref_key:"body",ref:ie,zoom:O.value,"onUpdate:zoom":k[0]||(k[0]=yt=>O.value=yt),"page-index":M.value,pages:te(_),"total-imgs":te(h).length,direction:te(v),gap:te(S),"is-long-strip":te($),isRTL:te(j),"is-vertical":te(C),"space-top":d.value,busy:te(c),idle:H.value,"play-controller":te(y),"touch-device":g.touchDevice,onVnodeMounted:te(K).init,onPrev:p,onNext:b,onClick:Se,onDragEnd:ue,onWheelPassive:k[1]||(k[1]=()=>te(y).interfere())},Si({_:2},[l.value&&te(h).length?{name:"end",fn:fe(()=>{var yt;return[Q(q,{"has-next":!!((yt=B.value)!=null&&yt.nextPath),onNext:Ee,onHide:T},null,8,["has-next"])]}),key:"0"}:void 0]),1032,["zoom","page-index","pages","total-imgs","direction","gap","is-long-strip","isRTL","is-vertical","space-top","busy","idle","play-controller","touch-device","onVnodeMounted"])):Ae("",!0),a.value&&!Y.value&&!g.tourEnabled?(R(),xe(he,{key:1,direction:te(v)},null,8,["direction"])):Ae("",!0),a.value&&!Y.value?(R(),xe(be,{key:2,playing:!!te(y).isPlaying.value},null,8,["playing"])):Ae("",!0),J.value?(R(),xe(Pe,{key:3,"touch-device":g.touchDevice,onHide:U},null,8,["touch-device"])):Ae("",!0),g.tourEnabled?(R(),xe(Ze,{key:4,onHide:k[2]||(k[2]=()=>o("tourEnabledChanged",!1))})):Ae("",!0)]),_:2},[g.raw?{name:"back",fn:fe(()=>[Q(ht,{href:g.raw.title.url,title:"Back to manga"},{default:fe(()=>[Q(jt)]),_:1},8,["href"])]),key:"0"}:void 0,g.touchDevice?void 0:{name:"exit",fn:fe(()=>[Q(ht,{title:"Hide reader","data-tour":"You have entered Trackkun reader mode, press here to return to the original page",onClick:T},{default:fe(()=>[Q(Zt)]),_:1})]),key:"1"},B.value?{name:"chapter-nav",fn:fe(()=>[Q(vo,{modelValue:B.value.activeIndex,label:B.value.activeLabel,title:"Select chapter",items:B.value.chapters,"onUpdate:modelValue":dt},{item:fe(({item:yt})=>[Et(Je(yt.label),1)]),_:1},8,["modelValue","label","items"]),se.value||N.value?(R(),Z("div",ip,[Q(ht,{title:`${te(j)?"Next":"Prev"} chapter (←)`,href:se.value,disabled:!se.value,class:"!rounded-r-none"},{default:fe(()=>[Q(Ve)]),_:1},8,["title","href","disabled"]),Q(ht,{title:`${te(j)?"Prev":"Next"} chapter (→)`,href:N.value,disabled:!N.value,class:"!rounded-l-none"},{default:fe(()=>[Q(rt)]),_:1},8,["title","href","disabled"])])):Ae("",!0)]),key:"2"}:void 0,te(_).length?{name:"page-nav",fn:fe(()=>[Q(_o,{"model-value":M.value,disabled:!a.value,pages:te(_),"total-imgs":te(h).length,"onUpdate:modelValue":te(K).goToPage},null,8,["model-value","disabled","pages","total-imgs","onUpdate:modelValue"])]),key:"3"}:void 0,g.raw?{name:"entry",fn:fe(()=>[Q(ht,{title:g.entryId?"View entry (T)":"Add to library (T)","data-tour":"Prress here to add to your collection",onClick:F},{default:fe(()=>[g.entryId?(R(),xe(mp,{key:0})):(R(),xe(vp,{key:1}))]),_:1},8,["title"])]),key:"4"}:void 0,g.touchDevice?void 0:{name:"full-screen",fn:fe(()=>[Q(ht,{title:`${P.value?"Exit":"Enter"} fullscreen (F)`,onClick:A},{default:fe(()=>[P.value?(R(),xe(_p,{key:0})):(R(),xe(bp,{key:1}))]),_:1},8,["title"])]),key:"5"},te($)?{name:"play",fn:fe(()=>[Q(ht,{"data-tour":"Press here to play like a video",title:`${te(y).isPlaying.value?"Pause":"Play"} (Space)`,disabled:!a.value,onClick:k[8]||(k[8]=()=>te(y).toggle())},{default:fe(()=>[te(y).isPlaying.value?(R(),xe(wp,{key:0})):(R(),xe(xp,{key:1}))]),_:1},8,["title","disabled"])]),key:"6"}:void 0]),1032,["loading","immediate","full-screen","idle","space-top","rtl"])):Ae("",!0)}}}),[["styles",[`/*! tailwindcss v3.4.0 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:Helvetica,sans-serif;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}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-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;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{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-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]{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%;width:100%}*,: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: }::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: }.container{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}}.\\!pointer-events-none{pointer-events:none!important}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.bottom-0{bottom:0}.bottom-full{bottom:100%}.left-0{left:0}.left-1\\/2{left:50%}.right-0{right:0}.top-0{top:0}.top-1{top:4px}.top-1\\/2{top:50%}.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-50{z-index:50}.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}.mb-8{margin-bottom:32px}.ml-1{margin-left:4px}.ml-auto{margin-left:auto}.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-0{height:0}.h-0\\.5{height:2px}.h-1{height:4px}.h-1\\.5{height:6px}.h-10{height:40px}.h-12{height:48px}.h-16{height:64px}.h-20{height:80px}.h-24{height:96px}.h-4{height:16px}.h-6{height:24px}.h-7{height:28px}.h-8{height:32px}.h-9{height:36px}.h-\\[101\\%\\]{height:101%}.h-\\[27rem\\]{height:432px}.h-full{height:100%}.h-screen{height:100vh}.max-h-\\[70vh\\]{max-height:70vh}.max-h-\\[80vh\\]{max-height:80vh}.max-h-full{max-height:100%}.w-1{width:4px}.w-1\\/3{width:33.333333%}.w-10{width:40px}.w-12{width:48px}.w-20{width:80px}.w-24{width:96px}.w-28{width:112px}.w-4{width:16px}.w-40{width:160px}.w-\\[4\\.5rem\\]{width:72px}.w-full{width:100%}.w-screen{width:100vw}.max-w-full{max-width:100%}.max-w-xs{max-width:320px}.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-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.-translate-y-1{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{--tw-translate-y:-4px}.-translate-y-1\\.5{--tw-translate-y:-6px}.-translate-y-1\\.5,.-translate-y-1\\/2{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\\/2{--tw-translate-y:-50%}.translate-y-0{--tw-translate-y:0px}.translate-y-0,.translate-y-1{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{--tw-translate-y:4px}.translate-y-1\\.5{--tw-translate-y:6px}.translate-y-1\\.5,.translate-y-full{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-full{--tw-translate-y:100%}.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}.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)}.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}.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-3{gap:12px}.gap-4{gap:16px}.gap-6{gap:24px}.gap-\\[1px\\]{gap:1px}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overscroll-contain{overscroll-behavior:contain}.text-ellipsis{text-overflow:ellipsis}.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-sm{border-radius:2px}.\\!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-t-sm{border-top-left-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-t-\\[1px\\]{border-top-width:1px}.border-solid{border-style:solid}.border-none{border-style:none}.border-stone-300{--tw-border-opacity:1;border-color:rgb(214 211 209/var(--tw-border-opacity))}.border-stone-400{--tw-border-opacity:1;border-color:rgb(168 162 158/var(--tw-border-opacity))}.border-stone-600{--tw-border-opacity:1;border-color:rgb(87 83 78/var(--tw-border-opacity))}.border-opacity-30{--tw-border-opacity:.3}.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity))}.bg-orange-500{--tw-bg-opacity:1;background-color:rgb(249 115 22/var(--tw-bg-opacity))}.bg-stone-300{--tw-bg-opacity:1;background-color:rgb(214 211 209/var(--tw-bg-opacity))}.bg-stone-400{--tw-bg-opacity:1;background-color:rgb(168 162 158/var(--tw-bg-opacity))}.bg-stone-600{--tw-bg-opacity:1;background-color:rgb(87 83 78/var(--tw-bg-opacity))}.bg-stone-800{--tw-bg-opacity:1;background-color:rgb(41 37 36/var(--tw-bg-opacity))}.bg-transparent{background-color:transparent}.bg-opacity-40{--tw-bg-opacity:.4}.bg-opacity-50{--tw-bg-opacity:.5}.bg-opacity-80{--tw-bg-opacity:.8}.bg-opacity-90{--tw-bg-opacity:.9}.bg-none{background-image:none}.object-contain{-o-object-fit:contain;object-fit:contain}.p-1{padding:4px}.p-2{padding:8px}.p-4{padding:16px}.p-6{padding:24px}.px-3{padding-left:12px;padding-right:12px}.px-4{padding-left:16px;padding-right:16px}.px-6{padding-left:24px;padding-right:24px}.py-1{padding-bottom:4px;padding-top:4px}.py-2{padding-bottom:8px;padding-top:8px}.pb-12{padding-bottom:48px}.pb-6{padding-bottom:24px}.pl-1{padding-left:4px}.pt-3{padding-top:12px}.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}.font-medium{font-weight:500}.lowercase{text-transform:lowercase}.leading-none{line-height:1}.text-primary{--tw-text-opacity:1;color:rgb(184 92 56/var(--tw-text-opacity))}.text-stone-100{--tw-text-opacity:1;color:rgb(245 245 244/var(--tw-text-opacity))}.text-stone-300{--tw-text-opacity:1;color:rgb(214 211 209/var(--tw-text-opacity))}.text-stone-400{--tw-text-opacity:1;color:rgb(168 162 158/var(--tw-text-opacity))}.text-stone-900{--tw-text-opacity:1;color:rgb(28 25 23/var(--tw-text-opacity))}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-90{opacity:.9}.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-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)}.transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.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)}.ease-linear{transition-timing-function:linear}.fixed-screen{height:100vh;left:0;position:fixed;top:0;width:100vw}.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}.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))}.hover\\:bg-stone-300:hover{--tw-bg-opacity:1;background-color:rgb(214 211 209/var(--tw-bg-opacity))}.hover\\:bg-stone-50:hover{--tw-bg-opacity:1;background-color:rgb(250 250 249/var(--tw-bg-opacity))}.hover\\:bg-stone-900:hover{--tw-bg-opacity:1;background-color:rgb(28 25 23/var(--tw-bg-opacity))}.hover\\:bg-opacity-10:hover{--tw-bg-opacity:.1}.hover\\:bg-opacity-50:hover{--tw-bg-opacity:.5}.hover\\:text-stone-100:hover{--tw-text-opacity:1;color:rgb(245 245 244/var(--tw-text-opacity))}.hover\\:text-stone-400:hover{--tw-text-opacity:1;color:rgb(168 162 158/var(--tw-text-opacity))}}.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))}.group:hover .group-hover\\:bg-opacity-20{--tw-bg-opacity:.2}}@media (min-width:300px){.\\32xs\\:gap-3{gap:12px}}@media (min-width:640px){.sm\\:w-\\[32rem\\]{width:512px}.sm\\:p-3{padding:12px}}@media (min-width:768px){.md\\:px-8{padding-left:32px;padding-right:32px}.md\\:pb-5{padding-bottom:20px}.md\\:text-lg{font-size:18px;line-height:28px}}@media (min-width:1024px){.lg\\:px-10{padding-left:40px;padding-right:40px}.lg\\:pb-3{padding-bottom:12px}}@media (min-width:1280px){.xl\\:px-12{padding-left:48px;padding-right:48px}}
26
+ `]]]),Ud=Object.freeze(Object.defineProperty({__proto__:null,default:rl},Symbol.toStringTag,{value:"Module"}));async function Tn(e,t,n){const o=await n(()=>{e=0});if(o!==void 0)return o;if(!(e<=0))return await new Promise(r=>{setTimeout(async()=>{const i=await Tn(e-1,t,n);r(i)},t)})}function ln(e=0){return new Promise(t=>setTimeout(t,e))}const il=3;function Yd(e){var P,J,y,H;const t=((J=(P=e.raw.value)==null?void 0:P.imgs)==null?void 0:J.filter(Boolean))??[];let n=!!t.length,o=t.map(O=>({src:O}));const r=an({}),i=[],s=G((y=e.raw.value)==null?void 0:y.isWebtoon),l=G((H=e.raw.value)==null?void 0:H.isWebtoon),a=Date.now(),c=e.touchDevice&&!navigator.userAgent.toLowerCase().includes("android");let u=!0,d=!1,h=!1,x=0,w=0,v,z=e.isAutoShow!==!1?e.page.value:n?Gd(t):void 0,j=!1;const re=We(m,50),C=()=>{j?re():(j=!0,m())};n?C():B(),_e(()=>{var O;return(O=e.raw.value)==null?void 0:O.imgs},O=>{O!=null&&O.length&&O.length!==o.length&&(n=!0,S(O.map(K=>({src:K}))))}),at(()=>{u=!1,i.forEach(O=>URL.revokeObjectURL(O))}),Gn(()=>{d&&mo({contentEl:v,images:o,page:e.page.value})});function $(){var ne,ce,ge,ue;if(d||s.value===void 0||z===void 0)return;const O=Math.max(0,Math.min(z,o.length)),K=o.length-1,M=Math.min(Math.floor(O),K);if(M>=1){const Se=(ne=o[M])==null?void 0:ne.src;if(!Se){e.isAutoShow&&mo({contentEl:v,images:o,page:M});return}const Ee=(ce=o[M-1])==null?void 0:ce.src;if(Ee&&!((ge=r[Ee])!=null&&ge.size)||!((ue=r[Se])!=null&&ue.size))return}if(d)return;d=!0,e.onReady(O);let D=!0;_e(()=>Math.floor(e.page.value),(Se,Ee)=>{mo({images:o,page:Se,smooth:c,isScrollDown:Ee===void 0||Se>Ee,skipIfVisible:D}),D=!1,Ee??(Ee=-1),Se!==Ee&&(x=Math.max(0,x-Math.abs(Se-Ee))),C()},{immediate:!0})}function S(O){(O.length!==o.length||O.some((M,D)=>{const ne=o[D];return(ne==null?void 0:ne.el)!==(M==null?void 0:M.el)||(ne==null?void 0:ne.src)!==(M==null?void 0:M.src)}))&&(o=O,e.isAutoShow===!1&&z===void 0&&(z=ll(O)),C())}async function m(){if(!u)return;const O=async M=>{x++,W(o[M],M).then(()=>{x--,re()}),await ln()},K=Math.max(0,Math.min(o.length-1,Math.floor(e.page.value-1)));for(let M=K;M<o.length;M++){if(x>=il)return;await O(M)}for(let M=K-1;M>=0;M--){if(x>=il)return;await O(M)}}async function W(O,K){const M=O.el;let D=O.src;if(!M&&!D||D&&r[D])return;const ne=M instanceof HTMLImageElement,ce=M instanceof HTMLCanvasElement;if(M){if(M._tkLoadId_===a)return;if(M._tkLoadId_=a,ne){const ue=()=>_(M);M.addEventListener("load",ue),at(()=>M.removeEventListener("load",ue))}}if(ne&&!D){if(D=go(M),!D)return;O.src=D}else ce&&!D&&(D=await sl(M),D&&i.push(D));if(!D)return;const ge=ne&&D.startsWith("blob");ge&&!M.complete||(r[D]={src:D,isLoading:!0,hasError:!1},ge&&c&&await ln(300),Y({imgEl:ne?M:void 0,src:D,index:K}))}async function _(O){if(!u)return;const K=o.findIndex(D=>D.el===O);if(K===-1)return;const M=go(O);M&&(!M.startsWith("blob")&&o[K].src===M||(o[K].src=M,r[M]??(r[M]={src:M,isLoading:!0,hasError:!1}),Y({imgEl:O,src:M,index:K})))}async function Y({imgEl:O,src:K,index:M}){const D=O?await Xd(O,K):K;if(!D)return;O&&D!==K&&i.push(D);const ne=await Zd(D,O),ce=!!ne&&(ne.width<200||ne.height<200);if(r[K]={src:D,size:ne,isLoading:!1,hasError:!ne,invalid:ce},ne&&!s.value&&M>Math.min(1,o.length-3)&&M<Math.max(o.length-2,3)){const ge=ne.height/ne.width,ue=ge>2||ge<.5,Se=ge>1.6||ge<.6;s.value!==ue&&(s.value=ue),l.value!==Se&&(l.value=Se)}$()}function B(){var ne;const O=We(()=>{v&&N(v)},100),K=new MutationObserver(O),M=(ne=e.spec)!=null&&ne.imgDivs?void 0:(()=>{let ce=window.innerWidth;return new ResizeObserver(We(()=>{const ge=window.innerWidth;if(ge!==ce){ce=ge;return}O()},50))})();Gn(async()=>{K.disconnect(),M==null||M.disconnect()});let D=!1;se(ce=>{v!==ce&&(v=ce,K.disconnect(),M==null||M.disconnect(),K.observe(v,{childList:!0,subtree:!0}),M==null||M.observe(v),D?O():(D=!0,N(v)))})}async function se(O){var ge;const K=(ge=e.spec)==null?void 0:ge.content;if(!K){O(document.body);return}const M=await qd(e.spec);let D=K?await Tn(M?100:1,10,()=>document.querySelector(K)):void 0;if(!D)return;O(D);let ne=0;const ce=async()=>{if(u&&!(D!=null&&D.isConnected)&&!n){if(ne=0,D=await Tn(50,20,()=>{const ue=document.querySelector(K);return ue!=null&&ue.isConnected&&ue!==D?ue:void 0}),!D)return;O(D)}!u||n||++ne>=10||setTimeout(ce,200)};setTimeout(ce,200)}async function N(O){var ne;if(!u||!O.isConnected||n)return;const K=Date.now();w=K;const M=(ne=e.spec)==null?void 0:ne.imgDivs,D=M?await ie(O,M):pe(O);if(!(w!==K||!O.isConnected||!u||n)){if(!e.raw.value&&!D.length){e.onError("no_img");return}S(D)}}async function ie(O,K){const M=Array.from(O.querySelectorAll(K)),D=new Map,ne=M.map(ce=>{const ge=ce.querySelectorAll("img,canvas");for(const ue of ge)if(xr(ue,D)){if(ue instanceof HTMLCanvasElement){if(al(ue))return{el:ue,parentEl:ce}}else if(ue instanceof HTMLImageElement&&cl(ue)){const Se=go(ue);return{el:ue,src:Se,parentEl:ce}}}return{parentEl:ce}});return!h&&e.isAutoShow!==!1&&e.page.value&&(h=!0,mo({contentEl:O,images:ne,page:e.page.value,skipIfVisible:!0}),await ln(1)),ne}function pe(O){const K=[],M={},D=new Map;return Array.from(O.querySelectorAll("img,canvas")).forEach(ce=>{if(xr(ce,D)){if(ce instanceof HTMLCanvasElement)al(ce)&&K.push({el:ce});else if(ce instanceof HTMLImageElement&&cl(ce)){const ge=go(ce);if(ge){const ue=M[ge];if(ue!==void 0&&ue!==-1){K.splice(ue,1);return}M[ge]=K.length}K.push({el:ce,src:ge})}}}),K}return{asyncImgs:ae(()=>{Object.values(r);const O=[];return o.forEach(({src:K,parentEl:M})=>{const D=K?r[K]:void 0;(K&&!(D!=null&&D.invalid)||M)&&O.push(D)}),O}),isWebtoon:ae(()=>s.value??!1),maybeWebtoon:ae(()=>l.value??!1)}}async function qd(e){const{lstrip:t,lstripBtn:n}=e||{};if(!n||!!t&&!!document.querySelector(t))return!1;const r=await Tn(50,30,()=>document.querySelector(n));if(!r)return!1;if(r.tagName.toLowerCase()==="a"&&!r._tkDirty_){r._tkDirty_=!0;const i=s=>s.preventDefault();r.addEventListener("click",i),at(()=>{delete r._tkDirty_,r.removeEventListener("click",i)})}return r.click(),await ln(),!0}function sl(e){return new Promise(t=>{const n=o=>{if(!o)return t(void 0);const r=URL.createObjectURL(o);t(r)};e.toBlob(n,"image/jpeg",1)})}async function Xd(e,t){if(!t.startsWith("blob:"))return t;if(!e.naturalWidth||!e.naturalHeight)return;const o=document.createElement("canvas"),r=o.getContext("2d"),i=e.naturalWidth,s=e.naturalHeight;return o.width=i,o.height=s,r==null||r.drawImage(e,0,0,i,s),await sl(o)}async function Zd(e,t){return(t==null?void 0:t.src)===e&&t.naturalWidth&&t.naturalHeight?{width:t.naturalWidth,height:t.naturalHeight}:await new Promise(n=>{const o=new Image,r=setInterval(()=>{const{naturalWidth:i,naturalHeight:s}=o;s&&i&&(n({width:i,height:s}),clearInterval(r))},20);o.onerror=()=>{n(void 0),clearInterval(r)},o.src=e})}function Gd(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 ll(n)}function ll(e){var t,n;for(let o=0;o<e.length;o++){const r=((t=e[o])==null?void 0:t.el)??((n=e[o])==null?void 0:n.parentEl),i=r==null?void 0:r.getBoundingClientRect();if(!i||i.bottom<=0)continue;const s=i.top;return o+(s>=0?0:-s/i.height)}return 0}function al(e){return e.isConnected&&e.width>=200&&e.height>=200}function cl(e){if(!e.isConnected)return!1;const t=e.getBoundingClientRect();return!t.width||!t.height||t.width>=200&&t.height>=200}function go(e){const t=e.getAttributeNames(),n=t.indexOf("src");n!==-1&&(t.splice(n,1),t.push("src"));for(const o of t){if(o==="srcset"||o!=="data-url"&&o!=="data-original"&&!o.includes("src"))continue;const r=e.getAttribute(o);if(r)return o==="src"&&e.naturalWidth&&e.naturalWidth<200?void 0:r.replace(/(\n|\t)/g," ").trim()}}function xr(e,t){if(!e||e===document.body)return!0;const n=t.get(e);if(n!==void 0)return n;const o=getComputedStyle(e);if(!(o.display!=="none"&&o.visibility!=="hidden"&&+(o.opacity??"1")>.1))return t.set(e,!1),!1;const i=xr(e.parentElement,t);return t.set(e,i),i}function mo({contentEl:e,images:t,page:n,smooth:o,skipIfVisible:r,isScrollDown:i}){const s=Math.floor(n),l=t[Math.min(t.length-1,s)];if(!l)return;const a=l.el??l.parentEl??document.querySelector(`img[src^="${l.src}"]`);if(!a)return;const c=o?"smooth":"instant";if(n>=t.length){a==null||a.scrollIntoView({block:"end",behavior:c});return}const d=a.getBoundingClientRect();if(r&&d.top<=0&&d.top+d.height>0)return;a.scrollIntoView({block:i?"end":"start",behavior:c});const h=n%1;if(h){const x=h*d.height,w=Sr(e??document.documentElement);setTimeout(()=>w==null?void 0:w.scrollBy({top:x}))}}function Sr(e){if(e)return e.scrollHeight>e.clientHeight?e===document.body?Sr(document.documentElement)??e:e:Sr(e.parentElement??void 0)}function Jd(e,t){return ae(()=>t.value?ul(e.value):e.value.map((n,o)=>[{img:n,index:o}]))}function ul(e,t=0){if(e.length===0)return[];const n=e.slice(0,2),r=n.some(i=>(i==null?void 0:i.size)&&i.size.width>i.size.height)?[n[0]]:n;return[r.map((i,s)=>({img:i,index:t+s})),...ul(e.slice(r.length),t+r.length)]}function Qd(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=G(t&&e>0?Math.max(0,e):+(sessionStorage.getItem("tk:page")??"0")||e);return ae({get:()=>o.value,set:r=>{o.value=r,sessionStorage.setItem("tk:page",r+"")}})}function ep(){sessionStorage.removeItem("tk:page"),sessionStorage.removeItem("tk:page:path")}const Cr=40;function tp({page:e,direction:t,style:n,isLongStrip:o,isVertical:r,isRTL:i,spaceTop:s,scrollEl:l,isWebtoon:a,interferePlayer:c,onChangedPage:u,onInitialized:d,onFinished:h}){let x=!1,w=!1,v=!1,z;const j=We(Y,300),re=Vs(()=>{Y(),j()},300),C=We(m,50);async function $(){W(e.value,{smooth:!1,ensureLastImgVisibility:!0})}function S(){var y;w=!0,d(),B(),(y=l.value)==null||y.addEventListener("scroll",re),setTimeout(()=>{const{width:H,height:O}=xd();_e(H,()=>{r.value&&C()}),_e(O,()=>{r.value||C()}),_e(n,m),_e(t,m)},300)}async function m(){if(!w||x)return;x=!0,await vt();const y=e.value;if(N()===y){x=!1;return}W(y)}function W(y,{smooth:H,ensureLastImgVisibility:O=!1}={smooth:!1}){const K=l.value;if(!K)return;x=!0;const M=async()=>{await vt(),x=!1,w||S()},D=Math.floor(y),ne=K.querySelector(`[data-index="${D}"],[data-index2="${D}"]`);if(!ne){M();return}c(async()=>{await _(K,!o.value&&H,async()=>{await J(K,ne,{smooth:H,page:y,ensureLastImgVisibility:O})}),await M()})}async function _(y,H,O){H&&y.style.setProperty("scroll-snap-type","none"),await O(),H&&y.style.removeProperty("scroll-snap-type")}function Y(){if(x)return;const y=N();y!==void 0&&y!==e.value&&u(y),B()}function B(){v||!v&&se()&&(v=!0,h())}function se(){const y=l.value;if(!y)return!1;const H=o.value?a.value?3:!r.value&&y.clientWidth>y.clientHeight?2.25:2.5:2;return r.value?y.scrollHeight-y.scrollTop<y.clientHeight*H:y.scrollWidth-(i.value?-y.scrollLeft:y.scrollLeft)<y.clientWidth*H}function N(){const y=ie();return y?(+y.getAttribute("data-index")||0)+(o.value?pe(y):0):void 0}function ie(){var H;if(z??(z=l.value.getRootNode()),!z)return;const y=(H=z.elementsFromPoint)==null?void 0:H.call(z,r.value||!o.value?window.innerWidth/2:i.value?window.innerWidth-Cr:Cr,r.value&&o.value?s.value||Cr:window.innerHeight/2);if(y)for(let O=0;O<y.length;O++){const K=y[O];if(K.hasAttribute("data-index"))return K;if(K===l.value)break}}function pe(y){const H=y.getBoundingClientRect();return r.value?Math.abs(H.top-s.value)/H.height:i.value?Math.max(0,H.right-l.value.clientWidth)/H.width:Math.abs(H.left)/H.width}let P=!1;async function J(y,H,O){if(P)return;const K=H.getBoundingClientRect();if(!o.value){if(r.value){if(K.top<=0&&K.bottom>=y.clientHeight)return}else if(K.left<=0&&K.right>=y.clientWidth)return}P=!0;const M=r.value?y.scrollTop:y.scrollLeft,D=O.page,ne=o.value?D%1:0,ce=await Tn(30,10,async()=>{await ln();let Re;if(!(H.offsetHeight<10))return o.value?r.value?Re=H.offsetTop+ne*H.offsetHeight-s.value:i.value?Re=H.offsetLeft-y.clientWidth+H.offsetWidth-ne*H.offsetWidth:Re=H.offsetLeft+ne*H.offsetWidth:r.value?Re=H.offsetTop+(K.top>0?0:K.height-y.clientHeight):Re=H.offsetLeft+(K.left>0?0:K.width-y.clientWidth),D>.5&&Math.abs(Re)<100?void 0:Re})??0,ge=O.ensureLastImgVisibility?r.value?Math.min(ce,y.scrollHeight-y.clientHeight*2):i.value?Math.max(ce,-(y.scrollWidth-y.clientWidth*2)):Math.min(ce,y.scrollWidth-y.clientWidth*2):ce;if(!O.smooth){r.value?y.scrollTop=ge:y.scrollLeft=ge,P=!1;return}const ue=ge-M,Se=30;let Ee=0;return new Promise(Re=>{(function dt(){const pt=np(Ee,M,ue,Se);r.value?y.scrollTop=pt:y.scrollLeft=pt,Ee++,Ee<=Se?requestAnimationFrame(dt):(Re(),P=!1)})()})}return{init:$,goToPage:W}}function np(e,t,n,o){return n*(Math.pow(e/o-1,3)+1)+t}function op({autoPlay:e,touchDevice:t,scrollEl:n,isVertical:o,isRTL:r,isLongStrip:i,speed:s}){const l=sessionStorage.getItem("tk:playing"),a=G(typeof l=="string"?l==="true":e),c=ae({get:()=>a.value,set:_=>{a.value=_,sessionStorage.setItem("tk:playing",_?"true":"false")}}),u=G(!1);let d,h;const x=We(m,100),w=We(()=>{u.value=!0},t?2e3:1e3),v=()=>setTimeout(()=>{u.value=!1,w()},30);v(),t||zt(window,"mousemove",v);const z=Ks();tt(()=>{_e(z,_=>{c.value&&(_==="visible"?m():h==null||h())}),_e(s,()=>j()),_e(i,_=>{_||C()})});async function j(_){c.value&&(h==null||h()),_&&(await vt(),await _()),c.value&&x()}function re(){c.value?C():$()}function C(){c.value&&(c.value=!1,h==null||h(),v())}function $(){!c.value&&i.value&&(c.value=!0,m(),v())}function S(){h==null||h()}function m(){const _=n.value;if(!c.value||!_)return;const Y=o.value?_.scrollHeight-_.clientHeight:_.scrollWidth-_.clientWidth,B=W();if(Y<=B){C();return}h=()=>{d=Date.now(),h=void 0};const se=Date.now();d=se;const N=.05*s.value,ie=o.value?"scrollTop":"scrollLeft";let pe=Date.now(),P=0;const J=()=>{if(d!==se)return;const y=Date.now(),H=y-pe;pe=y;const O=N*H+P;O>=1?(P=O%1,_[ie]+=(O-P)*(r.value?-1:1)):P=O,setTimeout(J,1)};J()}function W(){const _=n.value;return o.value?_.scrollTop:r.value?-_.scrollLeft:_.scrollLeft}return{isPlaying:c,isIdle:u,toggle:re,play:$,pause:S,resume:m,stop:C,interfere:j,awake:v}}function rp(e){var x,w,v,z,j,re;let t=-1,n=(x=e.prev)==null?void 0:x.slug,o=(w=e.next)==null?void 0:w.slug;const{vol:r,inferVol:i,chap:s,title:l,slug:a,basePath:c}=e,u=r??i,d=((v=l.chapters)==null?void 0:v.filter(C=>C.slug))??[],h=d.length>1?d:[];if(h.length){if(t=h.findIndex(C=>C.slug===e.slug),t===-1&&(t=h.findIndex(C=>(C.vol??C.inferVol)===u&&C.chap===s)),t===-1&&(t=h.findIndex(C=>a.startsWith(`${C.slug}-`)&&a.length-C.slug.length>3)),t!==-1)n??(n=(z=h[t+1])==null?void 0:z.slug),o??(o=(j=h[t-1])==null?void 0:j.slug);else if(!n&&!o){const C=h.findIndex($=>{const S=$.vol??$.inferVol;return u===void 0||S===void 0||u===S?$.chap<s:S<u});C!==-1?(n=h[C].slug,o=(re=h[C-1])==null?void 0:re.slug):o=h[h.length-1].slug}}return{activeIndex:t,activeLabel:fl({vol:r,chap:s}),chapters:h.map(C=>({label:fl(C),path:kr(c,C.slug)})),prevPath:kr(c,n),nextPath:kr(c,o)}}function kr(e,t){return!t||t.includes("//")||t.startsWith("/")?t:(e||"/")+t}function fl({vol:e,chap:t}){return e==null?`Ch.${t}`:`Vol.${e} ch.${t}`}const ip={key:0,class:"ml-auto inline-flex gap-[1px] scale-95 origin-right"},dl=we(Te({inheritAttrs:!1,__name:"TrackkunReader",props:{immediate:{type:Boolean},raw:{},spec:{},page:{},spaceTop:{},fullScreen:{type:Boolean},touchDevice:{type:Boolean},entryId:{},autoPlay:{type:Boolean},readerStyle:{},direction:{},isGuest:{type:Boolean},isAutoShow:{type:Boolean},tourEnabled:{type:Boolean}},emits:["error","ready","pageChanged","fullScreenChanged","playingChanged","tourEnabledChanged","dispose","openEntry","addEntry","finished"],setup(e,{emit:t}){const n=e,o=t;let r=!1,i,s=-1;const l=G(!1),a=G(!1),c=wu({touchDevice:n.touchDevice}),u=Qd(n.page,n.isAutoShow),d=ae(()=>n.spaceTop??0),{asyncImgs:h,isWebtoon:x,maybeWebtoon:w}=Yd({raw:ae(()=>n.raw),spec:n.spec,page:u,touchDevice:n.touchDevice,isAutoShow:n.isAutoShow,spaceTop:d,async onReady(g){ce(g),l.value=!0},onError:()=>{o("error"),T()}}),{direction:v,style:z,isRTL:j,isDouble:re,isVertical:C,isLongStrip:$,gap:S,speed:m,zoom:W}=cf({titleName:ae(()=>{var g;return(g=n.raw)==null?void 0:g.title.name}),isWebtoon:x,maybeWebtoon:w,defaultStyle:n.readerStyle,defaultDirection:n.direction}),_=Jd(h,re),Y=ae(()=>u.value>=h.value.length),B=ae(()=>n.raw?rp(n.raw):void 0),se=ae(()=>{var g,k;return j.value?(g=B.value)==null?void 0:g.nextPath:(k=B.value)==null?void 0:k.prevPath}),N=ae(()=>{var g,k;return j.value?(g=B.value)==null?void 0:g.prevPath:(k=B.value)==null?void 0:k.nextPath}),ie=G(null),pe=G(null),P=G(!1),J=G(!1),y=op({autoPlay:!n.tourEnabled&&n.autoPlay,touchDevice:n.touchDevice,scrollEl:ae(()=>{var g;return(g=ie.value)==null?void 0:g.$el}),speed:m,isRTL:j,isVertical:C,isLongStrip:$}),H=ae(()=>!n.touchDevice&&y.isIdle.value&&!c.value),O=ae({get(){return W.value},set(g){y.interfere(()=>{W.value=g})}}),K=tp({page:u,style:z,direction:v,isLongStrip:$,isVertical:C,isRTL:j,spaceTop:d,isWebtoon:x,scrollEl:ae(()=>{var g;return(g=ie.value)==null?void 0:g.$el}),interferePlayer:g=>y.interfere(g),onChangedPage:ce,onInitialized(){o("ready"),a.value=!0,n.touchDevice&&(i=ge())},onFinished:()=>o("finished")}),M=ae(()=>Math.floor(u.value)),D=()=>y.interfere(()=>ln(100));Ou().addListener({onKeyDown:g=>{if(n.tourEnabled)return;const k=$.value&&C.value,q=$.value&&!C.value,oe=!$.value&&C.value,he=!$.value&&!C.value;switch(g.key){case" ":g.preventDefault(),$.value?(U(!1),y.toggle()):b();break;case"ArrowUp":case"PageUp":k?D():oe&&M.value!==0&&(g.preventDefault(),p());break;case"ArrowDown":case"PageDown":k?D():oe&&!Y.value&&(g.preventDefault(),b());break;case"ArrowLeft":q?D():he?(g.preventDefault(),En()):C.value&&Re();break;case"ArrowRight":q?D():he?(g.preventDefault(),f()):C.value&&Ee();break}},onKeyUp:g=>{switch(g.key){case"f":A();break;case"t":F();break;case"h":U();break}}}),zt("fullscreenchange",()=>{P.value=!!document.fullscreenElement}),_e(y.isPlaying,g=>{g||L(!1),o("playingChanged",g)}),_e(y.isIdle,g=>{y.isPlaying.value&&L(g)}),_e(c,g=>{!g&&y.isIdle.value?y.awake():g&&n.fullScreen&&L()});function ce(g){if(u.value===g)return;const k=h.value.length;if(g<0||g>=k+1)return;const q=u.value;u.value=g;const oe=Math.floor(g*100)/100;oe!==s&&(s=oe,o("pageChanged",oe)),g>=k?(L(!1),y.stop()):g<.01?(L(!1),y.awake()):n.touchDevice&&!r&&($.value?i!==void 0&&ge()-i>300&&L(!0):Math.abs(q-g)===1&&L(!0))}function ge(){var k;const g=(k=ie.value)==null?void 0:k.$el;return g?C.value?g.scrollTop:j.value?-g.scrollLeft:g.scrollLeft:0}function ue(){!n.touchDevice&&!$.value&&K.goToPage(M.value,{smooth:!0})}function Se(){if(y.isPlaying.value){!n.fullScreen||!n.touchDevice?y.stop():y.awake();return}L()}function Ee(){var g;pt((g=B.value)==null?void 0:g.nextPath)}function Re(){var g;pt((g=B.value)==null?void 0:g.prevPath)}function dt(g){var q,oe,he;const k=(he=(oe=(q=B.value)==null?void 0:q.chapters)==null?void 0:oe[g])==null?void 0:he.path;k&&pt(k)}function pt(g){g&&(location.href=g.includes("://")?g:location.origin+g)}function En(){j.value?b():p()}function f(){j.value?p():b()}function p(){var q;const g=_.value,k=Y.value?g[g.length-1][0].index:(q=g[I()-1])==null?void 0:q[0].index;k!==void 0?K.goToPage(k):Re()}function b(){var g,k;if(Y.value)Ee();else{const q=((k=(g=_.value[I()+1])==null?void 0:g[0])==null?void 0:k.index)??h.value.length;K.goToPage(q)}}function I(){const g=M.value,k=_.value.findIndex(q=>q.some(({index:oe})=>oe===g));return k===-1?_.value.length-1:k}function T(){ep(),y.stop(),o("dispose")}async function L(g){if(c.value&&!n.fullScreen)return;r=!0;const k=typeof g=="boolean"?g:!n.fullScreen;o("fullScreenChanged",k),k&&setTimeout(()=>{n.fullScreen&&c.value&&o("fullScreenChanged",!1)},100)}function F(){n.entryId?E():V()}function A(){var g,k;document.fullscreenElement?document.exitFullscreen():(k=(g=pe.value)==null?void 0:g.$el)==null||k.requestFullscreen()}function V(){y.stop(),o("addEntry")}function E(){y.stop(),o("openEntry",n.entryId)}function U(g){J.value!==g&&(J.value=!J.value,J.value&&y.isPlaying.value&&y.stop())}return(g,k)=>{const q=rl,oe=ol,he=el,be=Js,Pe=Gs,Ze=Zs,jt=Bs,ht=uo,Zt=js,vo=vr,Ve=zs,rt=As,_o=Ls,mp=Os,vp=Ps,_p=Es,bp=$s,yp=Ts,wp=gr,xp=hr,Sp=bs,Cp=vs;return g.immediate||l.value?(R(),xe(Cp,{key:0,ref_key:"root",ref:pe,loading:!a.value,immediate:!!g.immediate,"full-screen":!!g.fullScreen,idle:H.value,"space-top":d.value,rtl:te(j),onClick:k[10]||(k[10]=ot(()=>{},["stop"]))},Si({settings:fe(()=>{var yt;return[Q(yp,{"reader-style":te(z),"onUpdate:readerStyle":k[3]||(k[3]=wt=>Me(z)?z.value=wt:null),direction:te(v),"onUpdate:direction":k[4]||(k[4]=wt=>Me(v)?v.value=wt:null),gap:te(S),"onUpdate:gap":k[5]||(k[5]=wt=>Me(S)?S.value=wt:null),speed:te(m),"onUpdate:speed":k[6]||(k[6]=wt=>Me(m)?m.value=wt:null),zoom:O.value,"onUpdate:zoom":k[7]||(k[7]=wt=>O.value=wt),name:(yt=g.raw)==null?void 0:yt.title.name,webtoon:te(x),disabled:!l.value,onHelp:U},null,8,["reader-style","direction","gap","speed","zoom","name","webtoon","disabled"])]}),"reset-zoom":fe(()=>[Q(on,{name:"fade","enter-from-class":"opacity-0","leave-to-class":"opacity-0"},{default:fe(()=>[Q(Sp,{zoom:O.value,onClick:k[9]||(k[9]=ot(()=>O.value=1,["stop"])),class:"duration-200"},null,8,["zoom"])]),_:1})]),progress:fe(()=>[X("div",{class:"h-0.5 rounded-t-sm max-w-full bg-orange-500 duration-500",style:Be({width:`${te(u)/(te(h).length-1)*100}%`})},null,4)]),default:fe(()=>[l.value?(R(),xe(oe,{key:0,ref_key:"body",ref:ie,zoom:O.value,"onUpdate:zoom":k[0]||(k[0]=yt=>O.value=yt),"page-index":M.value,pages:te(_),"total-imgs":te(h).length,direction:te(v),gap:te(S),"is-long-strip":te($),isRTL:te(j),"is-vertical":te(C),"space-top":d.value,busy:te(c),idle:H.value,"play-controller":te(y),"touch-device":g.touchDevice,onVnodeMounted:te(K).init,onPrev:p,onNext:b,onClick:Se,onDragEnd:ue,onWheelPassive:k[1]||(k[1]=()=>te(y).interfere())},Si({_:2},[l.value&&te(h).length?{name:"end",fn:fe(()=>{var yt;return[Q(q,{"has-next":!!((yt=B.value)!=null&&yt.nextPath),onNext:Ee,onHide:T},null,8,["has-next"])]}),key:"0"}:void 0]),1032,["zoom","page-index","pages","total-imgs","direction","gap","is-long-strip","isRTL","is-vertical","space-top","busy","idle","play-controller","touch-device","onVnodeMounted"])):Ae("",!0),a.value&&!Y.value&&!g.tourEnabled?(R(),xe(he,{key:1,direction:te(v)},null,8,["direction"])):Ae("",!0),a.value&&!Y.value?(R(),xe(be,{key:2,playing:!!te(y).isPlaying.value},null,8,["playing"])):Ae("",!0),J.value?(R(),xe(Pe,{key:3,"touch-device":g.touchDevice,onHide:U},null,8,["touch-device"])):Ae("",!0),g.tourEnabled?(R(),xe(Ze,{key:4,onHide:k[2]||(k[2]=()=>o("tourEnabledChanged",!1))})):Ae("",!0)]),_:2},[g.raw?{name:"back",fn:fe(()=>[Q(ht,{href:g.raw.title.url,title:"Back to manga"},{default:fe(()=>[Q(jt)]),_:1},8,["href"])]),key:"0"}:void 0,g.touchDevice?void 0:{name:"exit",fn:fe(()=>[Q(ht,{title:"Hide reader","data-tour":"You have entered Trackkun reader mode, press here to return to the original page",onClick:T},{default:fe(()=>[Q(Zt)]),_:1})]),key:"1"},B.value?{name:"chapter-nav",fn:fe(()=>[Q(vo,{modelValue:B.value.activeIndex,label:B.value.activeLabel,title:"Select chapter",items:B.value.chapters,"onUpdate:modelValue":dt},{item:fe(({item:yt})=>[Et(Je(yt.label),1)]),_:1},8,["modelValue","label","items"]),se.value||N.value?(R(),Z("div",ip,[Q(ht,{title:`${te(j)?"Next":"Prev"} chapter (←)`,href:se.value,disabled:!se.value,class:"!rounded-r-none"},{default:fe(()=>[Q(Ve)]),_:1},8,["title","href","disabled"]),Q(ht,{title:`${te(j)?"Prev":"Next"} chapter (→)`,href:N.value,disabled:!N.value,class:"!rounded-l-none"},{default:fe(()=>[Q(rt)]),_:1},8,["title","href","disabled"])])):Ae("",!0)]),key:"2"}:void 0,te(_).length?{name:"page-nav",fn:fe(()=>[Q(_o,{"model-value":M.value,disabled:!a.value,pages:te(_),"total-imgs":te(h).length,"onUpdate:modelValue":te(K).goToPage},null,8,["model-value","disabled","pages","total-imgs","onUpdate:modelValue"])]),key:"3"}:void 0,g.raw?{name:"entry",fn:fe(()=>[Q(ht,{title:g.entryId?"View entry (T)":"Add to library (T)","data-tour":"Prress here to add to your collection",onClick:F},{default:fe(()=>[g.entryId?(R(),xe(mp,{key:0})):(R(),xe(vp,{key:1}))]),_:1},8,["title"])]),key:"4"}:void 0,g.touchDevice?void 0:{name:"full-screen",fn:fe(()=>[Q(ht,{title:`${P.value?"Exit":"Enter"} fullscreen (F)`,onClick:A},{default:fe(()=>[P.value?(R(),xe(_p,{key:0})):(R(),xe(bp,{key:1}))]),_:1},8,["title"])]),key:"5"},te($)?{name:"play",fn:fe(()=>[Q(ht,{"data-tour":"Press here to play like a video",title:`${te(y).isPlaying.value?"Pause":"Play"} (Space)`,disabled:!a.value,onClick:k[8]||(k[8]=()=>te(y).toggle())},{default:fe(()=>[te(y).isPlaying.value?(R(),xe(wp,{key:0})):(R(),xe(xp,{key:1}))]),_:1},8,["title","disabled"])]),key:"6"}:void 0]),1032,["loading","immediate","full-screen","idle","space-top","rtl"])):Ae("",!0)}}}),[["styles",[`/*! tailwindcss v3.4.0 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:Helvetica,sans-serif;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}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-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;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{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-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]{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%;width:100%}*,: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: }::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: }.container{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}}.\\!pointer-events-none{pointer-events:none!important}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.bottom-0{bottom:0}.bottom-full{bottom:100%}.left-0{left:0}.left-1\\/2{left:50%}.right-0{right:0}.top-0{top:0}.top-1{top:4px}.top-1\\/2{top:50%}.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-50{z-index:50}.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}.mb-8{margin-bottom:32px}.ml-1{margin-left:4px}.ml-auto{margin-left:auto}.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-0{height:0}.h-0\\.5{height:2px}.h-1{height:4px}.h-1\\.5{height:6px}.h-10{height:40px}.h-12{height:48px}.h-16{height:64px}.h-20{height:80px}.h-24{height:96px}.h-4{height:16px}.h-6{height:24px}.h-7{height:28px}.h-8{height:32px}.h-9{height:36px}.h-\\[101\\%\\]{height:101%}.h-\\[27rem\\]{height:432px}.h-full{height:100%}.h-screen{height:100vh}.max-h-\\[70vh\\]{max-height:70vh}.max-h-\\[80vh\\]{max-height:80vh}.max-h-full{max-height:100%}.w-1{width:4px}.w-1\\/3{width:33.333333%}.w-10{width:40px}.w-12{width:48px}.w-20{width:80px}.w-24{width:96px}.w-28{width:112px}.w-4{width:16px}.w-40{width:160px}.w-\\[4\\.5rem\\]{width:72px}.w-full{width:100%}.w-screen{width:100vw}.max-w-full{max-width:100%}.max-w-xs{max-width:320px}.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-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.-translate-y-1{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{--tw-translate-y:-4px}.-translate-y-1\\.5{--tw-translate-y:-6px}.-translate-y-1\\.5,.-translate-y-1\\/2{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\\/2{--tw-translate-y:-50%}.translate-y-0{--tw-translate-y:0px}.translate-y-0,.translate-y-1{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{--tw-translate-y:4px}.translate-y-1\\.5{--tw-translate-y:6px}.translate-y-1\\.5,.translate-y-full{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-full{--tw-translate-y:100%}.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}.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)}.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}.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-3{gap:12px}.gap-4{gap:16px}.gap-6{gap:24px}.gap-\\[1px\\]{gap:1px}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overscroll-contain{overscroll-behavior:contain}.text-ellipsis{text-overflow:ellipsis}.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-sm{border-radius:2px}.\\!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-t-sm{border-top-left-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-t-\\[1px\\]{border-top-width:1px}.border-solid{border-style:solid}.border-none{border-style:none}.border-stone-300{--tw-border-opacity:1;border-color:rgb(214 211 209/var(--tw-border-opacity))}.border-stone-400{--tw-border-opacity:1;border-color:rgb(168 162 158/var(--tw-border-opacity))}.border-stone-600{--tw-border-opacity:1;border-color:rgb(87 83 78/var(--tw-border-opacity))}.border-opacity-30{--tw-border-opacity:.3}.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity))}.bg-orange-500{--tw-bg-opacity:1;background-color:rgb(249 115 22/var(--tw-bg-opacity))}.bg-stone-300{--tw-bg-opacity:1;background-color:rgb(214 211 209/var(--tw-bg-opacity))}.bg-stone-400{--tw-bg-opacity:1;background-color:rgb(168 162 158/var(--tw-bg-opacity))}.bg-stone-600{--tw-bg-opacity:1;background-color:rgb(87 83 78/var(--tw-bg-opacity))}.bg-stone-800{--tw-bg-opacity:1;background-color:rgb(41 37 36/var(--tw-bg-opacity))}.bg-transparent{background-color:transparent}.bg-opacity-40{--tw-bg-opacity:.4}.bg-opacity-50{--tw-bg-opacity:.5}.bg-opacity-80{--tw-bg-opacity:.8}.bg-opacity-90{--tw-bg-opacity:.9}.bg-none{background-image:none}.object-contain{-o-object-fit:contain;object-fit:contain}.p-1{padding:4px}.p-2{padding:8px}.p-4{padding:16px}.p-6{padding:24px}.px-3{padding-left:12px;padding-right:12px}.px-4{padding-left:16px;padding-right:16px}.px-6{padding-left:24px;padding-right:24px}.py-1{padding-bottom:4px;padding-top:4px}.py-2{padding-bottom:8px;padding-top:8px}.pb-12{padding-bottom:48px}.pb-6{padding-bottom:24px}.pl-1{padding-left:4px}.pt-3{padding-top:12px}.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}.font-medium{font-weight:500}.lowercase{text-transform:lowercase}.leading-none{line-height:1}.text-primary{--tw-text-opacity:1;color:rgb(184 92 56/var(--tw-text-opacity))}.text-stone-100{--tw-text-opacity:1;color:rgb(245 245 244/var(--tw-text-opacity))}.text-stone-300{--tw-text-opacity:1;color:rgb(214 211 209/var(--tw-text-opacity))}.text-stone-400{--tw-text-opacity:1;color:rgb(168 162 158/var(--tw-text-opacity))}.text-stone-900{--tw-text-opacity:1;color:rgb(28 25 23/var(--tw-text-opacity))}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-90{opacity:.9}.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-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)}.transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.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)}.ease-linear{transition-timing-function:linear}.fixed-screen{height:100vh;left:0;position:fixed;top:0;width:100vw}.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}.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))}.hover\\:bg-stone-300:hover{--tw-bg-opacity:1;background-color:rgb(214 211 209/var(--tw-bg-opacity))}.hover\\:bg-stone-50:hover{--tw-bg-opacity:1;background-color:rgb(250 250 249/var(--tw-bg-opacity))}.hover\\:bg-stone-900:hover{--tw-bg-opacity:1;background-color:rgb(28 25 23/var(--tw-bg-opacity))}.hover\\:bg-opacity-10:hover{--tw-bg-opacity:.1}.hover\\:bg-opacity-50:hover{--tw-bg-opacity:.5}.hover\\:text-stone-100:hover{--tw-text-opacity:1;color:rgb(245 245 244/var(--tw-text-opacity))}.hover\\:text-stone-400:hover{--tw-text-opacity:1;color:rgb(168 162 158/var(--tw-text-opacity))}}.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))}.group:hover .group-hover\\:bg-opacity-20{--tw-bg-opacity:.2}}@media (min-width:300px){.\\32xs\\:gap-3{gap:12px}}@media (min-width:640px){.sm\\:w-\\[32rem\\]{width:512px}.sm\\:p-3{padding:12px}}@media (min-width:768px){.md\\:px-8{padding-left:32px;padding-right:32px}.md\\:pb-5{padding-bottom:20px}.md\\:text-lg{font-size:18px;line-height:28px}}@media (min-width:1024px){.lg\\:px-10{padding-left:40px;padding-right:40px}.lg\\:pb-3{padding-bottom:12px}}@media (min-width:1280px){.xl\\:px-12{padding-left:48px;padding-right:48px}}
27
27
  `]]]),sp=Object.freeze(Object.defineProperty({__proto__:null,default:dl},Symbol.toStringTag,{value:"Module"})),lp={},ap={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},cp=[X("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)];function up(e,t){return R(),Z("svg",ap,cp)}const fp=Object.freeze(Object.defineProperty({__proto__:null,default:we(lp,[["render",up]])},Symbol.toStringTag,{value:"Module"})),dp=`gear-second{display:block!important;inset:0!important;opacity:0!important;pointer-events:none!important;position:fixed!important;z-index:-10!important}html.gear-second,html.gear-second *{pointer-events:none!important;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 gear-second+*,html.gear-second body gear-second+*+*,html.gear-second body gear-second+*+*+*,html.gear-second body gear-second+*+*+*+*,html.gear-second>:not(body):not(head){--tw-translate-x:100%!important;--tw-translate-y:-100%!important;display:none!important;height:0!important;min-height:0!important;min-width:0!important;opacity:0!important;pointer-events:none!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;visibility:hidden!important;width:0!important}html.gear-second body{touch-action:pan-x pan-y!important}html.gear-second body gear-second{--tw-bg-opacity:1!important;background-color:rgb(0 0 0/var(--tw-bg-opacity))!important;filter:none!important;opacity:1!important;pointer-events:auto!important;transform:none!important;visibility:visible!important;z-index:10000000000000000!important}html.gear-second body .m-content #progress-bar{display:none!important}
28
28
  `,$n="gear-second",Ir={immediate:void 0,raw:void 0,spec:void 0,page:0,spaceTop:void 0,fullScreen:void 0,touchDevice:void 0,entryId:void 0,autoPlay:void 0,readerStyle:void 0,direction:void 0,isAutoShow:void 0,isGuest:void 0,tourEnabled:void 0,onError:void 0,onDispose:void 0,onFullScreenChanged:void 0,onPlayingChanged:void 0,onPageChanged:void 0,onOpenEntry:void 0,onAddEntry:void 0,onFinished:void 0},Xe={promise:void 0,data:an({...Ir})};async function pp(e){return Xe.promise?(Xe.data.raw=e.raw,await Xe.promise):(Xe.promise=new Promise(t=>{let n=!1,o=!1,r;const i=!!e.spaceTop||!!e.isAutoShow&&!!e.page,s=()=>{n||(n=!0,r&&document.body.removeChild(r),document.documentElement.classList.remove($n),Object.assign(Xe.data,Ir),Xe.promise=void 0)};Object.assign(Xe.data,Ir,e,{immediate:i,onReady(){i||(l(),setTimeout(()=>r.setAttribute("style","")))},onError(){var c,u;s(),o?((c=e.onDispose)==null||c.call(e),(u=e.onError)==null||u.call(e)):a()},onDispose:()=>{var c;s(),(c=e==null?void 0:e.onDispose)==null||c.call(e)},onFullScreenChanged:c=>{var u;Xe.data.fullScreen=c,(u=e.onFullScreenChanged)==null||u.call(e,c)},onPageChanged:c=>{var u;Xe.data.page=c,(u=e.onPageChanged)==null||u.call(e,c)},onTourEnabledChanged:c=>{Xe.data.tourEnabled=c}}),hp().then(()=>{if(n){a();return}r=document.createElement($n),document.documentElement.classList.add($n),i?(document.body.appendChild(r),setTimeout(l)):(r.setAttribute("style","background-color: transparent !important"),document.body.appendChild(r))});function l(){o||(o=!0,t({triggerDoubleTap:(c,u)=>Ad(c,u),updateArgs(c){Object.assign(Xe.data,c)},dispose:s}))}function a(){o||t(void 0)}}),await Xe.promise)}async function hp(){if(window.customElements.get($n))return;const e=document.createElement("style");e.appendChild(document.createTextNode(dp)),document.head.appendChild(e);const t=zc({styles:[await gp()],data:()=>({readerData:Xe.data}),render(){return Gi(dl,this.readerData)}});window.customElements.define($n,t)}async function gp(){const e=Object.assign({"./TrackkunReader.vue":sp,"./components/AutoNext.vue":Ud,"./components/BottomSheet.vue":zu,"./components/ButtonDropdown.vue":Nf,"./components/ButtonIcon.vue":Cu,"./components/ButtonReaderSettings.vue":ff,"./components/ButtonResetZoom.vue":uu,"./components/DirectionToast.vue":Md,"./components/HelpScreen.vue":kd,"./components/InputPercentage.vue":Du,"./components/InputSelect.vue":Fu,"./components/IntersectionWrapper.vue":jd,"./components/LoadingIndicator.vue":qc,"./components/PageNav.vue":Hf,"./components/PauseToast.vue":Id,"./components/ReaderBody.vue":Hd,"./components/ReaderLayout.vue":tu,"./components/ReaderTour.vue":Sd,"./components/TableField.vue":Nu,"./components/ZoomWrapper.vue":zd,"./components/icons/IconBack.vue":ad,"./components/icons/IconBookmarkNew.vue":If,"./components/icons/IconBookmarked.vue":Of,"./components/icons/IconChevronLeft.vue":Jf,"./components/icons/IconChevronRight.vue":Yf,"./components/icons/IconClose.vue":Eu,"./components/icons/IconExclamationCircle.vue":fp,"./components/icons/IconFullscreen.vue":mf,"./components/icons/IconFullscreenExit.vue":wf,"./components/icons/IconHelp.vue":qu,"./components/icons/IconNext.vue":Od,"./components/icons/IconPause.vue":yu,"./components/icons/IconPlay.vue":gu,"./components/icons/IconReaderExit.vue":od,"./components/icons/IconSettings.vue":Qu,"./components/icons/IconTriangle.vue":jf,"./components/icons/IconZoom.vue":su}),t=[];for(const n in e){const o=e[n];t.push(o.default.styles)}return t.join("")}return pp});
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "gear-second",
3
3
  "author": "endyquang",
4
- "version": "1.5.4",
4
+ "version": "1.5.5",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Trkun manga reader",
7
7
  "main": "index.js",