Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@microblink/blinkid-in-browser-sdk

Package Overview
Dependencies
Maintainers
13
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@microblink/blinkid-in-browser-sdk - npm Package Compare versions

Comparing version 5.20.1 to 6.0.0

src/Recognizers/BlinkID/Generic/AdditionalProcessingInfo.ts

6

package.json
{
"name": "@microblink/blinkid-in-browser-sdk",
"version": "5.20.1",
"version": "6.0.0",
"description": "A simple ID scanning library for WebAssembly-enabled browsers.",

@@ -24,3 +24,2 @@ "homepage": "https://github.com/BlinkID/blinkid-in-browser",

"module": "es/blinkid-sdk.js",
"unpkg": "dist/blinkid-sdk.js",
"types": "types/index.d.ts",

@@ -68,6 +67,3 @@ "files": [

"wasm-feature-detect": "1.2.11"
},
"dependencies": {
"postcss": "^8.4.21"
}
}

@@ -9,3 +9,3 @@ # BlinkID In-browser SDK

Check out the [official demo app](https://demo.microblink.com/in-browser-sdk/blinkid/index.html) or live examples of BlinkID SDK in action:
Check out the [official demo app](https://demo.microblink.com/in-browser-sdk/blinkid/) or live examples of BlinkID SDK in action:

@@ -18,5 +18,5 @@ 1. [BlinkID SDK with built-in UI](https://blinkid.github.io/blinkid-in-browser/ui/demo.html)

* See example at [Codepen](https://codepen.io/microblink/pen/ExPzzda)
4. [Scan both sides of an identity document with a web camera](https://blinkid.github.io/blinkid-in-browser/examples/combined/javascript/index.html)
4. [Scan both sides of an identity document with a web camera](https://blinkid.github.io/blinkid-in-browser/examples/multi-side/javascript/index.html)
* See example at [Codepen](https://codepen.io/microblink/pen/BajeeMx)
5. [Scan both sides of an identity document by uploading its image](https://blinkid.github.io/blinkid-in-browser/examples/combined-file/javascript/index.html)
5. [Scan both sides of an identity document by uploading its image](https://blinkid.github.io/blinkid-in-browser/examples/multi-side-file/javascript/index.html)
* See example at [Codepen](https://codepen.io/microblink/pen/MWboMrr)

@@ -47,6 +47,5 @@ 6. [Scan barcode from an identity document from web camera](https://blinkid.github.io/blinkid-in-browser/examples/idbarcode/javascript/index.html)

* [List of available recognizers](#recognizerList)
* [Success Frame Grabber Recognizer](#successFrameGrabber)
* [ID barcode recognizer](#idBarcodeRecognizer)
* [BlinkID recognizer](#blinkidRecognizer)
* [BlinkID combined recognizer](#blinkidCombinedRecognizer)
* [BlinkID Single-side recognizer](#blinkidSingleSideRecognizer)
* [BlinkID Multi-side recognizer](#blinkidMultiSideRecognizer)
* [Recognizer settings](#recognizerSettings)

@@ -134,10 +133,10 @@ * [Technical requirements](#technicalRequirements)

For example, it's possible to use UMD builds from [the `dist` folder on Unpkg CDN](https://unpkg.com/@microblink/blinkid-in-browser-sdk/dist/). The UMD builds make `BlinkIDSDK` available as a `window.BlinkIDSDK` global variable:
For example, it's possible to use UMD builds from [the `dist` folder on the jsDelivr CDN](https://cdn.jsdelivr.net/npm/@microblink/blinkid-in-browser-sdk/dist/). The UMD builds make `BlinkIDSDK` available as a `window.BlinkIDSDK` global variable:
```html
<!-- IMPORTANT: change "X.Y.Z" to the version number you wish to use! -->
<script src="https://unpkg.com/@microblink/blinkid-in-browser-sdk@X.Y.Z/dist/blinkid-sdk.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@microblink/blinkid-in-browser-sdk@X.Y.Z/dist/blinkid-sdk.min.js"></script>
```
Finally, it's possible to use ES builds, which can be downloaded from [the `es` folder on unpkg](https://unpkg.com/@microblink/blinkid-in-browser-sdk/es/). ES modules are used in a similar manner as NPM package:
Finally, it's possible to use ES builds, which can be downloaded from [the `es` folder on jsDelivr](https://cdn.jsdelivr.net/npm/@microblink/blinkid-in-browser-sdk/es/). ES modules are used in a similar manner as NPM package:

@@ -148,3 +147,3 @@ ```javascript

**Important:** Unpkg CDN is used here due to simplicity of usage. It's not intended to be used in production!
**Important:** the jsDelivr CDN is used here due to simplicity of usage. It's not intended to be used in production!

@@ -211,3 +210,3 @@ #### WASM Resources

const recognizer = await BlinkIDSDK.createBlinkIdRecognizer( wasmSDK );
const recognizer = await BlinkIDSDK.createBlinkIdSingleSideRecognizer( wasmSDK );
const recognizerRunner = await BlinkIDSDK.createRecognizerRunner(

@@ -667,10 +666,2 @@ wasmSDK,

### <a name="successFrameGrabber"></a> Success Frame Grabber Recognizer
The [`SuccessFrameGrabberRecognizer`](src/Recognizers/SuccessFrameGrabberRecognizer.ts) is a special `Recognizer` that wraps some other `Recognizer` and impersonates it while processing the image. However, when the `Recognizer` being impersonated changes its `Result` into `Valid` state, the `SuccessFrameGrabberRecognizer` captures the image and saves it into its own `Result` object.
Since `SuccessFrameGrabberRecognizer` impersonates its slave `Recognizer` object, it is not possible to have both concrete `Recognizer` object and `SuccessFrameGrabberRecognizer` that wraps it in the same `RecognizerRunner` at the same time. Doing so will have the same effect as having multiple instances of the same `Recognizer` in the same `RecognizerRunner` - it will crash your application. For more information, see [paragraph about `RecognizerRunner`](#recognizerRunner).
This recognizer is best for use cases when you need to capture the exact image that was being processed by some other `Recognizer` object at the time its `Result` became `Valid`. When that happens, `SuccessFrameGrabber's` `Result` will also become `Valid` and will contain described image. That image will be available in its `successFrame` property.
### <a name="idBarcodeRecognizer"></a> ID barcode recognizer

@@ -680,5 +671,5 @@

### <a name="blinkidRecognizer"></a> BlinkID recognizer
### <a name="blinkidSingleSideRecognizer"></a> BlinkID Single-side recognizer
The [`BlinkIdRecognizer`](src/Recognizers/BlinkID/Generic/BlinkIdRecognizer.ts) scans and extracts data from the single side of the supported document.
The [`BlinkIdSingleSideRecognizer`](src/Recognizers/BlinkID/Generic/BlinkIdSingleSideRecognizer.ts) scans and extracts data from the single side of the supported document.

@@ -689,7 +680,7 @@ You can find the list of the currently supported documents [here](docs/BlinkIDRecognizer.md). For detailed information about which fields can be extracted from each document, [check this link](docs/BlinkIDDocumentFields.md).

### <a name="blinkidCombinedRecognizer"></a> BlinkID combined recognizer
### <a name="blinkidMultiSideRecognizer"></a> BlinkID Multi-side recognizer
Use [`BlinkIdCombinedRecognizer`](src/Recognizers/BlinkID/Generic/BlinkIdCombinedRecognizer.ts) for scanning both sides of the supported document. First, it scans and extracts data from the front, then scans and extracts data from the back, and finally, combines results from both sides.
Use [`BlinkIdMultiSideRecognizer`](src/Recognizers/BlinkID/Generic/BlinkIdMultiSideRecognizer.ts) for scanning both sides of the supported document. First, it scans and extracts data from the front, then scans and extracts data from the back, and finally, combines results from both sides.
The [`BlinkIdCombinedRecognizer`](src/Recognizers/BlinkID/Generic/BlinkIdCombinedRecognizer.ts) also performs data matching and returns a flag if the extracted data captured from the front side matches the data from the back.
The [`BlinkIdMultiSideRecognizer`](src/Recognizers/BlinkID/Generic/BlinkIdMultiSideRecognizer.ts) also performs data matching and returns a flag if the extracted data captured from the front side matches the data from the back.

@@ -710,6 +701,6 @@ You can find the list of the currently supported documents [here](docs/BlinkIDRecognizer.md). For detailed information about which fields can be extracted from each document, [check this link](docs/BlinkIDDocumentFields.md).

// Create instance of recognizer
const BlinkIdRecognizer = await BlinkIDSDK.createBlinkIdRecognizer( sdk );
const BlinkIdSingleSideRecognizer = await BlinkIDSDK.createBlinkIdSingleSideRecognizer( sdk );
// Retrieve current settings
const settings = await BlinkIdRecognizer.currentSettings();
const settings = await BlinkIdSingleSideRecognizer.currentSettings();

@@ -720,3 +711,3 @@ // Update desired settings

// Apply settings
await BlinkIdRecognizer.updateSettings( settings );
await BlinkIdSingleSideRecognizer.updateSettings( settings );

@@ -723,0 +714,0 @@ ...

@@ -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)}BlinkIDWasmSDK(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 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)}BlinkIDWasmSDK(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.pthread_ptr,/*isMainBrowserThread=*/0,/*isMainRuntimeThread=*/0,/*canBlock=*/1);Module["establishStackSpace"]();Module["PThread"].receiveObjectTransfer(e.data);Module["PThread"].threadInitTLS();if(!initializedJS){Module["___embind_register_native_and_builtin_types"]();pendingNotifiedProxyingQueues.forEach(queue=>{Module["executeNotifiedProxyingQueue"](queue)});pendingNotifiedProxyingQueues=[];initializedJS=true}try{Module["invokeEntryPoint"](e.data.start_routine,e.data.arg)}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(initializedJS){Module["executeNotifiedProxyingQueue"](e.data.queue)}else{pendingNotifiedProxyingQueues.push(e.data.queue)}}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}};

@@ -15,2 +15,2 @@ !function(){"use strict";

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 I extends s{constructor(e){super(I.action),this.hardReset=e}}I.action="resetRecognizers";class u extends s{constructor(e){super(u.action),this.registeredMetadataCallbacks=e}}u.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 L{constructor(e,t){this.isCallbackMessage=!0,this.callbackType=e,this.callbackParameters=t}}function M(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 T,p,w;function y(){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,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])))(),t=yield(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])))(),s=yield(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])))(),n=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])))(),r=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 e&&t&&s&&n?r?T.AdvancedWithThreads:T.Advanced:T.Basic}))}!function(e){e.Basic="BASIC",e.Advanced="ADVANCED",e.AdvancedWithThreads="ADVANCED_WITH_THREADS"}(T||(T={}));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"}(p||(p={})),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 F={licenseTokenStateIncorrect:{code:p.LICENSE_UNLOCK_ERROR,message:w.LICENSE_TOKEN_STATE_INCORRECT},licensePayloadVerificationFailed:{code:p.LICENSE_UNLOCK_ERROR,message:w.LICENSE_PAYLOAD_VERIFICATION_FAILED},licensePayloadCorrupted:{code:p.LICENSE_UNLOCK_ERROR,message:w.LICENSE_PAYLOAD_CORRUPTED},licensePermissionExpired:{code:p.LICENSE_UNLOCK_ERROR,message:w.LICENSE_PERMISSION_EXPIRED},licenseRemoteLocked:{code:p.LICENSE_UNLOCK_ERROR,message:w.LICENSE_REMOTE_LOCKED},licenseNetworkError:{code:p.LICENSE_UNLOCK_ERROR},licenseInvalid:{code:p.LICENSE_UNLOCK_ERROR}},b={imageProcessFailure:{message:w.WORKER_IMAGE_PROCESS_FAILURE,code:p.WORKER_IMAGE_PROCESS_FAILURE},objectInvokeFailure:{message:w.WORKER_OBJECT_INVOKE_FAILURE,code:p.WORKER_OBJECT_INVOKE_FAILURE},runnerDeleteFailure:{message:w.WORKER_RUNNER_DELETE_FAILURE,code:p.WORKER_RUNNER_DELETE_FAILURE},runnerDeleted:{message:w.WORKER_RUNNER_DELETED,code:p.WORKER_RUNNER_DELETED},runnerReconfigureFailure:{message:w.WORKER_RUNNER_RECONFIGURE_FAILURE,code:p.WORKER_RUNNER_RECONFIGURE_FAILURE},runnerMissing:{message:w.WORKER_RUNNER_MISSING,code:p.WORKER_RUNNER_MISSING},runnerCreationFailure:{message:w.WORKER_RUNNER_CREATION_FAILURE,code:p.WORKER_RUNNER_CREATION_FAILURE},runnerExists:{message:w.WORKER_RUNNER_EXISTS,code:p.WORKER_RUNNER_EXISTS},recognizerCreationFailure:{message:w.WORKER_RECOGNIZER_CREATION_FAILURE,code:p.WORKER_RECOGNIZER_CREATION_FAILURE},functionInvokeFailure:{message:w.WORKER_FUNCTION_INVOKE_FAILURE,code:p.WORKER_FUNCTION_INVOKE_FAILURE},wasmInitMissing:{message:w.WORKER_WASM_INIT_MISSING,code:p.WORKER_WASM_INIT_MISSING},wasmLoadFailure:{message:w.WORKER_WASM_LOAD_FAILURE,code:p.WORKER_WASM_LOAD_FAILURE},handleUndefined:{message:w.WORKER_HANDLE_UNDEFINED,code:p.WORKER_HANDLE_UNDEFINED},integrationInfoFailure:{message:w.WORKER_INTEGRATION_INFO_FAILURE,code:p.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={}));function v(e){return{licenseId:e.licenseId,licensee:e.licensee,packageName:e.packageName,platform:"Browser",sdkName:e.sdkName,sdkVersion:e.sdkVersion}}var P;function W(t,s){return e(this,void 0,void 0,(function*(){try{const e=yield fetch("https://baltazar.microblink.com/api/v1/status/check",{method:"POST",headers:{"Content-Type":"application/json"},cache:"no-cache",body:JSON.stringify(v(t))});if(e.ok){const t=""+(yield e.text());return s.submitServerPermission(t)}return{status:P.NetworkError,lease:0,networkErrorDescription:"Server responded with status "+e.status}}catch(e){return{status:P.NetworkError,lease:0,networkErrorDescription:"Unexpected error: "+JSON.stringify(e)}}}))}function G(e){return e===T.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"}(P||(P={}));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 I.action:this.resetRecognizers(t);break;case d.action:this.setDetectionOnly(t);break;case O.action:this.setCameraPreviewMirrored(t);break;case u.action:this.registerMetadataCallbacks(t);break;case N.action:this.registerClearTimeoutCallback(t);break;case h.action:this.processGetProductIntegrationInfo(t);break;default:throw new U({code:p.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(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 L(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 W(e,this.wasmModule);switch(s.status){case P.Ok:case P.RemoteLock:this.registerHeartBeat(s.lease);break;case P.NetworkError:case P.PayloadSignatureVerificationFailed:case P.PayloadCorrupted:t?(console.warn("Problem with obtaining server permission. Will attempt in 10 seconds "+P[s.status]),this.inFlightHeartBeatTimeoutId=setTimeout((()=>{this.obtainNewServerPermission(!1)}),1e4)):console.error("Problem with obtaining server permission. "+P[s.status]);break;case P.IncorrectTokenState:case P.PermissionExpired:console.error("Internal error: "+P[s.status])}return s.status}return console.error("Internal inconsistency! Wasm module not initialized where it's expected to be!"),P.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 y()}))}calculateEngineLocationPrefix(e,t){const s=M(""===e.engineLocation?self.location.origin:e.engineLocation,function(e){switch(e){case T.AdvancedWithThreads:return"advanced-threads";case T.Advanced:return"advanced";case T.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=>M(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=M(n,t.wasmModuleName+".js");G(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*(){G(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({},F.licenseInvalid),{message:e.licenseError}),{type:K.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 W(e,r);switch(t.status){case P.Ok:return{error:null,lease:t.lease};case P.NetworkError:{let e="";return t.networkErrorDescription&&(e=" "+t.networkErrorDescription),{error:new U(Object.assign(Object.assign({},F.licenseNetworkError),{message:"There has been a network error while obtaining the server permission!"+e}),{type:K.NetworkError})}}case P.RemoteLock:return{error:new U(F.licenseRemoteLocked,{type:K.RemoteLock}),lease:t.lease};case P.PermissionExpired:return{error:new U(F.licensePermissionExpired,{type:K.PermissionExpired}),lease:t.lease};case P.PayloadCorrupted:return{error:new U(F.licensePayloadCorrupted,{type:K.PayloadCorrupted}),lease:t.lease};case P.PayloadSignatureVerificationFailed:return{error:new U(F.licensePayloadVerificationFailed,{type:K.PayloadSignatureVerificationFailed}),lease:t.lease};case P.IncorrectTokenState:return{error:new U(F.licenseTokenStateIncorrect,{type:K.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(b.wasmLoadFailure,e))}))}catch(e){this.notifyError(t,new U(b.wasmLoadFailure,e))}}))}processInvokeFunction(e){if(null===this.wasmModule)return void this.notifyError(e,new U(b.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(b.functionInvokeFailure,t))}}processCreateNewRecognizer(e){if(null===this.wasmModule)return void this.notifyError(e,new U(b.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(b.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(b.wasmInitMissing));else if(null!==this.nativeRecognizerRunner)this.notifyError(t,new U(b.runnerExists));else{this.setupMetadataCallbacks(t.registeredMetadataCallbacks);try{if(this.willSoonExpire()){const e=yield this.obtainNewServerPermission(!1);if(e!==P.Ok){const s=P[e];return void this.notifyError(t,new U({code:p.WORKER_LICENSE_UNLOCK_ERROR,message:"Cannot initialize recognizers because of invalid server permission: \n "+s},{type:K[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(b.runnerCreationFailure,e))}}}))}processReconfigureRecognizerRunner(e){if(null===this.wasmModule)this.notifyError(e,new U(b.wasmInitMissing));else if(null===this.nativeRecognizerRunner)this.notifyError(e,new U(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 U(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 U(b.runnerDeleteFailure,t))}else this.notifyError(e,new U(b.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:p.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(b.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(b.imageProcessFailure,t))}else this.notifyError(e,new U(b.imageProcessFailure))}resetRecognizers(e){if(null!==this.nativeRecognizerRunner)try{this.nativeRecognizerRunner.resetRecognizers(e.hardReset),this.notifySuccess(e)}catch(t){this.notifyError(e,new U(b.imageProcessFailure,t))}else this.notifyError(e,new U(b.imageProcessFailure))}setDetectionOnly(e){if(null!==this.nativeRecognizerRunner)try{this.nativeRecognizerRunner.setDetectionOnlyMode(e.detectionOnlyMode),this.notifySuccess(e)}catch(t){this.notifyError(e,new U(b.imageProcessFailure,t))}else this.notifyError(e,new U(b.imageProcessFailure))}setCameraPreviewMirrored(e){if(null!==this.nativeRecognizerRunner)try{this.nativeRecognizerRunner.setCameraPreviewMirrored(e.cameraPreviewMirrored),this.notifySuccess(e)}catch(t){this.notifyError(e,new U(b.imageProcessFailure,t))}else this.notifyError(e,new U(b.imageProcessFailure))}setupMetadataCallbacks(e){e.onDebugText?this.metadataCallbacks.onDebugText=e=>{const t=new L(i.onDebugText,[e]);this.context.postMessage(t)}:delete this.metadataCallbacks.onDebugText,e.onDetectionFailed?this.metadataCallbacks.onDetectionFailed=()=>{const e=new L(i.onDetectionFailed,[]);this.context.postMessage(e)}:delete this.metadataCallbacks.onDetectionFailed,e.onPointsDetection?this.metadataCallbacks.onPointsDetection=e=>{const t=new L(i.onPointsDetection,[e]);this.context.postMessage(t)}:delete this.metadataCallbacks.onPointsDetection,e.onQuadDetection?this.metadataCallbacks.onQuadDetection=e=>{const t=new L(i.onQuadDetection,[e]);this.context.postMessage(t)}:delete this.metadataCallbacks.onQuadDetection,e.onFirstSideResult?this.metadataCallbacks.onFirstSideResult=()=>{const e=new L(i.onFirstSideResult,[]);this.context.postMessage(e)}:delete this.metadataCallbacks.onFirstSideResult,e.onGlare?this.metadataCallbacks.onGlare=e=>{const t=new L(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(b.imageProcessFailure,t))}}else this.notifyError(e,new U(b.imageProcessFailure))}registerClearTimeoutCallback(e){if(null!==this.nativeRecognizerRunner){this.clearTimeoutCallback=e.callbackNonEmpty?{onClearTimeout:()=>{const e=new L(i.clearTimeoutCallback,[]);this.context.postMessage(e)}}:null;try{this.nativeRecognizerRunner.setClearTimeoutCallback(this.clearTimeoutCallback),this.notifySuccess(e)}catch(t){this.notifyError(e,new U(b.imageProcessFailure,t))}}else this.notifyError(e,new U(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 D(e.messageID,s))}catch(t){this.notifyError(e,new U(b.objectInvokeFailure,t))}else this.notifyError(e,new U(b.wasmInitMissing))}}}();
***************************************************************************** */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://baltazar.microblink.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))}}}();

@@ -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)}BlinkIDWasmSDK(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 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)}BlinkIDWasmSDK(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.pthread_ptr,/*isMainBrowserThread=*/0,/*isMainRuntimeThread=*/0,/*canBlock=*/1);Module["establishStackSpace"]();Module["PThread"].receiveObjectTransfer(e.data);Module["PThread"].threadInitTLS();if(!initializedJS){Module["___embind_register_native_and_builtin_types"]();pendingNotifiedProxyingQueues.forEach(queue=>{Module["executeNotifiedProxyingQueue"](queue)});pendingNotifiedProxyingQueues=[];initializedJS=true}try{Module["invokeEntryPoint"](e.data.start_routine,e.data.arg)}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(initializedJS){Module["executeNotifiedProxyingQueue"](e.data.queue)}else{pendingNotifiedProxyingQueues.push(e.data.queue)}}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}};

@@ -15,2 +15,2 @@ !function(){"use strict";

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 I extends s{constructor(e){super(I.action),this.hardReset=e}}I.action="resetRecognizers";class u extends s{constructor(e){super(u.action),this.registeredMetadataCallbacks=e}}u.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 L{constructor(e,t){this.isCallbackMessage=!0,this.callbackType=e,this.callbackParameters=t}}function M(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 T,p,w;function y(){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,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])))(),t=yield(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])))(),s=yield(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])))(),n=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])))(),r=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 e&&t&&s&&n?r?T.AdvancedWithThreads:T.Advanced:T.Basic}))}!function(e){e.Basic="BASIC",e.Advanced="ADVANCED",e.AdvancedWithThreads="ADVANCED_WITH_THREADS"}(T||(T={}));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"}(p||(p={})),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 F={licenseTokenStateIncorrect:{code:p.LICENSE_UNLOCK_ERROR,message:w.LICENSE_TOKEN_STATE_INCORRECT},licensePayloadVerificationFailed:{code:p.LICENSE_UNLOCK_ERROR,message:w.LICENSE_PAYLOAD_VERIFICATION_FAILED},licensePayloadCorrupted:{code:p.LICENSE_UNLOCK_ERROR,message:w.LICENSE_PAYLOAD_CORRUPTED},licensePermissionExpired:{code:p.LICENSE_UNLOCK_ERROR,message:w.LICENSE_PERMISSION_EXPIRED},licenseRemoteLocked:{code:p.LICENSE_UNLOCK_ERROR,message:w.LICENSE_REMOTE_LOCKED},licenseNetworkError:{code:p.LICENSE_UNLOCK_ERROR},licenseInvalid:{code:p.LICENSE_UNLOCK_ERROR}},b={imageProcessFailure:{message:w.WORKER_IMAGE_PROCESS_FAILURE,code:p.WORKER_IMAGE_PROCESS_FAILURE},objectInvokeFailure:{message:w.WORKER_OBJECT_INVOKE_FAILURE,code:p.WORKER_OBJECT_INVOKE_FAILURE},runnerDeleteFailure:{message:w.WORKER_RUNNER_DELETE_FAILURE,code:p.WORKER_RUNNER_DELETE_FAILURE},runnerDeleted:{message:w.WORKER_RUNNER_DELETED,code:p.WORKER_RUNNER_DELETED},runnerReconfigureFailure:{message:w.WORKER_RUNNER_RECONFIGURE_FAILURE,code:p.WORKER_RUNNER_RECONFIGURE_FAILURE},runnerMissing:{message:w.WORKER_RUNNER_MISSING,code:p.WORKER_RUNNER_MISSING},runnerCreationFailure:{message:w.WORKER_RUNNER_CREATION_FAILURE,code:p.WORKER_RUNNER_CREATION_FAILURE},runnerExists:{message:w.WORKER_RUNNER_EXISTS,code:p.WORKER_RUNNER_EXISTS},recognizerCreationFailure:{message:w.WORKER_RECOGNIZER_CREATION_FAILURE,code:p.WORKER_RECOGNIZER_CREATION_FAILURE},functionInvokeFailure:{message:w.WORKER_FUNCTION_INVOKE_FAILURE,code:p.WORKER_FUNCTION_INVOKE_FAILURE},wasmInitMissing:{message:w.WORKER_WASM_INIT_MISSING,code:p.WORKER_WASM_INIT_MISSING},wasmLoadFailure:{message:w.WORKER_WASM_LOAD_FAILURE,code:p.WORKER_WASM_LOAD_FAILURE},handleUndefined:{message:w.WORKER_HANDLE_UNDEFINED,code:p.WORKER_HANDLE_UNDEFINED},integrationInfoFailure:{message:w.WORKER_INTEGRATION_INFO_FAILURE,code:p.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={}));function v(e){return{licenseId:e.licenseId,licensee:e.licensee,packageName:e.packageName,platform:"Browser",sdkName:e.sdkName,sdkVersion:e.sdkVersion}}var P;function W(t,s){return e(this,void 0,void 0,(function*(){try{const e=yield fetch("https://baltazar.microblink.com/api/v1/status/check",{method:"POST",headers:{"Content-Type":"application/json"},cache:"no-cache",body:JSON.stringify(v(t))});if(e.ok){const t=""+(yield e.text());return s.submitServerPermission(t)}return{status:P.NetworkError,lease:0,networkErrorDescription:"Server responded with status "+e.status}}catch(e){return{status:P.NetworkError,lease:0,networkErrorDescription:"Unexpected error: "+JSON.stringify(e)}}}))}function G(e){return e===T.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"}(P||(P={}));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 I.action:this.resetRecognizers(t);break;case d.action:this.setDetectionOnly(t);break;case O.action:this.setCameraPreviewMirrored(t);break;case u.action:this.registerMetadataCallbacks(t);break;case N.action:this.registerClearTimeoutCallback(t);break;case h.action:this.processGetProductIntegrationInfo(t);break;default:throw new U({code:p.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(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 L(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)}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 W(e,this.wasmModule);switch(s.status){case P.Ok:case P.RemoteLock:this.registerHeartBeat(s.lease);break;case P.NetworkError:case P.PayloadSignatureVerificationFailed:case P.PayloadCorrupted:t?(console.warn("Problem with obtaining server permission. Will attempt in 10 seconds "+P[s.status]),this.inFlightHeartBeatTimeoutId=setTimeout((()=>{this.obtainNewServerPermission(!1)}),1e4)):console.error("Problem with obtaining server permission. "+P[s.status]);break;case P.IncorrectTokenState:case P.PermissionExpired:console.error("Internal error: "+P[s.status])}return s.status}return console.error("Internal inconsistency! Wasm module not initialized where it's expected to be!"),P.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 y()}))}calculateEngineLocationPrefix(e,t){const s=M(""===e.engineLocation?self.location.origin:e.engineLocation,function(e){switch(e){case T.AdvancedWithThreads:return"advanced-threads";case T.Advanced:return"advanced";case T.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=>M(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=M(n,t.wasmModuleName+".js");G(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*(){G(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({},F.licenseInvalid),{message:e.licenseError}),{type:K.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 W(e,r);switch(t.status){case P.Ok:return{error:null,lease:t.lease};case P.NetworkError:{let e="";return t.networkErrorDescription&&(e=" "+t.networkErrorDescription),{error:new U(Object.assign(Object.assign({},F.licenseNetworkError),{message:"There has been a network error while obtaining the server permission!"+e}),{type:K.NetworkError})}}case P.RemoteLock:return{error:new U(F.licenseRemoteLocked,{type:K.RemoteLock}),lease:t.lease};case P.PermissionExpired:return{error:new U(F.licensePermissionExpired,{type:K.PermissionExpired}),lease:t.lease};case P.PayloadCorrupted:return{error:new U(F.licensePayloadCorrupted,{type:K.PayloadCorrupted}),lease:t.lease};case P.PayloadSignatureVerificationFailed:return{error:new U(F.licensePayloadVerificationFailed,{type:K.PayloadSignatureVerificationFailed}),lease:t.lease};case P.IncorrectTokenState:return{error:new U(F.licenseTokenStateIncorrect,{type:K.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(b.wasmLoadFailure,e))}))}catch(e){this.notifyError(t,new U(b.wasmLoadFailure,e))}}))}processInvokeFunction(e){if(null===this.wasmModule)return void this.notifyError(e,new U(b.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(b.functionInvokeFailure,t))}}processCreateNewRecognizer(e){if(null===this.wasmModule)return void this.notifyError(e,new U(b.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(b.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(b.wasmInitMissing));else if(null!==this.nativeRecognizerRunner)this.notifyError(t,new U(b.runnerExists));else{this.setupMetadataCallbacks(t.registeredMetadataCallbacks);try{if(this.willSoonExpire()){const e=yield this.obtainNewServerPermission(!1);if(e!==P.Ok){const s=P[e];return void this.notifyError(t,new U({code:p.WORKER_LICENSE_UNLOCK_ERROR,message:"Cannot initialize recognizers because of invalid server permission: \n "+s},{type:K[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(b.runnerCreationFailure,e))}}}))}processReconfigureRecognizerRunner(e){if(null===this.wasmModule)this.notifyError(e,new U(b.wasmInitMissing));else if(null===this.nativeRecognizerRunner)this.notifyError(e,new U(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 U(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 U(b.runnerDeleteFailure,t))}else this.notifyError(e,new U(b.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:p.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(b.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(b.imageProcessFailure,t))}else this.notifyError(e,new U(b.imageProcessFailure))}resetRecognizers(e){if(null!==this.nativeRecognizerRunner)try{this.nativeRecognizerRunner.resetRecognizers(e.hardReset),this.notifySuccess(e)}catch(t){this.notifyError(e,new U(b.imageProcessFailure,t))}else this.notifyError(e,new U(b.imageProcessFailure))}setDetectionOnly(e){if(null!==this.nativeRecognizerRunner)try{this.nativeRecognizerRunner.setDetectionOnlyMode(e.detectionOnlyMode),this.notifySuccess(e)}catch(t){this.notifyError(e,new U(b.imageProcessFailure,t))}else this.notifyError(e,new U(b.imageProcessFailure))}setCameraPreviewMirrored(e){if(null!==this.nativeRecognizerRunner)try{this.nativeRecognizerRunner.setCameraPreviewMirrored(e.cameraPreviewMirrored),this.notifySuccess(e)}catch(t){this.notifyError(e,new U(b.imageProcessFailure,t))}else this.notifyError(e,new U(b.imageProcessFailure))}setupMetadataCallbacks(e){e.onDebugText?this.metadataCallbacks.onDebugText=e=>{const t=new L(i.onDebugText,[e]);this.context.postMessage(t)}:delete this.metadataCallbacks.onDebugText,e.onDetectionFailed?this.metadataCallbacks.onDetectionFailed=()=>{const e=new L(i.onDetectionFailed,[]);this.context.postMessage(e)}:delete this.metadataCallbacks.onDetectionFailed,e.onPointsDetection?this.metadataCallbacks.onPointsDetection=e=>{const t=new L(i.onPointsDetection,[e]);this.context.postMessage(t)}:delete this.metadataCallbacks.onPointsDetection,e.onQuadDetection?this.metadataCallbacks.onQuadDetection=e=>{const t=new L(i.onQuadDetection,[e]);this.context.postMessage(t)}:delete this.metadataCallbacks.onQuadDetection,e.onFirstSideResult?this.metadataCallbacks.onFirstSideResult=()=>{const e=new L(i.onFirstSideResult,[]);this.context.postMessage(e)}:delete this.metadataCallbacks.onFirstSideResult,e.onGlare?this.metadataCallbacks.onGlare=e=>{const t=new L(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(b.imageProcessFailure,t))}}else this.notifyError(e,new U(b.imageProcessFailure))}registerClearTimeoutCallback(e){if(null!==this.nativeRecognizerRunner){this.clearTimeoutCallback=e.callbackNonEmpty?{onClearTimeout:()=>{const e=new L(i.clearTimeoutCallback,[]);this.context.postMessage(e)}}:null;try{this.nativeRecognizerRunner.setClearTimeoutCallback(this.clearTimeoutCallback),this.notifySuccess(e)}catch(t){this.notifyError(e,new U(b.imageProcessFailure,t))}}else this.notifyError(e,new U(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 D(e.messageID,s))}catch(t){this.notifyError(e,new U(b.objectInvokeFailure,t))}else this.notifyError(e,new U(b.wasmInitMissing))}}}();
***************************************************************************** */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://baltazar.microblink.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)}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))}}}();

@@ -8,9 +8,7 @@ /**

// export all recognizers
export * from "./Recognizers/SuccessFrameGrabberRecognizer";
export * from "./Recognizers/BlinkBarcode/BarcodeData";
export * from "./Recognizers/BlinkID/Generic/BlinkIdCombinedRecognizer";
export * from "./Recognizers/BlinkID/Generic/BlinkIdRecognizer";
export * from "./Recognizers/BlinkID/Generic/BlinkIdMultiSideRecognizer";
export * from "./Recognizers/BlinkID/Generic/BlinkIdSingleSideRecognizer";
export * from "./Recognizers/BlinkID/IDBarcode/IdBarcodeRecognizer";
export * from "./Recognizers/BlinkID/ImageOptions";

@@ -192,3 +192,3 @@ /**

{
let cameraDevice = null;
let cameraDevice: SelectedCamera;

@@ -227,3 +227,4 @@ cameraDevice = frontCameras.filter( device => device.deviceId === cameraId )[0];

videoFeed: HTMLVideoElement,
preferredCameraType: PreferredCameraType = PreferredCameraType.BackFacingCamera
preferredCameraType: PreferredCameraType = PreferredCameraType.BackFacingCamera,
shouldMaxResolution = false
): Promise< boolean >

@@ -250,2 +251,3 @@ {

};
if ( camera.deviceId === "" )

@@ -271,9 +273,30 @@ {

const videoFeedTransform: Array< string > = [];
let cameraFlipped = false;
if ( camera.facing === PreferredCameraType.FrontFacingCamera )
{
videoFeed.style.transform = "scaleX(-1)";
videoFeedTransform.push( "scaleX(-1)" );
cameraFlipped = true;
}
if ( shouldMaxResolution )
{
const tracks = stream.getVideoTracks();
const track = tracks[ 0 ];
const capabilities = track.getCapabilities();
void track.applyConstraints
(
{
width: capabilities.width?.max,
height: capabilities.height?.max
}
);
// Scale should be ~1.5 if 66% of the image is cropped (see cropFactor in FrameCapture.ts)
videoFeedTransform.push( "scale(1.5)" );
}
videoFeed.style.transform = videoFeedTransform.join( " " );
return cameraFlipped;

@@ -290,1 +313,6 @@ }

}
export function isCameraFocusProblematic(): boolean
{
return navigator.userAgent.indexOf( "iPhone OS 16_" ) > -1;
}

@@ -8,3 +8,3 @@ /**

* Private interface for letting RecognizerRunner inform VideoRecognizer when it
* needs to clear timeout. This is usually required when combined recognizer has
* needs to clear timeout. This is usually required when multi-side recognizer has
* finished scanning of the first side and needs a clean timeout start for the

@@ -11,0 +11,0 @@ * recognition of the back side.

@@ -175,4 +175,4 @@ /**

* recognitions.
* @param hardReset If set to false, combined recognizers will not be reset. If set to true, all recognizers will be
* reset.
* @param hardReset If set to false, multi-side recognizers will not be reset. If set to true, all recognizers
* will be reset.
*/

@@ -179,0 +179,0 @@ resetRecognizers( hardReset: boolean ): Promise< void >;

@@ -42,3 +42,3 @@ /**

*/
export function captureFrame( imageSource: CanvasImageSource ): CapturedFrame
export function captureFrame( imageSource: CanvasImageSource, shouldCrop = false ): CapturedFrame
{

@@ -72,3 +72,3 @@ let imageWidth: number;

canvas.height = imageHeight;
const ctx = canvas.getContext( "2d" );
const ctx = canvas.getContext( "2d", { willReadFrequently: true } ) as CanvasRenderingContext2D;

@@ -81,4 +81,20 @@ if ( !ctx )

ctx.drawImage( imageSource, 0, 0, canvas.width, canvas.height );
const pixelData = ctx.getImageData( 0, 0, canvas.width, canvas.height );
/**
* Take full image or cropped image based on focus problems.
*
* iPhone 14 Pro has focus problems, i.e. user should place a document somehow
* far away from the camera to get the proper focus.
*
* In that case we're getting much bigger images (4K), and we're cropping the center
* of the image which is then sent to processing - rectangle that is 66% size of the
* original image is cropped from the image center.
*/
const cropFactor = shouldCrop ? 0.66 : 1;
const targetWidth = canvas.width * cropFactor;
const targetHeight = canvas.height * cropFactor;
const targetX = ( canvas.width - targetWidth ) / 2;
const targetY = ( canvas.height - targetHeight ) / 2;
const pixelData = ctx.getImageData( targetX, targetY, targetWidth, targetHeight );
return new CapturedFrame

@@ -85,0 +101,0 @@ (

@@ -38,3 +38,3 @@ /**

/**
* Called when first side recognition with the combined recognizer completes.
* Called when first side recognition with the multi-side recognizer completes.
*/

@@ -41,0 +41,0 @@ onFirstSideResult?(): void

@@ -11,3 +11,4 @@ /**

selectCamera,
SelectedCamera
SelectedCamera,
isCameraFocusProblematic
} from "./CameraUtils";

@@ -125,3 +126,9 @@

const cameraFlipped = await bindCameraToVideoFeed( selectedCamera, cameraFeed, preferredCameraType );
const shouldMaxResolution = isCameraFocusProblematic();
const cameraFlipped = await bindCameraToVideoFeed(
selectedCamera,
cameraFeed,
preferredCameraType,
shouldMaxResolution
);

@@ -247,2 +254,3 @@ // TODO: await maybe not needed here

this.deviceId = deviceId;
this.isProblematicFocus = isCameraFocusProblematic();
}

@@ -576,3 +584,3 @@

bindCameraToVideoFeed( camera, this.videoFeed ).then
bindCameraToVideoFeed( camera, this.videoFeed, undefined, this.isProblematicFocus ).then
(

@@ -655,2 +663,4 @@ () =>

private isProblematicFocus = false;
private playPauseEvent(): Promise< void >

@@ -697,3 +707,3 @@ {

const cameraFrame = captureFrame( this.videoFeed );
const cameraFrame = captureFrame( this.videoFeed, this.isProblematicFocus );

@@ -704,2 +714,3 @@ this.recognizerRunner.processImage( cameraFrame ).then

{
const timeoutDuration = this.isProblematicFocus ? 33 : 1;
const completeFn = () =>

@@ -719,3 +730,3 @@ {

);
}, 1 );
}, timeoutDuration );
}

@@ -722,0 +733,0 @@ else

@@ -8,17 +8,34 @@ /**

export async function detectWasmType(): Promise< WasmType >
/* eslint-disable max-len */
/**
* Safari 16 shipped with WASM threads support, but it didn't ship with nested
* workers support, so an extra check is needed
* https://github.com/GoogleChromeLabs/squoosh/pull/1325/files#diff-904900db64cd3f48b0e765dbbdc6a218a7ea74a199671bde82a8944a904db86f
*/
/* eslint-enable max-len */
export default async function checkThreadsSupport(): Promise<boolean>
{
const supportsWasmThreads = await WasmFeatureDetect.threads();
if ( !supportsWasmThreads ) return false;
if ( !( "importScripts" in self ) )
{
throw Error( "Not implemented" );
}
return "Worker" in self;
}
export async function detectWasmType(): Promise<WasmType>
{
// determine if all features required for advanced WASM are available
// currently, advanced wasm requires bulk memory, non-trapping floating point
// and sign extension (this may change in the future).
// currently, advanced wasm requires SIMD
const haveBulkMemory = await WasmFeatureDetect.bulkMemory();
const haveNonTrappingFloatingPoint = await WasmFeatureDetect.saturatedFloatToInt();
const haveSignExtension = await WasmFeatureDetect.signExtensions();
const haveSIMD = await WasmFeatureDetect.simd();
const haveThreads = await WasmFeatureDetect.threads();
if ( haveBulkMemory && haveNonTrappingFloatingPoint && haveSignExtension && haveSIMD )
const threadsSupported = await checkThreadsSupport();
if ( haveSIMD )
{
if ( haveThreads )
if ( threadsSupported )
{

@@ -40,8 +57,11 @@ return WasmType.AdvancedWithThreads;

{
switch( wasmType )
switch ( wasmType )
{
case WasmType.AdvancedWithThreads: return "advanced-threads";
case WasmType.Advanced : return "advanced";
case WasmType.Basic : return "basic";
case WasmType.AdvancedWithThreads:
return "advanced-threads";
case WasmType.Advanced:
return "advanced";
case WasmType.Basic:
return "basic";
}
}

@@ -225,3 +225,3 @@ /**

readonly hardReset: boolean
readonly hardReset: boolean;

@@ -293,3 +293,3 @@ constructor( hardReset: boolean )

readonly cameraPreviewMirrored: boolean
readonly cameraPreviewMirrored: boolean;

@@ -296,0 +296,0 @@ constructor( cameraPreviewMirrored: boolean )

@@ -150,2 +150,3 @@ /**

@typescript-eslint/no-unsafe-member-access,
@typescript-eslint/no-unsafe-argument,
@typescript-eslint/no-unsafe-return */

@@ -210,2 +211,3 @@ private unwrapParameters( msgWithParams: MessageWithParameters ): Array< any >

@typescript-eslint/no-unsafe-member-access,
@typescript-eslint/no-unsafe-argument,
@typescript-eslint/no-unsafe-return */

@@ -215,2 +217,3 @@

@typescript-eslint/no-unsafe-assignment,
@typescript-eslint/no-unsafe-argument,
@typescript-eslint/no-unsafe-member-access */

@@ -249,2 +252,3 @@ private scanForTransferrables( object: any ): Array< Transferable >

@typescript-eslint/no-unsafe-assignment,
@typescript-eslint/no-unsafe-argument,
@typescript-eslint/no-unsafe-member-access */

@@ -645,3 +649,3 @@

message:
`Cannot initialize recognizers because of invalid server permission:
`Cannot initialize recognizers because of invalid server permission:
${resultStatus}`,

@@ -766,2 +770,3 @@ },

@typescript-eslint/no-unsafe-assignment,
@typescript-eslint/no-unsafe-argument,
@typescript-eslint/no-unsafe-member-access */

@@ -768,0 +773,0 @@ if ( typeof values !== "object" )

@@ -0,1 +1,3 @@

/* eslint-disable @typescript-eslint/no-unsafe-argument */
/**

@@ -600,3 +602,3 @@ * Copyright (c) Microblink Ltd. All rights reserved.

/* eslint-disable lines-between-class-members */
readonly mbWasmModule : WasmModuleWorkerProxy;
readonly mbWasmModule : WasmModuleWorkerProxy;
private readonly mbWasmWorker : Worker;

@@ -603,0 +605,0 @@ private eventHandlers : { [ key: number ] : EventHandler } = {};

@@ -7,3 +7,3 @@ /**

import { BarcodeData } from "../../BlinkBarcode/BarcodeData";
import { DriverLicenseDetailedInfo } from "./DriverLicenseDetailedInfo";
import { BarcodeDriverLicenseDetailedInfo } from "./DriverLicenseDetailedInfo";
import { MBDate } from "../../../MicroblinkSDK/DataStructures";

@@ -72,3 +72,3 @@

/* The driver license detailed info. */
readonly driverLicenseDetailedInfo: DriverLicenseDetailedInfo;
readonly driverLicenseDetailedInfo: BarcodeDriverLicenseDetailedInfo;

@@ -75,0 +75,0 @@ /* Whether the result is empty */

/**
* Copyright (c) Microblink Ltd. All rights reserved.
*/
import
{
MBDate
} from "../../../MicroblinkSDK/DataStructures";
import { DateResult, StringResult } from "./GenericResultStructures";
import { MBDate } from "../../../MicroblinkSDK/DataStructures";
/**

@@ -14,2 +13,45 @@ * The additional information on vehicle class.

{
readonly vehicleClass: StringResult;
readonly licenceType: StringResult;
readonly effectiveDate: DateResult;
readonly expiryDate: DateResult;
}
/**
* Driver's license specific data.
*/
export interface DriverLicenseDetailedInfo
{
/** The driver license conditions. */
readonly conditions: StringResult;
/**
* The restrictions to driving privileges for the driver license owner.
*/
readonly restrictions: StringResult;
/**
* The additional privileges granted to the driver license owner.
*/
readonly endorsements: StringResult;
/**
* The type of vehicle the driver license owner has privilege to drive.
*/
readonly vehicleClass: StringResult;
/**
* The additional information on vehicle class.
*/
readonly vehicleClassesInfo: Array< VehicleClassInfo >;
}
/**
* The additional information on vehicle class for barcodes.
*/
export interface BarcodeVehicleClassInfo
{
readonly vehicleClass: string;

@@ -25,5 +67,5 @@

/**
* Driver's license specific data.
* Driver's license specific data for barcodes.
*/
export interface DriverLicenseDetailedInfo
export interface BarcodeDriverLicenseDetailedInfo
{

@@ -51,3 +93,3 @@ /** The driver license conditions. */

*/
readonly vehicleClassesInfo: Array< VehicleClassInfo >;
readonly vehicleClassesInfo: Array< BarcodeVehicleClassInfo >;
}

@@ -13,2 +13,7 @@ /**

/**
* Orientation of the card detected on the scanned image.
*/
readonly cardOrientation: CardOrientation;
/**
* The color status determined from scanned image.

@@ -68,1 +73,13 @@ */

}
/**
* CardOrientation enum defines possible states of card orientation.
*/
export enum CardOrientation
{
/** Card is horizontally placed inside the camera frame */
Horizontal = 0,
/** Card is vertically placed inside the camera frame */
Vertical
}

@@ -8,6 +8,6 @@ /**

{
/** Recognition was successful. */
/** The document was fully scanned and data was extracted as expected. */
Success = 0,
/** Detection of the document failed. */
/** The document was not found on the image. */
DetectionFailed,

@@ -18,15 +18,30 @@

/** Recognizer has inconsistent results. */
/**
* Stability is achieved when the same document is provided on consecutive frames,
* resulting in a consistent recognition between frames prior to data extraction.
* Valid only for video feed.
*/
StabilityTestFailed,
/** Wrong side of the document has been scanned. */
/**
* The wrong side of the document is scanned. Front side scan is completed and back side is expected, but not
* provided by the end-user.
*
* Possible also if front is expected at the start of the scanning process and back is presented first
* by the end-user.
*/
ScanningWrongSide,
/** Identification of the fields present on the document has failed. */
/** Unexpected fields are present on the document and removed from the final result. */
FieldIdentificationFailed,
/** Mandatory field for the specific document is missing. */
/** Fields expected to appear on the scanned document have not been found. */
MandatoryFieldMissing,
/** Result contains invalid characters in some of the fields. */
/**
* One of the extracted fields contains a character which does not satisfy the rule defined for that
* specific field.
*
* This processing status can only occur if validateResultCharacters setting is set to true.
*/
InvalidCharactersFound,

@@ -43,3 +58,6 @@

/** Document class has been filtered out. */
/**
* Currently scanned document has been filtered out by its class.
* Occurrence of this processing status is affected by classFilter setting.
*/
ClassFiltered,

@@ -50,13 +68,15 @@

/** License for the detected document is missing. */
/** Document class is not included in the issued license. */
UnsupportedByLicense,
/**
* Front side recognition has completed successfully, and recognizer is waiting for the other
* side to be scanned.
* Front side recognition has completed successfully, and recognizer is waiting for the other side to be scanned.
*/
AwaitingOtherSide,
/** Number of possible processing statuses. */
/** If front side recognition has not completed successfully, the back side is not scanned. */
NotScanned,
/** Number of possible processing statuses. */
Count
}

@@ -6,3 +6,3 @@ /**

/**
* RecognitionMode enum defines possible recognition modes by BlinkID(Combined)Recognizer.
* RecognitionMode enum defines possible recognition modes for BlinkID Single-side and BlinkID Multi-side recognizers.
*/

@@ -9,0 +9,0 @@ export enum RecognitionMode

@@ -10,12 +10,12 @@ /**

/** Enable scanning of MRZ IDs. Setting is taken into account only if the mrz_id right is purchased. */
enableMrzId = true
enableMrzId = true;
/** Enable scanning of Passport MRZ. Setting is taken into account only if the passport right is purchased. */
enableMrzPassport = true
enableMrzPassport = true;
/** Enable scanning of visa MRZ. Setting is taken into account only if the visa right is purchased. */
enableMrzVisa = true
enableMrzVisa = true;
/** Enable scanning of Photo ID. Setting is taken into account only if the photo_id right is purchased. */
enablePhotoId = true
enablePhotoId = true;

@@ -26,3 +26,3 @@ /**

*/
enableBarcodeId = true
enableBarcodeId = true;

@@ -33,3 +33,3 @@ /**

*/
enableFullDocumentRecognition = true
enableFullDocumentRecognition = true;
}

@@ -6,3 +6,3 @@ /**

import { DriverLicenseDetailedInfo } from "./DriverLicenseDetailedInfo";
import { MBDate } from "../../../MicroblinkSDK/DataStructures";
import { DateResult, StringResult } from "./GenericResultStructures";

@@ -15,46 +15,46 @@ /**

/** The first name of the document owner. */
readonly firstName: string;
readonly firstName: StringResult;
/** The last name of the document owner. */
readonly lastName: string;
readonly lastName: StringResult;
/** The full name of the document owner. */
readonly fullName: string;
readonly fullName: StringResult;
/** The additional name information of the document owner. */
readonly additionalNameInformation: string;
readonly additionalNameInformation: StringResult;
/** The localized name of the document owner. */
readonly localizedName: string;
readonly localizedName: StringResult;
/** The fathers name of the document owner. */
readonly fathersName: string;
readonly fathersName: StringResult;
/** The mothers name of the document owner. */
readonly mothersName: string;
readonly mothersName: StringResult;
/** The address of the document owner. */
readonly address: string;
readonly address: StringResult;
/** THe additional address information of the document owner. */
readonly additionalAddressInformation: string;
readonly additionalAddressInformation: StringResult;
/** The place of birth of the document owner. */
readonly placeOfBirth: string;
readonly placeOfBirth: StringResult;
/** The nationality of the document owner. */
readonly nationality: string;
readonly nationality: StringResult;
/** The race of the document owner. */
readonly race: string;
readonly race: StringResult;
/** The religion of the document owner. */
readonly religion: string;
readonly religion: StringResult;
/** The profession of the document owner. */
readonly profession: string;
readonly profession: StringResult;
/** The marital status of the document owner. */
readonly maritalStatus: string;
readonly maritalStatus: StringResult;
/** The residential status of the document owner. */
readonly residentialStatus: string;
readonly residentialStatus: StringResult;
/** The employer of the document owner. */
readonly employer: string;
readonly employer: StringResult;
/** The sex of the document owner. */
readonly sex: string;
readonly sex: StringResult;
/** The date of birth of the document owner. */
readonly dateOfBirth: MBDate;
readonly dateOfBirth: DateResult;
/** The date of issue of the document. */
readonly dateOfIssue: MBDate;
readonly dateOfIssue: DateResult;
/** The date of expiry of the document. */
readonly dateOfExpiry: MBDate;
readonly dateOfExpiry: DateResult;

@@ -65,13 +65,13 @@ /** Determines if date of expiry is permanent. */

/** The document number. */
readonly documentNumber: string;
readonly documentNumber: StringResult;
/** The personal identification number. */
readonly personalIdNumber: string;
readonly personalIdNumber: StringResult;
/** The additional number of the document. */
readonly documentAdditionalNumber: string;
readonly documentAdditionalNumber: StringResult;
/** The one more additional number of the document. */
readonly documentOptionalAdditionalNumber: string;
readonly documentOptionalAdditionalNumber: StringResult;
/** The additional personal identification number. */
readonly additionalPersonalIdNumber: string;
readonly additionalPersonalIdNumber: StringResult;
/** The issuing authority of the document. */
readonly issuingAuthority: string;
readonly issuingAuthority: StringResult;

@@ -78,0 +78,0 @@ /** The driver license detailed info. */

@@ -5,7 +5,6 @@ /**

export * from "./MicroblinkSDK/MicroblinkSDK";
export * from "./Recognizers/SuccessFrameGrabberRecognizer";
export * from "./Recognizers/BlinkBarcode/BarcodeData";
export * from "./Recognizers/BlinkID/Generic/BlinkIdCombinedRecognizer";
export * from "./Recognizers/BlinkID/Generic/BlinkIdRecognizer";
export * from "./Recognizers/BlinkID/Generic/BlinkIdMultiSideRecognizer";
export * from "./Recognizers/BlinkID/Generic/BlinkIdSingleSideRecognizer";
export * from "./Recognizers/BlinkID/IDBarcode/IdBarcodeRecognizer";
export * from "./Recognizers/BlinkID/ImageOptions";

@@ -36,3 +36,4 @@ /**

*/
export declare function bindCameraToVideoFeed(camera: SelectedCamera, videoFeed: HTMLVideoElement, preferredCameraType?: PreferredCameraType): Promise<boolean>;
export declare function bindCameraToVideoFeed(camera: SelectedCamera, videoFeed: HTMLVideoElement, preferredCameraType?: PreferredCameraType, shouldMaxResolution?: boolean): Promise<boolean>;
export declare function clearVideoFeed(videoFeed: HTMLVideoElement): void;
export declare function isCameraFocusProblematic(): boolean;

@@ -7,3 +7,3 @@ /**

* Private interface for letting RecognizerRunner inform VideoRecognizer when it
* needs to clear timeout. This is usually required when combined recognizer has
* needs to clear timeout. This is usually required when multi-side recognizer has
* finished scanning of the first side and needs a clean timeout start for the

@@ -10,0 +10,0 @@ * recognition of the back side.

@@ -145,4 +145,4 @@ /**

* recognitions.
* @param hardReset If set to false, combined recognizers will not be reset. If set to true, all recognizers will be
* reset.
* @param hardReset If set to false, multi-side recognizers will not be reset. If set to true, all recognizers
* will be reset.
*/

@@ -149,0 +149,0 @@ resetRecognizers(hardReset: boolean): Promise<void>;

@@ -22,2 +22,2 @@ /**

*/
export declare function captureFrame(imageSource: CanvasImageSource): CapturedFrame;
export declare function captureFrame(imageSource: CanvasImageSource, shouldCrop?: boolean): CapturedFrame;

@@ -31,3 +31,3 @@ /**

/**
* Called when first side recognition with the combined recognizer completes.
* Called when first side recognition with the multi-side recognizer completes.
*/

@@ -34,0 +34,0 @@ onFirstSideResult?(): void;

@@ -190,2 +190,3 @@ /**

private shouldReleaseVideoFeed;
private isProblematicFocus;
private playPauseEvent;

@@ -192,0 +193,0 @@ private recognitionLoop;

@@ -5,3 +5,9 @@ /**

import { WasmType } from "./WasmType";
/**
* Safari 16 shipped with WASM threads support, but it didn't ship with nested
* workers support, so an extra check is needed
* https://github.com/GoogleChromeLabs/squoosh/pull/1325/files#diff-904900db64cd3f48b0e765dbbdc6a218a7ea74a199671bde82a8944a904db86f
*/
export default function checkThreadsSupport(): Promise<boolean>;
export declare function detectWasmType(): Promise<WasmType>;
export declare function wasmFolder(wasmType: WasmType): string;

@@ -6,3 +6,3 @@ /**

import { BarcodeData } from "../../BlinkBarcode/BarcodeData";
import { DriverLicenseDetailedInfo } from "./DriverLicenseDetailedInfo";
import { BarcodeDriverLicenseDetailedInfo } from "./DriverLicenseDetailedInfo";
import { MBDate } from "../../../MicroblinkSDK/DataStructures";

@@ -61,3 +61,3 @@ /**

readonly addressDetailedInfo: AddressDetailedInfo;
readonly driverLicenseDetailedInfo: DriverLicenseDetailedInfo;
readonly driverLicenseDetailedInfo: BarcodeDriverLicenseDetailedInfo;
readonly empty: boolean;

@@ -64,0 +64,0 @@ /**

/**
* Copyright (c) Microblink Ltd. All rights reserved.
*/
import { DateResult, StringResult } from "./GenericResultStructures";
import { MBDate } from "../../../MicroblinkSDK/DataStructures";

@@ -9,2 +10,34 @@ /**

export interface VehicleClassInfo {
readonly vehicleClass: StringResult;
readonly licenceType: StringResult;
readonly effectiveDate: DateResult;
readonly expiryDate: DateResult;
}
/**
* Driver's license specific data.
*/
export interface DriverLicenseDetailedInfo {
/** The driver license conditions. */
readonly conditions: StringResult;
/**
* The restrictions to driving privileges for the driver license owner.
*/
readonly restrictions: StringResult;
/**
* The additional privileges granted to the driver license owner.
*/
readonly endorsements: StringResult;
/**
* The type of vehicle the driver license owner has privilege to drive.
*/
readonly vehicleClass: StringResult;
/**
* The additional information on vehicle class.
*/
readonly vehicleClassesInfo: Array<VehicleClassInfo>;
}
/**
* The additional information on vehicle class for barcodes.
*/
export interface BarcodeVehicleClassInfo {
readonly vehicleClass: string;

@@ -16,5 +49,5 @@ readonly licenceType: string;

/**
* Driver's license specific data.
* Driver's license specific data for barcodes.
*/
export interface DriverLicenseDetailedInfo {
export interface BarcodeDriverLicenseDetailedInfo {
/** The driver license conditions. */

@@ -37,3 +70,3 @@ readonly conditions: string;

*/
readonly vehicleClassesInfo: Array<VehicleClassInfo>;
readonly vehicleClassesInfo: Array<BarcodeVehicleClassInfo>;
}

@@ -10,2 +10,6 @@ /**

/**
* Orientation of the card detected on the scanned image.
*/
readonly cardOrientation: CardOrientation;
/**
* The color status determined from scanned image.

@@ -53,1 +57,10 @@ */

}
/**
* CardOrientation enum defines possible states of card orientation.
*/
export declare enum CardOrientation {
/** Card is horizontally placed inside the camera frame */
Horizontal = 0,
/** Card is vertically placed inside the camera frame */
Vertical = 1
}

@@ -6,17 +6,32 @@ /**

export declare enum ProcessingStatus {
/** Recognition was successful. */
/** The document was fully scanned and data was extracted as expected. */
Success = 0,
/** Detection of the document failed. */
/** The document was not found on the image. */
DetectionFailed = 1,
/** Preprocessing of the input image has failed. */
ImagePreprocessingFailed = 2,
/** Recognizer has inconsistent results. */
/**
* Stability is achieved when the same document is provided on consecutive frames,
* resulting in a consistent recognition between frames prior to data extraction.
* Valid only for video feed.
*/
StabilityTestFailed = 3,
/** Wrong side of the document has been scanned. */
/**
* The wrong side of the document is scanned. Front side scan is completed and back side is expected, but not
* provided by the end-user.
*
* Possible also if front is expected at the start of the scanning process and back is presented first
* by the end-user.
*/
ScanningWrongSide = 4,
/** Identification of the fields present on the document has failed. */
/** Unexpected fields are present on the document and removed from the final result. */
FieldIdentificationFailed = 5,
/** Mandatory field for the specific document is missing. */
/** Fields expected to appear on the scanned document have not been found. */
MandatoryFieldMissing = 6,
/** Result contains invalid characters in some of the fields. */
/**
* One of the extracted fields contains a character which does not satisfy the rule defined for that
* specific field.
*
* This processing status can only occur if validateResultCharacters setting is set to true.
*/
InvalidCharactersFound = 7,

@@ -29,15 +44,19 @@ /** Failed to return a requested image. */

MrzParsingFailed = 10,
/** Document class has been filtered out. */
/**
* Currently scanned document has been filtered out by its class.
* Occurrence of this processing status is affected by classFilter setting.
*/
ClassFiltered = 11,
/** Document currently not supported by the recognizer. */
UnsupportedClass = 12,
/** License for the detected document is missing. */
/** Document class is not included in the issued license. */
UnsupportedByLicense = 13,
/**
* Front side recognition has completed successfully, and recognizer is waiting for the other
* side to be scanned.
* Front side recognition has completed successfully, and recognizer is waiting for the other side to be scanned.
*/
AwaitingOtherSide = 14,
/** If front side recognition has not completed successfully, the back side is not scanned. */
NotScanned = 15,
/** Number of possible processing statuses. */
Count = 15
Count = 16
}

@@ -5,3 +5,3 @@ /**

/**
* RecognitionMode enum defines possible recognition modes by BlinkID(Combined)Recognizer.
* RecognitionMode enum defines possible recognition modes for BlinkID Single-side and BlinkID Multi-side recognizers.
*/

@@ -8,0 +8,0 @@ export declare enum RecognitionMode {

@@ -5,3 +5,3 @@ /**

import { DriverLicenseDetailedInfo } from "./DriverLicenseDetailedInfo";
import { MBDate } from "../../../MicroblinkSDK/DataStructures";
import { DateResult, StringResult } from "./GenericResultStructures";
/**

@@ -12,57 +12,57 @@ * VIZResult contains data extracted from the Visual Inspection Zone.

/** The first name of the document owner. */
readonly firstName: string;
readonly firstName: StringResult;
/** The last name of the document owner. */
readonly lastName: string;
readonly lastName: StringResult;
/** The full name of the document owner. */
readonly fullName: string;
readonly fullName: StringResult;
/** The additional name information of the document owner. */
readonly additionalNameInformation: string;
readonly additionalNameInformation: StringResult;
/** The localized name of the document owner. */
readonly localizedName: string;
readonly localizedName: StringResult;
/** The fathers name of the document owner. */
readonly fathersName: string;
readonly fathersName: StringResult;
/** The mothers name of the document owner. */
readonly mothersName: string;
readonly mothersName: StringResult;
/** The address of the document owner. */
readonly address: string;
readonly address: StringResult;
/** THe additional address information of the document owner. */
readonly additionalAddressInformation: string;
readonly additionalAddressInformation: StringResult;
/** The place of birth of the document owner. */
readonly placeOfBirth: string;
readonly placeOfBirth: StringResult;
/** The nationality of the document owner. */
readonly nationality: string;
readonly nationality: StringResult;
/** The race of the document owner. */
readonly race: string;
readonly race: StringResult;
/** The religion of the document owner. */
readonly religion: string;
readonly religion: StringResult;
/** The profession of the document owner. */
readonly profession: string;
readonly profession: StringResult;
/** The marital status of the document owner. */
readonly maritalStatus: string;
readonly maritalStatus: StringResult;
/** The residential status of the document owner. */
readonly residentialStatus: string;
readonly residentialStatus: StringResult;
/** The employer of the document owner. */
readonly employer: string;
readonly employer: StringResult;
/** The sex of the document owner. */
readonly sex: string;
readonly sex: StringResult;
/** The date of birth of the document owner. */
readonly dateOfBirth: MBDate;
readonly dateOfBirth: DateResult;
/** The date of issue of the document. */
readonly dateOfIssue: MBDate;
readonly dateOfIssue: DateResult;
/** The date of expiry of the document. */
readonly dateOfExpiry: MBDate;
readonly dateOfExpiry: DateResult;
/** Determines if date of expiry is permanent. */
readonly dateOfExpiryPermanent: boolean;
/** The document number. */
readonly documentNumber: string;
readonly documentNumber: StringResult;
/** The personal identification number. */
readonly personalIdNumber: string;
readonly personalIdNumber: StringResult;
/** The additional number of the document. */
readonly documentAdditionalNumber: string;
readonly documentAdditionalNumber: StringResult;
/** The one more additional number of the document. */
readonly documentOptionalAdditionalNumber: string;
readonly documentOptionalAdditionalNumber: StringResult;
/** The additional personal identification number. */
readonly additionalPersonalIdNumber: string;
readonly additionalPersonalIdNumber: StringResult;
/** The issuing authority of the document. */
readonly issuingAuthority: string;
readonly issuingAuthority: StringResult;
/** The driver license detailed info. */

@@ -69,0 +69,0 @@ readonly driverLicenseDetailedInfo: DriverLicenseDetailedInfo;

@@ -1,1 +0,1 @@

import{p as e,b as a}from"./p-9331f88b.js";(()=>{const a=import.meta.url,r={};return""!==a&&(r.resourcesUrl=new URL(".",a).href),e(r)})().then((e=>a([["p-784aca35",[[1,"mb-tooltip",{show:[4],message:[1],arrowPosition:[1,"arrow-position"],showWarningIcon:[4,"show-warning-icon"],showInfoIcon:[4,"show-info-icon"],textAlign:[1,"text-align"],containerWidth:[1,"container-width"]}]]],["p-5bf3224d",[[1,"blinkid-in-browser",{allowHelloMessage:[4,"allow-hello-message"],engineLocation:[1,"engine-location"],workerLocation:[1,"worker-location"],licenseKey:[1,"license-key"],wasmType:[1,"wasm-type"],rawRecognizers:[1,"recognizers"],recognizers:[16],recognizerOptions:[16],recognitionTimeout:[2,"recognition-timeout"],recognitionPauseTimeout:[2,"recognition-pause-timeout"],cameraExperienceStateDurations:[16],includeSuccessFrame:[4,"include-success-frame"],enableDrag:[4,"enable-drag"],hideFeedback:[4,"hide-feedback"],hideLoadingAndErrorUi:[4,"hide-loading-and-error-ui"],scanFromCamera:[4,"scan-from-camera"],scanFromImage:[4,"scan-from-image"],thoroughScanFromImage:[4,"thorough-scan-from-image"],galleryOverlayType:[1,"gallery-overlay-type"],galleryDropType:[1,"gallery-drop-type"],showActionLabels:[4,"show-action-labels"],showModalWindows:[4,"show-modal-windows"],showCameraFeedbackBarcodeMessage:[4,"show-camera-feedback-barcode-message"],rawTranslations:[1,"translations"],translations:[16],iconCameraDefault:[1,"icon-camera-default"],iconCameraActive:[1,"icon-camera-active"],iconGalleryDefault:[1,"icon-gallery-default"],iconGalleryActive:[1,"icon-gallery-active"],iconInvalidFormat:[1,"icon-invalid-format"],iconSpinnerScreenLoading:[1,"icon-spinner-screen-loading"],iconSpinnerFromGalleryExperience:[1,"icon-spinner-from-gallery-experience"],iconGalleryScanningCompleted:[1,"icon-gallery-scanning-completed"],cameraId:[1,"camera-id"],setUiState:[64],startCameraScan:[64],startImageScan:[64],startCombinedImageScan:[64],setUiMessage:[64],getProductIntegrationInfo:[64]}],[1,"mb-component",{allowHelloMessage:[4,"allow-hello-message"],engineLocation:[1,"engine-location"],workerLocation:[1,"worker-location"],licenseKey:[1,"license-key"],wasmType:[1025,"wasm-type"],recognizers:[1040],recognizerOptions:[1040],recognitionTimeout:[2,"recognition-timeout"],recognitionPauseTimeout:[2,"recognition-pause-timeout"],cameraExperienceStateDurations:[16],includeSuccessFrame:[4,"include-success-frame"],enableDrag:[4,"enable-drag"],hideLoadingAndErrorUi:[4,"hide-loading-and-error-ui"],rtl:[4],scanFromCamera:[4,"scan-from-camera"],scanFromImage:[4,"scan-from-image"],thoroughScanFromImage:[4,"thorough-scan-from-image"],galleryOverlayType:[1,"gallery-overlay-type"],galleryDropType:[1,"gallery-drop-type"],showActionLabels:[4,"show-action-labels"],showModalWindows:[4,"show-modal-windows"],showCameraFeedbackBarcodeMessage:[4,"show-camera-feedback-barcode-message"],showScanningLine:[4,"show-scanning-line"],iconCameraDefault:[1,"icon-camera-default"],iconCameraActive:[1,"icon-camera-active"],iconGalleryDefault:[1,"icon-gallery-default"],iconDragAndDropGalleryDefault:[1,"icon-drag-and-drop-gallery-default"],iconDragAndDropWarningDefault:[1,"icon-drag-and-drop-warning-default"],iconGalleryActive:[1,"icon-gallery-active"],iconInvalidFormat:[1,"icon-invalid-format"],iconSpinnerScreenLoading:[1,"icon-spinner-screen-loading"],iconSpinnerFromGalleryExperience:[1,"icon-spinner-from-gallery-experience"],iconGalleryScanningCompleted:[1,"icon-gallery-scanning-completed"],sdkService:[16],translationService:[16],cameraId:[1,"camera-id"],galleryExperienceModalErrorWindowVisible:[32],clearIsCameraActive:[32],apiProcessStatusVisible:[32],apiProcessStatusState:[32],startCameraScan:[64],startImageScan:[64],startCombinedImageScan:[64],setUiState:[64]},[[8,"keyup","handleKeyUp"]]],[1,"mb-container"],[1,"mb-feedback",{visible:[4],paragraphClassName:[32],paragraphValue:[32],show:[64]}],[1,"mb-camera-experience",{type:[1],cameraExperienceStateDurations:[16],showOverlay:[4,"show-overlay"],translationService:[16],apiState:[1,"api-state"],cameraFlipped:[1028,"camera-flipped"],showScanningLine:[4,"show-scanning-line"],showCameraFeedbackBarcodeMessage:[4,"show-camera-feedback-barcode-message"],clearIsCameraActive:[4,"clear-is-camera-active"],cameraCursorBarcodeClassName:[32],cameraCursorIdentityCardClassName:[32],cameraCursorPaymentCardClassName:[32],scanningLineBarcodeClassName:[32],scanningLinePaymentCardClassName:[32],cameraMessageIdentityCardContent:[32],cameraMessageIdentityCardClassName:[32],setActiveCamera:[64],populateCameraDevices:[64],setCameraFlipState:[64],setState:[64],resetState:[64]}],[1,"mb-api-process-status",{visible:[4],state:[1],translationService:[16]}],[1,"mb-button",{clickHandler:[16],disabled:[4],visible:[4],selected:[4],imageSrcDefault:[1,"image-src-default"],imageSrcActive:[1,"image-src-active"],imageAlt:[1,"image-alt"],label:[1],buttonTitle:[1,"button-title"]}],[1,"mb-button-classic",{inverted:[4],disabled:[4],preventDefault:[4,"prevent-default"],clickHandler:[16]}],[1,"mb-completed",{icon:[1]}],[1,"mb-image-box",{boxTitle:[1,"box-title"],anchorText:[1,"anchor-text"],clear:[64]}],[1,"mb-overlay",{fullscreen:[4],visible:[4]}],[1,"mb-screen",{visible:[4]}],[1,"mb-spinner",{icon:[1],size:[1]}],[1,"mb-camera-toolbar",{showClose:[4,"show-close"],clearIsCameraActive:[4,"clear-is-camera-active"],enableCameraFlip:[4,"enable-camera-flip"],cameraFlipped:[4,"camera-flipped"],showCloseButton:[32],isDesktop:[32],setActiveCamera:[64],populateCameraDevices:[64]},[[2,"setIsCameraActive","handleSetIsCameraActive"]]],[1,"mb-modal",{visible:[4],elevated:[4],centered:[4],modalTitle:[1,"modal-title"],content:[1],contentCentered:[4,"content-centered"],showBackButton:[4,"show-back-button"],hideFooter:[4,"hide-footer"]}],[1,"mb-camera-selection",{clearIsCameraActive:[4,"clear-is-camera-active"],activeCamera:[32],cameraList:[32],isListVisible:[32],setActiveCamera:[64],populateCameraDevices:[64]}]]]],e)));
import{p as e,b as a}from"./p-9331f88b.js";(()=>{const a=import.meta.url,i={};return""!==a&&(i.resourcesUrl=new URL(".",a).href),e(i)})().then((e=>a([["p-784aca35",[[1,"mb-tooltip",{show:[4],message:[1],arrowPosition:[1,"arrow-position"],showWarningIcon:[4,"show-warning-icon"],showInfoIcon:[4,"show-info-icon"],textAlign:[1,"text-align"],containerWidth:[1,"container-width"]}]]],["p-5cc108d3",[[1,"blinkid-in-browser",{allowHelloMessage:[4,"allow-hello-message"],engineLocation:[1,"engine-location"],workerLocation:[1,"worker-location"],licenseKey:[1,"license-key"],wasmType:[1,"wasm-type"],rawRecognizers:[1,"recognizers"],recognizers:[16],recognizerOptions:[16],recognitionTimeout:[2,"recognition-timeout"],recognitionPauseTimeout:[2,"recognition-pause-timeout"],cameraExperienceStateDurations:[16],enableDrag:[4,"enable-drag"],hideFeedback:[4,"hide-feedback"],hideLoadingAndErrorUi:[4,"hide-loading-and-error-ui"],scanFromCamera:[4,"scan-from-camera"],scanFromImage:[4,"scan-from-image"],thoroughScanFromImage:[4,"thorough-scan-from-image"],galleryOverlayType:[1,"gallery-overlay-type"],galleryDropType:[1,"gallery-drop-type"],showActionLabels:[4,"show-action-labels"],showModalWindows:[4,"show-modal-windows"],showCameraFeedbackBarcodeMessage:[4,"show-camera-feedback-barcode-message"],rawTranslations:[1,"translations"],translations:[16],iconCameraDefault:[1,"icon-camera-default"],iconCameraActive:[1,"icon-camera-active"],iconGalleryDefault:[1,"icon-gallery-default"],iconGalleryActive:[1,"icon-gallery-active"],iconInvalidFormat:[1,"icon-invalid-format"],iconSpinnerScreenLoading:[1,"icon-spinner-screen-loading"],iconSpinnerFromGalleryExperience:[1,"icon-spinner-from-gallery-experience"],iconGalleryScanningCompleted:[1,"icon-gallery-scanning-completed"],cameraId:[1,"camera-id"],setUiState:[64],startCameraScan:[64],startImageScan:[64],startMultiSideImageScan:[64],setUiMessage:[64],getProductIntegrationInfo:[64]}],[1,"mb-component",{allowHelloMessage:[4,"allow-hello-message"],engineLocation:[1,"engine-location"],workerLocation:[1,"worker-location"],licenseKey:[1,"license-key"],wasmType:[1025,"wasm-type"],recognizers:[1040],recognizerOptions:[1040],recognitionTimeout:[2,"recognition-timeout"],recognitionPauseTimeout:[2,"recognition-pause-timeout"],cameraExperienceStateDurations:[16],includeSuccessFrame:[4,"include-success-frame"],enableDrag:[4,"enable-drag"],hideLoadingAndErrorUi:[4,"hide-loading-and-error-ui"],rtl:[4],scanFromCamera:[4,"scan-from-camera"],scanFromImage:[4,"scan-from-image"],thoroughScanFromImage:[4,"thorough-scan-from-image"],galleryOverlayType:[1,"gallery-overlay-type"],galleryDropType:[1,"gallery-drop-type"],showActionLabels:[4,"show-action-labels"],showModalWindows:[4,"show-modal-windows"],showCameraFeedbackBarcodeMessage:[4,"show-camera-feedback-barcode-message"],showScanningLine:[4,"show-scanning-line"],iconCameraDefault:[1,"icon-camera-default"],iconCameraActive:[1,"icon-camera-active"],iconGalleryDefault:[1,"icon-gallery-default"],iconDragAndDropGalleryDefault:[1,"icon-drag-and-drop-gallery-default"],iconDragAndDropWarningDefault:[1,"icon-drag-and-drop-warning-default"],iconGalleryActive:[1,"icon-gallery-active"],iconInvalidFormat:[1,"icon-invalid-format"],iconSpinnerScreenLoading:[1,"icon-spinner-screen-loading"],iconSpinnerFromGalleryExperience:[1,"icon-spinner-from-gallery-experience"],iconGalleryScanningCompleted:[1,"icon-gallery-scanning-completed"],sdkService:[16],translationService:[16],cameraId:[1,"camera-id"],galleryExperienceModalErrorWindowVisible:[32],clearIsCameraActive:[32],apiProcessStatusVisible:[32],apiProcessStatusState:[32],startCameraScan:[64],startImageScan:[64],startMultiSideImageScan:[64],setUiState:[64]},[[8,"keyup","handleKeyUp"]]],[1,"mb-container"],[1,"mb-feedback",{visible:[4],paragraphClassName:[32],paragraphValue:[32],show:[64]}],[1,"mb-camera-experience",{type:[1],cameraExperienceStateDurations:[16],showOverlay:[4,"show-overlay"],translationService:[16],apiState:[1,"api-state"],cameraFlipped:[1028,"camera-flipped"],showScanningLine:[4,"show-scanning-line"],showCameraFeedbackBarcodeMessage:[4,"show-camera-feedback-barcode-message"],clearIsCameraActive:[4,"clear-is-camera-active"],cameraCursorBarcodeClassName:[32],cameraCursorIdentityCardClassName:[32],cameraCursorPaymentCardClassName:[32],scanningLineBarcodeClassName:[32],scanningLinePaymentCardClassName:[32],cameraMessageIdentityCardContent:[32],cameraMessageIdentityCardClassName:[32],setActiveCamera:[64],populateCameraDevices:[64],setCameraFlipState:[64],setState:[64],resetState:[64]}],[1,"mb-api-process-status",{visible:[4],state:[1],translationService:[16]}],[1,"mb-button",{clickHandler:[16],disabled:[4],visible:[4],selected:[4],imageSrcDefault:[1,"image-src-default"],imageSrcActive:[1,"image-src-active"],imageAlt:[1,"image-alt"],label:[1],buttonTitle:[1,"button-title"]}],[1,"mb-button-classic",{inverted:[4],disabled:[4],preventDefault:[4,"prevent-default"],clickHandler:[16]}],[1,"mb-completed",{icon:[1]}],[1,"mb-image-box",{boxTitle:[1,"box-title"],anchorText:[1,"anchor-text"],clear:[64]}],[1,"mb-overlay",{fullscreen:[4],visible:[4]}],[1,"mb-screen",{visible:[4]}],[1,"mb-spinner",{icon:[1],size:[1]}],[1,"mb-camera-toolbar",{showClose:[4,"show-close"],clearIsCameraActive:[4,"clear-is-camera-active"],enableCameraFlip:[4,"enable-camera-flip"],cameraFlipped:[4,"camera-flipped"],showCloseButton:[32],isDesktop:[32],setActiveCamera:[64],populateCameraDevices:[64]},[[2,"setIsCameraActive","handleSetIsCameraActive"]]],[1,"mb-modal",{visible:[4],elevated:[4],centered:[4],modalTitle:[1,"modal-title"],content:[1],contentCentered:[4,"content-centered"],showBackButton:[4,"show-back-button"],hideFooter:[4,"hide-footer"]}],[1,"mb-camera-selection",{clearIsCameraActive:[4,"clear-is-camera-active"],activeCamera:[32],cameraList:[32],isListVisible:[32],setActiveCamera:[64],populateCameraDevices:[64]}]]]],e)));

@@ -18,3 +18,3 @@ 'use strict';

patchBrowser().then(options => {
return index.bootstrapLazy([["mb-tooltip.cjs",[[1,"mb-tooltip",{"show":[4],"message":[1],"arrowPosition":[1,"arrow-position"],"showWarningIcon":[4,"show-warning-icon"],"showInfoIcon":[4,"show-info-icon"],"textAlign":[1,"text-align"],"containerWidth":[1,"container-width"]}]]],["blinkid-in-browser_16.cjs",[[1,"blinkid-in-browser",{"allowHelloMessage":[4,"allow-hello-message"],"engineLocation":[1,"engine-location"],"workerLocation":[1,"worker-location"],"licenseKey":[1,"license-key"],"wasmType":[1,"wasm-type"],"rawRecognizers":[1,"recognizers"],"recognizers":[16],"recognizerOptions":[16],"recognitionTimeout":[2,"recognition-timeout"],"recognitionPauseTimeout":[2,"recognition-pause-timeout"],"cameraExperienceStateDurations":[16],"includeSuccessFrame":[4,"include-success-frame"],"enableDrag":[4,"enable-drag"],"hideFeedback":[4,"hide-feedback"],"hideLoadingAndErrorUi":[4,"hide-loading-and-error-ui"],"scanFromCamera":[4,"scan-from-camera"],"scanFromImage":[4,"scan-from-image"],"thoroughScanFromImage":[4,"thorough-scan-from-image"],"galleryOverlayType":[1,"gallery-overlay-type"],"galleryDropType":[1,"gallery-drop-type"],"showActionLabels":[4,"show-action-labels"],"showModalWindows":[4,"show-modal-windows"],"showCameraFeedbackBarcodeMessage":[4,"show-camera-feedback-barcode-message"],"rawTranslations":[1,"translations"],"translations":[16],"iconCameraDefault":[1,"icon-camera-default"],"iconCameraActive":[1,"icon-camera-active"],"iconGalleryDefault":[1,"icon-gallery-default"],"iconGalleryActive":[1,"icon-gallery-active"],"iconInvalidFormat":[1,"icon-invalid-format"],"iconSpinnerScreenLoading":[1,"icon-spinner-screen-loading"],"iconSpinnerFromGalleryExperience":[1,"icon-spinner-from-gallery-experience"],"iconGalleryScanningCompleted":[1,"icon-gallery-scanning-completed"],"cameraId":[1,"camera-id"],"setUiState":[64],"startCameraScan":[64],"startImageScan":[64],"startCombinedImageScan":[64],"setUiMessage":[64],"getProductIntegrationInfo":[64]}],[1,"mb-component",{"allowHelloMessage":[4,"allow-hello-message"],"engineLocation":[1,"engine-location"],"workerLocation":[1,"worker-location"],"licenseKey":[1,"license-key"],"wasmType":[1025,"wasm-type"],"recognizers":[1040],"recognizerOptions":[1040],"recognitionTimeout":[2,"recognition-timeout"],"recognitionPauseTimeout":[2,"recognition-pause-timeout"],"cameraExperienceStateDurations":[16],"includeSuccessFrame":[4,"include-success-frame"],"enableDrag":[4,"enable-drag"],"hideLoadingAndErrorUi":[4,"hide-loading-and-error-ui"],"rtl":[4],"scanFromCamera":[4,"scan-from-camera"],"scanFromImage":[4,"scan-from-image"],"thoroughScanFromImage":[4,"thorough-scan-from-image"],"galleryOverlayType":[1,"gallery-overlay-type"],"galleryDropType":[1,"gallery-drop-type"],"showActionLabels":[4,"show-action-labels"],"showModalWindows":[4,"show-modal-windows"],"showCameraFeedbackBarcodeMessage":[4,"show-camera-feedback-barcode-message"],"showScanningLine":[4,"show-scanning-line"],"iconCameraDefault":[1,"icon-camera-default"],"iconCameraActive":[1,"icon-camera-active"],"iconGalleryDefault":[1,"icon-gallery-default"],"iconDragAndDropGalleryDefault":[1,"icon-drag-and-drop-gallery-default"],"iconDragAndDropWarningDefault":[1,"icon-drag-and-drop-warning-default"],"iconGalleryActive":[1,"icon-gallery-active"],"iconInvalidFormat":[1,"icon-invalid-format"],"iconSpinnerScreenLoading":[1,"icon-spinner-screen-loading"],"iconSpinnerFromGalleryExperience":[1,"icon-spinner-from-gallery-experience"],"iconGalleryScanningCompleted":[1,"icon-gallery-scanning-completed"],"sdkService":[16],"translationService":[16],"cameraId":[1,"camera-id"],"galleryExperienceModalErrorWindowVisible":[32],"clearIsCameraActive":[32],"apiProcessStatusVisible":[32],"apiProcessStatusState":[32],"startCameraScan":[64],"startImageScan":[64],"startCombinedImageScan":[64],"setUiState":[64]},[[8,"keyup","handleKeyUp"]]],[1,"mb-container"],[1,"mb-feedback",{"visible":[4],"paragraphClassName":[32],"paragraphValue":[32],"show":[64]}],[1,"mb-camera-experience",{"type":[1],"cameraExperienceStateDurations":[16],"showOverlay":[4,"show-overlay"],"translationService":[16],"apiState":[1,"api-state"],"cameraFlipped":[1028,"camera-flipped"],"showScanningLine":[4,"show-scanning-line"],"showCameraFeedbackBarcodeMessage":[4,"show-camera-feedback-barcode-message"],"clearIsCameraActive":[4,"clear-is-camera-active"],"cameraCursorBarcodeClassName":[32],"cameraCursorIdentityCardClassName":[32],"cameraCursorPaymentCardClassName":[32],"scanningLineBarcodeClassName":[32],"scanningLinePaymentCardClassName":[32],"cameraMessageIdentityCardContent":[32],"cameraMessageIdentityCardClassName":[32],"setActiveCamera":[64],"populateCameraDevices":[64],"setCameraFlipState":[64],"setState":[64],"resetState":[64]}],[1,"mb-api-process-status",{"visible":[4],"state":[1],"translationService":[16]}],[1,"mb-button",{"clickHandler":[16],"disabled":[4],"visible":[4],"selected":[4],"imageSrcDefault":[1,"image-src-default"],"imageSrcActive":[1,"image-src-active"],"imageAlt":[1,"image-alt"],"label":[1],"buttonTitle":[1,"button-title"]}],[1,"mb-button-classic",{"inverted":[4],"disabled":[4],"preventDefault":[4,"prevent-default"],"clickHandler":[16]}],[1,"mb-completed",{"icon":[1]}],[1,"mb-image-box",{"boxTitle":[1,"box-title"],"anchorText":[1,"anchor-text"],"clear":[64]}],[1,"mb-overlay",{"fullscreen":[4],"visible":[4]}],[1,"mb-screen",{"visible":[4]}],[1,"mb-spinner",{"icon":[1],"size":[1]}],[1,"mb-camera-toolbar",{"showClose":[4,"show-close"],"clearIsCameraActive":[4,"clear-is-camera-active"],"enableCameraFlip":[4,"enable-camera-flip"],"cameraFlipped":[4,"camera-flipped"],"showCloseButton":[32],"isDesktop":[32],"setActiveCamera":[64],"populateCameraDevices":[64]},[[2,"setIsCameraActive","handleSetIsCameraActive"]]],[1,"mb-modal",{"visible":[4],"elevated":[4],"centered":[4],"modalTitle":[1,"modal-title"],"content":[1],"contentCentered":[4,"content-centered"],"showBackButton":[4,"show-back-button"],"hideFooter":[4,"hide-footer"]}],[1,"mb-camera-selection",{"clearIsCameraActive":[4,"clear-is-camera-active"],"activeCamera":[32],"cameraList":[32],"isListVisible":[32],"setActiveCamera":[64],"populateCameraDevices":[64]}]]]], options);
return index.bootstrapLazy([["mb-tooltip.cjs",[[1,"mb-tooltip",{"show":[4],"message":[1],"arrowPosition":[1,"arrow-position"],"showWarningIcon":[4,"show-warning-icon"],"showInfoIcon":[4,"show-info-icon"],"textAlign":[1,"text-align"],"containerWidth":[1,"container-width"]}]]],["blinkid-in-browser_16.cjs",[[1,"blinkid-in-browser",{"allowHelloMessage":[4,"allow-hello-message"],"engineLocation":[1,"engine-location"],"workerLocation":[1,"worker-location"],"licenseKey":[1,"license-key"],"wasmType":[1,"wasm-type"],"rawRecognizers":[1,"recognizers"],"recognizers":[16],"recognizerOptions":[16],"recognitionTimeout":[2,"recognition-timeout"],"recognitionPauseTimeout":[2,"recognition-pause-timeout"],"cameraExperienceStateDurations":[16],"enableDrag":[4,"enable-drag"],"hideFeedback":[4,"hide-feedback"],"hideLoadingAndErrorUi":[4,"hide-loading-and-error-ui"],"scanFromCamera":[4,"scan-from-camera"],"scanFromImage":[4,"scan-from-image"],"thoroughScanFromImage":[4,"thorough-scan-from-image"],"galleryOverlayType":[1,"gallery-overlay-type"],"galleryDropType":[1,"gallery-drop-type"],"showActionLabels":[4,"show-action-labels"],"showModalWindows":[4,"show-modal-windows"],"showCameraFeedbackBarcodeMessage":[4,"show-camera-feedback-barcode-message"],"rawTranslations":[1,"translations"],"translations":[16],"iconCameraDefault":[1,"icon-camera-default"],"iconCameraActive":[1,"icon-camera-active"],"iconGalleryDefault":[1,"icon-gallery-default"],"iconGalleryActive":[1,"icon-gallery-active"],"iconInvalidFormat":[1,"icon-invalid-format"],"iconSpinnerScreenLoading":[1,"icon-spinner-screen-loading"],"iconSpinnerFromGalleryExperience":[1,"icon-spinner-from-gallery-experience"],"iconGalleryScanningCompleted":[1,"icon-gallery-scanning-completed"],"cameraId":[1,"camera-id"],"setUiState":[64],"startCameraScan":[64],"startImageScan":[64],"startMultiSideImageScan":[64],"setUiMessage":[64],"getProductIntegrationInfo":[64]}],[1,"mb-component",{"allowHelloMessage":[4,"allow-hello-message"],"engineLocation":[1,"engine-location"],"workerLocation":[1,"worker-location"],"licenseKey":[1,"license-key"],"wasmType":[1025,"wasm-type"],"recognizers":[1040],"recognizerOptions":[1040],"recognitionTimeout":[2,"recognition-timeout"],"recognitionPauseTimeout":[2,"recognition-pause-timeout"],"cameraExperienceStateDurations":[16],"includeSuccessFrame":[4,"include-success-frame"],"enableDrag":[4,"enable-drag"],"hideLoadingAndErrorUi":[4,"hide-loading-and-error-ui"],"rtl":[4],"scanFromCamera":[4,"scan-from-camera"],"scanFromImage":[4,"scan-from-image"],"thoroughScanFromImage":[4,"thorough-scan-from-image"],"galleryOverlayType":[1,"gallery-overlay-type"],"galleryDropType":[1,"gallery-drop-type"],"showActionLabels":[4,"show-action-labels"],"showModalWindows":[4,"show-modal-windows"],"showCameraFeedbackBarcodeMessage":[4,"show-camera-feedback-barcode-message"],"showScanningLine":[4,"show-scanning-line"],"iconCameraDefault":[1,"icon-camera-default"],"iconCameraActive":[1,"icon-camera-active"],"iconGalleryDefault":[1,"icon-gallery-default"],"iconDragAndDropGalleryDefault":[1,"icon-drag-and-drop-gallery-default"],"iconDragAndDropWarningDefault":[1,"icon-drag-and-drop-warning-default"],"iconGalleryActive":[1,"icon-gallery-active"],"iconInvalidFormat":[1,"icon-invalid-format"],"iconSpinnerScreenLoading":[1,"icon-spinner-screen-loading"],"iconSpinnerFromGalleryExperience":[1,"icon-spinner-from-gallery-experience"],"iconGalleryScanningCompleted":[1,"icon-gallery-scanning-completed"],"sdkService":[16],"translationService":[16],"cameraId":[1,"camera-id"],"galleryExperienceModalErrorWindowVisible":[32],"clearIsCameraActive":[32],"apiProcessStatusVisible":[32],"apiProcessStatusState":[32],"startCameraScan":[64],"startImageScan":[64],"startMultiSideImageScan":[64],"setUiState":[64]},[[8,"keyup","handleKeyUp"]]],[1,"mb-container"],[1,"mb-feedback",{"visible":[4],"paragraphClassName":[32],"paragraphValue":[32],"show":[64]}],[1,"mb-camera-experience",{"type":[1],"cameraExperienceStateDurations":[16],"showOverlay":[4,"show-overlay"],"translationService":[16],"apiState":[1,"api-state"],"cameraFlipped":[1028,"camera-flipped"],"showScanningLine":[4,"show-scanning-line"],"showCameraFeedbackBarcodeMessage":[4,"show-camera-feedback-barcode-message"],"clearIsCameraActive":[4,"clear-is-camera-active"],"cameraCursorBarcodeClassName":[32],"cameraCursorIdentityCardClassName":[32],"cameraCursorPaymentCardClassName":[32],"scanningLineBarcodeClassName":[32],"scanningLinePaymentCardClassName":[32],"cameraMessageIdentityCardContent":[32],"cameraMessageIdentityCardClassName":[32],"setActiveCamera":[64],"populateCameraDevices":[64],"setCameraFlipState":[64],"setState":[64],"resetState":[64]}],[1,"mb-api-process-status",{"visible":[4],"state":[1],"translationService":[16]}],[1,"mb-button",{"clickHandler":[16],"disabled":[4],"visible":[4],"selected":[4],"imageSrcDefault":[1,"image-src-default"],"imageSrcActive":[1,"image-src-active"],"imageAlt":[1,"image-alt"],"label":[1],"buttonTitle":[1,"button-title"]}],[1,"mb-button-classic",{"inverted":[4],"disabled":[4],"preventDefault":[4,"prevent-default"],"clickHandler":[16]}],[1,"mb-completed",{"icon":[1]}],[1,"mb-image-box",{"boxTitle":[1,"box-title"],"anchorText":[1,"anchor-text"],"clear":[64]}],[1,"mb-overlay",{"fullscreen":[4],"visible":[4]}],[1,"mb-screen",{"visible":[4]}],[1,"mb-spinner",{"icon":[1],"size":[1]}],[1,"mb-camera-toolbar",{"showClose":[4,"show-close"],"clearIsCameraActive":[4,"clear-is-camera-active"],"enableCameraFlip":[4,"enable-camera-flip"],"cameraFlipped":[4,"camera-flipped"],"showCloseButton":[32],"isDesktop":[32],"setActiveCamera":[64],"populateCameraDevices":[64]},[[2,"setIsCameraActive","handleSetIsCameraActive"]]],[1,"mb-modal",{"visible":[4],"elevated":[4],"centered":[4],"modalTitle":[1,"modal-title"],"content":[1],"contentCentered":[4,"content-centered"],"showBackButton":[4,"show-back-button"],"hideFooter":[4,"hide-footer"]}],[1,"mb-camera-selection",{"clearIsCameraActive":[4,"clear-is-camera-active"],"activeCamera":[32],"cameraList":[32],"isListVisible":[32],"setActiveCamera":[64],"populateCameraDevices":[64]}]]]], options);
});

@@ -17,3 +17,3 @@ 'use strict';

return patchEsm().then(() => {
return index.bootstrapLazy([["mb-tooltip.cjs",[[1,"mb-tooltip",{"show":[4],"message":[1],"arrowPosition":[1,"arrow-position"],"showWarningIcon":[4,"show-warning-icon"],"showInfoIcon":[4,"show-info-icon"],"textAlign":[1,"text-align"],"containerWidth":[1,"container-width"]}]]],["blinkid-in-browser_16.cjs",[[1,"blinkid-in-browser",{"allowHelloMessage":[4,"allow-hello-message"],"engineLocation":[1,"engine-location"],"workerLocation":[1,"worker-location"],"licenseKey":[1,"license-key"],"wasmType":[1,"wasm-type"],"rawRecognizers":[1,"recognizers"],"recognizers":[16],"recognizerOptions":[16],"recognitionTimeout":[2,"recognition-timeout"],"recognitionPauseTimeout":[2,"recognition-pause-timeout"],"cameraExperienceStateDurations":[16],"includeSuccessFrame":[4,"include-success-frame"],"enableDrag":[4,"enable-drag"],"hideFeedback":[4,"hide-feedback"],"hideLoadingAndErrorUi":[4,"hide-loading-and-error-ui"],"scanFromCamera":[4,"scan-from-camera"],"scanFromImage":[4,"scan-from-image"],"thoroughScanFromImage":[4,"thorough-scan-from-image"],"galleryOverlayType":[1,"gallery-overlay-type"],"galleryDropType":[1,"gallery-drop-type"],"showActionLabels":[4,"show-action-labels"],"showModalWindows":[4,"show-modal-windows"],"showCameraFeedbackBarcodeMessage":[4,"show-camera-feedback-barcode-message"],"rawTranslations":[1,"translations"],"translations":[16],"iconCameraDefault":[1,"icon-camera-default"],"iconCameraActive":[1,"icon-camera-active"],"iconGalleryDefault":[1,"icon-gallery-default"],"iconGalleryActive":[1,"icon-gallery-active"],"iconInvalidFormat":[1,"icon-invalid-format"],"iconSpinnerScreenLoading":[1,"icon-spinner-screen-loading"],"iconSpinnerFromGalleryExperience":[1,"icon-spinner-from-gallery-experience"],"iconGalleryScanningCompleted":[1,"icon-gallery-scanning-completed"],"cameraId":[1,"camera-id"],"setUiState":[64],"startCameraScan":[64],"startImageScan":[64],"startCombinedImageScan":[64],"setUiMessage":[64],"getProductIntegrationInfo":[64]}],[1,"mb-component",{"allowHelloMessage":[4,"allow-hello-message"],"engineLocation":[1,"engine-location"],"workerLocation":[1,"worker-location"],"licenseKey":[1,"license-key"],"wasmType":[1025,"wasm-type"],"recognizers":[1040],"recognizerOptions":[1040],"recognitionTimeout":[2,"recognition-timeout"],"recognitionPauseTimeout":[2,"recognition-pause-timeout"],"cameraExperienceStateDurations":[16],"includeSuccessFrame":[4,"include-success-frame"],"enableDrag":[4,"enable-drag"],"hideLoadingAndErrorUi":[4,"hide-loading-and-error-ui"],"rtl":[4],"scanFromCamera":[4,"scan-from-camera"],"scanFromImage":[4,"scan-from-image"],"thoroughScanFromImage":[4,"thorough-scan-from-image"],"galleryOverlayType":[1,"gallery-overlay-type"],"galleryDropType":[1,"gallery-drop-type"],"showActionLabels":[4,"show-action-labels"],"showModalWindows":[4,"show-modal-windows"],"showCameraFeedbackBarcodeMessage":[4,"show-camera-feedback-barcode-message"],"showScanningLine":[4,"show-scanning-line"],"iconCameraDefault":[1,"icon-camera-default"],"iconCameraActive":[1,"icon-camera-active"],"iconGalleryDefault":[1,"icon-gallery-default"],"iconDragAndDropGalleryDefault":[1,"icon-drag-and-drop-gallery-default"],"iconDragAndDropWarningDefault":[1,"icon-drag-and-drop-warning-default"],"iconGalleryActive":[1,"icon-gallery-active"],"iconInvalidFormat":[1,"icon-invalid-format"],"iconSpinnerScreenLoading":[1,"icon-spinner-screen-loading"],"iconSpinnerFromGalleryExperience":[1,"icon-spinner-from-gallery-experience"],"iconGalleryScanningCompleted":[1,"icon-gallery-scanning-completed"],"sdkService":[16],"translationService":[16],"cameraId":[1,"camera-id"],"galleryExperienceModalErrorWindowVisible":[32],"clearIsCameraActive":[32],"apiProcessStatusVisible":[32],"apiProcessStatusState":[32],"startCameraScan":[64],"startImageScan":[64],"startCombinedImageScan":[64],"setUiState":[64]},[[8,"keyup","handleKeyUp"]]],[1,"mb-container"],[1,"mb-feedback",{"visible":[4],"paragraphClassName":[32],"paragraphValue":[32],"show":[64]}],[1,"mb-camera-experience",{"type":[1],"cameraExperienceStateDurations":[16],"showOverlay":[4,"show-overlay"],"translationService":[16],"apiState":[1,"api-state"],"cameraFlipped":[1028,"camera-flipped"],"showScanningLine":[4,"show-scanning-line"],"showCameraFeedbackBarcodeMessage":[4,"show-camera-feedback-barcode-message"],"clearIsCameraActive":[4,"clear-is-camera-active"],"cameraCursorBarcodeClassName":[32],"cameraCursorIdentityCardClassName":[32],"cameraCursorPaymentCardClassName":[32],"scanningLineBarcodeClassName":[32],"scanningLinePaymentCardClassName":[32],"cameraMessageIdentityCardContent":[32],"cameraMessageIdentityCardClassName":[32],"setActiveCamera":[64],"populateCameraDevices":[64],"setCameraFlipState":[64],"setState":[64],"resetState":[64]}],[1,"mb-api-process-status",{"visible":[4],"state":[1],"translationService":[16]}],[1,"mb-button",{"clickHandler":[16],"disabled":[4],"visible":[4],"selected":[4],"imageSrcDefault":[1,"image-src-default"],"imageSrcActive":[1,"image-src-active"],"imageAlt":[1,"image-alt"],"label":[1],"buttonTitle":[1,"button-title"]}],[1,"mb-button-classic",{"inverted":[4],"disabled":[4],"preventDefault":[4,"prevent-default"],"clickHandler":[16]}],[1,"mb-completed",{"icon":[1]}],[1,"mb-image-box",{"boxTitle":[1,"box-title"],"anchorText":[1,"anchor-text"],"clear":[64]}],[1,"mb-overlay",{"fullscreen":[4],"visible":[4]}],[1,"mb-screen",{"visible":[4]}],[1,"mb-spinner",{"icon":[1],"size":[1]}],[1,"mb-camera-toolbar",{"showClose":[4,"show-close"],"clearIsCameraActive":[4,"clear-is-camera-active"],"enableCameraFlip":[4,"enable-camera-flip"],"cameraFlipped":[4,"camera-flipped"],"showCloseButton":[32],"isDesktop":[32],"setActiveCamera":[64],"populateCameraDevices":[64]},[[2,"setIsCameraActive","handleSetIsCameraActive"]]],[1,"mb-modal",{"visible":[4],"elevated":[4],"centered":[4],"modalTitle":[1,"modal-title"],"content":[1],"contentCentered":[4,"content-centered"],"showBackButton":[4,"show-back-button"],"hideFooter":[4,"hide-footer"]}],[1,"mb-camera-selection",{"clearIsCameraActive":[4,"clear-is-camera-active"],"activeCamera":[32],"cameraList":[32],"isListVisible":[32],"setActiveCamera":[64],"populateCameraDevices":[64]}]]]], options);
return index.bootstrapLazy([["mb-tooltip.cjs",[[1,"mb-tooltip",{"show":[4],"message":[1],"arrowPosition":[1,"arrow-position"],"showWarningIcon":[4,"show-warning-icon"],"showInfoIcon":[4,"show-info-icon"],"textAlign":[1,"text-align"],"containerWidth":[1,"container-width"]}]]],["blinkid-in-browser_16.cjs",[[1,"blinkid-in-browser",{"allowHelloMessage":[4,"allow-hello-message"],"engineLocation":[1,"engine-location"],"workerLocation":[1,"worker-location"],"licenseKey":[1,"license-key"],"wasmType":[1,"wasm-type"],"rawRecognizers":[1,"recognizers"],"recognizers":[16],"recognizerOptions":[16],"recognitionTimeout":[2,"recognition-timeout"],"recognitionPauseTimeout":[2,"recognition-pause-timeout"],"cameraExperienceStateDurations":[16],"enableDrag":[4,"enable-drag"],"hideFeedback":[4,"hide-feedback"],"hideLoadingAndErrorUi":[4,"hide-loading-and-error-ui"],"scanFromCamera":[4,"scan-from-camera"],"scanFromImage":[4,"scan-from-image"],"thoroughScanFromImage":[4,"thorough-scan-from-image"],"galleryOverlayType":[1,"gallery-overlay-type"],"galleryDropType":[1,"gallery-drop-type"],"showActionLabels":[4,"show-action-labels"],"showModalWindows":[4,"show-modal-windows"],"showCameraFeedbackBarcodeMessage":[4,"show-camera-feedback-barcode-message"],"rawTranslations":[1,"translations"],"translations":[16],"iconCameraDefault":[1,"icon-camera-default"],"iconCameraActive":[1,"icon-camera-active"],"iconGalleryDefault":[1,"icon-gallery-default"],"iconGalleryActive":[1,"icon-gallery-active"],"iconInvalidFormat":[1,"icon-invalid-format"],"iconSpinnerScreenLoading":[1,"icon-spinner-screen-loading"],"iconSpinnerFromGalleryExperience":[1,"icon-spinner-from-gallery-experience"],"iconGalleryScanningCompleted":[1,"icon-gallery-scanning-completed"],"cameraId":[1,"camera-id"],"setUiState":[64],"startCameraScan":[64],"startImageScan":[64],"startMultiSideImageScan":[64],"setUiMessage":[64],"getProductIntegrationInfo":[64]}],[1,"mb-component",{"allowHelloMessage":[4,"allow-hello-message"],"engineLocation":[1,"engine-location"],"workerLocation":[1,"worker-location"],"licenseKey":[1,"license-key"],"wasmType":[1025,"wasm-type"],"recognizers":[1040],"recognizerOptions":[1040],"recognitionTimeout":[2,"recognition-timeout"],"recognitionPauseTimeout":[2,"recognition-pause-timeout"],"cameraExperienceStateDurations":[16],"includeSuccessFrame":[4,"include-success-frame"],"enableDrag":[4,"enable-drag"],"hideLoadingAndErrorUi":[4,"hide-loading-and-error-ui"],"rtl":[4],"scanFromCamera":[4,"scan-from-camera"],"scanFromImage":[4,"scan-from-image"],"thoroughScanFromImage":[4,"thorough-scan-from-image"],"galleryOverlayType":[1,"gallery-overlay-type"],"galleryDropType":[1,"gallery-drop-type"],"showActionLabels":[4,"show-action-labels"],"showModalWindows":[4,"show-modal-windows"],"showCameraFeedbackBarcodeMessage":[4,"show-camera-feedback-barcode-message"],"showScanningLine":[4,"show-scanning-line"],"iconCameraDefault":[1,"icon-camera-default"],"iconCameraActive":[1,"icon-camera-active"],"iconGalleryDefault":[1,"icon-gallery-default"],"iconDragAndDropGalleryDefault":[1,"icon-drag-and-drop-gallery-default"],"iconDragAndDropWarningDefault":[1,"icon-drag-and-drop-warning-default"],"iconGalleryActive":[1,"icon-gallery-active"],"iconInvalidFormat":[1,"icon-invalid-format"],"iconSpinnerScreenLoading":[1,"icon-spinner-screen-loading"],"iconSpinnerFromGalleryExperience":[1,"icon-spinner-from-gallery-experience"],"iconGalleryScanningCompleted":[1,"icon-gallery-scanning-completed"],"sdkService":[16],"translationService":[16],"cameraId":[1,"camera-id"],"galleryExperienceModalErrorWindowVisible":[32],"clearIsCameraActive":[32],"apiProcessStatusVisible":[32],"apiProcessStatusState":[32],"startCameraScan":[64],"startImageScan":[64],"startMultiSideImageScan":[64],"setUiState":[64]},[[8,"keyup","handleKeyUp"]]],[1,"mb-container"],[1,"mb-feedback",{"visible":[4],"paragraphClassName":[32],"paragraphValue":[32],"show":[64]}],[1,"mb-camera-experience",{"type":[1],"cameraExperienceStateDurations":[16],"showOverlay":[4,"show-overlay"],"translationService":[16],"apiState":[1,"api-state"],"cameraFlipped":[1028,"camera-flipped"],"showScanningLine":[4,"show-scanning-line"],"showCameraFeedbackBarcodeMessage":[4,"show-camera-feedback-barcode-message"],"clearIsCameraActive":[4,"clear-is-camera-active"],"cameraCursorBarcodeClassName":[32],"cameraCursorIdentityCardClassName":[32],"cameraCursorPaymentCardClassName":[32],"scanningLineBarcodeClassName":[32],"scanningLinePaymentCardClassName":[32],"cameraMessageIdentityCardContent":[32],"cameraMessageIdentityCardClassName":[32],"setActiveCamera":[64],"populateCameraDevices":[64],"setCameraFlipState":[64],"setState":[64],"resetState":[64]}],[1,"mb-api-process-status",{"visible":[4],"state":[1],"translationService":[16]}],[1,"mb-button",{"clickHandler":[16],"disabled":[4],"visible":[4],"selected":[4],"imageSrcDefault":[1,"image-src-default"],"imageSrcActive":[1,"image-src-active"],"imageAlt":[1,"image-alt"],"label":[1],"buttonTitle":[1,"button-title"]}],[1,"mb-button-classic",{"inverted":[4],"disabled":[4],"preventDefault":[4,"prevent-default"],"clickHandler":[16]}],[1,"mb-completed",{"icon":[1]}],[1,"mb-image-box",{"boxTitle":[1,"box-title"],"anchorText":[1,"anchor-text"],"clear":[64]}],[1,"mb-overlay",{"fullscreen":[4],"visible":[4]}],[1,"mb-screen",{"visible":[4]}],[1,"mb-spinner",{"icon":[1],"size":[1]}],[1,"mb-camera-toolbar",{"showClose":[4,"show-close"],"clearIsCameraActive":[4,"clear-is-camera-active"],"enableCameraFlip":[4,"enable-camera-flip"],"cameraFlipped":[4,"camera-flipped"],"showCloseButton":[32],"isDesktop":[32],"setActiveCamera":[64],"populateCameraDevices":[64]},[[2,"setIsCameraActive","handleSetIsCameraActive"]]],[1,"mb-modal",{"visible":[4],"elevated":[4],"centered":[4],"modalTitle":[1,"modal-title"],"content":[1],"contentCentered":[4,"content-centered"],"showBackButton":[4,"show-back-button"],"hideFooter":[4,"hide-footer"]}],[1,"mb-camera-selection",{"clearIsCameraActive":[4,"clear-is-camera-active"],"activeCamera":[32],"cameraList":[32],"isListVisible":[32],"setActiveCamera":[64],"populateCameraDevices":[64]}]]]], options);
});

@@ -20,0 +20,0 @@ };

@@ -72,8 +72,2 @@ /**

/**
* Set to 'true' if success frame should be included in final scanning results.
*
* Default value is 'false'.
*/
this.includeSuccessFrame = false;
/**
* Set to 'false' if component should not enable drag and drop functionality.

@@ -198,3 +192,3 @@ *

/**
* Starts combined image scan, emits results from provided files.
* Starts multi-side image scan, emits results from provided files.
*

@@ -204,4 +198,4 @@ * @param firstFile File to scan as first image

*/
async startCombinedImageScan(firstFile, secondFile) {
this.mbComponentEl.startCombinedImageScan(firstFile, secondFile);
async startMultiSideImageScan(firstFile, secondFile) {
this.mbComponentEl.startMultiSideImageScan(firstFile, secondFile);
}

@@ -249,3 +243,3 @@ /**

h("mb-container", null,
h("mb-component", { dir: this.hostEl.getAttribute('dir'), ref: el => this.mbComponentEl = el, allowHelloMessage: this.allowHelloMessage, recognitionPauseTimeout: this.recognitionPauseTimeout, cameraExperienceStateDurations: this.cameraExperienceStateDurations, engineLocation: this.engineLocation, workerLocation: this.workerLocation, licenseKey: this.licenseKey, wasmType: this.wasmType, recognizers: this.finalRecognizers, recognizerOptions: this.recognizerOptions, recognitionTimeout: this.recognitionTimeout, includeSuccessFrame: this.includeSuccessFrame, enableDrag: this.enableDrag, hideLoadingAndErrorUi: this.hideLoadingAndErrorUi, scanFromCamera: this.scanFromCamera, scanFromImage: this.scanFromImage, thoroughScanFromImage: this.thoroughScanFromImage, galleryOverlayType: this.galleryOverlayType, galleryDropType: this.galleryDropType, showActionLabels: this.showActionLabels, showModalWindows: this.showModalWindows, showCameraFeedbackBarcodeMessage: this.showCameraFeedbackBarcodeMessage, iconCameraDefault: this.iconCameraDefault, iconCameraActive: this.iconCameraActive, iconGalleryDefault: this.iconGalleryDefault, iconGalleryActive: this.iconGalleryActive, iconInvalidFormat: this.iconInvalidFormat, iconSpinnerScreenLoading: this.iconSpinnerScreenLoading, iconSpinnerFromGalleryExperience: this.iconSpinnerFromGalleryExperience, iconGalleryScanningCompleted: this.iconGalleryScanningCompleted, sdkService: this.sdkService, translationService: this.translationService, cameraId: this.cameraId, onBlock: (ev) => { this.blocked = ev.detail; }, onFeedback: (ev) => this.feedbackEl.show(ev.detail) }),
h("mb-component", { dir: this.hostEl.getAttribute('dir'), ref: el => this.mbComponentEl = el, allowHelloMessage: this.allowHelloMessage, recognitionPauseTimeout: this.recognitionPauseTimeout, cameraExperienceStateDurations: this.cameraExperienceStateDurations, engineLocation: this.engineLocation, workerLocation: this.workerLocation, licenseKey: this.licenseKey, wasmType: this.wasmType, recognizers: this.finalRecognizers, recognizerOptions: this.recognizerOptions, recognitionTimeout: this.recognitionTimeout, enableDrag: this.enableDrag, hideLoadingAndErrorUi: this.hideLoadingAndErrorUi, scanFromCamera: this.scanFromCamera, scanFromImage: this.scanFromImage, thoroughScanFromImage: this.thoroughScanFromImage, galleryOverlayType: this.galleryOverlayType, galleryDropType: this.galleryDropType, showActionLabels: this.showActionLabels, showModalWindows: this.showModalWindows, showCameraFeedbackBarcodeMessage: this.showCameraFeedbackBarcodeMessage, iconCameraDefault: this.iconCameraDefault, iconCameraActive: this.iconCameraActive, iconGalleryDefault: this.iconGalleryDefault, iconGalleryActive: this.iconGalleryActive, iconInvalidFormat: this.iconInvalidFormat, iconSpinnerScreenLoading: this.iconSpinnerScreenLoading, iconSpinnerFromGalleryExperience: this.iconSpinnerFromGalleryExperience, iconGalleryScanningCompleted: this.iconGalleryScanningCompleted, sdkService: this.sdkService, translationService: this.translationService, cameraId: this.cameraId, onBlock: (ev) => { this.blocked = ev.detail; }, onFeedback: (ev) => this.feedbackEl.show(ev.detail) }),
h("mb-feedback", { dir: this.hostEl.getAttribute('dir'), visible: !this.hideFeedback, ref: el => this.feedbackEl = el }))));

@@ -363,3 +357,3 @@ }

"tags": [],
"text": "List of recognizers which should be used.\n\nAvailable recognizers for BlinkID:\n\n- IdBarcodeRecognizer\n- BlinkIdRecognizer\n- BlinkIdCombinedRecognizer\n - cannot be used in combination with other recognizers\n - when defined, scan from image is not available\n\nRecognizers can be defined by setting HTML attribute \"recognizers\", for example:\n\n`<blinkid-in-browser recognizers=\"IdBarcodeRecognizer,BlinkIdRecognizer\"></blinkid-in-browser>`"
"text": "List of recognizers which should be used.\n\nAvailable recognizers for BlinkID:\n\n- IdBarcodeRecognizer\n- BlinkIdSingleSideRecognizer\n- BlinkIdMultiSideRecognizer\n - cannot be used in combination with other recognizers\n - when defined, scan from image is not available\n\nRecognizers can be defined by setting HTML attribute \"recognizers\", for example:\n\n`<blinkid-in-browser recognizers=\"IdBarcodeRecognizer,BlinkIdSingleSideRecognizer\"></blinkid-in-browser>`"
},

@@ -385,3 +379,3 @@ "attribute": "recognizers",

"tags": [],
"text": "List of recognizers which should be used.\n\nAvailable recognizers for BlinkID:\n\n- IdBarcodeRecognizer\n- BlinkIdRecognizer\n- BlinkIdCombinedRecognizer\n - cannot be used in combination with other recognizers\n - when defined, scan from image is not available\n\nRecognizers can be defined by setting JS property \"recognizers\", for example:\n\n```\nconst blinkId = document.querySelector('blinkid-in-browser');\nblinkId.recognizers = ['IdBarcodeRecognizer', 'BlinkIdRecognizer'];\n```"
"text": "List of recognizers which should be used.\n\nAvailable recognizers for BlinkID:\n\n- IdBarcodeRecognizer\n- BlinkIdSingleSideRecognizer\n- BlinkIdMultiSideRecognizer\n - cannot be used in combination with other recognizers\n - when defined, scan from image is not available\n\nRecognizers can be defined by setting JS property \"recognizers\", for example:\n\n```\nconst blinkId = document.querySelector('blinkid-in-browser');\nblinkId.recognizers = ['IdBarcodeRecognizer', 'BlinkIdSingleSideRecognizer'];\n```"
}

@@ -401,3 +395,3 @@ },

"tags": [],
"text": "Specify recognizer options. This option can only bet set as a JavaScript property.\n\nPass an object to `recognizerOptions` property where each key represents a recognizer, while\nthe value represents desired recognizer options.\n\n```\nblinkId.recognizerOptions = {\n 'BlinkIdRecognizer': {\n 'returnFullDocumentImage': true,\n\n // When setting values for enums, check the source code to see possible values.\n // For AnonymizationMode we can see the list of possible values in\n // `src/Recognizers/BlinkID/Generic/AnonymizationMode.ts` file.\n 'anonymizationMode': 0\n }\n}\n```\n\nFor a full list of available recognizer options see source code of a recognizer. For example,\nlist of available recognizer options for BlinkIdRecognizer can be seen in the\n`src/Recognizers/BlinkID/Generic/BlinkIdRecognizer.ts` file."
"text": "Specify recognizer options. This option can only bet set as a JavaScript property.\n\nPass an object to `recognizerOptions` property where each key represents a recognizer, while\nthe value represents desired recognizer options.\n\n```\nblinkId.recognizerOptions = {\n 'BlinkIdSingleSideRecognizer': {\n 'returnFullDocumentImage': true,\n\n // When setting values for enums, check the source code to see possible values.\n // For AnonymizationMode we can see the list of possible values in\n // `src/Recognizers/BlinkID/Generic/AnonymizationMode.ts` file.\n 'anonymizationMode': 0\n }\n}\n```\n\nFor a full list of available recognizer options see source code of a recognizer. For example,\nlist of available recognizer options for BlinkIdSingleSideRecognizer can be seen in the\n`src/Recognizers/BlinkID/Generic/BlinkIdSingleSideRecognizer.ts` file."
}

@@ -461,20 +455,2 @@ },

},
"includeSuccessFrame": {
"type": "boolean",
"mutable": false,
"complexType": {
"original": "boolean",
"resolved": "boolean",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": "Set to 'true' if success frame should be included in final scanning results.\n\nDefault value is 'false'."
},
"attribute": "include-success-frame",
"reflect": false,
"defaultValue": "false"
},
"enableDrag": {

@@ -1075,3 +1051,3 @@ "type": "boolean",

},
"startCombinedImageScan": {
"startMultiSideImageScan": {
"complexType": {

@@ -1103,3 +1079,3 @@ "signature": "(firstFile: File, secondFile: File) => Promise<void>",

"docs": {
"text": "Starts combined image scan, emits results from provided files.",
"text": "Starts multi-side image scan, emits results from provided files.",
"tags": [{

@@ -1106,0 +1082,0 @@ "name": "param",

@@ -45,3 +45,3 @@ /**

apiStateHandler(apiState, _oldValue) {
if (apiState === '' && (this.type === CameraExperience.CardSingleSide || this.type === CameraExperience.CardCombined))
if (apiState === '' && (this.type === CameraExperience.CardSingleSide || this.type === CameraExperience.CardMultiSide))
this.cardIdentityElement.classList.add('visible');

@@ -90,3 +90,3 @@ else

case CameraExperience.CardSingleSide:
case CameraExperience.CardCombined:
case CameraExperience.CardMultiSide:
this.cameraCursorIdentityCardClassName = `reticle ${stateClass}`;

@@ -157,3 +157,3 @@ break;

case CameraExperience.CardSingleSide:
case CameraExperience.CardCombined:
case CameraExperience.CardMultiSide:
while (this.cameraMessageIdentityCard.firstChild) {

@@ -259,3 +259,3 @@ this.cameraMessageIdentityCard.removeChild(this.cameraMessageIdentityCard.firstChild);

h("p", { class: "message", ref: el => this.cameraMessageBarcode = el }))),
h("div", { id: "card-identity", ref: (el) => this.cardIdentityElement = el, class: classNames({ visible: this.type === CameraExperience.CardSingleSide || this.type === CameraExperience.CardCombined }) },
h("div", { id: "card-identity", ref: (el) => this.cardIdentityElement = el, class: classNames({ visible: this.type === CameraExperience.CardSingleSide || this.type === CameraExperience.CardMultiSide }) },
h("div", { class: "reticle-container" },

@@ -302,3 +302,3 @@ h("div", { class: this.cameraCursorIdentityCardClassName },

"original": "CameraExperience",
"resolved": "CameraExperience.Barcode | CameraExperience.CardCombined | CameraExperience.CardSingleSide | CameraExperience.PaymentCard",
"resolved": "CameraExperience.Barcode | CameraExperience.CardMultiSide | CameraExperience.CardSingleSide | CameraExperience.PaymentCard",
"references": {

@@ -305,0 +305,0 @@ "CameraExperience": {

@@ -25,8 +25,5 @@ /**

export class EventScanSuccess {
constructor(recognizer, recognizerName, successFrame) {
constructor(recognizer, recognizerName) {
this.recognizer = recognizer;
this.recognizerName = recognizerName;
if (successFrame) {
this.successFrame = successFrame;
}
}

@@ -54,15 +51,15 @@ }

IdBarcodeRecognizer: 'createIdBarcodeRecognizer',
BlinkIdRecognizer: 'createBlinkIdRecognizer',
BlinkIdCombinedRecognizer: 'createBlinkIdCombinedRecognizer',
BlinkIdSingleSideRecognizer: 'createBlinkIdSingleSideRecognizer',
BlinkIdMultiSideRecognizer: 'createBlinkIdMultiSideRecognizer',
};
export var ImageRecognitionType;
(function (ImageRecognitionType) {
ImageRecognitionType["Single"] = "Single";
ImageRecognitionType["Combined"] = "Combined";
ImageRecognitionType["SingleSide"] = "SingleSide";
ImageRecognitionType["MultiSide"] = "MultiSide";
})(ImageRecognitionType || (ImageRecognitionType = {}));
export var CombinedImageType;
(function (CombinedImageType) {
CombinedImageType["First"] = "First";
CombinedImageType["Second"] = "Second";
})(CombinedImageType || (CombinedImageType = {}));
export var MultiSideImageType;
(function (MultiSideImageType) {
MultiSideImageType["First"] = "First";
MultiSideImageType["Second"] = "Second";
})(MultiSideImageType || (MultiSideImageType = {}));
export var RecognitionStatus;

@@ -105,3 +102,3 @@ (function (RecognitionStatus) {

CameraExperience["Barcode"] = "BARCODE";
CameraExperience["CardCombined"] = "CARD_COMBINED";
CameraExperience["CardMultiSide"] = "CARD_MULTI_SIDE";
CameraExperience["CardSingleSide"] = "CARD_SINGLE_SIDE";

@@ -108,0 +105,0 @@ CameraExperience["PaymentCard"] = "PAYMENT_CARD";

@@ -39,4 +39,3 @@ /**

export function isDesktop() {
const viewportWidth = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0);
return viewportWidth >= 1024;
return !(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
}

@@ -63,6 +63,6 @@ /**

}
if (recognizer === 'BlinkIdCombinedRecognizer' && recognizers.length > 1) {
if (recognizer === 'BlinkIdMultiSideRecognizer' && recognizers.length > 1) {
return {
status: false,
message: 'Recognizer "BlinkIdCombinedRecognizer" cannot be used in combination with other recognizers!'
message: 'Recognizer "BlinkIdMultiSideRecognizer" cannot be used in combination with other recognizers!'
};

@@ -76,6 +76,6 @@ }

getDesiredCameraExperience(_recognizers = [], _recognizerOptions = {}) {
if (_recognizers.indexOf('BlinkIdCombinedRecognizer') > -1) {
return CameraExperience.CardCombined;
if (_recognizers.indexOf('BlinkIdMultiSideRecognizer') > -1) {
return CameraExperience.CardMultiSide;
}
if (_recognizers.indexOf('BlinkIdRecognizer') > -1) {
if (_recognizers.indexOf('BlinkIdSingleSideRecognizer') > -1) {
return CameraExperience.CardSingleSide;

@@ -91,3 +91,3 @@ }

this.eventEmitter$.addEventListener('terminate', async () => {
var _a, _b, _c, _d, _e, _f, _g, _h;
var _a, _b, _c, _d, _e;
(_b = (_a = this.videoRecognizer) === null || _a === void 0 ? void 0 : _a.cancelRecognition) === null || _b === void 0 ? void 0 : _b.call(_a);

@@ -110,9 +110,6 @@ window.setTimeout(() => { var _a, _b; return (_b = (_a = this.videoRecognizer) === null || _a === void 0 ? void 0 : _a.releaseVideoFeed) === null || _b === void 0 ? void 0 : _b.call(_a); }, 1);

}
if (((_f = recognizer.successFrame) === null || _f === void 0 ? void 0 : _f.objectHandle) > -1) {
(_h = (_g = recognizer.successFrame).delete) === null || _h === void 0 ? void 0 : _h.call(_g);
}
}
});
// Prepare recognizers and runner
const recognizers = await this.createRecognizers(configuration.recognizers, configuration.recognizerOptions, configuration.successFrame);
const recognizers = await this.createRecognizers(configuration.recognizers, configuration.recognizerOptions);
const recognizerRunner = await this.createRecognizerRunner(recognizers, eventCallback);

@@ -145,8 +142,2 @@ try {

};
if (recognizer.successFrame) {
const successFrameResults = await recognizer.successFrame.getResult();
if (successFrameResults && successFrameResults.state !== BlinkIDSDK.RecognizerResultState.Empty) {
recognitionResults.successFrame = successFrameResults;
}
}
recognitionResults.imageCapture = _IS_IMAGE_CAPTURE;

@@ -221,3 +212,3 @@ if ((_a = configuration.recognizerOptions) === null || _a === void 0 ? void 0 : _a.returnSignedJSON) {

isScanFromImageAvailable(_recognizers = [], _recognizerOptions = {}) {
if (_recognizers.indexOf('BlinkIdCombinedRecognizer') > -1) {
if (_recognizers.indexOf('BlinkIdMultiSideRecognizer') > -1) {
return false;

@@ -228,6 +219,6 @@ }

getScanFromImageType(_recognizers = [], _recognizerOptions = {}) {
if (_recognizers.indexOf('BlinkIdCombinedRecognizer') > -1) {
return ImageRecognitionType.Combined;
if (_recognizers.indexOf('BlinkIdMultiSideRecognizer') > -1) {
return ImageRecognitionType.MultiSide;
}
return ImageRecognitionType.Single;
return ImageRecognitionType.SingleSide;
}

@@ -307,3 +298,3 @@ async scanFromImage(configuration, eventCallback) {

if (configuration.thoroughScan &&
configuration.recognizers.indexOf('BlinkIdRecognizer') > -1) {
configuration.recognizers.indexOf('BlinkIdSingleSideRecognizer') > -1) {
const c = configuration;

@@ -336,3 +327,3 @@ c.thoroughScan = false;

}
async scanFromImageCombined(configuration, eventCallback) {
async scanFromImageMultiSide(configuration, eventCallback) {
var _a;

@@ -429,3 +420,3 @@ eventCallback({ status: RecognitionStatus.Preparing });

if (configuration.thoroughScan &&
configuration.recognizers.indexOf('BlinkIdCombinedRecognizer') > -1) {
configuration.recognizers.indexOf('BlinkIdMultiSideRecognizer') > -1) {
const c = configuration;

@@ -442,3 +433,3 @@ c.thoroughScan = false;

this.eventEmitter$.removeEventListener('terminate:done', handleTerminateDone);
this.scanFromImageCombined(configuration, eventHandler);
this.scanFromImageMultiSide(configuration, eventHandler);
};

@@ -481,3 +472,3 @@ this.eventEmitter$.addEventListener('terminate:done', handleTerminateDone);

}
async createRecognizers(recognizers, recognizerOptions, successFrame = false) {
async createRecognizers(recognizers, recognizerOptions) {
const pureRecognizers = [];

@@ -511,6 +502,2 @@ for (const recognizer of recognizers) {

const instance = { name: recognizers[i], recognizer };
if (successFrame) {
const successFrameGrabber = await BlinkIDSDK.createSuccessFrameGrabberRecognizer(this.sdk, recognizer);
instance.successFrame = successFrameGrabber;
}
recognizerInstances.push(instance);

@@ -556,8 +543,8 @@ }

};
const blinkIdGeneric = recognizers.find(el => el.recognizer.recognizerName === 'BlinkIdRecognizer');
const blinkIdCombined = recognizers.find(el => el.recognizer.recognizerName === 'BlinkIdCombinedRecognizer');
if (blinkIdGeneric || blinkIdCombined) {
const blinkIdSingleSide = recognizers.find(el => el.recognizer.recognizerName === 'BlinkIdSingleSideRecognizer');
const blinkIdMultiSide = recognizers.find(el => el.recognizer.recognizerName === 'BlinkIdMultiSideRecognizer');
if (blinkIdSingleSide || blinkIdMultiSide) {
for (const el of recognizers) {
if (el.recognizer.recognizerName === 'BlinkIdRecognizer' ||
el.recognizer.recognizerName === 'BlinkIdCombinedRecognizer') {
if (el.recognizer.recognizerName === 'BlinkIdSingleSideRecognizer' ||
el.recognizer.recognizerName === 'BlinkIdMultiSideRecognizer') {
const settings = await el.recognizer.currentSettings();

@@ -572,6 +559,6 @@ settings.barcodeScanningStartedCallback = () => eventCallback({ status: RecognitionStatus.BarcodeScanningStarted });

}
if (blinkIdCombined) {
if (blinkIdMultiSide) {
metadataCallbacks.onFirstSideResult = () => eventCallback({ status: RecognitionStatus.OnFirstSideResult });
}
const recognizerRunner = await BlinkIDSDK.createRecognizerRunner(this.sdk, recognizers.map((el) => el.successFrame || el.recognizer), false, metadataCallbacks);
const recognizerRunner = await BlinkIDSDK.createRecognizerRunner(this.sdk, recognizers.map((el) => el.recognizer), false, metadataCallbacks);
return recognizerRunner;

@@ -578,0 +565,0 @@ }

@@ -16,3 +16,3 @@ import { p as promiseResolve, b as bootstrapLazy } from './index-5647af98.js';

patchBrowser().then(options => {
return bootstrapLazy([["mb-tooltip",[[1,"mb-tooltip",{"show":[4],"message":[1],"arrowPosition":[1,"arrow-position"],"showWarningIcon":[4,"show-warning-icon"],"showInfoIcon":[4,"show-info-icon"],"textAlign":[1,"text-align"],"containerWidth":[1,"container-width"]}]]],["blinkid-in-browser_16",[[1,"blinkid-in-browser",{"allowHelloMessage":[4,"allow-hello-message"],"engineLocation":[1,"engine-location"],"workerLocation":[1,"worker-location"],"licenseKey":[1,"license-key"],"wasmType":[1,"wasm-type"],"rawRecognizers":[1,"recognizers"],"recognizers":[16],"recognizerOptions":[16],"recognitionTimeout":[2,"recognition-timeout"],"recognitionPauseTimeout":[2,"recognition-pause-timeout"],"cameraExperienceStateDurations":[16],"includeSuccessFrame":[4,"include-success-frame"],"enableDrag":[4,"enable-drag"],"hideFeedback":[4,"hide-feedback"],"hideLoadingAndErrorUi":[4,"hide-loading-and-error-ui"],"scanFromCamera":[4,"scan-from-camera"],"scanFromImage":[4,"scan-from-image"],"thoroughScanFromImage":[4,"thorough-scan-from-image"],"galleryOverlayType":[1,"gallery-overlay-type"],"galleryDropType":[1,"gallery-drop-type"],"showActionLabels":[4,"show-action-labels"],"showModalWindows":[4,"show-modal-windows"],"showCameraFeedbackBarcodeMessage":[4,"show-camera-feedback-barcode-message"],"rawTranslations":[1,"translations"],"translations":[16],"iconCameraDefault":[1,"icon-camera-default"],"iconCameraActive":[1,"icon-camera-active"],"iconGalleryDefault":[1,"icon-gallery-default"],"iconGalleryActive":[1,"icon-gallery-active"],"iconInvalidFormat":[1,"icon-invalid-format"],"iconSpinnerScreenLoading":[1,"icon-spinner-screen-loading"],"iconSpinnerFromGalleryExperience":[1,"icon-spinner-from-gallery-experience"],"iconGalleryScanningCompleted":[1,"icon-gallery-scanning-completed"],"cameraId":[1,"camera-id"],"setUiState":[64],"startCameraScan":[64],"startImageScan":[64],"startCombinedImageScan":[64],"setUiMessage":[64],"getProductIntegrationInfo":[64]}],[1,"mb-component",{"allowHelloMessage":[4,"allow-hello-message"],"engineLocation":[1,"engine-location"],"workerLocation":[1,"worker-location"],"licenseKey":[1,"license-key"],"wasmType":[1025,"wasm-type"],"recognizers":[1040],"recognizerOptions":[1040],"recognitionTimeout":[2,"recognition-timeout"],"recognitionPauseTimeout":[2,"recognition-pause-timeout"],"cameraExperienceStateDurations":[16],"includeSuccessFrame":[4,"include-success-frame"],"enableDrag":[4,"enable-drag"],"hideLoadingAndErrorUi":[4,"hide-loading-and-error-ui"],"rtl":[4],"scanFromCamera":[4,"scan-from-camera"],"scanFromImage":[4,"scan-from-image"],"thoroughScanFromImage":[4,"thorough-scan-from-image"],"galleryOverlayType":[1,"gallery-overlay-type"],"galleryDropType":[1,"gallery-drop-type"],"showActionLabels":[4,"show-action-labels"],"showModalWindows":[4,"show-modal-windows"],"showCameraFeedbackBarcodeMessage":[4,"show-camera-feedback-barcode-message"],"showScanningLine":[4,"show-scanning-line"],"iconCameraDefault":[1,"icon-camera-default"],"iconCameraActive":[1,"icon-camera-active"],"iconGalleryDefault":[1,"icon-gallery-default"],"iconDragAndDropGalleryDefault":[1,"icon-drag-and-drop-gallery-default"],"iconDragAndDropWarningDefault":[1,"icon-drag-and-drop-warning-default"],"iconGalleryActive":[1,"icon-gallery-active"],"iconInvalidFormat":[1,"icon-invalid-format"],"iconSpinnerScreenLoading":[1,"icon-spinner-screen-loading"],"iconSpinnerFromGalleryExperience":[1,"icon-spinner-from-gallery-experience"],"iconGalleryScanningCompleted":[1,"icon-gallery-scanning-completed"],"sdkService":[16],"translationService":[16],"cameraId":[1,"camera-id"],"galleryExperienceModalErrorWindowVisible":[32],"clearIsCameraActive":[32],"apiProcessStatusVisible":[32],"apiProcessStatusState":[32],"startCameraScan":[64],"startImageScan":[64],"startCombinedImageScan":[64],"setUiState":[64]},[[8,"keyup","handleKeyUp"]]],[1,"mb-container"],[1,"mb-feedback",{"visible":[4],"paragraphClassName":[32],"paragraphValue":[32],"show":[64]}],[1,"mb-camera-experience",{"type":[1],"cameraExperienceStateDurations":[16],"showOverlay":[4,"show-overlay"],"translationService":[16],"apiState":[1,"api-state"],"cameraFlipped":[1028,"camera-flipped"],"showScanningLine":[4,"show-scanning-line"],"showCameraFeedbackBarcodeMessage":[4,"show-camera-feedback-barcode-message"],"clearIsCameraActive":[4,"clear-is-camera-active"],"cameraCursorBarcodeClassName":[32],"cameraCursorIdentityCardClassName":[32],"cameraCursorPaymentCardClassName":[32],"scanningLineBarcodeClassName":[32],"scanningLinePaymentCardClassName":[32],"cameraMessageIdentityCardContent":[32],"cameraMessageIdentityCardClassName":[32],"setActiveCamera":[64],"populateCameraDevices":[64],"setCameraFlipState":[64],"setState":[64],"resetState":[64]}],[1,"mb-api-process-status",{"visible":[4],"state":[1],"translationService":[16]}],[1,"mb-button",{"clickHandler":[16],"disabled":[4],"visible":[4],"selected":[4],"imageSrcDefault":[1,"image-src-default"],"imageSrcActive":[1,"image-src-active"],"imageAlt":[1,"image-alt"],"label":[1],"buttonTitle":[1,"button-title"]}],[1,"mb-button-classic",{"inverted":[4],"disabled":[4],"preventDefault":[4,"prevent-default"],"clickHandler":[16]}],[1,"mb-completed",{"icon":[1]}],[1,"mb-image-box",{"boxTitle":[1,"box-title"],"anchorText":[1,"anchor-text"],"clear":[64]}],[1,"mb-overlay",{"fullscreen":[4],"visible":[4]}],[1,"mb-screen",{"visible":[4]}],[1,"mb-spinner",{"icon":[1],"size":[1]}],[1,"mb-camera-toolbar",{"showClose":[4,"show-close"],"clearIsCameraActive":[4,"clear-is-camera-active"],"enableCameraFlip":[4,"enable-camera-flip"],"cameraFlipped":[4,"camera-flipped"],"showCloseButton":[32],"isDesktop":[32],"setActiveCamera":[64],"populateCameraDevices":[64]},[[2,"setIsCameraActive","handleSetIsCameraActive"]]],[1,"mb-modal",{"visible":[4],"elevated":[4],"centered":[4],"modalTitle":[1,"modal-title"],"content":[1],"contentCentered":[4,"content-centered"],"showBackButton":[4,"show-back-button"],"hideFooter":[4,"hide-footer"]}],[1,"mb-camera-selection",{"clearIsCameraActive":[4,"clear-is-camera-active"],"activeCamera":[32],"cameraList":[32],"isListVisible":[32],"setActiveCamera":[64],"populateCameraDevices":[64]}]]]], options);
return bootstrapLazy([["mb-tooltip",[[1,"mb-tooltip",{"show":[4],"message":[1],"arrowPosition":[1,"arrow-position"],"showWarningIcon":[4,"show-warning-icon"],"showInfoIcon":[4,"show-info-icon"],"textAlign":[1,"text-align"],"containerWidth":[1,"container-width"]}]]],["blinkid-in-browser_16",[[1,"blinkid-in-browser",{"allowHelloMessage":[4,"allow-hello-message"],"engineLocation":[1,"engine-location"],"workerLocation":[1,"worker-location"],"licenseKey":[1,"license-key"],"wasmType":[1,"wasm-type"],"rawRecognizers":[1,"recognizers"],"recognizers":[16],"recognizerOptions":[16],"recognitionTimeout":[2,"recognition-timeout"],"recognitionPauseTimeout":[2,"recognition-pause-timeout"],"cameraExperienceStateDurations":[16],"enableDrag":[4,"enable-drag"],"hideFeedback":[4,"hide-feedback"],"hideLoadingAndErrorUi":[4,"hide-loading-and-error-ui"],"scanFromCamera":[4,"scan-from-camera"],"scanFromImage":[4,"scan-from-image"],"thoroughScanFromImage":[4,"thorough-scan-from-image"],"galleryOverlayType":[1,"gallery-overlay-type"],"galleryDropType":[1,"gallery-drop-type"],"showActionLabels":[4,"show-action-labels"],"showModalWindows":[4,"show-modal-windows"],"showCameraFeedbackBarcodeMessage":[4,"show-camera-feedback-barcode-message"],"rawTranslations":[1,"translations"],"translations":[16],"iconCameraDefault":[1,"icon-camera-default"],"iconCameraActive":[1,"icon-camera-active"],"iconGalleryDefault":[1,"icon-gallery-default"],"iconGalleryActive":[1,"icon-gallery-active"],"iconInvalidFormat":[1,"icon-invalid-format"],"iconSpinnerScreenLoading":[1,"icon-spinner-screen-loading"],"iconSpinnerFromGalleryExperience":[1,"icon-spinner-from-gallery-experience"],"iconGalleryScanningCompleted":[1,"icon-gallery-scanning-completed"],"cameraId":[1,"camera-id"],"setUiState":[64],"startCameraScan":[64],"startImageScan":[64],"startMultiSideImageScan":[64],"setUiMessage":[64],"getProductIntegrationInfo":[64]}],[1,"mb-component",{"allowHelloMessage":[4,"allow-hello-message"],"engineLocation":[1,"engine-location"],"workerLocation":[1,"worker-location"],"licenseKey":[1,"license-key"],"wasmType":[1025,"wasm-type"],"recognizers":[1040],"recognizerOptions":[1040],"recognitionTimeout":[2,"recognition-timeout"],"recognitionPauseTimeout":[2,"recognition-pause-timeout"],"cameraExperienceStateDurations":[16],"includeSuccessFrame":[4,"include-success-frame"],"enableDrag":[4,"enable-drag"],"hideLoadingAndErrorUi":[4,"hide-loading-and-error-ui"],"rtl":[4],"scanFromCamera":[4,"scan-from-camera"],"scanFromImage":[4,"scan-from-image"],"thoroughScanFromImage":[4,"thorough-scan-from-image"],"galleryOverlayType":[1,"gallery-overlay-type"],"galleryDropType":[1,"gallery-drop-type"],"showActionLabels":[4,"show-action-labels"],"showModalWindows":[4,"show-modal-windows"],"showCameraFeedbackBarcodeMessage":[4,"show-camera-feedback-barcode-message"],"showScanningLine":[4,"show-scanning-line"],"iconCameraDefault":[1,"icon-camera-default"],"iconCameraActive":[1,"icon-camera-active"],"iconGalleryDefault":[1,"icon-gallery-default"],"iconDragAndDropGalleryDefault":[1,"icon-drag-and-drop-gallery-default"],"iconDragAndDropWarningDefault":[1,"icon-drag-and-drop-warning-default"],"iconGalleryActive":[1,"icon-gallery-active"],"iconInvalidFormat":[1,"icon-invalid-format"],"iconSpinnerScreenLoading":[1,"icon-spinner-screen-loading"],"iconSpinnerFromGalleryExperience":[1,"icon-spinner-from-gallery-experience"],"iconGalleryScanningCompleted":[1,"icon-gallery-scanning-completed"],"sdkService":[16],"translationService":[16],"cameraId":[1,"camera-id"],"galleryExperienceModalErrorWindowVisible":[32],"clearIsCameraActive":[32],"apiProcessStatusVisible":[32],"apiProcessStatusState":[32],"startCameraScan":[64],"startImageScan":[64],"startMultiSideImageScan":[64],"setUiState":[64]},[[8,"keyup","handleKeyUp"]]],[1,"mb-container"],[1,"mb-feedback",{"visible":[4],"paragraphClassName":[32],"paragraphValue":[32],"show":[64]}],[1,"mb-camera-experience",{"type":[1],"cameraExperienceStateDurations":[16],"showOverlay":[4,"show-overlay"],"translationService":[16],"apiState":[1,"api-state"],"cameraFlipped":[1028,"camera-flipped"],"showScanningLine":[4,"show-scanning-line"],"showCameraFeedbackBarcodeMessage":[4,"show-camera-feedback-barcode-message"],"clearIsCameraActive":[4,"clear-is-camera-active"],"cameraCursorBarcodeClassName":[32],"cameraCursorIdentityCardClassName":[32],"cameraCursorPaymentCardClassName":[32],"scanningLineBarcodeClassName":[32],"scanningLinePaymentCardClassName":[32],"cameraMessageIdentityCardContent":[32],"cameraMessageIdentityCardClassName":[32],"setActiveCamera":[64],"populateCameraDevices":[64],"setCameraFlipState":[64],"setState":[64],"resetState":[64]}],[1,"mb-api-process-status",{"visible":[4],"state":[1],"translationService":[16]}],[1,"mb-button",{"clickHandler":[16],"disabled":[4],"visible":[4],"selected":[4],"imageSrcDefault":[1,"image-src-default"],"imageSrcActive":[1,"image-src-active"],"imageAlt":[1,"image-alt"],"label":[1],"buttonTitle":[1,"button-title"]}],[1,"mb-button-classic",{"inverted":[4],"disabled":[4],"preventDefault":[4,"prevent-default"],"clickHandler":[16]}],[1,"mb-completed",{"icon":[1]}],[1,"mb-image-box",{"boxTitle":[1,"box-title"],"anchorText":[1,"anchor-text"],"clear":[64]}],[1,"mb-overlay",{"fullscreen":[4],"visible":[4]}],[1,"mb-screen",{"visible":[4]}],[1,"mb-spinner",{"icon":[1],"size":[1]}],[1,"mb-camera-toolbar",{"showClose":[4,"show-close"],"clearIsCameraActive":[4,"clear-is-camera-active"],"enableCameraFlip":[4,"enable-camera-flip"],"cameraFlipped":[4,"camera-flipped"],"showCloseButton":[32],"isDesktop":[32],"setActiveCamera":[64],"populateCameraDevices":[64]},[[2,"setIsCameraActive","handleSetIsCameraActive"]]],[1,"mb-modal",{"visible":[4],"elevated":[4],"centered":[4],"modalTitle":[1,"modal-title"],"content":[1],"contentCentered":[4,"content-centered"],"showBackButton":[4,"show-back-button"],"hideFooter":[4,"hide-footer"]}],[1,"mb-camera-selection",{"clearIsCameraActive":[4,"clear-is-camera-active"],"activeCamera":[32],"cameraList":[32],"isListVisible":[32],"setActiveCamera":[64],"populateCameraDevices":[64]}]]]], options);
});

@@ -13,3 +13,3 @@ import { p as promiseResolve, b as bootstrapLazy } from './index-5647af98.js';

return patchEsm().then(() => {
return bootstrapLazy([["mb-tooltip",[[1,"mb-tooltip",{"show":[4],"message":[1],"arrowPosition":[1,"arrow-position"],"showWarningIcon":[4,"show-warning-icon"],"showInfoIcon":[4,"show-info-icon"],"textAlign":[1,"text-align"],"containerWidth":[1,"container-width"]}]]],["blinkid-in-browser_16",[[1,"blinkid-in-browser",{"allowHelloMessage":[4,"allow-hello-message"],"engineLocation":[1,"engine-location"],"workerLocation":[1,"worker-location"],"licenseKey":[1,"license-key"],"wasmType":[1,"wasm-type"],"rawRecognizers":[1,"recognizers"],"recognizers":[16],"recognizerOptions":[16],"recognitionTimeout":[2,"recognition-timeout"],"recognitionPauseTimeout":[2,"recognition-pause-timeout"],"cameraExperienceStateDurations":[16],"includeSuccessFrame":[4,"include-success-frame"],"enableDrag":[4,"enable-drag"],"hideFeedback":[4,"hide-feedback"],"hideLoadingAndErrorUi":[4,"hide-loading-and-error-ui"],"scanFromCamera":[4,"scan-from-camera"],"scanFromImage":[4,"scan-from-image"],"thoroughScanFromImage":[4,"thorough-scan-from-image"],"galleryOverlayType":[1,"gallery-overlay-type"],"galleryDropType":[1,"gallery-drop-type"],"showActionLabels":[4,"show-action-labels"],"showModalWindows":[4,"show-modal-windows"],"showCameraFeedbackBarcodeMessage":[4,"show-camera-feedback-barcode-message"],"rawTranslations":[1,"translations"],"translations":[16],"iconCameraDefault":[1,"icon-camera-default"],"iconCameraActive":[1,"icon-camera-active"],"iconGalleryDefault":[1,"icon-gallery-default"],"iconGalleryActive":[1,"icon-gallery-active"],"iconInvalidFormat":[1,"icon-invalid-format"],"iconSpinnerScreenLoading":[1,"icon-spinner-screen-loading"],"iconSpinnerFromGalleryExperience":[1,"icon-spinner-from-gallery-experience"],"iconGalleryScanningCompleted":[1,"icon-gallery-scanning-completed"],"cameraId":[1,"camera-id"],"setUiState":[64],"startCameraScan":[64],"startImageScan":[64],"startCombinedImageScan":[64],"setUiMessage":[64],"getProductIntegrationInfo":[64]}],[1,"mb-component",{"allowHelloMessage":[4,"allow-hello-message"],"engineLocation":[1,"engine-location"],"workerLocation":[1,"worker-location"],"licenseKey":[1,"license-key"],"wasmType":[1025,"wasm-type"],"recognizers":[1040],"recognizerOptions":[1040],"recognitionTimeout":[2,"recognition-timeout"],"recognitionPauseTimeout":[2,"recognition-pause-timeout"],"cameraExperienceStateDurations":[16],"includeSuccessFrame":[4,"include-success-frame"],"enableDrag":[4,"enable-drag"],"hideLoadingAndErrorUi":[4,"hide-loading-and-error-ui"],"rtl":[4],"scanFromCamera":[4,"scan-from-camera"],"scanFromImage":[4,"scan-from-image"],"thoroughScanFromImage":[4,"thorough-scan-from-image"],"galleryOverlayType":[1,"gallery-overlay-type"],"galleryDropType":[1,"gallery-drop-type"],"showActionLabels":[4,"show-action-labels"],"showModalWindows":[4,"show-modal-windows"],"showCameraFeedbackBarcodeMessage":[4,"show-camera-feedback-barcode-message"],"showScanningLine":[4,"show-scanning-line"],"iconCameraDefault":[1,"icon-camera-default"],"iconCameraActive":[1,"icon-camera-active"],"iconGalleryDefault":[1,"icon-gallery-default"],"iconDragAndDropGalleryDefault":[1,"icon-drag-and-drop-gallery-default"],"iconDragAndDropWarningDefault":[1,"icon-drag-and-drop-warning-default"],"iconGalleryActive":[1,"icon-gallery-active"],"iconInvalidFormat":[1,"icon-invalid-format"],"iconSpinnerScreenLoading":[1,"icon-spinner-screen-loading"],"iconSpinnerFromGalleryExperience":[1,"icon-spinner-from-gallery-experience"],"iconGalleryScanningCompleted":[1,"icon-gallery-scanning-completed"],"sdkService":[16],"translationService":[16],"cameraId":[1,"camera-id"],"galleryExperienceModalErrorWindowVisible":[32],"clearIsCameraActive":[32],"apiProcessStatusVisible":[32],"apiProcessStatusState":[32],"startCameraScan":[64],"startImageScan":[64],"startCombinedImageScan":[64],"setUiState":[64]},[[8,"keyup","handleKeyUp"]]],[1,"mb-container"],[1,"mb-feedback",{"visible":[4],"paragraphClassName":[32],"paragraphValue":[32],"show":[64]}],[1,"mb-camera-experience",{"type":[1],"cameraExperienceStateDurations":[16],"showOverlay":[4,"show-overlay"],"translationService":[16],"apiState":[1,"api-state"],"cameraFlipped":[1028,"camera-flipped"],"showScanningLine":[4,"show-scanning-line"],"showCameraFeedbackBarcodeMessage":[4,"show-camera-feedback-barcode-message"],"clearIsCameraActive":[4,"clear-is-camera-active"],"cameraCursorBarcodeClassName":[32],"cameraCursorIdentityCardClassName":[32],"cameraCursorPaymentCardClassName":[32],"scanningLineBarcodeClassName":[32],"scanningLinePaymentCardClassName":[32],"cameraMessageIdentityCardContent":[32],"cameraMessageIdentityCardClassName":[32],"setActiveCamera":[64],"populateCameraDevices":[64],"setCameraFlipState":[64],"setState":[64],"resetState":[64]}],[1,"mb-api-process-status",{"visible":[4],"state":[1],"translationService":[16]}],[1,"mb-button",{"clickHandler":[16],"disabled":[4],"visible":[4],"selected":[4],"imageSrcDefault":[1,"image-src-default"],"imageSrcActive":[1,"image-src-active"],"imageAlt":[1,"image-alt"],"label":[1],"buttonTitle":[1,"button-title"]}],[1,"mb-button-classic",{"inverted":[4],"disabled":[4],"preventDefault":[4,"prevent-default"],"clickHandler":[16]}],[1,"mb-completed",{"icon":[1]}],[1,"mb-image-box",{"boxTitle":[1,"box-title"],"anchorText":[1,"anchor-text"],"clear":[64]}],[1,"mb-overlay",{"fullscreen":[4],"visible":[4]}],[1,"mb-screen",{"visible":[4]}],[1,"mb-spinner",{"icon":[1],"size":[1]}],[1,"mb-camera-toolbar",{"showClose":[4,"show-close"],"clearIsCameraActive":[4,"clear-is-camera-active"],"enableCameraFlip":[4,"enable-camera-flip"],"cameraFlipped":[4,"camera-flipped"],"showCloseButton":[32],"isDesktop":[32],"setActiveCamera":[64],"populateCameraDevices":[64]},[[2,"setIsCameraActive","handleSetIsCameraActive"]]],[1,"mb-modal",{"visible":[4],"elevated":[4],"centered":[4],"modalTitle":[1,"modal-title"],"content":[1],"contentCentered":[4,"content-centered"],"showBackButton":[4,"show-back-button"],"hideFooter":[4,"hide-footer"]}],[1,"mb-camera-selection",{"clearIsCameraActive":[4,"clear-is-camera-active"],"activeCamera":[32],"cameraList":[32],"isListVisible":[32],"setActiveCamera":[64],"populateCameraDevices":[64]}]]]], options);
return bootstrapLazy([["mb-tooltip",[[1,"mb-tooltip",{"show":[4],"message":[1],"arrowPosition":[1,"arrow-position"],"showWarningIcon":[4,"show-warning-icon"],"showInfoIcon":[4,"show-info-icon"],"textAlign":[1,"text-align"],"containerWidth":[1,"container-width"]}]]],["blinkid-in-browser_16",[[1,"blinkid-in-browser",{"allowHelloMessage":[4,"allow-hello-message"],"engineLocation":[1,"engine-location"],"workerLocation":[1,"worker-location"],"licenseKey":[1,"license-key"],"wasmType":[1,"wasm-type"],"rawRecognizers":[1,"recognizers"],"recognizers":[16],"recognizerOptions":[16],"recognitionTimeout":[2,"recognition-timeout"],"recognitionPauseTimeout":[2,"recognition-pause-timeout"],"cameraExperienceStateDurations":[16],"enableDrag":[4,"enable-drag"],"hideFeedback":[4,"hide-feedback"],"hideLoadingAndErrorUi":[4,"hide-loading-and-error-ui"],"scanFromCamera":[4,"scan-from-camera"],"scanFromImage":[4,"scan-from-image"],"thoroughScanFromImage":[4,"thorough-scan-from-image"],"galleryOverlayType":[1,"gallery-overlay-type"],"galleryDropType":[1,"gallery-drop-type"],"showActionLabels":[4,"show-action-labels"],"showModalWindows":[4,"show-modal-windows"],"showCameraFeedbackBarcodeMessage":[4,"show-camera-feedback-barcode-message"],"rawTranslations":[1,"translations"],"translations":[16],"iconCameraDefault":[1,"icon-camera-default"],"iconCameraActive":[1,"icon-camera-active"],"iconGalleryDefault":[1,"icon-gallery-default"],"iconGalleryActive":[1,"icon-gallery-active"],"iconInvalidFormat":[1,"icon-invalid-format"],"iconSpinnerScreenLoading":[1,"icon-spinner-screen-loading"],"iconSpinnerFromGalleryExperience":[1,"icon-spinner-from-gallery-experience"],"iconGalleryScanningCompleted":[1,"icon-gallery-scanning-completed"],"cameraId":[1,"camera-id"],"setUiState":[64],"startCameraScan":[64],"startImageScan":[64],"startMultiSideImageScan":[64],"setUiMessage":[64],"getProductIntegrationInfo":[64]}],[1,"mb-component",{"allowHelloMessage":[4,"allow-hello-message"],"engineLocation":[1,"engine-location"],"workerLocation":[1,"worker-location"],"licenseKey":[1,"license-key"],"wasmType":[1025,"wasm-type"],"recognizers":[1040],"recognizerOptions":[1040],"recognitionTimeout":[2,"recognition-timeout"],"recognitionPauseTimeout":[2,"recognition-pause-timeout"],"cameraExperienceStateDurations":[16],"includeSuccessFrame":[4,"include-success-frame"],"enableDrag":[4,"enable-drag"],"hideLoadingAndErrorUi":[4,"hide-loading-and-error-ui"],"rtl":[4],"scanFromCamera":[4,"scan-from-camera"],"scanFromImage":[4,"scan-from-image"],"thoroughScanFromImage":[4,"thorough-scan-from-image"],"galleryOverlayType":[1,"gallery-overlay-type"],"galleryDropType":[1,"gallery-drop-type"],"showActionLabels":[4,"show-action-labels"],"showModalWindows":[4,"show-modal-windows"],"showCameraFeedbackBarcodeMessage":[4,"show-camera-feedback-barcode-message"],"showScanningLine":[4,"show-scanning-line"],"iconCameraDefault":[1,"icon-camera-default"],"iconCameraActive":[1,"icon-camera-active"],"iconGalleryDefault":[1,"icon-gallery-default"],"iconDragAndDropGalleryDefault":[1,"icon-drag-and-drop-gallery-default"],"iconDragAndDropWarningDefault":[1,"icon-drag-and-drop-warning-default"],"iconGalleryActive":[1,"icon-gallery-active"],"iconInvalidFormat":[1,"icon-invalid-format"],"iconSpinnerScreenLoading":[1,"icon-spinner-screen-loading"],"iconSpinnerFromGalleryExperience":[1,"icon-spinner-from-gallery-experience"],"iconGalleryScanningCompleted":[1,"icon-gallery-scanning-completed"],"sdkService":[16],"translationService":[16],"cameraId":[1,"camera-id"],"galleryExperienceModalErrorWindowVisible":[32],"clearIsCameraActive":[32],"apiProcessStatusVisible":[32],"apiProcessStatusState":[32],"startCameraScan":[64],"startImageScan":[64],"startMultiSideImageScan":[64],"setUiState":[64]},[[8,"keyup","handleKeyUp"]]],[1,"mb-container"],[1,"mb-feedback",{"visible":[4],"paragraphClassName":[32],"paragraphValue":[32],"show":[64]}],[1,"mb-camera-experience",{"type":[1],"cameraExperienceStateDurations":[16],"showOverlay":[4,"show-overlay"],"translationService":[16],"apiState":[1,"api-state"],"cameraFlipped":[1028,"camera-flipped"],"showScanningLine":[4,"show-scanning-line"],"showCameraFeedbackBarcodeMessage":[4,"show-camera-feedback-barcode-message"],"clearIsCameraActive":[4,"clear-is-camera-active"],"cameraCursorBarcodeClassName":[32],"cameraCursorIdentityCardClassName":[32],"cameraCursorPaymentCardClassName":[32],"scanningLineBarcodeClassName":[32],"scanningLinePaymentCardClassName":[32],"cameraMessageIdentityCardContent":[32],"cameraMessageIdentityCardClassName":[32],"setActiveCamera":[64],"populateCameraDevices":[64],"setCameraFlipState":[64],"setState":[64],"resetState":[64]}],[1,"mb-api-process-status",{"visible":[4],"state":[1],"translationService":[16]}],[1,"mb-button",{"clickHandler":[16],"disabled":[4],"visible":[4],"selected":[4],"imageSrcDefault":[1,"image-src-default"],"imageSrcActive":[1,"image-src-active"],"imageAlt":[1,"image-alt"],"label":[1],"buttonTitle":[1,"button-title"]}],[1,"mb-button-classic",{"inverted":[4],"disabled":[4],"preventDefault":[4,"prevent-default"],"clickHandler":[16]}],[1,"mb-completed",{"icon":[1]}],[1,"mb-image-box",{"boxTitle":[1,"box-title"],"anchorText":[1,"anchor-text"],"clear":[64]}],[1,"mb-overlay",{"fullscreen":[4],"visible":[4]}],[1,"mb-screen",{"visible":[4]}],[1,"mb-spinner",{"icon":[1],"size":[1]}],[1,"mb-camera-toolbar",{"showClose":[4,"show-close"],"clearIsCameraActive":[4,"clear-is-camera-active"],"enableCameraFlip":[4,"enable-camera-flip"],"cameraFlipped":[4,"camera-flipped"],"showCloseButton":[32],"isDesktop":[32],"setActiveCamera":[64],"populateCameraDevices":[64]},[[2,"setIsCameraActive","handleSetIsCameraActive"]]],[1,"mb-modal",{"visible":[4],"elevated":[4],"centered":[4],"modalTitle":[1,"modal-title"],"content":[1],"contentCentered":[4,"content-centered"],"showBackButton":[4,"show-back-button"],"hideFooter":[4,"hide-footer"]}],[1,"mb-camera-selection",{"clearIsCameraActive":[4,"clear-is-camera-active"],"activeCamera":[32],"cameraList":[32],"isListVisible":[32],"setActiveCamera":[64],"populateCameraDevices":[64]}]]]], options);
});

@@ -16,0 +16,0 @@ };

@@ -86,6 +86,2 @@ /* eslint-disable */

/**
* Set to 'true' if success frame should be included in final scanning results. Default value is 'false'.
*/
"includeSuccessFrame": boolean;
/**
* License key which is going to be used to unlock WASM library. Keep in mind that UI component will reinitialize every time license key is changed.

@@ -95,3 +91,3 @@ */

/**
* List of recognizers which should be used. Available recognizers for BlinkID: - IdBarcodeRecognizer - BlinkIdRecognizer - BlinkIdCombinedRecognizer - cannot be used in combination with other recognizers - when defined, scan from image is not available Recognizers can be defined by setting HTML attribute "recognizers", for example: `<blinkid-in-browser recognizers="IdBarcodeRecognizer,BlinkIdRecognizer"></blinkid-in-browser>`
* List of recognizers which should be used. Available recognizers for BlinkID: - IdBarcodeRecognizer - BlinkIdSingleSideRecognizer - BlinkIdMultiSideRecognizer - cannot be used in combination with other recognizers - when defined, scan from image is not available Recognizers can be defined by setting HTML attribute "recognizers", for example: `<blinkid-in-browser recognizers="IdBarcodeRecognizer,BlinkIdSingleSideRecognizer"></blinkid-in-browser>`
*/

@@ -112,7 +108,7 @@ "rawRecognizers": string;

/**
* Specify recognizer options. This option can only bet set as a JavaScript property. Pass an object to `recognizerOptions` property where each key represents a recognizer, while the value represents desired recognizer options. ``` blinkId.recognizerOptions = { 'BlinkIdRecognizer': { 'returnFullDocumentImage': true, // When setting values for enums, check the source code to see possible values. // For AnonymizationMode we can see the list of possible values in // `src/Recognizers/BlinkID/Generic/AnonymizationMode.ts` file. 'anonymizationMode': 0 } } ``` For a full list of available recognizer options see source code of a recognizer. For example, list of available recognizer options for BlinkIdRecognizer can be seen in the `src/Recognizers/BlinkID/Generic/BlinkIdRecognizer.ts` file.
* Specify recognizer options. This option can only bet set as a JavaScript property. Pass an object to `recognizerOptions` property where each key represents a recognizer, while the value represents desired recognizer options. ``` blinkId.recognizerOptions = { 'BlinkIdSingleSideRecognizer': { 'returnFullDocumentImage': true, // When setting values for enums, check the source code to see possible values. // For AnonymizationMode we can see the list of possible values in // `src/Recognizers/BlinkID/Generic/AnonymizationMode.ts` file. 'anonymizationMode': 0 } } ``` For a full list of available recognizer options see source code of a recognizer. For example, list of available recognizer options for BlinkIdSingleSideRecognizer can be seen in the `src/Recognizers/BlinkID/Generic/BlinkIdSingleSideRecognizer.ts` file.
*/
"recognizerOptions": { [key: string]: any };
/**
* List of recognizers which should be used. Available recognizers for BlinkID: - IdBarcodeRecognizer - BlinkIdRecognizer - BlinkIdCombinedRecognizer - cannot be used in combination with other recognizers - when defined, scan from image is not available Recognizers can be defined by setting JS property "recognizers", for example: ``` const blinkId = document.querySelector('blinkid-in-browser'); blinkId.recognizers = ['IdBarcodeRecognizer', 'BlinkIdRecognizer']; ```
* List of recognizers which should be used. Available recognizers for BlinkID: - IdBarcodeRecognizer - BlinkIdSingleSideRecognizer - BlinkIdMultiSideRecognizer - cannot be used in combination with other recognizers - when defined, scan from image is not available Recognizers can be defined by setting JS property "recognizers", for example: ``` const blinkId = document.querySelector('blinkid-in-browser'); blinkId.recognizers = ['IdBarcodeRecognizer', 'BlinkIdSingleSideRecognizer']; ```
*/

@@ -153,8 +149,2 @@ "recognizers": Array<string>;

/**
* Starts combined image scan, emits results from provided files.
* @param firstFile File to scan as first image
* @param secondFile File to scan as second image
*/
"startCombinedImageScan": (firstFile: File, secondFile: File) => Promise<void>;
/**
* Starts image scan, emits results from provided file.

@@ -165,2 +155,8 @@ * @param file File to scan

/**
* Starts multi-side image scan, emits results from provided files.
* @param firstFile File to scan as first image
* @param secondFile File to scan as second image
*/
"startMultiSideImageScan": (firstFile: File, secondFile: File) => Promise<void>;
/**
* Set to 'true' if scan from image should execute twice in case that first result is empty. If enabled, this option will add/remove 'scanCroppedDocumentImage' recognizer option for the second scan action.

@@ -482,8 +478,2 @@ */

/**
* Starts combined image scan, emits results from provided files.
* @param firstFile File to scan as first image
* @param secondFile File to scan as second image
*/
"startCombinedImageScan": (firstFile: File, secondFile: File) => Promise<void>;
/**
* Starts image scan, emits results from provided file.

@@ -494,2 +484,8 @@ * @param file File to scan

/**
* Starts multi-side image scan, emits results from provided files.
* @param firstFile File to scan as first image
* @param secondFile File to scan as second image
*/
"startMultiSideImageScan": (firstFile: File, secondFile: File) => Promise<void>;
/**
* See description in public component.

@@ -801,6 +797,2 @@ */

/**
* Set to 'true' if success frame should be included in final scanning results. Default value is 'false'.
*/
"includeSuccessFrame"?: boolean;
/**
* License key which is going to be used to unlock WASM library. Keep in mind that UI component will reinitialize every time license key is changed.

@@ -842,3 +834,3 @@ */

/**
* List of recognizers which should be used. Available recognizers for BlinkID: - IdBarcodeRecognizer - BlinkIdRecognizer - BlinkIdCombinedRecognizer - cannot be used in combination with other recognizers - when defined, scan from image is not available Recognizers can be defined by setting HTML attribute "recognizers", for example: `<blinkid-in-browser recognizers="IdBarcodeRecognizer,BlinkIdRecognizer"></blinkid-in-browser>`
* List of recognizers which should be used. Available recognizers for BlinkID: - IdBarcodeRecognizer - BlinkIdSingleSideRecognizer - BlinkIdMultiSideRecognizer - cannot be used in combination with other recognizers - when defined, scan from image is not available Recognizers can be defined by setting HTML attribute "recognizers", for example: `<blinkid-in-browser recognizers="IdBarcodeRecognizer,BlinkIdSingleSideRecognizer"></blinkid-in-browser>`
*/

@@ -859,7 +851,7 @@ "rawRecognizers"?: string;

/**
* Specify recognizer options. This option can only bet set as a JavaScript property. Pass an object to `recognizerOptions` property where each key represents a recognizer, while the value represents desired recognizer options. ``` blinkId.recognizerOptions = { 'BlinkIdRecognizer': { 'returnFullDocumentImage': true, // When setting values for enums, check the source code to see possible values. // For AnonymizationMode we can see the list of possible values in // `src/Recognizers/BlinkID/Generic/AnonymizationMode.ts` file. 'anonymizationMode': 0 } } ``` For a full list of available recognizer options see source code of a recognizer. For example, list of available recognizer options for BlinkIdRecognizer can be seen in the `src/Recognizers/BlinkID/Generic/BlinkIdRecognizer.ts` file.
* Specify recognizer options. This option can only bet set as a JavaScript property. Pass an object to `recognizerOptions` property where each key represents a recognizer, while the value represents desired recognizer options. ``` blinkId.recognizerOptions = { 'BlinkIdSingleSideRecognizer': { 'returnFullDocumentImage': true, // When setting values for enums, check the source code to see possible values. // For AnonymizationMode we can see the list of possible values in // `src/Recognizers/BlinkID/Generic/AnonymizationMode.ts` file. 'anonymizationMode': 0 } } ``` For a full list of available recognizer options see source code of a recognizer. For example, list of available recognizer options for BlinkIdSingleSideRecognizer can be seen in the `src/Recognizers/BlinkID/Generic/BlinkIdSingleSideRecognizer.ts` file.
*/
"recognizerOptions"?: { [key: string]: any };
/**
* List of recognizers which should be used. Available recognizers for BlinkID: - IdBarcodeRecognizer - BlinkIdRecognizer - BlinkIdCombinedRecognizer - cannot be used in combination with other recognizers - when defined, scan from image is not available Recognizers can be defined by setting JS property "recognizers", for example: ``` const blinkId = document.querySelector('blinkid-in-browser'); blinkId.recognizers = ['IdBarcodeRecognizer', 'BlinkIdRecognizer']; ```
* List of recognizers which should be used. Available recognizers for BlinkID: - IdBarcodeRecognizer - BlinkIdSingleSideRecognizer - BlinkIdMultiSideRecognizer - cannot be used in combination with other recognizers - when defined, scan from image is not available Recognizers can be defined by setting JS property "recognizers", for example: ``` const blinkId = document.querySelector('blinkid-in-browser'); blinkId.recognizers = ['IdBarcodeRecognizer', 'BlinkIdSingleSideRecognizer']; ```
*/

@@ -866,0 +858,0 @@ "recognizers"?: Array<string>;

@@ -66,4 +66,4 @@ /**

* - IdBarcodeRecognizer
* - BlinkIdRecognizer
* - BlinkIdCombinedRecognizer
* - BlinkIdSingleSideRecognizer
* - BlinkIdMultiSideRecognizer
* - cannot be used in combination with other recognizers

@@ -74,3 +74,3 @@ * - when defined, scan from image is not available

*
* `<blinkid-in-browser recognizers="IdBarcodeRecognizer,BlinkIdRecognizer"></blinkid-in-browser>`
* `<blinkid-in-browser recognizers="IdBarcodeRecognizer,BlinkIdSingleSideRecognizer"></blinkid-in-browser>`
*/

@@ -84,4 +84,4 @@ rawRecognizers: string;

* - IdBarcodeRecognizer
* - BlinkIdRecognizer
* - BlinkIdCombinedRecognizer
* - BlinkIdSingleSideRecognizer
* - BlinkIdMultiSideRecognizer
* - cannot be used in combination with other recognizers

@@ -94,3 +94,3 @@ * - when defined, scan from image is not available

* const blinkId = document.querySelector('blinkid-in-browser');
* blinkId.recognizers = ['IdBarcodeRecognizer', 'BlinkIdRecognizer'];
* blinkId.recognizers = ['IdBarcodeRecognizer', 'BlinkIdSingleSideRecognizer'];
* ```

@@ -107,3 +107,3 @@ */

* blinkId.recognizerOptions = {
* 'BlinkIdRecognizer': {
* 'BlinkIdSingleSideRecognizer': {
* 'returnFullDocumentImage': true,

@@ -120,4 +120,4 @@ *

* For a full list of available recognizer options see source code of a recognizer. For example,
* list of available recognizer options for BlinkIdRecognizer can be seen in the
* `src/Recognizers/BlinkID/Generic/BlinkIdRecognizer.ts` file.
* list of available recognizer options for BlinkIdSingleSideRecognizer can be seen in the
* `src/Recognizers/BlinkID/Generic/BlinkIdSingleSideRecognizer.ts` file.
*/

@@ -153,8 +153,2 @@ recognizerOptions: {

/**
* Set to 'true' if success frame should be included in final scanning results.
*
* Default value is 'false'.
*/
includeSuccessFrame: boolean;
/**
* Set to 'false' if component should not enable drag and drop functionality.

@@ -385,3 +379,3 @@ *

/**
* Starts combined image scan, emits results from provided files.
* Starts multi-side image scan, emits results from provided files.
*

@@ -391,3 +385,3 @@ * @param firstFile File to scan as first image

*/
startCombinedImageScan(firstFile: File, secondFile: File): Promise<void>;
startMultiSideImageScan(firstFile: File, secondFile: File): Promise<void>;
/**

@@ -394,0 +388,0 @@ * Show message alongside UI component.

@@ -25,3 +25,3 @@ /**

private blocked;
private combinedGalleryOpened;
private multiSideGalleryOpened;
private imageRecognitionType;

@@ -32,3 +32,3 @@ private imageBoxFirst;

private galleryImageSecondFile;
private combinedScanFromImageButton;
private multiSideScanFromImageButton;
private isCameraActive;

@@ -245,3 +245,3 @@ galleryExperienceModalErrorWindowVisible: boolean;

/**
* Starts combined image scan, emits results from provided files.
* Starts multi-side image scan, emits results from provided files.
*

@@ -251,3 +251,3 @@ * @param firstFile File to scan as first image

*/
startCombinedImageScan(firstFile: File, secondFile: File): Promise<void>;
startMultiSideImageScan(firstFile: File, secondFile: File): Promise<void>;
/**

@@ -268,3 +268,3 @@ * Method is exposed outside which allow us to control UI state from parent component.

private startScanFromImage;
private startScanFromImageCombined;
private startScanFromImageMultiSide;
private handleScanError;

@@ -281,5 +281,5 @@ private showLicenseInfoModal;

private clearInputImages;
private openCombinedGalleryUpload;
private closeCombinedGalleryUpload;
private onCombinedImageChange;
private openMultiSideGalleryUpload;
private closeMultiSideGalleryUpload;
private onMultiSideImageChange;
private showScanFromImageUi;

@@ -286,0 +286,0 @@ private hideScanFromImageUi;

@@ -20,3 +20,2 @@ /**

recognitionPauseTimeout?: number;
includeSuccessFrame?: boolean;
thoroughScanFromImage: boolean;

@@ -80,8 +79,6 @@ enableDrag: boolean;

recognizerName: string;
successFrame?: BlinkIDSDK.SuccessFrameGrabberRecognizerResult;
constructor(recognizer: BlinkIDSDK.RecognizerResult, recognizerName: string, successFrame?: BlinkIDSDK.SuccessFrameGrabberRecognizerResult);
constructor(recognizer: BlinkIDSDK.RecognizerResult, recognizerName: string);
}
export interface RecognitionResults {
recognizer: BlinkIDSDK.RecognizerResult;
successFrame?: BlinkIDSDK.SuccessFrameGrabberRecognizerResult;
}

@@ -122,3 +119,3 @@ /**

}
export interface CombinedImageRecognitionConfiguration {
export interface MultiSideImageRecognitionConfiguration {
recognizers: Array<string>;

@@ -131,6 +128,6 @@ recognizerOptions?: any;

export declare enum ImageRecognitionType {
Single = "Single",
Combined = "Combined"
SingleSide = "SingleSide",
MultiSide = "MultiSide"
}
export declare enum CombinedImageType {
export declare enum MultiSideImageType {
First = "First",

@@ -144,5 +141,2 @@ Second = "Second"

};
successFrame?: BlinkIDSDK.SuccessFrameGrabberRecognizer<BlinkIDSDK.Recognizer> & {
objectHandle?: number;
};
}

@@ -186,3 +180,2 @@ export declare enum RecognitionStatus {

recognizerName: string;
successFrame?: BlinkIDSDK.SuccessFrameGrabberRecognizerResult;
imageCapture?: boolean;

@@ -193,3 +186,3 @@ resultSignedJSON?: BlinkIDSDK.SignedPayload;

Barcode = "BARCODE",
CardCombined = "CARD_COMBINED",
CardMultiSide = "CARD_MULTI_SIDE",
CardSingleSide = "CARD_SINGLE_SIDE",

@@ -196,0 +189,0 @@ PaymentCard = "PAYMENT_CARD"

@@ -5,3 +5,3 @@ /**

import * as BlinkIDSDK from '@microblink/blinkid-in-browser-sdk';
import { CameraEntry, CameraExperience, EventReady, VideoRecognitionConfiguration, ImageRecognitionConfiguration, CombinedImageRecognitionConfiguration, ImageRecognitionType, RecognitionEvent, SdkSettings, SDKError } from './data-structures';
import { CameraEntry, CameraExperience, EventReady, VideoRecognitionConfiguration, ImageRecognitionConfiguration, MultiSideImageRecognitionConfiguration, ImageRecognitionType, RecognitionEvent, SdkSettings, SDKError } from './data-structures';
export interface CheckConclusion {

@@ -30,3 +30,3 @@ status: boolean;

scanFromImage(configuration: ImageRecognitionConfiguration, eventCallback: (ev: RecognitionEvent) => void): Promise<void>;
scanFromImageCombined(configuration: CombinedImageRecognitionConfiguration, eventCallback: (ev: RecognitionEvent) => void): Promise<void>;
scanFromImageMultiSide(configuration: MultiSideImageRecognitionConfiguration, eventCallback: (ev: RecognitionEvent) => void): Promise<void>;
stopRecognition(): Promise<void>;

@@ -33,0 +33,0 @@ resumeRecognition(): Promise<void>;

@@ -86,6 +86,2 @@ /* eslint-disable */

/**
* Set to 'true' if success frame should be included in final scanning results. Default value is 'false'.
*/
"includeSuccessFrame": boolean;
/**
* License key which is going to be used to unlock WASM library. Keep in mind that UI component will reinitialize every time license key is changed.

@@ -95,3 +91,3 @@ */

/**
* List of recognizers which should be used. Available recognizers for BlinkID: - IdBarcodeRecognizer - BlinkIdRecognizer - BlinkIdCombinedRecognizer - cannot be used in combination with other recognizers - when defined, scan from image is not available Recognizers can be defined by setting HTML attribute "recognizers", for example: `<blinkid-in-browser recognizers="IdBarcodeRecognizer,BlinkIdRecognizer"></blinkid-in-browser>`
* List of recognizers which should be used. Available recognizers for BlinkID: - IdBarcodeRecognizer - BlinkIdSingleSideRecognizer - BlinkIdMultiSideRecognizer - cannot be used in combination with other recognizers - when defined, scan from image is not available Recognizers can be defined by setting HTML attribute "recognizers", for example: `<blinkid-in-browser recognizers="IdBarcodeRecognizer,BlinkIdSingleSideRecognizer"></blinkid-in-browser>`
*/

@@ -112,7 +108,7 @@ "rawRecognizers": string;

/**
* Specify recognizer options. This option can only bet set as a JavaScript property. Pass an object to `recognizerOptions` property where each key represents a recognizer, while the value represents desired recognizer options. ``` blinkId.recognizerOptions = { 'BlinkIdRecognizer': { 'returnFullDocumentImage': true, // When setting values for enums, check the source code to see possible values. // For AnonymizationMode we can see the list of possible values in // `src/Recognizers/BlinkID/Generic/AnonymizationMode.ts` file. 'anonymizationMode': 0 } } ``` For a full list of available recognizer options see source code of a recognizer. For example, list of available recognizer options for BlinkIdRecognizer can be seen in the `src/Recognizers/BlinkID/Generic/BlinkIdRecognizer.ts` file.
* Specify recognizer options. This option can only bet set as a JavaScript property. Pass an object to `recognizerOptions` property where each key represents a recognizer, while the value represents desired recognizer options. ``` blinkId.recognizerOptions = { 'BlinkIdSingleSideRecognizer': { 'returnFullDocumentImage': true, // When setting values for enums, check the source code to see possible values. // For AnonymizationMode we can see the list of possible values in // `src/Recognizers/BlinkID/Generic/AnonymizationMode.ts` file. 'anonymizationMode': 0 } } ``` For a full list of available recognizer options see source code of a recognizer. For example, list of available recognizer options for BlinkIdSingleSideRecognizer can be seen in the `src/Recognizers/BlinkID/Generic/BlinkIdSingleSideRecognizer.ts` file.
*/
"recognizerOptions": { [key: string]: any };
/**
* List of recognizers which should be used. Available recognizers for BlinkID: - IdBarcodeRecognizer - BlinkIdRecognizer - BlinkIdCombinedRecognizer - cannot be used in combination with other recognizers - when defined, scan from image is not available Recognizers can be defined by setting JS property "recognizers", for example: ``` const blinkId = document.querySelector('blinkid-in-browser'); blinkId.recognizers = ['IdBarcodeRecognizer', 'BlinkIdRecognizer']; ```
* List of recognizers which should be used. Available recognizers for BlinkID: - IdBarcodeRecognizer - BlinkIdSingleSideRecognizer - BlinkIdMultiSideRecognizer - cannot be used in combination with other recognizers - when defined, scan from image is not available Recognizers can be defined by setting JS property "recognizers", for example: ``` const blinkId = document.querySelector('blinkid-in-browser'); blinkId.recognizers = ['IdBarcodeRecognizer', 'BlinkIdSingleSideRecognizer']; ```
*/

@@ -153,8 +149,2 @@ "recognizers": Array<string>;

/**
* Starts combined image scan, emits results from provided files.
* @param firstFile File to scan as first image
* @param secondFile File to scan as second image
*/
"startCombinedImageScan": (firstFile: File, secondFile: File) => Promise<void>;
/**
* Starts image scan, emits results from provided file.

@@ -165,2 +155,8 @@ * @param file File to scan

/**
* Starts multi-side image scan, emits results from provided files.
* @param firstFile File to scan as first image
* @param secondFile File to scan as second image
*/
"startMultiSideImageScan": (firstFile: File, secondFile: File) => Promise<void>;
/**
* Set to 'true' if scan from image should execute twice in case that first result is empty. If enabled, this option will add/remove 'scanCroppedDocumentImage' recognizer option for the second scan action.

@@ -482,8 +478,2 @@ */

/**
* Starts combined image scan, emits results from provided files.
* @param firstFile File to scan as first image
* @param secondFile File to scan as second image
*/
"startCombinedImageScan": (firstFile: File, secondFile: File) => Promise<void>;
/**
* Starts image scan, emits results from provided file.

@@ -494,2 +484,8 @@ * @param file File to scan

/**
* Starts multi-side image scan, emits results from provided files.
* @param firstFile File to scan as first image
* @param secondFile File to scan as second image
*/
"startMultiSideImageScan": (firstFile: File, secondFile: File) => Promise<void>;
/**
* See description in public component.

@@ -801,6 +797,2 @@ */

/**
* Set to 'true' if success frame should be included in final scanning results. Default value is 'false'.
*/
"includeSuccessFrame"?: boolean;
/**
* License key which is going to be used to unlock WASM library. Keep in mind that UI component will reinitialize every time license key is changed.

@@ -842,3 +834,3 @@ */

/**
* List of recognizers which should be used. Available recognizers for BlinkID: - IdBarcodeRecognizer - BlinkIdRecognizer - BlinkIdCombinedRecognizer - cannot be used in combination with other recognizers - when defined, scan from image is not available Recognizers can be defined by setting HTML attribute "recognizers", for example: `<blinkid-in-browser recognizers="IdBarcodeRecognizer,BlinkIdRecognizer"></blinkid-in-browser>`
* List of recognizers which should be used. Available recognizers for BlinkID: - IdBarcodeRecognizer - BlinkIdSingleSideRecognizer - BlinkIdMultiSideRecognizer - cannot be used in combination with other recognizers - when defined, scan from image is not available Recognizers can be defined by setting HTML attribute "recognizers", for example: `<blinkid-in-browser recognizers="IdBarcodeRecognizer,BlinkIdSingleSideRecognizer"></blinkid-in-browser>`
*/

@@ -859,7 +851,7 @@ "rawRecognizers"?: string;

/**
* Specify recognizer options. This option can only bet set as a JavaScript property. Pass an object to `recognizerOptions` property where each key represents a recognizer, while the value represents desired recognizer options. ``` blinkId.recognizerOptions = { 'BlinkIdRecognizer': { 'returnFullDocumentImage': true, // When setting values for enums, check the source code to see possible values. // For AnonymizationMode we can see the list of possible values in // `src/Recognizers/BlinkID/Generic/AnonymizationMode.ts` file. 'anonymizationMode': 0 } } ``` For a full list of available recognizer options see source code of a recognizer. For example, list of available recognizer options for BlinkIdRecognizer can be seen in the `src/Recognizers/BlinkID/Generic/BlinkIdRecognizer.ts` file.
* Specify recognizer options. This option can only bet set as a JavaScript property. Pass an object to `recognizerOptions` property where each key represents a recognizer, while the value represents desired recognizer options. ``` blinkId.recognizerOptions = { 'BlinkIdSingleSideRecognizer': { 'returnFullDocumentImage': true, // When setting values for enums, check the source code to see possible values. // For AnonymizationMode we can see the list of possible values in // `src/Recognizers/BlinkID/Generic/AnonymizationMode.ts` file. 'anonymizationMode': 0 } } ``` For a full list of available recognizer options see source code of a recognizer. For example, list of available recognizer options for BlinkIdSingleSideRecognizer can be seen in the `src/Recognizers/BlinkID/Generic/BlinkIdSingleSideRecognizer.ts` file.
*/
"recognizerOptions"?: { [key: string]: any };
/**
* List of recognizers which should be used. Available recognizers for BlinkID: - IdBarcodeRecognizer - BlinkIdRecognizer - BlinkIdCombinedRecognizer - cannot be used in combination with other recognizers - when defined, scan from image is not available Recognizers can be defined by setting JS property "recognizers", for example: ``` const blinkId = document.querySelector('blinkid-in-browser'); blinkId.recognizers = ['IdBarcodeRecognizer', 'BlinkIdRecognizer']; ```
* List of recognizers which should be used. Available recognizers for BlinkID: - IdBarcodeRecognizer - BlinkIdSingleSideRecognizer - BlinkIdMultiSideRecognizer - cannot be used in combination with other recognizers - when defined, scan from image is not available Recognizers can be defined by setting JS property "recognizers", for example: ``` const blinkId = document.querySelector('blinkid-in-browser'); blinkId.recognizers = ['IdBarcodeRecognizer', 'BlinkIdSingleSideRecognizer']; ```
*/

@@ -866,0 +858,0 @@ "recognizers"?: Array<string>;

@@ -26,3 +26,2 @@ /**

recognitionPauseTimeout?: number;
includeSuccessFrame?: boolean;
thoroughScanFromImage: boolean;

@@ -113,3 +112,2 @@

recognizerName: string;
successFrame?: BlinkIDSDK.SuccessFrameGrabberRecognizerResult;

@@ -119,3 +117,2 @@ constructor(

recognizerName: string,
successFrame?: BlinkIDSDK.SuccessFrameGrabberRecognizerResult
) {

@@ -125,5 +122,2 @@ this.recognizer = recognizer;

if (successFrame) {
this.successFrame = successFrame;
}
}

@@ -134,3 +128,2 @@ }

recognizer: BlinkIDSDK.RecognizerResult,
successFrame?: BlinkIDSDK.SuccessFrameGrabberRecognizerResult
}

@@ -158,4 +151,4 @@

IdBarcodeRecognizer: 'createIdBarcodeRecognizer',
BlinkIdRecognizer: 'createBlinkIdRecognizer',
BlinkIdCombinedRecognizer: 'createBlinkIdCombinedRecognizer',
BlinkIdSingleSideRecognizer: 'createBlinkIdSingleSideRecognizer',
BlinkIdMultiSideRecognizer: 'createBlinkIdMultiSideRecognizer',
}

@@ -179,3 +172,3 @@

export interface CombinedImageRecognitionConfiguration {
export interface MultiSideImageRecognitionConfiguration {
recognizers: Array<string>,

@@ -189,7 +182,7 @@ recognizerOptions?: any,

export enum ImageRecognitionType {
Single = 'Single',
Combined = 'Combined'
SingleSide = 'SingleSide',
MultiSide = 'MultiSide'
}
export enum CombinedImageType {
export enum MultiSideImageType {
First = 'First',

@@ -202,3 +195,2 @@ Second = 'Second'

recognizer: BlinkIDSDK.Recognizer & { objectHandle: number },
successFrame?: BlinkIDSDK.SuccessFrameGrabberRecognizer<BlinkIDSDK.Recognizer> & { objectHandle?: number }
}

@@ -252,3 +244,2 @@

recognizerName: string,
successFrame?: BlinkIDSDK.SuccessFrameGrabberRecognizerResult,
imageCapture?: boolean,

@@ -260,3 +251,3 @@ resultSignedJSON?: BlinkIDSDK.SignedPayload

Barcode = 'BARCODE',
CardCombined = 'CARD_COMBINED',
CardMultiSide = 'CARD_MULTI_SIDE',
CardSingleSide = 'CARD_SINGLE_SIDE',

@@ -263,0 +254,0 @@ PaymentCard = 'PAYMENT_CARD'

@@ -51,5 +51,3 @@ /**

export function isDesktop(): boolean {
const viewportWidth = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0);
return viewportWidth >= 1024;
return !(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
}

@@ -14,3 +14,3 @@ /**

ImageRecognitionConfiguration,
CombinedImageRecognitionConfiguration,
MultiSideImageRecognitionConfiguration,
ImageRecognitionType,

@@ -107,6 +107,6 @@ RecognizerInstance,

if (recognizer === 'BlinkIdCombinedRecognizer' && recognizers.length > 1) {
if (recognizer === 'BlinkIdMultiSideRecognizer' && recognizers.length > 1) {
return {
status: false,
message: 'Recognizer "BlinkIdCombinedRecognizer" cannot be used in combination with other recognizers!'
message: 'Recognizer "BlinkIdMultiSideRecognizer" cannot be used in combination with other recognizers!'
};

@@ -122,7 +122,7 @@ }

public getDesiredCameraExperience(_recognizers: Array<string> = [], _recognizerOptions: any = {}): CameraExperience {
if (_recognizers.indexOf('BlinkIdCombinedRecognizer') > -1) {
return CameraExperience.CardCombined;
if (_recognizers.indexOf('BlinkIdMultiSideRecognizer') > -1) {
return CameraExperience.CardMultiSide;
}
if (_recognizers.indexOf('BlinkIdRecognizer') > -1) {
if (_recognizers.indexOf('BlinkIdSingleSideRecognizer') > -1) {
return CameraExperience.CardSingleSide;

@@ -164,5 +164,2 @@ }

if (recognizer.successFrame?.objectHandle > -1) {
recognizer.successFrame.delete?.();
}
}

@@ -175,3 +172,2 @@ });

configuration.recognizerOptions,
configuration.successFrame
);

@@ -220,10 +216,3 @@

if (recognizer.successFrame) {
const successFrameResults = await recognizer.successFrame.getResult();
if (successFrameResults && successFrameResults.state !== BlinkIDSDK.RecognizerResultState.Empty) {
recognitionResults.successFrame = successFrameResults;
}
}
recognitionResults.imageCapture = _IS_IMAGE_CAPTURE;

@@ -309,3 +298,3 @@

public isScanFromImageAvailable(_recognizers: Array<string> = [], _recognizerOptions: any = {}): boolean {
if (_recognizers.indexOf('BlinkIdCombinedRecognizer') > -1) {
if (_recognizers.indexOf('BlinkIdMultiSideRecognizer') > -1) {
return false;

@@ -317,7 +306,7 @@ }

public getScanFromImageType(_recognizers: Array<string> = [], _recognizerOptions: any = {}): ImageRecognitionType {
if (_recognizers.indexOf('BlinkIdCombinedRecognizer') > -1) {
return ImageRecognitionType.Combined;
if (_recognizers.indexOf('BlinkIdMultiSideRecognizer') > -1) {
return ImageRecognitionType.MultiSide;
}
return ImageRecognitionType.Single;
return ImageRecognitionType.SingleSide;
}

@@ -422,3 +411,3 @@

configuration.thoroughScan &&
configuration.recognizers.indexOf('BlinkIdRecognizer') > -1
configuration.recognizers.indexOf('BlinkIdSingleSideRecognizer') > -1
) {

@@ -458,4 +447,4 @@ const c = configuration;

public async scanFromImageCombined(
configuration: CombinedImageRecognitionConfiguration,
public async scanFromImageMultiSide(
configuration: MultiSideImageRecognitionConfiguration,
eventCallback: (ev: RecognitionEvent) => void

@@ -577,3 +566,3 @@ ): Promise<void> {

configuration.thoroughScan &&
configuration.recognizers.indexOf('BlinkIdCombinedRecognizer') > -1
configuration.recognizers.indexOf('BlinkIdMultiSideRecognizer') > -1
) {

@@ -594,3 +583,3 @@ const c = configuration;

this.eventEmitter$.removeEventListener('terminate:done', handleTerminateDone);
this.scanFromImageCombined(configuration, eventHandler);
this.scanFromImageMultiSide(configuration, eventHandler);
}

@@ -645,3 +634,2 @@ this.eventEmitter$.addEventListener('terminate:done', handleTerminateDone);

recognizerOptions?: any,
successFrame: boolean = false
): Promise<Array<RecognizerInstance>> {

@@ -686,6 +674,2 @@ const pureRecognizers = [];

if (successFrame) {
const successFrameGrabber = await BlinkIDSDK.createSuccessFrameGrabberRecognizer(this.sdk, recognizer);
instance.successFrame = successFrameGrabber;
}

@@ -747,12 +731,12 @@ recognizerInstances.push(instance)

const blinkIdGeneric = recognizers.find(el => el.recognizer.recognizerName === 'BlinkIdRecognizer');
const blinkIdCombined = recognizers.find(el => el.recognizer.recognizerName === 'BlinkIdCombinedRecognizer');
const blinkIdSingleSide = recognizers.find(el => el.recognizer.recognizerName === 'BlinkIdSingleSideRecognizer');
const blinkIdMultiSide = recognizers.find(el => el.recognizer.recognizerName === 'BlinkIdMultiSideRecognizer');
if (blinkIdGeneric || blinkIdCombined) {
if (blinkIdSingleSide || blinkIdMultiSide) {
for (const el of recognizers) {
if (
el.recognizer.recognizerName === 'BlinkIdRecognizer' ||
el.recognizer.recognizerName === 'BlinkIdCombinedRecognizer'
el.recognizer.recognizerName === 'BlinkIdSingleSideRecognizer' ||
el.recognizer.recognizerName === 'BlinkIdMultiSideRecognizer'
) {
const settings = await el.recognizer.currentSettings() as BlinkIDSDK.BlinkIdRecognizerSettings;
const settings = await el.recognizer.currentSettings() as BlinkIDSDK.BlinkIdSingleSideRecognizerSettings;
settings.barcodeScanningStartedCallback = () => eventCallback({ status: RecognitionStatus.BarcodeScanningStarted });

@@ -767,3 +751,3 @@ settings.classifierCallback = (supported: boolean) => {

if (blinkIdCombined) {
if (blinkIdMultiSide) {
metadataCallbacks.onFirstSideResult = () => eventCallback({ status: RecognitionStatus.OnFirstSideResult });

@@ -774,3 +758,3 @@ }

this.sdk,
recognizers.map((el: RecognizerInstance) => el.successFrame || el.recognizer),
recognizers.map((el: RecognizerInstance) => el.recognizer),
false,

@@ -777,0 +761,0 @@ metadataCallbacks

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 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 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 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 not supported yet

Sorry, the diff of this file is too big to display

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 not supported yet

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 not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc