@lynx-js/web-core-wasm-canary 0.0.2-canary-20260129-92881e7c → 0.0.2-canary-20260129-d02a6062
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -3
- package/binary/client/client.d.ts +99 -99
- package/binary/client/client.js +381 -391
- package/binary/client/client_bg.wasm +0 -0
- package/binary/client/client_bg.wasm.d.ts +41 -40
- package/binary/client/client_debug.d.ts +102 -102
- package/binary/client/client_debug.js +381 -391
- package/binary/client/client_debug_bg.wasm +0 -0
- package/binary/client/client_debug_bg.wasm.d.ts +44 -43
- package/binary/encode/encode.d.ts +10 -59
- package/binary/encode/encode.js +151 -330
- package/binary/encode/encode_bg.wasm +0 -0
- package/binary/encode/encode_bg.wasm.d.ts +4 -24
- package/binary/encode/encode_debug.d.ts +10 -59
- package/binary/encode/encode_debug.js +82 -333
- package/binary/encode/encode_debug_bg.wasm +0 -0
- package/binary/encode/encode_debug_bg.wasm.d.ts +5 -25
- package/dist/client/decodeWorker/cssLoader.d.ts +1 -1
- package/dist/client/decodeWorker/cssLoader.js +2 -3
- package/dist/client/decodeWorker/decode.worker.js +4 -3
- package/dist/client/mainthread/LynxViewInstance.d.ts +1 -5
- package/dist/client/mainthread/LynxViewInstance.js +8 -16
- package/dist/client/mainthread/TemplateManager.d.ts +0 -1
- package/dist/client/mainthread/TemplateManager.js +5 -29
- package/dist/client/mainthread/elementAPIs/WASMJSBinding.d.ts +4 -10
- package/dist/client/mainthread/elementAPIs/WASMJSBinding.js +14 -19
- package/dist/client/mainthread/elementAPIs/createElementAPI.d.ts +1 -1
- package/dist/client/mainthread/elementAPIs/createElementAPI.js +60 -84
- package/dist/client/wasm.d.ts +1 -9
- package/dist/client/wasm.js +3 -17
- package/dist/client/webElementsDynamicLoader.d.ts +0 -7
- package/dist/client/webElementsDynamicLoader.js +3 -72
- package/dist/client_prod/static/js/async/web-core-main-chunk.js +1 -303
- package/dist/client_prod/static/js/async/web-core-template-loader-thread.js +4 -4
- package/dist/client_prod/static/js/async/web-elements.js +309 -0
- package/dist/client_prod/static/js/client.js +2 -2
- package/dist/client_prod/static/wasm/a156b496.module.wasm +0 -0
- package/dist/encode/webEncoder.js +1 -16
- package/dist/types/DecodedTemplate.d.ts +0 -3
- package/dist/types/IElementPAPI.d.ts +0 -2
- package/dist/types/IMtsBinding.d.ts +4 -1
- package/package.json +3 -4
- package/dist/client/mainthread/StyleManager.d.ts +0 -15
- package/dist/client/mainthread/StyleManager.js +0 -72
- package/dist/client_prod/static/js/async/web-elements-audio.js +0 -1
- package/dist/client_prod/static/js/async/web-elements-foldview.js +0 -1
- package/dist/client_prod/static/js/async/web-elements-input.js +0 -1
- package/dist/client_prod/static/js/async/web-elements-list.js +0 -1
- package/dist/client_prod/static/js/async/web-elements-overlay.js +0 -1
- package/dist/client_prod/static/js/async/web-elements-refrshview.js +0 -1
- package/dist/client_prod/static/js/async/web-elements-swiper.js +0 -1
- package/dist/client_prod/static/js/async/web-elements-textarea.js +0 -1
- package/dist/client_prod/static/js/async/web-elements-viewpager.js +0 -1
- package/dist/client_prod/static/wasm/aa6eb16a.module.wasm +0 -0
- package/dist/encode/encodeElementTemplate.d.ts +0 -2
- package/dist/encode/encodeElementTemplate.js +0 -52
- /package/dist/client_prod/static/css/async/{web-core-main-chunk.css → web-elements.css} +0 -0
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_lynx_js_web_core_wasm=globalThis.webpackChunk_lynx_js_web_core_wasm||[]).push([["724"],{4086(){var e,t,s,i,o,r,n,l,a,h,d,c,u,p,m,v,g,b,f,E,w,y,x,S,T,C,L,_,I,A,O,R,M,k,D,F,N,H,P,z,V,W,X,$,B,U,q,Y,j,K,G,J,Q,Z,ee,et,es,ei,eo,er,en,el,ea,eh,ed,ec,eu,ep,em,ev,eg,eb,ef,eE,ew,ey,ex,eS,eT,eC,eL,e_,eI,eA,eO,eR,eM,ek,eD,eF,eN,eH,eP,ez,eV,eW,eX,e$,eB,eU,eq,eY,ej,eK,eG,eJ,eQ,eZ,e0,e1,e2,e3,e4,e5,e8,e9,e6,e7,te,tt,ts,ti,to,tr,tn,tl,ta,th,td,tc,tu,tp,tm,tv,tg,tb,tf,tE,tw,ty,tx,tS,tT,tC,tL,t_,tI,tA,tO,tR,tM,tk,tD,tF,tN,tH,tP,tz,tV,tW,tX,t$,tB,tU,tq,tY,tj,tK,tG,tJ,tQ,tZ,t0,t1,t2,t3,t4,t5,t8,t9,t6,t7,se,st,ss,si,so,sr,sn,sl,sa,sh,sd,sc,su,sp,sm,sv,sg,sb,sf,sE,sw,sy,sx,sS,sT,sC,sL,s_,sI,sA,sO,sR,sM,sk,sD,sF,sN,sH,sP,sz,sV,sW,sX,s$,sB,sU,sq,sY,sj,sK,sG,sJ,sQ,sZ,s0,s1,s2,s3,s4,s5,s8,s9,s6,s7,ie,it,is,ii,io,ir,il,ia,ih,id,ic,iu,ip,im,iv,ig,ib,iE,iw,iy,ix,iS,iT,iC,iL,i_,iI,iA,iO,iR,iM,ik,iD,iF,iN,iH,iP,iz,iV,iW,iX,i$,iB,iU,iq,iY,ij,iK,iG,iJ,iQ,iZ;let i0,i1,i2,i3,i4,i5,i8,i9,i6,i7,oe,ot,os,oi,oo,or,on,ol,oa,oh,od,oc,ou,op,om,ov,og,ob,of,oE,ow,oy;function ox(e,t,s,i){function o(e,t){return function(s){(function(e,t){if(e.v)throw Error("attempted to call "+t+" after decoration was finished")})(t,"addInitializer"),n(s,"An initializer"),e.push(s)}}function r(e,t,s,i,r,n,l,a,h){switch(r){case 1:d="accessor";break;case 2:d="method";break;case 3:d="getter";break;case 4:d="setter";break;default:d="field"}var d,c,u,p={kind:d,name:l?"#"+t:t,static:n,private:l,metadata:a},m={v:!1};p.addInitializer=o(i,m),0===r?l?(c=s.get,u=s.set):(c=function(){return this[t]},u=function(e){this[t]=e}):2===r?c=function(){return s.value}:((1===r||3===r)&&(c=function(){return s.get.call(this)}),(1===r||4===r)&&(u=function(e){s.set.call(this,e)})),p.access=c&&u?{get:c,set:u}:c?{get:c}:{set:u};try{return e(h,p)}finally{m.v=!0}}function n(e,t){if("function"!=typeof e)throw TypeError(t+" must be a function")}function l(e,t){var s=typeof t;if(1===e){if("object"!==s||null===t)throw TypeError("accessor decorators must return an object with get, set, or init properties or void 0");void 0!==t.get&&n(t.get,"accessor.get"),void 0!==t.set&&n(t.set,"accessor.set"),void 0!==t.init&&n(t.init,"accessor.init")}else if("function"!==s)throw TypeError((0===e?"field":10===e?"class":"method")+" decorators must return a function or void 0")}function a(e,t){t&&e.push(function(e){for(var s=0;s<t.length;s++)t[s].call(e);return e})}function h(e,t){return Object.defineProperty(e,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:t})}return(ox=function(e,t,s,i){if(void 0!==i)var n=i[Symbol.metadata||Symbol.for("Symbol.metadata")];var d=Object.create(void 0===n?null:n),c=function(e,t,s){for(var i=[],o=new Map,n=new Map,h=0;h<t.length;h++){var d,c,u,p,m=t[h];if(Array.isArray(m)){var v=m[1],g=m[2],b=m.length>3,f=v>=5;if(f?(u=e,v-=5,p=c=c||[]):(u=e.prototype,p=d=d||[]),0!==v&&!b){var E=f?n:o,w=E.get(g)||0;if(!0===w||3===w&&4!==v||4===w&&3!==v)throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "+g);!w&&v>2?E.set(g,v):E.set(g,!0)}!function(e,t,s,i,o,n,a,h,d){var c,u,p,m,v,g,b=s[0];if(a?c=0===o||1===o?{get:s[3],set:s[4]}:3===o?{get:s[3]}:4===o?{set:s[3]}:{value:s[3]}:0!==o&&(c=Object.getOwnPropertyDescriptor(t,i)),1===o?p={get:c.get,set:c.set}:2===o?p=c.value:3===o?p=c.get:4===o&&(p=c.set),"function"==typeof b)void 0!==(m=r(b,i,c,h,o,n,a,d,p))&&(l(o,m),0===o?u=m:1===o?(u=m.init,p={get:v=m.get||p.get,set:m.set||p.set}):p=m);else for(var f=b.length-1;f>=0;f--)void 0!==(m=r(b[f],i,c,h,o,n,a,d,p))&&(l(o,m),0===o?g=m:1===o?(g=m.init,p={get:v=m.get||p.get,set:m.set||p.set}):p=m,void 0!==g&&(void 0===u?u=g:"function"==typeof u?u=[u,g]:u.push(g)));if(0===o||1===o){if(void 0===u)u=function(e,t){return t};else if("function"!=typeof u){var E=u;u=function(e,t){for(var s=t,i=0;i<E.length;i++)s=E[i].call(e,s);return s}}else{var w=u;u=function(e,t){return w.call(e,t)}}e.push(u)}0!==o&&(1===o?(c.get=p.get,c.set=p.set):2===o?c.value=p:3===o?c.get=p:4===o&&(c.set=p),a?1===o?(e.push(function(e,t){return p.get.call(e,t)}),e.push(function(e,t){return p.set.call(e,t)})):2===o?e.push(p):e.push(function(e,t){return p.call(e,t)}):Object.defineProperty(t,i,c))}(i,u,m,g,v,f,b,p,s)}}return a(i,d),a(i,c),i}(e,t,d);return s.length||h(e,d),{e:c,get c(){return function(e,t,s){if(t.length>0){for(var i=[],r=e,n=e.name,a=t.length-1;a>=0;a--){var d={v:!1};try{var c=t[a](r,{kind:"class",name:n,addInitializer:o(i,d),metadata:s})}finally{d.v=!0}void 0!==c&&(l(10,c),r=c)}return[h(r,s),function(){for(var e=0;e<i.length;e++)i[e].call(r)}]}}(e,s,d)}}})(e,t,s,i)}let oS=[];function oT(){let e=oS;for(let[t,s]of(oS=[],e))s?t.call(s):t()}function oC(e,t){0===oS.length&&queueMicrotask(oT),oS.push([e,t])}function oL(e,t,s,i){let o=!1;return function(r){if(r!==o){let n=e.call(this);r?(oC(()=>n.addEventListener(t,s,i)),o=!0):(oC(()=>n.removeEventListener(t,s)),o=!1)}}}function o_(e,t,s){return function(i){s&&(i=s(i));let o=e.call(this);o.getAttribute(t)!==i&&(null!==i?oC(()=>{o.setAttribute(t,i)}):oC(()=>{o.removeAttribute(t)}))}}function oI(e,t,s,i){return function(o){o?(s&&(o=s(o)),oC(()=>e.call(this).style.setProperty(t,o,i?"important":void 0))):oC(()=>e.call(this).style.removeProperty(t))}}function oA(e,t){let s,i;return()=>(i||(i=e()),i.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&s||(s=i.querySelector(t)),s)}function oO(e,t,s){let i,o=t.filter(e=>!!e);return(t,{addInitializer:r})=>{let n=new Set([...o.filter(e=>e.observedCSSProperties).map(e=>e.observedCSSProperties).reduce((e,t)=>e.concat(t),[])]);class l extends t{static registerPlugin(e){if(l.observedAttributes.push(...e.observedAttributes),e.observedCSSProperties)for(let t of e.observedCSSProperties)n.add(t);o.push(e)}static observedAttributes=[...t.observedAttributes??[],...o.map(e=>e.observedAttributes).reduce((e,t)=>e.concat(t),[]),"class"];#e=[];constructor(){if(super(),s&&!i&&((i=document.createElement("template")).innerHTML=s,document.body.appendChild(i)),i&&!this.shadowRoot){const e=this.attachShadow({mode:"open",delegatesFocus:!0}),t=i.content.cloneNode(!0);e.append(t)}this.#e=o.map(e=>new e(this)),this.#t()}#s=!1;#i=new Map;#o(){!this.#s&&n.size&&(this.#s=!0,oC(this.#r,this))}#r(){let e=getComputedStyle(this);for(let s of n){var t;let i=e.getPropertyValue(s),o=e.getPropertyPriority(s),r=(t=i.trim(),o?t+" !important":t);if(this.#i.get(s)!==r)for(let e of this.#e)e.cssPropertyChangedHandler?.[s]?.call(e,r,s)}this.#s=!1}setAttribute(e,s){"false"!==s.toString()||t.notToFilterFalseAttributes?.has(e)||e.startsWith("data-")?super.setAttribute(e,s):this.removeAttribute(e)}#t(){let e=this.attributes;for(let s=0,i;i=e.item(s);s++)"false"!==i.value||t.notToFilterFalseAttributes?.has(i.name)||i.name.startsWith("data-")||this.removeAttributeNode(i)}#n=!1;attributeChangedCallback(e,s,i){if(super.attributeChangedCallback&&super.attributeChangedCallback(e,s,i),t.notToFilterFalseAttributes?.has(e)||e.startsWith("data-")||("false"===s&&(s=null),"false"===i&&(i=null,this.removeAttribute(e))),s!==i){for(let t of(this.#n&&("class"===e||"style"===e)&&this.#o(),this.#e))if(t.attributeChangedHandler?.[e]){let{handler:o,noDomMeasure:r}=t.attributeChangedHandler[e];r?o.call(t,i,s,e):this.#n&&oC(()=>o.call(t,i,s,e))}}}#l(){this.getAttributeNames().forEach(e=>{for(let t of this.#e)if(t.attributeChangedHandler?.[e]){let{handler:s,noDomMeasure:i}=t.attributeChangedHandler[e];i||oC(()=>s.call(t,this.getAttribute(e),null,e))}})}connectedCallback(){super.connectedCallback?.(),this.#e.forEach(e=>{e.connectedCallback?.()}),this.#o(),oC(this.#l,this),this.#n=!0}disconnectedCallback(){super.disconnectedCallback?.(),this.#e.forEach(e=>{e.dispose?.()})}#a={};enableEvent(e){this.#a[e]??={count:0,listenerCount:new WeakMap,captureListenerCount:new WeakMap};let t=this.#a[e];if(0===t.count)for(let t of this.#e){let s=t.eventStatusChangedHandler?.[e];s&&s.call(t,!0,e)}t.count++}disableEvent(e){let t=this.#a[e];if(t&&t.count>0&&(t.count--,0===t.count))for(let t of this.#e){let s=t.eventStatusChangedHandler?.[e];s&&s.call(t,!1,e)}}addEventListener(e,t,s){super.addEventListener(e,t,s),this.enableEvent(e);let i=this.#a[e],o=("object"==typeof s?s.capture:s)?i.captureListenerCount:i.listenerCount,r=o.get(t)??0;o.set(t,r+1)}removeEventListener(e,t,s){super.removeEventListener(e,t,s);let i="object"==typeof s?s.capture:s,o=this.#a[e];if(o&&o.count>0){let s=i?o.captureListenerCount:o.listenerCount;1===s.get(t)&&(s.delete(t),this.disableEvent(e))}}}return r(()=>{customElements.define(e,l)}),l}}function oR(e,t){return function(s,...i){return function(o,r){if("method"===r.kind)r.addInitializer(function(){this[e]??={},this[e][s]=t(o,i)});else if("field"===r.kind)return function(o){return this[e]??={},this[e][s]=t(o,i),o};else throw Error(`[lynx-web-components] decorator type ${r.kind} is not supported`)}}}let oM=oR("attributeChangedHandler",(e,[t])=>({handler:e,noDomMeasure:t})),ok=oR("cssPropertyChangedHandler",e=>e),oD=oR("eventStatusChangedHandler",e=>e);e=oO("lynx-wrapper",[]);class oF extends(s=HTMLElement){static #h={c:[i0,t]}=ox(this,[],[e],s);static #d=t()}function oN(e){return e}let oH={bubbles:!1,composed:!1,cancelable:!0},oP=Symbol("layoutChangeTarget");i=oD("layoutchange");class oz{static #h={e:[o]}=ox(this,[[i,0,"__handleScrollUpperThresholdEventEnabled"]],[]);static observedAttributes=[];#c;constructor(e){this.#c=e}#u=!1;#p;__handleScrollUpperThresholdEventEnabled=o(this,e=>{e&&this.#c[oP]?!this.#p&&(this.#p=new ResizeObserver(([e])=>{if(e){let t=this.#c.id,{top:s,bottom:i,left:o,right:r,width:n,height:l}=e.target.getBoundingClientRect();this.#c.dispatchEvent(new CustomEvent("layoutchange",{detail:{width:n,height:l,left:o,right:r,top:s,bottom:i,id:t},...oH}))}}),this.#u||(this.#p.observe(this.#c[oP]),this.#u=!0)):(this.#p?.disconnect(),this.#p=void 0,this.#u=!1)});dispose(){this.#p?.disconnect(),this.#p=void 0,this.#u=!1}}r=oM("fading-edge-length",!0),n=ok("background"),l=ok("background-color");class oV{static #h={e:[a,h]}=ox(this,[[[n,l],2,"_backgroundColorToVariable"],[r,0,"_handleFadingEdgeLength"]],[]);#c;#m=(h(this),oA(()=>this.#c.shadowRoot,"#top-fade-mask"));#v=oA(()=>this.#c.shadowRoot,"#bot-fade-mask");static observedAttributes=["fading-edge-length"];static observedCSSProperties=["background","background-color"];constructor(e){this.#c=e}_handleFadingEdgeLength=a(this,oI(()=>this.#c,"--scroll-view-fading-edge-length",e=>`${parseFloat(e)}px`));_backgroundColorToVariable(e){this.#m().style.setProperty("--scroll-view-bg-color",e),this.#v().style.setProperty("--scroll-view-bg-color",e)}connectedCallback(){}dispose(){}}d=oM("scroll-top",!1),c=oM("scroll-left",!1),u=oM("initial-scroll-offset",!1),p=oM("scroll-to-index",!1),m=oM("initial-scroll-to-index",!1);class oW{static #h={e:[v]}=ox(this,[[[d,c,u],2,"_handleInitialScrollOffset"],[[p,m],2,"_handleInitialScrollIndex"]],[]);#c;static observedAttributes=["scroll-top","scroll-left","initial-scroll-offset","scroll-to-index","initial-scroll-to-index"];constructor(e){v(this),this.#c=e}_handleInitialScrollOffset(e,t,s){if(e){let t=parseFloat(e),i=this.#c.getAttribute("scroll-orientation"),o=this.#c.getAttribute("scroll-y"),r=this.#c.getAttribute("scroll-x"),n=("scroll-top"===s||"initial-scroll-offset"===s)&&(""===o||"true"===o||"vertical"===i||"both"===i),l=("scroll-left"===s||"initial-scroll-offset"===s)&&(""===r||"true"===r||"vertical"===i||"both"===i);requestAnimationFrame(()=>{n&&this.#c.scrollTo(0,t),l&&(this.#c.scrollLeft=t)})}}_handleInitialScrollIndex(e){if(e){let t=parseFloat(e),s=this.#c.children.item(t);if(s&&s instanceof HTMLElement){let e=null!==this.#c.getAttribute("scroll-x");requestAnimationFrame(()=>{e?this.#c.scrollLeft=s.offsetLeft:this.#c.scrollTop=s.offsetTop})}}}dispose(){}}function oX(e,t,s){let i;return o=>{null!==o?i||(i=new IntersectionObserver(s,{root:e()})).observe(t()):i&&(i.disconnect(),i=void 0)}}let o$="onscrollend"in document,oB=window.navigator.userAgent;oB.includes("Chrome"),/\b(iPad|iPhone|iPod|OS X)\b/.test(oB)&&!/Edge/.test(oB)&&/WebKit/.test(oB)&&window.MSStream;let oU=Symbol.for("lynx-scroll-container-dom");g=oD("scrolltoupper"),b=oD("scrolltolower"),f=oM("upper-threshold",!0),E=oM("lower-threshold",!0),w=oD("lynxscroll"),y=oD("lynxscrollend");class oq{static #h={e:[x,S,T,C,L,_]}=ox(this,[[g,0,"_handleScrollUpperThresholdEventEnabled"],[b,0,"_handleScrollLowerThresholdEventEnabled"],[f,0,"_updateUpperThreshold"],[E,0,"_updateLowerThreshold"],[w,0,"_handleScrollEventEnabled"],[y,0,"_handleScrollEndEventEnabled"]],[]);#c;#g;#b=0;#f=0;constructor(e){this.#c=e}#E=()=>this.#c;#w=oA(()=>this.#c.shadowRoot,"#upper-threshold-observer");#y=oA(()=>this.#c.shadowRoot,"#lower-threshold-observer");#x=e=>{let{isIntersecting:t,target:s}=e[0],i=s.id;t&&("upper-threshold-observer"===i?this.#c.dispatchEvent(new CustomEvent("scrolltoupper",{...oH,detail:this.#S()})):"lower-threshold-observer"===i&&this.#c.dispatchEvent(new CustomEvent("scrolltolower",{...oH,detail:this.#S()})))};static observedAttributes=["upper-threshold","lower-threshold"];_handleScrollUpperThresholdEventEnabled=x(this,e=>{e?this.#c.setAttribute("x-enable-scrolltoupper-event",""):this.#c.removeAttribute("x-enable-scrolltoupper-event"),this.#T(e)});#T=oX(this.#E,this.#w,this.#x);_handleScrollLowerThresholdEventEnabled=S(this,e=>{e?this.#c.setAttribute("x-enable-scrolltolower-event",""):this.#c.removeAttribute("x-enable-scrolltolower-event"),this.#C(e)});#C=oX(this.#E,this.#y,this.#x);_updateUpperThreshold=T(this,oI(this.#w,"flex-basis",e=>`${parseInt(e)}px`));_updateLowerThreshold=C(this,oI(this.#y,"flex-basis",e=>`${parseInt(e)}px`));#S(){let{scrollTop:e,scrollLeft:t,scrollHeight:s,scrollWidth:i}=this.#E();0===e&&(e-=this.#c.scrollHeight/2-this.#c.scrollTop),0===t&&(t-=this.#c.scrollWidth/2-this.#c.scrollLeft);let o={scrollTop:e,scrollLeft:t,scrollHeight:s,scrollWidth:i,isDragging:!1,deltaX:t-this.#b,deltaY:e-this.#f};return this.#b=t,this.#f=e,o}#L=()=>{this.#_&&!o$&&(clearTimeout(this.#g),this.#g=setTimeout(()=>{this.#I()},100)),this.#c.dispatchEvent(new CustomEvent("lynxscroll",{...oH,detail:this.#S()}))};#I=()=>{this.#c.dispatchEvent(new CustomEvent("lynxscrollend",{...oH,detail:this.#S()}))};#A=!1;_handleScrollEventEnabled=L(this,e=>{this.#A=e,this.#O()});#_=!1;_handleScrollEndEventEnabled=_(this,e=>{this.#_=e,this.#O()});#O(){this.#A||this.#_?(this.#E().addEventListener("scroll",this.#L),this.#E().addEventListener("scrollend",this.#I),this.#c.addEventListener("scroll",this.#L),this.#c.addEventListener("scrollend",this.#I),this.#b=0,this.#f=0):(this.#c.removeEventListener("scroll",this.#L),this.#c.removeEventListener("scrollend",this.#I))}connectedCallback(){}dispose(){}}class oY{static eventName="__scrollIntoView";static observedAttributes=[];#c;#R=e=>{e.stopPropagation();let t=e.composedPath().filter(e=>e instanceof HTMLElement),s=[],i=this.#c;for(let e of t){if(e===i)break;s.push(e)}let o=this.#c.getAttribute("scroll-orientation"),r=null!==this.#c.getAttribute("scroll-x")||"both"===o||"horizontal"===o,n=null!==this.#c.getAttribute("scroll-y")||"both"===o||"vertical"===o,l=0,a=0;for(let{offsetTop:e,offsetLeft:t}of s)r&&(a+=t),n&&(l+=e);if(r)switch(e.detail.inline){case"center":a+=(e.target.clientWidth-this.#c.clientWidth)/2;break;case"end":a+=e.target.clientWidth-this.#c.clientWidth}if(n)switch(e.detail.block){case"center":l+=(e.target.clientHeight-this.#c.clientHeight)/2;break;case"end":l+=e.target.clientHeight-this.#c.clientHeight}i.scrollTo({behavior:"smooth"===e.detail.behavior?"smooth":"instant",left:a,top:l})};constructor(e){this.#c=e,this.#c.addEventListener(oY.eventName,this.#R,{passive:!1})}dispose(){this.#c.removeEventListener(oY.eventName,this.#R)}}let oj=`<style>
|
|
2
|
+
.placeholder-dom {
|
|
3
|
+
display: none;
|
|
4
|
+
flex: 0 0 0;
|
|
5
|
+
align-self: stretch;
|
|
6
|
+
min-height: 0;
|
|
7
|
+
min-width: 0;
|
|
8
|
+
}
|
|
9
|
+
.mask {
|
|
10
|
+
z-index: 1;
|
|
11
|
+
position: sticky;
|
|
12
|
+
}
|
|
13
|
+
.observer-container {
|
|
14
|
+
flex-direction: inherit;
|
|
15
|
+
overflow: visible;
|
|
16
|
+
}
|
|
17
|
+
.observer {
|
|
18
|
+
display: flex;
|
|
19
|
+
}
|
|
20
|
+
::-webkit-scrollbar {
|
|
21
|
+
display: none;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@keyframes topFading {
|
|
25
|
+
0% {
|
|
26
|
+
box-shadow: transparent 0px 0px 0px 0px;
|
|
27
|
+
}
|
|
28
|
+
5% {
|
|
29
|
+
box-shadow: var(--scroll-view-bg-color) 0px 0px
|
|
30
|
+
var(--scroll-view-fading-edge-length)
|
|
31
|
+
var(--scroll-view-fading-edge-length);
|
|
32
|
+
}
|
|
33
|
+
100% {
|
|
34
|
+
box-shadow: var(--scroll-view-bg-color) 0px 0px
|
|
35
|
+
var(--scroll-view-fading-edge-length)
|
|
36
|
+
var(--scroll-view-fading-edge-length);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
@keyframes botFading {
|
|
40
|
+
0% {
|
|
41
|
+
box-shadow: var(--scroll-view-bg-color) 0px 0px
|
|
42
|
+
var(--scroll-view-fading-edge-length)
|
|
43
|
+
var(--scroll-view-fading-edge-length);
|
|
44
|
+
}
|
|
45
|
+
95% {
|
|
46
|
+
box-shadow: var(--scroll-view-bg-color) 0px 0px
|
|
47
|
+
var(--scroll-view-fading-edge-length)
|
|
48
|
+
var(--scroll-view-fading-edge-length);
|
|
49
|
+
}
|
|
50
|
+
100% {
|
|
51
|
+
box-shadow: transparent 0px 0px 0px 0px;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
</style>
|
|
55
|
+
<div
|
|
56
|
+
class="mask placeholder-dom"
|
|
57
|
+
id="top-fade-mask"
|
|
58
|
+
part="top-fade-mask"
|
|
59
|
+
></div>
|
|
60
|
+
<div
|
|
61
|
+
class="observer-container placeholder-dom"
|
|
62
|
+
part="upper-threshold-observer"
|
|
63
|
+
>
|
|
64
|
+
<div
|
|
65
|
+
class="observer placeholder-dom"
|
|
66
|
+
id="upper-threshold-observer"
|
|
67
|
+
></div>
|
|
68
|
+
</div>
|
|
69
|
+
<slot></slot>
|
|
70
|
+
<div
|
|
71
|
+
class="observer-container placeholder-dom"
|
|
72
|
+
part="lower-threshold-observer"
|
|
73
|
+
>
|
|
74
|
+
<div
|
|
75
|
+
class="observer placeholder-dom"
|
|
76
|
+
id="lower-threshold-observer"
|
|
77
|
+
></div>
|
|
78
|
+
</div>
|
|
79
|
+
<div
|
|
80
|
+
class="mask placeholder-dom"
|
|
81
|
+
id="bot-fade-mask"
|
|
82
|
+
part="bot-fade-mask"
|
|
83
|
+
></div>`,oK=/<\s*script/g,oG=e=>{let{src:t}=e;if(t&&oK.test(t))throw Error("detected <script, this is a potential XSS attack, please check your src");return`<img part="img" alt="" loading="lazy" id="img" ${t?`src="${t}"`:""}/> `},oJ=`<style>
|
|
84
|
+
#input:focus {
|
|
85
|
+
outline: none;
|
|
86
|
+
}
|
|
87
|
+
#form {
|
|
88
|
+
display: none;
|
|
89
|
+
}
|
|
90
|
+
</style>
|
|
91
|
+
<form id="form" part="form" method="dialog">
|
|
92
|
+
<input
|
|
93
|
+
id="input"
|
|
94
|
+
part="input"
|
|
95
|
+
step="any"
|
|
96
|
+
type="text"
|
|
97
|
+
inputmode="text"
|
|
98
|
+
spell-check="true"
|
|
99
|
+
/>
|
|
100
|
+
</form>`,oQ=`<style>
|
|
101
|
+
.placeholder-dom {
|
|
102
|
+
display: none;
|
|
103
|
+
flex: 0 0 0;
|
|
104
|
+
align-self: stretch;
|
|
105
|
+
min-height: 0;
|
|
106
|
+
min-width: 0;
|
|
107
|
+
}
|
|
108
|
+
.observer-container {
|
|
109
|
+
flex-direction: inherit;
|
|
110
|
+
overflow: visible;
|
|
111
|
+
}
|
|
112
|
+
.observer {
|
|
113
|
+
display: flex;
|
|
114
|
+
}
|
|
115
|
+
</style>
|
|
116
|
+
<div id="content" part="content">
|
|
117
|
+
<div
|
|
118
|
+
class="observer-container placeholder-dom"
|
|
119
|
+
part="upper-threshold-observer"
|
|
120
|
+
>
|
|
121
|
+
<div
|
|
122
|
+
class="observer placeholder-dom"
|
|
123
|
+
id="upper-threshold-observer"
|
|
124
|
+
></div>
|
|
125
|
+
</div>
|
|
126
|
+
<slot part="slot"></slot>
|
|
127
|
+
<div
|
|
128
|
+
class="observer-container placeholder-dom"
|
|
129
|
+
part="lower-threshold-observer"
|
|
130
|
+
>
|
|
131
|
+
<div
|
|
132
|
+
class="observer placeholder-dom"
|
|
133
|
+
id="lower-threshold-observer"
|
|
134
|
+
></div>
|
|
135
|
+
</div>
|
|
136
|
+
</div>`,oZ=`<style>
|
|
137
|
+
#dialog[open] {
|
|
138
|
+
top: 0;
|
|
139
|
+
left: 0;
|
|
140
|
+
right: 0;
|
|
141
|
+
bottom: 0;
|
|
142
|
+
position: fixed;
|
|
143
|
+
overscroll-behavior: contain;
|
|
144
|
+
scrollbar-width: none;
|
|
145
|
+
}
|
|
146
|
+
#dialog[open]::-webkit-scrollbar {
|
|
147
|
+
display: none;
|
|
148
|
+
}
|
|
149
|
+
#dialog::backdrop {
|
|
150
|
+
background-color: transparent;
|
|
151
|
+
}
|
|
152
|
+
.overlay-inner {
|
|
153
|
+
position: sticky;
|
|
154
|
+
top: 0;
|
|
155
|
+
width: 100%;
|
|
156
|
+
height: 100%;
|
|
157
|
+
pointer-events: none;
|
|
158
|
+
}
|
|
159
|
+
.overlay-inner > * {
|
|
160
|
+
pointer-events: auto;
|
|
161
|
+
}
|
|
162
|
+
.overlay-placeholder {
|
|
163
|
+
width: 100%;
|
|
164
|
+
height: 1px;
|
|
165
|
+
}
|
|
166
|
+
</style>
|
|
167
|
+
<dialog id="dialog" part="dialog">
|
|
168
|
+
<div class="overlay-inner">
|
|
169
|
+
<slot></slot>
|
|
170
|
+
</div>
|
|
171
|
+
<div class="overlay-placeholder"></div>
|
|
172
|
+
</dialog>`,o0=`<style>
|
|
173
|
+
.bounce-container {
|
|
174
|
+
overflow: scroll;
|
|
175
|
+
overscroll-behavior: contain;
|
|
176
|
+
scroll-snap-type: y mandatory;
|
|
177
|
+
scroll-behavior: smooth;
|
|
178
|
+
scrollbar-width: none;
|
|
179
|
+
}
|
|
180
|
+
.overflow-placeholder {
|
|
181
|
+
min-height: 30%;
|
|
182
|
+
min-width: 100%;
|
|
183
|
+
flex-shrink: 0;
|
|
184
|
+
scroll-snap-align: none;
|
|
185
|
+
}
|
|
186
|
+
.not-shrink {
|
|
187
|
+
height: 100%;
|
|
188
|
+
width: 100%;
|
|
189
|
+
min-height: 100%;
|
|
190
|
+
min-width: 100%;
|
|
191
|
+
flex-shrink: 0;
|
|
192
|
+
}
|
|
193
|
+
.vertical {
|
|
194
|
+
display: flex;
|
|
195
|
+
flex-direction: column;
|
|
196
|
+
}
|
|
197
|
+
#content {
|
|
198
|
+
scroll-snap-align: center;
|
|
199
|
+
}
|
|
200
|
+
</style>
|
|
201
|
+
<div id="container" part="container" class="bounce-container not-shrink vertical">
|
|
202
|
+
<div
|
|
203
|
+
id="placeholder-top"
|
|
204
|
+
class="overflow-placeholder bounce-item"
|
|
205
|
+
part="placeholder-top"
|
|
206
|
+
></div>
|
|
207
|
+
<slot name="header"></slot>
|
|
208
|
+
<div id="content" part="content" class="not-shrink vertical">
|
|
209
|
+
<slot part="slot"></slot>
|
|
210
|
+
</div>
|
|
211
|
+
<slot name="footer"></slot>
|
|
212
|
+
<div
|
|
213
|
+
id="placeholder-bot"
|
|
214
|
+
class="overflow-placeholder bounce-item"
|
|
215
|
+
part="placeholder-bot"
|
|
216
|
+
></div>
|
|
217
|
+
</div>`,o1=`<style>
|
|
218
|
+
#bounce-padding {
|
|
219
|
+
display: none;
|
|
220
|
+
flex: 0 0 0;
|
|
221
|
+
align-self: stretch;
|
|
222
|
+
scroll-snap-align: none;
|
|
223
|
+
flex-basis: 100%;
|
|
224
|
+
}
|
|
225
|
+
#content {
|
|
226
|
+
position: relative;
|
|
227
|
+
display: flex;
|
|
228
|
+
flex: 0 0 100%;
|
|
229
|
+
flex-direction: inherit;
|
|
230
|
+
flex-wrap: inherit;
|
|
231
|
+
align-self: stretch;
|
|
232
|
+
justify-content: inherit;
|
|
233
|
+
align-items: inherit;
|
|
234
|
+
overflow: inherit;
|
|
235
|
+
scrollbar-width: none;
|
|
236
|
+
scroll-snap-align: start;
|
|
237
|
+
scroll-snap-type: inherit;
|
|
238
|
+
}
|
|
239
|
+
div::-webkit-scrollbar {
|
|
240
|
+
display: none;
|
|
241
|
+
}
|
|
242
|
+
#indicator-container {
|
|
243
|
+
display: none;
|
|
244
|
+
}
|
|
245
|
+
#indicator-container > div {
|
|
246
|
+
animation-name: indicator-dot;
|
|
247
|
+
animation-duration: 100ms;
|
|
248
|
+
}
|
|
249
|
+
@keyframes indicator-dot {
|
|
250
|
+
30%,
|
|
251
|
+
70% {
|
|
252
|
+
background-color: var(--indicator-color);
|
|
253
|
+
}
|
|
254
|
+
31%,
|
|
255
|
+
69% {
|
|
256
|
+
background-color: var(--indicator-active-color);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
</style>
|
|
260
|
+
<style id="indicator-style"></style>
|
|
261
|
+
<div id="bounce-padding" part="bounce-padding"></div>
|
|
262
|
+
<div id="indicator-container" part="indicator-container"></div>
|
|
263
|
+
<div id="content" part="content">
|
|
264
|
+
<slot part="slot-start" name="circular-start" id="circular-start"></slot>
|
|
265
|
+
<slot part="slot"></slot>
|
|
266
|
+
<slot part="slot-end" name="circular-end" id="circular-end"></slot>
|
|
267
|
+
</div>`,o2=`<style>
|
|
268
|
+
#textarea:focus,
|
|
269
|
+
#textarea:focus-visible {
|
|
270
|
+
border: inherit;
|
|
271
|
+
outline: inherit;
|
|
272
|
+
}
|
|
273
|
+
</style>
|
|
274
|
+
<form id="form" part="form" method="dialog">
|
|
275
|
+
<textarea id="textarea" part="textarea"></textarea>
|
|
276
|
+
</form>`,o3=`<style>
|
|
277
|
+
#bounce-padding {
|
|
278
|
+
display: none;
|
|
279
|
+
flex: 0 0 0;
|
|
280
|
+
align-self: stretch;
|
|
281
|
+
scroll-snap-align: none;
|
|
282
|
+
flex-basis: 100%;
|
|
283
|
+
}
|
|
284
|
+
#content {
|
|
285
|
+
flex: 0 0 100%;
|
|
286
|
+
flex-direction: row;
|
|
287
|
+
align-self: stretch;
|
|
288
|
+
display: inherit;
|
|
289
|
+
justify-content: inherit;
|
|
290
|
+
align-items: inherit;
|
|
291
|
+
overflow: inherit;
|
|
292
|
+
scrollbar-width: none;
|
|
293
|
+
scroll-snap-type: inherit;
|
|
294
|
+
}
|
|
295
|
+
#content::-webkit-scrollbar {
|
|
296
|
+
display: none;
|
|
297
|
+
}
|
|
298
|
+
</style>
|
|
299
|
+
<div id="bounce-padding" part="bounce-padding"></div>
|
|
300
|
+
<div id="content" part="content">
|
|
301
|
+
<slot></slot>
|
|
302
|
+
</div>`,o4=`<style>
|
|
303
|
+
iframe {
|
|
304
|
+
width: 100%;
|
|
305
|
+
height: 100%;
|
|
306
|
+
border: none;
|
|
307
|
+
}
|
|
308
|
+
</style>
|
|
309
|
+
<iframe id="webview" part="webview"></iframe>`,o5=CSS.supports("width:1rex")&&CSS.supports("transition-behavior:allow-discrete")&&CSS.supports("content-visibility: auto");class o8{static observedAttributes=[];static observedCSSProperties=["--lynx-display","--lynx-linear-orientation"];#c;constructor(e){this.#c=e,this.cssPropertyChangedHandler={"--lynx-display":this.#M,"--lynx-linear-orientation":this.#k}}#M=o_(()=>this.#c,"lynx-computed-display");#k=o_(()=>this.#c,"lynx-linear-orientation")}let o9=o5?void 0:o8;I=oO("scroll-view",[o9,oz,oW,oV,oq,oY],oj),new class extends oN{constructor(){super(i1),A()}static #h=(()=>{class e extends(O=HTMLElement){static #h={c:[i1,A]}=ox(this,[],[I],O);static notToFilterFalseAttributes=new Set(["enable-scroll"]);static scrollInterval=100;#D;scrollTo(...e){let t;if("string"==typeof e[0].offset){let s=parseFloat(e[0].offset);t={left:s,top:s}}else"number"==typeof e[0].offset&&(t={left:e[0].offset,top:e[0].offset});if("number"==typeof e[0].index){let s=e[0].index;if(0===s)this.scrollTop=0,this.scrollLeft=0;else if(s>0&&s<this.childElementCount){let e=this.children.item(s);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(t){if(clearInterval(this.#D),t.start){let s=("number"==typeof t.rate?t.rate:parseFloat(t.rate))*e.scrollInterval/1e3;this.#D=setInterval(e=>{e.scrollBy({left:s,top:s,behavior:"smooth"})},e.scrollInterval,this)}}get[oU](){return this}}})()};let o6=Symbol("__src"),o7=Symbol("__src"),re={loadstart:{code:0,type:"init"},canplay:{code:1,type:"playable"},stalled:{code:2,type:"stalled"},error:{code:3,type:"error"}},rt={stop:{code:0,type:"stopped"},play:{code:1,type:"playing"},pause:{code:2,type:"paused"}};R=oM("src",!0),M=oM("loop",!0),k=oM("pause-on-hide",!0);class rs{static #h={e:[D,F]}=ox(this,[[R,2,"_handleSrc"],[k,2,"_handlePauseOnHide"],[M,0,"_handleLoop"]],[]);static observedAttributes=["src","loop","pause-on-hide"];#c;#F=(F(this),oA(()=>this.#c.shadowRoot,"#audio"));_handleSrc(e){let t;try{t=JSON.parse(e||"")||{}}catch(e){console.error(`JSON.parse src error: ${e}`),t={}}null===e?this.#c.dispatchEvent(new CustomEvent("error",{...oH,detail:{code:-1,msg:"",from:"res loader",currentSrcID:this.#c[o6]?.id}})):(t?.id===void 0||t?.play_url===void 0)&&this.#c.dispatchEvent(new CustomEvent("error",{...oH,detail:{code:-2,msg:"",from:"res loader",currentSrcID:this.#c[o6]?.id}})),this.#c[o6]=t,this.#c[o7]=void 0,this.#c.stop()}_handleLoop=D(this,o_(this.#F,"loop"));#N=()=>{"hidden"===document.visibilityState&&this.#c.pause()};_handlePauseOnHide(e){null!==e?document.addEventListener("visibilitychange",this.#N,{passive:!0}):document.removeEventListener("visibilitychange",this.#N)}constructor(e){this.#c=e}}class ri{static observedAttributes=[];#c;#H;#F=oA(()=>this.#c.shadowRoot,"#audio");#P=e=>{let t=Number(this.#c.getAttribute("interval")),s=Number.isNaN(t)?0:t;this.#H=setInterval(()=>{this.#c.dispatchEvent(new CustomEvent("timeupdate",{...oH,detail:{currentTime:this.#F().currentTime,currentSrcID:this.#c[o6]?.id}}))},s);let i=rt[e.type];this.#c.dispatchEvent(new CustomEvent("playbackstatechanged",{...oH,detail:{code:i?.code,type:i?.type,currentSrcID:this.#c[o6]?.id}}))};#z=e=>{clearInterval(this.#H);let t=rt[e.type];this.#c.dispatchEvent(new CustomEvent("playbackstatechanged",{...oH,detail:{code:t?.code,type:t?.type,currentSrcID:this.#c[o6]?.id}}))};#V=e=>{let t=re[e.type];this.#c.dispatchEvent(new CustomEvent("loadingstatechanged",{...oH,detail:{code:t?.code,type:t?.type,currentSrcID:this.#c[o6]?.id}}))};#W=e=>{this.#V(e);let t=e.target?.error?.code,s=t===MediaError.MEDIA_ERR_DECODE?-5:-6;t===MediaError.MEDIA_ERR_DECODE&&(s=-5),this.#c.dispatchEvent(new CustomEvent("error",{...oH,detail:{code:s,msg:"",from:"player",currentSrcID:this.#c[o6]?.id}}))};#X=()=>{let e=null!==this.#c.getAttribute("loop");this.#c.dispatchEvent(new CustomEvent("finished",{...oH,detail:{loop:e,currentSrcID:this.#c[o6]?.id}}))};constructor(e){this.#c=e}connectedCallback(){let e=this.#F();e.addEventListener("play",this.#P,{passive:!0}),e.addEventListener("pause",this.#z,{passive:!0}),e.addEventListener("ended",this.#X,{passive:!0}),e.addEventListener("loadstart",this.#V,{passive:!0}),e.addEventListener("canplay",this.#V,{passive:!0}),e.addEventListener("stalled",this.#V,{passive:!0}),e.addEventListener("error",this.#W,{passive:!0})}}N=oO("x-audio-tt",[oz,rs,ri],'<audio id="audio"></audio>');class ro extends(P=HTMLElement){static #h={c:[i2,H]}=ox(this,[],[N],P);#$=oA(()=>this.shadowRoot,"#audio");#F=oA(()=>this.shadowRoot,"#audio");#B=o_(this.#F,"src");[o6];[o7];#U=()=>{let e,t=this[o6];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[o7]=new Promise(async(s,i)=>{this.dispatchEvent(new CustomEvent("srcloadingstatechanged",{...oH,detail:{code:0,type:"loading",currentSrcID:t.id}}));let o=await fetch(t.play_url,{headers:e});o.ok||(this.dispatchEvent(new CustomEvent("error",{...oH,detail:{code:-3,msg:"",from:"res loader",currentSrcID:t.id}})),i()),this.dispatchEvent(new CustomEvent("srcloadingstatechanged",{...oH,detail:{code:1,type:"success",currentSrcID:t.id}}));let r=await o.blob(),n=URL.createObjectURL(r);this.#B(n),s()})}};play(){return this[o7]||this.#U(),this[o7]?.then(()=>{let e=this.#$();e.currentTime=0,e.play()}),{currentSrcID:this[o6]?.id,loadingSrcID:""}}stop(){let e=this.#$(),t=rt.stop;return this.dispatchEvent(new CustomEvent("playbackstatechanged",{...oH,detail:{code:t?.code,type:t?.type,currentSrcID:this[o6]?.id}})),e.currentTime=0,e.pause(),{currentSrcID:this[o6]?.id}}pause(){return this.#$().pause(),{currentSrcID:this[o6]?.id}}resume(){return this.#$().play(),{currentSrcID:this[o6]?.id,loadingSrcID:""}}seek(e){return this.#$().currentTime=(e.currentTime||0)/1e3,this.dispatchEvent(new CustomEvent("seek",{...oH,detail:{seekresult:1,currentSrcID:this[o6]?.id}})),{currentSrcID:this[o6]?.id}}mute(e){return this.#$().muted=e.mute,{currentSrcID:this[o6]?.id}}playerInfo(){var e;let t=this.#$(),s=t.buffered,i=s.end(s.length-1);return{currentSrcID:this[o6]?.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[o7]||this.#U()}setVolume(e){return this.#$().volume=e.volume,{code:1}}static #d=H()}z=oM("name",!0),V=oM("height",!0),W=oM("width",!0);class rr{static #h={e:[X,$,B]}=ox(this,[[z,0,"handleName"],[V,0,"handleHeight"],[W,0,"handleWidth"]],[]);static observedAttributes=["name","height","width"];#c;#p;#q=oA(()=>this.#c.shadowRoot,"#canvas");constructor(e){this.#c=e}handleName=X(this,o_(this.#q,"name"));handleHeight=$(this,o_(this.#q,"height"));handleWidth=B(this,o_(this.#q,"width"));#Y=e=>{let{contentRect:t}=e[0],s=this.#c.shadowRoot.firstElementChild;if(s){let{height:e,width:i}=t;e*=window.devicePixelRatio,i*=window.devicePixelRatio;let o=new CustomEvent("resize",{...oH,detail:{height:e,width:i}});o.height=e,o.width=i,s.dispatchEvent(o)}};#j(){this.#p||(this.#p=new ResizeObserver(this.#Y),this.#p.observe(this.#c))}#K(){this.#p?.disconnect(),this.#p=void 0}connectedCallback(){this.#j()}dispose(){this.#K()}}U=oO("x-canvas",[oz,rr],((e,...t)=>String.raw({raw:e},...t))`<canvas id="canvas" part="canvas"></canvas>`);class rn extends(Y=HTMLElement){static #h={c:[i3,q]}=ox(this,[],[U],Y);static #d=q()}j=oM("granularity",!0),K=oD("offset");class rl{static #h={e:[G]}=ox(this,[[j,2,"_handleGranularity"],[K,2,"_enableOffsetEvent"]],[]);#c;#G=(G(this),.01);#J=0;constructor(e){this.#c=e}static observedAttributes=["granularity"];_handleGranularity(e){e&&""!==e?this.#G=parseFloat(e):this.#G=.01}_enableOffsetEvent(e){e?this.#c.addEventListener("scroll",this.#L,{passive:!0}):this.#c.removeEventListener("scroll",this.#L)}#L=()=>{let e=this.#c.scrollTop;(Math.abs(this.#J-e)>this.#G||0===this.#c.scrollTop||1>=Math.abs(this.#c.scrollHeight-this.#c.clientHeight-this.#c.scrollTop))&&(this.#J=e,this.#c.dispatchEvent(new CustomEvent("offset",{...oH,detail:{offset:e,height:this.#c[ra]}})))}}let ra=Symbol("scrollableLength"),rh=Symbol("isHeaderShowing"),rd=Symbol("resizeObserver"),rc=Symbol("slotKid");J=oO("x-foldview-ng",[o9,oz,rl]),new class extends oN{constructor(){super(i4),Q()}static #h=(()=>{class e extends(Z=HTMLElement){static #h={c:[i4,Q]}=ox(this,[],[J],Z);static notToFilterFalseAttributes=new Set(["scroll-enable"]);[rc];[rd]=new ResizeObserver(e=>{for(let t of e)"X-FOLDVIEW-HEADER-NG"===t.target.tagName?this.#Q=t.contentRect.height:"X-FOLDVIEW-TOOLBAR-NG"===t.target.tagName&&(this.#Z=t.contentRect.height);this[rc]&&(this[rc].style.top=`${this.#Q-this.#Z}px`)});#Q=0;#Z=0;get[ra](){return this.#Q-this.#Z}get[rh](){return this[ra]-this.scrollTop>=1}get scrollTop(){return super.scrollTop}set scrollTop(e){e>this[ra]?e=this[ra]:e<0&&(e=0),super.scrollTop=e}setFoldExpanded(e){let{offset:t,smooth:s=!0}=e,i=parseFloat(t);this.scrollTo({top:i,behavior:s?"smooth":"instant"})}get[oU](){return this}disconnectedCallback(){this[rd]?.disconnect(),this[rd]=void 0}}})()};let ru=(e,t)=>{let s=e.parentElement;if(s?.tagName==="LYNX-WRAPPER"&&(s=s.parentElement),s?.tagName===t)return s};ee=oO("x-foldview-header-ng",[o9,oz]);class rp extends(es=HTMLElement){static #h={c:[i5,et]}=ox(this,[],[ee],es);#ee=void 0;connectedCallback(){let e=ru(this,"X-FOLDVIEW-NG");this.#ee=e?.[rd],this.#ee?.observe(this)}dispose(){this.#ee?.unobserve(this)}static #d=et()}ei=oO("x-foldview-slot-drag-ng",[o9,oz]);class rm extends(er=HTMLElement){static #h={c:[i8,eo]}=ox(this,[],[ei],er);static #d=eo()}class rv{#et=0;#es=new WeakMap;#ei;#eo=0;#er=0;#en=null;#el;#ea=0;#c;static observedAttributes=[];constructor(e){this.#c=e,this.#c.addEventListener("touchmove",this.#eh,{passive:!1}),this.#c.addEventListener("touchstart",this.#ed,{passive:!0}),this.#c.addEventListener("touchend",this.#ec,{passive:!0}),this.#c.addEventListener("wheel",this.#eu,{passive:!1})}#ep(e){return this.#ei?.find(t=>{if(t.scrollHeight>t.clientHeight){let s=e<0&&0!==t.scrollTop,i=e>0&&Math.abs(t.scrollHeight-t.clientHeight-t.scrollTop)>1;return s||i}return!1})}#em(e,t){let s=this.#es.get(e)??0;s+=t,this.#es.set(e,s),e.scrollTop=s}#eh=e=>{let t=this.#ev();if(!t)return;let{pageY:s,pageX:i}=e.touches.item(0),o=this.#eo-s;if(null===this.#en){let e=this.#er-i;this.#en=Math.abs(o)>Math.abs(e)}!1!==this.#en&&(e.cancelable&&e.preventDefault(),this.#eg(o,t),this.#eo=s)};#eu=e=>{let t=this.#ev();if(!t||Math.abs(e.deltaY)<=Math.abs(e.deltaX))return;let s=e.composedPath().filter(e=>e instanceof Element&&this.#c.contains(e)),{clientX:i,clientY:o}=e,r=document.elementsFromPoint(i,o).filter(e=>this.#c.contains(e));if(this.#ei=[...new Set([...s,...r])],this.#et=t.scrollTop,this.#ei)for(let e of this.#ei)this.#es.set(e,e.scrollTop);e.cancelable&&e.preventDefault(),this.#eg(e.deltaY,t)};#ev(){let e=this.#c.parentElement;if(e&&"X-FOLDVIEW-NG"===e.tagName)return e}#ed=e=>{let{pageX:t,pageY:s}=e.touches.item(0);for(let e of(this.#ei=document.elementsFromPoint(t,s).filter(e=>this.#c.contains(e)),this.#eo=s,this.#er=t,this.#et=this.#ev()?.scrollTop??0,this.#ei))this.#es.set(e,e.scrollTop);this.#en=null,this.#el=void 0};#ec=()=>{if(this.#en=null,this.#el){let e=this.#ev();(this.#el!==e||e[rh])&&this.#el.scrollBy({top:4*this.#ea,behavior:"smooth"})}};#eg(e,t){let s=this.#ep(e);t[rh]&&e>0||e<0&&!s||!t[rh]&&!s?(t.scrollBy({top:e,behavior:"smooth"}),this.#et+=e,t.scrollTop=this.#et,this.#el=t):s&&(this.#el=s,this.#em(s,e)),this.#ea=e}}en=oO("x-foldview-slot-ng",[o9,oz,rv]);class rg extends(ea=HTMLElement){static #h={c:[i9,el]}=ox(this,[],[en],ea);connectedCallback(){this.matches("x-foldview-ng>x-foldview-slot-ng:first-of-type")&&(this.parentElement[rc]=this)}static #d=el()}eh=oO("x-foldview-toolbar-ng",[o9,oz]);class rb extends(ec=HTMLElement){static #h={c:[i6,ed]}=ox(this,[],[eh],ec);#ee=void 0;connectedCallback(){let e=ru(this,"X-FOLDVIEW-NG");this.#ee=e?.[rd],this.#ee?.observe(this)}dispose(){this.#ee?.unobserve(this)}static #d=ed()}eu=oM("drop-shadow",!0);class rf{static #h={e:[ep]}=ox(this,[[eu,0,"_handleBlurRadius"]],[]);static observedAttributes=["drop-shadow"];#c;#eb=oA(()=>this.#c.shadowRoot,"#img");_handleBlurRadius=ep(this,oI(this.#eb,"--drop-shadow",void 0,!0));constructor(e){this.#c=e}}em=oM("src",!0),ev=oM("placeholder",!0),eg=oM("blur-radius",!0),eb=oM("crossorigin",!0),ef=oM("referrerpolicy",!0);class rE{static #h={e:[eE,ew,ey,ex,eS]}=ox(this,[[ev,2,"_preloadPlaceholder"],[em,0,"_handleSrc"],[eg,0,"_handleBlurRadius"],[eb,0,"_handleCrossorigin"],[ef,0,"_handleReferrerpolicy"]],[]);static observedAttributes=["src","placeholder","blur-radius","crossorigin","referrerpolicy"];#c;#eb=(eS(this),oA(()=>this.#c.shadowRoot,"#img"));_handleSrc=eE(this,o_(this.#eb,"src",e=>e||this.#c.getAttribute("placeholder")));_preloadPlaceholder(e){e&&(new Image().src=e)}_handleBlurRadius=ew(this,oI(this.#eb,"--blur-radius",void 0,!0));_handleCrossorigin=ey(this,o_(this.#eb,"crossorigin"));_handleReferrerpolicy=ex(this,o_(this.#eb,"referrerpolicy"));#ef=()=>{let e=this.#eb().src,t=this.#c.getAttribute("placeholder");t&&e!==t&&(this.#eb().src=t)};constructor(e){this.#c=e,this.#eb().addEventListener("error",this.#ef)}connectedCallback(){(null===this.#c.getAttribute("src")||""===this.#c.getAttribute("src"))&&this._handleSrc(null)}}eT=oD("load"),eC=oD("error");class rw{static #h={e:[eL]}=ox(this,[[eT,2,"_enableLoadEvent"],[eC,2,"_enableErrorEvent"]],[]);static observedAttributes=[];#c;#eb=(eL(this),oA(()=>this.#c.shadowRoot,"#img"));_enableLoadEvent(e){e?this.#eb().addEventListener("load",this.#eE,{passive:!0}):this.#eb().removeEventListener("load",this.#eE)}_enableErrorEvent(e){e?this.#eb().addEventListener("error",this.#ew,{passive:!0}):this.#eb().removeEventListener("error",this.#ew)}#eE=()=>{this.#c.dispatchEvent(new CustomEvent("load",{...oH,detail:{width:this.#eb().naturalWidth,height:this.#eb().naturalHeight}}))};#ew=()=>{this.#c.dispatchEvent(new CustomEvent("error",{...oH,detail:{}}))};constructor(e){this.#c=e}}e_=oO("filter-image",[oz,rE,rf,rw],oG({}));class ry extends(eA=HTMLElement){static #h={c:[i7,eI]}=ox(this,[],[e_],eA);static #d=eI()}eO=oO("x-image",[oz,rE,rw],oG({}));class rx extends(eM=HTMLElement){static #h={c:[oe,eR]}=ox(this,[],[eO],eM);static #d=eR()}ek=oM("confirm-type",!0),eD=oM("maxlength",!0),eF=oM("readonly",!0),eN=oM("type",!0),eH=oM("ios-spell-check",!0),eP=oM("spell-check",!0);class rS{static #h={e:[ez,eV,eW,eX,e$]}=ox(this,[[eN,2,"_handleType"],[ek,0,"_handlerConfirmType"],[eD,0,"_handlerMaxlength"],[eF,0,"_handleReadonly"],[[eH,eP],0,"_handleSpellCheck"]],[]);static observedAttributes=["confirm-type","maxlength","readonly","type","ios-spell-check","spell-check"];#c;#ey=(e$(this),oA(()=>this.#c.shadowRoot,"#input"));_handlerConfirmType=ez(this,o_(this.#ey,"enterkeyhint",e=>null===e?"send":e));_handlerMaxlength=eV(this,o_(this.#ey,"maxlength",e=>null===e?"140":e));_handleReadonly=eW(this,o_(this.#ey,"readonly",e=>null!==e?"":null));#ex=o_(this.#ey,"type");#eS=o_(this.#ey,"inputmode");_handleType(e){let t="text",s="text";"digit"===e?t="numeric":"number"===e?t="decimal":"email"===e?t="email":"tel"===e?t="tel":s=e,this.#eS(t),this.#ex(s)}_handleSpellCheck=eX(this,o_(this.#ey,"spellcheck",e=>null===e?"false":"true"));constructor(e){this.#c=e}}eB=oM("placeholder",!0),eU=oM("placeholder-color",!0),eq=oM("placeholder-font-family",!0),eY=oM("placeholder-font-size",!0),ej=oM("placeholder-font-weight",!0);class rT{static #h={e:[eK,eG,eJ,eQ,eZ]}=ox(this,[[eB,0,"_handlerPlaceholder"],[eU,0,"_handlerPlaceholderColor"],[eq,0,"_handlerPlaceholderFontFamily"],[eY,0,"_handlerPlaceholderFontSize"],[ej,0,"_handlerPlaceholderFontWeight"]],[]);static observedAttributes=["placeholder","placeholder-color","placeholder-font-family","placeholder-font-size","placeholder-font-weight"];#c;#ey=oA(()=>this.#c.shadowRoot,"#input");_handlerPlaceholder=eK(this,o_(this.#ey,"placeholder"));_handlerPlaceholderColor=eG(this,oI(this.#ey,"--placeholder-color",void 0,!0));_handlerPlaceholderFontFamily=eJ(this,oI(this.#ey,"--placeholder-font-family",void 0,!0));_handlerPlaceholderFontSize=eQ(this,oI(this.#ey,"--placeholder-font-size",void 0,!0));_handlerPlaceholderFontWeight=eZ(this,oI(this.#ey,"--placeholder-font-weight",void 0,!0));constructor(e){this.#c=e}}e0=oM("value",!1),e1=oM("disabled",!0),e2=oM("autocomplete",!0);class rC{static #h={e:[e3,e4,e5]}=ox(this,[[e0,2,"_handleValue"],[e1,0,"_handleDisabled"],[e2,0,"_handleAutocomplete"]],[]);static observedAttributes=["value","disabled","autocomplete"];#c;#ey=(e5(this),oA(()=>this.#c.shadowRoot,"#input"));_handleValue(e){if(e){let t=parseFloat(this.#c.getAttribute("maxlength")??"");isNaN(t)||(e=e.substring(0,t))}else e="";let t=this.#ey();t.value!==e&&(t.value=e)}_handleDisabled=e3(this,o_(this.#ey,"disabled",e=>null!==e?"":null));_handleAutocomplete=e4(this,o_(this.#ey,"autocomplete"));constructor(e){this.#c=e}}let rL={submit:"confirm",blur:"lynxblur",focus:"lynxfocus"};e8=oM("input-filter",!0),e9=oD("lynxinput"),e6=oM("send-composing-input",!0),e7=oD("selection");class r_{static #h={e:[te]}=ox(this,[[[e8,e9],2,"_handleEnableInputEvent"],[e6,2,"_handleSendComposingInput"],[e7,2,"_handleEnableSelectionEvent"]],[]);static observedAttributes=["send-composing-input","input-filter"];#c;#eT=(te(this),!1);#ey=oA(()=>this.#c.shadowRoot,"#input");#eC=oA(()=>this.#c.shadowRoot,"#form");_handleEnableInputEvent(e){let t=this.#ey();e?(t.addEventListener("input",this.#eL,{passive:!0}),t.addEventListener("compositionend",this.#e_,{passive:!0})):(t.removeEventListener("input",this.#eL),t.removeEventListener("compositionend",this.#e_))}_handleSendComposingInput(e){this.#eT=null!==e}#eI=e=>{let t=rL[e.type]??e.type;this.#c.dispatchEvent(new CustomEvent(t,{...oH,detail:{value:this.#ey().value}}))};#eL=e=>{let t=this.#ey(),s=this.#c.getAttribute("input-filter"),i=s?t.value.replace(RegExp(s,"g"),""):t.value,o=e.isComposing;t.value=i,(!o||this.#eT)&&this.#c.dispatchEvent(new CustomEvent("lynxinput",{...oH,detail:{value:i,textLength:i.length,cursor:t.selectionStart,isComposing:o,selectionStart:t.selectionStart,selectionEnd:t.selectionEnd}}))};#e_=()=>{let e=this.#ey(),t=this.#c.getAttribute("input-filter"),s=t?e.value.replace(RegExp(t,"g"),""):e.value;e.value=s,this.#eT||this.#c.dispatchEvent(new CustomEvent("lynxinput",{...oH,detail:{value:s,textLength:s.length,cursor:e.selectionStart,isComposing:!1,selectionStart:e.selectionStart,selectionEnd:e.selectionEnd}}))};_handleEnableSelectionEvent(e){e?this.#ey().addEventListener("select",this.#eA,{passive:!0}):this.#ey().removeEventListener("select",this.#eA)}#eA=()=>{let e=this.#ey();this.#c.dispatchEvent(new CustomEvent("selection",{...oH,detail:{selectionStart:e.selectionStart,selectionEnd:e.selectionEnd}}))};#eO=e=>{e.target===this.#ey()&&"number"==typeof e.detail&&e.stopImmediatePropagation()};constructor(e){this.#c=e;const t=this.#ey(),s=this.#eC();t.addEventListener("blur",this.#eI,{passive:!0}),t.addEventListener("focus",this.#eI,{passive:!0}),s.addEventListener("submit",this.#eI,{passive:!0}),s.addEventListener("input",this.#eO,{passive:!0})}}tt=oO("x-input",[oz,rT,rC,rS,r_],oJ);class rI extends(ti=HTMLElement){static #h={c:[ot,ts]}=ox(this,[],[tt],ti);#eR=oA(()=>this.shadowRoot,"#input");addText(e){let{text:t}=e,s=this.#eR(),i=s.selectionStart;if(null===i)s.value=t;else{let e=s.value;s.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,s=this.#eR();s.value=e.value,(t=e.index)&&s.setSelectionRange(t,t)}getValue(){let e=this.#eR();return{value:e.value,selectionBegin:e.selectionStart,selectionEnd:e.selectionEnd}}sendDelEvent(e){let{action:t,length:s}=e,i=this.#eR();1===t&&(s=1);let o=i.selectionStart;if(null===o){let e=i.value;i.value=i.value.substring(0,e.length-s)}else{let e=i.value;i.value=e.slice(0,o-s)+e.slice(o)}}setInputFilter(e){this.#eR().setAttribute("pattern",e.pattern)}select(){let e=this.#eR();e.setSelectionRange(0,e.value.length)}setSelectionRange(e){this.#eR().setSelectionRange(e.selectionStart,e.selectionEnd)}focus(e){this.#eR().focus(e)}blur(){this.#eR().blur()}connectedCallback(){let e=this.#eR();null===this.getAttribute("confirm-type")&&e.setAttribute("confirm-type","send"),null===this.getAttribute("maxlength")&&e.setAttribute("maxlength","140")}static #d=ts()}to=oM("events-pass-through",!0),tr=oM("visible",!1);class rA{static #h={e:[tn]}=ox(this,[[to,2,"_handleEventsPassThrough"],[tr,2,"_handleVisible"]],[]);static observedAttributes=["visible","events-pass-through"];#c;#eM=(tn(this),!!window.HTMLDialogElement);#ek=!1;constructor(e){this.#c=e}#eD=oA(()=>this.#c.shadowRoot,"#dialog");_handleEventsPassThrough(e){null!==e?(this.#eD().addEventListener("click",this.#eF,{passive:!1}),this.#c.addEventListener("click",this.#eF,{passive:!1})):(this.#eD().removeEventListener("click",this.#eF),this.#c.removeEventListener("click",this.#eF))}_handleVisible(e){this.#ek=null!==e,this.#eM&&(this.#ek?(this.#eD().showModal(),this.#c.dispatchEvent(new CustomEvent("showoverlay",oH))):(this.#eD().close(),this.#c.dispatchEvent(new CustomEvent("dismissoverlay",oH))))}#eF=e=>{e.stopPropagation();let t=this.#eD();if(e.target===this.#c||e.target===t){t.close();let{clientX:s,clientY:i}=e,o=document.elementFromPoint(s,i);o?.tagName==="LYNX-VIEW"&&o.shadowRoot&&(o=o.shadowRoot.elementFromPoint(s,i)??o),o?.dispatchEvent(new MouseEvent("click",e)),requestAnimationFrame(()=>{this.#ek&&t.isConnected&&t.showModal()})}};connectedCallback(){this.#eM||(this.#eD().style.display="none")}}tl=oO("x-overlay-ng",[oz,rA],oZ);class rO extends(th=HTMLElement){static #h={c:[os,ta]}=ox(this,[],[tl],th);get[oP](){return this.shadowRoot.firstElementChild}static #d=ta()}class rR extends Event{startShowing;fullyShowing;static EventName="x-refresh-view-intersecting";constructor(e,t){super(rR.EventName,{composed:!1,cancelable:!0,bubbles:!0}),this.startShowing=e,this.fullyShowing=t}}class rM{#c;static observedAttributes=[];#eN;constructor(e){this.#c=e}connectedCallback(){if(IntersectionObserver&&!this.#eN){let e=this.#c.parentElement;e&&(this.#eN=new IntersectionObserver(e=>{let t=!1,s=!1;e.forEach(e=>{t=e.intersectionRatio>0,s=e.intersectionRatio>.9}),this.#c.dispatchEvent(new rR(t,s)),s&&this.#c.setAttribute("x-magnet-enable","")},{root:e,threshold:[.1,.9]}),this.#eN.observe(this.#c))}}dispose(){this.#eN&&(this.#eN.disconnect(),this.#eN=void 0)}}td=oO("x-refresh-footer",[o9,oz,rM]);class rk extends(tu=HTMLElement){static #h={c:[oi,tc]}=ox(this,[],[td],tu);connectedCallback(){this.setAttribute("slot","footer")}static #d=tc()}tp=oO("x-refresh-header",[o9,oz,rM]);class rD extends(tv=HTMLElement){static #h={c:[oo,tm]}=ox(this,[],[tp],tv);connectedCallback(){this.setAttribute("slot","header")}static #d=tm()}tg=oD("headeroffset"),tb=oD("headershow"),tf=oD("footeroffset"),tE=oD("startrefresh"),tw=oD("headerreleased"),ty=oD("startloadmore"),tx=oD("footerreleased");class rF{static #h={e:[tS]}=ox(this,[[[tg,tb,tf],2,"_handleComplexEventEnableAttributes"],[[tE,tw,ty,tx],2,"_handleXEnableHeaderOffsetEvent"]],[]);#c;static observedAttributes=[];#eH=(tS(this),oA(()=>this.#c,"x-refresh-view > x-refresh-header:first-of-type"));#eP=oA(()=>this.#c,"x-refresh-view > x-refresh-footer:first-of-type");constructor(e){this.#c=e,this.#c.addEventListener(rR.EventName,this.#ez)}#eV={headeroffset:!1,headerreleased:!1,startrefresh:!1,footeroffset:!1,headershow:!1,footerreleased:!1,startloadmore:!1};_handleComplexEventEnableAttributes(e,t){this.#eV[t]=e;let{headeroffset:s,headershow:i,footeroffset:o}=this.#eV;s||i||o?this.#eW():this.#eX()}_handleXEnableHeaderOffsetEvent(e,t){this.#eV[t]=e;let{startrefresh:s,headerreleased:i,startloadmore:o,footerreleased:r}=this.#eV;i||r||o||s?this.#e$():this.#eB()}#eU=!1;#eq=!1;#eY=!1;#ej=!1;#ez=e=>{e.stopPropagation(),"X-REFRESH-HEADER"===e.target.tagName?(this.#eU=e.startShowing,this.#eq=e.fullyShowing):(this.#eY=e.startShowing,this.#ej=e.fullyShowing)};#eK=!1;#e$(){this.#eK||(this.#c.addEventListener("touchend",this.#eG),this.#eK=!0)}#eG=()=>{this.#eq?(this.#c.dispatchEvent(new CustomEvent("headerreleased",oH)),this.#c.dispatchEvent(new CustomEvent("startrefresh",{...oH,detail:{isManual:this.#c._nextRefreshIsManual}})),this.#c._nextRefreshIsManual=!0):("true"===this.#c.getAttribute("enable-auto-loadmore")&&this.#eY||this.#ej)&&(this.#c.dispatchEvent(new CustomEvent("footerreleased",oH)),this.#c.dispatchEvent(new CustomEvent("startloadmore",oH)))};#eB(){this.#eK&&this.#c.removeEventListener("touchend",this.#eG)}#eJ=!1;#eQ=!1;#eW(){this.#eQ||(this.#c.addEventListener("touchstart",this.#eZ),this.#c.addEventListener("touchend",this.#e0),this.#c.addEventListener("touchcancel",this.#e0),this.#c.shadowRoot.querySelector("#container").addEventListener("scroll",this.#L))}#e0=()=>{this.#eJ=!1};#eZ=()=>{this.#eJ=!0};#L=()=>{if(this.#eU&&(this.#eV.headershow||this.#eV.headeroffset)){let e=this.#eH();if(e){let t=parseFloat(getComputedStyle(e).height),s=this.#c.shadowRoot.querySelector("#container").scrollTop;this.#c.dispatchEvent(new CustomEvent("headershow",{...oH,detail:{isDragging:this.#eJ,offsetPercent:1-s/t}})),this.#c.dispatchEvent(new CustomEvent("headeroffset",{...oH,detail:{isDragging:this.#eJ,offsetPercent:1-s/t}}))}}else if(this.#eY&&this.#eV.footeroffset){let e=this.#eP();if(e){let t=this.#c.shadowRoot.querySelector("#container").scrollTop,s=parseFloat(getComputedStyle(e).height);this.#c.dispatchEvent(new CustomEvent("footeroffset",{...oH,detail:{isDragging:this.#eJ,offsetPercent:1-t/s}}))}}};#eX(){this.#eQ&&(this.#c.removeEventListener("touchstart",this.#eZ),this.#c.removeEventListener("touchend",this.#e0),this.#c.removeEventListener("touchcancel",this.#e0),this.#c.shadowRoot.querySelector("#container").removeEventListener("scroll",this.#L))}dispose(){this.#eB(),this.#eX()}}tT=oO("x-refresh-view",[o9,oz,rF],o0),new class extends oN{constructor(){super(or),tC()}static #h=(()=>{class e extends(tL=HTMLElement){static #h={c:[or,tC]}=ox(this,[],[tT],tL);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"})}#e1=oA(()=>this.shadowRoot,"#container");#e2=oA(()=>this.shadowRoot,"#content");get scrollTop(){let e=this.#e1(),t=this.#e2();return t.scrollTop+t.offsetTop-e.scrollTop}set scrollTop(e){console.log(e);let t=this.#e1(),s=this.#e2();e>0?s.scrollTop=e:t.scrollTop=s.offsetTop+e}get scrollHeight(){return this.#e2().scrollHeight}get[oU](){return this}}})()},t_=oM("src",!0),tI=oM("content",!0),tA=oD("load");class rN{static #h={e:[tO]}=ox(this,[[t_,2,"_handleSrc"],[tI,2,"_handleContent"],[tA,2,"_enableLoadEvent"]],[]);static observedAttributes=["src","content"];#c;#e3=(tO(this),null);#eb=oA(()=>this.#c.shadowRoot,"#img");_handleSrc(e){e?this.#eb().src=e:this.#eb().src=""}_handleContent(e){if(this.#e3&&URL.revokeObjectURL(this.#e3),!e){this.#e3="";return}let t=new Blob([e],{type:"image/svg+xml;charset=UTF-8"}),s=URL.createObjectURL(t);this.#e3=s,this.#eb().src=s}_enableLoadEvent(e){e?this.#eb().addEventListener("load",this.#eE,{passive:!0}):this.#eb().removeEventListener("load",this.#eE)}#eE=()=>{this.#c.dispatchEvent(new CustomEvent("load",{...oH,detail:{width:this.#eb().naturalWidth,height:this.#eb().naturalHeight}}))};constructor(e){this.#c=e}}tR=oO("x-svg",[oz,rN],'<img part="img" alt="" loading="lazy" id="img" /> ');class rH extends(tk=HTMLElement){static #h={c:[on,tM]}=ox(this,[],[tR],tk);static #d=tM()}tD=oO("x-swiper-item",[o9,oz]);class rP extends(tN=HTMLElement){static #h={c:[ol,tF]}=ox(this,[],[tD],tN);static #d=tF()}tH=oD("transition"),tP=oD("scrollstart"),tz=oD("lynxscrollend"),tV=oD("change"),tW=oD("change-event-for-indicator");class rz{static #h={e:[tX,t$]}=ox(this,[[[tP,tz,tV,tW],2,"_enableScrollEventProcessor"],[tH,0,"_handleEnableTransitionEvent"]],[]);static observedAttributes=[];#c;#e4=(t$(this),0);#e5=0;#eJ=!1;#g;#e8=!1;constructor(e){this.#c=e}#e2=oA(()=>this.#c.shadowRoot,"#content").bind(this);_handleEnableTransitionEvent=tX(this,oL(this.#e2,"scroll",this.#e9,{passive:!0}));#L(){o$||(clearTimeout(this.#g),this.#g=setTimeout(()=>{this.#I()},100)),this.#e8||(this.#c.dispatchEvent(new CustomEvent("scrollstart",{...oH,detail:{current:this.#e4,isDragged:this.#eJ}})),this.#e8=!0);let e=this.#e2(),t=this.#c.isVertical,s=t?e.scrollTop:e.scrollLeft,i=t?e.clientHeight:e.clientWidth,o=t?e.scrollHeight:e.scrollWidth;if(Math.abs(this.#e5-s)>i/4||s<10||Math.abs(s-o)<=i){let e=this.#c.currentIndex;e!==this.#e4&&(this.#c.dispatchEvent(new CustomEvent("change",{...oH,detail:{current:e,isDragged:this.#eJ}})),this.#e4=e),this.#e5=s}}#I(){this.#c.dispatchEvent(new CustomEvent("lynxscrollend",{...oH,detail:{current:this.#e4}})),this.#e8=!1}#e6(){this.#eJ=!0}#e7(){this.#eJ=!1}#e9(){this.#c.dispatchEvent(new CustomEvent("transition",{...oH,detail:{dx:this.#e2().scrollLeft,dy:this.#e2().scrollTop}}))}#te=[oL(this.#e2,"scroll",this.#L.bind(this),{passive:!0}),oL(this.#e2,"touchstart",this.#e6.bind(this),{passive:!0}),oL(this.#e2,"touchend",this.#e7.bind(this),{passive:!0}),oL(this.#e2,"touchcancel",this.#e7.bind(this),{passive:!0}),oL(this.#e2,"scrollend",this.#I.bind(this),{passive:!0})];#eV={scrollstart:!1,lynxscrollend:!1,change:!1,"change-event-for-indicator":!1};_enableScrollEventProcessor(e,t){this.#eV[t]=e;let{lynxscrollend:s,scrollstart:i,change:o}=this.#eV,r=o||s||i||this.#eV["change-event-for-indicator"];this.#te.forEach(e=>e(r))}connectedCallback(){this.#e4=parseFloat(this.#c.getAttribute("current")??"0");let e=this.#c.isVertical;this.#e5=e?this.#e2().scrollTop:this.#e2().scrollLeft}}tB=oM("current",!1),tU=oM("interval",!1),tq=oM("autoplay",!1);class rV{static #h={e:[tY]}=ox(this,[[tB,2,"_handleCurrentChange"],[[tU,tq],2,"_handleAutoplay"]],[]);static observedAttributes=["current","interval","autoplay"];#c;constructor(e){this.#c=e}#tt(){this.#c.currentIndex===this.#c.childElementCount-1?this.#c.circularPlay&&(this.#c.currentIndex=0):this.#c.currentIndex+=1}_handleCurrentChange(e){let t=Number(e);Number.isNaN(t)||(this.#c.currentIndex=t)}#ts;#ti=(tY(this),(()=>{this.#tt()}).bind(this));#to(e){this.#tr(),this.#ts=setInterval(this.#ti,e)}#tr(){this.#ts&&clearInterval(this.#ts)}_handleAutoplay(){if(null!==this.#c.getAttribute("autoplay")){let e=this.#c.getAttribute("interval"),t=e?parseFloat(e):5e3;Number.isNaN(t)&&(t=5e3),this.#to(t)}}dispose(){this.#tr()}}tj=oM("circular",!1),tK=oM("vertical",!0);class rW{static #h={e:[tG]}=ox(this,[[tj,2,"_handleCircular"],[tK,2,"_handleVerticalChange"]],[]);static observedAttributes=["circular","vertical"];#c;#tn=(tG(this),!1);#tl;#ta=0;#e2=oA(()=>this.#c.shadowRoot,"#content").bind(this);constructor(e){this.#c=e}#th=oA(()=>this.#c.shadowRoot,"#circular-start").bind(this);#td=oA(()=>this.#c.shadowRoot,"#circular-end").bind(this);#tc(e){let t=this.#c.childElementCount;if(t>2){let{current:s,isDragged:i,__isFirstLayout:o}=e.detail;if(0===s||s===t-1||2===s||s===t-2){let e,r=this.#e2(),n=this.#th().assignedElements(),l=this.#td().assignedElements(),a=this.#c.firstElementChild,h=this.#c.lastElementChild,d=this.#c.snapDistance;if(0===s?(l.forEach(e=>e.removeAttribute("slot")),h.setAttribute("slot","circular-start"),e=a):s===t-1?(n.forEach(e=>e.removeAttribute("slot")),a.setAttribute("slot","circular-end"),e=h):(n.forEach(e=>e.removeAttribute("slot")),l.forEach(e=>e.removeAttribute("slot")),e=this.#c.children[s]),this.#tn){let t="carousel"===this.#c.getAttribute("mode")?.8*r.clientHeight/2:r.clientHeight/2;this.#ta=e.offsetTop+e.offsetHeight/2-d-t,r.scrollTop=this.#ta}else{let t="carousel"===this.#c.getAttribute("mode")?.8*r.clientWidth/2:r.clientWidth/2;this.#ta=e.offsetLeft+e.offsetWidth/2-d-t,r.scrollLeft=this.#ta}if(!i){let e=this.#c.getAttribute("mode");if(o&&(null===e||"normal"===e||"carousel"===e||"carry"===e))return;this.#tu(o?"instant":"smooth")}}}}#tu(e){let t=this.#e2(),s=this.#c.snapDistance;t.scrollBy({top:this.#tn?s:0,left:this.#tn?0:s,behavior:e??"smooth"})}#te=[oL(()=>this.#c,"change",this.#tc.bind(this),{passive:!0}),oL(()=>this.#c,"touchmove",this.#tp.bind(this),{passive:!1}),oL(()=>this.#c,"touchend",this.#tm.bind(this),{passive:!1}),oL(()=>this.#c,"touchcancel",this.#tm.bind(this),{passive:!1})];_handleCircular(e){this.#te.forEach(t=>t(null!=e)),null!==e&&this.#tc({detail:{current:this.#c.currentIndex,isDragged:!1,__isFirstLayout:!0}})}#tp(e){let t=e.touches.item(0);if(t){let e=this.#tn?t.pageY:t.pageX;if(void 0!==this.#tl){this.#tv();let t=this.#tl-e;this.#ta+=t}this.#tl=e}}#tm(e){this.#tg(),this.#tu(),this.#tl=void 0}_handleVerticalChange(e){this.#tn=null!==e}#tb;#tv(){if(!this.#tb){let e=this.#e2();this.#ta=this.#tn?e.scrollTop:e.scrollLeft,this.#tb=setInterval(()=>{this.#tn?e.scrollTop=this.#ta:e.scrollLeft=this.#ta},10)}}#tg(){this.#tb&&(clearInterval(this.#tb),this.#tb=void 0)}dispose(){this.#tg()}}tJ=oM("indicator-color",!0),tQ=oM("indicator-active-color",!0),tZ=oM("page-margin",!0),t0=oM("previous-margin",!0),t1=oM("next-margin",!0);class rX{static #h={e:[t2,t3,t4,t5,t8]}=ox(this,[[tJ,0,"_handleIndicatorColor"],[tQ,0,"_handleIndicatorActiveColor"],[tZ,0,"_handlePageMargin"],[t0,0,"_handlePreviousMargin"],[t1,0,"_handleNextMargin"]],[]);static observedAttributes=["indicator-color","indicator-active-color","page-margin","previous-margin","next-margin"];#c;#tf=0;#tE=oA(()=>this.#c.shadowRoot,"#indicator-container");#tw=oA(()=>this.#c.shadowRoot,"#indicator-style");#ty;constructor(e){this.#c=e}_handleIndicatorColor=t2(this,oI(this.#tE,"--indicator-color",void 0,!0));_handleIndicatorActiveColor=t3(this,oI(this.#tE,"--indicator-active-color",void 0,!0));_handlePageMargin=t4(this,oI(this.#tE,"--page-margin",void 0,!0));_handlePreviousMargin=t5(this,oI(this.#tE,"--previous-margin",void 0,!0));_handleNextMargin=t8(this,oI(this.#tE,"--next-margin",void 0,!0));#tx(){let e=this.#c.childElementCount;if(e!==this.#tf){let t="";for(let s=0;s<e;s++)t+=`<div style="animation-timeline:--x-swiper-item-${s};" part="indicator-item"></div>`;if(this.#tE().innerHTML=t,e>5){for(let t=0;t<e;t++)this.#c.children.item(t)?.style.setProperty("view-timeline-name",`--x-swiper-item-${t}`);this.#tw().innerHTML=`:host { timeline-scope: ${Array.from({length:e},(e,t)=>`--x-swiper-item-${t}`).join(",")} !important; }`}}this.#tf=e}connectedCallback(){this.#tx(),this.#ty=new MutationObserver(this.#tx.bind(this)),this.#ty.observe(this.#c,{attributes:!1,characterData:!1,childList:!0,subtree:!1}),CSS.supports("timeline-scope","--a, --b")||(this.#c.addEventListener("change",(({detail:e})=>{let t=e.current,s=this.#c.childElementCount,i=this.#tE();for(let e=0;e<s;e++){let s=i.children[e];s&&(e===t?s.style.setProperty("background-color","var(--indicator-active-color)","important"):s.style.removeProperty("background-color"))}}).bind(this)),oC(()=>{this.#tE().children[this.#c.currentIndex]?.style.setProperty("background-color","var(--indicator-active-color)","important")}))}dispose(){this.#ty?.disconnect(),this.#ty=void 0}}t9=oO("x-swiper",[oz,rX,rz,rW,rV],o1),new class extends oN{constructor(){super(oa),t6()}static #h=(()=>{class e extends(t7=HTMLElement){static #h={c:[oa,t6]}=ox(this,[],[t9],t7);static notToFilterFalseAttributes=new Set(["smooth-scroll","indicator-dots"]);#e2=oA(()=>this.shadowRoot,"#content").bind(this);#tS(){let e=0,t=Number.MAX_SAFE_INTEGER,s=0;if(this.childElementCount>0){let i=this.#e2(),o=this.isVertical,r=this.childElementCount,n=o?i.scrollTop:i.scrollLeft,l=o?i.clientHeight:i.clientWidth,a=o?this.firstElementChild.offsetHeight:this.firstElementChild.offsetWidth,h=n+("carousel"===this.getAttribute("mode")?.8*l/2:l/2);for(let i=0;i<r;i++){let r=this.children[i];if(r){let n=(o?r.offsetTop:r.offsetLeft)+a/2-h,l=Math.abs(n);l<t&&(e=i,t=l,s=n)}}}return{current:e,minDistanceToMid:t,minOffsetToMid:s}}get currentIndex(){return this.#tS().current}set currentIndex(e){if(this.currentIndex===e)return;let t=null===this.getAttribute("smooth-scroll");this.#tT(e,t?"smooth":"instant")}#tT(e,t){let s=this.children.item(e);if(s){let e=this.isVertical,i=0;i="flat-coverflow"===this.getAttribute("mode")?e?s.offsetTop-s.offsetHeight/3:s.offsetLeft-s.offsetWidth/3:e?s.offsetTop:s.offsetLeft,this.#e2().scrollTo({left:e?0:i,top:e?i:0,behavior:t})}}get snapDistance(){return this.#tS().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:s=!0}=e[0];if("number"==typeof t)return void this.#tT(t,s?"smooth":"instant")}super.scrollTo(...e)}connectedCallback(){let e=this.getAttribute("current");null!==e&&this.#tT(Number(e),"instant")}get[oU](){return this}}})()},se=oM("src",!0);class r${static #h={e:[st]}=ox(this,[[se,2,"_handleSrc"]],[]);static observedAttributes=["src"];#c;constructor(e){this.#c=e}#tC=(st(this),oA(()=>this.#c.shadowRoot,"#img"));_handleSrc(e){e?this.#tC().setAttribute("src",e):this.#tC().removeAttribute("src")}}ss=oO("inline-image",[r$],oG({}));class rB extends(so=HTMLElement){static #h={c:[oh,si]}=ox(this,[],[ss],so);static #d=si()}sr=oO("inline-text",[]);class rU extends(sl=HTMLElement){static #h={c:[od,sn]}=ox(this,[],[sr],sl);static #d=sn()}sa=oO("inline-truncation",[]),new class extends oN{constructor(){super(oc),sh()}static #h=(()=>{class e extends(sd=HTMLElement){static #h={c:[oc,sh]}=ox(this,[],[sa],sd);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(e.XEnableCustomTruncation,""),this.setAttribute("slot","inline-truncation")}disconnectedCallback(){this.parentElement?.removeAttribute(e.XEnableCustomTruncation)}}})()},sc=oM("text",!0);class rq{static #h={e:[su]}=ox(this,[[sc,2,"_handleText"]],[]);static observedAttributes=["text"];#c;#tL;constructor(e){su(this),this.#c=e}_handleText(e){this.#tL?.remove(),e&&(this.#tL=new Text(e),this.#c.append(this.#tL))}}sp=oO("raw-text",[rq]);class rY extends(sv=HTMLElement){static #h={c:[ou,sm]}=ox(this,[],[sp],sv);static #d=sm()}sg=oM("text-maxlength",!0),sb=oM("text-maxline",!0),sf=oM("tail-color-convert",!0),sE=oD("layout");class rj{static #h={e:[sw]}=ox(this,[[[sg,sb,sf],2,"_handleAttributeChange"],[sE,2,"_handleEnableLayoutEvent"]],[]);static exceedMathLengthAttribute="x-text-clipped";static showInlineTruncation="x-show-inline-truncation";static observedAttributes=["text-maxlength","text-maxline","tail-color-convert"];#t_=(sw(this),!1);#tI=!1;#tA=new Map;#tO;#p;#tR;#tM;#tk=!1;#tD=NaN;#tF=NaN;#tN=!0;#tH=!1;get #tP(){return!this.#tz&&!this.#tN}get #tz(){if(CSS.supports("selector(:has(inline-truncation))"))return this.#c.matches(":has(inline-truncation)");{let e=this.#c.querySelector("inline-truncation");if(e?.parentElement===this.#c)return!0}return!1}get #tV(){return!isNaN(this.#tF)&&(this.#tz||!this.#tN)}#c;constructor(e){this.#c=e}#tW=oA(()=>this.#c.shadowRoot,"#inner-box");#tX(e){e.forEach(e=>{e.removedNodes.forEach(e=>{this.#tA.delete(e)}),"characterData"===e.type&&void 0!==this.#tA.get(e.target)&&this.#tA.set(e.target,e.target.data)})}#t$(){for(let[e,t]of this.#tA)e.nodeType===Node.TEXT_NODE?void 0!==t&&(e.data=t):e.removeAttribute(rj.exceedMathLengthAttribute);this.#c.removeAttribute(rj.exceedMathLengthAttribute),this.#c.removeAttribute(rj.showInlineTruncation)}#tB(e){let t=[],s=e;for(;s=s.nextSibling;)(s.nodeType===Node.TEXT_NODE||s.nodeType===Node.ELEMENT_NODE)&&t.push(s);return t}#tU(){!this.#tI||this.#c.matches("x-text>x-text")||this.#t_||(this.#t_=!0,oC(async()=>{await this.#tq(),this.#tY(),this.#t_=!1}))}async #tq(){if(this.#tR?.parentElement?.removeChild(this.#tR),this.#t$(),!this.#tV&&isNaN(this.#tD))return;await document.fonts.ready;let e=this.#tW().getBoundingClientRect();this.#tM=new rK(this.#c,e);let t=this.#tM,s=(isNaN(this.#tD)?void 0:t.getNodeInfoByCharIndex(this.#tD))?this.#tD:1/0,i=this.#tV&&t.getLineInfo(this.#tF)?t.getLineInfo(this.#tF-1):void 0,o=1/0,r=3;if(i){let{start:s,end:n}=i,l=n-s;if(this.#tz){this.#c.setAttribute(rj.showInlineTruncation,"");let i=this.#c.querySelector("inline-truncation").getBoundingClientRect(),r=e.width,l=i.width;if(r>l){o=n-1;let e=document.createRange(),s=t.getNodeInfoByCharIndex(o),i=n-s.start;for(e.setEnd(s.node,i),e.setStart(s.node,i);e.getBoundingClientRect().width<l&&(o-=1)&&(s=t.getNodeInfoByCharIndex(o));)e.setStart(s.node,o-s.start)}else o=s,this.#c.removeAttribute(rj.showInlineTruncation)}else l<3?(r=l,o=s):o=n-3}let n=Math.min(s,o);if(n<1/0){let e=t.getNodeInfoByCharIndex(n);if(e){let s=n-e.start,i=e.node,o=[];i.nodeType===Node.TEXT_NODE?(this.#tA.set(i,i.data),i.data=i.data.substring(0,s)):o.push(i),o=o.concat(this.#tB(i));let l=i.parentElement;for(;l!==this.#c;)o=o.concat(this.#tB(l)),l=l.parentElement;if(o.forEach(e=>{e.nodeType===Node.TEXT_NODE&&0!==e.data.length?(this.#tA.set(e,e.data),e.data=""):e.nodeType===Node.ELEMENT_NODE&&(this.#tA.set(e,""),e.setAttribute(rj.exceedMathLengthAttribute,""))}),this.#tP){let o=(0===s?t.nodelist.at(e.nodeIndex-1)?.parentElement:i.parentElement)??i.parentElement;this.#tR=new Text(Array(r).fill(".").join("")),o.append(this.#tR)}this.#c.setAttribute(rj.exceedMathLengthAttribute,"")}this.#tj(n)}}#tK=e=>{this.#tX(e),this.#tU()};#tG=()=>{if(this.#tk){this.#tk=!1;return}this.#tU()};#tY(){this.#tI&&((this.#tD||this.#tF)&&!this.#tO&&(this.#tO=new MutationObserver(this.#tK),this.#tO.observe(this.#c,{subtree:!0,childList:!0,attributes:!1,characterData:!0})),this.#tF&&!this.#p&&(this.#p=new ResizeObserver(this.#tG),this.#tk=!0,this.#p.observe(this.#tW(),{box:"content-box"})))}#tJ(){this.#tO?.disconnect(),this.#tO=void 0,this.#p?.disconnect(),this.#p=void 0}_handleAttributeChange(){this.#tD=parseFloat(this.#c.getAttribute("text-maxlength")??""),this.#tF=parseFloat(this.#c.getAttribute("text-maxline")??""),this.#tN="false"!==this.#c.getAttribute("tail-color-convert"),this.#tD<0&&(this.#tD=NaN),this.#tF<1&&(this.#tF=NaN),isNaN(this.#tF)?this.#tW().style.removeProperty("-webkit-line-clamp"):this.#tW().style.webkitLineClamp=this.#tF.toString(),this.#tU()}_handleEnableLayoutEvent(e){this.#tH=e}#tj(e){if(!this.#tH)return;let t=new Proxy(this,{get:(t,s)=>"lineCount"===s?(t.#tM||(t.#tM=new rK(t.#c,t.#c.getBoundingClientRect())),t.#tM.getLineCount()):"lines"===s?new Proxy(t,{get(t,s){let i=parseFloat(s.toString());if(!isNaN(i)){t.#tM||(t.#tM=new rK(t.#c,t.#c.getBoundingClientRect()));let s=t.#tM.getLineInfo(i);if(s)return new Proxy(s,{get(t,s){switch(s){case"start":case"end":return t[s];case"ellipsisCount":if(void 0!==e&&e>=t.start&&e<t.end)return t.end-e;return 0}}})}}}):void 0});this.#c.dispatchEvent(new CustomEvent("layout",{...oH,detail:t}))}dispose(){this.#tJ()}connectedCallback(){this.#tI=!0,this._handleEnableLayoutEvent(this.#tH),this._handleAttributeChange(),oC(()=>{this.#tj()})}}class rK{#tQ=[{start:0}];#tZ=[];#t0=[];#c;#t1;nodelist;constructor(e,t){this.#c=e,this.nodelist=new rG(this.#c),this.#t1=t}#t2(e){if(e.node.nodeType!==Node.TEXT_NODE)return 1;{let{rect:t,rectIndex:s}=e,i=e.node,o=document.createRange();o.selectNode(i);for(let e=0;e<i.data.length;e++){o.setEnd(i,e);let r=o.getClientRects().item(s);if(r&&r.right===t.right)return e}return i.data.length}}#t3(e){if(this.#tZ[e])return;let{left:t}=this.#t1,s=this.#tZ[this.#tZ.length-1],i=s?.[s.length-1],o=i?.nodeIndex?i?.nodeIndex+1:0;for(let s=o,i;(i=this.#t4(s))&&e>=this.#tZ.length;s++){let e,{node:s}=i;if(s.nodeType===Node.ELEMENT_NODE)e=s.getClientRects();else{let t=document.createRange();t.selectNode(s),e=t.getClientRects()}if(e.length>0){let s=this.#tZ[this.#tZ.length-1],o=e[0];if(.2>Math.abs(o.left-t)||!s?this.#tZ.push([{...i,rect:o,rectIndex:0}]):s.push({...i,rect:o,rectIndex:0}),e.length>1)for(let s=1;s<e.length;s++){let r=e[s];(r.left!==o.left||r.bottom!==o.bottom)&&(.2>Math.abs(r.left-t)?this.#tZ.push([{...i,rect:r,rectIndex:s}]):this.#tZ[this.#tZ.length-1].push({...i,rect:r,rectIndex:s}))}}}}getLineCount(){return this.#t3(1/0),this.#tZ.length}getLineInfo(e){if(this.#t3(e+1),e<this.#tZ.length){let t=e>0?this.#tQ[e-1]??{}:void 0,s=this.#tQ[e]??{},i=e<this.#tZ.length-1?this.#tQ[e+1]??{}:void 0;if(void 0===s.start){let i=this.#tZ[e-1],o=i[i.length-1],r=this.#t2(o),n=o.start+r;t&&(t.end=n),s.start=n+1}if(void 0===s.end){let t=this.#tZ[e],o=t[t.length-1];if(e===this.#tZ.length-1){let e=o.node.nodeType===Node.TEXT_NODE?o.node.data.length:1;s.end=o.start+e}else{let e=this.#t2(o);s.end=o.start+e,i.start=s.end+1}}return s}}#t4(e){let t=this.#t0.length-1,s=this.#t0[t],i=s?s.start+s.length:0;for(let t=this.#t0.length,s;(s=this.nodelist.at(t))&&e>=this.#t0.length;t++){let e=s.nodeType===Node.ELEMENT_NODE?1:s.data.length,o={node:s,length:e,start:i,nodeIndex:t};this.#t0.push(o)}return this.#t0[e]}getNodeInfoByCharIndex(e){let t,s=0,i=this.#t0.length-1;for(;s<=i;){let o=Math.floor((s+i)/2),r=this.#t0[o],n=r.node,l=n.nodeType===Node.TEXT_NODE?n.data.length:1,a=r.start;if(e>=a&&e<a+l){t=r;break}e<a?i=o-1:s=o+1}if(t)return t;for(let t=this.#t0.length,s;s=this.#t4(t);t++)if(e<s.start+s.length)return s}}class rG{#t5=[];#t8;constructor(e){this.#t8=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.#t5[e]||this.#t9(e),this.#t5[e]}#t9(e){let t=null;for(;e>=this.#t5.length&&(t=this.#t8.nextNode());){this.#t5.push(t);break}}}sy=oO("x-text",[oz,rj,rq],'<div id="inner-box" part="inner-box"><slot part="slot"></slot><slot name="inline-truncation"></slot></div>'),new class extends oN{constructor(){super(op),sx()}static #h=(()=>{class e extends(sS=HTMLElement){static #h={c:[op,sx]}=ox(this,[],[sy],sS);static notToFilterFalseAttributes=new Set(["tail-color-convert"]);superScrollIntoView(e){super.scrollIntoView(e)}scrollIntoView(e){"object"==typeof e&&e.scrollIntoViewOptions?this.dispatchEvent(new CustomEvent(oY.eventName,{bubbles:!0,composed:!0,detail:e.scrollIntoViewOptions})):super.scrollIntoView(e)}[oP]=this}})()},sT=oM("placeholder-color",!0),sC=oM("placeholder-font-size",!0),sL=oM("placeholder-font-weight",!0),s_=oM("placeholder-font-family",!0),sI=oM("placeholder",!0);class rJ{static #h={e:[sA,sO,sR,sM,sk]}=ox(this,[[sT,0,"_updatePlaceholderColor"],[sC,0,"_updatePlaceholderFontSize"],[sL,0,"_updatePlaceholderFontWeight"],[s_,0,"_updatePlaceholderFontFamily"],[sI,0,"_handlePlaceholder"]],[]);static observedAttributes=["placeholder","placeholder-color","placeholder-font-size","placeholder-font-weight","placeholder-font-family"];#t6=oA(()=>this.#c.shadowRoot,"#textarea");_updatePlaceholderColor=sA(this,oI(this.#t6,"--placeholder-color",void 0,!0));_updatePlaceholderFontSize=sO(this,oI(this.#t6,"--placeholder-font-size",void 0,!0));_updatePlaceholderFontWeight=sR(this,oI(this.#t6,"--placeholder-font-weight",void 0,!0));_updatePlaceholderFontFamily=sM(this,oI(this.#t6,"--placeholder-font-family",void 0,!0));_handlePlaceholder=sk(this,o_(this.#t6,"placeholder"));#c;constructor(e){this.#c=e}}sD=oM("confirm-type",!0),sF=oM("maxlength",!0),sN=oM("readonly",!0),sH=oM("ios-spell-check",!0),sP=oM("show-soft-input-onfocus",!0);class rQ{static #h={e:[sz,sV,sW,sX,s$]}=ox(this,[[sD,0,"_handlerConfirmType"],[sF,0,"_handlerMaxlength"],[sN,0,"_handleReadonly"],[sH,0,"_handleSpellCheck"],[sP,0,"_handleShowSoftInputOnfocus"]],[]);static observedAttributes=["confirm-type","maxlength","readonly","type","ios-spell-check","spell-check","show-soft-input-onfocus"];#c;#t7=oA(()=>this.#c.shadowRoot,"#textarea");_handlerConfirmType=sz(this,o_(this.#t7,"enterkeyhint",e=>null===e?"send":e));_handlerMaxlength=sV(this,o_(this.#t7,"maxlength",e=>null===e?"140":e));_handleReadonly=sW(this,o_(this.#t7,"readonly",e=>null!==e?"":null));_handleSpellCheck=sX(this,o_(this.#t7,"spellcheck",e=>null===e?"false":"true"));_handleShowSoftInputOnfocus=s$(this,o_(this.#t7,"virtualkeyboardpolicy",e=>null===e?"manual":"auto"));constructor(e){this.#c=e}}sB=oM("confirm-enter",!0),sU=oM("disabled",!0),sq=oM("max-height",!0),sY=oM("min-height",!0),sj=oM("value",!1);class rZ{static #h={e:[sK,sG,sJ,sQ]}=ox(this,[[sB,2,"_handleConfirmEnter"],[sj,2,"_handleValue"],[sU,0,"_handleDisabled"],[sq,0,"_handleMaxHeight"],[sY,0,"_handleMinHeight"]],[]);static observedAttributes=["confirm-enter","disabled","max-height","min-height","value"];#c;#t7=(sQ(this),oA(()=>this.#c.shadowRoot,"#textarea"));#eC=oA(()=>this.#c.shadowRoot,"#form");#se=!1;_handleConfirmEnter(e){this.#se=null!==e}_handleDisabled=sK(this,o_(this.#t7,"disabled",e=>null!==e?"":null));_handleMaxHeight=sG(this,oI(this.#t7,"max-height"));_handleMinHeight=sJ(this,oI(this.#t7,"min-height"));_handleValue(e){if(e){let t=parseFloat(this.#c.getAttribute("maxlength")??"");isNaN(t)||(e=e.substring(0,t))}else e="";let t=this.#t7();t.value!==e&&(t.value=e)}#st=e=>{this.#se&&"Enter"===e.key&&this.#eC().dispatchEvent(new SubmitEvent("submit"))};constructor(e){this.#c=e,this.#t7().addEventListener("keyup",this.#st)}}sZ=oM("input-filter",!0),s0=oD("lynxinput"),s1=oM("send-composing-input",!0),s2=oD("selection");class r0{static #h={e:[s3]}=ox(this,[[[sZ,s0],2,"_handleEnableConfirmEvent"],[s1,2,"_handleSendComposingInput"],[s2,2,"_handleEnableSelectionEvent"]],[]);static observedAttributes=["send-composing-input","input-filter"];#c;#eT=(s3(this),!1);#t7=oA(()=>this.#c.shadowRoot,"#textarea");#eC=oA(()=>this.#c.shadowRoot,"#form");_handleEnableConfirmEvent(e){let t=this.#t7();e?(t.addEventListener("input",this.#eL,{passive:!0}),t.addEventListener("compositionend",this.#e_,{passive:!0})):(t.removeEventListener("input",this.#eL),t.removeEventListener("compositionend",this.#e_))}_handleSendComposingInput(e){this.#eT=null!==e}#eI=e=>{let t=rL[e.type]??e.type;this.#c.dispatchEvent(new CustomEvent(t,{...oH,detail:{value:this.#t7().value}}))};#eL=e=>{let t=this.#t7(),s=this.#c.getAttribute("input-filter"),i=s?t.value.replace(RegExp(s,"g"),""):t.value,o=e.isComposing;t.value=i,(!o||this.#eT)&&this.#c.dispatchEvent(new CustomEvent("lynxinput",{...oH,detail:{value:i,textLength:i.length,cursor:t.selectionStart,isComposing:o,selectionStart:t.selectionStart,selectionEnd:t.selectionEnd}}))};#e_=()=>{let e=this.#t7(),t=this.#c.getAttribute("input-filter"),s=t?e.value.replace(RegExp(t,"g"),""):e.value;e.value=s,this.#eT||this.#c.dispatchEvent(new CustomEvent("lynxinput",{...oH,detail:{value:s,textLength:s.length,cursor:e.selectionStart,isComposing:!1,selectionStart:e.selectionStart,selectionEnd:e.selectionEnd}}))};_handleEnableSelectionEvent(e){e?this.#t7().addEventListener("select",this.#eA,{passive:!0}):this.#t7().removeEventListener("select",this.#eA)}#eA=()=>{let e=this.#t7();this.#c.dispatchEvent(new CustomEvent("selection",{...oH,detail:{selectionStart:e.selectionStart,selectionEnd:e.selectionEnd}}))};#eO=e=>{e.target===this.#t7()&&"number"==typeof e.detail&&e.stopImmediatePropagation()};constructor(e){this.#c=e;const t=this.#t7(),s=this.#eC();t.addEventListener("blur",this.#eI,{passive:!0}),t.addEventListener("focus",this.#eI,{passive:!0}),s.addEventListener("submit",this.#eI,{passive:!0}),s.addEventListener("input",this.#eO,{passive:!0})}}s4=oO("x-textarea",[oz,rJ,rQ,rZ,r0],o2);class r1 extends(s8=HTMLElement){static #h={c:[om,s5]}=ox(this,[],[s4],s8);#t6=oA(()=>this.shadowRoot,"#textarea");get value(){return this.#t6().value}set value(e){this.#t6().value=e}addText(e){let{text:t}=e,s=this.#t6(),i=s.selectionStart;if(null===i)s.value=t;else{let e=s.value;s.value=e.slice(0,i)+t+e.slice(i)}}setValue(e){let t,s=this.#t6();s.value=e.value,(t=e.index)&&s.setSelectionRange(t,t)}getValue(){let e=this.#t6();return{value:e.value,selectionBegin:e.selectionStart,selectionEnd:e.selectionEnd}}sendDelEvent(e){let{action:t,length:s}=e,i=this.#t6();1===t&&(s=1);let o=i.selectionStart;if(null===o){let e=i.value;i.value=i.value.substring(0,e.length-s)}else{let e=i.value;i.value=e.slice(0,o-s)+e.slice(o)}}select(){let e=this.#t6();e.setSelectionRange(0,e.value.length)}setSelectionRange(e){this.#t6().setSelectionRange(e.selectionStart,e.selectionEnd)}static #d=s5()}s9=oO("x-view",[o9,oz]);class r2 extends(s7=HTMLElement){static #h={c:[ov,s6]}=ox(this,[],[s9],s7);superScrollIntoView(e){super.scrollIntoView(e)}scrollIntoView(e){"object"==typeof e&&e.scrollIntoViewOptions?this.dispatchEvent(new CustomEvent(oY.eventName,{bubbles:!0,composed:!0,detail:e.scrollIntoViewOptions})):super.scrollIntoView(e)}[oP]=this;static #d=s6()}ie=oM("blur-radius",!0);class r3{static #h={e:[it]}=ox(this,[[ie,2,"_handleBlurRadius"]],[]);static observedAttributes=["blur-radius"];#c;#ss=(it(this),oA(()=>this.#c.shadowRoot,"#dynamic-style"));_handleBlurRadius(e){e?(e=`blur(${parseFloat(e)}px)`,this.#ss().innerHTML=`:host { backdrop-filter: ${e}; -webkit-backdrop-filter: ${e}}`):this.#ss().innerHTML=""}constructor(e){this.#c=e}}is=oO("x-blur-view",[oz,r3],'<style id="dynamic-style"></style><slot></slot>');class r4 extends(io=HTMLElement){static #h={c:[og,ii]}=ox(this,[],[is],io);static #d=ii()}ir=oD("change"),il=oD("offsetchange");class r5{static #h={e:[ia]}=ox(this,[[ir,2,"_enableChangeEvent"],[il,2,"_enableOffsetChangeEvent"]],[]);static observedAttributes=[];#c;#si=(ia(this),!1);#n=!1;#so=0;#g;constructor(e){this.#c=e}#E=oA(()=>this.#c.shadowRoot,"#content");#sr=()=>{if(!this.#n)return;let e=this.#E(),t=this.#c.clientWidth,s=e.scrollLeft;this.#sn&&!o$&&(clearTimeout(this.#g),this.#g=setTimeout(()=>{this.#sl()},100)),this.#c.dispatchEvent(new CustomEvent("offsetchange",{...oH,detail:{offset:s/t}}))};#sl=()=>{if(this.#n){let e=this.#E(),t=this.#c.clientWidth,s=Math.floor(e.scrollLeft/t);s!==this.#so&&(this.#c.dispatchEvent(new CustomEvent("change",{...oH,detail:{index:s,isDragged:this.#si}})),this.#so=s)}};#sa=()=>{this.#si=!0};#sh=()=>{this.#si=!1};#sn=!1;_enableChangeEvent(e){this.#sn=e,this.#sd()}#sc=!1;_enableOffsetChangeEvent(e){this.#sc=e,this.#sd()}#sd(){let e=this.#E();this.#sc||this.#sn?e.addEventListener("scroll",this.#sr,{passive:!0}):e.removeEventListener("scroll",this.#sr),o$&&this.#sn?e.addEventListener("scrollend",this.#sl,{passive:!0}):e.removeEventListener("scrollend",this.#sl)}connectedCallback(){this.#n=!0;let e=this.#E();this.#c.addEventListener("touchstart",this.#sa,{passive:!0}),e.addEventListener("touchend",this.#sh,{passive:!0}),e.addEventListener("touchcancel",this.#sh,{passive:!0})}dispose(){let e=this.#E();e.removeEventListener("scroll",this.#sr),e.removeEventListener("scrollend",this.#sl)}}ih=oO("x-viewpager-ng",[o9,oz,r5],o3),new class extends oN{constructor(){super(ob),id()}static #h=(()=>{class e extends(ic=HTMLElement){static #h={c:[ob,id]}=ox(this,[],[ih],ic);static notToFilterFalseAttributes=new Set(["allow-horizontal-gesture","enable-scroll"]);selectTab(e){let{index:t,smooth:s}=e;void 0===s&&(s=!0);let i=this.shadowRoot.children.item(2),o=i.clientWidth*t;i.scrollTo({left:o,behavior:s?"smooth":"instant"})}connectedCallback(){let e=this.getAttribute("select-index")||this.getAttribute("initial-select-index");if(null!==e){let t=Number(e),s=this.shadowRoot.children.item(2),i=()=>{0===s.clientWidth?requestAnimationFrame(i):this.selectTab({index:t,smooth:!1})};oC(i)}}get[oU](){return this}}})()},iu=oO("x-viewpager-item-ng",[o9,oz]);class r8 extends(im=HTMLElement){static #h={c:[of,ip]}=ox(this,[],[iu],im);static #d=ip()}iv=oM("estimated-main-axis-size-px",!0);class r9{static #h={e:[ig]}=ox(this,[[iv,0,"_handlerEstimatedMainAxisSizePx"]],[]);static observedAttributes=["estimated-main-axis-size-px"];#c;_handlerEstimatedMainAxisSizePx=ig(this,oI(()=>this.#c,"--estimated-main-axis-size-px",e=>`${parseFloat(e)}px`));constructor(e){this.#c=e}}ib=oO("list-item",[oz,r9]),new class extends oN{constructor(){super(oE),iE()}static #h=(()=>{class e extends(iw=HTMLElement){static #h={c:[oE,iE]}=ox(this,[],[ib],iw);static notToFilterFalseAttributes=new Set(["recyclable"])}})()},iy=oM("sticky-offset",!0),ix=oM("span-count",!0),iS=oM("column-count",!0);class r6{static #h={e:[iT,iC]}=ox(this,[[iy,0,"_handlerStickyOffset"],[[ix,iS],0,"_handlerCount"]],[]);static observedAttributes=["sticky-offset","initial-scroll-index","span-count","column-count"];#c;_handlerStickyOffset=iT(this,oI(()=>this.#c,"--list-item-sticky-offset",e=>`${parseFloat(e)}px`));_handlerCount=iC(this,oI(()=>this.#c,"--list-item-span-count",e=>`${parseFloat(e)}`));constructor(e){this.#c=e}connectedCallback(){let e=this.#c.getAttribute("initial-scroll-index");if(null!==e){let t=parseFloat(e),s=()=>{0===this.#c.clientHeight?requestAnimationFrame(s):this.#c.scrollToPosition({position:t})};oC(s)}}}let r7=function(e,t,s){let i,o,r,n,l=0;var a=function(){l=s?.leading===!1?0:new Date().getTime(),i=null,n=e.apply(o,r),i||(o=r=null)};return function(){var h=new Date().getTime();l||s?.leading!==!1||(l=h);var d=t-(h-l);return o=this,r=arguments,d<=0||d>t?(i&&(clearTimeout(i),i=null),l=h,n=e.apply(o,r),i||(o=r=null)):i||s?.trailing===!1||(i=setTimeout(a,d)),n}};iL=oD("scrolltoupper"),i_=oM("upper-threshold-item-count",!0),iI=oD("scrolltolower"),iA=oM("lower-threshold-item-count",!0),iO=oD("lynxscroll"),iR=oD("lynxscrollend"),iM=oD("snap"),ik=oD("scrolltoupperedge"),iD=oD("scrolltoloweredge");class ne{static #h={e:[iF,iN,iH,iP,iz,iV]}=ox(this,[[i_,2,"_handleUpperThresholdItemCountChange"],[iA,2,"_handleLowerThresholdItemCountChange"],[iL,0,"_updateEventSwitches"],[iI,0,"_updateScrollToLowerEventSwitches"],[[iO,iR,iM],0,"_handleScrollEventsSwitches"],[ik,0,"_handleScrollToUpperEdgeEventEnable"],[iD,0,"_handleScrollToLowerEdgeEventEnable"]],[]);static observedAttributes=["upper-threshold-item-count","lower-threshold-item-count"];#c;#su=(iV(this),oA(()=>this.#c.shadowRoot,"#content"));#sp;#sm;#sv;#b=0;#f=0;#sg=!1;#g;#w=oA(()=>this.#c.shadowRoot,"#upper-threshold-observer");#y=oA(()=>this.#c.shadowRoot,"#lower-threshold-observer");#S(){let e=null!==this.#c.getAttribute("need-visible-item-info"),{scrollTop:t,scrollLeft:s,scrollHeight:i,scrollWidth:o}=this.#su(),r={scrollTop:t,scrollLeft:s,scrollHeight:i,scrollWidth:o,deltaX:s-this.#b,deltaY:t-this.#f,attachedCells:e?this.#c.getVisibleCells():void 0};return this.#b=s,this.#f=t,r}#sb=e=>{let{isIntersecting:t}=e[0];t&&this.#c.dispatchEvent(new CustomEvent("scrolltoupper",{...oH,detail:this.#S()}))};_updateEventSwitches=iF(this,e=>{if(e?this.#c.setAttribute("x-enable-scrolltoupper-event",""):this.#c.removeAttribute("x-enable-scrolltoupper-event"),this.#eV.scrolltoupper=e,e){this.#sp||(this.#sp=new IntersectionObserver(this.#sb,{root:this.#su()})),this.#sv||(this.#sv=new MutationObserver(this.#sf));let e=this.#c.getAttribute("upper-threshold-item-count"),t=null!==e?parseFloat(e):0,s=0===t?this.#w():this.#c.children[t-1];s&&this.#sp.observe(s),this.#sv.observe(this.#c,{childList:!0})}else this.#sp&&(this.#sp.disconnect(),this.#sp=void 0),this.#sv&&(this.#sv.disconnect(),this.#sv=void 0)});_handleUpperThresholdItemCountChange(e,t){let s=null!==t?parseFloat(t):0,i=0===s?this.#w():this.#c.children[s-1];i&&this.#sp?.unobserve(i);let o=null!==e?parseFloat(e):0,r=0===o?this.#w():this.#c.children[o-1];r&&this.#sp?.observe(r)}#sE=e=>{let{isIntersecting:t}=e[0];t&&this.#c.dispatchEvent(new CustomEvent("scrolltolower",{...oH,detail:this.#S()}))};#eV={lynxscroll:!1,lynxscrollend:!1,snap:!1,scrolltolower:!1,scrolltoupper:!1};_updateScrollToLowerEventSwitches=iN(this,e=>{if(this.#eV.scrolltolower=e,e?this.#c.setAttribute("x-enable-scrolltolower-event",""):this.#c.removeAttribute("x-enable-scrolltolower-event"),e){this.#sm||(this.#sm=new IntersectionObserver(this.#sE,{root:this.#su()})),this.#sv||(this.#sv=new MutationObserver(this.#sf));let e=this.#c.getAttribute("lower-threshold-item-count"),t=null!==e?parseFloat(e):0,s=0===t?this.#y():this.#c.children[this.#c.children.length-t];s&&this.#sm.observe(s),this.#sv.observe(this.#c,{childList:!0})}else this.#sm&&(this.#sm.disconnect(),this.#sm=void 0),this.#sv&&(this.#sv.disconnect(),this.#sv=void 0)});_handleLowerThresholdItemCountChange(e,t){let s=null!==t?parseFloat(t):0,i=0===s?this.#y():this.#c.children[this.#c.children.length-s];i&&this.#sm?.unobserve(i);let o=null!==e?parseFloat(e):0,r=0===o?this.#y():this.#c.children[this.#c.children.length-o];r&&this.#sm?.observe(r)}#sf=e=>{let t=e?.[0];if(t?.type==="childList"){if(this.#eV.scrolltolower){this.#sm&&(this.#sm.disconnect(),this.#sm=void 0),this.#sm=new IntersectionObserver(this.#sE,{root:this.#su()});let e=this.#c.getAttribute("lower-threshold-item-count"),t=null!==e?parseFloat(e):0,s=0===t?this.#y():this.#c.children[this.#c.children.length-t];s&&this.#sm.observe(s)}if(null!==this.#c.getAttribute("x-enable-scrolltoupper-event")){this.#sp&&(this.#sp.disconnect(),this.#sp=void 0),this.#sp=new IntersectionObserver(this.#sb,{root:this.#su()});let e=this.#c.getAttribute("upper-threshold-item-count"),t=null!==e?parseFloat(e):0,s=0===t?this.#w():this.#c.children[t-1];s&&this.#sp.observe(s)}}};#sw=null;#L=()=>{this.#sg&&!o$&&(clearTimeout(this.#g),this.#g=setTimeout(()=>{this.#I()},100)),this.#c.dispatchEvent(new CustomEvent("lynxscroll",{...oH,detail:this.#S()}))};_handleScrollEventsSwitches=iH(this,(e,t)=>{this.#eV[t]=e;let{lynxscroll:s,lynxscrollend:i,snap:o}=this.#eV,r=this.#c.getAttribute("scroll-event-throttle");this.#sg=null!==i||null!==o;let n=this.#su();if(this.#sw&&n.removeEventListener("scroll",this.#sw),null!==s||this.#sg){let e=null!==r?parseFloat(r):0,t=r7(this.#L,e,{leading:!0,trailing:!1});this.#sw=t,n.addEventListener("scroll",this.#sw),this.#b=0,this.#f=0}o$&&this.#sg?n.addEventListener("scrollend",this.#I):n.removeEventListener("scrollend",this.#I)});#x=e=>{let{isIntersecting:t,target:s}=e[0],i=s.id;t&&("upper-threshold-observer"===i?this.#c.dispatchEvent(new CustomEvent("scrolltoupperedge",{...oH,detail:this.#S()})):"lower-threshold-observer"===i&&this.#c.dispatchEvent(new CustomEvent("scrolltoloweredge",{...oH,detail:this.#S()})))};_handleScrollToUpperEdgeEventEnable=iP(this,e=>{e?this.#c.setAttribute("x-enable-scrolltoupperedge-event",""):this.#c.removeAttribute("x-enable-scrolltoupperedge-event"),this.#sy(e)});#sy=oX(this.#su,this.#w,this.#x);_handleScrollToLowerEdgeEventEnable=iz(this,e=>{e?this.#c.setAttribute("x-enable-scrolltoloweredge-event",""):this.#c.removeAttribute("x-enable-scrolltoloweredge-event"),this.#sx(e)});#sx=oX(this.#su,this.#y,this.#x);#I=()=>{let e=this.#c.getAttribute("item-snap");if(this.#c.dispatchEvent(new CustomEvent("lynxscrollend",{...oH})),null!==e){let e=Array.from(this.#c.children).filter(e=>"LIST-ITEM"===e.tagName),t=this.#su().scrollTop,s=this.#su().scrollLeft,i=e.find(e=>t>=e.offsetTop&&t<e.offsetTop+e.offsetHeight);this.#c.dispatchEvent(new CustomEvent("snap",{...oH,detail:{position:i&&e.indexOf(i),scrollTop:t,scrollLeft:s}}))}};constructor(e){this.#c=e}}let nt="waterfall-slot",ns="waterfall-style";iW=oD("scrolltolower"),iX=oM("list-type",!0);class ni{static #h={e:[i$]}=ox(this,[[iW,2,"_handleXEnableHeaderOffsetEvent"],[iX,2,"_handlerListType"]],[]);static observedAttributes=["list-type"];#c;#su=(i$(this),oA(()=>this.#c.shadowRoot,"#content"));#sS=oA(()=>this.#c.shadowRoot,'div[part="lower-threshold-observer"]');#p;#sv;_handleXEnableHeaderOffsetEvent(e){if(e?this.#c.setAttribute("x-enable-scrolltolower-event",""):this.#c.removeAttribute("x-enable-scrolltolower-event"),e){let e=this.#sS(),t=this.#c.getAttribute("scroll-orientation")||"vertical",s=this.#su();setTimeout(()=>{"vertical"===t?(e.style.setProperty("top",`${String(s.scrollHeight-1)}px`,"important"),e.style.setProperty("bottom","unset","important")):(e.style.setProperty("left",`${String(s.scrollWidth-1)}px`,"important"),e.style.setProperty("right","unset","important"))},100)}}#sT=()=>{let e=document.createElement("slot");e.setAttribute("name",`${nt}`),this.#c.shadowRoot?.querySelector("[part=upper-threshold-observer]")?.insertAdjacentElement("afterend",e)};#sC=()=>{let e=parseFloat(this.#c.getAttribute("span-count")||this.#c.getAttribute("column-count")||"")||1,t="vertical"===(this.#c.getAttribute("scroll-orientation")||"vertical"),s=Array(e).fill(0);for(let i=0;i<this.#c.children.length;i++){let o=this.#c.children[i],r=getComputedStyle(o).getPropertyValue("--list-main-axis-gap"),n=getComputedStyle(o).getPropertyValue("--list-cross-axis-gap"),l=t?o.getBoundingClientRect().height+parseFloat(r):o.getBoundingClientRect().width+parseFloat(r);if(null!==o.getAttribute("full-span")){let i=s[0];for(let t=1;t<e;t++)s[t]>i&&(i=s[t]);for(let t=0;t<e;t++)s[t]=i+l;t?(o.setAttribute(`${ns}-left`,"0"),o.setAttribute(`${ns}-top`,`${i}px`)):(o.setAttribute(`${ns}-left`,`${i}px`),o.setAttribute(`${ns}-top`,"0"))}else{let i=0,r=s[0];for(let t=1;t<e;t++)s[t]<r&&(i=t,r=s[t]);let a=`calc(${i} * (100% - ${n} * (${e} - 1))/ ${e} + ${Math.max(0,i)} * ${n})`;t?(o.setAttribute(`${ns}-left`,a),o.setAttribute(`${ns}-top`,`${r}px`)):(o.setAttribute(`${ns}-left`,`${r}px`),o.setAttribute(`${ns}-top`,a)),s[i]+=l}}for(let e=0;e<this.#c.children.length;e++){let t=this.#c.children[e];t.style.setProperty("left",t.getAttribute(`${ns}-left`)),t.style.setProperty("top",t.getAttribute(`${ns}-top`)),t.setAttribute("slot",nt)}};constructor(e){this.#c=e}#sL=()=>{this.#p?.disconnect(),this.#p=new ResizeObserver(()=>{requestAnimationFrame(()=>{this.#sC()})}),Array.from(this.#c.children).forEach(e=>{this.#p?.observe(e)})};_handlerListType(e){if("waterfall"===e)this.#sT(),this.#p||this.#sL(),this.#sv||(this.#sv=new MutationObserver(e=>{let t=e?.[0];t?.type==="childList"&&this.#sL()}),this.#sv.observe(this.#c,{childList:!0}));else{this.#p?.disconnect(),this.#p=void 0,this.#sv?.disconnect(),this.#sv=void 0;for(let e=0;e<this.#c.children.length;e++)this.#c.children[e].removeAttribute("slot");this.#c.shadowRoot?.querySelector(`slot[name=${nt}]`)?.remove()}}}iB=oO("x-list",[oz,r6,ne,ni],oQ),new class extends oN{constructor(){super(ow),iU()}static #h=(()=>{class e extends(iq=HTMLElement){static #h={c:[ow,iU]}=ox(this,[],[iB],iq);static notToFilterFalseAttributes=new Set(["enable-scroll"]);#su=oA(()=>this.shadowRoot,"#content");#s_={rate:0,lastTimestamp:0,autoStop:!0,isScrolling:!1};#sI={};get scrollTop(){return this.#su().scrollTop}set scrollTop(e){this.#su().scrollTop=e}get scrollLeft(){return this.#su().scrollTop}set scrollLeft(e){this.#su().scrollLeft=e}get __scrollTop(){return super.scrollTop}get __scrollLeft(){return super.scrollTop}scrollToPosition(e){let t;if("string"==typeof e.offset){let s=parseFloat(e.offset);t={left:s,top:s}}else"number"==typeof e.offset&&(t={left:e.offset,top:e.offset});if("number"==typeof e.position){if(0===e.position)this.#su().scrollTop=0,this.#su().scrollLeft=0;else if(e.position>0&&e.position<this.childElementCount){let s=this.children.item(e.position);s instanceof HTMLElement&&(t=t?{left:s.offsetLeft+t.left,top:s.offsetTop+t.top}:{left:s.offsetLeft,top:s.offsetTop})}}t&&this.#su().scrollTo({...t,behavior:e.smooth?"smooth":"auto"})}#sA=e=>{if(!this.#s_.isScrolling)return;if(!this.#s_.lastTimestamp){this.#s_.lastTimestamp=e,requestAnimationFrame(this.#sA);return}let t=this.#su(),s=(e-this.#s_.lastTimestamp)/1e3*this.#s_.rate;t.scrollBy({left:s,top:s,behavior:"auto"}),this.#s_.lastTimestamp=e;let i="vertical"===(this.getAttribute("scroll-orientation")||"vertical");(i?t.scrollTop+t.clientHeight>=t.scrollHeight:t.scrollLeft+t.clientWidth>=t.scrollWidth)&&this.#s_.autoStop?(i?t.scrollTop=t.scrollHeight-t.clientHeight:t.scrollLeft=t.scrollWidth-t.clientWidth,this.#s_.isScrolling=!1):requestAnimationFrame(this.#sA)};autoScroll(e){if(e.start){let t="number"==typeof e.rate?e.rate:parseFloat(e.rate);this.#s_={rate:t,lastTimestamp:0,isScrolling:!0,autoStop:!1!==e.autoStop};let s=this.#su(),i="vertical"===(this.getAttribute("scroll-orientation")||"vertical")?s.clientHeight<=s.scrollHeight:s.clientWidth<=s.scrollWidth;this.#s_.lastTimestamp=0,i?setTimeout(()=>requestAnimationFrame(this.#sA),0):requestAnimationFrame(this.#sA)}else this.#s_.isScrolling=!1}getScrollContainerInfo(){return{scrollTop:this.scrollTop,scrollLeft:this.scrollLeft,scrollHeight:this.scrollHeight,scrollWidth:this.scrollWidth}}getVisibleCells=()=>{let e=Object.values(this.#sI),t=Array.from(this.children).filter(e=>"LIST-ITEM"===e.tagName);return e.map(e=>{let s=e.getBoundingClientRect();return{id:e.getAttribute("id"),itemKey:e.getAttribute("item-key"),bottom:s.bottom,top:s.top,left:s.left,right:s.right,index:t.indexOf(e)}})};#sO=()=>Object.values(this.#sI).map(e=>{let t=e.getBoundingClientRect();return{height:t.height,width:t.width,itemKey:e.getAttribute("item-key"),originX:t.x,originY:t.y}});#sR=e=>{if(!e.target||!(e.target instanceof HTMLElement))return;let t=e.skipped,s=e.target?.getAttribute("id")==="content"&&e.target?.getAttribute("part")==="content",i="LIST-ITEM"===e.target.tagName;if(s&&!t){let e=this.#sO();setTimeout(()=>{this.dispatchEvent(new CustomEvent("layoutcomplete",{...oH,detail:{visibleItemBeforeUpdate:e,visibleItemAfterUpdate:this.#sO()}}))},100);return}if(i){let s=e.target?.getAttribute("item-key");if(!s)return;t?this.#sI[s]&&delete this.#sI[s]:this.#sI[s]=e.target;return}};connectedCallback(){this.#su().addEventListener("contentvisibilityautostatechange",this.#sR,{passive:!0})}}})()},iY=oM("src",!0),ij=oM("html",!0);class no{static #h={e:[iK,iG]}=ox(this,[[iY,0,"_handleSrc"],[ij,0,"_handleHtml"]],[]);static observedAttributes=["src","html"];#c;#sM=oA(()=>this.#c.shadowRoot,"#webview");constructor(e){this.#c=e}_handleSrc=iK(this,o_(this.#sM,"src"));_handleHtml=iG(this,o_(this.#sM,"srcdoc"))}iJ=oO("x-webview",[oz,no],o4);class nr extends(iZ=HTMLElement){static #h={c:[oy,iQ]}=ox(this,[],[iJ],iZ);#sM=oA(()=>this.shadowRoot,"#webview");#sk=()=>{this.dispatchEvent(new CustomEvent("load",{bubbles:!0,composed:!0,detail:{url:this.#sM().src}})),this.dispatchEvent(new CustomEvent("bindload",{bubbles:!0,composed:!0,detail:{url:this.#sM().src}}))};#sD=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"}}))};#sF=e=>{e.source===this.#sM().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.#sM().addEventListener("load",this.#sk),this.#sM().addEventListener("error",this.#sD),window.addEventListener("message",this.#sF)}disconnectedCallback(){this.#sM().removeEventListener("load",this.#sk),this.#sM().removeEventListener("error",this.#sD),window.removeEventListener("message",this.#sF)}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.#sM().src=this.#sM().src}static #d=iQ()}}}]);
|