@scandit/web-datacapture-core 7.0.2 → 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/build/js/AimerViewfinder.js +1 -1
- package/build/js/Brush.js +1 -1
- package/build/js/{Camera-ZV7WBiWy.d.ts → Camera-Dpk6E99b.d.ts} +8 -12
- 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 -8
- 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-ARJASUTK.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-2WQHYCZC.js +0 -6
- package/build/js/chunks/chunk-34FEFSCI.js +0 -6
- package/build/js/chunks/chunk-3V7ZD6JQ.js +0 -14
- package/build/js/chunks/chunk-44B7Z6ZZ.js +0 -5
- package/build/js/chunks/chunk-6O3B7VJJ.js +0 -6
- package/build/js/chunks/chunk-ABRFVD7T.js +0 -5
- package/build/js/chunks/chunk-E2VUMNY4.js +0 -16
- package/build/js/chunks/chunk-EFJGQ4BT.js +0 -3
- package/build/js/chunks/chunk-HNMM5VR6.js +0 -6
- package/build/js/chunks/chunk-J6Q5HITP.js +0 -47
- 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-NNLX5HO4.js +0 -10
- 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-V76YCTVB.js +0 -5
- 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-ZSYUKWWL.js +0 -5
- /package/{THIRD-PARTY.txt → THIRD_PARTY.txt} +0 -0
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
import { c, d, b as b$1, a as a$1, e } from './chunk-H4TH4342.js';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var Oe=a((ke,ye)=>{(function(h){var u;if(typeof define=="function"&&define.amd&&(define(h),u=!0),typeof ke=="object"&&(ye.exports=h(),u=!0),!u){var P=window.Cookies,x=window.Cookies=h();x.noConflict=function(){return window.Cookies=P,x};}})(function(){function h(){for(var x=0,y={};x<arguments.length;x++){var T=arguments[x];for(var O in T)y[O]=T[O];}return y}function u(x){return x.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}function P(x){function y(){}function T(S,k,f){if(!(typeof document>"u")){f=h({path:"/"},y.defaults,f),typeof f.expires=="number"&&(f.expires=new Date(new Date*1+f.expires*864e5)),f.expires=f.expires?f.expires.toUTCString():"";try{var o=JSON.stringify(k);/^[\{\[]/.test(o)&&(k=o);}catch(i){}k=x.write?x.write(k,S):encodeURIComponent(String(k)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),S=encodeURIComponent(String(S)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var n="";for(var e in f)f[e]&&(n+="; "+e,f[e]!==!0&&(n+="="+f[e].split(";")[0]));return document.cookie=S+"="+k+n}}function O(S,k){if(!(typeof document>"u")){for(var f={},o=document.cookie?document.cookie.split("; "):[],n=0;n<o.length;n++){var e=o[n].split("="),i=e.slice(1).join("=");!k&&i.charAt(0)==='"'&&(i=i.slice(1,-1));try{var t=u(e[0]);if(i=(x.read||x)(i,t)||u(i),k)try{i=JSON.parse(i);}catch(A){}if(f[t]=i,S===t)break}catch(A){}}return S?f[S]:f}}return y.set=T,y.get=function(S){return O(S,!1)},y.getJSON=function(S){return O(S,!0)},y.remove=function(S,k){T(S,"",h(k,{expires:-1}));},y.defaults={},y.withConverter=P,y}return P(function(){})});});var Ce=a((F,$)=>{(function(h,u){var P="1.0.38",x="",y="?",T="function",O="undefined",S="object",k="string",f="major",o="model",n="name",e="type",i="vendor",t="version",A="architecture",L="console",d="mobile",b="tablet",C="smarttv",N="wearable",q="embedded",H=500,z="Amazon",D="Apple",a="ASUS",l="BlackBerry",r="Browser",v="Chrome",_="Edge",M="Firefox",U="Google",re="Huawei",J="LG",Q="Microsoft",ae="Motorola",V="Opera",Y="Samsung",se="Sharp",Z="Sony",ee="Xiaomi",ie="Zebra",le="Facebook",ce="Chromium OS",ue="Mac OS",_e=function(w,m){var c={};for(var g in w)m[g]&&m[g].length%2===0?c[g]=m[g].concat(w[g]):c[g]=w[g];return c},X=function(w){for(var m={},c=0;c<w.length;c++)m[w[c].toUpperCase()]=w[c];return m},be=function(w,m){return typeof w===k?j(m).indexOf(j(w))!==-1:!1},j=function(w){return w.toLowerCase()},Me=function(w){return typeof w===k?w.replace(/[^\d\.]/g,x).split(".")[0]:u},oe=function(w,m){if(typeof w===k)return w=w.replace(/^\s\s*/,x),typeof m===O?w:w.substring(0,H)},G=function(w,m){for(var c=0,g,B,R,p,s,I;c<m.length&&!s;){var te=m[c],fe=m[c+1];for(g=B=0;g<te.length&&!s&&te[g];)if(s=te[g++].exec(w),s)for(R=0;R<fe.length;R++)I=s[++B],p=fe[R],typeof p===S&&p.length>0?p.length===2?typeof p[1]==T?this[p[0]]=p[1].call(this,I):this[p[0]]=p[1]:p.length===3?typeof p[1]===T&&!(p[1].exec&&p[1].test)?this[p[0]]=I?p[1].call(this,I,p[2]):u:this[p[0]]=I?I.replace(p[1],p[2]):u:p.length===4&&(this[p[0]]=I?p[3].call(this,I.replace(p[1],p[2])):u):this[p]=I||u;c+=2;}},ne=function(w,m){for(var c in m)if(typeof m[c]===S&&m[c].length>0){for(var g=0;g<m[c].length;g++)if(be(m[c][g],w))return c===y?u:c}else if(be(m[c],w))return c===y?u:c;return w},Ue={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},de={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},we={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[t,[n,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[t,[n,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[n,t],[/opios[\/ ]+([\w\.]+)/i],[t,[n,V+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[t,[n,V+" GX"]],[/\bopr\/([\w\.]+)/i],[t,[n,V]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[t,[n,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[n,t],[/\bddg\/([\w\.]+)/i],[t,[n,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[t,[n,"UC"+r]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[t,[n,"WeChat"]],[/konqueror\/([\w\.]+)/i],[t,[n,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[t,[n,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[t,[n,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[t,[n,"Smart Lenovo "+r]],[/(avast|avg)\/([\w\.]+)/i],[[n,/(.+)/,"$1 Secure "+r],t],[/\bfocus\/([\w\.]+)/i],[t,[n,M+" Focus"]],[/\bopt\/([\w\.]+)/i],[t,[n,V+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[t,[n,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[t,[n,"Dolphin"]],[/coast\/([\w\.]+)/i],[t,[n,V+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[t,[n,"MIUI "+r]],[/fxios\/([-\w\.]+)/i],[t,[n,M]],[/\bqihu|(qi?ho?o?|360)browser/i],[[n,"360 "+r]],[/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],[[n,/(.+)/,"$1 "+r],t],[/samsungbrowser\/([\w\.]+)/i],[t,[n,Y+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[n,/_/g," "],t],[/metasr[\/ ]?([\d\.]+)/i],[t,[n,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[n,"Sogou Mobile"],t],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[n,t],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[n],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[n,le],t],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[n,t],[/\bgsa\/([\w\.]+) .*safari\//i],[t,[n,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[t,[n,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[t,[n,v+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[n,v+" WebView"],t],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[t,[n,"Android "+r]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[n,t],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[t,[n,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[t,n],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[n,[t,ne,Ue]],[/(webkit|khtml)\/([\w\.]+)/i],[n,t],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[n,"Netscape"],t],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[t,[n,M+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[n,t],[/(cobalt)\/([\w\.]+)/i],[n,[t,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[A,"amd64"]],[/(ia32(?=;))/i],[[A,j]],[/((?:i[346]|x)86)[;\)]/i],[[A,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[A,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[A,"armhf"]],[/windows (ce|mobile); ppc;/i],[[A,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[A,/ower/,x,j]],[/(sun4\w)[;\)]/i],[[A,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[A,j]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[o,[i,Y],[e,b]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[o,[i,Y],[e,d]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[o,[i,D],[e,d]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[o,[i,D],[e,b]],[/(macintosh);/i],[o,[i,D]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[o,[i,se],[e,d]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[o,[i,re],[e,b]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[o,[i,re],[e,d]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[o,/_/g," "],[i,ee],[e,d]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[o,/_/g," "],[i,ee],[e,b]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[o,[i,"OPPO"],[e,d]],[/\b(opd2\d{3}a?) bui/i],[o,[i,"OPPO"],[e,b]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[o,[i,"Vivo"],[e,d]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[o,[i,"Realme"],[e,d]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[o,[i,ae],[e,d]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[o,[i,ae],[e,b]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[o,[i,J],[e,b]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[o,[i,J],[e,d]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[o,[i,"Lenovo"],[e,b]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[o,/_/g," "],[i,"Nokia"],[e,d]],[/(pixel c)\b/i],[o,[i,U],[e,b]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[o,[i,U],[e,d]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[o,[i,Z],[e,d]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[o,"Xperia Tablet"],[i,Z],[e,b]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[o,[i,"OnePlus"],[e,d]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[o,[i,z],[e,b]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[o,/(.+)/g,"Fire Phone $1"],[i,z],[e,d]],[/(playbook);[-\w\),; ]+(rim)/i],[o,i,[e,b]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[o,[i,l],[e,d]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[o,[i,a],[e,b]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[o,[i,a],[e,d]],[/(nexus 9)/i],[o,[i,"HTC"],[e,b]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[i,[o,/_/g," "],[e,d]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[o,[i,"Acer"],[e,b]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[o,[i,"Meizu"],[e,d]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[o,[i,"Ulefone"],[e,d]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[i,o,[e,d]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[i,o,[e,b]],[/(surface duo)/i],[o,[i,Q],[e,b]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[o,[i,"Fairphone"],[e,d]],[/(u304aa)/i],[o,[i,"AT&T"],[e,d]],[/\bsie-(\w*)/i],[o,[i,"Siemens"],[e,d]],[/\b(rct\w+) b/i],[o,[i,"RCA"],[e,b]],[/\b(venue[\d ]{2,7}) b/i],[o,[i,"Dell"],[e,b]],[/\b(q(?:mv|ta)\w+) b/i],[o,[i,"Verizon"],[e,b]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[o,[i,"Barnes & Noble"],[e,b]],[/\b(tm\d{3}\w+) b/i],[o,[i,"NuVision"],[e,b]],[/\b(k88) b/i],[o,[i,"ZTE"],[e,b]],[/\b(nx\d{3}j) b/i],[o,[i,"ZTE"],[e,d]],[/\b(gen\d{3}) b.+49h/i],[o,[i,"Swiss"],[e,d]],[/\b(zur\d{3}) b/i],[o,[i,"Swiss"],[e,b]],[/\b((zeki)?tb.*\b) b/i],[o,[i,"Zeki"],[e,b]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[i,"Dragon Touch"],o,[e,b]],[/\b(ns-?\w{0,9}) b/i],[o,[i,"Insignia"],[e,b]],[/\b((nxa|next)-?\w{0,9}) b/i],[o,[i,"NextBook"],[e,b]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[i,"Voice"],o,[e,d]],[/\b(lvtel\-)?(v1[12]) b/i],[[i,"LvTel"],o,[e,d]],[/\b(ph-1) /i],[o,[i,"Essential"],[e,d]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[o,[i,"Envizen"],[e,b]],[/\b(trio[-\w\. ]+) b/i],[o,[i,"MachSpeed"],[e,b]],[/\btu_(1491) b/i],[o,[i,"Rotor"],[e,b]],[/(shield[\w ]+) b/i],[o,[i,"Nvidia"],[e,b]],[/(sprint) (\w+)/i],[i,o,[e,d]],[/(kin\.[onetw]{3})/i],[[o,/\./g," "],[i,Q],[e,d]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[o,[i,ie],[e,b]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[o,[i,ie],[e,d]],[/smart-tv.+(samsung)/i],[i,[e,C]],[/hbbtv.+maple;(\d+)/i],[[o,/^/,"SmartTV"],[i,Y],[e,C]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[i,J],[e,C]],[/(apple) ?tv/i],[i,[o,D+" TV"],[e,C]],[/crkey/i],[[o,v+"cast"],[i,U],[e,C]],[/droid.+aft(\w+)( bui|\))/i],[o,[i,z],[e,C]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[o,[i,se],[e,C]],[/(bravia[\w ]+)( bui|\))/i],[o,[i,Z],[e,C]],[/(mitv-\w{5}) bui/i],[o,[i,ee],[e,C]],[/Hbbtv.*(technisat) (.*);/i],[i,o,[e,C]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[i,oe],[o,oe],[e,C]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[e,C]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[i,o,[e,L]],[/droid.+; (shield) bui/i],[o,[i,"Nvidia"],[e,L]],[/(playstation [345portablevi]+)/i],[o,[i,Z],[e,L]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[o,[i,Q],[e,L]],[/((pebble))app/i],[i,o,[e,N]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[o,[i,D],[e,N]],[/droid.+; (glass) \d/i],[o,[i,U],[e,N]],[/droid.+; (wt63?0{2,3})\)/i],[o,[i,ie],[e,N]],[/(quest( \d| pro)?)/i],[o,[i,le],[e,N]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[i,[e,q]],[/(aeobc)\b/i],[o,[i,z],[e,q]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[o,[e,d]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[o,[e,b]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[e,b]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[e,d]],[/(android[-\w\. ]{0,9});.+buil/i],[o,[i,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[t,[n,_+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[t,[n,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[n,t],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[t,n]],os:[[/microsoft (windows) (vista|xp)/i],[n,t],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[n,[t,ne,de]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[t,ne,de],[n,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[t,/_/g,"."],[n,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[n,ue],[t,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[t,n],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[n,t],[/\(bb(10);/i],[t,[n,l]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[t,[n,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[t,[n,M+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[t,[n,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[t,[n,"watchOS"]],[/crkey\/([\d\.]+)/i],[t,[n,v+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[n,ce],t],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[n,t],[/(sunos) ?([\w\.\d]*)/i],[[n,"Solaris"],t],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[n,t]]},E=function(w,m){if(typeof w===S&&(m=w,w=u),!(this instanceof E))return new E(w,m).getResult();var c=typeof h!==O&&h.navigator?h.navigator:u,g=w||(c&&c.userAgent?c.userAgent:x),B=c&&c.userAgentData?c.userAgentData:u,R=m?_e(we,m):we,p=c&&c.userAgent==g;return this.getBrowser=function(){var s={};return s[n]=u,s[t]=u,G.call(s,g,R.browser),s[f]=Me(s[t]),p&&c&&c.brave&&typeof c.brave.isBrave==T&&(s[n]="Brave"),s},this.getCPU=function(){var s={};return s[A]=u,G.call(s,g,R.cpu),s},this.getDevice=function(){var s={};return s[i]=u,s[o]=u,s[e]=u,G.call(s,g,R.device),p&&!s[e]&&B&&B.mobile&&(s[e]=d),p&&s[o]=="Macintosh"&&c&&typeof c.standalone!==O&&c.maxTouchPoints&&c.maxTouchPoints>2&&(s[o]="iPad",s[e]=b),s},this.getEngine=function(){var s={};return s[n]=u,s[t]=u,G.call(s,g,R.engine),s},this.getOS=function(){var s={};return s[n]=u,s[t]=u,G.call(s,g,R.os),p&&!s[n]&&B&&B.platform&&B.platform!="Unknown"&&(s[n]=B.platform.replace(/chrome os/i,ce).replace(/macos/i,ue)),s},this.getResult=function(){return {ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return g},this.setUA=function(s){return g=typeof s===k&&s.length>H?oe(s,H):s,this},this.setUA(g),this};E.VERSION=P,E.BROWSER=X([n,t,f]),E.CPU=X([A]),E.DEVICE=X([o,i,e,L,d,C,b,N,q]),E.ENGINE=E.OS=X([n,t]),typeof F!==O?(typeof $!==O&&$.exports&&(F=$.exports=E),F.UAParser=E):typeof define===T&&define.amd?define(function(){return E}):typeof h!==O&&(h.UAParser=E);var W=typeof h!==O&&(h.jQuery||h.Zepto);if(W&&!W.ua){var K=new E;W.ua=K.getResult(),W.ua.get=function(){return K.getUA()},W.ua.set=function(w){K.setUA(w);var m=K.getResult();for(var c in m)W.ua[c]=m[c];};}})(typeof window=="object"?window:F);});var Ee=b(Oe(),1),Te=b(Ce(),1);var Ae;(D=>{let h;function u(){return h==null&&(h=new Te.default(navigator.userAgent)),h}D.getUserAgentInfo=u;function P(){var r;if("orientation"in window)return !1;let a="(any-pointer: coarse)",l=(r=window.matchMedia)==null?void 0:r.call(window,a);return navigator.maxTouchPoints===0||(l==null?void 0:l.media)===a&&!(l!=null&&l.matches)}D.isDesktopDevice=P;function x(){return u().getDevice().model==="iPhone"}D.isIPhone=x;function y(){let a=u().getOS();return a.name==="iOS"&&a.version!=null&&a.version.localeCompare("16.3",void 0,{numeric:!0})>=0}D.isIOSDeviceWithExtendedCameraAccess=y;function T(){return "document"in window?window.document.createElement("canvas"):null}D.getCanvas=T;function O(a){return a.name==="iOS"&&a.version!=null&&["11.2.2","11.2.5","11.2.6"].includes(a.version)}async function S(){return c()}D.hasSIMDSupport=S;async function k(){return d()}D.hasThreadsSupport=k;function f(a,l,r){let v=a[l[0]];return v==null?!1:l.length===1?typeof v===r:(typeof v=="function"||typeof v=="object")&&f(v,l.slice(1),r)}function o(){var M;let a=!0,l=null,r=null,v=null,_=null;try{if(l=D.getCanvas(),r=D.getCanvas(),v=l==null?void 0:l.getContext("webgl"),_=r==null?void 0:r.getContext("experimental-webgl"),!f(window,["WebGLRenderingContext"],"function")||v==null&&_==null)throw new Error("WebGLRenderingContext is not supported")}catch(U){a=!1;}finally{for(let U of [v,_])typeof(U==null?void 0:U.getExtension)=="function"&&((M=U.getExtension("WEBGL_lose_context"))==null||M.loseContext());v=null,_=null,l=null,r=null;}return a}function n(){let a=!0,l=!0,r=new Set;location.protocol.startsWith("http")||r.add("httpProtocol"),f(window,["isSecureContext"],"boolean")&&!window.isSecureContext&&r.add("secureContext"),!f(navigator,["mediaDevices","getUserMedia"],"function")&&!f(navigator,["enumerateDevices"],"function")&&!f(window,["MediaStreamTrack","getSources"],"function")&&(r.add("mediaDevices"),a=!1),f(window,["Worker"],"function")||(r.add("webWorkers"),a=!1,l=!1),f(window,["WebAssembly"],"object")||(r.add("webAssembly"),a=!1,l=!1),f(window,["Blob"],"function")||(r.add("blob"),a=!1,l=!1),f(window,["URL","createObjectURL"],"function")||(r.add("urlObject"),a=!1,l=!1),f(window,["OffscreenCanvas"],"function")||r.add("offscreenCanvas"),o()||r.add("webGL");let v=u().getOS();return O(v)&&(r.add("webAssemblyErrorFree"),a=!1,l=!1),b$1()||r.add("sharedArrayBuffer"),a$1()||r.add("crossOriginIsolated"),{fullSupport:a,scannerSupport:l,missingFeatures:[...r]}}D.checkBrowserCompatibility=n;async function e$1(){return e()}D.checkMultithreadingSupport=e$1;function i(){let a="scandit-device-id",l="localStorage"in globalThis?globalThis.localStorage:void 0;if(!l)return "";let r=l.getItem(a);if(r!=null&&r!=="")return r;if(r=(0, Ee.get)(a),r!=null&&r!=="")return l.setItem(a,r),r;let v=new Uint8Array(20);return crypto.getRandomValues(v),r=[...v].map(_=>{let M=_.toString(16);return M.length===1?`0${M}`:M}).join(""),l.setItem(a,r),r}D.getDeviceId=i;function t(a){return a instanceof HTMLElement||a!=null&&typeof a=="object"&&typeof a.tagName=="string"}D.isValidHTMLElement=t;function A(){var v,_;let a=u().getOS();if(a.name!=="iOS")return !0;let[l,r]=(_=(v=a.version)==null?void 0:v.split(".").map(Number))!=null?_:[];return l>14||l===14&&r>=6}D.isSupportedIOSVersion=A;function L(){var a,l;return (l=(a=u().getBrowser().name)==null?void 0:a.toLowerCase().includes("safari"))!=null?l:!1}D.isSafari=L;function d$1(){var l,r;return /iphone|ipod|ipad/.test((r=(l=u().getDevice().model)==null?void 0:l.toLowerCase())!=null?r:"")&&!L()}D.isIosWebView=d$1;async function b(){var l;return ((l=u().getOS().name)==null?void 0:l.toLowerCase())!=="android"?!1:u().getUA().includes("wv")?!0:[...(await fetch(document.location.toString(),{method:"HEAD"})).headers].some(([r])=>r.toLowerCase()==="x-requested-with")}D.isAndroidWebView=b;function C(){return u().getOS().name==="Windows"}D.isWindows=C;function N(){return u().getBrowser().name==="Firefox"}D.isFirefox=N;function q(){if("navigator"in globalThis){for(let a of ["vibrate","webkitVibrate","msVibrate","mozVibrate"])if(typeof navigator[a]=="function")return navigator[a]}}D.getSupportedVibrationMethod=q;function H(){return q()!=null&&!P()&&!C()&&!N()}D.isVibrationAvailable=H;function z(){return u().getOS().name==="iOS"}D.isIOS=z;})(Ae||(Ae={}));
|
|
5
|
-
|
|
6
|
-
export { Ae as a };
|
|
1
|
+
import {c,d,b as b$1,a as a$1,e}from'./chunk-H4TH4342.js';import {a,b}from'./chunk-2Q5FZVGV.js';var Oe=a((ke,ye)=>{(function(h){var u;if(typeof define=="function"&&define.amd&&(define(h),u=!0),typeof ke=="object"&&(ye.exports=h(),u=!0),!u){var P=window.Cookies,x=window.Cookies=h();x.noConflict=function(){return window.Cookies=P,x};}})(function(){function h(){for(var x=0,y={};x<arguments.length;x++){var T=arguments[x];for(var O in T)y[O]=T[O];}return y}function u(x){return x.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}function P(x){function y(){}function T(S,k,f){if(!(typeof document>"u")){f=h({path:"/"},y.defaults,f),typeof f.expires=="number"&&(f.expires=new Date(new Date*1+f.expires*864e5)),f.expires=f.expires?f.expires.toUTCString():"";try{var o=JSON.stringify(k);/^[\{\[]/.test(o)&&(k=o);}catch(i){}k=x.write?x.write(k,S):encodeURIComponent(String(k)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),S=encodeURIComponent(String(S)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var n="";for(var e in f)f[e]&&(n+="; "+e,f[e]!==!0&&(n+="="+f[e].split(";")[0]));return document.cookie=S+"="+k+n}}function O(S,k){if(!(typeof document>"u")){for(var f={},o=document.cookie?document.cookie.split("; "):[],n=0;n<o.length;n++){var e=o[n].split("="),i=e.slice(1).join("=");!k&&i.charAt(0)==='"'&&(i=i.slice(1,-1));try{var t=u(e[0]);if(i=(x.read||x)(i,t)||u(i),k)try{i=JSON.parse(i);}catch(A){}if(f[t]=i,S===t)break}catch(A){}}return S?f[S]:f}}return y.set=T,y.get=function(S){return O(S,!1)},y.getJSON=function(S){return O(S,!0)},y.remove=function(S,k){T(S,"",h(k,{expires:-1}));},y.defaults={},y.withConverter=P,y}return P(function(){})});});var Ce=a((F,$)=>{(function(h,u){var P="1.0.38",x="",y="?",T="function",O="undefined",S="object",k="string",f="major",o="model",n="name",e="type",i="vendor",t="version",A="architecture",L="console",d="mobile",b="tablet",C="smarttv",N="wearable",q="embedded",H=500,z="Amazon",D="Apple",a="ASUS",l="BlackBerry",r="Browser",v="Chrome",_="Edge",M="Firefox",U="Google",re="Huawei",J="LG",Q="Microsoft",ae="Motorola",V="Opera",Y="Samsung",se="Sharp",Z="Sony",ee="Xiaomi",ie="Zebra",le="Facebook",ce="Chromium OS",ue="Mac OS",_e=function(w,m){var c={};for(var g in w)m[g]&&m[g].length%2===0?c[g]=m[g].concat(w[g]):c[g]=w[g];return c},X=function(w){for(var m={},c=0;c<w.length;c++)m[w[c].toUpperCase()]=w[c];return m},be=function(w,m){return typeof w===k?j(m).indexOf(j(w))!==-1:!1},j=function(w){return w.toLowerCase()},Me=function(w){return typeof w===k?w.replace(/[^\d\.]/g,x).split(".")[0]:u},oe=function(w,m){if(typeof w===k)return w=w.replace(/^\s\s*/,x),typeof m===O?w:w.substring(0,H)},G=function(w,m){for(var c=0,g,B,R,p,s,I;c<m.length&&!s;){var te=m[c],fe=m[c+1];for(g=B=0;g<te.length&&!s&&te[g];)if(s=te[g++].exec(w),s)for(R=0;R<fe.length;R++)I=s[++B],p=fe[R],typeof p===S&&p.length>0?p.length===2?typeof p[1]==T?this[p[0]]=p[1].call(this,I):this[p[0]]=p[1]:p.length===3?typeof p[1]===T&&!(p[1].exec&&p[1].test)?this[p[0]]=I?p[1].call(this,I,p[2]):u:this[p[0]]=I?I.replace(p[1],p[2]):u:p.length===4&&(this[p[0]]=I?p[3].call(this,I.replace(p[1],p[2])):u):this[p]=I||u;c+=2;}},ne=function(w,m){for(var c in m)if(typeof m[c]===S&&m[c].length>0){for(var g=0;g<m[c].length;g++)if(be(m[c][g],w))return c===y?u:c}else if(be(m[c],w))return c===y?u:c;return w},Ue={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},de={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},we={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[t,[n,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[t,[n,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[n,t],[/opios[\/ ]+([\w\.]+)/i],[t,[n,V+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[t,[n,V+" GX"]],[/\bopr\/([\w\.]+)/i],[t,[n,V]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[t,[n,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[n,t],[/\bddg\/([\w\.]+)/i],[t,[n,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[t,[n,"UC"+r]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[t,[n,"WeChat"]],[/konqueror\/([\w\.]+)/i],[t,[n,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[t,[n,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[t,[n,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[t,[n,"Smart Lenovo "+r]],[/(avast|avg)\/([\w\.]+)/i],[[n,/(.+)/,"$1 Secure "+r],t],[/\bfocus\/([\w\.]+)/i],[t,[n,M+" Focus"]],[/\bopt\/([\w\.]+)/i],[t,[n,V+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[t,[n,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[t,[n,"Dolphin"]],[/coast\/([\w\.]+)/i],[t,[n,V+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[t,[n,"MIUI "+r]],[/fxios\/([-\w\.]+)/i],[t,[n,M]],[/\bqihu|(qi?ho?o?|360)browser/i],[[n,"360 "+r]],[/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],[[n,/(.+)/,"$1 "+r],t],[/samsungbrowser\/([\w\.]+)/i],[t,[n,Y+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[n,/_/g," "],t],[/metasr[\/ ]?([\d\.]+)/i],[t,[n,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[n,"Sogou Mobile"],t],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[n,t],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[n],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[n,le],t],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[n,t],[/\bgsa\/([\w\.]+) .*safari\//i],[t,[n,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[t,[n,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[t,[n,v+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[n,v+" WebView"],t],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[t,[n,"Android "+r]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[n,t],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[t,[n,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[t,n],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[n,[t,ne,Ue]],[/(webkit|khtml)\/([\w\.]+)/i],[n,t],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[n,"Netscape"],t],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[t,[n,M+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[n,t],[/(cobalt)\/([\w\.]+)/i],[n,[t,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[A,"amd64"]],[/(ia32(?=;))/i],[[A,j]],[/((?:i[346]|x)86)[;\)]/i],[[A,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[A,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[A,"armhf"]],[/windows (ce|mobile); ppc;/i],[[A,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[A,/ower/,x,j]],[/(sun4\w)[;\)]/i],[[A,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[A,j]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[o,[i,Y],[e,b]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[o,[i,Y],[e,d]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[o,[i,D],[e,d]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[o,[i,D],[e,b]],[/(macintosh);/i],[o,[i,D]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[o,[i,se],[e,d]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[o,[i,re],[e,b]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[o,[i,re],[e,d]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[o,/_/g," "],[i,ee],[e,d]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[o,/_/g," "],[i,ee],[e,b]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[o,[i,"OPPO"],[e,d]],[/\b(opd2\d{3}a?) bui/i],[o,[i,"OPPO"],[e,b]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[o,[i,"Vivo"],[e,d]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[o,[i,"Realme"],[e,d]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[o,[i,ae],[e,d]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[o,[i,ae],[e,b]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[o,[i,J],[e,b]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[o,[i,J],[e,d]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[o,[i,"Lenovo"],[e,b]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[o,/_/g," "],[i,"Nokia"],[e,d]],[/(pixel c)\b/i],[o,[i,U],[e,b]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[o,[i,U],[e,d]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[o,[i,Z],[e,d]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[o,"Xperia Tablet"],[i,Z],[e,b]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[o,[i,"OnePlus"],[e,d]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[o,[i,z],[e,b]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[o,/(.+)/g,"Fire Phone $1"],[i,z],[e,d]],[/(playbook);[-\w\),; ]+(rim)/i],[o,i,[e,b]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[o,[i,l],[e,d]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[o,[i,a],[e,b]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[o,[i,a],[e,d]],[/(nexus 9)/i],[o,[i,"HTC"],[e,b]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[i,[o,/_/g," "],[e,d]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[o,[i,"Acer"],[e,b]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[o,[i,"Meizu"],[e,d]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[o,[i,"Ulefone"],[e,d]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[i,o,[e,d]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[i,o,[e,b]],[/(surface duo)/i],[o,[i,Q],[e,b]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[o,[i,"Fairphone"],[e,d]],[/(u304aa)/i],[o,[i,"AT&T"],[e,d]],[/\bsie-(\w*)/i],[o,[i,"Siemens"],[e,d]],[/\b(rct\w+) b/i],[o,[i,"RCA"],[e,b]],[/\b(venue[\d ]{2,7}) b/i],[o,[i,"Dell"],[e,b]],[/\b(q(?:mv|ta)\w+) b/i],[o,[i,"Verizon"],[e,b]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[o,[i,"Barnes & Noble"],[e,b]],[/\b(tm\d{3}\w+) b/i],[o,[i,"NuVision"],[e,b]],[/\b(k88) b/i],[o,[i,"ZTE"],[e,b]],[/\b(nx\d{3}j) b/i],[o,[i,"ZTE"],[e,d]],[/\b(gen\d{3}) b.+49h/i],[o,[i,"Swiss"],[e,d]],[/\b(zur\d{3}) b/i],[o,[i,"Swiss"],[e,b]],[/\b((zeki)?tb.*\b) b/i],[o,[i,"Zeki"],[e,b]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[i,"Dragon Touch"],o,[e,b]],[/\b(ns-?\w{0,9}) b/i],[o,[i,"Insignia"],[e,b]],[/\b((nxa|next)-?\w{0,9}) b/i],[o,[i,"NextBook"],[e,b]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[i,"Voice"],o,[e,d]],[/\b(lvtel\-)?(v1[12]) b/i],[[i,"LvTel"],o,[e,d]],[/\b(ph-1) /i],[o,[i,"Essential"],[e,d]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[o,[i,"Envizen"],[e,b]],[/\b(trio[-\w\. ]+) b/i],[o,[i,"MachSpeed"],[e,b]],[/\btu_(1491) b/i],[o,[i,"Rotor"],[e,b]],[/(shield[\w ]+) b/i],[o,[i,"Nvidia"],[e,b]],[/(sprint) (\w+)/i],[i,o,[e,d]],[/(kin\.[onetw]{3})/i],[[o,/\./g," "],[i,Q],[e,d]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[o,[i,ie],[e,b]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[o,[i,ie],[e,d]],[/smart-tv.+(samsung)/i],[i,[e,C]],[/hbbtv.+maple;(\d+)/i],[[o,/^/,"SmartTV"],[i,Y],[e,C]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[i,J],[e,C]],[/(apple) ?tv/i],[i,[o,D+" TV"],[e,C]],[/crkey/i],[[o,v+"cast"],[i,U],[e,C]],[/droid.+aft(\w+)( bui|\))/i],[o,[i,z],[e,C]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[o,[i,se],[e,C]],[/(bravia[\w ]+)( bui|\))/i],[o,[i,Z],[e,C]],[/(mitv-\w{5}) bui/i],[o,[i,ee],[e,C]],[/Hbbtv.*(technisat) (.*);/i],[i,o,[e,C]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[i,oe],[o,oe],[e,C]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[e,C]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[i,o,[e,L]],[/droid.+; (shield) bui/i],[o,[i,"Nvidia"],[e,L]],[/(playstation [345portablevi]+)/i],[o,[i,Z],[e,L]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[o,[i,Q],[e,L]],[/((pebble))app/i],[i,o,[e,N]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[o,[i,D],[e,N]],[/droid.+; (glass) \d/i],[o,[i,U],[e,N]],[/droid.+; (wt63?0{2,3})\)/i],[o,[i,ie],[e,N]],[/(quest( \d| pro)?)/i],[o,[i,le],[e,N]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[i,[e,q]],[/(aeobc)\b/i],[o,[i,z],[e,q]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[o,[e,d]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[o,[e,b]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[e,b]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[e,d]],[/(android[-\w\. ]{0,9});.+buil/i],[o,[i,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[t,[n,_+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[t,[n,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[n,t],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[t,n]],os:[[/microsoft (windows) (vista|xp)/i],[n,t],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[n,[t,ne,de]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[t,ne,de],[n,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[t,/_/g,"."],[n,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[n,ue],[t,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[t,n],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[n,t],[/\(bb(10);/i],[t,[n,l]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[t,[n,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[t,[n,M+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[t,[n,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[t,[n,"watchOS"]],[/crkey\/([\d\.]+)/i],[t,[n,v+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[n,ce],t],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[n,t],[/(sunos) ?([\w\.\d]*)/i],[[n,"Solaris"],t],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[n,t]]},E=function(w,m){if(typeof w===S&&(m=w,w=u),!(this instanceof E))return new E(w,m).getResult();var c=typeof h!==O&&h.navigator?h.navigator:u,g=w||(c&&c.userAgent?c.userAgent:x),B=c&&c.userAgentData?c.userAgentData:u,R=m?_e(we,m):we,p=c&&c.userAgent==g;return this.getBrowser=function(){var s={};return s[n]=u,s[t]=u,G.call(s,g,R.browser),s[f]=Me(s[t]),p&&c&&c.brave&&typeof c.brave.isBrave==T&&(s[n]="Brave"),s},this.getCPU=function(){var s={};return s[A]=u,G.call(s,g,R.cpu),s},this.getDevice=function(){var s={};return s[i]=u,s[o]=u,s[e]=u,G.call(s,g,R.device),p&&!s[e]&&B&&B.mobile&&(s[e]=d),p&&s[o]=="Macintosh"&&c&&typeof c.standalone!==O&&c.maxTouchPoints&&c.maxTouchPoints>2&&(s[o]="iPad",s[e]=b),s},this.getEngine=function(){var s={};return s[n]=u,s[t]=u,G.call(s,g,R.engine),s},this.getOS=function(){var s={};return s[n]=u,s[t]=u,G.call(s,g,R.os),p&&!s[n]&&B&&B.platform&&B.platform!="Unknown"&&(s[n]=B.platform.replace(/chrome os/i,ce).replace(/macos/i,ue)),s},this.getResult=function(){return {ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return g},this.setUA=function(s){return g=typeof s===k&&s.length>H?oe(s,H):s,this},this.setUA(g),this};E.VERSION=P,E.BROWSER=X([n,t,f]),E.CPU=X([A]),E.DEVICE=X([o,i,e,L,d,C,b,N,q]),E.ENGINE=E.OS=X([n,t]),typeof F!==O?(typeof $!==O&&$.exports&&(F=$.exports=E),F.UAParser=E):typeof define===T&&define.amd?define(function(){return E}):typeof h!==O&&(h.UAParser=E);var W=typeof h!==O&&(h.jQuery||h.Zepto);if(W&&!W.ua){var K=new E;W.ua=K.getResult(),W.ua.get=function(){return K.getUA()},W.ua.set=function(w){K.setUA(w);var m=K.getResult();for(var c in m)W.ua[c]=m[c];};}})(typeof window=="object"?window:F);});var Ee=b(Oe(),1),Te=b(Ce(),1);var Ae;(D=>{let h;function u(){return h==null&&(h=new Te.default(navigator.userAgent)),h}D.getUserAgentInfo=u;function P(){var r;if("orientation"in window)return !1;let a="(any-pointer: coarse)",l=(r=window.matchMedia)==null?void 0:r.call(window,a);return navigator.maxTouchPoints===0||(l==null?void 0:l.media)===a&&!(l!=null&&l.matches)}D.isDesktopDevice=P;function x(){return u().getDevice().model==="iPhone"}D.isIPhone=x;function y(){let a=u().getOS();return a.name==="iOS"&&a.version!=null&&a.version.localeCompare("16.3",void 0,{numeric:!0})>=0}D.isIOSDeviceWithExtendedCameraAccess=y;function T(){return "document"in window?window.document.createElement("canvas"):null}D.getCanvas=T;function O(a){return a.name==="iOS"&&a.version!=null&&["11.2.2","11.2.5","11.2.6"].includes(a.version)}async function S(){return c()}D.hasSIMDSupport=S;async function k(){return d()}D.hasThreadsSupport=k;function f(a,l,r){let v=a[l[0]];return v==null?!1:l.length===1?typeof v===r:(typeof v=="function"||typeof v=="object")&&f(v,l.slice(1),r)}function o(){var M;let a=!0,l=null,r=null,v=null,_=null;try{if(l=D.getCanvas(),r=D.getCanvas(),v=l==null?void 0:l.getContext("webgl"),_=r==null?void 0:r.getContext("experimental-webgl"),!f(window,["WebGLRenderingContext"],"function")||v==null&&_==null)throw new Error("WebGLRenderingContext is not supported")}catch(U){a=!1;}finally{for(let U of [v,_])typeof(U==null?void 0:U.getExtension)=="function"&&((M=U.getExtension("WEBGL_lose_context"))==null||M.loseContext());v=null,_=null,l=null,r=null;}return a}function n(){let a=!0,l=!0,r=new Set;location.protocol.startsWith("http")||r.add("httpProtocol"),f(window,["isSecureContext"],"boolean")&&!window.isSecureContext&&r.add("secureContext"),!f(navigator,["mediaDevices","getUserMedia"],"function")&&!f(navigator,["enumerateDevices"],"function")&&!f(window,["MediaStreamTrack","getSources"],"function")&&(r.add("mediaDevices"),a=!1),f(window,["Worker"],"function")||(r.add("webWorkers"),a=!1,l=!1),f(window,["WebAssembly"],"object")||(r.add("webAssembly"),a=!1,l=!1),f(window,["Blob"],"function")||(r.add("blob"),a=!1,l=!1),f(window,["URL","createObjectURL"],"function")||(r.add("urlObject"),a=!1,l=!1),f(window,["OffscreenCanvas"],"function")||r.add("offscreenCanvas"),o()||r.add("webGL");let v=u().getOS();return O(v)&&(r.add("webAssemblyErrorFree"),a=!1,l=!1),b$1()||r.add("sharedArrayBuffer"),a$1()||r.add("crossOriginIsolated"),{fullSupport:a,scannerSupport:l,missingFeatures:[...r]}}D.checkBrowserCompatibility=n;async function e$1(){return e()}D.checkMultithreadingSupport=e$1;function i(){let a="scandit-device-id",l="localStorage"in globalThis?globalThis.localStorage:void 0;if(!l)return "";let r=l.getItem(a);if(r!=null&&r!=="")return r;if(r=(0, Ee.get)(a),r!=null&&r!=="")return l.setItem(a,r),r;let v=new Uint8Array(20);return crypto.getRandomValues(v),r=[...v].map(_=>{let M=_.toString(16);return M.length===1?`0${M}`:M}).join(""),l.setItem(a,r),r}D.getDeviceId=i;function t(a){return a instanceof HTMLElement||a!=null&&typeof a=="object"&&typeof a.tagName=="string"}D.isValidHTMLElement=t;function A(){var v,_;let a=u().getOS();if(a.name!=="iOS")return !0;let[l,r]=(_=(v=a.version)==null?void 0:v.split(".").map(Number))!=null?_:[];return l>14||l===14&&r>=6}D.isSupportedIOSVersion=A;function L(){var a,l;return (l=(a=u().getBrowser().name)==null?void 0:a.toLowerCase().includes("safari"))!=null?l:!1}D.isSafari=L;function d$1(){var l,r;return /iphone|ipod|ipad/.test((r=(l=u().getDevice().model)==null?void 0:l.toLowerCase())!=null?r:"")&&!L()}D.isIosWebView=d$1;async function b(){var l;return ((l=u().getOS().name)==null?void 0:l.toLowerCase())!=="android"?!1:u().getUA().includes("wv")?!0:[...(await fetch(document.location.toString(),{method:"HEAD"})).headers].some(([r])=>r.toLowerCase()==="x-requested-with")}D.isAndroidWebView=b;function C(){return u().getOS().name==="Windows"}D.isWindows=C;function N(){return u().getBrowser().name==="Firefox"}D.isFirefox=N;function q(){if("navigator"in globalThis){for(let a of ["vibrate","webkitVibrate","msVibrate","mozVibrate"])if(typeof navigator[a]=="function")return navigator[a]}}D.getSupportedVibrationMethod=q;function H(){return q()!=null&&!P()&&!C()&&!N()}D.isVibrationAvailable=H;function z(){return u().getOS().name==="iOS"}D.isIOS=z;})(Ae||(Ae={}));
|
|
2
|
+
export{Ae as a};
|
|
@@ -1,3 +1 @@
|
|
|
1
|
-
var o=class{constructor(a,e){var r,t;this._contextWebGL=a,this._maxPoolCapacity=(r=e==null?void 0:e.maxPoolCapacity)!=null?r:2,this._minPoolCapacity=(t=e==null?void 0:e.minPoolCapacity)!=null?t:1;}recycle(a){var e;(e=this._framePool)==null||e.push(a);}};
|
|
2
|
-
|
|
3
|
-
export { o as a };
|
|
1
|
+
var o=class{constructor(a,e){var r,t;this._contextWebGL=a,this._maxPoolCapacity=(r=e==null?void 0:e.maxPoolCapacity)!=null?r:2,this._minPoolCapacity=(t=e==null?void 0:e.minPoolCapacity)!=null?t:1;}recycle(a){var e;(e=this._framePool)==null||e.push(a);}};export{o as a};
|
|
@@ -1,5 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
var r={configurePhase:"unconfigured",configurePromise:void 0,userLicenseKey:void 0,mainDataCaptureLoader:void 0,dataCaptureLoaders:void 0,loadingStatus:b,libraryLocation:void 0};
|
|
4
|
-
|
|
5
|
-
export { r as a };
|
|
1
|
+
import {b}from'./chunk-6H6FKGVE.js';var r={configurePhase:"unconfigured",configurePromise:void 0,userLicenseKey:void 0,mainDataCaptureLoader:void 0,dataCaptureLoaders:void 0,loadingStatus:b,libraryLocation:void 0};export{r as a};
|
|
@@ -1,5 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
var S={CONTAINER_CLASS_NAME:a.CONTAINER_CLASS_NAME,PAINTBOARD_CLASS_NAME:a.PAINTBOARD_CLASS_NAME,PAINTBOARD_CLASS_NAME_STATE_ON:a.PAINTBOARD_CLASS_NAME_STATE_ON,CONTROLS_CLASS_NAME:a.CONTROLS_CLASS_NAME,CONTROL_WIDGET_CLASS_NAME:a.CONTROL_WIDGET_CLASS_NAME,MIRRORED_CLASS_NAME:a.MIRRORED_CLASS_NAME,CAMERA_RECOVERY_CLASS_NAME:a.CAMERA_RECOVERY_CLASS_NAME,ERROR_CLASS_NAME:a.ERROR_CLASS_NAME,HINT_CONTAINER_CLASS_NAME:a.HINT_CONTAINER_CLASS_NAME,HINT_CLASS_NAME:a.HINT_CLASS_NAME,PAINTBOARDS_CONTAINER_CLASS_NAME:a.PAINTBOARDS_CONTAINER_CLASS_NAME,SINGLE_IMAGE_UPLOADER_CONTAINER_CLASS_NAME:a.SINGLE_IMAGE_UPLOADER_CONTAINER_CLASS_NAME,CANVAS_VIDEO_PREVIEW_CLASS_NAME:a.CANVAS_VIDEO_PREVIEW_CLASS_NAME,TORCH_SWITCH_CONTROL_CLASS_NAME:a.TORCH_SWITCH_CONTROL_CLASS_NAME,CAMERA_SWITCH_CONTROL_CLASS_NAME:a.CAMERA_SWITCH_CONTROL_CLASS_NAME,CAMERA_FOV_SWITCH_CONTROL_CLASS_NAME:a.CAMERA_FOV_SWITCH_CONTROL_CLASS_NAME,SHUTTER_BUTTON_CONTROL_CLASS_NAME:a.SHUTTER_BUTTON_CONTROL_CLASS_NAME,FROZEN_FRAME:a.FROZEN_FRAME};
|
|
4
|
-
|
|
5
|
-
export { S as a };
|
|
1
|
+
import {a}from'./chunk-JKL2W65E.js';var S={CONTAINER_CLASS_NAME:a.CONTAINER_CLASS_NAME,PAINTBOARD_CLASS_NAME:a.PAINTBOARD_CLASS_NAME,PAINTBOARD_CLASS_NAME_STATE_ON:a.PAINTBOARD_CLASS_NAME_STATE_ON,CONTROLS_CLASS_NAME:a.CONTROLS_CLASS_NAME,CONTROL_WIDGET_CLASS_NAME:a.CONTROL_WIDGET_CLASS_NAME,MIRRORED_CLASS_NAME:a.MIRRORED_CLASS_NAME,CAMERA_RECOVERY_CLASS_NAME:a.CAMERA_RECOVERY_CLASS_NAME,ERROR_CLASS_NAME:a.ERROR_CLASS_NAME,HINT_CONTAINER_CLASS_NAME:a.HINT_CONTAINER_CLASS_NAME,HINT_CLASS_NAME:a.HINT_CLASS_NAME,PAINTBOARDS_CONTAINER_CLASS_NAME:a.PAINTBOARDS_CONTAINER_CLASS_NAME,SINGLE_IMAGE_UPLOADER_CONTAINER_CLASS_NAME:a.SINGLE_IMAGE_UPLOADER_CONTAINER_CLASS_NAME,CANVAS_VIDEO_PREVIEW_CLASS_NAME:a.CANVAS_VIDEO_PREVIEW_CLASS_NAME,TORCH_SWITCH_CONTROL_CLASS_NAME:a.TORCH_SWITCH_CONTROL_CLASS_NAME,CAMERA_SWITCH_CONTROL_CLASS_NAME:a.CAMERA_SWITCH_CONTROL_CLASS_NAME,CAMERA_FOV_SWITCH_CONTROL_CLASS_NAME:a.CAMERA_FOV_SWITCH_CONTROL_CLASS_NAME,SHUTTER_BUTTON_CONTROL_CLASS_NAME:a.SHUTTER_BUTTON_CONTROL_CLASS_NAME,FROZEN_FRAME:a.FROZEN_FRAME};export{S as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {d}from'./chunk-CAIEX6BZ.js';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}}};export{u as a,c as b,m as c,p as d,g as e,f,i as g};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {d}from'./chunk-CAIEX6BZ.js';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()}}};export{r as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-KJS3Z56B.js';var t=new a(globalThis,{get:()=>globalThis.Module,set:e=>{globalThis.Module=e;}});function l(e){}export{t as a,l as b};
|
|
@@ -1,3 +1 @@
|
|
|
1
|
-
var t=class t{constructor(i,e){this._running=!1;this.duration=i>t.maxDurationAllowedByJSEngines?t.maxDurationAllowedByJSEngines:i,this.callback=e;}get running(){return this._running}start(){this.stop(),this.timeout=setTimeout(()=>{this.callback(),this.stop();},this.duration),this._running=!0;}stop(){clearTimeout(this.timeout),this._running=!1;}};t.maxDurationAllowedByJSEngines=2147483647;var n=t;
|
|
2
|
-
|
|
3
|
-
export { n as a };
|
|
1
|
+
var t=class t{constructor(i,e){this._running=!1;this.duration=i>t.maxDurationAllowedByJSEngines?t.maxDurationAllowedByJSEngines:i,this.callback=e;}get running(){return this._running}start(){this.stop(),this.timeout=setTimeout(()=>{this.callback(),this.stop();},this.duration),this._running=!0;}stop(){clearTimeout(this.timeout),this._running=!1;}};t.maxDurationAllowedByJSEngines=2147483647;var n=t;export{n as a};
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a } from './chunk-QCZSSQAQ.js';
|
|
3
|
-
|
|
4
|
-
var s=class i{constructor(){this.type="imageFrameSource";this._listeners=new Set;this._currentState="off";this._desiredState="off";this._context=null;this._imageData=null;}get desiredState(){return this._desiredState}get context(){return this._context}set context(e){this._context=e;}get currentState(){return this._currentState}static async fromFile(e){let t=URL.createObjectURL(e),r=new Image;r.src=t;try{await r.decode();}catch(a$1){throw new a({name:"InvalidImageError",message:"Submitted file is not an image"})}finally{URL.revokeObjectURL(t);}return i.fromImage(r)}static async fromImage(e){let t=new i;try{await e.decode();}catch(a$1){throw new a({name:"InvalidImageError",message:"Submitted image cannot be decoded"})}let r=t.getCanvasAndContext(e.width,e.height);return r.drawImage(e,0,0),t._imageData=r.getImageData(0,0,e.width,e.height,{colorSpace:"srgb"}),t}static async fromImageData(e){let t=new i,r=t.getCanvasAndContext(e.width,e.height);try{r.putImageData(e,0,0);}catch(a$1){throw new a({name:"InvalidImageError",message:`Submitted image data does not seem valid (details: ${a$1})`})}return t._imageData=e,t}async switchToDesiredState(e){if(e==="on"){if(this.currentState==="on")return}else if(this.currentState==="off")return;return this._desiredState=e,this._imageData==null?(a$1.log(a$1.Level.Warn,"No image data to process."),this.processSubmittedImage({data:new Uint8ClampedArray(0),width:0,height:0,colorSpace:"srgb"})):this.processSubmittedImage(this._imageData)}addListener(e){e!=null&&this._listeners.add(e);}removeListener(e){e!=null&&this._listeners.delete(e);}toJSONObject(){return {type:this.type}}getCurrentState(){return this._currentState}getCanvasAndContext(e,t){let r=document.createElement("canvas");r.width=e,r.height=t;let a$1=r.getContext("2d");if(a$1==null)throw new a({name:"ImageFrameSourceError",message:"Could not generate a canvas context to get image data"});return a$1}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 processSubmittedImage(e){var t;await this.setCurrentState("on"),await((t=this._context)==null?void 0:t.sendFrameToProcessor(e)),await this.setCurrentState("off");}};
|
|
5
|
-
|
|
6
|
-
export { s as a };
|
|
1
|
+
import {a as a$1}from'./chunk-XR65N6EG.js';import {a}from'./chunk-QCZSSQAQ.js';var s=class i{constructor(){this.type="imageFrameSource";this._listeners=new Set;this._currentState="off";this._desiredState="off";this._context=null;this._imageData=null;}get desiredState(){return this._desiredState}get context(){return this._context}set context(e){this._context=e;}get currentState(){return this._currentState}static async fromFile(e){let t=URL.createObjectURL(e),r=new Image;r.src=t;try{await r.decode();}catch(a$1){throw new a({name:"InvalidImageError",message:"Submitted file is not an image"})}finally{URL.revokeObjectURL(t);}return i.fromImage(r)}static async fromImage(e){let t=new i;try{await e.decode();}catch(a$1){throw new a({name:"InvalidImageError",message:"Submitted image cannot be decoded"})}let r=t.getCanvasAndContext(e.width,e.height);return r.drawImage(e,0,0),t._imageData=r.getImageData(0,0,e.width,e.height,{colorSpace:"srgb"}),t}static async fromImageData(e){let t=new i,r=t.getCanvasAndContext(e.width,e.height);try{r.putImageData(e,0,0);}catch(a$1){throw new a({name:"InvalidImageError",message:`Submitted image data does not seem valid (details: ${a$1})`})}return t._imageData=e,t}async switchToDesiredState(e){if(e==="on"){if(this.currentState==="on")return}else if(this.currentState==="off")return;return this._desiredState=e,this._imageData==null?(a$1.log(a$1.Level.Warn,"No image data to process."),this.processSubmittedImage({data:new Uint8ClampedArray(0),width:0,height:0,colorSpace:"srgb"})):this.processSubmittedImage(this._imageData)}addListener(e){e!=null&&this._listeners.add(e);}removeListener(e){e!=null&&this._listeners.delete(e);}toJSONObject(){return {type:this.type}}getCurrentState(){return this._currentState}getCanvasAndContext(e,t){let r=document.createElement("canvas");r.width=e,r.height=t;let a$1=r.getContext("2d");if(a$1==null)throw new a({name:"ImageFrameSourceError",message:"Could not generate a canvas context to get image data"});return a$1}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 processSubmittedImage(e){var t;await this.setCurrentState("on"),await((t=this._context)==null?void 0:t.sendFrameToProcessor(e)),await this.setCurrentState("off");}};export{s as a};
|
|
@@ -1,5 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
var l=(e=>(e.Nonzero="nonzero",e.Evenodd="evenodd",e))(l||{}),c=class{constructor(){this.pathWinding="nonzero";}drawSingleCommand(t,e){switch(t){case 0:{this.addLine(e);break}case 1:{this.addArc(e);break}case 2:{this.addCircle(e);break}case 3:{this.addRectangle(e);break}case 4:{this.addRoundedRectangle(e);break}case 5:{this.beginPath(e);break}case 6:{this.closePath(e);break}case 7:{this.fill(e);break}case 8:{this.stroke(e);break}case 10:{this.setStrokeWidth(e);break}case 11:{this.setFillColor(e);break}case 12:{this.setStrokeColor(e);break}case 13:{this.moveTo(e);break}case 14:{this.lineTo(e);break}case 15:{this.saveState(e);break}case 16:{this.restoreState(e);break}case 17:{this.translate(e);break}case 19:{this.bezierTo(e);break}case 20:{this.transform(e);break}case 21:{this.scale(e);break}case 22:{this.addPathWinding(e);break}case 9:case 18:break;default:{b(t);break}}}beginPath(t){this.context.beginPath();}closePath(t){this.context.closePath();}setStrokeColor(t){let e=t.extractColor();this.context.strokeStyle=this.colorToRgbaString(e);}setFillColor(t){let e=t.extractColor();this.context.fillStyle=this.colorToRgbaString(e);}fill(t){this.context.fill(this.pathWinding);}stroke(t){this.context.stroke();}addLine(t){let e=t.extractFloat(),a=t.extractFloat();this.context.moveTo(e,a);let o=t.extractFloat(),r=t.extractFloat();this.context.lineTo(o,r);}lineTo(t){let e=t.extractFloat(),a=t.extractFloat();this.context.lineTo(e,a);}moveTo(t){let e=t.extractFloat(),a=t.extractFloat();this.context.moveTo(e,a);}addRectangle(t){let e=t.extractFloat(),a=t.extractFloat(),o=t.extractFloat(),r=t.extractFloat();this.context.rect(e,a,o,r);}addRoundedRectangle(t){let e=t.extractFloat(),a=t.extractFloat(),o=t.extractFloat(),r=t.extractFloat(),i=t.extractFloat();this.context.moveTo(e+i,a),this.context.lineTo(e+o-i,a),this.context.quadraticCurveTo(e+o,a,e+o,a+i),this.context.lineTo(e+o,a+r-i),this.context.quadraticCurveTo(e+o,a+r,e+o-i,a+r),this.context.lineTo(e+i,a+r),this.context.quadraticCurveTo(e,a+r,e,a+r-i),this.context.lineTo(e,a+i),this.context.quadraticCurveTo(e,a,e+i,a),this.context.closePath();}setStrokeWidth(t){this.context.lineWidth=t.extractFloat();}addArc(t){let e=t.extractFloat(),a=t.extractFloat(),o=t.extractFloat(),r=t.extractFloat(),i=t.extractFloat(),s=t.extractBoolean();this.context.arc(e,a,o,r,i,s);}addCircle(t){let e=t.extractFloat(),a=t.extractFloat(),o=t.extractFloat();this.context.arc(e,a,o,0,Math.PI*2);}bezierTo(t){let e=t.extractFloat(),a=t.extractFloat(),o=t.extractFloat(),r=t.extractFloat(),i=t.extractFloat(),s=t.extractFloat();this.context.bezierCurveTo(e,a,o,r,i,s);}saveState(t){this.context.save();}restoreState(t){this.context.restore();}translate(t){let e=t.extractFloat(),a=t.extractFloat();this.context.translate(e,a);}transform(t){let e=t.extractFloat(),a=t.extractFloat(),o=t.extractFloat(),r=t.extractFloat(),i=t.extractFloat(),s=t.extractFloat();this.context.transform(e,a,o,r,i,s);}scale(t){let e=t.extractFloat();this.context.scale(e,e);}addPathWinding(t){let e=t.extractBoolean();this.pathWinding=e?"nonzero":"evenodd";}colorToRgbaString(t){return `rgba(${t.r},${t.g},${t.b},${t.a})`}};
|
|
4
|
-
|
|
5
|
-
export { l as a, c as b };
|
|
1
|
+
import {b}from'./chunk-FTD535WI.js';var l=(e=>(e.Nonzero="nonzero",e.Evenodd="evenodd",e))(l||{}),c=class{constructor(){this.pathWinding="nonzero";}drawSingleCommand(t,e){switch(t){case 0:{this.addLine(e);break}case 1:{this.addArc(e);break}case 2:{this.addCircle(e);break}case 3:{this.addRectangle(e);break}case 4:{this.addRoundedRectangle(e);break}case 5:{this.beginPath(e);break}case 6:{this.closePath(e);break}case 7:{this.fill(e);break}case 8:{this.stroke(e);break}case 10:{this.setStrokeWidth(e);break}case 11:{this.setFillColor(e);break}case 12:{this.setStrokeColor(e);break}case 13:{this.moveTo(e);break}case 14:{this.lineTo(e);break}case 15:{this.saveState(e);break}case 16:{this.restoreState(e);break}case 17:{this.translate(e);break}case 19:{this.bezierTo(e);break}case 20:{this.transform(e);break}case 21:{this.scale(e);break}case 22:{this.addPathWinding(e);break}case 9:case 18:break;default:{b(t);break}}}beginPath(t){this.context.beginPath();}closePath(t){this.context.closePath();}setStrokeColor(t){let e=t.extractColor();this.context.strokeStyle=this.colorToRgbaString(e);}setFillColor(t){let e=t.extractColor();this.context.fillStyle=this.colorToRgbaString(e);}fill(t){this.context.fill(this.pathWinding);}stroke(t){this.context.stroke();}addLine(t){let e=t.extractFloat(),a=t.extractFloat();this.context.moveTo(e,a);let o=t.extractFloat(),r=t.extractFloat();this.context.lineTo(o,r);}lineTo(t){let e=t.extractFloat(),a=t.extractFloat();this.context.lineTo(e,a);}moveTo(t){let e=t.extractFloat(),a=t.extractFloat();this.context.moveTo(e,a);}addRectangle(t){let e=t.extractFloat(),a=t.extractFloat(),o=t.extractFloat(),r=t.extractFloat();this.context.rect(e,a,o,r);}addRoundedRectangle(t){let e=t.extractFloat(),a=t.extractFloat(),o=t.extractFloat(),r=t.extractFloat(),i=t.extractFloat();this.context.moveTo(e+i,a),this.context.lineTo(e+o-i,a),this.context.quadraticCurveTo(e+o,a,e+o,a+i),this.context.lineTo(e+o,a+r-i),this.context.quadraticCurveTo(e+o,a+r,e+o-i,a+r),this.context.lineTo(e+i,a+r),this.context.quadraticCurveTo(e,a+r,e,a+r-i),this.context.lineTo(e,a+i),this.context.quadraticCurveTo(e,a,e+i,a),this.context.closePath();}setStrokeWidth(t){this.context.lineWidth=t.extractFloat();}addArc(t){let e=t.extractFloat(),a=t.extractFloat(),o=t.extractFloat(),r=t.extractFloat(),i=t.extractFloat(),s=t.extractBoolean();this.context.arc(e,a,o,r,i,s);}addCircle(t){let e=t.extractFloat(),a=t.extractFloat(),o=t.extractFloat();this.context.arc(e,a,o,0,Math.PI*2);}bezierTo(t){let e=t.extractFloat(),a=t.extractFloat(),o=t.extractFloat(),r=t.extractFloat(),i=t.extractFloat(),s=t.extractFloat();this.context.bezierCurveTo(e,a,o,r,i,s);}saveState(t){this.context.save();}restoreState(t){this.context.restore();}translate(t){let e=t.extractFloat(),a=t.extractFloat();this.context.translate(e,a);}transform(t){let e=t.extractFloat(),a=t.extractFloat(),o=t.extractFloat(),r=t.extractFloat(),i=t.extractFloat(),s=t.extractFloat();this.context.transform(e,a,o,r,i,s);}scale(t){let e=t.extractFloat();this.context.scale(e,e);}addPathWinding(t){let e=t.extractBoolean();this.pathWinding=e?"nonzero":"evenodd";}colorToRgbaString(t){return `rgba(${t.r},${t.g},${t.b},${t.a})`}};export{l as a,c as b};
|
|
@@ -1,3 +1 @@
|
|
|
1
|
-
function o(n){return typeof n=="object"&&n!=null&&n.document==null&&"addEventListener"in n&&typeof n.importScripts=="function"}
|
|
2
|
-
|
|
3
|
-
export { o as a };
|
|
1
|
+
function o(n){return typeof n=="object"&&n!=null&&n.document==null&&"addEventListener"in n&&typeof n.importScripts=="function"}export{o as a};
|
|
@@ -1,3 +1 @@
|
|
|
1
|
-
var t=class r extends Error{constructor(e){super(e.message),Object.setPrototypeOf(this,r.prototype),this.name=e.name;}toString(){return `${this.name}: ${this.message}`}};
|
|
2
|
-
|
|
3
|
-
export { t as a };
|
|
1
|
+
var t=class r extends Error{constructor(e){super(e.message),Object.setPrototypeOf(this,r.prototype),this.name=e.name;}toString(){return `${this.name}: ${this.message}`}};export{t as a};
|
|
@@ -1,3 +1 @@
|
|
|
1
|
-
var r=class{constructor(e){this.items=[];if(e.lowWaterMark>=e.capacity)throw new Error("Invalid Watermark options: lowWaterMark must be less than capacity");this.capacity=e.capacity,this.lowWaterMark=e.lowWaterMark,this.createItem=e.createItem;for(let t=0;t<this.capacity;t++)this.items.push(this.createItem());}get length(){return this.items.length}pop(){for(;this.isBelowOrEqualWaterMark();)this.items.unshift(this.createItem());return this.items.pop()}push(e){if(this.items.length<this.capacity)return this.items.push(e)}empty(){this.items.length=0;}isBelowOrEqualWaterMark(){return this.items.length<=this.lowWaterMark}};
|
|
2
|
-
|
|
3
|
-
export { r as a };
|
|
1
|
+
var r=class{constructor(e){this.items=[];if(e.lowWaterMark>=e.capacity)throw new Error("Invalid Watermark options: lowWaterMark must be less than capacity");this.capacity=e.capacity,this.lowWaterMark=e.lowWaterMark,this.createItem=e.createItem;for(let t=0;t<this.capacity;t++)this.items.push(this.createItem());}get length(){return this.items.length}pop(){for(;this.isBelowOrEqualWaterMark();)this.items.unshift(this.createItem());return this.items.pop()}push(e){if(this.items.length<this.capacity)return this.items.push(e)}empty(){this.items.length=0;}isBelowOrEqualWaterMark(){return this.items.length<=this.lowWaterMark}};export{r as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a as a$1}from'./chunk-GSJH2EXJ.js';import {a}from'./chunk-JO2MKLMM.js';var o=class r{constructor(i,e){this._vibration=null;this._sound=null;this._vibration=i,this._sound=e;}static get defaultFeedback(){return new r(a.defaultVibration,a$1.defaultSound)}get vibration(){return this._vibration}get sound(){return this._sound}emit(){this.sound&&this.sound.play(),this.vibration&&this.vibration.vibrate();}toJSONObject(){let i={};return this.sound!==null&&(i.sound=this.sound.toJSONObject()),this.vibration!==null&&(i.vibration=this.vibration.toJSONObject()),i}};export{o as a};
|
|
@@ -1,3 +1 @@
|
|
|
1
|
-
function r(t,n=300){let e=null;return function(...u){e!=null&&clearTimeout(e),e=setTimeout(()=>{t.apply(this,u),e=null;},n);}}
|
|
2
|
-
|
|
3
|
-
export { r as a };
|
|
1
|
+
function r(t,n=300){let e=null;return function(...u){e!=null&&clearTimeout(e),e=setTimeout(()=>{t.apply(this,u),e=null;},n);}}export{r as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a as a$1}from'./chunk-IGJQFAQU.js';import {a}from'./chunk-EP3GI7KA.js';import {a as a$2}from'./chunk-LDJ53PEJ.js';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);}};export{v as a};
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
function p(t,e=location){return t+=t.endsWith("/")?"":"/",/^https?:\/\//.test(t)?t:(t=t.split("/").filter(n=>n.length>0).join("/"),t=t===""?"/":`/${t}/`,e.protocol==="file:"||e.origin==="null"?`${e.href.split("/").slice(0,-1).join("/")}${t}`:`${e.origin}${t}`)}function c(t){return /^https?:\/\/(?:[^./]*\.)*cdn.jsdelivr.net\//.test(t)?{result:!0,cdnBaseURL:"https://cdn.jsdelivr.net/npm/"}:/^https?:\/\/(?:[^./]*\.)*unpkg.com\//.test(t)?{result:!0,cdnBaseURL:"https://unpkg.com/"}:{result:!1,cdnBaseURL:""}}function l(t){let n=/@scandit\/web-datacapture-[a-z]+/i.exec(t);return n?n[0]:null}function $(t,e,n){let s=e,i=c(s);if(i.result){let u=l(s);u!=null&&(s=`${i.cdnBaseURL}${u}@${t}/sdc-lib/`);}let r=n.replace(".wasm","");return i.result?{jsURI:`${s}${r}.js`,wasmURI:`${s}${r}.wasm`}:{jsURI:`${s}${r}.js?v=${t}`,wasmURI:`${s}${r}.wasm?v=${t}`}}
|
|
2
|
-
|
|
3
|
-
export { p as a, c as b, l as c, $ as d };
|
|
2
|
+
export{p as a,c as b,l as c,$ as d};
|
|
@@ -1,5 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
function d(r,o,t){let e=r.createProgram();if(!e)throw new Error("Cannot create webgl program");return r.attachShader(e,o),r.attachShader(e,t),r.linkProgram(e),r.getProgramParameter(e,r.LINK_STATUS)?e:(a.log(a.Level.Error,"Program linking error:",r.getProgramInfoLog(e)),r.deleteProgram(e),null)}function h(r,o,t){let e=r.createShader(o);if(!e)throw new Error("Cannot create a shader");return r.shaderSource(e,t),r.compileShader(e),r.getShaderParameter(e,r.COMPILE_STATUS)?e:(a.log(a.Level.Error,"Shader compilation error:",r.getShaderInfoLog(e)),r.deleteShader(e),null)}
|
|
4
|
-
|
|
5
|
-
export { d as a, h as b };
|
|
1
|
+
import {a}from'./chunk-XR65N6EG.js';function d(r,o,t){let e=r.createProgram();if(!e)throw new Error("Cannot create webgl program");return r.attachShader(e,o),r.attachShader(e,t),r.linkProgram(e),r.getProgramParameter(e,r.LINK_STATUS)?e:(a.log(a.Level.Error,"Program linking error:",r.getProgramInfoLog(e)),r.deleteProgram(e),null)}function h(r,o,t){let e=r.createShader(o);if(!e)throw new Error("Cannot create a shader");return r.shaderSource(e,t),r.compileShader(e),r.getShaderParameter(e,r.COMPILE_STATUS)?e:(a.log(a.Level.Error,"Shader compilation error:",r.getShaderInfoLog(e)),r.deleteShader(e),null)}export{d as a,h as b};
|
|
@@ -1,13 +1 @@
|
|
|
1
|
-
import { a as a$1 } from './chunk-R6E4CT22.js';
|
|
2
|
-
import { a as a$5 } from './chunk-TCJPGGHY.js';
|
|
3
|
-
import { b as b$1 } from './chunk-ULRY4SXF.js';
|
|
4
|
-
import { b } from './chunk-FTD535WI.js';
|
|
5
|
-
import { a } from './chunk-JKL2W65E.js';
|
|
6
|
-
import { d } from './chunk-BIGR7VVJ.js';
|
|
7
|
-
import { a as a$3 } from './chunk-XR65N6EG.js';
|
|
8
|
-
import { a as a$4 } from './chunk-QCZSSQAQ.js';
|
|
9
|
-
import { a as a$2 } from './chunk-MU4VAJIM.js';
|
|
10
|
-
|
|
11
|
-
var w=(r=>(r.CONTINUOUS="continuous",r.MANUAL="manual",r.NONE="none",r.SINGLE_SHOT="single-shot",r))(w||{}),R=(s=>(s[s.ULTRA_HD=0]="ULTRA_HD",s[s.FULL_HD=1]="FULL_HD",s[s.HD=2]="HD",s[s.SD=3]="SD",s[s.NONE=4]="NONE",s))(R||{}),L=(t=>(t.CAMERA_PROPERTIES="cameraProperties",t.CAMERA_ACCESS_ERROR="cameraAccessError",t))(L||{}),n=class n{constructor(){this.checkCameraVideoStreamAccessIfVisibleListener=this.checkCameraVideoStreamAccessIfVisible.bind(this);this.handleWebGLContextLostListener=this.handleWebGLContextLost.bind(this);this.listeners=new Map;this.mirrorImageOverrides=new Map;this.postStreamInitializationListener=this.postStreamInitialization.bind(this);this.triggerManualFocusListener=this.triggerManualFocus.bind(this);this.triggerZoomMoveListener=this.triggerZoomMove.bind(this);this.triggerZoomStartListener=this.triggerZoomStart.bind(this);this.videoResizeListener=a$1(this.handleVideoResize.bind(this),500);this.videoTrackEndedListener=this.videoTrackEndedRecovery.bind(this);this.videoTrackMuteListener=this.videoTrackMuteRecovery.bind(this);this._synchronousFrameHandling=!1;this._glFrameReaders={GRAYSCALE:null,RGBA:null};this._frameReaderType="RGBA";this.cameraPosition="worldFacing",this.gui={isCameraRecoveryVisible:()=>!1,setCameraRecoveryVisible:()=>{}},this.isWebGLSupported=!a$2.checkBrowserCompatibility().missingFeatures.includes("webGL"),this.videoElement=document.createElement("video"),this.canvas=document.createElement("canvas"),this.canvas.addEventListener("webglcontextlost",this.handleWebGLContextLostListener);}get mediaStream(){return this._mediaStream}set mediaStream(e){this._mediaStream=e,e&&(this.mediaTrackCapabilitiesPromise=new Promise(t=>{this.mediaTrackCapabilitiesPromiseResolver=t;}));}get synchronousFrameHandling(){return this._synchronousFrameHandling}get canvas2dContext(){return this._canvas2dContext||(this._canvas2dContext=this.canvas.getContext("2d",{willReadFrequently:!0}),this._canvas2dContext==null&&a$3.log(a$3.Level.Warn,"Unable to get 2d canvas context"),this.handleVideoResize()),this._canvas2dContext}get canvasWebGLContext(){var e;if(!this._canvas2dContext&&!this._canvasWebGLContext){if(!this.isWebGLSupported){a$3.log(a$3.Level.Warn,"WebGL context not supported, falling back to 2d canvas context. This may impact the scanning performance.");return}let t=(e=this.canvas.getContext("webgl",{alpha:!1,antialias:!1}))!=null?e:this.canvas.getContext("experimental-webgl",{alpha:!1,antialias:!1});t!=null&&(this._canvasWebGLContext=t,this.handleVideoResize());}return this._canvasWebGLContext}static instance(){return n._instance==null&&(n._instance=new n),n._instance}recycle(e){var t;(t=this.getFrameReader())==null||t.recycle(e);}getCurrentFrame(){var e;return (e=this._glFrameReaders.RGBA)==null?void 0:e.readFromSource(this.videoElement)}requestVideoFrame(e){return "requestVideoFrameCallback"in HTMLVideoElement.prototype?this.videoElement.requestVideoFrameCallback(e):requestAnimationFrame(e)}cancelVideoFrame(e){if("cancelVideoFrameCallback"in HTMLVideoElement.prototype){this.videoElement.cancelVideoFrameCallback(e);return}cancelAnimationFrame(e);}addListener(e,t){var r;let i=(r=this.listeners.get(e))!=null?r:[];i.includes(t)||this.listeners.set(e,[...i,t]);}async applyCameraSettings(e){if(this.selectedCameraSettings=e,this.activeCamera==null)throw new a$4(n.noCameraErrorParameters);return this.initializeCameraWithSettings(this.activeCamera,e)}captureImage(){var e;if(((e=this.mediaStream)==null?void 0:e.active)!=null){if(this.canvasWebGLContext!=null)return this.captureImageForWebGLContext();if(this.canvas2dContext!=null)return this.captureImageFor2dContext()}return null}async initializeCameraWithSettings(e,t){if(this.cameraInitializationPromise&&await this.cameraInitializationPromise,e==null)throw new a$4(n.noCameraErrorParameters);return this.setSelectedCamera(e),this.selectedCameraSettings=t,this.activeCameraSettings=t,this.cameraInitializationPromise=this.initializeCameraAndCheckUpdatedSettings(e),this.cameraInitializationPromise}isMirrorImageEnabled(){if(this.selectedCamera&&this.activeCamera){let e=this.mirrorImageOverrides.get(this.activeCamera);return e!=null?e:this.activeCamera.position==="userFacing"}return !1}isPinchToZoomEnabled(){return this.pinchToZoomEnabled}isTapToFocusEnabled(){return this.tapToFocusEnabled}async isTorchAvailable(){var e;return this.mediaStream?(await this.waitForCapabilities(),((e=this.mediaTrackCapabilities)==null?void 0:e.torch)===!0):!1}async playVideo(){return new Promise(e=>{this._canvas2dContext&&this._canvas2dContext.clearRect(0,0,this.canvas.width,this.canvas.height);let t=this.videoElement.play();t==null?e():t.then(e).catch(()=>{e();});})}async reinitializeCamera(){if(this.activeCamera==null)a$3.log(a$3.Level.Debug,"Camera reinitialization delayed");else {a$3.log(a$3.Level.Debug,"Reinitialize camera:",this.activeCamera);try{let e=this.activeCamera;await this.stopStream(),await this.initializeCameraWithSettings(e,this.activeCameraSettings);}catch(e){throw a$3.log(a$3.Level.Warn,"Couldn't access camera:",this.activeCamera,e),this.emit("cameraAccessError",e),e}}}removeListener(e,t){var s;let r=((s=this.listeners.get(e))!=null?s:[]).filter(o=>o!==t);this.listeners.set(e,r);}async setCameraPosition(e){var i;this.setInitialCameraPosition(e);let t=d.getMainCameraForPosition(await d.getCameras(),e);if(t&&t.deviceId!==((i=this.selectedCamera)==null?void 0:i.deviceId))return this.initializeCameraWithSettings(t,this.selectedCameraSettings)}async setExposure(e){var r,s,o,m,d,l,v,p;let t=(s=(r=this.mediaStream)==null?void 0:r.getVideoTracks())!=null?s:[];if(t.length===0||typeof t[0].applyConstraints!="function")return;await this.waitForCapabilities();let i=e.time!=null&&e.time>0?"manual":"continuous";if(((m=(o=this.mediaTrackCapabilities)==null?void 0:o.exposureMode)==null?void 0:m.includes(i))===!0){if(await t[0].applyConstraints({advanced:[{exposureMode:i}]}),e.time!=null&&e.time>0&&this.mediaTrackCapabilities.exposureTime){let u=Math.max((d=this.mediaTrackCapabilities.exposureTime.min)!=null?d:.01,Math.min(e.time,(l=this.mediaTrackCapabilities.exposureTime.max)!=null?l:1e5));await t[0].applyConstraints({advanced:[{exposureTime:u}]});}else if(e.compensation!=null&&i==="continuous"&&this.mediaTrackCapabilities.exposureCompensation){let u=Math.max((v=this.mediaTrackCapabilities.exposureCompensation.min)!=null?v:-10,Math.min(e.compensation,(p=this.mediaTrackCapabilities.exposureCompensation.max)!=null?p:10));await t[0].applyConstraints({advanced:[{exposureCompensation:u}]});}}}async setFocus(e){var i,r,s,o,m;if(!this.mediaStream)return;let t=this.mediaStream.getVideoTracks();if(t.length>0&&typeof t[0].applyConstraints=="function"){await this.waitForCapabilities();let d=e>=0?"manual":"continuous";if(((r=(i=this.mediaTrackCapabilities)==null?void 0:i.focusMode)==null?void 0:r.includes(d))===!0&&(await t[0].applyConstraints({advanced:[{focusMode:d}]}),d==="manual"&&this.mediaTrackCapabilities.focusDistance)){let l=Math.max(0,Math.min(e,1))*(((s=this.mediaTrackCapabilities.focusDistance.max)!=null?s:1e3)-((o=this.mediaTrackCapabilities.focusDistance.min)!=null?o:.01))+((m=this.mediaTrackCapabilities.focusDistance.min)!=null?m:.01);await t[0].applyConstraints({advanced:[{focusDistance:l}]});}}}async setFrameRate(e){var t,i,r;if(this.mediaStream&&(await this.waitForCapabilities(),(t=this.mediaTrackCapabilities)!=null&&t.frameRate)){let s=this.mediaStream.getVideoTracks();if(s.length>0&&typeof s[0].applyConstraints=="function"){let o=Math.min((i=this.mediaTrackCapabilities.frameRate.max)!=null?i:240,(r=e.max)!=null?r:240);await s[0].applyConstraints({advanced:[{frameRate:o}]});}}}setInitialCameraPosition(e){this.cameraPosition=e;}setInteractionOptions(e,t,i){this.torchToggleEnabled=e,this.tapToFocusEnabled=t,this.pinchToZoomEnabled=i;}setMirrorImageEnabled(e,t){this.selectedCamera&&(e?(this.videoElement.classList.add(n.MIRRORED_CLASS_NAME),this.canvas.classList.add(n.MIRRORED_CLASS_NAME)):(this.videoElement.classList.remove(n.MIRRORED_CLASS_NAME),this.canvas.classList.remove(n.MIRRORED_CLASS_NAME)),t&&this.mirrorImageOverrides.set(this.selectedCamera,e));}setPinchToZoomEnabled(e){this.pinchToZoomEnabled=e,this.mediaStream&&(this.pinchToZoomEnabled?this.enablePinchToZoomListeners():this.disablePinchToZoomListeners());}setSelectedCamera(e){this.selectedCamera=e;}setSelectedCameraSettings(e){this.selectedCameraSettings=e;}setTapToFocusEnabled(e){this.tapToFocusEnabled=e,this.mediaStream&&(this.tapToFocusEnabled?this.enableTapToFocusListeners():this.disableTapToFocusListeners());}async setTorchEnabled(e){var t;if(this.mediaStream&&((t=this.mediaTrackCapabilities)==null?void 0:t.torch)===!0){this.torchEnabled=e;let i=this.mediaStream.getVideoTracks();i.length>0&&typeof i[0].applyConstraints=="function"&&await i[0].applyConstraints({advanced:[{torch:e}]});}}async setZoom(e){var t,i,r;if(this.mediaStream&&(await this.waitForCapabilities(),(t=this.mediaTrackCapabilities)!=null&&t.zoom)){let s=this.mediaStream.getVideoTracks();if(s.length>0&&typeof s[0].applyConstraints=="function"){let o=Math.max((i=this.mediaTrackCapabilities.zoom.min)!=null?i:1,Math.min(e,(r=this.mediaTrackCapabilities.zoom.max)!=null?r:16));await s[0].applyConstraints({advanced:[{zoom:o}]});}}}async setupCameras(){return this.cameraSetupPromise?this.cameraSetupPromise:(this.cameraSetupPromise=this.setupCamerasAndStream(),this.cameraSetupPromise)}pauseStream(){if(!this.mediaStream)return;let e=this.mediaStream.getVideoTracks()[0];e.enabled=!1,a$3.log(a$3.Level.Debug,"Pause camera video stream",this.mediaStream);}resumeStream(){if(!this.mediaStream)return;let e=this.mediaStream.getVideoTracks()[0];e.enabled=!0,a$3.log(a$3.Level.Debug,"Resume camera video stream",this.mediaStream);}async stopStream(e=!1){this.activeCamera&&(this.activeCamera.currentResolution=void 0),this.activeCamera=void 0,this.torchEnabled=!1,this.mediaStream&&(a$3.log(a$3.Level.Debug,`Stop camera video stream access${e?" (abort access detection)":""}:`,this.mediaStream),document.removeEventListener("visibilitychange",this.checkCameraVideoStreamAccessIfVisibleListener),window.clearTimeout(this.cameraAccessTimeout),window.clearInterval(this.videoMetadataCheckInterval),window.clearTimeout(this.getCapabilitiesTimeout),window.clearTimeout(this.manualFocusWaitTimeout),window.clearTimeout(this.manualToAutofocusResumeTimeout),window.clearInterval(this.autofocusInterval),this.videoElement.pause(),await new Promise(t=>{setTimeout(()=>{var i,r,s;for(let o of (r=(i=this.mediaStream)==null?void 0:i.getVideoTracks())!=null?r:[])o.removeEventListener("ended",this.videoTrackEndedListener),o.stop();this.videoElement.srcObject=null,this._canvas2dContext&&this._canvas2dContext.clearRect(0,0,this.canvas.width,this.canvas.height),this.mediaStream=void 0,this.mediaTrackCapabilities=void 0,this.mediaTrackCapabilitiesPromise=void 0,this.mediaTrackCapabilitiesPromiseResolver=void 0,e||(s=this.abortedCameraInitializationResolveCallback)==null||s.call(this),t();},0);}));}stopVideoTracks(){if(this.mediaStream!=null)for(let e of this.mediaStream.getVideoTracks())e.stop();}async toggleTorch(){this.torchEnabled=!this.torchEnabled,await this.setTorchEnabled(this.torchEnabled);}updateCanvasVideoImage(){this.canvas2dContext.drawImage(this.videoElement,0,0);}async waitForCapabilities(){var e;return (e=this.mediaTrackCapabilitiesPromise)!=null?e:Promise.resolve()}setFrameReaderType(e){e!==this._frameReaderType&&(this._frameReaderType=e,a$3.log(a$3.Level.Debug,`Change frame reader type to ${this._frameReaderType} mode`));}async allowPictureInPicture(e){e?(this.videoElement.disablePictureInPicture=!1,this.videoElement.removeAttribute("controlslist"),this.videoElement.removeAttribute("disablepictureinpicture")):(this.videoElement.disablePictureInPicture=!0,this.videoElement.setAttribute("controlslist","nodownload"),this.videoElement.setAttribute("disablepictureinpicture","true")),await this.reinitializeCamera();}setFrameHandling(e){var t;this._synchronousFrameHandling=e,this._frameReaderOptions=this.getFrameReaderOptions(e),(t=this._glFrameReaders[this._frameReaderType])==null||t.dispose(),delete this._glFrameReaders[this._frameReaderType];}async accessAutoselectedCamera(e){let t=d.sortCamerasForCameraPosition(e,this.cameraPosition),i=t.shift();for(;i;)try{await this.initializeCameraWithSettings(i,this.selectedCameraSettings);return}catch(r){if(this.setSelectedCamera(),t.length>0){a$3.log(a$3.Level.Warn,"Couldn't access camera:",i,r),i=t.shift();continue}throw r}throw new a$4(n.noCameraErrorParameters)}getFrameReaderOptions(e){return e?{minPoolCapacity:0,maxPoolCapacity:1}:a$2.isDesktopDevice()?{maxPoolCapacity:2,minPoolCapacity:1}:{maxPoolCapacity:10,minPoolCapacity:3}}getFrameReader(){var t;if(this._glFrameReaders[this._frameReaderType])return this._glFrameReaders[this._frameReaderType];if(!this._canvasWebGLContext)return null;let e=(t=this._frameReaderOptions)!=null?t:this.getFrameReaderOptions(this._synchronousFrameHandling);switch(this._frameReaderType){case"GRAYSCALE":{this._glFrameReaders.GRAYSCALE=new a$5(this._canvasWebGLContext,e),this._glFrameReaders.RGBA=new b$1(this._canvasWebGLContext,{minPoolCapacity:1,maxPoolCapacity:2});break}case"RGBA":{this._glFrameReaders.RGBA=new b$1(this._canvasWebGLContext,e);break}default:b(this._frameReaderType);}return a$3.debug(`Created frame reader ${this._frameReaderType}`,e),this._glFrameReaders[this._frameReaderType]}async accessInitialCamera(){let e={position:this.cameraPosition,deviceId:"",label:""};try{await this.initializeCameraWithSettings(e,this.selectedCameraSettings);}catch(t){}finally{this.setSelectedCamera();}return e}recreateCanvas(){this.canvas.removeEventListener("webglcontextlost",this.handleWebGLContextLostListener),this._canvasWebGLContext=void 0,this._canvas2dContext=void 0;for(let t of Object.values(this._glFrameReaders))t==null||t.dispose();let e=document.createElement("canvas");e.addEventListener("webglcontextlost",this.handleWebGLContextLostListener),e.width=this.canvas.width,e.height=this.canvas.height,e.className=this.canvas.className,this.canvas=e;}captureImageFor2dContext(){if(!this.isVideoAndContextStateValid())return null;let{width:e,height:t}=this.canvas;return {colorType:"RGBA",data:this.canvas2dContext.getImageData(0,0,e,t).data,width:e,height:t}}areVideoAndWebGLSizeMismatching(){return this.canvasWebGLContext?this.canvasWebGLContext.drawingBufferWidth!==this.videoElement.videoWidth||this.canvasWebGLContext.drawingBufferHeight!==this.videoElement.videoHeight:!0}captureImageForWebGLContext(){if(!this.isVideoAndContextStateValid()||!this.canvasWebGLContext||this.canvasWebGLContext.drawingBufferWidth<=2||this.canvasWebGLContext.drawingBufferHeight<=2||this.areVideoAndWebGLSizeMismatching()||this.getFrameReader()==null)return null;let e=this.getFrameReader().readFromSource(this.videoElement);if(e.data[3]!==255&&e.colorType==="RGBA"){if(a$3.log(a$3.Level.Warn,"Detected incorrect GPU accelerated WebGL image processing, switching to canvas mode"),this.recreateCanvas(),this.canvas2dContext==null)throw new Error("Unable to get 2d canvas context");return this.captureImage()}return e}async checkCameraAccess(e){return new Promise((t,i)=>{this.cameraAccessRejectCallback=r=>{a$3.log(a$3.Level.Debug,"Camera video stream access failure (video data load timeout):",e),this.gui.setCameraRecoveryVisible(!0),i(r);},this.setCameraAccessTimeout();})}checkCameraVideoStreamAccessIfVisible(){document.visibilityState==="visible"&&(a$3.log(a$3.Level.Debug,"Page is visible again, waiting for camera video stream start..."),document.removeEventListener("visibilitychange",this.checkCameraVideoStreamAccessIfVisibleListener),this.setCameraAccessTimeout());}async checkVideoMetadata(e){return new Promise((t,i)=>{this.videoElement.onloadeddata=()=>{if(this.videoElement.onloadeddata=null,window.clearTimeout(this.cameraAccessTimeout),this.videoElement.videoWidth>2&&this.videoElement.videoHeight>2&&this.videoElement.currentTime>0){this.updateActiveCameraCurrentResolution(e),a$3.log(a$3.Level.Debug,"Camera video stream access success:",e),t();return}let r=performance.now();window.clearInterval(this.videoMetadataCheckInterval),this.videoMetadataCheckInterval=window.setInterval(async()=>{if(this.videoElement.videoWidth<=2||this.videoElement.videoHeight<=2||this.videoElement.currentTime===0){if(performance.now()-r>n.videoMetadataCheckTimeoutMs){a$3.log(a$3.Level.Warn,"Camera video stream access failure (valid video metadata timeout):",e),window.clearInterval(this.videoMetadataCheckInterval),await this.stopStream(!0),i(new a$4(n.notReadableErrorParameters));return}return}window.clearInterval(this.videoMetadataCheckInterval),this.updateActiveCameraCurrentResolution(e),a$3.log(a$3.Level.Debug,"Camera video stream access success:",e),t();},n.videoMetadataCheckIntervalMs);};})}disablePinchToZoomListeners(){this.videoElement.removeEventListener("touchstart",this.triggerZoomStartListener),this.videoElement.removeEventListener("touchmove",this.triggerZoomMoveListener);}disableTapToFocusListeners(){for(let e of ["touchend","mousedown"])this.videoElement.removeEventListener(e,this.triggerManualFocusListener);}emit(e,t){var r;let i=(r=this.listeners.get(e))!=null?r:[];for(let s of i)s(t);}enablePinchToZoomListeners(){this.videoElement.addEventListener("touchstart",this.triggerZoomStartListener),this.videoElement.addEventListener("touchmove",this.triggerZoomMoveListener);}enableTapToFocusListeners(){for(let e of ["touchend","mousedown"])this.videoElement.addEventListener(e,this.triggerManualFocusListener);}getActiveCamera(e,t,i){return e.length===1?e[0]:e.find(r=>r.deviceId===i||r.label!==""&&r.label===t)}getInitialCameraResolutionConstraint(e){var i;let t;switch((i=this.activeCameraSettings)==null?void 0:i.preferredResolution){case"uhd4k":{t=0;break}case"fullHd":{t=1;break}case"hd":default:{t=2;break}}return t}async handleCameraInitializationError(e,t,i){if(!["OverconstrainedError","NotReadableError"].includes(i.name)||i.name==="NotReadableError"&&t===4)throw a$3.log(a$3.Level.Debug,"Camera video stream access failure (unrecoverable error)",e,i),i.name!=="NotAllowedError"&&d.markCameraAsInaccessible(e),i;if(i.name==="OverconstrainedError"&&t===4){if(e.deviceId==="")throw a$3.log(a$3.Level.Warn,"Camera video stream access failure (no camera with such type error)",e,i),i;a$3.log(a$3.Level.Warn,"Detected non-existent deviceId error, attempt to find and reaccess updated camera",e,i);let r=e.deviceId;if(await d.getCameras(!0),r===e.deviceId)throw a$3.log(a$3.Level.Warn,"Camera video stream access failure (updated camera not found after non-existent deviceId error)",e,i),d.markCameraAsInaccessible(e),i;return a$3.log(a$3.Level.Warn,"Updated camera found (recovered from non-existent deviceId error), attempt to access it",e),this.initializeCameraForResolution(e)}return this.initializeCameraForResolution(e,t+1)}handleVideoResize(){if(!(this.videoElement.videoWidth<=2||this.videoElement.videoHeight<=2)){if(this.activeCamera&&this.updateActiveCameraCurrentResolution(this.activeCamera),this.canvasWebGLContext!=null){if(this.canvas.width===this.videoElement.videoWidth&&this.canvas.height===this.videoElement.videoHeight)return;this.canvas.width=this.videoElement.videoWidth,this.canvas.height=this.videoElement.videoHeight,this.canvasWebGLContext.viewport(0,0,this.canvasWebGLContext.drawingBufferWidth,this.canvasWebGLContext.drawingBufferHeight);}else if(this.canvas2dContext!=null){if(this.canvas.width===this.videoElement.videoWidth&&this.canvas.height===this.videoElement.videoHeight)return;this.canvas.width=this.videoElement.videoWidth,this.canvas.height=this.videoElement.videoHeight;}}}handleWebGLContextLost(){a$3.log(a$3.Level.Warn,"WebGL context has been lost, restoring..."),this._canvasWebGLContext=void 0,this.canvasWebGLContext?(this.handleVideoResize(),a$3.log(a$3.Level.Warn,"WebGL context restored")):a$3.log(a$3.Level.Error,"WebGL context restore failed");}async initializeCameraAndCheckUpdatedSettings(e){var t,i,r,s,o;try{if(await this.initializeCameraForResolution(e),this.selectedCameraSettings!==this.activeCameraSettings&&(this.selectedCameraSettings==null||this.activeCameraSettings==null||Object.keys(this.selectedCameraSettings).some(u=>{var b,f;return ((b=this.selectedCameraSettings)==null?void 0:b[u])!==((f=this.activeCameraSettings)==null?void 0:f[u])}))){this.activeCameraSettings=this.selectedCameraSettings,await this.initializeCameraAndCheckUpdatedSettings(e);return}this.activeCameraSettings&&this.activeCameraSettings.zoomFactor>1&&await this.setZoom(this.activeCameraSettings.zoomFactor);let m=(t=this.activeCameraSettings)==null?void 0:t.getProperty("minFrameRate"),d=(i=this.activeCameraSettings)==null?void 0:i.getProperty("maxFrameRate");(m!=null||d!=null)&&await this.setFrameRate({min:m,max:d});let l=(r=this.activeCameraSettings)==null?void 0:r.getProperty("manualLensPosition");l!=null&&await this.setFocus(l);let v=(s=this.activeCameraSettings)==null?void 0:s.getProperty("exposureTargetBias"),p=(o=this.activeCameraSettings)==null?void 0:o.getProperty("exposureDuration");(v!=null||p!=null)&&await this.setExposure({compensation:v,time:p});}finally{this.cameraInitializationPromise=void 0;}}async initializeCameraForResolution(e,t){var r;this.gui.setCameraRecoveryVisible(!1);let i=t!=null?t:this.getInitialCameraResolutionConstraint(e);this.mediaStream!=null&&e.deviceId!==""&&((r=this.activeCamera)==null?void 0:r.deviceId)===e.deviceId?await(a$2.isIPhone()?this.initializeStreamForResolution(e,i):this.updateStreamForResolution(e,i)):await this.initializeStreamForResolution(e,i);}async initializeStreamForResolution(e,t){var i;await this.stopStream();try{let r=(i=this.activeCameraSettings)==null?void 0:i.getProperty("preferredAspectRatio"),s=await d.accessCameraStream(e,t,r);if(a$3.log(a$3.Level.Debug,"Camera accessed, waiting for camera video stream start..."),typeof s.getVideoTracks()[0].getSettings=="function"){let o=s.getVideoTracks()[0].getSettings();if(o.width!=null&&o.height!=null&&(o.width===2||o.height===2)){if(a$3.log(a$3.Level.Debug,"Camera video stream access failure (invalid video metadata):",e),t===4)throw new a$4(n.notReadableErrorParameters);return await this.stopStream(),this.initializeStreamForResolution(e,t+1)}}this.mediaStream=s;for(let o of this.mediaStream.getVideoTracks())o.addEventListener("ended",this.videoTrackEndedListener),o.addEventListener("mute",this.videoTrackMuteListener),o.addEventListener("unmute",this.videoTrackMuteListener);try{await this.setupCameraStreamVideo(e,s);}catch(o){if(t===4)throw o;return this.initializeStreamForResolution(e,t+1)}}catch(r){return this.handleCameraInitializationError(e,t,r)}}isVideoAndContextStateValid(){return this.videoElement.readyState===4&&this.videoElement.videoWidth>2&&this.videoElement.videoHeight>2&&this.canvas.width>2&&this.canvas.height>2}postStreamInitialization(){window.clearTimeout(this.getCapabilitiesTimeout),this.getCapabilitiesTimeout=window.setTimeout(()=>{this.storeStreamCapabilities(),this.setupAutofocus();},n.getCapabilitiesTimeoutMs);}async recoverStreamIfNeeded(){var t,i;let e=(t=this.mediaStream)==null?void 0:t.getVideoTracks();((i=e==null?void 0:e[0])==null?void 0:i.readyState)==="ended"&&await this.reinitializeCamera();}reportCameraProperties(e,t,i=!0){this.emit("cameraProperties",{deviceId:e,isFrontFacing:t==="userFacing",hasAutofocus:i});}setCameraAccessTimeout(){window.clearTimeout(this.cameraAccessTimeout),this.cameraAccessTimeout=window.setTimeout(async()=>{var e;document.visibilityState==="visible"?(await this.stopStream(!0),(e=this.cameraAccessRejectCallback)==null||e.call(this,new a$4(n.notReadableErrorParameters))):(a$3.log(a$3.Level.Debug,"Page is currently not visible, delay camera video stream access detection"),document.addEventListener("visibilitychange",this.checkCameraVideoStreamAccessIfVisibleListener));},n.cameraAccessTimeoutMs);}setupAutofocus(){if(window.clearTimeout(this.manualFocusWaitTimeout),window.clearTimeout(this.manualToAutofocusResumeTimeout),this.mediaStream&&this.mediaTrackCapabilities){let e=this.mediaTrackCapabilities.focusMode;Array.isArray(e)&&!e.includes("continuous")&&e.includes("single-shot")&&(window.clearInterval(this.autofocusInterval),this.autofocusInterval=window.setInterval(this.triggerAutoFocus.bind(this),n.autofocusIntervalMs));}}async setupCameraStreamVideo(e,t){this.videoElement.addEventListener("loadedmetadata",this.postStreamInitializationListener),this.videoElement.addEventListener("resize",this.videoResizeListener),this.tapToFocusEnabled&&this.enableTapToFocusListeners(),this.pinchToZoomEnabled&&this.enablePinchToZoomListeners();let i=Promise.race([this.checkCameraAccess(e),this.checkVideoMetadata(e),new Promise(r=>{this.abortedCameraInitializationResolveCallback=r;})]);return this.videoElement.srcObject=t,this.videoElement.load(),await this.playVideo(),this.handleVideoResize(),this.reportCameraProperties(e.deviceId,e.position),i}async setupCamerasAndStream(){var e,t;try{let i;this.selectedCamera==null&&(i=await this.accessInitialCamera());let r=await d.getCameras(!1,!0),s=(t=(e=this.mediaStream)==null?void 0:e.getVideoTracks()[0])==null?void 0:t.getSettings().deviceId;if(this.mediaStream&&i){let o=this.getActiveCamera(r,i.label,s);if(o){if(d.adjustCameraFromMediaStream(this.mediaStream,o),a$2.isDesktopDevice()&&(d.setMainCameraForPositionOverridesOnDesktop(this.cameraPosition,o),d.setMainCameraForPositionOverridesOnDesktop(o.position,o)),r.length===1||d.getMainCameraForPosition(r,this.cameraPosition)===o){a$3.log(a$3.Level.Debug,"Initial camera access was correct (main camera), keep camera:",o),this.setSelectedCamera(o),this.updateActiveCameraCurrentResolution(o),await this.recoverStreamIfNeeded();return}a$3.log(a$3.Level.Debug,"Initial camera access was incorrect (not main camera), change camera",{...i,deviceId:s});}else a$3.log(a$3.Level.Debug,"Initial camera access was incorrect (unknown camera), change camera",{...i,deviceId:s});}if(this.selectedCamera==null){await this.accessAutoselectedCamera(r);return}await this.initializeCameraWithSettings(this.selectedCamera,this.selectedCameraSettings);}finally{this.cameraSetupPromise=void 0;}}storeStreamCapabilities(){var e;if(this.mediaStream){let t=this.mediaStream.getVideoTracks();t.length>0&&typeof t[0].getCapabilities=="function"&&(this.mediaTrackCapabilities=t[0].getCapabilities()),this.mediaTrackCapabilitiesPromiseResolver&&this.mediaTrackCapabilitiesPromiseResolver();}this.activeCamera&&this.reportCameraProperties(this.activeCamera.deviceId,this.activeCamera.position,((e=this.mediaTrackCapabilities)==null?void 0:e.focusMode)==null||this.mediaTrackCapabilities.focusMode.includes("continuous"));}async triggerAutoFocus(){await this.triggerFocusMode("single-shot");}async triggerFocusMode(e){if(this.mediaStream){let t=this.mediaStream.getVideoTracks();if(t.length>0&&typeof t[0].applyConstraints=="function")try{await t[0].applyConstraints({advanced:[{focusMode:e}]});}catch(i){}}}async triggerManualFocus(e){if(e){if(e.preventDefault(),e.type==="touchend"&&e.touches.length>0)return;if(this.pinchToZoomDistance!=null){this.pinchToZoomDistance=void 0;return}}if(window.clearTimeout(this.manualFocusWaitTimeout),window.clearTimeout(this.manualToAutofocusResumeTimeout),!this.mediaStream||!this.mediaTrackCapabilities)return;let t=this.mediaTrackCapabilities.focusMode;Array.isArray(t)&&t.includes("single-shot")&&(t.includes("continuous")&&t.includes("manual")?await this.triggerManualFocusForContinuous():t.includes("continuous")||await this.triggerManualFocusForSingleShot());}async triggerManualFocusForContinuous(){var i;if(!this.mediaStream)return;this.manualToAutofocusResumeTimeout=window.setTimeout(async()=>{await this.triggerFocusMode("continuous");},n.manualToAutofocusResumeTimeoutMs);let e=!0,t=this.mediaStream.getVideoTracks();t.length>0&&typeof t[0].getConstraints=="function"&&(e=((i=t[0].getConstraints().advanced)==null?void 0:i.some(r=>r.focusMode==="manual"))===!0),e?(await this.triggerFocusMode("continuous"),this.manualFocusWaitTimeout=window.setTimeout(async()=>{await this.triggerFocusMode("manual");},n.manualFocusWaitTimeoutMs)):await this.triggerFocusMode("manual");}async triggerManualFocusForSingleShot(){window.clearInterval(this.autofocusInterval),this.manualToAutofocusResumeTimeout=window.setTimeout(()=>{this.autofocusInterval=window.setInterval(this.triggerAutoFocus.bind(this),n.autofocusIntervalMs);},n.manualToAutofocusResumeTimeoutMs);try{await this.triggerFocusMode("single-shot");}catch(e){}}async triggerZoomMove(e){this.pinchToZoomDistance==null||(e==null?void 0:e.touches.length)!==2||e.preventDefault();}triggerZoomStart(e){var r,s,o,m;if((e==null?void 0:e.touches.length)!==2||(e.preventDefault(),this.pinchToZoomDistance=Math.hypot((e.touches[1].screenX-e.touches[0].screenX)/screen.width,(e.touches[1].screenY-e.touches[0].screenY)/screen.height),!this.mediaStream||!((r=this.mediaTrackCapabilities)!=null&&r.zoom)))return;let t=this.mediaStream.getVideoTracks();if(t.length===0||typeof t[0].getConstraints!="function")return;this.pinchToZoomInitialZoom=(s=this.mediaTrackCapabilities.zoom.min)!=null?s:1;let i=t[0].getConstraints();if(i.advanced){let d=(o=i.advanced.find(l=>"zoom"in l))==null?void 0:o.zoom;d!=null&&(this.pinchToZoomInitialZoom=typeof d=="number"?d:(m=d.ideal)!=null?m:1);}}updateActiveCameraCurrentResolution(e){this.videoElement.videoWidth>2&&this.videoElement.videoHeight>2&&(e.currentResolution={width:this.videoElement.videoWidth,height:this.videoElement.videoHeight}),e.deviceId!==""&&(this.activeCamera=e,this.setMirrorImageEnabled(this.isMirrorImageEnabled(),!1));}async updateStreamForResolution(e,t){var i;if(this.mediaStream==null)await this.initializeCameraForResolution(e,t);else try{let r=(i=this.activeCameraSettings)==null?void 0:i.getProperty("preferredAspectRatio");a$3.log(a$3.Level.Debug,"Setting new resolution for active camera video stream..."),await this.mediaStream.getVideoTracks()[0].applyConstraints(d.getUserMediaVideoParameters(t,r)),await new Promise(o=>{this.videoElement.addEventListener("timeupdate",()=>{o();},{once:!0});});let s=this.mediaStream.getVideoTracks()[0].getSettings();a$3.log(a$3.Level.Debug,"New active camera video stream resolution set",{width:s.width,height:s.height});}catch(r){if(t===4)throw r;await this.updateStreamForResolution(e,t+1);}}async videoTrackEndedRecovery(){if(document.visibilityState==="visible")try{a$3.log(a$3.Level.Debug,'Detected video track "ended" event, try to reinitialize camera'),await this.reinitializeCamera();}catch(e){}else a$3.log(a$3.Level.Debug,"Page is currently not visible, delay camera reinitialization until visible"),document.addEventListener("visibilitychange",this.checkCameraVideoStreamAccessIfVisibleListener);}videoTrackMuteRecovery(e){if(this.videoElement.onloadeddata!=null){a$3.log(a$3.Level.Debug,`Detected video track "${e.type}" event, delay camera video stream access detection`),this.setCameraAccessTimeout();return}let t=e.type==="mute";t!==this.gui.isCameraRecoveryVisible()&&(a$3.log(a$3.Level.Debug,`Detected video track "${e.type}" event, ${t?"enable":"disable"} camera recovery`),this.gui.setCameraRecoveryVisible(t));}};n.autofocusIntervalMs=1500,n.cameraAccessTimeoutMs=4e3,n.getCapabilitiesTimeoutMs=500,n.manualFocusWaitTimeoutMs=400,n.manualToAutofocusResumeTimeoutMs=5e3,n.noCameraErrorParameters={name:"NoCameraAvailableError",message:"No camera available"},n.notReadableErrorParameters={name:"NotReadableError",message:"Could not initialize camera correctly"},n.videoMetadataCheckIntervalMs=50,n.videoMetadataCheckTimeoutMs=4e3,n.MIRRORED_CLASS_NAME=a.MIRRORED_CLASS_NAME,n._instance=null;var y=n;
|
|
12
|
-
|
|
13
|
-
export { w as a, R as b, L as c, y as d };
|
|
1
|
+
import {a as a$1}from'./chunk-R6E4CT22.js';import {a as a$5}from'./chunk-TCJPGGHY.js';import {b as b$1}from'./chunk-ULRY4SXF.js';import {b}from'./chunk-FTD535WI.js';import {a}from'./chunk-JKL2W65E.js';import {d}from'./chunk-BIGR7VVJ.js';import {a as a$3}from'./chunk-XR65N6EG.js';import {a as a$4}from'./chunk-QCZSSQAQ.js';import {a as a$2}from'./chunk-MU4VAJIM.js';var w=(r=>(r.CONTINUOUS="continuous",r.MANUAL="manual",r.NONE="none",r.SINGLE_SHOT="single-shot",r))(w||{}),R=(s=>(s[s.ULTRA_HD=0]="ULTRA_HD",s[s.FULL_HD=1]="FULL_HD",s[s.HD=2]="HD",s[s.SD=3]="SD",s[s.NONE=4]="NONE",s))(R||{}),L=(t=>(t.CAMERA_PROPERTIES="cameraProperties",t.CAMERA_ACCESS_ERROR="cameraAccessError",t))(L||{}),n=class n{constructor(){this.checkCameraVideoStreamAccessIfVisibleListener=this.checkCameraVideoStreamAccessIfVisible.bind(this);this.handleWebGLContextLostListener=this.handleWebGLContextLost.bind(this);this.listeners=new Map;this.mirrorImageOverrides=new Map;this.postStreamInitializationListener=this.postStreamInitialization.bind(this);this.triggerManualFocusListener=this.triggerManualFocus.bind(this);this.triggerZoomMoveListener=this.triggerZoomMove.bind(this);this.triggerZoomStartListener=this.triggerZoomStart.bind(this);this.videoResizeListener=a$1(this.handleVideoResize.bind(this),500);this.videoTrackEndedListener=this.videoTrackEndedRecovery.bind(this);this.videoTrackMuteListener=this.videoTrackMuteRecovery.bind(this);this._synchronousFrameHandling=!1;this._glFrameReaders={GRAYSCALE:null,RGBA:null};this._frameReaderType="RGBA";this.cameraPosition="worldFacing",this.gui={isCameraRecoveryVisible:()=>!1,setCameraRecoveryVisible:()=>{}},this.isWebGLSupported=!a$2.checkBrowserCompatibility().missingFeatures.includes("webGL"),this.videoElement=document.createElement("video"),this.canvas=document.createElement("canvas"),this.canvas.addEventListener("webglcontextlost",this.handleWebGLContextLostListener);}get mediaStream(){return this._mediaStream}set mediaStream(e){this._mediaStream=e,e&&(this.mediaTrackCapabilitiesPromise=new Promise(t=>{this.mediaTrackCapabilitiesPromiseResolver=t;}));}get synchronousFrameHandling(){return this._synchronousFrameHandling}get canvas2dContext(){return this._canvas2dContext||(this._canvas2dContext=this.canvas.getContext("2d",{willReadFrequently:!0}),this._canvas2dContext==null&&a$3.log(a$3.Level.Warn,"Unable to get 2d canvas context"),this.handleVideoResize()),this._canvas2dContext}get canvasWebGLContext(){var e;if(!this._canvas2dContext&&!this._canvasWebGLContext){if(!this.isWebGLSupported){a$3.log(a$3.Level.Warn,"WebGL context not supported, falling back to 2d canvas context. This may impact the scanning performance.");return}let t=(e=this.canvas.getContext("webgl",{alpha:!1,antialias:!1}))!=null?e:this.canvas.getContext("experimental-webgl",{alpha:!1,antialias:!1});t!=null&&(this._canvasWebGLContext=t,this.handleVideoResize());}return this._canvasWebGLContext}static instance(){return n._instance==null&&(n._instance=new n),n._instance}recycle(e){var t;(t=this.getFrameReader())==null||t.recycle(e);}getCurrentFrame(){var e;return (e=this._glFrameReaders.RGBA)==null?void 0:e.readFromSource(this.videoElement)}requestVideoFrame(e){return "requestVideoFrameCallback"in HTMLVideoElement.prototype?this.videoElement.requestVideoFrameCallback(e):requestAnimationFrame(e)}cancelVideoFrame(e){if("cancelVideoFrameCallback"in HTMLVideoElement.prototype){this.videoElement.cancelVideoFrameCallback(e);return}cancelAnimationFrame(e);}addListener(e,t){var r;let i=(r=this.listeners.get(e))!=null?r:[];i.includes(t)||this.listeners.set(e,[...i,t]);}async applyCameraSettings(e){if(this.selectedCameraSettings=e,this.activeCamera==null)throw new a$4(n.noCameraErrorParameters);return this.initializeCameraWithSettings(this.activeCamera,e)}captureImage(){var e;if(((e=this.mediaStream)==null?void 0:e.active)!=null){if(this.canvasWebGLContext!=null)return this.captureImageForWebGLContext();if(this.canvas2dContext!=null)return this.captureImageFor2dContext()}return null}async initializeCameraWithSettings(e,t){if(this.cameraInitializationPromise&&await this.cameraInitializationPromise,e==null)throw new a$4(n.noCameraErrorParameters);return this.setSelectedCamera(e),this.selectedCameraSettings=t,this.activeCameraSettings=t,this.cameraInitializationPromise=this.initializeCameraAndCheckUpdatedSettings(e),this.cameraInitializationPromise}isMirrorImageEnabled(){if(this.selectedCamera&&this.activeCamera){let e=this.mirrorImageOverrides.get(this.activeCamera);return e!=null?e:this.activeCamera.position==="userFacing"}return !1}isPinchToZoomEnabled(){return this.pinchToZoomEnabled}isTapToFocusEnabled(){return this.tapToFocusEnabled}async isTorchAvailable(){var e;return this.mediaStream?(await this.waitForCapabilities(),((e=this.mediaTrackCapabilities)==null?void 0:e.torch)===!0):!1}async playVideo(){return new Promise(e=>{this._canvas2dContext&&this._canvas2dContext.clearRect(0,0,this.canvas.width,this.canvas.height);let t=this.videoElement.play();t==null?e():t.then(e).catch(()=>{e();});})}async reinitializeCamera(){if(this.activeCamera==null)a$3.log(a$3.Level.Debug,"Camera reinitialization delayed");else {a$3.log(a$3.Level.Debug,"Reinitialize camera:",this.activeCamera);try{let e=this.activeCamera;await this.stopStream(),await this.initializeCameraWithSettings(e,this.activeCameraSettings);}catch(e){throw a$3.log(a$3.Level.Warn,"Couldn't access camera:",this.activeCamera,e),this.emit("cameraAccessError",e),e}}}removeListener(e,t){var s;let r=((s=this.listeners.get(e))!=null?s:[]).filter(o=>o!==t);this.listeners.set(e,r);}async setCameraPosition(e){var i;this.setInitialCameraPosition(e);let t=d.getMainCameraForPosition(await d.getCameras(),e);if(t&&t.deviceId!==((i=this.selectedCamera)==null?void 0:i.deviceId))return this.initializeCameraWithSettings(t,this.selectedCameraSettings)}async setExposure(e){var r,s,o,m,d,l,v,p;let t=(s=(r=this.mediaStream)==null?void 0:r.getVideoTracks())!=null?s:[];if(t.length===0||typeof t[0].applyConstraints!="function")return;await this.waitForCapabilities();let i=e.time!=null&&e.time>0?"manual":"continuous";if(((m=(o=this.mediaTrackCapabilities)==null?void 0:o.exposureMode)==null?void 0:m.includes(i))===!0){if(await t[0].applyConstraints({advanced:[{exposureMode:i}]}),e.time!=null&&e.time>0&&this.mediaTrackCapabilities.exposureTime){let u=Math.max((d=this.mediaTrackCapabilities.exposureTime.min)!=null?d:.01,Math.min(e.time,(l=this.mediaTrackCapabilities.exposureTime.max)!=null?l:1e5));await t[0].applyConstraints({advanced:[{exposureTime:u}]});}else if(e.compensation!=null&&i==="continuous"&&this.mediaTrackCapabilities.exposureCompensation){let u=Math.max((v=this.mediaTrackCapabilities.exposureCompensation.min)!=null?v:-10,Math.min(e.compensation,(p=this.mediaTrackCapabilities.exposureCompensation.max)!=null?p:10));await t[0].applyConstraints({advanced:[{exposureCompensation:u}]});}}}async setFocus(e){var i,r,s,o,m;if(!this.mediaStream)return;let t=this.mediaStream.getVideoTracks();if(t.length>0&&typeof t[0].applyConstraints=="function"){await this.waitForCapabilities();let d=e>=0?"manual":"continuous";if(((r=(i=this.mediaTrackCapabilities)==null?void 0:i.focusMode)==null?void 0:r.includes(d))===!0&&(await t[0].applyConstraints({advanced:[{focusMode:d}]}),d==="manual"&&this.mediaTrackCapabilities.focusDistance)){let l=Math.max(0,Math.min(e,1))*(((s=this.mediaTrackCapabilities.focusDistance.max)!=null?s:1e3)-((o=this.mediaTrackCapabilities.focusDistance.min)!=null?o:.01))+((m=this.mediaTrackCapabilities.focusDistance.min)!=null?m:.01);await t[0].applyConstraints({advanced:[{focusDistance:l}]});}}}async setFrameRate(e){var t,i,r;if(this.mediaStream&&(await this.waitForCapabilities(),(t=this.mediaTrackCapabilities)!=null&&t.frameRate)){let s=this.mediaStream.getVideoTracks();if(s.length>0&&typeof s[0].applyConstraints=="function"){let o=Math.min((i=this.mediaTrackCapabilities.frameRate.max)!=null?i:240,(r=e.max)!=null?r:240);await s[0].applyConstraints({advanced:[{frameRate:o}]});}}}setInitialCameraPosition(e){this.cameraPosition=e;}setInteractionOptions(e,t,i){this.torchToggleEnabled=e,this.tapToFocusEnabled=t,this.pinchToZoomEnabled=i;}setMirrorImageEnabled(e,t){this.selectedCamera&&(e?(this.videoElement.classList.add(n.MIRRORED_CLASS_NAME),this.canvas.classList.add(n.MIRRORED_CLASS_NAME)):(this.videoElement.classList.remove(n.MIRRORED_CLASS_NAME),this.canvas.classList.remove(n.MIRRORED_CLASS_NAME)),t&&this.mirrorImageOverrides.set(this.selectedCamera,e));}setPinchToZoomEnabled(e){this.pinchToZoomEnabled=e,this.mediaStream&&(this.pinchToZoomEnabled?this.enablePinchToZoomListeners():this.disablePinchToZoomListeners());}setSelectedCamera(e){this.selectedCamera=e;}setSelectedCameraSettings(e){this.selectedCameraSettings=e;}setTapToFocusEnabled(e){this.tapToFocusEnabled=e,this.mediaStream&&(this.tapToFocusEnabled?this.enableTapToFocusListeners():this.disableTapToFocusListeners());}async setTorchEnabled(e){var t;if(this.mediaStream&&((t=this.mediaTrackCapabilities)==null?void 0:t.torch)===!0){this.torchEnabled=e;let i=this.mediaStream.getVideoTracks();i.length>0&&typeof i[0].applyConstraints=="function"&&await i[0].applyConstraints({advanced:[{torch:e}]});}}async setZoom(e){var t,i,r;if(this.mediaStream&&(await this.waitForCapabilities(),(t=this.mediaTrackCapabilities)!=null&&t.zoom)){let s=this.mediaStream.getVideoTracks();if(s.length>0&&typeof s[0].applyConstraints=="function"){let o=Math.max((i=this.mediaTrackCapabilities.zoom.min)!=null?i:1,Math.min(e,(r=this.mediaTrackCapabilities.zoom.max)!=null?r:16));await s[0].applyConstraints({advanced:[{zoom:o}]});}}}async setupCameras(){return this.cameraSetupPromise?this.cameraSetupPromise:(this.cameraSetupPromise=this.setupCamerasAndStream(),this.cameraSetupPromise)}pauseStream(){if(!this.mediaStream)return;let e=this.mediaStream.getVideoTracks()[0];e.enabled=!1,a$3.log(a$3.Level.Debug,"Pause camera video stream",this.mediaStream);}resumeStream(){if(!this.mediaStream)return;let e=this.mediaStream.getVideoTracks()[0];e.enabled=!0,a$3.log(a$3.Level.Debug,"Resume camera video stream",this.mediaStream);}async stopStream(e=!1){this.activeCamera&&(this.activeCamera.currentResolution=void 0),this.activeCamera=void 0,this.torchEnabled=!1,this.mediaStream&&(a$3.log(a$3.Level.Debug,`Stop camera video stream access${e?" (abort access detection)":""}:`,this.mediaStream),document.removeEventListener("visibilitychange",this.checkCameraVideoStreamAccessIfVisibleListener),window.clearTimeout(this.cameraAccessTimeout),window.clearInterval(this.videoMetadataCheckInterval),window.clearTimeout(this.getCapabilitiesTimeout),window.clearTimeout(this.manualFocusWaitTimeout),window.clearTimeout(this.manualToAutofocusResumeTimeout),window.clearInterval(this.autofocusInterval),this.videoElement.pause(),await new Promise(t=>{setTimeout(()=>{var i,r,s;for(let o of (r=(i=this.mediaStream)==null?void 0:i.getVideoTracks())!=null?r:[])o.removeEventListener("ended",this.videoTrackEndedListener),o.stop();this.videoElement.srcObject=null,this._canvas2dContext&&this._canvas2dContext.clearRect(0,0,this.canvas.width,this.canvas.height),this.mediaStream=void 0,this.mediaTrackCapabilities=void 0,this.mediaTrackCapabilitiesPromise=void 0,this.mediaTrackCapabilitiesPromiseResolver=void 0,e||(s=this.abortedCameraInitializationResolveCallback)==null||s.call(this),t();},0);}));}stopVideoTracks(){if(this.mediaStream!=null)for(let e of this.mediaStream.getVideoTracks())e.stop();}async toggleTorch(){this.torchEnabled=!this.torchEnabled,await this.setTorchEnabled(this.torchEnabled);}updateCanvasVideoImage(){this.canvas2dContext.drawImage(this.videoElement,0,0);}async waitForCapabilities(){var e;return (e=this.mediaTrackCapabilitiesPromise)!=null?e:Promise.resolve()}setFrameReaderType(e){e!==this._frameReaderType&&(this._frameReaderType=e,a$3.log(a$3.Level.Debug,`Change frame reader type to ${this._frameReaderType} mode`));}async allowPictureInPicture(e){e?(this.videoElement.disablePictureInPicture=!1,this.videoElement.removeAttribute("controlslist"),this.videoElement.removeAttribute("disablepictureinpicture")):(this.videoElement.disablePictureInPicture=!0,this.videoElement.setAttribute("controlslist","nodownload"),this.videoElement.setAttribute("disablepictureinpicture","true")),await this.reinitializeCamera();}setFrameHandling(e){var t;this._synchronousFrameHandling=e,this._frameReaderOptions=this.getFrameReaderOptions(e),(t=this._glFrameReaders[this._frameReaderType])==null||t.dispose(),delete this._glFrameReaders[this._frameReaderType];}async accessAutoselectedCamera(e){let t=d.sortCamerasForCameraPosition(e,this.cameraPosition),i=t.shift();for(;i;)try{await this.initializeCameraWithSettings(i,this.selectedCameraSettings);return}catch(r){if(this.setSelectedCamera(),t.length>0){a$3.log(a$3.Level.Warn,"Couldn't access camera:",i,r),i=t.shift();continue}throw r}throw new a$4(n.noCameraErrorParameters)}getFrameReaderOptions(e){return e?{minPoolCapacity:0,maxPoolCapacity:1}:a$2.isDesktopDevice()?{maxPoolCapacity:2,minPoolCapacity:1}:{maxPoolCapacity:10,minPoolCapacity:3}}getFrameReader(){var t;if(this._glFrameReaders[this._frameReaderType])return this._glFrameReaders[this._frameReaderType];if(!this._canvasWebGLContext)return null;let e=(t=this._frameReaderOptions)!=null?t:this.getFrameReaderOptions(this._synchronousFrameHandling);switch(this._frameReaderType){case"GRAYSCALE":{this._glFrameReaders.GRAYSCALE=new a$5(this._canvasWebGLContext,e),this._glFrameReaders.RGBA=new b$1(this._canvasWebGLContext,{minPoolCapacity:1,maxPoolCapacity:2});break}case"RGBA":{this._glFrameReaders.RGBA=new b$1(this._canvasWebGLContext,e);break}default:b(this._frameReaderType);}return a$3.debug(`Created frame reader ${this._frameReaderType}`,e),this._glFrameReaders[this._frameReaderType]}async accessInitialCamera(){let e={position:this.cameraPosition,deviceId:"",label:""};try{await this.initializeCameraWithSettings(e,this.selectedCameraSettings);}catch(t){}finally{this.setSelectedCamera();}return e}recreateCanvas(){this.canvas.removeEventListener("webglcontextlost",this.handleWebGLContextLostListener),this._canvasWebGLContext=void 0,this._canvas2dContext=void 0;for(let t of Object.values(this._glFrameReaders))t==null||t.dispose();let e=document.createElement("canvas");e.addEventListener("webglcontextlost",this.handleWebGLContextLostListener),e.width=this.canvas.width,e.height=this.canvas.height,e.className=this.canvas.className,this.canvas=e;}captureImageFor2dContext(){if(!this.isVideoAndContextStateValid())return null;let{width:e,height:t}=this.canvas;return {colorType:"RGBA",data:this.canvas2dContext.getImageData(0,0,e,t).data,width:e,height:t}}areVideoAndWebGLSizeMismatching(){return this.canvasWebGLContext?this.canvasWebGLContext.drawingBufferWidth!==this.videoElement.videoWidth||this.canvasWebGLContext.drawingBufferHeight!==this.videoElement.videoHeight:!0}captureImageForWebGLContext(){if(!this.isVideoAndContextStateValid()||!this.canvasWebGLContext||this.canvasWebGLContext.drawingBufferWidth<=2||this.canvasWebGLContext.drawingBufferHeight<=2||this.areVideoAndWebGLSizeMismatching()||this.getFrameReader()==null)return null;let e=this.getFrameReader().readFromSource(this.videoElement);if(e.data[3]!==255&&e.colorType==="RGBA"){if(a$3.log(a$3.Level.Warn,"Detected incorrect GPU accelerated WebGL image processing, switching to canvas mode"),this.recreateCanvas(),this.canvas2dContext==null)throw new Error("Unable to get 2d canvas context");return this.captureImage()}return e}async checkCameraAccess(e){return new Promise((t,i)=>{this.cameraAccessRejectCallback=r=>{a$3.log(a$3.Level.Debug,"Camera video stream access failure (video data load timeout):",e),this.gui.setCameraRecoveryVisible(!0),i(r);},this.setCameraAccessTimeout();})}checkCameraVideoStreamAccessIfVisible(){document.visibilityState==="visible"&&(a$3.log(a$3.Level.Debug,"Page is visible again, waiting for camera video stream start..."),document.removeEventListener("visibilitychange",this.checkCameraVideoStreamAccessIfVisibleListener),this.setCameraAccessTimeout());}async checkVideoMetadata(e){return new Promise((t,i)=>{this.videoElement.onloadeddata=()=>{if(this.videoElement.onloadeddata=null,window.clearTimeout(this.cameraAccessTimeout),this.videoElement.videoWidth>2&&this.videoElement.videoHeight>2&&this.videoElement.currentTime>0){this.updateActiveCameraCurrentResolution(e),a$3.log(a$3.Level.Debug,"Camera video stream access success:",e),t();return}let r=performance.now();window.clearInterval(this.videoMetadataCheckInterval),this.videoMetadataCheckInterval=window.setInterval(async()=>{if(this.videoElement.videoWidth<=2||this.videoElement.videoHeight<=2||this.videoElement.currentTime===0){if(performance.now()-r>n.videoMetadataCheckTimeoutMs){a$3.log(a$3.Level.Warn,"Camera video stream access failure (valid video metadata timeout):",e),window.clearInterval(this.videoMetadataCheckInterval),await this.stopStream(!0),i(new a$4(n.notReadableErrorParameters));return}return}window.clearInterval(this.videoMetadataCheckInterval),this.updateActiveCameraCurrentResolution(e),a$3.log(a$3.Level.Debug,"Camera video stream access success:",e),t();},n.videoMetadataCheckIntervalMs);};})}disablePinchToZoomListeners(){this.videoElement.removeEventListener("touchstart",this.triggerZoomStartListener),this.videoElement.removeEventListener("touchmove",this.triggerZoomMoveListener);}disableTapToFocusListeners(){for(let e of ["touchend","mousedown"])this.videoElement.removeEventListener(e,this.triggerManualFocusListener);}emit(e,t){var r;let i=(r=this.listeners.get(e))!=null?r:[];for(let s of i)s(t);}enablePinchToZoomListeners(){this.videoElement.addEventListener("touchstart",this.triggerZoomStartListener),this.videoElement.addEventListener("touchmove",this.triggerZoomMoveListener);}enableTapToFocusListeners(){for(let e of ["touchend","mousedown"])this.videoElement.addEventListener(e,this.triggerManualFocusListener);}getActiveCamera(e,t,i){return e.length===1?e[0]:e.find(r=>r.deviceId===i||r.label!==""&&r.label===t)}getInitialCameraResolutionConstraint(e){var i;let t;switch((i=this.activeCameraSettings)==null?void 0:i.preferredResolution){case"uhd4k":{t=0;break}case"fullHd":{t=1;break}case"hd":default:{t=2;break}}return t}async handleCameraInitializationError(e,t,i){if(!["OverconstrainedError","NotReadableError"].includes(i.name)||i.name==="NotReadableError"&&t===4)throw a$3.log(a$3.Level.Debug,"Camera video stream access failure (unrecoverable error)",e,i),i.name!=="NotAllowedError"&&d.markCameraAsInaccessible(e),i;if(i.name==="OverconstrainedError"&&t===4){if(e.deviceId==="")throw a$3.log(a$3.Level.Warn,"Camera video stream access failure (no camera with such type error)",e,i),i;a$3.log(a$3.Level.Warn,"Detected non-existent deviceId error, attempt to find and reaccess updated camera",e,i);let r=e.deviceId;if(await d.getCameras(!0),r===e.deviceId)throw a$3.log(a$3.Level.Warn,"Camera video stream access failure (updated camera not found after non-existent deviceId error)",e,i),d.markCameraAsInaccessible(e),i;return a$3.log(a$3.Level.Warn,"Updated camera found (recovered from non-existent deviceId error), attempt to access it",e),this.initializeCameraForResolution(e)}return this.initializeCameraForResolution(e,t+1)}handleVideoResize(){if(!(this.videoElement.videoWidth<=2||this.videoElement.videoHeight<=2)){if(this.activeCamera&&this.updateActiveCameraCurrentResolution(this.activeCamera),this.canvasWebGLContext!=null){if(this.canvas.width===this.videoElement.videoWidth&&this.canvas.height===this.videoElement.videoHeight)return;this.canvas.width=this.videoElement.videoWidth,this.canvas.height=this.videoElement.videoHeight,this.canvasWebGLContext.viewport(0,0,this.canvasWebGLContext.drawingBufferWidth,this.canvasWebGLContext.drawingBufferHeight);}else if(this.canvas2dContext!=null){if(this.canvas.width===this.videoElement.videoWidth&&this.canvas.height===this.videoElement.videoHeight)return;this.canvas.width=this.videoElement.videoWidth,this.canvas.height=this.videoElement.videoHeight;}}}handleWebGLContextLost(){a$3.log(a$3.Level.Warn,"WebGL context has been lost, restoring..."),this._canvasWebGLContext=void 0,this.canvasWebGLContext?(this.handleVideoResize(),a$3.log(a$3.Level.Warn,"WebGL context restored")):a$3.log(a$3.Level.Error,"WebGL context restore failed");}async initializeCameraAndCheckUpdatedSettings(e){var t,i,r,s,o;try{if(await this.initializeCameraForResolution(e),this.selectedCameraSettings!==this.activeCameraSettings&&(this.selectedCameraSettings==null||this.activeCameraSettings==null||Object.keys(this.selectedCameraSettings).some(u=>{var b,f;return ((b=this.selectedCameraSettings)==null?void 0:b[u])!==((f=this.activeCameraSettings)==null?void 0:f[u])}))){this.activeCameraSettings=this.selectedCameraSettings,await this.initializeCameraAndCheckUpdatedSettings(e);return}this.activeCameraSettings&&this.activeCameraSettings.zoomFactor>1&&await this.setZoom(this.activeCameraSettings.zoomFactor);let m=(t=this.activeCameraSettings)==null?void 0:t.getProperty("minFrameRate"),d=(i=this.activeCameraSettings)==null?void 0:i.getProperty("maxFrameRate");(m!=null||d!=null)&&await this.setFrameRate({min:m,max:d});let l=(r=this.activeCameraSettings)==null?void 0:r.getProperty("manualLensPosition");l!=null&&await this.setFocus(l);let v=(s=this.activeCameraSettings)==null?void 0:s.getProperty("exposureTargetBias"),p=(o=this.activeCameraSettings)==null?void 0:o.getProperty("exposureDuration");(v!=null||p!=null)&&await this.setExposure({compensation:v,time:p});}finally{this.cameraInitializationPromise=void 0;}}async initializeCameraForResolution(e,t){var r;this.gui.setCameraRecoveryVisible(!1);let i=t!=null?t:this.getInitialCameraResolutionConstraint(e);this.mediaStream!=null&&e.deviceId!==""&&((r=this.activeCamera)==null?void 0:r.deviceId)===e.deviceId?await(a$2.isIPhone()?this.initializeStreamForResolution(e,i):this.updateStreamForResolution(e,i)):await this.initializeStreamForResolution(e,i);}async initializeStreamForResolution(e,t){var i;await this.stopStream();try{let r=(i=this.activeCameraSettings)==null?void 0:i.getProperty("preferredAspectRatio"),s=await d.accessCameraStream(e,t,r);if(a$3.log(a$3.Level.Debug,"Camera accessed, waiting for camera video stream start..."),typeof s.getVideoTracks()[0].getSettings=="function"){let o=s.getVideoTracks()[0].getSettings();if(o.width!=null&&o.height!=null&&(o.width===2||o.height===2)){if(a$3.log(a$3.Level.Debug,"Camera video stream access failure (invalid video metadata):",e),t===4)throw new a$4(n.notReadableErrorParameters);return await this.stopStream(),this.initializeStreamForResolution(e,t+1)}}this.mediaStream=s;for(let o of this.mediaStream.getVideoTracks())o.addEventListener("ended",this.videoTrackEndedListener),o.addEventListener("mute",this.videoTrackMuteListener),o.addEventListener("unmute",this.videoTrackMuteListener);try{await this.setupCameraStreamVideo(e,s);}catch(o){if(t===4)throw o;return this.initializeStreamForResolution(e,t+1)}}catch(r){return this.handleCameraInitializationError(e,t,r)}}isVideoAndContextStateValid(){return this.videoElement.readyState===4&&this.videoElement.videoWidth>2&&this.videoElement.videoHeight>2&&this.canvas.width>2&&this.canvas.height>2}postStreamInitialization(){window.clearTimeout(this.getCapabilitiesTimeout),this.getCapabilitiesTimeout=window.setTimeout(()=>{this.storeStreamCapabilities(),this.setupAutofocus();},n.getCapabilitiesTimeoutMs);}async recoverStreamIfNeeded(){var t,i;let e=(t=this.mediaStream)==null?void 0:t.getVideoTracks();((i=e==null?void 0:e[0])==null?void 0:i.readyState)==="ended"&&await this.reinitializeCamera();}reportCameraProperties(e,t,i=!0){this.emit("cameraProperties",{deviceId:e,isFrontFacing:t==="userFacing",hasAutofocus:i});}setCameraAccessTimeout(){window.clearTimeout(this.cameraAccessTimeout),this.cameraAccessTimeout=window.setTimeout(async()=>{var e;document.visibilityState==="visible"?(await this.stopStream(!0),(e=this.cameraAccessRejectCallback)==null||e.call(this,new a$4(n.notReadableErrorParameters))):(a$3.log(a$3.Level.Debug,"Page is currently not visible, delay camera video stream access detection"),document.addEventListener("visibilitychange",this.checkCameraVideoStreamAccessIfVisibleListener));},n.cameraAccessTimeoutMs);}setupAutofocus(){if(window.clearTimeout(this.manualFocusWaitTimeout),window.clearTimeout(this.manualToAutofocusResumeTimeout),this.mediaStream&&this.mediaTrackCapabilities){let e=this.mediaTrackCapabilities.focusMode;Array.isArray(e)&&!e.includes("continuous")&&e.includes("single-shot")&&(window.clearInterval(this.autofocusInterval),this.autofocusInterval=window.setInterval(this.triggerAutoFocus.bind(this),n.autofocusIntervalMs));}}async setupCameraStreamVideo(e,t){this.videoElement.addEventListener("loadedmetadata",this.postStreamInitializationListener),this.videoElement.addEventListener("resize",this.videoResizeListener),this.tapToFocusEnabled&&this.enableTapToFocusListeners(),this.pinchToZoomEnabled&&this.enablePinchToZoomListeners();let i=Promise.race([this.checkCameraAccess(e),this.checkVideoMetadata(e),new Promise(r=>{this.abortedCameraInitializationResolveCallback=r;})]);return this.videoElement.srcObject=t,this.videoElement.load(),await this.playVideo(),this.handleVideoResize(),this.reportCameraProperties(e.deviceId,e.position),i}async setupCamerasAndStream(){var e,t;try{let i;this.selectedCamera==null&&(i=await this.accessInitialCamera());let r=await d.getCameras(!1,!0),s=(t=(e=this.mediaStream)==null?void 0:e.getVideoTracks()[0])==null?void 0:t.getSettings().deviceId;if(this.mediaStream&&i){let o=this.getActiveCamera(r,i.label,s);if(o){if(d.adjustCameraFromMediaStream(this.mediaStream,o),a$2.isDesktopDevice()&&(d.setMainCameraForPositionOverridesOnDesktop(this.cameraPosition,o),d.setMainCameraForPositionOverridesOnDesktop(o.position,o)),r.length===1||d.getMainCameraForPosition(r,this.cameraPosition)===o){a$3.log(a$3.Level.Debug,"Initial camera access was correct (main camera), keep camera:",o),this.setSelectedCamera(o),this.updateActiveCameraCurrentResolution(o),await this.recoverStreamIfNeeded();return}a$3.log(a$3.Level.Debug,"Initial camera access was incorrect (not main camera), change camera",{...i,deviceId:s});}else a$3.log(a$3.Level.Debug,"Initial camera access was incorrect (unknown camera), change camera",{...i,deviceId:s});}if(this.selectedCamera==null){await this.accessAutoselectedCamera(r);return}await this.initializeCameraWithSettings(this.selectedCamera,this.selectedCameraSettings);}finally{this.cameraSetupPromise=void 0;}}storeStreamCapabilities(){var e;if(this.mediaStream){let t=this.mediaStream.getVideoTracks();t.length>0&&typeof t[0].getCapabilities=="function"&&(this.mediaTrackCapabilities=t[0].getCapabilities()),this.mediaTrackCapabilitiesPromiseResolver&&this.mediaTrackCapabilitiesPromiseResolver();}this.activeCamera&&this.reportCameraProperties(this.activeCamera.deviceId,this.activeCamera.position,((e=this.mediaTrackCapabilities)==null?void 0:e.focusMode)==null||this.mediaTrackCapabilities.focusMode.includes("continuous"));}async triggerAutoFocus(){await this.triggerFocusMode("single-shot");}async triggerFocusMode(e){if(this.mediaStream){let t=this.mediaStream.getVideoTracks();if(t.length>0&&typeof t[0].applyConstraints=="function")try{await t[0].applyConstraints({advanced:[{focusMode:e}]});}catch(i){}}}async triggerManualFocus(e){if(e){if(e.preventDefault(),e.type==="touchend"&&e.touches.length>0)return;if(this.pinchToZoomDistance!=null){this.pinchToZoomDistance=void 0;return}}if(window.clearTimeout(this.manualFocusWaitTimeout),window.clearTimeout(this.manualToAutofocusResumeTimeout),!this.mediaStream||!this.mediaTrackCapabilities)return;let t=this.mediaTrackCapabilities.focusMode;Array.isArray(t)&&t.includes("single-shot")&&(t.includes("continuous")&&t.includes("manual")?await this.triggerManualFocusForContinuous():t.includes("continuous")||await this.triggerManualFocusForSingleShot());}async triggerManualFocusForContinuous(){var i;if(!this.mediaStream)return;this.manualToAutofocusResumeTimeout=window.setTimeout(async()=>{await this.triggerFocusMode("continuous");},n.manualToAutofocusResumeTimeoutMs);let e=!0,t=this.mediaStream.getVideoTracks();t.length>0&&typeof t[0].getConstraints=="function"&&(e=((i=t[0].getConstraints().advanced)==null?void 0:i.some(r=>r.focusMode==="manual"))===!0),e?(await this.triggerFocusMode("continuous"),this.manualFocusWaitTimeout=window.setTimeout(async()=>{await this.triggerFocusMode("manual");},n.manualFocusWaitTimeoutMs)):await this.triggerFocusMode("manual");}async triggerManualFocusForSingleShot(){window.clearInterval(this.autofocusInterval),this.manualToAutofocusResumeTimeout=window.setTimeout(()=>{this.autofocusInterval=window.setInterval(this.triggerAutoFocus.bind(this),n.autofocusIntervalMs);},n.manualToAutofocusResumeTimeoutMs);try{await this.triggerFocusMode("single-shot");}catch(e){}}async triggerZoomMove(e){this.pinchToZoomDistance==null||(e==null?void 0:e.touches.length)!==2||e.preventDefault();}triggerZoomStart(e){var r,s,o,m;if((e==null?void 0:e.touches.length)!==2||(e.preventDefault(),this.pinchToZoomDistance=Math.hypot((e.touches[1].screenX-e.touches[0].screenX)/screen.width,(e.touches[1].screenY-e.touches[0].screenY)/screen.height),!this.mediaStream||!((r=this.mediaTrackCapabilities)!=null&&r.zoom)))return;let t=this.mediaStream.getVideoTracks();if(t.length===0||typeof t[0].getConstraints!="function")return;this.pinchToZoomInitialZoom=(s=this.mediaTrackCapabilities.zoom.min)!=null?s:1;let i=t[0].getConstraints();if(i.advanced){let d=(o=i.advanced.find(l=>"zoom"in l))==null?void 0:o.zoom;d!=null&&(this.pinchToZoomInitialZoom=typeof d=="number"?d:(m=d.ideal)!=null?m:1);}}updateActiveCameraCurrentResolution(e){this.videoElement.videoWidth>2&&this.videoElement.videoHeight>2&&(e.currentResolution={width:this.videoElement.videoWidth,height:this.videoElement.videoHeight}),e.deviceId!==""&&(this.activeCamera=e,this.setMirrorImageEnabled(this.isMirrorImageEnabled(),!1));}async updateStreamForResolution(e,t){var i;if(this.mediaStream==null)await this.initializeCameraForResolution(e,t);else try{let r=(i=this.activeCameraSettings)==null?void 0:i.getProperty("preferredAspectRatio");a$3.log(a$3.Level.Debug,"Setting new resolution for active camera video stream..."),await this.mediaStream.getVideoTracks()[0].applyConstraints(d.getUserMediaVideoParameters(t,r)),await new Promise(o=>{this.videoElement.addEventListener("timeupdate",()=>{o();},{once:!0});});let s=this.mediaStream.getVideoTracks()[0].getSettings();a$3.log(a$3.Level.Debug,"New active camera video stream resolution set",{width:s.width,height:s.height});}catch(r){if(t===4)throw r;await this.updateStreamForResolution(e,t+1);}}async videoTrackEndedRecovery(){if(document.visibilityState==="visible")try{a$3.log(a$3.Level.Debug,'Detected video track "ended" event, try to reinitialize camera'),await this.reinitializeCamera();}catch(e){}else a$3.log(a$3.Level.Debug,"Page is currently not visible, delay camera reinitialization until visible"),document.addEventListener("visibilitychange",this.checkCameraVideoStreamAccessIfVisibleListener);}videoTrackMuteRecovery(e){if(this.videoElement.onloadeddata!=null){a$3.log(a$3.Level.Debug,`Detected video track "${e.type}" event, delay camera video stream access detection`),this.setCameraAccessTimeout();return}let t=e.type==="mute";t!==this.gui.isCameraRecoveryVisible()&&(a$3.log(a$3.Level.Debug,`Detected video track "${e.type}" event, ${t?"enable":"disable"} camera recovery`),this.gui.setCameraRecoveryVisible(t));}};n.autofocusIntervalMs=1500,n.cameraAccessTimeoutMs=4e3,n.getCapabilitiesTimeoutMs=500,n.manualFocusWaitTimeoutMs=400,n.manualToAutofocusResumeTimeoutMs=5e3,n.noCameraErrorParameters={name:"NoCameraAvailableError",message:"No camera available"},n.notReadableErrorParameters={name:"NotReadableError",message:"Could not initialize camera correctly"},n.videoMetadataCheckIntervalMs=50,n.videoMetadataCheckTimeoutMs=4e3,n.MIRRORED_CLASS_NAME=a.MIRRORED_CLASS_NAME,n._instance=null;var y=n;export{w as a,R as b,L as c,y as d};
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as a$1 } from './chunk-NMX4VHW2.js';
|
|
3
|
-
|
|
4
|
-
var i=class{toJSONObject(){return {type:this.type}}},s=class extends i{constructor(){super(...arguments);this.type="torch";this.view=null;this.icon={on:{idle:j,pressed:h},off:{idle:i$1,pressed:f}};}get torchOffImage(){return this.icon.off.idle}set torchOffImage(t){var e;this.icon.off.idle=t,(e=this.view)==null||e.controlsUpdated();}get torchOffPressedImage(){return this.icon.off.pressed}set torchOffPressedImage(t){var e;this.icon.off.pressed=t,(e=this.view)==null||e.controlsUpdated();}get torchOnImage(){return this.icon.on.idle}set torchOnImage(t){var e;this.icon.on.idle=t,(e=this.view)==null||e.controlsUpdated();}get torchOnPressedImage(){return this.icon.on.pressed}set torchOnPressedImage(t){var e;this.icon.on.pressed=t,(e=this.view)==null||e.controlsUpdated();}};s.CLASS_NAME=a$1.TORCH_SWITCH_CONTROL_CLASS_NAME;var l=class extends i{constructor(){super(...arguments);this.type="camera";this.view=null;this.icon={idle:g,pressed:d};}get idleImage(){return this.icon.idle}set idleImage(t){var e;this.icon.idle=t,(e=this.view)==null||e.controlsUpdated();}get pressedImage(){return this.icon.pressed}set pressedImage(t){var e;this.icon.pressed=t,(e=this.view)==null||e.controlsUpdated();}};l.CLASS_NAME=a$1.CAMERA_SWITCH_CONTROL_CLASS_NAME;var a=class extends i{constructor(){super(...arguments);this.type="camera-fov";this.view=null;this.icon={wide:{idle:e,pressed:b},ultraWide:{idle:c,pressed:a$2}};}get cameraFOVUltraWideImage(){return this.icon.ultraWide.idle}set cameraFOVUltraWideImage(t){var e;this.icon.ultraWide.idle=t,(e=this.view)==null||e.controlsUpdated();}get cameraFOVUltraWidePressedImage(){return this.icon.ultraWide.pressed}set cameraFOVUltraWidePressedImage(t){var e;this.icon.ultraWide.pressed=t,(e=this.view)==null||e.controlsUpdated();}get cameraFOVWideImage(){return this.icon.wide.idle}set cameraFOVWideImage(t){var e;this.icon.wide.idle=t,(e=this.view)==null||e.controlsUpdated();}get cameraFOVWidePressedImage(){return this.icon.wide.pressed}set cameraFOVWidePressedImage(t){var e;this.icon.wide.pressed=t,(e=this.view)==null||e.controlsUpdated();}};a.CLASS_NAME=a$1.CAMERA_FOV_SWITCH_CONTROL_CLASS_NAME;
|
|
5
|
-
|
|
6
|
-
export { s as a, l as b, a as c };
|
|
1
|
+
import {j,h,i as i$1,f,g,d,e,b,c,a as a$2}from'./chunk-FGCJ3ZLG.js';import {a as a$1}from'./chunk-NMX4VHW2.js';var i=class{toJSONObject(){return {type:this.type}}},s=class extends i{constructor(){super(...arguments);this.type="torch";this.view=null;this.icon={on:{idle:j,pressed:h},off:{idle:i$1,pressed:f}};}get torchOffImage(){return this.icon.off.idle}set torchOffImage(t){var e;this.icon.off.idle=t,(e=this.view)==null||e.controlsUpdated();}get torchOffPressedImage(){return this.icon.off.pressed}set torchOffPressedImage(t){var e;this.icon.off.pressed=t,(e=this.view)==null||e.controlsUpdated();}get torchOnImage(){return this.icon.on.idle}set torchOnImage(t){var e;this.icon.on.idle=t,(e=this.view)==null||e.controlsUpdated();}get torchOnPressedImage(){return this.icon.on.pressed}set torchOnPressedImage(t){var e;this.icon.on.pressed=t,(e=this.view)==null||e.controlsUpdated();}};s.CLASS_NAME=a$1.TORCH_SWITCH_CONTROL_CLASS_NAME;var l=class extends i{constructor(){super(...arguments);this.type="camera";this.view=null;this.icon={idle:g,pressed:d};}get idleImage(){return this.icon.idle}set idleImage(t){var e;this.icon.idle=t,(e=this.view)==null||e.controlsUpdated();}get pressedImage(){return this.icon.pressed}set pressedImage(t){var e;this.icon.pressed=t,(e=this.view)==null||e.controlsUpdated();}};l.CLASS_NAME=a$1.CAMERA_SWITCH_CONTROL_CLASS_NAME;var a=class extends i{constructor(){super(...arguments);this.type="camera-fov";this.view=null;this.icon={wide:{idle:e,pressed:b},ultraWide:{idle:c,pressed:a$2}};}get cameraFOVUltraWideImage(){return this.icon.ultraWide.idle}set cameraFOVUltraWideImage(t){var e;this.icon.ultraWide.idle=t,(e=this.view)==null||e.controlsUpdated();}get cameraFOVUltraWidePressedImage(){return this.icon.ultraWide.pressed}set cameraFOVUltraWidePressedImage(t){var e;this.icon.ultraWide.pressed=t,(e=this.view)==null||e.controlsUpdated();}get cameraFOVWideImage(){return this.icon.wide.idle}set cameraFOVWideImage(t){var e;this.icon.wide.idle=t,(e=this.view)==null||e.controlsUpdated();}get cameraFOVWidePressedImage(){return this.icon.wide.pressed}set cameraFOVWidePressedImage(t){var e;this.icon.wide.pressed=t,(e=this.view)==null||e.controlsUpdated();}};a.CLASS_NAME=a$1.CAMERA_FOV_SWITCH_CONTROL_CLASS_NAME;export{s as a,l as b,a as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {n as n$1}from'./chunk-LDJ53PEJ.js';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),B=n$1.fromRGBA(212,246,230,1),s=n$1.fromRGBA(251,192,44,1),x=n$1.fromRGBA(252,205,86,1),y=n$1.fromRGBA(253,217,128,1),A=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),l=n$1.fromRGBA(252,143,144,1),i=n$1.fromRGBA(253,180,181,1),O=n$1.fromRGBA(254,218,218,1),T=n$1.fromRGBA(10,51,144,1);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,B as k,s as l,x as m,y as n,A as o,d as p,S as q,g as r,l as s,i as t,O as u,T as v};
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a } from './chunk-MW5PTAU7.js';
|
|
3
|
-
import { a as a$1 } from './chunk-QHBIT2WY.js';
|
|
4
|
-
|
|
5
|
-
var m=`
|
|
1
|
+
import {b,a as a$2}from'./chunk-SK6L34IF.js';import {a}from'./chunk-MW5PTAU7.js';import {a as a$1}from'./chunk-QHBIT2WY.js';var m=`
|
|
6
2
|
attribute vec2 a_position;
|
|
7
3
|
varying vec2 v_texcoord;
|
|
8
4
|
|
|
@@ -36,6 +32,4 @@ void main() {
|
|
|
36
32
|
|
|
37
33
|
// Set the final color with grayscale values
|
|
38
34
|
gl_FragColor = vec4(grayscaleA, grayscaleB, grayscaleC, grayscaleD);
|
|
39
|
-
}`,x=class extends a{constructor(t,e){super(t,e);this.colorType="GRAYSCALE";this._positions=new Float32Array([-1,-1,-1,1,1,-1,1,-1,-1,1,1,1]);this._canvas=document.createElement("canvas");}get _webglContext(){var t;if(!this._ctx){if(this._ctx=(t=this._canvas)==null?void 0:t.getContext("webgl",{antialias:!1}),!this._ctx)throw new Error("Cannot get WebGL context");this.setup();}return this._ctx}readFromSource(t){var _,h;this.updateCanvasSizeIfNeeded(),this.updateFrameSizeIfNeeded();let e=(_=t==null?void 0:t.videoWidth)!=null?_:this._contextWebGL.drawingBufferWidth,{drawingBufferWidth:r,drawingBufferHeight:i,TEXTURE_2D:f,RGBA:o,UNSIGNED_BYTE:s,TRIANGLES:d}=this._webglContext;this._webglContext.viewport(0,0,r,i);let p=this._webglContext.getUniformLocation(this._shaderProgram,"x_spacing"),u=1/e;this._webglContext.uniform1f(p,u),this._webglContext.texImage2D(f,0,o,o,s,t),this._webglContext.drawArrays(d,0,6);let a=(h=this._framePool)==null?void 0:h.pop();if(!a)throw new Error("Frame pool found empty!");this._webglContext.readPixels(0,0,r,i,o,s,a);let b=new Uint8ClampedArray(a.buffer,0,e*i);return {width:e,height:i,data:b,colorType:"GRAYSCALE"}}setup(){this.initShaderProgram(),this.initBuffers(),this.initTexture();}dispose(){var t;this._shaderProgram&&(this._webglContext.deleteProgram(this._shaderProgram),this._shaderProgram=null),this._positionBuffer&&(this._webglContext.deleteBuffer(this._positionBuffer),this._positionBuffer=null),this._texture&&(this._webglContext.deleteTexture(this._texture),this._texture=null),this._ctx=null,(t=this._framePool)==null||t.empty(),this._canvas=void 0;}updateCanvasSizeIfNeeded(){this._canvas&&(this._canvas.width!==this._contextWebGL.drawingBufferWidth/4||this._canvas.height!==this._contextWebGL.drawingBufferHeight)&&(this._canvas.width=this._contextWebGL.drawingBufferWidth/4,this._canvas.height=this._contextWebGL.drawingBufferHeight);}updateFrameSizeIfNeeded(){var i;let{drawingBufferWidth:t,drawingBufferHeight:e}=this._webglContext,r=t*e*4;this._frameSize!==r&&(this._frameSize=t*e*4,(i=this._framePool)==null||i.empty(),this._framePool=new a$1({capacity:this._maxPoolCapacity,lowWaterMark:this._minPoolCapacity,createItem:()=>new Uint8ClampedArray(this._frameSize)}));}initShaderProgram(){let t=b(this._webglContext,this._webglContext.VERTEX_SHADER,m),e=b(this._webglContext,this._webglContext.FRAGMENT_SHADER,w);if(!t||!e)throw new Error("Shaders cannot be created");this._shaderProgram=a$2(this._webglContext,t,e),this._webglContext.useProgram(this._shaderProgram);}initBuffers(){this._positionBuffer=this._webglContext.createBuffer(),this._webglContext.bindBuffer(this._webglContext.ARRAY_BUFFER,this._positionBuffer),this._webglContext.bufferData(this._webglContext.ARRAY_BUFFER,this._positions,this._webglContext.STATIC_DRAW);let t=this._webglContext.getAttribLocation(this._shaderProgram,"a_position");this._webglContext.enableVertexAttribArray(t),this._webglContext.bindBuffer(this._webglContext.ARRAY_BUFFER,this._positionBuffer),this._webglContext.vertexAttribPointer(t,2,this._webglContext.FLOAT,!1,0,0);}initTexture(){this._texture=this._webglContext.createTexture(),this._webglContext.bindTexture(this._webglContext.TEXTURE_2D,this._texture),this._webglContext.texParameteri(this._webglContext.TEXTURE_2D,this._webglContext.TEXTURE_WRAP_S,this._webglContext.CLAMP_TO_EDGE),this._webglContext.texParameteri(this._webglContext.TEXTURE_2D,this._webglContext.TEXTURE_WRAP_T,this._webglContext.CLAMP_TO_EDGE),this._webglContext.texParameteri(this._webglContext.TEXTURE_2D,this._webglContext.TEXTURE_MIN_FILTER,this._webglContext.LINEAR),this._webglContext.texParameteri(this._webglContext.TEXTURE_2D,this._webglContext.TEXTURE_MAG_FILTER,this._webglContext.LINEAR);let t=this._webglContext.getUniformLocation(this._shaderProgram,"u_texture");this._webglContext.uniform1i(t,0);}};
|
|
40
|
-
|
|
41
|
-
export { x as a };
|
|
35
|
+
}`,x=class extends a{constructor(t,e){super(t,e);this.colorType="GRAYSCALE";this._positions=new Float32Array([-1,-1,-1,1,1,-1,1,-1,-1,1,1,1]);this._canvas=document.createElement("canvas");}get _webglContext(){var t;if(!this._ctx){if(this._ctx=(t=this._canvas)==null?void 0:t.getContext("webgl",{antialias:!1}),!this._ctx)throw new Error("Cannot get WebGL context");this.setup();}return this._ctx}readFromSource(t){var _,h;this.updateCanvasSizeIfNeeded(),this.updateFrameSizeIfNeeded();let e=(_=t==null?void 0:t.videoWidth)!=null?_:this._contextWebGL.drawingBufferWidth,{drawingBufferWidth:r,drawingBufferHeight:i,TEXTURE_2D:f,RGBA:o,UNSIGNED_BYTE:s,TRIANGLES:d}=this._webglContext;this._webglContext.viewport(0,0,r,i);let p=this._webglContext.getUniformLocation(this._shaderProgram,"x_spacing"),u=1/e;this._webglContext.uniform1f(p,u),this._webglContext.texImage2D(f,0,o,o,s,t),this._webglContext.drawArrays(d,0,6);let a=(h=this._framePool)==null?void 0:h.pop();if(!a)throw new Error("Frame pool found empty!");this._webglContext.readPixels(0,0,r,i,o,s,a);let b=new Uint8ClampedArray(a.buffer,0,e*i);return {width:e,height:i,data:b,colorType:"GRAYSCALE"}}setup(){this.initShaderProgram(),this.initBuffers(),this.initTexture();}dispose(){var t;this._shaderProgram&&(this._webglContext.deleteProgram(this._shaderProgram),this._shaderProgram=null),this._positionBuffer&&(this._webglContext.deleteBuffer(this._positionBuffer),this._positionBuffer=null),this._texture&&(this._webglContext.deleteTexture(this._texture),this._texture=null),this._ctx=null,(t=this._framePool)==null||t.empty(),this._canvas=void 0;}updateCanvasSizeIfNeeded(){this._canvas&&(this._canvas.width!==this._contextWebGL.drawingBufferWidth/4||this._canvas.height!==this._contextWebGL.drawingBufferHeight)&&(this._canvas.width=this._contextWebGL.drawingBufferWidth/4,this._canvas.height=this._contextWebGL.drawingBufferHeight);}updateFrameSizeIfNeeded(){var i;let{drawingBufferWidth:t,drawingBufferHeight:e}=this._webglContext,r=t*e*4;this._frameSize!==r&&(this._frameSize=t*e*4,(i=this._framePool)==null||i.empty(),this._framePool=new a$1({capacity:this._maxPoolCapacity,lowWaterMark:this._minPoolCapacity,createItem:()=>new Uint8ClampedArray(this._frameSize)}));}initShaderProgram(){let t=b(this._webglContext,this._webglContext.VERTEX_SHADER,m),e=b(this._webglContext,this._webglContext.FRAGMENT_SHADER,w);if(!t||!e)throw new Error("Shaders cannot be created");this._shaderProgram=a$2(this._webglContext,t,e),this._webglContext.useProgram(this._shaderProgram);}initBuffers(){this._positionBuffer=this._webglContext.createBuffer(),this._webglContext.bindBuffer(this._webglContext.ARRAY_BUFFER,this._positionBuffer),this._webglContext.bufferData(this._webglContext.ARRAY_BUFFER,this._positions,this._webglContext.STATIC_DRAW);let t=this._webglContext.getAttribLocation(this._shaderProgram,"a_position");this._webglContext.enableVertexAttribArray(t),this._webglContext.bindBuffer(this._webglContext.ARRAY_BUFFER,this._positionBuffer),this._webglContext.vertexAttribPointer(t,2,this._webglContext.FLOAT,!1,0,0);}initTexture(){this._texture=this._webglContext.createTexture(),this._webglContext.bindTexture(this._webglContext.TEXTURE_2D,this._texture),this._webglContext.texParameteri(this._webglContext.TEXTURE_2D,this._webglContext.TEXTURE_WRAP_S,this._webglContext.CLAMP_TO_EDGE),this._webglContext.texParameteri(this._webglContext.TEXTURE_2D,this._webglContext.TEXTURE_WRAP_T,this._webglContext.CLAMP_TO_EDGE),this._webglContext.texParameteri(this._webglContext.TEXTURE_2D,this._webglContext.TEXTURE_MIN_FILTER,this._webglContext.LINEAR),this._webglContext.texParameteri(this._webglContext.TEXTURE_2D,this._webglContext.TEXTURE_MAG_FILTER,this._webglContext.LINEAR);let t=this._webglContext.getUniformLocation(this._shaderProgram,"u_texture");this._webglContext.uniform1i(t,0);}};export{x as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a as a$1}from'./chunk-QCZSSQAQ.js';var i=Promise.resolve(),c=!1,a=!1,n,l={writableDataPath:""};async function f(e){if(n==null)return;c=!0;let t=new Promise((s,o)=>{setTimeout(()=>{o(new a$1({name:"BlockedIndexedDB",message:"IndexedDB database is blocked"}));},1500);});try{await Promise.race([new Promise((s,o)=>{n==null||n(e,r=>{if(r!=null){o(r);return}s();});}),t]);}finally{c=!1;}}async function u(e){return a||(c?(a=!0,i=i.then(async()=>(a=!1,f(e)))):i=f(e)),i}async function y(e){l=e,n=FS.syncfs,FS.syncfs=(t,s)=>{let o=s,r=S=>{o(S);};u(t).then(r).catch(r);};try{FS.mkdir(l.writableDataPath);}catch(t){if(t.code!=="EEXIST")throw n=void 0,t}return FS.mount(IDBFS,{},l.writableDataPath),u(!0)}export{y as a};
|