scandit-web-datacapture-id
Advanced tools
Comparing version 6.20.0 to 6.21.0-beta.2
@@ -1,1 +0,1 @@ | ||
"use strict";var Module={};var initializedJS=false;function threadPrintErr(){var text=Array.prototype.slice.call(arguments).join(" ");console.error(text)}function threadAlert(){var text=Array.prototype.slice.call(arguments).join(" ");postMessage({cmd:"alert",text:text,threadId:Module["_pthread_self"]()})}var err=threadPrintErr;self.alert=threadAlert;Module["instantiateWasm"]=((info,receiveInstance)=>{var instance=new WebAssembly.Instance(Module["wasmModule"],info);receiveInstance(instance);Module["wasmModule"]=null;return instance.exports});self.onmessage=(e=>{try{if(e.data.cmd==="load"){Module["wasmModule"]=e.data.wasmModule;Module["wasmMemory"]=e.data.wasmMemory;Module["buffer"]=Module["wasmMemory"].buffer;Module["ENVIRONMENT_IS_PTHREAD"]=true;if(typeof e.data.urlOrBlob=="string"){importScripts(e.data.urlOrBlob)}else{var objectUrl=URL.createObjectURL(e.data.urlOrBlob);importScripts(objectUrl);URL.revokeObjectURL(objectUrl)}Centaurus(Module).then(function(instance){Module=instance})}else if(e.data.cmd==="run"){Module["__performance_now_clock_drift"]=performance.now()-e.data.time;Module["__emscripten_thread_init"](e.data.threadInfoStruct,/*isMainBrowserThread=*/0,/*isMainRuntimeThread=*/0,/*canBlock=*/1);Module["establishStackSpace"]();Module["PThread"].receiveObjectTransfer(e.data);Module["PThread"].threadInit();if(!initializedJS){Module["___embind_register_native_and_builtin_types"]();initializedJS=true}try{var result=Module["invokeEntryPoint"](e.data.start_routine,e.data.arg);if(Module["keepRuntimeAlive"]()){Module["PThread"].setExitStatus(result)}else{Module["__emscripten_thread_exit"](result)}}catch(ex){if(ex!="unwind"){if(ex instanceof Module["ExitStatus"]){if(Module["keepRuntimeAlive"]()){}else{Module["__emscripten_thread_exit"](ex.status)}}else{throw ex}}}}else if(e.data.cmd==="cancel"){if(Module["_pthread_self"]()){Module["__emscripten_thread_exit"](-1)}}else if(e.data.target==="setimmediate"){}else if(e.data.cmd==="processProxyingQueue"){if(Module["_pthread_self"]()){Module["_emscripten_proxy_execute_queue"](e.data.queue)}Atomics.sub(HEAP32,e.data.queue>>2,1)}else{err("worker.js received unknown command "+e.data.cmd);err(e.data)}}catch(ex){err("worker.js onmessage() captured an uncaught exception: "+ex);if(ex&&ex.stack)err(ex.stack);if(Module["__emscripten_thread_crashed"]){Module["__emscripten_thread_crashed"]()}throw ex}}); | ||
"use strict";var Module={};var initializedJS=false;var pendingNotifiedProxyingQueues=[];function threadPrintErr(){var text=Array.prototype.slice.call(arguments).join(" ");console.error(text)}function threadAlert(){var text=Array.prototype.slice.call(arguments).join(" ");postMessage({cmd:"alert",text:text,threadId:Module["_pthread_self"]()})}var err=threadPrintErr;self.alert=threadAlert;Module["instantiateWasm"]=(info,receiveInstance)=>{var module=Module["wasmModule"];Module["wasmModule"]=null;var instance=new WebAssembly.Instance(module,info);return receiveInstance(instance)};self.onunhandledrejection=e=>{throw e.reason??e};function handleMessage(e){try{if(e.data.cmd==="load"){let messageQueue=[];self.onmessage=e=>messageQueue.push(e);self.startWorker=instance=>{Module=instance;postMessage({"cmd":"loaded"});for(let msg of messageQueue){handleMessage(msg)}self.onmessage=handleMessage};Module["wasmModule"]=e.data.wasmModule;for(const handler of e.data.handlers){Module[handler]=function(){postMessage({cmd:"callHandler",handler:handler,args:[...arguments]})}}Module["wasmMemory"]=e.data.wasmMemory;Module["buffer"]=Module["wasmMemory"].buffer;Module["ENVIRONMENT_IS_PTHREAD"]=true;if(typeof e.data.urlOrBlob=="string"){importScripts(e.data.urlOrBlob)}else{var objectUrl=URL.createObjectURL(e.data.urlOrBlob);importScripts(objectUrl);URL.revokeObjectURL(objectUrl)}Centaurus(Module)}else if(e.data.cmd==="run"){Module["__emscripten_thread_init"](e.data.pthread_ptr,/*isMainBrowserThread=*/0,/*isMainRuntimeThread=*/0,/*canBlock=*/1);Module["establishStackSpace"]();Module["PThread"].receiveObjectTransfer(e.data);Module["PThread"].threadInitTLS();if(!initializedJS){Module["__embind_initialize_bindings"]();pendingNotifiedProxyingQueues.forEach(queue=>{Module["executeNotifiedProxyingQueue"](queue)});pendingNotifiedProxyingQueues=[];initializedJS=true}try{Module["invokeEntryPoint"](e.data.start_routine,e.data.arg)}catch(ex){if(ex!="unwind"){throw ex}}}else if(e.data.cmd==="cancel"){if(Module["_pthread_self"]()){Module["__emscripten_thread_exit"](-1)}}else if(e.data.target==="setimmediate"){}else if(e.data.cmd==="processProxyingQueue"){if(initializedJS){Module["executeNotifiedProxyingQueue"](e.data.queue)}else{pendingNotifiedProxyingQueues.push(e.data.queue)}}else if(e.data.cmd){err("worker.js received unknown command "+e.data.cmd);err(e.data)}}catch(ex){if(Module["__emscripten_thread_crashed"]){Module["__emscripten_thread_crashed"]()}throw ex}}self.onmessage=handleMessage; |
@@ -1,15 +0,1 @@ | ||
!function proxyConsole(){const CentaurusWordsToSDC=new Map;CentaurusWordsToSDC.set([77,105,99,114,111,98,108,105,110,107],"Scandit");CentaurusWordsToSDC.set([66,108,105,110,107,73,68],"ID Capture");function fixCentaurusMentions(input){let output=input;if(typeof output==="string")return[...CentaurusWordsToSDC.entries()].reduce(((s,[word,replacement])=>{const realWord=word.map((char=>String.fromCodePoint(char))).join("");return s.replace(new RegExp(realWord,"gi"),replacement)}),output);return output}if(console){const functionNames=["debug","error","info","warn","log"];const originalFunctions=functionNames.reduce(((fnMaps,functionName)=>{fnMaps[functionName]=console[functionName];return fnMaps}),{});functionNames.forEach((functionName=>{console[functionName]=(...args)=>{const filteredArgs=args.map(fixCentaurusMentions);originalFunctions[functionName].apply(console,filteredArgs)}}))}}();!function(){"use strict"; | ||
/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. | ||
Permission to use, copy, modify, and/or distribute this software for any | ||
purpose with or without fee is hereby granted. | ||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | ||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY | ||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | ||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | ||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR | ||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR | ||
PERFORMANCE OF THIS SOFTWARE. | ||
***************************************************************************** */function e(e,t,s,n){return new(s||(s=Promise))((function(r,i){function o(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(o,a)}c((n=n.apply(e,t||[])).next())}))}let t=0;class s{constructor(e){this.action=e,this.messageID=function(){const e=t;return t+=1,e}()}}class n extends s{constructor(e,t){super(n.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.numberOfWorkers=e.numberOfWorkers}}var r,i;n.action="init",function(e){e[e.Any=0]="Any",e[e.Recognizer=1]="Recognizer",e[e.RecognizerSettings=2]="RecognizerSettings",e[e.Callback=3]="Callback"}(r||(r={}));class o extends s{constructor(e,t){super(o.action),this.funcName=e,this.params=t}}o.action="invokeFunction";class a extends s{constructor(e,t){super(a.action),this.className=e,this.params=t}}a.action="createNewNativeObject";class c extends s{constructor(e,t,s){super(c.action),this.recognizerHandles=e,this.allowMultipleResults=t,this.registeredMetadataCallbacks=s}}c.action="createRecognizerRunner";class E extends s{constructor(e,t){super(E.action),this.recognizerHandles=e,this.allowMultipleResults=t}}E.action="reconfigureRecognizerRunner";class R extends s{constructor(){super(R.action)}}R.action="deleteRecognizerRunner";class l extends s{constructor(e,t,s){super(l.action),this.objectHandle=e,this.methodName=t,this.params=s}}l.action="invokeObject";class _ extends s{constructor(e){super(_.action),this.frame=e}getTransferrables(){return[this.frame.imageData.data.buffer]}}_.action="processImage";class u extends s{constructor(e){super(u.action),this.hardReset=e}}u.action="resetRecognizers";class I extends s{constructor(e){super(I.action),this.registeredMetadataCallbacks=e}}I.action="registerMetadataCallbacks";class d extends s{constructor(e){super(d.action),this.detectionOnlyMode=e}}d.action="setDetectionOnly";class N extends s{constructor(e){super(N.action),this.callbackNonEmpty=e}}N.action="setClearTimeoutCallback";class O extends s{constructor(e){super(O.action),this.cameraPreviewMirrored=e}}O.action="setCameraPreviewMirrored";class h extends s{constructor(e){super(h.action),this.userId=e}}h.action="getProductIntegrationInfo";class S{constructor(e,t,s){this.success=!0,this.error=null,this.messageID=e,this.success=t,this.error=s}}class g{constructor(e,t,s,n){this.success=!0,this.showOverlay=!0,this.messageID=e,this.success=t,this.showOverlay=s,this.wasmType=n}}class C extends S{constructor(e,t){super(e,!0,null),this.result=t}}class m extends S{constructor(e,t){super(e,!0,null),this.objectHandle=t}}class A extends S{constructor(e,t){super(e,!0,null),this.recognitionState=t}}class D extends S{constructor(e,t){super(e,!0,null),this.result=t}}class f{constructor(e){this.isLoadProgressMessage=!0,this.progress=e}}!function(e){e[e.onDebugText=0]="onDebugText",e[e.onDetectionFailed=1]="onDetectionFailed",e[e.onQuadDetection=2]="onQuadDetection",e[e.onPointsDetection=3]="onPointsDetection",e[e.onFirstSideResult=4]="onFirstSideResult",e[e.clearTimeoutCallback=5]="clearTimeoutCallback",e[e.onGlare=6]="onGlare",e[e.recognizerCallback=7]="recognizerCallback"}(i||(i={}));class p{constructor(e,t){this.isCallbackMessage=!0,this.callbackType=e,this.callbackParameters=t}}function L(e,t){return t=t||"",""===(e=e||"")?t:e.endsWith("/")?t.startsWith("/")?e+t.substring(1):e+t:t.startsWith("/")?e+t:e+"/"+t}var M,T,w;function y(){return e(this,void 0,void 0,(function*(){if(!(yield(async e=>{try{return"undefined"!=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"Worker"in self}))}function F(){return e(this,void 0,void 0,(function*(){const e=yield(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])))(),t=yield y();return e?t?M.AdvancedWithThreads:M.Advanced:M.Basic}))}!function(e){e.Basic="BASIC",e.Advanced="ADVANCED",e.AdvancedWithThreads="ADVANCED_WITH_THREADS"}(M||(M={}));class U{constructor(e,t){if(!e.code||!e.message)throw Error("Instance of SDKError is required to have code and message.");this.message=e.message,this.code=e.code,this.details=t}}!function(e){e.WORKER_WASM_LOAD_FAILURE="WORKER_WASM_LOAD_FAILURE",e.WORKER_WASM_INIT_MISSING="WORKER_WASM_INIT_MISSING",e.WORKER_FUNCTION_INVOKE_FAILURE="WORKER_FUNCTION_INVOKE_FAILURE",e.WORKER_RECOGNIZER_CREATION_FAILURE="WORKER_RECOGNIZER_CREATION_FAILURE",e.WORKER_RUNNER_EXISTS="WORKER_RUNNER_EXISTS",e.WORKER_RUNNER_CREATION_FAILURE="WORKER_RUNNER_CREATION_FAILURE",e.WORKER_RUNNER_MISSING="WORKER_RUNNER_MISSING",e.WORKER_RUNNER_RECONFIGURE_FAILURE="WORKER_RUNNER_RECONFIGURE_FAILURE",e.WORKER_RUNNER_DELETED="WORKER_RUNNER_DELETED",e.WORKER_RUNNER_DELETE_FAILURE="WORKER_RUNNER_DELETE_FAILURE",e.WORKER_OBJECT_INVOKE_FAILURE="WORKER_OBJECT_INVOKE_FAILURE",e.WORKER_IMAGE_PROCESS_FAILURE="WORKER_IMAGE_PROCESS_FAILURE",e.WORKER_HANDLE_UNDEFINED="WORKER_HANDLE_UNDEFINED",e.WORKER_MESSAGE_ACTION_UNKNOWN="WORKER_MESSAGE_ACTION_UNKNOWN",e.WORKER_LICENSE_UNLOCK_ERROR="WORKER_LICENSE_UNLOCK_ERROR",e.WORKER_INTEGRATION_INFO_FAILURE="WORKER_INTEGRATION_INFO_FAILURE",e.LOCAL_SDK_RUNNER_MISSING="LOCAL_SDK_RUNNER_MISSING",e.LOCAL_SDK_RUNNER_EMPTY="LOCAL_SDK_RUNNER_EMPTY",e.LICENSE_UNLOCK_ERROR="LICENSE_UNLOCK_ERROR",e.FRAME_CAPTURE_SVG_UNSUPPORTED="FRAME_CAPTURE_SVG_UNSUPPORTED",e.FRAME_CAPTURE_CANVAS_MISSING="FRAME_CAPTURE_CANVAS_MISSING",e.SDK_WASM_SETTINGS_MISSING="SDK_WASM_SETTINGS_MISSING",e.SDK_LICENSE_KEY_MISSING="SDK_LICENSE_KEY_MISSING",e.SDK_WASM_MODULE_NAME_MISSING="SDK_WASM_MODULE_NAME_MISSING",e.SDK_ENGINE_LOCATION_INVALID="SDK_ENGINE_LOCATION_INVALID",e.SDK_WORKER_LOCATION_INVALID="SDK_WORKER_LOCATION_INVALID",e.SDK_MISSING="SDK_MISSING",e.SDK_RECOGNIZERS_MISSING="SDK_RECOGNIZERS_MISSING",e.VIDEO_RECOGNIZER_ELEMENT_MISSING="VIDEO_RECOGNIZER_ELEMENT_MISSING",e.VIDEO_RECOGNIZER_CAMERA_MISSING="VIDEO_RECOGNIZER_CAMERA_MISSING",e.VIDEO_RECOGNIZER_CAMERA_NOT_ALLOWED="VIDEO_RECOGNIZER_CAMERA_NOT_ALLOWED",e.VIDEO_RECOGNIZER_CAMERA_UNAVAILABLE="VIDEO_RECOGNIZER_CAMERA_UNAVAILABLE",e.VIDEO_RECOGNIZER_CAMERA_IN_USE="VIDEO_RECOGNIZER_CAMERA_IN_USE",e.VIDEO_RECOGNIZER_MEDIA_DEVICES_UNSUPPORTED="VIDEO_RECOGNIZER_MEDIA_DEVICES_UNSUPPORTED",e.VIDEO_RECOGNIZER_FEED_RELEASED="VIDEO_RECOGNIZER_FEED_RELEASED",e.VIDEO_RECOGNIZER_FEED_NOT_PAUSED="VIDEO_RECOGNIZER_FEED_NOT_PAUSED",e.VIDEO_RECOGNIZER_PLAY_REQUEST_INTERRUPTED="VIDEO_RECOGNIZER_PLAY_REQUEST_INTERRUPTED",e.VIDEO_RECOGNIZER_FEED_PAUSED="VIDEO_RECOGNIZER_FEED_PAUSED",e.VIDEO_RECOGNIZER_RECOGNIZERS_RESET_FAILURE="VIDEO_RECOGNIZER_RECOGNIZERS_RESET_FAILURE",e.VIDEO_RECOGNIZER_FEED_MISSING="VIDEO_RECOGNIZER_FEED_MISSING"}(T||(T={})),function(e){e.WORKER_HANDLE_UNDEFINED="Cannot find object with handle: undefined",e.WORKER_WASM_LOAD_FAILURE="Failed to load WASM in web worker!",e.WORKER_WASM_INIT_MISSING="WASM module is not initialized!",e.WORKER_FUNCTION_INVOKE_FAILURE="Failed to invoke function!",e.WORKER_RECOGNIZER_CREATION_FAILURE="Failed to create new recognizer!",e.WORKER_RUNNER_EXISTS="Recognizer runner is already created! Multiple instances are not allowed!",e.WORKER_RUNNER_CREATION_FAILURE="Failed to create new recognizer runner!",e.WORKER_RUNNER_MISSING="Recognizer runner is not created! There is nothing to reconfigure!",e.WORKER_RUNNER_RECONFIGURE_FAILURE="Failed to reconfigure recognizer runner!",e.WORKER_RUNNER_DELETED="Recognizer runner is already deleted!",e.WORKER_RUNNER_DELETE_FAILURE="Failed to delete recognizer runner!",e.WORKER_OBJECT_INVOKE_FAILURE="Failed to invoke object!",e.WORKER_IMAGE_PROCESS_FAILURE="Recognizer runner is not initialized! Cannot process image!",e.WORKER_INTEGRATION_INFO_FAILURE="Failed to get product integration info!",e.LOCAL_SDK_RUNNER_MISSING="Property nativeRecognizerRunner is not available!",e.LOCAL_SDK_RUNNER_EMPTY="Native RecognizerRunner cannot be empty!",e.LICENSE_TOKEN_STATE_INCORRECT="Internal error (Incorrect token state)",e.LICENSE_PAYLOAD_VERIFICATION_FAILED="Failed to verify server permission's digital signature!",e.LICENSE_PAYLOAD_CORRUPTED="Server permission payload is corrupted!",e.LICENSE_PERMISSION_EXPIRED="Internal error (server permission expired)",e.LICENSE_REMOTE_LOCKED="Provided license key has been remotely locked. Please contact support for more information!",e.FRAME_CAPTURE_SVG_UNSUPPORTED="Recognition of SVG elements not supported!",e.FRAME_CAPTURE_CANVAS_MISSING="Could not get canvas 2d context!",e.SDK_WASM_SETTINGS_MISSING="Missing WASM load settings!",e.SDK_LICENSE_KEY_MISSING="Missing license key!",e.SDK_WASM_MODULE_NAME_MISSING="Missing WASM module name!",e.SDK_ENGINE_LOCATION_INVALID="Setting property 'engineLocation' must be a string!",e.SDK_WORKER_LOCATION_INVALID="Setting property 'workerLocation' must be a string!",e.SDK_MISSING="SDK is not provided!",e.SDK_RECOGNIZERS_MISSING="To create RecognizerRunner at least 1 recognizer is required.",e.VIDEO_RECOGNIZER_ELEMENT_MISSING="Video element, i.e. camera feed is not provided!",e.VIDEO_RECOGNIZER_CAMERA_MISSING="Camera not found!",e.VIDEO_RECOGNIZER_CAMERA_NOT_ALLOWED="Camera not allowed!",e.VIDEO_RECOGNIZER_CAMERA_UNAVAILABLE="Camera not available!",e.VIDEO_RECOGNIZER_CAMERA_IN_USE="Camera in use!",e.VIDEO_RECOGNIZER_MEDIA_DEVICES_UNSUPPORTED="Media devices not supported by browser.",e.VIDEO_RECOGNIZER_FEED_RELEASED="The associated video feed has been released!",e.VIDEO_RECOGNIZER_FEED_NOT_PAUSED="The associated video feed is not paused. Use resumeRecognition instead!",e.VIDEO_RECOGNIZER_PLAY_REQUEST_INTERRUPTED="The play() request was interrupted or prevented by browser security rules!",e.VIDEO_RECOGNIZER_FEED_PAUSED="Cannot resume recognition while video feed is paused! Use recognize or startRecognition",e.VIDEO_RECOGNIZER_RECOGNIZERS_RESET_FAILURE="Could not reset recognizers!",e.VIDEO_RECOGNIZER_FEED_MISSING="Missing video feed!"}(w||(w={}));const b={licenseTokenStateIncorrect:{code:T.LICENSE_UNLOCK_ERROR,message:w.LICENSE_TOKEN_STATE_INCORRECT},licensePayloadVerificationFailed:{code:T.LICENSE_UNLOCK_ERROR,message:w.LICENSE_PAYLOAD_VERIFICATION_FAILED},licensePayloadCorrupted:{code:T.LICENSE_UNLOCK_ERROR,message:w.LICENSE_PAYLOAD_CORRUPTED},licensePermissionExpired:{code:T.LICENSE_UNLOCK_ERROR,message:w.LICENSE_PERMISSION_EXPIRED},licenseRemoteLocked:{code:T.LICENSE_UNLOCK_ERROR,message:w.LICENSE_REMOTE_LOCKED},licenseNetworkError:{code:T.LICENSE_UNLOCK_ERROR},licenseInvalid:{code:T.LICENSE_UNLOCK_ERROR}},k={imageProcessFailure:{message:w.WORKER_IMAGE_PROCESS_FAILURE,code:T.WORKER_IMAGE_PROCESS_FAILURE},objectInvokeFailure:{message:w.WORKER_OBJECT_INVOKE_FAILURE,code:T.WORKER_OBJECT_INVOKE_FAILURE},runnerDeleteFailure:{message:w.WORKER_RUNNER_DELETE_FAILURE,code:T.WORKER_RUNNER_DELETE_FAILURE},runnerDeleted:{message:w.WORKER_RUNNER_DELETED,code:T.WORKER_RUNNER_DELETED},runnerReconfigureFailure:{message:w.WORKER_RUNNER_RECONFIGURE_FAILURE,code:T.WORKER_RUNNER_RECONFIGURE_FAILURE},runnerMissing:{message:w.WORKER_RUNNER_MISSING,code:T.WORKER_RUNNER_MISSING},runnerCreationFailure:{message:w.WORKER_RUNNER_CREATION_FAILURE,code:T.WORKER_RUNNER_CREATION_FAILURE},runnerExists:{message:w.WORKER_RUNNER_EXISTS,code:T.WORKER_RUNNER_EXISTS},recognizerCreationFailure:{message:w.WORKER_RECOGNIZER_CREATION_FAILURE,code:T.WORKER_RECOGNIZER_CREATION_FAILURE},functionInvokeFailure:{message:w.WORKER_FUNCTION_INVOKE_FAILURE,code:T.WORKER_FUNCTION_INVOKE_FAILURE},wasmInitMissing:{message:w.WORKER_WASM_INIT_MISSING,code:T.WORKER_WASM_INIT_MISSING},wasmLoadFailure:{message:w.WORKER_WASM_LOAD_FAILURE,code:T.WORKER_WASM_LOAD_FAILURE},handleUndefined:{message:w.WORKER_HANDLE_UNDEFINED,code:T.WORKER_HANDLE_UNDEFINED},integrationInfoFailure:{message:w.WORKER_INTEGRATION_INFO_FAILURE,code:T.WORKER_INTEGRATION_INFO_FAILURE}};var K,v;!function(e){e[e.Invalid=0]="Invalid",e[e.RequiresServerPermission=1]="RequiresServerPermission",e[e.Valid=2]="Valid"}(K||(K={})),function(e){e.LicenseTokenStateInvalid="LICENSE_TOKEN_STATE_INVALID",e.NetworkError="NETWORK_ERROR",e.RemoteLock="REMOTE_LOCK",e.PermissionExpired="PERMISSION_EXPIRED",e.PayloadCorrupted="PAYLOAD_CORRUPTED",e.PayloadSignatureVerificationFailed="PAYLOAD_SIGNATURE_VERIFICATION_FAILED",e.IncorrectTokenState="INCORRECT_TOKEN_STATE"}(v||(v={}));function P(e){return{licenseId:e.licenseId,licensee:e.licensee,packageName:e.packageName,platform:"Browser",sdkName:e.sdkName,sdkVersion:e.sdkVersion}}var W;function G(t,s){return e(this,void 0,void 0,(function*(){try{const e=yield fetch("https://invalid.com/api/v1/status/check",{method:"POST",headers:{"Content-Type":"application/json"},cache:"no-cache",body:JSON.stringify(P(t))});if(e.ok){const t=""+(yield e.text());return s.submitServerPermission(t)}return{status:W.NetworkError,lease:0,networkErrorDescription:"Server responded with status "+e.status}}catch(e){return{status:W.NetworkError,lease:0,networkErrorDescription:"Unexpected error: "+JSON.stringify(e)}}}))}function V(e){return e===M.AdvancedWithThreads}!function(e){e[e.Ok=0]="Ok",e[e.NetworkError=1]="NetworkError",e[e.RemoteLock=2]="RemoteLock",e[e.PermissionExpired=3]="PermissionExpired",e[e.PayloadCorrupted=4]="PayloadCorrupted",e[e.PayloadSignatureVerificationFailed=5]="PayloadSignatureVerificationFailed",e[e.IncorrectTokenState=6]="IncorrectTokenState"}(W||(W={}));new class{constructor(){this.context=self,this.wasmModule=null,this.nativeRecognizerRunner=null,this.objects={},this.nextObjectHandle=0,this.metadataCallbacks={},this.clearTimeoutCallback=null,this.context.onmessage=e=>{const t=e.data;switch(t.action){case n.action:this.processInitMessage(t);break;case o.action:this.processInvokeFunction(t);break;case a.action:this.processCreateNewRecognizer(t);break;case l.action:this.processInvokeObject(t);break;case c.action:this.processCreateRecognizerRunner(t);break;case E.action:this.processReconfigureRecognizerRunner(t);break;case R.action:this.processDeleteRecognizerRunner(t);break;case _.action:this.processImage(t);break;case u.action:this.resetRecognizers(t);break;case d.action:this.setDetectionOnly(t);break;case O.action:this.setCameraPreviewMirrored(t);break;case I.action:this.registerMetadataCallbacks(t);break;case N.action:this.registerClearTimeoutCallback(t);break;case h.action:this.processGetProductIntegrationInfo(t);break;default:throw new U({code:T.WORKER_MESSAGE_ACTION_UNKNOWN,message:"Unknown message action: "+JSON.stringify(t.action)})}}}getNextObjectHandle(){const e=this.nextObjectHandle;return this.nextObjectHandle=this.nextObjectHandle+1,e}notifyError(e,t){this.context.postMessage(new S(e.messageID,!1,t))}notifySuccess(e){this.context.postMessage(new S(e.messageID,!0,null))}notifyInitSuccess(e,t,s){this.context.postMessage(new g(e.messageID,!0,t,s))}unwrapParameters(e){const t=[];for(const s of e.params){let n=s.parameter;s.type===r.Recognizer?(n=this.objects[n],void 0===n&&this.notifyError(e,new U(k.handleUndefined))):s.type===r.RecognizerSettings&&(n=this.restoreFunctions(n)),t.push(n)}return t}restoreFunctions(e){const t=Object.keys(e);for(const s of t){const t=e[s];"object"==typeof t&&null!==t&&"parameter"in t&&"type"in t&&t.type===r.Callback&&(e[s]=(...e)=>{const s=new p(i.recognizerCallback,[t.parameter].concat(e));this.context.postMessage(s)})}return e}scanForTransferrables(e){if("object"==typeof e){const t=Object.keys(e),s=[];for(const n of t){const t=e[n];t instanceof ImageData?s.push(t.data.buffer):t instanceof Uint8Array?s.push(t.buffer):null!==t&&"object"==typeof t&&s.push(...this.scanForTransferrables(t))}return s}return[]}registerHeartBeat(e){this.unregisterHeartBeat(),this.lease=e;let t=e-Math.floor(Date.now()/1e3);t>120?t-=120:t/=2,this.inFlightHeartBeatTimeoutId=setTimeout((()=>{this.obtainNewServerPermission(!0)}),1e3*t),console.log("Registered heartbeat in",t,"seconds")}unregisterHeartBeat(){this.lease&&delete this.lease,this.inFlightHeartBeatTimeoutId&&(clearTimeout(this.inFlightHeartBeatTimeoutId),delete this.inFlightHeartBeatTimeoutId)}obtainNewServerPermission(t){return e(this,void 0,void 0,(function*(){if(this.wasmModule){const e=this.wasmModule.getActiveLicenseTokenInfo(),s=yield G(e,this.wasmModule);switch(s.status){case W.Ok:case W.RemoteLock:this.registerHeartBeat(s.lease);break;case W.NetworkError:case W.PayloadSignatureVerificationFailed:case W.PayloadCorrupted:t?(console.warn("Problem with obtaining server permission. Will attempt in 10 seconds "+W[s.status]),this.inFlightHeartBeatTimeoutId=setTimeout((()=>{this.obtainNewServerPermission(!1)}),1e4)):console.error("Problem with obtaining server permission. "+W[s.status]);break;case W.IncorrectTokenState:case W.PermissionExpired:console.error("Internal error: "+W[s.status])}return s.status}return console.error("Internal inconsistency! Wasm module not initialized where it's expected to be!"),W.IncorrectTokenState}))}willSoonExpire(){if(this.lease){if(this.wasmModule.getActiveLicenseTokenInfo().unlockResult===K.Valid){const e=Math.floor(Date.now()/1e3);return 30>this.lease-e}return!0}return!1}calculateWasmType(t){return e(this,void 0,void 0,(function*(){return null!==t.wasmType?t.wasmType:yield F()}))}calculateEngineLocationPrefix(e,t){const s=L(""===e.engineLocation?self.location.origin:e.engineLocation,function(e){switch(e){case M.AdvancedWithThreads:return"advanced-threads";case M.Advanced:return"advanced";case M.Basic:return"basic"}}(t));return e.allowHelloMessage&&console.log("Engine location prefix is:",s),s}processInitMessage(t){return e(this,void 0,void 0,(function*(){const s=yield this.calculateWasmType(t),n=this.calculateEngineLocationPrefix(t,s);let r={locateFile:e=>L(n,e)};t.registerLoadCallback&&(r=Object.assign(r,{setStatus:e=>{const t=new f(function(e){if("Running..."===e)return 100;if(0===e.length)return 0;const t=RegExp(/([^(]+)\((\d+(\.\d+)?)\/(\d+)\)/).exec(e);if(t)return 100*parseInt(t[2])/parseInt(t[4]);return NaN}(e));this.context.postMessage(t)}}));try{const i=L(n,t.wasmModuleName+".js");V(s)&&(r=function(e,t,s){return t&&t>0&&(e=Object.assign(e,{allowedThreads:t})),null!==s&&(e=Object.assign(e,{mainScriptUrlOrBlob:s})),e}(r,t.numberOfWorkers,i)),importScripts(i);(0,self[t.wasmModuleName])(r).then((n=>e(this,void 0,void 0,(function*(){V(s)&&(t.allowHelloMessage&&console.log("Waiting for thread workers to boot..."),yield function(t){return e(this,void 0,void 0,(function*(){t.threadWorkersReadyPromise&&(yield t.threadWorkersReadyPromise)}))}(n));const r=yield function(t,s,n,r){return e(this,void 0,void 0,(function*(){const e=r.initializeWithLicenseKey(t,n,s);switch(e.unlockResult){case K.Invalid:return{error:new U(Object.assign(Object.assign({},b.licenseInvalid),{message:e.licenseError}),{type:v.LicenseTokenStateInvalid})};case K.Valid:return{error:null,showOverlay:(i=e.isTrial,o=e.allowRemoveDemoOverlay,a=e.allowRemoveProductionOverlay,!(i&&o||!i&&a))};case K.RequiresServerPermission:{const t=yield G(e,r);switch(t.status){case W.Ok:return{error:null,lease:t.lease};case W.NetworkError:{let e="";return t.networkErrorDescription&&(e=" "+t.networkErrorDescription),{error:new U(Object.assign(Object.assign({},b.licenseNetworkError),{message:"There has been a network error while obtaining the server permission!"+e}),{type:v.NetworkError})}}case W.RemoteLock:return{error:new U(b.licenseRemoteLocked,{type:v.RemoteLock}),lease:t.lease};case W.PermissionExpired:return{error:new U(b.licensePermissionExpired,{type:v.PermissionExpired}),lease:t.lease};case W.PayloadCorrupted:return{error:new U(b.licensePayloadCorrupted,{type:v.PayloadCorrupted}),lease:t.lease};case W.PayloadSignatureVerificationFailed:return{error:new U(b.licensePayloadVerificationFailed,{type:v.PayloadSignatureVerificationFailed}),lease:t.lease};case W.IncorrectTokenState:return{error:new U(b.licenseTokenStateIncorrect,{type:v.IncorrectTokenState}),lease:t.lease}}}}var i,o,a}))}(t.licenseKey,t.allowHelloMessage,t.userId,n);null===r.error?(this.wasmModule=n,r.lease?this.registerHeartBeat(r.lease):this.unregisterHeartBeat(),this.notifyInitSuccess(t,!!r.showOverlay,s)):this.notifyError(t,r.error)}))),(e=>{this.notifyError(t,new U(k.wasmLoadFailure,e))}))}catch(e){this.notifyError(t,new U(k.wasmLoadFailure,e))}}))}processInvokeFunction(e){if(null===this.wasmModule)return void this.notifyError(e,new U(k.wasmInitMissing));const t=e.funcName,s=this.unwrapParameters(e);try{const n=this.wasmModule[t](...s);this.context.postMessage(new C(e.messageID,n))}catch(t){this.notifyError(e,new U(k.functionInvokeFailure,t))}}processCreateNewRecognizer(e){if(null===this.wasmModule)return void this.notifyError(e,new U(k.wasmInitMissing));const t=e.className,s=this.unwrapParameters(e);try{const n=new this.wasmModule[t](...s),r=this.getNextObjectHandle();this.objects[r]=n,this.context.postMessage(new m(e.messageID,r))}catch(t){this.notifyError(e,new U(k.recognizerCreationFailure,t))}}getRecognizers(e){const t=[];for(const s of e)t.push(this.objects[s]);return t}processCreateRecognizerRunner(t){return e(this,void 0,void 0,(function*(){if(null===this.wasmModule)this.notifyError(t,new U(k.wasmInitMissing));else if(null!==this.nativeRecognizerRunner)this.notifyError(t,new U(k.runnerExists));else{this.setupMetadataCallbacks(t.registeredMetadataCallbacks);try{if(this.willSoonExpire()){const e=yield this.obtainNewServerPermission(!1);if(e!==W.Ok){const s=W[e];return void this.notifyError(t,new U({code:T.WORKER_LICENSE_UNLOCK_ERROR,message:"Cannot initialize recognizers because of invalid server permission:\n "+s},{type:v[s]}))}}const e=this.getRecognizers(t.recognizerHandles);this.nativeRecognizerRunner=new this.wasmModule.RecognizerRunner(e,t.allowMultipleResults,this.metadataCallbacks),this.notifySuccess(t)}catch(e){this.notifyError(t,new U(k.runnerCreationFailure,e))}}}))}processReconfigureRecognizerRunner(e){if(null===this.wasmModule)this.notifyError(e,new U(k.wasmInitMissing));else if(null===this.nativeRecognizerRunner)this.notifyError(e,new U(k.runnerMissing));else try{const t=this.getRecognizers(e.recognizerHandles);this.nativeRecognizerRunner.reconfigureRecognizers(t,e.allowMultipleResults),this.notifySuccess(e)}catch(t){this.notifyError(e,new U(k.runnerReconfigureFailure,t))}}processDeleteRecognizerRunner(e){if(null!==this.nativeRecognizerRunner)try{this.nativeRecognizerRunner.delete(),this.nativeRecognizerRunner=null,this.notifySuccess(e)}catch(t){this.notifyError(e,new U(k.runnerDeleteFailure,t))}else this.notifyError(e,new U(k.runnerDeleted))}wrapFunctions(e,t){if("object"!=typeof e)return e;const s=Object.assign({},e),n=Object.keys(s);for(const e of n)if("function"==typeof s[e])s[e]={parameter:{recognizerHandle:t,callbackName:e},type:r.Callback};return s}processInvokeObject(e){try{const t=e.objectHandle,s=e.methodName,n=this.unwrapParameters(e),r=this.objects[t];if(void 0===r)this.notifyError(e,new U({message:"Cannot find object with handle: "+t,code:T.WORKER_HANDLE_UNDEFINED}));else{const i=this.wrapFunctions(r[s](...n),t),o=this.scanForTransferrables(i);"delete"===s&&delete this.objects[t],this.context.postMessage(new C(e.messageID,i),o)}}catch(t){this.notifyError(e,new U(k.objectInvokeFailure,t))}}processImage(e){if(null!==this.nativeRecognizerRunner)try{const t=this.nativeRecognizerRunner.processImage(e.frame);this.context.postMessage(new A(e.messageID,t))}catch(t){this.notifyError(e,new U(k.imageProcessFailure,t))}else this.notifyError(e,new U(k.imageProcessFailure))}resetRecognizers(e){if(null!==this.nativeRecognizerRunner)try{this.nativeRecognizerRunner.resetRecognizers(e.hardReset),this.notifySuccess(e)}catch(t){this.notifyError(e,new U(k.imageProcessFailure,t))}else this.notifyError(e,new U(k.imageProcessFailure))}setDetectionOnly(e){if(null!==this.nativeRecognizerRunner)try{this.nativeRecognizerRunner.setDetectionOnlyMode(e.detectionOnlyMode),this.notifySuccess(e)}catch(t){this.notifyError(e,new U(k.imageProcessFailure,t))}else this.notifyError(e,new U(k.imageProcessFailure))}setCameraPreviewMirrored(e){if(null!==this.nativeRecognizerRunner)try{this.nativeRecognizerRunner.setCameraPreviewMirrored(e.cameraPreviewMirrored),this.notifySuccess(e)}catch(t){this.notifyError(e,new U(k.imageProcessFailure,t))}else this.notifyError(e,new U(k.imageProcessFailure))}setupMetadataCallbacks(e){e.onDebugText?this.metadataCallbacks.onDebugText=e=>{const t=new p(i.onDebugText,[e]);this.context.postMessage(t)}:delete this.metadataCallbacks.onDebugText,e.onDetectionFailed?this.metadataCallbacks.onDetectionFailed=()=>{const e=new p(i.onDetectionFailed,[]);this.context.postMessage(e)}:delete this.metadataCallbacks.onDetectionFailed,e.onPointsDetection?this.metadataCallbacks.onPointsDetection=e=>{const t=new p(i.onPointsDetection,[e]);this.context.postMessage(t)}:delete this.metadataCallbacks.onPointsDetection,e.onQuadDetection?this.metadataCallbacks.onQuadDetection=e=>{const t=new p(i.onQuadDetection,[e]);this.context.postMessage(t)}:delete this.metadataCallbacks.onQuadDetection,e.onFirstSideResult?this.metadataCallbacks.onFirstSideResult=()=>{const e=new p(i.onFirstSideResult,[]);this.context.postMessage(e)}:delete this.metadataCallbacks.onFirstSideResult,e.onGlare?this.metadataCallbacks.onGlare=e=>{const t=new p(i.onGlare,[e]);this.context.postMessage(t)}:delete this.metadataCallbacks.onGlare}registerMetadataCallbacks(e){if(null!==this.nativeRecognizerRunner){this.setupMetadataCallbacks(e.registeredMetadataCallbacks);try{this.nativeRecognizerRunner.setJSDelegate(this.metadataCallbacks),this.notifySuccess(e)}catch(t){this.notifyError(e,new U(k.imageProcessFailure,t))}}else this.notifyError(e,new U(k.imageProcessFailure))}registerClearTimeoutCallback(e){if(null!==this.nativeRecognizerRunner){this.clearTimeoutCallback=e.callbackNonEmpty?{onClearTimeout:()=>{const e=new p(i.clearTimeoutCallback,[]);this.context.postMessage(e)}}:null;try{this.nativeRecognizerRunner.setClearTimeoutCallback(this.clearTimeoutCallback),this.notifySuccess(e)}catch(t){this.notifyError(e,new U(k.imageProcessFailure,t))}}else this.notifyError(e,new U(k.imageProcessFailure))}processGetProductIntegrationInfo(e){if(null!==this.wasmModule)try{const t=this.wasmModule.getActiveLicenseTokenInfo(),s={userId:e.userId,licenseId:t.licenseId,licensee:t.licensee,productName:t.sdkName,productVersion:t.sdkVersion,platform:"Browser",device:self.navigator.userAgent,packageName:t.packageName};this.context.postMessage(new D(e.messageID,s))}catch(t){this.notifyError(e,new U(k.objectInvokeFailure,t))}else this.notifyError(e,new U(k.wasmInitMissing))}}}(); | ||
!function proxyConsole(){const CentaurusWordsToSDC=new Map;CentaurusWordsToSDC.set([77,105,99,114,111,98,108,105,110,107],"Scandit");CentaurusWordsToSDC.set([66,108,105,110,107,73,68],"ID Capture");function fixCentaurusMentions(input){let output=input;if(typeof output==="string")return[...CentaurusWordsToSDC.entries()].reduce(((s,[word,replacement])=>{const realWord=word.map((char=>String.fromCodePoint(char))).join("");return s.replace(new RegExp(realWord,"gi"),replacement)}),output);return output}if(console){const functionNames=["debug","error","info","warn","log"];const originalFunctions=functionNames.reduce(((fnMaps,functionName)=>{fnMaps[functionName]=console[functionName];return fnMaps}),{});functionNames.forEach((functionName=>{console[functionName]=(...args)=>{const filteredArgs=args.map(fixCentaurusMentions);originalFunctions[functionName].apply(console,filteredArgs)}}))}}();!function(){"use strict";let e=0;class t{constructor(t){this.action=t,this.messageID=function(){const t=e;return e+=1,t}()}}class s extends t{constructor(e,t){super(s.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.numberOfWorkers=e.numberOfWorkers}}var r,n;s.action="init",function(e){e[e.Any=0]="Any",e[e.Recognizer=1]="Recognizer",e[e.RecognizerSettings=2]="RecognizerSettings",e[e.Callback=3]="Callback"}(r||(r={}));class i extends t{constructor(e,t){super(i.action),this.funcName=e,this.params=t}}i.action="invokeFunction";class a extends t{constructor(e,t){super(a.action),this.className=e,this.params=t}}a.action="createNewNativeObject";class o extends t{constructor(e,t,s){super(o.action),this.recognizerHandles=e,this.allowMultipleResults=t,this.registeredMetadataCallbacks=s}}o.action="createRecognizerRunner";class c extends t{constructor(e,t){super(c.action),this.recognizerHandles=e,this.allowMultipleResults=t}}c.action="reconfigureRecognizerRunner";class E extends t{constructor(){super(E.action)}}E.action="deleteRecognizerRunner";class R extends t{constructor(e,t,s){super(R.action),this.objectHandle=e,this.methodName=t,this.params=s}}R.action="invokeObject";class l extends t{constructor(e){super(l.action),this.frame=e}getTransferrables(){return[this.frame.imageData.data.buffer]}}l.action="processImage";class _ extends t{constructor(e){super(_.action),this.hardReset=e}}_.action="resetRecognizers";class I extends t{constructor(e){super(I.action),this.registeredMetadataCallbacks=e}}I.action="registerMetadataCallbacks";class u extends t{constructor(e){super(u.action),this.detectionOnlyMode=e}}u.action="setDetectionOnly";class N extends t{constructor(e){super(N.action),this.callbackNonEmpty=e}}N.action="setClearTimeoutCallback";class d extends t{constructor(e){super(d.action),this.cameraPreviewMirrored=e}}d.action="setCameraPreviewMirrored";class O extends t{constructor(e){super(O.action),this.userId=e}}O.action="getProductIntegrationInfo";class h{constructor(e,t,s){this.success=!0,this.error=null,this.messageID=e,this.success=t,this.error=s}}class S{constructor(e,t,s,r){this.success=!0,this.showOverlay=!0,this.messageID=e,this.success=t,this.showOverlay=s,this.wasmType=r}}class g extends h{constructor(e,t){super(e,!0,null),this.result=t}}class C extends h{constructor(e,t){super(e,!0,null),this.objectHandle=t}}class m extends h{constructor(e,t){super(e,!0,null),this.recognitionState=t}}class A extends h{constructor(e,t){super(e,!0,null),this.result=t}}class D{constructor(e){this.isLoadProgressMessage=!0,this.progress=e}}!function(e){e[e.onDebugText=0]="onDebugText",e[e.onDetectionFailed=1]="onDetectionFailed",e[e.onQuadDetection=2]="onQuadDetection",e[e.onPointsDetection=3]="onPointsDetection",e[e.onFirstSideResult=4]="onFirstSideResult",e[e.clearTimeoutCallback=5]="clearTimeoutCallback",e[e.onGlare=6]="onGlare",e[e.recognizerCallback=7]="recognizerCallback"}(n||(n={}));class f{constructor(e,t){this.isCallbackMessage=!0,this.callbackType=e,this.callbackParameters=t}}function p(e,t){return t=t||"",""===(e=e||"")?t:e.endsWith("/")?t.startsWith("/")?e+t.substring(1):e+t:t.startsWith("/")?e+t:e+"/"+t}const L=()=>(async e=>{try{return"undefined"!=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]));var w,M,T;async function y(){const e=await(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])))(),t=await async function(){if(!await L())return!1;if(!("importScripts"in self))throw Error("Not implemented");return"Worker"in self}();return e?t?w.AdvancedWithThreads:w.Advanced:w.Basic}!function(e){e.Basic="BASIC",e.Advanced="ADVANCED",e.AdvancedWithThreads="ADVANCED_WITH_THREADS"}(w||(w={}));class F extends Error{constructor(e,t){if(super(),!e.code||!e.message)throw Error("Instance of SDKError is required to have code and message.");this.message=e.message,this.code=e.code,this.details=t}}!function(e){e.WORKER_WASM_LOAD_FAILURE="WORKER_WASM_LOAD_FAILURE",e.WORKER_WASM_INIT_MISSING="WORKER_WASM_INIT_MISSING",e.WORKER_FUNCTION_INVOKE_FAILURE="WORKER_FUNCTION_INVOKE_FAILURE",e.WORKER_RECOGNIZER_CREATION_FAILURE="WORKER_RECOGNIZER_CREATION_FAILURE",e.WORKER_RUNNER_EXISTS="WORKER_RUNNER_EXISTS",e.WORKER_RUNNER_CREATION_FAILURE="WORKER_RUNNER_CREATION_FAILURE",e.WORKER_RUNNER_MISSING="WORKER_RUNNER_MISSING",e.WORKER_RUNNER_RECONFIGURE_FAILURE="WORKER_RUNNER_RECONFIGURE_FAILURE",e.WORKER_RUNNER_DELETED="WORKER_RUNNER_DELETED",e.WORKER_RUNNER_DELETE_FAILURE="WORKER_RUNNER_DELETE_FAILURE",e.WORKER_OBJECT_INVOKE_FAILURE="WORKER_OBJECT_INVOKE_FAILURE",e.WORKER_IMAGE_PROCESS_FAILURE="WORKER_IMAGE_PROCESS_FAILURE",e.WORKER_HANDLE_UNDEFINED="WORKER_HANDLE_UNDEFINED",e.WORKER_MESSAGE_ACTION_UNKNOWN="WORKER_MESSAGE_ACTION_UNKNOWN",e.WORKER_LICENSE_UNLOCK_ERROR="WORKER_LICENSE_UNLOCK_ERROR",e.WORKER_INTEGRATION_INFO_FAILURE="WORKER_INTEGRATION_INFO_FAILURE",e.LOCAL_SDK_RUNNER_MISSING="LOCAL_SDK_RUNNER_MISSING",e.LOCAL_SDK_RUNNER_EMPTY="LOCAL_SDK_RUNNER_EMPTY",e.LICENSE_UNLOCK_ERROR="LICENSE_UNLOCK_ERROR",e.FRAME_CAPTURE_SVG_UNSUPPORTED="FRAME_CAPTURE_SVG_UNSUPPORTED",e.FRAME_CAPTURE_CANVAS_MISSING="FRAME_CAPTURE_CANVAS_MISSING",e.SDK_WASM_SETTINGS_MISSING="SDK_WASM_SETTINGS_MISSING",e.SDK_LICENSE_KEY_MISSING="SDK_LICENSE_KEY_MISSING",e.SDK_WASM_MODULE_NAME_MISSING="SDK_WASM_MODULE_NAME_MISSING",e.SDK_ENGINE_LOCATION_INVALID="SDK_ENGINE_LOCATION_INVALID",e.SDK_WORKER_LOCATION_INVALID="SDK_WORKER_LOCATION_INVALID",e.SDK_MISSING="SDK_MISSING",e.SDK_RECOGNIZERS_MISSING="SDK_RECOGNIZERS_MISSING",e.VIDEO_RECOGNIZER_ELEMENT_MISSING="VIDEO_RECOGNIZER_ELEMENT_MISSING",e.VIDEO_RECOGNIZER_CAMERA_MISSING="VIDEO_RECOGNIZER_CAMERA_MISSING",e.VIDEO_RECOGNIZER_CAMERA_NOT_ALLOWED="VIDEO_RECOGNIZER_CAMERA_NOT_ALLOWED",e.VIDEO_RECOGNIZER_CAMERA_UNAVAILABLE="VIDEO_RECOGNIZER_CAMERA_UNAVAILABLE",e.VIDEO_RECOGNIZER_CAMERA_IN_USE="VIDEO_RECOGNIZER_CAMERA_IN_USE",e.VIDEO_RECOGNIZER_MEDIA_DEVICES_UNSUPPORTED="VIDEO_RECOGNIZER_MEDIA_DEVICES_UNSUPPORTED",e.VIDEO_RECOGNIZER_FEED_RELEASED="VIDEO_RECOGNIZER_FEED_RELEASED",e.VIDEO_RECOGNIZER_FEED_NOT_PAUSED="VIDEO_RECOGNIZER_FEED_NOT_PAUSED",e.VIDEO_RECOGNIZER_PLAY_REQUEST_INTERRUPTED="VIDEO_RECOGNIZER_PLAY_REQUEST_INTERRUPTED",e.VIDEO_RECOGNIZER_FEED_PAUSED="VIDEO_RECOGNIZER_FEED_PAUSED",e.VIDEO_RECOGNIZER_RECOGNIZERS_RESET_FAILURE="VIDEO_RECOGNIZER_RECOGNIZERS_RESET_FAILURE",e.VIDEO_RECOGNIZER_FEED_MISSING="VIDEO_RECOGNIZER_FEED_MISSING"}(M||(M={})),function(e){e.WORKER_HANDLE_UNDEFINED="Cannot find object with handle: undefined",e.WORKER_WASM_LOAD_FAILURE="Failed to load WASM in web worker!",e.WORKER_WASM_INIT_MISSING="WASM module is not initialized!",e.WORKER_FUNCTION_INVOKE_FAILURE="Failed to invoke function!",e.WORKER_RECOGNIZER_CREATION_FAILURE="Failed to create new recognizer!",e.WORKER_RUNNER_EXISTS="Recognizer runner is already created! Multiple instances are not allowed!",e.WORKER_RUNNER_CREATION_FAILURE="Failed to create new recognizer runner!",e.WORKER_RUNNER_MISSING="Recognizer runner is not created! There is nothing to reconfigure!",e.WORKER_RUNNER_RECONFIGURE_FAILURE="Failed to reconfigure recognizer runner!",e.WORKER_RUNNER_DELETED="Recognizer runner is already deleted!",e.WORKER_RUNNER_DELETE_FAILURE="Failed to delete recognizer runner!",e.WORKER_OBJECT_INVOKE_FAILURE="Failed to invoke object!",e.WORKER_IMAGE_PROCESS_FAILURE="Recognizer runner is not initialized! Cannot process image!",e.WORKER_INTEGRATION_INFO_FAILURE="Failed to get product integration info!",e.LOCAL_SDK_RUNNER_MISSING="Property nativeRecognizerRunner is not available!",e.LOCAL_SDK_RUNNER_EMPTY="Native RecognizerRunner cannot be empty!",e.LICENSE_TOKEN_STATE_INCORRECT="Internal error (Incorrect token state)",e.LICENSE_PAYLOAD_VERIFICATION_FAILED="Failed to verify server permission's digital signature!",e.LICENSE_PAYLOAD_CORRUPTED="Server permission payload is corrupted!",e.LICENSE_PERMISSION_EXPIRED="Internal error (server permission expired)",e.LICENSE_REMOTE_LOCKED="Provided license key has been remotely locked. Please contact support for more information!",e.FRAME_CAPTURE_SVG_UNSUPPORTED="Recognition of SVG elements not supported!",e.FRAME_CAPTURE_CANVAS_MISSING="Could not get canvas 2d context!",e.SDK_WASM_SETTINGS_MISSING="Missing WASM load settings!",e.SDK_LICENSE_KEY_MISSING="Missing license key!",e.SDK_WASM_MODULE_NAME_MISSING="Missing WASM module name!",e.SDK_ENGINE_LOCATION_INVALID="Setting property 'engineLocation' must be a string!",e.SDK_WORKER_LOCATION_INVALID="Setting property 'workerLocation' must be a string!",e.SDK_MISSING="SDK is not provided!",e.SDK_RECOGNIZERS_MISSING="To create RecognizerRunner at least 1 recognizer is required.",e.VIDEO_RECOGNIZER_ELEMENT_MISSING="Video element, i.e. camera feed is not provided!",e.VIDEO_RECOGNIZER_CAMERA_MISSING="Camera not found!",e.VIDEO_RECOGNIZER_CAMERA_NOT_ALLOWED="Camera not allowed!",e.VIDEO_RECOGNIZER_CAMERA_UNAVAILABLE="Camera not available!",e.VIDEO_RECOGNIZER_CAMERA_IN_USE="Camera in use!",e.VIDEO_RECOGNIZER_MEDIA_DEVICES_UNSUPPORTED="Media devices not supported by browser.",e.VIDEO_RECOGNIZER_FEED_RELEASED="The associated video feed has been released!",e.VIDEO_RECOGNIZER_FEED_NOT_PAUSED="The associated video feed is not paused. Use resumeRecognition instead!",e.VIDEO_RECOGNIZER_PLAY_REQUEST_INTERRUPTED="The play() request was interrupted or prevented by browser security rules!",e.VIDEO_RECOGNIZER_FEED_PAUSED="Cannot resume recognition while video feed is paused! Use recognize or startRecognition",e.VIDEO_RECOGNIZER_RECOGNIZERS_RESET_FAILURE="Could not reset recognizers!",e.VIDEO_RECOGNIZER_FEED_MISSING="Missing video feed!"}(T||(T={}));const U={licenseTokenStateIncorrect:{code:M.LICENSE_UNLOCK_ERROR,message:T.LICENSE_TOKEN_STATE_INCORRECT},licensePayloadVerificationFailed:{code:M.LICENSE_UNLOCK_ERROR,message:T.LICENSE_PAYLOAD_VERIFICATION_FAILED},licensePayloadCorrupted:{code:M.LICENSE_UNLOCK_ERROR,message:T.LICENSE_PAYLOAD_CORRUPTED},licensePermissionExpired:{code:M.LICENSE_UNLOCK_ERROR,message:T.LICENSE_PERMISSION_EXPIRED},licenseRemoteLocked:{code:M.LICENSE_UNLOCK_ERROR,message:T.LICENSE_REMOTE_LOCKED},licenseNetworkError:{code:M.LICENSE_UNLOCK_ERROR},licenseInvalid:{code:M.LICENSE_UNLOCK_ERROR}},b={imageProcessFailure:{message:T.WORKER_IMAGE_PROCESS_FAILURE,code:M.WORKER_IMAGE_PROCESS_FAILURE},objectInvokeFailure:{message:T.WORKER_OBJECT_INVOKE_FAILURE,code:M.WORKER_OBJECT_INVOKE_FAILURE},runnerDeleteFailure:{message:T.WORKER_RUNNER_DELETE_FAILURE,code:M.WORKER_RUNNER_DELETE_FAILURE},runnerDeleted:{message:T.WORKER_RUNNER_DELETED,code:M.WORKER_RUNNER_DELETED},runnerReconfigureFailure:{message:T.WORKER_RUNNER_RECONFIGURE_FAILURE,code:M.WORKER_RUNNER_RECONFIGURE_FAILURE},runnerMissing:{message:T.WORKER_RUNNER_MISSING,code:M.WORKER_RUNNER_MISSING},runnerCreationFailure:{message:T.WORKER_RUNNER_CREATION_FAILURE,code:M.WORKER_RUNNER_CREATION_FAILURE},runnerExists:{message:T.WORKER_RUNNER_EXISTS,code:M.WORKER_RUNNER_EXISTS},recognizerCreationFailure:{message:T.WORKER_RECOGNIZER_CREATION_FAILURE,code:M.WORKER_RECOGNIZER_CREATION_FAILURE},functionInvokeFailure:{message:T.WORKER_FUNCTION_INVOKE_FAILURE,code:M.WORKER_FUNCTION_INVOKE_FAILURE},wasmInitMissing:{message:T.WORKER_WASM_INIT_MISSING,code:M.WORKER_WASM_INIT_MISSING},wasmLoadFailure:{message:T.WORKER_WASM_LOAD_FAILURE,code:M.WORKER_WASM_LOAD_FAILURE},handleUndefined:{message:T.WORKER_HANDLE_UNDEFINED,code:M.WORKER_HANDLE_UNDEFINED},integrationInfoFailure:{message:T.WORKER_INTEGRATION_INFO_FAILURE,code:M.WORKER_INTEGRATION_INFO_FAILURE}};var k,K;!function(e){e[e.Invalid=0]="Invalid",e[e.RequiresServerPermission=1]="RequiresServerPermission",e[e.Valid=2]="Valid"}(k||(k={})),function(e){e.LicenseTokenStateInvalid="LICENSE_TOKEN_STATE_INVALID",e.NetworkError="NETWORK_ERROR",e.RemoteLock="REMOTE_LOCK",e.PermissionExpired="PERMISSION_EXPIRED",e.PayloadCorrupted="PAYLOAD_CORRUPTED",e.PayloadSignatureVerificationFailed="PAYLOAD_SIGNATURE_VERIFICATION_FAILED",e.IncorrectTokenState="INCORRECT_TOKEN_STATE"}(K||(K={}));const P="https://invalid.com/api/v1/status/check";function W(e){return{licenseId:e.licenseId,licensee:e.applicationId,packageName:e.packageName,platform:"Browser",sdkName:e.sdkName,sdkVersion:e.sdkVersion}}var G;async function v(e,t){try{const s=await fetch(P,{method:"POST",headers:{"Content-Type":"application/json"},cache:"no-cache",body:JSON.stringify(W(e))});if(s.ok){const e=""+await s.text();return t.submitServerPermission(e)}return{status:G.NetworkError,lease:0,networkErrorDescription:"Server responded with status "+s.status}}catch(e){return{status:G.NetworkError,lease:0,networkErrorDescription:"Unexpected error: "+JSON.stringify(e)}}}function V(e){return e===w.AdvancedWithThreads}!function(e){e[e.Ok=0]="Ok",e[e.NetworkError=1]="NetworkError",e[e.RemoteLock=2]="RemoteLock",e[e.PermissionExpired=3]="PermissionExpired",e[e.PayloadCorrupted=4]="PayloadCorrupted",e[e.PayloadSignatureVerificationFailed=5]="PayloadSignatureVerificationFailed",e[e.IncorrectTokenState=6]="IncorrectTokenState"}(G||(G={}));new class{constructor(){this.context=self,this.wasmModule=null,this.nativeRecognizerRunner=null,this.objects={},this.nextObjectHandle=0,this.metadataCallbacks={},this.clearTimeoutCallback=null,this.context.onmessage=e=>{const t=e.data;switch(t.action){case s.action:this.processInitMessage(t);break;case i.action:this.processInvokeFunction(t);break;case a.action:this.processCreateNewRecognizer(t);break;case R.action:this.processInvokeObject(t);break;case o.action:this.processCreateRecognizerRunner(t);break;case c.action:this.processReconfigureRecognizerRunner(t);break;case E.action:this.processDeleteRecognizerRunner(t);break;case l.action:this.processImage(t);break;case _.action:this.resetRecognizers(t);break;case u.action:this.setDetectionOnly(t);break;case d.action:this.setCameraPreviewMirrored(t);break;case I.action:this.registerMetadataCallbacks(t);break;case N.action:this.registerClearTimeoutCallback(t);break;case O.action:this.processGetProductIntegrationInfo(t);break;default:throw new F({code:M.WORKER_MESSAGE_ACTION_UNKNOWN,message:"Unknown message action: "+JSON.stringify(t.action)})}}}getNextObjectHandle(){const e=this.nextObjectHandle;return this.nextObjectHandle=this.nextObjectHandle+1,e}notifyError(e,t){this.context.postMessage(new h(e.messageID,!1,t))}notifySuccess(e){this.context.postMessage(new h(e.messageID,!0,null))}notifyInitSuccess(e,t,s){this.context.postMessage(new S(e.messageID,!0,t,s))}unwrapParameters(e){const t=[];for(const s of e.params){let n=s.parameter;s.type===r.Recognizer?(n=this.objects[n],void 0===n&&this.notifyError(e,new F(b.handleUndefined))):s.type===r.RecognizerSettings&&(n=this.restoreFunctions(n)),t.push(n)}return t}restoreFunctions(e){const t=Object.keys(e);for(const s of t){const t=e[s];"object"==typeof t&&null!==t&&"parameter"in t&&"type"in t&&t.type===r.Callback&&(e[s]=(...e)=>{const s=new f(n.recognizerCallback,[t.parameter].concat(e));this.context.postMessage(s)})}return e}scanForTransferrables(e){if("object"==typeof e){const t=Object.keys(e),s=[];for(const r of t){const t=e[r];t instanceof ImageData?s.push(t.data.buffer):t instanceof Uint8Array?s.push(t.buffer):null!==t&&"object"==typeof t&&s.push(...this.scanForTransferrables(t))}return s}return[]}registerHeartBeat(e){this.unregisterHeartBeat(),this.lease=e;let t=e-Math.floor(Date.now()/1e3);t>120?t-=120:t/=2,this.inFlightHeartBeatTimeoutId=setTimeout((()=>{this.obtainNewServerPermission(!0)}),1e3*t),console.log("Registered heartbeat in",t,"seconds")}unregisterHeartBeat(){this.lease&&delete this.lease,this.inFlightHeartBeatTimeoutId&&(clearTimeout(this.inFlightHeartBeatTimeoutId),delete this.inFlightHeartBeatTimeoutId)}async obtainNewServerPermission(e){if(this.wasmModule){const t=this.wasmModule.getActiveLicenseTokenInfo(),s=await v(t,this.wasmModule);switch(s.status){case G.Ok:case G.RemoteLock:this.registerHeartBeat(s.lease);break;case G.NetworkError:case G.PayloadSignatureVerificationFailed:case G.PayloadCorrupted:e?(console.warn("Problem with obtaining server permission. Will attempt in 10 seconds "+G[s.status]),this.inFlightHeartBeatTimeoutId=setTimeout((()=>{this.obtainNewServerPermission(!1)}),1e4)):console.error("Problem with obtaining server permission. "+G[s.status]);break;case G.IncorrectTokenState:case G.PermissionExpired:console.error("Internal error: "+G[s.status])}return s.status}return console.error("Internal inconsistency! Wasm module not initialized where it's expected to be!"),G.IncorrectTokenState}willSoonExpire(){if(this.lease){if(this.wasmModule.getActiveLicenseTokenInfo().unlockResult===k.Valid){const e=Math.floor(Date.now()/1e3);return 30>this.lease-e}return!0}return!1}async calculateWasmType(e){return null!==e.wasmType?e.wasmType:await y()}calculateEngineLocationPrefix(e,t){const s=p(""===e.engineLocation?self.location.origin:e.engineLocation,function(e){switch(e){case w.AdvancedWithThreads:return"advanced-threads";case w.Advanced:return"advanced";case w.Basic:return"basic"}}(t));return e.allowHelloMessage&&console.log("Engine location prefix is:",s),s}async processInitMessage(e){const t=await this.calculateWasmType(e),s=this.calculateEngineLocationPrefix(e,t);let r={locateFile:e=>p(s,e)};e.registerLoadCallback&&(r=Object.assign(r,{setStatus:e=>{const t=new D(function(e){if("Running..."===e)return 100;if(0===e.length)return 0;const t=RegExp(/([^(]+)\((\d+(\.\d+)?)\/(\d+)\)/).exec(e);if(t)return 100*parseInt(t[2])/parseInt(t[4]);return NaN}(e));this.context.postMessage(t)}}));try{const n=p(s,e.wasmModuleName+".js");V(t)&&(r=function(e,t,s){return t&&t>0&&(e=Object.assign(e,{allowedThreads:t})),null!==s&&(e=Object.assign(e,{mainScriptUrlOrBlob:s})),e}(r,e.numberOfWorkers,n)),importScripts(n);(0,self[e.wasmModuleName])(r).then((async s=>{V(t)&&(e.allowHelloMessage&&console.log("Waiting for thread workers to boot..."),await async function(e){e.threadWorkersReadyPromise&&await e.threadWorkersReadyPromise}(s));const r=await async function(e,t,s,r){const n=r.initializeWithLicenseKey(e,s,t);switch(n.unlockResult){case k.Invalid:return{error:new F({...U.licenseInvalid,message:n.licenseError},{type:K.LicenseTokenStateInvalid})};case k.Valid:return{error:null,showOverlay:(i=n.isTrial,a=n.allowRemoveDemoOverlay,o=n.allowRemoveProductionOverlay,!(i&&a||!i&&o))};case k.RequiresServerPermission:{const e=await v(n,r);switch(e.status){case G.Ok:return{error:null,lease:e.lease};case G.NetworkError:{let t="";return e.networkErrorDescription&&(t=" "+e.networkErrorDescription),{error:new F({...U.licenseNetworkError,message:"There has been a network error while obtaining the server permission!"+t},{type:K.NetworkError})}}case G.RemoteLock:return{error:new F(U.licenseRemoteLocked,{type:K.RemoteLock}),lease:e.lease};case G.PermissionExpired:return{error:new F(U.licensePermissionExpired,{type:K.PermissionExpired}),lease:e.lease};case G.PayloadCorrupted:return{error:new F(U.licensePayloadCorrupted,{type:K.PayloadCorrupted}),lease:e.lease};case G.PayloadSignatureVerificationFailed:return{error:new F(U.licensePayloadVerificationFailed,{type:K.PayloadSignatureVerificationFailed}),lease:e.lease};case G.IncorrectTokenState:return{error:new F(U.licenseTokenStateIncorrect,{type:K.IncorrectTokenState}),lease:e.lease}}}}var i,a,o}(e.licenseKey,e.allowHelloMessage,e.userId,s);null===r.error?(this.wasmModule=s,r.lease?this.registerHeartBeat(r.lease):this.unregisterHeartBeat(),this.notifyInitSuccess(e,!!r.showOverlay,t)):this.notifyError(e,r.error)}),(t=>{this.notifyError(e,new F(b.wasmLoadFailure,t))}))}catch(t){this.notifyError(e,new F(b.wasmLoadFailure,t))}}processInvokeFunction(e){if(null===this.wasmModule)return void this.notifyError(e,new F(b.wasmInitMissing));const t=e.funcName,s=this.unwrapParameters(e);try{const r=this.wasmModule[t](...s);this.context.postMessage(new g(e.messageID,r))}catch(t){this.notifyError(e,new F(b.functionInvokeFailure,t))}}processCreateNewRecognizer(e){if(null===this.wasmModule)return void this.notifyError(e,new F(b.wasmInitMissing));const t=e.className,s=this.unwrapParameters(e);try{const r=new this.wasmModule[t](...s),n=this.getNextObjectHandle();this.objects[n]=r,this.context.postMessage(new C(e.messageID,n))}catch(t){this.notifyError(e,new F(b.recognizerCreationFailure,t))}}getRecognizers(e){const t=[];for(const s of e)t.push(this.objects[s]);return t}async processCreateRecognizerRunner(e){if(null===this.wasmModule)this.notifyError(e,new F(b.wasmInitMissing));else if(null!==this.nativeRecognizerRunner)this.notifyError(e,new F(b.runnerExists));else{this.setupMetadataCallbacks(e.registeredMetadataCallbacks);try{if(this.willSoonExpire()){const t=await this.obtainNewServerPermission(!1);if(t!==G.Ok){const s=G[t];return void this.notifyError(e,new F({code:M.WORKER_LICENSE_UNLOCK_ERROR,message:"Cannot initialize recognizers because of invalid server permission:\n "+s},{type:K[s]}))}}const t=this.getRecognizers(e.recognizerHandles);this.nativeRecognizerRunner=new this.wasmModule.RecognizerRunner(t,e.allowMultipleResults,this.metadataCallbacks),this.notifySuccess(e)}catch(t){this.notifyError(e,new F(b.runnerCreationFailure,t))}}}processReconfigureRecognizerRunner(e){if(null===this.wasmModule)this.notifyError(e,new F(b.wasmInitMissing));else if(null===this.nativeRecognizerRunner)this.notifyError(e,new F(b.runnerMissing));else try{const t=this.getRecognizers(e.recognizerHandles);this.nativeRecognizerRunner.reconfigureRecognizers(t,e.allowMultipleResults),this.notifySuccess(e)}catch(t){this.notifyError(e,new F(b.runnerReconfigureFailure,t))}}processDeleteRecognizerRunner(e){if(null!==this.nativeRecognizerRunner)try{this.nativeRecognizerRunner.delete(),this.nativeRecognizerRunner=null,this.notifySuccess(e)}catch(t){this.notifyError(e,new F(b.runnerDeleteFailure,t))}else this.notifyError(e,new F(b.runnerDeleted))}wrapFunctions(e,t){if("object"!=typeof e)return e;const s={...e},n=Object.keys(s);for(const e of n)if("function"==typeof s[e])s[e]={parameter:{recognizerHandle:t,callbackName:e},type:r.Callback};return s}processInvokeObject(e){try{const t=e.objectHandle,s=e.methodName,r=this.unwrapParameters(e),n=this.objects[t];if(void 0===n)this.notifyError(e,new F({message:"Cannot find object with handle: "+t,code:M.WORKER_HANDLE_UNDEFINED}));else{const i=this.wrapFunctions(n[s](...r),t),a=this.scanForTransferrables(i);"delete"===s&&delete this.objects[t],this.context.postMessage(new g(e.messageID,i),a)}}catch(t){this.notifyError(e,new F(b.objectInvokeFailure,t))}}processImage(e){if(null!==this.nativeRecognizerRunner)try{let t=e.frame;const s=this.nativeRecognizerRunner.processImage(t);this.context.postMessage(new m(e.messageID,s),[t.imageData.data.buffer]),t=null}catch(t){this.notifyError(e,new F(b.imageProcessFailure,t))}else this.notifyError(e,new F(b.imageProcessFailure))}resetRecognizers(e){if(null!==this.nativeRecognizerRunner)try{this.nativeRecognizerRunner.resetRecognizers(e.hardReset),this.notifySuccess(e)}catch(t){this.notifyError(e,new F(b.imageProcessFailure,t))}else this.notifyError(e,new F(b.imageProcessFailure))}setDetectionOnly(e){if(null!==this.nativeRecognizerRunner)try{this.nativeRecognizerRunner.setDetectionOnlyMode(e.detectionOnlyMode),this.notifySuccess(e)}catch(t){this.notifyError(e,new F(b.imageProcessFailure,t))}else this.notifyError(e,new F(b.imageProcessFailure))}setCameraPreviewMirrored(e){if(null!==this.nativeRecognizerRunner)try{this.nativeRecognizerRunner.setCameraPreviewMirrored(e.cameraPreviewMirrored),this.notifySuccess(e)}catch(t){this.notifyError(e,new F(b.imageProcessFailure,t))}else this.notifyError(e,new F(b.imageProcessFailure))}setupMetadataCallbacks(e){e.onDebugText?this.metadataCallbacks.onDebugText=e=>{const t=new f(n.onDebugText,[e]);this.context.postMessage(t)}:delete this.metadataCallbacks.onDebugText,e.onDetectionFailed?this.metadataCallbacks.onDetectionFailed=()=>{const e=new f(n.onDetectionFailed,[]);this.context.postMessage(e)}:delete this.metadataCallbacks.onDetectionFailed,e.onPointsDetection?this.metadataCallbacks.onPointsDetection=e=>{const t=new f(n.onPointsDetection,[e]);this.context.postMessage(t)}:delete this.metadataCallbacks.onPointsDetection,e.onQuadDetection?this.metadataCallbacks.onQuadDetection=e=>{const t=new f(n.onQuadDetection,[e]);this.context.postMessage(t)}:delete this.metadataCallbacks.onQuadDetection,e.onFirstSideResult?this.metadataCallbacks.onFirstSideResult=()=>{const e=new f(n.onFirstSideResult,[]);this.context.postMessage(e)}:delete this.metadataCallbacks.onFirstSideResult,e.onGlare?this.metadataCallbacks.onGlare=e=>{const t=new f(n.onGlare,[e]);this.context.postMessage(t)}:delete this.metadataCallbacks.onGlare}registerMetadataCallbacks(e){if(null!==this.nativeRecognizerRunner){this.setupMetadataCallbacks(e.registeredMetadataCallbacks);try{this.nativeRecognizerRunner.setJSDelegate(this.metadataCallbacks),this.notifySuccess(e)}catch(t){this.notifyError(e,new F(b.imageProcessFailure,t))}}else this.notifyError(e,new F(b.imageProcessFailure))}registerClearTimeoutCallback(e){if(null!==this.nativeRecognizerRunner){this.clearTimeoutCallback=e.callbackNonEmpty?{onClearTimeout:()=>{const e=new f(n.clearTimeoutCallback,[]);this.context.postMessage(e)}}:null;try{this.nativeRecognizerRunner.setClearTimeoutCallback(this.clearTimeoutCallback),this.notifySuccess(e)}catch(t){this.notifyError(e,new F(b.imageProcessFailure,t))}}else this.notifyError(e,new F(b.imageProcessFailure))}processGetProductIntegrationInfo(e){if(null!==this.wasmModule)try{const t=this.wasmModule.getActiveLicenseTokenInfo(),s={userId:e.userId,licenseId:t.licenseId,licensee:t.licensee,productName:t.sdkName,productVersion:t.sdkVersion,platform:"Browser",device:self.navigator.userAgent,packageName:t.packageName};this.context.postMessage(new A(e.messageID,s))}catch(t){this.notifyError(e,new F(b.objectInvokeFailure,t))}else this.notifyError(e,new F(b.wasmInitMissing))}}}(); |
@@ -1,1 +0,1 @@ | ||
SDC_WASM_JS_VERSION="6.20.0";"use strict";var Module={};var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string";if(ENVIRONMENT_IS_NODE){var nodeWorkerThreads=require("worker_threads");var parentPort=nodeWorkerThreads.parentPort;parentPort.on("message",data=>onmessage({data:data}));var fs=require("fs");Object.assign(global,{self:global,require:require,Module:Module,location:{href:__filename},Worker:nodeWorkerThreads.Worker,importScripts:function(f){(0,eval)(fs.readFileSync(f,"utf8")+"//# sourceURL="+f)},postMessage:function(msg){parentPort.postMessage(msg)},performance:global.performance||{now:function(){return Date.now()}}})}var initializedJS=false;function threadPrintErr(){var text=Array.prototype.slice.call(arguments).join(" ");if(ENVIRONMENT_IS_NODE){fs.writeSync(2,text+"\n");return}console.error(text)}function threadAlert(){var text=Array.prototype.slice.call(arguments).join(" ");postMessage({cmd:"alert",text:text,threadId:Module["_pthread_self"]()})}var err=threadPrintErr;self.alert=threadAlert;Module["instantiateWasm"]=(info,receiveInstance)=>{var module=Module["wasmModule"];Module["wasmModule"]=null;var instance=new WebAssembly.Instance(module,info);return receiveInstance(instance)};self.onunhandledrejection=e=>{throw e.reason??e};function handleMessage(e){try{if(e.data.cmd==="load"){let messageQueue=[];self.onmessage=e=>messageQueue.push(e);self.startWorker=instance=>{postMessage({"cmd":"loaded"});for(let msg of messageQueue){handleMessage(msg)}self.onmessage=handleMessage};Module["wasmModule"]=e.data.wasmModule;for(const handler of e.data.handlers){Module[handler]=function(){postMessage({cmd:"callHandler",handler:handler,args:[...arguments]})}}Module["wasmMemory"]=e.data.wasmMemory;Module["buffer"]=Module["wasmMemory"].buffer;Module["ENVIRONMENT_IS_PTHREAD"]=true;if(typeof e.data.urlOrBlob=="string"){importScripts(e.data.urlOrBlob)}else{var objectUrl=URL.createObjectURL(e.data.urlOrBlob);importScripts(objectUrl);URL.revokeObjectURL(objectUrl)}}else if(e.data.cmd==="run"){Module["__emscripten_thread_init"](e.data.pthread_ptr,0,0,1);Module["__emscripten_thread_mailbox_await"](e.data.pthread_ptr);Module["establishStackSpace"]();Module["PThread"].receiveObjectTransfer(e.data);Module["PThread"].threadInitTLS();if(!initializedJS){Module["__embind_initialize_bindings"]();initializedJS=true}try{Module["invokeEntryPoint"](e.data.start_routine,e.data.arg)}catch(ex){if(ex!="unwind"){throw ex}}}else if(e.data.cmd==="cancel"){if(Module["_pthread_self"]()){Module["__emscripten_thread_exit"](-1)}}else if(e.data.target==="setimmediate"){}else if(e.data.cmd==="checkMailbox"){if(initializedJS){Module["checkMailbox"]()}}else if(e.data.cmd){err("worker.js received unknown command "+e.data.cmd);err(e.data)}}catch(ex){if(Module["__emscripten_thread_crashed"]){Module["__emscripten_thread_crashed"]()}throw ex}}self.onmessage=handleMessage; | ||
SDC_WASM_JS_VERSION="6.21.0-beta.2";"use strict";var Module={};var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string";if(ENVIRONMENT_IS_NODE){var nodeWorkerThreads=require("worker_threads");var parentPort=nodeWorkerThreads.parentPort;parentPort.on("message",data=>onmessage({data:data}));var fs=require("fs");Object.assign(global,{self:global,require:require,Module:Module,location:{href:__filename},Worker:nodeWorkerThreads.Worker,importScripts:function(f){(0,eval)(fs.readFileSync(f,"utf8")+"//# sourceURL="+f)},postMessage:function(msg){parentPort.postMessage(msg)},performance:global.performance||{now:function(){return Date.now()}}})}var initializedJS=false;function threadPrintErr(){var text=Array.prototype.slice.call(arguments).join(" ");if(ENVIRONMENT_IS_NODE){fs.writeSync(2,text+"\n");return}console.error(text)}function threadAlert(){var text=Array.prototype.slice.call(arguments).join(" ");postMessage({cmd:"alert",text:text,threadId:Module["_pthread_self"]()})}var err=threadPrintErr;self.alert=threadAlert;Module["instantiateWasm"]=(info,receiveInstance)=>{var module=Module["wasmModule"];Module["wasmModule"]=null;var instance=new WebAssembly.Instance(module,info);return receiveInstance(instance)};self.onunhandledrejection=e=>{throw e.reason??e};function handleMessage(e){try{if(e.data.cmd==="load"){let messageQueue=[];self.onmessage=e=>messageQueue.push(e);self.startWorker=instance=>{postMessage({"cmd":"loaded"});for(let msg of messageQueue){handleMessage(msg)}self.onmessage=handleMessage};Module["wasmModule"]=e.data.wasmModule;for(const handler of e.data.handlers){Module[handler]=function(){postMessage({cmd:"callHandler",handler:handler,args:[...arguments]})}}Module["wasmMemory"]=e.data.wasmMemory;Module["buffer"]=Module["wasmMemory"].buffer;Module["ENVIRONMENT_IS_PTHREAD"]=true;if(typeof e.data.urlOrBlob=="string"){importScripts(e.data.urlOrBlob)}else{var objectUrl=URL.createObjectURL(e.data.urlOrBlob);importScripts(objectUrl);URL.revokeObjectURL(objectUrl)}}else if(e.data.cmd==="run"){Module["__emscripten_thread_init"](e.data.pthread_ptr,0,0,1);Module["__emscripten_thread_mailbox_await"](e.data.pthread_ptr);Module["establishStackSpace"]();Module["PThread"].receiveObjectTransfer(e.data);Module["PThread"].threadInitTLS();if(!initializedJS){Module["__embind_initialize_bindings"]();initializedJS=true}try{Module["invokeEntryPoint"](e.data.start_routine,e.data.arg)}catch(ex){if(ex!="unwind"){throw ex}}}else if(e.data.cmd==="cancel"){if(Module["_pthread_self"]()){Module["__emscripten_thread_exit"](-1)}}else if(e.data.target==="setimmediate"){}else if(e.data.cmd==="checkMailbox"){if(initializedJS){Module["checkMailbox"]()}}else if(e.data.cmd){err("worker.js received unknown command "+e.data.cmd);err(e.data)}}catch(ex){if(Module["__emscripten_thread_crashed"]){Module["__emscripten_thread_crashed"]()}throw ex}}self.onmessage=handleMessage; |
@@ -1,1 +0,1 @@ | ||
SDC_WASM_JS_VERSION="6.20.0";"use strict";var Module={};var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string";if(ENVIRONMENT_IS_NODE){var nodeWorkerThreads=require("worker_threads");var parentPort=nodeWorkerThreads.parentPort;parentPort.on("message",data=>onmessage({data:data}));var fs=require("fs");Object.assign(global,{self:global,require:require,Module:Module,location:{href:__filename},Worker:nodeWorkerThreads.Worker,importScripts:function(f){(0,eval)(fs.readFileSync(f,"utf8")+"//# sourceURL="+f)},postMessage:function(msg){parentPort.postMessage(msg)},performance:global.performance||{now:function(){return Date.now()}}})}var initializedJS=false;function threadPrintErr(){var text=Array.prototype.slice.call(arguments).join(" ");if(ENVIRONMENT_IS_NODE){fs.writeSync(2,text+"\n");return}console.error(text)}function threadAlert(){var text=Array.prototype.slice.call(arguments).join(" ");postMessage({cmd:"alert",text:text,threadId:Module["_pthread_self"]()})}var err=threadPrintErr;self.alert=threadAlert;Module["instantiateWasm"]=(info,receiveInstance)=>{var module=Module["wasmModule"];Module["wasmModule"]=null;var instance=new WebAssembly.Instance(module,info);return receiveInstance(instance)};self.onunhandledrejection=e=>{throw e.reason??e};function handleMessage(e){try{if(e.data.cmd==="load"){let messageQueue=[];self.onmessage=e=>messageQueue.push(e);self.startWorker=instance=>{postMessage({"cmd":"loaded"});for(let msg of messageQueue){handleMessage(msg)}self.onmessage=handleMessage};Module["wasmModule"]=e.data.wasmModule;for(const handler of e.data.handlers){Module[handler]=function(){postMessage({cmd:"callHandler",handler:handler,args:[...arguments]})}}Module["wasmMemory"]=e.data.wasmMemory;Module["buffer"]=Module["wasmMemory"].buffer;Module["ENVIRONMENT_IS_PTHREAD"]=true;if(typeof e.data.urlOrBlob=="string"){importScripts(e.data.urlOrBlob)}else{var objectUrl=URL.createObjectURL(e.data.urlOrBlob);importScripts(objectUrl);URL.revokeObjectURL(objectUrl)}}else if(e.data.cmd==="run"){Module["__emscripten_thread_init"](e.data.pthread_ptr,0,0,1);Module["__emscripten_thread_mailbox_await"](e.data.pthread_ptr);Module["establishStackSpace"]();Module["PThread"].receiveObjectTransfer(e.data);Module["PThread"].threadInitTLS();if(!initializedJS){Module["__embind_initialize_bindings"]();initializedJS=true}try{Module["invokeEntryPoint"](e.data.start_routine,e.data.arg)}catch(ex){if(ex!="unwind"){throw ex}}}else if(e.data.cmd==="cancel"){if(Module["_pthread_self"]()){Module["__emscripten_thread_exit"](-1)}}else if(e.data.target==="setimmediate"){}else if(e.data.cmd==="checkMailbox"){if(initializedJS){Module["checkMailbox"]()}}else if(e.data.cmd){err("worker.js received unknown command "+e.data.cmd);err(e.data)}}catch(ex){if(Module["__emscripten_thread_crashed"]){Module["__emscripten_thread_crashed"]()}throw ex}}self.onmessage=handleMessage; | ||
SDC_WASM_JS_VERSION="6.21.0-beta.2";"use strict";var Module={};var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string";if(ENVIRONMENT_IS_NODE){var nodeWorkerThreads=require("worker_threads");var parentPort=nodeWorkerThreads.parentPort;parentPort.on("message",data=>onmessage({data:data}));var fs=require("fs");Object.assign(global,{self:global,require:require,Module:Module,location:{href:__filename},Worker:nodeWorkerThreads.Worker,importScripts:function(f){(0,eval)(fs.readFileSync(f,"utf8")+"//# sourceURL="+f)},postMessage:function(msg){parentPort.postMessage(msg)},performance:global.performance||{now:function(){return Date.now()}}})}var initializedJS=false;function threadPrintErr(){var text=Array.prototype.slice.call(arguments).join(" ");if(ENVIRONMENT_IS_NODE){fs.writeSync(2,text+"\n");return}console.error(text)}function threadAlert(){var text=Array.prototype.slice.call(arguments).join(" ");postMessage({cmd:"alert",text:text,threadId:Module["_pthread_self"]()})}var err=threadPrintErr;self.alert=threadAlert;Module["instantiateWasm"]=(info,receiveInstance)=>{var module=Module["wasmModule"];Module["wasmModule"]=null;var instance=new WebAssembly.Instance(module,info);return receiveInstance(instance)};self.onunhandledrejection=e=>{throw e.reason??e};function handleMessage(e){try{if(e.data.cmd==="load"){let messageQueue=[];self.onmessage=e=>messageQueue.push(e);self.startWorker=instance=>{postMessage({"cmd":"loaded"});for(let msg of messageQueue){handleMessage(msg)}self.onmessage=handleMessage};Module["wasmModule"]=e.data.wasmModule;for(const handler of e.data.handlers){Module[handler]=function(){postMessage({cmd:"callHandler",handler:handler,args:[...arguments]})}}Module["wasmMemory"]=e.data.wasmMemory;Module["buffer"]=Module["wasmMemory"].buffer;Module["ENVIRONMENT_IS_PTHREAD"]=true;if(typeof e.data.urlOrBlob=="string"){importScripts(e.data.urlOrBlob)}else{var objectUrl=URL.createObjectURL(e.data.urlOrBlob);importScripts(objectUrl);URL.revokeObjectURL(objectUrl)}}else if(e.data.cmd==="run"){Module["__emscripten_thread_init"](e.data.pthread_ptr,0,0,1);Module["__emscripten_thread_mailbox_await"](e.data.pthread_ptr);Module["establishStackSpace"]();Module["PThread"].receiveObjectTransfer(e.data);Module["PThread"].threadInitTLS();if(!initializedJS){Module["__embind_initialize_bindings"]();initializedJS=true}try{Module["invokeEntryPoint"](e.data.start_routine,e.data.arg)}catch(ex){if(ex!="unwind"){throw ex}}}else if(e.data.cmd==="cancel"){if(Module["_pthread_self"]()){Module["__emscripten_thread_exit"](-1)}}else if(e.data.target==="setimmediate"){}else if(e.data.cmd==="checkMailbox"){if(initializedJS){Module["checkMailbox"]()}}else if(e.data.cmd){err("worker.js received unknown command "+e.data.cmd);err(e.data)}}catch(ex){if(Module["__emscripten_thread_crashed"]){Module["__emscripten_thread_crashed"]()}throw ex}}self.onmessage=handleMessage; |
@@ -24,2 +24,3 @@ import type { Serializable } from "scandit-web-datacapture-core/build/js/private/Serializable"; | ||
get lastNameTruncation(): string | null; | ||
get firstNameWithoutMiddleName(): string | null; | ||
get middleName(): string | null; | ||
@@ -26,0 +27,0 @@ get middleNameTruncation(): string | null; |
@@ -8,3 +8,3 @@ import type { DataCaptureContext, DataCaptureMode, DataCaptureModeJSON, FrameData } from "scandit-web-datacapture-core"; | ||
import type { IdCaptureSettings, IdCaptureSettingsJSON } from "./IdCaptureSettings"; | ||
declare type IdCaptureJSON = DataCaptureModeJSON<IdCaptureSettingsJSON>; | ||
type IdCaptureJSON = DataCaptureModeJSON<IdCaptureSettingsJSON>; | ||
export declare class IdCapture implements DataCaptureMode, Serializable<IdCaptureJSON> { | ||
@@ -11,0 +11,0 @@ private readonly type; |
@@ -45,5 +45,17 @@ import type { BrushJSON, DataCaptureOverlay, DataCaptureView } from "scandit-web-datacapture-core"; | ||
setIdLayout(idLayout: IdLayout): void; | ||
/** | ||
* @deprecated 6.21.0 | ||
*/ | ||
setFrontSideTextHint(hint: string): Promise<void>; | ||
/** | ||
* @deprecated 6.21.0 | ||
*/ | ||
setBackSideTextHint(hint: string): Promise<void>; | ||
/** | ||
* @deprecated 6.21.0 | ||
*/ | ||
setMoveCloserTextHint(hint: string): Promise<void>; | ||
/** | ||
* @deprecated 6.21.0 | ||
*/ | ||
setMoveFurtherAwayTextHint(hint: string): Promise<void>; | ||
@@ -50,0 +62,0 @@ getCapturedBrush(): Brush; |
@@ -34,2 +34,3 @@ import "./scandit-web-datacapture-id-private"; | ||
export * from "./captured-id/VIZResult"; | ||
export type { Translations } from "./translations"; | ||
export interface IdCaptureLoaderOptions { | ||
@@ -36,0 +37,0 @@ enableVIZDocuments?: boolean; |
@@ -74,5 +74,5 @@ import type { QuadrilateralJSON } from "scandit-web-datacapture-core"; | ||
} | ||
export declare type CapturedIdCommonFieldsJSON = Pick<CapturedIdJSON, "address" | "age" | "dateOfBirth" | "dateOfExpiry" | "dateOfIssue" | "documentNumber" | "documentAdditionalNumber" | "documentType" | "firstName" | "fullName" | "isExpired" | "issuingCountry" | "issuingCountryIso" | "lastName" | "nationality" | "sex">; | ||
export declare type VIZResultExtendedJSON = Omit<CapturedIdCommonFieldsJSON & VIZResultJSON, "age" | "isExpired">; | ||
export declare type CapturedIdWithExtendedVIZJSON = Omit<CapturedIdJSON, keyof CapturedIdCommonFieldsJSON> & { | ||
export type CapturedIdCommonFieldsJSON = Pick<CapturedIdJSON, "address" | "age" | "dateOfBirth" | "dateOfExpiry" | "dateOfIssue" | "documentNumber" | "documentAdditionalNumber" | "documentType" | "firstName" | "fullName" | "isExpired" | "issuingCountry" | "issuingCountryIso" | "lastName" | "nationality" | "sex">; | ||
export type VIZResultExtendedJSON = Omit<CapturedIdCommonFieldsJSON & VIZResultJSON, "age" | "isExpired">; | ||
export type CapturedIdWithExtendedVIZJSON = Omit<CapturedIdJSON, keyof CapturedIdCommonFieldsJSON> & { | ||
vizResult: VIZResultExtendedJSON; | ||
@@ -101,2 +101,3 @@ }; | ||
lastNameTruncation: string | null; | ||
firstNameWithoutMiddleName: string | null; | ||
middleName: string | null; | ||
@@ -103,0 +104,0 @@ middleNameTruncation: string | null; |
@@ -1,5 +0,5 @@ | ||
import { DataCaptureEngine as CoreDataCaptureEngine } from "scandit-web-datacapture-core/build/js/worker"; | ||
import type { UpdateContextParameters, CaptureModeDeserializerInstance, ModuleHandler, Vector, WorkerFunctions as BaseWorkerFunctions, ProcessFrameParameters, WasmFrameData } from "scandit-web-datacapture-core/build/js/worker"; | ||
import type { EngineWorkerResponse } from "./dataCapture.worker"; | ||
import type { CapturedIdJSONWithoutCommonFieldsJSON, DataCaptureCallbackMessage, IdCaptureSessionHolder, Module } from "./dataCaptureWorker+related"; | ||
import { DataCaptureEngine as CoreDataCaptureEngine } from "scandit-web-datacapture-core/build/js/worker/index"; | ||
import type { UpdateContextParameters, CaptureModeDeserializerInstance, ModuleHandler, Vector, WorkerFunctions as BaseWorkerFunctions, ProcessFrameParameters, WasmFrameData } from "scandit-web-datacapture-core/build/js/worker/index"; | ||
import type { EngineWorkerResponse } from "./dataCaptureWorkerRelated"; | ||
import type { CapturedIdJSONWithoutCommonFieldsJSON, DataCaptureCallbackMessage, IdCaptureSessionHolder, Module } from "./dataCaptureWorkerRelated"; | ||
import type { IdCaptureSettingsJSON } from "../IdCaptureSettings"; | ||
@@ -38,3 +38,3 @@ import type { AamvaBarcodeVerificationResultJSON, AamvaVizBarcodeComparisonResultJSON, CapturedIdJSON, IdCaptureSessionJSON, VizMrzComparisonResultJSON } from "../SerializedTypes"; | ||
} | ||
declare type IdCaptureModeState = "created" | "disposed" | "initial" | "started"; | ||
type IdCaptureModeState = "created" | "disposed" | "initial" | "started"; | ||
export declare class IdCaptureMode { | ||
@@ -41,0 +41,0 @@ private idCaptureDeserializer; |
import type { DataCaptureLoaderOptions } from "scandit-web-datacapture-core"; | ||
import { DataCaptureLoader as CoreDataCaptureLoader } from "scandit-web-datacapture-core"; | ||
import type { AnyDataCaptureActionMessage, DataCaptureActionMessageKey, DataCaptureWorker } from "./dataCaptureWorker+related"; | ||
declare type CommandAndPayload<A, C> = A extends { | ||
import type { AnyDataCaptureActionMessage, DataCaptureActionMessageKey, DataCaptureWorker } from "./dataCaptureWorkerRelated.js"; | ||
type CommandAndPayload<A, C> = A extends { | ||
command: C; | ||
} ? A : never; | ||
declare type WorkerCommandPayload<C> = Omit<CommandAndPayload<AnyDataCaptureActionMessage, C>, "command" | "id">; | ||
export declare type WorkerCommandParamsForIdCapture<C extends DataCaptureActionMessageKey = DataCaptureActionMessageKey> = [ | ||
type WorkerCommandPayload<C> = Omit<CommandAndPayload<AnyDataCaptureActionMessage, C>, "command" | "id">; | ||
export type WorkerCommandParamsForIdCapture<C extends DataCaptureActionMessageKey = DataCaptureActionMessageKey> = [ | ||
command: C, | ||
@@ -16,2 +16,3 @@ payload: WorkerCommandPayload<C>, | ||
get dataCaptureWorker(): DataCaptureWorker; | ||
protected get name(): string; | ||
static create(options: DataCaptureLoaderOptions): Promise<IdCaptureWorkerManager>; | ||
@@ -18,0 +19,0 @@ workerCommand(...parameters: WorkerCommandParamsForIdCapture): Promise<any>; |
{ | ||
"name": "scandit-web-datacapture-id", | ||
"version": "6.20.0", | ||
"version": "6.21.0-beta.2", | ||
"description": "Scandit Data Capture SDK for the Web", | ||
@@ -11,7 +11,19 @@ "license": "Apache-2.0", | ||
}, | ||
"types": "./build/js/index.d.ts", | ||
"type": "module", | ||
"types": "build/js/index.d.ts", | ||
"main": "build/js/index.js", | ||
"module": "build/js/index.js", | ||
"browser": "build/js/index.js", | ||
"main": "./build/js/index.js", | ||
"module": "./build/js/index.js", | ||
"browser": "./build/js/index.js", | ||
"exports": { | ||
"./package.json": "./package.json", | ||
".": { | ||
"types": "./build/js/index.d.ts", | ||
"import": "./build/js/index.js", | ||
"default": "./build/js/index.js" | ||
}, | ||
"./build/engine/*": { | ||
"import": "./build/engine/*", | ||
"default": "./build/engine/*" | ||
} | ||
}, | ||
"author": { | ||
@@ -67,9 +79,9 @@ "name": "Scandit", | ||
"types-check": "tsc -p tsconfig.json --noEmit", | ||
"build": "node scripts/build.js", | ||
"build-coverage": "node scripts/build.js --generate-coverage-instrumentation", | ||
"build-dev": "NODE_ENV=debug node scripts/build.js", | ||
"build-watch": "NODE_ENV=debug node scripts/build.js --watch", | ||
"postbuild": "npm run generate-typings", | ||
"postbuild-dev": "npm run generate-typings", | ||
"postbuild-coverage": "npm run generate-typings", | ||
"build": "npx tsup", | ||
"build-coverage": "COVERAGE=true npx tsup", | ||
"build-dev": "NODE_ENV=debug npx tsup", | ||
"build-watch": "NODE_ENV=debug npx tsup --watch", | ||
"postbuild": "node scripts/postbuild && npm run generate-typings", | ||
"postbuild-dev": "node scripts/postbuild && npm run generate-typings", | ||
"postbuild-coverage": "node scripts/postbuild && npm run generate-typings", | ||
"clean": "rm -rf build/* coverage/*", | ||
@@ -93,4 +105,4 @@ "generate-typings": "node scripts/generate-typings.js", | ||
"peerDependencies": { | ||
"scandit-web-datacapture-core": "6.20.0" | ||
"scandit-web-datacapture-core": "6.21.0-beta.2" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 3 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 6 instances in 1 package
63834644
79
202
4971
7
16