@scandit/web-datacapture-core 7.0.1 → 7.1.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/build/js/AimerViewfinder.js +1 -1
- package/build/js/Brush.js +1 -1
- package/build/js/{Camera-BJij9966.d.ts → Camera-Dpk6E99b.d.ts} +7 -11
- package/build/js/Camera.d.ts +1 -1
- package/build/js/Camera.js +1 -1
- package/build/js/CameraAccess.d.ts +1 -1
- package/build/js/CameraAccess.js +1 -1
- package/build/js/CameraRelated.d.ts +1 -1
- package/build/js/CameraRelated.js +1 -1
- package/build/js/Common.d.ts +1 -0
- package/build/js/Common.js +1 -1
- package/build/js/DataCaptureContext.d.ts +1 -1
- package/build/js/DataCaptureContext.js +1 -1
- package/build/js/DataCaptureContextRelated.d.ts +1 -1
- package/build/js/DataCaptureContextRelated.js +1 -1
- package/build/js/DataCaptureContextSettings.js +1 -1
- package/build/js/DataCaptureError.js +1 -1
- package/build/js/DataCaptureVersion.js +1 -1
- package/build/js/DataCaptureView.d.ts +1 -1
- package/build/js/DataCaptureView.js +1 -1
- package/build/js/DataCaptureViewPlusRelated.js +1 -1
- package/build/js/DefaultViewClassnames.js +1 -1
- package/build/js/Defaults.d.ts +1 -1
- package/build/js/Defaults.js +1 -1
- package/build/js/Feedback.js +1 -1
- package/build/js/FrameData.d.ts +1 -1
- package/build/js/FrameData.js +1 -1
- package/build/js/ImageFrameSource.d.ts +1 -1
- package/build/js/ImageFrameSource.js +1 -1
- package/build/js/LoadingStatus.js +1 -1
- package/build/js/Localization.js +1 -1
- package/build/js/LocationSelection.js +1 -1
- package/build/js/RectangularViewfinder.js +1 -1
- package/build/js/SingleImageUploader.d.ts +1 -1
- package/build/js/SingleImageUploader.js +1 -1
- package/build/js/SingleImageUploaderSettings.js +1 -1
- package/build/js/Sound.js +1 -1
- package/build/js/Vibration.js +1 -1
- package/build/js/ViewControls.js +1 -1
- package/build/js/Viewfinder.js +1 -1
- package/build/js/ViewfinderPlusRelated.js +1 -1
- package/build/js/assets/beepSound.js +1 -1
- package/build/js/assets/folderImage.js +1 -1
- package/build/js/assets/index.d.js +0 -1
- package/build/js/assets/index.js +1 -1
- package/build/js/assets/scanningByScandit.js +1 -1
- package/build/js/assets/transparentPixelImage.js +1 -1
- package/build/js/browserCompatibility.js +1 -1
- package/build/js/browserHelper.js +1 -1
- package/build/js/chunks/chunk-2DXPVHBJ.js +0 -1
- package/build/js/chunks/chunk-2Q5FZVGV.js +1 -3
- package/build/js/chunks/chunk-2WN7BGOB.js +1 -6
- package/build/js/chunks/chunk-3A4KLILV.js +1 -3
- package/build/js/chunks/chunk-3BMXPFN5.js +1 -0
- package/build/js/chunks/chunk-457L5N2F.js +1 -6
- package/build/js/chunks/chunk-46WJFV3I.js +1 -0
- package/build/js/chunks/{chunk-GWI2ZHMO.js → chunk-4BDVHW3U.js} +2 -11
- package/build/js/chunks/chunk-4ZMCJXZS.js +1 -3
- package/build/js/chunks/chunk-5DETRQ7Y.js +1 -0
- package/build/js/chunks/chunk-5IVFVUF4.js +2 -8
- package/build/js/chunks/chunk-5LIWL2C4.js +1 -3
- package/build/js/chunks/chunk-5PHKPYK6.js +1 -0
- package/build/js/chunks/chunk-5RW5274G.js +0 -1
- package/build/js/chunks/chunk-5S537AFM.js +1 -3
- package/build/js/chunks/chunk-5TKCHVG2.js +1 -5
- package/build/js/chunks/chunk-6H6FKGVE.js +1 -3
- package/build/js/chunks/chunk-6MF4F3EH.js +1 -0
- package/build/js/chunks/chunk-6OQQP3SM.js +2 -9
- package/build/js/chunks/chunk-6W7FX6LD.js +1 -3
- package/build/js/chunks/chunk-72DAONJI.js +1 -5
- package/build/js/chunks/chunk-7JX43F4O.js +1 -0
- package/build/js/chunks/chunk-7SW2PEHB.js +1 -3
- package/build/js/chunks/chunk-7XQ3GHYH.js +1 -3
- package/build/js/chunks/chunk-AIRWHLJH.js +1 -5
- package/build/js/chunks/chunk-B5JOQVFY.js +2 -6
- package/build/js/chunks/chunk-BDLLVGRH.js +1 -3
- package/build/js/chunks/chunk-BIGR7VVJ.js +1 -8
- package/build/js/chunks/chunk-BYRUZJLS.js +5 -0
- package/build/js/chunks/chunk-CAIEX6BZ.js +1 -0
- package/build/js/chunks/chunk-DMOXDUF6.js +1 -6
- package/build/js/chunks/chunk-EHMSDFH7.js +1 -5
- package/build/js/chunks/chunk-EP3GI7KA.js +1 -3
- package/build/js/chunks/chunk-EQRBQJYM.js +1 -3
- package/build/js/chunks/chunk-EV4OEANA.js +1 -3
- package/build/js/chunks/{chunk-TBCW7RDM.js → chunk-FE5V34QK.js} +2 -12
- package/build/js/chunks/chunk-FGCJ3ZLG.js +1 -2
- package/build/js/chunks/chunk-FGO2SSRS.js +1 -3
- package/build/js/chunks/chunk-FJCUED6E.js +21 -0
- package/build/js/chunks/chunk-FNFCPBQI.js +1 -0
- package/build/js/chunks/chunk-FQK2YWUZ.js +1 -0
- package/build/js/chunks/chunk-FTD535WI.js +1 -3
- package/build/js/chunks/{chunk-T7URG4IQ.js → chunk-FTMRPIKJ.js} +2 -10
- package/build/js/chunks/chunk-G33OCZIN.js +1 -0
- package/build/js/chunks/chunk-GAVFMG2G.js +1 -0
- package/build/js/chunks/chunk-GE4CBD4E.js +1 -3
- package/build/js/chunks/chunk-GMM3ROKD.js +1 -0
- package/build/js/chunks/chunk-GPJEB376.js +1 -5
- package/build/js/chunks/chunk-GSJH2EXJ.js +2 -6
- package/build/js/chunks/chunk-GX4YCYCH.js +1 -3
- package/build/js/chunks/chunk-H4TH4342.js +1 -3
- package/build/js/chunks/{chunk-3FDT22IX.js → chunk-HC2AMLBI.js} +1 -3
- package/build/js/chunks/chunk-IGJQFAQU.js +1 -3
- package/build/js/chunks/chunk-J2UL6U3I.js +1 -3
- package/build/js/chunks/chunk-JFRSUCMO.js +1 -3
- package/build/js/chunks/chunk-JKL2W65E.js +1 -3
- package/build/js/chunks/chunk-JO2MKLMM.js +1 -0
- package/build/js/chunks/chunk-JRBLEJMD.js +1 -0
- package/build/js/chunks/chunk-JS3T7K2Z.js +1 -3
- package/build/js/chunks/chunk-JXJQSWYG.js +1 -3
- package/build/js/chunks/chunk-KCNXUTBL.js +2 -7
- package/build/js/chunks/chunk-KJS3Z56B.js +1 -0
- package/build/js/chunks/chunk-KYNYQBNF.js +1 -3
- package/build/js/chunks/chunk-L2STPTEN.js +1 -3
- package/build/js/chunks/chunk-LA6TM76R.js +1 -3
- package/build/js/chunks/chunk-LDJ53PEJ.js +1 -0
- package/build/js/chunks/chunk-LFWLFZZA.js +1 -0
- package/build/js/chunks/chunk-M46MIHI5.js +2 -8
- package/build/js/chunks/chunk-MAMZS5CH.js +1 -7
- package/build/js/chunks/chunk-MU4VAJIM.js +2 -6
- package/build/js/chunks/chunk-MW5PTAU7.js +1 -3
- package/build/js/chunks/chunk-N5YZEC56.js +1 -3
- package/build/js/chunks/chunk-NMROJLGQ.js +1 -5
- package/build/js/chunks/chunk-NMX4VHW2.js +1 -5
- package/build/js/chunks/chunk-NQC64CT7.js +1 -0
- package/build/js/chunks/chunk-O7TZTIHO.js +1 -3
- package/build/js/chunks/chunk-PWRWWFPG.js +1 -0
- package/build/js/chunks/chunk-PZEOQRCA.js +1 -0
- package/build/js/chunks/chunk-Q7JWDX4U.js +1 -3
- package/build/js/chunks/chunk-Q7NDC6TJ.js +1 -6
- package/build/js/chunks/chunk-QBDQQMQ5.js +1 -5
- package/build/js/chunks/chunk-QCRFVRSS.js +1 -3
- package/build/js/chunks/chunk-QCZSSQAQ.js +1 -3
- package/build/js/chunks/chunk-QHBIT2WY.js +1 -3
- package/build/js/chunks/chunk-R2VJDRLZ.js +1 -0
- package/build/js/chunks/chunk-R6E4CT22.js +1 -3
- package/build/js/chunks/chunk-RIMH6UPR.js +1 -0
- package/build/js/chunks/chunk-RQQK6Z5F.js +1 -2
- package/build/js/chunks/chunk-SK6L34IF.js +1 -5
- package/build/js/chunks/chunk-SKRKDAFC.js +1 -13
- package/build/js/chunks/chunk-T3AOBMAS.js +1 -3
- package/build/js/chunks/chunk-T5EUB6UG.js +1 -6
- package/build/js/chunks/chunk-T5QHKJ2U.js +1 -0
- package/build/js/chunks/chunk-TCJPGGHY.js +2 -8
- package/build/js/chunks/chunk-TM7QAJVA.js +1 -0
- package/build/js/chunks/chunk-U6BTTEV6.js +1 -3
- package/build/js/chunks/{chunk-VLCULU2N.js → chunk-UGYFPSXM.js} +2 -15
- package/build/js/chunks/chunk-UHFABUTI.js +1 -3
- package/build/js/chunks/chunk-ULRY4SXF.js +1 -7
- package/build/js/chunks/chunk-UZWBB65W.js +1 -3
- package/build/js/chunks/chunk-VJB527QZ.js +1 -3
- package/build/js/chunks/chunk-WUHKODFA.js +1 -3
- package/build/js/chunks/chunk-XR65N6EG.js +1 -3
- package/build/js/chunks/chunk-YEMIFGKZ.js +1 -0
- package/build/js/chunks/chunk-YGFWA4WG.js +1 -6
- package/build/js/chunks/chunk-YRNH7TIR.js +0 -1
- package/build/js/chunks/chunk-ZDYFZYVT.js +1 -0
- package/build/js/chunks/chunk-ZKROZLQ4.js +1 -2
- package/build/js/chunks/chunk-ZVBD3EW5.js +1 -3
- package/build/js/global.d.js +0 -1
- package/build/js/index.d.ts +3 -3
- package/build/js/index.js +2 -50
- package/build/js/license/OpenSourceSoftwareLicenseInfo.js +1 -1
- package/build/js/logger.js +1 -1
- package/build/js/private/AnchorPositions.d.ts +13 -0
- package/build/js/private/AnchorPositions.js +1 -1
- package/build/js/private/CameraAccess.d.ts +1 -1
- package/build/js/private/CameraAccess.js +1 -1
- package/build/js/private/CameraManager.d.ts +1 -1
- package/build/js/private/CameraManager.js +1 -1
- package/build/js/private/CanvasDrawer.js +1 -1
- package/build/js/private/CanvasDrawerWithMetrics.d.ts +1 -1
- package/build/js/private/CanvasDrawerWithMetrics.js +1 -1
- package/build/js/private/CavansDrawerAbstract.js +1 -1
- package/build/js/private/CoreModuleLicenseTextProvider.d.ts +1 -1
- package/build/js/private/CoreModuleLicenseTextProvider.js +1 -1
- package/build/js/private/CustomLocationsView.js +1 -1
- package/build/js/private/CustomLocationsViewStyles.js +1 -1
- package/build/js/private/DataCaptureContextRelated.d.ts +1 -1
- package/build/js/private/DataCaptureContextRelated.js +0 -1
- package/build/js/private/DrawCommandBuffer.js +1 -1
- package/build/js/private/EventManager.d.ts +1 -1
- package/build/js/private/EventManager.js +1 -1
- package/build/js/private/FrameReaders/FrameReader.d.ts +1 -1
- package/build/js/private/FrameReaders/FrameReader.js +1 -1
- package/build/js/private/FrameReaders/FrameReaderAbstract.d.ts +1 -1
- package/build/js/private/FrameReaders/FrameReaderAbstract.js +1 -1
- package/build/js/private/FrameReaders/GrayScaleFrameReader.d.ts +1 -1
- package/build/js/private/FrameReaders/GrayScaleFrameReader.js +1 -1
- package/build/js/private/FrameReaders/WatermarkStack.js +1 -1
- package/build/js/private/FrameReaders/index.d.ts +1 -1
- package/build/js/private/FrameReaders/index.js +1 -2
- package/build/js/private/FrameReaders/webglUtilities.js +1 -1
- package/build/js/private/GestureRecognizer/GestureRecognizer.js +1 -1
- package/build/js/private/GestureRecognizer/PointerEventsDetector.js +1 -1
- package/build/js/private/GestureRecognizer/index.js +1 -1
- package/build/js/private/Helper.js +1 -1
- package/build/js/private/HtmlElementState.js +1 -1
- package/build/js/private/ModuleLicenseTextProvider.js +0 -1
- package/build/js/private/NormalizedConfigureOptions.d.ts +1 -1
- package/build/js/private/NormalizedConfigureOptions.js +0 -1
- package/build/js/private/OrientationObserver.js +1 -1
- package/build/js/private/Serializable.js +0 -1
- package/build/js/private/SingleImageUploaderView.js +1 -1
- package/build/js/private/SingleImageUploaderViewStyles.js +1 -1
- package/build/js/private/View.js +0 -1
- package/build/js/private/ViewClassNames.js +1 -1
- package/build/js/private/ViewControls+related.js +1 -1
- package/build/js/private/ViewControls_related.d.ts +1 -1
- package/build/js/private/ViewStyles.js +1 -1
- package/build/js/private/ViewsRegistry.d.ts +1 -1
- package/build/js/private/ViewsRegistry.js +1 -1
- package/build/js/private/hybridDesktopPlatformHelpers.js +1 -1
- package/build/js/private/multithreadSimdHelper.js +1 -1
- package/build/js/private/ui/atoms/ArrowDownSvgIcon.d.ts +17 -0
- package/build/js/private/ui/atoms/ArrowDownSvgIcon.js +21 -0
- package/build/js/private/ui/atoms/ArrowLeftSvgIcon.d.ts +17 -0
- package/build/js/private/ui/atoms/ArrowLeftSvgIcon.js +21 -0
- package/build/js/private/ui/atoms/ArrowRightSvgIcon.d.ts +17 -0
- package/build/js/private/ui/atoms/ArrowRightSvgIcon.js +21 -0
- package/build/js/private/ui/atoms/ArrowUpSvgIcon.d.ts +17 -0
- package/build/js/private/ui/atoms/ArrowUpSvgIcon.js +21 -0
- package/build/js/private/ui/atoms/ArrowsUp.js +1 -1
- package/build/js/private/ui/atoms/BoxArrowDownSvgIcon.d.ts +17 -0
- package/build/js/private/ui/atoms/BoxArrowDownSvgIcon.js +21 -0
- package/build/js/private/ui/atoms/BoxWithCrossSvgIcon.d.ts +17 -0
- package/build/js/private/ui/atoms/BoxWithCrossSvgIcon.js +21 -0
- package/build/js/private/ui/atoms/CalendarExclamationMarkSvgIcon.d.ts +17 -0
- package/build/js/private/ui/atoms/CalendarExclamationMarkSvgIcon.js +19 -0
- package/build/js/private/ui/atoms/CameraSwitchReverseSvgIcon.d.ts +17 -0
- package/build/js/private/ui/atoms/CameraSwitchReverseSvgIcon.js +27 -0
- package/build/js/private/ui/atoms/CameraSwitchSvgIcon.d.ts +17 -0
- package/build/js/private/ui/atoms/CameraSwitchSvgIcon.js +27 -0
- package/build/js/private/ui/atoms/CheckSvgIcon.d.ts +17 -0
- package/build/js/private/ui/atoms/CheckSvgIcon.js +15 -0
- package/build/js/private/ui/atoms/CrossSvgIcon.d.ts +17 -0
- package/build/js/private/ui/atoms/CrossSvgIcon.js +15 -0
- package/build/js/private/ui/atoms/Dot5xSvgIcon.d.ts +17 -0
- package/build/js/private/ui/atoms/Dot5xSvgIcon.js +21 -0
- package/build/js/private/ui/atoms/ExclamationMarkSvgIcon.d.ts +17 -0
- package/build/js/private/ui/atoms/ExclamationMarkSvgIcon.js +17 -0
- package/build/js/private/ui/atoms/GlassSvgIcon.d.ts +17 -0
- package/build/js/private/ui/atoms/GlassSvgIcon.js +15 -0
- package/build/js/private/ui/atoms/HandLensCheckSvgIcon.d.ts +17 -0
- package/build/js/private/ui/atoms/HandLensCheckSvgIcon.js +24 -0
- package/build/js/private/ui/atoms/OnexSvgIcon.d.ts +17 -0
- package/build/js/private/ui/atoms/OnexSvgIcon.js +13 -0
- package/build/js/private/ui/atoms/ProgressBar.js +1 -1
- package/build/js/private/ui/atoms/QuestionMarkSvgIcon.d.ts +17 -0
- package/build/js/private/ui/atoms/QuestionMarkSvgIcon.js +26 -0
- package/build/js/private/ui/atoms/RoundedCheckSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/RoundedExclamationMarkSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/ShutterButton.js +2 -9
- package/build/js/private/ui/atoms/StarFilledSvgIcon.d.ts +17 -0
- package/build/js/private/ui/atoms/StarFilledSvgIcon.js +13 -0
- package/build/js/private/ui/atoms/StarHalfFilledSvgIcon.d.ts +17 -0
- package/build/js/private/ui/atoms/StarHalfFilledSvgIcon.js +32 -0
- package/build/js/private/ui/atoms/StarSvgIcon.d.ts +17 -0
- package/build/js/private/ui/atoms/StarSvgIcon.js +14 -0
- package/build/js/private/ui/atoms/SvgIcon.js +1 -1
- package/build/js/private/ui/atoms/ToPickSvgIcon.d.ts +17 -0
- package/build/js/private/ui/atoms/ToPickSvgIcon.js +27 -0
- package/build/js/private/ui/atoms/Toast.d.ts +1 -1
- package/build/js/private/ui/atoms/Toast.js +1 -1
- package/build/js/private/ui/atoms/TwoxSvgIcon.d.ts +17 -0
- package/build/js/private/ui/atoms/TwoxSvgIcon.js +14 -0
- package/build/js/private/ui/colors.d.ts +2 -1
- package/build/js/private/ui/colors.js +1 -1
- package/build/js/private/ui/molecules/HintPresenter.d.ts +1 -1
- package/build/js/private/ui/molecules/HintPresenter.js +1 -1
- package/build/js/private/ui/molecules/LoadingOverlay.js +1 -1
- package/build/js/private/unsupportedBrowserError.js +1 -1
- package/build/js/private/utils/ScanditHTMLElement.js +1 -1
- package/build/js/private/utils/clamp.js +1 -1
- package/build/js/private/utils/css.js +1 -1
- package/build/js/private/utils/debounce.js +1 -1
- package/build/js/private/utils/deferred.js +1 -1
- package/build/js/private/utils/defineCustomElements.js +1 -1
- package/build/js/private/utils/html.js +1 -1
- package/build/js/private/utils/index.js +1 -15
- package/build/js/private/utils/isObject.js +1 -1
- package/build/js/private/utils/isWorkerScope.js +1 -1
- package/build/js/private/utils/match.js +1 -1
- package/build/js/private/utils/quadrilateralUtils.d.ts +8 -0
- package/build/js/private/utils/quadrilateralUtils.js +1 -0
- package/build/js/private/utils/throttle.js +1 -1
- package/build/js/private/utils/timeout.js +1 -1
- package/build/js/private/utils/unknownErrorToString.js +1 -1
- package/build/js/private/utils/wait.js +1 -1
- package/build/js/private/utils/waitTransitionEndForElement.js +1 -1
- package/build/js/sdk.d.ts +1 -1
- package/build/js/sdk.js +1 -1
- package/build/js/translations.js +1 -1
- package/build/js/tsHelper.js +1 -1
- package/build/js/worker/OverrideState.js +1 -1
- package/build/js/worker/WorkerMain.d.ts +1 -1
- package/build/js/worker/WorkerMain.js +1 -1
- package/build/js/worker/dataCapture.inlineWorker.d.ts +1 -1
- package/build/js/worker/dataCapture.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/dataCaptureLoader.d.ts +1 -1
- package/build/js/worker/dataCaptureLoader.js +1 -1
- package/build/js/worker/dataCaptureWorkerRelated.d.ts +1 -1
- package/build/js/worker/dataCaptureWorkerRelated.js +1 -1
- package/build/js/worker/helper.js +1 -1
- package/build/js/worker/helperFetch.js +1 -1
- package/build/js/worker/helperFs.d.ts +0 -2
- package/build/js/worker/helperFs.js +1 -1
- package/build/js/worker/importWasmScript.js +1 -1
- package/build/js/worker/index.d.ts +1 -1
- package/build/js/worker/index.js +1 -4
- package/build/js/worker/inlineWorker.d.js +0 -1
- package/package.json +2 -2
- package/build/js/chunks/chunk-2VQ6NTFF.js +0 -16
- package/build/js/chunks/chunk-2WQHYCZC.js +0 -6
- package/build/js/chunks/chunk-34FEFSCI.js +0 -6
- package/build/js/chunks/chunk-44B7Z6ZZ.js +0 -5
- package/build/js/chunks/chunk-4DCTEQWR.js +0 -3
- package/build/js/chunks/chunk-6O3B7VJJ.js +0 -6
- package/build/js/chunks/chunk-ABRFVD7T.js +0 -5
- package/build/js/chunks/chunk-BOKAHIDO.js +0 -14
- package/build/js/chunks/chunk-GANXTAAE.js +0 -10
- package/build/js/chunks/chunk-HNMM5VR6.js +0 -6
- package/build/js/chunks/chunk-KAZWF3JC.js +0 -5
- package/build/js/chunks/chunk-KW3YSGJX.js +0 -5
- package/build/js/chunks/chunk-MKHBE7BB.js +0 -6
- package/build/js/chunks/chunk-MOKCZFZV.js +0 -10
- package/build/js/chunks/chunk-MSPQDVWJ.js +0 -5
- package/build/js/chunks/chunk-N4NOODAT.js +0 -3
- package/build/js/chunks/chunk-N5F43TUJ.js +0 -5
- package/build/js/chunks/chunk-PXXUQXGB.js +0 -7
- package/build/js/chunks/chunk-TVDFY6ME.js +0 -5
- package/build/js/chunks/chunk-TWBD6OC5.js +0 -9
- package/build/js/chunks/chunk-UPUPKPEP.js +0 -8
- package/build/js/chunks/chunk-W4O7BOCW.js +0 -8
- package/build/js/chunks/chunk-W7LJM2QO.js +0 -5
- package/build/js/chunks/chunk-WSG6WSZN.js +0 -6
- package/build/js/chunks/chunk-XVLYCDJL.js +0 -7
- package/build/js/chunks/chunk-Z6YXX4XZ.js +0 -5
- package/build/js/chunks/chunk-ZMMHJ5WH.js +0 -47
- package/build/js/chunks/chunk-ZSYUKWWL.js +0 -5
- /package/{THIRD-PARTY.txt → THIRD_PARTY.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export{a as setupFS}from'../chunks/chunk-TM7QAJVA.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export{a as importWasmScript}from'../chunks/chunk-YGFWA4WG.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
2
|
export { WorkerMain } from './WorkerMain.js';
|
|
3
|
-
export { Z as AnyDataCaptureActionMessage, _ as AugmentedWorker, aS as CaptureModeDeserializerInstance, a9 as CreateContextDataCaptureAction, bb as CreateContextParameters, a0 as DataCaptureActionMessageKey, X as DataCaptureCallbackMessage, aq as DataCaptureCallbackMessageKeys, aK as DataCaptureContext, aR as DataCaptureContextDeserializer, aQ as DataCaptureContextDeserializerResult, U as DataCaptureEngine, aL as DataCaptureImageBufferFrameSource, D as DataCaptureLoader, R as DataCaptureLoaderOptions, aO as DataCaptureView, aI as DataCaptureWorker, ad as DeleteFrameDataDataCaptureAction, ax as DidTapTrackedBarcode, ah as DisposeDataCaptureAction, aJ as EmscriptenClassHandle, a1 as EngineWorkerResponse, al as ExtractCentaurusLicenseDataCaptureAction, a2 as ExtractCentaurusLicenseResponse, ai as FlushAnalyticsDataCaptureAction, Y as GenericHint, aM as GestureListener, aN as GestureRecognizer, ap as GetOpenSourceSoftwareLicenseInfoAction, a6 as GetOpenSourceSoftwareLicenseInfoResponse, a5 as GetViewfinderInfo, ao as GetViewfinderInfoAction, b4 as GuidanceHint, b2 as GuidanceHintAnchor, b3 as GuidanceHintStyle, aE as HideGuidanceMessage, av as HideHintWorkerMessage, aC as HideToastMessage, b0 as HintAnchor, a_ as HintCornerStyle, aW as HintFont, aZ as HintHeight, a$ as HintIcon, b8 as HintPresenterV2, an as HintPresenterV2updateAction, b1 as HintStyle, aX as HintTextAlignment, aY as HintWidth, af as IsFeatureSupportedAction, au as IsFeatureSupportedMessage, a4 as IsFeatureSupportedResponse, aP as JSONParseable, b7 as LicensedFeature, a8 as LoadLibraryDataCaptureAction, ba as LoadLibraryParameters, W as Module, $ as ModuleHandler, aT as ModuleMirrorAxis, az as OnFrameProcessingFinishedMessage, ay as OnFrameProcessingStartedMessage, aA as OnFrameSkippedMessage, am as OnTapAction, aH as PayloadForCommand, S as PerformanceMetrics, aw as PerformanceMetricsReportMessage, b9 as PlatformHintPresenter, ab as ProcessFrameDataCaptureAction, be as ProcessFrameParameters, aj as ReportCameraPropertiesDataCaptureAction, bf as ReportCameraPropertiesParameters, ac as RequestFrameDataDataCaptureAction, a3 as RequestFrameDataResponse, aa as SetFrameSourceDataCaptureAction, bd as SetFrameSourceParameters, ak as SetLogLevelDataCaptureAction, aD as ShowGuidanceMessage, as as ShowHintWorkerMessage, aB as ShowToastMessage, aF as StartUpdateTimerMessage, aG as StopUpdateTimerMessage, ar as SuccessFeedbackWorkerMessage, b6 as ToastHint, b5 as ToastHintStyle, ag as UpdateContextDataCaptureAction, bc as UpdateContextParameters, at as UpdateHintWorkerMessage, aU as Vector, ae as VisibilityChangeAction, aV as WasmFrameData, bg as WorkerFunctions, a7 as WorkerResponse } from '../Camera-
|
|
3
|
+
export { Z as AnyDataCaptureActionMessage, _ as AugmentedWorker, aS as CaptureModeDeserializerInstance, a9 as CreateContextDataCaptureAction, bb as CreateContextParameters, a0 as DataCaptureActionMessageKey, X as DataCaptureCallbackMessage, aq as DataCaptureCallbackMessageKeys, aK as DataCaptureContext, aR as DataCaptureContextDeserializer, aQ as DataCaptureContextDeserializerResult, U as DataCaptureEngine, aL as DataCaptureImageBufferFrameSource, D as DataCaptureLoader, R as DataCaptureLoaderOptions, aO as DataCaptureView, aI as DataCaptureWorker, ad as DeleteFrameDataDataCaptureAction, ax as DidTapTrackedBarcode, ah as DisposeDataCaptureAction, aJ as EmscriptenClassHandle, a1 as EngineWorkerResponse, al as ExtractCentaurusLicenseDataCaptureAction, a2 as ExtractCentaurusLicenseResponse, ai as FlushAnalyticsDataCaptureAction, Y as GenericHint, aM as GestureListener, aN as GestureRecognizer, ap as GetOpenSourceSoftwareLicenseInfoAction, a6 as GetOpenSourceSoftwareLicenseInfoResponse, a5 as GetViewfinderInfo, ao as GetViewfinderInfoAction, b4 as GuidanceHint, b2 as GuidanceHintAnchor, b3 as GuidanceHintStyle, aE as HideGuidanceMessage, av as HideHintWorkerMessage, aC as HideToastMessage, b0 as HintAnchor, a_ as HintCornerStyle, aW as HintFont, aZ as HintHeight, a$ as HintIcon, b8 as HintPresenterV2, an as HintPresenterV2updateAction, b1 as HintStyle, aX as HintTextAlignment, aY as HintWidth, af as IsFeatureSupportedAction, au as IsFeatureSupportedMessage, a4 as IsFeatureSupportedResponse, aP as JSONParseable, b7 as LicensedFeature, a8 as LoadLibraryDataCaptureAction, ba as LoadLibraryParameters, W as Module, $ as ModuleHandler, aT as ModuleMirrorAxis, az as OnFrameProcessingFinishedMessage, ay as OnFrameProcessingStartedMessage, aA as OnFrameSkippedMessage, am as OnTapAction, aH as PayloadForCommand, S as PerformanceMetrics, aw as PerformanceMetricsReportMessage, b9 as PlatformHintPresenter, ab as ProcessFrameDataCaptureAction, be as ProcessFrameParameters, aj as ReportCameraPropertiesDataCaptureAction, bf as ReportCameraPropertiesParameters, ac as RequestFrameDataDataCaptureAction, a3 as RequestFrameDataResponse, aa as SetFrameSourceDataCaptureAction, bd as SetFrameSourceParameters, ak as SetLogLevelDataCaptureAction, aD as ShowGuidanceMessage, as as ShowHintWorkerMessage, aB as ShowToastMessage, aF as StartUpdateTimerMessage, aG as StopUpdateTimerMessage, ar as SuccessFeedbackWorkerMessage, b6 as ToastHint, b5 as ToastHintStyle, ag as UpdateContextDataCaptureAction, bc as UpdateContextParameters, at as UpdateHintWorkerMessage, aU as Vector, ae as VisibilityChangeAction, aV as WasmFrameData, bg as WorkerFunctions, a7 as WorkerResponse } from '../Camera-Dpk6E99b.js';
|
|
4
4
|
import '../private/Serializable.js';
|
|
5
5
|
import '../private/FrameReaders/WatermarkStack.js';
|
|
6
6
|
import '../tsHelper.js';
|
package/build/js/worker/index.js
CHANGED
|
@@ -1,4 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export { a as WorkerMain } from '../chunks/chunk-GANXTAAE.js';
|
|
3
|
-
export { a as DataCaptureEngine } from '../chunks/chunk-BOKAHIDO.js';
|
|
4
|
-
export { h as GuidanceHintAnchor, i as GuidanceHintStyle, g as HintAnchor, e as HintCornerStyle, a as HintFont, d as HintHeight, f as HintIcon, b as HintTextAlignment, c as HintWidth, k as LicensedFeature, j as ToastHintStyle } from '../chunks/chunk-3FDT22IX.js';
|
|
1
|
+
export{a as DataCaptureLoader}from'../chunks/chunk-5DETRQ7Y.js';export{a as WorkerMain}from'../chunks/chunk-KJS3Z56B.js';export{a as DataCaptureEngine}from'../chunks/chunk-LFWLFZZA.js';export{h as GuidanceHintAnchor,i as GuidanceHintStyle,g as HintAnchor,e as HintCornerStyle,a as HintFont,d as HintHeight,f as HintIcon,b as HintTextAlignment,c as HintWidth,k as LicensedFeature,j as ToastHintStyle}from'../chunks/chunk-HC2AMLBI.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scandit/web-datacapture-core",
|
|
3
|
-
"version": "7.0.1",
|
|
3
|
+
"version": "7.1.0-beta.1",
|
|
4
4
|
"description": "Scandit Data Capture SDK for the Web",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"README.md",
|
|
103
103
|
"README.txt",
|
|
104
104
|
"LICENSE",
|
|
105
|
-
"
|
|
105
|
+
"THIRD_PARTY.txt",
|
|
106
106
|
"build/",
|
|
107
107
|
"sdc-lib/"
|
|
108
108
|
],
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { a as a$7 } from './chunk-6OQQP3SM.js';
|
|
2
|
-
import { b as b$1 } from './chunk-TBCW7RDM.js';
|
|
3
|
-
import { b, a as a$6 } from './chunk-5S537AFM.js';
|
|
4
|
-
import { a as a$5 } from './chunk-3A4KLILV.js';
|
|
5
|
-
import { a as a$3 } from './chunk-U6BTTEV6.js';
|
|
6
|
-
import { a as a$1 } from './chunk-EV4OEANA.js';
|
|
7
|
-
import { a as a$4 } from './chunk-GE4CBD4E.js';
|
|
8
|
-
import { a as a$2 } from './chunk-R6E4CT22.js';
|
|
9
|
-
|
|
10
|
-
var o="--view-finder-top",a="--view-finder-bottom",s="--hint-anchor-offset",H="--max-width-fraction",T="--horizontal-margin",d="--max-width-ratio-adjust",w=(c=>(c.Update="hintpresenterupdate",c))(w||{}),n=class n extends a$1{constructor(){super();this.onDidToastHideHandler=this.onDidToastHide.bind(this);this.orientationObserver=new b;this.onOrientationChangeHandler=a$2(this.onOrientationChange.bind(this),10);let t=this.attachShadow({mode:"open"});t.innerHTML=a$3`
|
|
11
|
-
<div id="root">
|
|
12
|
-
<slot></slot>
|
|
13
|
-
</div>
|
|
14
|
-
`,t.append(n.createStyleElement().cloneNode(!0)),this.root=t.querySelector("#root");}static createStyleElement(){return a$4`:host{pointer-events:none}:host #root{bottom:env(safe-area-inset-bottom,5vh);left:env(safe-area-inset-left,0);position:absolute;right:env(safe-area-inset-right,0);top:env(safe-area-inset-top,5vh);width:100%;${o}:0;${a}:0;${d}:1;z-index:1}::slotted(${b$1.tag}){left:50%;max-width:calc(var(${H})*var(${d})*100% - var(${T}));position:absolute;transform:translate3d(-50%,0,0);width:100%}::slotted(${b$1.tag}.${"aboveViewFinder"}){transform:translate3d(-50%,calc(-100% + var(${o}) - var(${s})),0)}::slotted(${b$1.tag}.${"belowViewFinder"}){transform:translate3d(-50%,calc(var(${a}) + var(${s})),0)}::slotted(${b$1.tag}.${"top"}){top:calc(var(${s}))}::slotted(${b$1.tag}.fitToText){width:fit-content}`}static register(){a$5({[n.tag]:n});}static create(){return document.createElement(n.tag)}connectedCallback(){this.orientationObserver.addEventListener(a$6,this.onOrientationChangeHandler),this.orientationObserver.register(),this.addEventListener("didhide",this.onDidToastHideHandler),this._viewFinderRect==null&&(this.root.style.setProperty(o,`${this.root.clientHeight/2}px`),this.root.style.setProperty(a,`${this.root.clientHeight/2+1}px`));}disconnectedCallback(){this.removeEventListener("didhide",this.onDidToastHideHandler);}setViewFinderRect(t){if(t===null){this.root.style.removeProperty(o),this.root.style.removeProperty(a);return}this._viewFinderRect=t;let{origin:{y:i},size:{height:e}}=this._viewFinderRect;this.root.style.setProperty(o,`${i}px`),this.root.style.setProperty(a,`${i+e}px`);}handleMessage(t){let{type:i}=t;switch(i){case"showToast":{this.showToast(t.payload);break}case"hideToast":{this.hideToast(t.payload);break}case"showGuidance":{this.showGuidance(t.payload);break}case"hideGuidance":{this.hideGuidance(t.payload);break}case"startUpdateTimer":{this.startUpdateTimer(t.payload.duration.value);break}case"stopUpdateTimer":{this.stopUpdateTimer();break}}}onDidToastHide(t){t.stopPropagation(),t.detail.target.remove();}async showToast(t){let i=this.idFromHint(t),e=this.querySelector(`#${i}`);if(e||(e=b$1.create(),e.id=i,this.append(e)),e.textContent=t.text,e.hintStyle=t.hintStyle,e.className="",e.style.setProperty(s,`${e.hintStyle.hintAnchorOffset/16}rem`),e.style.setProperty(H,t.hintStyle.maxWidthFraction.toString()),e.style.setProperty(T,`${t.hintStyle.horizontalMargin/16}rem`),e.classList.add(t.hintStyle.hintAnchor),e.classList.toggle("fitToText",t.hintStyle.fitToText),t.tag==="MoveCloserGuidance"){let h=a$7.create();h.setAttribute("slot","first-child"),e.append(h),e.setAttribute("direction","column");}return e.show()}async hideToast(t){let i=this.querySelector(`#${this.idFromHint(t)}`);if(i!=null)return i.hide()}async showGuidance(t){return this.showToast(t)}async hideGuidance(t){return this.hideToast(t)}startUpdateTimer(t){this.intervalId=setInterval(()=>{this.dispatchEvent(new CustomEvent("hintpresenterupdate"));},t);}stopUpdateTimer(){clearInterval(this.intervalId);}idFromHint(t){var i;return btoa([t.hintStyle.textColor,t.hintStyle.backgroundColor,t.hintStyle.hintAnchor,(i=t.tag)!=null?i:"",t.hintStyle.textAlignment].join("-")).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}onOrientationChange(t){let i=1;i=t.detail.value==="landscapeLeft"||t.detail.value==="landscapeRight"?window.innerHeight/window.innerWidth:1,this.root.style.setProperty(d,i.toString()),this._viewFinderRect==null&&(this.root.style.setProperty(o,`${this.root.clientHeight/2}px`),this.root.style.setProperty(a,`${this.root.clientHeight/2+1}px`));}};n.tag="scandit-hints";var l=n;l.register();
|
|
15
|
-
|
|
16
|
-
export { w as a, l as b };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { d } from './chunk-UPUPKPEP.js';
|
|
2
|
-
import { n, l, d as d$1 } from './chunk-N4NOODAT.js';
|
|
3
|
-
|
|
4
|
-
var s=class{constructor(i,e){this.type="rectangular";this._disabledColor=n.fromRGBA(0,0,0,0);let n$1=i!=null?i:d.RectangularViewfinder.defaultStyle;this._style=d.RectangularViewfinder.styles[n$1].style,this._lineStyle=d.RectangularViewfinder.styles[n$1].lineStyle,this._dimming=d.RectangularViewfinder.styles[n$1].dimming,this._animation=d.RectangularViewfinder.styles[n$1].animation,this.color=d.RectangularViewfinder.styles[n$1].color,this._sizeWithUnitAndAspect=d.RectangularViewfinder.styles[n$1].size,e!==void 0&&(this._lineStyle=e);}get animation(){return this._animation}set animation(i){this._animation=i;}get dimming(){return this._dimming}set dimming(i){this._dimming=i;}get lineStyle(){return this._lineStyle}get sizeWithUnitAndAspect(){return this._sizeWithUnitAndAspect}get style(){return this._style}get disabledColor(){return this._disabledColor}set disabledColor(i){this._disabledColor=i;}setHeightAndAspectRatio(i,e){this._sizeWithUnitAndAspect=l.sizeWithHeightAndAspectRatio(i,e);}setShorterDimensionAndAspectRatio(i,e){this._sizeWithUnitAndAspect=l.sizeWithShorterDimensionAndAspectRatio(new d$1(i,"fraction"),e);}setSize(i){this._sizeWithUnitAndAspect=l.sizeWithWidthAndHeight(i);}setWidthAndAspectRatio(i,e){this._sizeWithUnitAndAspect=l.sizeWithWidthAndAspectRatio(i,e);}toJSONObject(){return {type:this.type,color:this.color.toJSON(),style:this.style,lineStyle:this.lineStyle,dimming:this.dimming,animation:this.animation?this.animation.toJSONObject():null,size:this.sizeWithUnitAndAspect.toJSONObject(),disabledColor:this._disabledColor.toJSON()}}};
|
|
5
|
-
|
|
6
|
-
export { s as a };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { a } from './chunk-XR65N6EG.js';
|
|
2
|
-
import { a as a$1 } from './chunk-QCZSSQAQ.js';
|
|
3
|
-
|
|
4
|
-
var y=Promise.resolve(),p=!1,h=!1,d,b={writableDataPathPreload:"",writableDataPath:"",preloading:!1};async function T(){let t="FILE_DATA",o,s,e,r,a$2;function n(){clearTimeout(a$2),e.result.close(),r.result.close(),o(0);}function I(){try{let l=[],f=e.result.transaction(t,"readonly");f.addEventListener("error",n),f.addEventListener("abort",n);let m=f.objectStore(t).openCursor();m.onsuccess=()=>{let i=m.result;if(i==null)try{let c=0,u=r.result.transaction(t,"readwrite"),P=u.objectStore(t);u.addEventListener("error",n),u.addEventListener("abort",n),u.oncomplete=()=>{clearTimeout(a$2),e.result.close(),r.result.close(),o(c);};for(let D of l){let g=P.count(D.primaryKey);g.onsuccess=()=>{g.result===0&&(++c,P.add(D.value,D.primaryKey));},clearTimeout(a$2),a$2=globalThis.setTimeout(()=>{a.log(a.Level.Warn,"IndexedDB database is blocked! Resetting Scandit Data Capture library..."),s(new a$1({name:"BlockedIndexedDB",message:"IndexedDB database is blocked"}));},500);}}catch(c){n.call({error:c});}else {let{writableDataPathPreload:c,writableDataPath:u}=b;l.push({value:i.value,primaryKey:i.primaryKey.toString().replace(`${c}/`,`${u}/`)}),i.continue();}},m.onerror=n;}catch(l){n.call({error:l});}}return new Promise((l,f)=>{let{writableDataPathPreload:m,writableDataPath:i}=b;o=l,s=f,e=indexedDB.open(m),e.onupgradeneeded=()=>{try{e.result.createObjectStore(t);}catch(c){}},e.onsuccess=()=>{if(!Array.from(e.result.objectStoreNames).includes(t)){l(0);return}r=indexedDB.open(i),r.onupgradeneeded=()=>{try{r.result.createObjectStore(t);}catch(c){}},r.onsuccess=()=>{I();},r.onblocked=r.onerror=n;},e.onblocked=e.onerror=n;})}async function B(t,o){let{preloading:s}=b;if(d!=null){if(p=!0,!s&&t){let e=await T();if(!o&&e===0){p=!1;return}}await new Promise((e,r)=>{d==null||d(t,a=>{if(p=!1,a!=null){r(a);return}e();});});}}async function w(t,o=!1,s=!1){return (!h||s)&&(p?(h=!0,y=y.then(async()=>(h=!1,B(t,o)))):y=B(t,o)),y}async function O(t){b=t,d=FS.syncfs,FS.syncfs=(o,s)=>{let e=s,r=a=>{e(a);};w(o).then(r).catch(r);};try{FS.mkdir(b.writableDataPath);}catch(o){if(o.code!=="EEXIST")throw d=void 0,o}return FS.mount(IDBFS,{},b.writableDataPath),w(!0,!0)}
|
|
5
|
-
|
|
6
|
-
export { O as a };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { h, d } from './chunk-N4NOODAT.js';
|
|
2
|
-
|
|
3
|
-
var o=class c{constructor(e){this.element=e,this.setupListeners(),this.cacheDOMRect();}get width(){return this.cachedDOMRect.width}get height(){return this.cachedDOMRect.height}static areEquivalentJSONStates(e,t){return !e||!t?!1:e.size.isSameAs(t.size)&&e.visible===t.visible}onStateChanged(e){this.onStateChangedListener=e;}onDisconnected(e){this.onDisconnectedListener=e;}toJSONObject(){return {size:new h(new d(this.width,"pixel"),new d(this.height,"pixel")),visible:this.isVisible()}}isSameAs(e){return c.areEquivalentJSONStates(this.toJSONObject(),e.toJSONObject())}removeListeners(){this.resizeObserver.disconnect(),this.mutationObserver.disconnect();}isVisible(){return this.width>0&&this.height>0||this.element.getClientRects().length>0}setupListeners(){this.resizeObserver=new ResizeObserver(this.onSizeChange.bind(this)),this.resizeObserver.observe(this.element),this.mutationObserver=new MutationObserver(this.onMutation.bind(this)),this.element.parentElement&&this.mutationObserver.observe(this.element.parentElement,{childList:!0});}onSizeChange(e){var t;this.cacheDOMRect(e),document.contains(this.element)&&((t=this.onStateChangedListener)==null||t.call(this));}onMutation(e){var s;let t=e.find(({type:i})=>i==="childList");if(t){for(let i of t.removedNodes)if(i===this.element&&!document.contains(this.element)){(s=this.onDisconnectedListener)==null||s.call(this);return}}}cacheDOMRect(e){let t;Array.isArray(e)&&e.length>0&&(t=e[0].contentRect),t==null&&(t=this.element.getBoundingClientRect()),this.cachedDOMRect=t;}};
|
|
4
|
-
|
|
5
|
-
export { o as a };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { a as a$1 } from './chunk-GSJH2EXJ.js';
|
|
2
|
-
import { a } from './chunk-HNMM5VR6.js';
|
|
3
|
-
|
|
4
|
-
var o=class r{constructor(i,e){this._vibration=null;this._sound=null;this._vibration=i,this._sound=e;}static get defaultFeedback(){return new r(a.defaultVibration,a$1.defaultSound)}get vibration(){return this._vibration}get sound(){return this._sound}emit(){this.sound&&this.sound.play(),this.vibration&&this.vibration.vibrate();}toJSONObject(){let i={};return this.sound!==null&&(i.sound=this.sound.toJSONObject()),this.vibration!==null&&(i.vibration=this.vibration.toJSONObject()),i}};
|
|
5
|
-
|
|
6
|
-
export { o as a };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { a } from './chunk-XR65N6EG.js';
|
|
2
|
-
|
|
3
|
-
var n=class{constructor(e){this.overrideThreadsSupport="auto";this.overrideSimdSupport="auto";this.workerCommandId=1;this.workerTasks=new Map;this.workerListeners=[];var r,a;this.libraryLocation=e.libraryLocation,this.isPreloadEngine=(r=e.preloadEngine)!=null?r:!1,this.workerMessageListener=this.onWorkerMessage.bind(this),this.dataCaptureWorker.addEventListener("message",this.workerMessageListener),this.overrideThreadsSupport=e.overrideThreadsSupport,this.overrideSimdSupport=e.overrideSimdSupport,this.verifyResponseHash=e.verifyResponseHash,this.highEndBlurryRecognition=(a=e.highEndBlurryRecognition)!=null?a:!1,typeof e.loadProgressNotifier=="function"&&this.addWorkerListener(o=>{var i;o.type==="loadLibraryProgress"&&((i=e.loadProgressNotifier)==null||i.call(e,o.payload));});}get dataCaptureWorker(){return (this._dataCaptureWorker)!=null||(this._dataCaptureWorker=(void 0)),this._dataCaptureWorker}get name(){return "CoreLoader"}get fixedWasmMemory(){return null}static async create(e){var a$1;let r=new this(e);return await r.workerCommand("setLogLevel",{level:(a$1=e.logLevel)!=null?a$1:a.Level.Debug}),await r.load(),r}async load(){var e;try{await this.workerCommand("loadLibrary",{libraryLocation:this.libraryLocation,locationPath:window.location.pathname,referredOrigin:window.location.origin,preloadEngine:this.isPreloadEngine,writableDataPathOverride:(e=localStorage.getItem("scanditWritableDataPathOverride"))!=null?e:void 0,overrideThreadsSupport:this.overrideThreadsSupport,overrideSimdSupport:this.overrideSimdSupport,verifyResponseHash:this.verifyResponseHash,fixedWasmMemory:this.fixedWasmMemory});}catch(r){if(r!=null&&typeof r=="object"&&typeof r.error=="string"&&r.error.includes("BlockedIndexedDB"))return await this.terminateDataCaptureWorker(!1),this.dataCaptureWorker.addEventListener("message",this.workerMessageListener),localStorage.setItem("scanditWritableDataPathOverride",`/scandit_sync_folder_${[...crypto.getRandomValues(new Uint32Array(2))].map(a=>a.toString(32)).join("")}`),this.load();throw r}}async workerCommand(e,r,a){return new Promise((o,i)=>{let t=this.workerCommandId++;this.workerTasks.set(t,{resolve:o,reject:i,command:e});let d={...r,command:e,id:t};this.dataCaptureWorker.postMessage(d,a);})}async terminateDataCaptureWorker(e=!0){var r,a;e&&await this.workerCommand("dispose",{}),(r=this._dataCaptureWorker)==null||r.removeEventListener("message",this.workerMessageListener),(a=this._dataCaptureWorker)==null||a.terminate(),this._dataCaptureWorker=void 0;}addWorkerListener(e){this.workerListeners.push(e);}removeWorkerListener(e){this.workerListeners.includes(e)&&this.workerListeners.splice(this.workerListeners.indexOf(e),1);}getOptions(){return {libraryLocation:this.libraryLocation,overrideThreadsSupport:this.overrideThreadsSupport,overrideSimdSupport:this.overrideSimdSupport,verifyResponseHash:this.verifyResponseHash}}onWorkerMessage(e){let r=e.data;if(r.type==="workerTaskId"&&typeof r.id=="number"){let{id:a,error:o,payload:i}=r,t=this.workerTasks.get(a);o==null?t==null||t.resolve(i):t==null||t.reject(r),this.workerTasks.delete(a);}else for(let a of this.workerListeners)a(r);}};
|
|
4
|
-
|
|
5
|
-
export { n as a };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { a as a$5 } from './chunk-YGFWA4WG.js';
|
|
2
|
-
import { c as c$1, a as a$6 } from './chunk-2WN7BGOB.js';
|
|
3
|
-
import { c } from './chunk-B5JOQVFY.js';
|
|
4
|
-
import { a as a$4 } from './chunk-34FEFSCI.js';
|
|
5
|
-
import { d } from './chunk-RQQK6Z5F.js';
|
|
6
|
-
import { a as a$2 } from './chunk-4DCTEQWR.js';
|
|
7
|
-
import { a as a$1 } from './chunk-O7TZTIHO.js';
|
|
8
|
-
import { a } from './chunk-XR65N6EG.js';
|
|
9
|
-
import { a as a$3 } from './chunk-QCZSSQAQ.js';
|
|
10
|
-
import { c as c$2, e } from './chunk-H4TH4342.js';
|
|
11
|
-
|
|
12
|
-
var C=class C{constructor(e,t){this.hintPresenterV2=null;this.MAX_NUMBER_OF_IMAGES_IN_FRAME_DATA_POOL=10;this.redrawInterval=1e3/30;this.redrawRequests=[];this._isDrawLoopRunning=!1;this.frameDataPool=new Map;this.lastFrameCounter=-1;this.poorMansBenchmarkLogs=!1;this.writableDataPathPreload="/scandit_sync_folder_preload";this.writableDataPathStandard="/scandit_sync_folder";this.resourceFilesSubfolder="resources";this.performanceMetricsReporterTimer=void 0;this.performanceMetrics={frameDataPoolSize:0,processedFramesCount:0,redrawRequestsCount:0,actualRedrawsCount:0};this.gestureListener=null;this.webPlatformHintPresenter=null;this.moduleHandler=e,this.workerFunctions=t,this._loadProgressCallback=this._loadProgressCallback.bind(this),c(this.getWasmMetadata());}get Module(){return this.moduleHandler.get()}set isDrawLoopRunning(e){this._isDrawLoopRunning=e,!e&&typeof this.loopTimeoutId=="number"&&(clearTimeout(this.loopTimeoutId),this.loopTimeoutId=void 0);}get isDrawLoopRunning(){return this._isDrawLoopRunning}convertToLoadableFrameData(e){let t=this.getNextFrameId();this.frameDataPool.set(t,new Uint8ClampedArray(e.getFrameData()));let r=this.lastUsedModuleMirrorAxis==null?!1:this.lastUsedModuleMirrorAxis!==this.Module.Axis.None;return {frameId:t,width:e.getWidth(),height:e.getHeight(),isFrameSourceMirrored:r}}createContext(e){var h,g,M,f,b;let t=this.getModeDeserializers(),r=c$1(location);(r==="localhost"||r==="127.0.0.1")&&navigator.userAgent.includes("Electron")&&e.appName!=null&&(r+=`-${e.appName}`),this.parentDomain=e.parentDomain,this.contextDeserializer=new this.Module.DataCaptureContextDeserializer(this.writableDataPath,e.deviceId,e.context.deviceModelName,r,this.parentDomain,t,e.delayedRegistration,e.highEndBlurryRecognition,this.resourcePath);let a=this.contextDeserializer.contextFromJson(JSON.stringify(e.context));if(a==null){let s=this.contextDeserializer.getLastError();throw new Error(`Could not create the context: ${s}`)}let i=a.getView();this.context=a.getContext(),a.delete();let o=this.Module.DataCaptureContextListener.extend("DataCaptureContextListener",{didChangeStatus:(s,p)=>{this.contextDidChangeStatus(JSON.parse(p.toJson()));},didStartObservingContext:()=>{this.didStartObservingContext();}}),u=this.Module.DataCaptureContextFrameListener.extend("DataCaptureContextFrameListener",{onObservationStarted:s=>{},onObservationStopped:s=>{},onFrameProcessingStarted:(s,p)=>{this.workerFunctions.postMessage({type:"onFrameProcessingStarted"});},onFrameProcessingFinished:(s,p)=>{this.workerFunctions.postMessage({type:"onFrameProcessingFinished"});},onFrameSkipped:(s,p)=>{this.workerFunctions.postMessage({type:"onFrameSkipped"});}}),w=this.Module.GestureRecognizer.extend("GestureRecognizer",{setGestureListener:(s,p)=>{var D;(D=this.gestureListener)==null||D.delete(),this.gestureListener=s.clone();}});(h=this.gestureRecognizer)==null||h.delete(),this.gestureRecognizer=new w;let m=new o;this.context.addListener(m),m.delete();let d=new u;this.context.addFrameListener(d),d.delete(),this.setView(i),(g=this.view)==null||g.setGestureRecognizer(this.gestureRecognizer);let c=this.Module.PlatformHintPresenter.extend("PlatformHintPresenter",{setHintPresenter:s=>{},showToast:s=>{this.workerFunctions.postMessage({type:"showToast",payload:JSON.parse(s)});},hideToast:s=>{this.workerFunctions.postMessage({type:"hideToast",payload:JSON.parse(s)});},showGuidance:s=>{this.workerFunctions.postMessage({type:"showGuidance",payload:JSON.parse(s)});},hideGuidance:s=>{this.workerFunctions.postMessage({type:"hideGuidance",payload:JSON.parse(s)});},startUpdateTimer:s=>{this.workerFunctions.postMessage({type:"startUpdateTimer",payload:{duration:{unit:"ms",value:s}}});},stopUpdateTimer:()=>{this.workerFunctions.postMessage({type:"stopUpdateTimer"});}});(M=this.hintPresenterV2)==null||M.delete(),(f=this.webPlatformHintPresenter)==null||f.delete(),this.webPlatformHintPresenter=new c,this.hintPresenterV2=new this.Module.HintPresenterV2(this.webPlatformHintPresenter),(b=this.view)==null||b.setHintPresenterV2(this.hintPresenterV2);}onTap(e){var t;(t=this.gestureListener)==null||t.onTap(JSON.stringify(e));}hintPresenterV2Update(){var e;(e=this.hintPresenterV2)==null||e.update();}startReportingPerformanceMetrics(){this.performanceMetricsReporterTimer==null&&(this.performanceMetricsReporterTimer=setInterval(()=>{this.reportPerformanceMetrics();for(let e of Object.keys(this.performanceMetrics))this.performanceMetrics[e]=0;},1e3));}async reportPerformanceMetrics(){this.workerFunctions.postMessage({type:"performanceMetricsReport",payload:{...this.performanceMetrics}});}deleteFrameData(e){this.frameDataPool.delete(e);}dispose(){var e,t;this.context.dispose(),this.frameDataPool.clear(),this.isDrawLoopRunning=!1,this.lastFrameCounter=-1,(e=this.gestureRecognizer)==null||e.delete(),this.gestureRecognizer=null,(t=this.gestureListener)==null||t.delete(),this.gestureListener=null;}flushAnalytics(){this.context.flushAnalytics();}extractCentaurusLicense(e){return {payload:{centaurus:{licenseKey:this.Module.LicenseUtils[C.get3dPartyLicenseKeyMethodName](e)}}}}getModeDeserializers(){return new this.Module.VectorDataCaptureModeDeserializer}loadLibrary(e){return this.libraryLoadingPromise!=null?this.libraryLoadingPromise:(this.libraryLoadingPromise=this.setup(e),this.libraryLoadingPromise)}processFrame(e){var i;if(this.context==null)return {payload:e,transferables:[e.data.buffer]};let t=e.data,r=e.colorType==="GRAYSCALE"?this.Module.ImageBufferFormat.Grayscale8:this.Module.ImageBufferFormat.Rgba8888,a=this.Module.allocateUint8Array(t.byteLength);return this.Module.HEAPU8.set(t,a),(i=this.imageFrameSource)==null||i.outputFrame(a,e.width,e.height,r),{payload:e,transferables:[e.data.buffer]}}reportCameraProperties(e){this.context.setCameraProperties(e.deviceId,e.isFrontFacing,e.hasAutofocus);}requestFrameData(e){let t=this.frameDataPool.get(e);return t==null?{payload:{data:null}}:{payload:{data:t},transferables:[t.buffer]}}scheduleRedraw(e,t){this.addRedrawRequest(t),this.isDrawLoopRunning||this.startDrawLoop(e);}sendViewRefreshCommands(e){this.workerFunctions.postMessage({type:"draw",payload:e},[e.buffer]);}setFrameSource(e,t){var r;this.lastUsedModuleMirrorAxis=this.mapMirrorAxisOnModule(e),(r=this.imageFrameSource)==null||r.delete(),this.imageFrameSource=new this.Module.ImageBufferFrameSource(this.lastUsedModuleMirrorAxis,t,0),this.context.setFrameSource(this.imageFrameSource);}startDrawLoop(e){this.isDrawLoopRunning=!0;let t=i=>this.redrawRequests.length>0&&this.redrawRequests[0]<=i,r=i=>{for(;this.redrawRequests.length>0&&this.redrawRequests[0]<=i;)this.redrawRequests.shift();},a=()=>{this.loopTimeoutId=setTimeout(()=>{if(!this.isDrawLoopRunning)return;let i=performance.now();if(t(i)){r(i),e.draw();let o=e.getDrawCommands();this.sendViewRefreshCommands(new Uint8Array(o));}a();},this.redrawInterval);};a();}updateContext(e){if(this.context!=null&&this.contextDeserializer!=null){e.view!=null&&!e.view.visible&&this.context.flushAnalytics();let t=this.contextDeserializer.updateContextFromJson(this.context,this.view,JSON.stringify(e.context));if(t==null){let a=this.contextDeserializer.getLastError();throw new Error(`Could not update the context: ${a}`)}this.context.delete(),this.context=t.getContext();let r=t.getView();t.delete(),r!=null&&e.view!=null&&r.setViewSize(e.view.width,e.view.height,e.view.orientation),this.hintPresenterV2!=null&&(r==null||r.setHintPresenterV2(this.hintPresenterV2)),this.gestureRecognizer!=null&&(r==null||r.setGestureRecognizer(this.gestureRecognizer)),this.setView(r),a.log(a.Level.Debug,"context updated",e);}}onDocumentVisibilityChange(e){e==="hidden"&&this.context.flushAnalytics();}isFeatureSupported(e){return {payload:{supported:this.context.isFeatureSupported(e)}}}getViewfinderInfo(){var e,t;return {payload:{isDisplayingViewfinder:(t=(e=this.view)==null?void 0:e.isDisplayingViewfinder())!=null?t:!1,rect:JSON.parse(this.view.getViewfinderRect())}}}getOpenSourceSoftwareLicenseInfo(){return {payload:{licenseText:this.Module.OpenSourceSoftwareLicenseInfo.getLicenseText()}}}getNextFrameId(){return this.lastFrameCounter++,this.lastFrameCounter>=this.MAX_NUMBER_OF_IMAGES_IN_FRAME_DATA_POOL&&(this.lastFrameCounter=0),this.lastFrameCounter}getWasmDynamicLibraries(e){return this.getWasmSideModuleFileName()==null?[]:[`${e.replace(/\/[^/]*$/,"/")}${this.getWasmSideModuleFileName()}`]}getWasmCoreExpectedHash(e,t){return t?e?globalThis.SDC_WASM_CORE_MT_SIMD_HASH:globalThis.SDC_WASM_CORE_MT_HASH:e?globalThis.SDC_WASM_CORE_SIMD_HASH:""}getWasmCoreFileName(e,t){return t?e?globalThis.SDC_WASM_CORE_MT_SIMD_FILE_NAME:globalThis.SDC_WASM_CORE_MT_FILE_NAME:e?globalThis.SDC_WASM_CORE_SIMD_FILE_NAME:""}getWasmMetadata(){return globalThis.WASM_METADATA}getWasmSideModuleFileName(){return ""}_loadProgressCallback(e){this.workerFunctions.postMessage({type:"loadLibraryProgress",payload:e});}addRedrawRequest(e){this.redrawRequests.push(Math.round(performance.now())+e),this.redrawRequests.sort((t,r)=>t-r);}contextDidChangeStatus(e){e.code===260?e.message=e.message.replace("domain name",`domain name (${c$1(location)})`):e.code===265&&(e.message=e.message.replace("domain name",`domain name (${this.parentDomain})`)),this.workerFunctions.postMessage({type:"contextDidChangeStatus",payload:e});}didStartObservingContext(){this.workerFunctions.postMessage({type:"didStartObservingContext"});}mapMirrorAxisOnModule(e){switch(e){case"None":return this.Module.Axis.None;case"X":return this.Module.Axis.X;case"Y":return this.Module.Axis.Y;default:return this.Module.Axis.None}}setView(e){this.view=e,this.setViewRefreshHandler(e),e==null&&(this.isDrawLoopRunning=!1,this.sendViewRefreshCommands(new Uint8Array([])));}setViewRefreshHandler(e){if(e==null||e.isViewRefreshHandlerSet)return;let t=this.Module.NeedsRedrawDelegate.extend("NeedsRedrawDelegate",{setNeedsRedrawIn:this.scheduleRedraw.bind(this,e)}),r=new t;e.setNeedsRedrawDelegate(r),e.isViewRefreshHandlerSet=!0;}setupDataDecoding(){let e=this.moduleHandler.get(),t=e.DataDecoding.extend("DataDecoding",{decode(r,a){try{let i=JSON.parse(a),o=[];for(let u of i){let w=new TextDecoder(u.ianaName,{fatal:!0});o.push(w.decode(r.slice(u.startIndex,u.endIndex)));}return o.join("")}catch(i){return ""}}});e.setDataDecoding(new t);}start(e,t,r){e&&t&&(this.setupDataDecoding(),this.moduleHandler.get().callMain(),typeof this.moduleHandler.get().PThread=="object"||r());}getWritableDataPath(e,t){return e?this.writableDataPathPreload:t!=null?(a.log(a.Level.Debug,`IndexedDB database name override in use to recover from blocked standard database: ${t}`),t):this.writableDataPathStandard}numOfMBToPages(e){return Math.ceil(1024*e*1024/64/1024)}async setup({libraryLocation:e$1,locationPath:t,preloadEngine:r,writableDataPathOverride:a$7,overrideThreadsSupport:i,overrideSimdSupport:o,verifyResponseHash:u,referredOrigin:w,fixedWasmMemory:m}){var x;let d$1=!1,c=!1;this.writableDataPath=this.getWritableDataPath(r,a$7),this.resourcePath=`${e$1}${this.resourceFilesSubfolder}/`,globalThis.path=t;let{resolve:h,reject:g,promise:M}=new a$1,f=a$2.sdkVersion();if(f==="")throw new a$3({name:"Invalid library version",message:"Library version is not defined or empty, cannot generate proper path to library files."});let[b,s]=await Promise.all([c$2(),e()]);i!=="auto"&&(s=i==="on"),o!=="auto"&&(b=o==="on");let p=this.getWasmCoreFileName(b,s),D=d(f,e$1,p),{jsURI:R,wasmURI:S}=D,N={instantiateWasm:(l,H)=>(a$6({importObject:l,wasmURI:S,expectedHash:this.getWasmCoreExpectedHash(b,s),verifyResponseHash:u,successCallback:H,progressCallback:this._loadProgressCallback,referredOrigin:w}),{})},y=m===null?null:new WebAssembly.Memory({initial:this.numOfMBToPages(m),maximum:this.numOfMBToPages(m),shared:s});return y!==null&&a.log(a.Level.Debug,"Fixed wasmMemory set",y),this.moduleHandler.set({...y?{wasmMemory:y}:{},mainScriptUrlOrBlob:R,canvas:(x=this.workerFunctions.getOffscreenCanvas())!=null?x:{getContext:()=>null},...N,dynamicLibraries:this.getWasmDynamicLibraries(S),locateFile:l=>e$1+l,noInitialRun:!0,preRun:[async()=>{try{await a$4({writableDataPathPreload:this.writableDataPathPreload,writableDataPath:this.writableDataPath,preloading:r});}catch(l){if(l.name==="BlockedIndexedDB"){g(l.toString());return}a.log(a.Level.Debug,"No IndexedDB support, some data will not be persisted:",l);}c=!0,this.start(c,d$1,h);}],onMainComplete:()=>{if([d$1,c].includes(!1)){a.log(a.Level.Warn,{runtimeLoaded:d$1,fileSystemSynced:c},"Both runtimeLoaded and fileSystemSynced should be true when calling onMainComplete"),g("onMainComplete has been called but runtime or file system was not ready.");return}h();},onRuntimeInitialized:()=>{d$1=!0,this.start(c,d$1,h);},print:l=>{a.log(a.Level.Info,l);}}),await a$5(R,f)||g(`Couldn't retrieve Scandit Data Capture library at ${R}, did you configure the path for it correctly?`),M}};C.get3dPartyLicenseKeyMethodName=atob("Z2V0QmxpbmtJZExpY2Vuc2VLZXk=");var W=C;
|
|
13
|
-
|
|
14
|
-
export { W as a };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { a } from './chunk-BOKAHIDO.js';
|
|
2
|
-
import { a as a$4 } from './chunk-AIRWHLJH.js';
|
|
3
|
-
import { a as a$3 } from './chunk-FGO2SSRS.js';
|
|
4
|
-
import { a as a$1 } from './chunk-QCRFVRSS.js';
|
|
5
|
-
import { b } from './chunk-FTD535WI.js';
|
|
6
|
-
import { a as a$2 } from './chunk-XR65N6EG.js';
|
|
7
|
-
|
|
8
|
-
var h=class{constructor(a$2,e){this.onMessageListener=this.onMessage.bind(this);this.workerSelf=a$2,this.dataCaptureInstance=new a(e,{postMessage:this.postMessage.bind(this),getOffscreenCanvas:this.getOffscreenCanvas.bind(this)}),a$1(a$2)&&this.listenToMessages();}listenToMessages(){this.workerSelf.addEventListener("message",this.onMessageListener),this.workerSelf.addEventListener("error",a=>{a$2.log(a$2.Level.Error,a);}),this.workerSelf.addEventListener("messageerror",a=>{a$2.log(a$2.Level.Error,a);});}postMessage(a,e){this.workerSelf.postMessage(a,e!=null?e:[]);}getOffscreenCanvas(){if(typeof this.workerSelf.OffscreenCanvas=="function")return new this.workerSelf.OffscreenCanvas(32,32)}hasPayload(a){return a$3(a)&&"payload"in a}hasTransferables(a){return a$3(a)&&Array.isArray(a.transferables)}async respondWith(a,e,u){let r=null,t;try{t=u(),t instanceof Promise&&(t=await t);}catch(l){t=void 0,r=a$4(l);}let i={type:"workerTaskId",command:a,id:e,payload:this.hasPayload(t)?t.payload:void 0};r!=null&&(i.error=r),this.postMessage(i,this.hasTransferables(t)?t.transferables:[]);}onMessage(a){switch(a.data.command){case"loadLibrary":{{let{data:e}=a;this.respondWith(e.command,e.id,async()=>this.dataCaptureInstance.loadLibrary({libraryLocation:e.libraryLocation,locationPath:e.locationPath,referredOrigin:e.referredOrigin,preloadEngine:e.preloadEngine,writableDataPathOverride:e.writableDataPathOverride,overrideThreadsSupport:e.overrideThreadsSupport,overrideSimdSupport:e.overrideSimdSupport,verifyResponseHash:e.verifyResponseHash,fixedWasmMemory:e.fixedWasmMemory}));}break}case"onTap":{{let{data:e}=a;this.respondWith(e.command,e.id,async()=>{this.dataCaptureInstance.onTap(e.point);});}break}case"hintPresenterV2update":{{let{data:e}=a;this.respondWith(e.command,e.id,async()=>{this.dataCaptureInstance.hintPresenterV2Update();});}break}case"createContext":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.createContext({context:e.context,deviceId:e.deviceId,delayedRegistration:e.delayedRegistration,highEndBlurryRecognition:e.highEndBlurryRecognition,appName:e.appName,parentDomain:e.parentDomain}));}break}case"setFrameSource":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.setFrameSource(e.mirrorAxis,e.isCameraFrameSource));}break}case"processFrame":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.processFrame({data:e.data,width:e.width,height:e.height,colorType:e.colorType}));}break}case"requestFrameData":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.requestFrameData(e.frameId));}break}case"deleteFrameData":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>{this.dataCaptureInstance.deleteFrameData(e.frameId);});}break}case"updateContext":{{let{data:e}=a;this.respondWith(e.command,e.id,async()=>this.dataCaptureInstance.updateContext(e));}break}case"dispose":{this.respondWith(a.data.command,a.data.id,()=>this.dataCaptureInstance.dispose());break}case"flushAnalytics":{this.respondWith(a.data.command,a.data.id,()=>{this.dataCaptureInstance.flushAnalytics();});break}case"reportCameraProperties":{{let{data:e}=a;this.respondWith(e.command,e.id,async()=>this.dataCaptureInstance.reportCameraProperties(e));}break}case"setLogLevel":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>{a$2.setLevel(e.level);});}break}case"extractCentaurusLicense":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.extractCentaurusLicense(e.licenseKey));}break}case"documentVisibility":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>{this.dataCaptureInstance.onDocumentVisibilityChange(e.state);});}break}case"isFeatureSupported":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.isFeatureSupported(e.feature));}break}case"getViewfinderInfo":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.getViewfinderInfo());}break}case"getOpenSourceSoftwareLicenseInfo":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.getOpenSourceSoftwareLicenseInfo());}break}default:return b(a.data),!1}return !0}};
|
|
9
|
-
|
|
10
|
-
export { h as a };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { a } from './chunk-MU4VAJIM.js';
|
|
2
|
-
import { d } from './chunk-UPUPKPEP.js';
|
|
3
|
-
|
|
4
|
-
var n=class e{constructor(t,o=d.Feedback.defaultVibrationPattern){this.type=t,this.pattern=o;let r=a.getSupportedVibrationMethod();r&&(this._vibrate=r.bind(navigator));}static get defaultVibration(){return new e("default")}static withPattern(t){return new e("default",t)}toJSONObject(){return {type:this.type}}vibrate(){var t;return (t=this._vibrate)==null?void 0:t.call(this,this.pattern)}};
|
|
5
|
-
|
|
6
|
-
export { n as a };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { d } from './chunk-UPUPKPEP.js';
|
|
2
|
-
|
|
3
|
-
var l=class i{constructor(e){this.iconElement=d.SingleImageUploader.Settings.iconElement;this.informationElement=d.SingleImageUploader.Settings.informationElement;this.buttonElement=d.SingleImageUploader.Settings.buttonElement;this.containerStyle=d.SingleImageUploader.Settings.containerStyle;this.iconStyle=d.SingleImageUploader.Settings.iconStyle;this.informationStyle=d.SingleImageUploader.Settings.informationStyle;this.buttonStyle=d.SingleImageUploader.Settings.buttonStyle;this.onlyCameraCapture=d.SingleImageUploader.Settings.onlyCameraCapture;e!=null&&(this.iconElement=e.iconElement,this.informationElement=e.informationElement,this.buttonElement=e.buttonElement,this.containerStyle=e.containerStyle,this.iconStyle=e.iconStyle,this.informationStyle=e.informationStyle,this.buttonStyle=e.buttonStyle,this.onlyCameraCapture=e.onlyCameraCapture);}static fromJSON(e){let t=new i(null);return t.iconElement=document.createRange().createContextualFragment(e.iconElement).firstElementChild,t.informationElement=document.createRange().createContextualFragment(e.informationElement).firstElementChild,t.buttonElement=document.createRange().createContextualFragment(e.buttonElement).firstElementChild,t.containerStyle=e.containerStyle,t.iconStyle=e.iconStyle,t.informationStyle=e.informationStyle,t.buttonStyle=e.buttonStyle,t.onlyCameraCapture=e.onlyCameraCapture,t}toJSONObject(){return {iconElement:this.iconElement.outerHTML,informationElement:this.informationElement.outerHTML,buttonElement:this.buttonElement.outerHTML,containerStyle:{...this.containerStyle},iconStyle:{...this.iconStyle},informationStyle:{...this.informationStyle},buttonStyle:{...this.buttonStyle},onlyCameraCapture:this.onlyCameraCapture}}};
|
|
4
|
-
|
|
5
|
-
export { l as a };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { l } from './chunk-N4NOODAT.js';
|
|
2
|
-
|
|
3
|
-
var s={type:"none"},o=class{constructor(t){this.type="radius";this._radius=t;}get radius(){return this._radius}toJSONObject(){return {type:this.type,radius:this.radius.toJSONObject()}}},a=class n{constructor(){this.type="rectangular";}get sizeWithUnitAndAspect(){return this._sizeWithUnitAndAspect}static withSize(t){let i=new n;return i._sizeWithUnitAndAspect=l.sizeWithWidthAndHeight(t),i}static withWidthAndAspectRatio(t,i){let e=new n;return e._sizeWithUnitAndAspect=l.sizeWithWidthAndAspectRatio(t,i),e}static withHeightAndAspectRatio(t,i){let e=new n;return e._sizeWithUnitAndAspect=l.sizeWithHeightAndAspectRatio(t,i),e}toJSONObject(){return {type:this.type,size:this.sizeWithUnitAndAspect.toJSONObject()}}};
|
|
4
|
-
|
|
5
|
-
export { s as a, o as b, a as c };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { d } from './chunk-UPUPKPEP.js';
|
|
2
|
-
import { n } from './chunk-N4NOODAT.js';
|
|
3
|
-
|
|
4
|
-
var e=class i{constructor(o=d.Brush.fillColor,r=d.Brush.strokeColor,s=d.Brush.strokeWidth){this.fill={color:o},this.stroke={color:r,width:s};}static get transparent(){let o=n.fromRGBA(255,255,255,0);return new i(o,o,0)}get fillColor(){return this.fill.color}get strokeColor(){return this.stroke.color}get strokeWidth(){return this.stroke.width}static areEquals(o,r){return o==null||r==null?!1:n.areEquals(o.fill.color,r.fill.color)&&n.areEquals(o.stroke.color,r.stroke.color)&&o.stroke.width===r.stroke.width}toJSONObject(){return {fill:{color:this.fillColor.toJSON()},stroke:{width:this.strokeWidth,color:this.strokeColor.toJSON()}}}};
|
|
5
|
-
|
|
6
|
-
export { e as a };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { a as a$1 } from './chunk-5TKCHVG2.js';
|
|
2
|
-
import { d } from './chunk-SKRKDAFC.js';
|
|
3
|
-
import { a } from './chunk-XR65N6EG.js';
|
|
4
|
-
import { a as a$2 } from './chunk-MU4VAJIM.js';
|
|
5
|
-
import { g as g$1 } from './chunk-W7LJM2QO.js';
|
|
6
|
-
import { d as d$1 } from './chunk-UPUPKPEP.js';
|
|
7
|
-
|
|
8
|
-
var g=class n{constructor(e){this.deviceId="";this.type="camera";this._currentState="off";this._settings=new g$1;this._desiredTorchState="off";this._desiredState="off";this.listeners=[];this._context=null;this.stateTransitionStrategyMap={off:{on:this.transitionFromStateOffToOn.bind(this),standby:this.transitionFromStateOffToStandby.bind(this)},on:{off:this.transitionFromStateOnToOff.bind(this),standby:this.transitionFromStateOnToStandby.bind(this)},standby:{off:this.transitionFromStateStandbyToOff.bind(this),on:this.transitionFromStateStandbyToOn.bind(this)}};this.cameraManager=e!=null?e:d.instance(),this.updateCanvasVideoImage=this.updateCanvasVideoImage.bind(this),this.captureAndSend=this.captureAndSend.bind(this);}static get default(){let e=new n;return e.position="worldFacing",e}get desiredState(){return this._desiredState}get settings(){return this._settings}get currentResolution(){var e;return (e=this._currentResolution)!=null?e:null}get context(){return this._context}set context(e){this._context=e,this._context&&this.currentState==="on"&&this.startSendingCapturesToWorker();}get currentState(){return this._currentState}static atPosition(e){if(d$1.Camera.availablePositions.includes(e)){let t=new n;return t.position=e,t}return a.log(a.Level.Warn,`invalid CameraPosition: "${e}"`),null}static fromDeviceCamera(e){let t=n.atPosition(e.position);return t.deviceId=e.deviceId,t.label=e.label,t}async switchToDesiredState(e){var t,i;return this.currentTransitionStrategyPromise&&await this.currentTransitionStrategyPromise,this.currentTransitionStrategyPromise=(i=(t=this.stateTransitionStrategyMap[this.currentState])==null?void 0:t[e])==null?void 0:i.call(t).catch(r=>{if(r instanceof DOMException&&r.message==="The associated Track is in an invalid state"){a.log(a.Level.Warn,r);return}throw r}),this.currentTransitionStrategyPromise}getDesiredTorchState(){return this._desiredTorchState}async setDesiredTorchState(e){this._desiredTorchState=e,await this.cameraManager.setTorchEnabled(this._desiredTorchState==="on"),await this.notifyContext({type:"torchState",newValue:this._desiredTorchState});}async isTorchAvailable(){return this.cameraManager.isTorchAvailable()}addListener(e){e!=null&&(this.listeners.includes(e)||this.listeners.push(e));}removeListener(e){e!=null&&this.listeners.includes(e)&&this.listeners.splice(this.listeners.indexOf(e),1);}async applySettings(e){var i;this._settings=new g$1(e);let t=this.settings.getProperty("grayScaleFrameReader");if(this.cameraManager.setFrameReaderType(t===!0?"GRAYSCALE":"RGBA"),this.currentState==="on"||this.currentState==="standby"){let r=this.cameraManager.activeCameraSettings;(r==null?void 0:r.preferredResolution)!==this.settings.preferredResolution&&(await this.cameraManager.applyCameraSettings(this.settings),(i=this.cameraManager.activeCamera)!=null&&i.currentResolution&&(this._currentResolution={width:this.cameraManager.activeCamera.currentResolution.width,height:this.cameraManager.activeCamera.currentResolution.height})),await this.cameraManager.setZoom(this.settings.zoomFactor);let o=this.settings.getProperty("minFrameRate"),c=this.settings.getProperty("maxFrameRate");(o!=null||c!=null)&&await this.cameraManager.setFrameRate({min:o,max:c});let m=this.settings.getProperty("manualLensPosition");m!=null&&await this.cameraManager.setFocus(m);let u=this.settings.getProperty("exposureTargetBias"),d=this.settings.getProperty("exposureDuration");(u!=null||d!=null)&&await this.cameraManager.setExposure({compensation:u,time:d});}return this.notifyContext({type:"cameraSettings",newValue:this.settings})}toJSONObject(){return {type:this.type,position:this.position,settings:this.settings.toJSONObject(),desiredState:this.desiredState,desiredTorchState:this._desiredTorchState}}getMirrorImageEnabled(){var e;return (e=this._desiredMirrorImageEnabled)!=null?e:this.cameraManager.isMirrorImageEnabled()}async setMirrorImageEnabled(e){this._desiredMirrorImageEnabled=e,this.cameraManager.setMirrorImageEnabled(e,!0),this.context&&await this.context.setFrameSource(this);}getCurrentState(){return this._currentState}async setCurrentState(e){if(e!==this._currentState){this._currentState=e,this.notifyListeners();try{await this.notifyContext({type:"frameSourceState",newValue:e}),e==="on"&&this.startSendingCapturesToWorker();}catch(t){a.log(a.Level.Warn,"Error while notifying context about new state of Camera");}}}async setupCamera(){if(this.cameraManager.setSelectedCameraSettings(this.settings),this.deviceId==="")this.cameraManager.setSelectedCamera(),this.cameraManager.setInitialCameraPosition(this.position);else {let t=(await a$1.getCameras()).find(i=>i.deviceId===this.deviceId);t&&(this.cameraManager.setInitialCameraPosition(t.position),this.cameraManager.setSelectedCamera(t));}await this.cameraManager.setupCameras(),typeof this._desiredMirrorImageEnabled=="boolean"?this.cameraManager.setMirrorImageEnabled(this._desiredMirrorImageEnabled,!0):this.cameraManager.setMirrorImageEnabled(this.cameraManager.isMirrorImageEnabled(),!1),this.context&&await this.context.setFrameSource(this),this.cameraManager.activeCamera&&(this.label=this.cameraManager.activeCamera.label,this.position=this.cameraManager.activeCamera.position,this.deviceId=this.cameraManager.activeCamera.deviceId,this._currentResolution=this.cameraManager.activeCamera.currentResolution);}async notifyContext(e){if(this.context)return this.context.update([e])}notifyListeners(){for(let e of this.listeners)e.didChangeState&&e.didChangeState(this,this.currentState);}updateCanvasVideoImage(){this.currentState==="on"&&this.context&&(this.cameraManager.updateCanvasVideoImage(),this._lastCanvasVideoPreviewAnimationFrame=this.cameraManager.requestVideoFrame(this.updateCanvasVideoImage));}async captureAndSend(){if(this.currentState!=="on"||!this.context)return;if(!this.context.hasEnabledMode()){this._lastCaptureRequestAnimationFrame=this.cameraManager.requestVideoFrame(this.captureAndSend);return}let e=null;try{e=this.cameraManager.captureImage();}catch(t){a.log(a.Level.Warn,t.message);}finally{if(e!=null)if(this.cameraManager.synchronousFrameHandling){let t=await this.context.sendFrameToProcessor(e);this.cameraManager.recycle(t.data);}else this.context.sendFrameToProcessor(e).then(t=>(this.cameraManager.recycle(t.data),null)).catch(t=>{a.warn("error while recycling uint8array",t);});this._lastCaptureRequestAnimationFrame=this.cameraManager.requestVideoFrame(this.captureAndSend);}}startSendingCapturesToWorker(){this.stopSendingCapturesToWorker(),this.captureAndSend();}stopSendingCapturesToWorker(){this._lastCanvasVideoPreviewAnimationFrame!=null&&this.cameraManager.cancelVideoFrame(this._lastCanvasVideoPreviewAnimationFrame),this._lastCaptureRequestAnimationFrame!=null&&this.cameraManager.cancelVideoFrame(this._lastCaptureRequestAnimationFrame);}async transitionFromStateOffToOn(){if(!(this.currentState==="on"||this.currentState==="starting"||this.currentState==="wakingUp")){this._desiredState="on",await this.setCurrentState("starting");try{await this.setupCamera(),await this.setCurrentState("on");}catch(e){throw a.log(a.Level.Error,e),await this.setCurrentState("off"),e}}}async transitionFromStateOffToStandby(){if(!(this.currentState==="standby"||this.currentState==="bootingUp"||this.currentState==="goingToSleep")){if(await this.isAndroidWebView()){a.log(a.Level.Warn,'Warning: "Standby" state does not work inside web views. Falling back to state "On".'),await this.transitionFromStateOffToOn();return}this._desiredState="standby",await this.setCurrentState("bootingUp");try{await this.setupCamera(),this.cameraManager.pauseStream(),await this.setCurrentState("standby");}catch(e){throw a.log(a.Level.Error,e),await this.setCurrentState("off"),e}await this.setCurrentState("standby"),await this.setDesiredTorchState("off");}}async transitionFromStateOnToOff(){this.currentState==="off"||this.currentState==="stopping"||(this._desiredState="off",await this.setCurrentState("stopping"),await this.cameraManager.stopStream(),await this.setCurrentState("off"),await this.setDesiredTorchState("off"));}async transitionFromStateOnToStandby(){if(!(this.currentState==="standby"||this.currentState==="bootingUp"||this.currentState==="goingToSleep")){if(await this.isAndroidWebView()){a.log(a.Level.Warn,'Warning: "Standby" state does not work inside web views. Falling back to state "Off".'),await this.transitionFromStateOnToOff();return}this._desiredState="standby",await this.setCurrentState("goingToSleep"),this.cameraManager.pauseStream(),await this.setCurrentState("standby"),await this.setDesiredTorchState("off");}}async transitionFromStateStandbyToOff(){this.currentState==="off"||this.currentState==="stopping"||(this._desiredState="off",await this.setCurrentState("shuttingDown"),await this.cameraManager.stopStream(),await this.setCurrentState("off"),await this.setDesiredTorchState("off"));}async transitionFromStateStandbyToOn(){this.currentState==="on"||this.currentState==="starting"||this.currentState==="wakingUp"||(this._desiredState="on",await this.setCurrentState("wakingUp"),this.cameraManager.resumeStream(),await this.setCurrentState("on"));}async isAndroidWebView(){return this._isAndroidWebView==null&&(this._isAndroidWebView=await a$2.isAndroidWebView()),this._isAndroidWebView}isZoomAvailable(){var e;return ((e=this.cameraManager.mediaTrackCapabilities)==null?void 0:e.zoom)!=null}};
|
|
9
|
-
|
|
10
|
-
export { g as a };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { n as n$1 } from './chunk-N4NOODAT.js';
|
|
2
|
-
|
|
3
|
-
var e=n$1.fromRGBA(46,193,206,1),n=n$1.fromRGBA(98,209,218,1),t=n$1.fromRGBA(151,224,230,1),c=n$1.fromRGBA(203,240,243,1),a=n$1.fromRGBA(18,22,25,1),m=n$1.fromRGBA(218,225,231,1),p=n$1.fromRGBA(40,211,128,1),G=n$1.fromRGBA(83,220,153,1),R=n$1.fromRGBA(126,229,179,1),f=n$1.fromRGBA(169,237,204,1),s=n$1.fromRGBA(212,246,230,1),x=n$1.fromRGBA(251,192,44,1),y=n$1.fromRGBA(252,205,86,1),A=n$1.fromRGBA(253,217,128,1),B=n$1.fromRGBA(254,230,171,1),d=n$1.fromRGBA(254,242,213,1),S=n$1.fromRGBA(250,68,70,1),g=n$1.fromRGBA(251,105,107,1),i=n$1.fromRGBA(252,143,144,1),l=n$1.fromRGBA(253,180,181,1),O=n$1.fromRGBA(254,218,218,1);
|
|
4
|
-
|
|
5
|
-
export { e as a, n as b, t as c, c as d, a as e, m as f, p as g, G as h, R as i, f as j, s as k, x as l, y as m, A as n, B as o, d as p, S as q, g as r, i as s, l as t, O as u };
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
var a=class e{constructor(t,i){this._x=t,this._y=i;}get x(){return this._x}get y(){return this._y}static mirrorX(t,i){let r=t.x-i.width;return r*=-1,new e(r,t.y)}static fromJSON(t){return new e(t.x,t.y)}toJSONObject(){return {x:this.x,y:this.y}}},b=class e{constructor(t,i,r,o){this._topLeft=t,this._topRight=i,this._bottomRight=r,this._bottomLeft=o;}get topLeft(){return this._topLeft}get topRight(){return this._topRight}get bottomRight(){return this._bottomRight}get bottomLeft(){return this._bottomLeft}static fromJSON(t){return new e(a.fromJSON(t.topLeft),a.fromJSON(t.topRight),a.fromJSON(t.bottomRight),a.fromJSON(t.bottomLeft))}toJSONObject(){return {topLeft:this.topLeft.toJSONObject(),topRight:this.topRight.toJSONObject(),bottomLeft:this.bottomLeft.toJSONObject(),bottomRight:this.bottomRight.toJSONObject()}}},W=(i=>(i.Pixel="pixel",i.Fraction="fraction",i))(W||{}),n=class e{constructor(t,i){this._value=t,this._unit=i;}get value(){return this._value}get unit(){return this._unit}static fromJSON(t){return new e(t.value,t.unit)}toJSONObject(){return {unit:this.unit,value:this.value}}},S=class e{constructor(t,i){this._x=t,this._y=i;}static get zero(){return new e(new n(0,"pixel"),new n(0,"pixel"))}get x(){return this._x}get y(){return this._y}static fromJSON(t){return new e(n.fromJSON(t.x),n.fromJSON(t.y))}toJSONObject(){return {x:this.x.toJSONObject(),y:this.y.toJSONObject()}}},g=class{constructor(t,i){this._origin=t,this._size=i;}get origin(){return this._origin}get size(){return this._size}toJSONObject(){return {origin:this.origin.toJSONObject(),size:this.size.toJSONObject()}}},N=class{constructor(t,i){this._origin=t,this._size=i;}get origin(){return this._origin}get size(){return this._size}toJSONObject(){return {origin:this._origin.toJSONObject(),size:this._size.toJSONObject()}}},l=class e{constructor(t,i){this._width=t,this._height=i;}get width(){return this._width}get height(){return this._height}static fromJSON(t){return new e(n.fromJSON(t.width),n.fromJSON(t.height))}isSameAs(t){return JSON.stringify(this.toJSONObject())===JSON.stringify(t.toJSONObject())}toJSONObject(){return {width:this.width.toJSONObject(),height:this.height.toJSONObject()}}},d=class e{constructor(t,i){this._width=t,this._height=i;}get width(){return this._width}get height(){return this._height}static fromJSON(t){return new e(t.width,t.height)}toJSONObject(){return {height:this.height,width:this.width}}},p=class{constructor(t,i){this._size=t,this._aspect=i;}get size(){return this._size}get aspect(){return this._aspect}},f=(o=>(o.WidthAndHeight="widthAndHeight",o.WidthAndAspectRatio="widthAndAspectRatio",o.HeightAndAspectRatio="heightAndAspectRatio",o.ShorterDimensionAndAspectRatio="shorterDimensionAndAspectRatio",o))(f||{}),O=class e{constructor(){this._shorterDimensionAndAspectRatio=null;}get widthAndHeight(){return this._widthAndHeight}get widthAndAspectRatio(){return this._widthAndAspectRatio}get heightAndAspectRatio(){return this._heightAndAspectRatio}get shorterDimensionAndAspectRatio(){return this._shorterDimensionAndAspectRatio}get sizingMode(){return this.widthAndAspectRatio?"widthAndAspectRatio":this.heightAndAspectRatio?"heightAndAspectRatio":this.shorterDimensionAndAspectRatio?"shorterDimensionAndAspectRatio":"widthAndHeight"}static sizeWithWidthAndHeight(t){let i=new e;return i._widthAndHeight=t,i}static sizeWithWidthAndAspectRatio(t,i){let r=new e;return r._widthAndAspectRatio=new p(t,i),r}static sizeWithHeightAndAspectRatio(t,i){let r=new e;return r._heightAndAspectRatio=new p(t,i),r}static sizeWithShorterDimensionAndAspectRatio(t,i){let r=new e;return r._shorterDimensionAndAspectRatio=new p(t,i),r}static fromJSON(t){if(t.width&&t.height)return this.sizeWithWidthAndHeight(new l(n.fromJSON(t.width),n.fromJSON(t.height)));if(t.width&&typeof t.aspect=="number")return this.sizeWithWidthAndAspectRatio(n.fromJSON(t.width),t.aspect);if(t.height&&typeof t.aspect=="number")return this.sizeWithHeightAndAspectRatio(n.fromJSON(t.height),t.aspect);if(t.shorterDimension&&typeof t.aspect=="number")return this.sizeWithShorterDimensionAndAspectRatio(n.fromJSON(t.shorterDimension),t.aspect);throw new Error(`SizeWithUnitAndAspectJSON is malformed: ${JSON.stringify(t)}`)}toJSONObject(){var t,i,r,o,s,c,h,m;switch(this.sizingMode){case"widthAndAspectRatio":return {width:(t=this.widthAndAspectRatio)==null?void 0:t.size.toJSONObject(),aspect:(i=this.widthAndAspectRatio)==null?void 0:i.aspect};case"heightAndAspectRatio":return {height:(r=this.heightAndAspectRatio)==null?void 0:r.size.toJSONObject(),aspect:(o=this.heightAndAspectRatio)==null?void 0:o.aspect};case"shorterDimensionAndAspectRatio":return {shorterDimension:(s=this.shorterDimensionAndAspectRatio)==null?void 0:s.size.toJSONObject(),aspect:(c=this.shorterDimensionAndAspectRatio)==null?void 0:c.aspect};default:return {width:(h=this.widthAndHeight)==null?void 0:h.width.toJSONObject(),height:(m=this.widthAndHeight)==null?void 0:m.height.toJSONObject()}}}},J=class e{constructor(t,i,r,o){this._left=t,this._top=i,this._right=r,this._bottom=o;}static get zero(){return new e(new n(0,"pixel"),new n(0,"pixel"),new n(0,"pixel"),new n(0,"pixel"))}get left(){return this._left}get right(){return this._right}get top(){return this._top}get bottom(){return this._bottom}static fromJSON(t){return new e(n.fromJSON(t.left),n.fromJSON(t.top),n.fromJSON(t.right),n.fromJSON(t.bottom))}toJSONObject(){return {left:this.left.toJSONObject(),right:this.right.toJSONObject(),top:this.top.toJSONObject(),bottom:this.bottom.toJSONObject()}}},A=class e{constructor(t){this.hexadecimalString=t;}get redComponent(){return this.hexadecimalString.slice(0,2)}get greenComponent(){return this.hexadecimalString.slice(2,4)}get blueComponent(){return this.hexadecimalString.slice(4,6)}get alphaComponent(){return this.hexadecimalString.slice(6,8)}get red(){return e.hexToNumber(this.redComponent)}get green(){return e.hexToNumber(this.greenComponent)}get blue(){return e.hexToNumber(this.blueComponent)}get alpha(){return e.hexToNumber(this.alphaComponent)}static fromHex(t){return new e(e.normalizeHex(t))}static fromRGBA(t,i,r,o=1){let s=[t,i,r,this.normalizeAlpha(o)].reduce((c,h)=>c+this.numberToHex(h),"");return new e(s)}static areEquals(t,i){return t==null||i==null?!1:t.hexadecimalString===i.hexadecimalString}static hexToNumber(t){return Number.parseInt(t,16)}static fromJSON(t){return e.fromHex(t)}static numberToHex(t){let r=Math.round(t).toString(16);return r.length===1&&(r=`0${r}`),r.toUpperCase()}static normalizeHex(t){let i=t;return i.startsWith("#")&&(i=i.slice(1)),i.length<6&&(i=[...i].map(r=>r+r).join("")),i.length===6&&(i+="FF"),i.toUpperCase()}static normalizeAlpha(t){return t>0&&t<=1?255*t:t}withAlpha(t){let i=this.hexadecimalString.slice(0,6)+e.numberToHex(e.normalizeAlpha(t));return e.fromHex(i)}toJSON(){return this.hexadecimalString}},U=(s=>(s.Unknown="unknown",s.Portrait="portrait",s.PortraitUpsideDown="portraitUpsideDown",s.LandscapeRight="landscapeRight",s.LandscapeLeft="landscapeLeft",s))(U||{}),z=(h=>(h.None="none",h.Horizontal="horizontal",h.LeftToRight="leftToRight",h.RightToLeft="rightToLeft",h.Vertical="vertical",h.TopToBottom="topToBottom",h.BottomToTop="bottomToTop",h))(z||{}),x=(u=>(u.TopLeft="topLeft",u.TopCenter="topCenter",u.TopRight="topRight",u.CenterLeft="centerLeft",u.Center="center",u.CenterRight="centerRight",u.BottomLeft="bottomLeft",u.BottomCenter="bottomCenter",u.BottomRight="bottomRight",u))(x||{});
|
|
2
|
-
|
|
3
|
-
export { a, b, W as c, n as d, S as e, g as f, N as g, l as h, d as i, p as j, f as k, O as l, J as m, A as n, U as o, z as p, x as q };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { b, a } from './chunk-N4NOODAT.js';
|
|
2
|
-
|
|
3
|
-
var m=class h extends b{constructor(e,o,n,r,i,c,s,P,p){super(e,o,n,r),this._centerLeft=i,this._topCenter=c,this._centerRight=s,this._bottomCenter=P,this._center=p;}get centerRight(){return this._centerRight}get center(){return this._center}get centerLeft(){return this._centerLeft}get topCenter(){return this._topCenter}get bottomCenter(){return this._bottomCenter}static fromJSON(e){let{topLeft:o,topRight:n,bottomRight:r,bottomLeft:i,centerLeft:c,topCenter:s,centerRight:P,bottomCenter:p,center:S}=e,b=a.fromJSON(o),a$1=a.fromJSON(n),J=a.fromJSON(r),N=a.fromJSON(i),f=a.fromJSON(c),l=a.fromJSON(s),u=a.fromJSON(P),C=a.fromJSON(p),_=a.fromJSON(S);return new h(b,a$1,J,N,f,l,u,C,_)}toJSONObject(){return {...super.toJSONObject(),center:this._center.toJSONObject(),bottomCenter:this._bottomCenter.toJSONObject(),topCenter:this._topCenter.toJSONObject(),centerLeft:this._centerLeft.toJSONObject(),centerRight:this._centerRight.toJSONObject()}}};
|
|
4
|
-
|
|
5
|
-
export { m as a };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { a as a$1 } from './chunk-XVLYCDJL.js';
|
|
2
|
-
import { b as b$1, a } from './chunk-KYNYQBNF.js';
|
|
3
|
-
import { i, a as a$2 } from './chunk-N4NOODAT.js';
|
|
4
|
-
|
|
5
|
-
var b={bottomLeft:"bottomRight",bottomRight:"bottomLeft",topLeft:"topRight",topRight:"topLeft",centerLeft:"centerRight",centerRight:"centerLeft",center:"center",topCenter:"topCenter",bottomCenter:"bottomCenter"},s=class s{constructor(){this.listener=null;this._mounted=!1;this._mirrored=!1;this._cachedSize=new i(0,0);this.resizeObserver=null;this.mapViewAnchorPositionsForFramePoint=e=>e;}get size(){return this._cachedSize}setMirrored(e){this._mounted&&(this._mirrored=e);}mount(e){var o;if(this._mounted)return;if(!document.head.querySelector(`[data-component=${s.componentName}]`)){let t=document.createElement("style");t.dataset.component=s.componentName,t.append(document.createTextNode(b$1)),document.head.append(t);}let n=document.createElement("div");n.classList.add(a.CUSTOM_VIEW_CONTAINER),(o=e.parentNode)==null||o.replaceChild(n,e),this._htmlRoot=n,this.gestureRecognizer=new a$1(this._htmlRoot),this.gestureRecognizer.addListener({onTap:(t,r)=>{var l,i;let m=(l=r.target.dataset.identifier)!=null?l:"";m!==""&&((i=this.listener)==null||i.didTapView(Number.parseInt(m,10)));}}),this.resizeObserver=new ResizeObserver(([t])=>{this._cachedSize=new i(t.contentRect.width,t.contentRect.height);}),this.resizeObserver.observe(this._htmlRoot),this._cachedSize=new i(this._htmlRoot.clientWidth,this._htmlRoot.clientHeight),this._mounted=!0;}unmount(){var e,n,o,t;this._mounted&&(this.removeChildren(),(e=this.gestureRecognizer)==null||e.removeAllListeners(),(n=this.resizeObserver)==null||n.disconnect(),(o=this._htmlRoot)==null||o.remove(),this._htmlRoot=null,this.gestureRecognizer=null,(t=document.head.querySelector(`[data-component=${s.componentName}]`))==null||t.remove(),this.listener=null,this._mounted=!1);}render(e){var o,t,r,m,l;if(e.elements.length===0){this.removeChildren();return}for(let i of e.removedIds)(t=(o=this._htmlRoot)==null?void 0:o.querySelector(`#${s.elementSelectorPrefix}${i}`))==null||t.remove();let n=document.createDocumentFragment();for(let i of e.elements){let u=`${s.elementSelectorPrefix}${i.identifier}`,f=(r=this._htmlRoot)==null?void 0:r.querySelector(`#${u}`),a=f;if(f==null&&(a=new Image(i.view.options.size.width,i.view.options.size.height),a.id=u,a.dataset.identifier=String(i.identifier),n.append(a)),a){a.src=i.view.data;let d=this.mapViewAnchorPositionsForFramePoint(i.anchorPositions)[this._mirrored?b[i.anchor]:i.anchor];this._mirrored&&(d=a$2.mirrorX(d,this.size));let{x:S,y:w}=this.adjustCoordinatesWithOffset(d,{elementSize:i.view.options.size,offset:i.offset}),p=(m=i.view.options.scale)!=null?m:1;a.style.scale=`${p}`,a.style.transform=`translate3d(${S/p}px, ${w/p}px, 0px)`;}}(l=this._htmlRoot)==null||l.append(n);}removeChildren(){var e;for(;(e=this._htmlRoot)!=null&&e.firstChild;)this._htmlRoot.firstChild.remove();}adjustCoordinatesWithOffset(e,n){let o=e,{elementSize:t,offset:r}=n,m=e.x-t.width/2,l=e.y-t.height/2;return r.x.unit==="pixel"&&(o=new a$2(m+r.x.value,l+r.y.value)),r.x.unit==="fraction"&&(o=new a$2(m+t.width*r.x.value,l+t.height*r.y.value)),o}};s.componentName="CustomLocationsView",s.elementSelectorPrefix="scandit-view-";var R=s;
|
|
6
|
-
|
|
7
|
-
export { R as a };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { d } from './chunk-UPUPKPEP.js';
|
|
2
|
-
|
|
3
|
-
var r=class{constructor(){this.frameColor=d.AimerViewfinder.frameColor;this.dotColor=d.AimerViewfinder.dotColor;this.type="aimer";}toJSONObject(){return {type:this.type,frameColor:this.frameColor.toJSON(),dotColor:this.dotColor.toJSON()}}};
|
|
4
|
-
|
|
5
|
-
export { r as a };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { a as a$1 } from './chunk-MOKCZFZV.js';
|
|
2
|
-
import { d as d$1 } from './chunk-BIGR7VVJ.js';
|
|
3
|
-
import { a } from './chunk-XR65N6EG.js';
|
|
4
|
-
import { a as a$2 } from './chunk-MU4VAJIM.js';
|
|
5
|
-
import { f as f$1, g as g$1 } from './chunk-W7LJM2QO.js';
|
|
6
|
-
|
|
7
|
-
var S=(t=>(t.Idle="idle",t.Pressed="pressed",t))(S||{}),d=class{constructor(e,t){this.state="idle";this.isHover=!1;this.control=e,this.domHost=t,this.onTouchStartListener=this.onTouchStart.bind(this),this.onMouseEnterListener=this.onMouseEnter.bind(this),this.onMouseLeaveListener=this.onMouseLeave.bind(this),this.onClickListener=this.onClick.bind(this),this.setup();}get frameSource(){var e,t;return (t=(e=this.control.view)==null?void 0:e.getContext())==null?void 0:t.frameSource}get context(){var e;return (e=this.control.view)==null?void 0:e.getContext()}async install(){this.button||this.setup();let e=await this.canShow();return e?(this.updateButtonBackground(this.button,this.getImageFromState()),this.show()):this.hide(),e}remove(e=!1){e&&this.button?(this.button.removeEventListener("mouseenter",this.onMouseEnterListener),this.button.removeEventListener("mouseleave",this.onMouseLeaveListener),this.button.removeEventListener("touchstart",this.onTouchStartListener),this.button.removeEventListener("click",this.onClickListener),this.button.remove(),this.isHover=!1,this.button=void 0):this.hide();}hide(){this.button&&(this.button.style.display="none");}show(){this.button&&(this.button.style.display="block");}setupButton(){let e=document.createElement("button");return e.type="button",e.style.display="none",e.className=`scandit-control-widget scandit-control-widget-${this.control.type}`,this.updateButtonBackground(e,this.getImageFromState()),this.domHost.append(e),e.addEventListener("mouseenter",this.onMouseEnterListener),e.addEventListener("mouseleave",this.onMouseLeaveListener),a$2.isDesktopDevice()||e.addEventListener("touchstart",this.onTouchStartListener),e.addEventListener("click",this.onClickListener),e.setAttribute("aria-pressed",String(this.state==="pressed")),this.button=e,this.button}setup(){this.setupButton();}onTouchStart(){var e,t;(e=this.button)==null||e.removeEventListener("mouseenter",this.onMouseEnterListener),(t=this.button)==null||t.removeEventListener("mouseleave",this.onMouseLeaveListener);}onMouseEnter(){this.isHover=!0,this.updateButtonBackground(this.button,this.getImageFromState());}onMouseLeave(){this.isHover=!1,this.updateButtonBackground(this.button,this.getImageFromState());}onClick(){var e;this.state=this.state==="pressed"?"idle":"pressed",this.buttonClicked(),this.updateButtonBackground(this.button,this.getImageFromState()),(e=this.button)==null||e.setAttribute("aria-pressed",String(this.state==="pressed"));}updateButtonBackground(e,t){t!=null&&e!=null&&(e.style.backgroundImage=`url(${JSON.stringify(t)})`);}},C=class extends d{constructor(e,t){super(e,t);}async buttonClicked(){await this.frameSource.setDesiredTorchState(this.retrieveTorchState()==="on"?"off":"on");}async canShow(){return this.isTorchAvailable()}getImageFromState(){return this.retrieveTorchState()==="on"?this.isHover?this.control.torchOnPressedImage:this.control.torchOnImage:this.isHover?this.control.torchOffPressedImage:this.control.torchOffImage}setup(){if(this.control.torchOffImage==null||this.control.torchOnImage==null){a.log(a.Level.Warn,"TorchSwitchControl icon is not set or is empty, the control will not be rendered.");return}super.setup();}async isTorchAvailable(){return f$1(this.frameSource)?this.frameSource.isTorchAvailable():!1}retrieveTorchState(){return f$1(this.frameSource)?this.frameSource.getDesiredTorchState():"off"}},f=class o extends d{constructor(e,t){super(e,t);}static get CameraAccess(){return d$1}static get Camera(){return a$1}async canShow(){return (await o.CameraAccess.getCameras()).length>1}getImageFromState(){return this.isHover?this.control.pressedImage:this.control.idleImage}async buttonClicked(){if(this.isTransitioning)return;let e=await this.getNextDeviceCamera();e&&await this.switchCameras(e);}setup(){if(this.control.idleImage==null){a.log(a.Level.Warn,"CameraSwitchControl idle icon is not set or is empty, the control will not be rendered.");return}super.setup();}async getNextDeviceCamera(){var s,n;let e=await o.CameraAccess.getCameras(),t=this.frameSource?this.frameSource:null,i=(s=t==null?void 0:t.cameraManager.activeCamera)==null?void 0:s.deviceId,r=e.findIndex(c=>c.deviceId===i);return r>-1?(n=e[r+1])!=null?n:e[0]:e.length>0?e[0]:null}async switchCameras(e){var n,c,u;this.isTransitioning=!0;let t=(n=this.context)==null?void 0:n.frameSource,i,r;t!=null&&(i=new g$1(t.settings),r=t.desiredState),await(t==null?void 0:t.switchToDesiredState("off"));let s=o.Camera.fromDeviceCamera(e);i!=null&&await s.applySettings(i),await((c=this.context)==null?void 0:c.setFrameSource(s)),await((u=this.context)==null?void 0:u.frameSource).switchToDesiredState(r!=null?r:"on"),this.isTransitioning=!1;}},g=class o extends d{constructor(e,t){super(e,t);}static get Camera(){return a$1}static get CameraAccess(){return d$1}async install(){let e=await super.install();return e&&await this.setInitialCamera(),e}async canShow(){return !a$2.isIOSDeviceWithExtendedCameraAccess()||!f$1(this.frameSource)?!1:d$1.isIOSBackDualWideCameraLabel(this.frameSource.label)||d$1.isIOSBackCameraLabel(this.frameSource.label)||d$1.isIOSUltraWideBackCameraLabel(this.frameSource.label)}getImageFromState(){return this.isUltraWideBackCamera()?this.isHover?this.control.cameraFOVUltraWidePressedImage:this.control.cameraFOVUltraWideImage:this.isHover?this.control.cameraFOVWidePressedImage:this.control.cameraFOVWideImage}async buttonClicked(){if(this.isTransitioning)return;let e=await this.getAlternativeDeviceCamera();e&&await this.switchCameras(e);}setup(){if(this.control.cameraFOVUltraWideImage==null||this.control.cameraFOVWideImage==null){a.log(a.Level.Warn,"CameraFOVSwitchControl icon is not set or is empty, the control will not be rendered.");return}super.setup();}async setInitialCamera(){var e,t;if(!this.isTransitioning&&!d$1.isIOSBackCameraLabel((t=(e=this.frameSource)==null?void 0:e.label)!=null?t:"")){let r=(await o.CameraAccess.getCameras()).find(s=>d$1.isIOSBackCameraLabel(s.label));r&&await this.switchCameras(r);}}isUltraWideBackCamera(){return f$1(this.frameSource)?d$1.isIOSUltraWideBackCameraLabel(this.frameSource.label):!1}async getAlternativeDeviceCamera(){return (await o.CameraAccess.getCameras()).find(t=>this.isUltraWideBackCamera()?d$1.isIOSBackCameraLabel(t.label):d$1.isIOSUltraWideBackCameraLabel(t.label))}async switchCameras(e){var n,c,u;this.isTransitioning=!0;let t=(n=this.context)==null?void 0:n.frameSource,i,r;t!=null&&(i=new g$1(t.settings),r=t.desiredState),await(t==null?void 0:t.switchToDesiredState("off"));let s=o.Camera.fromDeviceCamera(e);i!=null&&await s.applySettings(i),await((c=this.context)==null?void 0:c.setFrameSource(s)),await((u=this.context)==null?void 0:u.frameSource).switchToDesiredState(r!=null?r:"on"),this.isTransitioning=!1;}};
|
|
8
|
-
|
|
9
|
-
export { S as a, C as b, f as c, g as d };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { a } from './chunk-BDLLVGRH.js';
|
|
2
|
-
import { c as c$1 } from './chunk-J2UL6U3I.js';
|
|
3
|
-
import { b, c } from './chunk-GX4YCYCH.js';
|
|
4
|
-
import { m, e, l as l$1, n as n$1 } from './chunk-N4NOODAT.js';
|
|
5
|
-
|
|
6
|
-
var l=class{static fromJSON(t){return (t==null?void 0:t.type)==="tapToFocus"?new b:null}},s=class{static fromJSON(t){return (t==null?void 0:t.type)==="swipeToZoom"?new c:null}};function n(e){let t="document"in globalThis?globalThis.document:void 0,i=t==null?void 0:t.createRange().createContextualFragment(e);if(i)return i.firstElementChild}function p(e$1){var t;return {Camera:{Settings:{preferredResolution:e$1.Camera.Settings.preferredResolution,zoomFactor:e$1.Camera.Settings.zoomFactor,zoomGestureZoomFactor:e$1.Camera.Settings.zoomGestureZoomFactor,focusGestureStrategy:e$1.Camera.Settings.focusGestureStrategy},defaultPosition:(t=e$1.Camera.defaultPosition)!=null?t:null,availablePositions:e$1.Camera.availablePositions},SingleImageUploader:{Settings:{iconElement:n(e$1.SingleImageUploader.Settings.iconElement),informationElement:n(e$1.SingleImageUploader.Settings.informationElement),buttonElement:n(e$1.SingleImageUploader.Settings.buttonElement),containerStyle:e$1.SingleImageUploader.Settings.containerStyle,iconStyle:e$1.SingleImageUploader.Settings.iconStyle,informationStyle:e$1.SingleImageUploader.Settings.informationStyle,buttonStyle:e$1.SingleImageUploader.Settings.buttonStyle,onlyCameraCapture:e$1.SingleImageUploader.Settings.onlyCameraCapture}},DataCaptureView:{scanAreaMargins:m.fromJSON(JSON.parse(e$1.DataCaptureView.scanAreaMargins)),pointOfInterest:e.fromJSON(JSON.parse(e$1.DataCaptureView.pointOfInterest)),logoStyle:e$1.DataCaptureView.logoStyle,logoAnchor:e$1.DataCaptureView.logoAnchor,logoOffset:e.fromJSON(JSON.parse(e$1.DataCaptureView.logoOffset)),focusGesture:l.fromJSON(JSON.parse(e$1.DataCaptureView.focusGesture)),zoomGesture:s.fromJSON(JSON.parse(e$1.DataCaptureView.zoomGesture)),cameraRecoveryText:e$1.DataCaptureView.cameraRecoveryText},RectangularViewfinder:Object.keys(e$1.RectangularViewfinder.styles).reduce((i,u)=>{let r=e$1.RectangularViewfinder.styles[u];return i.styles[u]={size:l$1.fromJSON(JSON.parse(r.size)),color:n$1.fromJSON(r.color),style:r.style,lineStyle:r.lineStyle,dimming:Number.parseFloat(r.dimming.toString()),animation:c$1.fromJSON(JSON.parse(r.animation))},i},{defaultStyle:e$1.RectangularViewfinder.defaultStyle,styles:{}}),AimerViewfinder:{frameColor:n$1.fromJSON(e$1.AimerViewfinder.frameColor),dotColor:n$1.fromJSON(e$1.AimerViewfinder.dotColor)},Brush:{fillColor:n$1.fromJSON(e$1.Brush.fillColor),strokeColor:n$1.fromJSON(e$1.Brush.strokeColor),strokeWidth:e$1.Brush.strokeWidth},Feedback:{defaultVibrationPattern:e$1.Feedback.defaultVibrationPattern}}}var y=p({DataCaptureView:{focusGesture:"null",zoomGesture:"null",logoAnchor:"bottomRight",logoStyle:"extended",logoOffset:JSON.stringify({x:{value:0,unit:"fraction"},y:{value:0,unit:"fraction"}}),pointOfInterest:JSON.stringify({x:{value:.5,unit:"fraction"},y:{value:.5,unit:"fraction"}}),scanAreaMargins:JSON.stringify({left:{value:0,unit:"fraction"},right:{value:0,unit:"fraction"},top:{value:0,unit:"fraction"},bottom:{value:0,unit:"fraction"}}),cameraRecoveryText:"(This text is updated from translations)"},Camera:{Settings:{preferredResolution:"auto",zoomFactor:1,focusGestureStrategy:"manualUntilCapture",zoomGestureZoomFactor:2},defaultPosition:"worldFacing",availablePositions:["worldFacing","userFacing"]},SingleImageUploader:{Settings:{iconElement:atob(a),informationElement:"<p data-scandit-default>(This text is updated from translations)</p>",buttonElement:"<div data-scandit-default>(This text is updated from translations)</div>",containerStyle:{backgroundColor:"#FFFFFF"},iconStyle:{fill:"#121619"},informationStyle:{color:"#121619",marginBottom:"2em"},buttonStyle:{color:"#FFFFFF",backgroundColor:"#121619",fontWeight:"bold",padding:"1.25em",width:"12em",textAlign:"center",textTransform:"uppercase"},onlyCameraCapture:!1}},AimerViewfinder:{frameColor:"#FFFFFFFF",dotColor:"#FFFFFFCC"},RectangularViewfinder:{defaultStyle:"rounded",styles:{rounded:{size:JSON.stringify({aspect:1,shorterDimension:{unit:"fraction",value:.75}}),color:"#FFFFFFFF",style:"rounded",lineStyle:"light",dimming:0,animation:JSON.stringify({looping:!0})},square:{size:JSON.stringify({aspect:1,shorterDimension:{unit:"fraction",value:.75}}),color:"#FFFFFFFF",style:"square",lineStyle:"light",dimming:0,animation:JSON.stringify({looping:!0})}}},Brush:{fillColor:"#00000000",strokeColor:"#00000000",strokeWidth:0},Feedback:{defaultVibrationPattern:[300]}});function V(e){y=e;}
|
|
7
|
-
|
|
8
|
-
export { l as a, s as b, p as c, y as d, V as e };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { a as a$2 } from './chunk-EQRBQJYM.js';
|
|
2
|
-
import { c, a, b } from './chunk-JFRSUCMO.js';
|
|
3
|
-
import { a as a$1 } from './chunk-7XQ3GHYH.js';
|
|
4
|
-
import { a as a$3 } from './chunk-XR65N6EG.js';
|
|
5
|
-
|
|
6
|
-
var s=class s{constructor(e){this.canUploadFile=!1;this._mounted=!1;this._loading=!1;this._htmlRoot=void 0;this._canvas=void 0;this._onInputCheck=void 0;this._onBeforeFileRead=void 0;this._onImageLoadError=void 0;this._onFileReaderError=void 0;this._onCaptureReady=void 0;this._resizedImageSizeLimit=1440;this._inputElement=void 0;this._buttonElement=void 0;this._chooseImageText="";this._settings=e;}get canvas(){return this._canvas||(this._canvas=document.createElement("canvas")),this._canvas}get canvasContext(){return this._canvasContext||(this._canvasContext=this.canvas.getContext("2d",{willReadFrequently:!0})),this._canvasContext}mount(e){var E;if(this._mounted)return;if(!document.head.querySelector(`[data-component=${s.componentName}]`)){let o=document.createElement("style");o.dataset.component=s.componentName,o.textContent=c,document.head.append(o);}let t=document.createElement("div");t.className=a.SINGLE_IMAGE_UPLOADER_CONTAINER,Object.assign(t.style,b.SINGLE_IMAGE_UPLOADER_CONTAINER_STYLE,this._settings.containerStyle),e.append(t);let{iconElement:n,iconStyle:d,informationElement:i,informationStyle:u,buttonElement:r,buttonStyle:p,onlyCameraCapture:b$1}=this._settings;Object.assign(n.style,b.SINGLE_IMAGE_UPLOADER_ICON_STYLE,d,{maxWidth:"100px",maxHeight:"100px"}),t.append(n),i.hasAttribute(s.DEFAULT_DOM_ATTRIBUTE)&&(Object.assign(i.style,b.SINGLE_IMAGE_UPLOADER_INFORMATION_STYLE,u),i.textContent=a$1.getInstance().get("core.singleImageUploader.title")),t.append(i);let a$3=document.createElement("input");a$3.type="file",a$3.accept="image/*",b$1&&(a$3.capture="environment",a$3.dataset.onlyCaptureOnMobile="environment"),a$3.addEventListener("change",o=>{this.onFileUpload(o);}),a$3.addEventListener("click",o=>{var l;(l=this._onInputCheck)==null||l.call(this,o);}),a$3.addEventListener("keydown",o=>{var l;(l=this._onInputCheck)==null||l.call(this,o);});let c$1=document.createElement("label");c$1.append(a$3),r.hasAttribute(s.DEFAULT_DOM_ATTRIBUTE)&&(Object.assign(r.style,b.SINGLE_IMAGE_UPLOADER_BUTTON_STYLE,p),r.textContent=a$1.getInstance().get("core.singleImageUploader.button")),c$1.append(r),t.append(c$1);let v=document.createRange().createContextualFragment(atob(a$2)).firstElementChild;Object.assign(v.style,{position:"absolute",bottom:"1em",right:"1em",width:"10em"}),t.append(v),this._htmlRoot=t,this._mounted=!0,this._inputElement=a$3,this._buttonElement=r,this._chooseImageText=(E=r.textContent)!=null?E:"";}unmount(){var e,t;this._mounted&&((e=this._htmlRoot)==null||e.remove(),(t=document.head.querySelector(`[data-component=${s.componentName}]`))==null||t.remove(),this._mounted=!1);}setButtonState(e){this._inputElement&&(this._inputElement.disabled=e==="disabled");}getButtonState(){return this._inputElement?this._inputElement.disabled?"disabled":"enabled":"disabled"}onInputCheck(e){this._onInputCheck=e;}onBeforeFileRead(e){this._onBeforeFileRead=e;}onImageLoadError(e){this._onImageLoadError=e;}onFileReaderError(e){this._onFileReaderError=e;}onCaptureReady(e){this._onCaptureReady=e;}onAfterImageProcessed(){this.setLoading(!1);}setLoading(e){this._buttonElement&&(this.setButtonState(e?"disabled":"enabled"),this._buttonElement.textContent=e?"...":this._chooseImageText,this._loading=e);}getResizedImageDimensions(e,t){return e<=this._resizedImageSizeLimit&&t<=this._resizedImageSizeLimit?{width:e,height:t}:e>t?{width:this._resizedImageSizeLimit,height:Math.round(t/e*this._resizedImageSizeLimit)}:{width:Math.round(e/t*this._resizedImageSizeLimit),height:this._resizedImageSizeLimit}}onImageLoad(e){var i;let{height:t,width:n}=this.getResizedImageDimensions(e.naturalWidth,e.naturalHeight);this.canvasContext.canvas.width=n,this.canvasContext.canvas.height=t,this.canvasContext.drawImage(e,0,0,n,t);let d={data:this.canvasContext.getImageData(0,0,n,t).data,width:n,height:t};(i=this._onCaptureReady)==null||i.call(this,d);}onFileReaderLoad(e,t,n){e.value="",t.result!=null&&(n.addEventListener("load",()=>{this.onImageLoad(n);},{once:!0}),n.addEventListener("error",d=>{var i;(i=this._onImageLoadError)==null||i.call(this,d),this.setLoading(!1);},{once:!0}),n.src=t.result);}onFileUpload(e){var u;this.setLoading(!0);let t=e.currentTarget,{files:n}=t;if(n==null||n.length===0){this.setLoading(!1);return}if((u=this._onBeforeFileRead)==null||u.call(this,e),!this.canUploadFile){t.value="",a$3.log(a$3.Level.Warn,"Can't upload file, no capture mode enabled."),this.setLoading(!1);return}let d=new Image,i=new FileReader;i.addEventListener("load",()=>{this.onFileReaderLoad(t,i,d);}),i.addEventListener("error",r=>{var p;(p=this._onFileReaderError)==null||p.call(this,r),this.setLoading(!1);}),i.readAsDataURL(n[0]);}};s.componentName="SingleImageUploaderView",s.DEFAULT_DOM_ATTRIBUTE="data-scandit-default";var I=s;
|
|
7
|
-
|
|
8
|
-
export { I as a };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { d } from './chunk-UPUPKPEP.js';
|
|
2
|
-
|
|
3
|
-
var u=(o=>(o.On="on",o.Off="off",o.Standby="standby",o.Starting="starting",o.Stopping="stopping",o.BootingUp="bootingUp",o.WakingUp="wakingUp",o.GoingToSleep="goingToSleep",o.ShuttingDown="shuttingDown",o))(u||{}),c=(t=>(t.On="on",t.Off="off",t))(c||{}),m=(t=>(t.WorldFacing="worldFacing",t.UserFacing="userFacing",t))(m||{}),p=(r=>(r.Auto="auto",r.HD="hd",r.FullHD="fullHd",r.UHD4K="uhd4k",r))(p||{}),g=(r=>(r.None="none",r.Manual="manual",r.ManualUntilCapture="manualUntilCapture",r.AutoOnLocation="autoOnLocation",r))(g||{});function f(a){var e;return ((e=a==null?void 0:a.toJSONObject())==null?void 0:e.type)==="camera"}var i=class a{constructor(e){this.preferredResolution=d.Camera.Settings.preferredResolution;this.zoomFactor=d.Camera.Settings.zoomFactor;this.zoomGestureZoomFactor=d.Camera.Settings.zoomGestureZoomFactor;this.focus={focusGestureStrategy:d.Camera.Settings.focusGestureStrategy};if(e!=null)for(let t of Object.getOwnPropertyNames(e))this[t]=e[t];}get focusGestureStrategy(){return this.focus.focusGestureStrategy}set focusGestureStrategy(e){this.focus.focusGestureStrategy=e;}static fromJSON(e){let t=new a;return t.preferredResolution=e.preferredResolution,t.zoomFactor=e.zoomFactor,t.zoomGestureZoomFactor=e.zoomGestureZoomFactor,t.focusGestureStrategy=e.focusGestureStrategy,t}setProperty(e,t){this[e]=t;}getProperty(e){return this[e]}toJSONObject(){let e={preferredResolution:this.preferredResolution,zoomFactor:this.zoomFactor,zoomGestureZoomFactor:this.zoomGestureZoomFactor,focus:{focusGestureStrategy:this.focus.focusGestureStrategy}},t={};for(let n of Object.keys(this))[...Object.keys(e),"focusGestureStrategy"].includes(n)||(t[n]=this[n]);return {...e,...t}}};
|
|
4
|
-
|
|
5
|
-
export { u as a, c as b, m as c, p as d, g as e, f, i as g };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { a as a$1 } from './chunk-NMX4VHW2.js';
|
|
2
|
-
import { a } from './chunk-GE4CBD4E.js';
|
|
3
|
-
|
|
4
|
-
function r(){let e=a`@keyframes scandit-rotation{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.${a$1.CONTAINER_CLASS_NAME}{align-items:center;display:flex;flex-direction:column;height:100%;justify-content:center;overflow:hidden;width:100%}.${a$1.CONTAINER_CLASS_NAME}:before{animation:scandit-rotation 1s linear infinite;background-color:#fff;content:" ";height:1px;left:0;opacity:0;pointer-events:none;position:absolute;top:0;width:1px}`,o=a`.${a$1.PAINTBOARDS_CONTAINER_CLASS_NAME}{height:inherit;position:relative;width:100%}.${a$1.PAINTBOARD_CLASS_NAME}{aspect-ratio:16/9;background-color:#000;height:100%;min-height:1px;min-width:1px;position:relative;width:100%}.${a$1.PAINTBOARD_CLASS_NAME}.${a$1.PAINTBOARD_CLASS_NAME_STATE_ON}{aspect-ratio:auto}.${a$1.PAINTBOARD_CLASS_NAME} video{display:block;height:100%;object-fit:cover;transition:opacity .3s;width:100%}.${a$1.PAINTBOARD_CLASS_NAME} .${a$1.MIRRORED_CLASS_NAME}{transform:scaleX(-1)}.${a$1.PAINTBOARD_CLASS_NAME} .${a$1.CAMERA_RECOVERY_CLASS_NAME}{background-color:#000;cursor:pointer;z-index:5}.${a$1.PAINTBOARD_CLASS_NAME} .${a$1.CAMERA_RECOVERY_CLASS_NAME},.${a$1.PAINTBOARD_CLASS_NAME} .${a$1.ERROR_CLASS_NAME}{align-items:center;color:#fff;display:flex;height:100%;justify-content:center;left:0;position:absolute;top:0;width:100%}.${a$1.PAINTBOARD_CLASS_NAME} .${a$1.ERROR_CLASS_NAME}{background-color:rgba(0,0,0,.5);text-align:center;z-index:6}.${a$1.PAINTBOARD_CLASS_NAME} .${a$1.HINT_CONTAINER_CLASS_NAME}{bottom:5vh;display:grid;pointer-events:none;position:absolute;top:5vh;width:100%}.${a$1.PAINTBOARD_CLASS_NAME} .${a$1.HINT_CLASS_NAME}{background-color:#fff;color:#000;padding:10px;width:fit-content}.${a$1.CAMERA_RECOVERY_CLASS_NAME}[hidden],.${a$1.ERROR_CLASS_NAME}[hidden],.${a$1.HINT_CLASS_NAME}[hidden]{display:none}.${a$1.PAINTBOARD_CLASS_NAME} canvas{height:100%;left:0;object-fit:cover;pointer-events:none;position:absolute;top:0;transition:opacity .3s;width:100%}`,i=a`.${a$1.PAINTBOARD_CLASS_NAME} .${a$1.SINGLE_IMAGE_UPLOADER_CONTAINER_CLASS_NAME}{-webkit-tap-highlight-color:rgba(255,255,255,0);align-items:center;display:flex;flex-direction:column;height:100%;justify-content:center;width:100%}.${a$1.PAINTBOARD_CLASS_NAME} .${a$1.SINGLE_IMAGE_UPLOADER_CONTAINER_CLASS_NAME} label{align-items:center;cursor:pointer;display:flex;flex-direction:column;justify-content:center}.${a$1.PAINTBOARD_CLASS_NAME} .${a$1.SINGLE_IMAGE_UPLOADER_CONTAINER_CLASS_NAME} label input[type=file]{position:absolute;top:-9999px}.${a$1.PAINTBOARD_CLASS_NAME}.${a$1.SINGLE_IMAGE_UPLOADER_CONTAINER_CLASS_NAME} label button{pointer-events:none}`,n=a`.${a$1.PAINTBOARD_CLASS_NAME} .${a$1.CONTROLS_CLASS_NAME}{display:flex;height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}.${a$1.PAINTBOARD_CLASS_NAME} .${a$1.CONTROL_WIDGET_CLASS_NAME}-${a$1.TORCH_SWITCH_CONTROL_CLASS_NAME}{left:16px;top:24px}.${a$1.PAINTBOARD_CLASS_NAME} .${a$1.CONTROL_WIDGET_CLASS_NAME}-${a$1.CAMERA_SWITCH_CONTROL_CLASS_NAME}{right:16px;top:24px}.${a$1.PAINTBOARD_CLASS_NAME} .${a$1.CONTROL_WIDGET_CLASS_NAME}-${a$1.CAMERA_FOV_SWITCH_CONTROL_CLASS_NAME}{bottom:24px;right:24px}.${a$1.CONTROL_WIDGET_CLASS_NAME}{background-color:transparent;background-repeat:no-repeat;border:none;cursor:pointer;height:32px;pointer-events:all;position:absolute;width:32px}.${a$1.CONTROL_WIDGET_CLASS_NAME}+.${a$1.CONTROL_WIDGET_CLASS_NAME}{margin-left:16px}`,_=a`.${a$1.FROZEN_FRAME}{height:100%;left:0;object-fit:cover;opacity:1;position:absolute;top:0;width:100%}.${a$1.FROZEN_FRAME}[hidden]{opacity:0;pointer-events:none;visibility:hidden}`;return [e,o,n,i,_]}
|
|
5
|
-
|
|
6
|
-
export { r as a };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { a as a$1 } from './chunk-IGJQFAQU.js';
|
|
2
|
-
import { a } from './chunk-EP3GI7KA.js';
|
|
3
|
-
import { a as a$2 } from './chunk-N4NOODAT.js';
|
|
4
|
-
|
|
5
|
-
var v=class extends a{constructor(e){super();this._onTouchStart=this.onTouchStart.bind(this);this._onPointerDown=this.onPointerDown.bind(this);a$1.detect(),this.element=e,this.addPointerDownListener();}removeAllListeners(){this.element.removeEventListener("touchend",this._onTouchStart),this.element.removeEventListener("mousedown",this._onPointerDown),this.element.removeEventListener("pointerdown",this._onPointerDown);}addPointerDownListener(){a$1.hasApi?this.element.addEventListener(a$1.prefixIfNeeded("pointerdown"),this._onPointerDown):a$1.hasTouch?this.element.addEventListener("touchstart",this._onTouchStart):this.element.addEventListener("mousedown",this._onPointerDown);}onPointerDown(e){let{clientX:n,clientY:t,button:o,currentTarget:a=this.element}=e;o===0&&this.onTap(this.pointRelativeToElement({clientX:n,clientY:t,rect:a.getBoundingClientRect()}),e);}onTouchStart(e){let[n]=e.touches,{clientX:t,clientY:o}=n;this.onTap(this.pointRelativeToElement({clientX:t,clientY:o,rect:this.element.getBoundingClientRect()}),e);}pointRelativeToElement({clientX:e,clientY:n,rect:t}){return new a$2(e-t.left,n-t.top)}onTap(e,n){var t;for(let o of this.listeners)(t=o.onTap)==null||t.call(o,e,n);}};
|
|
6
|
-
|
|
7
|
-
export { v as a };
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { b as b$3 } from './chunk-2VQ6NTFF.js';
|
|
2
|
-
import { a as a$6 } from './chunk-GWI2ZHMO.js';
|
|
3
|
-
import { a as a$h } from './chunk-ZKROZLQ4.js';
|
|
4
|
-
import { d as d$2, c, b as b$4 } from './chunk-TWBD6OC5.js';
|
|
5
|
-
import { a as a$e } from './chunk-WSG6WSZN.js';
|
|
6
|
-
import { a as a$2 } from './chunk-N5YZEC56.js';
|
|
7
|
-
import { a as a$a } from './chunk-44B7Z6ZZ.js';
|
|
8
|
-
import { b, a as a$3 } from './chunk-5S537AFM.js';
|
|
9
|
-
import { a as a$c } from './chunk-W4O7BOCW.js';
|
|
10
|
-
import { a as a$f } from './chunk-DMOXDUF6.js';
|
|
11
|
-
import { b as b$1 } from './chunk-457L5N2F.js';
|
|
12
|
-
import { a as a$7 } from './chunk-PXXUQXGB.js';
|
|
13
|
-
import { a as a$b } from './chunk-XVLYCDJL.js';
|
|
14
|
-
import { a as a$8 } from './chunk-KYNYQBNF.js';
|
|
15
|
-
import { a as a$1 } from './chunk-VJB527QZ.js';
|
|
16
|
-
import { a as a$5 } from './chunk-N5F43TUJ.js';
|
|
17
|
-
import { a as a$9 } from './chunk-NMX4VHW2.js';
|
|
18
|
-
import { a } from './chunk-7XQ3GHYH.js';
|
|
19
|
-
import { d as d$1 } from './chunk-SKRKDAFC.js';
|
|
20
|
-
import { a as a$d } from './chunk-XR65N6EG.js';
|
|
21
|
-
import { d } from './chunk-UPUPKPEP.js';
|
|
22
|
-
import { a as a$4, b as b$2, i, f } from './chunk-N4NOODAT.js';
|
|
23
|
-
import { a as a$g } from './chunk-WUHKODFA.js';
|
|
24
|
-
|
|
25
|
-
var w="core.camera.recovery",B=class q{constructor(){this.focusGesture=d.DataCaptureView.focusGesture;this.zoomGesture=d.DataCaptureView.zoomGesture;this._scanAreaMargins=d.DataCaptureView.scanAreaMargins;this._pointOfInterest=d.DataCaptureView.pointOfInterest;this._logoStyle=d.DataCaptureView.logoStyle;this._logoAnchor=d.DataCaptureView.logoAnchor;this._logoOffset=d.DataCaptureView.logoOffset;this._context=null;this.overlays=[];this.controls=[];this.controlWidgets=new WeakMap;this.frozenFrameCanvas=document.createElement("canvas");this.listeners=[];this.isVideoElementDetached=!1;this.orientation="portrait";this.hiddenProperties={stopVideoTracksOnVisibilityChange:!0,freezeFrameWhenStoppingFrameSource:!0};this.orientationObserver=new b;this.onOrientationChangeListener=this.onOrientationChange.bind(this);this.onHintPresenterUpdateHandler=this.onHintPresenterUpdate.bind(this);this.onBeforeShowToastsHandler=this.onBeforeShowToasts.bind(this);this.onWorkerMessageHandler=this.onWorkerMessage.bind(this);this.visibilityListener=this.onVisibilityChange.bind(this),this.cameraRecoveryListener=this.cameraRecovery.bind(this),a.getInstance().updateIfMissing(a$1);}get scanAreaMargins(){return this._scanAreaMargins}set scanAreaMargins(e){var t;this._scanAreaMargins=e,(t=this.privateContext)==null||t.update();}get pointOfInterest(){return this._pointOfInterest}set pointOfInterest(e){var t;this._pointOfInterest=e,(t=this.privateContext)==null||t.update();}get logoStyle(){return this._logoStyle}set logoStyle(e){var t;this._logoStyle=e,(t=this.privateContext)==null||t.update();}get logoAnchor(){return this._logoAnchor}set logoAnchor(e){var t;this._logoAnchor=e,(t=this.privateContext)==null||t.update();}get logoOffset(){return this._logoOffset}set logoOffset(e){var t;this._logoOffset=e,(t=this.privateContext)==null||t.update();}get cameraRecoveryText(){return a.getInstance().get(w)}get width(){var e,t;return Math.round((t=(e=this.htmlElementState)==null?void 0:e.width)!=null?t:0)}get height(){var e,t;return Math.round((t=(e=this.htmlElementState)==null?void 0:e.height)!=null?t:0)}get canvasDrawer(){return !this._canvasDrawer&&this.canvasElement!=null&&(this._canvasDrawer=new b$1(this.canvasElement),this._canvasDrawer.startObservingCanvasResize()),this._canvasDrawer}get privateContext(){return this._context}static async forContext(e){let t=new q;return await t.setContext(e),t}showProgressBar(){var e;(e=this.loadingOverlay)==null||e.show();}hideProgressBar(){var e;(e=this.loadingOverlay)==null||e.hide();}setProgressBarPercentage(e){this.loadingOverlay&&(this.loadingOverlay.progress=e);}setProgressBarMessage(e){this.loadingOverlay&&(this.loadingOverlay.message=e);}getContext(){return this._context}async setContext(e){var t,i,n;if(this._context=e,e){if(this.overlays.length>0&&((t=this.privateContext)==null?void 0:t.modes.size)===0)throw new Error(["Cannot assign this view to this context. This view has overlays but the context does not have any mode attached matching these overlays.","Remove the overlays first before attaching the view to the context, or add the corresponding mode to the context before attaching this view."].join(" "));await e.setView(this),(i=this.privateContext)==null||i.subscribeToWorkerMessages(this.onWorkerMessageHandler),(n=this._context)!=null&&n.frameSource&&await this.onFrameSourceChange(this._context.frameSource);}}connectToElement(e){var t,i,n;this.orientationObserver.register(),this.setupHtmlElement(e),(t=this.canvasDrawer)==null||t.startObservingCanvasResize(),this.htmlElementDidChange(),a$2.add(this),this.orientation=this.orientationObserver.orientation.value,this.orientationObserver.addEventListener(a$3,this.onOrientationChangeListener),(i=this.hintPresenter)==null||i.addEventListener("hintpresenterupdate",this.onHintPresenterUpdateHandler),(n=this.hintPresenter)==null||n.addEventListener("willshow",this.onBeforeShowToastsHandler),this.localizationSubscription=a.getInstance().subscribe(a=>{a[w]!=null&&(this.cameraRecoveryElement.textContent=a[w]);});}detachFromElement(){var e,t,i,n,a,o,l,m;(e=this.htmlElementState)==null||e.removeListeners(),this.removeStyles(),(t=this.canvasDrawer)==null||t.endObservingCanvasResize(),document.removeEventListener("visibilitychange",this.visibilityListener);for(let h of ["touchend","mousedown"])this.cameraRecoveryElement.removeEventListener(h,this.cameraRecoveryListener);(i=this.loadingOverlay)==null||i.remove(),(n=this.customLocationsView)==null||n.unmount(),this.htmlElementDidChange(),(a=this.gestureRecognizer)==null||a.removeAllListeners(),this.clearHtmlElementContent(),a$2.delete(this),this.orientationObserver.unregister(),this.orientationObserver.removeEventListener(a$3,this.onOrientationChangeListener),(o=this.hintPresenter)==null||o.removeEventListener("hintpresenterupdate",this.onHintPresenterUpdateHandler),(l=this.hintPresenter)==null||l.removeEventListener("willshow",this.onBeforeShowToastsHandler),(m=this.localizationSubscription)==null||m.cancel();}async addOverlay(e){var t;this.overlays.includes(e)||(this.overlays.push(e),await((t=this.privateContext)==null?void 0:t.update([{type:"addOverlay",newValue:e}])));}async removeOverlay(e){var t;this.overlays.includes(e)&&(this.overlays.splice(this.overlays.indexOf(e),1),await((t=this.privateContext)==null?void 0:t.update([{type:"removeOverlay",newValue:e}])));}addListener(e){this.listeners.includes(e)||this.listeners.push(e);}removeListener(e){this.listeners.includes(e)&&this.listeners.splice(this.listeners.indexOf(e),1);}viewPointForFramePoint(e){var v,b,O,P,L,V,D,A;let t={width:(b=(v=this.htmlElementState)==null?void 0:v.width)!=null?b:0,height:(P=(O=this.htmlElementState)==null?void 0:O.height)!=null?P:0},i={width:(V=(L=this.videoElement)==null?void 0:L.videoWidth)!=null?V:0,height:(A=(D=this.videoElement)==null?void 0:D.videoHeight)!=null?A:0},n=t.width/t.height,a=i.width/i.height,o=n>a?t.width/i.width:t.height/i.height,l={x:e.x*o,y:e.y*o},m=(i.width*o-t.width)/2,h=(i.height*o-t.height)/2;return new a$4(l.x-m,l.y-h)}viewQuadrilateralForFrameQuadrilateral(e){let t=this.viewPointForFramePoint(e.topLeft),i=this.viewPointForFramePoint(e.topRight),n=this.viewPointForFramePoint(e.bottomLeft),a=this.viewPointForFramePoint(e.bottomRight);return new b$2(t,i,a,n)}addControl(e){var t;this.controls.includes(e)||(e.view=this,this.controls.push(e),this.controlsUpdated(),(t=this.privateContext)==null||t.update([{type:"addControl",newValue:e}]));}removeControl(e){var t;if(this.controls.includes(e)){e.view=null;let i=this.controls.splice(this.controls.indexOf(e),1);this.getControlWidget(i[0]).remove(!0),this.controlsUpdated(),(t=this.privateContext)==null||t.update([{type:"removeControl",newValue:e}]);}}toJSONObject(){var e;return {scanAreaMargins:this.scanAreaMargins.toJSONObject(),pointOfInterest:this.pointOfInterest.toJSONObject(),logoAnchor:this.logoAnchor,logoOffset:this.logoOffset.toJSONObject(),logoHidden:(e=this.logoHidden)!=null?e:!1,logoStyle:this.logoStyle,overlays:this.overlays.map(t=>t.toJSONObject()),controls:this.controls.map(t=>t.toJSONObject()),focusGesture:this.focusGesture?this.focusGesture.toJSONObject():null,zoomGesture:this.zoomGesture?this.zoomGesture.toJSONObject():null}}isCameraRecoveryVisible(){return !this.cameraRecoveryElement.hidden}setCameraRecoveryVisible(e){this.cameraRecoveryElement.hidden=!e;}async allowPictureInPicture(e){await d$1.instance().allowPictureInPicture(e);}viewAnchorPositionsForFrameAnchorPositions(e){let t=this.viewPointForFramePoint(e.topLeft),i=this.viewPointForFramePoint(e.topRight),n=this.viewPointForFramePoint(e.bottomLeft),a=this.viewPointForFramePoint(e.bottomRight),o=this.viewPointForFramePoint(e.centerLeft),l=this.viewPointForFramePoint(e.centerRight),m=this.viewPointForFramePoint(e.topCenter),h=this.viewPointForFramePoint(e.bottomCenter),v=this.viewPointForFramePoint(e.center);return new a$5(t,i,a,n,o,m,l,h,v)}setDidTapCustomLocationsViewListener(e){this.customLocationsView&&this.customLocationsView.listener===null&&(this.customLocationsView.listener=e);}renderCustomLocationsView(e){this.customLocationsView!=null&&(this.customLocationsView.setMirrored(d$1.instance().isMirrorImageEnabled()),this.customLocationsView.render(e));}removeStyles(){for(let e of document.querySelectorAll("style[scandit]"))e.remove();}onHintPresenterUpdate(e){var t;(t=this.privateContext)==null||t.workerCommand("hintPresenterV2update",{});}clearHtmlElementContent(){var e;this.htmlElement&&((e=this.canvasDrawer)==null||e.endObservingCanvasResize(),this.htmlElement.innerHTML="",this.cameraPaintboardElement=void 0,this.singleImageUploaderPaintboardElement=void 0,this.htmlElement=void 0);}setupHtmlElement(e){var o,l,m;this.createStyles(),this.htmlElement=e,b$3.register();let t=`
|
|
26
|
-
<div class="${a$9.CONTAINER_CLASS_NAME}">
|
|
27
|
-
<div class="${a$9.PAINTBOARDS_CONTAINER_CLASS_NAME}">
|
|
28
|
-
<div data-js-id="loading-overlay"></div>
|
|
29
|
-
<div class="${a$9.PAINTBOARD_CLASS_NAME}" data-js-id="camera-paintboard">
|
|
30
|
-
<video autoplay="autoplay" playsinline="true" muted="muted" poster="${a$h}" style="opacity: 0;"></video>
|
|
31
|
-
<img class="${a$9.FROZEN_FRAME}" data-js-id="frozen-frame" alt="frozen-frame" hidden />
|
|
32
|
-
<canvas></canvas>
|
|
33
|
-
<div data-js-id="${a$8.CUSTOM_VIEW_CONTAINER}"></div>
|
|
34
|
-
<div class="${a$9.HINT_CONTAINER_CLASS_NAME}">
|
|
35
|
-
<div class="${a$9.HINT_CLASS_NAME}" hidden></div>
|
|
36
|
-
</div>
|
|
37
|
-
<${b$3.tag}></${b$3.tag}>
|
|
38
|
-
<div class="${a$9.CONTROLS_CLASS_NAME}"></div>
|
|
39
|
-
<div class="${a$9.CAMERA_RECOVERY_CLASS_NAME}" hidden>${this.cameraRecoveryText}</div>
|
|
40
|
-
<div class="${a$9.ERROR_CLASS_NAME}" hidden></div>
|
|
41
|
-
</div>
|
|
42
|
-
<div class="${a$9.PAINTBOARD_CLASS_NAME}" data-js-id="singleimage-paintboard"></div>
|
|
43
|
-
</div>
|
|
44
|
-
</div>
|
|
45
|
-
`;this.htmlElement.innerHTML=t,this.hintPresenter=this.htmlElement.querySelector(b$3.tag),this.loadingOverlay&&this.loadingOverlay.remove(),this.loadingOverlay=a$6.create(),this.loadingOverlay.hide(),(o=this.htmlElement.querySelector('[data-js-id="loading-overlay"]'))==null||o.replaceWith(this.loadingOverlay),this.customLocationsView&&this.customLocationsView.unmount(),this.customLocationsView=new a$7,this.customLocationsView.mount(this.htmlElement.querySelector(`[data-js-id="${a$8.CUSTOM_VIEW_CONTAINER}"]`)),this.customLocationsView.mapViewAnchorPositionsForFramePoint=h=>this.viewAnchorPositionsForFrameAnchorPositions(h),this.containerElement=this.htmlElement.querySelector(`.${a$9.CONTAINER_CLASS_NAME}`),this.cameraPaintboardElement=this.containerElement.querySelector('[data-js-id="camera-paintboard"]'),this.singleImageUploaderPaintboardElement=this.containerElement.querySelector('[data-js-id="singleimage-paintboard"]');let i=this.cameraPaintboardElement.querySelector("canvas");this.canvasElement==null?this.canvasElement=i:i.replaceWith(this.canvasElement);let n=this.cameraPaintboardElement.querySelector('[data-js-id="frozen-frame"]');this.frozenFrame==null?this.frozenFrame=n:n.replaceWith(this.frozenFrame),this.controlsElement=this.cameraPaintboardElement.querySelector(`.${a$9.CONTROLS_CLASS_NAME}`),this.cameraRecoveryElement=this.cameraPaintboardElement.querySelector(`.${a$9.CAMERA_RECOVERY_CLASS_NAME}`),this.errorElement=this.cameraPaintboardElement.querySelector(`.${a$9.ERROR_CLASS_NAME}`),this.hintContainerElement=this.cameraPaintboardElement.querySelector(`.${a$9.HINT_CONTAINER_CLASS_NAME}`),this.hintElement=this.cameraPaintboardElement.querySelector(`.${a$9.HINT_CLASS_NAME}`);let a=this.cameraPaintboardElement.querySelector("video");this.videoElement?a.replaceWith(this.videoElement):(this.videoElement=a,this.videoPauseListener=this.handleVideoPause.bind(this),this.videoElement.addEventListener("pause",this.videoPauseListener)),this.lastFrameSourceState!=null&&((m=(l=this._context)==null?void 0:l.frameSource)==null||m.switchToDesiredState(this.lastFrameSourceState)),document.addEventListener("visibilitychange",this.visibilityListener);for(let h of ["touchend","mousedown"])this.cameraRecoveryElement.addEventListener(h,this.cameraRecoveryListener);this.htmlElementState&&this.htmlElementState.removeListeners(),this.htmlElementState=new a$a(this.htmlElement),this.htmlElementState.onStateChanged(this.htmlElementDidChange.bind(this)),this.htmlElementState.onDisconnected(this.htmlElementDisconnected.bind(this)),this.gestureRecognizer=new a$b(this.htmlElement),this.gestureRecognizer.addListener({onTap:async h=>{var v;(v=this.privateContext)==null||v.workerCommand("onTap",{point:h.toJSONObject()});}});}setupHtmlElementSingleImageUploader(e){var i;if(this.singleImageUploaderPaintboardElement==null)return;this.singleImageUploaderView&&this.singleImageUploaderView.unmount(),this.singleImageUploaderView=new a$c(e),this.singleImageUploaderView.mount(this.containerElement.querySelector('[data-js-id="singleimage-paintboard"]'));let t=(i=this._context)==null?void 0:i.frameSource;this.singleImageUploaderView.onInputCheck(n=>{t.getCurrentState()!=="starting"&&n.preventDefault();}),this.singleImageUploaderView.onBeforeFileRead(()=>{t._context&&this.singleImageUploaderView&&(this.singleImageUploaderView.canUploadFile=t._context.hasEnabledMode());}),this.singleImageUploaderView.onImageLoadError(()=>{t.currentState="starting",a$d.log(a$d.Level.Error,"Could not load image from selected file");}),this.singleImageUploaderView.onFileReaderError(n=>{var o,l;let a=n.target;t.currentState="starting",a$d.log(a$d.Level.Error,`Error while reading the file: ${(l=(o=a.error)==null?void 0:o.toString())!=null?l:""}`);}),this.singleImageUploaderView.onCaptureReady(async n=>{await t.processUploadedFileCapture(n);}),this.singleImageUploaderView.setButtonState(t.getCurrentState()==="starting"?"enabled":"disabled"),t.addView(this.singleImageUploaderView);}setupHtmlElementVisibility(e){this.cameraPaintboardElement!=null&&(this.cameraPaintboardElement.hidden=e!=="camera"),this.singleImageUploaderPaintboardElement!=null&&(this.singleImageUploaderPaintboardElement.hidden=e!=="singleImageUploader");}createStyles(){if(document.querySelector("style[scandit]")===null){let e=a$e();for(let[t,i]of Object.entries(e))i.setAttribute("scandit",`data-capture-sdk-${t}`),document.head.append(i);}}async onOrientationChange(e){var t,i;this.orientation=e.detail.value,await((i=this.privateContext)==null?void 0:i.update([{type:"viewChange",newValue:{...(t=this.htmlElementState)==null?void 0:t.toJSONObject(),orientation:this.orientation}}]));}htmlElementDidChange(){var i$1,n;if(!this.htmlElementState)return;let e=this.htmlElementState,t=e.toJSONObject();if(!a$a.areEquivalentJSONStates(this.lastHtmlElementState,t)){this.orientation=this.orientationObserver.orientation.value,(i$1=this.privateContext)==null||i$1.update([{type:"viewChange",newValue:{...e.toJSONObject(),orientation:this.orientation}}]),this.lastHtmlElementState=t,(n=this.canvasDrawer)==null||n.updateCanvasSizeAttributes(this.width,this.height),this.handleVideoDisplay(t.visible);for(let a of this.listeners)typeof a.didChangeSize=="function"&&a.didChangeSize(this,new i(t.size.width.value,t.size.height.value),this.orientation);}}async htmlElementDisconnected(){var e,t,i,n,a,o,l;this.isVideoElementDetached=!1,(e=this.videoElement)==null||e.remove(),this.lastFrameSourceState=(i=(t=this._context)==null?void 0:t.frameSource)==null?void 0:i.getCurrentState(),await((a=(n=this._context)==null?void 0:n.frameSource)==null?void 0:a.switchToDesiredState("off")),await((l=this.privateContext)==null?void 0:l.update([{type:"viewChange",newValue:{...(o=this.htmlElementState)==null?void 0:o.toJSONObject(),orientation:this.orientation}}]));}handleVideoDisplay(e){this.videoElement==null||this.cameraPaintboardElement==null||(!e&&!this.isVideoElementDetached?(this.videoElement.width=0,this.videoElement.height=0,this.videoElement.style.opacity="0",this.videoElement.style.visibility="hidden",document.body.append(this.videoElement),this.isVideoElementDetached=!0):e&&this.isVideoElementDetached&&(this.cameraPaintboardElement.insertAdjacentElement("afterbegin",this.videoElement),this.isVideoElementDetached=!1,this.videoElement.style.removeProperty("visibility"),this.videoElement.removeAttribute("width"),this.videoElement.removeAttribute("height"),this.videoElement.style.removeProperty("opacity")));}isCanvasDrawerWithMetrics(e){return e instanceof a$f}onWorkerMessage(e){var t,i;switch(e.type){case"draw":{this.drawEngineCommands(e.payload);break}case"performanceMetricsReport":{let n=this._canvasDrawer;n!=null&&this.isCanvasDrawerWithMetrics(n)&&n.setPerformanceMetrics(e.payload);break}case"contextDidChangeStatus":{let n=a$g.fromJSON(e.payload);n.isValid||((t=this.loadingOverlay)==null||t.hide(),this.displayError(n));break}case"showHint":{this.displayHint(e.payload.text,e.payload.style);break}case"updateHint":{this.updateHint(e.payload.style);break}case"hideHint":{this.hideHint();break}default:{(i=this.hintPresenter)==null||i.handleMessage(e);break}}}async onBeforeShowToasts(){var t,i$1;let e=await((t=this._context)==null?void 0:t.workerCommand("getViewfinderInfo",{}));if((e==null?void 0:e.rect)!=null){if(e.rect.origin.x===0&&e.rect.origin.y===0&&e.rect.size.width===0&&e.rect.size.height===0)return;(i$1=this.hintPresenter)==null||i$1.setViewFinderRect(new f(new a$4(e.rect.origin.x,e.rect.origin.y),new i(e.rect.size.width,e.rect.size.height)));}}drawEngineCommands(e){var t;(t=this.canvasDrawer)==null||t.draw(e);}displayError(e){this.errorElement.textContent=`Error ${e.code}: ${e.message}`,this.errorElement.hidden=!1;}clearError(){this.errorElement.textContent="",this.errorElement.hidden=!0;}displayHint(e,t){this.hintElement.textContent=e,this.hintElement.hidden=!1,this.updateHint(t);}hideHint(){this.hintElement.textContent="",this.hintElement.hidden=!0;}updateHint(e){this.hintElement.style.background=e.backgroundColor,this.hintElement.style.color=e.textColor,this.hintElement.style.fontSize=e.font==="body"?"1.25rem":"1rem",this.hintElement.style.borderRadius=e.hintCornerStyle==="rounded"?"5px":"0px",e.hintHeight==="taller"&&(this.hintElement.style.paddingTop="1.25em",this.hintElement.style.paddingBottom="1.25em"),e.hintWidth==="wider"&&(this.hintElement.style.paddingLeft="1.25em",this.hintElement.style.paddingRight="1.25em"),this.updateAnchor(e);}updateAnchor(e){let t=`${e.verticalOffsetRatio*100}vh`;switch(e.anchor){case"topLeft":{this.hintContainerElement.style.placeContent="start left",this.hintElement.style.transform=`translateY(${t})`;break}case"topCenter":{this.hintContainerElement.style.placeContent="start center",this.hintElement.style.transform=`translateY(${t})`;break}case"topRight":{this.hintContainerElement.style.placeContent="start right",this.hintElement.style.transform=`translateY(${t})`;break}case"centerLeft":{this.hintContainerElement.style.placeContent="center start";break}case"center":{this.hintContainerElement.style.placeContent="center";break}case"centerRight":{this.hintContainerElement.style.placeContent="center end";break}case"bottomLeft":{this.hintContainerElement.style.placeContent="end left";break}case"bottomCenter":{this.hintContainerElement.style.placeContent="end center";break}case"bottomRight":{this.hintContainerElement.style.placeContent="end right";break}}}controlsUpdated(){var e;this.redrawControls(),(e=this.privateContext)==null||e.update();}redrawControls(){var t;let e=(t=this._context)==null?void 0:t.frameSource;for(let i of this.controls){let n=this.getControlWidget(i);e==null||e.desiredState==="off"||e.desiredState==="standby"||e.desiredState==="stopping"?n.remove():n.install();}}registerControlWidget(e,t){let i=new t(e,this.controlsElement);return this.controlWidgets.set(e,i),i}getControlWidget(e){let t=this.controlWidgets.get(e);if(t)return t;let{type:i}=e,n;switch(i){case"torch":{n=new b$4(e,this.controlsElement),this.controlWidgets.set(e,n);break}case"camera":{n=new c(e,this.controlsElement),this.controlWidgets.set(e,n);break}case"camera-fov":{n=new d$2(e,this.controlsElement),this.controlWidgets.set(e,n);break}}return n}async onFrameSourceChange(e){let t=e==null?void 0:e.type;if(this.setupHtmlElementVisibility(t),t==="camera"){let i=e==null?void 0:e.getCurrentState();i!=null&&await this.onCameraStateChanged(i);}else t==="singleImageUploader"&&this.setupHtmlElementSingleImageUploader(e.settings);}async onCameraStateChanged(e){var t;switch((t=this.cameraPaintboardElement)==null||t.classList.toggle(a$9.PAINTBOARD_CLASS_NAME_STATE_ON,e==="on"),e){case"stopping":{this.hiddenProperties.freezeFrameWhenStoppingFrameSource&&this.freezeFrame(),this.setVideoElementOpacity("0");return}case"starting":case"bootingUp":case"wakingUp":{if(!this.htmlElement){a$d.log(a$d.Level.Error,"cannot set frame source stream before connecting view to an HTML element");return}this.videoElement&&(d$1.instance().videoElement=this.videoElement,d$1.instance().gui.isCameraRecoveryVisible=this.isCameraRecoveryVisible.bind(this),d$1.instance().gui.setCameraRecoveryVisible=this.setCameraRecoveryVisible.bind(this),this.setVideoElementOpacity("0"));return}case"off":{this.setVideoElementOpacity("0"),this.redrawControls();return}case"on":{await d$1.instance().waitForCapabilities(),this.redrawControls(),this.unfreezeFrame(),this.setVideoElementOpacity("1");break}case"goingToSleep":{this.freezeFrame();break}}}setVideoElementOpacity(e){this.videoElement&&(this.videoElement.style.opacity=e),this.canvasElement&&(this.canvasElement.style.opacity=e);}onSingleImageUploaderSettingsChange(e){this.setupHtmlElementSingleImageUploader(e);}handleVideoPause(){d$1.instance().playVideo();}setHiddenProperty(e,t){this.hiddenProperties[e]=t;}async onVisibilityChange(){var t,i;let e=(t=this.videoElement)==null?void 0:t.srcObject;if(this.hiddenProperties.stopVideoTracksOnVisibilityChange&&(document.visibilityState==="hidden"&&d$1.instance().stopVideoTracks(),document.visibilityState==="visible"&&d$1.instance().activeCamera!=null&&e!=null))if(!e.active||(i=e.getVideoTracks()[0])!=null&&i.muted)try{a$d.log(a$d.Level.Debug,'Detected visibility change ("visible") event with inactive video source, try to reinitialize camera'),await d$1.instance().reinitializeCamera();}catch(n){}else a$d.log(a$d.Level.Debug,'Detected visibility change ("visible") event with active video source, replay video'),d$1.instance().playVideo();}async cameraRecovery(e){e.preventDefault(),d$1.instance().activeCamera=d$1.instance().selectedCamera,await d$1.instance().reinitializeCamera();}freezeFrame(){var i;if(!this.frozenFrame)return;let e=d$1.instance().getCurrentFrame();if(!e)return;let t=new ImageData(e.data,e.width,e.height);this.frozenFrameCanvas.width=t.width,this.frozenFrameCanvas.height=t.height,this.frozenFrame.width=t.width,this.frozenFrame.height=t.height,(i=this.frozenFrameCanvas.getContext("2d"))==null||i.putImageData(t,0,0),this.frozenFrame.src=this.frozenFrameCanvas.toDataURL("image/jpeg",.4),this.frozenFrame.classList.toggle(a$9.MIRRORED_CLASS_NAME,d$1.instance().isMirrorImageEnabled()),this.frozenFrame.hidden=!1;}unfreezeFrame(){this.frozenFrame&&(this.frozenFrame.src="",this.frozenFrame.hidden=!0);}};
|
|
46
|
-
|
|
47
|
-
export { B as a };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { a as a$1 } from './chunk-KAZWF3JC.js';
|
|
2
|
-
|
|
3
|
-
var a=class n{constructor(){this.type="singleImageUploader";this._settings=new a$1(null);this._desiredState="off";this.listeners=[];this._context=null;this._view=void 0;}static get default(){return new n}get desiredState(){return this._desiredState}get settings(){return this._settings}get context(){return this._context}set context(e){this._context=e;}set currentState(e){e!==this._currentState&&(this._currentState=e,this.notifyListeners(),this.notifyContext({type:"frameSourceState",newValue:e}));}get currentState(){return this._currentState}async switchToDesiredState(e){if(e==="on"){if(this.currentState==="on"||this.currentState==="starting")return}else if(this.currentState==="off"||this.currentState==="stopping")return;return this._desiredState=e,this.setCurrentState(e==="on"?"starting":"off")}addListener(e){e!=null&&(this.listeners.includes(e)||this.listeners.push(e));}removeListener(e){e!=null&&this.listeners.includes(e)&&this.listeners.splice(this.listeners.indexOf(e),1);}async applySettings(e){return this._settings=e,this.notifyContext({type:"singleImageModeUploaderSettings",newValue:this._settings})}toJSONObject(){return {type:this.type,settings:this.settings.toJSONObject(),desiredState:this.desiredState}}getCurrentState(){return this._currentState}async setCurrentState(e){if(e!==this._currentState)return this._currentState=e,this.notifyListeners(),this.notifyContext({type:"frameSourceState",newValue:e})}async notifyContext(e){if(this._context)return this._context.update([e])}notifyListeners(){for(let e of this.listeners)e.didChangeState&&e.didChangeState(this,this.currentState);}async processUploadedFileCapture(e){var t,r;await((t=this._context)==null?void 0:t.sendFrameToProcessor(e)),this.currentState="starting",(r=this._view)==null||r.onAfterImageProcessed();}addView(e){this._view=e;}};
|
|
4
|
-
|
|
5
|
-
export { a };
|
|
File without changes
|