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

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.
@@ -392,5 +392,5 @@
392
392
  border: none;
393
393
  }
394
394
  </style>
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+=`
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,2644)).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))),this.#iv(e)):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
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)}}}}]);