1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[55],{10055:(e,t,a)=>{var r,i,s,n,o,c,l,E,d,R,u,_,I,m,h,g,N,S,O,D,C,A,p,w,b,k,T,M,L,F,f,v,y,U,K,P,W,G,V,z;let Z,x;a.r(t),a.d(t,{AnonymizationMode:()=>S,AnonymizationSettings:()=>e3,BlinkCardRecognizerSettings:()=>e7,CapturedFrame:()=>eU,CardIssuer:()=>O,CardNumberAnonymizationSettings:()=>e8,CheckResult:()=>g,DetectionStatus:()=>I,DocumentSide:()=>d,ErrorCodes:()=>n,ErrorMessages:()=>o,ImageOrientation:()=>l,LicenseErrorType:()=>u,LicenseTokenState:()=>R,LivenessStatus:()=>h,MatchLevel:()=>N,PreferredCameraType:()=>c,ProcessingStatus:()=>D,RecognizerResultState:()=>E,SDKError:()=>en,SelectedCamera:()=>eT,SerializableSDKError:()=>eo,ServerPermissionSubmitResultStatus:()=>_,VideoRecognitionMode:()=>m,VideoRecognizer:()=>ez,WasmSDKLoadSettings:()=>eZ,WasmType:()=>s,bindCameraToVideoFeed:()=>ef,captureFrame:()=>eK,createBlinkCardRecognizer:()=>te,createRecognizerRunner:()=>e5,createSuccessFrameGrabberRecognizer:()=>e9,detectWasmFeatures:()=>e$,detectWasmType:()=>e0,frameCaptureErrors:()=>eN,getCameraDevices:()=>eM,isAndroidDevice:()=>ew,isBrowserSupported:()=>ev,isIOSDevice:()=>eb,isIOSUserAgent:()=>eJ,isInAppBrowser:()=>ey,isMobileDevice:()=>ek,isSafari:()=>eQ,licenseErrors:()=>eS,loadWasmModule:()=>e6,localSdkErrors:()=>eO,obtainNewServerPermission:()=>eP,sdkErrors:()=>eg,selectCamera:()=>eL,unlockWasmSDK:()=>eW,videoRecognizerErrors:()=>eh,wasmFolder:()=>e1,workerErrors:()=>eD});let H=0;class j{constructor(e){this.action=e,this.messageID=function(){let e=H;return H+=1,e}()}}class B extends j{constructor(e,t){super(B.action),this.wasmModuleName=e.wasmModuleName,this.licenseKey=e.licenseKey,this.userId=t,this.registerLoadCallback=null!==e.loadProgressCallback,this.allowHelloMessage=e.allowHelloMessage,this.engineLocation=e.engineLocation,this.wasmType=e.wasmType,this.wasmFlavor=e.wasmFlavor,this.numberOfWorkers=e.numberOfWorkers}}B.action="init",(C=r||(r={}))[C.Any=0]="Any",C[C.Recognizer=1]="Recognizer",C[C.RecognizerSettings=2]="RecognizerSettings",C[C.Callback=3]="Callback";class q extends j{constructor(e,t){super(q.action),this.className=e,this.params=t}}q.action="createNewNativeObject";class Y extends j{constructor(e,t,a){super(Y.action),this.recognizerHandles=e,this.allowMultipleResults=t,this.registeredMetadataCallbacks=a}}Y.action="createRecognizerRunner";class Q extends j{constructor(e,t){super(Q.action),this.recognizerHandles=e,this.allowMultipleResults=t}}Q.action="reconfigureRecognizerRunner";class J extends j{constructor(){super(J.action)}}J.action="deleteRecognizerRunner";class X extends j{constructor(e,t,a){super(X.action),this.objectHandle=e,this.methodName=t,this.params=a}}X.action="invokeObject";class $ extends j{constructor(e){super($.action),this.frame=e}getTransferrables(){return[this.frame.imageData.data.buffer]}}$.action="processImage";class ee extends j{constructor(e){super(ee.action),this.hardReset=e}}ee.action="resetRecognizers";class et{constructor(){this.onDebugText=!1,this.onDetectionFailed=!1,this.onQuadDetection=!1,this.onPointsDetection=!1,this.onFirstSideResult=!1,this.onGlare=!1}}class ea extends j{constructor(e){super(ea.action),this.registeredMetadataCallbacks=e}}ea.action="registerMetadataCallbacks";class er extends j{constructor(e){super(er.action),this.detectionOnlyMode=e}}er.action="setDetectionOnly";class ei extends j{constructor(e){super(ei.action),this.cameraPreviewMirrored=e}}ei.action="setCameraPreviewMirrored";class es extends j{constructor(e){super(es.action),this.userId=e}}es.action="getProductIntegrationInfo",(A=i||(i={}))[A.onDebugText=0]="onDebugText",A[A.onDetectionFailed=1]="onDetectionFailed",A[A.onQuadDetection=2]="onQuadDetection",A[A.onPointsDetection=3]="onPointsDetection",A[A.onFirstSideResult=4]="onFirstSideResult",A[A.clearTimeoutCallback=5]="clearTimeoutCallback",A[A.onGlare=6]="onGlare",A[A.recognizerCallback=7]="recognizerCallback",(p=s||(s={})).Basic="BASIC",p.Advanced="ADVANCED",p.AdvancedWithThreads="ADVANCED_WITH_THREADS";class en extends Error{constructor(e,t){if(super(),!e.code||!e.message)throw Error("Instance of SDKError is required to have code and message.");
1if(this.message=e.message,this.code=e.code,e instanceof eo&&e.details&&"message"in e.details){const t=Error(e.details.message);"stack"in e.details&&(t.stack=e.details.stack),this.details=t}else this.details=t}}class eo{constructor(e,t){if(!e.code||!e.message)throw Error("Instance of SerializableSDKError is required to have code and message.");this.message=e.message,this.code=e.code,t instanceof Error?this.details=new ec(t):this.details=t}}class ec{constructor(e){this.message=e.message,this.name=e.name,this.stack=e.stack}}function el(e,t){return a=>{a.success?e():"string"==typeof a.error||null===a.error?t(a.error):t(new en(a.error))}}function eE(e,t){return a=>{a.success?e(a):"string"==typeof a.error||null===a.error?t(a.error):t(new en(a.error))}}class ed{constructor(e,t,a){this.wasmSDKWorker=e,this.objectHandle=a,this.recognizerName=t,this.callbacks=new Map}getRemoteObjectHandle(){return this.objectHandle}currentSettings(){return new Promise((e,t)=>{if(this.objectHandle<0)return void t("Invalid object handle: "+this.objectHandle.toString());let a=new X(this.objectHandle,"currentSettings",[]),r=eE(t=>{e(t.result)},t);this.wasmSDKWorker.postMessage(a,r)})}toSignedJSON(){return Promise.resolve(null)}clearAllCallbacks(){this.callbacks.clear(),this.wasmSDKWorker.unregisterRecognizerCallbacks(this.objectHandle)}removeFunctions(e){this.clearAllCallbacks();let t=Object.keys(e),a=!1;for(let i of t){let t=e[i];if("function"==typeof t){this.callbacks.set(i,t);let s={parameter:{recognizerHandle:this.objectHandle,callbackName:i},type:r.Callback};e[i]=s,a=!0}}return a&&this.wasmSDKWorker.registerRecognizerCallbacks(this.objectHandle,this),e}updateSettings(e){return new Promise((t,a)=>{if(this.objectHandle<0)return void a("Invalid object handle: "+this.objectHandle.toString());let i=new X(this.objectHandle,"updateSettings",[{parameter:this.removeFunctions(e),type:r.RecognizerSettings}]),s=el(t,a);this.wasmSDKWorker.postMessage(i,s)})}invokeCallback(e,t){let a=this.callbacks.get(e);void 0!==a?a(...t):console.warn("Cannot find callback",e)}getResult(){return new Promise((e,t)=>{if(this.objectHandle<0)return void t("Invalid object handle: "+this.objectHandle.toString());let a=new X(this.objectHandle,"getResult",[]),r=eE(t=>{e(t.result)},t);this.wasmSDKWorker.postMessage(a,r)})}delete(){return new Promise((e,t)=>{if(this.objectHandle<0)return void t("Invalid object handle: "+this.objectHandle.toString());this.clearAllCallbacks();let a=new X(this.objectHandle,"delete",[]),r=el(()=>{this.objectHandle=-1,e()},t);this.wasmSDKWorker.postMessage(a,r)})}}function eR(e){let t=new et;return t.onDebugText=!!e.onDebugText,t.onDetectionFailed=!!e.onDetectionFailed,t.onPointsDetection=!!e.onPointsDetection,t.onQuadDetection=!!e.onQuadDetection,t.onFirstSideResult=!!e.onFirstSideResult,t}class eu{constructor(e,t){this.deleted=!1,this.wasmSDKWorker=e,this.recognizers=t}processImage(e){return new Promise((t,a)=>{if(this.deleted)return void a("Recognizer runner is deleted. It cannot be used anymore!");let r=new $(e),i=eE(e=>{t(e.recognitionState)},a);this.wasmSDKWorker.postTransferrableMessage(r,i)})}reconfigureRecognizers(e,t){return new Promise((a,r)=>{if(this.deleted)return void r("Recognizer runner is deleted. It cannot be used anymore!");let i=new Q(e_(e),t),s=el(a,r);this.wasmSDKWorker.postMessage(i,s),this.recognizers=e})}setMetadataCallbacks(e){return new Promise((t,a)=>{let r=new ea(eR(e)),i=el(t,a);this.wasmSDKWorker.postMessageAndRegisterCallbacks(r,e,i)})}resetRecognizers(e){return new Promise((t,a)=>{let r=new ee(e),i=el(t,a);this.wasmSDKWorker.postMessage(r,i)})}setDetectionOnlyMode(e){return new Promise((t,a)=>{let r=new er(e),i=el(t,a);this.wasmSDKWorker.postMessage(r,i)})}setCameraPreviewMirrored(e){return new Promise((t,a)=>{let r=new ei(e),i=el(t,a);this.wasmSDKWorker.postMessage(r,i)})}delete(){return this.deleted?Promise.reject("Recognizer runner is already deleted."):new Promise((e,t)=>{let a=new J,r=el(()=>{this.deleted=!0,e()},t);this.wasmSDKWorker.postMessage(a,r)})}}function e_(e){let t=[];for(let a of e)t.push(a.getRemoteObjectHandle());return t}class eI{constructor(e){this.wasmSDKWorker=e}createRecognizerRunner(e,t=!1,a={}){return new Promise((r,i)=>{let s=new Y(e_(e),t,eR(a)),n=el(()=>{r(new eu(this.wasmSDKWorker,e))},i);this.wasmSDKWorker.postMessageAndRegisterCallbacks(s,a,n)})}newRecognizer(e,...t){return new Promise((a,i)=>{let s=new q(e,function(e){let t=[];for(let a of e){let e=r.Any;a instanceof ed&&(e=r.Recognizer,a=a.getRemoteObjectHandle()),t.push({parameter:a,type:e})}return t}(t)),n=eE(t=>{a(new ed(this.wasmSDKWorker,e,t.objectHandle))},i);this.wasmSDKWorker.postMessage(s,n)})}}class em{constructor(e,t,a,r){this.eventHandlers={},this.metadataCallbacks={},this.loadedWasmType=s.Basic,this.mbWasmWorker=e,this.mbWasmWorker.onmessage=e=>{this.handleWorkerEvent(e)},this.mbWasmWorker.onerror=()=>{r("Problem during initialization of worker file!")},this.mbWasmModule=new eI(this),this.loadCallback=t,this.recognizersWithCallbacks=new Map,this.userId=a,this.showOverlay=!1}postMessage(e,t){this.eventHandlers[e.messageID]=t,this.mbWasmWorker.postMessage(e)}postTransferrableMessage(e,t){this.eventHandlers[e.messageID]=t,this.mbWasmWorker.postMessage(e,e.getTransferrables())}postMessageAndRegisterCallbacks(e,t,a){this.eventHandlers[e.messageID]=a,this.metadataCallbacks=t,this.mbWasmWorker.postMessage(e)}registerRecognizerCallbacks(e,t){this.recognizersWithCallbacks.set(e,t)}unregisterRecognizerCallbacks(e){this.recognizersWithCallbacks.delete(e)}delete(){this.mbWasmWorker.terminate()}getProductIntegrationInfo(){return new Promise((e,t)=>
1{let a=new es(this.userId),r=eE(t=>{e(t.result)},t);this.postMessage(a,r)})}handleWorkerEvent(e){if("isCallbackMessage"in e.data){let t=e.data;switch(t.callbackType){case i.onDebugText:"function"==typeof this.metadataCallbacks.onDebugText&&this.metadataCallbacks.onDebugText(t.callbackParameters[0]);break;case i.onDetectionFailed:"function"==typeof this.metadataCallbacks.onDetectionFailed&&this.metadataCallbacks.onDetectionFailed();break;case i.onPointsDetection:"function"==typeof this.metadataCallbacks.onPointsDetection&&this.metadataCallbacks.onPointsDetection(t.callbackParameters[0]);break;case i.onQuadDetection:"function"==typeof this.metadataCallbacks.onQuadDetection&&this.metadataCallbacks.onQuadDetection(t.callbackParameters[0]);break;case i.onFirstSideResult:"function"==typeof this.metadataCallbacks.onFirstSideResult&&this.metadataCallbacks.onFirstSideResult();break;case i.recognizerCallback:{let e=t.callbackParameters.shift(),a=this.recognizersWithCallbacks.get(e.recognizerHandle);void 0!==a?a.invokeCallback(e.callbackName,t.callbackParameters):console.warn("Cannot find recognizer to deliver callback message. Maybe it's destroyed?",e);break}default:throw Error(`Unknown callback type: ${i[t.callbackType]}`)}}else if("isLoadProgressMessage"in e.data){let t=e.data;"function"==typeof this.loadCallback&&this.loadCallback(t.progress)}else{let t=e.data,a=this.eventHandlers[t.messageID];delete this.eventHandlers[t.messageID],a(t)}}static async createWasmWorker(e,t,a){return new Promise((r,i)=>{let s=new em(e,t.loadProgressCallback,a,i),n=new B(t,a),o=eE(e=>{s.showOverlay=e.showOverlay,s.loadedWasmType=e.wasmType,r(s)},e=>{s&&"function"==typeof s.delete&&s.delete(),i(e)});s.postMessage(n,o)})}}(w=n||(n={})).WORKER_WASM_LOAD_FAILURE="WORKER_WASM_LOAD_FAILURE",w.WORKER_WASM_INIT_MISSING="WORKER_WASM_INIT_MISSING",w.WORKER_FUNCTION_INVOKE_FAILURE="WORKER_FUNCTION_INVOKE_FAILURE",w.WORKER_RECOGNIZER_CREATION_FAILURE="WORKER_RECOGNIZER_CREATION_FAILURE",w.WORKER_RUNNER_EXISTS="WORKER_RUNNER_EXISTS",w.WORKER_RUNNER_CREATION_FAILURE="WORKER_RUNNER_CREATION_FAILURE",w.WORKER_RUNNER_MISSING="WORKER_RUNNER_MISSING",w.WORKER_RUNNER_RECONFIGURE_FAILURE="WORKER_RUNNER_RECONFIGURE_FAILURE",w.WORKER_RUNNER_DELETED="WORKER_RUNNER_DELETED",w.WORKER_RUNNER_DELETE_FAILURE="WORKER_RUNNER_DELETE_FAILURE",w.WORKER_OBJECT_INVOKE_FAILURE="WORKER_OBJECT_INVOKE_FAILURE",w.WORKER_IMAGE_PROCESS_FAILURE="WORKER_IMAGE_PROCESS_FAILURE",w.WORKER_HANDLE_UNDEFINED="WORKER_HANDLE_UNDEFINED",w.WORKER_MESSAGE_ACTION_UNKNOWN="WORKER_MESSAGE_ACTION_UNKNOWN",w.WORKER_LICENSE_UNLOCK_ERROR="WORKER_LICENSE_UNLOCK_ERROR",w.WORKER_INTEGRATION_INFO_FAILURE="WORKER_INTEGRATION_INFO_FAILURE",w.LOCAL_SDK_RUNNER_MISSING="LOCAL_SDK_RUNNER_MISSING",w.LOCAL_SDK_RUNNER_EMPTY="LOCAL_SDK_RUNNER_EMPTY",w.LICENSE_UNLOCK_ERROR="LICENSE_UNLOCK_ERROR",w.FRAME_CAPTURE_SVG_UNSUPPORTED="FRAME_CAPTURE_SVG_UNSUPPORTED",w.FRAME_CAPTURE_CANVAS_MISSING="FRAME_CAPTURE_CANVAS_MISSING",w.SDK_WASM_SETTINGS_MISSING="SDK_WASM_SETTINGS_MISSING",w.SDK_LICENSE_KEY_MISSING="SDK_LICENSE_KEY_MISSING",w.SDK_WASM_MODULE_NAME_MISSING="SDK_WASM_MODULE_NAME_MISSING",w.SDK_ENGINE_LOCATION_INVALID="SDK_ENGINE_LOCATION_INVALID",w.SDK_WORKER_LOCATION_INVALID="SDK_WORKER_LOCATION_INVALID",w.SDK_MISSING="SDK_MISSING",w.SDK_RECOGNIZERS_MISSING="SDK_RECOGNIZERS_MISSING",w.VIDEO_RECOGNIZER_ELEMENT_MISSING="VIDEO_RECOGNIZER_ELEMENT_MISSING",w.VIDEO_RECOGNIZER_CAMERA_MISSING="VIDEO_RECOGNIZER_CAMERA_MISSING",w.VIDEO_RECOGNIZER_CAMERA_NOT_ALLOWED="VIDEO_RECOGNIZER_CAMERA_NOT_ALLOWED",w.VIDEO_RECOGNIZER_CAMERA_UNAVAILABLE="VIDEO_RECOGNIZER_CAMERA_UNAVAILABLE",w.VIDEO_RECOGNIZER_CAMERA_IN_USE="VIDEO_RECOGNIZER_CAMERA_IN_USE",w.VIDEO_RECOGNIZER_MEDIA_DEVICES_UNSUPPORTED="VIDEO_RECOGNIZER_MEDIA_DEVICES_UNSUPPORTED",w.VIDEO_RECOGNIZER_FEED_RELEASED="VIDEO_RECOGNIZER_FEED_RELEASED",w.VIDEO_RECOGNIZER_FEED_NOT_PAUSED="VIDEO_RECOGNIZER_FEED_NOT_PAUSED",w.VIDEO_RECOGNIZER_PLAY_REQUEST_INTERRUPTED="VIDEO_RECOGNIZER_PLAY_REQUEST_INTERRUPTED",w.VIDEO_RECOGNIZER_FEED_PAUSED="VIDEO_RECOGNIZER_FEED_PAUSED",w.VIDEO_RECOGNIZER_RECOGNIZERS_RESET_FAILURE="VIDEO_RECOGNIZER_RECOGNIZERS_RESET_FAILURE",w.VIDEO_RECOGNIZER_FEED_MISSING="VIDEO_RECOGNIZER_FEED_MISSING",(b=o||(o={}
1)).WORKER_HANDLE_UNDEFINED="Cannot find object with handle: undefined",b.WORKER_WASM_LOAD_FAILURE="Failed to load WASM in web worker!",b.WORKER_WASM_INIT_MISSING="WASM module is not initialized!",b.WORKER_FUNCTION_INVOKE_FAILURE="Failed to invoke function!",b.WORKER_RECOGNIZER_CREATION_FAILURE="Failed to create new recognizer!",b.WORKER_RUNNER_EXISTS="Recognizer runner is already created! Multiple instances are not allowed!",b.WORKER_RUNNER_CREATION_FAILURE="Failed to create new recognizer runner!",b.WORKER_RUNNER_MISSING="Recognizer runner is not created! There is nothing to reconfigure!",b.WORKER_RUNNER_RECONFIGURE_FAILURE="Failed to reconfigure recognizer runner!",b.WORKER_RUNNER_DELETED="Recognizer runner is already deleted!",b.WORKER_RUNNER_DELETE_FAILURE="Failed to delete recognizer runner!",b.WORKER_OBJECT_INVOKE_FAILURE="Failed to invoke object!",b.WORKER_IMAGE_PROCESS_FAILURE="Recognizer runner is not initialized! Cannot process image!",b.WORKER_INTEGRATION_INFO_FAILURE="Failed to get product integration info!",b.LOCAL_SDK_RUNNER_MISSING="Property nativeRecognizerRunner is not available!",b.LOCAL_SDK_RUNNER_EMPTY="Native RecognizerRunner cannot be empty!",b.LICENSE_TOKEN_STATE_INCORRECT="Internal error (Incorrect token state)",b.LICENSE_PAYLOAD_VERIFICATION_FAILED="Failed to verify server permission's digital signature!",b.LICENSE_PAYLOAD_CORRUPTED="Server permission payload is corrupted!",b.LICENSE_PERMISSION_EXPIRED="Internal error (server permission expired)",b.LICENSE_REMOTE_LOCKED="Provided license key has been remotely locked. Please contact support for more information!",b.FRAME_CAPTURE_SVG_UNSUPPORTED="Recognition of SVG elements not supported!",b.FRAME_CAPTURE_CANVAS_MISSING="Could not get canvas 2d context!",b.SDK_WASM_SETTINGS_MISSING="Missing WASM load settings!",b.SDK_LICENSE_KEY_MISSING="Missing license key!",b.SDK_WASM_MODULE_NAME_MISSING="Missing WASM module name!",b.SDK_ENGINE_LOCATION_INVALID="Setting property 'engineLocation' must be a string!",b.SDK_WORKER_LOCATION_INVALID="Setting property 'workerLocation' must be a string!",b.SDK_MISSING="SDK is not provided!",b.SDK_RECOGNIZERS_MISSING="To create RecognizerRunner at least 1 recognizer is required.",b.VIDEO_RECOGNIZER_ELEMENT_MISSING="Video element, i.e. camera feed is not provided!",b.VIDEO_RECOGNIZER_CAMERA_MISSING="Camera not found!",b.VIDEO_RECOGNIZER_CAMERA_NOT_ALLOWED="Camera not allowed!",b.VIDEO_RECOGNIZER_CAMERA_UNAVAILABLE="Camera not available!",b.VIDEO_RECOGNIZER_CAMERA_IN_USE="Camera in use!",b.VIDEO_RECOGNIZER_MEDIA_DEVICES_UNSUPPORTED="Media devices not supported by browser.",b.VIDEO_RECOGNIZER_FEED_RELEASED="The associated video feed has been released!",b.VIDEO_RECOGNIZER_FEED_NOT_PAUSED="The associated video feed is not paused. Use resumeRecognition instead!",b.VIDEO_RECOGNIZER_PLAY_REQUEST_INTERRUPTED="The play() request was interrupted or prevented by browser security rules!",b.VIDEO_RECOGNIZER_FEED_PAUSED="Cannot resume recognition while video feed is paused! Use recognize or startRecognition",b.VIDEO_RECOGNIZER_RECOGNIZERS_RESET_FAILURE="Could not reset recognizers!",b.VIDEO_RECOGNIZER_FEED_MISSING="Missing video feed!";let eh={feedMissing:{message:o.VIDEO_RECOGNIZER_FEED_MISSING,code:n.VIDEO_RECOGNIZER_FEED_MISSING},recognizersResetFailure:{message:o.VIDEO_RECOGNIZER_RECOGNIZERS_RESET_FAILURE,code:n.VIDEO_RECOGNIZER_RECOGNIZERS_RESET_FAILURE},feedPaused:{message:o.VIDEO_RECOGNIZER_FEED_PAUSED,code:n.VIDEO_RECOGNIZER_FEED_PAUSED},playRequestInterrupted:{message:o.VIDEO_RECOGNIZER_PLAY_REQUEST_INTERRUPTED,code:n.VIDEO_RECOGNIZER_PLAY_REQUEST_INTERRUPTED},videoFeedNotPaused:{message:o.VIDEO_RECOGNIZER_FEED_NOT_PAUSED,code:n.VIDEO_RECOGNIZER_FEED_NOT_PAUSED},videoFeedReleased:{message:o.VIDEO_RECOGNIZER_FEED_RELEASED,code:n.VIDEO_RECOGNIZER_FEED_RELEASED},mediaDevicesUnsupported:{code:n.VIDEO_RECOGNIZER_MEDIA_DEVICES_UNSUPPORTED,message:o.VIDEO_RECOGNIZER_MEDIA_DEVICES_UNSUPPORTED},cameraMissing:{code:n.VIDEO_RECOGNIZER_CAMERA_MISSING,message:o.VIDEO_RECOGNIZER_CAMERA_MISSING},cameraNotAllowed:{code:n.VIDEO_RECOGNIZER_CAMERA_NOT_ALLOWED,message:o.VIDEO_RECOGNIZER_CAMERA_NOT_ALLOWED},elementMissing:{message:o.VIDEO_RECOGNIZER_ELEMENT_MISSING,code:n.VIDEO_RECOGNIZER_ELEMENT_MISSING}},eg={wasmSettingsMissing:{message:o.SDK_WASM_SETTINGS_MISSING,code:n.SDK_WASM_SETTINGS_MISSING},licenseKeyMissing:{message:o.SDK_LICENSE_KEY_MISSING,code:n.SDK_LICENSE_KEY_MISSING},wasmModuleNameMissing:{message:o.SDK_WASM_MODULE_NAME_MISSING,code:n.SDK_WASM_MODULE_NAME_MISSING}
1,engineLocationInvalid:{message:o.SDK_ENGINE_LOCATION_INVALID,code:n.SDK_ENGINE_LOCATION_INVALID},workerLocationInvalid:{message:o.SDK_WORKER_LOCATION_INVALID,code:n.SDK_WORKER_LOCATION_INVALID},missing:{message:o.SDK_MISSING,code:n.SDK_MISSING},recognizersMissing:{message:o.SDK_RECOGNIZERS_MISSING,code:n.SDK_RECOGNIZERS_MISSING}},eN={svgUnsupported:{message:o.FRAME_CAPTURE_SVG_UNSUPPORTED,code:n.FRAME_CAPTURE_SVG_UNSUPPORTED},canvasMissing:{message:o.FRAME_CAPTURE_CANVAS_MISSING,code:n.FRAME_CAPTURE_CANVAS_MISSING}},eS={licenseTokenStateIncorrect:{code:n.LICENSE_UNLOCK_ERROR,message:o.LICENSE_TOKEN_STATE_INCORRECT},licensePayloadVerificationFailed:{code:n.LICENSE_UNLOCK_ERROR,message:o.LICENSE_PAYLOAD_VERIFICATION_FAILED},licensePayloadCorrupted:{code:n.LICENSE_UNLOCK_ERROR,message:o.LICENSE_PAYLOAD_CORRUPTED},licensePermissionExpired:{code:n.LICENSE_UNLOCK_ERROR,message:o.LICENSE_PERMISSION_EXPIRED},licenseRemoteLocked:{code:n.LICENSE_UNLOCK_ERROR,message:o.LICENSE_REMOTE_LOCKED},licenseNetworkError:{code:n.LICENSE_UNLOCK_ERROR},licenseInvalid:{code:n.LICENSE_UNLOCK_ERROR}},eO={runnerMissing:{message:o.LOCAL_SDK_RUNNER_MISSING,code:n.LOCAL_SDK_RUNNER_MISSING},runnerEmpty:{message:o.LOCAL_SDK_RUNNER_EMPTY,code:n.LOCAL_SDK_RUNNER_EMPTY}},eD={imageProcessFailure:{message:o.WORKER_IMAGE_PROCESS_FAILURE,code:n.WORKER_IMAGE_PROCESS_FAILURE},objectInvokeFailure:{message:o.WORKER_OBJECT_INVOKE_FAILURE,code:n.WORKER_OBJECT_INVOKE_FAILURE},runnerDeleteFailure:{message:o.WORKER_RUNNER_DELETE_FAILURE,code:n.WORKER_RUNNER_DELETE_FAILURE},runnerDeleted:{message:o.WORKER_RUNNER_DELETED,code:n.WORKER_RUNNER_DELETED},runnerReconfigureFailure:{message:o.WORKER_RUNNER_RECONFIGURE_FAILURE,code:n.WORKER_RUNNER_RECONFIGURE_FAILURE},runnerMissing:{message:o.WORKER_RUNNER_MISSING,code:n.WORKER_RUNNER_MISSING},runnerCreationFailure:{message:o.WORKER_RUNNER_CREATION_FAILURE,code:n.WORKER_RUNNER_CREATION_FAILURE},runnerExists:{message:o.WORKER_RUNNER_EXISTS,code:n.WORKER_RUNNER_EXISTS},recognizerCreationFailure:{message:o.WORKER_RECOGNIZER_CREATION_FAILURE,code:n.WORKER_RECOGNIZER_CREATION_FAILURE},functionInvokeFailure:{message:o.WORKER_FUNCTION_INVOKE_FAILURE,code:n.WORKER_FUNCTION_INVOKE_FAILURE},wasmInitMissing:{message:o.WORKER_WASM_INIT_MISSING,code:n.WORKER_WASM_INIT_MISSING},wasmLoadFailure:{message:o.WORKER_WASM_LOAD_FAILURE,code:n.WORKER_WASM_LOAD_FAILURE},handleUndefined:{message:o.WORKER_HANDLE_UNDEFINED,code:n.WORKER_HANDLE_UNDEFINED},integrationInfoFailure:{message:o.WORKER_INTEGRATION_INFO_FAILURE,code:n.WORKER_INTEGRATION_INFO_FAILURE}};(k=c||(c={}))[k.BackFacingCamera=0]="BackFacingCamera",k[k.FrontFacingCamera=1]="FrontFacingCamera";let eC=["rear","back","r\xfcck","arri\xe8re","trasera","tr\xe1s","traseira","posteriore","posterior","åé¢","å¾é¢","èé¢","åç½®","å¾ç½®","èç½®","задней","Ø§ÙØ®ÙÙÙØ©","í","arka","achterzijde","หลัà¸","baksidan","bagside","sau","bak","tylny","takakamera","belakang","×××ר×ת","ÏίÏÏ","spate","h\xe1ts\xf3","zadn\xed","darrere","zadn\xe1","заднÑ","stražnja","belakang","बà¥à¤"],eA=["CamerÄ dublÄ cu obiectiv superangular spate","×צ××× ×פ××× ×¨××× ×××ר×ת","ÐÑÑÒÑ ÒÐ¾Ñ ÐºÐµÒ£ бұÑÑÑÑÑ ÐºÐ°Ð¼ÐµÑа","C\xe2mara grande angular dupla traseira","ΠίÏÏ Î´Î¹Ïλή εÏ
Ïεία κάμεÏα","å¾ç½®é廣è§é¡é ç¸æ©","Ðадна двойна ÑиÑокоÑгÑлна камеÑа","C\xe0mera dual posterior amb gran angular","Zadn\xe1 du\xe1lna Å¡irokouhl\xe1 kamera","ÙØ§Ù
ÙØ±Ø§ Ø®ÙÙÙØ© Ù
Ø²Ø¯ÙØ¬Ø© Ø¹Ø±ÙØ¶Ø©","ÐаднÑÑ Ð´Ð²Ð¾Ð¹Ð½Ð°Ñ ÑиÑокоÑголÑÐ½Ð°Ñ ÐºÐ°Ð¼ÐµÑа","ÐÐ°Ð´Ð½Ñ Ð·Ð´Ð²Ð¾Ñна ÑиÑококÑÑна камеÑа","C\xe1mara amplia posterior doble","Dwikamera Lebar Belakang","Tylny dwuobiektywowy aparat szerokokÄ
tny","Dubbel vidvinkelkamera p\xe5 baksidan","Back Dual Wide Camera","H\xe1ts\xf3, kettÅs, sz\xe9les l\xe1t\xf3sz\xf6gű kamera","íë©´ ëì¼ ìì´ë ì¹´ë©ë¼","Double cam\xe9ra grand angle arri\xe8re","Fotocamera doppia con grandangolo (posteriore)","Double appareil photo grand angle arri\xe8re","Zadn\xed du\xe1ln\xed Å¡iroko\xfahl\xfd fotoapar\xe1t","\xc7ift GeniÅ Kamera Arka Y\xfcz\xfc","Laajakulmainen kaksoistakakamera","R\xfcckseitige Dual-Weitwinkelkamera","बà¥à¤ डà¥à
1¤¯à¥à¤
ल वाà¤à¤¡ à¤à¥à¤®à¤°à¤¾","åç½®å广è§é头","C\xe2mera Dupla Grande-Angular Traseira","å¾ç½®é廣è§ç¸æ©","à¸à¸¥à¹à¸à¸à¸à¸¹à¹à¸à¹à¸²à¸à¸«à¸¥à¸±à¸à¸¡à¸¸à¸¡à¸à¸§à¹à¸²à¸","Kamera Lebar Belakang Ganda","Dobbelt vidvinkelkamera bak","Camera k\xe9p rá»ng mặt sau","C\xe1mara trasera dual con gran angular","èé¢ãã¥ã¢ã«åºè§ã«ã¡ã©","Stražnja dvostruka Å¡iroka kamera"],ep=["íë©´ ì¹´ë©ë¼","å¾ç½®ç¸æ©","Ðадна камеÑа","å¾ç½®é¡é ","Camera mặt sau","H\xe1toldali kamera","C\xe1mara trasera","Back Camera","Kamera p\xe5 baksidan","ΠίÏÏ ÎºÎ¬Î¼ÎµÏα","Bagsidekamera","Zadn\xe1 kamera","Fotocamera (posteriore)","C\xe2mara traseira","×צ××× ×××ר×ת","Takakamera","R\xfcckkamera","Cam\xe9ra arri\xe8re","Zadn\xed fotoapar\xe1t","ÐÑÑÒÑ ÐºÐ°Ð¼ÐµÑа","Tylny aparat","बà¥à¤ à¤à¥à¤®à¤°à¤¾","H\xe1ts\xf3 kamera","Camera aan achterzijde","Kamera Belakang","C\xe2mera Traseira","Stražnja kamera","اÙÙØ§Ù
ÙØ±Ø§ Ø§ÙØ®ÙÙÙØ©","C\xe0mera posterior","Fotocamera posteriore","C\xe0mera del darrere","à¸à¸¥à¹à¸à¸à¸à¹à¸²à¸à¸«à¸¥à¸±à¸","CamerÄ spate","Kamera, bagside","èé¢ã«ã¡ã©","ÐÐ°Ð´Ð½Ñ ÐºÐ°Ð¼ÐµÑа","Arka Kamera","åç½®ç¸æº","ÐамеÑа на задней панели","åç½®é头","Kamera bak","ÐаднÑÑ ÐºÐ°Ð¼ÐµÑа","Aparat tylny","Kamera p\xe5 baksiden","C\xe2mera de Tr\xe1s"],ew=()=>!!navigator.userAgent.match(/Android/i),eb=()=>!!navigator.userAgent.match(/iPhone/i),ek=()=>ew()||eb();class eT{constructor(e,t,a){this.deviceId=e.deviceId,this.facing=t,this.groupId=e.groupId,a?this.label=a:this.label=e.label}}async function eM(){let e=[],t=[],a=await navigator.mediaDevices.enumerateDevices();if(a.filter(e=>"videoinput"===e.kind).every(e=>""===e.label)){let e=await navigator.mediaDevices.getUserMedia({video:{facingMode:{ideal:"environment"}},audio:!1});a=await navigator.mediaDevices.enumerateDevices(),e.getTracks().forEach(e=>e.stop())}let r=a.filter(e=>"videoinput"===e.kind),i=0,s=0;for(let a of r)if(function(e){let t=e.toLowerCase();return eC.some(e=>t.includes(e))}(a.label)){let e;i++,ew()&&(e=`Back camera ${i}
1`),t.push(new eT(a,c.BackFacingCamera,e))}else{let t;s++,ew()&&(t=`Front camera ${s}`),e.push(new eT(a,c.FrontFacingCamera,t))}return{frontCameras:e,backCameras:t}}async function eL(e,t){let{frontCameras:a,backCameras:r}=await eM();if(!a.length&&!r.length)return null;if(e){let t;return(t=a.find(t=>t.deviceId===e))||(t=r.find(t=>t.deviceId===e)),t||null}let i=null;if(eb()&&t===c.BackFacingCamera){let e=r.find(e=>eA.includes(e.label));e||(e=r.find(e=>ep.includes(e.label))),e&&(i=e)}else if(ew()&&t===c.BackFacingCamera){let e={deviceId:"",score:-1},t=(e,t)=>{let a=0;return e&&a++,t&&a++,a};for(let a of r){let r=await navigator.mediaDevices.getUserMedia({video:{deviceId:a.deviceId,width:1920,height:1080}});if("getCapabilities"in r.getVideoTracks()[0]){let i=r.getVideoTracks()[0].getCapabilities(),s=t(!!i.torch,i.focusMode?.includes("single-shot"));s>e.score&&(e={deviceId:a.deviceId,score:s})}eF(r)}i=r.find(t=>t.deviceId===e.deviceId)||null}if(null===i){let e=r.length>0?r:a;t===c.BackFacingCamera&&r.length>0&&(e=r),t===c.FrontFacingCamera&&a.length>0&&(e=a);let i=(e=e.sort((e,t)=>e.label.localeCompare(t.label))).length-1,s=e.map(e=>{let t=RegExp(/\b([0-9]+)MP?\b/,"i").exec(e.label);return null!==t?parseInt(t[1],10):NaN});return s.some(e=>isNaN(e))||(i=s.lastIndexOf(Math.max(...s))),e[i]}return i}let eF=e=>{for(let t of e.getTracks())t.stop()};async function ef(e,t,a=c.BackFacingCamera){let r={audio:!1,video:{width:{min:640,ideal:1920,max:1920},height:{min:480,ideal:1080,max:1080}}};if(""===e.deviceId){let e=a===c.BackFacingCamera;r.video.facingMode={ideal:e?"environment":"user"}}else r.video.deviceId={exact:e.deviceId};let i=await navigator.mediaDevices.getUserMedia(r);t.controls=!1,t.srcObject=i;let s=!1;return e.facing===c.FrontFacingCamera&&(s=!0),s}function ev(){try{if("object"==typeof WebAssembly&&"function"==typeof WebAssembly.instantiate){let e=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(e instanceof WebAssembly.Module)return new WebAssembly.Instance(e)instanceof WebAssembly.Instance}}catch(e){}return!1}function ey(){let e=navigator.userAgent||navigator.vendor;return!!/(instagram|fbav|linkedinapp|twitter|micromessenger|whatsapp|tiktok)[/\s]?([\w.]*)/i.exec(e)}(T=l||(l={}))[T.RotatedLeft90=0]="RotatedLeft90",T[T.NoRotation=1]="NoRotation",T[T.RotatedRight90=2]="RotatedRight90",T[T.Rotated180=3]="Rotated180",(M=E||(E={}))[M.Empty=0]="Empty",M[M.Uncertain=1]="Uncertain",M[M.Valid=2]="Valid",M[M.StageValid=3]="StageValid",(L=d||(d={}))[L.Front=0]="Front",L[L.Back=1]="Back";class eU{constructor(e,t,a){const r={data:e.data,width:e.width,height:e.height,colorSpace:e.colorSpace};this.imageData=r,this.orientation=t,this.videoFrame=a}}function eK(e,t=!1){let a,r,i=!1;if(e instanceof HTMLVideoElement)a=e.videoWidth,r=e.videoHeight,i=!0;else if(e instanceof HTMLImageElement)a=e.naturalWidth,r=e.naturalHeight;else if(e instanceof SVGImageElement)throw new en(eN.svgUnsupported);else a=e.width,r=e.height;if((Z=Z||document.createElement("canvas")).width!==a&&Z.height!==r&&(Z.width=a,Z.height=r),!(x=x||Z.getContext("2d",{willReadFrequently:!0,alpha:!1})))throw new en(eN.canvasMissing);x.drawImage(e,0,0,Z.width,Z.height);let s=t?.66:1,n=Z.width*s,o=Z.height*s,c=(Z.width-n)/2,E=(Z.height-o)/2;return new eU(x.getImageData(c,E,n,o),l.NoRotation,i)}async function eP(e,t){try{let a=await fetch("https://baltazar.microblink.com/api/v2/status/check",{method:"POST",headers:{"Content-Type":"application/json"},cache:"no-cache",body:JSON.stringify({licenseId:e.licenseId,licensee:e.licensee,applicationIds:e.applicationIds,packageName:e.packageName,platform:"Browser",sdkName:e.sdkName,sdkVersion:e.sdkVersion})});if(!a.ok)return{status:_.NetworkError,lease:0,networkErrorDescription:`Server responded with status ${a.status}`};{let e=(await a.text()).toString();return t.submitServerPermission(e)}}catch(e){return{status:_.NetworkError,lease:0,networkErrorDescription:`Unexpected error: ${JSON.stringify(e)}`}}}async function eW(e,t,a,r){let i=r.initializeWithLicenseKey(e,a,t);switch(i.unlockResult){case R.Invalid:return{error:new en({...eS.licenseInvalid,message:i.licenseError},{type:u.LicenseTokenStateInvalid})};case R.Valid:var s,n,o;return{error:null,showOverlay:(s=i.isTrial,n=i.allowRemoveDemoOverlay,o=i.allowRemoveProductionOverlay,(!s||!n)&&(!!s||!o))};case R.RequiresServerPermission:{let e=await eP(i,r);switch(e.status){case _.Ok:return{error:null,lease:e.lease};case _.NetworkError:{let t="";return e.networkErrorDescription&&(t=" "+e.networkErrorDescription),{error:new en({...eS.licenseNetworkError,message:"There has been a network error while obtaining the server permission!"+t},{type:u.NetworkError})}}case _.RemoteLock:return{error:new en(eS.licenseRemoteLocked,{type:u.RemoteLock}),lease:e.lease};case _.PermissionExpired:return{error:new en(eS.licensePermissionExpired,{type:u.PermissionExpired}),lease:e.lease};case _.PayloadCorrupted:return{error:new en(eS.licensePayloadCorrupted,{type:u.PayloadCorrupted}),lease:e.lease};case _.PayloadSignatureVerificationFailed:return{error:new en(eS.licensePayloadVerificationFailed,{type:u.PayloadSignatureVerificationFailed}),lease:e.lease};case _.IncorrectTokenState:return{error:new en(eS.licenseTokenStateIncorrect,{type:u.IncorrectTokenState}),lease:e.lease}}}}}(F=R||(R={}))[F.Invalid=0]="Invalid",F[F.RequiresServerPermission=1]="RequiresServerPermission",F[F.Valid=2]="Valid",(f=u||(u={}
1)).LicenseTokenStateInvalid="LICENSE_TOKEN_STATE_INVALID",f.NetworkError="NETWORK_ERROR",f.RemoteLock="REMOTE_LOCK",f.PermissionExpired="PERMISSION_EXPIRED",f.PayloadCorrupted="PAYLOAD_CORRUPTED",f.PayloadSignatureVerificationFailed="PAYLOAD_SIGNATURE_VERIFICATION_FAILED",f.IncorrectTokenState="INCORRECT_TOKEN_STATE",(v=_||(_={}))[v.Ok=0]="Ok",v[v.NetworkError=1]="NetworkError",v[v.RemoteLock=2]="RemoteLock",v[v.PermissionExpired=3]="PermissionExpired",v[v.PayloadCorrupted=4]="PayloadCorrupted",v[v.PayloadSignatureVerificationFailed=5]="PayloadSignatureVerificationFailed",v[v.IncorrectTokenState=6]="IncorrectTokenState",(y=I||(I={}))[y.Failed=0]="Failed",y[y.Success=1]="Success",y[y.CameraTooFar=2]="CameraTooFar",y[y.CameraTooClose=3]="CameraTooClose",y[y.CameraAngleTooSteep=4]="CameraAngleTooSteep",y[y.DocumentTooCloseToCameraEdge=5]="DocumentTooCloseToCameraEdge",y[y.DocumentPartiallyVisible=6]="DocumentPartiallyVisible",y[y.FallbackSuccess=7]="FallbackSuccess";class eG extends Error{constructor(){super("Throttled function aborted"),this.name="AbortError"}}let eV=function({limit:e,interval:t,strict:a}){if(!Number.isFinite(e))throw TypeError("Expected `limit` to be a finite number");if(!Number.isFinite(t))throw TypeError("Expected `interval` to be a finite number");let r=new Map,i=0,s=0,n=[],o=a?function(){let a=Date.now();if(n.length<e)return n.push(a),0;let r=n.shift()+t;return a>=r?(n.push(a),0):(n.push(r),r-a)}:function(){let a=Date.now();return a-i>t?(s=1,i=a,0):(s<e?s++:(i+=t,s=1),i-a)};return e=>{let t=function(...a){let i;return t.isEnabled?new Promise((t,s)=>{i=setTimeout(()=>{t(e.apply(this,a)),r.delete(i)},o()),r.set(i,s)}):(async()=>e.apply(this,a))()};return t.abort=()=>{for(let e of r.keys())clearTimeout(e),r.get(e)(new eG);r.clear(),n.splice(0,n.length)},t.isEnabled=!0,Object.defineProperty(t,"queueSize",{get:()=>r.size}),t}}({limit:1,interval:Math.round(66.66666666666667),strict:!0});(U=m||(m={}))[U.Recognition=0]="Recognition",U[U.RecognitionTest=1]="RecognitionTest",U[U.DetectionTest=2]="DetectionTest";class ez{constructor(e,t,a=!1,r=null){this.deviceId=null,this.recognitionCancelRequested=!1,this.recognitionPauseRequested=!1,this.recognitionTimeoutMs=2e4,this.timeoutStartedAt=0,this.currentTimeoutCount=0,this.videoRecognitionMode=m.Recognition,this.onScanningDone=null,this.onFrameProcessed=null,this.cameraFlipped=!1,this.threadBusy=!1,this.handleFlippingVideo=async()=>{this.videoElement.style.transform=`scaleX(${this.cameraFlipped?-1:1})`,await this.recognizerRunner.setCameraPreviewMirrored(this.cameraFlipped)},this.setOnFrameProcessed=e=>{this.onFrameProcessed=e},this.flipCamera=async()=>{this.cameraFlipped=!this.cameraFlipped,await this.handleFlippingVideo()},this.isCameraFlipped=()=>this.cameraFlipped,this.setVideoRecognitionMode=async e=>{this.videoRecognitionMode=e;let t=this.videoRecognitionMode===m.DetectionTest;await this.recognizerRunner.setDetectionOnlyMode(t)},this.startRecognition=async(e,t=2e4)=>{try{await this.videoElement.play()}catch(e){throw Error(o.VIDEO_RECOGNIZER_PLAY_REQUEST_INTERRUPTED)}this.recognitionPauseRequested=!1,this.recognitionCancelRequested=!1,this.clearTimeout(),this.recognitionTimeoutMs=t,this.onScanningDone=e,await this.throttledQueueFrame()},this.resumeRecognition=async e=>{if(e)try{await this.resetRecognizers(!0)}catch(e){throw new en(eh.recognizersResetFailure)}try{await this.videoElement.play()}catch(e){throw Error(o.VIDEO_RECOGNIZER_PLAY_REQUEST_INTERRUPTED)}try{this.recognitionPauseRequested=!1,await this.throttledQueueFrame()}catch(e){this.recognitionPauseRequested=!0,console.error(e)}},this.recognize=(e=2e4)=>new Promise(t=>{let a=e=>{this.pauseVideoFeed(),t(e)};this.startRecognition(a,e)}),this.pauseVideoFeed=()=>{this.videoElement.readyState>this.videoElement.HAVE_CURRENT_DATA&&!this.videoElement.paused&&(this.videoElement.pause(),this.pauseRecognition())},this.pauseRecognition=()=>{this.recognitionPauseRequested=!0},this.cancelRecognition=()=>{this.recognitionCancelRequested=!0},this.resetRecognizers=async e=>{await this.recognizerRunner.resetRecognizers(e)},this.getRecognizerRunner=()=>this.recognizerRunner,this.getVideoElement=()=>this.videoElement,this.changeCameraDevice=async e=>{this.pauseRecognition(),this.releaseVideoFeed(),await ef(e,this.videoElement,c.BackFacingCamera),await this.resumeRecognition(!0)},this.queueFrame=()=>new Promise(e=>{this.frameCallback(()=>{this.recognitionLoop().then(()=>e())})}),this.throttledQueueFrame=eV(this.queueFrame),this.recognitionLoop=async()=>
1{if(this.threadBusy||this.recognitionPauseRequested)return;if(this.recognitionCancelRequested){this.clearTimeout(),await this.resetRecognizers(!0),this.onScanningDone=null,this.recognitionCancelRequested=!1;return}let e=eK(this.videoElement);await new Promise(e=>setTimeout(e,0)),this.threadBusy=!0;let t=await this.recognizerRunner.processImage(e),a=await this.recognizerRunner.recognizers[0].getResult();if(this.threadBusy=!1,"function"==typeof this.onFrameProcessed&&this.onFrameProcessed(a,e.imageData),this.videoRecognitionMode===m.DetectionTest||this.videoRecognitionMode===m.RecognitionTest){await this.recognizerRunner.resetRecognizers(!0),this.clearTimeout(),this.throttledQueueFrame();return}switch(t){case E.Valid:this.clearTimeout(),"function"==typeof this.onScanningDone&&this.onScanningDone(t);return;case E.Uncertain:{let e=performance.now();if(0===this.timeoutStartedAt&&(this.timeoutStartedAt=e),this.currentTimeoutCount=e-this.timeoutStartedAt,this.currentTimeoutCount<this.recognitionTimeoutMs)return void this.throttledQueueFrame();this.clearTimeout(),"function"==typeof this.onScanningDone&&this.onScanningDone(t);return}case E.StageValid:case E.Empty:this.clearTimeout(),this.throttledQueueFrame();return}},this.clearTimeout=()=>{this.currentTimeoutCount=0,this.timeoutStartedAt=0},this.releaseVideoFeed=()=>{this.videoElement&&null!==this.videoElement.srcObject&&this.videoElement.srcObject instanceof MediaStream&&(this.videoElement.srcObject.getTracks().forEach(e=>e.stop()),this.videoElement.srcObject=null)},this.videoElement=e,this.recognizerRunner=t,this.cameraFlipped=a,this.deviceId=r,"requestVideoFrameCallback"in HTMLVideoElement.prototype?this.frameCallback=this.videoElement.requestVideoFrameCallback.bind(this.videoElement):this.frameCallback=window.requestAnimationFrame.bind(window),this.handleFlippingVideo(),this.videoElement.setAttribute("playsinline",""),this.videoElement.setAttribute("mute","")}static async createVideoRecognizerFromCameraStream(e,t,a=null,r=c.BackFacingCamera){if(!e||!(e instanceof HTMLVideoElement))throw new en(eh.elementMissing);if(!navigator.mediaDevices.getUserMedia)throw new en(eh.mediaDevicesUnsupported);let i=await eL(a,r);if(!i)throw new en(eh.cameraMissing);let s=await ef(i,e,r);return new ez(e,t,s,i.deviceId)}static createVideoRecognizerFromVideoPath(e,t,a){let r=new ez(t,a);return t.src=e,t.currentTime=0,t.onended=()=>{r.cancelRecognition()},r}}class eZ{constructor(e){if(this.allowHelloMessage=!0,this.engineLocation="",this.workerLocation="",this.wasmType=null,this.wasmFlavor="",this.numberOfWorkers=null,this.loadProgressCallback=null,this.wasmModuleName="BlinkCardWasmSDK",!e)throw new en(eg.licenseKeyMissing);this.licenseKey=e}}let ex=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,3,1,0,1,10,14,1,12,0,65,0,65,0,65,0,252,10,0,0,11])),eH=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,2,8,1,1,97,1,98,3,127,1,6,6,1,127,1,65,0,11,7,5,1,1,97,3,1])),ej=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,7,1,5,0,208,112,26,11])),eB=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,12,1,10,0,67,0,0,0,0,252,0,26,11])),eq=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,65,0,192,26,11])),eY=async()=>WebAssembly.validate(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]));function eQ(){let e=navigator.userAgent.toLowerCase();return e.includes("safari")&&!e.includes("chrome")}function eJ(){return/iOS|iPhone|iPad|iPod/i.test(navigator.userAgent)}async function eX(){if(!await (async e=>{try{return"u">typeof MessageChannel&&new MessageChannel().port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(e)}catch(e){return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11])))return!1;if(!("importScripts"in self))throw Error("Not implemented");return!eQ()&&"Worker"in self}async function e$(){let e=[eH(),ej(),ex(),eB(),eq()];if(!(await Promise.all(e)).every(Boolean))throw Error("Browser doesn't meet minimum requirements!");return await eY()?await eX()?s.AdvancedWithThreads:s.Advanced:s.Basic}async function e0(){let e=await eY(),t=await eX();return e?t?s.AdvancedWithThreads:s.Advanced:s.Basic}function e1(e){switch(e){case s.AdvancedWithThreads:return"advanced-threads";case s.Advanced:return"advanced";case s.Basic:return"basic"}}function e2(){return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}async function e6(e){return new Promise((t,a)=>{if(!e||"object"!=typeof e)return void a(new en(eg.wasmSettingsMissing));if("string"!=typeof e.licenseKey)return void a(new en(eg.licenseKeyMissing));if(!e.wasmModuleName)return void a(new en(eg.wasmModuleNameMissing));if("string"!=typeof e.engineLocation)return void a(new en(eg.engineLocationInvalid));if("string"!=typeof e.workerLocation)return void a(new en(eg.workerLocationInvalid));let r=function(){try{let e=localStorage.getItem("mb-user-id");return null===e&&(e=e2(),localStorage.setItem("mb-user-id",e)),e}catch(e){return e2()}}();try{let i=`/resources/${e.wasmModuleName}.worker.min.js`,s=window.location.origin+i,n=e.workerLocation||s;e.allowHelloMessage&&console.log("Worker location is:",n);let o=new Worker(n);em.createWasmWorker(o,e,r).then(e=>{t(e)},a)}catch(e){a(e)}})}async function e5(e,t,a=!1,r={}){if("object"!=typeof e)throw new en(eg.missing);if("object"!=typeof t||t.length<1)throw new en(eg.recognizersMissing);return e.mbWasmModule.createRecognizerRunner(t,a,r)}async function e9(e,t){let a=await e.mbWasmModule.newRecognizer("SuccessFrameGrabberRecognizer",t);return a.wrappedRecognizer=t,a}class e4{constructor(e=0,t=0,a=0,r=0){this.upFactor=0,this.downF
1actor=0,this.leftFactor=0,this.rightFactor=0,this.checkExtensionFactor(e),this.checkExtensionFactor(t),this.checkExtensionFactor(a),this.checkExtensionFactor(r),this.upFactor=e,this.downFactor=t,this.leftFactor=a,this.rightFactor=r}checkExtensionFactor(e){if(e>1||e<-1)throw Error("Extension factor must be in range [-1.0, 1.0]")}}(K=h||(h={}))[K.NotAvailable=0]="NotAvailable",K[K.HandNotPresent=1]="HandNotPresent",K[K.NotEnoughHandPresent=2]="NotEnoughHandPresent",K[K.DocumentNotInHand=3]="DocumentNotInHand",K[K.DocumentInHand=4]="DocumentInHand",(P=g||(g={}))[P.NotPerformed=0]="NotPerformed",P[P.Pass=1]="Pass",P[P.Fail=2]="Fail",(W=N||(N={}))[W.Disabled=0]="Disabled",W[W.Level1=1]="Level1",W[W.Level2=2]="Level2",W[W.Level3=3]="Level3",W[W.Level4=4]="Level4",W[W.Level5=5]="Level5",W[W.Level6=6]="Level6",W[W.Level7=7]="Level7",W[W.Level8=8]="Level8",W[W.Level9=9]="Level9",W[W.Level10=10]="Level10",(G=S||(S={}))[G.None=0]="None",G[G.ImageOnly=1]="ImageOnly",G[G.ResultFieldsOnly=2]="ResultFieldsOnly",G[G.FullResult=3]="FullResult",G[G.Count=4]="Count";class e8{constructor(){this.mode=S.ImageOnly,this.prefixDigitsVisible=0,this.suffixDigitsVisible=4}}class e3{constructor(){this.cardNumberAnonymizationSettings=new e8,this.cardNumberPrefixAnonymizationMode=S.None,this.cvvAnonymizationMode=S.None,this.ibanAnonymizationMode=S.ImageOnly,this.ownerAnonymizationMode=S.None,this.fallbackAnonymization=!1}}class e7{constructor(){this.allowBlurFilter=!0,this.anonymizationSettings=new e3,this.paddingEdge=0,this.allowInvalidCardNumber=!1,this.extractCvv=!0,this.extractExpiryDate=!0,this.extractIban=!0,this.extractOwner=!0,this.returnFullDocumentImage=!0,this.returnEncodedFullDocumentImage=!1,this.handScaleThreshold=.15,this.handDocumentOverlapThreshold=.05,this.screenAnalysisMatchLevel=N.Level5,this.photocopyAnalysisMatchLevel=N.Level5,this.documentLivenessCallback=null,this._fullDocumentImageDpi=250,this.fullDocumentImageExtensionFactors=new e4}get fullDocumentImageDpi(){return this._fullDocumentImageDpi}set fullDocumentImageDpi(e){if(e<100||e>400)throw Error("DPI must be from interval [100, 400]");this._fullDocumentImageDpi=e}}async function te(e){return e.mbWasmModule.newRecognizer("BlinkCardRecognizer")}(V=O||(O={}))[V.Other=0]="Other",V[V.AmericanExpress=1]="AmericanExpress",V[V.ChinaUnionPay=2]="ChinaUnionPay",V[V.Diners=3]="Diners",V[V.DiscoverCard=4]="DiscoverCard",V[V.Elo=5]="Elo",V[V.Jcb=6]="Jcb",V[V.Maestro=7]="Maestro",V[V.Mastercard=8]="Mastercard",V[V.RuPay=9]="RuPay",V[V.Verve=10]="Verve",V[V.Visa=11]="Visa",V[V.VPay=12]="VPay",V[V.Count=13]="Count",(z=D||(D={}))[z.Success=0]="Success",z[z.DetectionFailed=1]="DetectionFailed",z[z.ImagePreprocessingFailed=2]="ImagePreprocessingFailed",z[z.StabilityTestFailed=3]="StabilityTestFailed",z[z.ScanningWrongSide=4]="ScanningWrongSide",z[z.FieldIdentificationFailed=5]="FieldIdentificationFailed",z[z.ImageReturnFailed=6]="ImageReturnFailed",z[z.UnsupportedCard=7]="UnsupportedCard",z[z.Count=8]="Count"}}]); 2//# sourceMappingURL=55.91848cc957d7b165.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.