@scandit/web-datacapture-core 7.2.0 → 7.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/build/js/Camera.js +1 -1
  2. package/build/js/CameraAccess.js +1 -1
  3. package/build/js/DataCaptureContext.js +1 -1
  4. package/build/js/DataCaptureVersion.js +1 -1
  5. package/build/js/DataCaptureView.js +1 -1
  6. package/build/js/Feedback.js +1 -1
  7. package/build/js/ScanditIcon.js +1 -1
  8. package/build/js/ScanditIconBuilder.js +1 -1
  9. package/build/js/Sound.js +1 -1
  10. package/build/js/assets/beepSound.js +1 -1
  11. package/build/js/chunks/{chunk-U7XZE33G.js → chunk-4KCDIWC3.js} +1 -1
  12. package/build/js/chunks/{chunk-3OBWS6CO.js → chunk-6HPS3VUF.js} +1 -1
  13. package/build/js/chunks/chunk-6LUJAFBV.js +1 -0
  14. package/build/js/chunks/chunk-6X73W3EO.js +2 -0
  15. package/build/js/chunks/{chunk-DVQH5JLR.js → chunk-72A5262S.js} +1 -1
  16. package/build/js/chunks/{chunk-FNFCPBQI.js → chunk-7CQVGY6N.js} +1 -1
  17. package/build/js/chunks/{chunk-EXY5MS5K.js → chunk-7M3GGOSL.js} +1 -1
  18. package/build/js/chunks/{chunk-BIGR7VVJ.js → chunk-7QNII4K3.js} +1 -1
  19. package/build/js/chunks/{chunk-BYMYBEMT.js → chunk-AC6MK6LU.js} +1 -1
  20. package/build/js/chunks/{chunk-KRIYEHHW.js → chunk-ACXLPROZ.js} +1 -1
  21. package/build/js/chunks/{chunk-VEXAGRW7.js → chunk-EEA7AA2K.js} +2 -2
  22. package/build/js/chunks/{chunk-6FPW3MIJ.js → chunk-EVI6U6CG.js} +1 -1
  23. package/build/js/chunks/{chunk-MST2ECFN.js → chunk-FFTRSHP6.js} +1 -1
  24. package/build/js/chunks/{chunk-LY6NJOQH.js → chunk-FLO5QRX5.js} +1 -1
  25. package/build/js/chunks/{chunk-5E7ISPKS.js → chunk-FPCLZS52.js} +1 -1
  26. package/build/js/chunks/chunk-J7ZH4PNS.js +1 -0
  27. package/build/js/chunks/chunk-LSZZVJ6B.js +1 -0
  28. package/build/js/chunks/chunk-MU6SADSF.js +1 -0
  29. package/build/js/chunks/chunk-MWPSUUFY.js +1 -0
  30. package/build/js/chunks/{chunk-T5FGQOCF.js → chunk-NAOIN6LV.js} +1 -1
  31. package/build/js/chunks/{chunk-2NHLNMAU.js → chunk-SCTIUP46.js} +1 -1
  32. package/build/js/chunks/{chunk-YS6R5ZYE.js → chunk-TTT735E7.js} +1 -1
  33. package/build/js/chunks/{chunk-CBF2PLFL.js → chunk-U2OJFO7J.js} +1 -1
  34. package/build/js/chunks/{chunk-FFFXM7UY.js → chunk-UUGROS73.js} +1 -1
  35. package/build/js/chunks/{chunk-TJJYIG7M.js → chunk-VZJ2FQ7I.js} +1 -1
  36. package/build/js/chunks/{chunk-VIZTTYLK.js → chunk-WPY7T7HY.js} +1 -1
  37. package/build/js/index.js +1 -1
  38. package/build/js/private/CameraAccess.js +1 -1
  39. package/build/js/private/CameraManager.js +1 -1
  40. package/build/js/private/ViewControls+related.js +1 -1
  41. package/build/js/private/ViewStyles.js +1 -1
  42. package/build/js/private/ui/atoms/ArrowDownSvgIcon.js +1 -1
  43. package/build/js/private/ui/atoms/ArrowLeftSvgIcon.js +1 -1
  44. package/build/js/private/ui/atoms/ArrowRightSvgIcon.js +1 -1
  45. package/build/js/private/ui/atoms/ArrowUpSvgIcon.js +1 -1
  46. package/build/js/private/ui/atoms/ArrowsUp.js +1 -1
  47. package/build/js/private/ui/atoms/CalendarExclamationMarkSvgIcon.js +1 -1
  48. package/build/js/private/ui/atoms/CameraSwitchReverseSvgIcon.js +1 -1
  49. package/build/js/private/ui/atoms/CameraSwitchSvgIcon.js +1 -1
  50. package/build/js/private/ui/atoms/CheckSvgIcon.js +1 -1
  51. package/build/js/private/ui/atoms/ChevronDownSvgIcon.js +1 -1
  52. package/build/js/private/ui/atoms/ChevronLeftSvgIcon.js +1 -1
  53. package/build/js/private/ui/atoms/ChevronRightSvgIcon.js +1 -1
  54. package/build/js/private/ui/atoms/ChevronUpSvgIcon.js +1 -1
  55. package/build/js/private/ui/atoms/CrossSvgIcon.js +1 -1
  56. package/build/js/private/ui/atoms/Dot5xSvgIcon.js +1 -1
  57. package/build/js/private/ui/atoms/ExclamationMarkSvgIcon.js +1 -1
  58. package/build/js/private/ui/atoms/GlassSvgIcon.js +1 -1
  59. package/build/js/private/ui/atoms/HandLensCheckSvgIcon.js +1 -1
  60. package/build/js/private/ui/atoms/LowStockSvgIcon.js +1 -1
  61. package/build/js/private/ui/atoms/OnexSvgIcon.js +1 -1
  62. package/build/js/private/ui/atoms/PrinterSvgIcon.js +1 -1
  63. package/build/js/private/ui/atoms/ProgressBar.js +1 -1
  64. package/build/js/private/ui/atoms/QuestionMarkSvgIcon.js +1 -1
  65. package/build/js/private/ui/atoms/RoundedCheckSvgIcon.js +1 -1
  66. package/build/js/private/ui/atoms/RoundedExclamationMarkSvgIcon.js +1 -1
  67. package/build/js/private/ui/atoms/ShutterButton.js +1 -1
  68. package/build/js/private/ui/atoms/StarFilledSvgIcon.js +1 -1
  69. package/build/js/private/ui/atoms/StarHalfFilledSvgIcon.js +1 -1
  70. package/build/js/private/ui/atoms/StarOutlinedSvgIcon.js +1 -1
  71. package/build/js/private/ui/atoms/SvgIcon.js +1 -1
  72. package/build/js/private/ui/atoms/ToPickSvgIcon.js +1 -1
  73. package/build/js/private/ui/atoms/Toast.js +1 -1
  74. package/build/js/private/ui/atoms/TwoxSvgIcon.js +1 -1
  75. package/build/js/private/ui/atoms/WrongItemSvgIcon.js +1 -1
  76. package/build/js/private/ui/molecules/HintPresenter.js +1 -1
  77. package/build/js/private/ui/molecules/LoadingOverlay.js +1 -1
  78. package/build/js/private/utils/css.js +1 -1
  79. package/build/js/private/utils/html.js +1 -1
  80. package/build/js/private/utils/index.js +1 -1
  81. package/build/js/worker/WorkerMain.js +1 -1
  82. package/build/js/worker/dataCapture.inlineWorker.js +1 -1
  83. package/build/js/worker/dataCaptureEngine.js +1 -1
  84. package/build/js/worker/index.js +1 -1
  85. package/package.json +1 -1
  86. package/build/js/chunks/chunk-5TKCHVG2.js +0 -1
  87. package/build/js/chunks/chunk-GE4CBD4E.js +0 -1
  88. package/build/js/chunks/chunk-GSJH2EXJ.js +0 -2
  89. package/build/js/chunks/chunk-I22KIYBM.js +0 -1
  90. package/build/js/chunks/chunk-JXJQSWYG.js +0 -1
  91. package/build/js/chunks/chunk-U6BTTEV6.js +0 -1
  92. package/build/js/chunks/chunk-VXPXBTR2.js +0 -1
@@ -1,4 +1,4 @@
1
- import {a as a$9}from'./chunk-BA3RP6L2.js';import {a as a$5,b as b$1}from'./chunk-EHMSDFH7.js';import {a as a$1}from'./chunk-KCNXUTBL.js';import {a as a$3}from'./chunk-NMROJLGQ.js';import {a as a$4}from'./chunk-JS3T7K2Z.js';import {a as a$2}from'./chunk-7SW2PEHB.js';import {a as a$6}from'./chunk-FGO2SSRS.js';import {d}from'./chunk-BYMYBEMT.js';import {a as a$7}from'./chunk-XR65N6EG.js';import {a}from'./chunk-MU4VAJIM.js';import {f}from'./chunk-UD3Z45BT.js';import {a as a$8}from'./chunk-WUHKODFA.js';function b(M){return M[a$9]!=null}var O,x,P,i=class i{constructor(e,t){this.framework="web";this.runtimeEnvironment={deviceOS:(O=a.getUserAgentInfo().getOS().name)!=null?O:"",browser:(x=a.getUserAgentInfo().getBrowser().name)!=null?x:"",browserVersion:(P=a.getUserAgentInfo().getBrowser().version)!=null?P:"",get deviceModelName(){let{model:e,vendor:t}=a.getUserAgentInfo().getDevice();return (t==null||t==="")&&(t="Unknown"),(e==null||e==="")&&(e="Unknown"),[t,e].join(" ")}};this.settings=new a$2;this._frameSource=null;this._view=null;this.modes=new Set;this.nativeModes=new Set;this.components=[];this.listeners=[];this.updateListeners=new Set;this.cameraPropertiesReportListener=this.reportCameraProperties.bind(this);this.cameraAccessErrorListener=this.onCameraAccessError.bind(this);this.onWorkerMessageListener=this.onWorkerMessage.bind(this);this.onVisibilityChangeListener=this.onVisibilityChange.bind(this);this._frameHandlers=[];this._useSynchronousFrameFlow=!1;var a$1,r,s,c,v,C;this.licenseKey=e,this.deviceName=(a$1=t.deviceName)!=null?a$1:"",this.dataCaptureInstance=(r=t.dataCaptureInstance)!=null?r:a$3.mainDataCaptureLoader,this.delayedRegistration=(s=t.delayedRegistration)!=null?s:!1,this.highEndBlurryRecognition=(C=(v=(c=t.dataCaptureInstance)==null?void 0:c.highEndBlurryRecognition)!=null?v:a$3.mainDataCaptureLoader.highEndBlurryRecognition)!=null?C:!1;}get frameSource(){return this._frameSource}get workerCommand(){return this.dataCaptureInstance.workerCommand.bind(this.dataCaptureInstance)}static async create(){return i.createWithOptions({})}static async createWithOptions(e){var a;let t=new i((a=e.licenseKey)!=null?a:a$3.userLicenseKey,{deviceName:e.deviceName});return e.settings!=null&&await t.applySettings(e.settings),await t.initialize(),t}static async getOpenSourceSoftwareLicenseInfo(){let e=[];for(let a of i.moduleLicenseTextProviders){let r=await a.getLicenseText();e.push(r);}let t=e.join(`
1
+ import {a as a$9}from'./chunk-BA3RP6L2.js';import {a as a$5,b as b$1}from'./chunk-EHMSDFH7.js';import {a as a$1}from'./chunk-KCNXUTBL.js';import {a as a$4}from'./chunk-JS3T7K2Z.js';import {a as a$3}from'./chunk-NMROJLGQ.js';import {a as a$2}from'./chunk-7SW2PEHB.js';import {a as a$6}from'./chunk-FGO2SSRS.js';import {d}from'./chunk-AC6MK6LU.js';import {a as a$7}from'./chunk-XR65N6EG.js';import {a}from'./chunk-MU4VAJIM.js';import {f}from'./chunk-UD3Z45BT.js';import {a as a$8}from'./chunk-WUHKODFA.js';function b(M){return M[a$9]!=null}var O,x,P,i=class i{constructor(e,t){this.framework="web";this.runtimeEnvironment={deviceOS:(O=a.getUserAgentInfo().getOS().name)!=null?O:"",browser:(x=a.getUserAgentInfo().getBrowser().name)!=null?x:"",browserVersion:(P=a.getUserAgentInfo().getBrowser().version)!=null?P:"",get deviceModelName(){let{model:e,vendor:t}=a.getUserAgentInfo().getDevice();return (t==null||t==="")&&(t="Unknown"),(e==null||e==="")&&(e="Unknown"),[t,e].join(" ")}};this.settings=new a$2;this._frameSource=null;this._view=null;this.modes=new Set;this.nativeModes=new Set;this.components=[];this.listeners=[];this.updateListeners=new Set;this.cameraPropertiesReportListener=this.reportCameraProperties.bind(this);this.cameraAccessErrorListener=this.onCameraAccessError.bind(this);this.onWorkerMessageListener=this.onWorkerMessage.bind(this);this.onVisibilityChangeListener=this.onVisibilityChange.bind(this);this._frameHandlers=[];this._useSynchronousFrameFlow=!1;var a$1,r,s,c,v,C;this.licenseKey=e,this.deviceName=(a$1=t.deviceName)!=null?a$1:"",this.dataCaptureInstance=(r=t.dataCaptureInstance)!=null?r:a$3.mainDataCaptureLoader,this.delayedRegistration=(s=t.delayedRegistration)!=null?s:!1,this.highEndBlurryRecognition=(C=(v=(c=t.dataCaptureInstance)==null?void 0:c.highEndBlurryRecognition)!=null?v:a$3.mainDataCaptureLoader.highEndBlurryRecognition)!=null?C:!1;}get frameSource(){return this._frameSource}get workerCommand(){return this.dataCaptureInstance.workerCommand.bind(this.dataCaptureInstance)}static async create(){return i.createWithOptions({})}static async createWithOptions(e){var a;let t=new i((a=e.licenseKey)!=null?a:a$3.userLicenseKey,{deviceName:e.deviceName});return e.settings!=null&&await t.applySettings(e.settings),await t.initialize(),t}static async getOpenSourceSoftwareLicenseInfo(){let e=[];for(let a of i.moduleLicenseTextProviders){let r=await a.getLicenseText();e.push(r);}let t=e.join(`
2
2
 
3
- `);return new a$4(t)}async setFrameSource(e){let t=e!==this._frameSource;if(this._frameSource!==null&&(this._frameSource.context=null),this._frameSource=e!=null?e:null,e&&(e.context=this,await this.workerCommand("setFrameSource",{mirrorAxis:this.getMirrorAxisForFrameSource(e),isCameraFrameSource:f(e)})),await this.update([{type:"frameSourceState",newValue:this.frameSource}]),t)for(let a of this.listeners)a.didChangeFrameSource&&a.didChangeFrameSource(this,this._frameSource);}addListener(e){this.listeners.includes(e)||this.listeners.push(e);}async flushAnalytics(){await this.workerCommand("flushAnalytics",{});}removeListener(e){this.listeners.includes(e)&&this.listeners.splice(this.listeners.indexOf(e),1);}async addMode(e){this.modes.add(e),await e.attachedToContext(this),this.updateCameraFrameFlow(),await this.update();}async removeMode(e){this.modes.delete(e),await e.detachedFromContext(),this.updateCameraFrameFlow(),await this.update();}async removeAllModes(){for(let e of this.modes)await this.removeMode(e);}async dispose(){d.instance().removeListener("cameraProperties",this.cameraPropertiesReportListener),d.instance().removeListener("cameraAccessError",this.cameraAccessErrorListener),this.unsubscribeToVisibilityChange(this.onVisibilityChangeListener),await this.workerCommand("dispose",{});}async applySettings(e){this.settings=e,await this.update();}toJSONObject(){var e,t;return {licenseKey:this.licenseKey,framework:this.framework,deviceName:this.deviceName,...this.runtimeEnvironment,modes:[...this.modes].filter(a=>!a.skipSerialization).map(a=>a.toJSONObject()),components:this.components.map(a=>a.toJSONObject()),frameSource:this.frameSource?this.frameSource.toJSONObject():null,settings:this.settings.toJSONObject(),view:(t=(e=this._view)==null?void 0:e.toJSONObject())!=null?t:null}}getView(){return this._view}async setView(e){return this._view=e,this.update([{type:"viewSet",newValue:e}])}async getAppName(){let e=null;if(a$5()){let t=await b$1();if((t==null?void 0:t.appName)==null||t.appName==="")throw new Error("Cannot retrieve electron appName. Did you set it up in package.json? https://www.electronjs.org/docs/latest/api/app#appgetname");e=t.appName;}return e}urlToHostname(e){try{return new URL(e!=null?e:"").hostname}catch(t){return ""}}getParentDomain(){var t;let e="";return parent!==window&&(e||(e=this.urlToHostname((t=location.ancestorOrigins)==null?void 0:t[0])),e||(e=this.urlToHostname(document.referrer)),e||(e="")),e.startsWith("[")&&e.at(-1)==="]"&&(e=e.slice(1,-1)),e}async initialize(e=!0){await this.workerCommand("createContext",{context:this.toJSONObject(),deviceId:i.deviceID,delayedRegistration:this.delayedRegistration,highEndBlurryRecognition:this.highEndBlurryRecognition,appName:await this.getAppName(),parentDomain:this.getParentDomain()}),this.subscribeToWorkerMessages(this.onWorkerMessageListener),e&&(this.subscribeToCameraManagerEvents(),this.subscribeToVisibilityChange(this.onVisibilityChangeListener));}subscribeToVisibilityChange(e){document.addEventListener("visibilitychange",e);}unsubscribeToVisibilityChange(e){document.removeEventListener("visibilitychange",e);}async requestFrameData(e){return this.workerCommand("requestFrameData",{frameId:e})}performanceMark(e){a$6(globalThis.performance)&&typeof globalThis.performance.mark=="function"&&performance.mark(e);}async sendFrameToProcessor(e){let t=e instanceof ImageData?{data:e.data,width:e.width,height:e.height}:e;return await this.sendFrameToHandlers(t)?(this.performanceMark("processFrameBeforeSDC"),this.sendFrameToSDC(t)):e}async sendFrameToHandlers(e){for(let t of this._frameHandlers)if(await t(e)==="skip")return !1;return !0}async sendFrameToSDC(e){return this.workerCommand("processFrame",e,[e.data.buffer])}registerFrameHandler(e){this._frameHandlers.includes(e)||this._frameHandlers.push(e);}unregisterFrameHandler(e){this._frameHandlers.includes(e)&&this._frameHandlers.splice(this._frameHandlers.indexOf(e),1);}onVisibilityChange(){this.workerCommand("documentVisibility",{state:document.visibilityState});}onWorkerMessage(e){if(e.type==="contextDidChangeStatus"){e.payload.isValid||a$7.error(e.payload);for(let t of this.listeners)t.didChangeStatus&&t.didChangeStatus(this,a$8.fromJSON(e.payload));}if(e.type==="didStartObservingContext")for(let t of this.listeners)t.didStartObservingContext&&t.didStartObservingContext(this);e.type==="onFrameProcessingFinished"&&this.performanceMark("processFrameAfterSDC");}subscribeToCameraManagerEvents(){d.instance().addListener("cameraProperties",this.cameraPropertiesReportListener),d.instance().addListener("cameraAccessError",this.cameraAccessErrorListener);}async reportCameraProperties(e){return this.workerCommand("reportCameraProperties",e)}onCameraAccessError(e){for(let t of this.listeners)t.didChangeStatus&&t.didChangeStatus(this,a$8.fromJSON({code:33794,isValid:!0,message:e.toString()}));}async update(e=[]){var t,a;await this.updateContext();for(let r of e){switch(r.type){case"frameSourceState":{await((t=this._view)==null?void 0:t.onFrameSourceChange(this.frameSource));break}case"singleImageModeUploaderSettings":{(a=this._view)==null||a.onSingleImageUploaderSettingsChange(r.newValue);break}case"addOverlay":{this.addNativeOverlay(r.newValue);break}case"removeOverlay":{this.removeNativeOverlay(r.newValue);break}}for(let s of this.updateListeners)s(r);}}async updateContext(){await this.workerCommand("updateContext",{context:this.toJSONObject(),...this.getViewInfo()}).catch(e=>{a$7.warn("Error while updating context:",e);});}getViewInfo(){return this._view!=null?{view:{width:this._view.width,height:this._view.height,visible:this._view.width>0&&this._view.height>0,orientation:this._view.orientation}}:{view:null}}getMirrorAxisForFrameSource(e){let t="None";return f(e)&&e.getMirrorImageEnabled()&&(t="Y"),t}async addComponent(e){if(!this.components.includes(e))return this.components.push(e),e._context=this,this.update()}addNativeMode(e){this.nativeModes.add(e);}removeNativeMode(e){this.nativeModes.delete(e);}addNativeOverlay(e){b(e)&&this.workerCommand("addNativeOverlay",{overlayHandle:e[a$9]});}removeNativeOverlay(e){b(e)&&this.workerCommand("removeNativeOverlay",{overlayHandle:e[a$9]});}subscribeToWorkerMessages(e){this.dataCaptureInstance.addWorkerListener(e);}unsubscribeToWorkerMessages(e){this.dataCaptureInstance.removeWorkerListener(e);}hasEnabledMode(){return [...this.modes].some(e=>e.isEnabled())}async hasEnabledNativeMode(){return (await Promise.all([...this.nativeModes].map(e=>e.isEnabled()))).some(e=>e)}updateCameraFrameFlow(){let e=[...this.modes].some(t=>t._synchronousFrameFlow===!0);d.instance().setFrameHandling(e);}async isFeatureSupported(e){return (await this.workerCommand("isFeatureSupported",{feature:e})).supported}};i.deviceID=a.getDeviceId(),i.moduleLicenseTextProviders=[new a$1];var D=i;
3
+ `);return new a$4(t)}async setFrameSource(e){let t=e!==this._frameSource;if(this._frameSource!==null&&(this._frameSource.context=null),this._frameSource=e!=null?e:null,e&&(e.context=this,await this.workerCommand("setFrameSource",{mirrorAxis:this.getMirrorAxisForFrameSource(e),isCameraFrameSource:f(e)})),await this.update([{type:"frameSourceState",newValue:this.frameSource}]),t)for(let a of this.listeners)a.didChangeFrameSource&&a.didChangeFrameSource(this,this._frameSource);}addListener(e){this.listeners.includes(e)||this.listeners.push(e);}async flushAnalytics(){await this.workerCommand("flushAnalytics",{});}removeListener(e){this.listeners.includes(e)&&this.listeners.splice(this.listeners.indexOf(e),1);}async addMode(e){this.modes.add(e),await e.attachedToContext(this),this.updateCameraFrameFlow(),await this.update();}async removeMode(e){this.modes.delete(e),await e.detachedFromContext(),this.updateCameraFrameFlow(),await this.update();}async removeAllModes(){for(let e of this.modes)await this.removeMode(e);}async dispose(){d.instance().removeListener("cameraProperties",this.cameraPropertiesReportListener),d.instance().removeListener("cameraAccessError",this.cameraAccessErrorListener),this.unsubscribeToVisibilityChange(this.onVisibilityChangeListener),await this.workerCommand("dispose",{});}async applySettings(e){this.settings=e,await this.update();}toJSONObject(){var e,t;return {licenseKey:this.licenseKey,framework:this.framework,deviceName:this.deviceName,...this.runtimeEnvironment,modes:[...this.modes].filter(a=>!a.skipSerialization).map(a=>a.toJSONObject()),components:this.components.map(a=>a.toJSONObject()),frameSource:this.frameSource?this.frameSource.toJSONObject():null,settings:this.settings.toJSONObject(),view:(t=(e=this._view)==null?void 0:e.toJSONObject())!=null?t:null}}getView(){return this._view}async setView(e){return this._view=e,this.update([{type:"viewSet",newValue:e}])}async getAppName(){let e=null;if(a$5()){let t=await b$1();if((t==null?void 0:t.appName)==null||t.appName==="")throw new Error("Cannot retrieve electron appName. Did you set it up in package.json? https://www.electronjs.org/docs/latest/api/app#appgetname");e=t.appName;}return e}urlToHostname(e){try{return new URL(e!=null?e:"").hostname}catch(t){return ""}}getParentDomain(){var t;let e="";return parent!==window&&(e||(e=this.urlToHostname((t=location.ancestorOrigins)==null?void 0:t[0])),e||(e=this.urlToHostname(document.referrer)),e||(e="")),e.startsWith("[")&&e.endsWith("]")&&(e=e.slice(1,-1)),e}async initialize(e=!0){await this.workerCommand("createContext",{context:this.toJSONObject(),deviceId:i.deviceID,delayedRegistration:this.delayedRegistration,highEndBlurryRecognition:this.highEndBlurryRecognition,appName:await this.getAppName(),parentDomain:this.getParentDomain()}),this.subscribeToWorkerMessages(this.onWorkerMessageListener),e&&(this.subscribeToCameraManagerEvents(),this.subscribeToVisibilityChange(this.onVisibilityChangeListener));}subscribeToVisibilityChange(e){document.addEventListener("visibilitychange",e);}unsubscribeToVisibilityChange(e){document.removeEventListener("visibilitychange",e);}async requestFrameData(e){return this.workerCommand("requestFrameData",{frameId:e})}performanceMark(e){a$6(globalThis.performance)&&typeof globalThis.performance.mark=="function"&&performance.mark(e);}async sendFrameToProcessor(e){let t=e instanceof ImageData?{data:e.data,width:e.width,height:e.height}:e;return await this.sendFrameToHandlers(t)?(this.performanceMark("processFrameBeforeSDC"),this.sendFrameToSDC(t)):e}async sendFrameToHandlers(e){for(let t of this._frameHandlers)if(await t(e)==="skip")return !1;return !0}async sendFrameToSDC(e){return this.workerCommand("processFrame",e,[e.data.buffer])}registerFrameHandler(e){this._frameHandlers.includes(e)||this._frameHandlers.push(e);}unregisterFrameHandler(e){this._frameHandlers.includes(e)&&this._frameHandlers.splice(this._frameHandlers.indexOf(e),1);}onVisibilityChange(){this.workerCommand("documentVisibility",{state:document.visibilityState});}onWorkerMessage(e){if(e.type==="contextDidChangeStatus"){e.payload.isValid||a$7.error(e.payload);for(let t of this.listeners)t.didChangeStatus&&t.didChangeStatus(this,a$8.fromJSON(e.payload));}if(e.type==="didStartObservingContext")for(let t of this.listeners)t.didStartObservingContext&&t.didStartObservingContext(this);e.type==="onFrameProcessingFinished"&&this.performanceMark("processFrameAfterSDC");}subscribeToCameraManagerEvents(){d.instance().addListener("cameraProperties",this.cameraPropertiesReportListener),d.instance().addListener("cameraAccessError",this.cameraAccessErrorListener);}async reportCameraProperties(e){return this.workerCommand("reportCameraProperties",e)}onCameraAccessError(e){for(let t of this.listeners)t.didChangeStatus&&t.didChangeStatus(this,a$8.fromJSON({code:33794,isValid:!0,message:e.toString()}));}async update(e=[]){var t,a;await this.updateContext();for(let r of e){switch(r.type){case"frameSourceState":{await((t=this._view)==null?void 0:t.onFrameSourceChange(this.frameSource));break}case"singleImageModeUploaderSettings":{(a=this._view)==null||a.onSingleImageUploaderSettingsChange(r.newValue);break}case"addOverlay":{this.addNativeOverlay(r.newValue);break}case"removeOverlay":{this.removeNativeOverlay(r.newValue);break}}for(let s of this.updateListeners)s(r);}}async updateContext(){await this.workerCommand("updateContext",{context:this.toJSONObject(),...this.getViewInfo()}).catch(e=>{a$7.warn("Error while updating context:",e);});}getViewInfo(){return this._view!=null?{view:{width:this._view.width,height:this._view.height,visible:this._view.width>0&&this._view.height>0,orientation:this._view.orientation}}:{view:null}}getMirrorAxisForFrameSource(e){let t="None";return f(e)&&e.getMirrorImageEnabled()&&(t="Y"),t}async addComponent(e){if(!this.components.includes(e))return this.components.push(e),e._context=this,this.update()}addNativeMode(e){this.nativeModes.add(e);}removeNativeMode(e){this.nativeModes.delete(e);}addNativeOverlay(e){b(e)&&this.workerCommand("addNativeOverlay",{overlayHandle:e[a$9]});}removeNativeOverlay(e){b(e)&&this.workerCommand("removeNativeOverlay",{overlayHandle:e[a$9]});}subscribeToWorkerMessages(e){this.dataCaptureInstance.addWorkerListener(e);}unsubscribeToWorkerMessages(e){this.dataCaptureInstance.removeWorkerListener(e);}hasEnabledMode(){return [...this.modes].some(e=>e.isEnabled())}async hasEnabledNativeMode(){return (await Promise.all([...this.nativeModes].map(e=>e.isEnabled()))).some(e=>e)}updateCameraFrameFlow(){let e=[...this.modes].some(t=>t._synchronousFrameFlow===!0);d.instance().setFrameHandling(e);}async isFeatureSupported(e){return (await this.workerCommand("isFeatureSupported",{feature:e})).supported}};i.deviceID=a.getDeviceId(),i.moduleLicenseTextProviders=[new a$1];var D=i;
4
4
  export{D as a};
@@ -1,3 +1,3 @@
1
- import {b,a as a$4,c,f as f$1}from'./chunk-YKP6UYCY.js';import {a as a$1}from'./chunk-EV4OEANA.js';import {a as a$5}from'./chunk-3A4KLILV.js';import {a as a$2}from'./chunk-U6BTTEV6.js';import {a as a$3}from'./chunk-GE4CBD4E.js';var h="scandit-progress-bar",n="aria-valuenow",f="aria-valuemin",w="aria-valuemax",a=class a extends a$1{constructor(){super();let e=this.attachShadow({mode:"open"});e.innerHTML=a$2`
1
+ import {b,a as a$4,c,f as f$1}from'./chunk-YKP6UYCY.js';import {a as a$1}from'./chunk-EV4OEANA.js';import {a as a$5}from'./chunk-3A4KLILV.js';import {a as a$2}from'./chunk-MU6SADSF.js';import {a as a$3}from'./chunk-LSZZVJ6B.js';var h="scandit-progress-bar",n="aria-valuenow",f="aria-valuemin",w="aria-valuemax",a=class a extends a$1{constructor(){super();let e=this.attachShadow({mode:"open"});e.innerHTML=a$2`
2
2
  <div id="scandit-progress" role="progressbar" aria-valuemin="0" aria-valuemax="100" />
3
3
  `,e.append(a.createStyleElement().cloneNode(!0)),this.progress=e.querySelector("#scandit-progress");}static get observedAttributes(){return ["value","min","max"]}static createStyleElement(){return a$3`:host{display:inline-block;--indeterminate-bubble-width:35%;--accent-color:#${b.toJSON()};--start-gradient-color:#${a$4.toJSON()};--end-gradient-color:#${c.toJSON()};--secondary-color:#${f$1.toJSON()};width:100%}:host [role=progressbar]{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;height:.5rem;overflow:hidden;position:relative}:host [role=progressbar]:after,:host [role=progressbar]:before{background:var(--accent-color);border-radius:.5rem;content:" ";height:.5rem;left:0;position:absolute;top:0}:host([variant=gradient]) [role=progressbar]:after,:host([variant=gradient]) [role=progressbar]:before{background:linear-gradient(90deg,var(--start-gradient-color) 0,var(--end-gradient-color) 100%)}:host(:focus-visible){border-radius:.5rem;outline-color:var(--accent-color);outline-offset:5px}:host [role=progressbar]:not([aria-valuenow]):after{animation:indeterminate-progress-bar 2.5s ease infinite;width:var(--indeterminate-bubble-width);z-index:1}:host [role=progressbar][aria-valuenow]:after{animation:none;width:0}:host [role=progressbar][aria-valuenow]:before{background-color:var(--accent-color);border-radius:.5rem;transition:width .3s linear;width:calc(var(--aria-valuenow)*1%)}:host [role=progressbar]{background-color:var(--secondary-color);border-radius:.5rem}@keyframes indeterminate-progress-bar{0%{left:0}50%{left:calc(100% - var(--indeterminate-bubble-width))}}`}get min(){var r;let e=(r=this.getAttribute("min"))!=null?r:0;return Number(e)}get max(){var r;let e=(r=this.getAttribute("max"))!=null?r:1;return Number(e)}set max(e){e!==null&&this.setAttribute("max",String(e));}get value(){let e=this.getAttribute("value");return e==null||e===""?null:Number(e)}set value(e){if(e==null){this.removeAttribute("value");return}e>=this.min&&e<=this.max&&this.setAttribute("value",String(e));}static create(){return document.createElement(h)}static register(){a$5({[a.tag]:a});}attributeChangedCallback(){this.update();}connectedCallback(){this.update();}update(){let{min:e,max:r,value:i,progress:t}=this;if(t==null||t.setAttribute(f,e.toString()),t==null||t.setAttribute(w,r.toString()),i==null){t==null||t.removeAttribute(n),t==null||t.removeAttribute("style");return}if(i>=e&&i<=r){let v=(i-e)/(r-e)*100,l=String(v);t==null||t.setAttribute(n,l),t==null||t.setAttribute("style",`--${n}: ${l}`);}}};a.tag=h;var o=a;o.register();export{o as a};
@@ -1,4 +1,4 @@
1
- import {a}from'./chunk-EV4OEANA.js';import {a as a$2}from'./chunk-3A4KLILV.js';import {a as a$3}from'./chunk-U6BTTEV6.js';import {a as a$1}from'./chunk-GE4CBD4E.js';var l="scandit-arrows-up",t=class t extends a{constructor(){super();let a=this.attachShadow({mode:"open"});a.innerHTML=this.render(),a.prepend(t.createStyleElement().cloneNode(!0));}static createStyleElement(){return a$1`${t.tag}{display:flex}${t.tag}[hidden]{display:none}.arrow{animation:blink 1.5s infinite;animation-duration:2s}.arrow-1{animation-delay:0s}.arrow-2{animation-delay:.5s}.arrow-3{animation-delay:1s}@keyframes blink{0%,to{opacity:0}50%{opacity:1}}`}static create(){return document.createElement(t.tag)}static register(){a$2({[t.tag]:t});}render(){return a$3`
1
+ import {a}from'./chunk-EV4OEANA.js';import {a as a$2}from'./chunk-3A4KLILV.js';import {a as a$3}from'./chunk-MU6SADSF.js';import {a as a$1}from'./chunk-LSZZVJ6B.js';var l="scandit-arrows-up",t=class t extends a{constructor(){super();let a=this.attachShadow({mode:"open"});a.innerHTML=this.render(),a.prepend(t.createStyleElement().cloneNode(!0));}static createStyleElement(){return a$1`${t.tag}{display:flex}${t.tag}[hidden]{display:none}.arrow{animation:blink 1.5s infinite;animation-duration:2s}.arrow-1{animation-delay:0s}.arrow-2{animation-delay:.5s}.arrow-3{animation-delay:1s}@keyframes blink{0%,to{opacity:0}50%{opacity:1}}`}static create(){return document.createElement(t.tag)}static register(){a$2({[t.tag]:t});}render(){return a$3`
2
2
  <svg width="120" height="45" viewBox="0 0 120 45" fill="none">
3
3
  <path
4
4
  class="arrow arrow-1"
@@ -1 +1 @@
1
- import {a as a$1}from'./chunk-5TKCHVG2.js';import {d}from'./chunk-BYMYBEMT.js';import {a}from'./chunk-XR65N6EG.js';import {a as a$2}from'./chunk-MU4VAJIM.js';import {g as g$1}from'./chunk-UD3Z45BT.js';import {d as d$1}from'./chunk-E3TDSWVQ.js';var g=class n{constructor(e){this.deviceId="";this.type="camera";this._currentState="off";this._settings=new g$1;this._desiredTorchState="off";this._desiredState="off";this.listeners=[];this._context=null;this.stateTransitionStrategyMap={off:{on:this.transitionFromStateOffToOn.bind(this),standby:this.transitionFromStateOffToStandby.bind(this)},on:{off:this.transitionFromStateOnToOff.bind(this),standby:this.transitionFromStateOnToStandby.bind(this)},standby:{off:this.transitionFromStateStandbyToOff.bind(this),on:this.transitionFromStateStandbyToOn.bind(this)}};this.cameraManager=e!=null?e:d.instance(),this.updateCanvasVideoImage=this.updateCanvasVideoImage.bind(this),this.captureAndSend=this.captureAndSend.bind(this);}static get default(){let e=new n;return e.position="worldFacing",e}get desiredState(){return this._desiredState}get settings(){return this._settings}get currentResolution(){var e;return (e=this._currentResolution)!=null?e:null}get context(){return this._context}set context(e){this._context=e,this._context&&this.currentState==="on"&&this.startSendingCapturesToWorker();}get currentState(){return this._currentState}static atPosition(e){if(d$1.Camera.availablePositions.includes(e)){let t=new n;return t.position=e,t}return a.warn(`invalid CameraPosition: "${e}"`),null}static fromDeviceCamera(e){let t=n.atPosition(e.position);return t.deviceId=e.deviceId,t.label=e.label,t}async switchToDesiredState(e){var t,i;return this.currentTransitionStrategyPromise&&await this.currentTransitionStrategyPromise,this.currentTransitionStrategyPromise=(i=(t=this.stateTransitionStrategyMap[this.currentState])==null?void 0:t[e])==null?void 0:i.call(t).catch(r=>{if(r instanceof DOMException&&r.message==="The associated Track is in an invalid state"){a.log(a.Level.Warn,r);return}throw r}),this.currentTransitionStrategyPromise}getDesiredTorchState(){return this._desiredTorchState}async setDesiredTorchState(e){this._desiredTorchState=e,await this.cameraManager.setTorchEnabled(this._desiredTorchState==="on"),await this.notifyContext({type:"torchState",newValue:this._desiredTorchState});}async isTorchAvailable(){return this.cameraManager.isTorchAvailable()}addListener(e){e!=null&&(this.listeners.includes(e)||this.listeners.push(e));}removeListener(e){e!=null&&this.listeners.includes(e)&&this.listeners.splice(this.listeners.indexOf(e),1);}async applySettings(e){var i;this._settings=new g$1(e);let t=this.settings.getProperty("grayScaleFrameReader");if(this.cameraManager.setFrameReaderType(t===!0?"GRAYSCALE":"RGBA"),this.currentState==="on"||this.currentState==="standby"){let r=this.cameraManager.activeCameraSettings;(r==null?void 0:r.preferredResolution)!==this.settings.preferredResolution&&(await this.cameraManager.applyCameraSettings(this.settings),(i=this.cameraManager.activeCamera)!=null&&i.currentResolution&&(this._currentResolution={width:this.cameraManager.activeCamera.currentResolution.width,height:this.cameraManager.activeCamera.currentResolution.height})),await this.cameraManager.setZoom(this.settings.zoomFactor);let o=this.settings.getProperty("minFrameRate"),c=this.settings.getProperty("maxFrameRate");(o!=null||c!=null)&&await this.cameraManager.setFrameRate({min:o,max:c});let m=this.settings.getProperty("manualLensPosition");m!=null&&await this.cameraManager.setFocus(m);let u=this.settings.getProperty("exposureTargetBias"),d=this.settings.getProperty("exposureDuration");(u!=null||d!=null)&&await this.cameraManager.setExposure({compensation:u,time:d});}return this.notifyContext({type:"cameraSettings",newValue:this.settings})}toJSONObject(){return {type:this.type,position:this.position,settings:this.settings.toJSONObject(),desiredState:this.desiredState,desiredTorchState:this._desiredTorchState}}getMirrorImageEnabled(){var e;return (e=this._desiredMirrorImageEnabled)!=null?e:this.cameraManager.isMirrorImageEnabled()}async setMirrorImageEnabled(e){this._desiredMirrorImageEnabled=e,this.cameraManager.setMirrorImageEnabled(e,!0),this.context&&await this.context.setFrameSource(this);}getCurrentState(){return this._currentState}async setClipArea(e){await this.cameraManager.setClipArea(e);}async setCurrentState(e){if(e!==this._currentState){this._currentState=e,this.notifyListeners();try{await this.notifyContext({type:"frameSourceState",newValue:e}),e==="on"&&this.startSendingCapturesToWorker();}catch(t){a.warn("Error while notifying context about new state of Camera");}}}async setupCamera(){if(this.cameraManager.setSelectedCameraSettings(this.settings),this.deviceId==="")this.cameraManager.setSelectedCamera(),this.cameraManager.setInitialCameraPosition(this.position);else {let t=(await a$1.getCameras()).find(i=>i.deviceId===this.deviceId);t&&(this.cameraManager.setInitialCameraPosition(t.position),this.cameraManager.setSelectedCamera(t));}await this.cameraManager.setupCameras(),typeof this._desiredMirrorImageEnabled=="boolean"?this.cameraManager.setMirrorImageEnabled(this._desiredMirrorImageEnabled,!0):this.cameraManager.setMirrorImageEnabled(this.cameraManager.isMirrorImageEnabled(),!1),this.context&&await this.context.setFrameSource(this),this.cameraManager.activeCamera&&(this.label=this.cameraManager.activeCamera.label,this.position=this.cameraManager.activeCamera.position,this.deviceId=this.cameraManager.activeCamera.deviceId,this._currentResolution=this.cameraManager.activeCamera.currentResolution);}async notifyContext(e){if(this.context)return this.context.update([e])}notifyListeners(){for(let e of this.listeners)e.didChangeState&&e.didChangeState(this,this.currentState);}updateCanvasVideoImage(){this.currentState==="on"&&this.context&&(this.cameraManager.updateCanvasVideoImage(),this._lastCanvasVideoPreviewAnimationFrame=this.cameraManager.requestVideoFrame(this.updateCanvasVideoImage));}async captureAndSend(){if(this.currentState!=="on"||!this.context)return;if(!this.context.hasEnabledMode()&&!await this.context.hasEnabledNativeMode()){this._lastCaptureRequestAnimationFrame=this.cameraManager.requestVideoFrame(this.captureAndSend);return}let e=null;try{e=this.cameraManager.captureImage();}catch(t){a.log(a.Level.Warn,t.message);}finally{if(e!=null)if(this.cameraManager.synchronousFrameHandling){let t=await this.context.sendFrameToProcessor(e);this.cameraManager.recycle(t.data);}else this.context.sendFrameToProcessor(e).then(t=>(this.cameraManager.recycle(t.data),null)).catch(t=>{a.warn("error while recycling uint8array",t);});this._lastCaptureRequestAnimationFrame=this.cameraManager.requestVideoFrame(this.captureAndSend);}}startSendingCapturesToWorker(){this.stopSendingCapturesToWorker(),this.captureAndSend();}stopSendingCapturesToWorker(){this._lastCanvasVideoPreviewAnimationFrame!=null&&this.cameraManager.cancelVideoFrame(this._lastCanvasVideoPreviewAnimationFrame),this._lastCaptureRequestAnimationFrame!=null&&this.cameraManager.cancelVideoFrame(this._lastCaptureRequestAnimationFrame);}async transitionFromStateOffToOn(){if(!(this.currentState==="on"||this.currentState==="starting"||this.currentState==="wakingUp")){this._desiredState="on",await this.setCurrentState("starting");try{await this.setupCamera(),await this.setCurrentState("on");}catch(e){throw a.log(a.Level.Error,e),await this.setCurrentState("off"),e}}}async transitionFromStateOffToStandby(){if(!(this.currentState==="standby"||this.currentState==="bootingUp"||this.currentState==="goingToSleep")){if(await this.isAndroidWebView()){a.log(a.Level.Warn,'Warning: "Standby" state does not work inside web views. Falling back to state "On".'),await this.transitionFromStateOffToOn();return}this._desiredState="standby",await this.setCurrentState("bootingUp");try{await this.setupCamera(),this.cameraManager.pauseStream(),await this.setCurrentState("standby");}catch(e){throw a.log(a.Level.Error,e),await this.setCurrentState("off"),e}await this.setCurrentState("standby"),await this.setDesiredTorchState("off");}}async transitionFromStateOnToOff(){this.currentState==="off"||this.currentState==="stopping"||(this._desiredState="off",await this.setCurrentState("stopping"),await this.cameraManager.stopStream(),await this.setCurrentState("off"),await this.setDesiredTorchState("off"));}async transitionFromStateOnToStandby(){if(!(this.currentState==="standby"||this.currentState==="bootingUp"||this.currentState==="goingToSleep")){if(await this.isAndroidWebView()){a.log(a.Level.Warn,'Warning: "Standby" state does not work inside web views. Falling back to state "Off".'),await this.transitionFromStateOnToOff();return}this._desiredState="standby",await this.setCurrentState("goingToSleep"),this.cameraManager.pauseStream(),await this.setCurrentState("standby"),await this.setDesiredTorchState("off");}}async transitionFromStateStandbyToOff(){this.currentState==="off"||this.currentState==="stopping"||(this._desiredState="off",await this.setCurrentState("shuttingDown"),await this.cameraManager.stopStream(),await this.setCurrentState("off"),await this.setDesiredTorchState("off"));}async transitionFromStateStandbyToOn(){this.currentState==="on"||this.currentState==="starting"||this.currentState==="wakingUp"||(this._desiredState="on",await this.setCurrentState("wakingUp"),this.cameraManager.resumeStream(),await this.setCurrentState("on"));}async isAndroidWebView(){return this._isAndroidWebView==null&&(this._isAndroidWebView=await a$2.isAndroidWebView()),this._isAndroidWebView}isZoomAvailable(){var e;return ((e=this.cameraManager.mediaTrackCapabilities)==null?void 0:e.zoom)!=null}};export{g as a};
1
+ import {a as a$1}from'./chunk-6LUJAFBV.js';import {d}from'./chunk-AC6MK6LU.js';import {a}from'./chunk-XR65N6EG.js';import {a as a$2}from'./chunk-MU4VAJIM.js';import {g as g$1}from'./chunk-UD3Z45BT.js';import {d as d$1}from'./chunk-E3TDSWVQ.js';var g=class n{constructor(e){this.deviceId="";this.type="camera";this._currentState="off";this._settings=new g$1;this._desiredTorchState="off";this._desiredState="off";this.listeners=[];this._context=null;this.stateTransitionStrategyMap={off:{on:this.transitionFromStateOffToOn.bind(this),standby:this.transitionFromStateOffToStandby.bind(this)},on:{off:this.transitionFromStateOnToOff.bind(this),standby:this.transitionFromStateOnToStandby.bind(this)},standby:{off:this.transitionFromStateStandbyToOff.bind(this),on:this.transitionFromStateStandbyToOn.bind(this)}};this.cameraManager=e!=null?e:d.instance(),this.updateCanvasVideoImage=this.updateCanvasVideoImage.bind(this),this.captureAndSend=this.captureAndSend.bind(this);}static get default(){let e=new n;return e.position="worldFacing",e}get desiredState(){return this._desiredState}get settings(){return this._settings}get currentResolution(){var e;return (e=this._currentResolution)!=null?e:null}get context(){return this._context}set context(e){this._context=e,this._context&&this.currentState==="on"&&this.startSendingCapturesToWorker();}get currentState(){return this._currentState}static atPosition(e){if(d$1.Camera.availablePositions.includes(e)){let t=new n;return t.position=e,t}return a.warn(`invalid CameraPosition: "${e}"`),null}static fromDeviceCamera(e){let t=n.atPosition(e.position);return t.deviceId=e.deviceId,t.label=e.label,t}async switchToDesiredState(e){var t,i;return this.currentTransitionStrategyPromise&&await this.currentTransitionStrategyPromise,this.currentTransitionStrategyPromise=(i=(t=this.stateTransitionStrategyMap[this.currentState])==null?void 0:t[e])==null?void 0:i.call(t).catch(r=>{if(r instanceof DOMException&&r.message==="The associated Track is in an invalid state"){a.log(a.Level.Warn,r);return}throw r}),this.currentTransitionStrategyPromise}getDesiredTorchState(){return this._desiredTorchState}async setDesiredTorchState(e){this._desiredTorchState=e,await this.cameraManager.setTorchEnabled(this._desiredTorchState==="on"),await this.notifyContext({type:"torchState",newValue:this._desiredTorchState});}async isTorchAvailable(){return this.cameraManager.isTorchAvailable()}addListener(e){e!=null&&(this.listeners.includes(e)||this.listeners.push(e));}removeListener(e){e!=null&&this.listeners.includes(e)&&this.listeners.splice(this.listeners.indexOf(e),1);}async applySettings(e){var i;this._settings=new g$1(e);let t=this.settings.getProperty("grayScaleFrameReader");if(this.cameraManager.setFrameReaderType(t===!0?"GRAYSCALE":"RGBA"),this.currentState==="on"||this.currentState==="standby"){let r=this.cameraManager.activeCameraSettings;(r==null?void 0:r.preferredResolution)!==this.settings.preferredResolution&&(await this.cameraManager.applyCameraSettings(this.settings),(i=this.cameraManager.activeCamera)!=null&&i.currentResolution&&(this._currentResolution={width:this.cameraManager.activeCamera.currentResolution.width,height:this.cameraManager.activeCamera.currentResolution.height})),await this.cameraManager.setZoom(this.settings.zoomFactor);let o=this.settings.getProperty("minFrameRate"),c=this.settings.getProperty("maxFrameRate");(o!=null||c!=null)&&await this.cameraManager.setFrameRate({min:o,max:c});let m=this.settings.getProperty("manualLensPosition");m!=null&&await this.cameraManager.setFocus(m);let u=this.settings.getProperty("exposureTargetBias"),d=this.settings.getProperty("exposureDuration");(u!=null||d!=null)&&await this.cameraManager.setExposure({compensation:u,time:d});}return this.notifyContext({type:"cameraSettings",newValue:this.settings})}toJSONObject(){return {type:this.type,position:this.position,settings:this.settings.toJSONObject(),desiredState:this.desiredState,desiredTorchState:this._desiredTorchState}}getMirrorImageEnabled(){var e;return (e=this._desiredMirrorImageEnabled)!=null?e:this.cameraManager.isMirrorImageEnabled()}async setMirrorImageEnabled(e){this._desiredMirrorImageEnabled=e,this.cameraManager.setMirrorImageEnabled(e,!0),this.context&&await this.context.setFrameSource(this);}getCurrentState(){return this._currentState}async setClipArea(e){await this.cameraManager.setClipArea(e);}async setCurrentState(e){if(e!==this._currentState){this._currentState=e,this.notifyListeners();try{await this.notifyContext({type:"frameSourceState",newValue:e}),e==="on"&&this.startSendingCapturesToWorker();}catch(t){a.warn("Error while notifying context about new state of Camera");}}}async setupCamera(){if(this.cameraManager.setSelectedCameraSettings(this.settings),this.deviceId==="")this.cameraManager.setSelectedCamera(),this.cameraManager.setInitialCameraPosition(this.position);else {let t=(await a$1.getCameras()).find(i=>i.deviceId===this.deviceId);t&&(this.cameraManager.setInitialCameraPosition(t.position),this.cameraManager.setSelectedCamera(t));}await this.cameraManager.setupCameras(),typeof this._desiredMirrorImageEnabled=="boolean"?this.cameraManager.setMirrorImageEnabled(this._desiredMirrorImageEnabled,!0):this.cameraManager.setMirrorImageEnabled(this.cameraManager.isMirrorImageEnabled(),!1),this.context&&await this.context.setFrameSource(this),this.cameraManager.activeCamera&&(this.label=this.cameraManager.activeCamera.label,this.position=this.cameraManager.activeCamera.position,this.deviceId=this.cameraManager.activeCamera.deviceId,this._currentResolution=this.cameraManager.activeCamera.currentResolution);}async notifyContext(e){if(this.context)return this.context.update([e])}notifyListeners(){for(let e of this.listeners)e.didChangeState&&e.didChangeState(this,this.currentState);}updateCanvasVideoImage(){this.currentState==="on"&&this.context&&(this.cameraManager.updateCanvasVideoImage(),this._lastCanvasVideoPreviewAnimationFrame=this.cameraManager.requestVideoFrame(this.updateCanvasVideoImage));}async captureAndSend(){if(this.currentState!=="on"||!this.context)return;if(!this.context.hasEnabledMode()&&!await this.context.hasEnabledNativeMode()){this._lastCaptureRequestAnimationFrame=this.cameraManager.requestVideoFrame(this.captureAndSend);return}let e=null;try{e=this.cameraManager.captureImage();}catch(t){a.log(a.Level.Warn,t.message);}finally{if(e!=null)if(this.cameraManager.synchronousFrameHandling){let t=await this.context.sendFrameToProcessor(e);this.cameraManager.recycle(t.data);}else this.context.sendFrameToProcessor(e).then(t=>(this.cameraManager.recycle(t.data),null)).catch(t=>{a.warn("error while recycling uint8array",t);});this._lastCaptureRequestAnimationFrame=this.cameraManager.requestVideoFrame(this.captureAndSend);}}startSendingCapturesToWorker(){this.stopSendingCapturesToWorker(),this.captureAndSend();}stopSendingCapturesToWorker(){this._lastCanvasVideoPreviewAnimationFrame!=null&&this.cameraManager.cancelVideoFrame(this._lastCanvasVideoPreviewAnimationFrame),this._lastCaptureRequestAnimationFrame!=null&&this.cameraManager.cancelVideoFrame(this._lastCaptureRequestAnimationFrame);}async transitionFromStateOffToOn(){if(!(this.currentState==="on"||this.currentState==="starting"||this.currentState==="wakingUp")){this._desiredState="on",await this.setCurrentState("starting");try{await this.setupCamera(),await this.setCurrentState("on");}catch(e){throw a.log(a.Level.Error,e),await this.setCurrentState("off"),e}}}async transitionFromStateOffToStandby(){if(!(this.currentState==="standby"||this.currentState==="bootingUp"||this.currentState==="goingToSleep")){if(await this.isAndroidWebView()){a.log(a.Level.Warn,'Warning: "Standby" state does not work inside web views. Falling back to state "On".'),await this.transitionFromStateOffToOn();return}this._desiredState="standby",await this.setCurrentState("bootingUp");try{await this.setupCamera(),this.cameraManager.pauseStream(),await this.setCurrentState("standby");}catch(e){throw a.log(a.Level.Error,e),await this.setCurrentState("off"),e}await this.setCurrentState("standby"),await this.setDesiredTorchState("off");}}async transitionFromStateOnToOff(){this.currentState==="off"||this.currentState==="stopping"||(this._desiredState="off",await this.setCurrentState("stopping"),await this.cameraManager.stopStream(),await this.setCurrentState("off"),await this.setDesiredTorchState("off"));}async transitionFromStateOnToStandby(){if(!(this.currentState==="standby"||this.currentState==="bootingUp"||this.currentState==="goingToSleep")){if(await this.isAndroidWebView()){a.log(a.Level.Warn,'Warning: "Standby" state does not work inside web views. Falling back to state "Off".'),await this.transitionFromStateOnToOff();return}this._desiredState="standby",await this.setCurrentState("goingToSleep"),this.cameraManager.pauseStream(),await this.setCurrentState("standby"),await this.setDesiredTorchState("off");}}async transitionFromStateStandbyToOff(){this.currentState==="off"||this.currentState==="stopping"||(this._desiredState="off",await this.setCurrentState("shuttingDown"),await this.cameraManager.stopStream(),await this.setCurrentState("off"),await this.setDesiredTorchState("off"));}async transitionFromStateStandbyToOn(){this.currentState==="on"||this.currentState==="starting"||this.currentState==="wakingUp"||(this._desiredState="on",await this.setCurrentState("wakingUp"),this.cameraManager.resumeStream(),await this.setCurrentState("on"));}async isAndroidWebView(){return this._isAndroidWebView==null&&(this._isAndroidWebView=await a$2.isAndroidWebView()),this._isAndroidWebView}isZoomAvailable(){var e;return ((e=this.cameraManager.mediaTrackCapabilities)==null?void 0:e.zoom)!=null}};export{g as a};
@@ -1,4 +1,4 @@
1
- import {a}from'./chunk-DVQH5JLR.js';import {a as a$1}from'./chunk-3A4KLILV.js';import {a as a$2}from'./chunk-U6BTTEV6.js';var e=class e extends a{static create(){return document.createElement(e.tag)}static register(){a$1({[e.tag]:e});}render(){return a$2`
1
+ import {a}from'./chunk-72A5262S.js';import {a as a$1}from'./chunk-3A4KLILV.js';import {a as a$2}from'./chunk-MU6SADSF.js';var e=class e extends a{static create(){return document.createElement(e.tag)}static register(){a$1({[e.tag]:e});}render(){return a$2`
2
2
  <style>
3
3
  ${e.tag} {
4
4
  display: flex;
@@ -0,0 +1 @@
1
+ import {a}from'./chunk-SCTIUP46.js';var t=new a(globalThis,{get:()=>globalThis.Module,set:e=>{globalThis.Module=e;}});function l(e){}export{t as a,l as b};
@@ -0,0 +1 @@
1
+ function o(n,...r){let e=document.createElement("style");return e.innerHTML=n.reduce((c,l,s)=>{var t;let m=(t=r[s])!=null?t:"";return c+l+String(m)},""),e}export{o as a};
@@ -0,0 +1 @@
1
+ function o(n,...t){return n.reduce((e,u,a)=>{var r;let i=(r=t[a])!=null?r:"";return e+u+String(i)},"")}export{o as a};
@@ -0,0 +1 @@
1
+ var e;(o=>{function i(){let r="7.2.1";return r}o.sdkVersion=i;})(e||(e={}));export{e as a};
@@ -1,4 +1,4 @@
1
- import {a as a$5}from'./chunk-6FPW3MIJ.js';import {a as a$6}from'./chunk-7XQ3GHYH.js';import {a as a$1}from'./chunk-EV4OEANA.js';import {a as a$3}from'./chunk-3A4KLILV.js';import {a as a$2}from'./chunk-U6BTTEV6.js';import {a as a$4}from'./chunk-GE4CBD4E.js';var d="scandit-loading-overlay",t=class t extends a$1{constructor(){super();this._progressBar=null;this._label=null;let e=this.attachShadow({mode:"open"});e.innerHTML=a$2`
1
+ import {a as a$5}from'./chunk-EVI6U6CG.js';import {a as a$6}from'./chunk-7XQ3GHYH.js';import {a as a$1}from'./chunk-EV4OEANA.js';import {a as a$3}from'./chunk-3A4KLILV.js';import {a as a$2}from'./chunk-MU6SADSF.js';import {a as a$4}from'./chunk-LSZZVJ6B.js';var d="scandit-loading-overlay",t=class t extends a$1{constructor(){super();this._progressBar=null;this._label=null;let e=this.attachShadow({mode:"open"});e.innerHTML=a$2`
2
2
  <div class="loading-overlay">
3
3
  <label for="scandit-progress" class="message">Loading...</label>
4
4
  <scandit-progress-bar id="scandit-progress" min="0" max="100"></scandit-progress-bar>
@@ -1 +1 @@
1
- import {a}from'./chunk-YS6R5ZYE.js';import {a as a$4}from'./chunk-AIRWHLJH.js';import {a as a$3}from'./chunk-FGO2SSRS.js';import {a as a$1}from'./chunk-QCRFVRSS.js';import {b}from'./chunk-FTD535WI.js';import {a as a$2}from'./chunk-XR65N6EG.js';var h=class{constructor(a$2,e){this.onMessageListener=this.onMessage.bind(this);this.workerSelf=a$2,this.dataCaptureInstance=new a(e,{postMessage:this.postMessage.bind(this),getOffscreenCanvas:this.getOffscreenCanvas.bind(this)}),a$1(a$2)&&this.listenToMessages();}listenToMessages(){this.workerSelf.addEventListener("message",this.onMessageListener),this.workerSelf.addEventListener("error",a=>{a$2.log(a$2.Level.Error,a);}),this.workerSelf.addEventListener("messageerror",a=>{a$2.log(a$2.Level.Error,a);});}postMessage(a,e){this.workerSelf.postMessage(a,e!=null?e:[]);}getOffscreenCanvas(){if(typeof this.workerSelf.OffscreenCanvas=="function")return new this.workerSelf.OffscreenCanvas(32,32)}hasPayload(a){return a$3(a)&&"payload"in a}hasTransferables(a){return a$3(a)&&Array.isArray(a.transferables)}async respondWith(a,e,u){let r=null,t;try{t=u(),t instanceof Promise&&(t=await t);}catch(l){t=void 0,r=a$4(l);}let n={type:"workerTaskId",command:a,id:e,payload:this.hasPayload(t)?t.payload:void 0};r!=null&&(n.error=r),this.postMessage(n,this.hasTransferables(t)?t.transferables:[]);}onMessage(a){switch(a.data.command){case"loadLibrary":{{let{data:e}=a;this.respondWith(e.command,e.id,async()=>this.dataCaptureInstance.loadLibrary({libraryLocation:e.libraryLocation,locationPath:e.locationPath,referredOrigin:e.referredOrigin,writableDataPathOverride:e.writableDataPathOverride,overrideThreadsSupport:e.overrideThreadsSupport,overrideSimdSupport:e.overrideSimdSupport,verifyResponseHash:e.verifyResponseHash,fixedWasmMemory:e.fixedWasmMemory}));}break}case"onTap":{{let{data:e}=a;this.respondWith(e.command,e.id,async()=>{this.dataCaptureInstance.onTap(e.point);});}break}case"hintPresenterV2update":{{let{data:e}=a;this.respondWith(e.command,e.id,async()=>{this.dataCaptureInstance.hintPresenterV2Update();});}break}case"createContext":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.createContext({context:e.context,deviceId:e.deviceId,delayedRegistration:e.delayedRegistration,highEndBlurryRecognition:e.highEndBlurryRecognition,appName:e.appName,parentDomain:e.parentDomain}));}break}case"setFrameSource":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.setFrameSource(e.mirrorAxis,e.isCameraFrameSource));}break}case"processFrame":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.processFrame({data:e.data,width:e.width,height:e.height,colorType:e.colorType}));}break}case"requestFrameData":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.requestFrameData(e.frameId));}break}case"deleteFrameData":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>{this.dataCaptureInstance.deleteFrameData(e.frameId);});}break}case"updateContext":{{let{data:e}=a;this.respondWith(e.command,e.id,async()=>this.dataCaptureInstance.updateContext(e));}break}case"dispose":{this.respondWith(a.data.command,a.data.id,()=>this.dataCaptureInstance.dispose());break}case"flushAnalytics":{this.respondWith(a.data.command,a.data.id,()=>{this.dataCaptureInstance.flushAnalytics();});break}case"reportCameraProperties":{{let{data:e}=a;this.respondWith(e.command,e.id,async()=>this.dataCaptureInstance.reportCameraProperties(e));}break}case"setLogLevel":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>{a$2.setLevel(e.level);});}break}case"extractCentaurusLicense":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.extractCentaurusLicense(e.licenseKey));}break}case"documentVisibility":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>{this.dataCaptureInstance.onDocumentVisibilityChange(e.state);});}break}case"isFeatureSupported":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.isFeatureSupported(e.feature));}break}case"getViewfinderInfo":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.getViewfinderInfo());}break}case"getOpenSourceSoftwareLicenseInfo":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.getOpenSourceSoftwareLicenseInfo());}break}case"addNativeOverlay":this.dataCaptureInstance.addNativeOverlay(a);break;case"removeNativeOverlay":this.dataCaptureInstance.removeNativeOverlay(a);break;default:return b(a.data),!1}return !0}};export{h as a};
1
+ import {a}from'./chunk-TTT735E7.js';import {a as a$4}from'./chunk-AIRWHLJH.js';import {a as a$3}from'./chunk-FGO2SSRS.js';import {a as a$1}from'./chunk-QCRFVRSS.js';import {b}from'./chunk-FTD535WI.js';import {a as a$2}from'./chunk-XR65N6EG.js';var h=class{constructor(a$2,e){this.onMessageListener=this.onMessage.bind(this);this.workerSelf=a$2,this.dataCaptureInstance=new a(e,{postMessage:this.postMessage.bind(this),getOffscreenCanvas:this.getOffscreenCanvas.bind(this)}),a$1(a$2)&&this.listenToMessages();}listenToMessages(){this.workerSelf.addEventListener("message",this.onMessageListener),this.workerSelf.addEventListener("error",a=>{a$2.log(a$2.Level.Error,a);}),this.workerSelf.addEventListener("messageerror",a=>{a$2.log(a$2.Level.Error,a);});}postMessage(a,e){this.workerSelf.postMessage(a,e!=null?e:[]);}getOffscreenCanvas(){if(typeof this.workerSelf.OffscreenCanvas=="function")return new this.workerSelf.OffscreenCanvas(32,32)}hasPayload(a){return a$3(a)&&"payload"in a}hasTransferables(a){return a$3(a)&&Array.isArray(a.transferables)}async respondWith(a,e,u){let r=null,t;try{t=u(),t instanceof Promise&&(t=await t);}catch(l){t=void 0,r=a$4(l);}let n={type:"workerTaskId",command:a,id:e,payload:this.hasPayload(t)?t.payload:void 0};r!=null&&(n.error=r),this.postMessage(n,this.hasTransferables(t)?t.transferables:[]);}onMessage(a){switch(a.data.command){case"loadLibrary":{{let{data:e}=a;this.respondWith(e.command,e.id,async()=>this.dataCaptureInstance.loadLibrary({libraryLocation:e.libraryLocation,locationPath:e.locationPath,referredOrigin:e.referredOrigin,writableDataPathOverride:e.writableDataPathOverride,overrideThreadsSupport:e.overrideThreadsSupport,overrideSimdSupport:e.overrideSimdSupport,verifyResponseHash:e.verifyResponseHash,fixedWasmMemory:e.fixedWasmMemory}));}break}case"onTap":{{let{data:e}=a;this.respondWith(e.command,e.id,async()=>{this.dataCaptureInstance.onTap(e.point);});}break}case"hintPresenterV2update":{{let{data:e}=a;this.respondWith(e.command,e.id,async()=>{this.dataCaptureInstance.hintPresenterV2Update();});}break}case"createContext":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.createContext({context:e.context,deviceId:e.deviceId,delayedRegistration:e.delayedRegistration,highEndBlurryRecognition:e.highEndBlurryRecognition,appName:e.appName,parentDomain:e.parentDomain}));}break}case"setFrameSource":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.setFrameSource(e.mirrorAxis,e.isCameraFrameSource));}break}case"processFrame":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.processFrame({data:e.data,width:e.width,height:e.height,colorType:e.colorType}));}break}case"requestFrameData":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.requestFrameData(e.frameId));}break}case"deleteFrameData":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>{this.dataCaptureInstance.deleteFrameData(e.frameId);});}break}case"updateContext":{{let{data:e}=a;this.respondWith(e.command,e.id,async()=>this.dataCaptureInstance.updateContext(e));}break}case"dispose":{this.respondWith(a.data.command,a.data.id,()=>this.dataCaptureInstance.dispose());break}case"flushAnalytics":{this.respondWith(a.data.command,a.data.id,()=>{this.dataCaptureInstance.flushAnalytics();});break}case"reportCameraProperties":{{let{data:e}=a;this.respondWith(e.command,e.id,async()=>this.dataCaptureInstance.reportCameraProperties(e));}break}case"setLogLevel":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>{a$2.setLevel(e.level);});}break}case"extractCentaurusLicense":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.extractCentaurusLicense(e.licenseKey));}break}case"documentVisibility":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>{this.dataCaptureInstance.onDocumentVisibilityChange(e.state);});}break}case"isFeatureSupported":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.isFeatureSupported(e.feature));}break}case"getViewfinderInfo":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.getViewfinderInfo());}break}case"getOpenSourceSoftwareLicenseInfo":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.getOpenSourceSoftwareLicenseInfo());}break}case"addNativeOverlay":this.dataCaptureInstance.addNativeOverlay(a);break;case"removeNativeOverlay":this.dataCaptureInstance.removeNativeOverlay(a);break;default:return b(a.data),!1}return !0}};export{h as a};
@@ -1 +1 @@
1
- import {a as a$4}from'./chunk-ZE2WH3AH.js';import {a as a$5}from'./chunk-AYWOZOZP.js';import {c as c$1,a as a$6}from'./chunk-CWOHXN5B.js';import {c}from'./chunk-B5JOQVFY.js';import {d}from'./chunk-AIC4H5KG.js';import {a as a$2}from'./chunk-VXPXBTR2.js';import {a as a$1}from'./chunk-O7TZTIHO.js';import {a}from'./chunk-XR65N6EG.js';import {a as a$3}from'./chunk-QCZSSQAQ.js';import {c as c$2,e}from'./chunk-H4TH4342.js';var D=class D{constructor(e,t){this.hintPresenterV2=null;this.MAX_NUMBER_OF_IMAGES_IN_FRAME_DATA_POOL=10;this.redrawInterval=1e3/30;this.redrawRequests=[];this._isDrawLoopRunning=!1;this.frameDataPool=new Map;this.lastFrameCounter=-1;this.poorMansBenchmarkLogs=!1;this.writableDataPathStandard="/scandit_sync_folder";this.resourceFilesSubfolder="resources";this.performanceMetricsReporterTimer=void 0;this.performanceMetrics={frameDataPoolSize:0,processedFramesCount:0,redrawRequestsCount:0,actualRedrawsCount:0};this.gestureListener=null;this.webPlatformHintPresenter=null;this.moduleHandler=e,this.workerFunctions=t,this._loadProgressCallback=this._loadProgressCallback.bind(this),c(this.getWasmMetadata());}get Module(){return this.moduleHandler.get()}set isDrawLoopRunning(e){this._isDrawLoopRunning=e,!e&&typeof this.loopTimeoutId=="number"&&(clearTimeout(this.loopTimeoutId),this.loopTimeoutId=void 0);}get isDrawLoopRunning(){return this._isDrawLoopRunning}convertToLoadableFrameData(e){let t=this.getNextFrameId();this.frameDataPool.set(t,new Uint8ClampedArray(e.getFrameData()));let s=this.lastUsedModuleMirrorAxis==null?!1:this.lastUsedModuleMirrorAxis!==this.Module.Axis.None;return {frameId:t,width:e.getWidth(),height:e.getHeight(),isFrameSourceMirrored:s}}createContext(e){var g,y,f,b,m;let t=this.getModeDeserializers(),s=c$1(location);(s==="localhost"||s==="127.0.0.1")&&navigator.userAgent.includes("Electron")&&e.appName!=null&&(s+=`-${e.appName}`),this.parentDomain=e.parentDomain,this.contextDeserializer=new this.Module.DataCaptureContextDeserializer(this.writableDataPath,e.deviceId,e.context.deviceModelName,s,this.parentDomain,t,e.delayedRegistration,e.highEndBlurryRecognition,this.resourcePath);let a=this.contextDeserializer.contextFromJson(JSON.stringify(e.context));if(a==null){let r=this.contextDeserializer.getLastError();throw new Error(`Could not create the context: ${r}`)}let i=a.getView();this.context=a.getContext(),a.delete();let d=this.Module.DataCaptureContextListener.extend("DataCaptureContextListener",{didChangeStatus:(r,o)=>{this.contextDidChangeStatus(JSON.parse(o.toJson())),r.delete();},didStartObservingContext:r=>{this.didStartObservingContext(),r.delete();},didStopObservingContext:r=>{r.delete();}}),p=this.Module.DataCaptureContextFrameListener.extend("DataCaptureContextFrameListener",{onObservationStarted:r=>{r.delete();},onObservationStopped:r=>{r.delete();},onFrameProcessingStarted:(r,o)=>{this.workerFunctions.postMessage({type:"onFrameProcessingStarted"}),o.delete(),r.delete();},onFrameProcessingFinished:(r,o)=>{this.workerFunctions.postMessage({type:"onFrameProcessingFinished"}),o.delete(),r.delete();},onFrameSkipped:(r,o)=>{this.workerFunctions.postMessage({type:"onFrameSkipped"}),o.delete(),r.delete();}}),h=this.Module.GestureRecognizer.extend("GestureRecognizer",{setGestureListener:(r,o)=>{var M;(M=this.gestureListener)==null||M.delete(),this.gestureListener=r.clone(),r.delete();}});(g=this.gestureRecognizer)==null||g.delete(),this.gestureRecognizer=new h;let u=new d;this.context.addListener(u),u.delete();let c=new p;this.context.addFrameListener(c),c.delete(),this.setView(i),(y=this.view)==null||y.setGestureRecognizer(this.gestureRecognizer);let w=this.Module.PlatformHintPresenter.extend("PlatformHintPresenter",{setHintPresenter:r=>{r.delete();},showToast:r=>{this.workerFunctions.postMessage({type:"showToast",payload:JSON.parse(r)});},hideToast:r=>{this.workerFunctions.postMessage({type:"hideToast",payload:JSON.parse(r)});},showGuidance:r=>{this.workerFunctions.postMessage({type:"showGuidance",payload:JSON.parse(r)});},hideGuidance:r=>{this.workerFunctions.postMessage({type:"hideGuidance",payload:JSON.parse(r)});},startUpdateTimer:r=>{this.workerFunctions.postMessage({type:"startUpdateTimer",payload:{duration:{unit:"ms",value:r}}});},stopUpdateTimer:()=>{this.workerFunctions.postMessage({type:"stopUpdateTimer"});}});(f=this.hintPresenterV2)==null||f.delete(),(b=this.webPlatformHintPresenter)==null||b.delete(),this.webPlatformHintPresenter=new w,this.hintPresenterV2=new this.Module.HintPresenterV2(this.webPlatformHintPresenter),(m=this.view)==null||m.setHintPresenterV2(this.hintPresenterV2);}onTap(e){var t;(t=this.gestureListener)==null||t.onTap(JSON.stringify(e));}hintPresenterV2Update(){var e;(e=this.hintPresenterV2)==null||e.update();}startReportingPerformanceMetrics(){this.performanceMetricsReporterTimer==null&&(this.performanceMetricsReporterTimer=setInterval(()=>{this.reportPerformanceMetrics();for(let e of Object.keys(this.performanceMetrics))this.performanceMetrics[e]=0;},1e3));}async reportPerformanceMetrics(){this.workerFunctions.postMessage({type:"performanceMetricsReport",payload:{...this.performanceMetrics}});}deleteFrameData(e){this.frameDataPool.delete(e);}dispose(){var e,t;this.context.dispose(),this.frameDataPool.clear(),this.isDrawLoopRunning=!1,this.lastFrameCounter=-1,(e=this.gestureRecognizer)==null||e.delete(),this.gestureRecognizer=null,(t=this.gestureListener)==null||t.delete(),this.gestureListener=null;}flushAnalytics(){this.context.flushAnalytics();}extractCentaurusLicense(e){return {payload:{centaurus:{licenseKey:this.Module.LicenseUtils[D.get3dPartyLicenseKeyMethodName](e)}}}}getModeDeserializers(){return new this.Module.VectorDataCaptureModeDeserializer}loadLibrary(e){return this.libraryLoadingPromise!=null?this.libraryLoadingPromise:(this.libraryLoadingPromise=this.setup(e),this.libraryLoadingPromise)}processFrame(e){var i;if(this.context==null)return {payload:e,transferables:[e.data.buffer]};let t=e.data,s=e.colorType==="GRAYSCALE"?this.Module.ImageBufferFormat.Grayscale8:this.Module.ImageBufferFormat.Rgba8888,a=this.Module.allocateUint8Array(t.byteLength);return this.Module.HEAPU8.set(t,a),(i=this.imageFrameSource)==null||i.outputFrame(a,e.width,e.height,s),{payload:e,transferables:[e.data.buffer]}}reportCameraProperties(e){this.context.setCameraProperties(e.deviceId,e.isFrontFacing,e.hasAutofocus);}requestFrameData(e){let t=this.frameDataPool.get(e);return t==null?{payload:{data:null}}:{payload:{data:t},transferables:[t.buffer]}}scheduleRedraw(e,t){this.addRedrawRequest(t),this.isDrawLoopRunning||this.startDrawLoop(e);}sendViewRefreshCommands(e){this.workerFunctions.postMessage({type:"draw",payload:e},[e.buffer]);}setFrameSource(e,t){var s;this.lastUsedModuleMirrorAxis=this.mapMirrorAxisOnModule(e),(s=this.imageFrameSource)==null||s.delete(),this.imageFrameSource=new this.Module.ImageBufferFrameSource(this.lastUsedModuleMirrorAxis,t,0),this.context.setFrameSource(this.imageFrameSource);}startDrawLoop(e){this.isDrawLoopRunning=!0;let t=i=>this.redrawRequests.length>0&&this.redrawRequests[0]<=i,s=i=>{for(;this.redrawRequests.length>0&&this.redrawRequests[0]<=i;)this.redrawRequests.shift();},a=()=>{this.loopTimeoutId=setTimeout(()=>{if(!this.isDrawLoopRunning)return;let i=performance.now();if(t(i)){s(i),e.draw();let d=e.getDrawCommands();this.sendViewRefreshCommands(new Uint8Array(d));}a();},this.redrawInterval);};a();}updateContext(e){if(this.context!=null&&this.contextDeserializer!=null){e.view!=null&&!e.view.visible&&this.context.flushAnalytics();let t=this.onBeforeUpdateContextHook(e),s=this.contextDeserializer.updateContextFromJson(this.context,this.view,JSON.stringify(t.context));if(s==null){let i=this.contextDeserializer.getLastError();throw new Error(`Could not update the context: ${i}`)}this.context.delete(),this.context=s.getContext();let a$1=s.getView();s.delete(),a$1!=null&&t.view!=null&&a$1.setViewSize(t.view.width,t.view.height,t.view.orientation),this.hintPresenterV2!=null&&(a$1==null||a$1.setHintPresenterV2(this.hintPresenterV2)),this.gestureRecognizer!=null&&(a$1==null||a$1.setGestureRecognizer(this.gestureRecognizer)),this.setView(a$1),a.debug("context updated",t);}}onBeforeUpdateContextHook(e){return e}onDocumentVisibilityChange(e){e==="hidden"&&this.context.flushAnalytics();}isFeatureSupported(e){return {payload:{supported:this.context.isFeatureSupported(e)}}}getViewfinderInfo(){var e,t;return {payload:{isDisplayingViewfinder:(t=(e=this.view)==null?void 0:e.isDisplayingViewfinder())!=null?t:!1,rect:JSON.parse(this.view.getViewfinderRect())}}}getOpenSourceSoftwareLicenseInfo(){return {payload:{licenseText:this.Module.OpenSourceSoftwareLicenseInfo.getLicenseText()}}}getNextFrameId(){return this.lastFrameCounter++,this.lastFrameCounter>=this.MAX_NUMBER_OF_IMAGES_IN_FRAME_DATA_POOL&&(this.lastFrameCounter=0),this.lastFrameCounter}getWasmDynamicLibraries(e){return this.getWasmSideModuleFileName()==null?[]:[`${e.replace(/\/[^/]*$/,"/")}${this.getWasmSideModuleFileName()}`]}getWasmCoreExpectedHash(e,t){return t?e?globalThis.SDC_WASM_CORE_MT_SIMD_HASH:globalThis.SDC_WASM_CORE_MT_HASH:e?globalThis.SDC_WASM_CORE_SIMD_HASH:""}getWasmCoreFileName(e,t){return t?e?globalThis.SDC_WASM_CORE_MT_SIMD_FILE_NAME:globalThis.SDC_WASM_CORE_MT_FILE_NAME:e?globalThis.SDC_WASM_CORE_SIMD_FILE_NAME:""}getWasmMetadata(){return globalThis.WASM_METADATA}getWasmSideModuleFileName(){return ""}_loadProgressCallback(e){this.workerFunctions.postMessage({type:"loadLibraryProgress",payload:e});}addRedrawRequest(e){this.redrawRequests.push(Math.round(performance.now())+e),this.redrawRequests.sort((t,s)=>t-s);}contextDidChangeStatus(e){e.code===260?e.message=e.message.replace("domain name",`domain name (${c$1(location)})`):e.code===265&&(e.message=e.message.replace("domain name",`domain name (${this.parentDomain})`)),this.workerFunctions.postMessage({type:"contextDidChangeStatus",payload:e});}didStartObservingContext(){this.workerFunctions.postMessage({type:"didStartObservingContext"});}mapMirrorAxisOnModule(e){switch(e){case"None":return this.Module.Axis.None;case"X":return this.Module.Axis.X;case"Y":return this.Module.Axis.Y;default:return this.Module.Axis.None}}setView(e){this.view=e,this.setViewRefreshHandler(e),e==null&&(this.isDrawLoopRunning=!1,this.sendViewRefreshCommands(new Uint8Array([])));}addNativeOverlay(e){a.warn("addNativeOverlay has not been implemented for this module",e);}removeNativeOverlay(e){a.warn("removeNativeOverlay has not been implemented for this module",e);}setViewRefreshHandler(e){if(e==null||e.isViewRefreshHandlerSet)return;let t=this.Module.NeedsRedrawDelegate.extend("NeedsRedrawDelegate",{setNeedsRedrawIn:this.scheduleRedraw.bind(this,e)}),s=new t;e.setNeedsRedrawDelegate(s),e.isViewRefreshHandlerSet=!0;}setupDataDecoding(){let e=this.moduleHandler.get(),t=e.DataDecoding.extend("DataDecoding",{decode(s,a){try{let i=JSON.parse(a),d=[];for(let p of i){let h=new TextDecoder(p.ianaName,{fatal:!0});d.push(h.decode(s.slice(p.startIndex,p.endIndex)));}return d.join("")}catch(i){return ""}}});e.setDataDecoding(new t);}start(e,t,s){e&&t&&(this.setupDataDecoding(),this.moduleHandler.get().callMain(),this.moduleHandler.get().__emscripten_proxy_main!==void 0||s());}getWritableDataPath(e){return e!=null?(a.debug(`IndexedDB database name override in use to recover from blocked standard database: ${e}`),e):this.writableDataPathStandard}numOfMBToPages(e){return Math.ceil(1024*e*1024/64/1024)}async setup({libraryLocation:e$1,locationPath:t,writableDataPathOverride:s,overrideThreadsSupport:a$7,overrideSimdSupport:i,verifyResponseHash:d$1,referredOrigin:p,fixedWasmMemory:h}){var x;let u=!1,c=!1;this.writableDataPath=this.getWritableDataPath(s),this.resourcePath=`${e$1}${this.resourceFilesSubfolder}/`,globalThis.path=t;let{resolve:w,reject:g,promise:y}=new a$1,f=a$2.sdkVersion();if(f==="")throw new a$3({name:"Invalid library version",message:"Library version is not defined or empty, cannot generate proper path to library files."});let[b,m]=await Promise.all([c$2(),e()]);a$7!=="auto"&&(m=a$7==="on"),i!=="auto"&&(b=i==="on");let r=this.getWasmCoreFileName(b,m),o=d(f,e$1,r),{jsURI:M,wasmURI:P}=o,W={instantiateWasm:(l,N)=>(a$6({importObject:l,wasmURI:P,expectedHash:this.getWasmCoreExpectedHash(b,m),verifyResponseHash:d$1,successCallback:N,progressCallback:this._loadProgressCallback,referredOrigin:p}),{})},C=h===null?null:new WebAssembly.Memory({initial:this.numOfMBToPages(h),maximum:this.numOfMBToPages(300),shared:m});return C!==null&&a.log(a.Level.Debug,"Fixed wasmMemory set",C),this.moduleHandler.set({...C?{wasmMemory:C}:{},mainScriptUrlOrBlob:M,canvas:(x=this.workerFunctions.getOffscreenCanvas())!=null?x:{getContext:()=>null},...W,dynamicLibraries:this.getWasmDynamicLibraries(P),locateFile:l=>e$1+l,noInitialRun:!0,preRun:[async()=>{try{await a$4({writableDataPath:this.writableDataPath});}catch(l){if(l.name==="BlockedIndexedDB"){g(l.toString());return}a.log(a.Level.Debug,"No IndexedDB support, some data will not be persisted:",l);}c=!0,this.start(c,u,w);}],onMainComplete:()=>{if([u,c].includes(!1)){a.log(a.Level.Warn,{runtimeLoaded:u,fileSystemSynced:c},"Both runtimeLoaded and fileSystemSynced should be true when calling onMainComplete"),g("onMainComplete has been called but runtime or file system was not ready.");return}w();},onRuntimeInitialized:()=>{u=!0,this.start(c,u,w);},print:l=>{a.log(a.Level.Info,l);}}),await a$5(M,f)||g(`Couldn't retrieve Scandit Data Capture library at ${M}, did you configure the path for it correctly?`),y}};D.get3dPartyLicenseKeyMethodName=atob("Z2V0QmxpbmtJZExpY2Vuc2VLZXk=");var T=D;export{T as a};
1
+ import {a as a$4}from'./chunk-ZE2WH3AH.js';import {a as a$5}from'./chunk-AYWOZOZP.js';import {c as c$1,a as a$6}from'./chunk-CWOHXN5B.js';import {c}from'./chunk-B5JOQVFY.js';import {d}from'./chunk-AIC4H5KG.js';import {a as a$2}from'./chunk-MWPSUUFY.js';import {a as a$1}from'./chunk-O7TZTIHO.js';import {a}from'./chunk-XR65N6EG.js';import {a as a$3}from'./chunk-QCZSSQAQ.js';import {c as c$2,e}from'./chunk-H4TH4342.js';var D=class D{constructor(e,t){this.hintPresenterV2=null;this.MAX_NUMBER_OF_IMAGES_IN_FRAME_DATA_POOL=10;this.redrawInterval=1e3/30;this.redrawRequests=[];this._isDrawLoopRunning=!1;this.frameDataPool=new Map;this.lastFrameCounter=-1;this.poorMansBenchmarkLogs=!1;this.writableDataPathStandard="/scandit_sync_folder";this.resourceFilesSubfolder="resources";this.performanceMetricsReporterTimer=void 0;this.performanceMetrics={frameDataPoolSize:0,processedFramesCount:0,redrawRequestsCount:0,actualRedrawsCount:0};this.gestureListener=null;this.webPlatformHintPresenter=null;this.moduleHandler=e,this.workerFunctions=t,this._loadProgressCallback=this._loadProgressCallback.bind(this),c(this.getWasmMetadata());}get Module(){return this.moduleHandler.get()}set isDrawLoopRunning(e){this._isDrawLoopRunning=e,!e&&typeof this.loopTimeoutId=="number"&&(clearTimeout(this.loopTimeoutId),this.loopTimeoutId=void 0);}get isDrawLoopRunning(){return this._isDrawLoopRunning}convertToLoadableFrameData(e){let t=this.getNextFrameId();this.frameDataPool.set(t,new Uint8ClampedArray(e.getFrameData()));let s=this.lastUsedModuleMirrorAxis==null?!1:this.lastUsedModuleMirrorAxis!==this.Module.Axis.None;return {frameId:t,width:e.getWidth(),height:e.getHeight(),isFrameSourceMirrored:s}}createContext(e){var g,y,f,b,m;let t=this.getModeDeserializers(),s=c$1(location);(s==="localhost"||s==="127.0.0.1")&&navigator.userAgent.includes("Electron")&&e.appName!=null&&(s+=`-${e.appName}`),this.parentDomain=e.parentDomain,this.contextDeserializer=new this.Module.DataCaptureContextDeserializer(this.writableDataPath,e.deviceId,e.context.deviceModelName,s,this.parentDomain,t,e.delayedRegistration,e.highEndBlurryRecognition,this.resourcePath);let a=this.contextDeserializer.contextFromJson(JSON.stringify(e.context));if(a==null){let r=this.contextDeserializer.getLastError();throw new Error(`Could not create the context: ${r}`)}let i=a.getView();this.context=a.getContext(),a.delete();let d=this.Module.DataCaptureContextListener.extend("DataCaptureContextListener",{didChangeStatus:(r,o)=>{this.contextDidChangeStatus(JSON.parse(o.toJson())),r.delete();},didStartObservingContext:r=>{this.didStartObservingContext(),r.delete();},didStopObservingContext:r=>{r.delete();}}),p=this.Module.DataCaptureContextFrameListener.extend("DataCaptureContextFrameListener",{onObservationStarted:r=>{r.delete();},onObservationStopped:r=>{r.delete();},onFrameProcessingStarted:(r,o)=>{this.workerFunctions.postMessage({type:"onFrameProcessingStarted"}),o.delete(),r.delete();},onFrameProcessingFinished:(r,o)=>{this.workerFunctions.postMessage({type:"onFrameProcessingFinished"}),o.delete(),r.delete();},onFrameSkipped:(r,o)=>{this.workerFunctions.postMessage({type:"onFrameSkipped"}),o.delete(),r.delete();}}),h=this.Module.GestureRecognizer.extend("GestureRecognizer",{setGestureListener:(r,o)=>{var M;(M=this.gestureListener)==null||M.delete(),this.gestureListener=r.clone(),r.delete();}});(g=this.gestureRecognizer)==null||g.delete(),this.gestureRecognizer=new h;let u=new d;this.context.addListener(u),u.delete();let c=new p;this.context.addFrameListener(c),c.delete(),this.setView(i),(y=this.view)==null||y.setGestureRecognizer(this.gestureRecognizer);let w=this.Module.PlatformHintPresenter.extend("PlatformHintPresenter",{setHintPresenter:r=>{r.delete();},showToast:r=>{this.workerFunctions.postMessage({type:"showToast",payload:JSON.parse(r)});},hideToast:r=>{this.workerFunctions.postMessage({type:"hideToast",payload:JSON.parse(r)});},showGuidance:r=>{this.workerFunctions.postMessage({type:"showGuidance",payload:JSON.parse(r)});},hideGuidance:r=>{this.workerFunctions.postMessage({type:"hideGuidance",payload:JSON.parse(r)});},startUpdateTimer:r=>{this.workerFunctions.postMessage({type:"startUpdateTimer",payload:{duration:{unit:"ms",value:r}}});},stopUpdateTimer:()=>{this.workerFunctions.postMessage({type:"stopUpdateTimer"});}});(f=this.hintPresenterV2)==null||f.delete(),(b=this.webPlatformHintPresenter)==null||b.delete(),this.webPlatformHintPresenter=new w,this.hintPresenterV2=new this.Module.HintPresenterV2(this.webPlatformHintPresenter),(m=this.view)==null||m.setHintPresenterV2(this.hintPresenterV2);}onTap(e){var t;(t=this.gestureListener)==null||t.onTap(JSON.stringify(e));}hintPresenterV2Update(){var e;(e=this.hintPresenterV2)==null||e.update();}startReportingPerformanceMetrics(){this.performanceMetricsReporterTimer==null&&(this.performanceMetricsReporterTimer=setInterval(()=>{this.reportPerformanceMetrics();for(let e of Object.keys(this.performanceMetrics))this.performanceMetrics[e]=0;},1e3));}async reportPerformanceMetrics(){this.workerFunctions.postMessage({type:"performanceMetricsReport",payload:{...this.performanceMetrics}});}deleteFrameData(e){this.frameDataPool.delete(e);}dispose(){var e,t;this.context.dispose(),this.frameDataPool.clear(),this.isDrawLoopRunning=!1,this.lastFrameCounter=-1,(e=this.gestureRecognizer)==null||e.delete(),this.gestureRecognizer=null,(t=this.gestureListener)==null||t.delete(),this.gestureListener=null;}flushAnalytics(){this.context.flushAnalytics();}extractCentaurusLicense(e){return {payload:{centaurus:{licenseKey:this.Module.LicenseUtils[D.get3dPartyLicenseKeyMethodName](e)}}}}getModeDeserializers(){return new this.Module.VectorDataCaptureModeDeserializer}loadLibrary(e){return this.libraryLoadingPromise!=null?this.libraryLoadingPromise:(this.libraryLoadingPromise=this.setup(e),this.libraryLoadingPromise)}processFrame(e){var i;if(this.context==null)return {payload:e,transferables:[e.data.buffer]};let t=e.data,s=e.colorType==="GRAYSCALE"?this.Module.ImageBufferFormat.Grayscale8:this.Module.ImageBufferFormat.Rgba8888,a=this.Module.allocateUint8Array(t.byteLength);return this.Module.HEAPU8.set(t,a),(i=this.imageFrameSource)==null||i.outputFrame(a,e.width,e.height,s),{payload:e,transferables:[e.data.buffer]}}reportCameraProperties(e){this.context.setCameraProperties(e.deviceId,e.isFrontFacing,e.hasAutofocus);}requestFrameData(e){let t=this.frameDataPool.get(e);return t==null?{payload:{data:null}}:{payload:{data:t},transferables:[t.buffer]}}scheduleRedraw(e,t){this.addRedrawRequest(t),this.isDrawLoopRunning||this.startDrawLoop(e);}sendViewRefreshCommands(e){this.workerFunctions.postMessage({type:"draw",payload:e},[e.buffer]);}setFrameSource(e,t){var s;this.lastUsedModuleMirrorAxis=this.mapMirrorAxisOnModule(e),(s=this.imageFrameSource)==null||s.delete(),this.imageFrameSource=new this.Module.ImageBufferFrameSource(this.lastUsedModuleMirrorAxis,t,0),this.context.setFrameSource(this.imageFrameSource);}startDrawLoop(e){this.isDrawLoopRunning=!0;let t=i=>this.redrawRequests.length>0&&this.redrawRequests[0]<=i,s=i=>{for(;this.redrawRequests.length>0&&this.redrawRequests[0]<=i;)this.redrawRequests.shift();},a=()=>{this.loopTimeoutId=setTimeout(()=>{if(!this.isDrawLoopRunning)return;let i=performance.now();if(t(i)){s(i),e.draw();let d=e.getDrawCommands();this.sendViewRefreshCommands(new Uint8Array(d));}a();},this.redrawInterval);};a();}updateContext(e){if(this.context!=null&&this.contextDeserializer!=null){e.view!=null&&!e.view.visible&&this.context.flushAnalytics();let t=this.onBeforeUpdateContextHook(e),s=this.contextDeserializer.updateContextFromJson(this.context,this.view,JSON.stringify(t.context));if(s==null){let i=this.contextDeserializer.getLastError();throw new Error(`Could not update the context: ${i}`)}this.context.delete(),this.context=s.getContext();let a$1=s.getView();s.delete(),a$1!=null&&t.view!=null&&a$1.setViewSize(t.view.width,t.view.height,t.view.orientation),this.hintPresenterV2!=null&&(a$1==null||a$1.setHintPresenterV2(this.hintPresenterV2)),this.gestureRecognizer!=null&&(a$1==null||a$1.setGestureRecognizer(this.gestureRecognizer)),this.setView(a$1),a.debug("context updated",t);}}onBeforeUpdateContextHook(e){return e}onDocumentVisibilityChange(e){e==="hidden"&&this.context.flushAnalytics();}isFeatureSupported(e){return {payload:{supported:this.context.isFeatureSupported(e)}}}getViewfinderInfo(){var e,t;return {payload:{isDisplayingViewfinder:(t=(e=this.view)==null?void 0:e.isDisplayingViewfinder())!=null?t:!1,rect:JSON.parse(this.view.getViewfinderRect())}}}getOpenSourceSoftwareLicenseInfo(){return {payload:{licenseText:this.Module.OpenSourceSoftwareLicenseInfo.getLicenseText()}}}getNextFrameId(){return this.lastFrameCounter++,this.lastFrameCounter>=this.MAX_NUMBER_OF_IMAGES_IN_FRAME_DATA_POOL&&(this.lastFrameCounter=0),this.lastFrameCounter}getWasmDynamicLibraries(e){return this.getWasmSideModuleFileName()==null?[]:[`${e.replace(/\/[^/]*$/,"/")}${this.getWasmSideModuleFileName()}`]}getWasmCoreExpectedHash(e,t){return t?e?globalThis.SDC_WASM_CORE_MT_SIMD_HASH:globalThis.SDC_WASM_CORE_MT_HASH:e?globalThis.SDC_WASM_CORE_SIMD_HASH:""}getWasmCoreFileName(e,t){return t?e?globalThis.SDC_WASM_CORE_MT_SIMD_FILE_NAME:globalThis.SDC_WASM_CORE_MT_FILE_NAME:e?globalThis.SDC_WASM_CORE_SIMD_FILE_NAME:""}getWasmMetadata(){return globalThis.WASM_METADATA}getWasmSideModuleFileName(){return ""}_loadProgressCallback(e){this.workerFunctions.postMessage({type:"loadLibraryProgress",payload:e});}addRedrawRequest(e){this.redrawRequests.push(Math.round(performance.now())+e),this.redrawRequests.sort((t,s)=>t-s);}contextDidChangeStatus(e){e.code===260?e.message=e.message.replace("domain name",`domain name (${c$1(location)})`):e.code===265&&(e.message=e.message.replace("domain name",`domain name (${this.parentDomain})`)),this.workerFunctions.postMessage({type:"contextDidChangeStatus",payload:e});}didStartObservingContext(){this.workerFunctions.postMessage({type:"didStartObservingContext"});}mapMirrorAxisOnModule(e){switch(e){case"None":return this.Module.Axis.None;case"X":return this.Module.Axis.X;case"Y":return this.Module.Axis.Y;default:return this.Module.Axis.None}}setView(e){this.view=e,this.setViewRefreshHandler(e),e==null&&(this.isDrawLoopRunning=!1,this.sendViewRefreshCommands(new Uint8Array([])));}addNativeOverlay(e){a.warn("addNativeOverlay has not been implemented for this module",e);}removeNativeOverlay(e){a.warn("removeNativeOverlay has not been implemented for this module",e);}setViewRefreshHandler(e){if(e==null||e.isViewRefreshHandlerSet)return;let t=this.Module.NeedsRedrawDelegate.extend("NeedsRedrawDelegate",{setNeedsRedrawIn:this.scheduleRedraw.bind(this,e)}),s=new t;e.setNeedsRedrawDelegate(s),e.isViewRefreshHandlerSet=!0;}setupDataDecoding(){let e=this.moduleHandler.get(),t=e.DataDecoding.extend("DataDecoding",{decode(s,a){try{let i=JSON.parse(a),d=[];for(let p of i){let h=new TextDecoder(p.ianaName,{fatal:!0});d.push(h.decode(s.slice(p.startIndex,p.endIndex)));}return d.join("")}catch(i){return ""}}});e.setDataDecoding(new t);}start(e,t,s){e&&t&&(this.setupDataDecoding(),this.moduleHandler.get().callMain(),this.moduleHandler.get().__emscripten_proxy_main!==void 0||s());}getWritableDataPath(e){return e!=null?(a.debug(`IndexedDB database name override in use to recover from blocked standard database: ${e}`),e):this.writableDataPathStandard}numOfMBToPages(e){return Math.ceil(1024*e*1024/64/1024)}async setup({libraryLocation:e$1,locationPath:t,writableDataPathOverride:s,overrideThreadsSupport:a$7,overrideSimdSupport:i,verifyResponseHash:d$1,referredOrigin:p,fixedWasmMemory:h}){var x;let u=!1,c=!1;this.writableDataPath=this.getWritableDataPath(s),this.resourcePath=`${e$1}${this.resourceFilesSubfolder}/`,globalThis.path=t;let{resolve:w,reject:g,promise:y}=new a$1,f=a$2.sdkVersion();if(f==="")throw new a$3({name:"Invalid library version",message:"Library version is not defined or empty, cannot generate proper path to library files."});let[b,m]=await Promise.all([c$2(),e()]);a$7!=="auto"&&(m=a$7==="on"),i!=="auto"&&(b=i==="on");let r=this.getWasmCoreFileName(b,m),o=d(f,e$1,r),{jsURI:M,wasmURI:P}=o,W={instantiateWasm:(l,N)=>(a$6({importObject:l,wasmURI:P,expectedHash:this.getWasmCoreExpectedHash(b,m),verifyResponseHash:d$1,successCallback:N,progressCallback:this._loadProgressCallback,referredOrigin:p}),{})},C=h===null?null:new WebAssembly.Memory({initial:this.numOfMBToPages(h),maximum:this.numOfMBToPages(300),shared:m});return C!==null&&a.log(a.Level.Debug,"Fixed wasmMemory set",C),this.moduleHandler.set({...C?{wasmMemory:C}:{},mainScriptUrlOrBlob:M,canvas:(x=this.workerFunctions.getOffscreenCanvas())!=null?x:{getContext:()=>null},...W,dynamicLibraries:this.getWasmDynamicLibraries(P),locateFile:l=>e$1+l,noInitialRun:!0,preRun:[async()=>{try{await a$4({writableDataPath:this.writableDataPath});}catch(l){if(l.name==="BlockedIndexedDB"){g(l.toString());return}a.log(a.Level.Debug,"No IndexedDB support, some data will not be persisted:",l);}c=!0,this.start(c,u,w);}],onMainComplete:()=>{if([u,c].includes(!1)){a.log(a.Level.Warn,{runtimeLoaded:u,fileSystemSynced:c},"Both runtimeLoaded and fileSystemSynced should be true when calling onMainComplete"),g("onMainComplete has been called but runtime or file system was not ready.");return}w();},onRuntimeInitialized:()=>{u=!0,this.start(c,u,w);},print:l=>{a.log(a.Level.Info,l);}}),await a$5(M,f)||g(`Couldn't retrieve Scandit Data Capture library at ${M}, did you configure the path for it correctly?`),y}};D.get3dPartyLicenseKeyMethodName=atob("Z2V0QmxpbmtJZExpY2Vuc2VLZXk=");var T=D;export{T as a};
@@ -1 +1 @@
1
- import {a as a$1}from'./chunk-GSJH2EXJ.js';import {a}from'./chunk-DCVQRKUG.js';var o=class r{constructor(i,e){this._vibration=null;this._sound=null;this._vibration=i,this._sound=e;}static get defaultFeedback(){return new r(a.defaultVibration,a$1.defaultSound)}get vibration(){return this._vibration}get sound(){return this._sound}emit(){this.sound&&this.sound.play(),this.vibration&&this.vibration.vibrate();}toJSONObject(){let i={};return this.sound!==null&&(i.sound=this.sound.toJSONObject()),this.vibration!==null&&(i.vibration=this.vibration.toJSONObject()),i}};export{o as a};
1
+ import {a as a$1}from'./chunk-6X73W3EO.js';import {a}from'./chunk-DCVQRKUG.js';var o=class r{constructor(i,e){this._vibration=null;this._sound=null;this._vibration=i,this._sound=e;}static get defaultFeedback(){return new r(a.defaultVibration,a$1.defaultSound)}get vibration(){return this._vibration}get sound(){return this._sound}emit(){this.sound&&this.sound.play(),this.vibration&&this.vibration.vibrate();}toJSONObject(){let i={};return this.sound!==null&&(i.sound=this.sound.toJSONObject()),this.vibration!==null&&(i.vibration=this.vibration.toJSONObject()),i}};export{o as a};
@@ -1,4 +1,4 @@
1
- import {a}from'./chunk-DVQH5JLR.js';import {a as a$1}from'./chunk-3A4KLILV.js';import {a as a$2}from'./chunk-U6BTTEV6.js';var e=class e extends a{static create(){return document.createElement(e.tag)}static register(){a$1({[e.tag]:e});}render(){return a$2`
1
+ import {a}from'./chunk-72A5262S.js';import {a as a$1}from'./chunk-3A4KLILV.js';import {a as a$2}from'./chunk-MU6SADSF.js';var e=class e extends a{static create(){return document.createElement(e.tag)}static register(){a$1({[e.tag]:e});}render(){return a$2`
2
2
  <style>
3
3
  ${e.tag} {
4
4
  display: flex;
@@ -1 +1 @@
1
- import {b}from'./chunk-3OBWS6CO.js';import {n}from'./chunk-77BBIAZE.js';var h=(r=>(r.ChevronRight="chevronRight",r.ChevronLeft="chevronLeft",r.ChevronDown="chevronDown",r.ChevronUp="chevronUp",r.ArrowUp="arrowUp",r.ArrowRight="arrowRight",r.ArrowDown="arrowDown",r.ArrowLeft="arrowLeft",r.Checkmark="checkMark",r.XMark="xMark",r.QuestionMark="questionMark",r.ExclamationMark="exclamationMark",r.LowStock="lowStock",r.ExpiredItem="expiredItem",r.ToPick="toPick",r.InspectItem="inspectItem",r.WrongItem="wrongItem",r.FragileItem="fragileItem",r.StarOutlined="starOutlined",r.StarFilled="starFilled",r.StarHalfFilled="starHalfFilled",r.Print="print",r.CameraSwitch="cameraSwitch",r.DotFiveX="dotFiveX",r.OneX="oneX",r.TwoX="twoX",r))(h||{}),l={arrowDown:import('../private/ui/atoms/ArrowDownSvgIcon.js').then(o=>o.ArrowDownSvgIcon),arrowLeft:import('../private/ui/atoms/ArrowLeftSvgIcon.js').then(o=>o.ArrowLeftSvgIcon),arrowRight:import('../private/ui/atoms/ArrowRightSvgIcon.js').then(o=>o.ArrowRightSvgIcon),arrowUp:import('../private/ui/atoms/ArrowUpSvgIcon.js').then(o=>o.ArrowUpSvgIcon),chevronRight:import('../private/ui/atoms/ChevronRightSvgIcon.js').then(o=>o.ChevronRightSvgIcon),chevronLeft:import('../private/ui/atoms/ChevronLeftSvgIcon.js').then(o=>o.ChevronLeftSvgIcon),chevronDown:import('../private/ui/atoms/ChevronDownSvgIcon.js').then(o=>o.ChevronDownSvgIcon),chevronUp:import('../private/ui/atoms/ChevronUpSvgIcon.js').then(o=>o.ChevronUpSvgIcon),toPick:import('../private/ui/atoms/ToPickSvgIcon.js').then(o=>o.ToPickSvgIcon),xMark:import('../private/ui/atoms/CrossSvgIcon.js').then(o=>o.CrossSvgIcon),checkMark:import('../private/ui/atoms/CheckSvgIcon.js').then(o=>o.CheckSvgIcon),questionMark:import('../private/ui/atoms/QuestionMarkSvgIcon.js').then(o=>o.QuestionMarkSvgIcon),exclamationMark:import('../private/ui/atoms/ExclamationMarkSvgIcon.js').then(o=>o.ExclamationMarkSvgIcon),lowStock:import('../private/ui/atoms/LowStockSvgIcon.js').then(o=>o.LowStockSvgIcon),inspectItem:import('../private/ui/atoms/HandLensCheckSvgIcon.js').then(o=>o.HandLensCheckSvgIcon),expiredItem:import('../private/ui/atoms/CalendarExclamationMarkSvgIcon.js').then(o=>o.CalendarExclamationMarkSvgIcon),wrongItem:import('../private/ui/atoms/WrongItemSvgIcon.js').then(o=>o.WrongItemSvgIcon),fragileItem:import('../private/ui/atoms/GlassSvgIcon.js').then(o=>o.GlassSvgIcon),starOutlined:import('../private/ui/atoms/StarOutlinedSvgIcon.js').then(o=>o.StarOutlinedSvgIcon),starFilled:import('../private/ui/atoms/StarFilledSvgIcon.js').then(o=>o.StarFilledSvgIcon),starHalfFilled:import('../private/ui/atoms/StarHalfFilledSvgIcon.js').then(o=>o.StarHalfFilledSvgIcon),print:import('../private/ui/atoms/PrinterSvgIcon.js').then(o=>o.PrinterSvgIcon),cameraSwitch:import('../private/ui/atoms/CameraSwitchSvgIcon.js').then(o=>o.CameraSwitchSvgIcon),oneX:import('../private/ui/atoms/OnexSvgIcon.js').then(o=>o.OnexSvgIcon),twoX:import('../private/ui/atoms/TwoxSvgIcon.js').then(o=>o.TwoxSvgIcon),dotFiveX:import('../private/ui/atoms/Dot5xSvgIcon.js').then(o=>o.Dot5xSvgIcon)},a=class{constructor(){this.iconName=null;this.backgroundShape=null;this.iconColor=n.fromHex("#fff");this.backgroundStrokeWidth=0;this.width=32;this.height=32;this.iconSize=null;}withIcon(t){return this.iconName=t,this}withBackgroundShape(t){return this.backgroundShape=t,this}withIconColor(t){return this.iconColor=t,this}withBackgroundColor(t){return this.backgroundColor=t,this}withBackgroundStrokeColor(t){return this.backgroundStrokeColor=t,this}withBackgroundStrokeWidth(t){return this.backgroundStrokeWidth=t,this}async build(){let t=b.create();t.backgroundStrokeWidth=this.backgroundStrokeWidth,t.backgroundShape=this.backgroundShape,this.backgroundColor!=null&&(t.backgroundColor=this.backgroundColor),this.backgroundStrokeColor!=null&&(t.backgroundStrokeColor=this.backgroundStrokeColor);let n=null;if(this.iconName!=null){let i=await l[this.iconName];i.register(),n=i.create(),t.append(n);}return t.width=this.width,t.height=this.height,t.iconColor=this.iconColor,n!=null&&this.iconSize!=null&&(n.size=this.iconSize),t}withWidth(t){return this.width=t,this}withHeight(t){return this.height=t,this}withIconSize(t){return this.iconSize=t,this}};export{h as a,l as b,a as c};
1
+ import {b}from'./chunk-6HPS3VUF.js';import {n}from'./chunk-77BBIAZE.js';var h=(r=>(r.ChevronRight="chevronRight",r.ChevronLeft="chevronLeft",r.ChevronDown="chevronDown",r.ChevronUp="chevronUp",r.ArrowUp="arrowUp",r.ArrowRight="arrowRight",r.ArrowDown="arrowDown",r.ArrowLeft="arrowLeft",r.Checkmark="checkMark",r.XMark="xMark",r.QuestionMark="questionMark",r.ExclamationMark="exclamationMark",r.LowStock="lowStock",r.ExpiredItem="expiredItem",r.ToPick="toPick",r.InspectItem="inspectItem",r.WrongItem="wrongItem",r.FragileItem="fragileItem",r.StarOutlined="starOutlined",r.StarFilled="starFilled",r.StarHalfFilled="starHalfFilled",r.Print="print",r.CameraSwitch="cameraSwitch",r.DotFiveX="dotFiveX",r.OneX="oneX",r.TwoX="twoX",r))(h||{}),l={arrowDown:import('../private/ui/atoms/ArrowDownSvgIcon.js').then(o=>o.ArrowDownSvgIcon),arrowLeft:import('../private/ui/atoms/ArrowLeftSvgIcon.js').then(o=>o.ArrowLeftSvgIcon),arrowRight:import('../private/ui/atoms/ArrowRightSvgIcon.js').then(o=>o.ArrowRightSvgIcon),arrowUp:import('../private/ui/atoms/ArrowUpSvgIcon.js').then(o=>o.ArrowUpSvgIcon),chevronRight:import('../private/ui/atoms/ChevronRightSvgIcon.js').then(o=>o.ChevronRightSvgIcon),chevronLeft:import('../private/ui/atoms/ChevronLeftSvgIcon.js').then(o=>o.ChevronLeftSvgIcon),chevronDown:import('../private/ui/atoms/ChevronDownSvgIcon.js').then(o=>o.ChevronDownSvgIcon),chevronUp:import('../private/ui/atoms/ChevronUpSvgIcon.js').then(o=>o.ChevronUpSvgIcon),toPick:import('../private/ui/atoms/ToPickSvgIcon.js').then(o=>o.ToPickSvgIcon),xMark:import('../private/ui/atoms/CrossSvgIcon.js').then(o=>o.CrossSvgIcon),checkMark:import('../private/ui/atoms/CheckSvgIcon.js').then(o=>o.CheckSvgIcon),questionMark:import('../private/ui/atoms/QuestionMarkSvgIcon.js').then(o=>o.QuestionMarkSvgIcon),exclamationMark:import('../private/ui/atoms/ExclamationMarkSvgIcon.js').then(o=>o.ExclamationMarkSvgIcon),lowStock:import('../private/ui/atoms/LowStockSvgIcon.js').then(o=>o.LowStockSvgIcon),inspectItem:import('../private/ui/atoms/HandLensCheckSvgIcon.js').then(o=>o.HandLensCheckSvgIcon),expiredItem:import('../private/ui/atoms/CalendarExclamationMarkSvgIcon.js').then(o=>o.CalendarExclamationMarkSvgIcon),wrongItem:import('../private/ui/atoms/WrongItemSvgIcon.js').then(o=>o.WrongItemSvgIcon),fragileItem:import('../private/ui/atoms/GlassSvgIcon.js').then(o=>o.GlassSvgIcon),starOutlined:import('../private/ui/atoms/StarOutlinedSvgIcon.js').then(o=>o.StarOutlinedSvgIcon),starFilled:import('../private/ui/atoms/StarFilledSvgIcon.js').then(o=>o.StarFilledSvgIcon),starHalfFilled:import('../private/ui/atoms/StarHalfFilledSvgIcon.js').then(o=>o.StarHalfFilledSvgIcon),print:import('../private/ui/atoms/PrinterSvgIcon.js').then(o=>o.PrinterSvgIcon),cameraSwitch:import('../private/ui/atoms/CameraSwitchSvgIcon.js').then(o=>o.CameraSwitchSvgIcon),oneX:import('../private/ui/atoms/OnexSvgIcon.js').then(o=>o.OnexSvgIcon),twoX:import('../private/ui/atoms/TwoxSvgIcon.js').then(o=>o.TwoxSvgIcon),dotFiveX:import('../private/ui/atoms/Dot5xSvgIcon.js').then(o=>o.Dot5xSvgIcon)},a=class{constructor(){this.iconName=null;this.backgroundShape=null;this.iconColor=n.fromHex("#fff");this.backgroundStrokeWidth=0;this.width=32;this.height=32;this.iconSize=null;}withIcon(t){return this.iconName=t,this}withBackgroundShape(t){return this.backgroundShape=t,this}withIconColor(t){return this.iconColor=t,this}withBackgroundColor(t){return this.backgroundColor=t,this}withBackgroundStrokeColor(t){return this.backgroundStrokeColor=t,this}withBackgroundStrokeWidth(t){return this.backgroundStrokeWidth=t,this}async build(){let t=b.create();t.backgroundStrokeWidth=this.backgroundStrokeWidth,t.backgroundShape=this.backgroundShape,this.backgroundColor!=null&&(t.backgroundColor=this.backgroundColor),this.backgroundStrokeColor!=null&&(t.backgroundStrokeColor=this.backgroundStrokeColor);let n=null;if(this.iconName!=null){let i=await l[this.iconName];i.register(),n=i.create(),t.append(n);}return t.width=this.width,t.height=this.height,t.iconColor=this.iconColor,n!=null&&this.iconSize!=null&&(n.size=this.iconSize),t}withWidth(t){return this.width=t,this}withHeight(t){return this.height=t,this}withIconSize(t){return this.iconSize=t,this}};export{h as a,l as b,a as c};
@@ -1 +1 @@
1
- import {a as a$1}from'./chunk-LY6NJOQH.js';import {d as d$1}from'./chunk-BIGR7VVJ.js';import {a}from'./chunk-XR65N6EG.js';import {a as a$2}from'./chunk-MU4VAJIM.js';import {f as f$1,g as g$1}from'./chunk-UD3Z45BT.js';var S=(t=>(t.Idle="idle",t.Pressed="pressed",t))(S||{}),d=class{constructor(e,t){this.state="idle";this.isHover=!1;this.control=e,this.domHost=t,this.onTouchStartListener=this.onTouchStart.bind(this),this.onMouseEnterListener=this.onMouseEnter.bind(this),this.onMouseLeaveListener=this.onMouseLeave.bind(this),this.onClickListener=this.onClick.bind(this),this.setup();}get frameSource(){var e,t;return (t=(e=this.control.view)==null?void 0:e.getContext())==null?void 0:t.frameSource}get context(){var e;return (e=this.control.view)==null?void 0:e.getContext()}async install(){this.button||this.setup();let e=await this.canShow();return e?(this.updateButtonBackground(this.button,this.getImageFromState()),this.show()):this.hide(),e}remove(e=!1){e&&this.button?(this.button.removeEventListener("mouseenter",this.onMouseEnterListener),this.button.removeEventListener("mouseleave",this.onMouseLeaveListener),this.button.removeEventListener("touchstart",this.onTouchStartListener),this.button.removeEventListener("click",this.onClickListener),this.button.remove(),this.isHover=!1,this.button=void 0):this.hide();}hide(){this.button&&(this.button.style.display="none");}show(){this.button&&(this.button.style.display="block");}setupButton(){let e=document.createElement("button");return e.type="button",e.style.display="none",e.className=`scandit-control-widget scandit-control-widget-${this.control.type}`,this.updateButtonBackground(e,this.getImageFromState()),this.domHost.append(e),e.addEventListener("mouseenter",this.onMouseEnterListener),e.addEventListener("mouseleave",this.onMouseLeaveListener),a$2.isDesktopDevice()||e.addEventListener("touchstart",this.onTouchStartListener),e.addEventListener("click",this.onClickListener),e.setAttribute("aria-pressed",String(this.state==="pressed")),this.button=e,this.button}setup(){this.setupButton();}onTouchStart(){var e,t;(e=this.button)==null||e.removeEventListener("mouseenter",this.onMouseEnterListener),(t=this.button)==null||t.removeEventListener("mouseleave",this.onMouseLeaveListener);}onMouseEnter(){this.isHover=!0,this.updateButtonBackground(this.button,this.getImageFromState());}onMouseLeave(){this.isHover=!1,this.updateButtonBackground(this.button,this.getImageFromState());}onClick(){var e;this.state=this.state==="pressed"?"idle":"pressed",this.buttonClicked(),this.updateButtonBackground(this.button,this.getImageFromState()),(e=this.button)==null||e.setAttribute("aria-pressed",String(this.state==="pressed"));}updateButtonBackground(e,t){t!=null&&e!=null&&(e.style.backgroundImage=`url(${JSON.stringify(t)})`);}},C=class extends d{constructor(e,t){super(e,t);}async buttonClicked(){await this.frameSource.setDesiredTorchState(this.retrieveTorchState()==="on"?"off":"on");}async canShow(){return this.isTorchAvailable()}getImageFromState(){return this.retrieveTorchState()==="on"?this.isHover?this.control.torchOnPressedImage:this.control.torchOnImage:this.isHover?this.control.torchOffPressedImage:this.control.torchOffImage}setup(){if(this.control.torchOffImage==null||this.control.torchOnImage==null){a.log(a.Level.Warn,"TorchSwitchControl icon is not set or is empty, the control will not be rendered.");return}super.setup();}async isTorchAvailable(){return f$1(this.frameSource)?this.frameSource.isTorchAvailable():!1}retrieveTorchState(){return f$1(this.frameSource)?this.frameSource.getDesiredTorchState():"off"}},f=class o extends d{constructor(e,t){super(e,t);}static get CameraAccess(){return d$1}static get Camera(){return a$1}async canShow(){return (await o.CameraAccess.getCameras()).length>1}getImageFromState(){return this.isHover?this.control.pressedImage:this.control.idleImage}async buttonClicked(){if(this.isTransitioning)return;let e=await this.getNextDeviceCamera();e&&await this.switchCameras(e);}setup(){if(this.control.idleImage==null){a.log(a.Level.Warn,"CameraSwitchControl idle icon is not set or is empty, the control will not be rendered.");return}super.setup();}async getNextDeviceCamera(){var s,n;let e=await o.CameraAccess.getCameras(),t=this.frameSource?this.frameSource:null,i=(s=t==null?void 0:t.cameraManager.activeCamera)==null?void 0:s.deviceId,r=e.findIndex(c=>c.deviceId===i);return r>-1?(n=e[r+1])!=null?n:e[0]:e.length>0?e[0]:null}async switchCameras(e){var n,c,u;this.isTransitioning=!0;let t=(n=this.context)==null?void 0:n.frameSource,i,r;t!=null&&(i=new g$1(t.settings),r=t.desiredState),await(t==null?void 0:t.switchToDesiredState("off"));let s=o.Camera.fromDeviceCamera(e);i!=null&&await s.applySettings(i),await((c=this.context)==null?void 0:c.setFrameSource(s)),await((u=this.context)==null?void 0:u.frameSource).switchToDesiredState(r!=null?r:"on"),this.isTransitioning=!1;}},g=class o extends d{constructor(e,t){super(e,t);}static get Camera(){return a$1}static get CameraAccess(){return d$1}async install(){let e=await super.install();return e&&await this.setInitialCamera(),e}async canShow(){return !a$2.isIOSDeviceWithExtendedCameraAccess()||!f$1(this.frameSource)?!1:d$1.isIOSBackDualWideCameraLabel(this.frameSource.label)||d$1.isIOSBackCameraLabel(this.frameSource.label)||d$1.isIOSUltraWideBackCameraLabel(this.frameSource.label)}getImageFromState(){return this.isUltraWideBackCamera()?this.isHover?this.control.cameraFOVUltraWidePressedImage:this.control.cameraFOVUltraWideImage:this.isHover?this.control.cameraFOVWidePressedImage:this.control.cameraFOVWideImage}async buttonClicked(){if(this.isTransitioning)return;let e=await this.getAlternativeDeviceCamera();e&&await this.switchCameras(e);}setup(){if(this.control.cameraFOVUltraWideImage==null||this.control.cameraFOVWideImage==null){a.log(a.Level.Warn,"CameraFOVSwitchControl icon is not set or is empty, the control will not be rendered.");return}super.setup();}async setInitialCamera(){var e,t;if(!this.isTransitioning&&!d$1.isIOSBackCameraLabel((t=(e=this.frameSource)==null?void 0:e.label)!=null?t:"")){let r=(await o.CameraAccess.getCameras()).find(s=>d$1.isIOSBackCameraLabel(s.label));r&&await this.switchCameras(r);}}isUltraWideBackCamera(){return f$1(this.frameSource)?d$1.isIOSUltraWideBackCameraLabel(this.frameSource.label):!1}async getAlternativeDeviceCamera(){return (await o.CameraAccess.getCameras()).find(t=>this.isUltraWideBackCamera()?d$1.isIOSBackCameraLabel(t.label):d$1.isIOSUltraWideBackCameraLabel(t.label))}async switchCameras(e){var n,c,u;this.isTransitioning=!0;let t=(n=this.context)==null?void 0:n.frameSource,i,r;t!=null&&(i=new g$1(t.settings),r=t.desiredState),await(t==null?void 0:t.switchToDesiredState("off"));let s=o.Camera.fromDeviceCamera(e);i!=null&&await s.applySettings(i),await((c=this.context)==null?void 0:c.setFrameSource(s)),await((u=this.context)==null?void 0:u.frameSource).switchToDesiredState(r!=null?r:"on"),this.isTransitioning=!1;}};export{S as a,C as b,f as c,g as d};
1
+ import {a as a$1}from'./chunk-FLO5QRX5.js';import {d as d$1}from'./chunk-7QNII4K3.js';import {a}from'./chunk-XR65N6EG.js';import {a as a$2}from'./chunk-MU4VAJIM.js';import {f as f$1,g as g$1}from'./chunk-UD3Z45BT.js';var S=(t=>(t.Idle="idle",t.Pressed="pressed",t))(S||{}),d=class{constructor(e,t){this.state="idle";this.isHover=!1;this.control=e,this.domHost=t,this.onTouchStartListener=this.onTouchStart.bind(this),this.onMouseEnterListener=this.onMouseEnter.bind(this),this.onMouseLeaveListener=this.onMouseLeave.bind(this),this.onClickListener=this.onClick.bind(this),this.setup();}get frameSource(){var e,t;return (t=(e=this.control.view)==null?void 0:e.getContext())==null?void 0:t.frameSource}get context(){var e;return (e=this.control.view)==null?void 0:e.getContext()}async install(){this.button||this.setup();let e=await this.canShow();return e?(this.updateButtonBackground(this.button,this.getImageFromState()),this.show()):this.hide(),e}remove(e=!1){e&&this.button?(this.button.removeEventListener("mouseenter",this.onMouseEnterListener),this.button.removeEventListener("mouseleave",this.onMouseLeaveListener),this.button.removeEventListener("touchstart",this.onTouchStartListener),this.button.removeEventListener("click",this.onClickListener),this.button.remove(),this.isHover=!1,this.button=void 0):this.hide();}hide(){this.button&&(this.button.style.display="none");}show(){this.button&&(this.button.style.display="block");}setupButton(){let e=document.createElement("button");return e.type="button",e.style.display="none",e.className=`scandit-control-widget scandit-control-widget-${this.control.type}`,this.updateButtonBackground(e,this.getImageFromState()),this.domHost.append(e),e.addEventListener("mouseenter",this.onMouseEnterListener),e.addEventListener("mouseleave",this.onMouseLeaveListener),a$2.isDesktopDevice()||e.addEventListener("touchstart",this.onTouchStartListener),e.addEventListener("click",this.onClickListener),e.setAttribute("aria-pressed",String(this.state==="pressed")),this.button=e,this.button}setup(){this.setupButton();}onTouchStart(){var e,t;(e=this.button)==null||e.removeEventListener("mouseenter",this.onMouseEnterListener),(t=this.button)==null||t.removeEventListener("mouseleave",this.onMouseLeaveListener);}onMouseEnter(){this.isHover=!0,this.updateButtonBackground(this.button,this.getImageFromState());}onMouseLeave(){this.isHover=!1,this.updateButtonBackground(this.button,this.getImageFromState());}onClick(){var e;this.state=this.state==="pressed"?"idle":"pressed",this.buttonClicked(),this.updateButtonBackground(this.button,this.getImageFromState()),(e=this.button)==null||e.setAttribute("aria-pressed",String(this.state==="pressed"));}updateButtonBackground(e,t){t!=null&&e!=null&&(e.style.backgroundImage=`url(${JSON.stringify(t)})`);}},C=class extends d{constructor(e,t){super(e,t);}async buttonClicked(){await this.frameSource.setDesiredTorchState(this.retrieveTorchState()==="on"?"off":"on");}async canShow(){return this.isTorchAvailable()}getImageFromState(){return this.retrieveTorchState()==="on"?this.isHover?this.control.torchOnPressedImage:this.control.torchOnImage:this.isHover?this.control.torchOffPressedImage:this.control.torchOffImage}setup(){if(this.control.torchOffImage==null||this.control.torchOnImage==null){a.log(a.Level.Warn,"TorchSwitchControl icon is not set or is empty, the control will not be rendered.");return}super.setup();}async isTorchAvailable(){return f$1(this.frameSource)?this.frameSource.isTorchAvailable():!1}retrieveTorchState(){return f$1(this.frameSource)?this.frameSource.getDesiredTorchState():"off"}},f=class o extends d{constructor(e,t){super(e,t);}static get CameraAccess(){return d$1}static get Camera(){return a$1}async canShow(){return (await o.CameraAccess.getCameras()).length>1}getImageFromState(){return this.isHover?this.control.pressedImage:this.control.idleImage}async buttonClicked(){if(this.isTransitioning)return;let e=await this.getNextDeviceCamera();e&&await this.switchCameras(e);}setup(){if(this.control.idleImage==null){a.log(a.Level.Warn,"CameraSwitchControl idle icon is not set or is empty, the control will not be rendered.");return}super.setup();}async getNextDeviceCamera(){var s,n;let e=await o.CameraAccess.getCameras(),t=this.frameSource?this.frameSource:null,i=(s=t==null?void 0:t.cameraManager.activeCamera)==null?void 0:s.deviceId,r=e.findIndex(c=>c.deviceId===i);return r>-1?(n=e[r+1])!=null?n:e[0]:e.length>0?e[0]:null}async switchCameras(e){var n,c,u;this.isTransitioning=!0;let t=(n=this.context)==null?void 0:n.frameSource,i,r;t!=null&&(i=new g$1(t.settings),r=t.desiredState),await(t==null?void 0:t.switchToDesiredState("off"));let s=o.Camera.fromDeviceCamera(e);i!=null&&await s.applySettings(i),await((c=this.context)==null?void 0:c.setFrameSource(s)),await((u=this.context)==null?void 0:u.frameSource).switchToDesiredState(r!=null?r:"on"),this.isTransitioning=!1;}},g=class o extends d{constructor(e,t){super(e,t);}static get Camera(){return a$1}static get CameraAccess(){return d$1}async install(){let e=await super.install();return e&&await this.setInitialCamera(),e}async canShow(){return !a$2.isIOSDeviceWithExtendedCameraAccess()||!f$1(this.frameSource)?!1:d$1.isIOSBackDualWideCameraLabel(this.frameSource.label)||d$1.isIOSBackCameraLabel(this.frameSource.label)||d$1.isIOSUltraWideBackCameraLabel(this.frameSource.label)}getImageFromState(){return this.isUltraWideBackCamera()?this.isHover?this.control.cameraFOVUltraWidePressedImage:this.control.cameraFOVUltraWideImage:this.isHover?this.control.cameraFOVWidePressedImage:this.control.cameraFOVWideImage}async buttonClicked(){if(this.isTransitioning)return;let e=await this.getAlternativeDeviceCamera();e&&await this.switchCameras(e);}setup(){if(this.control.cameraFOVUltraWideImage==null||this.control.cameraFOVWideImage==null){a.log(a.Level.Warn,"CameraFOVSwitchControl icon is not set or is empty, the control will not be rendered.");return}super.setup();}async setInitialCamera(){var e,t;if(!this.isTransitioning&&!d$1.isIOSBackCameraLabel((t=(e=this.frameSource)==null?void 0:e.label)!=null?t:"")){let r=(await o.CameraAccess.getCameras()).find(s=>d$1.isIOSBackCameraLabel(s.label));r&&await this.switchCameras(r);}}isUltraWideBackCamera(){return f$1(this.frameSource)?d$1.isIOSUltraWideBackCameraLabel(this.frameSource.label):!1}async getAlternativeDeviceCamera(){return (await o.CameraAccess.getCameras()).find(t=>this.isUltraWideBackCamera()?d$1.isIOSBackCameraLabel(t.label):d$1.isIOSUltraWideBackCameraLabel(t.label))}async switchCameras(e){var n,c,u;this.isTransitioning=!0;let t=(n=this.context)==null?void 0:n.frameSource,i,r;t!=null&&(i=new g$1(t.settings),r=t.desiredState),await(t==null?void 0:t.switchToDesiredState("off"));let s=o.Camera.fromDeviceCamera(e);i!=null&&await s.applySettings(i),await((c=this.context)==null?void 0:c.setFrameSource(s)),await((u=this.context)==null?void 0:u.frameSource).switchToDesiredState(r!=null?r:"on"),this.isTransitioning=!1;}};export{S as a,C as b,f as c,g as d};
package/build/js/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export{a as DataCaptureLoader}from'./chunks/chunk-CXBLYHGE.js';export{a as WorkerMain}from'./chunks/chunk-2NHLNMAU.js';export{a as OverrideState}from'./chunks/chunk-6W7FX6LD.js';import {a as a$3}from'./chunks/chunk-AIC4H5KG.js';export{a as SingleImageUploader}from'./chunks/chunk-ZG2DNH5P.js';export{a as SingleImageUploaderSettings}from'./chunks/chunk-Y6NN3VBO.js';export{c as CameraFOVSwitchControl,b as CameraSwitchControl,a as TorchSwitchControl}from'./chunks/chunk-T5EUB6UG.js';export{a as NoViewfinder}from'./chunks/chunk-4ZMCJXZS.js';export{a as convertToPublicFrameData}from'./chunks/chunk-UHFABUTI.js';export{a as ImageFrameSource}from'./chunks/chunk-Q7NDC6TJ.js';export{a as PrivateNoneLocationSelection,b as RadiusLocationSelection,c as RectangularLocationSelection}from'./chunks/chunk-DCZONWJ2.js';export{a as RectangularViewfinder}from'./chunks/chunk-LU4WMIH5.js';export{c as ScanditIconBuilder,b as ScanditIconForIconType,a as ScanditIconType}from'./chunks/chunk-TJJYIG7M.js';export{b as ScanditIcon,a as ScanditIconShape}from'./chunks/chunk-3OBWS6CO.js';export{a as DataCaptureVersion}from'./chunks/chunk-VXPXBTR2.js';export{a as DataCaptureView}from'./chunks/chunk-U7XZE33G.js';import {a as a$5}from'./chunks/chunk-N5YZEC56.js';export{a as AnchorPositions}from'./chunks/chunk-5FUZURCZ.js';import {a as a$2}from'./chunks/chunk-VJB527QZ.js';import {a as a$1}from'./chunks/chunk-7XQ3GHYH.js';export{a as Localization}from'./chunks/chunk-7XQ3GHYH.js';export{a as Feedback}from'./chunks/chunk-CBF2PLFL.js';export{a as Sound}from'./chunks/chunk-GSJH2EXJ.js';export{a as Vibration}from'./chunks/chunk-DCVQRKUG.js';export{a as AimerViewfinder}from'./chunks/chunk-4QDKNW3V.js';export{a as Brush}from'./chunks/chunk-ACXIZNMK.js';export{a as Camera}from'./chunks/chunk-LY6NJOQH.js';export{a as CameraAccess}from'./chunks/chunk-5TKCHVG2.js';export{a as DataCaptureContext}from'./chunks/chunk-VEXAGRW7.js';import {a as a$6,c}from'./chunks/chunk-EHMSDFH7.js';import {a}from'./chunks/chunk-NMROJLGQ.js';import {b}from'./chunks/chunk-6H6FKGVE.js';export{b as loadingStatus}from'./chunks/chunk-6H6FKGVE.js';export{a as DataCaptureContextSettings}from'./chunks/chunk-7SW2PEHB.js';export{a as assert,b as assertUnreachable,c as assertUnreachableThrowException}from'./chunks/chunk-FTD535WI.js';import {a as a$9}from'./chunks/chunk-GPJEB376.js';import {a as a$4}from'./chunks/chunk-XR65N6EG.js';export{a as Logger}from'./chunks/chunk-XR65N6EG.js';import {a as a$7}from'./chunks/chunk-QCZSSQAQ.js';export{a as DataCaptureError}from'./chunks/chunk-QCZSSQAQ.js';import {a as a$8}from'./chunks/chunk-MU4VAJIM.js';export{a as BrowserHelper}from'./chunks/chunk-MU4VAJIM.js';export{a as Feature}from'./chunks/chunk-5LIWL2C4.js';export{c as CameraPosition,g as CameraSettings,e as FocusGestureStrategy,a as FrameSourceState,b as TorchState,d as VideoResolution,f as isCameraFrameSource}from'./chunks/chunk-UD3Z45BT.js';export{c as RectangularViewfinderAnimation,b as RectangularViewfinderLineStyle,a as RectangularViewfinderStyle}from'./chunks/chunk-J2UL6U3I.js';export{a as LogoStyle,c as SwipeToZoom,b as TapToFocus}from'./chunks/chunk-GX4YCYCH.js';export{q as Anchor,n as Color,p as Direction,m as MarginsWithUnit,c as MeasureUnit,d as NumberWithUnit,o as Orientation,a as Point,e as PointWithUnit,b as Quadrilateral,f as Rect,g as RectWithUnit,i as Size,j as SizeWithAspect,h as SizeWithUnit,l as SizeWithUnitAndAspect,k as SizingMode}from'./chunks/chunk-77BBIAZE.js';export{a as ContextStatus,b as PrivateMirrorAxis}from'./chunks/chunk-WUHKODFA.js';var p=a;async function S(){var e;a.configurePhase="unconfigured",(e=p.mainDataCaptureLoader)!=null&&e.terminateDataCaptureWorker&&await p.mainDataCaptureLoader.terminateDataCaptureWorker(!0);}function l({percentage:e}){for(let r of a$5.values())r.setProgressBarPercentage(e);}function D(){var o,u;function e(P){return ["auto","off","on"].includes(P)}let r=new URLSearchParams(window.location.search),[a="auto",i="auto"]=[(o=r.get("pthreads"))==null?void 0:o.toLowerCase(),(u=r.get("simd"))==null?void 0:u.toLowerCase()];return {overrideThreadsSupport:e(a)?a:"auto",overrideSimdSupport:e(i)?i:"auto"}}async function O(e){if(a$6()&&typeof e.licenseDataPath!="string")throw new a$7({name:"MisconfigurationError",message:'"licenseDataPath" string is missing or not valid'});if(a$6()&&typeof e.licenseDataPath=="string"){let a=await c({licenseDataPath:e.licenseDataPath});if(a==null)throw new Error("Cannot retrieve license key for Electron");e.licenseKey=a.licenseKey;}if(e.licenseKey==null||e.licenseKey.trim().length<64)throw new a$7({name:"NoLicenseKeyError",message:"No license key provided"});if(typeof e.libraryLocation!="string")throw new a$7({name:"MisconfigurationError",message:'Option "libraryLocation" was not provided'});if(!Array.isArray(e.moduleLoaders)||e.moduleLoaders.length===0)throw new a$7({name:"MisconfigurationError",message:'Option "moduleLoaders" is missing or empty'});let r=e.moduleLoaders.map(a=>a.moduleName);if(!["BarcodeCapture","IdCapture","LabelCapture"].includes(r[0]))throw new a$7({name:"MisconfigurationError",message:'Main modules must be loaded before side modules. For example "BarcodeCapture" must be loaded before "Parser".'})}async function M(e,r){let a=new Map,i=new Map;for(let o of e)i.set(o.moduleName,o.load(r));await Promise.all(i.values());for(let[o,u]of i)a.set(o,await u);return a}async function Ye(e){var i;if(p.configurePhase!=="unconfigured"&&p.configurePromise!=null)return p.configurePromise;a$1.getInstance().updateIfMissing(a$2),await O(e);let r={...D(),...e,libraryLocation:a$3(e.libraryLocation),logLevel:(i=e.logLevel)!=null?i:a$4.Level.Debug,verifyResponseHash:!0,loadProgressNotifier:b.notify.bind(b)};a.userLicenseKey=r.licenseKey,a.libraryLocation=r.libraryLocation,a$4.setLevel(r.logLevel);async function a$5(){a.configurePhase="started",b.subscribe(l);let o=a$8.checkBrowserCompatibility();if(!o.fullSupport&&!o.scannerSupport)throw new a$9(o);a$8.isSupportedIOSVersion()||a$4.log(a$4.Level.Warn,`Warning: Minimum supported iOS version is 14.6.
1
+ export{a as DataCaptureLoader}from'./chunks/chunk-CXBLYHGE.js';export{a as WorkerMain}from'./chunks/chunk-SCTIUP46.js';export{a as OverrideState}from'./chunks/chunk-6W7FX6LD.js';import {a as a$3}from'./chunks/chunk-AIC4H5KG.js';export{a as SingleImageUploader}from'./chunks/chunk-ZG2DNH5P.js';export{a as SingleImageUploaderSettings}from'./chunks/chunk-Y6NN3VBO.js';export{c as CameraFOVSwitchControl,b as CameraSwitchControl,a as TorchSwitchControl}from'./chunks/chunk-T5EUB6UG.js';export{a as NoViewfinder}from'./chunks/chunk-4ZMCJXZS.js';export{a as convertToPublicFrameData}from'./chunks/chunk-UHFABUTI.js';export{a as ImageFrameSource}from'./chunks/chunk-Q7NDC6TJ.js';export{a as PrivateNoneLocationSelection,b as RadiusLocationSelection,c as RectangularLocationSelection}from'./chunks/chunk-DCZONWJ2.js';export{a as RectangularViewfinder}from'./chunks/chunk-LU4WMIH5.js';export{c as ScanditIconBuilder,b as ScanditIconForIconType,a as ScanditIconType}from'./chunks/chunk-VZJ2FQ7I.js';export{b as ScanditIcon,a as ScanditIconShape}from'./chunks/chunk-6HPS3VUF.js';export{a as DataCaptureVersion}from'./chunks/chunk-MWPSUUFY.js';export{a as DataCaptureView}from'./chunks/chunk-4KCDIWC3.js';import {a as a$5}from'./chunks/chunk-N5YZEC56.js';export{a as AnchorPositions}from'./chunks/chunk-5FUZURCZ.js';import {a as a$2}from'./chunks/chunk-VJB527QZ.js';import {a as a$1}from'./chunks/chunk-7XQ3GHYH.js';export{a as Localization}from'./chunks/chunk-7XQ3GHYH.js';export{a as Feedback}from'./chunks/chunk-U2OJFO7J.js';export{a as Sound}from'./chunks/chunk-6X73W3EO.js';export{a as Vibration}from'./chunks/chunk-DCVQRKUG.js';export{a as AimerViewfinder}from'./chunks/chunk-4QDKNW3V.js';export{a as Brush}from'./chunks/chunk-ACXIZNMK.js';export{a as Camera}from'./chunks/chunk-FLO5QRX5.js';export{a as CameraAccess}from'./chunks/chunk-6LUJAFBV.js';export{a as DataCaptureContext}from'./chunks/chunk-EEA7AA2K.js';import {a as a$6,c}from'./chunks/chunk-EHMSDFH7.js';import {a}from'./chunks/chunk-NMROJLGQ.js';import {b}from'./chunks/chunk-6H6FKGVE.js';export{b as loadingStatus}from'./chunks/chunk-6H6FKGVE.js';export{a as DataCaptureContextSettings}from'./chunks/chunk-7SW2PEHB.js';export{a as assert,b as assertUnreachable,c as assertUnreachableThrowException}from'./chunks/chunk-FTD535WI.js';import {a as a$9}from'./chunks/chunk-GPJEB376.js';import {a as a$4}from'./chunks/chunk-XR65N6EG.js';export{a as Logger}from'./chunks/chunk-XR65N6EG.js';import {a as a$7}from'./chunks/chunk-QCZSSQAQ.js';export{a as DataCaptureError}from'./chunks/chunk-QCZSSQAQ.js';import {a as a$8}from'./chunks/chunk-MU4VAJIM.js';export{a as BrowserHelper}from'./chunks/chunk-MU4VAJIM.js';export{a as Feature}from'./chunks/chunk-5LIWL2C4.js';export{c as CameraPosition,g as CameraSettings,e as FocusGestureStrategy,a as FrameSourceState,b as TorchState,d as VideoResolution,f as isCameraFrameSource}from'./chunks/chunk-UD3Z45BT.js';export{c as RectangularViewfinderAnimation,b as RectangularViewfinderLineStyle,a as RectangularViewfinderStyle}from'./chunks/chunk-J2UL6U3I.js';export{a as LogoStyle,c as SwipeToZoom,b as TapToFocus}from'./chunks/chunk-GX4YCYCH.js';export{q as Anchor,n as Color,p as Direction,m as MarginsWithUnit,c as MeasureUnit,d as NumberWithUnit,o as Orientation,a as Point,e as PointWithUnit,b as Quadrilateral,f as Rect,g as RectWithUnit,i as Size,j as SizeWithAspect,h as SizeWithUnit,l as SizeWithUnitAndAspect,k as SizingMode}from'./chunks/chunk-77BBIAZE.js';export{a as ContextStatus,b as PrivateMirrorAxis}from'./chunks/chunk-WUHKODFA.js';var p=a;async function S(){var e;a.configurePhase="unconfigured",(e=p.mainDataCaptureLoader)!=null&&e.terminateDataCaptureWorker&&await p.mainDataCaptureLoader.terminateDataCaptureWorker(!0);}function l({percentage:e}){for(let r of a$5.values())r.setProgressBarPercentage(e);}function D(){var o,u;function e(P){return ["auto","off","on"].includes(P)}let r=new URLSearchParams(window.location.search),[a="auto",i="auto"]=[(o=r.get("pthreads"))==null?void 0:o.toLowerCase(),(u=r.get("simd"))==null?void 0:u.toLowerCase()];return {overrideThreadsSupport:e(a)?a:"auto",overrideSimdSupport:e(i)?i:"auto"}}async function O(e){if(a$6()&&typeof e.licenseDataPath!="string")throw new a$7({name:"MisconfigurationError",message:'"licenseDataPath" string is missing or not valid'});if(a$6()&&typeof e.licenseDataPath=="string"){let a=await c({licenseDataPath:e.licenseDataPath});if(a==null)throw new Error("Cannot retrieve license key for Electron");e.licenseKey=a.licenseKey;}if(e.licenseKey==null||e.licenseKey.trim().length<64)throw new a$7({name:"NoLicenseKeyError",message:"No license key provided"});if(typeof e.libraryLocation!="string")throw new a$7({name:"MisconfigurationError",message:'Option "libraryLocation" was not provided'});if(!Array.isArray(e.moduleLoaders)||e.moduleLoaders.length===0)throw new a$7({name:"MisconfigurationError",message:'Option "moduleLoaders" is missing or empty'});let r=e.moduleLoaders.map(a=>a.moduleName);if(!["BarcodeCapture","IdCapture","LabelCapture"].includes(r[0]))throw new a$7({name:"MisconfigurationError",message:'Main modules must be loaded before side modules. For example "BarcodeCapture" must be loaded before "Parser".'})}async function M(e,r){let a=new Map,i=new Map;for(let o of e)i.set(o.moduleName,o.load(r));await Promise.all(i.values());for(let[o,u]of i)a.set(o,await u);return a}async function Ye(e){var i;if(p.configurePhase!=="unconfigured"&&p.configurePromise!=null)return p.configurePromise;a$1.getInstance().updateIfMissing(a$2),await O(e);let r={...D(),...e,libraryLocation:a$3(e.libraryLocation),logLevel:(i=e.logLevel)!=null?i:a$4.Level.Debug,verifyResponseHash:!0,loadProgressNotifier:b.notify.bind(b)};a.userLicenseKey=r.licenseKey,a.libraryLocation=r.libraryLocation,a$4.setLevel(r.logLevel);async function a$5(){a.configurePhase="started",b.subscribe(l);let o=a$8.checkBrowserCompatibility();if(!o.fullSupport&&!o.scannerSupport)throw new a$9(o);a$8.isSupportedIOSVersion()||a$4.log(a$4.Level.Warn,`Warning: Minimum supported iOS version is 14.6.
2
2
  Please check the minimum system requirements here:
3
3
  https://docs.scandit.com/system-requirements#web-sdk`),a.dataCaptureLoaders=await M(r.moduleLoaders,r),a.mainDataCaptureLoader=[...a.dataCaptureLoaders.entries()][0][1],a.configurePhase="done",b.unsubscribe(l);}return a.configurePromise=a$5().catch(o=>{throw S(),b.unsubscribe(l),o}),a.configurePromise}function Ze(e){a.mainDataCaptureLoader=e;}
4
4
  export{Ye as configure,S as resetConfigure,Ze as setMainDataCaptureLoader};
@@ -1 +1 @@
1
- export{c as AspectRatio,d as CameraAccess,a as CameraPosition,b as CameraResolutionConstraint}from'../chunks/chunk-BIGR7VVJ.js';
1
+ export{c as AspectRatio,d as CameraAccess,a as CameraPosition,b as CameraResolutionConstraint}from'../chunks/chunk-7QNII4K3.js';
@@ -1 +1 @@
1
- export{d as CameraManager,c as CameraManagerEvent,b as CameraResolutionConstraint,a as MeteringMode}from'../chunks/chunk-BYMYBEMT.js';
1
+ export{d as CameraManager,c as CameraManagerEvent,b as CameraResolutionConstraint,a as MeteringMode}from'../chunks/chunk-AC6MK6LU.js';
@@ -1 +1 @@
1
- export{a as ButtonState,c as CameraSwitchControlWidget,d as PrivateCameraFOVSwitchControlWidget,b as PrivateTorchControlWidget}from'../chunks/chunk-VIZTTYLK.js';
1
+ export{a as ButtonState,c as CameraSwitchControlWidget,d as PrivateCameraFOVSwitchControlWidget,b as PrivateTorchControlWidget}from'../chunks/chunk-WPY7T7HY.js';
@@ -1 +1 @@
1
- export{a as getDataCaptureViewStyles}from'../chunks/chunk-FNFCPBQI.js';
1
+ export{a as getDataCaptureViewStyles}from'../chunks/chunk-7CQVGY6N.js';
@@ -1,4 +1,4 @@
1
- import {a}from'../../../chunks/chunk-DVQH5JLR.js';import {a as a$1}from'../../../chunks/chunk-3A4KLILV.js';import {a as a$2}from'../../../chunks/chunk-U6BTTEV6.js';var e=class e extends a{static create(){return document.createElement(e.tag)}static register(){a$1({[e.tag]:e});}render(){return a$2`
1
+ import {a}from'../../../chunks/chunk-72A5262S.js';import {a as a$1}from'../../../chunks/chunk-3A4KLILV.js';import {a as a$2}from'../../../chunks/chunk-MU6SADSF.js';var e=class e extends a{static create(){return document.createElement(e.tag)}static register(){a$1({[e.tag]:e});}render(){return a$2`
2
2
  <style>
3
3
  ${e.tag} {
4
4
  display: flex;
@@ -1,4 +1,4 @@
1
- import {a}from'../../../chunks/chunk-DVQH5JLR.js';import {a as a$1}from'../../../chunks/chunk-3A4KLILV.js';import {a as a$2}from'../../../chunks/chunk-U6BTTEV6.js';var e=class e extends a{static create(){return document.createElement(e.tag)}static register(){a$1({[e.tag]:e});}render(){return a$2`
1
+ import {a}from'../../../chunks/chunk-72A5262S.js';import {a as a$1}from'../../../chunks/chunk-3A4KLILV.js';import {a as a$2}from'../../../chunks/chunk-MU6SADSF.js';var e=class e extends a{static create(){return document.createElement(e.tag)}static register(){a$1({[e.tag]:e});}render(){return a$2`
2
2
  <style>
3
3
  ${e.tag} {
4
4
  display: flex;
@@ -1,4 +1,4 @@
1
- import {a}from'../../../chunks/chunk-DVQH5JLR.js';import {a as a$1}from'../../../chunks/chunk-3A4KLILV.js';import {a as a$2}from'../../../chunks/chunk-U6BTTEV6.js';var t=class t extends a{static create(){return document.createElement(t.tag)}static register(){a$1({[t.tag]:t});}render(){return a$2`
1
+ import {a}from'../../../chunks/chunk-72A5262S.js';import {a as a$1}from'../../../chunks/chunk-3A4KLILV.js';import {a as a$2}from'../../../chunks/chunk-MU6SADSF.js';var t=class t extends a{static create(){return document.createElement(t.tag)}static register(){a$1({[t.tag]:t});}render(){return a$2`
2
2
  <style>
3
3
  ${t.tag} {
4
4
  display: flex;
@@ -1,4 +1,4 @@
1
- import {a}from'../../../chunks/chunk-DVQH5JLR.js';import {a as a$1}from'../../../chunks/chunk-3A4KLILV.js';import {a as a$2}from'../../../chunks/chunk-U6BTTEV6.js';var e=class e extends a{static create(){return document.createElement(e.tag)}static register(){a$1({[e.tag]:e});}render(){return a$2`
1
+ import {a}from'../../../chunks/chunk-72A5262S.js';import {a as a$1}from'../../../chunks/chunk-3A4KLILV.js';import {a as a$2}from'../../../chunks/chunk-MU6SADSF.js';var e=class e extends a{static create(){return document.createElement(e.tag)}static register(){a$1({[e.tag]:e});}render(){return a$2`
2
2
  <style>
3
3
  ${e.tag} {
4
4
  display: flex;
@@ -1 +1 @@
1
- export{a as ArrowsUp}from'../../../chunks/chunk-MST2ECFN.js';
1
+ export{a as ArrowsUp}from'../../../chunks/chunk-FFTRSHP6.js';
@@ -1,4 +1,4 @@
1
- import {a}from'../../../chunks/chunk-DVQH5JLR.js';import {a as a$1}from'../../../chunks/chunk-3A4KLILV.js';import {a as a$2}from'../../../chunks/chunk-U6BTTEV6.js';var e=class e extends a{static create(){return document.createElement(e.tag)}static register(){a$1({[e.tag]:e});}render(){return a$2`
1
+ import {a}from'../../../chunks/chunk-72A5262S.js';import {a as a$1}from'../../../chunks/chunk-3A4KLILV.js';import {a as a$2}from'../../../chunks/chunk-MU6SADSF.js';var e=class e extends a{static create(){return document.createElement(e.tag)}static register(){a$1({[e.tag]:e});}render(){return a$2`
2
2
  <style>
3
3
  ${e.tag} {
4
4
  display: flex;
@@ -1,4 +1,4 @@
1
- import {a}from'../../../chunks/chunk-DVQH5JLR.js';import {a as a$1}from'../../../chunks/chunk-3A4KLILV.js';import {a as a$2}from'../../../chunks/chunk-U6BTTEV6.js';var e=class e extends a{static create(){return document.createElement(e.tag)}static register(){a$1({[e.tag]:e});}render(){return a$2`
1
+ import {a}from'../../../chunks/chunk-72A5262S.js';import {a as a$1}from'../../../chunks/chunk-3A4KLILV.js';import {a as a$2}from'../../../chunks/chunk-MU6SADSF.js';var e=class e extends a{static create(){return document.createElement(e.tag)}static register(){a$1({[e.tag]:e});}render(){return a$2`
2
2
  <style>
3
3
  ${e.tag} {
4
4
  display: flex;
@@ -1,4 +1,4 @@
1
- import {a}from'../../../chunks/chunk-DVQH5JLR.js';import {a as a$1}from'../../../chunks/chunk-3A4KLILV.js';import {a as a$2}from'../../../chunks/chunk-U6BTTEV6.js';var e=class e extends a{static create(){return document.createElement(e.tag)}static register(){a$1({[e.tag]:e});}render(){return a$2`
1
+ import {a}from'../../../chunks/chunk-72A5262S.js';import {a as a$1}from'../../../chunks/chunk-3A4KLILV.js';import {a as a$2}from'../../../chunks/chunk-MU6SADSF.js';var e=class e extends a{static create(){return document.createElement(e.tag)}static register(){a$1({[e.tag]:e});}render(){return a$2`
2
2
  <style>
3
3
  ${e.tag} {
4
4
  display: flex;
@@ -1,4 +1,4 @@
1
- import {a}from'../../../chunks/chunk-DVQH5JLR.js';import {a as a$1}from'../../../chunks/chunk-3A4KLILV.js';import {a as a$2}from'../../../chunks/chunk-U6BTTEV6.js';var e=class e extends a{static create(){return document.createElement(e.tag)}static register(){a$1({[e.tag]:e});}render(){return a$2`
1
+ import {a}from'../../../chunks/chunk-72A5262S.js';import {a as a$1}from'../../../chunks/chunk-3A4KLILV.js';import {a as a$2}from'../../../chunks/chunk-MU6SADSF.js';var e=class e extends a{static create(){return document.createElement(e.tag)}static register(){a$1({[e.tag]:e});}render(){return a$2`
2
2
  <style>
3
3
  ${e.tag} {
4
4
  display: flex;
@@ -1,4 +1,4 @@
1
- import {a}from'../../../chunks/chunk-DVQH5JLR.js';import {a as a$1}from'../../../chunks/chunk-3A4KLILV.js';import {a as a$2}from'../../../chunks/chunk-U6BTTEV6.js';var e=class e extends a{static create(){return document.createElement(e.tag)}static register(){a$1({[e.tag]:e});}render(){return a$2`
1
+ import {a}from'../../../chunks/chunk-72A5262S.js';import {a as a$1}from'../../../chunks/chunk-3A4KLILV.js';import {a as a$2}from'../../../chunks/chunk-MU6SADSF.js';var e=class e extends a{static create(){return document.createElement(e.tag)}static register(){a$1({[e.tag]:e});}render(){return a$2`
2
2
  <style>
3
3
  ${e.tag} {
4
4
  display: flex;
@@ -1,4 +1,4 @@
1
- import {a}from'../../../chunks/chunk-DVQH5JLR.js';import {a as a$1}from'../../../chunks/chunk-3A4KLILV.js';import {a as a$2}from'../../../chunks/chunk-U6BTTEV6.js';var e=class e extends a{static create(){return document.createElement(e.tag)}static register(){a$1({[e.tag]:e});}render(){return a$2`
1
+ import {a}from'../../../chunks/chunk-72A5262S.js';import {a as a$1}from'../../../chunks/chunk-3A4KLILV.js';import {a as a$2}from'../../../chunks/chunk-MU6SADSF.js';var e=class e extends a{static create(){return document.createElement(e.tag)}static register(){a$1({[e.tag]:e});}render(){return a$2`
2
2
  <style>
3
3
  ${e.tag} {
4
4
  display: flex;
@@ -1,4 +1,4 @@
1
- import {a}from'../../../chunks/chunk-DVQH5JLR.js';import {a as a$1}from'../../../chunks/chunk-3A4KLILV.js';import {a as a$2}from'../../../chunks/chunk-U6BTTEV6.js';var e=class e extends a{static create(){return document.createElement(e.tag)}static register(){a$1({[e.tag]:e});}render(){return a$2`
1
+ import {a}from'../../../chunks/chunk-72A5262S.js';import {a as a$1}from'../../../chunks/chunk-3A4KLILV.js';import {a as a$2}from'../../../chunks/chunk-MU6SADSF.js';var e=class e extends a{static create(){return document.createElement(e.tag)}static register(){a$1({[e.tag]:e});}render(){return a$2`
2
2
  <style>
3
3
  ${e.tag} {
4
4
  display: flex;
@@ -1,4 +1,4 @@
1
- import {a}from'../../../chunks/chunk-DVQH5JLR.js';import {a as a$1}from'../../../chunks/chunk-3A4KLILV.js';import {a as a$2}from'../../../chunks/chunk-U6BTTEV6.js';var e=class e extends a{static create(){return document.createElement(e.tag)}static register(){a$1({[e.tag]:e});}render(){return a$2`
1
+ import {a}from'../../../chunks/chunk-72A5262S.js';import {a as a$1}from'../../../chunks/chunk-3A4KLILV.js';import {a as a$2}from'../../../chunks/chunk-MU6SADSF.js';var e=class e extends a{static create(){return document.createElement(e.tag)}static register(){a$1({[e.tag]:e});}render(){return a$2`
2
2
  <style>
3
3
  ${e.tag} {
4
4
  display: flex;
@@ -1,4 +1,4 @@
1
- import {a}from'../../../chunks/chunk-DVQH5JLR.js';import {a as a$1}from'../../../chunks/chunk-3A4KLILV.js';import {a as a$2}from'../../../chunks/chunk-U6BTTEV6.js';var t=class t extends a{static create(){return document.createElement(t.tag)}static register(){a$1({[t.tag]:t});}render(){return a$2`
1
+ import {a}from'../../../chunks/chunk-72A5262S.js';import {a as a$1}from'../../../chunks/chunk-3A4KLILV.js';import {a as a$2}from'../../../chunks/chunk-MU6SADSF.js';var t=class t extends a{static create(){return document.createElement(t.tag)}static register(){a$1({[t.tag]:t});}render(){return a$2`
2
2
  <style>
3
3
  ${t.tag} {
4
4
  display: flex;
@@ -1,4 +1,4 @@
1
- import {a}from'../../../chunks/chunk-DVQH5JLR.js';import {a as a$1}from'../../../chunks/chunk-3A4KLILV.js';import {a as a$2}from'../../../chunks/chunk-U6BTTEV6.js';var t=class t extends a{static create(){return document.createElement(t.tag)}static register(){a$1({[t.tag]:t});}render(){return a$2`
1
+ import {a}from'../../../chunks/chunk-72A5262S.js';import {a as a$1}from'../../../chunks/chunk-3A4KLILV.js';import {a as a$2}from'../../../chunks/chunk-MU6SADSF.js';var t=class t extends a{static create(){return document.createElement(t.tag)}static register(){a$1({[t.tag]:t});}render(){return a$2`
2
2
  <style>
3
3
  ${t.tag} {
4
4
  display: flex;
@@ -1,4 +1,4 @@
1
- import {a}from'../../../chunks/chunk-DVQH5JLR.js';import {a as a$1}from'../../../chunks/chunk-3A4KLILV.js';import {a as a$2}from'../../../chunks/chunk-U6BTTEV6.js';var t=class t extends a{static create(){return document.createElement(t.tag)}static register(){a$1({[t.tag]:t});}render(){return a$2`
1
+ import {a}from'../../../chunks/chunk-72A5262S.js';import {a as a$1}from'../../../chunks/chunk-3A4KLILV.js';import {a as a$2}from'../../../chunks/chunk-MU6SADSF.js';var t=class t extends a{static create(){return document.createElement(t.tag)}static register(){a$1({[t.tag]:t});}render(){return a$2`
2
2
  <style>
3
3
  ${t.tag} {
4
4
  display: flex;
@@ -1,4 +1,4 @@
1
- import {a}from'../../../chunks/chunk-DVQH5JLR.js';import {a as a$1}from'../../../chunks/chunk-3A4KLILV.js';import {a as a$2}from'../../../chunks/chunk-U6BTTEV6.js';var e=class e extends a{static create(){return document.createElement(e.tag)}static register(){a$1({[e.tag]:e});}render(){return a$2`
1
+ import {a}from'../../../chunks/chunk-72A5262S.js';import {a as a$1}from'../../../chunks/chunk-3A4KLILV.js';import {a as a$2}from'../../../chunks/chunk-MU6SADSF.js';var e=class e extends a{static create(){return document.createElement(e.tag)}static register(){a$1({[e.tag]:e});}render(){return a$2`
2
2
  <style>
3
3
  ${e.tag} {
4
4
  display: flex;
@@ -1,4 +1,4 @@
1
- import {a}from'../../../chunks/chunk-DVQH5JLR.js';import {a as a$1}from'../../../chunks/chunk-3A4KLILV.js';import {a as a$2}from'../../../chunks/chunk-U6BTTEV6.js';var e=class e extends a{static create(){return document.createElement(e.tag)}static register(){a$1({[e.tag]:e});}render(){return a$2`
1
+ import {a}from'../../../chunks/chunk-72A5262S.js';import {a as a$1}from'../../../chunks/chunk-3A4KLILV.js';import {a as a$2}from'../../../chunks/chunk-MU6SADSF.js';var e=class e extends a{static create(){return document.createElement(e.tag)}static register(){a$1({[e.tag]:e});}render(){return a$2`
2
2
  <style>
3
3
  ${e.tag} {
4
4
  display: flex;
@@ -1,4 +1,4 @@
1
- import {a}from'../../../chunks/chunk-DVQH5JLR.js';import {a as a$1}from'../../../chunks/chunk-3A4KLILV.js';import {a as a$2}from'../../../chunks/chunk-U6BTTEV6.js';var t=class t extends a{static create(){return document.createElement(t.tag)}static register(){a$1({[t.tag]:t});}render(){return a$2`
1
+ import {a}from'../../../chunks/chunk-72A5262S.js';import {a as a$1}from'../../../chunks/chunk-3A4KLILV.js';import {a as a$2}from'../../../chunks/chunk-MU6SADSF.js';var t=class t extends a{static create(){return document.createElement(t.tag)}static register(){a$1({[t.tag]:t});}render(){return a$2`
2
2
  <style>
3
3
  ${t.tag} {
4
4
  display: flex;
@@ -1,4 +1,4 @@
1
- import {a}from'../../../chunks/chunk-DVQH5JLR.js';import {a as a$1}from'../../../chunks/chunk-3A4KLILV.js';import {a as a$2}from'../../../chunks/chunk-U6BTTEV6.js';var e=class e extends a{static create(){return document.createElement(e.tag)}static register(){a$1({[e.tag]:e});}render(){return a$2`
1
+ import {a}from'../../../chunks/chunk-72A5262S.js';import {a as a$1}from'../../../chunks/chunk-3A4KLILV.js';import {a as a$2}from'../../../chunks/chunk-MU6SADSF.js';var e=class e extends a{static create(){return document.createElement(e.tag)}static register(){a$1({[e.tag]:e});}render(){return a$2`
2
2
  <style>
3
3
  ${e.tag} {
4
4
  display: flex;
@@ -1,4 +1,4 @@
1
- import {a}from'../../../chunks/chunk-DVQH5JLR.js';import {a as a$1}from'../../../chunks/chunk-3A4KLILV.js';import {a as a$2}from'../../../chunks/chunk-U6BTTEV6.js';var t=class t extends a{static create(){return document.createElement(t.tag)}static register(){a$1({[t.tag]:t});}render(){return a$2`
1
+ import {a}from'../../../chunks/chunk-72A5262S.js';import {a as a$1}from'../../../chunks/chunk-3A4KLILV.js';import {a as a$2}from'../../../chunks/chunk-MU6SADSF.js';var t=class t extends a{static create(){return document.createElement(t.tag)}static register(){a$1({[t.tag]:t});}render(){return a$2`
2
2
  <style>
3
3
  ${t.tag} {
4
4
  display: flex;
@@ -1 +1 @@
1
- export{a as ProgressBar}from'../../../chunks/chunk-6FPW3MIJ.js';
1
+ export{a as ProgressBar}from'../../../chunks/chunk-EVI6U6CG.js';