@ekyc_qoobiss/qbs-ect-cmp 4.7.59 → 4.7.60
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/cjs/agreement-info_21.cjs.entry.js +1 -1
- package/dist/esm/agreement-info_21.entry.js +1 -1
- package/dist/qbs-ect-cmp/{p-9317d25c.entry.js → p-8a4e1369.entry.js} +2 -2
- package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -1
- package/package.json +1 -1
- /package/dist/qbs-ect-cmp/{p-9317d25c.entry.js.map → p-8a4e1369.entry.js.map} +0 -0
|
@@ -18186,6 +18186,6 @@ import{r as t,c as e,h as n,g as s}from"./p-CUNWjaUv.js";import{a as r,A as i,s
|
|
|
18186
18186
|
* See the License for the specific language governing permissions and
|
|
18187
18187
|
* limitations under the License.
|
|
18188
18188
|
* =============================================================================
|
|
18189
|
-
*/var K4=X4.exports;var t5;function e5(){if(t5)return X4.exports;t5=1;(function(t,e){!function(t,n){n(e,q4,J4)}(K4,(function(t,e,n){const s={1:{name:"/m/01g317",id:1,displayName:"person"},2:{name:"/m/0199g",id:2,displayName:"bicycle"},3:{name:"/m/0k4j",id:3,displayName:"car"},4:{name:"/m/04_sv",id:4,displayName:"motorcycle"},5:{name:"/m/05czz6l",id:5,displayName:"airplane"},6:{name:"/m/01bjv",id:6,displayName:"bus"},7:{name:"/m/07jdr",id:7,displayName:"train"},8:{name:"/m/07r04",id:8,displayName:"truck"},9:{name:"/m/019jd",id:9,displayName:"boat"},10:{name:"/m/015qff",id:10,displayName:"traffic light"},11:{name:"/m/01pns0",id:11,displayName:"fire hydrant"},13:{name:"/m/02pv19",id:13,displayName:"stop sign"},14:{name:"/m/015qbp",id:14,displayName:"parking meter"},15:{name:"/m/0cvnqh",id:15,displayName:"bench"},16:{name:"/m/015p6",id:16,displayName:"bird"},17:{name:"/m/01yrx",id:17,displayName:"cat"},18:{name:"/m/0bt9lr",id:18,displayName:"dog"},19:{name:"/m/03k3r",id:19,displayName:"horse"},20:{name:"/m/07bgp",id:20,displayName:"sheep"},21:{name:"/m/01xq0k1",id:21,displayName:"cow"},22:{name:"/m/0bwd_0j",id:22,displayName:"elephant"},23:{name:"/m/01dws",id:23,displayName:"bear"},24:{name:"/m/0898b",id:24,displayName:"zebra"},25:{name:"/m/03bk1",id:25,displayName:"giraffe"},27:{name:"/m/01940j",id:27,displayName:"backpack"},28:{name:"/m/0hnnb",id:28,displayName:"umbrella"},31:{name:"/m/080hkjn",id:31,displayName:"handbag"},32:{name:"/m/01rkbr",id:32,displayName:"tie"},33:{name:"/m/01s55n",id:33,displayName:"suitcase"},34:{name:"/m/02wmf",id:34,displayName:"frisbee"},35:{name:"/m/071p9",id:35,displayName:"skis"},36:{name:"/m/06__v",id:36,displayName:"snowboard"},37:{name:"/m/018xm",id:37,displayName:"sports ball"},38:{name:"/m/02zt3",id:38,displayName:"kite"},39:{name:"/m/03g8mr",id:39,displayName:"baseball bat"},40:{name:"/m/03grzl",id:40,displayName:"baseball glove"},41:{name:"/m/06_fw",id:41,displayName:"skateboard"},42:{name:"/m/019w40",id:42,displayName:"surfboard"},43:{name:"/m/0dv9c",id:43,displayName:"tennis racket"},44:{name:"/m/04dr76w",id:44,displayName:"bottle"},46:{name:"/m/09tvcd",id:46,displayName:"wine glass"},47:{name:"/m/08gqpm",id:47,displayName:"cup"},48:{name:"/m/0dt3t",id:48,displayName:"fork"},49:{name:"/m/04ctx",id:49,displayName:"knife"},50:{name:"/m/0cmx8",id:50,displayName:"spoon"},51:{name:"/m/04kkgm",id:51,displayName:"bowl"},52:{name:"/m/09qck",id:52,displayName:"banana"},53:{name:"/m/014j1m",id:53,displayName:"apple"},54:{name:"/m/0l515",id:54,displayName:"sandwich"},55:{name:"/m/0cyhj_",id:55,displayName:"orange"},56:{name:"/m/0hkxq",id:56,displayName:"broccoli"},57:{name:"/m/0fj52s",id:57,displayName:"carrot"},58:{name:"/m/01b9xk",id:58,displayName:"hot dog"},59:{name:"/m/0663v",id:59,displayName:"pizza"},60:{name:"/m/0jy4k",id:60,displayName:"donut"},61:{name:"/m/0fszt",id:61,displayName:"cake"},62:{name:"/m/01mzpv",id:62,displayName:"chair"},63:{name:"/m/02crq1",id:63,displayName:"couch"},64:{name:"/m/03fp41",id:64,displayName:"potted plant"},65:{name:"/m/03ssj5",id:65,displayName:"bed"},67:{name:"/m/04bcr3",id:67,displayName:"dining table"},70:{name:"/m/09g1w",id:70,displayName:"toilet"},72:{name:"/m/07c52",id:72,displayName:"tv"},73:{name:"/m/01c648",id:73,displayName:"laptop"},74:{name:"/m/020lf",id:74,displayName:"mouse"},75:{name:"/m/0qjjc",id:75,displayName:"remote"},76:{name:"/m/01m2v",id:76,displayName:"keyboard"},77:{name:"/m/050k8",id:77,displayName:"cell phone"},78:{name:"/m/0fx9l",id:78,displayName:"microwave"},79:{name:"/m/029bxz",id:79,displayName:"oven"},80:{name:"/m/01k6s3",id:80,displayName:"toaster"},81:{name:"/m/0130jx",id:81,displayName:"sink"},82:{name:"/m/040b_t",id:82,displayName:"refrigerator"},84:{name:"/m/0bt_c3",id:84,displayName:"book"},85:{name:"/m/01x3z",id:85,displayName:"clock"},86:{name:"/m/02s195",id:86,displayName:"vase"},87:{name:"/m/01lsmm",id:87,displayName:"scissors"},88:{name:"/m/0kmg4",id:88,displayName:"teddy bear"},89:{name:"/m/03wvsk",id:89,displayName:"hair drier"},90:{name:"/m/012xff",id:90,displayName:"toothbrush"}};class r{constructor(t,e){this.modelPath=e||`https://storage.googleapis.com/tfjs-models/savedmodel/${this.getPrefix(t)}/model.json`}getPrefix(t){return"lite_mobilenet_v2"===t?`ssd${t}`:`ssd_${t}`}async load(){this.model=await e.loadGraphModel(this.modelPath);const t=n.zeros([1,300,300,3],"int32"),s=await this.model.executeAsync(t);await Promise.all(s.map((t=>t.data()))),s.map((t=>t.dispose())),t.dispose()}async infer(t,e,s){const r=n.tidy((()=>(t instanceof n.Tensor||(t=n.browser.fromPixels(t)),n.expandDims(t)))),i=r.shape[1],o=r.shape[2],a=await this.model.executeAsync(r),c=a[0].dataSync(),u=a[1].dataSync();r.dispose(),n.dispose(a);const[l,f]=this.calculateMaxScores(c,a[0].shape[1],a[0].shape[2]),h=n.getBackend();"webgl"===n.getBackend()&&n.setBackend("cpu");const d=n.tidy((()=>{const t=n.tensor2d(u,[a[1].shape[1],a[1].shape[3]]);return n.image.nonMaxSuppression(t,l,e,s,s)})),p=d.dataSync();return d.dispose(),h!==n.getBackend()&&n.setBackend(h),this.buildDetectedObjects(o,i,u,l,p,f)}buildDetectedObjects(t,e,n,r,i,o){const a=i.length,c=[];for(let u=0;u<a;u++){const a=[];for(let t=0;t<4;t++)a[t]=n[4*i[u]+t];const l=a[0]*e,f=a[1]*t,h=a[2]*e,d=a[3]*t;a[0]=f,a[1]=l,a[2]=d-f,a[3]=h-l,c.push({bbox:a,class:s[o[i[u]]+1].displayName,score:r[i[u]]})}return c}calculateMaxScores(t,e,n){const s=[],r=[];for(let i=0;i<e;i++){let e=Number.MIN_VALUE,o=-1;for(let s=0;s<n;s++)t[i*n+s]>e&&(e=t[i*n+s],o=s);s[i]=e,r[i]=o}return[s,r]}async detect(t,e=20,n=.5){return this.infer(t,e,n)}dispose(){null!=this.model&&this.model.dispose()}}t.ObjectDetection=r,t.load=async function(t={}){if(null==n)throw new Error("Cannot find TensorFlow.js. If you are using a <script> tag, please also include @tensorflow/tfjs on the page before using this model.");const e=t.base||"lite_mobilenet_v2",s=t.modelUrl;if(-1===["mobilenet_v1","mobilenet_v2","lite_mobilenet_v2"].indexOf(e))throw new Error(`ObjectDetection constructed with invalid base model ${e}. Valid names are 'mobilenet_v1', 'mobilenet_v2' and 'lite_mobilenet_v2'.`);const i=new r(e,s);return await i.load(),i},t.version="2.2.3",Object.defineProperty(t,"__esModule",{value:true})}))})(X4,X4.exports);return X4.exports}var n5=e5();const s5=".camera{color:white;display:flex;align-items:center;justify-content:center;position:relative}.cameraCanvas,.cameraCanvasSelfie,.cameraCanvasSelfieDesk{z-index:3;max-width:100%;max-height:100%;border-radius:10px}.cameraCanvasSelfie,.cameraCanvasSelfieDesk{transform:scale(-1, 1);-webkit-transform:scale(-1, 1)}.cameraVideo,.cameraVideoSelfie,.cameraVideoSelfieDesk{z-index:2;max-width:100%;max-height:100%;border-radius:10px}.cameraVideoSelfie,.cameraVideoSelfieDesk{transform:scale(-1, 1);-webkit-transform:scale(-1, 1)}.id-guide-rectangle{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:70%;padding-bottom:calc(70% / 1.58);border:3px dashed rgba(255, 255, 255, 0.7);border-radius:8px;z-index:5;pointer-events:none;box-sizing:border-box}.countdown-overlay-style{position:absolute;inset:0;background-color:rgba(0, 0, 0, 0.5);display:flex;align-items:center;justify-content:center;z-index:6}.video-overlay-canvas{position:absolute;top:0;left:0;width:100%;height:100%;z-index:7;pointer-events:none}.capture-flash-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:white;opacity:0;animation:capture-flash 0.2s ease-out;pointer-events:none;z-index:10}@keyframes bounce{0%,100%{transform:translateY(-25%);animation-timing-function:cubic-bezier(0.8, 0, 1, 1)}50%{transform:none;animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}}.animate-bounce{animation:bounce 1s infinite}@keyframes capture-flash{0%{opacity:0}50%{opacity:1}100%{opacity:0}}.countdown-text-style{color:white;font-size:8rem;font-weight:bold;animation:bounce 1s infinite;}";var r5;(function(t){t["JPEG"]="image/jpeg";t["PNG"]="image/png"})(r5||(r5={}));const i5=class{constructor(n){t(this,n);this.eventPhotoCapture=e(this,"photoIdCapture");this.eventRecordingIdReady=e(this,"recordingIdCapture");this.eventTimeElapsed=e(this,"timeElapsed");this.mediaRecorder=null;this.mediaStream=null;this.animationFrameId=null;this.processingsCount=0;this.objectDetectionModel=null;this.canvasContext=null;this.processingContext=null;this.overlayContext=null;this.recordedChunks=[];this.countdown=0;this.isCapturing=false;this.mode="idle";this.tfjsReady=false;this.detectedArea=null;this.startRecording=()=>{if(this.mediaStream&&this.videoElement){this.recordedChunks=[];var t={mimeType:m.webmMimeType.mime,videoBitsPerSecond:13e5};if(!MediaRecorder.isTypeSupported(t.mimeType)){if(o.device.mobileOS==g.iOS||o.device.browser==x.Safari)t.mimeType=m.mp4MimeType.mime}this.mediaRecorder=new MediaRecorder(this.mediaStream,{mimeType:"video/webm"});this.mediaRecorder.ondataavailable=({data:t})=>{if(t.size>0){this.recordedChunks=[...this.recordedChunks,t]}};this.mediaRecorder.onstop=()=>{if(this.recordedChunks.length>0){var e=new Blob(this.recordedChunks,{type:t.mimeType.split(";")[0]});this.eventRecordingIdReady.emit(e);this.mode="done"}};this.mediaRecorder.start();console.log("Recording started...")}};this.stopRecording=()=>{if(this.mediaRecorder&&this.mediaRecorder.state==="recording"){this.mediaRecorder.stop();console.log("Recording stopped.")}};this.capture=()=>{if(this.videoElement&&this.canvasElement){const t=this.videoElement;const e=this.canvasElement;const n=this.canvasContext;e.width=t.videoWidth;e.height=t.videoHeight;n.drawImage(t,0,0,e.width,e.height);e.toBlob((t=>{if(t&&t.type===r5.JPEG&&!o.device.isAppleDevice){try{if(o.debug)console.log("stream | getFrame | addExifInImg");N(t,this.mediaStream.getTracks()[0],{width:this.videoElement.videoWidth,height:this.videoElement.videoHeight}).then((t=>{this.eventPhotoCapture.emit(t)}))}catch(t){this.eventTimeElapsed.emit()}}else{if(o.debug)console.log("stream | getFrame | resolve");this.eventPhotoCapture.emit(t)}}),r5.PNG,1);console.log("Image captured!");this.isCapturing=true;setTimeout((()=>{this.isCapturing=false}),200)}else{console.error("Video element or canvas element not found. Cannot capture image.")}};this.startFrameProcessing=()=>{if(this.animationFrameId===null){this.animationFrameId=requestAnimationFrame((()=>this.processVideoFrame()))}};this.handleStartTiltDetection=()=>{console.log("Detecting tilt... Please tilt the ID. (Rectangle will appear on detected object).");this.mode="detecting_tilt_live";this.detectedArea=null;if(this.overlayContext){this.overlayContext.clearRect(0,0,this.overlayCanvasElement.width,this.overlayCanvasElement.height)}this.startFrameProcessing()};this.handleStartDetection=async()=>{if(!this.mediaStream){console.log("Camera not ready. Please allow camera access.");return}console.log("Starting ID detection...");this.mode="detecting_straight_id";this.recordedChunks=[];this.detectedArea=null;this.countdown=0;this.processingsCount=0;if(this.overlayContext){this.overlayContext.clearRect(0,0,this.overlayCanvasElement.width,this.overlayCanvasElement.height)}if(this.videoElement&&this.videoElement.readyState<3){console.log("Waiting for video stream to fully load...");await new Promise((t=>{const e=()=>{this.videoElement.removeEventListener("canplaythrough",e);t()};this.videoElement.addEventListener("canplaythrough",e)}));console.log("Video stream ready. Starting detection.")}this.startRecording();this.startFrameProcessing()}}async componentWillLoad(){this.translations=await b.getValues()}async componentDidLoad(){this.initVariables();if(this.canvasElement){this.canvasContext=this.canvasElement.getContext("2d",{willReadFrequently:true})}if(this.processingCanvasElement){this.processingContext=this.processingCanvasElement.getContext("2d",{willReadFrequently:true})}if(this.overlayCanvasElement){this.overlayContext=this.overlayCanvasElement.getContext("2d",{willReadFrequently:true})}console.log("Loading AI model...");try{await dc("webgl");this.objectDetectionModel=await n5.load();this.tfjsReady=true;console.log('AI model loaded. Camera ready. Click "Start ID Detection" to begin.');await this.getMedia();this.mode="idle"}catch(t){console.warn("WebGL backend failed to initialize, falling back to CPU:",t);try{await dc("cpu");console.log("TensorFlow.js backend set to CPU.");this.objectDetectionModel=await n5.load();this.tfjsReady=true;console.log('AI model loaded (using CPU). Camera ready. Click "Start ID Detection" to begin.');await this.getMedia();this.mode="idle"}catch(t){console.error("Error loading TensorFlow.js model even with CPU backend:",t);console.log("Error: Could not load AI model. Please refresh. (Check console for details).");this.tfjsReady=false;this.mode="idle"}}this.handleStartDetection()}initVariables(){if(o.debug)console.log("id-capture | initVariables");if(o.flowStatus==a.IDFRONT){this.titleMesage=this.translations.IdCaptureValues.Title}else if(o.flowStatus==a.IDBACK){this.titleMesage=this.translations.IdCaptureValues.TitleBack}else if(o.flowStatus==a.IDTILT){this.titleMesage=this.translations.IdCaptureValues.IDPoseMapping}}disconnectedCallback(){if(this.mediaStream){this.mediaStream.getTracks().forEach((t=>t.stop()))}if(this.animationFrameId!==null){cancelAnimationFrame(this.animationFrameId);this.animationFrameId=null}if(this.overlayContext){this.overlayContext.clearRect(0,0,this.overlayCanvasElement.width,this.overlayCanvasElement.height)}this.detectedArea=null}async getMedia(){try{if(!o.cameraId){await m.InitCameras(o.device)}const t=m.GetConstraints(o.cameraId,o.device);const e=await navigator.mediaDevices.getUserMedia(t);if(this.videoElement){this.videoElement.srcObject=e;this.videoElement.play()}this.mediaStream=e;this.mode="idle"}catch(t){console.error("Error accessing camera:",t);this.mode="idle"}}async detectIdWithTensorFlow(t,e=.6){if(!this.objectDetectionModel)return null;try{const n=await this.objectDetectionModel.detect(t);const s=["book","cell phone","remote","keyboard","laptop"];let r=null;let i=0;for(const t of n){const[n,o]=t.bbox;const a=n*o;if(s.includes(t.class)&&t.score>e&&a>5e3){if(a>i){i=a;r=t}}}return r}catch(t){console.error("TensorFlow.js detection error:",t);return null}}async processVideoFrame(){if(this.videoElement&&this.processingCanvasElement&&this.overlayCanvasElement&&this.tfjsReady&&(this.mode==="detecting_straight_id"||this.mode==="detecting_tilt_live")&&this.videoElement.readyState>=2&&this.processingContext&&this.overlayContext&&this.processingsCount<100){this.processingsCount++;const t=this.videoElement;const e=this.processingCanvasElement;const n=this.overlayCanvasElement;const s=this.processingContext;const r=this.overlayContext;r.clearRect(0,0,n.width,n.height);e.width=t.videoWidth;e.height=t.videoHeight;n.width=t.videoWidth;n.height=t.videoHeight;s.drawImage(t,0,0,e.width,e.height);let i=await this.detectIdWithTensorFlow(t);try{if(i){const[e,s,o,a]=i.bbox;const c=o/a;const u=o*a;let l="blue";let f=`Detected: ${i.class} (${(i.score*100).toFixed(1)}%). Area: ${u.toFixed(0)} px²`;this.detectedArea=u;if(this.mode==="detecting_straight_id"){if(c>1.4&&c<1.8&&u>t.videoWidth*t.videoHeight*.1){l="green";console.log("Straight ID detected! Starting countdown...");this.countdown=3;if(this.animationFrameId!==null){cancelAnimationFrame(this.animationFrameId);this.animationFrameId=null}this.mode="countdown_capture";const t=setInterval((()=>{this.countdown--;if(this.countdown<=0){clearInterval(t);this.capture();console.log('ID captured! Click "Start Tilt Detection" to analyze tilt.');this.countdown=0;this.detectedArea=null;r.clearRect(0,0,n.width,n.height);this.mode="awaiting_tilt_start"}}),1e3);this.handleStartTiltDetection();return}else{l="red";console.log("Looking for straight ID... Please align your ID with the guide.")}}else if(this.mode==="detecting_tilt_live"){if(c>1.4&&c<1.8){l="green";console.log(`ID is relatively straight (Aspect Ratio: ${c.toFixed(2)}).`)}else{l="yellow";console.log(`ID appears tilted (Aspect Ratio: ${c.toFixed(2)}).`);this.stopRecording()}console.log("Detecting tilt... Observe the highlighted object.")}r.strokeStyle=l;r.lineWidth=4;r.strokeRect(e,s,o,a);r.fillStyle=l;r.font="24px Arial";r.fillText(`${i.class} (${(i.score*100).toFixed(1)}%)`,e,s>20?s-10:s+25);console.log(f)}else{this.detectedArea=null;if(this.mode==="detecting_straight_id"){console.log("No ID detected. Please ensure ID is visible.")}else if(this.mode==="detecting_tilt_live"){console.log("No object detected for tilt analysis.")}}}catch(t){console.error("TensorFlow.js processing error:",t);console.log("AI processing error. See console for details.");this.mode="idle";this.detectedArea=null;if(this.animationFrameId!==null){cancelAnimationFrame(this.animationFrameId);this.animationFrameId=null}if(this.overlayContext){this.overlayContext.clearRect(0,0,this.overlayCanvasElement.width,this.overlayCanvasElement.height)}}finally{}if(this.mode==="detecting_straight_id"||this.mode==="detecting_tilt_live"){setTimeout((()=>{if(this.mode==="detecting_straight_id"||this.mode==="detecting_tilt_live"){this.animationFrameId=requestAnimationFrame((()=>this.processVideoFrame()))}}),100)}else{if(this.animationFrameId!==null){cancelAnimationFrame(this.animationFrameId);this.animationFrameId=null}}}if(this.processingsCount>=100){console.warn("Maximum processing frames reached. Stopping further processing.");this.mode="idle";this.processingsCount=0;if(this.animationFrameId!==null){cancelAnimationFrame(this.animationFrameId);this.animationFrameId=null}this.eventTimeElapsed.emit()}}render(){let t="cameraVideo";if(o.device.isDesktop){t="cameraVideoSelfieDesk"}return n("div",{key:"77c6b2e76fa8c6ab9d624ecdc953d50800aacfef",class:"container flex center"},n("div",{key:"c2531d6e847efb0ca09ec66289126f2525585e4c",class:"px-2 w-100"},n("h1",{key:"0f36148f2e663ef6e8f86e9fc69aae1beeef280d",class:this.titleStyle,innerHTML:this.titleMesage}),n("div",{key:"03e7fd87deae02c4ff994903cc0d48c1326e3d4d",class:"w-100 h-100 rounded"},n("div",{key:"70551203e13c76aa530f92965936057472b4a58b",class:"camera rounded"},n("video",{key:"1691fb8960c01fc407382e59a4f6d9b57a8511af",id:"video",loop:true,autoplay:true,playsinline:true,muted:true,class:t,ref:t=>this.videoElement=t}),n("canvas",{key:"f618141ba4f9e810e4bcd748f15f3974bdd1a304",id:"output",ref:t=>this.canvasElement=t,style:{display:"none"}}),n("canvas",{key:"9fabd1193a7f81a5051470912c1e451312989347",id:"processingCanvasElement",ref:t=>this.processingCanvasElement=t,style:{display:"none"}}),n("canvas",{key:"1746ba572b92cf670e01d57fe3b399d2b276ea3d",id:"overlayCanvasElement",ref:t=>this.overlayCanvasElement=t,class:"video-overlay-canvas"}),n("div",{key:"4725ed24d82b34887df3d199f096fc1719d72179",class:"id-guide-rectangle"}),this.isCapturing&&n("div",{key:"d2484968e6052fc15aaa357eb06492ec773517de",class:"capture-flash-overlay"}),this.countdown>0&&n("div",{key:"28e7b68182141d8708cf0b59190c8d084d0ae504",class:"countdown-overlay-style"},n("span",{key:"3bdc99173f2530781bb5e25b08240db191bf4a2d",class:"countdown-text-style"},this.countdown)))),n("div",{key:"ca3d45354bfc22d3a8086dc33975bc91f0292787",class:"footer text-center"},n("img",{key:"20e27b8399b2a21e17357a024152c6b86130da92",src:y}))))}get el(){return s(this)}};i5.style=s5;const o5="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1Mi4yOTIiIGhlaWdodD0iNDMuODU4IiB2aWV3Qm94PSIwIDAgNTIuMjkyIDQzLjg1OCI+DQogIDxnIGlkPSJpZC1jYXJkIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTcgLTI5KSI+DQogICAgPHBhdGggaWQ9IlBhdGhfNDc1MSIgZGF0YS1uYW1lPSJQYXRoIDQ3NTEiIGQ9Ik0yMC4zNzQsNjYuOTU0aDIyLjM1YS44NDMuODQzLDAsMCwwLDAtMS42ODdIMjAuMzc0YTEuNjg5LDEuNjg5LDAsMCwxLTEuNjg3LTEuNjg3VjMyLjM3NGExLjY4OSwxLjY4OSwwLDAsMSwxLjY4Ny0xLjY4N0g2NS45MThBMS42ODksMS42ODksMCwwLDEsNjcuNiwzMi4zNzRWNDkuMjQyYS44NDMuODQzLDAsMCwwLDEuNjg3LDBWMzIuMzc0QTMuMzc4LDMuMzc4LDAsMCwwLDY1LjkxOCwyOUgyMC4zNzRBMy4zNzgsMy4zNzgsMCwwLDAsMTcsMzIuMzc0VjYzLjU4QTMuMzc4LDMuMzc4LDAsMCwwLDIwLjM3NCw2Ni45NTRaIiBmaWxsPSIjMjUyYzgyIi8+DQogICAgPHBhdGggaWQ9IlBhdGhfNDc1MiIgZGF0YS1uYW1lPSJQYXRoIDQ3NTIiIGQ9Ik01MC42NTEsNTAuMzI2YTYuMzI2LDYuMzI2LDAsMSwwLTYuMzI2LDYuMzI2QTYuMzMzLDYuMzMzLDAsMCwwLDUwLjY1MSw1MC4zMjZabS0xMC45NjQsMGE0LjYzOSw0LjYzOSwwLDEsMSw0LjYzOSw0LjYzOUE0LjY0NCw0LjY0NCwwLDAsMSwzOS42ODcsNTAuMzI2WiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTEyLjE0NCAtOC42NzQpIiBmaWxsPSIjMjUyYzgyIi8+DQogICAgPHBhdGggaWQ9IlBhdGhfNDc1MyIgZGF0YS1uYW1lPSJQYXRoIDQ3NTMiIGQ9Ik0zMiw4NC43NDd2My4zNzRhLjg0NC44NDQsMCwwLDAsLjg0My44NDNINDguODY4YS44NDQuODQ0LDAsMCwwLC44NDMtLjg0M1Y4NC43NDdBNi43NTUsNi43NTUsMCwwLDAsNDIuOTY0LDc4SDM4Ljc0N0E2Ljc1NSw2Ljc1NSwwLDAsMCwzMiw4NC43NDdabTYuNzQ3LTUuMDZoNC4yMTdhNS4wNjYsNS4wNjYsMCwwLDEsNS4wNiw1LjA2djIuNTNIMzMuNjg3di0yLjUzQTUuMDY2LDUuMDY2LDAsMCwxLDM4Ljc0Nyw3OS42ODdaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtOC42NzQgLTI4LjMzNikiIGZpbGw9IiMyNTJjODIiLz4NCiAgICA8cGF0aCBpZD0iUGF0aF80NzU0IiBkYXRhLW5hbWU9IlBhdGggNDc1NCIgZD0iTTEwMi43MTIsNDhIODUuODQzYS44NDMuODQzLDAsMCwwLDAsMS42ODdoMTYuODY4YS44NDMuODQzLDAsMCwwLDAtMS42ODdaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMzkuMzI0IC0xMC45ODgpIiBmaWxsPSIjMjUyYzgyIi8+DQogICAgPHBhdGggaWQ9IlBhdGhfNDc1NSIgZGF0YS1uYW1lPSJQYXRoIDQ3NTUiIGQ9Ik0xMDIuNzEyLDYySDg1Ljg0M2EuODQzLjg0MywwLDEsMCwwLDEuNjg3aDE2Ljg2OGEuODQzLjg0MywwLDAsMCwwLTEuNjg3WiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTM5LjMyNCAtMTkuMDg0KSIgZmlsbD0iIzI1MmM4MiIvPg0KICAgIDxwYXRoIGlkPSJQYXRoXzQ3NTYiIGRhdGEtbmFtZT0iUGF0aCA0NzU2IiBkPSJNOTUuMjI5LDc1YTEyLjIzLDEyLjIzLDAsMSwwLDEyLjIzLDEyLjIzQTEyLjI0NCwxMi4yNDQsMCwwLDAsOTUuMjI5LDc1Wm0wLDIyLjk3N0ExMC43NDcsMTAuNzQ3LDAsMSwxLDEwNS45NzcsODcuMjMsMTAuNzU5LDEwLjc1OSwwLDAsMSw5NS4yMjksOTcuOTc3WiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTM4LjE2NyAtMjYuNjAyKSIgZmlsbD0iIzI1MmM4MiIvPg0KICAgIDxwYXRoIGlkPSJQYXRoXzQ3NTciIGRhdGEtbmFtZT0iUGF0aCA0NzU3IiBkPSJNMTExLjA1OSw5OC43MTdsLTcuNDQ0LDcuNDQzLTQuODUtNC44NDlhLjc0MS43NDEsMCwwLDAtMS4wNDgsMS4wNDhsNS4zNzQsNS4zNzRhLjc0MS43NDEsMCwwLDAsMS4wNDgsMGw3Ljk2OC03Ljk2OGEuNzQxLjc0MSwwLDAsMC0xLjA0OC0xLjA0OFoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC00Ny4yOTQgLTQxLjM5MykiIGZpbGw9IiM3YmI0MGYiLz4NCiAgPC9nPg0KPC9zdmc+DQo=";const a5="";const c5=class{constructor(n){t(this,n);this.apiErrorEvent=e(this,"apiError")}async componentWillRender(){this.translations=await b.getValues()}componentWillLoad(){this.yesButtonPressed=false;this.noButtonPressed=false}async hasBackSelected(){this.yesButtonPressed=true;try{await i.instance.SetTwoSidedId()}catch(t){this.apiErrorEvent.emit(t)}}async onlyFrontSelected(){this.noButtonPressed=true;try{o.flowStatus=await i.instance.GetNextFlowState()}catch(t){this.apiErrorEvent.emit(t)}}render(){return n("div",{key:"32363483a5c9e0ce24f4a1ec38c1ebd586056ac8",class:"container flex center"},n("div",{key:"810f3a7151e7919b2376ff0048c22e40f93e54e2",class:"px-3"},n("div",{key:"850f88924e80e8be2a9c0b2a1877f8b4cf6c175a",class:"mb-1 ml-1 text-center"},n("img",{key:"9d5b28f36250ff31703f65c97deabff71ee171a5",src:o5,style:{width:"70px"}})),n("h1",{key:"78ef4252524228b48a6f66d2af8052cd41114a38",class:"text-center mb-1"},this.translations.IdSelectionValues.Title),n("div",{key:"7da764c9413fa799eb4a9bf48e6a4c9677d8115a",class:"color-blue mb-2 loud-text",innerHTML:this.translations.IdSelectionValues.Description}),!this.noButtonPressed?n("div",{class:"button flex mb-1"},this.yesButtonPressed?n("div",{class:"img-loader rounded img-loader-button"},n("img",{class:"loading-image loading-image-button",src:z})):null,n("button",{class:"main-button",type:"button",disabled:this.yesButtonPressed,onClick:()=>this.hasBackSelected()},this.translations.IdSelectionValues.ButtonYes)):null,n("div",{key:"08ce9802ea046375c547b048bfce2b95ab6ccca0"}),!this.yesButtonPressed?n("div",{class:"button flex mb-1"},this.noButtonPressed?n("div",{class:"img-loader rounded img-loader-button"},n("img",{class:"loading-image loading-image-button",src:z})):null,n("button",{class:"main-button",type:"button",disabled:this.noButtonPressed,onClick:()=>this.onlyFrontSelected()},this.translations.IdSelectionValues.ButtonNo)):null,n("div",{key:"9a384b0a0f7eb858bdcaea1c761d7151b21df473",class:"footer text-center"},n("img",{key:"f1132d1e237bcc496bb3874be2f5fb9e854b7548",src:y}))))}};c5.style=a5;const u5="4.7.59";var l5={version:u5};class f5{constructor(){var t,e,n,s;this.motionValues=[];this.orientationValues=[];this.addItemsToOrientation=t=>{this.orientationValues.push({beta:t.beta,gamma:t.gamma});if(this.orientationValues.length>5){window.removeEventListener("deviceorientation",this.addItemsToOrientation)}};this.addItemsToMotion=t=>{this.motionValues.push({x:t.acceleration.x,y:t.acceleration.y});if(this.motionValues.length>5){window.removeEventListener("devicemotion",this.addItemsToMotion)}};this.supportedScreenOrientation=(e=(t=((screen===null||screen===void 0?void 0:screen.orientation)||{}).type)!==null&&t!==void 0?t:screen.mozOrientation)!==null&&e!==void 0?e:screen.msOrientation;this.safariScreenOrientation=!(screen===null||screen===void 0?void 0:screen.orientation)&&matchMedia("(orientation: portrait)").matches?"portrait-primary":"landscape-primary";this.initialScreenOrientation=(s=(n=this.supportedScreenOrientation)!==null&&n!==void 0?n:this.safariScreenOrientation)!==null&&s!==void 0?s:"portrait-primary";this.userAgent=navigator.userAgent||navigator.vendor||window.opera||undefined;this.isMobile=this.isMobileDevice();this.isTablet=this.isTabletDevice();this.isDesktop=!this.isMobile&&!this.isTablet}isMobileDevice(){const t=[/(Android)(.+)(Mobile)/i,/BlackBerry/i,/iPhone|iPod/i,/Opera Mini/i,/IEMobile/i];return t.some((t=>this.userAgent.match(t)))}isTabletDevice(){const t=/(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/;return t.test(this.userAgent.toLowerCase())}getMobileOS(){if(this.isMobileDevice()){if(/windows phone/i.test(this.userAgent))return g.WindowsPhone;else if(/android/i.test(this.userAgent))return g.Android;else if(/iPad|iPhone|iPod/.test(this.userAgent)&&!window.MSStream)return g.iOS;return g.Unknown}else return undefined}getDesktopOS(){if(this.isDesktop){if(this.userAgent.indexOf("Win")!==-1)return k.Windows;else if(this.userAgent.indexOf("Mac")!==-1)return k.MacOS;else if(this.userAgent.indexOf("X11")!==-1)return k.Unix;else if(this.userAgent.indexOf("Linux")!==-1)return k.Linux;return k.Unknown}else return undefined}getDeviceOS(){var t;return(t=this.getMobileOS())!==null&&t!==void 0?t:this.getDesktopOS()}getBrowser(){if(/XiaoMi/i.test(this.userAgent)||/MiuiBrowser/i.test(this.userAgent))return x.Mi;var t=/chrome/i.test(this.userAgent);if(t)return x.Chrome;if(/firefox/i.test(navigator.userAgent))return x.Firefox;else if(!t&&/safari/i.test(navigator.userAgent))return x.Safari;else return x.Unknown}async checkIfMobileBySensors(){var t,e;if(typeof((t=window.DeviceMotionEvent)===null||t===void 0?void 0:t.requestPermission)==="function"){var n=window.DeviceMotionEvent.requestPermission();if(n==="granted"){await this.getMotionValues()}}else{await this.getMotionValues()}await I(200);var s=false;if(this.motionValues.length>0){s=this.motionValues.filter((t=>t.x!=0)).length>=3}if(typeof((e=window.DeviceOrientationEvent)===null||e===void 0?void 0:e.requestPermission)==="function"){var n=window.DeviceOrientationEvent.requestPermission();if(n==="granted"){await this.getOrientationValues()}}else{await this.getOrientationValues()}await I(500);var r=false;if(this.orientationValues.length>0){r=this.orientationValues.map((t=>t.beta)).every(((t,e,n)=>e==0?t!==n[n.length-1]:t!==n[e-1]))||this.orientationValues.map((t=>t.gamma)).every(((t,e,n)=>e==0?t!==n[n.length-1]:t!==n[e-1]))}return s||r}async getOrientationValues(){window.addEventListener("deviceorientation",this.addItemsToOrientation)}async getMotionValues(){window.addEventListener("devicemotion",this.addItemsToMotion)}async getDevice(){var t=await this.checkIfMobileBySensors();var e={isMobileBySensors:t,isDesktop:this.isDesktop,desktopOS:this.getDesktopOS(),isWindowsDesktop:this.getDeviceOS()===k.Windows,isLinuxOrUnixDesktop:this.getDeviceOS()===k.Linux||this.getDeviceOS()===k.Unix,isMobile:this.isMobile,mobileOS:this.getMobileOS(),isAndroidDevice:this.getDeviceOS()===g.Android,isAppleDevice:this.getDeviceOS()===g.iOS||this.getDeviceOS()===k.MacOS,isUnknownMobileDevice:this.getDeviceOS()===g.Unknown,browser:this.getBrowser(),isTablet:this.isTablet,initialScreenOrientation:this.initialScreenOrientation};return e}}const h5="@font-face{font-family:'Roboto';font-style:normal;font-display:swap;font-weight:100;src:url(./files/roboto-latin-ext-100-normal.woff2) format('woff2'), url(./files/roboto-latin-ext-100-normal.woff) format('woff')}@font-face{font-family:'Roboto';font-style:normal;font-display:swap;font-weight:200;src:url(./files/roboto-latin-ext-200-normal.woff2) format('woff2'), url(./files/roboto-latin-ext-200-normal.woff) format('woff')}@font-face{font-family:'Roboto';font-style:normal;font-display:swap;font-weight:300;src:url(./files/roboto-latin-ext-300-normal.woff2) format('woff2'), url(./files/roboto-latin-ext-300-normal.woff) format('woff')}@font-face{font-family:'Roboto';font-style:normal;font-display:swap;font-weight:400;src:url(./files/roboto-latin-ext-400-normal.woff2) format('woff2'), url(./files/roboto-latin-ext-400-normal.woff) format('woff')}@font-face{font-family:'Roboto';font-style:normal;font-display:swap;font-weight:500;src:url(./files/roboto-latin-ext-500-normal.woff2) format('woff2'), url(./files/roboto-latin-ext-500-normal.woff) format('woff')}@font-face{font-family:'Roboto';font-style:normal;font-display:swap;font-weight:600;src:url(./files/roboto-latin-ext-600-normal.woff2) format('woff2'), url(./files/roboto-latin-ext-600-normal.woff) format('woff')}@font-face{font-family:'Roboto';font-style:normal;font-display:swap;font-weight:700;src:url(./files/roboto-latin-ext-700-normal.woff2) format('woff2'), url(./files/roboto-latin-ext-700-normal.woff) format('woff')}@font-face{font-family:'Roboto';font-style:normal;font-display:swap;font-weight:800;src:url(./files/roboto-latin-ext-800-normal.woff2) format('woff2'), url(./files/roboto-latin-ext-800-normal.woff) format('woff')}@font-face{font-family:'Roboto';font-style:normal;font-display:swap;font-weight:900;src:url(./files/roboto-latin-ext-900-normal.woff2) format('woff2'), url(./files/roboto-latin-ext-900-normal.woff) format('woff')}*{font-family:'Roboto', sans-serif}[hidden]{visibility:hidden !important;opacity:0 !important}.full{width:100%;height:100%;left:0;top:0}.container{width:100%;height:100%;background-color:white;max-width:991px;margin:auto;position:relative;overflow:hidden}.flex{display:flex}.relative{position:relative}.d-block{display:block}.center{align-items:center;justify-content:center}.footer{position:relative;width:100%;margin-top:5vh}.w-100{width:100%}.h-100{height:100%}.px-1{padding-left:1em;padding-right:1em}.px-2{padding-left:2em;padding-right:2em}.px-3{padding-left:3em;padding-right:3em}.px-4{padding-left:4em;padding-right:4em}.py-1{padding-top:1em;padding-bottom:1em}.py-2{padding-top:2em;padding-bottom:2em}.py-3{padding-top:3em;padding-bottom:3em}.py-4{padding-top:4em;padding-bottom:4em}.mx-1{margin-left:1em;margin-right:1em}.mx-2{margin-left:2em;margin-right:2em}.mx-3{margin-left:3em;margin-right:3em}.mx-4{margin-left:4em;margin-right:4em}.my-1{margin-top:1em;margin-bottom:1em}.my-2{margin-top:2em;margin-bottom:2em}.my-3{margin-top:3em;margin-bottom:3em}.my-4{margin-top:4em;margin-bottom:4em}.ml-1{margin-left:1em}.ml-2{margin-left:2em}.ml-3{margin-left:3em}.ml-4{margin-left:4em}.mb-05{margin-bottom:0.5em}.mb-1{margin-bottom:1em}.mb-2{margin-bottom:2em}.mb-3{margin-bottom:3em}.mb-4{margin-bottom:4em}.mt-05{margin-top:0.5em}.mt-1{margin-top:1em}.mt-2{margin-top:2em}.mt-3{margin-top:3em}.mt-4{margin-top:4em}h1{color:#252c82;font-size:1.5em;margin:0}h2{font-weight:500;font-size:1.2em;margin:0;color:#525252}h3{font-size:1.4em;margin:0}.main-text{font-weight:400;color:#525252}.link-text{text-decoration:underline;color:#252c82d9}.rounded{border-radius:8px}.cit-selector{width:50%}.img-text{display:flex;align-items:center}.img-text .bg-img{width:4em;height:5em;display:flex;align-items:center;justify-content:center;flex:none;margin-right:1em}.button{position:relative}.img-loader{position:absolute;left:-2px;top:-2px;background:#ffffffc7;border:2px solid #252c82;box-shadow:3px 3px 6px #00000029}.img-loader.rounded{border-radius:11px}.img-loader-button{width:100%;height:100%}.img-loader-button.rounded{border-radius:50px}.loading-image-button{width:100%;height:100%;border-radius:25px}.main-button{background:#7bb40e;border-radius:50px;text-align:center;width:100%;padding:0.9em;color:#fff;border:0;font-size:1.1em;font-weight:600}.main-button:disabled{color:#fff;background:#bdbdbd}.color-red{color:#ff5353}.color-blue{color:#252c82}.loud-text{font-size:1.2em}.loud-text p{margin:0.6em 0}.modal{position:fixed;left:0;top:0;width:100%;height:100%;z-index:999;background:#8b8b8be0;visibility:visible;opacity:1;transition:visibility 0s, opacity 0.2s linear}.inner{background:white;box-shadow:3px 3px 6px #00000029;border-radius:10px;padding:2em;position:relative}.close-modal{position:absolute;top:1em;right:1em}.document-view{height:100%}.scroll{height:100%;overflow-x:hidden;overflow-y:auto;scroll-behavior:smooth;position:relative}.scroll:before{content:'';display:block;width:100%;height:15px;position:sticky;top:0;left:0;background:linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%)}.scroll:after{content:'';display:block;width:100%;height:15px;position:sticky;bottom:0;left:0;background:linear-gradient(0deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%)}.main-input{width:calc(100% - 3.2em - 2px);padding:0.8em 1.6em;border:2px solid #464e58;font-size:1.2em;border-radius:10px}.checklist ul{margin:0;padding-left:20px;text-align:left;list-style-image:url('assets/checkmark.svg')}.checklist li{margin-bottom:1em}.checklist li:last-child{margin-bottom:0}.row-validare h1{font-size:28px;line-height:32px}body{margin:0;padding:0;height:100vh;position:relative;height:100vh;}.container-video{height:99vh;text-align:center;position:relative;overflow:hidden}.row{padding:3.5vh 2.5vh;height:100%;overflow:hidden;position:relative;}.ctheight-100{height:99vh}.d-flex{display:flex}.space-between{justify-content:space-between}.img-info img{width:0.8vh;z-index:5;position:relative}.img-info{width:7vh;height:7vh;border-radius:100%;display:flex;align-items:center;justify-content:center;background:radial-gradient(100% 100% at 50% 0%, #d3b6e9 0%, #fbc2bd 100%)}.i-effect{animation:2.5s infinite transition-i;position:absolute;z-index:2;border-radius:100%;background:radial-gradient(100% 100% at 50% 0%, #d3b6e9 0%, #fbc2bd 100%)}.two-buttons{margin-top:3vh;justify-content:center}.align-center{align-items:center}.font-size-2{font-size:2vh}.row-validare .font-size-2{font-size:17px;line-height:19px}.img-text .bg-img img{width:100%;padding:2vh}.cit-selector-desktop{width:200px;height:140px}.img-selector{width:100%}.img-text .cit-selector,.img-text .cit-selector-desktop{border-radius:5%}.img-text h3{color:#333333;font-weight:700;font-size:2.3vh;margin:0}.font-weight-bold{font-weight:bold}.font-size-18{font-size:1.8vh}.row-validare .font-size-18{font-size:15px;line-height:16px}a{font-size:inherit;color:inherit;text-decoration:none}.color-black{color:#000}.normal-button{background:#1feaa6;box-shadow:0 6px 8px rgba(71, 182, 162, 0.2);border-radius:25px;text-align:center;padding:2vh;margin-right:1vw;margin-left:1vw;color:#fff;border:0;font-size:2vh}.red-button{background:#ff535d}.row-validare .main-button{font-size:17px}.text-right{text-align:right}.mb-0{margin-bottom:0}.row-validare.row{padding:29px 21px}.row-validare .main-button{padding:16px}.row-validare .btn-buletin{position:relative;width:100%;bottom:0}.show-bottom{bottom:-2vh}.second-input{width:46px;height:46px;font-weight:700;font-size:16px;font-family:'Inter', sans-serif;text-align:center;border:2px solid #c5c6cc;border-radius:12px;outline:none;padding:2px}.second-input:not(:placeholder-shown){border:2px solid #1feaa6;color:#1feaa6}.mt-9{margin-top:9%}.second-input::placeholder{color:#fff;opacity:0}.second-input:focus{border:2px solid #464e58;color:#464e58}.second-input.error{border:2px solid #b67171}.second-input.error:focus{border:3px solid #b67171;color:#b67171;padding:1px}.second-input.error:not(:placeholder-shown){border:3px solid #b67171;color:#b67171;padding:2px}.second-input-container{margin-top:30%;display:flex;flex-wrap:wrap;justify-content:space-between}.input-container{display:flex;flex-wrap:wrap}.mt-15{margin-top:15%}.row-validare .mt-15{margin-top:40px}.mb-15{margin-bottom:15%}.row-validare .mb-15{margin-bottom:40px}.mb-20{margin-bottom:20%}.row-validare .mb-1{margin-bottom:20px}.row-validare .mb-20{margin-bottom:60px}.mt-90{margin-top:90px}.op-05{opacity:0.5}.error-text{position:relative;top:50px;margin-bottom:0;margin-top:0}.top-50{top:50px}.mt-25{margin-top:25%}.text-center{text-align:center}.scale-2{transform:scale(2)}.mt-20{margin-top:20%}.div-ci img{max-height:40vh;max-width:80vw}.div-ci{text-align:center}.mt-10{margin-top:10vh}.mt-5{margin-top:5vh}.pos-relative{position:relative}.pos-absolute{position:absolute}.btn-buletin{text-align:center}.buletin-container img{width:60%}.buletin-container>img{margin-top:10vh}.buletin-container{text-align:center}.color-white{color:#fff}.chenar-buletin{margin-top:3em;text-align:center}.chenar-buletin .ci-img{width:96%}.chenar-buletin .face-img,.chenar-buletin .chenar-img{left:4%;width:92%;top:-20px;min-height:55vw;display:flex;position:absolute;align-items:center;background-color:rgba(255, 255, 255, 0.2);justify-content:center}.chenar-buletin img{width:auto;height:100%;top:0;left:0;position:absolute;border-radius:10px;z-index:4}.chenar-buletin .face-img{background-color:rgba(255, 255, 255, 0.3)}.buletin-container .w-40{width:40%}.animation{width:100%;height:100%;}.color-black-2{color:#71727a}.font-size-3{font-size:3vh}.font-size-25{font-size:2.5vh}.font-size-1{font-size:1vh}.font-weight-900{font-weight:900}.mt-8{margin-top:8vh}.mt-12{margin-top:12vh}.mt-30-i{margin-top:30% !important}.ml-5{margin-left:5vh}.chenar-buletin .face-img{left:-2%;width:104%;top:-40px}.pl-2-5{padding-left:2.5vh}.container-coin{background-color:transparent;perspective:1000px;rotate:120deg 0deg}.coin-flip{animation:flip 0.4s ease-in;animation-delay:0.5s;transform-style:preserve-3d;animation-fill-mode:forwards;visibility:hidden}.coin-scale{animation:show 0.4s ease-in;animation-delay:0.5s;transform-style:preserve-3d;animation-fill-mode:forwards}.scroll-disabled{height:100%;overflow-x:hidden;pointer-events:none;user-select:none}.scroll-to-top-btn{position:fixed;z-index:200;bottom:20px;left:20px;width:6vh;height:6vh;border-radius:50%;background-color:#1feaa6;color:white;display:flex;align-items:center;justify-content:center;font-size:5vh;cursor:pointer;box-shadow:0 2px 5px rgba(0, 0, 0, 0.3);transition:background-color 0.3s}.scroll-to-top-btn:hover{background-color:#17d296}.scroll-full{margin:4px, 4px;padding:4px;overflow-x:hidden;overflow-y:auto}.video-demo{z-index:0;width:100%;height:100%;border-radius:20px}.video-capture{padding:2.5vh 2.5vh;margin-top:3em;text-align:center;position:relative}.capture-title{z-index:4;margin-top:3vh;position:absolute;bottom:5vh;padding:2.5vh 2.5vh}video::-webkit-media-controls{display:none !important}@keyframes transition-i{from{width:0;height:0;opacity:1}80%{width:10vh;height:10vh;opacity:0.5}100%{opacity:0}}@keyframes flip{0%{transform:rotateX(140deg);visibility:visible}25%{transform:rotateX(120deg);visibility:visible}50%{transform:rotateX(90deg);visibility:visible}75%{transform:rotateX(75deg);visibility:visible}100%{transform:rotateX(0deg);visibility:visible}}@keyframes show{0%{transform:scale(0)}25%{transform:scale(0.2)}40%{transform:scale(0.4)}50%{transform:scale(0.5)}60%{transform:scale(0.6)}70%{transform:scale(0.7)}100%{transform:scale(1)}}@keyframes rise{0%{visibility:hidden}50%{visibility:visible}100%{visibility:visible}}.buletin-container.rotate-x img{animation:transform-rotate-x 2s infinite ease-in}.rotateimg90{animation:transform-rotate-x2 2s forwards;animation-delay:1s;position:absolute}.rotateimg180{animation:transform-rotate-x3 2s forwards;animation-delay:3s;position:absolute;opacity:0}.buletin-back{display:flex;justify-content:center}.loading-state{display:flex;justify-content:center;align-items:center;position:relative}.loading{width:50px;height:50px;border-radius:50%;border:10px solid #ddd;border-top-color:#71727a;animation:loading 1s linear infinite}.pulsate{animation:textPulse 2s ease 0s infinite normal forwards}@keyframes textPulse{0%{transform:scale(1)}50%{transform:scale(1.1)}100%{transform:scale(1)}}@keyframes loading{to{transform:rotate(360deg)}}@keyframes transform-rotate-x3{from{transform:rotateY(-90deg);opacity:1}to{transform:rotateY(0deg);opacity:1}}@keyframes transform-rotate-x2{to{transform:rotateY(90deg)}}@keyframes transform-rotate-x{to{transform:perspective(600px) rotateX(40deg)}}@media only screen and (max-width: 350px){.second-input{width:36px;height:36px}}@media only screen and (max-width: 390px){.second-input{width:40px;height:40px}.ml-5{margin-left:20vw}}@media only screen and (min-width: 530px) and (max-width: 767px){.chenar-buletin .face-img{width:70%;min-height:auto;margin:auto;left:15%;right:auto;top:-15vh}.ml-5{margin-left:15vw}}@media only screen and (min-width: 600px) and (max-width: 767px){.max-h img{margin-left:15%;margin-right:15%}.max-h{display:flex;align-items:center}.ml-5{margin-left:10vw}}@media only screen and (max-width: 991px){.buletin-container img{max-width:220px}.ml-5{margin-left:2.5vw}}@media only screen and (min-width: 767px){.container{max-width:530px;margin:40px auto;border-radius:20px;box-shadow:1px 1px 10px rgba(0, 0, 0, 0.1);height:calc(100% - 80px)}body{height:90vh}.btn-buletin{max-width:490px;bottom:7vh}.buletin-container img{width:45%}.chenar-buletin .face-img,.chenar-buletin .chenar-img{min-height:300px}.chenar-buletin .face-img{width:80%;min-height:auto;margin:auto;left:10%;right:auto;top:-10vh}.img-selector{width:10vw}}";const d5=class{async onTokenChange(t,e){if(o.debug)console.log("Token change called with value: "+t);if(t==""){t=o.token;return}if(o.token!==t){o.token=t}}agreementAcceptanceEmitted(t){try{i.instance.GenerateAgreement(t.detail.agreementType)}catch(t){this.apiErrorEmitter(t,"Agreement Acceptance")}}async apiErrorEmitter(t,e){var n,s,r,u,l,f;if(t.detail){this.errorTitle=(s=(n=t.detail.message)!==null&&n!==void 0?n:t.detail.status)!==null&&s!==void 0?s:"";this.errorMessage=(u=(r=t.detail.stack)!==null&&r!==void 0?r:t.detail.statusText)!==null&&u!==void 0?u:""}else if(t.message){this.errorTitle=t.message}else if(t.status){this.errorTitle=(l=t.status)!==null&&l!==void 0?l:"";this.errorMessage=(f=t.statusText)!==null&&f!==void 0?f:""}else{this.errorTitle=t}let h={message:this.errorTitle,stack:this.errorMessage,zone:e};try{await i.instance.AddLog(h,await M(this.order_id,this.redirect_id,this.token))}catch(t){}await c.ectdata.delete(o.requestId);p.flowError(this.errorTitle);o.flowStatus=a.ERROREND}constructor(e){t(this,e);this.logInit={};this.initialised=false}async componentWillLoad(){var t,e,n;o.analytics=(t=this.analytics)!==null&&t!==void 0?t:true;this.appInsights=C.getInstance();this.appInsights.trackEvent("IdentificationComponent | init",{requestId:o.requestId});p.init(window);p.flowEvent(r.ComponentLoaded,u.Initialized);o.apiBaseUrl=this.api_url;if(this.env&&this.env!=""){o.environment=this.env}if(o.environment!="PROD"){o.debug=true}i.getInstance();if(o.debug)this.logInit=await M(this.order_id,this.redirect_id,this.token);if(this.token){if(o.debug)console.log("Store Token set with property value: "+this.token);o.token=this.token}if(this.redirect_id){o.redirectId=this.redirect_id}if(this.lang_iso&&this.lang_iso!=""){o.langIso=this.lang_iso}o.showCitizenshipSelector=(e=this.show_citizenship_selector)!==null&&e!==void 0?e:false;o.scrollMode=(n=this.scroll_mode)!==null&&n!==void 0?n:false}async componentDidLoad(){var t,e,n,s,r,a;if(this.order_id&&this.order_id!=""){this.ectData=await c.getOrCreateEctData(this.order_id);o.requestId=this.order_id;o.initialized=this.ectData.initialized;o.modelsPath=this.ectData.modelsPath;if(o.debug)console.log("Current RequestId has value: "+this.order_id)}else if(!this.redirect_id||this.redirect_id==""){var u=await c.getLastEctData(false);if(u){this.ectData=u;o.requestId=this.ectData.orderId;o.initialized=this.ectData.initialized}}if(((t=this.ectData)===null||t===void 0?void 0:t.modelsPath)&&((e=this.ectData)===null||e===void 0?void 0:e.modelsPath)!=""){o.modelsPath=this.ectData.modelsPath}if(this.phone_number&&this.phone_number!=""){o.phoneNumber=this.phone_number;this.ectData.phoneNumber=this.phone_number;await c.ectdata.put(this.ectData)}else if(((n=this.ectData)===null||n===void 0?void 0:n.phoneNumber)&&((s=this.ectData)===null||s===void 0?void 0:s.phoneNumber)!=""){o.phoneNumber=this.ectData.phoneNumber}if(this.citizenship&&this.citizenship!=""){o.citizenship=this.citizenship;this.ectData.citizenship=this.citizenship;await c.ectdata.put(this.ectData)}else if(((r=this.ectData)===null||r===void 0?void 0:r.citizenship)&&((a=this.ectData)===null||a===void 0?void 0:a.citizenship)!=""){o.citizenship=this.ectData.citizenship}await this.initializeRequest();try{if(this.ectData.initialized){o.flowStatus=await i.instance.GetFlowState()}}catch(t){}}async initializeRequest(){if(this.initialised){return}this.initialised=true;if(!o.device){o.device=await(new f5).getDevice()}if(o.device.browser==x.Mi){this.apiErrorEmitter("Mi Browser nu este acceptat. Va rugam utilizati Chrome.","Request Initialisation RequestId:"+o.requestId+" RedirectId:"+o.redirectId);return}try{if(o.debug)await i.instance.AddLog({phase:"debug mode"},this.logInit)}catch(t){}try{if(!o.device.isMobile&&o.redirectId==""&&o.environment=="DEMO"){o.redirectId=E();this.redirect_id=o.redirectId}if(o.token!=""&&(o.requestId!=""||o.redirectId!="")&&!o.initialized){await i.instance.AddIdentificationRequest(o.device,l5.version);await this.treatMobileRedirect();this.ectData.initialized=true;this.ectData.flowStatus=o.flowStatus;this.ectData.modelsPath=o.modelsPath;await c.ectdata.put(this.ectData)}}catch(t){this.apiErrorEmitter(t,"Request Initialisation RequestId:"+o.requestId+" RedirectId:"+o.redirectId)}}async treatMobileRedirect(){if(this.order_id&&this.order_id!=""){return}this.order_id=o.requestId;this.ectData=await c.ectdata.get(o.requestId);if(!this.ectData){await c.ectdata.add({orderId:o.requestId,redirectId:o.redirectId,timestamp:new Date,initialized:true,phoneNumber:o.phoneNumber,refreshStarted:false,flowStatus:o.flowStatus,modelsPath:o.modelsPath,citizenship:o.citizenship,finished:false});this.ectData=await c.ectdata.get(o.requestId)}}disconnectedCallback(){p.flowEvent(r.ComponentLoaded,u.Finalized)}render(){let t=n("div",{key:"f3203e25257630543b3eaf9cfc4149b25ef93d59",class:"container flex center text-center"},n("img",{key:"c6fe9c76d6e120a6c5da737956bcdc2edee27fa5",src:z}));if(o.flowStatus==a.CITIZENSHIP){t=n("citizenship-selection",{key:"9e77e90b824c2f9f0dfc430f8c78aa3c05f94595"})}else if(o.flowStatus==a.LANDING){t=n("landing-validation",{key:"b97ea89c9ebf60641e413e4713f4cb1a56621fa8"})}else if(o.flowStatus==a.MOBILE){t=n("mobile-redirect",{key:"e65b2e1943c46d6231c706f66b5dd74aea27a223"})}else if(o.flowStatus==a.AGREEMENT){t=n("agreement-info",{key:"5521a8e72acf2886f941b7579e4ebd739c977c3b"})}else if(o.flowStatus==a.PHONE){t=n("sms-send",{key:"8f9e86a5c1eb8e53e5eaa8fcefc46f9aa679ebf3"})}else if(o.flowStatus==a.CODE){t=n("sms-code-validation",{key:"21522cd6e114239dded1749feb3faf6bdaa057ab"})}else if(o.flowStatus==a.CODEERROR){t=n("sms-code-validation",{key:"4fb020e67147934651ac3be676982be0a7116474"})}else if(o.flowStatus==a.IDTYPE){t=n("id-selection",{key:"d5827bb28e1d08c3654d426f4ca1feadf63499b0"})}else if(o.flowStatus==a.IDFRONTHOWTO){if(o.debug)console.log("identification-component | render | IDFRONTHOWTO");t=n("how-to-info",{key:"b7e8a8d8a3c12ff3173410cfc02c5fdb1ecb0f16"})}else if(o.flowStatus==a.IDFRONT){if(o.debug)console.log("identification-component | render | IDFRONT");t=n("process-id",{key:"98b2993c6e3c1a9f5b31a9275a1210961d49ac29",id:"processIdFront",mode:"front"})}else if(o.flowStatus==a.IDBACKHOWTO){if(o.debug)console.log("identification-component | render | IDBACKHOWTO");t=n("how-to-info",{key:"c7e1170942611af387b7fb9435a752a8d9b14f74"})}else if(o.flowStatus==a.IDBACK){if(o.debug)console.log("identification-component | render | IDBACK");t=n("process-id",{key:"94969f6a60480bbe6e2159ad3f2fb1055a2f4ffc",id:"processIdBack",mode:"back"})}else if(o.flowStatus==a.IDTILTHOWTO){if(o.debug)console.log("identification-component | render | IDTILTHOWTO");t=n("how-to-info",{key:"4d113c355535cdad7fc8658d900b7e6289a8ea85"})}else if(o.flowStatus==a.IDTILT){if(o.debug)console.log("identification-component | render | TILT");t=n("process-id",{key:"ae5dbd27f705fae9969bfdc57e30442dc22d8850",id:"processIdTilt",mode:"tilt"})}else if(o.flowStatus==a.LIVENESSHOWTO){if(o.debug)console.log("identification-component | render | LIVENESSHOWTO");t=n("how-to-info",{key:"18e81c7168212fa0dfafc08344eb39a151fc7b56"})}else if(o.flowStatus==a.LIVENESS){if(o.debug)console.log("identification-component | render | LIVENESS");t=n("user-liveness",{key:"0f77272e45c6f7c835b8dc720b5633dee2cdc735",id:"userLiveness",mode:"selfie"})}else if(o.flowStatus==a.LIVENESSGESTUREHOWTO){if(o.debug)console.log("identification-component | render | LIVENESSGESTUREHOWTO");t=n("state-transition",{key:"0703f0d9d20f2f550aab5ea41a826a03de2d3424"})}else if(o.flowStatus==a.LIVENESSGESTURE){if(o.debug)console.log("identification-component | render | LIVENESSGESTURE");t=n("user-liveness",{key:"8b0c56bb67ec4e88856432656ce6582681d70de9",id:"userLivenessGesture",mode:"selfieGesture"})}else if(o.flowStatus==a.COMPLETE){if(o.debug)console.log("identification-component | render | COMPLETE");t=n("end-redirect",{key:"6127a025811195d3bfc56570c6a6e76a5e52f11a"})}else if(o.flowStatus==a.ERROREND){t=n("error-end",{key:"7c725e7d1339f11cf78cb317b6031bef83ace90b",errorTitle:this.errorTitle,message:this.errorMessage})}else if(o.flowStatus==a.CAMERAERROR){t=n("camera-error",{key:"472101e25c0ba6bc710b6d6b1e4ac9e92654cd40"})}else if(o.flowStatus==a.RANDOM){if(o.debug)console.log("identification-component | render | RANDOM");t=n("random-action",{key:"95570f8b810c17a19a336f89283b7381a4bc259a"})}return n("div",{key:"f941452ca3ff2a13851a245586ff867d373c1993",class:"full"},t)}static get watchers(){return{token:["onTokenChange"]}}};d5.style=h5;const p5="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0Mi4xMDkiIGhlaWdodD0iNTIuNzg4IiB2aWV3Qm94PSIwIDAgNDIuMTA5IDUyLjc4OCI+DQogIDxnIGlkPSJtb2JpbGVfcGhvbmUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yNSAtMzQyKSI+DQogICAgPHBhdGggaWQ9IlBhdGhfNDc0NiIgZGF0YS1uYW1lPSJQYXRoIDQ3NDYiIGQ9Ik0yOS45MSw1NWEuOTEuOTEsMCwxLDAsMCwxLjgyaDMuNjQxYS45MS45MSwwLDEsMCwwLTEuODJaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg4Ljc0MiAzMzQuMzI3KSIvPg0KICAgIDxwYXRoIGlkPSJQYXRoXzQ3NDgiIGRhdGEtbmFtZT0iUGF0aCA0NzQ4IiBkPSJNMzYuNTEyLDguOTFBLjg2Ljg2LDAsMCwwLDM1LjYsOEgyNy40MWEuODYuODYsMCwwLDAtLjkxLjkxLjg2Ljg2LDAsMCwwLC45MS45MUgzNS42QS44Ni44NiwwLDAsMCwzNi41MTIsOC45MVoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDguOTY3IDMzOC41NTEpIiBmaWxsPSIjMjUyYzgyIi8+DQogICAgPGcgaWQ9Ikdyb3VwXzQ2MDciIGRhdGEtbmFtZT0iR3JvdXAgNDYwNyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjUgMzQyKSI+DQogICAgICA8cGF0aCBpZD0iUGF0aF80NzQ3IiBkYXRhLW5hbWU9IlBhdGggNDc0NyIgZD0iTTQ0LjEyNSw4LjM3YS45MS45MSwwLDEsMCwxLjgyLDBBNS40MzksNS40MzksMCwwLDAsNDAuNTc1LDNIMjAuMzdBNS40MzksNS40MzksMCwwLDAsMTUsOC4zN1Y1MC40MThhNS4zOCw1LjM4LDAsMCwwLDUuMzcsNS4zN0g0MC41NzVhNS4zOCw1LjM4LDAsMCwwLDUuMzctNS4zN1YzNy41ODVhLjkxLjkxLDAsMSwwLTEuODIsMFY1MC40MThhMy41NTQsMy41NTQsMCwwLDEtMy41NSwzLjU1SDIwLjM3YTMuNTU0LDMuNTU0LDAsMCwxLTMuNTUtMy41NVY4LjM3YTMuNjE0LDMuNjE0LDAsMCwxLDMuNTUtMy41NUg0MC41NzVhMy42MTQsMy42MTQsMCwwLDEsMy41NSwzLjU1WiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTE1IC0zKSIgZmlsbD0iIzI1MmM4MiIvPg0KICAgICAgPGcgaWQ9Ikdyb3VwXzQ2MDYiIGRhdGEtbmFtZT0iR3JvdXAgNDYwNiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTguMjAzIDguMTkxKSI+DQogICAgICAgIDxwYXRoIGlkPSJQYXRoXzQ3NTgiIGRhdGEtbmFtZT0iUGF0aCA0NzU4IiBkPSJNOTQuOTUzLDc1YTExLjk1MywxMS45NTMsMCwxLDAsMTEuOTUzLDExLjk1M0ExMS45NjcsMTEuOTY3LDAsMCwwLDk0Ljk1Myw3NVptMCwyMi40NTdhMTAuNSwxMC41LDAsMSwxLDEwLjUtMTAuNUExMC41MTYsMTAuNTE2LDAsMCwxLDk0Ljk1Myw5Ny40NTdaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtODMgLTc1KSIgZmlsbD0iIzI1MmM4MiIvPg0KICAgICAgICA8cGF0aCBpZD0iUGF0aF80NzU5IiBkYXRhLW5hbWU9IlBhdGggNDc1OSIgZD0iTTExMC43NTIsOTguNzEybC03LjI3NSw3LjI3NS00Ljc0LTQuNzM5YS43MjQuNzI0LDAsMCwwLTEuMDI0LDEuMDI0bDUuMjUyLDUuMjUyYS43MjQuNzI0LDAsMCwwLDEuMDI0LDBsNy43ODctNy43ODdhLjcyNC43MjQsMCwwLDAtMS4wMjQtMS4wMjRaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtOTIuMjQ4IC04OS45ODgpIiBmaWxsPSIjN2JiNDBlIi8+DQogICAgICA8L2c+DQogICAgPC9nPg0KICA8L2c+DQo8L3N2Zz4NCg==";const m5="";const b5=class{constructor(n){t(this,n);this.apiErrorEvent=e(this,"apiError")}async componentWillLoad(){p.flowStarted();this.translations=await b.getValues();this.buttonDisabled=false;this.ectData=await c.ectdata.get(o.requestId);await this.initRequest()}async componentDidLoad(){await d.initialize(r.Landing)}async initRequest(){if(o.apiBaseUrl.includes("apimd")){this.warningText=this.translations.LandingValues.WarningMd}else{this.warningText=this.translations.LandingValues.Warning}}async startFlow(){if(!this.buttonDisabled){this.buttonDisabled=true;var t=await m.InitCameras(o.device);if(!t&&o.device.mobileOS==g.iOS){this.ectData.refreshStarted=false;await c.ectdata.put(this.ectData)}try{o.flowStatus=await i.instance.LandingValidationStartFlow(t)}catch(t){this.apiErrorEvent.emit(t)}}}async disconnectedCallback(){await d.finalize(r.Landing)}async leaveFlow(){if(this.buttonDisabled)return;try{let t=await i.instance.AbortRequest();o.flowStatus=a[t.state];await c.ectdata.delete(o.requestId);p.flowAborted()}catch(t){p.flowAborted();this.apiErrorEvent.emit(t)}}render(){return n("div",{key:"2469d5b3bd889ec1cb70315659b76d457036e2ac",class:"container flex center"},n("div",{key:"6a6782f1ade3dfbae1a1e632fc4d3e6fc2f84208",class:"px-4"},n("h1",{key:"f6603f3e2d150a0adf467c8c64566784343ae249",class:"text-center px-1 mb-1"},this.translations.LandingValues.Title),n("div",{key:"d39e20bdf0ee6b9e85576870e145a5b9caf7f919",class:"info-container mb-2"},n("div",{key:"5bf6b84be1155b8bf82939c8562f30dcd6765099",class:"img-text"},n("div",{key:"436d13b55e89c107959f996d45cf4cc445a4d77d",class:"bg-img"},n("img",{key:"814ee0eea63f298bfd63a573973560eefe81ae50",src:o5})),n("h2",{key:"05fb39bd9aef6ed2382c48858fedff22128e6e65"},this.translations.LandingValues.IdInfo)),n("div",{key:"ec129795c17c007b99f3aedb382bcad2b1b0f89f",class:"img-text"},n("div",{key:"38bf98c2d02a34127fbba88607a410de544beb3f",class:"bg-img"},n("img",{key:"7e25803515200900aade36112849e1a1d55a8cdc",src:p5})),n("h2",{key:"9f98da2e9b38da7e3ca9fe25cfdd2335c3f084ab"},this.translations.LandingValues.DeviceInfo))),n("div",{key:"7a239652cefc22987f3b4e6fd65d6145ea79cfc0",class:"button flex mb-1"},this.buttonDisabled?n("div",{class:"img-loader rounded img-loader-button"},n("img",{class:"loading-image loading-image-button",src:z})):null,n("button",{key:"d522ca7e0b9731387434f33abeec18da4b3189cb",class:"main-button",type:"button",disabled:this.buttonDisabled,onClick:()=>this.startFlow()},this.translations.LandingValues.Button)),n("div",{key:"b994a0cb45fb430629682805085bdd9ca458d490",class:"text-center"},n("p",{key:"0b5f92a40e6a8468622a0c5a24460bbc8a4e629b",class:"main-text link-text",onClick:()=>this.leaveFlow()},this.translations.LandingValues.ButtonLeave)),n("div",{key:"968ca3c211fedb03e69cc782fa5a098d42ddd759",class:"footer text-center"},n("img",{key:"176617ac7647844b9ba133cefdcffedf5eff0609",src:y}))))}};b5.style=m5;var y5={};var g5;var w5;function v5(){if(w5)return g5;w5=1;g5=function(){return typeof Promise==="function"&&Promise.prototype&&Promise.prototype.then};return g5}var x5={};var N5={};var k5;function C5(){if(k5)return N5;k5=1;let t;const e=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];N5.getSymbolSize=function t(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17};N5.getSymbolTotalCodewords=function t(n){return e[n]};N5.getBCHDigit=function(t){let e=0;while(t!==0){e++;t>>>=1}return e};N5.setToSJISFunction=function e(n){if(typeof n!=="function"){throw new Error('"toSJISFunc" is not a valid function.')}t=n};N5.isKanjiModeEnabled=function(){return typeof t!=="undefined"};N5.toSJIS=function e(n){return t(n)};return N5}var $5={};var S5;function I5(){if(S5)return $5;S5=1;(function(t){t.L={bit:1};t.M={bit:0};t.Q={bit:3};t.H={bit:2};function e(e){if(typeof e!=="string"){throw new Error("Param is not a string")}const n=e.toLowerCase();switch(n){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+e)}}t.isValid=function t(e){return e&&typeof e.bit!=="undefined"&&e.bit>=0&&e.bit<4};t.from=function n(s,r){if(t.isValid(s)){return s}try{return e(s)}catch(t){return r}}})($5);return $5}var M5;var E5;function T5(){if(E5)return M5;E5=1;function t(){this.buffer=[];this.length=0}t.prototype={get:function(t){const e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)===1},put:function(t,e){for(let n=0;n<e;n++){this.putBit((t>>>e-n-1&1)===1)}},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);if(this.buffer.length<=e){this.buffer.push(0)}if(t){this.buffer[e]|=128>>>this.length%8}this.length++}};M5=t;return M5}var A5;var D5;function R5(){if(D5)return A5;D5=1;function t(t){if(!t||t<1){throw new Error("BitMatrix size must be defined and greater than 0")}this.size=t;this.data=new Uint8Array(t*t);this.reservedBit=new Uint8Array(t*t)}t.prototype.set=function(t,e,n,s){const r=t*this.size+e;this.data[r]=n;if(s)this.reservedBit[r]=true};t.prototype.get=function(t,e){return this.data[t*this.size+e]};t.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n};t.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};A5=t;return A5}var O5={};var L5;function _5(){if(L5)return O5;L5=1;(function(t){const e=C5().getSymbolSize;t.getRowColCoords=function t(n){if(n===1)return[];const s=Math.floor(n/7)+2;const r=e(n);const i=r===145?26:Math.ceil((r-13)/(2*s-2))*2;const o=[r-7];for(let t=1;t<s-1;t++){o[t]=o[t-1]-i}o.push(6);return o.reverse()};t.getPositions=function e(n){const s=[];const r=t.getRowColCoords(n);const i=r.length;for(let t=0;t<i;t++){for(let e=0;e<i;e++){if(t===0&&e===0||t===0&&e===i-1||t===i-1&&e===0){continue}s.push([r[t],r[e]])}}return s}})(O5);return O5}var F5={};var z5;function j5(){if(z5)return F5;z5=1;const t=C5().getSymbolSize;const e=7;F5.getPositions=function n(s){const r=t(s);return[[0,0],[r-e,0],[0,r-e]]};return F5}var P5={};var B5;function W5(){if(B5)return P5;B5=1;(function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e={N1:3,N2:3,N3:40,N4:10};t.isValid=function t(e){return e!=null&&e!==""&&!isNaN(e)&&e>=0&&e<=7};t.from=function e(n){return t.isValid(n)?parseInt(n,10):undefined};t.getPenaltyN1=function t(n){const s=n.size;let r=0;let i=0;let o=0;let a=null;let c=null;for(let t=0;t<s;t++){i=o=0;a=c=null;for(let u=0;u<s;u++){let s=n.get(t,u);if(s===a){i++}else{if(i>=5)r+=e.N1+(i-5);a=s;i=1}s=n.get(u,t);if(s===c){o++}else{if(o>=5)r+=e.N1+(o-5);c=s;o=1}}if(i>=5)r+=e.N1+(i-5);if(o>=5)r+=e.N1+(o-5)}return r};t.getPenaltyN2=function t(n){const s=n.size;let r=0;for(let t=0;t<s-1;t++){for(let e=0;e<s-1;e++){const s=n.get(t,e)+n.get(t,e+1)+n.get(t+1,e)+n.get(t+1,e+1);if(s===4||s===0)r++}}return r*e.N2};t.getPenaltyN3=function t(n){const s=n.size;let r=0;let i=0;let o=0;for(let t=0;t<s;t++){i=o=0;for(let e=0;e<s;e++){i=i<<1&2047|n.get(t,e);if(e>=10&&(i===1488||i===93))r++;o=o<<1&2047|n.get(e,t);if(e>=10&&(o===1488||o===93))r++}}return r*e.N3};t.getPenaltyN4=function t(n){let s=0;const r=n.data.length;for(let t=0;t<r;t++)s+=n.data[t];const i=Math.abs(Math.ceil(s*100/r/5)-10);return i*e.N4};function n(e,n,s){switch(e){case t.Patterns.PATTERN000:return(n+s)%2===0;case t.Patterns.PATTERN001:return n%2===0;case t.Patterns.PATTERN010:return s%3===0;case t.Patterns.PATTERN011:return(n+s)%3===0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(s/3))%2===0;case t.Patterns.PATTERN101:return n*s%2+n*s%3===0;case t.Patterns.PATTERN110:return(n*s%2+n*s%3)%2===0;case t.Patterns.PATTERN111:return(n*s%3+(n+s)%2)%2===0;default:throw new Error("bad maskPattern:"+e)}}t.applyMask=function t(e,s){const r=s.size;for(let t=0;t<r;t++){for(let i=0;i<r;i++){if(s.isReserved(i,t))continue;s.xor(i,t,n(e,i,t))}}};t.getBestMask=function e(n,s){const r=Object.keys(t.Patterns).length;let i=0;let o=Infinity;for(let e=0;e<r;e++){s(e);t.applyMask(e,n);const r=t.getPenaltyN1(n)+t.getPenaltyN2(n)+t.getPenaltyN3(n)+t.getPenaltyN4(n);t.applyMask(e,n);if(r<o){o=r;i=e}}return i}})(P5);return P5}var G5={};var V5;function U5(){if(V5)return G5;V5=1;const t=I5();const e=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81];const n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];G5.getBlocksCount=function n(s,r){switch(r){case t.L:return e[(s-1)*4+0];case t.M:return e[(s-1)*4+1];case t.Q:return e[(s-1)*4+2];case t.H:return e[(s-1)*4+3];default:return undefined}};G5.getTotalCodewordsCount=function e(s,r){switch(r){case t.L:return n[(s-1)*4+0];case t.M:return n[(s-1)*4+1];case t.Q:return n[(s-1)*4+2];case t.H:return n[(s-1)*4+3];default:return undefined}};return G5}var Y5={};var H5={};var Z5;function Q5(){if(Z5)return H5;Z5=1;const t=new Uint8Array(512);const e=new Uint8Array(256);(function n(){let s=1;for(let n=0;n<255;n++){t[n]=s;e[s]=n;s<<=1;if(s&256){s^=285}}for(let e=255;e<512;e++){t[e]=t[e-255]}})();H5.log=function t(n){if(n<1)throw new Error("log("+n+")");return e[n]};H5.exp=function e(n){return t[n]};H5.mul=function n(s,r){if(s===0||r===0)return 0;return t[e[s]+e[r]]};return H5}var X5;function q5(){if(X5)return Y5;X5=1;(function(t){const e=Q5();t.mul=function t(n,s){const r=new Uint8Array(n.length+s.length-1);for(let t=0;t<n.length;t++){for(let i=0;i<s.length;i++){r[t+i]^=e.mul(n[t],s[i])}}return r};t.mod=function t(n,s){let r=new Uint8Array(n);while(r.length-s.length>=0){const t=r[0];for(let n=0;n<s.length;n++){r[n]^=e.mul(s[n],t)}let n=0;while(n<r.length&&r[n]===0)n++;r=r.slice(n)}return r};t.generateECPolynomial=function n(s){let r=new Uint8Array([1]);for(let n=0;n<s;n++){r=t.mul(r,new Uint8Array([1,e.exp(n)]))}return r}})(Y5);return Y5}var J5;var K5;function t6(){if(K5)return J5;K5=1;const t=q5();function e(t){this.genPoly=undefined;this.degree=t;if(this.degree)this.initialize(this.degree)}e.prototype.initialize=function e(n){this.degree=n;this.genPoly=t.generateECPolynomial(this.degree)};e.prototype.encode=function e(n){if(!this.genPoly){throw new Error("Encoder not initialized")}const s=new Uint8Array(n.length+this.degree);s.set(n);const r=t.mod(s,this.genPoly);const i=this.degree-r.length;if(i>0){const t=new Uint8Array(this.degree);t.set(r,i);return t}return r};J5=e;return J5}var e6={};var n6={};var s6={};var r6;function i6(){if(r6)return s6;r6=1;s6.isValid=function t(e){return!isNaN(e)&&e>=1&&e<=40};return s6}var o6={};var a6;function c6(){if(a6)return o6;a6=1;const t="[0-9]+";const e="[A-Z $%*+\\-./:]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|"+"[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|"+"[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|"+"[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const s="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+")(?:.|[\r\n]))+";o6.KANJI=new RegExp(n,"g");o6.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");o6.BYTE=new RegExp(s,"g");o6.NUMERIC=new RegExp(t,"g");o6.ALPHANUMERIC=new RegExp(e,"g");const r=new RegExp("^"+n+"$");const i=new RegExp("^"+t+"$");const o=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");o6.testKanji=function t(e){return r.test(e)};o6.testNumeric=function t(e){return i.test(e)};o6.testAlphanumeric=function t(e){return o.test(e)};return o6}var u6;function l6(){if(u6)return n6;u6=1;(function(t){const e=i6();const n=c6();t.NUMERIC={id:"Numeric",bit:1<<0,ccBits:[10,12,14]};t.ALPHANUMERIC={id:"Alphanumeric",bit:1<<1,ccBits:[9,11,13]};t.BYTE={id:"Byte",bit:1<<2,ccBits:[8,16,16]};t.KANJI={id:"Kanji",bit:1<<3,ccBits:[8,10,12]};t.MIXED={bit:-1};t.getCharCountIndicator=function t(n,s){if(!n.ccBits)throw new Error("Invalid mode: "+n);if(!e.isValid(s)){throw new Error("Invalid version: "+s)}if(s>=1&&s<10)return n.ccBits[0];else if(s<27)return n.ccBits[1];return n.ccBits[2]};t.getBestModeForData=function e(s){if(n.testNumeric(s))return t.NUMERIC;else if(n.testAlphanumeric(s))return t.ALPHANUMERIC;else if(n.testKanji(s))return t.KANJI;else return t.BYTE};t.toString=function t(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")};t.isValid=function t(e){return e&&e.bit&&e.ccBits};function s(e){if(typeof e!=="string"){throw new Error("Param is not a string")}const n=e.toLowerCase();switch(n){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+e)}}t.from=function e(n,r){if(t.isValid(n)){return n}try{return s(n)}catch(t){return r}}})(n6);return n6}var f6;function h6(){if(f6)return e6;f6=1;(function(t){const e=C5();const n=U5();const s=I5();const r=l6();const i=i6();const o=1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0;const a=e.getBCHDigit(o);function c(e,n,s){for(let r=1;r<=40;r++){if(n<=t.getCapacity(r,s,e)){return r}}return undefined}function u(t,e){return r.getCharCountIndicator(t,e)+4}function l(t,e){let n=0;t.forEach((function(t){const s=u(t.mode,e);n+=s+t.getBitsLength()}));return n}function f(e,n){for(let s=1;s<=40;s++){const i=l(e,s);if(i<=t.getCapacity(s,n,r.MIXED)){return s}}return undefined}t.from=function t(e,n){if(i.isValid(e)){return parseInt(e,10)}return n};t.getCapacity=function t(s,o,a){if(!i.isValid(s)){throw new Error("Invalid QR Code version")}if(typeof a==="undefined")a=r.BYTE;const c=e.getSymbolTotalCodewords(s);const l=n.getTotalCodewordsCount(s,o);const f=(c-l)*8;if(a===r.MIXED)return f;const h=f-u(a,s);switch(a){case r.NUMERIC:return Math.floor(h/10*3);case r.ALPHANUMERIC:return Math.floor(h/11*2);case r.KANJI:return Math.floor(h/13);case r.BYTE:default:return Math.floor(h/8)}};t.getBestVersionForData=function t(e,n){let r;const i=s.from(n,s.M);if(Array.isArray(e)){if(e.length>1){return f(e,i)}if(e.length===0){return 1}r=e[0]}else{r=e}return c(r.mode,r.getLength(),i)};t.getEncodedBits=function t(n){if(!i.isValid(n)||n<7){throw new Error("Invalid QR Code version")}let s=n<<12;while(e.getBCHDigit(s)-a>=0){s^=o<<e.getBCHDigit(s)-a}return n<<12|s}})(e6);return e6}var d6={};var p6;function m6(){if(p6)return d6;p6=1;const t=C5();const e=1<<10|1<<8|1<<5|1<<4|1<<2|1<<1|1<<0;const n=1<<14|1<<12|1<<10|1<<4|1<<1;const s=t.getBCHDigit(e);d6.getEncodedBits=function r(i,o){const a=i.bit<<3|o;let c=a<<10;while(t.getBCHDigit(c)-s>=0){c^=e<<t.getBCHDigit(c)-s}return(a<<10|c)^n};return d6}var b6={};var y6;var g6;function w6(){if(g6)return y6;g6=1;const t=l6();function e(e){this.mode=t.NUMERIC;this.data=e.toString()}e.getBitsLength=function t(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)};e.prototype.getLength=function t(){return this.data.length};e.prototype.getBitsLength=function t(){return e.getBitsLength(this.data.length)};e.prototype.write=function t(e){let n,s,r;for(n=0;n+3<=this.data.length;n+=3){s=this.data.substr(n,3);r=parseInt(s,10);e.put(r,10)}const i=this.data.length-n;if(i>0){s=this.data.substr(n);r=parseInt(s,10);e.put(r,i*3+1)}};y6=e;return y6}var v6;var x6;function N6(){if(x6)return v6;x6=1;const t=l6();const e=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(e){this.mode=t.ALPHANUMERIC;this.data=e}n.getBitsLength=function t(e){return 11*Math.floor(e/2)+6*(e%2)};n.prototype.getLength=function t(){return this.data.length};n.prototype.getBitsLength=function t(){return n.getBitsLength(this.data.length)};n.prototype.write=function t(n){let s;for(s=0;s+2<=this.data.length;s+=2){let t=e.indexOf(this.data[s])*45;t+=e.indexOf(this.data[s+1]);n.put(t,11)}if(this.data.length%2){n.put(e.indexOf(this.data[s]),6)}};v6=n;return v6}var k6;var C6;function $6(){if(C6)return k6;C6=1;const t=l6();function e(e){this.mode=t.BYTE;if(typeof e==="string"){this.data=(new TextEncoder).encode(e)}else{this.data=new Uint8Array(e)}}e.getBitsLength=function t(e){return e*8};e.prototype.getLength=function t(){return this.data.length};e.prototype.getBitsLength=function t(){return e.getBitsLength(this.data.length)};e.prototype.write=function(t){for(let e=0,n=this.data.length;e<n;e++){t.put(this.data[e],8)}};k6=e;return k6}var S6;var I6;function M6(){if(I6)return S6;I6=1;const t=l6();const e=C5();function n(e){this.mode=t.KANJI;this.data=e}n.getBitsLength=function t(e){return e*13};n.prototype.getLength=function t(){return this.data.length};n.prototype.getBitsLength=function t(){return n.getBitsLength(this.data.length)};n.prototype.write=function(t){let n;for(n=0;n<this.data.length;n++){let s=e.toSJIS(this.data[n]);if(s>=33088&&s<=40956){s-=33088}else if(s>=57408&&s<=60351){s-=49472}else{throw new Error("Invalid SJIS character: "+this.data[n]+"\n"+"Make sure your charset is UTF-8")}s=(s>>>8&255)*192+(s&255);t.put(s,13)}};S6=n;return S6}var E6={exports:{}};var T6;function A6(){if(T6)return E6.exports;T6=1;(function(t){var e={single_source_shortest_paths:function(t,n,s){var r={};var i={};i[n]=0;var o=e.PriorityQueue.make();o.push(n,0);var a,c,u,l,f,h,d,p,m;while(!o.empty()){a=o.pop();c=a.value;l=a.cost;f=t[c]||{};for(u in f){if(f.hasOwnProperty(u)){h=f[u];d=l+h;p=i[u];m=typeof i[u]==="undefined";if(m||p>d){i[u]=d;o.push(u,d);r[u]=c}}}}if(typeof s!=="undefined"&&typeof i[s]==="undefined"){var b=["Could not find a path from ",n," to ",s,"."].join("");throw new Error(b)}return r},extract_shortest_path_from_predecessor_list:function(t,e){var n=[];var s=e;while(s){n.push(s);s=t[s]}n.reverse();return n},find_path:function(t,n,s){var r=e.single_source_shortest_paths(t,n,s);return e.extract_shortest_path_from_predecessor_list(r,s)},PriorityQueue:{make:function(t){var n=e.PriorityQueue,s={},r;t=t||{};for(r in n){if(n.hasOwnProperty(r)){s[r]=n[r]}}s.queue=[];s.sorter=t.sorter||n.default_sorter;return s},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var n={value:t,cost:e};this.queue.push(n);this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};{t.exports=e}})(E6);return E6.exports}var D6;function R6(){if(D6)return b6;D6=1;(function(t){const e=l6();const n=w6();const s=N6();const r=$6();const i=M6();const o=c6();const a=C5();const c=A6();function u(t){return unescape(encodeURIComponent(t)).length}function l(t,e,n){const s=[];let r;while((r=t.exec(n))!==null){s.push({data:r[0],index:r.index,mode:e,length:r[0].length})}return s}function f(t){const n=l(o.NUMERIC,e.NUMERIC,t);const s=l(o.ALPHANUMERIC,e.ALPHANUMERIC,t);let r;let i;if(a.isKanjiModeEnabled()){r=l(o.BYTE,e.BYTE,t);i=l(o.KANJI,e.KANJI,t)}else{r=l(o.BYTE_KANJI,e.BYTE,t);i=[]}const c=n.concat(s,r,i);return c.sort((function(t,e){return t.index-e.index})).map((function(t){return{data:t.data,mode:t.mode,length:t.length}}))}function h(t,o){switch(o){case e.NUMERIC:return n.getBitsLength(t);case e.ALPHANUMERIC:return s.getBitsLength(t);case e.KANJI:return i.getBitsLength(t);case e.BYTE:return r.getBitsLength(t)}}function d(t){return t.reduce((function(t,e){const n=t.length-1>=0?t[t.length-1]:null;if(n&&n.mode===e.mode){t[t.length-1].data+=e.data;return t}t.push(e);return t}),[])}function p(t){const n=[];for(let s=0;s<t.length;s++){const r=t[s];switch(r.mode){case e.NUMERIC:n.push([r,{data:r.data,mode:e.ALPHANUMERIC,length:r.length},{data:r.data,mode:e.BYTE,length:r.length}]);break;case e.ALPHANUMERIC:n.push([r,{data:r.data,mode:e.BYTE,length:r.length}]);break;case e.KANJI:n.push([r,{data:r.data,mode:e.BYTE,length:u(r.data)}]);break;case e.BYTE:n.push([{data:r.data,mode:e.BYTE,length:u(r.data)}])}}return n}function m(t,n){const s={};const r={start:{}};let i=["start"];for(let o=0;o<t.length;o++){const a=t[o];const c=[];for(let t=0;t<a.length;t++){const u=a[t];const l=""+o+t;c.push(l);s[l]={node:u,lastCount:0};r[l]={};for(let t=0;t<i.length;t++){const o=i[t];if(s[o]&&s[o].node.mode===u.mode){r[o][l]=h(s[o].lastCount+u.length,u.mode)-h(s[o].lastCount,u.mode);s[o].lastCount+=u.length}else{if(s[o])s[o].lastCount=u.length;r[o][l]=h(u.length,u.mode)+4+e.getCharCountIndicator(u.mode,n)}}}i=c}for(let t=0;t<i.length;t++){r[i[t]].end=0}return{map:r,table:s}}function b(t,o){let c;const u=e.getBestModeForData(t);c=e.from(o,u);if(c!==e.BYTE&&c.bit<u.bit){throw new Error('"'+t+'"'+" cannot be encoded with mode "+e.toString(c)+".\n Suggested mode is: "+e.toString(u))}if(c===e.KANJI&&!a.isKanjiModeEnabled()){c=e.BYTE}switch(c){case e.NUMERIC:return new n(t);case e.ALPHANUMERIC:return new s(t);case e.KANJI:return new i(t);case e.BYTE:return new r(t)}}t.fromArray=function t(e){return e.reduce((function(t,e){if(typeof e==="string"){t.push(b(e,null))}else if(e.data){t.push(b(e.data,e.mode))}return t}),[])};t.fromString=function e(n,s){const r=f(n,a.isKanjiModeEnabled());const i=p(r);const o=m(i,s);const u=c.find_path(o.map,"start","end");const l=[];for(let t=1;t<u.length-1;t++){l.push(o.table[u[t]].node)}return t.fromArray(d(l))};t.rawSplit=function e(n){return t.fromArray(f(n,a.isKanjiModeEnabled()))}})(b6);return b6}var O6;function L6(){if(O6)return x5;O6=1;const t=C5();const e=I5();const n=T5();const s=R5();const r=_5();const i=j5();const o=W5();const a=U5();const c=t6();const u=h6();const l=m6();const f=l6();const h=R6();function d(t,e){const n=t.size;const s=i.getPositions(e);for(let e=0;e<s.length;e++){const r=s[e][0];const i=s[e][1];for(let e=-1;e<=7;e++){if(r+e<=-1||n<=r+e)continue;for(let s=-1;s<=7;s++){if(i+s<=-1||n<=i+s)continue;if(e>=0&&e<=6&&(s===0||s===6)||s>=0&&s<=6&&(e===0||e===6)||e>=2&&e<=4&&s>=2&&s<=4){t.set(r+e,i+s,true,true)}else{t.set(r+e,i+s,false,true)}}}}}function p(t){const e=t.size;for(let n=8;n<e-8;n++){const e=n%2===0;t.set(n,6,e,true);t.set(6,n,e,true)}}function m(t,e){const n=r.getPositions(e);for(let e=0;e<n.length;e++){const s=n[e][0];const r=n[e][1];for(let e=-2;e<=2;e++){for(let n=-2;n<=2;n++){if(e===-2||e===2||n===-2||n===2||e===0&&n===0){t.set(s+e,r+n,true,true)}else{t.set(s+e,r+n,false,true)}}}}}function b(t,e){const n=t.size;const s=u.getEncodedBits(e);let r,i,o;for(let e=0;e<18;e++){r=Math.floor(e/3);i=e%3+n-8-3;o=(s>>e&1)===1;t.set(r,i,o,true);t.set(i,r,o,true)}}function y(t,e,n){const s=t.size;const r=l.getEncodedBits(e,n);let i,o;for(i=0;i<15;i++){o=(r>>i&1)===1;if(i<6){t.set(i,8,o,true)}else if(i<8){t.set(i+1,8,o,true)}else{t.set(s-15+i,8,o,true)}if(i<8){t.set(8,s-i-1,o,true)}else if(i<9){t.set(8,15-i-1+1,o,true)}else{t.set(8,15-i-1,o,true)}}t.set(s-8,8,1,true)}function g(t,e){const n=t.size;let s=-1;let r=n-1;let i=7;let o=0;for(let a=n-1;a>0;a-=2){if(a===6)a--;while(true){for(let n=0;n<2;n++){if(!t.isReserved(r,a-n)){let s=false;if(o<e.length){s=(e[o]>>>i&1)===1}t.set(r,a-n,s);i--;if(i===-1){o++;i=7}}}r+=s;if(r<0||n<=r){r-=s;s=-s;break}}}}function w(e,s,r){const i=new n;r.forEach((function(t){i.put(t.mode.bit,4);i.put(t.getLength(),f.getCharCountIndicator(t.mode,e));t.write(i)}));const o=t.getSymbolTotalCodewords(e);const c=a.getTotalCodewordsCount(e,s);const u=(o-c)*8;if(i.getLengthInBits()+4<=u){i.put(0,4)}while(i.getLengthInBits()%8!==0){i.putBit(0)}const l=(u-i.getLengthInBits())/8;for(let t=0;t<l;t++){i.put(t%2?17:236,8)}return v(i,e,s)}function v(e,n,s){const r=t.getSymbolTotalCodewords(n);const i=a.getTotalCodewordsCount(n,s);const o=r-i;const u=a.getBlocksCount(n,s);const l=r%u;const f=u-l;const h=Math.floor(r/u);const d=Math.floor(o/u);const p=d+1;const m=h-d;const b=new c(m);let y=0;const g=new Array(u);const w=new Array(u);let v=0;const x=new Uint8Array(e.buffer);for(let t=0;t<u;t++){const e=t<f?d:p;g[t]=x.slice(y,y+e);w[t]=b.encode(g[t]);y+=e;v=Math.max(v,e)}const N=new Uint8Array(r);let k=0;let C,$;for(C=0;C<v;C++){for($=0;$<u;$++){if(C<g[$].length){N[k++]=g[$][C]}}}for(C=0;C<m;C++){for($=0;$<u;$++){N[k++]=w[$][C]}}return N}function x(e,n,r,i){let a;if(Array.isArray(e)){a=h.fromArray(e)}else if(typeof e==="string"){let t=n;if(!t){const n=h.rawSplit(e);t=u.getBestVersionForData(n,r)}a=h.fromString(e,t||40)}else{throw new Error("Invalid data")}const c=u.getBestVersionForData(a,r);if(!c){throw new Error("The amount of data is too big to be stored in a QR Code")}if(!n){n=c}else if(n<c){throw new Error("\n"+"The chosen QR Code version cannot contain this amount of data.\n"+"Minimum version required to store current data is: "+c+".\n")}const l=w(n,r,a);const f=t.getSymbolSize(n);const v=new s(f);d(v,n);p(v);m(v,n);y(v,r,0);if(n>=7){b(v,n)}g(v,l);if(isNaN(i)){i=o.getBestMask(v,y.bind(null,v,r))}o.applyMask(i,v);y(v,r,i);return{modules:v,version:n,errorCorrectionLevel:r,maskPattern:i,segments:a}}x5.create=function n(s,r){if(typeof s==="undefined"||s===""){throw new Error("No input text")}let i=e.M;let a;let c;if(typeof r!=="undefined"){i=e.from(r.errorCorrectionLevel,e.M);a=u.from(r.version);c=o.from(r.maskPattern);if(r.toSJISFunc){t.setToSJISFunction(r.toSJISFunc)}}return x(s,a,i,c)};return x5}var _6={};var F6={};var z6={};var j6={};var P6;var B6;function W6(){if(B6)return P6;B6=1;P6=function t(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function"){return false}if(typeof Symbol.iterator==="symbol"){return true}var e={};var n=Symbol("test");var s=Object(n);if(typeof n==="string"){return false}if(Object.prototype.toString.call(n)!=="[object Symbol]"){return false}if(Object.prototype.toString.call(s)!=="[object Symbol]"){return false}var r=42;e[n]=r;for(var i in e){return false}if(typeof Object.keys==="function"&&Object.keys(e).length!==0){return false}if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames(e).length!==0){return false}var o=Object.getOwnPropertySymbols(e);if(o.length!==1||o[0]!==n){return false}if(!Object.prototype.propertyIsEnumerable.call(e,n)){return false}if(typeof Object.getOwnPropertyDescriptor==="function"){var a=Object.getOwnPropertyDescriptor(e,n);if(a.value!==r||a.enumerable!==true){return false}}return true};return P6}var G6;var V6;function U6(){if(V6)return G6;V6=1;var t=W6();G6=function e(){return t()&&!!Symbol.toStringTag};return G6}var Y6;var H6;function Z6(){if(H6)return Y6;H6=1;Y6=Object;return Y6}var Q6;var X6;function q6(){if(X6)return Q6;X6=1;Q6=Error;return Q6}var J6;var K6;function t8(){if(K6)return J6;K6=1;J6=EvalError;return J6}var e8;var n8;function s8(){if(n8)return e8;n8=1;e8=RangeError;return e8}var r8;var i8;function o8(){if(i8)return r8;i8=1;r8=ReferenceError;return r8}var a8;var c8;function u8(){if(c8)return a8;c8=1;a8=SyntaxError;return a8}var l8;var f8;function h8(){if(f8)return l8;f8=1;l8=TypeError;return l8}var d8;var p8;function m8(){if(p8)return d8;p8=1;d8=URIError;return d8}var b8;var y8;function g8(){if(y8)return b8;y8=1;b8=Math.abs;return b8}var w8;var v8;function x8(){if(v8)return w8;v8=1;w8=Math.floor;return w8}var N8;var k8;function C8(){if(k8)return N8;k8=1;N8=Math.max;return N8}var $8;var S8;function I8(){if(S8)return $8;S8=1;$8=Math.min;return $8}var M8;var E8;function T8(){if(E8)return M8;E8=1;M8=Math.pow;return M8}var A8;var D8;function R8(){if(D8)return A8;D8=1;A8=Math.round;return A8}var O8;var L8;function _8(){if(L8)return O8;L8=1;O8=Number.isNaN||function t(e){return e!==e};return O8}var F8;var z8;function j8(){if(z8)return F8;z8=1;var t=_8();F8=function e(n){if(t(n)||n===0){return n}return n<0?-1:1};return F8}var P8;var B8;function W8(){if(B8)return P8;B8=1;P8=Object.getOwnPropertyDescriptor;return P8}var G8;var V8;function U8(){if(V8)return G8;V8=1;var t=W8();if(t){try{t([],"length")}catch(e){t=null}}G8=t;return G8}var Y8;var H8;function Z8(){if(H8)return Y8;H8=1;var t=Object.defineProperty||false;if(t){try{t({},"a",{value:1})}catch(e){t=false}}Y8=t;return Y8}var Q8;var X8;function q8(){if(X8)return Q8;X8=1;var t=typeof Symbol!=="undefined"&&Symbol;var e=W6();Q8=function n(){if(typeof t!=="function"){return false}if(typeof Symbol!=="function"){return false}if(typeof t("foo")!=="symbol"){return false}if(typeof Symbol("bar")!=="symbol"){return false}return e()};return Q8}var J8;var K8;function t9(){if(K8)return J8;K8=1;J8=typeof Reflect!=="undefined"&&Reflect.getPrototypeOf||null;return J8}var e9;var n9;function s9(){if(n9)return e9;n9=1;var t=Z6();e9=t.getPrototypeOf||null;return e9}var r9;var i9;function o9(){if(i9)return r9;i9=1;var t="Function.prototype.bind called on incompatible ";var e=Object.prototype.toString;var n=Math.max;var s="[object Function]";var r=function t(e,n){var s=[];for(var r=0;r<e.length;r+=1){s[r]=e[r]}for(var i=0;i<n.length;i+=1){s[i+e.length]=n[i]}return s};var i=function t(e,n){var s=[];for(var r=n,i=0;r<e.length;r+=1,i+=1){s[i]=e[r]}return s};var o=function(t,e){var n="";for(var s=0;s<t.length;s+=1){n+=t[s];if(s+1<t.length){n+=e}}return n};r9=function a(c){var u=this;if(typeof u!=="function"||e.apply(u)!==s){throw new TypeError(t+u)}var l=i(arguments,1);var f;var h=function(){if(this instanceof f){var t=u.apply(this,r(l,arguments));if(Object(t)===t){return t}return this}return u.apply(c,r(l,arguments))};var d=n(0,u.length-l.length);var p=[];for(var m=0;m<d;m++){p[m]="$"+m}f=Function("binder","return function ("+o(p,",")+"){ return binder.apply(this,arguments); }")(h);if(u.prototype){var b=function t(){};b.prototype=u.prototype;f.prototype=new b;b.prototype=null}return f};return r9}var a9;var c9;function u9(){if(c9)return a9;c9=1;var t=o9();a9=Function.prototype.bind||t;return a9}var l9;var f9;function h9(){if(f9)return l9;f9=1;l9=Function.prototype.call;return l9}var d9;var p9;function m9(){if(p9)return d9;p9=1;d9=Function.prototype.apply;return d9}var b9;var y9;function g9(){if(y9)return b9;y9=1;b9=typeof Reflect!=="undefined"&&Reflect&&Reflect.apply;return b9}var w9;var v9;function x9(){if(v9)return w9;v9=1;var t=u9();var e=m9();var n=h9();var s=g9();w9=s||t.call(n,e);return w9}var N9;var k9;function C9(){if(k9)return N9;k9=1;var t=u9();var e=h8();var n=h9();var s=x9();N9=function r(i){if(i.length<1||typeof i[0]!=="function"){throw new e("a function is required")}return s(t,n,i)};return N9}var $9;var S9;function I9(){if(S9)return $9;S9=1;var t=C9();var e=U8();var n;try{n=[].__proto__===Array.prototype}catch(t){if(!t||typeof t!=="object"||!("code"in t)||t.code!=="ERR_PROTO_ACCESS"){throw t}}var s=!!n&&e&&e(Object.prototype,"__proto__");var r=Object;var i=r.getPrototypeOf;$9=s&&typeof s.get==="function"?t([s.get]):typeof i==="function"?function t(e){return i(e==null?e:r(e))}:false;return $9}var M9;var E9;function T9(){if(E9)return M9;E9=1;var t=t9();var e=s9();var n=I9();M9=t?function e(n){return t(n)}:e?function t(n){if(!n||typeof n!=="object"&&typeof n!=="function"){throw new TypeError("getProto: not an object")}return e(n)}:n?function t(e){return n(e)}:null;return M9}var A9;var D9;function R9(){if(D9)return A9;D9=1;var t=Function.prototype.call;var e=Object.prototype.hasOwnProperty;var n=u9();A9=n.call(t,e);return A9}var O9;var L9;function _9(){if(L9)return O9;L9=1;var t;var e=Z6();var n=q6();var s=t8();var r=s8();var i=o8();var o=u8();var a=h8();var c=m8();var u=g8();var l=x8();var f=C8();var h=I8();var d=T8();var p=R8();var m=j8();var b=Function;var y=function(t){try{return b('"use strict"; return ('+t+").constructor;")()}catch(t){}};var g=U8();var w=Z8();var v=function(){throw new a};var x=g?function(){try{return v}catch(t){try{return g(arguments,"callee").get}catch(t){return v}}}():v;var N=q8()();var k=T9();var C=s9();var $=t9();var S=m9();var I=h9();var M={};var E=typeof Uint8Array==="undefined"||!k?t:k(Uint8Array);var T={__proto__:null,"%AggregateError%":typeof AggregateError==="undefined"?t:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer==="undefined"?t:ArrayBuffer,"%ArrayIteratorPrototype%":N&&k?k([][Symbol.iterator]()):t,"%AsyncFromSyncIteratorPrototype%":t,"%AsyncFunction%":M,"%AsyncGenerator%":M,"%AsyncGeneratorFunction%":M,"%AsyncIteratorPrototype%":M,"%Atomics%":typeof Atomics==="undefined"?t:Atomics,"%BigInt%":typeof BigInt==="undefined"?t:BigInt,"%BigInt64Array%":typeof BigInt64Array==="undefined"?t:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array==="undefined"?t:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView==="undefined"?t:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":s,"%Float16Array%":typeof Float16Array==="undefined"?t:Float16Array,"%Float32Array%":typeof Float32Array==="undefined"?t:Float32Array,"%Float64Array%":typeof Float64Array==="undefined"?t:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry==="undefined"?t:FinalizationRegistry,"%Function%":b,"%GeneratorFunction%":M,"%Int8Array%":typeof Int8Array==="undefined"?t:Int8Array,"%Int16Array%":typeof Int16Array==="undefined"?t:Int16Array,"%Int32Array%":typeof Int32Array==="undefined"?t:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":N&&k?k(k([][Symbol.iterator]())):t,"%JSON%":typeof JSON==="object"?JSON:t,"%Map%":typeof Map==="undefined"?t:Map,"%MapIteratorPrototype%":typeof Map==="undefined"||!N||!k?t:k((new Map)[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":e,"%Object.getOwnPropertyDescriptor%":g,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise==="undefined"?t:Promise,"%Proxy%":typeof Proxy==="undefined"?t:Proxy,"%RangeError%":r,"%ReferenceError%":i,"%Reflect%":typeof Reflect==="undefined"?t:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set==="undefined"?t:Set,"%SetIteratorPrototype%":typeof Set==="undefined"||!N||!k?t:k((new Set)[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer==="undefined"?t:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":N&&k?k(""[Symbol.iterator]()):t,"%Symbol%":N?Symbol:t,"%SyntaxError%":o,"%ThrowTypeError%":x,"%TypedArray%":E,"%TypeError%":a,"%Uint8Array%":typeof Uint8Array==="undefined"?t:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray==="undefined"?t:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array==="undefined"?t:Uint16Array,"%Uint32Array%":typeof Uint32Array==="undefined"?t:Uint32Array,"%URIError%":c,"%WeakMap%":typeof WeakMap==="undefined"?t:WeakMap,"%WeakRef%":typeof WeakRef==="undefined"?t:WeakRef,"%WeakSet%":typeof WeakSet==="undefined"?t:WeakSet,"%Function.prototype.call%":I,"%Function.prototype.apply%":S,"%Object.defineProperty%":w,"%Object.getPrototypeOf%":C,"%Math.abs%":u,"%Math.floor%":l,"%Math.max%":f,"%Math.min%":h,"%Math.pow%":d,"%Math.round%":p,"%Math.sign%":m,"%Reflect.getPrototypeOf%":$};var A=function t(e){var n;if(e==="%AsyncFunction%"){n=y("async function () {}")}else if(e==="%GeneratorFunction%"){n=y("function* () {}")}else if(e==="%AsyncGeneratorFunction%"){n=y("async function* () {}")}else if(e==="%AsyncGenerator%"){var s=t("%AsyncGeneratorFunction%");if(s){n=s.prototype}}else if(e==="%AsyncIteratorPrototype%"){var r=t("%AsyncGenerator%");if(r&&k){n=k(r.prototype)}}T[e]=n;return n};var D={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]};var R=u9();var O=R9();var L=R.call(I,Array.prototype.concat);var _=R.call(S,Array.prototype.splice);var F=R.call(I,String.prototype.replace);var z=R.call(I,String.prototype.slice);var j=R.call(I,RegExp.prototype.exec);var P=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;var B=/\\(\\)?/g;var W=function t(e){var n=z(e,0,1);var s=z(e,-1);if(n==="%"&&s!=="%"){throw new o("invalid intrinsic syntax, expected closing `%`")}else if(s==="%"&&n!=="%"){throw new o("invalid intrinsic syntax, expected opening `%`")}var r=[];F(e,P,(function(t,e,n,s){r[r.length]=n?F(s,B,"$1"):e||t}));return r};var G=function t(e,n){var s=e;var r;if(O(D,s)){r=D[s];s="%"+r[0]+"%"}if(O(T,s)){var i=T[s];if(i===M){i=A(s)}if(typeof i==="undefined"&&!n){throw new a("intrinsic "+e+" exists, but is not available. Please file an issue!")}return{alias:r,name:s,value:i}}throw new o("intrinsic "+e+" does not exist!")};O9=function t(e,n){if(typeof e!=="string"||e.length===0){throw new a("intrinsic name must be a non-empty string")}if(arguments.length>1&&typeof n!=="boolean"){throw new a('"allowMissing" argument must be a boolean')}if(j(/^%?[^%]*%?$/,e)===null){throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name")}var s=W(e);var r=s.length>0?s[0]:"";var i=G("%"+r+"%",n);var c=i.name;var u=i.value;var l=false;var f=i.alias;if(f){r=f[0];_(s,L([0,1],f))}for(var h=1,d=true;h<s.length;h+=1){var p=s[h];var m=z(p,0,1);var b=z(p,-1);if((m==='"'||m==="'"||m==="`"||(b==='"'||b==="'"||b==="`"))&&m!==b){throw new o("property names with quotes must have matching quotes")}if(p==="constructor"||!d){l=true}r+="."+p;c="%"+r+"%";if(O(T,c)){u=T[c]}else if(u!=null){if(!(p in u)){if(!n){throw new a("base intrinsic for "+e+" exists, but the property is not available.")}return void 0}if(g&&h+1>=s.length){var y=g(u,p);d=!!y;if(d&&"get"in y&&!("originalValue"in y.get)){u=y.get}else{u=u[p]}}else{d=O(u,p);u=u[p]}if(d&&!l){T[c]=u}}}return u};return O9}var F9;var z9;function j9(){if(z9)return F9;z9=1;var t=_9();var e=C9();var n=e([t("%String.prototype.indexOf%")]);F9=function s(r,i){var o=t(r,!!i);if(typeof o==="function"&&n(r,".prototype.")>-1){return e([o])}return o};return F9}var P9;var B9;function W9(){if(B9)return P9;B9=1;var t=U6()();var e=j9();var n=e("Object.prototype.toString");var s=function e(s){if(t&&s&&typeof s==="object"&&Symbol.toStringTag in s){return false}return n(s)==="[object Arguments]"};var r=function t(e){if(s(e)){return true}return e!==null&&typeof e==="object"&&"length"in e&&typeof e.length==="number"&&e.length>=0&&n(e)!=="[object Array]"&&"callee"in e&&n(e.callee)==="[object Function]"};var i=function(){return s(arguments)}();s.isLegacyArguments=r;P9=i?s:r;return P9}var G9;var V9;function U9(){if(V9)return G9;V9=1;var t=j9();var e=U6()();var n=R9();var s=U8();var r;if(e){var i=t("RegExp.prototype.exec");var o={};var a=function(){throw o};var c={toString:a,valueOf:a};if(typeof Symbol.toPrimitive==="symbol"){c[Symbol.toPrimitive]=a}r=function t(e){if(!e||typeof e!=="object"){return false}var r=s(e,"lastIndex");var a=r&&n(r,"value");if(!a){return false}try{i(e,c)}catch(t){return t===o}}}else{var u=t("Object.prototype.toString");var l="[object RegExp]";r=function t(e){if(!e||typeof e!=="object"&&typeof e!=="function"){return false}return u(e)===l}}G9=r;return G9}var Y9;var H9;function Z9(){if(H9)return Y9;H9=1;var t=j9();var e=U9();var n=t("RegExp.prototype.exec");var s=h8();Y9=function t(r){if(!e(r)){throw new s("`regex` must be a RegExp")}return function t(e){return n(r,e)!==null}};return Y9}var Q9;var X9;function q9(){if(X9)return Q9;X9=1;var t=j9();var e=Z9();var n=e(/^\s*(?:function)?\*/);var s=U6()();var r=T9();var i=t("Object.prototype.toString");var o=t("Function.prototype.toString");var a=function(){if(!s){return false}try{return Function("return function*() {}")()}catch(t){}};var c;Q9=function t(e){if(typeof e!=="function"){return false}if(n(o(e))){return true}if(!s){var u=i(e);return u==="[object GeneratorFunction]"}if(!r){return false}if(typeof c==="undefined"){var l=a();c=l?r(l):false}return r(e)===c};return Q9}var J9;var K9;function t7(){if(K9)return J9;K9=1;var t=Function.prototype.toString;var e=typeof Reflect==="object"&&Reflect!==null&&Reflect.apply;var n;var s;if(typeof e==="function"&&typeof Object.defineProperty==="function"){try{n=Object.defineProperty({},"length",{get:function(){throw s}});s={};e((function(){throw 42}),null,n)}catch(t){if(t!==s){e=null}}}else{e=null}var r=/^\s*class\b/;var i=function e(n){try{var s=t.call(n);return r.test(s)}catch(t){return false}};var o=function e(n){try{if(i(n)){return false}t.call(n);return true}catch(t){return false}};var a=Object.prototype.toString;var c="[object Object]";var u="[object Function]";var l="[object GeneratorFunction]";var f="[object HTMLAllCollection]";var h="[object HTML document.all class]";var d="[object HTMLCollection]";var p=typeof Symbol==="function"&&!!Symbol.toStringTag;var m=!(0 in[,]);var b=function t(){return false};if(typeof document==="object"){var y=document.all;if(a.call(y)===a.call(document.all)){b=function t(e){if((m||!e)&&(typeof e==="undefined"||typeof e==="object")){try{var n=a.call(e);return(n===f||n===h||n===d||n===c)&&e("")==null}catch(t){}}return false}}}J9=e?function t(r){if(b(r)){return true}if(!r){return false}if(typeof r!=="function"&&typeof r!=="object"){return false}try{e(r,null,n)}catch(t){if(t!==s){return false}}return!i(r)&&o(r)}:function t(e){if(b(e)){return true}if(!e){return false}if(typeof e!=="function"&&typeof e!=="object"){return false}if(p){return o(e)}if(i(e)){return false}var n=a.call(e);if(n!==u&&n!==l&&!/^\[object HTML/.test(n)){return false}return o(e)};return J9}var e7;var n7;function s7(){if(n7)return e7;n7=1;var t=t7();var e=Object.prototype.toString;var n=Object.prototype.hasOwnProperty;var s=function t(e,s,r){for(var i=0,o=e.length;i<o;i++){if(n.call(e,i)){if(r==null){s(e[i],i,e)}else{s.call(r,e[i],i,e)}}}};var r=function t(e,n,s){for(var r=0,i=e.length;r<i;r++){if(s==null){n(e.charAt(r),r,e)}else{n.call(s,e.charAt(r),r,e)}}};var i=function t(e,s,r){for(var i in e){if(n.call(e,i)){if(r==null){s(e[i],i,e)}else{s.call(r,e[i],i,e)}}}};function o(t){return e.call(t)==="[object Array]"}e7=function e(n,a,c){if(!t(a)){throw new TypeError("iterator must be a function")}var u;if(arguments.length>=3){u=c}if(o(n)){s(n,a,u)}else if(typeof n==="string"){r(n,a,u)}else{i(n,a,u)}};return e7}var r7;var i7;function o7(){if(i7)return r7;i7=1;r7=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"];return r7}var a7;var c7;function u7(){if(c7)return a7;c7=1;var t=o7();var e=typeof globalThis==="undefined"?h:globalThis;a7=function n(){var s=[];for(var r=0;r<t.length;r++){if(typeof e[t[r]]==="function"){s[s.length]=t[r]}}return s};return a7}var l7={exports:{}};var f7;var h7;function d7(){if(h7)return f7;h7=1;var t=Z8();var e=u8();var n=h8();var s=U8();f7=function r(i,o,a){if(!i||typeof i!=="object"&&typeof i!=="function"){throw new n("`obj` must be an object or a function`")}if(typeof o!=="string"&&typeof o!=="symbol"){throw new n("`property` must be a string or a symbol`")}if(arguments.length>3&&typeof arguments[3]!=="boolean"&&arguments[3]!==null){throw new n("`nonEnumerable`, if provided, must be a boolean or null")}if(arguments.length>4&&typeof arguments[4]!=="boolean"&&arguments[4]!==null){throw new n("`nonWritable`, if provided, must be a boolean or null")}if(arguments.length>5&&typeof arguments[5]!=="boolean"&&arguments[5]!==null){throw new n("`nonConfigurable`, if provided, must be a boolean or null")}if(arguments.length>6&&typeof arguments[6]!=="boolean"){throw new n("`loose`, if provided, must be a boolean")}var c=arguments.length>3?arguments[3]:null;var u=arguments.length>4?arguments[4]:null;var l=arguments.length>5?arguments[5]:null;var f=arguments.length>6?arguments[6]:false;var h=!!s&&s(i,o);if(t){t(i,o,{configurable:l===null&&h?h.configurable:!l,enumerable:c===null&&h?h.enumerable:!c,value:a,writable:u===null&&h?h.writable:!u})}else if(f||!c&&!u&&!l){i[o]=a}else{throw new e("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}};return f7}var p7;var m7;function b7(){if(m7)return p7;m7=1;var t=Z8();var e=function e(){return!!t};e.hasArrayLengthDefineBug=function e(){if(!t){return null}try{return t([],"length",{value:1}).length!==1}catch(t){return true}};p7=e;return p7}var y7;var g7;function w7(){if(g7)return y7;g7=1;var t=_9();var e=d7();var n=b7()();var s=U8();var r=h8();var i=t("%Math.floor%");y7=function t(o,a){if(typeof o!=="function"){throw new r("`fn` is not a function")}if(typeof a!=="number"||a<0||a>4294967295||i(a)!==a){throw new r("`length` must be a positive 32-bit integer")}var c=arguments.length>2&&!!arguments[2];var u=true;var l=true;if("length"in o&&s){var f=s(o,"length");if(f&&!f.configurable){u=false}if(f&&!f.writable){l=false}}if(u||l||!c){if(n){e(o,"length",a,true,true)}else{e(o,"length",a)}}return o};return y7}var v7;var x7;function N7(){if(x7)return v7;x7=1;var t=u9();var e=m9();var n=x9();v7=function s(){return n(t,e,arguments)};return v7}var k7;function C7(){if(k7)return l7.exports;k7=1;(function(t){var e=w7();var n=Z8();var s=C9();var r=N7();t.exports=function t(n){var r=s(arguments);var i=n.length-(arguments.length-1);return e(r,1+(i>0?i:0),true)};if(n){n(t.exports,"apply",{value:r})}else{t.exports.apply=r}})(l7);return l7.exports}var $7;var S7;function I7(){if(S7)return $7;S7=1;var t=s7();var e=u7();var n=C7();var s=j9();var r=U8();var i=T9();var o=s("Object.prototype.toString");var a=U6()();var c=typeof globalThis==="undefined"?h:globalThis;var u=e();var l=s("String.prototype.slice");var f=s("Array.prototype.indexOf",true)||function t(e,n){for(var s=0;s<e.length;s+=1){if(e[s]===n){return s}}return-1};var d={__proto__:null};if(a&&r&&i){t(u,(function(t){var e=new c[t];if(Symbol.toStringTag in e&&i){var s=i(e);var o=r(s,Symbol.toStringTag);if(!o&&s){var a=i(s);o=r(a,Symbol.toStringTag)}d["$"+t]=n(o.get)}}))}else{t(u,(function(t){var e=new c[t];var s=e.slice||e.set;if(s){d["$"+t]=n(s)}}))}var p=function e(n){var s=false;t(d,(function(t,e){if(!s){try{if("$"+t(n)===e){s=l(e,1)}}catch(t){}}}));return s};var m=function e(n){var s=false;t(d,(function(t,e){if(!s){try{t(n);s=l(e,1)}catch(t){}}}));return s};$7=function t(e){if(!e||typeof e!=="object"){return false}if(!a){var n=l(o(e),8,-1);if(f(u,n)>-1){return n}if(n!=="Object"){return false}return m(e)}if(!r){return null}return p(e)};return $7}var M7;var E7;function T7(){if(E7)return M7;E7=1;var t=I7();M7=function e(n){return!!t(n)};return M7}var A7;function D7(){if(A7)return j6;A7=1;(function(t){var e=W9();var n=q9();var s=I7();var r=T7();function i(t){return t.call.bind(t)}var o=typeof BigInt!=="undefined";var a=typeof Symbol!=="undefined";var c=i(Object.prototype.toString);var u=i(Number.prototype.valueOf);var l=i(String.prototype.valueOf);var f=i(Boolean.prototype.valueOf);if(o){var h=i(BigInt.prototype.valueOf)}if(a){var d=i(Symbol.prototype.valueOf)}function p(t,e){if(typeof t!=="object"){return false}try{e(t);return true}catch(t){return false}}t.isArgumentsObject=e;t.isGeneratorFunction=n;t.isTypedArray=r;function m(t){return typeof Promise!=="undefined"&&t instanceof Promise||t!==null&&typeof t==="object"&&typeof t.then==="function"&&typeof t.catch==="function"}t.isPromise=m;function b(t){if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){return ArrayBuffer.isView(t)}return r(t)||j(t)}t.isArrayBufferView=b;function y(t){return s(t)==="Uint8Array"}t.isUint8Array=y;function g(t){return s(t)==="Uint8ClampedArray"}t.isUint8ClampedArray=g;function w(t){return s(t)==="Uint16Array"}t.isUint16Array=w;function v(t){return s(t)==="Uint32Array"}t.isUint32Array=v;function x(t){return s(t)==="Int8Array"}t.isInt8Array=x;function N(t){return s(t)==="Int16Array"}t.isInt16Array=N;function k(t){return s(t)==="Int32Array"}t.isInt32Array=k;function C(t){return s(t)==="Float32Array"}t.isFloat32Array=C;function $(t){return s(t)==="Float64Array"}t.isFloat64Array=$;function S(t){return s(t)==="BigInt64Array"}t.isBigInt64Array=S;function I(t){return s(t)==="BigUint64Array"}t.isBigUint64Array=I;function M(t){return c(t)==="[object Map]"}M.working=typeof Map!=="undefined"&&M(new Map);function E(t){if(typeof Map==="undefined"){return false}return M.working?M(t):t instanceof Map}t.isMap=E;function T(t){return c(t)==="[object Set]"}T.working=typeof Set!=="undefined"&&T(new Set);function A(t){if(typeof Set==="undefined"){return false}return T.working?T(t):t instanceof Set}t.isSet=A;function D(t){return c(t)==="[object WeakMap]"}D.working=typeof WeakMap!=="undefined"&&D(new WeakMap);function R(t){if(typeof WeakMap==="undefined"){return false}return D.working?D(t):t instanceof WeakMap}t.isWeakMap=R;function O(t){return c(t)==="[object WeakSet]"}O.working=typeof WeakSet!=="undefined"&&O(new WeakSet);function L(t){return O(t)}t.isWeakSet=L;function _(t){return c(t)==="[object ArrayBuffer]"}_.working=typeof ArrayBuffer!=="undefined"&&_(new ArrayBuffer);function F(t){if(typeof ArrayBuffer==="undefined"){return false}return _.working?_(t):t instanceof ArrayBuffer}t.isArrayBuffer=F;function z(t){return c(t)==="[object DataView]"}z.working=typeof ArrayBuffer!=="undefined"&&typeof DataView!=="undefined"&&z(new DataView(new ArrayBuffer(1),0,1));function j(t){if(typeof DataView==="undefined"){return false}return z.working?z(t):t instanceof DataView}t.isDataView=j;var P=typeof SharedArrayBuffer!=="undefined"?SharedArrayBuffer:undefined;function B(t){return c(t)==="[object SharedArrayBuffer]"}function W(t){if(typeof P==="undefined"){return false}if(typeof B.working==="undefined"){B.working=B(new P)}return B.working?B(t):t instanceof P}t.isSharedArrayBuffer=W;function G(t){return c(t)==="[object AsyncFunction]"}t.isAsyncFunction=G;function V(t){return c(t)==="[object Map Iterator]"}t.isMapIterator=V;function U(t){return c(t)==="[object Set Iterator]"}t.isSetIterator=U;function Y(t){return c(t)==="[object Generator]"}t.isGeneratorObject=Y;function H(t){return c(t)==="[object WebAssembly.Module]"}t.isWebAssemblyCompiledModule=H;function Z(t){return p(t,u)}t.isNumberObject=Z;function Q(t){return p(t,l)}t.isStringObject=Q;function X(t){return p(t,f)}t.isBooleanObject=X;function q(t){return o&&p(t,h)}t.isBigIntObject=q;function J(t){return a&&p(t,d)}t.isSymbolObject=J;function K(t){return Z(t)||Q(t)||X(t)||q(t)||J(t)}t.isBoxedPrimitive=K;function tt(t){return typeof Uint8Array!=="undefined"&&(F(t)||W(t))}t.isAnyArrayBuffer=tt;["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(e){Object.defineProperty(t,e,{enumerable:false,value:function(){throw new Error(e+" is not supported in userland")}})}))})(j6);return j6}var R7;var O7;function L7(){if(O7)return R7;O7=1;R7=function t(e){return e instanceof Go};return R7}var _7={exports:{}};var F7={exports:{}};var z7;function j7(){if(z7)return F7.exports;z7=1;if(typeof Object.create==="function"){F7.exports=function t(e,n){if(n){e.super_=n;e.prototype=Object.create(n.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}}}else{F7.exports=function t(e,n){if(n){e.super_=n;var s=function(){};s.prototype=n.prototype;e.prototype=new s;e.prototype.constructor=e}}}return F7.exports}var P7;function B7(){if(P7)return _7.exports;P7=1;try{var t=G7();if(typeof t.inherits!=="function")throw"";_7.exports=t.inherits}catch(t){_7.exports=j7()}return _7.exports}var W7;function G7(){if(W7)return z6;W7=1;(function(t){var e=Object.getOwnPropertyDescriptors||function t(e){var n=Object.keys(e);var s={};for(var r=0;r<n.length;r++){s[n[r]]=Object.getOwnPropertyDescriptor(e,n[r])}return s};var n=/%[sdj%]/g;t.format=function(t){if(!N(t)){var e=[];for(var s=0;s<arguments.length;s++){e.push(o(arguments[s]))}return e.join(" ")}var s=1;var r=arguments;var i=r.length;var a=String(t).replace(n,(function(t){if(t==="%%")return"%";if(s>=i)return t;switch(t){case"%s":return String(r[s++]);case"%d":return Number(r[s++]);case"%j":try{return JSON.stringify(r[s++])}catch(t){return"[Circular]"}default:return t}}));for(var c=r[s];s<i;c=r[++s]){if(g(c)||!S(c)){a+=" "+c}else{a+=" "+o(c)}}return a};t.deprecate=function(e,n){if(typeof v!=="undefined"&&v.noDeprecation===true){return e}if(typeof v==="undefined"){return function(){return t.deprecate(e,n).apply(this,arguments)}}var s=false;function r(){if(!s){if(v.throwDeprecation){throw new Error(n)}else if(v.traceDeprecation){console.trace(n)}else{console.error(n)}s=true}return e.apply(this,arguments)}return r};var s={};var r=/^$/;if(v.env.NODE_DEBUG){var i=v.env.NODE_DEBUG;i=i.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase();r=new RegExp("^"+i+"$","i")}t.debuglog=function(e){e=e.toUpperCase();if(!s[e]){if(r.test(e)){var n=v.pid;s[e]=function(){var s=t.format.apply(t,arguments);console.error("%s %d: %s",e,n,s)}}else{s[e]=function(){}}}return s[e]};function o(e,n){var s={seen:[],stylize:c};if(arguments.length>=3)s.depth=arguments[2];if(arguments.length>=4)s.colors=arguments[3];if(y(n)){s.showHidden=n}else if(n){t._extend(s,n)}if(C(s.showHidden))s.showHidden=false;if(C(s.depth))s.depth=2;if(C(s.colors))s.colors=false;if(C(s.customInspect))s.customInspect=true;if(s.colors)s.stylize=a;return l(s,e,s.depth)}t.inspect=o;o.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};o.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function a(t,e){var n=o.styles[e];if(n){return"["+o.colors[n][0]+"m"+t+"["+o.colors[n][1]+"m"}else{return t}}function c(t,e){return t}function u(t){var e={};t.forEach((function(t,n){e[t]=true}));return e}function l(e,n,s){if(e.customInspect&&n&&E(n.inspect)&&n.inspect!==t.inspect&&!(n.constructor&&n.constructor.prototype===n)){var r=n.inspect(s,e);if(!N(r)){r=l(e,r,s)}return r}var i=f(e,n);if(i){return i}var o=Object.keys(n);var a=u(o);if(e.showHidden){o=Object.getOwnPropertyNames(n)}if(M(n)&&(o.indexOf("message")>=0||o.indexOf("description")>=0)){return h(n)}if(o.length===0){if(E(n)){var c=n.name?": "+n.name:"";return e.stylize("[Function"+c+"]","special")}if($(n)){return e.stylize(RegExp.prototype.toString.call(n),"regexp")}if(I(n)){return e.stylize(Date.prototype.toString.call(n),"date")}if(M(n)){return h(n)}}var y="",g=false,w=["{","}"];if(b(n)){g=true;w=["[","]"]}if(E(n)){var v=n.name?": "+n.name:"";y=" [Function"+v+"]"}if($(n)){y=" "+RegExp.prototype.toString.call(n)}if(I(n)){y=" "+Date.prototype.toUTCString.call(n)}if(M(n)){y=" "+h(n)}if(o.length===0&&(!g||n.length==0)){return w[0]+y+w[1]}if(s<0){if($(n)){return e.stylize(RegExp.prototype.toString.call(n),"regexp")}else{return e.stylize("[Object]","special")}}e.seen.push(n);var x;if(g){x=d(e,n,s,a,o)}else{x=o.map((function(t){return p(e,n,s,a,t,g)}))}e.seen.pop();return m(x,y,w)}function f(t,e){if(C(e))return t.stylize("undefined","undefined");if(N(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}if(x(e))return t.stylize(""+e,"number");if(y(e))return t.stylize(""+e,"boolean");if(g(e))return t.stylize("null","null")}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function d(t,e,n,s,r){var i=[];for(var o=0,a=e.length;o<a;++o){if(L(e,String(o))){i.push(p(t,e,n,s,String(o),true))}else{i.push("")}}r.forEach((function(r){if(!r.match(/^\d+$/)){i.push(p(t,e,n,s,r,true))}}));return i}function p(t,e,n,s,r,i){var o,a,c;c=Object.getOwnPropertyDescriptor(e,r)||{value:e[r]};if(c.get){if(c.set){a=t.stylize("[Getter/Setter]","special")}else{a=t.stylize("[Getter]","special")}}else{if(c.set){a=t.stylize("[Setter]","special")}}if(!L(s,r)){o="["+r+"]"}if(!a){if(t.seen.indexOf(c.value)<0){if(g(n)){a=l(t,c.value,null)}else{a=l(t,c.value,n-1)}if(a.indexOf("\n")>-1){if(i){a=a.split("\n").map((function(t){return" "+t})).join("\n").slice(2)}else{a="\n"+a.split("\n").map((function(t){return" "+t})).join("\n")}}}else{a=t.stylize("[Circular]","special")}}if(C(o)){if(i&&r.match(/^\d+$/)){return a}o=JSON.stringify(""+r);if(o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)){o=o.slice(1,-1);o=t.stylize(o,"name")}else{o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'");o=t.stylize(o,"string")}}return o+": "+a}function m(t,e,n){var s=t.reduce((function(t,e){if(e.indexOf("\n")>=0);return t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(s>60){return n[0]+(e===""?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1]}return n[0]+e+" "+t.join(", ")+" "+n[1]}t.types=D7();function b(t){return Array.isArray(t)}t.isArray=b;function y(t){return typeof t==="boolean"}t.isBoolean=y;function g(t){return t===null}t.isNull=g;function w(t){return t==null}t.isNullOrUndefined=w;function x(t){return typeof t==="number"}t.isNumber=x;function N(t){return typeof t==="string"}t.isString=N;function k(t){return typeof t==="symbol"}t.isSymbol=k;function C(t){return t===void 0}t.isUndefined=C;function $(t){return S(t)&&A(t)==="[object RegExp]"}t.isRegExp=$;t.types.isRegExp=$;function S(t){return typeof t==="object"&&t!==null}t.isObject=S;function I(t){return S(t)&&A(t)==="[object Date]"}t.isDate=I;t.types.isDate=I;function M(t){return S(t)&&(A(t)==="[object Error]"||t instanceof Error)}t.isError=M;t.types.isNativeError=M;function E(t){return typeof t==="function"}t.isFunction=E;function T(t){return t===null||typeof t==="boolean"||typeof t==="number"||typeof t==="string"||typeof t==="symbol"||typeof t==="undefined"}t.isPrimitive=T;t.isBuffer=L7();function A(t){return Object.prototype.toString.call(t)}function D(t){return t<10?"0"+t.toString(10):t.toString(10)}var R=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function O(){var t=new Date;var e=[D(t.getHours()),D(t.getMinutes()),D(t.getSeconds())].join(":");return[t.getDate(),R[t.getMonth()],e].join(" ")}t.log=function(){console.log("%s - %s",O(),t.format.apply(t,arguments))};t.inherits=B7();t._extend=function(t,e){if(!e||!S(e))return t;var n=Object.keys(e);var s=n.length;while(s--){t[n[s]]=e[n[s]]}return t};function L(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var _=typeof Symbol!=="undefined"?Symbol("util.promisify.custom"):undefined;t.promisify=function t(n){if(typeof n!=="function")throw new TypeError('The "original" argument must be of type Function');if(_&&n[_]){var s=n[_];if(typeof s!=="function"){throw new TypeError('The "util.promisify.custom" argument must be of type Function')}Object.defineProperty(s,_,{value:s,enumerable:false,writable:false,configurable:true});return s}function s(){var t,e;var s=new Promise((function(n,s){t=n;e=s}));var r=[];for(var i=0;i<arguments.length;i++){r.push(arguments[i])}r.push((function(n,s){if(n){e(n)}else{t(s)}}));try{n.apply(this,r)}catch(t){e(t)}return s}Object.setPrototypeOf(s,Object.getPrototypeOf(n));if(_)Object.defineProperty(s,_,{value:s,enumerable:false,writable:false,configurable:true});return Object.defineProperties(s,e(n))};t.promisify.custom=_;function F(t,e){if(!t){var n=new Error("Promise was rejected with a falsy value");n.reason=t;t=n}return e(t)}function z(t){if(typeof t!=="function"){throw new TypeError('The "original" argument must be of type Function')}function n(){var e=[];for(var n=0;n<arguments.length;n++){e.push(arguments[n])}var s=e.pop();if(typeof s!=="function"){throw new TypeError("The last argument must be of type Function")}var r=this;var i=function(){return s.apply(r,arguments)};t.apply(this,e).then((function(t){v.nextTick(i.bind(null,null,t))}),(function(t){v.nextTick(F.bind(null,t,i))}))}Object.setPrototypeOf(n,Object.getPrototypeOf(t));Object.defineProperties(n,e(t));return n}t.callbackify=z})(z6);return z6}var V7;function U7(){}U7.prototype=Object.create(null);function Y7(){Y7.init.call(this)}Y7.EventEmitter=Y7;Y7.usingDomains=false;Y7.prototype.domain=undefined;Y7.prototype._events=undefined;Y7.prototype._maxListeners=undefined;Y7.defaultMaxListeners=10;Y7.init=function(){this.domain=null;if(Y7.usingDomains){if(V7.active&&!(this instanceof V7.Domain)){this.domain=V7.active}}if(!this._events||this._events===Object.getPrototypeOf(this)._events){this._events=new U7;this._eventsCount=0}this._maxListeners=this._maxListeners||undefined};Y7.prototype.setMaxListeners=function t(e){if(typeof e!=="number"||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');this._maxListeners=e;return this};function H7(t){if(t._maxListeners===undefined)return Y7.defaultMaxListeners;return t._maxListeners}Y7.prototype.getMaxListeners=function t(){return H7(this)};function Z7(t,e,n){if(e)t.call(n);else{var s=t.length;var r=rtt(t,s);for(var i=0;i<s;++i)r[i].call(n)}}function Q7(t,e,n,s){if(e)t.call(n,s);else{var r=t.length;var i=rtt(t,r);for(var o=0;o<r;++o)i[o].call(n,s)}}function X7(t,e,n,s,r){if(e)t.call(n,s,r);else{var i=t.length;var o=rtt(t,i);for(var a=0;a<i;++a)o[a].call(n,s,r)}}function q7(t,e,n,s,r,i){if(e)t.call(n,s,r,i);else{var o=t.length;var a=rtt(t,o);for(var c=0;c<o;++c)a[c].call(n,s,r,i)}}function J7(t,e,n,s){if(e)t.apply(n,s);else{var r=t.length;var i=rtt(t,r);for(var o=0;o<r;++o)i[o].apply(n,s)}}Y7.prototype.emit=function t(e){var n,s,r,i,o,a,c;var u=e==="error";a=this._events;if(a)u=u&&a.error==null;else if(!u)return false;c=this.domain;if(u){n=arguments[1];if(c){if(!n)n=new Error('Uncaught, unspecified "error" event');n.domainEmitter=this;n.domain=c;n.domainThrown=false;c.emit("error",n)}else if(n instanceof Error){throw n}else{var l=new Error('Uncaught, unspecified "error" event. ('+n+")");l.context=n;throw l}return false}s=a[e];if(!s)return false;var f=typeof s==="function";r=arguments.length;switch(r){case 1:Z7(s,f,this);break;case 2:Q7(s,f,this,arguments[1]);break;case 3:X7(s,f,this,arguments[1],arguments[2]);break;case 4:q7(s,f,this,arguments[1],arguments[2],arguments[3]);break;default:i=new Array(r-1);for(o=1;o<r;o++)i[o-1]=arguments[o];J7(s,f,this,i)}return true};function K7(t,e,n,s){var r;var i;var o;if(typeof n!=="function")throw new TypeError('"listener" argument must be a function');i=t._events;if(!i){i=t._events=new U7;t._eventsCount=0}else{if(i.newListener){t.emit("newListener",e,n.listener?n.listener:n);i=t._events}o=i[e]}if(!o){o=i[e]=n;++t._eventsCount}else{if(typeof o==="function"){o=i[e]=s?[n,o]:[o,n]}else{if(s){o.unshift(n)}else{o.push(n)}}if(!o.warned){r=H7(t);if(r&&r>0&&o.length>r){o.warned=true;var a=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+e+" listeners added. "+"Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning";a.emitter=t;a.type=e;a.count=o.length;ttt(a)}}}return t}function ttt(t){typeof console.warn==="function"?console.warn(t):console.log(t)}Y7.prototype.addListener=function t(e,n){return K7(this,e,n,false)};Y7.prototype.on=Y7.prototype.addListener;Y7.prototype.prependListener=function t(e,n){return K7(this,e,n,true)};function ett(t,e,n){var s=false;function r(){t.removeListener(e,r);if(!s){s=true;n.apply(t,arguments)}}r.listener=n;return r}Y7.prototype.once=function t(e,n){if(typeof n!=="function")throw new TypeError('"listener" argument must be a function');this.on(e,ett(this,e,n));return this};Y7.prototype.prependOnceListener=function t(e,n){if(typeof n!=="function")throw new TypeError('"listener" argument must be a function');this.prependListener(e,ett(this,e,n));return this};Y7.prototype.removeListener=function t(e,n){var s,r,i,o,a;if(typeof n!=="function")throw new TypeError('"listener" argument must be a function');r=this._events;if(!r)return this;s=r[e];if(!s)return this;if(s===n||s.listener&&s.listener===n){if(--this._eventsCount===0)this._events=new U7;else{delete r[e];if(r.removeListener)this.emit("removeListener",e,s.listener||n)}}else if(typeof s!=="function"){i=-1;for(o=s.length;o-- >0;){if(s[o]===n||s[o].listener&&s[o].listener===n){a=s[o].listener;i=o;break}}if(i<0)return this;if(s.length===1){s[0]=undefined;if(--this._eventsCount===0){this._events=new U7;return this}else{delete r[e]}}else{stt(s,i)}if(r.removeListener)this.emit("removeListener",e,a||n)}return this};Y7.prototype.removeAllListeners=function t(e){var n,s;s=this._events;if(!s)return this;if(!s.removeListener){if(arguments.length===0){this._events=new U7;this._eventsCount=0}else if(s[e]){if(--this._eventsCount===0)this._events=new U7;else delete s[e]}return this}if(arguments.length===0){var r=Object.keys(s);for(var i=0,o;i<r.length;++i){o=r[i];if(o==="removeListener")continue;this.removeAllListeners(o)}this.removeAllListeners("removeListener");this._events=new U7;this._eventsCount=0;return this}n=s[e];if(typeof n==="function"){this.removeListener(e,n)}else if(n){do{this.removeListener(e,n[n.length-1])}while(n[0])}return this};Y7.prototype.listeners=function t(e){var n;var s;var r=this._events;if(!r)s=[];else{n=r[e];if(!n)s=[];else if(typeof n==="function")s=[n.listener||n];else s=itt(n)}return s};Y7.listenerCount=function(t,e){if(typeof t.listenerCount==="function"){return t.listenerCount(e)}else{return ntt.call(t,e)}};Y7.prototype.listenerCount=ntt;function ntt(t){var e=this._events;if(e){var n=e[t];if(typeof n==="function"){return 1}else if(n){return n.length}}return 0}Y7.prototype.eventNames=function t(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};function stt(t,e){for(var n=e,s=n+1,r=t.length;s<r;n+=1,s+=1)t[n]=t[s];t.pop()}function rtt(t,e){var n=new Array(e);while(e--)n[e]=t[e];return n}function itt(t){var e=new Array(t.length);for(var n=0;n<e.length;++n){e[n]=t[n].listener||t[n]}return e}var ott=G7();function att(){this.head=null;this.tail=null;this.length=0}att.prototype.push=function(t){var e={data:t,next:null};if(this.length>0)this.tail.next=e;else this.head=e;this.tail=e;++this.length};att.prototype.unshift=function(t){var e={data:t,next:this.head};if(this.length===0)this.tail=e;this.head=e;++this.length};att.prototype.shift=function(){if(this.length===0)return;var t=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;--this.length;return t};att.prototype.clear=function(){this.head=this.tail=null;this.length=0};att.prototype.join=function(t){if(this.length===0)return"";var e=this.head;var n=""+e.data;while(e=e.next){n+=t+e.data}return n};att.prototype.concat=function(t){if(this.length===0)return Go.alloc(0);if(this.length===1)return this.head.data;var e=Go.allocUnsafe(t>>>0);var n=this.head;var s=0;while(n){n.data.copy(e,s);s+=n.data.length;n=n.next}return e};var ctt={};var utt={exports:{}};var ltt=f(Pa);
|
|
18189
|
+
*/var K4=X4.exports;var t5;function e5(){if(t5)return X4.exports;t5=1;(function(t,e){!function(t,n){n(e,q4,J4)}(K4,(function(t,e,n){const s={1:{name:"/m/01g317",id:1,displayName:"person"},2:{name:"/m/0199g",id:2,displayName:"bicycle"},3:{name:"/m/0k4j",id:3,displayName:"car"},4:{name:"/m/04_sv",id:4,displayName:"motorcycle"},5:{name:"/m/05czz6l",id:5,displayName:"airplane"},6:{name:"/m/01bjv",id:6,displayName:"bus"},7:{name:"/m/07jdr",id:7,displayName:"train"},8:{name:"/m/07r04",id:8,displayName:"truck"},9:{name:"/m/019jd",id:9,displayName:"boat"},10:{name:"/m/015qff",id:10,displayName:"traffic light"},11:{name:"/m/01pns0",id:11,displayName:"fire hydrant"},13:{name:"/m/02pv19",id:13,displayName:"stop sign"},14:{name:"/m/015qbp",id:14,displayName:"parking meter"},15:{name:"/m/0cvnqh",id:15,displayName:"bench"},16:{name:"/m/015p6",id:16,displayName:"bird"},17:{name:"/m/01yrx",id:17,displayName:"cat"},18:{name:"/m/0bt9lr",id:18,displayName:"dog"},19:{name:"/m/03k3r",id:19,displayName:"horse"},20:{name:"/m/07bgp",id:20,displayName:"sheep"},21:{name:"/m/01xq0k1",id:21,displayName:"cow"},22:{name:"/m/0bwd_0j",id:22,displayName:"elephant"},23:{name:"/m/01dws",id:23,displayName:"bear"},24:{name:"/m/0898b",id:24,displayName:"zebra"},25:{name:"/m/03bk1",id:25,displayName:"giraffe"},27:{name:"/m/01940j",id:27,displayName:"backpack"},28:{name:"/m/0hnnb",id:28,displayName:"umbrella"},31:{name:"/m/080hkjn",id:31,displayName:"handbag"},32:{name:"/m/01rkbr",id:32,displayName:"tie"},33:{name:"/m/01s55n",id:33,displayName:"suitcase"},34:{name:"/m/02wmf",id:34,displayName:"frisbee"},35:{name:"/m/071p9",id:35,displayName:"skis"},36:{name:"/m/06__v",id:36,displayName:"snowboard"},37:{name:"/m/018xm",id:37,displayName:"sports ball"},38:{name:"/m/02zt3",id:38,displayName:"kite"},39:{name:"/m/03g8mr",id:39,displayName:"baseball bat"},40:{name:"/m/03grzl",id:40,displayName:"baseball glove"},41:{name:"/m/06_fw",id:41,displayName:"skateboard"},42:{name:"/m/019w40",id:42,displayName:"surfboard"},43:{name:"/m/0dv9c",id:43,displayName:"tennis racket"},44:{name:"/m/04dr76w",id:44,displayName:"bottle"},46:{name:"/m/09tvcd",id:46,displayName:"wine glass"},47:{name:"/m/08gqpm",id:47,displayName:"cup"},48:{name:"/m/0dt3t",id:48,displayName:"fork"},49:{name:"/m/04ctx",id:49,displayName:"knife"},50:{name:"/m/0cmx8",id:50,displayName:"spoon"},51:{name:"/m/04kkgm",id:51,displayName:"bowl"},52:{name:"/m/09qck",id:52,displayName:"banana"},53:{name:"/m/014j1m",id:53,displayName:"apple"},54:{name:"/m/0l515",id:54,displayName:"sandwich"},55:{name:"/m/0cyhj_",id:55,displayName:"orange"},56:{name:"/m/0hkxq",id:56,displayName:"broccoli"},57:{name:"/m/0fj52s",id:57,displayName:"carrot"},58:{name:"/m/01b9xk",id:58,displayName:"hot dog"},59:{name:"/m/0663v",id:59,displayName:"pizza"},60:{name:"/m/0jy4k",id:60,displayName:"donut"},61:{name:"/m/0fszt",id:61,displayName:"cake"},62:{name:"/m/01mzpv",id:62,displayName:"chair"},63:{name:"/m/02crq1",id:63,displayName:"couch"},64:{name:"/m/03fp41",id:64,displayName:"potted plant"},65:{name:"/m/03ssj5",id:65,displayName:"bed"},67:{name:"/m/04bcr3",id:67,displayName:"dining table"},70:{name:"/m/09g1w",id:70,displayName:"toilet"},72:{name:"/m/07c52",id:72,displayName:"tv"},73:{name:"/m/01c648",id:73,displayName:"laptop"},74:{name:"/m/020lf",id:74,displayName:"mouse"},75:{name:"/m/0qjjc",id:75,displayName:"remote"},76:{name:"/m/01m2v",id:76,displayName:"keyboard"},77:{name:"/m/050k8",id:77,displayName:"cell phone"},78:{name:"/m/0fx9l",id:78,displayName:"microwave"},79:{name:"/m/029bxz",id:79,displayName:"oven"},80:{name:"/m/01k6s3",id:80,displayName:"toaster"},81:{name:"/m/0130jx",id:81,displayName:"sink"},82:{name:"/m/040b_t",id:82,displayName:"refrigerator"},84:{name:"/m/0bt_c3",id:84,displayName:"book"},85:{name:"/m/01x3z",id:85,displayName:"clock"},86:{name:"/m/02s195",id:86,displayName:"vase"},87:{name:"/m/01lsmm",id:87,displayName:"scissors"},88:{name:"/m/0kmg4",id:88,displayName:"teddy bear"},89:{name:"/m/03wvsk",id:89,displayName:"hair drier"},90:{name:"/m/012xff",id:90,displayName:"toothbrush"}};class r{constructor(t,e){this.modelPath=e||`https://storage.googleapis.com/tfjs-models/savedmodel/${this.getPrefix(t)}/model.json`}getPrefix(t){return"lite_mobilenet_v2"===t?`ssd${t}`:`ssd_${t}`}async load(){this.model=await e.loadGraphModel(this.modelPath);const t=n.zeros([1,300,300,3],"int32"),s=await this.model.executeAsync(t);await Promise.all(s.map((t=>t.data()))),s.map((t=>t.dispose())),t.dispose()}async infer(t,e,s){const r=n.tidy((()=>(t instanceof n.Tensor||(t=n.browser.fromPixels(t)),n.expandDims(t)))),i=r.shape[1],o=r.shape[2],a=await this.model.executeAsync(r),c=a[0].dataSync(),u=a[1].dataSync();r.dispose(),n.dispose(a);const[l,f]=this.calculateMaxScores(c,a[0].shape[1],a[0].shape[2]),h=n.getBackend();"webgl"===n.getBackend()&&n.setBackend("cpu");const d=n.tidy((()=>{const t=n.tensor2d(u,[a[1].shape[1],a[1].shape[3]]);return n.image.nonMaxSuppression(t,l,e,s,s)})),p=d.dataSync();return d.dispose(),h!==n.getBackend()&&n.setBackend(h),this.buildDetectedObjects(o,i,u,l,p,f)}buildDetectedObjects(t,e,n,r,i,o){const a=i.length,c=[];for(let u=0;u<a;u++){const a=[];for(let t=0;t<4;t++)a[t]=n[4*i[u]+t];const l=a[0]*e,f=a[1]*t,h=a[2]*e,d=a[3]*t;a[0]=f,a[1]=l,a[2]=d-f,a[3]=h-l,c.push({bbox:a,class:s[o[i[u]]+1].displayName,score:r[i[u]]})}return c}calculateMaxScores(t,e,n){const s=[],r=[];for(let i=0;i<e;i++){let e=Number.MIN_VALUE,o=-1;for(let s=0;s<n;s++)t[i*n+s]>e&&(e=t[i*n+s],o=s);s[i]=e,r[i]=o}return[s,r]}async detect(t,e=20,n=.5){return this.infer(t,e,n)}dispose(){null!=this.model&&this.model.dispose()}}t.ObjectDetection=r,t.load=async function(t={}){if(null==n)throw new Error("Cannot find TensorFlow.js. If you are using a <script> tag, please also include @tensorflow/tfjs on the page before using this model.");const e=t.base||"lite_mobilenet_v2",s=t.modelUrl;if(-1===["mobilenet_v1","mobilenet_v2","lite_mobilenet_v2"].indexOf(e))throw new Error(`ObjectDetection constructed with invalid base model ${e}. Valid names are 'mobilenet_v1', 'mobilenet_v2' and 'lite_mobilenet_v2'.`);const i=new r(e,s);return await i.load(),i},t.version="2.2.3",Object.defineProperty(t,"__esModule",{value:true})}))})(X4,X4.exports);return X4.exports}var n5=e5();const s5=".camera{color:white;display:flex;align-items:center;justify-content:center;position:relative}.cameraCanvas,.cameraCanvasSelfie,.cameraCanvasSelfieDesk{z-index:3;max-width:100%;max-height:100%;border-radius:10px}.cameraCanvasSelfie,.cameraCanvasSelfieDesk{transform:scale(-1, 1);-webkit-transform:scale(-1, 1)}.cameraVideo,.cameraVideoSelfie,.cameraVideoSelfieDesk{z-index:2;max-width:100%;max-height:100%;border-radius:10px}.cameraVideoSelfie,.cameraVideoSelfieDesk{transform:scale(-1, 1);-webkit-transform:scale(-1, 1)}.id-guide-rectangle{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:70%;padding-bottom:calc(70% / 1.58);border:3px dashed rgba(255, 255, 255, 0.7);border-radius:8px;z-index:5;pointer-events:none;box-sizing:border-box}.countdown-overlay-style{position:absolute;inset:0;background-color:rgba(0, 0, 0, 0.5);display:flex;align-items:center;justify-content:center;z-index:6}.video-overlay-canvas{position:absolute;top:0;left:0;width:100%;height:100%;z-index:7;pointer-events:none}.capture-flash-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:white;opacity:0;animation:capture-flash 0.2s ease-out;pointer-events:none;z-index:10}@keyframes bounce{0%,100%{transform:translateY(-25%);animation-timing-function:cubic-bezier(0.8, 0, 1, 1)}50%{transform:none;animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}}.animate-bounce{animation:bounce 1s infinite}@keyframes capture-flash{0%{opacity:0}50%{opacity:1}100%{opacity:0}}.countdown-text-style{color:white;font-size:8rem;font-weight:bold;animation:bounce 1s infinite;}";var r5;(function(t){t["JPEG"]="image/jpeg";t["PNG"]="image/png"})(r5||(r5={}));const i5=class{constructor(n){t(this,n);this.eventPhotoCapture=e(this,"photoIdCapture");this.eventRecordingIdReady=e(this,"recordingIdCapture");this.eventTimeElapsed=e(this,"timeElapsed");this.mediaRecorder=null;this.mediaStream=null;this.animationFrameId=null;this.processingsCount=0;this.objectDetectionModel=null;this.canvasContext=null;this.processingContext=null;this.overlayContext=null;this.recordedChunks=[];this.countdown=0;this.isCapturing=false;this.mode="idle";this.tfjsReady=false;this.detectedArea=null;this.startRecording=()=>{if(this.mediaStream&&this.videoElement){this.recordedChunks=[];var t={mimeType:m.webmMimeType.mime,videoBitsPerSecond:13e5};if(!MediaRecorder.isTypeSupported(t.mimeType)){if(o.device.mobileOS==g.iOS||o.device.browser==x.Safari)t.mimeType=m.mp4MimeType.mime}this.mediaRecorder=new MediaRecorder(this.mediaStream,{mimeType:"video/webm"});this.mediaRecorder.ondataavailable=({data:t})=>{if(t.size>0){this.recordedChunks=[...this.recordedChunks,t]}};this.mediaRecorder.onstop=()=>{if(this.recordedChunks.length>0){var e=new Blob(this.recordedChunks,{type:t.mimeType.split(";")[0]});this.eventRecordingIdReady.emit(e);this.mode="done"}};this.mediaRecorder.start();console.log("Recording started...")}};this.stopRecording=()=>{if(this.mediaRecorder&&this.mediaRecorder.state==="recording"){this.mediaRecorder.stop();console.log("Recording stopped.")}};this.capture=()=>{if(this.videoElement&&this.canvasElement){const t=this.videoElement;const e=this.canvasElement;const n=this.canvasContext;e.width=t.videoWidth;e.height=t.videoHeight;n.drawImage(t,0,0,e.width,e.height);e.toBlob((t=>{if(t&&t.type===r5.JPEG&&!o.device.isAppleDevice){try{if(o.debug)console.log("stream | getFrame | addExifInImg");N(t,this.mediaStream.getTracks()[0],{width:this.videoElement.videoWidth,height:this.videoElement.videoHeight}).then((t=>{this.eventPhotoCapture.emit(t)}))}catch(t){this.eventTimeElapsed.emit()}}else{if(o.debug)console.log("stream | getFrame | resolve");this.eventPhotoCapture.emit(t)}}),r5.PNG,1);console.log("Image captured!");this.isCapturing=true;setTimeout((()=>{this.isCapturing=false}),200)}else{console.error("Video element or canvas element not found. Cannot capture image.")}};this.startFrameProcessing=()=>{if(this.animationFrameId===null){this.animationFrameId=requestAnimationFrame((()=>this.processVideoFrame()))}};this.handleStartTiltDetection=()=>{console.log("Detecting tilt... Please tilt the ID. (Rectangle will appear on detected object).");this.mode="detecting_tilt_live";this.detectedArea=null;if(this.overlayContext){this.overlayContext.clearRect(0,0,this.overlayCanvasElement.width,this.overlayCanvasElement.height)}this.startFrameProcessing()};this.handleStartDetection=async()=>{if(!this.mediaStream){console.log("Camera not ready. Please allow camera access.");return}console.log("Starting ID detection...");this.mode="detecting_straight_id";this.recordedChunks=[];this.detectedArea=null;this.countdown=0;this.processingsCount=0;if(this.overlayContext){this.overlayContext.clearRect(0,0,this.overlayCanvasElement.width,this.overlayCanvasElement.height)}if(this.videoElement&&this.videoElement.readyState<3){console.log("Waiting for video stream to fully load...");await new Promise((t=>{const e=()=>{this.videoElement.removeEventListener("canplaythrough",e);t()};this.videoElement.addEventListener("canplaythrough",e)}));console.log("Video stream ready. Starting detection.")}this.startRecording();this.startFrameProcessing()}}async componentWillLoad(){this.translations=await b.getValues()}async componentDidLoad(){this.initVariables();if(this.canvasElement){this.canvasContext=this.canvasElement.getContext("2d",{willReadFrequently:true})}if(this.processingCanvasElement){this.processingContext=this.processingCanvasElement.getContext("2d",{willReadFrequently:true})}if(this.overlayCanvasElement){this.overlayContext=this.overlayCanvasElement.getContext("2d",{willReadFrequently:true})}console.log("Loading AI model...");try{await dc("webgl");this.objectDetectionModel=await n5.load();this.tfjsReady=true;console.log('AI model loaded. Camera ready. Click "Start ID Detection" to begin.');await this.getMedia();this.mode="idle"}catch(t){console.warn("WebGL backend failed to initialize, falling back to CPU:",t);try{await dc("cpu");console.log("TensorFlow.js backend set to CPU.");this.objectDetectionModel=await n5.load();this.tfjsReady=true;console.log('AI model loaded (using CPU). Camera ready. Click "Start ID Detection" to begin.');await this.getMedia();this.mode="idle"}catch(t){console.error("Error loading TensorFlow.js model even with CPU backend:",t);console.log("Error: Could not load AI model. Please refresh. (Check console for details).");this.tfjsReady=false;this.mode="idle"}}this.handleStartDetection()}initVariables(){if(o.debug)console.log("id-capture | initVariables");if(o.flowStatus==a.IDFRONT){this.titleMesage=this.translations.IdCaptureValues.Title}else if(o.flowStatus==a.IDBACK){this.titleMesage=this.translations.IdCaptureValues.TitleBack}else if(o.flowStatus==a.IDTILT){this.titleMesage=this.translations.IdCaptureValues.IDPoseMapping}}disconnectedCallback(){if(this.mediaStream){this.mediaStream.getTracks().forEach((t=>t.stop()))}if(this.animationFrameId!==null){cancelAnimationFrame(this.animationFrameId);this.animationFrameId=null}if(this.overlayContext){this.overlayContext.clearRect(0,0,this.overlayCanvasElement.width,this.overlayCanvasElement.height)}this.detectedArea=null}async getMedia(){try{if(!o.cameraId){await m.InitCameras(o.device)}const t=m.GetConstraints(o.cameraId,o.device);const e=await navigator.mediaDevices.getUserMedia(t);if(this.videoElement){this.videoElement.srcObject=e;this.videoElement.play()}this.mediaStream=e;this.mode="idle"}catch(t){console.error("Error accessing camera:",t);this.mode="idle"}}async detectIdWithTensorFlow(t,e=.6){if(!this.objectDetectionModel)return null;try{const n=await this.objectDetectionModel.detect(t);const s=["book","cell phone","remote","keyboard","laptop"];let r=null;let i=0;for(const t of n){const[n,o]=t.bbox;const a=n*o;if(s.includes(t.class)&&t.score>e&&a>5e3){if(a>i){i=a;r=t}}}return r}catch(t){console.error("TensorFlow.js detection error:",t);return null}}async processVideoFrame(){if(this.videoElement&&this.processingCanvasElement&&this.overlayCanvasElement&&this.tfjsReady&&(this.mode==="detecting_straight_id"||this.mode==="detecting_tilt_live")&&this.videoElement.readyState>=2&&this.processingContext&&this.overlayContext&&this.processingsCount<100){this.processingsCount++;const t=this.videoElement;const e=this.processingCanvasElement;const n=this.overlayCanvasElement;const s=this.processingContext;const r=this.overlayContext;r.clearRect(0,0,n.width,n.height);e.width=t.videoWidth;e.height=t.videoHeight;n.width=t.videoWidth;n.height=t.videoHeight;s.drawImage(t,0,0,e.width,e.height);let i=await this.detectIdWithTensorFlow(t);try{if(i){const[e,s,o,a]=i.bbox;const c=o/a;const u=o*a;let l="blue";let f=`Detected: ${i.class} (${(i.score*100).toFixed(1)}%). Area: ${u.toFixed(0)} px²`;this.detectedArea=u;if(this.mode==="detecting_straight_id"){if(c>1.4&&c<1.8&&u>t.videoWidth*t.videoHeight*.1){l="green";console.log("Straight ID detected! Starting countdown...");this.countdown=3;if(this.animationFrameId!==null){cancelAnimationFrame(this.animationFrameId);this.animationFrameId=null}this.mode="countdown_capture";const t=setInterval((()=>{this.countdown--;if(this.countdown<=0){clearInterval(t);this.capture();console.log('ID captured! Click "Start Tilt Detection" to analyze tilt.');this.countdown=0;this.detectedArea=null;r.clearRect(0,0,n.width,n.height);this.mode="awaiting_tilt_start"}}),1e3);this.handleStartTiltDetection();return}else{l="red";console.log("Looking for straight ID... Please align your ID with the guide.")}}else if(this.mode==="detecting_tilt_live"){if(c>1.4&&c<1.8){l="green";console.log(`ID is relatively straight (Aspect Ratio: ${c.toFixed(2)}).`)}else{l="yellow";console.log(`ID appears tilted (Aspect Ratio: ${c.toFixed(2)}).`);this.stopRecording()}console.log("Detecting tilt... Observe the highlighted object.")}r.strokeStyle=l;r.lineWidth=4;r.strokeRect(e,s,o,a);r.fillStyle=l;r.font="24px Arial";r.fillText(`${i.class} (${(i.score*100).toFixed(1)}%)`,e,s>20?s-10:s+25);console.log(f)}else{this.detectedArea=null;if(this.mode==="detecting_straight_id"){console.log("No ID detected. Please ensure ID is visible.")}else if(this.mode==="detecting_tilt_live"){console.log("No object detected for tilt analysis.")}}}catch(t){console.error("TensorFlow.js processing error:",t);console.log("AI processing error. See console for details.");this.mode="idle";this.detectedArea=null;if(this.animationFrameId!==null){cancelAnimationFrame(this.animationFrameId);this.animationFrameId=null}if(this.overlayContext){this.overlayContext.clearRect(0,0,this.overlayCanvasElement.width,this.overlayCanvasElement.height)}}finally{}if(this.mode==="detecting_straight_id"||this.mode==="detecting_tilt_live"){setTimeout((()=>{if(this.mode==="detecting_straight_id"||this.mode==="detecting_tilt_live"){this.animationFrameId=requestAnimationFrame((()=>this.processVideoFrame()))}}),100)}else{if(this.animationFrameId!==null){cancelAnimationFrame(this.animationFrameId);this.animationFrameId=null}}}if(this.processingsCount>=100){console.warn("Maximum processing frames reached. Stopping further processing.");this.mode="idle";this.processingsCount=0;if(this.animationFrameId!==null){cancelAnimationFrame(this.animationFrameId);this.animationFrameId=null}this.eventTimeElapsed.emit()}}render(){let t="cameraVideo";if(o.device.isDesktop){t="cameraVideoSelfieDesk"}return n("div",{key:"77c6b2e76fa8c6ab9d624ecdc953d50800aacfef",class:"container flex center"},n("div",{key:"c2531d6e847efb0ca09ec66289126f2525585e4c",class:"px-2 w-100"},n("h1",{key:"0f36148f2e663ef6e8f86e9fc69aae1beeef280d",class:this.titleStyle,innerHTML:this.titleMesage}),n("div",{key:"03e7fd87deae02c4ff994903cc0d48c1326e3d4d",class:"w-100 h-100 rounded"},n("div",{key:"70551203e13c76aa530f92965936057472b4a58b",class:"camera rounded"},n("video",{key:"1691fb8960c01fc407382e59a4f6d9b57a8511af",id:"video",loop:true,autoplay:true,playsinline:true,muted:true,class:t,ref:t=>this.videoElement=t}),n("canvas",{key:"f618141ba4f9e810e4bcd748f15f3974bdd1a304",id:"output",ref:t=>this.canvasElement=t,style:{display:"none"}}),n("canvas",{key:"9fabd1193a7f81a5051470912c1e451312989347",id:"processingCanvasElement",ref:t=>this.processingCanvasElement=t,style:{display:"none"}}),n("canvas",{key:"1746ba572b92cf670e01d57fe3b399d2b276ea3d",id:"overlayCanvasElement",ref:t=>this.overlayCanvasElement=t,class:"video-overlay-canvas"}),n("div",{key:"4725ed24d82b34887df3d199f096fc1719d72179",class:"id-guide-rectangle"}),this.isCapturing&&n("div",{key:"d2484968e6052fc15aaa357eb06492ec773517de",class:"capture-flash-overlay"}),this.countdown>0&&n("div",{key:"28e7b68182141d8708cf0b59190c8d084d0ae504",class:"countdown-overlay-style"},n("span",{key:"3bdc99173f2530781bb5e25b08240db191bf4a2d",class:"countdown-text-style"},this.countdown)))),n("div",{key:"ca3d45354bfc22d3a8086dc33975bc91f0292787",class:"footer text-center"},n("img",{key:"20e27b8399b2a21e17357a024152c6b86130da92",src:y}))))}get el(){return s(this)}};i5.style=s5;const o5="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1Mi4yOTIiIGhlaWdodD0iNDMuODU4IiB2aWV3Qm94PSIwIDAgNTIuMjkyIDQzLjg1OCI+DQogIDxnIGlkPSJpZC1jYXJkIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTcgLTI5KSI+DQogICAgPHBhdGggaWQ9IlBhdGhfNDc1MSIgZGF0YS1uYW1lPSJQYXRoIDQ3NTEiIGQ9Ik0yMC4zNzQsNjYuOTU0aDIyLjM1YS44NDMuODQzLDAsMCwwLDAtMS42ODdIMjAuMzc0YTEuNjg5LDEuNjg5LDAsMCwxLTEuNjg3LTEuNjg3VjMyLjM3NGExLjY4OSwxLjY4OSwwLDAsMSwxLjY4Ny0xLjY4N0g2NS45MThBMS42ODksMS42ODksMCwwLDEsNjcuNiwzMi4zNzRWNDkuMjQyYS44NDMuODQzLDAsMCwwLDEuNjg3LDBWMzIuMzc0QTMuMzc4LDMuMzc4LDAsMCwwLDY1LjkxOCwyOUgyMC4zNzRBMy4zNzgsMy4zNzgsMCwwLDAsMTcsMzIuMzc0VjYzLjU4QTMuMzc4LDMuMzc4LDAsMCwwLDIwLjM3NCw2Ni45NTRaIiBmaWxsPSIjMjUyYzgyIi8+DQogICAgPHBhdGggaWQ9IlBhdGhfNDc1MiIgZGF0YS1uYW1lPSJQYXRoIDQ3NTIiIGQ9Ik01MC42NTEsNTAuMzI2YTYuMzI2LDYuMzI2LDAsMSwwLTYuMzI2LDYuMzI2QTYuMzMzLDYuMzMzLDAsMCwwLDUwLjY1MSw1MC4zMjZabS0xMC45NjQsMGE0LjYzOSw0LjYzOSwwLDEsMSw0LjYzOSw0LjYzOUE0LjY0NCw0LjY0NCwwLDAsMSwzOS42ODcsNTAuMzI2WiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTEyLjE0NCAtOC42NzQpIiBmaWxsPSIjMjUyYzgyIi8+DQogICAgPHBhdGggaWQ9IlBhdGhfNDc1MyIgZGF0YS1uYW1lPSJQYXRoIDQ3NTMiIGQ9Ik0zMiw4NC43NDd2My4zNzRhLjg0NC44NDQsMCwwLDAsLjg0My44NDNINDguODY4YS44NDQuODQ0LDAsMCwwLC44NDMtLjg0M1Y4NC43NDdBNi43NTUsNi43NTUsMCwwLDAsNDIuOTY0LDc4SDM4Ljc0N0E2Ljc1NSw2Ljc1NSwwLDAsMCwzMiw4NC43NDdabTYuNzQ3LTUuMDZoNC4yMTdhNS4wNjYsNS4wNjYsMCwwLDEsNS4wNiw1LjA2djIuNTNIMzMuNjg3di0yLjUzQTUuMDY2LDUuMDY2LDAsMCwxLDM4Ljc0Nyw3OS42ODdaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtOC42NzQgLTI4LjMzNikiIGZpbGw9IiMyNTJjODIiLz4NCiAgICA8cGF0aCBpZD0iUGF0aF80NzU0IiBkYXRhLW5hbWU9IlBhdGggNDc1NCIgZD0iTTEwMi43MTIsNDhIODUuODQzYS44NDMuODQzLDAsMCwwLDAsMS42ODdoMTYuODY4YS44NDMuODQzLDAsMCwwLDAtMS42ODdaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMzkuMzI0IC0xMC45ODgpIiBmaWxsPSIjMjUyYzgyIi8+DQogICAgPHBhdGggaWQ9IlBhdGhfNDc1NSIgZGF0YS1uYW1lPSJQYXRoIDQ3NTUiIGQ9Ik0xMDIuNzEyLDYySDg1Ljg0M2EuODQzLjg0MywwLDEsMCwwLDEuNjg3aDE2Ljg2OGEuODQzLjg0MywwLDAsMCwwLTEuNjg3WiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTM5LjMyNCAtMTkuMDg0KSIgZmlsbD0iIzI1MmM4MiIvPg0KICAgIDxwYXRoIGlkPSJQYXRoXzQ3NTYiIGRhdGEtbmFtZT0iUGF0aCA0NzU2IiBkPSJNOTUuMjI5LDc1YTEyLjIzLDEyLjIzLDAsMSwwLDEyLjIzLDEyLjIzQTEyLjI0NCwxMi4yNDQsMCwwLDAsOTUuMjI5LDc1Wm0wLDIyLjk3N0ExMC43NDcsMTAuNzQ3LDAsMSwxLDEwNS45NzcsODcuMjMsMTAuNzU5LDEwLjc1OSwwLDAsMSw5NS4yMjksOTcuOTc3WiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTM4LjE2NyAtMjYuNjAyKSIgZmlsbD0iIzI1MmM4MiIvPg0KICAgIDxwYXRoIGlkPSJQYXRoXzQ3NTciIGRhdGEtbmFtZT0iUGF0aCA0NzU3IiBkPSJNMTExLjA1OSw5OC43MTdsLTcuNDQ0LDcuNDQzLTQuODUtNC44NDlhLjc0MS43NDEsMCwwLDAtMS4wNDgsMS4wNDhsNS4zNzQsNS4zNzRhLjc0MS43NDEsMCwwLDAsMS4wNDgsMGw3Ljk2OC03Ljk2OGEuNzQxLjc0MSwwLDAsMC0xLjA0OC0xLjA0OFoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC00Ny4yOTQgLTQxLjM5MykiIGZpbGw9IiM3YmI0MGYiLz4NCiAgPC9nPg0KPC9zdmc+DQo=";const a5="";const c5=class{constructor(n){t(this,n);this.apiErrorEvent=e(this,"apiError")}async componentWillRender(){this.translations=await b.getValues()}componentWillLoad(){this.yesButtonPressed=false;this.noButtonPressed=false}async hasBackSelected(){this.yesButtonPressed=true;try{await i.instance.SetTwoSidedId()}catch(t){this.apiErrorEvent.emit(t)}}async onlyFrontSelected(){this.noButtonPressed=true;try{o.flowStatus=await i.instance.GetNextFlowState()}catch(t){this.apiErrorEvent.emit(t)}}render(){return n("div",{key:"32363483a5c9e0ce24f4a1ec38c1ebd586056ac8",class:"container flex center"},n("div",{key:"810f3a7151e7919b2376ff0048c22e40f93e54e2",class:"px-3"},n("div",{key:"850f88924e80e8be2a9c0b2a1877f8b4cf6c175a",class:"mb-1 ml-1 text-center"},n("img",{key:"9d5b28f36250ff31703f65c97deabff71ee171a5",src:o5,style:{width:"70px"}})),n("h1",{key:"78ef4252524228b48a6f66d2af8052cd41114a38",class:"text-center mb-1"},this.translations.IdSelectionValues.Title),n("div",{key:"7da764c9413fa799eb4a9bf48e6a4c9677d8115a",class:"color-blue mb-2 loud-text",innerHTML:this.translations.IdSelectionValues.Description}),!this.noButtonPressed?n("div",{class:"button flex mb-1"},this.yesButtonPressed?n("div",{class:"img-loader rounded img-loader-button"},n("img",{class:"loading-image loading-image-button",src:z})):null,n("button",{class:"main-button",type:"button",disabled:this.yesButtonPressed,onClick:()=>this.hasBackSelected()},this.translations.IdSelectionValues.ButtonYes)):null,n("div",{key:"08ce9802ea046375c547b048bfce2b95ab6ccca0"}),!this.yesButtonPressed?n("div",{class:"button flex mb-1"},this.noButtonPressed?n("div",{class:"img-loader rounded img-loader-button"},n("img",{class:"loading-image loading-image-button",src:z})):null,n("button",{class:"main-button",type:"button",disabled:this.noButtonPressed,onClick:()=>this.onlyFrontSelected()},this.translations.IdSelectionValues.ButtonNo)):null,n("div",{key:"9a384b0a0f7eb858bdcaea1c761d7151b21df473",class:"footer text-center"},n("img",{key:"f1132d1e237bcc496bb3874be2f5fb9e854b7548",src:y}))))}};c5.style=a5;const u5="4.7.60";var l5={version:u5};class f5{constructor(){var t,e,n,s;this.motionValues=[];this.orientationValues=[];this.addItemsToOrientation=t=>{this.orientationValues.push({beta:t.beta,gamma:t.gamma});if(this.orientationValues.length>5){window.removeEventListener("deviceorientation",this.addItemsToOrientation)}};this.addItemsToMotion=t=>{this.motionValues.push({x:t.acceleration.x,y:t.acceleration.y});if(this.motionValues.length>5){window.removeEventListener("devicemotion",this.addItemsToMotion)}};this.supportedScreenOrientation=(e=(t=((screen===null||screen===void 0?void 0:screen.orientation)||{}).type)!==null&&t!==void 0?t:screen.mozOrientation)!==null&&e!==void 0?e:screen.msOrientation;this.safariScreenOrientation=!(screen===null||screen===void 0?void 0:screen.orientation)&&matchMedia("(orientation: portrait)").matches?"portrait-primary":"landscape-primary";this.initialScreenOrientation=(s=(n=this.supportedScreenOrientation)!==null&&n!==void 0?n:this.safariScreenOrientation)!==null&&s!==void 0?s:"portrait-primary";this.userAgent=navigator.userAgent||navigator.vendor||window.opera||undefined;this.isMobile=this.isMobileDevice();this.isTablet=this.isTabletDevice();this.isDesktop=!this.isMobile&&!this.isTablet}isMobileDevice(){const t=[/(Android)(.+)(Mobile)/i,/BlackBerry/i,/iPhone|iPod/i,/Opera Mini/i,/IEMobile/i];return t.some((t=>this.userAgent.match(t)))}isTabletDevice(){const t=/(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/;return t.test(this.userAgent.toLowerCase())}getMobileOS(){if(this.isMobileDevice()){if(/windows phone/i.test(this.userAgent))return g.WindowsPhone;else if(/android/i.test(this.userAgent))return g.Android;else if(/iPad|iPhone|iPod/.test(this.userAgent)&&!window.MSStream)return g.iOS;return g.Unknown}else return undefined}getDesktopOS(){if(this.isDesktop){if(this.userAgent.indexOf("Win")!==-1)return k.Windows;else if(this.userAgent.indexOf("Mac")!==-1)return k.MacOS;else if(this.userAgent.indexOf("X11")!==-1)return k.Unix;else if(this.userAgent.indexOf("Linux")!==-1)return k.Linux;return k.Unknown}else return undefined}getDeviceOS(){var t;return(t=this.getMobileOS())!==null&&t!==void 0?t:this.getDesktopOS()}getBrowser(){if(/XiaoMi/i.test(this.userAgent)||/MiuiBrowser/i.test(this.userAgent))return x.Mi;var t=/chrome/i.test(this.userAgent);if(t)return x.Chrome;if(/firefox/i.test(navigator.userAgent))return x.Firefox;else if(!t&&/safari/i.test(navigator.userAgent))return x.Safari;else return x.Unknown}async checkIfMobileBySensors(){var t,e;if(typeof((t=window.DeviceMotionEvent)===null||t===void 0?void 0:t.requestPermission)==="function"){var n=window.DeviceMotionEvent.requestPermission();if(n==="granted"){await this.getMotionValues()}}else{await this.getMotionValues()}await I(200);var s=false;if(this.motionValues.length>0){s=this.motionValues.filter((t=>t.x!=0)).length>=3}if(typeof((e=window.DeviceOrientationEvent)===null||e===void 0?void 0:e.requestPermission)==="function"){var n=window.DeviceOrientationEvent.requestPermission();if(n==="granted"){await this.getOrientationValues()}}else{await this.getOrientationValues()}await I(500);var r=false;if(this.orientationValues.length>0){r=this.orientationValues.map((t=>t.beta)).every(((t,e,n)=>e==0?t!==n[n.length-1]:t!==n[e-1]))||this.orientationValues.map((t=>t.gamma)).every(((t,e,n)=>e==0?t!==n[n.length-1]:t!==n[e-1]))}return s||r}async getOrientationValues(){window.addEventListener("deviceorientation",this.addItemsToOrientation)}async getMotionValues(){window.addEventListener("devicemotion",this.addItemsToMotion)}async getDevice(){var t=await this.checkIfMobileBySensors();var e={isMobileBySensors:t,isDesktop:this.isDesktop,desktopOS:this.getDesktopOS(),isWindowsDesktop:this.getDeviceOS()===k.Windows,isLinuxOrUnixDesktop:this.getDeviceOS()===k.Linux||this.getDeviceOS()===k.Unix,isMobile:this.isMobile,mobileOS:this.getMobileOS(),isAndroidDevice:this.getDeviceOS()===g.Android,isAppleDevice:this.getDeviceOS()===g.iOS||this.getDeviceOS()===k.MacOS,isUnknownMobileDevice:this.getDeviceOS()===g.Unknown,browser:this.getBrowser(),isTablet:this.isTablet,initialScreenOrientation:this.initialScreenOrientation};return e}}const h5="@font-face{font-family:'Roboto';font-style:normal;font-display:swap;font-weight:100;src:url(./files/roboto-latin-ext-100-normal.woff2) format('woff2'), url(./files/roboto-latin-ext-100-normal.woff) format('woff')}@font-face{font-family:'Roboto';font-style:normal;font-display:swap;font-weight:200;src:url(./files/roboto-latin-ext-200-normal.woff2) format('woff2'), url(./files/roboto-latin-ext-200-normal.woff) format('woff')}@font-face{font-family:'Roboto';font-style:normal;font-display:swap;font-weight:300;src:url(./files/roboto-latin-ext-300-normal.woff2) format('woff2'), url(./files/roboto-latin-ext-300-normal.woff) format('woff')}@font-face{font-family:'Roboto';font-style:normal;font-display:swap;font-weight:400;src:url(./files/roboto-latin-ext-400-normal.woff2) format('woff2'), url(./files/roboto-latin-ext-400-normal.woff) format('woff')}@font-face{font-family:'Roboto';font-style:normal;font-display:swap;font-weight:500;src:url(./files/roboto-latin-ext-500-normal.woff2) format('woff2'), url(./files/roboto-latin-ext-500-normal.woff) format('woff')}@font-face{font-family:'Roboto';font-style:normal;font-display:swap;font-weight:600;src:url(./files/roboto-latin-ext-600-normal.woff2) format('woff2'), url(./files/roboto-latin-ext-600-normal.woff) format('woff')}@font-face{font-family:'Roboto';font-style:normal;font-display:swap;font-weight:700;src:url(./files/roboto-latin-ext-700-normal.woff2) format('woff2'), url(./files/roboto-latin-ext-700-normal.woff) format('woff')}@font-face{font-family:'Roboto';font-style:normal;font-display:swap;font-weight:800;src:url(./files/roboto-latin-ext-800-normal.woff2) format('woff2'), url(./files/roboto-latin-ext-800-normal.woff) format('woff')}@font-face{font-family:'Roboto';font-style:normal;font-display:swap;font-weight:900;src:url(./files/roboto-latin-ext-900-normal.woff2) format('woff2'), url(./files/roboto-latin-ext-900-normal.woff) format('woff')}*{font-family:'Roboto', sans-serif}[hidden]{visibility:hidden !important;opacity:0 !important}.full{width:100%;height:100%;left:0;top:0}.container{width:100%;height:100%;background-color:white;max-width:991px;margin:auto;position:relative;overflow:hidden}.flex{display:flex}.relative{position:relative}.d-block{display:block}.center{align-items:center;justify-content:center}.footer{position:relative;width:100%;margin-top:5vh}.w-100{width:100%}.h-100{height:100%}.px-1{padding-left:1em;padding-right:1em}.px-2{padding-left:2em;padding-right:2em}.px-3{padding-left:3em;padding-right:3em}.px-4{padding-left:4em;padding-right:4em}.py-1{padding-top:1em;padding-bottom:1em}.py-2{padding-top:2em;padding-bottom:2em}.py-3{padding-top:3em;padding-bottom:3em}.py-4{padding-top:4em;padding-bottom:4em}.mx-1{margin-left:1em;margin-right:1em}.mx-2{margin-left:2em;margin-right:2em}.mx-3{margin-left:3em;margin-right:3em}.mx-4{margin-left:4em;margin-right:4em}.my-1{margin-top:1em;margin-bottom:1em}.my-2{margin-top:2em;margin-bottom:2em}.my-3{margin-top:3em;margin-bottom:3em}.my-4{margin-top:4em;margin-bottom:4em}.ml-1{margin-left:1em}.ml-2{margin-left:2em}.ml-3{margin-left:3em}.ml-4{margin-left:4em}.mb-05{margin-bottom:0.5em}.mb-1{margin-bottom:1em}.mb-2{margin-bottom:2em}.mb-3{margin-bottom:3em}.mb-4{margin-bottom:4em}.mt-05{margin-top:0.5em}.mt-1{margin-top:1em}.mt-2{margin-top:2em}.mt-3{margin-top:3em}.mt-4{margin-top:4em}h1{color:#252c82;font-size:1.5em;margin:0}h2{font-weight:500;font-size:1.2em;margin:0;color:#525252}h3{font-size:1.4em;margin:0}.main-text{font-weight:400;color:#525252}.link-text{text-decoration:underline;color:#252c82d9}.rounded{border-radius:8px}.cit-selector{width:50%}.img-text{display:flex;align-items:center}.img-text .bg-img{width:4em;height:5em;display:flex;align-items:center;justify-content:center;flex:none;margin-right:1em}.button{position:relative}.img-loader{position:absolute;left:-2px;top:-2px;background:#ffffffc7;border:2px solid #252c82;box-shadow:3px 3px 6px #00000029}.img-loader.rounded{border-radius:11px}.img-loader-button{width:100%;height:100%}.img-loader-button.rounded{border-radius:50px}.loading-image-button{width:100%;height:100%;border-radius:25px}.main-button{background:#7bb40e;border-radius:50px;text-align:center;width:100%;padding:0.9em;color:#fff;border:0;font-size:1.1em;font-weight:600}.main-button:disabled{color:#fff;background:#bdbdbd}.color-red{color:#ff5353}.color-blue{color:#252c82}.loud-text{font-size:1.2em}.loud-text p{margin:0.6em 0}.modal{position:fixed;left:0;top:0;width:100%;height:100%;z-index:999;background:#8b8b8be0;visibility:visible;opacity:1;transition:visibility 0s, opacity 0.2s linear}.inner{background:white;box-shadow:3px 3px 6px #00000029;border-radius:10px;padding:2em;position:relative}.close-modal{position:absolute;top:1em;right:1em}.document-view{height:100%}.scroll{height:100%;overflow-x:hidden;overflow-y:auto;scroll-behavior:smooth;position:relative}.scroll:before{content:'';display:block;width:100%;height:15px;position:sticky;top:0;left:0;background:linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%)}.scroll:after{content:'';display:block;width:100%;height:15px;position:sticky;bottom:0;left:0;background:linear-gradient(0deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%)}.main-input{width:calc(100% - 3.2em - 2px);padding:0.8em 1.6em;border:2px solid #464e58;font-size:1.2em;border-radius:10px}.checklist ul{margin:0;padding-left:20px;text-align:left;list-style-image:url('assets/checkmark.svg')}.checklist li{margin-bottom:1em}.checklist li:last-child{margin-bottom:0}.row-validare h1{font-size:28px;line-height:32px}body{margin:0;padding:0;height:100vh;position:relative;height:100vh;}.container-video{height:99vh;text-align:center;position:relative;overflow:hidden}.row{padding:3.5vh 2.5vh;height:100%;overflow:hidden;position:relative;}.ctheight-100{height:99vh}.d-flex{display:flex}.space-between{justify-content:space-between}.img-info img{width:0.8vh;z-index:5;position:relative}.img-info{width:7vh;height:7vh;border-radius:100%;display:flex;align-items:center;justify-content:center;background:radial-gradient(100% 100% at 50% 0%, #d3b6e9 0%, #fbc2bd 100%)}.i-effect{animation:2.5s infinite transition-i;position:absolute;z-index:2;border-radius:100%;background:radial-gradient(100% 100% at 50% 0%, #d3b6e9 0%, #fbc2bd 100%)}.two-buttons{margin-top:3vh;justify-content:center}.align-center{align-items:center}.font-size-2{font-size:2vh}.row-validare .font-size-2{font-size:17px;line-height:19px}.img-text .bg-img img{width:100%;padding:2vh}.cit-selector-desktop{width:200px;height:140px}.img-selector{width:100%}.img-text .cit-selector,.img-text .cit-selector-desktop{border-radius:5%}.img-text h3{color:#333333;font-weight:700;font-size:2.3vh;margin:0}.font-weight-bold{font-weight:bold}.font-size-18{font-size:1.8vh}.row-validare .font-size-18{font-size:15px;line-height:16px}a{font-size:inherit;color:inherit;text-decoration:none}.color-black{color:#000}.normal-button{background:#1feaa6;box-shadow:0 6px 8px rgba(71, 182, 162, 0.2);border-radius:25px;text-align:center;padding:2vh;margin-right:1vw;margin-left:1vw;color:#fff;border:0;font-size:2vh}.red-button{background:#ff535d}.row-validare .main-button{font-size:17px}.text-right{text-align:right}.mb-0{margin-bottom:0}.row-validare.row{padding:29px 21px}.row-validare .main-button{padding:16px}.row-validare .btn-buletin{position:relative;width:100%;bottom:0}.show-bottom{bottom:-2vh}.second-input{width:46px;height:46px;font-weight:700;font-size:16px;font-family:'Inter', sans-serif;text-align:center;border:2px solid #c5c6cc;border-radius:12px;outline:none;padding:2px}.second-input:not(:placeholder-shown){border:2px solid #1feaa6;color:#1feaa6}.mt-9{margin-top:9%}.second-input::placeholder{color:#fff;opacity:0}.second-input:focus{border:2px solid #464e58;color:#464e58}.second-input.error{border:2px solid #b67171}.second-input.error:focus{border:3px solid #b67171;color:#b67171;padding:1px}.second-input.error:not(:placeholder-shown){border:3px solid #b67171;color:#b67171;padding:2px}.second-input-container{margin-top:30%;display:flex;flex-wrap:wrap;justify-content:space-between}.input-container{display:flex;flex-wrap:wrap}.mt-15{margin-top:15%}.row-validare .mt-15{margin-top:40px}.mb-15{margin-bottom:15%}.row-validare .mb-15{margin-bottom:40px}.mb-20{margin-bottom:20%}.row-validare .mb-1{margin-bottom:20px}.row-validare .mb-20{margin-bottom:60px}.mt-90{margin-top:90px}.op-05{opacity:0.5}.error-text{position:relative;top:50px;margin-bottom:0;margin-top:0}.top-50{top:50px}.mt-25{margin-top:25%}.text-center{text-align:center}.scale-2{transform:scale(2)}.mt-20{margin-top:20%}.div-ci img{max-height:40vh;max-width:80vw}.div-ci{text-align:center}.mt-10{margin-top:10vh}.mt-5{margin-top:5vh}.pos-relative{position:relative}.pos-absolute{position:absolute}.btn-buletin{text-align:center}.buletin-container img{width:60%}.buletin-container>img{margin-top:10vh}.buletin-container{text-align:center}.color-white{color:#fff}.chenar-buletin{margin-top:3em;text-align:center}.chenar-buletin .ci-img{width:96%}.chenar-buletin .face-img,.chenar-buletin .chenar-img{left:4%;width:92%;top:-20px;min-height:55vw;display:flex;position:absolute;align-items:center;background-color:rgba(255, 255, 255, 0.2);justify-content:center}.chenar-buletin img{width:auto;height:100%;top:0;left:0;position:absolute;border-radius:10px;z-index:4}.chenar-buletin .face-img{background-color:rgba(255, 255, 255, 0.3)}.buletin-container .w-40{width:40%}.animation{width:100%;height:100%;}.color-black-2{color:#71727a}.font-size-3{font-size:3vh}.font-size-25{font-size:2.5vh}.font-size-1{font-size:1vh}.font-weight-900{font-weight:900}.mt-8{margin-top:8vh}.mt-12{margin-top:12vh}.mt-30-i{margin-top:30% !important}.ml-5{margin-left:5vh}.chenar-buletin .face-img{left:-2%;width:104%;top:-40px}.pl-2-5{padding-left:2.5vh}.container-coin{background-color:transparent;perspective:1000px;rotate:120deg 0deg}.coin-flip{animation:flip 0.4s ease-in;animation-delay:0.5s;transform-style:preserve-3d;animation-fill-mode:forwards;visibility:hidden}.coin-scale{animation:show 0.4s ease-in;animation-delay:0.5s;transform-style:preserve-3d;animation-fill-mode:forwards}.scroll-disabled{height:100%;overflow-x:hidden;pointer-events:none;user-select:none}.scroll-to-top-btn{position:fixed;z-index:200;bottom:20px;left:20px;width:6vh;height:6vh;border-radius:50%;background-color:#1feaa6;color:white;display:flex;align-items:center;justify-content:center;font-size:5vh;cursor:pointer;box-shadow:0 2px 5px rgba(0, 0, 0, 0.3);transition:background-color 0.3s}.scroll-to-top-btn:hover{background-color:#17d296}.scroll-full{margin:4px, 4px;padding:4px;overflow-x:hidden;overflow-y:auto}.video-demo{z-index:0;width:100%;height:100%;border-radius:20px}.video-capture{padding:2.5vh 2.5vh;margin-top:3em;text-align:center;position:relative}.capture-title{z-index:4;margin-top:3vh;position:absolute;bottom:5vh;padding:2.5vh 2.5vh}video::-webkit-media-controls{display:none !important}@keyframes transition-i{from{width:0;height:0;opacity:1}80%{width:10vh;height:10vh;opacity:0.5}100%{opacity:0}}@keyframes flip{0%{transform:rotateX(140deg);visibility:visible}25%{transform:rotateX(120deg);visibility:visible}50%{transform:rotateX(90deg);visibility:visible}75%{transform:rotateX(75deg);visibility:visible}100%{transform:rotateX(0deg);visibility:visible}}@keyframes show{0%{transform:scale(0)}25%{transform:scale(0.2)}40%{transform:scale(0.4)}50%{transform:scale(0.5)}60%{transform:scale(0.6)}70%{transform:scale(0.7)}100%{transform:scale(1)}}@keyframes rise{0%{visibility:hidden}50%{visibility:visible}100%{visibility:visible}}.buletin-container.rotate-x img{animation:transform-rotate-x 2s infinite ease-in}.rotateimg90{animation:transform-rotate-x2 2s forwards;animation-delay:1s;position:absolute}.rotateimg180{animation:transform-rotate-x3 2s forwards;animation-delay:3s;position:absolute;opacity:0}.buletin-back{display:flex;justify-content:center}.loading-state{display:flex;justify-content:center;align-items:center;position:relative}.loading{width:50px;height:50px;border-radius:50%;border:10px solid #ddd;border-top-color:#71727a;animation:loading 1s linear infinite}.pulsate{animation:textPulse 2s ease 0s infinite normal forwards}@keyframes textPulse{0%{transform:scale(1)}50%{transform:scale(1.1)}100%{transform:scale(1)}}@keyframes loading{to{transform:rotate(360deg)}}@keyframes transform-rotate-x3{from{transform:rotateY(-90deg);opacity:1}to{transform:rotateY(0deg);opacity:1}}@keyframes transform-rotate-x2{to{transform:rotateY(90deg)}}@keyframes transform-rotate-x{to{transform:perspective(600px) rotateX(40deg)}}@media only screen and (max-width: 350px){.second-input{width:36px;height:36px}}@media only screen and (max-width: 390px){.second-input{width:40px;height:40px}.ml-5{margin-left:20vw}}@media only screen and (min-width: 530px) and (max-width: 767px){.chenar-buletin .face-img{width:70%;min-height:auto;margin:auto;left:15%;right:auto;top:-15vh}.ml-5{margin-left:15vw}}@media only screen and (min-width: 600px) and (max-width: 767px){.max-h img{margin-left:15%;margin-right:15%}.max-h{display:flex;align-items:center}.ml-5{margin-left:10vw}}@media only screen and (max-width: 991px){.buletin-container img{max-width:220px}.ml-5{margin-left:2.5vw}}@media only screen and (min-width: 767px){.container{max-width:530px;margin:40px auto;border-radius:20px;box-shadow:1px 1px 10px rgba(0, 0, 0, 0.1);height:calc(100% - 80px)}body{height:90vh}.btn-buletin{max-width:490px;bottom:7vh}.buletin-container img{width:45%}.chenar-buletin .face-img,.chenar-buletin .chenar-img{min-height:300px}.chenar-buletin .face-img{width:80%;min-height:auto;margin:auto;left:10%;right:auto;top:-10vh}.img-selector{width:10vw}}";const d5=class{async onTokenChange(t,e){if(o.debug)console.log("Token change called with value: "+t);if(t==""){t=o.token;return}if(o.token!==t){o.token=t}}agreementAcceptanceEmitted(t){try{i.instance.GenerateAgreement(t.detail.agreementType)}catch(t){this.apiErrorEmitter(t,"Agreement Acceptance")}}async apiErrorEmitter(t,e){var n,s,r,u,l,f;if(t.detail){this.errorTitle=(s=(n=t.detail.message)!==null&&n!==void 0?n:t.detail.status)!==null&&s!==void 0?s:"";this.errorMessage=(u=(r=t.detail.stack)!==null&&r!==void 0?r:t.detail.statusText)!==null&&u!==void 0?u:""}else if(t.message){this.errorTitle=t.message}else if(t.status){this.errorTitle=(l=t.status)!==null&&l!==void 0?l:"";this.errorMessage=(f=t.statusText)!==null&&f!==void 0?f:""}else{this.errorTitle=t}let h={message:this.errorTitle,stack:this.errorMessage,zone:e};try{await i.instance.AddLog(h,await M(this.order_id,this.redirect_id,this.token))}catch(t){}await c.ectdata.delete(o.requestId);p.flowError(this.errorTitle);o.flowStatus=a.ERROREND}constructor(e){t(this,e);this.logInit={};this.initialised=false}async componentWillLoad(){var t,e,n;o.analytics=(t=this.analytics)!==null&&t!==void 0?t:true;this.appInsights=C.getInstance();this.appInsights.trackEvent("IdentificationComponent | init",{requestId:o.requestId});p.init(window);p.flowEvent(r.ComponentLoaded,u.Initialized);o.apiBaseUrl=this.api_url;if(this.env&&this.env!=""){o.environment=this.env}if(o.environment!="PROD"){o.debug=true}i.getInstance();if(o.debug)this.logInit=await M(this.order_id,this.redirect_id,this.token);if(this.token){if(o.debug)console.log("Store Token set with property value: "+this.token);o.token=this.token}if(this.redirect_id){o.redirectId=this.redirect_id}if(this.lang_iso&&this.lang_iso!=""){o.langIso=this.lang_iso}o.showCitizenshipSelector=(e=this.show_citizenship_selector)!==null&&e!==void 0?e:false;o.scrollMode=(n=this.scroll_mode)!==null&&n!==void 0?n:false}async componentDidLoad(){var t,e,n,s,r,a;if(this.order_id&&this.order_id!=""){this.ectData=await c.getOrCreateEctData(this.order_id);o.requestId=this.order_id;o.initialized=this.ectData.initialized;o.modelsPath=this.ectData.modelsPath;if(o.debug)console.log("Current RequestId has value: "+this.order_id)}else if(!this.redirect_id||this.redirect_id==""){var u=await c.getLastEctData(false);if(u){this.ectData=u;o.requestId=this.ectData.orderId;o.initialized=this.ectData.initialized}}if(((t=this.ectData)===null||t===void 0?void 0:t.modelsPath)&&((e=this.ectData)===null||e===void 0?void 0:e.modelsPath)!=""){o.modelsPath=this.ectData.modelsPath}if(this.phone_number&&this.phone_number!=""){o.phoneNumber=this.phone_number;this.ectData.phoneNumber=this.phone_number;await c.ectdata.put(this.ectData)}else if(((n=this.ectData)===null||n===void 0?void 0:n.phoneNumber)&&((s=this.ectData)===null||s===void 0?void 0:s.phoneNumber)!=""){o.phoneNumber=this.ectData.phoneNumber}if(this.citizenship&&this.citizenship!=""){o.citizenship=this.citizenship;this.ectData.citizenship=this.citizenship;await c.ectdata.put(this.ectData)}else if(((r=this.ectData)===null||r===void 0?void 0:r.citizenship)&&((a=this.ectData)===null||a===void 0?void 0:a.citizenship)!=""){o.citizenship=this.ectData.citizenship}await this.initializeRequest();try{if(this.ectData.initialized){o.flowStatus=await i.instance.GetFlowState()}}catch(t){}}async initializeRequest(){if(this.initialised){return}this.initialised=true;if(!o.device){o.device=await(new f5).getDevice()}if(o.device.browser==x.Mi){this.apiErrorEmitter("Mi Browser nu este acceptat. Va rugam utilizati Chrome.","Request Initialisation RequestId:"+o.requestId+" RedirectId:"+o.redirectId);return}try{if(o.debug)await i.instance.AddLog({phase:"debug mode"},this.logInit)}catch(t){}try{if(!o.device.isMobile&&o.redirectId==""&&o.environment=="DEMO"){o.redirectId=E();this.redirect_id=o.redirectId}if(o.token!=""&&(o.requestId!=""||o.redirectId!="")&&!o.initialized){await i.instance.AddIdentificationRequest(o.device,l5.version);await this.treatMobileRedirect();this.ectData.initialized=true;this.ectData.flowStatus=o.flowStatus;this.ectData.modelsPath=o.modelsPath;await c.ectdata.put(this.ectData)}}catch(t){this.apiErrorEmitter(t,"Request Initialisation RequestId:"+o.requestId+" RedirectId:"+o.redirectId)}}async treatMobileRedirect(){if(this.order_id&&this.order_id!=""){return}this.order_id=o.requestId;this.ectData=await c.ectdata.get(o.requestId);if(!this.ectData){await c.ectdata.add({orderId:o.requestId,redirectId:o.redirectId,timestamp:new Date,initialized:true,phoneNumber:o.phoneNumber,refreshStarted:false,flowStatus:o.flowStatus,modelsPath:o.modelsPath,citizenship:o.citizenship,finished:false});this.ectData=await c.ectdata.get(o.requestId)}}disconnectedCallback(){p.flowEvent(r.ComponentLoaded,u.Finalized)}render(){let t=n("div",{key:"f3203e25257630543b3eaf9cfc4149b25ef93d59",class:"container flex center text-center"},n("img",{key:"c6fe9c76d6e120a6c5da737956bcdc2edee27fa5",src:z}));if(o.flowStatus==a.CITIZENSHIP){t=n("citizenship-selection",{key:"9e77e90b824c2f9f0dfc430f8c78aa3c05f94595"})}else if(o.flowStatus==a.LANDING){t=n("landing-validation",{key:"b97ea89c9ebf60641e413e4713f4cb1a56621fa8"})}else if(o.flowStatus==a.MOBILE){t=n("mobile-redirect",{key:"e65b2e1943c46d6231c706f66b5dd74aea27a223"})}else if(o.flowStatus==a.AGREEMENT){t=n("agreement-info",{key:"5521a8e72acf2886f941b7579e4ebd739c977c3b"})}else if(o.flowStatus==a.PHONE){t=n("sms-send",{key:"8f9e86a5c1eb8e53e5eaa8fcefc46f9aa679ebf3"})}else if(o.flowStatus==a.CODE){t=n("sms-code-validation",{key:"21522cd6e114239dded1749feb3faf6bdaa057ab"})}else if(o.flowStatus==a.CODEERROR){t=n("sms-code-validation",{key:"4fb020e67147934651ac3be676982be0a7116474"})}else if(o.flowStatus==a.IDTYPE){t=n("id-selection",{key:"d5827bb28e1d08c3654d426f4ca1feadf63499b0"})}else if(o.flowStatus==a.IDFRONTHOWTO){if(o.debug)console.log("identification-component | render | IDFRONTHOWTO");t=n("how-to-info",{key:"b7e8a8d8a3c12ff3173410cfc02c5fdb1ecb0f16"})}else if(o.flowStatus==a.IDFRONT){if(o.debug)console.log("identification-component | render | IDFRONT");t=n("process-id",{key:"98b2993c6e3c1a9f5b31a9275a1210961d49ac29",id:"processIdFront",mode:"front"})}else if(o.flowStatus==a.IDBACKHOWTO){if(o.debug)console.log("identification-component | render | IDBACKHOWTO");t=n("how-to-info",{key:"c7e1170942611af387b7fb9435a752a8d9b14f74"})}else if(o.flowStatus==a.IDBACK){if(o.debug)console.log("identification-component | render | IDBACK");t=n("process-id",{key:"94969f6a60480bbe6e2159ad3f2fb1055a2f4ffc",id:"processIdBack",mode:"back"})}else if(o.flowStatus==a.IDTILTHOWTO){if(o.debug)console.log("identification-component | render | IDTILTHOWTO");t=n("how-to-info",{key:"4d113c355535cdad7fc8658d900b7e6289a8ea85"})}else if(o.flowStatus==a.IDTILT){if(o.debug)console.log("identification-component | render | TILT");t=n("process-id",{key:"ae5dbd27f705fae9969bfdc57e30442dc22d8850",id:"processIdTilt",mode:"tilt"})}else if(o.flowStatus==a.LIVENESSHOWTO){if(o.debug)console.log("identification-component | render | LIVENESSHOWTO");t=n("how-to-info",{key:"18e81c7168212fa0dfafc08344eb39a151fc7b56"})}else if(o.flowStatus==a.LIVENESS){if(o.debug)console.log("identification-component | render | LIVENESS");t=n("user-liveness",{key:"0f77272e45c6f7c835b8dc720b5633dee2cdc735",id:"userLiveness",mode:"selfie"})}else if(o.flowStatus==a.LIVENESSGESTUREHOWTO){if(o.debug)console.log("identification-component | render | LIVENESSGESTUREHOWTO");t=n("state-transition",{key:"0703f0d9d20f2f550aab5ea41a826a03de2d3424"})}else if(o.flowStatus==a.LIVENESSGESTURE){if(o.debug)console.log("identification-component | render | LIVENESSGESTURE");t=n("user-liveness",{key:"8b0c56bb67ec4e88856432656ce6582681d70de9",id:"userLivenessGesture",mode:"selfieGesture"})}else if(o.flowStatus==a.COMPLETE){if(o.debug)console.log("identification-component | render | COMPLETE");t=n("end-redirect",{key:"6127a025811195d3bfc56570c6a6e76a5e52f11a"})}else if(o.flowStatus==a.ERROREND){t=n("error-end",{key:"7c725e7d1339f11cf78cb317b6031bef83ace90b",errorTitle:this.errorTitle,message:this.errorMessage})}else if(o.flowStatus==a.CAMERAERROR){t=n("camera-error",{key:"472101e25c0ba6bc710b6d6b1e4ac9e92654cd40"})}else if(o.flowStatus==a.RANDOM){if(o.debug)console.log("identification-component | render | RANDOM");t=n("random-action",{key:"95570f8b810c17a19a336f89283b7381a4bc259a"})}return n("div",{key:"f941452ca3ff2a13851a245586ff867d373c1993",class:"full"},t)}static get watchers(){return{token:["onTokenChange"]}}};d5.style=h5;const p5="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0Mi4xMDkiIGhlaWdodD0iNTIuNzg4IiB2aWV3Qm94PSIwIDAgNDIuMTA5IDUyLjc4OCI+DQogIDxnIGlkPSJtb2JpbGVfcGhvbmUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yNSAtMzQyKSI+DQogICAgPHBhdGggaWQ9IlBhdGhfNDc0NiIgZGF0YS1uYW1lPSJQYXRoIDQ3NDYiIGQ9Ik0yOS45MSw1NWEuOTEuOTEsMCwxLDAsMCwxLjgyaDMuNjQxYS45MS45MSwwLDEsMCwwLTEuODJaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg4Ljc0MiAzMzQuMzI3KSIvPg0KICAgIDxwYXRoIGlkPSJQYXRoXzQ3NDgiIGRhdGEtbmFtZT0iUGF0aCA0NzQ4IiBkPSJNMzYuNTEyLDguOTFBLjg2Ljg2LDAsMCwwLDM1LjYsOEgyNy40MWEuODYuODYsMCwwLDAtLjkxLjkxLjg2Ljg2LDAsMCwwLC45MS45MUgzNS42QS44Ni44NiwwLDAsMCwzNi41MTIsOC45MVoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDguOTY3IDMzOC41NTEpIiBmaWxsPSIjMjUyYzgyIi8+DQogICAgPGcgaWQ9Ikdyb3VwXzQ2MDciIGRhdGEtbmFtZT0iR3JvdXAgNDYwNyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjUgMzQyKSI+DQogICAgICA8cGF0aCBpZD0iUGF0aF80NzQ3IiBkYXRhLW5hbWU9IlBhdGggNDc0NyIgZD0iTTQ0LjEyNSw4LjM3YS45MS45MSwwLDEsMCwxLjgyLDBBNS40MzksNS40MzksMCwwLDAsNDAuNTc1LDNIMjAuMzdBNS40MzksNS40MzksMCwwLDAsMTUsOC4zN1Y1MC40MThhNS4zOCw1LjM4LDAsMCwwLDUuMzcsNS4zN0g0MC41NzVhNS4zOCw1LjM4LDAsMCwwLDUuMzctNS4zN1YzNy41ODVhLjkxLjkxLDAsMSwwLTEuODIsMFY1MC40MThhMy41NTQsMy41NTQsMCwwLDEtMy41NSwzLjU1SDIwLjM3YTMuNTU0LDMuNTU0LDAsMCwxLTMuNTUtMy41NVY4LjM3YTMuNjE0LDMuNjE0LDAsMCwxLDMuNTUtMy41NUg0MC41NzVhMy42MTQsMy42MTQsMCwwLDEsMy41NSwzLjU1WiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTE1IC0zKSIgZmlsbD0iIzI1MmM4MiIvPg0KICAgICAgPGcgaWQ9Ikdyb3VwXzQ2MDYiIGRhdGEtbmFtZT0iR3JvdXAgNDYwNiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTguMjAzIDguMTkxKSI+DQogICAgICAgIDxwYXRoIGlkPSJQYXRoXzQ3NTgiIGRhdGEtbmFtZT0iUGF0aCA0NzU4IiBkPSJNOTQuOTUzLDc1YTExLjk1MywxMS45NTMsMCwxLDAsMTEuOTUzLDExLjk1M0ExMS45NjcsMTEuOTY3LDAsMCwwLDk0Ljk1Myw3NVptMCwyMi40NTdhMTAuNSwxMC41LDAsMSwxLDEwLjUtMTAuNUExMC41MTYsMTAuNTE2LDAsMCwxLDk0Ljk1Myw5Ny40NTdaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtODMgLTc1KSIgZmlsbD0iIzI1MmM4MiIvPg0KICAgICAgICA8cGF0aCBpZD0iUGF0aF80NzU5IiBkYXRhLW5hbWU9IlBhdGggNDc1OSIgZD0iTTExMC43NTIsOTguNzEybC03LjI3NSw3LjI3NS00Ljc0LTQuNzM5YS43MjQuNzI0LDAsMCwwLTEuMDI0LDEuMDI0bDUuMjUyLDUuMjUyYS43MjQuNzI0LDAsMCwwLDEuMDI0LDBsNy43ODctNy43ODdhLjcyNC43MjQsMCwwLDAtMS4wMjQtMS4wMjRaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtOTIuMjQ4IC04OS45ODgpIiBmaWxsPSIjN2JiNDBlIi8+DQogICAgICA8L2c+DQogICAgPC9nPg0KICA8L2c+DQo8L3N2Zz4NCg==";const m5="";const b5=class{constructor(n){t(this,n);this.apiErrorEvent=e(this,"apiError")}async componentWillLoad(){p.flowStarted();this.translations=await b.getValues();this.buttonDisabled=false;this.ectData=await c.ectdata.get(o.requestId);await this.initRequest()}async componentDidLoad(){await d.initialize(r.Landing)}async initRequest(){if(o.apiBaseUrl.includes("apimd")){this.warningText=this.translations.LandingValues.WarningMd}else{this.warningText=this.translations.LandingValues.Warning}}async startFlow(){if(!this.buttonDisabled){this.buttonDisabled=true;var t=await m.InitCameras(o.device);if(!t&&o.device.mobileOS==g.iOS){this.ectData.refreshStarted=false;await c.ectdata.put(this.ectData)}try{o.flowStatus=await i.instance.LandingValidationStartFlow(t)}catch(t){this.apiErrorEvent.emit(t)}}}async disconnectedCallback(){await d.finalize(r.Landing)}async leaveFlow(){if(this.buttonDisabled)return;try{let t=await i.instance.AbortRequest();o.flowStatus=a[t.state];await c.ectdata.delete(o.requestId);p.flowAborted()}catch(t){p.flowAborted();this.apiErrorEvent.emit(t)}}render(){return n("div",{key:"2469d5b3bd889ec1cb70315659b76d457036e2ac",class:"container flex center"},n("div",{key:"6a6782f1ade3dfbae1a1e632fc4d3e6fc2f84208",class:"px-4"},n("h1",{key:"f6603f3e2d150a0adf467c8c64566784343ae249",class:"text-center px-1 mb-1"},this.translations.LandingValues.Title),n("div",{key:"d39e20bdf0ee6b9e85576870e145a5b9caf7f919",class:"info-container mb-2"},n("div",{key:"5bf6b84be1155b8bf82939c8562f30dcd6765099",class:"img-text"},n("div",{key:"436d13b55e89c107959f996d45cf4cc445a4d77d",class:"bg-img"},n("img",{key:"814ee0eea63f298bfd63a573973560eefe81ae50",src:o5})),n("h2",{key:"05fb39bd9aef6ed2382c48858fedff22128e6e65"},this.translations.LandingValues.IdInfo)),n("div",{key:"ec129795c17c007b99f3aedb382bcad2b1b0f89f",class:"img-text"},n("div",{key:"38bf98c2d02a34127fbba88607a410de544beb3f",class:"bg-img"},n("img",{key:"7e25803515200900aade36112849e1a1d55a8cdc",src:p5})),n("h2",{key:"9f98da2e9b38da7e3ca9fe25cfdd2335c3f084ab"},this.translations.LandingValues.DeviceInfo))),n("div",{key:"7a239652cefc22987f3b4e6fd65d6145ea79cfc0",class:"button flex mb-1"},this.buttonDisabled?n("div",{class:"img-loader rounded img-loader-button"},n("img",{class:"loading-image loading-image-button",src:z})):null,n("button",{key:"d522ca7e0b9731387434f33abeec18da4b3189cb",class:"main-button",type:"button",disabled:this.buttonDisabled,onClick:()=>this.startFlow()},this.translations.LandingValues.Button)),n("div",{key:"b994a0cb45fb430629682805085bdd9ca458d490",class:"text-center"},n("p",{key:"0b5f92a40e6a8468622a0c5a24460bbc8a4e629b",class:"main-text link-text",onClick:()=>this.leaveFlow()},this.translations.LandingValues.ButtonLeave)),n("div",{key:"968ca3c211fedb03e69cc782fa5a098d42ddd759",class:"footer text-center"},n("img",{key:"176617ac7647844b9ba133cefdcffedf5eff0609",src:y}))))}};b5.style=m5;var y5={};var g5;var w5;function v5(){if(w5)return g5;w5=1;g5=function(){return typeof Promise==="function"&&Promise.prototype&&Promise.prototype.then};return g5}var x5={};var N5={};var k5;function C5(){if(k5)return N5;k5=1;let t;const e=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];N5.getSymbolSize=function t(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17};N5.getSymbolTotalCodewords=function t(n){return e[n]};N5.getBCHDigit=function(t){let e=0;while(t!==0){e++;t>>>=1}return e};N5.setToSJISFunction=function e(n){if(typeof n!=="function"){throw new Error('"toSJISFunc" is not a valid function.')}t=n};N5.isKanjiModeEnabled=function(){return typeof t!=="undefined"};N5.toSJIS=function e(n){return t(n)};return N5}var $5={};var S5;function I5(){if(S5)return $5;S5=1;(function(t){t.L={bit:1};t.M={bit:0};t.Q={bit:3};t.H={bit:2};function e(e){if(typeof e!=="string"){throw new Error("Param is not a string")}const n=e.toLowerCase();switch(n){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+e)}}t.isValid=function t(e){return e&&typeof e.bit!=="undefined"&&e.bit>=0&&e.bit<4};t.from=function n(s,r){if(t.isValid(s)){return s}try{return e(s)}catch(t){return r}}})($5);return $5}var M5;var E5;function T5(){if(E5)return M5;E5=1;function t(){this.buffer=[];this.length=0}t.prototype={get:function(t){const e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)===1},put:function(t,e){for(let n=0;n<e;n++){this.putBit((t>>>e-n-1&1)===1)}},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);if(this.buffer.length<=e){this.buffer.push(0)}if(t){this.buffer[e]|=128>>>this.length%8}this.length++}};M5=t;return M5}var A5;var D5;function R5(){if(D5)return A5;D5=1;function t(t){if(!t||t<1){throw new Error("BitMatrix size must be defined and greater than 0")}this.size=t;this.data=new Uint8Array(t*t);this.reservedBit=new Uint8Array(t*t)}t.prototype.set=function(t,e,n,s){const r=t*this.size+e;this.data[r]=n;if(s)this.reservedBit[r]=true};t.prototype.get=function(t,e){return this.data[t*this.size+e]};t.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n};t.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};A5=t;return A5}var O5={};var L5;function _5(){if(L5)return O5;L5=1;(function(t){const e=C5().getSymbolSize;t.getRowColCoords=function t(n){if(n===1)return[];const s=Math.floor(n/7)+2;const r=e(n);const i=r===145?26:Math.ceil((r-13)/(2*s-2))*2;const o=[r-7];for(let t=1;t<s-1;t++){o[t]=o[t-1]-i}o.push(6);return o.reverse()};t.getPositions=function e(n){const s=[];const r=t.getRowColCoords(n);const i=r.length;for(let t=0;t<i;t++){for(let e=0;e<i;e++){if(t===0&&e===0||t===0&&e===i-1||t===i-1&&e===0){continue}s.push([r[t],r[e]])}}return s}})(O5);return O5}var F5={};var z5;function j5(){if(z5)return F5;z5=1;const t=C5().getSymbolSize;const e=7;F5.getPositions=function n(s){const r=t(s);return[[0,0],[r-e,0],[0,r-e]]};return F5}var P5={};var B5;function W5(){if(B5)return P5;B5=1;(function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e={N1:3,N2:3,N3:40,N4:10};t.isValid=function t(e){return e!=null&&e!==""&&!isNaN(e)&&e>=0&&e<=7};t.from=function e(n){return t.isValid(n)?parseInt(n,10):undefined};t.getPenaltyN1=function t(n){const s=n.size;let r=0;let i=0;let o=0;let a=null;let c=null;for(let t=0;t<s;t++){i=o=0;a=c=null;for(let u=0;u<s;u++){let s=n.get(t,u);if(s===a){i++}else{if(i>=5)r+=e.N1+(i-5);a=s;i=1}s=n.get(u,t);if(s===c){o++}else{if(o>=5)r+=e.N1+(o-5);c=s;o=1}}if(i>=5)r+=e.N1+(i-5);if(o>=5)r+=e.N1+(o-5)}return r};t.getPenaltyN2=function t(n){const s=n.size;let r=0;for(let t=0;t<s-1;t++){for(let e=0;e<s-1;e++){const s=n.get(t,e)+n.get(t,e+1)+n.get(t+1,e)+n.get(t+1,e+1);if(s===4||s===0)r++}}return r*e.N2};t.getPenaltyN3=function t(n){const s=n.size;let r=0;let i=0;let o=0;for(let t=0;t<s;t++){i=o=0;for(let e=0;e<s;e++){i=i<<1&2047|n.get(t,e);if(e>=10&&(i===1488||i===93))r++;o=o<<1&2047|n.get(e,t);if(e>=10&&(o===1488||o===93))r++}}return r*e.N3};t.getPenaltyN4=function t(n){let s=0;const r=n.data.length;for(let t=0;t<r;t++)s+=n.data[t];const i=Math.abs(Math.ceil(s*100/r/5)-10);return i*e.N4};function n(e,n,s){switch(e){case t.Patterns.PATTERN000:return(n+s)%2===0;case t.Patterns.PATTERN001:return n%2===0;case t.Patterns.PATTERN010:return s%3===0;case t.Patterns.PATTERN011:return(n+s)%3===0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(s/3))%2===0;case t.Patterns.PATTERN101:return n*s%2+n*s%3===0;case t.Patterns.PATTERN110:return(n*s%2+n*s%3)%2===0;case t.Patterns.PATTERN111:return(n*s%3+(n+s)%2)%2===0;default:throw new Error("bad maskPattern:"+e)}}t.applyMask=function t(e,s){const r=s.size;for(let t=0;t<r;t++){for(let i=0;i<r;i++){if(s.isReserved(i,t))continue;s.xor(i,t,n(e,i,t))}}};t.getBestMask=function e(n,s){const r=Object.keys(t.Patterns).length;let i=0;let o=Infinity;for(let e=0;e<r;e++){s(e);t.applyMask(e,n);const r=t.getPenaltyN1(n)+t.getPenaltyN2(n)+t.getPenaltyN3(n)+t.getPenaltyN4(n);t.applyMask(e,n);if(r<o){o=r;i=e}}return i}})(P5);return P5}var G5={};var V5;function U5(){if(V5)return G5;V5=1;const t=I5();const e=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81];const n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];G5.getBlocksCount=function n(s,r){switch(r){case t.L:return e[(s-1)*4+0];case t.M:return e[(s-1)*4+1];case t.Q:return e[(s-1)*4+2];case t.H:return e[(s-1)*4+3];default:return undefined}};G5.getTotalCodewordsCount=function e(s,r){switch(r){case t.L:return n[(s-1)*4+0];case t.M:return n[(s-1)*4+1];case t.Q:return n[(s-1)*4+2];case t.H:return n[(s-1)*4+3];default:return undefined}};return G5}var Y5={};var H5={};var Z5;function Q5(){if(Z5)return H5;Z5=1;const t=new Uint8Array(512);const e=new Uint8Array(256);(function n(){let s=1;for(let n=0;n<255;n++){t[n]=s;e[s]=n;s<<=1;if(s&256){s^=285}}for(let e=255;e<512;e++){t[e]=t[e-255]}})();H5.log=function t(n){if(n<1)throw new Error("log("+n+")");return e[n]};H5.exp=function e(n){return t[n]};H5.mul=function n(s,r){if(s===0||r===0)return 0;return t[e[s]+e[r]]};return H5}var X5;function q5(){if(X5)return Y5;X5=1;(function(t){const e=Q5();t.mul=function t(n,s){const r=new Uint8Array(n.length+s.length-1);for(let t=0;t<n.length;t++){for(let i=0;i<s.length;i++){r[t+i]^=e.mul(n[t],s[i])}}return r};t.mod=function t(n,s){let r=new Uint8Array(n);while(r.length-s.length>=0){const t=r[0];for(let n=0;n<s.length;n++){r[n]^=e.mul(s[n],t)}let n=0;while(n<r.length&&r[n]===0)n++;r=r.slice(n)}return r};t.generateECPolynomial=function n(s){let r=new Uint8Array([1]);for(let n=0;n<s;n++){r=t.mul(r,new Uint8Array([1,e.exp(n)]))}return r}})(Y5);return Y5}var J5;var K5;function t6(){if(K5)return J5;K5=1;const t=q5();function e(t){this.genPoly=undefined;this.degree=t;if(this.degree)this.initialize(this.degree)}e.prototype.initialize=function e(n){this.degree=n;this.genPoly=t.generateECPolynomial(this.degree)};e.prototype.encode=function e(n){if(!this.genPoly){throw new Error("Encoder not initialized")}const s=new Uint8Array(n.length+this.degree);s.set(n);const r=t.mod(s,this.genPoly);const i=this.degree-r.length;if(i>0){const t=new Uint8Array(this.degree);t.set(r,i);return t}return r};J5=e;return J5}var e6={};var n6={};var s6={};var r6;function i6(){if(r6)return s6;r6=1;s6.isValid=function t(e){return!isNaN(e)&&e>=1&&e<=40};return s6}var o6={};var a6;function c6(){if(a6)return o6;a6=1;const t="[0-9]+";const e="[A-Z $%*+\\-./:]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|"+"[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|"+"[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|"+"[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const s="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+")(?:.|[\r\n]))+";o6.KANJI=new RegExp(n,"g");o6.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");o6.BYTE=new RegExp(s,"g");o6.NUMERIC=new RegExp(t,"g");o6.ALPHANUMERIC=new RegExp(e,"g");const r=new RegExp("^"+n+"$");const i=new RegExp("^"+t+"$");const o=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");o6.testKanji=function t(e){return r.test(e)};o6.testNumeric=function t(e){return i.test(e)};o6.testAlphanumeric=function t(e){return o.test(e)};return o6}var u6;function l6(){if(u6)return n6;u6=1;(function(t){const e=i6();const n=c6();t.NUMERIC={id:"Numeric",bit:1<<0,ccBits:[10,12,14]};t.ALPHANUMERIC={id:"Alphanumeric",bit:1<<1,ccBits:[9,11,13]};t.BYTE={id:"Byte",bit:1<<2,ccBits:[8,16,16]};t.KANJI={id:"Kanji",bit:1<<3,ccBits:[8,10,12]};t.MIXED={bit:-1};t.getCharCountIndicator=function t(n,s){if(!n.ccBits)throw new Error("Invalid mode: "+n);if(!e.isValid(s)){throw new Error("Invalid version: "+s)}if(s>=1&&s<10)return n.ccBits[0];else if(s<27)return n.ccBits[1];return n.ccBits[2]};t.getBestModeForData=function e(s){if(n.testNumeric(s))return t.NUMERIC;else if(n.testAlphanumeric(s))return t.ALPHANUMERIC;else if(n.testKanji(s))return t.KANJI;else return t.BYTE};t.toString=function t(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")};t.isValid=function t(e){return e&&e.bit&&e.ccBits};function s(e){if(typeof e!=="string"){throw new Error("Param is not a string")}const n=e.toLowerCase();switch(n){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+e)}}t.from=function e(n,r){if(t.isValid(n)){return n}try{return s(n)}catch(t){return r}}})(n6);return n6}var f6;function h6(){if(f6)return e6;f6=1;(function(t){const e=C5();const n=U5();const s=I5();const r=l6();const i=i6();const o=1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0;const a=e.getBCHDigit(o);function c(e,n,s){for(let r=1;r<=40;r++){if(n<=t.getCapacity(r,s,e)){return r}}return undefined}function u(t,e){return r.getCharCountIndicator(t,e)+4}function l(t,e){let n=0;t.forEach((function(t){const s=u(t.mode,e);n+=s+t.getBitsLength()}));return n}function f(e,n){for(let s=1;s<=40;s++){const i=l(e,s);if(i<=t.getCapacity(s,n,r.MIXED)){return s}}return undefined}t.from=function t(e,n){if(i.isValid(e)){return parseInt(e,10)}return n};t.getCapacity=function t(s,o,a){if(!i.isValid(s)){throw new Error("Invalid QR Code version")}if(typeof a==="undefined")a=r.BYTE;const c=e.getSymbolTotalCodewords(s);const l=n.getTotalCodewordsCount(s,o);const f=(c-l)*8;if(a===r.MIXED)return f;const h=f-u(a,s);switch(a){case r.NUMERIC:return Math.floor(h/10*3);case r.ALPHANUMERIC:return Math.floor(h/11*2);case r.KANJI:return Math.floor(h/13);case r.BYTE:default:return Math.floor(h/8)}};t.getBestVersionForData=function t(e,n){let r;const i=s.from(n,s.M);if(Array.isArray(e)){if(e.length>1){return f(e,i)}if(e.length===0){return 1}r=e[0]}else{r=e}return c(r.mode,r.getLength(),i)};t.getEncodedBits=function t(n){if(!i.isValid(n)||n<7){throw new Error("Invalid QR Code version")}let s=n<<12;while(e.getBCHDigit(s)-a>=0){s^=o<<e.getBCHDigit(s)-a}return n<<12|s}})(e6);return e6}var d6={};var p6;function m6(){if(p6)return d6;p6=1;const t=C5();const e=1<<10|1<<8|1<<5|1<<4|1<<2|1<<1|1<<0;const n=1<<14|1<<12|1<<10|1<<4|1<<1;const s=t.getBCHDigit(e);d6.getEncodedBits=function r(i,o){const a=i.bit<<3|o;let c=a<<10;while(t.getBCHDigit(c)-s>=0){c^=e<<t.getBCHDigit(c)-s}return(a<<10|c)^n};return d6}var b6={};var y6;var g6;function w6(){if(g6)return y6;g6=1;const t=l6();function e(e){this.mode=t.NUMERIC;this.data=e.toString()}e.getBitsLength=function t(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)};e.prototype.getLength=function t(){return this.data.length};e.prototype.getBitsLength=function t(){return e.getBitsLength(this.data.length)};e.prototype.write=function t(e){let n,s,r;for(n=0;n+3<=this.data.length;n+=3){s=this.data.substr(n,3);r=parseInt(s,10);e.put(r,10)}const i=this.data.length-n;if(i>0){s=this.data.substr(n);r=parseInt(s,10);e.put(r,i*3+1)}};y6=e;return y6}var v6;var x6;function N6(){if(x6)return v6;x6=1;const t=l6();const e=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(e){this.mode=t.ALPHANUMERIC;this.data=e}n.getBitsLength=function t(e){return 11*Math.floor(e/2)+6*(e%2)};n.prototype.getLength=function t(){return this.data.length};n.prototype.getBitsLength=function t(){return n.getBitsLength(this.data.length)};n.prototype.write=function t(n){let s;for(s=0;s+2<=this.data.length;s+=2){let t=e.indexOf(this.data[s])*45;t+=e.indexOf(this.data[s+1]);n.put(t,11)}if(this.data.length%2){n.put(e.indexOf(this.data[s]),6)}};v6=n;return v6}var k6;var C6;function $6(){if(C6)return k6;C6=1;const t=l6();function e(e){this.mode=t.BYTE;if(typeof e==="string"){this.data=(new TextEncoder).encode(e)}else{this.data=new Uint8Array(e)}}e.getBitsLength=function t(e){return e*8};e.prototype.getLength=function t(){return this.data.length};e.prototype.getBitsLength=function t(){return e.getBitsLength(this.data.length)};e.prototype.write=function(t){for(let e=0,n=this.data.length;e<n;e++){t.put(this.data[e],8)}};k6=e;return k6}var S6;var I6;function M6(){if(I6)return S6;I6=1;const t=l6();const e=C5();function n(e){this.mode=t.KANJI;this.data=e}n.getBitsLength=function t(e){return e*13};n.prototype.getLength=function t(){return this.data.length};n.prototype.getBitsLength=function t(){return n.getBitsLength(this.data.length)};n.prototype.write=function(t){let n;for(n=0;n<this.data.length;n++){let s=e.toSJIS(this.data[n]);if(s>=33088&&s<=40956){s-=33088}else if(s>=57408&&s<=60351){s-=49472}else{throw new Error("Invalid SJIS character: "+this.data[n]+"\n"+"Make sure your charset is UTF-8")}s=(s>>>8&255)*192+(s&255);t.put(s,13)}};S6=n;return S6}var E6={exports:{}};var T6;function A6(){if(T6)return E6.exports;T6=1;(function(t){var e={single_source_shortest_paths:function(t,n,s){var r={};var i={};i[n]=0;var o=e.PriorityQueue.make();o.push(n,0);var a,c,u,l,f,h,d,p,m;while(!o.empty()){a=o.pop();c=a.value;l=a.cost;f=t[c]||{};for(u in f){if(f.hasOwnProperty(u)){h=f[u];d=l+h;p=i[u];m=typeof i[u]==="undefined";if(m||p>d){i[u]=d;o.push(u,d);r[u]=c}}}}if(typeof s!=="undefined"&&typeof i[s]==="undefined"){var b=["Could not find a path from ",n," to ",s,"."].join("");throw new Error(b)}return r},extract_shortest_path_from_predecessor_list:function(t,e){var n=[];var s=e;while(s){n.push(s);s=t[s]}n.reverse();return n},find_path:function(t,n,s){var r=e.single_source_shortest_paths(t,n,s);return e.extract_shortest_path_from_predecessor_list(r,s)},PriorityQueue:{make:function(t){var n=e.PriorityQueue,s={},r;t=t||{};for(r in n){if(n.hasOwnProperty(r)){s[r]=n[r]}}s.queue=[];s.sorter=t.sorter||n.default_sorter;return s},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var n={value:t,cost:e};this.queue.push(n);this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};{t.exports=e}})(E6);return E6.exports}var D6;function R6(){if(D6)return b6;D6=1;(function(t){const e=l6();const n=w6();const s=N6();const r=$6();const i=M6();const o=c6();const a=C5();const c=A6();function u(t){return unescape(encodeURIComponent(t)).length}function l(t,e,n){const s=[];let r;while((r=t.exec(n))!==null){s.push({data:r[0],index:r.index,mode:e,length:r[0].length})}return s}function f(t){const n=l(o.NUMERIC,e.NUMERIC,t);const s=l(o.ALPHANUMERIC,e.ALPHANUMERIC,t);let r;let i;if(a.isKanjiModeEnabled()){r=l(o.BYTE,e.BYTE,t);i=l(o.KANJI,e.KANJI,t)}else{r=l(o.BYTE_KANJI,e.BYTE,t);i=[]}const c=n.concat(s,r,i);return c.sort((function(t,e){return t.index-e.index})).map((function(t){return{data:t.data,mode:t.mode,length:t.length}}))}function h(t,o){switch(o){case e.NUMERIC:return n.getBitsLength(t);case e.ALPHANUMERIC:return s.getBitsLength(t);case e.KANJI:return i.getBitsLength(t);case e.BYTE:return r.getBitsLength(t)}}function d(t){return t.reduce((function(t,e){const n=t.length-1>=0?t[t.length-1]:null;if(n&&n.mode===e.mode){t[t.length-1].data+=e.data;return t}t.push(e);return t}),[])}function p(t){const n=[];for(let s=0;s<t.length;s++){const r=t[s];switch(r.mode){case e.NUMERIC:n.push([r,{data:r.data,mode:e.ALPHANUMERIC,length:r.length},{data:r.data,mode:e.BYTE,length:r.length}]);break;case e.ALPHANUMERIC:n.push([r,{data:r.data,mode:e.BYTE,length:r.length}]);break;case e.KANJI:n.push([r,{data:r.data,mode:e.BYTE,length:u(r.data)}]);break;case e.BYTE:n.push([{data:r.data,mode:e.BYTE,length:u(r.data)}])}}return n}function m(t,n){const s={};const r={start:{}};let i=["start"];for(let o=0;o<t.length;o++){const a=t[o];const c=[];for(let t=0;t<a.length;t++){const u=a[t];const l=""+o+t;c.push(l);s[l]={node:u,lastCount:0};r[l]={};for(let t=0;t<i.length;t++){const o=i[t];if(s[o]&&s[o].node.mode===u.mode){r[o][l]=h(s[o].lastCount+u.length,u.mode)-h(s[o].lastCount,u.mode);s[o].lastCount+=u.length}else{if(s[o])s[o].lastCount=u.length;r[o][l]=h(u.length,u.mode)+4+e.getCharCountIndicator(u.mode,n)}}}i=c}for(let t=0;t<i.length;t++){r[i[t]].end=0}return{map:r,table:s}}function b(t,o){let c;const u=e.getBestModeForData(t);c=e.from(o,u);if(c!==e.BYTE&&c.bit<u.bit){throw new Error('"'+t+'"'+" cannot be encoded with mode "+e.toString(c)+".\n Suggested mode is: "+e.toString(u))}if(c===e.KANJI&&!a.isKanjiModeEnabled()){c=e.BYTE}switch(c){case e.NUMERIC:return new n(t);case e.ALPHANUMERIC:return new s(t);case e.KANJI:return new i(t);case e.BYTE:return new r(t)}}t.fromArray=function t(e){return e.reduce((function(t,e){if(typeof e==="string"){t.push(b(e,null))}else if(e.data){t.push(b(e.data,e.mode))}return t}),[])};t.fromString=function e(n,s){const r=f(n,a.isKanjiModeEnabled());const i=p(r);const o=m(i,s);const u=c.find_path(o.map,"start","end");const l=[];for(let t=1;t<u.length-1;t++){l.push(o.table[u[t]].node)}return t.fromArray(d(l))};t.rawSplit=function e(n){return t.fromArray(f(n,a.isKanjiModeEnabled()))}})(b6);return b6}var O6;function L6(){if(O6)return x5;O6=1;const t=C5();const e=I5();const n=T5();const s=R5();const r=_5();const i=j5();const o=W5();const a=U5();const c=t6();const u=h6();const l=m6();const f=l6();const h=R6();function d(t,e){const n=t.size;const s=i.getPositions(e);for(let e=0;e<s.length;e++){const r=s[e][0];const i=s[e][1];for(let e=-1;e<=7;e++){if(r+e<=-1||n<=r+e)continue;for(let s=-1;s<=7;s++){if(i+s<=-1||n<=i+s)continue;if(e>=0&&e<=6&&(s===0||s===6)||s>=0&&s<=6&&(e===0||e===6)||e>=2&&e<=4&&s>=2&&s<=4){t.set(r+e,i+s,true,true)}else{t.set(r+e,i+s,false,true)}}}}}function p(t){const e=t.size;for(let n=8;n<e-8;n++){const e=n%2===0;t.set(n,6,e,true);t.set(6,n,e,true)}}function m(t,e){const n=r.getPositions(e);for(let e=0;e<n.length;e++){const s=n[e][0];const r=n[e][1];for(let e=-2;e<=2;e++){for(let n=-2;n<=2;n++){if(e===-2||e===2||n===-2||n===2||e===0&&n===0){t.set(s+e,r+n,true,true)}else{t.set(s+e,r+n,false,true)}}}}}function b(t,e){const n=t.size;const s=u.getEncodedBits(e);let r,i,o;for(let e=0;e<18;e++){r=Math.floor(e/3);i=e%3+n-8-3;o=(s>>e&1)===1;t.set(r,i,o,true);t.set(i,r,o,true)}}function y(t,e,n){const s=t.size;const r=l.getEncodedBits(e,n);let i,o;for(i=0;i<15;i++){o=(r>>i&1)===1;if(i<6){t.set(i,8,o,true)}else if(i<8){t.set(i+1,8,o,true)}else{t.set(s-15+i,8,o,true)}if(i<8){t.set(8,s-i-1,o,true)}else if(i<9){t.set(8,15-i-1+1,o,true)}else{t.set(8,15-i-1,o,true)}}t.set(s-8,8,1,true)}function g(t,e){const n=t.size;let s=-1;let r=n-1;let i=7;let o=0;for(let a=n-1;a>0;a-=2){if(a===6)a--;while(true){for(let n=0;n<2;n++){if(!t.isReserved(r,a-n)){let s=false;if(o<e.length){s=(e[o]>>>i&1)===1}t.set(r,a-n,s);i--;if(i===-1){o++;i=7}}}r+=s;if(r<0||n<=r){r-=s;s=-s;break}}}}function w(e,s,r){const i=new n;r.forEach((function(t){i.put(t.mode.bit,4);i.put(t.getLength(),f.getCharCountIndicator(t.mode,e));t.write(i)}));const o=t.getSymbolTotalCodewords(e);const c=a.getTotalCodewordsCount(e,s);const u=(o-c)*8;if(i.getLengthInBits()+4<=u){i.put(0,4)}while(i.getLengthInBits()%8!==0){i.putBit(0)}const l=(u-i.getLengthInBits())/8;for(let t=0;t<l;t++){i.put(t%2?17:236,8)}return v(i,e,s)}function v(e,n,s){const r=t.getSymbolTotalCodewords(n);const i=a.getTotalCodewordsCount(n,s);const o=r-i;const u=a.getBlocksCount(n,s);const l=r%u;const f=u-l;const h=Math.floor(r/u);const d=Math.floor(o/u);const p=d+1;const m=h-d;const b=new c(m);let y=0;const g=new Array(u);const w=new Array(u);let v=0;const x=new Uint8Array(e.buffer);for(let t=0;t<u;t++){const e=t<f?d:p;g[t]=x.slice(y,y+e);w[t]=b.encode(g[t]);y+=e;v=Math.max(v,e)}const N=new Uint8Array(r);let k=0;let C,$;for(C=0;C<v;C++){for($=0;$<u;$++){if(C<g[$].length){N[k++]=g[$][C]}}}for(C=0;C<m;C++){for($=0;$<u;$++){N[k++]=w[$][C]}}return N}function x(e,n,r,i){let a;if(Array.isArray(e)){a=h.fromArray(e)}else if(typeof e==="string"){let t=n;if(!t){const n=h.rawSplit(e);t=u.getBestVersionForData(n,r)}a=h.fromString(e,t||40)}else{throw new Error("Invalid data")}const c=u.getBestVersionForData(a,r);if(!c){throw new Error("The amount of data is too big to be stored in a QR Code")}if(!n){n=c}else if(n<c){throw new Error("\n"+"The chosen QR Code version cannot contain this amount of data.\n"+"Minimum version required to store current data is: "+c+".\n")}const l=w(n,r,a);const f=t.getSymbolSize(n);const v=new s(f);d(v,n);p(v);m(v,n);y(v,r,0);if(n>=7){b(v,n)}g(v,l);if(isNaN(i)){i=o.getBestMask(v,y.bind(null,v,r))}o.applyMask(i,v);y(v,r,i);return{modules:v,version:n,errorCorrectionLevel:r,maskPattern:i,segments:a}}x5.create=function n(s,r){if(typeof s==="undefined"||s===""){throw new Error("No input text")}let i=e.M;let a;let c;if(typeof r!=="undefined"){i=e.from(r.errorCorrectionLevel,e.M);a=u.from(r.version);c=o.from(r.maskPattern);if(r.toSJISFunc){t.setToSJISFunction(r.toSJISFunc)}}return x(s,a,i,c)};return x5}var _6={};var F6={};var z6={};var j6={};var P6;var B6;function W6(){if(B6)return P6;B6=1;P6=function t(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function"){return false}if(typeof Symbol.iterator==="symbol"){return true}var e={};var n=Symbol("test");var s=Object(n);if(typeof n==="string"){return false}if(Object.prototype.toString.call(n)!=="[object Symbol]"){return false}if(Object.prototype.toString.call(s)!=="[object Symbol]"){return false}var r=42;e[n]=r;for(var i in e){return false}if(typeof Object.keys==="function"&&Object.keys(e).length!==0){return false}if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames(e).length!==0){return false}var o=Object.getOwnPropertySymbols(e);if(o.length!==1||o[0]!==n){return false}if(!Object.prototype.propertyIsEnumerable.call(e,n)){return false}if(typeof Object.getOwnPropertyDescriptor==="function"){var a=Object.getOwnPropertyDescriptor(e,n);if(a.value!==r||a.enumerable!==true){return false}}return true};return P6}var G6;var V6;function U6(){if(V6)return G6;V6=1;var t=W6();G6=function e(){return t()&&!!Symbol.toStringTag};return G6}var Y6;var H6;function Z6(){if(H6)return Y6;H6=1;Y6=Object;return Y6}var Q6;var X6;function q6(){if(X6)return Q6;X6=1;Q6=Error;return Q6}var J6;var K6;function t8(){if(K6)return J6;K6=1;J6=EvalError;return J6}var e8;var n8;function s8(){if(n8)return e8;n8=1;e8=RangeError;return e8}var r8;var i8;function o8(){if(i8)return r8;i8=1;r8=ReferenceError;return r8}var a8;var c8;function u8(){if(c8)return a8;c8=1;a8=SyntaxError;return a8}var l8;var f8;function h8(){if(f8)return l8;f8=1;l8=TypeError;return l8}var d8;var p8;function m8(){if(p8)return d8;p8=1;d8=URIError;return d8}var b8;var y8;function g8(){if(y8)return b8;y8=1;b8=Math.abs;return b8}var w8;var v8;function x8(){if(v8)return w8;v8=1;w8=Math.floor;return w8}var N8;var k8;function C8(){if(k8)return N8;k8=1;N8=Math.max;return N8}var $8;var S8;function I8(){if(S8)return $8;S8=1;$8=Math.min;return $8}var M8;var E8;function T8(){if(E8)return M8;E8=1;M8=Math.pow;return M8}var A8;var D8;function R8(){if(D8)return A8;D8=1;A8=Math.round;return A8}var O8;var L8;function _8(){if(L8)return O8;L8=1;O8=Number.isNaN||function t(e){return e!==e};return O8}var F8;var z8;function j8(){if(z8)return F8;z8=1;var t=_8();F8=function e(n){if(t(n)||n===0){return n}return n<0?-1:1};return F8}var P8;var B8;function W8(){if(B8)return P8;B8=1;P8=Object.getOwnPropertyDescriptor;return P8}var G8;var V8;function U8(){if(V8)return G8;V8=1;var t=W8();if(t){try{t([],"length")}catch(e){t=null}}G8=t;return G8}var Y8;var H8;function Z8(){if(H8)return Y8;H8=1;var t=Object.defineProperty||false;if(t){try{t({},"a",{value:1})}catch(e){t=false}}Y8=t;return Y8}var Q8;var X8;function q8(){if(X8)return Q8;X8=1;var t=typeof Symbol!=="undefined"&&Symbol;var e=W6();Q8=function n(){if(typeof t!=="function"){return false}if(typeof Symbol!=="function"){return false}if(typeof t("foo")!=="symbol"){return false}if(typeof Symbol("bar")!=="symbol"){return false}return e()};return Q8}var J8;var K8;function t9(){if(K8)return J8;K8=1;J8=typeof Reflect!=="undefined"&&Reflect.getPrototypeOf||null;return J8}var e9;var n9;function s9(){if(n9)return e9;n9=1;var t=Z6();e9=t.getPrototypeOf||null;return e9}var r9;var i9;function o9(){if(i9)return r9;i9=1;var t="Function.prototype.bind called on incompatible ";var e=Object.prototype.toString;var n=Math.max;var s="[object Function]";var r=function t(e,n){var s=[];for(var r=0;r<e.length;r+=1){s[r]=e[r]}for(var i=0;i<n.length;i+=1){s[i+e.length]=n[i]}return s};var i=function t(e,n){var s=[];for(var r=n,i=0;r<e.length;r+=1,i+=1){s[i]=e[r]}return s};var o=function(t,e){var n="";for(var s=0;s<t.length;s+=1){n+=t[s];if(s+1<t.length){n+=e}}return n};r9=function a(c){var u=this;if(typeof u!=="function"||e.apply(u)!==s){throw new TypeError(t+u)}var l=i(arguments,1);var f;var h=function(){if(this instanceof f){var t=u.apply(this,r(l,arguments));if(Object(t)===t){return t}return this}return u.apply(c,r(l,arguments))};var d=n(0,u.length-l.length);var p=[];for(var m=0;m<d;m++){p[m]="$"+m}f=Function("binder","return function ("+o(p,",")+"){ return binder.apply(this,arguments); }")(h);if(u.prototype){var b=function t(){};b.prototype=u.prototype;f.prototype=new b;b.prototype=null}return f};return r9}var a9;var c9;function u9(){if(c9)return a9;c9=1;var t=o9();a9=Function.prototype.bind||t;return a9}var l9;var f9;function h9(){if(f9)return l9;f9=1;l9=Function.prototype.call;return l9}var d9;var p9;function m9(){if(p9)return d9;p9=1;d9=Function.prototype.apply;return d9}var b9;var y9;function g9(){if(y9)return b9;y9=1;b9=typeof Reflect!=="undefined"&&Reflect&&Reflect.apply;return b9}var w9;var v9;function x9(){if(v9)return w9;v9=1;var t=u9();var e=m9();var n=h9();var s=g9();w9=s||t.call(n,e);return w9}var N9;var k9;function C9(){if(k9)return N9;k9=1;var t=u9();var e=h8();var n=h9();var s=x9();N9=function r(i){if(i.length<1||typeof i[0]!=="function"){throw new e("a function is required")}return s(t,n,i)};return N9}var $9;var S9;function I9(){if(S9)return $9;S9=1;var t=C9();var e=U8();var n;try{n=[].__proto__===Array.prototype}catch(t){if(!t||typeof t!=="object"||!("code"in t)||t.code!=="ERR_PROTO_ACCESS"){throw t}}var s=!!n&&e&&e(Object.prototype,"__proto__");var r=Object;var i=r.getPrototypeOf;$9=s&&typeof s.get==="function"?t([s.get]):typeof i==="function"?function t(e){return i(e==null?e:r(e))}:false;return $9}var M9;var E9;function T9(){if(E9)return M9;E9=1;var t=t9();var e=s9();var n=I9();M9=t?function e(n){return t(n)}:e?function t(n){if(!n||typeof n!=="object"&&typeof n!=="function"){throw new TypeError("getProto: not an object")}return e(n)}:n?function t(e){return n(e)}:null;return M9}var A9;var D9;function R9(){if(D9)return A9;D9=1;var t=Function.prototype.call;var e=Object.prototype.hasOwnProperty;var n=u9();A9=n.call(t,e);return A9}var O9;var L9;function _9(){if(L9)return O9;L9=1;var t;var e=Z6();var n=q6();var s=t8();var r=s8();var i=o8();var o=u8();var a=h8();var c=m8();var u=g8();var l=x8();var f=C8();var h=I8();var d=T8();var p=R8();var m=j8();var b=Function;var y=function(t){try{return b('"use strict"; return ('+t+").constructor;")()}catch(t){}};var g=U8();var w=Z8();var v=function(){throw new a};var x=g?function(){try{return v}catch(t){try{return g(arguments,"callee").get}catch(t){return v}}}():v;var N=q8()();var k=T9();var C=s9();var $=t9();var S=m9();var I=h9();var M={};var E=typeof Uint8Array==="undefined"||!k?t:k(Uint8Array);var T={__proto__:null,"%AggregateError%":typeof AggregateError==="undefined"?t:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer==="undefined"?t:ArrayBuffer,"%ArrayIteratorPrototype%":N&&k?k([][Symbol.iterator]()):t,"%AsyncFromSyncIteratorPrototype%":t,"%AsyncFunction%":M,"%AsyncGenerator%":M,"%AsyncGeneratorFunction%":M,"%AsyncIteratorPrototype%":M,"%Atomics%":typeof Atomics==="undefined"?t:Atomics,"%BigInt%":typeof BigInt==="undefined"?t:BigInt,"%BigInt64Array%":typeof BigInt64Array==="undefined"?t:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array==="undefined"?t:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView==="undefined"?t:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":s,"%Float16Array%":typeof Float16Array==="undefined"?t:Float16Array,"%Float32Array%":typeof Float32Array==="undefined"?t:Float32Array,"%Float64Array%":typeof Float64Array==="undefined"?t:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry==="undefined"?t:FinalizationRegistry,"%Function%":b,"%GeneratorFunction%":M,"%Int8Array%":typeof Int8Array==="undefined"?t:Int8Array,"%Int16Array%":typeof Int16Array==="undefined"?t:Int16Array,"%Int32Array%":typeof Int32Array==="undefined"?t:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":N&&k?k(k([][Symbol.iterator]())):t,"%JSON%":typeof JSON==="object"?JSON:t,"%Map%":typeof Map==="undefined"?t:Map,"%MapIteratorPrototype%":typeof Map==="undefined"||!N||!k?t:k((new Map)[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":e,"%Object.getOwnPropertyDescriptor%":g,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise==="undefined"?t:Promise,"%Proxy%":typeof Proxy==="undefined"?t:Proxy,"%RangeError%":r,"%ReferenceError%":i,"%Reflect%":typeof Reflect==="undefined"?t:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set==="undefined"?t:Set,"%SetIteratorPrototype%":typeof Set==="undefined"||!N||!k?t:k((new Set)[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer==="undefined"?t:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":N&&k?k(""[Symbol.iterator]()):t,"%Symbol%":N?Symbol:t,"%SyntaxError%":o,"%ThrowTypeError%":x,"%TypedArray%":E,"%TypeError%":a,"%Uint8Array%":typeof Uint8Array==="undefined"?t:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray==="undefined"?t:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array==="undefined"?t:Uint16Array,"%Uint32Array%":typeof Uint32Array==="undefined"?t:Uint32Array,"%URIError%":c,"%WeakMap%":typeof WeakMap==="undefined"?t:WeakMap,"%WeakRef%":typeof WeakRef==="undefined"?t:WeakRef,"%WeakSet%":typeof WeakSet==="undefined"?t:WeakSet,"%Function.prototype.call%":I,"%Function.prototype.apply%":S,"%Object.defineProperty%":w,"%Object.getPrototypeOf%":C,"%Math.abs%":u,"%Math.floor%":l,"%Math.max%":f,"%Math.min%":h,"%Math.pow%":d,"%Math.round%":p,"%Math.sign%":m,"%Reflect.getPrototypeOf%":$};var A=function t(e){var n;if(e==="%AsyncFunction%"){n=y("async function () {}")}else if(e==="%GeneratorFunction%"){n=y("function* () {}")}else if(e==="%AsyncGeneratorFunction%"){n=y("async function* () {}")}else if(e==="%AsyncGenerator%"){var s=t("%AsyncGeneratorFunction%");if(s){n=s.prototype}}else if(e==="%AsyncIteratorPrototype%"){var r=t("%AsyncGenerator%");if(r&&k){n=k(r.prototype)}}T[e]=n;return n};var D={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]};var R=u9();var O=R9();var L=R.call(I,Array.prototype.concat);var _=R.call(S,Array.prototype.splice);var F=R.call(I,String.prototype.replace);var z=R.call(I,String.prototype.slice);var j=R.call(I,RegExp.prototype.exec);var P=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;var B=/\\(\\)?/g;var W=function t(e){var n=z(e,0,1);var s=z(e,-1);if(n==="%"&&s!=="%"){throw new o("invalid intrinsic syntax, expected closing `%`")}else if(s==="%"&&n!=="%"){throw new o("invalid intrinsic syntax, expected opening `%`")}var r=[];F(e,P,(function(t,e,n,s){r[r.length]=n?F(s,B,"$1"):e||t}));return r};var G=function t(e,n){var s=e;var r;if(O(D,s)){r=D[s];s="%"+r[0]+"%"}if(O(T,s)){var i=T[s];if(i===M){i=A(s)}if(typeof i==="undefined"&&!n){throw new a("intrinsic "+e+" exists, but is not available. Please file an issue!")}return{alias:r,name:s,value:i}}throw new o("intrinsic "+e+" does not exist!")};O9=function t(e,n){if(typeof e!=="string"||e.length===0){throw new a("intrinsic name must be a non-empty string")}if(arguments.length>1&&typeof n!=="boolean"){throw new a('"allowMissing" argument must be a boolean')}if(j(/^%?[^%]*%?$/,e)===null){throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name")}var s=W(e);var r=s.length>0?s[0]:"";var i=G("%"+r+"%",n);var c=i.name;var u=i.value;var l=false;var f=i.alias;if(f){r=f[0];_(s,L([0,1],f))}for(var h=1,d=true;h<s.length;h+=1){var p=s[h];var m=z(p,0,1);var b=z(p,-1);if((m==='"'||m==="'"||m==="`"||(b==='"'||b==="'"||b==="`"))&&m!==b){throw new o("property names with quotes must have matching quotes")}if(p==="constructor"||!d){l=true}r+="."+p;c="%"+r+"%";if(O(T,c)){u=T[c]}else if(u!=null){if(!(p in u)){if(!n){throw new a("base intrinsic for "+e+" exists, but the property is not available.")}return void 0}if(g&&h+1>=s.length){var y=g(u,p);d=!!y;if(d&&"get"in y&&!("originalValue"in y.get)){u=y.get}else{u=u[p]}}else{d=O(u,p);u=u[p]}if(d&&!l){T[c]=u}}}return u};return O9}var F9;var z9;function j9(){if(z9)return F9;z9=1;var t=_9();var e=C9();var n=e([t("%String.prototype.indexOf%")]);F9=function s(r,i){var o=t(r,!!i);if(typeof o==="function"&&n(r,".prototype.")>-1){return e([o])}return o};return F9}var P9;var B9;function W9(){if(B9)return P9;B9=1;var t=U6()();var e=j9();var n=e("Object.prototype.toString");var s=function e(s){if(t&&s&&typeof s==="object"&&Symbol.toStringTag in s){return false}return n(s)==="[object Arguments]"};var r=function t(e){if(s(e)){return true}return e!==null&&typeof e==="object"&&"length"in e&&typeof e.length==="number"&&e.length>=0&&n(e)!=="[object Array]"&&"callee"in e&&n(e.callee)==="[object Function]"};var i=function(){return s(arguments)}();s.isLegacyArguments=r;P9=i?s:r;return P9}var G9;var V9;function U9(){if(V9)return G9;V9=1;var t=j9();var e=U6()();var n=R9();var s=U8();var r;if(e){var i=t("RegExp.prototype.exec");var o={};var a=function(){throw o};var c={toString:a,valueOf:a};if(typeof Symbol.toPrimitive==="symbol"){c[Symbol.toPrimitive]=a}r=function t(e){if(!e||typeof e!=="object"){return false}var r=s(e,"lastIndex");var a=r&&n(r,"value");if(!a){return false}try{i(e,c)}catch(t){return t===o}}}else{var u=t("Object.prototype.toString");var l="[object RegExp]";r=function t(e){if(!e||typeof e!=="object"&&typeof e!=="function"){return false}return u(e)===l}}G9=r;return G9}var Y9;var H9;function Z9(){if(H9)return Y9;H9=1;var t=j9();var e=U9();var n=t("RegExp.prototype.exec");var s=h8();Y9=function t(r){if(!e(r)){throw new s("`regex` must be a RegExp")}return function t(e){return n(r,e)!==null}};return Y9}var Q9;var X9;function q9(){if(X9)return Q9;X9=1;var t=j9();var e=Z9();var n=e(/^\s*(?:function)?\*/);var s=U6()();var r=T9();var i=t("Object.prototype.toString");var o=t("Function.prototype.toString");var a=function(){if(!s){return false}try{return Function("return function*() {}")()}catch(t){}};var c;Q9=function t(e){if(typeof e!=="function"){return false}if(n(o(e))){return true}if(!s){var u=i(e);return u==="[object GeneratorFunction]"}if(!r){return false}if(typeof c==="undefined"){var l=a();c=l?r(l):false}return r(e)===c};return Q9}var J9;var K9;function t7(){if(K9)return J9;K9=1;var t=Function.prototype.toString;var e=typeof Reflect==="object"&&Reflect!==null&&Reflect.apply;var n;var s;if(typeof e==="function"&&typeof Object.defineProperty==="function"){try{n=Object.defineProperty({},"length",{get:function(){throw s}});s={};e((function(){throw 42}),null,n)}catch(t){if(t!==s){e=null}}}else{e=null}var r=/^\s*class\b/;var i=function e(n){try{var s=t.call(n);return r.test(s)}catch(t){return false}};var o=function e(n){try{if(i(n)){return false}t.call(n);return true}catch(t){return false}};var a=Object.prototype.toString;var c="[object Object]";var u="[object Function]";var l="[object GeneratorFunction]";var f="[object HTMLAllCollection]";var h="[object HTML document.all class]";var d="[object HTMLCollection]";var p=typeof Symbol==="function"&&!!Symbol.toStringTag;var m=!(0 in[,]);var b=function t(){return false};if(typeof document==="object"){var y=document.all;if(a.call(y)===a.call(document.all)){b=function t(e){if((m||!e)&&(typeof e==="undefined"||typeof e==="object")){try{var n=a.call(e);return(n===f||n===h||n===d||n===c)&&e("")==null}catch(t){}}return false}}}J9=e?function t(r){if(b(r)){return true}if(!r){return false}if(typeof r!=="function"&&typeof r!=="object"){return false}try{e(r,null,n)}catch(t){if(t!==s){return false}}return!i(r)&&o(r)}:function t(e){if(b(e)){return true}if(!e){return false}if(typeof e!=="function"&&typeof e!=="object"){return false}if(p){return o(e)}if(i(e)){return false}var n=a.call(e);if(n!==u&&n!==l&&!/^\[object HTML/.test(n)){return false}return o(e)};return J9}var e7;var n7;function s7(){if(n7)return e7;n7=1;var t=t7();var e=Object.prototype.toString;var n=Object.prototype.hasOwnProperty;var s=function t(e,s,r){for(var i=0,o=e.length;i<o;i++){if(n.call(e,i)){if(r==null){s(e[i],i,e)}else{s.call(r,e[i],i,e)}}}};var r=function t(e,n,s){for(var r=0,i=e.length;r<i;r++){if(s==null){n(e.charAt(r),r,e)}else{n.call(s,e.charAt(r),r,e)}}};var i=function t(e,s,r){for(var i in e){if(n.call(e,i)){if(r==null){s(e[i],i,e)}else{s.call(r,e[i],i,e)}}}};function o(t){return e.call(t)==="[object Array]"}e7=function e(n,a,c){if(!t(a)){throw new TypeError("iterator must be a function")}var u;if(arguments.length>=3){u=c}if(o(n)){s(n,a,u)}else if(typeof n==="string"){r(n,a,u)}else{i(n,a,u)}};return e7}var r7;var i7;function o7(){if(i7)return r7;i7=1;r7=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"];return r7}var a7;var c7;function u7(){if(c7)return a7;c7=1;var t=o7();var e=typeof globalThis==="undefined"?h:globalThis;a7=function n(){var s=[];for(var r=0;r<t.length;r++){if(typeof e[t[r]]==="function"){s[s.length]=t[r]}}return s};return a7}var l7={exports:{}};var f7;var h7;function d7(){if(h7)return f7;h7=1;var t=Z8();var e=u8();var n=h8();var s=U8();f7=function r(i,o,a){if(!i||typeof i!=="object"&&typeof i!=="function"){throw new n("`obj` must be an object or a function`")}if(typeof o!=="string"&&typeof o!=="symbol"){throw new n("`property` must be a string or a symbol`")}if(arguments.length>3&&typeof arguments[3]!=="boolean"&&arguments[3]!==null){throw new n("`nonEnumerable`, if provided, must be a boolean or null")}if(arguments.length>4&&typeof arguments[4]!=="boolean"&&arguments[4]!==null){throw new n("`nonWritable`, if provided, must be a boolean or null")}if(arguments.length>5&&typeof arguments[5]!=="boolean"&&arguments[5]!==null){throw new n("`nonConfigurable`, if provided, must be a boolean or null")}if(arguments.length>6&&typeof arguments[6]!=="boolean"){throw new n("`loose`, if provided, must be a boolean")}var c=arguments.length>3?arguments[3]:null;var u=arguments.length>4?arguments[4]:null;var l=arguments.length>5?arguments[5]:null;var f=arguments.length>6?arguments[6]:false;var h=!!s&&s(i,o);if(t){t(i,o,{configurable:l===null&&h?h.configurable:!l,enumerable:c===null&&h?h.enumerable:!c,value:a,writable:u===null&&h?h.writable:!u})}else if(f||!c&&!u&&!l){i[o]=a}else{throw new e("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}};return f7}var p7;var m7;function b7(){if(m7)return p7;m7=1;var t=Z8();var e=function e(){return!!t};e.hasArrayLengthDefineBug=function e(){if(!t){return null}try{return t([],"length",{value:1}).length!==1}catch(t){return true}};p7=e;return p7}var y7;var g7;function w7(){if(g7)return y7;g7=1;var t=_9();var e=d7();var n=b7()();var s=U8();var r=h8();var i=t("%Math.floor%");y7=function t(o,a){if(typeof o!=="function"){throw new r("`fn` is not a function")}if(typeof a!=="number"||a<0||a>4294967295||i(a)!==a){throw new r("`length` must be a positive 32-bit integer")}var c=arguments.length>2&&!!arguments[2];var u=true;var l=true;if("length"in o&&s){var f=s(o,"length");if(f&&!f.configurable){u=false}if(f&&!f.writable){l=false}}if(u||l||!c){if(n){e(o,"length",a,true,true)}else{e(o,"length",a)}}return o};return y7}var v7;var x7;function N7(){if(x7)return v7;x7=1;var t=u9();var e=m9();var n=x9();v7=function s(){return n(t,e,arguments)};return v7}var k7;function C7(){if(k7)return l7.exports;k7=1;(function(t){var e=w7();var n=Z8();var s=C9();var r=N7();t.exports=function t(n){var r=s(arguments);var i=n.length-(arguments.length-1);return e(r,1+(i>0?i:0),true)};if(n){n(t.exports,"apply",{value:r})}else{t.exports.apply=r}})(l7);return l7.exports}var $7;var S7;function I7(){if(S7)return $7;S7=1;var t=s7();var e=u7();var n=C7();var s=j9();var r=U8();var i=T9();var o=s("Object.prototype.toString");var a=U6()();var c=typeof globalThis==="undefined"?h:globalThis;var u=e();var l=s("String.prototype.slice");var f=s("Array.prototype.indexOf",true)||function t(e,n){for(var s=0;s<e.length;s+=1){if(e[s]===n){return s}}return-1};var d={__proto__:null};if(a&&r&&i){t(u,(function(t){var e=new c[t];if(Symbol.toStringTag in e&&i){var s=i(e);var o=r(s,Symbol.toStringTag);if(!o&&s){var a=i(s);o=r(a,Symbol.toStringTag)}d["$"+t]=n(o.get)}}))}else{t(u,(function(t){var e=new c[t];var s=e.slice||e.set;if(s){d["$"+t]=n(s)}}))}var p=function e(n){var s=false;t(d,(function(t,e){if(!s){try{if("$"+t(n)===e){s=l(e,1)}}catch(t){}}}));return s};var m=function e(n){var s=false;t(d,(function(t,e){if(!s){try{t(n);s=l(e,1)}catch(t){}}}));return s};$7=function t(e){if(!e||typeof e!=="object"){return false}if(!a){var n=l(o(e),8,-1);if(f(u,n)>-1){return n}if(n!=="Object"){return false}return m(e)}if(!r){return null}return p(e)};return $7}var M7;var E7;function T7(){if(E7)return M7;E7=1;var t=I7();M7=function e(n){return!!t(n)};return M7}var A7;function D7(){if(A7)return j6;A7=1;(function(t){var e=W9();var n=q9();var s=I7();var r=T7();function i(t){return t.call.bind(t)}var o=typeof BigInt!=="undefined";var a=typeof Symbol!=="undefined";var c=i(Object.prototype.toString);var u=i(Number.prototype.valueOf);var l=i(String.prototype.valueOf);var f=i(Boolean.prototype.valueOf);if(o){var h=i(BigInt.prototype.valueOf)}if(a){var d=i(Symbol.prototype.valueOf)}function p(t,e){if(typeof t!=="object"){return false}try{e(t);return true}catch(t){return false}}t.isArgumentsObject=e;t.isGeneratorFunction=n;t.isTypedArray=r;function m(t){return typeof Promise!=="undefined"&&t instanceof Promise||t!==null&&typeof t==="object"&&typeof t.then==="function"&&typeof t.catch==="function"}t.isPromise=m;function b(t){if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){return ArrayBuffer.isView(t)}return r(t)||j(t)}t.isArrayBufferView=b;function y(t){return s(t)==="Uint8Array"}t.isUint8Array=y;function g(t){return s(t)==="Uint8ClampedArray"}t.isUint8ClampedArray=g;function w(t){return s(t)==="Uint16Array"}t.isUint16Array=w;function v(t){return s(t)==="Uint32Array"}t.isUint32Array=v;function x(t){return s(t)==="Int8Array"}t.isInt8Array=x;function N(t){return s(t)==="Int16Array"}t.isInt16Array=N;function k(t){return s(t)==="Int32Array"}t.isInt32Array=k;function C(t){return s(t)==="Float32Array"}t.isFloat32Array=C;function $(t){return s(t)==="Float64Array"}t.isFloat64Array=$;function S(t){return s(t)==="BigInt64Array"}t.isBigInt64Array=S;function I(t){return s(t)==="BigUint64Array"}t.isBigUint64Array=I;function M(t){return c(t)==="[object Map]"}M.working=typeof Map!=="undefined"&&M(new Map);function E(t){if(typeof Map==="undefined"){return false}return M.working?M(t):t instanceof Map}t.isMap=E;function T(t){return c(t)==="[object Set]"}T.working=typeof Set!=="undefined"&&T(new Set);function A(t){if(typeof Set==="undefined"){return false}return T.working?T(t):t instanceof Set}t.isSet=A;function D(t){return c(t)==="[object WeakMap]"}D.working=typeof WeakMap!=="undefined"&&D(new WeakMap);function R(t){if(typeof WeakMap==="undefined"){return false}return D.working?D(t):t instanceof WeakMap}t.isWeakMap=R;function O(t){return c(t)==="[object WeakSet]"}O.working=typeof WeakSet!=="undefined"&&O(new WeakSet);function L(t){return O(t)}t.isWeakSet=L;function _(t){return c(t)==="[object ArrayBuffer]"}_.working=typeof ArrayBuffer!=="undefined"&&_(new ArrayBuffer);function F(t){if(typeof ArrayBuffer==="undefined"){return false}return _.working?_(t):t instanceof ArrayBuffer}t.isArrayBuffer=F;function z(t){return c(t)==="[object DataView]"}z.working=typeof ArrayBuffer!=="undefined"&&typeof DataView!=="undefined"&&z(new DataView(new ArrayBuffer(1),0,1));function j(t){if(typeof DataView==="undefined"){return false}return z.working?z(t):t instanceof DataView}t.isDataView=j;var P=typeof SharedArrayBuffer!=="undefined"?SharedArrayBuffer:undefined;function B(t){return c(t)==="[object SharedArrayBuffer]"}function W(t){if(typeof P==="undefined"){return false}if(typeof B.working==="undefined"){B.working=B(new P)}return B.working?B(t):t instanceof P}t.isSharedArrayBuffer=W;function G(t){return c(t)==="[object AsyncFunction]"}t.isAsyncFunction=G;function V(t){return c(t)==="[object Map Iterator]"}t.isMapIterator=V;function U(t){return c(t)==="[object Set Iterator]"}t.isSetIterator=U;function Y(t){return c(t)==="[object Generator]"}t.isGeneratorObject=Y;function H(t){return c(t)==="[object WebAssembly.Module]"}t.isWebAssemblyCompiledModule=H;function Z(t){return p(t,u)}t.isNumberObject=Z;function Q(t){return p(t,l)}t.isStringObject=Q;function X(t){return p(t,f)}t.isBooleanObject=X;function q(t){return o&&p(t,h)}t.isBigIntObject=q;function J(t){return a&&p(t,d)}t.isSymbolObject=J;function K(t){return Z(t)||Q(t)||X(t)||q(t)||J(t)}t.isBoxedPrimitive=K;function tt(t){return typeof Uint8Array!=="undefined"&&(F(t)||W(t))}t.isAnyArrayBuffer=tt;["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(e){Object.defineProperty(t,e,{enumerable:false,value:function(){throw new Error(e+" is not supported in userland")}})}))})(j6);return j6}var R7;var O7;function L7(){if(O7)return R7;O7=1;R7=function t(e){return e instanceof Go};return R7}var _7={exports:{}};var F7={exports:{}};var z7;function j7(){if(z7)return F7.exports;z7=1;if(typeof Object.create==="function"){F7.exports=function t(e,n){if(n){e.super_=n;e.prototype=Object.create(n.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}}}else{F7.exports=function t(e,n){if(n){e.super_=n;var s=function(){};s.prototype=n.prototype;e.prototype=new s;e.prototype.constructor=e}}}return F7.exports}var P7;function B7(){if(P7)return _7.exports;P7=1;try{var t=G7();if(typeof t.inherits!=="function")throw"";_7.exports=t.inherits}catch(t){_7.exports=j7()}return _7.exports}var W7;function G7(){if(W7)return z6;W7=1;(function(t){var e=Object.getOwnPropertyDescriptors||function t(e){var n=Object.keys(e);var s={};for(var r=0;r<n.length;r++){s[n[r]]=Object.getOwnPropertyDescriptor(e,n[r])}return s};var n=/%[sdj%]/g;t.format=function(t){if(!N(t)){var e=[];for(var s=0;s<arguments.length;s++){e.push(o(arguments[s]))}return e.join(" ")}var s=1;var r=arguments;var i=r.length;var a=String(t).replace(n,(function(t){if(t==="%%")return"%";if(s>=i)return t;switch(t){case"%s":return String(r[s++]);case"%d":return Number(r[s++]);case"%j":try{return JSON.stringify(r[s++])}catch(t){return"[Circular]"}default:return t}}));for(var c=r[s];s<i;c=r[++s]){if(g(c)||!S(c)){a+=" "+c}else{a+=" "+o(c)}}return a};t.deprecate=function(e,n){if(typeof v!=="undefined"&&v.noDeprecation===true){return e}if(typeof v==="undefined"){return function(){return t.deprecate(e,n).apply(this,arguments)}}var s=false;function r(){if(!s){if(v.throwDeprecation){throw new Error(n)}else if(v.traceDeprecation){console.trace(n)}else{console.error(n)}s=true}return e.apply(this,arguments)}return r};var s={};var r=/^$/;if(v.env.NODE_DEBUG){var i=v.env.NODE_DEBUG;i=i.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase();r=new RegExp("^"+i+"$","i")}t.debuglog=function(e){e=e.toUpperCase();if(!s[e]){if(r.test(e)){var n=v.pid;s[e]=function(){var s=t.format.apply(t,arguments);console.error("%s %d: %s",e,n,s)}}else{s[e]=function(){}}}return s[e]};function o(e,n){var s={seen:[],stylize:c};if(arguments.length>=3)s.depth=arguments[2];if(arguments.length>=4)s.colors=arguments[3];if(y(n)){s.showHidden=n}else if(n){t._extend(s,n)}if(C(s.showHidden))s.showHidden=false;if(C(s.depth))s.depth=2;if(C(s.colors))s.colors=false;if(C(s.customInspect))s.customInspect=true;if(s.colors)s.stylize=a;return l(s,e,s.depth)}t.inspect=o;o.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};o.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function a(t,e){var n=o.styles[e];if(n){return"["+o.colors[n][0]+"m"+t+"["+o.colors[n][1]+"m"}else{return t}}function c(t,e){return t}function u(t){var e={};t.forEach((function(t,n){e[t]=true}));return e}function l(e,n,s){if(e.customInspect&&n&&E(n.inspect)&&n.inspect!==t.inspect&&!(n.constructor&&n.constructor.prototype===n)){var r=n.inspect(s,e);if(!N(r)){r=l(e,r,s)}return r}var i=f(e,n);if(i){return i}var o=Object.keys(n);var a=u(o);if(e.showHidden){o=Object.getOwnPropertyNames(n)}if(M(n)&&(o.indexOf("message")>=0||o.indexOf("description")>=0)){return h(n)}if(o.length===0){if(E(n)){var c=n.name?": "+n.name:"";return e.stylize("[Function"+c+"]","special")}if($(n)){return e.stylize(RegExp.prototype.toString.call(n),"regexp")}if(I(n)){return e.stylize(Date.prototype.toString.call(n),"date")}if(M(n)){return h(n)}}var y="",g=false,w=["{","}"];if(b(n)){g=true;w=["[","]"]}if(E(n)){var v=n.name?": "+n.name:"";y=" [Function"+v+"]"}if($(n)){y=" "+RegExp.prototype.toString.call(n)}if(I(n)){y=" "+Date.prototype.toUTCString.call(n)}if(M(n)){y=" "+h(n)}if(o.length===0&&(!g||n.length==0)){return w[0]+y+w[1]}if(s<0){if($(n)){return e.stylize(RegExp.prototype.toString.call(n),"regexp")}else{return e.stylize("[Object]","special")}}e.seen.push(n);var x;if(g){x=d(e,n,s,a,o)}else{x=o.map((function(t){return p(e,n,s,a,t,g)}))}e.seen.pop();return m(x,y,w)}function f(t,e){if(C(e))return t.stylize("undefined","undefined");if(N(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}if(x(e))return t.stylize(""+e,"number");if(y(e))return t.stylize(""+e,"boolean");if(g(e))return t.stylize("null","null")}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function d(t,e,n,s,r){var i=[];for(var o=0,a=e.length;o<a;++o){if(L(e,String(o))){i.push(p(t,e,n,s,String(o),true))}else{i.push("")}}r.forEach((function(r){if(!r.match(/^\d+$/)){i.push(p(t,e,n,s,r,true))}}));return i}function p(t,e,n,s,r,i){var o,a,c;c=Object.getOwnPropertyDescriptor(e,r)||{value:e[r]};if(c.get){if(c.set){a=t.stylize("[Getter/Setter]","special")}else{a=t.stylize("[Getter]","special")}}else{if(c.set){a=t.stylize("[Setter]","special")}}if(!L(s,r)){o="["+r+"]"}if(!a){if(t.seen.indexOf(c.value)<0){if(g(n)){a=l(t,c.value,null)}else{a=l(t,c.value,n-1)}if(a.indexOf("\n")>-1){if(i){a=a.split("\n").map((function(t){return" "+t})).join("\n").slice(2)}else{a="\n"+a.split("\n").map((function(t){return" "+t})).join("\n")}}}else{a=t.stylize("[Circular]","special")}}if(C(o)){if(i&&r.match(/^\d+$/)){return a}o=JSON.stringify(""+r);if(o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)){o=o.slice(1,-1);o=t.stylize(o,"name")}else{o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'");o=t.stylize(o,"string")}}return o+": "+a}function m(t,e,n){var s=t.reduce((function(t,e){if(e.indexOf("\n")>=0);return t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(s>60){return n[0]+(e===""?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1]}return n[0]+e+" "+t.join(", ")+" "+n[1]}t.types=D7();function b(t){return Array.isArray(t)}t.isArray=b;function y(t){return typeof t==="boolean"}t.isBoolean=y;function g(t){return t===null}t.isNull=g;function w(t){return t==null}t.isNullOrUndefined=w;function x(t){return typeof t==="number"}t.isNumber=x;function N(t){return typeof t==="string"}t.isString=N;function k(t){return typeof t==="symbol"}t.isSymbol=k;function C(t){return t===void 0}t.isUndefined=C;function $(t){return S(t)&&A(t)==="[object RegExp]"}t.isRegExp=$;t.types.isRegExp=$;function S(t){return typeof t==="object"&&t!==null}t.isObject=S;function I(t){return S(t)&&A(t)==="[object Date]"}t.isDate=I;t.types.isDate=I;function M(t){return S(t)&&(A(t)==="[object Error]"||t instanceof Error)}t.isError=M;t.types.isNativeError=M;function E(t){return typeof t==="function"}t.isFunction=E;function T(t){return t===null||typeof t==="boolean"||typeof t==="number"||typeof t==="string"||typeof t==="symbol"||typeof t==="undefined"}t.isPrimitive=T;t.isBuffer=L7();function A(t){return Object.prototype.toString.call(t)}function D(t){return t<10?"0"+t.toString(10):t.toString(10)}var R=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function O(){var t=new Date;var e=[D(t.getHours()),D(t.getMinutes()),D(t.getSeconds())].join(":");return[t.getDate(),R[t.getMonth()],e].join(" ")}t.log=function(){console.log("%s - %s",O(),t.format.apply(t,arguments))};t.inherits=B7();t._extend=function(t,e){if(!e||!S(e))return t;var n=Object.keys(e);var s=n.length;while(s--){t[n[s]]=e[n[s]]}return t};function L(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var _=typeof Symbol!=="undefined"?Symbol("util.promisify.custom"):undefined;t.promisify=function t(n){if(typeof n!=="function")throw new TypeError('The "original" argument must be of type Function');if(_&&n[_]){var s=n[_];if(typeof s!=="function"){throw new TypeError('The "util.promisify.custom" argument must be of type Function')}Object.defineProperty(s,_,{value:s,enumerable:false,writable:false,configurable:true});return s}function s(){var t,e;var s=new Promise((function(n,s){t=n;e=s}));var r=[];for(var i=0;i<arguments.length;i++){r.push(arguments[i])}r.push((function(n,s){if(n){e(n)}else{t(s)}}));try{n.apply(this,r)}catch(t){e(t)}return s}Object.setPrototypeOf(s,Object.getPrototypeOf(n));if(_)Object.defineProperty(s,_,{value:s,enumerable:false,writable:false,configurable:true});return Object.defineProperties(s,e(n))};t.promisify.custom=_;function F(t,e){if(!t){var n=new Error("Promise was rejected with a falsy value");n.reason=t;t=n}return e(t)}function z(t){if(typeof t!=="function"){throw new TypeError('The "original" argument must be of type Function')}function n(){var e=[];for(var n=0;n<arguments.length;n++){e.push(arguments[n])}var s=e.pop();if(typeof s!=="function"){throw new TypeError("The last argument must be of type Function")}var r=this;var i=function(){return s.apply(r,arguments)};t.apply(this,e).then((function(t){v.nextTick(i.bind(null,null,t))}),(function(t){v.nextTick(F.bind(null,t,i))}))}Object.setPrototypeOf(n,Object.getPrototypeOf(t));Object.defineProperties(n,e(t));return n}t.callbackify=z})(z6);return z6}var V7;function U7(){}U7.prototype=Object.create(null);function Y7(){Y7.init.call(this)}Y7.EventEmitter=Y7;Y7.usingDomains=false;Y7.prototype.domain=undefined;Y7.prototype._events=undefined;Y7.prototype._maxListeners=undefined;Y7.defaultMaxListeners=10;Y7.init=function(){this.domain=null;if(Y7.usingDomains){if(V7.active&&!(this instanceof V7.Domain)){this.domain=V7.active}}if(!this._events||this._events===Object.getPrototypeOf(this)._events){this._events=new U7;this._eventsCount=0}this._maxListeners=this._maxListeners||undefined};Y7.prototype.setMaxListeners=function t(e){if(typeof e!=="number"||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');this._maxListeners=e;return this};function H7(t){if(t._maxListeners===undefined)return Y7.defaultMaxListeners;return t._maxListeners}Y7.prototype.getMaxListeners=function t(){return H7(this)};function Z7(t,e,n){if(e)t.call(n);else{var s=t.length;var r=rtt(t,s);for(var i=0;i<s;++i)r[i].call(n)}}function Q7(t,e,n,s){if(e)t.call(n,s);else{var r=t.length;var i=rtt(t,r);for(var o=0;o<r;++o)i[o].call(n,s)}}function X7(t,e,n,s,r){if(e)t.call(n,s,r);else{var i=t.length;var o=rtt(t,i);for(var a=0;a<i;++a)o[a].call(n,s,r)}}function q7(t,e,n,s,r,i){if(e)t.call(n,s,r,i);else{var o=t.length;var a=rtt(t,o);for(var c=0;c<o;++c)a[c].call(n,s,r,i)}}function J7(t,e,n,s){if(e)t.apply(n,s);else{var r=t.length;var i=rtt(t,r);for(var o=0;o<r;++o)i[o].apply(n,s)}}Y7.prototype.emit=function t(e){var n,s,r,i,o,a,c;var u=e==="error";a=this._events;if(a)u=u&&a.error==null;else if(!u)return false;c=this.domain;if(u){n=arguments[1];if(c){if(!n)n=new Error('Uncaught, unspecified "error" event');n.domainEmitter=this;n.domain=c;n.domainThrown=false;c.emit("error",n)}else if(n instanceof Error){throw n}else{var l=new Error('Uncaught, unspecified "error" event. ('+n+")");l.context=n;throw l}return false}s=a[e];if(!s)return false;var f=typeof s==="function";r=arguments.length;switch(r){case 1:Z7(s,f,this);break;case 2:Q7(s,f,this,arguments[1]);break;case 3:X7(s,f,this,arguments[1],arguments[2]);break;case 4:q7(s,f,this,arguments[1],arguments[2],arguments[3]);break;default:i=new Array(r-1);for(o=1;o<r;o++)i[o-1]=arguments[o];J7(s,f,this,i)}return true};function K7(t,e,n,s){var r;var i;var o;if(typeof n!=="function")throw new TypeError('"listener" argument must be a function');i=t._events;if(!i){i=t._events=new U7;t._eventsCount=0}else{if(i.newListener){t.emit("newListener",e,n.listener?n.listener:n);i=t._events}o=i[e]}if(!o){o=i[e]=n;++t._eventsCount}else{if(typeof o==="function"){o=i[e]=s?[n,o]:[o,n]}else{if(s){o.unshift(n)}else{o.push(n)}}if(!o.warned){r=H7(t);if(r&&r>0&&o.length>r){o.warned=true;var a=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+e+" listeners added. "+"Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning";a.emitter=t;a.type=e;a.count=o.length;ttt(a)}}}return t}function ttt(t){typeof console.warn==="function"?console.warn(t):console.log(t)}Y7.prototype.addListener=function t(e,n){return K7(this,e,n,false)};Y7.prototype.on=Y7.prototype.addListener;Y7.prototype.prependListener=function t(e,n){return K7(this,e,n,true)};function ett(t,e,n){var s=false;function r(){t.removeListener(e,r);if(!s){s=true;n.apply(t,arguments)}}r.listener=n;return r}Y7.prototype.once=function t(e,n){if(typeof n!=="function")throw new TypeError('"listener" argument must be a function');this.on(e,ett(this,e,n));return this};Y7.prototype.prependOnceListener=function t(e,n){if(typeof n!=="function")throw new TypeError('"listener" argument must be a function');this.prependListener(e,ett(this,e,n));return this};Y7.prototype.removeListener=function t(e,n){var s,r,i,o,a;if(typeof n!=="function")throw new TypeError('"listener" argument must be a function');r=this._events;if(!r)return this;s=r[e];if(!s)return this;if(s===n||s.listener&&s.listener===n){if(--this._eventsCount===0)this._events=new U7;else{delete r[e];if(r.removeListener)this.emit("removeListener",e,s.listener||n)}}else if(typeof s!=="function"){i=-1;for(o=s.length;o-- >0;){if(s[o]===n||s[o].listener&&s[o].listener===n){a=s[o].listener;i=o;break}}if(i<0)return this;if(s.length===1){s[0]=undefined;if(--this._eventsCount===0){this._events=new U7;return this}else{delete r[e]}}else{stt(s,i)}if(r.removeListener)this.emit("removeListener",e,a||n)}return this};Y7.prototype.removeAllListeners=function t(e){var n,s;s=this._events;if(!s)return this;if(!s.removeListener){if(arguments.length===0){this._events=new U7;this._eventsCount=0}else if(s[e]){if(--this._eventsCount===0)this._events=new U7;else delete s[e]}return this}if(arguments.length===0){var r=Object.keys(s);for(var i=0,o;i<r.length;++i){o=r[i];if(o==="removeListener")continue;this.removeAllListeners(o)}this.removeAllListeners("removeListener");this._events=new U7;this._eventsCount=0;return this}n=s[e];if(typeof n==="function"){this.removeListener(e,n)}else if(n){do{this.removeListener(e,n[n.length-1])}while(n[0])}return this};Y7.prototype.listeners=function t(e){var n;var s;var r=this._events;if(!r)s=[];else{n=r[e];if(!n)s=[];else if(typeof n==="function")s=[n.listener||n];else s=itt(n)}return s};Y7.listenerCount=function(t,e){if(typeof t.listenerCount==="function"){return t.listenerCount(e)}else{return ntt.call(t,e)}};Y7.prototype.listenerCount=ntt;function ntt(t){var e=this._events;if(e){var n=e[t];if(typeof n==="function"){return 1}else if(n){return n.length}}return 0}Y7.prototype.eventNames=function t(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};function stt(t,e){for(var n=e,s=n+1,r=t.length;s<r;n+=1,s+=1)t[n]=t[s];t.pop()}function rtt(t,e){var n=new Array(e);while(e--)n[e]=t[e];return n}function itt(t){var e=new Array(t.length);for(var n=0;n<e.length;++n){e[n]=t[n].listener||t[n]}return e}var ott=G7();function att(){this.head=null;this.tail=null;this.length=0}att.prototype.push=function(t){var e={data:t,next:null};if(this.length>0)this.tail.next=e;else this.head=e;this.tail=e;++this.length};att.prototype.unshift=function(t){var e={data:t,next:this.head};if(this.length===0)this.tail=e;this.head=e;++this.length};att.prototype.shift=function(){if(this.length===0)return;var t=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;--this.length;return t};att.prototype.clear=function(){this.head=this.tail=null;this.length=0};att.prototype.join=function(t){if(this.length===0)return"";var e=this.head;var n=""+e.data;while(e=e.next){n+=t+e.data}return n};att.prototype.concat=function(t){if(this.length===0)return Go.alloc(0);if(this.length===1)return this.head.data;var e=Go.allocUnsafe(t>>>0);var n=this.head;var s=0;while(n){n.data.copy(e,s);s+=n.data.length;n=n.next}return e};var ctt={};var utt={exports:{}};var ltt=f(Pa);
|
|
18190
18190
|
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var ftt;function htt(){if(ftt)return utt.exports;ftt=1;(function(t,e){var n=ltt;var s=n.Buffer;function r(t,e){for(var n in t){e[n]=t[n]}}if(s.from&&s.alloc&&s.allocUnsafe&&s.allocUnsafeSlow){t.exports=n}else{r(n,e);e.Buffer=i}function i(t,e,n){return s(t,e,n)}i.prototype=Object.create(s.prototype);r(s,i);i.from=function(t,e,n){if(typeof t==="number"){throw new TypeError("Argument must not be a number")}return s(t,e,n)};i.alloc=function(t,e,n){if(typeof t!=="number"){throw new TypeError("Argument must be a number")}var r=s(t);if(e!==undefined){if(typeof n==="string"){r.fill(e,n)}else{r.fill(e)}}else{r.fill(0)}return r};i.allocUnsafe=function(t){if(typeof t!=="number"){throw new TypeError("Argument must be a number")}return s(t)};i.allocUnsafeSlow=function(t){if(typeof t!=="number"){throw new TypeError("Argument must be a number")}return n.SlowBuffer(t)}})(utt,utt.exports);return utt.exports}var dtt;function ptt(){if(dtt)return ctt;dtt=1;var t=htt().Buffer;var e=t.isEncoding||function(t){t=""+t;switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return true;default:return false}};function n(t){if(!t)return"utf8";var e;while(true){switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase();e=true}}}function s(s){var r=n(s);if(typeof r!=="string"&&(t.isEncoding===e||!e(s)))throw new Error("Unknown encoding: "+s);return r||s}ctt.StringDecoder=r;function r(e){this.encoding=s(e);var n;switch(this.encoding){case"utf16le":this.text=f;this.end=h;n=4;break;case"utf8":this.fillLast=c;n=4;break;case"base64":this.text=d;this.end=p;n=3;break;default:this.write=m;this.end=b;return}this.lastNeed=0;this.lastTotal=0;this.lastChar=t.allocUnsafe(n)}r.prototype.write=function(t){if(t.length===0)return"";var e;var n;if(this.lastNeed){e=this.fillLast(t);if(e===undefined)return"";n=this.lastNeed;this.lastNeed=0}else{n=0}if(n<t.length)return e?e+this.text(t,n):this.text(t,n);return e||""};r.prototype.end=l;r.prototype.text=u;r.prototype.fillLast=function(t){if(this.lastNeed<=t.length){t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed);return this.lastChar.toString(this.encoding,0,this.lastTotal)}t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length);this.lastNeed-=t.length};function i(t){if(t<=127)return 0;else if(t>>5===6)return 2;else if(t>>4===14)return 3;else if(t>>3===30)return 4;return t>>6===2?-1:-2}function o(t,e,n){var s=e.length-1;if(s<n)return 0;var r=i(e[s]);if(r>=0){if(r>0)t.lastNeed=r-1;return r}if(--s<n||r===-2)return 0;r=i(e[s]);if(r>=0){if(r>0)t.lastNeed=r-2;return r}if(--s<n||r===-2)return 0;r=i(e[s]);if(r>=0){if(r>0){if(r===2)r=0;else t.lastNeed=r-3}return r}return 0}function a(t,e,n){if((e[0]&192)!==128){t.lastNeed=0;return"�"}if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128){t.lastNeed=1;return"�"}if(t.lastNeed>2&&e.length>2){if((e[2]&192)!==128){t.lastNeed=2;return"�"}}}}function c(t){var e=this.lastTotal-this.lastNeed;var n=a(this,t);if(n!==undefined)return n;if(this.lastNeed<=t.length){t.copy(this.lastChar,e,0,this.lastNeed);return this.lastChar.toString(this.encoding,0,this.lastTotal)}t.copy(this.lastChar,e,0,t.length);this.lastNeed-=t.length}function u(t,e){var n=o(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=n;var s=t.length-(n-this.lastNeed);t.copy(this.lastChar,0,s);return t.toString("utf8",e,s)}function l(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed)return e+"�";return e}function f(t,e){if((t.length-e)%2===0){var n=t.toString("utf16le",e);if(n){var s=n.charCodeAt(n.length-1);if(s>=55296&&s<=56319){this.lastNeed=2;this.lastTotal=4;this.lastChar[0]=t[t.length-2];this.lastChar[1]=t[t.length-1];return n.slice(0,-1)}}return n}this.lastNeed=1;this.lastTotal=2;this.lastChar[0]=t[t.length-1];return t.toString("utf16le",e,t.length-1)}function h(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function d(t,e){var n=(t.length-e)%3;if(n===0)return t.toString("base64",e);this.lastNeed=3-n;this.lastTotal=3;if(n===1){this.lastChar[0]=t[t.length-1]}else{this.lastChar[0]=t[t.length-2];this.lastChar[1]=t[t.length-1]}return t.toString("base64",e,t.length-n)}function p(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed)return e+this.lastChar.toString("base64",0,3-this.lastNeed);return e}function m(t){return t.toString(this.encoding)}function b(t){return t&&t.length?this.write(t):""}return ctt}var mtt=ptt();vtt.ReadableState=wtt;var btt=ott.debuglog("stream");ott.inherits(vtt,Y7);function ytt(t,e,n){if(typeof t.prependListener==="function"){return t.prependListener(e,n)}else{if(!t._events||!t._events[e])t.on(e,n);else if(Array.isArray(t._events[e]))t._events[e].unshift(n);else t._events[e]=[n,t._events[e]]}}function gtt(t,e){return t.listeners(e).length}function wtt(t,e){t=t||{};this.objectMode=!!t.objectMode;if(e instanceof met)this.objectMode=this.objectMode||!!t.readableObjectMode;var n=t.highWaterMark;var s=this.objectMode?16:16*1024;this.highWaterMark=n||n===0?n:s;this.highWaterMark=~~this.highWaterMark;this.buffer=new att;this.length=0;this.pipes=null;this.pipesCount=0;this.flowing=null;this.ended=false;this.endEmitted=false;this.reading=false;this.sync=true;this.needReadable=false;this.emittedReadable=false;this.readableListening=false;this.resumeScheduled=false;this.defaultEncoding=t.defaultEncoding||"utf8";this.ranOut=false;this.awaitDrain=0;this.readingMore=false;this.decoder=null;this.encoding=null;if(t.encoding){this.decoder=new mtt.StringDecoder(t.encoding);this.encoding=t.encoding}}function vtt(t){if(!(this instanceof vtt))return new vtt(t);this._readableState=new wtt(t,this);this.readable=true;if(t&&typeof t.read==="function")this._read=t.read;Y7.call(this)}vtt.prototype.push=function(t,e){var n=this._readableState;if(!n.objectMode&&typeof t==="string"){e=e||n.defaultEncoding;if(e!==n.encoding){t=Go.from(t,e);e=""}}return xtt(this,n,t,e,false)};vtt.prototype.unshift=function(t){var e=this._readableState;return xtt(this,e,t,"",true)};vtt.prototype.isPaused=function(){return this._readableState.flowing===false};function xtt(t,e,n,s,r){var i=Stt(e,n);if(i){t.emit("error",i)}else if(n===null){e.reading=false;Itt(t,e)}else if(e.objectMode||n&&n.length>0){if(e.ended&&!r){var o=new Error("stream.push() after EOF");t.emit("error",o)}else if(e.endEmitted&&r){var a=new Error("stream.unshift() after end event");t.emit("error",a)}else{var c;if(e.decoder&&!r&&!s){n=e.decoder.write(n);c=!e.objectMode&&n.length===0}if(!r)e.reading=false;if(!c){if(e.flowing&&e.length===0&&!e.sync){t.emit("data",n);t.read(0)}else{e.length+=e.objectMode?1:n.length;if(r)e.buffer.unshift(n);else e.buffer.push(n);if(e.needReadable)Mtt(t)}}Ttt(t,e)}}else if(!r){e.reading=false}return Ntt(e)}function Ntt(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||t.length===0)}vtt.prototype.setEncoding=function(t){this._readableState.decoder=new mtt.StringDecoder(t);this._readableState.encoding=t;return this};var ktt=8388608;function Ctt(t){if(t>=ktt){t=ktt}else{t--;t|=t>>>1;t|=t>>>2;t|=t>>>4;t|=t>>>8;t|=t>>>16;t++}return t}function $tt(t,e){if(t<=0||e.length===0&&e.ended)return 0;if(e.objectMode)return 1;if(t!==t){if(e.flowing&&e.length)return e.buffer.head.data.length;else return e.length}if(t>e.highWaterMark)e.highWaterMark=Ctt(t);if(t<=e.length)return t;if(!e.ended){e.needReadable=true;return 0}return e.length}vtt.prototype.read=function(t){btt("read",t);t=parseInt(t,10);var e=this._readableState;var n=t;if(t!==0)e.emittedReadable=false;if(t===0&&e.needReadable&&(e.length>=e.highWaterMark||e.ended)){btt("read: emitReadable",e.length,e.ended);if(e.length===0&&e.ended)Btt(this);else Mtt(this);return null}t=$tt(t,e);if(t===0&&e.ended){if(e.length===0)Btt(this);return null}var s=e.needReadable;btt("need readable",s);if(e.length===0||e.length-t<e.highWaterMark){s=true;btt("length less than watermark",s)}if(e.ended||e.reading){s=false;btt("reading or ended",s)}else if(s){btt("do read");e.reading=true;e.sync=true;if(e.length===0)e.needReadable=true;this._read(e.highWaterMark);e.sync=false;if(!e.reading)t=$tt(n,e)}var r;if(t>0)r=Ftt(t,e);else r=null;if(r===null){e.needReadable=true;t=0}else{e.length-=t}if(e.length===0){if(!e.ended)e.needReadable=true;if(n!==t&&e.ended)Btt(this)}if(r!==null)this.emit("data",r);return r};function Stt(t,e){var n=null;if(!Go.isBuffer(e)&&typeof e!=="string"&&e!==null&&e!==undefined&&!t.objectMode){n=new TypeError("Invalid non-string/buffer chunk")}return n}function Itt(t,e){if(e.ended)return;if(e.decoder){var n=e.decoder.end();if(n&&n.length){e.buffer.push(n);e.length+=e.objectMode?1:n.length}}e.ended=true;Mtt(t)}function Mtt(t){var e=t._readableState;e.needReadable=false;if(!e.emittedReadable){btt("emitReadable",e.flowing);e.emittedReadable=true;if(e.sync)$(Ett,t);else Ett(t)}}function Ett(t){btt("emit readable");t.emit("readable");_tt(t)}function Ttt(t,e){if(!e.readingMore){e.readingMore=true;$(Att,t,e)}}function Att(t,e){var n=e.length;while(!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark){btt("maybeReadMore read 0");t.read(0);if(n===e.length)break;else n=e.length}e.readingMore=false}vtt.prototype._read=function(t){this.emit("error",new Error("not implemented"))};vtt.prototype.pipe=function(t,e){var n=this;var s=this._readableState;switch(s.pipesCount){case 0:s.pipes=t;break;case 1:s.pipes=[s.pipes,t];break;default:s.pipes.push(t);break}s.pipesCount+=1;btt("pipe count=%d opts=%j",s.pipesCount,e);var r=!e||e.end!==false;var i=r?a:l;if(s.endEmitted)$(i);else n.once("end",i);t.on("unpipe",o);function o(t){btt("onunpipe");if(t===n){l()}}function a(){btt("onend");t.end()}var c=Dtt(n);t.on("drain",c);var u=false;function l(){btt("cleanup");t.removeListener("close",p);t.removeListener("finish",m);t.removeListener("drain",c);t.removeListener("error",d);t.removeListener("unpipe",o);n.removeListener("end",a);n.removeListener("end",l);n.removeListener("data",h);u=true;if(s.awaitDrain&&(!t._writableState||t._writableState.needDrain))c()}var f=false;n.on("data",h);function h(e){btt("ondata");f=false;var r=t.write(e);if(false===r&&!f){if((s.pipesCount===1&&s.pipes===t||s.pipesCount>1&&Vtt(s.pipes,t)!==-1)&&!u){btt("false write response, pause",n._readableState.awaitDrain);n._readableState.awaitDrain++;f=true}n.pause()}}function d(e){btt("onerror",e);b();t.removeListener("error",d);if(gtt(t,"error")===0)t.emit("error",e)}ytt(t,"error",d);function p(){t.removeListener("finish",m);b()}t.once("close",p);function m(){btt("onfinish");t.removeListener("close",p);b()}t.once("finish",m);function b(){btt("unpipe");n.unpipe(t)}t.emit("pipe",n);if(!s.flowing){btt("pipe resume");n.resume()}return t};function Dtt(t){return function(){var e=t._readableState;btt("pipeOnDrain",e.awaitDrain);if(e.awaitDrain)e.awaitDrain--;if(e.awaitDrain===0&&t.listeners("data").length){e.flowing=true;_tt(t)}}}vtt.prototype.unpipe=function(t){var e=this._readableState;if(e.pipesCount===0)return this;if(e.pipesCount===1){if(t&&t!==e.pipes)return this;if(!t)t=e.pipes;e.pipes=null;e.pipesCount=0;e.flowing=false;if(t)t.emit("unpipe",this);return this}if(!t){var n=e.pipes;var s=e.pipesCount;e.pipes=null;e.pipesCount=0;e.flowing=false;for(var r=0;r<s;r++){n[r].emit("unpipe",this)}return this}var i=Vtt(e.pipes,t);if(i===-1)return this;e.pipes.splice(i,1);e.pipesCount-=1;if(e.pipesCount===1)e.pipes=e.pipes[0];t.emit("unpipe",this);return this};vtt.prototype.on=function(t,e){var n=Y7.prototype.on.call(this,t,e);if(t==="data"){if(this._readableState.flowing!==false)this.resume()}else if(t==="readable"){var s=this._readableState;if(!s.endEmitted&&!s.readableListening){s.readableListening=s.needReadable=true;s.emittedReadable=false;if(!s.reading){$(Rtt,this)}else if(s.length){Mtt(this)}}}return n};vtt.prototype.addListener=vtt.prototype.on;function Rtt(t){btt("readable nexttick read 0");t.read(0)}vtt.prototype.resume=function(){var t=this._readableState;if(!t.flowing){btt("resume");t.flowing=true;Ott(this,t)}return this};function Ott(t,e){if(!e.resumeScheduled){e.resumeScheduled=true;$(Ltt,t,e)}}function Ltt(t,e){if(!e.reading){btt("resume read 0");t.read(0)}e.resumeScheduled=false;e.awaitDrain=0;t.emit("resume");_tt(t);if(e.flowing&&!e.reading)t.read(0)}vtt.prototype.pause=function(){btt("call pause flowing=%j",this._readableState.flowing);if(false!==this._readableState.flowing){btt("pause");this._readableState.flowing=false;this.emit("pause")}return this};function _tt(t){var e=t._readableState;btt("flow",e.flowing);while(e.flowing&&t.read()!==null){}}vtt.prototype.wrap=function(t){var e=this._readableState;var n=false;var s=this;t.on("end",(function(){btt("wrapped end");if(e.decoder&&!e.ended){var t=e.decoder.end();if(t&&t.length)s.push(t)}s.push(null)}));t.on("data",(function(r){btt("wrapped data");if(e.decoder)r=e.decoder.write(r);if(e.objectMode&&(r===null||r===undefined))return;else if(!e.objectMode&&(!r||!r.length))return;var i=s.push(r);if(!i){n=true;t.pause()}}));for(var r in t){if(this[r]===undefined&&typeof t[r]==="function"){this[r]=function(e){return function(){return t[e].apply(t,arguments)}}(r)}}var i=["error","close","destroy","pause","resume"];Gtt(i,(function(e){t.on(e,s.emit.bind(s,e))}));s._read=function(e){btt("wrapped _read",e);if(n){n=false;t.resume()}};return s};vtt._fromList=Ftt;function Ftt(t,e){if(e.length===0)return null;var n;if(e.objectMode)n=e.buffer.shift();else if(!t||t>=e.length){if(e.decoder)n=e.buffer.join("");else if(e.buffer.length===1)n=e.buffer.head.data;else n=e.buffer.concat(e.length);e.buffer.clear()}else{n=ztt(t,e.buffer,e.decoder)}return n}function ztt(t,e,n){var s;if(t<e.head.data.length){s=e.head.data.slice(0,t);e.head.data=e.head.data.slice(t)}else if(t===e.head.data.length){s=e.shift()}else{s=n?jtt(t,e):Ptt(t,e)}return s}function jtt(t,e){var n=e.head;var s=1;var r=n.data;t-=r.length;while(n=n.next){var i=n.data;var o=t>i.length?i.length:t;if(o===i.length)r+=i;else r+=i.slice(0,t);t-=o;if(t===0){if(o===i.length){++s;if(n.next)e.head=n.next;else e.head=e.tail=null}else{e.head=n;n.data=i.slice(o)}break}++s}e.length-=s;return r}function Ptt(t,e){var n=Go.allocUnsafe(t);var s=e.head;var r=1;s.data.copy(n);t-=s.data.length;while(s=s.next){var i=s.data;var o=t>i.length?i.length:t;i.copy(n,n.length-t,0,o);t-=o;if(t===0){if(o===i.length){++r;if(s.next)e.head=s.next;else e.head=e.tail=null}else{e.head=s;s.data=i.slice(o)}break}++r}e.length-=r;return n}function Btt(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');if(!e.endEmitted){e.ended=true;$(Wtt,e,t)}}function Wtt(t,e){if(!t.endEmitted&&t.length===0){t.endEmitted=true;e.readable=false;e.emit("end")}}function Gtt(t,e){for(var n=0,s=t.length;n<s;n++){e(t[n],n)}}function Vtt(t,e){for(var n=0,s=t.length;n<s;n++){if(t[n]===e)return n}return-1}Ztt.WritableState=Htt;ott.inherits(Ztt,Y7);function Utt(){}function Ytt(t,e,n){this.chunk=t;this.encoding=e;this.callback=n;this.next=null}function Htt(t,e){Object.defineProperty(this,"buffer",{get:ott.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.")});t=t||{};this.objectMode=!!t.objectMode;if(e instanceof met)this.objectMode=this.objectMode||!!t.writableObjectMode;var n=t.highWaterMark;var s=this.objectMode?16:16*1024;this.highWaterMark=n||n===0?n:s;this.highWaterMark=~~this.highWaterMark;this.needDrain=false;this.ending=false;this.ended=false;this.finished=false;var r=t.decodeStrings===false;this.decodeStrings=!r;this.defaultEncoding=t.defaultEncoding||"utf8";this.length=0;this.writing=false;this.corked=0;this.sync=true;this.bufferProcessing=false;this.onwrite=function(t){net(e,t)};this.writecb=null;this.writelen=0;this.bufferedRequest=null;this.lastBufferedRequest=null;this.pendingcb=0;this.prefinished=false;this.errorEmitted=false;this.bufferedRequestCount=0;this.corkedRequestsFree=new fet(this)}Htt.prototype.getBuffer=function t(){var e=this.bufferedRequest;var n=[];while(e){n.push(e);e=e.next}return n};function Ztt(t){if(!(this instanceof Ztt)&&!(this instanceof met))return new Ztt(t);this._writableState=new Htt(t,this);this.writable=true;if(t){if(typeof t.write==="function")this._write=t.write;if(typeof t.writev==="function")this._writev=t.writev}Y7.call(this)}Ztt.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function Qtt(t,e){var n=new Error("write after end");t.emit("error",n);$(e,n)}function Xtt(t,e,n,s){var r=true;var i=false;if(n===null){i=new TypeError("May not write null values to stream")}else if(!Go.isBuffer(n)&&typeof n!=="string"&&n!==undefined&&!e.objectMode){i=new TypeError("Invalid non-string/buffer chunk")}if(i){t.emit("error",i);$(s,i);r=false}return r}Ztt.prototype.write=function(t,e,n){var s=this._writableState;var r=false;if(typeof e==="function"){n=e;e=null}if(Go.isBuffer(t))e="buffer";else if(!e)e=s.defaultEncoding;if(typeof n!=="function")n=Utt;if(s.ended)Qtt(this,n);else if(Xtt(this,s,t,n)){s.pendingcb++;r=Jtt(this,s,t,e,n)}return r};Ztt.prototype.cork=function(){var t=this._writableState;t.corked++};Ztt.prototype.uncork=function(){var t=this._writableState;if(t.corked){t.corked--;if(!t.writing&&!t.corked&&!t.finished&&!t.bufferProcessing&&t.bufferedRequest)iet(this,t)}};Ztt.prototype.setDefaultEncoding=function t(e){if(typeof e==="string")e=e.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);this._writableState.defaultEncoding=e;return this};function qtt(t,e,n){if(!t.objectMode&&t.decodeStrings!==false&&typeof e==="string"){e=Go.from(e,n)}return e}function Jtt(t,e,n,s,r){n=qtt(e,n,s);if(Go.isBuffer(n))s="buffer";var i=e.objectMode?1:n.length;e.length+=i;var o=e.length<e.highWaterMark;if(!o)e.needDrain=true;if(e.writing||e.corked){var a=e.lastBufferedRequest;e.lastBufferedRequest=new Ytt(n,s,r);if(a){a.next=e.lastBufferedRequest}else{e.bufferedRequest=e.lastBufferedRequest}e.bufferedRequestCount+=1}else{Ktt(t,e,false,i,n,s,r)}return o}function Ktt(t,e,n,s,r,i,o){e.writelen=s;e.writecb=o;e.writing=true;e.sync=true;if(n)t._writev(r,e.onwrite);else t._write(r,i,e.onwrite);e.sync=false}function tet(t,e,n,s,r){--e.pendingcb;if(n)$(r,s);else r(s);t._writableState.errorEmitted=true;t.emit("error",s)}function eet(t){t.writing=false;t.writecb=null;t.length-=t.writelen;t.writelen=0}function net(t,e){var n=t._writableState;var s=n.sync;var r=n.writecb;eet(n);if(e)tet(t,n,s,e,r);else{var i=oet(n);if(!i&&!n.corked&&!n.bufferProcessing&&n.bufferedRequest){iet(t,n)}if(s){$(set,t,n,i,r)}else{set(t,n,i,r)}}}function set(t,e,n,s){if(!n)ret(t,e);e.pendingcb--;s();cet(t,e)}function ret(t,e){if(e.length===0&&e.needDrain){e.needDrain=false;t.emit("drain")}}function iet(t,e){e.bufferProcessing=true;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var s=e.bufferedRequestCount;var r=new Array(s);var i=e.corkedRequestsFree;i.entry=n;var o=0;while(n){r[o]=n;n=n.next;o+=1}Ktt(t,e,true,e.length,r,"",i.finish);e.pendingcb++;e.lastBufferedRequest=null;if(i.next){e.corkedRequestsFree=i.next;i.next=null}else{e.corkedRequestsFree=new fet(e)}}else{while(n){var a=n.chunk;var c=n.encoding;var u=n.callback;var l=e.objectMode?1:a.length;Ktt(t,e,false,l,a,c,u);n=n.next;if(e.writing){break}}if(n===null)e.lastBufferedRequest=null}e.bufferedRequestCount=0;e.bufferedRequest=n;e.bufferProcessing=false}Ztt.prototype._write=function(t,e,n){n(new Error("not implemented"))};Ztt.prototype._writev=null;Ztt.prototype.end=function(t,e,n){var s=this._writableState;if(typeof t==="function"){n=t;t=null;e=null}else if(typeof e==="function"){n=e;e=null}if(t!==null&&t!==undefined)this.write(t,e);if(s.corked){s.corked=1;this.uncork()}if(!s.ending&&!s.finished)uet(this,s,n)};function oet(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function aet(t,e){if(!e.prefinished){e.prefinished=true;t.emit("prefinish")}}function cet(t,e){var n=oet(e);if(n){if(e.pendingcb===0){aet(t,e);e.finished=true;t.emit("finish")}else{aet(t,e)}}return n}function uet(t,e,n){e.ending=true;cet(t,e);if(n){if(e.finished)$(n);else t.once("finish",n)}e.ended=true;t.writable=false}function fet(t){var e=this;this.next=null;this.entry=null;this.finish=function(n){var s=e.entry;e.entry=null;while(s){var r=s.callback;t.pendingcb--;r(n);s=s.next}if(t.corkedRequestsFree){t.corkedRequestsFree.next=e}else{t.corkedRequestsFree=e}}}ott.inherits(met,vtt);var het=Object.keys(Ztt.prototype);for(var det=0;det<het.length;det++){var pet=het[det];if(!met.prototype[pet])met.prototype[pet]=Ztt.prototype[pet]}function met(t){if(!(this instanceof met))return new met(t);vtt.call(this,t);Ztt.call(this,t);if(t&&t.readable===false)this.readable=false;if(t&&t.writable===false)this.writable=false;this.allowHalfOpen=true;if(t&&t.allowHalfOpen===false)this.allowHalfOpen=false;this.once("end",bet)}function bet(){if(this.allowHalfOpen||this._writableState.ended)return;$(yet,this)}function yet(t){t.end()}ott.inherits(vet,met);function get(t){this.afterTransform=function(e,n){return wet(t,e,n)};this.needTransform=false;this.transforming=false;this.writecb=null;this.writechunk=null;this.writeencoding=null}function wet(t,e,n){var s=t._transformState;s.transforming=false;var r=s.writecb;if(!r)return t.emit("error",new Error("no writecb in Transform class"));s.writechunk=null;s.writecb=null;if(n!==null&&n!==undefined)t.push(n);r(e);var i=t._readableState;i.reading=false;if(i.needReadable||i.length<i.highWaterMark){t._read(i.highWaterMark)}}function vet(t){if(!(this instanceof vet))return new vet(t);met.call(this,t);this._transformState=new get(this);var e=this;this._readableState.needReadable=true;this._readableState.sync=false;if(t){if(typeof t.transform==="function")this._transform=t.transform;if(typeof t.flush==="function")this._flush=t.flush}this.once("prefinish",(function(){if(typeof this._flush==="function")this._flush((function(t){xet(e,t)}));else xet(e)}))}vet.prototype.push=function(t,e){this._transformState.needTransform=false;return met.prototype.push.call(this,t,e)};vet.prototype._transform=function(t,e,n){throw new Error("Not implemented")};vet.prototype._write=function(t,e,n){var s=this._transformState;s.writecb=n;s.writechunk=t;s.writeencoding=e;if(!s.transforming){var r=this._readableState;if(s.needTransform||r.needReadable||r.length<r.highWaterMark)this._read(r.highWaterMark)}};vet.prototype._read=function(t){var e=this._transformState;if(e.writechunk!==null&&e.writecb&&!e.transforming){e.transforming=true;this._transform(e.writechunk,e.writeencoding,e.afterTransform)}else{e.needTransform=true}};function xet(t,e){if(e)return t.emit("error",e);var n=t._writableState;var s=t._transformState;if(n.length)throw new Error("Calling transform done when ws.length != 0");if(s.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}ott.inherits(Net,vet);function Net(t){if(!(this instanceof Net))return new Net(t);vet.call(this,t)}Net.prototype._transform=function(t,e,n){n(null,t)};ott.inherits(ket,Y7);ket.Readable=vtt;ket.Writable=Ztt;ket.Duplex=met;ket.Transform=vet;ket.PassThrough=Net;ket.Stream=ket;function ket(){Y7.call(this)}ket.prototype.pipe=function(t,e){var n=this;function s(e){if(t.writable){if(false===t.write(e)&&n.pause){n.pause()}}}n.on("data",s);function r(){if(n.readable&&n.resume){n.resume()}}t.on("drain",r);if(!t._isStdio&&(!e||e.end!==false)){n.on("end",o);n.on("close",a)}var i=false;function o(){if(i)return;i=true;t.end()}function a(){if(i)return;i=true;if(typeof t.destroy==="function")t.destroy()}function c(t){u();if(Y7.listenerCount(this,"error")===0){throw t}}n.on("error",c);t.on("error",c);function u(){n.removeListener("data",s);t.removeListener("drain",r);n.removeListener("end",o);n.removeListener("close",a);n.removeListener("error",c);t.removeListener("error",c);n.removeListener("end",u);n.removeListener("close",u);t.removeListener("close",u)}n.on("end",u);n.on("close",u);t.on("close",u);t.emit("pipe",n);return t};var Cet=Object.freeze({__proto__:null,Duplex:met,PassThrough:Net,Readable:vtt,Stream:ket,Transform:vet,Writable:Ztt,default:ket});var $et=f(Cet);var Iet={exports:{}};var Met={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};function Eet(){this.input=null;this.next_in=0;this.avail_in=0;this.total_in=0;this.output=null;this.next_out=0;this.avail_out=0;this.total_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}function Tet(t,e,n,s,r){if(e.subarray&&t.subarray){t.set(e.subarray(n,n+s),r);return}for(var i=0;i<s;i++){t[r+i]=e[n+i]}}var Aet=Uint8Array;var Det=Uint16Array;var Ret=Int32Array;var Oet=4;var Let=0;var _et=1;var Fet=2;function zet(t){var e=t.length;while(--e>=0){t[e]=0}}var jet=0;var Pet=1;var Bet=2;var Wet=3;var Get=258;var Vet=29;var Uet=256;var Yet=Uet+1+Vet;var Het=30;var Zet=19;var Qet=2*Yet+1;var Xet=15;var qet=16;var Jet=7;var Ket=256;var tnt=16;var ent=17;var nnt=18;var snt=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];var rnt=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];var int=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];var ont=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];var ant=512;var cnt=new Array((Yet+2)*2);zet(cnt);var unt=new Array(Het*2);zet(unt);var lnt=new Array(ant);zet(lnt);var fnt=new Array(Get-Wet+1);zet(fnt);var hnt=new Array(Vet);zet(hnt);var dnt=new Array(Het);zet(dnt);function pnt(t,e,n,s,r){this.static_tree=t;this.extra_bits=e;this.extra_base=n;this.elems=s;this.max_length=r;this.has_stree=t&&t.length}var mnt;var bnt;var ynt;function gnt(t,e){this.dyn_tree=t;this.max_code=0;this.stat_desc=e}function wnt(t){return t<256?lnt[t]:lnt[256+(t>>>7)]}function vnt(t,e){t.pending_buf[t.pending++]=e&255;t.pending_buf[t.pending++]=e>>>8&255}function xnt(t,e,n){if(t.bi_valid>qet-n){t.bi_buf|=e<<t.bi_valid&65535;vnt(t,t.bi_buf);t.bi_buf=e>>qet-t.bi_valid;t.bi_valid+=n-qet}else{t.bi_buf|=e<<t.bi_valid&65535;t.bi_valid+=n}}function Nnt(t,e,n){xnt(t,n[e*2],n[e*2+1])}function knt(t,e){var n=0;do{n|=t&1;t>>>=1;n<<=1}while(--e>0);return n>>>1}function Cnt(t){if(t.bi_valid===16){vnt(t,t.bi_buf);t.bi_buf=0;t.bi_valid=0}else if(t.bi_valid>=8){t.pending_buf[t.pending++]=t.bi_buf&255;t.bi_buf>>=8;t.bi_valid-=8}}function $nt(t,e){var n=e.dyn_tree;var s=e.max_code;var r=e.stat_desc.static_tree;var i=e.stat_desc.has_stree;var o=e.stat_desc.extra_bits;var a=e.stat_desc.extra_base;var c=e.stat_desc.max_length;var u;var l,f;var h;var d;var p;var m=0;for(h=0;h<=Xet;h++){t.bl_count[h]=0}n[t.heap[t.heap_max]*2+1]=0;for(u=t.heap_max+1;u<Qet;u++){l=t.heap[u];h=n[n[l*2+1]*2+1]+1;if(h>c){h=c;m++}n[l*2+1]=h;if(l>s){continue}t.bl_count[h]++;d=0;if(l>=a){d=o[l-a]}p=n[l*2];t.opt_len+=p*(h+d);if(i){t.static_len+=p*(r[l*2+1]+d)}}if(m===0){return}do{h=c-1;while(t.bl_count[h]===0){h--}t.bl_count[h]--;t.bl_count[h+1]+=2;t.bl_count[c]--;m-=2}while(m>0);for(h=c;h!==0;h--){l=t.bl_count[h];while(l!==0){f=t.heap[--u];if(f>s){continue}if(n[f*2+1]!==h){t.opt_len+=(h-n[f*2+1])*n[f*2];n[f*2+1]=h}l--}}}function Snt(t,e,n){var s=new Array(Xet+1);var r=0;var i;var o;for(i=1;i<=Xet;i++){s[i]=r=r+n[i-1]<<1}for(o=0;o<=e;o++){var a=t[o*2+1];if(a===0){continue}t[o*2]=knt(s[a]++,a)}}function Int(){var t;var e;var n;var s;var r;var i=new Array(Xet+1);n=0;for(s=0;s<Vet-1;s++){hnt[s]=n;for(t=0;t<1<<snt[s];t++){fnt[n++]=s}}fnt[n-1]=s;r=0;for(s=0;s<16;s++){dnt[s]=r;for(t=0;t<1<<rnt[s];t++){lnt[r++]=s}}r>>=7;for(;s<Het;s++){dnt[s]=r<<7;for(t=0;t<1<<rnt[s]-7;t++){lnt[256+r++]=s}}for(e=0;e<=Xet;e++){i[e]=0}t=0;while(t<=143){cnt[t*2+1]=8;t++;i[8]++}while(t<=255){cnt[t*2+1]=9;t++;i[9]++}while(t<=279){cnt[t*2+1]=7;t++;i[7]++}while(t<=287){cnt[t*2+1]=8;t++;i[8]++}Snt(cnt,Yet+1,i);for(t=0;t<Het;t++){unt[t*2+1]=5;unt[t*2]=knt(t,5)}mnt=new pnt(cnt,snt,Uet+1,Yet,Xet);bnt=new pnt(unt,rnt,0,Het,Xet);ynt=new pnt(new Array(0),int,0,Zet,Jet)}function Mnt(t){var e;for(e=0;e<Yet;e++){t.dyn_ltree[e*2]=0}for(e=0;e<Het;e++){t.dyn_dtree[e*2]=0}for(e=0;e<Zet;e++){t.bl_tree[e*2]=0}t.dyn_ltree[Ket*2]=1;t.opt_len=t.static_len=0;t.last_lit=t.matches=0}function Ent(t){if(t.bi_valid>8){vnt(t,t.bi_buf)}else if(t.bi_valid>0){t.pending_buf[t.pending++]=t.bi_buf}t.bi_buf=0;t.bi_valid=0}function Tnt(t,e,n,s){Ent(t);{vnt(t,n);vnt(t,~n)}Tet(t.pending_buf,t.window,e,n,t.pending);t.pending+=n}function Ant(t,e,n,s){var r=e*2;var i=n*2;return t[r]<t[i]||t[r]===t[i]&&s[e]<=s[n]}function Dnt(t,e,n){var s=t.heap[n];var r=n<<1;while(r<=t.heap_len){if(r<t.heap_len&&Ant(e,t.heap[r+1],t.heap[r],t.depth)){r++}if(Ant(e,s,t.heap[r],t.depth)){break}t.heap[n]=t.heap[r];n=r;r<<=1}t.heap[n]=s}function Rnt(t,e,n){var s;var r;var i=0;var o;var a;if(t.last_lit!==0){do{s=t.pending_buf[t.d_buf+i*2]<<8|t.pending_buf[t.d_buf+i*2+1];r=t.pending_buf[t.l_buf+i];i++;if(s===0){Nnt(t,r,e)}else{o=fnt[r];Nnt(t,o+Uet+1,e);a=snt[o];if(a!==0){r-=hnt[o];xnt(t,r,a)}s--;o=wnt(s);Nnt(t,o,n);a=rnt[o];if(a!==0){s-=dnt[o];xnt(t,s,a)}}}while(i<t.last_lit)}Nnt(t,Ket,e)}function Ont(t,e){var n=e.dyn_tree;var s=e.stat_desc.static_tree;var r=e.stat_desc.has_stree;var i=e.stat_desc.elems;var o,a;var c=-1;var u;t.heap_len=0;t.heap_max=Qet;for(o=0;o<i;o++){if(n[o*2]!==0){t.heap[++t.heap_len]=c=o;t.depth[o]=0}else{n[o*2+1]=0}}while(t.heap_len<2){u=t.heap[++t.heap_len]=c<2?++c:0;n[u*2]=1;t.depth[u]=0;t.opt_len--;if(r){t.static_len-=s[u*2+1]}}e.max_code=c;for(o=t.heap_len>>1;o>=1;o--){Dnt(t,n,o)}u=i;do{o=t.heap[1];t.heap[1]=t.heap[t.heap_len--];Dnt(t,n,1);a=t.heap[1];t.heap[--t.heap_max]=o;t.heap[--t.heap_max]=a;n[u*2]=n[o*2]+n[a*2];t.depth[u]=(t.depth[o]>=t.depth[a]?t.depth[o]:t.depth[a])+1;n[o*2+1]=n[a*2+1]=u;t.heap[1]=u++;Dnt(t,n,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1];$nt(t,e);Snt(n,c,t.bl_count)}function Lnt(t,e,n){var s;var r=-1;var i;var o=e[0*2+1];var a=0;var c=7;var u=4;if(o===0){c=138;u=3}e[(n+1)*2+1]=65535;for(s=0;s<=n;s++){i=o;o=e[(s+1)*2+1];if(++a<c&&i===o){continue}else if(a<u){t.bl_tree[i*2]+=a}else if(i!==0){if(i!==r){t.bl_tree[i*2]++}t.bl_tree[tnt*2]++}else if(a<=10){t.bl_tree[ent*2]++}else{t.bl_tree[nnt*2]++}a=0;r=i;if(o===0){c=138;u=3}else if(i===o){c=6;u=3}else{c=7;u=4}}}function _nt(t,e,n){var s;var r=-1;var i;var o=e[0*2+1];var a=0;var c=7;var u=4;if(o===0){c=138;u=3}for(s=0;s<=n;s++){i=o;o=e[(s+1)*2+1];if(++a<c&&i===o){continue}else if(a<u){do{Nnt(t,i,t.bl_tree)}while(--a!==0)}else if(i!==0){if(i!==r){Nnt(t,i,t.bl_tree);a--}Nnt(t,tnt,t.bl_tree);xnt(t,a-3,2)}else if(a<=10){Nnt(t,ent,t.bl_tree);xnt(t,a-3,3)}else{Nnt(t,nnt,t.bl_tree);xnt(t,a-11,7)}a=0;r=i;if(o===0){c=138;u=3}else if(i===o){c=6;u=3}else{c=7;u=4}}}function Fnt(t){var e;Lnt(t,t.dyn_ltree,t.l_desc.max_code);Lnt(t,t.dyn_dtree,t.d_desc.max_code);Ont(t,t.bl_desc);for(e=Zet-1;e>=3;e--){if(t.bl_tree[ont[e]*2+1]!==0){break}}t.opt_len+=3*(e+1)+5+5+4;return e}function znt(t,e,n,s){var r;xnt(t,e-257,5);xnt(t,n-1,5);xnt(t,s-4,4);for(r=0;r<s;r++){xnt(t,t.bl_tree[ont[r]*2+1],3)}_nt(t,t.dyn_ltree,e-1);_nt(t,t.dyn_dtree,n-1)}function jnt(t){var e=4093624447;var n;for(n=0;n<=31;n++,e>>>=1){if(e&1&&t.dyn_ltree[n*2]!==0){return Let}}if(t.dyn_ltree[9*2]!==0||t.dyn_ltree[10*2]!==0||t.dyn_ltree[13*2]!==0){return _et}for(n=32;n<Uet;n++){if(t.dyn_ltree[n*2]!==0){return _et}}return Let}var Pnt=false;function Bnt(t){if(!Pnt){Int();Pnt=true}t.l_desc=new gnt(t.dyn_ltree,mnt);t.d_desc=new gnt(t.dyn_dtree,bnt);t.bl_desc=new gnt(t.bl_tree,ynt);t.bi_buf=0;t.bi_valid=0;Mnt(t)}function Wnt(t,e,n,s){xnt(t,(jet<<1)+(s?1:0),3);Tnt(t,e,n)}function Gnt(t){xnt(t,Pet<<1,3);Nnt(t,Ket,cnt);Cnt(t)}function Vnt(t,e,n,s){var r,i;var o=0;if(t.level>0){if(t.strm.data_type===Fet){t.strm.data_type=jnt(t)}Ont(t,t.l_desc);Ont(t,t.d_desc);o=Fnt(t);r=t.opt_len+3+7>>>3;i=t.static_len+3+7>>>3;if(i<=r){r=i}}else{r=i=n+5}if(n+4<=r&&e!==-1){Wnt(t,e,n,s)}else if(t.strategy===Oet||i===r){xnt(t,(Pet<<1)+(s?1:0),3);Rnt(t,cnt,unt)}else{xnt(t,(Bet<<1)+(s?1:0),3);znt(t,t.l_desc.max_code+1,t.d_desc.max_code+1,o+1);Rnt(t,t.dyn_ltree,t.dyn_dtree)}Mnt(t);if(s){Ent(t)}}function Unt(t,e,n){t.pending_buf[t.d_buf+t.last_lit*2]=e>>>8&255;t.pending_buf[t.d_buf+t.last_lit*2+1]=e&255;t.pending_buf[t.l_buf+t.last_lit]=n&255;t.last_lit++;if(e===0){t.dyn_ltree[n*2]++}else{t.matches++;e--;t.dyn_ltree[(fnt[n]+Uet+1)*2]++;t.dyn_dtree[wnt(e)*2]++}return t.last_lit===t.lit_bufsize-1}function Ynt(t,e,n,s){var r=t&65535|0,i=t>>>16&65535|0,o=0;while(n!==0){o=n>2e3?2e3:n;n-=o;do{r=r+e[s++]|0;i=i+r|0}while(--o);r%=65521;i%=65521}return r|i<<16|0}function Hnt(){var t,e=[];for(var n=0;n<256;n++){t=n;for(var s=0;s<8;s++){t=t&1?3988292384^t>>>1:t>>>1}e[n]=t}return e}var Znt=Hnt();function Qnt(t,e,n,s){var r=Znt,i=s+n;t^=-1;for(var o=s;o<i;o++){t=t>>>8^r[(t^e[o])&255]}return t^-1}var Xnt=0;var qnt=1;var Jnt=3;var Knt=4;var tst=5;var est=0;var nst=1;var sst=-2;var rst=-3;var ist=-5;var ost=-1;var ast=1;var cst=2;var ust=3;var lst=4;var fst=2;var hst=8;var dst=9;var pst=29;var mst=256;var bst=mst+1+pst;var yst=30;var gst=19;var wst=2*bst+1;var vst=15;var xst=3;var Nst=258;var kst=Nst+xst+1;var Cst=32;var $st=42;var Sst=69;var Ist=73;var Mst=91;var Est=103;var Tst=113;var Ast=666;var Dst=1;var Rst=2;var Ost=3;var Lst=4;var _st=3;function Fst(t,e){t.msg=Met[e];return e}function zst(t){return(t<<1)-(t>4?9:0)}function jst(t){var e=t.length;while(--e>=0){t[e]=0}}function Pst(t){var e=t.state;var n=e.pending;if(n>t.avail_out){n=t.avail_out}if(n===0){return}Tet(t.output,e.pending_buf,e.pending_out,n,t.next_out);t.next_out+=n;e.pending_out+=n;t.total_out+=n;t.avail_out-=n;e.pending-=n;if(e.pending===0){e.pending_out=0}}function Bst(t,e){Vnt(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e);t.block_start=t.strstart;Pst(t.strm)}function Wst(t,e){t.pending_buf[t.pending++]=e}function Gst(t,e){t.pending_buf[t.pending++]=e>>>8&255;t.pending_buf[t.pending++]=e&255}function Vst(t,e,n,s){var r=t.avail_in;if(r>s){r=s}if(r===0){return 0}t.avail_in-=r;Tet(e,t.input,t.next_in,r,n);if(t.state.wrap===1){t.adler=Ynt(t.adler,e,r,n)}else if(t.state.wrap===2){t.adler=Qnt(t.adler,e,r,n)}t.next_in+=r;t.total_in+=r;return r}function Ust(t,e){var n=t.max_chain_length;var s=t.strstart;var r;var i;var o=t.prev_length;var a=t.nice_match;var c=t.strstart>t.w_size-kst?t.strstart-(t.w_size-kst):0;var u=t.window;var l=t.w_mask;var f=t.prev;var h=t.strstart+Nst;var d=u[s+o-1];var p=u[s+o];if(t.prev_length>=t.good_match){n>>=2}if(a>t.lookahead){a=t.lookahead}do{r=e;if(u[r+o]!==p||u[r+o-1]!==d||u[r]!==u[s]||u[++r]!==u[s+1]){continue}s+=2;r++;do{}while(u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&s<h);i=Nst-(h-s);s=h-Nst;if(i>o){t.match_start=e;o=i;if(i>=a){break}d=u[s+o-1];p=u[s+o]}}while((e=f[e&l])>c&&--n!==0);if(o<=t.lookahead){return o}return t.lookahead}function Yst(t){var e=t.w_size;var n,s,r,i,o;do{i=t.window_size-t.lookahead-t.strstart;if(t.strstart>=e+(e-kst)){Tet(t.window,t.window,e,e,0);t.match_start-=e;t.strstart-=e;t.block_start-=e;s=t.hash_size;n=s;do{r=t.head[--n];t.head[n]=r>=e?r-e:0}while(--s);s=e;n=s;do{r=t.prev[--n];t.prev[n]=r>=e?r-e:0}while(--s);i+=e}if(t.strm.avail_in===0){break}s=Vst(t.strm,t.window,t.strstart+t.lookahead,i);t.lookahead+=s;if(t.lookahead+t.insert>=xst){o=t.strstart-t.insert;t.ins_h=t.window[o];t.ins_h=(t.ins_h<<t.hash_shift^t.window[o+1])&t.hash_mask;while(t.insert){t.ins_h=(t.ins_h<<t.hash_shift^t.window[o+xst-1])&t.hash_mask;t.prev[o&t.w_mask]=t.head[t.ins_h];t.head[t.ins_h]=o;o++;t.insert--;if(t.lookahead+t.insert<xst){break}}}}while(t.lookahead<kst&&t.strm.avail_in!==0)}function Hst(t,e){var n=65535;if(n>t.pending_buf_size-5){n=t.pending_buf_size-5}for(;;){if(t.lookahead<=1){Yst(t);if(t.lookahead===0&&e===Xnt){return Dst}if(t.lookahead===0){break}}t.strstart+=t.lookahead;t.lookahead=0;var s=t.block_start+n;if(t.strstart===0||t.strstart>=s){t.lookahead=t.strstart-s;t.strstart=s;Bst(t,false);if(t.strm.avail_out===0){return Dst}}if(t.strstart-t.block_start>=t.w_size-kst){Bst(t,false);if(t.strm.avail_out===0){return Dst}}}t.insert=0;if(e===Knt){Bst(t,true);if(t.strm.avail_out===0){return Ost}return Lst}if(t.strstart>t.block_start){Bst(t,false);if(t.strm.avail_out===0){return Dst}}return Dst}function Zst(t,e){var n;var s;for(;;){if(t.lookahead<kst){Yst(t);if(t.lookahead<kst&&e===Xnt){return Dst}if(t.lookahead===0){break}}n=0;if(t.lookahead>=xst){t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+xst-1])&t.hash_mask;n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h];t.head[t.ins_h]=t.strstart}if(n!==0&&t.strstart-n<=t.w_size-kst){t.match_length=Ust(t,n)}if(t.match_length>=xst){s=Unt(t,t.strstart-t.match_start,t.match_length-xst);t.lookahead-=t.match_length;if(t.match_length<=t.max_lazy_match&&t.lookahead>=xst){t.match_length--;do{t.strstart++;t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+xst-1])&t.hash_mask;n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h];t.head[t.ins_h]=t.strstart}while(--t.match_length!==0);t.strstart++}else{t.strstart+=t.match_length;t.match_length=0;t.ins_h=t.window[t.strstart];t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask}}else{s=Unt(t,0,t.window[t.strstart]);t.lookahead--;t.strstart++}if(s){Bst(t,false);if(t.strm.avail_out===0){return Dst}}}t.insert=t.strstart<xst-1?t.strstart:xst-1;if(e===Knt){Bst(t,true);if(t.strm.avail_out===0){return Ost}return Lst}if(t.last_lit){Bst(t,false);if(t.strm.avail_out===0){return Dst}}return Rst}function Qst(t,e){var n;var s;var r;for(;;){if(t.lookahead<kst){Yst(t);if(t.lookahead<kst&&e===Xnt){return Dst}if(t.lookahead===0){break}}n=0;if(t.lookahead>=xst){t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+xst-1])&t.hash_mask;n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h];t.head[t.ins_h]=t.strstart}t.prev_length=t.match_length;t.prev_match=t.match_start;t.match_length=xst-1;if(n!==0&&t.prev_length<t.max_lazy_match&&t.strstart-n<=t.w_size-kst){t.match_length=Ust(t,n);if(t.match_length<=5&&(t.strategy===ast||t.match_length===xst&&t.strstart-t.match_start>4096)){t.match_length=xst-1}}if(t.prev_length>=xst&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-xst;s=Unt(t,t.strstart-1-t.prev_match,t.prev_length-xst);t.lookahead-=t.prev_length-1;t.prev_length-=2;do{if(++t.strstart<=r){t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+xst-1])&t.hash_mask;n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h];t.head[t.ins_h]=t.strstart}}while(--t.prev_length!==0);t.match_available=0;t.match_length=xst-1;t.strstart++;if(s){Bst(t,false);if(t.strm.avail_out===0){return Dst}}}else if(t.match_available){s=Unt(t,0,t.window[t.strstart-1]);if(s){Bst(t,false)}t.strstart++;t.lookahead--;if(t.strm.avail_out===0){return Dst}}else{t.match_available=1;t.strstart++;t.lookahead--}}if(t.match_available){s=Unt(t,0,t.window[t.strstart-1]);t.match_available=0}t.insert=t.strstart<xst-1?t.strstart:xst-1;if(e===Knt){Bst(t,true);if(t.strm.avail_out===0){return Ost}return Lst}if(t.last_lit){Bst(t,false);if(t.strm.avail_out===0){return Dst}}return Rst}function Xst(t,e){var n;var s;var r,i;var o=t.window;for(;;){if(t.lookahead<=Nst){Yst(t);if(t.lookahead<=Nst&&e===Xnt){return Dst}if(t.lookahead===0){break}}t.match_length=0;if(t.lookahead>=xst&&t.strstart>0){r=t.strstart-1;s=o[r];if(s===o[++r]&&s===o[++r]&&s===o[++r]){i=t.strstart+Nst;do{}while(s===o[++r]&&s===o[++r]&&s===o[++r]&&s===o[++r]&&s===o[++r]&&s===o[++r]&&s===o[++r]&&s===o[++r]&&r<i);t.match_length=Nst-(i-r);if(t.match_length>t.lookahead){t.match_length=t.lookahead}}}if(t.match_length>=xst){n=Unt(t,1,t.match_length-xst);t.lookahead-=t.match_length;t.strstart+=t.match_length;t.match_length=0}else{n=Unt(t,0,t.window[t.strstart]);t.lookahead--;t.strstart++}if(n){Bst(t,false);if(t.strm.avail_out===0){return Dst}}}t.insert=0;if(e===Knt){Bst(t,true);if(t.strm.avail_out===0){return Ost}return Lst}if(t.last_lit){Bst(t,false);if(t.strm.avail_out===0){return Dst}}return Rst}function qst(t,e){var n;for(;;){if(t.lookahead===0){Yst(t);if(t.lookahead===0){if(e===Xnt){return Dst}break}}t.match_length=0;n=Unt(t,0,t.window[t.strstart]);t.lookahead--;t.strstart++;if(n){Bst(t,false);if(t.strm.avail_out===0){return Dst}}}t.insert=0;if(e===Knt){Bst(t,true);if(t.strm.avail_out===0){return Ost}return Lst}if(t.last_lit){Bst(t,false);if(t.strm.avail_out===0){return Dst}}return Rst}function Jst(t,e,n,s,r){this.good_length=t;this.max_lazy=e;this.nice_length=n;this.max_chain=s;this.func=r}var Kst;Kst=[new Jst(0,0,0,0,Hst),new Jst(4,4,8,4,Zst),new Jst(4,5,16,8,Zst),new Jst(4,6,32,32,Zst),new Jst(4,4,16,16,Qst),new Jst(8,16,32,32,Qst),new Jst(8,16,128,128,Qst),new Jst(8,32,128,256,Qst),new Jst(32,128,258,1024,Qst),new Jst(32,258,258,4096,Qst)];function trt(t){t.window_size=2*t.w_size;jst(t.head);t.max_lazy_match=Kst[t.level].max_lazy;t.good_match=Kst[t.level].good_length;t.nice_match=Kst[t.level].nice_length;t.max_chain_length=Kst[t.level].max_chain;t.strstart=0;t.block_start=0;t.lookahead=0;t.insert=0;t.match_length=t.prev_length=xst-1;t.match_available=0;t.ins_h=0}function ert(){this.strm=null;this.status=0;this.pending_buf=null;this.pending_buf_size=0;this.pending_out=0;this.pending=0;this.wrap=0;this.gzhead=null;this.gzindex=0;this.method=hst;this.last_flush=-1;this.w_size=0;this.w_bits=0;this.w_mask=0;this.window=null;this.window_size=0;this.prev=null;this.head=null;this.ins_h=0;this.hash_size=0;this.hash_bits=0;this.hash_mask=0;this.hash_shift=0;this.block_start=0;this.match_length=0;this.prev_match=0;this.match_available=0;this.strstart=0;this.match_start=0;this.lookahead=0;this.prev_length=0;this.max_chain_length=0;this.max_lazy_match=0;this.level=0;this.strategy=0;this.good_match=0;this.nice_match=0;this.dyn_ltree=new Det(wst*2);this.dyn_dtree=new Det((2*yst+1)*2);this.bl_tree=new Det((2*gst+1)*2);jst(this.dyn_ltree);jst(this.dyn_dtree);jst(this.bl_tree);this.l_desc=null;this.d_desc=null;this.bl_desc=null;this.bl_count=new Det(vst+1);this.heap=new Det(2*bst+1);jst(this.heap);this.heap_len=0;this.heap_max=0;this.depth=new Det(2*bst+1);jst(this.depth);this.l_buf=0;this.lit_bufsize=0;this.last_lit=0;this.d_buf=0;this.opt_len=0;this.static_len=0;this.matches=0;this.insert=0;this.bi_buf=0;this.bi_valid=0}function nrt(t){var e;if(!t||!t.state){return Fst(t,sst)}t.total_in=t.total_out=0;t.data_type=fst;e=t.state;e.pending=0;e.pending_out=0;if(e.wrap<0){e.wrap=-e.wrap}e.status=e.wrap?$st:Tst;t.adler=e.wrap===2?0:1;e.last_flush=Xnt;Bnt(e);return est}function srt(t){var e=nrt(t);if(e===est){trt(t.state)}return e}function rrt(t,e,n,s,r,i){if(!t){return sst}var o=1;if(e===ost){e=6}if(s<0){o=0;s=-s}else if(s>15){o=2;s-=16}if(r<1||r>dst||n!==hst||s<8||s>15||e<0||e>9||i<0||i>lst){return Fst(t,sst)}if(s===8){s=9}var a=new ert;t.state=a;a.strm=t;a.wrap=o;a.gzhead=null;a.w_bits=s;a.w_size=1<<a.w_bits;a.w_mask=a.w_size-1;a.hash_bits=r+7;a.hash_size=1<<a.hash_bits;a.hash_mask=a.hash_size-1;a.hash_shift=~~((a.hash_bits+xst-1)/xst);a.window=new Aet(a.w_size*2);a.head=new Det(a.hash_size);a.prev=new Det(a.w_size);a.lit_bufsize=1<<r+6;a.pending_buf_size=a.lit_bufsize*4;a.pending_buf=new Aet(a.pending_buf_size);a.d_buf=1*a.lit_bufsize;a.l_buf=(1+2)*a.lit_bufsize;a.level=e;a.strategy=i;a.method=n;return srt(t)}function irt(t,e){var n,s;var r,i;if(!t||!t.state||e>tst||e<0){return t?Fst(t,sst):sst}s=t.state;if(!t.output||!t.input&&t.avail_in!==0||s.status===Ast&&e!==Knt){return Fst(t,t.avail_out===0?ist:sst)}s.strm=t;n=s.last_flush;s.last_flush=e;if(s.status===$st){if(s.wrap===2){t.adler=0;Wst(s,31);Wst(s,139);Wst(s,8);if(!s.gzhead){Wst(s,0);Wst(s,0);Wst(s,0);Wst(s,0);Wst(s,0);Wst(s,s.level===9?2:s.strategy>=cst||s.level<2?4:0);Wst(s,_st);s.status=Tst}else{Wst(s,(s.gzhead.text?1:0)+(s.gzhead.hcrc?2:0)+(!s.gzhead.extra?0:4)+(!s.gzhead.name?0:8)+(!s.gzhead.comment?0:16));Wst(s,s.gzhead.time&255);Wst(s,s.gzhead.time>>8&255);Wst(s,s.gzhead.time>>16&255);Wst(s,s.gzhead.time>>24&255);Wst(s,s.level===9?2:s.strategy>=cst||s.level<2?4:0);Wst(s,s.gzhead.os&255);if(s.gzhead.extra&&s.gzhead.extra.length){Wst(s,s.gzhead.extra.length&255);Wst(s,s.gzhead.extra.length>>8&255)}if(s.gzhead.hcrc){t.adler=Qnt(t.adler,s.pending_buf,s.pending,0)}s.gzindex=0;s.status=Sst}}else{var o=hst+(s.w_bits-8<<4)<<8;var a=-1;if(s.strategy>=cst||s.level<2){a=0}else if(s.level<6){a=1}else if(s.level===6){a=2}else{a=3}o|=a<<6;if(s.strstart!==0){o|=Cst}o+=31-o%31;s.status=Tst;Gst(s,o);if(s.strstart!==0){Gst(s,t.adler>>>16);Gst(s,t.adler&65535)}t.adler=1}}if(s.status===Sst){if(s.gzhead.extra){r=s.pending;while(s.gzindex<(s.gzhead.extra.length&65535)){if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>r){t.adler=Qnt(t.adler,s.pending_buf,s.pending-r,r)}Pst(t);r=s.pending;if(s.pending===s.pending_buf_size){break}}Wst(s,s.gzhead.extra[s.gzindex]&255);s.gzindex++}if(s.gzhead.hcrc&&s.pending>r){t.adler=Qnt(t.adler,s.pending_buf,s.pending-r,r)}if(s.gzindex===s.gzhead.extra.length){s.gzindex=0;s.status=Ist}}else{s.status=Ist}}if(s.status===Ist){if(s.gzhead.name){r=s.pending;do{if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>r){t.adler=Qnt(t.adler,s.pending_buf,s.pending-r,r)}Pst(t);r=s.pending;if(s.pending===s.pending_buf_size){i=1;break}}if(s.gzindex<s.gzhead.name.length){i=s.gzhead.name.charCodeAt(s.gzindex++)&255}else{i=0}Wst(s,i)}while(i!==0);if(s.gzhead.hcrc&&s.pending>r){t.adler=Qnt(t.adler,s.pending_buf,s.pending-r,r)}if(i===0){s.gzindex=0;s.status=Mst}}else{s.status=Mst}}if(s.status===Mst){if(s.gzhead.comment){r=s.pending;do{if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>r){t.adler=Qnt(t.adler,s.pending_buf,s.pending-r,r)}Pst(t);r=s.pending;if(s.pending===s.pending_buf_size){i=1;break}}if(s.gzindex<s.gzhead.comment.length){i=s.gzhead.comment.charCodeAt(s.gzindex++)&255}else{i=0}Wst(s,i)}while(i!==0);if(s.gzhead.hcrc&&s.pending>r){t.adler=Qnt(t.adler,s.pending_buf,s.pending-r,r)}if(i===0){s.status=Est}}else{s.status=Est}}if(s.status===Est){if(s.gzhead.hcrc){if(s.pending+2>s.pending_buf_size){Pst(t)}if(s.pending+2<=s.pending_buf_size){Wst(s,t.adler&255);Wst(s,t.adler>>8&255);t.adler=0;s.status=Tst}}else{s.status=Tst}}if(s.pending!==0){Pst(t);if(t.avail_out===0){s.last_flush=-1;return est}}else if(t.avail_in===0&&zst(e)<=zst(n)&&e!==Knt){return Fst(t,ist)}if(s.status===Ast&&t.avail_in!==0){return Fst(t,ist)}if(t.avail_in!==0||s.lookahead!==0||e!==Xnt&&s.status!==Ast){var c=s.strategy===cst?qst(s,e):s.strategy===ust?Xst(s,e):Kst[s.level].func(s,e);if(c===Ost||c===Lst){s.status=Ast}if(c===Dst||c===Ost){if(t.avail_out===0){s.last_flush=-1}return est}if(c===Rst){if(e===qnt){Gnt(s)}else if(e!==tst){Wnt(s,0,0,false);if(e===Jnt){jst(s.head);if(s.lookahead===0){s.strstart=0;s.block_start=0;s.insert=0}}}Pst(t);if(t.avail_out===0){s.last_flush=-1;return est}}}if(e!==Knt){return est}if(s.wrap<=0){return nst}if(s.wrap===2){Wst(s,t.adler&255);Wst(s,t.adler>>8&255);Wst(s,t.adler>>16&255);Wst(s,t.adler>>24&255);Wst(s,t.total_in&255);Wst(s,t.total_in>>8&255);Wst(s,t.total_in>>16&255);Wst(s,t.total_in>>24&255)}else{Gst(s,t.adler>>>16);Gst(s,t.adler&65535)}Pst(t);if(s.wrap>0){s.wrap=-s.wrap}return s.pending!==0?est:nst}function ort(t){var e;if(!t||!t.state){return sst}e=t.state.status;if(e!==$st&&e!==Sst&&e!==Ist&&e!==Mst&&e!==Est&&e!==Tst&&e!==Ast){return Fst(t,sst)}t.state=null;return e===Tst?Fst(t,rst):est}var art=30;var crt=12;function urt(t,e){var n;var s;var r;var i;var o;var a;var c;var u;var l;var f;var h;var d;var p;var m;var b;var y;var g;var w;var v;var x;var N;var k;var C;var $,S;n=t.state;s=t.next_in;$=t.input;r=s+(t.avail_in-5);i=t.next_out;S=t.output;o=i-(e-t.avail_out);a=i+(t.avail_out-257);c=n.dmax;u=n.wsize;l=n.whave;f=n.wnext;h=n.window;d=n.hold;p=n.bits;m=n.lencode;b=n.distcode;y=(1<<n.lenbits)-1;g=(1<<n.distbits)-1;t:do{if(p<15){d+=$[s++]<<p;p+=8;d+=$[s++]<<p;p+=8}w=m[d&y];e:for(;;){v=w>>>24;d>>>=v;p-=v;v=w>>>16&255;if(v===0){S[i++]=w&65535}else if(v&16){x=w&65535;v&=15;if(v){if(p<v){d+=$[s++]<<p;p+=8}x+=d&(1<<v)-1;d>>>=v;p-=v}if(p<15){d+=$[s++]<<p;p+=8;d+=$[s++]<<p;p+=8}w=b[d&g];n:for(;;){v=w>>>24;d>>>=v;p-=v;v=w>>>16&255;if(v&16){N=w&65535;v&=15;if(p<v){d+=$[s++]<<p;p+=8;if(p<v){d+=$[s++]<<p;p+=8}}N+=d&(1<<v)-1;if(N>c){t.msg="invalid distance too far back";n.mode=art;break t}d>>>=v;p-=v;v=i-o;if(N>v){v=N-v;if(v>l){if(n.sane){t.msg="invalid distance too far back";n.mode=art;break t}}k=0;C=h;if(f===0){k+=u-v;if(v<x){x-=v;do{S[i++]=h[k++]}while(--v);k=i-N;C=S}}else if(f<v){k+=u+f-v;v-=f;if(v<x){x-=v;do{S[i++]=h[k++]}while(--v);k=0;if(f<x){v=f;x-=v;do{S[i++]=h[k++]}while(--v);k=i-N;C=S}}}else{k+=f-v;if(v<x){x-=v;do{S[i++]=h[k++]}while(--v);k=i-N;C=S}}while(x>2){S[i++]=C[k++];S[i++]=C[k++];S[i++]=C[k++];x-=3}if(x){S[i++]=C[k++];if(x>1){S[i++]=C[k++]}}}else{k=i-N;do{S[i++]=S[k++];S[i++]=S[k++];S[i++]=S[k++];x-=3}while(x>2);if(x){S[i++]=S[k++];if(x>1){S[i++]=S[k++]}}}}else if((v&64)===0){w=b[(w&65535)+(d&(1<<v)-1)];continue n}else{t.msg="invalid distance code";n.mode=art;break t}break}}else if((v&64)===0){w=m[(w&65535)+(d&(1<<v)-1)];continue e}else if(v&32){n.mode=crt;break t}else{t.msg="invalid literal/length code";n.mode=art;break t}break}}while(s<r&&i<a);x=p>>3;s-=x;p-=x<<3;d&=(1<<p)-1;t.next_in=s;t.next_out=i;t.avail_in=s<r?5+(r-s):5-(s-r);t.avail_out=i<a?257+(a-i):257-(i-a);n.hold=d;n.bits=p;return}var lrt=15;var frt=852;var hrt=592;var drt=0;var prt=1;var mrt=2;var brt=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0];var yrt=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78];var grt=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0];var wrt=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];function vrt(t,e,n,s,r,i,o,a){var c=a.bits;var u=0;var l=0;var f=0,h=0;var d=0;var p=0;var m=0;var b=0;var y=0;var g=0;var w;var v;var x;var N;var k;var C=null;var $=0;var S;var I=new Det(lrt+1);var M=new Det(lrt+1);var E=null;var T=0;var A,D,R;for(u=0;u<=lrt;u++){I[u]=0}for(l=0;l<s;l++){I[e[n+l]]++}d=c;for(h=lrt;h>=1;h--){if(I[h]!==0){break}}if(d>h){d=h}if(h===0){r[i++]=1<<24|64<<16|0;r[i++]=1<<24|64<<16|0;a.bits=1;return 0}for(f=1;f<h;f++){if(I[f]!==0){break}}if(d<f){d=f}b=1;for(u=1;u<=lrt;u++){b<<=1;b-=I[u];if(b<0){return-1}}if(b>0&&(t===drt||h!==1)){return-1}M[1]=0;for(u=1;u<lrt;u++){M[u+1]=M[u]+I[u]}for(l=0;l<s;l++){if(e[n+l]!==0){o[M[e[n+l]]++]=l}}if(t===drt){C=E=o;S=19}else if(t===prt){C=brt;$-=257;E=yrt;T-=257;S=256}else{C=grt;E=wrt;S=-1}g=0;l=0;u=f;k=i;p=d;m=0;x=-1;y=1<<d;N=y-1;if(t===prt&&y>frt||t===mrt&&y>hrt){return 1}for(;;){A=u-m;if(o[l]<S){D=0;R=o[l]}else if(o[l]>S){D=E[T+o[l]];R=C[$+o[l]]}else{D=32+64;R=0}w=1<<u-m;v=1<<p;f=v;do{v-=w;r[k+(g>>m)+v]=A<<24|D<<16|R|0}while(v!==0);w=1<<u-1;while(g&w){w>>=1}if(w!==0){g&=w-1;g+=w}else{g=0}l++;if(--I[u]===0){if(u===h){break}u=e[n+o[l]]}if(u>d&&(g&N)!==x){if(m===0){m=d}k+=f;p=u-m;b=1<<p;while(p+m<h){b-=I[p+m];if(b<=0){break}p++;b<<=1}y+=1<<p;if(t===prt&&y>frt||t===mrt&&y>hrt){return 1}x=g&N;r[x]=d<<24|p<<16|k-i|0}}if(g!==0){r[k+g]=u-m<<24|64<<16|0}a.bits=d;return 0}var xrt=0;var Nrt=1;var krt=2;var Crt=4;var $rt=5;var Srt=6;var Irt=0;var Mrt=1;var Ert=2;var Trt=-2;var Art=-3;var Drt=-4;var Rrt=-5;var Ort=8;var Lrt=1;var _rt=2;var Frt=3;var zrt=4;var jrt=5;var Prt=6;var Brt=7;var Wrt=8;var Grt=9;var Vrt=10;var Urt=11;var Yrt=12;var Hrt=13;var Zrt=14;var Qrt=15;var Xrt=16;var qrt=17;var Jrt=18;var Krt=19;var tit=20;var eit=21;var nit=22;var sit=23;var rit=24;var iit=25;var oit=26;var ait=27;var cit=28;var uit=29;var lit=30;var fit=31;var hit=32;var dit=852;var pit=592;function mit(t){return(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24)}function bit(){this.mode=0;this.last=false;this.wrap=0;this.havedict=false;this.flags=0;this.dmax=0;this.check=0;this.total=0;this.head=null;this.wbits=0;this.wsize=0;this.whave=0;this.wnext=0;this.window=null;this.hold=0;this.bits=0;this.length=0;this.offset=0;this.extra=0;this.lencode=null;this.distcode=null;this.lenbits=0;this.distbits=0;this.ncode=0;this.nlen=0;this.ndist=0;this.have=0;this.next=null;this.lens=new Det(320);this.work=new Det(288);this.lendyn=null;this.distdyn=null;this.sane=0;this.back=0;this.was=0}function yit(t){var e;if(!t||!t.state){return Trt}e=t.state;t.total_in=t.total_out=e.total=0;t.msg="";if(e.wrap){t.adler=e.wrap&1}e.mode=Lrt;e.last=0;e.havedict=0;e.dmax=32768;e.head=null;e.hold=0;e.bits=0;e.lencode=e.lendyn=new Ret(dit);e.distcode=e.distdyn=new Ret(pit);e.sane=1;e.back=-1;return Irt}function git(t){var e;if(!t||!t.state){return Trt}e=t.state;e.wsize=0;e.whave=0;e.wnext=0;return yit(t)}function wit(t,e){var n;var s;if(!t||!t.state){return Trt}s=t.state;if(e<0){n=0;e=-e}else{n=(e>>4)+1;if(e<48){e&=15}}if(e&&(e<8||e>15)){return Trt}if(s.window!==null&&s.wbits!==e){s.window=null}s.wrap=n;s.wbits=e;return git(t)}function vit(t,e){var n;var s;if(!t){return Trt}s=new bit;t.state=s;s.window=null;n=wit(t,e);if(n!==Irt){t.state=null}return n}var xit=true;var Nit,kit;function Cit(t){if(xit){var e;Nit=new Ret(512);kit=new Ret(32);e=0;while(e<144){t.lens[e++]=8}while(e<256){t.lens[e++]=9}while(e<280){t.lens[e++]=7}while(e<288){t.lens[e++]=8}vrt(Nrt,t.lens,0,288,Nit,0,t.work,{bits:9});e=0;while(e<32){t.lens[e++]=5}vrt(krt,t.lens,0,32,kit,0,t.work,{bits:5});xit=false}t.lencode=Nit;t.lenbits=9;t.distcode=kit;t.distbits=5}function $it(t,e,n,s){var r;var i=t.state;if(i.window===null){i.wsize=1<<i.wbits;i.wnext=0;i.whave=0;i.window=new Aet(i.wsize)}if(s>=i.wsize){Tet(i.window,e,n-i.wsize,i.wsize,0);i.wnext=0;i.whave=i.wsize}else{r=i.wsize-i.wnext;if(r>s){r=s}Tet(i.window,e,n-s,r,i.wnext);s-=r;if(s){Tet(i.window,e,n-s,s,0);i.wnext=s;i.whave=i.wsize}else{i.wnext+=r;if(i.wnext===i.wsize){i.wnext=0}if(i.whave<i.wsize){i.whave+=r}}}return 0}function Sit(t,e){var n;var s,r;var i;var o;var a,c;var u;var l;var f,h;var d;var p;var m;var b=0;var y,g,w;var v,x,N;var k;var C;var $=new Aet(4);var S;var I;var M=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&t.avail_in!==0){return Trt}n=t.state;if(n.mode===Yrt){n.mode=Hrt}o=t.next_out;r=t.output;c=t.avail_out;i=t.next_in;s=t.input;a=t.avail_in;u=n.hold;l=n.bits;f=a;h=c;C=Irt;t:for(;;){switch(n.mode){case Lrt:if(n.wrap===0){n.mode=Hrt;break}while(l<16){if(a===0){break t}a--;u+=s[i++]<<l;l+=8}if(n.wrap&2&&u===35615){n.check=0;$[0]=u&255;$[1]=u>>>8&255;n.check=Qnt(n.check,$,2,0);u=0;l=0;n.mode=_rt;break}n.flags=0;if(n.head){n.head.done=false}if(!(n.wrap&1)||(((u&255)<<8)+(u>>8))%31){t.msg="incorrect header check";n.mode=lit;break}if((u&15)!==Ort){t.msg="unknown compression method";n.mode=lit;break}u>>>=4;l-=4;k=(u&15)+8;if(n.wbits===0){n.wbits=k}else if(k>n.wbits){t.msg="invalid window size";n.mode=lit;break}n.dmax=1<<k;t.adler=n.check=1;n.mode=u&512?Vrt:Yrt;u=0;l=0;break;case _rt:while(l<16){if(a===0){break t}a--;u+=s[i++]<<l;l+=8}n.flags=u;if((n.flags&255)!==Ort){t.msg="unknown compression method";n.mode=lit;break}if(n.flags&57344){t.msg="unknown header flags set";n.mode=lit;break}if(n.head){n.head.text=u>>8&1}if(n.flags&512){$[0]=u&255;$[1]=u>>>8&255;n.check=Qnt(n.check,$,2,0)}u=0;l=0;n.mode=Frt;case Frt:while(l<32){if(a===0){break t}a--;u+=s[i++]<<l;l+=8}if(n.head){n.head.time=u}if(n.flags&512){$[0]=u&255;$[1]=u>>>8&255;$[2]=u>>>16&255;$[3]=u>>>24&255;n.check=Qnt(n.check,$,4,0)}u=0;l=0;n.mode=zrt;case zrt:while(l<16){if(a===0){break t}a--;u+=s[i++]<<l;l+=8}if(n.head){n.head.xflags=u&255;n.head.os=u>>8}if(n.flags&512){$[0]=u&255;$[1]=u>>>8&255;n.check=Qnt(n.check,$,2,0)}u=0;l=0;n.mode=jrt;case jrt:if(n.flags&1024){while(l<16){if(a===0){break t}a--;u+=s[i++]<<l;l+=8}n.length=u;if(n.head){n.head.extra_len=u}if(n.flags&512){$[0]=u&255;$[1]=u>>>8&255;n.check=Qnt(n.check,$,2,0)}u=0;l=0}else if(n.head){n.head.extra=null}n.mode=Prt;case Prt:if(n.flags&1024){d=n.length;if(d>a){d=a}if(d){if(n.head){k=n.head.extra_len-n.length;if(!n.head.extra){n.head.extra=new Array(n.head.extra_len)}Tet(n.head.extra,s,i,d,k)}if(n.flags&512){n.check=Qnt(n.check,s,d,i)}a-=d;i+=d;n.length-=d}if(n.length){break t}}n.length=0;n.mode=Brt;case Brt:if(n.flags&2048){if(a===0){break t}d=0;do{k=s[i+d++];if(n.head&&k&&n.length<65536){n.head.name+=String.fromCharCode(k)}}while(k&&d<a);if(n.flags&512){n.check=Qnt(n.check,s,d,i)}a-=d;i+=d;if(k){break t}}else if(n.head){n.head.name=null}n.length=0;n.mode=Wrt;case Wrt:if(n.flags&4096){if(a===0){break t}d=0;do{k=s[i+d++];if(n.head&&k&&n.length<65536){n.head.comment+=String.fromCharCode(k)}}while(k&&d<a);if(n.flags&512){n.check=Qnt(n.check,s,d,i)}a-=d;i+=d;if(k){break t}}else if(n.head){n.head.comment=null}n.mode=Grt;case Grt:if(n.flags&512){while(l<16){if(a===0){break t}a--;u+=s[i++]<<l;l+=8}if(u!==(n.check&65535)){t.msg="header crc mismatch";n.mode=lit;break}u=0;l=0}if(n.head){n.head.hcrc=n.flags>>9&1;n.head.done=true}t.adler=n.check=0;n.mode=Yrt;break;case Vrt:while(l<32){if(a===0){break t}a--;u+=s[i++]<<l;l+=8}t.adler=n.check=mit(u);u=0;l=0;n.mode=Urt;case Urt:if(n.havedict===0){t.next_out=o;t.avail_out=c;t.next_in=i;t.avail_in=a;n.hold=u;n.bits=l;return Ert}t.adler=n.check=1;n.mode=Yrt;case Yrt:if(e===$rt||e===Srt){break t}case Hrt:if(n.last){u>>>=l&7;l-=l&7;n.mode=ait;break}while(l<3){if(a===0){break t}a--;u+=s[i++]<<l;l+=8}n.last=u&1;u>>>=1;l-=1;switch(u&3){case 0:n.mode=Zrt;break;case 1:Cit(n);n.mode=tit;if(e===Srt){u>>>=2;l-=2;break t}break;case 2:n.mode=qrt;break;case 3:t.msg="invalid block type";n.mode=lit}u>>>=2;l-=2;break;case Zrt:u>>>=l&7;l-=l&7;while(l<32){if(a===0){break t}a--;u+=s[i++]<<l;l+=8}if((u&65535)!==(u>>>16^65535)){t.msg="invalid stored block lengths";n.mode=lit;break}n.length=u&65535;u=0;l=0;n.mode=Qrt;if(e===Srt){break t}case Qrt:n.mode=Xrt;case Xrt:d=n.length;if(d){if(d>a){d=a}if(d>c){d=c}if(d===0){break t}Tet(r,s,i,d,o);a-=d;i+=d;c-=d;o+=d;n.length-=d;break}n.mode=Yrt;break;case qrt:while(l<14){if(a===0){break t}a--;u+=s[i++]<<l;l+=8}n.nlen=(u&31)+257;u>>>=5;l-=5;n.ndist=(u&31)+1;u>>>=5;l-=5;n.ncode=(u&15)+4;u>>>=4;l-=4;if(n.nlen>286||n.ndist>30){t.msg="too many length or distance symbols";n.mode=lit;break}n.have=0;n.mode=Jrt;case Jrt:while(n.have<n.ncode){while(l<3){if(a===0){break t}a--;u+=s[i++]<<l;l+=8}n.lens[M[n.have++]]=u&7;u>>>=3;l-=3}while(n.have<19){n.lens[M[n.have++]]=0}n.lencode=n.lendyn;n.lenbits=7;S={bits:n.lenbits};C=vrt(xrt,n.lens,0,19,n.lencode,0,n.work,S);n.lenbits=S.bits;if(C){t.msg="invalid code lengths set";n.mode=lit;break}n.have=0;n.mode=Krt;case Krt:while(n.have<n.nlen+n.ndist){for(;;){b=n.lencode[u&(1<<n.lenbits)-1];y=b>>>24;g=b>>>16&255;w=b&65535;if(y<=l){break}if(a===0){break t}a--;u+=s[i++]<<l;l+=8}if(w<16){u>>>=y;l-=y;n.lens[n.have++]=w}else{if(w===16){I=y+2;while(l<I){if(a===0){break t}a--;u+=s[i++]<<l;l+=8}u>>>=y;l-=y;if(n.have===0){t.msg="invalid bit length repeat";n.mode=lit;break}k=n.lens[n.have-1];d=3+(u&3);u>>>=2;l-=2}else if(w===17){I=y+3;while(l<I){if(a===0){break t}a--;u+=s[i++]<<l;l+=8}u>>>=y;l-=y;k=0;d=3+(u&7);u>>>=3;l-=3}else{I=y+7;while(l<I){if(a===0){break t}a--;u+=s[i++]<<l;l+=8}u>>>=y;l-=y;k=0;d=11+(u&127);u>>>=7;l-=7}if(n.have+d>n.nlen+n.ndist){t.msg="invalid bit length repeat";n.mode=lit;break}while(d--){n.lens[n.have++]=k}}}if(n.mode===lit){break}if(n.lens[256]===0){t.msg="invalid code -- missing end-of-block";n.mode=lit;break}n.lenbits=9;S={bits:n.lenbits};C=vrt(Nrt,n.lens,0,n.nlen,n.lencode,0,n.work,S);n.lenbits=S.bits;if(C){t.msg="invalid literal/lengths set";n.mode=lit;break}n.distbits=6;n.distcode=n.distdyn;S={bits:n.distbits};C=vrt(krt,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,S);n.distbits=S.bits;if(C){t.msg="invalid distances set";n.mode=lit;break}n.mode=tit;if(e===Srt){break t}case tit:n.mode=eit;case eit:if(a>=6&&c>=258){t.next_out=o;t.avail_out=c;t.next_in=i;t.avail_in=a;n.hold=u;n.bits=l;urt(t,h);o=t.next_out;r=t.output;c=t.avail_out;i=t.next_in;s=t.input;a=t.avail_in;u=n.hold;l=n.bits;if(n.mode===Yrt){n.back=-1}break}n.back=0;for(;;){b=n.lencode[u&(1<<n.lenbits)-1];y=b>>>24;g=b>>>16&255;w=b&65535;if(y<=l){break}if(a===0){break t}a--;u+=s[i++]<<l;l+=8}if(g&&(g&240)===0){v=y;x=g;N=w;for(;;){b=n.lencode[N+((u&(1<<v+x)-1)>>v)];y=b>>>24;g=b>>>16&255;w=b&65535;if(v+y<=l){break}if(a===0){break t}a--;u+=s[i++]<<l;l+=8}u>>>=v;l-=v;n.back+=v}u>>>=y;l-=y;n.back+=y;n.length=w;if(g===0){n.mode=oit;break}if(g&32){n.back=-1;n.mode=Yrt;break}if(g&64){t.msg="invalid literal/length code";n.mode=lit;break}n.extra=g&15;n.mode=nit;case nit:if(n.extra){I=n.extra;while(l<I){if(a===0){break t}a--;u+=s[i++]<<l;l+=8}n.length+=u&(1<<n.extra)-1;u>>>=n.extra;l-=n.extra;n.back+=n.extra}n.was=n.length;n.mode=sit;case sit:for(;;){b=n.distcode[u&(1<<n.distbits)-1];y=b>>>24;g=b>>>16&255;w=b&65535;if(y<=l){break}if(a===0){break t}a--;u+=s[i++]<<l;l+=8}if((g&240)===0){v=y;x=g;N=w;for(;;){b=n.distcode[N+((u&(1<<v+x)-1)>>v)];y=b>>>24;g=b>>>16&255;w=b&65535;if(v+y<=l){break}if(a===0){break t}a--;u+=s[i++]<<l;l+=8}u>>>=v;l-=v;n.back+=v}u>>>=y;l-=y;n.back+=y;if(g&64){t.msg="invalid distance code";n.mode=lit;break}n.offset=w;n.extra=g&15;n.mode=rit;case rit:if(n.extra){I=n.extra;while(l<I){if(a===0){break t}a--;u+=s[i++]<<l;l+=8}n.offset+=u&(1<<n.extra)-1;u>>>=n.extra;l-=n.extra;n.back+=n.extra}if(n.offset>n.dmax){t.msg="invalid distance too far back";n.mode=lit;break}n.mode=iit;case iit:if(c===0){break t}d=h-c;if(n.offset>d){d=n.offset-d;if(d>n.whave){if(n.sane){t.msg="invalid distance too far back";n.mode=lit;break}}if(d>n.wnext){d-=n.wnext;p=n.wsize-d}else{p=n.wnext-d}if(d>n.length){d=n.length}m=n.window}else{m=r;p=o-n.offset;d=n.length}if(d>c){d=c}c-=d;n.length-=d;do{r[o++]=m[p++]}while(--d);if(n.length===0){n.mode=eit}break;case oit:if(c===0){break t}r[o++]=n.length;c--;n.mode=eit;break;case ait:if(n.wrap){while(l<32){if(a===0){break t}a--;u|=s[i++]<<l;l+=8}h-=c;t.total_out+=h;n.total+=h;if(h){t.adler=n.check=n.flags?Qnt(n.check,r,h,o-h):Ynt(n.check,r,h,o-h)}h=c;if((n.flags?u:mit(u))!==n.check){t.msg="incorrect data check";n.mode=lit;break}u=0;l=0}n.mode=cit;case cit:if(n.wrap&&n.flags){while(l<32){if(a===0){break t}a--;u+=s[i++]<<l;l+=8}if(u!==(n.total&4294967295)){t.msg="incorrect length check";n.mode=lit;break}u=0;l=0}n.mode=uit;case uit:C=Mrt;break t;case lit:C=Art;break t;case fit:return Drt;case hit:default:return Trt}}t.next_out=o;t.avail_out=c;t.next_in=i;t.avail_in=a;n.hold=u;n.bits=l;if(n.wsize||h!==t.avail_out&&n.mode<lit&&(n.mode<ait||e!==Crt)){if($it(t,t.output,t.next_out,h-t.avail_out));}f-=t.avail_in;h-=t.avail_out;t.total_in+=f;t.total_out+=h;n.total+=h;if(n.wrap&&h){t.adler=n.check=n.flags?Qnt(n.check,r,h,t.next_out-h):Ynt(n.check,r,h,t.next_out-h)}t.data_type=n.bits+(n.last?64:0)+(n.mode===Yrt?128:0)+(n.mode===tit||n.mode===Qrt?256:0);if((f===0&&h===0||e===Crt)&&C===Irt){C=Rrt}return C}function Iit(t){if(!t||!t.state){return Trt}var e=t.state;if(e.window){e.window=null}t.state=null;return Irt}var Mit=0;var Eit=1;var Tit=2;var Ait=3;var Dit=4;var Rit=5;var Oit=6;var Lit=7;var _it=0,Fit=1,zit=2,jit=3,Pit=4,Bit=5,Wit=6,Git=0,Vit=1,Uit=2,Yit=-1,Hit=-2,Zit=-3,Qit=-5,Xit=0,qit=1,Jit=9,Kit=-1,tot=1,eot=2,not=3,sot=4,rot=0,iot=0,oot=1,aot=2,cot=8;function uot(t){if(t<Eit||t>Lit)throw new TypeError("Bad argument");this.mode=t;this.init_done=false;this.write_in_progress=false;this.pending_close=false;this.windowBits=0;this.level=0;this.memLevel=0;this.strategy=0;this.dictionary=null}uot.prototype.init=function(t,e,n,s,r){this.windowBits=t;this.level=e;this.memLevel=n;this.strategy=s;if(this.mode===Ait||this.mode===Dit)this.windowBits+=16;if(this.mode===Lit)this.windowBits+=32;if(this.mode===Rit||this.mode===Oit)this.windowBits=-this.windowBits;this.strm=new Eet;var i;switch(this.mode){case Eit:case Ait:case Rit:i=rrt(this.strm,this.level,cot,this.windowBits,this.memLevel,this.strategy);break;case Tit:case Dit:case Oit:case Lit:i=vit(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}if(i!==Git){this._error(i);return}this.write_in_progress=false;this.init_done=true};uot.prototype.params=function(){throw new Error("deflateParams Not supported")};uot.prototype._writeCheck=function(){if(!this.init_done)throw new Error("write before init");if(this.mode===Mit)throw new Error("already finalized");if(this.write_in_progress)throw new Error("write already in progress");if(this.pending_close)throw new Error("close is pending")};uot.prototype.write=function(t,e,n,s,r,i,o){this._writeCheck();this.write_in_progress=true;var a=this;v.nextTick((function(){a.write_in_progress=false;var c=a._write(t,e,n,s,r,i,o);a.callback(c[0],c[1]);if(a.pending_close)a.close()}));return this};function lot(t,e){for(var n=0;n<t.length;n++){this[e+n]=t[n]}}uot.prototype.writeSync=function(t,e,n,s,r,i,o){this._writeCheck();return this._write(t,e,n,s,r,i,o)};uot.prototype._write=function(t,e,n,s,r,i,o){this.write_in_progress=true;if(t!==_it&&t!==Fit&&t!==zit&&t!==jit&&t!==Pit&&t!==Bit){throw new Error("Invalid flush value")}if(e==null){e=new Go(0);s=0;n=0}if(r._set)r.set=r._set;else r.set=lot;var a=this.strm;a.avail_in=s;a.input=e;a.next_in=n;a.avail_out=o;a.output=r;a.next_out=i;var c;switch(this.mode){case Eit:case Ait:case Rit:c=irt(a,t);break;case Lit:case Tit:case Dit:case Oit:c=Sit(a,t);break;default:throw new Error("Unknown mode "+this.mode)}if(c!==Vit&&c!==Git){this._error(c)}this.write_in_progress=false;return[a.avail_in,a.avail_out]};uot.prototype.close=function(){if(this.write_in_progress){this.pending_close=true;return}this.pending_close=false;if(this.mode===Eit||this.mode===Ait||this.mode===Rit){ort(this.strm)}else{Iit(this.strm)}this.mode=Mit};var fot;uot.prototype.reset=function(){switch(this.mode){case Eit:case Rit:fot=srt(this.strm);break;case Tit:case Oit:fot=git(this.strm);break}if(fot!==Git){this._error(fot)}};uot.prototype._error=function(t){this.onerror(Met[t]+": "+this.strm.msg,t);this.write_in_progress=false;if(this.pending_close)this.close()};var hot=Object.freeze({__proto__:null,DEFLATE:Eit,DEFLATERAW:Rit,GUNZIP:Dit,GZIP:Ait,INFLATE:Tit,INFLATERAW:Oit,NONE:Mit,UNZIP:Lit,Z_BEST_COMPRESSION:Jit,Z_BEST_SPEED:qit,Z_BINARY:iot,Z_BLOCK:Bit,Z_BUF_ERROR:Qit,Z_DATA_ERROR:Zit,Z_DEFAULT_COMPRESSION:Kit,Z_DEFAULT_STRATEGY:rot,Z_DEFLATED:cot,Z_ERRNO:Yit,Z_FILTERED:tot,Z_FINISH:Pit,Z_FIXED:sot,Z_FULL_FLUSH:jit,Z_HUFFMAN_ONLY:eot,Z_NEED_DICT:Uit,Z_NO_COMPRESSION:Xit,Z_NO_FLUSH:_it,Z_OK:Git,Z_PARTIAL_FLUSH:Fit,Z_RLE:not,Z_STREAM_END:Vit,Z_STREAM_ERROR:Hit,Z_SYNC_FLUSH:zit,Z_TEXT:oot,Z_TREES:Wit,Z_UNKNOWN:aot,Zlib:uot});function dot(t,e){if(!t){throw new Error(e)}}var pot={};Object.keys(hot).forEach((function(t){pot[t]=hot[t]}));pot.Z_MIN_WINDOWBITS=8;pot.Z_MAX_WINDOWBITS=15;pot.Z_DEFAULT_WINDOWBITS=15;pot.Z_MIN_CHUNK=64;pot.Z_MAX_CHUNK=Infinity;pot.Z_DEFAULT_CHUNK=16*1024;pot.Z_MIN_MEMLEVEL=1;pot.Z_MAX_MEMLEVEL=9;pot.Z_DEFAULT_MEMLEVEL=8;pot.Z_MIN_LEVEL=-1;pot.Z_MAX_LEVEL=9;pot.Z_DEFAULT_LEVEL=pot.Z_DEFAULT_COMPRESSION;var mot={Z_OK:pot.Z_OK,Z_STREAM_END:pot.Z_STREAM_END,Z_NEED_DICT:pot.Z_NEED_DICT,Z_ERRNO:pot.Z_ERRNO,Z_STREAM_ERROR:pot.Z_STREAM_ERROR,Z_DATA_ERROR:pot.Z_DATA_ERROR,Z_MEM_ERROR:pot.Z_MEM_ERROR,Z_BUF_ERROR:pot.Z_BUF_ERROR,Z_VERSION_ERROR:pot.Z_VERSION_ERROR};Object.keys(mot).forEach((function(t){mot[mot[t]]=t}));function bot(t){return new jot(t)}function yot(t){return new Pot(t)}function got(t){return new Got(t)}function wot(t){return new Vot(t)}function vot(t){return new Bot(t)}function xot(t){return new Wot(t)}function Not(t){return new Uot(t)}function kot(t,e,n){if(typeof e==="function"){n=e;e={}}return Fot(new jot(e),t,n)}function Cot(t,e){return zot(new jot(e),t)}function $ot(t,e,n){if(typeof e==="function"){n=e;e={}}return Fot(new Bot(e),t,n)}function Sot(t,e){return zot(new Bot(e),t)}function Iot(t,e,n){if(typeof e==="function"){n=e;e={}}return Fot(new Got(e),t,n)}function Mot(t,e){return zot(new Got(e),t)}function Eot(t,e,n){if(typeof e==="function"){n=e;e={}}return Fot(new Uot(e),t,n)}function Tot(t,e){return zot(new Uot(e),t)}function Aot(t,e,n){if(typeof e==="function"){n=e;e={}}return Fot(new Pot(e),t,n)}function Dot(t,e){return zot(new Pot(e),t)}function Rot(t,e,n){if(typeof e==="function"){n=e;e={}}return Fot(new Wot(e),t,n)}function Oot(t,e){return zot(new Wot(e),t)}function Lot(t,e,n){if(typeof e==="function"){n=e;e={}}return Fot(new Vot(e),t,n)}function _ot(t,e){return zot(new Vot(e),t)}function Fot(t,e,n){var s=[];var r=0;t.on("error",o);t.on("end",a);t.end(e);i();function i(){var e;while(null!==(e=t.read())){s.push(e);r+=e.length}t.once("readable",i)}function o(e){t.removeListener("end",a);t.removeListener("readable",i);n(e)}function a(){var e=Go.concat(s,r);s=[];n(null,e);t.close()}}function zot(t,e){if(typeof e==="string")e=new Go(e);if(!Go.isBuffer(e))throw new TypeError("Not a string or buffer");var n=pot.Z_FINISH;return t._processChunk(e,n)}function jot(t){if(!(this instanceof jot))return new jot(t);Yot.call(this,t,pot.DEFLATE)}function Pot(t){if(!(this instanceof Pot))return new Pot(t);Yot.call(this,t,pot.INFLATE)}function Bot(t){if(!(this instanceof Bot))return new Bot(t);Yot.call(this,t,pot.GZIP)}function Wot(t){if(!(this instanceof Wot))return new Wot(t);Yot.call(this,t,pot.GUNZIP)}function Got(t){if(!(this instanceof Got))return new Got(t);Yot.call(this,t,pot.DEFLATERAW)}function Vot(t){if(!(this instanceof Vot))return new Vot(t);Yot.call(this,t,pot.INFLATERAW)}function Uot(t){if(!(this instanceof Uot))return new Uot(t);Yot.call(this,t,pot.UNZIP)}function Yot(t,e){this._opts=t=t||{};this._chunkSize=t.chunkSize||pot.Z_DEFAULT_CHUNK;vet.call(this,t);if(t.flush){if(t.flush!==pot.Z_NO_FLUSH&&t.flush!==pot.Z_PARTIAL_FLUSH&&t.flush!==pot.Z_SYNC_FLUSH&&t.flush!==pot.Z_FULL_FLUSH&&t.flush!==pot.Z_FINISH&&t.flush!==pot.Z_BLOCK){throw new Error("Invalid flush flag: "+t.flush)}}this._flushFlag=t.flush||pot.Z_NO_FLUSH;if(t.chunkSize){if(t.chunkSize<pot.Z_MIN_CHUNK||t.chunkSize>pot.Z_MAX_CHUNK){throw new Error("Invalid chunk size: "+t.chunkSize)}}if(t.windowBits){if(t.windowBits<pot.Z_MIN_WINDOWBITS||t.windowBits>pot.Z_MAX_WINDOWBITS){throw new Error("Invalid windowBits: "+t.windowBits)}}if(t.level){if(t.level<pot.Z_MIN_LEVEL||t.level>pot.Z_MAX_LEVEL){throw new Error("Invalid compression level: "+t.level)}}if(t.memLevel){if(t.memLevel<pot.Z_MIN_MEMLEVEL||t.memLevel>pot.Z_MAX_MEMLEVEL){throw new Error("Invalid memLevel: "+t.memLevel)}}if(t.strategy){if(t.strategy!=pot.Z_FILTERED&&t.strategy!=pot.Z_HUFFMAN_ONLY&&t.strategy!=pot.Z_RLE&&t.strategy!=pot.Z_FIXED&&t.strategy!=pot.Z_DEFAULT_STRATEGY){throw new Error("Invalid strategy: "+t.strategy)}}if(t.dictionary){if(!Go.isBuffer(t.dictionary)){throw new Error("Invalid dictionary: it should be a Buffer instance")}}this._binding=new pot.Zlib(e);var n=this;this._hadError=false;this._binding.onerror=function(t,e){n._binding=null;n._hadError=true;var s=new Error(t);s.errno=e;s.code=pot.codes[e];n.emit("error",s)};var s=pot.Z_DEFAULT_COMPRESSION;if(typeof t.level==="number")s=t.level;var r=pot.Z_DEFAULT_STRATEGY;if(typeof t.strategy==="number")r=t.strategy;this._binding.init(t.windowBits||pot.Z_DEFAULT_WINDOWBITS,s,t.memLevel||pot.Z_DEFAULT_MEMLEVEL,r,t.dictionary);this._buffer=new Go(this._chunkSize);this._offset=0;this._closed=false;this._level=s;this._strategy=r;this.once("end",this.close)}ott.inherits(Yot,vet);Yot.prototype.params=function(t,e,n){if(t<pot.Z_MIN_LEVEL||t>pot.Z_MAX_LEVEL){throw new RangeError("Invalid compression level: "+t)}if(e!=pot.Z_FILTERED&&e!=pot.Z_HUFFMAN_ONLY&&e!=pot.Z_RLE&&e!=pot.Z_FIXED&&e!=pot.Z_DEFAULT_STRATEGY){throw new TypeError("Invalid strategy: "+e)}if(this._level!==t||this._strategy!==e){var s=this;this.flush(pot.Z_SYNC_FLUSH,(function(){s._binding.params(t,e);if(!s._hadError){s._level=t;s._strategy=e;if(n)n()}}))}else{v.nextTick(n)}};Yot.prototype.reset=function(){return this._binding.reset()};Yot.prototype._flush=function(t){this._transform(new Go(0),"",t)};Yot.prototype.flush=function(t,e){var n=this._writableState;if(typeof t==="function"||t===void 0&&!e){e=t;t=pot.Z_FULL_FLUSH}if(n.ended){if(e)v.nextTick(e)}else if(n.ending){if(e)this.once("end",e)}else if(n.needDrain){var s=this;this.once("drain",(function(){s.flush(e)}))}else{this._flushFlag=t;this.write(new Go(0),"",e)}};Yot.prototype.close=function(t){if(t)v.nextTick(t);if(this._closed)return;this._closed=true;this._binding.close();var e=this;v.nextTick((function(){e.emit("close")}))};Yot.prototype._transform=function(t,e,n){var s;var r=this._writableState;var i=r.ending||r.ended;var o=i&&(!t||r.length===t.length);if(!t===null&&!Go.isBuffer(t))return n(new Error("invalid input"));if(o)s=pot.Z_FINISH;else{s=this._flushFlag;if(t.length>=r.length){this._flushFlag=this._opts.flush||pot.Z_NO_FLUSH}}this._processChunk(t,s,n)};Yot.prototype._processChunk=function(t,e,n){var s=t&&t.length;var r=this._chunkSize-this._offset;var i=0;var o=this;var a=typeof n==="function";if(!a){var c=[];var u=0;var l;this.on("error",(function(t){l=t}));do{var f=this._binding.writeSync(e,t,i,s,this._buffer,this._offset,r)}while(!this._hadError&&p(f[0],f[1]));if(this._hadError){throw l}var h=Go.concat(c,u);this.close();return h}var d=this._binding.write(e,t,i,s,this._buffer,this._offset,r);d.buffer=t;d.callback=p;function p(l,f){if(o._hadError)return;var h=r-f;dot(h>=0,"have should not go down");if(h>0){var d=o._buffer.slice(o._offset,o._offset+h);o._offset+=h;if(a){o.push(d)}else{c.push(d);u+=d.length}}if(f===0||o._offset>=o._chunkSize){r=o._chunkSize;o._offset=0;o._buffer=new Go(o._chunkSize)}if(f===0){i+=s-l;s=l;if(!a)return true;var m=o._binding.write(e,t,i,s,o._buffer,o._offset,o._chunkSize);m.callback=p;m.buffer=t;return}if(!a)return false;n()}};ott.inherits(jot,Yot);ott.inherits(Pot,Yot);ott.inherits(Bot,Yot);ott.inherits(Wot,Yot);ott.inherits(Got,Yot);ott.inherits(Vot,Yot);ott.inherits(Uot,Yot);var Hot={codes:mot,createDeflate:bot,createInflate:yot,createDeflateRaw:got,createInflateRaw:wot,createGzip:vot,createGunzip:xot,createUnzip:Not,deflate:kot,deflateSync:Cot,gzip:$ot,gzipSync:Sot,deflateRaw:Iot,deflateRawSync:Mot,unzip:Eot,unzipSync:Tot,inflate:Aot,inflateSync:Dot,gunzip:Rot,gunzipSync:Oot,inflateRaw:Lot,inflateRawSync:_ot,Deflate:jot,Inflate:Pot,Gzip:Bot,Gunzip:Wot,DeflateRaw:Got,InflateRaw:Vot,Unzip:Uot,Zlib:Yot};var Zot=Object.freeze({__proto__:null,Deflate:jot,DeflateRaw:Got,Gunzip:Wot,Gzip:Bot,Inflate:Pot,InflateRaw:Vot,Unzip:Uot,Zlib:Yot,codes:mot,createDeflate:bot,createDeflateRaw:got,createGunzip:xot,createGzip:vot,createInflate:yot,createInflateRaw:wot,createUnzip:Not,default:Hot,deflate:kot,deflateRaw:Iot,deflateRawSync:Mot,deflateSync:Cot,gunzip:Rot,gunzipSync:Oot,gzip:$ot,gzipSync:Sot,inflate:Aot,inflateRaw:Lot,inflateRawSync:_ot,inflateSync:Dot,unzip:Eot,unzipSync:Tot});var Qot=f(Zot);var Xot={exports:{}};var qot;function Jot(){if(qot)return Xot.exports;qot=1;let t=G7();let e=$et;let n=Xot.exports=function(){e.call(this);this._buffers=[];this._buffered=0;this._reads=[];this._paused=false;this._encoding="utf8";this.writable=true};t.inherits(n,e);n.prototype.read=function(t,e){this._reads.push({length:Math.abs(t),allowLess:t<0,func:e});v.nextTick(function(){this._process();if(this._paused&&this._reads&&this._reads.length>0){this._paused=false;this.emit("drain")}}.bind(this))};n.prototype.write=function(t,e){if(!this.writable){this.emit("error",new Error("Stream not writable"));return false}let n;if(Go.isBuffer(t)){n=t}else{n=Go.from(t,e||this._encoding)}this._buffers.push(n);this._buffered+=n.length;this._process();if(this._reads&&this._reads.length===0){this._paused=true}return this.writable&&!this._paused};n.prototype.end=function(t,e){if(t){this.write(t,e)}this.writable=false;if(!this._buffers){return}if(this._buffers.length===0){this._end()}else{this._buffers.push(null);this._process()}};n.prototype.destroySoon=n.prototype.end;n.prototype._end=function(){if(this._reads.length>0){this.emit("error",new Error("Unexpected end of input"))}this.destroy()};n.prototype.destroy=function(){if(!this._buffers){return}this.writable=false;this._reads=null;this._buffers=null;this.emit("close")};n.prototype._processReadAllowingLess=function(t){this._reads.shift();let e=this._buffers[0];if(e.length>t.length){this._buffered-=t.length;this._buffers[0]=e.slice(t.length);t.func.call(this,e.slice(0,t.length))}else{this._buffered-=e.length;this._buffers.shift();t.func.call(this,e)}};n.prototype._processRead=function(t){this._reads.shift();let e=0;let n=0;let s=Go.alloc(t.length);while(e<t.length){let r=this._buffers[n++];let i=Math.min(r.length,t.length-e);r.copy(s,e,0,i);e+=i;if(i!==r.length){this._buffers[--n]=r.slice(i)}}if(n>0){this._buffers.splice(0,n)}this._buffered-=t.length;t.func.call(this,s)};n.prototype._process=function(){try{while(this._buffered>0&&this._reads&&this._reads.length>0){let t=this._reads[0];if(t.allowLess){this._processReadAllowingLess(t)}else if(this._buffered>=t.length){this._processRead(t)}else{break}}if(this._buffers&&!this.writable){this._end()}}catch(t){this.emit("error",t)}};return Xot.exports}var Kot={exports:{}};var tat={exports:{}};var eat={};var nat;function sat(){if(nat)return eat;nat=1;let t=[{x:[0],y:[0]},{x:[4],y:[0]},{x:[0,4],y:[4]},{x:[2,6],y:[0,4]},{x:[0,2,4,6],y:[2,6]},{x:[1,3,5,7],y:[0,2,4,6]},{x:[0,1,2,3,4,5,6,7],y:[1,3,5,7]}];eat.getImagePasses=function(e,n){let s=[];let r=e%8;let i=n%8;let o=(e-r)/8;let a=(n-i)/8;for(let e=0;e<t.length;e++){let n=t[e];let c=o*n.x.length;let u=a*n.y.length;for(let t=0;t<n.x.length;t++){if(n.x[t]<r){c++}else{break}}for(let t=0;t<n.y.length;t++){if(n.y[t]<i){u++}else{break}}if(c>0&&u>0){s.push({width:c,height:u,index:e})}}return s};eat.getInterlaceIterator=function(e){return function(n,s,r){let i=n%t[r].x.length;let o=(n-i)/t[r].x.length*8+t[r].x[i];let a=s%t[r].y.length;let c=(s-a)/t[r].y.length*8+t[r].y[a];return o*4+c*e*4}};return eat}var rat;var iat;function oat(){if(iat)return rat;iat=1;rat=function t(e,n,s){let r=e+n-s;let i=Math.abs(r-e);let o=Math.abs(r-n);let a=Math.abs(r-s);if(i<=o&&i<=a){return e}if(o<=a){return n}return s};return rat}var aat;function cat(){if(aat)return tat.exports;aat=1;let t=sat();let e=oat();function n(t,e,n){let s=t*e;if(n!==8){s=Math.ceil(s/(8/n))}return s}let s=tat.exports=function(e,s){let r=e.width;let i=e.height;let o=e.interlace;let a=e.bpp;let c=e.depth;this.read=s.read;this.write=s.write;this.complete=s.complete;this._imageIndex=0;this._images=[];if(o){let e=t.getImagePasses(r,i);for(let t=0;t<e.length;t++){this._images.push({byteWidth:n(e[t].width,a,c),height:e[t].height,lineIndex:0})}}else{this._images.push({byteWidth:n(r,a,c),height:i,lineIndex:0})}if(c===8){this._xComparison=a}else if(c===16){this._xComparison=a*2}else{this._xComparison=1}};s.prototype.start=function(){this.read(this._images[this._imageIndex].byteWidth+1,this._reverseFilterLine.bind(this))};s.prototype._unFilterType1=function(t,e,n){let s=this._xComparison;let r=s-1;for(let i=0;i<n;i++){let n=t[1+i];let o=i>r?e[i-s]:0;e[i]=n+o}};s.prototype._unFilterType2=function(t,e,n){let s=this._lastLine;for(let r=0;r<n;r++){let n=t[1+r];let i=s?s[r]:0;e[r]=n+i}};s.prototype._unFilterType3=function(t,e,n){let s=this._xComparison;let r=s-1;let i=this._lastLine;for(let o=0;o<n;o++){let n=t[1+o];let a=i?i[o]:0;let c=o>r?e[o-s]:0;let u=Math.floor((c+a)/2);e[o]=n+u}};s.prototype._unFilterType4=function(t,n,s){let r=this._xComparison;let i=r-1;let o=this._lastLine;for(let a=0;a<s;a++){let s=t[1+a];let c=o?o[a]:0;let u=a>i?n[a-r]:0;let l=a>i&&o?o[a-r]:0;let f=e(u,c,l);n[a]=s+f}};s.prototype._reverseFilterLine=function(t){let e=t[0];let n;let s=this._images[this._imageIndex];let r=s.byteWidth;if(e===0){n=t.slice(1,r+1)}else{n=Go.alloc(r);switch(e){case 1:this._unFilterType1(t,n,r);break;case 2:this._unFilterType2(t,n,r);break;case 3:this._unFilterType3(t,n,r);break;case 4:this._unFilterType4(t,n,r);break;default:throw new Error("Unrecognised filter type - "+e)}}this.write(n);s.lineIndex++;if(s.lineIndex>=s.height){this._lastLine=null;this._imageIndex++;s=this._images[this._imageIndex]}else{this._lastLine=n}if(s){this.read(s.byteWidth+1,this._reverseFilterLine.bind(this))}else{this._lastLine=null;this.complete()}};return tat.exports}var uat;function lat(){if(uat)return Kot.exports;uat=1;let t=G7();let e=Jot();let n=cat();let s=Kot.exports=function(t){e.call(this);let s=[];let r=this;this._filter=new n(t,{read:this.read.bind(this),write:function(t){s.push(t)},complete:function(){r.emit("complete",Go.concat(s))}});this._filter.start()};t.inherits(s,e);return Kot.exports}var fat={exports:{}};var hat;var dat;function pat(){if(dat)return hat;dat=1;hat={PNG_SIGNATURE:[137,80,78,71,13,10,26,10],TYPE_IHDR:1229472850,TYPE_IEND:1229278788,TYPE_IDAT:1229209940,TYPE_PLTE:1347179589,TYPE_tRNS:1951551059,TYPE_gAMA:1732332865,COLORTYPE_GRAYSCALE:0,COLORTYPE_PALETTE:1,COLORTYPE_COLOR:2,COLORTYPE_ALPHA:4,COLORTYPE_PALETTE_COLOR:3,COLORTYPE_COLOR_ALPHA:6,COLORTYPE_TO_BPP_MAP:{0:1,2:3,3:1,4:2,6:4},GAMMA_DIVISION:1e5};return hat}var mat={exports:{}};var bat;function yat(){if(bat)return mat.exports;bat=1;let t=[];(function(){for(let e=0;e<256;e++){let n=e;for(let t=0;t<8;t++){if(n&1){n=3988292384^n>>>1}else{n=n>>>1}}t[e]=n}})();let e=mat.exports=function(){this._crc=-1};e.prototype.write=function(e){for(let n=0;n<e.length;n++){this._crc=t[(this._crc^e[n])&255]^this._crc>>>8}return true};e.prototype.crc32=function(){return this._crc^-1};e.crc32=function(e){let n=-1;for(let s=0;s<e.length;s++){n=t[(n^e[s])&255]^n>>>8}return n^-1};return mat.exports}var gat;function wat(){if(gat)return fat.exports;gat=1;let t=pat();let e=yat();let n=fat.exports=function(e,n){this._options=e;e.checkCRC=e.checkCRC!==false;this._hasIHDR=false;this._hasIEND=false;this._emittedHeadersFinished=false;this._palette=[];this._colorType=0;this._chunks={};this._chunks[t.TYPE_IHDR]=this._handleIHDR.bind(this);this._chunks[t.TYPE_IEND]=this._handleIEND.bind(this);this._chunks[t.TYPE_IDAT]=this._handleIDAT.bind(this);this._chunks[t.TYPE_PLTE]=this._handlePLTE.bind(this);this._chunks[t.TYPE_tRNS]=this._handleTRNS.bind(this);this._chunks[t.TYPE_gAMA]=this._handleGAMA.bind(this);this.read=n.read;this.error=n.error;this.metadata=n.metadata;this.gamma=n.gamma;this.transColor=n.transColor;this.palette=n.palette;this.parsed=n.parsed;this.inflateData=n.inflateData;this.finished=n.finished;this.simpleTransparency=n.simpleTransparency;this.headersFinished=n.headersFinished||function(){}};n.prototype.start=function(){this.read(t.PNG_SIGNATURE.length,this._parseSignature.bind(this))};n.prototype._parseSignature=function(e){let n=t.PNG_SIGNATURE;for(let t=0;t<n.length;t++){if(e[t]!==n[t]){this.error(new Error("Invalid file signature"));return}}this.read(8,this._parseChunkBegin.bind(this))};n.prototype._parseChunkBegin=function(n){let s=n.readUInt32BE(0);let r=n.readUInt32BE(4);let i="";for(let t=4;t<8;t++){i+=String.fromCharCode(n[t])}let o=Boolean(n[4]&32);if(!this._hasIHDR&&r!==t.TYPE_IHDR){this.error(new Error("Expected IHDR on beggining"));return}this._crc=new e;this._crc.write(Go.from(i));if(this._chunks[r]){return this._chunks[r](s)}if(!o){this.error(new Error("Unsupported critical chunk type "+i));return}this.read(s+4,this._skipChunk.bind(this))};n.prototype._skipChunk=function(){this.read(8,this._parseChunkBegin.bind(this))};n.prototype._handleChunkEnd=function(){this.read(4,this._parseChunkEnd.bind(this))};n.prototype._parseChunkEnd=function(t){let e=t.readInt32BE(0);let n=this._crc.crc32();if(this._options.checkCRC&&n!==e){this.error(new Error("Crc error - "+e+" - "+n));return}if(!this._hasIEND){this.read(8,this._parseChunkBegin.bind(this))}};n.prototype._handleIHDR=function(t){this.read(t,this._parseIHDR.bind(this))};n.prototype._parseIHDR=function(e){this._crc.write(e);let n=e.readUInt32BE(0);let s=e.readUInt32BE(4);let r=e[8];let i=e[9];let o=e[10];let a=e[11];let c=e[12];if(r!==8&&r!==4&&r!==2&&r!==1&&r!==16){this.error(new Error("Unsupported bit depth "+r));return}if(!(i in t.COLORTYPE_TO_BPP_MAP)){this.error(new Error("Unsupported color type"));return}if(o!==0){this.error(new Error("Unsupported compression method"));return}if(a!==0){this.error(new Error("Unsupported filter method"));return}if(c!==0&&c!==1){this.error(new Error("Unsupported interlace method"));return}this._colorType=i;let u=t.COLORTYPE_TO_BPP_MAP[this._colorType];this._hasIHDR=true;this.metadata({width:n,height:s,depth:r,interlace:Boolean(c),palette:Boolean(i&t.COLORTYPE_PALETTE),color:Boolean(i&t.COLORTYPE_COLOR),alpha:Boolean(i&t.COLORTYPE_ALPHA),bpp:u,colorType:i});this._handleChunkEnd()};n.prototype._handlePLTE=function(t){this.read(t,this._parsePLTE.bind(this))};n.prototype._parsePLTE=function(t){this._crc.write(t);let e=Math.floor(t.length/3);for(let n=0;n<e;n++){this._palette.push([t[n*3],t[n*3+1],t[n*3+2],255])}this.palette(this._palette);this._handleChunkEnd()};n.prototype._handleTRNS=function(t){this.simpleTransparency();this.read(t,this._parseTRNS.bind(this))};n.prototype._parseTRNS=function(e){this._crc.write(e);if(this._colorType===t.COLORTYPE_PALETTE_COLOR){if(this._palette.length===0){this.error(new Error("Transparency chunk must be after palette"));return}if(e.length>this._palette.length){this.error(new Error("More transparent colors than palette size"));return}for(let t=0;t<e.length;t++){this._palette[t][3]=e[t]}this.palette(this._palette)}if(this._colorType===t.COLORTYPE_GRAYSCALE){this.transColor([e.readUInt16BE(0)])}if(this._colorType===t.COLORTYPE_COLOR){this.transColor([e.readUInt16BE(0),e.readUInt16BE(2),e.readUInt16BE(4)])}this._handleChunkEnd()};n.prototype._handleGAMA=function(t){this.read(t,this._parseGAMA.bind(this))};n.prototype._parseGAMA=function(e){this._crc.write(e);this.gamma(e.readUInt32BE(0)/t.GAMMA_DIVISION);this._handleChunkEnd()};n.prototype._handleIDAT=function(t){if(!this._emittedHeadersFinished){this._emittedHeadersFinished=true;this.headersFinished()}this.read(-t,this._parseIDAT.bind(this,t))};n.prototype._parseIDAT=function(e,n){this._crc.write(n);if(this._colorType===t.COLORTYPE_PALETTE_COLOR&&this._palette.length===0){throw new Error("Expected palette not found")}this.inflateData(n);let s=e-n.length;if(s>0){this._handleIDAT(s)}else{this._handleChunkEnd()}};n.prototype._handleIEND=function(t){this.read(t,this._parseIEND.bind(this))};n.prototype._parseIEND=function(t){this._crc.write(t);this._hasIEND=true;this._handleChunkEnd();if(this.finished){this.finished()}};return fat.exports}var vat={};var xat;function Nat(){if(xat)return vat;xat=1;let t=sat();let e=[function(){},function(t,e,n,s){if(s===e.length){throw new Error("Ran out of data")}let r=e[s];t[n]=r;t[n+1]=r;t[n+2]=r;t[n+3]=255},function(t,e,n,s){if(s+1>=e.length){throw new Error("Ran out of data")}let r=e[s];t[n]=r;t[n+1]=r;t[n+2]=r;t[n+3]=e[s+1]},function(t,e,n,s){if(s+2>=e.length){throw new Error("Ran out of data")}t[n]=e[s];t[n+1]=e[s+1];t[n+2]=e[s+2];t[n+3]=255},function(t,e,n,s){if(s+3>=e.length){throw new Error("Ran out of data")}t[n]=e[s];t[n+1]=e[s+1];t[n+2]=e[s+2];t[n+3]=e[s+3]}];let n=[function(){},function(t,e,n,s){let r=e[0];t[n]=r;t[n+1]=r;t[n+2]=r;t[n+3]=s},function(t,e,n){let s=e[0];t[n]=s;t[n+1]=s;t[n+2]=s;t[n+3]=e[1]},function(t,e,n,s){t[n]=e[0];t[n+1]=e[1];t[n+2]=e[2];t[n+3]=s},function(t,e,n){t[n]=e[0];t[n+1]=e[1];t[n+2]=e[2];t[n+3]=e[3]}];function s(t,e){let n=[];let s=0;function r(){if(s===t.length){throw new Error("Ran out of data")}let r=t[s];s++;let i,o,a,c,u,l,f,h;switch(e){default:throw new Error("unrecognised depth");case 16:f=t[s];s++;n.push((r<<8)+f);break;case 4:f=r&15;h=r>>4;n.push(h,f);break;case 2:u=r&3;l=r>>2&3;f=r>>4&3;h=r>>6&3;n.push(h,f,l,u);break;case 1:i=r&1;o=r>>1&1;a=r>>2&1;c=r>>3&1;u=r>>4&1;l=r>>5&1;f=r>>6&1;h=r>>7&1;n.push(h,f,l,u,c,a,o,i);break}}return{get:function(t){while(n.length<t){r()}let e=n.slice(0,t);n=n.slice(t);return e},resetAfterLine:function(){n.length=0},end:function(){if(s!==t.length){throw new Error("extra data found")}}}}function r(t,n,s,r,i,o){let a=t.width;let c=t.height;let u=t.index;for(let t=0;t<c;t++){for(let c=0;c<a;c++){let a=s(c,t,u);e[r](n,i,a,o);o+=r}}return o}function i(t,e,s,r,i,o){let a=t.width;let c=t.height;let u=t.index;for(let t=0;t<c;t++){for(let c=0;c<a;c++){let a=i.get(r);let l=s(c,t,u);n[r](e,a,l,o)}i.resetAfterLine()}}vat.dataToBitMap=function(e,n){let o=n.width;let a=n.height;let c=n.depth;let u=n.bpp;let l=n.interlace;let f;if(c!==8){f=s(e,c)}let h;if(c<=8){h=Go.alloc(o*a*4)}else{h=new Uint16Array(o*a*4)}let d=Math.pow(2,c)-1;let p=0;let m;let b;if(l){m=t.getImagePasses(o,a);b=t.getInterlaceIterator(o,a)}else{let t=0;b=function(){let e=t;t+=4;return e};m=[{width:o,height:a}]}for(let t=0;t<m.length;t++){if(c===8){p=r(m[t],h,b,u,e,p)}else{i(m[t],h,b,u,f,d)}}if(c===8){if(p!==e.length){throw new Error("extra data found")}}else{f.end()}return h};return vat}var kat;var Cat;function $at(){if(Cat)return kat;Cat=1;function t(t,e,n,s,r){let i=0;for(let o=0;o<s;o++){for(let s=0;s<n;s++){let n=r[t[i]];if(!n){throw new Error("index "+t[i]+" not in palette")}for(let t=0;t<4;t++){e[i+t]=n[t]}i+=4}}}function e(t,e,n,s,r){let i=0;for(let o=0;o<s;o++){for(let s=0;s<n;s++){let n=false;if(r.length===1){if(r[0]===t[i]){n=true}}else if(r[0]===t[i]&&r[1]===t[i+1]&&r[2]===t[i+2]){n=true}if(n){for(let t=0;t<4;t++){e[i+t]=0}}i+=4}}}function n(t,e,n,s,r){let i=255;let o=Math.pow(2,r)-1;let a=0;for(let r=0;r<s;r++){for(let s=0;s<n;s++){for(let n=0;n<4;n++){e[a+n]=Math.floor(t[a+n]*i/o+.5)}a+=4}}}kat=function(s,r){let i=r.depth;let o=r.width;let a=r.height;let c=r.colorType;let u=r.transColor;let l=r.palette;let f=s;if(c===3){t(s,f,o,a,l)}else{if(u){e(s,f,o,a,u)}if(i!==8){if(i===16){f=Go.alloc(o*a*4)}n(s,f,o,a,i)}}return f};return kat}var Sat;function Iat(){if(Sat)return Iet.exports;Sat=1;let t=G7();let e=Qot;let n=Jot();let s=lat();let r=wat();let i=Nat();let o=$at();let a=Iet.exports=function(t){n.call(this);this._parser=new r(t,{read:this.read.bind(this),error:this._handleError.bind(this),metadata:this._handleMetaData.bind(this),gamma:this.emit.bind(this,"gamma"),palette:this._handlePalette.bind(this),transColor:this._handleTransColor.bind(this),finished:this._finished.bind(this),inflateData:this._inflateData.bind(this),simpleTransparency:this._simpleTransparency.bind(this),headersFinished:this._headersFinished.bind(this)});this._options=t;this.writable=true;this._parser.start()};t.inherits(a,n);a.prototype._handleError=function(t){this.emit("error",t);this.writable=false;this.destroy();if(this._inflate&&this._inflate.destroy){this._inflate.destroy()}if(this._filter){this._filter.destroy();this._filter.on("error",(function(){}))}this.errord=true};a.prototype._inflateData=function(t){if(!this._inflate){if(this._bitmapInfo.interlace){this._inflate=e.createInflate();this._inflate.on("error",this.emit.bind(this,"error"));this._filter.on("complete",this._complete.bind(this));this._inflate.pipe(this._filter)}else{let t=(this._bitmapInfo.width*this._bitmapInfo.bpp*this._bitmapInfo.depth+7>>3)+1;let n=t*this._bitmapInfo.height;let s=Math.max(n,e.Z_MIN_CHUNK);this._inflate=e.createInflate({chunkSize:s});let r=n;let i=this.emit.bind(this,"error");this._inflate.on("error",(function(t){if(!r){return}i(t)}));this._filter.on("complete",this._complete.bind(this));let o=this._filter.write.bind(this._filter);this._inflate.on("data",(function(t){if(!r){return}if(t.length>r){t=t.slice(0,r)}r-=t.length;o(t)}));this._inflate.on("end",this._filter.end.bind(this._filter))}}this._inflate.write(t)};a.prototype._handleMetaData=function(t){this._metaData=t;this._bitmapInfo=Object.create(t);this._filter=new s(this._bitmapInfo)};a.prototype._handleTransColor=function(t){this._bitmapInfo.transColor=t};a.prototype._handlePalette=function(t){this._bitmapInfo.palette=t};a.prototype._simpleTransparency=function(){this._metaData.alpha=true};a.prototype._headersFinished=function(){this.emit("metadata",this._metaData)};a.prototype._finished=function(){if(this.errord){return}if(!this._inflate){this.emit("error","No Inflate block")}else{this._inflate.end()}};a.prototype._complete=function(t){if(this.errord){return}let e;try{let n=i.dataToBitMap(t,this._bitmapInfo);e=o(n,this._bitmapInfo);n=null}catch(t){this._handleError(t);return}this.emit("parsed",e)};return Iet.exports}var Mat={exports:{}};var Eat={exports:{}};var Tat;var Aat;function Dat(){if(Aat)return Tat;Aat=1;let t=pat();Tat=function(e,n,s,r){let i=[t.COLORTYPE_COLOR_ALPHA,t.COLORTYPE_ALPHA].indexOf(r.colorType)!==-1;if(r.colorType===r.inputColorType){let t=function(){let t=new ArrayBuffer(2);new DataView(t).setInt16(0,256,true);return new Int16Array(t)[0]!==256}();if(r.bitDepth===8||r.bitDepth===16&&t){return e}}let o=r.bitDepth!==16?e:new Uint16Array(e.buffer);let a=255;let c=t.COLORTYPE_TO_BPP_MAP[r.inputColorType];if(c===4&&!r.inputHasAlpha){c=3}let u=t.COLORTYPE_TO_BPP_MAP[r.colorType];if(r.bitDepth===16){a=65535;u*=2}let l=Go.alloc(n*s*u);let f=0;let h=0;let d=r.bgColor||{};if(d.red===undefined){d.red=a}if(d.green===undefined){d.green=a}if(d.blue===undefined){d.blue=a}function p(){let e;let n;let s;let c=a;switch(r.inputColorType){case t.COLORTYPE_COLOR_ALPHA:c=o[f+3];e=o[f];n=o[f+1];s=o[f+2];break;case t.COLORTYPE_COLOR:e=o[f];n=o[f+1];s=o[f+2];break;case t.COLORTYPE_ALPHA:c=o[f+1];e=o[f];n=e;s=e;break;case t.COLORTYPE_GRAYSCALE:e=o[f];n=e;s=e;break;default:throw new Error("input color type:"+r.inputColorType+" is not supported at present")}if(r.inputHasAlpha){if(!i){c/=a;e=Math.min(Math.max(Math.round((1-c)*d.red+c*e),0),a);n=Math.min(Math.max(Math.round((1-c)*d.green+c*n),0),a);s=Math.min(Math.max(Math.round((1-c)*d.blue+c*s),0),a)}}return{red:e,green:n,blue:s,alpha:c}}for(let e=0;e<s;e++){for(let e=0;e<n;e++){let e=p();switch(r.colorType){case t.COLORTYPE_COLOR_ALPHA:case t.COLORTYPE_COLOR:if(r.bitDepth===8){l[h]=e.red;l[h+1]=e.green;l[h+2]=e.blue;if(i){l[h+3]=e.alpha}}else{l.writeUInt16BE(e.red,h);l.writeUInt16BE(e.green,h+2);l.writeUInt16BE(e.blue,h+4);if(i){l.writeUInt16BE(e.alpha,h+6)}}break;case t.COLORTYPE_ALPHA:case t.COLORTYPE_GRAYSCALE:{let t=(e.red+e.green+e.blue)/3;if(r.bitDepth===8){l[h]=t;if(i){l[h+1]=e.alpha}}else{l.writeUInt16BE(t,h);if(i){l.writeUInt16BE(e.alpha,h+2)}}break}default:throw new Error("unrecognised color Type "+r.colorType)}f+=c;h+=u}}return l};return Tat}var Rat;var Oat;function Lat(){if(Oat)return Rat;Oat=1;let t=oat();function e(t,e,n,s,r){for(let i=0;i<n;i++){s[r+i]=t[e+i]}}function n(t,e,n){let s=0;let r=e+n;for(let n=e;n<r;n++){s+=Math.abs(t[n])}return s}function s(t,e,n,s,r,i){for(let o=0;o<n;o++){let n=o>=i?t[e+o-i]:0;let a=t[e+o]-n;s[r+o]=a}}function r(t,e,n,s){let r=0;for(let i=0;i<n;i++){let n=i>=s?t[e+i-s]:0;let o=t[e+i]-n;r+=Math.abs(o)}return r}function i(t,e,n,s,r){for(let i=0;i<n;i++){let o=e>0?t[e+i-n]:0;let a=t[e+i]-o;s[r+i]=a}}function o(t,e,n){let s=0;let r=e+n;for(let i=e;i<r;i++){let r=e>0?t[i-n]:0;let o=t[i]-r;s+=Math.abs(o)}return s}function a(t,e,n,s,r,i){for(let o=0;o<n;o++){let a=o>=i?t[e+o-i]:0;let c=e>0?t[e+o-n]:0;let u=t[e+o]-(a+c>>1);s[r+o]=u}}function c(t,e,n,s){let r=0;for(let i=0;i<n;i++){let o=i>=s?t[e+i-s]:0;let a=e>0?t[e+i-n]:0;let c=t[e+i]-(o+a>>1);r+=Math.abs(c)}return r}function u(e,n,s,r,i,o){for(let a=0;a<s;a++){let c=a>=o?e[n+a-o]:0;let u=n>0?e[n+a-s]:0;let l=n>0&&a>=o?e[n+a-(s+o)]:0;let f=e[n+a]-t(c,u,l);r[i+a]=f}}function l(e,n,s,r){let i=0;for(let o=0;o<s;o++){let a=o>=r?e[n+o-r]:0;let c=n>0?e[n+o-s]:0;let u=n>0&&o>=r?e[n+o-(s+r)]:0;let l=e[n+o]-t(a,c,u);i+=Math.abs(l)}return i}let f={0:e,1:s,2:i,3:a,4:u};let h={0:n,1:r,2:o,3:c,4:l};Rat=function(t,e,n,s,r){let i;if(!("filterType"in s)||s.filterType===-1){i=[0,1,2,3,4]}else if(typeof s.filterType==="number"){i=[s.filterType]}else{throw new Error("unrecognised filter types")}if(s.bitDepth===16){r*=2}let o=e*r;let a=0;let c=0;let u=Go.alloc((o+1)*n);let l=i[0];for(let e=0;e<n;e++){if(i.length>1){let e=Infinity;for(let n=0;n<i.length;n++){let s=h[i[n]](t,c,o,r);if(s<e){l=i[n];e=s}}}u[a]=l;a++;f[l](t,c,o,u,a,r);a+=o;c+=o}return u};return Rat}var _at;function Fat(){if(_at)return Eat.exports;_at=1;let t=pat();let e=yat();let n=Dat();let s=Lat();let r=Qot;let i=Eat.exports=function(e){this._options=e;e.deflateChunkSize=e.deflateChunkSize||32*1024;e.deflateLevel=e.deflateLevel!=null?e.deflateLevel:9;e.deflateStrategy=e.deflateStrategy!=null?e.deflateStrategy:3;e.inputHasAlpha=e.inputHasAlpha!=null?e.inputHasAlpha:true;e.deflateFactory=e.deflateFactory||r.createDeflate;e.bitDepth=e.bitDepth||8;e.colorType=typeof e.colorType==="number"?e.colorType:t.COLORTYPE_COLOR_ALPHA;e.inputColorType=typeof e.inputColorType==="number"?e.inputColorType:t.COLORTYPE_COLOR_ALPHA;if([t.COLORTYPE_GRAYSCALE,t.COLORTYPE_COLOR,t.COLORTYPE_COLOR_ALPHA,t.COLORTYPE_ALPHA].indexOf(e.colorType)===-1){throw new Error("option color type:"+e.colorType+" is not supported at present")}if([t.COLORTYPE_GRAYSCALE,t.COLORTYPE_COLOR,t.COLORTYPE_COLOR_ALPHA,t.COLORTYPE_ALPHA].indexOf(e.inputColorType)===-1){throw new Error("option input color type:"+e.inputColorType+" is not supported at present")}if(e.bitDepth!==8&&e.bitDepth!==16){throw new Error("option bit depth:"+e.bitDepth+" is not supported at present")}};i.prototype.getDeflateOptions=function(){return{chunkSize:this._options.deflateChunkSize,level:this._options.deflateLevel,strategy:this._options.deflateStrategy}};i.prototype.createDeflate=function(){return this._options.deflateFactory(this.getDeflateOptions())};i.prototype.filterData=function(e,r,i){let o=n(e,r,i,this._options);let a=t.COLORTYPE_TO_BPP_MAP[this._options.colorType];let c=s(o,r,i,this._options,a);return c};i.prototype._packChunk=function(t,n){let s=n?n.length:0;let r=Go.alloc(s+12);r.writeUInt32BE(s,0);r.writeUInt32BE(t,4);if(n){n.copy(r,8)}r.writeInt32BE(e.crc32(r.slice(4,r.length-4)),r.length-4);return r};i.prototype.packGAMA=function(e){let n=Go.alloc(4);n.writeUInt32BE(Math.floor(e*t.GAMMA_DIVISION),0);return this._packChunk(t.TYPE_gAMA,n)};i.prototype.packIHDR=function(e,n){let s=Go.alloc(13);s.writeUInt32BE(e,0);s.writeUInt32BE(n,4);s[8]=this._options.bitDepth;s[9]=this._options.colorType;s[10]=0;s[11]=0;s[12]=0;return this._packChunk(t.TYPE_IHDR,s)};i.prototype.packIDAT=function(e){return this._packChunk(t.TYPE_IDAT,e)};i.prototype.packIEND=function(){return this._packChunk(t.TYPE_IEND,null)};return Eat.exports}var zat;function jat(){if(zat)return Mat.exports;zat=1;let t=G7();let e=$et;let n=pat();let s=Fat();let r=Mat.exports=function(t){e.call(this);let n=t||{};this._packer=new s(n);this._deflate=this._packer.createDeflate();this.readable=true};t.inherits(r,e);r.prototype.pack=function(t,e,s,r){this.emit("data",Go.from(n.PNG_SIGNATURE));this.emit("data",this._packer.packIHDR(e,s));if(r){this.emit("data",this._packer.packGAMA(r))}let i=this._packer.filterData(t,e,s);this._deflate.on("error",this.emit.bind(this,"error"));this._deflate.on("data",function(t){this.emit("data",this._packer.packIDAT(t))}.bind(this));this._deflate.on("end",function(){this.emit("data",this._packer.packIEND());this.emit("end")}.bind(this));this._deflate.end(i)};return Mat.exports}var Pat={};var Bat={exports:{}};function Wat(t,e){if(t===e){return 0}var n=t.length;var s=e.length;for(var r=0,i=Math.min(n,s);r<i;++r){if(t[r]!==e[r]){n=t[r];s=e[r];break}}if(n<s){return-1}if(s<n){return 1}return 0}var Gat=Object.prototype.hasOwnProperty;var Vat=Object.keys||function(t){var e=[];for(var n in t){if(Gat.call(t,n))e.push(n)}return e};var Uat=Array.prototype.slice;var Yat;function Hat(){if(typeof Yat!=="undefined"){return Yat}return Yat=function(){return function t(){}.name==="foo"}()}function Zat(t){return Object.prototype.toString.call(t)}function Qat(t){if(Fa(t)){return false}if(typeof w.ArrayBuffer!=="function"){return false}if(typeof ArrayBuffer.isView==="function"){return ArrayBuffer.isView(t)}if(!t){return false}if(t instanceof DataView){return true}if(t.buffer&&t.buffer instanceof ArrayBuffer){return true}return false}function Xat(t,e){if(!t)sct(t,true,e,"==",rct)}var qat=/\s*function\s+([^\(\s]*)\s*/;function Jat(t){if(!ott.isFunction(t)){return}if(Hat()){return t.name}var e=t.toString();var n=e.match(qat);return n&&n[1]}Xat.AssertionError=Kat;function Kat(t){this.name="AssertionError";this.actual=t.actual;this.expected=t.expected;this.operator=t.operator;if(t.message){this.message=t.message;this.generatedMessage=false}else{this.message=nct(this);this.generatedMessage=true}var e=t.stackStartFunction||sct;if(Error.captureStackTrace){Error.captureStackTrace(this,e)}else{var n=new Error;if(n.stack){var s=n.stack;var r=Jat(e);var i=s.indexOf("\n"+r);if(i>=0){var o=s.indexOf("\n",i+1);s=s.substring(o+1)}this.stack=s}}}ott.inherits(Kat,Error);function tct(t,e){if(typeof t==="string"){return t.length<e?t:t.slice(0,e)}else{return t}}function ect(t){if(Hat()||!ott.isFunction(t)){return ott.inspect(t)}var e=Jat(t);var n=e?": "+e:"";return"[Function"+n+"]"}function nct(t){return tct(ect(t.actual),128)+" "+t.operator+" "+tct(ect(t.expected),128)}function sct(t,e,n,s,r){throw new Kat({message:n,actual:t,expected:e,operator:s,stackStartFunction:r})}Xat.fail=sct;function rct(t,e){if(!t)sct(t,true,e,"==",rct)}Xat.ok=rct;Xat.equal=ict;function ict(t,e,n){if(t!=e)sct(t,e,n,"==",ict)}Xat.notEqual=oct;function oct(t,e,n){if(t==e){sct(t,e,n,"!=",oct)}}Xat.deepEqual=act;function act(t,e,n){if(!uct(t,e,false)){sct(t,e,n,"deepEqual",act)}}Xat.deepStrictEqual=cct;function cct(t,e,n){if(!uct(t,e,true)){sct(t,e,n,"deepStrictEqual",cct)}}function uct(t,e,n,s){if(t===e){return true}else if(Fa(t)&&Fa(e)){return Wat(t,e)===0}else if(ott.isDate(t)&&ott.isDate(e)){return t.getTime()===e.getTime()}else if(ott.isRegExp(t)&&ott.isRegExp(e)){return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase}else if((t===null||typeof t!=="object")&&(e===null||typeof e!=="object")){return n?t===e:t==e}else if(Qat(t)&&Qat(e)&&Zat(t)===Zat(e)&&!(t instanceof Float32Array||t instanceof Float64Array)){return Wat(new Uint8Array(t.buffer),new Uint8Array(e.buffer))===0}else if(Fa(t)!==Fa(e)){return false}else{s=s||{actual:[],expected:[]};var r=s.actual.indexOf(t);if(r!==-1){if(r===s.expected.indexOf(e)){return true}}s.actual.push(t);s.expected.push(e);return fct(t,e,n,s)}}function lct(t){return Object.prototype.toString.call(t)=="[object Arguments]"}function fct(t,e,n,s){if(t===null||t===undefined||e===null||e===undefined)return false;if(ott.isPrimitive(t)||ott.isPrimitive(e))return t===e;if(n&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return false;var r=lct(t);var i=lct(e);if(r&&!i||!r&&i)return false;if(r){t=Uat.call(t);e=Uat.call(e);return uct(t,e,n)}var o=Vat(t);var a=Vat(e);var c,u;if(o.length!==a.length)return false;o.sort();a.sort();for(u=o.length-1;u>=0;u--){if(o[u]!==a[u])return false}for(u=o.length-1;u>=0;u--){c=o[u];if(!uct(t[c],e[c],n,s))return false}return true}Xat.notDeepEqual=hct;function hct(t,e,n){if(uct(t,e,false)){sct(t,e,n,"notDeepEqual",hct)}}Xat.notDeepStrictEqual=dct;function dct(t,e,n){if(uct(t,e,true)){sct(t,e,n,"notDeepStrictEqual",dct)}}Xat.strictEqual=pct;function pct(t,e,n){if(t!==e){sct(t,e,n,"===",pct)}}Xat.notStrictEqual=mct;function mct(t,e,n){if(t===e){sct(t,e,n,"!==",mct)}}function bct(t,e){if(!t||!e){return false}if(Object.prototype.toString.call(e)=="[object RegExp]"){return e.test(t)}try{if(t instanceof e){return true}}catch(t){}if(Error.isPrototypeOf(e)){return false}return e.call({},t)===true}function yct(t){var e;try{t()}catch(t){e=t}return e}function gct(t,e,n,s){var r;if(typeof e!=="function"){throw new TypeError('"block" argument must be a function')}if(typeof n==="string"){s=n;n=null}r=yct(e);s=(n&&n.name?" ("+n.name+").":".")+(s?" "+s:".");if(t&&!r){sct(r,n,"Missing expected exception"+s)}var i=typeof s==="string";var o=!t&&ott.isError(r);var a=!t&&r&&!n;if(o&&i&&bct(r,n)||a){sct(r,n,"Got unwanted exception"+s)}if(t&&r&&n&&!bct(r,n)||!t&&r){throw r}}Xat.throws=wct;function wct(t,e,n){gct(true,t,e,n)}Xat.doesNotThrow=vct;function vct(t,e,n){gct(false,t,e,n)}Xat.ifError=xct;function xct(t){if(t)throw t}var Nct=Object.freeze({__proto__:null,AssertionError:Kat,assert:rct,deepEqual:act,deepStrictEqual:cct,default:Xat,doesNotThrow:vct,equal:ict,fail:sct,ifError:xct,notDeepEqual:hct,notDeepStrictEqual:dct,notEqual:oct,notStrictEqual:mct,ok:rct,strictEqual:pct,throws:wct});var kct=f(Nct);var Cct;function $ct(){if(Cct)return Bat.exports;Cct=1;(function(t,e){let n=kct.ok;let s=Qot;let r=G7();let i=ltt.kMaxLength;function o(t){if(!(this instanceof o)){return new o(t)}if(t&&t.chunkSize<s.Z_MIN_CHUNK){t.chunkSize=s.Z_MIN_CHUNK}s.Inflate.call(this,t);this._offset=this._offset===undefined?this._outOffset:this._offset;this._buffer=this._buffer||this._outBuffer;if(t&&t.maxLength!=null){this._maxLength=t.maxLength}}function a(t){return new o(t)}function c(t,e){if(!t._handle){return}t._handle.close();t._handle=null}o.prototype._processChunk=function(t,e,r){if(typeof r==="function"){return s.Inflate._processChunk.call(this,t,e,r)}let o=this;let a=t&&t.length;let u=this._chunkSize-this._offset;let l=this._maxLength;let f=0;let h=[];let d=0;let p;this.on("error",(function(t){p=t}));function m(t,e){if(o._hadError){return}let s=u-e;n(s>=0,"have should not go down");if(s>0){let t=o._buffer.slice(o._offset,o._offset+s);o._offset+=s;if(t.length>l){t=t.slice(0,l)}h.push(t);d+=t.length;l-=t.length;if(l===0){return false}}if(e===0||o._offset>=o._chunkSize){u=o._chunkSize;o._offset=0;o._buffer=Go.allocUnsafe(o._chunkSize)}if(e===0){f+=a-t;a=t;return true}return false}n(this._handle,"zlib binding closed");let b;do{b=this._handle.writeSync(e,t,f,a,this._buffer,this._offset,u);b=b||this._writeState}while(!this._hadError&&m(b[0],b[1]));if(this._hadError){throw p}if(d>=i){c(this);throw new RangeError("Cannot create final Buffer. It would be larger than 0x"+i.toString(16)+" bytes")}let y=Go.concat(h,d);c(this);return y};r.inherits(o,s.Inflate);function u(t,e){if(typeof e==="string"){e=Go.from(e)}if(!(e instanceof Go)){throw new TypeError("Not a string or buffer")}let n=t._finishFlushFlag;if(n==null){n=s.Z_FINISH}return t._processChunk(e,n)}function l(t,e){return u(new o(e),t)}t.exports=e=l;e.Inflate=o;e.createInflate=a;e.inflateSync=l})(Bat,Bat.exports);return Bat.exports}var Sct={exports:{}};var Ict;function Mct(){if(Ict)return Sct.exports;Ict=1;let t=Sct.exports=function(t){this._buffer=t;this._reads=[]};t.prototype.read=function(t,e){this._reads.push({length:Math.abs(t),allowLess:t<0,func:e})};t.prototype.process=function(){while(this._reads.length>0&&this._buffer.length){let t=this._reads[0];if(this._buffer.length&&(this._buffer.length>=t.length||t.allowLess)){this._reads.shift();let e=this._buffer;this._buffer=e.slice(t.length);t.func.call(this,e.slice(0,t.length))}else{break}}if(this._reads.length>0){return new Error("There are some read requests waitng on finished stream")}if(this._buffer.length>0){return new Error("unrecognised content at end of stream")}};return Sct.exports}var Ect={};var Tct;function Act(){if(Tct)return Ect;Tct=1;let t=Mct();let e=cat();Ect.process=function(n,s){let r=[];let i=new t(n);let o=new e(s,{read:i.read.bind(i),write:function(t){r.push(t)},complete:function(){}});o.start();i.process();return Go.concat(r)};return Ect}var Dct;var Rct;function Oct(){if(Rct)return Dct;Rct=1;let t=true;let e=Qot;let n=$ct();if(!e.deflateSync){t=false}let s=Mct();let r=Act();let i=wat();let o=Nat();let a=$at();Dct=function(c,u){if(!t){throw new Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0")}let l;function f(t){l=t}let h;function d(t){h=t}function p(t){h.transColor=t}function m(t){h.palette=t}function b(){h.alpha=true}let y;function g(t){y=t}let w=[];function v(t){w.push(t)}let x=new s(c);let N=new i(u,{read:x.read.bind(x),error:f,metadata:d,gamma:g,palette:m,transColor:p,inflateData:v,simpleTransparency:b});N.start();x.process();if(l){throw l}let k=Go.concat(w);w.length=0;let C;if(h.interlace){C=e.inflateSync(k)}else{let t=(h.width*h.bpp*h.depth+7>>3)+1;let e=t*h.height;C=n(k,{chunkSize:e,maxLength:e})}k=null;if(!C||!C.length){throw new Error("bad png - invalid inflate data response")}let $=r.process(C,h);k=null;let S=o.dataToBitMap($,h);$=null;let I=a(S,h);h.data=I;h.gamma=y||0;return h};return Dct}var Lct;var _ct;function Fct(){if(_ct)return Lct;_ct=1;let t=true;let e=Qot;if(!e.deflateSync){t=false}let n=pat();let s=Fat();Lct=function(r,i){if(!t){throw new Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0")}let o=i||{};let a=new s(o);let c=[];c.push(Go.from(n.PNG_SIGNATURE));c.push(a.packIHDR(r.width,r.height));if(r.gamma){c.push(a.packGAMA(r.gamma))}let u=a.filterData(r.data,r.width,r.height);let l=e.deflateSync(u,a.getDeflateOptions());u=null;if(!l||!l.length){throw new Error("bad png - invalid compressed data response")}c.push(a.packIDAT(l));c.push(a.packIEND());return Go.concat(c)};return Lct}var zct;function jct(){if(zct)return Pat;zct=1;let t=Oct();let e=Fct();Pat.read=function(e,n){return t(e,n||{})};Pat.write=function(t,n){return e(t,n)};return Pat}var Pct;function Bct(){if(Pct)return F6;Pct=1;let t=G7();let e=$et;let n=Iat();let s=jat();let r=jct();let i=F6.PNG=function(t){e.call(this);t=t||{};this.width=t.width|0;this.height=t.height|0;this.data=this.width>0&&this.height>0?Go.alloc(4*this.width*this.height):null;if(t.fill&&this.data){this.data.fill(0)}this.gamma=0;this.readable=this.writable=true;this._parser=new n(t);this._parser.on("error",this.emit.bind(this,"error"));this._parser.on("close",this._handleClose.bind(this));this._parser.on("metadata",this._metadata.bind(this));this._parser.on("gamma",this._gamma.bind(this));this._parser.on("parsed",function(t){this.data=t;this.emit("parsed",t)}.bind(this));this._packer=new s(t);this._packer.on("data",this.emit.bind(this,"data"));this._packer.on("end",this.emit.bind(this,"end"));this._parser.on("close",this._handleClose.bind(this));this._packer.on("error",this.emit.bind(this,"error"))};t.inherits(i,e);i.sync=r;i.prototype.pack=function(){if(!this.data||!this.data.length){this.emit("error","No data provided");return this}v.nextTick(function(){this._packer.pack(this.data,this.width,this.height,this.gamma)}.bind(this));return this};i.prototype.parse=function(t,e){if(e){let t,n;t=function(t){this.removeListener("error",n);this.data=t;e(null,this)}.bind(this);n=function(n){this.removeListener("parsed",t);e(n,null)}.bind(this);this.once("parsed",t);this.once("error",n)}this.end(t);return this};i.prototype.write=function(t){this._parser.write(t);return true};i.prototype.end=function(t){this._parser.end(t)};i.prototype._metadata=function(t){this.width=t.width;this.height=t.height;this.emit("metadata",t)};i.prototype._gamma=function(t){this.gamma=t};i.prototype._handleClose=function(){if(!this._parser.writable&&!this._packer.readable){this.emit("close")}};i.bitblt=function(t,e,n,s,r,i,o,a){n|=0;s|=0;r|=0;i|=0;o|=0;a|=0;if(n>t.width||s>t.height||n+r>t.width||s+i>t.height){throw new Error("bitblt reading outside image")}if(o>e.width||a>e.height||o+r>e.width||a+i>e.height){throw new Error("bitblt writing outside image")}for(let c=0;c<i;c++){t.data.copy(e.data,(a+c)*e.width+o<<2,(s+c)*t.width+n<<2,(s+c)*t.width+n+r<<2)}};i.prototype.bitblt=function(t,e,n,s,r,o,a){i.bitblt(this,t,e,n,s,r,o,a);return this};i.adjustGamma=function(t){if(t.gamma){for(let e=0;e<t.height;e++){for(let n=0;n<t.width;n++){let s=t.width*e+n<<2;for(let e=0;e<3;e++){let n=t.data[s+e]/255;n=Math.pow(n,1/2.2/t.gamma);t.data[s+e]=Math.round(n*255)}}}t.gamma=0}};i.prototype.adjustGamma=function(){i.adjustGamma(this)};return F6}var Wct={};var Gct;function Vct(){if(Gct)return Wct;Gct=1;(function(t){function e(t){if(typeof t==="number"){t=t.toString()}if(typeof t!=="string"){throw new Error("Color should be defined as hex string")}let e=t.slice().replace("#","").split("");if(e.length<3||e.length===5||e.length>8){throw new Error("Invalid hex color: "+t)}if(e.length===3||e.length===4){e=Array.prototype.concat.apply([],e.map((function(t){return[t,t]})))}if(e.length===6)e.push("F","F");const n=parseInt(e.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:"#"+e.slice(0,6).join("")}}t.getOptions=function t(n){if(!n)n={};if(!n.color)n.color={};const s=typeof n.margin==="undefined"||n.margin===null||n.margin<0?4:n.margin;const r=n.width&&n.width>=21?n.width:undefined;const i=n.scale||4;return{width:r,scale:r?4:i,margin:s,color:{dark:e(n.color.dark||"#000000ff"),light:e(n.color.light||"#ffffffff")},type:n.type,rendererOpts:n.rendererOpts||{}}};t.getScale=function t(e,n){return n.width&&n.width>=e+n.margin*2?n.width/(e+n.margin*2):n.scale};t.getImageWidth=function e(n,s){const r=t.getScale(n,s);return Math.floor((n+s.margin*2)*r)};t.qrToImageData=function e(n,s,r){const i=s.modules.size;const o=s.modules.data;const a=t.getScale(i,r);const c=Math.floor((i+r.margin*2)*a);const u=r.margin*a;const l=[r.color.light,r.color.dark];for(let t=0;t<c;t++){for(let e=0;e<c;e++){let s=(t*c+e)*4;let f=r.color.light;if(t>=u&&e>=u&&t<c-u&&e<c-u){const n=Math.floor((t-u)/a);const s=Math.floor((e-u)/a);f=l[o[n*i+s]?1:0]}n[s++]=f.r;n[s++]=f.g;n[s++]=f.b;n[s]=f.a}}}})(Wct);return Wct}var Uct;function Yct(){if(Uct)return _6;Uct=1;(function(t){const e=ob;const n=Bct().PNG;const s=Vct();t.render=function t(e,r){const i=s.getOptions(r);const o=i.rendererOpts;const a=s.getImageWidth(e.modules.size,i);o.width=a;o.height=a;const c=new n(o);s.qrToImageData(c.data,e,i);return c};t.renderToDataURL=function e(n,s,r){if(typeof r==="undefined"){r=s;s=undefined}t.renderToBuffer(n,s,(function(t,e){if(t)r(t);let n="data:image/png;base64,";n+=e.toString("base64");r(null,n)}))};t.renderToBuffer=function e(n,s,r){if(typeof r==="undefined"){r=s;s=undefined}const i=t.render(n,s);const o=[];i.on("error",r);i.on("data",(function(t){o.push(t)}));i.on("end",(function(){r(null,Go.concat(o))}));i.pack()};t.renderToFile=function n(s,r,i,o){if(typeof o==="undefined"){o=i;i=undefined}let a=false;const c=(...t)=>{if(a)return;a=true;o.apply(null,t)};const u=e.createWriteStream(s);u.on("error",c);u.on("close",c);t.renderToFileStream(u,r,i)};t.renderToFileStream=function e(n,s,r){const i=t.render(s,r);i.pack().pipe(n)}})(_6);return _6}var Hct={};var Zct;function Qct(){if(Zct)return Hct;Zct=1;(function(t){const e=Vct();const n={WW:" ",WB:"▄",BB:"█",BW:"▀"};const s={BB:" ",BW:"▄",WW:"█",WB:"▀"};function r(t,e,n){if(t&&e)return n.BB;if(t&&!e)return n.BW;if(!t&&e)return n.WB;return n.WW}t.render=function(t,i,o){const a=e.getOptions(i);let c=n;if(a.color.dark.hex==="#ffffff"||a.color.light.hex==="#000000"){c=s}const u=t.modules.size;const l=t.modules.data;let f="";let h=Array(u+a.margin*2+1).join(c.WW);h=Array(a.margin/2+1).join(h+"\n");const d=Array(a.margin+1).join(c.WW);f+=h;for(let t=0;t<u;t+=2){f+=d;for(let e=0;e<u;e++){const n=l[t*u+e];const s=l[(t+1)*u+e];f+=r(n,s,c)}f+=d+"\n"}f+=h.slice(0,-1);if(typeof o==="function"){o(null,f)}return f};t.renderToFile=function e(n,s,r,i){if(typeof i==="undefined"){i=r;r=undefined}const o=ob;const a=t.render(s,r);o.writeFile(n,a,i)}})(Hct);return Hct}var Xct={};var qct={};var Jct;function Kct(){if(Jct)return qct;Jct=1;qct.render=function(t,e,n){const s=t.modules.size;const r=t.modules.data;const i="[40m [0m";const o="[47m [0m";let a="";const c=Array(s+3).join(o);const u=Array(2).join(o);a+=c+"\n";for(let t=0;t<s;++t){a+=o;for(let e=0;e<s;e++){a+=r[t*s+e]?i:o}a+=u+"\n"}a+=c+"\n";if(typeof n==="function"){n(null,a)}return a};return qct}var tut={};var eut;function nut(){if(eut)return tut;eut=1;const t="[47m";const e="[40m";const n="[37m";const s="[30m";const r="[0m";const i=t+s;const o=e+n;const a=function(t,e,n){return{"00":r+" "+t,"01":r+e+"▄"+t,"02":r+n+"▄"+t,10:r+e+"▀"+t,11:" ",12:"▄",20:r+n+"▀"+t,21:"▀",22:"█"}};const c=function(t,e,n,s){const r=e+1;if(n>=r||s>=r||s<-1||n<-1)return"0";if(n>=e||s>=e||s<0||n<0)return"1";const i=s*e+n;return t[i]?"2":"1"};const u=function(t,e,n,s){return c(t,e,n,s)+c(t,e,n,s+1)};tut.render=function(t,e,c){const l=t.modules.size;const f=t.modules.data;const h=!!(e&&e.inverse);const d=e&&e.inverse?o:i;const p=h?s:n;const m=h?n:s;const b=a(d,p,m);const y=r+"\n"+d;let g=d;for(let t=-1;t<l+1;t+=2){for(let e=-1;e<l;e++){g+=b[u(f,l,e,t)]}g+=b[u(f,l,l,t)]+y}g+=r;if(typeof c==="function"){c(null,g)}return g};return tut}var sut;function rut(){if(sut)return Xct;sut=1;const t=Kct();const e=nut();Xct.render=function(n,s,r){if(s&&s.small){return e.render(n,s,r)}return t.render(n,s,r)};return Xct}var iut={};var out={};var aut;function cut(){if(aut)return out;aut=1;const t=Vct();function e(t,e){const n=t.a/255;const s=e+'="'+t.hex+'"';return n<1?s+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':s}function n(t,e,n){let s=t+e;if(typeof n!=="undefined")s+=" "+n;return s}function s(t,e,s){let r="";let i=0;let o=false;let a=0;for(let c=0;c<t.length;c++){const u=Math.floor(c%e);const l=Math.floor(c/e);if(!u&&!o)o=true;if(t[c]){a++;if(!(c>0&&u>0&&t[c-1])){r+=o?n("M",u+s,.5+l+s):n("m",i,0);i=0;o=false}if(!(u+1<e&&t[c+1])){r+=n("h",a);a=0}}else{i++}}return r}out.render=function n(r,i,o){const a=t.getOptions(i);const c=r.modules.size;const u=r.modules.data;const l=c+a.margin*2;const f=!a.color.light.a?"":"<path "+e(a.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>';const h="<path "+e(a.color.dark,"stroke")+' d="'+s(u,c,a.margin)+'"/>';const d='viewBox="'+"0 0 "+l+" "+l+'"';const p=!a.width?"":'width="'+a.width+'" height="'+a.width+'" ';const m='<svg xmlns="http://www.w3.org/2000/svg" '+p+d+' shape-rendering="crispEdges">'+f+h+"</svg>\n";if(typeof o==="function"){o(null,m)}return m};return out}var uut;function lut(){if(uut)return iut;uut=1;(function(t){const e=cut();t.render=e.render;t.renderToFile=function e(n,s,r,i){if(typeof i==="undefined"){i=r;r=undefined}const o=ob;const a=t.render(s,r);const c='<?xml version="1.0" encoding="utf-8"?>'+'<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">'+a;o.writeFile(n,c,i)}})(iut);return iut}var fut={};var hut={};var dut;function put(){if(dut)return hut;dut=1;(function(t){const e=Vct();function n(t,e,n){t.clearRect(0,0,e.width,e.height);if(!e.style)e.style={};e.height=n;e.width=n;e.style.height=n+"px";e.style.width=n+"px"}function s(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}t.render=function t(r,i,o){let a=o;let c=i;if(typeof a==="undefined"&&(!i||!i.getContext)){a=i;i=undefined}if(!i){c=s()}a=e.getOptions(a);const u=e.getImageWidth(r.modules.size,a);const l=c.getContext("2d");const f=l.createImageData(u,u);e.qrToImageData(f.data,r,a);n(l,c,u);l.putImageData(f,0,0);return c};t.renderToDataURL=function e(n,s,r){let i=r;if(typeof i==="undefined"&&(!s||!s.getContext)){i=s;s=undefined}if(!i)i={};const o=t.render(n,s,i);const a=i.type||"image/png";const c=i.rendererOpts||{};return o.toDataURL(a,c.quality)}})(hut);return hut}var mut;function but(){if(mut)return fut;mut=1;const t=v5();const e=L6();const n=put();const s=cut();function r(n,s,r,i,o){const a=[].slice.call(arguments,1);const c=a.length;const u=typeof a[c-1]==="function";if(!u&&!t()){throw new Error("Callback required as last argument")}if(u){if(c<2){throw new Error("Too few arguments provided")}if(c===2){o=r;r=s;s=i=undefined}else if(c===3){if(s.getContext&&typeof o==="undefined"){o=i;i=undefined}else{o=i;i=r;r=s;s=undefined}}}else{if(c<1){throw new Error("Too few arguments provided")}if(c===1){r=s;s=i=undefined}else if(c===2&&!s.getContext){i=r;r=s;s=undefined}return new Promise((function(t,o){try{const o=e.create(r,i);t(n(o,s,i))}catch(t){o(t)}}))}try{const t=e.create(r,i);o(null,n(t,s,i))}catch(t){o(t)}}fut.create=e.create;fut.toCanvas=r.bind(null,n.render);fut.toDataURL=r.bind(null,n.renderToDataURL);fut.toString=r.bind(null,(function(t,e,n){return s.render(t,n)}));return fut}var yut;function gut(){if(yut)return y5;yut=1;const t=v5();const e=L6();const n=Yct();const s=Qct();const r=rut();const i=lut();function o(e,n,s){if(typeof e==="undefined"){throw new Error("String required as first argument")}if(typeof s==="undefined"){s=n;n={}}if(typeof s!=="function"){if(!t()){throw new Error("Callback required as last argument")}else{n=s||{};s=null}}return{opts:n,cb:s}}function a(t){return t.slice((t.lastIndexOf(".")-1>>>0)+2).toLowerCase()}function c(t){switch(t){case"svg":return i;case"txt":case"utf8":return s;case"png":case"image/png":default:return n}}function u(t){switch(t){case"svg":return i;case"terminal":return r;case"utf8":default:return s}}function l(t,n,s){if(!s.cb){return new Promise((function(r,i){try{const o=e.create(n,s.opts);return t(o,s.opts,(function(t,e){return t?i(t):r(e)}))}catch(t){i(t)}}))}try{const r=e.create(n,s.opts);return t(r,s.opts,s.cb)}catch(t){s.cb(t)}}y5.create=e.create;y5.toCanvas=but().toCanvas;y5.toString=function t(e,n,s){const r=o(e,n,s);const i=r.opts?r.opts.type:undefined;const a=u(i);return l(a.render,e,r)};y5.toDataURL=function t(e,n,s){const r=o(e,n,s);const i=c(r.opts.type);return l(i.renderToDataURL,e,r)};y5.toBuffer=function t(e,n,s){const r=o(e,n,s);const i=c(r.opts.type);return l(i.renderToBuffer,e,r)};y5.toFile=function e(n,s,r,i){if(typeof n!=="string"||!(typeof s==="string"||typeof s==="object")){throw new Error("Invalid argument")}if(arguments.length<3&&!t()){throw new Error("Too few arguments provided")}const u=o(s,r,i);const f=u.opts.type||a(n);const h=c(f);const d=h.renderToFile.bind(null,n);return l(d,s,u)};y5.toFileStream=function t(e,n,s){if(arguments.length<2){throw new Error("Too few arguments provided")}const r=o(n,s,e.emit.bind(e,"error"));const i=c("png");const a=i.renderToFileStream.bind(null,e);l(a,n,r)};return y5}var wut;var vut;function xut(){if(vut)return wut;vut=1;wut=gut();return wut}var Nut=xut();var kut=l(Nut);const Cut=".qr-canvas{max-height:60vh;max-width:80vw;text-align:center}.qr-canvas>canvas{width:100%;height:100%}";const $ut=class{constructor(n){t(this,n);this.apiErrorEvent=e(this,"apiError");this.prefilledPhone=false;this.invalidValue=false;this.waitingMobile=false}async componentWillLoad(){p.flowStarted();this.translations=await b.getValues();this.infoTextTop=this.translations.MobileRedirectValues.InfoTop;this.infoTextBottom=this.translations.MobileRedirectValues.InfoBottom;let t="ontr";if(o.environment=="QA"){t="test"}else if(o.environment=="DOCKER"){t=""}let e="";if(o.apiBaseUrl.includes("apimd")){e="https://onmd.id-kyc.com/"}else if(o.apiBaseUrl.includes("apiontrace")){e="https://ontrace.id-kyc.com/"}else{e="https://onro.id-kyc.com/"}this.redirectLink=new URL(t+"mobileredirect?redirectId="+o.redirectId,e).toString();if(o.phoneNumber&&o.phoneNumber!=""){this.contact=o.phoneNumber;this.prefilledPhone=true}var n=this;kut.toDataURL(this.redirectLink,{type:"image/png",errorCorrectionLevel:"M",scale:6},(function(t,e){if(t)console.error(t);n.qrCode=e}))}async componentDidLoad(){await d.initialize(r.MobileRedirect);await I(5e3);await this.checkStatus();while(this.orderStatus!=a.COMPLETE){await this.checkStatus();await I(5e3)}}async checkStatus(){this.orderStatus=await i.instance.GetStatusUi(o.requestId);if(this.orderStatus==null){this.apiErrorEvent.emit({message:"No order was started for this process."})}else if(this.orderStatus==a.ABORTED){this.waitingMobile=false;this.infoTextTop=this.translations.MobileRedirectValues.InfoAborted;p.flowAborted()}else if(this.orderStatus==a.COMPLETE){this.waitingMobile=false;o.flowStatus=a.COMPLETE}else if(this.orderStatus!=a.MOBILE){this.infoTextTop=this.translations.MobileRedirectValues.InfoWaiting;this.waitingMobile=true}}async disconnectedCallback(){await d.finalize(r.MobileRedirect)}async buttonClick(){if(this.contact==""||this.contact.length!=10){return}this.waitingMobile=true;this.infoTextTop=this.translations.MobileRedirectValues.InfoWaiting;try{await i.instance.SendLink(this.redirectLink,this.contact)}catch(t){this.apiErrorEvent.emit(t)}}handleChangeContact(t){let e=t.target?t.target.value:"";this.contact=e.replace(/\D/g,"");if(this.contact.length>10){this.contact=this.contact.substring(0,10)}this.invalidValue=this.contact.length!=10;t.target.value=this.contact}render(){return n("div",{key:"34d54d78152d4382e56b40d40324d65687eb39cf",class:"container flex center"},n("div",{key:"86ec4e33867724d36a4ed0504f25be82aa78276a",class:"px-2 w-100"},n("div",{key:"ac49a37b03b137c450b5b51027b6a367c1d32476",hidden:this.waitingMobile},n("h1",{key:"899ac0b19433daa4518fc1af512352f9a50eb1d2",class:"text-center px-2 mb-1"},this.infoTextTop),n("div",{key:"9840907c2c888161bc1a4473a019eb5ac2ec67cb",class:"flex center"},n("img",{key:"ce0c5b50c844e9a701f27411db1b73134fdd5241",src:this.qrCode})),n("h2",{key:"5fcd4a070c136dd450120861ee3ff9621d9f4bfe",class:"text-center px-2 mb-2"},this.infoTextBottom),n("div",{key:"63b937dab269e457357607c6d693e1da3607370a",class:"input-container mb-3 px-3"},n("label",{key:"69b9d3673112ef5ea92b1c3fafe71cf1852ecd8b",class:"font-size-18 mb-1 color-red",hidden:this.invalidValue==false},n("b",{key:"aaa49c86df8936291d154a7d7a0407b15c3227ee"},this.translations.MobileRedirectValues.Validation)),n("input",{key:"c029f6e18ba29154afdf6fca589d0953ecde9ce4",type:"text",id:"codeInput",class:"main-input",disabled:this.prefilledPhone,value:this.contact,onInput:t=>this.handleChangeContact(t)})),n("div",{key:"c3045e43fc93e122da17f7e86614dddd36d01c51",class:"px-3"},n("button",{key:"cdbb355764e00f3b31fe437afb28794293292290",class:"main-button",onClick:()=>this.buttonClick()},this.translations.MobileRedirectValues.Send))),n("div",{key:"33d96361551f8173ea706dfcb0fddf101a3297af",hidden:this.waitingMobile==false},n("div",{key:"759aaac75e0137733f83c1fb078b5cf6fe5f62c6",class:"text-center"},n("p",{key:"9c9cb40166a29f80575af47cbef2c0ac5581fcb9",class:"font-size-2"},this.infoTextTop))),n("div",{key:"346d7376785aabff41d46f3d472102c46a2c79e1",class:"footer text-center"},n("img",{key:"7f5eb110ca773311ca3df122d17ad47358d4ad93",src:y}))))}};$ut.style=Cut;var Sut;(function(t){t["IdFront"]="IdFront";t["IdBack"]="IdBack";t["IdFrontVideo"]="IdFrontVideo";t["IdBackVideo"]="IdBackVideo";t["Selfie"]="Selfie";t["SelfieVideo"]="SelfieVideo";t["SelfieGestureVideo"]="SelfieGestureVideo";t["TiltVideo"]="TiltVideo";t["None"]="None"})(Sut||(Sut={}));const Iut="";const Mut=class{constructor(n){t(this,n);this.apiErrorEvent=e(this,"apiError");this.recordingResultCount=0;this.uploading=false;this.appInsights=C.getInstance()}componentWillLoad(){this.captureRetryCount=0;this.initFlow();this.appInsights.trackEvent("ProcessId | init",{requestId:o.requestId})}initFlow(){if(this.mode=="front"){this.currentStep=r.CiFront;this.flow={fileName:"idImage.png",recName:"idVideo.",photoType:Sut.IdFront,recType:Sut.IdFrontVideo,imageSize:0,videoSize:0}}else if(this.mode=="back"){this.currentStep=r.CiBack;this.flow={fileName:"idBackImage.png",recName:"idBackVideo.",photoType:Sut.IdBack,recType:Sut.IdBackVideo,imageSize:0,videoSize:0}}else if(this.mode=="tilt"){this.currentStep=r.CiTilt;this.flow={fileName:"idTiltImage.png",recName:"idTiltVideo.",photoType:Sut.None,recType:Sut.TiltVideo,imageSize:0,videoSize:0}}if(o.debug)console.log("process-id | initFlow")}timeElapsed(){this.errorReason="Timeout";this.showTimeout=true}captureErrorDone(){if(o.debug)console.log("process-id | captureErrorDone");if(this.showTimeout==true){this.showTimeout=false}if(this.showInvalid==true){this.showInvalid=false}}async captureIdImage(t){if(o.debug)console.log("process-id | captureIdImage",this.mode);if(this.mode=="tilt")return;let e=t.detail;if(e.size==0){if(o.debug)console.log("process-id | captureIdImage | Empty id photo");await i.instance.AddLog({message:"Empty id photo",blobData:e},await M());this.triggerErrorFlow();return}this.capture=new File([e],this.flow.fileName,{type:"image/png"});this.uploadCapture()}async uploadCapture(){try{this.uploading=true;let e=await T(this.capture);this.flow.imageSize=A(e);if(o.debug)console.log("process-id | captureIdImage | uploadResult: "+t);var t=await i.instance.UploadFileForRequestB64(o.requestId,this.flow.photoType,e);if(t.isValid){o.flowStatus=a[t.state]}else{this.switchCamera();this.triggerErrorFlow()}this.capture=null;this.uploading=false}catch(t){this.apiErrorEvent.emit(t)}}async capturedIdRecording(t){if(o.debug)console.log("process-id | capturedIdRecording");let e=t.detail;if(e.size==0&&this.recordingResultCount==0){this.recordingResultCount++;return}if(e.size==0){if(o.debug)console.log("process-id | capturedIdRecording | Empty ID recording");await i.instance.AddLog({message:"Empty ID recording",blobData:e},await M());this.triggerErrorFlow();return}let n=e.type==S.mp4MimeType.type?S.mp4MimeType:S.webmMimeType;let s=new File([e],this.flow.recName+n.extension,{type:n.type});let r=await T(s);this.flow.videoSize=A(r);var c=await i.instance.UploadFileForRequestB64(o.requestId,this.flow.recType,r);if(o.debug)console.log("process-id | capturedIdRecording | uploadResult: "+c);if(c.saved){o.flowStatus=a[c.state]}else{this.triggerErrorFlow()}this.recordingResultCount=0}async verificationFinished(){if(o.debug)console.log("process-id | verificationFinished");this.verificationReceived=Date.now();while(Date.now()-this.verificationReceived<9e4){await I(2e3);if(this.showInvalid||this.showTimeout)return}this.triggerUploadFailedFlow();if(o.debug)console.log("process-id | verificationFinished | waitingFinished ")}triggerUploadFailedFlow(){this.errorReason="Upload Failed";this.showInvalid=true}async componentDidLoad(){if(o.debug)console.log("process-id | componentDidLoad");await d.initialize(this.currentStep)}triggerErrorFlow(){this.errorReason="Invalid";this.showInvalid=true}async disconnectedCallback(){if(o.debug)console.log("process-id | disconnectedCallback");await d.finalize(this.currentStep)}switchCamera(){if(o.debug)console.log("process-id | switchCamera");if(this.captureRetryCount==1){m.switchCamera();this.captureRetryCount=0}else{this.captureRetryCount++}}render(){let t=n("capture-error",{type:"ID",reason:this.errorReason,error:`image: ${this.flow.imageSize}mb video: ${this.flow.videoSize}mb`});let e=n("id-auto-capture",null);let s=n("uploading-data",{type:"id"});if(this.uploading)return s;if(this.showInvalid||this.showTimeout)return t;return e}};Mut.style=Iut;const Eut=".grid{display:grid;gap:20px;grid-template-rows:repeat(3, calc((100vw - 4em - 40px) / 3));grid-template-columns:repeat(3, calc((100vw - 4em - 40px) / 3))}.grid>div{background-color:#f9f9f9;display:flex;align-items:center;justify-content:center;border-radius:50%;font-weight:600;font-size:1.4em;box-shadow:1px 1px 3px #00000029}.grid>div.error{background:#FF5353;color:white}.grid>div.success{background:#7BB40E;color:white}";const Tut=class{constructor(e){t(this,e);this.rand=[]}async componentWillLoad(){this.translations=await b.getValues();this.randomize()}randomInt(t,e){return Math.floor(Math.random()*(e-t+1)+t)}randomize(){this.rand=[];for(let e=0;e<9;e++){var t=this.randomInt(1,99);while(this.rand.includes(t)){t=this.randomInt(1,99)}this.rand.push(t)}this.choice=this.randomInt(0,8)}async click(t,e){let n=e.currentTarget;if(this.choice==t){n.classList.add("success");await I(500);o.flowStatus=await i.instance.GetNextFlowState()}else{n.classList.add("error");await I(500);this.randomize()}n.classList=[]}render(){return n("div",{key:"177de311b3e0113c22f16d0bd05584a916788c97",class:"container flex center"},n("div",{key:"45cfff1e3c369459aca9ffd8654239e85dddb376",class:"px-2 w-100"},n("h1",{key:"46b5810c7a157ca2b01a1bd04f1cb13dfce5b123",class:"text-center px-1 mb-2",innerHTML:this.translations.RandomActionValues.Title+` ${this.rand[this.choice]}`}),n("div",{key:"a0c7891ced6147b8bd5a441749a71d8878ea25af",class:"grid"},this.rand.map(((t,e)=>n("div",{onClick:t=>this.click(e,t)},t)))),n("div",{key:"dd5b29400f6677bf140cc226d7a0bbfbabf5198d",class:"footer text-center"},n("img",{key:"10a94fae640ddf85a5988d14876597aa5b7e010d",src:y}))))}};Tut.style=Eut;var Aut="undefined"!=typeof self?self:{};function Dut(){throw Error("Invalid UTF8")}function Rut(t,e){return e=String.fromCharCode.apply(null,e),null==t?e:t+e}let Out,Lut;const _ut="undefined"!=typeof TextDecoder;let Fut;const zut="undefined"!=typeof TextEncoder;function jut(t){if(zut)t=(Fut||=new TextEncoder).encode(t);else{let n=0;const s=new Uint8Array(3*t.length);for(let r=0;r<t.length;r++){var e=t.charCodeAt(r);if(e<128)s[n++]=e;else{if(e<2048)s[n++]=e>>6|192;else{if(e>=55296&&e<=57343){if(e<=56319&&r<t.length){const i=t.charCodeAt(++r);if(i>=56320&&i<=57343){e=1024*(e-55296)+i-56320+65536,s[n++]=e>>18|240,s[n++]=e>>12&63|128,s[n++]=e>>6&63|128,s[n++]=63&e|128;continue}r--}e=65533}s[n++]=e>>12|224,s[n++]=e>>6&63|128}s[n++]=63&e|128}}t=n===s.length?s:s.subarray(0,n)}return t}var Put,But;t:{for(var Wut=["CLOSURE_FLAGS"],Gut=Aut,Vut=0;Vut<Wut.length;Vut++)if(null==(Gut=Gut[Wut[Vut]])){But=null;break t}But=Gut}var Uut,Yut=But&&But[610401301];Put=null!=Yut&&Yut;const Hut=Aut.navigator;function Zut(t){return!!Put&&(!!Uut&&Uut.brands.some((({brand:e})=>e&&-1!=e.indexOf(t))))}function Qut(t){var e;return(e=Aut.navigator)&&(e=e.userAgent)||(e=""),-1!=e.indexOf(t)}function Xut(){return!!Put&&(!!Uut&&Uut.brands.length>0)}function qut(){return Xut()?Zut("Chromium"):(Qut("Chrome")||Qut("CriOS"))&&!(!Xut()&&Qut("Edge"))||Qut("Silk")}function Jut(t){return Jut[" "](t),t}Uut=Hut&&Hut.userAgentData||null,Jut[" "]=function(){};var Kut=!Xut()&&(Qut("Trident")||Qut("MSIE"));!Qut("Android")||qut(),qut(),Qut("Safari")&&(qut()||!Xut()&&Qut("Coast")||!Xut()&&Qut("Opera")||!Xut()&&Qut("Edge")||(Xut()?Zut("Microsoft Edge"):Qut("Edg/"))||Xut()&&Zut("Opera"));var tlt={},elt=null;function nlt(t){const e=t.length;let n=3*e/4;n%3?n=Math.floor(n):-1!="=.".indexOf(t[e-1])&&(n=-1!="=.".indexOf(t[e-2])?n-2:n-1);const s=new Uint8Array(n);let r=0;return function(t,e){function n(e){for(;s<t.length;){const e=t.charAt(s++),n=elt[e];if(null!=n)return n;if(!/^[\s\xa0]*$/.test(e))throw Error("Unknown base64 encoding at char: "+e)}return e}slt();let s=0;for(;;){const t=n(-1),s=n(0),r=n(64),i=n(64);if(64===i&&-1===t)break;e(t<<2|s>>4),64!=r&&(e(s<<4&240|r>>2),64!=i&&e(r<<6&192|i))}}(t,(function(t){s[r++]=t})),r!==n?s.subarray(0,r):s}function slt(){if(!elt){elt={};var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),e=["+/=","+/","-_=","-_.","-_"];for(let n=0;n<5;n++){const s=t.concat(e[n].split(""));tlt[n]=s;for(let t=0;t<s.length;t++){const e=s[t];void 0===elt[e]&&(elt[e]=t)}}}}var rlt="undefined"!=typeof Uint8Array,ilt=!Kut&&"function"==typeof btoa;function olt(t){if(!ilt){var e;void 0===e&&(e=0),slt(),e=tlt[e];var n=Array(Math.floor(t.length/3)),s=e[64]||"";let c=0,u=0;for(;c<t.length-2;c+=3){var r=t[c],i=t[c+1],o=t[c+2],a=e[r>>2];r=e[(3&r)<<4|i>>4],i=e[(15&i)<<2|o>>6],o=e[63&o],n[u++]=a+r+i+o}switch(a=0,o=s,t.length-c){case 2:o=e[(15&(a=t[c+1]))<<2]||s;case 1:t=t[c],n[u]=e[t>>2]+e[(3&t)<<4|a>>4]+o+s}return n.join("")}for(e="",n=0,s=t.length-10240;n<s;)e+=String.fromCharCode.apply(null,t.subarray(n,n+=10240));return e+=String.fromCharCode.apply(null,n?t.subarray(n):t),btoa(e)}const alt=/[-_.]/g,clt={"-":"+",_:"/",".":"="};function ult(t){return clt[t]||""}function llt(t){if(!ilt)return nlt(t);alt.test(t)&&(t=t.replace(alt,ult)),t=atob(t);const e=new Uint8Array(t.length);for(let n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}function flt(t){return rlt&&null!=t&&t instanceof Uint8Array}var hlt={};function dlt(){return blt||=new mlt(null,hlt)}function plt(t){glt(hlt);var e=t.g;return null==(e=null==e||flt(e)?e:"string"==typeof e?llt(e):null)?e:t.g=e}var mlt=class{h(){return new Uint8Array(plt(this)||0)}constructor(t,e){if(glt(e),this.g=t,null!=t&&0===t.length)throw Error("ByteString should be constructed with non-empty values")}};let blt,ylt;function glt(t){if(t!==hlt)throw Error("illegal external caller")}function wlt(t,e){t.__closure__error__context__984382||(t.__closure__error__context__984382={}),t.__closure__error__context__984382.severity=e}function vlt(t){return wlt(t=Error(t),"warning"),t}function xlt(t){if(null!=t){var e=ylt??={},n=e[t]||0;n>=5||(e[t]=n+1,wlt(t=Error(),"incident"),function(t){Aut.setTimeout((()=>{throw t}),0)}(t))}}var Nlt="function"==typeof Symbol&&"symbol"==typeof Symbol();function klt(t,e,n=false){return"function"==typeof Symbol&&"symbol"==typeof Symbol()?n&&Symbol.for&&t?Symbol.for(t):null!=t?Symbol(t):Symbol():e}var Clt=klt("jas",void 0,true),$lt=klt(void 0,"0di"),Slt=klt(void 0,"1oa"),Ilt=klt(void 0,Symbol()),Mlt=klt(void 0,"0actk"),Elt=klt(void 0,"8utk");const Tlt=Nlt?Clt:"Ea",Alt={Ea:{value:0,configurable:true,writable:true,enumerable:false}},Dlt=Object.defineProperties;function Rlt(t,e){Nlt||Tlt in t||Dlt(t,Alt),t[Tlt]|=e}function Olt(t,e){Nlt||Tlt in t||Dlt(t,Alt),t[Tlt]=e}function Llt(t){return Rlt(t,34),t}function _lt(t,e){Olt(e,-15615&(0|t))}function Flt(t,e){Olt(e,-15581&(34|t))}function zlt(){return"function"==typeof BigInt}function jlt(t){return Array.prototype.slice.call(t)}var Plt,Blt={};function Wlt(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)&&t.constructor===Object}function Glt(t,e){if(null!=t)if("string"==typeof t)t=t?new mlt(t,hlt):dlt();else if(t.constructor!==mlt)if(flt(t))t=t.length?new mlt(new Uint8Array(t),hlt):dlt();else{if(!e)throw Error();t=void 0}return t}const Vlt=[];function Ult(t){if(2&t)throw Error()}Olt(Vlt,55),Plt=Object.freeze(Vlt);class Ylt{constructor(t,e,n){this.g=t,this.h=e,this.l=n}next(){const t=this.g.next();return t.done||(t.value=this.h.call(this.l,t.value)),t}[Symbol.iterator](){return this}}function Hlt(t){return Ilt?t[Ilt]:void 0}var Zlt=Object.freeze({});function Qlt(t){return t.Na=true,t}var Xlt=Qlt((t=>"number"==typeof t)),qlt=Qlt((t=>"string"==typeof t)),Jlt=Qlt((t=>"boolean"==typeof t)),Klt="function"==typeof Aut.BigInt&&"bigint"==typeof Aut.BigInt(0);function tft(t){var e=t;if(qlt(e)){if(!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(e))throw Error(String(e))}else if(Xlt(e)&&!Number.isSafeInteger(e))throw Error(String(e));return Klt?BigInt(t):t=Jlt(t)?t?"1":"0":qlt(t)?t.trim()||"0":String(t)}var eft=Qlt((t=>Klt?t>=sft&&t<=ift:"-"===t[0]?oft(t,nft):oft(t,rft)));const nft=Number.MIN_SAFE_INTEGER.toString(),sft=Klt?BigInt(Number.MIN_SAFE_INTEGER):void 0,rft=Number.MAX_SAFE_INTEGER.toString(),ift=Klt?BigInt(Number.MAX_SAFE_INTEGER):void 0;function oft(t,e){if(t.length>e.length)return false;if(t.length<e.length||t===e)return true;for(let n=0;n<t.length;n++){const s=t[n],r=e[n];if(s>r)return false;if(s<r)return true}}const aft="function"==typeof Uint8Array.prototype.slice;let cft,uft=0,lft=0;function fft(t){const e=t>>>0;uft=e,lft=(t-e)/4294967296>>>0}function hft(t){if(t<0){fft(-t);const[e,n]=vft(uft,lft);uft=e>>>0,lft=n>>>0}else fft(t)}function dft(t){const e=cft||=new DataView(new ArrayBuffer(8));e.setFloat32(0,+t,true),lft=0,uft=e.getUint32(0,true)}function pft(t,e){const n=4294967296*e+(t>>>0);return Number.isSafeInteger(n)?n:bft(t,e)}function mft(t,e){const n=2147483648&e;return n&&(e=~e>>>0,0==(t=1+~t>>>0)&&(e=e+1>>>0)),"number"==typeof(t=pft(t,e))?n?-t:t:n?"-"+t:t}function bft(t,e){if(t>>>=0,(e>>>=0)<=2097151)var n=""+(4294967296*e+t);else zlt()?n=""+(BigInt(e)<<BigInt(32)|BigInt(t)):(t=(16777215&t)+6777216*(n=16777215&(t>>>24|e<<8))+6710656*(e=e>>16&65535),n+=8147497*e,e*=2,t>=1e7&&(n+=t/1e7>>>0,t%=1e7),n>=1e7&&(e+=n/1e7>>>0,n%=1e7),n=e+yft(n)+yft(t));return n}function yft(t){return t=String(t),"0000000".slice(t.length)+t}function gft(){var t=uft,e=lft;if(2147483648&e)if(zlt())t=""+(BigInt(0|e)<<BigInt(32)|BigInt(t>>>0));else{const[n,s]=vft(t,e);t="-"+bft(n,s)}else t=bft(t,e);return t}function wft(t){if(t.length<16)hft(Number(t));else if(zlt())t=BigInt(t),uft=Number(t&BigInt(4294967295))>>>0,lft=Number(t>>BigInt(32)&BigInt(4294967295));else{const e=+("-"===t[0]);lft=uft=0;const n=t.length;for(let s=e,r=(n-e)%6+e;r<=n;s=r,r+=6){const e=Number(t.slice(s,r));lft*=1e6,uft=1e6*uft+e,uft>=4294967296&&(lft+=Math.trunc(uft/4294967296),lft>>>=0,uft>>>=0)}if(e){const[t,e]=vft(uft,lft);uft=t,lft=e}}}function vft(t,e){return e=~e,t?t=1+~t:e+=1,[t,e]}const xft="function"==typeof BigInt?BigInt.asIntN:void 0,Nft="function"==typeof BigInt?BigInt.asUintN:void 0,kft=Number.isSafeInteger,Cft=Number.isFinite,$ft=Math.trunc,Sft=tft(0);function Ift(t){return null==t||"number"==typeof t?t:"NaN"===t||"Infinity"===t||"-Infinity"===t?Number(t):void 0}function Mft(t){return null==t||"boolean"==typeof t?t:"number"==typeof t?!!t:void 0}const Eft=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function Tft(t){switch(typeof t){case"bigint":return true;case"number":return Cft(t);case"string":return Eft.test(t);default:return false}}function Aft(t){if(null==t)return t;if("string"==typeof t&&t)t=+t;else if("number"!=typeof t)return;return Cft(t)?0|t:void 0}function Dft(t){if(null==t)return t;if("string"==typeof t&&t)t=+t;else if("number"!=typeof t)return;return Cft(t)?t>>>0:void 0}function Rft(t){if("-"===t[0])return false;const e=t.length;return e<20||20===e&&Number(t.substring(0,6))<184467}function Oft(t){const e=t.length;return"-"===t[0]?e<20||20===e&&Number(t.substring(0,7))>-922337:e<19||19===e&&Number(t.substring(0,6))<922337}function Lft(t){return Oft(t)?t:(wft(t),gft())}function _ft(t){return t=$ft(t),kft(t)||(hft(t),t=mft(uft,lft)),t}function Fft(t){var e=$ft(Number(t));return kft(e)?String(e):(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),Lft(t))}function zft(t){var e=$ft(Number(t));return kft(e)?tft(e):(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),zlt()?tft(xft(64,BigInt(t))):tft(Lft(t)))}function jft(t){if(kft(t))t=tft(_ft(t));else{if(t=$ft(t),kft(t))t=String(t);else{const e=String(t);Oft(e)?t=e:(hft(t),t=gft())}t=tft(t)}return t}function Pft(t){return null==t?t:"bigint"==typeof t?(eft(t)?t=Number(t):(t=xft(64,t),t=eft(t)?Number(t):String(t)),t):Tft(t)?"number"==typeof t?_ft(t):Fft(t):void 0}function Bft(t){if(null==t)return t;var e=typeof t;if("bigint"===e)return String(Nft(64,t));if(Tft(t)){if("string"===e)return e=$ft(Number(t)),kft(e)&&e>=0?t=String(e):(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),Rft(t)||(wft(t),t=bft(uft,lft))),t;if("number"===e)return(t=$ft(t))>=0&&kft(t)?t:function(t){if(t<0){hft(t);var e=bft(uft,lft);return t=Number(e),kft(t)?t:e}return Rft(e=String(t))?e:(hft(t),pft(uft,lft))}(t)}}function Wft(t){if("string"!=typeof t)throw Error();return t}function Gft(t){if(null!=t&&"string"!=typeof t)throw Error();return t}function Vft(t){return null==t||"string"==typeof t?t:void 0}function Uft(t,e,n,s){if(null!=t&&"object"==typeof t&&t.W===Blt)return t;if(!Array.isArray(t))return n?2&s?((t=e[$lt])||(Llt((t=new e).u),t=e[$lt]=t),e=t):e=new e:e=void 0,e;let r=n=0|t[Tlt];return 0===r&&(r|=32&s),r|=2&s,r!==n&&Olt(t,r),new e(t)}function Yft(t,e,n){if(e)t:{if(!Tft(e=t))throw vlt("int64");switch(typeof e){case"string":e=zft(e);break t;case"bigint":e=tft(xft(64,e));break t;default:e=jft(e)}}else t=typeof(e=t),e=null==e?e:"bigint"===t?tft(xft(64,e)):Tft(e)?"string"===t?zft(e):jft(e):void 0;return null==(t=e)?n?Sft:void 0:t}function Hft(t){return t}const Zft={};let Qft=function(){try{return Jut(new class extends Map{constructor(){super()}}),false}catch{return true}}();class Xft{constructor(){this.g=new Map}get(t){return this.g.get(t)}set(t,e){return this.g.set(t,e),this.size=this.g.size,this}delete(t){return t=this.g.delete(t),this.size=this.g.size,t}clear(){this.g.clear(),this.size=this.g.size}has(t){return this.g.has(t)}entries(){return this.g.entries()}keys(){return this.g.keys()}values(){return this.g.values()}forEach(t,e){return this.g.forEach(t,e)}[Symbol.iterator](){return this.entries()}}const qft=Qft?(Object.setPrototypeOf(Xft.prototype,Map.prototype),Object.defineProperties(Xft.prototype,{size:{value:0,configurable:true,enumerable:true,writable:true}}),Xft):class extends Map{constructor(){super()}};function Jft(t){return t}function Kft(t){if(2&t.M)throw Error("Cannot mutate an immutable Map")}var tht=class extends qft{constructor(t,e,n=Jft,s=Jft){super();let r=0|t[Tlt];r|=64,Olt(t,r),this.M=r,this.I=e,this.S=n,this.X=this.I?eht:s;for(let i=0;i<t.length;i++){const o=t[i],a=n(o[0],false,true);let c=o[1];e?void 0===c&&(c=null):c=s(o[1],false,true,void 0,void 0,r),super.set(a,c)}}La(){var t=fht;if(0!==this.size)return Array.from(super.entries(),(e=>(e[0]=t(e[0]),e[1]=t(e[1]),e)))}da(t=nht){const e=[],n=super.entries();for(var s;!(s=n.next()).done;)(s=s.value)[0]=t(s[0]),s[1]=t(s[1]),e.push(s);return e}clear(){Kft(this),super.clear()}delete(t){return Kft(this),super.delete(this.S(t,true,false))}entries(){if(this.I){var t=super.keys();t=new Ylt(t,sht,this)}else t=super.entries();return t}values(){if(this.I){var t=super.keys();t=new Ylt(t,tht.prototype.get,this)}else t=super.values();return t}forEach(t,e){this.I?super.forEach(((n,s,r)=>{t.call(e,r.get(s),s,r)})):super.forEach(t,e)}set(t,e){return Kft(this),null==(t=this.S(t,true,false))?this:null==e?(super.delete(t),this):super.set(t,this.X(e,true,true,this.I,false,this.M))}Ja(t){const e=this.S(t[0],false,true);t=t[1],t=this.I?void 0===t?null:t:this.X(t,false,true,void 0,false,this.M),super.set(e,t)}has(t){return super.has(this.S(t,false,false))}get(t){t=this.S(t,false,false);const e=super.get(t);if(void 0!==e){var n=this.I;return n?((n=this.X(e,false,true,n,this.pa,this.M))!==e&&super.set(t,n),n):e}}[Symbol.iterator](){return this.entries()}};function eht(t,e,n,s,r,i){return t=Uft(t,s,n,i),r&&(t=ght(t)),t}function nht(t){return t}function sht(t){return[t,this.get(t)]}let rht,iht,oht,aht;function cht(){return rht||=new tht(Llt([]),void 0,void 0,void 0,Zft)}function uht(t,e,n,s,r){if(null!=t){if(Array.isArray(t)){const i=0|t[Tlt];return 0===t.length&&1&i?void 0:r&&2&i?t:lht(t,e,n,void 0!==s,r)}return e(t,s)}}function lht(t,e,n,s,r){const i=s||n?0|t[Tlt]:0,o=s?!!(32&i):void 0;let a=0;const c=(s=jlt(t)).length;for(let t=0;t<c;t++){var u=s[t];if(t===c-1&&Wlt(u)){var l=e,f=n,h=o,d=r;let t;for(let e in u){const n=uht(u[e],l,f,h,d);null!=n&&((t??={})[e]=n)}u=t}else u=uht(s[t],e,n,o,r);s[t]=u,null!=u&&(a=t+1)}return a<c&&(s.length=a),n&&((t=Hlt(t))&&(s[Ilt]=jlt(t)),n(i,s)),s}function fht(t){return uht(t,hht,void 0,void 0,false)}function hht(t){switch(typeof t){case"number":return Number.isFinite(t)?t:""+t;case"bigint":return eft(t)?Number(t):""+t;case"boolean":return t?1:0;case"object":if(flt(t))return flt(t)&&xlt(Elt),olt(t);if(t.W===Blt)return dht(t);if(t instanceof mlt){const e=t.g;return null==e?"":"string"==typeof e?e:t.g=olt(e)}return t instanceof tht?t.La():void 0}return t}function dht(t){var e=t.u;t=lht(e,hht,void 0,void 0,false);var n=0|e[Tlt];if((e=t.length)&&!(512&n)){var s=t[e-1],r=false;Wlt(s)?(e--,r=true):s=void 0;var i=e-(n=512&n?0:-1),o=(iht??Hft)(i,n,t,s);if(s&&(t[e]=void 0),i<o&&s){for(var a in i=true,s){const c=+a;c<=o?(t[r=c+n]=s[a],e=Math.max(r+1,e),r=false,delete s[a]):i=false}i&&(s=void 0)}for(i=e-1;e>0;i=e-1)if(null==(a=t[i]))e--,r=true;else{if(!((i-=n)>=o))break;(s??={})[i]=a,e--,r=true}r&&(t.length=e),s&&t.push(s)}return t}function pht(t,e,n){return t=mht(t,e[0],e[1],n?1:2),e!==oht&&n&&Rlt(t,8192),t}function mht(t,e,n,s){if(null==t){var r=96;n?(t=[n],r|=512):t=[],e&&(r=-16760833&r|(1023&e)<<14)}else{if(!Array.isArray(t))throw Error("narr");if(8192&(r=0|t[Tlt])||!(64&r)||2&r||xlt(Mlt),1024&r)throw Error("farr");if(64&r)return t;if(1===s||2===s||(r|=64),n&&(r|=512,n!==t[0]))throw Error("mid");t:{var i=(n=t).length;if(i){var o=i-1;if(Wlt(s=n[o])){if((o-=e=512&(r|=256)?0:-1)>=1024)throw Error("pvtlmt");for(var a in s)(i=+a)<o&&(n[i+e]=s[a],delete s[a]);r=-16760833&r|(1023&o)<<14;break t}}if(e){if((a=Math.max(e,i-(512&r?0:-1)))>1024)throw Error("spvt");r=-16760833&r|(1023&a)<<14}}}return Olt(t,r),t}function bht(t,e,n=Flt){if(null!=t){if(rlt&&t instanceof Uint8Array)return e?t:new Uint8Array(t);if(Array.isArray(t)){var s=0|t[Tlt];return 2&s?t:(e&&=0===s||!!(32&s)&&!(64&s||!(16&s)),e?(Olt(t,34|s),4&s&&Object.freeze(t),t):lht(t,bht,4&s?Flt:n,true,true))}return t.W===Blt?t=2&(s=0|(n=t.u)[Tlt])?t:new t.constructor(yht(n,s,true)):t instanceof tht&&!(2&t.M)&&(n=Llt(t.da(bht)),t=new tht(n,t.I,t.S,t.X)),t}}function yht(t,e,n){const s=n||2&e?Flt:_lt,r=!!(32&e);return t=function(t,e,n){const s=jlt(t);var r=s.length;const i=256&e?s[r-1]:void 0;for(r+=i?-1:0,e=512&e?1:0;e<r;e++)s[e]=n(s[e]);if(i){e=s[e]={};for(const t in i)e[t]=n(i[t])}return(t=Hlt(t))&&(s[Ilt]=jlt(t)),s}(t,e,(t=>bht(t,r,s))),Rlt(t,32|(n?2:0)),t}function ght(t){const e=t.u,n=0|e[Tlt];return 2&n?new t.constructor(yht(e,n,false)):t}function wht(t,e){return vht(t=t.u,0|t[Tlt],e)}function vht(t,e,n){if(-1===n)return null;const s=n+(512&e?0:-1),r=t.length-1;return s>=r&&256&e?t[r][n]:s<=r?t[s]:void 0}function xht(t,e,n){const s=t.u;let r=0|s[Tlt];return Ult(r),Nht(s,r,e,n),t}function Nht(t,e,n,s){const r=512&e?0:-1,i=n+r;var o=t.length-1;return i>=o&&256&e?(t[o][n]=s,e):i<=o?(t[i]=s,e):(void 0!==s&&(n>=(o=e>>14&1023||536870912)?null!=s&&(t[o+r]={[n]:s},Olt(t,e|=256)):t[i]=s),e)}function kht(t,e){let n=0|(t=t.u)[Tlt];const s=vht(t,n,e),r=Ift(s);return null!=r&&r!==s&&Nht(t,n,e,r),r}function Cht(t){let e=0|(t=t.u)[Tlt];const n=vht(t,e,1),s=Glt(n,true);return null!=s&&s!==n&&Nht(t,e,1,s),s}function $ht(){return void 0===Zlt?2:4}function Sht(t,e,n,s,r){const i=t.u,o=2&(t=0|i[Tlt])?1:s;r=!!r;let a=0|(s=Iht(i,t,e))[Tlt];if(!(4&a)){4&a&&(s=jlt(s),a=Vht(a,t),t=Nht(i,t,e,s));let r=0,o=0;for(;r<s.length;r++){const t=n(s[r]);null!=t&&(s[o++]=t)}o<r&&(s.length=o),a=Mht(a,t),n=-2049&(20|a),a=n&=-4097,Olt(s,a),2&a&&Object.freeze(s)}return 1===o||4===o&&32&a?Eht(a)||(r=a,a|=2,a!==r&&Olt(s,a),Object.freeze(s)):(2===o&&Eht(a)&&(s=jlt(s),a=Vht(a,t),a=Uht(a,t,r),Olt(s,a),t=Nht(i,t,e,s)),Eht(a)||(e=a,a=Uht(a,t,r),a!==e&&Olt(s,a))),s}function Iht(t,e,n){return t=vht(t,e,n),Array.isArray(t)?t:Plt}function Mht(t,e){return 0===t&&(t=Vht(t,e)),1|t}function Eht(t){return!!(2&t)&&!!(4&t)||!!(1024&t)}function Tht(t){t=jlt(t);for(let e=0;e<t.length;e++){const n=t[e]=jlt(t[e]);Array.isArray(n[1])&&(n[1]=Llt(n[1]))}return t}function Aht(t,e,n,s){let r=0|(t=t.u)[Tlt];Ult(r),Nht(t,r,e,("0"===s?0===Number(n):n===s)?void 0:n)}function Dht(t,e,n,s){Ult(e);let r=Iht(t,e,n);const i=r!==Plt;if(64&e||!(8192&e)||!i){const o=i?0|r[Tlt]:0;let a=o;(!i||2&a||Eht(a)||4&a&&!(32&a))&&(r=jlt(r),a=Vht(a,e),e=Nht(t,e,n,r)),a=-13&Mht(a,e),a=Uht(s?-17&a:16|a,e,true),a!==o&&Olt(r,a)}return r}function Rht(t,e){var n=Jmt;return _ht(Oht(t=t.u),t,0|t[Tlt],n)===e?e:-1}function Oht(t){if(Nlt)return t[Slt]??(t[Slt]=new Map);if(Slt in t)return t[Slt];const e=new Map;return Object.defineProperty(t,Slt,{value:e}),e}function Lht(t,e,n,s){const r=Oht(t),i=_ht(r,t,e,n);return i!==s&&(i&&(e=Nht(t,e,i)),r.set(n,s)),e}function _ht(t,e,n,s){let r=t.get(s);if(null!=r)return r;r=0;for(let t=0;t<s.length;t++){const i=s[t];null!=vht(e,n,i)&&(0!==r&&(n=Nht(e,n,r)),r=i)}return t.set(s,r),r}function Fht(t,e,n){let s=0|t[Tlt];const r=vht(t,s,n);let i;if(null!=r&&r.W===Blt)return(e=ght(r))!==r&&Nht(t,s,n,e),e.u;if(Array.isArray(r)){const t=0|r[Tlt];i=2&t?pht(yht(r,t,false),e,true):64&t?r:pht(i,e,true)}else i=pht(void 0,e,true);return i!==r&&Nht(t,s,n,i),i}function zht(t,e,n){let s=0|(t=t.u)[Tlt];const r=vht(t,s,n);return(e=Uft(r,e,false,s))!==r&&null!=e&&Nht(t,s,n,e),e}function jht(t,e,n){if(null==(e=zht(t,e,n)))return e;let s=0|(t=t.u)[Tlt];if(!(2&s)){const r=ght(e);r!==e&&Nht(t,s,n,e=r)}return e}function Pht(t,e,n,s,r,i,o){t=t.u;var a=!!(2&e);const c=a?1:r;i=!!i,o&&=!a;var u=0|(r=Iht(t,e,s))[Tlt];if(!(a=!!(4&u))){var l=r,f=e;const t=!!(2&(u=Mht(u,e)));t&&(f|=2);let s=!t,i=true,o=0,a=0;for(;o<l.length;o++){const e=Uft(l[o],n,false,f);if(e instanceof n){if(!t){const t=!!(2&(0|e.u[Tlt]));s&&=!t,i&&=t}l[a++]=e}}a<o&&(l.length=a),u|=4,u=i?16|u:-17&u,Olt(l,u=s?8|u:-9&u),t&&Object.freeze(l)}if(o&&!(8&u||!r.length&&(1===c||4===c&&32&u))){for(Eht(u)&&(r=jlt(r),u=Vht(u,e),e=Nht(t,e,s,r)),n=r,o=u,l=0;l<n.length;l++)(u=n[l])!==(f=ght(u))&&(n[l]=f);o|=8,Olt(n,o=n.length?-17&o:16|o),u=o}return 1===c||4===c&&32&u?Eht(u)||(e=u,(u|=!r.length||16&u&&(!a||32&u)?2:1024)!==e&&Olt(r,u),Object.freeze(r)):(2===c&&Eht(u)&&(Olt(r=jlt(r),u=Uht(u=Vht(u,e),e,i)),e=Nht(t,e,s,r)),Eht(u)||(s=u,(u=Uht(u,e,i))!==s&&Olt(r,u))),r}function Bht(t,e,n){const s=0|t.u[Tlt];return Pht(t,s,e,n,$ht(),false,!(2&s))}function Wht(t,e,n,s){return null==s&&(s=void 0),xht(t,n,s)}function Ght(t,e,n,s){null==s&&(s=void 0);t:{let r=0|(t=t.u)[Tlt];if(Ult(r),null==s){const s=Oht(t);if(_ht(s,t,r,n)!==e)break t;s.set(n,0)}else r=Lht(t,r,n,e);Nht(t,r,e,s)}}function Vht(t,e){return-1025&(t=32|(2&e?2|t:-3&t))}function Uht(t,e,n){return 32&e&&n||(t&=-33),t}function Yht(t,e,n){Ult(0|t.u[Tlt]),Sht(t,e,Vft,2,true).push(Wft(n))}function Hht(t,e,n,s){const r=0|t.u[Tlt];Ult(r),t=Pht(t,r,n,e,2,true),s=null!=s?s:new n,t.push(s),t[Tlt]=2&(0|s.u[Tlt])?-9&t[Tlt]:-17&t[Tlt]}function Zht(t,e){return Aft(wht(t,e))}function Qht(t,e){return Vft(wht(t,e))}function Xht(t,e){return kht(t,e)??0}function qht(t,e,n){if(null!=n&&"boolean"!=typeof n)throw t=typeof n,Error(`Expected boolean but got ${"object"!=t?t:n?Array.isArray(n)?"array":t:"null"}: ${n}`);xht(t,e,n)}function Jht(t,e,n){if(null!=n){if("number"!=typeof n)throw vlt("int32");if(!Cft(n))throw vlt("int32");n|=0}xht(t,e,n)}function Kht(t,e,n){if(null!=n&&"number"!=typeof n)throw Error(`Value of float/double field must be a number, found ${typeof n}: ${n}`);xht(t,e,n)}function tdt(t,e,n){{const o=t.u;let a=0|o[Tlt];if(Ult(a),null==n)Nht(o,a,e);else{var s=t=0|n[Tlt],r=Eht(t),i=r||Object.isFrozen(n);for(r||(t=0),i||(n=jlt(n),s=0,t=Uht(t=Vht(t,a),a,true),i=false),t|=21,r=0;r<n.length;r++){const e=n[r],o=Wft(e);Object.is(e,o)||(i&&(n=jlt(n),s=0,t=Uht(t=Vht(t,a),a,true),i=false),n[r]=o)}t!==s&&(i&&(n=jlt(n),t=Uht(t=Vht(t,a),a,true)),Olt(n,t)),Nht(o,a,e,n)}}}function edt(t,e){return Error(`Invalid wire type: ${t} (at position ${e})`)}function ndt(){return Error("Failed to read varint, encoding is invalid.")}function sdt(t,e){return Error(`Tried to read past the end of the data ${e} > ${t}`)}function rdt(t){if("string"==typeof t)return{buffer:llt(t),O:false};if(Array.isArray(t))return{buffer:new Uint8Array(t),O:false};if(t.constructor===Uint8Array)return{buffer:t,O:false};if(t.constructor===ArrayBuffer)return{buffer:new Uint8Array(t),O:false};if(t.constructor===mlt)return{buffer:plt(t)||new Uint8Array(0),O:true};if(t instanceof Uint8Array)return{buffer:new Uint8Array(t.buffer,t.byteOffset,t.byteLength),O:false};throw Error("Type not convertible to a Uint8Array, expected a Uint8Array, an ArrayBuffer, a base64 encoded string, a ByteString or an Array of numbers")}function idt(t,e){let n,s=0,r=0,i=0;const o=t.h;let a=t.g;do{n=o[a++],s|=(127&n)<<i,i+=7}while(i<32&&128&n);for(i>32&&(r|=(127&n)>>4),i=3;i<32&&128&n;i+=7)n=o[a++],r|=(127&n)<<i;if(ddt(t,a),n<128)return e(s>>>0,r>>>0);throw ndt()}function odt(t){let e=0,n=t.g;const s=n+10,r=t.h;for(;n<s;){const s=r[n++];if(e|=s,0==(128&s))return ddt(t,n),!!(127&e)}throw ndt()}function adt(t){const e=t.h;let n=t.g,s=e[n++],r=127&s;if(128&s&&(s=e[n++],r|=(127&s)<<7,128&s&&(s=e[n++],r|=(127&s)<<14,128&s&&(s=e[n++],r|=(127&s)<<21,128&s&&(s=e[n++],r|=s<<28,128&s&&128&e[n++]&&128&e[n++]&&128&e[n++]&&128&e[n++]&&128&e[n++])))))throw ndt();return ddt(t,n),r}function cdt(t){return adt(t)>>>0}function udt(t){var e=t.h;const n=t.g,s=e[n],r=e[n+1],i=e[n+2];return e=e[n+3],ddt(t,t.g+4),(s<<0|r<<8|i<<16|e<<24)>>>0}function ldt(t){var e=udt(t);t=2*(e>>31)+1;const n=e>>>23&255;return e&=8388607,255==n?e?NaN:t*(1/0):0==n?1401298464324817e-60*t*e:t*Math.pow(2,n-150)*(e+8388608)}function fdt(t){return adt(t)}function hdt(t,e,{aa:n=false}={}){t.aa=n,e&&(e=rdt(e),t.h=e.buffer,t.m=e.O,t.j=0,t.l=t.h.length,t.g=t.j)}function ddt(t,e){if(t.g=e,e>t.l)throw sdt(t.l,e)}function pdt(t,e){if(e<0)throw Error(`Tried to read a negative byte length: ${e}`);const n=t.g,s=n+e;if(s>t.l)throw sdt(e,t.l-n);return t.g=s,n}function mdt(t,e){if(0==e)return dlt();var n=pdt(t,e);return t.aa&&t.m?n=t.h.subarray(n,n+e):(t=t.h,n=n===(e=n+e)?new Uint8Array(0):aft?t.slice(n,e):new Uint8Array(t.subarray(n,e))),0==n.length?dlt():new mlt(n,hlt)}tht.prototype.toJSON=void 0;var bdt=[];function ydt(t){var e=t.g;if(e.g==e.l)return false;t.l=t.g.g;var n=cdt(t.g);if(e=n>>>3,!((n&=7)>=0&&n<=5))throw edt(n,t.l);if(e<1)throw Error(`Invalid field number: ${e} (at position ${t.l})`);return t.m=e,t.h=n,true}function gdt(t){switch(t.h){case 0:0!=t.h?gdt(t):odt(t.g);break;case 1:ddt(t=t.g,t.g+8);break;case 2:if(2!=t.h)gdt(t);else{var e=cdt(t.g);ddt(t=t.g,t.g+e)}break;case 5:ddt(t=t.g,t.g+4);break;case 3:for(e=t.m;;){if(!ydt(t))throw Error("Unmatched start-group tag: stream EOF");if(4==t.h){if(t.m!=e)throw Error("Unmatched end-group tag");break}gdt(t)}break;default:throw edt(t.h,t.l)}}function wdt(t,e,n){const s=t.g.l,r=cdt(t.g),i=t.g.g+r;let o=i-s;if(o<=0&&(t.g.l=i,n(e,t,void 0,void 0,void 0),o=i-t.g.g),o)throw Error(`Message parsing ended unexpectedly. Expected to read ${r} bytes, instead read ${r-o} bytes, either the data ended unexpectedly or the message misreported its own length`);return t.g.g=i,t.g.l=s,e}function vdt(t){var e=cdt(t.g),n=pdt(t=t.g,e);if(t=t.h,_ut){var s,r=t;(s=Lut)||(s=Lut=new TextDecoder("utf-8",{fatal:true})),e=n+e,r=0===n&&e===r.length?r:r.subarray(n,e);try{var i=s.decode(r)}catch(t){if(void 0===Out){try{s.decode(new Uint8Array([128]))}catch(t){}try{s.decode(new Uint8Array([97])),Out=true}catch(t){Out=false}}throw!Out&&(Lut=void 0),t}}else{e=(i=n)+e,n=[];let a,c=null;for(;i<e;){var o=t[i++];o<128?n.push(o):o<224?i>=e?Dut():(a=t[i++],o<194||128!=(192&a)?(i--,Dut()):n.push((31&o)<<6|63&a)):o<240?i>=e-1?Dut():(a=t[i++],128!=(192&a)||224===o&&a<160||237===o&&a>=160||128!=(192&(s=t[i++]))?(i--,Dut()):n.push((15&o)<<12|(63&a)<<6|63&s)):o<=244?i>=e-2?Dut():(a=t[i++],128!=(192&a)||a-144+(o<<28)>>30!=0||128!=(192&(s=t[i++]))||128!=(192&(r=t[i++]))?(i--,Dut()):(o=(7&o)<<18|(63&a)<<12|(63&s)<<6|63&r,o-=65536,n.push(55296+(o>>10&1023),56320+(1023&o)))):Dut(),n.length>=8192&&(c=Rut(c,n),n.length=0)}i=Rut(c,n)}return i}function xdt(t){const e=cdt(t.g);return mdt(t.g,e)}function Ndt(t,e,n){var s=cdt(t.g);for(s=t.g.g+s;t.g.g<s;)n.push(e(t.g))}var kdt=[];function Cdt(t,e,n){e.g?e.m(t,e.g,e.h,n):e.m(t,e.h,n)}var $dt=class{constructor(t,e){this.u=mht(t,e)}toJSON(){try{var t=dht(this)}finally{iht=void 0}return t}l(){var t=Hbt;return t.g?t.l(this,t.g,t.h):t.l(this,t.h,t.defaultValue)}clone(){const t=this.u;return new this.constructor(yht(t,0|t[Tlt],false))}O(){return!!(2&(0|this.u[Tlt]))}};function Sdt(t){return t?/^\d+$/.test(t)?(wft(t),new Idt(uft,lft)):null:Mdt||=new Idt(0,0)}$dt.prototype.W=Blt,$dt.prototype.toString=function(){return this.u.toString()};var Idt=class{constructor(t,e){this.h=t>>>0,this.g=e>>>0}};let Mdt;function Edt(t){return t?/^-?\d+$/.test(t)?(wft(t),new Tdt(uft,lft)):null:Adt||=new Tdt(0,0)}var Tdt=class{constructor(t,e){this.h=t>>>0,this.g=e>>>0}};let Adt;function Ddt(t,e,n){for(;n>0||e>127;)t.g.push(127&e|128),e=(e>>>7|n<<25)>>>0,n>>>=7;t.g.push(e)}function Rdt(t,e){for(;e>127;)t.g.push(127&e|128),e>>>=7;t.g.push(e)}function Odt(t,e){if(e>=0)Rdt(t,e);else{for(let n=0;n<9;n++)t.g.push(127&e|128),e>>=7;t.g.push(1)}}function Ldt(t,e){t.g.push(e>>>0&255),t.g.push(e>>>8&255),t.g.push(e>>>16&255),t.g.push(e>>>24&255)}function _dt(t,e){0!==e.length&&(t.l.push(e),t.h+=e.length)}function Fdt(t,e,n){Rdt(t.g,8*e+n)}function zdt(t,e){return Fdt(t,e,2),e=t.g.end(),_dt(t,e),e.push(t.h),e}function jdt(t,e){var n=e.pop();for(n=t.h+t.g.length()-n;n>127;)e.push(127&n|128),n>>>=7,t.h++;e.push(n),t.h++}function Pdt(t,e,n){Fdt(t,e,2),Rdt(t.g,n.length),_dt(t,t.g.end()),_dt(t,n)}function Bdt(t,e,n,s){null!=n&&(e=zdt(t,e),s(n,t),jdt(t,e))}function Wdt(){const t=class{constructor(){throw Error()}};return Object.setPrototypeOf(t,t.prototype),t}var Gdt=Wdt(),Vdt=Wdt(),Udt=Wdt(),Ydt=Wdt(),Hdt=Wdt(),Zdt=Wdt(),Qdt=Wdt(),Xdt=Wdt(),qdt=Wdt(),Jdt=class{constructor(t,e,n){this.g=t,this.h=e,t=Gdt,this.l=!!t&&n===t||false}};function Kdt(t,e){return new Jdt(t,e,Gdt)}function tpt(t,e,n,s,r){Bdt(t,n,fpt(e,s),r)}const ept=Kdt((function(t,e,n,s,r){return 2===t.h&&(wdt(t,Fht(e,s,n),r),true)}),tpt),npt=Kdt((function(t,e,n,s,r){return 2===t.h&&(wdt(t,Fht(e,s,n),r),true)}),tpt);var spt=Symbol(),rpt=Symbol(),ipt=Symbol(),opt=Symbol();let apt,cpt;function upt(t,e,n,s){var r=s[t];if(r)return r;(r={}).Ma=s,r.T=function(t){switch(typeof t){case"boolean":return oht||=[0,void 0,true];case"number":return t>0?void 0:0===t?aht||=[0,void 0]:[-t,void 0];case"string":return[0,t];case"object":return t}}(s[0]);var i=s[1];let o=1;i&&i.constructor===Object&&(r.ga=i,"function"==typeof(i=s[++o])&&(r.la=true,apt??=i,cpt??=s[o+1],i=s[o+=2]));const a={};for(;i&&Array.isArray(i)&&i.length&&"number"==typeof i[0]&&i[0]>0;){for(var c=0;c<i.length;c++)a[i[c]]=i;i=s[++o]}for(c=1;void 0!==i;){let t;"number"==typeof i&&(c+=i,i=s[++o]);var u=void 0;if(i instanceof Jdt?t=i:(t=ept,o--),t?.l){i=s[++o],u=s;var l=o;"function"==typeof i&&(i=i(),u[l]=i),u=i}for(l=c+1,"number"==typeof(i=s[++o])&&i<0&&(l-=i,i=s[++o]);c<l;c++){const s=a[c];u?n(r,c,t,u,s):e(r,c,t,s)}}return s[t]=r}function lpt(t){return Array.isArray(t)?t[0]instanceof Jdt?t:[npt,t]:[t,void 0]}function fpt(t,e){return t instanceof $dt?t.u:Array.isArray(t)?pht(t,e,false):void 0}function hpt(t,e,n,s){const r=n.g;t[e]=s?(t,e,n)=>r(t,e,n,s):r}function dpt(t,e,n,s,r){const i=n.g;let o,a;t[e]=(t,e,n)=>i(t,e,n,a||=upt(rpt,hpt,dpt,s).T,o||=ppt(s),r)}function ppt(t){let e=t[ipt];if(null!=e)return e;const n=upt(rpt,hpt,dpt,t);return e=n.la?(t,e)=>apt(t,e,n):(t,e)=>{const s=0|t[Tlt];for(;ydt(e)&&4!=e.h;){var r=e.m,i=n[r];if(null==i){var o=n.ga;o&&(o=o[r])&&(null!=(o=mpt(o))&&(i=n[r]=o))}null!=i&&i(e,t,r)||(r=(i=e).l,gdt(i),i.fa?i=void 0:(o=i.g.g-r,i.g.g=r,i=mdt(i.g,o)),r=t,i&&((o=r[Ilt])?o.push(i):r[Ilt]=[i]))}return 8192&s&&Llt(t),true},t[ipt]=e}function mpt(t){const e=(t=lpt(t))[0].g;if(t=t[1]){const n=ppt(t),s=upt(rpt,hpt,dpt,t).T;return(t,r,i)=>e(t,r,i,s,n)}return e}function bpt(t,e,n){t[e]=n.h}function ypt(t,e,n,s){let r,i;const o=n.h;t[e]=(t,e,n)=>o(t,e,n,i||=upt(spt,bpt,ypt,s).T,r||=gpt(s))}function gpt(t){let e=t[opt];if(!e){const n=upt(spt,bpt,ypt,t);e=(t,e)=>wpt(t,e,n),t[opt]=e}return e}function wpt(t,e,n){!function(t,e,n){const s=512&e?0:-1,r=t.length,i=r+((e=64&e?256&e:!!r&&Wlt(t[r-1]))?-1:0);for(let e=0;e<i;e++)n(e-s,t[e]);if(e){t=t[r-1];for(const e in t)!isNaN(e)&&n(+e,t[e])}}(t,0|t[Tlt]|(n.T[1]?512:0),((t,s)=>{if(null!=s){var r=function(t,e){var n=t[e];if(n)return n;if((n=t.ga)&&(n=n[e])){var s=(n=lpt(n))[0].h;if(n=n[1]){const e=gpt(n),r=upt(spt,bpt,ypt,n).T;n=t.la?cpt(r,e):(t,n,i)=>s(t,n,i,r,e)}else n=s;return t[e]=n}}(n,t);r&&r(e,s,t)}})),(t=Hlt(t))&&function(t,e){_dt(t,t.g.end());for(let n=0;n<e.length;n++)_dt(t,plt(e[n])||new Uint8Array(0))}(e,t)}function vpt(t,e){if(Array.isArray(e)){var n=0|e[Tlt];if(4&n)return e;for(var s=0,r=0;s<e.length;s++){const n=t(e[s]);null!=n&&(e[r++]=n)}return r<s&&(e.length=r),Olt(e,-6145&(5|n)),2&n&&Object.freeze(e),e}}function xpt(t,e,n){return new Jdt(t,e,n)}function Npt(t,e,n){return new Jdt(t,e,n)}function kpt(t,e,n){Nht(t,0|t[Tlt],e,n)}var Cpt=Kdt((function(t,e,n,s,r){return 2===t.h&&(t=wdt(t,pht([void 0,void 0],s,true),r),Ult(s=0|e[Tlt]),(r=vht(e,s,n))instanceof tht?0!=(2&r.M)?((r=r.da()).push(t),Nht(e,s,n,r)):r.Ja(t):Array.isArray(r)?(2&(0|r[Tlt])&&Nht(e,s,n,r=Tht(r)),r.push(t)):Nht(e,s,n,[t]),true)}),(function(t,e,n,s,r){if(e instanceof tht)e.forEach(((e,i)=>{Bdt(t,n,pht([i,e],s,false),r)}));else if(Array.isArray(e))for(let i=0;i<e.length;i++){const o=e[i];Array.isArray(o)&&Bdt(t,n,pht(o,s,false),r)}}));function $pt(t,e,n){if(e=function(t){if(null==t)return t;const e=typeof t;if("bigint"===e)return String(xft(64,t));if(Tft(t)){if("string"===e)return Fft(t);if("number"===e)return _ft(t)}}(e),null!=e){if("string"==typeof e)Edt(e);if(null!=e)switch(Fdt(t,n,0),typeof e){case"number":t=t.g,hft(e),Ddt(t,uft,lft);break;case"bigint":n=BigInt.asUintN(64,e),n=new Tdt(Number(n&BigInt(4294967295)),Number(n>>BigInt(32))),Ddt(t.g,n.h,n.g);break;default:n=Edt(e),Ddt(t.g,n.h,n.g)}}}function Spt(t,e,n){null!=(e=Aft(e))&&null!=e&&(Fdt(t,n,0),Odt(t.g,e))}function Ipt(t,e,n){null!=(e=Mft(e))&&(Fdt(t,n,0),t.g.g.push(e?1:0))}function Mpt(t,e,n){null!=(e=Vft(e))&&Pdt(t,n,jut(e))}function Ept(t,e,n,s,r){Bdt(t,n,fpt(e,s),r)}function Tpt(t,e,n){null==e||"string"==typeof e||e instanceof mlt||(flt(e)?flt(e)&&xlt(Elt):e=void 0),null!=e&&Pdt(t,n,rdt(e).buffer)}function Apt(t,e,n){return(5===t.h||2===t.h)&&(e=Dht(e,0|e[Tlt],n,false),2==t.h?Ndt(t,ldt,e):e.push(ldt(t.g)),true)}var Dpt=xpt((function(t,e,n){if(1!==t.h)return false;var s=t.g;t=udt(s);const r=udt(s);s=2*(r>>31)+1;const i=r>>>20&2047;return t=4294967296*(1048575&r)+t,kpt(e,n,2047==i?t?NaN:s*(1/0):0==i?5e-324*s*t:s*Math.pow(2,i-1075)*(t+4503599627370496)),true}),(function(t,e,n){null!=(e=Ift(e))&&(Fdt(t,n,1),t=t.g,(n=cft||=new DataView(new ArrayBuffer(8))).setFloat64(0,+e,true),uft=n.getUint32(0,true),lft=n.getUint32(4,true),Ldt(t,uft),Ldt(t,lft))}),Wdt()),Rpt=xpt((function(t,e,n){return 5===t.h&&(kpt(e,n,ldt(t.g)),true)}),(function(t,e,n){null!=(e=Ift(e))&&(Fdt(t,n,5),t=t.g,dft(e),Ldt(t,uft))}),Qdt),Opt=Npt(Apt,(function(t,e,n){if(null!=(e=vpt(Ift,e)))for(let o=0;o<e.length;o++){var s=t,r=n,i=e[o];null!=i&&(Fdt(s,r,5),s=s.g,dft(i),Ldt(s,uft))}}),Qdt),Lpt=Npt(Apt,(function(t,e,n){if(null!=(e=vpt(Ift,e))&&e.length){Fdt(t,n,2),Rdt(t.g,4*e.length);for(let s=0;s<e.length;s++)n=t.g,dft(e[s]),Ldt(n,uft)}}),Qdt),_pt=xpt((function(t,e,n){return 0===t.h&&(kpt(e,n,idt(t.g,mft)),true)}),$pt,Zdt),Fpt=xpt((function(t,e,n){return 0===t.h&&(kpt(e,n,0===(t=idt(t.g,mft))?void 0:t),true)}),$pt,Zdt),zpt=xpt((function(t,e,n){return 0===t.h&&(kpt(e,n,idt(t.g,pft)),true)}),(function(t,e,n){if(null!=(e=Bft(e))){if("string"==typeof e)Sdt(e);if(null!=e)switch(Fdt(t,n,0),typeof e){case"number":t=t.g,hft(e),Ddt(t,uft,lft);break;case"bigint":n=BigInt.asUintN(64,e),n=new Idt(Number(n&BigInt(4294967295)),Number(n>>BigInt(32))),Ddt(t.g,n.h,n.g);break;default:n=Sdt(e),Ddt(t.g,n.h,n.g)}}}),Wdt()),jpt=xpt((function(t,e,n){return 0===t.h&&(kpt(e,n,adt(t.g)),true)}),Spt,Ydt),Ppt=Npt((function(t,e,n){return(0===t.h||2===t.h)&&(e=Dht(e,0|e[Tlt],n,false),2==t.h?Ndt(t,adt,e):e.push(adt(t.g)),true)}),(function(t,e,n){if(null!=(e=vpt(Aft,e))&&e.length){n=zdt(t,n);for(let n=0;n<e.length;n++)Odt(t.g,e[n]);jdt(t,n)}}),Ydt),Bpt=xpt((function(t,e,n){return 0===t.h&&(kpt(e,n,0===(t=adt(t.g))?void 0:t),true)}),Spt,Ydt),Wpt=xpt((function(t,e,n){return 0===t.h&&(kpt(e,n,odt(t.g)),true)}),Ipt,Vdt),Gpt=xpt((function(t,e,n){return 0===t.h&&(kpt(e,n,false===(t=odt(t.g))?void 0:t),true)}),Ipt,Vdt),Vpt=Npt((function(t,e,n){return 2===t.h&&(t=vdt(t),Dht(e,0|e[Tlt],n,false).push(t),true)}),(function(t,e,n){if(null!=(e=vpt(Vft,e)))for(let o=0;o<e.length;o++){var s=t,r=n,i=e[o];null!=i&&Pdt(s,r,jut(i))}}),Udt),Upt=xpt((function(t,e,n){return 2===t.h&&(kpt(e,n,""===(t=vdt(t))?void 0:t),true)}),Mpt,Udt),Ypt=xpt((function(t,e,n){return 2===t.h&&(kpt(e,n,vdt(t)),true)}),Mpt,Udt),Hpt=function(t,e,n=Gdt){return new Jdt(t,e,n)}((function(t,e,n,s,r){return 2===t.h&&(s=pht(void 0,s,true),Dht(e,0|e[Tlt],n,true).push(s),wdt(t,s,r),true)}),(function(t,e,n,s,r){if(Array.isArray(e))for(let i=0;i<e.length;i++)Ept(t,e[i],n,s,r)})),Zpt=Kdt((function(t,e,n,s,r,i){return 2===t.h&&(Lht(e,0|e[Tlt],i,n),wdt(t,e=Fht(e,s,n),r),true)}),Ept),Qpt=xpt((function(t,e,n){return 2===t.h&&(kpt(e,n,xdt(t)),true)}),Tpt,Xdt),Xpt=Npt((function(t,e,n){return(0===t.h||2===t.h)&&(e=Dht(e,0|e[Tlt],n,false),2==t.h?Ndt(t,cdt,e):e.push(cdt(t.g)),true)}),(function(t,e,n){if(null!=(e=vpt(Dft,e)))for(let o=0;o<e.length;o++){var s=t,r=n,i=e[o];null!=i&&(Fdt(s,r,0),Rdt(s.g,i))}}),Hdt),qpt=xpt((function(t,e,n){return 0===t.h&&(kpt(e,n,0===(t=cdt(t.g))?void 0:t),true)}),(function(t,e,n){null!=(e=Dft(e))&&null!=e&&(Fdt(t,n,0),Rdt(t.g,e))}),Hdt),Jpt=xpt((function(t,e,n){return 0===t.h&&(kpt(e,n,adt(t.g)),true)}),(function(t,e,n){null!=(e=Aft(e))&&(e=parseInt(e,10),Fdt(t,n,0),Odt(t.g,e))}),qdt);class Kpt{constructor(t,e){this.h=t,this.g=e,this.l=jht,this.m=Wht,this.defaultValue=void 0}register(){Jut(this)}}function tmt(t,e){return new Kpt(t,e)}function emt(t,e){return(n,s)=>{if(kdt.length){const t=kdt.pop();t.o(s),hdt(t.g,n,s),n=t}else n=new class{constructor(t,e){if(bdt.length){const n=bdt.pop();hdt(n,t,e),t=n}else t=new class{constructor(t,e){this.h=null,this.m=false,this.g=this.l=this.j=0,hdt(this,t,e)}clear(){this.h=null,this.m=false,this.g=this.l=this.j=0,this.aa=false}}(t,e);this.g=t,this.l=this.g.g,this.h=this.m=-1,this.o(e)}o({fa:t=false}={}){this.fa=t}}(n,s);try{const s=new t,i=s.u;ppt(e)(i,n);var r=s}finally{n.g.clear(),n.m=-1,n.h=-1,kdt.length<100&&kdt.push(n)}return r}}function nmt(t){return function(){const e=new class{constructor(){this.l=[],this.h=0,this.g=new class{constructor(){this.g=[]}length(){return this.g.length}end(){const t=this.g;return this.g=[],t}}}};wpt(this.u,e,upt(spt,bpt,ypt,t)),_dt(e,e.g.end());const n=new Uint8Array(e.h),s=e.l,r=s.length;let i=0;for(let t=0;t<r;t++){const e=s[t];n.set(e,i),i+=e.length}return e.l=[n],n}}var smt=class extends $dt{constructor(t){super(t)}},rmt=[0,Upt,xpt((function(t,e,n){return 2===t.h&&(kpt(e,n,(t=xdt(t))===dlt()?void 0:t),true)}),(function(t,e,n){if(null!=e){if(e instanceof $dt){const s=e.Oa;return void(s&&(e=s(e),null!=e&&Pdt(t,n,rdt(e).buffer)))}if(Array.isArray(e))return}Tpt(t,e,n)}),Xdt)];let imt,omt=globalThis.trustedTypes;function amt(t){void 0===imt&&(imt=function(){let t=null;if(!omt)return t;try{const e=t=>t;t=omt.createPolicy("goog#html",{createHTML:e,createScript:e,createScriptURL:e})}catch(t){}return t}());var e=imt;return new class{constructor(t){this.g=t}toString(){return this.g+""}}(e?e.createScriptURL(t):t)}function cmt(t,...e){if(0===e.length)return amt(t[0]);let n=t[0];for(let s=0;s<e.length;s++)n+=encodeURIComponent(e[s])+t[s+1];return amt(n)}var umt=[0,jpt,Jpt,Wpt,-1,Ppt,Jpt,-1],lmt=class extends $dt{constructor(t){super(t)}},fmt=[0,Wpt,Ypt,Wpt,Jpt,-1,Npt((function(t,e,n){return(0===t.h||2===t.h)&&(e=Dht(e,0|e[Tlt],n,false),2==t.h?Ndt(t,fdt,e):e.push(adt(t.g)),true)}),(function(t,e,n){if(null!=(e=vpt(Aft,e))&&e.length){n=zdt(t,n);for(let n=0;n<e.length;n++)Odt(t.g,e[n]);jdt(t,n)}}),qdt),Ypt,-1,[0,Wpt,-1],Jpt,Wpt,-1],hmt=[0,Ypt,-2],dmt=class extends $dt{constructor(t){super(t)}},pmt=[0],mmt=[0,jpt,Wpt,1,Wpt,-3],bmt=class extends $dt{constructor(t){super(t,2)}},ymt={};ymt[336783863]=[0,Ypt,Wpt,-1,jpt,[0,[1,2,3,4,5,6,7,8,9],Zpt,pmt,Zpt,fmt,Zpt,hmt,Zpt,mmt,Zpt,umt,Zpt,[0,Ypt,-2],Zpt,[0,Ypt,Jpt],Zpt,[0,Jpt,Ypt,-1],Zpt,[0,Jpt,-1]],[0,Ypt],Wpt,[0,[1,3],[2,4],Zpt,[0,Ppt],-1,Zpt,[0,Vpt],-1,Hpt,[0,Ypt,-1]],Ypt];var gmt=[0,Fpt,-1,Gpt,-3,Fpt,Ppt,Upt,Bpt,Fpt,-1,Gpt,Bpt,Gpt,-2,Upt];function wmt(t,e){Aht(t,2,Gft(e),"")}function vmt(t,e){Yht(t,3,e)}function xmt(t,e){Yht(t,4,e)}var Nmt=class extends $dt{constructor(t){super(t,500)}o(t){return Wht(this,0,7,t)}},kmt=[-1,{}],Cmt=[0,Ypt,1,kmt],$mt=[0,Ypt,Vpt,kmt];function Smt(t,e){Hht(t,1,Nmt,e)}function Imt(t,e){Yht(t,10,e)}function Mmt(t,e){Yht(t,15,e)}var Emt=class extends $dt{constructor(t){super(t,500)}o(t){return Wht(this,0,1001,t)}},Tmt=[-500,Hpt,[-500,Upt,-1,Vpt,-3,[-2,ymt,Wpt],Hpt,rmt,Bpt,-1,Cmt,$mt,Hpt,[0,Upt,Gpt],Upt,gmt,Bpt,Vpt,987,Vpt],4,Hpt,[-500,Ypt,-1,[-1,{}],998,Ypt],Hpt,[-500,Ypt,Vpt,-1,[-2,{},Wpt],997,Vpt,-1],Bpt,Hpt,[-500,Ypt,Vpt,kmt,998,Vpt],Vpt,Bpt,Cmt,$mt,Hpt,[0,Upt,-1,kmt],Vpt,-2,gmt,Upt,-1,Gpt,[0,Gpt,qpt],978,kmt,Hpt,rmt];Emt.prototype.g=nmt(Tmt);var Amt=emt(Emt,Tmt),Dmt=class extends $dt{constructor(t){super(t)}},Rmt=class extends $dt{constructor(t){super(t)}g(){return Bht(this,Dmt,1)}},Omt=[0,Hpt,[0,jpt,Rpt,Ypt,-1]],Lmt=emt(Rmt,Omt),_mt=class extends $dt{constructor(t){super(t)}},Fmt=class extends $dt{constructor(t){super(t)}},zmt=class extends $dt{constructor(t){super(t)}h(){return jht(this,_mt,2)}g(){return Bht(this,Fmt,5)}},jmt=emt(class extends $dt{constructor(t){super(t)}},[0,Vpt,Ppt,Lpt,[0,Jpt,[0,jpt,-3],[0,Rpt,-3],[0,jpt,-1,[0,Hpt,[0,jpt,-2]]],Hpt,[0,Rpt,-1,Ypt,Rpt]],Ypt,-1,_pt,Hpt,[0,jpt,Rpt],Vpt,_pt]),Pmt=class extends $dt{constructor(t){super(t)}},Bmt=emt(class extends $dt{constructor(t){super(t)}},[0,Hpt,[0,Rpt,-4]]),Wmt=class extends $dt{constructor(t){super(t)}},Gmt=emt(class extends $dt{constructor(t){super(t)}},[0,Hpt,[0,Rpt,-4]]),Vmt=class extends $dt{constructor(t){super(t)}},Umt=[0,jpt,-1,Lpt,Jpt],Ymt=class extends $dt{constructor(t){super(t)}};Ymt.prototype.g=nmt([0,Rpt,-4,_pt]);var Hmt=class extends $dt{constructor(t){super(t)}},Zmt=emt(class extends $dt{constructor(t){super(t)}},[0,Hpt,[0,1,jpt,Ypt,Omt],_pt]),Qmt=class extends $dt{constructor(t){super(t)}},Xmt=class extends $dt{constructor(t){super(t)}ma(){const t=Cht(this);return null==t?dlt():t}},qmt=class extends $dt{constructor(t){super(t)}},Jmt=[1,2],Kmt=emt(class extends $dt{constructor(t){super(t)}},[0,Hpt,[0,Jmt,Zpt,[0,Lpt],Zpt,[0,Qpt],jpt,Ypt],_pt]),tbt=class extends $dt{constructor(t){super(t)}},ebt=[0,Ypt,jpt,Rpt,Vpt,-1],nbt=class extends $dt{constructor(t){super(t)}},sbt=[0,Wpt,-1],rbt=class extends $dt{constructor(t){super(t)}},ibt=[1,2,3,4,5],obt=class extends $dt{constructor(t){super(t)}g(){return null!=Cht(this)}h(){return null!=Qht(this,2)}},abt=class extends $dt{constructor(t){super(t)}g(){return Mft(wht(this,2))??false}},cbt=[0,Qpt,Ypt,[0,jpt,_pt,-1],[0,zpt,_pt]],ubt=[0,cbt,Wpt,[0,ibt,Zpt,mmt,Zpt,fmt,Zpt,umt,Zpt,pmt,Zpt,hmt],Jpt],lbt=class extends $dt{constructor(t){super(t)}},fbt=[0,ubt,Rpt,-1,jpt],hbt=tmt(502141897,lbt);ymt[502141897]=fbt;var dbt=emt(class extends $dt{constructor(t){super(t)}},[0,[0,Jpt,-1,Opt,Xpt],Umt]),pbt=class extends $dt{constructor(t){super(t)}},mbt=class extends $dt{constructor(t){super(t)}},bbt=[0,ubt,Rpt,[0,ubt],Wpt],ybt=[0,ubt,fbt,bbt,Rpt,[0,[0,cbt]]],gbt=tmt(508968150,mbt);ymt[508968150]=ybt,ymt[508968149]=bbt;var wbt=class extends $dt{constructor(t){super(t)}},vbt=tmt(513916220,wbt);ymt[513916220]=[0,ubt,ybt,jpt];var xbt=class extends $dt{constructor(t){super(t)}h(){return jht(this,tbt,2)}g(){xht(this,2)}},Nbt=[0,ubt,ebt];ymt[478825465]=Nbt;var kbt=class extends $dt{constructor(t){super(t)}},Cbt=class extends $dt{constructor(t){super(t)}},$bt=class extends $dt{constructor(t){super(t)}},Sbt=class extends $dt{constructor(t){super(t)}},Ibt=class extends $dt{constructor(t){super(t)}},Mbt=[0,ubt,[0,ubt],Nbt,-1],Ebt=[0,ubt,Rpt,jpt],Tbt=[0,ubt,Rpt],Abt=[0,ubt,Ebt,Tbt,Rpt],Dbt=tmt(479097054,Ibt);ymt[479097054]=[0,ubt,Abt,Mbt],ymt[463370452]=Mbt,ymt[464864288]=Ebt;var Rbt=tmt(462713202,Sbt);ymt[462713202]=Abt,ymt[474472470]=Tbt;var Obt=class extends $dt{constructor(t){super(t)}},Lbt=class extends $dt{constructor(t){super(t)}},_bt=class extends $dt{constructor(t){super(t)}},Fbt=class extends $dt{constructor(t){super(t)}},zbt=[0,ubt,Rpt,-1,jpt],jbt=[0,ubt,Rpt,Wpt];Fbt.prototype.g=nmt([0,ubt,Tbt,[0,ubt],fbt,bbt,zbt,jbt]);var Pbt=class extends $dt{constructor(t){super(t)}},Bbt=tmt(456383383,Pbt);ymt[456383383]=[0,ubt,ebt];var Wbt=class extends $dt{constructor(t){super(t)}},Gbt=tmt(476348187,Wbt);ymt[476348187]=[0,ubt,sbt];var Vbt=class extends $dt{constructor(t){super(t)}},Ubt=class extends $dt{constructor(t){super(t)}},Ybt=[0,Jpt,-1],Hbt=tmt(458105876,class extends $dt{constructor(t){super(t)}g(){var t=this.u;const e=0|t[Tlt],n=2&e;return t=function(t,e,n){var s=Ubt;const r=2&e;let i=false;if(null==n){if(r)return cht();n=[]}else if(n.constructor===tht){if(0==(2&n.M)||r)return n;n=n.da()}else Array.isArray(n)?i=!!(2&(0|n[Tlt])):n=[];if(r){if(!n.length)return cht();i||(i=true,Llt(n))}else i&&(i=false,n=Tht(n));return i||(64&(0|n[Tlt])?n[Tlt]&=-33:32&e&&Rlt(n,32)),Nht(t,e,2,s=new tht(n,s,Yft,void 0)),s}(t,e,vht(t,e,2)),!n&&Ubt&&(t.pa=true),t}});ymt[458105876]=[0,Ybt,Cpt,[true,_pt,[0,Ypt,-1,Vpt]]];var Zbt=class extends $dt{constructor(t){super(t)}},Qbt=tmt(458105758,Zbt);ymt[458105758]=[0,ubt,Ypt,Ybt];var Xbt=class extends $dt{constructor(t){super(t)}},qbt=tmt(443442058,Xbt);ymt[443442058]=[0,ubt,Ypt,jpt,Rpt,Vpt,-1,Wpt,Rpt],ymt[514774813]=zbt;var Jbt=class extends $dt{constructor(t){super(t)}},Kbt=tmt(516587230,Jbt);function tyt(t,e){return e=e?e.clone():new tbt,void 0!==t.displayNamesLocale?xht(e,1,Gft(t.displayNamesLocale)):void 0===t.displayNamesLocale&&xht(e,1),void 0!==t.maxResults?Jht(e,2,t.maxResults):"maxResults"in t&&xht(e,2),void 0!==t.scoreThreshold?Kht(e,3,t.scoreThreshold):"scoreThreshold"in t&&xht(e,3),void 0!==t.categoryAllowlist?tdt(e,4,t.categoryAllowlist):"categoryAllowlist"in t&&xht(e,4),void 0!==t.categoryDenylist?tdt(e,5,t.categoryDenylist):"categoryDenylist"in t&&xht(e,5),e}function eyt(t,e=-1,n=""){return{categories:t.map((t=>({index:Zht(t,1)??0??-1,score:Xht(t,2)??0,categoryName:Qht(t,3)??""??"",displayName:Qht(t,4)??""??""}))),headIndex:e,headName:n}}function nyt(t){var e=Sht(t,3,Ift,$ht()),n=Sht(t,2,Aft,$ht()),s=Sht(t,1,Vft,$ht()),r=Sht(t,9,Vft,$ht());const i={categories:[],keypoints:[]};for(let t=0;t<e.length;t++)i.categories.push({score:e[t],index:n[t]??-1,categoryName:s[t]??"",displayName:r[t]??""});if((e=jht(t,zmt,4)?.h())&&(i.boundingBox={originX:Zht(e,1)??0,originY:Zht(e,2)??0,width:Zht(e,3)??0,height:Zht(e,4)??0,angle:0}),jht(t,zmt,4)?.g().length)for(const e of jht(t,zmt,4).g())i.keypoints.push({x:kht(e,1)??0,y:kht(e,2)??0,score:kht(e,4)??0,label:Qht(e,3)??""});return i}function syt(t){const e=[];for(const n of Bht(t,Wmt,1))e.push({x:Xht(n,1)??0,y:Xht(n,2)??0,z:Xht(n,3)??0,visibility:Xht(n,4)??0});return e}function ryt(t){const e=[];for(const n of Bht(t,Pmt,1))e.push({x:Xht(n,1)??0,y:Xht(n,2)??0,z:Xht(n,3)??0,visibility:Xht(n,4)??0});return e}function iyt(t){return Array.from(t,(t=>t>127?t-256:t))}function oyt(t,e){if(t.length!==e.length)throw Error(`Cannot compute cosine similarity between embeddings of different sizes (${t.length} vs. ${e.length}).`);let n=0,s=0,r=0;for(let i=0;i<t.length;i++)n+=t[i]*e[i],s+=t[i]*t[i],r+=e[i]*e[i];if(s<=0||r<=0)throw Error("Cannot compute cosine similarity on embedding with 0 norm.");return n/Math.sqrt(s*r)}let ayt;ymt[516587230]=[0,ubt,zbt,jbt,Rpt],ymt[518928384]=jbt;const cyt=new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]);async function uyt(){if(void 0===ayt)try{await WebAssembly.instantiate(cyt),ayt=true}catch{ayt=false}return ayt}async function lyt(t,e=cmt``){const n=await uyt()?"wasm_internal":"wasm_nosimd_internal";return{wasmLoaderPath:`${e}/${t}_${n}.js`,wasmBinaryPath:`${e}/${t}_${n}.wasm`}}var fyt=class{};function hyt(){var t=navigator;return"undefined"!=typeof OffscreenCanvas&&(!function(t=navigator){return(t=t.userAgent).includes("Safari")&&!t.includes("Chrome")}(t)||!!((t=t.userAgent.match(/Version\/([\d]+).*Safari/))&&t.length>=1&&Number(t[1])>=17))}async function dyt(t){if("function"!=typeof importScripts){const e=document.createElement("script");return e.src=t.toString(),e.crossOrigin="anonymous",new Promise(((t,n)=>{e.addEventListener("load",(()=>{t()}),false),e.addEventListener("error",(t=>{n(t)}),false),document.body.appendChild(e)}))}importScripts(t.toString())}function pyt(t){return void 0!==t.videoWidth?[t.videoWidth,t.videoHeight]:void 0!==t.naturalWidth?[t.naturalWidth,t.naturalHeight]:void 0!==t.displayWidth?[t.displayWidth,t.displayHeight]:[t.width,t.height]}function myt(t,e,n){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target"),n(e=t.i.stringToNewUTF8(e)),t.i._free(e)}function byt(t,e,n){if(!t.i.canvas)throw Error("No OpenGL canvas configured.");if(n?t.i._bindTextureToStream(n):t.i._bindTextureToCanvas(),!(n=t.i.canvas.getContext("webgl2")||t.i.canvas.getContext("webgl")))throw Error("Failed to obtain WebGL context from the provided canvas. `getContext()` should only be invoked with `webgl` or `webgl2`.");t.i.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,true),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,e),t.i.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,false);const[s,r]=pyt(e);return!t.l||s===t.i.canvas.width&&r===t.i.canvas.height||(t.i.canvas.width=s,t.i.canvas.height=r),[s,r]}function yyt(t,e,n){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target");const s=new Uint32Array(e.length);for(let n=0;n<e.length;n++)s[n]=t.i.stringToNewUTF8(e[n]);e=t.i._malloc(4*s.length),t.i.HEAPU32.set(s,e>>2),n(e);for(const e of s)t.i._free(e);t.i._free(e)}function gyt(t,e,n){t.i.simpleListeners=t.i.simpleListeners||{},t.i.simpleListeners[e]=n}function wyt(t,e,n){let s=[];t.i.simpleListeners=t.i.simpleListeners||{},t.i.simpleListeners[e]=(t,e,r)=>{e?(n(s,r),s=[]):s.push(t)}}fyt.forVisionTasks=function(t){return lyt("vision",t)},fyt.forTextTasks=function(t){return lyt("text",t)},fyt.forGenAiExperimentalTasks=function(t){return lyt("genai_experimental",t)},fyt.forGenAiTasks=function(t){return lyt("genai",t)},fyt.forAudioTasks=function(t){return lyt("audio",t)},fyt.isSimdSupported=function(){return uyt()};async function vyt(t,e,n,s){return t=await(async(t,e,n,s,r)=>{if(e&&await dyt(e),!self.ModuleFactory)throw Error("ModuleFactory not set.");if(n&&(await dyt(n),!self.ModuleFactory))throw Error("ModuleFactory not set.");return self.Module&&r&&((e=self.Module).locateFile=r.locateFile,r.mainScriptUrlOrBlob&&(e.mainScriptUrlOrBlob=r.mainScriptUrlOrBlob)),r=await self.ModuleFactory(self.Module||r),self.ModuleFactory=self.Module=void 0,new t(r,s)})(t,n.wasmLoaderPath,n.assetLoaderPath,e,{locateFile:t=>t.endsWith(".wasm")?n.wasmBinaryPath.toString():n.assetBinaryPath&&t.endsWith(".data")?n.assetBinaryPath.toString():t}),await t.o(s),t}function xyt(t,e){const n=jht(t.baseOptions,obt,1)||new obt;"string"==typeof e?(xht(n,2,Gft(e)),xht(n,1)):e instanceof Uint8Array&&(xht(n,1,Glt(e,false)),xht(n,2)),Wht(t.baseOptions,0,1,n)}function Nyt(t){try{const e=t.G.length;if(1===e)throw Error(t.G[0].message);if(e>1)throw Error("Encountered multiple errors: "+t.G.map((t=>t.message)).join(", "))}finally{t.G=[]}}function kyt(t,e){t.B=Math.max(t.B,e)}function Cyt(t,e){t.A=new Nmt,wmt(t.A,"PassThroughCalculator"),vmt(t.A,"free_memory"),xmt(t.A,"free_memory_unused_out"),Imt(e,"free_memory"),Smt(e,t.A)}function $yt(t,e){vmt(t.A,e),xmt(t.A,e+"_unused_out")}function Syt(t){t.g.addBoolToStream(true,"free_memory",t.B)}var Iyt=class{constructor(t){this.g=t,this.G=[],this.B=0,this.g.setAutoRenderToScreen(false)}l(t,e=true){if(e){const e=t.baseOptions||{};if(t.baseOptions?.modelAssetBuffer&&t.baseOptions?.modelAssetPath)throw Error("Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer");if(!(jht(this.baseOptions,obt,1)?.g()||jht(this.baseOptions,obt,1)?.h()||t.baseOptions?.modelAssetBuffer||t.baseOptions?.modelAssetPath))throw Error("Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set");if(function(t,e){let n=jht(t.baseOptions,rbt,3);if(!n){var s=n=new rbt,r=new dmt;Ght(s,4,ibt,r)}"delegate"in e&&("GPU"===e.delegate?(e=n,s=new lmt,Ght(e,2,ibt,s)):(e=n,s=new dmt,Ght(e,4,ibt,s))),Wht(t.baseOptions,0,3,n)}(this,e),e.modelAssetPath)return fetch(e.modelAssetPath.toString()).then((t=>{if(t.ok)return t.arrayBuffer();throw Error(`Failed to fetch model: ${e.modelAssetPath} (${t.status})`)})).then((t=>{try{this.g.i.FS_unlink("/model.dat")}catch{}this.g.i.FS_createDataFile("/","model.dat",new Uint8Array(t),true,false,false),xyt(this,"/model.dat"),this.m(),this.J()}));if(e.modelAssetBuffer instanceof Uint8Array)xyt(this,e.modelAssetBuffer);else if(e.modelAssetBuffer)return async function(t){const e=[];for(var n=0;;){const{done:s,value:r}=await t.read();if(s)break;e.push(r),n+=r.length}if(0===e.length)return new Uint8Array(0);if(1===e.length)return e[0];t=new Uint8Array(n),n=0;for(const s of e)t.set(s,n),n+=s.length;return t}(e.modelAssetBuffer).then((t=>{xyt(this,t),this.m(),this.J()}))}return this.m(),this.J(),Promise.resolve()}J(){}ca(){let t;if(this.g.ca((e=>{t=Amt(e)})),!t)throw Error("Failed to retrieve CalculatorGraphConfig");return t}setGraph(t,e){this.g.attachErrorListener(((t,e)=>{this.G.push(Error(e))})),this.g.Ha(),this.g.setGraph(t,e),this.A=void 0,Nyt(this)}finishProcessing(){this.g.finishProcessing(),Nyt(this)}close(){this.A=void 0,this.g.closeGraph()}};function Myt(t,e){if(!t)throw Error(`Unable to obtain required WebGL resource: ${e}`);return t}Iyt.prototype.close=Iyt.prototype.close;class Eyt{constructor(t,e,n,s){this.g=t,this.h=e,this.m=n,this.l=s}bind(){this.g.bindVertexArray(this.h)}close(){this.g.deleteVertexArray(this.h),this.g.deleteBuffer(this.m),this.g.deleteBuffer(this.l)}}function Tyt(t,e,n){const s=t.g;if(n=Myt(s.createShader(n),"Failed to create WebGL shader"),s.shaderSource(n,e),s.compileShader(n),!s.getShaderParameter(n,s.COMPILE_STATUS))throw Error(`Could not compile WebGL shader: ${s.getShaderInfoLog(n)}`);return s.attachShader(t.h,n),n}function Ayt(t,e){const n=t.g,s=Myt(n.createVertexArray(),"Failed to create vertex array");n.bindVertexArray(s);const r=Myt(n.createBuffer(),"Failed to create buffer");n.bindBuffer(n.ARRAY_BUFFER,r),n.enableVertexAttribArray(t.P),n.vertexAttribPointer(t.P,2,n.FLOAT,false,0,0),n.bufferData(n.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,1,1,1,-1]),n.STATIC_DRAW);const i=Myt(n.createBuffer(),"Failed to create buffer");return n.bindBuffer(n.ARRAY_BUFFER,i),n.enableVertexAttribArray(t.J),n.vertexAttribPointer(t.J,2,n.FLOAT,false,0,0),n.bufferData(n.ARRAY_BUFFER,new Float32Array(e?[0,1,0,0,1,0,1,1]:[0,0,0,1,1,1,1,0]),n.STATIC_DRAW),n.bindBuffer(n.ARRAY_BUFFER,null),n.bindVertexArray(null),new Eyt(n,s,r,i)}function Dyt(t,e){if(t.g){if(e!==t.g)throw Error("Cannot change GL context once initialized")}else t.g=e}function Ryt(t,e,n,s){return Dyt(t,e),t.h||(t.m(),t.C()),n?(t.s||(t.s=Ayt(t,true)),n=t.s):(t.v||(t.v=Ayt(t,false)),n=t.v),e.useProgram(t.h),n.bind(),t.l(),t=s(),n.g.bindVertexArray(null),t}function Oyt(t,e,n){return Dyt(t,e),t=Myt(e.createTexture(),"Failed to create texture"),e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,n??e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,n??e.LINEAR),e.bindTexture(e.TEXTURE_2D,null),t}function Lyt(t,e,n){Dyt(t,e),t.A||(t.A=Myt(e.createFramebuffer(),"Failed to create framebuffe.")),e.bindFramebuffer(e.FRAMEBUFFER,t.A),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,n,0)}function _yt(t){t.g?.bindFramebuffer(t.g.FRAMEBUFFER,null)}var Fyt=class{G(){return"\n precision mediump float;\n varying vec2 vTex;\n uniform sampler2D inputTexture;\n void main() {\n gl_FragColor = texture2D(inputTexture, vTex);\n }\n "}m(){const t=this.g;if(this.h=Myt(t.createProgram(),"Failed to create WebGL program"),this.Z=Tyt(this,"\n attribute vec2 aVertex;\n attribute vec2 aTex;\n varying vec2 vTex;\n void main(void) {\n gl_Position = vec4(aVertex, 0.0, 1.0);\n vTex = aTex;\n }",t.VERTEX_SHADER),this.Y=Tyt(this,this.G(),t.FRAGMENT_SHADER),t.linkProgram(this.h),!t.getProgramParameter(this.h,t.LINK_STATUS))throw Error(`Error during program linking: ${t.getProgramInfoLog(this.h)}`);this.P=t.getAttribLocation(this.h,"aVertex"),this.J=t.getAttribLocation(this.h,"aTex")}C(){}l(){}close(){if(this.h){const t=this.g;t.deleteProgram(this.h),t.deleteShader(this.Z),t.deleteShader(this.Y)}this.A&&this.g.deleteFramebuffer(this.A),this.v&&this.v.close(),this.s&&this.s.close()}};function zyt(t,e){switch(e){case 0:return t.g.find((t=>t instanceof Uint8Array));case 1:return t.g.find((t=>t instanceof Float32Array));case 2:return t.g.find((t=>"undefined"!=typeof WebGLTexture&&t instanceof WebGLTexture));default:throw Error(`Type is not supported: ${e}`)}}function jyt(t){var e=zyt(t,1);if(!e){if(e=zyt(t,0))e=new Float32Array(e).map((t=>t/255));else{e=new Float32Array(t.width*t.height);const s=Byt(t);var n=Gyt(t);if(Lyt(n,s,Pyt(t)),"iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod".split(";").includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"document"in self&&"ontouchend"in self.document){n=new Float32Array(t.width*t.height*4),s.readPixels(0,0,t.width,t.height,s.RGBA,s.FLOAT,n);for(let t=0,s=0;t<e.length;++t,s+=4)e[t]=n[s]}else s.readPixels(0,0,t.width,t.height,s.RED,s.FLOAT,e)}t.g.push(e)}return e}function Pyt(t){let e=zyt(t,2);if(!e){const n=Byt(t);e=Vyt(t);const s=jyt(t),r=Wyt(t);n.texImage2D(n.TEXTURE_2D,0,r,t.width,t.height,0,n.RED,n.FLOAT,s),Uyt(t)}return e}function Byt(t){if(!t.canvas)throw Error("Conversion to different image formats require that a canvas is passed when initializing the image.");return t.h||(t.h=Myt(t.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),t.h}function Wyt(t){if(t=Byt(t),!Yyt)if(t.getExtension("EXT_color_buffer_float")&&t.getExtension("OES_texture_float_linear")&&t.getExtension("EXT_float_blend"))Yyt=t.R32F;else{if(!t.getExtension("EXT_color_buffer_half_float"))throw Error("GPU does not fully support 4-channel float32 or float16 formats");Yyt=t.R16F}return Yyt}function Gyt(t){return t.l||(t.l=new Fyt),t.l}function Vyt(t){const e=Byt(t);e.viewport(0,0,t.width,t.height),e.activeTexture(e.TEXTURE0);let n=zyt(t,2);return n||(n=Oyt(Gyt(t),e,t.m?e.LINEAR:e.NEAREST),t.g.push(n),t.j=true),e.bindTexture(e.TEXTURE_2D,n),n}function Uyt(t){t.h.bindTexture(t.h.TEXTURE_2D,null)}var Yyt,Hyt=class{constructor(t,e,n,s,r,i,o){this.g=t,this.m=e,this.j=n,this.canvas=s,this.l=r,this.width=i,this.height=o,this.j&&(0===--Zyt&&console.error("You seem to be creating MPMask instances without invoking .close(). This leaks resources."))}Da(){return!!zyt(this,0)}ja(){return!!zyt(this,1)}R(){return!!zyt(this,2)}ia(){return(e=zyt(t=this,0))||(e=jyt(t),e=new Uint8Array(e.map((t=>255*t))),t.g.push(e)),e;var t,e}ha(){return jyt(this)}N(){return Pyt(this)}clone(){const t=[];for(const e of this.g){let n;if(e instanceof Uint8Array)n=new Uint8Array(e);else if(e instanceof Float32Array)n=new Float32Array(e);else{if(!(e instanceof WebGLTexture))throw Error(`Type is not supported: ${e}`);{const t=Byt(this),e=Gyt(this);t.activeTexture(t.TEXTURE1),n=Oyt(e,t,this.m?t.LINEAR:t.NEAREST),t.bindTexture(t.TEXTURE_2D,n);const s=Wyt(this);t.texImage2D(t.TEXTURE_2D,0,s,this.width,this.height,0,t.RED,t.FLOAT,null),t.bindTexture(t.TEXTURE_2D,null),Lyt(e,t,n),Ryt(e,t,false,(()=>{Vyt(this),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.drawArrays(t.TRIANGLE_FAN,0,4),Uyt(this)})),_yt(e),Uyt(this)}}t.push(n)}return new Hyt(t,this.m,this.R(),this.canvas,this.l,this.width,this.height)}close(){this.j&&Byt(this).deleteTexture(zyt(this,2)),Zyt=-1}};Hyt.prototype.close=Hyt.prototype.close,Hyt.prototype.clone=Hyt.prototype.clone,Hyt.prototype.getAsWebGLTexture=Hyt.prototype.N,Hyt.prototype.getAsFloat32Array=Hyt.prototype.ha,Hyt.prototype.getAsUint8Array=Hyt.prototype.ia,Hyt.prototype.hasWebGLTexture=Hyt.prototype.R,Hyt.prototype.hasFloat32Array=Hyt.prototype.ja,Hyt.prototype.hasUint8Array=Hyt.prototype.Da;var Zyt=250;function Qyt(t,e){switch(e){case 0:return t.g.find((t=>t instanceof ImageData));case 1:return t.g.find((t=>"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap));case 2:return t.g.find((t=>"undefined"!=typeof WebGLTexture&&t instanceof WebGLTexture));default:throw Error(`Type is not supported: ${e}`)}}function Xyt(t){var e=Qyt(t,0);if(!e){e=Jyt(t);const n=Kyt(t),s=new Uint8Array(t.width*t.height*4);Lyt(n,e,qyt(t)),e.readPixels(0,0,t.width,t.height,e.RGBA,e.UNSIGNED_BYTE,s),_yt(n),e=new ImageData(new Uint8ClampedArray(s.buffer),t.width,t.height),t.g.push(e)}return e}function qyt(t){let e=Qyt(t,2);if(!e){const n=Jyt(t);e=tgt(t);const s=Qyt(t,1)||Xyt(t);n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,s),egt(t)}return e}function Jyt(t){if(!t.canvas)throw Error("Conversion to different image formats require that a canvas is passed when initializing the image.");return t.h||(t.h=Myt(t.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),t.h}function Kyt(t){return t.l||(t.l=new Fyt),t.l}function tgt(t){const e=Jyt(t);e.viewport(0,0,t.width,t.height),e.activeTexture(e.TEXTURE0);let n=Qyt(t,2);return n||(n=Oyt(Kyt(t),e),t.g.push(n),t.m=true),e.bindTexture(e.TEXTURE_2D,n),n}function egt(t){t.h.bindTexture(t.h.TEXTURE_2D,null)}function ngt(t){const e=Jyt(t);return Ryt(Kyt(t),e,true,(()=>function(t,e){const n=t.canvas;if(n.width===t.width&&n.height===t.height)return e();const s=n.width,r=n.height;return n.width=t.width,n.height=t.height,t=e(),n.width=s,n.height=r,t}(t,(()=>{if(e.bindFramebuffer(e.FRAMEBUFFER,null),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.drawArrays(e.TRIANGLE_FAN,0,4),!(t.canvas instanceof OffscreenCanvas))throw Error("Conversion to ImageBitmap requires that the MediaPipe Tasks is initialized with an OffscreenCanvas");return t.canvas.transferToImageBitmap()}))))}var sgt=class{constructor(t,e,n,s,r,i,o){this.g=t,this.j=e,this.m=n,this.canvas=s,this.l=r,this.width=i,this.height=o,(this.j||this.m)&&(0===--rgt&&console.error("You seem to be creating MPImage instances without invoking .close(). This leaks resources."))}Ca(){return!!Qyt(this,0)}ka(){return!!Qyt(this,1)}R(){return!!Qyt(this,2)}Aa(){return Xyt(this)}za(){var t=Qyt(this,1);return t||(qyt(this),tgt(this),t=ngt(this),egt(this),this.g.push(t),this.j=true),t}N(){return qyt(this)}clone(){const t=[];for(const e of this.g){let n;if(e instanceof ImageData)n=new ImageData(e.data,this.width,this.height);else if(e instanceof WebGLTexture){const t=Jyt(this),e=Kyt(this);t.activeTexture(t.TEXTURE1),n=Oyt(e,t),t.bindTexture(t.TEXTURE_2D,n),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,this.width,this.height,0,t.RGBA,t.UNSIGNED_BYTE,null),t.bindTexture(t.TEXTURE_2D,null),Lyt(e,t,n),Ryt(e,t,false,(()=>{tgt(this),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.drawArrays(t.TRIANGLE_FAN,0,4),egt(this)})),_yt(e),egt(this)}else{if(!(e instanceof ImageBitmap))throw Error(`Type is not supported: ${e}`);qyt(this),tgt(this),n=ngt(this),egt(this)}t.push(n)}return new sgt(t,this.ka(),this.R(),this.canvas,this.l,this.width,this.height)}close(){this.j&&Qyt(this,1).close(),this.m&&Jyt(this).deleteTexture(Qyt(this,2)),rgt=-1}};sgt.prototype.close=sgt.prototype.close,sgt.prototype.clone=sgt.prototype.clone,sgt.prototype.getAsWebGLTexture=sgt.prototype.N,sgt.prototype.getAsImageBitmap=sgt.prototype.za,sgt.prototype.getAsImageData=sgt.prototype.Aa,sgt.prototype.hasWebGLTexture=sgt.prototype.R,sgt.prototype.hasImageBitmap=sgt.prototype.ka,sgt.prototype.hasImageData=sgt.prototype.Ca;var rgt=250;function igt(...t){return t.map((([t,e])=>({start:t,end:e})))}const ogt=function(t){return class extends t{Ha(){this.i._registerModelResourcesGraphService()}}}((agt=class{constructor(t,e){this.l=true,this.i=t,this.g=null,this.h=0,this.m="function"==typeof this.i._addIntToInputStream,void 0!==e?this.i.canvas=e:hyt()?this.i.canvas=new OffscreenCanvas(1,1):(console.warn("OffscreenCanvas not supported and GraphRunner constructor glCanvas parameter is undefined. Creating backup canvas."),this.i.canvas=document.createElement("canvas"))}async initializeGraph(t){const e=await(await fetch(t)).arrayBuffer();t=!(t.endsWith(".pbtxt")||t.endsWith(".textproto")),this.setGraph(new Uint8Array(e),t)}setGraphFromString(t){this.setGraph((new TextEncoder).encode(t),false)}setGraph(t,e){const n=t.length,s=this.i._malloc(n);this.i.HEAPU8.set(t,s),e?this.i._changeBinaryGraph(n,s):this.i._changeTextGraph(n,s),this.i._free(s)}configureAudio(t,e,n,s,r){this.i._configureAudio||console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'),myt(this,s||"input_audio",(s=>{myt(this,r=r||"audio_header",(r=>{this.i._configureAudio(s,r,t,e??0,n)}))}))}setAutoResizeCanvas(t){this.l=t}setAutoRenderToScreen(t){this.i._setAutoRenderToScreen(t)}setGpuBufferVerticalFlip(t){this.i.gpuOriginForWebTexturesIsBottomLeft=t}ca(t){gyt(this,"__graph_config__",(e=>{t(e)})),myt(this,"__graph_config__",(t=>{this.i._getGraphConfig(t,void 0)})),delete this.i.simpleListeners.__graph_config__}attachErrorListener(t){this.i.errorListener=t}attachEmptyPacketListener(t,e){this.i.emptyPacketListeners=this.i.emptyPacketListeners||{},this.i.emptyPacketListeners[t]=e}addAudioToStream(t,e,n){this.addAudioToStreamWithShape(t,0,0,e,n)}addAudioToStreamWithShape(t,e,n,s,r){const i=4*t.length;this.h!==i&&(this.g&&this.i._free(this.g),this.g=this.i._malloc(i),this.h=i),this.i.HEAPF32.set(t,this.g/4),myt(this,s,(t=>{this.i._addAudioToInputStream(this.g,e,n,t,r)}))}addGpuBufferToStream(t,e,n){myt(this,e,(e=>{const[s,r]=byt(this,t,e);this.i._addBoundTextureToStream(e,s,r,n)}))}addBoolToStream(t,e,n){myt(this,e,(e=>{this.i._addBoolToInputStream(t,e,n)}))}addDoubleToStream(t,e,n){myt(this,e,(e=>{this.i._addDoubleToInputStream(t,e,n)}))}addFloatToStream(t,e,n){myt(this,e,(e=>{this.i._addFloatToInputStream(t,e,n)}))}addIntToStream(t,e,n){myt(this,e,(e=>{this.i._addIntToInputStream(t,e,n)}))}addUintToStream(t,e,n){myt(this,e,(e=>{this.i._addUintToInputStream(t,e,n)}))}addStringToStream(t,e,n){myt(this,e,(e=>{myt(this,t,(t=>{this.i._addStringToInputStream(t,e,n)}))}))}addStringRecordToStream(t,e,n){myt(this,e,(e=>{yyt(this,Object.keys(t),(s=>{yyt(this,Object.values(t),(r=>{this.i._addFlatHashMapToInputStream(s,r,Object.keys(t).length,e,n)}))}))}))}addProtoToStream(t,e,n,s){myt(this,n,(n=>{myt(this,e,(e=>{const r=this.i._malloc(t.length);this.i.HEAPU8.set(t,r),this.i._addProtoToInputStream(r,t.length,e,n,s),this.i._free(r)}))}))}addEmptyPacketToStream(t,e){myt(this,t,(t=>{this.i._addEmptyPacketToInputStream(t,e)}))}addBoolVectorToStream(t,e,n){myt(this,e,(e=>{const s=this.i._allocateBoolVector(t.length);if(!s)throw Error("Unable to allocate new bool vector on heap.");for(const e of t)this.i._addBoolVectorEntry(s,e);this.i._addBoolVectorToInputStream(s,e,n)}))}addDoubleVectorToStream(t,e,n){myt(this,e,(e=>{const s=this.i._allocateDoubleVector(t.length);if(!s)throw Error("Unable to allocate new double vector on heap.");for(const e of t)this.i._addDoubleVectorEntry(s,e);this.i._addDoubleVectorToInputStream(s,e,n)}))}addFloatVectorToStream(t,e,n){myt(this,e,(e=>{const s=this.i._allocateFloatVector(t.length);if(!s)throw Error("Unable to allocate new float vector on heap.");for(const e of t)this.i._addFloatVectorEntry(s,e);this.i._addFloatVectorToInputStream(s,e,n)}))}addIntVectorToStream(t,e,n){myt(this,e,(e=>{const s=this.i._allocateIntVector(t.length);if(!s)throw Error("Unable to allocate new int vector on heap.");for(const e of t)this.i._addIntVectorEntry(s,e);this.i._addIntVectorToInputStream(s,e,n)}))}addUintVectorToStream(t,e,n){myt(this,e,(e=>{const s=this.i._allocateUintVector(t.length);if(!s)throw Error("Unable to allocate new unsigned int vector on heap.");for(const e of t)this.i._addUintVectorEntry(s,e);this.i._addUintVectorToInputStream(s,e,n)}))}addStringVectorToStream(t,e,n){myt(this,e,(e=>{const s=this.i._allocateStringVector(t.length);if(!s)throw Error("Unable to allocate new string vector on heap.");for(const e of t)myt(this,e,(t=>{this.i._addStringVectorEntry(s,t)}));this.i._addStringVectorToInputStream(s,e,n)}))}addBoolToInputSidePacket(t,e){myt(this,e,(e=>{this.i._addBoolToInputSidePacket(t,e)}))}addDoubleToInputSidePacket(t,e){myt(this,e,(e=>{this.i._addDoubleToInputSidePacket(t,e)}))}addFloatToInputSidePacket(t,e){myt(this,e,(e=>{this.i._addFloatToInputSidePacket(t,e)}))}addIntToInputSidePacket(t,e){myt(this,e,(e=>{this.i._addIntToInputSidePacket(t,e)}))}addUintToInputSidePacket(t,e){myt(this,e,(e=>{this.i._addUintToInputSidePacket(t,e)}))}addStringToInputSidePacket(t,e){myt(this,e,(e=>{myt(this,t,(t=>{this.i._addStringToInputSidePacket(t,e)}))}))}addProtoToInputSidePacket(t,e,n){myt(this,n,(n=>{myt(this,e,(e=>{const s=this.i._malloc(t.length);this.i.HEAPU8.set(t,s),this.i._addProtoToInputSidePacket(s,t.length,e,n),this.i._free(s)}))}))}addBoolVectorToInputSidePacket(t,e){myt(this,e,(e=>{const n=this.i._allocateBoolVector(t.length);if(!n)throw Error("Unable to allocate new bool vector on heap.");for(const e of t)this.i._addBoolVectorEntry(n,e);this.i._addBoolVectorToInputSidePacket(n,e)}))}addDoubleVectorToInputSidePacket(t,e){myt(this,e,(e=>{const n=this.i._allocateDoubleVector(t.length);if(!n)throw Error("Unable to allocate new double vector on heap.");for(const e of t)this.i._addDoubleVectorEntry(n,e);this.i._addDoubleVectorToInputSidePacket(n,e)}))}addFloatVectorToInputSidePacket(t,e){myt(this,e,(e=>{const n=this.i._allocateFloatVector(t.length);if(!n)throw Error("Unable to allocate new float vector on heap.");for(const e of t)this.i._addFloatVectorEntry(n,e);this.i._addFloatVectorToInputSidePacket(n,e)}))}addIntVectorToInputSidePacket(t,e){myt(this,e,(e=>{const n=this.i._allocateIntVector(t.length);if(!n)throw Error("Unable to allocate new int vector on heap.");for(const e of t)this.i._addIntVectorEntry(n,e);this.i._addIntVectorToInputSidePacket(n,e)}))}addUintVectorToInputSidePacket(t,e){myt(this,e,(e=>{const n=this.i._allocateUintVector(t.length);if(!n)throw Error("Unable to allocate new unsigned int vector on heap.");for(const e of t)this.i._addUintVectorEntry(n,e);this.i._addUintVectorToInputSidePacket(n,e)}))}addStringVectorToInputSidePacket(t,e){myt(this,e,(e=>{const n=this.i._allocateStringVector(t.length);if(!n)throw Error("Unable to allocate new string vector on heap.");for(const e of t)myt(this,e,(t=>{this.i._addStringVectorEntry(n,t)}));this.i._addStringVectorToInputSidePacket(n,e)}))}attachBoolListener(t,e){gyt(this,t,e),myt(this,t,(t=>{this.i._attachBoolListener(t)}))}attachBoolVectorListener(t,e){wyt(this,t,e),myt(this,t,(t=>{this.i._attachBoolVectorListener(t)}))}attachIntListener(t,e){gyt(this,t,e),myt(this,t,(t=>{this.i._attachIntListener(t)}))}attachIntVectorListener(t,e){wyt(this,t,e),myt(this,t,(t=>{this.i._attachIntVectorListener(t)}))}attachUintListener(t,e){gyt(this,t,e),myt(this,t,(t=>{this.i._attachUintListener(t)}))}attachUintVectorListener(t,e){wyt(this,t,e),myt(this,t,(t=>{this.i._attachUintVectorListener(t)}))}attachDoubleListener(t,e){gyt(this,t,e),myt(this,t,(t=>{this.i._attachDoubleListener(t)}))}attachDoubleVectorListener(t,e){wyt(this,t,e),myt(this,t,(t=>{this.i._attachDoubleVectorListener(t)}))}attachFloatListener(t,e){gyt(this,t,e),myt(this,t,(t=>{this.i._attachFloatListener(t)}))}attachFloatVectorListener(t,e){wyt(this,t,e),myt(this,t,(t=>{this.i._attachFloatVectorListener(t)}))}attachStringListener(t,e){gyt(this,t,e),myt(this,t,(t=>{this.i._attachStringListener(t)}))}attachStringVectorListener(t,e){wyt(this,t,e),myt(this,t,(t=>{this.i._attachStringVectorListener(t)}))}attachProtoListener(t,e,n){gyt(this,t,e),myt(this,t,(t=>{this.i._attachProtoListener(t,n||false)}))}attachProtoVectorListener(t,e,n){wyt(this,t,e),myt(this,t,(t=>{this.i._attachProtoVectorListener(t,n||false)}))}attachAudioListener(t,e,n){this.i._attachAudioListener||console.warn('Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?'),gyt(this,t,((t,n)=>{t=new Float32Array(t.buffer,t.byteOffset,t.length/4),e(t,n)})),myt(this,t,(t=>{this.i._attachAudioListener(t,n||false)}))}finishProcessing(){this.i._waitUntilIdle()}closeGraph(){this.i._closeGraph(),this.i.simpleListeners=void 0,this.i.emptyPacketListeners=void 0}},class extends agt{get ea(){return this.i}oa(t,e,n){myt(this,e,(e=>{const[s,r]=byt(this,t,e);this.ea._addBoundTextureAsImageToStream(e,s,r,n)}))}V(t,e){gyt(this,t,e),myt(this,t,(t=>{this.ea._attachImageListener(t)}))}ba(t,e){wyt(this,t,e),myt(this,t,(t=>{this.ea._attachImageVectorListener(t)}))}}));var agt,cgt=class extends ogt{};async function ugt(t,e,n){return async function(t,e,n,s){return vyt(t,e,n,s)}(t,n.canvas??(hyt()?void 0:document.createElement("canvas")),e,n)}function lgt(t,e,n,s){if(t.U){const i=new Ymt;if(n?.regionOfInterest){if(!t.na)throw Error("This task doesn't support region-of-interest.");var r=n.regionOfInterest;if(r.left>=r.right||r.top>=r.bottom)throw Error("Expected RectF with left < right and top < bottom.");if(r.left<0||r.top<0||r.right>1||r.bottom>1)throw Error("Expected RectF values to be in [0,1].");Kht(i,1,(r.left+r.right)/2),Kht(i,2,(r.top+r.bottom)/2),Kht(i,4,r.right-r.left),Kht(i,3,r.bottom-r.top)}else Kht(i,1,.5),Kht(i,2,.5),Kht(i,4,1),Kht(i,3,1);if(n?.rotationDegrees){if(n?.rotationDegrees%90!=0)throw Error("Expected rotation to be a multiple of 90°.");if(Kht(i,5,-Math.PI*n.rotationDegrees/180),n?.rotationDegrees%180!=0){const[t,s]=pyt(e);n=Xht(i,3)*s/t,r=Xht(i,4)*t/s,Kht(i,4,n),Kht(i,3,r)}}t.g.addProtoToStream(i.g(),"mediapipe.NormalizedRect",t.U,s)}t.g.oa(e,t.Z,s??performance.now()),t.finishProcessing()}function fgt(t,e,n){if(t.baseOptions?.g())throw Error("Task is not initialized with image mode. 'runningMode' must be set to 'IMAGE'.");lgt(t,e,n,t.B+1)}function hgt(t,e,n,s){if(!t.baseOptions?.g())throw Error("Task is not initialized with video mode. 'runningMode' must be set to 'VIDEO'.");lgt(t,e,n,s)}function dgt(t,e,n,s){var r=e.data;const i=e.width,o=i*(e=e.height);if((r instanceof Uint8Array||r instanceof Float32Array)&&r.length!==o)throw Error("Unsupported channel count: "+r.length/o);return t=new Hyt([r],n,false,t.g.i.canvas,t.P,i,e),s?t.clone():t}var pgt=class extends Iyt{constructor(t,e,n,s){super(t),this.g=t,this.Z=e,this.U=n,this.na=s,this.P=new Fyt}l(t,e=true){if("runningMode"in t&&qht(this.baseOptions,2,!!t.runningMode&&"IMAGE"!==t.runningMode),void 0!==t.canvas&&this.g.i.canvas!==t.canvas)throw Error("You must create a new task to reset the canvas.");return super.l(t,e)}close(){this.P.close(),super.close()}};pgt.prototype.close=pgt.prototype.close;var mgt=class extends pgt{constructor(t,e){super(new cgt(t,e),"image_in","norm_rect_in",false),this.j={detections:[]},Wht(t=this.h=new lbt,0,1,e=new abt),Kht(this.h,2,.5),Kht(this.h,3,.3)}get baseOptions(){return jht(this.h,abt,1)}set baseOptions(t){Wht(this.h,0,1,t)}o(t){return"minDetectionConfidence"in t&&Kht(this.h,2,t.minDetectionConfidence??.5),"minSuppressionThreshold"in t&&Kht(this.h,3,t.minSuppressionThreshold??.3),this.l(t)}D(t,e){return this.j={detections:[]},fgt(this,t,e),this.j}F(t,e,n){return this.j={detections:[]},hgt(this,t,n,e),this.j}m(){var t=new Emt;Imt(t,"image_in"),Imt(t,"norm_rect_in"),Mmt(t,"detections");const e=new bmt;Cdt(e,hbt,this.h);const n=new Nmt;wmt(n,"mediapipe.tasks.vision.face_detector.FaceDetectorGraph"),vmt(n,"IMAGE:image_in"),vmt(n,"NORM_RECT:norm_rect_in"),xmt(n,"DETECTIONS:detections"),n.o(e),Smt(t,n),this.g.attachProtoVectorListener("detections",((t,e)=>{for(const e of t)t=jmt(e),this.j.detections.push(nyt(t));kyt(this,e)})),this.g.attachEmptyPacketListener("detections",(t=>{kyt(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),true)}};mgt.prototype.detectForVideo=mgt.prototype.F,mgt.prototype.detect=mgt.prototype.D,mgt.prototype.setOptions=mgt.prototype.o,mgt.createFromModelPath=async function(t,e){return ugt(mgt,t,{baseOptions:{modelAssetPath:e}})},mgt.createFromModelBuffer=function(t,e){return ugt(mgt,t,{baseOptions:{modelAssetBuffer:e}})},mgt.createFromOptions=function(t,e){return ugt(mgt,t,e)};var bgt=igt([61,146],[146,91],[91,181],[181,84],[84,17],[17,314],[314,405],[405,321],[321,375],[375,291],[61,185],[185,40],[40,39],[39,37],[37,0],[0,267],[267,269],[269,270],[270,409],[409,291],[78,95],[95,88],[88,178],[178,87],[87,14],[14,317],[317,402],[402,318],[318,324],[324,308],[78,191],[191,80],[80,81],[81,82],[82,13],[13,312],[312,311],[311,310],[310,415],[415,308]),ygt=igt([263,249],[249,390],[390,373],[373,374],[374,380],[380,381],[381,382],[382,362],[263,466],[466,388],[388,387],[387,386],[386,385],[385,384],[384,398],[398,362]),ggt=igt([276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]),wgt=igt([474,475],[475,476],[476,477],[477,474]),vgt=igt([33,7],[7,163],[163,144],[144,145],[145,153],[153,154],[154,155],[155,133],[33,246],[246,161],[161,160],[160,159],[159,158],[158,157],[157,173],[173,133]),xgt=igt([46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]),Ngt=igt([469,470],[470,471],[471,472],[472,469]),kgt=igt([10,338],[338,297],[297,332],[332,284],[284,251],[251,389],[389,356],[356,454],[454,323],[323,361],[361,288],[288,397],[397,365],[365,379],[379,378],[378,400],[400,377],[377,152],[152,148],[148,176],[176,149],[149,150],[150,136],[136,172],[172,58],[58,132],[132,93],[93,234],[234,127],[127,162],[162,21],[21,54],[54,103],[103,67],[67,109],[109,10]),Cgt=[...bgt,...ygt,...ggt,...vgt,...xgt,...kgt],$gt=igt([127,34],[34,139],[139,127],[11,0],[0,37],[37,11],[232,231],[231,120],[120,232],[72,37],[37,39],[39,72],[128,121],[121,47],[47,128],[232,121],[121,128],[128,232],[104,69],[69,67],[67,104],[175,171],[171,148],[148,175],[118,50],[50,101],[101,118],[73,39],[39,40],[40,73],[9,151],[151,108],[108,9],[48,115],[115,131],[131,48],[194,204],[204,211],[211,194],[74,40],[40,185],[185,74],[80,42],[42,183],[183,80],[40,92],[92,186],[186,40],[230,229],[229,118],[118,230],[202,212],[212,214],[214,202],[83,18],[18,17],[17,83],[76,61],[61,146],[146,76],[160,29],[29,30],[30,160],[56,157],[157,173],[173,56],[106,204],[204,194],[194,106],[135,214],[214,192],[192,135],[203,165],[165,98],[98,203],[21,71],[71,68],[68,21],[51,45],[45,4],[4,51],[144,24],[24,23],[23,144],[77,146],[146,91],[91,77],[205,50],[50,187],[187,205],[201,200],[200,18],[18,201],[91,106],[106,182],[182,91],[90,91],[91,181],[181,90],[85,84],[84,17],[17,85],[206,203],[203,36],[36,206],[148,171],[171,140],[140,148],[92,40],[40,39],[39,92],[193,189],[189,244],[244,193],[159,158],[158,28],[28,159],[247,246],[246,161],[161,247],[236,3],[3,196],[196,236],[54,68],[68,104],[104,54],[193,168],[168,8],[8,193],[117,228],[228,31],[31,117],[189,193],[193,55],[55,189],[98,97],[97,99],[99,98],[126,47],[47,100],[100,126],[166,79],[79,218],[218,166],[155,154],[154,26],[26,155],[209,49],[49,131],[131,209],[135,136],[136,150],[150,135],[47,126],[126,217],[217,47],[223,52],[52,53],[53,223],[45,51],[51,134],[134,45],[211,170],[170,140],[140,211],[67,69],[69,108],[108,67],[43,106],[106,91],[91,43],[230,119],[119,120],[120,230],[226,130],[130,247],[247,226],[63,53],[53,52],[52,63],[238,20],[20,242],[242,238],[46,70],[70,156],[156,46],[78,62],[62,96],[96,78],[46,53],[53,63],[63,46],[143,34],[34,227],[227,143],[123,117],[117,111],[111,123],[44,125],[125,19],[19,44],[236,134],[134,51],[51,236],[216,206],[206,205],[205,216],[154,153],[153,22],[22,154],[39,37],[37,167],[167,39],[200,201],[201,208],[208,200],[36,142],[142,100],[100,36],[57,212],[212,202],[202,57],[20,60],[60,99],[99,20],[28,158],[158,157],[157,28],[35,226],[226,113],[113,35],[160,159],[159,27],[27,160],[204,202],[202,210],[210,204],[113,225],[225,46],[46,113],[43,202],[202,204],[204,43],[62,76],[76,77],[77,62],[137,123],[123,116],[116,137],[41,38],[38,72],[72,41],[203,129],[129,142],[142,203],[64,98],[98,240],[240,64],[49,102],[102,64],[64,49],[41,73],[73,74],[74,41],[212,216],[216,207],[207,212],[42,74],[74,184],[184,42],[169,170],[170,211],[211,169],[170,149],[149,176],[176,170],[105,66],[66,69],[69,105],[122,6],[6,168],[168,122],[123,147],[147,187],[187,123],[96,77],[77,90],[90,96],[65,55],[55,107],[107,65],[89,90],[90,180],[180,89],[101,100],[100,120],[120,101],[63,105],[105,104],[104,63],[93,137],[137,227],[227,93],[15,86],[86,85],[85,15],[129,102],[102,49],[49,129],[14,87],[87,86],[86,14],[55,8],[8,9],[9,55],[100,47],[47,121],[121,100],[145,23],[23,22],[22,145],[88,89],[89,179],[179,88],[6,122],[122,196],[196,6],[88,95],[95,96],[96,88],[138,172],[172,136],[136,138],[215,58],[58,172],[172,215],[115,48],[48,219],[219,115],[42,80],[80,81],[81,42],[195,3],[3,51],[51,195],[43,146],[146,61],[61,43],[171,175],[175,199],[199,171],[81,82],[82,38],[38,81],[53,46],[46,225],[225,53],[144,163],[163,110],[110,144],[52,65],[65,66],[66,52],[229,228],[228,117],[117,229],[34,127],[127,234],[234,34],[107,108],[108,69],[69,107],[109,108],[108,151],[151,109],[48,64],[64,235],[235,48],[62,78],[78,191],[191,62],[129,209],[209,126],[126,129],[111,35],[35,143],[143,111],[117,123],[123,50],[50,117],[222,65],[65,52],[52,222],[19,125],[125,141],[141,19],[221,55],[55,65],[65,221],[3,195],[195,197],[197,3],[25,7],[7,33],[33,25],[220,237],[237,44],[44,220],[70,71],[71,139],[139,70],[122,193],[193,245],[245,122],[247,130],[130,33],[33,247],[71,21],[21,162],[162,71],[170,169],[169,150],[150,170],[188,174],[174,196],[196,188],[216,186],[186,92],[92,216],[2,97],[97,167],[167,2],[141,125],[125,241],[241,141],[164,167],[167,37],[37,164],[72,38],[38,12],[12,72],[38,82],[82,13],[13,38],[63,68],[68,71],[71,63],[226,35],[35,111],[111,226],[101,50],[50,205],[205,101],[206,92],[92,165],[165,206],[209,198],[198,217],[217,209],[165,167],[167,97],[97,165],[220,115],[115,218],[218,220],[133,112],[112,243],[243,133],[239,238],[238,241],[241,239],[214,135],[135,169],[169,214],[190,173],[173,133],[133,190],[171,208],[208,32],[32,171],[125,44],[44,237],[237,125],[86,87],[87,178],[178,86],[85,86],[86,179],[179,85],[84,85],[85,180],[180,84],[83,84],[84,181],[181,83],[201,83],[83,182],[182,201],[137,93],[93,132],[132,137],[76,62],[62,183],[183,76],[61,76],[76,184],[184,61],[57,61],[61,185],[185,57],[212,57],[57,186],[186,212],[214,207],[207,187],[187,214],[34,143],[143,156],[156,34],[79,239],[239,237],[237,79],[123,137],[137,177],[177,123],[44,1],[1,4],[4,44],[201,194],[194,32],[32,201],[64,102],[102,129],[129,64],[213,215],[215,138],[138,213],[59,166],[166,219],[219,59],[242,99],[99,97],[97,242],[2,94],[94,141],[141,2],[75,59],[59,235],[235,75],[24,110],[110,228],[228,24],[25,130],[130,226],[226,25],[23,24],[24,229],[229,23],[22,23],[23,230],[230,22],[26,22],[22,231],[231,26],[112,26],[26,232],[232,112],[189,190],[190,243],[243,189],[221,56],[56,190],[190,221],[28,56],[56,221],[221,28],[27,28],[28,222],[222,27],[29,27],[27,223],[223,29],[30,29],[29,224],[224,30],[247,30],[30,225],[225,247],[238,79],[79,20],[20,238],[166,59],[59,75],[75,166],[60,75],[75,240],[240,60],[147,177],[177,215],[215,147],[20,79],[79,166],[166,20],[187,147],[147,213],[213,187],[112,233],[233,244],[244,112],[233,128],[128,245],[245,233],[128,114],[114,188],[188,128],[114,217],[217,174],[174,114],[131,115],[115,220],[220,131],[217,198],[198,236],[236,217],[198,131],[131,134],[134,198],[177,132],[132,58],[58,177],[143,35],[35,124],[124,143],[110,163],[163,7],[7,110],[228,110],[110,25],[25,228],[356,389],[389,368],[368,356],[11,302],[302,267],[267,11],[452,350],[350,349],[349,452],[302,303],[303,269],[269,302],[357,343],[343,277],[277,357],[452,453],[453,357],[357,452],[333,332],[332,297],[297,333],[175,152],[152,377],[377,175],[347,348],[348,330],[330,347],[303,304],[304,270],[270,303],[9,336],[336,337],[337,9],[278,279],[279,360],[360,278],[418,262],[262,431],[431,418],[304,408],[408,409],[409,304],[310,415],[415,407],[407,310],[270,409],[409,410],[410,270],[450,348],[348,347],[347,450],[422,430],[430,434],[434,422],[313,314],[314,17],[17,313],[306,307],[307,375],[375,306],[387,388],[388,260],[260,387],[286,414],[414,398],[398,286],[335,406],[406,418],[418,335],[364,367],[367,416],[416,364],[423,358],[358,327],[327,423],[251,284],[284,298],[298,251],[281,5],[5,4],[4,281],[373,374],[374,253],[253,373],[307,320],[320,321],[321,307],[425,427],[427,411],[411,425],[421,313],[313,18],[18,421],[321,405],[405,406],[406,321],[320,404],[404,405],[405,320],[315,16],[16,17],[17,315],[426,425],[425,266],[266,426],[377,400],[400,369],[369,377],[322,391],[391,269],[269,322],[417,465],[465,464],[464,417],[386,257],[257,258],[258,386],[466,260],[260,388],[388,466],[456,399],[399,419],[419,456],[284,332],[332,333],[333,284],[417,285],[285,8],[8,417],[346,340],[340,261],[261,346],[413,441],[441,285],[285,413],[327,460],[460,328],[328,327],[355,371],[371,329],[329,355],[392,439],[439,438],[438,392],[382,341],[341,256],[256,382],[429,420],[420,360],[360,429],[364,394],[394,379],[379,364],[277,343],[343,437],[437,277],[443,444],[444,283],[283,443],[275,440],[440,363],[363,275],[431,262],[262,369],[369,431],[297,338],[338,337],[337,297],[273,375],[375,321],[321,273],[450,451],[451,349],[349,450],[446,342],[342,467],[467,446],[293,334],[334,282],[282,293],[458,461],[461,462],[462,458],[276,353],[353,383],[383,276],[308,324],[324,325],[325,308],[276,300],[300,293],[293,276],[372,345],[345,447],[447,372],[352,345],[345,340],[340,352],[274,1],[1,19],[19,274],[456,248],[248,281],[281,456],[436,427],[427,425],[425,436],[381,256],[256,252],[252,381],[269,391],[391,393],[393,269],[200,199],[199,428],[428,200],[266,330],[330,329],[329,266],[287,273],[273,422],[422,287],[250,462],[462,328],[328,250],[258,286],[286,384],[384,258],[265,353],[353,342],[342,265],[387,259],[259,257],[257,387],[424,431],[431,430],[430,424],[342,353],[353,276],[276,342],[273,335],[335,424],[424,273],[292,325],[325,307],[307,292],[366,447],[447,345],[345,366],[271,303],[303,302],[302,271],[423,266],[266,371],[371,423],[294,455],[455,460],[460,294],[279,278],[278,294],[294,279],[271,272],[272,304],[304,271],[432,434],[434,427],[427,432],[272,407],[407,408],[408,272],[394,430],[430,431],[431,394],[395,369],[369,400],[400,395],[334,333],[333,299],[299,334],[351,417],[417,168],[168,351],[352,280],[280,411],[411,352],[325,319],[319,320],[320,325],[295,296],[296,336],[336,295],[319,403],[403,404],[404,319],[330,348],[348,349],[349,330],[293,298],[298,333],[333,293],[323,454],[454,447],[447,323],[15,16],[16,315],[315,15],[358,429],[429,279],[279,358],[14,15],[15,316],[316,14],[285,336],[336,9],[9,285],[329,349],[349,350],[350,329],[374,380],[380,252],[252,374],[318,402],[402,403],[403,318],[6,197],[197,419],[419,6],[318,319],[319,325],[325,318],[367,364],[364,365],[365,367],[435,367],[367,397],[397,435],[344,438],[438,439],[439,344],[272,271],[271,311],[311,272],[195,5],[5,281],[281,195],[273,287],[287,291],[291,273],[396,428],[428,199],[199,396],[311,271],[271,268],[268,311],[283,444],[444,445],[445,283],[373,254],[254,339],[339,373],[282,334],[334,296],[296,282],[449,347],[347,346],[346,449],[264,447],[447,454],[454,264],[336,296],[296,299],[299,336],[338,10],[10,151],[151,338],[278,439],[439,455],[455,278],[292,407],[407,415],[415,292],[358,371],[371,355],[355,358],[340,345],[345,372],[372,340],[346,347],[347,280],[280,346],[442,443],[443,282],[282,442],[19,94],[94,370],[370,19],[441,442],[442,295],[295,441],[248,419],[419,197],[197,248],[263,255],[255,359],[359,263],[440,275],[275,274],[274,440],[300,383],[383,368],[368,300],[351,412],[412,465],[465,351],[263,467],[467,466],[466,263],[301,368],[368,389],[389,301],[395,378],[378,379],[379,395],[412,351],[351,419],[419,412],[436,426],[426,322],[322,436],[2,164],[164,393],[393,2],[370,462],[462,461],[461,370],[164,0],[0,267],[267,164],[302,11],[11,12],[12,302],[268,12],[12,13],[13,268],[293,300],[300,301],[301,293],[446,261],[261,340],[340,446],[330,266],[266,425],[425,330],[426,423],[423,391],[391,426],[429,355],[355,437],[437,429],[391,327],[327,326],[326,391],[440,457],[457,438],[438,440],[341,382],[382,362],[362,341],[459,457],[457,461],[461,459],[434,430],[430,394],[394,434],[414,463],[463,362],[362,414],[396,369],[369,262],[262,396],[354,461],[461,457],[457,354],[316,403],[403,402],[402,316],[315,404],[404,403],[403,315],[314,405],[405,404],[404,314],[313,406],[406,405],[405,313],[421,418],[418,406],[406,421],[366,401],[401,361],[361,366],[306,408],[408,407],[407,306],[291,409],[409,408],[408,291],[287,410],[410,409],[409,287],[432,436],[436,410],[410,432],[434,416],[416,411],[411,434],[264,368],[368,383],[383,264],[309,438],[438,457],[457,309],[352,376],[376,401],[401,352],[274,275],[275,4],[4,274],[421,428],[428,262],[262,421],[294,327],[327,358],[358,294],[433,416],[416,367],[367,433],[289,455],[455,439],[439,289],[462,370],[370,326],[326,462],[2,326],[326,370],[370,2],[305,460],[460,455],[455,305],[254,449],[449,448],[448,254],[255,261],[261,446],[446,255],[253,450],[450,449],[449,253],[252,451],[451,450],[450,252],[256,452],[452,451],[451,256],[341,453],[453,452],[452,341],[413,464],[464,463],[463,413],[441,413],[413,414],[414,441],[258,442],[442,441],[441,258],[257,443],[443,442],[442,257],[259,444],[444,443],[443,259],[260,445],[445,444],[444,260],[467,342],[342,445],[445,467],[459,458],[458,250],[250,459],[289,392],[392,290],[290,289],[290,328],[328,460],[460,290],[376,433],[433,435],[435,376],[250,290],[290,392],[392,250],[411,416],[416,433],[433,411],[341,463],[463,464],[464,341],[453,464],[464,465],[465,453],[357,465],[465,412],[412,357],[343,412],[412,399],[399,343],[360,363],[363,440],[440,360],[437,399],[399,456],[456,437],[420,456],[456,363],[363,420],[401,435],[435,288],[288,401],[372,383],[383,353],[353,372],[339,255],[255,249],[249,339],[448,261],[261,255],[255,448],[133,243],[243,190],[190,133],[133,155],[155,112],[112,133],[33,246],[246,247],[247,33],[33,130],[130,25],[25,33],[398,384],[384,286],[286,398],[362,398],[398,414],[414,362],[362,463],[463,341],[341,362],[263,359],[359,467],[467,263],[263,249],[249,255],[255,263],[466,467],[467,260],[260,466],[75,60],[60,166],[166,75],[238,239],[239,79],[79,238],[162,127],[127,139],[139,162],[72,11],[11,37],[37,72],[121,232],[232,120],[120,121],[73,72],[72,39],[39,73],[114,128],[128,47],[47,114],[233,232],[232,128],[128,233],[103,104],[104,67],[67,103],[152,175],[175,148],[148,152],[119,118],[118,101],[101,119],[74,73],[73,40],[40,74],[107,9],[9,108],[108,107],[49,48],[48,131],[131,49],[32,194],[194,211],[211,32],[184,74],[74,185],[185,184],[191,80],[80,183],[183,191],[185,40],[40,186],[186,185],[119,230],[230,118],[118,119],[210,202],[202,214],[214,210],[84,83],[83,17],[17,84],[77,76],[76,146],[146,77],[161,160],[160,30],[30,161],[190,56],[56,173],[173,190],[182,106],[106,194],[194,182],[138,135],[135,192],[192,138],[129,203],[203,98],[98,129],[54,21],[21,68],[68,54],[5,51],[51,4],[4,5],[145,144],[144,23],[23,145],[90,77],[77,91],[91,90],[207,205],[205,187],[187,207],[83,201],[201,18],[18,83],[181,91],[91,182],[182,181],[180,90],[90,181],[181,180],[16,85],[85,17],[17,16],[205,206],[206,36],[36,205],[176,148],[148,140],[140,176],[165,92],[92,39],[39,165],[245,193],[193,244],[244,245],[27,159],[159,28],[28,27],[30,247],[247,161],[161,30],[174,236],[236,196],[196,174],[103,54],[54,104],[104,103],[55,193],[193,8],[8,55],[111,117],[117,31],[31,111],[221,189],[189,55],[55,221],[240,98],[98,99],[99,240],[142,126],[126,100],[100,142],[219,166],[166,218],[218,219],[112,155],[155,26],[26,112],[198,209],[209,131],[131,198],[169,135],[135,150],[150,169],[114,47],[47,217],[217,114],[224,223],[223,53],[53,224],[220,45],[45,134],[134,220],[32,211],[211,140],[140,32],[109,67],[67,108],[108,109],[146,43],[43,91],[91,146],[231,230],[230,120],[120,231],[113,226],[226,247],[247,113],[105,63],[63,52],[52,105],[241,238],[238,242],[242,241],[124,46],[46,156],[156,124],[95,78],[78,96],[96,95],[70,46],[46,63],[63,70],[116,143],[143,227],[227,116],[116,123],[123,111],[111,116],[1,44],[44,19],[19,1],[3,236],[236,51],[51,3],[207,216],[216,205],[205,207],[26,154],[154,22],[22,26],[165,39],[39,167],[167,165],[199,200],[200,208],[208,199],[101,36],[36,100],[100,101],[43,57],[57,202],[202,43],[242,20],[20,99],[99,242],[56,28],[28,157],[157,56],[124,35],[35,113],[113,124],[29,160],[160,27],[27,29],[211,204],[204,210],[210,211],[124,113],[113,46],[46,124],[106,43],[43,204],[204,106],[96,62],[62,77],[77,96],[227,137],[137,116],[116,227],[73,41],[41,72],[72,73],[36,203],[203,142],[142,36],[235,64],[64,240],[240,235],[48,49],[49,64],[64,48],[42,41],[41,74],[74,42],[214,212],[212,207],[207,214],[183,42],[42,184],[184,183],[210,169],[169,211],[211,210],[140,170],[170,176],[176,140],[104,105],[105,69],[69,104],[193,122],[122,168],[168,193],[50,123],[123,187],[187,50],[89,96],[96,90],[90,89],[66,65],[65,107],[107,66],[179,89],[89,180],[180,179],[119,101],[101,120],[120,119],[68,63],[63,104],[104,68],[234,93],[93,227],[227,234],[16,15],[15,85],[85,16],[209,129],[129,49],[49,209],[15,14],[14,86],[86,15],[107,55],[55,9],[9,107],[120,100],[100,121],[121,120],[153,145],[145,22],[22,153],[178,88],[88,179],[179,178],[197,6],[6,196],[196,197],[89,88],[88,96],[96,89],[135,138],[138,136],[136,135],[138,215],[215,172],[172,138],[218,115],[115,219],[219,218],[41,42],[42,81],[81,41],[5,195],[195,51],[51,5],[57,43],[43,61],[61,57],[208,171],[171,199],[199,208],[41,81],[81,38],[38,41],[224,53],[53,225],[225,224],[24,144],[144,110],[110,24],[105,52],[52,66],[66,105],[118,229],[229,117],[117,118],[227,34],[34,234],[234,227],[66,107],[107,69],[69,66],[10,109],[109,151],[151,10],[219,48],[48,235],[235,219],[183,62],[62,191],[191,183],[142,129],[129,126],[126,142],[116,111],[111,143],[143,116],[118,117],[117,50],[50,118],[223,222],[222,52],[52,223],[94,19],[19,141],[141,94],[222,221],[221,65],[65,222],[196,3],[3,197],[197,196],[45,220],[220,44],[44,45],[156,70],[70,139],[139,156],[188,122],[122,245],[245,188],[139,71],[71,162],[162,139],[149,170],[170,150],[150,149],[122,188],[188,196],[196,122],[206,216],[216,92],[92,206],[164,2],[2,167],[167,164],[242,141],[141,241],[241,242],[0,164],[164,37],[37,0],[11,72],[72,12],[12,11],[12,38],[38,13],[13,12],[70,63],[63,71],[71,70],[31,226],[226,111],[111,31],[36,101],[101,205],[205,36],[203,206],[206,165],[165,203],[126,209],[209,217],[217,126],[98,165],[165,97],[97,98],[237,220],[220,218],[218,237],[237,239],[239,241],[241,237],[210,214],[214,169],[169,210],[140,171],[171,32],[32,140],[241,125],[125,237],[237,241],[179,86],[86,178],[178,179],[180,85],[85,179],[179,180],[181,84],[84,180],[180,181],[182,83],[83,181],[181,182],[194,201],[201,182],[182,194],[177,137],[137,132],[132,177],[184,76],[76,183],[183,184],[185,61],[61,184],[184,185],[186,57],[57,185],[185,186],[216,212],[212,186],[186,216],[192,214],[214,187],[187,192],[139,34],[34,156],[156,139],[218,79],[79,237],[237,218],[147,123],[123,177],[177,147],[45,44],[44,4],[4,45],[208,201],[201,32],[32,208],[98,64],[64,129],[129,98],[192,213],[213,138],[138,192],[235,59],[59,219],[219,235],[141,242],[242,97],[97,141],[97,2],[2,141],[141,97],[240,75],[75,235],[235,240],[229,24],[24,228],[228,229],[31,25],[25,226],[226,31],[230,23],[23,229],[229,230],[231,22],[22,230],[230,231],[232,26],[26,231],[231,232],[233,112],[112,232],[232,233],[244,189],[189,243],[243,244],[189,221],[221,190],[190,189],[222,28],[28,221],[221,222],[223,27],[27,222],[222,223],[224,29],[29,223],[223,224],[225,30],[30,224],[224,225],[113,247],[247,225],[225,113],[99,60],[60,240],[240,99],[213,147],[147,215],[215,213],[60,20],[20,166],[166,60],[192,187],[187,213],[213,192],[243,112],[112,244],[244,243],[244,233],[233,245],[245,244],[245,128],[128,188],[188,245],[188,114],[114,174],[174,188],[134,131],[131,220],[220,134],[174,217],[217,236],[236,174],[236,198],[198,134],[134,236],[215,177],[177,58],[58,215],[156,143],[143,124],[124,156],[25,110],[110,7],[7,25],[31,228],[228,25],[25,31],[264,356],[356,368],[368,264],[0,11],[11,267],[267,0],[451,452],[452,349],[349,451],[267,302],[302,269],[269,267],[350,357],[357,277],[277,350],[350,452],[452,357],[357,350],[299,333],[333,297],[297,299],[396,175],[175,377],[377,396],[280,347],[347,330],[330,280],[269,303],[303,270],[270,269],[151,9],[9,337],[337,151],[344,278],[278,360],[360,344],[424,418],[418,431],[431,424],[270,304],[304,409],[409,270],[272,310],[310,407],[407,272],[322,270],[270,410],[410,322],[449,450],[450,347],[347,449],[432,422],[422,434],[434,432],[18,313],[313,17],[17,18],[291,306],[306,375],[375,291],[259,387],[387,260],[260,259],[424,335],[335,418],[418,424],[434,364],[364,416],[416,434],[391,423],[423,327],[327,391],[301,251],[251,298],[298,301],[275,281],[281,4],[4,275],[254,373],[373,253],[253,254],[375,307],[307,321],[321,375],[280,425],[425,411],[411,280],[200,421],[421,18],[18,200],[335,321],[321,406],[406,335],[321,320],[320,405],[405,321],[314,315],[315,17],[17,314],[423,426],[426,266],[266,423],[396,377],[377,369],[369,396],[270,322],[322,269],[269,270],[413,417],[417,464],[464,413],[385,386],[386,258],[258,385],[248,456],[456,419],[419,248],[298,284],[284,333],[333,298],[168,417],[417,8],[8,168],[448,346],[346,261],[261,448],[417,413],[413,285],[285,417],[326,327],[327,328],[328,326],[277,355],[355,329],[329,277],[309,392],[392,438],[438,309],[381,382],[382,256],[256,381],[279,429],[429,360],[360,279],[365,364],[364,379],[379,365],[355,277],[277,437],[437,355],[282,443],[443,283],[283,282],[281,275],[275,363],[363,281],[395,431],[431,369],[369,395],[299,297],[297,337],[337,299],[335,273],[273,321],[321,335],[348,450],[450,349],[349,348],[359,446],[446,467],[467,359],[283,293],[293,282],[282,283],[250,458],[458,462],[462,250],[300,276],[276,383],[383,300],[292,308],[308,325],[325,292],[283,276],[276,293],[293,283],[264,372],[372,447],[447,264],[346,352],[352,340],[340,346],[354,274],[274,19],[19,354],[363,456],[456,281],[281,363],[426,436],[436,425],[425,426],[380,381],[381,252],[252,380],[267,269],[269,393],[393,267],[421,200],[200,428],[428,421],[371,266],[266,329],[329,371],[432,287],[287,422],[422,432],[290,250],[250,328],[328,290],[385,258],[258,384],[384,385],[446,265],[265,342],[342,446],[386,387],[387,257],[257,386],[422,424],[424,430],[430,422],[445,342],[342,276],[276,445],[422,273],[273,424],[424,422],[306,292],[292,307],[307,306],[352,366],[366,345],[345,352],[268,271],[271,302],[302,268],[358,423],[423,371],[371,358],[327,294],[294,460],[460,327],[331,279],[279,294],[294,331],[303,271],[271,304],[304,303],[436,432],[432,427],[427,436],[304,272],[272,408],[408,304],[395,394],[394,431],[431,395],[378,395],[395,400],[400,378],[296,334],[334,299],[299,296],[6,351],[351,168],[168,6],[376,352],[352,411],[411,376],[307,325],[325,320],[320,307],[285,295],[295,336],[336,285],[320,319],[319,404],[404,320],[329,330],[330,349],[349,329],[334,293],[293,333],[333,334],[366,323],[323,447],[447,366],[316,15],[15,315],[315,316],[331,358],[358,279],[279,331],[317,14],[14,316],[316,317],[8,285],[285,9],[9,8],[277,329],[329,350],[350,277],[253,374],[374,252],[252,253],[319,318],[318,403],[403,319],[351,6],[6,419],[419,351],[324,318],[318,325],[325,324],[397,367],[367,365],[365,397],[288,435],[435,397],[397,288],[278,344],[344,439],[439,278],[310,272],[272,311],[311,310],[248,195],[195,281],[281,248],[375,273],[273,291],[291,375],[175,396],[396,199],[199,175],[312,311],[311,268],[268,312],[276,283],[283,445],[445,276],[390,373],[373,339],[339,390],[295,282],[282,296],[296,295],[448,449],[449,346],[346,448],[356,264],[264,454],[454,356],[337,336],[336,299],[299,337],[337,338],[338,151],[151,337],[294,278],[278,455],[455,294],[308,292],[292,415],[415,308],[429,358],[358,355],[355,429],[265,340],[340,372],[372,265],[352,346],[346,280],[280,352],[295,442],[442,282],[282,295],[354,19],[19,370],[370,354],[285,441],[441,295],[295,285],[195,248],[248,197],[197,195],[457,440],[440,274],[274,457],[301,300],[300,368],[368,301],[417,351],[351,465],[465,417],[251,301],[301,389],[389,251],[394,395],[395,379],[379,394],[399,412],[412,419],[419,399],[410,436],[436,322],[322,410],[326,2],[2,393],[393,326],[354,370],[370,461],[461,354],[393,164],[164,267],[267,393],[268,302],[302,12],[12,268],[312,268],[268,13],[13,312],[298,293],[293,301],[301,298],[265,446],[446,340],[340,265],[280,330],[330,425],[425,280],[322,426],[426,391],[391,322],[420,429],[429,437],[437,420],[393,391],[391,326],[326,393],[344,440],[440,438],[438,344],[458,459],[459,461],[461,458],[364,434],[434,394],[394,364],[428,396],[396,262],[262,428],[274,354],[354,457],[457,274],[317,316],[316,402],[402,317],[316,315],[315,403],[403,316],[315,314],[314,404],[404,315],[314,313],[313,405],[405,314],[313,421],[421,406],[406,313],[323,366],[366,361],[361,323],[292,306],[306,407],[407,292],[306,291],[291,408],[408,306],[291,287],[287,409],[409,291],[287,432],[432,410],[410,287],[427,434],[434,411],[411,427],[372,264],[264,383],[383,372],[459,309],[309,457],[457,459],[366,352],[352,401],[401,366],[1,274],[274,4],[4,1],[418,421],[421,262],[262,418],[331,294],[294,358],[358,331],[435,433],[433,367],[367,435],[392,289],[289,439],[439,392],[328,462],[462,326],[326,328],[94,2],[2,370],[370,94],[289,305],[305,455],[455,289],[339,254],[254,448],[448,339],[359,255],[255,446],[446,359],[254,253],[253,449],[449,254],[253,252],[252,450],[450,253],[252,256],[256,451],[451,252],[256,341],[341,452],[452,256],[414,413],[413,463],[463,414],[286,441],[441,414],[414,286],[286,258],[258,441],[441,286],[258,257],[257,442],[442,258],[257,259],[259,443],[443,257],[259,260],[260,444],[444,259],[260,467],[467,445],[445,260],[309,459],[459,250],[250,309],[305,289],[289,290],[290,305],[305,290],[290,460],[460,305],[401,376],[376,435],[435,401],[309,250],[250,392],[392,309],[376,411],[411,433],[433,376],[453,341],[341,464],[464,453],[357,453],[453,465],[465,357],[343,357],[357,412],[412,343],[437,343],[343,399],[399,437],[344,360],[360,440],[440,344],[420,437],[437,456],[456,420],[360,420],[420,363],[363,360],[361,401],[401,288],[288,361],[265,372],[372,353],[353,265],[390,339],[339,249],[249,390],[339,448],[448,255],[255,339]);function Sgt(t){t.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]}}var Igt=class extends pgt{constructor(t,e){super(new cgt(t,e),"image_in","norm_rect",false),this.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]},this.outputFacialTransformationMatrixes=this.outputFaceBlendshapes=false,Wht(t=this.h=new mbt,0,1,e=new abt),this.v=new pbt,Wht(this.h,0,3,this.v),this.s=new lbt,Wht(this.h,0,2,this.s),Jht(this.s,4,1),Kht(this.s,2,.5),Kht(this.v,2,.5),Kht(this.h,4,.5)}get baseOptions(){return jht(this.h,abt,1)}set baseOptions(t){Wht(this.h,0,1,t)}o(t){return"numFaces"in t&&Jht(this.s,4,t.numFaces??1),"minFaceDetectionConfidence"in t&&Kht(this.s,2,t.minFaceDetectionConfidence??.5),"minTrackingConfidence"in t&&Kht(this.h,4,t.minTrackingConfidence??.5),"minFacePresenceConfidence"in t&&Kht(this.v,2,t.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in t&&(this.outputFaceBlendshapes=!!t.outputFaceBlendshapes),"outputFacialTransformationMatrixes"in t&&(this.outputFacialTransformationMatrixes=!!t.outputFacialTransformationMatrixes),this.l(t)}D(t,e){return Sgt(this),fgt(this,t,e),this.j}F(t,e,n){return Sgt(this),hgt(this,t,n,e),this.j}m(){var t=new Emt;Imt(t,"image_in"),Imt(t,"norm_rect"),Mmt(t,"face_landmarks");const e=new bmt;Cdt(e,gbt,this.h);const n=new Nmt;wmt(n,"mediapipe.tasks.vision.face_landmarker.FaceLandmarkerGraph"),vmt(n,"IMAGE:image_in"),vmt(n,"NORM_RECT:norm_rect"),xmt(n,"NORM_LANDMARKS:face_landmarks"),n.o(e),Smt(t,n),this.g.attachProtoVectorListener("face_landmarks",((t,e)=>{for(const e of t)t=Gmt(e),this.j.faceLandmarks.push(syt(t));kyt(this,e)})),this.g.attachEmptyPacketListener("face_landmarks",(t=>{kyt(this,t)})),this.outputFaceBlendshapes&&(Mmt(t,"blendshapes"),xmt(n,"BLENDSHAPES:blendshapes"),this.g.attachProtoVectorListener("blendshapes",((t,e)=>{if(this.outputFaceBlendshapes)for(const e of t)t=Lmt(e),this.j.faceBlendshapes.push(eyt(t.g()??[]));kyt(this,e)})),this.g.attachEmptyPacketListener("blendshapes",(t=>{kyt(this,t)}))),this.outputFacialTransformationMatrixes&&(Mmt(t,"face_geometry"),xmt(n,"FACE_GEOMETRY:face_geometry"),this.g.attachProtoVectorListener("face_geometry",((t,e)=>{if(this.outputFacialTransformationMatrixes)for(const e of t)(t=jht(dbt(e),Vmt,2))&&this.j.facialTransformationMatrixes.push({rows:Zht(t,1)??0??0,columns:Zht(t,2)??0??0,data:Sht(t,3,Ift,$ht()).slice()??[]});kyt(this,e)})),this.g.attachEmptyPacketListener("face_geometry",(t=>{kyt(this,t)}))),t=t.g(),this.setGraph(new Uint8Array(t),true)}};Igt.prototype.detectForVideo=Igt.prototype.F,Igt.prototype.detect=Igt.prototype.D,Igt.prototype.setOptions=Igt.prototype.o,Igt.createFromModelPath=function(t,e){return ugt(Igt,t,{baseOptions:{modelAssetPath:e}})},Igt.createFromModelBuffer=function(t,e){return ugt(Igt,t,{baseOptions:{modelAssetBuffer:e}})},Igt.createFromOptions=function(t,e){return ugt(Igt,t,e)},Igt.FACE_LANDMARKS_LIPS=bgt,Igt.FACE_LANDMARKS_LEFT_EYE=ygt,Igt.FACE_LANDMARKS_LEFT_EYEBROW=ggt,Igt.FACE_LANDMARKS_LEFT_IRIS=wgt,Igt.FACE_LANDMARKS_RIGHT_EYE=vgt,Igt.FACE_LANDMARKS_RIGHT_EYEBROW=xgt,Igt.FACE_LANDMARKS_RIGHT_IRIS=Ngt,Igt.FACE_LANDMARKS_FACE_OVAL=kgt,Igt.FACE_LANDMARKS_CONTOURS=Cgt,Igt.FACE_LANDMARKS_TESSELATION=$gt;var Mgt=class extends pgt{constructor(t,e){super(new cgt(t,e),"image_in","norm_rect",true),Wht(t=this.j=new wbt,0,1,e=new abt)}get baseOptions(){return jht(this.j,abt,1)}set baseOptions(t){Wht(this.j,0,1,t)}o(t){return super.l(t)}Ka(t,e,n){const s="function"!=typeof e?e:{};if(this.h="function"==typeof e?e:n,fgt(this,t,s??{}),!this.h)return this.s}m(){var t=new Emt;Imt(t,"image_in"),Imt(t,"norm_rect"),Mmt(t,"stylized_image");const e=new bmt;Cdt(e,vbt,this.j);const n=new Nmt;wmt(n,"mediapipe.tasks.vision.face_stylizer.FaceStylizerGraph"),vmt(n,"IMAGE:image_in"),vmt(n,"NORM_RECT:norm_rect"),xmt(n,"STYLIZED_IMAGE:stylized_image"),n.o(e),Smt(t,n),this.g.V("stylized_image",((t,e)=>{var n=!this.h,s=t.data,r=t.width;const i=r*(t=t.height);if(s instanceof Uint8Array)if(s.length===3*i){const e=new Uint8ClampedArray(4*i);for(let t=0;t<i;++t)e[4*t]=s[3*t],e[4*t+1]=s[3*t+1],e[4*t+2]=s[3*t+2],e[4*t+3]=255;s=new ImageData(e,r,t)}else{if(s.length!==4*i)throw Error("Unsupported channel count: "+s.length/i);s=new ImageData(new Uint8ClampedArray(s.buffer,s.byteOffset,s.length),r,t)}else if(!(s instanceof WebGLTexture))throw Error(`Unsupported format: ${s.constructor.name}`);r=new sgt([s],false,false,this.g.i.canvas,this.P,r,t),this.s=n=n?r.clone():r,this.h&&this.h(n),kyt(this,e)})),this.g.attachEmptyPacketListener("stylized_image",(t=>{this.s=null,this.h&&this.h(null),kyt(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),true)}};Mgt.prototype.stylize=Mgt.prototype.Ka,Mgt.prototype.setOptions=Mgt.prototype.o,Mgt.createFromModelPath=function(t,e){return ugt(Mgt,t,{baseOptions:{modelAssetPath:e}})},Mgt.createFromModelBuffer=function(t,e){return ugt(Mgt,t,{baseOptions:{modelAssetBuffer:e}})},Mgt.createFromOptions=function(t,e){return ugt(Mgt,t,e)};var Egt=igt([0,1],[1,2],[2,3],[3,4],[0,5],[5,6],[6,7],[7,8],[5,9],[9,10],[10,11],[11,12],[9,13],[13,14],[14,15],[15,16],[13,17],[0,17],[17,18],[18,19],[19,20]);function Tgt(t){t.gestures=[],t.landmarks=[],t.worldLandmarks=[],t.handedness=[]}function Agt(t){return 0===t.gestures.length?{gestures:[],landmarks:[],worldLandmarks:[],handedness:[],handednesses:[]}:{gestures:t.gestures,landmarks:t.landmarks,worldLandmarks:t.worldLandmarks,handedness:t.handedness,handednesses:t.handedness}}function Dgt(t,e=true){const n=[];for(const r of t){var s=Lmt(r);t=[];for(const n of s.g())s=e&&null!=Zht(n,1)?Zht(n,1)??0:-1,t.push({score:Xht(n,2)??0,index:s,categoryName:Qht(n,3)??""??"",displayName:Qht(n,4)??""??""});n.push(t)}return n}var Rgt=class extends pgt{constructor(t,e){super(new cgt(t,e),"image_in","norm_rect",false),this.gestures=[],this.landmarks=[],this.worldLandmarks=[],this.handedness=[],Wht(t=this.j=new Ibt,0,1,e=new abt),this.s=new Sbt,Wht(this.j,0,2,this.s),this.C=new $bt,Wht(this.s,0,3,this.C),this.v=new Cbt,Wht(this.s,0,2,this.v),this.h=new kbt,Wht(this.j,0,3,this.h),Kht(this.v,2,.5),Kht(this.s,4,.5),Kht(this.C,2,.5)}get baseOptions(){return jht(this.j,abt,1)}set baseOptions(t){Wht(this.j,0,1,t)}o(t){if(Jht(this.v,3,t.numHands??1),"minHandDetectionConfidence"in t&&Kht(this.v,2,t.minHandDetectionConfidence??.5),"minTrackingConfidence"in t&&Kht(this.s,4,t.minTrackingConfidence??.5),"minHandPresenceConfidence"in t&&Kht(this.C,2,t.minHandPresenceConfidence??.5),t.cannedGesturesClassifierOptions){var e=new xbt,n=e,s=tyt(t.cannedGesturesClassifierOptions,jht(this.h,xbt,3)?.h());Wht(n,0,2,s),Wht(this.h,0,3,e)}else void 0===t.cannedGesturesClassifierOptions&&jht(this.h,xbt,3)?.g();return t.customGesturesClassifierOptions?(Wht(n=e=new xbt,0,2,s=tyt(t.customGesturesClassifierOptions,jht(this.h,xbt,4)?.h())),Wht(this.h,0,4,e)):void 0===t.customGesturesClassifierOptions&&jht(this.h,xbt,4)?.g(),this.l(t)}Fa(t,e){return Tgt(this),fgt(this,t,e),Agt(this)}Ga(t,e,n){return Tgt(this),hgt(this,t,n,e),Agt(this)}m(){var t=new Emt;Imt(t,"image_in"),Imt(t,"norm_rect"),Mmt(t,"hand_gestures"),Mmt(t,"hand_landmarks"),Mmt(t,"world_hand_landmarks"),Mmt(t,"handedness");const e=new bmt;Cdt(e,Dbt,this.j);const n=new Nmt;wmt(n,"mediapipe.tasks.vision.gesture_recognizer.GestureRecognizerGraph"),vmt(n,"IMAGE:image_in"),vmt(n,"NORM_RECT:norm_rect"),xmt(n,"HAND_GESTURES:hand_gestures"),xmt(n,"LANDMARKS:hand_landmarks"),xmt(n,"WORLD_LANDMARKS:world_hand_landmarks"),xmt(n,"HANDEDNESS:handedness"),n.o(e),Smt(t,n),this.g.attachProtoVectorListener("hand_landmarks",((t,e)=>{for(const e of t){t=Gmt(e);const n=[];for(const e of Bht(t,Wmt,1))n.push({x:Xht(e,1)??0,y:Xht(e,2)??0,z:Xht(e,3)??0,visibility:Xht(e,4)??0});this.landmarks.push(n)}kyt(this,e)})),this.g.attachEmptyPacketListener("hand_landmarks",(t=>{kyt(this,t)})),this.g.attachProtoVectorListener("world_hand_landmarks",((t,e)=>{for(const e of t){t=Bmt(e);const n=[];for(const e of Bht(t,Pmt,1))n.push({x:Xht(e,1)??0,y:Xht(e,2)??0,z:Xht(e,3)??0,visibility:Xht(e,4)??0});this.worldLandmarks.push(n)}kyt(this,e)})),this.g.attachEmptyPacketListener("world_hand_landmarks",(t=>{kyt(this,t)})),this.g.attachProtoVectorListener("hand_gestures",((t,e)=>{this.gestures.push(...Dgt(t,false)),kyt(this,e)})),this.g.attachEmptyPacketListener("hand_gestures",(t=>{kyt(this,t)})),this.g.attachProtoVectorListener("handedness",((t,e)=>{this.handedness.push(...Dgt(t)),kyt(this,e)})),this.g.attachEmptyPacketListener("handedness",(t=>{kyt(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),true)}};function Ogt(t){return{landmarks:t.landmarks,worldLandmarks:t.worldLandmarks,handednesses:t.handedness,handedness:t.handedness}}Rgt.prototype.recognizeForVideo=Rgt.prototype.Ga,Rgt.prototype.recognize=Rgt.prototype.Fa,Rgt.prototype.setOptions=Rgt.prototype.o,Rgt.createFromModelPath=function(t,e){return ugt(Rgt,t,{baseOptions:{modelAssetPath:e}})},Rgt.createFromModelBuffer=function(t,e){return ugt(Rgt,t,{baseOptions:{modelAssetBuffer:e}})},Rgt.createFromOptions=function(t,e){return ugt(Rgt,t,e)},Rgt.HAND_CONNECTIONS=Egt;var Lgt=class extends pgt{constructor(t,e){super(new cgt(t,e),"image_in","norm_rect",false),this.landmarks=[],this.worldLandmarks=[],this.handedness=[],Wht(t=this.h=new Sbt,0,1,e=new abt),this.s=new $bt,Wht(this.h,0,3,this.s),this.j=new Cbt,Wht(this.h,0,2,this.j),Jht(this.j,3,1),Kht(this.j,2,.5),Kht(this.s,2,.5),Kht(this.h,4,.5)}get baseOptions(){return jht(this.h,abt,1)}set baseOptions(t){Wht(this.h,0,1,t)}o(t){return"numHands"in t&&Jht(this.j,3,t.numHands??1),"minHandDetectionConfidence"in t&&Kht(this.j,2,t.minHandDetectionConfidence??.5),"minTrackingConfidence"in t&&Kht(this.h,4,t.minTrackingConfidence??.5),"minHandPresenceConfidence"in t&&Kht(this.s,2,t.minHandPresenceConfidence??.5),this.l(t)}D(t,e){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],fgt(this,t,e),Ogt(this)}F(t,e,n){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],hgt(this,t,n,e),Ogt(this)}m(){var t=new Emt;Imt(t,"image_in"),Imt(t,"norm_rect"),Mmt(t,"hand_landmarks"),Mmt(t,"world_hand_landmarks"),Mmt(t,"handedness");const e=new bmt;Cdt(e,Rbt,this.h);const n=new Nmt;wmt(n,"mediapipe.tasks.vision.hand_landmarker.HandLandmarkerGraph"),vmt(n,"IMAGE:image_in"),vmt(n,"NORM_RECT:norm_rect"),xmt(n,"LANDMARKS:hand_landmarks"),xmt(n,"WORLD_LANDMARKS:world_hand_landmarks"),xmt(n,"HANDEDNESS:handedness"),n.o(e),Smt(t,n),this.g.attachProtoVectorListener("hand_landmarks",((t,e)=>{for(const e of t)t=Gmt(e),this.landmarks.push(syt(t));kyt(this,e)})),this.g.attachEmptyPacketListener("hand_landmarks",(t=>{kyt(this,t)})),this.g.attachProtoVectorListener("world_hand_landmarks",((t,e)=>{for(const e of t)t=Bmt(e),this.worldLandmarks.push(ryt(t));kyt(this,e)})),this.g.attachEmptyPacketListener("world_hand_landmarks",(t=>{kyt(this,t)})),this.g.attachProtoVectorListener("handedness",((t,e)=>{var n=this.handedness,s=n.push;const r=[];for(const e of t){t=Lmt(e);const n=[];for(const e of t.g())n.push({score:Xht(e,2)??0,index:Zht(e,1)??0??-1,categoryName:Qht(e,3)??""??"",displayName:Qht(e,4)??""??""});r.push(n)}s.call(n,...r),kyt(this,e)})),this.g.attachEmptyPacketListener("handedness",(t=>{kyt(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),true)}};Lgt.prototype.detectForVideo=Lgt.prototype.F,Lgt.prototype.detect=Lgt.prototype.D,Lgt.prototype.setOptions=Lgt.prototype.o,Lgt.createFromModelPath=function(t,e){return ugt(Lgt,t,{baseOptions:{modelAssetPath:e}})},Lgt.createFromModelBuffer=function(t,e){return ugt(Lgt,t,{baseOptions:{modelAssetBuffer:e}})},Lgt.createFromOptions=function(t,e){return ugt(Lgt,t,e)},Lgt.HAND_CONNECTIONS=Egt;var _gt=igt([0,1],[1,2],[2,3],[3,7],[0,4],[4,5],[5,6],[6,8],[9,10],[11,12],[11,13],[13,15],[15,17],[15,19],[15,21],[17,19],[12,14],[14,16],[16,18],[16,20],[16,22],[18,20],[11,23],[12,24],[23,24],[23,25],[24,26],[25,27],[26,28],[27,29],[28,30],[29,31],[30,32],[27,31],[28,32]);function Fgt(t){t.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]}}function zgt(t){try{if(!t.C)return t.h;t.C(t.h)}finally{Syt(t)}}function jgt(t,e){t=Gmt(t),e.push(syt(t))}var Pgt=class extends pgt{constructor(t,e){super(new cgt(t,e),"input_frames_image",null,false),this.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]},this.outputPoseSegmentationMasks=this.outputFaceBlendshapes=false,Wht(t=this.j=new Fbt,0,1,e=new abt),this.K=new $bt,Wht(this.j,0,2,this.K),this.Y=new Obt,Wht(this.j,0,3,this.Y),this.s=new lbt,Wht(this.j,0,4,this.s),this.H=new pbt,Wht(this.j,0,5,this.H),this.v=new Lbt,Wht(this.j,0,6,this.v),this.L=new _bt,Wht(this.j,0,7,this.L),Kht(this.s,2,.5),Kht(this.s,3,.3),Kht(this.H,2,.5),Kht(this.v,2,.5),Kht(this.v,3,.3),Kht(this.L,2,.5),Kht(this.K,2,.5)}get baseOptions(){return jht(this.j,abt,1)}set baseOptions(t){Wht(this.j,0,1,t)}o(t){return"minFaceDetectionConfidence"in t&&Kht(this.s,2,t.minFaceDetectionConfidence??.5),"minFaceSuppressionThreshold"in t&&Kht(this.s,3,t.minFaceSuppressionThreshold??.3),"minFacePresenceConfidence"in t&&Kht(this.H,2,t.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in t&&(this.outputFaceBlendshapes=!!t.outputFaceBlendshapes),"minPoseDetectionConfidence"in t&&Kht(this.v,2,t.minPoseDetectionConfidence??.5),"minPoseSuppressionThreshold"in t&&Kht(this.v,3,t.minPoseSuppressionThreshold??.3),"minPosePresenceConfidence"in t&&Kht(this.L,2,t.minPosePresenceConfidence??.5),"outputPoseSegmentationMasks"in t&&(this.outputPoseSegmentationMasks=!!t.outputPoseSegmentationMasks),"minHandLandmarksConfidence"in t&&Kht(this.K,2,t.minHandLandmarksConfidence??.5),this.l(t)}D(t,e,n){const s="function"!=typeof e?e:{};return this.C="function"==typeof e?e:n,Fgt(this),fgt(this,t,s),zgt(this)}F(t,e,n,s){const r="function"!=typeof n?n:{};return this.C="function"==typeof n?n:s,Fgt(this),hgt(this,t,r,e),zgt(this)}m(){var t=new Emt;Imt(t,"input_frames_image"),Mmt(t,"pose_landmarks"),Mmt(t,"pose_world_landmarks"),Mmt(t,"face_landmarks"),Mmt(t,"left_hand_landmarks"),Mmt(t,"left_hand_world_landmarks"),Mmt(t,"right_hand_landmarks"),Mmt(t,"right_hand_world_landmarks");const e=new bmt,n=new smt;Aht(n,1,Gft("type.googleapis.com/mediapipe.tasks.vision.holistic_landmarker.proto.HolisticLandmarkerGraphOptions"),""),function(t,e){if(null!=e)if(Array.isArray(e))xht(t,2,lht(e,hht,void 0,void 0,false));else{if(!("string"==typeof e||e instanceof mlt||flt(e)))throw Error("invalid value in Any.value field: "+e+" expected a ByteString, a base64 encoded string, a Uint8Array or a jspb array");Aht(t,2,Glt(e,false),dlt())}}(n,this.j.g());const s=new Nmt;wmt(s,"mediapipe.tasks.vision.holistic_landmarker.HolisticLandmarkerGraph"),Hht(s,8,smt,n),vmt(s,"IMAGE:input_frames_image"),xmt(s,"POSE_LANDMARKS:pose_landmarks"),xmt(s,"POSE_WORLD_LANDMARKS:pose_world_landmarks"),xmt(s,"FACE_LANDMARKS:face_landmarks"),xmt(s,"LEFT_HAND_LANDMARKS:left_hand_landmarks"),xmt(s,"LEFT_HAND_WORLD_LANDMARKS:left_hand_world_landmarks"),xmt(s,"RIGHT_HAND_LANDMARKS:right_hand_landmarks"),xmt(s,"RIGHT_HAND_WORLD_LANDMARKS:right_hand_world_landmarks"),s.o(e),Smt(t,s),Cyt(this,t),this.g.attachProtoListener("pose_landmarks",((t,e)=>{jgt(t,this.h.poseLandmarks),kyt(this,e)})),this.g.attachEmptyPacketListener("pose_landmarks",(t=>{kyt(this,t)})),this.g.attachProtoListener("pose_world_landmarks",((t,e)=>{var n=this.h.poseWorldLandmarks;t=Bmt(t),n.push(ryt(t)),kyt(this,e)})),this.g.attachEmptyPacketListener("pose_world_landmarks",(t=>{kyt(this,t)})),this.outputPoseSegmentationMasks&&(xmt(s,"POSE_SEGMENTATION_MASK:pose_segmentation_mask"),$yt(this,"pose_segmentation_mask"),this.g.V("pose_segmentation_mask",((t,e)=>{this.h.poseSegmentationMasks=[dgt(this,t,true,!this.C)],kyt(this,e)})),this.g.attachEmptyPacketListener("pose_segmentation_mask",(t=>{this.h.poseSegmentationMasks=[],kyt(this,t)}))),this.g.attachProtoListener("face_landmarks",((t,e)=>{jgt(t,this.h.faceLandmarks),kyt(this,e)})),this.g.attachEmptyPacketListener("face_landmarks",(t=>{kyt(this,t)})),this.outputFaceBlendshapes&&(Mmt(t,"extra_blendshapes"),xmt(s,"FACE_BLENDSHAPES:extra_blendshapes"),this.g.attachProtoListener("extra_blendshapes",((t,e)=>{var n=this.h.faceBlendshapes;this.outputFaceBlendshapes&&(t=Lmt(t),n.push(eyt(t.g()??[]))),kyt(this,e)})),this.g.attachEmptyPacketListener("extra_blendshapes",(t=>{kyt(this,t)}))),this.g.attachProtoListener("left_hand_landmarks",((t,e)=>{jgt(t,this.h.leftHandLandmarks),kyt(this,e)})),this.g.attachEmptyPacketListener("left_hand_landmarks",(t=>{kyt(this,t)})),this.g.attachProtoListener("left_hand_world_landmarks",((t,e)=>{var n=this.h.leftHandWorldLandmarks;t=Bmt(t),n.push(ryt(t)),kyt(this,e)})),this.g.attachEmptyPacketListener("left_hand_world_landmarks",(t=>{kyt(this,t)})),this.g.attachProtoListener("right_hand_landmarks",((t,e)=>{jgt(t,this.h.rightHandLandmarks),kyt(this,e)})),this.g.attachEmptyPacketListener("right_hand_landmarks",(t=>{kyt(this,t)})),this.g.attachProtoListener("right_hand_world_landmarks",((t,e)=>{var n=this.h.rightHandWorldLandmarks;t=Bmt(t),n.push(ryt(t)),kyt(this,e)})),this.g.attachEmptyPacketListener("right_hand_world_landmarks",(t=>{kyt(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),true)}};Pgt.prototype.detectForVideo=Pgt.prototype.F,Pgt.prototype.detect=Pgt.prototype.D,Pgt.prototype.setOptions=Pgt.prototype.o,Pgt.createFromModelPath=function(t,e){return ugt(Pgt,t,{baseOptions:{modelAssetPath:e}})},Pgt.createFromModelBuffer=function(t,e){return ugt(Pgt,t,{baseOptions:{modelAssetBuffer:e}})},Pgt.createFromOptions=function(t,e){return ugt(Pgt,t,e)},Pgt.HAND_CONNECTIONS=Egt,Pgt.POSE_CONNECTIONS=_gt,Pgt.FACE_LANDMARKS_LIPS=bgt,Pgt.FACE_LANDMARKS_LEFT_EYE=ygt,Pgt.FACE_LANDMARKS_LEFT_EYEBROW=ggt,Pgt.FACE_LANDMARKS_LEFT_IRIS=wgt,Pgt.FACE_LANDMARKS_RIGHT_EYE=vgt,Pgt.FACE_LANDMARKS_RIGHT_EYEBROW=xgt,Pgt.FACE_LANDMARKS_RIGHT_IRIS=Ngt,Pgt.FACE_LANDMARKS_FACE_OVAL=kgt,Pgt.FACE_LANDMARKS_CONTOURS=Cgt,Pgt.FACE_LANDMARKS_TESSELATION=$gt;var Bgt=class extends pgt{constructor(t,e){super(new cgt(t,e),"input_image","norm_rect",true),this.j={classifications:[]},Wht(t=this.h=new Pbt,0,1,e=new abt)}get baseOptions(){return jht(this.h,abt,1)}set baseOptions(t){Wht(this.h,0,1,t)}o(t){return Wht(this.h,0,2,tyt(t,jht(this.h,tbt,2))),this.l(t)}qa(t,e){return this.j={classifications:[]},fgt(this,t,e),this.j}ra(t,e,n){return this.j={classifications:[]},hgt(this,t,n,e),this.j}m(){var t=new Emt;Imt(t,"input_image"),Imt(t,"norm_rect"),Mmt(t,"classifications");const e=new bmt;Cdt(e,Bbt,this.h);const n=new Nmt;wmt(n,"mediapipe.tasks.vision.image_classifier.ImageClassifierGraph"),vmt(n,"IMAGE:input_image"),vmt(n,"NORM_RECT:norm_rect"),xmt(n,"CLASSIFICATIONS:classifications"),n.o(e),Smt(t,n),this.g.attachProtoListener("classifications",((t,e)=>{this.j=function(t){const e={classifications:Bht(t,Hmt,1).map((t=>eyt(jht(t,Rmt,4)?.g()??[],Zht(t,2)??0,Qht(t,3)??"")))};return null!=Pft(wht(t,2))&&(e.timestampMs=Pft(wht(t,2))??0),e}(Zmt(t)),kyt(this,e)})),this.g.attachEmptyPacketListener("classifications",(t=>{kyt(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),true)}};Bgt.prototype.classifyForVideo=Bgt.prototype.ra,Bgt.prototype.classify=Bgt.prototype.qa,Bgt.prototype.setOptions=Bgt.prototype.o,Bgt.createFromModelPath=function(t,e){return ugt(Bgt,t,{baseOptions:{modelAssetPath:e}})},Bgt.createFromModelBuffer=function(t,e){return ugt(Bgt,t,{baseOptions:{modelAssetBuffer:e}})},Bgt.createFromOptions=function(t,e){return ugt(Bgt,t,e)};var Wgt=class extends pgt{constructor(t,e){super(new cgt(t,e),"image_in","norm_rect",true),this.h=new Wbt,this.embeddings={embeddings:[]},Wht(t=this.h,0,1,e=new abt)}get baseOptions(){return jht(this.h,abt,1)}set baseOptions(t){Wht(this.h,0,1,t)}o(t){var e=this.h,n=jht(this.h,nbt,2);return n=n?n.clone():new nbt,void 0!==t.l2Normalize?qht(n,1,t.l2Normalize):"l2Normalize"in t&&xht(n,1),void 0!==t.quantize?qht(n,2,t.quantize):"quantize"in t&&xht(n,2),Wht(e,0,2,n),this.l(t)}xa(t,e){return fgt(this,t,e),this.embeddings}ya(t,e,n){return hgt(this,t,n,e),this.embeddings}m(){var t=new Emt;Imt(t,"image_in"),Imt(t,"norm_rect"),Mmt(t,"embeddings_out");const e=new bmt;Cdt(e,Gbt,this.h);const n=new Nmt;wmt(n,"mediapipe.tasks.vision.image_embedder.ImageEmbedderGraph"),vmt(n,"IMAGE:image_in"),vmt(n,"NORM_RECT:norm_rect"),xmt(n,"EMBEDDINGS:embeddings_out"),n.o(e),Smt(t,n),this.g.attachProtoListener("embeddings_out",((t,e)=>{t=Kmt(t),this.embeddings=function(t){return{embeddings:Bht(t,qmt,1).map((t=>{const e={headIndex:Zht(t,3)??0??-1,headName:Qht(t,4)??""??""};if(void 0!==zht(t,Qmt,Rht(t,1)))t=Sht(t=jht(t,Qmt,Rht(t,1)),1,Ift,$ht()),e.floatEmbedding=t.slice();else{const n=new Uint8Array(0);e.quantizedEmbedding=jht(t,Xmt,Rht(t,2))?.ma()?.h()??n}return e})),timestampMs:Pft(wht(t,2))??0}}(t),kyt(this,e)})),this.g.attachEmptyPacketListener("embeddings_out",(t=>{kyt(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),true)}};Wgt.cosineSimilarity=function(t,e){if(t.floatEmbedding&&e.floatEmbedding)t=oyt(t.floatEmbedding,e.floatEmbedding);else{if(!t.quantizedEmbedding||!e.quantizedEmbedding)throw Error("Cannot compute cosine similarity between quantized and float embeddings.");t=oyt(iyt(t.quantizedEmbedding),iyt(e.quantizedEmbedding))}return t},Wgt.prototype.embedForVideo=Wgt.prototype.ya,Wgt.prototype.embed=Wgt.prototype.xa,Wgt.prototype.setOptions=Wgt.prototype.o,Wgt.createFromModelPath=function(t,e){return ugt(Wgt,t,{baseOptions:{modelAssetPath:e}})},Wgt.createFromModelBuffer=function(t,e){return ugt(Wgt,t,{baseOptions:{modelAssetBuffer:e}})},Wgt.createFromOptions=function(t,e){return ugt(Wgt,t,e)};var Ggt=class{constructor(t,e,n){this.confidenceMasks=t,this.categoryMask=e,this.qualityScores=n}close(){this.confidenceMasks?.forEach((t=>{t.close()})),this.categoryMask?.close()}};function Vgt(t){t.categoryMask=void 0,t.confidenceMasks=void 0,t.qualityScores=void 0}function Ugt(t){try{const e=new Ggt(t.confidenceMasks,t.categoryMask,t.qualityScores);if(!t.j)return e;t.j(e)}finally{Syt(t)}}Ggt.prototype.close=Ggt.prototype.close;var Ygt=class extends pgt{constructor(t,e){super(new cgt(t,e),"image_in","norm_rect",false),this.s=[],this.outputCategoryMask=false,this.outputConfidenceMasks=true,this.h=new Zbt,this.v=new Vbt,Wht(this.h,0,3,this.v),Wht(t=this.h,0,1,e=new abt)}get baseOptions(){return jht(this.h,abt,1)}set baseOptions(t){Wht(this.h,0,1,t)}o(t){return void 0!==t.displayNamesLocale?xht(this.h,2,Gft(t.displayNamesLocale)):"displayNamesLocale"in t&&xht(this.h,2),"outputCategoryMask"in t&&(this.outputCategoryMask=t.outputCategoryMask??false),"outputConfidenceMasks"in t&&(this.outputConfidenceMasks=t.outputConfidenceMasks??true),super.l(t)}J(){!function(t){const e=Bht(t.ca(),Nmt,1).filter((t=>(Qht(t,1)??"").includes("mediapipe.tasks.TensorsToSegmentationCalculator")));if(t.s=[],e.length>1)throw Error("The graph has more than one mediapipe.tasks.TensorsToSegmentationCalculator.");1===e.length&&(jht(e[0],bmt,7)?.l()?.g()??new Map).forEach(((e,n)=>{t.s[Number(n)]=Qht(e,1)??""}))}(this)}segment(t,e,n){const s="function"!=typeof e?e:{};return this.j="function"==typeof e?e:n,Vgt(this),fgt(this,t,s),Ugt(this)}Ia(t,e,n,s){const r="function"!=typeof n?n:{};return this.j="function"==typeof n?n:s,Vgt(this),hgt(this,t,r,e),Ugt(this)}Ba(){return this.s}m(){var t=new Emt;Imt(t,"image_in"),Imt(t,"norm_rect");const e=new bmt;Cdt(e,Qbt,this.h);const n=new Nmt;wmt(n,"mediapipe.tasks.vision.image_segmenter.ImageSegmenterGraph"),vmt(n,"IMAGE:image_in"),vmt(n,"NORM_RECT:norm_rect"),n.o(e),Smt(t,n),Cyt(this,t),this.outputConfidenceMasks&&(Mmt(t,"confidence_masks"),xmt(n,"CONFIDENCE_MASKS:confidence_masks"),$yt(this,"confidence_masks"),this.g.ba("confidence_masks",((t,e)=>{this.confidenceMasks=t.map((t=>dgt(this,t,true,!this.j))),kyt(this,e)})),this.g.attachEmptyPacketListener("confidence_masks",(t=>{this.confidenceMasks=[],kyt(this,t)}))),this.outputCategoryMask&&(Mmt(t,"category_mask"),xmt(n,"CATEGORY_MASK:category_mask"),$yt(this,"category_mask"),this.g.V("category_mask",((t,e)=>{this.categoryMask=dgt(this,t,false,!this.j),kyt(this,e)})),this.g.attachEmptyPacketListener("category_mask",(t=>{this.categoryMask=void 0,kyt(this,t)}))),Mmt(t,"quality_scores"),xmt(n,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",((t,e)=>{this.qualityScores=t,kyt(this,e)})),this.g.attachEmptyPacketListener("quality_scores",(t=>{this.categoryMask=void 0,kyt(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),true)}};Ygt.prototype.getLabels=Ygt.prototype.Ba,Ygt.prototype.segmentForVideo=Ygt.prototype.Ia,Ygt.prototype.segment=Ygt.prototype.segment,Ygt.prototype.setOptions=Ygt.prototype.o,Ygt.createFromModelPath=function(t,e){return ugt(Ygt,t,{baseOptions:{modelAssetPath:e}})},Ygt.createFromModelBuffer=function(t,e){return ugt(Ygt,t,{baseOptions:{modelAssetBuffer:e}})},Ygt.createFromOptions=function(t,e){return ugt(Ygt,t,e)};var Hgt=class{constructor(t,e,n){this.confidenceMasks=t,this.categoryMask=e,this.qualityScores=n}close(){this.confidenceMasks?.forEach((t=>{t.close()})),this.categoryMask?.close()}};Hgt.prototype.close=Hgt.prototype.close;var Zgt=class extends $dt{constructor(t){super(t)}},Qgt=[0,jpt,-2],Xgt=[0,Dpt,-3,Wpt,Dpt,-1],qgt=[0,Xgt],Jgt=[0,Xgt,jpt,-1],Kgt=class extends $dt{constructor(t){super(t)}},twt=[0,Dpt,-1,Wpt],ewt=class extends $dt{constructor(t){super(t)}},nwt=class extends $dt{constructor(t){super(t)}},swt=[1,2,3,4,5,6,7,8,9,10,14,15],rwt=class extends $dt{constructor(t){super(t)}};rwt.prototype.g=nmt([0,Hpt,[0,swt,Zpt,Xgt,Zpt,[0,Xgt,Qgt],Zpt,qgt,Zpt,[0,qgt,Qgt],Zpt,twt,Zpt,[0,Dpt,-3,Wpt,Jpt],Zpt,[0,Dpt,-3,Wpt],Zpt,[0,Ypt,Dpt,-2,Wpt,jpt,Wpt,-1,2,Dpt,Qgt],Zpt,Jgt,Zpt,[0,Jgt,Qgt],Dpt,Qgt,Ypt,Zpt,[0,Dpt,-3,Wpt,Qgt,-1],Zpt,[0,Hpt,twt]],Ypt,[0,Ypt,jpt,-1,Wpt]]);var iwt=class extends pgt{constructor(t,e){super(new cgt(t,e),"image_in","norm_rect_in",false),this.outputCategoryMask=false,this.outputConfidenceMasks=true,this.h=new Zbt,this.s=new Vbt,Wht(this.h,0,3,this.s),Wht(t=this.h,0,1,e=new abt)}get baseOptions(){return jht(this.h,abt,1)}set baseOptions(t){Wht(this.h,0,1,t)}o(t){return"outputCategoryMask"in t&&(this.outputCategoryMask=t.outputCategoryMask??false),"outputConfidenceMasks"in t&&(this.outputConfidenceMasks=t.outputConfidenceMasks??true),super.l(t)}segment(t,e,n,s){const r="function"!=typeof n?n:{};this.j="function"==typeof n?n:s,this.qualityScores=this.categoryMask=this.confidenceMasks=void 0,n=this.B+1,s=new rwt;const i=new nwt;var o=new Zgt;if(Jht(o,1,255),Wht(i,0,12,o),e.keypoint&&e.scribble)throw Error("Cannot provide both keypoint and scribble.");if(e.keypoint){var a=new Kgt;qht(a,3,true),Kht(a,1,e.keypoint.x),Kht(a,2,e.keypoint.y),Ght(i,5,swt,a)}else{if(!e.scribble)throw Error("Must provide either a keypoint or a scribble.");for(a of(o=new ewt,e.scribble))qht(e=new Kgt,3,true),Kht(e,1,a.x),Kht(e,2,a.y),Hht(o,1,Kgt,e);Ght(i,15,swt,o)}Hht(s,1,nwt,i),this.g.addProtoToStream(s.g(),"drishti.RenderData","roi_in",n),fgt(this,t,r);t:{try{const t=new Hgt(this.confidenceMasks,this.categoryMask,this.qualityScores);if(!this.j){var c=t;break t}this.j(t)}finally{Syt(this)}c=void 0}return c}m(){var t=new Emt;Imt(t,"image_in"),Imt(t,"roi_in"),Imt(t,"norm_rect_in");const e=new bmt;Cdt(e,Qbt,this.h);const n=new Nmt;wmt(n,"mediapipe.tasks.vision.interactive_segmenter.InteractiveSegmenterGraph"),vmt(n,"IMAGE:image_in"),vmt(n,"ROI:roi_in"),vmt(n,"NORM_RECT:norm_rect_in"),n.o(e),Smt(t,n),Cyt(this,t),this.outputConfidenceMasks&&(Mmt(t,"confidence_masks"),xmt(n,"CONFIDENCE_MASKS:confidence_masks"),$yt(this,"confidence_masks"),this.g.ba("confidence_masks",((t,e)=>{this.confidenceMasks=t.map((t=>dgt(this,t,true,!this.j))),kyt(this,e)})),this.g.attachEmptyPacketListener("confidence_masks",(t=>{this.confidenceMasks=[],kyt(this,t)}))),this.outputCategoryMask&&(Mmt(t,"category_mask"),xmt(n,"CATEGORY_MASK:category_mask"),$yt(this,"category_mask"),this.g.V("category_mask",((t,e)=>{this.categoryMask=dgt(this,t,false,!this.j),kyt(this,e)})),this.g.attachEmptyPacketListener("category_mask",(t=>{this.categoryMask=void 0,kyt(this,t)}))),Mmt(t,"quality_scores"),xmt(n,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",((t,e)=>{this.qualityScores=t,kyt(this,e)})),this.g.attachEmptyPacketListener("quality_scores",(t=>{this.categoryMask=void 0,kyt(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),true)}};iwt.prototype.segment=iwt.prototype.segment,iwt.prototype.setOptions=iwt.prototype.o,iwt.createFromModelPath=function(t,e){return ugt(iwt,t,{baseOptions:{modelAssetPath:e}})},iwt.createFromModelBuffer=function(t,e){return ugt(iwt,t,{baseOptions:{modelAssetBuffer:e}})},iwt.createFromOptions=function(t,e){return ugt(iwt,t,e)};var owt=class extends pgt{constructor(t,e){super(new cgt(t,e),"input_frame_gpu","norm_rect",false),this.j={detections:[]},Wht(t=this.h=new Xbt,0,1,e=new abt)}get baseOptions(){return jht(this.h,abt,1)}set baseOptions(t){Wht(this.h,0,1,t)}o(t){return void 0!==t.displayNamesLocale?xht(this.h,2,Gft(t.displayNamesLocale)):"displayNamesLocale"in t&&xht(this.h,2),void 0!==t.maxResults?Jht(this.h,3,t.maxResults):"maxResults"in t&&xht(this.h,3),void 0!==t.scoreThreshold?Kht(this.h,4,t.scoreThreshold):"scoreThreshold"in t&&xht(this.h,4),void 0!==t.categoryAllowlist?tdt(this.h,5,t.categoryAllowlist):"categoryAllowlist"in t&&xht(this.h,5),void 0!==t.categoryDenylist?tdt(this.h,6,t.categoryDenylist):"categoryDenylist"in t&&xht(this.h,6),this.l(t)}D(t,e){return this.j={detections:[]},fgt(this,t,e),this.j}F(t,e,n){return this.j={detections:[]},hgt(this,t,n,e),this.j}m(){var t=new Emt;Imt(t,"input_frame_gpu"),Imt(t,"norm_rect"),Mmt(t,"detections");const e=new bmt;Cdt(e,qbt,this.h);const n=new Nmt;wmt(n,"mediapipe.tasks.vision.ObjectDetectorGraph"),vmt(n,"IMAGE:input_frame_gpu"),vmt(n,"NORM_RECT:norm_rect"),xmt(n,"DETECTIONS:detections"),n.o(e),Smt(t,n),this.g.attachProtoVectorListener("detections",((t,e)=>{for(const e of t)t=jmt(e),this.j.detections.push(nyt(t));kyt(this,e)})),this.g.attachEmptyPacketListener("detections",(t=>{kyt(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),true)}};owt.prototype.detectForVideo=owt.prototype.F,owt.prototype.detect=owt.prototype.D,owt.prototype.setOptions=owt.prototype.o,owt.createFromModelPath=async function(t,e){return ugt(owt,t,{baseOptions:{modelAssetPath:e}})},owt.createFromModelBuffer=function(t,e){return ugt(owt,t,{baseOptions:{modelAssetBuffer:e}})},owt.createFromOptions=function(t,e){return ugt(owt,t,e)};var awt=class{constructor(t,e,n){this.landmarks=t,this.worldLandmarks=e,this.segmentationMasks=n}close(){this.segmentationMasks?.forEach((t=>{t.close()}))}};function cwt(t){t.landmarks=[],t.worldLandmarks=[],t.segmentationMasks=void 0}function uwt(t){try{const e=new awt(t.landmarks,t.worldLandmarks,t.segmentationMasks);if(!t.s)return e;t.s(e)}finally{Syt(t)}}awt.prototype.close=awt.prototype.close;var lwt=class extends pgt{constructor(t,e){super(new cgt(t,e),"image_in","norm_rect",false),this.landmarks=[],this.worldLandmarks=[],this.outputSegmentationMasks=false,Wht(t=this.h=new Jbt,0,1,e=new abt),this.v=new _bt,Wht(this.h,0,3,this.v),this.j=new Lbt,Wht(this.h,0,2,this.j),Jht(this.j,4,1),Kht(this.j,2,.5),Kht(this.v,2,.5),Kht(this.h,4,.5)}get baseOptions(){return jht(this.h,abt,1)}set baseOptions(t){Wht(this.h,0,1,t)}o(t){return"numPoses"in t&&Jht(this.j,4,t.numPoses??1),"minPoseDetectionConfidence"in t&&Kht(this.j,2,t.minPoseDetectionConfidence??.5),"minTrackingConfidence"in t&&Kht(this.h,4,t.minTrackingConfidence??.5),"minPosePresenceConfidence"in t&&Kht(this.v,2,t.minPosePresenceConfidence??.5),"outputSegmentationMasks"in t&&(this.outputSegmentationMasks=t.outputSegmentationMasks??false),this.l(t)}D(t,e,n){const s="function"!=typeof e?e:{};return this.s="function"==typeof e?e:n,cwt(this),fgt(this,t,s),uwt(this)}F(t,e,n,s){const r="function"!=typeof n?n:{};return this.s="function"==typeof n?n:s,cwt(this),hgt(this,t,r,e),uwt(this)}m(){var t=new Emt;Imt(t,"image_in"),Imt(t,"norm_rect"),Mmt(t,"normalized_landmarks"),Mmt(t,"world_landmarks"),Mmt(t,"segmentation_masks");const e=new bmt;Cdt(e,Kbt,this.h);const n=new Nmt;wmt(n,"mediapipe.tasks.vision.pose_landmarker.PoseLandmarkerGraph"),vmt(n,"IMAGE:image_in"),vmt(n,"NORM_RECT:norm_rect"),xmt(n,"NORM_LANDMARKS:normalized_landmarks"),xmt(n,"WORLD_LANDMARKS:world_landmarks"),n.o(e),Smt(t,n),Cyt(this,t),this.g.attachProtoVectorListener("normalized_landmarks",((t,e)=>{this.landmarks=[];for(const e of t)t=Gmt(e),this.landmarks.push(syt(t));kyt(this,e)})),this.g.attachEmptyPacketListener("normalized_landmarks",(t=>{this.landmarks=[],kyt(this,t)})),this.g.attachProtoVectorListener("world_landmarks",((t,e)=>{this.worldLandmarks=[];for(const e of t)t=Bmt(e),this.worldLandmarks.push(ryt(t));kyt(this,e)})),this.g.attachEmptyPacketListener("world_landmarks",(t=>{this.worldLandmarks=[],kyt(this,t)})),this.outputSegmentationMasks&&(xmt(n,"SEGMENTATION_MASK:segmentation_masks"),$yt(this,"segmentation_masks"),this.g.ba("segmentation_masks",((t,e)=>{this.segmentationMasks=t.map((t=>dgt(this,t,true,!this.s))),kyt(this,e)})),this.g.attachEmptyPacketListener("segmentation_masks",(t=>{this.segmentationMasks=[],kyt(this,t)}))),t=t.g(),this.setGraph(new Uint8Array(t),true)}};lwt.prototype.detectForVideo=lwt.prototype.F,lwt.prototype.detect=lwt.prototype.D,lwt.prototype.setOptions=lwt.prototype.o,lwt.createFromModelPath=function(t,e){return ugt(lwt,t,{baseOptions:{modelAssetPath:e}})},lwt.createFromModelBuffer=function(t,e){return ugt(lwt,t,{baseOptions:{modelAssetBuffer:e}})},lwt.createFromOptions=function(t,e){return ugt(lwt,t,e)},lwt.POSE_CONNECTIONS=_gt;const fwt=".camera{color:white;display:flex;align-items:center;justify-content:center;position:relative}.cameraCanvas,.cameraCanvasSelfie,.cameraCanvasSelfieDesk{z-index:3;max-width:100%;max-height:100%;border-radius:10px}.cameraVideo,.cameraVideoSelfie,.cameraVideoSelfieDesk{z-index:2;position:absolute;max-width:100%;max-height:100%;border-radius:10px}.cameraVideoSelfie,.cameraVideoSelfieDesk{transform:scale(-1, 1);-webkit-transform:scale(-1, 1)}:host{display:block;font-family:sans-serif;text-align:center}.video-container{position:relative;width:100%;max-width:640px;margin:0 auto}#webcam{width:100%;height:auto;transform:scaleX(-1);}#outputCanvas{position:absolute;top:0;left:0;width:100%;height:100%;transform:scaleX(-1);}img{max-width:100%;margin-top:20px;border:1px solid #ddd}";var hwt;(function(t){t["JPEG"]="image/jpeg";t["PNG"]="image/png"})(hwt||(hwt={}));const dwt=class{constructor(n){t(this,n);this.eventRecordingIdReady=e(this,"recordingIdCapture");this.eventPhotoCapture=e(this,"photoSelfieCapture");this.apiErrorEvent=e(this,"apiError");this.eventTimeElapsed=e(this,"timeElapsed");this.mediaStream=null;this.mediaRecorder=null;this.isRecording=false;this.recordedChunks=[];this.capturedImage=null;this.faceDetector=null;this.hasFace=false;this.isDetecting=false;this.modelPath="https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@latest/wasm";this.minDetectionConfidence=.5;this.startDetection=()=>{if(this.faceDetector&&this.videoElement&&!this.isDetecting){this.isDetecting=true;this.detectFacesInRealTime()}};this.stopDetection=()=>{this.isDetecting=false};this.detectFacesInRealTime=async()=>{if(!this.isDetecting||!this.faceDetector||!this.videoElement||this.videoElement.paused||this.videoElement.ended){return}this.canvasElement.width=this.videoElement.videoWidth;this.canvasElement.height=this.videoElement.videoHeight;let t=performance.now();const e=this.faceDetector.detectForVideo(this.videoElement,t);this.drawResults(e.detections);if(e.detections&&e.detections.length>0){this.hasFace=true;this.captureImage()}else{this.hasFace=false}requestAnimationFrame(this.detectFacesInRealTime)};this.startRecording=()=>{if(this.mediaStream&&this.videoElement){this.recordedChunks=[];var t={mimeType:m.webmMimeType.mime,videoBitsPerSecond:13e5};if(!MediaRecorder.isTypeSupported(t.mimeType)){if(o.device.mobileOS==g.iOS||o.device.browser==x.Safari)t.mimeType=m.mp4MimeType.mime}this.mediaRecorder=new MediaRecorder(this.mediaStream,{mimeType:"video/webm"});this.mediaRecorder.ondataavailable=({data:t})=>{if(t.size>0){this.recordedChunks=[...this.recordedChunks,t]}};this.mediaRecorder.onstop=()=>{if(this.recordedChunks.length>0){var e=new Blob(this.recordedChunks,{type:t.mimeType.split(";")[0]});this.eventRecordingIdReady.emit(e)}};this.mediaRecorder.start();this.isRecording=true;console.log("Recording started...")}};this.stopRecording=()=>{if(this.mediaRecorder&&this.mediaRecorder.state==="recording"){this.mediaRecorder.stop();this.isRecording=false;console.log("Recording stopped.")}};this.captureImage=()=>{if(this.hasFace&&this.canvasElement){const t=this.videoElement;const e=this.canvasElement;const n=e.getContext("2d");e.width=t.videoWidth;e.height=t.videoHeight;n.drawImage(t,0,0,e.width,e.height);e.toBlob((t=>{if(t&&t.type===hwt.JPEG&&!o.device.isAppleDevice){try{if(o.debug)console.log("stream | getFrame | addExifInImg");N(t,this.mediaStream.getTracks()[0],{width:this.videoElement.videoWidth,height:this.videoElement.videoHeight}).then((t=>{this.eventPhotoCapture.emit(t)}))}catch(e){this.eventTimeElapsed.emit();this.eventPhotoCapture.emit(t)}}else{if(o.debug)console.log("stream | getFrame | resolve");this.eventPhotoCapture.emit(t)}}),hwt.PNG,1);this.stopRecording();console.log("Image captured!")}else{console.log("No face detected or canvas not ready. Cannot capture image.")}}}infoTimeElapsed(){this.titleMesage=this.translations.SelfieCaptureValues.TitleMore;this.titleStyle+=" pulsate"}async componentWillLoad(){this.translations=await b.getValues();if(!navigator.mediaDevices){this.apiErrorEvent.emit({message:"This browser does not support webRTC"})}this.titleStyle="text-center px-1 mb-2";await this.setupMediaPipe()}async componentDidLoad(){if(o.flowStatus==a.LIVENESS){this.titleMesage=this.translations.SelfieCaptureValues.Title}if(!this.videoElement||!this.canvasElement||!this.canvasCtx){console.error("Canvas or video element not found.");return}await this.startWebcam()}async startWebcam(){try{const t=m.GetConstraints("",o.device,true);if(o.device.isAppleDevice){navigator.audioSession.type="play-and-record"}const e=await navigator.mediaDevices.getUserMedia(t);this.videoElement.srcObject=e;this.videoElement.addEventListener("loadeddata",(()=>{this.videoElement.play();this.startDetection();this.startRecording()}))}catch(t){console.error("Error accessing webcam:",t);alert("Could not access webcam. Please ensure you have a camera and grant permissions.")}}async setupMediaPipe(){try{const t=await fyt.forVisionTasks(this.modelPath);this.faceDetector=await mgt.createFromOptions(t,{baseOptions:{modelAssetPath:"https://storage.googleapis.com/mediapipe-models/face_detector/blaze_face_short_range/float16/1/blaze_face_short_range.tflite"},runningMode:"VIDEO",minDetectionConfidence:this.minDetectionConfidence});console.log("MediaPipe Face Detector loaded.")}catch(t){console.error("Error loading MediaPipe Face Detector:",t)}}disconnectedCallback(){if(this.mediaRecorder){this.mediaRecorder.stop();this.mediaRecorder=null}if(this.mediaStream){this.mediaStream.getTracks().forEach((t=>t.stop()));this.mediaStream=null}if(this.videoElement){this.videoElement.srcObject=null}}drawResults(t){this.canvasCtx.save();this.canvasCtx.clearRect(0,0,this.canvasElement.width,this.canvasElement.height);this.canvasCtx.drawImage(this.videoElement,0,0,this.canvasElement.width,this.canvasElement.height);for(const e of t){const t=e.boundingBox;this.canvasCtx.strokeStyle="red";this.canvasCtx.lineWidth=2;this.canvasCtx.strokeRect(t.originX,t.originY,t.width,t.height);if(e.keypoints){for(const t of e.keypoints){this.canvasCtx.beginPath();this.canvasCtx.arc(t.x,t.y,5,0,2*Math.PI);this.canvasCtx.fillStyle="blue";this.canvasCtx.fill()}}}this.canvasCtx.restore()}render(){let t;if(o.device.isMobile&&this.videoStarted){if(o.debug)console.log(this.captureWidth,this.captureHeight);t={width:this.captureWidth+"px",height:this.captureHeight+"px",overflow:"hidden",borderRadius:"10px","text-align":"center",margin:"auto"}}return n("div",{key:"2634f5b4ec75c31dafe88f31e02c78d2acf08d5b",class:"container flex center"},n("div",{key:"571cbfc2bb8d521327bcb4eca1fa0178663c65f9",class:"px-2 w-100"},n("h1",{key:"ac81bc49b503f72406bd4d01a4f6a9a75ac99f9c",class:this.titleStyle,innerHTML:this.titleMesage}),n("div",{key:"d024615d47d124c94c551b11b2e0a87de28c5390",style:t},n("div",{key:"2f15539e0e1dc71554cf32e0ac6663a7d4d4645a",class:"bg-black w-100 h-100 rounded"},n("div",{key:"a58987ce39905e9d6b248aa2169bfbbc0367d859",class:"camera rounded"},n("video",{key:"bf264224feb0ebbdc319a7535b50062fff49ec69",id:"video",loop:true,autoplay:true,playsinline:true,muted:true,class:"cameraVideoSelfie",ref:t=>this.videoElement=t}),n("canvas",{key:"015e5c7d1ee741ed78f24012a89d8533515b43ff",id:"output",class:"cameraCanvasSelfie",ref:t=>this.canvasElement=t})))),n("div",{key:"0916a7e0584ad2f2509d8e8dab7d25437f4eaed1",class:"footer text-center"},n("img",{key:"ea23dd18279534c4710e718a97d9d71b2345ae60",src:y}))))}get component(){return s(this)}};dwt.style=fwt;const pwt="";const mwt=class{constructor(n){t(this,n);this.apiErrorEvent=e(this,"apiError");this.canSend=false;this.sending=false;this.hasError=false}async doAction(){if(this.sending)return;this.sending=true;this.canSend=false;try{var t=await i.instance.CheckOTPCode(o.requestId,this.code);o.flowStatus=a[t.state];if(o.flowStatus==a.CODEERROR)this.hasError=true;this.sending=false;this.code=""}catch(t){this.apiErrorEvent.emit(t)}}async disconnectedCallback(){await d.finalize(r.OtpCheck)}async componentWillLoad(){if(o.flowStatus==a.CODEERROR)this.hasError=true}async componentWillRender(){this.translations=await b.getValues();this.title=this.translations.CodeValidationValues.Title;this.details=this.translations.CodeValidationValues.Description;this.buttonText=this.translations.CodeValidationValues.Button}async componentDidLoad(){await d.initialize(r.OtpCheck)}handleChangeCode(t){let e=t.target?t.target.value:"";this.code=e;if(this.code.length>4)this.code=this.code.substring(0,4);this.canSend=this.code.length==4;t.target.value=this.code;this.hasError=false}render(){return n("div",{key:"2fe8cff98fd2a0fbcd2a7498e4801769207505dd",class:"container flex center"},n("div",{key:"aabb1a8ad5f18d9f755d8614fe205a4048f04c86",class:"px-1 w-100"},this.hasError?n("div",null,n("div",{class:"mb-1 ml-1 text-center"},n("img",{src:J,style:{width:"60px"}})),n("h1",{class:"text-center color-red px-1 mb-2"},this.translations.CodeValidationValues.Error)):n("div",null,n("div",{class:"mb-1 ml-1 text-center"},n("img",{src:p5,style:{width:"60px"}})),n("h1",{class:"text-center px-1 mb-2"},this.title)),n("p",{key:"9e3e483eff8a731fc45bb158279d8e3cfa5d7477",class:"text-center mb-05"},this.details),n("div",{key:"ce2ea970167a7513dcc9730af260b2126f897e01",class:"mb-2"},n("input",{key:"cf30cfa8e66874589f738157af82cd7dfe3c1453",placeholder:"XXXX",type:"tel",id:"codeInput",class:"main-input",onInput:t=>this.handleChangeCode(t),value:this.code})),n("div",{key:"5fec30a204ea531b65c1ae602f22d045760f7322",class:"button flex mb-1 mx-3"},this.sending?n("div",{class:"img-loader rounded img-loader-button"},n("img",{class:"loading-image loading-image-button",src:z})):null,n("button",{key:"494622f358c4198515c8bde477f31ec89d47a135",id:"action",disabled:!this.canSend,class:"main-button",onClick:()=>this.doAction()},this.buttonText)),n("div",{key:"8adf4d094db9cd0be96a8fe8bb64322650c3c151",class:"footer text-center"},n("img",{key:"dd5591a9dfff0451539156c11d4c59f8ae70c9e1",src:y}))))}};mwt.style=pwt;const bwt="";const ywt=class{constructor(n){t(this,n);this.apiErrorEvent=e(this,"apiError");this.prefilledPhone=false;this.canSend=false;this.sending=false}async doAction(){if(this.sending)return;this.sending=true;try{this.canSend=false;var t=await i.instance.SendOTPCode(o.requestId,this.phoneNumber);if(t.sent===true){await this.setPhoneNumber();o.flowStatus=a[t.state]}}catch(t){this.apiErrorEvent.emit(t)}}async setPhoneNumber(){var t=await c.ectdata.get(o.requestId);t.phoneNumber=this.phoneNumber;await c.ectdata.put(t)}async disconnectedCallback(){await d.finalize(r.OtpSend)}async componentWillRender(){this.translations=await b.getValues();this.buttonText=this.translations.PhoneValidationValues.Button;this.title=this.translations.PhoneValidationValues.Title;this.details=this.translations.PhoneValidationValues.Description;if(o.phoneNumber&&o.phoneNumber!=""){this.phoneNumber=o.phoneNumber;this.prefilledPhone=true;this.canSend=true}}async componentDidLoad(){await d.initialize(r.OtpSend)}handleChangePhone(t){let e=t.target?t.target.value:"";this.phoneNumber=e.replace(/\D/g,"");if(this.phoneNumber.length>10)this.phoneNumber=this.phoneNumber.substring(0,10);this.canSend=this.phoneNumber.length==10;t.target.value=this.phoneNumber}render(){return n("div",{key:"7f46af5c8178ae10afa7fe70e0076b7d0feebf07",class:"container flex center"},n("div",{key:"6a36664ff6af3493d6b14777029769c0177f0baa",class:"px-1"},n("div",{key:"973323a7b7463a3af1db141a4690b9d398f66fd4",class:"mb-1 ml-1 text-center"},n("img",{key:"75e82451cb37da1c2a7e9024179b36fce851fec7",src:p5,style:{width:"60px"}})),n("h1",{key:"133a1dc32fe0d8b305ff3ade31a150f63ddbca38",class:"text-center px-1 mb-2"},this.title),n("p",{key:"257349a5c1b7c0d26865097eafa089dd8e0aa0de",class:"text-center mb-05"},this.details),n("div",{key:"9d359fc605eb53943d7dee1690371b457bfbd3a9",class:"mb-2"},n("input",{key:"422ae164a696d899f91a81b11dc2a499ca429795",placeholder:this.translations.PhoneValidationValues.Label,type:"tel",id:"phoneInput",class:"main-input",disabled:this.prefilledPhone,onInput:t=>this.handleChangePhone(t),value:this.phoneNumber})),n("div",{key:"557c4fe84f7a55f5ee4ccab5673d5f5529b15b1c",class:"button flex mb-1 mx-3"},this.sending?n("div",{class:"img-loader rounded img-loader-button"},n("img",{class:"loading-image loading-image-button",src:z})):null,n("button",{key:"dc642c231cd113034cfb3c5a146e13158521e4a2",id:"action",disabled:!this.canSend,class:"main-button",onClick:()=>this.doAction()},this.buttonText)),n("div",{key:"c7cea421d46d5058329b76e6eb55d4225a03b12f",class:"footer text-center"},n("img",{key:"4484642f6d38c54e8166c7b8841ee8b481746960",src:y}))))}};ywt.style=bwt;const gwt="";const wwt=class{constructor(e){t(this,e)}async componentWillLoad(){o.flowStatus=await i.instance.GetNextFlowState()}render(){return n("div",{key:"78aab7e9727391cb47dbf359d66ed18ae527109a",class:"container"},n("div",{key:"5416c6d69b1de135427829a690088df4dc56e836",class:"row"},n("div",{key:"6b0f8550cb66a0bfc25d01791ae5ebb52661d049",class:"div-ci align-center"},n("img",{key:"b84caa6615b4c8e1d3c08b90a452675974f51fd5",src:z}))))}};wwt.style=gwt;const vwt=class{constructor(e){t(this,e)}async componentWillLoad(){this.translations=await b.getValues()}render(){return n("div",{key:"6d1c61638cb3c71864267f1c3c5aaf6455cea582",class:"container flex center"},n("div",{key:"b0e69e3700e9fa0f9adcf829eaab4d5bb673a695",class:"px-2 w-100"},n("h1",{key:"b310b03e46d27453ec1efd54d5855f732d6df583",class:"text-center px-1 mb-2",innerHTML:this.type=="id"?this.translations.IdCaptureValues.Loading:this.translations.SelfieCaptureValues.Loading}),n("img",{key:"b214023fa0d748905dabb71b3bddd72d827e454c",class:"w-100",src:"https://ekyc.blob.core.windows.net/$web/"+(this.type=="id"?"uploading_id.gif":"uploading_selfie.gif")}),n("div",{key:"32fb07ebddc42c3a572725ac5bad924ce9ac20bb",class:"footer text-center"},n("img",{key:"7ae1e0bc6ee35368eda6429964af5f0300560eec",src:y}))))}};const xwt="";const Nwt=class{constructor(n){t(this,n);this.apiErrorEvent=e(this,"apiError");this.uploading=false;this.recordingResultCount=0;this.recordingRetryCount=0;this.appInsights=C.getInstance()}async componentDidLoad(){}componentWillLoad(){this.appInsights.trackEvent("UserLiveness | init",{requestId:o.requestId});if(this.mode=="selfie"){this.currentStep=r.Selfie;this.flow={fileName:"selfie.png",recName:"selfieVideo.",photoType:Sut.Selfie,recType:Sut.SelfieVideo,imageSize:0,videoSize:0}}else if(this.mode=="selfieGesture"){this.currentStep=r.SelfieTilt;this.flow={fileName:"",recName:"selfieTiltVideo.",photoType:Sut.None,recType:Sut.SelfieGestureVideo,imageSize:0,videoSize:0}}}timeElapsed(){this.errorReason="Timeout";this.showTimeout=true}captureErrorDone(){if(this.showTimeout==true){this.showTimeout=false}if(this.showError==true){this.showError=false}}async captureSelfieImage(t){if(o.flowStatus==a.LIVENESSGESTURE)return;let e=t.detail;if(e.size==0){await i.instance.AddLog({message:"Empty selfie",blobData:e},await M());this.triggerErrorFlow();return}try{var n=new File([e],this.flow.fileName,{type:"image/png"});let t=await T(n);this.flow.imageSize=A(t);this.uploading=true;let s=await i.instance.UploadFileForRequestB64(o.requestId,this.flow.photoType,t);if(s.isValid){o.flowStatus=a[s.state]}else{this.triggerErrorFlow()}this.uploading=false}catch(t){this.apiErrorEvent.emit(t)}}async capturedSelfieRecording(t){let e=t.detail;if(e.size==0&&this.recordingResultCount==0){this.recordingResultCount++;return}this.recordingResultCount=0;if(e.size==0){await i.instance.AddLog({message:"Empty recording",blobData:e},await M());this.triggerErrorFlow();return}let n=e.type==S.mp4MimeType.type?S.mp4MimeType:S.webmMimeType;try{let t=new File([e],this.flow.recName+n.extension,{type:n.type});let s=await T(t);this.flow.videoSize=A(s);let r=await i.instance.UploadFileForRequestB64(o.requestId,this.flow.recType,s);if(r.saved){o.flowStatus=a[r.state]}else{this.triggerErrorFlow()}}catch(t){if(this.recordingRetryCount<3){this.recordingRetryCount++;this.triggerErrorFlow()}else{this.apiErrorEvent.emit(t)}}}async verificationFinished(){if(o.debug)console.log("user-liveness | verificationFinished");this.verificationReceived=Date.now();while(Date.now()-this.verificationReceived<9e4){await I(2e3);if(this.showError||this.showTimeout)return}this.triggerUploadFailedFlow();if(o.debug)console.log("user-liveness | verificationFinished | waitingFinished ")}triggerUploadFailedFlow(){this.errorReason="Upload Failed";this.showError=true}async disconnectedCallback(){await d.finalize(this.currentStep)}triggerErrorFlow(){this.errorReason="Invalid";this.showError=true}render(){let t=n("selfie-auto-capture",null);let e=n("capture-error",{type:"LIVENESS",reason:this.errorReason,error:`image: ${this.flow.imageSize}mb video: ${this.flow.videoSize}mb`});let s=n("uploading-data",{type:"id"});if(this.uploading)return s;if(this.showError||this.showTimeout)return e;return t}};Nwt.style=xwt;export{L as agreement_info,F as agreement_view,G as camera_error,H as capture_error,Q as citizenship_selection,q as end_redirect,tt as error_end,nt as how_to_info,i5 as id_auto_capture,c5 as id_selection,d5 as identification_component,b5 as landing_validation,$ut as mobile_redirect,Mut as process_id,Tut as random_action,dwt as selfie_auto_capture,mwt as sms_code_validation,ywt as sms_send,wwt as state_transition,vwt as uploading_data,Nwt as user_liveness};
|
|
18191
|
-
//# sourceMappingURL=p-
|
|
18191
|
+
//# sourceMappingURL=p-8a4e1369.entry.js.map
|