@lynx-js/web-explorer-canary 0.0.7-canary-20250428-5ff7cd8c → 0.0.7-canary-20250428-8f993bbf
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/static/css/index.css +1 -1
- package/dist/static/js/async/45.js +3 -0
- package/dist/static/js/async/579.js +1 -0
- package/dist/static/js/async/605.js +1 -1
- package/dist/static/js/index.js +19 -19
- package/dist/stats.json +28982 -29108
- package/package.json +7 -4
- package/dist/static/js/async/346.js +0 -1
- package/dist/static/js/async/61.js +0 -3
package/dist/static/js/index.js
CHANGED
|
@@ -1,18 +1,9 @@
|
|
|
1
|
-
(()=>{"use strict";var e={753:function(){},851:function(){},21:function(e,t,a){a.d(t,{Z:()=>n});class i{constructor(e,t,a,n,l){this._legacyCanvasSize=i.DEFAULT_CANVAS_SIZE,this._preferredCamera="environment",this._maxScansPerSecond=25,this._lastScanTimestamp=-1,this._destroyed=this._flashOn=this._paused=this._active=!1,this.$video=e,this.$canvas=document.createElement("canvas"),a&&"object"==typeof a?this._onDecode=t:(a||n||l?console.warn("You're using a deprecated version of the QrScanner constructor which will be removed in the future"):console.warn("Note that the type of the scan result passed to onDecode will change in the future. To already switch to the new api today, you can pass returnDetailedScanResult: true."),this._legacyOnDecode=t),t="object"==typeof a?a:{},this._onDecodeError=t.onDecodeError||("function"==typeof a?a:this._onDecodeError),this._calculateScanRegion=t.calculateScanRegion||("function"==typeof n?n:this._calculateScanRegion),this._preferredCamera=t.preferredCamera||l||this._preferredCamera,this._legacyCanvasSize="number"==typeof a?a:"number"==typeof n?n:this._legacyCanvasSize,this._maxScansPerSecond=t.maxScansPerSecond||this._maxScansPerSecond,this._onPlay=this._onPlay.bind(this),this._onLoadedMetaData=this._onLoadedMetaData.bind(this),this._onVisibilityChange=this._onVisibilityChange.bind(this),this._updateOverlay=this._updateOverlay.bind(this),e.disablePictureInPicture=!0,e.playsInline=!0,e.muted=!0;let r=!1;if(e.hidden&&(e.hidden=!1,r=!0),document.body.contains(e)||(document.body.appendChild(e),r=!0),a=e.parentElement,t.highlightScanRegion||t.highlightCodeOutline){if(n=!!t.overlay,this.$overlay=t.overlay||document.createElement("div"),(l=this.$overlay.style).position="absolute",l.display="none",l.pointerEvents="none",this.$overlay.classList.add("scan-region-highlight"),!n&&t.highlightScanRegion){this.$overlay.innerHTML='<svg class="scan-region-highlight-svg" viewBox="0 0 238 238" preserveAspectRatio="none" style="position:absolute;width:100%;height:100%;left:0;top:0;fill:none;stroke:#e9b213;stroke-width:4;stroke-linecap:round;stroke-linejoin:round"><path d="M31 2H10a8 8 0 0 0-8 8v21M207 2h21a8 8 0 0 1 8 8v21m0 176v21a8 8 0 0 1-8 8h-21m-176 0H10a8 8 0 0 1-8-8v-21"/></svg>';try{this.$overlay.firstElementChild.animate({transform:["scale(.98)","scale(1.01)"]},{duration:400,iterations:1/0,direction:"alternate",easing:"ease-in-out"})}catch(e){}a.insertBefore(this.$overlay,this.$video.nextSibling)}t.highlightCodeOutline&&(this.$overlay.insertAdjacentHTML("beforeend",'<svg class="code-outline-highlight" preserveAspectRatio="none" style="display:none;width:100%;height:100%;fill:none;stroke:#e9b213;stroke-width:5;stroke-dasharray:25;stroke-linecap:round;stroke-linejoin:round"><polygon/></svg>'),this.$codeOutlineHighlight=this.$overlay.lastElementChild)}this._scanRegion=this._calculateScanRegion(e),requestAnimationFrame(()=>{let t=window.getComputedStyle(e);"none"===t.display&&(e.style.setProperty("display","block","important"),r=!0),"visible"!==t.visibility&&(e.style.setProperty("visibility","visible","important"),r=!0),r&&(console.warn("QrScanner has overwritten the video hiding style to avoid Safari stopping the playback."),e.style.opacity="0",e.style.width="0",e.style.height="0",this.$overlay&&this.$overlay.parentElement&&this.$overlay.parentElement.removeChild(this.$overlay),delete this.$overlay,delete this.$codeOutlineHighlight),this.$overlay&&this._updateOverlay()}),e.addEventListener("play",this._onPlay),e.addEventListener("loadedmetadata",this._onLoadedMetaData),document.addEventListener("visibilitychange",this._onVisibilityChange),window.addEventListener("resize",this._updateOverlay),this._qrEnginePromise=i.createQrEngine()}static set WORKER_PATH(e){console.warn("Setting QrScanner.WORKER_PATH is not required and not supported anymore. Have a look at the README for new setup instructions.")}static async hasCamera(){try{return!!(await i.listCameras(!1)).length}catch(e){return!1}}static async listCameras(e=!1){if(!navigator.mediaDevices)return[];let t=async()=>(await navigator.mediaDevices.enumerateDevices()).filter(e=>"videoinput"===e.kind),a;try{e&&(await t()).every(e=>!e.label)&&(a=await navigator.mediaDevices.getUserMedia({audio:!1,video:!0}))}catch(e){}try{return(await t()).map((e,t)=>({id:e.deviceId,label:e.label||(0===t?"Default Camera":`Camera ${t+1}`)}))}finally{a&&(console.warn("Call listCameras after successfully starting a QR scanner to avoid creating a temporary video stream"),i._stopVideoStream(a))}}async hasFlash(){let e;try{if(this.$video.srcObject){if(!(this.$video.srcObject instanceof MediaStream))return!1;e=this.$video.srcObject}else e=(await this._getCameraStream()).stream;return"torch"in e.getVideoTracks()[0].getSettings()}catch(e){return!1}finally{e&&e!==this.$video.srcObject&&(console.warn("Call hasFlash after successfully starting the scanner to avoid creating a temporary video stream"),i._stopVideoStream(e))}}isFlashOn(){return this._flashOn}async toggleFlash(){this._flashOn?await this.turnFlashOff():await this.turnFlashOn()}async turnFlashOn(){if(!this._flashOn&&!this._destroyed&&(this._flashOn=!0,this._active&&!this._paused))try{if(!await this.hasFlash())throw"No flash available";await this.$video.srcObject.getVideoTracks()[0].applyConstraints({advanced:[{torch:!0}]})}catch(e){throw this._flashOn=!1,e}}async turnFlashOff(){this._flashOn&&(this._flashOn=!1,await this._restartVideoStream())}destroy(){this.$video.removeEventListener("loadedmetadata",this._onLoadedMetaData),this.$video.removeEventListener("play",this._onPlay),document.removeEventListener("visibilitychange",this._onVisibilityChange),window.removeEventListener("resize",this._updateOverlay),this._destroyed=!0,this._flashOn=!1,this.stop(),i._postWorkerMessage(this._qrEnginePromise,"close")}async start(){if(this._destroyed)throw Error("The QR scanner can not be started as it had been destroyed.");if((!this._active||this._paused)&&("https:"!==window.location.protocol&&console.warn("The camera stream is only accessible if the page is transferred via https."),this._active=!0,!document.hidden))if(this._paused=!1,this.$video.srcObject)await this.$video.play();else try{let{stream:e,facingMode:t}=await this._getCameraStream();!this._active||this._paused?i._stopVideoStream(e):(this._setVideoMirror(t),this.$video.srcObject=e,await this.$video.play(),this._flashOn&&(this._flashOn=!1,this.turnFlashOn().catch(()=>{})))}catch(e){if(!this._paused)throw this._active=!1,e}}stop(){this.pause(),this._active=!1}async pause(e=!1){if(this._paused=!0,!this._active)return!0;this.$video.pause(),this.$overlay&&(this.$overlay.style.display="none");let t=()=>{this.$video.srcObject instanceof MediaStream&&(i._stopVideoStream(this.$video.srcObject),this.$video.srcObject=null)};return e?(t(),!0):(await new Promise(e=>setTimeout(e,300)),!!this._paused&&(t(),!0))}async setCamera(e){e!==this._preferredCamera&&(this._preferredCamera=e,await this._restartVideoStream())}static async scanImage(e,t,a,n,l=!1,r=!1){let s,o=!1;t&&("scanRegion"in t||"qrEngine"in t||"canvas"in t||"disallowCanvasResizing"in t||"alsoTryWithoutScanRegion"in t||"returnDetailedScanResult"in t)?(s=t.scanRegion,a=t.qrEngine,n=t.canvas,l=t.disallowCanvasResizing||!1,r=t.alsoTryWithoutScanRegion||!1,o=!0):t||a||n||l||r?console.warn("You're using a deprecated api for scanImage which will be removed in the future."):console.warn("Note that the return type of scanImage will change in the future. To already switch to the new api today, you can pass returnDetailedScanResult: true."),t=!!a;try{let d,h,c;if([a,d]=await Promise.all([a||i.createQrEngine(),i._loadImage(e)]),[n,h]=i._drawToCanvas(d,s,n,l),a instanceof Worker){let e=a;t||i._postWorkerMessageSync(e,"inversionMode","both"),c=await new Promise((t,a)=>{let l,r,o,d=-1;r=n=>{n.data.id===d&&(e.removeEventListener("message",r),e.removeEventListener("error",o),clearTimeout(l),null!==n.data.data?t({data:n.data.data,cornerPoints:i._convertPoints(n.data.cornerPoints,s)}):a(i.NO_QR_CODE_FOUND))},o=t=>{e.removeEventListener("message",r),e.removeEventListener("error",o),clearTimeout(l),a("Scanner error: "+(t?t.message||t:"Unknown Error"))},e.addEventListener("message",r),e.addEventListener("error",o),l=setTimeout(()=>o("timeout"),1e4);let c=h.getImageData(0,0,n.width,n.height);d=i._postWorkerMessageSync(e,"decode",c,[c.data.buffer])})}else c=await Promise.race([new Promise((e,t)=>window.setTimeout(()=>t("Scanner error: timeout"),1e4)),(async()=>{try{var[t]=await a.detect(n);if(!t)throw i.NO_QR_CODE_FOUND;return{data:t.rawValue,cornerPoints:i._convertPoints(t.cornerPoints,s)}}catch(a){if(t=a.message||a,/not implemented|service unavailable/.test(t))return i._disableBarcodeDetector=!0,i.scanImage(e,{scanRegion:s,canvas:n,disallowCanvasResizing:l,alsoTryWithoutScanRegion:r});throw`Scanner error: ${t}`}})()]);return o?c:c.data}catch(d){if(!s||!r)throw d;let t=await i.scanImage(e,{qrEngine:a,canvas:n,disallowCanvasResizing:l});return o?t:t.data}finally{t||i._postWorkerMessage(a,"close")}}setGrayscaleWeights(e,t,a,n=!0){i._postWorkerMessage(this._qrEnginePromise,"grayscaleWeights",{red:e,green:t,blue:a,useIntegerApproximation:n})}setInversionMode(e){i._postWorkerMessage(this._qrEnginePromise,"inversionMode",e)}static async createQrEngine(e){if(e&&console.warn("Specifying a worker path is not required and not supported anymore."),e=()=>a.e("605").then(a.bind(a,769)).then(e=>e.createWorker()),!(!i._disableBarcodeDetector&&"BarcodeDetector"in window&&BarcodeDetector.getSupportedFormats&&(await BarcodeDetector.getSupportedFormats()).includes("qr_code")))return e();let t=navigator.userAgentData;return t&&t.brands.some(({brand:e})=>/Chromium/i.test(e))&&/mac ?OS/i.test(t.platform)&&await t.getHighEntropyValues(["architecture","platformVersion"]).then(({architecture:e,platformVersion:t})=>/arm/i.test(e||"arm")&&13<=parseInt(t||"13")).catch(()=>!0)?e():new BarcodeDetector({formats:["qr_code"]})}_onPlay(){this._scanRegion=this._calculateScanRegion(this.$video),this._updateOverlay(),this.$overlay&&(this.$overlay.style.display=""),this._scanFrame()}_onLoadedMetaData(){this._scanRegion=this._calculateScanRegion(this.$video),this._updateOverlay()}_onVisibilityChange(){document.hidden?this.pause():this._active&&this.start()}_calculateScanRegion(e){let t=Math.round(2/3*Math.min(e.videoWidth,e.videoHeight));return{x:Math.round((e.videoWidth-t)/2),y:Math.round((e.videoHeight-t)/2),width:t,height:t,downScaledWidth:this._legacyCanvasSize,downScaledHeight:this._legacyCanvasSize}}_updateOverlay(){requestAnimationFrame(()=>{if(this.$overlay){var e=this.$video,t=e.videoWidth,a=e.videoHeight,i=e.offsetWidth,n=e.offsetHeight,l=e.offsetLeft,r=e.offsetTop,s=window.getComputedStyle(e),o=s.objectFit,d=t/a,h=i/n;switch(o){case"none":var c=t,u=a;break;case"fill":c=i,u=n;break;default:("cover"===o?d>h:d<h)?c=(u=n)*d:u=(c=i)/d,"scale-down"===o&&(c=Math.min(c,t),u=Math.min(u,a))}var[m,p]=s.objectPosition.split(" ").map((e,t)=>{let a=parseFloat(e);return e.endsWith("%")?(t?n-u:i-c)*a/100:a});s=this._scanRegion.width||t,h=this._scanRegion.height||a,o=this._scanRegion.x||0;var v=this._scanRegion.y||0;(d=this.$overlay.style).width=`${s/t*c}px`,d.height=`${h/a*u}px`,d.top=`${r+p+v/a*u}px`,a=/scaleX\(-1\)/.test(e.style.transform),d.left=`${l+(a?i-m-c:m)+(a?t-o-s:o)/t*c}px`,d.transform=e.style.transform}})}static _convertPoints(e,t){if(!t)return e;let a=t.x||0,i=t.y||0,n=t.width&&t.downScaledWidth?t.width/t.downScaledWidth:1;for(let l of(t=t.height&&t.downScaledHeight?t.height/t.downScaledHeight:1,e))l.x=l.x*n+a,l.y=l.y*t+i;return e}_scanFrame(){!this._active||this.$video.paused||this.$video.ended||("requestVideoFrameCallback"in this.$video?this.$video.requestVideoFrameCallback.bind(this.$video):requestAnimationFrame)(async()=>{if(!(1>=this.$video.readyState)){var e=Date.now()-this._lastScanTimestamp,t=1e3/this._maxScansPerSecond;e<t&&await new Promise(a=>setTimeout(a,t-e)),this._lastScanTimestamp=Date.now();try{var a=await i.scanImage(this.$video,{scanRegion:this._scanRegion,qrEngine:this._qrEnginePromise,canvas:this.$canvas})}catch(e){if(!this._active)return;this._onDecodeError(e)}!i._disableBarcodeDetector||await this._qrEnginePromise instanceof Worker||(this._qrEnginePromise=i.createQrEngine()),a?(this._onDecode?this._onDecode(a):this._legacyOnDecode&&this._legacyOnDecode(a.data),this.$codeOutlineHighlight&&(clearTimeout(this._codeOutlineHighlightRemovalTimeout),this._codeOutlineHighlightRemovalTimeout=void 0,this.$codeOutlineHighlight.setAttribute("viewBox",`${this._scanRegion.x||0} ${this._scanRegion.y||0} ${this._scanRegion.width||this.$video.videoWidth} ${this._scanRegion.height||this.$video.videoHeight}`),this.$codeOutlineHighlight.firstElementChild.setAttribute("points",a.cornerPoints.map(({x:e,y:t})=>`${e},${t}`).join(" ")),this.$codeOutlineHighlight.style.display="")):this.$codeOutlineHighlight&&!this._codeOutlineHighlightRemovalTimeout&&(this._codeOutlineHighlightRemovalTimeout=setTimeout(()=>this.$codeOutlineHighlight.style.display="none",100))}this._scanFrame()})}_onDecodeError(e){e!==i.NO_QR_CODE_FOUND&&console.log(e)}async _getCameraStream(){if(!navigator.mediaDevices)throw"Camera not found.";let e=/^(environment|user)$/.test(this._preferredCamera)?"facingMode":"deviceId",t=[{width:{min:1024}},{width:{min:768}},{}];for(let a of[...t.map(t=>Object.assign({},t,{[e]:{exact:this._preferredCamera}})),...t])try{let e=await navigator.mediaDevices.getUserMedia({video:a,audio:!1}),t=this._getFacingMode(e)||(a.facingMode?this._preferredCamera:"environment"===this._preferredCamera?"user":"environment");return{stream:e,facingMode:t}}catch(e){}throw"Camera not found."}async _restartVideoStream(){let e=this._paused;await this.pause(!0)&&!e&&this._active&&await this.start()}static _stopVideoStream(e){for(let t of e.getTracks())t.stop(),e.removeTrack(t)}_setVideoMirror(e){this.$video.style.transform="scaleX("+("user"===e?-1:1)+")"}_getFacingMode(e){return(e=e.getVideoTracks()[0])?/rear|back|environment/i.test(e.label)?"environment":/front|user|face/i.test(e.label)?"user":null:null}static _drawToCanvas(e,t,a,i=!1){a=a||document.createElement("canvas");let n=t&&t.x?t.x:0,l=t&&t.y?t.y:0,r=t&&t.width?t.width:e.videoWidth||e.width,s=t&&t.height?t.height:e.videoHeight||e.height;return i||(i=t&&t.downScaledWidth?t.downScaledWidth:r,t=t&&t.downScaledHeight?t.downScaledHeight:s,a.width!==i&&(a.width=i),a.height!==t&&(a.height=t)),(t=a.getContext("2d",{alpha:!1})).imageSmoothingEnabled=!1,t.drawImage(e,n,l,r,s,0,0,a.width,a.height),[a,t]}static async _loadImage(e){if(e instanceof Image)return await i._awaitImageLoad(e),e;if(e instanceof HTMLVideoElement||e instanceof HTMLCanvasElement||e instanceof SVGImageElement||"OffscreenCanvas"in window&&e instanceof OffscreenCanvas||"ImageBitmap"in window&&e instanceof ImageBitmap)return e;if(e instanceof File||e instanceof Blob||e instanceof URL||"string"==typeof e){let t=new Image;t.src=e instanceof File||e instanceof Blob?URL.createObjectURL(e):e.toString();try{return await i._awaitImageLoad(t),t}finally{(e instanceof File||e instanceof Blob)&&URL.revokeObjectURL(t.src)}}throw"Unsupported image type."}static async _awaitImageLoad(e){e.complete&&0!==e.naturalWidth||await new Promise((t,a)=>{let i=n=>{e.removeEventListener("load",i),e.removeEventListener("error",i),n instanceof ErrorEvent?a("Image load error"):t()};e.addEventListener("load",i),e.addEventListener("error",i)})}static async _postWorkerMessage(e,t,a,n){return i._postWorkerMessageSync(await e,t,a,n)}static _postWorkerMessageSync(e,t,a,n){if(!(e instanceof Worker))return -1;let l=i._workerMessageId++;return e.postMessage({id:l,type:t,data:a},n),l}}i.DEFAULT_CANVAS_SIZE=400,i.NO_QR_CODE_FOUND="No QR code found",i._disableBarcodeDetector=!1,i._workerMessageId=0;let n=i},67:function(e,t,a){a.a(e,async function(e,t){try{var i=a(227);a(753),a(851),a(80);var n=a(21),l=e([i]);i=(l.then?(await l)():l)[0];let s=document.getElementById("qr-scanner"),o=document.getElementById("lynx-view"),d=document.getElementById("back-button"),h=document.getElementById("nav"),c="preinstalled/homepage.json";d.addEventListener("click",()=>{r(c)});let u=new n.Z(s,e=>{console.log("qr",e),o.style.visibility="visible",u.stop();let t=e.data;r(t)},{highlightScanRegion:!0,highlightCodeOutline:!0}),m={ExplorerModule:URL.createObjectURL(new Blob([`export default function(NativeModules, NativeModulesCall) {
|
|
2
|
-
return {
|
|
3
|
-
openSchema(value) {
|
|
4
|
-
NativeModulesCall('openSchema', value);
|
|
5
|
-
},
|
|
6
|
-
openScan() {
|
|
7
|
-
NativeModulesCall('openScan');
|
|
8
|
-
},
|
|
9
|
-
};
|
|
10
|
-
}`],{type:"text/javascript"}))};function r(e){let t=window.matchMedia("(prefers-color-scheme: dark)").matches?"Dark":"Light";if(o.nativeModulesMap=m,o.onNativeModulesCall=(e,t)=>{"openScan"===e?(o.style.visibility="hidden",u.start()):"openSchema"===e&&r(t)},o.globalProps={theme:t},e===c)h.style.display="none",o.url=e,h.style.setProperty("--bar-color",null);else{let{searchParams:t}=new URL(e);t.has("bar_color")&&h.style.setProperty("--bar-color",`#${t.get("bar_color")}`),t.has("fullscreen")&&"true"===t.get("fullscreen")?h.style.display="none":h.style.display="flex",o.url=e}}r(c),window.addEventListener("message",e=>{if(e.data&&"setLynxViewUrl"===e.data.method&&e.data.url){let t=o.parentElement;o.remove(),(o=document.createElement("lynx-view")).setAttribute("style","flex: 0 1 100vh; height:100vh;width:100vw;"),t.append(o),r(e.data.url)}}),t()}catch(e){t(e)}})},305:function(e,t,a){var i,n,l,r,s,o,d,h;a.d(t,{EN:()=>V,UK:()=>C,uE:()=>m,oc:()=>q,wg:()=>f,sr:()=>L,ZW:()=>z,eA:()=>S,eW:()=>A,wU:()=>O,G4:()=>B,YH:()=>$,fT:()=>i,i$:()=>j,jK:()=>n,bh:()=>N,Hs:()=>x,E3:()=>T,cZ:()=>I,gc:()=>W,Au:()=>_,RN:()=>v,Rz:()=>M,Oh:()=>P,E9:()=>G,EO:()=>K,jF:()=>X,bM:()=>H,nt:()=>k,Tt:()=>D,R1:()=>R,L9:()=>p,V_:()=>U,cx:()=>F,rd:()=>E,Xz:()=>c,$m:()=>b,mH:()=>y,Bq:()=>g,SH:()=>u});let c="lynx-unique-id",u="lynx-css-id",m="lynx-component-id",p="lynx-tag",v="lynx-default-display-linear",g="__lynx_timing_flag",b=["registerDataProcessor","registerWorkletInternal","lynxWorkletImpl","runWorklet"],f={platform:"web",lynxSdkVersion:"3.0"},y={click:"tap",lynxscroll:"scroll",lynxscrollend:"scrollend",overlaytouch:"touch",lynxfocus:"focus",lynxblur:"blur"},E={"X-INPUT":{blur:"lynxblur",focus:"lynxfocus"},"X-TEXTAREA":{blur:"lynxblur",focus:"lynxfocus"}},S={tap:"click",scroll:"lynxscroll",scrollend:"lynxscrollend",touch:"overlaytouch"};function w(e,t,a=!0,i=!1,n){return{name:e,isSync:t,hasReturn:a,hasReturnTransfer:i,bufferSize:n}}let C=w("__postExposure",!1,!1),x=w("publicComponentEvent",!1,!1),T=w("publishEvent",!1,!1),O=w("postOffscreenEventEndpoint",!1,!1),L=w("switchExposureServiceEndpoint",!1,!1),I=w("mainThreadStart",!1,!1),_=w("updateData",!1,!0),k=w("sendGlobalEventEndpoint",!1,!1),A=w("dispose",!1,!0),M=w("start",!1,!0),P=w("reportError",!1,!1),R=w("flushElementTree",!1,!0),D=w("callLepusMethod",!1,!0),N=w("__invokeUIMethod",!1,!0),F=w("__setNativeProps",!1,!0),H=w("nativeModulesCall",!1,!0),j=w("napiModulesCall",!1,!0,!0),$=w("getCustomSections",!1,!0),U=w("markTiming",!1,!1),V=w("postTimingFlags",!1,!1),W=w("__triggerComponentEvent",!1,!1),z=w("__selectComponent",!1,!0),B=w("dispatchLynxViewEvent",!1,!1),q=w("dispatchNapiModule",!1,!1),X=w("dispatchCoreContextOnBackground",!1,!1),K=w("dispatchJSContextOnMainThread",!1,!1);(s=i||(i={}))[s.ID_SELECTOR=0]="ID_SELECTOR",s[s.REF_ID=1]="REF_ID",s[s.UNIQUE_ID=2]="UNIQUE_ID",(o=n||(n={}))[o.SUCCESS=0]="SUCCESS",o[o.UNKNOWN=1]="UNKNOWN",o[o.NODE_NOT_FOUND=2]="NODE_NOT_FOUND",o[o.METHOD_NOT_FOUND=3]="METHOD_NOT_FOUND",o[o.PARAM_INVALID=4]="PARAM_INVALID",o[o.SELECTOR_NOT_SUPPORTED=5]="SELECTOR_NOT_SUPPORTED",o[o.NO_UI_FOR_NODE=6]="NO_UI_FOR_NODE",(d=l||(l={}))[d.UPDATE=0]="UPDATE",d[d.RESET=1]="RESET",(h=r||(r={}))[h.Unknown=0]="Unknown",h[h.UpdateExplictByUser=1]="UpdateExplictByUser",h[h.UpdateByKernelFromCtor=2]="UpdateByKernelFromCtor",h[h.UpdateByKernelFromRender=4]="UpdateByKernelFromRender",h[h.UpdateByKernelFromHydrate=8]="UpdateByKernelFromHydrate",h[h.UpdateByKernelFromGetDerived=16]="UpdateByKernelFromGetDerived",h[h.UpdateByKernelFromConflict=32]="UpdateByKernelFromConflict",h[h.UpdateByKernelFromHMR=64]="UpdateByKernelFromHMR";class G extends EventTarget{_config;constructor(e){super(),this._config=e}postMessage(...e){console.error("[lynx-web] postMessage not implemented, args:",...e)}dispatchEvent(e){let{rpc:t,sendEventEndpoint:a}=this._config;return t.invoke(a,[e]),3}__start(){let{rpc:e,receiveEventEndpoint:t}=this._config;e.registerHandler(t,({type:e,data:t})=>{super.dispatchEvent(new MessageEvent(e,{data:t??{}}))})}}},890:function(e,t,a){a.a(e,async function(e,t){try{var i=a(782);a(305);var n=a(907),l=e([i]);i=(l.then?(await l)():l)[0];class r extends HTMLElement{static lynxViewCount=0;static tag="lynx-view";static observedAttributeAsProperties=["url","global-props","init-data"];static observedAttributes=r.observedAttributeAsProperties.map(e=>e.toLowerCase());#e;#t;get url(){return this.#t}set url(e){this.#t=e,this.#a()}#i={};get globalProps(){return this.#i}set globalProps(e){"string"==typeof e?this.#i=JSON.parse(e):this.#i=e}#n={};get initData(){return this.#n}set initData(e){"string"==typeof e?this.#n=JSON.parse(e):this.#n=e}#l={page:"div"};get overrideLynxTagToHTMLTagMap(){return this.#l}set overrideLynxTagToHTMLTagMap(e){"string"==typeof e?this.#l=JSON.parse(e):this.#l=e}#r=[];#s;get onNativeModulesCall(){return this.#s}set onNativeModulesCall(e){if(this.#s=e,this.#r)for(let t of this.#r)e.apply(void 0,t)}#o={};get nativeModulesMap(){return this.#o}set nativeModulesMap(e){this.#o=e}#d={};get napiModulesMap(){return this.#d}set napiModulesMap(e){this.#d=e}#h;get onNapiModulesCall(){return this.#h}set onNapiModulesCall(e){this.#h=(t,a,i,n)=>e(t,a,i,this,n)}get lynxGroupId(){return this.getAttribute("lynx-group-id")?Number(this.getAttribute("lynx-group-id")):void 0}set lynxGroupId(e){e?this.setAttribute("lynx-group-id",e.toString()):this.removeAttribute("lynx-group-id")}updateData(e,t,a){this.#e?.updateData(e,t,a)}sendGlobalEvent(e,t){this.#e?.sendGlobalEvent(e,t)}reload(){this.#a()}setAttribute(e,t){"false"===t?this.removeAttribute(e):super.setAttribute(e,t)}attributeChangedCallback(e,t,a){if(t!==a)switch(e){case"url":this.#t=a;break;case"global-props":this.#i=JSON.parse(a);break;case"init-data":this.#n=JSON.parse(a)}}get threadStrategy(){return this.getAttribute("thread-strategy")}set threadStrategy(e){e?this.setAttribute("thread-strategy",e):this.removeAttribute("thread-strategy")}disconnectedCallback(){this.#e?.dispose(),this.#e=void 0,this.shadowRoot&&(this.shadowRoot.innerHTML="")}customTemplateLoader;#c=!1;#a(){this.#c||(this.#c=!0,queueMicrotask(()=>{if(this.#c=!1,this.#e&&this.disconnectedCallback(),this.#t){let e={page:"div",view:"x-view",text:"x-text",image:"x-image",list:"x-list",svg:"x-svg",...this.overrideLynxTagToHTMLTagMap};this.shadowRoot||this.attachShadow({mode:"open"});let t=this.lynxGroupId,a=this.threadStrategy??"multi-thread",l=(0,i.G)({threadStrategy:a,tagMap:e,shadowRoot:this.shadowRoot,templateUrl:this.#t,globalProps:this.#i,initData:this.#n,nativeModulesMap:this.#o,napiModulesMap:this.#d,lynxGroupId:t,callbacks:{nativeModulesCall:(...e)=>{if(this.#s)return this.#s(...e);this.#r?this.#r.push(e):this.#r=[e]},napiModulesCall:(...e)=>this.#h?.(...e),onError:()=>{this.dispatchEvent(new CustomEvent("error",{}))},customTemplateLoader:this.customTemplateLoader}});this.#e=l;let r=document.createElement("style");this.shadowRoot.append(r);let s=r.sheet;for(let e of n.k)s.insertRule(e);"false"!==this.getAttribute("inject-head-links")&&document.head.querySelectorAll('link[rel="stylesheet"]').forEach(e=>{let t=e.href;s.insertRule(`@import url("${t}");`)})}}))}connectedCallback(){this.#a()}}customElements.get(r.tag)?console.warn(`[${r.tag}] has already been defined`):customElements.define(r.tag,r),t()}catch(e){t(e)}})},782:function(e,t,a){a.a(e,async function(e,i){try{a.d(t,{G:()=>r});var n=a(940),l=e([n]);n=(l.then?(await l)():l)[0];let s=window.devicePixelRatio,o=window.screen.availWidth*s,d=window.screen.availHeight*s;function r(e){let{shadowRoot:t,callbacks:a,templateUrl:i,globalProps:l,initData:r,nativeModulesMap:s,napiModulesMap:h,tagMap:c,lynxGroupId:u,threadStrategy:m="multi-thread"}=e;return(0,n.H)(i,{tagMap:c,initData:r,globalProps:l,nativeModulesMap:s,napiModulesMap:h,browserConfig:{pixelRatio:window.devicePixelRatio,pixelWidth:o,pixelHeight:d}},t,u,m,a)}i()}catch(e){i(e)}})},907:function(e,t,a){a.d(t,{k:()=>i});let i=[` [lynx-default-display-linear="false"] * {
|
|
1
|
+
(()=>{"use strict";var e={753:function(){},851:function(){},21:function(e,t,a){a.d(t,{Z:()=>n});class i{constructor(e,t,a,n,l){this._legacyCanvasSize=i.DEFAULT_CANVAS_SIZE,this._preferredCamera="environment",this._maxScansPerSecond=25,this._lastScanTimestamp=-1,this._destroyed=this._flashOn=this._paused=this._active=!1,this.$video=e,this.$canvas=document.createElement("canvas"),a&&"object"==typeof a?this._onDecode=t:(a||n||l?console.warn("You're using a deprecated version of the QrScanner constructor which will be removed in the future"):console.warn("Note that the type of the scan result passed to onDecode will change in the future. To already switch to the new api today, you can pass returnDetailedScanResult: true."),this._legacyOnDecode=t),t="object"==typeof a?a:{},this._onDecodeError=t.onDecodeError||("function"==typeof a?a:this._onDecodeError),this._calculateScanRegion=t.calculateScanRegion||("function"==typeof n?n:this._calculateScanRegion),this._preferredCamera=t.preferredCamera||l||this._preferredCamera,this._legacyCanvasSize="number"==typeof a?a:"number"==typeof n?n:this._legacyCanvasSize,this._maxScansPerSecond=t.maxScansPerSecond||this._maxScansPerSecond,this._onPlay=this._onPlay.bind(this),this._onLoadedMetaData=this._onLoadedMetaData.bind(this),this._onVisibilityChange=this._onVisibilityChange.bind(this),this._updateOverlay=this._updateOverlay.bind(this),e.disablePictureInPicture=!0,e.playsInline=!0,e.muted=!0;let r=!1;if(e.hidden&&(e.hidden=!1,r=!0),document.body.contains(e)||(document.body.appendChild(e),r=!0),a=e.parentElement,t.highlightScanRegion||t.highlightCodeOutline){if(n=!!t.overlay,this.$overlay=t.overlay||document.createElement("div"),(l=this.$overlay.style).position="absolute",l.display="none",l.pointerEvents="none",this.$overlay.classList.add("scan-region-highlight"),!n&&t.highlightScanRegion){this.$overlay.innerHTML='<svg class="scan-region-highlight-svg" viewBox="0 0 238 238" preserveAspectRatio="none" style="position:absolute;width:100%;height:100%;left:0;top:0;fill:none;stroke:#e9b213;stroke-width:4;stroke-linecap:round;stroke-linejoin:round"><path d="M31 2H10a8 8 0 0 0-8 8v21M207 2h21a8 8 0 0 1 8 8v21m0 176v21a8 8 0 0 1-8 8h-21m-176 0H10a8 8 0 0 1-8-8v-21"/></svg>';try{this.$overlay.firstElementChild.animate({transform:["scale(.98)","scale(1.01)"]},{duration:400,iterations:1/0,direction:"alternate",easing:"ease-in-out"})}catch(e){}a.insertBefore(this.$overlay,this.$video.nextSibling)}t.highlightCodeOutline&&(this.$overlay.insertAdjacentHTML("beforeend",'<svg class="code-outline-highlight" preserveAspectRatio="none" style="display:none;width:100%;height:100%;fill:none;stroke:#e9b213;stroke-width:5;stroke-dasharray:25;stroke-linecap:round;stroke-linejoin:round"><polygon/></svg>'),this.$codeOutlineHighlight=this.$overlay.lastElementChild)}this._scanRegion=this._calculateScanRegion(e),requestAnimationFrame(()=>{let t=window.getComputedStyle(e);"none"===t.display&&(e.style.setProperty("display","block","important"),r=!0),"visible"!==t.visibility&&(e.style.setProperty("visibility","visible","important"),r=!0),r&&(console.warn("QrScanner has overwritten the video hiding style to avoid Safari stopping the playback."),e.style.opacity="0",e.style.width="0",e.style.height="0",this.$overlay&&this.$overlay.parentElement&&this.$overlay.parentElement.removeChild(this.$overlay),delete this.$overlay,delete this.$codeOutlineHighlight),this.$overlay&&this._updateOverlay()}),e.addEventListener("play",this._onPlay),e.addEventListener("loadedmetadata",this._onLoadedMetaData),document.addEventListener("visibilitychange",this._onVisibilityChange),window.addEventListener("resize",this._updateOverlay),this._qrEnginePromise=i.createQrEngine()}static set WORKER_PATH(e){console.warn("Setting QrScanner.WORKER_PATH is not required and not supported anymore. Have a look at the README for new setup instructions.")}static async hasCamera(){try{return!!(await i.listCameras(!1)).length}catch(e){return!1}}static async listCameras(e=!1){if(!navigator.mediaDevices)return[];let t=async()=>(await navigator.mediaDevices.enumerateDevices()).filter(e=>"videoinput"===e.kind),a;try{e&&(await t()).every(e=>!e.label)&&(a=await navigator.mediaDevices.getUserMedia({audio:!1,video:!0}))}catch(e){}try{return(await t()).map((e,t)=>({id:e.deviceId,label:e.label||(0===t?"Default Camera":`Camera ${t+1}`)}))}finally{a&&(console.warn("Call listCameras after successfully starting a QR scanner to avoid creating a temporary video stream"),i._stopVideoStream(a))}}async hasFlash(){let e;try{if(this.$video.srcObject){if(!(this.$video.srcObject instanceof MediaStream))return!1;e=this.$video.srcObject}else e=(await this._getCameraStream()).stream;return"torch"in e.getVideoTracks()[0].getSettings()}catch(e){return!1}finally{e&&e!==this.$video.srcObject&&(console.warn("Call hasFlash after successfully starting the scanner to avoid creating a temporary video stream"),i._stopVideoStream(e))}}isFlashOn(){return this._flashOn}async toggleFlash(){this._flashOn?await this.turnFlashOff():await this.turnFlashOn()}async turnFlashOn(){if(!this._flashOn&&!this._destroyed&&(this._flashOn=!0,this._active&&!this._paused))try{if(!await this.hasFlash())throw"No flash available";await this.$video.srcObject.getVideoTracks()[0].applyConstraints({advanced:[{torch:!0}]})}catch(e){throw this._flashOn=!1,e}}async turnFlashOff(){this._flashOn&&(this._flashOn=!1,await this._restartVideoStream())}destroy(){this.$video.removeEventListener("loadedmetadata",this._onLoadedMetaData),this.$video.removeEventListener("play",this._onPlay),document.removeEventListener("visibilitychange",this._onVisibilityChange),window.removeEventListener("resize",this._updateOverlay),this._destroyed=!0,this._flashOn=!1,this.stop(),i._postWorkerMessage(this._qrEnginePromise,"close")}async start(){if(this._destroyed)throw Error("The QR scanner can not be started as it had been destroyed.");if((!this._active||this._paused)&&("https:"!==window.location.protocol&&console.warn("The camera stream is only accessible if the page is transferred via https."),this._active=!0,!document.hidden))if(this._paused=!1,this.$video.srcObject)await this.$video.play();else try{let{stream:e,facingMode:t}=await this._getCameraStream();!this._active||this._paused?i._stopVideoStream(e):(this._setVideoMirror(t),this.$video.srcObject=e,await this.$video.play(),this._flashOn&&(this._flashOn=!1,this.turnFlashOn().catch(()=>{})))}catch(e){if(!this._paused)throw this._active=!1,e}}stop(){this.pause(),this._active=!1}async pause(e=!1){if(this._paused=!0,!this._active)return!0;this.$video.pause(),this.$overlay&&(this.$overlay.style.display="none");let t=()=>{this.$video.srcObject instanceof MediaStream&&(i._stopVideoStream(this.$video.srcObject),this.$video.srcObject=null)};return e?(t(),!0):(await new Promise(e=>setTimeout(e,300)),!!this._paused&&(t(),!0))}async setCamera(e){e!==this._preferredCamera&&(this._preferredCamera=e,await this._restartVideoStream())}static async scanImage(e,t,a,n,l=!1,r=!1){let s,o=!1;t&&("scanRegion"in t||"qrEngine"in t||"canvas"in t||"disallowCanvasResizing"in t||"alsoTryWithoutScanRegion"in t||"returnDetailedScanResult"in t)?(s=t.scanRegion,a=t.qrEngine,n=t.canvas,l=t.disallowCanvasResizing||!1,r=t.alsoTryWithoutScanRegion||!1,o=!0):t||a||n||l||r?console.warn("You're using a deprecated api for scanImage which will be removed in the future."):console.warn("Note that the return type of scanImage will change in the future. To already switch to the new api today, you can pass returnDetailedScanResult: true."),t=!!a;try{let d,h,c;if([a,d]=await Promise.all([a||i.createQrEngine(),i._loadImage(e)]),[n,h]=i._drawToCanvas(d,s,n,l),a instanceof Worker){let e=a;t||i._postWorkerMessageSync(e,"inversionMode","both"),c=await new Promise((t,a)=>{let l,r,o,d=-1;r=n=>{n.data.id===d&&(e.removeEventListener("message",r),e.removeEventListener("error",o),clearTimeout(l),null!==n.data.data?t({data:n.data.data,cornerPoints:i._convertPoints(n.data.cornerPoints,s)}):a(i.NO_QR_CODE_FOUND))},o=t=>{e.removeEventListener("message",r),e.removeEventListener("error",o),clearTimeout(l),a("Scanner error: "+(t?t.message||t:"Unknown Error"))},e.addEventListener("message",r),e.addEventListener("error",o),l=setTimeout(()=>o("timeout"),1e4);let c=h.getImageData(0,0,n.width,n.height);d=i._postWorkerMessageSync(e,"decode",c,[c.data.buffer])})}else c=await Promise.race([new Promise((e,t)=>window.setTimeout(()=>t("Scanner error: timeout"),1e4)),(async()=>{try{var[t]=await a.detect(n);if(!t)throw i.NO_QR_CODE_FOUND;return{data:t.rawValue,cornerPoints:i._convertPoints(t.cornerPoints,s)}}catch(a){if(t=a.message||a,/not implemented|service unavailable/.test(t))return i._disableBarcodeDetector=!0,i.scanImage(e,{scanRegion:s,canvas:n,disallowCanvasResizing:l,alsoTryWithoutScanRegion:r});throw`Scanner error: ${t}`}})()]);return o?c:c.data}catch(d){if(!s||!r)throw d;let t=await i.scanImage(e,{qrEngine:a,canvas:n,disallowCanvasResizing:l});return o?t:t.data}finally{t||i._postWorkerMessage(a,"close")}}setGrayscaleWeights(e,t,a,n=!0){i._postWorkerMessage(this._qrEnginePromise,"grayscaleWeights",{red:e,green:t,blue:a,useIntegerApproximation:n})}setInversionMode(e){i._postWorkerMessage(this._qrEnginePromise,"inversionMode",e)}static async createQrEngine(e){if(e&&console.warn("Specifying a worker path is not required and not supported anymore."),e=()=>a.e("605").then(a.bind(a,769)).then(e=>e.createWorker()),!(!i._disableBarcodeDetector&&"BarcodeDetector"in window&&BarcodeDetector.getSupportedFormats&&(await BarcodeDetector.getSupportedFormats()).includes("qr_code")))return e();let t=navigator.userAgentData;return t&&t.brands.some(({brand:e})=>/Chromium/i.test(e))&&/mac ?OS/i.test(t.platform)&&await t.getHighEntropyValues(["architecture","platformVersion"]).then(({architecture:e,platformVersion:t})=>/arm/i.test(e||"arm")&&13<=parseInt(t||"13")).catch(()=>!0)?e():new BarcodeDetector({formats:["qr_code"]})}_onPlay(){this._scanRegion=this._calculateScanRegion(this.$video),this._updateOverlay(),this.$overlay&&(this.$overlay.style.display=""),this._scanFrame()}_onLoadedMetaData(){this._scanRegion=this._calculateScanRegion(this.$video),this._updateOverlay()}_onVisibilityChange(){document.hidden?this.pause():this._active&&this.start()}_calculateScanRegion(e){let t=Math.round(2/3*Math.min(e.videoWidth,e.videoHeight));return{x:Math.round((e.videoWidth-t)/2),y:Math.round((e.videoHeight-t)/2),width:t,height:t,downScaledWidth:this._legacyCanvasSize,downScaledHeight:this._legacyCanvasSize}}_updateOverlay(){requestAnimationFrame(()=>{if(this.$overlay){var e=this.$video,t=e.videoWidth,a=e.videoHeight,i=e.offsetWidth,n=e.offsetHeight,l=e.offsetLeft,r=e.offsetTop,s=window.getComputedStyle(e),o=s.objectFit,d=t/a,h=i/n;switch(o){case"none":var c=t,u=a;break;case"fill":c=i,u=n;break;default:("cover"===o?d>h:d<h)?c=(u=n)*d:u=(c=i)/d,"scale-down"===o&&(c=Math.min(c,t),u=Math.min(u,a))}var[m,p]=s.objectPosition.split(" ").map((e,t)=>{let a=parseFloat(e);return e.endsWith("%")?(t?n-u:i-c)*a/100:a});s=this._scanRegion.width||t,h=this._scanRegion.height||a,o=this._scanRegion.x||0;var v=this._scanRegion.y||0;(d=this.$overlay.style).width=`${s/t*c}px`,d.height=`${h/a*u}px`,d.top=`${r+p+v/a*u}px`,a=/scaleX\(-1\)/.test(e.style.transform),d.left=`${l+(a?i-m-c:m)+(a?t-o-s:o)/t*c}px`,d.transform=e.style.transform}})}static _convertPoints(e,t){if(!t)return e;let a=t.x||0,i=t.y||0,n=t.width&&t.downScaledWidth?t.width/t.downScaledWidth:1;for(let l of(t=t.height&&t.downScaledHeight?t.height/t.downScaledHeight:1,e))l.x=l.x*n+a,l.y=l.y*t+i;return e}_scanFrame(){!this._active||this.$video.paused||this.$video.ended||("requestVideoFrameCallback"in this.$video?this.$video.requestVideoFrameCallback.bind(this.$video):requestAnimationFrame)(async()=>{if(!(1>=this.$video.readyState)){var e=Date.now()-this._lastScanTimestamp,t=1e3/this._maxScansPerSecond;e<t&&await new Promise(a=>setTimeout(a,t-e)),this._lastScanTimestamp=Date.now();try{var a=await i.scanImage(this.$video,{scanRegion:this._scanRegion,qrEngine:this._qrEnginePromise,canvas:this.$canvas})}catch(e){if(!this._active)return;this._onDecodeError(e)}!i._disableBarcodeDetector||await this._qrEnginePromise instanceof Worker||(this._qrEnginePromise=i.createQrEngine()),a?(this._onDecode?this._onDecode(a):this._legacyOnDecode&&this._legacyOnDecode(a.data),this.$codeOutlineHighlight&&(clearTimeout(this._codeOutlineHighlightRemovalTimeout),this._codeOutlineHighlightRemovalTimeout=void 0,this.$codeOutlineHighlight.setAttribute("viewBox",`${this._scanRegion.x||0} ${this._scanRegion.y||0} ${this._scanRegion.width||this.$video.videoWidth} ${this._scanRegion.height||this.$video.videoHeight}`),this.$codeOutlineHighlight.firstElementChild.setAttribute("points",a.cornerPoints.map(({x:e,y:t})=>`${e},${t}`).join(" ")),this.$codeOutlineHighlight.style.display="")):this.$codeOutlineHighlight&&!this._codeOutlineHighlightRemovalTimeout&&(this._codeOutlineHighlightRemovalTimeout=setTimeout(()=>this.$codeOutlineHighlight.style.display="none",100))}this._scanFrame()})}_onDecodeError(e){e!==i.NO_QR_CODE_FOUND&&console.log(e)}async _getCameraStream(){if(!navigator.mediaDevices)throw"Camera not found.";let e=/^(environment|user)$/.test(this._preferredCamera)?"facingMode":"deviceId",t=[{width:{min:1024}},{width:{min:768}},{}];for(let a of[...t.map(t=>Object.assign({},t,{[e]:{exact:this._preferredCamera}})),...t])try{let e=await navigator.mediaDevices.getUserMedia({video:a,audio:!1}),t=this._getFacingMode(e)||(a.facingMode?this._preferredCamera:"environment"===this._preferredCamera?"user":"environment");return{stream:e,facingMode:t}}catch(e){}throw"Camera not found."}async _restartVideoStream(){let e=this._paused;await this.pause(!0)&&!e&&this._active&&await this.start()}static _stopVideoStream(e){for(let t of e.getTracks())t.stop(),e.removeTrack(t)}_setVideoMirror(e){this.$video.style.transform="scaleX("+("user"===e?-1:1)+")"}_getFacingMode(e){return(e=e.getVideoTracks()[0])?/rear|back|environment/i.test(e.label)?"environment":/front|user|face/i.test(e.label)?"user":null:null}static _drawToCanvas(e,t,a,i=!1){a=a||document.createElement("canvas");let n=t&&t.x?t.x:0,l=t&&t.y?t.y:0,r=t&&t.width?t.width:e.videoWidth||e.width,s=t&&t.height?t.height:e.videoHeight||e.height;return i||(i=t&&t.downScaledWidth?t.downScaledWidth:r,t=t&&t.downScaledHeight?t.downScaledHeight:s,a.width!==i&&(a.width=i),a.height!==t&&(a.height=t)),(t=a.getContext("2d",{alpha:!1})).imageSmoothingEnabled=!1,t.drawImage(e,n,l,r,s,0,0,a.width,a.height),[a,t]}static async _loadImage(e){if(e instanceof Image)return await i._awaitImageLoad(e),e;if(e instanceof HTMLVideoElement||e instanceof HTMLCanvasElement||e instanceof SVGImageElement||"OffscreenCanvas"in window&&e instanceof OffscreenCanvas||"ImageBitmap"in window&&e instanceof ImageBitmap)return e;if(e instanceof File||e instanceof Blob||e instanceof URL||"string"==typeof e){let t=new Image;t.src=e instanceof File||e instanceof Blob?URL.createObjectURL(e):e.toString();try{return await i._awaitImageLoad(t),t}finally{(e instanceof File||e instanceof Blob)&&URL.revokeObjectURL(t.src)}}throw"Unsupported image type."}static async _awaitImageLoad(e){e.complete&&0!==e.naturalWidth||await new Promise((t,a)=>{let i=n=>{e.removeEventListener("load",i),e.removeEventListener("error",i),n instanceof ErrorEvent?a("Image load error"):t()};e.addEventListener("load",i),e.addEventListener("error",i)})}static async _postWorkerMessage(e,t,a,n){return i._postWorkerMessageSync(await e,t,a,n)}static _postWorkerMessageSync(e,t,a,n){if(!(e instanceof Worker))return -1;let l=i._workerMessageId++;return e.postMessage({id:l,type:t,data:a},n),l}}i.DEFAULT_CANVAS_SIZE=400,i.NO_QR_CODE_FOUND="No QR code found",i._disableBarcodeDetector=!1,i._workerMessageId=0;let n=i},353:function(e,t,a){var i,n,l,r,s,o,d,h;a.d(t,{EN:()=>V,UK:()=>C,uE:()=>m,oc:()=>q,wg:()=>f,sr:()=>I,ZW:()=>z,eA:()=>S,eW:()=>A,wU:()=>O,G4:()=>B,YH:()=>$,fT:()=>i,i$:()=>j,jK:()=>n,bh:()=>N,Hs:()=>x,E3:()=>T,cZ:()=>L,gc:()=>W,Au:()=>_,RN:()=>v,Rz:()=>M,Oh:()=>P,E9:()=>G,EO:()=>K,jF:()=>X,bM:()=>H,nt:()=>k,Tt:()=>D,R1:()=>R,L9:()=>p,V_:()=>U,cx:()=>F,rd:()=>E,Xz:()=>c,$m:()=>b,mH:()=>y,Bq:()=>g,SH:()=>u});let c="lynx-unique-id",u="lynx-css-id",m="lynx-component-id",p="lynx-tag",v="lynx-default-display-linear",g="__lynx_timing_flag",b=["registerDataProcessor","registerWorkletInternal","lynxWorkletImpl","runWorklet"],f={platform:"web",lynxSdkVersion:"3.0"},y={click:"tap",lynxscroll:"scroll",lynxscrollend:"scrollend",overlaytouch:"touch",lynxfocus:"focus",lynxblur:"blur"},E={"X-INPUT":{blur:"lynxblur",focus:"lynxfocus"},"X-TEXTAREA":{blur:"lynxblur",focus:"lynxfocus"}},S={tap:"click",scroll:"lynxscroll",scrollend:"lynxscrollend",touch:"overlaytouch"};function w(e,t,a=!0,i=!1,n){return{name:e,isSync:t,hasReturn:a,hasReturnTransfer:i,bufferSize:n}}let C=w("__postExposure",!1,!1),x=w("publicComponentEvent",!1,!1),T=w("publishEvent",!1,!1),O=w("postOffscreenEventEndpoint",!1,!1),I=w("switchExposureServiceEndpoint",!1,!1),L=w("mainThreadStart",!1,!1),_=w("updateData",!1,!0),k=w("sendGlobalEventEndpoint",!1,!1),A=w("dispose",!1,!0),M=w("start",!1,!0),P=w("reportError",!1,!1),R=w("flushElementTree",!1,!0),D=w("callLepusMethod",!1,!0),N=w("__invokeUIMethod",!1,!0),F=w("__setNativeProps",!1,!0),H=w("nativeModulesCall",!1,!0),j=w("napiModulesCall",!1,!0,!0),$=w("getCustomSections",!1,!0),U=w("markTiming",!1,!1),V=w("postTimingFlags",!1,!1),W=w("__triggerComponentEvent",!1,!1),z=w("__selectComponent",!1,!0),B=w("dispatchLynxViewEvent",!1,!1),q=w("dispatchNapiModule",!1,!1),X=w("dispatchCoreContextOnBackground",!1,!1),K=w("dispatchJSContextOnMainThread",!1,!1);(s=i||(i={}))[s.ID_SELECTOR=0]="ID_SELECTOR",s[s.REF_ID=1]="REF_ID",s[s.UNIQUE_ID=2]="UNIQUE_ID",(o=n||(n={}))[o.SUCCESS=0]="SUCCESS",o[o.UNKNOWN=1]="UNKNOWN",o[o.NODE_NOT_FOUND=2]="NODE_NOT_FOUND",o[o.METHOD_NOT_FOUND=3]="METHOD_NOT_FOUND",o[o.PARAM_INVALID=4]="PARAM_INVALID",o[o.SELECTOR_NOT_SUPPORTED=5]="SELECTOR_NOT_SUPPORTED",o[o.NO_UI_FOR_NODE=6]="NO_UI_FOR_NODE",(d=l||(l={}))[d.UPDATE=0]="UPDATE",d[d.RESET=1]="RESET",(h=r||(r={}))[h.Unknown=0]="Unknown",h[h.UpdateExplictByUser=1]="UpdateExplictByUser",h[h.UpdateByKernelFromCtor=2]="UpdateByKernelFromCtor",h[h.UpdateByKernelFromRender=4]="UpdateByKernelFromRender",h[h.UpdateByKernelFromHydrate=8]="UpdateByKernelFromHydrate",h[h.UpdateByKernelFromGetDerived=16]="UpdateByKernelFromGetDerived",h[h.UpdateByKernelFromConflict=32]="UpdateByKernelFromConflict",h[h.UpdateByKernelFromHMR=64]="UpdateByKernelFromHMR";class G extends EventTarget{_config;constructor(e){super(),this._config=e}postMessage(...e){console.error("[lynx-web] postMessage not implemented, args:",...e)}dispatchEvent(e){let{rpc:t,sendEventEndpoint:a}=this._config;return t.invoke(a,[e]),3}__start(){let{rpc:e,receiveEventEndpoint:t}=this._config;e.registerHandler(t,({type:e,data:t})=>{super.dispatchEvent(new MessageEvent(e,{data:t??{}}))})}}},582:function(e,t,a){a.a(e,async function(e,t){try{var i=a(609);a(353);var n=a(185),l=e([i]);i=(l.then?(await l)():l)[0];class r extends HTMLElement{static lynxViewCount=0;static tag="lynx-view";static observedAttributeAsProperties=["url","global-props","init-data"];static observedAttributes=r.observedAttributeAsProperties.map(e=>e.toLowerCase());#e;#t;get url(){return this.#t}set url(e){this.#t=e,this.#a()}#i={};get globalProps(){return this.#i}set globalProps(e){"string"==typeof e?this.#i=JSON.parse(e):this.#i=e}#n={};get initData(){return this.#n}set initData(e){"string"==typeof e?this.#n=JSON.parse(e):this.#n=e}#l={page:"div"};get overrideLynxTagToHTMLTagMap(){return this.#l}set overrideLynxTagToHTMLTagMap(e){"string"==typeof e?this.#l=JSON.parse(e):this.#l=e}#r=[];#s;get onNativeModulesCall(){return this.#s}set onNativeModulesCall(e){if(this.#s=e,this.#r)for(let t of this.#r)e.apply(void 0,t)}#o={};get nativeModulesMap(){return this.#o}set nativeModulesMap(e){this.#o=e}#d={};get napiModulesMap(){return this.#d}set napiModulesMap(e){this.#d=e}#h;get onNapiModulesCall(){return this.#h}set onNapiModulesCall(e){this.#h=(t,a,i,n)=>e(t,a,i,this,n)}get lynxGroupId(){return this.getAttribute("lynx-group-id")?Number(this.getAttribute("lynx-group-id")):void 0}set lynxGroupId(e){e?this.setAttribute("lynx-group-id",e.toString()):this.removeAttribute("lynx-group-id")}updateData(e,t,a){this.#e?.updateData(e,t,a)}sendGlobalEvent(e,t){this.#e?.sendGlobalEvent(e,t)}reload(){this.#a()}setAttribute(e,t){"false"===t?this.removeAttribute(e):super.setAttribute(e,t)}attributeChangedCallback(e,t,a){if(t!==a)switch(e){case"url":this.#t=a;break;case"global-props":this.#i=JSON.parse(a);break;case"init-data":this.#n=JSON.parse(a)}}get threadStrategy(){return this.getAttribute("thread-strategy")}set threadStrategy(e){e?this.setAttribute("thread-strategy",e):this.removeAttribute("thread-strategy")}disconnectedCallback(){this.#e?.dispose(),this.#e=void 0,this.shadowRoot&&(this.shadowRoot.innerHTML="")}customTemplateLoader;#c=!1;#a(){this.#c||(this.#c=!0,queueMicrotask(()=>{if(this.#c=!1,this.#e&&this.disconnectedCallback(),this.#t){let e={page:"div",view:"x-view",text:"x-text",image:"x-image",list:"x-list",svg:"x-svg",...this.overrideLynxTagToHTMLTagMap};this.shadowRoot||this.attachShadow({mode:"open"});let t=this.lynxGroupId,a=this.threadStrategy??"multi-thread",l=(0,i.G)({threadStrategy:a,tagMap:e,shadowRoot:this.shadowRoot,templateUrl:this.#t,globalProps:this.#i,initData:this.#n,nativeModulesMap:this.#o,napiModulesMap:this.#d,lynxGroupId:t,callbacks:{nativeModulesCall:(...e)=>{if(this.#s)return this.#s(...e);this.#r?this.#r.push(e):this.#r=[e]},napiModulesCall:(...e)=>this.#h?.(...e),onError:()=>{this.dispatchEvent(new CustomEvent("error",{}))},customTemplateLoader:this.customTemplateLoader}});this.#e=l;let r=document.createElement("style");this.shadowRoot.append(r);let s=r.sheet;for(let e of n.k)s.insertRule(e);"false"!==this.getAttribute("inject-head-links")&&document.head.querySelectorAll('link[rel="stylesheet"]').forEach(e=>{let t=e.href;s.insertRule(`@import url("${t}");`)})}}))}connectedCallback(){this.#a()}}customElements.get(r.tag)?console.warn(`[${r.tag}] has already been defined`):customElements.define(r.tag,r),t()}catch(e){t(e)}})},609:function(e,t,a){a.a(e,async function(e,i){try{a.d(t,{G:()=>r});var n=a(41),l=e([n]);n=(l.then?(await l)():l)[0];let s=window.devicePixelRatio,o=window.screen.availWidth*s,d=window.screen.availHeight*s;function r(e){let{shadowRoot:t,callbacks:a,templateUrl:i,globalProps:l,initData:r,nativeModulesMap:s,napiModulesMap:h,tagMap:c,lynxGroupId:u,threadStrategy:m="multi-thread"}=e;return(0,n.H)(i,{tagMap:c,initData:r,globalProps:l,nativeModulesMap:s,napiModulesMap:h,browserConfig:{pixelRatio:window.devicePixelRatio,pixelWidth:o,pixelHeight:d}},t,u,m,a)}i()}catch(e){i(e)}})},185:function(e,t,a){a.d(t,{k:()=>i});let i=[` [lynx-default-display-linear="false"] * {
|
|
11
2
|
--lynx-display: flex;
|
|
12
3
|
--lynx-display-toggle: var(--lynx-display-flex);
|
|
13
4
|
}`,`[lynx-default-overflow-visible="true"] x-view{
|
|
14
5
|
overflow: visible;
|
|
15
|
-
}`]},227:function(e,t,a){a.a(e,async function(e,t){try{var i=a(782),n=a(890),l=e([i,n]);[i,n]=l.then?(await l)():l,t()}catch(e){t(e)}})},128:function(e,t,a){a.d(t,{c:()=>s});class i{port;name;incId=0;#u={};#m=new TextEncoder;#p=new TextDecoder;#v=new Map;constructor(e,t){this.port=e,this.name=t,e.onmessage=e=>this.#g(e.data)}get nextRetId(){return`ret_${this.name}_${this.incId++}`}static createRetEndpoint(e){return{name:e,hasReturn:!1,isSync:!1}}#g=async e=>{let t=this.#v.get(e.name);if(t){let a=e.sync?new Int32Array(e.lock):void 0,n=!e.sync&&e.retId?i.createRetEndpoint(e.retId):void 0;try{let i=await t(...e.data),l,r=[];if(e.sync?l=i:e.hasTransfer?{data:l,transfer:r}=i||{}:l=i,e.sync){if(e.buf){let t=JSON.stringify(l),a=new Uint32Array(e.buf,0,1),i=new Uint8Array(e.buf,4),n=new Uint8Array(e.buf.byteLength-4),{written:r}=this.#m.encodeInto(t,n);a[0]=r,i.set(n,0)}Atomics.store(a,0,1),Atomics.notify(a,0)}else e.retId&&this.invoke(n,[l,!1],r||[])}catch(t){console.error(t),e.sync?(Atomics.store(a,0,2),Atomics.notify(a,0),a[1]=2):this.invoke(n,[void 0,!0])}}else{let t=this.#u[e.name];t?t.push(e):this.#u[e.name]=[e]}};createCall(e){return(...t)=>this.invoke(e,t)}registerHandler(e,t){this.#v.set(e.name,t);let a=this.#u[e.name];if(a?.length)for(let t of(this.#u[e.name]=void 0,a))this.#g(t)}registerHandlerRef(e,t,a){this.registerHandler(e,(...e)=>t[a]?.call(t,...e))}registerHandlerLazy(e,t,a){if(t[a])this.registerHandlerRef(e,t,a);else{let i,n=this;Object.defineProperty(t,a,{get:()=>i,set(l){i=l,l&&n.registerHandlerRef(e,t,a)}})}}removeHandler(e){this.#v.delete(e.name)}invoke(e,t,a=[]){if(e.isSync){let i=e.bufferSize?new SharedArrayBuffer(e.bufferSize+4):void 0,n=new SharedArrayBuffer(4),l=new Int32Array(n);l[0]=0;let r={name:e.name,data:t,sync:!0,lock:n,buf:i};if(this.port.postMessage(r,{transfer:a}),Atomics.wait(l,0,0),2===l[0])throw null;if(!i)return;{let e=new Uint32Array(i,0,4)[0],t=new Uint8Array(i,4,e),a=new Uint8Array(e);return a.set(t,0),a?JSON.parse(this.#p.decode(a)):void 0}}if(e.hasReturn){let{promise:n,resolve:l,reject:r}=Promise.withResolvers(),s=i.createRetEndpoint(this.nextRetId);this.registerHandler(s,(e,t)=>{t&&r(),l(e)});let o={name:e.name,data:t,sync:!1,retId:s?.name,hasTransfer:e.hasReturnTransfer};return this.port.postMessage(o,{transfer:a}),n}{let i={name:e.name,data:t,sync:!1};this.port.postMessage(i,{transfer:a})}}createCallbackify(e,t){let a=this.createCall(e);return(...e)=>{let i=e.at(t);e.splice(t,1),a(...e).then(i)}}}let n=[],l=[],r=o();function s(e,t){let a;t?a=function(){let e=new MessageChannel;return{mainThreadRpc:new i(e.port1,"main-to-bg"),channelMainThreadWithBackground:e}}():(a=r,r=o());let s=function(e,t){let a,n=new MessageChannel;e?(a=l[e]??d("lynx-bg"),l[e]=a):a=d("lynx-bg");let r={mode:"background",toUIThread:n.port2,toPeerThread:t.port2};return a.postMessage(r,[n.port2,t.port2]),{backgroundRpc:new i(n.port1,"ui-to-bg"),backgroundThreadWorker:a}}(e,a.channelMainThreadWithBackground);return void 0!==e&&(n[e]?n[e]++:n[e]=1),{mainThreadRpc:a.mainThreadRpc,backgroundRpc:s.backgroundRpc,terminateWorkers:()=>{a.mainThreadWorker?.terminate(),void 0===e?s.backgroundThreadWorker.terminate():1===n[e]&&(s.backgroundThreadWorker.terminate(),n[e]=0,l[e]=void 0)}}}function o(){let e=new MessageChannel,t=new MessageChannel,a=d("lynx-main"),n={mode:"main",toUIThread:e.port2,toPeerThread:t.port1};return a.postMessage(n,[e.port2,t.port1]),{mainThreadRpc:new i(e.port1,"ui-to-main"),mainThreadWorker:a,channelMainThreadWithBackground:t}}function d(e){return new Worker(new URL(a.p+a.u("61"),a.b),Object.assign({},{type:"module",name:e},{type:void 0}))}},620:function(e,t,a){a.a(e,async function(e,i){try{a.d(t,{q:()=>n});let{loadMainThread:e}=await a.e("346").then(a.bind(a,381));function n(t,a,i,n){let l;globalThis.module||Object.assign(globalThis,{module:{}});let r=Object.assign(a,{createElement:document.createElement.bind(document)}),{startMainThread:s}=e(t,r,()=>{},i,()=>{n.onError?.()}),o=async e=>{let t=s(e);l=await t},d=async(...e)=>{l.updatePage?.(...e)};return{start:o,updateDataMainThread:d}}i()}catch(e){i(e)}},1)},175:function(e,t,a){a.d(t,{g:()=>o});var i=a(305);let n={CreateElement:1,SetAttribute:2,RemoveAttribute:3,Append:4,Remove:5,ReplaceWith:6,InsertBefore:7,EnableEvent:8,RemoveChild:9,StyleDeclarationSetProperty:10,StyleDeclarationRemoveProperty:11,SetInnerHTML:12};function l(){}let r=["detail","keyCode","charCode","elapsedTime","propertyName","pseudoElement","animationName","touches","targetTouches","changedTouches"],s=new Set(["isTrusted","target","currentTarget","type","bubbles","window","self","view","srcElement","eventPhase"]);function o(e,t,a){var o;o=a.onError,e.registerHandler(i.Oh,e=>{o?.(e)});let{shadowRoot:d}={shadowRoot:t},{decodeOperation:h}=function(e){let{shadowRoot:t,onEvent:a}=e,i=new Set,o=[new WeakRef(t)],d=new WeakMap;function h(e){let t=o[e]?.deref();if(t)return t;throw Error(`[lynx-web] cannot find element with uniqueId: ${e}`)}function c(e){if(e.eventPhase!==Event.CAPTURING_PHASE&&e.currentTarget!==t)return;let i=e.target;if(i&&d.has(i)){let t=d.get(i),n=e.type,l={};for(let t of r)t in e&&(l[t]=function e(t){if("string"==typeof t||"number"==typeof t||"boolean"==typeof t||null==t)return t;if(t[Symbol.iterator])return[...t].map(e);if("object"==typeof t&&!(t instanceof EventTarget)){let a={};for(let i in t)s.has(i)||(a[i]=e(t[i]));return a}}(e[t]));a(n,t,e.bubbles,l)}}return{decodeOperation:function(e){for(let a of e)if(a.type===n.CreateElement){let e=document.createElement(a.tag);o[a.uid]=new WeakRef(e),d.set(e,a.uid)}else{let e=h(a.uid);switch(a.type){case n.SetAttribute:e.setAttribute(a.key,a.value);break;case n.RemoveAttribute:e.removeAttribute(a.key);break;case n.Append:{let t=a.cid.map(e=>h(e));e.append(...t)}break;case n.Remove:e.remove();break;case n.ReplaceWith:let r=a.nid.map(e=>h(e));e.replaceWith(...r);break;case n.InsertBefore:{let t=h(a.cid),i=a.ref?h(a.ref):null;e.insertBefore(t,i)}break;case n.EnableEvent:e.addEventListener(a.eventType,l,{passive:!0}),i.has(a.eventType)||(t.addEventListener(a.eventType,c,{passive:!0,capture:!0}),i.add(a.eventType));break;case n.RemoveChild:{let t=h(a.cid);e.removeChild(t)}break;case n.StyleDeclarationSetProperty:e.style.setProperty(a.property,a.value,a.priority);break;case n.StyleDeclarationRemoveProperty:e.style.removeProperty(a.property);break;case n.SetInnerHTML:e.innerHTML=a.text}}}}}({shadowRoot:d,onEvent:e.createCall(i.wU)});return e.registerHandler(i.R1,e=>{h(e)}),{start:e.createCall(i.cZ),updateDataMainThread:e.createCall(i.Au)}}},267:function(e,t,a){a.d(t,{m:()=>n});var i=a(305);function n(e,t){return async()=>{await e.invoke(i.eW,[]),t()}}},937:function(e,t,a){function i(e,t){return(a,i,n)=>{Promise.all([e(a,{}),t(a,{})]).then(()=>n?.())}}a.d(t,{h:()=>i}),a(305)},490:function(e,t,a){a.d(t,{o:()=>r});var i=a(305);function n(e,t,a,n,l,r,s,o){let d,h=e;if(r){let t=e.querySelector(`[${i.Xz}="${r}"]`);if(t)h=t;else{console.error(`[lynx-web] cannot find dom for root_unique_id: ${r}`),o?.(i.jK.NODE_NOT_FOUND);return}}else if(n){let t=e.querySelector(`[${i.uE}="${n}"]`);if(t)h=t;else{console.error(`[lynx-web] cannot find dom for component_id: ${n}`),o?.(i.jK.NODE_NOT_FOUND);return}}if(t===i.fT.ID_SELECTOR)d=a;else if(t===i.fT.UNIQUE_ID)d=`[${i.Xz}="${a}"]`;else{console.error(`[lynx-web] NYI: setnativeprops type ${t}`),o?.(i.jK.UNKNOWN);return}if(l){let e=null;try{e=h.querySelector(d)}catch(e){console.error(`[lynx-web] cannot use selector: ${d}`),o?.(i.jK.SELECTOR_NOT_SUPPORTED);return}e?s(e):(console.error(`[lynx-web] cannot find from for selector ${a} under`,h),o?.(i.jK.NODE_NOT_FOUND))}else h.querySelectorAll(d).forEach(e=>{s(e)})}let l={boundingClientRect:e=>{let t=e.getBoundingClientRect();return{id:e.id,width:t.width,height:t.height,left:t.left,right:t.right,top:t.top,bottom:t.bottom}}};function r(e,t,a){let r,s,o;r=i.jK.UNKNOWN,e.registerHandler(i.bh,(e,a,o,d,h,c)=>(n(t,e,a,o,!0,c,e=>{try{let t=l[d],a="function"==typeof e[d];t||a?(s=t?t(e,h):e[d](h),r=i.jK.SUCCESS):r=i.jK.METHOD_NOT_FOUND}catch(t){console.error("[lynx-web] invokeUIMethod: apply method faild with",t,e),r=i.jK.PARAM_INVALID}},e=>{r=e}),{code:r,data:s})),e.registerHandler(i.cx,(e,a,i,l,r,s)=>{n(t,e,a,i,l,s,e=>{var t=e;for(let e in r){let a=r[e];"text"===e&&t?.tagName==="X-TEXT"&&t.firstElementChild&&"RAW-TEXT"==t.firstElementChild.tagName&&(t=t.firstElementChild),CSS.supports(e,a)&&t.style?t.style.setProperty(e,a):t.setAttribute(e,a)}})}),e.registerHandler(i.gc,(e,a)=>{let n=t.querySelector(`[${i.uE}="${a.componentId}"]`);n?.dispatchEvent(new CustomEvent(e,{...a.eventOption,detail:a.eventDetail}))}),e.registerHandler(i.ZW,(e,a,l)=>(n(t,i.fT.ID_SELECTOR,a,"card"===e?"0":e,l,void 0,e=>{o=e}),[o?.getAttribute(i.uE)??void 0])),d=a.nativeModulesCall,e.registerHandler(i.bM,d);var d,h=a.napiModulesCall;let c=e.createCall(i.oc);e.registerHandler(i.i$,(e,t,a)=>h(e,t,a,c)),e.registerHandler(i.G4,(e,a)=>{t.dispatchEvent(new CustomEvent(e,{detail:a,bubbles:!0,cancelable:!0,composed:!0}))});let u=e.createCall(i.nt);return{sendGlobalEvent:u,markTiming:e.createCall(i.V_),updateDataBackground:e.createCall(i.Au)}}},940:function(e,t,a){a.a(e,async function(e,i){try{a.d(t,{H:()=>u});var n=a(128),l=a(267);a(305);var r=a(321),s=a(937),o=a(490),d=a(175),h=a(620),c=e([h]);function u(e,t,a,i,c,u){let m=performance.now()+performance.timeOrigin,p="all-on-ui"===c,{mainThreadRpc:v,backgroundRpc:g,terminateWorkers:b}=(0,n.c)(i,p),{markTiming:f,sendGlobalEvent:y,updateDataBackground:E}=(0,o.o)(g,a,u),S=(e,t,a)=>{a||(a=performance.now()+performance.timeOrigin),f(e,t,a)},{start:w,updateDataMainThread:C}=p?(0,h.q)(v,a,S,u):(0,d.g)(v,a,u);return S("create_lynx_start",void 0,m),S("load_template_start"),(0,r.$)(e,u.customTemplateLoader).then(e=>{S("load_template_end"),w({...t,template:e})}),{updateData:(0,s.h)(C,E),dispose:(0,l.m)(g,b),sendGlobalEvent:y}}h=(c.then?(await c)():c)[0],i()}catch(e){i(e)}})},321:function(e,t,a){a.d(t,{$:()=>d});var i=a(305);let n={};function l(e,t,a,i){return t=t.concat(i),Object.fromEntries(Object.entries(e).map(([e,n])=>{var l;return[e,(l=["globalThis.module.exports = function(lynx_runtime) {","const module= {exports:{}};let exports = module.exports;","var {",t.join(","),"} = lynx_runtime;",...a.map(e=>`const ${e} = lynx_runtime.${e}?.bind(lynx_runtime);`),";var globDynamicComponentEntry = '__Card__';","var {__globalProps} = lynx;","lynx_runtime._updateVars=()=>{",...i.map(e=>`${e} = lynx_runtime.__lynxGlobalBindingValues.${e};`),"};\n",n,"\n return module.exports;}"].join(""),URL.createObjectURL(new Blob([l],{type:"text/javascript"})))]}))}let r=["lynx","globalThis","_ReportError","__AddConfig","__AddDataset","__GetAttributes","__GetComponentID","__GetDataByKey","__GetDataset","__GetElementConfig","__GetElementUniqueID","__GetID","__GetTag","__SetAttribute","__SetConfig","__SetDataset","__SetID","__UpdateComponentID","__GetConfig","__UpdateListCallbacks","__AppendElement","__ElementIsEqual","__FirstElement","__GetChildren","__GetParent","__InsertElementBefore","__LastElement","__NextElement","__RemoveElement","__ReplaceElement","__ReplaceElements","__SwapElement","__CreateComponent","__CreateElement","__CreatePage","__CreateView","__CreateText","__CreateRawText","__CreateImage","__CreateScrollView","__CreateWrapperElement","__CreateList","__AddEvent","__GetEvent","__GetEvents","__SetEvents","__AddClass","__SetClasses","__GetClasses","__AddInlineStyle","__SetInlineStyles","__SetCSSId","__OnLifecycleEvent","__FlushElementTree","__LoadLepusChunk","SystemInfo"],s=["NativeModules","globalThis","lynx","lynxCoreInject","SystemInfo"],o=["Card","Component"];async function d(e,t){let a=n[e];if(a)return a;let d=t?await t(e):await (await fetch(e,{method:"GET"})).json(),h={...d,lepusCode:l(d.lepusCode,r,[],i.$m),manifest:l(d.manifest,s,o,[])};return n[e]=h,h}},80:function(){var e,t,a,i,n,l,r,s,o,d,h,c,u,m,p,v,g,b,f,y,E,S,w,C,x,T,O,L,I,_,k,A,M;let P,R,D,N,F,H,j,$,U,V,W,z,B,q,X,K,G,Y,Q,J,Z,ee,et,ea,ei,en,el,er,es,eo,ed,eh,ec,eu,em,ep,ev,eg,eb,ef,ey,eE,eS,ew,eC,ex,eT,eO,eL,eI,e_,ek,eA,eM,eP,eR,eD,eN,eF,eH,ej,e$,eU,eV,eW,ez,eB,eq,eX,eK,eG,eY,eQ,eJ,eZ,e0,e1,e2,e3,e8,e4,e5,e7,e6,e9,te,tt,ta,ti,tn,tl,tr,ts,to,td,th,tc,tu,tm,tp,tv,tg,tb,tf,ty,tE,tS,tw,tC,tx,tT,tO,tL,tI,t_,tk,tA,tM,tP,tR,tD,tN,tF,tH,tj,t$,tU,tV,tW,tz,tB,tq,tX,tK,tG,tY,tQ,tJ,tZ,t0,t1,t2,t3,t8,t4,t5,t7,t6,t9,ae,at,aa,ai,an,al,ar,as,ao,ad,ah,ac,au,am,ap,av,ag,ab,af,ay,aE,aS,aw,aC,ax,aT,aO,aL,aI,a_,ak,aA,aM,aP,aR,aD,aN,aF,aH,aj,a$,aU,aV,aW,az,aB,aq,aX,aK,aG,aY,aQ,aJ,aZ,a0,a1,a2,a3,a8,a4,a5,a7,a6,a9,ie,it,ia,ii,il,ir,is,io,id,ih,ic,iu,im,ip,iv,ig,ib,iy,iE,iS,iw,iC,ix,iT,iO,iL,iI,i_,ik,iA,iM,iP,iR,iD,iN,iF,iH,ij,i$,iU,iV,iW,iz,iB,iq,iX,iK,iG,iY,iQ,iJ,iZ,i0,i1,i2,i3,i8,i4,i5,i7,i6,i9,ne,nt,na,ni,nn,nl,nr,ns,no,nd,nh,nc,nu,nm,np,nv,ng,nb,nf,ny,nE,nS,nw,nC,nx,nT,nO,nL,nI,n_,nk,nA,nM,nP,nR,nD,nN,nF,nH,nj,n$,nU,nV,nW,nz,nB,nq,nX,nK,nG,nY,nQ,nJ,nZ,n0,n1,n2,n3,n8,n4,n5,n7,n6,n9,le,lt,la,li,ln,ll,lr,ls,lo,ld,lh,lc,lu,lm,lp,lv,lg,lb,lf,ly,lE,lS,lw,lC,lx,lT,lO,lL,lI,l_,lk,lA,lM,lP,lR,lD,lN,lF,lH,lj,l$,lU,lV,lW,lz,lB,lq,lX,lK,lG,lY,lQ,lJ,lZ,l0,l1,l2,l3,l8,l4,l5,l7,l6,l9,re,rt,ra;function ri(e,t,a,i,n,l){function r(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var s,o=i.kind,d="getter"===o?"get":"setter"===o?"set":"value",h=!t&&e?i.static?e:e.prototype:null,c=t||(h?Object.getOwnPropertyDescriptor(h,i.name):{}),u=!1,m=a.length-1;m>=0;m--){var p={};for(var v in i)p[v]="access"===v?{}:i[v];for(var v in i.access)p.access[v]=i.access[v];p.addInitializer=function(e){if(u)throw TypeError("Cannot add initializers after decoration has completed");l.push(r(e||null))};var g=(0,a[m])("accessor"===o?{get:c.get,set:c.set}:c[d],p);if("accessor"===o){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw TypeError("Object expected");(s=r(g.get))&&(c.get=s),(s=r(g.set))&&(c.set=s),(s=r(g.init))&&n.unshift(s)}else(s=r(g))&&("field"===o?n.unshift(s):c[d]=s)}h&&Object.defineProperty(h,i.name,c),u=!0}function rn(e,t,a){for(var i=arguments.length>2,n=0;n<t.length;n++)a=i?t[n].call(e,a):t[n].call(e);return i?a:void 0}function rl(e,t,a){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:a?"".concat(a," ",t):t})}let rr=[];function rs(){let e=rr;for(let[t,a]of(rr=[],e))a?t.call(a):t()}function ro(e,t){0===rr.length&&queueMicrotask(rs),rr.push([e,t])}function rd(e,t,a){let i;return(n,{addInitializer:l})=>{let r=new Set([...t.filter(e=>e.observedCSSProperties).map(e=>e.observedCSSProperties).reduce((e,t)=>e.concat(t),[])]);class s extends n{static registerPlugin(e){if(s.observedAttributes.push(...e.observedAttributes),e.observedCSSProperties)for(let t of e.observedCSSProperties)r.add(t);t.push(e)}static observedAttributes=[...n.observedAttributes??[],...t.map(e=>e.observedAttributes).reduce((e,t)=>e.concat(t),[]),"class"];#b=[];constructor(){if(super(),a&&!i&&((i=document.createElement("template")).innerHTML=a,document.body.appendChild(i)),i){this.attachShadow({mode:"open",delegatesFocus:!0});let e=i.content.cloneNode(!0);this.shadowRoot?.append(e)}this.#b=t.map(e=>new e(this)),this.#f()}#y=!1;#E=new Map;#S(){!this.#y&&r.size&&(this.#y=!0,ro(this.#w,this))}#w(){let e=getComputedStyle(this);for(let a of r){var t;let i=e.getPropertyValue(a),n=e.getPropertyPriority(a),l=(t=i.trim(),n?t+" !important":t);if(this.#E.get(a)!==l)for(let e of this.#b)e.cssPropertyChangedHandler?.[a]?.call(e,l,a)}this.#y=!1}setAttribute(e,t){if("false"===t.toString()&&!n.notToFilterFalseAttributes?.has(e)&&!e.startsWith("data-"))return void this.removeAttribute(e);super.setAttribute(e,t)}#f(){let e=this.attributes;for(let t=0,a;a=e.item(t);t++)"false"!==a.value||n.notToFilterFalseAttributes?.has(a.name)||a.name.startsWith("data-")||this.removeAttributeNode(a)}#C=!1;attributeChangedCallback(e,t,a){if(super.attributeChangedCallback&&super.attributeChangedCallback(e,t,a),n.notToFilterFalseAttributes?.has(e)||e.startsWith("data-")||("false"===t&&(t=null),"false"===a&&(a=null,this.removeAttribute(e))),t!==a){for(let i of(this.#C&&("class"===e||"style"===e)&&this.#S(),this.#b))if(i.attributeChangedHandler?.[e]){let{handler:n,noDomMeasure:l}=i.attributeChangedHandler[e];l?n.call(i,a,t,e):this.#C&&ro(()=>n.call(i,a,t,e))}}}#x(){this.getAttributeNames().forEach(e=>{for(let t of this.#b)if(t.attributeChangedHandler?.[e]){let{handler:a,noDomMeasure:i}=t.attributeChangedHandler[e];i||ro(()=>a.call(t,this.getAttribute(e),null,e))}})}connectedCallback(){super.connectedCallback?.(),this.#b.forEach(e=>{e.connectedCallback?.()}),this.#S(),ro(this.#x,this),this.#C=!0}disconnectedCallback(){super.disconnectedCallback?.(),this.#b.forEach(e=>{e.dispose?.()})}#T={};addEventListener(e,t,a){super.addEventListener(e,t,a),this.#T[e]??={count:0,listenerCount:new WeakMap,captureListenerCount:new WeakMap};let i=this.#T[e],n=("object"==typeof a?a.capture:a)?i.captureListenerCount:i.listenerCount,l=n.get(t)??0;if(n.set(t,l+1),0===i.count)for(let t of this.#b){let a=t.eventStatusChangedHandler?.[e];a&&a.call(t,!0,e)}i.count++}removeEventListener(e,t,a){super.removeEventListener(e,t,a);let i="object"==typeof a?a.capture:a,n=this.#T[e];if(n&&n.count>0&&1===(i?n?.captureListenerCount:n?.listenerCount).get(t)&&(n.listenerCount.delete(t),n.count--,0===n.count))for(let t of this.#b){let a=t.eventStatusChangedHandler?.[e];a&&a.call(t,!1,e)}}}return l(()=>{customElements.define(e,s)}),s}}function rh(e,t,a){if(t){if((t=t.trim()).endsWith("px"))return Number(t.substring(0,t.length-2));if(t.endsWith("%")){let i=Number(t.substring(0,t.length-1)),{width:n,height:l}=e.getBoundingClientRect();return(a?n:l)*i/100}}return 0}D=[rd("lynx-wrapper",[])],N=[],F=HTMLElement,class extends F{static{R=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(F[Symbol.metadata]??null):void 0;ri(null,P={value:R},D,{kind:"class",name:R.name,metadata:e},null,N),R=P.value,e&&Object.defineProperty(R,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),rn(R,N)}};let rc={bubbles:!1,composed:!1,cancelable:!0},ru="onscrollend"in document,rm=window.navigator.userAgent;rm.includes("Chrome"),/\b(iPad|iPhone|iPod|OS X)\b/.test(rm)&&!/Edge/.test(rm)&&/WebKit/.test(rm)&&window.MSStream;let rp=Symbol();function rv(e,t){return function(a,...i){return function(n,l){if("method"===l.kind)l.addInitializer(function(){this[e]??={},this[e][a]=t(n,i)});else if("field"===l.kind)return function(n){return this[e]??={},this[e][a]=t(n,i),n};else throw Error(`[lynx-web-components] decorator type ${l.kind} is not supported`)}}}let rg=rv("eventStatusChangedHandler",e=>e),rb=Symbol("layoutChangeTarget"),rf=(H=[],j=[],class e{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;ri(null,null,[rg("layoutchange")],{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},H,j),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["exposure-id","exposure-area","exposure-screen-margin-top","exposure-screen-margin-right","exposure-screen-margin-bottom","exposure-screen-margin-left","exposure-ui-margin-top","exposure-ui-margin-right","exposure-ui-margin-bottom","exposure-ui-margin-left"];#O=!1;#L=!1;#I;#_;#k=!1;#A;get #M(){return this.#O||this.#L||null!==this.#I.getAttribute("exposure-id")}constructor(e){rn(this,j),this.#I=e}onExposureParamsChanged=()=>{this.#_||(this.#_=Promise.resolve().then(()=>{this.#P(),this.#_=void 0}))};onExposureIdChanged(e,t){t&&this.#M&&this.#R({isIntersecting:!1},t),this.onExposureParamsChanged()}attributeChangedHandler=new Proxy(this,{get(t,a){if(e.observedAttributes.includes(a))if("exposure-id"===a)return{handler:t.onExposureIdChanged,noDomMeasure:!0};else return{handler:t.onExposureParamsChanged,noDomMeasure:!0}}});eventStatusChangedHandler={uiappear:e=>{this.#O=e,this.onExposureParamsChanged()},uidisappear:e=>{this.#L=e,this.onExposureParamsChanged()}};#P(){let e={exposureID:this.#I.getAttribute("exposure-id"),exposureArea:this.#I.getAttribute("exposure-area"),exposureScene:this.#I.getAttribute("exposure-scene"),exposureScreenMarginTop:this.#I.getAttribute("exposure-screen-margin-top"),exposureScreenMarginRight:this.#I.getAttribute("exposure-screen-margin-right"),exposureScreenMarginBottom:this.#I.getAttribute("exposure-screen-margin-bottom"),exposureScreenMarginLeft:this.#I.getAttribute("exposure-screen-margin-left"),exposureUIMarginTop:this.#I.getAttribute("exposure-ui-margin-top"),exposureUIMarginRight:this.#I.getAttribute("exposure-ui-margin-right"),exposureUIMarginBottom:this.#I.getAttribute("exposure-ui-margin-bottom"),exposureUIMarginLeft:this.#I.getAttribute("exposure-ui-margin-left")};if(this.#M){if(IntersectionObserver){let t={top:rh(this.#I,e.exposureUIMarginTop),right:rh(this.#I,e.exposureUIMarginRight,!0),bottom:rh(this.#I,e.exposureUIMarginBottom),left:rh(this.#I,e.exposureUIMarginLeft,!0)},a={top:rh(this.#I,e.exposureScreenMarginTop),right:rh(this.#I,e.exposureScreenMarginRight,!0),bottom:rh(this.#I,e.exposureScreenMarginBottom),left:rh(this.#I,e.exposureScreenMarginLeft,!0)},i={top:(t.bottom?-1:1)*(a.top-t.bottom),right:(t.left?-1:1)*(a.right-t.left),bottom:(t.top?-1:1)*(a.bottom-t.top),left:(t.right?-1:1)*(a.left-t.right)},n=this.#I.getAttribute("exposure-area"),l=`${i.top}px ${i.right}px ${i.bottom}px ${i.left}px`,r=n?parseFloat(n)/100:0;this.#A&&this.#A.disconnect();let s=this.#I.parentElement;for(;s;)if(s[rp]){s=s[rp];break}else s=s.parentElement;this.#k=!1,this.#A=new IntersectionObserver(([e])=>{e&&(e.isIntersecting&&(this.#k=!0),this.#R(e))},{rootMargin:l,threshold:r,root:s}),this.#A.observe(this.#I)}}else this.#D()}#R(e,t){if(!this.#k)return;let a=t??this.#I.getAttribute("exposure-id")??"",i=this.#I.getAttribute("exposure-scene")??"",n={"exposure-id":a,"exposure-scene":i,exposureID:a,exposureScene:i},l=new CustomEvent(e.isIntersecting?"uiappear":"uidisappear",{...rc,detail:n}),r=new CustomEvent(e.isIntersecting?"exposure":"disexposure",{bubbles:!0,composed:!1,cancelable:!1,detail:n});Object.assign(l,n),this.#I.dispatchEvent(l),this.#I.dispatchEvent(r)}#N=!1;#F;__handleScrollUpperThresholdEventEnabled=rn(this,H,e=>{e&&this.#I[rb]?!this.#F&&(this.#F=new ResizeObserver(([e])=>{if(e){let{width:t,height:a,left:i,right:n,top:l,bottom:r}=e.contentRect,s=this.#I.id;this.#I.dispatchEvent(new CustomEvent("layoutchange",{detail:{width:t,height:a,left:i,right:n,top:l,bottom:r,id:s},...rc}))}}),this.#N||(this.#F.observe(this.#I[rb]),this.#N=!0)):this.#F?.disconnect()});#D(){this.#A&&(this.#A.disconnect(),this.#A=void 0)}}),ry=rv("attributeChangedHandler",(e,[t])=>({handler:e,noDomMeasure:t})),rE=rv("cssPropertyChangedHandler",e=>e);function rS(e,t){let a,i;return()=>(i||(i=e()),i.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&a||(a=i.querySelector(t)),a)}function rw(e,t,a,i){return function(n){n?(a&&(n=a(n)),ro(()=>e.call(this).style.setProperty(t,n,i?"important":void 0))):ro(()=>e.call(this).style.removeProperty(t))}}let rC=(W=[],z=[],B=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;$=[ry("fading-edge-length",!0)],U=[rE("background"),rE("background-color")],ri(this,V={value:rl(function(e){this.#H().style.setProperty("--scroll-view-bg-color",e),this.#j().style.setProperty("--scroll-view-bg-color",e)},"#backgroundColorToVariable")},U,{kind:"method",name:"#backgroundColorToVariable",static:!1,private:!0,access:{has:e=>#$ in e,get:e=>e.#$},metadata:e},null,W),ri(null,null,$,{kind:"field",name:"#handleFadingEdgeLength",static:!1,private:!0,access:{has:e=>#U in e,get:e=>e.#U,set:(e,t)=>{e.#U=t}},metadata:e},z,B),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}#I=rn(this,W);#H=rS(()=>this.#I.shadowRoot,"#top-fade-mask");#j=rS(()=>this.#I.shadowRoot,"#bot-fade-mask");static observedAttributes=["fading-edge-length"];static observedCSSProperties=["background","background-color"];constructor(e){rn(this,B),this.#I=e}#U=rn(this,z,rw(()=>this.#I,"--scroll-view-fading-edge-length",e=>`${parseFloat(e)}px`));get #$(){return V.value}connectedCallback(){}dispose(){}}),rx=(Y=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;q=[ry("scroll-top",!1),ry("scroll-left",!1),ry("initial-scroll-offset",!1)],K=[ry("scroll-to-index",!1),ry("initial-scroll-to-index",!1)],ri(this,X={value:rl(function(e,t,a){if(e){let t=parseFloat(e),i=this.#I.getAttribute("scroll-orientation"),n=this.#I.getAttribute("scroll-y"),l=this.#I.getAttribute("scroll-x"),r=("scroll-top"===a||"initial-scroll-offset"===a)&&(""===n||"true"===n||"vertical"===i||"both"===i),s=("scroll-left"===a||"initial-scroll-offset"===a)&&(""===l||"true"===l||"vertical"===i||"both"===i);requestAnimationFrame(()=>{r&&this.#I.scrollTo(0,t),s&&(this.#I.scrollLeft=t)})}},"#handleInitialScrollOffset")},q,{kind:"method",name:"#handleInitialScrollOffset",static:!1,private:!0,access:{has:e=>#V in e,get:e=>e.#V},metadata:e},null,Y),ri(this,G={value:rl(function(e){if(e){let t=parseFloat(e),a=this.#I.children.item(t);if(a&&a instanceof HTMLElement){let e=null!==this.#I.getAttribute("scroll-x");requestAnimationFrame(()=>{e?this.#I.scrollLeft=a.offsetLeft:this.#I.scrollTop=a.offsetTop})}}},"#handleInitialScrollIndex")},K,{kind:"method",name:"#handleInitialScrollIndex",static:!1,private:!0,access:{has:e=>#W in e,get:e=>e.#W},metadata:e},null,Y),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}#I=rn(this,Y);static observedAttributes=["scroll-top","scroll-left","initial-scroll-offset","scroll-to-index","initial-scroll-to-index"];constructor(e){this.#I=e}get #V(){return X.value}get #W(){return G.value}dispose(){}});function rT(e,t,a){let i;return n=>{null!==n?i||(i=new IntersectionObserver(a,{root:e()})).observe(t()):i&&(i.disconnect(),i=void 0)}}let rO=(ei=[],en=[],el=[],er=[],es=[],eo=[],ed=[],eh=[],ec=[],eu=[],em=[],ep=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;Q=[rg("scrolltoupper")],J=[rg("scrolltolower")],Z=[ry("upper-threshold",!0)],ee=[ry("lower-threshold",!0)],et=[rg("lynxscroll")],ea=[rg("lynxscrollend")],ri(null,null,Q,{kind:"field",name:"#handleScrollUpperThresholdEventEnabled",static:!1,private:!0,access:{has:e=>#z in e,get:e=>e.#z,set:(e,t)=>{e.#z=t}},metadata:e},ei,en),ri(null,null,J,{kind:"field",name:"#handleScrollLowerThresholdEventEnabled",static:!1,private:!0,access:{has:e=>#B in e,get:e=>e.#B,set:(e,t)=>{e.#B=t}},metadata:e},el,er),ri(null,null,Z,{kind:"field",name:"#updateUpperThreshold",static:!1,private:!0,access:{has:e=>#q in e,get:e=>e.#q,set:(e,t)=>{e.#q=t}},metadata:e},es,eo),ri(null,null,ee,{kind:"field",name:"#updateLowerThreshold",static:!1,private:!0,access:{has:e=>#X in e,get:e=>e.#X,set:(e,t)=>{e.#X=t}},metadata:e},ed,eh),ri(null,null,et,{kind:"field",name:"#handleScrollEventEnabled",static:!1,private:!0,access:{has:e=>#K in e,get:e=>e.#K,set:(e,t)=>{e.#K=t}},metadata:e},ec,eu),ri(null,null,ea,{kind:"field",name:"#handleScrollEndEventEnabled",static:!1,private:!0,access:{has:e=>#G in e,get:e=>e.#G,set:(e,t)=>{e.#G=t}},metadata:e},em,ep),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}#I;#Y;#Q=0;#J=0;constructor(e){rn(this,ep),this.#I=e}#Z=()=>this.#I;#ee=rS(()=>this.#I.shadowRoot,"#upper-threshold-observer");#et=rS(()=>this.#I.shadowRoot,"#lower-threshold-observer");#ea=e=>{let{isIntersecting:t,target:a}=e[0],i=a.id;t&&("upper-threshold-observer"===i?this.#I.dispatchEvent(new CustomEvent("scrolltoupper",{...rc,detail:this.#ei()})):"lower-threshold-observer"===i&&this.#I.dispatchEvent(new CustomEvent("scrolltolower",{...rc,detail:this.#ei()})))};static observedAttributes=["upper-threshold","lower-threshold"];#z=rn(this,ei,e=>{e?this.#I.setAttribute("x-enable-scrolltoupper-event",""):this.#I.removeAttribute("x-enable-scrolltoupper-event"),this.#en(e)});#en=(rn(this,en),rT(this.#Z,this.#ee,this.#ea));#B=rn(this,el,e=>{e?this.#I.setAttribute("x-enable-scrolltolower-event",""):this.#I.removeAttribute("x-enable-scrolltolower-event"),this.#el(e)});#el=(rn(this,er),rT(this.#Z,this.#et,this.#ea));#q=rn(this,es,rw(this.#ee,"flex-basis",e=>`${parseInt(e)}px`));#X=(rn(this,eo),rn(this,ed,rw(this.#et,"flex-basis",e=>`${parseInt(e)}px`)));#ei(){let{scrollTop:e,scrollLeft:t,scrollHeight:a,scrollWidth:i}=this.#Z();0===e&&(e-=this.#I.scrollHeight/2-this.#I.scrollTop),0===t&&(t-=this.#I.scrollWidth/2-this.#I.scrollLeft);let n={scrollTop:e,scrollLeft:t,scrollHeight:a,scrollWidth:i,isDragging:!1,deltaX:t-this.#Q,deltaY:e-this.#J};return this.#Q=t,this.#J=e,n}#er=(rn(this,eh),()=>{this.#es&&!ru&&(clearTimeout(this.#Y),this.#Y=setTimeout(()=>{this.#eo()},100)),this.#I.dispatchEvent(new CustomEvent("lynxscroll",{...rc,detail:this.#ei()}))});#eo=()=>{this.#I.dispatchEvent(new CustomEvent("lynxscrollend",{...rc,detail:this.#ei()}))};#ed=!1;#K=rn(this,ec,e=>{this.#ed=e,this.#eh()});#es=(rn(this,eu),!1);#G=rn(this,em,e=>{this.#es=e,this.#eh()});#eh(){this.#ed||this.#es?(this.#Z().addEventListener("scroll",this.#er),this.#Z().addEventListener("scrollend",this.#eo),this.#I.addEventListener("scroll",this.#er),this.#I.addEventListener("scrollend",this.#eo),this.#Q=0,this.#J=0):(this.#I.removeEventListener("scroll",this.#er),this.#I.removeEventListener("scrollend",this.#eo))}connectedCallback(){}dispose(){}});class rL{static eventName="__scrollIntoView";static observedAttributes=[];#I;#ec=e=>{e.stopPropagation();let t=e.composedPath().filter(e=>e instanceof HTMLElement),a=[],i=this.#I;for(let e of t){if(e===i)break;a.push(e)}let n=this.#I.getAttribute("scroll-orientation"),l=null!==this.#I.getAttribute("scroll-x")||"both"===n||"horizontal"===n,r=null!==this.#I.getAttribute("scroll-y")||"both"===n||"vertical"===n,s=0,o=0;for(let{offsetTop:e,offsetLeft:t}of a)l&&(o+=t),r&&(s+=e);if(l)switch(e.detail.inline){case"center":o+=(e.target.clientWidth-this.#I.clientWidth)/2;break;case"end":o+=e.target.clientWidth-this.#I.clientWidth}if(r)switch(e.detail.block){case"center":s+=(e.target.clientHeight-this.#I.clientHeight)/2;break;case"end":s+=e.target.clientHeight-this.#I.clientHeight}i.scrollTo({behavior:"smooth"===e.detail.behavior?"smooth":"instant",left:o,top:s})};constructor(e){this.#I=e,this.#I.addEventListener(rL.eventName,this.#ec,{passive:!1})}dispose(){this.#I.removeEventListener(rL.eventName,this.#ec)}}let rI=(e,...t)=>String.raw({raw:e},...t);function r_(e,t,a){return function(i){a&&(i=a(i));let n=e.call(this);n.getAttribute(t)!==i&&(null!==i?ro(()=>{n.setAttribute(t,i)}):ro(()=>{n.removeAttribute(t)}))}}eb=[rd("scroll-view",[rf,rx,rC,rO,rL],rI` <style>
|
|
6
|
+
}`]},568:function(e,t,a){a.a(e,async function(e,t){try{var i=a(609),n=a(582),l=e([i,n]);[i,n]=l.then?(await l)():l,t()}catch(e){t(e)}})},835:function(e,t,a){a.d(t,{c:()=>s});class i{port;name;incId=0;#u={};#m=new TextEncoder;#p=new TextDecoder;#v=new Map;constructor(e,t){this.port=e,this.name=t,e.onmessage=e=>this.#g(e.data)}get nextRetId(){return`ret_${this.name}_${this.incId++}`}static createRetEndpoint(e){return{name:e,hasReturn:!1,isSync:!1}}#g=async e=>{let t=this.#v.get(e.name);if(t){let a=e.sync?new Int32Array(e.lock):void 0,n=!e.sync&&e.retId?i.createRetEndpoint(e.retId):void 0;try{let i=await t(...e.data),l,r=[];if(e.sync?l=i:e.hasTransfer?{data:l,transfer:r}=i||{}:l=i,e.sync){if(e.buf){let t=JSON.stringify(l),a=new Uint32Array(e.buf,0,1),i=new Uint8Array(e.buf,4),n=new Uint8Array(e.buf.byteLength-4),{written:r}=this.#m.encodeInto(t,n);a[0]=r,i.set(n,0)}Atomics.store(a,0,1),Atomics.notify(a,0)}else e.retId&&this.invoke(n,[l,!1],r||[])}catch(t){console.error(t),e.sync?(Atomics.store(a,0,2),Atomics.notify(a,0),a[1]=2):this.invoke(n,[void 0,!0])}}else{let t=this.#u[e.name];t?t.push(e):this.#u[e.name]=[e]}};createCall(e){return(...t)=>this.invoke(e,t)}registerHandler(e,t){this.#v.set(e.name,t);let a=this.#u[e.name];if(a?.length)for(let t of(this.#u[e.name]=void 0,a))this.#g(t)}registerHandlerRef(e,t,a){this.registerHandler(e,(...e)=>t[a]?.call(t,...e))}registerHandlerLazy(e,t,a){if(t[a])this.registerHandlerRef(e,t,a);else{let i,n=this;Object.defineProperty(t,a,{get:()=>i,set(l){i=l,l&&n.registerHandlerRef(e,t,a)}})}}removeHandler(e){this.#v.delete(e.name)}invoke(e,t,a=[]){if(e.isSync){let i=e.bufferSize?new SharedArrayBuffer(e.bufferSize+4):void 0,n=new SharedArrayBuffer(4),l=new Int32Array(n);l[0]=0;let r={name:e.name,data:t,sync:!0,lock:n,buf:i};if(this.port.postMessage(r,{transfer:a}),Atomics.wait(l,0,0),2===l[0])throw null;if(!i)return;{let e=new Uint32Array(i,0,4)[0],t=new Uint8Array(i,4,e),a=new Uint8Array(e);return a.set(t,0),a?JSON.parse(this.#p.decode(a)):void 0}}if(e.hasReturn){let{promise:n,resolve:l,reject:r}=Promise.withResolvers(),s=i.createRetEndpoint(this.nextRetId);this.registerHandler(s,(e,t)=>{t&&r(),l(e)});let o={name:e.name,data:t,sync:!1,retId:s?.name,hasTransfer:e.hasReturnTransfer};return this.port.postMessage(o,{transfer:a}),n}{let i={name:e.name,data:t,sync:!1};this.port.postMessage(i,{transfer:a})}}createCallbackify(e,t){let a=this.createCall(e);return(...e)=>{let i=e.at(t);e.splice(t,1),a(...e).then(i)}}}let n=[],l=[],r=o();function s(e,t){let a;t?a=function(){let e=new MessageChannel;return{mainThreadRpc:new i(e.port1,"main-to-bg"),channelMainThreadWithBackground:e}}():(a=r,r=o());let s=function(e,t){let a,n=new MessageChannel;e?(a=l[e]??d("lynx-bg"),l[e]=a):a=d("lynx-bg");let r={mode:"background",toUIThread:n.port2,toPeerThread:t.port2};return a.postMessage(r,[n.port2,t.port2]),{backgroundRpc:new i(n.port1,"ui-to-bg"),backgroundThreadWorker:a}}(e,a.channelMainThreadWithBackground);return void 0!==e&&(n[e]?n[e]++:n[e]=1),{mainThreadRpc:a.mainThreadRpc,backgroundRpc:s.backgroundRpc,terminateWorkers:()=>{a.mainThreadWorker?.terminate(),void 0===e?s.backgroundThreadWorker.terminate():1===n[e]&&(s.backgroundThreadWorker.terminate(),n[e]=0,l[e]=void 0)}}}function o(){let e=new MessageChannel,t=new MessageChannel,a=d("lynx-main"),n={mode:"main",toUIThread:e.port2,toPeerThread:t.port1};return a.postMessage(n,[e.port2,t.port1]),{mainThreadRpc:new i(e.port1,"ui-to-main"),mainThreadWorker:a,channelMainThreadWithBackground:t}}function d(e){return new Worker(new URL(a.p+a.u("45"),a.b),Object.assign({},{type:"module",name:e},{type:void 0}))}},475:function(e,t,a){a.a(e,async function(e,i){try{a.d(t,{q:()=>n});let{loadMainThread:e}=await a.e("579").then(a.bind(a,996));function n(t,a,i,n){let l;globalThis.module||Object.assign(globalThis,{module:{}});let r=Object.assign(a,{createElement:document.createElement.bind(document)}),{startMainThread:s}=e(t,r,()=>{},i,()=>{n.onError?.()}),o=async e=>{let t=s(e);l=await t},d=async(...e)=>{l.updatePage?.(...e)};return{start:o,updateDataMainThread:d}}i()}catch(e){i(e)}},1)},294:function(e,t,a){a.d(t,{g:()=>o});var i=a(353);let n={CreateElement:1,SetAttribute:2,RemoveAttribute:3,Append:4,Remove:5,ReplaceWith:6,InsertBefore:7,EnableEvent:8,RemoveChild:9,StyleDeclarationSetProperty:10,StyleDeclarationRemoveProperty:11,SetInnerHTML:12};function l(){}let r=["detail","keyCode","charCode","elapsedTime","propertyName","pseudoElement","animationName","touches","targetTouches","changedTouches"],s=new Set(["isTrusted","target","currentTarget","type","bubbles","window","self","view","srcElement","eventPhase"]);function o(e,t,a){var o;o=a.onError,e.registerHandler(i.Oh,e=>{o?.(e)});let{shadowRoot:d}={shadowRoot:t},{decodeOperation:h}=function(e){let{shadowRoot:t,onEvent:a}=e,i=new Set,o=[new WeakRef(t)],d=new WeakMap;function h(e){let t=o[e]?.deref();if(t)return t;throw Error(`[lynx-web] cannot find element with uniqueId: ${e}`)}function c(e){if(e.eventPhase!==Event.CAPTURING_PHASE&&e.currentTarget!==t)return;let i=e.target;if(i&&d.has(i)){let t=d.get(i),n=e.type,l={};for(let t of r)t in e&&(l[t]=function e(t){if("string"==typeof t||"number"==typeof t||"boolean"==typeof t||null==t)return t;if(t[Symbol.iterator])return[...t].map(e);if("object"==typeof t&&!(t instanceof EventTarget)){let a={};for(let i in t)s.has(i)||(a[i]=e(t[i]));return a}}(e[t]));a(n,t,e.bubbles,l)}}return{decodeOperation:function(e){for(let a of e)if(a.type===n.CreateElement){let e=document.createElement(a.tag);o[a.uid]=new WeakRef(e),d.set(e,a.uid)}else{let e=h(a.uid);switch(a.type){case n.SetAttribute:e.setAttribute(a.key,a.value);break;case n.RemoveAttribute:e.removeAttribute(a.key);break;case n.Append:{let t=a.cid.map(e=>h(e));e.append(...t)}break;case n.Remove:e.remove();break;case n.ReplaceWith:let r=a.nid.map(e=>h(e));e.replaceWith(...r);break;case n.InsertBefore:{let t=h(a.cid),i=a.ref?h(a.ref):null;e.insertBefore(t,i)}break;case n.EnableEvent:e.addEventListener(a.eventType,l,{passive:!0}),i.has(a.eventType)||(t.addEventListener(a.eventType,c,{passive:!0,capture:!0}),i.add(a.eventType));break;case n.RemoveChild:{let t=h(a.cid);e.removeChild(t)}break;case n.StyleDeclarationSetProperty:e.style.setProperty(a.property,a.value,a.priority);break;case n.StyleDeclarationRemoveProperty:e.style.removeProperty(a.property);break;case n.SetInnerHTML:e.innerHTML=a.text}}}}}({shadowRoot:d,onEvent:e.createCall(i.wU)});return e.registerHandler(i.R1,e=>{h(e)}),{start:e.createCall(i.cZ),updateDataMainThread:e.createCall(i.Au)}}},809:function(e,t,a){a.d(t,{m:()=>n});var i=a(353);function n(e,t){return async()=>{await e.invoke(i.eW,[]),t()}}},237:function(e,t,a){a.d(t,{h:()=>i});function i(e,t){return(a,i,n)=>{Promise.all([e(a,{}),t(a,{})]).then(()=>n?.())}}},56:function(e,t,a){a.d(t,{o:()=>r});var i=a(353);function n(e,t,a,n,l,r,s,o){let d,h=e;if(r){let t=e.querySelector(`[${i.Xz}="${r}"]`);if(t)h=t;else{console.error(`[lynx-web] cannot find dom for root_unique_id: ${r}`),o?.(i.jK.NODE_NOT_FOUND);return}}else if(n){let t=e.querySelector(`[${i.uE}="${n}"]`);if(t)h=t;else{console.error(`[lynx-web] cannot find dom for component_id: ${n}`),o?.(i.jK.NODE_NOT_FOUND);return}}if(t===i.fT.ID_SELECTOR)d=a;else if(t===i.fT.UNIQUE_ID)d=`[${i.Xz}="${a}"]`;else{console.error(`[lynx-web] NYI: setnativeprops type ${t}`),o?.(i.jK.UNKNOWN);return}if(l){let e=null;try{e=h.querySelector(d)}catch(e){console.error(`[lynx-web] cannot use selector: ${d}`),o?.(i.jK.SELECTOR_NOT_SUPPORTED);return}e?s(e):(console.error(`[lynx-web] cannot find from for selector ${a} under`,h),o?.(i.jK.NODE_NOT_FOUND))}else h.querySelectorAll(d).forEach(e=>{s(e)})}let l={boundingClientRect:e=>{let t=e.getBoundingClientRect();return{id:e.id,width:t.width,height:t.height,left:t.left,right:t.right,top:t.top,bottom:t.bottom}}};function r(e,t,a){let r,s,o;r=i.jK.UNKNOWN,e.registerHandler(i.bh,(e,a,o,d,h,c)=>(n(t,e,a,o,!0,c,e=>{try{let t=l[d],a="function"==typeof e[d];t||a?(s=t?t(e,h):e[d](h),r=i.jK.SUCCESS):r=i.jK.METHOD_NOT_FOUND}catch(t){console.error("[lynx-web] invokeUIMethod: apply method faild with",t,e),r=i.jK.PARAM_INVALID}},e=>{r=e}),{code:r,data:s})),e.registerHandler(i.cx,(e,a,i,l,r,s)=>{n(t,e,a,i,l,s,e=>{var t=e;for(let e in r){let a=r[e];"text"===e&&t?.tagName==="X-TEXT"&&t.firstElementChild&&"RAW-TEXT"==t.firstElementChild.tagName&&(t=t.firstElementChild),CSS.supports(e,a)&&t.style?t.style.setProperty(e,a):t.setAttribute(e,a)}})}),e.registerHandler(i.gc,(e,a)=>{let n=t.querySelector(`[${i.uE}="${a.componentId}"]`);n?.dispatchEvent(new CustomEvent(e,{...a.eventOption,detail:a.eventDetail}))}),e.registerHandler(i.ZW,(e,a,l)=>(n(t,i.fT.ID_SELECTOR,a,"card"===e?"0":e,l,void 0,e=>{o=e}),[o?.getAttribute(i.uE)??void 0])),d=a.nativeModulesCall,e.registerHandler(i.bM,d);var d,h=a.napiModulesCall;let c=e.createCall(i.oc);e.registerHandler(i.i$,(e,t,a)=>h(e,t,a,c)),e.registerHandler(i.G4,(e,a)=>{t.dispatchEvent(new CustomEvent(e,{detail:a,bubbles:!0,cancelable:!0,composed:!0}))});let u=e.createCall(i.nt);return{sendGlobalEvent:u,markTiming:e.createCall(i.V_),updateDataBackground:e.createCall(i.Au)}}},41:function(e,t,a){a.a(e,async function(e,i){try{a.d(t,{H:()=>u});var n=a(835),l=a(809);a(353);var r=a(936),s=a(237),o=a(56),d=a(294),h=a(475),c=e([h]);function u(e,t,a,i,c,u){let m=performance.now()+performance.timeOrigin,p="all-on-ui"===c,{mainThreadRpc:v,backgroundRpc:g,terminateWorkers:b}=(0,n.c)(i,p),{markTiming:f,sendGlobalEvent:y,updateDataBackground:E}=(0,o.o)(g,a,u),S=(e,t,a)=>{a||(a=performance.now()+performance.timeOrigin),f(e,t,a)},{start:w,updateDataMainThread:C}=p?(0,h.q)(v,a,S,u):(0,d.g)(v,a,u);return S("create_lynx_start",void 0,m),S("load_template_start"),(0,r.$)(e,u.customTemplateLoader).then(e=>{S("load_template_end"),w({...t,template:e})}),{updateData:(0,s.h)(C,E),dispose:(0,l.m)(g,b),sendGlobalEvent:y}}h=(c.then?(await c)():c)[0],i()}catch(e){i(e)}})},936:function(e,t,a){a.d(t,{$:()=>d});var i=a(353);let n={};function l(e,t,a,i){return t=t.concat(i),Object.fromEntries(Object.entries(e).map(([e,n])=>{var l;return[e,(l=["globalThis.module.exports = function(lynx_runtime) {","const module= {exports:{}};let exports = module.exports;","var {",t.join(","),"} = lynx_runtime;",...a.map(e=>`const ${e} = lynx_runtime.${e}?.bind(lynx_runtime);`),";var globDynamicComponentEntry = '__Card__';","var {__globalProps} = lynx;","lynx_runtime._updateVars=()=>{",...i.map(e=>`${e} = lynx_runtime.__lynxGlobalBindingValues.${e};`),"};\n",n,"\n return module.exports;}"].join(""),URL.createObjectURL(new Blob([l],{type:"text/javascript"})))]}))}let r=["lynx","globalThis","_ReportError","__AddConfig","__AddDataset","__GetAttributes","__GetComponentID","__GetDataByKey","__GetDataset","__GetElementConfig","__GetElementUniqueID","__GetID","__GetTag","__SetAttribute","__SetConfig","__SetDataset","__SetID","__UpdateComponentID","__GetConfig","__UpdateListCallbacks","__AppendElement","__ElementIsEqual","__FirstElement","__GetChildren","__GetParent","__InsertElementBefore","__LastElement","__NextElement","__RemoveElement","__ReplaceElement","__ReplaceElements","__SwapElement","__CreateComponent","__CreateElement","__CreatePage","__CreateView","__CreateText","__CreateRawText","__CreateImage","__CreateScrollView","__CreateWrapperElement","__CreateList","__AddEvent","__GetEvent","__GetEvents","__SetEvents","__AddClass","__SetClasses","__GetClasses","__AddInlineStyle","__SetInlineStyles","__SetCSSId","__OnLifecycleEvent","__FlushElementTree","__LoadLepusChunk","SystemInfo"],s=["NativeModules","globalThis","lynx","lynxCoreInject","SystemInfo"],o=["Card","Component"];async function d(e,t){let a=n[e];if(a)return a;let d=t?await t(e):await (await fetch(e,{method:"GET"})).json(),h={...d,lepusCode:l(d.lepusCode,r,[],i.$m),manifest:l(d.manifest,s,o,[])};return n[e]=h,h}},45:function(){var e,t,a,i,n,l,r,s,o,d,h,c,u,m,p,v,g,b,f,y,E,S,w,C,x,T,O,I,L,_,k,A,M;let P,R,D,N,F,H,j,$,U,V,W,z,B,q,X,K,G,Y,Q,J,Z,ee,et,ea,ei,en,el,er,es,eo,ed,eh,ec,eu,em,ep,ev,eg,eb,ef,ey,eE,eS,ew,eC,ex,eT,eO,eI,eL,e_,ek,eA,eM,eP,eR,eD,eN,eF,eH,ej,e$,eU,eV,eW,ez,eB,eq,eX,eK,eG,eY,eQ,eJ,eZ,e0,e1,e2,e3,e8,e5,e4,e6,e9,e7,te,tt,ta,ti,tn,tl,tr,ts,to,td,th,tc,tu,tm,tp,tv,tg,tb,tf,ty,tE,tS,tw,tC,tx,tT,tO,tI,tL,t_,tk,tA,tM,tP,tR,tD,tN,tF,tH,tj,t$,tU,tV,tW,tz,tB,tq,tX,tK,tG,tY,tQ,tJ,tZ,t0,t1,t2,t3,t8,t5,t4,t6,t9,t7,ae,at,aa,ai,an,al,ar,as,ao,ad,ah,ac,au,am,ap,av,ag,ab,af,ay,aE,aS,aw,aC,ax,aT,aO,aI,aL,a_,ak,aA,aM,aP,aR,aD,aN,aF,aH,aj,a$,aU,aV,aW,az,aB,aq,aX,aK,aG,aY,aQ,aJ,aZ,a0,a1,a2,a3,a8,a5,a4,a6,a9,a7,ie,it,ia,ii,il,ir,is,io,id,ih,ic,iu,im,ip,iv,ig,ib,iy,iE,iS,iw,iC,ix,iT,iO,iI,iL,i_,ik,iA,iM,iP,iR,iD,iN,iF,iH,ij,i$,iU,iV,iW,iz,iB,iq,iX,iK,iG,iY,iQ,iJ,iZ,i0,i1,i2,i3,i8,i5,i4,i6,i9,i7,ne,nt,na,ni,nn,nl,nr,ns,no,nd,nh,nc,nu,nm,np,nv,ng,nb,nf,ny,nE,nS,nw,nC,nx,nT,nO,nI,nL,n_,nk,nA,nM,nP,nR,nD,nN,nF,nH,nj,n$,nU,nV,nW,nz,nB,nq,nX,nK,nG,nY,nQ,nJ,nZ,n0,n1,n2,n3,n8,n5,n4,n6,n9,n7,le,lt,la,li,ln,ll,lr,ls,lo,ld,lh,lc,lu,lm,lp,lv,lg,lb,lf,ly,lE,lS,lw,lC,lx,lT,lO,lI,lL,l_,lk,lA,lM,lP,lR,lD,lN,lF,lH,lj,l$,lU,lV,lW,lz,lB,lq,lX,lK,lG,lY,lQ,lJ,lZ,l0,l1,l2,l3,l8,l5,l4,l6,l9,l7,re,rt,ra;function ri(e,t,a,i,n,l){function r(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var s,o=i.kind,d="getter"===o?"get":"setter"===o?"set":"value",h=!t&&e?i.static?e:e.prototype:null,c=t||(h?Object.getOwnPropertyDescriptor(h,i.name):{}),u=!1,m=a.length-1;m>=0;m--){var p={};for(var v in i)p[v]="access"===v?{}:i[v];for(var v in i.access)p.access[v]=i.access[v];p.addInitializer=function(e){if(u)throw TypeError("Cannot add initializers after decoration has completed");l.push(r(e||null))};var g=(0,a[m])("accessor"===o?{get:c.get,set:c.set}:c[d],p);if("accessor"===o){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw TypeError("Object expected");(s=r(g.get))&&(c.get=s),(s=r(g.set))&&(c.set=s),(s=r(g.init))&&n.unshift(s)}else(s=r(g))&&("field"===o?n.unshift(s):c[d]=s)}h&&Object.defineProperty(h,i.name,c),u=!0}function rn(e,t,a){for(var i=arguments.length>2,n=0;n<t.length;n++)a=i?t[n].call(e,a):t[n].call(e);return i?a:void 0}function rl(e,t,a){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:a?"".concat(a," ",t):t})}let rr=[];function rs(){let e=rr;for(let[t,a]of(rr=[],e))a?t.call(a):t()}function ro(e,t){0===rr.length&&queueMicrotask(rs),rr.push([e,t])}function rd(e,t,a){let i;return(n,{addInitializer:l})=>{let r=new Set([...t.filter(e=>e.observedCSSProperties).map(e=>e.observedCSSProperties).reduce((e,t)=>e.concat(t),[])]);class s extends n{static registerPlugin(e){if(s.observedAttributes.push(...e.observedAttributes),e.observedCSSProperties)for(let t of e.observedCSSProperties)r.add(t);t.push(e)}static observedAttributes=[...n.observedAttributes??[],...t.map(e=>e.observedAttributes).reduce((e,t)=>e.concat(t),[]),"class"];#b=[];constructor(){if(super(),a&&!i&&((i=document.createElement("template")).innerHTML=a,document.body.appendChild(i)),i){this.attachShadow({mode:"open",delegatesFocus:!0});let e=i.content.cloneNode(!0);this.shadowRoot?.append(e)}this.#b=t.map(e=>new e(this)),this.#f()}#y=!1;#E=new Map;#S(){!this.#y&&r.size&&(this.#y=!0,ro(this.#w,this))}#w(){let e=getComputedStyle(this);for(let a of r){var t;let i=e.getPropertyValue(a),n=e.getPropertyPriority(a),l=(t=i.trim(),n?t+" !important":t);if(this.#E.get(a)!==l)for(let e of this.#b)e.cssPropertyChangedHandler?.[a]?.call(e,l,a)}this.#y=!1}setAttribute(e,t){if("false"===t.toString()&&!n.notToFilterFalseAttributes?.has(e)&&!e.startsWith("data-"))return void this.removeAttribute(e);super.setAttribute(e,t)}#f(){let e=this.attributes;for(let t=0,a;a=e.item(t);t++)"false"!==a.value||n.notToFilterFalseAttributes?.has(a.name)||a.name.startsWith("data-")||this.removeAttributeNode(a)}#C=!1;attributeChangedCallback(e,t,a){if(super.attributeChangedCallback&&super.attributeChangedCallback(e,t,a),n.notToFilterFalseAttributes?.has(e)||e.startsWith("data-")||("false"===t&&(t=null),"false"===a&&(a=null,this.removeAttribute(e))),t!==a){for(let i of(this.#C&&("class"===e||"style"===e)&&this.#S(),this.#b))if(i.attributeChangedHandler?.[e]){let{handler:n,noDomMeasure:l}=i.attributeChangedHandler[e];l?n.call(i,a,t,e):this.#C&&ro(()=>n.call(i,a,t,e))}}}#x(){this.getAttributeNames().forEach(e=>{for(let t of this.#b)if(t.attributeChangedHandler?.[e]){let{handler:a,noDomMeasure:i}=t.attributeChangedHandler[e];i||ro(()=>a.call(t,this.getAttribute(e),null,e))}})}connectedCallback(){super.connectedCallback?.(),this.#b.forEach(e=>{e.connectedCallback?.()}),this.#S(),ro(this.#x,this),this.#C=!0}disconnectedCallback(){super.disconnectedCallback?.(),this.#b.forEach(e=>{e.dispose?.()})}#T={};addEventListener(e,t,a){super.addEventListener(e,t,a),this.#T[e]??={count:0,listenerCount:new WeakMap,captureListenerCount:new WeakMap};let i=this.#T[e],n=("object"==typeof a?a.capture:a)?i.captureListenerCount:i.listenerCount,l=n.get(t)??0;if(n.set(t,l+1),0===i.count)for(let t of this.#b){let a=t.eventStatusChangedHandler?.[e];a&&a.call(t,!0,e)}i.count++}removeEventListener(e,t,a){super.removeEventListener(e,t,a);let i="object"==typeof a?a.capture:a,n=this.#T[e];if(n&&n.count>0&&1===(i?n?.captureListenerCount:n?.listenerCount).get(t)&&(n.listenerCount.delete(t),n.count--,0===n.count))for(let t of this.#b){let a=t.eventStatusChangedHandler?.[e];a&&a.call(t,!1,e)}}}return l(()=>{customElements.define(e,s)}),s}}function rh(e,t,a){if(t){if((t=t.trim()).endsWith("px"))return Number(t.substring(0,t.length-2));if(t.endsWith("%")){let i=Number(t.substring(0,t.length-1)),{width:n,height:l}=e.getBoundingClientRect();return(a?n:l)*i/100}}return 0}D=[rd("lynx-wrapper",[])],N=[],F=HTMLElement,class extends F{static{R=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(F[Symbol.metadata]??null):void 0;ri(null,P={value:R},D,{kind:"class",name:R.name,metadata:e},null,N),R=P.value,e&&Object.defineProperty(R,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),rn(R,N)}};let rc={bubbles:!1,composed:!1,cancelable:!0},ru="onscrollend"in document,rm=window.navigator.userAgent;rm.includes("Chrome"),/\b(iPad|iPhone|iPod|OS X)\b/.test(rm)&&!/Edge/.test(rm)&&/WebKit/.test(rm)&&window.MSStream;let rp=Symbol();function rv(e,t){return function(a,...i){return function(n,l){if("method"===l.kind)l.addInitializer(function(){this[e]??={},this[e][a]=t(n,i)});else if("field"===l.kind)return function(n){return this[e]??={},this[e][a]=t(n,i),n};else throw Error(`[lynx-web-components] decorator type ${l.kind} is not supported`)}}}let rg=rv("eventStatusChangedHandler",e=>e),rb=Symbol("layoutChangeTarget"),rf=(H=[],j=[],class e{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;ri(null,null,[rg("layoutchange")],{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},H,j),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["exposure-id","exposure-area","exposure-screen-margin-top","exposure-screen-margin-right","exposure-screen-margin-bottom","exposure-screen-margin-left","exposure-ui-margin-top","exposure-ui-margin-right","exposure-ui-margin-bottom","exposure-ui-margin-left"];#O=!1;#I=!1;#L;#_;#k=!1;#A;get #M(){return this.#O||this.#I||null!==this.#L.getAttribute("exposure-id")}constructor(e){rn(this,j),this.#L=e}onExposureParamsChanged=()=>{this.#_||(this.#_=Promise.resolve().then(()=>{this.#P(),this.#_=void 0}))};onExposureIdChanged(e,t){t&&this.#M&&this.#R({isIntersecting:!1},t),this.onExposureParamsChanged()}attributeChangedHandler=new Proxy(this,{get(t,a){if(e.observedAttributes.includes(a))if("exposure-id"===a)return{handler:t.onExposureIdChanged,noDomMeasure:!0};else return{handler:t.onExposureParamsChanged,noDomMeasure:!0}}});eventStatusChangedHandler={uiappear:e=>{this.#O=e,this.onExposureParamsChanged()},uidisappear:e=>{this.#I=e,this.onExposureParamsChanged()}};#P(){let e={exposureID:this.#L.getAttribute("exposure-id"),exposureArea:this.#L.getAttribute("exposure-area"),exposureScene:this.#L.getAttribute("exposure-scene"),exposureScreenMarginTop:this.#L.getAttribute("exposure-screen-margin-top"),exposureScreenMarginRight:this.#L.getAttribute("exposure-screen-margin-right"),exposureScreenMarginBottom:this.#L.getAttribute("exposure-screen-margin-bottom"),exposureScreenMarginLeft:this.#L.getAttribute("exposure-screen-margin-left"),exposureUIMarginTop:this.#L.getAttribute("exposure-ui-margin-top"),exposureUIMarginRight:this.#L.getAttribute("exposure-ui-margin-right"),exposureUIMarginBottom:this.#L.getAttribute("exposure-ui-margin-bottom"),exposureUIMarginLeft:this.#L.getAttribute("exposure-ui-margin-left")};if(this.#M){if(IntersectionObserver){let t={top:rh(this.#L,e.exposureUIMarginTop),right:rh(this.#L,e.exposureUIMarginRight,!0),bottom:rh(this.#L,e.exposureUIMarginBottom),left:rh(this.#L,e.exposureUIMarginLeft,!0)},a={top:rh(this.#L,e.exposureScreenMarginTop),right:rh(this.#L,e.exposureScreenMarginRight,!0),bottom:rh(this.#L,e.exposureScreenMarginBottom),left:rh(this.#L,e.exposureScreenMarginLeft,!0)},i={top:(t.bottom?-1:1)*(a.top-t.bottom),right:(t.left?-1:1)*(a.right-t.left),bottom:(t.top?-1:1)*(a.bottom-t.top),left:(t.right?-1:1)*(a.left-t.right)},n=this.#L.getAttribute("exposure-area"),l=`${i.top}px ${i.right}px ${i.bottom}px ${i.left}px`,r=n?parseFloat(n)/100:0;this.#A&&this.#A.disconnect();let s=this.#L.parentElement;for(;s;)if(s[rp]){s=s[rp];break}else s=s.parentElement;this.#k=!1,this.#A=new IntersectionObserver(([e])=>{e&&(e.isIntersecting&&(this.#k=!0),this.#R(e))},{rootMargin:l,threshold:r,root:s}),this.#A.observe(this.#L)}}else this.#D()}#R(e,t){if(!this.#k)return;let a=t??this.#L.getAttribute("exposure-id")??"",i=this.#L.getAttribute("exposure-scene")??"",n={"exposure-id":a,"exposure-scene":i,exposureID:a,exposureScene:i},l=new CustomEvent(e.isIntersecting?"uiappear":"uidisappear",{...rc,detail:n}),r=new CustomEvent(e.isIntersecting?"exposure":"disexposure",{bubbles:!0,composed:!1,cancelable:!1,detail:n});Object.assign(l,n),this.#L.dispatchEvent(l),this.#L.dispatchEvent(r)}#N=!1;#F;__handleScrollUpperThresholdEventEnabled=rn(this,H,e=>{e&&this.#L[rb]?!this.#F&&(this.#F=new ResizeObserver(([e])=>{if(e){let{width:t,height:a,left:i,right:n,top:l,bottom:r}=e.contentRect,s=this.#L.id;this.#L.dispatchEvent(new CustomEvent("layoutchange",{detail:{width:t,height:a,left:i,right:n,top:l,bottom:r,id:s},...rc}))}}),this.#N||(this.#F.observe(this.#L[rb]),this.#N=!0)):this.#F?.disconnect()});#D(){this.#A&&(this.#A.disconnect(),this.#A=void 0)}}),ry=rv("attributeChangedHandler",(e,[t])=>({handler:e,noDomMeasure:t})),rE=rv("cssPropertyChangedHandler",e=>e);function rS(e,t){let a,i;return()=>(i||(i=e()),i.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&a||(a=i.querySelector(t)),a)}function rw(e,t,a,i){return function(n){n?(a&&(n=a(n)),ro(()=>e.call(this).style.setProperty(t,n,i?"important":void 0))):ro(()=>e.call(this).style.removeProperty(t))}}let rC=(W=[],z=[],B=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;$=[ry("fading-edge-length",!0)],U=[rE("background"),rE("background-color")],ri(this,V={value:rl(function(e){this.#H().style.setProperty("--scroll-view-bg-color",e),this.#j().style.setProperty("--scroll-view-bg-color",e)},"#backgroundColorToVariable")},U,{kind:"method",name:"#backgroundColorToVariable",static:!1,private:!0,access:{has:e=>#$ in e,get:e=>e.#$},metadata:e},null,W),ri(null,null,$,{kind:"field",name:"#handleFadingEdgeLength",static:!1,private:!0,access:{has:e=>#U in e,get:e=>e.#U,set:(e,t)=>{e.#U=t}},metadata:e},z,B),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}#L=rn(this,W);#H=rS(()=>this.#L.shadowRoot,"#top-fade-mask");#j=rS(()=>this.#L.shadowRoot,"#bot-fade-mask");static observedAttributes=["fading-edge-length"];static observedCSSProperties=["background","background-color"];constructor(e){rn(this,B),this.#L=e}#U=rn(this,z,rw(()=>this.#L,"--scroll-view-fading-edge-length",e=>`${parseFloat(e)}px`));get #$(){return V.value}connectedCallback(){}dispose(){}}),rx=(Y=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;q=[ry("scroll-top",!1),ry("scroll-left",!1),ry("initial-scroll-offset",!1)],K=[ry("scroll-to-index",!1),ry("initial-scroll-to-index",!1)],ri(this,X={value:rl(function(e,t,a){if(e){let t=parseFloat(e),i=this.#L.getAttribute("scroll-orientation"),n=this.#L.getAttribute("scroll-y"),l=this.#L.getAttribute("scroll-x"),r=("scroll-top"===a||"initial-scroll-offset"===a)&&(""===n||"true"===n||"vertical"===i||"both"===i),s=("scroll-left"===a||"initial-scroll-offset"===a)&&(""===l||"true"===l||"vertical"===i||"both"===i);requestAnimationFrame(()=>{r&&this.#L.scrollTo(0,t),s&&(this.#L.scrollLeft=t)})}},"#handleInitialScrollOffset")},q,{kind:"method",name:"#handleInitialScrollOffset",static:!1,private:!0,access:{has:e=>#V in e,get:e=>e.#V},metadata:e},null,Y),ri(this,G={value:rl(function(e){if(e){let t=parseFloat(e),a=this.#L.children.item(t);if(a&&a instanceof HTMLElement){let e=null!==this.#L.getAttribute("scroll-x");requestAnimationFrame(()=>{e?this.#L.scrollLeft=a.offsetLeft:this.#L.scrollTop=a.offsetTop})}}},"#handleInitialScrollIndex")},K,{kind:"method",name:"#handleInitialScrollIndex",static:!1,private:!0,access:{has:e=>#W in e,get:e=>e.#W},metadata:e},null,Y),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}#L=rn(this,Y);static observedAttributes=["scroll-top","scroll-left","initial-scroll-offset","scroll-to-index","initial-scroll-to-index"];constructor(e){this.#L=e}get #V(){return X.value}get #W(){return G.value}dispose(){}});function rT(e,t,a){let i;return n=>{null!==n?i||(i=new IntersectionObserver(a,{root:e()})).observe(t()):i&&(i.disconnect(),i=void 0)}}let rO=(ei=[],en=[],el=[],er=[],es=[],eo=[],ed=[],eh=[],ec=[],eu=[],em=[],ep=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;Q=[rg("scrolltoupper")],J=[rg("scrolltolower")],Z=[ry("upper-threshold",!0)],ee=[ry("lower-threshold",!0)],et=[rg("lynxscroll")],ea=[rg("lynxscrollend")],ri(null,null,Q,{kind:"field",name:"#handleScrollUpperThresholdEventEnabled",static:!1,private:!0,access:{has:e=>#z in e,get:e=>e.#z,set:(e,t)=>{e.#z=t}},metadata:e},ei,en),ri(null,null,J,{kind:"field",name:"#handleScrollLowerThresholdEventEnabled",static:!1,private:!0,access:{has:e=>#B in e,get:e=>e.#B,set:(e,t)=>{e.#B=t}},metadata:e},el,er),ri(null,null,Z,{kind:"field",name:"#updateUpperThreshold",static:!1,private:!0,access:{has:e=>#q in e,get:e=>e.#q,set:(e,t)=>{e.#q=t}},metadata:e},es,eo),ri(null,null,ee,{kind:"field",name:"#updateLowerThreshold",static:!1,private:!0,access:{has:e=>#X in e,get:e=>e.#X,set:(e,t)=>{e.#X=t}},metadata:e},ed,eh),ri(null,null,et,{kind:"field",name:"#handleScrollEventEnabled",static:!1,private:!0,access:{has:e=>#K in e,get:e=>e.#K,set:(e,t)=>{e.#K=t}},metadata:e},ec,eu),ri(null,null,ea,{kind:"field",name:"#handleScrollEndEventEnabled",static:!1,private:!0,access:{has:e=>#G in e,get:e=>e.#G,set:(e,t)=>{e.#G=t}},metadata:e},em,ep),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}#L;#Y;#Q=0;#J=0;constructor(e){rn(this,ep),this.#L=e}#Z=()=>this.#L;#ee=rS(()=>this.#L.shadowRoot,"#upper-threshold-observer");#et=rS(()=>this.#L.shadowRoot,"#lower-threshold-observer");#ea=e=>{let{isIntersecting:t,target:a}=e[0],i=a.id;t&&("upper-threshold-observer"===i?this.#L.dispatchEvent(new CustomEvent("scrolltoupper",{...rc,detail:this.#ei()})):"lower-threshold-observer"===i&&this.#L.dispatchEvent(new CustomEvent("scrolltolower",{...rc,detail:this.#ei()})))};static observedAttributes=["upper-threshold","lower-threshold"];#z=rn(this,ei,e=>{e?this.#L.setAttribute("x-enable-scrolltoupper-event",""):this.#L.removeAttribute("x-enable-scrolltoupper-event"),this.#en(e)});#en=(rn(this,en),rT(this.#Z,this.#ee,this.#ea));#B=rn(this,el,e=>{e?this.#L.setAttribute("x-enable-scrolltolower-event",""):this.#L.removeAttribute("x-enable-scrolltolower-event"),this.#el(e)});#el=(rn(this,er),rT(this.#Z,this.#et,this.#ea));#q=rn(this,es,rw(this.#ee,"flex-basis",e=>`${parseInt(e)}px`));#X=(rn(this,eo),rn(this,ed,rw(this.#et,"flex-basis",e=>`${parseInt(e)}px`)));#ei(){let{scrollTop:e,scrollLeft:t,scrollHeight:a,scrollWidth:i}=this.#Z();0===e&&(e-=this.#L.scrollHeight/2-this.#L.scrollTop),0===t&&(t-=this.#L.scrollWidth/2-this.#L.scrollLeft);let n={scrollTop:e,scrollLeft:t,scrollHeight:a,scrollWidth:i,isDragging:!1,deltaX:t-this.#Q,deltaY:e-this.#J};return this.#Q=t,this.#J=e,n}#er=(rn(this,eh),()=>{this.#es&&!ru&&(clearTimeout(this.#Y),this.#Y=setTimeout(()=>{this.#eo()},100)),this.#L.dispatchEvent(new CustomEvent("lynxscroll",{...rc,detail:this.#ei()}))});#eo=()=>{this.#L.dispatchEvent(new CustomEvent("lynxscrollend",{...rc,detail:this.#ei()}))};#ed=!1;#K=rn(this,ec,e=>{this.#ed=e,this.#eh()});#es=(rn(this,eu),!1);#G=rn(this,em,e=>{this.#es=e,this.#eh()});#eh(){this.#ed||this.#es?(this.#Z().addEventListener("scroll",this.#er),this.#Z().addEventListener("scrollend",this.#eo),this.#L.addEventListener("scroll",this.#er),this.#L.addEventListener("scrollend",this.#eo),this.#Q=0,this.#J=0):(this.#L.removeEventListener("scroll",this.#er),this.#L.removeEventListener("scrollend",this.#eo))}connectedCallback(){}dispose(){}});class rI{static eventName="__scrollIntoView";static observedAttributes=[];#L;#ec=e=>{e.stopPropagation();let t=e.composedPath().filter(e=>e instanceof HTMLElement),a=[],i=this.#L;for(let e of t){if(e===i)break;a.push(e)}let n=this.#L.getAttribute("scroll-orientation"),l=null!==this.#L.getAttribute("scroll-x")||"both"===n||"horizontal"===n,r=null!==this.#L.getAttribute("scroll-y")||"both"===n||"vertical"===n,s=0,o=0;for(let{offsetTop:e,offsetLeft:t}of a)l&&(o+=t),r&&(s+=e);if(l)switch(e.detail.inline){case"center":o+=(e.target.clientWidth-this.#L.clientWidth)/2;break;case"end":o+=e.target.clientWidth-this.#L.clientWidth}if(r)switch(e.detail.block){case"center":s+=(e.target.clientHeight-this.#L.clientHeight)/2;break;case"end":s+=e.target.clientHeight-this.#L.clientHeight}i.scrollTo({behavior:"smooth"===e.detail.behavior?"smooth":"instant",left:o,top:s})};constructor(e){this.#L=e,this.#L.addEventListener(rI.eventName,this.#ec,{passive:!1})}dispose(){this.#L.removeEventListener(rI.eventName,this.#ec)}}let rL=(e,...t)=>String.raw({raw:e},...t);function r_(e,t,a){return function(i){a&&(i=a(i));let n=e.call(this);n.getAttribute(t)!==i&&(null!==i?ro(()=>{n.setAttribute(t,i)}):ro(()=>{n.removeAttribute(t)}))}}eb=[rd("scroll-view",[rf,rx,rC,rO,rI],rL` <style>
|
|
16
7
|
.placeholder-dom {
|
|
17
8
|
display: none;
|
|
18
9
|
flex: 0 0 0;
|
|
@@ -94,7 +85,7 @@
|
|
|
94
85
|
class="mask placeholder-dom"
|
|
95
86
|
id="bot-fade-mask"
|
|
96
87
|
part="bot-fade-mask"
|
|
97
|
-
></div>`)],ef=[],ey=HTMLElement,a=class extends ey{static{eg=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(ey[Symbol.metadata]??null):void 0;ri(null,ev={value:eg},eb,{kind:"class",name:eg.name,metadata:e},null,ef),a=eg=ev.value,e&&Object.defineProperty(eg,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static notToFilterFalseAttributes=new Set(["enable-scroll"]);static scrollInterval=100;#eu;scrollTo(...e){let t;if("string"==typeof e[0].offset){let a=parseFloat(e[0].offset);t={left:a,top:a}}else"number"==typeof e[0].offset&&(t={left:e[0].offset,top:e[0].offset});if("number"==typeof e[0].index){let a=e[0].index;if(0===a)this.scrollTop=0,this.scrollLeft=0;else if(a>0&&a<this.childElementCount){let e=this.children.item(a);e instanceof HTMLElement&&(t=t?{left:e.offsetLeft+t.left,top:e.offsetTop+t.top}:{left:e.offsetLeft,top:e.offsetTop})}}t?this.scrollTo({...t,behavior:e[0].smooth?"smooth":"auto"}):super.scrollTo(...e)}autoScroll(e){if(clearInterval(this.#eu),e.start){let t=("number"==typeof e.rate?e.rate:parseFloat(e.rate))*a.scrollInterval/1e3;this.#eu=setInterval(e=>{e.scrollBy({left:t,top:t,behavior:"smooth"})},a.scrollInterval,this)}}get[rp](){return this}static{rn(eg,ef)}},a=eg;let rk=Symbol("__src"),rA=Symbol("__src"),rM={loadstart:{code:0,type:"init"},canplay:{code:1,type:"playable"},stalled:{code:2,type:"stalled"},error:{code:3,type:"error"}},rP={stop:{code:0,type:"stopped"},play:{code:1,type:"playing"},pause:{code:2,type:"paused"}},rR=e=>e?e.paused?2*!e.ended:e.currentTime>0?1:3:-1;(i=e||(e={}))[i.SrcError=-1]="SrcError",i[i.SrcJsonError=-2]="SrcJsonError",i[i.DownloadError=-3]="DownloadError",i[i.PlayerFinishedError=-4]="PlayerFinishedError",i[i.PlayerLoadingError=-5]="PlayerLoadingError",i[i.PlayerPlaybackError=-6]="PlayerPlaybackError";let rD=(eT=[],eO=[],eL=[],class{static{let t="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;eE=[ry("src",!0)],ew=[ry("loop",!0)],eC=[ry("pause-on-hide",!0)],ri(this,eS={value:rl(function(t){let a;try{a=JSON.parse(t||"")||{}}catch(e){console.error(`JSON.parse src error: ${e}`),a={}}null===t?this.#I.dispatchEvent(new CustomEvent("error",{...rc,detail:{code:e.SrcError,msg:"",from:"res loader",currentSrcID:this.#I[rk]?.id}})):(a?.id===void 0||a?.play_url===void 0)&&this.#I.dispatchEvent(new CustomEvent("error",{...rc,detail:{code:e.SrcJsonError,msg:"",from:"res loader",currentSrcID:this.#I[rk]?.id}})),this.#I[rk]=a,this.#I[rA]=void 0,this.#I.stop()},"#handleSrc")},eE,{kind:"method",name:"#handleSrc",static:!1,private:!0,access:{has:e=>#em in e,get:e=>e.#em},metadata:t},null,eT),ri(this,ex={value:rl(function(e){null!==e?document.addEventListener("visibilitychange",this.#ep,{passive:!0}):document.removeEventListener("visibilitychange",this.#ep)},"#handlePauseOnHide")},eC,{kind:"method",name:"#handlePauseOnHide",static:!1,private:!0,access:{has:e=>#ev in e,get:e=>e.#ev},metadata:t},null,eT),ri(null,null,ew,{kind:"field",name:"#handleLoop",static:!1,private:!0,access:{has:e=>#eg in e,get:e=>e.#eg,set:(e,t)=>{e.#eg=t}},metadata:t},eO,eL),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}static observedAttributes=["src","loop","pause-on-hide"];#I=rn(this,eT);#eb=rS(()=>this.#I.shadowRoot,"#audio");#ef=r_(this.#eb,"src");get #em(){return eS.value}#eg=rn(this,eO,r_(this.#eb,"loop"));#ep=(rn(this,eL),()=>{"hidden"===document.visibilityState&&this.#I.pause()});get #ev(){return ex.value}constructor(e){this.#I=e}});class rN{static observedAttributes=[];#I;#ey;#eb=rS(()=>this.#I.shadowRoot,"#audio");#eE=e=>{let t=Number(this.#I.getAttribute("interval")),a=Number.isNaN(t)?0:t;this.#ey=setInterval(()=>{this.#I.dispatchEvent(new CustomEvent("timeupdate",{...rc,detail:{currentTime:this.#eb().currentTime,currentSrcID:this.#I[rk]?.id}}))},a);let i=rP[e.type];this.#I.dispatchEvent(new CustomEvent("playbackstatechanged",{...rc,detail:{code:i?.code,type:i?.type,currentSrcID:this.#I[rk]?.id}}))};#eS=e=>{clearInterval(this.#ey);let t=rP[e.type];this.#I.dispatchEvent(new CustomEvent("playbackstatechanged",{...rc,detail:{code:t?.code,type:t?.type,currentSrcID:this.#I[rk]?.id}}))};#ew=e=>{let t=rM[e.type];this.#I.dispatchEvent(new CustomEvent("loadingstatechanged",{...rc,detail:{code:t?.code,type:t?.type,currentSrcID:this.#I[rk]?.id}}))};#eC=t=>{this.#ew(t);let a=t.target?.error?.code,i=a===MediaError.MEDIA_ERR_DECODE?e.PlayerLoadingError:e.PlayerPlaybackError;a===MediaError.MEDIA_ERR_DECODE&&(i=e.PlayerLoadingError),this.#I.dispatchEvent(new CustomEvent("error",{...rc,detail:{code:i,msg:"",from:"player",currentSrcID:this.#I[rk]?.id}}))};#ex=()=>{let e=null!==this.#I.getAttribute("loop");this.#I.dispatchEvent(new CustomEvent("finished",{...rc,detail:{loop:e,currentSrcID:this.#I[rk]?.id}}))};constructor(e){this.#I=e}connectedCallback(){let e=this.#eb();e.addEventListener("play",this.#eE,{passive:!0}),e.addEventListener("pause",this.#eS,{passive:!0}),e.addEventListener("ended",this.#ex,{passive:!0}),e.addEventListener("loadstart",this.#ew,{passive:!0}),e.addEventListener("canplay",this.#ew,{passive:!0}),e.addEventListener("stalled",this.#ew,{passive:!0}),e.addEventListener("error",this.#eC,{passive:!0})}}ek=[rd("x-audio-tt",[rf,rD,rN],rI`<audio id="audio"></audio>`)],eA=[],eM=HTMLElement,(class extends eM{static{e_=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(eM[Symbol.metadata]??null):void 0;ri(null,eI={value:e_},ek,{kind:"class",name:e_.name,metadata:e},null,eA),e_=eI.value,e&&Object.defineProperty(e_,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),rn(e_,eA)}#eT=rS(()=>this.shadowRoot,"#audio");#eb=rS(()=>this.shadowRoot,"#audio");#ef=r_(this.#eb,"src");[rk];[rA];#eO=()=>{let t,a=this[rk];if(a&&a.id&&a.play_url){try{t=JSON.parse(this.getAttribute("headers")||"{}")||{}}catch(e){console.error(`JSON.parse headers error: ${e}`),t={}}this[rA]=new Promise(async(i,n)=>{this.dispatchEvent(new CustomEvent("srcloadingstatechanged",{...rc,detail:{code:0,type:"loading",currentSrcID:a.id}}));let l=await fetch(a.play_url,{headers:t});l.ok||(this.dispatchEvent(new CustomEvent("error",{...rc,detail:{code:e.DownloadError,msg:"",from:"res loader",currentSrcID:a.id}})),n()),this.dispatchEvent(new CustomEvent("srcloadingstatechanged",{...rc,detail:{code:1,type:"success",currentSrcID:a.id}}));let r=await l.blob(),s=URL.createObjectURL(r);this.#ef(s),i()})}};play(){return this[rA]||this.#eO(),this[rA]?.then(()=>{let e=this.#eT();e.currentTime=0,e.play()}),{currentSrcID:this[rk]?.id,loadingSrcID:""}}stop(){let e=this.#eT(),t=rP.stop;return this.dispatchEvent(new CustomEvent("playbackstatechanged",{...rc,detail:{code:t?.code,type:t?.type,currentSrcID:this[rk]?.id}})),e.currentTime=0,e.pause(),{currentSrcID:this[rk]?.id}}pause(){return this.#eT().pause(),{currentSrcID:this[rk]?.id}}resume(){return this.#eT().play(),{currentSrcID:this[rk]?.id,loadingSrcID:""}}seek(e){return this.#eT().currentTime=(e.currentTime||0)/1e3,this.dispatchEvent(new CustomEvent("seek",{...rc,detail:{seekresult:1,currentSrcID:this[rk]?.id}})),{currentSrcID:this[rk]?.id}}mute(e){return this.#eT().muted=e.mute,{currentSrcID:this[rk]?.id}}playerInfo(){let e=this.#eT(),t=e.buffered,a=t.end(t.length-1);return{currentSrcID:this[rk]?.id,duration:1e3*e.duration,playbackState:rR(e),currentTime:e.currentTime,cacheTime:a}}prepare(){this[rA]||this.#eO()}setVolume(e){return this.#eT().volume=e.volume,{code:1}}}),ez=[rd("x-canvas",[rf,(eN=[],eF=[],eH=[],ej=[],e$=[],eU=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;eP=[ry("name",!0)],eR=[ry("height",!0)],eD=[ry("height",!0)],ri(null,null,eP,{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},eN,eF),ri(null,null,eR,{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},eH,ej),ri(null,null,eD,{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},e$,eU),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["name","height","width"];#I;#F;#eL=rS(()=>this.#I.shadowRoot,"#canvas");constructor(e){this.#I=e}handleName=rn(this,eN,r_(this.#eL,"name"));handleHeight=(rn(this,eF),rn(this,eH,r_(this.#eL,"height")));handleWidth=(rn(this,ej),rn(this,e$,r_(this.#eL,"width")));#eI=(rn(this,eU),e=>{let{contentRect:t}=e[0],a=this.#I.shadowRoot.firstElementChild;if(a){let{height:e,width:i}=t;e*=window.devicePixelRatio,i*=window.devicePixelRatio;let n=new CustomEvent("resize",{...rc,detail:{height:e,width:i}});n.height=e,n.width=i,a.dispatchEvent(n)}});#e_(){this.#F||(this.#F=new ResizeObserver(this.#eI),this.#F.observe(this.#I))}#ek(){this.#F?.disconnect(),this.#F=void 0}connectedCallback(){this.#e_()}dispose(){this.#ek()}})],rI`<canvas id="canvas" part="canvas"></canvas>`)],eB=[],eq=HTMLElement,class extends eq{static{eW=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(eq[Symbol.metadata]??null):void 0;ri(null,eV={value:eW},ez,{kind:"class",name:eW.name,metadata:e},null,eB),eW=eV.value,e&&Object.defineProperty(eW,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),rn(eW,eB)}};let rF=(eQ=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;eX=[ry("granularity",!0)],eG=[rg("offset")],ri(this,eK={value:rl(function(e){e&&""!==e?this.#eA=parseFloat(e):this.#eA=.01},"#handleGranularity")},eX,{kind:"method",name:"#handleGranularity",static:!1,private:!0,access:{has:e=>#eM in e,get:e=>e.#eM},metadata:e},null,eQ),ri(this,eY={value:rl(function(e){e?this.#I.addEventListener("scroll",this.#er,{passive:!0}):this.#I.removeEventListener("scroll",this.#er)},"#enableOffsetEvent")},eG,{kind:"method",name:"#enableOffsetEvent",static:!1,private:!0,access:{has:e=>#eP in e,get:e=>e.#eP},metadata:e},null,eQ),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}#I=rn(this,eQ);#eA=.01;#eR=0;constructor(e){this.#I=e}static observedAttributes=["granularity"];get #eM(){return eK.value}get #eP(){return eY.value}#er=()=>{let e=this.#I.scrollTop;(Math.abs(this.#eR-e)>this.#eA||0===this.#I.scrollTop||1>=Math.abs(this.#I.scrollHeight-this.#I.clientHeight-this.#I.scrollTop))&&(this.#eR=e,this.#I.dispatchEvent(new CustomEvent("offset",{...rc,detail:{offset:e,height:this.#I[rH]}})))}}),rH=Symbol("scrollableLength"),rj=Symbol("isHeaderShowing"),r$=Symbol("resizeObserver"),rU=Symbol("slotKid");e0=[rd("x-foldview-ng",[rf,rF])],e1=[],e2=HTMLElement,(class extends e2{static{eZ=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(e2[Symbol.metadata]??null):void 0;ri(null,eJ={value:eZ},e0,{kind:"class",name:eZ.name,metadata:e},null,e1),eZ=eJ.value,e&&Object.defineProperty(eZ,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static notToFilterFalseAttributes=new Set(["scroll-enable"]);[rU];[r$]=new ResizeObserver(e=>{for(let t of e)"X-FOLDVIEW-HEADER-NG"===t.target.tagName?this.#eD=t.contentRect.height:"X-FOLDVIEW-TOOLBAR-NG"===t.target.tagName&&(this.#eN=t.contentRect.height);this[rU]&&(this[rU].style.top=`${this.#eD-this.#eN}px`)});#eD=0;#eN=0;get[rH](){return this.#eD-this.#eN}get[rj](){return this[rH]-this.scrollTop>=1}get scrollTop(){return super.scrollTop}set scrollTop(e){e>this[rH]?e=this[rH]:e<0&&(e=0),super.scrollTop=e}setFoldExpanded(e){let{offset:t,smooth:a=!0}=e,i=parseFloat(t);this.scrollTo({top:i,behavior:a?"smooth":"instant"})}get[rp](){return this}disconnectedCallback(){this[r$]?.disconnect(),this[r$]=void 0}static{rn(eZ,e1)}}),e4=[rd("x-foldview-header-ng",[rf])],e5=[],e7=HTMLElement,(class extends e7{static{e8=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(e7[Symbol.metadata]??null):void 0;ri(null,e3={value:e8},e4,{kind:"class",name:e8.name,metadata:e},null,e5),e8=e3.value,e&&Object.defineProperty(e8,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),rn(e8,e5)}connectedCallback(){this.parentElement?.[r$]?.observe(this)}dispose(){this.parentElement?.[r$]?.unobserve(this)}}),te=[rd("x-foldivew-slot-drag-ng",[rf])],tt=[],ta=HTMLElement,class extends ta{static{e9=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(ta[Symbol.metadata]??null):void 0;ri(null,e6={value:e9},te,{kind:"class",name:e9.name,metadata:e},null,tt),e9=e6.value,e&&Object.defineProperty(e9,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),rn(e9,tt)}};class rV{#eF=0;#eH=new WeakMap;#ej;#e$=0;#eU=0;#eV=null;#eW;#ez=0;#I;static observedAttributes=[];constructor(e){this.#I=e,this.#I.addEventListener("touchmove",this.#eB,{passive:!1}),this.#I.addEventListener("touchstart",this.#eq,{passive:!0}),this.#I.addEventListener("touchend",this.#eX,{passive:!0})}#eK(e){return this.#ej?.find(t=>{if(t.scrollHeight>t.clientHeight){let a=e<0&&0!==t.scrollTop,i=e>0&&Math.abs(t.scrollHeight-t.clientHeight-t.scrollTop)>1;return a||i}return!1})}#eG(e,t){let a=this.#eH.get(e)??0;a+=t,this.#eH.set(e,a),e.scrollTop=a}#eB=e=>{let t=this.#eY(),{pageY:a,pageX:i}=e.touches.item(0),n=this.#e$-a;if(null===this.#eV){let e=this.#eU-i;this.#eV=Math.abs(n)>Math.abs(e)}if(!1===this.#eV)return;let l=this.#eK(n);t&&(e.cancelable&&e.preventDefault(),t[rj]&&n>0||n<0&&!l||!t[rj]&&!l?(t.scrollBy({top:n,behavior:"smooth"}),this.#eF+=n,t.scrollTop=this.#eF,this.#eW=t):l&&(this.#eW=l,this.#eG(l,n))),this.#e$=a,this.#ez=n};#eY(){let e=this.#I.parentElement;if(e&&"X-FOLDVIEW-NG"===e.tagName)return e}#eq=e=>{let{pageX:t,pageY:a}=e.touches.item(0);for(let e of(this.#ej=document.elementsFromPoint(t,a).filter(e=>this.#I.contains(e)),this.#e$=a,this.#eU=t,this.#eF=this.#eY()?.scrollTop??0,this.#ej))this.#eH.set(e,e.scrollTop);this.#eV=null,this.#eW=void 0};#eX=()=>{if(this.#eV=null,this.#eW){let e=this.#eY();(this.#eW!==e||e[rj])&&this.#eW.scrollBy({top:4*this.#ez,behavior:"smooth"})}}}tl=[rd("x-foldview-slot-ng",[rf,rV])],tr=[],ts=HTMLElement,(class extends ts{static{tn=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(ts[Symbol.metadata]??null):void 0;ri(null,ti={value:tn},tl,{kind:"class",name:tn.name,metadata:e},null,tr),tn=ti.value,e&&Object.defineProperty(tn,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),rn(tn,tr)}connectedCallback(){this.matches("x-foldview-ng>x-foldview-slot-ng:first-of-type")&&(this.parentElement[rU]=this)}}),th=[rd("x-foldview-toolbar-ng",[rf])],tc=[],tu=HTMLElement,class extends tu{static{td=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(tu[Symbol.metadata]??null):void 0;ri(null,to={value:td},th,{kind:"class",name:td.name,metadata:e},null,tc),td=to.value,e&&Object.defineProperty(td,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),rn(td,tc)}connectedCallback(){this.parentElement?.[r$]?.observe(this)}dispose(){this.parentElement?.[r$]?.unobserve(this)}};let rW=(ty=[],tE=[],tS=[],tw=[],tC=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;tv=[ry("src",!0)],tg=[ry("placeholder",!0)],tf=[ry("blur-radius",!0)],ri(this,tb={value:rl(function(e){e&&(new Image().src=e)},"#preloadPlaceholder")},tg,{kind:"method",name:"#preloadPlaceholder",static:!1,private:!0,access:{has:e=>#eQ in e,get:e=>e.#eQ},metadata:e},null,ty),ri(null,null,tv,{kind:"field",name:"#handleSrc",static:!1,private:!0,access:{has:e=>#em in e,get:e=>e.#em,set:(e,t)=>{e.#em=t}},metadata:e},tE,tS),ri(null,null,tf,{kind:"field",name:"#handleBlurRadius",static:!1,private:!0,access:{has:e=>#eJ in e,get:e=>e.#eJ,set:(e,t)=>{e.#eJ=t}},metadata:e},tw,tC),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["src","placeholder","blur-radius"];#I=rn(this,ty);#eZ=rS(()=>this.#I.shadowRoot,"#img");#em=rn(this,tE,r_(this.#eZ,"src",e=>e||this.#I.getAttribute("placeholder")));get #eQ(){return tb.value}#eJ=(rn(this,tS),rn(this,tw,rw(this.#eZ,"--blur-radius",void 0,!0)));#e0=(rn(this,tC),()=>{let e=this.#eZ().src,t=this.#I.getAttribute("placeholder");t&&e!==t&&(this.#eZ().src=t)});constructor(e){this.#I=e,this.#eZ().addEventListener("error",this.#e0)}connectedCallback(){(null===this.#I.getAttribute("src")||""===this.#I.getAttribute("src"))&&this.#em(null)}}),rz=(tI=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;tx=[rg("load")],tO=[rg("error")],ri(this,tT={value:rl(function(e){e?this.#eZ().addEventListener("load",this.#e1,{passive:!0}):this.#eZ().removeEventListener("load",this.#e1)},"#enableLoadEvent")},tx,{kind:"method",name:"#enableLoadEvent",static:!1,private:!0,access:{has:e=>#e2 in e,get:e=>e.#e2},metadata:e},null,tI),ri(this,tL={value:rl(function(e){e?this.#eZ().addEventListener("error",this.#e3,{passive:!0}):this.#eZ().removeEventListener("error",this.#e3)},"#enableErrorEvent")},tO,{kind:"method",name:"#enableErrorEvent",static:!1,private:!0,access:{has:e=>#e8 in e,get:e=>e.#e8},metadata:e},null,tI),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=[];#I=rn(this,tI);#eZ=rS(()=>this.#I.shadowRoot,"#img");get #e2(){return tT.value}get #e8(){return tL.value}#e1=()=>{this.#I.dispatchEvent(new CustomEvent("load",{...rc,detail:{width:this.#eZ().naturalWidth,height:this.#eZ().naturalHeight}}))};#e3=()=>{this.#I.dispatchEvent(new CustomEvent("error",{...rc,detail:{}}))};constructor(e){this.#I=e}});tA=[rd("filter-image",[rf,rW,(tm=[],tp=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;ri(null,null,[ry("drop-shadow",!0)],{kind:"field",name:"#handleBlurRadius",static:!1,private:!0,access:{has:e=>#eJ in e,get:e=>e.#eJ,set:(e,t)=>{e.#eJ=t}},metadata:e},tm,tp),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["drop-shadow"];#I;#eZ=rS(()=>this.#I.shadowRoot,"#img");#eJ=rn(this,tm,rw(this.#eZ,"--drop-shadow",void 0,!0));constructor(e){rn(this,tp),this.#I=e}}),rz],rI` <img part="img" alt="" id="img" /> `)],tM=[],tP=HTMLElement,(class extends tP{static{tk=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(tP[Symbol.metadata]??null):void 0;ri(null,t_={value:tk},tA,{kind:"class",name:tk.name,metadata:e},null,tM),tk=t_.value,e&&Object.defineProperty(tk,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),rn(tk,tM)}}),tN=[rd("x-image",[rf,rW,rz],rI` <img part="img" alt="" id="img" /> `)],tF=[],tH=HTMLElement,class extends tH{static{tD=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(tH[Symbol.metadata]??null):void 0;ri(null,tR={value:tD},tN,{kind:"class",name:tD.name,metadata:e},null,tF),tD=tR.value,e&&Object.defineProperty(tD,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),rn(tD,tF)}};let rB={submit:"confirm",blur:"lynxblur",focus:"lynxfocus"};af=[rd("x-input",[rf,(t4=[],t5=[],t7=[],t6=[],t9=[],ae=[],at=[],aa=[],ai=[],an=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;t0=[ry("placeholder",!0)],t1=[ry("placeholder-color",!0)],t2=[ry("placeholder-font-family",!0)],t3=[ry("placeholder-font-size",!0)],t8=[ry("placeholder-font-weight",!0)],ri(null,null,t0,{kind:"field",name:"#handlerPlaceholder",static:!1,private:!0,access:{has:e=>#e4 in e,get:e=>e.#e4,set:(e,t)=>{e.#e4=t}},metadata:e},t4,t5),ri(null,null,t1,{kind:"field",name:"#handlerPlaceholderColor",static:!1,private:!0,access:{has:e=>#e5 in e,get:e=>e.#e5,set:(e,t)=>{e.#e5=t}},metadata:e},t7,t6),ri(null,null,t2,{kind:"field",name:"#handlerPlaceholderFontFamily",static:!1,private:!0,access:{has:e=>#e7 in e,get:e=>e.#e7,set:(e,t)=>{e.#e7=t}},metadata:e},t9,ae),ri(null,null,t3,{kind:"field",name:"#handlerPlaceholderFontSize",static:!1,private:!0,access:{has:e=>#e6 in e,get:e=>e.#e6,set:(e,t)=>{e.#e6=t}},metadata:e},at,aa),ri(null,null,t8,{kind:"field",name:"#handlerPlaceholderFontWeight",static:!1,private:!0,access:{has:e=>#e9 in e,get:e=>e.#e9,set:(e,t)=>{e.#e9=t}},metadata:e},ai,an),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"];#I;#te=rS(()=>this.#I.shadowRoot,"#input");#e4=rn(this,t4,r_(this.#te,"placeholder"));#e5=(rn(this,t5),rn(this,t7,rw(this.#te,"--placeholder-color",void 0,!0)));#e7=(rn(this,t6),rn(this,t9,rw(this.#te,"--placeholder-font-family",void 0,!0)));#e6=(rn(this,ae),rn(this,at,rw(this.#te,"--placeholder-font-size",void 0,!0)));#e9=(rn(this,aa),rn(this,ai,rw(this.#te,"--placeholder-font-weight",void 0,!0)));constructor(e){rn(this,an),this.#I=e}}),(ao=[],ad=[],ah=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;al=[ry("value",!1)],as=[ry("disabled",!0)],ri(this,ar={value:rl(function(e){if(e){let t=parseFloat(this.#I.getAttribute("maxlength")??"");isNaN(t)||(e=e.substring(0,t))}else e="";let t=this.#te();t.value!==e&&(t.value=e)},"#handleValue")},al,{kind:"method",name:"#handleValue",static:!1,private:!0,access:{has:e=>#tt in e,get:e=>e.#tt},metadata:e},null,ao),ri(null,null,as,{kind:"field",name:"#handleDisabled",static:!1,private:!0,access:{has:e=>#ta in e,get:e=>e.#ta,set:(e,t)=>{e.#ta=t}},metadata:e},ad,ah),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["value","disabled"];#I=rn(this,ao);#te=rS(()=>this.#I.shadowRoot,"#input");get #tt(){return ar.value}#ta=rn(this,ad,r_(this.#te,"disabled",e=>null!==e?"":null));constructor(e){rn(this,ah),this.#I=e}}),(tB=[],tq=[],tX=[],tK=[],tG=[],tY=[],tQ=[],tJ=[],tZ=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;tj=[ry("confirm-type",!0)],t$=[ry("maxlength",!0)],tU=[ry("readonly",!0)],tV=[ry("type",!0)],tz=[ry("ios-spell-check",!0),ry("spell-check",!0)],ri(this,tW={value:rl(function(e){let t="text",a="text";"digit"===e?t="numeric":"number"===e?t="decimal":"email"===e?t="email":"tel"===e?t="tel":a=e,this.#ti(t),this.#tn(a)},"#handleType")},tV,{kind:"method",name:"#handleType",static:!1,private:!0,access:{has:e=>#tl in e,get:e=>e.#tl},metadata:e},null,tB),ri(null,null,tj,{kind:"field",name:"#handlerConfirmType",static:!1,private:!0,access:{has:e=>#tr in e,get:e=>e.#tr,set:(e,t)=>{e.#tr=t}},metadata:e},tq,tX),ri(null,null,t$,{kind:"field",name:"#handlerMaxlength",static:!1,private:!0,access:{has:e=>#ts in e,get:e=>e.#ts,set:(e,t)=>{e.#ts=t}},metadata:e},tK,tG),ri(null,null,tU,{kind:"field",name:"#handleReadonly",static:!1,private:!0,access:{has:e=>#to in e,get:e=>e.#to,set:(e,t)=>{e.#to=t}},metadata:e},tY,tQ),ri(null,null,tz,{kind:"field",name:"#handleSpellCheck",static:!1,private:!0,access:{has:e=>#td in e,get:e=>e.#td,set:(e,t)=>{e.#td=t}},metadata:e},tJ,tZ),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"];#I=rn(this,tB);#th="text";#te=rS(()=>this.#I.shadowRoot,"#input");#tr=rn(this,tq,r_(this.#te,"enterkeyhint",e=>null===e?"send":e));#ts=(rn(this,tX),rn(this,tK,r_(this.#te,"maxlength",e=>null===e?"140":e)));#to=(rn(this,tG),rn(this,tY,r_(this.#te,"readonly",e=>null!==e?"":null)));#tn=(rn(this,tQ),r_(this.#te,"type"));#ti=r_(this.#te,"inputmode");get #tl(){return tW.value}#td=rn(this,tJ,r_(this.#te,"spellcheck",e=>null===e?"false":"true"));constructor(e){rn(this,tZ),this.#I=e}}),(av=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;ac=[rg("input")],am=[ry("send-composing-input",!0)],ri(this,au={value:rl(function(e){let t=this.#te();e?(t.addEventListener("input",this.#tc,{passive:!0}),t.addEventListener("compositionend",this.#tu,{passive:!0})):(t.removeEventListener("input",this.#tc),t.removeEventListener("compositionend",this.#tu))},"#handleEnableConfirmEvent")},ac,{kind:"method",name:"#handleEnableConfirmEvent",static:!1,private:!0,access:{has:e=>#tm in e,get:e=>e.#tm},metadata:e},null,av),ri(this,ap={value:rl(function(e){this.#tp=null!==e},"#handleSendComposingInput")},am,{kind:"method",name:"#handleSendComposingInput",static:!1,private:!0,access:{has:e=>#tv in e,get:e=>e.#tv},metadata:e},null,av),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["send-composing-input"];#I=rn(this,av);#tp=!1;#te=rS(()=>this.#I.shadowRoot,"#input");#tg=rS(()=>this.#I.shadowRoot,"#form");get #tm(){return au.value}get #tv(){return ap.value}#tb=e=>{let t=rB[e.type]??e.type;this.#I.dispatchEvent(new CustomEvent(t,{...rc,detail:{value:this.#te().value}}))};#tc=e=>{let t=this.#te(),a=t.value,i=e.isComposing;(!i||this.#tp)&&this.#I.dispatchEvent(new CustomEvent("input",{...rc,detail:{value:a,textLength:a.length,cursor:t.selectionStart,isComposing:i}}))};#tu=()=>{let e=this.#te(),t=e.value;this.#tp||this.#I.dispatchEvent(new CustomEvent("input",{...rc,detail:{value:t,textLength:t.length,cursor:e.selectionStart}}))};#tf=e=>{e.target===this.#te()&&"number"==typeof e.detail&&e.stopImmediatePropagation()};constructor(e){this.#I=e;let t=this.#te(),a=this.#tg();t.addEventListener("blur",this.#tb,{passive:!0}),t.addEventListener("focus",this.#tb,{passive:!0}),a.addEventListener("submit",this.#tb,{passive:!0}),a.addEventListener("input",this.#tf,{passive:!0})}})],rI` <style>
|
|
88
|
+
></div>`)],ef=[],ey=HTMLElement,a=class extends ey{static{eg=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(ey[Symbol.metadata]??null):void 0;ri(null,ev={value:eg},eb,{kind:"class",name:eg.name,metadata:e},null,ef),a=eg=ev.value,e&&Object.defineProperty(eg,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static notToFilterFalseAttributes=new Set(["enable-scroll"]);static scrollInterval=100;#eu;scrollTo(...e){let t;if("string"==typeof e[0].offset){let a=parseFloat(e[0].offset);t={left:a,top:a}}else"number"==typeof e[0].offset&&(t={left:e[0].offset,top:e[0].offset});if("number"==typeof e[0].index){let a=e[0].index;if(0===a)this.scrollTop=0,this.scrollLeft=0;else if(a>0&&a<this.childElementCount){let e=this.children.item(a);e instanceof HTMLElement&&(t=t?{left:e.offsetLeft+t.left,top:e.offsetTop+t.top}:{left:e.offsetLeft,top:e.offsetTop})}}t?this.scrollTo({...t,behavior:e[0].smooth?"smooth":"auto"}):super.scrollTo(...e)}autoScroll(e){if(clearInterval(this.#eu),e.start){let t=("number"==typeof e.rate?e.rate:parseFloat(e.rate))*a.scrollInterval/1e3;this.#eu=setInterval(e=>{e.scrollBy({left:t,top:t,behavior:"smooth"})},a.scrollInterval,this)}}get[rp](){return this}static{rn(eg,ef)}},a=eg;let rk=Symbol("__src"),rA=Symbol("__src"),rM={loadstart:{code:0,type:"init"},canplay:{code:1,type:"playable"},stalled:{code:2,type:"stalled"},error:{code:3,type:"error"}},rP={stop:{code:0,type:"stopped"},play:{code:1,type:"playing"},pause:{code:2,type:"paused"}},rR=e=>e?e.paused?2*!e.ended:e.currentTime>0?1:3:-1;(i=e||(e={}))[i.SrcError=-1]="SrcError",i[i.SrcJsonError=-2]="SrcJsonError",i[i.DownloadError=-3]="DownloadError",i[i.PlayerFinishedError=-4]="PlayerFinishedError",i[i.PlayerLoadingError=-5]="PlayerLoadingError",i[i.PlayerPlaybackError=-6]="PlayerPlaybackError";let rD=(eT=[],eO=[],eI=[],class{static{let t="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;eE=[ry("src",!0)],ew=[ry("loop",!0)],eC=[ry("pause-on-hide",!0)],ri(this,eS={value:rl(function(t){let a;try{a=JSON.parse(t||"")||{}}catch(e){console.error(`JSON.parse src error: ${e}`),a={}}null===t?this.#L.dispatchEvent(new CustomEvent("error",{...rc,detail:{code:e.SrcError,msg:"",from:"res loader",currentSrcID:this.#L[rk]?.id}})):(a?.id===void 0||a?.play_url===void 0)&&this.#L.dispatchEvent(new CustomEvent("error",{...rc,detail:{code:e.SrcJsonError,msg:"",from:"res loader",currentSrcID:this.#L[rk]?.id}})),this.#L[rk]=a,this.#L[rA]=void 0,this.#L.stop()},"#handleSrc")},eE,{kind:"method",name:"#handleSrc",static:!1,private:!0,access:{has:e=>#em in e,get:e=>e.#em},metadata:t},null,eT),ri(this,ex={value:rl(function(e){null!==e?document.addEventListener("visibilitychange",this.#ep,{passive:!0}):document.removeEventListener("visibilitychange",this.#ep)},"#handlePauseOnHide")},eC,{kind:"method",name:"#handlePauseOnHide",static:!1,private:!0,access:{has:e=>#ev in e,get:e=>e.#ev},metadata:t},null,eT),ri(null,null,ew,{kind:"field",name:"#handleLoop",static:!1,private:!0,access:{has:e=>#eg in e,get:e=>e.#eg,set:(e,t)=>{e.#eg=t}},metadata:t},eO,eI),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}static observedAttributes=["src","loop","pause-on-hide"];#L=rn(this,eT);#eb=rS(()=>this.#L.shadowRoot,"#audio");#ef=r_(this.#eb,"src");get #em(){return eS.value}#eg=rn(this,eO,r_(this.#eb,"loop"));#ep=(rn(this,eI),()=>{"hidden"===document.visibilityState&&this.#L.pause()});get #ev(){return ex.value}constructor(e){this.#L=e}});class rN{static observedAttributes=[];#L;#ey;#eb=rS(()=>this.#L.shadowRoot,"#audio");#eE=e=>{let t=Number(this.#L.getAttribute("interval")),a=Number.isNaN(t)?0:t;this.#ey=setInterval(()=>{this.#L.dispatchEvent(new CustomEvent("timeupdate",{...rc,detail:{currentTime:this.#eb().currentTime,currentSrcID:this.#L[rk]?.id}}))},a);let i=rP[e.type];this.#L.dispatchEvent(new CustomEvent("playbackstatechanged",{...rc,detail:{code:i?.code,type:i?.type,currentSrcID:this.#L[rk]?.id}}))};#eS=e=>{clearInterval(this.#ey);let t=rP[e.type];this.#L.dispatchEvent(new CustomEvent("playbackstatechanged",{...rc,detail:{code:t?.code,type:t?.type,currentSrcID:this.#L[rk]?.id}}))};#ew=e=>{let t=rM[e.type];this.#L.dispatchEvent(new CustomEvent("loadingstatechanged",{...rc,detail:{code:t?.code,type:t?.type,currentSrcID:this.#L[rk]?.id}}))};#eC=t=>{this.#ew(t);let a=t.target?.error?.code,i=a===MediaError.MEDIA_ERR_DECODE?e.PlayerLoadingError:e.PlayerPlaybackError;a===MediaError.MEDIA_ERR_DECODE&&(i=e.PlayerLoadingError),this.#L.dispatchEvent(new CustomEvent("error",{...rc,detail:{code:i,msg:"",from:"player",currentSrcID:this.#L[rk]?.id}}))};#ex=()=>{let e=null!==this.#L.getAttribute("loop");this.#L.dispatchEvent(new CustomEvent("finished",{...rc,detail:{loop:e,currentSrcID:this.#L[rk]?.id}}))};constructor(e){this.#L=e}connectedCallback(){let e=this.#eb();e.addEventListener("play",this.#eE,{passive:!0}),e.addEventListener("pause",this.#eS,{passive:!0}),e.addEventListener("ended",this.#ex,{passive:!0}),e.addEventListener("loadstart",this.#ew,{passive:!0}),e.addEventListener("canplay",this.#ew,{passive:!0}),e.addEventListener("stalled",this.#ew,{passive:!0}),e.addEventListener("error",this.#eC,{passive:!0})}}ek=[rd("x-audio-tt",[rf,rD,rN],rL`<audio id="audio"></audio>`)],eA=[],eM=HTMLElement,(class extends eM{static{e_=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(eM[Symbol.metadata]??null):void 0;ri(null,eL={value:e_},ek,{kind:"class",name:e_.name,metadata:e},null,eA),e_=eL.value,e&&Object.defineProperty(e_,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),rn(e_,eA)}#eT=rS(()=>this.shadowRoot,"#audio");#eb=rS(()=>this.shadowRoot,"#audio");#ef=r_(this.#eb,"src");[rk];[rA];#eO=()=>{let t,a=this[rk];if(a&&a.id&&a.play_url){try{t=JSON.parse(this.getAttribute("headers")||"{}")||{}}catch(e){console.error(`JSON.parse headers error: ${e}`),t={}}this[rA]=new Promise(async(i,n)=>{this.dispatchEvent(new CustomEvent("srcloadingstatechanged",{...rc,detail:{code:0,type:"loading",currentSrcID:a.id}}));let l=await fetch(a.play_url,{headers:t});l.ok||(this.dispatchEvent(new CustomEvent("error",{...rc,detail:{code:e.DownloadError,msg:"",from:"res loader",currentSrcID:a.id}})),n()),this.dispatchEvent(new CustomEvent("srcloadingstatechanged",{...rc,detail:{code:1,type:"success",currentSrcID:a.id}}));let r=await l.blob(),s=URL.createObjectURL(r);this.#ef(s),i()})}};play(){return this[rA]||this.#eO(),this[rA]?.then(()=>{let e=this.#eT();e.currentTime=0,e.play()}),{currentSrcID:this[rk]?.id,loadingSrcID:""}}stop(){let e=this.#eT(),t=rP.stop;return this.dispatchEvent(new CustomEvent("playbackstatechanged",{...rc,detail:{code:t?.code,type:t?.type,currentSrcID:this[rk]?.id}})),e.currentTime=0,e.pause(),{currentSrcID:this[rk]?.id}}pause(){return this.#eT().pause(),{currentSrcID:this[rk]?.id}}resume(){return this.#eT().play(),{currentSrcID:this[rk]?.id,loadingSrcID:""}}seek(e){return this.#eT().currentTime=(e.currentTime||0)/1e3,this.dispatchEvent(new CustomEvent("seek",{...rc,detail:{seekresult:1,currentSrcID:this[rk]?.id}})),{currentSrcID:this[rk]?.id}}mute(e){return this.#eT().muted=e.mute,{currentSrcID:this[rk]?.id}}playerInfo(){let e=this.#eT(),t=e.buffered,a=t.end(t.length-1);return{currentSrcID:this[rk]?.id,duration:1e3*e.duration,playbackState:rR(e),currentTime:e.currentTime,cacheTime:a}}prepare(){this[rA]||this.#eO()}setVolume(e){return this.#eT().volume=e.volume,{code:1}}}),ez=[rd("x-canvas",[rf,(eN=[],eF=[],eH=[],ej=[],e$=[],eU=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;eP=[ry("name",!0)],eR=[ry("height",!0)],eD=[ry("height",!0)],ri(null,null,eP,{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},eN,eF),ri(null,null,eR,{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},eH,ej),ri(null,null,eD,{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},e$,eU),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["name","height","width"];#L;#F;#eI=rS(()=>this.#L.shadowRoot,"#canvas");constructor(e){this.#L=e}handleName=rn(this,eN,r_(this.#eI,"name"));handleHeight=(rn(this,eF),rn(this,eH,r_(this.#eI,"height")));handleWidth=(rn(this,ej),rn(this,e$,r_(this.#eI,"width")));#eL=(rn(this,eU),e=>{let{contentRect:t}=e[0],a=this.#L.shadowRoot.firstElementChild;if(a){let{height:e,width:i}=t;e*=window.devicePixelRatio,i*=window.devicePixelRatio;let n=new CustomEvent("resize",{...rc,detail:{height:e,width:i}});n.height=e,n.width=i,a.dispatchEvent(n)}});#e_(){this.#F||(this.#F=new ResizeObserver(this.#eL),this.#F.observe(this.#L))}#ek(){this.#F?.disconnect(),this.#F=void 0}connectedCallback(){this.#e_()}dispose(){this.#ek()}})],rL`<canvas id="canvas" part="canvas"></canvas>`)],eB=[],eq=HTMLElement,class extends eq{static{eW=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(eq[Symbol.metadata]??null):void 0;ri(null,eV={value:eW},ez,{kind:"class",name:eW.name,metadata:e},null,eB),eW=eV.value,e&&Object.defineProperty(eW,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),rn(eW,eB)}};let rF=(eQ=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;eX=[ry("granularity",!0)],eG=[rg("offset")],ri(this,eK={value:rl(function(e){e&&""!==e?this.#eA=parseFloat(e):this.#eA=.01},"#handleGranularity")},eX,{kind:"method",name:"#handleGranularity",static:!1,private:!0,access:{has:e=>#eM in e,get:e=>e.#eM},metadata:e},null,eQ),ri(this,eY={value:rl(function(e){e?this.#L.addEventListener("scroll",this.#er,{passive:!0}):this.#L.removeEventListener("scroll",this.#er)},"#enableOffsetEvent")},eG,{kind:"method",name:"#enableOffsetEvent",static:!1,private:!0,access:{has:e=>#eP in e,get:e=>e.#eP},metadata:e},null,eQ),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}#L=rn(this,eQ);#eA=.01;#eR=0;constructor(e){this.#L=e}static observedAttributes=["granularity"];get #eM(){return eK.value}get #eP(){return eY.value}#er=()=>{let e=this.#L.scrollTop;(Math.abs(this.#eR-e)>this.#eA||0===this.#L.scrollTop||1>=Math.abs(this.#L.scrollHeight-this.#L.clientHeight-this.#L.scrollTop))&&(this.#eR=e,this.#L.dispatchEvent(new CustomEvent("offset",{...rc,detail:{offset:e,height:this.#L[rH]}})))}}),rH=Symbol("scrollableLength"),rj=Symbol("isHeaderShowing"),r$=Symbol("resizeObserver"),rU=Symbol("slotKid");e0=[rd("x-foldview-ng",[rf,rF])],e1=[],e2=HTMLElement,(class extends e2{static{eZ=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(e2[Symbol.metadata]??null):void 0;ri(null,eJ={value:eZ},e0,{kind:"class",name:eZ.name,metadata:e},null,e1),eZ=eJ.value,e&&Object.defineProperty(eZ,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static notToFilterFalseAttributes=new Set(["scroll-enable"]);[rU];[r$]=new ResizeObserver(e=>{for(let t of e)"X-FOLDVIEW-HEADER-NG"===t.target.tagName?this.#eD=t.contentRect.height:"X-FOLDVIEW-TOOLBAR-NG"===t.target.tagName&&(this.#eN=t.contentRect.height);this[rU]&&(this[rU].style.top=`${this.#eD-this.#eN}px`)});#eD=0;#eN=0;get[rH](){return this.#eD-this.#eN}get[rj](){return this[rH]-this.scrollTop>=1}get scrollTop(){return super.scrollTop}set scrollTop(e){e>this[rH]?e=this[rH]:e<0&&(e=0),super.scrollTop=e}setFoldExpanded(e){let{offset:t,smooth:a=!0}=e,i=parseFloat(t);this.scrollTo({top:i,behavior:a?"smooth":"instant"})}get[rp](){return this}disconnectedCallback(){this[r$]?.disconnect(),this[r$]=void 0}static{rn(eZ,e1)}}),e5=[rd("x-foldview-header-ng",[rf])],e4=[],e6=HTMLElement,(class extends e6{static{e8=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(e6[Symbol.metadata]??null):void 0;ri(null,e3={value:e8},e5,{kind:"class",name:e8.name,metadata:e},null,e4),e8=e3.value,e&&Object.defineProperty(e8,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),rn(e8,e4)}connectedCallback(){this.parentElement?.[r$]?.observe(this)}dispose(){this.parentElement?.[r$]?.unobserve(this)}}),te=[rd("x-foldivew-slot-drag-ng",[rf])],tt=[],ta=HTMLElement,class extends ta{static{e7=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(ta[Symbol.metadata]??null):void 0;ri(null,e9={value:e7},te,{kind:"class",name:e7.name,metadata:e},null,tt),e7=e9.value,e&&Object.defineProperty(e7,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),rn(e7,tt)}};class rV{#eF=0;#eH=new WeakMap;#ej;#e$=0;#eU=0;#eV=null;#eW;#ez=0;#L;static observedAttributes=[];constructor(e){this.#L=e,this.#L.addEventListener("touchmove",this.#eB,{passive:!1}),this.#L.addEventListener("touchstart",this.#eq,{passive:!0}),this.#L.addEventListener("touchend",this.#eX,{passive:!0})}#eK(e){return this.#ej?.find(t=>{if(t.scrollHeight>t.clientHeight){let a=e<0&&0!==t.scrollTop,i=e>0&&Math.abs(t.scrollHeight-t.clientHeight-t.scrollTop)>1;return a||i}return!1})}#eG(e,t){let a=this.#eH.get(e)??0;a+=t,this.#eH.set(e,a),e.scrollTop=a}#eB=e=>{let t=this.#eY(),{pageY:a,pageX:i}=e.touches.item(0),n=this.#e$-a;if(null===this.#eV){let e=this.#eU-i;this.#eV=Math.abs(n)>Math.abs(e)}if(!1===this.#eV)return;let l=this.#eK(n);t&&(e.cancelable&&e.preventDefault(),t[rj]&&n>0||n<0&&!l||!t[rj]&&!l?(t.scrollBy({top:n,behavior:"smooth"}),this.#eF+=n,t.scrollTop=this.#eF,this.#eW=t):l&&(this.#eW=l,this.#eG(l,n))),this.#e$=a,this.#ez=n};#eY(){let e=this.#L.parentElement;if(e&&"X-FOLDVIEW-NG"===e.tagName)return e}#eq=e=>{let{pageX:t,pageY:a}=e.touches.item(0);for(let e of(this.#ej=document.elementsFromPoint(t,a).filter(e=>this.#L.contains(e)),this.#e$=a,this.#eU=t,this.#eF=this.#eY()?.scrollTop??0,this.#ej))this.#eH.set(e,e.scrollTop);this.#eV=null,this.#eW=void 0};#eX=()=>{if(this.#eV=null,this.#eW){let e=this.#eY();(this.#eW!==e||e[rj])&&this.#eW.scrollBy({top:4*this.#ez,behavior:"smooth"})}}}tl=[rd("x-foldview-slot-ng",[rf,rV])],tr=[],ts=HTMLElement,(class extends ts{static{tn=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(ts[Symbol.metadata]??null):void 0;ri(null,ti={value:tn},tl,{kind:"class",name:tn.name,metadata:e},null,tr),tn=ti.value,e&&Object.defineProperty(tn,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),rn(tn,tr)}connectedCallback(){this.matches("x-foldview-ng>x-foldview-slot-ng:first-of-type")&&(this.parentElement[rU]=this)}}),th=[rd("x-foldview-toolbar-ng",[rf])],tc=[],tu=HTMLElement,class extends tu{static{td=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(tu[Symbol.metadata]??null):void 0;ri(null,to={value:td},th,{kind:"class",name:td.name,metadata:e},null,tc),td=to.value,e&&Object.defineProperty(td,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),rn(td,tc)}connectedCallback(){this.parentElement?.[r$]?.observe(this)}dispose(){this.parentElement?.[r$]?.unobserve(this)}};let rW=(ty=[],tE=[],tS=[],tw=[],tC=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;tv=[ry("src",!0)],tg=[ry("placeholder",!0)],tf=[ry("blur-radius",!0)],ri(this,tb={value:rl(function(e){e&&(new Image().src=e)},"#preloadPlaceholder")},tg,{kind:"method",name:"#preloadPlaceholder",static:!1,private:!0,access:{has:e=>#eQ in e,get:e=>e.#eQ},metadata:e},null,ty),ri(null,null,tv,{kind:"field",name:"#handleSrc",static:!1,private:!0,access:{has:e=>#em in e,get:e=>e.#em,set:(e,t)=>{e.#em=t}},metadata:e},tE,tS),ri(null,null,tf,{kind:"field",name:"#handleBlurRadius",static:!1,private:!0,access:{has:e=>#eJ in e,get:e=>e.#eJ,set:(e,t)=>{e.#eJ=t}},metadata:e},tw,tC),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["src","placeholder","blur-radius"];#L=rn(this,ty);#eZ=rS(()=>this.#L.shadowRoot,"#img");#em=rn(this,tE,r_(this.#eZ,"src",e=>e||this.#L.getAttribute("placeholder")));get #eQ(){return tb.value}#eJ=(rn(this,tS),rn(this,tw,rw(this.#eZ,"--blur-radius",void 0,!0)));#e0=(rn(this,tC),()=>{let e=this.#eZ().src,t=this.#L.getAttribute("placeholder");t&&e!==t&&(this.#eZ().src=t)});constructor(e){this.#L=e,this.#eZ().addEventListener("error",this.#e0)}connectedCallback(){(null===this.#L.getAttribute("src")||""===this.#L.getAttribute("src"))&&this.#em(null)}}),rz=(tL=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;tx=[rg("load")],tO=[rg("error")],ri(this,tT={value:rl(function(e){e?this.#eZ().addEventListener("load",this.#e1,{passive:!0}):this.#eZ().removeEventListener("load",this.#e1)},"#enableLoadEvent")},tx,{kind:"method",name:"#enableLoadEvent",static:!1,private:!0,access:{has:e=>#e2 in e,get:e=>e.#e2},metadata:e},null,tL),ri(this,tI={value:rl(function(e){e?this.#eZ().addEventListener("error",this.#e3,{passive:!0}):this.#eZ().removeEventListener("error",this.#e3)},"#enableErrorEvent")},tO,{kind:"method",name:"#enableErrorEvent",static:!1,private:!0,access:{has:e=>#e8 in e,get:e=>e.#e8},metadata:e},null,tL),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=[];#L=rn(this,tL);#eZ=rS(()=>this.#L.shadowRoot,"#img");get #e2(){return tT.value}get #e8(){return tI.value}#e1=()=>{this.#L.dispatchEvent(new CustomEvent("load",{...rc,detail:{width:this.#eZ().naturalWidth,height:this.#eZ().naturalHeight}}))};#e3=()=>{this.#L.dispatchEvent(new CustomEvent("error",{...rc,detail:{}}))};constructor(e){this.#L=e}});tA=[rd("filter-image",[rf,rW,(tm=[],tp=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;ri(null,null,[ry("drop-shadow",!0)],{kind:"field",name:"#handleBlurRadius",static:!1,private:!0,access:{has:e=>#eJ in e,get:e=>e.#eJ,set:(e,t)=>{e.#eJ=t}},metadata:e},tm,tp),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["drop-shadow"];#L;#eZ=rS(()=>this.#L.shadowRoot,"#img");#eJ=rn(this,tm,rw(this.#eZ,"--drop-shadow",void 0,!0));constructor(e){rn(this,tp),this.#L=e}}),rz],rL` <img part="img" alt="" id="img" /> `)],tM=[],tP=HTMLElement,(class extends tP{static{tk=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(tP[Symbol.metadata]??null):void 0;ri(null,t_={value:tk},tA,{kind:"class",name:tk.name,metadata:e},null,tM),tk=t_.value,e&&Object.defineProperty(tk,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),rn(tk,tM)}}),tN=[rd("x-image",[rf,rW,rz],rL` <img part="img" alt="" id="img" /> `)],tF=[],tH=HTMLElement,class extends tH{static{tD=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(tH[Symbol.metadata]??null):void 0;ri(null,tR={value:tD},tN,{kind:"class",name:tD.name,metadata:e},null,tF),tD=tR.value,e&&Object.defineProperty(tD,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),rn(tD,tF)}};let rB={submit:"confirm",blur:"lynxblur",focus:"lynxfocus"};af=[rd("x-input",[rf,(t5=[],t4=[],t6=[],t9=[],t7=[],ae=[],at=[],aa=[],ai=[],an=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;t0=[ry("placeholder",!0)],t1=[ry("placeholder-color",!0)],t2=[ry("placeholder-font-family",!0)],t3=[ry("placeholder-font-size",!0)],t8=[ry("placeholder-font-weight",!0)],ri(null,null,t0,{kind:"field",name:"#handlerPlaceholder",static:!1,private:!0,access:{has:e=>#e5 in e,get:e=>e.#e5,set:(e,t)=>{e.#e5=t}},metadata:e},t5,t4),ri(null,null,t1,{kind:"field",name:"#handlerPlaceholderColor",static:!1,private:!0,access:{has:e=>#e4 in e,get:e=>e.#e4,set:(e,t)=>{e.#e4=t}},metadata:e},t6,t9),ri(null,null,t2,{kind:"field",name:"#handlerPlaceholderFontFamily",static:!1,private:!0,access:{has:e=>#e6 in e,get:e=>e.#e6,set:(e,t)=>{e.#e6=t}},metadata:e},t7,ae),ri(null,null,t3,{kind:"field",name:"#handlerPlaceholderFontSize",static:!1,private:!0,access:{has:e=>#e9 in e,get:e=>e.#e9,set:(e,t)=>{e.#e9=t}},metadata:e},at,aa),ri(null,null,t8,{kind:"field",name:"#handlerPlaceholderFontWeight",static:!1,private:!0,access:{has:e=>#e7 in e,get:e=>e.#e7,set:(e,t)=>{e.#e7=t}},metadata:e},ai,an),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"];#L;#te=rS(()=>this.#L.shadowRoot,"#input");#e5=rn(this,t5,r_(this.#te,"placeholder"));#e4=(rn(this,t4),rn(this,t6,rw(this.#te,"--placeholder-color",void 0,!0)));#e6=(rn(this,t9),rn(this,t7,rw(this.#te,"--placeholder-font-family",void 0,!0)));#e9=(rn(this,ae),rn(this,at,rw(this.#te,"--placeholder-font-size",void 0,!0)));#e7=(rn(this,aa),rn(this,ai,rw(this.#te,"--placeholder-font-weight",void 0,!0)));constructor(e){rn(this,an),this.#L=e}}),(ao=[],ad=[],ah=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;al=[ry("value",!1)],as=[ry("disabled",!0)],ri(this,ar={value:rl(function(e){if(e){let t=parseFloat(this.#L.getAttribute("maxlength")??"");isNaN(t)||(e=e.substring(0,t))}else e="";let t=this.#te();t.value!==e&&(t.value=e)},"#handleValue")},al,{kind:"method",name:"#handleValue",static:!1,private:!0,access:{has:e=>#tt in e,get:e=>e.#tt},metadata:e},null,ao),ri(null,null,as,{kind:"field",name:"#handleDisabled",static:!1,private:!0,access:{has:e=>#ta in e,get:e=>e.#ta,set:(e,t)=>{e.#ta=t}},metadata:e},ad,ah),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["value","disabled"];#L=rn(this,ao);#te=rS(()=>this.#L.shadowRoot,"#input");get #tt(){return ar.value}#ta=rn(this,ad,r_(this.#te,"disabled",e=>null!==e?"":null));constructor(e){rn(this,ah),this.#L=e}}),(tB=[],tq=[],tX=[],tK=[],tG=[],tY=[],tQ=[],tJ=[],tZ=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;tj=[ry("confirm-type",!0)],t$=[ry("maxlength",!0)],tU=[ry("readonly",!0)],tV=[ry("type",!0)],tz=[ry("ios-spell-check",!0),ry("spell-check",!0)],ri(this,tW={value:rl(function(e){let t="text",a="text";"digit"===e?t="numeric":"number"===e?t="decimal":"email"===e?t="email":"tel"===e?t="tel":a=e,this.#ti(t),this.#tn(a)},"#handleType")},tV,{kind:"method",name:"#handleType",static:!1,private:!0,access:{has:e=>#tl in e,get:e=>e.#tl},metadata:e},null,tB),ri(null,null,tj,{kind:"field",name:"#handlerConfirmType",static:!1,private:!0,access:{has:e=>#tr in e,get:e=>e.#tr,set:(e,t)=>{e.#tr=t}},metadata:e},tq,tX),ri(null,null,t$,{kind:"field",name:"#handlerMaxlength",static:!1,private:!0,access:{has:e=>#ts in e,get:e=>e.#ts,set:(e,t)=>{e.#ts=t}},metadata:e},tK,tG),ri(null,null,tU,{kind:"field",name:"#handleReadonly",static:!1,private:!0,access:{has:e=>#to in e,get:e=>e.#to,set:(e,t)=>{e.#to=t}},metadata:e},tY,tQ),ri(null,null,tz,{kind:"field",name:"#handleSpellCheck",static:!1,private:!0,access:{has:e=>#td in e,get:e=>e.#td,set:(e,t)=>{e.#td=t}},metadata:e},tJ,tZ),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"];#L=rn(this,tB);#th="text";#te=rS(()=>this.#L.shadowRoot,"#input");#tr=rn(this,tq,r_(this.#te,"enterkeyhint",e=>null===e?"send":e));#ts=(rn(this,tX),rn(this,tK,r_(this.#te,"maxlength",e=>null===e?"140":e)));#to=(rn(this,tG),rn(this,tY,r_(this.#te,"readonly",e=>null!==e?"":null)));#tn=(rn(this,tQ),r_(this.#te,"type"));#ti=r_(this.#te,"inputmode");get #tl(){return tW.value}#td=rn(this,tJ,r_(this.#te,"spellcheck",e=>null===e?"false":"true"));constructor(e){rn(this,tZ),this.#L=e}}),(av=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;ac=[rg("input")],am=[ry("send-composing-input",!0)],ri(this,au={value:rl(function(e){let t=this.#te();e?(t.addEventListener("input",this.#tc,{passive:!0}),t.addEventListener("compositionend",this.#tu,{passive:!0})):(t.removeEventListener("input",this.#tc),t.removeEventListener("compositionend",this.#tu))},"#handleEnableConfirmEvent")},ac,{kind:"method",name:"#handleEnableConfirmEvent",static:!1,private:!0,access:{has:e=>#tm in e,get:e=>e.#tm},metadata:e},null,av),ri(this,ap={value:rl(function(e){this.#tp=null!==e},"#handleSendComposingInput")},am,{kind:"method",name:"#handleSendComposingInput",static:!1,private:!0,access:{has:e=>#tv in e,get:e=>e.#tv},metadata:e},null,av),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["send-composing-input"];#L=rn(this,av);#tp=!1;#te=rS(()=>this.#L.shadowRoot,"#input");#tg=rS(()=>this.#L.shadowRoot,"#form");get #tm(){return au.value}get #tv(){return ap.value}#tb=e=>{let t=rB[e.type]??e.type;this.#L.dispatchEvent(new CustomEvent(t,{...rc,detail:{value:this.#te().value}}))};#tc=e=>{let t=this.#te(),a=t.value,i=e.isComposing;(!i||this.#tp)&&this.#L.dispatchEvent(new CustomEvent("input",{...rc,detail:{value:a,textLength:a.length,cursor:t.selectionStart,isComposing:i}}))};#tu=()=>{let e=this.#te(),t=e.value;this.#tp||this.#L.dispatchEvent(new CustomEvent("input",{...rc,detail:{value:t,textLength:t.length,cursor:e.selectionStart}}))};#tf=e=>{e.target===this.#te()&&"number"==typeof e.detail&&e.stopImmediatePropagation()};constructor(e){this.#L=e;let t=this.#te(),a=this.#tg();t.addEventListener("blur",this.#tb,{passive:!0}),t.addEventListener("focus",this.#tb,{passive:!0}),a.addEventListener("submit",this.#tb,{passive:!0}),a.addEventListener("input",this.#tf,{passive:!0})}})],rL` <style>
|
|
98
89
|
#input:focus {
|
|
99
90
|
outline: none;
|
|
100
91
|
}
|
|
@@ -111,7 +102,7 @@
|
|
|
111
102
|
inputmode="text"
|
|
112
103
|
spell-check="true"
|
|
113
104
|
/>
|
|
114
|
-
</form>`)],ay=[],aE=HTMLElement,(class extends aE{static{ab=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(aE[Symbol.metadata]??null):void 0;ri(null,ag={value:ab},af,{kind:"class",name:ab.name,metadata:e},null,ay),ab=ag.value,e&&Object.defineProperty(ab,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),rn(ab,ay)}#ty=rS(()=>this.shadowRoot,"#input");addText(e){let{text:t}=e,a=this.#ty(),i=a.selectionStart;if(null===i)a.value=t;else{let e=a.value;a.value=e.slice(0,i)+t+e.slice(i)}}controlKeyBoard(e){let{action:t}=e;0===t||1===t?this.focus():(2===t||3===t)&&this.blur()}setValue(e){let t,a=this.#ty();a.value=e.value,(t=e.index)&&a.setSelectionRange(t,t)}sendDelEvent(e){let{action:t,length:a}=e,i=this.#ty();1===t&&(a=1);let n=i.selectionStart;if(null===n){let e=i.value;i.value=i.value.substring(0,e.length-a)}else{let e=i.value;i.value=e.slice(0,n-a)+e.slice(n)}}setInputFilter(e){this.#ty().setAttribute("pattern",e.pattern)}select(){let e=this.#ty();e.setSelectionRange(0,e.value.length)}setSelectionRange(e){this.#ty().setSelectionRange(e.selectionStart,e.selectionEnd)}focus(e){this.#ty().focus(e)}blur(){this.#ty().blur()}connectedCallback(){let e=this.#ty();null===this.getAttribute("confirm-type")&&e.setAttribute("confirm-type","send"),null===this.getAttribute("maxlength")&&e.setAttribute("maxlength","140")}}),
|
|
105
|
+
</form>`)],ay=[],aE=HTMLElement,(class extends aE{static{ab=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(aE[Symbol.metadata]??null):void 0;ri(null,ag={value:ab},af,{kind:"class",name:ab.name,metadata:e},null,ay),ab=ag.value,e&&Object.defineProperty(ab,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),rn(ab,ay)}#ty=rS(()=>this.shadowRoot,"#input");addText(e){let{text:t}=e,a=this.#ty(),i=a.selectionStart;if(null===i)a.value=t;else{let e=a.value;a.value=e.slice(0,i)+t+e.slice(i)}}controlKeyBoard(e){let{action:t}=e;0===t||1===t?this.focus():(2===t||3===t)&&this.blur()}setValue(e){let t,a=this.#ty();a.value=e.value,(t=e.index)&&a.setSelectionRange(t,t)}sendDelEvent(e){let{action:t,length:a}=e,i=this.#ty();1===t&&(a=1);let n=i.selectionStart;if(null===n){let e=i.value;i.value=i.value.substring(0,e.length-a)}else{let e=i.value;i.value=e.slice(0,n-a)+e.slice(n)}}setInputFilter(e){this.#ty().setAttribute("pattern",e.pattern)}select(){let e=this.#ty();e.setSelectionRange(0,e.value.length)}setSelectionRange(e){this.#ty().setSelectionRange(e.selectionStart,e.selectionEnd)}focus(e){this.#ty().focus(e)}blur(){this.#ty().blur()}connectedCallback(){let e=this.#ty();null===this.getAttribute("confirm-type")&&e.setAttribute("confirm-type","send"),null===this.getAttribute("maxlength")&&e.setAttribute("maxlength","140")}}),aL=[rd("x-overlay-ng",[rf,(aT=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;aS=[ry("events-pass-through",!0)],aC=[ry("visible",!1)],ri(this,aw={value:rl(function(e){null!==e?(this.#tE().addEventListener("click",this.#tS,{passive:!1}),this.#L.addEventListener("click",this.#tS,{passive:!1})):(this.#tE().removeEventListener("click",this.#tS),this.#L.removeEventListener("click",this.#tS))},"#handleEventsPassThrough")},aS,{kind:"method",name:"#handleEventsPassThrough",static:!1,private:!0,access:{has:e=>#tw in e,get:e=>e.#tw},metadata:e},null,aT),ri(this,ax={value:rl(function(e){this.#tC=null!==e,this.#tx&&(this.#tC?(this.#tE().showModal(),this.#L.dispatchEvent(new CustomEvent("showoverlay",rc))):(this.#tE().close(),this.#L.dispatchEvent(new CustomEvent("dismissoverlay",rc))))},"#handleVisible")},aC,{kind:"method",name:"#handleVisible",static:!1,private:!0,access:{has:e=>#tT in e,get:e=>e.#tT},metadata:e},null,aT),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["visible","events-pass-through"];#L=rn(this,aT);#tx=!!window.HTMLDialogElement;#tC=!1;constructor(e){this.#L=e}#tE=rS(()=>this.#L.shadowRoot,"#dialog");get #tw(){return aw.value}get #tT(){return ax.value}#tS=e=>{e.stopPropagation();let t=this.#tE();if(e.target===this.#L||e.target===t){t.close();let{clientX:a,clientY:i}=e,n=document.elementFromPoint(a,i);n?.tagName==="LYNX-VIEW"&&n.shadowRoot&&(n=n.shadowRoot.elementFromPoint(a,i)??n),n?.dispatchEvent(new MouseEvent("click",e)),requestAnimationFrame(()=>{this.#tC&&t.isConnected&&t.showModal()})}};connectedCallback(){this.#tx||(this.#tE().style.display="none")}})],rL`
|
|
115
106
|
<style>
|
|
116
107
|
#dialog[open] {
|
|
117
108
|
top: 0;
|
|
@@ -127,7 +118,7 @@
|
|
|
127
118
|
<dialog id="dialog" part="dialog">
|
|
128
119
|
<slot></slot>
|
|
129
120
|
</dialog>
|
|
130
|
-
`)],a_=[],ak=HTMLElement,class extends ak{static{
|
|
121
|
+
`)],a_=[],ak=HTMLElement,class extends ak{static{aI=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(ak[Symbol.metadata]??null):void 0;ri(null,aO={value:aI},aL,{kind:"class",name:aI.name,metadata:e},null,a_),aI=aO.value,e&&Object.defineProperty(aI,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),rn(aI,a_)}get[rb](){return this.shadowRoot.firstElementChild}};class rq extends Event{startShowing;fullyShowing;static EventName="x-refresh-view-intersecting";constructor(e,t){super(rq.EventName,{composed:!1,cancelable:!0,bubbles:!0}),this.startShowing=e,this.fullyShowing=t}}class rX{#L;static observedAttributes=[];#tO;constructor(e){this.#L=e}connectedCallback(){if(IntersectionObserver&&!this.#tO){let e=this.#L.parentElement;e&&(this.#tO=new IntersectionObserver(e=>{let t=!1,a=!1;e.forEach(e=>{t=e.intersectionRatio>0,a=e.intersectionRatio>.9}),this.#L.dispatchEvent(new rq(t,a)),a&&this.#L.setAttribute("x-magnet-enable","")},{root:e,threshold:[.1,.9]}),this.#tO.observe(this.#L))}}dispose(){this.#tO&&(this.#tO.disconnect(),this.#tO=void 0)}}function rK(e,t,a,i){let n=!1;return function(l){if(l!==n){let r=e.call(this);l?(ro(()=>r.addEventListener(t,a,i)),n=!0):(ro(()=>r.removeEventListener(t,a)),n=!1)}}}aP=[rd("x-refresh-footer",[rf,rX])],aR=[],aD=HTMLElement,(class extends aD{static{aM=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(aD[Symbol.metadata]??null):void 0;ri(null,aA={value:aM},aP,{kind:"class",name:aM.name,metadata:e},null,aR),aM=aA.value,e&&Object.defineProperty(aM,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),rn(aM,aR)}connectedCallback(){this.setAttribute("slot","footer")}}),aH=[rd("x-refresh-header",[rf,rX])],aj=[],a$=HTMLElement,(class extends a${static{aF=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(a$[Symbol.metadata]??null):void 0;ri(null,aN={value:aF},aH,{kind:"class",name:aF.name,metadata:e},null,aj),aF=aN.value,e&&Object.defineProperty(aF,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),rn(aF,aj)}connectedCallback(){this.setAttribute("slot","header")}}),aK=[rd("x-refresh-view",[rf,(aB=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;aU=[rg("headeroffset"),rg("headershow"),rg("footeroffset")],aW=[rg("startrefresh"),rg("headerreleased"),rg("startloadmore"),rg("footerreleased")],ri(this,aV={value:rl(function(e,t){this.#tI[t]=e;let{headeroffset:a,headershow:i,footeroffset:n}=this.#tI;a||i||n?this.#tL():this.#t_()},"#handleComplexEventEnableAttributes")},aU,{kind:"method",name:"#handleComplexEventEnableAttributes",static:!1,private:!0,access:{has:e=>#tk in e,get:e=>e.#tk},metadata:e},null,aB),ri(this,az={value:rl(function(e,t){this.#tI[t]=e;let{startrefresh:a,headerreleased:i,startloadmore:n,footerreleased:l}=this.#tI;i||l||n||a?this.#tA():this.#tM()},"#handleXEnableHeaderOffsetEvent")},aW,{kind:"method",name:"#handleXEnableHeaderOffsetEvent",static:!1,private:!0,access:{has:e=>#tP in e,get:e=>e.#tP},metadata:e},null,aB),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}#L=rn(this,aB);static observedAttributes=[];#tR=rS(()=>this.#L,"x-refresh-view > x-refresh-header:first-of-type");#tD=rS(()=>this.#L,"x-refresh-view > x-refresh-footer:first-of-type");constructor(e){this.#L=e,this.#L.addEventListener(rq.EventName,this.#tN)}#tI={headeroffset:!1,headerreleased:!1,startrefresh:!1,footeroffset:!1,headershow:!1,footerreleased:!1,startloadmore:!1};get #tk(){return aV.value}get #tP(){return az.value}#tF=!1;#tH=!1;#tj=!1;#t$=!1;#tN=e=>{e.stopPropagation(),"X-REFRESH-HEADER"===e.target.tagName?(this.#tF=e.startShowing,this.#tH=e.fullyShowing):(this.#tj=e.startShowing,this.#t$=e.fullyShowing)};#tU=!1;#tA(){this.#tU||(this.#L.addEventListener("touchend",this.#tV),this.#tU=!0)}#tV=()=>{this.#tH?(this.#L.dispatchEvent(new CustomEvent("headerreleased",rc)),this.#L.dispatchEvent(new CustomEvent("startrefresh",{...rc,detail:{isManual:this.#L._nextRefreshIsManual}})),this.#L._nextRefreshIsManual=!0):("true"===this.#L.getAttribute("enable-auto-loadmore")&&this.#tj||this.#t$)&&(this.#L.dispatchEvent(new CustomEvent("footerreleased",rc)),this.#L.dispatchEvent(new CustomEvent("startloadmore",rc)))};#tM(){this.#tU&&this.#L.removeEventListener("touchend",this.#tV)}#tW=!1;#tz=!1;#tL(){this.#tz||(this.#L.addEventListener("touchstart",this.#tB),this.#L.addEventListener("touchend",this.#tq),this.#L.addEventListener("touchcancel",this.#tq),this.#L.shadowRoot.querySelector("#container").addEventListener("scroll",this.#er))}#tq=()=>{this.#tW=!1};#tB=()=>{this.#tW=!0};#er=()=>{if(this.#tF&&(this.#tI.headershow||this.#tI.headeroffset)){let e=this.#tR();if(e){let t=parseFloat(getComputedStyle(e).height),a=this.#L.shadowRoot.querySelector("#container").scrollTop;this.#L.dispatchEvent(new CustomEvent("headershow",{...rc,detail:{isDragging:this.#tW,offsetPercent:1-a/t}})),this.#L.dispatchEvent(new CustomEvent("headeroffset",{...rc,detail:{isDragging:this.#tW,offsetPercent:1-a/t}}))}}else if(this.#tj&&this.#tI.footeroffset){let e=this.#tD();if(e){let t=this.#L.shadowRoot.querySelector("#container"),a=t.scrollTop;t.scrollHeight;let i=parseFloat(getComputedStyle(e).height);this.#L.dispatchEvent(new CustomEvent("footeroffset",{...rc,detail:{isDragging:this.#tW,offsetPercent:1-a/i}}))}}};#t_(){this.#tz&&(this.#L.removeEventListener("touchstart",this.#tB),this.#L.removeEventListener("touchend",this.#tq),this.#L.removeEventListener("touchcancel",this.#tq),this.#L.shadowRoot.querySelector("#container").removeEventListener("scroll",this.#er))}dispose(){this.#tM(),this.#t_()}})],rL`
|
|
131
122
|
<style>
|
|
132
123
|
.bounce-container {
|
|
133
124
|
overflow: scroll;
|
|
@@ -174,7 +165,7 @@
|
|
|
174
165
|
part="placeholder-bot"
|
|
175
166
|
></div>
|
|
176
167
|
</div>
|
|
177
|
-
`)],aG=[],aY=HTMLElement,(class extends aY{static{aX=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(aY[Symbol.metadata]??null):void 0;ri(null,aq={value:aX},aK,{kind:"class",name:aX.name,metadata:e},null,aG),aX=aq.value,e&&Object.defineProperty(aX,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static notToFilterFalseAttributes=new Set(["enable-refresh","enable-loadmore","enable-auto-loadmore"]);_nextRefreshIsManual=!0;finishRefresh(){this.querySelector("x-refresh-view > x-refresh-header:first-of-type")?.removeAttribute("x-magnet-enable")}finishLoadMore(){this.querySelector("x-refresh-view > x-refresh-footer:first-of-type")?.removeAttribute("x-magnet-enable")}autoStartRefresh(){let e=this.shadowRoot.querySelector("#container");this.querySelector("x-refresh-view > x-refresh-header:first-of-type")?.setAttribute("x-magnet-enable",""),this._nextRefreshIsManual=!1,e.scroll({top:0,behavior:"smooth"})}#tX=rS(()=>this.shadowRoot,"#container");#tK=rS(()=>this.shadowRoot,"#content");get scrollTop(){let e=this.#tX(),t=this.#tK();return t.scrollTop+t.offsetTop-e.scrollTop}set scrollTop(e){console.log(e);let t=this.#tX(),a=this.#tK();e>0?a.scrollTop=e:t.scrollTop=a.offsetTop+e}get scrollHeight(){return this.#tK().scrollHeight}get[rp](){return this}static{rn(aX,aG)}}),a4=[rd("x-svg",[rf,(aZ=[],a0=[],a1=[],a2=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;aQ=[ry("src",!0)],aJ=[ry("content",!0)],ri(null,null,aQ,{kind:"field",name:"#handleSrc",static:!1,private:!0,access:{has:e=>#em in e,get:e=>e.#em,set:(e,t)=>{e.#em=t}},metadata:e},aZ,a0),ri(null,null,aJ,{kind:"field",name:"#handleContent",static:!1,private:!0,access:{has:e=>#tG in e,get:e=>e.#tG,set:(e,t)=>{e.#tG=t}},metadata:e},a1,a2),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["src","content"];#I;#tY=new Image;#em=rn(this,aZ,rw(()=>this.#I,"background-image",e=>(this.#tY.src=e,`url(${e})`)));#tG=(rn(this,a0),rn(this,a1,rw(()=>this.#I,"background-image",e=>{if(!e)return"";let t="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e)));return this.#tY.src=t,`url("${t}")`})));#tQ=(rn(this,a2),()=>{let{width:e,height:t}=this.#tY;this.#I.dispatchEvent(new CustomEvent("load",{...rc,detail:{width:e,height:t}}))});constructor(e){this.#I=e,this.#tY.addEventListener("load",this.#tQ)}})])],a5=[],a7=HTMLElement,(class extends a7{static{a8=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(a7[Symbol.metadata]??null):void 0;ri(null,a3={value:a8},a4,{kind:"class",name:a8.name,metadata:e},null,a5),a8=a3.value,e&&Object.defineProperty(a8,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),rn(a8,a5)}}),ie=[rd("x-swiper-item",[rf])],it=[],ia=HTMLElement,(class extends ia{static{a9=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(ia[Symbol.metadata]??null):void 0;ri(null,a6={value:a9},ie,{kind:"class",name:a9.name,metadata:e},null,it),a9=a6.value,e&&Object.defineProperty(a9,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),rn(a9,it)}}),iH=[rd("x-swiper",[rf,(iO=[],iL=[],iI=[],i_=[],ik=[],iA=[],iM=[],iP=[],iR=[],iD=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;iS=[ry("indicator-color",!0)],iw=[ry("indicator-active-color",!0)],iC=[ry("page-margin",!0)],ix=[ry("previous-margin",!0)],iT=[ry("next-margin",!0)],ri(null,null,iS,{kind:"field",name:"#handleIndicatorColor",static:!1,private:!0,access:{has:e=>#tJ in e,get:e=>e.#tJ,set:(e,t)=>{e.#tJ=t}},metadata:e},iO,iL),ri(null,null,iw,{kind:"field",name:"#handleIndicatorActiveColor",static:!1,private:!0,access:{has:e=>#tZ in e,get:e=>e.#tZ,set:(e,t)=>{e.#tZ=t}},metadata:e},iI,i_),ri(null,null,iC,{kind:"field",name:"#handlePageMargin",static:!1,private:!0,access:{has:e=>#t0 in e,get:e=>e.#t0,set:(e,t)=>{e.#t0=t}},metadata:e},ik,iA),ri(null,null,ix,{kind:"field",name:"#handlePreviousMargin",static:!1,private:!0,access:{has:e=>#t1 in e,get:e=>e.#t1,set:(e,t)=>{e.#t1=t}},metadata:e},iM,iP),ri(null,null,iT,{kind:"field",name:"#handleNextMargin",static:!1,private:!0,access:{has:e=>#t2 in e,get:e=>e.#t2,set:(e,t)=>{e.#t2=t}},metadata:e},iR,iD),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"];#I;#t3=0;#t8=rS(()=>this.#I.shadowRoot,"#indicator-container");#t4=rS(()=>this.#I.shadowRoot,"#indicator-style");#t5;constructor(e){rn(this,iD),this.#I=e}#tJ=rn(this,iO,rw(this.#t8,"--indicator-color",void 0,!0));#tZ=(rn(this,iL),rn(this,iI,rw(this.#t8,"--indicator-active-color",void 0,!0)));#t0=(rn(this,i_),rn(this,ik,rw(this.#t8,"--page-margin",void 0,!0)));#t1=(rn(this,iA),rn(this,iM,rw(this.#t8,"--previous-margin",void 0,!0)));#t2=(rn(this,iP),rn(this,iR,rw(this.#t8,"--next-margin",void 0,!0)));#t7(){let e=this.#I.childElementCount;if(e!==this.#t3){let t="";for(let a=0;a<e;a++)t+=`<div style="animation-timeline:--x-swiper-item-${a};" part="indicator-item"></div>`;if(this.#t8().innerHTML=t,e>5){for(let t=0;t<e;t++)this.#I.children.item(t)?.style.setProperty("view-timeline-name",`--x-swiper-item-${t}`);this.#t4().innerHTML=`:host { timeline-scope: ${Array.from({length:e},(e,t)=>`--x-swiper-item-${t}`).join(",")} !important; }`}}this.#t3=e}connectedCallback(){this.#t7(),this.#t5=new MutationObserver(this.#t7.bind(this)),this.#t5.observe(this.#I,{attributes:!1,characterData:!1,childList:!0,subtree:!1}),CSS.supports("timeline-scope","--a, --b")||(this.#I.addEventListener("change",(({detail:e})=>{let t=e.current,a=this.#I.childElementCount,i=this.#t8();for(let e=0;e<a;e++){let a=i.children[e];a&&(e===t?a.style.setProperty("background-color","var(--indicator-active-color)","important"):a.style.removeProperty("background-color"))}}).bind(this)),ro(()=>{this.#t8().children[this.#I.current]?.style.setProperty("background-color","var(--indicator-active-color)","important")}))}dispose(){this.#t5?.disconnect(),this.#t5=void 0}}),(is=[],io=[],id=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;ii=[rg("transition")],il=[rg("scrollstart"),rg("lynxscrollend"),rg("change"),rg("change-event-for-indicator")],ri(this,ir={value:rl(function(e,t){this.#tL[t]=e;let{lynxscrollend:a,scrollstart:i,change:n}=this.#tL,l=n||a||i||this.#tL["change-event-for-indicator"];this.#t6.forEach(e=>e(l))},"#enableScrollEventProcessor")},il,{kind:"method",name:"#enableScrollEventProcessor",static:!1,private:!0,access:{has:e=>#t9 in e,get:e=>e.#t9},metadata:e},null,is),ri(null,null,ii,{kind:"field",name:"#handleEnableTransitionEvent",static:!1,private:!0,access:{has:e=>#ae in e,get:e=>e.#ae,set:(e,t)=>{e.#ae=t}},metadata:e},io,id),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=[];#I=rn(this,is);#at=0;#aa=0;#tW=!1;#Y;#ai=!1;constructor(e){this.#I=e}#tK=rS(()=>this.#I.shadowRoot,"#content").bind(this);#ae=rn(this,io,rK(this.#tK,"scroll",this.#an,{passive:!0}));#er(){ru||(clearTimeout(this.#Y),this.#Y=setTimeout(()=>{this.#eo()},100)),this.#ai||(this.#I.dispatchEvent(new CustomEvent("scrollstart",{...rc,detail:{current:this.#at,isDragged:this.#tW}})),this.#ai=!0);let e=this.#tK(),t=this.#I.isVertical,a=t?e.scrollTop:e.scrollLeft,i=t?e.clientHeight:e.clientWidth,n=t?e.scrollHeight:e.scrollWidth;if(Math.abs(this.#aa-a)>i/4||a<10||Math.abs(a-n)<=i){let e=this.#I.current;e!==this.#at&&(this.#I.dispatchEvent(new CustomEvent("change",{...rc,detail:{current:e,isDragged:this.#tW}})),this.#at=e),this.#aa=a}}#eo(){this.#I.dispatchEvent(new CustomEvent("lynxscrollend",{...rc,detail:{current:this.#at}})),this.#ai=!1}#al(){this.#tW=!0}#ar(){this.#tW=!1}#an(){this.#I.dispatchEvent(new CustomEvent("transition",{...rc,detail:{dx:this.#tK().scrollLeft,dy:this.#tK().scrollTop}}))}#t6=(rn(this,id),[rK(this.#tK,"scroll",this.#er.bind(this),{passive:!0}),rK(this.#tK,"touchstart",this.#al.bind(this),{passive:!0}),rK(this.#tK,"touchend",this.#ar.bind(this),{passive:!0}),rK(this.#tK,"touchcancel",this.#ar.bind(this),{passive:!0}),rK(this.#tK,"scrollend",this.#eo.bind(this),{passive:!0})]);#tL={scrollstart:!1,lynxscrollend:!1,change:!1,"change-event-for-indicator":!1};get #t9(){return ir.value}connectedCallback(){this.#at=parseFloat(this.#I.getAttribute("current")??"0");let e=this.#I.isVertical;this.#aa=e?this.#tK().scrollTop:this.#tK().scrollLeft}}),(iE=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;iv=[ry("circular",!1)],ib=[ry("vertical",!0)],ri(this,ig={value:rl(function(e){this.#t6.forEach(t=>t(null!=e)),null!==e&&this.#as({detail:{current:this.#I.current,isDragged:!1,__isFirstLayout:!0}})},"#handleCircular")},iv,{kind:"method",name:"#handleCircular",static:!1,private:!0,access:{has:e=>#ao in e,get:e=>e.#ao},metadata:e},null,iE),ri(this,iy={value:rl(function(e){this.#ad=null!==e},"#handleVerticalChange")},ib,{kind:"method",name:"#handleVerticalChange",static:!1,private:!0,access:{has:e=>#ah in e,get:e=>e.#ah},metadata:e},null,iE),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["circular","vertical"];#I=rn(this,iE);#ad=!1;#ac;#au=0;#tK=rS(()=>this.#I.shadowRoot,"#content").bind(this);constructor(e){this.#I=e}#am=rS(()=>this.#I.shadowRoot,"#circular-start").bind(this);#ap=rS(()=>this.#I.shadowRoot,"#circular-end").bind(this);#as(e){let t=this.#I.childElementCount;if(t>2){let{current:a,isDragged:i,__isFirstLayout:n}=e.detail;if(0===a||a===t-1||2===a||a===t-2){let e,l=this.#tK(),r=this.#am().assignedElements(),s=this.#ap().assignedElements(),o=this.#I.firstElementChild,d=this.#I.lastElementChild,h=this.#I.snapDistance;if(0===a?(s.forEach(e=>e.removeAttribute("slot")),d.setAttribute("slot","circular-start"),e=o):a===t-1?(r.forEach(e=>e.removeAttribute("slot")),o.setAttribute("slot","circular-end"),e=d):(r.forEach(e=>e.removeAttribute("slot")),s.forEach(e=>e.removeAttribute("slot")),e=this.#I.children[a]),this.#ad){let t="carousel"===this.#I.getAttribute("mode")?.8*l.clientHeight/2:l.clientHeight/2;this.#au=e.offsetTop+e.offsetHeight/2-h-t,l.scrollTop=this.#au}else{let t="carousel"===this.#I.getAttribute("mode")?.8*l.clientWidth/2:l.clientWidth/2;this.#au=e.offsetLeft+e.offsetWidth/2-h-t,l.scrollLeft=this.#au}if(!i){let e=this.#I.getAttribute("mode");if(n&&(null===e||"normal"===e||"carousel"===e||"carry"===e))return;this.#av(n?"instant":"smooth")}}}}#av(e){let t=this.#tK(),a=this.#I.snapDistance;t.scrollBy({top:this.#ad?a:0,left:this.#ad?0:a,behavior:e??"smooth"})}#t6=[rK(()=>this.#I,"change",this.#as.bind(this),{passive:!0}),rK(()=>this.#I,"touchmove",this.#ag.bind(this),{passive:!1}),rK(()=>this.#I,"touchend",this.#ab.bind(this),{passive:!1}),rK(()=>this.#I,"touchcancel",this.#ab.bind(this),{passive:!1})];get #ao(){return ig.value}#ag(e){let t=e.touches.item(0);if(t){let e=this.#ad?t.pageY:t.pageX;if(void 0!==this.#ac){this.#af();let t=this.#ac-e;this.#au+=t}this.#ac=e}}#ab(e){this.#ay(),this.#av(),this.#ac=void 0}get #ah(){return iy.value}#aE;#af(){if(!this.#aE){let e=this.#tK();this.#au=this.#ad?e.scrollTop:e.scrollLeft,this.#aE=setInterval(()=>{this.#ad?e.scrollTop=this.#au:e.scrollLeft=this.#au},10)}}#ay(){this.#aE&&(clearInterval(this.#aE),this.#aE=void 0)}dispose(){this.#ay()}}),(ip=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;ih=[ry("current",!1)],iu=[ry("interval",!1),ry("autoplay",!1)],ri(this,ic={value:rl(function(e){let t=Number(e);Number.isNaN(t)||(this.#I.current=t)},"#handleCurrentChange")},ih,{kind:"method",name:"#handleCurrentChange",static:!1,private:!0,access:{has:e=>#aS in e,get:e=>e.#aS},metadata:e},null,ip),ri(this,im={value:rl(function(){if(null!==this.#I.getAttribute("autoplay")){let e=this.#I.getAttribute("interval"),t=e?parseFloat(e):5e3;Number.isNaN(t)&&(t=5e3),this.#aw(t)}},"#handleAutoplay")},iu,{kind:"method",name:"#handleAutoplay",static:!1,private:!0,access:{has:e=>#aC in e,get:e=>e.#aC},metadata:e},null,ip),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["current","interval","autoplay"];#I=rn(this,ip);constructor(e){this.#I=e}get #aS(){return ic.value}#ax;#aT=(()=>{this.#I.scrollToNext()}).bind(this);#aw(e){this.#aO(),this.#ax=setInterval(this.#aT,e)}#aO(){this.#ax&&clearInterval(this.#ax)}get #aC(){return im.value}dispose(){this.#aO()}})],rI` <style>
|
|
168
|
+
`)],aG=[],aY=HTMLElement,(class extends aY{static{aX=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(aY[Symbol.metadata]??null):void 0;ri(null,aq={value:aX},aK,{kind:"class",name:aX.name,metadata:e},null,aG),aX=aq.value,e&&Object.defineProperty(aX,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static notToFilterFalseAttributes=new Set(["enable-refresh","enable-loadmore","enable-auto-loadmore"]);_nextRefreshIsManual=!0;finishRefresh(){this.querySelector("x-refresh-view > x-refresh-header:first-of-type")?.removeAttribute("x-magnet-enable")}finishLoadMore(){this.querySelector("x-refresh-view > x-refresh-footer:first-of-type")?.removeAttribute("x-magnet-enable")}autoStartRefresh(){let e=this.shadowRoot.querySelector("#container");this.querySelector("x-refresh-view > x-refresh-header:first-of-type")?.setAttribute("x-magnet-enable",""),this._nextRefreshIsManual=!1,e.scroll({top:0,behavior:"smooth"})}#tX=rS(()=>this.shadowRoot,"#container");#tK=rS(()=>this.shadowRoot,"#content");get scrollTop(){let e=this.#tX(),t=this.#tK();return t.scrollTop+t.offsetTop-e.scrollTop}set scrollTop(e){console.log(e);let t=this.#tX(),a=this.#tK();e>0?a.scrollTop=e:t.scrollTop=a.offsetTop+e}get scrollHeight(){return this.#tK().scrollHeight}get[rp](){return this}static{rn(aX,aG)}}),a5=[rd("x-svg",[rf,(aZ=[],a0=[],a1=[],a2=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;aQ=[ry("src",!0)],aJ=[ry("content",!0)],ri(null,null,aQ,{kind:"field",name:"#handleSrc",static:!1,private:!0,access:{has:e=>#em in e,get:e=>e.#em,set:(e,t)=>{e.#em=t}},metadata:e},aZ,a0),ri(null,null,aJ,{kind:"field",name:"#handleContent",static:!1,private:!0,access:{has:e=>#tG in e,get:e=>e.#tG,set:(e,t)=>{e.#tG=t}},metadata:e},a1,a2),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["src","content"];#L;#tY=new Image;#em=rn(this,aZ,rw(()=>this.#L,"background-image",e=>(this.#tY.src=e,`url(${e})`)));#tG=(rn(this,a0),rn(this,a1,rw(()=>this.#L,"background-image",e=>{if(!e)return"";let t="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e)));return this.#tY.src=t,`url("${t}")`})));#tQ=(rn(this,a2),()=>{let{width:e,height:t}=this.#tY;this.#L.dispatchEvent(new CustomEvent("load",{...rc,detail:{width:e,height:t}}))});constructor(e){this.#L=e,this.#tY.addEventListener("load",this.#tQ)}})])],a4=[],a6=HTMLElement,(class extends a6{static{a8=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(a6[Symbol.metadata]??null):void 0;ri(null,a3={value:a8},a5,{kind:"class",name:a8.name,metadata:e},null,a4),a8=a3.value,e&&Object.defineProperty(a8,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),rn(a8,a4)}}),ie=[rd("x-swiper-item",[rf])],it=[],ia=HTMLElement,(class extends ia{static{a7=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(ia[Symbol.metadata]??null):void 0;ri(null,a9={value:a7},ie,{kind:"class",name:a7.name,metadata:e},null,it),a7=a9.value,e&&Object.defineProperty(a7,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),rn(a7,it)}}),iH=[rd("x-swiper",[rf,(iO=[],iI=[],iL=[],i_=[],ik=[],iA=[],iM=[],iP=[],iR=[],iD=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;iS=[ry("indicator-color",!0)],iw=[ry("indicator-active-color",!0)],iC=[ry("page-margin",!0)],ix=[ry("previous-margin",!0)],iT=[ry("next-margin",!0)],ri(null,null,iS,{kind:"field",name:"#handleIndicatorColor",static:!1,private:!0,access:{has:e=>#tJ in e,get:e=>e.#tJ,set:(e,t)=>{e.#tJ=t}},metadata:e},iO,iI),ri(null,null,iw,{kind:"field",name:"#handleIndicatorActiveColor",static:!1,private:!0,access:{has:e=>#tZ in e,get:e=>e.#tZ,set:(e,t)=>{e.#tZ=t}},metadata:e},iL,i_),ri(null,null,iC,{kind:"field",name:"#handlePageMargin",static:!1,private:!0,access:{has:e=>#t0 in e,get:e=>e.#t0,set:(e,t)=>{e.#t0=t}},metadata:e},ik,iA),ri(null,null,ix,{kind:"field",name:"#handlePreviousMargin",static:!1,private:!0,access:{has:e=>#t1 in e,get:e=>e.#t1,set:(e,t)=>{e.#t1=t}},metadata:e},iM,iP),ri(null,null,iT,{kind:"field",name:"#handleNextMargin",static:!1,private:!0,access:{has:e=>#t2 in e,get:e=>e.#t2,set:(e,t)=>{e.#t2=t}},metadata:e},iR,iD),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"];#L;#t3=0;#t8=rS(()=>this.#L.shadowRoot,"#indicator-container");#t5=rS(()=>this.#L.shadowRoot,"#indicator-style");#t4;constructor(e){rn(this,iD),this.#L=e}#tJ=rn(this,iO,rw(this.#t8,"--indicator-color",void 0,!0));#tZ=(rn(this,iI),rn(this,iL,rw(this.#t8,"--indicator-active-color",void 0,!0)));#t0=(rn(this,i_),rn(this,ik,rw(this.#t8,"--page-margin",void 0,!0)));#t1=(rn(this,iA),rn(this,iM,rw(this.#t8,"--previous-margin",void 0,!0)));#t2=(rn(this,iP),rn(this,iR,rw(this.#t8,"--next-margin",void 0,!0)));#t6(){let e=this.#L.childElementCount;if(e!==this.#t3){let t="";for(let a=0;a<e;a++)t+=`<div style="animation-timeline:--x-swiper-item-${a};" part="indicator-item"></div>`;if(this.#t8().innerHTML=t,e>5){for(let t=0;t<e;t++)this.#L.children.item(t)?.style.setProperty("view-timeline-name",`--x-swiper-item-${t}`);this.#t5().innerHTML=`:host { timeline-scope: ${Array.from({length:e},(e,t)=>`--x-swiper-item-${t}`).join(",")} !important; }`}}this.#t3=e}connectedCallback(){this.#t6(),this.#t4=new MutationObserver(this.#t6.bind(this)),this.#t4.observe(this.#L,{attributes:!1,characterData:!1,childList:!0,subtree:!1}),CSS.supports("timeline-scope","--a, --b")||(this.#L.addEventListener("change",(({detail:e})=>{let t=e.current,a=this.#L.childElementCount,i=this.#t8();for(let e=0;e<a;e++){let a=i.children[e];a&&(e===t?a.style.setProperty("background-color","var(--indicator-active-color)","important"):a.style.removeProperty("background-color"))}}).bind(this)),ro(()=>{this.#t8().children[this.#L.currentIndex]?.style.setProperty("background-color","var(--indicator-active-color)","important")}))}dispose(){this.#t4?.disconnect(),this.#t4=void 0}}),(is=[],io=[],id=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;ii=[rg("transition")],il=[rg("scrollstart"),rg("lynxscrollend"),rg("change"),rg("change-event-for-indicator")],ri(this,ir={value:rl(function(e,t){this.#tI[t]=e;let{lynxscrollend:a,scrollstart:i,change:n}=this.#tI,l=n||a||i||this.#tI["change-event-for-indicator"];this.#t9.forEach(e=>e(l))},"#enableScrollEventProcessor")},il,{kind:"method",name:"#enableScrollEventProcessor",static:!1,private:!0,access:{has:e=>#t7 in e,get:e=>e.#t7},metadata:e},null,is),ri(null,null,ii,{kind:"field",name:"#handleEnableTransitionEvent",static:!1,private:!0,access:{has:e=>#ae in e,get:e=>e.#ae,set:(e,t)=>{e.#ae=t}},metadata:e},io,id),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=[];#L=rn(this,is);#at=0;#aa=0;#tW=!1;#Y;#ai=!1;constructor(e){this.#L=e}#tK=rS(()=>this.#L.shadowRoot,"#content").bind(this);#ae=rn(this,io,rK(this.#tK,"scroll",this.#an,{passive:!0}));#er(){ru||(clearTimeout(this.#Y),this.#Y=setTimeout(()=>{this.#eo()},100)),this.#ai||(this.#L.dispatchEvent(new CustomEvent("scrollstart",{...rc,detail:{current:this.#at,isDragged:this.#tW}})),this.#ai=!0);let e=this.#tK(),t=this.#L.isVertical,a=t?e.scrollTop:e.scrollLeft,i=t?e.clientHeight:e.clientWidth,n=t?e.scrollHeight:e.scrollWidth;if(Math.abs(this.#aa-a)>i/4||a<10||Math.abs(a-n)<=i){let e=this.#L.currentIndex;e!==this.#at&&(this.#L.dispatchEvent(new CustomEvent("change",{...rc,detail:{current:e,isDragged:this.#tW}})),this.#at=e),this.#aa=a}}#eo(){this.#L.dispatchEvent(new CustomEvent("lynxscrollend",{...rc,detail:{current:this.#at}})),this.#ai=!1}#al(){this.#tW=!0}#ar(){this.#tW=!1}#an(){this.#L.dispatchEvent(new CustomEvent("transition",{...rc,detail:{dx:this.#tK().scrollLeft,dy:this.#tK().scrollTop}}))}#t9=(rn(this,id),[rK(this.#tK,"scroll",this.#er.bind(this),{passive:!0}),rK(this.#tK,"touchstart",this.#al.bind(this),{passive:!0}),rK(this.#tK,"touchend",this.#ar.bind(this),{passive:!0}),rK(this.#tK,"touchcancel",this.#ar.bind(this),{passive:!0}),rK(this.#tK,"scrollend",this.#eo.bind(this),{passive:!0})]);#tI={scrollstart:!1,lynxscrollend:!1,change:!1,"change-event-for-indicator":!1};get #t7(){return ir.value}connectedCallback(){this.#at=parseFloat(this.#L.getAttribute("current")??"0");let e=this.#L.isVertical;this.#aa=e?this.#tK().scrollTop:this.#tK().scrollLeft}}),(iE=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;iv=[ry("circular",!1)],ib=[ry("vertical",!0)],ri(this,ig={value:rl(function(e){this.#t9.forEach(t=>t(null!=e)),null!==e&&this.#as({detail:{current:this.#L.currentIndex,isDragged:!1,__isFirstLayout:!0}})},"#handleCircular")},iv,{kind:"method",name:"#handleCircular",static:!1,private:!0,access:{has:e=>#ao in e,get:e=>e.#ao},metadata:e},null,iE),ri(this,iy={value:rl(function(e){this.#ad=null!==e},"#handleVerticalChange")},ib,{kind:"method",name:"#handleVerticalChange",static:!1,private:!0,access:{has:e=>#ah in e,get:e=>e.#ah},metadata:e},null,iE),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["circular","vertical"];#L=rn(this,iE);#ad=!1;#ac;#au=0;#tK=rS(()=>this.#L.shadowRoot,"#content").bind(this);constructor(e){this.#L=e}#am=rS(()=>this.#L.shadowRoot,"#circular-start").bind(this);#ap=rS(()=>this.#L.shadowRoot,"#circular-end").bind(this);#as(e){let t=this.#L.childElementCount;if(t>2){let{current:a,isDragged:i,__isFirstLayout:n}=e.detail;if(0===a||a===t-1||2===a||a===t-2){let e,l=this.#tK(),r=this.#am().assignedElements(),s=this.#ap().assignedElements(),o=this.#L.firstElementChild,d=this.#L.lastElementChild,h=this.#L.snapDistance;if(0===a?(s.forEach(e=>e.removeAttribute("slot")),d.setAttribute("slot","circular-start"),e=o):a===t-1?(r.forEach(e=>e.removeAttribute("slot")),o.setAttribute("slot","circular-end"),e=d):(r.forEach(e=>e.removeAttribute("slot")),s.forEach(e=>e.removeAttribute("slot")),e=this.#L.children[a]),this.#ad){let t="carousel"===this.#L.getAttribute("mode")?.8*l.clientHeight/2:l.clientHeight/2;this.#au=e.offsetTop+e.offsetHeight/2-h-t,l.scrollTop=this.#au}else{let t="carousel"===this.#L.getAttribute("mode")?.8*l.clientWidth/2:l.clientWidth/2;this.#au=e.offsetLeft+e.offsetWidth/2-h-t,l.scrollLeft=this.#au}if(!i){let e=this.#L.getAttribute("mode");if(n&&(null===e||"normal"===e||"carousel"===e||"carry"===e))return;this.#av(n?"instant":"smooth")}}}}#av(e){let t=this.#tK(),a=this.#L.snapDistance;t.scrollBy({top:this.#ad?a:0,left:this.#ad?0:a,behavior:e??"smooth"})}#t9=[rK(()=>this.#L,"change",this.#as.bind(this),{passive:!0}),rK(()=>this.#L,"touchmove",this.#ag.bind(this),{passive:!1}),rK(()=>this.#L,"touchend",this.#ab.bind(this),{passive:!1}),rK(()=>this.#L,"touchcancel",this.#ab.bind(this),{passive:!1})];get #ao(){return ig.value}#ag(e){let t=e.touches.item(0);if(t){let e=this.#ad?t.pageY:t.pageX;if(void 0!==this.#ac){this.#af();let t=this.#ac-e;this.#au+=t}this.#ac=e}}#ab(e){this.#ay(),this.#av(),this.#ac=void 0}get #ah(){return iy.value}#aE;#af(){if(!this.#aE){let e=this.#tK();this.#au=this.#ad?e.scrollTop:e.scrollLeft,this.#aE=setInterval(()=>{this.#ad?e.scrollTop=this.#au:e.scrollLeft=this.#au},10)}}#ay(){this.#aE&&(clearInterval(this.#aE),this.#aE=void 0)}dispose(){this.#ay()}}),(ip=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;ih=[ry("current",!1)],iu=[ry("interval",!1),ry("autoplay",!1)],ri(this,ic={value:rl(function(e){let t=Number(e);Number.isNaN(t)||(this.#L.currentIndex=t)},"#handleCurrentChange")},ih,{kind:"method",name:"#handleCurrentChange",static:!1,private:!0,access:{has:e=>#aS in e,get:e=>e.#aS},metadata:e},null,ip),ri(this,im={value:rl(function(){if(null!==this.#L.getAttribute("autoplay")){let e=this.#L.getAttribute("interval"),t=e?parseFloat(e):5e3;Number.isNaN(t)&&(t=5e3),this.#aw(t)}},"#handleAutoplay")},iu,{kind:"method",name:"#handleAutoplay",static:!1,private:!0,access:{has:e=>#aC in e,get:e=>e.#aC},metadata:e},null,ip),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["current","interval","autoplay"];#L=rn(this,ip);constructor(e){this.#L=e}get #aS(){return ic.value}#ax;#aT=(()=>{this.#L.scrollToNext()}).bind(this);#aw(e){this.#aO(),this.#ax=setInterval(this.#aT,e)}#aO(){this.#ax&&clearInterval(this.#ax)}get #aC(){return im.value}dispose(){this.#aO()}})],rL` <style>
|
|
178
169
|
#bounce-padding {
|
|
179
170
|
display: none;
|
|
180
171
|
flex: 0 0 0;
|
|
@@ -220,7 +211,7 @@
|
|
|
220
211
|
<slot part="slot-start" name="circular-start" id="circular-start"></slot>
|
|
221
212
|
<slot part="slot"></slot>
|
|
222
213
|
<slot part="slot-end" name="circular-end" id="circular-end"></slot>
|
|
223
|
-
</div>`)],ij=[],i$=HTMLElement,(class extends i${static{iF=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(i$[Symbol.metadata]??null):void 0;ri(null,iN={value:iF},iH,{kind:"class",name:iF.name,metadata:e},null,ij),iF=iN.value,e&&Object.defineProperty(iF,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static notToFilterFalseAttributes=new Set(["smooth-scroll","indicator-dots"]);#tK=rS(()=>this.shadowRoot,"#content").bind(this);#aL(){let e=0,t=Number.MAX_SAFE_INTEGER,a=0;if(this.childElementCount>0){let i=this.#tK(),n=this.isVertical,l=this.childElementCount,r=n?i.scrollTop:i.scrollLeft,s=n?i.clientHeight:i.clientWidth,o=n?this.firstElementChild.offsetHeight:this.firstElementChild.offsetWidth,d=r+("carousel"===this.getAttribute("mode")?.8*s/2:s/2);for(let i=0;i<l;i++){let l=this.children[i];if(l){let r=(n?l.offsetTop:l.offsetLeft)+o/2-d,s=Math.abs(r);s<t&&(e=i,t=s,a=r)}}}return{current:e,minDistanceToMid:t,minOffsetToMid:a}}get current(){return this.#aL().current}set current(e){if(this.current===e)return;let t=null===this.getAttribute("smooth-scroll");this.#aI(e,t?"smooth":"instant")}#aI(e,t){let a=this.children.item(e);if(a){let e=this.isVertical,i=0;i="flat-coverflow"===this.getAttribute("mode")?e?a.offsetTop-a.offsetHeight/3:a.offsetLeft-a.offsetWidth/3:e?a.offsetTop:a.offsetLeft,this.#tK().scrollTo({left:e?0:i,top:e?i:0,behavior:t})}}get snapDistance(){return this.#aL().minOffsetToMid}get isVertical(){return null!==this.getAttribute("vertical")}get circularPlay(){return null!==this.getAttribute("circular")}scrollToNext(){this.current===this.childElementCount-1?this.circularPlay&&(this.current=0):this.current+=1}scrollToPrevious(){let e=this.current,t=this.childElementCount;0===e?this.circularPlay&&(this.current=t-1):this.current}connectedCallback(){let e=this.getAttribute("current");null!==e&&this.#aI(Number(e),"instant")}get[rp](){return this}static{rn(iF,ij)}}),iq=[rd("inline-image",[(iW=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;iU=[ry("src",!0)],ri(this,iV={value:rl(function(e){e?this.#a_().setAttribute("src",e):this.#a_().removeAttribute("src")},"#handleSrc")},iU,{kind:"method",name:"#handleSrc",static:!1,private:!0,access:{has:e=>#em in e,get:e=>e.#em},metadata:e},null,iW),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["src"];#I=rn(this,iW);constructor(e){this.#I=e}#a_=rS(()=>this.#I.shadowRoot,"#img");get #em(){return iV.value}})],rI` <img id="img" part="img" /> `)],iX=[],iK=HTMLElement,(class extends iK{static{iB=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(iK[Symbol.metadata]??null):void 0;ri(null,iz={value:iB},iq,{kind:"class",name:iB.name,metadata:e},null,iX),iB=iz.value,e&&Object.defineProperty(iB,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),rn(iB,iX)}}),iQ=[rd("inline-text",[])],iJ=[],iZ=HTMLElement,(class extends iZ{static{iY=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(iZ[Symbol.metadata]??null):void 0;ri(null,iG={value:iY},iQ,{kind:"class",name:iY.name,metadata:e},null,iJ),iY=iG.value,e&&Object.defineProperty(iY,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),rn(iY,iJ)}}),i2=[rd("inline-truncation",[])],i3=[],i8=HTMLElement,C=class extends i8{static{i1=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(i8[Symbol.metadata]??null):void 0;ri(null,i0={value:i1},i2,{kind:"class",name:i1.name,metadata:e},null,i3),C=i1=i0.value,e&&Object.defineProperty(i1,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static XEnableCustomTruncation="x-text-custom-overflow";connectedCallback(){CSS.supports("selector(:has(inline-truncation))")||this.parentElement?.tagName!=="X-TEXT"||this.matches("inline-truncation ~ inline-truncation")||this.parentElement.setAttribute(C.XEnableCustomTruncation,""),this.setAttribute("slot","inline-truncation")}disconnectedCallback(){this.parentElement?.removeAttribute(C.XEnableCustomTruncation)}static{rn(i1,i3)}},C=i1,ne=[rd("raw-text",[(i7=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;i4=[ry("text",!0)],ri(this,i5={value:rl(function(e){this.#ak?.remove(),e&&(this.#ak=new Text(e),this.#I.append(this.#ak))},"#handleText")},i4,{kind:"method",name:"#handleText",static:!1,private:!0,access:{has:e=>#aA in e,get:e=>e.#aA},metadata:e},null,i7),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["text"];#I=rn(this,i7);#ak;constructor(e){this.#I=e}get #aA(){return i5.value}})])],nt=[],na=HTMLElement,class extends na{static{i9=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(na[Symbol.metadata]??null):void 0;ri(null,i6={value:i9},ne,{kind:"class",name:i9.name,metadata:e},null,nt),i9=i6.value,e&&Object.defineProperty(i9,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),rn(i9,nt)}};let rG=(ns=[],class e{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;ni=[ry("text-maxlength",!0),ry("text-maxline",!0),ry("tail-color-convert",!0)],nl=[rg("layout")],ri(this,nn={value:rl(function(){this.#aM=parseFloat(this.#I.getAttribute("text-maxlength")??""),this.#aP=parseFloat(this.#I.getAttribute("text-maxline")??""),this.#aR="false"!==this.#I.getAttribute("tail-color-convert"),this.#aM<0&&(this.#aM=NaN),this.#aP<1&&(this.#aP=NaN),isNaN(this.#aP)?this.#aD().style.removeProperty("-webkit-line-clamp"):this.#aD().style.webkitLineClamp=this.#aP.toString(),this.#aN()},"#handleAttributeChange")},ni,{kind:"method",name:"#handleAttributeChange",static:!1,private:!0,access:{has:e=>#aF in e,get:e=>e.#aF},metadata:e},null,ns),ri(this,nr={value:rl(function(e){this.#aH=e},"#handleEnableLayoutEvent")},nl,{kind:"method",name:"#handleEnableLayoutEvent",static:!1,private:!0,access:{has:e=>#aj in e,get:e=>e.#aj},metadata:e},null,ns),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"];#a$=(rn(this,ns),!1);#aU=!1;#aV=new Map;#aW;#F;#az;#aB;#aq=!1;#aM=NaN;#aP=NaN;#aR=!0;#aH=!1;get #aX(){return!this.#aK&&!this.#aR}get #aK(){if(CSS.supports("selector(:has(inline-truncation))"))return this.#I.matches(":has(inline-truncation)");{let e=this.#I.querySelector("inline-truncation");if(e?.parentElement===this.#I)return!0}return!1}get #aG(){return!isNaN(this.#aP)&&(this.#aK||!this.#aR)}#I;constructor(e){this.#I=e}#aD=rS(()=>this.#I.shadowRoot,"#inner-box");#aY(e){e.forEach(e=>{e.removedNodes.forEach(e=>{this.#aV.delete(e)}),"characterData"===e.type&&void 0!==this.#aV.get(e.target)&&this.#aV.set(e.target,e.target.data)})}#aQ(){for(let[t,a]of this.#aV)t.nodeType===Node.TEXT_NODE?void 0!==a&&(t.data=a):t.removeAttribute(e.exceedMathLengthAttribute);this.#I.removeAttribute(e.exceedMathLengthAttribute),this.#I.removeAttribute(e.showInlineTruncation)}#aJ(e){let t=[],a=e;for(;a=a.nextSibling;)(a.nodeType===Node.TEXT_NODE||a.nodeType===Node.ELEMENT_NODE)&&t.push(a);return t}#aN(){!(!this.#aU||this.#I.matches("x-text>x-text"))&&(this.#a$||(this.#a$=!0,ro(async()=>{await this.#aZ(),this.#a0(),this.#a$=!1})))}async #aZ(){if(this.#az?.parentElement?.removeChild(this.#az),this.#aQ(),!this.#aG&&isNaN(this.#aM))return;await document.fonts.ready;let t=this.#aD().getBoundingClientRect();this.#aB=new rY(this.#I,t);let a=this.#aB,i=(isNaN(this.#aM)?void 0:a.getNodeInfoByCharIndex(this.#aM))?this.#aM:1/0,n=this.#aG&&a.getLineInfo(this.#aP)?a.getLineInfo(this.#aP-1):void 0,l=1/0,r=3;if(n){let{start:i,end:s}=n,o=s-i;if(this.#aK){this.#I.setAttribute(e.showInlineTruncation,"");let n=this.#I.querySelector("inline-truncation").getBoundingClientRect(),r=t.width,o=n.width;if(r>o){l=s-1;let e=document.createRange(),t=a.getNodeInfoByCharIndex(l),i=s-t.start;for(e.setEnd(t.node,i),e.setStart(t.node,i);e.getBoundingClientRect().width<o&&(l-=1)&&(t=a.getNodeInfoByCharIndex(l));)e.setStart(t.node,l-t.start)}else l=i,this.#I.removeAttribute(e.showInlineTruncation)}else o<3?(r=o,l=i):l=s-3}let s=Math.min(i,l);if(s<1/0){let t=a.getNodeInfoByCharIndex(s);if(t){let i=s-t.start,n=t.node,l=[];n.nodeType===Node.TEXT_NODE?(this.#aV.set(n,n.data),n.data=n.data.substring(0,i)):l.push(n),l=l.concat(this.#aJ(n));let o=n.parentElement;for(;o!==this.#I;)l=l.concat(this.#aJ(o)),o=o.parentElement;if(l.forEach(t=>{t.nodeType===Node.TEXT_NODE&&0!==t.data.length?(this.#aV.set(t,t.data),t.data=""):t.nodeType===Node.ELEMENT_NODE&&(this.#aV.set(t,""),t.setAttribute(e.exceedMathLengthAttribute,""))}),this.#aX){let e=(0===i?a.nodelist.at(t.nodeIndex-1)?.parentElement:n.parentElement)??n.parentElement;this.#az=new Text(Array(r).fill(".").join("")),e.append(this.#az)}this.#I.setAttribute(e.exceedMathLengthAttribute,"")}this.#a1(s)}}#a2=e=>{this.#aY(e),this.#aN()};#a3=()=>{if(this.#aq){this.#aq=!1;return}this.#aN()};#a0(){this.#aU&&((this.#aM||this.#aP)&&!this.#aW&&(this.#aW=new MutationObserver(this.#a2),this.#aW.observe(this.#I,{subtree:!0,childList:!0,attributes:!1,characterData:!0})),this.#aP&&!this.#F&&(this.#F=new ResizeObserver(this.#a3),this.#aq=!0,this.#F.observe(this.#aD(),{box:"content-box"})))}#a8(){this.#aW?.disconnect(),this.#aW=void 0,this.#F?.disconnect(),this.#F=void 0}get #aF(){return nn.value}get #aj(){return nr.value}#a1(e){if(!this.#aH)return;let t=new Proxy(this,{get:(t,a)=>"lineCount"===a?(t.#aB||(t.#aB=new rY(t.#I,t.#I.getBoundingClientRect())),t.#aB.getLineCount()):"lines"===a?new Proxy(t,{get(t,a){let i=parseFloat(a.toString());if(!isNaN(i)){t.#aB||(t.#aB=new rY(t.#I,t.#I.getBoundingClientRect()));let a=t.#aB.getLineInfo(i);if(a)return new Proxy(a,{get(t,a){switch(a){case"start":case"end":return t[a];case"ellipsisCount":if(void 0!==e&&e>=t.start&&e<t.end)return t.end-e;return 0}}})}}}):void 0});this.#I.dispatchEvent(new CustomEvent("layout",{...rc,detail:t}))}dispose(){this.#a8()}connectedCallback(){this.#aU=!0,this.#aj(this.#aH),this.#aF(),ro(()=>{this.#a1()})}});class rY{#a4=[{start:0}];#a5=[];#a7=[];#I;#a6;nodelist;constructor(e,t){this.#I=e,this.nodelist=new rQ(this.#I),this.#a6=t}#a9(e){if(e.node.nodeType!==Node.TEXT_NODE)return 1;{let{rect:t,rectIndex:a}=e,i=e.node,n=document.createRange();n.selectNode(i);for(let e=0;e<i.data.length;e++){n.setEnd(i,e);let l=n.getClientRects().item(a);if(l&&l.right===t.right)return e}return i.data.length}}#ie(e){if(this.#a5[e])return;let{left:t}=this.#a6,a=this.#a5[this.#a5.length-1],i=a?.[a.length-1],n=i?.nodeIndex?i?.nodeIndex+1:0;for(let a=n,i;(i=this.#it(a))&&e>=this.#a5.length;a++){let e,{node:a}=i;if(a.nodeType===Node.ELEMENT_NODE)e=a.getClientRects();else{let t=document.createRange();t.selectNode(a),e=t.getClientRects()}if(e.length>0){let a=this.#a5[this.#a5.length-1],n=e[0];if(.2>Math.abs(n.left-t)||!a?this.#a5.push([{...i,rect:n,rectIndex:0}]):a.push({...i,rect:n,rectIndex:0}),e.length>1)for(let a=1;a<e.length;a++){let l=e[a];(l.left!==n.left||l.bottom!==n.bottom)&&(.2>Math.abs(l.left-t)?this.#a5.push([{...i,rect:l,rectIndex:a}]):this.#a5[this.#a5.length-1].push({...i,rect:l,rectIndex:a}))}}}}getLineCount(){return this.#ie(1/0),this.#a5.length}getLineInfo(e){if(this.#ie(e+1),e<this.#a5.length){let t=e>0?this.#a4[e-1]??{}:void 0,a=this.#a4[e]??{},i=e<this.#a5.length-1?this.#a4[e+1]??{}:void 0;if(void 0===a.start){let i=this.#a5[e-1],n=i[i.length-1],l=this.#a9(n),r=n.start+l;t&&(t.end=r),a.start=r+1}if(void 0===a.end){let t=this.#a5[e],n=t[t.length-1];if(e===this.#a5.length-1){let e=n.node.nodeType===Node.TEXT_NODE?n.node.data.length:1;a.end=n.start+e}else{let e=this.#a9(n);a.end=n.start+e,i.start=a.end+1}}return a}}#it(e){let t=this.#a7.length-1,a=this.#a7[t],i=a?a.start+a.length:0;for(let t=this.#a7.length,a;(a=this.nodelist.at(t))&&e>=this.#a7.length;t++){let e=a.nodeType===Node.ELEMENT_NODE?1:a.data.length,n={node:a,length:e,start:i,nodeIndex:t};this.#a7.push(n)}return this.#a7[e]}getNodeInfoByCharIndex(e){let t,a=0,i=this.#a7.length-1;for(;a<=i;){let n=Math.floor((a+i)/2),l=this.#a7[n],r=l.node,s=r.nodeType===Node.TEXT_NODE?r.data.length:1,o=l.start;if(e>=o&&e<o+s){t=l;break}e<o?i=n-1:a=n+1}if(t)return t;for(let t=this.#a7.length,a;a=this.#it(t);t++)if(e<a.start+a.length)return a}}class rQ{#ia=[];#ii;constructor(e){this.#ii=document.createTreeWalker(e,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,e=>{if(e.nodeType===Node.ELEMENT_NODE){let t=e.tagName;if("X-TEXT"===t||"INLINE-TEXT"===t||"RAW-TEXT"===t||"LYNX-WRAPPER"===t)return NodeFilter.FILTER_SKIP}return NodeFilter.FILTER_ACCEPT})}at(e){return this.#ia[e]||this.#il(e),this.#ia[e]}#il(e){let t=null;for(;e>=this.#ia.length&&(t=this.#ii.nextNode());){this.#ia.push(t);break}}}nh=[rd("x-text",[rf,rG],rI`<div id="inner-box" part="inner-box"><slot part="slot"></slot><slot name="inline-truncation"></slot></div>`)],nc=[],nu=HTMLElement,(class extends nu{static{nd=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(nu[Symbol.metadata]??null):void 0;ri(null,no={value:nd},nh,{kind:"class",name:nd.name,metadata:e},null,nc),nd=no.value,e&&Object.defineProperty(nd,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(rL.eventName,{bubbles:!0,composed:!0,detail:e.scrollIntoViewOptions})):super.scrollIntoView(e)}[rb]=this;static{rn(nd,nc)}}),le=[rd("x-textarea",[rf,(nf=[],ny=[],nE=[],nS=[],nw=[],nC=[],nx=[],nT=[],nO=[],nL=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;nm=[ry("placeholder-color",!0)],np=[ry("placeholder-font-size",!0)],nv=[ry("placeholder-font-weight",!0)],ng=[ry("placeholder-font-family",!0)],nb=[ry("placeholder",!0)],ri(null,null,nm,{kind:"field",name:"#updatePlaceholderColor",static:!1,private:!0,access:{has:e=>#ir in e,get:e=>e.#ir,set:(e,t)=>{e.#ir=t}},metadata:e},nf,ny),ri(null,null,np,{kind:"field",name:"#updatePlaceholderFontSize",static:!1,private:!0,access:{has:e=>#is in e,get:e=>e.#is,set:(e,t)=>{e.#is=t}},metadata:e},nE,nS),ri(null,null,nv,{kind:"field",name:"#updatePlaceholderFontWeight",static:!1,private:!0,access:{has:e=>#io in e,get:e=>e.#io,set:(e,t)=>{e.#io=t}},metadata:e},nw,nC),ri(null,null,ng,{kind:"field",name:"#updatePlaceholderFontFamily",static:!1,private:!0,access:{has:e=>#id in e,get:e=>e.#id,set:(e,t)=>{e.#id=t}},metadata:e},nx,nT),ri(null,null,nb,{kind:"field",name:"#handlePlaceholder",static:!1,private:!0,access:{has:e=>#ih in e,get:e=>e.#ih,set:(e,t)=>{e.#ih=t}},metadata:e},nO,nL),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"];#ic=rS(()=>this.#I.shadowRoot,"#textarea");#ir=rn(this,nf,rw(this.#ic,"--placeholder-color",void 0,!0));#is=(rn(this,ny),rn(this,nE,rw(this.#ic,"--placeholder-font-size",void 0,!0)));#io=(rn(this,nS),rn(this,nw,rw(this.#ic,"--placeholder-font-weight",void 0,!0)));#id=(rn(this,nC),rn(this,nx,rw(this.#ic,"--placeholder-font-family",void 0,!0)));#ih=(rn(this,nT),rn(this,nO,r_(this.#ic,"placeholder")));#I=rn(this,nL);constructor(e){this.#I=e}}),(nP=[],nR=[],nD=[],nN=[],nF=[],nH=[],nj=[],n$=[],nU=[],nV=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;nI=[ry("confirm-type",!0)],n_=[ry("maxlength",!0)],nk=[ry("readonly",!0)],nA=[ry("ios-spell-check",!0)],nM=[ry("show-soft-input-onfocus",!0)],ri(null,null,nI,{kind:"field",name:"#handlerConfirmType",static:!1,private:!0,access:{has:e=>#tr in e,get:e=>e.#tr,set:(e,t)=>{e.#tr=t}},metadata:e},nP,nR),ri(null,null,n_,{kind:"field",name:"#handlerMaxlength",static:!1,private:!0,access:{has:e=>#ts in e,get:e=>e.#ts,set:(e,t)=>{e.#ts=t}},metadata:e},nD,nN),ri(null,null,nk,{kind:"field",name:"#handleReadonly",static:!1,private:!0,access:{has:e=>#to in e,get:e=>e.#to,set:(e,t)=>{e.#to=t}},metadata:e},nF,nH),ri(null,null,nA,{kind:"field",name:"#handleSpellCheck",static:!1,private:!0,access:{has:e=>#td in e,get:e=>e.#td,set:(e,t)=>{e.#td=t}},metadata:e},nj,n$),ri(null,null,nM,{kind:"field",name:"#handleShowSoftInputOnfocus",static:!1,private:!0,access:{has:e=>#iu in e,get:e=>e.#iu,set:(e,t)=>{e.#iu=t}},metadata:e},nU,nV),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"];#I;#im=rS(()=>this.#I.shadowRoot,"#textarea");#tr=rn(this,nP,r_(this.#im,"enterkeyhint",e=>null===e?"send":e));#ts=(rn(this,nR),rn(this,nD,r_(this.#im,"maxlength",e=>null===e?"140":e)));#to=(rn(this,nN),rn(this,nF,r_(this.#im,"readonly",e=>null!==e?"":null)));#td=(rn(this,nH),rn(this,nj,r_(this.#im,"spellcheck",e=>null===e?"false":"true")));#iu=(rn(this,n$),rn(this,nU,r_(this.#im,"virtualkeyboardpolicy",e=>null===e?"manual":"auto")));constructor(e){rn(this,nV),this.#I=e}}),(nY=[],nQ=[],nJ=[],nZ=[],n0=[],n1=[],n2=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;nW=[ry("confirm-enter",!0)],nB=[ry("disabled",!0)],nq=[ry("max-height",!0)],nX=[ry("min-height",!0)],nK=[ry("value",!1)],ri(this,nz={value:rl(function(e){this.#ip=null!==e},"#handleConfirmEnter")},nW,{kind:"method",name:"#handleConfirmEnter",static:!1,private:!0,access:{has:e=>#iv in e,get:e=>e.#iv},metadata:e},null,nY),ri(this,nG={value:rl(function(e){if(e){let t=parseFloat(this.#I.getAttribute("maxlength")??"");isNaN(t)||(e=e.substring(0,t))}else e="";let t=this.#im();t.value!==e&&(t.value=e)},"#handleValue")},nK,{kind:"method",name:"#handleValue",static:!1,private:!0,access:{has:e=>#tt in e,get:e=>e.#tt},metadata:e},null,nY),ri(null,null,nB,{kind:"field",name:"#handleDisabled",static:!1,private:!0,access:{has:e=>#ta in e,get:e=>e.#ta,set:(e,t)=>{e.#ta=t}},metadata:e},nQ,nJ),ri(null,null,nq,{kind:"field",name:"#handleMaxHeight",static:!1,private:!0,access:{has:e=>#ig in e,get:e=>e.#ig,set:(e,t)=>{e.#ig=t}},metadata:e},nZ,n0),ri(null,null,nX,{kind:"field",name:"#handleMinHeight",static:!1,private:!0,access:{has:e=>#ib in e,get:e=>e.#ib,set:(e,t)=>{e.#ib=t}},metadata:e},n1,n2),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["confirm-enter","disabled","max-height","min-height","value"];#I=rn(this,nY);#im=rS(()=>this.#I.shadowRoot,"#textarea");#tg=rS(()=>this.#I.shadowRoot,"#form");#ip=!1;get #iv(){return nz.value}#ta=rn(this,nQ,r_(this.#im,"disabled",e=>null!==e?"":null));#ig=(rn(this,nJ),rn(this,nZ,rw(this.#im,"max-height")));#ib=(rn(this,n0),rn(this,n1,rw(this.#im,"min-height")));get #tt(){return nG.value}#iy=(rn(this,n2),e=>{this.#ip&&"Enter"===e.key&&this.#tg().dispatchEvent(new SubmitEvent("submit"))});constructor(e){this.#I=e,this.#im().addEventListener("keyup",this.#iy)}}),(n7=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;n3=[rg("input")],n4=[ry("send-composing-input",!0)],ri(this,n8={value:rl(function(e){let t=this.#im();e?(t.addEventListener("input",this.#tc,{passive:!0}),t.addEventListener("compositionend",this.#tu,{passive:!0})):(t.removeEventListener("input",this.#tc),t.removeEventListener("compositionend",this.#tu))},"#handleEnableConfirmEvent")},n3,{kind:"method",name:"#handleEnableConfirmEvent",static:!1,private:!0,access:{has:e=>#tm in e,get:e=>e.#tm},metadata:e},null,n7),ri(this,n5={value:rl(function(e){this.#tp=null!==e},"#handleSendComposingInput")},n4,{kind:"method",name:"#handleSendComposingInput",static:!1,private:!0,access:{has:e=>#tv in e,get:e=>e.#tv},metadata:e},null,n7),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["send-composing-input"];#I=rn(this,n7);#tp=!1;#im=rS(()=>this.#I.shadowRoot,"#textarea");#tg=rS(()=>this.#I.shadowRoot,"#form");get #tm(){return n8.value}get #tv(){return n5.value}#tb=e=>{let t=rB[e.type]??e.type;this.#I.dispatchEvent(new CustomEvent(t,{...rc,detail:{value:this.#im().value}}))};#tc=e=>{let t=this.#im(),a=t.value,i=e.isComposing;(!i||this.#tp)&&this.#I.dispatchEvent(new CustomEvent("input",{...rc,detail:{value:a,textLength:a.length,cursor:t.selectionStart,isComposing:i}}))};#tu=()=>{let e=this.#im(),t=e.value;this.#tp||this.#I.dispatchEvent(new CustomEvent("input",{...rc,detail:{value:t,textLength:t.length,cursor:e.selectionStart}}))};#tf=e=>{e.target===this.#im()&&"number"==typeof e.detail&&e.stopImmediatePropagation()};constructor(e){this.#I=e;let t=this.#im(),a=this.#tg();t.addEventListener("blur",this.#tb,{passive:!0}),t.addEventListener("focus",this.#tb,{passive:!0}),a.addEventListener("submit",this.#tb,{passive:!0}),a.addEventListener("input",this.#tf,{passive:!0})}})],rI`<style>
|
|
214
|
+
</div>`)],ij=[],i$=HTMLElement,(class extends i${static{iF=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(i$[Symbol.metadata]??null):void 0;ri(null,iN={value:iF},iH,{kind:"class",name:iF.name,metadata:e},null,ij),iF=iN.value,e&&Object.defineProperty(iF,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static notToFilterFalseAttributes=new Set(["smooth-scroll","indicator-dots"]);#tK=rS(()=>this.shadowRoot,"#content").bind(this);#aI(){let e=0,t=Number.MAX_SAFE_INTEGER,a=0;if(this.childElementCount>0){let i=this.#tK(),n=this.isVertical,l=this.childElementCount,r=n?i.scrollTop:i.scrollLeft,s=n?i.clientHeight:i.clientWidth,o=n?this.firstElementChild.offsetHeight:this.firstElementChild.offsetWidth,d=r+("carousel"===this.getAttribute("mode")?.8*s/2:s/2);for(let i=0;i<l;i++){let l=this.children[i];if(l){let r=(n?l.offsetTop:l.offsetLeft)+o/2-d,s=Math.abs(r);s<t&&(e=i,t=s,a=r)}}}return{current:e,minDistanceToMid:t,minOffsetToMid:a}}get currentIndex(){return this.#aI().current}set currentIndex(e){if(this.currentIndex===e)return;let t=null===this.getAttribute("smooth-scroll");this.#aL(e,t?"smooth":"instant")}#aL(e,t){let a=this.children.item(e);if(a){let e=this.isVertical,i=0;i="flat-coverflow"===this.getAttribute("mode")?e?a.offsetTop-a.offsetHeight/3:a.offsetLeft-a.offsetWidth/3:e?a.offsetTop:a.offsetLeft,this.#tK().scrollTo({left:e?0:i,top:e?i:0,behavior:t})}}get snapDistance(){return this.#aI().minOffsetToMid}get isVertical(){return null!==this.getAttribute("vertical")}get circularPlay(){return null!==this.getAttribute("circular")}scrollToNext(){this.currentIndex===this.childElementCount-1?this.circularPlay&&(this.currentIndex=0):this.currentIndex+=1}scrollToPrevious(){let e=this.currentIndex,t=this.childElementCount;0===e?this.circularPlay&&(this.currentIndex=t-1):this.currentIndex=t-1}connectedCallback(){let e=this.getAttribute("current");null!==e&&this.#aL(Number(e),"instant")}get[rp](){return this}static{rn(iF,ij)}}),iq=[rd("inline-image",[(iW=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;iU=[ry("src",!0)],ri(this,iV={value:rl(function(e){e?this.#a_().setAttribute("src",e):this.#a_().removeAttribute("src")},"#handleSrc")},iU,{kind:"method",name:"#handleSrc",static:!1,private:!0,access:{has:e=>#em in e,get:e=>e.#em},metadata:e},null,iW),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["src"];#L=rn(this,iW);constructor(e){this.#L=e}#a_=rS(()=>this.#L.shadowRoot,"#img");get #em(){return iV.value}})],rL` <img id="img" part="img" /> `)],iX=[],iK=HTMLElement,(class extends iK{static{iB=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(iK[Symbol.metadata]??null):void 0;ri(null,iz={value:iB},iq,{kind:"class",name:iB.name,metadata:e},null,iX),iB=iz.value,e&&Object.defineProperty(iB,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),rn(iB,iX)}}),iQ=[rd("inline-text",[])],iJ=[],iZ=HTMLElement,(class extends iZ{static{iY=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(iZ[Symbol.metadata]??null):void 0;ri(null,iG={value:iY},iQ,{kind:"class",name:iY.name,metadata:e},null,iJ),iY=iG.value,e&&Object.defineProperty(iY,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),rn(iY,iJ)}}),i2=[rd("inline-truncation",[])],i3=[],i8=HTMLElement,C=class extends i8{static{i1=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(i8[Symbol.metadata]??null):void 0;ri(null,i0={value:i1},i2,{kind:"class",name:i1.name,metadata:e},null,i3),C=i1=i0.value,e&&Object.defineProperty(i1,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static XEnableCustomTruncation="x-text-custom-overflow";connectedCallback(){CSS.supports("selector(:has(inline-truncation))")||this.parentElement?.tagName!=="X-TEXT"||this.matches("inline-truncation ~ inline-truncation")||this.parentElement.setAttribute(C.XEnableCustomTruncation,""),this.setAttribute("slot","inline-truncation")}disconnectedCallback(){this.parentElement?.removeAttribute(C.XEnableCustomTruncation)}static{rn(i1,i3)}},C=i1,ne=[rd("raw-text",[(i6=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;i5=[ry("text",!0)],ri(this,i4={value:rl(function(e){this.#ak?.remove(),e&&(this.#ak=new Text(e),this.#L.append(this.#ak))},"#handleText")},i5,{kind:"method",name:"#handleText",static:!1,private:!0,access:{has:e=>#aA in e,get:e=>e.#aA},metadata:e},null,i6),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["text"];#L=rn(this,i6);#ak;constructor(e){this.#L=e}get #aA(){return i4.value}})])],nt=[],na=HTMLElement,class extends na{static{i7=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(na[Symbol.metadata]??null):void 0;ri(null,i9={value:i7},ne,{kind:"class",name:i7.name,metadata:e},null,nt),i7=i9.value,e&&Object.defineProperty(i7,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),rn(i7,nt)}};let rG=(ns=[],class e{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;ni=[ry("text-maxlength",!0),ry("text-maxline",!0),ry("tail-color-convert",!0)],nl=[rg("layout")],ri(this,nn={value:rl(function(){this.#aM=parseFloat(this.#L.getAttribute("text-maxlength")??""),this.#aP=parseFloat(this.#L.getAttribute("text-maxline")??""),this.#aR="false"!==this.#L.getAttribute("tail-color-convert"),this.#aM<0&&(this.#aM=NaN),this.#aP<1&&(this.#aP=NaN),isNaN(this.#aP)?this.#aD().style.removeProperty("-webkit-line-clamp"):this.#aD().style.webkitLineClamp=this.#aP.toString(),this.#aN()},"#handleAttributeChange")},ni,{kind:"method",name:"#handleAttributeChange",static:!1,private:!0,access:{has:e=>#aF in e,get:e=>e.#aF},metadata:e},null,ns),ri(this,nr={value:rl(function(e){this.#aH=e},"#handleEnableLayoutEvent")},nl,{kind:"method",name:"#handleEnableLayoutEvent",static:!1,private:!0,access:{has:e=>#aj in e,get:e=>e.#aj},metadata:e},null,ns),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"];#a$=(rn(this,ns),!1);#aU=!1;#aV=new Map;#aW;#F;#az;#aB;#aq=!1;#aM=NaN;#aP=NaN;#aR=!0;#aH=!1;get #aX(){return!this.#aK&&!this.#aR}get #aK(){if(CSS.supports("selector(:has(inline-truncation))"))return this.#L.matches(":has(inline-truncation)");{let e=this.#L.querySelector("inline-truncation");if(e?.parentElement===this.#L)return!0}return!1}get #aG(){return!isNaN(this.#aP)&&(this.#aK||!this.#aR)}#L;constructor(e){this.#L=e}#aD=rS(()=>this.#L.shadowRoot,"#inner-box");#aY(e){e.forEach(e=>{e.removedNodes.forEach(e=>{this.#aV.delete(e)}),"characterData"===e.type&&void 0!==this.#aV.get(e.target)&&this.#aV.set(e.target,e.target.data)})}#aQ(){for(let[t,a]of this.#aV)t.nodeType===Node.TEXT_NODE?void 0!==a&&(t.data=a):t.removeAttribute(e.exceedMathLengthAttribute);this.#L.removeAttribute(e.exceedMathLengthAttribute),this.#L.removeAttribute(e.showInlineTruncation)}#aJ(e){let t=[],a=e;for(;a=a.nextSibling;)(a.nodeType===Node.TEXT_NODE||a.nodeType===Node.ELEMENT_NODE)&&t.push(a);return t}#aN(){!(!this.#aU||this.#L.matches("x-text>x-text"))&&(this.#a$||(this.#a$=!0,ro(async()=>{await this.#aZ(),this.#a0(),this.#a$=!1})))}async #aZ(){if(this.#az?.parentElement?.removeChild(this.#az),this.#aQ(),!this.#aG&&isNaN(this.#aM))return;await document.fonts.ready;let t=this.#aD().getBoundingClientRect();this.#aB=new rY(this.#L,t);let a=this.#aB,i=(isNaN(this.#aM)?void 0:a.getNodeInfoByCharIndex(this.#aM))?this.#aM:1/0,n=this.#aG&&a.getLineInfo(this.#aP)?a.getLineInfo(this.#aP-1):void 0,l=1/0,r=3;if(n){let{start:i,end:s}=n,o=s-i;if(this.#aK){this.#L.setAttribute(e.showInlineTruncation,"");let n=this.#L.querySelector("inline-truncation").getBoundingClientRect(),r=t.width,o=n.width;if(r>o){l=s-1;let e=document.createRange(),t=a.getNodeInfoByCharIndex(l),i=s-t.start;for(e.setEnd(t.node,i),e.setStart(t.node,i);e.getBoundingClientRect().width<o&&(l-=1)&&(t=a.getNodeInfoByCharIndex(l));)e.setStart(t.node,l-t.start)}else l=i,this.#L.removeAttribute(e.showInlineTruncation)}else o<3?(r=o,l=i):l=s-3}let s=Math.min(i,l);if(s<1/0){let t=a.getNodeInfoByCharIndex(s);if(t){let i=s-t.start,n=t.node,l=[];n.nodeType===Node.TEXT_NODE?(this.#aV.set(n,n.data),n.data=n.data.substring(0,i)):l.push(n),l=l.concat(this.#aJ(n));let o=n.parentElement;for(;o!==this.#L;)l=l.concat(this.#aJ(o)),o=o.parentElement;if(l.forEach(t=>{t.nodeType===Node.TEXT_NODE&&0!==t.data.length?(this.#aV.set(t,t.data),t.data=""):t.nodeType===Node.ELEMENT_NODE&&(this.#aV.set(t,""),t.setAttribute(e.exceedMathLengthAttribute,""))}),this.#aX){let e=(0===i?a.nodelist.at(t.nodeIndex-1)?.parentElement:n.parentElement)??n.parentElement;this.#az=new Text(Array(r).fill(".").join("")),e.append(this.#az)}this.#L.setAttribute(e.exceedMathLengthAttribute,"")}this.#a1(s)}}#a2=e=>{this.#aY(e),this.#aN()};#a3=()=>{if(this.#aq){this.#aq=!1;return}this.#aN()};#a0(){this.#aU&&((this.#aM||this.#aP)&&!this.#aW&&(this.#aW=new MutationObserver(this.#a2),this.#aW.observe(this.#L,{subtree:!0,childList:!0,attributes:!1,characterData:!0})),this.#aP&&!this.#F&&(this.#F=new ResizeObserver(this.#a3),this.#aq=!0,this.#F.observe(this.#aD(),{box:"content-box"})))}#a8(){this.#aW?.disconnect(),this.#aW=void 0,this.#F?.disconnect(),this.#F=void 0}get #aF(){return nn.value}get #aj(){return nr.value}#a1(e){if(!this.#aH)return;let t=new Proxy(this,{get:(t,a)=>"lineCount"===a?(t.#aB||(t.#aB=new rY(t.#L,t.#L.getBoundingClientRect())),t.#aB.getLineCount()):"lines"===a?new Proxy(t,{get(t,a){let i=parseFloat(a.toString());if(!isNaN(i)){t.#aB||(t.#aB=new rY(t.#L,t.#L.getBoundingClientRect()));let a=t.#aB.getLineInfo(i);if(a)return new Proxy(a,{get(t,a){switch(a){case"start":case"end":return t[a];case"ellipsisCount":if(void 0!==e&&e>=t.start&&e<t.end)return t.end-e;return 0}}})}}}):void 0});this.#L.dispatchEvent(new CustomEvent("layout",{...rc,detail:t}))}dispose(){this.#a8()}connectedCallback(){this.#aU=!0,this.#aj(this.#aH),this.#aF(),ro(()=>{this.#a1()})}});class rY{#a5=[{start:0}];#a4=[];#a6=[];#L;#a9;nodelist;constructor(e,t){this.#L=e,this.nodelist=new rQ(this.#L),this.#a9=t}#a7(e){if(e.node.nodeType!==Node.TEXT_NODE)return 1;{let{rect:t,rectIndex:a}=e,i=e.node,n=document.createRange();n.selectNode(i);for(let e=0;e<i.data.length;e++){n.setEnd(i,e);let l=n.getClientRects().item(a);if(l&&l.right===t.right)return e}return i.data.length}}#ie(e){if(this.#a4[e])return;let{left:t}=this.#a9,a=this.#a4[this.#a4.length-1],i=a?.[a.length-1],n=i?.nodeIndex?i?.nodeIndex+1:0;for(let a=n,i;(i=this.#it(a))&&e>=this.#a4.length;a++){let e,{node:a}=i;if(a.nodeType===Node.ELEMENT_NODE)e=a.getClientRects();else{let t=document.createRange();t.selectNode(a),e=t.getClientRects()}if(e.length>0){let a=this.#a4[this.#a4.length-1],n=e[0];if(.2>Math.abs(n.left-t)||!a?this.#a4.push([{...i,rect:n,rectIndex:0}]):a.push({...i,rect:n,rectIndex:0}),e.length>1)for(let a=1;a<e.length;a++){let l=e[a];(l.left!==n.left||l.bottom!==n.bottom)&&(.2>Math.abs(l.left-t)?this.#a4.push([{...i,rect:l,rectIndex:a}]):this.#a4[this.#a4.length-1].push({...i,rect:l,rectIndex:a}))}}}}getLineCount(){return this.#ie(1/0),this.#a4.length}getLineInfo(e){if(this.#ie(e+1),e<this.#a4.length){let t=e>0?this.#a5[e-1]??{}:void 0,a=this.#a5[e]??{},i=e<this.#a4.length-1?this.#a5[e+1]??{}:void 0;if(void 0===a.start){let i=this.#a4[e-1],n=i[i.length-1],l=this.#a7(n),r=n.start+l;t&&(t.end=r),a.start=r+1}if(void 0===a.end){let t=this.#a4[e],n=t[t.length-1];if(e===this.#a4.length-1){let e=n.node.nodeType===Node.TEXT_NODE?n.node.data.length:1;a.end=n.start+e}else{let e=this.#a7(n);a.end=n.start+e,i.start=a.end+1}}return a}}#it(e){let t=this.#a6.length-1,a=this.#a6[t],i=a?a.start+a.length:0;for(let t=this.#a6.length,a;(a=this.nodelist.at(t))&&e>=this.#a6.length;t++){let e=a.nodeType===Node.ELEMENT_NODE?1:a.data.length,n={node:a,length:e,start:i,nodeIndex:t};this.#a6.push(n)}return this.#a6[e]}getNodeInfoByCharIndex(e){let t,a=0,i=this.#a6.length-1;for(;a<=i;){let n=Math.floor((a+i)/2),l=this.#a6[n],r=l.node,s=r.nodeType===Node.TEXT_NODE?r.data.length:1,o=l.start;if(e>=o&&e<o+s){t=l;break}e<o?i=n-1:a=n+1}if(t)return t;for(let t=this.#a6.length,a;a=this.#it(t);t++)if(e<a.start+a.length)return a}}class rQ{#ia=[];#ii;constructor(e){this.#ii=document.createTreeWalker(e,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,e=>{if(e.nodeType===Node.ELEMENT_NODE){let t=e.tagName;if("X-TEXT"===t||"INLINE-TEXT"===t||"RAW-TEXT"===t||"LYNX-WRAPPER"===t)return NodeFilter.FILTER_SKIP}return NodeFilter.FILTER_ACCEPT})}at(e){return this.#ia[e]||this.#il(e),this.#ia[e]}#il(e){let t=null;for(;e>=this.#ia.length&&(t=this.#ii.nextNode());){this.#ia.push(t);break}}}nh=[rd("x-text",[rf,rG],rL`<div id="inner-box" part="inner-box"><slot part="slot"></slot><slot name="inline-truncation"></slot></div>`)],nc=[],nu=HTMLElement,(class extends nu{static{nd=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(nu[Symbol.metadata]??null):void 0;ri(null,no={value:nd},nh,{kind:"class",name:nd.name,metadata:e},null,nc),nd=no.value,e&&Object.defineProperty(nd,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(rI.eventName,{bubbles:!0,composed:!0,detail:e.scrollIntoViewOptions})):super.scrollIntoView(e)}[rb]=this;static{rn(nd,nc)}}),le=[rd("x-textarea",[rf,(nf=[],ny=[],nE=[],nS=[],nw=[],nC=[],nx=[],nT=[],nO=[],nI=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;nm=[ry("placeholder-color",!0)],np=[ry("placeholder-font-size",!0)],nv=[ry("placeholder-font-weight",!0)],ng=[ry("placeholder-font-family",!0)],nb=[ry("placeholder",!0)],ri(null,null,nm,{kind:"field",name:"#updatePlaceholderColor",static:!1,private:!0,access:{has:e=>#ir in e,get:e=>e.#ir,set:(e,t)=>{e.#ir=t}},metadata:e},nf,ny),ri(null,null,np,{kind:"field",name:"#updatePlaceholderFontSize",static:!1,private:!0,access:{has:e=>#is in e,get:e=>e.#is,set:(e,t)=>{e.#is=t}},metadata:e},nE,nS),ri(null,null,nv,{kind:"field",name:"#updatePlaceholderFontWeight",static:!1,private:!0,access:{has:e=>#io in e,get:e=>e.#io,set:(e,t)=>{e.#io=t}},metadata:e},nw,nC),ri(null,null,ng,{kind:"field",name:"#updatePlaceholderFontFamily",static:!1,private:!0,access:{has:e=>#id in e,get:e=>e.#id,set:(e,t)=>{e.#id=t}},metadata:e},nx,nT),ri(null,null,nb,{kind:"field",name:"#handlePlaceholder",static:!1,private:!0,access:{has:e=>#ih in e,get:e=>e.#ih,set:(e,t)=>{e.#ih=t}},metadata:e},nO,nI),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"];#ic=rS(()=>this.#L.shadowRoot,"#textarea");#ir=rn(this,nf,rw(this.#ic,"--placeholder-color",void 0,!0));#is=(rn(this,ny),rn(this,nE,rw(this.#ic,"--placeholder-font-size",void 0,!0)));#io=(rn(this,nS),rn(this,nw,rw(this.#ic,"--placeholder-font-weight",void 0,!0)));#id=(rn(this,nC),rn(this,nx,rw(this.#ic,"--placeholder-font-family",void 0,!0)));#ih=(rn(this,nT),rn(this,nO,r_(this.#ic,"placeholder")));#L=rn(this,nI);constructor(e){this.#L=e}}),(nP=[],nR=[],nD=[],nN=[],nF=[],nH=[],nj=[],n$=[],nU=[],nV=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;nL=[ry("confirm-type",!0)],n_=[ry("maxlength",!0)],nk=[ry("readonly",!0)],nA=[ry("ios-spell-check",!0)],nM=[ry("show-soft-input-onfocus",!0)],ri(null,null,nL,{kind:"field",name:"#handlerConfirmType",static:!1,private:!0,access:{has:e=>#tr in e,get:e=>e.#tr,set:(e,t)=>{e.#tr=t}},metadata:e},nP,nR),ri(null,null,n_,{kind:"field",name:"#handlerMaxlength",static:!1,private:!0,access:{has:e=>#ts in e,get:e=>e.#ts,set:(e,t)=>{e.#ts=t}},metadata:e},nD,nN),ri(null,null,nk,{kind:"field",name:"#handleReadonly",static:!1,private:!0,access:{has:e=>#to in e,get:e=>e.#to,set:(e,t)=>{e.#to=t}},metadata:e},nF,nH),ri(null,null,nA,{kind:"field",name:"#handleSpellCheck",static:!1,private:!0,access:{has:e=>#td in e,get:e=>e.#td,set:(e,t)=>{e.#td=t}},metadata:e},nj,n$),ri(null,null,nM,{kind:"field",name:"#handleShowSoftInputOnfocus",static:!1,private:!0,access:{has:e=>#iu in e,get:e=>e.#iu,set:(e,t)=>{e.#iu=t}},metadata:e},nU,nV),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"];#L;#im=rS(()=>this.#L.shadowRoot,"#textarea");#tr=rn(this,nP,r_(this.#im,"enterkeyhint",e=>null===e?"send":e));#ts=(rn(this,nR),rn(this,nD,r_(this.#im,"maxlength",e=>null===e?"140":e)));#to=(rn(this,nN),rn(this,nF,r_(this.#im,"readonly",e=>null!==e?"":null)));#td=(rn(this,nH),rn(this,nj,r_(this.#im,"spellcheck",e=>null===e?"false":"true")));#iu=(rn(this,n$),rn(this,nU,r_(this.#im,"virtualkeyboardpolicy",e=>null===e?"manual":"auto")));constructor(e){rn(this,nV),this.#L=e}}),(nY=[],nQ=[],nJ=[],nZ=[],n0=[],n1=[],n2=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;nW=[ry("confirm-enter",!0)],nB=[ry("disabled",!0)],nq=[ry("max-height",!0)],nX=[ry("min-height",!0)],nK=[ry("value",!1)],ri(this,nz={value:rl(function(e){this.#ip=null!==e},"#handleConfirmEnter")},nW,{kind:"method",name:"#handleConfirmEnter",static:!1,private:!0,access:{has:e=>#iv in e,get:e=>e.#iv},metadata:e},null,nY),ri(this,nG={value:rl(function(e){if(e){let t=parseFloat(this.#L.getAttribute("maxlength")??"");isNaN(t)||(e=e.substring(0,t))}else e="";let t=this.#im();t.value!==e&&(t.value=e)},"#handleValue")},nK,{kind:"method",name:"#handleValue",static:!1,private:!0,access:{has:e=>#tt in e,get:e=>e.#tt},metadata:e},null,nY),ri(null,null,nB,{kind:"field",name:"#handleDisabled",static:!1,private:!0,access:{has:e=>#ta in e,get:e=>e.#ta,set:(e,t)=>{e.#ta=t}},metadata:e},nQ,nJ),ri(null,null,nq,{kind:"field",name:"#handleMaxHeight",static:!1,private:!0,access:{has:e=>#ig in e,get:e=>e.#ig,set:(e,t)=>{e.#ig=t}},metadata:e},nZ,n0),ri(null,null,nX,{kind:"field",name:"#handleMinHeight",static:!1,private:!0,access:{has:e=>#ib in e,get:e=>e.#ib,set:(e,t)=>{e.#ib=t}},metadata:e},n1,n2),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["confirm-enter","disabled","max-height","min-height","value"];#L=rn(this,nY);#im=rS(()=>this.#L.shadowRoot,"#textarea");#tg=rS(()=>this.#L.shadowRoot,"#form");#ip=!1;get #iv(){return nz.value}#ta=rn(this,nQ,r_(this.#im,"disabled",e=>null!==e?"":null));#ig=(rn(this,nJ),rn(this,nZ,rw(this.#im,"max-height")));#ib=(rn(this,n0),rn(this,n1,rw(this.#im,"min-height")));get #tt(){return nG.value}#iy=(rn(this,n2),e=>{this.#ip&&"Enter"===e.key&&this.#tg().dispatchEvent(new SubmitEvent("submit"))});constructor(e){this.#L=e,this.#im().addEventListener("keyup",this.#iy)}}),(n6=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;n3=[rg("input")],n5=[ry("send-composing-input",!0)],ri(this,n8={value:rl(function(e){let t=this.#im();e?(t.addEventListener("input",this.#tc,{passive:!0}),t.addEventListener("compositionend",this.#tu,{passive:!0})):(t.removeEventListener("input",this.#tc),t.removeEventListener("compositionend",this.#tu))},"#handleEnableConfirmEvent")},n3,{kind:"method",name:"#handleEnableConfirmEvent",static:!1,private:!0,access:{has:e=>#tm in e,get:e=>e.#tm},metadata:e},null,n6),ri(this,n4={value:rl(function(e){this.#tp=null!==e},"#handleSendComposingInput")},n5,{kind:"method",name:"#handleSendComposingInput",static:!1,private:!0,access:{has:e=>#tv in e,get:e=>e.#tv},metadata:e},null,n6),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["send-composing-input"];#L=rn(this,n6);#tp=!1;#im=rS(()=>this.#L.shadowRoot,"#textarea");#tg=rS(()=>this.#L.shadowRoot,"#form");get #tm(){return n8.value}get #tv(){return n4.value}#tb=e=>{let t=rB[e.type]??e.type;this.#L.dispatchEvent(new CustomEvent(t,{...rc,detail:{value:this.#im().value}}))};#tc=e=>{let t=this.#im(),a=t.value,i=e.isComposing;(!i||this.#tp)&&this.#L.dispatchEvent(new CustomEvent("input",{...rc,detail:{value:a,textLength:a.length,cursor:t.selectionStart,isComposing:i}}))};#tu=()=>{let e=this.#im(),t=e.value;this.#tp||this.#L.dispatchEvent(new CustomEvent("input",{...rc,detail:{value:t,textLength:t.length,cursor:e.selectionStart}}))};#tf=e=>{e.target===this.#im()&&"number"==typeof e.detail&&e.stopImmediatePropagation()};constructor(e){this.#L=e;let t=this.#im(),a=this.#tg();t.addEventListener("blur",this.#tb,{passive:!0}),t.addEventListener("focus",this.#tb,{passive:!0}),a.addEventListener("submit",this.#tb,{passive:!0}),a.addEventListener("input",this.#tf,{passive:!0})}})],rL`<style>
|
|
224
215
|
#textarea:focus,
|
|
225
216
|
#textarea:focus-visible {
|
|
226
217
|
border: inherit;
|
|
@@ -229,7 +220,7 @@
|
|
|
229
220
|
</style>
|
|
230
221
|
<form id="form" part="form" method="dialog">
|
|
231
222
|
<textarea id="textarea" part="textarea"></textarea>
|
|
232
|
-
</form> `)],lt=[],la=HTMLElement,(class extends la{static{
|
|
223
|
+
</form> `)],lt=[],la=HTMLElement,(class extends la{static{n7=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(la[Symbol.metadata]??null):void 0;ri(null,n9={value:n7},le,{kind:"class",name:n7.name,metadata:e},null,lt),n7=n9.value,e&&Object.defineProperty(n7,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),rn(n7,lt)}#ic=rS(()=>this.shadowRoot,"#textarea");get value(){return this.#ic().value}set value(e){this.#ic().value=e}addText(e){let{text:t}=e,a=this.#ic(),i=a.selectionStart;if(null===i)a.value=t;else{let e=a.value;a.value=e.slice(0,i)+t+e.slice(i)}}setValue(e){let t,a=this.#ic();a.value=e.value,(t=e.index)&&a.setSelectionRange(t,t)}sendDelEvent(e){let{action:t,length:a}=e,i=this.#ic();1===t&&(a=1);let n=i.selectionStart;if(null===n){let e=i.value;i.value=i.value.substring(0,e.length-a)}else{let e=i.value;i.value=e.slice(0,n-a)+e.slice(n)}}select(){let e=this.#ic();e.setSelectionRange(0,e.value.length)}setSelectionRange(e){this.#ic().setSelectionRange(e.selectionStart,e.selectionEnd)}}),ll=[rd("x-view",[rf])],lr=[],ls=HTMLElement,(class extends ls{static{ln=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(ls[Symbol.metadata]??null):void 0;ri(null,li={value:ln},ll,{kind:"class",name:ln.name,metadata:e},null,lr),ln=li.value,e&&Object.defineProperty(ln,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),rn(ln,lr)}superScrollIntoView(e){super.scrollIntoView(e)}scrollIntoView(e){"object"==typeof e&&e.scrollIntoViewOptions?this.dispatchEvent(new CustomEvent(rI.eventName,{bubbles:!0,composed:!0,detail:e.scrollIntoViewOptions})):super.scrollIntoView(e)}[rb]=this}),lm=[rd("x-blur-view",[rf,(lh=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;lo=[ry("blur-radius",!0)],ri(this,ld={value:rl(function(e){e?(e=`blur(${parseFloat(e)}px)`,this.#iE().innerHTML=`:host { backdrop-filter: ${e}; -webkit-backdrop-filter: ${e}}`):this.#iE().innerHTML=""},"#handleBlurRadius")},lo,{kind:"method",name:"#handleBlurRadius",static:!1,private:!0,access:{has:e=>#eJ in e,get:e=>e.#eJ},metadata:e},null,lh),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["blur-radius"];#L=rn(this,lh);#iE=rS(()=>this.#L.shadowRoot,"#dynamic-style");get #eJ(){return ld.value}constructor(e){this.#L=e}})],'<style id="dynamic-style"></style><slot></slot>')],lp=[],lv=HTMLElement,(class extends lv{static{lu=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(lv[Symbol.metadata]??null):void 0;ri(null,lc={value:lu},lm,{kind:"class",name:lu.name,metadata:e},null,lp),lu=lc.value,e&&Object.defineProperty(lu,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),rn(lu,lp)}}),lC=[rd("x-viewpager-ng",[rf,(lE=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;lg=[rg("change")],lf=[rg("offsetchange")],ri(this,lb={value:rl(function(e){this.#iS=e,this.#iw()},"#enableChangeEvent")},lg,{kind:"method",name:"#enableChangeEvent",static:!1,private:!0,access:{has:e=>#iC in e,get:e=>e.#iC},metadata:e},null,lE),ri(this,ly={value:rl(function(e){this.#iS=e,this.#iw()},"#enableOffsetChangeEvent")},lf,{kind:"method",name:"#enableOffsetChangeEvent",static:!1,private:!0,access:{has:e=>#ix in e,get:e=>e.#ix},metadata:e},null,lE),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=[];#L=rn(this,lE);#iT=!1;#C=!1;#iO=0;#Y;constructor(e){this.#L=e}#Z=rS(()=>this.#L.shadowRoot,"#content");#iI=()=>{if(!this.#C)return;let e=this.#Z(),t=this.#L.clientWidth,a=e.scrollLeft;this.#iS&&!ru&&(clearTimeout(this.#Y),this.#Y=setTimeout(()=>{this.#iL()},100)),this.#L.dispatchEvent(new CustomEvent("offsetchange",{...rc,detail:{offset:a/t}}))};#iL=()=>{if(this.#C){let e=this.#Z(),t=this.#L.clientWidth,a=Math.floor(e.scrollLeft/t);a!==this.#iO&&(this.#L.dispatchEvent(new CustomEvent("change",{...rc,detail:{index:a,isDragged:this.#iT}})),this.#iO=a)}};#i_=()=>{this.#iT=!0};#ik=()=>{this.#iT=!1};#iS=!1;get #iC(){return lb.value}#iA=!1;get #ix(){return ly.value}#iw(){let e=this.#Z();this.#iA||this.#iS?e.addEventListener("scroll",this.#iI,{passive:!0}):e.removeEventListener("scroll",this.#iI),ru&&this.#iS?e.addEventListener("scrollend",this.#iL,{passive:!0}):e.removeEventListener("scrollend",this.#iL)}connectedCallback(){this.#C=!0;let e=this.#Z();this.#L.addEventListener("touchstart",this.#i_,{passive:!0}),e.addEventListener("touchend",this.#ik,{passive:!0}),e.addEventListener("touchcancel",this.#ik,{passive:!0})}dispose(){let e=this.#Z();e.removeEventListener("scroll",this.#iI),e.removeEventListener("scrollend",this.#iL)}})],rL`
|
|
233
224
|
<style>
|
|
234
225
|
#bounce-padding {
|
|
235
226
|
display: none;
|
|
@@ -257,7 +248,7 @@
|
|
|
257
248
|
<div id="content" part="content">
|
|
258
249
|
<slot></slot>
|
|
259
250
|
</div>
|
|
260
|
-
`)],lx=[],lT=HTMLElement,(class extends lT{static{lw=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(lT[Symbol.metadata]??null):void 0;ri(null,lS={value:lw},lC,{kind:"class",name:lw.name,metadata:e},null,lx),lw=lS.value,e&&Object.defineProperty(lw,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:a}=e;void 0===a&&(a=!0);let i=this.shadowRoot.children.item(2),n=i.clientWidth*t;i.scrollTo({left:n,behavior:a?"smooth":"instant"})}connectedCallback(){let e=this.getAttribute("select-index")||this.getAttribute("initial-select-index");if(null!==e){let t=Number(e),a=this.shadowRoot.children.item(2),i=()=>{0===a.clientWidth?requestAnimationFrame(i):this.selectTab({index:t,smooth:!1})};ro(i)}}get[rp](){return this}static{rn(lw,lx)}}),lI=[rd("x-viewpager-item-ng",[rf])],l_=[],lk=HTMLElement,(class extends lk{static{lL=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(lk[Symbol.metadata]??null):void 0;ri(null,lO={value:lL},lI,{kind:"class",name:lL.name,metadata:e},null,l_),lL=lO.value,e&&Object.defineProperty(lL,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),rn(lL,l_)}}),lP=[rd("list-item",[rf])],lR=[],lD=HTMLElement,class extends lD{static{lM=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(lD[Symbol.metadata]??null):void 0;ri(null,lA={value:lM},lP,{kind:"class",name:lM.name,metadata:e},null,lR),lM=lA.value,e&&Object.defineProperty(lM,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),rn(lM,lR)}};let rJ=(lH=[],lj=[],l$=[],lU=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;lN=[ry("sticky-offset",!0)],lF=[ry("span-count",!0),ry("column-count",!0)],ri(null,null,lN,{kind:"field",name:"#handlerStickyOffset",static:!1,private:!0,access:{has:e=>#iM in e,get:e=>e.#iM,set:(e,t)=>{e.#iM=t}},metadata:e},lH,lj),ri(null,null,lF,{kind:"field",name:"#handlerCount",static:!1,private:!0,access:{has:e=>#iP in e,get:e=>e.#iP,set:(e,t)=>{e.#iP=t}},metadata:e},l$,lU),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"];#I;#iM=rn(this,lH,rw(()=>this.#I,"--list-item-sticky-offset",e=>`${parseFloat(e)}px`));#iP=(rn(this,lj),rn(this,l$,rw(()=>this.#I,"--list-item-span-count",e=>`${parseFloat(e)}`)));constructor(e){rn(this,lU),this.#I=e}connectedCallback(){let e=this.#I.getAttribute("initial-scroll-index");if(null!==e){let t=parseFloat(e),a=()=>{0===this.#I.clientHeight?requestAnimationFrame(a):this.#I.scrollToPosition({index:t})};ro(a)}}}),rZ=function(e,t,a){let i,n,l,r,s=0;var o=function(){s=a?.leading===!1?0:new Date().getTime(),i=null,r=e.apply(n,l),i||(n=l=null)};return function(){var d=new Date().getTime();s||a?.leading!==!1||(s=d);var h=t-(d-s);return n=this,l=arguments,h<=0||h>t?(i&&(clearTimeout(i),i=null),s=d,r=e.apply(n,l),i||(n=l=null)):i||a?.trailing===!1||(i=setTimeout(o,h)),r}},r0=(lQ=[],lJ=[],lZ=[],l0=[],l1=[],l2=[],l3=[],l8=[],l4=[],l5=[],l7=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;lV=[rg("scrolltoupper")],lW=[ry("upper-threshold-item-count",!0)],lB=[rg("scrolltolower")],lq=[ry("lower-threshold-item-count",!0)],lK=[rg("lynxscroll"),rg("lynxscrollend"),rg("snap")],lG=[rg("scrolltoupperedge")],lY=[rg("scrolltoloweredge")],ri(this,lz={value:rl(function(e,t){let a=null!==t?parseFloat(t):0,i=0===a?this.#ee():this.#I.children[a-1];i&&this.#iR?.unobserve(i);let n=null!==e?parseFloat(e):0,l=0===n?this.#ee():this.#I.children[n-1];l&&this.#iR?.observe(l)},"#handleUpperThresholdItemCountChange")},lW,{kind:"method",name:"#handleUpperThresholdItemCountChange",static:!1,private:!0,access:{has:e=>#iD in e,get:e=>e.#iD},metadata:e},null,lQ),ri(this,lX={value:rl(function(e,t){let a=null!==t?parseFloat(t):0,i=0===a?this.#et():this.#I.children[this.#I.children.length-a];i&&this.#iN?.unobserve(i);let n=null!==e?parseFloat(e):0,l=0===n?this.#et():this.#I.children[this.#I.children.length-n];l&&this.#iN?.observe(l)},"#handleLowerThresholdItemCountChange")},lq,{kind:"method",name:"#handleLowerThresholdItemCountChange",static:!1,private:!0,access:{has:e=>#iF in e,get:e=>e.#iF},metadata:e},null,lQ),ri(null,null,lV,{kind:"field",name:"#updateEventSwitches",static:!1,private:!0,access:{has:e=>#iH in e,get:e=>e.#iH,set:(e,t)=>{e.#iH=t}},metadata:e},lJ,lZ),ri(null,null,lB,{kind:"field",name:"#updateScrollToLowerEventSwitches",static:!1,private:!0,access:{has:e=>#ij in e,get:e=>e.#ij,set:(e,t)=>{e.#ij=t}},metadata:e},l0,l1),ri(null,null,lK,{kind:"field",name:"#handleScrollEventsSwitches",static:!1,private:!0,access:{has:e=>#eh in e,get:e=>e.#eh,set:(e,t)=>{e.#eh=t}},metadata:e},l2,l3),ri(null,null,lG,{kind:"field",name:"#handleScrollToUpperEdgeEventEnable",static:!1,private:!0,access:{has:e=>#i$ in e,get:e=>e.#i$,set:(e,t)=>{e.#i$=t}},metadata:e},l8,l4),ri(null,null,lY,{kind:"field",name:"#handleScrollToLowerEdgeEventEnable",static:!1,private:!0,access:{has:e=>#iU in e,get:e=>e.#iU,set:(e,t)=>{e.#iU=t}},metadata:e},l5,l7),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["upper-threshold-item-count","lower-threshold-item-count"];#I=rn(this,lQ);#iV=rS(()=>this.#I.shadowRoot,"#content");#iR;#iN;#iW;#Q=0;#J=0;#iz=!1;#Y;#ee=rS(()=>this.#I.shadowRoot,"#upper-threshold-observer");#et=rS(()=>this.#I.shadowRoot,"#lower-threshold-observer");#ei(){let e=null!==this.#I.getAttribute("need-visible-item-info"),{scrollTop:t,scrollLeft:a,scrollHeight:i,scrollWidth:n}=this.#iV(),l={scrollTop:t,scrollLeft:a,scrollHeight:i,scrollWidth:n,deltaX:a-this.#Q,deltaY:t-this.#J,attachedCells:e?this.#I.getVisibleCells():void 0};return this.#Q=a,this.#J=t,l}#iB=e=>{let{isIntersecting:t}=e[0];t&&this.#I.dispatchEvent(new CustomEvent("scrolltoupper",{...rc,detail:this.#ei()}))};#iH=rn(this,lJ,e=>{if(e?this.#I.setAttribute("x-enable-scrolltoupper-event",""):this.#I.removeAttribute("x-enable-scrolltoupper-event"),this.#tL.scrolltoupper=e,e){this.#iR||(this.#iR=new IntersectionObserver(this.#iB,{root:this.#iV()})),this.#iW||(this.#iW=new MutationObserver(this.#iq));let e=this.#I.getAttribute("upper-threshold-item-count"),t=null!==e?parseFloat(e):0,a=0===t?this.#ee():this.#I.children[t-1];a&&this.#iR.observe(a),this.#iW.observe(this.#I,{childList:!0})}else this.#iR&&(this.#iR.disconnect(),this.#iR=void 0),this.#iW&&(this.#iW.disconnect(),this.#iW=void 0)});get #iD(){return lz.value}#iX=(rn(this,lZ),e=>{let{isIntersecting:t}=e[0];t&&this.#I.dispatchEvent(new CustomEvent("scrolltolower",{...rc,detail:this.#ei()}))});#tL={lynxscroll:!1,lynxscrollend:!1,snap:!1,scrolltolower:!1,scrolltoupper:!1};#ij=rn(this,l0,e=>{if(this.#tL.scrolltolower=e,e?this.#I.setAttribute("x-enable-scrolltolower-event",""):this.#I.removeAttribute("x-enable-scrolltolower-event"),e){this.#iN||(this.#iN=new IntersectionObserver(this.#iX,{root:this.#iV()})),this.#iW||(this.#iW=new MutationObserver(this.#iq));let e=this.#I.getAttribute("lower-threshold-item-count"),t=null!==e?parseFloat(e):0,a=0===t?this.#et():this.#I.children[this.#I.children.length-t];a&&this.#iN.observe(a),this.#iW.observe(this.#I,{childList:!0})}else this.#iN&&(this.#iN.disconnect(),this.#iN=void 0),this.#iW&&(this.#iW.disconnect(),this.#iW=void 0)});get #iF(){return lX.value}#iq=(rn(this,l1),e=>{let t=e?.[0];if(t?.type==="childList"){if(this.#tL.scrolltolower){this.#iN&&(this.#iN.disconnect(),this.#iN=void 0),this.#iN=new IntersectionObserver(this.#iX,{root:this.#iV()});let e=this.#I.getAttribute("lower-threshold-item-count"),t=null!==e?parseFloat(e):0,a=0===t?this.#et():this.#I.children[this.#I.children.length-t];a&&this.#iN.observe(a)}if(null!==this.#I.getAttribute("x-enable-scrolltoupper-event")){this.#iR&&(this.#iR.disconnect(),this.#iR=void 0),this.#iR=new IntersectionObserver(this.#iB,{root:this.#iV()});let e=this.#I.getAttribute("upper-threshold-item-count"),t=null!==e?parseFloat(e):0,a=0===t?this.#ee():this.#I.children[t-1];a&&this.#iR.observe(a)}}});#iK=null;#er=()=>{this.#iz&&!ru&&(clearTimeout(this.#Y),this.#Y=setTimeout(()=>{this.#eo()},100)),this.#I.dispatchEvent(new CustomEvent("lynxscroll",{...rc,detail:this.#ei()}))};#eh=rn(this,l2,(e,t)=>{this.#tL[t]=e;let{lynxscroll:a,lynxscrollend:i,snap:n}=this.#tL,l=this.#I.getAttribute("scroll-event-throttle");this.#iz=null!==i||null!==n;let r=this.#iV();if(this.#iK&&r.removeEventListener("scroll",this.#iK),null!==scroll||this.#iz){let e=null!==l?parseFloat(l):0,t=rZ(this.#er,e,{leading:!0,trailing:!1});this.#iK=t,r.addEventListener("scroll",this.#iK),this.#Q=0,this.#J=0}ru&&this.#iz?r.addEventListener("scrollend",this.#eo):r.removeEventListener("scrollend",this.#eo)});#ea=(rn(this,l3),e=>{let{isIntersecting:t,target:a}=e[0],i=a.id;t&&("upper-threshold-observer"===i?this.#I.dispatchEvent(new CustomEvent("scrolltoupperedge",{...rc,detail:this.#ei()})):"lower-threshold-observer"===i&&this.#I.dispatchEvent(new CustomEvent("scrolltoloweredge",{...rc,detail:this.#ei()})))});#i$=rn(this,l8,e=>{e?this.#I.setAttribute("x-enable-scrolltoupperedge-event",""):this.#I.removeAttribute("x-enable-scrolltoupperedge-event"),this.#iG(e)});#iG=(rn(this,l4),rT(this.#iV,this.#ee,this.#ea));#iU=rn(this,l5,e=>{e?this.#I.setAttribute("x-enable-scrolltoloweredge-event",""):this.#I.removeAttribute("x-enable-scrolltoloweredge-event"),this.#iY(e)});#iY=(rn(this,l7),rT(this.#iV,this.#et,this.#ea));#eo=()=>{let e=this.#I.getAttribute("item-snap");if(this.#I.dispatchEvent(new CustomEvent("lynxscrollend",{...rc})),null!==e){let e=Array.from(this.#I.children).filter(e=>"LIST-ITEM"===e.tagName),t=this.#iV().scrollTop,a=this.#iV().scrollLeft,i=e.find(e=>t>=e.offsetTop&&t<e.offsetTop+e.offsetHeight);this.#I.dispatchEvent(new CustomEvent("snap",{...rc,detail:{position:i&&e.indexOf(i),scrollTop:t,scrollLeft:a}}))}};constructor(e){this.#I=e}}),r1="waterfall-slot",r2="waterfall-style";class r3{static observedAttributes=[];#I;#iV=rS(()=>this.#I.shadowRoot,"#content");#iQ=rS(()=>this.#I.shadowRoot,'div[part="lower-threshold-observer"]');#F;#iW;#iJ=()=>{let e=document.createElement("slot");e.setAttribute("name",`${r1}`),this.#I.shadowRoot?.querySelector("[part=upper-threshold-observer]")?.insertAdjacentElement("afterend",e)};#iZ=(e,t)=>{let a=Array(e).fill(0);for(let i=0;i<this.#I.children.length;i++){let n=this.#I.children[i],l=getComputedStyle(n).getPropertyValue("--list-main-axis-gap"),r=getComputedStyle(n).getPropertyValue("--list-cross-axis-gap"),s=t?n.getBoundingClientRect().height+parseFloat(l):n.getBoundingClientRect().width+parseFloat(l);if(null!==n.getAttribute("full-span")){let i=a[0];for(let t=1;t<e;t++)a[t]>i&&(i=a[t]);for(let t=0;t<e;t++)a[t]=i+s;t?(n.setAttribute(`${r2}-left`,"0"),n.setAttribute(`${r2}-top`,`${i}px`)):(n.setAttribute(`${r2}-left`,`${i}px`),n.setAttribute(`${r2}-top`,"0"))}else{let i=0,l=a[0];for(let t=1;t<e;t++)a[t]<l&&(i=t,l=a[t]);let o=`calc(${i} * (100% - ${r} * (${e} - 1))/ ${e} + ${Math.max(0,i)} * ${r})`;t?(n.setAttribute(`${r2}-left`,o),n.setAttribute(`${r2}-top`,`${l}px`)):(n.setAttribute(`${r2}-left`,`${l}px`),n.setAttribute(`${r2}-top`,o)),a[i]+=s}}for(let e=0;e<this.#I.children.length;e++){let t=this.#I.children[e];t.style.setProperty("left",t.getAttribute(`${r2}-left`)),t.style.setProperty("top",t.getAttribute(`${r2}-top`)),t.setAttribute("slot",r1)}let i=this.#I.getAttribute("x-enable-scrolltolower-event");if(null!==i&&"false"!==i){let e=this.#iQ(),t=this.#I.getAttribute("scroll-orientation")||"vertical",a=this.#iV();"vertical"===t?(e.style.setProperty("top",`${String(a.scrollHeight-1)}px`,"important"),e.style.setProperty("bottom","unset","important")):(e.style.setProperty("left",`${String(a.scrollHeight-1)}px`),e.style.setProperty("right","unset"))}};constructor(e){this.#I=e}#i0=(e,t)=>{this.#F?.disconnect(),this.#F=new ResizeObserver(()=>{ro(()=>{this.#iZ(e,t)})}),Array.from(this.#I.children).forEach(e=>{this.#F?.observe(e)})};connectedCallback(){if("waterfall"===this.#I.getAttribute("list-type")){let e=parseFloat(this.#I.getAttribute("span-count")||this.#I.getAttribute("column-count")||"")||1,t=this.#I.getAttribute("scroll-orientation")||"vertical";this.#iJ(),this.#F||this.#i0(e,"vertical"===t),this.#iW||(this.#iW=new MutationObserver(a=>{let i=a?.[0];i?.type==="childList"&&this.#i0(e,"vertical"===t)}),this.#iW.observe(this.#I,{childList:!0}))}}}re=[rd("x-list",[rf,rJ,r0,r3],rI`<style>
|
|
251
|
+
`)],lx=[],lT=HTMLElement,(class extends lT{static{lw=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(lT[Symbol.metadata]??null):void 0;ri(null,lS={value:lw},lC,{kind:"class",name:lw.name,metadata:e},null,lx),lw=lS.value,e&&Object.defineProperty(lw,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:a}=e;void 0===a&&(a=!0);let i=this.shadowRoot.children.item(2),n=i.clientWidth*t;i.scrollTo({left:n,behavior:a?"smooth":"instant"})}connectedCallback(){let e=this.getAttribute("select-index")||this.getAttribute("initial-select-index");if(null!==e){let t=Number(e),a=this.shadowRoot.children.item(2),i=()=>{0===a.clientWidth?requestAnimationFrame(i):this.selectTab({index:t,smooth:!1})};ro(i)}}get[rp](){return this}static{rn(lw,lx)}}),lL=[rd("x-viewpager-item-ng",[rf])],l_=[],lk=HTMLElement,(class extends lk{static{lI=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(lk[Symbol.metadata]??null):void 0;ri(null,lO={value:lI},lL,{kind:"class",name:lI.name,metadata:e},null,l_),lI=lO.value,e&&Object.defineProperty(lI,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),rn(lI,l_)}}),lP=[rd("list-item",[rf])],lR=[],lD=HTMLElement,class extends lD{static{lM=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(lD[Symbol.metadata]??null):void 0;ri(null,lA={value:lM},lP,{kind:"class",name:lM.name,metadata:e},null,lR),lM=lA.value,e&&Object.defineProperty(lM,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),rn(lM,lR)}};let rJ=(lH=[],lj=[],l$=[],lU=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;lN=[ry("sticky-offset",!0)],lF=[ry("span-count",!0),ry("column-count",!0)],ri(null,null,lN,{kind:"field",name:"#handlerStickyOffset",static:!1,private:!0,access:{has:e=>#iM in e,get:e=>e.#iM,set:(e,t)=>{e.#iM=t}},metadata:e},lH,lj),ri(null,null,lF,{kind:"field",name:"#handlerCount",static:!1,private:!0,access:{has:e=>#iP in e,get:e=>e.#iP,set:(e,t)=>{e.#iP=t}},metadata:e},l$,lU),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"];#L;#iM=rn(this,lH,rw(()=>this.#L,"--list-item-sticky-offset",e=>`${parseFloat(e)}px`));#iP=(rn(this,lj),rn(this,l$,rw(()=>this.#L,"--list-item-span-count",e=>`${parseFloat(e)}`)));constructor(e){rn(this,lU),this.#L=e}connectedCallback(){let e=this.#L.getAttribute("initial-scroll-index");if(null!==e){let t=parseFloat(e),a=()=>{0===this.#L.clientHeight?requestAnimationFrame(a):this.#L.scrollToPosition({index:t})};ro(a)}}}),rZ=function(e,t,a){let i,n,l,r,s=0;var o=function(){s=a?.leading===!1?0:new Date().getTime(),i=null,r=e.apply(n,l),i||(n=l=null)};return function(){var d=new Date().getTime();s||a?.leading!==!1||(s=d);var h=t-(d-s);return n=this,l=arguments,h<=0||h>t?(i&&(clearTimeout(i),i=null),s=d,r=e.apply(n,l),i||(n=l=null)):i||a?.trailing===!1||(i=setTimeout(o,h)),r}},r0=(lQ=[],lJ=[],lZ=[],l0=[],l1=[],l2=[],l3=[],l8=[],l5=[],l4=[],l6=[],class{static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;lV=[rg("scrolltoupper")],lW=[ry("upper-threshold-item-count",!0)],lB=[rg("scrolltolower")],lq=[ry("lower-threshold-item-count",!0)],lK=[rg("lynxscroll"),rg("lynxscrollend"),rg("snap")],lG=[rg("scrolltoupperedge")],lY=[rg("scrolltoloweredge")],ri(this,lz={value:rl(function(e,t){let a=null!==t?parseFloat(t):0,i=0===a?this.#ee():this.#L.children[a-1];i&&this.#iR?.unobserve(i);let n=null!==e?parseFloat(e):0,l=0===n?this.#ee():this.#L.children[n-1];l&&this.#iR?.observe(l)},"#handleUpperThresholdItemCountChange")},lW,{kind:"method",name:"#handleUpperThresholdItemCountChange",static:!1,private:!0,access:{has:e=>#iD in e,get:e=>e.#iD},metadata:e},null,lQ),ri(this,lX={value:rl(function(e,t){let a=null!==t?parseFloat(t):0,i=0===a?this.#et():this.#L.children[this.#L.children.length-a];i&&this.#iN?.unobserve(i);let n=null!==e?parseFloat(e):0,l=0===n?this.#et():this.#L.children[this.#L.children.length-n];l&&this.#iN?.observe(l)},"#handleLowerThresholdItemCountChange")},lq,{kind:"method",name:"#handleLowerThresholdItemCountChange",static:!1,private:!0,access:{has:e=>#iF in e,get:e=>e.#iF},metadata:e},null,lQ),ri(null,null,lV,{kind:"field",name:"#updateEventSwitches",static:!1,private:!0,access:{has:e=>#iH in e,get:e=>e.#iH,set:(e,t)=>{e.#iH=t}},metadata:e},lJ,lZ),ri(null,null,lB,{kind:"field",name:"#updateScrollToLowerEventSwitches",static:!1,private:!0,access:{has:e=>#ij in e,get:e=>e.#ij,set:(e,t)=>{e.#ij=t}},metadata:e},l0,l1),ri(null,null,lK,{kind:"field",name:"#handleScrollEventsSwitches",static:!1,private:!0,access:{has:e=>#eh in e,get:e=>e.#eh,set:(e,t)=>{e.#eh=t}},metadata:e},l2,l3),ri(null,null,lG,{kind:"field",name:"#handleScrollToUpperEdgeEventEnable",static:!1,private:!0,access:{has:e=>#i$ in e,get:e=>e.#i$,set:(e,t)=>{e.#i$=t}},metadata:e},l8,l5),ri(null,null,lY,{kind:"field",name:"#handleScrollToLowerEdgeEventEnable",static:!1,private:!0,access:{has:e=>#iU in e,get:e=>e.#iU,set:(e,t)=>{e.#iU=t}},metadata:e},l4,l6),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=["upper-threshold-item-count","lower-threshold-item-count"];#L=rn(this,lQ);#iV=rS(()=>this.#L.shadowRoot,"#content");#iR;#iN;#iW;#Q=0;#J=0;#iz=!1;#Y;#ee=rS(()=>this.#L.shadowRoot,"#upper-threshold-observer");#et=rS(()=>this.#L.shadowRoot,"#lower-threshold-observer");#ei(){let e=null!==this.#L.getAttribute("need-visible-item-info"),{scrollTop:t,scrollLeft:a,scrollHeight:i,scrollWidth:n}=this.#iV(),l={scrollTop:t,scrollLeft:a,scrollHeight:i,scrollWidth:n,deltaX:a-this.#Q,deltaY:t-this.#J,attachedCells:e?this.#L.getVisibleCells():void 0};return this.#Q=a,this.#J=t,l}#iB=e=>{let{isIntersecting:t}=e[0];t&&this.#L.dispatchEvent(new CustomEvent("scrolltoupper",{...rc,detail:this.#ei()}))};#iH=rn(this,lJ,e=>{if(e?this.#L.setAttribute("x-enable-scrolltoupper-event",""):this.#L.removeAttribute("x-enable-scrolltoupper-event"),this.#tI.scrolltoupper=e,e){this.#iR||(this.#iR=new IntersectionObserver(this.#iB,{root:this.#iV()})),this.#iW||(this.#iW=new MutationObserver(this.#iq));let e=this.#L.getAttribute("upper-threshold-item-count"),t=null!==e?parseFloat(e):0,a=0===t?this.#ee():this.#L.children[t-1];a&&this.#iR.observe(a),this.#iW.observe(this.#L,{childList:!0})}else this.#iR&&(this.#iR.disconnect(),this.#iR=void 0),this.#iW&&(this.#iW.disconnect(),this.#iW=void 0)});get #iD(){return lz.value}#iX=(rn(this,lZ),e=>{let{isIntersecting:t}=e[0];t&&this.#L.dispatchEvent(new CustomEvent("scrolltolower",{...rc,detail:this.#ei()}))});#tI={lynxscroll:!1,lynxscrollend:!1,snap:!1,scrolltolower:!1,scrolltoupper:!1};#ij=rn(this,l0,e=>{if(this.#tI.scrolltolower=e,e?this.#L.setAttribute("x-enable-scrolltolower-event",""):this.#L.removeAttribute("x-enable-scrolltolower-event"),e){this.#iN||(this.#iN=new IntersectionObserver(this.#iX,{root:this.#iV()})),this.#iW||(this.#iW=new MutationObserver(this.#iq));let e=this.#L.getAttribute("lower-threshold-item-count"),t=null!==e?parseFloat(e):0,a=0===t?this.#et():this.#L.children[this.#L.children.length-t];a&&this.#iN.observe(a),this.#iW.observe(this.#L,{childList:!0})}else this.#iN&&(this.#iN.disconnect(),this.#iN=void 0),this.#iW&&(this.#iW.disconnect(),this.#iW=void 0)});get #iF(){return lX.value}#iq=(rn(this,l1),e=>{let t=e?.[0];if(t?.type==="childList"){if(this.#tI.scrolltolower){this.#iN&&(this.#iN.disconnect(),this.#iN=void 0),this.#iN=new IntersectionObserver(this.#iX,{root:this.#iV()});let e=this.#L.getAttribute("lower-threshold-item-count"),t=null!==e?parseFloat(e):0,a=0===t?this.#et():this.#L.children[this.#L.children.length-t];a&&this.#iN.observe(a)}if(null!==this.#L.getAttribute("x-enable-scrolltoupper-event")){this.#iR&&(this.#iR.disconnect(),this.#iR=void 0),this.#iR=new IntersectionObserver(this.#iB,{root:this.#iV()});let e=this.#L.getAttribute("upper-threshold-item-count"),t=null!==e?parseFloat(e):0,a=0===t?this.#ee():this.#L.children[t-1];a&&this.#iR.observe(a)}}});#iK=null;#er=()=>{this.#iz&&!ru&&(clearTimeout(this.#Y),this.#Y=setTimeout(()=>{this.#eo()},100)),this.#L.dispatchEvent(new CustomEvent("lynxscroll",{...rc,detail:this.#ei()}))};#eh=rn(this,l2,(e,t)=>{this.#tI[t]=e;let{lynxscroll:a,lynxscrollend:i,snap:n}=this.#tI,l=this.#L.getAttribute("scroll-event-throttle");this.#iz=null!==i||null!==n;let r=this.#iV();if(this.#iK&&r.removeEventListener("scroll",this.#iK),null!==scroll||this.#iz){let e=null!==l?parseFloat(l):0,t=rZ(this.#er,e,{leading:!0,trailing:!1});this.#iK=t,r.addEventListener("scroll",this.#iK),this.#Q=0,this.#J=0}ru&&this.#iz?r.addEventListener("scrollend",this.#eo):r.removeEventListener("scrollend",this.#eo)});#ea=(rn(this,l3),e=>{let{isIntersecting:t,target:a}=e[0],i=a.id;t&&("upper-threshold-observer"===i?this.#L.dispatchEvent(new CustomEvent("scrolltoupperedge",{...rc,detail:this.#ei()})):"lower-threshold-observer"===i&&this.#L.dispatchEvent(new CustomEvent("scrolltoloweredge",{...rc,detail:this.#ei()})))});#i$=rn(this,l8,e=>{e?this.#L.setAttribute("x-enable-scrolltoupperedge-event",""):this.#L.removeAttribute("x-enable-scrolltoupperedge-event"),this.#iG(e)});#iG=(rn(this,l5),rT(this.#iV,this.#ee,this.#ea));#iU=rn(this,l4,e=>{e?this.#L.setAttribute("x-enable-scrolltoloweredge-event",""):this.#L.removeAttribute("x-enable-scrolltoloweredge-event"),this.#iY(e)});#iY=(rn(this,l6),rT(this.#iV,this.#et,this.#ea));#eo=()=>{let e=this.#L.getAttribute("item-snap");if(this.#L.dispatchEvent(new CustomEvent("lynxscrollend",{...rc})),null!==e){let e=Array.from(this.#L.children).filter(e=>"LIST-ITEM"===e.tagName),t=this.#iV().scrollTop,a=this.#iV().scrollLeft,i=e.find(e=>t>=e.offsetTop&&t<e.offsetTop+e.offsetHeight);this.#L.dispatchEvent(new CustomEvent("snap",{...rc,detail:{position:i&&e.indexOf(i),scrollTop:t,scrollLeft:a}}))}};constructor(e){this.#L=e}}),r1="waterfall-slot",r2="waterfall-style";class r3{static observedAttributes=[];#L;#iV=rS(()=>this.#L.shadowRoot,"#content");#iQ=rS(()=>this.#L.shadowRoot,'div[part="lower-threshold-observer"]');#F;#iW;#iJ=()=>{let e=document.createElement("slot");e.setAttribute("name",`${r1}`),this.#L.shadowRoot?.querySelector("[part=upper-threshold-observer]")?.insertAdjacentElement("afterend",e)};#iZ=(e,t)=>{let a=Array(e).fill(0);for(let i=0;i<this.#L.children.length;i++){let n=this.#L.children[i],l=getComputedStyle(n).getPropertyValue("--list-main-axis-gap"),r=getComputedStyle(n).getPropertyValue("--list-cross-axis-gap"),s=t?n.getBoundingClientRect().height+parseFloat(l):n.getBoundingClientRect().width+parseFloat(l);if(null!==n.getAttribute("full-span")){let i=a[0];for(let t=1;t<e;t++)a[t]>i&&(i=a[t]);for(let t=0;t<e;t++)a[t]=i+s;t?(n.setAttribute(`${r2}-left`,"0"),n.setAttribute(`${r2}-top`,`${i}px`)):(n.setAttribute(`${r2}-left`,`${i}px`),n.setAttribute(`${r2}-top`,"0"))}else{let i=0,l=a[0];for(let t=1;t<e;t++)a[t]<l&&(i=t,l=a[t]);let o=`calc(${i} * (100% - ${r} * (${e} - 1))/ ${e} + ${Math.max(0,i)} * ${r})`;t?(n.setAttribute(`${r2}-left`,o),n.setAttribute(`${r2}-top`,`${l}px`)):(n.setAttribute(`${r2}-left`,`${l}px`),n.setAttribute(`${r2}-top`,o)),a[i]+=s}}for(let e=0;e<this.#L.children.length;e++){let t=this.#L.children[e];t.style.setProperty("left",t.getAttribute(`${r2}-left`)),t.style.setProperty("top",t.getAttribute(`${r2}-top`)),t.setAttribute("slot",r1)}let i=this.#L.getAttribute("x-enable-scrolltolower-event");if(null!==i&&"false"!==i){let e=this.#iQ(),t=this.#L.getAttribute("scroll-orientation")||"vertical",a=this.#iV();"vertical"===t?(e.style.setProperty("top",`${String(a.scrollHeight-1)}px`,"important"),e.style.setProperty("bottom","unset","important")):(e.style.setProperty("left",`${String(a.scrollHeight-1)}px`),e.style.setProperty("right","unset"))}};constructor(e){this.#L=e}#i0=(e,t)=>{this.#F?.disconnect(),this.#F=new ResizeObserver(()=>{ro(()=>{this.#iZ(e,t)})}),Array.from(this.#L.children).forEach(e=>{this.#F?.observe(e)})};connectedCallback(){if("waterfall"===this.#L.getAttribute("list-type")){let e=parseFloat(this.#L.getAttribute("span-count")||this.#L.getAttribute("column-count")||"")||1,t=this.#L.getAttribute("scroll-orientation")||"vertical";this.#iJ(),this.#F||this.#i0(e,"vertical"===t),this.#iW||(this.#iW=new MutationObserver(a=>{let i=a?.[0];i?.type==="childList"&&this.#i0(e,"vertical"===t)}),this.#iW.observe(this.#L,{childList:!0}))}}}re=[rd("x-list",[rf,rJ,r0,r3],rL`<style>
|
|
261
252
|
.placeholder-dom {
|
|
262
253
|
display: none;
|
|
263
254
|
flex: 0 0 0;
|
|
@@ -293,4 +284,13 @@
|
|
|
293
284
|
id="lower-threshold-observer"
|
|
294
285
|
></div>
|
|
295
286
|
</div>
|
|
296
|
-
</div>`)],rt=[],ra=HTMLElement,class extends ra{static{
|
|
287
|
+
</div>`)],rt=[],ra=HTMLElement,class extends ra{static{l7=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(ra[Symbol.metadata]??null):void 0;ri(null,l9={value:l7},re,{kind:"class",name:l7.name,metadata:e},null,rt),l7=l9.value,e&&Object.defineProperty(l7,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static notToFilterFalseAttributes=new Set(["enable-scroll"]);#iV=rS(()=>this.shadowRoot,"#content");#i1={rate:0,lastTimestamp:0,autoStop:!0,isScrolling:!1};#i2={};get scrollTop(){return this.#iV().scrollTop}set scrollTop(e){this.#iV().scrollTop=e}get scrollLeft(){return this.#iV().scrollTop}set scrollLeft(e){this.#iV().scrollLeft=e}get __scrollTop(){return super.scrollTop}get __scrollLeft(){return super.scrollTop}scrollToPosition(e){let t;if("string"==typeof e.offset){let a=parseFloat(e.offset);t={left:a,top:a}}else"number"==typeof e.offset&&(t={left:e.offset,top:e.offset});if("number"==typeof e.index){if(0===e.index)this.#iV().scrollTop=0,this.#iV().scrollLeft=0;else if(e.index>0&&e.index<this.childElementCount){let a=this.children.item(e.index);a instanceof HTMLElement&&(t=t?{left:a.offsetLeft+t.left,top:a.offsetTop+t.top}:{left:a.offsetLeft,top:a.offsetTop})}}t&&this.#iV().scrollTo({...t,behavior:e.smooth?"smooth":"auto"})}#i3=e=>{if(!this.#i1.isScrolling)return;this.#i1.lastTimestamp||(this.#i1.lastTimestamp=e);let t=this.#iV(),a=(e-this.#i1.lastTimestamp)/1e3*this.#i1.rate;t.scrollBy({left:a,top:a,behavior:"smooth"}),this.#i1.lastTimestamp=e,t.scrollTop+t.clientHeight>=t.scrollHeight&&this.#i1.autoStop?(t.scrollTop=t.scrollHeight-t.clientHeight,this.#i1.isScrolling=!1):requestAnimationFrame(this.#i3)};autoScroll(e){if(e.start){let t="number"==typeof e.rate?e.rate:parseFloat(e.rate);this.#i1={rate:t,lastTimestamp:0,isScrolling:!0,autoStop:!1!==e.autoStop},requestAnimationFrame(this.#i3)}else this.#i1.isScrolling=!1}getScrollContainerInfo(){return{scrollTop:this.scrollTop,scrollLeft:this.scrollLeft,scrollHeight:this.scrollHeight,scrollWidth:this.scrollWidth}}getVisibleCells=()=>{let e=Object.values(this.#i2),t=Array.from(this.children).filter(e=>"LIST-ITEM"===e.tagName);return e.map(e=>{let a=e.getBoundingClientRect();return{id:e.getAttribute("id"),itemKey:e.getAttribute("item-key"),bottom:a.bottom,top:a.top,left:a.left,right:a.right,index:t.indexOf(e)}})};#i8=()=>Object.values(this.#i2).map(e=>{let t=e.getBoundingClientRect();return{height:t.height,width:t.width,itemKey:e.getAttribute("item-key"),originX:t.x,originY:t.y}});#i5=e=>{if(!e.target||!(e.target instanceof HTMLElement))return;let t=e.skipped,a=e.target?.getAttribute("id")==="content"&&e.target?.getAttribute("part")==="content",i="LIST-ITEM"===e.target.tagName;if(a&&!t){let e=this.#i8();setTimeout(()=>{this.dispatchEvent(new CustomEvent("layoutcomplete",{...rc,detail:{visibleItemBeforeUpdate:e,visibleItemAfterUpdate:this.#i8()}}))},100);return}if(i){let a=e.target?.getAttribute("item-key");if(!a)return;t?this.#i2[a]&&delete this.#i2[a]:this.#i2[a]=e.target;return}};connectedCallback(){this.#iV().addEventListener("contentvisibilityautostatechange",this.#i5,{passive:!0})}static{rn(l7,rt)}}},67:function(e,t,a){a.a(e,async function(e,t){try{var i=a(568);a(753),a(851),a(45);var n=a(21),l=e([i]);i=(l.then?(await l)():l)[0];let s=document.getElementById("qr-scanner"),o=document.getElementById("lynx-view"),d=document.getElementById("back-button"),h=document.getElementById("nav"),c="preinstalled/homepage.json";d.addEventListener("click",()=>{r(c)});let u=new n.Z(s,e=>{console.log("qr",e),o.style.visibility="visible",u.stop();let t=e.data;r(t)},{highlightScanRegion:!0,highlightCodeOutline:!0}),m={ExplorerModule:URL.createObjectURL(new Blob([`export default function(NativeModules, NativeModulesCall) {
|
|
288
|
+
return {
|
|
289
|
+
openSchema(value) {
|
|
290
|
+
NativeModulesCall('openSchema', value);
|
|
291
|
+
},
|
|
292
|
+
openScan() {
|
|
293
|
+
NativeModulesCall('openScan');
|
|
294
|
+
},
|
|
295
|
+
};
|
|
296
|
+
}`],{type:"text/javascript"}))};function r(e){let t=window.matchMedia("(prefers-color-scheme: dark)").matches?"Dark":"Light";if(o.nativeModulesMap=m,o.onNativeModulesCall=(e,t)=>{"openScan"===e?(o.style.visibility="hidden",u.start()):"openSchema"===e&&r(t)},o.globalProps={theme:t},e===c)h.style.display="none",o.url=e,h.style.setProperty("--bar-color",null);else{let{searchParams:t}=new URL(e);t.has("bar_color")&&h.style.setProperty("--bar-color",`#${t.get("bar_color")}`),t.has("fullscreen")&&"true"===t.get("fullscreen")?h.style.display="none":h.style.display="flex",o.url=e}}r(c),window.addEventListener("message",e=>{if(e.data&&"setLynxViewUrl"===e.data.method&&e.data.url){let t=o.parentElement;o.remove(),(o=document.createElement("lynx-view")).setAttribute("style","flex: 0 1 100vh; height:100vh;width:100vw;"),t.append(o),r(e.data.url)}}),t()}catch(e){t(e)}})}},t={};function a(i){var n=t[i];if(void 0!==n)return n.exports;var l=t[i]={exports:{}};return e[i](l,l.exports,a),l.exports}a.m=e,(()=>{var e="function"==typeof Symbol?Symbol("webpack queues"):"__webpack_queues__",t="function"==typeof Symbol?Symbol("webpack exports"):"__webpack_exports__",i="function"==typeof Symbol?Symbol("webpack error"):"__webpack_error__",n=e=>{e&&e.d<1&&(e.d=1,e.forEach(e=>e.r--),e.forEach(e=>e.r--?e.r++:e()))},l=a=>a.map(a=>{if(null!==a&&"object"==typeof a){if(a[e])return a;if(a.then){var l=[];l.d=0,a.then(e=>{r[t]=e,n(l)},e=>{r[i]=e,n(l)});var r={};return r[e]=e=>e(l),r}}var s={};return s[e]=function(){},s[t]=a,s});a.a=(a,r,s)=>{s&&((o=[]).d=-1);var o,d,h,c,u=new Set,m=a.exports,p=new Promise((e,t)=>{c=t,h=e});p[t]=m,p[e]=e=>{o&&e(o),u.forEach(e),p.catch(function(){})},a.exports=p,r(a=>{d=l(a);var n,r=()=>d.map(e=>{if(e[i])throw e[i];return e[t]}),s=new Promise(t=>{(n=()=>t(r)).r=0;var a=e=>e!==o&&!u.has(e)&&(u.add(e),e&&!e.d&&(n.r++,e.push(n)));d.map(t=>t[e](a))});return n.r?s:r()},e=>(e?c(p[i]=e):h(m),n(o))),o&&o.d<0&&(o.d=0)}})(),a.d=(e,t)=>{for(var i in t)a.o(t,i)&&!a.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce((t,i)=>(a.f[i](e,t),t),[])),a.u=e=>"static/js/async/"+e+".js",a.miniCssF=e=>""+e+".css",a.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="@lynx-js/web-explorer:";a.l=function(i,n,l,r){if(e[i])return void e[i].push(n);if(void 0!==l)for(var s,o,d=document.getElementsByTagName("script"),h=0;h<d.length;h++){var c=d[h];if(c.getAttribute("src")==i||c.getAttribute("data-webpack")==t+l){s=c;break}}s||(o=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,a.nc&&s.setAttribute("nonce",a.nc),s.setAttribute("data-webpack",t+l),s.src=i),e[i]=[n];var u=function(t,a){s.onerror=s.onload=null,clearTimeout(m);var n=e[i];if(delete e[i],s.parentNode&&s.parentNode.removeChild(s),n&&n.forEach(function(e){return e(a)}),t)return t(a)},m=setTimeout(u.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=u.bind(null,s.onerror),s.onload=u.bind(null,s.onload),o&&document.head.appendChild(s)}})(),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.rv=()=>"1.3.6",(()=>{a.g.importScripts&&(e=a.g.location+"");var e,t=a.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var i=t.getElementsByTagName("script");if(i.length)for(var n=i.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=i[n--].src}if(!e)throw Error("Automatic publicPath is not supported in this browser");a.p=(e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"))+"../../"})(),(()=>{a.b=document.baseURI||self.location.href;var e={980:0};a.f.j=function(t,i){var n=a.o(e,t)?e[t]:void 0;if(0!==n)if(n)i.push(n[2]);else{var l=new Promise((a,i)=>n=e[t]=[a,i]);i.push(n[2]=l);var r=a.p+a.u(t),s=Error();a.l(r,function(i){if(a.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var l=i&&("load"===i.type?"missing":i.type),r=i&&i.target&&i.target.src;s.message="Loading chunk "+t+" failed.\n("+l+": "+r+")",s.name="ChunkLoadError",s.type=l,s.request=r,n[1](s)}},"chunk-"+t,t)}};var t=(t,i)=>{var n,l,[r,s,o]=i,d=0;if(r.some(t=>0!==e[t])){for(n in s)a.o(s,n)&&(a.m[n]=s[n]);o&&o(a)}for(t&&t(i);d<r.length;d++)l=r[d],a.o(e,l)&&e[l]&&e[l][0](),e[l]=0},i=globalThis.webpackChunk_lynx_js_web_explorer=globalThis.webpackChunk_lynx_js_web_explorer||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})(),a.ruid="bundler=rspack@1.3.6",a(67)})();
|