@scandit/web-datacapture-barcode 8.2.1 → 8.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/js/{BarcodeBatch-BEVGY-bY.d.ts → BarcodeBatch-E9nmjbAE.d.ts} +2 -2
- package/build/js/BarcodeBatch.d.ts +1 -1
- package/build/js/BarcodeBatchAdvancedOverlay.d.ts +2 -2
- package/build/js/BarcodeBatchBasicOverlay.d.ts +1 -1
- package/build/js/BarcodeCapture.d.ts +1 -1
- package/build/js/BarcodeCaptureOverlay.d.ts +1 -1
- package/build/js/PrivateBarcodeBatchAdvancedOverlayListener.d.ts +1 -1
- package/build/js/PrivateBarcodeBatchBasicOverlayListener.d.ts +1 -1
- package/build/js/{SparkScanView-DUcwRAxm.d.ts → SparkScanView-Cwz62wQh.d.ts} +1 -1
- package/build/js/SymbologyDescription.d.ts +1 -1
- package/build/js/ar/BarcodeAr.js +1 -1
- package/build/js/ar/BarcodeArFeedback.js +1 -1
- package/build/js/ar/BarcodeArPresenter.js +1 -1
- package/build/js/ar/BarcodeArView.js +1 -1
- package/build/js/ar/ui/atoms/private/BarcodeArInfoAnnotationHeaderFooterUtils.d.ts +1 -1
- package/build/js/chunks/{chunk-J4KUL4XN.js → chunk-27DZ2VG6.js} +1 -1
- package/build/js/chunks/chunk-4IGF5Q5F.js +1 -0
- package/build/js/chunks/{chunk-AC3ULD45.js → chunk-6AMPUMFL.js} +1 -1
- package/build/js/chunks/{chunk-FAYWVBAS.js → chunk-6CMIVFB4.js} +1 -1
- package/build/js/chunks/chunk-E2CSA33X.js +2 -0
- package/build/js/chunks/{chunk-R6AWN5DL.js → chunk-FFFNRYWI.js} +1 -1
- package/build/js/chunks/{chunk-SBAQY2WJ.js → chunk-H44PKJHU.js} +1 -1
- package/build/js/chunks/{chunk-7VVWXFDF.js → chunk-HKNJ33J2.js} +1 -1
- package/build/js/chunks/{chunk-QEA62LQD.js → chunk-L3JFVEX6.js} +1 -1
- package/build/js/chunks/{chunk-64CJPZJB.js → chunk-OV2B6MJ5.js} +1 -1
- package/build/js/chunks/chunk-PGXSKHUL.js +1 -1
- package/build/js/chunks/chunk-RLWDCJ7V.js +1 -0
- package/build/js/chunks/{chunk-P6XHJNAK.js → chunk-RYWX55SL.js} +1 -1
- package/build/js/chunks/{chunk-F4ZXJ2AL.js → chunk-TOJVFOMK.js} +1 -1
- package/build/js/chunks/{chunk-UN5Y2KA6.js → chunk-UDG4V7SV.js} +1 -1
- package/build/js/find/BarcodeFindView.js +1 -1
- package/build/js/find/index.js +1 -1
- package/build/js/global.d.d.ts +2 -0
- package/build/js/index.d.ts +2 -2
- package/build/js/index.js +1 -1
- package/build/js/moduleLoader.js +1 -1
- package/build/js/private/SmartScanSelectionOverlay.d.ts +1 -1
- package/build/js/spark/SparkScanOverlay.d.ts +1 -1
- package/build/js/spark/SparkScanSettings.d.ts +5 -1
- package/build/js/spark/SparkScanSettings.js +1 -1
- package/build/js/spark/index.d.ts +1 -1
- package/build/js/spark/index.js +1 -1
- package/build/js/spark/ui/SparkScanView.d.ts +1 -1
- package/build/js/spark/ui/SparkScanView.js +1 -1
- package/build/js/spark/ui/SparkScanViewMiniPreview.js +1 -1
- package/build/js/spark/ui/SparkScanViewPresenter.d.ts +1 -1
- package/build/js/spark/ui/SparkScanViewPresenter.js +1 -1
- package/build/js/spark/ui/SparkScanViewToolbar.js +1 -1
- package/build/js/spark/ui/SparkScanViewUiListener.d.ts +1 -1
- package/build/js/spark/ui/index.d.ts +1 -1
- package/build/js/spark/ui/index.js +1 -1
- package/build/js/worker/BarcodeArMode.d.ts +1 -1
- package/build/js/worker/BarcodeBatchMode.d.ts +1 -1
- package/build/js/worker/BarcodeCaptureMode.d.ts +1 -1
- package/build/js/worker/BarcodeCaptureWorkerManager.d.ts +1 -1
- package/build/js/worker/BarcodeCaptureWorkerManager.js +1 -1
- package/build/js/worker/BarcodeFindMode.d.ts +1 -1
- package/build/js/worker/SparkScanMode.d.ts +1 -1
- package/build/js/worker/WorkerMain.d.ts +1 -1
- package/build/js/worker/WorkerMain.js +1 -1
- package/build/js/worker/barcodeCapture.inlineWorker.js +1 -1
- package/build/js/worker/dataCaptureEngine.d.ts +1 -1
- package/build/js/worker/dataCaptureEngine.js +1 -1
- package/build/js/worker/dataCaptureWorkerRelated.d.ts +1 -1
- package/build/js/worker/index.d.ts +1 -1
- package/package.json +7 -5
- package/sdc-lib/resources/models/aus_mdl_keypoint_detection.17f1b2958a9e.model +0 -0
- package/sdc-lib/resources/models/barcode_classification_default.48685f5fe19b.model +0 -0
- package/sdc-lib/resources/models/barcode_keypoints_oned.6697cfdb9ce4.model +0 -0
- package/sdc-lib/resources/models/barcode_label_localization_mslc_model_s.616a59ec3a8d.model +0 -0
- package/sdc-lib/resources/models/barcode_localization_default.59f74a846b63.model +0 -0
- package/sdc-lib/resources/models/barcode_localization_dpm_default.7e4fe5631f81.model +0 -0
- package/sdc-lib/resources/models/barcode_localization_generic_postal_code_default.184ecbeb5b83.model +0 -0
- package/sdc-lib/resources/models/barcode_localization_oned_default.c547484132c1.model +0 -0
- package/sdc-lib/resources/models/barcode_localization_twod_default.4b64523bf755.model +0 -0
- package/sdc-lib/resources/models/barcode_ocr_fallback_ocr_default.5bc76b6823da.model +0 -0
- package/sdc-lib/resources/models/barcode_ocr_fallback_ocr_detector_default.d955dfe2835e.model +0 -0
- package/sdc-lib/resources/models/barcode_semantics_ocr_detector_default.d955dfe2835e.model +0 -0
- package/sdc-lib/resources/models/eu_dl_localization.c26fc357c7bd.model +0 -0
- package/sdc-lib/resources/models/id_ocr.a4a57703430a.model +0 -0
- package/sdc-lib/resources/models/id_outline_localization_model_kpts.b7f16ab1f44c.model +0 -0
- package/sdc-lib/resources/models/invalidated_id_classification_default.1cd0f5859941.model +0 -0
- package/sdc-lib/resources/models/mrz_line_localization.577844e2ebed.model +0 -0
- package/sdc-lib/resources/models/mrz_localization.77e331c44b52.model +0 -0
- package/sdc-lib/resources/models/ocr_barcode_semantics_default.adb845cfe44c.model +0 -0
- package/sdc-lib/resources/models/ocr_mrz_default.08761e1a9c3b.model +0 -0
- package/sdc-lib/resources/models/ocr_price_label_default.4ad5b33a61d3.model +0 -0
- package/sdc-lib/resources/models/price_label_localization.a8a9771e8fcc.model +0 -0
- package/sdc-lib/resources/models/price_localization_in_whole_label.555b33695325.model +0 -0
- package/sdc-lib/resources/models/text_semantics_ocr_detector.fb3a9fc4fb56.model +0 -0
- package/sdc-lib/resources/models/uk_dl_code_localization.c26fc357c7bd.model +0 -0
- package/sdc-lib/resources/models/via_id_template_database.578ae388d1d7.model +0 -0
- package/sdc-lib/resources/models/via_orientation_classification.19281ecdf9b6.model +0 -0
- package/sdc-lib/scandit-datacapture-sdk-barcode-pthreads.js +1 -1
- package/sdc-lib/scandit-datacapture-sdk-barcode-pthreads.wasm +0 -0
- package/sdc-lib/scandit-datacapture-sdk-barcode-simd-pthreads.js +1 -1
- package/sdc-lib/scandit-datacapture-sdk-barcode-simd-pthreads.wasm +0 -0
- package/sdc-lib/scandit-datacapture-sdk-barcode-simd.js +1 -1
- package/sdc-lib/scandit-datacapture-sdk-barcode-simd.wasm +0 -0
- package/sdc-lib/scandit-datacapture-sdk-barcode.js +1 -1
- package/sdc-lib/scandit-datacapture-sdk-barcode.wasm +0 -0
- package/build/js/chunks/chunk-6E42EK3T.js +0 -1
- package/build/js/chunks/chunk-FT7V66CF.js +0 -1
- package/build/js/chunks/chunk-IYVUSV45.js +0 -2
- package/sdc-lib/resources/models/barcode_classification_default.fde280355f0b.model +0 -0
- package/sdc-lib/resources/models/barcode_keypoints_oned.ef764d7717ba.model +0 -0
- package/sdc-lib/resources/models/barcode_label_localization_mslc_model_s.77afd87bb1ae.model +0 -0
- package/sdc-lib/resources/models/barcode_localization_default.ea245fd6454e.model +0 -0
- package/sdc-lib/resources/models/barcode_localization_dpm_default.313e68d94ae1.model +0 -0
- package/sdc-lib/resources/models/barcode_localization_generic_postal_code_default.42a9746ffe91.model +0 -0
- package/sdc-lib/resources/models/barcode_localization_oned_default.33db0e688e2c.model +0 -0
- package/sdc-lib/resources/models/barcode_localization_twod_default.547ff0613d2c.model +0 -0
- package/sdc-lib/resources/models/barcode_ocr_fallback_ocr_default.8c2870b758fd.model +0 -0
- package/sdc-lib/resources/models/barcode_ocr_fallback_ocr_detector_default.9e7b3e9f0b6c.model +0 -0
- package/sdc-lib/resources/models/barcode_semantics_ocr_detector_default.9e7b3e9f0b6c.model +0 -0
- package/sdc-lib/resources/models/eu_dl_localization.d02cb8506d3f.model +0 -0
- package/sdc-lib/resources/models/id_ocr.1740d002ffbf.model +0 -0
- package/sdc-lib/resources/models/invalidated_id_classification_default.655732a12364.model +0 -0
- package/sdc-lib/resources/models/mrz_line_localization.4573c5a05b53.model +0 -0
- package/sdc-lib/resources/models/mrz_localization.c6b469e57923.model +0 -0
- package/sdc-lib/resources/models/ocr_barcode_semantics_default.b60d72805695.model +0 -0
- package/sdc-lib/resources/models/ocr_mrz_default.8b80192212c2.model +0 -0
- package/sdc-lib/resources/models/ocr_price_label_default.1d18eb896da3.model +0 -0
- package/sdc-lib/resources/models/price_label_localization.b1f6616d5e10.model +0 -0
- package/sdc-lib/resources/models/price_localization_in_whole_label.614fcbe425d2.model +0 -0
- package/sdc-lib/resources/models/text_semantics_ocr_detector.290bf42945e3.model +0 -0
- package/sdc-lib/resources/models/uk_dl_code_localization.d02cb8506d3f.model +0 -0
- /package/build/js/chunks/{chunk-Z2LBBBJM.js → chunk-43YBURRI.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-UDG4V7SV.js';import {a as a$1}from'./chunk-TRITJ43A.js';import {unknownErrorToString}from'@scandit/web-datacapture-core/build/js/private/utils/unknownErrorToString.js';import {WorkerMain}from'@scandit/web-datacapture-core/build/js/worker/index.js';var i=class extends WorkerMain{constructor(t,a$1){super(t,a$1),this.dataCaptureInstance=new a(a$1,{postMessage:this.postMessage.bind(this),getOffscreenCanvas:this.getOffscreenCanvas.bind(this)});}async respondWith(t,a,r){let d=null,e;try{e=r(),e instanceof Promise&&(e=await e);}catch(c){e=void 0,d=unknownErrorToString(c);}let s={type:"workerTaskId",command:t,id:a,payload:this.hasPayload(e)?e.payload:void 0};d!=null&&(s.error=d),this.postMessage(s,this.hasTransferables(e)?e.transferables:[]);}onMessage(t){switch(t.data.command){case "sparkScanEmitErrorFeedback":{let{data:a}=t;return this.respondWith(a.command,a.id,()=>{this.dataCaptureInstance.sparkScanMode.emitErrorFeedback(a.shouldRemoveBrush);}),true}case "sparkScanOverlayReadyForDraw":{let{data:a}=t;return this.respondWith(a.command,a.id,()=>{this.dataCaptureInstance.sparkScanMode.overlayReadyForDraw();}),true}case "sparkScanAnalyticsManagerPropertyChanged":{let{data:a}=t;return this.respondWith(a.command,a.id,async()=>{this.dataCaptureInstance.sparkScanMode.analyticsManagerPropertyChanged(a.property);}),true}case "sparkScanSelectItemWithSmartScanSelection":{let{data:a}=t;return this.respondWith(a.command,a.id,async()=>{this.dataCaptureInstance.sparkScanMode.selectItemWithSmartScanSelection();}),true}case "sparkScanModeRemove":{let{data:a}=t;return this.respondWith(a.command,a.id,async()=>this.dataCaptureInstance.sparkScanMode.removeMode()),true}case "barcodeFindForSettings":{let{data:a}=t;return this.respondWith(a.command,a.id,async()=>this.dataCaptureInstance.barcodeFindMode.forSettings(a.settings)),true}case "barcodeFindModeRemove":{let{data:a}=t;return this.respondWith(a.command,a.id,async()=>this.dataCaptureInstance.barcodeFindMode.removeMode()),true}case "barcodeFindSearchStart":return this.respondWith(t.data.command,t.data.id,()=>{this.dataCaptureInstance.barcodeFindMode.start();}),true;case "barcodeFindSearchPause":return this.respondWith(t.data.command,t.data.id,()=>{this.dataCaptureInstance.barcodeFindMode.pause();}),true;case "barcodeFindSearchStop":return this.respondWith(t.data.command,t.data.id,()=>{this.dataCaptureInstance.barcodeFindMode.stop();}),true;case "barcodeFindSetItemList":{let{data:a}=t;return this.respondWith(t.data.command,t.data.id,()=>{this.dataCaptureInstance.barcodeFindMode.setItemList(a.itemList);}),true}case "barcodeFindSetEnabled":{let{data:a}=t;return this.respondWith(t.data.command,t.data.id,()=>{this.dataCaptureInstance.barcodeFindMode.setEnabled(a.enabled);}),true}case "barcodeFindApplySettings":{let{data:a}=t;return this.respondWith(a.command,a.id,async()=>this.dataCaptureInstance.barcodeFindMode.applySettings(a.settings)),true}case "barcodeFindAddBasicOverlay":{let{data:a}=t;return this.respondWith(a.command,a.id,async()=>{this.dataCaptureInstance.barcodeFindMode.addBasicOverlay();}),true}case "barcodeFindRemoveBasicOverlay":{let{data:a}=t;return this.respondWith(a.command,a.id,async()=>{this.dataCaptureInstance.barcodeFindMode.removeBasicOverlay();}),true}case "barcodeFindUpdateBasicOverlay":{let{data:a}=t;return this.respondWith(a.command,a.id,async()=>{this.dataCaptureInstance.barcodeFindMode.updateBasicOverlay(a.jsonOverlay);}),true}case "barcodeFindSetTransformerFunction":{let{data:a}=t;return this.respondWith(a.command,a.id,async()=>{let r=a$1(a.functionAsString);this.dataCaptureInstance.barcodeFindMode.setTransformerFunction(r);}),true}case "barcodeArForSettings":{let{data:a}=t;return this.respondWith(a.command,a.id,async()=>this.dataCaptureInstance.barcodeArMode.forSettings(a.settings)),true}case "barcodeArModeRemove":{let{data:a}=t;return this.respondWith(a.command,a.id,async()=>this.dataCaptureInstance.barcodeArMode.removeMode()),true}case "barcodeArSearchStart":return this.respondWith(t.data.command,t.data.id,()=>{this.dataCaptureInstance.barcodeArMode.start();}),true;case "barcodeArSearchPause":return this.respondWith(t.data.command,t.data.id,()=>{this.dataCaptureInstance.barcodeArMode.pause();}),true;case "barcodeArSearchStop":return this.respondWith(t.data.command,t.data.id,()=>{this.dataCaptureInstance.barcodeArMode.stop();}),true;case "barcodeArSetEnabled":{let{data:a}=t;return this.respondWith(t.data.command,t.data.id,()=>{this.dataCaptureInstance.barcodeArMode.setEnabled(a.enabled);}),true}case "barcodeArApplySettings":{let{data:a}=t;return this.respondWith(a.command,a.id,async()=>{this.dataCaptureInstance.barcodeArMode.applySettings(a.settings);}),true}default:return super.onMessage(t)}}};export{i as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-43YBURRI.js';import {TorchState,isCameraFrameSource,Camera,CameraPosition,FrameSourceState}from'@scandit/web-datacapture-core';var l=class{constructor(e,t,a,o,r){this.torchState=TorchState.Off;this.cameraSupportMap=new Map;this.zoomFactor=1;this.cameras=[];this.view=e,this.context=t,this.barcodeAr=a,this.viewSettings=o,this.cameraSettings=r;}get currentCamera(){if(isCameraFrameSource(this.context.frameSource))return this.context.frameSource;throw new Error("The current frame source is not a Camera")}isCameraMirrored(){return this.currentCamera.getMirrorImageEnabled()}async prepare(){var a$1,o,r;await this.barcodeAr.setEnabled(false),this.barcodeAr.feedback=await a.createWithOptions(true,true),this.barcodeAr.addPrivateListener(this),this.cameras=await Camera.getAll(false,isCameraFrameSource(this.context.frameSource));let e=isCameraFrameSource(this.context.frameSource)?this.context.frameSource:(r=(o=(a$1=this.cameras.find(s=>s.position===this.viewSettings.defaultCameraPosition))!=null?a$1:this.cameras.find(s=>s.position===(this.viewSettings.defaultCameraPosition===CameraPosition.WorldFacing?CameraPosition.UserFacing:CameraPosition.WorldFacing)))!=null?o:this.cameras[0])!=null?r:Camera.pickBestGuess();await this.context.setFrameSource(e),await this.currentCamera.applySettings(this.cameraSettings),await this.currentCamera.switchToDesiredState(FrameSourceState.Standby),this.zoomFactor=this.currentCamera.settings.zoomFactor,this.view.changeZoomButtonIcon(this.zoomFactor);let t=await this.isTorchAvailableForCurrentCamera();this.view.setTorchAvailable(t);}async dispose(){var e;this.view.deleteAllViews(),await this.context.removeMode(this.barcodeAr),this.barcodeAr.removePrivateListener(this),await((e=this.context.frameSource)==null?void 0:e.switchToDesiredState(FrameSourceState.Off));}async startSearching(){var e;this.view.deleteAllViews(),await((e=this.context.frameSource)==null?void 0:e.switchToDesiredState(FrameSourceState.On)),await this.barcodeAr.setEnabled(true),await this.barcodeAr.start();}async stopSearching(){var e;this.view.deleteAllViews(),await((e=this.context.frameSource)==null?void 0:e.switchToDesiredState(FrameSourceState.Off)),await this.barcodeAr.setEnabled(false),await this.barcodeAr.stop();}async pauseSearching(){var e;this.view.deletePendingViews(),await((e=this.context.frameSource)==null?void 0:e.switchToDesiredState(FrameSourceState.Standby)),await this.barcodeAr.setEnabled(false),await this.barcodeAr.pause();}emitTappedFeedback(){this.barcodeAr.feedback.tapped.emit();}didUpdateSession(e,t){Object.keys(t.addedTrackedBarcodes).length>0&&this.barcodeAr.feedback.scanned.emit(),this.view.render(t);}async isTorchAvailableForCurrentCamera(){let e=this.currentCamera.label,t=this.cameraSupportMap.get(e);if(t!==void 0)return t.torch;let a=await this.currentCamera.isTorchAvailable();return this.cameraSupportMap.set(e,{torch:a}),a}async onTorchButtonClicked(){let e=await this.isTorchAvailableForCurrentCamera();this.view.setTorchAvailable(e),e&&(await this.currentCamera.setDesiredTorchState(this.torchState===TorchState.Off?TorchState.On:TorchState.Off),this.torchState=this.torchState===TorchState.Off?TorchState.On:TorchState.Off,this.view.toggleTorchIcon(this.torchState));}async onZoomButtonClicked(){var t;if(!this.currentCamera.isZoomAvailable())return;let e=(t={1:2,2:1}[this.zoomFactor])!=null?t:1;this.currentCamera.settings.zoomFactor=e,await this.currentCamera.applySettings(this.currentCamera.settings),this.zoomFactor=e,this.view.changeZoomButtonIcon(e);}async onCameraSwitchButtonClicked(){var r,s;let e=this.currentCamera.getCurrentState(),t=this.currentCamera.position===CameraPosition.UserFacing?CameraPosition.WorldFacing:CameraPosition.UserFacing,a=(s=(r=this.cameras.find(u=>u.position===t))!=null?r:this.cameras[0])!=null?s:Camera.pickBestGuessForPosition(t);await this.context.setFrameSource(a),await this.currentCamera.switchToDesiredState(e);let o=await this.isTorchAvailableForCurrentCamera();this.view.setTorchAvailable(o);}};export{l as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$2}from'./chunk-LWUFGA5M.js';import {a as a$1}from'./chunk-6E42EK3T.js';import {a as a$6,b as b$3}from'./chunk-NZCSU4S2.js';import {b}from'./chunk-LGPC7KMW.js';import {a as a$5,b as b$2}from'./chunk-OPL5NVVM.js';import {h,g as g$2}from'./chunk-4PYZSS3H.js';import {g as g$1}from'./chunk-DVHTYKDX.js';import {a as a$3}from'./chunk-5Q3AHWJL.js';import {j,i,f,a,g,n}from'./chunk-4JEIREAU.js';import {c,e,a as a$4,b as b$1}from'./chunk-YBD5JYCX.js';import {Point}from'@scandit/web-datacapture-core';import {ScanditHTMLElement,defineCustomElements,safeAwaitAnimation,safeCancelAnimation,html,Timeout}from'@scandit/web-datacapture-core/build/js/private/utils/index.js';var q=(i=>(i.ResizeButton="resizeButton",i.ZoomButton="zoomButton",i.TorchButton="torchButton",i.CloseButton="closeButton",i))(q||{}),D=1200,w=class w extends ScanditHTMLElement{constructor(){super(...arguments);this.resizeButtonTapListener=this.onResizeButtonTap.bind(this);this.zoomButtonTapListener=this.onZoomButtonTap.bind(this);this.torchButtonTapListener=this.onTorchButtonTap.bind(this);this.closeButtonTapListener=this.onCloseButtonTap.bind(this);this.pointerDownListener=this.onPointerDown.bind(this);this.longPressStartListener=this.onLongPressStart.bind(this);this.toolbarVisibilityChangeListener=this.onToolbarVisibilityChange.bind(this);this.longPressEndListener=this.onLongPressEnd.bind(this);this.dragEndListener=this.onDragEnd.bind(this);this.fadeOutAnimation=new Animation(new KeyframeEffect(this,[{opacity:1},{opacity:0}],{duration:500,fill:"both"}));this.replayFadeOutTimeout=null;this.longPressController=new b(this);}get visible(){return this.hasAttribute("visible")}set visible(t){this.toggleAttribute("visible",t),this.dispatchEvent(new CustomEvent(h,{detail:{visible:t}}));}get size(){return this.expanded?"expanded":"regular"}set size(t){var i;this.toggleAttribute("expanded",t==="expanded");let o=this.getNextTranslate();(i=this.dragController)==null||i.translateTo(o,false).then(()=>{var n;return (n=this.dragController)==null?void 0:n.repositionIfOutOfBounds()});}get expanded(){return this.hasAttribute("expanded")}set useViewportBounds(t){this.dragController&&(this.dragController.useViewportBounds=t);}get[a](){var t;return Number((t=this.getAttribute(a))!=null?t:"1")}set[a](t){this.setAttribute(a,String(t));}get darkened(){return this.hasAttribute("darkened")}set darkened(t){this.toggleAttribute("darkened",t);}get orientation(){var t;return (t=this.getAttribute("orientation"))!=null?t:"portrait-primary"}set orientation(t){this.setAttribute("orientation",t);}get[g](){return this.hasAttribute(g)}set[g](t){this.toggleAttribute(g,t);}get[j](){return this.hasAttribute(j)}set[j](t){this.toggleAttribute(j,t);}get[i](){return this.hasAttribute(i)}set[i](t){this.toggleAttribute(i,t);}get[f](){return this.hasAttribute(f)}set[f](t){this.toggleAttribute(f,t);}get[n](){return this.hasAttribute(n)}set[n](t){this.toggleAttribute(n,t);}get cover(){return this.hasAttribute("cover")}set cover(t){this.toggleAttribute("cover",t);}get pressed(){return this.hasAttribute("pressed")}set pressed(t){this.toggleAttribute("pressed",t);}static create(){return defineCustomElements({[b$1]:w,[a$4]:a$3,[e]:a$2,[c]:a$1}),document.createElement(b$1)}repositionIfOutOfBounds(){var t;(t=this.dragController)==null||t.repositionIfOutOfBounds();}showToast(t,o,i){this.toast.show(t,o,i);}hideToast(){this.toast.hide();}zoomIn(){this.zoomButton&&(this[a]=2,this.zoomButton.textContent="2x",this.showToast("warning","2x zoom",1e3));}zoomOut(){this.zoomButton&&(this[a]=1,this.zoomButton.textContent="1x",this.showToast("info","1x zoom",1e3));}async fadeOut(){this.fadeOutAnimation.play(),await safeAwaitAnimation(this.fadeOutAnimation),this.visible=false;}cancelFadeOut(){var t;(t=this.replayFadeOutTimeout)==null||t.stop(),safeCancelAnimation(this.fadeOutAnimation);}async rewindAnimation(){var t,o;(((t=this.replayFadeOutTimeout)==null?void 0:t.running)===true||this.fadeOutAnimation.playState!=="idle")&&(this.cancelFadeOut(),(o=this.replayFadeOutTimeout)==null||o.start());}translateTo(t){var o;(o=this.dragController)==null||o.translateTo(t,false);}render(){var t,o,i$1,n$1,a$1,l,b;this.innerHTML=html`<spark-scan-view-toast></spark-scan-view-toast><div id="host"></div><div id="controls"><div id="button-container-list"><div class="button-container"><button id="torchButton" class="${b$1}__button"><spark-scan-view-icon icon="torchOff" fill="white" size="9"></spark-scan-view-icon></button><button id="closeButton" class="${b$1}__button"><spark-scan-view-icon icon="close" fill="white" size="9"></spark-scan-view-icon></button></div><div class="button-container"><button id="resizeButton" class="${b$1}__button"><spark-scan-view-icon icon="expand" fill="white" size="14"></spark-scan-view-icon></button><button id="zoomButton" class="${b$1}__button">${this[a]}x</button></div></div></div><spark-scan-view-toolbar></spark-scan-view-toolbar><div id="overlay"></div><style>${b$1}{position:absolute;top:0;left:0;display:none;background:var(${g$1});border-radius:16px;filter:drop-shadow(0px 2px 6px #${a$5.toJSON()}) drop-shadow(0px 1px 2px #${b$2.toJSON()});transition:filter .3s ease;z-index:100}${b$1}[unconstrained]{position:fixed;z-index:10000}${b$1},${b$1} #overlay{width:var(--dvw-half);height:var(--dvw-half);min-width:192px;min-height:192px;max-width:min(250px,var(--dvw-half));max-height:min(250px,var(--dvw-half))}@media (orientation:landscape){${b$1},${b$1} #overlay{width:var(--dvh-half);height:var(--dvh-half);max-width:min(250px,var(--dvh-half));max-height:min(250px,var(--dvh-half))}}@media screen (min-width:768px) and (orientation:portrait){${b$1},${b$1} #overlay{max-width:min(375px,var(--dvw-half));max-height:min(375px,var(--dvw-half))}}@media screen (min-width:768px) and (orientation:landscape){${b$1},${b$1} #overlay{max-width:min(375px,var(--dvh-half));max-height:min(375px,var(--dvh-half))}}${b$1}[visible]{display:flex;flex-flow:column}${b$1}[expanded],${b$1}[expanded] #overlay{width:calc(var(--dvw) - ${32}px);height:calc(var(--dvh-half) - ${32}px);max-width:min(400px,calc(var(--dvw) - ${32}px));max-height:min(400px,calc(var(--dvh-half) - ${32}px))}${b$1}[pressed]{filter:drop-shadow(0px 4px 4px #${b$2.toJSON()}) drop-shadow(0px 8px 12px #${a$5.toJSON()})}@media (orientation:landscape){${b$1}[expanded],${b$1}[expanded] #overlay{width:calc(var(--dvh-half) - ${32}px);height:calc(var(--dvh) - ${32}px);max-width:min(400px,calc(var(--dvh-half) - ${32}px));max-height:min(400px,calc(var(--dvh) - ${32}px))}}spark-scan-view-toast{position:absolute;top:16px;left:50%;transform:translateX(-50%);z-index:20}${b$1} #host,${b$1} #host *{width:100%;border-radius:16px}${b$1} #host{height:calc(100% - 48px);z-index:-10}${b$1}[cover] #host{height:100%}${b$1} #controls{position:absolute;top:0;width:100%;height:100%;display:grid;grid-template-rows:auto max-content;box-sizing:border-box}${b$1} #button-container-list{width:100%;height:calc(100% - 48px);display:flex;flex-flow:column;justify-content:space-between}${b$1}[cover] #button-container-list{height:100%}${b$1} .button-container{padding:12px;display:flex;justify-content:flex-end;align-items:center}${b$1}[${f}] .button-container:first-of-type,${b$1}[${j}] .button-container:nth-of-type(2){justify-content:space-between}.${b$1}__button{display:flex;justify-content:center;align-items:center;width:24px;height:24px;border:none;background:rgba(18,22,25,.5);color:#fff;font-family:Arial,Helvetica,sans-serif;font-size:14px;font-weight:500;border-radius:50%}${b$1} #torchButton,${b$1} #closeButton,${b$1} #resizeButton,${b$1} #zoomButton{display:none}${b$1}[${f}] #torchButton,${b$1}[${j}] #resizeButton{display:flex}${b$1}[${n}] #closeButton,${b$1}[${i}] #zoomButton{display:flex;align-self:end}${b$1} #overlay{position:absolute;z-index:10;top:0;left:0;background:#000;border-radius:16px;opacity:0;transition:opacity .3s ease;pointer-events:none}${b$1}[darkened] #overlay{opacity:.3}</style>`,this.toast=this.querySelector("spark-scan-view-toast"),this.host=this.querySelector("#host"),this.resizeButton=this.querySelector("#resizeButton"),(t=this.resizeButton)==null||t.addEventListener("pointerup",this.resizeButtonTapListener),this.resizeButtonIcon=(o=this.resizeButton)==null?void 0:o.querySelector("spark-scan-view-icon"),this.zoomButton=this.querySelector("#zoomButton"),(i$1=this.zoomButton)==null||i$1.addEventListener("pointerup",this.zoomButtonTapListener),this.torchButton=this.querySelector("#torchButton"),(n$1=this.torchButton)==null||n$1.addEventListener("pointerup",this.torchButtonTapListener),this.torchButtonIcon=(a$1=this.torchButton)==null?void 0:a$1.querySelector("spark-scan-view-icon"),this.closeButton=this.querySelector("#closeButton"),(l=this.closeButton)==null||l.addEventListener("pointerup",this.closeButtonTapListener),this.toolbar=this.querySelector(c),(b=this.toolbar)==null||b.addEventListener("toolbarvisibilitychange",this.toolbarVisibilityChangeListener),this.buttonContainerList=this.querySelector("#button-container-list");}onResizeButtonTap(t){t.stopPropagation(),this.size={regular:"expanded",expanded:"regular"}[this.size],this.resizeButtonIcon&&(this.resizeButtonIcon.icon=this.expanded?"shrink":"expand"),this.dispatchEvent(new CustomEvent(g$2,{detail:{tapped:"resizeButton",expanded:this.expanded}}));}onZoomButtonTap(t){switch(t.stopPropagation(),this[a]){case 1:{this.zoomIn();break}case 2:{this.zoomOut();break}}this.dispatchEvent(new CustomEvent(g$2,{detail:{tapped:"zoomButton",zoomFactor:this[a]}}));}onTorchButtonTap(t){t.stopPropagation(),this[g]=!this[g],this.torchButtonIcon&&(this.torchButtonIcon.icon=this[g]?"torchOn":"torchOff"),this.dispatchEvent(new CustomEvent(g$2,{detail:{tapped:"torchButton",enabled:this[g]}}));}onCloseButtonTap(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent(g$2,{detail:{tapped:"closeButton"}}));}onPointerDown(){this.dragController&&(this.dragController.draggable=false),this.rewindAnimation();}onLongPressStart(){this.dragController&&(this.dragController.draggable=true),this.pressed=true;}onLongPressEnd(){this.pressed=false;}onDragEnd(t){t instanceof a$6&&(this.lastKnownTranslate=t.point);}onToolbarVisibilityChange(){this.cover=!this.toolbar||this.toolbar.hidden;}connectedCallback(){var t,o;this.rootElement=(t=this.parentElement)==null?void 0:t.parentElement,this.dragController=new b$3(this,this.rootElement),this.replayFadeOutTimeout=new Timeout(D,async()=>{await this.fadeOut();}),this.render(),this.addEventListener("pointerdown",this.pointerDownListener),this.addEventListener("longpressstart",this.longPressStartListener),this.addEventListener("longpressend",this.longPressEndListener),this.addEventListener("dragend",this.dragEndListener),this.dragController.connect(),this.longPressController.connect(),this.buttonContainerList&&((o=this.toolbar)!=null&&o.firstElementChild)&&(this.longPressController.elementsAllowedToTriggerLongPressEvents.add(this.buttonContainerList),this.longPressController.elementsAllowedToTriggerLongPressEvents.add(this.toolbar.firstElementChild)),this.dragController.margin=new Point(16,16);}disconnectedCallback(){var t,o,i,n,a,l,b;(t=this.resizeButton)==null||t.removeEventListener("pointerup",this.resizeButtonTapListener),(o=this.zoomButton)==null||o.removeEventListener("pointerup",this.zoomButtonTapListener),(i=this.torchButton)==null||i.removeEventListener("pointerup",this.torchButtonTapListener),(n=this.closeButton)==null||n.removeEventListener("pointerup",this.closeButtonTapListener),(a=this.toolbar)==null||a.removeEventListener("toolbarvisibilitychange",this.toolbarVisibilityChangeListener),this.removeEventListener("pointerdown",this.pointerDownListener),this.removeEventListener("longpressstart",this.longPressStartListener),this.removeEventListener("longpressend",this.longPressEndListener),this.removeEventListener("dragend",this.dragEndListener),safeCancelAnimation(this.fadeOutAnimation),(l=this.replayFadeOutTimeout)==null||l.stop(),(b=this.dragController)==null||b.disconnect(),this.longPressController.disconnect();}getNextTranslate(){var n,a,l;let t=((n=this.rootElement)==null?void 0:n.clientWidth)||document.body.clientWidth,o=((a=this.rootElement)==null?void 0:a.clientHeight)||document.body.clientHeight;if(!this.dragController)return new Point(0,0);if(this.size==="regular")return (l=this.lastKnownTranslate)!=null?l:this.dragController.translate;this.lastKnownTranslate=this.dragController.translate;let i=this.dragController.translate;return (this.orientation==="portrait-primary"||this.orientation==="portrait-secondary")&&this.dragController.translate.x>16&&(i=new Point(16,i.y)),(this.orientation==="landscape-primary"||this.orientation==="landscape-secondary")&&this.dragController.translate.x>t-this.clientWidth-16&&(i=new Point(t-this.clientWidth-16,i.y)),this.dragController.translate.y>o-this.clientHeight-16&&(i=new Point(i.x,o-this.clientHeight-16)),i}};w.observedAttributes=[j,i,f];var O=w;export{q as a,O as b};
|
|
1
|
+
import {a as a$2}from'./chunk-LWUFGA5M.js';import {a as a$1}from'./chunk-RLWDCJ7V.js';import {a as a$6,b as b$3}from'./chunk-NZCSU4S2.js';import {b}from'./chunk-LGPC7KMW.js';import {a as a$5,b as b$2}from'./chunk-OPL5NVVM.js';import {h,g as g$2}from'./chunk-4PYZSS3H.js';import {g as g$1}from'./chunk-DVHTYKDX.js';import {a as a$3}from'./chunk-5Q3AHWJL.js';import {j,i,f,a,g,n}from'./chunk-4JEIREAU.js';import {c,e,a as a$4,b as b$1}from'./chunk-YBD5JYCX.js';import {Point}from'@scandit/web-datacapture-core';import {ScanditHTMLElement,defineCustomElements,safeAwaitAnimation,safeCancelAnimation,html,Timeout}from'@scandit/web-datacapture-core/build/js/private/utils/index.js';var q=(i=>(i.ResizeButton="resizeButton",i.ZoomButton="zoomButton",i.TorchButton="torchButton",i.CloseButton="closeButton",i))(q||{}),D=1200,w=class w extends ScanditHTMLElement{constructor(){super(...arguments);this.resizeButtonTapListener=this.onResizeButtonTap.bind(this);this.zoomButtonTapListener=this.onZoomButtonTap.bind(this);this.torchButtonTapListener=this.onTorchButtonTap.bind(this);this.closeButtonTapListener=this.onCloseButtonTap.bind(this);this.pointerDownListener=this.onPointerDown.bind(this);this.longPressStartListener=this.onLongPressStart.bind(this);this.toolbarVisibilityChangeListener=this.onToolbarVisibilityChange.bind(this);this.longPressEndListener=this.onLongPressEnd.bind(this);this.dragEndListener=this.onDragEnd.bind(this);this.fadeOutAnimation=new Animation(new KeyframeEffect(this,[{opacity:1},{opacity:0}],{duration:500,fill:"both"}));this.replayFadeOutTimeout=null;this.longPressController=new b(this);}get visible(){return this.hasAttribute("visible")}set visible(t){this.toggleAttribute("visible",t),this.dispatchEvent(new CustomEvent(h,{detail:{visible:t}}));}get size(){return this.expanded?"expanded":"regular"}set size(t){var i;this.toggleAttribute("expanded",t==="expanded");let o=this.getNextTranslate();(i=this.dragController)==null||i.translateTo(o,false).then(()=>{var n;return (n=this.dragController)==null?void 0:n.repositionIfOutOfBounds()});}get expanded(){return this.hasAttribute("expanded")}set useViewportBounds(t){this.dragController&&(this.dragController.useViewportBounds=t);}get[a](){var t;return Number((t=this.getAttribute(a))!=null?t:"1")}set[a](t){this.setAttribute(a,String(t));}get darkened(){return this.hasAttribute("darkened")}set darkened(t){this.toggleAttribute("darkened",t);}get orientation(){var t;return (t=this.getAttribute("orientation"))!=null?t:"portrait-primary"}set orientation(t){this.setAttribute("orientation",t);}get[g](){return this.hasAttribute(g)}set[g](t){this.toggleAttribute(g,t);}get[j](){return this.hasAttribute(j)}set[j](t){this.toggleAttribute(j,t);}get[i](){return this.hasAttribute(i)}set[i](t){this.toggleAttribute(i,t);}get[f](){return this.hasAttribute(f)}set[f](t){this.toggleAttribute(f,t);}get[n](){return this.hasAttribute(n)}set[n](t){this.toggleAttribute(n,t);}get cover(){return this.hasAttribute("cover")}set cover(t){this.toggleAttribute("cover",t);}get pressed(){return this.hasAttribute("pressed")}set pressed(t){this.toggleAttribute("pressed",t);}static create(){return defineCustomElements({[b$1]:w,[a$4]:a$3,[e]:a$2,[c]:a$1}),document.createElement(b$1)}repositionIfOutOfBounds(){var t;(t=this.dragController)==null||t.repositionIfOutOfBounds();}showToast(t,o,i){this.toast.show(t,o,i);}hideToast(){this.toast.hide();}zoomIn(){this.zoomButton&&(this[a]=2,this.zoomButton.textContent="2x",this.showToast("warning","2x zoom",1e3));}zoomOut(){this.zoomButton&&(this[a]=1,this.zoomButton.textContent="1x",this.showToast("info","1x zoom",1e3));}async fadeOut(){this.fadeOutAnimation.play(),await safeAwaitAnimation(this.fadeOutAnimation),this.visible=false;}cancelFadeOut(){var t;(t=this.replayFadeOutTimeout)==null||t.stop(),safeCancelAnimation(this.fadeOutAnimation);}async rewindAnimation(){var t,o;(((t=this.replayFadeOutTimeout)==null?void 0:t.running)===true||this.fadeOutAnimation.playState!=="idle")&&(this.cancelFadeOut(),(o=this.replayFadeOutTimeout)==null||o.start());}translateTo(t){var o;(o=this.dragController)==null||o.translateTo(t,false);}render(){var t,o,i$1,n$1,a$1,l,b;this.innerHTML=html`<spark-scan-view-toast></spark-scan-view-toast><div id="host"></div><div id="controls"><div id="button-container-list"><div class="button-container"><button id="torchButton" class="${b$1}__button"><spark-scan-view-icon icon="torchOff" fill="white" size="9"></spark-scan-view-icon></button><button id="closeButton" class="${b$1}__button"><spark-scan-view-icon icon="close" fill="white" size="9"></spark-scan-view-icon></button></div><div class="button-container"><button id="resizeButton" class="${b$1}__button"><spark-scan-view-icon icon="expand" fill="white" size="14"></spark-scan-view-icon></button><button id="zoomButton" class="${b$1}__button">${this[a]}x</button></div></div></div><spark-scan-view-toolbar></spark-scan-view-toolbar><div id="overlay"></div><style>${b$1}{position:absolute;top:0;left:0;display:none;background:var(${g$1});border-radius:16px;filter:drop-shadow(0px 2px 6px #${a$5.toJSON()}) drop-shadow(0px 1px 2px #${b$2.toJSON()});transition:filter .3s ease;z-index:100}${b$1}[unconstrained]{position:fixed;z-index:10000}${b$1},${b$1} #overlay{width:var(--dvw-half);height:var(--dvw-half);min-width:192px;min-height:192px;max-width:min(250px,var(--dvw-half));max-height:min(250px,var(--dvw-half))}@media (orientation:landscape){${b$1},${b$1} #overlay{width:var(--dvh-half);height:var(--dvh-half);max-width:min(250px,var(--dvh-half));max-height:min(250px,var(--dvh-half))}}@media screen (min-width:768px) and (orientation:portrait){${b$1},${b$1} #overlay{max-width:min(375px,var(--dvw-half));max-height:min(375px,var(--dvw-half))}}@media screen (min-width:768px) and (orientation:landscape){${b$1},${b$1} #overlay{max-width:min(375px,var(--dvh-half));max-height:min(375px,var(--dvh-half))}}${b$1}[visible]{display:flex;flex-flow:column}${b$1}[expanded],${b$1}[expanded] #overlay{width:calc(var(--dvw) - ${32}px);height:calc(var(--dvh-half) - ${32}px);max-width:min(400px,calc(var(--dvw) - ${32}px));max-height:min(400px,calc(var(--dvh-half) - ${32}px))}${b$1}[pressed]{filter:drop-shadow(0px 4px 4px #${b$2.toJSON()}) drop-shadow(0px 8px 12px #${a$5.toJSON()})}@media (orientation:landscape){${b$1}[expanded],${b$1}[expanded] #overlay{width:calc(var(--dvh-half) - ${32}px);height:calc(var(--dvh) - ${32}px);max-width:min(400px,calc(var(--dvh-half) - ${32}px));max-height:min(400px,calc(var(--dvh) - ${32}px))}}spark-scan-view-toast{position:absolute;top:16px;left:50%;transform:translateX(-50%);z-index:20}${b$1} #host,${b$1} #host *{width:100%;border-radius:16px}${b$1} #host{height:calc(100% - 48px);z-index:-10}${b$1}[cover] #host{height:100%}${b$1} #controls{position:absolute;top:0;width:100%;height:100%;display:grid;grid-template-rows:auto max-content;box-sizing:border-box}${b$1} #button-container-list{width:100%;height:calc(100% - 48px);display:flex;flex-flow:column;justify-content:space-between}${b$1}[cover] #button-container-list{height:100%}${b$1} .button-container{padding:12px;display:flex;justify-content:flex-end;align-items:center}${b$1}[${f}] .button-container:first-of-type,${b$1}[${j}] .button-container:nth-of-type(2){justify-content:space-between}.${b$1}__button{display:flex;justify-content:center;align-items:center;width:24px;height:24px;border:none;background:rgba(18,22,25,.5);color:#fff;font-family:Arial,Helvetica,sans-serif;font-size:14px;font-weight:500;border-radius:50%}${b$1} #torchButton,${b$1} #closeButton,${b$1} #resizeButton,${b$1} #zoomButton{display:none}${b$1}[${f}] #torchButton,${b$1}[${j}] #resizeButton{display:flex}${b$1}[${n}] #closeButton,${b$1}[${i}] #zoomButton{display:flex;align-self:end}${b$1} #overlay{position:absolute;z-index:10;top:0;left:0;background:#000;border-radius:16px;opacity:0;transition:opacity .3s ease;pointer-events:none}${b$1}[darkened] #overlay{opacity:.3}</style>`,this.toast=this.querySelector("spark-scan-view-toast"),this.host=this.querySelector("#host"),this.resizeButton=this.querySelector("#resizeButton"),(t=this.resizeButton)==null||t.addEventListener("pointerup",this.resizeButtonTapListener),this.resizeButtonIcon=(o=this.resizeButton)==null?void 0:o.querySelector("spark-scan-view-icon"),this.zoomButton=this.querySelector("#zoomButton"),(i$1=this.zoomButton)==null||i$1.addEventListener("pointerup",this.zoomButtonTapListener),this.torchButton=this.querySelector("#torchButton"),(n$1=this.torchButton)==null||n$1.addEventListener("pointerup",this.torchButtonTapListener),this.torchButtonIcon=(a$1=this.torchButton)==null?void 0:a$1.querySelector("spark-scan-view-icon"),this.closeButton=this.querySelector("#closeButton"),(l=this.closeButton)==null||l.addEventListener("pointerup",this.closeButtonTapListener),this.toolbar=this.querySelector(c),(b=this.toolbar)==null||b.addEventListener("toolbarvisibilitychange",this.toolbarVisibilityChangeListener),this.buttonContainerList=this.querySelector("#button-container-list");}onResizeButtonTap(t){t.stopPropagation(),this.size={regular:"expanded",expanded:"regular"}[this.size],this.resizeButtonIcon&&(this.resizeButtonIcon.icon=this.expanded?"shrink":"expand"),this.dispatchEvent(new CustomEvent(g$2,{detail:{tapped:"resizeButton",expanded:this.expanded}}));}onZoomButtonTap(t){switch(t.stopPropagation(),this[a]){case 1:{this.zoomIn();break}case 2:{this.zoomOut();break}}this.dispatchEvent(new CustomEvent(g$2,{detail:{tapped:"zoomButton",zoomFactor:this[a]}}));}onTorchButtonTap(t){t.stopPropagation(),this[g]=!this[g],this.torchButtonIcon&&(this.torchButtonIcon.icon=this[g]?"torchOn":"torchOff"),this.dispatchEvent(new CustomEvent(g$2,{detail:{tapped:"torchButton",enabled:this[g]}}));}onCloseButtonTap(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent(g$2,{detail:{tapped:"closeButton"}}));}onPointerDown(){this.dragController&&(this.dragController.draggable=false),this.rewindAnimation();}onLongPressStart(){this.dragController&&(this.dragController.draggable=true),this.pressed=true;}onLongPressEnd(){this.pressed=false;}onDragEnd(t){t instanceof a$6&&(this.lastKnownTranslate=t.point);}onToolbarVisibilityChange(){this.cover=!this.toolbar||this.toolbar.hidden;}connectedCallback(){var t,o;this.rootElement=(t=this.parentElement)==null?void 0:t.parentElement,this.dragController=new b$3(this,this.rootElement),this.replayFadeOutTimeout=new Timeout(D,async()=>{await this.fadeOut();}),this.render(),this.addEventListener("pointerdown",this.pointerDownListener),this.addEventListener("longpressstart",this.longPressStartListener),this.addEventListener("longpressend",this.longPressEndListener),this.addEventListener("dragend",this.dragEndListener),this.dragController.connect(),this.longPressController.connect(),this.buttonContainerList&&((o=this.toolbar)!=null&&o.firstElementChild)&&(this.longPressController.elementsAllowedToTriggerLongPressEvents.add(this.buttonContainerList),this.longPressController.elementsAllowedToTriggerLongPressEvents.add(this.toolbar.firstElementChild)),this.dragController.margin=new Point(16,16);}disconnectedCallback(){var t,o,i,n,a,l,b;(t=this.resizeButton)==null||t.removeEventListener("pointerup",this.resizeButtonTapListener),(o=this.zoomButton)==null||o.removeEventListener("pointerup",this.zoomButtonTapListener),(i=this.torchButton)==null||i.removeEventListener("pointerup",this.torchButtonTapListener),(n=this.closeButton)==null||n.removeEventListener("pointerup",this.closeButtonTapListener),(a=this.toolbar)==null||a.removeEventListener("toolbarvisibilitychange",this.toolbarVisibilityChangeListener),this.removeEventListener("pointerdown",this.pointerDownListener),this.removeEventListener("longpressstart",this.longPressStartListener),this.removeEventListener("longpressend",this.longPressEndListener),this.removeEventListener("dragend",this.dragEndListener),safeCancelAnimation(this.fadeOutAnimation),(l=this.replayFadeOutTimeout)==null||l.stop(),(b=this.dragController)==null||b.disconnect(),this.longPressController.disconnect();}getNextTranslate(){var n,a,l;let t=((n=this.rootElement)==null?void 0:n.clientWidth)||document.body.clientWidth,o=((a=this.rootElement)==null?void 0:a.clientHeight)||document.body.clientHeight;if(!this.dragController)return new Point(0,0);if(this.size==="regular")return (l=this.lastKnownTranslate)!=null?l:this.dragController.translate;this.lastKnownTranslate=this.dragController.translate;let i=this.dragController.translate;return (this.orientation==="portrait-primary"||this.orientation==="portrait-secondary")&&this.dragController.translate.x>16&&(i=new Point(16,i.y)),(this.orientation==="landscape-primary"||this.orientation==="landscape-secondary")&&this.dragController.translate.x>t-this.clientWidth-16&&(i=new Point(t-this.clientWidth-16,i.y)),this.dragController.translate.y>o-this.clientHeight-16&&(i=new Point(i.x,o-this.clientHeight-16)),i}};w.observedAttributes=[j,i,f];var O=w;export{q as a,O as b};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {b as b$1}from'./chunk-NZCSU4S2.js';import {b}from'./chunk-LGPC7KMW.js';import {a as a$2}from'./chunk-T2Y2C76P.js';import {a as a$1,b as b$
|
|
1
|
+
import {b as b$1}from'./chunk-NZCSU4S2.js';import {b}from'./chunk-LGPC7KMW.js';import {a as a$2}from'./chunk-T2Y2C76P.js';import {a as a$1,b as b$3}from'./chunk-OPL5NVVM.js';import {e,f as f$1,a,b as b$2,d,c as c$1}from'./chunk-DVHTYKDX.js';import {f}from'./chunk-YBD5JYCX.js';import {Point}from'@scandit/web-datacapture-core';import {ScanditHTMLElement,defineCustomElements,safeCancelAnimation,html}from'@scandit/web-datacapture-core/build/js/private/utils/index.js';var c=class b$4 extends ScanditHTMLElement{constructor(){super(...arguments);this._pointerDownListener=this.onPointerDown.bind(this);this._pointerUpListener=this.onPointerUp.bind(this);this._longPressController=new b(this);this._longPressStartListener=this.onLongPressStart.bind(this);}get minimized(){return !this.hasAttribute("expanded")}set minimized(t){this.toggleAttribute("minimized",!t);}get expanded(){return this.hasAttribute("expanded")}set expanded(t){this.toggleAttribute("expanded",t),this._dragController&&(this._dragController.margin=t?new Point(-65,-65):new Point(0,0),this._dragController.repositionIfOutOfBounds());}get pressed(){return this.hasAttribute("pressed")}set pressed(t){this.toggleAttribute("pressed",t);}get visible(){return this.hasAttribute("visible")}set visible(t){this.toggleAttribute("visible",t);}set useViewportBounds(t){this._dragController&&(this._dragController.useViewportBounds=t);}static create(){return defineCustomElements({[f]:b$4}),document.createElement(f)}connectedCallback(){var t;this.render(),this._dragController=new b$1(this,(t=this.parentElement)==null?void 0:t.parentElement),this._dragController.connect(),this.addEventListener("pointerdown",this._pointerDownListener),this.addEventListener("pointerup",this._pointerUpListener),this.addEventListener("longpressstart",this._longPressStartListener),this._longPressController.connect(),this._longPressController.elementsAllowedToTriggerLongPressEvents.add(this),this._pulse=this.querySelector(".pulse"),this._pulseAnimation=new Animation(new KeyframeEffect(this._pulse,[{background:"rgba(0, 0, 0, 0)"},{background:`var(${e})`,transform:"translate(-50%, -50%) scale(1.1)"},{background:"rgba(0, 0, 0, 0)"}],{duration:1100,easing:"ease-out",iterations:Number.POSITIVE_INFINITY}));}disconnectedCallback(){var t;this.removeEventListener("pointerdown",this._pointerDownListener),this.removeEventListener("pointerup",this._pointerUpListener),this.removeEventListener("longpressstart",this._longPressStartListener),(t=this._dragController)==null||t.disconnect(),this._longPressController.disconnect(),this.innerHTML="";}repositionIfOutOfBounds(){var t;(t=this._dragController)==null||t.repositionIfOutOfBounds();}translateTo(t){var i;(i=this._dragController)==null||i.translateTo(t,false);}setImage(t){var n;let i=this.querySelector("div");(n=i.firstElementChild)==null||n.remove(),t&&i.append(t);}startPulsating(){var t;(t=this._pulseAnimation)==null||t.play();}stopPulsating(){this._pulseAnimation&&(safeCancelAnimation(this._pulseAnimation),this._pulseAnimation.currentTime=0);}render(){this.innerHTML=html`<div><div class="pulse"></div><svg width="49" height="26" viewBox="0 0 49 26" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="7.57422" y="-0.00390625" width="3.20017" height="25.7171" rx="0.5" fill="white" style="fill:var(${f$1})"/><path d="M44.8418 0.496094C44.8418 0.219952 45.0657 -0.00390625 45.3418 -0.00390625H48.001C48.2771 -0.00390625 48.501 0.219951 48.501 0.496094V25.2132C48.501 25.4894 48.2771 25.7132 48.001 25.7132H45.3418C45.0657 25.7132 44.8418 25.4894 44.8418 25.2132V0.496094Z" fill="white" style="fill:var(${f$1})"/><path d="M33.8271 0.896094C33.8271 0.399038 34.2301 -0.00390625 34.7271 -0.00390625H39.1368C39.6338 -0.00390625 40.0368 0.399038 40.0368 0.896094V24.8132C40.0368 25.3103 39.6338 25.7132 39.1368 25.7132H34.7271C34.2301 25.7132 33.8271 25.3103 33.8271 24.8132V0.896094Z" fill="white" style="fill:var(${f$1})"/><path d="M16.3154 0.746095C16.3154 0.331881 16.6512 -0.00390625 17.0654 -0.00390625H20.1879C20.6021 -0.00390625 20.9379 0.33188 20.9379 0.746094V24.9632C20.9379 25.3774 20.6021 25.7132 20.1879 25.7132H17.0654C16.6512 25.7132 16.3154 25.3774 16.3154 24.9632V0.746095Z" fill="white" style="fill:var(${f$1})"/><path d="M0.5 0.246094C0.5 0.108023 0.611929 -0.00390625 0.75 -0.00390625H2.2897C2.42777 -0.00390625 2.5397 0.108023 2.5397 0.246094V25.4632C2.5397 25.6013 2.42777 25.7132 2.2897 25.7132H0.75C0.611929 25.7132 0.5 25.6013 0.5 25.4632V0.246094Z" fill="white" style="fill:var(${f$1})"/><rect x="25.9688" y="-0.00390625" width="3.05794" height="25.7171" rx="0.5" fill="white" style="fill:var(${f$1})"/></svg></div><style>${f}{position:absolute;top:0;left:0;width:90px;height:90px;display:none;background:rgba(0,0,0,0);border-radius:50%;z-index:10}${f}[unconstrained]{position:fixed;z-index:9999}${f}[expanded]{width:220px;height:220px;margin-top:-65px;margin-left:-65px}${f}[visible]{display:flex;justify-content:center;align-items:center}${f} div{position:relative;width:90px;height:90px;background:var(${a});border-radius:50%;filter:drop-shadow(0px 2px 6px #${a$1.toJSON()}) drop-shadow(0px 1px 2px #${b$3.toJSON()});transition:filter .3s ease}${f} div .pulse{position:absolute;top:50%;left:50%;width:100%;height:100%;background:0 0;opacity:.3;pointer-events:none;transform:translate(-50%,-50%);z-index:-1}${f}[pressed] div{background:var(${b$2});filter:drop-shadow(0px 4px 4px #${a$1.toJSON()}) drop-shadow(0px 8px 12px #${b$3.toJSON()})}${f}[pressed][expanded] div{background:var(${d})}${f}[expanded] div{width:200px;height:200px;background:var(${c$1})}${f} div img,${f} div svg{position:absolute;top:50%;left:50%;width:100%;height:auto;max-width:48px;max-height:48px;transform:translate(-50%,-50%)}${f}[expanded] div img,${f}[expanded] div svg{max-width:64px;max-height:64px}</style>`;}onPointerDown(t){t instanceof PointerEvent&&(this._dragController&&(this._dragController.draggable=this.minimized),this._holdStart=Date.now(),this.setPointerCapture(t.pointerId));}onPointerUp(t){var i;if(t instanceof PointerEvent){let n=this._holdStart!=null&&Date.now()-this._holdStart<400,f=!((i=this._dragController)!=null&&i.pointerDownEvent)||!a$2(this._dragController.pointerDownEvent,t);n&&f&&this.dispatchEvent(new CustomEvent("tap")),this.pressed=false,this._holdStart=void 0,this.releasePointerCapture(t.pointerId);}}onLongPressStart(){this._dragController&&(this._dragController.draggable=true),this.pressed=true,this._holdStart=void 0;}};
|
|
2
2
|
export{c as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {b as b$1,a as a$2}from'./chunk-4PYZSS3H.js';import {h,i}from'./chunk-DVHTYKDX.js';import {a}from'./chunk-5Q3AHWJL.js';import {d,c,k,l,m,e,b}from'./chunk-4JEIREAU.js';import {a as a$1,c as c$1}from'./chunk-YBD5JYCX.js';import {ScanditHTMLElement,defineCustomElements,renderIf,html}from'@scandit/web-datacapture-core/build/js/private/utils/index.js';var S=class S extends ScanditHTMLElement{constructor(){super(...arguments);this.targetModeButtonTapListener=this.onTargetModeButtonTap.bind(this);this.scanningBehaviorButtonTapListener=this.onScanningBehaviorButtonTap.bind(this);this.barcodeFindButtonTapListener=this.onBarcodeFindButtonTap.bind(this);this.labelCaptureButtonTapListener=this.onLabelCaptureButtonTap.bind(this);this.cameraSwitchButtonTapListener=this.onCameraSwitchButtonTap.bind(this);this.computedStyle=getComputedStyle(this);}get[d](){return this.hasAttribute(d)}set[d](t){this.toggleAttribute(d,t);}get[c](){return this.hasAttribute(c)}set[c](t){this.toggleAttribute(c,t);}get[k](){return this.hasAttribute(k)}set[k](t){this.toggleAttribute(k,t);}get[l](){return this.hasAttribute(l)}set[l](t){this.toggleAttribute(l,t);}get[m](){return this.hasAttribute(m)}set[m](t){this.toggleAttribute(m,t);}get[e](){return this.hasAttribute(e)}set[e](t){this.toggleAttribute(e,t),this.targetModeButtonIcon&&(this.targetModeButtonIcon.fill=t?this.computedStyle.getPropertyValue(h):this.computedStyle.getPropertyValue(i));}get[b](){var t;return (t=this.getAttribute(b))!=null?t:"single"}set[b](t){this.setAttribute(b,t),this.scanningBehaviorButtonIcon&&(this.scanningBehaviorButtonIcon.fill=t==="continuous"?this.computedStyle.getPropertyValue(h):this.computedStyle.getPropertyValue(i));}get visibleButtonCount(){return [c,d,m].filter(t=>this[t]===true).length}get visibleModeButtonCount(){return [k,l].filter(t=>this[t]===true).length}get allVisibleButtonsCount(){return this.visibleButtonCount+this.visibleModeButtonCount}static create(){return defineCustomElements({[c$1]:S,[a$1]:a}),document.createElement(c$1)}enableCameraSwitchButton(t){this.cameraSwitchButtonIcon&&(this.cameraSwitchButtonIcon.fill=t?this.computedStyle.getPropertyValue(h):this.computedStyle.getPropertyValue(i));}render(){var T,w,y,C,E,f,k$1,L;let t=this[e]?this.computedStyle.getPropertyValue(h):this.computedStyle.getPropertyValue(i),p=this[b]==="continuous"?this.computedStyle.getPropertyValue(h):this.computedStyle.getPropertyValue(i),h$1=renderIf(this[k],html`<button id="barcodeFindButton" class="${c$1}__button ${c$1}__button--mode"><spark-scan-view-icon icon="find" fill="#3D4852" size="21.6"></spark-scan-view-icon></button>`),b$1=renderIf(this[l],html`<button id="labelCaptureButton" class="${c$1}__button ${c$1}__button--mode"><spark-scan-view-icon icon="label" fill="#3D4852" size="21.6"></spark-scan-view-icon></button>`),m$1=renderIf(this.visibleButtonCount>0&&this.visibleModeButtonCount>0,html`<div class="${c$1}__separator"></div>`),A=renderIf(this[d],html`<button id="targetModeButton" class="${c$1}__button"><spark-scan-view-icon icon="aimer" fill="${t}" size="18"></spark-scan-view-icon></button>`),I=renderIf(this[m],html`<button id="cameraSwitchButton" class="${c$1}__button"><spark-scan-view-icon icon="camera" fill="white" size="24.08"></spark-scan-view-icon></button>`),_=renderIf(this[c],html`<button id="scanningBehaviorButton" class="${c$1}__button"><spark-scan-view-icon icon="continuous" fill="${p}" size="24"></spark-scan-view-icon></button>`),x=this.allVisibleButtonsCount<=3?"center":"flex-start";this.innerHTML=html`<div class="container"><div class="${c$1}">${h$1} ${b$1} ${m$1} ${A} ${I} ${_}</div></div><style>.${c$1}{position:relative;display:flex;justify-content:${x};align-items:center;box-sizing:border-box;width:100%;height:48px;padding:6.75px 12px;gap:12px}${c$1} .container{border-bottom-left-radius:16px;border-bottom-right-radius:16px;overflow-x:scroll;-ms-overflow-style:none;scrollbar-width:none;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}.${c$1}::-webkit-scrollbar{display:none}.${c$1}__button{display:flex;justify-content:center;align-items:center;flex-shrink:0;width:40px;height:40px;border:none;background:0 0;cursor:pointer}.${c$1}__separator{width:1px;height:32px;flex-shrink:0;background:var(${i})}.${c$1}__button--mode{background:#f1f5f8;border-radius:50%}</style>`,this.targetModeButton=this.querySelector("#targetModeButton"),(T=this.targetModeButton)==null||T.addEventListener("pointerup",this.targetModeButtonTapListener),this.targetModeButtonIcon=(w=this.targetModeButton)==null?void 0:w.querySelector(a$1),this.scanningBehaviorButton=this.querySelector("#scanningBehaviorButton"),(y=this.scanningBehaviorButton)==null||y.addEventListener("pointerup",this.scanningBehaviorButtonTapListener),this.scanningBehaviorButtonIcon=(C=this.scanningBehaviorButton)==null?void 0:C.querySelector(a$1),this.barcodeFindButton=this.querySelector("#barcodeFindButton"),(E=this.barcodeFindButton)==null||E.addEventListener("pointerup",this.barcodeFindButtonTapListener),this.labelCaptureButton=this.querySelector("#labelCaptureButton"),(f=this.labelCaptureButton)==null||f.addEventListener("pointerup",this.labelCaptureButtonTapListener),this.cameraSwitchButton=this.querySelector("#cameraSwitchButton"),(k$1=this.cameraSwitchButton)==null||k$1.addEventListener("pointerup",this.cameraSwitchButtonTapListener),this.cameraSwitchButtonIcon=(L=this.cameraSwitchButton)==null?void 0:L.querySelector(a$1);}connectedCallback(){this[d]=true,this[m]=true,this.render();}disconnectedCallback(){var t,p,h,b,m;(t=this.targetModeButton)==null||t.removeEventListener("pointerup",this.targetModeButtonTapListener),(p=this.scanningBehaviorButton)==null||p.removeEventListener("pointerup",this.scanningBehaviorButtonTapListener),(h=this.barcodeFindButton)==null||h.removeEventListener("pointerup",this.barcodeFindButtonTapListener),(b=this.labelCaptureButton)==null||b.removeEventListener("pointerup",this.labelCaptureButtonTapListener),(m=this.cameraSwitchButton)==null||m.removeEventListener("pointerup",this.cameraSwitchButtonTapListener);}attributeChangedCallback(t,p,h){if(h!==p){this.render();let b=this.hidden;this.hidden=this.visibleModeButtonCount+this.allVisibleButtonsCount===0,this.hidden!==b&&this.dispatchEvent(new CustomEvent(b$1));}}onTargetModeButtonTap(t){t.stopPropagation(),this[e]=!this[e],this.dispatchEvent(new CustomEvent(a$2,{bubbles:true,detail:{tapped:"targetModeButton",enabled:this[e]}}));}onScanningBehaviorButtonTap(t){t.stopPropagation(),this[b]=this[b]==="continuous"?"single":"continuous",this.dispatchEvent(new CustomEvent(a$2,{bubbles:true,detail:{tapped:"scanningBehaviorButton",enabled:this[b]==="continuous"}}));}onBarcodeFindButtonTap(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent(a$2,{bubbles:true,detail:{tapped:"barcodeFindButton"}}));}onLabelCaptureButtonTap(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent(a$2,{bubbles:true,detail:{tapped:"labelCaptureButton"}}));}onCameraSwitchButtonTap(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent(a$2,{bubbles:true,detail:{tapped:"cameraSwitchButton"}}));}};S.observedAttributes=[d,c,k,l,m];var $=S;export{$ as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$7}from'./chunk-ZPCWOA3Y.js';import {a as a$6}from'./chunk-MHOUYN7K.js';import {a}from'./chunk-HDLJOQJY.js';import {a as a$9}from'./chunk-KMEGIFKL.js';import {a as a$5}from'./chunk-QRG4J3CL.js';import {b as b$1}from'./chunk-33EFB3RJ.js';import {b}from'./chunk-OH47PSIL.js';import {a as a$1}from'./chunk-I53W7VSB.js';import {a as a$8}from'./chunk-O5SUMSOC.js';import {a as a$2}from'./chunk-QEA62LQD.js';import {a as a$4}from'./chunk-I3PK5YW4.js';import {a as a$3}from'./chunk-SBAQY2WJ.js';import {Anchor,DataCaptureView,Direction,Point,Size}from'@scandit/web-datacapture-core';import {Backdrop}from'@scandit/web-datacapture-core/build/js/private/ui/atoms/Backdrop.js';import {ScanditHTMLElement}from'@scandit/web-datacapture-core/build/js/private/utils/ScanditHTMLElement.js';import {css}from'@scandit/web-datacapture-core/build/js/private/utils/css.js';import {defineCustomElements}from'@scandit/web-datacapture-core/build/js/private/utils/defineCustomElements.js';import {calculateArea,calculateWidth,calculateHeight}from'@scandit/web-datacapture-core/build/js/private/utils/quadrilateralUtils.js';import {Timeout}from'@scandit/web-datacapture-core/build/js/private/utils/timeout.js';import {TorchSwitchIconButton}from'@scandit/web-datacapture-core/build/js/private/ui/molecules/TorchSwitchIconButton.js';var W={async highlightForBarcode(E,T){let t=a$9.create(E);T(t);}},c=class c extends ScanditHTMLElement{constructor(){super(...arguments);this.torchSwitchIconButton=null;this.cameraSwitchButton=null;this.zoomButton=null;this._shouldShowTorchControl=false;this._isTorchAvailable=false;this.onTorchButtonClickHandler=this.onTorchButtonClick.bind(this);this.onCameraSwitchButtonHandler=this.onCameraSwitchButtonClick.bind(this);this.onZoomButtonHandler=this.onZoomButtonClick.bind(this);this.onLayoutPointerDownHandler=this.onLayoutPointerDown.bind(this);this.onInfoAnnotationTapHandler=this.onInfoAnnotationTap.bind(this);this.pendingDeletionTimeout=null;}set shouldShowZoomControl(t){this.zoomButton&&(this.zoomButton.hidden=!t);}get shouldShowZoomControl(){return this.zoomButton===null?false:!this.zoomButton.hidden}set shouldShowCameraSwitchControl(t){this.cameraSwitchButton&&(this.cameraSwitchButton.hidden=!t);}get shouldShowCameraSwitchControl(){return this.cameraSwitchButton===null?false:!this.cameraSwitchButton.hidden}set shouldShowTorchControl(t){this.torchSwitchIconButton!==null&&(this._shouldShowTorchControl=t,this.torchSwitchIconButton.hidden=!(t&&this._isTorchAvailable));}get shouldShowTorchControl(){return this._shouldShowTorchControl}set torchControlPosition(t){var o;(o=this.torchSwitchIconButton)==null||o.setAttribute("slot",`controls-${t===Anchor.Center?Anchor.TopLeft:t}`);}get torchControlPosition(){var o,e;let t=(e=(o=this.torchSwitchIconButton)==null?void 0:o.getAttribute("slot"))!=null?e:"";return t===""?Anchor.TopLeft:t.replace("controls-","")}set zoomControlPosition(t){var o;(o=this.zoomButton)==null||o.setAttribute("slot",`controls-${t===Anchor.Center?Anchor.BottomRight:t}`);}get zoomControlPosition(){var o,e;let t=(e=(o=this.zoomButton)==null?void 0:o.getAttribute("slot"))!=null?e:"";return t===""?Anchor.BottomRight:t.replace("controls-","")}set cameraSwitchControlPosition(t){var o;(o=this.cameraSwitchButton)==null||o.setAttribute("slot",`controls-${t===Anchor.Center?Anchor.TopRight:t}`);}get cameraSwitchControlPosition(){var o,e;let t=(e=(o=this.zoomButton)==null?void 0:o.getAttribute("slot"))!=null?e:"";return t===""?Anchor.TopRight:t.replace("controls-","")}static async createWithSettings(t,o,e,i,n){c.register();let r=document.createElement(c.tag);return r.barcodeArViewSettings=i,r.layout=a.create(),r.append(r.layout),a$1(t)?(r.dataCaptureView=t,r.dataCaptureView.containerElement.prepend(r),await t.setContext(o)):(r.dataCaptureView=await DataCaptureView.forContext(o),r.dataCaptureView.connectToElement(t),r.dataCaptureView.containerElement.prepend(r)),r.presenter=new a$2(r,o,e,i,n!=null?n:a$3.createRecommendedCameraSettings()),await r.presenter.prepare(),r}static async create(t,o,e){return c.createWithSettings(t,o,e,new a$4)}static register(){defineCustomElements({[a.tag]:a,[a$7.tag]:a$7,[a$6.tag]:a$6,[TorchSwitchIconButton.tag]:TorchSwitchIconButton,[c.tag]:c,[Backdrop.tag]:Backdrop,[a$5.tag]:a$5});}static createStyleElement(){return css`[data-could-be-deleted=true]{display:none!important}[data-on-foreground=true]{z-index:3}${c.tag}{inset:0;position:absolute;z-index:1}`}getHighlightForBarcode(t){return this.queryHighlightByDataId(a$8(t))}getAnnotationForBarcode(t){return this.queryAnnotationByDataId(a$8(t))}async start(){return this.presenter.startSearching()}async stop(){return this.presenter.stopSearching()}async pause(){return this.presenter.pauseSearching()}reset(){this.deletePendingViews(),this.deleteAllViews();}getNotificationPresenter(){return this.dataCaptureView.getNotificationPresenter()}setTorchAvailable(t){this._isTorchAvailable=t,this.torchSwitchIconButton!==null&&(this.torchSwitchIconButton.hidden=!(this._shouldShowTorchControl&&this._isTorchAvailable));}toggleTorchIcon(t){this.torchSwitchIconButton!==null&&(this.torchSwitchIconButton.state=t);}onTorchButtonClick(){this.presenter.onTorchButtonClicked();}onCameraSwitchButtonClick(){this.presenter.onCameraSwitchButtonClicked();}onZoomButtonClick(){this.presenter.onZoomButtonClicked();}changeZoomButtonIcon(t){this.zoomButton&&(this.zoomButton.zoom=`${t}x`);}connectedCallback(){this.torchSwitchIconButton=TorchSwitchIconButton.create(),this.torchSwitchIconButton.shadow=true,this.torchSwitchIconButton.size=36,this.torchSwitchIconButton.slot=`controls-${this.torchControlPosition}`,this.torchSwitchIconButton.hidden=true,this.torchSwitchIconButton.addEventListener("pointerdown",this.onTorchButtonClickHandler),this.cameraSwitchButton=a$7.create(),this.cameraSwitchButton.slot=`controls-${this.cameraSwitchControlPosition}`,this.cameraSwitchButton.hidden=true,this.cameraSwitchButton.addEventListener("pointerdown",this.onCameraSwitchButtonHandler),this.zoomButton=a$6.create(),this.zoomButton.slot=`controls-${this.zoomControlPosition}`,this.zoomButton.hidden=true,this.zoomButton.addEventListener("pointerdown",this.onZoomButtonHandler),this.layout.append(this.torchSwitchIconButton,this.cameraSwitchButton,this.zoomButton),this.layout.addEventListener("pointerdown",this.onLayoutPointerDownHandler),this.layout.addEventListener("BarcodeArInfoAnnotationEventTap",this.onInfoAnnotationTapHandler),this.backdrop=Backdrop.create(),this.layout.append(this.backdrop),this.pendingDeletionTimeout=new Timeout(1e3,()=>{this.deletePendingViews();}),this.prepend(c.createStyleElement());}disconnectedCallback(){var t,o,e;this.deleteAllViews(),(t=this.torchSwitchIconButton)==null||t.removeEventListener("pointerdown",this.onTorchButtonClickHandler),(o=this.cameraSwitchButton)==null||o.removeEventListener("pointerdown",this.onCameraSwitchButtonHandler),(e=this.zoomButton)==null||e.removeEventListener("pointerdown",this.onZoomButtonHandler),this.layout.removeEventListener("pointerdown",this.onLayoutPointerDownHandler),this.layout.removeEventListener("BarcodeArInfoAnnotationEventTap",this.onInfoAnnotationTapHandler);}isPopoverAnnotation(t){return t instanceof b}isAnnotation(t){var o;return ((o=t.dataset)==null?void 0:o.identifier)==null?false:t.dataset.identifier.endsWith("-annotation")}areMultiplePopoverAllowed(){for(let t of this.layout.querySelectorAll("[data-identifier$='-annotation']"))if(t&&this.isPopoverAnnotation(t)&&t.annotationTrigger==="highlightTapAndBarcodeScan")return true;return false}async onLayoutPointerDown(t){let o=t.target,e=o==null?void 0:o.closest("[data-identifier$='-highlight']"),i=o==null?void 0:o.closest(b.tag);if((e==null?void 0:e.dataset.id)!=null){await this.handleHighlightClick(e);return}if((i==null?void 0:i.dataset.id)!=null){await this.handleAnnotationClick(i);return}await this.handleClickOutside();}async handleHighlightClick(t){var e;this.presenter.emitTappedFeedback(),(e=this.listener)==null||e.didTapHighlightForBarcode(this.presenter.barcodeAr,t.barcode,t);let o=this.queryAnnotationByDataIdentifier(t.dataset.identifier.replace("-highlight",""));!o||o.annotationTrigger==="barcodeScan"||(this.isPopoverAnnotation(o)?await this.handlePopoverHighlightClick(o,t):o.hidden=!o.hidden);}async handlePopoverHighlightClick(t,o){var e;if(!this.areMultiplePopoverAllowed()){let i=this.layout.querySelector(`${b.tag}[data-on-foreground="true"]`),n=(e=i==null?void 0:i.dataset.identifier)==null?void 0:e.replace("-annotation","-highlight"),r=this.layout.querySelector(`[data-identifier="${n}"]`);i!=null&&r!=null&&await this.hideBarcodeArPopover(i,r,false);}await this.toggleBarcodeArPopover(t,o);}async handleAnnotationClick(t){var i;let o=(i=t.dataset.identifier)==null?void 0:i.replace("-annotation","-highlight"),e=this.layout.querySelector(`[data-identifier="${o}"]`);e&&await this.toggleBarcodeArPopover(t,e);}async handleClickOutside(){var i;if(this.areMultiplePopoverAllowed())return;let t=this.layout.querySelector(`${b.tag}[data-on-foreground="true"]`);if(!t)return;let o=(i=t.dataset.identifier)==null?void 0:i.replace("-annotation","-highlight"),e=this.layout.querySelector(`[data-identifier="${o}"]`);e&&await this.hideBarcodeArPopover(t,e);}onInfoAnnotationTap(){this.presenter.emitTappedFeedback();}async showBarcodeArPopover(t,o){t.dataset.onForeground="true",t.hidden=false,o.dataset.onForeground="true",this.backdrop.open=true;}async hideBarcodeArPopover(t,o,e=true){t.dataset.onForeground="false",t.hidden=true,o&&(o.dataset.onForeground="false"),e&&this.hideBackdropIfNoPopovers();}hideBackdropIfNoPopovers(){[...this.layout.querySelectorAll(`${b.tag}`)].every(o=>o.hidden)&&(this.backdrop.open=false);}async toggleBarcodeArPopover(t,o){t.hidden?await this.showBarcodeArPopover(t,o):await this.hideBarcodeArPopover(t,o);}deleteAllViews(){for(let t of this.layout.querySelectorAll("[data-identifier]"))t.remove();}deletePendingViews(){for(let t of this.layout.querySelectorAll("[data-could-be-deleted='true']"))t.remove();this.hideBackdropIfNoPopovers();}identifierForHighlight(t){return `${t}-highlight`}identifierForAnnotation(t){return `${t}-annotation`}async onHighlightsOrAnnotationForTrackedBarcode(t){var o,e,i;await((e=(o=this.highlightProvider)!=null?o:W)==null?void 0:e.highlightForBarcode(t.barcode,async n=>this.onHighlight(t,n))),await((i=this.annotationProvider)==null?void 0:i.annotationForBarcode(t.barcode,async n=>this.onAnnotation(t,n)));}async onAnnotation(t,o){let e=o,i=a$8(t.barcode);this.updateExistingAnnotation(i)||(await this.setupNewAnnotation(e,i,t),this.updateAnnotationPosition(t,e));}updateExistingAnnotation(t){let o=this.queryAnnotationByDataId(t);return o?(o.dataset.couldBeDeleted="false",true):false}async setupNewAnnotation(t,o,e){if(t.dataset.id=o,t.dataset.identifier=this.identifierForAnnotation(e.identifier),t.hidden=true,this.layout.append(t),this.isPopoverAnnotation(t)){if(t.direction=Direction.Vertical,t.anchor==null&&(t.anchor="bottom-center"),this.areMultiplePopoverAllowed()||t.annotationTrigger==="highlightTapAndBarcodeScan"){let i=this.queryHighlightByDataId(o);i&&await this.showBarcodeArPopover(t,i);}}else t.hidden=t.annotationTrigger==="highlightTap";}getAnnotationVariationForQuad(t,o){let e=Math.max(0,Math.min(1,o)),i=t.anchorPositions,n=calculateArea(i),r=this.dataCaptureView.width,l=this.dataCaptureView.height,d=r*l;if(n<=0||d<=0)return 0;let u=n/d;return Math.max(0,Math.min(1,u))<=e?2:1}async onHighlight(t,o){let e=a$8(t.barcode),i=this.queryHighlightByDataId(e);i?i.dataset.couldBeDeleted="false":(o.dataset.id=e,o.dataset.identifier=this.identifierForHighlight(t.identifier),this.updateHighlightPosition(t,o),this.layout.append(o));}queryHighlightByDataIdentifier(t){return this.layout.querySelector(`[data-identifier$="${t}-highlight"]`)}queryAnnotationByDataIdentifier(t){return this.layout.querySelector(`[data-identifier$="${t}-annotation"]`)}queryHighlightByDataId(t){return this.layout.querySelector(`[data-identifier$="-highlight"][data-id="${t}"]`)}queryAnnotationByDataId(t){return this.layout.querySelector(`[data-identifier$="-annotation"][data-id="${t}"]`)}updateRemovedTrackedBarcodes(t){var i,n,r,l,d;let o=this.querySelectorAll("[data-identifier]");if(Object.keys(t.allTrackedBarcodes).length===0){for(let u of o)u.dataset.couldBeDeleted="true";(i=this.pendingDeletionTimeout)!=null&&i.running||(n=this.pendingDeletionTimeout)==null||n.start();return}let e=new Set(t.removedTrackedBarcodes);for(let u of o){let p=(r=u.dataset.identifier)==null?void 0:r.replace("-highlight","").replace("-annotation","");p!=null&&e.has(p)&&(u.dataset.couldBeDeleted="true");}(l=this.pendingDeletionTimeout)!=null&&l.running||(d=this.pendingDeletionTimeout)==null||d.start();}render(t){for(let[o,e]of Object.entries(t.allTrackedBarcodes)){t.addedTrackedBarcodes[o]!=null&&this.onHighlightsOrAnnotationForTrackedBarcode(e);let i=a$8(e.barcode),n=this.queryAnnotationByDataId(i),r=this.queryHighlightByDataId(i);r&&(this.updateBrushSize(r,e),this.updateHighlightPosition(e,r)),n&&this.updateAnnotationPosition(e,n,r);}this.updateRemovedTrackedBarcodes(t);}updateHighlightPosition(t,o,e="center"){if(o.hidden)return;let i=this.dataCaptureView.viewAnchorPositionsForFrameAnchorPositions(t.anchorPositions),n=this.normalizedViewPointFromFrameAnchorPositions(i,e);o.updatePosition(n,new Point(-50,-50),this.calculateRotationAngle(i.topLeft,i.topRight));}updateBrushSize(t,o){if(t.width==null||t.height==null)return;let e=this.dataCaptureView.viewAnchorPositionsForFrameAnchorPositions(o.anchorPositions),i=Math.round(calculateWidth(e)),n=Math.round(calculateHeight(e));t.width!==i&&(t.width=i),t.height!==n&&(t.height=n);}getTransformOrigin(t){return {"top-center":new Point(-50,0),"bottom-center":new Point(-50,-100),"left-center":new Point(0,-50),"right-center":new Point(-100,-50)}[t]}calculateAnnotationPosition(t,o,e){var p,f;let n=t.orderVerticesByPosition(),r=this.normalizedViewPointFromFrameAnchorPositions(t,"center"),d={"bottom-center":()=>{let s=this.normalizedViewPointFromFrameAnchorPositions(n,"topCenter");return new Point(s.x,s.y-7)},"top-center":()=>{let s=this.normalizedViewPointFromFrameAnchorPositions(n,"bottomCenter");return new Point(s.x,s.y+7)},"right-center":()=>{let s=this.normalizedViewPointFromFrameAnchorPositions(n,"centerLeft");return new Point(s.x-7,s.y)},"left-center":()=>{let s=this.normalizedViewPointFromFrameAnchorPositions(n,"centerRight");return new Point(s.x+7,s.y)}}[o]();return e?e instanceof b$1?(p={"bottom-center":new Point(r.x,r.y-7-e.clientHeight/2),"top-center":new Point(r.x,r.y+7+e.clientHeight/2),"right-center":new Point(r.x-7-e.clientWidth/2,r.y),"left-center":new Point(r.x+7+e.clientWidth/2,r.y)}[o])!=null?p:d:(f={"bottom-center":new Point(r.x,r.y-7-e.clientHeight/2),"top-center":new Point(r.x,r.y+7+e.clientHeight/2),"right-center":new Point(r.x-7-e.clientWidth/2,r.y),"left-center":new Point(r.x+7+e.clientWidth/2,r.y)}[o])!=null?f:d:d}updateAnnotationPosition(t,o,e){let i=this.dataCaptureView.viewAnchorPositionsForFrameAnchorPositions(t.anchorPositions);if(o.anchor||(o.anchor="top-center"),o.annotationVariation!=null){let l=this.getAnnotationVariationForQuad(t,a$5.threshold);o.annotationVariation=l;}let n=this.getTransformOrigin(o.anchor),r=this.calculateAnnotationPosition(i,o.anchor,e);o.updatePosition(r,n,this.calculateRotationAngle(i.topLeft,i.topRight));}normalizedViewPointFromFrameAnchorPositions(t,o="center"){let e=this.presenter.currentCamera.getMirrorImageEnabled(),i=new Size(this.dataCaptureView.width,this.dataCaptureView.height);if(e){let r=t[{centerLeft:"centerRight",centerRight:"centerLeft",center:"center",topCenter:"topCenter",bottomCenter:"bottomCenter"}[o]];return Point.mirrorX(r,i)}return t[o]}calculateRotationAngle(t,o){let e=o.x-t.x,n=this.presenter.isCameraMirrored()?-(o.y-t.y):o.y-t.y,r=Math.atan2(n,e);return Math.round(r*(180/Math.PI))}};c.tag="scandit-barcode-ar-view";var k=c;export{k as a};
|
|
1
|
+
import {a as a$7}from'./chunk-ZPCWOA3Y.js';import {a as a$6}from'./chunk-MHOUYN7K.js';import {a}from'./chunk-HDLJOQJY.js';import {a as a$9}from'./chunk-KMEGIFKL.js';import {a as a$5}from'./chunk-QRG4J3CL.js';import {b as b$1}from'./chunk-33EFB3RJ.js';import {b}from'./chunk-OH47PSIL.js';import {a as a$8}from'./chunk-O5SUMSOC.js';import {a as a$1}from'./chunk-I53W7VSB.js';import {a as a$2}from'./chunk-L3JFVEX6.js';import {a as a$4}from'./chunk-I3PK5YW4.js';import {a as a$3}from'./chunk-H44PKJHU.js';import {Anchor,DataCaptureView,Direction,Point,Size}from'@scandit/web-datacapture-core';import {Backdrop}from'@scandit/web-datacapture-core/build/js/private/ui/atoms/Backdrop.js';import {ScanditHTMLElement}from'@scandit/web-datacapture-core/build/js/private/utils/ScanditHTMLElement.js';import {css}from'@scandit/web-datacapture-core/build/js/private/utils/css.js';import {defineCustomElements}from'@scandit/web-datacapture-core/build/js/private/utils/defineCustomElements.js';import {calculateArea,calculateWidth,calculateHeight}from'@scandit/web-datacapture-core/build/js/private/utils/quadrilateralUtils.js';import {Timeout}from'@scandit/web-datacapture-core/build/js/private/utils/timeout.js';import {TorchSwitchIconButton}from'@scandit/web-datacapture-core/build/js/private/ui/molecules/TorchSwitchIconButton.js';var W={async highlightForBarcode(E,T){let t=a$9.create(E);T(t);}},c=class c extends ScanditHTMLElement{constructor(){super(...arguments);this.torchSwitchIconButton=null;this.cameraSwitchButton=null;this.zoomButton=null;this._shouldShowTorchControl=false;this._isTorchAvailable=false;this.onTorchButtonClickHandler=this.onTorchButtonClick.bind(this);this.onCameraSwitchButtonHandler=this.onCameraSwitchButtonClick.bind(this);this.onZoomButtonHandler=this.onZoomButtonClick.bind(this);this.onLayoutPointerDownHandler=this.onLayoutPointerDown.bind(this);this.onInfoAnnotationTapHandler=this.onInfoAnnotationTap.bind(this);this.pendingDeletionTimeout=null;}set shouldShowZoomControl(t){this.zoomButton&&(this.zoomButton.hidden=!t);}get shouldShowZoomControl(){return this.zoomButton===null?false:!this.zoomButton.hidden}set shouldShowCameraSwitchControl(t){this.cameraSwitchButton&&(this.cameraSwitchButton.hidden=!t);}get shouldShowCameraSwitchControl(){return this.cameraSwitchButton===null?false:!this.cameraSwitchButton.hidden}set shouldShowTorchControl(t){this.torchSwitchIconButton!==null&&(this._shouldShowTorchControl=t,this.torchSwitchIconButton.hidden=!(t&&this._isTorchAvailable));}get shouldShowTorchControl(){return this._shouldShowTorchControl}set torchControlPosition(t){var o;(o=this.torchSwitchIconButton)==null||o.setAttribute("slot",`controls-${t===Anchor.Center?Anchor.TopLeft:t}`);}get torchControlPosition(){var o,e;let t=(e=(o=this.torchSwitchIconButton)==null?void 0:o.getAttribute("slot"))!=null?e:"";return t===""?Anchor.TopLeft:t.replace("controls-","")}set zoomControlPosition(t){var o;(o=this.zoomButton)==null||o.setAttribute("slot",`controls-${t===Anchor.Center?Anchor.BottomRight:t}`);}get zoomControlPosition(){var o,e;let t=(e=(o=this.zoomButton)==null?void 0:o.getAttribute("slot"))!=null?e:"";return t===""?Anchor.BottomRight:t.replace("controls-","")}set cameraSwitchControlPosition(t){var o;(o=this.cameraSwitchButton)==null||o.setAttribute("slot",`controls-${t===Anchor.Center?Anchor.TopRight:t}`);}get cameraSwitchControlPosition(){var o,e;let t=(e=(o=this.zoomButton)==null?void 0:o.getAttribute("slot"))!=null?e:"";return t===""?Anchor.TopRight:t.replace("controls-","")}static async createWithSettings(t,o,e,i,n){c.register();let r=document.createElement(c.tag);return r.barcodeArViewSettings=i,r.layout=a.create(),r.append(r.layout),a$1(t)?(r.dataCaptureView=t,r.dataCaptureView.containerElement.prepend(r),await t.setContext(o)):(r.dataCaptureView=await DataCaptureView.forContext(o),r.dataCaptureView.connectToElement(t),r.dataCaptureView.containerElement.prepend(r)),r.presenter=new a$2(r,o,e,i,n!=null?n:a$3.createRecommendedCameraSettings()),await r.presenter.prepare(),r}static async create(t,o,e){return c.createWithSettings(t,o,e,new a$4)}static register(){defineCustomElements({[a.tag]:a,[a$7.tag]:a$7,[a$6.tag]:a$6,[TorchSwitchIconButton.tag]:TorchSwitchIconButton,[c.tag]:c,[Backdrop.tag]:Backdrop,[a$5.tag]:a$5});}static createStyleElement(){return css`[data-could-be-deleted=true]{display:none!important}[data-on-foreground=true]{z-index:3}${c.tag}{inset:0;position:absolute;z-index:1}`}getHighlightForBarcode(t){return this.queryHighlightByDataId(a$8(t))}getAnnotationForBarcode(t){return this.queryAnnotationByDataId(a$8(t))}async start(){return this.presenter.startSearching()}async stop(){return this.presenter.stopSearching()}async pause(){return this.presenter.pauseSearching()}reset(){this.deletePendingViews(),this.deleteAllViews();}getNotificationPresenter(){return this.dataCaptureView.getNotificationPresenter()}setTorchAvailable(t){this._isTorchAvailable=t,this.torchSwitchIconButton!==null&&(this.torchSwitchIconButton.hidden=!(this._shouldShowTorchControl&&this._isTorchAvailable));}toggleTorchIcon(t){this.torchSwitchIconButton!==null&&(this.torchSwitchIconButton.state=t);}onTorchButtonClick(){this.presenter.onTorchButtonClicked();}onCameraSwitchButtonClick(){this.presenter.onCameraSwitchButtonClicked();}onZoomButtonClick(){this.presenter.onZoomButtonClicked();}changeZoomButtonIcon(t){this.zoomButton&&(this.zoomButton.zoom=`${t}x`);}connectedCallback(){this.torchSwitchIconButton=TorchSwitchIconButton.create(),this.torchSwitchIconButton.shadow=true,this.torchSwitchIconButton.size=36,this.torchSwitchIconButton.slot=`controls-${this.torchControlPosition}`,this.torchSwitchIconButton.hidden=true,this.torchSwitchIconButton.addEventListener("pointerdown",this.onTorchButtonClickHandler),this.cameraSwitchButton=a$7.create(),this.cameraSwitchButton.slot=`controls-${this.cameraSwitchControlPosition}`,this.cameraSwitchButton.hidden=true,this.cameraSwitchButton.addEventListener("pointerdown",this.onCameraSwitchButtonHandler),this.zoomButton=a$6.create(),this.zoomButton.slot=`controls-${this.zoomControlPosition}`,this.zoomButton.hidden=true,this.zoomButton.addEventListener("pointerdown",this.onZoomButtonHandler),this.layout.append(this.torchSwitchIconButton,this.cameraSwitchButton,this.zoomButton),this.layout.addEventListener("pointerdown",this.onLayoutPointerDownHandler),this.layout.addEventListener("BarcodeArInfoAnnotationEventTap",this.onInfoAnnotationTapHandler),this.backdrop=Backdrop.create(),this.layout.append(this.backdrop),this.pendingDeletionTimeout=new Timeout(1e3,()=>{this.deletePendingViews();}),this.prepend(c.createStyleElement());}disconnectedCallback(){var t,o,e;this.deleteAllViews(),(t=this.torchSwitchIconButton)==null||t.removeEventListener("pointerdown",this.onTorchButtonClickHandler),(o=this.cameraSwitchButton)==null||o.removeEventListener("pointerdown",this.onCameraSwitchButtonHandler),(e=this.zoomButton)==null||e.removeEventListener("pointerdown",this.onZoomButtonHandler),this.layout.removeEventListener("pointerdown",this.onLayoutPointerDownHandler),this.layout.removeEventListener("BarcodeArInfoAnnotationEventTap",this.onInfoAnnotationTapHandler);}isPopoverAnnotation(t){return t instanceof b}isAnnotation(t){var o;return ((o=t.dataset)==null?void 0:o.identifier)==null?false:t.dataset.identifier.endsWith("-annotation")}areMultiplePopoverAllowed(){for(let t of this.layout.querySelectorAll("[data-identifier$='-annotation']"))if(t&&this.isPopoverAnnotation(t)&&t.annotationTrigger==="highlightTapAndBarcodeScan")return true;return false}async onLayoutPointerDown(t){let o=t.target,e=o==null?void 0:o.closest("[data-identifier$='-highlight']"),i=o==null?void 0:o.closest(b.tag);if((e==null?void 0:e.dataset.id)!=null){await this.handleHighlightClick(e);return}if((i==null?void 0:i.dataset.id)!=null){await this.handleAnnotationClick(i);return}await this.handleClickOutside();}async handleHighlightClick(t){var e;this.presenter.emitTappedFeedback(),(e=this.listener)==null||e.didTapHighlightForBarcode(this.presenter.barcodeAr,t.barcode,t);let o=this.queryAnnotationByDataIdentifier(t.dataset.identifier.replace("-highlight",""));!o||o.annotationTrigger==="barcodeScan"||(this.isPopoverAnnotation(o)?await this.handlePopoverHighlightClick(o,t):o.hidden=!o.hidden);}async handlePopoverHighlightClick(t,o){var e;if(!this.areMultiplePopoverAllowed()){let i=this.layout.querySelector(`${b.tag}[data-on-foreground="true"]`),n=(e=i==null?void 0:i.dataset.identifier)==null?void 0:e.replace("-annotation","-highlight"),r=this.layout.querySelector(`[data-identifier="${n}"]`);i!=null&&r!=null&&await this.hideBarcodeArPopover(i,r,false);}await this.toggleBarcodeArPopover(t,o);}async handleAnnotationClick(t){var i;let o=(i=t.dataset.identifier)==null?void 0:i.replace("-annotation","-highlight"),e=this.layout.querySelector(`[data-identifier="${o}"]`);e&&await this.toggleBarcodeArPopover(t,e);}async handleClickOutside(){var i;if(this.areMultiplePopoverAllowed())return;let t=this.layout.querySelector(`${b.tag}[data-on-foreground="true"]`);if(!t)return;let o=(i=t.dataset.identifier)==null?void 0:i.replace("-annotation","-highlight"),e=this.layout.querySelector(`[data-identifier="${o}"]`);e&&await this.hideBarcodeArPopover(t,e);}onInfoAnnotationTap(){this.presenter.emitTappedFeedback();}async showBarcodeArPopover(t,o){t.dataset.onForeground="true",t.hidden=false,o.dataset.onForeground="true",this.backdrop.open=true;}async hideBarcodeArPopover(t,o,e=true){t.dataset.onForeground="false",t.hidden=true,o&&(o.dataset.onForeground="false"),e&&this.hideBackdropIfNoPopovers();}hideBackdropIfNoPopovers(){[...this.layout.querySelectorAll(`${b.tag}`)].every(o=>o.hidden)&&(this.backdrop.open=false);}async toggleBarcodeArPopover(t,o){t.hidden?await this.showBarcodeArPopover(t,o):await this.hideBarcodeArPopover(t,o);}deleteAllViews(){for(let t of this.layout.querySelectorAll("[data-identifier]"))t.remove();}deletePendingViews(){for(let t of this.layout.querySelectorAll("[data-could-be-deleted='true']"))t.remove();this.hideBackdropIfNoPopovers();}identifierForHighlight(t){return `${t}-highlight`}identifierForAnnotation(t){return `${t}-annotation`}async onHighlightsOrAnnotationForTrackedBarcode(t){var o,e,i;await((e=(o=this.highlightProvider)!=null?o:W)==null?void 0:e.highlightForBarcode(t.barcode,async n=>this.onHighlight(t,n))),await((i=this.annotationProvider)==null?void 0:i.annotationForBarcode(t.barcode,async n=>this.onAnnotation(t,n)));}async onAnnotation(t,o){let e=o,i=a$8(t.barcode);this.updateExistingAnnotation(i)||(await this.setupNewAnnotation(e,i,t),this.updateAnnotationPosition(t,e));}updateExistingAnnotation(t){let o=this.queryAnnotationByDataId(t);return o?(o.dataset.couldBeDeleted="false",true):false}async setupNewAnnotation(t,o,e){if(t.dataset.id=o,t.dataset.identifier=this.identifierForAnnotation(e.identifier),t.hidden=true,this.layout.append(t),this.isPopoverAnnotation(t)){if(t.direction=Direction.Vertical,t.anchor==null&&(t.anchor="bottom-center"),this.areMultiplePopoverAllowed()||t.annotationTrigger==="highlightTapAndBarcodeScan"){let i=this.queryHighlightByDataId(o);i&&await this.showBarcodeArPopover(t,i);}}else t.hidden=t.annotationTrigger==="highlightTap";}getAnnotationVariationForQuad(t,o){let e=Math.max(0,Math.min(1,o)),i=t.anchorPositions,n=calculateArea(i),r=this.dataCaptureView.width,l=this.dataCaptureView.height,d=r*l;if(n<=0||d<=0)return 0;let u=n/d;return Math.max(0,Math.min(1,u))<=e?2:1}async onHighlight(t,o){let e=a$8(t.barcode),i=this.queryHighlightByDataId(e);i?i.dataset.couldBeDeleted="false":(o.dataset.id=e,o.dataset.identifier=this.identifierForHighlight(t.identifier),this.updateHighlightPosition(t,o),this.layout.append(o));}queryHighlightByDataIdentifier(t){return this.layout.querySelector(`[data-identifier$="${t}-highlight"]`)}queryAnnotationByDataIdentifier(t){return this.layout.querySelector(`[data-identifier$="${t}-annotation"]`)}queryHighlightByDataId(t){return this.layout.querySelector(`[data-identifier$="-highlight"][data-id="${t}"]`)}queryAnnotationByDataId(t){return this.layout.querySelector(`[data-identifier$="-annotation"][data-id="${t}"]`)}updateRemovedTrackedBarcodes(t){var i,n,r,l,d;let o=this.querySelectorAll("[data-identifier]");if(Object.keys(t.allTrackedBarcodes).length===0){for(let u of o)u.dataset.couldBeDeleted="true";(i=this.pendingDeletionTimeout)!=null&&i.running||(n=this.pendingDeletionTimeout)==null||n.start();return}let e=new Set(t.removedTrackedBarcodes);for(let u of o){let p=(r=u.dataset.identifier)==null?void 0:r.replace("-highlight","").replace("-annotation","");p!=null&&e.has(p)&&(u.dataset.couldBeDeleted="true");}(l=this.pendingDeletionTimeout)!=null&&l.running||(d=this.pendingDeletionTimeout)==null||d.start();}render(t){for(let[o,e]of Object.entries(t.allTrackedBarcodes)){t.addedTrackedBarcodes[o]!=null&&this.onHighlightsOrAnnotationForTrackedBarcode(e);let i=a$8(e.barcode),n=this.queryAnnotationByDataId(i),r=this.queryHighlightByDataId(i);r&&(this.updateBrushSize(r,e),this.updateHighlightPosition(e,r)),n&&this.updateAnnotationPosition(e,n,r);}this.updateRemovedTrackedBarcodes(t);}updateHighlightPosition(t,o,e="center"){if(o.hidden)return;let i=this.dataCaptureView.viewAnchorPositionsForFrameAnchorPositions(t.anchorPositions),n=this.normalizedViewPointFromFrameAnchorPositions(i,e);o.updatePosition(n,new Point(-50,-50),this.calculateRotationAngle(i.topLeft,i.topRight));}updateBrushSize(t,o){if(t.width==null||t.height==null)return;let e=this.dataCaptureView.viewAnchorPositionsForFrameAnchorPositions(o.anchorPositions),i=Math.round(calculateWidth(e)),n=Math.round(calculateHeight(e));t.width!==i&&(t.width=i),t.height!==n&&(t.height=n);}getTransformOrigin(t){return {"top-center":new Point(-50,0),"bottom-center":new Point(-50,-100),"left-center":new Point(0,-50),"right-center":new Point(-100,-50)}[t]}calculateAnnotationPosition(t,o,e){var p,f;let n=t.orderVerticesByPosition(),r=this.normalizedViewPointFromFrameAnchorPositions(t,"center"),d={"bottom-center":()=>{let s=this.normalizedViewPointFromFrameAnchorPositions(n,"topCenter");return new Point(s.x,s.y-7)},"top-center":()=>{let s=this.normalizedViewPointFromFrameAnchorPositions(n,"bottomCenter");return new Point(s.x,s.y+7)},"right-center":()=>{let s=this.normalizedViewPointFromFrameAnchorPositions(n,"centerLeft");return new Point(s.x-7,s.y)},"left-center":()=>{let s=this.normalizedViewPointFromFrameAnchorPositions(n,"centerRight");return new Point(s.x+7,s.y)}}[o]();return e?e instanceof b$1?(p={"bottom-center":new Point(r.x,r.y-7-e.clientHeight/2),"top-center":new Point(r.x,r.y+7+e.clientHeight/2),"right-center":new Point(r.x-7-e.clientWidth/2,r.y),"left-center":new Point(r.x+7+e.clientWidth/2,r.y)}[o])!=null?p:d:(f={"bottom-center":new Point(r.x,r.y-7-e.clientHeight/2),"top-center":new Point(r.x,r.y+7+e.clientHeight/2),"right-center":new Point(r.x-7-e.clientWidth/2,r.y),"left-center":new Point(r.x+7+e.clientWidth/2,r.y)}[o])!=null?f:d:d}updateAnnotationPosition(t,o,e){let i=this.dataCaptureView.viewAnchorPositionsForFrameAnchorPositions(t.anchorPositions);if(o.anchor||(o.anchor="top-center"),o.annotationVariation!=null){let l=this.getAnnotationVariationForQuad(t,a$5.threshold);o.annotationVariation=l;}let n=this.getTransformOrigin(o.anchor),r=this.calculateAnnotationPosition(i,o.anchor,e);o.updatePosition(r,n,this.calculateRotationAngle(i.topLeft,i.topRight));}normalizedViewPointFromFrameAnchorPositions(t,o="center"){let e=this.presenter.currentCamera.getMirrorImageEnabled(),i=new Size(this.dataCaptureView.width,this.dataCaptureView.height);if(e){let r=t[{centerLeft:"centerRight",centerRight:"centerLeft",center:"center",topCenter:"topCenter",bottomCenter:"bottomCenter"}[o]];return Point.mirrorX(r,i)}return t[o]}calculateRotationAngle(t,o){let e=o.x-t.x,n=this.presenter.isCameraMirrored()?-(o.y-t.y):o.y-t.y,r=Math.atan2(n,e);return Math.round(r*(180/Math.PI))}};c.tag="scandit-barcode-ar-view";var k=c;export{k as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var b=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var p=(r,d,t,s)=>{for(var a=s>1?void 0:s?i(d,t):d,e=r.length-1,c;e>=0;e--)(c=r[e])&&(a=(s?c(d,t,a):c(a))||a);return s&&a&&b(d,t,a),a};var o={"scandit-datacapture-sdk-barcode-pthreads.wasm":{bytes:
|
|
1
|
+
var b=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var p=(r,d,t,s)=>{for(var a=s>1?void 0:s?i(d,t):d,e=r.length-1,c;e>=0;e--)(c=r[e])&&(a=(s?c(d,t,a):c(a))||a);return s&&a&&b(d,t,a),a};var o={"scandit-datacapture-sdk-barcode-pthreads.wasm":{bytes:8224560},"scandit-datacapture-sdk-barcode.wasm":{bytes:8088094},"scandit-datacapture-sdk-barcode-simd-pthreads.wasm":{bytes:8115788},"scandit-datacapture-sdk-barcode-simd.wasm":{bytes:7978885}};export{p as a,o as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a as a$3}from'./chunk-FBW5J2QT.js';import {a as a$2}from'./chunk-QTKRK537.js';import {a as a$4}from'./chunk-SLZMFNXI.js';import {a as a$1}from'./chunk-2ZSOWJ2F.js';import {a}from'./chunk-YTPS5MHJ.js';import {b}from'./chunk-TOJVFOMK.js';import {DataCaptureEngine}from'@scandit/web-datacapture-core/build/js/worker/index.js';var c=class extends DataCaptureEngine{constructor(e,r){super(e,r);}getModeDeserializers(){this.barcodeCaptureMode=new a(this,this.Module,this.workerFunctions),this.barcodeBatchMode=new a$1(this,this.Module,this.workerFunctions),this.sparkScanMode=new a$2(this,this.Module,this.workerFunctions),this.barcodeFindMode=new a$3(this,this.Module,this.workerFunctions),this.barcodeArMode=new a$4(this,this.Module,this.workerFunctions);let e=super.getModeDeserializers();return e.push_back(this.barcodeCaptureMode.getCaptureDeserializer()),e.push_back(this.barcodeBatchMode.getBatchDeserializer()),e.push_back(this.sparkScanMode.getSparkScanDeserializer()),e}getWasmSideModuleFileName(){return ""}getWasmCoreFileName(e,r){return r?e?"scandit-datacapture-sdk-barcode-simd-pthreads.wasm":"scandit-datacapture-sdk-barcode-pthreads.wasm":e?"scandit-datacapture-sdk-barcode-simd.wasm":"scandit-datacapture-sdk-barcode.wasm"}getWasmCoreExpectedHash(e,r){return r?e?"bb8f3e7905c295547106e2f986dbe8edd4be8d6afddaf526b0109fc736c7a5cb":"d0539dec30f291f2e313060a308163d2bccc57aac9852c63844f3252a94bce4c":e?"5a37ea25fda99dcbcf29b0606b2c4b759935249092ef5b025d851d1e55b3137e":"e112aeabc63193239773f9d4ae5dc41bacf14d103265aa97c7affe1884836949"}getWasmMetadata(){return b}};export{c as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as BarcodeFindView}from'../chunks/chunk-
|
|
1
|
+
export{a as BarcodeFindView}from'../chunks/chunk-27DZ2VG6.js';
|
package/build/js/find/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as
|
|
1
|
+
export{a as BarcodeFindView}from'../chunks/chunk-27DZ2VG6.js';export{a as BarcodeFind}from'../chunks/chunk-R3MQ2GAV.js';export{a as BarcodeFindItem,c as BarcodeFindItemContent,b as BarcodeFindItemSearchOptions}from'../chunks/chunk-HTKUJZG2.js';export{a as BarcodeFindSettings}from'../chunks/chunk-7L2BXR3E.js';export{a as BarcodeFindViewSettings}from'../chunks/chunk-4PTIOBXM.js';
|
package/build/js/global.d.d.ts
CHANGED
package/build/js/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { Barcode, BarcodeJSON, Checksum, CompositeFlag, CompositeType, PrivateCompositeTypeDescription, Symbology } from './Barcode.js';
|
|
2
|
-
export {
|
|
2
|
+
export { B as BarcodeBatch, a as BarcodeBatchBasicOverlay, b as BarcodeBatchBasicOverlayJSON, c as BarcodeBatchBasicOverlayListener, d as BarcodeBatchBasicOverlayStyle, e as BarcodeBatchListener, P as PrivateBarcodeBatch } from './BarcodeBatch-E9nmjbAE.js';
|
|
3
3
|
export { BarcodeBatchAdvancedOverlay, BarcodeBatchAdvancedOverlayJSON, BarcodeBatchAdvancedOverlayListener } from './BarcodeBatchAdvancedOverlay.js';
|
|
4
4
|
export { BarcodeBatchSession, BarcodeBatchSessionJSON } from './BarcodeBatchSession.js';
|
|
5
5
|
export { BarcodeBatchSettings, BarcodeBatchSettingsJSON } from './BarcodeBatchSettings.js';
|
|
@@ -26,7 +26,7 @@ export { SparkScanScanningMode, SparkScanScanningModeDefault, SparkScanScanningM
|
|
|
26
26
|
export { SparkScanSession, SparkScanSessionJSON } from './spark/SparkScanSession.js';
|
|
27
27
|
export { SparkScanSettings, SparkScanSettingsJSON } from './spark/SparkScanSettings.js';
|
|
28
28
|
export { SparkScanToastSettings } from './spark/ui/SparkScanToastSettings.js';
|
|
29
|
-
export {
|
|
29
|
+
export { S as SparkScanView, a as SparkScanViewUiListener } from './SparkScanView-Cwz62wQh.js';
|
|
30
30
|
export { SparkScanBarcodeErrorFeedback, SparkScanBarcodeFeedback, SparkScanBarcodeSuccessFeedback } from './spark/SparkScanBarcodeFeedback.js';
|
|
31
31
|
import './spark/ui/SparkScanViewIcon.js';
|
|
32
32
|
import './spark/ui/SparkScanViewMiniPreview.js';
|
package/build/js/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{b as BarcodeArStatusIconAnnotation,a as BarcodeArStatusIconAnnotationAnchor}from'./chunks/chunk-HQNY4HRW.js';export{a as BarcodeStatusIconContainer}from'./chunks/chunk-SDQOQ2G3.js';export{a as
|
|
1
|
+
export{b as BarcodeArStatusIconAnnotation,a as BarcodeArStatusIconAnnotationAnchor}from'./chunks/chunk-HQNY4HRW.js';export{a as BarcodeStatusIconContainer}from'./chunks/chunk-SDQOQ2G3.js';export{a as BarcodeFindView}from'./chunks/chunk-27DZ2VG6.js';export{a as BarcodeFind}from'./chunks/chunk-R3MQ2GAV.js';export{a as BarcodeFindItem,c as BarcodeFindItemContent,b as BarcodeFindItemSearchOptions}from'./chunks/chunk-HTKUJZG2.js';export{a as BarcodeFindSettings}from'./chunks/chunk-7L2BXR3E.js';export{a as SparkScanView}from'./chunks/chunk-6AMPUMFL.js';export{a as SparkScanViewState}from'./chunks/chunk-L6IZLBEM.js';export{a as SparkScanViewSettings}from'./chunks/chunk-AYZEMPSP.js';export{a as SparkScanToastSettings}from'./chunks/chunk-BRRT6GC7.js';export{a as SparkScanPreviewBehavior}from'./chunks/chunk-DFK7AQTK.js';export{a as SparkScanScanningBehavior}from'./chunks/chunk-IMYBB4ZA.js';export{a as SparkScanScanningMode,b as SparkScanScanningModeDefault,c as SparkScanScanningModeTarget}from'./chunks/chunk-SZUPDKV5.js';export{a as SparkScanSettings}from'./chunks/chunk-4IGF5Q5F.js';export{a as SparkScan}from'./chunks/chunk-74NQM2AV.js';export{a as SparkScanSession}from'./chunks/chunk-KEN6J62X.js';export{b as SparkScanBarcodeErrorFeedback,a as SparkScanBarcodeFeedback,c as SparkScanBarcodeSuccessFeedback}from'./chunks/chunk-PMTVYYAY.js';export{a as BarcodeFindViewSettings}from'./chunks/chunk-4PTIOBXM.js';export{a as SparkScanMiniPreviewSize}from'./chunks/chunk-MVDPXLVX.js';export{a as BarcodeArSettings}from'./chunks/chunk-7I2Q5FJG.js';export{a as BarcodeArView}from'./chunks/chunk-RYWX55SL.js';export{a as BarcodeArRectangleHighlight}from'./chunks/chunk-KMEGIFKL.js';export{a as BarcodeArResponsiveAnnotation}from'./chunks/chunk-QRG4J3CL.js';export{b as BarcodeArCircleHighlight,a as BarcodeArCircleHighlightPreset}from'./chunks/chunk-33EFB3RJ.js';export{d as BarcodeArInfoAnnotation,a as BarcodeArInfoAnnotationAnchor,b as BarcodeArInfoAnnotationWidthPreset}from'./chunks/chunk-I6NAW3SE.js';export{a as BarcodeArInfoAnnotationBodyComponent}from'./chunks/chunk-KELYPKGG.js';export{a as BarcodeArInfoAnnotationFooter}from'./chunks/chunk-FD4QVJDW.js';export{a as BarcodeArInfoAnnotationHeader}from'./chunks/chunk-MHRGFVAW.js';export{b as BarcodeArPopoverAnnotation,a as BarcodeArPopoverAnnotationAnchor}from'./chunks/chunk-OH47PSIL.js';export{a as BarcodeArPopoverAnnotationButton}from'./chunks/chunk-MVLSFC5H.js';export{a as BarcodeArAnnotationTrigger}from'./chunks/chunk-I6GJ7OYJ.js';export{a as BarcodeArViewSettings}from'./chunks/chunk-I3PK5YW4.js';export{a as TrackedBarcodeView}from'./chunks/chunk-644ETSOC.js';export{a as barcodeCaptureLoader}from'./chunks/chunk-FFFNRYWI.js';export{a as BarcodeAr}from'./chunks/chunk-H44PKJHU.js';export{a as BarcodeArSession}from'./chunks/chunk-SNPWBV7Y.js';export{a as BarcodeArFeedback}from'./chunks/chunk-43YBURRI.js';export{a as BarcodeBatchSettings}from'./chunks/chunk-X244ZABK.js';export{a as BarcodeCapture}from'./chunks/chunk-UMB3USWQ.js';export{a as BarcodeCaptureFeedback}from'./chunks/chunk-WPSMXGDG.js';export{a as BarcodeCaptureOverlay}from'./chunks/chunk-J4OLO2BK.js';export{a as BarcodeCaptureSession}from'./chunks/chunk-CLT5UZMK.js';export{a as BarcodeCaptureSettings}from'./chunks/chunk-NCP2TCSC.js';export{a as SymbologyDescription}from'./chunks/chunk-4WOPZNZG.js';export{a as Range}from'./chunks/chunk-KVYPMF3V.js';export{a as SymbologySettings}from'./chunks/chunk-HD6YAO6W.js';export{a as ScanIntention}from'./chunks/chunk-JSVET3HU.js';export{a as LocalizedOnlyBarcode}from'./chunks/chunk-MUX2WWWH.js';export{a as ArucoDictionary}from'./chunks/chunk-DCUKY2F4.js';export{a as ArucoDictionaryPreset}from'./chunks/chunk-S5FTF2QC.js';export{a as ArucoMarker}from'./chunks/chunk-SSODGMFG.js';export{a as BarcodeBatch}from'./chunks/chunk-TZXO4VYP.js';export{a as BarcodeBatchAdvancedOverlay}from'./chunks/chunk-QBMLA2J7.js';export{b as BarcodeBatchBasicOverlay,a as BarcodeBatchBasicOverlayStyle}from'./chunks/chunk-HY32MAAC.js';export{a as BarcodeBatchSession}from'./chunks/chunk-JAFW53OO.js';export{a as TrackedBarcode}from'./chunks/chunk-3KF7PG5K.js';export{e as Barcode,c as Checksum,d as CompositeFlag,b as CompositeType,a as Symbology}from'./chunks/chunk-2BGFR4WR.js';export{a as StructuredAppendData}from'./chunks/chunk-IEE5MKEA.js';export{a as EncodingRange}from'./chunks/chunk-J4VFWBJ7.js';
|
package/build/js/moduleLoader.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as barcodeCaptureLoader}from'./chunks/chunk-
|
|
1
|
+
export{a as barcodeCaptureLoader}from'./chunks/chunk-FFFNRYWI.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DataCaptureOverlay, BrushJSON, DataCaptureMode, Brush } from '@scandit/web-datacapture-core';
|
|
2
2
|
import { Serializable } from '@scandit/web-datacapture-core/build/js/private/Serializable';
|
|
3
3
|
|
|
4
4
|
type SmartScanSelectionOverlayType = "smartScanSelection" | "smartScanSelectionForSparkScan";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DataCaptureOverlay, BrushJSON, DataCaptureView, NumberWithUnit, Brush } from '@scandit/web-datacapture-core';
|
|
2
2
|
import { Serializable } from '@scandit/web-datacapture-core/build/js/private/Serializable';
|
|
3
3
|
import { SparkScan } from './SparkScan.js';
|
|
4
4
|
import { SparkScanOverlayStyle } from './SparkScanOverlayStyle.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LocationSelectionJSON, JSONType } from '@scandit/web-datacapture-core';
|
|
2
2
|
import { Serializable } from '@scandit/web-datacapture-core/build/js/private/Serializable';
|
|
3
|
-
import { Symbology } from '../Barcode.js';
|
|
3
|
+
import { Symbology, CompositeType } from '../Barcode.js';
|
|
4
4
|
import { ScanIntention } from '../ScanIntention.js';
|
|
5
5
|
import { SymbologySettingsJSON, SymbologySettings } from '../SymbologySettings.js';
|
|
6
6
|
import '../EncodingRange.js';
|
|
@@ -8,6 +8,7 @@ import '../StructuredAppendData.js';
|
|
|
8
8
|
|
|
9
9
|
interface SparkScanSettingsJSON {
|
|
10
10
|
codeDuplicateFilter: number;
|
|
11
|
+
enabledCompositeTypes: string[];
|
|
11
12
|
locationSelection: LocationSelectionJSON;
|
|
12
13
|
symbologies: Record<Symbology, SymbologySettingsJSON>;
|
|
13
14
|
properties: Record<string, JSONType>;
|
|
@@ -15,17 +16,20 @@ interface SparkScanSettingsJSON {
|
|
|
15
16
|
}
|
|
16
17
|
declare class SparkScanSettings implements Serializable<SparkScanSettingsJSON> {
|
|
17
18
|
codeDuplicateFilter: number;
|
|
19
|
+
enabledCompositeTypes: CompositeType[];
|
|
18
20
|
scanIntention?: ScanIntention;
|
|
19
21
|
private locationSelection;
|
|
20
22
|
private properties;
|
|
21
23
|
private symbologies;
|
|
22
24
|
constructor();
|
|
23
25
|
get enabledSymbologies(): Symbology[];
|
|
26
|
+
private get compositeTypeDescriptions();
|
|
24
27
|
settingsForSymbology(symbology: Symbology): SymbologySettings;
|
|
25
28
|
setProperty(name: string, value: any): void;
|
|
26
29
|
getProperty(name: string): any;
|
|
27
30
|
enableSymbologies(symbologies: Symbology[]): void;
|
|
28
31
|
enableSymbology(symbology: Symbology, enabled: boolean): void;
|
|
32
|
+
enableSymbologiesForCompositeTypes(compositeTypes: CompositeType[]): void;
|
|
29
33
|
toJSONObject(): SparkScanSettingsJSON;
|
|
30
34
|
}
|
|
31
35
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as SparkScanSettings}from'../chunks/chunk-
|
|
1
|
+
export{a as SparkScanSettings}from'../chunks/chunk-4IGF5Q5F.js';
|
|
@@ -5,7 +5,7 @@ export { SparkScanScanningMode, SparkScanScanningModeDefault, SparkScanScanningM
|
|
|
5
5
|
export { SparkScanSession, SparkScanSessionJSON } from './SparkScanSession.js';
|
|
6
6
|
export { SparkScanSettings, SparkScanSettingsJSON } from './SparkScanSettings.js';
|
|
7
7
|
export { SparkScanToastSettings } from './ui/SparkScanToastSettings.js';
|
|
8
|
-
export {
|
|
8
|
+
export { S as SparkScanView, a as SparkScanViewUiListener } from '../SparkScanView-Cwz62wQh.js';
|
|
9
9
|
export { SparkScanBarcodeErrorFeedback, SparkScanBarcodeFeedback, SparkScanBarcodeSuccessFeedback } from './SparkScanBarcodeFeedback.js';
|
|
10
10
|
import './ui/SparkScanViewIcon.js';
|
|
11
11
|
import './ui/SparkScanViewMiniPreview.js';
|
package/build/js/spark/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as SparkScanView}from'../chunks/chunk-
|
|
1
|
+
export{a as SparkScanView}from'../chunks/chunk-6AMPUMFL.js';export{a as SparkScanViewState}from'../chunks/chunk-L6IZLBEM.js';export{a as SparkScanViewSettings}from'../chunks/chunk-AYZEMPSP.js';export{a as SparkScanToastSettings}from'../chunks/chunk-BRRT6GC7.js';export{a as SparkScanPreviewBehavior}from'../chunks/chunk-DFK7AQTK.js';export{a as SparkScanScanningBehavior}from'../chunks/chunk-IMYBB4ZA.js';export{a as SparkScanScanningMode,b as SparkScanScanningModeDefault,c as SparkScanScanningModeTarget}from'../chunks/chunk-SZUPDKV5.js';export{a as SparkScanSettings}from'../chunks/chunk-4IGF5Q5F.js';export{a as SparkScan}from'../chunks/chunk-74NQM2AV.js';export{a as SparkScanSession}from'../chunks/chunk-KEN6J62X.js';export{b as SparkScanBarcodeErrorFeedback,a as SparkScanBarcodeFeedback,c as SparkScanBarcodeSuccessFeedback}from'../chunks/chunk-PMTVYYAY.js';export{a as SparkScanMiniPreviewSize}from'../chunks/chunk-MVDPXLVX.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '@scandit/web-datacapture-core';
|
|
2
2
|
import '@scandit/web-datacapture-core/build/js/private/utils/index.js';
|
|
3
|
-
export {
|
|
3
|
+
export { S as SparkScanView } from '../../SparkScanView-Cwz62wQh.js';
|
|
4
4
|
import '../SparkScan.js';
|
|
5
5
|
import '../SparkScanFeedbackDelegate.js';
|
|
6
6
|
import './SparkScanViewSettings.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as SparkScanView}from'../../chunks/chunk-
|
|
1
|
+
export{a as SparkScanView}from'../../chunks/chunk-6AMPUMFL.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{b as SparkScanViewMiniPreview,a as SparkScanViewMiniPreviewButtonType}from'../../chunks/chunk-
|
|
1
|
+
export{b as SparkScanViewMiniPreview,a as SparkScanViewMiniPreviewButtonType}from'../../chunks/chunk-OV2B6MJ5.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DataCaptureView, DataCaptureContext, Feedback, Point } from '@scandit/web-datacapture-core';
|
|
2
2
|
import { SparkScanViewSessionStopReason } from '../SparkScanAnalyticsManager.js';
|
|
3
|
-
import {
|
|
3
|
+
import { S as SparkScanView, a as SparkScanViewUiListener } from '../../SparkScanView-Cwz62wQh.js';
|
|
4
4
|
import { SparkScanListener, SparkScanDelegate, SparkScan } from '../SparkScan.js';
|
|
5
5
|
import { SparkScanSession } from '../SparkScanSession.js';
|
|
6
6
|
import { SparkScanViewSettings } from './SparkScanViewSettings.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as SparkScanViewPresenter}from'../../chunks/chunk-
|
|
1
|
+
export{a as SparkScanViewPresenter}from'../../chunks/chunk-6CMIVFB4.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as SparkScanViewToolbar}from'../../chunks/chunk-
|
|
1
|
+
export{a as SparkScanViewToolbar}from'../../chunks/chunk-RLWDCJ7V.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../SparkScanScanningMode.js';
|
|
2
|
-
export {
|
|
2
|
+
export { a as SparkScanViewUiListener } from '../../SparkScanView-Cwz62wQh.js';
|
|
3
3
|
import './SparkScanViewState.js';
|
|
4
4
|
import '@scandit/web-datacapture-core/build/js/private/Serializable';
|
|
5
5
|
import '../SparkScanPreviewBehavior.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { SparkScanToastSettings, SparkScanToastSettingsJSON } from './SparkScanToastSettings.js';
|
|
2
|
-
export {
|
|
2
|
+
export { S as SparkScanView, a as SparkScanViewUiListener } from '../../SparkScanView-Cwz62wQh.js';
|
|
3
3
|
export { SparkScanViewFeedbackManager } from './SparkScanViewFeedbackManager.js';
|
|
4
4
|
export { SparkScanViewIcon } from './SparkScanViewIcon.js';
|
|
5
5
|
export { SparkScanViewMiniPreview, SparkScanViewMiniPreviewButtonType } from './SparkScanViewMiniPreview.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as SparkScanView}from'../../chunks/chunk-
|
|
1
|
+
export{a as SparkScanView}from'../../chunks/chunk-6AMPUMFL.js';export{a as SparkScanViewTriggerButton}from'../../chunks/chunk-PGXSKHUL.js';export{a as SparkScanViewVisualFeedback}from'../../chunks/chunk-6KWMOMD7.js';export{b as SparkScanViewMiniPreview,a as SparkScanViewMiniPreviewButtonType}from'../../chunks/chunk-OV2B6MJ5.js';export{a as SparkScanViewToast}from'../../chunks/chunk-LWUFGA5M.js';export{a as SparkScanViewToolbar}from'../../chunks/chunk-RLWDCJ7V.js';export{a as SparkScanViewIcon}from'../../chunks/chunk-5Q3AHWJL.js';export{a as SparkScanViewPresenter}from'../../chunks/chunk-6CMIVFB4.js';export{a as SparkScanViewStateManager}from'../../chunks/chunk-3OCPZ3OV.js';export{a as SparkScanViewState}from'../../chunks/chunk-L6IZLBEM.js';export{a as SparkScanViewFeedbackManager}from'../../chunks/chunk-L6BUOAGT.js';export{a as SparkScanViewPreferenceManager}from'../../chunks/chunk-QCD3RIT4.js';export{a as SparkScanViewSettings}from'../../chunks/chunk-AYZEMPSP.js';export{a as SparkScanToastSettings}from'../../chunks/chunk-BRRT6GC7.js';export{a as SparkScanMiniPreviewSize}from'../../chunks/chunk-MVDPXLVX.js';
|
|
@@ -24,7 +24,7 @@ import '../BarcodeCaptureSession.js';
|
|
|
24
24
|
import '../LocalizedOnlyBarcode.js';
|
|
25
25
|
import '../ar/BarcodeArSession.js';
|
|
26
26
|
import '../spark/SparkScanSession.js';
|
|
27
|
-
import '../SparkScanView-
|
|
27
|
+
import '../SparkScanView-Cwz62wQh.js';
|
|
28
28
|
import '@scandit/web-datacapture-core/build/js/private/utils/index.js';
|
|
29
29
|
import '../spark/SparkScanScanningMode.js';
|
|
30
30
|
import '../spark/SparkScanPreviewBehavior.js';
|
|
@@ -24,7 +24,7 @@ import '../BarcodeCaptureSession.js';
|
|
|
24
24
|
import '../LocalizedOnlyBarcode.js';
|
|
25
25
|
import '../ar/BarcodeArSession.js';
|
|
26
26
|
import '../spark/SparkScanSession.js';
|
|
27
|
-
import '../SparkScanView-
|
|
27
|
+
import '../SparkScanView-Cwz62wQh.js';
|
|
28
28
|
import '@scandit/web-datacapture-core/build/js/private/utils/index.js';
|
|
29
29
|
import '../spark/SparkScanScanningMode.js';
|
|
30
30
|
import '../spark/SparkScanPreviewBehavior.js';
|
|
@@ -24,7 +24,7 @@ import '../BarcodeCaptureSession.js';
|
|
|
24
24
|
import '../LocalizedOnlyBarcode.js';
|
|
25
25
|
import '../ar/BarcodeArSession.js';
|
|
26
26
|
import '../spark/SparkScanSession.js';
|
|
27
|
-
import '../SparkScanView-
|
|
27
|
+
import '../SparkScanView-Cwz62wQh.js';
|
|
28
28
|
import '@scandit/web-datacapture-core/build/js/private/utils/index.js';
|
|
29
29
|
import '../spark/SparkScanScanningMode.js';
|
|
30
30
|
import '../spark/SparkScanPreviewBehavior.js';
|
|
@@ -21,7 +21,7 @@ import '../find/BarcodeFindSession.js';
|
|
|
21
21
|
import '../find/BarcodeFindTransformer.js';
|
|
22
22
|
import '../find/BarcodeFindSettings.js';
|
|
23
23
|
import '../spark/SparkScanSession.js';
|
|
24
|
-
import '../SparkScanView-
|
|
24
|
+
import '../SparkScanView-Cwz62wQh.js';
|
|
25
25
|
import '@scandit/web-datacapture-core/build/js/private/utils/index.js';
|
|
26
26
|
import '../spark/SparkScanScanningMode.js';
|
|
27
27
|
import '../spark/SparkScanPreviewBehavior.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as BarcodeCaptureWorkerManager}from'../chunks/chunk-
|
|
1
|
+
export{a as BarcodeCaptureWorkerManager}from'../chunks/chunk-E2CSA33X.js';
|
|
@@ -21,7 +21,7 @@ import '../LocalizedOnlyBarcode.js';
|
|
|
21
21
|
import '../ar/BarcodeArSession.js';
|
|
22
22
|
import '../find/BarcodeFindSession.js';
|
|
23
23
|
import '../spark/SparkScanSession.js';
|
|
24
|
-
import '../SparkScanView-
|
|
24
|
+
import '../SparkScanView-Cwz62wQh.js';
|
|
25
25
|
import '@scandit/web-datacapture-core/build/js/private/utils/index.js';
|
|
26
26
|
import '../spark/SparkScanScanningMode.js';
|
|
27
27
|
import '../spark/SparkScanPreviewBehavior.js';
|
|
@@ -24,7 +24,7 @@ import '../BarcodeCaptureSession.js';
|
|
|
24
24
|
import '../LocalizedOnlyBarcode.js';
|
|
25
25
|
import '../ar/BarcodeArSession.js';
|
|
26
26
|
import '../spark/SparkScanSession.js';
|
|
27
|
-
import '../SparkScanView-
|
|
27
|
+
import '../SparkScanView-Cwz62wQh.js';
|
|
28
28
|
import '@scandit/web-datacapture-core/build/js/private/utils/index.js';
|
|
29
29
|
import '../spark/SparkScanScanningMode.js';
|
|
30
30
|
import '../spark/SparkScanPreviewBehavior.js';
|
|
@@ -24,7 +24,7 @@ import '../BarcodeCaptureSession.js';
|
|
|
24
24
|
import '../LocalizedOnlyBarcode.js';
|
|
25
25
|
import '../ar/BarcodeArSession.js';
|
|
26
26
|
import '../spark/SparkScanSession.js';
|
|
27
|
-
import '../SparkScanView-
|
|
27
|
+
import '../SparkScanView-Cwz62wQh.js';
|
|
28
28
|
import '@scandit/web-datacapture-core/build/js/private/utils/index.js';
|
|
29
29
|
import '../spark/SparkScanScanningMode.js';
|
|
30
30
|
import '../spark/SparkScanPreviewBehavior.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as WorkerMain}from'../chunks/chunk-
|
|
1
|
+
export{a as WorkerMain}from'../chunks/chunk-HKNJ33J2.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'../chunks/chunk-
|
|
1
|
+
import {a}from'../chunks/chunk-HKNJ33J2.js';new a(globalThis,{get:()=>globalThis.Module,set:e=>{globalThis.Module=e;}});function n(e){}export{n as InlineWorker};
|