@lynx-js/web-rsbuild-server-middleware 0.20.1 → 0.20.3

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.
@@ -1,4 +1,4 @@
1
- "use strict";(globalThis.webpackChunk_lynx_js_web_rsbuild_server_middleware=globalThis.webpackChunk_lynx_js_web_rsbuild_server_middleware||[]).push([["724"],{2656(e,t,l){let i,n,a,s,o,r,d,h,c,u,m,p,v,b,g,f,y,E,S,_,w,x,T,C,O,L,I,F,k,A,z,P,R,M,H,D,N,j,G,$,V,U,W,B,X,Z,Y,q,J,K,Q,ee,et,el,ei,en,ea,es,eo,er,ed,eh,ec,eu,em,ep,ev,eb,eg,ef,ey,eE,eS,e_,ew,ex,eT,eC,eO,eL,eI,eF,ek,eA,ez,eP,eR,eM,eH,eD,eN,ej,eG,e$,eV,eU,eW,eB,eX,eZ,eY,eq,eJ,eK,eQ,e0,e1,e4,e2,e8,e3,e6,e9,e5,e7,te,tt,tl,ti,tn,ta,ts,to,tr,td,th,tc,tu,tm,tp,tv,tb,tg,tf,ty,tE,tS,t_,tw,tx,tT,tC,tO,tL,tI,tF,tk,tA,tz,tP,tR,tM,tH,tD,tN,tj,tG,t$,tV,tU,tW,tB,tX,tZ,tY,tq,tJ,tK,tQ,t0,t1,t4,t2,t8,t3,t6,t9,t5,t7,le,lt,ll,li,ln,la,ls,lo,lr,ld,lh,lc,lu,lm,lp,lv,lb,lg,lf,ly,lE,lS,l_,lw,lx,lT,lC,lO,lL,lI,lF,lk,lA,lz,lP,lR,lM,lH,lD,lN,lj,lG,l$,lV,lU,lW,lB,lX,lZ,lY,lq,lJ,lK,lQ,l0,l1,l4,l2,l8,l3,l6,l9,l5,l7,ie,it,il,ii,ia,is,io,ir,id,ih,ic,iu,im,ip,iv,ib,ig,iy,iE,iS,i_,iw,ix,iT,iC,iO,iL,iI,iF,ik,iA,iz,iP,iR,iM,iH,iD,iN,ij,iG,i$,iV,iU,iW,iB,iX,iZ,iY,iq,iJ,iK,iQ,i0,i1,i4,i2,i8,i3,i6,i9,i5,i7,ne,nt,nl,ni,nn,na,ns,no,nr,nd,nh,nc,nu,nm,np,nv,nb,ng,nf,ny,nE,nS,n_,nw,nx,nT,nC,nO,nL,nI,nF,nk,nA,nz,nP,nR,nM,nH,nD,nN,nj,nG,n$,nV,nU,nW,nB,nX,nZ,nY,nq,nJ,nK,nQ,n0,n1,n4,n2,n8,n3,n6,n9,n5,n7,ae,at,al,ai,an,aa,as,ao,ar,ad,ah,ac,au,am,ap,av,ab,ag,af,ay,aE,aS,a_,aw,ax,aT,aC;var aO,aL,aI,aF,ak=l(2198),aA=l(1034);a=[(0,aA.uA)("lynx-wrapper",[])],s=[],o=HTMLElement,class extends o{static{n=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(o[Symbol.metadata]??null):void 0;(0,ak.G4)(null,i={value:n},a,{kind:"class",name:n.name,metadata:e},null,s),n=i.value,e&&Object.defineProperty(n,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,ak.zF)(n,s)}};var az=l(9678);let aP=(h=[],c=[],u=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;r=[(0,aA._y)("fading-edge-length",!0)],d=[(0,aA.h3)("background"),(0,aA.h3)("background-color")],(0,ak.G4)(this,null,d,{kind:"method",name:"_backgroundColorToVariable",static:!1,private:!1,access:{has:e=>"_backgroundColorToVariable"in e,get:e=>e._backgroundColorToVariable},metadata:e},null,h),(0,ak.G4)(null,null,r,{kind:"field",name:"_handleFadingEdgeLength",static:!1,private:!1,access:{has:e=>"_handleFadingEdgeLength"in e,get:e=>e._handleFadingEdgeLength,set:(e,t)=>{e._handleFadingEdgeLength=t}},metadata:e},c,u),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}#e=(0,ak.zF)(this,h);#t=(0,aA.Ut)(()=>this.#e.shadowRoot,"#top-fade-mask");#l=(0,aA.Ut)(()=>this.#e.shadowRoot,"#bot-fade-mask");static observedAttributes=["fading-edge-length"];static observedCSSProperties=["background","background-color"];constructor(e){(0,ak.zF)(this,u),this.#e=e}_handleFadingEdgeLength=(0,ak.zF)(this,c,(0,aA._8)(()=>this.#e,"--scroll-view-fading-edge-length",e=>`${parseFloat(e)}px`));_backgroundColorToVariable(e){this.#t().style.setProperty("--scroll-view-bg-color",e),this.#l().style.setProperty("--scroll-view-bg-color",e)}connectedCallback(){}dispose(){}}),aR=(v=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;m=[(0,aA._y)("scroll-top",!1),(0,aA._y)("scroll-left",!1),(0,aA._y)("initial-scroll-offset",!1)],p=[(0,aA._y)("scroll-to-index",!1),(0,aA._y)("initial-scroll-to-index",!1)],(0,ak.G4)(this,null,m,{kind:"method",name:"_handleInitialScrollOffset",static:!1,private:!1,access:{has:e=>"_handleInitialScrollOffset"in e,get:e=>e._handleInitialScrollOffset},metadata:e},null,v),(0,ak.G4)(this,null,p,{kind:"method",name:"_handleInitialScrollIndex",static:!1,private:!1,access:{has:e=>"_handleInitialScrollIndex"in e,get:e=>e._handleInitialScrollIndex},metadata:e},null,v),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}#e=(0,ak.zF)(this,v);static observedAttributes=["scroll-top","scroll-left","initial-scroll-offset","scroll-to-index","initial-scroll-to-index"];constructor(e){this.#e=e}_handleInitialScrollOffset(e,t,l){if(e){let t=parseFloat(e),i=this.#e.getAttribute("scroll-orientation"),n=this.#e.getAttribute("scroll-y"),a=this.#e.getAttribute("scroll-x"),s=("scroll-top"===l||"initial-scroll-offset"===l)&&(""===n||"true"===n||"vertical"===i||"both"===i),o=("scroll-left"===l||"initial-scroll-offset"===l)&&(""===a||"true"===a||"vertical"===i||"both"===i);requestAnimationFrame(()=>{s&&this.#e.scrollTo(0,t),o&&(this.#e.scrollLeft=t)})}}_handleInitialScrollIndex(e){if(e){let t=parseFloat(e),l=this.#e.children.item(t);if(l&&l instanceof HTMLElement){let e=null!==this.#e.getAttribute("scroll-x");requestAnimationFrame(()=>{e?this.#e.scrollLeft=l.offsetLeft:this.#e.scrollTop=l.offsetTop})}}}dispose(){}});var aM=l(6946);function aH(e,t,l){let i;return n=>{null!==n?i||(i=new IntersectionObserver(l,{root:e()})).observe(t()):i&&(i.disconnect(),i=void 0)}}var aD=l(4366);let aN=(_=[],w=[],x=[],T=[],C=[],O=[],L=[],I=[],F=[],k=[],A=[],z=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;b=[(0,aA.ZR)("scrolltoupper")],g=[(0,aA.ZR)("scrolltolower")],f=[(0,aA._y)("upper-threshold",!0)],y=[(0,aA._y)("lower-threshold",!0)],E=[(0,aA.ZR)("lynxscroll")],S=[(0,aA.ZR)("lynxscrollend")],(0,ak.G4)(null,null,b,{kind:"field",name:"_handleScrollUpperThresholdEventEnabled",static:!1,private:!1,access:{has:e=>"_handleScrollUpperThresholdEventEnabled"in e,get:e=>e._handleScrollUpperThresholdEventEnabled,set:(e,t)=>{e._handleScrollUpperThresholdEventEnabled=t}},metadata:e},_,w),(0,ak.G4)(null,null,g,{kind:"field",name:"_handleScrollLowerThresholdEventEnabled",static:!1,private:!1,access:{has:e=>"_handleScrollLowerThresholdEventEnabled"in e,get:e=>e._handleScrollLowerThresholdEventEnabled,set:(e,t)=>{e._handleScrollLowerThresholdEventEnabled=t}},metadata:e},x,T),(0,ak.G4)(null,null,f,{kind:"field",name:"_updateUpperThreshold",static:!1,private:!1,access:{has:e=>"_updateUpperThreshold"in e,get:e=>e._updateUpperThreshold,set:(e,t)=>{e._updateUpperThreshold=t}},metadata:e},C,O),(0,ak.G4)(null,null,y,{kind:"field",name:"_updateLowerThreshold",static:!1,private:!1,access:{has:e=>"_updateLowerThreshold"in e,get:e=>e._updateLowerThreshold,set:(e,t)=>{e._updateLowerThreshold=t}},metadata:e},L,I),(0,ak.G4)(null,null,E,{kind:"field",name:"_handleScrollEventEnabled",static:!1,private:!1,access:{has:e=>"_handleScrollEventEnabled"in e,get:e=>e._handleScrollEventEnabled,set:(e,t)=>{e._handleScrollEventEnabled=t}},metadata:e},F,k),(0,ak.G4)(null,null,S,{kind:"field",name:"_handleScrollEndEventEnabled",static:!1,private:!1,access:{has:e=>"_handleScrollEndEventEnabled"in e,get:e=>e._handleScrollEndEventEnabled,set:(e,t)=>{e._handleScrollEndEventEnabled=t}},metadata:e},A,z),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}#e;#i;#n=0;#a=0;constructor(e){(0,ak.zF)(this,z),this.#e=e}#s=()=>this.#e;#o=(0,aA.Ut)(()=>this.#e.shadowRoot,"#upper-threshold-observer");#r=(0,aA.Ut)(()=>this.#e.shadowRoot,"#lower-threshold-observer");#d=e=>{let{isIntersecting:t,target:l}=e[0],i=l.id;t&&("upper-threshold-observer"===i?this.#e.dispatchEvent(new CustomEvent("scrolltoupper",{...aM.$,detail:this.#h()})):"lower-threshold-observer"===i&&this.#e.dispatchEvent(new CustomEvent("scrolltolower",{...aM.$,detail:this.#h()})))};static observedAttributes=["upper-threshold","lower-threshold"];_handleScrollUpperThresholdEventEnabled=(0,ak.zF)(this,_,e=>{e?this.#e.setAttribute("x-enable-scrolltoupper-event",""):this.#e.removeAttribute("x-enable-scrolltoupper-event"),this.#c(e)});#c=((0,ak.zF)(this,w),aH(this.#s,this.#o,this.#d));_handleScrollLowerThresholdEventEnabled=(0,ak.zF)(this,x,e=>{e?this.#e.setAttribute("x-enable-scrolltolower-event",""):this.#e.removeAttribute("x-enable-scrolltolower-event"),this.#u(e)});#u=((0,ak.zF)(this,T),aH(this.#s,this.#r,this.#d));_updateUpperThreshold=(0,ak.zF)(this,C,(0,aA._8)(this.#o,"flex-basis",e=>`${parseInt(e)}px`));_updateLowerThreshold=((0,ak.zF)(this,O),(0,ak.zF)(this,L,(0,aA._8)(this.#r,"flex-basis",e=>`${parseInt(e)}px`)));#h(){let{scrollTop:e,scrollLeft:t,scrollHeight:l,scrollWidth:i}=this.#s();0===e&&(e-=this.#e.scrollHeight/2-this.#e.scrollTop),0===t&&(t-=this.#e.scrollWidth/2-this.#e.scrollLeft);let n={scrollTop:e,scrollLeft:t,scrollHeight:l,scrollWidth:i,isDragging:!1,deltaX:t-this.#n,deltaY:e-this.#a};return this.#n=t,this.#a=e,n}#m=((0,ak.zF)(this,I),()=>{this.#p&&!aD.k&&(clearTimeout(this.#i),this.#i=setTimeout(()=>{this.#v()},100)),this.#e.dispatchEvent(new CustomEvent("lynxscroll",{...aM.$,detail:this.#h()}))});#v=()=>{this.#e.dispatchEvent(new CustomEvent("lynxscrollend",{...aM.$,detail:this.#h()}))};#b=!1;_handleScrollEventEnabled=(0,ak.zF)(this,F,e=>{this.#b=e,this.#g()});#p=((0,ak.zF)(this,k),!1);_handleScrollEndEventEnabled=(0,ak.zF)(this,A,e=>{this.#p=e,this.#g()});#g(){this.#b||this.#p?(this.#s().addEventListener("scroll",this.#m),this.#s().addEventListener("scrollend",this.#v),this.#e.addEventListener("scroll",this.#m),this.#e.addEventListener("scrollend",this.#v),this.#n=0,this.#a=0):(this.#e.removeEventListener("scroll",this.#m),this.#e.removeEventListener("scrollend",this.#v))}connectedCallback(){}dispose(){}});class aj{static eventName="__scrollIntoView";static observedAttributes=[];#e;#f=e=>{e.stopPropagation();let t=e.composedPath().filter(e=>e instanceof HTMLElement),l=[],i=this.#e;for(let e of t){if(e===i)break;l.push(e)}let n=this.#e.getAttribute("scroll-orientation"),a=null!==this.#e.getAttribute("scroll-x")||"both"===n||"horizontal"===n,s=null!==this.#e.getAttribute("scroll-y")||"both"===n||"vertical"===n,o=0,r=0;for(let{offsetTop:e,offsetLeft:t}of l)a&&(r+=t),s&&(o+=e);if(a)switch(e.detail.inline){case"center":r+=(e.target.clientWidth-this.#e.clientWidth)/2;break;case"end":r+=e.target.clientWidth-this.#e.clientWidth}if(s)switch(e.detail.block){case"center":o+=(e.target.clientHeight-this.#e.clientHeight)/2;break;case"end":o+=e.target.clientHeight-this.#e.clientHeight}i.scrollTo({behavior:"smooth"===e.detail.behavior?"smooth":"instant",left:r,top:o})};constructor(e){this.#e=e,this.#e.addEventListener(aj.eventName,this.#f,{passive:!1})}dispose(){this.#e.removeEventListener(aj.eventName,this.#f)}}let aG=`<style>
1
+ "use strict";(globalThis.webpackChunk_lynx_js_web_rsbuild_server_middleware=globalThis.webpackChunk_lynx_js_web_rsbuild_server_middleware||[]).push([["724"],{7067(e,t,n){let i,l,a,s,o,r,d,h,c,m,u,p,b,v,g,f,y,E,S,w,_,x,C,T,k,O,L,A,I,F,R,M,P,z,N,H,D,G,j,$,V,W,U,B,X,q,Z,Y,J,K,Q,ee,et,en,ei,el,ea,es,eo,er,ed,eh,ec,em,eu,ep,eb,ev,eg,ef,ey,eE,eS,ew,e_,ex,eC,eT,ek,eO,eL,eA,eI,eF,eR,eM,eP,ez,eN,eH,eD,eG,ej,e$,eV,eW,eU,eB,eX,eq,eZ,eY,eJ,eK,eQ,e0,e1,e4,e2,e8,e3,e6,e5,e9,e7,te,tt,tn,ti,tl,ta,ts,to,tr,td,th,tc,tm,tu,tp,tb,tv,tg,tf,ty,tE,tS,tw,t_,tx,tC,tT,tk,tO,tL,tA,tI,tF,tR,tM,tP,tz,tN,tH,tD,tG,tj,t$,tV,tW,tU,tB,tX,tq,tZ,tY,tJ,tK,tQ,t0,t1,t4,t2,t8,t3,t6,t5,t9,t7,ne,nt,nn,ni,nl,na,ns,no,nr,nd,nh,nc,nm,nu,np,nb,nv,ng,nf,ny,nE,nS,nw,n_,nx,nC,nT,nk,nO,nL,nA,nI,nF,nR,nM,nP,nz,nN,nH,nD,nG,nj,n$,nV,nW,nU,nB,nX,nq,nZ,nY,nJ,nK,nQ,n0,n1,n4,n2,n8,n3,n6,n5,n9,n7,ie,it,ii,il,ia,is,io,ir,id,ih,ic,im,iu,ip,ib,iv,ig,iy,iE,iS,iw,i_,ix,iC,iT,ik,iO,iL,iA,iI,iF,iR,iM,iP,iz,iN,iH,iD,iG,ij,i$,iV,iW,iU,iB,iX,iq,iZ,iY,iJ,iK,iQ,i0,i1,i4,i2,i8,i3,i6,i5,i9,i7,le,lt,ln,li,ll,la,ls,lo,lr,ld,lh,lc,lm,lu,lp,lb,lv,lg,lf,ly,lE,lS,lw,l_,lx,lC,lT,lk,lO,lL,lA,lI,lF,lR,lM,lP,lz,lN,lH,lD,lG,lj,l$,lV,lW,lU,lB,lX,lq,lZ,lY,lJ,lK,lQ,l0,l1,l4,l2,l8,l3,l6,l5,l9,l7,ae,at,an,ai,al,aa,as,ao,ar,ad,ah,ac,am,au,ap,ab,av,ag,af,ay,aE,aS,aw,a_,ax,aC,aT,ak,aO,aL,aA,aI,aF,aR,aM,aP,az,aN,aH,aD,aG,aj,a$,aV,aW,aU,aB,aX,aq,aZ,aY,aJ;var aK,aQ,a0,a1,a4=n(2198),a2=n(1034);h=[(0,a2.uA)("lynx-wrapper",[])],c=[],m=HTMLElement,class extends m{static{d=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(m[Symbol.metadata]??null):void 0;(0,a4.G4)(null,r={value:d},h,{kind:"class",name:d.name,metadata:e},null,c),d=r.value,e&&Object.defineProperty(d,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a4.zF)(d,c)}};var a8=n(9678);let a3=(b=[],v=[],g=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;u=[(0,a2._y)("fading-edge-length",!0)],p=[(0,a2.h3)("background"),(0,a2.h3)("background-color")],(0,a4.G4)(this,null,p,{kind:"method",name:"_backgroundColorToVariable",static:!1,private:!1,access:{has:e=>"_backgroundColorToVariable"in e,get:e=>e._backgroundColorToVariable},metadata:e},null,b),(0,a4.G4)(null,null,u,{kind:"field",name:"_handleFadingEdgeLength",static:!1,private:!1,access:{has:e=>"_handleFadingEdgeLength"in e,get:e=>e._handleFadingEdgeLength,set:(e,t)=>{e._handleFadingEdgeLength=t}},metadata:e},v,g),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}#e=(0,a4.zF)(this,b);#t=(0,a2.Ut)(()=>this.#e.shadowRoot,"#top-fade-mask");#n=(0,a2.Ut)(()=>this.#e.shadowRoot,"#bot-fade-mask");static observedAttributes=["fading-edge-length"];static observedCSSProperties=["background","background-color"];constructor(e){(0,a4.zF)(this,g),this.#e=e}_handleFadingEdgeLength=(0,a4.zF)(this,v,(0,a2._8)(()=>this.#e,"--scroll-view-fading-edge-length",e=>`${parseFloat(e)}px`));_backgroundColorToVariable(e){this.#t().style.setProperty("--scroll-view-bg-color",e),this.#n().style.setProperty("--scroll-view-bg-color",e)}connectedCallback(){}dispose(){}}),a6=(E=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;f=[(0,a2._y)("scroll-top",!1),(0,a2._y)("scroll-left",!1),(0,a2._y)("initial-scroll-offset",!1)],y=[(0,a2._y)("scroll-to-index",!1),(0,a2._y)("initial-scroll-to-index",!1)],(0,a4.G4)(this,null,f,{kind:"method",name:"_handleInitialScrollOffset",static:!1,private:!1,access:{has:e=>"_handleInitialScrollOffset"in e,get:e=>e._handleInitialScrollOffset},metadata:e},null,E),(0,a4.G4)(this,null,y,{kind:"method",name:"_handleInitialScrollIndex",static:!1,private:!1,access:{has:e=>"_handleInitialScrollIndex"in e,get:e=>e._handleInitialScrollIndex},metadata:e},null,E),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}#e=(0,a4.zF)(this,E);static observedAttributes=["scroll-top","scroll-left","initial-scroll-offset","scroll-to-index","initial-scroll-to-index"];constructor(e){this.#e=e}_handleInitialScrollOffset(e,t,n){if(e){let t=parseFloat(e),i=this.#e.getAttribute("scroll-orientation"),l=this.#e.getAttribute("scroll-y"),a=this.#e.getAttribute("scroll-x"),s=("scroll-top"===n||"initial-scroll-offset"===n)&&(""===l||"true"===l||"vertical"===i||"both"===i),o=("scroll-left"===n||"initial-scroll-offset"===n)&&(""===a||"true"===a||"vertical"===i||"both"===i);requestAnimationFrame(()=>{s&&this.#e.scrollTo(0,t),o&&(this.#e.scrollLeft=t)})}}_handleInitialScrollIndex(e){if(e){let t=parseFloat(e),n=this.#e.children.item(t);if(n&&n instanceof HTMLElement){let e=null!==this.#e.getAttribute("scroll-x");requestAnimationFrame(()=>{e?this.#e.scrollLeft=n.offsetLeft:this.#e.scrollTop=n.offsetTop})}}}dispose(){}});var a5=n(6946);function a9(e,t,n){let i;return l=>{null!==l?i||(i=new IntersectionObserver(n,{root:e()})).observe(t()):i&&(i.disconnect(),i=void 0)}}var a7=n(4366);let se=(k=[],O=[],L=[],A=[],I=[],F=[],R=[],M=[],P=[],z=[],N=[],H=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;S=[(0,a2.ZR)("scrolltoupper")],w=[(0,a2.ZR)("scrolltolower")],_=[(0,a2._y)("upper-threshold",!0)],x=[(0,a2._y)("lower-threshold",!0)],C=[(0,a2.ZR)("lynxscroll")],T=[(0,a2.ZR)("lynxscrollend")],(0,a4.G4)(null,null,S,{kind:"field",name:"_handleScrollUpperThresholdEventEnabled",static:!1,private:!1,access:{has:e=>"_handleScrollUpperThresholdEventEnabled"in e,get:e=>e._handleScrollUpperThresholdEventEnabled,set:(e,t)=>{e._handleScrollUpperThresholdEventEnabled=t}},metadata:e},k,O),(0,a4.G4)(null,null,w,{kind:"field",name:"_handleScrollLowerThresholdEventEnabled",static:!1,private:!1,access:{has:e=>"_handleScrollLowerThresholdEventEnabled"in e,get:e=>e._handleScrollLowerThresholdEventEnabled,set:(e,t)=>{e._handleScrollLowerThresholdEventEnabled=t}},metadata:e},L,A),(0,a4.G4)(null,null,_,{kind:"field",name:"_updateUpperThreshold",static:!1,private:!1,access:{has:e=>"_updateUpperThreshold"in e,get:e=>e._updateUpperThreshold,set:(e,t)=>{e._updateUpperThreshold=t}},metadata:e},I,F),(0,a4.G4)(null,null,x,{kind:"field",name:"_updateLowerThreshold",static:!1,private:!1,access:{has:e=>"_updateLowerThreshold"in e,get:e=>e._updateLowerThreshold,set:(e,t)=>{e._updateLowerThreshold=t}},metadata:e},R,M),(0,a4.G4)(null,null,C,{kind:"field",name:"_handleScrollEventEnabled",static:!1,private:!1,access:{has:e=>"_handleScrollEventEnabled"in e,get:e=>e._handleScrollEventEnabled,set:(e,t)=>{e._handleScrollEventEnabled=t}},metadata:e},P,z),(0,a4.G4)(null,null,T,{kind:"field",name:"_handleScrollEndEventEnabled",static:!1,private:!1,access:{has:e=>"_handleScrollEndEventEnabled"in e,get:e=>e._handleScrollEndEventEnabled,set:(e,t)=>{e._handleScrollEndEventEnabled=t}},metadata:e},N,H),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}#e;#i;#l=0;#a=0;constructor(e){(0,a4.zF)(this,H),this.#e=e}#s=()=>this.#e;#o=(0,a2.Ut)(()=>this.#e.shadowRoot,"#upper-threshold-observer");#r=(0,a2.Ut)(()=>this.#e.shadowRoot,"#lower-threshold-observer");#d=e=>{let{isIntersecting:t,target:n}=e[0],i=n.id;t&&("upper-threshold-observer"===i?this.#e.dispatchEvent(new CustomEvent("scrolltoupper",{...a5.$,detail:this.#h()})):"lower-threshold-observer"===i&&this.#e.dispatchEvent(new CustomEvent("scrolltolower",{...a5.$,detail:this.#h()})))};static observedAttributes=["upper-threshold","lower-threshold"];_handleScrollUpperThresholdEventEnabled=(0,a4.zF)(this,k,e=>{e?this.#e.setAttribute("x-enable-scrolltoupper-event",""):this.#e.removeAttribute("x-enable-scrolltoupper-event"),this.#c(e)});#c=((0,a4.zF)(this,O),a9(this.#s,this.#o,this.#d));_handleScrollLowerThresholdEventEnabled=(0,a4.zF)(this,L,e=>{e?this.#e.setAttribute("x-enable-scrolltolower-event",""):this.#e.removeAttribute("x-enable-scrolltolower-event"),this.#m(e)});#m=((0,a4.zF)(this,A),a9(this.#s,this.#r,this.#d));_updateUpperThreshold=(0,a4.zF)(this,I,(0,a2._8)(this.#o,"flex-basis",e=>`${parseInt(e)}px`));_updateLowerThreshold=((0,a4.zF)(this,F),(0,a4.zF)(this,R,(0,a2._8)(this.#r,"flex-basis",e=>`${parseInt(e)}px`)));#h(){let{scrollTop:e,scrollLeft:t,scrollHeight:n,scrollWidth:i}=this.#s();0===e&&(e-=this.#e.scrollHeight/2-this.#e.scrollTop),0===t&&(t-=this.#e.scrollWidth/2-this.#e.scrollLeft);let l={scrollTop:e,scrollLeft:t,scrollHeight:n,scrollWidth:i,isDragging:!1,deltaX:t-this.#l,deltaY:e-this.#a};return this.#l=t,this.#a=e,l}#u=((0,a4.zF)(this,M),()=>{this.#p&&!a7.k&&(clearTimeout(this.#i),this.#i=setTimeout(()=>{this.#b()},100)),this.#e.dispatchEvent(new CustomEvent("lynxscroll",{...a5.$,detail:this.#h()}))});#b=()=>{this.#e.dispatchEvent(new CustomEvent("lynxscrollend",{...a5.$,detail:this.#h()}))};#v=!1;_handleScrollEventEnabled=(0,a4.zF)(this,P,e=>{this.#v=e,this.#g()});#p=((0,a4.zF)(this,z),!1);_handleScrollEndEventEnabled=(0,a4.zF)(this,N,e=>{this.#p=e,this.#g()});#g(){this.#v||this.#p?(this.#s().addEventListener("scroll",this.#u),this.#s().addEventListener("scrollend",this.#b),this.#e.addEventListener("scroll",this.#u),this.#e.addEventListener("scrollend",this.#b),this.#l=0,this.#a=0):(this.#e.removeEventListener("scroll",this.#u),this.#e.removeEventListener("scrollend",this.#b))}connectedCallback(){}dispose(){}});class st{static eventName="__scrollIntoView";static observedAttributes=[];#e;#f=e=>{e.stopPropagation();let t=e.composedPath().filter(e=>e instanceof HTMLElement),n=[],i=this.#e;for(let e of t){if(e===i)break;n.push(e)}let l=this.#e.getAttribute("scroll-orientation"),a=null!==this.#e.getAttribute("scroll-x")||"both"===l||"horizontal"===l,s=null!==this.#e.getAttribute("scroll-y")||"both"===l||"vertical"===l,o=0,r=0;for(let{offsetTop:e,offsetLeft:t}of n)a&&(r+=t),s&&(o+=e);if(a)switch(e.detail.inline){case"center":r+=(e.target.clientWidth-this.#e.clientWidth)/2;break;case"end":r+=e.target.clientWidth-this.#e.clientWidth}if(s)switch(e.detail.block){case"center":o+=(e.target.clientHeight-this.#e.clientHeight)/2;break;case"end":o+=e.target.clientHeight-this.#e.clientHeight}i.scrollTo({behavior:"smooth"===e.detail.behavior?"smooth":"instant",left:r,top:o})};constructor(e){this.#e=e,this.#e.addEventListener(st.eventName,this.#f,{passive:!1})}dispose(){this.#e.removeEventListener(st.eventName,this.#f)}}let sn=`<style>
2
2
  .placeholder-dom {
3
3
  display: none;
4
4
  flex: 0 0 0;
@@ -80,7 +80,7 @@
80
80
  class="mask placeholder-dom"
81
81
  id="bot-fade-mask"
82
82
  part="bot-fade-mask"
83
- ></div>`,a$=/<\s*script/,aV=e=>{let{src:t}=e;if(t&&a$.test(t))throw Error("detected <script, this is a potential XSS attack, please check your src");return`<img part="img" alt="" id="img" ${t?`src="${t}"`:""}/> `},aU=`<style>
83
+ ></div>`,si=/<\s*script/,sl=e=>{let{src:t}=e;if(t&&si.test(t))throw Error("detected <script, this is a potential XSS attack, please check your src");return`<img part="img" alt="" id="img" ${t?`src="${t}"`:""}/> `},sa=`<style>
84
84
  #input:focus {
85
85
  outline: none;
86
86
  }
@@ -97,7 +97,7 @@
97
97
  inputmode="text"
98
98
  spell-check="true"
99
99
  />
100
- </form>`,aW=`<style>
100
+ </form>`,ss=`<style>
101
101
  .placeholder-dom {
102
102
  display: none;
103
103
  flex: 0 0 0;
@@ -121,6 +121,7 @@
121
121
  <div
122
122
  class="observer placeholder-dom"
123
123
  id="upper-threshold-observer"
124
+ part="upper-threshold-sentinel"
124
125
  ></div>
125
126
  </div>
126
127
  <slot part="slot"></slot>
@@ -131,9 +132,10 @@
131
132
  <div
132
133
  class="observer placeholder-dom"
133
134
  id="lower-threshold-observer"
135
+ part="lower-threshold-sentinel"
134
136
  ></div>
135
137
  </div>
136
- </div>`,aB=`<style>
138
+ </div>`,so=`<style>
137
139
  #dialog[open] {
138
140
  top: 0;
139
141
  left: 0;
@@ -169,7 +171,7 @@
169
171
  <slot></slot>
170
172
  </div>
171
173
  <div class="overlay-placeholder"></div>
172
- </dialog>`,aX=`<style>
174
+ </dialog>`,sr=`<style>
173
175
  .bounce-container {
174
176
  overflow: scroll;
175
177
  overscroll-behavior: contain;
@@ -214,7 +216,7 @@
214
216
  class="overflow-placeholder bounce-item"
215
217
  part="placeholder-bot"
216
218
  ></div>
217
- </div>`,aZ=`<style>
219
+ </div>`,sd=`<style>
218
220
  #bounce-padding {
219
221
  display: none;
220
222
  flex: 0 0 0;
@@ -264,7 +266,91 @@
264
266
  <slot part="slot-start" name="circular-start" id="circular-start"></slot>
265
267
  <slot part="slot"></slot>
266
268
  <slot part="slot-end" name="circular-end" id="circular-end"></slot>
267
- </div>`,aY=`<style>
269
+ </div>`,sh=`<style>
270
+ :host {
271
+ display: block;
272
+ }
273
+ .markdown-body {
274
+ display: block;
275
+ line-height: 1.4;
276
+ color: inherit;
277
+ word-break: break-word;
278
+ position: relative;
279
+ }
280
+ .markdown-body p {
281
+ margin: 0 0 0.75em 0;
282
+ }
283
+ .markdown-body h1,
284
+ .markdown-body h2,
285
+ .markdown-body h3,
286
+ .markdown-body h4,
287
+ .markdown-body h5,
288
+ .markdown-body h6 {
289
+ margin: 0.8em 0 0.4em 0;
290
+ }
291
+ .markdown-body ul,
292
+ .markdown-body ol {
293
+ margin: 0 0 0.75em 1.5em;
294
+ }
295
+ .markdown-body pre {
296
+ margin: 0 0 0.75em 0;
297
+ padding: 8px 12px;
298
+ border-radius: 6px;
299
+ background: #f6f8fa;
300
+ overflow: auto;
301
+ }
302
+ .markdown-body code {
303
+ font-family: ui-monospace, SFMono-Regular, SFMono, Menlo, Consolas,
304
+ "Liberation Mono", monospace;
305
+ }
306
+ .markdown-body pre code {
307
+ display: block;
308
+ padding: 0;
309
+ }
310
+ .markdown-body img {
311
+ max-width: 100%;
312
+ height: auto;
313
+ display: block;
314
+ }
315
+ .markdown-body .md-inline-view {
316
+ display: inline-block;
317
+ vertical-align: baseline;
318
+ }
319
+ .markdown-body .md-truncation {
320
+ position: absolute;
321
+ right: 0;
322
+ bottom: 0;
323
+ background-color: inherit;
324
+ }
325
+ .markdown-body .md-image-figure {
326
+ margin: 0 0 0.75em 0;
327
+ }
328
+ .markdown-body .md-image-caption {
329
+ margin-top: 4px;
330
+ color: #666;
331
+ font-size: 0.875em;
332
+ }
333
+ .markdown-body .md-text-mask-effect {
334
+ position: relative;
335
+ display: inline-block;
336
+ }
337
+ .markdown-body .md-text-mask-effect-overlay {
338
+ position: absolute;
339
+ inset: 0;
340
+ pointer-events: none;
341
+ user-select: none;
342
+ white-space: pre;
343
+ color: transparent;
344
+ -webkit-background-clip: text;
345
+ background-clip: text;
346
+ }
347
+ .markdown-body a {
348
+ color: #0366d6;
349
+ text-decoration: underline;
350
+ }
351
+ </style>
352
+ <style id="markdown-style"></style>
353
+ <div id="markdown-root" part="root" class="markdown-body"></div>`,sc=`<style>
268
354
  #textarea:focus,
269
355
  #textarea:focus-visible {
270
356
  border: inherit;
@@ -273,7 +359,7 @@
273
359
  </style>
274
360
  <form id="form" part="form" method="dialog">
275
361
  <textarea id="textarea" part="textarea"></textarea>
276
- </form>`,aq=`<style>
362
+ </form>`,sm=`<style>
277
363
  #bounce-padding {
278
364
  display: none;
279
365
  flex: 0 0 0;
@@ -299,11 +385,12 @@
299
385
  <div id="bounce-padding" part="bounce-padding"></div>
300
386
  <div id="content" part="content">
301
387
  <slot></slot>
302
- </div>`,aJ=`<style>
388
+ </div>`,su=`<style>
303
389
  iframe {
304
390
  width: 100%;
305
391
  height: 100%;
306
392
  border: none;
307
393
  }
308
394
  </style>
309
- <iframe id="webview" part="webview"></iframe>`,aK=CSS.supports("-webkit-box-reflect: above")&&CSS.supports("transition-behavior:allow-discrete")&&CSS.supports("content-visibility: auto");class aQ{static observedAttributes=[];static observedCSSProperties=["--lynx-display","--lynx-linear-orientation"];#e;constructor(e){this.#e=e,this.cssPropertyChangedHandler={"--lynx-display":this.#y,"--lynx-linear-orientation":this.#E}}#y=(0,aA.H$)(()=>this.#e,"lynx-computed-display");#E=(0,aA.H$)(()=>this.#e,"lynx-linear-orientation")}let a0=aK?void 0:aQ;M=[(0,aA.uA)("scroll-view",[a0,az.O,aR,aP,aN,aj],aG)],H=[],D=HTMLElement,aO=class extends D{static{R=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(D[Symbol.metadata]??null):void 0;(0,ak.G4)(null,P={value:R},M,{kind:"class",name:R.name,metadata:e},null,H),aO=R=P.value,e&&Object.defineProperty(R,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static notToFilterFalseAttributes=new Set(["enable-scroll"]);static scrollInterval=100;#S;scrollTo(...e){let t;if("string"==typeof e[0].offset){let l=parseFloat(e[0].offset);t={left:l,top:l}}else"number"==typeof e[0].offset&&(t={left:e[0].offset,top:e[0].offset});if("number"==typeof e[0].index){let l=e[0].index;if(0===l)this.scrollTop=0,this.scrollLeft=0;else if(l>0&&l<this.childElementCount){let e=this.children.item(l);e instanceof HTMLElement&&(t=t?{left:e.offsetLeft+t.left,top:e.offsetTop+t.top}:{left:e.offsetLeft,top:e.offsetTop})}}t?this.scrollTo({...t,behavior:e[0].smooth?"smooth":"auto"}):super.scrollTo(...e)}autoScroll(e){if(clearInterval(this.#S),e.start){let t=("number"==typeof e.rate?e.rate:parseFloat(e.rate))*aO.scrollInterval/1e3;this.#S=setInterval(e=>{e.scrollBy({left:t,top:t,behavior:"smooth"})},aO.scrollInterval,this)}}get[aD.l](){return this}static{(0,ak.zF)(R,H)}},aO=R;let a1=Symbol("__src"),a4=Symbol("__src"),a2={loadstart:{code:0,type:"init"},canplay:{code:1,type:"playable"},stalled:{code:2,type:"stalled"},error:{code:3,type:"error"}},a8={stop:{code:0,type:"stopped"},play:{code:1,type:"playing"},pause:{code:2,type:"paused"}};(aL=aF||(aF={}))[aL.SrcError=-1]="SrcError",aL[aL.SrcJsonError=-2]="SrcJsonError",aL[aL.DownloadError=-3]="DownloadError",aL[aL.PlayerFinishedError=-4]="PlayerFinishedError",aL[aL.PlayerLoadingError=-5]="PlayerLoadingError",aL[aL.PlayerPlaybackError=-6]="PlayerPlaybackError";let a3=($=[],V=[],U=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;N=[(0,aA._y)("src",!0)],j=[(0,aA._y)("loop",!0)],G=[(0,aA._y)("pause-on-hide",!0)],(0,ak.G4)(this,null,N,{kind:"method",name:"_handleSrc",static:!1,private:!1,access:{has:e=>"_handleSrc"in e,get:e=>e._handleSrc},metadata:e},null,$),(0,ak.G4)(this,null,G,{kind:"method",name:"_handlePauseOnHide",static:!1,private:!1,access:{has:e=>"_handlePauseOnHide"in e,get:e=>e._handlePauseOnHide},metadata:e},null,$),(0,ak.G4)(null,null,j,{kind:"field",name:"_handleLoop",static:!1,private:!1,access:{has:e=>"_handleLoop"in e,get:e=>e._handleLoop,set:(e,t)=>{e._handleLoop=t}},metadata:e},V,U),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["src","loop","pause-on-hide"];#e=(0,ak.zF)(this,$);#_=(0,aA.Ut)(()=>this.#e.shadowRoot,"#audio");_handleSrc(e){let t;try{t=JSON.parse(e||"")||{}}catch(e){console.error(`JSON.parse src error: ${e}`),t={}}null===e?this.#e.dispatchEvent(new CustomEvent("error",{...aM.$,detail:{code:aF.SrcError,msg:"",from:"res loader",currentSrcID:this.#e[a1]?.id}})):(t?.id===void 0||t?.play_url===void 0)&&this.#e.dispatchEvent(new CustomEvent("error",{...aM.$,detail:{code:aF.SrcJsonError,msg:"",from:"res loader",currentSrcID:this.#e[a1]?.id}})),this.#e[a1]=t,this.#e[a4]=void 0,this.#e.stop()}_handleLoop=(0,ak.zF)(this,V,(0,aA.H$)(this.#_,"loop"));#w=((0,ak.zF)(this,U),()=>{"hidden"===document.visibilityState&&this.#e.pause()});_handlePauseOnHide(e){null!==e?document.addEventListener("visibilitychange",this.#w,{passive:!0}):document.removeEventListener("visibilitychange",this.#w)}constructor(e){this.#e=e}});class a6{static observedAttributes=[];#e;#x;#_=(0,aA.Ut)(()=>this.#e.shadowRoot,"#audio");#T=e=>{let t=Number(this.#e.getAttribute("interval")),l=Number.isNaN(t)?0:t;this.#x=setInterval(()=>{this.#e.dispatchEvent(new CustomEvent("timeupdate",{...aM.$,detail:{currentTime:this.#_().currentTime,currentSrcID:this.#e[a1]?.id}}))},l);let i=a8[e.type];this.#e.dispatchEvent(new CustomEvent("playbackstatechanged",{...aM.$,detail:{code:i?.code,type:i?.type,currentSrcID:this.#e[a1]?.id}}))};#C=e=>{clearInterval(this.#x);let t=a8[e.type];this.#e.dispatchEvent(new CustomEvent("playbackstatechanged",{...aM.$,detail:{code:t?.code,type:t?.type,currentSrcID:this.#e[a1]?.id}}))};#O=e=>{let t=a2[e.type];this.#e.dispatchEvent(new CustomEvent("loadingstatechanged",{...aM.$,detail:{code:t?.code,type:t?.type,currentSrcID:this.#e[a1]?.id}}))};#L=e=>{this.#O(e);let t=e.target?.error?.code,l=t===MediaError.MEDIA_ERR_DECODE?aF.PlayerLoadingError:aF.PlayerPlaybackError;t===MediaError.MEDIA_ERR_DECODE&&(l=aF.PlayerLoadingError),this.#e.dispatchEvent(new CustomEvent("error",{...aM.$,detail:{code:l,msg:"",from:"player",currentSrcID:this.#e[a1]?.id}}))};#I=()=>{let e=null!==this.#e.getAttribute("loop");this.#e.dispatchEvent(new CustomEvent("finished",{...aM.$,detail:{loop:e,currentSrcID:this.#e[a1]?.id}}))};constructor(e){this.#e=e}connectedCallback(){let e=this.#_();e.addEventListener("play",this.#T,{passive:!0}),e.addEventListener("pause",this.#C,{passive:!0}),e.addEventListener("ended",this.#I,{passive:!0}),e.addEventListener("loadstart",this.#O,{passive:!0}),e.addEventListener("canplay",this.#O,{passive:!0}),e.addEventListener("stalled",this.#O,{passive:!0}),e.addEventListener("error",this.#L,{passive:!0})}}X=[(0,aA.uA)("x-audio-tt",[az.O,a3,a6],'<audio id="audio"></audio>')],Z=[],Y=HTMLElement,class extends Y{static{B=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(Y[Symbol.metadata]??null):void 0;(0,ak.G4)(null,W={value:B},X,{kind:"class",name:B.name,metadata:e},null,Z),B=W.value,e&&Object.defineProperty(B,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,ak.zF)(B,Z)}#F=(0,aA.Ut)(()=>this.shadowRoot,"#audio");#_=(0,aA.Ut)(()=>this.shadowRoot,"#audio");#k=(0,aA.H$)(this.#_,"src");[a1];[a4];#A=()=>{let e,t=this[a1];if(t&&t.id&&t.play_url){try{e=JSON.parse(this.getAttribute("headers")||"{}")||{}}catch(t){console.error(`JSON.parse headers error: ${t}`),e={}}this[a4]=new Promise(async(l,i)=>{this.dispatchEvent(new CustomEvent("srcloadingstatechanged",{...aM.$,detail:{code:0,type:"loading",currentSrcID:t.id}}));let n=await fetch(t.play_url,{headers:e});n.ok||(this.dispatchEvent(new CustomEvent("error",{...aM.$,detail:{code:aF.DownloadError,msg:"",from:"res loader",currentSrcID:t.id}})),i()),this.dispatchEvent(new CustomEvent("srcloadingstatechanged",{...aM.$,detail:{code:1,type:"success",currentSrcID:t.id}}));let a=await n.blob(),s=URL.createObjectURL(a);this.#k(s),l()})}};play(){return this[a4]||this.#A(),this[a4]?.then(()=>{let e=this.#F();e.currentTime=0,e.play()}),{currentSrcID:this[a1]?.id,loadingSrcID:""}}stop(){let e=this.#F(),t=a8.stop;return this.dispatchEvent(new CustomEvent("playbackstatechanged",{...aM.$,detail:{code:t?.code,type:t?.type,currentSrcID:this[a1]?.id}})),e.currentTime=0,e.pause(),{currentSrcID:this[a1]?.id}}pause(){return this.#F().pause(),{currentSrcID:this[a1]?.id}}resume(){return this.#F().play(),{currentSrcID:this[a1]?.id,loadingSrcID:""}}seek(e){return this.#F().currentTime=(e.currentTime||0)/1e3,this.dispatchEvent(new CustomEvent("seek",{...aM.$,detail:{seekresult:1,currentSrcID:this[a1]?.id}})),{currentSrcID:this[a1]?.id}}mute(e){return this.#F().muted=e.mute,{currentSrcID:this[a1]?.id}}playerInfo(){var e;let t=this.#F(),l=t.buffered,i=l.end(l.length-1);return{currentSrcID:this[a1]?.id,duration:1e3*t.duration,playbackState:(e=t)?e.paused?2*!e.ended:e.currentTime>0?1:3:-1,currentTime:t.currentTime,cacheTime:i}}prepare(){this[a4]||this.#A()}setVolume(e){return this.#F().volume=e.volume,{code:1}}};let a9=(Q=[],ee=[],et=[],el=[],ei=[],en=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;q=[(0,aA._y)("name",!0)],J=[(0,aA._y)("height",!0)],K=[(0,aA._y)("width",!0)],(0,ak.G4)(null,null,q,{kind:"field",name:"handleName",static:!1,private:!1,access:{has:e=>"handleName"in e,get:e=>e.handleName,set:(e,t)=>{e.handleName=t}},metadata:e},Q,ee),(0,ak.G4)(null,null,J,{kind:"field",name:"handleHeight",static:!1,private:!1,access:{has:e=>"handleHeight"in e,get:e=>e.handleHeight,set:(e,t)=>{e.handleHeight=t}},metadata:e},et,el),(0,ak.G4)(null,null,K,{kind:"field",name:"handleWidth",static:!1,private:!1,access:{has:e=>"handleWidth"in e,get:e=>e.handleWidth,set:(e,t)=>{e.handleWidth=t}},metadata:e},ei,en),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["name","height","width"];#e;#z;#P=(0,aA.Ut)(()=>this.#e.shadowRoot,"#canvas");constructor(e){this.#e=e}handleName=(0,ak.zF)(this,Q,(0,aA.H$)(this.#P,"name"));handleHeight=((0,ak.zF)(this,ee),(0,ak.zF)(this,et,(0,aA.H$)(this.#P,"height")));handleWidth=((0,ak.zF)(this,el),(0,ak.zF)(this,ei,(0,aA.H$)(this.#P,"width")));#R=((0,ak.zF)(this,en),e=>{let{contentRect:t}=e[0],l=this.#e.shadowRoot.firstElementChild;if(l){let{height:e,width:i}=t;e*=window.devicePixelRatio,i*=window.devicePixelRatio;let n=new CustomEvent("resize",{...aM.$,detail:{height:e,width:i}});n.height=e,n.width=i,l.dispatchEvent(n)}});#M(){this.#z||(this.#z=new ResizeObserver(this.#R),this.#z.observe(this.#e))}#H(){this.#z?.disconnect(),this.#z=void 0}connectedCallback(){this.#M()}dispose(){this.#H()}});eo=[(0,aA.uA)("x-canvas",[az.O,a9],(0,aA.qy)`<canvas id="canvas" part="canvas"></canvas>`)],er=[],ed=HTMLElement,class extends ed{static{es=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(ed[Symbol.metadata]??null):void 0;(0,ak.G4)(null,ea={value:es},eo,{kind:"class",name:es.name,metadata:e},null,er),es=ea.value,e&&Object.defineProperty(es,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,ak.zF)(es,er)}};let a5=(eu=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;eh=[(0,aA._y)("granularity",!0)],ec=[(0,aA.ZR)("offset")],(0,ak.G4)(this,null,eh,{kind:"method",name:"_handleGranularity",static:!1,private:!1,access:{has:e=>"_handleGranularity"in e,get:e=>e._handleGranularity},metadata:e},null,eu),(0,ak.G4)(this,null,ec,{kind:"method",name:"_enableOffsetEvent",static:!1,private:!1,access:{has:e=>"_enableOffsetEvent"in e,get:e=>e._enableOffsetEvent},metadata:e},null,eu),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}#e=(0,ak.zF)(this,eu);#D=.01;#N=0;constructor(e){this.#e=e}static observedAttributes=["granularity"];_handleGranularity(e){e&&""!==e?this.#D=parseFloat(e):this.#D=.01}_enableOffsetEvent(e){e?this.#e.addEventListener("scroll",this.#m,{passive:!0}):this.#e.removeEventListener("scroll",this.#m)}#m=()=>{let e=this.#e.scrollTop;(Math.abs(this.#N-e)>this.#D||0===this.#e.scrollTop||1>=Math.abs(this.#e.scrollHeight-this.#e.clientHeight-this.#e.scrollTop))&&(this.#N=e,this.#e.dispatchEvent(new CustomEvent("offset",{...aM.$,detail:{offset:e,height:this.#e[a7]}})))}}),a7=Symbol("scrollableLength"),se=Symbol("isHeaderShowing"),st=Symbol("resizeObserver"),sl=Symbol("slotKid");ev=[(0,aA.uA)("x-foldview-ng",[a0,az.O,a5])],eb=[],eg=HTMLElement,class extends eg{static{ep=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(eg[Symbol.metadata]??null):void 0;(0,ak.G4)(null,em={value:ep},ev,{kind:"class",name:ep.name,metadata:e},null,eb),ep=em.value,e&&Object.defineProperty(ep,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static notToFilterFalseAttributes=new Set(["scroll-enable"]);[sl];[st]=new ResizeObserver(e=>{for(let t of e)"X-FOLDVIEW-HEADER-NG"===t.target.tagName?this.#j=t.contentRect.height:"X-FOLDVIEW-TOOLBAR-NG"===t.target.tagName&&(this.#G=t.contentRect.height);this[sl]&&(this[sl].style.top=`${this.#j-this.#G}px`)});#j=0;#G=0;get[a7](){return this.#j-this.#G}get[se](){return this[a7]-this.scrollTop>=1}get scrollTop(){return super.scrollTop}set scrollTop(e){e>this[a7]?e=this[a7]:e<0&&(e=0),super.scrollTop=e}setFoldExpanded(e){let{offset:t,smooth:l=!0}=e,i=parseFloat(t);this.scrollTo({top:i,behavior:l?"smooth":"instant"})}get[aD.l](){return this}disconnectedCallback(){this[st]?.disconnect(),this[st]=void 0}static{(0,ak.zF)(ep,eb)}};let si=(e,t)=>{let l=e.parentElement;if(l?.tagName==="LYNX-WRAPPER"&&(l=l.parentElement),l?.tagName===t)return l};eE=[(0,aA.uA)("x-foldview-header-ng",[a0,az.O])],eS=[],e_=HTMLElement,(class extends e_{static{ey=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(e_[Symbol.metadata]??null):void 0;(0,ak.G4)(null,ef={value:ey},eE,{kind:"class",name:ey.name,metadata:e},null,eS),ey=ef.value,e&&Object.defineProperty(ey,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,ak.zF)(ey,eS)}#$=void 0;connectedCallback(){let e=si(this,"X-FOLDVIEW-NG");this.#$=e?.[st],this.#$?.observe(this)}dispose(){this.#$?.unobserve(this)}}),eT=[(0,aA.uA)("x-foldview-slot-drag-ng",[a0,az.O])],eC=[],eO=HTMLElement,class extends eO{static{ex=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(eO[Symbol.metadata]??null):void 0;(0,ak.G4)(null,ew={value:ex},eT,{kind:"class",name:ex.name,metadata:e},null,eC),ex=ew.value,e&&Object.defineProperty(ex,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,ak.zF)(ex,eC)}};class sn{#V=0;#U=new WeakMap;#W;#B=0;#X=0;#Z=null;#Y;#q=0;#e;static observedAttributes=[];constructor(e){this.#e=e,this.#e.addEventListener("touchmove",this.#J,{passive:!1}),this.#e.addEventListener("touchstart",this.#K,{passive:!0}),this.#e.addEventListener("touchend",this.#Q,{passive:!0}),this.#e.addEventListener("wheel",this.#ee,{passive:!1})}#et(e){let t;if("function"==typeof e.computedStyleMap)try{t=e.computedStyleMap().get("overflow-y")?.toString()??"visible"}catch{t=getComputedStyle(e).overflowY||"visible"}else t=getComputedStyle(e).overflowY||"visible";return"auto"===t||"scroll"===t||"hidden"===t||"overlay"===t}#el(e){return this.#W?.find(t=>{if(this.#et(t)&&t.scrollHeight>t.clientHeight){let l=e<0&&0!==t.scrollTop,i=e>0&&Math.abs(t.scrollHeight-t.clientHeight-t.scrollTop)>1;return l||i}return!1})}#ei(e,t){let l=this.#U.get(e)??0;l+=t,this.#U.set(e,l),e.scrollTop=l}#J=e=>{let t=this.#en();if(!t)return;let{pageY:l,pageX:i}=e.touches.item(0),n=this.#B-l;if(null===this.#Z){let e=this.#X-i;this.#Z=Math.abs(n)>Math.abs(e)}!1!==this.#Z&&(e.cancelable&&e.preventDefault(),this.#ea(n,t),this.#B=l)};#ee=e=>{let t=this.#en();if(!t||Math.abs(e.deltaY)<=Math.abs(e.deltaX))return;let l=e.composedPath().filter(e=>e instanceof Element&&this.#e.contains(e)&&e!==this.#e),{clientX:i,clientY:n}=e,a=document.elementsFromPoint(i,n).filter(e=>this.#e.contains(e));if(this.#W=[...new Set([...l,...a])],this.#V=t.scrollTop,this.#W)for(let e of this.#W)this.#U.set(e,e.scrollTop);e.cancelable&&e.preventDefault(),this.#ea(e.deltaY,t)};#en(){let e=this.#e.parentElement;if(e&&"X-FOLDVIEW-NG"===e.tagName)return e}#K=e=>{let{pageX:t,pageY:l}=e.touches.item(0);for(let e of(this.#W=document.elementsFromPoint(t,l).filter(e=>this.#e.contains(e)&&e!==this.#e),this.#B=l,this.#X=t,this.#V=this.#en()?.scrollTop??0,this.#W))this.#U.set(e,e.scrollTop);this.#Z=null,this.#Y=void 0};#Q=()=>{if(this.#Z=null,this.#Y){let e=this.#en();(this.#Y!==e||e[se])&&this.#Y.scrollBy({top:4*this.#q,behavior:"smooth"})}};#ea(e,t){let l=this.#el(e);t[se]&&e>0||e<0&&!l||!t[se]&&!l?(t.scrollBy({top:e,behavior:"smooth"}),this.#V+=e,t.scrollTop=this.#V,this.#Y=t):l&&(this.#Y=l,this.#ei(l,e)),this.#q=e}}eF=[(0,aA.uA)("x-foldview-slot-ng",[a0,az.O,sn])],ek=[],eA=HTMLElement,(class extends eA{static{eI=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(eA[Symbol.metadata]??null):void 0;(0,ak.G4)(null,eL={value:eI},eF,{kind:"class",name:eI.name,metadata:e},null,ek),eI=eL.value,e&&Object.defineProperty(eI,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,ak.zF)(eI,ek)}connectedCallback(){this.matches("x-foldview-ng>x-foldview-slot-ng:first-of-type")&&(this.parentElement[sl]=this)}}),eR=[(0,aA.uA)("x-foldview-toolbar-ng",[a0,az.O])],eM=[],eH=HTMLElement,class extends eH{static{eP=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(eH[Symbol.metadata]??null):void 0;(0,ak.G4)(null,ez={value:eP},eR,{kind:"class",name:eP.name,metadata:e},null,eM),eP=ez.value,e&&Object.defineProperty(eP,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,ak.zF)(eP,eM)}#$=void 0;connectedCallback(){let e=si(this,"X-FOLDVIEW-NG");this.#$=e?.[st],this.#$?.observe(this)}dispose(){this.#$?.unobserve(this)}};let sa=(eN=[],ej=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;eD=[(0,aA._y)("drop-shadow",!0)],(0,ak.G4)(null,null,eD,{kind:"field",name:"_handleBlurRadius",static:!1,private:!1,access:{has:e=>"_handleBlurRadius"in e,get:e=>e._handleBlurRadius,set:(e,t)=>{e._handleBlurRadius=t}},metadata:e},eN,ej),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["drop-shadow"];#e;#es=(0,aA.Ut)(()=>this.#e.shadowRoot,"#img");_handleBlurRadius=(0,ak.zF)(this,eN,(0,aA._8)(this.#es,"--drop-shadow",void 0,!0));constructor(e){(0,ak.zF)(this,ej),this.#e=e}}),ss=(eB=[],eX=[],eZ=[],eY=[],eq=[],eJ=[],eK=[],eQ=[],e0=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;eG=[(0,aA._y)("src",!0)],e$=[(0,aA._y)("placeholder",!0)],eV=[(0,aA._y)("blur-radius",!0)],eU=[(0,aA._y)("crossorigin",!0)],eW=[(0,aA._y)("referrerpolicy",!0)],(0,ak.G4)(this,null,e$,{kind:"method",name:"_preloadPlaceholder",static:!1,private:!1,access:{has:e=>"_preloadPlaceholder"in e,get:e=>e._preloadPlaceholder},metadata:e},null,eB),(0,ak.G4)(null,null,eG,{kind:"field",name:"_handleSrc",static:!1,private:!1,access:{has:e=>"_handleSrc"in e,get:e=>e._handleSrc,set:(e,t)=>{e._handleSrc=t}},metadata:e},eX,eZ),(0,ak.G4)(null,null,eV,{kind:"field",name:"_handleBlurRadius",static:!1,private:!1,access:{has:e=>"_handleBlurRadius"in e,get:e=>e._handleBlurRadius,set:(e,t)=>{e._handleBlurRadius=t}},metadata:e},eY,eq),(0,ak.G4)(null,null,eU,{kind:"field",name:"_handleCrossorigin",static:!1,private:!1,access:{has:e=>"_handleCrossorigin"in e,get:e=>e._handleCrossorigin,set:(e,t)=>{e._handleCrossorigin=t}},metadata:e},eJ,eK),(0,ak.G4)(null,null,eW,{kind:"field",name:"_handleReferrerpolicy",static:!1,private:!1,access:{has:e=>"_handleReferrerpolicy"in e,get:e=>e._handleReferrerpolicy,set:(e,t)=>{e._handleReferrerpolicy=t}},metadata:e},eQ,e0),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["src","placeholder","blur-radius","crossorigin","referrerpolicy"];#e=(0,ak.zF)(this,eB);#es=(0,aA.Ut)(()=>this.#e.shadowRoot,"#img");_handleSrc=(0,ak.zF)(this,eX,(0,aA.H$)(this.#es,"src",e=>e||this.#e.getAttribute("placeholder")));_preloadPlaceholder(e){e&&(new Image().src=e)}_handleBlurRadius=((0,ak.zF)(this,eZ),(0,ak.zF)(this,eY,(0,aA._8)(this.#es,"--blur-radius",void 0,!0)));_handleCrossorigin=((0,ak.zF)(this,eq),(0,ak.zF)(this,eJ,(0,aA.H$)(this.#es,"crossorigin")));_handleReferrerpolicy=((0,ak.zF)(this,eK),(0,ak.zF)(this,eQ,(0,aA.H$)(this.#es,"referrerpolicy")));#eo=((0,ak.zF)(this,e0),()=>{let e=this.#es().src,t=this.#e.getAttribute("placeholder");t&&e!==t&&(this.#es().src=t)});constructor(e){this.#e=e,this.#es().addEventListener("error",this.#eo)}connectedCallback(){(null===this.#e.getAttribute("src")||""===this.#e.getAttribute("src"))&&this._handleSrc(null)}}),so=(e2=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;e1=[(0,aA.ZR)("load")],e4=[(0,aA.ZR)("error")],(0,ak.G4)(this,null,e1,{kind:"method",name:"_enableLoadEvent",static:!1,private:!1,access:{has:e=>"_enableLoadEvent"in e,get:e=>e._enableLoadEvent},metadata:e},null,e2),(0,ak.G4)(this,null,e4,{kind:"method",name:"_enableErrorEvent",static:!1,private:!1,access:{has:e=>"_enableErrorEvent"in e,get:e=>e._enableErrorEvent},metadata:e},null,e2),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=[];#e=(0,ak.zF)(this,e2);#es=(0,aA.Ut)(()=>this.#e.shadowRoot,"#img");_enableLoadEvent(e){e?this.#es().addEventListener("load",this.#er,{passive:!0}):this.#es().removeEventListener("load",this.#er)}_enableErrorEvent(e){e?this.#es().addEventListener("error",this.#ed,{passive:!0}):this.#es().removeEventListener("error",this.#ed)}#er=()=>{this.#e.dispatchEvent(new CustomEvent("load",{...aM.$,detail:{width:this.#es().naturalWidth,height:this.#es().naturalHeight}}))};#ed=()=>{this.#e.dispatchEvent(new CustomEvent("error",{...aM.$,detail:{}}))};constructor(e){this.#e=e}});e6=[(0,aA.uA)("filter-image",[az.O,ss,sa,so],aV({}))],e9=[],e5=HTMLElement,(class extends e5{static{e3=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(e5[Symbol.metadata]??null):void 0;(0,ak.G4)(null,e8={value:e3},e6,{kind:"class",name:e3.name,metadata:e},null,e9),e3=e8.value,e&&Object.defineProperty(e3,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,ak.zF)(e3,e9)}}),tt=[(0,aA.uA)("x-image",[az.O,ss,so],aV({}))],tl=[],ti=HTMLElement,class extends ti{static{te=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(ti[Symbol.metadata]??null):void 0;(0,ak.G4)(null,e7={value:te},tt,{kind:"class",name:te.name,metadata:e},null,tl),te=e7.value,e&&Object.defineProperty(te,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,ak.zF)(te,tl)}};let sr=(td=[],th=[],tc=[],tu=[],tm=[],tp=[],tv=[],tb=[],tg=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;tn=[(0,aA._y)("confirm-type",!0)],ta=[(0,aA._y)("maxlength",!0)],ts=[(0,aA._y)("readonly",!0)],to=[(0,aA._y)("type",!0)],tr=[(0,aA._y)("ios-spell-check",!0),(0,aA._y)("spell-check",!0)],(0,ak.G4)(this,null,to,{kind:"method",name:"_handleType",static:!1,private:!1,access:{has:e=>"_handleType"in e,get:e=>e._handleType},metadata:e},null,td),(0,ak.G4)(null,null,tn,{kind:"field",name:"_handlerConfirmType",static:!1,private:!1,access:{has:e=>"_handlerConfirmType"in e,get:e=>e._handlerConfirmType,set:(e,t)=>{e._handlerConfirmType=t}},metadata:e},th,tc),(0,ak.G4)(null,null,ta,{kind:"field",name:"_handlerMaxlength",static:!1,private:!1,access:{has:e=>"_handlerMaxlength"in e,get:e=>e._handlerMaxlength,set:(e,t)=>{e._handlerMaxlength=t}},metadata:e},tu,tm),(0,ak.G4)(null,null,ts,{kind:"field",name:"_handleReadonly",static:!1,private:!1,access:{has:e=>"_handleReadonly"in e,get:e=>e._handleReadonly,set:(e,t)=>{e._handleReadonly=t}},metadata:e},tp,tv),(0,ak.G4)(null,null,tr,{kind:"field",name:"_handleSpellCheck",static:!1,private:!1,access:{has:e=>"_handleSpellCheck"in e,get:e=>e._handleSpellCheck,set:(e,t)=>{e._handleSpellCheck=t}},metadata:e},tb,tg),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["confirm-type","maxlength","readonly","type","ios-spell-check","spell-check"];#e=(0,ak.zF)(this,td);#eh=(0,aA.Ut)(()=>this.#e.shadowRoot,"#input");_handlerConfirmType=(0,ak.zF)(this,th,(0,aA.H$)(this.#eh,"enterkeyhint",e=>null===e?"send":e));_handlerMaxlength=((0,ak.zF)(this,tc),(0,ak.zF)(this,tu,(0,aA.H$)(this.#eh,"maxlength",e=>null===e?"140":e)));_handleReadonly=((0,ak.zF)(this,tm),(0,ak.zF)(this,tp,(0,aA.H$)(this.#eh,"readonly",e=>null!==e?"":null)));#ec=((0,ak.zF)(this,tv),(0,aA.H$)(this.#eh,"type"));#eu=(0,aA.H$)(this.#eh,"inputmode");_handleType(e){let t="text",l="text";"digit"===e?t="numeric":"number"===e?t="decimal":"email"===e?t="email":"tel"===e?t="tel":l=e,this.#eu(t),this.#ec(l)}_handleSpellCheck=(0,ak.zF)(this,tb,(0,aA.H$)(this.#eh,"spellcheck",e=>null===e?"false":"true"));constructor(e){(0,ak.zF)(this,tg),this.#e=e}}),sd=(tw=[],tx=[],tT=[],tC=[],tO=[],tL=[],tI=[],tF=[],tk=[],tA=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;tf=[(0,aA._y)("placeholder",!0)],ty=[(0,aA._y)("placeholder-color",!0)],tE=[(0,aA._y)("placeholder-font-family",!0)],tS=[(0,aA._y)("placeholder-font-size",!0)],t_=[(0,aA._y)("placeholder-font-weight",!0)],(0,ak.G4)(null,null,tf,{kind:"field",name:"_handlerPlaceholder",static:!1,private:!1,access:{has:e=>"_handlerPlaceholder"in e,get:e=>e._handlerPlaceholder,set:(e,t)=>{e._handlerPlaceholder=t}},metadata:e},tw,tx),(0,ak.G4)(null,null,ty,{kind:"field",name:"_handlerPlaceholderColor",static:!1,private:!1,access:{has:e=>"_handlerPlaceholderColor"in e,get:e=>e._handlerPlaceholderColor,set:(e,t)=>{e._handlerPlaceholderColor=t}},metadata:e},tT,tC),(0,ak.G4)(null,null,tE,{kind:"field",name:"_handlerPlaceholderFontFamily",static:!1,private:!1,access:{has:e=>"_handlerPlaceholderFontFamily"in e,get:e=>e._handlerPlaceholderFontFamily,set:(e,t)=>{e._handlerPlaceholderFontFamily=t}},metadata:e},tO,tL),(0,ak.G4)(null,null,tS,{kind:"field",name:"_handlerPlaceholderFontSize",static:!1,private:!1,access:{has:e=>"_handlerPlaceholderFontSize"in e,get:e=>e._handlerPlaceholderFontSize,set:(e,t)=>{e._handlerPlaceholderFontSize=t}},metadata:e},tI,tF),(0,ak.G4)(null,null,t_,{kind:"field",name:"_handlerPlaceholderFontWeight",static:!1,private:!1,access:{has:e=>"_handlerPlaceholderFontWeight"in e,get:e=>e._handlerPlaceholderFontWeight,set:(e,t)=>{e._handlerPlaceholderFontWeight=t}},metadata:e},tk,tA),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["placeholder","placeholder-color","placeholder-font-family","placeholder-font-size","placeholder-font-weight"];#e;#eh=(0,aA.Ut)(()=>this.#e.shadowRoot,"#input");_handlerPlaceholder=(0,ak.zF)(this,tw,(0,aA.H$)(this.#eh,"placeholder"));_handlerPlaceholderColor=((0,ak.zF)(this,tx),(0,ak.zF)(this,tT,(0,aA._8)(this.#eh,"--placeholder-color",void 0,!0)));_handlerPlaceholderFontFamily=((0,ak.zF)(this,tC),(0,ak.zF)(this,tO,(0,aA._8)(this.#eh,"--placeholder-font-family",void 0,!0)));_handlerPlaceholderFontSize=((0,ak.zF)(this,tL),(0,ak.zF)(this,tI,(0,aA._8)(this.#eh,"--placeholder-font-size",void 0,!0)));_handlerPlaceholderFontWeight=((0,ak.zF)(this,tF),(0,ak.zF)(this,tk,(0,aA._8)(this.#eh,"--placeholder-font-weight",void 0,!0)));constructor(e){(0,ak.zF)(this,tA),this.#e=e}}),sh=(tM=[],tH=[],tD=[],tN=[],tj=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;tz=[(0,aA._y)("value",!1)],tP=[(0,aA._y)("disabled",!0)],tR=[(0,aA._y)("autocomplete",!0)],(0,ak.G4)(this,null,tz,{kind:"method",name:"_handleValue",static:!1,private:!1,access:{has:e=>"_handleValue"in e,get:e=>e._handleValue},metadata:e},null,tM),(0,ak.G4)(null,null,tP,{kind:"field",name:"_handleDisabled",static:!1,private:!1,access:{has:e=>"_handleDisabled"in e,get:e=>e._handleDisabled,set:(e,t)=>{e._handleDisabled=t}},metadata:e},tH,tD),(0,ak.G4)(null,null,tR,{kind:"field",name:"_handleAutocomplete",static:!1,private:!1,access:{has:e=>"_handleAutocomplete"in e,get:e=>e._handleAutocomplete,set:(e,t)=>{e._handleAutocomplete=t}},metadata:e},tN,tj),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["value","disabled","autocomplete"];#e=(0,ak.zF)(this,tM);#eh=(0,aA.Ut)(()=>this.#e.shadowRoot,"#input");_handleValue(e){if(e){let t=parseFloat(this.#e.getAttribute("maxlength")??"");isNaN(t)||(e=e.substring(0,t))}else e="";let t=this.#eh();t.value!==e&&(t.value=e)}_handleDisabled=(0,ak.zF)(this,tH,(0,aA.H$)(this.#eh,"disabled",e=>null!==e?"":null));_handleAutocomplete=((0,ak.zF)(this,tD),(0,ak.zF)(this,tN,(0,aA.H$)(this.#eh,"autocomplete")));constructor(e){(0,ak.zF)(this,tj),this.#e=e}}),sc={submit:"confirm",blur:"lynxblur",focus:"lynxfocus"},su=(tU=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;tG=[(0,aA._y)("input-filter",!0),(0,aA.ZR)("lynxinput")],t$=[(0,aA._y)("send-composing-input",!0)],tV=[(0,aA.ZR)("selection")],(0,ak.G4)(this,null,tG,{kind:"method",name:"_handleEnableInputEvent",static:!1,private:!1,access:{has:e=>"_handleEnableInputEvent"in e,get:e=>e._handleEnableInputEvent},metadata:e},null,tU),(0,ak.G4)(this,null,t$,{kind:"method",name:"_handleSendComposingInput",static:!1,private:!1,access:{has:e=>"_handleSendComposingInput"in e,get:e=>e._handleSendComposingInput},metadata:e},null,tU),(0,ak.G4)(this,null,tV,{kind:"method",name:"_handleEnableSelectionEvent",static:!1,private:!1,access:{has:e=>"_handleEnableSelectionEvent"in e,get:e=>e._handleEnableSelectionEvent},metadata:e},null,tU),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["send-composing-input","input-filter"];#e=(0,ak.zF)(this,tU);#em=!1;#ep=/[^0-9.]|\.(?=.*\.)/g;#eh=(0,aA.Ut)(()=>this.#e.shadowRoot,"#input");#ev=(0,aA.Ut)(()=>this.#e.shadowRoot,"#form");_handleEnableInputEvent(e){let t=this.#eh();e?(t.addEventListener("input",this.#eb,{passive:!0}),t.addEventListener("compositionend",this.#eg,{passive:!0})):(t.removeEventListener("input",this.#eb),t.removeEventListener("compositionend",this.#eg))}_handleSendComposingInput(e){this.#em=null!==e}#ef=e=>{let t=sc[e.type]??e.type;this.#e.dispatchEvent(new CustomEvent(t,{...aM.$,detail:{value:this.#eh().value}}))};#eb=e=>{let t=this.#eh(),l=this.#ey(t.value),i=e.isComposing;t.value=l,(!i||this.#em)&&this.#e.dispatchEvent(new CustomEvent("lynxinput",{...aM.$,detail:{value:l,textLength:l.length,cursor:t.selectionStart,isComposing:i,selectionStart:t.selectionStart,selectionEnd:t.selectionEnd}}))};#eg=()=>{let e=this.#eh(),t=this.#ey(e.value);e.value=t,this.#em||this.#e.dispatchEvent(new CustomEvent("lynxinput",{...aM.$,detail:{value:t,textLength:t.length,cursor:e.selectionStart,isComposing:!1,selectionStart:e.selectionStart,selectionEnd:e.selectionEnd}}))};#ey(e){let t=e;"number"===this.#e.getAttribute("type")&&(t=t.replace(this.#ep,""));let l=this.#e.getAttribute("input-filter");return l&&(t=t.replace(RegExp(l,"g"),"")),t}_handleEnableSelectionEvent(e){e?this.#eh().addEventListener("select",this.#eE,{passive:!0}):this.#eh().removeEventListener("select",this.#eE)}#eE=()=>{let e=this.#eh();this.#e.dispatchEvent(new CustomEvent("selection",{...aM.$,detail:{selectionStart:e.selectionStart,selectionEnd:e.selectionEnd}}))};#eS=e=>{e.target===this.#eh()&&"number"==typeof e.detail&&e.stopImmediatePropagation()};constructor(e){this.#e=e;const t=this.#eh(),l=this.#ev();t.addEventListener("blur",this.#ef,{passive:!0}),t.addEventListener("focus",this.#ef,{passive:!0}),l.addEventListener("submit",this.#ef,{passive:!0}),l.addEventListener("input",this.#eS,{passive:!0})}});tX=[(0,aA.uA)("x-input",[az.O,sd,sh,sr,su],aU)],tZ=[],tY=HTMLElement,class extends tY{static{tB=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(tY[Symbol.metadata]??null):void 0;(0,ak.G4)(null,tW={value:tB},tX,{kind:"class",name:tB.name,metadata:e},null,tZ),tB=tW.value,e&&Object.defineProperty(tB,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,ak.zF)(tB,tZ)}#e_=(0,aA.Ut)(()=>this.shadowRoot,"#input");addText(e){let{text:t}=e,l=this.#e_(),i=l.selectionStart;if(null===i)l.value=t;else{let e=l.value;l.value=e.slice(0,i)+t+e.slice(i)}}controlKeyBoard(e){let{action:t}=e;0===t||1===t?this.focus():(2===t||3===t)&&this.blur()}setValue(e){let t,l=this.#e_();l.value=e.value,(t=e.index)&&l.setSelectionRange(t,t)}getValue(){let e=this.#e_();return{value:e.value,selectionBegin:e.selectionStart,selectionEnd:e.selectionEnd}}sendDelEvent(e){let{action:t,length:l}=e,i=this.#e_();1===t&&(l=1);let n=i.selectionStart;if(null===n){let e=i.value;i.value=i.value.substring(0,e.length-l)}else{let e=i.value;i.value=e.slice(0,n-l)+e.slice(n)}}setInputFilter(e){this.#e_().setAttribute("pattern",e.pattern)}select(){let e=this.#e_();e.setSelectionRange(0,e.value.length)}setSelectionRange(e){this.#e_().setSelectionRange(e.selectionStart,e.selectionEnd)}focus(e){this.#e_().focus(e)}blur(){this.#e_().blur()}connectedCallback(){let e=this.#e_();null===this.getAttribute("confirm-type")&&e.setAttribute("confirm-type","send"),null===this.getAttribute("maxlength")&&e.setAttribute("maxlength","140")}};let sm=(tK=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;tq=[(0,aA._y)("events-pass-through",!0)],tJ=[(0,aA._y)("visible",!1)],(0,ak.G4)(this,null,tq,{kind:"method",name:"_handleEventsPassThrough",static:!1,private:!1,access:{has:e=>"_handleEventsPassThrough"in e,get:e=>e._handleEventsPassThrough},metadata:e},null,tK),(0,ak.G4)(this,null,tJ,{kind:"method",name:"_handleVisible",static:!1,private:!1,access:{has:e=>"_handleVisible"in e,get:e=>e._handleVisible},metadata:e},null,tK),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["visible","events-pass-through"];#e=(0,ak.zF)(this,tK);#ew=!!window.HTMLDialogElement;#ex=!1;constructor(e){this.#e=e}#eT=(0,aA.Ut)(()=>this.#e.shadowRoot,"#dialog");_handleEventsPassThrough(e){null!==e?(this.#eT().addEventListener("click",this.#eC,{passive:!1}),this.#e.addEventListener("click",this.#eC,{passive:!1})):(this.#eT().removeEventListener("click",this.#eC),this.#e.removeEventListener("click",this.#eC))}_handleVisible(e){this.#ex=null!==e,this.#ew&&(this.#ex?(this.#eT().showModal(),this.#e.dispatchEvent(new CustomEvent("showoverlay",aM.$))):(this.#eT().close(),this.#e.dispatchEvent(new CustomEvent("dismissoverlay",aM.$))))}#eC=e=>{e.stopPropagation();let t=this.#eT();if(e.target===this.#e||e.target===t){t.close();let{clientX:l,clientY:i}=e,n=document.elementFromPoint(l,i);n?.tagName==="LYNX-VIEW"&&n.shadowRoot&&(n=n.shadowRoot.elementFromPoint(l,i)??n),n?.dispatchEvent(new MouseEvent("click",e)),requestAnimationFrame(()=>{this.#ex&&t.isConnected&&t.showModal()})}};connectedCallback(){this.#ew||(this.#eT().style.display="none")}});t1=[(0,aA.uA)("x-overlay-ng",[az.O,sm],aB)],t4=[],t2=HTMLElement,class extends t2{static{t0=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(t2[Symbol.metadata]??null):void 0;(0,ak.G4)(null,tQ={value:t0},t1,{kind:"class",name:t0.name,metadata:e},null,t4),t0=tQ.value,e&&Object.defineProperty(t0,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,ak.zF)(t0,t4)}get[az.v](){return this.shadowRoot.firstElementChild}};class sp extends Event{startShowing;fullyShowing;static EventName="x-refresh-view-intersecting";constructor(e,t){super(sp.EventName,{composed:!1,cancelable:!0,bubbles:!0}),this.startShowing=e,this.fullyShowing=t}}class sv{#e;static observedAttributes=[];#eO;constructor(e){this.#e=e}connectedCallback(){if(IntersectionObserver&&!this.#eO){let e=this.#e.parentElement;e&&(this.#eO=new IntersectionObserver(e=>{let t=!1,l=!1;e.forEach(e=>{t=e.intersectionRatio>0,l=e.intersectionRatio>.9}),this.#e.dispatchEvent(new sp(t,l)),l&&this.#e.setAttribute("x-magnet-enable","")},{root:e,threshold:[.1,.9]}),this.#eO.observe(this.#e))}}dispose(){this.#eO&&(this.#eO.disconnect(),this.#eO=void 0)}}t6=[(0,aA.uA)("x-refresh-footer",[a0,az.O,sv])],t9=[],t5=HTMLElement,(class extends t5{static{t3=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(t5[Symbol.metadata]??null):void 0;(0,ak.G4)(null,t8={value:t3},t6,{kind:"class",name:t3.name,metadata:e},null,t9),t3=t8.value,e&&Object.defineProperty(t3,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,ak.zF)(t3,t9)}connectedCallback(){this.setAttribute("slot","footer")}}),lt=[(0,aA.uA)("x-refresh-header",[a0,az.O,sv])],ll=[],li=HTMLElement,class extends li{static{le=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(li[Symbol.metadata]??null):void 0;(0,ak.G4)(null,t7={value:le},lt,{kind:"class",name:le.name,metadata:e},null,ll),le=t7.value,e&&Object.defineProperty(le,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,ak.zF)(le,ll)}connectedCallback(){this.setAttribute("slot","header")}};let sb=(ls=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;ln=[(0,aA.ZR)("headeroffset"),(0,aA.ZR)("headershow"),(0,aA.ZR)("footeroffset")],la=[(0,aA.ZR)("startrefresh"),(0,aA.ZR)("headerreleased"),(0,aA.ZR)("startloadmore"),(0,aA.ZR)("footerreleased")],(0,ak.G4)(this,null,ln,{kind:"method",name:"_handleComplexEventEnableAttributes",static:!1,private:!1,access:{has:e=>"_handleComplexEventEnableAttributes"in e,get:e=>e._handleComplexEventEnableAttributes},metadata:e},null,ls),(0,ak.G4)(this,null,la,{kind:"method",name:"_handleXEnableHeaderOffsetEvent",static:!1,private:!1,access:{has:e=>"_handleXEnableHeaderOffsetEvent"in e,get:e=>e._handleXEnableHeaderOffsetEvent},metadata:e},null,ls),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}#e=(0,ak.zF)(this,ls);static observedAttributes=[];#eL=(0,aA.Ut)(()=>this.#e,"x-refresh-view > x-refresh-header:first-of-type");#eI=(0,aA.Ut)(()=>this.#e,"x-refresh-view > x-refresh-footer:first-of-type");constructor(e){this.#e=e,this.#e.addEventListener(sp.EventName,this.#eF)}#ek={headeroffset:!1,headerreleased:!1,startrefresh:!1,footeroffset:!1,headershow:!1,footerreleased:!1,startloadmore:!1};_handleComplexEventEnableAttributes(e,t){this.#ek[t]=e;let{headeroffset:l,headershow:i,footeroffset:n}=this.#ek;l||i||n?this.#eA():this.#ez()}_handleXEnableHeaderOffsetEvent(e,t){this.#ek[t]=e;let{startrefresh:l,headerreleased:i,startloadmore:n,footerreleased:a}=this.#ek;i||a||n||l?this.#eP():this.#eR()}#eM=!1;#eH=!1;#eD=!1;#eN=!1;#eF=e=>{e.stopPropagation(),"X-REFRESH-HEADER"===e.target.tagName?(this.#eM=e.startShowing,this.#eH=e.fullyShowing):(this.#eD=e.startShowing,this.#eN=e.fullyShowing)};#ej=!1;#eP(){this.#ej||(this.#e.addEventListener("touchend",this.#eG),this.#ej=!0)}#eG=()=>{this.#eH?(this.#e.dispatchEvent(new CustomEvent("headerreleased",aM.$)),this.#e.dispatchEvent(new CustomEvent("startrefresh",{...aM.$,detail:{isManual:this.#e._nextRefreshIsManual}})),this.#e._nextRefreshIsManual=!0):("true"===this.#e.getAttribute("enable-auto-loadmore")&&this.#eD||this.#eN)&&(this.#e.dispatchEvent(new CustomEvent("footerreleased",aM.$)),this.#e.dispatchEvent(new CustomEvent("startloadmore",aM.$)))};#eR(){this.#ej&&this.#e.removeEventListener("touchend",this.#eG)}#e$=!1;#eV=!1;#eA(){this.#eV||(this.#e.addEventListener("touchstart",this.#eU),this.#e.addEventListener("touchend",this.#eW),this.#e.addEventListener("touchcancel",this.#eW),this.#e.shadowRoot.querySelector("#container").addEventListener("scroll",this.#m))}#eW=()=>{this.#e$=!1};#eU=()=>{this.#e$=!0};#m=()=>{if(this.#eM&&(this.#ek.headershow||this.#ek.headeroffset)){let e=this.#eL();if(e){let t=parseFloat(getComputedStyle(e).height),l=this.#e.shadowRoot.querySelector("#container").scrollTop;this.#e.dispatchEvent(new CustomEvent("headershow",{...aM.$,detail:{isDragging:this.#e$,offsetPercent:1-l/t}})),this.#e.dispatchEvent(new CustomEvent("headeroffset",{...aM.$,detail:{isDragging:this.#e$,offsetPercent:1-l/t}}))}}else if(this.#eD&&this.#ek.footeroffset){let e=this.#eI();if(e){let t=this.#e.shadowRoot.querySelector("#container").scrollTop,l=parseFloat(getComputedStyle(e).height);this.#e.dispatchEvent(new CustomEvent("footeroffset",{...aM.$,detail:{isDragging:this.#e$,offsetPercent:1-t/l}}))}}};#ez(){this.#eV&&(this.#e.removeEventListener("touchstart",this.#eU),this.#e.removeEventListener("touchend",this.#eW),this.#e.removeEventListener("touchcancel",this.#eW),this.#e.shadowRoot.querySelector("#container").removeEventListener("scroll",this.#m))}dispose(){this.#eR(),this.#ez()}});ld=[(0,aA.uA)("x-refresh-view",[a0,az.O,sb],aX)],lh=[],lc=HTMLElement,class extends lc{static{lr=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(lc[Symbol.metadata]??null):void 0;(0,ak.G4)(null,lo={value:lr},ld,{kind:"class",name:lr.name,metadata:e},null,lh),lr=lo.value,e&&Object.defineProperty(lr,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static notToFilterFalseAttributes=new Set(["enable-refresh","enable-loadmore","enable-auto-loadmore"]);_nextRefreshIsManual=!0;finishRefresh(){this.querySelector("x-refresh-view > x-refresh-header:first-of-type")?.removeAttribute("x-magnet-enable")}finishLoadMore(){this.querySelector("x-refresh-view > x-refresh-footer:first-of-type")?.removeAttribute("x-magnet-enable")}autoStartRefresh(){let e=this.shadowRoot.querySelector("#container");this.querySelector("x-refresh-view > x-refresh-header:first-of-type")?.setAttribute("x-magnet-enable",""),this._nextRefreshIsManual=!1,e.scroll({top:0,behavior:"smooth"})}#eB=(0,aA.Ut)(()=>this.shadowRoot,"#container");#eX=(0,aA.Ut)(()=>this.shadowRoot,"#content");get scrollTop(){let e=this.#eB(),t=this.#eX();return t.scrollTop+t.offsetTop-e.scrollTop}set scrollTop(e){console.log(e);let t=this.#eB(),l=this.#eX();e>0?l.scrollTop=e:t.scrollTop=l.offsetTop+e}get scrollHeight(){return this.#eX().scrollHeight}get[aD.l](){return this}static{(0,ak.zF)(lr,lh)}};let sg=(lv=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;lu=[(0,aA._y)("src",!0)],lm=[(0,aA._y)("content",!0)],lp=[(0,aA.ZR)("load")],(0,ak.G4)(this,null,lu,{kind:"method",name:"_handleSrc",static:!1,private:!1,access:{has:e=>"_handleSrc"in e,get:e=>e._handleSrc},metadata:e},null,lv),(0,ak.G4)(this,null,lm,{kind:"method",name:"_handleContent",static:!1,private:!1,access:{has:e=>"_handleContent"in e,get:e=>e._handleContent},metadata:e},null,lv),(0,ak.G4)(this,null,lp,{kind:"method",name:"_enableLoadEvent",static:!1,private:!1,access:{has:e=>"_enableLoadEvent"in e,get:e=>e._enableLoadEvent},metadata:e},null,lv),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["src","content"];#e=(0,ak.zF)(this,lv);#eZ=null;#es=(0,aA.Ut)(()=>this.#e.shadowRoot,"#img");_handleSrc(e){e?this.#es().src=e:this.#es().src=""}_handleContent(e){if(this.#eZ&&URL.revokeObjectURL(this.#eZ),!e){this.#eZ="";return}let t=new Blob([e],{type:"image/svg+xml;charset=UTF-8"}),l=URL.createObjectURL(t);this.#eZ=l,this.#es().src=l}_enableLoadEvent(e){e?this.#es().addEventListener("load",this.#er,{passive:!0}):this.#es().removeEventListener("load",this.#er)}#er=()=>{this.#e.dispatchEvent(new CustomEvent("load",{...aM.$,detail:{width:this.#es().naturalWidth,height:this.#es().naturalHeight}}))};constructor(e){this.#e=e}});lf=[(0,aA.uA)("x-svg",[az.O,sg],'<img part="img" alt="" loading="lazy" id="img" /> ')],ly=[],lE=HTMLElement,(class extends lE{static{lg=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(lE[Symbol.metadata]??null):void 0;(0,ak.G4)(null,lb={value:lg},lf,{kind:"class",name:lg.name,metadata:e},null,ly),lg=lb.value,e&&Object.defineProperty(lg,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,ak.zF)(lg,ly)}}),lw=[(0,aA.uA)("x-swiper-item",[a0,az.O])],lx=[],lT=HTMLElement,class extends lT{static{l_=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(lT[Symbol.metadata]??null):void 0;(0,ak.G4)(null,lS={value:l_},lw,{kind:"class",name:l_.name,metadata:e},null,lx),l_=lS.value,e&&Object.defineProperty(l_,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,ak.zF)(l_,lx)}};let sf=(lL=[],lI=[],lF=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;lC=[(0,aA.ZR)("transition")],lO=[(0,aA.ZR)("scrollstart"),(0,aA.ZR)("lynxscrollend"),(0,aA.ZR)("change"),(0,aA.ZR)("change-event-for-indicator")],(0,ak.G4)(this,null,lO,{kind:"method",name:"_enableScrollEventProcessor",static:!1,private:!1,access:{has:e=>"_enableScrollEventProcessor"in e,get:e=>e._enableScrollEventProcessor},metadata:e},null,lL),(0,ak.G4)(null,null,lC,{kind:"field",name:"_handleEnableTransitionEvent",static:!1,private:!1,access:{has:e=>"_handleEnableTransitionEvent"in e,get:e=>e._handleEnableTransitionEvent,set:(e,t)=>{e._handleEnableTransitionEvent=t}},metadata:e},lI,lF),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=[];#e=(0,ak.zF)(this,lL);#eY=0;#eq=0;#e$=!1;#i;#eJ=!1;constructor(e){this.#e=e}#eX=(0,aA.Ut)(()=>this.#e.shadowRoot,"#content").bind(this);_handleEnableTransitionEvent=(0,ak.zF)(this,lI,(0,aA.LB)(this.#eX,"scroll",this.#eK,{passive:!0}));#m(){aD.k||(clearTimeout(this.#i),this.#i=setTimeout(()=>{this.#v()},100)),this.#eJ||(this.#e.dispatchEvent(new CustomEvent("scrollstart",{...aM.$,detail:{current:this.#eY,isDragged:this.#e$}})),this.#eJ=!0);let e=this.#eX(),t=this.#e.isVertical,l=t?e.scrollTop:e.scrollLeft,i=t?e.clientHeight:e.clientWidth,n=t?e.scrollHeight:e.scrollWidth;if(Math.abs(this.#eq-l)>i/4||l<10||Math.abs(l-n)<=i){let e=this.#e.currentIndex;e!==this.#eY&&(this.#e.dispatchEvent(new CustomEvent("change",{...aM.$,detail:{current:e,isDragged:this.#e$}})),this.#eY=e),this.#eq=l}}#v(){this.#e.dispatchEvent(new CustomEvent("lynxscrollend",{...aM.$,detail:{current:this.#eY}})),this.#eJ=!1}#eQ(){this.#e$=!0}#e0(){this.#e$=!1}#eK(){this.#e.dispatchEvent(new CustomEvent("transition",{...aM.$,detail:{dx:this.#eX().scrollLeft,dy:this.#eX().scrollTop}}))}#e1=((0,ak.zF)(this,lF),[(0,aA.LB)(this.#eX,"scroll",this.#m.bind(this),{passive:!0}),(0,aA.LB)(this.#eX,"touchstart",this.#eQ.bind(this),{passive:!0}),(0,aA.LB)(this.#eX,"touchend",this.#e0.bind(this),{passive:!0}),(0,aA.LB)(this.#eX,"touchcancel",this.#e0.bind(this),{passive:!0}),(0,aA.LB)(this.#eX,"scrollend",this.#v.bind(this),{passive:!0})]);#ek={scrollstart:!1,lynxscrollend:!1,change:!1,"change-event-for-indicator":!1};_enableScrollEventProcessor(e,t){this.#ek[t]=e;let{lynxscrollend:l,scrollstart:i,change:n}=this.#ek,a=n||l||i||this.#ek["change-event-for-indicator"];this.#e1.forEach(e=>e(a))}connectedCallback(){this.#eY=parseFloat(this.#e.getAttribute("current")??"0");let e=this.#e.isVertical;this.#eq=e?this.#eX().scrollTop:this.#eX().scrollLeft}}),sy=(lz=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;lk=[(0,aA._y)("current",!1)],lA=[(0,aA._y)("interval",!1),(0,aA._y)("autoplay",!1)],(0,ak.G4)(this,null,lk,{kind:"method",name:"_handleCurrentChange",static:!1,private:!1,access:{has:e=>"_handleCurrentChange"in e,get:e=>e._handleCurrentChange},metadata:e},null,lz),(0,ak.G4)(this,null,lA,{kind:"method",name:"_handleAutoplay",static:!1,private:!1,access:{has:e=>"_handleAutoplay"in e,get:e=>e._handleAutoplay},metadata:e},null,lz),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["current","interval","autoplay"];#e=(0,ak.zF)(this,lz);constructor(e){this.#e=e}#e4(){this.#e.currentIndex===this.#e.childElementCount-1?this.#e.circularPlay&&(this.#e.currentIndex=0):this.#e.currentIndex+=1}_handleCurrentChange(e){let t=Number(e);Number.isNaN(t)||(this.#e.currentIndex=t)}#e2;#e8=(()=>{this.#e4()}).bind(this);#e3(e){this.#e6(),this.#e2=setInterval(this.#e8,e)}#e6(){this.#e2&&clearInterval(this.#e2)}_handleAutoplay(){if(null!==this.#e.getAttribute("autoplay")){let e=this.#e.getAttribute("interval"),t=e?parseFloat(e):5e3;Number.isNaN(t)&&(t=5e3),this.#e3(t)}}dispose(){this.#e6()}}),sE=(lM=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;lP=[(0,aA._y)("circular",!1)],lR=[(0,aA._y)("vertical",!0)],(0,ak.G4)(this,null,lP,{kind:"method",name:"_handleCircular",static:!1,private:!1,access:{has:e=>"_handleCircular"in e,get:e=>e._handleCircular},metadata:e},null,lM),(0,ak.G4)(this,null,lR,{kind:"method",name:"_handleVerticalChange",static:!1,private:!1,access:{has:e=>"_handleVerticalChange"in e,get:e=>e._handleVerticalChange},metadata:e},null,lM),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["circular","vertical"];#e=(0,ak.zF)(this,lM);#e9=!1;#e5;#e7=0;#eX=(0,aA.Ut)(()=>this.#e.shadowRoot,"#content").bind(this);constructor(e){this.#e=e}#te=(0,aA.Ut)(()=>this.#e.shadowRoot,"#circular-start").bind(this);#tt=(0,aA.Ut)(()=>this.#e.shadowRoot,"#circular-end").bind(this);#tl(e){let t=this.#e.childElementCount;if(t>2){let{current:l,isDragged:i,__isFirstLayout:n}=e.detail;if(0===l||l===t-1||2===l||l===t-2){let e,a=this.#eX(),s=this.#te().assignedElements(),o=this.#tt().assignedElements(),r=this.#e.firstElementChild,d=this.#e.lastElementChild,h=this.#e.snapDistance;if(0===l?(o.forEach(e=>e.removeAttribute("slot")),d.setAttribute("slot","circular-start"),e=r):l===t-1?(s.forEach(e=>e.removeAttribute("slot")),r.setAttribute("slot","circular-end"),e=d):(s.forEach(e=>e.removeAttribute("slot")),o.forEach(e=>e.removeAttribute("slot")),e=this.#e.children[l]),this.#e9){let t="carousel"===this.#e.getAttribute("mode")?.8*a.clientHeight/2:a.clientHeight/2;this.#e7=e.offsetTop+e.offsetHeight/2-h-t,a.scrollTop=this.#e7}else{let t="carousel"===this.#e.getAttribute("mode")?.8*a.clientWidth/2:a.clientWidth/2;this.#e7=e.offsetLeft+e.offsetWidth/2-h-t,a.scrollLeft=this.#e7}if(!i){let e=this.#e.getAttribute("mode");if(n&&(null===e||"normal"===e||"carousel"===e||"carry"===e))return;this.#ti(n?"instant":"smooth")}}}}#ti(e){let t=this.#eX(),l=this.#e.snapDistance;t.scrollBy({top:this.#e9?l:0,left:this.#e9?0:l,behavior:e??"smooth"})}#e1=[(0,aA.LB)(()=>this.#e,"change",this.#tl.bind(this),{passive:!0}),(0,aA.LB)(()=>this.#e,"touchmove",this.#tn.bind(this),{passive:!1}),(0,aA.LB)(()=>this.#e,"touchend",this.#ta.bind(this),{passive:!1}),(0,aA.LB)(()=>this.#e,"touchcancel",this.#ta.bind(this),{passive:!1})];_handleCircular(e){this.#e1.forEach(t=>t(null!=e)),null!==e&&this.#tl({detail:{current:this.#e.currentIndex,isDragged:!1,__isFirstLayout:!0}})}#tn(e){let t=e.touches.item(0);if(t){let e=this.#e9?t.pageY:t.pageX;if(void 0!==this.#e5){this.#ts();let t=this.#e5-e;this.#e7+=t}this.#e5=e}}#ta(e){this.#to(),this.#ti(),this.#e5=void 0}_handleVerticalChange(e){this.#e9=null!==e}#tr;#ts(){if(!this.#tr){let e=this.#eX();this.#e7=this.#e9?e.scrollTop:e.scrollLeft,this.#tr=setInterval(()=>{this.#e9?e.scrollTop=this.#e7:e.scrollLeft=this.#e7},10)}}#to(){this.#tr&&(clearInterval(this.#tr),this.#tr=void 0)}dispose(){this.#to()}}),sS=(l$=[],lV=[],lU=[],lW=[],lB=[],lX=[],lZ=[],lY=[],lq=[],lJ=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;lH=[(0,aA._y)("indicator-color",!0)],lD=[(0,aA._y)("indicator-active-color",!0)],lN=[(0,aA._y)("page-margin",!0)],lj=[(0,aA._y)("previous-margin",!0)],lG=[(0,aA._y)("next-margin",!0)],(0,ak.G4)(null,null,lH,{kind:"field",name:"_handleIndicatorColor",static:!1,private:!1,access:{has:e=>"_handleIndicatorColor"in e,get:e=>e._handleIndicatorColor,set:(e,t)=>{e._handleIndicatorColor=t}},metadata:e},l$,lV),(0,ak.G4)(null,null,lD,{kind:"field",name:"_handleIndicatorActiveColor",static:!1,private:!1,access:{has:e=>"_handleIndicatorActiveColor"in e,get:e=>e._handleIndicatorActiveColor,set:(e,t)=>{e._handleIndicatorActiveColor=t}},metadata:e},lU,lW),(0,ak.G4)(null,null,lN,{kind:"field",name:"_handlePageMargin",static:!1,private:!1,access:{has:e=>"_handlePageMargin"in e,get:e=>e._handlePageMargin,set:(e,t)=>{e._handlePageMargin=t}},metadata:e},lB,lX),(0,ak.G4)(null,null,lj,{kind:"field",name:"_handlePreviousMargin",static:!1,private:!1,access:{has:e=>"_handlePreviousMargin"in e,get:e=>e._handlePreviousMargin,set:(e,t)=>{e._handlePreviousMargin=t}},metadata:e},lZ,lY),(0,ak.G4)(null,null,lG,{kind:"field",name:"_handleNextMargin",static:!1,private:!1,access:{has:e=>"_handleNextMargin"in e,get:e=>e._handleNextMargin,set:(e,t)=>{e._handleNextMargin=t}},metadata:e},lq,lJ),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["indicator-color","indicator-active-color","page-margin","previous-margin","next-margin"];#e;#td=0;#th=(0,aA.Ut)(()=>this.#e.shadowRoot,"#indicator-container");#tc=(0,aA.Ut)(()=>this.#e.shadowRoot,"#indicator-style");#tu;constructor(e){(0,ak.zF)(this,lJ),this.#e=e}_handleIndicatorColor=(0,ak.zF)(this,l$,(0,aA._8)(this.#th,"--indicator-color",void 0,!0));_handleIndicatorActiveColor=((0,ak.zF)(this,lV),(0,ak.zF)(this,lU,(0,aA._8)(this.#th,"--indicator-active-color",void 0,!0)));_handlePageMargin=((0,ak.zF)(this,lW),(0,ak.zF)(this,lB,(0,aA._8)(this.#th,"--page-margin",void 0,!0)));_handlePreviousMargin=((0,ak.zF)(this,lX),(0,ak.zF)(this,lZ,(0,aA._8)(this.#th,"--previous-margin",void 0,!0)));_handleNextMargin=((0,ak.zF)(this,lY),(0,ak.zF)(this,lq,(0,aA._8)(this.#th,"--next-margin",void 0,!0)));#tm(){let e=this.#e.childElementCount;if(e!==this.#td){let t="";for(let l=0;l<e;l++)t+=`<div style="animation-timeline:--x-swiper-item-${l};" part="indicator-item"></div>`;if(this.#th().innerHTML=t,e>5){for(let t=0;t<e;t++)this.#e.children.item(t)?.style.setProperty("view-timeline-name",`--x-swiper-item-${t}`);this.#tc().innerHTML=`:host { timeline-scope: ${Array.from({length:e},(e,t)=>`--x-swiper-item-${t}`).join(",")} !important; }`}}this.#td=e}connectedCallback(){if(this.#tm(),this.#tu=new MutationObserver(this.#tm.bind(this)),this.#tu.observe(this.#e,{attributes:!1,characterData:!1,childList:!0,subtree:!1}),!CSS.supports("timeline-scope","--a, --b")){this.#e.addEventListener("change",(({detail:e})=>{let t=e.current,l=this.#e.childElementCount,i=this.#th();for(let e=0;e<l;e++){let l=i.children[e];l&&(e===t?l.style.setProperty("background-color","var(--indicator-active-color)","important"):l.style.removeProperty("background-color"))}}).bind(this));let e=parseFloat(this.#e.getAttribute("current")??"0");this.#th().children[e]?.style.setProperty("background-color","var(--indicator-active-color)","important")}}dispose(){this.#tu?.disconnect(),this.#tu=void 0}});l0=[(0,aA.uA)("x-swiper",[az.O,sS,sf,sE,sy],aZ)],l1=[],l4=HTMLElement,class extends l4{static{lQ=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(l4[Symbol.metadata]??null):void 0;(0,ak.G4)(null,lK={value:lQ},l0,{kind:"class",name:lQ.name,metadata:e},null,l1),lQ=lK.value,e&&Object.defineProperty(lQ,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static notToFilterFalseAttributes=new Set(["smooth-scroll","indicator-dots"]);#eX=(0,aA.Ut)(()=>this.shadowRoot,"#content").bind(this);#tp(){let e=0,t=Number.MAX_SAFE_INTEGER,l=0;if(this.childElementCount>0){let i=this.#eX(),n=this.isVertical,a=this.childElementCount,s=n?i.scrollTop:i.scrollLeft,o=n?i.clientHeight:i.clientWidth,r=n?this.firstElementChild.offsetHeight:this.firstElementChild.offsetWidth,d=s+("carousel"===this.getAttribute("mode")?.8*o/2:o/2);for(let i=0;i<a;i++){let a=this.children[i];if(a){let s=(n?a.offsetTop:a.offsetLeft)+r/2-d,o=Math.abs(s);o<t&&(e=i,t=o,l=s)}}}return{current:e,minDistanceToMid:t,minOffsetToMid:l}}get currentIndex(){return this.#tp().current}set currentIndex(e){if(this.currentIndex===e)return;let t=null===this.getAttribute("smooth-scroll");this.#tv(e,t?"smooth":"instant")}#tv(e,t){let l=this.children.item(e);if(l){let e=this.isVertical,i=0;i="flat-coverflow"===this.getAttribute("mode")?e?l.offsetTop-l.offsetHeight/3:l.offsetLeft-l.offsetWidth/3:e?l.offsetTop:l.offsetLeft,this.#eX().scrollTo({left:e?0:i,top:e?i:0,behavior:t})}}get snapDistance(){return this.#tp().minOffsetToMid}get isVertical(){return null!==this.getAttribute("vertical")}get circularPlay(){return null!==this.getAttribute("circular")}scrollTo(...e){if(e.length>0&&"object"==typeof e[0]&&null!==e[0]&&"index"in e[0]){let{index:t,smooth:l=!0}=e[0];if("number"==typeof t)return void this.#tv(t,l?"smooth":"instant")}super.scrollTo(...e)}connectedCallback(){let e=this.getAttribute("current");null!==e&&this.#tv(Number(e),"instant")}get[aD.l](){return this}static{(0,ak.zF)(lQ,l1)}};let s_=(l8=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;l2=[(0,aA._y)("src",!0)],(0,ak.G4)(this,null,l2,{kind:"method",name:"_handleSrc",static:!1,private:!1,access:{has:e=>"_handleSrc"in e,get:e=>e._handleSrc},metadata:e},null,l8),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["src"];#e=(0,ak.zF)(this,l8);constructor(e){this.#e=e}#tb=(0,aA.Ut)(()=>this.#e.shadowRoot,"#img");_handleSrc(e){e?this.#tb().setAttribute("src",e):this.#tb().removeAttribute("src")}});l9=[(0,aA.uA)("inline-image",[s_],aV({}))],l5=[],l7=HTMLElement,(class extends l7{static{l6=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(l7[Symbol.metadata]??null):void 0;(0,ak.G4)(null,l3={value:l6},l9,{kind:"class",name:l6.name,metadata:e},null,l5),l6=l3.value,e&&Object.defineProperty(l6,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,ak.zF)(l6,l5)}}),il=[(0,aA.uA)("inline-text",[])],ii=[],ia=HTMLElement,(class extends ia{static{it=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(ia[Symbol.metadata]??null):void 0;(0,ak.G4)(null,ie={value:it},il,{kind:"class",name:it.name,metadata:e},null,ii),it=ie.value,e&&Object.defineProperty(it,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,ak.zF)(it,ii)}}),ir=[(0,aA.uA)("inline-truncation",[])],id=[],ih=HTMLElement,aI=class extends ih{static{io=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(ih[Symbol.metadata]??null):void 0;(0,ak.G4)(null,is={value:io},ir,{kind:"class",name:io.name,metadata:e},null,id),aI=io=is.value,e&&Object.defineProperty(io,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static XEnableCustomTruncation="x-text-custom-overflow";connectedCallback(){CSS.supports("selector(:has(>inline-truncation))")||this.parentElement?.tagName!=="X-TEXT"||this.matches("inline-truncation ~ inline-truncation")||this.parentElement.setAttribute(aI.XEnableCustomTruncation,""),this.setAttribute("slot","inline-truncation")}disconnectedCallback(){this.parentElement?.removeAttribute(aI.XEnableCustomTruncation)}static{(0,ak.zF)(io,id)}},aI=io;let sw=(iu=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;ic=[(0,aA._y)("text",!0)],(0,ak.G4)(this,null,ic,{kind:"method",name:"_handleText",static:!1,private:!1,access:{has:e=>"_handleText"in e,get:e=>e._handleText},metadata:e},null,iu),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["text"];#e=(0,ak.zF)(this,iu);#tg;constructor(e){this.#e=e}_handleText(e){this.#tg?.remove(),e&&(this.#tg=new Text(e),this.#e.append(this.#tg))}});iv=[(0,aA.uA)("raw-text",[sw])],ib=[],ig=HTMLElement,class extends ig{static{ip=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(ig[Symbol.metadata]??null):void 0;(0,ak.G4)(null,im={value:ip},iv,{kind:"class",name:ip.name,metadata:e},null,ib),ip=im.value,e&&Object.defineProperty(ip,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,ak.zF)(ip,ib)}};let sx=(iS=[],class e{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;iy=[(0,aA._y)("text-maxlength",!0),(0,aA._y)("text-maxline",!0),(0,aA._y)("tail-color-convert",!0)],iE=[(0,aA.ZR)("layout")],(0,ak.G4)(this,null,iy,{kind:"method",name:"_handleAttributeChange",static:!1,private:!1,access:{has:e=>"_handleAttributeChange"in e,get:e=>e._handleAttributeChange},metadata:e},null,iS),(0,ak.G4)(this,null,iE,{kind:"method",name:"_handleEnableLayoutEvent",static:!1,private:!1,access:{has:e=>"_handleEnableLayoutEvent"in e,get:e=>e._handleEnableLayoutEvent},metadata:e},null,iS),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static exceedMathLengthAttribute="x-text-clipped";static showInlineTruncation="x-show-inline-truncation";static observedAttributes=["text-maxlength","text-maxline","tail-color-convert"];#tf=((0,ak.zF)(this,iS),!1);#ty=!1;#tE=new Map;#tS;#z;#t_;#tw;#tx=!1;#tT=NaN;#tC=NaN;#tO=!0;#tL=!1;get #tI(){return!this.#tF&&!this.#tO}get #tF(){return!!this.#tk()}#tk(){return this.#e.querySelector(":scope > inline-truncation")}get #tA(){return!isNaN(this.#tC)&&(this.#tF||!this.#tO)}#e;constructor(e){this.#e=e}#tz=(0,aA.Ut)(()=>this.#e.shadowRoot,"#inner-box");#tP(e){e.forEach(e=>{e.removedNodes.forEach(e=>{this.#tE.delete(e)}),"characterData"===e.type&&void 0!==this.#tE.get(e.target)&&this.#tE.set(e.target,e.target.data)})}#tR(){for(let[t,l]of this.#tE)t.nodeType===Node.TEXT_NODE?void 0!==l&&(t.data=l):t.removeAttribute(e.exceedMathLengthAttribute);this.#e.removeAttribute(e.exceedMathLengthAttribute),this.#e.removeAttribute(e.showInlineTruncation)}#tM(e){let t=[],l=e;for(;l=l.nextSibling;)(l.nodeType===Node.TEXT_NODE||l.nodeType===Node.ELEMENT_NODE)&&t.push(l);return t}#tH(){!this.#ty||this.#e.matches("x-text>x-text")||this.#tf||(this.#tf=!0,(0,aA.JS)(async()=>{await this.#tD(),this.#tN(),this.#tf=!1}))}async #tD(){if(this.#t_?.parentElement?.removeChild(this.#t_),this.#tR(),!this.#tA&&isNaN(this.#tT))return;await document.fonts.ready;let t=this.#tz().getBoundingClientRect();this.#tw=new sT(this.#e,t);let l=this.#tw,i=(isNaN(this.#tT)?void 0:l.getNodeInfoByCharIndex(this.#tT))?this.#tT:1/0,n=this.#tA&&l.getLineInfo(this.#tC)?l.getLineInfo(this.#tC-1):void 0,a=1/0,s=3;if(n){let{start:i,end:o}=n,r=o-i;if(this.#tF){this.#e.setAttribute(e.showInlineTruncation,"");let n=this.#tk().getBoundingClientRect(),s=t.width,r=n.width;if(s>r){a=o-1;let e=document.createRange(),t=l.getNodeInfoByCharIndex(a),i=o-t.start;for(e.setEnd(t.node,i),e.setStart(t.node,i);e.getBoundingClientRect().width<r&&(a-=1)&&(t=l.getNodeInfoByCharIndex(a));)e.setStart(t.node,a-t.start)}else a=i,this.#e.removeAttribute(e.showInlineTruncation)}else r<3?(s=r,a=i):a=o-3}let o=Math.min(i,a);if(o<1/0){let t=l.getNodeInfoByCharIndex(o);if(t){let i=o-t.start,n=t.node,a=[];n.nodeType===Node.TEXT_NODE?(this.#tE.set(n,n.data),n.data=n.data.substring(0,i)):a.push(n),a=a.concat(this.#tM(n));let r=n.parentElement;for(;r!==this.#e;)a=a.concat(this.#tM(r)),r=r.parentElement;if(a.forEach(t=>{t.nodeType===Node.TEXT_NODE&&0!==t.data.length?(this.#tE.set(t,t.data),t.data=""):t.nodeType===Node.ELEMENT_NODE&&(this.#tE.set(t,""),t.setAttribute(e.exceedMathLengthAttribute,""))}),this.#tI){let e=(0===i?l.nodelist.at(t.nodeIndex-1)?.parentElement:n.parentElement)??n.parentElement;this.#t_=new Text(Array(s).fill(".").join("")),e.append(this.#t_)}this.#e.setAttribute(e.exceedMathLengthAttribute,"")}this.#tj(o)}}#tG=e=>{this.#tP(e),this.#tH()};#t$=()=>{if(this.#tx){this.#tx=!1;return}this.#tH()};#tN(){this.#ty&&((this.#tT||this.#tC)&&!this.#tS&&(this.#tS=new MutationObserver(this.#tG),this.#tS.observe(this.#e,{subtree:!0,childList:!0,attributes:!1,characterData:!0})),this.#tC&&!this.#z&&(this.#z=new ResizeObserver(this.#t$),this.#tx=!0,this.#z.observe(this.#tz(),{box:"content-box"})))}#tV(){this.#tS?.disconnect(),this.#tS=void 0,this.#z?.disconnect(),this.#z=void 0}_handleAttributeChange(){this.#tT=parseFloat(this.#e.getAttribute("text-maxlength")??""),this.#tC=parseFloat(this.#e.getAttribute("text-maxline")??""),this.#tO="false"!==this.#e.getAttribute("tail-color-convert"),this.#tT<0&&(this.#tT=NaN),this.#tC<1&&(this.#tC=NaN),isNaN(this.#tC)?this.#tz().style.removeProperty("-webkit-line-clamp"):this.#tz().style.webkitLineClamp=this.#tC.toString(),this.#tH()}_handleEnableLayoutEvent(e){this.#tL=e}#tj(e){if(!this.#tL)return;let t=new Proxy(this,{get:(t,l)=>"lineCount"===l?(t.#tw||(t.#tw=new sT(t.#e,t.#e.getBoundingClientRect())),t.#tw.getLineCount()):"lines"===l?new Proxy(t,{get(t,l){let i=parseFloat(l.toString());if(!isNaN(i)){t.#tw||(t.#tw=new sT(t.#e,t.#e.getBoundingClientRect()));let l=t.#tw.getLineInfo(i);if(l)return new Proxy(l,{get(t,l){switch(l){case"start":case"end":return t[l];case"ellipsisCount":if(void 0!==e&&e>=t.start&&e<t.end)return t.end-e;return 0}}})}}}):void 0});this.#e.dispatchEvent(new CustomEvent("layout",{...aM.$,detail:t}))}dispose(){this.#tV()}connectedCallback(){this.#ty=!0,this._handleEnableLayoutEvent(this.#tL),this._handleAttributeChange(),(0,aA.JS)(()=>{this.#tj()})}});class sT{#tU=[{start:0}];#tW=[];#tB=[];#e;#tX;nodelist;constructor(e,t){this.#e=e,this.nodelist=new sC(this.#e),this.#tX=t}#tZ(e){if(e.node.nodeType!==Node.TEXT_NODE)return 1;{let{rect:t,rectIndex:l}=e,i=e.node,n=document.createRange();n.selectNode(i);for(let e=0;e<i.data.length;e++){n.setEnd(i,e);let a=n.getClientRects().item(l);if(a&&a.right===t.right)return e}return i.data.length}}#tY(e){if(this.#tW[e])return;let{left:t}=this.#tX,l=this.#tW[this.#tW.length-1],i=l?.[l.length-1],n=i?.nodeIndex?i?.nodeIndex+1:0;for(let l=n,i;(i=this.#tq(l))&&e>=this.#tW.length;l++){let e,{node:l}=i;if(l.nodeType===Node.ELEMENT_NODE)e=l.getClientRects();else{let t=document.createRange();t.selectNode(l),e=t.getClientRects()}if(e.length>0){let l=this.#tW[this.#tW.length-1],n=e[0];if(.2>Math.abs(n.left-t)||!l?this.#tW.push([{...i,rect:n,rectIndex:0}]):l.push({...i,rect:n,rectIndex:0}),e.length>1)for(let l=1;l<e.length;l++){let a=e[l];(a.left!==n.left||a.bottom!==n.bottom)&&(.2>Math.abs(a.left-t)?this.#tW.push([{...i,rect:a,rectIndex:l}]):this.#tW[this.#tW.length-1].push({...i,rect:a,rectIndex:l}))}}}}getLineCount(){return this.#tY(1/0),this.#tW.length}getLineInfo(e){if(this.#tY(e+1),e<this.#tW.length){let t=e>0?this.#tU[e-1]??{}:void 0,l=this.#tU[e]??{},i=e<this.#tW.length-1?this.#tU[e+1]??{}:void 0;if(void 0===l.start){let i=this.#tW[e-1],n=i[i.length-1],a=this.#tZ(n),s=n.start+a;t&&(t.end=s),l.start=s+1}if(void 0===l.end){let t=this.#tW[e],n=t[t.length-1];if(e===this.#tW.length-1){let e=n.node.nodeType===Node.TEXT_NODE?n.node.data.length:1;l.end=n.start+e}else{let e=this.#tZ(n);l.end=n.start+e,i.start=l.end+1}}return l}}#tq(e){let t=this.#tB.length-1,l=this.#tB[t],i=l?l.start+l.length:0;for(let t=this.#tB.length,l;(l=this.nodelist.at(t))&&e>=this.#tB.length;t++){let e=l.nodeType===Node.ELEMENT_NODE?1:l.data.length,n={node:l,length:e,start:i,nodeIndex:t};this.#tB.push(n)}return this.#tB[e]}getNodeInfoByCharIndex(e){let t,l=0,i=this.#tB.length-1;for(;l<=i;){let n=Math.floor((l+i)/2),a=this.#tB[n],s=a.node,o=s.nodeType===Node.TEXT_NODE?s.data.length:1,r=a.start;if(e>=r&&e<r+o){t=a;break}e<r?i=n-1:l=n+1}if(t)return t;for(let t=this.#tB.length,l;l=this.#tq(t);t++)if(e<l.start+l.length)return l}}class sC{#tJ=[];#tK;constructor(e){this.#tK=document.createTreeWalker(e,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,e=>{if(e.nodeType===Node.ELEMENT_NODE){let t=e.tagName;if("X-TEXT"===t||"INLINE-TEXT"===t||"RAW-TEXT"===t||"LYNX-WRAPPER"===t)return NodeFilter.FILTER_SKIP}return NodeFilter.FILTER_ACCEPT})}at(e){return this.#tJ[e]||this.#tQ(e),this.#tJ[e]}#tQ(e){let t=null;for(;e>=this.#tJ.length&&(t=this.#tK.nextNode());){this.#tJ.push(t);break}}}ix=[(0,aA.uA)("x-text",[az.O,sx,sw],'<div id="inner-box" part="inner-box"><slot part="slot"></slot><slot name="inline-truncation"></slot></div>')],iT=[],iC=HTMLElement,class extends iC{static{iw=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(iC[Symbol.metadata]??null):void 0;(0,ak.G4)(null,i_={value:iw},ix,{kind:"class",name:iw.name,metadata:e},null,iT),iw=i_.value,e&&Object.defineProperty(iw,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static notToFilterFalseAttributes=new Set(["tail-color-convert"]);superScrollIntoView(e){super.scrollIntoView(e)}scrollIntoView(e){"object"==typeof e&&e.scrollIntoViewOptions?this.dispatchEvent(new CustomEvent(aj.eventName,{bubbles:!0,composed:!0,detail:e.scrollIntoViewOptions})):super.scrollIntoView(e)}[az.v]=this;static{(0,ak.zF)(iw,iT)}};let sO=(iA=[],iz=[],iP=[],iR=[],iM=[],iH=[],iD=[],iN=[],ij=[],iG=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;iO=[(0,aA._y)("placeholder-color",!0)],iL=[(0,aA._y)("placeholder-font-size",!0)],iI=[(0,aA._y)("placeholder-font-weight",!0)],iF=[(0,aA._y)("placeholder-font-family",!0)],ik=[(0,aA._y)("placeholder",!0)],(0,ak.G4)(null,null,iO,{kind:"field",name:"_updatePlaceholderColor",static:!1,private:!1,access:{has:e=>"_updatePlaceholderColor"in e,get:e=>e._updatePlaceholderColor,set:(e,t)=>{e._updatePlaceholderColor=t}},metadata:e},iA,iz),(0,ak.G4)(null,null,iL,{kind:"field",name:"_updatePlaceholderFontSize",static:!1,private:!1,access:{has:e=>"_updatePlaceholderFontSize"in e,get:e=>e._updatePlaceholderFontSize,set:(e,t)=>{e._updatePlaceholderFontSize=t}},metadata:e},iP,iR),(0,ak.G4)(null,null,iI,{kind:"field",name:"_updatePlaceholderFontWeight",static:!1,private:!1,access:{has:e=>"_updatePlaceholderFontWeight"in e,get:e=>e._updatePlaceholderFontWeight,set:(e,t)=>{e._updatePlaceholderFontWeight=t}},metadata:e},iM,iH),(0,ak.G4)(null,null,iF,{kind:"field",name:"_updatePlaceholderFontFamily",static:!1,private:!1,access:{has:e=>"_updatePlaceholderFontFamily"in e,get:e=>e._updatePlaceholderFontFamily,set:(e,t)=>{e._updatePlaceholderFontFamily=t}},metadata:e},iD,iN),(0,ak.G4)(null,null,ik,{kind:"field",name:"_handlePlaceholder",static:!1,private:!1,access:{has:e=>"_handlePlaceholder"in e,get:e=>e._handlePlaceholder,set:(e,t)=>{e._handlePlaceholder=t}},metadata:e},ij,iG),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["placeholder","placeholder-color","placeholder-font-size","placeholder-font-weight","placeholder-font-family"];#t0=(0,aA.Ut)(()=>this.#e.shadowRoot,"#textarea");_updatePlaceholderColor=(0,ak.zF)(this,iA,(0,aA._8)(this.#t0,"--placeholder-color",void 0,!0));_updatePlaceholderFontSize=((0,ak.zF)(this,iz),(0,ak.zF)(this,iP,(0,aA._8)(this.#t0,"--placeholder-font-size",void 0,!0)));_updatePlaceholderFontWeight=((0,ak.zF)(this,iR),(0,ak.zF)(this,iM,(0,aA._8)(this.#t0,"--placeholder-font-weight",void 0,!0)));_updatePlaceholderFontFamily=((0,ak.zF)(this,iH),(0,ak.zF)(this,iD,(0,aA._8)(this.#t0,"--placeholder-font-family",void 0,!0)));_handlePlaceholder=((0,ak.zF)(this,iN),(0,ak.zF)(this,ij,(0,aA.H$)(this.#t0,"placeholder")));#e=(0,ak.zF)(this,iG);constructor(e){this.#e=e}}),sL=(iX=[],iZ=[],iY=[],iq=[],iJ=[],iK=[],iQ=[],i0=[],i1=[],i4=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;i$=[(0,aA._y)("confirm-type",!0)],iV=[(0,aA._y)("maxlength",!0)],iU=[(0,aA._y)("readonly",!0)],iW=[(0,aA._y)("ios-spell-check",!0)],iB=[(0,aA._y)("show-soft-input-onfocus",!0)],(0,ak.G4)(null,null,i$,{kind:"field",name:"_handlerConfirmType",static:!1,private:!1,access:{has:e=>"_handlerConfirmType"in e,get:e=>e._handlerConfirmType,set:(e,t)=>{e._handlerConfirmType=t}},metadata:e},iX,iZ),(0,ak.G4)(null,null,iV,{kind:"field",name:"_handlerMaxlength",static:!1,private:!1,access:{has:e=>"_handlerMaxlength"in e,get:e=>e._handlerMaxlength,set:(e,t)=>{e._handlerMaxlength=t}},metadata:e},iY,iq),(0,ak.G4)(null,null,iU,{kind:"field",name:"_handleReadonly",static:!1,private:!1,access:{has:e=>"_handleReadonly"in e,get:e=>e._handleReadonly,set:(e,t)=>{e._handleReadonly=t}},metadata:e},iJ,iK),(0,ak.G4)(null,null,iW,{kind:"field",name:"_handleSpellCheck",static:!1,private:!1,access:{has:e=>"_handleSpellCheck"in e,get:e=>e._handleSpellCheck,set:(e,t)=>{e._handleSpellCheck=t}},metadata:e},iQ,i0),(0,ak.G4)(null,null,iB,{kind:"field",name:"_handleShowSoftInputOnfocus",static:!1,private:!1,access:{has:e=>"_handleShowSoftInputOnfocus"in e,get:e=>e._handleShowSoftInputOnfocus,set:(e,t)=>{e._handleShowSoftInputOnfocus=t}},metadata:e},i1,i4),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["confirm-type","maxlength","readonly","type","ios-spell-check","spell-check","show-soft-input-onfocus"];#e;#t1=(0,aA.Ut)(()=>this.#e.shadowRoot,"#textarea");_handlerConfirmType=(0,ak.zF)(this,iX,(0,aA.H$)(this.#t1,"enterkeyhint",e=>null===e?"send":e));_handlerMaxlength=((0,ak.zF)(this,iZ),(0,ak.zF)(this,iY,(0,aA.H$)(this.#t1,"maxlength",e=>null===e?"140":e)));_handleReadonly=((0,ak.zF)(this,iq),(0,ak.zF)(this,iJ,(0,aA.H$)(this.#t1,"readonly",e=>null!==e?"":null)));_handleSpellCheck=((0,ak.zF)(this,iK),(0,ak.zF)(this,iQ,(0,aA.H$)(this.#t1,"spellcheck",e=>null===e?"false":"true")));_handleShowSoftInputOnfocus=((0,ak.zF)(this,i0),(0,ak.zF)(this,i1,(0,aA.H$)(this.#t1,"virtualkeyboardpolicy",e=>null===e?"manual":"auto")));constructor(e){(0,ak.zF)(this,i4),this.#e=e}}),sI=(i5=[],i7=[],ne=[],nt=[],nl=[],ni=[],nn=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;i2=[(0,aA._y)("confirm-enter",!0)],i8=[(0,aA._y)("disabled",!0)],i3=[(0,aA._y)("max-height",!0)],i6=[(0,aA._y)("min-height",!0)],i9=[(0,aA._y)("value",!1)],(0,ak.G4)(this,null,i2,{kind:"method",name:"_handleConfirmEnter",static:!1,private:!1,access:{has:e=>"_handleConfirmEnter"in e,get:e=>e._handleConfirmEnter},metadata:e},null,i5),(0,ak.G4)(this,null,i9,{kind:"method",name:"_handleValue",static:!1,private:!1,access:{has:e=>"_handleValue"in e,get:e=>e._handleValue},metadata:e},null,i5),(0,ak.G4)(null,null,i8,{kind:"field",name:"_handleDisabled",static:!1,private:!1,access:{has:e=>"_handleDisabled"in e,get:e=>e._handleDisabled,set:(e,t)=>{e._handleDisabled=t}},metadata:e},i7,ne),(0,ak.G4)(null,null,i3,{kind:"field",name:"_handleMaxHeight",static:!1,private:!1,access:{has:e=>"_handleMaxHeight"in e,get:e=>e._handleMaxHeight,set:(e,t)=>{e._handleMaxHeight=t}},metadata:e},nt,nl),(0,ak.G4)(null,null,i6,{kind:"field",name:"_handleMinHeight",static:!1,private:!1,access:{has:e=>"_handleMinHeight"in e,get:e=>e._handleMinHeight,set:(e,t)=>{e._handleMinHeight=t}},metadata:e},ni,nn),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["confirm-enter","disabled","max-height","min-height","value"];#e=(0,ak.zF)(this,i5);#t1=(0,aA.Ut)(()=>this.#e.shadowRoot,"#textarea");#ev=(0,aA.Ut)(()=>this.#e.shadowRoot,"#form");#t4=!1;_handleConfirmEnter(e){this.#t4=null!==e}_handleDisabled=(0,ak.zF)(this,i7,(0,aA.H$)(this.#t1,"disabled",e=>null!==e?"":null));_handleMaxHeight=((0,ak.zF)(this,ne),(0,ak.zF)(this,nt,(0,aA._8)(this.#t1,"max-height")));_handleMinHeight=((0,ak.zF)(this,nl),(0,ak.zF)(this,ni,(0,aA._8)(this.#t1,"min-height")));_handleValue(e){if(e){let t=parseFloat(this.#e.getAttribute("maxlength")??"");isNaN(t)||(e=e.substring(0,t))}else e="";let t=this.#t1();t.value!==e&&(t.value=e)}#t2=((0,ak.zF)(this,nn),e=>{this.#t4&&"Enter"===e.key&&this.#ev().dispatchEvent(new SubmitEvent("submit"))});constructor(e){this.#e=e,this.#t1().addEventListener("keyup",this.#t2)}}),sF=(nr=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;na=[(0,aA._y)("input-filter",!0),(0,aA.ZR)("lynxinput")],ns=[(0,aA._y)("send-composing-input",!0)],no=[(0,aA.ZR)("selection")],(0,ak.G4)(this,null,na,{kind:"method",name:"_handleEnableConfirmEvent",static:!1,private:!1,access:{has:e=>"_handleEnableConfirmEvent"in e,get:e=>e._handleEnableConfirmEvent},metadata:e},null,nr),(0,ak.G4)(this,null,ns,{kind:"method",name:"_handleSendComposingInput",static:!1,private:!1,access:{has:e=>"_handleSendComposingInput"in e,get:e=>e._handleSendComposingInput},metadata:e},null,nr),(0,ak.G4)(this,null,no,{kind:"method",name:"_handleEnableSelectionEvent",static:!1,private:!1,access:{has:e=>"_handleEnableSelectionEvent"in e,get:e=>e._handleEnableSelectionEvent},metadata:e},null,nr),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["send-composing-input","input-filter"];#e=(0,ak.zF)(this,nr);#em=!1;#t1=(0,aA.Ut)(()=>this.#e.shadowRoot,"#textarea");#ev=(0,aA.Ut)(()=>this.#e.shadowRoot,"#form");_handleEnableConfirmEvent(e){let t=this.#t1();e?(t.addEventListener("input",this.#eb,{passive:!0}),t.addEventListener("compositionend",this.#eg,{passive:!0})):(t.removeEventListener("input",this.#eb),t.removeEventListener("compositionend",this.#eg))}_handleSendComposingInput(e){this.#em=null!==e}#ef=e=>{let t=sc[e.type]??e.type;this.#e.dispatchEvent(new CustomEvent(t,{...aM.$,detail:{value:this.#t1().value}}))};#eb=e=>{let t=this.#t1(),l=this.#e.getAttribute("input-filter"),i=l?t.value.replace(RegExp(l,"g"),""):t.value,n=e.isComposing;t.value=i,(!n||this.#em)&&this.#e.dispatchEvent(new CustomEvent("lynxinput",{...aM.$,detail:{value:i,textLength:i.length,cursor:t.selectionStart,isComposing:n,selectionStart:t.selectionStart,selectionEnd:t.selectionEnd}}))};#eg=()=>{let e=this.#t1(),t=this.#e.getAttribute("input-filter"),l=t?e.value.replace(RegExp(t,"g"),""):e.value;e.value=l,this.#em||this.#e.dispatchEvent(new CustomEvent("lynxinput",{...aM.$,detail:{value:l,textLength:l.length,cursor:e.selectionStart,isComposing:!1,selectionStart:e.selectionStart,selectionEnd:e.selectionEnd}}))};_handleEnableSelectionEvent(e){e?this.#t1().addEventListener("select",this.#eE,{passive:!0}):this.#t1().removeEventListener("select",this.#eE)}#eE=()=>{let e=this.#t1();this.#e.dispatchEvent(new CustomEvent("selection",{...aM.$,detail:{selectionStart:e.selectionStart,selectionEnd:e.selectionEnd}}))};#eS=e=>{e.target===this.#t1()&&"number"==typeof e.detail&&e.stopImmediatePropagation()};constructor(e){this.#e=e;const t=this.#t1(),l=this.#ev();t.addEventListener("blur",this.#ef,{passive:!0}),t.addEventListener("focus",this.#ef,{passive:!0}),l.addEventListener("submit",this.#ef,{passive:!0}),l.addEventListener("input",this.#eS,{passive:!0})}});nc=[(0,aA.uA)("x-textarea",[az.O,sO,sL,sI,sF],aY)],nu=[],nm=HTMLElement,(class extends nm{static{nh=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(nm[Symbol.metadata]??null):void 0;(0,ak.G4)(null,nd={value:nh},nc,{kind:"class",name:nh.name,metadata:e},null,nu),nh=nd.value,e&&Object.defineProperty(nh,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,ak.zF)(nh,nu)}#t0=(0,aA.Ut)(()=>this.shadowRoot,"#textarea");get value(){return this.#t0().value}set value(e){this.#t0().value=e}addText(e){let{text:t}=e,l=this.#t0(),i=l.selectionStart;if(null===i)l.value=t;else{let e=l.value;l.value=e.slice(0,i)+t+e.slice(i)}}setValue(e){let t,l=this.#t0();l.value=e.value,(t=e.index)&&l.setSelectionRange(t,t)}getValue(){let e=this.#t0();return{value:e.value,selectionBegin:e.selectionStart,selectionEnd:e.selectionEnd}}sendDelEvent(e){let{action:t,length:l}=e,i=this.#t0();1===t&&(l=1);let n=i.selectionStart;if(null===n){let e=i.value;i.value=i.value.substring(0,e.length-l)}else{let e=i.value;i.value=e.slice(0,n-l)+e.slice(n)}}select(){let e=this.#t0();e.setSelectionRange(0,e.value.length)}setSelectionRange(e){this.#t0().setSelectionRange(e.selectionStart,e.selectionEnd)}}),nb=[(0,aA.uA)("x-view",[a0,az.O])],ng=[],nf=HTMLElement,class extends nf{static{nv=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(nf[Symbol.metadata]??null):void 0;(0,ak.G4)(null,np={value:nv},nb,{kind:"class",name:nv.name,metadata:e},null,ng),nv=np.value,e&&Object.defineProperty(nv,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,ak.zF)(nv,ng)}superScrollIntoView(e){super.scrollIntoView(e)}scrollIntoView(e){"object"==typeof e&&e.scrollIntoViewOptions?this.dispatchEvent(new CustomEvent(aj.eventName,{bubbles:!0,composed:!0,detail:e.scrollIntoViewOptions})):super.scrollIntoView(e)}[az.v]=this};let sk=(nE=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;ny=[(0,aA._y)("blur-radius",!0)],(0,ak.G4)(this,null,ny,{kind:"method",name:"_handleBlurRadius",static:!1,private:!1,access:{has:e=>"_handleBlurRadius"in e,get:e=>e._handleBlurRadius},metadata:e},null,nE),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["blur-radius"];#e=(0,ak.zF)(this,nE);#t8=(0,aA.Ut)(()=>this.#e.shadowRoot,"#dynamic-style");_handleBlurRadius(e){e?(e=`blur(${parseFloat(e)}px)`,this.#t8().innerHTML=`:host { backdrop-filter: ${e}; -webkit-backdrop-filter: ${e}}`):this.#t8().innerHTML=""}constructor(e){this.#e=e}});nw=[(0,aA.uA)("x-blur-view",[az.O,sk],'<style id="dynamic-style"></style><slot></slot>')],nx=[],nT=HTMLElement,class extends nT{static{n_=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(nT[Symbol.metadata]??null):void 0;(0,ak.G4)(null,nS={value:n_},nw,{kind:"class",name:n_.name,metadata:e},null,nx),n_=nS.value,e&&Object.defineProperty(n_,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,ak.zF)(n_,nx)}};let sA=(nI=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;nC=[(0,aA.ZR)("change")],nO=[(0,aA.ZR)("willchange")],nL=[(0,aA.ZR)("offsetchange")],(0,ak.G4)(this,null,nC,{kind:"method",name:"_enableChangeEvent",static:!1,private:!1,access:{has:e=>"_enableChangeEvent"in e,get:e=>e._enableChangeEvent},metadata:e},null,nI),(0,ak.G4)(this,null,nO,{kind:"method",name:"_enableWillChangeEvent",static:!1,private:!1,access:{has:e=>"_enableWillChangeEvent"in e,get:e=>e._enableWillChangeEvent},metadata:e},null,nI),(0,ak.G4)(this,null,nL,{kind:"method",name:"_enableOffsetChangeEvent",static:!1,private:!1,access:{has:e=>"_enableOffsetChangeEvent"in e,get:e=>e._enableOffsetChangeEvent},metadata:e},null,nI),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=[];#e=(0,ak.zF)(this,nI);#t3=!1;#t6=!1;#t9=0;#i;constructor(e){this.#e=e}#s=(0,aA.Ut)(()=>this.#e.shadowRoot,"#content");#t5=()=>{if(!this.#t6)return;let e=this.#s(),t=this.#e.clientWidth,l=e.scrollLeft;this.#t7&&!aD.k&&(clearTimeout(this.#i),this.#i=setTimeout(()=>{this.#le()},100)),this.#e.dispatchEvent(new CustomEvent("offsetchange",{...aM.$,detail:{offset:l/t}}))};#le=()=>{if(this.#t6){let e=this.#s(),t=this.#e.clientWidth,l=Math.floor(e.scrollLeft/t);l!==this.#t9&&(this.#e.dispatchEvent(new CustomEvent("change",{...aM.$,detail:{index:l,isDragged:this.#t3}})),this.#t9=l)}};#lt=()=>{this.#t3=!0};#ll=()=>{if(this.#t3=!1,this.#li){let e=this.#s(),t=this.#e.clientWidth;if(t>0){let l=Math.round(e.scrollLeft/t);l=Math.max(0,Math.min(l,this.#e.children.length-1)),this.#e.dispatchEvent(new CustomEvent("willchange",{...aM.$,detail:{index:l}}))}}};#t7=!1;_enableChangeEvent(e){this.#t7=e,this.#ln()}#li=!1;_enableWillChangeEvent(e){this.#li=e}#la=!1;_enableOffsetChangeEvent(e){this.#la=e,this.#ln()}#ln(){let e=this.#s();this.#la||this.#t7?e.addEventListener("scroll",this.#t5,{passive:!0}):e.removeEventListener("scroll",this.#t5),aD.k&&this.#t7?e.addEventListener("scrollend",this.#le,{passive:!0}):e.removeEventListener("scrollend",this.#le)}connectedCallback(){this.#t6=!0;let e=this.#s();this.#e.addEventListener("touchstart",this.#lt,{passive:!0}),e.addEventListener("touchend",this.#ll,{passive:!0}),e.addEventListener("touchcancel",this.#ll,{passive:!0})}dispose(){let e=this.#s();e.removeEventListener("scroll",this.#t5),e.removeEventListener("scrollend",this.#le)}});nA=[(0,aA.uA)("x-viewpager-ng",[a0,az.O,sA],aq)],nz=[],nP=HTMLElement,(class extends nP{static{nk=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(nP[Symbol.metadata]??null):void 0;(0,ak.G4)(null,nF={value:nk},nA,{kind:"class",name:nk.name,metadata:e},null,nz),nk=nF.value,e&&Object.defineProperty(nk,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static notToFilterFalseAttributes=new Set(["allow-horizontal-gesture","enable-scroll"]);selectTab(e){let{index:t,smooth:l}=e;void 0===l&&(l=!0);let i=this.shadowRoot.children.item(2),n=i.clientWidth*t;i.scrollTo({left:n,behavior:l?"smooth":"instant"})}connectedCallback(){let e=this.getAttribute("select-index")||this.getAttribute("initial-select-index");if(null!==e){let t=Number(e),l=this.shadowRoot.children.item(2),i=()=>{0===l.clientWidth?requestAnimationFrame(i):this.selectTab({index:t,smooth:!1})};(0,aA.JS)(i)}}get[aD.l](){return this}static{(0,ak.zF)(nk,nz)}}),nH=[(0,aA.uA)("x-viewpager-item-ng",[a0,az.O])],nD=[],nN=HTMLElement,class extends nN{static{nM=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(nN[Symbol.metadata]??null):void 0;(0,ak.G4)(null,nR={value:nM},nH,{kind:"class",name:nM.name,metadata:e},null,nD),nM=nR.value,e&&Object.defineProperty(nM,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,ak.zF)(nM,nD)}};let sz=(nG=[],n$=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;nj=[(0,aA._y)("estimated-main-axis-size-px",!0)],(0,ak.G4)(null,null,nj,{kind:"field",name:"_handlerEstimatedMainAxisSizePx",static:!1,private:!1,access:{has:e=>"_handlerEstimatedMainAxisSizePx"in e,get:e=>e._handlerEstimatedMainAxisSizePx,set:(e,t)=>{e._handlerEstimatedMainAxisSizePx=t}},metadata:e},nG,n$),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["estimated-main-axis-size-px"];#e;_handlerEstimatedMainAxisSizePx=(0,ak.zF)(this,nG,(0,aA._8)(()=>this.#e,"--estimated-main-axis-size-px",e=>`${parseFloat(e)}px`));constructor(e){(0,ak.zF)(this,n$),this.#e=e}});nW=[(0,aA.uA)("list-item",[az.O,sz])],nB=[],nX=HTMLElement,class extends nX{static{nU=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(nX[Symbol.metadata]??null):void 0;(0,ak.G4)(null,nV={value:nU},nW,{kind:"class",name:nU.name,metadata:e},null,nB),nU=nV.value,e&&Object.defineProperty(nU,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static notToFilterFalseAttributes=new Set(["recyclable"]);static{(0,ak.zF)(nU,nB)}};let sP=(nq=[],nJ=[],nK=[],nQ=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;nZ=[(0,aA._y)("sticky-offset",!0)],nY=[(0,aA._y)("span-count",!0),(0,aA._y)("column-count",!0)],(0,ak.G4)(null,null,nZ,{kind:"field",name:"_handlerStickyOffset",static:!1,private:!1,access:{has:e=>"_handlerStickyOffset"in e,get:e=>e._handlerStickyOffset,set:(e,t)=>{e._handlerStickyOffset=t}},metadata:e},nq,nJ),(0,ak.G4)(null,null,nY,{kind:"field",name:"_handlerCount",static:!1,private:!1,access:{has:e=>"_handlerCount"in e,get:e=>e._handlerCount,set:(e,t)=>{e._handlerCount=t}},metadata:e},nK,nQ),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["sticky-offset","initial-scroll-index","span-count","column-count"];#e;_handlerStickyOffset=(0,ak.zF)(this,nq,(0,aA._8)(()=>this.#e,"--list-item-sticky-offset",e=>`${parseFloat(e)}px`));_handlerCount=((0,ak.zF)(this,nJ),(0,ak.zF)(this,nK,(0,aA._8)(()=>this.#e,"--list-item-span-count",e=>`${parseFloat(e)}`)));constructor(e){(0,ak.zF)(this,nQ),this.#e=e}connectedCallback(){let e=this.#e.getAttribute("initial-scroll-index");if(null!==e){let t=parseFloat(e),l=()=>{0===this.#e.clientHeight?requestAnimationFrame(l):this.#e.scrollToPosition({position:t})};(0,aA.JS)(l)}}}),sR=function(e,t,l){let i,n,a,s,o=0;var r=function(){o=l?.leading===!1?0:new Date().getTime(),i=null,s=e.apply(n,a),i||(n=a=null)};return function(){var d=new Date().getTime();o||l?.leading!==!1||(o=d);var h=t-(d-o);return n=this,a=arguments,h<=0||h>t?(i&&(clearTimeout(i),i=null),o=d,s=e.apply(n,a),i||(n=a=null)):i||l?.trailing===!1||(i=setTimeout(r,h)),s}},sM=(n9=[],n5=[],n7=[],ae=[],at=[],al=[],ai=[],an=[],aa=[],as=[],ao=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;n0=[(0,aA.ZR)("scrolltoupper")],n1=[(0,aA._y)("upper-threshold-item-count",!0)],n4=[(0,aA.ZR)("scrolltolower")],n2=[(0,aA._y)("lower-threshold-item-count",!0)],n8=[(0,aA.ZR)("lynxscroll"),(0,aA.ZR)("lynxscrollend"),(0,aA.ZR)("snap")],n3=[(0,aA.ZR)("scrolltoupperedge")],n6=[(0,aA.ZR)("scrolltoloweredge")],(0,ak.G4)(this,null,n1,{kind:"method",name:"_handleUpperThresholdItemCountChange",static:!1,private:!1,access:{has:e=>"_handleUpperThresholdItemCountChange"in e,get:e=>e._handleUpperThresholdItemCountChange},metadata:e},null,n9),(0,ak.G4)(this,null,n2,{kind:"method",name:"_handleLowerThresholdItemCountChange",static:!1,private:!1,access:{has:e=>"_handleLowerThresholdItemCountChange"in e,get:e=>e._handleLowerThresholdItemCountChange},metadata:e},null,n9),(0,ak.G4)(null,null,n0,{kind:"field",name:"_updateEventSwitches",static:!1,private:!1,access:{has:e=>"_updateEventSwitches"in e,get:e=>e._updateEventSwitches,set:(e,t)=>{e._updateEventSwitches=t}},metadata:e},n5,n7),(0,ak.G4)(null,null,n4,{kind:"field",name:"_updateScrollToLowerEventSwitches",static:!1,private:!1,access:{has:e=>"_updateScrollToLowerEventSwitches"in e,get:e=>e._updateScrollToLowerEventSwitches,set:(e,t)=>{e._updateScrollToLowerEventSwitches=t}},metadata:e},ae,at),(0,ak.G4)(null,null,n8,{kind:"field",name:"_handleScrollEventsSwitches",static:!1,private:!1,access:{has:e=>"_handleScrollEventsSwitches"in e,get:e=>e._handleScrollEventsSwitches,set:(e,t)=>{e._handleScrollEventsSwitches=t}},metadata:e},al,ai),(0,ak.G4)(null,null,n3,{kind:"field",name:"_handleScrollToUpperEdgeEventEnable",static:!1,private:!1,access:{has:e=>"_handleScrollToUpperEdgeEventEnable"in e,get:e=>e._handleScrollToUpperEdgeEventEnable,set:(e,t)=>{e._handleScrollToUpperEdgeEventEnable=t}},metadata:e},an,aa),(0,ak.G4)(null,null,n6,{kind:"field",name:"_handleScrollToLowerEdgeEventEnable",static:!1,private:!1,access:{has:e=>"_handleScrollToLowerEdgeEventEnable"in e,get:e=>e._handleScrollToLowerEdgeEventEnable,set:(e,t)=>{e._handleScrollToLowerEdgeEventEnable=t}},metadata:e},as,ao),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["upper-threshold-item-count","lower-threshold-item-count"];#e=(0,ak.zF)(this,n9);#ls=(0,aA.Ut)(()=>this.#e.shadowRoot,"#content");#lo;#lr;#ld;#n=0;#a=0;#lh=!1;#i;#o=(0,aA.Ut)(()=>this.#e.shadowRoot,"#upper-threshold-observer");#r=(0,aA.Ut)(()=>this.#e.shadowRoot,"#lower-threshold-observer");#h(){let e=null!==this.#e.getAttribute("need-visible-item-info"),{scrollTop:t,scrollLeft:l,scrollHeight:i,scrollWidth:n}=this.#ls(),a={scrollTop:t,scrollLeft:l,scrollHeight:i,scrollWidth:n,deltaX:l-this.#n,deltaY:t-this.#a,attachedCells:e?this.#e.getVisibleCells():void 0};return this.#n=l,this.#a=t,a}#lc=e=>{let{isIntersecting:t}=e[0];t&&this.#e.dispatchEvent(new CustomEvent("scrolltoupper",{...aM.$,detail:this.#h()}))};_updateEventSwitches=(0,ak.zF)(this,n5,e=>{if(e?this.#e.setAttribute("x-enable-scrolltoupper-event",""):this.#e.removeAttribute("x-enable-scrolltoupper-event"),this.#ek.scrolltoupper=e,e){this.#lo||(this.#lo=new IntersectionObserver(this.#lc,{root:this.#ls()})),this.#ld||(this.#ld=new MutationObserver(this.#lu));let e=this.#e.getAttribute("upper-threshold-item-count"),t=null!==e?parseFloat(e):0,l=0===t?this.#o():this.#e.children[t-1];l&&this.#lo.observe(l),this.#ld.observe(this.#e,{childList:!0})}else this.#lo&&(this.#lo.disconnect(),this.#lo=void 0),this.#ld&&(this.#ld.disconnect(),this.#ld=void 0)});_handleUpperThresholdItemCountChange(e,t){let l=null!==t?parseFloat(t):0,i=0===l?this.#o():this.#e.children[l-1];i&&this.#lo?.unobserve(i);let n=null!==e?parseFloat(e):0,a=0===n?this.#o():this.#e.children[n-1];a&&this.#lo?.observe(a)}#lm=((0,ak.zF)(this,n7),e=>{let{isIntersecting:t}=e[0];t&&this.#e.dispatchEvent(new CustomEvent("scrolltolower",{...aM.$,detail:this.#h()}))});#ek={lynxscroll:!1,lynxscrollend:!1,snap:!1,scrolltolower:!1,scrolltoupper:!1};_updateScrollToLowerEventSwitches=(0,ak.zF)(this,ae,e=>{if(this.#ek.scrolltolower=e,e?this.#e.setAttribute("x-enable-scrolltolower-event",""):this.#e.removeAttribute("x-enable-scrolltolower-event"),e){this.#lr||(this.#lr=new IntersectionObserver(this.#lm,{root:this.#ls()})),this.#ld||(this.#ld=new MutationObserver(this.#lu));let e=this.#e.getAttribute("lower-threshold-item-count"),t=null!==e?parseFloat(e):0,l=0===t?this.#r():this.#e.children[this.#e.children.length-t];l&&this.#lr.observe(l),this.#ld.observe(this.#e,{childList:!0})}else this.#lr&&(this.#lr.disconnect(),this.#lr=void 0),this.#ld&&(this.#ld.disconnect(),this.#ld=void 0)});_handleLowerThresholdItemCountChange(e,t){let l=null!==t?parseFloat(t):0,i=0===l?this.#r():this.#e.children[this.#e.children.length-l];i&&this.#lr?.unobserve(i);let n=null!==e?parseFloat(e):0,a=0===n?this.#r():this.#e.children[this.#e.children.length-n];a&&this.#lr?.observe(a)}#lu=((0,ak.zF)(this,at),e=>{let t=e?.[0];if(t?.type==="childList"){if(this.#ek.scrolltolower){this.#lr&&(this.#lr.disconnect(),this.#lr=void 0),this.#lr=new IntersectionObserver(this.#lm,{root:this.#ls()});let e=this.#e.getAttribute("lower-threshold-item-count"),t=null!==e?parseFloat(e):0,l=0===t?this.#r():this.#e.children[this.#e.children.length-t];l&&this.#lr.observe(l)}if(null!==this.#e.getAttribute("x-enable-scrolltoupper-event")){this.#lo&&(this.#lo.disconnect(),this.#lo=void 0),this.#lo=new IntersectionObserver(this.#lc,{root:this.#ls()});let e=this.#e.getAttribute("upper-threshold-item-count"),t=null!==e?parseFloat(e):0,l=0===t?this.#o():this.#e.children[t-1];l&&this.#lo.observe(l)}}});#lp=null;#m=()=>{this.#lh&&!aD.k&&(clearTimeout(this.#i),this.#i=setTimeout(()=>{this.#v()},100)),this.#e.dispatchEvent(new CustomEvent("lynxscroll",{...aM.$,detail:this.#h()}))};_handleScrollEventsSwitches=(0,ak.zF)(this,al,(e,t)=>{this.#ek[t]=e;let{lynxscroll:l,lynxscrollend:i,snap:n}=this.#ek,a=this.#e.getAttribute("scroll-event-throttle");this.#lh=null!==i||null!==n;let s=this.#ls();if(this.#lp&&s.removeEventListener("scroll",this.#lp),null!==l||this.#lh){let e=null!==a?parseFloat(a):0,t=sR(this.#m,e,{leading:!0,trailing:!1});this.#lp=t,s.addEventListener("scroll",this.#lp),this.#n=0,this.#a=0}aD.k&&this.#lh?s.addEventListener("scrollend",this.#v):s.removeEventListener("scrollend",this.#v)});#d=((0,ak.zF)(this,ai),e=>{let{isIntersecting:t,target:l}=e[0],i=l.id;t&&("upper-threshold-observer"===i?this.#e.dispatchEvent(new CustomEvent("scrolltoupperedge",{...aM.$,detail:this.#h()})):"lower-threshold-observer"===i&&this.#e.dispatchEvent(new CustomEvent("scrolltoloweredge",{...aM.$,detail:this.#h()})))});_handleScrollToUpperEdgeEventEnable=(0,ak.zF)(this,an,e=>{e?this.#e.setAttribute("x-enable-scrolltoupperedge-event",""):this.#e.removeAttribute("x-enable-scrolltoupperedge-event"),this.#lv(e)});#lv=((0,ak.zF)(this,aa),aH(this.#ls,this.#o,this.#d));_handleScrollToLowerEdgeEventEnable=(0,ak.zF)(this,as,e=>{e?this.#e.setAttribute("x-enable-scrolltoloweredge-event",""):this.#e.removeAttribute("x-enable-scrolltoloweredge-event"),this.#lb(e)});#lb=((0,ak.zF)(this,ao),aH(this.#ls,this.#r,this.#d));#v=()=>{let e=this.#e.getAttribute("item-snap");if(this.#e.dispatchEvent(new CustomEvent("lynxscrollend",{...aM.$})),null!==e){let e=Array.from(this.#e.children).filter(e=>"LIST-ITEM"===e.tagName),t=this.#ls().scrollTop,l=this.#ls().scrollLeft,i=e.find(e=>t>=e.offsetTop&&t<e.offsetTop+e.offsetHeight);this.#e.dispatchEvent(new CustomEvent("snap",{...aM.$,detail:{position:i&&e.indexOf(i),scrollTop:t,scrollLeft:l}}))}};constructor(e){this.#e=e}}),sH="waterfall-slot",sD="waterfall-style",sN=(ah=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;ar=[(0,aA.ZR)("scrolltolower")],ad=[(0,aA._y)("list-type",!0)],(0,ak.G4)(this,null,ar,{kind:"method",name:"_handleXEnableHeaderOffsetEvent",static:!1,private:!1,access:{has:e=>"_handleXEnableHeaderOffsetEvent"in e,get:e=>e._handleXEnableHeaderOffsetEvent},metadata:e},null,ah),(0,ak.G4)(this,null,ad,{kind:"method",name:"_handlerListType",static:!1,private:!1,access:{has:e=>"_handlerListType"in e,get:e=>e._handlerListType},metadata:e},null,ah),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["list-type"];#e=(0,ak.zF)(this,ah);#ls=(0,aA.Ut)(()=>this.#e.shadowRoot,"#content");#lg=(0,aA.Ut)(()=>this.#e.shadowRoot,'div[part="lower-threshold-observer"]');#z;#ld;_handleXEnableHeaderOffsetEvent(e){if(e?this.#e.setAttribute("x-enable-scrolltolower-event",""):this.#e.removeAttribute("x-enable-scrolltolower-event"),e){let e=this.#lg(),t=this.#e.getAttribute("scroll-orientation")||"vertical",l=this.#ls();setTimeout(()=>{"vertical"===t?(e.style.setProperty("top",`${String(l.scrollHeight-1)}px`,"important"),e.style.setProperty("bottom","unset","important")):(e.style.setProperty("left",`${String(l.scrollWidth-1)}px`,"important"),e.style.setProperty("right","unset","important"))},100)}}#lf=()=>{let e=document.createElement("slot");e.setAttribute("name",`${sH}`),this.#e.shadowRoot?.querySelector("[part=upper-threshold-observer]")?.insertAdjacentElement("afterend",e)};#ly=()=>{let e=parseFloat(this.#e.getAttribute("span-count")||this.#e.getAttribute("column-count")||"")||1,t="vertical"===(this.#e.getAttribute("scroll-orientation")||"vertical"),l=Array(e).fill(0);for(let i=0;i<this.#e.children.length;i++){let n=this.#e.children[i],a=getComputedStyle(n).getPropertyValue("--list-main-axis-gap"),s=getComputedStyle(n).getPropertyValue("--list-cross-axis-gap"),o=t?n.getBoundingClientRect().height+parseFloat(a):n.getBoundingClientRect().width+parseFloat(a);if(null!==n.getAttribute("full-span")){let i=l[0];for(let t=1;t<e;t++)l[t]>i&&(i=l[t]);for(let t=0;t<e;t++)l[t]=i+o;t?(n.setAttribute(`${sD}-left`,"0"),n.setAttribute(`${sD}-top`,`${i}px`)):(n.setAttribute(`${sD}-left`,`${i}px`),n.setAttribute(`${sD}-top`,"0"))}else{let i=0,a=l[0];for(let t=1;t<e;t++)l[t]<a&&(i=t,a=l[t]);let r=`calc(${i} * (100% - ${s} * (${e} - 1))/ ${e} + ${Math.max(0,i)} * ${s})`;t?(n.setAttribute(`${sD}-left`,r),n.setAttribute(`${sD}-top`,`${a}px`)):(n.setAttribute(`${sD}-left`,`${a}px`),n.setAttribute(`${sD}-top`,r)),l[i]+=o}}for(let e=0;e<this.#e.children.length;e++){let t=this.#e.children[e];t.style.setProperty("left",t.getAttribute(`${sD}-left`)),t.style.setProperty("top",t.getAttribute(`${sD}-top`)),t.setAttribute("slot",sH)}};constructor(e){this.#e=e}#lE=()=>{this.#z?.disconnect(),this.#z=new ResizeObserver(()=>{requestAnimationFrame(()=>{this.#ly()})}),Array.from(this.#e.children).forEach(e=>{this.#z?.observe(e)})};_handlerListType(e){if("waterfall"===e)this.#lf(),this.#z||this.#lE(),this.#ld||(this.#ld=new MutationObserver(e=>{let t=e?.[0];t?.type==="childList"&&this.#lE()}),this.#ld.observe(this.#e,{childList:!0}));else{this.#z?.disconnect(),this.#z=void 0,this.#ld?.disconnect(),this.#ld=void 0;for(let e=0;e<this.#e.children.length;e++)this.#e.children[e].removeAttribute("slot");this.#e.shadowRoot?.querySelector(`slot[name=${sH}]`)?.remove()}}});am=[(0,aA.uA)("x-list",[az.O,sP,sM,sN],aW)],ap=[],av=HTMLElement,class extends av{static{au=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(av[Symbol.metadata]??null):void 0;(0,ak.G4)(null,ac={value:au},am,{kind:"class",name:au.name,metadata:e},null,ap),au=ac.value,e&&Object.defineProperty(au,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static notToFilterFalseAttributes=new Set(["enable-scroll"]);#ls=(0,aA.Ut)(()=>this.shadowRoot,"#content");#lS={rate:0,lastTimestamp:0,autoStop:!0,isScrolling:!1};#l_={};get scrollTop(){return this.#ls().scrollTop}set scrollTop(e){this.#ls().scrollTop=e}get scrollLeft(){return this.#ls().scrollTop}set scrollLeft(e){this.#ls().scrollLeft=e}get scrollHeight(){return this.#ls().scrollHeight}get scrollWidth(){return this.#ls().scrollWidth}get __scrollTop(){return super.scrollTop}get __scrollLeft(){return super.scrollTop}scrollToPosition(e){let t;if("string"==typeof e.offset){let l=parseFloat(e.offset);t={left:l,top:l}}else"number"==typeof e.offset&&(t={left:e.offset,top:e.offset});if("number"==typeof e.position){if(0===e.position)this.#ls().scrollTop=0,this.#ls().scrollLeft=0;else if(e.position>0&&e.position<this.childElementCount){let l=this.children.item(e.position);l instanceof HTMLElement&&(t=t?{left:l.offsetLeft+t.left,top:l.offsetTop+t.top}:{left:l.offsetLeft,top:l.offsetTop})}}t&&this.#ls().scrollTo({...t,behavior:e.smooth?"smooth":"auto"})}#lw=e=>{if(!this.#lS.isScrolling)return;if(!this.#lS.lastTimestamp){this.#lS.lastTimestamp=e,requestAnimationFrame(this.#lw);return}let t=this.#ls(),l=(e-this.#lS.lastTimestamp)/1e3*this.#lS.rate;t.scrollBy({left:l,top:l,behavior:"auto"}),this.#lS.lastTimestamp=e;let i="vertical"===(this.getAttribute("scroll-orientation")||"vertical");(i?t.scrollTop+t.clientHeight>=t.scrollHeight:t.scrollLeft+t.clientWidth>=t.scrollWidth)&&this.#lS.autoStop?(i?t.scrollTop=t.scrollHeight-t.clientHeight:t.scrollLeft=t.scrollWidth-t.clientWidth,this.#lS.isScrolling=!1):requestAnimationFrame(this.#lw)};autoScroll(e){if(e.start){let t="number"==typeof e.rate?e.rate:parseFloat(e.rate);this.#lS={rate:t,lastTimestamp:0,isScrolling:!0,autoStop:!1!==e.autoStop};let l=this.#ls(),i="vertical"===(this.getAttribute("scroll-orientation")||"vertical")?l.clientHeight<=l.scrollHeight:l.clientWidth<=l.scrollWidth;this.#lS.lastTimestamp=0,i?setTimeout(()=>requestAnimationFrame(this.#lw),0):requestAnimationFrame(this.#lw)}else this.#lS.isScrolling=!1}getScrollContainerInfo(){return{scrollTop:this.scrollTop,scrollLeft:this.scrollLeft,scrollHeight:this.scrollHeight,scrollWidth:this.scrollWidth}}getVisibleCells=()=>{let e=Object.values(this.#l_),t=Array.from(this.children).filter(e=>"LIST-ITEM"===e.tagName);if(0===e.length){let l=this.#ls().getBoundingClientRect();e=t.filter(e=>{let t=e.getBoundingClientRect();return t.bottom>=l.top&&t.top<=l.bottom&&t.right>=l.left&&t.left<=l.right})}return e.map(e=>{let l=e.getBoundingClientRect();return{id:e.getAttribute("id"),itemKey:e.getAttribute("item-key"),bottom:l.bottom,top:l.top,left:l.left,right:l.right,index:t.indexOf(e)}})};#lx=()=>Object.values(this.#l_).map(e=>{let t=e.getBoundingClientRect();return{height:t.height,width:t.width,itemKey:e.getAttribute("item-key"),originX:t.x,originY:t.y}});#lT=e=>{if(!e.target||!(e.target instanceof HTMLElement))return;let t=e.skipped,l=e.target?.getAttribute("id")==="content"&&e.target?.getAttribute("part")==="content",i="LIST-ITEM"===e.target.tagName;if(l&&!t){let e=this.#lx();setTimeout(()=>{this.dispatchEvent(new CustomEvent("layoutcomplete",{...aM.$,detail:{visibleItemBeforeUpdate:e,visibleItemAfterUpdate:this.#lx()}}))},100);return}if(i){let l=e.target?.getAttribute("item-key");if(!l)return;t?this.#l_[l]&&delete this.#l_[l]:this.#l_[l]=e.target;return}};connectedCallback(){this.#ls().addEventListener("contentvisibilityautostatechange",this.#lT,{passive:!0})}static{(0,ak.zF)(au,ap)}};let sj=(af=[],ay=[],aE=[],aS=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;ab=[(0,aA._y)("src",!0)],ag=[(0,aA._y)("html",!0)],(0,ak.G4)(null,null,ab,{kind:"field",name:"_handleSrc",static:!1,private:!1,access:{has:e=>"_handleSrc"in e,get:e=>e._handleSrc,set:(e,t)=>{e._handleSrc=t}},metadata:e},af,ay),(0,ak.G4)(null,null,ag,{kind:"field",name:"_handleHtml",static:!1,private:!1,access:{has:e=>"_handleHtml"in e,get:e=>e._handleHtml,set:(e,t)=>{e._handleHtml=t}},metadata:e},aE,aS),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["src","html"];#e;#lC=(0,aA.Ut)(()=>this.#e.shadowRoot,"#webview");constructor(e){(0,ak.zF)(this,aS),this.#e=e}_handleSrc=(0,ak.zF)(this,af,(0,aA.H$)(this.#lC,"src"));_handleHtml=((0,ak.zF)(this,ay),(0,ak.zF)(this,aE,(0,aA.H$)(this.#lC,"srcdoc")))});ax=[(0,aA.uA)("x-webview",[az.O,sj],aJ)],aT=[],aC=HTMLElement,class extends aC{static{aw=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(aC[Symbol.metadata]??null):void 0;(0,ak.G4)(null,a_={value:aw},ax,{kind:"class",name:aw.name,metadata:e},null,aT),aw=a_.value,e&&Object.defineProperty(aw,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,ak.zF)(aw,aT)}#lC=(0,aA.Ut)(()=>this.shadowRoot,"#webview");#lO=()=>{this.dispatchEvent(new CustomEvent("load",{bubbles:!0,composed:!0,detail:{url:this.#lC().src}})),this.dispatchEvent(new CustomEvent("bindload",{bubbles:!0,composed:!0,detail:{url:this.#lC().src}}))};#lL=e=>{this.dispatchEvent(new CustomEvent("error",{bubbles:!0,composed:!0,detail:{errorMsg:e.message||"unknown error"}})),this.dispatchEvent(new CustomEvent("binderror",{bubbles:!0,composed:!0,detail:{errorMsg:e.message||"unknown error"}}))};#lI=e=>{e.source===this.#lC().contentWindow&&(this.dispatchEvent(new CustomEvent("message",{bubbles:!0,composed:!0,detail:{msg:e.data,data:e.data}})),this.dispatchEvent(new CustomEvent("bindmessage",{bubbles:!0,composed:!0,detail:{msg:e.data}})))};connectedCallback(){this.#lC().addEventListener("load",this.#lO),this.#lC().addEventListener("error",this.#lL),window.addEventListener("message",this.#lI)}disconnectedCallback(){this.#lC().removeEventListener("load",this.#lO),this.#lC().removeEventListener("error",this.#lL),window.removeEventListener("message",this.#lI)}get src(){return this.getAttribute("src")}set src(e){null===e?this.removeAttribute("src"):this.setAttribute("src",e)}get html(){return this.getAttribute("html")}set html(e){null===e?this.removeAttribute("html"):this.setAttribute("html",e)}reload(){this.#lC().src=this.#lC().src}}}}]);
395
+ <iframe id="webview" part="webview"></iframe>`,sp=CSS.supports("-webkit-box-reflect: above")&&CSS.supports("transition-behavior:allow-discrete")&&CSS.supports("content-visibility: auto");class sb{static observedAttributes=[];static observedCSSProperties=["--lynx-display","--lynx-linear-orientation"];#e;constructor(e){this.#e=e,this.cssPropertyChangedHandler={"--lynx-display":this.#y,"--lynx-linear-orientation":this.#E}}#y=(0,a2.H$)(()=>this.#e,"lynx-computed-display");#E=(0,a2.H$)(()=>this.#e,"lynx-linear-orientation")}let sv=sp?void 0:sb;j=[(0,a2.uA)("scroll-view",[sv,a8.O,a6,a3,se,st],sn)],$=[],V=HTMLElement,aK=class extends V{static{G=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(V[Symbol.metadata]??null):void 0;(0,a4.G4)(null,D={value:G},j,{kind:"class",name:G.name,metadata:e},null,$),aK=G=D.value,e&&Object.defineProperty(G,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static notToFilterFalseAttributes=new Set(["enable-scroll"]);static scrollInterval=100;#S;scrollTo(...e){let t;if("string"==typeof e[0].offset){let n=parseFloat(e[0].offset);t={left:n,top:n}}else"number"==typeof e[0].offset&&(t={left:e[0].offset,top:e[0].offset});if("number"==typeof e[0].index){let n=e[0].index;if(0===n)this.scrollTop=0,this.scrollLeft=0;else if(n>0&&n<this.childElementCount){let e=this.children.item(n);e instanceof HTMLElement&&(t=t?{left:e.offsetLeft+t.left,top:e.offsetTop+t.top}:{left:e.offsetLeft,top:e.offsetTop})}}t?this.scrollTo({...t,behavior:e[0].smooth?"smooth":"auto"}):super.scrollTo(...e)}autoScroll(e){if(clearInterval(this.#S),e.start){let t=("number"==typeof e.rate?e.rate:parseFloat(e.rate))*aK.scrollInterval/1e3;this.#S=setInterval(e=>{e.scrollBy({left:t,top:t,behavior:"smooth"})},aK.scrollInterval,this)}}get[a7.l](){return this}static{(0,a4.zF)(G,$)}},aK=G;let sg=Symbol("__src"),sf=Symbol("__src"),sy={loadstart:{code:0,type:"init"},canplay:{code:1,type:"playable"},stalled:{code:2,type:"stalled"},error:{code:3,type:"error"}},sE={stop:{code:0,type:"stopped"},play:{code:1,type:"playing"},pause:{code:2,type:"paused"}};(aQ=a1||(a1={}))[aQ.SrcError=-1]="SrcError",aQ[aQ.SrcJsonError=-2]="SrcJsonError",aQ[aQ.DownloadError=-3]="DownloadError",aQ[aQ.PlayerFinishedError=-4]="PlayerFinishedError",aQ[aQ.PlayerLoadingError=-5]="PlayerLoadingError",aQ[aQ.PlayerPlaybackError=-6]="PlayerPlaybackError";let sS=(X=[],q=[],Z=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;W=[(0,a2._y)("src",!0)],U=[(0,a2._y)("loop",!0)],B=[(0,a2._y)("pause-on-hide",!0)],(0,a4.G4)(this,null,W,{kind:"method",name:"_handleSrc",static:!1,private:!1,access:{has:e=>"_handleSrc"in e,get:e=>e._handleSrc},metadata:e},null,X),(0,a4.G4)(this,null,B,{kind:"method",name:"_handlePauseOnHide",static:!1,private:!1,access:{has:e=>"_handlePauseOnHide"in e,get:e=>e._handlePauseOnHide},metadata:e},null,X),(0,a4.G4)(null,null,U,{kind:"field",name:"_handleLoop",static:!1,private:!1,access:{has:e=>"_handleLoop"in e,get:e=>e._handleLoop,set:(e,t)=>{e._handleLoop=t}},metadata:e},q,Z),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["src","loop","pause-on-hide"];#e=(0,a4.zF)(this,X);#w=(0,a2.Ut)(()=>this.#e.shadowRoot,"#audio");_handleSrc(e){let t;try{t=JSON.parse(e||"")||{}}catch(e){console.error(`JSON.parse src error: ${e}`),t={}}null===e?this.#e.dispatchEvent(new CustomEvent("error",{...a5.$,detail:{code:a1.SrcError,msg:"",from:"res loader",currentSrcID:this.#e[sg]?.id}})):(t?.id===void 0||t?.play_url===void 0)&&this.#e.dispatchEvent(new CustomEvent("error",{...a5.$,detail:{code:a1.SrcJsonError,msg:"",from:"res loader",currentSrcID:this.#e[sg]?.id}})),this.#e[sg]=t,this.#e[sf]=void 0,this.#e.stop()}_handleLoop=(0,a4.zF)(this,q,(0,a2.H$)(this.#w,"loop"));#_=((0,a4.zF)(this,Z),()=>{"hidden"===document.visibilityState&&this.#e.pause()});_handlePauseOnHide(e){null!==e?document.addEventListener("visibilitychange",this.#_,{passive:!0}):document.removeEventListener("visibilitychange",this.#_)}constructor(e){this.#e=e}});class sw{static observedAttributes=[];#e;#x;#w=(0,a2.Ut)(()=>this.#e.shadowRoot,"#audio");#C=e=>{let t=Number(this.#e.getAttribute("interval")),n=Number.isNaN(t)?0:t;this.#x=setInterval(()=>{this.#e.dispatchEvent(new CustomEvent("timeupdate",{...a5.$,detail:{currentTime:this.#w().currentTime,currentSrcID:this.#e[sg]?.id}}))},n);let i=sE[e.type];this.#e.dispatchEvent(new CustomEvent("playbackstatechanged",{...a5.$,detail:{code:i?.code,type:i?.type,currentSrcID:this.#e[sg]?.id}}))};#T=e=>{clearInterval(this.#x);let t=sE[e.type];this.#e.dispatchEvent(new CustomEvent("playbackstatechanged",{...a5.$,detail:{code:t?.code,type:t?.type,currentSrcID:this.#e[sg]?.id}}))};#k=e=>{let t=sy[e.type];this.#e.dispatchEvent(new CustomEvent("loadingstatechanged",{...a5.$,detail:{code:t?.code,type:t?.type,currentSrcID:this.#e[sg]?.id}}))};#O=e=>{this.#k(e);let t=e.target?.error?.code,n=t===MediaError.MEDIA_ERR_DECODE?a1.PlayerLoadingError:a1.PlayerPlaybackError;t===MediaError.MEDIA_ERR_DECODE&&(n=a1.PlayerLoadingError),this.#e.dispatchEvent(new CustomEvent("error",{...a5.$,detail:{code:n,msg:"",from:"player",currentSrcID:this.#e[sg]?.id}}))};#L=()=>{let e=null!==this.#e.getAttribute("loop");this.#e.dispatchEvent(new CustomEvent("finished",{...a5.$,detail:{loop:e,currentSrcID:this.#e[sg]?.id}}))};constructor(e){this.#e=e}connectedCallback(){let e=this.#w();e.addEventListener("play",this.#C,{passive:!0}),e.addEventListener("pause",this.#T,{passive:!0}),e.addEventListener("ended",this.#L,{passive:!0}),e.addEventListener("loadstart",this.#k,{passive:!0}),e.addEventListener("canplay",this.#k,{passive:!0}),e.addEventListener("stalled",this.#k,{passive:!0}),e.addEventListener("error",this.#O,{passive:!0})}}K=[(0,a2.uA)("x-audio-tt",[a8.O,sS,sw],'<audio id="audio"></audio>')],Q=[],ee=HTMLElement,class extends ee{static{J=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(ee[Symbol.metadata]??null):void 0;(0,a4.G4)(null,Y={value:J},K,{kind:"class",name:J.name,metadata:e},null,Q),J=Y.value,e&&Object.defineProperty(J,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a4.zF)(J,Q)}#A=(0,a2.Ut)(()=>this.shadowRoot,"#audio");#w=(0,a2.Ut)(()=>this.shadowRoot,"#audio");#I=(0,a2.H$)(this.#w,"src");[sg];[sf];#F=()=>{let e,t=this[sg];if(t&&t.id&&t.play_url){try{e=JSON.parse(this.getAttribute("headers")||"{}")||{}}catch(t){console.error(`JSON.parse headers error: ${t}`),e={}}this[sf]=new Promise(async(n,i)=>{this.dispatchEvent(new CustomEvent("srcloadingstatechanged",{...a5.$,detail:{code:0,type:"loading",currentSrcID:t.id}}));let l=await fetch(t.play_url,{headers:e});l.ok||(this.dispatchEvent(new CustomEvent("error",{...a5.$,detail:{code:a1.DownloadError,msg:"",from:"res loader",currentSrcID:t.id}})),i()),this.dispatchEvent(new CustomEvent("srcloadingstatechanged",{...a5.$,detail:{code:1,type:"success",currentSrcID:t.id}}));let a=await l.blob(),s=URL.createObjectURL(a);this.#I(s),n()})}};play(){return this[sf]||this.#F(),this[sf]?.then(()=>{let e=this.#A();e.currentTime=0,e.play()}),{currentSrcID:this[sg]?.id,loadingSrcID:""}}stop(){let e=this.#A(),t=sE.stop;return this.dispatchEvent(new CustomEvent("playbackstatechanged",{...a5.$,detail:{code:t?.code,type:t?.type,currentSrcID:this[sg]?.id}})),e.currentTime=0,e.pause(),{currentSrcID:this[sg]?.id}}pause(){return this.#A().pause(),{currentSrcID:this[sg]?.id}}resume(){return this.#A().play(),{currentSrcID:this[sg]?.id,loadingSrcID:""}}seek(e){return this.#A().currentTime=(e.currentTime||0)/1e3,this.dispatchEvent(new CustomEvent("seek",{...a5.$,detail:{seekresult:1,currentSrcID:this[sg]?.id}})),{currentSrcID:this[sg]?.id}}mute(e){return this.#A().muted=e.mute,{currentSrcID:this[sg]?.id}}playerInfo(){var e;let t=this.#A(),n=t.buffered,i=n.end(n.length-1);return{currentSrcID:this[sg]?.id,duration:1e3*t.duration,playbackState:(e=t)?e.paused?2*!e.ended:e.currentTime>0?1:3:-1,currentTime:t.currentTime,cacheTime:i}}prepare(){this[sf]||this.#F()}setVolume(e){return this.#A().volume=e.volume,{code:1}}};let s_=(el=[],ea=[],es=[],eo=[],er=[],ed=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;et=[(0,a2._y)("name",!0)],en=[(0,a2._y)("height",!0)],ei=[(0,a2._y)("width",!0)],(0,a4.G4)(null,null,et,{kind:"field",name:"handleName",static:!1,private:!1,access:{has:e=>"handleName"in e,get:e=>e.handleName,set:(e,t)=>{e.handleName=t}},metadata:e},el,ea),(0,a4.G4)(null,null,en,{kind:"field",name:"handleHeight",static:!1,private:!1,access:{has:e=>"handleHeight"in e,get:e=>e.handleHeight,set:(e,t)=>{e.handleHeight=t}},metadata:e},es,eo),(0,a4.G4)(null,null,ei,{kind:"field",name:"handleWidth",static:!1,private:!1,access:{has:e=>"handleWidth"in e,get:e=>e.handleWidth,set:(e,t)=>{e.handleWidth=t}},metadata:e},er,ed),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["name","height","width"];#e;#R;#M=(0,a2.Ut)(()=>this.#e.shadowRoot,"#canvas");constructor(e){this.#e=e}handleName=(0,a4.zF)(this,el,(0,a2.H$)(this.#M,"name"));handleHeight=((0,a4.zF)(this,ea),(0,a4.zF)(this,es,(0,a2.H$)(this.#M,"height")));handleWidth=((0,a4.zF)(this,eo),(0,a4.zF)(this,er,(0,a2.H$)(this.#M,"width")));#P=((0,a4.zF)(this,ed),e=>{let{contentRect:t}=e[0],n=this.#e.shadowRoot.firstElementChild;if(n){let{height:e,width:i}=t;e*=window.devicePixelRatio,i*=window.devicePixelRatio;let l=new CustomEvent("resize",{...a5.$,detail:{height:e,width:i}});l.height=e,l.width=i,n.dispatchEvent(l)}});#z(){this.#R||(this.#R=new ResizeObserver(this.#P),this.#R.observe(this.#e))}#N(){this.#R?.disconnect(),this.#R=void 0}connectedCallback(){this.#z()}dispose(){this.#N()}});em=[(0,a2.uA)("x-canvas",[a8.O,s_],(0,a2.qy)`<canvas id="canvas" part="canvas"></canvas>`)],eu=[],ep=HTMLElement,class extends ep{static{ec=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(ep[Symbol.metadata]??null):void 0;(0,a4.G4)(null,eh={value:ec},em,{kind:"class",name:ec.name,metadata:e},null,eu),ec=eh.value,e&&Object.defineProperty(ec,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a4.zF)(ec,eu)}};let sx=(eg=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;eb=[(0,a2._y)("granularity",!0)],ev=[(0,a2.ZR)("offset")],(0,a4.G4)(this,null,eb,{kind:"method",name:"_handleGranularity",static:!1,private:!1,access:{has:e=>"_handleGranularity"in e,get:e=>e._handleGranularity},metadata:e},null,eg),(0,a4.G4)(this,null,ev,{kind:"method",name:"_enableOffsetEvent",static:!1,private:!1,access:{has:e=>"_enableOffsetEvent"in e,get:e=>e._enableOffsetEvent},metadata:e},null,eg),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}#e=(0,a4.zF)(this,eg);#H=.01;#D=0;constructor(e){this.#e=e}static observedAttributes=["granularity"];_handleGranularity(e){e&&""!==e?this.#H=parseFloat(e):this.#H=.01}_enableOffsetEvent(e){e?this.#e.addEventListener("scroll",this.#u,{passive:!0}):this.#e.removeEventListener("scroll",this.#u)}#u=()=>{let e=this.#e.scrollTop;(Math.abs(this.#D-e)>this.#H||0===this.#e.scrollTop||1>=Math.abs(this.#e.scrollHeight-this.#e.clientHeight-this.#e.scrollTop))&&(this.#D=e,this.#e.dispatchEvent(new CustomEvent("offset",{...a5.$,detail:{offset:e,height:this.#e[sC]}})))}}),sC=Symbol("scrollableLength"),sT=Symbol("isHeaderShowing"),sk=Symbol("resizeObserver"),sO=Symbol("slotKid");eE=[(0,a2.uA)("x-foldview-ng",[sv,a8.O,sx])],eS=[],ew=HTMLElement,class extends ew{static{ey=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(ew[Symbol.metadata]??null):void 0;(0,a4.G4)(null,ef={value:ey},eE,{kind:"class",name:ey.name,metadata:e},null,eS),ey=ef.value,e&&Object.defineProperty(ey,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static notToFilterFalseAttributes=new Set(["scroll-enable"]);[sO];[sk]=new ResizeObserver(e=>{for(let t of e)"X-FOLDVIEW-HEADER-NG"===t.target.tagName?this.#G=t.contentRect.height:"X-FOLDVIEW-TOOLBAR-NG"===t.target.tagName&&(this.#j=t.contentRect.height);this[sO]&&(this[sO].style.top=`${this.#G-this.#j}px`)});#G=0;#j=0;get[sC](){return this.#G-this.#j}get[sT](){return this[sC]-this.scrollTop>=1}get scrollTop(){return super.scrollTop}set scrollTop(e){e>this[sC]?e=this[sC]:e<0&&(e=0),super.scrollTop=e}setFoldExpanded(e){let{offset:t,smooth:n=!0}=e,i=parseFloat(t);this.scrollTo({top:i,behavior:n?"smooth":"instant"})}get[a7.l](){return this}disconnectedCallback(){this[sk]?.disconnect(),this[sk]=void 0}static{(0,a4.zF)(ey,eS)}};let sL=(e,t)=>{let n=e.parentElement;if(n?.tagName==="LYNX-WRAPPER"&&(n=n.parentElement),n?.tagName===t)return n};eC=[(0,a2.uA)("x-foldview-header-ng",[sv,a8.O])],eT=[],ek=HTMLElement,(class extends ek{static{ex=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(ek[Symbol.metadata]??null):void 0;(0,a4.G4)(null,e_={value:ex},eC,{kind:"class",name:ex.name,metadata:e},null,eT),ex=e_.value,e&&Object.defineProperty(ex,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a4.zF)(ex,eT)}#$=void 0;connectedCallback(){let e=sL(this,"X-FOLDVIEW-NG");this.#$=e?.[sk],this.#$?.observe(this)}dispose(){this.#$?.unobserve(this)}}),eA=[(0,a2.uA)("x-foldview-slot-drag-ng",[sv,a8.O])],eI=[],eF=HTMLElement,class extends eF{static{eL=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(eF[Symbol.metadata]??null):void 0;(0,a4.G4)(null,eO={value:eL},eA,{kind:"class",name:eL.name,metadata:e},null,eI),eL=eO.value,e&&Object.defineProperty(eL,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a4.zF)(eL,eI)}};class sA{#V=0;#W=new WeakMap;#U;#B=0;#X=0;#q=null;#Z;#Y=0;#e;static observedAttributes=[];constructor(e){this.#e=e,this.#e.addEventListener("touchmove",this.#J,{passive:!1}),this.#e.addEventListener("touchstart",this.#K,{passive:!0}),this.#e.addEventListener("touchend",this.#Q,{passive:!0}),this.#e.addEventListener("wheel",this.#ee,{passive:!1})}#et(e){let t=e[a7.l];return t instanceof Element?t:e}#en(e){return[...new Set(e.map(e=>this.#et(e)))]}#ei(e){let t;if("function"==typeof e.computedStyleMap)try{t=e.computedStyleMap().get("overflow-y")?.toString()??"visible"}catch{t=getComputedStyle(e).overflowY||"visible"}else t=getComputedStyle(e).overflowY||"visible";return"auto"===t||"scroll"===t||"hidden"===t||"overlay"===t}#el(e){return this.#U?.find(t=>{if(this.#ei(t)&&t.scrollHeight>t.clientHeight){let n=e<0&&0!==t.scrollTop,i=e>0&&Math.abs(t.scrollHeight-t.clientHeight-t.scrollTop)>1;return n||i}return!1})}#ea(e,t){let n=this.#W.get(e)??0;n+=t,this.#W.set(e,n),e.scrollTop=n}#J=e=>{let t=this.#es();if(!t)return;let{pageY:n,pageX:i}=e.touches.item(0),l=this.#B-n;if(null===this.#q){let e=this.#X-i;this.#q=Math.abs(l)>Math.abs(e)}!1!==this.#q&&(e.cancelable&&e.preventDefault(),this.#eo(l,t),this.#B=n,this.#X=i)};#ee=e=>{let t=this.#es();if(!t||Math.abs(e.deltaY)<=Math.abs(e.deltaX))return;let n=e.composedPath().filter(e=>e instanceof Element&&this.#e.contains(e)&&e!==this.#e),{clientX:i,clientY:l}=e,a=document.elementsFromPoint(i,l).filter(e=>this.#e.contains(e));if(this.#U=this.#en([...n,...a]),this.#V=t.scrollTop,this.#U)for(let e of this.#U)this.#W.set(e,e.scrollTop);e.cancelable&&e.preventDefault(),this.#eo(e.deltaY,t)};#es(){let e=this.#e.parentElement;if(e&&"X-FOLDVIEW-NG"===e.tagName)return e}#K=e=>{let{pageX:t,pageY:n,clientX:i,clientY:l}=e.touches.item(0),a=e.composedPath().filter(e=>e instanceof Element&&this.#e.contains(e)&&e!==this.#e),s=document.elementsFromPoint(i,l).filter(e=>this.#e.contains(e)&&e!==this.#e);for(let e of(this.#U=this.#en([...a,...s]),this.#B=n,this.#X=t,this.#V=this.#es()?.scrollTop??0,this.#U))this.#W.set(e,e.scrollTop);this.#q=null,this.#Z=void 0};#Q=()=>{if(this.#q=null,this.#Z){let e=this.#es();(this.#Z!==e||e[sT])&&this.#Z.scrollBy({top:4*this.#Y,behavior:"smooth"})}};#eo(e,t){let n=this.#el(e);t[sT]&&e>0||e<0&&!n||!t[sT]&&!n?(t.scrollBy({top:e,behavior:"smooth"}),this.#V+=e,t.scrollTop=this.#V,this.#Z=t):n&&(this.#Z=n,this.#ea(n,e)),this.#Y=e}}eP=[(0,a2.uA)("x-foldview-slot-ng",[sv,a8.O,sA])],ez=[],eN=HTMLElement,(class extends eN{static{eM=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(eN[Symbol.metadata]??null):void 0;(0,a4.G4)(null,eR={value:eM},eP,{kind:"class",name:eM.name,metadata:e},null,ez),eM=eR.value,e&&Object.defineProperty(eM,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a4.zF)(eM,ez)}connectedCallback(){this.matches("x-foldview-ng>x-foldview-slot-ng:first-of-type")&&(this.parentElement[sO]=this)}}),eG=[(0,a2.uA)("x-foldview-toolbar-ng",[sv,a8.O])],ej=[],e$=HTMLElement,class extends e${static{eD=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(e$[Symbol.metadata]??null):void 0;(0,a4.G4)(null,eH={value:eD},eG,{kind:"class",name:eD.name,metadata:e},null,ej),eD=eH.value,e&&Object.defineProperty(eD,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a4.zF)(eD,ej)}#$=void 0;connectedCallback(){let e=sL(this,"X-FOLDVIEW-NG");this.#$=e?.[sk],this.#$?.observe(this)}dispose(){this.#$?.unobserve(this)}};let sI=(eW=[],eU=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;eV=[(0,a2._y)("drop-shadow",!0)],(0,a4.G4)(null,null,eV,{kind:"field",name:"_handleBlurRadius",static:!1,private:!1,access:{has:e=>"_handleBlurRadius"in e,get:e=>e._handleBlurRadius,set:(e,t)=>{e._handleBlurRadius=t}},metadata:e},eW,eU),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["drop-shadow"];#e;#er=(0,a2.Ut)(()=>this.#e.shadowRoot,"#img");_handleBlurRadius=(0,a4.zF)(this,eW,(0,a2._8)(this.#er,"--drop-shadow",void 0,!0));constructor(e){(0,a4.zF)(this,eU),this.#e=e}}),sF=(eJ=[],eK=[],eQ=[],e0=[],e1=[],e4=[],e2=[],e8=[],e3=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;eB=[(0,a2._y)("src",!0)],eX=[(0,a2._y)("placeholder",!0)],eq=[(0,a2._y)("blur-radius",!0)],eZ=[(0,a2._y)("crossorigin",!0)],eY=[(0,a2._y)("referrerpolicy",!0)],(0,a4.G4)(this,null,eX,{kind:"method",name:"_preloadPlaceholder",static:!1,private:!1,access:{has:e=>"_preloadPlaceholder"in e,get:e=>e._preloadPlaceholder},metadata:e},null,eJ),(0,a4.G4)(null,null,eB,{kind:"field",name:"_handleSrc",static:!1,private:!1,access:{has:e=>"_handleSrc"in e,get:e=>e._handleSrc,set:(e,t)=>{e._handleSrc=t}},metadata:e},eK,eQ),(0,a4.G4)(null,null,eq,{kind:"field",name:"_handleBlurRadius",static:!1,private:!1,access:{has:e=>"_handleBlurRadius"in e,get:e=>e._handleBlurRadius,set:(e,t)=>{e._handleBlurRadius=t}},metadata:e},e0,e1),(0,a4.G4)(null,null,eZ,{kind:"field",name:"_handleCrossorigin",static:!1,private:!1,access:{has:e=>"_handleCrossorigin"in e,get:e=>e._handleCrossorigin,set:(e,t)=>{e._handleCrossorigin=t}},metadata:e},e4,e2),(0,a4.G4)(null,null,eY,{kind:"field",name:"_handleReferrerpolicy",static:!1,private:!1,access:{has:e=>"_handleReferrerpolicy"in e,get:e=>e._handleReferrerpolicy,set:(e,t)=>{e._handleReferrerpolicy=t}},metadata:e},e8,e3),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["src","placeholder","blur-radius","crossorigin","referrerpolicy"];#e=(0,a4.zF)(this,eJ);#er=(0,a2.Ut)(()=>this.#e.shadowRoot,"#img");_handleSrc=(0,a4.zF)(this,eK,(0,a2.H$)(this.#er,"src",e=>e||this.#e.getAttribute("placeholder")));_preloadPlaceholder(e){e&&(new Image().src=e)}_handleBlurRadius=((0,a4.zF)(this,eQ),(0,a4.zF)(this,e0,(0,a2._8)(this.#er,"--blur-radius",void 0,!0)));_handleCrossorigin=((0,a4.zF)(this,e1),(0,a4.zF)(this,e4,(0,a2.H$)(this.#er,"crossorigin")));_handleReferrerpolicy=((0,a4.zF)(this,e2),(0,a4.zF)(this,e8,(0,a2.H$)(this.#er,"referrerpolicy")));#ed=((0,a4.zF)(this,e3),()=>{let e=this.#er().src,t=this.#e.getAttribute("placeholder");t&&e!==t&&(this.#er().src=t)});constructor(e){this.#e=e,this.#er().addEventListener("error",this.#ed)}connectedCallback(){(null===this.#e.getAttribute("src")||""===this.#e.getAttribute("src"))&&this._handleSrc(null)}}),sR=(e9=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;e6=[(0,a2.ZR)("load")],e5=[(0,a2.ZR)("error")],(0,a4.G4)(this,null,e6,{kind:"method",name:"_enableLoadEvent",static:!1,private:!1,access:{has:e=>"_enableLoadEvent"in e,get:e=>e._enableLoadEvent},metadata:e},null,e9),(0,a4.G4)(this,null,e5,{kind:"method",name:"_enableErrorEvent",static:!1,private:!1,access:{has:e=>"_enableErrorEvent"in e,get:e=>e._enableErrorEvent},metadata:e},null,e9),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=[];#e=(0,a4.zF)(this,e9);#er=(0,a2.Ut)(()=>this.#e.shadowRoot,"#img");_enableLoadEvent(e){e?this.#er().addEventListener("load",this.#eh,{passive:!0}):this.#er().removeEventListener("load",this.#eh)}_enableErrorEvent(e){e?this.#er().addEventListener("error",this.#ec,{passive:!0}):this.#er().removeEventListener("error",this.#ec)}#eh=()=>{this.#e.dispatchEvent(new CustomEvent("load",{...a5.$,detail:{width:this.#er().naturalWidth,height:this.#er().naturalHeight}}))};#ec=()=>{this.#e.dispatchEvent(new CustomEvent("error",{...a5.$,detail:{}}))};constructor(e){this.#e=e}});tt=[(0,a2.uA)("filter-image",[a8.O,sF,sI,sR],sl({}))],tn=[],ti=HTMLElement,(class extends ti{static{te=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(ti[Symbol.metadata]??null):void 0;(0,a4.G4)(null,e7={value:te},tt,{kind:"class",name:te.name,metadata:e},null,tn),te=e7.value,e&&Object.defineProperty(te,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a4.zF)(te,tn)}}),ts=[(0,a2.uA)("x-image",[a8.O,sF,sR],sl({}))],to=[],tr=HTMLElement,class extends tr{static{ta=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(tr[Symbol.metadata]??null):void 0;(0,a4.G4)(null,tl={value:ta},ts,{kind:"class",name:ta.name,metadata:e},null,to),ta=tl.value,e&&Object.defineProperty(ta,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a4.zF)(ta,to)}};let sM=(tp=[],tb=[],tv=[],tg=[],tf=[],ty=[],tE=[],tS=[],tw=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;td=[(0,a2._y)("confirm-type",!0)],th=[(0,a2._y)("maxlength",!0)],tc=[(0,a2._y)("readonly",!0)],tm=[(0,a2._y)("type",!0)],tu=[(0,a2._y)("ios-spell-check",!0),(0,a2._y)("spell-check",!0)],(0,a4.G4)(this,null,tm,{kind:"method",name:"_handleType",static:!1,private:!1,access:{has:e=>"_handleType"in e,get:e=>e._handleType},metadata:e},null,tp),(0,a4.G4)(null,null,td,{kind:"field",name:"_handlerConfirmType",static:!1,private:!1,access:{has:e=>"_handlerConfirmType"in e,get:e=>e._handlerConfirmType,set:(e,t)=>{e._handlerConfirmType=t}},metadata:e},tb,tv),(0,a4.G4)(null,null,th,{kind:"field",name:"_handlerMaxlength",static:!1,private:!1,access:{has:e=>"_handlerMaxlength"in e,get:e=>e._handlerMaxlength,set:(e,t)=>{e._handlerMaxlength=t}},metadata:e},tg,tf),(0,a4.G4)(null,null,tc,{kind:"field",name:"_handleReadonly",static:!1,private:!1,access:{has:e=>"_handleReadonly"in e,get:e=>e._handleReadonly,set:(e,t)=>{e._handleReadonly=t}},metadata:e},ty,tE),(0,a4.G4)(null,null,tu,{kind:"field",name:"_handleSpellCheck",static:!1,private:!1,access:{has:e=>"_handleSpellCheck"in e,get:e=>e._handleSpellCheck,set:(e,t)=>{e._handleSpellCheck=t}},metadata:e},tS,tw),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["confirm-type","maxlength","readonly","type","ios-spell-check","spell-check"];#e=(0,a4.zF)(this,tp);#em=(0,a2.Ut)(()=>this.#e.shadowRoot,"#input");_handlerConfirmType=(0,a4.zF)(this,tb,(0,a2.H$)(this.#em,"enterkeyhint",e=>null===e?"send":e));_handlerMaxlength=((0,a4.zF)(this,tv),(0,a4.zF)(this,tg,(0,a2.H$)(this.#em,"maxlength",e=>null===e?"140":e)));_handleReadonly=((0,a4.zF)(this,tf),(0,a4.zF)(this,ty,(0,a2.H$)(this.#em,"readonly",e=>null!==e?"":null)));#eu=((0,a4.zF)(this,tE),(0,a2.H$)(this.#em,"type"));#ep=(0,a2.H$)(this.#em,"inputmode");_handleType(e){let t="text",n="text";"digit"===e?t="numeric":"number"===e?t="decimal":"email"===e?t="email":"tel"===e?t="tel":n=e,this.#ep(t),this.#eu(n)}_handleSpellCheck=(0,a4.zF)(this,tS,(0,a2.H$)(this.#em,"spellcheck",e=>null===e?"false":"true"));constructor(e){(0,a4.zF)(this,tw),this.#e=e}}),sP=(tO=[],tL=[],tA=[],tI=[],tF=[],tR=[],tM=[],tP=[],tz=[],tN=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;t_=[(0,a2._y)("placeholder",!0)],tx=[(0,a2._y)("placeholder-color",!0)],tC=[(0,a2._y)("placeholder-font-family",!0)],tT=[(0,a2._y)("placeholder-font-size",!0)],tk=[(0,a2._y)("placeholder-font-weight",!0)],(0,a4.G4)(null,null,t_,{kind:"field",name:"_handlerPlaceholder",static:!1,private:!1,access:{has:e=>"_handlerPlaceholder"in e,get:e=>e._handlerPlaceholder,set:(e,t)=>{e._handlerPlaceholder=t}},metadata:e},tO,tL),(0,a4.G4)(null,null,tx,{kind:"field",name:"_handlerPlaceholderColor",static:!1,private:!1,access:{has:e=>"_handlerPlaceholderColor"in e,get:e=>e._handlerPlaceholderColor,set:(e,t)=>{e._handlerPlaceholderColor=t}},metadata:e},tA,tI),(0,a4.G4)(null,null,tC,{kind:"field",name:"_handlerPlaceholderFontFamily",static:!1,private:!1,access:{has:e=>"_handlerPlaceholderFontFamily"in e,get:e=>e._handlerPlaceholderFontFamily,set:(e,t)=>{e._handlerPlaceholderFontFamily=t}},metadata:e},tF,tR),(0,a4.G4)(null,null,tT,{kind:"field",name:"_handlerPlaceholderFontSize",static:!1,private:!1,access:{has:e=>"_handlerPlaceholderFontSize"in e,get:e=>e._handlerPlaceholderFontSize,set:(e,t)=>{e._handlerPlaceholderFontSize=t}},metadata:e},tM,tP),(0,a4.G4)(null,null,tk,{kind:"field",name:"_handlerPlaceholderFontWeight",static:!1,private:!1,access:{has:e=>"_handlerPlaceholderFontWeight"in e,get:e=>e._handlerPlaceholderFontWeight,set:(e,t)=>{e._handlerPlaceholderFontWeight=t}},metadata:e},tz,tN),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["placeholder","placeholder-color","placeholder-font-family","placeholder-font-size","placeholder-font-weight"];#e;#em=(0,a2.Ut)(()=>this.#e.shadowRoot,"#input");_handlerPlaceholder=(0,a4.zF)(this,tO,(0,a2.H$)(this.#em,"placeholder"));_handlerPlaceholderColor=((0,a4.zF)(this,tL),(0,a4.zF)(this,tA,(0,a2._8)(this.#em,"--placeholder-color",void 0,!0)));_handlerPlaceholderFontFamily=((0,a4.zF)(this,tI),(0,a4.zF)(this,tF,(0,a2._8)(this.#em,"--placeholder-font-family",void 0,!0)));_handlerPlaceholderFontSize=((0,a4.zF)(this,tR),(0,a4.zF)(this,tM,(0,a2._8)(this.#em,"--placeholder-font-size",void 0,!0)));_handlerPlaceholderFontWeight=((0,a4.zF)(this,tP),(0,a4.zF)(this,tz,(0,a2._8)(this.#em,"--placeholder-font-weight",void 0,!0)));constructor(e){(0,a4.zF)(this,tN),this.#e=e}}),sz=(tj=[],t$=[],tV=[],tW=[],tU=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;tH=[(0,a2._y)("value",!1)],tD=[(0,a2._y)("disabled",!0)],tG=[(0,a2._y)("autocomplete",!0)],(0,a4.G4)(this,null,tH,{kind:"method",name:"_handleValue",static:!1,private:!1,access:{has:e=>"_handleValue"in e,get:e=>e._handleValue},metadata:e},null,tj),(0,a4.G4)(null,null,tD,{kind:"field",name:"_handleDisabled",static:!1,private:!1,access:{has:e=>"_handleDisabled"in e,get:e=>e._handleDisabled,set:(e,t)=>{e._handleDisabled=t}},metadata:e},t$,tV),(0,a4.G4)(null,null,tG,{kind:"field",name:"_handleAutocomplete",static:!1,private:!1,access:{has:e=>"_handleAutocomplete"in e,get:e=>e._handleAutocomplete,set:(e,t)=>{e._handleAutocomplete=t}},metadata:e},tW,tU),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["value","disabled","autocomplete"];#e=(0,a4.zF)(this,tj);#em=(0,a2.Ut)(()=>this.#e.shadowRoot,"#input");_handleValue(e){if(e){let t=parseFloat(this.#e.getAttribute("maxlength")??"");isNaN(t)||(e=e.substring(0,t))}else e="";let t=this.#em();t.value!==e&&(t.value=e)}_handleDisabled=(0,a4.zF)(this,t$,(0,a2.H$)(this.#em,"disabled",e=>null!==e?"":null));_handleAutocomplete=((0,a4.zF)(this,tV),(0,a4.zF)(this,tW,(0,a2.H$)(this.#em,"autocomplete")));constructor(e){(0,a4.zF)(this,tU),this.#e=e}}),sN={submit:"confirm",blur:"lynxblur",focus:"lynxfocus"},sH=(tZ=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;tB=[(0,a2._y)("input-filter",!0),(0,a2.ZR)("lynxinput")],tX=[(0,a2._y)("send-composing-input",!0)],tq=[(0,a2.ZR)("selection")],(0,a4.G4)(this,null,tB,{kind:"method",name:"_handleEnableInputEvent",static:!1,private:!1,access:{has:e=>"_handleEnableInputEvent"in e,get:e=>e._handleEnableInputEvent},metadata:e},null,tZ),(0,a4.G4)(this,null,tX,{kind:"method",name:"_handleSendComposingInput",static:!1,private:!1,access:{has:e=>"_handleSendComposingInput"in e,get:e=>e._handleSendComposingInput},metadata:e},null,tZ),(0,a4.G4)(this,null,tq,{kind:"method",name:"_handleEnableSelectionEvent",static:!1,private:!1,access:{has:e=>"_handleEnableSelectionEvent"in e,get:e=>e._handleEnableSelectionEvent},metadata:e},null,tZ),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["send-composing-input","input-filter"];#e=(0,a4.zF)(this,tZ);#eb=!1;#ev=/[^0-9.]|\.(?=.*\.)/g;#em=(0,a2.Ut)(()=>this.#e.shadowRoot,"#input");#eg=(0,a2.Ut)(()=>this.#e.shadowRoot,"#form");_handleEnableInputEvent(e){let t=this.#em();e?(t.addEventListener("input",this.#ef,{passive:!0}),t.addEventListener("compositionend",this.#ey,{passive:!0})):(t.removeEventListener("input",this.#ef),t.removeEventListener("compositionend",this.#ey))}_handleSendComposingInput(e){this.#eb=null!==e}#eE=e=>{let t=sN[e.type]??e.type;this.#e.dispatchEvent(new CustomEvent(t,{...a5.$,detail:{value:this.#em().value}}))};#ef=e=>{let t=this.#em(),n=this.#eS(t.value),i=e.isComposing;t.value=n,(!i||this.#eb)&&this.#e.dispatchEvent(new CustomEvent("lynxinput",{...a5.$,detail:{value:n,textLength:n.length,cursor:t.selectionStart,isComposing:i,selectionStart:t.selectionStart,selectionEnd:t.selectionEnd}}))};#ey=()=>{let e=this.#em(),t=this.#eS(e.value);e.value=t,this.#eb||this.#e.dispatchEvent(new CustomEvent("lynxinput",{...a5.$,detail:{value:t,textLength:t.length,cursor:e.selectionStart,isComposing:!1,selectionStart:e.selectionStart,selectionEnd:e.selectionEnd}}))};#eS(e){let t=e;"number"===this.#e.getAttribute("type")&&(t=t.replace(this.#ev,""));let n=this.#e.getAttribute("input-filter");return n&&(t=t.replace(RegExp(n,"g"),"")),t}_handleEnableSelectionEvent(e){e?this.#em().addEventListener("select",this.#ew,{passive:!0}):this.#em().removeEventListener("select",this.#ew)}#ew=()=>{let e=this.#em();this.#e.dispatchEvent(new CustomEvent("selection",{...a5.$,detail:{selectionStart:e.selectionStart,selectionEnd:e.selectionEnd}}))};#e_=e=>{e.target===this.#em()&&"number"==typeof e.detail&&e.stopImmediatePropagation()};constructor(e){this.#e=e;const t=this.#em(),n=this.#eg();t.addEventListener("blur",this.#eE,{passive:!0}),t.addEventListener("focus",this.#eE,{passive:!0}),n.addEventListener("submit",this.#eE,{passive:!0}),n.addEventListener("input",this.#e_,{passive:!0})}});tK=[(0,a2.uA)("x-input",[a8.O,sP,sz,sM,sH],sa)],tQ=[],t0=HTMLElement,class extends t0{static{tJ=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(t0[Symbol.metadata]??null):void 0;(0,a4.G4)(null,tY={value:tJ},tK,{kind:"class",name:tJ.name,metadata:e},null,tQ),tJ=tY.value,e&&Object.defineProperty(tJ,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a4.zF)(tJ,tQ)}#ex=(0,a2.Ut)(()=>this.shadowRoot,"#input");addText(e){let{text:t}=e,n=this.#ex(),i=n.selectionStart;if(null===i)n.value=t;else{let e=n.value;n.value=e.slice(0,i)+t+e.slice(i)}}controlKeyBoard(e){let{action:t}=e;0===t||1===t?this.focus():(2===t||3===t)&&this.blur()}setValue(e){let t,n=this.#ex();n.value=e.value,(t=e.index)&&n.setSelectionRange(t,t)}getValue(){let e=this.#ex();return{value:e.value,selectionBegin:e.selectionStart,selectionEnd:e.selectionEnd}}sendDelEvent(e){let{action:t,length:n}=e,i=this.#ex();1===t&&(n=1);let l=i.selectionStart;if(null===l){let e=i.value;i.value=i.value.substring(0,e.length-n)}else{let e=i.value;i.value=e.slice(0,l-n)+e.slice(l)}}setInputFilter(e){this.#ex().setAttribute("pattern",e.pattern)}select(){let e=this.#ex();e.setSelectionRange(0,e.value.length)}setSelectionRange(e){this.#ex().setSelectionRange(e.selectionStart,e.selectionEnd)}focus(e){this.#ex().focus(e)}blur(){this.#ex().blur()}connectedCallback(){let e=this.#ex();null===this.getAttribute("confirm-type")&&e.setAttribute("confirm-type","send"),null===this.getAttribute("maxlength")&&e.setAttribute("maxlength","140")}};let sD=(t2=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;t1=[(0,a2._y)("events-pass-through",!0)],t4=[(0,a2._y)("visible",!1)],(0,a4.G4)(this,null,t1,{kind:"method",name:"_handleEventsPassThrough",static:!1,private:!1,access:{has:e=>"_handleEventsPassThrough"in e,get:e=>e._handleEventsPassThrough},metadata:e},null,t2),(0,a4.G4)(this,null,t4,{kind:"method",name:"_handleVisible",static:!1,private:!1,access:{has:e=>"_handleVisible"in e,get:e=>e._handleVisible},metadata:e},null,t2),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["visible","events-pass-through"];#e=(0,a4.zF)(this,t2);#eC=!!window.HTMLDialogElement;#eT=!1;constructor(e){this.#e=e}#ek=(0,a2.Ut)(()=>this.#e.shadowRoot,"#dialog");_handleEventsPassThrough(e){null!==e?(this.#ek().addEventListener("click",this.#eO,{passive:!1}),this.#e.addEventListener("click",this.#eO,{passive:!1})):(this.#ek().removeEventListener("click",this.#eO),this.#e.removeEventListener("click",this.#eO))}_handleVisible(e){this.#eT=null!==e,this.#eC&&(this.#eT?(this.#ek().showModal(),this.#e.dispatchEvent(new CustomEvent("showoverlay",a5.$))):(this.#ek().close(),this.#e.dispatchEvent(new CustomEvent("dismissoverlay",a5.$))))}#eO=e=>{e.stopPropagation();let t=this.#ek();if(e.target===this.#e||e.target===t){t.close();let{clientX:n,clientY:i}=e,l=document.elementFromPoint(n,i);l?.tagName==="LYNX-VIEW"&&l.shadowRoot&&(l=l.shadowRoot.elementFromPoint(n,i)??l),l?.dispatchEvent(new MouseEvent("click",e)),requestAnimationFrame(()=>{this.#eT&&t.isConnected&&t.showModal()})}};connectedCallback(){this.#eC||(this.#ek().style.display="none")}});t6=[(0,a2.uA)("x-overlay-ng",[a8.O,sD],so)],t5=[],t9=HTMLElement,class extends t9{static{t3=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(t9[Symbol.metadata]??null):void 0;(0,a4.G4)(null,t8={value:t3},t6,{kind:"class",name:t3.name,metadata:e},null,t5),t3=t8.value,e&&Object.defineProperty(t3,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a4.zF)(t3,t5)}get[a8.v](){return this.shadowRoot.firstElementChild}};class sG extends Event{startShowing;fullyShowing;static EventName="x-refresh-view-intersecting";constructor(e,t){super(sG.EventName,{composed:!1,cancelable:!0,bubbles:!0}),this.startShowing=e,this.fullyShowing=t}}class sj{#e;static observedAttributes=[];#eL;constructor(e){this.#e=e}connectedCallback(){if(IntersectionObserver&&!this.#eL){let e=this.#e.parentElement;e&&(this.#eL=new IntersectionObserver(e=>{let t=!1,n=!1;e.forEach(e=>{t=e.intersectionRatio>0,n=e.intersectionRatio>.9}),this.#e.dispatchEvent(new sG(t,n)),n&&this.#e.setAttribute("x-magnet-enable","")},{root:e,threshold:[.1,.9]}),this.#eL.observe(this.#e))}}dispose(){this.#eL&&(this.#eL.disconnect(),this.#eL=void 0)}}nt=[(0,a2.uA)("x-refresh-footer",[sv,a8.O,sj])],nn=[],ni=HTMLElement,(class extends ni{static{ne=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(ni[Symbol.metadata]??null):void 0;(0,a4.G4)(null,t7={value:ne},nt,{kind:"class",name:ne.name,metadata:e},null,nn),ne=t7.value,e&&Object.defineProperty(ne,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a4.zF)(ne,nn)}connectedCallback(){this.setAttribute("slot","footer")}}),ns=[(0,a2.uA)("x-refresh-header",[sv,a8.O,sj])],no=[],nr=HTMLElement,class extends nr{static{na=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(nr[Symbol.metadata]??null):void 0;(0,a4.G4)(null,nl={value:na},ns,{kind:"class",name:na.name,metadata:e},null,no),na=nl.value,e&&Object.defineProperty(na,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a4.zF)(na,no)}connectedCallback(){this.setAttribute("slot","header")}};let s$=(nc=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;nd=[(0,a2.ZR)("headeroffset"),(0,a2.ZR)("headershow"),(0,a2.ZR)("footeroffset")],nh=[(0,a2.ZR)("startrefresh"),(0,a2.ZR)("headerreleased"),(0,a2.ZR)("startloadmore"),(0,a2.ZR)("footerreleased")],(0,a4.G4)(this,null,nd,{kind:"method",name:"_handleComplexEventEnableAttributes",static:!1,private:!1,access:{has:e=>"_handleComplexEventEnableAttributes"in e,get:e=>e._handleComplexEventEnableAttributes},metadata:e},null,nc),(0,a4.G4)(this,null,nh,{kind:"method",name:"_handleXEnableHeaderOffsetEvent",static:!1,private:!1,access:{has:e=>"_handleXEnableHeaderOffsetEvent"in e,get:e=>e._handleXEnableHeaderOffsetEvent},metadata:e},null,nc),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}#e=(0,a4.zF)(this,nc);static observedAttributes=[];#eA=(0,a2.Ut)(()=>this.#e,"x-refresh-view > x-refresh-header:first-of-type");#eI=(0,a2.Ut)(()=>this.#e,"x-refresh-view > x-refresh-footer:first-of-type");constructor(e){this.#e=e,this.#e.addEventListener(sG.EventName,this.#eF)}#eR={headeroffset:!1,headerreleased:!1,startrefresh:!1,footeroffset:!1,headershow:!1,footerreleased:!1,startloadmore:!1};_handleComplexEventEnableAttributes(e,t){this.#eR[t]=e;let{headeroffset:n,headershow:i,footeroffset:l}=this.#eR;n||i||l?this.#eM():this.#eP()}_handleXEnableHeaderOffsetEvent(e,t){this.#eR[t]=e;let{startrefresh:n,headerreleased:i,startloadmore:l,footerreleased:a}=this.#eR;i||a||l||n?this.#ez():this.#eN()}#eH=!1;#eD=!1;#eG=!1;#ej=!1;#eF=e=>{e.stopPropagation(),"X-REFRESH-HEADER"===e.target.tagName?(this.#eH=e.startShowing,this.#eD=e.fullyShowing):(this.#eG=e.startShowing,this.#ej=e.fullyShowing)};#e$=!1;#ez(){this.#e$||(this.#e.addEventListener("touchend",this.#eV),this.#e$=!0)}#eV=()=>{this.#eD?(this.#e.dispatchEvent(new CustomEvent("headerreleased",a5.$)),this.#e.dispatchEvent(new CustomEvent("startrefresh",{...a5.$,detail:{isManual:this.#e._nextRefreshIsManual}})),this.#e._nextRefreshIsManual=!0):("true"===this.#e.getAttribute("enable-auto-loadmore")&&this.#eG||this.#ej)&&(this.#e.dispatchEvent(new CustomEvent("footerreleased",a5.$)),this.#e.dispatchEvent(new CustomEvent("startloadmore",a5.$)))};#eN(){this.#e$&&this.#e.removeEventListener("touchend",this.#eV)}#eW=!1;#eU=!1;#eM(){this.#eU||(this.#e.addEventListener("touchstart",this.#eB),this.#e.addEventListener("touchend",this.#eX),this.#e.addEventListener("touchcancel",this.#eX),this.#e.shadowRoot.querySelector("#container").addEventListener("scroll",this.#u))}#eX=()=>{this.#eW=!1};#eB=()=>{this.#eW=!0};#u=()=>{if(this.#eH&&(this.#eR.headershow||this.#eR.headeroffset)){let e=this.#eA();if(e){let t=parseFloat(getComputedStyle(e).height),n=this.#e.shadowRoot.querySelector("#container").scrollTop;this.#e.dispatchEvent(new CustomEvent("headershow",{...a5.$,detail:{isDragging:this.#eW,offsetPercent:1-n/t}})),this.#e.dispatchEvent(new CustomEvent("headeroffset",{...a5.$,detail:{isDragging:this.#eW,offsetPercent:1-n/t}}))}}else if(this.#eG&&this.#eR.footeroffset){let e=this.#eI();if(e){let t=this.#e.shadowRoot.querySelector("#container").scrollTop,n=parseFloat(getComputedStyle(e).height);this.#e.dispatchEvent(new CustomEvent("footeroffset",{...a5.$,detail:{isDragging:this.#eW,offsetPercent:1-t/n}}))}}};#eP(){this.#eU&&(this.#e.removeEventListener("touchstart",this.#eB),this.#e.removeEventListener("touchend",this.#eX),this.#e.removeEventListener("touchcancel",this.#eX),this.#e.shadowRoot.querySelector("#container").removeEventListener("scroll",this.#u))}dispose(){this.#eN(),this.#eP()}});np=[(0,a2.uA)("x-refresh-view",[sv,a8.O,s$],sr)],nb=[],nv=HTMLElement,class extends nv{static{nu=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(nv[Symbol.metadata]??null):void 0;(0,a4.G4)(null,nm={value:nu},np,{kind:"class",name:nu.name,metadata:e},null,nb),nu=nm.value,e&&Object.defineProperty(nu,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static notToFilterFalseAttributes=new Set(["enable-refresh","enable-loadmore","enable-auto-loadmore"]);_nextRefreshIsManual=!0;finishRefresh(){this.querySelector("x-refresh-view > x-refresh-header:first-of-type")?.removeAttribute("x-magnet-enable")}finishLoadMore(){this.querySelector("x-refresh-view > x-refresh-footer:first-of-type")?.removeAttribute("x-magnet-enable")}autoStartRefresh(){let e=this.shadowRoot.querySelector("#container");this.querySelector("x-refresh-view > x-refresh-header:first-of-type")?.setAttribute("x-magnet-enable",""),this._nextRefreshIsManual=!1,e.scroll({top:0,behavior:"smooth"})}#eq=(0,a2.Ut)(()=>this.shadowRoot,"#container");#eZ=(0,a2.Ut)(()=>this.shadowRoot,"#content");get scrollTop(){let e=this.#eq(),t=this.#eZ();return t.scrollTop+t.offsetTop-e.scrollTop}set scrollTop(e){console.log(e);let t=this.#eq(),n=this.#eZ();e>0?n.scrollTop=e:t.scrollTop=n.offsetTop+e}get scrollHeight(){return this.#eZ().scrollHeight}get[a7.l](){return this}static{(0,a4.zF)(nu,nb)}};let sV=(nE=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;ng=[(0,a2._y)("src",!0)],nf=[(0,a2._y)("content",!0)],ny=[(0,a2.ZR)("load")],(0,a4.G4)(this,null,ng,{kind:"method",name:"_handleSrc",static:!1,private:!1,access:{has:e=>"_handleSrc"in e,get:e=>e._handleSrc},metadata:e},null,nE),(0,a4.G4)(this,null,nf,{kind:"method",name:"_handleContent",static:!1,private:!1,access:{has:e=>"_handleContent"in e,get:e=>e._handleContent},metadata:e},null,nE),(0,a4.G4)(this,null,ny,{kind:"method",name:"_enableLoadEvent",static:!1,private:!1,access:{has:e=>"_enableLoadEvent"in e,get:e=>e._enableLoadEvent},metadata:e},null,nE),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["src","content"];#e=(0,a4.zF)(this,nE);#eY=null;#er=(0,a2.Ut)(()=>this.#e.shadowRoot,"#img");_handleSrc(e){e?this.#er().src=e:this.#er().src=""}_handleContent(e){if(this.#eY&&URL.revokeObjectURL(this.#eY),!e){this.#eY="";return}let t=new Blob([e],{type:"image/svg+xml;charset=UTF-8"}),n=URL.createObjectURL(t);this.#eY=n,this.#er().src=n}_enableLoadEvent(e){e?this.#er().addEventListener("load",this.#eh,{passive:!0}):this.#er().removeEventListener("load",this.#eh)}#eh=()=>{this.#e.dispatchEvent(new CustomEvent("load",{...a5.$,detail:{width:this.#er().naturalWidth,height:this.#er().naturalHeight}}))};constructor(e){this.#e=e}});n_=[(0,a2.uA)("x-svg",[a8.O,sV],'<img part="img" alt="" loading="lazy" id="img" /> ')],nx=[],nC=HTMLElement,(class extends nC{static{nw=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(nC[Symbol.metadata]??null):void 0;(0,a4.G4)(null,nS={value:nw},n_,{kind:"class",name:nw.name,metadata:e},null,nx),nw=nS.value,e&&Object.defineProperty(nw,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a4.zF)(nw,nx)}}),nO=[(0,a2.uA)("x-swiper-item",[sv,a8.O])],nL=[],nA=HTMLElement,class extends nA{static{nk=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(nA[Symbol.metadata]??null):void 0;(0,a4.G4)(null,nT={value:nk},nO,{kind:"class",name:nk.name,metadata:e},null,nL),nk=nT.value,e&&Object.defineProperty(nk,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a4.zF)(nk,nL)}};let sW=(nR=[],nM=[],nP=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;nI=[(0,a2.ZR)("transition")],nF=[(0,a2.ZR)("scrollstart"),(0,a2.ZR)("lynxscrollend"),(0,a2.ZR)("change"),(0,a2.ZR)("change-event-for-indicator")],(0,a4.G4)(this,null,nF,{kind:"method",name:"_enableScrollEventProcessor",static:!1,private:!1,access:{has:e=>"_enableScrollEventProcessor"in e,get:e=>e._enableScrollEventProcessor},metadata:e},null,nR),(0,a4.G4)(null,null,nI,{kind:"field",name:"_handleEnableTransitionEvent",static:!1,private:!1,access:{has:e=>"_handleEnableTransitionEvent"in e,get:e=>e._handleEnableTransitionEvent,set:(e,t)=>{e._handleEnableTransitionEvent=t}},metadata:e},nM,nP),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=[];#e=(0,a4.zF)(this,nR);#eJ=0;#eK=0;#eW=!1;#i;#eQ=!1;constructor(e){this.#e=e}#eZ=(0,a2.Ut)(()=>this.#e.shadowRoot,"#content").bind(this);_handleEnableTransitionEvent=(0,a4.zF)(this,nM,(0,a2.LB)(this.#eZ,"scroll",this.#e0,{passive:!0}));#u(){a7.k||(clearTimeout(this.#i),this.#i=setTimeout(()=>{this.#b()},100)),this.#eQ||(this.#e.dispatchEvent(new CustomEvent("scrollstart",{...a5.$,detail:{current:this.#eJ,isDragged:this.#eW}})),this.#eQ=!0);let e=this.#eZ(),t=this.#e.isVertical,n=t?e.scrollTop:e.scrollLeft,i=t?e.clientHeight:e.clientWidth,l=t?e.scrollHeight:e.scrollWidth;if(Math.abs(this.#eK-n)>i/4||n<10||Math.abs(n-l)<=i){let e=this.#e.currentIndex;e!==this.#eJ&&(this.#e.dispatchEvent(new CustomEvent("change",{...a5.$,detail:{current:e,isDragged:this.#eW}})),this.#eJ=e),this.#eK=n}}#b(){this.#e.dispatchEvent(new CustomEvent("lynxscrollend",{...a5.$,detail:{current:this.#eJ}})),this.#eQ=!1}#e1(){this.#eW=!0}#e4(){this.#eW=!1}#e0(){this.#e.dispatchEvent(new CustomEvent("transition",{...a5.$,detail:{dx:this.#eZ().scrollLeft,dy:this.#eZ().scrollTop}}))}#e2=((0,a4.zF)(this,nP),[(0,a2.LB)(this.#eZ,"scroll",this.#u.bind(this),{passive:!0}),(0,a2.LB)(this.#eZ,"touchstart",this.#e1.bind(this),{passive:!0}),(0,a2.LB)(this.#eZ,"touchend",this.#e4.bind(this),{passive:!0}),(0,a2.LB)(this.#eZ,"touchcancel",this.#e4.bind(this),{passive:!0}),(0,a2.LB)(this.#eZ,"scrollend",this.#b.bind(this),{passive:!0})]);#eR={scrollstart:!1,lynxscrollend:!1,change:!1,"change-event-for-indicator":!1};_enableScrollEventProcessor(e,t){this.#eR[t]=e;let{lynxscrollend:n,scrollstart:i,change:l}=this.#eR,a=l||n||i||this.#eR["change-event-for-indicator"];this.#e2.forEach(e=>e(a))}connectedCallback(){this.#eJ=parseFloat(this.#e.getAttribute("current")??"0");let e=this.#e.isVertical;this.#eK=e?this.#eZ().scrollTop:this.#eZ().scrollLeft}}),sU=(nH=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;nz=[(0,a2._y)("current",!1)],nN=[(0,a2._y)("interval",!1),(0,a2._y)("autoplay",!1)],(0,a4.G4)(this,null,nz,{kind:"method",name:"_handleCurrentChange",static:!1,private:!1,access:{has:e=>"_handleCurrentChange"in e,get:e=>e._handleCurrentChange},metadata:e},null,nH),(0,a4.G4)(this,null,nN,{kind:"method",name:"_handleAutoplay",static:!1,private:!1,access:{has:e=>"_handleAutoplay"in e,get:e=>e._handleAutoplay},metadata:e},null,nH),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["current","interval","autoplay"];#e=(0,a4.zF)(this,nH);constructor(e){this.#e=e}#e8(){this.#e.currentIndex===this.#e.childElementCount-1?this.#e.circularPlay&&(this.#e.currentIndex=0):this.#e.currentIndex+=1}_handleCurrentChange(e){let t=Number(e);Number.isNaN(t)||(this.#e.currentIndex=t)}#e3;#e6=(()=>{this.#e8()}).bind(this);#e5(e){this.#e9(),this.#e3=setInterval(this.#e6,e)}#e9(){this.#e3&&clearInterval(this.#e3)}_handleAutoplay(){if(null!==this.#e.getAttribute("autoplay")){let e=this.#e.getAttribute("interval"),t=e?parseFloat(e):5e3;Number.isNaN(t)&&(t=5e3),this.#e5(t)}}dispose(){this.#e9()}}),sB=(nj=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;nD=[(0,a2._y)("circular",!1)],nG=[(0,a2._y)("vertical",!0)],(0,a4.G4)(this,null,nD,{kind:"method",name:"_handleCircular",static:!1,private:!1,access:{has:e=>"_handleCircular"in e,get:e=>e._handleCircular},metadata:e},null,nj),(0,a4.G4)(this,null,nG,{kind:"method",name:"_handleVerticalChange",static:!1,private:!1,access:{has:e=>"_handleVerticalChange"in e,get:e=>e._handleVerticalChange},metadata:e},null,nj),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["circular","vertical"];#e=(0,a4.zF)(this,nj);#e7=!1;#te;#tt=0;#eZ=(0,a2.Ut)(()=>this.#e.shadowRoot,"#content").bind(this);constructor(e){this.#e=e}#tn=(0,a2.Ut)(()=>this.#e.shadowRoot,"#circular-start").bind(this);#ti=(0,a2.Ut)(()=>this.#e.shadowRoot,"#circular-end").bind(this);#tl(e){let t=this.#e.childElementCount;if(t>2){let{current:n,isDragged:i,__isFirstLayout:l}=e.detail;if(0===n||n===t-1||2===n||n===t-2){let e,a=this.#eZ(),s=this.#tn().assignedElements(),o=this.#ti().assignedElements(),r=this.#e.firstElementChild,d=this.#e.lastElementChild,h=this.#e.snapDistance;if(0===n?(o.forEach(e=>e.removeAttribute("slot")),d.setAttribute("slot","circular-start"),e=r):n===t-1?(s.forEach(e=>e.removeAttribute("slot")),r.setAttribute("slot","circular-end"),e=d):(s.forEach(e=>e.removeAttribute("slot")),o.forEach(e=>e.removeAttribute("slot")),e=this.#e.children[n]),this.#e7){let t="carousel"===this.#e.getAttribute("mode")?.8*a.clientHeight/2:a.clientHeight/2;this.#tt=e.offsetTop+e.offsetHeight/2-h-t,a.scrollTop=this.#tt}else{let t="carousel"===this.#e.getAttribute("mode")?.8*a.clientWidth/2:a.clientWidth/2;this.#tt=e.offsetLeft+e.offsetWidth/2-h-t,a.scrollLeft=this.#tt}if(!i){let e=this.#e.getAttribute("mode");if(l&&(null===e||"normal"===e||"carousel"===e||"carry"===e))return;this.#ta(l?"instant":"smooth")}}}}#ta(e){let t=this.#eZ(),n=this.#e.snapDistance;t.scrollBy({top:this.#e7?n:0,left:this.#e7?0:n,behavior:e??"smooth"})}#e2=[(0,a2.LB)(()=>this.#e,"change",this.#tl.bind(this),{passive:!0}),(0,a2.LB)(()=>this.#e,"touchmove",this.#ts.bind(this),{passive:!1}),(0,a2.LB)(()=>this.#e,"touchend",this.#to.bind(this),{passive:!1}),(0,a2.LB)(()=>this.#e,"touchcancel",this.#to.bind(this),{passive:!1})];_handleCircular(e){this.#e2.forEach(t=>t(null!=e)),null!==e&&this.#tl({detail:{current:this.#e.currentIndex,isDragged:!1,__isFirstLayout:!0}})}#ts(e){let t=e.touches.item(0);if(t){let e=this.#e7?t.pageY:t.pageX;if(void 0!==this.#te){this.#tr();let t=this.#te-e;this.#tt+=t}this.#te=e}}#to(e){this.#td(),this.#ta(),this.#te=void 0}_handleVerticalChange(e){this.#e7=null!==e}#th;#tr(){if(!this.#th){let e=this.#eZ();this.#tt=this.#e7?e.scrollTop:e.scrollLeft,this.#th=setInterval(()=>{this.#e7?e.scrollTop=this.#tt:e.scrollLeft=this.#tt},10)}}#td(){this.#th&&(clearInterval(this.#th),this.#th=void 0)}dispose(){this.#td()}}),sX=(nX=[],nq=[],nZ=[],nY=[],nJ=[],nK=[],nQ=[],n0=[],n1=[],n4=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;n$=[(0,a2._y)("indicator-color",!0)],nV=[(0,a2._y)("indicator-active-color",!0)],nW=[(0,a2._y)("page-margin",!0)],nU=[(0,a2._y)("previous-margin",!0)],nB=[(0,a2._y)("next-margin",!0)],(0,a4.G4)(null,null,n$,{kind:"field",name:"_handleIndicatorColor",static:!1,private:!1,access:{has:e=>"_handleIndicatorColor"in e,get:e=>e._handleIndicatorColor,set:(e,t)=>{e._handleIndicatorColor=t}},metadata:e},nX,nq),(0,a4.G4)(null,null,nV,{kind:"field",name:"_handleIndicatorActiveColor",static:!1,private:!1,access:{has:e=>"_handleIndicatorActiveColor"in e,get:e=>e._handleIndicatorActiveColor,set:(e,t)=>{e._handleIndicatorActiveColor=t}},metadata:e},nZ,nY),(0,a4.G4)(null,null,nW,{kind:"field",name:"_handlePageMargin",static:!1,private:!1,access:{has:e=>"_handlePageMargin"in e,get:e=>e._handlePageMargin,set:(e,t)=>{e._handlePageMargin=t}},metadata:e},nJ,nK),(0,a4.G4)(null,null,nU,{kind:"field",name:"_handlePreviousMargin",static:!1,private:!1,access:{has:e=>"_handlePreviousMargin"in e,get:e=>e._handlePreviousMargin,set:(e,t)=>{e._handlePreviousMargin=t}},metadata:e},nQ,n0),(0,a4.G4)(null,null,nB,{kind:"field",name:"_handleNextMargin",static:!1,private:!1,access:{has:e=>"_handleNextMargin"in e,get:e=>e._handleNextMargin,set:(e,t)=>{e._handleNextMargin=t}},metadata:e},n1,n4),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["indicator-color","indicator-active-color","page-margin","previous-margin","next-margin"];#e;#tc=0;#tm=(0,a2.Ut)(()=>this.#e.shadowRoot,"#indicator-container");#tu=(0,a2.Ut)(()=>this.#e.shadowRoot,"#indicator-style");#tp;constructor(e){(0,a4.zF)(this,n4),this.#e=e}_handleIndicatorColor=(0,a4.zF)(this,nX,(0,a2._8)(this.#tm,"--indicator-color",void 0,!0));_handleIndicatorActiveColor=((0,a4.zF)(this,nq),(0,a4.zF)(this,nZ,(0,a2._8)(this.#tm,"--indicator-active-color",void 0,!0)));_handlePageMargin=((0,a4.zF)(this,nY),(0,a4.zF)(this,nJ,(0,a2._8)(this.#tm,"--page-margin",void 0,!0)));_handlePreviousMargin=((0,a4.zF)(this,nK),(0,a4.zF)(this,nQ,(0,a2._8)(this.#tm,"--previous-margin",void 0,!0)));_handleNextMargin=((0,a4.zF)(this,n0),(0,a4.zF)(this,n1,(0,a2._8)(this.#tm,"--next-margin",void 0,!0)));#tb(){let e=this.#e.childElementCount;if(e!==this.#tc){let t="";for(let n=0;n<e;n++)t+=`<div style="animation-timeline:--x-swiper-item-${n};" part="indicator-item"></div>`;if(this.#tm().innerHTML=t,e>5){for(let t=0;t<e;t++)this.#e.children.item(t)?.style.setProperty("view-timeline-name",`--x-swiper-item-${t}`);this.#tu().innerHTML=`:host { timeline-scope: ${Array.from({length:e},(e,t)=>`--x-swiper-item-${t}`).join(",")} !important; }`}}this.#tc=e}connectedCallback(){if(this.#tb(),this.#tp=new MutationObserver(this.#tb.bind(this)),this.#tp.observe(this.#e,{attributes:!1,characterData:!1,childList:!0,subtree:!1}),!CSS.supports("timeline-scope","--a, --b")){this.#e.addEventListener("change",(({detail:e})=>{let t=e.current,n=this.#e.childElementCount,i=this.#tm();for(let e=0;e<n;e++){let n=i.children[e];n&&(e===t?n.style.setProperty("background-color","var(--indicator-active-color)","important"):n.style.removeProperty("background-color"))}}).bind(this));let e=parseFloat(this.#e.getAttribute("current")??"0");this.#tm().children[e]?.style.setProperty("background-color","var(--indicator-active-color)","important")}}dispose(){this.#tp?.disconnect(),this.#tp=void 0}});n3=[(0,a2.uA)("x-swiper",[a8.O,sX,sW,sB,sU],sd)],n6=[],n5=HTMLElement,class extends n5{static{n8=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(n5[Symbol.metadata]??null):void 0;(0,a4.G4)(null,n2={value:n8},n3,{kind:"class",name:n8.name,metadata:e},null,n6),n8=n2.value,e&&Object.defineProperty(n8,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static notToFilterFalseAttributes=new Set(["smooth-scroll","indicator-dots"]);#eZ=(0,a2.Ut)(()=>this.shadowRoot,"#content").bind(this);#tv(){let e=0,t=Number.MAX_SAFE_INTEGER,n=0;if(this.childElementCount>0){let i=this.#eZ(),l=this.isVertical,a=this.childElementCount,s=l?i.scrollTop:i.scrollLeft,o=l?i.clientHeight:i.clientWidth,r=l?this.firstElementChild.offsetHeight:this.firstElementChild.offsetWidth,d=s+("carousel"===this.getAttribute("mode")?.8*o/2:o/2);for(let i=0;i<a;i++){let a=this.children[i];if(a){let s=(l?a.offsetTop:a.offsetLeft)+r/2-d,o=Math.abs(s);o<t&&(e=i,t=o,n=s)}}}return{current:e,minDistanceToMid:t,minOffsetToMid:n}}get currentIndex(){return this.#tv().current}set currentIndex(e){if(this.currentIndex===e)return;let t=null===this.getAttribute("smooth-scroll");this.#tg(e,t?"smooth":"instant")}#tg(e,t){let n=this.children.item(e);if(n){let e=this.isVertical,i=0;i="flat-coverflow"===this.getAttribute("mode")?e?n.offsetTop-n.offsetHeight/3:n.offsetLeft-n.offsetWidth/3:e?n.offsetTop:n.offsetLeft,this.#eZ().scrollTo({left:e?0:i,top:e?i:0,behavior:t})}}get snapDistance(){return this.#tv().minOffsetToMid}get isVertical(){return null!==this.getAttribute("vertical")}get circularPlay(){return null!==this.getAttribute("circular")}scrollTo(...e){if(e.length>0&&"object"==typeof e[0]&&null!==e[0]&&"index"in e[0]){let{index:t,smooth:n=!0}=e[0];if("number"==typeof t)return void this.#tg(t,n?"smooth":"instant")}super.scrollTo(...e)}connectedCallback(){let e=this.getAttribute("current");null!==e&&this.#tg(Number(e),"instant")}get[a7.l](){return this}static{(0,a4.zF)(n8,n6)}};let sq=(n7=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;n9=[(0,a2._y)("src",!0)],(0,a4.G4)(this,null,n9,{kind:"method",name:"_handleSrc",static:!1,private:!1,access:{has:e=>"_handleSrc"in e,get:e=>e._handleSrc},metadata:e},null,n7),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["src"];#e=(0,a4.zF)(this,n7);constructor(e){this.#e=e}#tf=(0,a2.Ut)(()=>this.#e.shadowRoot,"#img");_handleSrc(e){e?this.#tf().setAttribute("src",e):this.#tf().removeAttribute("src")}});ii=[(0,a2.uA)("inline-image",[sq],sl({}))],il=[],ia=HTMLElement,(class extends ia{static{it=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(ia[Symbol.metadata]??null):void 0;(0,a4.G4)(null,ie={value:it},ii,{kind:"class",name:it.name,metadata:e},null,il),it=ie.value,e&&Object.defineProperty(it,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a4.zF)(it,il)}}),ir=[(0,a2.uA)("inline-text",[])],id=[],ih=HTMLElement,(class extends ih{static{io=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(ih[Symbol.metadata]??null):void 0;(0,a4.G4)(null,is={value:io},ir,{kind:"class",name:io.name,metadata:e},null,id),io=is.value,e&&Object.defineProperty(io,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a4.zF)(io,id)}}),iu=[(0,a2.uA)("inline-truncation",[])],ip=[],ib=HTMLElement,a0=class extends ib{static{im=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(ib[Symbol.metadata]??null):void 0;(0,a4.G4)(null,ic={value:im},iu,{kind:"class",name:im.name,metadata:e},null,ip),a0=im=ic.value,e&&Object.defineProperty(im,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static XEnableCustomTruncation="x-text-custom-overflow";connectedCallback(){CSS.supports("selector(:has(>inline-truncation))")||this.parentElement?.tagName!=="X-TEXT"||this.matches("inline-truncation ~ inline-truncation")||this.parentElement.setAttribute(a0.XEnableCustomTruncation,""),this.setAttribute("slot","inline-truncation")}disconnectedCallback(){this.parentElement?.removeAttribute(a0.XEnableCustomTruncation)}static{(0,a4.zF)(im,ip)}},a0=im;let sZ=(ig=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;iv=[(0,a2._y)("text",!0)],(0,a4.G4)(this,null,iv,{kind:"method",name:"_handleText",static:!1,private:!1,access:{has:e=>"_handleText"in e,get:e=>e._handleText},metadata:e},null,ig),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["text"];#e=(0,a4.zF)(this,ig);#ty;constructor(e){this.#e=e}_handleText(e){this.#ty?.remove(),e&&(this.#ty=new Text(e),this.#e.append(this.#ty))}});iS=[(0,a2.uA)("raw-text",[sZ])],iw=[],i_=HTMLElement,class extends i_{static{iE=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(i_[Symbol.metadata]??null):void 0;(0,a4.G4)(null,iy={value:iE},iS,{kind:"class",name:iE.name,metadata:e},null,iw),iE=iy.value,e&&Object.defineProperty(iE,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a4.zF)(iE,iw)}};let sY=(iT=[],class e{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;ix=[(0,a2._y)("text-maxlength",!0),(0,a2._y)("text-maxline",!0),(0,a2._y)("tail-color-convert",!0)],iC=[(0,a2.ZR)("layout")],(0,a4.G4)(this,null,ix,{kind:"method",name:"_handleAttributeChange",static:!1,private:!1,access:{has:e=>"_handleAttributeChange"in e,get:e=>e._handleAttributeChange},metadata:e},null,iT),(0,a4.G4)(this,null,iC,{kind:"method",name:"_handleEnableLayoutEvent",static:!1,private:!1,access:{has:e=>"_handleEnableLayoutEvent"in e,get:e=>e._handleEnableLayoutEvent},metadata:e},null,iT),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static exceedMathLengthAttribute="x-text-clipped";static showInlineTruncation="x-show-inline-truncation";static observedAttributes=["text-maxlength","text-maxline","tail-color-convert"];#tE=((0,a4.zF)(this,iT),!1);#tS=!1;#tw=new Map;#t_;#R;#tx;#tC;#tT=!1;#tk=NaN;#tO=NaN;#tL=!0;#tA=!1;get #tI(){return!this.#tF&&!this.#tL}get #tF(){return!!this.#tR()}#tR(){return this.#e.querySelector(":scope > inline-truncation")}get #tM(){return!isNaN(this.#tO)&&(this.#tF||!this.#tL)}#e;constructor(e){this.#e=e}#tP=(0,a2.Ut)(()=>this.#e.shadowRoot,"#inner-box");#tz(e){e.forEach(e=>{e.removedNodes.forEach(e=>{this.#tw.delete(e)}),"characterData"===e.type&&void 0!==this.#tw.get(e.target)&&this.#tw.set(e.target,e.target.data)})}#tN(){for(let[t,n]of this.#tw)t.nodeType===Node.TEXT_NODE?void 0!==n&&(t.data=n):t.removeAttribute(e.exceedMathLengthAttribute);this.#e.removeAttribute(e.exceedMathLengthAttribute),this.#e.removeAttribute(e.showInlineTruncation)}#tH(e){let t=[],n=e;for(;n=n.nextSibling;)(n.nodeType===Node.TEXT_NODE||n.nodeType===Node.ELEMENT_NODE)&&t.push(n);return t}#tD(){!this.#tS||this.#e.matches("x-text>x-text")||this.#tE||(this.#tE=!0,(0,a2.JS)(async()=>{await this.#tG(),this.#tj(),this.#tE=!1}))}async #tG(){if(this.#tx?.parentElement?.removeChild(this.#tx),this.#tN(),!this.#tM&&isNaN(this.#tk))return;await document.fonts.ready;let t=this.#tP().getBoundingClientRect();this.#tC=new sJ(this.#e,t);let n=this.#tC,i=(isNaN(this.#tk)?void 0:n.getNodeInfoByCharIndex(this.#tk))?this.#tk:1/0,l=this.#tM&&n.getLineInfo(this.#tO)?n.getLineInfo(this.#tO-1):void 0,a=1/0,s=3;if(l){let{start:i,end:o}=l,r=o-i;if(this.#tF){this.#e.setAttribute(e.showInlineTruncation,"");let l=this.#tR().getBoundingClientRect(),s=t.width,r=l.width;if(s>r){a=o-1;let e=document.createRange(),t=n.getNodeInfoByCharIndex(a),i=o-t.start;for(e.setEnd(t.node,i),e.setStart(t.node,i);e.getBoundingClientRect().width<r&&(a-=1)&&(t=n.getNodeInfoByCharIndex(a));)e.setStart(t.node,a-t.start)}else a=i,this.#e.removeAttribute(e.showInlineTruncation)}else r<3?(s=r,a=i):a=o-3}let o=Math.min(i,a);if(o<1/0){let t=n.getNodeInfoByCharIndex(o);if(t){let i=o-t.start,l=t.node,a=[];l.nodeType===Node.TEXT_NODE?(this.#tw.set(l,l.data),l.data=l.data.substring(0,i)):a.push(l),a=a.concat(this.#tH(l));let r=l.parentElement;for(;r!==this.#e;)a=a.concat(this.#tH(r)),r=r.parentElement;if(a.forEach(t=>{t.nodeType===Node.TEXT_NODE&&0!==t.data.length?(this.#tw.set(t,t.data),t.data=""):t.nodeType===Node.ELEMENT_NODE&&(this.#tw.set(t,""),t.setAttribute(e.exceedMathLengthAttribute,""))}),this.#tI){let e=(0===i?n.nodelist.at(t.nodeIndex-1)?.parentElement:l.parentElement)??l.parentElement;this.#tx=new Text(Array(s).fill(".").join("")),e.append(this.#tx)}this.#e.setAttribute(e.exceedMathLengthAttribute,"")}this.#t$(o)}}#tV=e=>{this.#tz(e),this.#tD()};#tW=()=>{if(this.#tT){this.#tT=!1;return}this.#tD()};#tj(){this.#tS&&((this.#tk||this.#tO)&&!this.#t_&&(this.#t_=new MutationObserver(this.#tV),this.#t_.observe(this.#e,{subtree:!0,childList:!0,attributes:!1,characterData:!0})),this.#tO&&!this.#R&&(this.#R=new ResizeObserver(this.#tW),this.#tT=!0,this.#R.observe(this.#tP(),{box:"content-box"})))}#tU(){this.#t_?.disconnect(),this.#t_=void 0,this.#R?.disconnect(),this.#R=void 0}_handleAttributeChange(){this.#tk=parseFloat(this.#e.getAttribute("text-maxlength")??""),this.#tO=parseFloat(this.#e.getAttribute("text-maxline")??""),this.#tL="false"!==this.#e.getAttribute("tail-color-convert"),this.#tk<0&&(this.#tk=NaN),this.#tO<1&&(this.#tO=NaN),isNaN(this.#tO)?this.#tP().style.removeProperty("-webkit-line-clamp"):this.#tP().style.webkitLineClamp=this.#tO.toString(),this.#tD()}_handleEnableLayoutEvent(e){this.#tA=e}#t$(e){if(!this.#tA)return;let t=new Proxy(this,{get:(t,n)=>"lineCount"===n?(t.#tC||(t.#tC=new sJ(t.#e,t.#e.getBoundingClientRect())),t.#tC.getLineCount()):"lines"===n?new Proxy(t,{get(t,n){let i=parseFloat(n.toString());if(!isNaN(i)){t.#tC||(t.#tC=new sJ(t.#e,t.#e.getBoundingClientRect()));let n=t.#tC.getLineInfo(i);if(n)return new Proxy(n,{get(t,n){switch(n){case"start":case"end":return t[n];case"ellipsisCount":if(void 0!==e&&e>=t.start&&e<t.end)return t.end-e;return 0}}})}}}):void 0});this.#e.dispatchEvent(new CustomEvent("layout",{...a5.$,detail:t}))}dispose(){this.#tU()}connectedCallback(){this.#tS=!0,this._handleEnableLayoutEvent(this.#tA),this._handleAttributeChange(),(0,a2.JS)(()=>{this.#t$()})}});class sJ{#tB=[{start:0}];#tX=[];#tq=[];#e;#tZ;nodelist;constructor(e,t){this.#e=e,this.nodelist=new sK(this.#e),this.#tZ=t}#tY(e){if(e.node.nodeType!==Node.TEXT_NODE)return 1;{let{rect:t,rectIndex:n}=e,i=e.node,l=document.createRange();l.selectNode(i);for(let e=0;e<i.data.length;e++){l.setEnd(i,e);let a=l.getClientRects().item(n);if(a&&a.right===t.right)return e}return i.data.length}}#tJ(e){if(this.#tX[e])return;let{left:t}=this.#tZ,n=this.#tX[this.#tX.length-1],i=n?.[n.length-1],l=i?.nodeIndex?i?.nodeIndex+1:0;for(let n=l,i;(i=this.#tK(n))&&e>=this.#tX.length;n++){let e,{node:n}=i;if(n.nodeType===Node.ELEMENT_NODE)e=n.getClientRects();else{let t=document.createRange();t.selectNode(n),e=t.getClientRects()}if(e.length>0){let n=this.#tX[this.#tX.length-1],l=e[0];if(.2>Math.abs(l.left-t)||!n?this.#tX.push([{...i,rect:l,rectIndex:0}]):n.push({...i,rect:l,rectIndex:0}),e.length>1)for(let n=1;n<e.length;n++){let a=e[n];(a.left!==l.left||a.bottom!==l.bottom)&&(.2>Math.abs(a.left-t)?this.#tX.push([{...i,rect:a,rectIndex:n}]):this.#tX[this.#tX.length-1].push({...i,rect:a,rectIndex:n}))}}}}getLineCount(){return this.#tJ(1/0),this.#tX.length}getLineInfo(e){if(this.#tJ(e+1),e<this.#tX.length){let t=e>0?this.#tB[e-1]??{}:void 0,n=this.#tB[e]??{},i=e<this.#tX.length-1?this.#tB[e+1]??{}:void 0;if(void 0===n.start){let i=this.#tX[e-1],l=i[i.length-1],a=this.#tY(l),s=l.start+a;t&&(t.end=s),n.start=s+1}if(void 0===n.end){let t=this.#tX[e],l=t[t.length-1];if(e===this.#tX.length-1){let e=l.node.nodeType===Node.TEXT_NODE?l.node.data.length:1;n.end=l.start+e}else{let e=this.#tY(l);n.end=l.start+e,i.start=n.end+1}}return n}}#tK(e){let t=this.#tq.length-1,n=this.#tq[t],i=n?n.start+n.length:0;for(let t=this.#tq.length,n;(n=this.nodelist.at(t))&&e>=this.#tq.length;t++){let e=n.nodeType===Node.ELEMENT_NODE?1:n.data.length,l={node:n,length:e,start:i,nodeIndex:t};this.#tq.push(l)}return this.#tq[e]}getNodeInfoByCharIndex(e){let t,n=0,i=this.#tq.length-1;for(;n<=i;){let l=Math.floor((n+i)/2),a=this.#tq[l],s=a.node,o=s.nodeType===Node.TEXT_NODE?s.data.length:1,r=a.start;if(e>=r&&e<r+o){t=a;break}e<r?i=l-1:n=l+1}if(t)return t;for(let t=this.#tq.length,n;n=this.#tK(t);t++)if(e<n.start+n.length)return n}}class sK{#tQ=[];#t0;constructor(e){this.#t0=document.createTreeWalker(e,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,e=>{if(e.nodeType===Node.ELEMENT_NODE){let t=e.tagName;if("X-TEXT"===t||"INLINE-TEXT"===t||"RAW-TEXT"===t||"LYNX-WRAPPER"===t)return NodeFilter.FILTER_SKIP}return NodeFilter.FILTER_ACCEPT})}at(e){return this.#tQ[e]||this.#t1(e),this.#tQ[e]}#t1(e){let t=null;for(;e>=this.#tQ.length&&(t=this.#t0.nextNode());){this.#tQ.push(t);break}}}iL=[(0,a2.uA)("x-text",[a8.O,sY,sZ],'<div id="inner-box" part="inner-box"><slot part="slot"></slot><slot name="inline-truncation"></slot></div>')],iA=[],iI=HTMLElement,class extends iI{static{iO=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(iI[Symbol.metadata]??null):void 0;(0,a4.G4)(null,ik={value:iO},iL,{kind:"class",name:iO.name,metadata:e},null,iA),iO=ik.value,e&&Object.defineProperty(iO,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static notToFilterFalseAttributes=new Set(["tail-color-convert"]);superScrollIntoView(e){super.scrollIntoView(e)}scrollIntoView(e){"object"==typeof e&&e.scrollIntoViewOptions?this.dispatchEvent(new CustomEvent(st.eventName,{bubbles:!0,composed:!0,detail:e.scrollIntoViewOptions})):super.scrollIntoView(e)}[a8.v]=this;static{(0,a4.zF)(iO,iA)}};let sQ=(iN=[],iH=[],iD=[],iG=[],ij=[],i$=[],iV=[],iW=[],iU=[],iB=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;iF=[(0,a2._y)("placeholder-color",!0)],iR=[(0,a2._y)("placeholder-font-size",!0)],iM=[(0,a2._y)("placeholder-font-weight",!0)],iP=[(0,a2._y)("placeholder-font-family",!0)],iz=[(0,a2._y)("placeholder",!0)],(0,a4.G4)(null,null,iF,{kind:"field",name:"_updatePlaceholderColor",static:!1,private:!1,access:{has:e=>"_updatePlaceholderColor"in e,get:e=>e._updatePlaceholderColor,set:(e,t)=>{e._updatePlaceholderColor=t}},metadata:e},iN,iH),(0,a4.G4)(null,null,iR,{kind:"field",name:"_updatePlaceholderFontSize",static:!1,private:!1,access:{has:e=>"_updatePlaceholderFontSize"in e,get:e=>e._updatePlaceholderFontSize,set:(e,t)=>{e._updatePlaceholderFontSize=t}},metadata:e},iD,iG),(0,a4.G4)(null,null,iM,{kind:"field",name:"_updatePlaceholderFontWeight",static:!1,private:!1,access:{has:e=>"_updatePlaceholderFontWeight"in e,get:e=>e._updatePlaceholderFontWeight,set:(e,t)=>{e._updatePlaceholderFontWeight=t}},metadata:e},ij,i$),(0,a4.G4)(null,null,iP,{kind:"field",name:"_updatePlaceholderFontFamily",static:!1,private:!1,access:{has:e=>"_updatePlaceholderFontFamily"in e,get:e=>e._updatePlaceholderFontFamily,set:(e,t)=>{e._updatePlaceholderFontFamily=t}},metadata:e},iV,iW),(0,a4.G4)(null,null,iz,{kind:"field",name:"_handlePlaceholder",static:!1,private:!1,access:{has:e=>"_handlePlaceholder"in e,get:e=>e._handlePlaceholder,set:(e,t)=>{e._handlePlaceholder=t}},metadata:e},iU,iB),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["placeholder","placeholder-color","placeholder-font-size","placeholder-font-weight","placeholder-font-family"];#t4=(0,a2.Ut)(()=>this.#e.shadowRoot,"#textarea");_updatePlaceholderColor=(0,a4.zF)(this,iN,(0,a2._8)(this.#t4,"--placeholder-color",void 0,!0));_updatePlaceholderFontSize=((0,a4.zF)(this,iH),(0,a4.zF)(this,iD,(0,a2._8)(this.#t4,"--placeholder-font-size",void 0,!0)));_updatePlaceholderFontWeight=((0,a4.zF)(this,iG),(0,a4.zF)(this,ij,(0,a2._8)(this.#t4,"--placeholder-font-weight",void 0,!0)));_updatePlaceholderFontFamily=((0,a4.zF)(this,i$),(0,a4.zF)(this,iV,(0,a2._8)(this.#t4,"--placeholder-font-family",void 0,!0)));_handlePlaceholder=((0,a4.zF)(this,iW),(0,a4.zF)(this,iU,(0,a2.H$)(this.#t4,"placeholder")));#e=(0,a4.zF)(this,iB);constructor(e){this.#e=e}}),s0=(iK=[],iQ=[],i0=[],i1=[],i4=[],i2=[],i8=[],i3=[],i6=[],i5=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;iX=[(0,a2._y)("confirm-type",!0)],iq=[(0,a2._y)("maxlength",!0)],iZ=[(0,a2._y)("readonly",!0)],iY=[(0,a2._y)("ios-spell-check",!0)],iJ=[(0,a2._y)("show-soft-input-onfocus",!0)],(0,a4.G4)(null,null,iX,{kind:"field",name:"_handlerConfirmType",static:!1,private:!1,access:{has:e=>"_handlerConfirmType"in e,get:e=>e._handlerConfirmType,set:(e,t)=>{e._handlerConfirmType=t}},metadata:e},iK,iQ),(0,a4.G4)(null,null,iq,{kind:"field",name:"_handlerMaxlength",static:!1,private:!1,access:{has:e=>"_handlerMaxlength"in e,get:e=>e._handlerMaxlength,set:(e,t)=>{e._handlerMaxlength=t}},metadata:e},i0,i1),(0,a4.G4)(null,null,iZ,{kind:"field",name:"_handleReadonly",static:!1,private:!1,access:{has:e=>"_handleReadonly"in e,get:e=>e._handleReadonly,set:(e,t)=>{e._handleReadonly=t}},metadata:e},i4,i2),(0,a4.G4)(null,null,iY,{kind:"field",name:"_handleSpellCheck",static:!1,private:!1,access:{has:e=>"_handleSpellCheck"in e,get:e=>e._handleSpellCheck,set:(e,t)=>{e._handleSpellCheck=t}},metadata:e},i8,i3),(0,a4.G4)(null,null,iJ,{kind:"field",name:"_handleShowSoftInputOnfocus",static:!1,private:!1,access:{has:e=>"_handleShowSoftInputOnfocus"in e,get:e=>e._handleShowSoftInputOnfocus,set:(e,t)=>{e._handleShowSoftInputOnfocus=t}},metadata:e},i6,i5),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["confirm-type","maxlength","readonly","type","ios-spell-check","spell-check","show-soft-input-onfocus"];#e;#t2=(0,a2.Ut)(()=>this.#e.shadowRoot,"#textarea");_handlerConfirmType=(0,a4.zF)(this,iK,(0,a2.H$)(this.#t2,"enterkeyhint",e=>null===e?"send":e));_handlerMaxlength=((0,a4.zF)(this,iQ),(0,a4.zF)(this,i0,(0,a2.H$)(this.#t2,"maxlength",e=>null===e?"140":e)));_handleReadonly=((0,a4.zF)(this,i1),(0,a4.zF)(this,i4,(0,a2.H$)(this.#t2,"readonly",e=>null!==e?"":null)));_handleSpellCheck=((0,a4.zF)(this,i2),(0,a4.zF)(this,i8,(0,a2.H$)(this.#t2,"spellcheck",e=>null===e?"false":"true")));_handleShowSoftInputOnfocus=((0,a4.zF)(this,i3),(0,a4.zF)(this,i6,(0,a2.H$)(this.#t2,"virtualkeyboardpolicy",e=>null===e?"manual":"auto")));constructor(e){(0,a4.zF)(this,i5),this.#e=e}}),s1=(li=[],ll=[],la=[],ls=[],lo=[],lr=[],ld=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;i9=[(0,a2._y)("confirm-enter",!0)],i7=[(0,a2._y)("disabled",!0)],le=[(0,a2._y)("max-height",!0)],lt=[(0,a2._y)("min-height",!0)],ln=[(0,a2._y)("value",!1)],(0,a4.G4)(this,null,i9,{kind:"method",name:"_handleConfirmEnter",static:!1,private:!1,access:{has:e=>"_handleConfirmEnter"in e,get:e=>e._handleConfirmEnter},metadata:e},null,li),(0,a4.G4)(this,null,ln,{kind:"method",name:"_handleValue",static:!1,private:!1,access:{has:e=>"_handleValue"in e,get:e=>e._handleValue},metadata:e},null,li),(0,a4.G4)(null,null,i7,{kind:"field",name:"_handleDisabled",static:!1,private:!1,access:{has:e=>"_handleDisabled"in e,get:e=>e._handleDisabled,set:(e,t)=>{e._handleDisabled=t}},metadata:e},ll,la),(0,a4.G4)(null,null,le,{kind:"field",name:"_handleMaxHeight",static:!1,private:!1,access:{has:e=>"_handleMaxHeight"in e,get:e=>e._handleMaxHeight,set:(e,t)=>{e._handleMaxHeight=t}},metadata:e},ls,lo),(0,a4.G4)(null,null,lt,{kind:"field",name:"_handleMinHeight",static:!1,private:!1,access:{has:e=>"_handleMinHeight"in e,get:e=>e._handleMinHeight,set:(e,t)=>{e._handleMinHeight=t}},metadata:e},lr,ld),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["confirm-enter","disabled","max-height","min-height","value"];#e=(0,a4.zF)(this,li);#t2=(0,a2.Ut)(()=>this.#e.shadowRoot,"#textarea");#eg=(0,a2.Ut)(()=>this.#e.shadowRoot,"#form");#t8=!1;_handleConfirmEnter(e){this.#t8=null!==e}_handleDisabled=(0,a4.zF)(this,ll,(0,a2.H$)(this.#t2,"disabled",e=>null!==e?"":null));_handleMaxHeight=((0,a4.zF)(this,la),(0,a4.zF)(this,ls,(0,a2._8)(this.#t2,"max-height")));_handleMinHeight=((0,a4.zF)(this,lo),(0,a4.zF)(this,lr,(0,a2._8)(this.#t2,"min-height")));_handleValue(e){if(e){let t=parseFloat(this.#e.getAttribute("maxlength")??"");isNaN(t)||(e=e.substring(0,t))}else e="";let t=this.#t2();t.value!==e&&(t.value=e)}#t3=((0,a4.zF)(this,ld),e=>{this.#t8&&"Enter"===e.key&&this.#eg().dispatchEvent(new SubmitEvent("submit"))});constructor(e){this.#e=e,this.#t2().addEventListener("keyup",this.#t3)}}),s4=(lu=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;lh=[(0,a2._y)("input-filter",!0),(0,a2.ZR)("lynxinput")],lc=[(0,a2._y)("send-composing-input",!0)],lm=[(0,a2.ZR)("selection")],(0,a4.G4)(this,null,lh,{kind:"method",name:"_handleEnableConfirmEvent",static:!1,private:!1,access:{has:e=>"_handleEnableConfirmEvent"in e,get:e=>e._handleEnableConfirmEvent},metadata:e},null,lu),(0,a4.G4)(this,null,lc,{kind:"method",name:"_handleSendComposingInput",static:!1,private:!1,access:{has:e=>"_handleSendComposingInput"in e,get:e=>e._handleSendComposingInput},metadata:e},null,lu),(0,a4.G4)(this,null,lm,{kind:"method",name:"_handleEnableSelectionEvent",static:!1,private:!1,access:{has:e=>"_handleEnableSelectionEvent"in e,get:e=>e._handleEnableSelectionEvent},metadata:e},null,lu),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["send-composing-input","input-filter"];#e=(0,a4.zF)(this,lu);#eb=!1;#t2=(0,a2.Ut)(()=>this.#e.shadowRoot,"#textarea");#eg=(0,a2.Ut)(()=>this.#e.shadowRoot,"#form");_handleEnableConfirmEvent(e){let t=this.#t2();e?(t.addEventListener("input",this.#ef,{passive:!0}),t.addEventListener("compositionend",this.#ey,{passive:!0})):(t.removeEventListener("input",this.#ef),t.removeEventListener("compositionend",this.#ey))}_handleSendComposingInput(e){this.#eb=null!==e}#eE=e=>{let t=sN[e.type]??e.type;this.#e.dispatchEvent(new CustomEvent(t,{...a5.$,detail:{value:this.#t2().value}}))};#ef=e=>{let t=this.#t2(),n=this.#e.getAttribute("input-filter"),i=n?t.value.replace(RegExp(n,"g"),""):t.value,l=e.isComposing;t.value=i,(!l||this.#eb)&&this.#e.dispatchEvent(new CustomEvent("lynxinput",{...a5.$,detail:{value:i,textLength:i.length,cursor:t.selectionStart,isComposing:l,selectionStart:t.selectionStart,selectionEnd:t.selectionEnd}}))};#ey=()=>{let e=this.#t2(),t=this.#e.getAttribute("input-filter"),n=t?e.value.replace(RegExp(t,"g"),""):e.value;e.value=n,this.#eb||this.#e.dispatchEvent(new CustomEvent("lynxinput",{...a5.$,detail:{value:n,textLength:n.length,cursor:e.selectionStart,isComposing:!1,selectionStart:e.selectionStart,selectionEnd:e.selectionEnd}}))};_handleEnableSelectionEvent(e){e?this.#t2().addEventListener("select",this.#ew,{passive:!0}):this.#t2().removeEventListener("select",this.#ew)}#ew=()=>{let e=this.#t2();this.#e.dispatchEvent(new CustomEvent("selection",{...a5.$,detail:{selectionStart:e.selectionStart,selectionEnd:e.selectionEnd}}))};#e_=e=>{e.target===this.#t2()&&"number"==typeof e.detail&&e.stopImmediatePropagation()};constructor(e){this.#e=e;const t=this.#t2(),n=this.#eg();t.addEventListener("blur",this.#eE,{passive:!0}),t.addEventListener("focus",this.#eE,{passive:!0}),n.addEventListener("submit",this.#eE,{passive:!0}),n.addEventListener("input",this.#e_,{passive:!0})}});lv=[(0,a2.uA)("x-textarea",[a8.O,sQ,s0,s1,s4],sc)],lg=[],lf=HTMLElement,(class extends lf{static{lb=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(lf[Symbol.metadata]??null):void 0;(0,a4.G4)(null,lp={value:lb},lv,{kind:"class",name:lb.name,metadata:e},null,lg),lb=lp.value,e&&Object.defineProperty(lb,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a4.zF)(lb,lg)}#t4=(0,a2.Ut)(()=>this.shadowRoot,"#textarea");get value(){return this.#t4().value}set value(e){this.#t4().value=e}addText(e){let{text:t}=e,n=this.#t4(),i=n.selectionStart;if(null===i)n.value=t;else{let e=n.value;n.value=e.slice(0,i)+t+e.slice(i)}}setValue(e){let t,n=this.#t4();n.value=e.value,(t=e.index)&&n.setSelectionRange(t,t)}getValue(){let e=this.#t4();return{value:e.value,selectionBegin:e.selectionStart,selectionEnd:e.selectionEnd}}sendDelEvent(e){let{action:t,length:n}=e,i=this.#t4();1===t&&(n=1);let l=i.selectionStart;if(null===l){let e=i.value;i.value=i.value.substring(0,e.length-n)}else{let e=i.value;i.value=e.slice(0,l-n)+e.slice(l)}}select(){let e=this.#t4();e.setSelectionRange(0,e.value.length)}setSelectionRange(e){this.#t4().setSelectionRange(e.selectionStart,e.selectionEnd)}}),lS=[(0,a2.uA)("x-view",[sv,a8.O])],lw=[],l_=HTMLElement,class extends l_{static{lE=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(l_[Symbol.metadata]??null):void 0;(0,a4.G4)(null,ly={value:lE},lS,{kind:"class",name:lE.name,metadata:e},null,lw),lE=ly.value,e&&Object.defineProperty(lE,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a4.zF)(lE,lw)}superScrollIntoView(e){super.scrollIntoView(e)}scrollIntoView(e){"object"==typeof e&&e.scrollIntoViewOptions?this.dispatchEvent(new CustomEvent(st.eventName,{bubbles:!0,composed:!0,detail:e.scrollIntoViewOptions})):super.scrollIntoView(e)}[a8.v]=this};let s2=(lC=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;lx=[(0,a2._y)("blur-radius",!0)],(0,a4.G4)(this,null,lx,{kind:"method",name:"_handleBlurRadius",static:!1,private:!1,access:{has:e=>"_handleBlurRadius"in e,get:e=>e._handleBlurRadius},metadata:e},null,lC),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["blur-radius"];#e=(0,a4.zF)(this,lC);#t6=(0,a2.Ut)(()=>this.#e.shadowRoot,"#dynamic-style");_handleBlurRadius(e){e?(e=`blur(${parseFloat(e)}px)`,this.#t6().innerHTML=`:host { backdrop-filter: ${e}; -webkit-backdrop-filter: ${e}}`):this.#t6().innerHTML=""}constructor(e){this.#e=e}});lO=[(0,a2.uA)("x-blur-view",[a8.O,s2],'<style id="dynamic-style"></style><slot></slot>')],lL=[],lA=HTMLElement,class extends lA{static{lk=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(lA[Symbol.metadata]??null):void 0;(0,a4.G4)(null,lT={value:lk},lO,{kind:"class",name:lk.name,metadata:e},null,lL),lk=lT.value,e&&Object.defineProperty(lk,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a4.zF)(lk,lL)}};let s8=(lM=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;lI=[(0,a2.ZR)("change")],lF=[(0,a2.ZR)("willchange")],lR=[(0,a2.ZR)("offsetchange")],(0,a4.G4)(this,null,lI,{kind:"method",name:"_enableChangeEvent",static:!1,private:!1,access:{has:e=>"_enableChangeEvent"in e,get:e=>e._enableChangeEvent},metadata:e},null,lM),(0,a4.G4)(this,null,lF,{kind:"method",name:"_enableWillChangeEvent",static:!1,private:!1,access:{has:e=>"_enableWillChangeEvent"in e,get:e=>e._enableWillChangeEvent},metadata:e},null,lM),(0,a4.G4)(this,null,lR,{kind:"method",name:"_enableOffsetChangeEvent",static:!1,private:!1,access:{has:e=>"_enableOffsetChangeEvent"in e,get:e=>e._enableOffsetChangeEvent},metadata:e},null,lM),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=[];#e=(0,a4.zF)(this,lM);#t5=!1;#t9=!1;#t7=0;#i;constructor(e){this.#e=e}#s=(0,a2.Ut)(()=>this.#e.shadowRoot,"#content");#ne=()=>{if(!this.#t9)return;let e=this.#s(),t=this.#e.clientWidth,n=e.scrollLeft;this.#nt&&!a7.k&&(clearTimeout(this.#i),this.#i=setTimeout(()=>{this.#nn()},100)),this.#e.dispatchEvent(new CustomEvent("offsetchange",{...a5.$,detail:{offset:n/t}}))};#nn=()=>{if(this.#t9){let e=this.#s(),t=this.#e.clientWidth,n=Math.floor(e.scrollLeft/t);n!==this.#t7&&(this.#e.dispatchEvent(new CustomEvent("change",{...a5.$,detail:{index:n,isDragged:this.#t5}})),this.#t7=n)}};#ni=()=>{this.#t5=!0};#nl=()=>{if(this.#t5=!1,this.#na){let e=this.#s(),t=this.#e.clientWidth;if(t>0){let n=Math.round(e.scrollLeft/t);n=Math.max(0,Math.min(n,this.#e.children.length-1)),this.#e.dispatchEvent(new CustomEvent("willchange",{...a5.$,detail:{index:n}}))}}};#nt=!1;_enableChangeEvent(e){this.#nt=e,this.#ns()}#na=!1;_enableWillChangeEvent(e){this.#na=e}#no=!1;_enableOffsetChangeEvent(e){this.#no=e,this.#ns()}#ns(){let e=this.#s();this.#no||this.#nt?e.addEventListener("scroll",this.#ne,{passive:!0}):e.removeEventListener("scroll",this.#ne),a7.k&&this.#nt?e.addEventListener("scrollend",this.#nn,{passive:!0}):e.removeEventListener("scrollend",this.#nn)}connectedCallback(){this.#t9=!0;let e=this.#s();this.#e.addEventListener("touchstart",this.#ni,{passive:!0}),e.addEventListener("touchend",this.#nl,{passive:!0}),e.addEventListener("touchcancel",this.#nl,{passive:!0})}dispose(){let e=this.#s();e.removeEventListener("scroll",this.#ne),e.removeEventListener("scrollend",this.#nn)}});lN=[(0,a2.uA)("x-viewpager-ng",[sv,a8.O,s8],sm)],lH=[],lD=HTMLElement,(class extends lD{static{lz=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(lD[Symbol.metadata]??null):void 0;(0,a4.G4)(null,lP={value:lz},lN,{kind:"class",name:lz.name,metadata:e},null,lH),lz=lP.value,e&&Object.defineProperty(lz,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static notToFilterFalseAttributes=new Set(["allow-horizontal-gesture","enable-scroll"]);selectTab(e){let{index:t,smooth:n}=e;void 0===n&&(n=!0);let i=this.shadowRoot.children.item(2),l=i.clientWidth*t;i.scrollTo({left:l,behavior:n?"smooth":"instant"})}connectedCallback(){let e=this.getAttribute("select-index")||this.getAttribute("initial-select-index");if(null!==e){let t=Number(e),n=this.shadowRoot.children.item(2),i=()=>{0===n.clientWidth?requestAnimationFrame(i):this.selectTab({index:t,smooth:!1})};(0,a2.JS)(i)}}get[a7.l](){return this}static{(0,a4.zF)(lz,lH)}}),l$=[(0,a2.uA)("x-viewpager-item-ng",[sv,a8.O])],lV=[],lW=HTMLElement,class extends lW{static{lj=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(lW[Symbol.metadata]??null):void 0;(0,a4.G4)(null,lG={value:lj},l$,{kind:"class",name:lj.name,metadata:e},null,lV),lj=lG.value,e&&Object.defineProperty(lj,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a4.zF)(lj,lV)}};let s3=(lB=[],lX=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;lU=[(0,a2._y)("estimated-main-axis-size-px",!0)],(0,a4.G4)(null,null,lU,{kind:"field",name:"_handlerEstimatedMainAxisSizePx",static:!1,private:!1,access:{has:e=>"_handlerEstimatedMainAxisSizePx"in e,get:e=>e._handlerEstimatedMainAxisSizePx,set:(e,t)=>{e._handlerEstimatedMainAxisSizePx=t}},metadata:e},lB,lX),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["estimated-main-axis-size-px"];#e;_handlerEstimatedMainAxisSizePx=(0,a4.zF)(this,lB,(0,a2._8)(()=>this.#e,"--estimated-main-axis-size-px",e=>`${parseFloat(e)}px`));constructor(e){(0,a4.zF)(this,lX),this.#e=e}});lY=[(0,a2.uA)("list-item",[a8.O,s3])],lJ=[],lK=HTMLElement,class extends lK{static{lZ=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(lK[Symbol.metadata]??null):void 0;(0,a4.G4)(null,lq={value:lZ},lY,{kind:"class",name:lZ.name,metadata:e},null,lJ),lZ=lq.value,e&&Object.defineProperty(lZ,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static notToFilterFalseAttributes=new Set(["recyclable"]);static{(0,a4.zF)(lZ,lJ)}};let s6=(l1=[],l4=[],l2=[],l8=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;lQ=[(0,a2._y)("sticky-offset",!0)],l0=[(0,a2._y)("span-count",!0),(0,a2._y)("column-count",!0)],(0,a4.G4)(null,null,lQ,{kind:"field",name:"_handlerStickyOffset",static:!1,private:!1,access:{has:e=>"_handlerStickyOffset"in e,get:e=>e._handlerStickyOffset,set:(e,t)=>{e._handlerStickyOffset=t}},metadata:e},l1,l4),(0,a4.G4)(null,null,l0,{kind:"field",name:"_handlerCount",static:!1,private:!1,access:{has:e=>"_handlerCount"in e,get:e=>e._handlerCount,set:(e,t)=>{e._handlerCount=t}},metadata:e},l2,l8),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["sticky-offset","initial-scroll-index","span-count","column-count"];#e;_handlerStickyOffset=(0,a4.zF)(this,l1,(0,a2._8)(()=>this.#e,"--list-item-sticky-offset",e=>`${parseFloat(e)}px`));_handlerCount=((0,a4.zF)(this,l4),(0,a4.zF)(this,l2,(0,a2._8)(()=>this.#e,"--list-item-span-count",e=>`${parseFloat(e)}`)));constructor(e){(0,a4.zF)(this,l8),this.#e=e}connectedCallback(){let e=this.#e.getAttribute("initial-scroll-index");if(null!==e){let t=parseFloat(e),n=()=>{0===this.#e.clientHeight?requestAnimationFrame(n):this.#e.scrollToPosition({position:t})};(0,a2.JS)(n)}}}),s5=function(e,t,n){let i,l,a,s,o=0;var r=function(){o=n?.leading===!1?0:new Date().getTime(),i=null,s=e.apply(l,a),i||(l=a=null)};return function(){var d=new Date().getTime();o||n?.leading!==!1||(o=d);var h=t-(d-o);return l=this,a=arguments,h<=0||h>t?(i&&(clearTimeout(i),i=null),o=d,s=e.apply(l,a),i||(l=a=null)):i||n?.trailing===!1||(i=setTimeout(r,h)),s}},s9=(an=[],ai=[],al=[],aa=[],as=[],ao=[],ar=[],ad=[],ah=[],ac=[],am=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;l3=[(0,a2.ZR)("scrolltoupper")],l6=[(0,a2._y)("upper-threshold-item-count",!0)],l5=[(0,a2.ZR)("scrolltolower")],l9=[(0,a2._y)("lower-threshold-item-count",!0)],l7=[(0,a2.ZR)("lynxscroll"),(0,a2.ZR)("lynxscrollend"),(0,a2.ZR)("snap")],ae=[(0,a2.ZR)("scrolltoupperedge")],at=[(0,a2.ZR)("scrolltoloweredge")],(0,a4.G4)(this,null,l6,{kind:"method",name:"_handleUpperThresholdItemCountChange",static:!1,private:!1,access:{has:e=>"_handleUpperThresholdItemCountChange"in e,get:e=>e._handleUpperThresholdItemCountChange},metadata:e},null,an),(0,a4.G4)(this,null,l9,{kind:"method",name:"_handleLowerThresholdItemCountChange",static:!1,private:!1,access:{has:e=>"_handleLowerThresholdItemCountChange"in e,get:e=>e._handleLowerThresholdItemCountChange},metadata:e},null,an),(0,a4.G4)(null,null,l3,{kind:"field",name:"_updateEventSwitches",static:!1,private:!1,access:{has:e=>"_updateEventSwitches"in e,get:e=>e._updateEventSwitches,set:(e,t)=>{e._updateEventSwitches=t}},metadata:e},ai,al),(0,a4.G4)(null,null,l5,{kind:"field",name:"_updateScrollToLowerEventSwitches",static:!1,private:!1,access:{has:e=>"_updateScrollToLowerEventSwitches"in e,get:e=>e._updateScrollToLowerEventSwitches,set:(e,t)=>{e._updateScrollToLowerEventSwitches=t}},metadata:e},aa,as),(0,a4.G4)(null,null,l7,{kind:"field",name:"_handleScrollEventsSwitches",static:!1,private:!1,access:{has:e=>"_handleScrollEventsSwitches"in e,get:e=>e._handleScrollEventsSwitches,set:(e,t)=>{e._handleScrollEventsSwitches=t}},metadata:e},ao,ar),(0,a4.G4)(null,null,ae,{kind:"field",name:"_handleScrollToUpperEdgeEventEnable",static:!1,private:!1,access:{has:e=>"_handleScrollToUpperEdgeEventEnable"in e,get:e=>e._handleScrollToUpperEdgeEventEnable,set:(e,t)=>{e._handleScrollToUpperEdgeEventEnable=t}},metadata:e},ad,ah),(0,a4.G4)(null,null,at,{kind:"field",name:"_handleScrollToLowerEdgeEventEnable",static:!1,private:!1,access:{has:e=>"_handleScrollToLowerEdgeEventEnable"in e,get:e=>e._handleScrollToLowerEdgeEventEnable,set:(e,t)=>{e._handleScrollToLowerEdgeEventEnable=t}},metadata:e},ac,am),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["upper-threshold-item-count","lower-threshold-item-count"];#e=(0,a4.zF)(this,an);#nr=(0,a2.Ut)(()=>this.#e.shadowRoot,"#content");#nd;#nh;#nc;#l=0;#a=0;#nm=!1;#i;#o=(0,a2.Ut)(()=>this.#e.shadowRoot,"#upper-threshold-observer");#r=(0,a2.Ut)(()=>this.#e.shadowRoot,"#lower-threshold-observer");#h(){let e=null!==this.#e.getAttribute("need-visible-item-info"),{scrollTop:t,scrollLeft:n,scrollHeight:i,scrollWidth:l}=this.#nr(),a={scrollTop:t,scrollLeft:n,scrollHeight:i,scrollWidth:l,deltaX:n-this.#l,deltaY:t-this.#a,attachedCells:e?this.#e.getVisibleCells():void 0};return this.#l=n,this.#a=t,a}#nu=e=>{let{isIntersecting:t}=e[0];t&&this.#e.dispatchEvent(new CustomEvent("scrolltoupper",{...a5.$,detail:this.#h()}))};_updateEventSwitches=(0,a4.zF)(this,ai,e=>{if(e?this.#e.setAttribute("x-enable-scrolltoupper-event",""):this.#e.removeAttribute("x-enable-scrolltoupper-event"),this.#eR.scrolltoupper=e,e){this.#nd||(this.#nd=new IntersectionObserver(this.#nu,{root:this.#nr()})),this.#nc||(this.#nc=new MutationObserver(this.#np));let e=this.#e.getAttribute("upper-threshold-item-count"),t=null!==e?parseFloat(e):0,n=0===t?this.#o():this.#e.children[t-1];n&&this.#nd.observe(n),this.#nc.observe(this.#e,{childList:!0})}else this.#nd&&(this.#nd.disconnect(),this.#nd=void 0),this.#nc&&(this.#nc.disconnect(),this.#nc=void 0)});_handleUpperThresholdItemCountChange(e,t){let n=null!==t?parseFloat(t):0,i=0===n?this.#o():this.#e.children[n-1];i&&this.#nd?.unobserve(i);let l=null!==e?parseFloat(e):0,a=0===l?this.#o():this.#e.children[l-1];a&&this.#nd?.observe(a)}#nb=((0,a4.zF)(this,al),e=>{let{isIntersecting:t}=e[0];t&&this.#e.dispatchEvent(new CustomEvent("scrolltolower",{...a5.$,detail:this.#h()}))});#eR={lynxscroll:!1,lynxscrollend:!1,snap:!1,scrolltolower:!1,scrolltoupper:!1};_updateScrollToLowerEventSwitches=(0,a4.zF)(this,aa,e=>{if(this.#eR.scrolltolower=e,e?this.#e.setAttribute("x-enable-scrolltolower-event",""):this.#e.removeAttribute("x-enable-scrolltolower-event"),e){this.#nh||(this.#nh=new IntersectionObserver(this.#nb,{root:this.#nr()})),this.#nc||(this.#nc=new MutationObserver(this.#np));let e=this.#e.getAttribute("lower-threshold-item-count"),t=null!==e?parseFloat(e):0,n=0===t?this.#r():this.#e.children[this.#e.children.length-t];n&&this.#nh.observe(n),this.#nc.observe(this.#e,{childList:!0})}else this.#nh&&(this.#nh.disconnect(),this.#nh=void 0),this.#nc&&(this.#nc.disconnect(),this.#nc=void 0)});_handleLowerThresholdItemCountChange(e,t){let n=null!==t?parseFloat(t):0,i=0===n?this.#r():this.#e.children[this.#e.children.length-n];i&&this.#nh?.unobserve(i);let l=null!==e?parseFloat(e):0,a=0===l?this.#r():this.#e.children[this.#e.children.length-l];a&&this.#nh?.observe(a)}#np=((0,a4.zF)(this,as),e=>{let t=e?.[0];if(t?.type==="childList"){if(this.#eR.scrolltolower){this.#nh&&(this.#nh.disconnect(),this.#nh=void 0),this.#nh=new IntersectionObserver(this.#nb,{root:this.#nr()});let e=this.#e.getAttribute("lower-threshold-item-count"),t=null!==e?parseFloat(e):0,n=0===t?this.#r():this.#e.children[this.#e.children.length-t];n&&this.#nh.observe(n)}if(null!==this.#e.getAttribute("x-enable-scrolltoupper-event")){this.#nd&&(this.#nd.disconnect(),this.#nd=void 0),this.#nd=new IntersectionObserver(this.#nu,{root:this.#nr()});let e=this.#e.getAttribute("upper-threshold-item-count"),t=null!==e?parseFloat(e):0,n=0===t?this.#o():this.#e.children[t-1];n&&this.#nd.observe(n)}}});#nv=null;#u=()=>{this.#nm&&!a7.k&&(clearTimeout(this.#i),this.#i=setTimeout(()=>{this.#b()},100)),this.#e.dispatchEvent(new CustomEvent("lynxscroll",{...a5.$,detail:this.#h()}))};_handleScrollEventsSwitches=(0,a4.zF)(this,ao,(e,t)=>{this.#eR[t]=e;let{lynxscroll:n,lynxscrollend:i,snap:l}=this.#eR,a=this.#e.getAttribute("scroll-event-throttle");this.#nm=null!==i||null!==l;let s=this.#nr();if(this.#nv&&s.removeEventListener("scroll",this.#nv),null!==n||this.#nm){let e=null!==a?parseFloat(a):0,t=s5(this.#u,e,{leading:!0,trailing:!1});this.#nv=t,s.addEventListener("scroll",this.#nv),this.#l=0,this.#a=0}a7.k&&this.#nm?s.addEventListener("scrollend",this.#b):s.removeEventListener("scrollend",this.#b)});#d=((0,a4.zF)(this,ar),e=>{let{isIntersecting:t,target:n}=e[0],i=n.id;t&&("upper-threshold-observer"===i?this.#e.dispatchEvent(new CustomEvent("scrolltoupperedge",{...a5.$,detail:this.#h()})):"lower-threshold-observer"===i&&this.#e.dispatchEvent(new CustomEvent("scrolltoloweredge",{...a5.$,detail:this.#h()})))});_handleScrollToUpperEdgeEventEnable=(0,a4.zF)(this,ad,e=>{e?this.#e.setAttribute("x-enable-scrolltoupperedge-event",""):this.#e.removeAttribute("x-enable-scrolltoupperedge-event"),this.#ng(e)});#ng=((0,a4.zF)(this,ah),a9(this.#nr,this.#o,this.#d));_handleScrollToLowerEdgeEventEnable=(0,a4.zF)(this,ac,e=>{e?this.#e.setAttribute("x-enable-scrolltoloweredge-event",""):this.#e.removeAttribute("x-enable-scrolltoloweredge-event"),this.#nf(e)});#nf=((0,a4.zF)(this,am),a9(this.#nr,this.#r,this.#d));#b=()=>{let e=this.#e.getAttribute("item-snap");if(this.#e.dispatchEvent(new CustomEvent("lynxscrollend",{...a5.$})),null!==e){let e=Array.from(this.#e.children).filter(e=>"LIST-ITEM"===e.tagName),t=this.#nr().scrollTop,n=this.#nr().scrollLeft,i=e.find(e=>t>=e.offsetTop&&t<e.offsetTop+e.offsetHeight);this.#e.dispatchEvent(new CustomEvent("snap",{...a5.$,detail:{position:i&&e.indexOf(i),scrollTop:t,scrollLeft:n}}))}};constructor(e){this.#e=e}}),s7="waterfall-slot",oe="waterfall-style",ot=(ab=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;au=[(0,a2.ZR)("scrolltolower")],ap=[(0,a2._y)("list-type",!0)],(0,a4.G4)(this,null,au,{kind:"method",name:"_handleXEnableHeaderOffsetEvent",static:!1,private:!1,access:{has:e=>"_handleXEnableHeaderOffsetEvent"in e,get:e=>e._handleXEnableHeaderOffsetEvent},metadata:e},null,ab),(0,a4.G4)(this,null,ap,{kind:"method",name:"_handlerListType",static:!1,private:!1,access:{has:e=>"_handlerListType"in e,get:e=>e._handlerListType},metadata:e},null,ab),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["list-type"];#e=(0,a4.zF)(this,ab);#nr=(0,a2.Ut)(()=>this.#e.shadowRoot,"#content");#ny=(0,a2.Ut)(()=>this.#e.shadowRoot,'div[part="lower-threshold-observer"]');#R;#nc;_handleXEnableHeaderOffsetEvent(e){if(e?this.#e.setAttribute("x-enable-scrolltolower-event",""):this.#e.removeAttribute("x-enable-scrolltolower-event"),e){let e=this.#ny(),t=this.#e.getAttribute("scroll-orientation")||"vertical",n=this.#nr();setTimeout(()=>{"vertical"===t?(e.style.setProperty("top",`${String(n.scrollHeight-1)}px`,"important"),e.style.setProperty("bottom","unset","important")):(e.style.setProperty("left",`${String(n.scrollWidth-1)}px`,"important"),e.style.setProperty("right","unset","important"))},100)}}#nE=()=>{let e=document.createElement("slot");e.setAttribute("name",`${s7}`),this.#e.shadowRoot?.querySelector("[part=upper-threshold-observer]")?.insertAdjacentElement("afterend",e)};#nS=()=>{let e=parseFloat(this.#e.getAttribute("span-count")||this.#e.getAttribute("column-count")||"")||1,t="vertical"===(this.#e.getAttribute("scroll-orientation")||"vertical"),n=Array(e).fill(0);for(let i=0;i<this.#e.children.length;i++){let l=this.#e.children[i],a=getComputedStyle(l).getPropertyValue("--list-main-axis-gap"),s=getComputedStyle(l).getPropertyValue("--list-cross-axis-gap"),o=t?l.getBoundingClientRect().height+parseFloat(a):l.getBoundingClientRect().width+parseFloat(a);if(null!==l.getAttribute("full-span")){let i=n[0];for(let t=1;t<e;t++)n[t]>i&&(i=n[t]);for(let t=0;t<e;t++)n[t]=i+o;t?(l.setAttribute(`${oe}-left`,"0"),l.setAttribute(`${oe}-top`,`${i}px`)):(l.setAttribute(`${oe}-left`,`${i}px`),l.setAttribute(`${oe}-top`,"0"))}else{let i=0,a=n[0];for(let t=1;t<e;t++)n[t]<a&&(i=t,a=n[t]);let r=`calc(${i} * (100% - ${s} * (${e} - 1))/ ${e} + ${Math.max(0,i)} * ${s})`;t?(l.setAttribute(`${oe}-left`,r),l.setAttribute(`${oe}-top`,`${a}px`)):(l.setAttribute(`${oe}-left`,`${a}px`),l.setAttribute(`${oe}-top`,r)),n[i]+=o}}for(let e=0;e<this.#e.children.length;e++){let t=this.#e.children[e];t.style.setProperty("left",t.getAttribute(`${oe}-left`)),t.style.setProperty("top",t.getAttribute(`${oe}-top`)),t.setAttribute("slot",s7)}};constructor(e){this.#e=e}#nw=()=>{this.#R?.disconnect(),this.#R=new ResizeObserver(()=>{requestAnimationFrame(()=>{this.#nS()})}),Array.from(this.#e.children).forEach(e=>{this.#R?.observe(e)})};_handlerListType(e){if("waterfall"===e)this.#nE(),this.#R||this.#nw(),this.#nc||(this.#nc=new MutationObserver(e=>{let t=e?.[0];t?.type==="childList"&&this.#nw()}),this.#nc.observe(this.#e,{childList:!0}));else{this.#R?.disconnect(),this.#R=void 0,this.#nc?.disconnect(),this.#nc=void 0;for(let e=0;e<this.#e.children.length;e++)this.#e.children[e].removeAttribute("slot");this.#e.shadowRoot?.querySelector(`slot[name=${s7}]`)?.remove()}}});af=[(0,a2.uA)("x-list",[a8.O,s6,s9,ot],ss)],ay=[],aE=HTMLElement,class extends aE{static{ag=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(aE[Symbol.metadata]??null):void 0;(0,a4.G4)(null,av={value:ag},af,{kind:"class",name:ag.name,metadata:e},null,ay),ag=av.value,e&&Object.defineProperty(ag,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static notToFilterFalseAttributes=new Set(["enable-scroll"]);#nr=(0,a2.Ut)(()=>this.shadowRoot,"#content");#n_={rate:0,lastTimestamp:0,autoStop:!0,isScrolling:!1};#nx={};get scrollTop(){return this.#nr().scrollTop}set scrollTop(e){this.#nr().scrollTop=e}get scrollLeft(){return this.#nr().scrollTop}set scrollLeft(e){this.#nr().scrollLeft=e}get scrollHeight(){return this.#nr().scrollHeight}get scrollWidth(){return this.#nr().scrollWidth}get[a7.l](){return this.#nr()}get __scrollTop(){return super.scrollTop}get __scrollLeft(){return super.scrollTop}scrollToPosition(e){let t;if("string"==typeof e.offset){let n=parseFloat(e.offset);t={left:n,top:n}}else"number"==typeof e.offset&&(t={left:e.offset,top:e.offset});if("number"==typeof e.position){if(0===e.position)this.#nr().scrollTop=0,this.#nr().scrollLeft=0;else if(e.position>0&&e.position<this.childElementCount){let n=this.children.item(e.position);n instanceof HTMLElement&&(t=t?{left:n.offsetLeft+t.left,top:n.offsetTop+t.top}:{left:n.offsetLeft,top:n.offsetTop})}}t&&this.#nr().scrollTo({...t,behavior:e.smooth?"smooth":"auto"})}#nC=e=>{if(!this.#n_.isScrolling)return;if(!this.#n_.lastTimestamp){this.#n_.lastTimestamp=e,requestAnimationFrame(this.#nC);return}let t=this.#nr(),n=(e-this.#n_.lastTimestamp)/1e3*this.#n_.rate;t.scrollBy({left:n,top:n,behavior:"auto"}),this.#n_.lastTimestamp=e;let i="vertical"===(this.getAttribute("scroll-orientation")||"vertical");(i?t.scrollTop+t.clientHeight>=t.scrollHeight:t.scrollLeft+t.clientWidth>=t.scrollWidth)&&this.#n_.autoStop?(i?t.scrollTop=t.scrollHeight-t.clientHeight:t.scrollLeft=t.scrollWidth-t.clientWidth,this.#n_.isScrolling=!1):requestAnimationFrame(this.#nC)};autoScroll(e){if(e.start){let t="number"==typeof e.rate?e.rate:parseFloat(e.rate);this.#n_={rate:t,lastTimestamp:0,isScrolling:!0,autoStop:!1!==e.autoStop};let n=this.#nr(),i="vertical"===(this.getAttribute("scroll-orientation")||"vertical")?n.clientHeight<=n.scrollHeight:n.clientWidth<=n.scrollWidth;this.#n_.lastTimestamp=0,i?setTimeout(()=>requestAnimationFrame(this.#nC),0):requestAnimationFrame(this.#nC)}else this.#n_.isScrolling=!1}getScrollContainerInfo(){return{scrollTop:this.scrollTop,scrollLeft:this.scrollLeft,scrollHeight:this.scrollHeight,scrollWidth:this.scrollWidth}}getVisibleCells=()=>{let e=Object.values(this.#nx),t=Array.from(this.children).filter(e=>"LIST-ITEM"===e.tagName);if(0===e.length){let n=this.#nr().getBoundingClientRect();e=t.filter(e=>{let t=e.getBoundingClientRect();return t.bottom>=n.top&&t.top<=n.bottom&&t.right>=n.left&&t.left<=n.right})}return e.map(e=>{let n=e.getBoundingClientRect();return{id:e.getAttribute("id"),itemKey:e.getAttribute("item-key"),bottom:n.bottom,top:n.top,left:n.left,right:n.right,index:t.indexOf(e)}})};#nT=()=>Object.values(this.#nx).map(e=>{let t=e.getBoundingClientRect();return{height:t.height,width:t.width,itemKey:e.getAttribute("item-key"),originX:t.x,originY:t.y}});#nk=e=>{if(!e.target||!(e.target instanceof HTMLElement))return;let t=e.skipped,n=e.target?.getAttribute("id")==="content"&&e.target?.getAttribute("part")==="content",i="LIST-ITEM"===e.target.tagName;if(n&&!t){let e=this.#nT();setTimeout(()=>{this.dispatchEvent(new CustomEvent("layoutcomplete",{...a5.$,detail:{visibleItemBeforeUpdate:e,visibleItemAfterUpdate:this.#nT()}}))},100);return}if(i){let n=e.target?.getAttribute("item-key");if(!n)return;t?this.#nx[n]&&delete this.#nx[n]:this.#nx[n]=e.target;return}};connectedCallback(){this.#nr().addEventListener("contentvisibilityautostatechange",this.#nk,{passive:!0})}static{(0,a4.zF)(ag,ay)}};let on=(a_=[],ax=[],aC=[],aT=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;aS=[(0,a2._y)("src",!0)],aw=[(0,a2._y)("html",!0)],(0,a4.G4)(null,null,aS,{kind:"field",name:"_handleSrc",static:!1,private:!1,access:{has:e=>"_handleSrc"in e,get:e=>e._handleSrc,set:(e,t)=>{e._handleSrc=t}},metadata:e},a_,ax),(0,a4.G4)(null,null,aw,{kind:"field",name:"_handleHtml",static:!1,private:!1,access:{has:e=>"_handleHtml"in e,get:e=>e._handleHtml,set:(e,t)=>{e._handleHtml=t}},metadata:e},aC,aT),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["src","html"];#e;#nO=(0,a2.Ut)(()=>this.#e.shadowRoot,"#webview");constructor(e){(0,a4.zF)(this,aT),this.#e=e}_handleSrc=(0,a4.zF)(this,a_,(0,a2.H$)(this.#nO,"src"));_handleHtml=((0,a4.zF)(this,ax),(0,a4.zF)(this,aC,(0,a2.H$)(this.#nO,"srcdoc")))});aL=[(0,a2.uA)("x-webview",[a8.O,on],su)],aA=[],aI=HTMLElement,class extends aI{static{aO=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(aI[Symbol.metadata]??null):void 0;(0,a4.G4)(null,ak={value:aO},aL,{kind:"class",name:aO.name,metadata:e},null,aA),aO=ak.value,e&&Object.defineProperty(aO,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a4.zF)(aO,aA)}#nO=(0,a2.Ut)(()=>this.shadowRoot,"#webview");#nL=()=>{this.dispatchEvent(new CustomEvent("load",{bubbles:!0,composed:!0,detail:{url:this.#nO().src}})),this.dispatchEvent(new CustomEvent("bindload",{bubbles:!0,composed:!0,detail:{url:this.#nO().src}}))};#nA=e=>{this.dispatchEvent(new CustomEvent("error",{bubbles:!0,composed:!0,detail:{errorMsg:e.message||"unknown error"}})),this.dispatchEvent(new CustomEvent("binderror",{bubbles:!0,composed:!0,detail:{errorMsg:e.message||"unknown error"}}))};#nI=e=>{e.source===this.#nO().contentWindow&&(this.dispatchEvent(new CustomEvent("message",{bubbles:!0,composed:!0,detail:{msg:e.data,data:e.data}})),this.dispatchEvent(new CustomEvent("bindmessage",{bubbles:!0,composed:!0,detail:{msg:e.data}})))};connectedCallback(){this.#nO().addEventListener("load",this.#nL),this.#nO().addEventListener("error",this.#nA),window.addEventListener("message",this.#nI)}disconnectedCallback(){this.#nO().removeEventListener("load",this.#nL),this.#nO().removeEventListener("error",this.#nA),window.removeEventListener("message",this.#nI)}get src(){return this.getAttribute("src")}set src(e){null===e?this.removeAttribute("src"):this.setAttribute("src",e)}get html(){return this.getAttribute("html")}set html(e){null===e?this.removeAttribute("html"):this.setAttribute("html",e)}reload(){this.#nO().src=this.#nO().src}};let oi=!1,ol=e=>e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;"),oa=e=>{if(!e)return e;if(e.includes("\x3c!--")||e.includes("<!")||e.includes("<?")||e.includes("<%"))return ol(e);let t=/<\s*\/?\s*([A-Za-z][\w-]*)\b[^>]*>/g,n=null,i=!1;for(;n=t.exec(e);){i=!0;let t=(n[1]??"").toLowerCase();if("span"!==t&&"p"!==t)return ol(e)}return i?e.replace(/<(span|p)\b([^>]*?)(\/?)>/gi,(e,t,n,i)=>{let l=String(t).toLowerCase(),a=String(n??"").replaceAll("&quot;",'"').replaceAll("&#34;",'"').replaceAll("&apos;","'").replaceAll("&#39;","'").replaceAll("&amp;","&").replaceAll("&lt;","<").replaceAll("&gt;",">"),s=/\bclass\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+))/i.exec(a),o=(s?.[1]??s?.[2]??s?.[3]??"").trim().split(/\s+/).filter(Boolean).filter(e=>/^[A-Za-z0-9_-]+$/.test(e)).join(" "),r=o?` class="${o.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#39;")}"`:"";return"/"===String(i??"")?`<${l}${r}></${l}>`:`<${l}${r}>`}):e.includes("<")?ol(e):e},os=e=>{for(let t of e)(t?.type==="html_inline"||t?.type==="html_block")&&(t.content=oa(String(t.content??""))),Array.isArray(t?.children)&&os(t.children)},oo=(e,t)=>{let n={},i=e.parse(t,n);return os(i),e.renderer.render(i,e.options,n)},or=null,od=null,oh=()=>{if(or||o)return or;if(!i)return null;try{(or=new i({html:!0,linkify:!0})).enable(["table","strikethrough"])}catch(e){o=e}return or},oc=e=>{let t=od||(l?od=l(window):null);return t?t.sanitize(e,{USE_PROFILES:{html:!0}}):e},om=()=>({start:-1,end:-1,direction:"forward"}),ou=(e,t,n)=>!!n&&(n===e||n===t||e.contains(n)||!!t?.contains(n)),op=(e,t,n,i,l)=>{if(!l)return null;let a=((e,t)=>{let n=e.getComposedRanges;if(!t||"function"!=typeof n)return null;try{return n.call(e,{shadowRoots:[t]})[0]??null}catch{try{return n.call(e,t)[0]??null}catch{return null}}})(l,i)??(l.rangeCount>0?l.getRangeAt(0):null);if(!a)return null;if(!n.contains(a.startContainer)||!n.contains(a.endContainer)){if(!ou(t,i,a.startContainer)||!ou(t,i,a.endContainer)||!ou(t,i,l.anchorNode)||!ou(t,i,l.focusNode))return null;let s=l.toString();if(!s)return null;let o=n.textContent?.indexOf(s)??-1;return o<0?null:((e,t,n,i)=>{let l=e.createTreeWalker(t,NodeFilter.SHOW_TEXT),a=0,s=null,o=0,r=null,d=0,h=l.nextNode();for(;h;){let e=h.nodeValue?.length??0;if(!s&&a+e>=n&&(s=h,o=n-a),a+e>=i){r=h,d=i-a;break}a+=e,h=l.nextNode()}if(!s)return null;r||(r=s,d=o);let c=e.createRange();return c.setStart(s,Math.max(0,Math.min(o,s.length))),c.setEnd(r,Math.max(0,Math.min(d,r.length))),c})(e,n,o,o+s.length)}let s=e.createRange();return s.setStart(a.startContainer,a.startOffset),s.setEnd(a.endContainer,a.endOffset),s},ob=(e,t,n,i)=>{if(!n||!t.contains(n))return null;let l=e.createRange();l.selectNodeContents(t);try{l.setEnd(n,i)}catch{return null}return l.toString().length},ov=e=>e.replace(/src\s*=\s*"inlineview:\/\/([^"]+)"/g,(e,t)=>`data-inlineview="${t}"`),og=new Set(["font-weight","opacity","z-index","flex","flex-grow","flex-shrink","order"]),of={normalText:".markdown-body",link:".markdown-body a",inlineCode:".markdown-body code:not(pre code)",codeBlock:[".markdown-body pre",".markdown-body pre code"],h1:".markdown-body h1",h2:".markdown-body h2",h3:".markdown-body h3",h4:".markdown-body h4",h5:".markdown-body h5",h6:".markdown-body h6",quote:".markdown-body blockquote",orderedList:".markdown-body ol",unorderedList:".markdown-body ul",listItem:".markdown-body li",image:".markdown-body img",span:".markdown-body span",p:".markdown-body p",table:".markdown-body table",thead:".markdown-body thead",tbody:".markdown-body tbody",tr:".markdown-body tr",th:".markdown-body th",td:".markdown-body td",imageCaption:".markdown-body .md-image-caption"},oy=e=>e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`),oE=(e,t)=>{if(null==t)return null;if("number"==typeof t)return og.has(e)?`${t}`:`${t}px`;if("string"==typeof t){if(e.includes("color")){let e;return e=t.trim(),/^[0-9a-fA-F]{6,8}$/.test(e)?`#${e}`:t}return t}return null},oS=e=>{if(!e)return{};try{let t=JSON.parse(e);if(t&&"object"==typeof t)return t}catch{}return{}},ow=(aB=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;aF=[(0,a2._y)("content",!0)],aR=[(0,a2._y)("markdown-effect",!0)],aM=[(0,a2._y)("markdown-style",!0)],aP=[(0,a2._y)("content-id",!0)],az=[(0,a2._y)("text-selection",!0)],aN=[(0,a2._y)("animation-type",!0)],aH=[(0,a2._y)("animation-velocity",!0)],aD=[(0,a2._y)("animation-paused",!0)],aG=[(0,a2._y)("initial-animation-step",!0)],aj=[(0,a2._y)("content-complete",!0)],a$=[(0,a2._y)("typewriter-dynamic-height",!0)],aV=[(0,a2._y)("typewriter-height-transition-duration",!0)],aW=[(0,a2._y)("text-maxline",!0)],aU=[(0,a2._y)("content-range",!0)],(0,a4.G4)(this,null,aF,{kind:"method",name:"_handleContent",static:!1,private:!1,access:{has:e=>"_handleContent"in e,get:e=>e._handleContent},metadata:e},null,aB),(0,a4.G4)(this,null,aR,{kind:"method",name:"_handleMarkdownEffect",static:!1,private:!1,access:{has:e=>"_handleMarkdownEffect"in e,get:e=>e._handleMarkdownEffect},metadata:e},null,aB),(0,a4.G4)(this,null,aM,{kind:"method",name:"_handleMarkdownStyle",static:!1,private:!1,access:{has:e=>"_handleMarkdownStyle"in e,get:e=>e._handleMarkdownStyle},metadata:e},null,aB),(0,a4.G4)(this,null,aP,{kind:"method",name:"_handleContentId",static:!1,private:!1,access:{has:e=>"_handleContentId"in e,get:e=>e._handleContentId},metadata:e},null,aB),(0,a4.G4)(this,null,az,{kind:"method",name:"_handleTextSelection",static:!1,private:!1,access:{has:e=>"_handleTextSelection"in e,get:e=>e._handleTextSelection},metadata:e},null,aB),(0,a4.G4)(this,null,aN,{kind:"method",name:"_handleAnimationType",static:!1,private:!1,access:{has:e=>"_handleAnimationType"in e,get:e=>e._handleAnimationType},metadata:e},null,aB),(0,a4.G4)(this,null,aH,{kind:"method",name:"_handleAnimationVelocity",static:!1,private:!1,access:{has:e=>"_handleAnimationVelocity"in e,get:e=>e._handleAnimationVelocity},metadata:e},null,aB),(0,a4.G4)(this,null,aD,{kind:"method",name:"_handleAnimationPaused",static:!1,private:!1,access:{has:e=>"_handleAnimationPaused"in e,get:e=>e._handleAnimationPaused},metadata:e},null,aB),(0,a4.G4)(this,null,aG,{kind:"method",name:"_handleInitialAnimationStep",static:!1,private:!1,access:{has:e=>"_handleInitialAnimationStep"in e,get:e=>e._handleInitialAnimationStep},metadata:e},null,aB),(0,a4.G4)(this,null,aj,{kind:"method",name:"_handleContentComplete",static:!1,private:!1,access:{has:e=>"_handleContentComplete"in e,get:e=>e._handleContentComplete},metadata:e},null,aB),(0,a4.G4)(this,null,a$,{kind:"method",name:"_handleTypewriterDynamicHeight",static:!1,private:!1,access:{has:e=>"_handleTypewriterDynamicHeight"in e,get:e=>e._handleTypewriterDynamicHeight},metadata:e},null,aB),(0,a4.G4)(this,null,aV,{kind:"method",name:"_handleTypewriterHeightTransition",static:!1,private:!1,access:{has:e=>"_handleTypewriterHeightTransition"in e,get:e=>e._handleTypewriterHeightTransition},metadata:e},null,aB),(0,a4.G4)(this,null,aW,{kind:"method",name:"_handleTextMaxline",static:!1,private:!1,access:{has:e=>"_handleTextMaxline"in e,get:e=>e._handleTextMaxline},metadata:e},null,aB),(0,a4.G4)(this,null,aU,{kind:"method",name:"_handleContentRange",static:!1,private:!1,access:{has:e=>"_handleContentRange"in e,get:e=>e._handleContentRange},metadata:e},null,aB),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["content","markdown-style","content-id","text-selection","animation-type","animation-velocity","animation-paused","initial-animation-step","content-complete","typewriter-dynamic-height","typewriter-height-transition-duration","text-maxline","content-range","markdown-effect"];#e=(0,a4.zF)(this,aB);#nF=(0,a2.Ut)(()=>this.#e.shadowRoot,"#markdown-root");#nR=(0,a2.Ut)(()=>this.#e.shadowRoot,"#markdown-style");#nM=!1;#nP="";#nz="";#nN;#nH=!1;#nD=!1;#nG="";#nj;#n$=60;#nV="";#nW=!1;#nU;#nB;#nX=null;#nq;#nZ="none";#nY=40;#nJ;#nK=0;#nQ=!1;#n0=!1;#n1=!0;#n4=0;#n2=!1;#n8=0;#n3=null;#n6;#n5=0;#n9=!1;#n7;#ie=null;constructor(e){this.#e=e}connectedCallback(){this.#it()}dispose(){this.#ii(),this.#il(),clearTimeout(this.#nU),this.#nU=void 0,this.#nH&&(this.#nF().removeEventListener("click",this.#ia),this.#nH=!1),this.#nD&&(document.removeEventListener("selectionchange",this.#is),document.removeEventListener("mouseup",this.#io),document.removeEventListener("touchend",this.#io),document.removeEventListener("keyup",this.#io),this.#nD=!1)}#it(){this.#nH||(this.#nF().addEventListener("click",this.#ia),this.#nH=!0,this.#nD||(document.addEventListener("selectionchange",this.#is),document.addEventListener("mouseup",this.#io),document.addEventListener("touchend",this.#io),document.addEventListener("keyup",this.#io),this.#nD=!0))}#ia=e=>{let t=e.target;if(!t)return;let n=this.#nF(),i=t.closest("a");if(i&&n.contains(i)){e.preventDefault(),this.#e.dispatchEvent(new CustomEvent("bindlink",{detail:{url:i.getAttribute("href")??"",content:i.textContent??"",contentId:this.#nN},bubbles:!0,composed:!0}));return}let l=t.closest("img");l&&n.contains(l)&&this.#e.dispatchEvent(new CustomEvent("bindimageTap",{detail:{url:l.getAttribute("src")??"",contentId:this.#nN},bubbles:!0,composed:!0}))};#ir(){if(this.#nW)try{let e=this.#nF(),t=((e,t)=>{let n=e.ownerDocument,i=e.shadowRoot,l=[i?.getSelection?.()??null,n.getSelection()].filter((e,t,n)=>!!e&&n.indexOf(e)===t),a=null,s=null;for(let o of l){let l=op(n,e,t,i,o);if(l&&!l.collapsed){a=l,s=o;break}}if(!a||!s)return om();let o=ob(n,t,a.startContainer,a.startOffset),r=ob(n,t,a.endContainer,a.endOffset);if(null===o||null===r||o===r)return om();let d=ob(n,t,s.anchorNode,s.anchorOffset),h=ob(n,t,s.focusNode,s.focusOffset);return{start:Math.min(o,r),end:Math.max(o,r),direction:null!==d&&null!==h&&d>h?"backward":"forward"}})(this.#e,e),n=`${t.start}:${t.end}:${t.direction}`;if(n===this.#nB)return;this.#nB=n,this.#e.dispatchEvent(new CustomEvent("bindselectionchange",{detail:t,bubbles:!0,composed:!0}))}catch{}}#id=()=>{clearTimeout(this.#nU),this.#nU=setTimeout(()=>{this.#nU=void 0,this.#ir()},0)};#is=()=>{this.#ir(),this.#id()};#io=()=>{this.#ir(),this.#id()};#ih(){if(!this.#nM){if(this.#nM=!0,!oi&&!s)return void(oi?Promise.resolve():a||(a=n.e("166").then(n.bind(n,5657)).then(e=>{i=e.MarkdownIt,l=e.createDOMPurify,oi=!0}).catch(e=>{s=e}))).then(()=>{this.#nM=!1,this.#ic()});(0,a2.JS)(()=>{this.#nM=!1,this.#ic()})}}#ic(){let e=this.#nF();if(!this.#nP){this.#im(),e.innerHTML="",this.#nz="",this.#nG="",this.#ii();return}if("typewriter"===this.#nZ)return void this.#iu(e);let t=oh();if(!t){let t=this.#n7?this.#nP.slice(this.#n7[0],this.#n7[1]):this.#nP;e.textContent=t,this.#nz=t,this.#nG="",this.#ii();return}if(this.#ip())return void this.#ib(e);let n=this.#n7?this.#nP.slice(this.#n7[0],this.#n7[1]):this.#nP;e.innerHTML=oc(ov(oo(t,n))),this.#iv(e),this.#nz=n,this.#nG="",this.#ii(),this.#ig(),this.#iy(e)}#ip(){return!!this.#nz&&!!this.#nP.startsWith(this.#nz)&&this.#nP.length!==this.#nz.length}#ib(e){let t=this.#nP.slice(this.#nz.length);if(!t)return;let n=t.lastIndexOf("\n");if(-1===n){this.#nG=t,this.#iE();return}let i=t.slice(0,n+1);if(i){let t=oh();if(!t)return;let n=oo(t,i);this.#iS(e,n),this.#nz+=i}this.#nG=t.slice(n+1),this.#nG?this.#iE():this.#ii()}#iE(){this.#ii(),this.#nj=setTimeout(()=>{this.#nj=void 0,this.#iw()},this.#n$)}#ii(){this.#nj&&(clearTimeout(this.#nj),this.#nj=void 0)}#im(){this.#il(),this.#nQ=!1,this.#nK=0,this.#n4=0,this.#i_()}#iw(){if(!this.#nG||!this.#nP.startsWith(this.#nz))return;let e=this.#nz.length+this.#nG.length;if(this.#nP.length!==e)return;let t=this.#nF(),n=oh();if(!n)return;let i=oo(n,this.#nG);this.#iS(t,i),this.#nz+=this.#nG,this.#nG="",this.#ig(),this.#iy(this.#nF())}#iS(e,t){let n=document.createElement("template");n.innerHTML=oc(ov(t)),e.append(n.content),this.#iy(e),this.#iv(e)}#ix(e){if(!this.#ie||"text-mask"!==this.#ie.type||!1!==this.#n1&&this.#nK>=this.#n4)return;let{color:t,rangeStart:n,rangeEnd:i}=this.#ie;if(!t||"number"!=typeof n)return;e.querySelectorAll(".md-text-mask-effect").forEach(e=>{let t=e.querySelector(".md-text-mask-effect-content"),n=e.parentNode;if(t&&n){for(;t.firstChild;)n.insertBefore(t.firstChild,e);n.removeChild(e)}});let l=document.createTreeWalker(e,NodeFilter.SHOW_TEXT),a=[];for(;l.nextNode();){let t=l.currentNode,n=t.parentElement;n===e&&(t.nodeValue?.trim()??"")===""||n&&(n.closest(".md-typewriter-cursor")||n.closest(".md-truncation")||n.closest(".md-text-mask-effect-overlay"))||a.push(t)}let s=a.reduce((e,t)=>e+(t.nodeValue?.length??0),0),o=n<0?s+n:n,r=Math.max(0,Math.min(s,o)),d=Math.max(r,Math.min(s,("number"==typeof i?i<0?s+i:i:o)+1));if(d<=r)return;let h=0,c=[];if(a.forEach(e=>{let t=e.nodeValue?.length??0,n=h,i=h+t,l=Math.max(r,n)-n,a=Math.min(d,i)-n;l<a&&c.push({node:e,startOffset:l,endOffset:a}),h=i}),0===c.length)return;let m=[];for(let{node:e,startOffset:n,endOffset:i}of c.reverse()){let l=e;n>0&&(l=e.splitText(n));let a=i-n;a<(l.nodeValue?.length??0)&&l.splitText(a);let s=l.nodeValue??"",o=document.createElement("span");o.className="md-text-mask-effect";let r=document.createElement("span");r.className="md-text-mask-effect-content";let d=document.createElement("span");d.className="md-text-mask-effect-overlay",d.setAttribute("aria-hidden","true"),d.textContent=s,d.style.background=t;let h=l.parentNode;h&&(h.insertBefore(o,l),r.appendChild(l),o.append(r,d),m.unshift({content:r,overlay:d}))}if(0===m.length)return;let u=m.map(({content:e})=>e.getBoundingClientRect().width),p=u.reduce((e,t)=>e+t,0);if(p<=0)return;let b=0;m.forEach(({overlay:e},t)=>{e.style.backgroundRepeat="no-repeat",e.style.backgroundSize=`${p}px 100%`,e.style.backgroundPosition=`${-b}px 0`,b+=u[t]??0})}#ig(){this.#e.dispatchEvent(new CustomEvent("bindparseEnd",{detail:{id:this.#nN},bubbles:!0,composed:!0}))}#iy(e){if(this.#ix(e),this.#n5>0?queueMicrotask(()=>{try{e.scrollHeight>e.clientHeight+1&&!this.#n9&&(this.#n9=!0,this.#e.dispatchEvent(new CustomEvent("bindoverflow",{detail:{type:"ellipsis"},bubbles:!0,composed:!0})))}catch{}}):this.#n9=!1,"typewriter"===this.#nZ&&this.#n2){let t=this.#n8;t>0&&(e.style.transition=`height ${t}s ease`)}else e.style.transition="";this.#n5>0&&this.#iC(e)||this.#iT()}#iu(e){let[t,n]=this.#n7?this.#n7:[0,this.#nP.length];this.#n4=Math.max(0,n-t),!this.#nQ&&(this.#nQ=!0,this.#e.dispatchEvent(new CustomEvent("binddrawStart",{bubbles:!0,composed:!0})),this.#n0||this.#ik());let i=this.#nP.slice(t,t+this.#nK),l=oh();l?e.innerHTML=oc(ov(oo(l,i))):e.textContent=i,this.#iO(e),this.#iy(e),this.#nK>=this.#n4&&(this.#il(),!1!==this.#n1&&this.#e.dispatchEvent(new CustomEvent("binddrawEnd",{bubbles:!0,composed:!0})))}#ik(){this.#il();let e=Math.max(10,Math.floor(1e3/Math.max(1,this.#nY)));this.#nJ=setInterval(()=>{if(this.#nK<this.#n4){this.#nK+=1,this.#e.dispatchEvent(new CustomEvent("bindanimationStep",{detail:{animationStep:this.#nK,maxAnimationStep:this.#n4},bubbles:!0,composed:!0}));let e=this.#nF();this.#iu(e)}else this.#il()},e)}#il(){this.#nJ&&(clearInterval(this.#nJ),this.#nJ=void 0)}#iL(e){let t=oS(e);this.#nX=t.truncation??null,this.#n3=t.typewriterCursor??null;let{truncation:n,typewriterCursor:i,...l}=t;this.#nV=(e=>{let t=[];for(let[n,i]of Object.entries(e)){if(!i||"object"!=typeof i)continue;let e=[];if(n.startsWith(".")||n.startsWith("#"))e=[`.markdown-body ${n}`];else{if(!of[n])continue;e=Array.isArray(of[n])?of[n]:[of[n]]}let l=Object.entries(i).map(([e,t])=>{let n=oy(e),i=oE(n,t);return i?`${n}: ${i};`:null}).filter(Boolean).join("");if(l)for(let n of e)t.push(`${n} {${l}}`)}return t.join("\n")})(l),this.#iA()}#iA(){let e=this.#nR(),t=this.#nV||"";this.#nW&&(t+="\n.markdown-body { user-select: text; }"),this.#n5>0&&(t+=`
396
+ .markdown-body { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: ${this.#n5}; overflow: hidden; }`),e.textContent=t}_handleContent(e){let t=e??"",n=t!==this.#nP;this.#nP=t,n&&"typewriter"===this.#nZ&&this.#im(),this.#ih()}_handleMarkdownEffect(e){try{this.#ie=e?JSON.parse(e):null}catch{this.#ie=null}this.#ih()}_handleMarkdownStyle(e){this.#iL(e)}_handleContentId(e){this.#nN=e??void 0}_handleTextSelection(e){this.#nW=!!(e&&"false"!==e),this.#nW||(clearTimeout(this.#nU),this.#nU=void 0,this.#nB=void 0),this.#iA()}_handleAnimationType(e){let t=(e??"none").toLowerCase();this.#nZ="typewriter"===t?"typewriter":"none",this.#nQ=!1,this.#il(),this.#ih()}_handleAnimationVelocity(e){let t=Number(e);!Number.isNaN(t)&&t>0&&(this.#nY=t),"typewriter"===this.#nZ&&!this.#n0&&this.#nJ&&this.#ik()}_handleAnimationPaused(e){(this.#n0=!!(e&&"false"!==e),this.#n0)?this.#il():"typewriter"===this.#nZ&&this.#nQ&&this.#nK<this.#n4&&this.#ik()}_handleInitialAnimationStep(e){let t=Number(e);this.#nK=Number.isNaN(t)?0:Math.max(0,Math.floor(t))}_handleContentComplete(e){this.#n1="false"!==e}_handleTypewriterDynamicHeight(e){this.#n2=!!(e&&"false"!==e)}_handleTypewriterHeightTransition(e){let t=Number(e);this.#n8=Number.isNaN(t)?0:Math.max(0,t)}_handleTextMaxline(e){let t=Number(e);this.#n5=Number.isNaN(t)?0:Math.max(0,Math.floor(t)),this.#iA()}_handleContentRange(e){if(e)try{let t=JSON.parse(e);if(Array.isArray(t)&&2===t.length){let e=Number(t[0]),n=Number(t[1]);Number.isNaN(e)||Number.isNaN(n)||!(n>=e)||(this.#n7=[Math.max(0,e),Math.max(0,n)])}}catch{let t=e.split(",");if(2===t.length){let e=Number(t[0]),n=Number(t[1]);Number.isNaN(e)||Number.isNaN(n)||!(n>=e)||(this.#n7=[Math.max(0,e),Math.max(0,n)])}}else this.#n7=void 0;this.#ih()}#iv(e){try{for(let t of Array.from(e.querySelectorAll("img"))){let e=t.getAttribute("data-inlineview");if(e){let n=document.createElement("span");n.className="md-inline-view";let i=document.createElement("slot");i.name=e,n.appendChild(i),t.replaceWith(n)}}}catch{}}#iC(e){if(!(e.scrollHeight>e.clientHeight+1))return!1;if(!this.#nq){let t=document.createElement("span");t.className="md-truncation",this.#nq=t,e.appendChild(t)}let t=this.#nX||{},n=this.#nq;if(n.textContent="",n.innerHTML="","view"===t.truncationType&&t.content){let e=this.#e.querySelector(`#${CSS.escape(String(t.content))}`);e?n.appendChild(e):n.textContent="…"}else t.content?n.textContent=String(t.content):n.textContent="…";return!0}#iT(){this.#nq&&this.#nq.parentNode&&this.#nq.parentNode.removeChild(this.#nq),this.#nq=void 0}#iO(e){if(!1!==this.#n1&&this.#nK>=this.#n4)return void this.#i_();let t=this.#n3||{},n=t.customCursor;if("none"===n)return void this.#i_();if(!this.#n6){let i=document.createElement("span");if(i.className="md-typewriter-cursor",this.#n6=i,t.verticalAlign&&(i.style.verticalAlign=t.verticalAlign),n){let t=this.#e.querySelector(`#${CSS.escape(n)}`)||e.querySelector(`#${CSS.escape(n)}`);t?i.appendChild(t):i.textContent="…"}else i.textContent="…"}let i=e;for(;;){let e=i.lastChild;for(;e;)if(e.nodeType!==Node.TEXT_NODE||e.textContent&&""!==e.textContent.trim())break;else e=e.previousSibling;if(e&&e.nodeType===Node.ELEMENT_NODE&&!["IMG","BR","HR","INPUT","TABLE","PRE","CODE"].includes(e.tagName))i=e;else break}i.appendChild(this.#n6)}#i_(){this.#n6&&this.#n6.parentNode&&this.#n6.parentNode.removeChild(this.#n6),this.#n6=void 0}}),o_=(e,t,n)=>{let i=0,l=Math.max(0,Math.min(n,e.length));for(let n=0;n<l&&!(i>=t.length);n+=1)e[n]===t[i]&&(i+=1);return i},ox=(e,t,n)=>!!n&&(n===e||n===t||e.contains(n)||!!t?.contains(n)),oC=(e,t,n)=>{if(!n)return null;let i=e.shadowRoot,l=((e,t)=>{let n=e.getComposedRanges;if(!t||"function"!=typeof n)return null;try{return n.call(e,{shadowRoots:[t]})[0]??null}catch{try{return n.call(e,t)[0]??null}catch{return null}}})(n,i)??(n.rangeCount>0?n.getRangeAt(0):null);if(!l)return null;if(!t.contains(l.startContainer)||!t.contains(l.endContainer)){if(!ox(e,i,l.startContainer)||!ox(e,i,l.endContainer)||!ox(e,i,n.anchorNode)||!ox(e,i,n.focusNode))return null;let a=n.toString();if(!a)return null;let s=t.textContent?.indexOf(a)??-1;return s<0?null:((e,t,n,i)=>{let l=e.createTreeWalker(t,NodeFilter.SHOW_TEXT),a=0,s=null,o=0,r=null,d=0,h=l.nextNode();for(;h;){let e=h.nodeValue?.length??0;if(!s&&a+e>=n&&(s=h,o=n-a),a+e>=i){r=h,d=i-a;break}a+=e,h=l.nextNode()}if(!s)return null;r||(r=s,d=o);let c=e.createRange();return c.setStart(s,Math.max(0,Math.min(o,s.length))),c.setEnd(r,Math.max(0,Math.min(d,r.length))),c})(e.ownerDocument,t,s,s+a.length)}let a=e.ownerDocument.createRange();return a.setStart(l.startContainer,l.startOffset),a.setEnd(l.endContainer,l.endOffset),a},oT=e=>{let t=e.shadowRoot;return[t&&"function"==typeof t.getSelection?t.getSelection():null,e.ownerDocument.getSelection()].filter((e,t,n)=>!!e&&n.indexOf(e)===t)},ok=(e,t)=>{for(let n of oT(e)){let i=oC(e,t,n);if(i)return{selection:n,range:i}}return null};aZ=[(0,a2.uA)("x-markdown",[a8.O,ow],sh)],aY=[],aJ=HTMLElement,class extends aJ{static{aq=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(aJ[Symbol.metadata]??null):void 0;(0,a4.G4)(null,aX={value:aq},aZ,{kind:"class",name:aq.name,metadata:e},null,aY),aq=aX.value,e&&Object.defineProperty(aq,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static notToFilterFalseAttributes=new Set(["content-complete"]);#iI(){return oS(this.getAttribute("markdown-style"))}#iF(e){let t=null==e?null:"string"==typeof e?e:JSON.stringify(e);null===t?this.removeAttribute("markdown-style"):this.setAttribute("markdown-style",t)}get markdownStyle(){return this.#iI()}set markdownStyle(e){this.#iF(e)}get"markdown-style"(){return this.#iI()}set"markdown-style"(e){this.#iF(e)}getImages(){let e=this.shadowRoot?.querySelector("#markdown-root");return e?Array.from(e.querySelectorAll("img")).map(e=>e.getAttribute("src")||"").filter(e=>!!e):[]}getContent(e){let t=this.getAttribute("content")??"",n=Math.max(0,e?.start??0),i=e?.end??t.length-1,l=Math.min(t.length,i+1);return{content:l>=n?t.slice(n,l):""}}pauseAnimation(){this.setAttribute("animation-paused","true")}resumeAnimation(e){e?.animationStep!==void 0&&this.setAttribute("initial-animation-step",String(e.animationStep)),"typewriter"!==this.getAttribute("animation-type")&&this.setAttribute("animation-type","typewriter");let t=this.getAttribute("animation-velocity");(!t||0>=Number(t))&&this.setAttribute("animation-velocity","40"),this.removeAttribute("animation-paused")}getSelectedText(){let e=this.shadowRoot?.querySelector("#markdown-root");if(!e)return"";let t=ok(this,e);return t?.range.toString()??""}getTextBoundingRect(e){let t=this.shadowRoot?.querySelector("#markdown-root");if(!t)return null;let n=this.ownerDocument;if(e?.start!==void 0||e?.end!==void 0){var i,l;let a,s=Math.max(0,e?.start??0),o=Math.max(s,e?.end??s),r=e?.indexType==="source"?(i=this.getAttribute("content")??"",l=t.textContent??"",{start:a=o_(i,l,s),end:Math.max(a,o_(i,l,o))}):{start:s,end:o};if(!r)return null;let d=((e,i)=>{let l=n.createTreeWalker(t,NodeFilter.SHOW_TEXT),a=0,s=null,o=0,r=null,d=0,h=l.nextNode();for(;h;){let t=h.nodeValue?.length??0;if(!s&&a+t>=e&&(s=h,o=e-a),a+t>=i){r=h,d=i-a;break}a+=t,h=l.nextNode()}if(!s)return null;r||(r=s,d=o);let c=n.createRange();return c.setStart(s,Math.max(0,Math.min(o,s.length))),c.setEnd(r,Math.max(0,Math.min(d,r.length))),c})(r.start,r.end);return d?{boundingRect:d.getBoundingClientRect()}:null}let a=ok(this,t);return a?{boundingRect:a.range.getBoundingClientRect()}:null}setTextSelection(e){let t=this.ownerDocument,n=(e,n)=>{if(t.caretRangeFromPoint)return t.caretRangeFromPoint(e,n);if(t.caretPositionFromPoint){let i=t.caretPositionFromPoint(e,n);if(!i)return null;let l=this.ownerDocument.createRange();return l.setStart(i.offsetNode,i.offset),l.collapse(!0),l}return null},i=n(e.startX,e.startY),l=n(e.endX,e.endY);if(i&&l){let e=oT(this)[0]??null;if(!e)return;e.removeAllRanges();let t=this.ownerDocument.createRange();t.setStart(i.startContainer,i.startOffset),t.setEnd(l.startContainer,l.startOffset),e.addRange(t)}}getParseResult(e){let t=this.shadowRoot?.querySelector("#markdown-root");if(!t)return{};let n=t.textContent||"",i={},l=this.ownerDocument,a=e=>{let i=l.createTreeWalker(t,NodeFilter.SHOW_TEXT),a=0,s=-1,o=-1,r=i.nextNode();for(;r;){let t=(r.nodeValue||"").length;(r===e||e.contains(r))&&(s<0&&(s=a),o=a+t),a+=t,r=i.nextNode()}return{start:Math.max(0,Math.min(s,n.length)),end:Math.max(0,Math.min(o,n.length))}};for(let n of e.tags){let e=Array.from(t.querySelectorAll(n));i[n]=e.map(e=>a(e))}return i}static{(0,a4.zF)(aq,aY)}}}}]);