@doubao-dev/cli 0.0.34 → 0.0.36
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/dist/1232.js +1 -0
- package/dist/1264.js +1 -0
- package/dist/1611.js +2 -0
- package/dist/2232.js +60 -0
- package/dist/2507.js +1 -0
- package/dist/275.js +5 -8
- package/dist/2932.js +1 -1
- package/dist/4525.js +1 -1
- package/dist/4880.js +1 -1
- package/dist/4931.js +1 -1
- package/dist/{3688.js → 5887.js} +3 -3
- package/dist/6438.js +140 -0
- package/dist/6976.js +280 -0
- package/dist/{8981.js.LICENSE.txt → 6976.js.LICENSE.txt} +108 -0
- package/dist/7410.js +1 -2
- package/dist/@byted-doubao-apps/create.js +1 -1
- package/dist/@byted-doubao-apps/kit.js +1 -1
- package/dist/@byted-doubao-apps/login.js +2 -2
- package/dist/@byted-doubao-apps/login~1.js +2 -2
- package/dist/@byted-doubao-apps/template-empty/package.json +3 -3
- package/dist/@byted-doubao-apps/template-starter/package.json +3 -3
- package/dist/@byted-hdt/cli.js +1 -1
- package/dist/@inquirer/select.js +1 -1
- package/dist/{assets/web-sdk-debugger/static/wasm/eaf690f2cd.module.wasm → @lynx-js/static/wasm/77fb77f77f.module.wasm} +0 -0
- package/dist/@lynx-js/{web-core-canary.js → web-core.js} +2 -2
- package/dist/app.js +1 -1
- package/dist/assets/web-sdk-debugger/__doubao_web_sdk_native_modules/applet-bridge-module-core.js +1 -1
- package/dist/assets/web-sdk-debugger/index.html +1 -1
- package/dist/assets/web-sdk-debugger/preact-devtools/index.js +4 -1
- package/dist/assets/web-sdk-debugger/static/css/index.ef5d8bc5ad.css +1 -0
- package/dist/assets/web-sdk-debugger/static/js/{682.de47e82f6b.js → 426.53c43a8594.js} +2 -2
- package/dist/assets/web-sdk-debugger/static/js/479.26e0b1d922.js +1829 -0
- package/dist/assets/web-sdk-debugger/static/js/async/503.259fed5610.js +1 -0
- package/dist/assets/web-sdk-debugger/static/js/async/{legacy-wasm-js.bacc8b5564.js → legacy-wasm-js.9b9367f818.js} +2 -2
- package/dist/assets/web-sdk-debugger/static/js/async/lynx-core-chunk.7f5e94dfae.js +5 -0
- package/dist/assets/web-sdk-debugger/static/js/async/web-core-main-chunk.f78260697f.js +1 -0
- package/dist/assets/web-sdk-debugger/static/js/async/web-core-markup-encoder.33c43c480e.js +4 -0
- package/dist/assets/web-sdk-debugger/static/js/async/web-core-template-loader-thread.ba290b32d7.js +4 -0
- package/dist/assets/web-sdk-debugger/static/js/async/web-core-worker-chunk.9a5989b104.js +1 -0
- package/dist/assets/web-sdk-debugger/static/js/async/web-elements.3fbd53918e.js +365 -0
- package/dist/assets/web-sdk-debugger/static/js/async/xmarkdown-deps.efd0ffb051.js +5 -0
- package/dist/assets/web-sdk-debugger/static/js/async/{xmarkdown-deps.3ea5672b2c.js.LICENSE.txt → xmarkdown-deps.efd0ffb051.js.LICENSE.txt} +1 -1
- package/dist/assets/web-sdk-debugger/static/js/index.b6e5c76345.js +44 -0
- package/dist/assets/web-sdk-debugger/static/js/lib-polyfill.c91181f230.js +1 -0
- package/dist/assets/web-sdk-debugger/static/wasm/{69a8ba8eb9.module.wasm → 4c402c7981.module.wasm} +0 -0
- package/dist/assets/web-sdk-debugger/static/wasm/{03b02f9e5a.module.wasm → 72aaf7d0aa.module.wasm} +0 -0
- package/dist/{@lynx-js/static/wasm/eaf690f2cd.module.wasm → assets/web-sdk-debugger/static/wasm/77fb77f77f.module.wasm} +0 -0
- package/dist/assets/web-sdk-debugger/wsd/doubao-apps-api.template.js +0 -0
- package/dist/assets/web-sdk-debugger/wsd/doubao-apps-framework.template.js +0 -0
- package/dist/assets/web-sdk-debugger/wsd/doubao-apps-react-dev.template.js +0 -0
- package/dist/assets/web-sdk-debugger/wsd/doubao-apps-react.template.js +0 -0
- package/dist/browser.js +1 -1
- package/dist/build.js +1 -1
- package/dist/build~1.js +10 -10
- package/dist/check.js +1 -1
- package/dist/client.js +1 -0
- package/dist/client~1.js +1 -0
- package/dist/components-loader.js +1 -1
- package/dist/demo-server.js +2 -2
- package/dist/demo.js +2 -2
- package/dist/dev-config.js +2 -2
- package/dist/dev-shell.js +1 -1
- package/dist/dev.js +19 -16
- package/dist/explore.js +10 -0
- package/dist/gen-explore.js +1 -1
- package/dist/gen-trajectory.js +1 -1
- package/dist/info.js +2 -2
- package/dist/init.js +4 -4
- package/dist/ink.js +1 -1
- package/dist/inquirer.js +1 -1
- package/dist/json-file.js +2 -2
- package/dist/legacy-status.js +1 -1
- package/dist/legacy-upload.js +1 -1
- package/dist/lepus.js +1 -1
- package/dist/login.js +2 -1
- package/dist/main.js +1 -1
- package/dist/{manifest-mcp-config.js → manifest-headers.js} +1 -1
- package/dist/ora.js +1 -1
- package/dist/portal.js +1 -1
- package/dist/project-layout.js +1 -1
- package/dist/project.js +1 -1
- package/dist/prompt.js +8 -8
- package/dist/prompts.js +1 -1
- package/dist/qrcode.js +1 -0
- package/dist/report.js +1 -1
- package/dist/run-registry.js +1 -1
- package/dist/run.js +321 -321
- package/dist/sandbox.js +1 -1
- package/dist/scan.js +1 -1
- package/dist/sdk.js +192 -59
- package/dist/sdk~1.js +66 -58
- package/dist/server.js +10 -10
- package/dist/skill.js +1 -1
- package/dist/skills.js +1 -1
- package/dist/skills~1.js +1 -1
- package/dist/status.js +1 -1
- package/dist/status~1.js +2 -2
- package/dist/stop.js +1 -1
- package/dist/sync.js +1 -1
- package/dist/trajectory.js +3 -0
- package/dist/update.js +1 -1
- package/dist/upgrade.js +1 -1
- package/dist/workspace.js +1 -1
- package/dist/yaml.js +1 -1
- package/package.json +7 -7
- package/skills/doubao-agentic-service-development/references/frontend/doubao-agentic-service-api/02-/347/263/273/347/273/237.md +2 -2
- package/skills/doubao-agentic-service-development/references/frontend/doubao-agentic-service-api/06-/350/267/257/347/224/261.md +4 -0
- package/skills/doubao-agentic-service-development/references/frontend/doubao-agentic-service-api/07-/347/225/214/351/235/242.md +8 -0
- package/skills/doubao-agentic-service-development/references/frontend/doubao-agentic-service-api/26-/345/237/272/347/241/200/344/277/241/346/201/257.md +2 -1
- package/skills/doubao-agentic-service-development/references/frontend/doubao-agentic-service-api/33-/345/261/217/345/271/225.md +124 -8
- package/skills/doubao-agentic-service-development/references/frontend/doubao-agentic-service-api/groups.md +1 -1
- package/skills/doubao-agentic-service-development/references/frontend/doubao-agentic-service-api/quick-reference.md +2 -1
- package/skills/doubao-agentic-service-development/references/frontend/examples/page-widget-basics.md +1 -0
- package/skills/doubao-agentic-service-development/references/frontend/guides/client-tools-and-events.md +209 -0
- package/skills/doubao-agentic-service-development/references/frontend/guides/component-development.md +7 -1
- package/skills/doubao-agentic-service-development/references/frontend/guides/debugger-mcp.md +1 -1
- package/skills/doubao-agentic-service-development/references/frontend/widget-templates/overview.md +13 -9
- package/skills/doubao-agentic-service-development/references/frontend/widget-templates/props.md +26 -1
- package/skills/doubao-agentic-service-development/references/frontend-dev.md +2 -0
- package/dist/2168.js +0 -60
- package/dist/318.js +0 -1
- package/dist/3974.js +0 -151
- package/dist/6427.js +0 -126
- package/dist/7417.js +0 -204
- package/dist/7417.js.LICENSE.txt +0 -107
- package/dist/7945.js +0 -1
- package/dist/8981.js +0 -78
- package/dist/assets/web-sdk-debugger/static/css/index.7c65607402.css +0 -1
- package/dist/assets/web-sdk-debugger/static/js/670.8a8f0f7d57.js +0 -1829
- package/dist/assets/web-sdk-debugger/static/js/async/503.cf61731bba.js +0 -1
- package/dist/assets/web-sdk-debugger/static/js/async/lynx-core-chunk.afc1ded023.js +0 -5
- package/dist/assets/web-sdk-debugger/static/js/async/web-core-main-chunk.7fe9af852c.js +0 -1
- package/dist/assets/web-sdk-debugger/static/js/async/web-core-markup-encoder.f81d6d2cae.js +0 -4
- package/dist/assets/web-sdk-debugger/static/js/async/web-core-template-loader-thread.4a49f8a286.js +0 -4
- package/dist/assets/web-sdk-debugger/static/js/async/web-core-worker-chunk.c315fd6753.js +0 -1
- package/dist/assets/web-sdk-debugger/static/js/async/web-elements.43d1e29387.js +0 -365
- package/dist/assets/web-sdk-debugger/static/js/async/xmarkdown-deps.3ea5672b2c.js +0 -5
- package/dist/assets/web-sdk-debugger/static/js/index.9f626ba3a2.js +0 -44
- package/dist/assets/web-sdk-debugger/static/js/lib-polyfill.9daa7c863e.js +0 -1
- package/dist/simulator-client.js +0 -1
- /package/dist/{7410.js.LICENSE.txt → 1611.js.LICENSE.txt} +0 -0
- /package/dist/assets/web-sdk-debugger/static/js/{670.8a8f0f7d57.js.LICENSE.txt → 479.26e0b1d922.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,365 @@
|
|
|
1
|
+
"use strict";(globalThis.rspackChunk_byted_doubao_apps_web_sdk_debugger_app||=[]).push([[724],{89213(e,t,n){let l,i,a,s,o,r,d,h,c,u,m,p,v,b,g,f,y,E,S,w,_,C,T,x,k,O,L,A,I,F,R,M,P,z,N,H,D,G,j,$,V,W,U,B,X,Z,q,Y,J,K,Q,ee,et,en,el,ei,ea,es,eo,er,ed,eh,ec,eu,em,ep,ev,eb,eg,ef,ey,eE,eS,ew,e_,eC,eT,ex,ek,eO,eL,eA,eI,eF,eR,eM,eP,ez,eN,eH,eD,eG,ej,e$,eV,eW,eU,eB,eX,eZ,eq,eY,eJ,eK,eQ,e0,e1,e4,e2,e3,e8,e9,e5,e6,e7,te,tt,tn,tl,ti,ta,ts,to,tr,td,th,tc,tu,tm,tp,tv,tb,tg,tf,ty,tE,tS,tw,t_,tC,tT,tx,tk,tO,tL,tA,tI,tF,tR,tM,tP,tz,tN,tH,tD,tG,tj,t$,tV,tW,tU,tB,tX,tZ,tq,tY,tJ,tK,tQ,t0,t1,t4,t2,t3,t8,t9,t5,t6,t7,ne,nt,nn,nl,ni,na,ns,no,nr,nd,nh,nc,nu,nm,np,nv,nb,ng,nf,ny,nE,nS,nw,n_,nC,nT,nx,nk,nO,nL,nA,nI,nF,nR,nM,nP,nz,nN,nH,nD,nG,nj,n$,nV,nW,nU,nB,nX,nZ,nq,nY,nJ,nK,nQ,n0,n1,n4,n2,n3,n8,n9,n5,n6,n7,le,lt,ln,ll,li,la,ls,lo,lr,ld,lh,lc,lu,lm,lp,lv,lb,lg,lf,ly,lE,lS,lw,l_,lC,lT,lx,lk,lO,lL,lA,lI,lF,lR,lM,lP,lz,lN,lH,lD,lG,lj,l$,lV,lW,lU,lB,lX,lZ,lq,lY,lJ,lK,lQ,l0,l1,l4,l2,l3,l8,l9,l5,l6,l7,ie,it,il,ii,ia,is,io,ir,id,ih,ic,iu,im,ip,iv,ib,ig,iy,iE,iS,iw,i_,iC,iT,ix,ik,iO,iL,iA,iI,iF,iR,iM,iP,iz,iN,iH,iD,iG,ij,i$,iV,iW,iU,iB,iX,iZ,iq,iY,iJ,iK,iQ,i0,i1,i4,i2,i3,i8,i9,i5,i6,i7,ae,at,an,al,ai,aa,as,ao,ar,ad,ah,ac,au,am,ap,av,ab,ag,af,ay,aE,aS,aw,a_,aC,aT,ax,ak,aO,aL,aA,aI,aF,aR,aM,aP,az,aN,aH,aD,aG,aj,a$,aV,aW,aU,aB,aX,aZ,aq,aY,aJ,aK,aQ,a0,a1;n(97903),n(20959);var a4,a2,a3,a8,a9=n(65959),a5=n(18950);h=[(0,a5.uA)("lynx-wrapper",[])],c=[],u=HTMLElement,(class extends u{static #e=d=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(u[Symbol.metadata]??null):void 0;(0,a9.G4)(null,r={value:d},h,{kind:"class",name:d.name,metadata:e},null,c),d=r.value,e&&Object.defineProperty(d,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(d,c)})()}),n(67548),n(70954),n(98803),n(79162),n(15385),n(39342),n(69152),n(61955),n(82689),n(84847),n(16285),n(20602),n(33307),n(94341),n(7270),n(44997),n(50364),n(79780),n(80372),n(72498),n(37928),n(25597),n(92321);var a6=n(20361);let a7=(v=[],b=[],g=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;m=[(0,a5._y)("fading-edge-length",!0)],p=[(0,a5.h3)("background"),(0,a5.h3)("background-color")],(0,a9.G4)(this,null,p,{kind:"method",name:"_backgroundColorToVariable",static:!1,private:!1,access:{has:e=>"_backgroundColorToVariable"in e,get:e=>e._backgroundColorToVariable},metadata:e},null,v),(0,a9.G4)(null,null,m,{kind:"field",name:"_handleFadingEdgeLength",static:!1,private:!1,access:{has:e=>"_handleFadingEdgeLength"in e,get:e=>e._handleFadingEdgeLength,set:(e,t)=>{e._handleFadingEdgeLength=t}},metadata:e},b,g),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();#n=(0,a9.zF)(this,v);#l=(0,a5.Ut)(()=>this.#n.shadowRoot,"#top-fade-mask");#i=(0,a5.Ut)(()=>this.#n.shadowRoot,"#bot-fade-mask");static observedAttributes=["fading-edge-length"];static observedCSSProperties=["background","background-color"];constructor(e){(0,a9.zF)(this,g),this.#n=e}_handleFadingEdgeLength=(0,a9.zF)(this,b,(0,a5._8)(()=>this.#n,"--scroll-view-fading-edge-length",e=>`${parseFloat(e)}px`));_backgroundColorToVariable(e){this.#l().style.setProperty("--scroll-view-bg-color",e),this.#i().style.setProperty("--scroll-view-bg-color",e)}connectedCallback(){}dispose(){}}),se=(E=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;f=[(0,a5._y)("scroll-top",!1),(0,a5._y)("scroll-left",!1),(0,a5._y)("initial-scroll-offset",!1)],y=[(0,a5._y)("scroll-to-index",!1),(0,a5._y)("initial-scroll-to-index",!1)],(0,a9.G4)(this,null,f,{kind:"method",name:"_handleInitialScrollOffset",static:!1,private:!1,access:{has:e=>"_handleInitialScrollOffset"in e,get:e=>e._handleInitialScrollOffset},metadata:e},null,E),(0,a9.G4)(this,null,y,{kind:"method",name:"_handleInitialScrollIndex",static:!1,private:!1,access:{has:e=>"_handleInitialScrollIndex"in e,get:e=>e._handleInitialScrollIndex},metadata:e},null,E),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();#n=(0,a9.zF)(this,E);static observedAttributes=["scroll-top","scroll-left","initial-scroll-offset","scroll-to-index","initial-scroll-to-index"];constructor(e){this.#n=e}_handleInitialScrollOffset(e,t,n){if(e){let t=parseFloat(e),l=this.#n.getAttribute("scroll-orientation"),i=this.#n.getAttribute("scroll-y"),a=this.#n.getAttribute("scroll-x"),s=("scroll-top"===n||"initial-scroll-offset"===n)&&(""===i||"true"===i||"vertical"===l||"both"===l),o=("scroll-left"===n||"initial-scroll-offset"===n)&&(""===a||"true"===a||"vertical"===l||"both"===l);requestAnimationFrame(()=>{s&&this.#n.scrollTo(0,t),o&&(this.#n.scrollLeft=t)})}}_handleInitialScrollIndex(e){if(e){let t=parseFloat(e),n=this.#n.children.item(t);if(n&&n instanceof HTMLElement){let e=null!==this.#n.getAttribute("scroll-x");requestAnimationFrame(()=>{e?this.#n.scrollLeft=n.offsetLeft:this.#n.scrollTop=n.offsetTop})}}}dispose(){}});var st=n(26153);function sn(e,t,n){let l;return i=>{null!==i?l||(l=new IntersectionObserver(n,{root:e()})).observe(t()):l&&(l.disconnect(),l=void 0)}}var sl=n(40835);let si=(k=[],O=[],L=[],A=[],I=[],F=[],R=[],M=[],P=[],z=[],N=[],H=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;S=[(0,a5.ZR)("scrolltoupper")],w=[(0,a5.ZR)("scrolltolower")],_=[(0,a5._y)("upper-threshold",!0)],C=[(0,a5._y)("lower-threshold",!0)],T=[(0,a5.ZR)("lynxscroll")],x=[(0,a5.ZR)("lynxscrollend")],(0,a9.G4)(null,null,S,{kind:"field",name:"_handleScrollUpperThresholdEventEnabled",static:!1,private:!1,access:{has:e=>"_handleScrollUpperThresholdEventEnabled"in e,get:e=>e._handleScrollUpperThresholdEventEnabled,set:(e,t)=>{e._handleScrollUpperThresholdEventEnabled=t}},metadata:e},k,O),(0,a9.G4)(null,null,w,{kind:"field",name:"_handleScrollLowerThresholdEventEnabled",static:!1,private:!1,access:{has:e=>"_handleScrollLowerThresholdEventEnabled"in e,get:e=>e._handleScrollLowerThresholdEventEnabled,set:(e,t)=>{e._handleScrollLowerThresholdEventEnabled=t}},metadata:e},L,A),(0,a9.G4)(null,null,_,{kind:"field",name:"_updateUpperThreshold",static:!1,private:!1,access:{has:e=>"_updateUpperThreshold"in e,get:e=>e._updateUpperThreshold,set:(e,t)=>{e._updateUpperThreshold=t}},metadata:e},I,F),(0,a9.G4)(null,null,C,{kind:"field",name:"_updateLowerThreshold",static:!1,private:!1,access:{has:e=>"_updateLowerThreshold"in e,get:e=>e._updateLowerThreshold,set:(e,t)=>{e._updateLowerThreshold=t}},metadata:e},R,M),(0,a9.G4)(null,null,T,{kind:"field",name:"_handleScrollEventEnabled",static:!1,private:!1,access:{has:e=>"_handleScrollEventEnabled"in e,get:e=>e._handleScrollEventEnabled,set:(e,t)=>{e._handleScrollEventEnabled=t}},metadata:e},P,z),(0,a9.G4)(null,null,x,{kind:"field",name:"_handleScrollEndEventEnabled",static:!1,private:!1,access:{has:e=>"_handleScrollEndEventEnabled"in e,get:e=>e._handleScrollEndEventEnabled,set:(e,t)=>{e._handleScrollEndEventEnabled=t}},metadata:e},N,H),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();#n;#a;#s=0;#o=0;constructor(e){(0,a9.zF)(this,H),this.#n=e}#r=()=>this.#n;#d=(0,a5.Ut)(()=>this.#n.shadowRoot,"#upper-threshold-observer");#h=(0,a5.Ut)(()=>this.#n.shadowRoot,"#lower-threshold-observer");#c=e=>{let{isIntersecting:t,target:n}=e[0],l=n.id;t&&("upper-threshold-observer"===l?this.#n.dispatchEvent(new CustomEvent("scrolltoupper",{...st.$,detail:this.#u()})):"lower-threshold-observer"===l&&this.#n.dispatchEvent(new CustomEvent("scrolltolower",{...st.$,detail:this.#u()})))};static observedAttributes=["upper-threshold","lower-threshold"];_handleScrollUpperThresholdEventEnabled=(0,a9.zF)(this,k,e=>{e?this.#n.setAttribute("x-enable-scrolltoupper-event",""):this.#n.removeAttribute("x-enable-scrolltoupper-event"),this.#m(e)});#m=((0,a9.zF)(this,O),sn(this.#r,this.#d,this.#c));_handleScrollLowerThresholdEventEnabled=(0,a9.zF)(this,L,e=>{e?this.#n.setAttribute("x-enable-scrolltolower-event",""):this.#n.removeAttribute("x-enable-scrolltolower-event"),this.#p(e)});#p=((0,a9.zF)(this,A),sn(this.#r,this.#h,this.#c));_updateUpperThreshold=(0,a9.zF)(this,I,(0,a5._8)(this.#d,"flex-basis",e=>`${parseInt(e)}px`));_updateLowerThreshold=((0,a9.zF)(this,F),(0,a9.zF)(this,R,(0,a5._8)(this.#h,"flex-basis",e=>`${parseInt(e)}px`)));#u(){let{scrollTop:e,scrollLeft:t,scrollHeight:n,scrollWidth:l}=this.#r();0===e&&(e-=this.#n.scrollHeight/2-this.#n.scrollTop),0===t&&(t-=this.#n.scrollWidth/2-this.#n.scrollLeft);let i={scrollTop:e,scrollLeft:t,scrollHeight:n,scrollWidth:l,isDragging:!1,deltaX:t-this.#s,deltaY:e-this.#o};return this.#s=t,this.#o=e,i}#v=((0,a9.zF)(this,M),()=>{this.#b&&!sl.k&&(clearTimeout(this.#a),this.#a=setTimeout(()=>{this.#g()},100)),this.#n.dispatchEvent(new CustomEvent("lynxscroll",{...st.$,detail:this.#u()}))});#g=()=>{this.#n.dispatchEvent(new CustomEvent("lynxscrollend",{...st.$,detail:this.#u()}))};#f=!1;_handleScrollEventEnabled=(0,a9.zF)(this,P,e=>{this.#f=e,this.#y()});#b=((0,a9.zF)(this,z),!1);_handleScrollEndEventEnabled=(0,a9.zF)(this,N,e=>{this.#b=e,this.#y()});#y(){this.#f||this.#b?(this.#r().addEventListener("scroll",this.#v),this.#r().addEventListener("scrollend",this.#g),this.#n.addEventListener("scroll",this.#v),this.#n.addEventListener("scrollend",this.#g),this.#s=0,this.#o=0):(this.#n.removeEventListener("scroll",this.#v),this.#n.removeEventListener("scrollend",this.#g))}connectedCallback(){}dispose(){}});n(42949),n(18723),n(14104);class sa{static eventName="__scrollIntoView";static observedAttributes=[];#n;#E=e=>{e.stopPropagation();let t=e.composedPath().filter(e=>e instanceof HTMLElement),n=[],l=this.#n;for(let e of t){if(e===l)break;n.push(e)}let i=this.#n.getAttribute("scroll-orientation"),a=null!==this.#n.getAttribute("scroll-x")||"both"===i||"horizontal"===i,s=null!==this.#n.getAttribute("scroll-y")||"both"===i||"vertical"===i,o=0,r=0;for(let{offsetTop:e,offsetLeft:t}of n)a&&(r+=t),s&&(o+=e);if(a)switch(e.detail.inline){case"center":r+=(e.target.clientWidth-this.#n.clientWidth)/2;break;case"end":r+=e.target.clientWidth-this.#n.clientWidth}if(s)switch(e.detail.block){case"center":o+=(e.target.clientHeight-this.#n.clientHeight)/2;break;case"end":o+=e.target.clientHeight-this.#n.clientHeight}l.scrollTo({behavior:"smooth"===e.detail.behavior?"smooth":"instant",left:r,top:o})};constructor(e){this.#n=e,this.#n.addEventListener(sa.eventName,this.#E,{passive:!1})}dispose(){this.#n.removeEventListener(sa.eventName,this.#E)}}n(15254);let ss=`<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
|
+
</style>
|
|
24
|
+
<div
|
|
25
|
+
class="mask placeholder-dom"
|
|
26
|
+
id="top-fade-mask"
|
|
27
|
+
part="top-fade-mask"
|
|
28
|
+
></div>
|
|
29
|
+
<div
|
|
30
|
+
class="observer-container placeholder-dom"
|
|
31
|
+
part="upper-threshold-observer"
|
|
32
|
+
>
|
|
33
|
+
<div
|
|
34
|
+
class="observer placeholder-dom"
|
|
35
|
+
id="upper-threshold-observer"
|
|
36
|
+
></div>
|
|
37
|
+
</div>
|
|
38
|
+
<slot></slot>
|
|
39
|
+
<div
|
|
40
|
+
class="observer-container placeholder-dom"
|
|
41
|
+
part="lower-threshold-observer"
|
|
42
|
+
>
|
|
43
|
+
<div
|
|
44
|
+
class="observer placeholder-dom"
|
|
45
|
+
id="lower-threshold-observer"
|
|
46
|
+
></div>
|
|
47
|
+
</div>
|
|
48
|
+
<div
|
|
49
|
+
class="mask placeholder-dom"
|
|
50
|
+
id="bot-fade-mask"
|
|
51
|
+
part="bot-fade-mask"
|
|
52
|
+
></div>`,so=/<\s*script/,sr=e=>{let{src:t}=e;if(t&&so.test(t))throw Error("detected <script, this is a potential XSS attack, please check your src");return`<img part="img" alt="" id="img" ${t?`src="${t}"`:""}/> `},sd=`<style>
|
|
53
|
+
#input:focus {
|
|
54
|
+
outline: none;
|
|
55
|
+
}
|
|
56
|
+
#form {
|
|
57
|
+
display: none;
|
|
58
|
+
}
|
|
59
|
+
</style>
|
|
60
|
+
<form id="form" part="form" method="dialog">
|
|
61
|
+
<input
|
|
62
|
+
id="input"
|
|
63
|
+
part="input"
|
|
64
|
+
step="any"
|
|
65
|
+
type="text"
|
|
66
|
+
inputmode="text"
|
|
67
|
+
spell-check="true"
|
|
68
|
+
/>
|
|
69
|
+
</form>`,sh=`<style>
|
|
70
|
+
.placeholder-dom {
|
|
71
|
+
display: none;
|
|
72
|
+
flex: 0 0 0;
|
|
73
|
+
align-self: stretch;
|
|
74
|
+
min-height: 0;
|
|
75
|
+
min-width: 0;
|
|
76
|
+
}
|
|
77
|
+
.observer-container {
|
|
78
|
+
flex-direction: inherit;
|
|
79
|
+
overflow: visible;
|
|
80
|
+
}
|
|
81
|
+
.observer {
|
|
82
|
+
display: flex;
|
|
83
|
+
}
|
|
84
|
+
</style>
|
|
85
|
+
<div id="content" part="content">
|
|
86
|
+
<div
|
|
87
|
+
class="observer-container placeholder-dom"
|
|
88
|
+
part="upper-threshold-observer"
|
|
89
|
+
>
|
|
90
|
+
<div
|
|
91
|
+
class="observer placeholder-dom"
|
|
92
|
+
id="upper-threshold-observer"
|
|
93
|
+
part="upper-threshold-sentinel"
|
|
94
|
+
></div>
|
|
95
|
+
</div>
|
|
96
|
+
<slot part="slot"></slot>
|
|
97
|
+
<div
|
|
98
|
+
class="observer-container placeholder-dom"
|
|
99
|
+
part="lower-threshold-observer"
|
|
100
|
+
>
|
|
101
|
+
<div
|
|
102
|
+
class="observer placeholder-dom"
|
|
103
|
+
id="lower-threshold-observer"
|
|
104
|
+
part="lower-threshold-sentinel"
|
|
105
|
+
></div>
|
|
106
|
+
</div>
|
|
107
|
+
</div>`,sc=`<style>
|
|
108
|
+
#dialog[open] {
|
|
109
|
+
top: 0;
|
|
110
|
+
left: 0;
|
|
111
|
+
right: 0;
|
|
112
|
+
bottom: 0;
|
|
113
|
+
position: fixed;
|
|
114
|
+
overscroll-behavior: contain;
|
|
115
|
+
scrollbar-width: none;
|
|
116
|
+
}
|
|
117
|
+
#dialog[open]::-webkit-scrollbar {
|
|
118
|
+
display: none;
|
|
119
|
+
}
|
|
120
|
+
#dialog::backdrop {
|
|
121
|
+
background-color: transparent;
|
|
122
|
+
}
|
|
123
|
+
.overlay-inner {
|
|
124
|
+
position: sticky;
|
|
125
|
+
top: 0;
|
|
126
|
+
width: 100%;
|
|
127
|
+
height: 100%;
|
|
128
|
+
pointer-events: none;
|
|
129
|
+
}
|
|
130
|
+
.overlay-inner > * {
|
|
131
|
+
pointer-events: auto;
|
|
132
|
+
}
|
|
133
|
+
.overlay-placeholder {
|
|
134
|
+
width: 100%;
|
|
135
|
+
height: 1px;
|
|
136
|
+
}
|
|
137
|
+
</style>
|
|
138
|
+
<dialog id="dialog" part="dialog">
|
|
139
|
+
<div class="overlay-inner">
|
|
140
|
+
<slot></slot>
|
|
141
|
+
</div>
|
|
142
|
+
<div class="overlay-placeholder"></div>
|
|
143
|
+
</dialog>`,su=`<style>
|
|
144
|
+
.bounce-container {
|
|
145
|
+
overflow: scroll;
|
|
146
|
+
overscroll-behavior: contain;
|
|
147
|
+
scroll-snap-type: y mandatory;
|
|
148
|
+
scroll-behavior: smooth;
|
|
149
|
+
scrollbar-width: none;
|
|
150
|
+
}
|
|
151
|
+
.overflow-placeholder {
|
|
152
|
+
min-height: 30%;
|
|
153
|
+
min-width: 100%;
|
|
154
|
+
flex-shrink: 0;
|
|
155
|
+
scroll-snap-align: none;
|
|
156
|
+
}
|
|
157
|
+
.not-shrink {
|
|
158
|
+
height: 100%;
|
|
159
|
+
width: 100%;
|
|
160
|
+
min-height: 100%;
|
|
161
|
+
min-width: 100%;
|
|
162
|
+
flex-shrink: 0;
|
|
163
|
+
}
|
|
164
|
+
.vertical {
|
|
165
|
+
display: flex;
|
|
166
|
+
flex-direction: column;
|
|
167
|
+
}
|
|
168
|
+
#content {
|
|
169
|
+
scroll-snap-align: center;
|
|
170
|
+
}
|
|
171
|
+
</style>
|
|
172
|
+
<div id="container" part="container" class="bounce-container not-shrink vertical">
|
|
173
|
+
<div
|
|
174
|
+
id="placeholder-top"
|
|
175
|
+
class="overflow-placeholder bounce-item"
|
|
176
|
+
part="placeholder-top"
|
|
177
|
+
></div>
|
|
178
|
+
<slot name="header"></slot>
|
|
179
|
+
<div id="content" part="content" class="not-shrink vertical">
|
|
180
|
+
<slot part="slot"></slot>
|
|
181
|
+
</div>
|
|
182
|
+
<slot name="footer"></slot>
|
|
183
|
+
<div
|
|
184
|
+
id="placeholder-bot"
|
|
185
|
+
class="overflow-placeholder bounce-item"
|
|
186
|
+
part="placeholder-bot"
|
|
187
|
+
></div>
|
|
188
|
+
</div>`,sm=`<style>
|
|
189
|
+
#bounce-padding {
|
|
190
|
+
display: none;
|
|
191
|
+
flex: 0 0 0;
|
|
192
|
+
align-self: stretch;
|
|
193
|
+
scroll-snap-align: none;
|
|
194
|
+
flex-basis: 100%;
|
|
195
|
+
}
|
|
196
|
+
#content {
|
|
197
|
+
position: relative;
|
|
198
|
+
display: flex;
|
|
199
|
+
flex: 0 0 100%;
|
|
200
|
+
flex-direction: inherit;
|
|
201
|
+
flex-wrap: inherit;
|
|
202
|
+
align-self: stretch;
|
|
203
|
+
justify-content: inherit;
|
|
204
|
+
align-items: inherit;
|
|
205
|
+
overflow: inherit;
|
|
206
|
+
scrollbar-width: none;
|
|
207
|
+
scroll-snap-align: start;
|
|
208
|
+
scroll-snap-type: inherit;
|
|
209
|
+
}
|
|
210
|
+
div::-webkit-scrollbar {
|
|
211
|
+
display: none;
|
|
212
|
+
}
|
|
213
|
+
#indicator-container {
|
|
214
|
+
display: none;
|
|
215
|
+
}
|
|
216
|
+
#indicator-container > div {
|
|
217
|
+
animation-name: indicator-dot;
|
|
218
|
+
animation-duration: 100ms;
|
|
219
|
+
}
|
|
220
|
+
@keyframes indicator-dot {
|
|
221
|
+
30%,
|
|
222
|
+
70% {
|
|
223
|
+
background-color: var(--indicator-color);
|
|
224
|
+
}
|
|
225
|
+
31%,
|
|
226
|
+
69% {
|
|
227
|
+
background-color: var(--indicator-active-color);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
</style>
|
|
231
|
+
<style id="indicator-style"></style>
|
|
232
|
+
<div id="bounce-padding" part="bounce-padding"></div>
|
|
233
|
+
<div id="indicator-container" part="indicator-container"></div>
|
|
234
|
+
<div id="content" part="content">
|
|
235
|
+
<slot part="slot-start" name="circular-start" id="circular-start"></slot>
|
|
236
|
+
<slot part="slot"></slot>
|
|
237
|
+
<slot part="slot-end" name="circular-end" id="circular-end"></slot>
|
|
238
|
+
</div>`,sp=`<style>
|
|
239
|
+
:host {
|
|
240
|
+
display: block;
|
|
241
|
+
}
|
|
242
|
+
.markdown-body {
|
|
243
|
+
display: block;
|
|
244
|
+
line-height: 1.4;
|
|
245
|
+
color: inherit;
|
|
246
|
+
word-break: break-word;
|
|
247
|
+
position: relative;
|
|
248
|
+
}
|
|
249
|
+
.markdown-body p {
|
|
250
|
+
margin: 0 0 0.75em 0;
|
|
251
|
+
}
|
|
252
|
+
.markdown-body h1,
|
|
253
|
+
.markdown-body h2,
|
|
254
|
+
.markdown-body h3,
|
|
255
|
+
.markdown-body h4,
|
|
256
|
+
.markdown-body h5,
|
|
257
|
+
.markdown-body h6 {
|
|
258
|
+
margin: 0.8em 0 0.4em 0;
|
|
259
|
+
}
|
|
260
|
+
.markdown-body ul,
|
|
261
|
+
.markdown-body ol {
|
|
262
|
+
margin: 0 0 0.75em 1.5em;
|
|
263
|
+
}
|
|
264
|
+
.markdown-body pre {
|
|
265
|
+
margin: 0 0 0.75em 0;
|
|
266
|
+
padding: 8px 12px;
|
|
267
|
+
border-radius: 6px;
|
|
268
|
+
background: #f6f8fa;
|
|
269
|
+
overflow: auto;
|
|
270
|
+
}
|
|
271
|
+
.markdown-body code {
|
|
272
|
+
font-family: ui-monospace, SFMono-Regular, SFMono, Menlo, Consolas,
|
|
273
|
+
"Liberation Mono", monospace;
|
|
274
|
+
}
|
|
275
|
+
.markdown-body pre code {
|
|
276
|
+
display: block;
|
|
277
|
+
padding: 0;
|
|
278
|
+
}
|
|
279
|
+
.markdown-body img {
|
|
280
|
+
max-width: 100%;
|
|
281
|
+
height: auto;
|
|
282
|
+
display: block;
|
|
283
|
+
}
|
|
284
|
+
.markdown-body .md-inline-view {
|
|
285
|
+
display: inline-block;
|
|
286
|
+
vertical-align: baseline;
|
|
287
|
+
}
|
|
288
|
+
.markdown-body .md-truncation {
|
|
289
|
+
position: absolute;
|
|
290
|
+
right: 0;
|
|
291
|
+
bottom: 0;
|
|
292
|
+
background-color: inherit;
|
|
293
|
+
}
|
|
294
|
+
.markdown-body .md-image-figure {
|
|
295
|
+
margin: 0 0 0.75em 0;
|
|
296
|
+
}
|
|
297
|
+
.markdown-body .md-image-caption {
|
|
298
|
+
margin-top: 4px;
|
|
299
|
+
color: #666;
|
|
300
|
+
font-size: 0.875em;
|
|
301
|
+
}
|
|
302
|
+
.markdown-body .md-text-mask-effect {
|
|
303
|
+
position: relative;
|
|
304
|
+
display: inline-block;
|
|
305
|
+
}
|
|
306
|
+
.markdown-body .md-text-mask-effect-overlay {
|
|
307
|
+
position: absolute;
|
|
308
|
+
inset: 0;
|
|
309
|
+
pointer-events: none;
|
|
310
|
+
user-select: none;
|
|
311
|
+
white-space: pre;
|
|
312
|
+
color: transparent;
|
|
313
|
+
-webkit-background-clip: text;
|
|
314
|
+
background-clip: text;
|
|
315
|
+
}
|
|
316
|
+
.markdown-body a {
|
|
317
|
+
color: #0366d6;
|
|
318
|
+
text-decoration: underline;
|
|
319
|
+
}
|
|
320
|
+
</style>
|
|
321
|
+
<style id="markdown-style"></style>
|
|
322
|
+
<div id="markdown-root" part="root" class="markdown-body"></div>`,sv=`<style>
|
|
323
|
+
#textarea:focus,
|
|
324
|
+
#textarea:focus-visible {
|
|
325
|
+
border: inherit;
|
|
326
|
+
outline: inherit;
|
|
327
|
+
}
|
|
328
|
+
</style>
|
|
329
|
+
<form id="form" part="form" method="dialog">
|
|
330
|
+
<textarea id="textarea" part="textarea"></textarea>
|
|
331
|
+
</form>`,sb=`<style>
|
|
332
|
+
#bounce-padding {
|
|
333
|
+
display: none;
|
|
334
|
+
flex: 0 0 0;
|
|
335
|
+
align-self: stretch;
|
|
336
|
+
scroll-snap-align: none;
|
|
337
|
+
flex-basis: 100%;
|
|
338
|
+
}
|
|
339
|
+
#content {
|
|
340
|
+
flex: 0 0 100%;
|
|
341
|
+
flex-direction: row;
|
|
342
|
+
align-self: stretch;
|
|
343
|
+
display: inherit;
|
|
344
|
+
justify-content: inherit;
|
|
345
|
+
align-items: inherit;
|
|
346
|
+
overflow: inherit;
|
|
347
|
+
scrollbar-width: none;
|
|
348
|
+
scroll-snap-type: inherit;
|
|
349
|
+
}
|
|
350
|
+
#content::-webkit-scrollbar {
|
|
351
|
+
display: none;
|
|
352
|
+
}
|
|
353
|
+
</style>
|
|
354
|
+
<div id="bounce-padding" part="bounce-padding"></div>
|
|
355
|
+
<div id="content" part="content">
|
|
356
|
+
<slot></slot>
|
|
357
|
+
</div>`,sg=`<style>
|
|
358
|
+
iframe {
|
|
359
|
+
width: 100%;
|
|
360
|
+
height: 100%;
|
|
361
|
+
border: none;
|
|
362
|
+
}
|
|
363
|
+
</style>
|
|
364
|
+
<iframe id="webview" part="webview"></iframe>`,sf=CSS.supports("-webkit-box-reflect: above")&&CSS.supports("transition-behavior:allow-discrete")&&CSS.supports("content-visibility: auto");class sy{static observedAttributes=[];static observedCSSProperties=["--lynx-display","--lynx-linear-orientation"];#n;constructor(e){this.#n=e,this.cssPropertyChangedHandler={"--lynx-display":this.#S,"--lynx-linear-orientation":this.#w}}#S=(0,a5.H$)(()=>this.#n,"lynx-computed-display");#w=(0,a5.H$)(()=>this.#n,"lynx-linear-orientation")}let sE=sf?void 0:sy;j=[(0,a5.uA)("scroll-view",[sE,a6.O,se,a7,si,sa],ss)],$=[],V=HTMLElement,a4=class extends V{static #e=G=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(V[Symbol.metadata]??null):void 0;(0,a9.G4)(null,D={value:G},j,{kind:"class",name:G.name,metadata:e},null,$),a4=G=D.value,e&&Object.defineProperty(G,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static notToFilterFalseAttributes=new Set(["enable-scroll"]);static scrollInterval=100;#_;scrollTo(){let e;for(var t=arguments.length,n=Array(t),l=0;l<t;l++)n[l]=arguments[l];if("string"==typeof n[0].offset){let t=parseFloat(n[0].offset);e={left:t,top:t}}else"number"==typeof n[0].offset&&(e={left:n[0].offset,top:n[0].offset});if("number"==typeof n[0].index){let t=n[0].index;if(0===t)this.scrollTop=0,this.scrollLeft=0;else if(t>0&&t<this.childElementCount){let n=this.children.item(t);n instanceof HTMLElement&&(e=e?{left:n.offsetLeft+e.left,top:n.offsetTop+e.top}:{left:n.offsetLeft,top:n.offsetTop})}}e?this.scrollTo({...e,behavior:n[0].smooth?"smooth":"auto"}):super.scrollTo(...n)}autoScroll(e){if(clearInterval(this.#_),e.start){let t=("number"==typeof e.rate?e.rate:parseFloat(e.rate))*a4.scrollInterval/1e3;this.#_=setInterval(e=>{e.scrollBy({left:t,top:t,behavior:"smooth"})},a4.scrollInterval,this)}}get[sl.l](){return this}static #C=(0,a9.zF)(G,$)},a4=G,n(21301),n(52205),n(40768),n(76235);let sS=Symbol("__src"),sw=Symbol("__src"),s_={loadstart:{code:0,type:"init"},canplay:{code:1,type:"playable"},stalled:{code:2,type:"stalled"},error:{code:3,type:"error"}},sC={stop:{code:0,type:"stopped"},play:{code:1,type:"playing"},pause:{code:2,type:"paused"}};(a2=a8||(a8={}))[a2.SrcError=-1]="SrcError",a2[a2.SrcJsonError=-2]="SrcJsonError",a2[a2.DownloadError=-3]="DownloadError",a2[a2.PlayerFinishedError=-4]="PlayerFinishedError",a2[a2.PlayerLoadingError=-5]="PlayerLoadingError",a2[a2.PlayerPlaybackError=-6]="PlayerPlaybackError";let sT=(X=[],Z=[],q=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;W=[(0,a5._y)("src",!0)],U=[(0,a5._y)("loop",!0)],B=[(0,a5._y)("pause-on-hide",!0)],(0,a9.G4)(this,null,W,{kind:"method",name:"_handleSrc",static:!1,private:!1,access:{has:e=>"_handleSrc"in e,get:e=>e._handleSrc},metadata:e},null,X),(0,a9.G4)(this,null,B,{kind:"method",name:"_handlePauseOnHide",static:!1,private:!1,access:{has:e=>"_handlePauseOnHide"in e,get:e=>e._handlePauseOnHide},metadata:e},null,X),(0,a9.G4)(null,null,U,{kind:"field",name:"_handleLoop",static:!1,private:!1,access:{has:e=>"_handleLoop"in e,get:e=>e._handleLoop,set:(e,t)=>{e._handleLoop=t}},metadata:e},Z,q),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["src","loop","pause-on-hide"];#n=(0,a9.zF)(this,X);#T=(0,a5.Ut)(()=>this.#n.shadowRoot,"#audio");_handleSrc(e){var t,n;let l;try{l=JSON.parse(e||"")||{}}catch(e){console.error(`JSON.parse src error: ${e}`),l={}}null===e?this.#n.dispatchEvent(new CustomEvent("error",{...st.$,detail:{code:a8.SrcError,msg:"",from:"res loader",currentSrcID:null==(t=this.#n[sS])?void 0:t.id}})):((null==l?void 0:l.id)===void 0||(null==l?void 0:l.play_url)===void 0)&&this.#n.dispatchEvent(new CustomEvent("error",{...st.$,detail:{code:a8.SrcJsonError,msg:"",from:"res loader",currentSrcID:null==(n=this.#n[sS])?void 0:n.id}})),this.#n[sS]=l,this.#n[sw]=void 0,this.#n.stop()}_handleLoop=(0,a9.zF)(this,Z,(0,a5.H$)(this.#T,"loop"));#x=((0,a9.zF)(this,q),()=>{"hidden"===document.visibilityState&&this.#n.pause()});_handlePauseOnHide(e){null!==e?document.addEventListener("visibilitychange",this.#x,{passive:!0}):document.removeEventListener("visibilitychange",this.#x)}constructor(e){this.#n=e}});class sx{static observedAttributes=[];#n;#k;#T=(0,a5.Ut)(()=>this.#n.shadowRoot,"#audio");#O=e=>{var t;let n=Number(this.#n.getAttribute("interval")),l=Number.isNaN(n)?0:n;this.#k=setInterval(()=>{var e;this.#n.dispatchEvent(new CustomEvent("timeupdate",{...st.$,detail:{currentTime:this.#T().currentTime,currentSrcID:null==(e=this.#n[sS])?void 0:e.id}}))},l);let i=sC[e.type];this.#n.dispatchEvent(new CustomEvent("playbackstatechanged",{...st.$,detail:{code:null==i?void 0:i.code,type:null==i?void 0:i.type,currentSrcID:null==(t=this.#n[sS])?void 0:t.id}}))};#L=e=>{var t;clearInterval(this.#k);let n=sC[e.type];this.#n.dispatchEvent(new CustomEvent("playbackstatechanged",{...st.$,detail:{code:null==n?void 0:n.code,type:null==n?void 0:n.type,currentSrcID:null==(t=this.#n[sS])?void 0:t.id}}))};#A=e=>{var t;let n=s_[e.type];this.#n.dispatchEvent(new CustomEvent("loadingstatechanged",{...st.$,detail:{code:null==n?void 0:n.code,type:null==n?void 0:n.type,currentSrcID:null==(t=this.#n[sS])?void 0:t.id}}))};#I=e=>{var t,n,l;this.#A(e);let i=null==(n=e.target)||null==(t=n.error)?void 0:t.code,a=i===MediaError.MEDIA_ERR_DECODE?a8.PlayerLoadingError:a8.PlayerPlaybackError;i===MediaError.MEDIA_ERR_DECODE&&(a=a8.PlayerLoadingError),this.#n.dispatchEvent(new CustomEvent("error",{...st.$,detail:{code:a,msg:"",from:"player",currentSrcID:null==(l=this.#n[sS])?void 0:l.id}}))};#F=()=>{var e;let t=null!==this.#n.getAttribute("loop");this.#n.dispatchEvent(new CustomEvent("finished",{...st.$,detail:{loop:t,currentSrcID:null==(e=this.#n[sS])?void 0:e.id}}))};constructor(e){this.#n=e}connectedCallback(){let e=this.#T();e.addEventListener("play",this.#O,{passive:!0}),e.addEventListener("pause",this.#L,{passive:!0}),e.addEventListener("ended",this.#F,{passive:!0}),e.addEventListener("loadstart",this.#A,{passive:!0}),e.addEventListener("canplay",this.#A,{passive:!0}),e.addEventListener("stalled",this.#A,{passive:!0}),e.addEventListener("error",this.#I,{passive:!0})}}K=[(0,a5.uA)("x-audio-tt",[a6.O,sT,sx],'<audio id="audio"></audio>')],Q=[],ee=HTMLElement,class extends ee{static #e=J=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(ee[Symbol.metadata]??null):void 0;(0,a9.G4)(null,Y={value:J},K,{kind:"class",name:J.name,metadata:e},null,Q),J=Y.value,e&&Object.defineProperty(J,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(J,Q)})();#R=(0,a5.Ut)(()=>this.shadowRoot,"#audio");#T=(0,a5.Ut)(()=>this.shadowRoot,"#audio");#M=(0,a5.H$)(this.#T,"src");[sS];[sw];#P(e,t){var n;this.dispatchEvent(new CustomEvent("error",{...st.$,detail:{code:e,msg:"",from:t,currentSrcID:null==(n=this[sS])?void 0:n.id}}))}#z=()=>{let e,t=this[sS];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[sw]=new Promise(async(n,l)=>{var i;this.dispatchEvent(new CustomEvent("srcloadingstatechanged",{...st.$,detail:{code:0,type:"loading",currentSrcID:t.id}}));let a=await fetch(t.play_url,{headers:e});if(!a.ok){this.#P(a8.DownloadError,"res loader"),l();return}if(this.dispatchEvent(new CustomEvent("srcloadingstatechanged",{...st.$,detail:{code:1,type:"success",currentSrcID:t.id}})),null==(i=a.headers.get("content-type"))?void 0:i.toLowerCase().startsWith("text/html")){this.#P(a8.PlayerPlaybackError,"player"),l();return}let s=await a.blob(),o=URL.createObjectURL(s);this.#M(o),n()}),this[sw].catch(()=>{})}};play(){var e,t;return this[sw]||this.#z(),null==(e=this[sw])||e.then(()=>{let e=this.#R();e.currentTime=0;try{e.play().catch(()=>{this.#P(a8.PlayerPlaybackError,"player")})}catch{this.#P(a8.PlayerPlaybackError,"player")}},()=>{}),{currentSrcID:null==(t=this[sS])?void 0:t.id,loadingSrcID:""}}stop(){var e,t;let n=this.#R(),l=sC.stop;return this.dispatchEvent(new CustomEvent("playbackstatechanged",{...st.$,detail:{code:null==l?void 0:l.code,type:null==l?void 0:l.type,currentSrcID:null==(e=this[sS])?void 0:e.id}})),n.currentTime=0,n.pause(),{currentSrcID:null==(t=this[sS])?void 0:t.id}}pause(){var e;return this.#R().pause(),{currentSrcID:null==(e=this[sS])?void 0:e.id}}resume(){var e;return this.#R().play(),{currentSrcID:null==(e=this[sS])?void 0:e.id,loadingSrcID:""}}seek(e){var t,n;return this.#R().currentTime=(e.currentTime||0)/1e3,this.dispatchEvent(new CustomEvent("seek",{...st.$,detail:{seekresult:1,currentSrcID:null==(t=this[sS])?void 0:t.id}})),{currentSrcID:null==(n=this[sS])?void 0:n.id}}mute(e){var t;return this.#R().muted=e.mute,{currentSrcID:null==(t=this[sS])?void 0:t.id}}playerInfo(){var e,t;let n=this.#R(),l=n.buffered,i=l.end(l.length-1);return{currentSrcID:null==(e=this[sS])?void 0:e.id,duration:1e3*n.duration,playbackState:(t=n)?t.paused?2*!t.ended:t.currentTime>0?1:3:-1,currentTime:n.currentTime,cacheTime:i}}prepare(){this[sw]||this.#z()}setVolume(e){return this.#R().volume=e.volume,{code:1}}};let sk=(ei=[],ea=[],es=[],eo=[],er=[],ed=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;et=[(0,a5._y)("name",!0)],en=[(0,a5._y)("height",!0)],el=[(0,a5._y)("width",!0)],(0,a9.G4)(null,null,et,{kind:"field",name:"handleName",static:!1,private:!1,access:{has:e=>"handleName"in e,get:e=>e.handleName,set:(e,t)=>{e.handleName=t}},metadata:e},ei,ea),(0,a9.G4)(null,null,en,{kind:"field",name:"handleHeight",static:!1,private:!1,access:{has:e=>"handleHeight"in e,get:e=>e.handleHeight,set:(e,t)=>{e.handleHeight=t}},metadata:e},es,eo),(0,a9.G4)(null,null,el,{kind:"field",name:"handleWidth",static:!1,private:!1,access:{has:e=>"handleWidth"in e,get:e=>e.handleWidth,set:(e,t)=>{e.handleWidth=t}},metadata:e},er,ed),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["name","height","width"];#n;#N;#H=(0,a5.Ut)(()=>this.#n.shadowRoot,"#canvas");constructor(e){this.#n=e}handleName=(0,a9.zF)(this,ei,(0,a5.H$)(this.#H,"name"));handleHeight=((0,a9.zF)(this,ea),(0,a9.zF)(this,es,(0,a5.H$)(this.#H,"height")));handleWidth=((0,a9.zF)(this,eo),(0,a9.zF)(this,er,(0,a5.H$)(this.#H,"width")));#D=((0,a9.zF)(this,ed),e=>{let{contentRect:t}=e[0],n=this.#n.shadowRoot.firstElementChild;if(n){let{height:e,width:l}=t;e*=window.devicePixelRatio,l*=window.devicePixelRatio;let i=new CustomEvent("resize",{...st.$,detail:{height:e,width:l}});i.height=e,i.width=l,n.dispatchEvent(i)}});#G(){this.#N||(this.#N=new ResizeObserver(this.#D),this.#N.observe(this.#n))}#j(){var e;null==(e=this.#N)||e.disconnect(),this.#N=void 0}connectedCallback(){this.#G()}dispose(){this.#j()}});eu=[(0,a5.uA)("x-canvas",[a6.O,sk],(0,a5.qy)`<canvas id="canvas" part="canvas"></canvas>`)],em=[],ep=HTMLElement,class extends ep{static #e=ec=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(ep[Symbol.metadata]??null):void 0;(0,a9.G4)(null,eh={value:ec},eu,{kind:"class",name:ec.name,metadata:e},null,em),ec=eh.value,e&&Object.defineProperty(ec,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(ec,em)})()};let sO=(eg=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;ev=[(0,a5._y)("granularity",!0)],eb=[(0,a5.ZR)("offset")],(0,a9.G4)(this,null,ev,{kind:"method",name:"_handleGranularity",static:!1,private:!1,access:{has:e=>"_handleGranularity"in e,get:e=>e._handleGranularity},metadata:e},null,eg),(0,a9.G4)(this,null,eb,{kind:"method",name:"_enableOffsetEvent",static:!1,private:!1,access:{has:e=>"_enableOffsetEvent"in e,get:e=>e._enableOffsetEvent},metadata:e},null,eg),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();#n=(0,a9.zF)(this,eg);#$=.01;#V=0;constructor(e){this.#n=e}static observedAttributes=["granularity"];_handleGranularity(e){e&&""!==e?this.#$=parseFloat(e):this.#$=.01}_enableOffsetEvent(e){e?this.#n.addEventListener("scroll",this.#v,{passive:!0}):this.#n.removeEventListener("scroll",this.#v)}#v=()=>{let e=this.#n.scrollTop;(Math.abs(this.#V-e)>this.#$||0===this.#n.scrollTop||1>=Math.abs(this.#n.scrollHeight-this.#n.clientHeight-this.#n.scrollTop))&&(this.#V=e,this.#n.dispatchEvent(new CustomEvent("offset",{...st.$,detail:{offset:e,height:this.#n[sL]}})))}}),sL=Symbol("scrollableLength"),sA=Symbol("isHeaderShowing"),sI=Symbol("resizeObserver"),sF=Symbol("slotKid");eE=[(0,a5.uA)("x-foldview-ng",[sE,a6.O,sO])],eS=[],ew=HTMLElement,class extends ew{static #e=ey=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(ew[Symbol.metadata]??null):void 0;(0,a9.G4)(null,ef={value:ey},eE,{kind:"class",name:ey.name,metadata:e},null,eS),ey=ef.value,e&&Object.defineProperty(ey,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static notToFilterFalseAttributes=new Set(["scroll-enable"]);[sF];[sI]=new ResizeObserver(e=>{for(let t of e)"X-FOLDVIEW-HEADER-NG"===t.target.tagName?this.#W=t.contentRect.height:"X-FOLDVIEW-TOOLBAR-NG"===t.target.tagName&&(this.#U=t.contentRect.height);this[sF]&&(this[sF].style.top=`${this.#W-this.#U}px`)});#W=0;#U=0;get[sL](){return this.#W-this.#U}get[sA](){return this[sL]-this.scrollTop>=1}get scrollTop(){return super.scrollTop}set scrollTop(e){e>this[sL]?e=this[sL]:e<0&&(e=0),super.scrollTop=e}setFoldExpanded(e){let{offset:t,smooth:n=!0}=e,l=parseFloat(t);this.scrollTo({top:Math.min(Math.max(l,0),this[sL]),behavior:n?"smooth":"instant"})}get[sl.l](){return this}disconnectedCallback(){var e;null==(e=this[sI])||e.disconnect(),this[sI]=void 0}static #C=(0,a9.zF)(ey,eS)};let sR=(e,t)=>{let n=e.parentElement;if((null==n?void 0:n.tagName)==="LYNX-WRAPPER"&&(n=n.parentElement),(null==n?void 0:n.tagName)===t)return n};eT=[(0,a5.uA)("x-foldview-header-ng",[sE,a6.O])],ex=[],ek=HTMLElement,(class extends ek{static #e=eC=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(ek[Symbol.metadata]??null):void 0;(0,a9.G4)(null,e_={value:eC},eT,{kind:"class",name:eC.name,metadata:e},null,ex),eC=e_.value,e&&Object.defineProperty(eC,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(eC,ex)})();#B=void 0;connectedCallback(){var e;let t=sR(this,"X-FOLDVIEW-NG");this.#B=null==t?void 0:t[sI],null==(e=this.#B)||e.observe(this)}dispose(){var e;null==(e=this.#B)||e.unobserve(this)}}),eA=[(0,a5.uA)("x-foldview-slot-drag-ng",[sE,a6.O])],eI=[],eF=HTMLElement,(class extends eF{static #e=eL=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(eF[Symbol.metadata]??null):void 0;(0,a9.G4)(null,eO={value:eL},eA,{kind:"class",name:eL.name,metadata:e},null,eI),eL=eO.value,e&&Object.defineProperty(eL,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(eL,eI)})()}),n(74678),n(55910),n(76691),n(72919),n(37891),n(49678);class sM{#X=0;#Z=new WeakMap;#q;#Y=0;#J=0;#K=null;#Q;#ee=0;#n;static observedAttributes=[];constructor(e){this.#n=e,this.#n.addEventListener("touchmove",this.#et,{passive:!1}),this.#n.addEventListener("touchstart",this.#en,{passive:!0}),this.#n.addEventListener("touchend",this.#el,{passive:!0}),this.#n.addEventListener("wheel",this.#ei,{passive:!1})}#ea(e){let t=e[sl.l];return t instanceof Element?t:e}#es(e){return[...new Set(e.map(e=>this.#ea(e)))]}#eo(e){let t;if("function"==typeof e.computedStyleMap)try{var n;t=(null==(n=e.computedStyleMap().get("overflow-y"))?void 0:n.toString())??"visible"}catch{t=getComputedStyle(e).overflowY||"visible"}else t=getComputedStyle(e).overflowY||"visible";return"auto"===t||"scroll"===t||"hidden"===t||"overlay"===t}#er(e){var t;return null==(t=this.#q)?void 0:t.find(t=>{if(this.#eo(t)&&t.scrollHeight>t.clientHeight){let n=e<0&&0!==t.scrollTop,l=e>0&&Math.abs(t.scrollHeight-t.clientHeight-t.scrollTop)>1;return n||l}return!1})}#ed(e,t){let n=this.#Z.get(e)??0;n+=t,this.#Z.set(e,n),e.scrollTop=n}#et=e=>{let t=this.#eh();if(!t)return;let{pageY:n,pageX:l}=e.touches.item(0),i=this.#Y-n;if(null===this.#K){let e=this.#J-l;this.#K=Math.abs(i)>Math.abs(e)}!1!==this.#K&&(e.cancelable&&e.preventDefault(),this.#ec(i,t),this.#Y=n,this.#J=l)};#ei=e=>{let t=this.#eh();if(!t||Math.abs(e.deltaY)<=Math.abs(e.deltaX))return;let n=e.composedPath().filter(e=>e instanceof Element&&this.#n.contains(e)&&e!==this.#n),{clientX:l,clientY:i}=e,a=document.elementsFromPoint(l,i).filter(e=>this.#n.contains(e));if(this.#q=this.#es([...n,...a]),this.#X=t.scrollTop,this.#q)for(let e of this.#q)this.#Z.set(e,e.scrollTop);e.cancelable&&e.preventDefault(),this.#ec(e.deltaY,t)};#eh(){let e=this.#n.parentElement;if(e&&"X-FOLDVIEW-NG"===e.tagName)return e}#en=e=>{var t;let{pageX:n,pageY:l,clientX:i,clientY:a}=e.touches.item(0),s=e.composedPath().filter(e=>e instanceof Element&&this.#n.contains(e)&&e!==this.#n),o=document.elementsFromPoint(i,a).filter(e=>this.#n.contains(e)&&e!==this.#n);for(let e of(this.#q=this.#es([...s,...o]),this.#Y=l,this.#J=n,this.#X=(null==(t=this.#eh())?void 0:t.scrollTop)??0,this.#q))this.#Z.set(e,e.scrollTop);this.#K=null,this.#Q=void 0};#el=()=>{if(this.#K=null,this.#Q){let e=this.#eh();(this.#Q!==e||e[sA])&&this.#Q.scrollBy({top:4*this.#ee,behavior:"smooth"})}};#ec(e,t){let n=this.#er(e);t[sA]&&e>0||e<0&&!n||!t[sA]&&!n?(t.scrollBy({top:e,behavior:"smooth"}),this.#X+=e,t.scrollTop=this.#X,this.#Q=t):n&&(this.#Q=n,this.#ed(n,e)),this.#ee=e}}eP=[(0,a5.uA)("x-foldview-slot-ng",[sE,a6.O,sM])],ez=[],eN=HTMLElement,(class extends eN{static #e=eM=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(eN[Symbol.metadata]??null):void 0;(0,a9.G4)(null,eR={value:eM},eP,{kind:"class",name:eM.name,metadata:e},null,ez),eM=eR.value,e&&Object.defineProperty(eM,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(eM,ez)})();connectedCallback(){this.matches("x-foldview-ng>x-foldview-slot-ng:first-of-type")&&(this.parentElement[sF]=this)}}),eG=[(0,a5.uA)("x-foldview-toolbar-ng",[sE,a6.O])],ej=[],e$=HTMLElement,class extends e${static #e=eD=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(e$[Symbol.metadata]??null):void 0;(0,a9.G4)(null,eH={value:eD},eG,{kind:"class",name:eD.name,metadata:e},null,ej),eD=eH.value,e&&Object.defineProperty(eD,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(eD,ej)})();#B=void 0;connectedCallback(){var e;let t=sR(this,"X-FOLDVIEW-NG");this.#B=null==t?void 0:t[sI],null==(e=this.#B)||e.observe(this)}dispose(){var e;null==(e=this.#B)||e.unobserve(this)}};let sP=(eW=[],eU=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;eV=[(0,a5._y)("drop-shadow",!0)],(0,a9.G4)(null,null,eV,{kind:"field",name:"_handleBlurRadius",static:!1,private:!1,access:{has:e=>"_handleBlurRadius"in e,get:e=>e._handleBlurRadius,set:(e,t)=>{e._handleBlurRadius=t}},metadata:e},eW,eU),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["drop-shadow"];#n;#eu=(0,a5.Ut)(()=>this.#n.shadowRoot,"#img");_handleBlurRadius=(0,a9.zF)(this,eW,(0,a5._8)(this.#eu,"--drop-shadow",void 0,!0));constructor(e){(0,a9.zF)(this,eU),this.#n=e}}),sz=(eJ=[],eK=[],eQ=[],e0=[],e1=[],e4=[],e2=[],e3=[],e8=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;eB=[(0,a5._y)("src",!0)],eX=[(0,a5._y)("placeholder",!0)],eZ=[(0,a5._y)("blur-radius",!0)],eq=[(0,a5._y)("crossorigin",!0)],eY=[(0,a5._y)("referrerpolicy",!0)],(0,a9.G4)(this,null,eX,{kind:"method",name:"_preloadPlaceholder",static:!1,private:!1,access:{has:e=>"_preloadPlaceholder"in e,get:e=>e._preloadPlaceholder},metadata:e},null,eJ),(0,a9.G4)(null,null,eB,{kind:"field",name:"_handleSrc",static:!1,private:!1,access:{has:e=>"_handleSrc"in e,get:e=>e._handleSrc,set:(e,t)=>{e._handleSrc=t}},metadata:e},eK,eQ),(0,a9.G4)(null,null,eZ,{kind:"field",name:"_handleBlurRadius",static:!1,private:!1,access:{has:e=>"_handleBlurRadius"in e,get:e=>e._handleBlurRadius,set:(e,t)=>{e._handleBlurRadius=t}},metadata:e},e0,e1),(0,a9.G4)(null,null,eq,{kind:"field",name:"_handleCrossorigin",static:!1,private:!1,access:{has:e=>"_handleCrossorigin"in e,get:e=>e._handleCrossorigin,set:(e,t)=>{e._handleCrossorigin=t}},metadata:e},e4,e2),(0,a9.G4)(null,null,eY,{kind:"field",name:"_handleReferrerpolicy",static:!1,private:!1,access:{has:e=>"_handleReferrerpolicy"in e,get:e=>e._handleReferrerpolicy,set:(e,t)=>{e._handleReferrerpolicy=t}},metadata:e},e3,e8),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["src","placeholder","blur-radius","crossorigin","referrerpolicy"];#n=(0,a9.zF)(this,eJ);#eu=(0,a5.Ut)(()=>this.#n.shadowRoot,"#img");_handleSrc=(0,a9.zF)(this,eK,(0,a5.H$)(this.#eu,"src",e=>e||this.#n.getAttribute("placeholder")));_preloadPlaceholder(e){e&&(new Image().src=e)}_handleBlurRadius=((0,a9.zF)(this,eQ),(0,a9.zF)(this,e0,(0,a5._8)(this.#eu,"--blur-radius",void 0,!0)));_handleCrossorigin=((0,a9.zF)(this,e1),(0,a9.zF)(this,e4,(0,a5.H$)(this.#eu,"crossorigin")));_handleReferrerpolicy=((0,a9.zF)(this,e2),(0,a9.zF)(this,e3,(0,a5.H$)(this.#eu,"referrerpolicy")));#em=((0,a9.zF)(this,e8),()=>{let e=this.#eu().src,t=this.#n.getAttribute("placeholder");t&&e!==t&&(this.#eu().src=t)});constructor(e){this.#n=e,this.#eu().addEventListener("error",this.#em)}connectedCallback(){(null===this.#n.getAttribute("src")||""===this.#n.getAttribute("src"))&&this._handleSrc(null)}}),sN=(e6=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;e9=[(0,a5.ZR)("load")],e5=[(0,a5.ZR)("error")],(0,a9.G4)(this,null,e9,{kind:"method",name:"_enableLoadEvent",static:!1,private:!1,access:{has:e=>"_enableLoadEvent"in e,get:e=>e._enableLoadEvent},metadata:e},null,e6),(0,a9.G4)(this,null,e5,{kind:"method",name:"_enableErrorEvent",static:!1,private:!1,access:{has:e=>"_enableErrorEvent"in e,get:e=>e._enableErrorEvent},metadata:e},null,e6),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=[];#n=(0,a9.zF)(this,e6);#ep=[];#eu=(0,a5.Ut)(()=>this.#n.shadowRoot,"#img");_enableLoadEvent(e){e?this.#eu().addEventListener("load",this.#ev,{passive:!0}):(this.#eu().removeEventListener("load",this.#ev),this.#ep=[])}_enableErrorEvent(e){e?this.#eu().addEventListener("error",this.#eb,{passive:!0}):this.#eu().removeEventListener("error",this.#eb)}#ev=()=>{let e=new CustomEvent("load",{...st.$,detail:{width:this.#eu().naturalWidth,height:this.#eu().naturalHeight}});this.#n.isConnected?this.#n.dispatchEvent(e):this.#ep.push(e)};connectedCallback(){for(;this.#n.isConnected&&this.#ep.length;)this.#n.dispatchEvent(this.#ep.shift())}#eb=()=>{this.#n.dispatchEvent(new CustomEvent("error",{...st.$,detail:{}}))};constructor(e){this.#n=e}});tt=[(0,a5.uA)("filter-image",[a6.O,sz,sP,sN],sr({}))],tn=[],tl=HTMLElement,(class extends tl{static #e=te=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(tl[Symbol.metadata]??null):void 0;(0,a9.G4)(null,e7={value:te},tt,{kind:"class",name:te.name,metadata:e},null,tn),te=e7.value,e&&Object.defineProperty(te,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(te,tn)})()}),ts=[(0,a5.uA)("x-image",[a6.O,sz,sN],sr({}))],to=[],tr=HTMLElement,class extends tr{static #e=ta=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(tr[Symbol.metadata]??null):void 0;(0,a9.G4)(null,ti={value:ta},ts,{kind:"class",name:ta.name,metadata:e},null,to),ta=ti.value,e&&Object.defineProperty(ta,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(ta,to)})()};let sH=(tp=[],tv=[],tb=[],tg=[],tf=[],ty=[],tE=[],tS=[],tw=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;td=[(0,a5._y)("confirm-type",!0)],th=[(0,a5._y)("maxlength",!0)],tc=[(0,a5._y)("readonly",!0)],tu=[(0,a5._y)("type",!0)],tm=[(0,a5._y)("ios-spell-check",!0),(0,a5._y)("spell-check",!0)],(0,a9.G4)(this,null,tu,{kind:"method",name:"_handleType",static:!1,private:!1,access:{has:e=>"_handleType"in e,get:e=>e._handleType},metadata:e},null,tp),(0,a9.G4)(null,null,td,{kind:"field",name:"_handlerConfirmType",static:!1,private:!1,access:{has:e=>"_handlerConfirmType"in e,get:e=>e._handlerConfirmType,set:(e,t)=>{e._handlerConfirmType=t}},metadata:e},tv,tb),(0,a9.G4)(null,null,th,{kind:"field",name:"_handlerMaxlength",static:!1,private:!1,access:{has:e=>"_handlerMaxlength"in e,get:e=>e._handlerMaxlength,set:(e,t)=>{e._handlerMaxlength=t}},metadata:e},tg,tf),(0,a9.G4)(null,null,tc,{kind:"field",name:"_handleReadonly",static:!1,private:!1,access:{has:e=>"_handleReadonly"in e,get:e=>e._handleReadonly,set:(e,t)=>{e._handleReadonly=t}},metadata:e},ty,tE),(0,a9.G4)(null,null,tm,{kind:"field",name:"_handleSpellCheck",static:!1,private:!1,access:{has:e=>"_handleSpellCheck"in e,get:e=>e._handleSpellCheck,set:(e,t)=>{e._handleSpellCheck=t}},metadata:e},tS,tw),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["confirm-type","maxlength","readonly","type","ios-spell-check","spell-check"];#n=(0,a9.zF)(this,tp);#eg=(0,a5.Ut)(()=>this.#n.shadowRoot,"#input");_handlerConfirmType=(0,a9.zF)(this,tv,(0,a5.H$)(this.#eg,"enterkeyhint",e=>null===e?"send":e));_handlerMaxlength=((0,a9.zF)(this,tb),(0,a9.zF)(this,tg,(0,a5.H$)(this.#eg,"maxlength",e=>null===e?"140":e)));_handleReadonly=((0,a9.zF)(this,tf),(0,a9.zF)(this,ty,(0,a5.H$)(this.#eg,"readonly",e=>null!==e?"":null)));#ef=((0,a9.zF)(this,tE),(0,a5.H$)(this.#eg,"type"));#ey=(0,a5.H$)(this.#eg,"inputmode");_handleType(e){let t="text",n="text";"digit"===e?t="numeric":"number"===e?t="decimal":"email"===e?t="email":"tel"===e?t="tel":n=e,this.#ey(t),this.#ef(n)}_handleSpellCheck=(0,a9.zF)(this,tS,(0,a5.H$)(this.#eg,"spellcheck",e=>null===e?"false":"true"));constructor(e){(0,a9.zF)(this,tw),this.#n=e}}),sD=(tO=[],tL=[],tA=[],tI=[],tF=[],tR=[],tM=[],tP=[],tz=[],tN=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;t_=[(0,a5._y)("placeholder",!0)],tC=[(0,a5._y)("placeholder-color",!0)],tT=[(0,a5._y)("placeholder-font-family",!0)],tx=[(0,a5._y)("placeholder-font-size",!0)],tk=[(0,a5._y)("placeholder-font-weight",!0)],(0,a9.G4)(null,null,t_,{kind:"field",name:"_handlerPlaceholder",static:!1,private:!1,access:{has:e=>"_handlerPlaceholder"in e,get:e=>e._handlerPlaceholder,set:(e,t)=>{e._handlerPlaceholder=t}},metadata:e},tO,tL),(0,a9.G4)(null,null,tC,{kind:"field",name:"_handlerPlaceholderColor",static:!1,private:!1,access:{has:e=>"_handlerPlaceholderColor"in e,get:e=>e._handlerPlaceholderColor,set:(e,t)=>{e._handlerPlaceholderColor=t}},metadata:e},tA,tI),(0,a9.G4)(null,null,tT,{kind:"field",name:"_handlerPlaceholderFontFamily",static:!1,private:!1,access:{has:e=>"_handlerPlaceholderFontFamily"in e,get:e=>e._handlerPlaceholderFontFamily,set:(e,t)=>{e._handlerPlaceholderFontFamily=t}},metadata:e},tF,tR),(0,a9.G4)(null,null,tx,{kind:"field",name:"_handlerPlaceholderFontSize",static:!1,private:!1,access:{has:e=>"_handlerPlaceholderFontSize"in e,get:e=>e._handlerPlaceholderFontSize,set:(e,t)=>{e._handlerPlaceholderFontSize=t}},metadata:e},tM,tP),(0,a9.G4)(null,null,tk,{kind:"field",name:"_handlerPlaceholderFontWeight",static:!1,private:!1,access:{has:e=>"_handlerPlaceholderFontWeight"in e,get:e=>e._handlerPlaceholderFontWeight,set:(e,t)=>{e._handlerPlaceholderFontWeight=t}},metadata:e},tz,tN),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["placeholder","placeholder-color","placeholder-font-family","placeholder-font-size","placeholder-font-weight"];#n;#eg=(0,a5.Ut)(()=>this.#n.shadowRoot,"#input");_handlerPlaceholder=(0,a9.zF)(this,tO,(0,a5.H$)(this.#eg,"placeholder"));_handlerPlaceholderColor=((0,a9.zF)(this,tL),(0,a9.zF)(this,tA,(0,a5._8)(this.#eg,"--placeholder-color",void 0,!0)));_handlerPlaceholderFontFamily=((0,a9.zF)(this,tI),(0,a9.zF)(this,tF,(0,a5._8)(this.#eg,"--placeholder-font-family",void 0,!0)));_handlerPlaceholderFontSize=((0,a9.zF)(this,tR),(0,a9.zF)(this,tM,(0,a5._8)(this.#eg,"--placeholder-font-size",void 0,!0)));_handlerPlaceholderFontWeight=((0,a9.zF)(this,tP),(0,a9.zF)(this,tz,(0,a5._8)(this.#eg,"--placeholder-font-weight",void 0,!0)));constructor(e){(0,a9.zF)(this,tN),this.#n=e}}),sG=(tj=[],t$=[],tV=[],tW=[],tU=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;tH=[(0,a5._y)("value",!1)],tD=[(0,a5._y)("disabled",!0)],tG=[(0,a5._y)("autocomplete",!0)],(0,a9.G4)(this,null,tH,{kind:"method",name:"_handleValue",static:!1,private:!1,access:{has:e=>"_handleValue"in e,get:e=>e._handleValue},metadata:e},null,tj),(0,a9.G4)(null,null,tD,{kind:"field",name:"_handleDisabled",static:!1,private:!1,access:{has:e=>"_handleDisabled"in e,get:e=>e._handleDisabled,set:(e,t)=>{e._handleDisabled=t}},metadata:e},t$,tV),(0,a9.G4)(null,null,tG,{kind:"field",name:"_handleAutocomplete",static:!1,private:!1,access:{has:e=>"_handleAutocomplete"in e,get:e=>e._handleAutocomplete,set:(e,t)=>{e._handleAutocomplete=t}},metadata:e},tW,tU),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["value","disabled","autocomplete"];#n=(0,a9.zF)(this,tj);#eg=(0,a5.Ut)(()=>this.#n.shadowRoot,"#input");_handleValue(e){if(e){let t=parseFloat(this.#n.getAttribute("maxlength")??"");isNaN(t)||(e=e.substring(0,t))}else e="";let t=this.#eg();t.value!==e&&(t.value=e)}_handleDisabled=(0,a9.zF)(this,t$,(0,a5.H$)(this.#eg,"disabled",e=>null!==e?"":null));_handleAutocomplete=((0,a9.zF)(this,tV),(0,a9.zF)(this,tW,(0,a5.H$)(this.#eg,"autocomplete")));constructor(e){(0,a9.zF)(this,tU),this.#n=e}}),sj={submit:"confirm",blur:"lynxblur",focus:"lynxfocus"},s$=(tq=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;tB=[(0,a5._y)("input-filter",!0),(0,a5.ZR)("lynxinput")],tX=[(0,a5._y)("send-composing-input",!0)],tZ=[(0,a5.ZR)("selection")],(0,a9.G4)(this,null,tB,{kind:"method",name:"_handleEnableInputEvent",static:!1,private:!1,access:{has:e=>"_handleEnableInputEvent"in e,get:e=>e._handleEnableInputEvent},metadata:e},null,tq),(0,a9.G4)(this,null,tX,{kind:"method",name:"_handleSendComposingInput",static:!1,private:!1,access:{has:e=>"_handleSendComposingInput"in e,get:e=>e._handleSendComposingInput},metadata:e},null,tq),(0,a9.G4)(this,null,tZ,{kind:"method",name:"_handleEnableSelectionEvent",static:!1,private:!1,access:{has:e=>"_handleEnableSelectionEvent"in e,get:e=>e._handleEnableSelectionEvent},metadata:e},null,tq),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["send-composing-input","input-filter"];#n=(0,a9.zF)(this,tq);#eE=!1;#eS=/[^0-9.]|\.(?=.*\.)/g;#eg=(0,a5.Ut)(()=>this.#n.shadowRoot,"#input");#ew=(0,a5.Ut)(()=>this.#n.shadowRoot,"#form");_handleEnableInputEvent(e){let t=this.#eg();e?(t.addEventListener("input",this.#e_,{passive:!0}),t.addEventListener("compositionend",this.#eC,{passive:!0})):(t.removeEventListener("input",this.#e_),t.removeEventListener("compositionend",this.#eC))}_handleSendComposingInput(e){this.#eE=null!==e}#eT=e=>{let t=sj[e.type]??e.type;this.#n.dispatchEvent(new CustomEvent(t,{...st.$,detail:{value:this.#eg().value}}))};#e_=e=>{let t=this.#eg(),n=this.#ex(t.value),l=e.isComposing;t.value=n,(!l||this.#eE)&&this.#n.dispatchEvent(new CustomEvent("lynxinput",{...st.$,detail:{value:n,textLength:n.length,cursor:t.selectionStart,isComposing:l,selectionStart:t.selectionStart,selectionEnd:t.selectionEnd}}))};#eC=()=>{let e=this.#eg(),t=this.#ex(e.value);e.value=t,this.#eE||this.#n.dispatchEvent(new CustomEvent("lynxinput",{...st.$,detail:{value:t,textLength:t.length,cursor:e.selectionStart,isComposing:!1,selectionStart:e.selectionStart,selectionEnd:e.selectionEnd}}))};#ex(e){let t=e;"number"===this.#n.getAttribute("type")&&(t=t.replace(this.#eS,""));let n=this.#n.getAttribute("input-filter");return n&&(t=t.replace(RegExp(n,"g"),"")),t}_handleEnableSelectionEvent(e){e?this.#eg().addEventListener("select",this.#ek,{passive:!0}):this.#eg().removeEventListener("select",this.#ek)}#ek=()=>{let e=this.#eg();this.#n.dispatchEvent(new CustomEvent("selection",{...st.$,detail:{selectionStart:e.selectionStart,selectionEnd:e.selectionEnd}}))};#eO=e=>{e.target===this.#eg()&&"number"==typeof e.detail&&e.stopImmediatePropagation()};constructor(e){this.#n=e;let t=this.#eg(),n=this.#ew();t.addEventListener("blur",this.#eT,{passive:!0}),t.addEventListener("focus",this.#eT,{passive:!0}),n.addEventListener("submit",this.#eT,{passive:!0}),n.addEventListener("input",this.#eO,{passive:!0})}});tK=[(0,a5.uA)("x-input",[a6.O,sD,sG,sH,s$],sd)],tQ=[],t0=HTMLElement,class extends t0{static #e=tJ=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(t0[Symbol.metadata]??null):void 0;(0,a9.G4)(null,tY={value:tJ},tK,{kind:"class",name:tJ.name,metadata:e},null,tQ),tJ=tY.value,e&&Object.defineProperty(tJ,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(tJ,tQ)})();#eL=(0,a5.Ut)(()=>this.shadowRoot,"#input");addText(e){let{text:t}=e,n=this.#eL(),l=n.selectionStart;if(null===l)n.value=t;else{let e=n.value;n.value=e.slice(0,l)+t+e.slice(l)}}controlKeyBoard(e){let{action:t}=e;0===t||1===t?this.focus():(2===t||3===t)&&this.blur()}setValue(e){let t,n=this.#eL();n.value=e.value,(t=e.index)&&n.setSelectionRange(t,t)}getValue(){let e=this.#eL();return{value:e.value,selectionBegin:e.selectionStart,selectionEnd:e.selectionEnd}}sendDelEvent(e){let{action:t,length:n}=e,l=this.#eL();1===t&&(n=1);let i=l.selectionStart;if(null===i){let e=l.value;l.value=l.value.substring(0,e.length-n)}else{let e=l.value;l.value=e.slice(0,i-n)+e.slice(i)}}setInputFilter(e){this.#eL().setAttribute("pattern",e.pattern)}select(){let e=this.#eL();e.setSelectionRange(0,e.value.length)}setSelectionRange(e){this.#eL().setSelectionRange(e.selectionStart,e.selectionEnd)}focus(e){this.#eL().focus(e)}blur(){this.#eL().blur()}connectedCallback(){let e=this.#eL();null===this.getAttribute("confirm-type")&&e.setAttribute("confirm-type","send"),null===this.getAttribute("maxlength")&&e.setAttribute("maxlength","140")}};let sV=(t2=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;t1=[(0,a5._y)("events-pass-through",!0)],t4=[(0,a5._y)("visible",!1)],(0,a9.G4)(this,null,t1,{kind:"method",name:"_handleEventsPassThrough",static:!1,private:!1,access:{has:e=>"_handleEventsPassThrough"in e,get:e=>e._handleEventsPassThrough},metadata:e},null,t2),(0,a9.G4)(this,null,t4,{kind:"method",name:"_handleVisible",static:!1,private:!1,access:{has:e=>"_handleVisible"in e,get:e=>e._handleVisible},metadata:e},null,t2),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["visible","events-pass-through"];#n=(0,a9.zF)(this,t2);#eA=!!window.HTMLDialogElement;#eI=!1;constructor(e){this.#n=e}#eF=(0,a5.Ut)(()=>this.#n.shadowRoot,"#dialog");_handleEventsPassThrough(e){null!==e?(this.#eF().addEventListener("click",this.#eR,{passive:!1}),this.#n.addEventListener("click",this.#eR,{passive:!1})):(this.#eF().removeEventListener("click",this.#eR),this.#n.removeEventListener("click",this.#eR))}_handleVisible(e){this.#eI=null!==e,this.#eA&&(this.#eI?(this.#eF().showModal(),this.#n.dispatchEvent(new CustomEvent("showoverlay",st.$))):(this.#eF().close(),this.#n.dispatchEvent(new CustomEvent("dismissoverlay",st.$))))}#eR=e=>{e.stopPropagation();let t=this.#eF();if(e.target===this.#n||e.target===t){t.close();let{clientX:n,clientY:l}=e,i=document.elementFromPoint(n,l);(null==i?void 0:i.tagName)==="LYNX-VIEW"&&i.shadowRoot&&(i=i.shadowRoot.elementFromPoint(n,l)??i),null==i||i.dispatchEvent(new MouseEvent("click",e)),requestAnimationFrame(()=>{this.#eI&&t.isConnected&&t.showModal()})}};connectedCallback(){this.#eA||(this.#eF().style.display="none")}});t9=[(0,a5.uA)("x-overlay-ng",[a6.O,sV],sc)],t5=[],t6=HTMLElement,(class extends t6{static #e=t8=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(t6[Symbol.metadata]??null):void 0;(0,a9.G4)(null,t3={value:t8},t9,{kind:"class",name:t8.name,metadata:e},null,t5),t8=t3.value,e&&Object.defineProperty(t8,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(t8,t5)})();get[a6.v](){return this.shadowRoot.firstElementChild}}),n(84086);class sW extends Event{startShowing;fullyShowing;static EventName="x-refresh-view-intersecting";constructor(e,t){super(sW.EventName,{composed:!1,cancelable:!0,bubbles:!0}),this.startShowing=e,this.fullyShowing=t}}class sU{#n;static observedAttributes=[];#eM;constructor(e){this.#n=e}connectedCallback(){if(IntersectionObserver&&!this.#eM){let e=this.#n.parentElement;e&&(this.#eM=new IntersectionObserver(e=>{let t=!1,n=!1;e.forEach(e=>{t=e.intersectionRatio>0,n=e.intersectionRatio>.9}),this.#n.dispatchEvent(new sW(t,n)),n&&this.#n.setAttribute("x-magnet-enable","")},{root:e,threshold:[.1,.9]}),this.#eM.observe(this.#n))}}dispose(){this.#eM&&(this.#eM.disconnect(),this.#eM=void 0)}}nt=[(0,a5.uA)("x-refresh-footer",[sE,a6.O,sU])],nn=[],nl=HTMLElement,(class extends nl{static #e=ne=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(nl[Symbol.metadata]??null):void 0;(0,a9.G4)(null,t7={value:ne},nt,{kind:"class",name:ne.name,metadata:e},null,nn),ne=t7.value,e&&Object.defineProperty(ne,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(ne,nn)})();connectedCallback(){this.setAttribute("slot","footer")}}),ns=[(0,a5.uA)("x-refresh-header",[sE,a6.O,sU])],no=[],nr=HTMLElement,class extends nr{static #e=na=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(nr[Symbol.metadata]??null):void 0;(0,a9.G4)(null,ni={value:na},ns,{kind:"class",name:na.name,metadata:e},null,no),na=ni.value,e&&Object.defineProperty(na,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(na,no)})();connectedCallback(){this.setAttribute("slot","header")}};let sB=(nc=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;nd=[(0,a5.ZR)("headeroffset"),(0,a5.ZR)("headershow"),(0,a5.ZR)("footeroffset")],nh=[(0,a5.ZR)("startrefresh"),(0,a5.ZR)("headerreleased"),(0,a5.ZR)("startloadmore"),(0,a5.ZR)("footerreleased")],(0,a9.G4)(this,null,nd,{kind:"method",name:"_handleComplexEventEnableAttributes",static:!1,private:!1,access:{has:e=>"_handleComplexEventEnableAttributes"in e,get:e=>e._handleComplexEventEnableAttributes},metadata:e},null,nc),(0,a9.G4)(this,null,nh,{kind:"method",name:"_handleXEnableHeaderOffsetEvent",static:!1,private:!1,access:{has:e=>"_handleXEnableHeaderOffsetEvent"in e,get:e=>e._handleXEnableHeaderOffsetEvent},metadata:e},null,nc),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();#n=(0,a9.zF)(this,nc);static observedAttributes=[];#eP=(0,a5.Ut)(()=>this.#n,"x-refresh-view > x-refresh-header:first-of-type");#ez=(0,a5.Ut)(()=>this.#n,"x-refresh-view > x-refresh-footer:first-of-type");constructor(e){this.#n=e,this.#n.addEventListener(sW.EventName,this.#eN)}#eH={headeroffset:!1,headerreleased:!1,startrefresh:!1,footeroffset:!1,headershow:!1,footerreleased:!1,startloadmore:!1};_handleComplexEventEnableAttributes(e,t){this.#eH[t]=e;let{headeroffset:n,headershow:l,footeroffset:i}=this.#eH;n||l||i?this.#eD():this.#eG()}_handleXEnableHeaderOffsetEvent(e,t){this.#eH[t]=e;let{startrefresh:n,headerreleased:l,startloadmore:i,footerreleased:a}=this.#eH;l||a||i||n?this.#ej():this.#e$()}#eV=!1;#eW=!1;#eU=!1;#eB=!1;#eN=e=>{e.stopPropagation(),"X-REFRESH-HEADER"===e.target.tagName?(this.#eV=e.startShowing,this.#eW=e.fullyShowing):(this.#eU=e.startShowing,this.#eB=e.fullyShowing)};#eX=!1;#ej(){this.#eX||(this.#n.addEventListener("touchend",this.#eZ),this.#eX=!0)}#eZ=()=>{this.#eW?(this.#n.dispatchEvent(new CustomEvent("headerreleased",st.$)),this.#n.dispatchEvent(new CustomEvent("startrefresh",{...st.$,detail:{isManual:this.#n._nextRefreshIsManual}})),this.#n._nextRefreshIsManual=!0):("true"===this.#n.getAttribute("enable-auto-loadmore")&&this.#eU||this.#eB)&&(this.#n.dispatchEvent(new CustomEvent("footerreleased",st.$)),this.#n.dispatchEvent(new CustomEvent("startloadmore",st.$)))};#e$(){this.#eX&&this.#n.removeEventListener("touchend",this.#eZ)}#eq=!1;#eY=!1;#eD(){this.#eY||(this.#n.addEventListener("touchstart",this.#eJ),this.#n.addEventListener("touchend",this.#eK),this.#n.addEventListener("touchcancel",this.#eK),this.#n.shadowRoot.querySelector("#container").addEventListener("scroll",this.#v))}#eK=()=>{this.#eq=!1};#eJ=()=>{this.#eq=!0};#v=()=>{if(this.#eV&&(this.#eH.headershow||this.#eH.headeroffset)){let e=this.#eP();if(e){let t=parseFloat(getComputedStyle(e).height),n=this.#n.shadowRoot.querySelector("#container").scrollTop;this.#n.dispatchEvent(new CustomEvent("headershow",{...st.$,detail:{isDragging:this.#eq,offsetPercent:1-n/t}})),this.#n.dispatchEvent(new CustomEvent("headeroffset",{...st.$,detail:{isDragging:this.#eq,offsetPercent:1-n/t}}))}}else if(this.#eU&&this.#eH.footeroffset){let e=this.#ez();if(e){let t=this.#n.shadowRoot.querySelector("#container").scrollTop,n=parseFloat(getComputedStyle(e).height);this.#n.dispatchEvent(new CustomEvent("footeroffset",{...st.$,detail:{isDragging:this.#eq,offsetPercent:1-t/n}}))}}};#eG(){this.#eY&&(this.#n.removeEventListener("touchstart",this.#eJ),this.#n.removeEventListener("touchend",this.#eK),this.#n.removeEventListener("touchcancel",this.#eK),this.#n.shadowRoot.querySelector("#container").removeEventListener("scroll",this.#v))}dispose(){this.#e$(),this.#eG()}});np=[(0,a5.uA)("x-refresh-view",[sE,a6.O,sB],su)],nv=[],nb=HTMLElement,class extends nb{static #e=nm=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(nb[Symbol.metadata]??null):void 0;(0,a9.G4)(null,nu={value:nm},np,{kind:"class",name:nm.name,metadata:e},null,nv),nm=nu.value,e&&Object.defineProperty(nm,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static notToFilterFalseAttributes=new Set(["enable-refresh","enable-loadmore","enable-auto-loadmore"]);_nextRefreshIsManual=!0;finishRefresh(){var e;null==(e=this.querySelector("x-refresh-view > x-refresh-header:first-of-type"))||e.removeAttribute("x-magnet-enable")}finishLoadMore(){var e;null==(e=this.querySelector("x-refresh-view > x-refresh-footer:first-of-type"))||e.removeAttribute("x-magnet-enable")}autoStartRefresh(){var e;let t=this.shadowRoot.querySelector("#container");null==(e=this.querySelector("x-refresh-view > x-refresh-header:first-of-type"))||e.setAttribute("x-magnet-enable",""),this._nextRefreshIsManual=!1,t.scroll({top:0,behavior:"smooth"})}#eQ=(0,a5.Ut)(()=>this.shadowRoot,"#container");#e0=(0,a5.Ut)(()=>this.shadowRoot,"#content");get scrollTop(){let e=this.#eQ(),t=this.#e0();return t.scrollTop+t.offsetTop-e.scrollTop}set scrollTop(e){console.log(e);let t=this.#eQ(),n=this.#e0();e>0?n.scrollTop=e:t.scrollTop=n.offsetTop+e}get scrollHeight(){return this.#e0().scrollHeight}get[sl.l](){return this}static #C=(0,a9.zF)(nm,nv)};let sX=(nE=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;ng=[(0,a5._y)("src",!0)],nf=[(0,a5._y)("content",!0)],ny=[(0,a5.ZR)("load")],(0,a9.G4)(this,null,ng,{kind:"method",name:"_handleSrc",static:!1,private:!1,access:{has:e=>"_handleSrc"in e,get:e=>e._handleSrc},metadata:e},null,nE),(0,a9.G4)(this,null,nf,{kind:"method",name:"_handleContent",static:!1,private:!1,access:{has:e=>"_handleContent"in e,get:e=>e._handleContent},metadata:e},null,nE),(0,a9.G4)(this,null,ny,{kind:"method",name:"_enableLoadEvent",static:!1,private:!1,access:{has:e=>"_enableLoadEvent"in e,get:e=>e._enableLoadEvent},metadata:e},null,nE),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["src","content"];#n=(0,a9.zF)(this,nE);#e1=null;#eu=(0,a5.Ut)(()=>this.#n.shadowRoot,"#img");_handleSrc(e){e?this.#eu().src=e:this.#eu().src=""}_handleContent(e){if(this.#e1&&URL.revokeObjectURL(this.#e1),!e){this.#e1="";return}let t=new Blob([e],{type:"image/svg+xml;charset=UTF-8"}),n=URL.createObjectURL(t);this.#e1=n,this.#eu().src=n}_enableLoadEvent(e){e?this.#eu().addEventListener("load",this.#ev,{passive:!0}):this.#eu().removeEventListener("load",this.#ev)}#ev=()=>{this.#n.dispatchEvent(new CustomEvent("load",{...st.$,detail:{width:this.#eu().naturalWidth,height:this.#eu().naturalHeight}}))};constructor(e){this.#n=e}});n_=[(0,a5.uA)("x-svg",[a6.O,sX],'<img part="img" alt="" loading="lazy" id="img" /> ')],nC=[],nT=HTMLElement,(class extends nT{static #e=nw=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(nT[Symbol.metadata]??null):void 0;(0,a9.G4)(null,nS={value:nw},n_,{kind:"class",name:nw.name,metadata:e},null,nC),nw=nS.value,e&&Object.defineProperty(nw,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(nw,nC)})()}),nO=[(0,a5.uA)("x-swiper-item",[sE,a6.O])],nL=[],nA=HTMLElement,class extends nA{static #e=nk=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(nA[Symbol.metadata]??null):void 0;(0,a9.G4)(null,nx={value:nk},nO,{kind:"class",name:nk.name,metadata:e},null,nL),nk=nx.value,e&&Object.defineProperty(nk,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(nk,nL)})()};let sZ=(nR=[],nM=[],nP=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;nI=[(0,a5.ZR)("transition")],nF=[(0,a5.ZR)("scrollstart"),(0,a5.ZR)("lynxscrollend"),(0,a5.ZR)("change"),(0,a5.ZR)("change-event-for-indicator")],(0,a9.G4)(this,null,nF,{kind:"method",name:"_enableScrollEventProcessor",static:!1,private:!1,access:{has:e=>"_enableScrollEventProcessor"in e,get:e=>e._enableScrollEventProcessor},metadata:e},null,nR),(0,a9.G4)(null,null,nI,{kind:"field",name:"_handleEnableTransitionEvent",static:!1,private:!1,access:{has:e=>"_handleEnableTransitionEvent"in e,get:e=>e._handleEnableTransitionEvent,set:(e,t)=>{e._handleEnableTransitionEvent=t}},metadata:e},nM,nP),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=[];#n=(0,a9.zF)(this,nR);#e4=0;#e2=0;#eq=!1;#a;#e3=!1;constructor(e){this.#n=e}#e0=(0,a5.Ut)(()=>this.#n.shadowRoot,"#content").bind(this);_handleEnableTransitionEvent=(0,a9.zF)(this,nM,(0,a5.LB)(this.#e0,"scroll",this.#e8,{passive:!0}));#v(){sl.k||(clearTimeout(this.#a),this.#a=setTimeout(()=>{this.#g()},100)),this.#e3||(this.#n.dispatchEvent(new CustomEvent("scrollstart",{...st.$,detail:{current:this.#e4,isDragged:this.#eq}})),this.#e3=!0);let e=this.#e0(),t=this.#n.isVertical,n=t?e.scrollTop:e.scrollLeft,l=t?e.clientHeight:e.clientWidth,i=t?e.scrollHeight:e.scrollWidth;if(Math.abs(this.#e2-n)>l/4||n<10||Math.abs(n-i)<=l){let e=this.#n.currentIndex;e!==this.#e4&&(this.#n.dispatchEvent(new CustomEvent("change",{...st.$,detail:{current:e,isDragged:this.#eq}})),this.#e4=e),this.#e2=n}}#g(){this.#n.dispatchEvent(new CustomEvent("lynxscrollend",{...st.$,detail:{current:this.#e4}})),this.#e3=!1}#e9(){this.#eq=!0}#e5(){this.#eq=!1}#e8(){this.#n.dispatchEvent(new CustomEvent("transition",{...st.$,detail:{dx:this.#e0().scrollLeft,dy:this.#e0().scrollTop}}))}#e6=((0,a9.zF)(this,nP),[(0,a5.LB)(this.#e0,"scroll",this.#v.bind(this),{passive:!0}),(0,a5.LB)(this.#e0,"touchstart",this.#e9.bind(this),{passive:!0}),(0,a5.LB)(this.#e0,"touchend",this.#e5.bind(this),{passive:!0}),(0,a5.LB)(this.#e0,"touchcancel",this.#e5.bind(this),{passive:!0}),(0,a5.LB)(this.#e0,"scrollend",this.#g.bind(this),{passive:!0})]);#eH={scrollstart:!1,lynxscrollend:!1,change:!1,"change-event-for-indicator":!1};_enableScrollEventProcessor(e,t){this.#eH[t]=e;let{lynxscrollend:n,scrollstart:l,change:i}=this.#eH,a=i||n||l||this.#eH["change-event-for-indicator"];this.#e6.forEach(e=>e(a))}connectedCallback(){this.#e4=parseFloat(this.#n.getAttribute("current")??"0");let e=this.#n.isVertical;this.#e2=e?this.#e0().scrollTop:this.#e0().scrollLeft}}),sq=(nH=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;nz=[(0,a5._y)("current",!1)],nN=[(0,a5._y)("interval",!1),(0,a5._y)("autoplay",!1)],(0,a9.G4)(this,null,nz,{kind:"method",name:"_handleCurrentChange",static:!1,private:!1,access:{has:e=>"_handleCurrentChange"in e,get:e=>e._handleCurrentChange},metadata:e},null,nH),(0,a9.G4)(this,null,nN,{kind:"method",name:"_handleAutoplay",static:!1,private:!1,access:{has:e=>"_handleAutoplay"in e,get:e=>e._handleAutoplay},metadata:e},null,nH),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["current","interval","autoplay"];#n=(0,a9.zF)(this,nH);constructor(e){this.#n=e}#e7(){this.#n.currentIndex===this.#n.childElementCount-1?this.#n.circularPlay&&(this.#n.currentIndex=0):this.#n.currentIndex+=1}_handleCurrentChange(e){let t=Number(e);Number.isNaN(t)||(this.#n.currentIndex=t)}#te;#tt=(()=>{this.#e7()}).bind(this);#tn(e){this.#tl(),this.#te=setInterval(this.#tt,e)}#tl(){this.#te&&clearInterval(this.#te)}_handleAutoplay(){if(null!==this.#n.getAttribute("autoplay")){let e=this.#n.getAttribute("interval"),t=e?parseFloat(e):5e3;Number.isNaN(t)&&(t=5e3),this.#tn(t)}}dispose(){this.#tl()}}),sY=(nj=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;nD=[(0,a5._y)("circular",!1)],nG=[(0,a5._y)("vertical",!0)],(0,a9.G4)(this,null,nD,{kind:"method",name:"_handleCircular",static:!1,private:!1,access:{has:e=>"_handleCircular"in e,get:e=>e._handleCircular},metadata:e},null,nj),(0,a9.G4)(this,null,nG,{kind:"method",name:"_handleVerticalChange",static:!1,private:!1,access:{has:e=>"_handleVerticalChange"in e,get:e=>e._handleVerticalChange},metadata:e},null,nj),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["circular","vertical"];#n=(0,a9.zF)(this,nj);#ti=!1;#ta;#ts=0;#e0=(0,a5.Ut)(()=>this.#n.shadowRoot,"#content").bind(this);constructor(e){this.#n=e}#to=(0,a5.Ut)(()=>this.#n.shadowRoot,"#circular-start").bind(this);#tr=(0,a5.Ut)(()=>this.#n.shadowRoot,"#circular-end").bind(this);#td(e){let t=this.#n.childElementCount;if(t>2){let{current:n,isDragged:l,__isFirstLayout:i}=e.detail;if(0===n||n===t-1||2===n||n===t-2){let e,a=this.#e0(),s=this.#to().assignedElements(),o=this.#tr().assignedElements(),r=this.#n.firstElementChild,d=this.#n.lastElementChild,h=this.#n.snapDistance;if(0===n?(o.forEach(e=>e.removeAttribute("slot")),d.setAttribute("slot","circular-start"),e=r):n===t-1?(s.forEach(e=>e.removeAttribute("slot")),r.setAttribute("slot","circular-end"),e=d):(s.forEach(e=>e.removeAttribute("slot")),o.forEach(e=>e.removeAttribute("slot")),e=this.#n.children[n]),this.#ti){let t="carousel"===this.#n.getAttribute("mode")?.8*a.clientHeight/2:a.clientHeight/2;this.#ts=e.offsetTop+e.offsetHeight/2-h-t,a.scrollTop=this.#ts}else{let t="carousel"===this.#n.getAttribute("mode")?.8*a.clientWidth/2:a.clientWidth/2;this.#ts=e.offsetLeft+e.offsetWidth/2-h-t,a.scrollLeft=this.#ts}if(!l){let e=this.#n.getAttribute("mode");if(i&&(null===e||"normal"===e||"carousel"===e||"carry"===e))return;this.#th(i?"instant":"smooth")}}}}#th(e){let t=this.#e0(),n=this.#n.snapDistance;t.scrollBy({top:this.#ti?n:0,left:this.#ti?0:n,behavior:e??"smooth"})}#e6=[(0,a5.LB)(()=>this.#n,"change",this.#td.bind(this),{passive:!0}),(0,a5.LB)(()=>this.#n,"touchmove",this.#tc.bind(this),{passive:!1}),(0,a5.LB)(()=>this.#n,"touchend",this.#tu.bind(this),{passive:!1}),(0,a5.LB)(()=>this.#n,"touchcancel",this.#tu.bind(this),{passive:!1})];_handleCircular(e){this.#e6.forEach(t=>t(null!=e)),null!==e&&this.#td({detail:{current:this.#n.currentIndex,isDragged:!1,__isFirstLayout:!0}})}#tc(e){let t=e.touches.item(0);if(t){let e=this.#ti?t.pageY:t.pageX;if(void 0!==this.#ta){this.#tm();let t=this.#ta-e;this.#ts+=t}this.#ta=e}}#tu(e){this.#tp(),this.#th(),this.#ta=void 0}_handleVerticalChange(e){this.#ti=null!==e}#tv;#tm(){if(!this.#tv){let e=this.#e0();this.#ts=this.#ti?e.scrollTop:e.scrollLeft,this.#tv=setInterval(()=>{this.#ti?e.scrollTop=this.#ts:e.scrollLeft=this.#ts},10)}}#tp(){this.#tv&&(clearInterval(this.#tv),this.#tv=void 0)}dispose(){this.#tp()}}),sJ=(nX=[],nZ=[],nq=[],nY=[],nJ=[],nK=[],nQ=[],n0=[],n1=[],n4=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;n$=[(0,a5._y)("indicator-color",!0)],nV=[(0,a5._y)("indicator-active-color",!0)],nW=[(0,a5._y)("page-margin",!0)],nU=[(0,a5._y)("previous-margin",!0)],nB=[(0,a5._y)("next-margin",!0)],(0,a9.G4)(null,null,n$,{kind:"field",name:"_handleIndicatorColor",static:!1,private:!1,access:{has:e=>"_handleIndicatorColor"in e,get:e=>e._handleIndicatorColor,set:(e,t)=>{e._handleIndicatorColor=t}},metadata:e},nX,nZ),(0,a9.G4)(null,null,nV,{kind:"field",name:"_handleIndicatorActiveColor",static:!1,private:!1,access:{has:e=>"_handleIndicatorActiveColor"in e,get:e=>e._handleIndicatorActiveColor,set:(e,t)=>{e._handleIndicatorActiveColor=t}},metadata:e},nq,nY),(0,a9.G4)(null,null,nW,{kind:"field",name:"_handlePageMargin",static:!1,private:!1,access:{has:e=>"_handlePageMargin"in e,get:e=>e._handlePageMargin,set:(e,t)=>{e._handlePageMargin=t}},metadata:e},nJ,nK),(0,a9.G4)(null,null,nU,{kind:"field",name:"_handlePreviousMargin",static:!1,private:!1,access:{has:e=>"_handlePreviousMargin"in e,get:e=>e._handlePreviousMargin,set:(e,t)=>{e._handlePreviousMargin=t}},metadata:e},nQ,n0),(0,a9.G4)(null,null,nB,{kind:"field",name:"_handleNextMargin",static:!1,private:!1,access:{has:e=>"_handleNextMargin"in e,get:e=>e._handleNextMargin,set:(e,t)=>{e._handleNextMargin=t}},metadata:e},n1,n4),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["indicator-color","indicator-active-color","page-margin","previous-margin","next-margin"];#n;#tb=0;#tg=(0,a5.Ut)(()=>this.#n.shadowRoot,"#indicator-container");#tf=(0,a5.Ut)(()=>this.#n.shadowRoot,"#indicator-style");#ty;constructor(e){(0,a9.zF)(this,n4),this.#n=e}_handleIndicatorColor=(0,a9.zF)(this,nX,(0,a5._8)(this.#tg,"--indicator-color",void 0,!0));_handleIndicatorActiveColor=((0,a9.zF)(this,nZ),(0,a9.zF)(this,nq,(0,a5._8)(this.#tg,"--indicator-active-color",void 0,!0)));_handlePageMargin=((0,a9.zF)(this,nY),(0,a9.zF)(this,nJ,(0,a5._8)(this.#tg,"--page-margin",void 0,!0)));_handlePreviousMargin=((0,a9.zF)(this,nK),(0,a9.zF)(this,nQ,(0,a5._8)(this.#tg,"--previous-margin",void 0,!0)));_handleNextMargin=((0,a9.zF)(this,n0),(0,a9.zF)(this,n1,(0,a5._8)(this.#tg,"--next-margin",void 0,!0)));#tE(){let e=this.#n.childElementCount;if(e!==this.#tb){let n="";for(let t=0;t<e;t++)n+=`<div style="animation-timeline:--x-swiper-item-${t};" part="indicator-item"></div>`;if(this.#tg().innerHTML=n,e>5){for(let n=0;n<e;n++){var t;null==(t=this.#n.children.item(n))||t.style.setProperty("view-timeline-name",`--x-swiper-item-${n}`)}this.#tf().innerHTML=`:host { timeline-scope: ${Array.from({length:e},(e,t)=>`--x-swiper-item-${t}`).join(",")} !important; }`}}this.#tb=e}connectedCallback(){if(this.#tE(),this.#ty=new MutationObserver(this.#tE.bind(this)),this.#ty.observe(this.#n,{attributes:!1,characterData:!1,childList:!0,subtree:!1}),!CSS.supports("timeline-scope","--a, --b")){var e;this.#n.addEventListener("change",(e=>{let{detail:t}=e,n=t.current,l=this.#n.childElementCount,i=this.#tg();for(let e=0;e<l;e++){let t=i.children[e];t&&(e===n?t.style.setProperty("background-color","var(--indicator-active-color)","important"):t.style.removeProperty("background-color"))}}).bind(this));let t=parseFloat(this.#n.getAttribute("current")??"0");null==(e=this.#tg().children[t])||e.style.setProperty("background-color","var(--indicator-active-color)","important")}}dispose(){var e;null==(e=this.#ty)||e.disconnect(),this.#ty=void 0}});n8=[(0,a5.uA)("x-swiper",[a6.O,sJ,sZ,sY,sq],sm)],n9=[],n5=HTMLElement,class extends n5{static #e=n3=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(n5[Symbol.metadata]??null):void 0;(0,a9.G4)(null,n2={value:n3},n8,{kind:"class",name:n3.name,metadata:e},null,n9),n3=n2.value,e&&Object.defineProperty(n3,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static notToFilterFalseAttributes=new Set(["smooth-scroll","indicator-dots"]);#e0=(0,a5.Ut)(()=>this.shadowRoot,"#content").bind(this);#tS(){let e=0,t=Number.MAX_SAFE_INTEGER,n=0;if(this.childElementCount>0){let l=this.#e0(),i=this.isVertical,a=this.childElementCount,s=i?l.scrollTop:l.scrollLeft,o=i?l.clientHeight:l.clientWidth,r=i?this.firstElementChild.offsetHeight:this.firstElementChild.offsetWidth,d=s+("carousel"===this.getAttribute("mode")?.8*o/2:o/2);for(let l=0;l<a;l++){let a=this.children[l];if(a){let s=(i?a.offsetTop:a.offsetLeft)+r/2-d,o=Math.abs(s);o<t&&(e=l,t=o,n=s)}}}return{current:e,minDistanceToMid:t,minOffsetToMid:n}}get currentIndex(){return this.#tS().current}set currentIndex(e){if(this.currentIndex===e)return;let t=null===this.getAttribute("smooth-scroll");this.#tw(e,t?"smooth":"instant")}#tw(e,t){let n=this.children.item(e);if(n){let e=this.isVertical,l=0;l="flat-coverflow"===this.getAttribute("mode")?e?n.offsetTop-n.offsetHeight/3:n.offsetLeft-n.offsetWidth/3:e?n.offsetTop:n.offsetLeft,this.#e0().scrollTo({left:e?0:l,top:e?l:0,behavior:t})}}get snapDistance(){return this.#tS().minOffsetToMid}get isVertical(){return null!==this.getAttribute("vertical")}get circularPlay(){return null!==this.getAttribute("circular")}scrollTo(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length>0&&"object"==typeof t[0]&&null!==t[0]&&"index"in t[0]){let{index:e,smooth:n=!0}=t[0];if("number"==typeof e)return void this.#tw(e,n?"smooth":"instant")}super.scrollTo(...t)}connectedCallback(){let e=this.getAttribute("current");null!==e&&this.#tw(Number(e),"instant")}get[sl.l](){return this}static #C=(0,a9.zF)(n3,n9)};let sK=(n7=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;n6=[(0,a5._y)("src",!0)],(0,a9.G4)(this,null,n6,{kind:"method",name:"_handleSrc",static:!1,private:!1,access:{has:e=>"_handleSrc"in e,get:e=>e._handleSrc},metadata:e},null,n7),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["src"];#n=(0,a9.zF)(this,n7);constructor(e){this.#n=e}#t_=(0,a5.Ut)(()=>this.#n.shadowRoot,"#img");_handleSrc(e){e?this.#t_().setAttribute("src",e):this.#t_().removeAttribute("src")}});ln=[(0,a5.uA)("inline-image",[sK,sN],sr({}))],ll=[],li=HTMLElement,class extends li{static #e=lt=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(li[Symbol.metadata]??null):void 0;(0,a9.G4)(null,le={value:lt},ln,{kind:"class",name:lt.name,metadata:e},null,ll),lt=le.value,e&&Object.defineProperty(lt,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(lt,ll)})()};let sQ=()=>({start:-1,end:-1,direction:"forward"}),s0=(e,t,n)=>{if(!t||!e.contains(t))return null;let l=e.ownerDocument.createRange();l.selectNodeContents(e);try{l.setEnd(t,n)}catch{return null}return l.toString().length},s1=(ls=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;la=[(0,a5.ZR)("selectionchange")],(0,a9.G4)(this,null,la,{kind:"method",name:"_handleEnableSelectionChangeEvent",static:!1,private:!1,access:{has:e=>"_handleEnableSelectionChangeEvent"in e,get:e=>e._handleEnableSelectionChangeEvent},metadata:e},null,ls),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=[];#n=(0,a9.zF)(this,ls);#tC=!1;#tT=!1;#tx;#tk;constructor(e){this.#n=e}connectedCallback(){this.#tT=!0,this.#tO()}dispose(){this.#tT=!1,this.#tO()}_handleEnableSelectionChangeEvent(e){this.#tC=e,e||(this.#tk=void 0),this.#tO()}#tO(){var e;let t=this.#n.ownerDocument,n=this.#tC&&this.#tT;n&&this.#tx===t||(n||this.#tx)&&(null==(e=this.#tx)||e.removeEventListener("selectionchange",this.#tL),n&&t.addEventListener("selectionchange",this.#tL),this.#tx=n?t:void 0)}#tL=()=>{let e=(e=>{var t;let n=e.ownerDocument.getSelection();if(!n||0===n.rangeCount)return sQ();let l=s0(e,n.anchorNode,n.anchorOffset),i=s0(e,n.focusNode,n.focusOffset);if(null!==l&&null!==i&&l!==i)return{start:Math.min(l,i),end:Math.max(l,i),direction:l<i?"forward":"backward"};let a=[],s=e.getRootNode();for(;s instanceof ShadowRoot;)a.push(s),s=s.host.getRootNode();let[o]=(null==(t=n.getComposedRanges)?void 0:t.call(n,{shadowRoots:a}))??[],r=o?s0(e,o.startContainer,o.startOffset):null,d=o?s0(e,o.endContainer,o.endOffset):null;return null===r||null===d||r===d?sQ():{start:r,end:d,direction:"backward"===n.direction?"backward":"forward"}})(this.#n),t=`${e.start}:${e.end}:${e.direction}`;t!==this.#tk&&(-1!==e.start||void 0!==this.#tk)&&(this.#tk=t,this.#n.dispatchEvent(new CustomEvent("selectionchange",{...st.$,detail:e})))}});ld=[(0,a5.uA)("inline-text",[s1])],lh=[],lc=HTMLElement,(class extends lc{static #e=lr=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(lc[Symbol.metadata]??null):void 0;(0,a9.G4)(null,lo={value:lr},ld,{kind:"class",name:lr.name,metadata:e},null,lh),lr=lo.value,e&&Object.defineProperty(lr,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(lr,lh)})()}),lp=[(0,a5.uA)("inline-truncation",[])],lv=[],lb=HTMLElement,a3=class extends lb{static #e=lm=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(lb[Symbol.metadata]??null):void 0;(0,a9.G4)(null,lu={value:lm},lp,{kind:"class",name:lm.name,metadata:e},null,lv),a3=lm=lu.value,e&&Object.defineProperty(lm,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static XEnableCustomTruncation="x-text-custom-overflow";connectedCallback(){if(!CSS.supports("selector(:has(>inline-truncation))")){var e;(null==(e=this.parentElement)?void 0:e.tagName)!=="X-TEXT"||this.matches("inline-truncation ~ inline-truncation")||this.parentElement.setAttribute(a3.XEnableCustomTruncation,"")}this.setAttribute("slot","inline-truncation")}disconnectedCallback(){var e;null==(e=this.parentElement)||e.removeAttribute(a3.XEnableCustomTruncation)}static #C=(0,a9.zF)(lm,lv)},a3=lm;let s4=(lf=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;lg=[(0,a5._y)("text",!0)],(0,a9.G4)(this,null,lg,{kind:"method",name:"_handleText",static:!1,private:!1,access:{has:e=>"_handleText"in e,get:e=>e._handleText},metadata:e},null,lf),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["text"];#n=(0,a9.zF)(this,lf);#tA;constructor(e){this.#n=e}_handleText(e){var t;null==(t=this.#tA)||t.remove(),e&&(this.#tA=new Text(e),this.#n.append(this.#tA))}});lS=[(0,a5.uA)("raw-text",[s4])],lw=[],l_=HTMLElement,(class extends l_{static #e=lE=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(l_[Symbol.metadata]??null):void 0;(0,a9.G4)(null,ly={value:lE},lS,{kind:"class",name:lE.name,metadata:e},null,lw),lE=ly.value,e&&Object.defineProperty(lE,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(lE,lw)})()}),n(99811),n(40009),n(13035),n(13412),n(17973),n(64955),n(91016),n(23306),n(76619),n(57857),n(9975),n(93885),n(812),n(74180),n(994),n(4267),n(20789),n(62839),n(66876);let s2=(e,t,n)=>Math.min(Math.max(e,t),n),s3=(e,t)=>{let{node:n}=e;if(n.nodeType===Node.TEXT_NODE)return{container:n,offset:s2(t,0,n.data.length)};let l=+(t>0),i=n.parentNode;return i?{container:i,offset:(e=>{let t=0,n=e.previousSibling;for(;n;)t++,n=n.previousSibling;return t})(n)+l}:{container:n,offset:s2(l,0,n.childNodes.length)}},s8=(lx=[],class e{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;lC=[(0,a5._y)("text-maxlength",!0),(0,a5._y)("text-maxline",!0),(0,a5._y)("tail-color-convert",!0)],lT=[(0,a5.ZR)("layout")],(0,a9.G4)(this,null,lC,{kind:"method",name:"_handleAttributeChange",static:!1,private:!1,access:{has:e=>"_handleAttributeChange"in e,get:e=>e._handleAttributeChange},metadata:e},null,lx),(0,a9.G4)(this,null,lT,{kind:"method",name:"_handleEnableLayoutEvent",static:!1,private:!1,access:{has:e=>"_handleEnableLayoutEvent"in e,get:e=>e._handleEnableLayoutEvent},metadata:e},null,lx),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static exceedMathLengthAttribute="x-text-clipped";static showInlineTruncation="x-show-inline-truncation";static observedAttributes=["text-maxlength","text-maxline","tail-color-convert"];#tI=((0,a9.zF)(this,lx),!1);#tF=!1;#tR=new Map;#tM;#N;#tP;#tz;#tN=!1;#tH=0/0;#tD=0/0;#tG=!0;#tj=!1;get #t$(){return!this.#tV&&!this.#tG}get #tV(){return!!this.#tW()}#tW(){return this.#n.querySelector(":scope > inline-truncation")}get #tU(){return!isNaN(this.#tD)&&(this.#tV||!this.#tG)}#n;constructor(e){this.#n=e}#tB=(0,a5.Ut)(()=>this.#n.shadowRoot,"#inner-box");#tX(e){e.forEach(e=>{e.removedNodes.forEach(e=>{this.#tR.delete(e)}),"characterData"===e.type&&void 0!==this.#tR.get(e.target)&&this.#tR.set(e.target,e.target.data)})}#tZ(){for(let[t,n]of this.#tR)t.nodeType===Node.TEXT_NODE?void 0!==n&&(t.data=n):t.removeAttribute(e.exceedMathLengthAttribute);this.#n.removeAttribute(e.exceedMathLengthAttribute),this.#n.removeAttribute(e.showInlineTruncation)}#tq(e){let t=[],n=e;for(;n=n.nextSibling;)(n.nodeType===Node.TEXT_NODE||n.nodeType===Node.ELEMENT_NODE)&&t.push(n);return t}#tY(){!this.#tF||this.#n.matches("x-text>x-text")||this.#tI||(this.#tI=!0,(0,a5.JS)(async()=>{await this.#tJ(),this.#tK(),this.#tI=!1}))}async #tJ(){var t,n,l;if(null==(n=this.#tP)||null==(t=n.parentElement)||t.removeChild(this.#tP),this.#tZ(),!this.#tU&&isNaN(this.#tH))return;await document.fonts.ready;let i=this.#tB().getBoundingClientRect();this.#tz=new s9(this.#n,i);let a=this.#tz,s=(isNaN(this.#tH)?void 0:a.getNodeInfoByCharIndex(this.#tH))?this.#tH:1/0,o=this.#tU&&a.getLineInfo(this.#tD)?a.getLineInfo(this.#tD-1):void 0,r=1/0,d=3;if(o){let{start:t,end:n}=o,l=n-t;if(this.#tV){this.#n.setAttribute(e.showInlineTruncation,"");let l=this.#tW().getBoundingClientRect(),s=i.width,o=l.width;if(s>o){r=n-1;let e=document.createRange(),t=a.getNodeInfoByCharIndex(r),l=n-t.start,i=s3(t,l);for(e.setEnd(i.container,i.offset),e.setStart(i.container,i.offset);e.getBoundingClientRect().width<o&&(r-=1)&&(t=a.getNodeInfoByCharIndex(r));){let n=s3(t,r-t.start);e.setStart(n.container,n.offset)}}else r=t,this.#n.removeAttribute(e.showInlineTruncation)}else l<3?(d=l,r=t):r=n-3}let h=Math.min(s,r);if(h<1/0){let t=a.getNodeInfoByCharIndex(h);if(t){let n=h-t.start,i=t.node,s=[];i.nodeType===Node.TEXT_NODE?(this.#tR.set(i,i.data),i.data=i.data.substring(0,n)):s.push(i),s=s.concat(this.#tq(i));let o=i.parentElement;for(;o!==this.#n;)s=s.concat(this.#tq(o)),o=o.parentElement;if(s.forEach(t=>{t.nodeType===Node.TEXT_NODE&&0!==t.data.length?(this.#tR.set(t,t.data),t.data=""):t.nodeType===Node.ELEMENT_NODE&&(this.#tR.set(t,""),t.setAttribute(e.exceedMathLengthAttribute,""))}),this.#t$){let e=(0===n?null==(l=a.nodelist.at(t.nodeIndex-1))?void 0:l.parentElement:i.parentElement)??i.parentElement;this.#tP=new Text(Array(d).fill(".").join("")),e.append(this.#tP)}this.#n.setAttribute(e.exceedMathLengthAttribute,"")}this.#tQ(h)}}#t0=e=>{this.#tX(e),this.#tY()};#t1=()=>{if(this.#tN){this.#tN=!1;return}this.#tY()};#tK(){this.#tF&&((this.#tH||this.#tD)&&!this.#tM&&(this.#tM=new MutationObserver(this.#t0),this.#tM.observe(this.#n,{subtree:!0,childList:!0,attributes:!1,characterData:!0})),this.#tD&&!this.#N&&(this.#N=new ResizeObserver(this.#t1),this.#tN=!0,this.#N.observe(this.#tB(),{box:"content-box"})))}#t4(){var e,t;null==(e=this.#tM)||e.disconnect(),this.#tM=void 0,null==(t=this.#N)||t.disconnect(),this.#N=void 0}_handleAttributeChange(){this.#tH=parseFloat(this.#n.getAttribute("text-maxlength")??""),this.#tD=parseFloat(this.#n.getAttribute("text-maxline")??""),this.#tG="false"!==this.#n.getAttribute("tail-color-convert"),this.#tH<0&&(this.#tH=0/0),this.#tD<1&&(this.#tD=0/0),isNaN(this.#tD)?this.#tB().style.removeProperty("-webkit-line-clamp"):this.#tB().style.webkitLineClamp=this.#tD.toString(),this.#tY()}_handleEnableLayoutEvent(e){this.#tj=e}#tQ(e){if(!this.#tj)return;let t=new Proxy(this,{get:(t,n)=>"lineCount"===n?(t.#tz||(t.#tz=new s9(t.#n,t.#n.getBoundingClientRect())),t.#tz.getLineCount()):"lines"===n?new Proxy(t,{get(t,n){let l=parseFloat(n.toString());if(!isNaN(l)){t.#tz||(t.#tz=new s9(t.#n,t.#n.getBoundingClientRect()));let n=t.#tz.getLineInfo(l);if(n)return new Proxy(n,{get(t,n){switch(n){case"start":case"end":return t[n];case"ellipsisCount":if(void 0!==e&&e>=t.start&&e<t.end)return t.end-e;return 0}}})}}}):void 0});this.#n.dispatchEvent(new CustomEvent("layout",{...st.$,detail:t}))}dispose(){this.#t4()}connectedCallback(){this.#tF=!0,this._handleEnableLayoutEvent(this.#tj),this._handleAttributeChange(),(0,a5.JS)(()=>{this.#tQ()})}});class s9{#t2=[{start:0}];#t3=[];#t8=[];#n;#t9;nodelist;constructor(e,t){this.#n=e,this.nodelist=new s5(this.#n),this.#t9=t}#t5(e){if(e.node.nodeType!==Node.TEXT_NODE)return 1;{let{rect:t,rectIndex:n}=e,l=e.node,i=document.createRange();i.selectNode(l);for(let e=0;e<l.data.length;e++){i.setEnd(l,e);let a=i.getClientRects().item(n);if(a&&a.right===t.right)return e}return l.data.length}}#t6(e){if(this.#t3[e])return;let{left:t}=this.#t9,n=this.#t3[this.#t3.length-1],l=null==n?void 0:n[n.length-1],i=(null==l?void 0:l.nodeIndex)?(null==l?void 0:l.nodeIndex)+1:0;for(let n=i,l;(l=this.#t7(n))&&e>=this.#t3.length;n++){let e,{node:n}=l;if(n.nodeType===Node.ELEMENT_NODE)e=n.getClientRects();else{let t=document.createRange();t.selectNode(n),e=t.getClientRects()}if(e.length>0){let n=this.#t3[this.#t3.length-1],i=e[0];if(.2>Math.abs(i.left-t)||!n?this.#t3.push([{...l,rect:i,rectIndex:0}]):n.push({...l,rect:i,rectIndex:0}),e.length>1)for(let n=1;n<e.length;n++){let a=e[n];(a.left!==i.left||a.bottom!==i.bottom)&&(.2>Math.abs(a.left-t)?this.#t3.push([{...l,rect:a,rectIndex:n}]):this.#t3[this.#t3.length-1].push({...l,rect:a,rectIndex:n}))}}}}getLineCount(){return this.#t6(1/0),this.#t3.length}getLineInfo(e){if(this.#t6(e+1),e<this.#t3.length){let t=e>0?this.#t2[e-1]??{}:void 0,n=this.#t2[e]??{},l=e<this.#t3.length-1?this.#t2[e+1]??{}:void 0;if(void 0===n.start){let l=this.#t3[e-1],i=l[l.length-1],a=this.#t5(i),s=i.start+a;t&&(t.end=s),n.start=s+1}if(void 0===n.end){let t=this.#t3[e],i=t[t.length-1];if(e===this.#t3.length-1){let e=i.node.nodeType===Node.TEXT_NODE?i.node.data.length:1;n.end=i.start+e}else{let e=this.#t5(i);n.end=i.start+e,l.start=n.end+1}}return n}}#t7(e){let t=this.#t8.length-1,n=this.#t8[t],l=n?n.start+n.length:0;for(let t=this.#t8.length,n;(n=this.nodelist.at(t))&&e>=this.#t8.length;t++){let e=n.nodeType===Node.ELEMENT_NODE?1:n.data.length,i={node:n,length:e,start:l,nodeIndex:t};this.#t8.push(i)}return this.#t8[e]}getNodeInfoByCharIndex(e){let t,n=0,l=this.#t8.length-1;for(;n<=l;){let i=Math.floor((n+l)/2),a=this.#t8[i],s=a.node,o=s.nodeType===Node.TEXT_NODE?s.data.length:1,r=a.start;if(e>=r&&e<r+o){t=a;break}e<r?l=i-1:n=i+1}if(t)return t;for(let t=this.#t8.length,n;n=this.#t7(t);t++)if(e<n.start+n.length)return n}}class s5{#ne=[];#nt;constructor(e){this.#nt=document.createTreeWalker(e,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,t=>{for(let n=t.parentElement;n&&n!==e;n=n.parentElement)if("X-VIEW"===n.tagName)return NodeFilter.FILTER_REJECT;if(t.nodeType===Node.ELEMENT_NODE){let e=t.tagName;if("X-TEXT"===e||"INLINE-TEXT"===e||"RAW-TEXT"===e||"LYNX-WRAPPER"===e)return NodeFilter.FILTER_SKIP}return NodeFilter.FILTER_ACCEPT})}at(e){return this.#ne[e]||this.#nn(e),this.#ne[e]}#nn(e){let t=null;for(;e>=this.#ne.length&&(t=this.#nt.nextNode());){this.#ne.push(t);break}}}lL=[(0,a5.uA)("x-text",[a6.O,s1,s8,s4],'<div id="inner-box" part="inner-box"><slot part="slot"></slot><slot name="inline-truncation"></slot></div>')],lA=[],lI=HTMLElement,class extends lI{static #e=lO=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(lI[Symbol.metadata]??null):void 0;(0,a9.G4)(null,lk={value:lO},lL,{kind:"class",name:lO.name,metadata:e},null,lA),lO=lk.value,e&&Object.defineProperty(lO,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static notToFilterFalseAttributes=new Set(["tail-color-convert"]);superScrollIntoView(e){super.scrollIntoView(e)}scrollIntoView(e){"object"==typeof e&&e.scrollIntoViewOptions?this.dispatchEvent(new CustomEvent(sa.eventName,{bubbles:!0,composed:!0,detail:e.scrollIntoViewOptions})):super.scrollIntoView(e)}[a6.v]=this;static #C=(0,a9.zF)(lO,lA)};let s6=(lN=[],lH=[],lD=[],lG=[],lj=[],l$=[],lV=[],lW=[],lU=[],lB=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;lF=[(0,a5._y)("placeholder-color",!0)],lR=[(0,a5._y)("placeholder-font-size",!0)],lM=[(0,a5._y)("placeholder-font-weight",!0)],lP=[(0,a5._y)("placeholder-font-family",!0)],lz=[(0,a5._y)("placeholder",!0)],(0,a9.G4)(null,null,lF,{kind:"field",name:"_updatePlaceholderColor",static:!1,private:!1,access:{has:e=>"_updatePlaceholderColor"in e,get:e=>e._updatePlaceholderColor,set:(e,t)=>{e._updatePlaceholderColor=t}},metadata:e},lN,lH),(0,a9.G4)(null,null,lR,{kind:"field",name:"_updatePlaceholderFontSize",static:!1,private:!1,access:{has:e=>"_updatePlaceholderFontSize"in e,get:e=>e._updatePlaceholderFontSize,set:(e,t)=>{e._updatePlaceholderFontSize=t}},metadata:e},lD,lG),(0,a9.G4)(null,null,lM,{kind:"field",name:"_updatePlaceholderFontWeight",static:!1,private:!1,access:{has:e=>"_updatePlaceholderFontWeight"in e,get:e=>e._updatePlaceholderFontWeight,set:(e,t)=>{e._updatePlaceholderFontWeight=t}},metadata:e},lj,l$),(0,a9.G4)(null,null,lP,{kind:"field",name:"_updatePlaceholderFontFamily",static:!1,private:!1,access:{has:e=>"_updatePlaceholderFontFamily"in e,get:e=>e._updatePlaceholderFontFamily,set:(e,t)=>{e._updatePlaceholderFontFamily=t}},metadata:e},lV,lW),(0,a9.G4)(null,null,lz,{kind:"field",name:"_handlePlaceholder",static:!1,private:!1,access:{has:e=>"_handlePlaceholder"in e,get:e=>e._handlePlaceholder,set:(e,t)=>{e._handlePlaceholder=t}},metadata:e},lU,lB),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["placeholder","placeholder-color","placeholder-font-size","placeholder-font-weight","placeholder-font-family"];#nl=(0,a5.Ut)(()=>this.#n.shadowRoot,"#textarea");_updatePlaceholderColor=(0,a9.zF)(this,lN,(0,a5._8)(this.#nl,"--placeholder-color",void 0,!0));_updatePlaceholderFontSize=((0,a9.zF)(this,lH),(0,a9.zF)(this,lD,(0,a5._8)(this.#nl,"--placeholder-font-size",void 0,!0)));_updatePlaceholderFontWeight=((0,a9.zF)(this,lG),(0,a9.zF)(this,lj,(0,a5._8)(this.#nl,"--placeholder-font-weight",void 0,!0)));_updatePlaceholderFontFamily=((0,a9.zF)(this,l$),(0,a9.zF)(this,lV,(0,a5._8)(this.#nl,"--placeholder-font-family",void 0,!0)));_handlePlaceholder=((0,a9.zF)(this,lW),(0,a9.zF)(this,lU,(0,a5.H$)(this.#nl,"placeholder")));#n=(0,a9.zF)(this,lB);constructor(e){this.#n=e}}),s7=(lK=[],lQ=[],l0=[],l1=[],l4=[],l2=[],l3=[],l8=[],l9=[],l5=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;lX=[(0,a5._y)("confirm-type",!0)],lZ=[(0,a5._y)("maxlength",!0)],lq=[(0,a5._y)("readonly",!0)],lY=[(0,a5._y)("ios-spell-check",!0)],lJ=[(0,a5._y)("show-soft-input-onfocus",!0)],(0,a9.G4)(null,null,lX,{kind:"field",name:"_handlerConfirmType",static:!1,private:!1,access:{has:e=>"_handlerConfirmType"in e,get:e=>e._handlerConfirmType,set:(e,t)=>{e._handlerConfirmType=t}},metadata:e},lK,lQ),(0,a9.G4)(null,null,lZ,{kind:"field",name:"_handlerMaxlength",static:!1,private:!1,access:{has:e=>"_handlerMaxlength"in e,get:e=>e._handlerMaxlength,set:(e,t)=>{e._handlerMaxlength=t}},metadata:e},l0,l1),(0,a9.G4)(null,null,lq,{kind:"field",name:"_handleReadonly",static:!1,private:!1,access:{has:e=>"_handleReadonly"in e,get:e=>e._handleReadonly,set:(e,t)=>{e._handleReadonly=t}},metadata:e},l4,l2),(0,a9.G4)(null,null,lY,{kind:"field",name:"_handleSpellCheck",static:!1,private:!1,access:{has:e=>"_handleSpellCheck"in e,get:e=>e._handleSpellCheck,set:(e,t)=>{e._handleSpellCheck=t}},metadata:e},l3,l8),(0,a9.G4)(null,null,lJ,{kind:"field",name:"_handleShowSoftInputOnfocus",static:!1,private:!1,access:{has:e=>"_handleShowSoftInputOnfocus"in e,get:e=>e._handleShowSoftInputOnfocus,set:(e,t)=>{e._handleShowSoftInputOnfocus=t}},metadata:e},l9,l5),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["confirm-type","maxlength","readonly","type","ios-spell-check","spell-check","show-soft-input-onfocus"];#n;#ni=(0,a5.Ut)(()=>this.#n.shadowRoot,"#textarea");_handlerConfirmType=(0,a9.zF)(this,lK,(0,a5.H$)(this.#ni,"enterkeyhint",e=>null===e?"send":e));_handlerMaxlength=((0,a9.zF)(this,lQ),(0,a9.zF)(this,l0,(0,a5.H$)(this.#ni,"maxlength",e=>null===e?"140":e)));_handleReadonly=((0,a9.zF)(this,l1),(0,a9.zF)(this,l4,(0,a5.H$)(this.#ni,"readonly",e=>null!==e?"":null)));_handleSpellCheck=((0,a9.zF)(this,l2),(0,a9.zF)(this,l3,(0,a5.H$)(this.#ni,"spellcheck",e=>null===e?"false":"true")));_handleShowSoftInputOnfocus=((0,a9.zF)(this,l8),(0,a9.zF)(this,l9,(0,a5.H$)(this.#ni,"virtualkeyboardpolicy",e=>null===e?"manual":"auto")));constructor(e){(0,a9.zF)(this,l5),this.#n=e}}),oe=(ii=[],ia=[],is=[],io=[],ir=[],id=[],ih=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;l6=[(0,a5._y)("confirm-enter",!0)],l7=[(0,a5._y)("disabled",!0)],ie=[(0,a5._y)("max-height",!0)],it=[(0,a5._y)("min-height",!0)],il=[(0,a5._y)("value",!1)],(0,a9.G4)(this,null,l6,{kind:"method",name:"_handleConfirmEnter",static:!1,private:!1,access:{has:e=>"_handleConfirmEnter"in e,get:e=>e._handleConfirmEnter},metadata:e},null,ii),(0,a9.G4)(this,null,il,{kind:"method",name:"_handleValue",static:!1,private:!1,access:{has:e=>"_handleValue"in e,get:e=>e._handleValue},metadata:e},null,ii),(0,a9.G4)(null,null,l7,{kind:"field",name:"_handleDisabled",static:!1,private:!1,access:{has:e=>"_handleDisabled"in e,get:e=>e._handleDisabled,set:(e,t)=>{e._handleDisabled=t}},metadata:e},ia,is),(0,a9.G4)(null,null,ie,{kind:"field",name:"_handleMaxHeight",static:!1,private:!1,access:{has:e=>"_handleMaxHeight"in e,get:e=>e._handleMaxHeight,set:(e,t)=>{e._handleMaxHeight=t}},metadata:e},io,ir),(0,a9.G4)(null,null,it,{kind:"field",name:"_handleMinHeight",static:!1,private:!1,access:{has:e=>"_handleMinHeight"in e,get:e=>e._handleMinHeight,set:(e,t)=>{e._handleMinHeight=t}},metadata:e},id,ih),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["confirm-enter","disabled","max-height","min-height","value"];#n=(0,a9.zF)(this,ii);#ni=(0,a5.Ut)(()=>this.#n.shadowRoot,"#textarea");#ew=(0,a5.Ut)(()=>this.#n.shadowRoot,"#form");#na=!1;_handleConfirmEnter(e){this.#na=null!==e}_handleDisabled=(0,a9.zF)(this,ia,(0,a5.H$)(this.#ni,"disabled",e=>null!==e?"":null));_handleMaxHeight=((0,a9.zF)(this,is),(0,a9.zF)(this,io,(0,a5._8)(this.#ni,"max-height")));_handleMinHeight=((0,a9.zF)(this,ir),(0,a9.zF)(this,id,(0,a5._8)(this.#ni,"min-height")));_handleValue(e){if(e){let t=parseFloat(this.#n.getAttribute("maxlength")??"");isNaN(t)||(e=e.substring(0,t))}else e="";let t=this.#ni();t.value!==e&&(t.value=e)}#ns=((0,a9.zF)(this,ih),e=>{this.#na&&"Enter"===e.key&&this.#ew().dispatchEvent(new SubmitEvent("submit"))});constructor(e){this.#n=e,this.#ni().addEventListener("keyup",this.#ns)}}),ot=(ip=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;ic=[(0,a5._y)("input-filter",!0),(0,a5.ZR)("lynxinput")],iu=[(0,a5._y)("send-composing-input",!0)],im=[(0,a5.ZR)("selection")],(0,a9.G4)(this,null,ic,{kind:"method",name:"_handleEnableConfirmEvent",static:!1,private:!1,access:{has:e=>"_handleEnableConfirmEvent"in e,get:e=>e._handleEnableConfirmEvent},metadata:e},null,ip),(0,a9.G4)(this,null,iu,{kind:"method",name:"_handleSendComposingInput",static:!1,private:!1,access:{has:e=>"_handleSendComposingInput"in e,get:e=>e._handleSendComposingInput},metadata:e},null,ip),(0,a9.G4)(this,null,im,{kind:"method",name:"_handleEnableSelectionEvent",static:!1,private:!1,access:{has:e=>"_handleEnableSelectionEvent"in e,get:e=>e._handleEnableSelectionEvent},metadata:e},null,ip),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["send-composing-input","input-filter"];#n=(0,a9.zF)(this,ip);#eE=!1;#ni=(0,a5.Ut)(()=>this.#n.shadowRoot,"#textarea");#ew=(0,a5.Ut)(()=>this.#n.shadowRoot,"#form");_handleEnableConfirmEvent(e){let t=this.#ni();e?(t.addEventListener("input",this.#e_,{passive:!0}),t.addEventListener("compositionend",this.#eC,{passive:!0})):(t.removeEventListener("input",this.#e_),t.removeEventListener("compositionend",this.#eC))}_handleSendComposingInput(e){this.#eE=null!==e}#eT=e=>{let t=sj[e.type]??e.type;this.#n.dispatchEvent(new CustomEvent(t,{...st.$,detail:{value:this.#ni().value}}))};#e_=e=>{let t=this.#ni(),n=this.#n.getAttribute("input-filter"),l=n?t.value.replace(RegExp(n,"g"),""):t.value,i=e.isComposing;t.value=l,(!i||this.#eE)&&this.#n.dispatchEvent(new CustomEvent("lynxinput",{...st.$,detail:{value:l,textLength:l.length,cursor:t.selectionStart,isComposing:i,selectionStart:t.selectionStart,selectionEnd:t.selectionEnd}}))};#eC=()=>{let e=this.#ni(),t=this.#n.getAttribute("input-filter"),n=t?e.value.replace(RegExp(t,"g"),""):e.value;e.value=n,this.#eE||this.#n.dispatchEvent(new CustomEvent("lynxinput",{...st.$,detail:{value:n,textLength:n.length,cursor:e.selectionStart,isComposing:!1,selectionStart:e.selectionStart,selectionEnd:e.selectionEnd}}))};_handleEnableSelectionEvent(e){e?this.#ni().addEventListener("select",this.#ek,{passive:!0}):this.#ni().removeEventListener("select",this.#ek)}#ek=()=>{let e=this.#ni();this.#n.dispatchEvent(new CustomEvent("selection",{...st.$,detail:{selectionStart:e.selectionStart,selectionEnd:e.selectionEnd}}))};#eO=e=>{e.target===this.#ni()&&"number"==typeof e.detail&&e.stopImmediatePropagation()};constructor(e){this.#n=e;let t=this.#ni(),n=this.#ew();t.addEventListener("blur",this.#eT,{passive:!0}),t.addEventListener("focus",this.#eT,{passive:!0}),n.addEventListener("submit",this.#eT,{passive:!0}),n.addEventListener("input",this.#eO,{passive:!0})}});ig=[(0,a5.uA)("x-textarea",[a6.O,s6,s7,oe,ot],sv)],iy=[],iE=HTMLElement,(class extends iE{static #e=ib=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(iE[Symbol.metadata]??null):void 0;(0,a9.G4)(null,iv={value:ib},ig,{kind:"class",name:ib.name,metadata:e},null,iy),ib=iv.value,e&&Object.defineProperty(ib,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(ib,iy)})();#nl=(0,a5.Ut)(()=>this.shadowRoot,"#textarea");get value(){return this.#nl().value}set value(e){this.#nl().value=e}addText(e){let{text:t}=e,n=this.#nl(),l=n.selectionStart;if(null===l)n.value=t;else{let e=n.value;n.value=e.slice(0,l)+t+e.slice(l)}}setValue(e){let t,n=this.#nl();n.value=e.value,(t=e.index)&&n.setSelectionRange(t,t)}getValue(){let e=this.#nl();return{value:e.value,selectionBegin:e.selectionStart,selectionEnd:e.selectionEnd}}sendDelEvent(e){let{action:t,length:n}=e,l=this.#nl();1===t&&(n=1);let i=l.selectionStart;if(null===i){let e=l.value;l.value=l.value.substring(0,e.length-n)}else{let e=l.value;l.value=e.slice(0,i-n)+e.slice(i)}}select(){let e=this.#nl();e.setSelectionRange(0,e.value.length)}setSelectionRange(e){this.#nl().setSelectionRange(e.selectionStart,e.selectionEnd)}}),i_=[(0,a5.uA)("x-view",[sE,a6.O])],iC=[],iT=HTMLElement,class extends iT{static #e=iw=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(iT[Symbol.metadata]??null):void 0;(0,a9.G4)(null,iS={value:iw},i_,{kind:"class",name:iw.name,metadata:e},null,iC),iw=iS.value,e&&Object.defineProperty(iw,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(iw,iC)})();superScrollIntoView(e){super.scrollIntoView(e)}scrollIntoView(e){"object"==typeof e&&e.scrollIntoViewOptions?this.dispatchEvent(new CustomEvent(sa.eventName,{bubbles:!0,composed:!0,detail:e.scrollIntoViewOptions})):super.scrollIntoView(e)}[a6.v]=this};let on=(ik=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;ix=[(0,a5._y)("blur-radius",!0)],(0,a9.G4)(this,null,ix,{kind:"method",name:"_handleBlurRadius",static:!1,private:!1,access:{has:e=>"_handleBlurRadius"in e,get:e=>e._handleBlurRadius},metadata:e},null,ik),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["blur-radius"];#n=(0,a9.zF)(this,ik);#no=(0,a5.Ut)(()=>this.#n.shadowRoot,"#dynamic-style");_handleBlurRadius(e){e?(e=`blur(${parseFloat(e)}px)`,this.#no().innerHTML=`:host { backdrop-filter: ${e}; -webkit-backdrop-filter: ${e}}`):this.#no().innerHTML=""}constructor(e){this.#n=e}});iA=[(0,a5.uA)("x-blur-view",[a6.O,on],'<style id="dynamic-style"></style><slot></slot>')],iI=[],iF=HTMLElement,class extends iF{static #e=iL=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(iF[Symbol.metadata]??null):void 0;(0,a9.G4)(null,iO={value:iL},iA,{kind:"class",name:iL.name,metadata:e},null,iI),iL=iO.value,e&&Object.defineProperty(iL,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(iL,iI)})()};let ol=(iz=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;iR=[(0,a5.ZR)("change")],iM=[(0,a5.ZR)("willchange")],iP=[(0,a5.ZR)("offsetchange")],(0,a9.G4)(this,null,iR,{kind:"method",name:"_enableChangeEvent",static:!1,private:!1,access:{has:e=>"_enableChangeEvent"in e,get:e=>e._enableChangeEvent},metadata:e},null,iz),(0,a9.G4)(this,null,iM,{kind:"method",name:"_enableWillChangeEvent",static:!1,private:!1,access:{has:e=>"_enableWillChangeEvent"in e,get:e=>e._enableWillChangeEvent},metadata:e},null,iz),(0,a9.G4)(this,null,iP,{kind:"method",name:"_enableOffsetChangeEvent",static:!1,private:!1,access:{has:e=>"_enableOffsetChangeEvent"in e,get:e=>e._enableOffsetChangeEvent},metadata:e},null,iz),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=[];#n=(0,a9.zF)(this,iz);#nr=!1;#tT=!1;#nd=0;#a;constructor(e){this.#n=e}#r=(0,a5.Ut)(()=>this.#n.shadowRoot,"#content");#nh=()=>{if(!this.#tT)return;let e=this.#r(),t=this.#n.clientWidth,n=e.scrollLeft;this.#nc&&!sl.k&&(clearTimeout(this.#a),this.#a=setTimeout(()=>{this.#nu()},100)),this.#n.dispatchEvent(new CustomEvent("offsetchange",{...st.$,detail:{offset:n/t}}))};#nu=()=>{if(this.#tT){let e=this.#r(),t=this.#n.clientWidth,n=Math.floor(e.scrollLeft/t);n!==this.#nd&&(this.#n.dispatchEvent(new CustomEvent("change",{...st.$,detail:{index:n,isDragged:this.#nr}})),this.#nd=n)}};#nm=()=>{this.#nr=!0};#np=()=>{if(this.#nr=!1,this.#nv){let e=this.#r(),t=this.#n.clientWidth;if(t>0){let n=Math.round(e.scrollLeft/t);n=Math.max(0,Math.min(n,this.#n.children.length-1)),this.#n.dispatchEvent(new CustomEvent("willchange",{...st.$,detail:{index:n}}))}}};#nc=!1;_enableChangeEvent(e){this.#nc=e,this.#nb()}#nv=!1;_enableWillChangeEvent(e){this.#nv=e}#ng=!1;_enableOffsetChangeEvent(e){this.#ng=e,this.#nb()}#nb(){let e=this.#r();this.#ng||this.#nc?e.addEventListener("scroll",this.#nh,{passive:!0}):e.removeEventListener("scroll",this.#nh),sl.k&&this.#nc?e.addEventListener("scrollend",this.#nu,{passive:!0}):e.removeEventListener("scrollend",this.#nu)}connectedCallback(){this.#tT=!0;let e=this.#r();this.#n.addEventListener("touchstart",this.#nm,{passive:!0}),e.addEventListener("touchend",this.#np,{passive:!0}),e.addEventListener("touchcancel",this.#np,{passive:!0})}dispose(){let e=this.#r();e.removeEventListener("scroll",this.#nh),e.removeEventListener("scrollend",this.#nu)}});iD=[(0,a5.uA)("x-viewpager-ng",[sE,a6.O,ol],sb)],iG=[],ij=HTMLElement,(class extends ij{static #e=iH=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(ij[Symbol.metadata]??null):void 0;(0,a9.G4)(null,iN={value:iH},iD,{kind:"class",name:iH.name,metadata:e},null,iG),iH=iN.value,e&&Object.defineProperty(iH,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static notToFilterFalseAttributes=new Set(["allow-horizontal-gesture","enable-scroll"]);selectTab(e){let{index:t,smooth:n}=e;void 0===n&&(n=!0);let l=this.shadowRoot.children.item(2),i=l.clientWidth*t;l.scrollTo({left:i,behavior:n?"smooth":"instant"})}connectedCallback(){let e=this.getAttribute("select-index")||this.getAttribute("initial-select-index");if(null!==e){let t=Number(e),n=this.shadowRoot.children.item(2),l=()=>{0===n.clientWidth?requestAnimationFrame(l):this.selectTab({index:t,smooth:!1})};(0,a5.JS)(l)}}get[sl.l](){return this}static #C=(0,a9.zF)(iH,iG)}),iW=[(0,a5.uA)("x-viewpager-item-ng",[sE,a6.O])],iU=[],iB=HTMLElement,class extends iB{static #e=iV=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(iB[Symbol.metadata]??null):void 0;(0,a9.G4)(null,i$={value:iV},iW,{kind:"class",name:iV.name,metadata:e},null,iU),iV=i$.value,e&&Object.defineProperty(iV,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(iV,iU)})()};let oi=(iZ=[],iq=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;iX=[(0,a5._y)("estimated-main-axis-size-px",!0)],(0,a9.G4)(null,null,iX,{kind:"field",name:"_handlerEstimatedMainAxisSizePx",static:!1,private:!1,access:{has:e=>"_handlerEstimatedMainAxisSizePx"in e,get:e=>e._handlerEstimatedMainAxisSizePx,set:(e,t)=>{e._handlerEstimatedMainAxisSizePx=t}},metadata:e},iZ,iq),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["estimated-main-axis-size-px"];#n;_handlerEstimatedMainAxisSizePx=(0,a9.zF)(this,iZ,(0,a5._8)(()=>this.#n,"--estimated-main-axis-size-px",e=>`${parseFloat(e)}px`));constructor(e){(0,a9.zF)(this,iq),this.#n=e}});iK=[(0,a5.uA)("list-item",[a6.O,oi])],iQ=[],i0=HTMLElement,class extends i0{static #e=iJ=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(i0[Symbol.metadata]??null):void 0;(0,a9.G4)(null,iY={value:iJ},iK,{kind:"class",name:iJ.name,metadata:e},null,iQ),iJ=iY.value,e&&Object.defineProperty(iJ,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static notToFilterFalseAttributes=new Set(["recyclable"]);static #C=(0,a9.zF)(iJ,iQ)};let oa=(i2=[],i3=[],i8=[],i9=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;i1=[(0,a5._y)("sticky-offset",!0)],i4=[(0,a5._y)("span-count",!0),(0,a5._y)("column-count",!0)],(0,a9.G4)(null,null,i1,{kind:"field",name:"_handlerStickyOffset",static:!1,private:!1,access:{has:e=>"_handlerStickyOffset"in e,get:e=>e._handlerStickyOffset,set:(e,t)=>{e._handlerStickyOffset=t}},metadata:e},i2,i3),(0,a9.G4)(null,null,i4,{kind:"field",name:"_handlerCount",static:!1,private:!1,access:{has:e=>"_handlerCount"in e,get:e=>e._handlerCount,set:(e,t)=>{e._handlerCount=t}},metadata:e},i8,i9),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["sticky-offset","initial-scroll-index","span-count","column-count"];#n;_handlerStickyOffset=(0,a9.zF)(this,i2,(0,a5._8)(()=>this.#n,"--list-item-sticky-offset",e=>`${parseFloat(e)}px`));_handlerCount=((0,a9.zF)(this,i3),(0,a9.zF)(this,i8,(0,a5._8)(()=>this.#n,"--list-item-span-count",e=>`${parseFloat(e)}`)));constructor(e){(0,a9.zF)(this,i9),this.#n=e}connectedCallback(){let e=this.#n.getAttribute("initial-scroll-index");if(null!==e){let t=parseFloat(e),n=()=>{0===this.#n.clientHeight?requestAnimationFrame(n):this.#n.scrollToPosition({position:t})};(0,a5.JS)(n)}}}),os=function(e,t,n){let l,i,a,s,o=0;var r=function(){o=(null==n?void 0:n.leading)===!1?0:new Date().getTime(),l=null,s=e.apply(i,a),l||(i=a=null)};return function(){var d=new Date().getTime();o||(null==n?void 0:n.leading)!==!1||(o=d);var h=t-(d-o);return i=this,a=arguments,h<=0||h>t?(l&&(clearTimeout(l),l=null),o=d,s=e.apply(i,a),l||(i=a=null)):l||(null==n?void 0:n.trailing)===!1||(l=setTimeout(r,h)),s}},oo=(ai=[],aa=[],as=[],ao=[],ar=[],ad=[],ah=[],ac=[],au=[],am=[],ap=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;i5=[(0,a5.ZR)("scrolltoupper")],i6=[(0,a5._y)("upper-threshold-item-count",!0)],i7=[(0,a5.ZR)("scrolltolower")],ae=[(0,a5._y)("lower-threshold-item-count",!0)],at=[(0,a5.ZR)("lynxscroll"),(0,a5.ZR)("lynxscrollend"),(0,a5.ZR)("snap")],an=[(0,a5.ZR)("scrolltoupperedge")],al=[(0,a5.ZR)("scrolltoloweredge")],(0,a9.G4)(this,null,i6,{kind:"method",name:"_handleUpperThresholdItemCountChange",static:!1,private:!1,access:{has:e=>"_handleUpperThresholdItemCountChange"in e,get:e=>e._handleUpperThresholdItemCountChange},metadata:e},null,ai),(0,a9.G4)(this,null,ae,{kind:"method",name:"_handleLowerThresholdItemCountChange",static:!1,private:!1,access:{has:e=>"_handleLowerThresholdItemCountChange"in e,get:e=>e._handleLowerThresholdItemCountChange},metadata:e},null,ai),(0,a9.G4)(null,null,i5,{kind:"field",name:"_updateEventSwitches",static:!1,private:!1,access:{has:e=>"_updateEventSwitches"in e,get:e=>e._updateEventSwitches,set:(e,t)=>{e._updateEventSwitches=t}},metadata:e},aa,as),(0,a9.G4)(null,null,i7,{kind:"field",name:"_updateScrollToLowerEventSwitches",static:!1,private:!1,access:{has:e=>"_updateScrollToLowerEventSwitches"in e,get:e=>e._updateScrollToLowerEventSwitches,set:(e,t)=>{e._updateScrollToLowerEventSwitches=t}},metadata:e},ao,ar),(0,a9.G4)(null,null,at,{kind:"field",name:"_handleScrollEventsSwitches",static:!1,private:!1,access:{has:e=>"_handleScrollEventsSwitches"in e,get:e=>e._handleScrollEventsSwitches,set:(e,t)=>{e._handleScrollEventsSwitches=t}},metadata:e},ad,ah),(0,a9.G4)(null,null,an,{kind:"field",name:"_handleScrollToUpperEdgeEventEnable",static:!1,private:!1,access:{has:e=>"_handleScrollToUpperEdgeEventEnable"in e,get:e=>e._handleScrollToUpperEdgeEventEnable,set:(e,t)=>{e._handleScrollToUpperEdgeEventEnable=t}},metadata:e},ac,au),(0,a9.G4)(null,null,al,{kind:"field",name:"_handleScrollToLowerEdgeEventEnable",static:!1,private:!1,access:{has:e=>"_handleScrollToLowerEdgeEventEnable"in e,get:e=>e._handleScrollToLowerEdgeEventEnable,set:(e,t)=>{e._handleScrollToLowerEdgeEventEnable=t}},metadata:e},am,ap),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["upper-threshold-item-count","lower-threshold-item-count"];#n=(0,a9.zF)(this,ai);#nf=(0,a5.Ut)(()=>this.#n.shadowRoot,"#content");#ny;#nE;#nS;#s=0;#o=0;#nw=!1;#a;#d=(0,a5.Ut)(()=>this.#n.shadowRoot,"#upper-threshold-observer");#h=(0,a5.Ut)(()=>this.#n.shadowRoot,"#lower-threshold-observer");#u(){let e=null!==this.#n.getAttribute("need-visible-item-info"),{scrollTop:t,scrollLeft:n,scrollHeight:l,scrollWidth:i}=this.#nf(),a={scrollTop:t,scrollLeft:n,scrollHeight:l,scrollWidth:i,deltaX:n-this.#s,deltaY:t-this.#o,attachedCells:e?this.#n.getVisibleCells():void 0};return this.#s=n,this.#o=t,a}#n_=e=>{let{isIntersecting:t}=e[0];t&&this.#n.dispatchEvent(new CustomEvent("scrolltoupper",{...st.$,detail:this.#u()}))};_updateEventSwitches=(0,a9.zF)(this,aa,e=>{if(e?this.#n.setAttribute("x-enable-scrolltoupper-event",""):this.#n.removeAttribute("x-enable-scrolltoupper-event"),this.#eH.scrolltoupper=e,e){this.#ny||(this.#ny=new IntersectionObserver(this.#n_,{root:this.#nf()})),this.#nS||(this.#nS=new MutationObserver(this.#nC));let e=this.#n.getAttribute("upper-threshold-item-count"),t=null!==e?parseFloat(e):0,n=0===t?this.#d():this.#n.children[t-1];n&&this.#ny.observe(n),this.#nS.observe(this.#n,{childList:!0})}else this.#ny&&(this.#ny.disconnect(),this.#ny=void 0),this.#nS&&(this.#nS.disconnect(),this.#nS=void 0)});_handleUpperThresholdItemCountChange(e,t){var n,l;let i=null!==t?parseFloat(t):0,a=0===i?this.#d():this.#n.children[i-1];a&&(null==(n=this.#ny)||n.unobserve(a));let s=null!==e?parseFloat(e):0,o=0===s?this.#d():this.#n.children[s-1];o&&(null==(l=this.#ny)||l.observe(o))}#nT=((0,a9.zF)(this,as),e=>{let{isIntersecting:t}=e[0];t&&this.#n.dispatchEvent(new CustomEvent("scrolltolower",{...st.$,detail:this.#u()}))});#eH={lynxscroll:!1,lynxscrollend:!1,snap:!1,scrolltolower:!1,scrolltoupper:!1};_updateScrollToLowerEventSwitches=(0,a9.zF)(this,ao,e=>{if(this.#eH.scrolltolower=e,e?this.#n.setAttribute("x-enable-scrolltolower-event",""):this.#n.removeAttribute("x-enable-scrolltolower-event"),e){this.#nE||(this.#nE=new IntersectionObserver(this.#nT,{root:this.#nf()})),this.#nS||(this.#nS=new MutationObserver(this.#nC));let e=this.#n.getAttribute("lower-threshold-item-count"),t=null!==e?parseFloat(e):0,n=0===t?this.#h():this.#n.children[this.#n.children.length-t];n&&this.#nE.observe(n),this.#nS.observe(this.#n,{childList:!0})}else this.#nE&&(this.#nE.disconnect(),this.#nE=void 0),this.#nS&&(this.#nS.disconnect(),this.#nS=void 0)});_handleLowerThresholdItemCountChange(e,t){var n,l;let i=null!==t?parseFloat(t):0,a=0===i?this.#h():this.#n.children[this.#n.children.length-i];a&&(null==(n=this.#nE)||n.unobserve(a));let s=null!==e?parseFloat(e):0,o=0===s?this.#h():this.#n.children[this.#n.children.length-s];o&&(null==(l=this.#nE)||l.observe(o))}#nC=((0,a9.zF)(this,ar),e=>{let t=null==e?void 0:e[0];if((null==t?void 0:t.type)==="childList"){if(this.#eH.scrolltolower){this.#nE&&(this.#nE.disconnect(),this.#nE=void 0),this.#nE=new IntersectionObserver(this.#nT,{root:this.#nf()});let e=this.#n.getAttribute("lower-threshold-item-count"),t=null!==e?parseFloat(e):0,n=0===t?this.#h():this.#n.children[this.#n.children.length-t];n&&this.#nE.observe(n)}if(null!==this.#n.getAttribute("x-enable-scrolltoupper-event")){this.#ny&&(this.#ny.disconnect(),this.#ny=void 0),this.#ny=new IntersectionObserver(this.#n_,{root:this.#nf()});let e=this.#n.getAttribute("upper-threshold-item-count"),t=null!==e?parseFloat(e):0,n=0===t?this.#d():this.#n.children[t-1];n&&this.#ny.observe(n)}}});#nx=null;#v=()=>{this.#nw&&!sl.k&&(clearTimeout(this.#a),this.#a=setTimeout(()=>{this.#g()},100)),this.#n.dispatchEvent(new CustomEvent("lynxscroll",{...st.$,detail:this.#u()}))};_handleScrollEventsSwitches=(0,a9.zF)(this,ad,(e,t)=>{this.#eH[t]=e;let{lynxscroll:n,lynxscrollend:l,snap:i}=this.#eH,a=this.#n.getAttribute("scroll-event-throttle");this.#nw=null!==l||null!==i;let s=this.#nf();if(this.#nx&&s.removeEventListener("scroll",this.#nx),null!==n||this.#nw){let e=null!==a?parseFloat(a):0,t=os(this.#v,e,{leading:!0,trailing:!1});this.#nx=t,s.addEventListener("scroll",this.#nx),this.#s=0,this.#o=0}sl.k&&this.#nw?s.addEventListener("scrollend",this.#g):s.removeEventListener("scrollend",this.#g)});#c=((0,a9.zF)(this,ah),e=>{let{isIntersecting:t,target:n}=e[0],l=n.id;t&&("upper-threshold-observer"===l?this.#n.dispatchEvent(new CustomEvent("scrolltoupperedge",{...st.$,detail:this.#u()})):"lower-threshold-observer"===l&&this.#n.dispatchEvent(new CustomEvent("scrolltoloweredge",{...st.$,detail:this.#u()})))});_handleScrollToUpperEdgeEventEnable=(0,a9.zF)(this,ac,e=>{e?this.#n.setAttribute("x-enable-scrolltoupperedge-event",""):this.#n.removeAttribute("x-enable-scrolltoupperedge-event"),this.#nk(e)});#nk=((0,a9.zF)(this,au),sn(this.#nf,this.#d,this.#c));_handleScrollToLowerEdgeEventEnable=(0,a9.zF)(this,am,e=>{e?this.#n.setAttribute("x-enable-scrolltoloweredge-event",""):this.#n.removeAttribute("x-enable-scrolltoloweredge-event"),this.#nO(e)});#nO=((0,a9.zF)(this,ap),sn(this.#nf,this.#h,this.#c));#g=()=>{let e=this.#n.getAttribute("item-snap");if(this.#n.dispatchEvent(new CustomEvent("lynxscrollend",{...st.$})),null!==e){let e=Array.from(this.#n.children).filter(e=>"LIST-ITEM"===e.tagName),t=this.#nf().scrollTop,n=this.#nf().scrollLeft,l=e.find(e=>t>=e.offsetTop&&t<e.offsetTop+e.offsetHeight);this.#n.dispatchEvent(new CustomEvent("snap",{...st.$,detail:{position:l&&e.indexOf(l),scrollTop:t,scrollLeft:n}}))}};constructor(e){this.#n=e}}),or="waterfall-slot",od="waterfall-style",oh=(ag=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;av=[(0,a5.ZR)("scrolltolower")],ab=[(0,a5._y)("list-type",!0)],(0,a9.G4)(this,null,av,{kind:"method",name:"_handleXEnableHeaderOffsetEvent",static:!1,private:!1,access:{has:e=>"_handleXEnableHeaderOffsetEvent"in e,get:e=>e._handleXEnableHeaderOffsetEvent},metadata:e},null,ag),(0,a9.G4)(this,null,ab,{kind:"method",name:"_handlerListType",static:!1,private:!1,access:{has:e=>"_handlerListType"in e,get:e=>e._handlerListType},metadata:e},null,ag),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["list-type"];#n=(0,a9.zF)(this,ag);#nf=(0,a5.Ut)(()=>this.#n.shadowRoot,"#content");#nL=(0,a5.Ut)(()=>this.#n.shadowRoot,'div[part="lower-threshold-observer"]');#N;#nS;_handleXEnableHeaderOffsetEvent(e){if(e?this.#n.setAttribute("x-enable-scrolltolower-event",""):this.#n.removeAttribute("x-enable-scrolltolower-event"),e){let e=this.#nL(),t=this.#n.getAttribute("scroll-orientation")||"vertical",n=this.#nf();setTimeout(()=>{"vertical"===t?(e.style.setProperty("top",`${String(n.scrollHeight-1)}px`,"important"),e.style.setProperty("bottom","unset","important")):(e.style.setProperty("left",`${String(n.scrollWidth-1)}px`,"important"),e.style.setProperty("right","unset","important"))},100)}}#nA=()=>{var e,t;let n=document.createElement("slot");n.setAttribute("name",`${or}`),null==(t=this.#n.shadowRoot)||null==(e=t.querySelector("[part=upper-threshold-observer]"))||e.insertAdjacentElement("afterend",n)};#nI=()=>{let e=parseFloat(this.#n.getAttribute("span-count")||this.#n.getAttribute("column-count")||"")||1,t="vertical"===(this.#n.getAttribute("scroll-orientation")||"vertical"),n=Array(e).fill(0);for(let l=0;l<this.#n.children.length;l++){let i=this.#n.children[l],a=getComputedStyle(i).getPropertyValue("--list-main-axis-gap"),s=getComputedStyle(i).getPropertyValue("--list-cross-axis-gap"),o=t?i.getBoundingClientRect().height+parseFloat(a):i.getBoundingClientRect().width+parseFloat(a);if(null!==i.getAttribute("full-span")){let l=n[0];for(let t=1;t<e;t++)n[t]>l&&(l=n[t]);for(let t=0;t<e;t++)n[t]=l+o;t?(i.setAttribute(`${od}-left`,"0"),i.setAttribute(`${od}-top`,`${l}px`)):(i.setAttribute(`${od}-left`,`${l}px`),i.setAttribute(`${od}-top`,"0"))}else{let l=0,a=n[0];for(let t=1;t<e;t++)n[t]<a&&(l=t,a=n[t]);let r=`calc(${l} * (100% - ${s} * (${e} - 1))/ ${e} + ${Math.max(0,l)} * ${s})`;t?(i.setAttribute(`${od}-left`,r),i.setAttribute(`${od}-top`,`${a}px`)):(i.setAttribute(`${od}-left`,`${a}px`),i.setAttribute(`${od}-top`,r)),n[l]+=o}}for(let e=0;e<this.#n.children.length;e++){let t=this.#n.children[e];t.style.setProperty("left",t.getAttribute(`${od}-left`)),t.style.setProperty("top",t.getAttribute(`${od}-top`)),t.setAttribute("slot",or)}};constructor(e){this.#n=e}#nF=()=>{var e;null==(e=this.#N)||e.disconnect(),this.#N=new ResizeObserver(()=>{requestAnimationFrame(()=>{this.#nI()})}),Array.from(this.#n.children).forEach(e=>{var t;null==(t=this.#N)||t.observe(e)})};_handlerListType(e){if("waterfall"===e)this.#nA(),this.#N||this.#nF(),this.#nS||(this.#nS=new MutationObserver(e=>{let t=null==e?void 0:e[0];(null==t?void 0:t.type)==="childList"&&this.#nF()}),this.#nS.observe(this.#n,{childList:!0}));else{var t,n,l,i;null==(t=this.#N)||t.disconnect(),this.#N=void 0,null==(n=this.#nS)||n.disconnect(),this.#nS=void 0;for(let e=0;e<this.#n.children.length;e++)this.#n.children[e].removeAttribute("slot");null==(i=this.#n.shadowRoot)||null==(l=i.querySelector(`slot[name=${or}]`))||l.remove()}}});aE=[(0,a5.uA)("x-list",[a6.O,oa,oo,oh],sh)],aS=[],aw=HTMLElement,class extends aw{static #e=ay=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(aw[Symbol.metadata]??null):void 0;(0,a9.G4)(null,af={value:ay},aE,{kind:"class",name:ay.name,metadata:e},null,aS),ay=af.value,e&&Object.defineProperty(ay,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static notToFilterFalseAttributes=new Set(["enable-scroll"]);#nf=(0,a5.Ut)(()=>this.shadowRoot,"#content");#nR={rate:0,lastTimestamp:0,autoStop:!0,isScrolling:!1};#nM={};get scrollTop(){return this.#nf().scrollTop}set scrollTop(e){this.#nf().scrollTop=e}get scrollLeft(){return this.#nf().scrollLeft}set scrollLeft(e){this.#nf().scrollLeft=e}get scrollHeight(){return this.#nf().scrollHeight}get scrollWidth(){return this.#nf().scrollWidth}get[sl.l](){return this.#nf()}get __scrollTop(){return super.scrollTop}get __scrollLeft(){return super.scrollLeft}scrollToPosition(e){let t;if("string"==typeof e.offset){let n=parseFloat(e.offset);t={left:n,top:n}}else"number"==typeof e.offset&&(t={left:e.offset,top:e.offset});if("number"==typeof e.position){if(0===e.position)this.#nf().scrollTop=0,this.#nf().scrollLeft=0;else if(e.position>0&&e.position<this.childElementCount){let n=this.children.item(e.position);n instanceof HTMLElement&&(t=t?{left:n.offsetLeft+t.left,top:n.offsetTop+t.top}:{left:n.offsetLeft,top:n.offsetTop})}}t&&this.#nf().scrollTo({...t,behavior:e.smooth?"smooth":"auto"})}#nP=e=>{if(!this.#nR.isScrolling)return;if(!this.#nR.lastTimestamp){this.#nR.lastTimestamp=e,requestAnimationFrame(this.#nP);return}let t=this.#nf(),n=(e-this.#nR.lastTimestamp)/1e3*this.#nR.rate,l="vertical"===(this.getAttribute("scroll-orientation")||"vertical");t.scrollBy({left:l?0:n,top:l?n:0,behavior:"auto"}),this.#nR.lastTimestamp=e,(l?t.scrollTop+t.clientHeight>=t.scrollHeight:t.scrollLeft+t.clientWidth>=t.scrollWidth)&&this.#nR.autoStop?(l?t.scrollTop=t.scrollHeight-t.clientHeight:t.scrollLeft=t.scrollWidth-t.clientWidth,this.#nR.isScrolling=!1):requestAnimationFrame(this.#nP)};autoScroll(e){if(e.start){let t="number"==typeof e.rate?e.rate:parseFloat(e.rate);this.#nR={rate:t,lastTimestamp:0,isScrolling:!0,autoStop:!1!==e.autoStop};let n=this.#nf(),l="vertical"===(this.getAttribute("scroll-orientation")||"vertical")?n.clientHeight<=n.scrollHeight:n.clientWidth<=n.scrollWidth;this.#nR.lastTimestamp=0,l?setTimeout(()=>requestAnimationFrame(this.#nP),0):requestAnimationFrame(this.#nP)}else this.#nR.isScrolling=!1}getScrollContainerInfo(){return{scrollTop:this.scrollTop,scrollLeft:this.scrollLeft,scrollHeight:this.scrollHeight,scrollWidth:this.scrollWidth}}getVisibleCells=()=>{let e=Object.values(this.#nM),t=Array.from(this.children).filter(e=>"LIST-ITEM"===e.tagName);if(0===e.length){let n=this.#nf().getBoundingClientRect();e=t.filter(e=>{let t=e.getBoundingClientRect();return t.bottom>=n.top&&t.top<=n.bottom&&t.right>=n.left&&t.left<=n.right})}return e.map(e=>{let n=e.getBoundingClientRect();return{id:e.getAttribute("id"),itemKey:e.getAttribute("item-key"),bottom:n.bottom,top:n.top,left:n.left,right:n.right,index:t.indexOf(e)}})};#nz=()=>Object.values(this.#nM).map(e=>{let t=e.getBoundingClientRect();return{height:t.height,width:t.width,itemKey:e.getAttribute("item-key"),originX:t.x,originY:t.y}});#nN=e=>{var t,n,l;if(!e.target||!(e.target instanceof HTMLElement))return;let i=e.skipped,a=(null==(t=e.target)?void 0:t.getAttribute("id"))==="content"&&(null==(n=e.target)?void 0:n.getAttribute("part"))==="content",s="LIST-ITEM"===e.target.tagName;if(a&&!i){let e=this.#nz();setTimeout(()=>{this.dispatchEvent(new CustomEvent("layoutcomplete",{...st.$,detail:{visibleItemBeforeUpdate:e,visibleItemAfterUpdate:this.#nz()}}))},100);return}if(s){let t=null==(l=e.target)?void 0:l.getAttribute("item-key");if(!t)return;i?this.#nM[t]&&delete this.#nM[t]:this.#nM[t]=e.target;return}};connectedCallback(){this.#nf().addEventListener("contentvisibilityautostatechange",this.#nN,{passive:!0})}static #C=(0,a9.zF)(ay,aS)};let oc=(aT=[],ax=[],ak=[],aO=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;a_=[(0,a5._y)("src",!0)],aC=[(0,a5._y)("html",!0)],(0,a9.G4)(null,null,a_,{kind:"field",name:"_handleSrc",static:!1,private:!1,access:{has:e=>"_handleSrc"in e,get:e=>e._handleSrc,set:(e,t)=>{e._handleSrc=t}},metadata:e},aT,ax),(0,a9.G4)(null,null,aC,{kind:"field",name:"_handleHtml",static:!1,private:!1,access:{has:e=>"_handleHtml"in e,get:e=>e._handleHtml,set:(e,t)=>{e._handleHtml=t}},metadata:e},ak,aO),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["src","html"];#n;#nH=(0,a5.Ut)(()=>this.#n.shadowRoot,"#webview");constructor(e){(0,a9.zF)(this,aO),this.#n=e}_handleSrc=(0,a9.zF)(this,aT,(0,a5.H$)(this.#nH,"src"));_handleHtml=((0,a9.zF)(this,ax),(0,a9.zF)(this,ak,(0,a5.H$)(this.#nH,"srcdoc")))});aI=[(0,a5.uA)("x-webview",[a6.O,oc],sg)],aF=[],aR=HTMLElement,class extends aR{static #e=aA=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(aR[Symbol.metadata]??null):void 0;(0,a9.G4)(null,aL={value:aA},aI,{kind:"class",name:aA.name,metadata:e},null,aF),aA=aL.value,e&&Object.defineProperty(aA,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(aA,aF)})();#nH=(0,a5.Ut)(()=>this.shadowRoot,"#webview");#nD=()=>{this.dispatchEvent(new CustomEvent("load",{bubbles:!0,composed:!0,detail:{url:this.#nH().src}})),this.dispatchEvent(new CustomEvent("bindload",{bubbles:!0,composed:!0,detail:{url:this.#nH().src}}))};#nG=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"}}))};#nj=e=>{e.source===this.#nH().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.#nH().addEventListener("load",this.#nD),this.#nH().addEventListener("error",this.#nG),window.addEventListener("message",this.#nj)}disconnectedCallback(){this.#nH().removeEventListener("load",this.#nD),this.#nH().removeEventListener("error",this.#nG),window.removeEventListener("message",this.#nj)}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.#nH().src=this.#nH().src}};var ou=n(33553);n(46455),n(61203);let om=!1,op=e=>e.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">"),ov=e=>{if(!e)return e;if(e.includes("\x3c!--")||e.includes("<!")||e.includes("<?")||e.includes("<%"))return op(e);let t=/<\s*\/?\s*([A-Za-z][\w-]*)\b[^>]*>/g,n=null,l=!1;for(;n=t.exec(e);){l=!0;let t=(n[1]??"").toLowerCase();if("span"!==t&&"p"!==t)return op(e)}return l?e.replace(/<(span|p)\b([^>]*?)(\/?)>/gi,(e,t,n,l)=>{let i=String(t).toLowerCase(),a=String(n??"").replaceAll(""",'"').replaceAll(""",'"').replaceAll("'","'").replaceAll("'","'").replaceAll("&","&").replaceAll("<","<").replaceAll(">",">"),s=/\bclass\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+))/i.exec(a),o=((null==s?void 0:s[1])??(null==s?void 0:s[2])??(null==s?void 0:s[3])??"").trim().split(/\s+/).filter(Boolean).filter(e=>/^[A-Za-z0-9_-]+$/.test(e)).join(" "),r=o?` class="${o.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}"`:"";return"/"===String(l??"")?`<${i}${r}></${i}>`:`<${i}${r}>`}):e.includes("<")?op(e):e},ob=e=>{for(let t of e)((null==t?void 0:t.type)==="html_inline"||(null==t?void 0:t.type)==="html_block")&&(t.content=ov(String(t.content??""))),Array.isArray(null==t?void 0:t.children)&&ob(t.children)},og=(e,t)=>{let n={},l=e.parse(t,n);return ob(l),e.renderer.render(l,e.options,n)},of=null,oy=null,oE=()=>{if(of||o)return of;if(!l)return null;try{(of=new l({html:!0,linkify:!0})).enable(["table","strikethrough"])}catch(e){o=e}return of},oS=e=>{let t=oy||(i?oy=i(window):null);return t?t.sanitize(e,{USE_PROFILES:{html:!0}}):e},ow=()=>({start:-1,end:-1,direction:"forward"}),o_=(e,t,n)=>!!n&&(n===e||n===t||e.contains(n)||!!(null==t?void 0:t.contains(n))),oC=(e,t,n,l,i)=>{if(!i)return null;let a=((e,t)=>{let n=e.getComposedRanges;if(!t||"function"!=typeof n)return null;try{return n.call(e,{shadowRoots:[t]})[0]??null}catch{try{return n.call(e,t)[0]??null}catch{return null}}})(i,l)??(i.rangeCount>0?i.getRangeAt(0):null);if(!a)return null;if(!n.contains(a.startContainer)||!n.contains(a.endContainer)){var s;if(!o_(t,l,a.startContainer)||!o_(t,l,a.endContainer)||!o_(t,l,i.anchorNode)||!o_(t,l,i.focusNode))return null;let o=i.toString();if(!o)return null;let r=(null==(s=n.textContent)?void 0:s.indexOf(o))??-1;return r<0?null:((e,t,n,l)=>{let i=e.createTreeWalker(t,NodeFilter.SHOW_TEXT),a=0,s=null,o=0,r=null,d=0,h=i.nextNode();for(;h;){var c;let e=(null==(c=h.nodeValue)?void 0:c.length)??0;if(!s&&a+e>=n&&(s=h,o=n-a),a+e>=l){r=h,d=l-a;break}a+=e,h=i.nextNode()}if(!s)return null;r||(r=s,d=o);let u=e.createRange();return u.setStart(s,Math.max(0,Math.min(o,s.length))),u.setEnd(r,Math.max(0,Math.min(d,r.length))),u})(e,n,r,r+o.length)}let o=e.createRange();return o.setStart(a.startContainer,a.startOffset),o.setEnd(a.endContainer,a.endOffset),o},oT=(e,t,n,l)=>{if(!n||!t.contains(n))return null;let i=e.createRange();i.selectNodeContents(t);try{i.setEnd(n,l)}catch{return null}return i.toString().length},ox=e=>e.replace(/src\s*=\s*"inlineview:\/\/([^"]+)"/g,(e,t)=>`data-inlineview="${t}"`),ok=new Set(["font-weight","opacity","z-index","flex","flex-grow","flex-shrink","order"]),oO={normalText:".markdown-body",link:".markdown-body a",inlineCode:".markdown-body code:not(pre code)",codeBlock:[".markdown-body pre",".markdown-body pre code"],h1:".markdown-body h1",h2:".markdown-body h2",h3:".markdown-body h3",h4:".markdown-body h4",h5:".markdown-body h5",h6:".markdown-body h6",quote:".markdown-body blockquote",orderedList:".markdown-body ol",unorderedList:".markdown-body ul",listItem:".markdown-body li",image:".markdown-body img",span:".markdown-body span",p:".markdown-body p",table:".markdown-body table",thead:".markdown-body thead",tbody:".markdown-body tbody",tr:".markdown-body tr",th:".markdown-body th",td:".markdown-body td",imageCaption:".markdown-body .md-image-caption"},oL=e=>e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`),oA=(e,t)=>{if(null==t)return null;if("number"==typeof t)return ok.has(e)?`${t}`:`${t}px`;if("string"==typeof t){if(e.includes("color")){let e;return e=t.trim(),/^[0-9a-fA-F]{6,8}$/.test(e)?`#${e}`:t}return t}return null},oI=e=>{if(!e)return{};try{let t=JSON.parse(e);if(t&&"object"==typeof t)return t}catch{}return{}},oF=(aZ=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;aM=[(0,a5._y)("content",!0)],aP=[(0,a5._y)("markdown-effect",!0)],az=[(0,a5._y)("markdown-style",!0)],aN=[(0,a5._y)("content-id",!0)],aH=[(0,a5._y)("text-selection",!0)],aD=[(0,a5._y)("animation-type",!0)],aG=[(0,a5._y)("animation-velocity",!0)],aj=[(0,a5._y)("animation-paused",!0)],a$=[(0,a5._y)("initial-animation-step",!0)],aV=[(0,a5._y)("content-complete",!0)],aW=[(0,a5._y)("typewriter-dynamic-height",!0)],aU=[(0,a5._y)("typewriter-height-transition-duration",!0)],aB=[(0,a5._y)("text-maxline",!0)],aX=[(0,a5._y)("content-range",!0)],(0,a9.G4)(this,null,aM,{kind:"method",name:"_handleContent",static:!1,private:!1,access:{has:e=>"_handleContent"in e,get:e=>e._handleContent},metadata:e},null,aZ),(0,a9.G4)(this,null,aP,{kind:"method",name:"_handleMarkdownEffect",static:!1,private:!1,access:{has:e=>"_handleMarkdownEffect"in e,get:e=>e._handleMarkdownEffect},metadata:e},null,aZ),(0,a9.G4)(this,null,az,{kind:"method",name:"_handleMarkdownStyle",static:!1,private:!1,access:{has:e=>"_handleMarkdownStyle"in e,get:e=>e._handleMarkdownStyle},metadata:e},null,aZ),(0,a9.G4)(this,null,aN,{kind:"method",name:"_handleContentId",static:!1,private:!1,access:{has:e=>"_handleContentId"in e,get:e=>e._handleContentId},metadata:e},null,aZ),(0,a9.G4)(this,null,aH,{kind:"method",name:"_handleTextSelection",static:!1,private:!1,access:{has:e=>"_handleTextSelection"in e,get:e=>e._handleTextSelection},metadata:e},null,aZ),(0,a9.G4)(this,null,aD,{kind:"method",name:"_handleAnimationType",static:!1,private:!1,access:{has:e=>"_handleAnimationType"in e,get:e=>e._handleAnimationType},metadata:e},null,aZ),(0,a9.G4)(this,null,aG,{kind:"method",name:"_handleAnimationVelocity",static:!1,private:!1,access:{has:e=>"_handleAnimationVelocity"in e,get:e=>e._handleAnimationVelocity},metadata:e},null,aZ),(0,a9.G4)(this,null,aj,{kind:"method",name:"_handleAnimationPaused",static:!1,private:!1,access:{has:e=>"_handleAnimationPaused"in e,get:e=>e._handleAnimationPaused},metadata:e},null,aZ),(0,a9.G4)(this,null,a$,{kind:"method",name:"_handleInitialAnimationStep",static:!1,private:!1,access:{has:e=>"_handleInitialAnimationStep"in e,get:e=>e._handleInitialAnimationStep},metadata:e},null,aZ),(0,a9.G4)(this,null,aV,{kind:"method",name:"_handleContentComplete",static:!1,private:!1,access:{has:e=>"_handleContentComplete"in e,get:e=>e._handleContentComplete},metadata:e},null,aZ),(0,a9.G4)(this,null,aW,{kind:"method",name:"_handleTypewriterDynamicHeight",static:!1,private:!1,access:{has:e=>"_handleTypewriterDynamicHeight"in e,get:e=>e._handleTypewriterDynamicHeight},metadata:e},null,aZ),(0,a9.G4)(this,null,aU,{kind:"method",name:"_handleTypewriterHeightTransition",static:!1,private:!1,access:{has:e=>"_handleTypewriterHeightTransition"in e,get:e=>e._handleTypewriterHeightTransition},metadata:e},null,aZ),(0,a9.G4)(this,null,aB,{kind:"method",name:"_handleTextMaxline",static:!1,private:!1,access:{has:e=>"_handleTextMaxline"in e,get:e=>e._handleTextMaxline},metadata:e},null,aZ),(0,a9.G4)(this,null,aX,{kind:"method",name:"_handleContentRange",static:!1,private:!1,access:{has:e=>"_handleContentRange"in e,get:e=>e._handleContentRange},metadata:e},null,aZ),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["content","markdown-style","content-id","text-selection","animation-type","animation-velocity","animation-paused","initial-animation-step","content-complete","typewriter-dynamic-height","typewriter-height-transition-duration","text-maxline","content-range","markdown-effect"];#n=(0,a9.zF)(this,aZ);#n$=(0,a5.Ut)(()=>this.#n.shadowRoot,"#markdown-root");#nV=(0,a5.Ut)(()=>this.#n.shadowRoot,"#markdown-style");#nW=!1;#nU="";#nB="";#nX;#nZ=!1;#nq=!1;#nY="";#nJ;#nK=60;#nQ="";#n0=!1;#n1;#tk;#n4=null;#n2;#n3="none";#n8=40;#n9;#n5=0;#n6=!1;#n7=!1;#le=!0;#lt=0;#ln=!1;#ll=0;#li=null;#la;#ls=0;#lo=!1;#lr;#ld=null;constructor(e){this.#n=e}connectedCallback(){this.#lh()}dispose(){this.#lc(),this.#lu(),clearTimeout(this.#n1),this.#n1=void 0,this.#nZ&&(this.#n$().removeEventListener("click",this.#lm),this.#nZ=!1),this.#nq&&(document.removeEventListener("selectionchange",this.#tL),document.removeEventListener("mouseup",this.#lp),document.removeEventListener("touchend",this.#lp),document.removeEventListener("keyup",this.#lp),this.#nq=!1)}#lh(){this.#nZ||(this.#n$().addEventListener("click",this.#lm),this.#nZ=!0,this.#nq||(document.addEventListener("selectionchange",this.#tL),document.addEventListener("mouseup",this.#lp),document.addEventListener("touchend",this.#lp),document.addEventListener("keyup",this.#lp),this.#nq=!0))}#lm=e=>{let t=e.target;if(!t)return;let n=this.#n$(),l=t.closest("a");if(l&&n.contains(l)){e.preventDefault(),this.#n.dispatchEvent(new CustomEvent("bindlink",{detail:{url:l.getAttribute("href")??"",content:l.textContent??"",contentId:this.#nX},bubbles:!0,composed:!0}));return}let i=t.closest("img");i&&n.contains(i)&&this.#n.dispatchEvent(new CustomEvent("bindimageTap",{detail:{url:i.getAttribute("src")??"",contentId:this.#nX},bubbles:!0,composed:!0}))};#lv(){if(this.#n0)try{let e=this.#n$(),t=((e,t)=>{var n;let l=e.ownerDocument,i=e.shadowRoot,a=[(null==i||null==(n=i.getSelection)?void 0:n.call(i))??null,l.getSelection()].filter((e,t,n)=>!!e&&n.indexOf(e)===t),s=null,o=null;for(let n of a){let a=oC(l,e,t,i,n);if(a&&!a.collapsed){s=a,o=n;break}}if(!s||!o)return ow();let r=oT(l,t,s.startContainer,s.startOffset),d=oT(l,t,s.endContainer,s.endOffset);if(null===r||null===d||r===d)return ow();let h=oT(l,t,o.anchorNode,o.anchorOffset),c=oT(l,t,o.focusNode,o.focusOffset);return{start:Math.min(r,d),end:Math.max(r,d),direction:null!==h&&null!==c&&h>c?"backward":"forward"}})(this.#n,e),n=`${t.start}:${t.end}:${t.direction}`;if(n===this.#tk)return;this.#tk=n,this.#n.dispatchEvent(new CustomEvent("bindselectionchange",{detail:t,bubbles:!0,composed:!0}))}catch{}}#lb=()=>{clearTimeout(this.#n1),this.#n1=setTimeout(()=>{this.#n1=void 0,this.#lv()},0)};#tL=()=>{this.#lv(),this.#lb()};#lp=()=>{this.#lv(),this.#lb()};#lg(){if(!this.#nW){if(this.#nW=!0,!om&&!s)return void(om?Promise.resolve():a||(a=n.e(166).then(n.bind(n,72003)).then(e=>{l=e.MarkdownIt,i=e.createDOMPurify,om=!0}).catch(e=>{s=e}))).then(()=>{this.#nW=!1,this.#lf()});(0,a5.JS)(()=>{this.#nW=!1,this.#lf()})}}#lf(){let e=this.#n$();if(!this.#nU){this.#ly(),e.innerHTML="",this.#nB="",this.#nY="",this.#lc();return}if("typewriter"===this.#n3)return void this.#lE(e);let t=oE();if(!t){let t=this.#lr?this.#nU.slice(this.#lr[0],this.#lr[1]):this.#nU;e.textContent=t,this.#nB=t,this.#nY="",this.#lc();return}if(this.#lS())return void this.#lw(e);let n=this.#lr?this.#nU.slice(this.#lr[0],this.#lr[1]):this.#nU;e.innerHTML=oS(ox(og(t,n))),this.#l_(e),this.#nB=n,this.#nY="",this.#lc(),this.#lC(),this.#lT(e)}#lS(){return!!this.#nB&&!!this.#nU.startsWith(this.#nB)&&this.#nU.length!==this.#nB.length}#lw(e){let t=this.#nU.slice(this.#nB.length);if(!t)return;let n=t.lastIndexOf("\n");if(-1===n){this.#nY=t,this.#lx();return}let l=t.slice(0,n+1);if(l){let t=oE();if(!t)return;let n=og(t,l);this.#lk(e,n),this.#nB+=l}this.#nY=t.slice(n+1),this.#nY?this.#lx():this.#lc()}#lx(){this.#lc(),this.#nJ=setTimeout(()=>{this.#nJ=void 0,this.#lO()},this.#nK)}#lc(){this.#nJ&&(clearTimeout(this.#nJ),this.#nJ=void 0)}#ly(){this.#lu(),this.#n6=!1,this.#n5=0,this.#lt=0,this.#lL()}#lO(){if(!this.#nY||!this.#nU.startsWith(this.#nB))return;let e=this.#nB.length+this.#nY.length;if(this.#nU.length!==e)return;let t=this.#n$(),n=oE();if(!n)return;let l=og(n,this.#nY);this.#lk(t,l),this.#nB+=this.#nY,this.#nY="",this.#lC(),this.#lT(this.#n$())}#lk(e,t){let n=document.createElement("template");n.innerHTML=oS(ox(t)),e.append(n.content),this.#lT(e),this.#l_(e)}#lA(e){var t,n;if(!this.#ld||"text-mask"!==this.#ld.type||!1!==this.#le&&this.#n5>=this.#lt)return;let{color:l,rangeStart:i,rangeEnd:a}=this.#ld;if(!l||"number"!=typeof i)return;e.querySelectorAll(".md-text-mask-effect").forEach(e=>{let t=e.querySelector(".md-text-mask-effect-content"),n=e.parentNode;if(t&&n){for(;t.firstChild;)n.insertBefore(t.firstChild,e);n.removeChild(e)}});let s=document.createTreeWalker(e,NodeFilter.SHOW_TEXT),o=[];for(;s.nextNode();){let n=s.currentNode,l=n.parentElement;l===e&&((null==(t=n.nodeValue)?void 0:t.trim())??"")===""||l&&(l.closest(".md-typewriter-cursor")||l.closest(".md-truncation")||l.closest(".md-text-mask-effect-overlay"))||o.push(n)}let r=o.reduce((e,t)=>{var n;return e+((null==(n=t.nodeValue)?void 0:n.length)??0)},0),d=i<0?r+i:i,h=Math.max(0,Math.min(r,d)),c=Math.max(h,Math.min(r,("number"==typeof a?a<0?r+a:a:d)+1));if(c<=h)return;let u=0,m=[];if(o.forEach(e=>{var t;let n=(null==(t=e.nodeValue)?void 0:t.length)??0,l=u,i=u+n,a=Math.max(h,l)-l,s=Math.min(c,i)-l;a<s&&m.push({node:e,startOffset:a,endOffset:s}),u=i}),0===m.length)return;let p=[];for(let{node:e,startOffset:t,endOffset:i}of m.reverse()){let a=e;t>0&&(a=e.splitText(t));let s=i-t;s<((null==(n=a.nodeValue)?void 0:n.length)??0)&&a.splitText(s);let o=a.nodeValue??"",r=document.createElement("span");r.className="md-text-mask-effect";let d=document.createElement("span");d.className="md-text-mask-effect-content";let h=document.createElement("span");h.className="md-text-mask-effect-overlay",h.setAttribute("aria-hidden","true"),h.textContent=o,h.style.background=l;let c=a.parentNode;c&&(c.insertBefore(r,a),d.appendChild(a),r.append(d,h),p.unshift({content:d,overlay:h}))}if(0===p.length)return;let v=p.map(e=>{let{content:t}=e;return t.getBoundingClientRect().width}),b=v.reduce((e,t)=>e+t,0);if(b<=0)return;let g=0;p.forEach((e,t)=>{let{overlay:n}=e;n.style.backgroundRepeat="no-repeat",n.style.backgroundSize=`${b}px 100%`,n.style.backgroundPosition=`${-g}px 0`,g+=v[t]??0})}#lC(){this.#n.dispatchEvent(new CustomEvent("bindparseEnd",{detail:{id:this.#nX},bubbles:!0,composed:!0}))}#lT(e){if(this.#lA(e),this.#ls>0?queueMicrotask(()=>{try{e.scrollHeight>e.clientHeight+1&&!this.#lo&&(this.#lo=!0,this.#n.dispatchEvent(new CustomEvent("bindoverflow",{detail:{type:"ellipsis"},bubbles:!0,composed:!0})))}catch{}}):this.#lo=!1,"typewriter"===this.#n3&&this.#ln){let t=this.#ll;t>0&&(e.style.transition=`height ${t}s ease`)}else e.style.transition="";this.#ls>0&&this.#lI(e)||this.#lF()}#lE(e){let[t,n]=this.#lr?this.#lr:[0,this.#nU.length];this.#lt=Math.max(0,n-t),!this.#n6&&(this.#n6=!0,this.#n.dispatchEvent(new CustomEvent("binddrawStart",{bubbles:!0,composed:!0})),this.#n7||this.#lR());let l=this.#nU.slice(t,t+this.#n5),i=oE();i?(e.innerHTML=oS(ox(og(i,l))),this.#l_(e)):e.textContent=l,this.#lM(e),this.#lT(e),this.#n5>=this.#lt&&(this.#lu(),!1!==this.#le&&this.#n.dispatchEvent(new CustomEvent("binddrawEnd",{bubbles:!0,composed:!0})))}#lR(){this.#lu();let e=Math.max(10,Math.floor(1e3/Math.max(1,this.#n8)));this.#n9=setInterval(()=>{if(this.#n5<this.#lt){this.#n5+=1,this.#n.dispatchEvent(new CustomEvent("bindanimationStep",{detail:{animationStep:this.#n5,maxAnimationStep:this.#lt},bubbles:!0,composed:!0}));let e=this.#n$();this.#lE(e)}else this.#lu()},e)}#lu(){this.#n9&&(clearInterval(this.#n9),this.#n9=void 0)}#lP(e){let t=oI(e);this.#n4=t.truncation??null,this.#li=t.typewriterCursor??null;let{truncation:n,typewriterCursor:l,...i}=t;this.#nQ=(e=>{let t=[];for(let[n,l]of Object.entries(e)){if(!l||"object"!=typeof l)continue;let e=[];if(n.startsWith(".")||n.startsWith("#"))e=[`.markdown-body ${n}`];else{if(!oO[n])continue;e=Array.isArray(oO[n])?oO[n]:[oO[n]]}let i=Object.entries(l).map(e=>{let[t,n]=e,l=oL(t),i=oA(l,n);return i?`${l}: ${i};`:null}).filter(Boolean).join("");if(i)for(let n of e)t.push(`${n} {${i}}`)}return t.join("\n")})(i),this.#lz()}#lz(){let e=this.#nV(),t=this.#nQ||"";this.#n0&&(t+="\n.markdown-body { user-select: text; }"),this.#ls>0&&(t+=`
|
|
365
|
+
.markdown-body { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: ${this.#ls}; overflow: hidden; }`),e.textContent=t}_handleContent(e){let t=e??"",n=t!==this.#nU;this.#nU=t,n&&"typewriter"===this.#n3&&this.#ly(),this.#lg()}_handleMarkdownEffect(e){try{this.#ld=e?JSON.parse(e):null}catch{this.#ld=null}this.#lg()}_handleMarkdownStyle(e){this.#lP(e)}_handleContentId(e){this.#nX=e??void 0}_handleTextSelection(e){this.#n0=!!(e&&"false"!==e),this.#n0||(clearTimeout(this.#n1),this.#n1=void 0,this.#tk=void 0),this.#lz()}_handleAnimationType(e){let t=(e??"none").toLowerCase();this.#n3="typewriter"===t?"typewriter":"none",this.#n6=!1,this.#lu(),this.#lg()}_handleAnimationVelocity(e){let t=Number(e);!Number.isNaN(t)&&t>0&&(this.#n8=t),"typewriter"===this.#n3&&!this.#n7&&this.#n9&&this.#lR()}_handleAnimationPaused(e){(this.#n7=!!(e&&"false"!==e),this.#n7)?this.#lu():"typewriter"===this.#n3&&this.#n6&&this.#n5<this.#lt&&this.#lR()}_handleInitialAnimationStep(e){let t=Number(e);this.#n5=Number.isNaN(t)?0:Math.max(0,Math.floor(t))}_handleContentComplete(e){this.#le="false"!==e}_handleTypewriterDynamicHeight(e){this.#ln=!!(e&&"false"!==e)}_handleTypewriterHeightTransition(e){let t=Number(e);this.#ll=Number.isNaN(t)?0:Math.max(0,t)}_handleTextMaxline(e){let t=Number(e);this.#ls=Number.isNaN(t)?0:Math.max(0,Math.floor(t)),this.#lz()}_handleContentRange(e){if(e)try{let t=JSON.parse(e);if(Array.isArray(t)&&2===t.length){let e=Number(t[0]),n=Number(t[1]);Number.isNaN(e)||Number.isNaN(n)||!(n>=e)||(this.#lr=[Math.max(0,e),Math.max(0,n)])}}catch{let t=e.split(",");if(2===t.length){let e=Number(t[0]),n=Number(t[1]);Number.isNaN(e)||Number.isNaN(n)||!(n>=e)||(this.#lr=[Math.max(0,e),Math.max(0,n)])}}else this.#lr=void 0;this.#lg()}#l_(e){try{for(let t of Array.from(e.querySelectorAll("img"))){let e=t.getAttribute("data-inlineview");if(e){let n=document.createElement("span");n.className="md-inline-view";let l=document.createElement("slot");l.name=e,n.appendChild(l),t.replaceWith(n)}}}catch{}}#lI(e){if(!(e.scrollHeight>e.clientHeight+1))return!1;if(!this.#n2){let t=document.createElement("span");t.className="md-truncation",this.#n2=t,e.appendChild(t)}let t=this.#n4||{},n=this.#n2;if(n.textContent="",n.innerHTML="","view"===t.truncationType&&t.content){let e=this.#n.querySelector(`#${CSS.escape(String(t.content))}`);e?n.appendChild(e):n.textContent="…"}else t.content?n.textContent=String(t.content):n.textContent="…";return!0}#lF(){this.#n2&&this.#n2.parentNode&&this.#n2.parentNode.removeChild(this.#n2),this.#n2=void 0}#lM(e){if(!1!==this.#le&&this.#n5>=this.#lt)return void this.#lL();let t=this.#li||{},n=t.customCursor;if("none"===n)return void this.#lL();if(!this.#la){let l=document.createElement("span");if(l.className="md-typewriter-cursor",this.#la=l,t.verticalAlign&&(l.style.verticalAlign=t.verticalAlign),n){let t=this.#n.querySelector(`#${CSS.escape(n)}`)||e.querySelector(`#${CSS.escape(n)}`);t?l.appendChild(t):l.textContent="…"}else l.textContent="…"}let l=e;for(;;){let e=l.lastChild;for(;e;)if(e.nodeType!==Node.TEXT_NODE||e.textContent&&""!==e.textContent.trim())break;else e=e.previousSibling;if(e&&e.nodeType===Node.ELEMENT_NODE&&!["IMG","BR","HR","INPUT","TABLE","PRE","CODE"].includes(e.tagName))l=e;else break}l.appendChild(this.#la)}#lL(){this.#la&&this.#la.parentNode&&this.#la.parentNode.removeChild(this.#la),this.#la=void 0}}),oR=(e,t,n)=>{let l=0,i=Math.max(0,Math.min(n,e.length));for(let n=0;n<i&&!(l>=t.length);n+=1)e[n]===t[l]&&(l+=1);return l},oM=(e,t,n)=>!!n&&(n===e||n===t||e.contains(n)||!!(null==t?void 0:t.contains(n))),oP=(e,t,n)=>{if(!n)return null;let l=e.shadowRoot,i=((e,t)=>{let n=e.getComposedRanges;if(!t||"function"!=typeof n)return null;try{return n.call(e,{shadowRoots:[t]})[0]??null}catch{try{return n.call(e,t)[0]??null}catch{return null}}})(n,l)??(n.rangeCount>0?n.getRangeAt(0):null);if(!i)return null;if(!t.contains(i.startContainer)||!t.contains(i.endContainer)){var a;if(!oM(e,l,i.startContainer)||!oM(e,l,i.endContainer)||!oM(e,l,n.anchorNode)||!oM(e,l,n.focusNode))return null;let s=n.toString();if(!s)return null;let o=(null==(a=t.textContent)?void 0:a.indexOf(s))??-1;return o<0?null:((e,t,n,l)=>{let i=e.createTreeWalker(t,NodeFilter.SHOW_TEXT),a=0,s=null,o=0,r=null,d=0,h=i.nextNode();for(;h;){var c;let e=(null==(c=h.nodeValue)?void 0:c.length)??0;if(!s&&a+e>=n&&(s=h,o=n-a),a+e>=l){r=h,d=l-a;break}a+=e,h=i.nextNode()}if(!s)return null;r||(r=s,d=o);let u=e.createRange();return u.setStart(s,Math.max(0,Math.min(o,s.length))),u.setEnd(r,Math.max(0,Math.min(d,r.length))),u})(e.ownerDocument,t,o,o+s.length)}let s=e.ownerDocument.createRange();return s.setStart(i.startContainer,i.startOffset),s.setEnd(i.endContainer,i.endOffset),s},oz=e=>{let t=e.shadowRoot;return[t&&"function"==typeof t.getSelection?t.getSelection():null,e.ownerDocument.getSelection()].filter((e,t,n)=>!!e&&n.indexOf(e)===t)},oN=(e,t)=>{for(let n of oz(e)){let l=oP(e,t,n);if(l)return{selection:n,range:l}}return null};aQ=[(0,a5.uA)("x-markdown",[a6.O,oF],sp)],a0=[],a1=HTMLElement,aq=(0,ou._)("markdown-style"),aY=(0,ou._)("markdown-style"),class extends a1{static #e=aK=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(a1[Symbol.metadata]??null):void 0;(0,a9.G4)(null,aJ={value:aK},aQ,{kind:"class",name:aK.name,metadata:e},null,a0),aK=aJ.value,e&&Object.defineProperty(aK,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static notToFilterFalseAttributes=new Set(["content-complete"]);#lN(){return oI(this.getAttribute("markdown-style"))}#lH(e){let t=null==e?null:"string"==typeof e?e:JSON.stringify(e);null===t?this.removeAttribute("markdown-style"):this.setAttribute("markdown-style",t)}get markdownStyle(){return this.#lN()}set markdownStyle(e){this.#lH(e)}get[aq](){return this.#lN()}set[aY](e){this.#lH(e)}getImages(){var e;let t=null==(e=this.shadowRoot)?void 0:e.querySelector("#markdown-root");return t?Array.from(t.querySelectorAll("img")).map(e=>e.getAttribute("src")||"").filter(e=>!!e):[]}getContent(e){let t=this.getAttribute("content")??"",n=Math.max(0,(null==e?void 0:e.start)??0),l=(null==e?void 0:e.end)??t.length-1,i=Math.min(t.length,l+1);return{content:i>=n?t.slice(n,i):""}}pauseAnimation(){this.setAttribute("animation-paused","true")}resumeAnimation(e){(null==e?void 0:e.animationStep)!==void 0&&this.setAttribute("initial-animation-step",String(e.animationStep)),"typewriter"!==this.getAttribute("animation-type")&&this.setAttribute("animation-type","typewriter");let t=this.getAttribute("animation-velocity");(!t||0>=Number(t))&&this.setAttribute("animation-velocity","40"),this.removeAttribute("animation-paused")}getSelectedText(){var e;let t=null==(e=this.shadowRoot)?void 0:e.querySelector("#markdown-root");if(!t)return"";let n=oN(this,t);return(null==n?void 0:n.range.toString())??""}getTextBoundingRect(e){var t,n,l;let i=null==(t=this.shadowRoot)?void 0:t.querySelector("#markdown-root");if(!i)return null;let a=this.ownerDocument;if((null==e?void 0:e.start)!==void 0||(null==e?void 0:e.end)!==void 0){let t,s=Math.max(0,(null==e?void 0:e.start)??0),o=Math.max(s,(null==e?void 0:e.end)??s),r=(null==e?void 0:e.indexType)==="source"?(n=this.getAttribute("content")??"",l=i.textContent??"",{start:t=oR(n,l,s),end:Math.max(t,oR(n,l,o))}):{start:s,end:o};if(!r)return null;let d=((e,t)=>{let n=a.createTreeWalker(i,NodeFilter.SHOW_TEXT),l=0,s=null,o=0,r=null,d=0,h=n.nextNode();for(;h;){var c;let i=(null==(c=h.nodeValue)?void 0:c.length)??0;if(!s&&l+i>=e&&(s=h,o=e-l),l+i>=t){r=h,d=t-l;break}l+=i,h=n.nextNode()}if(!s)return null;r||(r=s,d=o);let u=a.createRange();return u.setStart(s,Math.max(0,Math.min(o,s.length))),u.setEnd(r,Math.max(0,Math.min(d,r.length))),u})(r.start,r.end);return d?{boundingRect:d.getBoundingClientRect()}:null}let s=oN(this,i);return s?{boundingRect:s.range.getBoundingClientRect()}:null}setTextSelection(e){let t=this.ownerDocument,n=(e,n)=>{if(t.caretRangeFromPoint)return t.caretRangeFromPoint(e,n);if(t.caretPositionFromPoint){let l=t.caretPositionFromPoint(e,n);if(!l)return null;let i=this.ownerDocument.createRange();return i.setStart(l.offsetNode,l.offset),i.collapse(!0),i}return null},l=n(e.startX,e.startY),i=n(e.endX,e.endY);if(l&&i){let e=oz(this)[0]??null;if(!e)return;e.removeAllRanges();let t=this.ownerDocument.createRange();t.setStart(l.startContainer,l.startOffset),t.setEnd(i.startContainer,i.startOffset),e.addRange(t)}}getParseResult(e){var t;let n=null==(t=this.shadowRoot)?void 0:t.querySelector("#markdown-root");if(!n)return{};let l=n.textContent||"",i={},a=this.ownerDocument,s=e=>{let t=a.createTreeWalker(n,NodeFilter.SHOW_TEXT),i=0,s=-1,o=-1,r=t.nextNode();for(;r;){let n=(r.nodeValue||"").length;(r===e||e.contains(r))&&(s<0&&(s=i),o=i+n),i+=n,r=t.nextNode()}return{start:Math.max(0,Math.min(s,l.length)),end:Math.max(0,Math.min(o,l.length))}};for(let t of e.tags){let e=Array.from(n.querySelectorAll(t));i[t]=e.map(e=>s(e))}return i}static #C=(0,a9.zF)(aK,a0)}}}]);
|