@scandit/web-datacapture-barcode 7.6.2 → 8.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (240) hide show
  1. package/build/js/Barcode.d.ts +1 -1
  2. package/build/js/Barcode.js +1 -1
  3. package/build/js/BarcodeBatch.js +1 -1
  4. package/build/js/BarcodeBatchBasicOverlay.js +1 -1
  5. package/build/js/BarcodeBatchSession.js +1 -1
  6. package/build/js/BarcodeBatchSettings.js +1 -1
  7. package/build/js/BarcodeCapture.js +1 -1
  8. package/build/js/BarcodeCaptureOverlay.d.ts +1 -20
  9. package/build/js/BarcodeCaptureOverlay.js +1 -1
  10. package/build/js/BarcodeCaptureSession.js +1 -1
  11. package/build/js/BarcodeCaptureSettings.js +1 -1
  12. package/build/js/Defaults.d.ts +0 -3
  13. package/build/js/Defaults.js +1 -1
  14. package/build/js/PrivateBarcodeBatchBasicOverlayListener.js +1 -1
  15. package/build/js/{SparkScanView-CInaxmG9.d.ts → SparkScanView-B5s4PDvr.d.ts} +51 -49
  16. package/build/js/TrackedBarcode.d.ts +0 -2
  17. package/build/js/TrackedBarcode.js +1 -1
  18. package/build/js/ar/BarcodeAr.js +1 -1
  19. package/build/js/ar/BarcodeArFeedback.js +1 -1
  20. package/build/js/ar/BarcodeArPresenter.d.ts +1 -0
  21. package/build/js/ar/BarcodeArPresenter.js +1 -1
  22. package/build/js/ar/BarcodeArSession.js +1 -1
  23. package/build/js/ar/BarcodeArSettings.js +1 -1
  24. package/build/js/ar/BarcodeArView.d.ts +6 -4
  25. package/build/js/ar/BarcodeArView.js +1 -1
  26. package/build/js/ar/hashedId.d.ts +2 -3
  27. package/build/js/ar/hashedId.js +1 -1
  28. package/build/js/ar/ui/atoms/BarcodeArInfoAnnotationBodyComponent.js +1 -1
  29. package/build/js/ar/ui/atoms/BarcodeArInfoAnnotationFooter.js +1 -1
  30. package/build/js/ar/ui/atoms/BarcodeArInfoAnnotationHeader.js +1 -1
  31. package/build/js/ar/ui/atoms/private/BarcodeArInfoAnnotationHeaderFooterUtils.js +1 -1
  32. package/build/js/ar/ui/atoms/private/BarcodeStatusIconContainer.js +1 -1
  33. package/build/js/ar/ui/molecules/private/ZoomSwitchButton.js +1 -1
  34. package/build/js/ar/ui/organisms/BarcodeArInfoAnnotation.js +1 -1
  35. package/build/js/ar/ui/organisms/BarcodeArPopoverAnnotation.js +1 -1
  36. package/build/js/ar/ui/organisms/BarcodeArPopoverAnnotationButton.js +1 -1
  37. package/build/js/ar/ui/organisms/BarcodeArResponsiveAnnotation.js +1 -1
  38. package/build/js/ar/ui/organisms/BarcodeArStatusIconAnnotation.js +1 -1
  39. package/build/js/ar/ui/organisms/private/CheckLayout.js +1 -1
  40. package/build/js/chunks/chunk-24QH4TBX.js +1 -0
  41. package/build/js/chunks/chunk-2BGFR4WR.js +1 -0
  42. package/build/js/chunks/chunk-3KF7PG5K.js +1 -0
  43. package/build/js/chunks/{chunk-7JPCVI74.js → chunk-55SHUUX6.js} +1 -1
  44. package/build/js/chunks/chunk-5FFSTOF2.js +1 -0
  45. package/build/js/chunks/{chunk-XXDIFCZJ.js → chunk-5P7G47HV.js} +1 -1
  46. package/build/js/chunks/chunk-5Q3AHWJL.js +2 -0
  47. package/build/js/chunks/chunk-67E6BCDR.js +1 -0
  48. package/build/js/chunks/chunk-6GGHOIBF.js +1 -0
  49. package/build/js/chunks/chunk-6HH5VZ3E.js +1 -0
  50. package/build/js/chunks/{chunk-4ID5S6I7.js → chunk-B5DM7UH2.js} +1 -1
  51. package/build/js/chunks/chunk-BD3MEJUD.js +2 -0
  52. package/build/js/chunks/{chunk-HMU4GQFX.js → chunk-BNBC2BUN.js} +1 -1
  53. package/build/js/chunks/{chunk-3UGEG7WU.js → chunk-BVROH6QT.js} +1 -1
  54. package/build/js/chunks/chunk-CIJT43OI.js +2 -0
  55. package/build/js/chunks/{chunk-OLFIL5XY.js → chunk-CLT5UZMK.js} +1 -1
  56. package/build/js/chunks/chunk-CZQR5WQJ.js +1 -0
  57. package/build/js/chunks/chunk-DAOHHWLA.js +1 -0
  58. package/build/js/chunks/chunk-DSWVSQHP.js +1 -0
  59. package/build/js/chunks/chunk-DTXWQPGN.js +1 -0
  60. package/build/js/chunks/chunk-EIGI43MX.js +1 -0
  61. package/build/js/chunks/{chunk-VJ3VETQO.js → chunk-EOI2TZRV.js} +1 -1
  62. package/build/js/chunks/{chunk-LR6JSIOR.js → chunk-FD4QVJDW.js} +1 -1
  63. package/build/js/chunks/chunk-FLBNQU3N.js +1 -0
  64. package/build/js/chunks/{chunk-TFYQKG6K.js → chunk-GHZPTMU5.js} +1 -1
  65. package/build/js/chunks/chunk-H2OHOGYY.js +1 -0
  66. package/build/js/chunks/{chunk-JZLJVB6X.js → chunk-H3URAF7U.js} +1 -1
  67. package/build/js/chunks/chunk-H7ATXKDX.js +1 -0
  68. package/build/js/chunks/chunk-HHYYL23G.js +1 -0
  69. package/build/js/chunks/{chunk-IKMOZCI6.js → chunk-HK6GAZQL.js} +1 -1
  70. package/build/js/chunks/{chunk-74HYYKNV.js → chunk-HPHWNCN6.js} +1 -1
  71. package/build/js/chunks/{chunk-YD2VGEB5.js → chunk-HQNY4HRW.js} +1 -1
  72. package/build/js/chunks/chunk-I6NAW3SE.js +1 -0
  73. package/build/js/chunks/{chunk-6BZ6LQZN.js → chunk-ISP2EL77.js} +1 -1
  74. package/build/js/chunks/chunk-J6JJCRRM.js +1 -0
  75. package/build/js/chunks/{chunk-IHTTMWUR.js → chunk-JAFW53OO.js} +1 -1
  76. package/build/js/chunks/chunk-JGFR6EJT.js +1 -0
  77. package/build/js/chunks/chunk-JIUTBKIH.js +1 -0
  78. package/build/js/chunks/chunk-JUAJVG4Z.js +1 -0
  79. package/build/js/chunks/{chunk-ZBWUSH2F.js → chunk-K37AJSFT.js} +1 -1
  80. package/build/js/chunks/chunk-KELYPKGG.js +1 -0
  81. package/build/js/chunks/{chunk-XS6RV73B.js → chunk-KEN6J62X.js} +1 -1
  82. package/build/js/chunks/chunk-LDSPZMGQ.js +1 -0
  83. package/build/js/chunks/chunk-LS23W7YO.js +1 -0
  84. package/build/js/chunks/chunk-LWUFGA5M.js +1 -0
  85. package/build/js/chunks/chunk-MHOUYN7K.js +1 -0
  86. package/build/js/chunks/{chunk-5URXITXR.js → chunk-MHRGFVAW.js} +1 -1
  87. package/build/js/chunks/{chunk-V633PC7B.js → chunk-MPJZZO46.js} +1 -1
  88. package/build/js/chunks/chunk-MVLSFC5H.js +1 -0
  89. package/build/js/chunks/chunk-MZMVPI2R.js +1 -0
  90. package/build/js/chunks/{chunk-ZXTRTKEZ.js → chunk-NMXU6D43.js} +1 -1
  91. package/build/js/chunks/chunk-O5SUMSOC.js +1 -0
  92. package/build/js/chunks/{chunk-B5IOSUX4.js → chunk-OH47PSIL.js} +1 -1
  93. package/build/js/chunks/chunk-OSA7SQXU.js +1 -0
  94. package/build/js/chunks/{chunk-LTNZJEG4.js → chunk-P5CMCE4O.js} +1 -1
  95. package/build/js/chunks/chunk-PWOUGPGH.js +1 -0
  96. package/build/js/chunks/{chunk-QIOYMBBP.js → chunk-QRG4J3CL.js} +1 -1
  97. package/build/js/chunks/chunk-RU7XJPB3.js +1 -0
  98. package/build/js/chunks/chunk-RUZMLCEP.js +1 -0
  99. package/build/js/chunks/chunk-SDQOQ2G3.js +1 -0
  100. package/build/js/chunks/{chunk-D26TRBZS.js → chunk-SNPWBV7Y.js} +1 -1
  101. package/build/js/chunks/chunk-TC4DIIXB.js +1 -0
  102. package/build/js/chunks/chunk-TKSABJXC.js +1 -0
  103. package/build/js/chunks/{chunk-KQ3LRAYO.js → chunk-TRITJ43A.js} +2 -2
  104. package/build/js/chunks/chunk-TWKUTHXG.js +1 -0
  105. package/build/js/chunks/{chunk-LBKCNRLC.js → chunk-TZVKWSP7.js} +1 -1
  106. package/build/js/chunks/{chunk-YWNGCXKZ.js → chunk-V6XWYJR2.js} +1 -1
  107. package/build/js/chunks/{chunk-VDTD5MFE.js → chunk-VD5CFXJU.js} +1 -1
  108. package/build/js/chunks/chunk-WLAU6P6H.js +1 -0
  109. package/build/js/chunks/chunk-WLJK44YN.js +1 -0
  110. package/build/js/chunks/chunk-XKXYG775.js +1 -0
  111. package/build/js/chunks/{chunk-JKO4EZPZ.js → chunk-Z4UVSYU5.js} +1 -1
  112. package/build/js/chunks/{chunk-VI4LSPO6.js → chunk-ZQJQKBX6.js} +1 -1
  113. package/build/js/find/BarcodeFind.js +1 -1
  114. package/build/js/find/BarcodeFindFeedback.js +1 -1
  115. package/build/js/find/BarcodeFindPresenter.js +1 -1
  116. package/build/js/find/BarcodeFindSession.js +1 -1
  117. package/build/js/find/BarcodeFindSettings.js +1 -1
  118. package/build/js/find/BarcodeFindView.js +1 -1
  119. package/build/js/find/index.js +1 -1
  120. package/build/js/find/ui/atoms/BarcodeSvgIcon.js +1 -1
  121. package/build/js/find/ui/atoms/CardListButton.js +1 -1
  122. package/build/js/find/ui/atoms/Dot.js +1 -1
  123. package/build/js/find/ui/atoms/ExitSvgIcon.js +1 -1
  124. package/build/js/find/ui/atoms/ItemFoundSvgIcon.js +1 -1
  125. package/build/js/find/ui/atoms/TorchOffSvgIcon.js +1 -1
  126. package/build/js/find/ui/atoms/TorchOnSvgIcon.js +1 -1
  127. package/build/js/find/ui/molecules/CardListContainer.js +1 -1
  128. package/build/js/find/ui/molecules/ImageAndTextCardLayout.js +1 -1
  129. package/build/js/find/ui/molecules/ProgressBarWithLabel.js +1 -1
  130. package/build/js/find/ui/molecules/TorchIconButton.js +1 -1
  131. package/build/js/find/ui/organisms/FindLayout.js +1 -1
  132. package/build/js/index.d.ts +2 -3
  133. package/build/js/index.js +1 -1
  134. package/build/js/moduleLoader.js +1 -1
  135. package/build/js/private/sandbox.js +1 -1
  136. package/build/js/spark/SparkScan.js +1 -1
  137. package/build/js/spark/SparkScanAnalyticsManager.d.ts +0 -3
  138. package/build/js/spark/SparkScanAnalyticsManager.js +1 -1
  139. package/build/js/spark/SparkScanBarcodeFeedback.js +1 -1
  140. package/build/js/spark/SparkScanOverlay.js +1 -1
  141. package/build/js/spark/SparkScanSession.js +1 -1
  142. package/build/js/spark/SparkScanSettings.js +1 -1
  143. package/build/js/spark/SparkScanTargetAimerViewfinder.js +1 -1
  144. package/build/js/spark/index.d.ts +1 -2
  145. package/build/js/spark/index.js +1 -1
  146. package/build/js/spark/ui/SparkScanView.d.ts +1 -2
  147. package/build/js/spark/ui/SparkScanView.js +1 -1
  148. package/build/js/spark/ui/SparkScanViewFeedbackManager.js +1 -1
  149. package/build/js/spark/ui/SparkScanViewIcon.js +1 -1
  150. package/build/js/spark/ui/SparkScanViewMiniPreview.js +1 -1
  151. package/build/js/spark/ui/SparkScanViewPresenter.d.ts +27 -13
  152. package/build/js/spark/ui/SparkScanViewPresenter.js +1 -1
  153. package/build/js/spark/ui/SparkScanViewSettings.d.ts +0 -6
  154. package/build/js/spark/ui/SparkScanViewSettings.js +1 -1
  155. package/build/js/spark/ui/SparkScanViewStateManager.d.ts +3 -1
  156. package/build/js/spark/ui/SparkScanViewStateManager.js +1 -1
  157. package/build/js/spark/ui/SparkScanViewToast.js +1 -1
  158. package/build/js/spark/ui/SparkScanViewToolbar.js +1 -1
  159. package/build/js/spark/ui/SparkScanViewTriggerButton.js +1 -1
  160. package/build/js/spark/ui/SparkScanViewUiListener.d.ts +1 -2
  161. package/build/js/spark/ui/index.d.ts +1 -2
  162. package/build/js/spark/ui/index.js +1 -1
  163. package/build/js/worker/BarcodeArMode.d.ts +1 -2
  164. package/build/js/worker/BarcodeBatchMode.d.ts +1 -2
  165. package/build/js/worker/BarcodeCaptureMode.d.ts +1 -2
  166. package/build/js/worker/BarcodeCaptureWorkerManager.d.ts +1 -2
  167. package/build/js/worker/BarcodeCaptureWorkerManager.js +1 -1
  168. package/build/js/worker/BarcodeFindMode.d.ts +1 -2
  169. package/build/js/worker/PropertyPushSource.d.ts +0 -1
  170. package/build/js/worker/PropertyPushSource.js +1 -1
  171. package/build/js/worker/SparkScanMode.d.ts +1 -2
  172. package/build/js/worker/SparkScanMode.js +1 -1
  173. package/build/js/worker/WorkerMain.d.ts +1 -2
  174. package/build/js/worker/WorkerMain.js +1 -1
  175. package/build/js/worker/barcodeCapture.inlineWorker.js +1 -1
  176. package/build/js/worker/dataCaptureEngine.d.ts +1 -2
  177. package/build/js/worker/dataCaptureEngine.js +1 -1
  178. package/build/js/worker/dataCaptureWorkerRelated.d.ts +1 -2
  179. package/build/js/worker/index.d.ts +1 -2
  180. package/package.json +2 -2
  181. package/sdc-lib/resources/models/barcode_keypoints_oned.43a682cdf24a.model +0 -0
  182. package/sdc-lib/resources/models/text_semantics_ocr_detector.290bf42945e3.model +0 -0
  183. package/sdc-lib/scandit-datacapture-sdk-barcode-pthreads.js +1 -1
  184. package/sdc-lib/scandit-datacapture-sdk-barcode-pthreads.wasm +0 -0
  185. package/sdc-lib/scandit-datacapture-sdk-barcode-simd-pthreads.js +1 -1
  186. package/sdc-lib/scandit-datacapture-sdk-barcode-simd-pthreads.wasm +0 -0
  187. package/sdc-lib/scandit-datacapture-sdk-barcode-simd.js +1 -1
  188. package/sdc-lib/scandit-datacapture-sdk-barcode-simd.wasm +0 -0
  189. package/sdc-lib/scandit-datacapture-sdk-barcode.js +1 -1
  190. package/sdc-lib/scandit-datacapture-sdk-barcode.wasm +0 -0
  191. package/build/js/chunks/chunk-44A2C43B.js +0 -1
  192. package/build/js/chunks/chunk-5GGUCEGU.js +0 -18
  193. package/build/js/chunks/chunk-5H6MDO64.js +0 -1
  194. package/build/js/chunks/chunk-6UIDWTVF.js +0 -1
  195. package/build/js/chunks/chunk-7J6MRLL2.js +0 -5
  196. package/build/js/chunks/chunk-AAXGDI2V.js +0 -130
  197. package/build/js/chunks/chunk-AO7NE6M4.js +0 -14
  198. package/build/js/chunks/chunk-DOA2Q3CZ.js +0 -344
  199. package/build/js/chunks/chunk-DQVSIMLI.js +0 -4
  200. package/build/js/chunks/chunk-E5VXP5J4.js +0 -1
  201. package/build/js/chunks/chunk-EWLALL5J.js +0 -5
  202. package/build/js/chunks/chunk-FFSV4P4N.js +0 -1
  203. package/build/js/chunks/chunk-FY3X5JRD.js +0 -1
  204. package/build/js/chunks/chunk-HFXWQGKV.js +0 -6
  205. package/build/js/chunks/chunk-IHFZ5YLD.js +0 -1
  206. package/build/js/chunks/chunk-JMUNN3HX.js +0 -1
  207. package/build/js/chunks/chunk-JQF6P6X7.js +0 -1
  208. package/build/js/chunks/chunk-KAEWVPFY.js +0 -7
  209. package/build/js/chunks/chunk-L2JLFSNM.js +0 -1
  210. package/build/js/chunks/chunk-M7AZ5E5Z.js +0 -1
  211. package/build/js/chunks/chunk-OIFWCYQI.js +0 -4
  212. package/build/js/chunks/chunk-OLJXVUYE.js +0 -1
  213. package/build/js/chunks/chunk-OQVPV5PW.js +0 -5
  214. package/build/js/chunks/chunk-OTZPCIBD.js +0 -1
  215. package/build/js/chunks/chunk-OXYHO7V6.js +0 -1
  216. package/build/js/chunks/chunk-QZGFNS2K.js +0 -7
  217. package/build/js/chunks/chunk-R3B72E4T.js +0 -1
  218. package/build/js/chunks/chunk-RRDBBGFY.js +0 -1
  219. package/build/js/chunks/chunk-RXRQ4VLH.js +0 -1
  220. package/build/js/chunks/chunk-SEJXDETX.js +0 -16
  221. package/build/js/chunks/chunk-TVOA4PCD.js +0 -1
  222. package/build/js/chunks/chunk-UXI6I6RZ.js +0 -1
  223. package/build/js/chunks/chunk-WGZHL6TO.js +0 -16
  224. package/build/js/chunks/chunk-WICRT6CF.js +0 -1
  225. package/build/js/chunks/chunk-WRTJHOS5.js +0 -6
  226. package/build/js/chunks/chunk-XGPORK2H.js +0 -9
  227. package/build/js/chunks/chunk-XGY5EQR4.js +0 -6
  228. package/build/js/chunks/chunk-XLC2JHJV.js +0 -16
  229. package/build/js/chunks/chunk-XSJEGOGN.js +0 -41
  230. package/build/js/chunks/chunk-Y7MGQSD5.js +0 -2
  231. package/build/js/chunks/chunk-YH5IBNOK.js +0 -21
  232. package/build/js/chunks/chunk-YJ42KEYE.js +0 -32
  233. package/build/js/chunks/chunk-YQNNEW67.js +0 -117
  234. package/build/js/chunks/chunk-ZZ64BDE5.js +0 -211
  235. package/build/js/chunks/chunk-ZZQLFO35.js +0 -35
  236. package/build/js/spark/ui/SparkScanViewHandMode.d.ts +0 -9
  237. package/build/js/spark/ui/SparkScanViewHandMode.js +0 -1
  238. package/build/js/spark/ui/utils/html.d.ts +0 -3
  239. package/build/js/spark/ui/utils/html.js +0 -1
  240. /package/build/js/chunks/{chunk-ZHUG3MJ6.js → chunk-VFPCZE2A.js} +0 -0
@@ -0,0 +1 @@
1
+ import {a}from'./chunk-4PTIOBXM.js';import {a as a$1}from'./chunk-OEYNGWOX.js';import {a as a$2}from'./chunk-LBAL6OCN.js';import {CameraSettings,Color,CameraPosition,TorchState,VideoResolution,FocusGestureStrategy,MeasureUnit}from'@scandit/web-datacapture-core';import {fromEntries}from'@scandit/web-datacapture-core/build/js/private/utils/fromEntries.js';var f=e=>({SymbologySettings:Object.keys(e.SymbologySettings).reduce((t,o)=>(t[o]=a$2.fromJSON(JSON.parse(e.SymbologySettings[o])),t),{}),SymbologyDescriptions:e.SymbologyDescriptions.map(t=>a$1.fromJSON(JSON.parse(t))),CompositeTypeDescriptions:e.CompositeTypeDescriptions.map(t=>JSON.parse(t)),BarcodeCapture:{BarcodeCaptureOverlay:{DefaultBrush:{fillColor:Color.fromJSON(e.BarcodeCapture.BarcodeCaptureOverlay.DefaultBrush.fillColor),strokeColor:Color.fromJSON(e.BarcodeCapture.BarcodeCaptureOverlay.DefaultBrush.strokeColor),strokeWidth:e.BarcodeCapture.BarcodeCaptureOverlay.DefaultBrush.strokeWidth},styles:fromEntries(Object.keys(e.BarcodeCapture.BarcodeCaptureOverlay.styles).map(t=>[t,{DefaultBrush:{fillColor:Color.fromJSON(e.BarcodeCapture.BarcodeCaptureOverlay.styles[t].DefaultBrush.fillColor),strokeColor:Color.fromJSON(e.BarcodeCapture.BarcodeCaptureOverlay.styles[t].DefaultBrush.strokeColor),strokeWidth:e.BarcodeCapture.BarcodeCaptureOverlay.styles[t].DefaultBrush.strokeWidth}}]))},BarcodeCaptureSettings:{codeDuplicateFilter:e.BarcodeCapture.BarcodeCaptureSettings.codeDuplicateFilter},RecommendedCameraSettings:CameraSettings.fromJSON(e.BarcodeCapture.RecommendedCameraSettings)},BarcodeBatch:{BarcodeBatchBasicOverlay:{defaultStyle:e.BarcodeBatch.BarcodeBatchBasicOverlay.defaultStyle,DefaultBrush:{fillColor:Color.fromJSON(e.BarcodeBatch.BarcodeBatchBasicOverlay.DefaultBrush.fillColor),strokeColor:Color.fromJSON(e.BarcodeBatch.BarcodeBatchBasicOverlay.DefaultBrush.strokeColor),strokeWidth:e.BarcodeBatch.BarcodeBatchBasicOverlay.DefaultBrush.strokeWidth},styles:fromEntries(Object.keys(e.BarcodeBatch.BarcodeBatchBasicOverlay.styles).map(t=>[t,{DefaultBrush:{fillColor:Color.fromJSON(e.BarcodeBatch.BarcodeBatchBasicOverlay.styles[t].DefaultBrush.fillColor),strokeColor:Color.fromJSON(e.BarcodeBatch.BarcodeBatchBasicOverlay.styles[t].DefaultBrush.strokeColor),strokeWidth:e.BarcodeBatch.BarcodeBatchBasicOverlay.styles[t].DefaultBrush.strokeWidth}}]))},RecommendedCameraSettings:CameraSettings.fromJSON(e.BarcodeBatch.RecommendedCameraSettings)},BarcodeFind:{CameraSettings:{hiddenProperties:{exposureTargetBias:e.BarcodeFind.CameraSettings.hiddenProperties.exposureTargetBias,grayScaleFrameReader:e.BarcodeFind.CameraSettings.hiddenProperties.grayScaleFrameReader},settings:CameraSettings.fromJSON(e.BarcodeFind.CameraSettings.settings)},BarcodeFindViewSettings:{settings:a.fromJSON(e.BarcodeFind.BarcodeFindViewSettings.settings)}},SparkScan:{SparkScanFeedback:{errorVibrationPattern:e.SparkScan.SparkScanFeedback.errorVibrationPattern},SparkScanSettings:{codeDuplicateFilter:e.SparkScan.SparkScanSettings.codeDuplicateFilter,locationSelection:{radius:e.SparkScan.SparkScanSettings.locationSelection.radius,unit:e.SparkScan.SparkScanSettings.locationSelection.unit},targetModeLocationSelection:{radius:e.SparkScan.SparkScanSettings.targetModeLocationSelection.radius,unit:e.SparkScan.SparkScanSettings.targetModeLocationSelection.unit}},SparkScanOverlay:{DefaultBrush:{fillColor:Color.fromJSON(e.SparkScan.SparkScanOverlay.DefaultBrush.fillColor),strokeColor:Color.fromJSON(e.SparkScan.SparkScanOverlay.DefaultBrush.strokeColor),strokeWidth:e.SparkScan.SparkScanOverlay.DefaultBrush.strokeWidth},defaultStyle:"frame"},CameraSettings:{hiddenProperties:{exposureTargetBias:e.SparkScan.CameraSettings.hiddenProperties.exposureTargetBias,grayScaleFrameReader:e.SparkScan.CameraSettings.hiddenProperties.grayScaleFrameReader,repeatedTriggerInterval:e.SparkScan.CameraSettings.hiddenProperties.repeatedTriggerInterval},settings:CameraSettings.fromJSON(e.SparkScan.CameraSettings.settings)},SparkScanViewSettings:{triggerButtonCollapseTimeout:e.SparkScan.SparkScanViewSettings.triggerButtonCollapseTimeout,defaultTorchState:e.SparkScan.SparkScanViewSettings.defaultTorchState,defaultMiniPreviewSize:e.SparkScan.SparkScanViewSettings.defaultMiniPreviewSize,defaultCameraPosition:e.SparkScan.SparkScanViewSettings.defaultCameraPosition,soundEnabled:e.SparkScan.SparkScanViewSettings.soundEnabled,hapticEnabled:e.SparkScan.SparkScanViewSettings.hapticEnabled,holdToScanEnabled:e.SparkScan.SparkScanViewSettings.holdToScanEnabled,visualFeedbackEnabled:e.SparkScan.SparkScanViewSettings.visualFeedbackEnabled,inactiveStateTimeout:e.SparkScan.SparkScanViewSettings.inactiveStateTimeout,zoomFactorOut:e.SparkScan.SparkScanViewSettings.zoomFactorOut,zoomFactorIn:e.SparkScan.SparkScanViewSettings.zoomFactorIn}},SparkCapture:{SparkCaptureSettings:{codeDuplicateFilter:e.SparkCapture.SparkCaptureSettings.codeDuplicateFilter}}}),u=f({BarcodeCapture:{BarcodeCaptureSettings:{codeDuplicateFilter:-2},BarcodeCaptureOverlay:{DefaultBrush:{fillColor:"#00FFFF66",strokeColor:"#00FFFF66",strokeWidth:3},styles:{frame:{DefaultBrush:{fillColor:"#00FFFF66",strokeColor:"#00FFFF66",strokeWidth:3}}}},RecommendedCameraSettings:{zoomFactor:1,zoomGestureZoomFactor:2,focusGestureStrategy:"manualUntilCapture",preferredResolution:"fullHd"}},SymbologySettings:{ean13Upca:JSON.stringify({activeSymbolCounts:[12],checksums:[],colorInvertedEnabled:false,enabled:false,extensions:[]}),ean8:JSON.stringify({activeSymbolCounts:[8],checksums:[],colorInvertedEnabled:false,enabled:false,extensions:[]}),upce:JSON.stringify({activeSymbolCounts:[6],checksums:[],colorInvertedEnabled:false,enabled:false,extensions:[]}),code128:JSON.stringify({activeSymbolCounts:[40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6],checksums:[],colorInvertedEnabled:false,enabled:false,extensions:["strip_leading_fnc1"]}),code39:JSON.stringify({activeSymbolCounts:[40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6],checksums:[],colorInvertedEnabled:false,enabled:false,extensions:[]}),code93:JSON.stringify({activeSymbolCounts:[40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6],checksums:[],colorInvertedEnabled:false,enabled:false,extensions:[]}),interleavedTwoOfFive:JSON.stringify({activeSymbolCounts:[40,38,36,34,32,30,28,26,24,22,20,18,16,14,12,10,8,6],checksums:[],colorInvertedEnabled:false,enabled:false,extensions:[]}),qr:JSON.stringify({activeSymbolCounts:[],checksums:[],colorInvertedEnabled:false,enabled:false,extensions:[]}),dataMatrix:JSON.stringify({activeSymbolCounts:[],checksums:[],colorInvertedEnabled:false,enabled:false,extensions:["strip_leading_fnc1"]}),pdf417:JSON.stringify({activeSymbolCounts:[],checksums:[],colorInvertedEnabled:false,enabled:false,extensions:[]}),msiPlessey:JSON.stringify({activeSymbolCounts:[32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6],checksums:[],colorInvertedEnabled:false,enabled:false,extensions:[]}),databar:JSON.stringify({activeSymbolCounts:[2],checksums:[],colorInvertedEnabled:false,enabled:false,extensions:[]}),databarExpanded:JSON.stringify({activeSymbolCounts:[],checksums:[],colorInvertedEnabled:false,enabled:false,extensions:[]}),codabar:JSON.stringify({activeSymbolCounts:[20,19,18,17,16,15,14,13,12,11,10,9,8,7],checksums:[],colorInvertedEnabled:false,enabled:false,extensions:[]}),aztec:JSON.stringify({activeSymbolCounts:[],checksums:[],colorInvertedEnabled:false,enabled:false,extensions:[]}),maxicode:JSON.stringify({activeSymbolCounts:[],checksums:[],colorInvertedEnabled:false,enabled:false,extensions:[]}),code11:JSON.stringify({activeSymbolCounts:[20,19,18,17,16,15,14,13,12,11,10,9,8,7],checksums:["mod11"],colorInvertedEnabled:false,enabled:false,extensions:[]}),databarLimited:JSON.stringify({activeSymbolCounts:[1],checksums:[],colorInvertedEnabled:false,enabled:false,extensions:[]}),code25:JSON.stringify({activeSymbolCounts:[20,19,18,17,16,15,14,13,12,11,10,9,8,7],checksums:[],colorInvertedEnabled:false,enabled:false,extensions:[]}),microPdf417:JSON.stringify({activeSymbolCounts:[],checksums:[],colorInvertedEnabled:false,enabled:false,extensions:[]}),"royal-mail-4state":JSON.stringify({activeSymbolCounts:[24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7],checksums:[],colorInvertedEnabled:false,enabled:false,extensions:[]}),kix:JSON.stringify({activeSymbolCounts:[24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7],checksums:[],colorInvertedEnabled:false,enabled:false,extensions:[]}),dotcode:JSON.stringify({activeSymbolCounts:[],checksums:[],colorInvertedEnabled:false,enabled:false,extensions:[]}),microQr:JSON.stringify({activeSymbolCounts:[],checksums:[],colorInvertedEnabled:false,enabled:false,extensions:[]}),code32:JSON.stringify({activeSymbolCounts:[8],checksums:[],colorInvertedEnabled:false,enabled:false,extensions:[]}),lapa4sc:JSON.stringify({activeSymbolCounts:[16],checksums:[],colorInvertedEnabled:false,enabled:false,extensions:[]}),iata2of5:JSON.stringify({activeSymbolCounts:[20,19,18,17,16,15,14,13,12,11,10,9,8,7],checksums:[],colorInvertedEnabled:false,enabled:false,extensions:[]}),matrix2of5:JSON.stringify({activeSymbolCounts:[20,19,18,17,16,15,14,13,12,11,10,9,8,7],checksums:[],colorInvertedEnabled:false,enabled:false,extensions:[]}),uspsIntelligentMail:JSON.stringify({activeSymbolCounts:[65],checksums:[],colorInvertedEnabled:false,enabled:false,extensions:[]}),aruco:JSON.stringify({activeSymbolCounts:[],checksums:[],colorInvertedEnabled:false,enabled:false,extensions:[]})},BarcodeBatch:{BarcodeBatchBasicOverlay:{defaultStyle:"frame",DefaultBrush:{fillColor:"#00000000",strokeColor:"#FFFFFFFF",strokeWidth:3},styles:{frame:{DefaultBrush:{fillColor:"#00FFFF73",strokeColor:"#00FFFF",strokeWidth:3}},dot:{DefaultBrush:{fillColor:"#00FFFF73",strokeColor:"#00FFFF",strokeWidth:1}},legacy:{DefaultBrush:{fillColor:"#00000000",strokeColor:"#FFFFFFFF",strokeWidth:1}}}},RecommendedCameraSettings:{zoomFactor:1,zoomGestureZoomFactor:2,focusGestureStrategy:"manualUntilCapture",preferredResolution:"fullHd"}},BarcodeFind:{CameraSettings:{hiddenProperties:{exposureTargetBias:-1,grayScaleFrameReader:true},settings:{zoomFactor:1,zoomGestureZoomFactor:1,focusGestureStrategy:"manualUntilCapture",preferredResolution:"fullHd"}},BarcodeFindViewSettings:{settings:{inListItemColor:Color.fromHex("#2EC1CE").toJSON(),notInListItemColor:Color.fromHex("#FFFFFF").toJSON(),hapticEnabled:true,soundEnabled:true}}},SparkScan:{SparkScanFeedback:{errorVibrationPattern:[600]},SparkScanSettings:{codeDuplicateFilter:-2,locationSelection:{radius:.5,unit:MeasureUnit.Fraction},targetModeLocationSelection:{radius:.07,unit:MeasureUnit.Fraction}},SparkScanOverlay:{DefaultBrush:{fillColor:"#00FFFF66",strokeColor:"#00FFFF66",strokeWidth:3},defaultStyle:"frame"},CameraSettings:{hiddenProperties:{exposureTargetBias:-1,grayScaleFrameReader:true,repeatedTriggerInterval:1},settings:{focus:{focusGestureStrategy:FocusGestureStrategy.None},preferredResolution:VideoResolution.FullHD,zoomFactor:1,zoomGestureZoomFactor:2}},SparkScanViewSettings:{defaultTorchState:TorchState.Off,defaultMiniPreviewSize:"regular",defaultCameraPosition:CameraPosition.WorldFacing,hapticEnabled:true,holdToScanEnabled:true,soundEnabled:true,triggerButtonCollapseTimeout:5e3,visualFeedbackEnabled:true,inactiveStateTimeout:1e4,zoomFactorOut:1,zoomFactorIn:2}},CompositeTypeDescriptions:[JSON.stringify({symbologies:["ean8","ean13Upca","microPdf417","databarLimited","upce","databar","databarExpanded"],types:["A"]}),JSON.stringify({symbologies:["ean8","ean13Upca","microPdf417","databarLimited","upce","databar","databarExpanded"],types:["B"]}),JSON.stringify({symbologies:["code128","pdf417"],types:["C"]})],SparkCapture:{SparkCaptureSettings:{codeDuplicateFilter:1e3}},SymbologyDescriptions:[JSON.stringify({activeSymbolCountRange:{maximum:12,minimum:12,step:1},defaultSymbolCountRange:{maximum:12,minimum:12,step:1},identifier:"ean13Upca",isAvailable:true,isColorInvertible:true,readableName:"EAN-13/UPC-A",supportedChecksums:[],supportedExtensions:["two_digit_add_on","strict","remove_leading_upca_zero","relaxed_sharp_quiet_zone_check","five_digit_add_on"]}),JSON.stringify({activeSymbolCountRange:{maximum:8,minimum:8,step:1},defaultSymbolCountRange:{maximum:8,minimum:8,step:1},identifier:"ean8",isAvailable:true,isColorInvertible:true,readableName:"EAN-8",supportedChecksums:[],supportedExtensions:["two_digit_add_on","strict","relaxed_sharp_quiet_zone_check","five_digit_add_on"]}),JSON.stringify({activeSymbolCountRange:{maximum:6,minimum:6,step:1},defaultSymbolCountRange:{maximum:6,minimum:6,step:1},identifier:"upce",isAvailable:true,isColorInvertible:true,readableName:"UPC-E",supportedChecksums:[],supportedExtensions:["two_digit_add_on","strict","return_as_upca","remove_leading_upca_zero","five_digit_add_on"]}),JSON.stringify({activeSymbolCountRange:{maximum:50,minimum:4,step:1},defaultSymbolCountRange:{maximum:40,minimum:6,step:1},identifier:"code128",isAvailable:true,isColorInvertible:true,readableName:"Code 128",supportedChecksums:[],supportedExtensions:["strict"]}),JSON.stringify({activeSymbolCountRange:{maximum:50,minimum:3,step:1},defaultSymbolCountRange:{maximum:40,minimum:6,step:1},identifier:"code39",isAvailable:true,isColorInvertible:true,readableName:"Code 39",supportedChecksums:["mod43"],supportedExtensions:["strict","relaxed_sharp_quiet_zone_check","full_ascii"]}),JSON.stringify({activeSymbolCountRange:{maximum:60,minimum:5,step:1},defaultSymbolCountRange:{maximum:40,minimum:6,step:1},identifier:"code93",isAvailable:true,isColorInvertible:false,readableName:"Code 93",supportedChecksums:[],supportedExtensions:["strict"]}),JSON.stringify({activeSymbolCountRange:{maximum:50,minimum:4,step:2},defaultSymbolCountRange:{maximum:40,minimum:6,step:2},identifier:"interleavedTwoOfFive",isAvailable:true,isColorInvertible:false,readableName:"Interleaved Two of Five",supportedChecksums:[],supportedExtensions:["strict"]}),JSON.stringify({activeSymbolCountRange:{maximum:0,minimum:0,step:0},defaultSymbolCountRange:{maximum:0,minimum:0,step:0},identifier:"qr",isAvailable:true,isColorInvertible:true,readableName:"QR Code",supportedChecksums:[],supportedExtensions:["guess_encoding"]}),JSON.stringify({activeSymbolCountRange:{maximum:0,minimum:0,step:0},defaultSymbolCountRange:{maximum:0,minimum:0,step:0},identifier:"dataMatrix",isAvailable:true,isColorInvertible:true,readableName:"Data Matrix",supportedChecksums:[],supportedExtensions:["direct_part_marking_mode"]}),JSON.stringify({activeSymbolCountRange:{maximum:0,minimum:0,step:0},defaultSymbolCountRange:{maximum:0,minimum:0,step:0},identifier:"pdf417",isAvailable:true,isColorInvertible:false,readableName:"PDF417",supportedChecksums:[],supportedExtensions:[]}),JSON.stringify({activeSymbolCountRange:{maximum:32,minimum:3,step:1},defaultSymbolCountRange:{maximum:32,minimum:6,step:1},identifier:"msiPlessey",isAvailable:true,isColorInvertible:false,readableName:"MSI Plessey",supportedChecksums:["mod11","mod1010","mod1110"],supportedExtensions:["strict"]}),JSON.stringify({activeSymbolCountRange:{maximum:2,minimum:2,step:1},defaultSymbolCountRange:{maximum:2,minimum:2,step:1},identifier:"databar",isAvailable:true,isColorInvertible:false,readableName:"GS1 DataBar 14",supportedChecksums:[],supportedExtensions:["strict"]}),JSON.stringify({activeSymbolCountRange:{maximum:0,minimum:0,step:0},defaultSymbolCountRange:{maximum:0,minimum:0,step:0},identifier:"databarExpanded",isAvailable:true,isColorInvertible:false,readableName:"GS1 DataBar Expanded",supportedChecksums:[],supportedExtensions:["strict"]}),JSON.stringify({activeSymbolCountRange:{maximum:34,minimum:3,step:1},defaultSymbolCountRange:{maximum:20,minimum:7,step:1},identifier:"codabar",isAvailable:true,isColorInvertible:false,readableName:"Codabar",supportedChecksums:["mod11","mod16"],supportedExtensions:["strict"]}),JSON.stringify({activeSymbolCountRange:{maximum:0,minimum:0,step:0},defaultSymbolCountRange:{maximum:0,minimum:0,step:0},identifier:"aztec",isAvailable:true,isColorInvertible:false,readableName:"Aztec",supportedChecksums:[],supportedExtensions:[]}),JSON.stringify({activeSymbolCountRange:{maximum:0,minimum:0,step:0},defaultSymbolCountRange:{maximum:0,minimum:0,step:0},identifier:"maxicode",isAvailable:true,isColorInvertible:false,readableName:"MaxiCode",supportedChecksums:[],supportedExtensions:[]}),JSON.stringify({activeSymbolCountRange:{maximum:34,minimum:5,step:1},defaultSymbolCountRange:{maximum:20,minimum:7,step:1},identifier:"code11",isAvailable:true,isColorInvertible:false,readableName:"Code 11",supportedChecksums:["mod11"],supportedExtensions:["strict"]}),JSON.stringify({activeSymbolCountRange:{maximum:1,minimum:1,step:1},defaultSymbolCountRange:{maximum:1,minimum:1,step:1},identifier:"databarLimited",isAvailable:true,isColorInvertible:false,readableName:"GS1 DataBar Limited",supportedChecksums:[],supportedExtensions:["strict"]}),JSON.stringify({activeSymbolCountRange:{maximum:32,minimum:3,step:1},defaultSymbolCountRange:{maximum:20,minimum:7,step:1},identifier:"code25",isAvailable:true,isColorInvertible:false,readableName:"Code 25",supportedChecksums:[],supportedExtensions:["strict"]}),JSON.stringify({activeSymbolCountRange:{maximum:0,minimum:0,step:0},defaultSymbolCountRange:{maximum:0,minimum:0,step:0},identifier:"microPdf417",isAvailable:true,isColorInvertible:false,readableName:"MicroPDF417",supportedChecksums:[],supportedExtensions:[]}),JSON.stringify({activeSymbolCountRange:{maximum:50,minimum:4,step:1},defaultSymbolCountRange:{maximum:24,minimum:7,step:1},identifier:"royal-mail-4state",isAvailable:true,isColorInvertible:false,readableName:"Royal Mail 4 State",supportedChecksums:[],supportedExtensions:[]}),JSON.stringify({activeSymbolCountRange:{maximum:50,minimum:4,step:1},defaultSymbolCountRange:{maximum:24,minimum:7,step:1},identifier:"kix",isAvailable:true,isColorInvertible:false,readableName:"KIX",supportedChecksums:[],supportedExtensions:[]}),JSON.stringify({activeSymbolCountRange:{maximum:0,minimum:0,step:0},defaultSymbolCountRange:{maximum:0,minimum:0,step:0},identifier:"dotcode",isAvailable:true,isColorInvertible:true,readableName:"DotCode",supportedChecksums:[],supportedExtensions:[]}),JSON.stringify({activeSymbolCountRange:{maximum:0,minimum:0,step:0},defaultSymbolCountRange:{maximum:0,minimum:0,step:0},identifier:"microQr",isAvailable:true,isColorInvertible:true,readableName:"Micro QR",supportedChecksums:[],supportedExtensions:[]}),JSON.stringify({activeSymbolCountRange:{maximum:8,minimum:8,step:1},defaultSymbolCountRange:{maximum:8,minimum:8,step:1},identifier:"code32",isAvailable:true,isColorInvertible:false,readableName:"Code 32",supportedChecksums:[],supportedExtensions:["strict"]}),JSON.stringify({activeSymbolCountRange:{maximum:16,minimum:16,step:1},defaultSymbolCountRange:{maximum:16,minimum:16,step:1},identifier:"lapa4sc",isAvailable:true,isColorInvertible:false,readableName:"LAPA4SC",supportedChecksums:[],supportedExtensions:[]}),JSON.stringify({activeSymbolCountRange:{maximum:32,minimum:3,step:1},defaultSymbolCountRange:{maximum:20,minimum:7,step:1},identifier:"iata2of5",isAvailable:true,isColorInvertible:false,readableName:"IATA 2 of 5",supportedChecksums:["mod1010"],supportedExtensions:["strict"]}),JSON.stringify({activeSymbolCountRange:{maximum:32,minimum:3,step:1},defaultSymbolCountRange:{maximum:20,minimum:7,step:1},identifier:"matrix2of5",isAvailable:true,isColorInvertible:false,readableName:"Matrix 2 of 5",supportedChecksums:[],supportedExtensions:["strict"]}),JSON.stringify({activeSymbolCountRange:{maximum:65,minimum:65,step:1},defaultSymbolCountRange:{maximum:65,minimum:65,step:1},identifier:"uspsIntelligentMail",isAvailable:true,isColorInvertible:false,readableName:"USPS Intelligent Mail",supportedChecksums:[],supportedExtensions:[]}),JSON.stringify({activeSymbolCountRange:{maximum:0,minimum:0,step:0},defaultSymbolCountRange:{maximum:0,minimum:0,step:0},identifier:"aruco",isAvailable:true,isColorInvertible:false,readableName:"ArUco",supportedChecksums:[],supportedExtensions:[]})]});function h(e){u=e;}a$1.defaults=()=>({SymbologyDescriptions:u.SymbologyDescriptions});export{f as a,u as b,h as c};
@@ -0,0 +1 @@
1
+ import {a}from'./chunk-5FFSTOF2.js';import {a as a$8}from'./chunk-ZPCWOA3Y.js';import {a as a$7}from'./chunk-MHOUYN7K.js';import {a as a$a}from'./chunk-KMEGIFKL.js';import {a as a$5}from'./chunk-QRG4J3CL.js';import {b as b$1}from'./chunk-33EFB3RJ.js';import {b}from'./chunk-OH47PSIL.js';import {a as a$6}from'./chunk-Z4UVSYU5.js';import {a as a$1}from'./chunk-I53W7VSB.js';import {a as a$9}from'./chunk-O5SUMSOC.js';import {a as a$2}from'./chunk-DAOHHWLA.js';import {a as a$4}from'./chunk-LKQMBRKB.js';import {a as a$3}from'./chunk-5P7G47HV.js';import {Anchor,DataCaptureView,Direction,Point,Size}from'@scandit/web-datacapture-core';import {Backdrop}from'@scandit/web-datacapture-core/build/js/private/ui/atoms/Backdrop.js';import {ScanditHTMLElement}from'@scandit/web-datacapture-core/build/js/private/utils/ScanditHTMLElement.js';import {css}from'@scandit/web-datacapture-core/build/js/private/utils/css.js';import {defineCustomElements}from'@scandit/web-datacapture-core/build/js/private/utils/defineCustomElements.js';import {calculateArea,calculateWidth,calculateHeight}from'@scandit/web-datacapture-core/build/js/private/utils/quadrilateralUtils.js';import {Timeout}from'@scandit/web-datacapture-core/build/js/private/utils/timeout.js';var W={async highlightForBarcode(E,T){let t=a$a.create(E);T(t);}},c=class c extends ScanditHTMLElement{constructor(){super(...arguments);this.torchIconButton=null;this.cameraSwitchButton=null;this.zoomButton=null;this.onTorchButtonClickHandler=this.onTorchButtonClick.bind(this);this.onCameraSwitchButtonHandler=this.onCameraSwitchButtonClick.bind(this);this.onZoomButtonHandler=this.onZoomButtonClick.bind(this);this.onLayoutPointerDownHandler=this.onLayoutPointerDown.bind(this);this.onInfoAnnotationTapHandler=this.onInfoAnnotationTap.bind(this);this.pendingDeletionTimeout=null;}set shouldShowZoomControl(t){this.zoomButton&&(this.zoomButton.hidden=!t);}get shouldShowZoomControl(){return this.zoomButton===null?false:!this.zoomButton.hidden}set shouldShowCameraSwitchControl(t){this.cameraSwitchButton&&(this.cameraSwitchButton.hidden=!t);}get shouldShowCameraSwitchControl(){return this.cameraSwitchButton===null?false:!this.cameraSwitchButton.hidden}set shouldShowTorchControl(t){this.torchIconButton!==null&&(this.torchIconButton.hidden=!t);}get shouldShowTorchControl(){return this.torchIconButton===null?false:!this.torchIconButton.hidden}set torchControlPosition(t){var e;(e=this.torchIconButton)==null||e.setAttribute("slot",`controls-${t===Anchor.Center?Anchor.TopLeft:t}`);}get torchControlPosition(){var e,o;let t=(o=(e=this.torchIconButton)==null?void 0:e.getAttribute("slot"))!=null?o:"";return t===""?Anchor.TopLeft:t.replace("controls-","")}set zoomControlPosition(t){var e;(e=this.zoomButton)==null||e.setAttribute("slot",`controls-${t===Anchor.Center?Anchor.BottomRight:t}`);}get zoomControlPosition(){var e,o;let t=(o=(e=this.zoomButton)==null?void 0:e.getAttribute("slot"))!=null?o:"";return t===""?Anchor.BottomRight:t.replace("controls-","")}set cameraSwitchControlPosition(t){var e;(e=this.cameraSwitchButton)==null||e.setAttribute("slot",`controls-${t===Anchor.Center?Anchor.TopRight:t}`);}get cameraSwitchControlPosition(){var e,o;let t=(o=(e=this.zoomButton)==null?void 0:e.getAttribute("slot"))!=null?o:"";return t===""?Anchor.TopRight:t.replace("controls-","")}static async createWithSettings(t,e,o,i,n){c.register();let r=document.createElement(c.tag);return r.barcodeArViewSettings=i,r.layout=a.create(),r.append(r.layout),a$1(t)?(r.dataCaptureView=t,r.dataCaptureView.containerElement.prepend(r),await t.setContext(e)):(r.dataCaptureView=await DataCaptureView.forContext(e),r.dataCaptureView.connectToElement(t),r.dataCaptureView.containerElement.prepend(r)),r.presenter=new a$2(r,e,o,i,n!=null?n:a$3.createRecommendedCameraSettings()),await r.presenter.prepare(),r}static async create(t,e,o){return c.createWithSettings(t,e,o,new a$4)}static register(){defineCustomElements({[a.tag]:a,[a$8.tag]:a$8,[a$7.tag]:a$7,[a$6.tag]:a$6,[c.tag]:c,[Backdrop.tag]:Backdrop,[a$5.tag]:a$5});}static createStyleElement(){return css`[data-could-be-deleted=true]{display:none!important}[data-on-foreground=true]{z-index:3}${c.tag}{inset:0;position:absolute;z-index:1}`}getHighlightForBarcode(t){return this.queryHighlightByDataId(a$9(t))}getAnnotationForBarcode(t){return this.queryAnnotationByDataId(a$9(t))}async start(){return this.presenter.startSearching()}async stop(){return this.presenter.stopSearching()}async pause(){return this.presenter.pauseSearching()}reset(){this.deletePendingViews(),this.deleteAllViews();}getNotificationPresenter(){return this.dataCaptureView.getNotificationPresenter()}toggleTorchIcon(t){this.torchIconButton!==null&&(this.torchIconButton.state=t);}onTorchButtonClick(){this.presenter.onTorchButtonClicked();}onCameraSwitchButtonClick(){this.presenter.onCameraSwitchButtonClicked();}onZoomButtonClick(){this.presenter.onZoomButtonClicked();}changeZoomButtonIcon(t){this.zoomButton&&(this.zoomButton.zoom=`${t}x`);}connectedCallback(){this.torchIconButton=a$6.create(),this.torchIconButton.slot=`controls-${this.torchControlPosition}`,this.torchIconButton.hidden=true,this.torchIconButton.addEventListener("pointerdown",this.onTorchButtonClickHandler),this.cameraSwitchButton=a$8.create(),this.cameraSwitchButton.slot=`controls-${this.cameraSwitchControlPosition}`,this.cameraSwitchButton.hidden=true,this.cameraSwitchButton.addEventListener("pointerdown",this.onCameraSwitchButtonHandler),this.zoomButton=a$7.create(),this.zoomButton.slot=`controls-${this.zoomControlPosition}`,this.zoomButton.hidden=true,this.zoomButton.addEventListener("pointerdown",this.onZoomButtonHandler),this.layout.append(this.torchIconButton,this.cameraSwitchButton,this.zoomButton),this.layout.addEventListener("pointerdown",this.onLayoutPointerDownHandler),this.layout.addEventListener("BarcodeArInfoAnnotationEventTap",this.onInfoAnnotationTapHandler),this.backdrop=Backdrop.create(),this.layout.append(this.backdrop),this.pendingDeletionTimeout=new Timeout(1e3,()=>{this.deletePendingViews();}),this.prepend(c.createStyleElement());}disconnectedCallback(){var t,e,o;this.deleteAllViews(),(t=this.torchIconButton)==null||t.removeEventListener("pointerdown",this.onTorchButtonClickHandler),(e=this.cameraSwitchButton)==null||e.removeEventListener("pointerdown",this.onCameraSwitchButtonHandler),(o=this.zoomButton)==null||o.removeEventListener("pointerdown",this.onZoomButtonHandler),this.layout.removeEventListener("pointerdown",this.onLayoutPointerDownHandler),this.layout.removeEventListener("BarcodeArInfoAnnotationEventTap",this.onInfoAnnotationTapHandler);}isPopoverAnnotation(t){return t instanceof b}isAnnotation(t){var e;return ((e=t.dataset)==null?void 0:e.identifier)==null?false:t.dataset.identifier.endsWith("-annotation")}areMultiplePopoverAllowed(){for(let t of this.layout.querySelectorAll("[data-identifier$='-annotation']"))if(t&&this.isPopoverAnnotation(t)&&t.annotationTrigger==="highlightTapAndBarcodeScan")return true;return false}async onLayoutPointerDown(t){let e=t.target,o=e==null?void 0:e.closest("[data-identifier$='-highlight']"),i=e==null?void 0:e.closest(b.tag);if((o==null?void 0:o.dataset.id)!=null){await this.handleHighlightClick(o);return}if((i==null?void 0:i.dataset.id)!=null){await this.handleAnnotationClick(i);return}await this.handleClickOutside();}async handleHighlightClick(t){var o;this.presenter.emitTappedFeedback(),(o=this.listener)==null||o.didTapHighlightForBarcode(this.presenter.barcodeAr,t.barcode,t);let e=this.queryAnnotationByDataIdentifier(t.dataset.identifier.replace("-highlight",""));!e||e.annotationTrigger==="barcodeScan"||(this.isPopoverAnnotation(e)?await this.handlePopoverHighlightClick(e,t):e.hidden=!e.hidden);}async handlePopoverHighlightClick(t,e){var o;if(!this.areMultiplePopoverAllowed()){let i=this.layout.querySelector(`${b.tag}[data-on-foreground="true"]`),n=(o=i==null?void 0:i.dataset.identifier)==null?void 0:o.replace("-annotation","-highlight"),r=this.layout.querySelector(`[data-identifier="${n}"]`);i!=null&&r!=null&&await this.hideBarcodeArPopover(i,r,false);}await this.toggleBarcodeArPopover(t,e);}async handleAnnotationClick(t){var i;let e=(i=t.dataset.identifier)==null?void 0:i.replace("-annotation","-highlight"),o=this.layout.querySelector(`[data-identifier="${e}"]`);o&&await this.toggleBarcodeArPopover(t,o);}async handleClickOutside(){var i;if(this.areMultiplePopoverAllowed())return;let t=this.layout.querySelector(`${b.tag}[data-on-foreground="true"]`);if(!t)return;let e=(i=t.dataset.identifier)==null?void 0:i.replace("-annotation","-highlight"),o=this.layout.querySelector(`[data-identifier="${e}"]`);o&&await this.hideBarcodeArPopover(t,o);}onInfoAnnotationTap(){this.presenter.emitTappedFeedback();}async showBarcodeArPopover(t,e){t.dataset.onForeground="true",t.hidden=false,e.dataset.onForeground="true",this.backdrop.open=true;}async hideBarcodeArPopover(t,e,o=true){t.dataset.onForeground="false",t.hidden=true,e&&(e.dataset.onForeground="false"),o&&this.hideBackdropIfNoPopovers();}hideBackdropIfNoPopovers(){[...this.layout.querySelectorAll(`${b.tag}`)].every(e=>e.hidden)&&(this.backdrop.open=false);}async toggleBarcodeArPopover(t,e){t.hidden?await this.showBarcodeArPopover(t,e):await this.hideBarcodeArPopover(t,e);}deleteAllViews(){for(let t of this.layout.querySelectorAll("[data-identifier]"))t.remove();}deletePendingViews(){for(let t of this.layout.querySelectorAll("[data-could-be-deleted='true']"))t.remove();this.hideBackdropIfNoPopovers();}identifierForHighlight(t){return `${t}-highlight`}identifierForAnnotation(t){return `${t}-annotation`}async onHighlightsOrAnnotationForTrackedBarcode(t){var e,o,i;await((o=(e=this.highlightProvider)!=null?e:W)==null?void 0:o.highlightForBarcode(t.barcode,async n=>this.onHighlight(t,n))),await((i=this.annotationProvider)==null?void 0:i.annotationForBarcode(t.barcode,async n=>this.onAnnotation(t,n)));}async onAnnotation(t,e){let o=e,i=a$9(t.barcode);this.updateExistingAnnotation(i)||(await this.setupNewAnnotation(o,i,t),this.updateAnnotationPosition(t,o));}updateExistingAnnotation(t){let e=this.queryAnnotationByDataId(t);return e?(e.dataset.couldBeDeleted="false",true):false}async setupNewAnnotation(t,e,o){if(t.dataset.id=e,t.dataset.identifier=this.identifierForAnnotation(o.identifier),t.hidden=true,this.layout.append(t),this.isPopoverAnnotation(t)){if(t.direction=Direction.Vertical,t.anchor==null&&(t.anchor="bottom-center"),this.areMultiplePopoverAllowed()||t.annotationTrigger==="highlightTapAndBarcodeScan"){let i=this.queryHighlightByDataId(e);i&&await this.showBarcodeArPopover(t,i);}}else t.hidden=t.annotationTrigger==="highlightTap";}getAnnotationVariationForQuad(t,e){let o=Math.max(0,Math.min(1,e)),i=t.anchorPositions,n=calculateArea(i),r=this.dataCaptureView.width,l=this.dataCaptureView.height,d=r*l;if(n<=0||d<=0)return 0;let u=n/d;return Math.max(0,Math.min(1,u))<=o?2:1}async onHighlight(t,e){let o=a$9(t.barcode),i=this.queryHighlightByDataId(o);i?i.dataset.couldBeDeleted="false":(e.dataset.id=o,e.dataset.identifier=this.identifierForHighlight(t.identifier),this.updateHighlightPosition(t,e),this.layout.append(e));}queryHighlightByDataIdentifier(t){return this.layout.querySelector(`[data-identifier$="${t}-highlight"]`)}queryAnnotationByDataIdentifier(t){return this.layout.querySelector(`[data-identifier$="${t}-annotation"]`)}queryHighlightByDataId(t){return this.layout.querySelector(`[data-identifier$="-highlight"][data-id="${t}"]`)}queryAnnotationByDataId(t){return this.layout.querySelector(`[data-identifier$="-annotation"][data-id="${t}"]`)}updateRemovedTrackedBarcodes(t){var i,n,r,l,d;let e=this.querySelectorAll("[data-identifier]");if(Object.keys(t.allTrackedBarcodes).length===0){for(let u of e)u.dataset.couldBeDeleted="true";(i=this.pendingDeletionTimeout)!=null&&i.running||(n=this.pendingDeletionTimeout)==null||n.start();return}let o=new Set(t.removedTrackedBarcodes);for(let u of e){let p=(r=u.dataset.identifier)==null?void 0:r.replace("-highlight","").replace("-annotation","");p!=null&&o.has(p)&&(u.dataset.couldBeDeleted="true");}(l=this.pendingDeletionTimeout)!=null&&l.running||(d=this.pendingDeletionTimeout)==null||d.start();}render(t){for(let[e,o]of Object.entries(t.allTrackedBarcodes)){t.addedTrackedBarcodes[e]!=null&&this.onHighlightsOrAnnotationForTrackedBarcode(o);let i=a$9(o.barcode),n=this.queryAnnotationByDataId(i),r=this.queryHighlightByDataId(i);r&&(this.updateBrushSize(r,o),this.updateHighlightPosition(o,r)),n&&this.updateAnnotationPosition(o,n,r);}this.updateRemovedTrackedBarcodes(t);}updateHighlightPosition(t,e,o="center"){if(e.hidden)return;let i=this.dataCaptureView.viewAnchorPositionsForFrameAnchorPositions(t.anchorPositions),n=this.normalizedViewPointFromFrameAnchorPositions(i,o);e.updatePosition(n,new Point(-50,-50),this.calculateRotationAngle(i.topLeft,i.topRight));}updateBrushSize(t,e){if(t.width==null||t.height==null)return;let o=this.dataCaptureView.viewAnchorPositionsForFrameAnchorPositions(e.anchorPositions),i=Math.round(calculateWidth(o)),n=Math.round(calculateHeight(o));t.width!==i&&(t.width=i),t.height!==n&&(t.height=n);}getTransformOrigin(t){return {"top-center":new Point(-50,0),"bottom-center":new Point(-50,-100),"left-center":new Point(0,-50),"right-center":new Point(-100,-50)}[t]}calculateAnnotationPosition(t,e,o){var p,w;let n=t.orderVerticesByPosition(),r=this.normalizedViewPointFromFrameAnchorPositions(t,"center"),d={"bottom-center":()=>{let s=this.normalizedViewPointFromFrameAnchorPositions(n,"topCenter");return new Point(s.x,s.y-7)},"top-center":()=>{let s=this.normalizedViewPointFromFrameAnchorPositions(n,"bottomCenter");return new Point(s.x,s.y+7)},"right-center":()=>{let s=this.normalizedViewPointFromFrameAnchorPositions(n,"centerLeft");return new Point(s.x-7,s.y)},"left-center":()=>{let s=this.normalizedViewPointFromFrameAnchorPositions(n,"centerRight");return new Point(s.x+7,s.y)}}[e]();return o?o instanceof b$1?(p={"bottom-center":new Point(r.x,r.y-7-o.clientHeight/2),"top-center":new Point(r.x,r.y+7+o.clientHeight/2),"right-center":new Point(r.x-7-o.clientWidth/2,r.y),"left-center":new Point(r.x+7+o.clientWidth/2,r.y)}[e])!=null?p:d:(w={"bottom-center":new Point(r.x,r.y-7-o.clientHeight/2),"top-center":new Point(r.x,r.y+7+o.clientHeight/2),"right-center":new Point(r.x-7-o.clientWidth/2,r.y),"left-center":new Point(r.x+7+o.clientWidth/2,r.y)}[e])!=null?w:d:d}updateAnnotationPosition(t,e,o){let i=this.dataCaptureView.viewAnchorPositionsForFrameAnchorPositions(t.anchorPositions);if(e.anchor||(e.anchor="top-center"),e.annotationVariation!=null){let l=this.getAnnotationVariationForQuad(t,a$5.threshold);e.annotationVariation=l;}let n=this.getTransformOrigin(e.anchor),r=this.calculateAnnotationPosition(i,e.anchor,o);e.updatePosition(r,n,this.calculateRotationAngle(i.topLeft,i.topRight));}normalizedViewPointFromFrameAnchorPositions(t,e="center"){let o=this.presenter.currentCamera.getMirrorImageEnabled(),i=new Size(this.dataCaptureView.width,this.dataCaptureView.height);if(o){let r=t[{centerLeft:"centerRight",centerRight:"centerLeft",center:"center",topCenter:"topCenter",bottomCenter:"bottomCenter"}[e]];return Point.mirrorX(r,i)}return t[e]}calculateRotationAngle(t,e){let o=e.x-t.x,n=this.presenter.isCameraMirrored()?-(e.y-t.y):e.y-t.y,r=Math.atan2(n,o);return Math.round(r*(180/Math.PI))}};c.tag="scandit-barcode-ar-view";var k=c;export{k as a};
@@ -1 +1 @@
1
- import {b}from'./chunk-OLJXVUYE.js';import {NumberWithUnit}from'@scandit/web-datacapture-core';var i=class{constructor(){this.radius=new NumberWithUnit(b.SparkScan.SparkScanSettings.locationSelection.radius,b.SparkScan.SparkScanSettings.locationSelection.unit);this.type="targetAimer";}toJSONObject(){return {type:this.type,radius:this.radius.toJSONObject()}}};export{i as a};
1
+ import {b}from'./chunk-6GGHOIBF.js';import {NumberWithUnit}from'@scandit/web-datacapture-core';var i=class{constructor(){this.radius=new NumberWithUnit(b.SparkScan.SparkScanSettings.locationSelection.radius,b.SparkScan.SparkScanSettings.locationSelection.unit);this.type="targetAimer";}toJSONObject(){return {type:this.type,radius:this.radius.toJSONObject()}}};export{i as a};
@@ -0,0 +1,2 @@
1
+ import {DataCaptureLoader,Logger}from'@scandit/web-datacapture-core';function i(r){let s=URL.createObjectURL(new Blob(['"use strict";(()=>{var p={"scandit-datacapture-sdk-barcode-pthreads.wasm":{bytes:7550478},"scandit-datacapture-sdk-barcode-simd-pthreads.wasm":{bytes:7485320},"scandit-datacapture-sdk-barcode-simd.wasm":{bytes:7363746},"scandit-datacapture-sdk-barcode.wasm":{bytes:7429306}};function M(t){return typeof t=="object"&&t!=null}function C(t){if(typeof t=="string")return t;if(M(t)){if(typeof t.message=="string")return t.message}else if(typeof(t==null?void 0:t.toString)=="function")return t.toString();return"unknown error"}var d;(t=>{(l=>(l.Debug="debug",l.Info="info",l.Warn="warn",l.Error="error",l.Quiet="quiet"))(t.Level||(t.Level={}));let e=new Map([["debug",1],["info",2],["warn",3],["error",4],["quiet",5]]),a="debug";function r(l){a=l}t.setLevel=r;function s(l,...h){if(!(e.get(a)>e.get(l)))switch(l){case"debug":{console.debug(...h);break}case"info":{console.log(...h);break}case"warn":{console.warn(...h);break}case"error":{console.error(...h);break}}}t.log=s;function i(...l){s("warn",...l)}t.warn=i;function o(...l){s("debug",...l)}t.debug=o;function n(...l){s("info",...l)}t.info=n;function c(...l){s("error",...l)}t.error=c})(d||(d={}));var Te=class{constructor(t){if(typeof t!="function")throw new TypeError("FinalizationRegistry callback must be a function")}register(t,e,a){}unregister(t){return!1}};function re(t){typeof t.FinalizationRegistry>"u"&&(t.FinalizationRegistry=Te)}var A=class se extends Error{constructor(e){super(e.message),Object.setPrototypeOf(this,se.prototype),this.name=e.name}toString(){return`${this.name}: ${this.message}`}};var P=Promise.resolve(),Y=!1,j=!1,k,q={writableDataPath:""};async function ie(t){if(k==null)return;Y=!0;let e=new Promise((a,r)=>{setTimeout(()=>{r(new A({name:"BlockedIndexedDB",message:"IndexedDB database is blocked"}))},1500)});try{await Promise.race([new Promise((a,r)=>{k==null||k(t,s=>{if(s!=null){r(s);return}a()})}),e])}finally{Y=!1}}async function ne(t){return j||(Y?(j=!0,P=P.then(async()=>(j=!1,ie(t)))):P=ie(t)),P}async function oe(t){q=t,k=FS.syncfs,FS.syncfs=((e,a)=>{let r=a,s=()=>{r()},i=o=>{r(o)};ne(e).then(s).catch(i)});try{FS.mkdir(q.writableDataPath)}catch(e){if(e.code!=="EEXIST")throw k=void 0,e}return FS.mount(IDBFS,{},q.writableDataPath),ne(!0)}var de={};function Ee(t){return[...new Uint8Array(t)].map(e=>{let a=e.toString(16);return a.length===1?`0${a}`:a}).join("")}async function*Le(t){let e=t.getReader();try{for(;;){let{done:a,value:r}=await e.read();if(a)return;yield r}}finally{e.releaseLock()}}async function We(t){let e=[],a=0,r=0;for await(let i of Le(t))e.push(i),a+=i.length;let s=new Uint8Array(a);for(let i of e)s.set(i,r),r+=i.length;return s.buffer}var Re=(t=>(t.VALID="VALID",t.INVALID="INVALID",t.NOT_VERIFIABLE="NOT_VERIFIABLE",t))(Re||{});async function Ne(t,e,a){if(typeof crypto.subtle.digest!="function")return d.log(d.Level.Warn,`Insecure context (see https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts): The hash of the Scandit Data Capture library WASM file found at ${a} could not be verified`),"NOT_VERIFIABLE";try{let r=t instanceof Promise?await t:t,s=await crypto.subtle.digest("SHA-256",r),i=Ee(s);return e==null?(d.log(d.Level.Warn,"The library hash is not defined or empty, cannot correctly verify integrity."),"NOT_VERIFIABLE"):i===e?(d.log(d.Level.Debug,`Data Capture library WASM integrity found at ${a} has been verified correctly.`),"VALID"):(d.log(d.Level.Warn,`The Scandit Data Capture library WASM file found at ${a} seems invalid: expected file hash doesn\'t match (received: ${i}, expected: ${e}). Please ensure the correct Scandit Data Capture file (with correct version) is retrieved.`),"INVALID")}catch(r){return d.log(d.Level.Warn,"Wasm response could not be verified",r),"NOT_VERIFIABLE"}}var X=new Map([["br",4.4],["gzip",2.9],["none",1]]);function He(t){var e;let a="content-encoding";if(t==null||t.get(a)==null)return X.get("none");let r=new Set(((e=t.get(a))!=null?e:"").split(",").map(s=>s.trim()));for(let[s,i]of X)if(r.has(s))return i;return X.get("none")}function _e(t){var e,a;if(t==null)return 0;let r=(e=He(t))!=null?e:1,s=Number.parseInt((a=t.get("content-length"))!=null?a:"0",10);return Number.isNaN(s)?0:Math.floor(s*r*100)/100}function ze(t){let{pathname:e}=new URL(t);for(let[a,r]of Object.entries(de))if(e.endsWith(a))return r.bytes;return 0}function ce(t){de=t}var Je=(t,e)=>{let a=_e(e);return a===0?ze(t):a};function Ve(t,e,a,{onProgress:r,onError:s,onComplete:i}){if(!e.body)return[e];let o=Je(t,e.headers),n=0,c=0;if(typeof TransformStream>"u")return d.warn("TransformStream is not supported in this environment. Progress tracking will be disabled."),[e];let[l,h]=a?e.body.tee():[e.body],m=l.pipeThrough(new TransformStream({async transform(g,f){try{n+=g.length,c=Number((n/o*100).toFixed(2)),o>0&&g.length>0&&c<100?r==null||r({percentage:c,loadedBytes:n,privateUri:t}):o===0&&g.length>0&&(r==null||r({percentage:null,loadedBytes:n,privateUri:t})),f.enqueue(g)}catch(w){f.error(w),s==null||s({error:w})}},flush(g){r==null||r({percentage:100,loadedBytes:n,privateUri:t}),i==null||i({percentage:100,loadedBytes:n,privateUri:t}),g.terminate()}}));return[new Response(m,{headers:new Headers(e.headers),status:e.status,statusText:e.statusText}),h]}async function K({wasmURI:t,expectedHash:e,verifyResponseHash:a,onProgress:r,onComplete:s,onError:i,referredOrigin:o}){let n=await fetch(t,{referrerPolicy:"origin",referrer:o!=null?o:""});if(!n.ok)throw new Error(`HTTP status code is not ok: ${n.status}, ${n.statusText}`);let[c,l]=Ve(t,n,a,{onProgress:r,onError:i,onComplete:s});return l!=null&&Ne(We(l),e,t),c}function le({wasmURI:t,expectedHash:e,verifyResponseHash:a,progressCallback:r,successCallback:s,errorCallback:i,importObject:o,referredOrigin:n}){async function c(h){try{let m=await K({wasmURI:t,expectedHash:e,verifyResponseHash:a,onProgress:r,referredOrigin:n}),g=await(h!=null?h:m).arrayBuffer(),f=await self.WebAssembly.instantiate(g,o);s(f.instance,f.module)}catch(m){d.log(d.Level.Error,m),d.log(d.Level.Error,`Couldn\'t instantiate Scandit SDK DataCapture library at ${t}, did you configure the path for it correctly?`),i==null||i(m)}}async function l(){let h;try{h=await K({wasmURI:t,expectedHash:e,verifyResponseHash:a,onProgress:r,referredOrigin:n});let m=await self.WebAssembly.instantiateStreaming(h,o);s(m.instance,m.module)}catch(m){d.log(d.Level.Warn,m),d.log(d.Level.Warn,"WebAssembly streaming compile failed. Falling back to ArrayBuffer instantiation (this will make things slower)"),c((h==null?void 0:h.bodyUsed)===!0?void 0:h)}}typeof self.WebAssembly.instantiateStreaming=="function"?l():c()}async function Z(t,e,a,r){return new Promise((s,i)=>{t().then(s).catch(o=>{let n=e*2;if(n>a){i(o);return}r(o),self.setTimeout(()=>{Z(t,n,a,r).then(s).catch(i)},e)})})}function Q(t){var e,a;let r="unknown";if((e=t.href)!=null&&e.startsWith("blob:null/"))r="localhost";else{let s=((a=t.pathname)==null?void 0:a.length)>1&&!t.pathname.startsWith("/");r=new URL(s?t.pathname:t.origin).hostname}return r.startsWith("[")&&r.endsWith("]")?(r=r.slice(1,-1),r):(/^(\\d{1,3}\\.){3}\\d{1,3}$/.test(r)&&(r=r.split(".").map(s=>Number.parseInt(s,10).toString()).join(".")),r)}async function ue(t,e){async function a(){return importScripts(t)}try{await Z(a,250,4e3,s=>{d.log(d.Level.Warn,s),d.log(d.Level.Warn,`Couldn\'t retrieve Scandit Data Capture library at ${t}, retrying...`)}),self.Module.mainScriptUrlOrBlob=t;let r=self.SDC_WASM_JS_VERSION;return r!==e&&d.log(d.Level.Warn,`The Scandit Data Capture library JS file found at ${t} seems invalid: expected version doesn\'t match (received: ${r}, expected: ${e}). Please ensure the correct Scandit Data Capture file (with correct version) is retrieved.`),!0}catch(r){return d.log(d.Level.Error,r),!1}}var O=class{constructor(){this.promise=new Promise((t,e)=>{this.reject=e,this.resolve=t})}};var ee=class{constructor(t,e){this.workerFunctions=t,this.options=e,this.imageIdCounter=0,this.conversions=new Map}convertToJpeg(t,e){let a=this.imageIdCounter++,r=new O;this.conversions.set(a,r);let s=t.toBitmap();return this.workerFunctions.postMessage({type:"convertToJPEG",imageId:a,width:t.getWidth(),height:t.getHeight(),data:s,planes:t.getPlanes(),orientation:e,quality:this.options.quality},Array.from(new Set([s.buffer]))),r.promise}onConvertToJPEGResult(t,e){let a=this.conversions.get(t);a?(a.resolve(e),this.conversions.delete(t)):d.warn(`AsyncImageConverterForwarder: Conversion for imageId ${t} not found in Map`)}};var T=class{constructor(t){this.options=t}get quality(){return this.options.quality}async convertToJpeg(t,e){try{let{width:a,height:r,planes:s}=this.validateAndExtractImageData(t);this.prepareCanvas(a,r);let i=this.processImageData(t,s,a,r);return await this.convertToJpegBytes(i,e)}catch(a){throw d.warn(`Failed to convert image to JPEG: ${a}`),a instanceof Error?a:new Error("Failed to convert image to JPEG")}}validateAndExtractImageData(t){let e=t.getWidth(),a=t.getHeight(),r=t.getPlanes();if(e<=0||a<=0)throw d.warn(`Invalid image dimensions: ${e}x${a}`),new Error(`Invalid image dimensions: ${e}x${a}`);if(!r||r.length===0)throw d.warn("ImageBuffer has no planes"),new Error("ImageBuffer has no planes");return{width:e,height:a,planes:r}}prepareCanvas(t,e){if(!this.ensureCanvas(t,e))throw new Error("Failed to create OffscreenCanvas");if(!this.canvas||!this.context)throw new Error("Canvas or context not properly initialized")}processImageData(t,e,a,r){let s=this.createImageDataFromBuffer(t,e,a,r);if(s===null)throw new Error("Failed to create ImageData");return this.validateImageData(s,a,r),s}validateImageData(t,e,a){var r;if(t.width!==e||t.height!==a)throw d.warn(`ImageData dimensions mismatch: expected ${e}x${a}, got ${t.width}x${t.height}`),new Error("ImageData dimensions mismatch");if(!t.data||t.data.length!==e*a*4)throw d.warn(`ImageData has invalid data length: expected ${e*a*4}, got ${((r=t.data)==null?void 0:r.length)||0}`),new Error("ImageData has invalid data length")}async convertToJpegBytes(t,e){if(!this.context||!this.canvas)throw new Error("Canvas or context not available");try{this.context.putImageData(t,0,0)}catch(i){throw d.warn(`Failed to put image data on canvas: ${i}`),new Error(`Failed to put image data on canvas: ${i}`)}let a=e!==0?this.applyRotation(this.canvas,e):this.canvas,r;try{r=await this.canvasToBlob(a)}catch(i){throw d.warn(`Failed to convert canvas to blob: ${i}`),new Error(`Failed to convert canvas to blob: ${i}`)}if(!r||r.size===0)throw d.warn("Canvas convertToBlob returned empty or null blob"),new Error("Failed to create JPEG blob");let s;try{s=await r.arrayBuffer()}catch(i){throw d.warn(`Failed to get array buffer from blob: ${i}`),new Error(`Failed to get array buffer from blob: ${i}`)}if(!s||s.byteLength===0)throw d.warn("Blob arrayBuffer returned empty or null buffer"),new Error("Failed to get array buffer from blob");return new Uint8Array(s)}ensureCanvas(t,e){try{return(!this.canvas||this.canvas.width!==t||this.canvas.height!==e)&&(this.canvas=this.getNewCanvas(t,e),this.context=this.canvas.getContext("2d")),this.context!==null}catch(a){return d.warn("Failed to create HTMLCanvasElement",a),!1}}createImageDataFromBuffer(t,e,a,r){let s=new Set(e.map(i=>i.channel));try{if(this.isYUVFormat(s)){let n=t.toBitmap();return!n||n.length!==a*r*4?(d.warn(`Invalid bitmap data from toBitmap(): expected ${a*r*4} bytes, got ${(n==null?void 0:n.length)||0}`),null):new ImageData(new Uint8ClampedArray(n),a,r)}if(this.isRGBAFormat(s))return this.createImageDataFromRGBAPlanes(e,a,r);if(this.isRGBFormat(s))return this.createImageDataFromRGBPlanes(e,a,r);if(this.isGrayscaleFormat(s))return this.createImageDataFromGrayscalePlanes(e,a,r);d.warn(`Unknown image format with channels: ${Array.from(s).join(", ")}, falling back to toBitmap()`);let i=t.toBitmap();if(!i||i.length===0)return d.warn("toBitmap() returned empty or null data"),null;let o=i.length/(a*r);return o===4?new ImageData(new Uint8ClampedArray(i),a,r):(d.warn(`Unsupported format: ${o} bytes per pixel`),null)}catch(i){return d.warn(`Failed to create ImageData: ${i}`),null}}isYUVFormat(t){return t.has(0)&&t.has(1)&&t.has(2)}isRGBAFormat(t){return t.has(3)&&t.has(4)&&t.has(5)&&t.has(6)}isRGBFormat(t){return t.has(3)&&t.has(4)&&t.has(5)&&!t.has(6)}isGrayscaleFormat(t){return t.has(0)&&!t.has(1)&&!t.has(2)}createImageDataFromRGBAPlanes(t,e,a){let r=t.find(c=>c.channel===3),s=t.find(c=>c.channel===4),i=t.find(c=>c.channel===5),o=t.find(c=>c.channel===6);if(!r||!s||!i||!o)return d.warn("Missing RGBA planes"),null;let n=new Uint8ClampedArray(e*a*4);for(let c=0;c<a;c++)for(let l=0;l<e;l++){let h=(c*e+l)*4;n[h]=this.getPixelFromPlane(r,l,c),n[h+1]=this.getPixelFromPlane(s,l,c),n[h+2]=this.getPixelFromPlane(i,l,c),n[h+3]=this.getPixelFromPlane(o,l,c)}return new ImageData(n,e,a)}createImageDataFromRGBPlanes(t,e,a){let r=t.find(n=>n.channel===3),s=t.find(n=>n.channel===4),i=t.find(n=>n.channel===5);if(!r||!s||!i)return d.warn("Missing RGB planes"),null;let o=new Uint8ClampedArray(e*a*4);for(let n=0;n<a;n++)for(let c=0;c<e;c++){let l=(n*e+c)*4;o[l]=this.getPixelFromPlane(r,c,n),o[l+1]=this.getPixelFromPlane(s,c,n),o[l+2]=this.getPixelFromPlane(i,c,n),o[l+3]=255}return new ImageData(o,e,a)}createImageDataFromGrayscalePlanes(t,e,a){let r=t.find(i=>i.channel===0);if(!r)return d.warn("Missing Y plane for grayscale"),null;let s=new Uint8ClampedArray(e*a*4);for(let i=0;i<a;i++)for(let o=0;o<e;o++){let n=(i*e+o)*4,c=this.getPixelFromPlane(r,o,i);s[n]=c,s[n+1]=c,s[n+2]=c,s[n+3]=255}return new ImageData(s,e,a)}getPixelFromPlane(t,e,a){let r=Math.floor(e/(t.subsamplingX||1)),s=Math.floor(a/(t.subsamplingY||1)),i=t.rowStride,o=t.pixelStride,n=s*i+r*o,c=t.data;return n<c.length?c[n]:0}applyRotation(t,e){let a=e*Math.PI/180,r=e===90||e===270||e===-90||e===-270,s=r?t.height:t.width,i=r?t.width:t.height,o=this.getNewCanvas(s,i),n=o.getContext("2d");if(!n)throw new Error("Failed to get 2D context for rotated canvas");return n.translate(s/2,i/2),n.rotate(a),n.translate(-t.width/2,-t.height/2),n.drawImage(t,0,0),o}};T.JPEG_IMAGE_MIME_TYPE="image/jpeg";var pe=class extends T{getNewCanvas(t,e){return new OffscreenCanvas(t,e)}canvasToBlob(t){return t.convertToBlob({type:T.JPEG_IMAGE_MIME_TYPE,quality:this.options.quality})}};var E;(t=>{function e(){return"8.0.0-beta.2"}t.sdkVersion=e})(E||(E={}));function Ue(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 $e(t){let e=/@scandit\\/web-datacapture-[a-z]+/i.exec(t);return e?e[0]:null}function he(t,e,a){let r=e,s=Ue(r);if(s.result){let o=$e(r);o!=null&&(r=`${s.cdnBaseURL}${o}@${t}/sdc-lib/`)}let i=a.replace(".wasm","");return s.result?{jsURI:`${r}${i}.js`,wasmURI:`${r}${i}.wasm`}:{jsURI:`${r}${i}.js?v=${t}`,wasmURI:`${r}${i}.wasm?v=${t}`}}var Ge=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])),je=()=>(async t=>{try{return typeof MessageChannel<"u"&&new MessageChannel().port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(t)}catch{return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]));function qe(){return typeof crossOriginIsolated>"u"?!1:crossOriginIsolated}function Ye(){try{return new WebAssembly.Memory({initial:1,maximum:1,shared:!0}).buffer.constructor.name==="SharedArrayBuffer"}catch{return!1}}async function me(){return Ge()}async function Xe(){if(!await je())return!1;let t=null;try{t=new Worker(URL.createObjectURL(new Blob([\'postMessage("Worker" in self);\'],{type:"text/javascript"})),{name:"nestedWorkerTest"})}catch{return!1}return new Promise(e=>{if(t==null){e(!1);return}t.onmessage=a=>{t==null||t.terminate(),e(a.data)}})}async function ge(){let t=await Xe();return qe()&&Ye()&&t}var fe=class be{constructor(e,a){this.hintPresenterV2=null,this.MAX_NUMBER_OF_IMAGES_IN_FRAME_DATA_POOL=10,this.redrawInterval=1e3/30,this.redrawRequests=[],this._isDrawLoopRunning=!1,this.frameDataPool=new Map,this.lastFrameCounter=-1,this.poorMansBenchmarkLogs=!1,this.writableDataPathStandard="/scandit_sync_folder",this.resourceFilesSubfolder="resources",this.performanceMetricsReporterTimer=void 0,this.performanceMetrics={frameDataPoolSize:0,processedFramesCount:0,redrawRequestsCount:0,actualRedrawsCount:0},this.gestureListener=null,this.webPlatformHintPresenter=null,this.moduleHandler=e,this.workerFunctions=a,this._loadProgressCallback=this._loadProgressCallback.bind(this),ce(this.getWasmMetadata())}get Module(){return this.moduleHandler.get()}set isDrawLoopRunning(e){this._isDrawLoopRunning=e,!e&&typeof this.loopTimeoutId=="number"&&(clearTimeout(this.loopTimeoutId),this.loopTimeoutId=void 0)}get isDrawLoopRunning(){return this._isDrawLoopRunning}convertToLoadableFrameData(e){let a=this.getNextFrameId();this.frameDataPool.set(a,new Uint8ClampedArray(e.getFrameData()));let r=this.lastUsedModuleMirrorAxis==null?!1:this.lastUsedModuleMirrorAxis!==this.Module.Axis.None;return{frameId:a,width:e.getWidth(),height:e.getHeight(),isFrameSourceMirrored:r}}createContext(e){var a,r,s,i,o;let n=this.getModeDeserializers(),c=Q(location);(c==="localhost"||c==="127.0.0.1")&&navigator.userAgent.includes("Electron")&&e.appName!=null&&(c+=`-${e.appName}`),this.parentDomain=e.parentDomain,this.contextDeserializer=new this.Module.DataCaptureContextDeserializer(this.writableDataPath,e.deviceId,e.context.deviceModelName,c,this.parentDomain,n,e.delayedRegistration,e.highEndBlurryRecognition,this.resourcePath);let l=this.contextDeserializer.contextFromJson(JSON.stringify(e.context));if(l==null){let u=this.contextDeserializer.getLastError();throw new Error(`Could not create the context: ${u}`)}let h=l.getView();this.context=l.getContext(),l.delete();let m=this.Module.DataCaptureContextListener.extend("DataCaptureContextListener",{didChangeStatus:(u,b)=>{this.contextDidChangeStatus(JSON.parse(b.toJson())),u.delete()},didStartObservingContext:u=>{this.didStartObservingContext(),u.delete()},didStopObservingContext:u=>{u.delete()}}),g=this.Module.DataCaptureContextFrameListener.extend("DataCaptureContextFrameListener",{onObservationStarted:u=>{u.delete()},onObservationStopped:u=>{u.delete()},onFrameProcessingStarted:(u,b)=>{this.workerFunctions.postMessage({type:"onFrameProcessingStarted"}),b.delete(),u.delete()},onFrameProcessingFinished:(u,b)=>{this.workerFunctions.postMessage({type:"onFrameProcessingFinished"}),b.delete(),u.delete()},onFrameSkipped:(u,b)=>{this.workerFunctions.postMessage({type:"onFrameSkipped"}),b.delete(),u.delete()}}),f=this.Module.GestureRecognizer.extend("GestureRecognizer",{setGestureListener:(u,b)=>{var x;(x=this.gestureListener)==null||x.delete(),this.gestureListener=u.clone(),u.delete()}});(a=this.gestureRecognizer)==null||a.delete(),this.gestureRecognizer=new f;let w=new m;this.context.addListener(w),w.delete();let v=new g;this.context.addFrameListener(v),v.delete(),this.setView(h),(r=this.view)==null||r.setGestureRecognizer(this.gestureRecognizer);let F=this.Module.PlatformHintPresenter.extend("PlatformHintPresenter",{setHintPresenter:u=>{u.delete()},showToast:u=>{this.workerFunctions.postMessage({type:"showToast",payload:JSON.parse(u)})},hideToast:u=>{this.workerFunctions.postMessage({type:"hideToast",payload:JSON.parse(u)})},showGuidance:u=>{this.workerFunctions.postMessage({type:"showGuidance",payload:JSON.parse(u)})},hideGuidance:u=>{this.workerFunctions.postMessage({type:"hideGuidance",payload:JSON.parse(u)})},startUpdateTimer:u=>{this.workerFunctions.postMessage({type:"startUpdateTimer",payload:{duration:{unit:"ms",value:u}}})},stopUpdateTimer:()=>{this.workerFunctions.postMessage({type:"stopUpdateTimer"})}});(s=this.hintPresenterV2)==null||s.delete(),this.hintPresenterV2=null,(i=this.webPlatformHintPresenter)==null||i.delete(),this.webPlatformHintPresenter=null,this.webPlatformHintPresenter=new F,this.view&&(this.hintPresenterV2=new this.Module.HintPresenterV2(this.webPlatformHintPresenter),(o=this.view)==null||o.setHintPresenterV2(this.hintPresenterV2)),this.webAsyncImageConverterInstance=this.getAsyncImageConverterInstance({quality:1}),this.Module.ImageConverter.setAsyncInstance(this.webAsyncImageConverterInstance)}convertToJPEGResult(e,a){this.webAsyncImageConverterInstance instanceof ee&&this.webAsyncImageConverterInstance.onConvertToJPEGResult(e,a)}getAsyncImageConverterInstance(e){return this.workerFunctions.getOffscreenCanvas()!=null?new pe(e):new ee(this.workerFunctions,e)}onTap(e){var a;(a=this.gestureListener)==null||a.onTap(JSON.stringify(e))}hintPresenterV2Update(){var e;(e=this.hintPresenterV2)==null||e.update()}startReportingPerformanceMetrics(){this.performanceMetricsReporterTimer==null&&(this.performanceMetricsReporterTimer=setInterval(()=>{this.reportPerformanceMetrics();for(let e of Object.keys(this.performanceMetrics))this.performanceMetrics[e]=0},1e3))}async reportPerformanceMetrics(){this.workerFunctions.postMessage({type:"performanceMetricsReport",payload:{...this.performanceMetrics}})}deleteFrameData(e){this.frameDataPool.delete(e)}dispose(){var e,a,r,s;this.context.dispose(),this.frameDataPool.clear(),this.isDrawLoopRunning=!1,this.lastFrameCounter=-1,(e=this.gestureRecognizer)==null||e.delete(),this.gestureRecognizer=null,(a=this.gestureListener)==null||a.delete(),this.gestureListener=null,(r=this.hintPresenterV2)==null||r.delete(),this.hintPresenterV2=null,(s=this.webPlatformHintPresenter)==null||s.delete(),this.webPlatformHintPresenter=null}flushAnalytics(){this.context.flushAnalytics()}extractCentaurusLicense(e){return{payload:{centaurus:{licenseKey:this.Module.LicenseUtils[be.get3dPartyLicenseKeyMethodName](e)}}}}getModeDeserializers(){return new this.Module.VectorDataCaptureModeDeserializer}loadLibrary(e){return this.libraryLoadingPromise!=null?this.libraryLoadingPromise:(this.libraryLoadingPromise=this.setup(e),this.libraryLoadingPromise)}processFrame(e){var a;if(this.context==null)return{payload:e,transferables:[e.data.buffer]};let r=e.data,s=e.colorType==="GRAYSCALE"?this.Module.ImageBufferFormat.Grayscale8:this.Module.ImageBufferFormat.Rgba8888,i=this.Module.allocateUint8Array(r.byteLength);return this.Module.HEAPU8.set(r,i),(a=this.imageFrameSource)==null||a.outputFrame(i,e.width,e.height,s),{payload:e,transferables:[e.data.buffer]}}reportCameraProperties(e){this.context.setCameraProperties(e.deviceId,e.isFrontFacing,e.hasAutofocus)}requestFrameData(e){let a=this.frameDataPool.get(e);return a==null?{payload:{data:null}}:{payload:{data:a},transferables:[a.buffer]}}scheduleRedraw(e,a){this.addRedrawRequest(a),this.isDrawLoopRunning||this.startDrawLoop(e)}sendViewRefreshCommands(e){this.workerFunctions.postMessage({type:"draw",payload:e},[e.buffer])}setFrameSource(e,a){var r;this.lastUsedModuleMirrorAxis=this.mapMirrorAxisOnModule(e),(r=this.imageFrameSource)==null||r.delete(),this.imageFrameSource=new this.Module.ImageBufferFrameSource(this.lastUsedModuleMirrorAxis,a,0),this.context.setFrameSource(this.imageFrameSource)}startDrawLoop(e){this.isDrawLoopRunning=!0;let a=i=>this.redrawRequests.length>0&&this.redrawRequests[0]<=i,r=i=>{for(;this.redrawRequests.length>0&&this.redrawRequests[0]<=i;)this.redrawRequests.shift()},s=()=>{this.loopTimeoutId=setTimeout(()=>{if(!this.isDrawLoopRunning)return;let i=performance.now();if(a(i)){r(i),e.draw();let o=e.getDrawCommands();this.sendViewRefreshCommands(new Uint8Array(o))}s()},this.redrawInterval)};s()}updateContext(e){if(this.context!=null&&this.contextDeserializer!=null){e.view!=null&&!e.view.visible&&this.context.flushAnalytics();let a=this.onBeforeUpdateContextHook(e),r=this.contextDeserializer.updateContextFromJson(this.context,this.view,JSON.stringify(a.context));if(r==null){let i=this.contextDeserializer.getLastError();throw new Error(`Could not update the context: ${i}`)}this.context.delete(),this.context=r.getContext();let s=r.getView();r.delete(),s!=null&&a.view!=null&&s.setViewSize(a.view.width,a.view.height,a.view.orientation),!this.hintPresenterV2&&this.webPlatformHintPresenter&&(this.hintPresenterV2=new this.Module.HintPresenterV2(this.webPlatformHintPresenter)),s!=null&&this.hintPresenterV2&&s.setHintPresenterV2(this.hintPresenterV2),this.gestureRecognizer!=null&&(s==null||s.setGestureRecognizer(this.gestureRecognizer)),this.setView(s),d.debug("context updated",a)}}onBeforeUpdateContextHook(e){return e}onDocumentVisibilityChange(e){e==="hidden"&&this.context.flushAnalytics()}isFeatureSupported(e){return{payload:{supported:this.context.isFeatureSupported(e)}}}getViewfinderInfo(){var e,a;return{payload:{isDisplayingViewfinder:(a=(e=this.view)==null?void 0:e.isDisplayingViewfinder())!=null?a:!1,rect:JSON.parse(this.view.getViewfinderRect())}}}getOpenSourceSoftwareLicenseInfo(){return{payload:{licenseText:this.Module.OpenSourceSoftwareLicenseInfo.getLicenseText()}}}getNextFrameId(){return this.lastFrameCounter++,this.lastFrameCounter>=this.MAX_NUMBER_OF_IMAGES_IN_FRAME_DATA_POOL&&(this.lastFrameCounter=0),this.lastFrameCounter}getWasmDynamicLibraries(e){return this.getWasmSideModuleFileName()==null?[]:[`${e.replace(/\\/[^/]*$/,"/")}${this.getWasmSideModuleFileName()}`]}getWasmCoreExpectedHash(e,a){return a?e?"c66bef0f7edf63cd99fe47b33cbbf3e8f0c2b3a1788c24bead0f8c9e1b7fe128":"96b8865e2fb5b4caeb13ef8090ef2eefd2c31a94138a0c4c12134d94041d4385":e?"e9e7a852e80bf62cf4ac8f7582b34a78c916c0cc3c5357d4d6ff62131ab8f3e6":""}getWasmCoreFileName(e,a){return a?e?"scandit-datacapture-sdk-barcode-simd-pthreads.wasm":"scandit-datacapture-sdk-barcode-pthreads.wasm":e?"scandit-datacapture-sdk-barcode-simd.wasm":""}getWasmMetadata(){return p}getWasmSideModuleFileName(){return""}_loadProgressCallback(e){this.workerFunctions.postMessage({type:"loadLibraryProgress",payload:e})}addRedrawRequest(e){this.redrawRequests.push(Math.round(performance.now())+e),this.redrawRequests.sort((a,r)=>a-r)}contextDidChangeStatus(e){e.code===260?e.message=e.message.replace("domain name",`domain name (${Q(location)})`):e.code===265&&(e.message=e.message.replace("domain name",`domain name (${this.parentDomain})`)),this.workerFunctions.postMessage({type:"contextDidChangeStatus",payload:e})}didStartObservingContext(){this.workerFunctions.postMessage({type:"didStartObservingContext"})}mapMirrorAxisOnModule(e){switch(e){case"None":return this.Module.Axis.None;case"X":return this.Module.Axis.X;case"Y":return this.Module.Axis.Y;default:return this.Module.Axis.None}}setView(e){this.view=e,this.setViewRefreshHandler(e),e==null&&(this.isDrawLoopRunning=!1,this.sendViewRefreshCommands(new Uint8Array([])))}addNativeOverlay(e){d.warn("addNativeOverlay has not been implemented for this module",e)}removeNativeOverlay(e){d.warn("removeNativeOverlay has not been implemented for this module",e)}setViewRefreshHandler(e){if(e==null||e.isViewRefreshHandlerSet)return;let a=this.Module.NeedsRedrawDelegate.extend("NeedsRedrawDelegate",{setNeedsRedrawIn:this.scheduleRedraw.bind(this,e)}),r=new a;e.setNeedsRedrawDelegate(r),e.isViewRefreshHandlerSet=!0}setupDataDecoding(){let e=this.moduleHandler.get(),a=e.DataDecoding.extend("DataDecoding",{decode(r,s){try{let i=JSON.parse(s),o=[];for(let n of i){let c=new TextDecoder(n.ianaName,{fatal:!0});o.push(c.decode(r.slice(n.startIndex,n.endIndex)))}return o.join("")}catch{return""}}});e.setDataDecoding(new a)}start(e,a,r){e&&a&&(this.setupDataDecoding(),this.moduleHandler.get().callMain(),this.moduleHandler.get().__emscripten_proxy_main!==void 0||r())}getWritableDataPath(e){return e!=null?(d.debug(`IndexedDB database name override in use to recover from blocked standard database: ${e}`),e):this.writableDataPathStandard}numOfMBToPages(e){return Math.ceil(1024*e*1024/64/1024)}async setup({libraryLocation:e,locationPath:a,writableDataPathOverride:r,overrideThreadsSupport:s,overrideSimdSupport:i,verifyResponseHash:o,referredOrigin:n,fixedWasmMemory:c}){var l;let h=!1,m=!1;this.writableDataPath=this.getWritableDataPath(r),this.resourcePath=`${e}${this.resourceFilesSubfolder}/`,self.path=a;let{resolve:g,reject:f,promise:w}=new O,v=E.sdkVersion();if(v==="")throw new A({name:"Invalid library version",message:"Library version is not defined or empty, cannot generate proper path to library files."});let[F,u]=await Promise.all([me(),ge()]);s!=="auto"&&(u=s==="on"),i!=="auto"&&(F=i==="on");let b=this.getWasmCoreFileName(F,u),x=he(v,e,b),{jsURI:G,wasmURI:ae}=x,Be={instantiateWasm:(y,Ae)=>(le({importObject:y,wasmURI:ae,expectedHash:this.getWasmCoreExpectedHash(F,u),verifyResponseHash:o,successCallback:Ae,progressCallback:this._loadProgressCallback,errorCallback:Pe=>{f(Pe)},referredOrigin:n}),{})},B=c===null?null:new WebAssembly.Memory({initial:this.numOfMBToPages(c),maximum:this.numOfMBToPages(300),shared:u});return B!==null&&d.log(d.Level.Debug,"Fixed wasmMemory set",B),this.moduleHandler.set({...B?{wasmMemory:B}:{},mainScriptUrlOrBlob:G,canvas:(l=this.workerFunctions.getOffscreenCanvas())!=null?l:{getContext:()=>null},...Be,dynamicLibraries:this.getWasmDynamicLibraries(ae),locateFile:y=>e+y,noInitialRun:!0,preRun:[async()=>{try{await oe({writableDataPath:this.writableDataPath})}catch(y){if(y.name==="BlockedIndexedDB"){f(y.toString());return}d.log(d.Level.Debug,"No IndexedDB support, some data will not be persisted:",y)}m=!0,this.start(m,h,g)}],onMainComplete:()=>{if([h,m].includes(!1)){d.log(d.Level.Warn,{runtimeLoaded:h,fileSystemSynced:m},"Both runtimeLoaded and fileSystemSynced should be true when calling onMainComplete"),f("onMainComplete has been called but runtime or file system was not ready.");return}g()},onRuntimeInitialized:()=>{h=!0,this.start(m,h,g)},print:y=>{d.log(d.Level.Info,y)}}),await ue(G,v)||f(`Couldn\'t retrieve Scandit Data Capture library at ${G}, did you configure the path for it correctly?`),w}};fe.get3dPartyLicenseKeyMethodName=atob("Z2V0QmxpbmtJZExpY2Vuc2VLZXk=");var D=fe;function ye(t){return typeof t=="object"&&t!=null&&t.document==null&&"addEventListener"in t&&typeof t.importScripts=="function"}function Se(t){console.warn("Reached unexpected case",t)}var te=class{constructor(t,e){this.onMessageListener=this.onMessage.bind(this),this.workerSelf=t,this.dataCaptureInstance=new D(e,{postMessage:this.postMessage.bind(this),getOffscreenCanvas:this.getOffscreenCanvas.bind(this)}),ye(t)&&(re(t),this.listenToMessages())}listenToMessages(){this.workerSelf.addEventListener("message",this.onMessageListener),this.workerSelf.addEventListener("error",t=>{d.log(d.Level.Error,t)}),this.workerSelf.addEventListener("messageerror",t=>{d.log(d.Level.Error,t)})}postMessage(t,e){this.workerSelf.postMessage(t,e!=null?e:[])}getOffscreenCanvas(){if(this.isOffscreenCanvasSupported())return new this.workerSelf.OffscreenCanvas(32,32)}isOffscreenCanvasSupported(){return typeof this.workerSelf.OffscreenCanvas=="function"}hasPayload(t){return M(t)&&"payload"in t}hasTransferables(t){return M(t)&&Array.isArray(t.transferables)}async respondWith(t,e,a){let r=null,s;try{s=a(),s instanceof Promise&&(s=await s)}catch(o){s=void 0,r=C(o)}let i={type:"workerTaskId",command:t,id:e,payload:this.hasPayload(s)?s.payload:void 0};r!=null&&(i.error=r),this.postMessage(i,this.hasTransferables(s)?s.transferables:[])}onMessage(t){switch(t.data.command){case"loadLibrary":{{let{data:e}=t;this.respondWith(e.command,e.id,async()=>this.dataCaptureInstance.loadLibrary({libraryLocation:e.libraryLocation,locationPath:e.locationPath,referredOrigin:e.referredOrigin,writableDataPathOverride:e.writableDataPathOverride,overrideThreadsSupport:e.overrideThreadsSupport,overrideSimdSupport:e.overrideSimdSupport,verifyResponseHash:e.verifyResponseHash,fixedWasmMemory:e.fixedWasmMemory}))}break}case"onTap":{{let{data:e}=t;this.respondWith(e.command,e.id,async()=>{this.dataCaptureInstance.onTap(e.point)})}break}case"hintPresenterV2update":{{let{data:e}=t;this.respondWith(e.command,e.id,async()=>{this.dataCaptureInstance.hintPresenterV2Update()})}break}case"createContext":{{let{data:e}=t;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.createContext({context:e.context,deviceId:e.deviceId,delayedRegistration:e.delayedRegistration,highEndBlurryRecognition:e.highEndBlurryRecognition,appName:e.appName,parentDomain:e.parentDomain}))}break}case"setFrameSource":{{let{data:e}=t;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.setFrameSource(e.mirrorAxis,e.isCameraFrameSource))}break}case"processFrame":{{let{data:e}=t;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.processFrame({data:e.data,width:e.width,height:e.height,colorType:e.colorType}))}break}case"requestFrameData":{{let{data:e}=t;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.requestFrameData(e.frameId))}break}case"deleteFrameData":{{let{data:e}=t;this.respondWith(e.command,e.id,()=>{this.dataCaptureInstance.deleteFrameData(e.frameId)})}break}case"updateContext":{{let{data:e}=t;this.respondWith(e.command,e.id,async()=>this.dataCaptureInstance.updateContext(e))}break}case"dispose":{this.respondWith(t.data.command,t.data.id,()=>this.dataCaptureInstance.dispose());break}case"flushAnalytics":{this.respondWith(t.data.command,t.data.id,()=>{this.dataCaptureInstance.flushAnalytics()});break}case"reportCameraProperties":{{let{data:e}=t;this.respondWith(e.command,e.id,async()=>this.dataCaptureInstance.reportCameraProperties(e))}break}case"setLogLevel":{{let{data:e}=t;this.respondWith(e.command,e.id,()=>{d.setLevel(e.level)})}break}case"extractCentaurusLicense":{{let{data:e}=t;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.extractCentaurusLicense(e.licenseKey))}break}case"documentVisibility":{{let{data:e}=t;this.respondWith(e.command,e.id,()=>{this.dataCaptureInstance.onDocumentVisibilityChange(e.state)})}break}case"isFeatureSupported":{{let{data:e}=t;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.isFeatureSupported(e.feature))}break}case"getViewfinderInfo":{{let{data:e}=t;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.getViewfinderInfo())}break}case"getOpenSourceSoftwareLicenseInfo":{{let{data:e}=t;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.getOpenSourceSoftwareLicenseInfo())}break}case"addNativeOverlay":this.dataCaptureInstance.addNativeOverlay(t);break;case"removeNativeOverlay":this.dataCaptureInstance.removeNativeOverlay(t);break;case"convertToJPEGResult":{{let{data:e}=t;this.dataCaptureInstance.convertToJPEGResult(e.imageId,e.result)}break}default:return Se(t.data),!1}return!0}};var we=(t=>(t.Body="body",t.Footnote="footnote",t))(we||{}),L=(t=>(t.Start="start",t.Center="center",t.End="end",t))(L||{}),ve=(t=>(t.Normal="normal",t.Wider="wider",t.FitText="fitText",t))(ve||{}),Fe=(t=>(t.Normal="normal",t.Taller="taller",t))(Fe||{}),Me=(t=>(t.Square="square",t.Rounded="rounded",t))(Me||{}),W=(t=>(t.None="none",t.Check="check",t.ExclamationMark="exclamationMark",t))(W||{}),R=(t=>(t.Top="top",t.AboveViewFinder="aboveViewFinder",t.BelowViewFinder="belowViewFinder",t))(R||{}),Ce=(t=>(t.AboveViewFinder="aboveViewFinder",t.BelowViewFinder="belowViewFinder",t))(Ce||{}),ke=(t=>(t.BlackOnWhite="blackOnWhite",t.WhiteOnBlack="whiteOnBlack",t.Transparent="transparent",t))(ke||{}),I=(t=>(t.Success="success",t.Error="error",t.Warning="warning",t.Info="info",t.Notification="notification",t))(I||{}),De=(t=>(t[t.Ocr=0]="Ocr",t[t.HideLogo=1]="HideLogo",t[t.ShowTestLicenseMessage=2]="ShowTestLicenseMessage",t[t.AugmentedReality=5]="AugmentedReality",t[t.ActivityPingStatsAddon=8]="ActivityPingStatsAddon",t[t.ActivityPing=9]="ActivityPing",t[t.Registration=10]="Registration",t[t.Parser=11]="Parser",t[t.BarcodeCapture=14]="BarcodeCapture",t[t.Analytics=17]="Analytics",t[t.AnalyticsBatchMode=18]="AnalyticsBatchMode",t[t.AnalyticsScanContent=19]="AnalyticsScanContent",t[t.AnalyticsOnlineVerification=20]="AnalyticsOnlineVerification",t[t.SparkScan=21]="SparkScan",t[t.AamvaIdBarcodeVerification=22]="AamvaIdBarcodeVerification",t[t.MappingForTracking=23]="MappingForTracking",t[t.BarcodeFind=24]="BarcodeFind",t[t.MandatoryRegistration=25]="MandatoryRegistration",t[t.FeatureTracking=26]="FeatureTracking",t[t.IdCaptureViz=27]="IdCaptureViz",t[t.IdCaptureMrz=28]="IdCaptureMrz",t[t.IdCaptureBarcode=29]="IdCaptureBarcode",t[t.BarcodeSelectionAimToScan=30]="BarcodeSelectionAimToScan",t[t.BarcodeSelectionTapToScan=31]="BarcodeSelectionTapToScan",t[t.BarcodeCount=32]="BarcodeCount",t[t.BarcodePick=33]="BarcodePick",t[t.IdVerificationDataComparison=34]="IdVerificationDataComparison",t[t.SmartLabelBarcode=35]="SmartLabelBarcode",t[t.SmartLabelText=36]="SmartLabelText",t[t.VoidedIdDetection=37]="VoidedIdDetection",t[t.BarcodeArFull=38]="BarcodeArFull",t[t.BarcodeSequence=39]="BarcodeSequence",t))(De||{});var N=class{constructor(e,a,r){this.barcodeAr=null;this.coreEngine=e,this.Module=a,this.workerFunctions=r}async forSettings(e){var r;(r=this.barcodeAr)==null||r.delete(),this.barcodeAr=new this.Module.BarcodeAr(this.coreEngine.context,JSON.stringify(e));let a=this.Module.BarcodeArListener.extend("BarcodeArListener",{didUpdateSession:(s,i,o)=>{let n=this.coreEngine.convertToLoadableFrameData(o);this.workerFunctions.postMessage({type:"barcodeArDidUpdateSession",payload:{session:JSON.parse(i.toJson()),frameData:n}}),s.delete(),i.delete(),o.delete()}});this.barcodeAr.addListener(new a,1),this.Module.addBarcodeArToContext(this.coreEngine.context,this.barcodeAr)}start(){var e;(e=this.barcodeAr)==null||e.start()}pause(){var e;(e=this.barcodeAr)==null||e.pause()}stop(){var e;(e=this.barcodeAr)==null||e.stop()}setEnabled(e){var a;(a=this.barcodeAr)==null||a.setEnabled(e)}async removeMode(){this.barcodeAr!=null&&this.Module.removeBarcodeArFromContext(this.coreEngine.context,this.barcodeAr)}applySettings(e){var a;(a=this.barcodeAr)==null||a.applySettings(JSON.stringify(e))}};var H=class{constructor(e,a,r){this.trackingListenerSet=!1;this.coreEngine=e,this.Module=a,this.workerFunctions=r,this.setup()}barcodeBatchDidUpdateSession(e){this.workerFunctions.postMessage({type:"barcodeBatchDidUpdateSession",payload:JSON.parse(e.toJson())})}getBatchDeserializer(){return this.barcodeBatchDeserializer}setup(){let e=this.Module.BarcodeBatchListener.extend("BarcodeTrackingListener",{didUpdateSession:(r,s,i)=>{this.barcodeBatchDidUpdateSession(s),r.delete(),s.delete(),i.delete()},onTrackedBarcodeTapped:(r,s)=>{this.onTrackedBarcodeTapped(s),r.delete(),s.delete()}}),a=this.Module.BarcodeBatchDeserializerListener.extend("BarcodeTrackingDeserializerListener",{onModeDeserializationFinished:(r,s,i)=>{this.trackingListenerSet||(s.addListener(new e,1),this.trackingListenerSet=!0),r.delete(),s.delete(),i.delete()},onModeDeserializationStarted(r,s,i){r.delete(),s.delete(),i.delete()},onSettingsDeserializationStarted(r,s,i){r.delete(),s.delete(),i.delete()},onSettingsDeserializationFinished(r,s,i){r.delete(),s.delete(),i.delete()}});this.barcodeBatchDeserializer=new this.Module.BarcodeBatchDeserializer,this.barcodeBatchDeserializer.setListener(new a)}onTrackedBarcodeTapped(e){this.workerFunctions.postMessage({type:"didTapTrackedBarcode",payload:JSON.parse(e.toJson())})}};var _=class{constructor(e,a,r){this.captureListenerSet=!1;this.coreEngine=e,this.Module=a,this.workerFunctions=r,this.setup()}barcodeCaptureDidUpdateSession(e){this.workerFunctions.postMessage({type:"barcodeCaptureDidUpdateSession",payload:JSON.parse(e.toJson())})}barcodeBatchDidUpdateSession(e){this.workerFunctions.postMessage({type:"barcodeBatchDidUpdateSession",payload:JSON.parse(e.toJson())})}getCaptureDeserializer(){return this.barcodeCaptureDeserializer}getTrackingDeserializer(){return this.barcodeBatchDeserializer}setup(){let e=this.Module.BarcodeCaptureListener.extend("BarcodeCaptureListener",{didScan:(o,n,c)=>{this.barcodeCaptureDidScan(n,c),o.delete(),c.delete(),n.delete()},didUpdateSession:(o,n,c)=>{this.barcodeCaptureDidUpdateSession(n),o.delete(),c.delete(),n.delete()}}),a=this.Module.Feedback.extend("Feedback",{emit:()=>{this.successFeedback()}}),r=new e,s=new a,i=this.Module.BarcodeCaptureDeserializerListener.extend("BarcodeCaptureDeserializerListener",{onModeDeserializationFinished:(o,n,c)=>{n.addListener(r,1),n.setSuccessFeedback(s),o.delete(),n.delete(),c.delete()},onModeDeserializationStarted(o,n,c){o.delete(),n.delete(),c.delete()},onSettingsDeserializationStarted(o,n,c){o.delete(),n.delete(),c.delete()},onSettingsDeserializationFinished(o,n,c){o.delete(),n.delete(),c.delete()}});this.barcodeCaptureDeserializer=new this.Module.BarcodeCaptureDeserializer,this.barcodeCaptureDeserializer.setListener(new i)}successFeedback(){this.workerFunctions.postMessage({type:"successFeedback"})}barcodeCaptureDidScan(e,a){let r=this.coreEngine.convertToLoadableFrameData(a);this.workerFunctions.postMessage({type:"barcodeCaptureDidScan",payload:{session:JSON.parse(e.toJson()),frameData:r}})}};function Ke(t){return t.charAt(0).toUpperCase()+t.slice(1)}function Ie(t){return t}var z=class{constructor(e,a,r){this.barcodeFind=null;this.basicOverlay=null;this.transparentGuidanceHintStyle={backgroundColor:"00000000",cornerRadius:4,fitToText:!1,isAnimatedToView:!1,textAlignment:L.Center,hintIcon:W.None,hintAnchor:R.AboveViewFinder,hintAnchorOffset:-12,horizontalMargin:0,iconColor:"00000000",lineHeight:-1,maxLines:1,maxWidthFraction:.8,textColor:"ffffffff",textSize:15,textWeight:600};this.customerTransformation=Ie;this.coreEngine=e,this.Module=a,this.workerFunctions=r}async forSettings(e){var o;(o=this.barcodeFind)==null||o.delete(),this.barcodeFind=new this.Module.BarcodeFind(this.coreEngine.context,JSON.stringify(e));let a=this.Module.Feedback.extend("Feedback",{emit:()=>{this.listUpdatedFeedback()}}),r=this.Module.Feedback.extend("Feedback",{emit:()=>{this.barcodeFindFeedback()}}),s=this.Module.BarcodeFindTransformer.extend("BarcodeFindTransformer",{transformBarcodeData:n=>this.customerTransformation(n)}),i=this.Module.BarcodeFindListener.extend("BarcodeFindListener",{didUpdateSession:(n,c,l)=>{let h=this.coreEngine.convertToLoadableFrameData(l);this.workerFunctions.postMessage({type:"barcodeFindDidUpdateSession",payload:{session:JSON.parse(c.toJson()),frameData:h}}),n.delete(),c.delete(),l.delete()},onSearchPaused:n=>{let c=[];for(let l=0;l<n.size();l++)c.push(n.get(l));this.workerFunctions.postMessage({type:"barcodeFindSearchPaused",payload:{foundItems:c}})},onSearchStopped:n=>{let c=[];for(let l=0;l<n.size();l++)c.push(n.get(l));this.workerFunctions.postMessage({type:"barcodeFindSearchStopped",payload:{foundItems:c}})},onSearchStarted:()=>{this.workerFunctions.postMessage({type:"barcodeFindSearchStarted",payload:{}})}});this.barcodeFind.setBarcodeFindTransformer(new s),this.barcodeFind.addListener(new i,1),this.barcodeFind.setItemListUpdatedFeedback(new a),this.barcodeFind.setFeedback(new r),this.Module.addBarcodeFindToContext(this.coreEngine.context,this.barcodeFind)}barcodeFindFeedback(){this.workerFunctions.postMessage({type:"barcodeFindFeedback",payload:{}})}start(){var e;(e=this.barcodeFind)==null||e.start()}stop(){var e;(e=this.barcodeFind)==null||e.stop()}pause(){var e;(e=this.barcodeFind)==null||e.pause()}setEnabled(e){var a;(a=this.barcodeFind)==null||a.setEnabled(e)}setItemList(e){var a;(a=this.barcodeFind)==null||a.setItemList(JSON.stringify(e))}async removeMode(){this.barcodeFind!=null&&this.Module.removeBarcodeFindFromContext(this.coreEngine.context,this.barcodeFind)}addBasicOverlay(){var e;(e=this.basicOverlay)==null||e.delete(),this.basicOverlay=null,this.barcodeFind!=null&&(this.basicOverlay=new this.Module.BarcodeFindBasicOverlay(this.barcodeFind)),this.coreEngine.view!=null&&this.basicOverlay!=null&&(this.basicOverlay.setGuidanceHandler(this.createWebFindGuidanceHandler()),this.Module.addBarcodeFindBasicOverlayToView(this.coreEngine.view,this.basicOverlay))}removeBasicOverlay(){this.coreEngine.view!=null&&this.basicOverlay!=null&&this.Module.removeBarcodeFindBasicOverlayFromView(this.coreEngine.view,this.basicOverlay)}async applySettings(e){var a;(a=this.barcodeFind)==null||a.applySettings(JSON.stringify(e))}updateBasicOverlay(e){let a=Object.entries(e).filter(([r,s])=>r!=="type");for(let[r,s]of a){let i=`set${Ke(r)}`;this.basicOverlay!=null&&typeof this.basicOverlay[i]=="function"&&s!=null&&this.basicOverlay[i](s)}}setTransformerFunction(e){this.customerTransformation=e!=null?e:Ie}successFeedback(){this.workerFunctions.postMessage({type:"successFeedback"})}listUpdatedFeedback(){this.workerFunctions.postMessage({type:"barcodeFindListUpdatedFeedback",payload:{}})}setToast(e,a){let r=this.coreEngine.hintPresenterV2;e?r==null||r.showToast(JSON.stringify(a)):r==null||r.hideToast(a.tag)}setGuidance(e,a,r){let s={tag:r,text:a,hintStyle:this.transparentGuidanceHintStyle};this.workerFunctions.postMessage({type:e?"showGuidance":"hideGuidance",payload:s})}createWebFindGuidanceHandler(){let e=this.Module.BarcodeFindGuidanceHandler.extend("BarcodeFindGuidanceHandler",{setInitialGuidance:(a,r)=>{this.setGuidance(a,r,"InitialGuidance")},setMoveCloserGuidance:(a,r)=>{this.setGuidance(!1,r,"InitialGuidance"),this.setGuidance(a,r,"MoveCloserGuidance")},setAllItemsFound:(a,r)=>{let s={text:r,toastHintStyle:I.Success,tag:"AllItemsFound"};this.setToast(a,s)},setTapShutterToPause:(a,r)=>{this.setGuidance(!1,r,"InitialGuidance"),this.setGuidance(a,r,"TapShutterToPause")},setTapShutterToResume:(a,r)=>{this.setGuidance(!1,r,"InitialGuidance"),this.setGuidance(a,r,"TapShutterResume")},setItemListUpdated:(a,r)=>{let s={text:r,toastHintStyle:I.Info,tag:"ItemListUpdated"};this.setToast(a,s)}});return new e}};var S=class{constructor(e){this.subscribers=new Set;this.property={key:e,value:null}}addSubscriber(e){var a;this.subscribers.add(e),(a=e.onPropertyChanged)==null||a.call(e,this.property)}removeSubscriber(e){this.subscribers.delete(e)}setProperty(e){var a;if(this.property.value!==e.value){this.property={key:this.property.key,value:e.value};for(let r of this.subscribers)(a=r.onPropertyChanged)==null||a.call(r,this.property)}}};var Ze={torch_state:new S("torch_state"),scanning_mode:new S("scanning_mode"),sound_enabled:new S("sound_enabled"),haptic_enabled:new S("haptic_enabled"),session_stop_reason:new S("session_stop_reason"),camera_position:new S("camera_position")},J=class{getBehaviorSubject(e){return Ze[e]}};var V=class{constructor(e,a,r){this.captureListenerSet=!1;this.propertyPushSource=new J;this.coreEngine=e,this.Module=a,this.workerFunctions=r,this.setup()}sparkScanDidUpdateSession(e){this.workerFunctions.postMessage({type:"sparkScanDidUpdateSession",payload:JSON.parse(e.toJson())})}getSparkScanDeserializer(){return this.sparkScanDeserializer}setup(){let e=this.Module.SparkScanListener.extend("SparkScanListener",{didScan:(s,i,o)=>{this.sparkScanDidScan(i,o),s.delete(),i.delete(),o.delete()},didUpdateSession:(s,i,o)=>{this.sparkScanDidUpdateSession(i),s.delete(),i.delete(),o.delete()}}),a=this.Module.Feedback.extend("Feedback",{emit:()=>{this.successFeedback()}}),r=this.Module.SparkScanDeserializerListener.extend("SparkScanDeserializerListener",{onModeDeserializationFinished:(s,i,o)=>{this.captureListenerSet||(i.addListener(new e,1),i.setSuccessFeedback(new a),i.setPropertyPushSource(this.propertyPushSource),this.captureListenerSet=!0),s.delete(),i.delete(),o.delete()},onModeDeserializationStarted(s,i,o){s.delete(),i.delete(),o.delete()},onSettingsDeserializationStarted(s,i,o){s.delete(),i.delete(),o.delete()},onSettingsDeserializationFinished(s,i,o){s.delete(),i.delete(),o.delete()},onOverlayDeserializationStarted(s,i,o){s.delete(),i.delete(),o.delete()},onOverlayDeserializationFinished:(s,i,o)=>{var n;(n=this.sparkScanOverlay)==null||n.delete(),this.sparkScanOverlay=i,s.delete(),o.delete()}});this.sparkScanDeserializer=new this.Module.SparkScanDeserializer,this.sparkScanDeserializer.setListener(new r)}emitErrorFeedback(e){var a;(a=this.sparkScanOverlay)==null||a.onErrorFeedbackEmitted(e)}overlayReadyForDraw(){var e;(e=this.sparkScanOverlay)==null||e.onReadyForNewData()}analyticsManagerPropertyChanged(e){this.propertyPushSource.getBehaviorSubject(e.key).setProperty(e)}successFeedback(){this.workerFunctions.postMessage({type:"successFeedback"})}sparkScanDidScan(e,a){let r=this.coreEngine.convertToLoadableFrameData(a);this.workerFunctions.postMessage({type:"sparkScanDidScan",payload:{session:JSON.parse(e.toJson()),frameData:r}})}};var U=class extends D{constructor(e,a){super(e,a)}getModeDeserializers(){this.barcodeCaptureMode=new _(this,this.Module,this.workerFunctions),this.barcodeBatchMode=new H(this,this.Module,this.workerFunctions),this.sparkScanMode=new V(this,this.Module,this.workerFunctions),this.barcodeFindMode=new z(this,this.Module,this.workerFunctions),this.barcodeArMode=new N(this,this.Module,this.workerFunctions);let e=super.getModeDeserializers();return e.push_back(this.barcodeCaptureMode.getCaptureDeserializer()),e.push_back(this.barcodeBatchMode.getBatchDeserializer()),e.push_back(this.sparkScanMode.getSparkScanDeserializer()),e}getWasmSideModuleFileName(){return""}getWasmCoreFileName(e,a){return a?e?"scandit-datacapture-sdk-barcode-simd-pthreads.wasm":"scandit-datacapture-sdk-barcode-pthreads.wasm":e?"scandit-datacapture-sdk-barcode-simd.wasm":"scandit-datacapture-sdk-barcode.wasm"}getWasmCoreExpectedHash(e,a){return a?e?"c66bef0f7edf63cd99fe47b33cbbf3e8f0c2b3a1788c24bead0f8c9e1b7fe128":"96b8865e2fb5b4caeb13ef8090ef2eefd2c31a94138a0c4c12134d94041d4385":e?"e9e7a852e80bf62cf4ac8f7582b34a78c916c0cc3c5357d4d6ff62131ab8f3e6":"6b0586421946d35cb569275a4caf7ea94200aa534653942468d9572711969cdc"}getWasmMetadata(){return p}};function Qe(t){return(a=>/^[$A-Z_a-z][\\w$]*\\s*\\(.*\\)\\s*\\{/.test(a)&&!a.startsWith("function"))(t)?`function ${t}`:t}var et=["fetch","XMLHttpRequest","eval","Function","self","globalThis","Module","importScripts","this","console","window","document","import","Worker","ServiceWorker"];function tt(t){return et.map(a=>new RegExp(`\\\\b${a}\\\\b`,"g")).some(a=>a.test(t))}function xe(t){if(t==null)return null;let e=Qe(t);if(tt(e))throw new Error("Function should be pure. Shouldn\'t introduce side effects, or rely on global scope");let a=`\'use strict\';\n return (${e});`;try{return new Function(a)()}catch{return null}}var $=class extends te{constructor(e,a){super(e,a),this.dataCaptureInstance=new U(a,{postMessage:this.postMessage.bind(this),getOffscreenCanvas:this.getOffscreenCanvas.bind(this)})}async respondWith(e,a,r){let s=null,i;try{i=r(),i instanceof Promise&&(i=await i)}catch(n){i=void 0,s=C(n)}let o={type:"workerTaskId",command:e,id:a,payload:this.hasPayload(i)?i.payload:void 0};s!=null&&(o.error=s),this.postMessage(o,this.hasTransferables(i)?i.transferables:[])}onMessage(e){switch(e.data.command){case"sparkScanEmitErrorFeedback":{let{data:a}=e;return this.respondWith(a.command,a.id,()=>{this.dataCaptureInstance.sparkScanMode.emitErrorFeedback(a.shouldRemoveBrush)}),!0}case"sparkScanOverlayReadyForDraw":{let{data:a}=e;return this.respondWith(a.command,a.id,()=>{this.dataCaptureInstance.sparkScanMode.overlayReadyForDraw()}),!0}case"sparkScanAnalyticsManagerPropertyChanged":{let{data:a}=e;return this.respondWith(a.command,a.id,async()=>{this.dataCaptureInstance.sparkScanMode.analyticsManagerPropertyChanged(a.property)}),!0}case"barcodeFindForSettings":{let{data:a}=e;return this.respondWith(a.command,a.id,async()=>this.dataCaptureInstance.barcodeFindMode.forSettings(a.settings)),!0}case"barcodeFindModeRemove":{let{data:a}=e;return this.respondWith(a.command,a.id,async()=>this.dataCaptureInstance.barcodeFindMode.removeMode()),!0}case"barcodeFindSearchStart":return this.respondWith(e.data.command,e.data.id,()=>{this.dataCaptureInstance.barcodeFindMode.start()}),!0;case"barcodeFindSearchPause":return this.respondWith(e.data.command,e.data.id,()=>{this.dataCaptureInstance.barcodeFindMode.pause()}),!0;case"barcodeFindSearchStop":return this.respondWith(e.data.command,e.data.id,()=>{this.dataCaptureInstance.barcodeFindMode.stop()}),!0;case"barcodeFindSetItemList":{let{data:a}=e;return this.respondWith(e.data.command,e.data.id,()=>{this.dataCaptureInstance.barcodeFindMode.setItemList(a.itemList)}),!0}case"barcodeFindSetEnabled":{let{data:a}=e;return this.respondWith(e.data.command,e.data.id,()=>{this.dataCaptureInstance.barcodeFindMode.setEnabled(a.enabled)}),!0}case"barcodeFindApplySettings":{let{data:a}=e;return this.respondWith(a.command,a.id,async()=>this.dataCaptureInstance.barcodeFindMode.applySettings(a.settings)),!0}case"barcodeFindAddBasicOverlay":{let{data:a}=e;return this.respondWith(a.command,a.id,async()=>{this.dataCaptureInstance.barcodeFindMode.addBasicOverlay()}),!0}case"barcodeFindRemoveBasicOverlay":{let{data:a}=e;return this.respondWith(a.command,a.id,async()=>{this.dataCaptureInstance.barcodeFindMode.removeBasicOverlay()}),!0}case"barcodeFindUpdateBasicOverlay":{let{data:a}=e;return this.respondWith(a.command,a.id,async()=>{this.dataCaptureInstance.barcodeFindMode.updateBasicOverlay(a.jsonOverlay)}),!0}case"barcodeFindSetTransformerFunction":{let{data:a}=e;return this.respondWith(a.command,a.id,async()=>{let r=xe(a.functionAsString);this.dataCaptureInstance.barcodeFindMode.setTransformerFunction(r)}),!0}case"barcodeArForSettings":{let{data:a}=e;return this.respondWith(a.command,a.id,async()=>this.dataCaptureInstance.barcodeArMode.forSettings(a.settings)),!0}case"barcodeArModeRemove":{let{data:a}=e;return this.respondWith(a.command,a.id,async()=>this.dataCaptureInstance.barcodeArMode.removeMode()),!0}case"barcodeArSearchStart":return this.respondWith(e.data.command,e.data.id,()=>{this.dataCaptureInstance.barcodeArMode.start()}),!0;case"barcodeArSearchPause":return this.respondWith(e.data.command,e.data.id,()=>{this.dataCaptureInstance.barcodeArMode.pause()}),!0;case"barcodeArSearchStop":return this.respondWith(e.data.command,e.data.id,()=>{this.dataCaptureInstance.barcodeArMode.stop()}),!0;case"barcodeArSetEnabled":{let{data:a}=e;return this.respondWith(e.data.command,e.data.id,()=>{this.dataCaptureInstance.barcodeArMode.setEnabled(a.enabled)}),!0}case"barcodeArApplySettings":{let{data:a}=e;return this.respondWith(a.command,a.id,async()=>{this.dataCaptureInstance.barcodeArMode.applySettings(a.settings)}),!0}default:return super.onMessage(e)}}};var br=new $(self,{get:()=>self.Module,set:t=>{self.Module=t}});function yr(t){}})();\n'],{type:"application/javascript"})),e=new Worker(s,r);return URL.revokeObjectURL(s),e}var o=class r extends DataCaptureLoader{constructor(){super(...arguments);this._name="BarcodeCapture";}get dataCaptureWorker(){return (this._dataCaptureWorker)!=null||(this._dataCaptureWorker=i({name:this.name})),this._dataCaptureWorker}get name(){return this._name}static async create(e){var a;let t=new r(e);return await t.workerCommand("setLogLevel",{level:(a=e.logLevel)!=null?a:Logger.Level.Debug}),await t.load(),t}async workerCommand(e,t,a){return new Promise((d,l)=>{let n=this.workerCommandId++;this.workerTasks.set(n,{resolve:d,reject:l,command:e});let c={...t,command:e,id:n};this.dataCaptureWorker.postMessage(c,a);})}};
2
+ export{o as a};
@@ -1 +1 @@
1
- import {a}from'./chunk-DCUKY2F4.js';import {b}from'./chunk-OLJXVUYE.js';var y=class{constructor(){this.properties={};this.symbologies={};this._arucoDictionary=null;}get enabledSymbologies(){return Object.keys(this.symbologies).filter(o=>this.symbologies[o].isEnabled)}settingsForSymbology(o){if(!this.symbologies[o]){let t=b.SymbologySettings[o];t._symbology=o,this.symbologies[o]=t;}return this.symbologies[o]}setProperty(o,t){this.properties[o]=t;}getProperty(o){return this.properties[o]}enableSymbologies(o){for(let t of o)this.enableSymbology(t,true);}enableSymbology(o,t){this.settingsForSymbology(o).isEnabled=t,o==="aruco"&&(this._arucoDictionary=a.fromPreset("5X5_50"));}setArucoDictionary(o){this._arucoDictionary=o;}toJSONObject(){var o,t;return {properties:this.properties,symbologies:Object.keys(this.symbologies).reduce((i,e)=>(i[e]=this.symbologies[e].toJSONObject(),i),{}),arucoDictionary:(t=(o=this._arucoDictionary)==null?void 0:o.toJSONObject())!=null?t:null}}};export{y as a};
1
+ import {a}from'./chunk-DCUKY2F4.js';import {b}from'./chunk-6GGHOIBF.js';var y=class{constructor(){this.properties={};this.symbologies={};this._arucoDictionary=null;}get enabledSymbologies(){return Object.keys(this.symbologies).filter(o=>this.symbologies[o].isEnabled)}settingsForSymbology(o){if(!this.symbologies[o]){let t=b.SymbologySettings[o];t._symbology=o,this.symbologies[o]=t;}return this.symbologies[o]}setProperty(o,t){this.properties[o]=t;}getProperty(o){return this.properties[o]}enableSymbologies(o){for(let t of o)this.enableSymbology(t,true);}enableSymbology(o,t){this.settingsForSymbology(o).isEnabled=t,o==="aruco"&&(this._arucoDictionary=a.fromPreset("5X5_50"));}setArucoDictionary(o){this._arucoDictionary=o;}toJSONObject(){var o,t;return {properties:this.properties,symbologies:Object.keys(this.symbologies).reduce((i,e)=>(i[e]=this.symbologies[e].toJSONObject(),i),{}),arucoDictionary:(t=(o=this._arucoDictionary)==null?void 0:o.toJSONObject())!=null?t:null}}};export{y as a};
@@ -1 +1 @@
1
- import {a}from'./chunk-4ID5S6I7.js';import {b}from'./chunk-OLJXVUYE.js';import {Brush}from'@scandit/web-datacapture-core';var s=class o{constructor(){this.type="sparkScan";this._shouldShowScanAreaGuides=false;this._shouldRemoveLocationsAfterScan=true;this._shouldDrawViewfinder=false;this._style=b.SparkScan.SparkScanOverlay.defaultStyle;this._viewfinder=new a;}get style(){return this._style}static async withSparkScanForView(a,r){let t=new o;return t.sparkScan=a,await t.setBrush(new Brush(b.SparkScan.SparkScanOverlay.DefaultBrush.fillColor,b.SparkScan.SparkScanOverlay.DefaultBrush.strokeColor,b.SparkScan.SparkScanOverlay.DefaultBrush.strokeWidth)),r&&await r.addOverlay(t),t}setRadius(a){this._viewfinder.radius=a;}getBrush(){return this._brush}async setBrush(a){this._brush=a,await this.sparkScan.notifyContext();}async overlayReadyForDraw(){await this.sparkScan.workerCommand("sparkScanOverlayReadyForDraw",{});}async setErrorBrush(a){this._errorBrush=a,await this.sparkScan.notifyContext();}async setShouldShowScanAreaGuides(a){this._shouldShowScanAreaGuides=a,await this.sparkScan.notifyContext();}async setShouldRemoveLocationsAfterScan(a){this._shouldRemoveLocationsAfterScan=a,await this.sparkScan.notifyContext();}async setShouldDrawViewfinder(a){this._shouldDrawViewfinder=a,await this.sparkScan.notifyContext();}shouldShowScanAreaGuides(){return this._shouldShowScanAreaGuides}shouldRemoveLocationsAfterScan(){return this._shouldRemoveLocationsAfterScan}toJSONObject(){var a,r;return {type:this.type,brush:this._brush.toJSONObject(),errorBrush:(r=(a=this._errorBrush)==null?void 0:a.toJSONObject())!=null?r:this._brush.toJSONObject(),shouldShowScanAreaGuides:this._shouldShowScanAreaGuides,shouldRemoveLocationsAfterScan:this._shouldRemoveLocationsAfterScan,viewfinder:this._viewfinder.toJSONObject(),style:this.style,shouldDrawViewfinder:this._shouldDrawViewfinder}}};export{s as a};
1
+ import {a}from'./chunk-B5DM7UH2.js';import {b}from'./chunk-6GGHOIBF.js';import {Brush}from'@scandit/web-datacapture-core';var s=class o{constructor(){this.type="sparkScan";this._shouldShowScanAreaGuides=false;this._shouldRemoveLocationsAfterScan=true;this._shouldDrawViewfinder=false;this._style=b.SparkScan.SparkScanOverlay.defaultStyle;this._viewfinder=new a;}get style(){return this._style}static async withSparkScanForView(a,r){let t=new o;return t.sparkScan=a,await t.setBrush(new Brush(b.SparkScan.SparkScanOverlay.DefaultBrush.fillColor,b.SparkScan.SparkScanOverlay.DefaultBrush.strokeColor,b.SparkScan.SparkScanOverlay.DefaultBrush.strokeWidth)),r&&await r.addOverlay(t),t}setRadius(a){this._viewfinder.radius=a;}getBrush(){return this._brush}async setBrush(a){this._brush=a,await this.sparkScan.notifyContext();}async overlayReadyForDraw(){await this.sparkScan.workerCommand("sparkScanOverlayReadyForDraw",{});}async setErrorBrush(a){this._errorBrush=a,await this.sparkScan.notifyContext();}async setShouldShowScanAreaGuides(a){this._shouldShowScanAreaGuides=a,await this.sparkScan.notifyContext();}async setShouldRemoveLocationsAfterScan(a){this._shouldRemoveLocationsAfterScan=a,await this.sparkScan.notifyContext();}async setShouldDrawViewfinder(a){this._shouldDrawViewfinder=a,await this.sparkScan.notifyContext();}shouldShowScanAreaGuides(){return this._shouldShowScanAreaGuides}shouldRemoveLocationsAfterScan(){return this._shouldRemoveLocationsAfterScan}toJSONObject(){var a,r;return {type:this.type,brush:this._brush.toJSONObject(),errorBrush:(r=(a=this._errorBrush)==null?void 0:a.toJSONObject())!=null?r:this._brush.toJSONObject(),shouldShowScanAreaGuides:this._shouldShowScanAreaGuides,shouldRemoveLocationsAfterScan:this._shouldRemoveLocationsAfterScan,viewfinder:this._viewfinder.toJSONObject(),style:this.style,shouldDrawViewfinder:this._shouldDrawViewfinder}}};export{s as a};
@@ -0,0 +1,2 @@
1
+ import {b as b$1}from'./chunk-YZHF42BC.js';import {b}from'./chunk-5DP5VNWQ.js';import {a as a$2}from'./chunk-T2Y2C76P.js';import {a as a$1,b as b$2}from'./chunk-OPL5NVVM.js';import {e,f as f$1,a,b as b$3,d,c as c$1}from'./chunk-DVHTYKDX.js';import {f}from'./chunk-YBD5JYCX.js';import {Point}from'@scandit/web-datacapture-core';import {ScanditHTMLElement,defineCustomElements,safeCancelAnimation,html}from'@scandit/web-datacapture-core/build/js/private/utils/index.js';var c=class b$4 extends ScanditHTMLElement{constructor(){super(...arguments);this._pointerDownListener=this.onPointerDown.bind(this);this._pointerUpListener=this.onPointerUp.bind(this);this._longPressController=new b(this);this._longPressStartListener=this.onLongPressStart.bind(this);}get minimized(){return !this.hasAttribute("expanded")}set minimized(t){this.toggleAttribute("minimized",!t);}get expanded(){return this.hasAttribute("expanded")}set expanded(t){this.toggleAttribute("expanded",t),this._dragController&&(this._dragController.margin=t?new Point(-65,-65):new Point(0,0),this._dragController.repositionIfOutOfBounds());}get pressed(){return this.hasAttribute("pressed")}set pressed(t){this.toggleAttribute("pressed",t);}get visible(){return this.hasAttribute("visible")}set visible(t){this.toggleAttribute("visible",t);}static create(){return defineCustomElements({[f]:b$4}),document.createElement(f)}connectedCallback(){var t;this.render(),this._dragController=new b$1(this,(t=this.parentElement)==null?void 0:t.parentElement),this._dragController.connect(),this.addEventListener("pointerdown",this._pointerDownListener),this.addEventListener("pointerup",this._pointerUpListener),this.addEventListener("longpressstart",this._longPressStartListener),this._longPressController.connect(),this._longPressController.elementsAllowedToTriggerLongPressEvents.add(this),this._pulse=this.querySelector(".pulse"),this._pulseAnimation=new Animation(new KeyframeEffect(this._pulse,[{background:"rgba(0, 0, 0, 0)"},{background:`var(${e})`,transform:"translate(-50%, -50%) scale(1.1)"},{background:"rgba(0, 0, 0, 0)"}],{duration:1100,easing:"ease-out",iterations:Number.POSITIVE_INFINITY}));}disconnectedCallback(){var t;this.removeEventListener("pointerdown",this._pointerDownListener),this.removeEventListener("pointerup",this._pointerUpListener),this.removeEventListener("longpressstart",this._longPressStartListener),(t=this._dragController)==null||t.disconnect(),this._longPressController.disconnect(),this.innerHTML="";}repositionIfOutOfBounds(){var t;(t=this._dragController)==null||t.repositionIfOutOfBounds();}translateTo(t){var i;(i=this._dragController)==null||i.translateTo(t,false);}setImage(t){var n;let i=this.querySelector("div");(n=i.firstElementChild)==null||n.remove(),t&&i.append(t);}startPulsating(){var t;(t=this._pulseAnimation)==null||t.play();}stopPulsating(){this._pulseAnimation&&(safeCancelAnimation(this._pulseAnimation),this._pulseAnimation.currentTime=0);}render(){this.innerHTML=html`<div><div class="pulse"></div><svg width="49" height="26" viewBox="0 0 49 26" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="7.57422" y="-0.00390625" width="3.20017" height="25.7171" rx="0.5" fill="white" style="fill:var(${f$1})"/><path d="M44.8418 0.496094C44.8418 0.219952 45.0657 -0.00390625 45.3418 -0.00390625H48.001C48.2771 -0.00390625 48.501 0.219951 48.501 0.496094V25.2132C48.501 25.4894 48.2771 25.7132 48.001 25.7132H45.3418C45.0657 25.7132 44.8418 25.4894 44.8418 25.2132V0.496094Z" fill="white" style="fill:var(${f$1})"/><path d="M33.8271 0.896094C33.8271 0.399038 34.2301 -0.00390625 34.7271 -0.00390625H39.1368C39.6338 -0.00390625 40.0368 0.399038 40.0368 0.896094V24.8132C40.0368 25.3103 39.6338 25.7132 39.1368 25.7132H34.7271C34.2301 25.7132 33.8271 25.3103 33.8271 24.8132V0.896094Z" fill="white" style="fill:var(${f$1})"/><path d="M16.3154 0.746095C16.3154 0.331881 16.6512 -0.00390625 17.0654 -0.00390625H20.1879C20.6021 -0.00390625 20.9379 0.33188 20.9379 0.746094V24.9632C20.9379 25.3774 20.6021 25.7132 20.1879 25.7132H17.0654C16.6512 25.7132 16.3154 25.3774 16.3154 24.9632V0.746095Z" fill="white" style="fill:var(${f$1})"/><path d="M0.5 0.246094C0.5 0.108023 0.611929 -0.00390625 0.75 -0.00390625H2.2897C2.42777 -0.00390625 2.5397 0.108023 2.5397 0.246094V25.4632C2.5397 25.6013 2.42777 25.7132 2.2897 25.7132H0.75C0.611929 25.7132 0.5 25.6013 0.5 25.4632V0.246094Z" fill="white" style="fill:var(${f$1})"/><rect x="25.9688" y="-0.00390625" width="3.05794" height="25.7171" rx="0.5" fill="white" style="fill:var(${f$1})"/></svg></div><style>${f}{position:absolute;top:0;left:0;width:90px;height:90px;display:none;background:rgba(0,0,0,0);border-radius:50%;z-index:10}${f}[expanded]{width:220px;height:220px;margin-top:-65px;margin-left:-65px}${f}[visible]{display:flex;justify-content:center;align-items:center}${f} div{position:relative;width:90px;height:90px;background:var(${a});border-radius:50%;filter:drop-shadow(0px 2px 6px #${a$1.toJSON()}) drop-shadow(0px 1px 2px #${b$2.toJSON()});transition:filter .3s ease}${f} div .pulse{position:absolute;top:50%;left:50%;width:100%;height:100%;background:0 0;opacity:.3;pointer-events:none;transform:translate(-50%,-50%);z-index:-1}${f}[pressed] div{background:var(${b$3});filter:drop-shadow(0px 4px 4px #${a$1.toJSON()}) drop-shadow(0px 8px 12px #${b$2.toJSON()})}${f}[pressed][expanded] div{background:var(${d})}${f}[expanded] div{width:200px;height:200px;background:var(${c$1})}${f} div img,${f} div svg{position:absolute;top:50%;left:50%;width:100%;height:auto;max-width:48px;max-height:48px;transform:translate(-50%,-50%)}${f}[expanded] div img,${f}[expanded] div svg{max-width:64px;max-height:64px}</style>`;}onPointerDown(t){t instanceof PointerEvent&&(this._dragController&&(this._dragController.draggable=this.minimized),this._holdStart=Date.now(),this.setPointerCapture(t.pointerId));}onPointerUp(t){var i;if(t instanceof PointerEvent){let n=this._holdStart!=null&&Date.now()-this._holdStart<400,f=!((i=this._dragController)!=null&&i.pointerDownEvent)||!a$2(this._dragController.pointerDownEvent,t);n&&f&&this.dispatchEvent(new CustomEvent("tap")),this.pressed=false,this._holdStart=void 0,this.releasePointerCapture(t.pointerId);}}onLongPressStart(){this._dragController&&(this._dragController.draggable=true),this.pressed=true,this._holdStart=void 0;}};
2
+ export{c as a};
@@ -1 +1 @@
1
- import {a}from'./chunk-MUX2WWWH.js';import {e}from'./chunk-R3B72E4T.js';var i=class n{get newlyRecognizedBarcode(){return this._newlyRecognizedBarcode}get newlyLocalizedBarcodes(){return this._newlyLocalizedBarcodes}get frameSequenceID(){return this._frameSequenceID}static fromJSON(e$1){let r=new n;return e$1.newlyRecognizedBarcode&&(r._newlyRecognizedBarcode=e.fromJSON(e$1.newlyRecognizedBarcode)),r._newlyLocalizedBarcodes=e$1.newlyLocalizedBarcodes.map(a$1=>a.fromJSON(a$1)),r._frameSequenceID=e$1.frameSequenceId,r}toJSON(){var e,r;return JSON.stringify({newlyLocalizedBarcodes:this.newlyLocalizedBarcodes.map(a=>a.toJSONObject()),newlyRecognizedBarcode:(r=(e=this.newlyRecognizedBarcode)==null?void 0:e.toJSONObject())!=null?r:null,frameSequenceId:this.frameSequenceID})}};export{i as a};
1
+ import {a}from'./chunk-MUX2WWWH.js';import {e}from'./chunk-2BGFR4WR.js';var i=class n{get newlyRecognizedBarcode(){return this._newlyRecognizedBarcode}get newlyLocalizedBarcodes(){return this._newlyLocalizedBarcodes}get frameSequenceID(){return this._frameSequenceID}static fromJSON(e$1){let r=new n;return e$1.newlyRecognizedBarcode&&(r._newlyRecognizedBarcode=e.fromJSON(e$1.newlyRecognizedBarcode)),r._newlyLocalizedBarcodes=e$1.newlyLocalizedBarcodes.map(a$1=>a.fromJSON(a$1)),r._frameSequenceID=e$1.frameSequenceId,r}toJSON(){var e,r;return JSON.stringify({newlyLocalizedBarcodes:this.newlyLocalizedBarcodes.map(a=>a.toJSONObject()),newlyRecognizedBarcode:(r=(e=this.newlyRecognizedBarcode)==null?void 0:e.toJSONObject())!=null?r:null,frameSequenceId:this.frameSequenceID})}};export{i as a};
@@ -0,0 +1 @@
1
+ var b=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var p=(r,d,t,s)=>{for(var a=s>1?void 0:s?i(d,t):d,e=r.length-1,c;e>=0;e--)(c=r[e])&&(a=(s?c(d,t,a):c(a))||a);return s&&a&&b(d,t,a),a};var o={"scandit-datacapture-sdk-barcode-pthreads.wasm":{bytes:7550478},"scandit-datacapture-sdk-barcode-simd-pthreads.wasm":{bytes:7485320},"scandit-datacapture-sdk-barcode-simd.wasm":{bytes:7363746},"scandit-datacapture-sdk-barcode.wasm":{bytes:7429306}};export{p as a,o as b};
@@ -0,0 +1 @@
1
+ import {a}from'./chunk-VFPCZE2A.js';import {TorchState,isCameraFrameSource,Camera,CameraPosition,FrameSourceState}from'@scandit/web-datacapture-core';var d=class{constructor(e,t,r,i,a){this.torchState=TorchState.Off;this.cameraSupportMap=new Map;this.zoomFactor=1;this.cameras=[];this.view=e,this.context=t,this.barcodeAr=r,this.viewSettings=i,this.cameraSettings=a;}get currentCamera(){if(isCameraFrameSource(this.context.frameSource))return this.context.frameSource;throw new Error("The current frame source is not a Camera")}isCameraMirrored(){return this.currentCamera.getMirrorImageEnabled()}async prepare(){var t,r,i;await this.barcodeAr.setEnabled(false),this.barcodeAr.feedback=await a.createWithOptions(true,true),this.barcodeAr.addPrivateListener(this),this.cameras=await Camera.getAll(false,isCameraFrameSource(this.context.frameSource));let e=isCameraFrameSource(this.context.frameSource)?this.context.frameSource:(i=(r=(t=this.cameras.find(a=>a.position===this.viewSettings.defaultCameraPosition))!=null?t:this.cameras.find(a=>a.position===(this.viewSettings.defaultCameraPosition===CameraPosition.WorldFacing?CameraPosition.UserFacing:CameraPosition.WorldFacing)))!=null?r:this.cameras[0])!=null?i:Camera.pickBestGuess();await this.context.setFrameSource(e),await this.currentCamera.applySettings(this.cameraSettings),await this.currentCamera.switchToDesiredState(FrameSourceState.Standby),this.zoomFactor=this.currentCamera.settings.zoomFactor,this.view.changeZoomButtonIcon(this.zoomFactor);}async dispose(){var e;this.view.deleteAllViews(),await this.context.removeMode(this.barcodeAr),this.barcodeAr.removePrivateListener(this),await((e=this.context.frameSource)==null?void 0:e.switchToDesiredState(FrameSourceState.Off));}async startSearching(){var e;this.view.deleteAllViews(),await((e=this.context.frameSource)==null?void 0:e.switchToDesiredState(FrameSourceState.On)),await this.barcodeAr.setEnabled(true),await this.barcodeAr.start();}async stopSearching(){var e;this.view.deleteAllViews(),await((e=this.context.frameSource)==null?void 0:e.switchToDesiredState(FrameSourceState.Off)),await this.barcodeAr.setEnabled(false),await this.barcodeAr.stop();}async pauseSearching(){var e;this.view.deletePendingViews(),await((e=this.context.frameSource)==null?void 0:e.switchToDesiredState(FrameSourceState.Standby)),await this.barcodeAr.setEnabled(false),await this.barcodeAr.pause();}emitTappedFeedback(){this.barcodeAr.feedback.tapped.emit();}didUpdateSession(e,t){Object.keys(t.addedTrackedBarcodes).length>0&&this.barcodeAr.feedback.scanned.emit(),this.view.render(t);}async onTorchButtonClicked(){var e,t;this.cameraSupportMap.get(this.currentCamera.label)||this.cameraSupportMap.set(this.currentCamera.label,{torch:await this.currentCamera.isTorchAvailable()}),(t=(e=this.cameraSupportMap.get(this.currentCamera.label))==null?void 0:e.torch)!=null&&t&&(await this.currentCamera.setDesiredTorchState(this.torchState===TorchState.Off?TorchState.On:TorchState.Off),this.torchState=this.torchState===TorchState.Off?TorchState.On:TorchState.Off,this.view.toggleTorchIcon(this.torchState));}async onZoomButtonClicked(){var t;if(!this.currentCamera.isZoomAvailable())return;let e=(t={1:2,2:1}[this.zoomFactor])!=null?t:1;this.currentCamera.settings.zoomFactor=e,await this.currentCamera.applySettings(this.currentCamera.settings),this.zoomFactor=e,this.view.changeZoomButtonIcon(e);}async onCameraSwitchButtonClicked(){var i,a;let e=this.currentCamera.getCurrentState(),t=this.currentCamera.position===CameraPosition.UserFacing?CameraPosition.WorldFacing:CameraPosition.UserFacing,r=(a=(i=this.cameras.find(p=>p.position===t))!=null?i:this.cameras[0])!=null?a:Camera.pickBestGuessForPosition(t);await this.context.setFrameSource(r),await this.currentCamera.switchToDesiredState(e);}};export{d as a};
@@ -0,0 +1 @@
1
+ import {a as a$3}from'./chunk-JIUTBKIH.js';import {a as a$4}from'./chunk-NMXU6D43.js';import {a as a$1}from'./chunk-QCD3RIT4.js';import {c as c$1,b as b$3}from'./chunk-SZUPDKV5.js';import {a as a$5}from'./chunk-TC4DIIXB.js';import {b}from'./chunk-RU7XJPB3.js';import {a as a$2,c,b as b$1}from'./chunk-RUZMLCEP.js';import {a as a$6}from'./chunk-BVROH6QT.js';import {b as b$2}from'./chunk-6GGHOIBF.js';import {a}from'./chunk-CZQR5WQJ.js';import {Logger,DataCaptureView,Anchor,LogoStyle,Camera,isCameraFrameSource,FrameSourceState,Color,CameraPosition,TorchState,NumberWithUnit,RadiusLocationSelection}from'@scandit/web-datacapture-core';import {localStorage}from'@scandit/web-datacapture-core/build/js/private/utils/safeStorage.js';import {Timeout}from'@scandit/web-datacapture-core/build/js/private/utils/timeout.js';function v(U,e,a){let t=a.value;return typeof t!="function"?(Logger.warn(`@afterPrepareScanning applied to non-function: ${e}`),a):t.constructor.name==="AsyncFunction"||t.constructor===(async()=>{}).constructor?(a.value=function(...r){return this._preparationPromise?this._preparationPromise.then(()=>t.apply(this,r)):Promise.reject(new Error(`prepare should be called before calling ${e} method`))},a):(Logger.warn(`@afterPrepareScanning applied to non-async method: ${e}`),a)}var u=class u{constructor(e,a){this._context=null;this._sparkScan=null;this._preparationPromise=null;this._stopScanningPromise=null;this._dataCaptureView=null;this.cameras=[];this.preferenceManager=new a$1(localStorage);this.defaultSuccessBrush=a$2.defaultSuccessBrush();this.defaultErrorBrush=a$2.defaultErrorBrush();this.sparkScanView=e,this.setSparkScanViewSettings(a);}get camera(){var e;return (e=this.context)==null?void 0:e.frameSource}set context(e){this._context!==e&&(this._preparationPromise=null,this._context=e,e&&(this.analyticsManager=b.forContext(e)));}get context(){return this._context}set sparkScan(e){this._sparkScan!==e&&(this._preparationPromise=null,this._sparkScan=e);}get sparkScan(){return this._sparkScan}get sparkScan$(){if(!this._sparkScan)throw new Error("SparkScan mode is required to be set before calling this method");return this._sparkScan}get context$(){if(!this._context)throw new Error("Context is required to be set before calling this method");return this._context}setSparkScanViewSettings(e){this.sparkScanViewSettings=e,this.stateManager=new a$3(this.sparkScanViewSettings,this.preferenceManager),this.feedbackManager=a$4.withDefaults(this.sparkScanViewSettings.soundEnabled,this.sparkScanViewSettings.hapticEnabled),this.triggerButtonCollapseTimeout=new Timeout(this.sparkScanViewSettings.triggerButtonCollapseTimeout,async()=>{this.stateManager.state!=="idle"&&this._preparationPromise&&await this.switchToIdleState({sessionStopReason:"timeout"});}),this.inactiveStateTimeout=new Timeout(this.sparkScanViewSettings.inactiveStateTimeout,async()=>{this.stateManager.state!=="inactive"&&!this.stateManager.holdingToScan&&this._preparationPromise&&await this.switchToInactiveState({sessionStopReason:"timeout"});}),this.stateTimeouts={active:this.inactiveStateTimeout,inactive:this.triggerButtonCollapseTimeout};}get portraitOrientationTriggerButtonTranslateX(){var e;return (e=this.stateManager.portraitOrientationTriggerButtonTranslateX)!=null?e:this.defaultTriggerButtonTranslateX}get portraitOrientationTriggerButtonTranslateY(){var e;return (e=this.stateManager.portraitOrientationTriggerButtonTranslateY)!=null?e:this.defaultTriggerButtonTranslateY}get landscapeOrientationTriggerButtonTranslateX(){var e;return (e=this.stateManager.landscapeOrientationTriggerButtonTranslateX)!=null?e:this.defaultTriggerButtonTranslateX}get landscapeOrientationTriggerButtonTranslateY(){var e;return (e=this.stateManager.landscapeOrientationTriggerButtonTranslateY)!=null?e:this.defaultTriggerButtonTranslateY}get portraitOrientationMiniPreviewTranslateX(){var e;return (e=this.stateManager.portraitOrientationMiniPreviewTranslateX)!=null?e:this.defaultMiniPreviewTranslateX}get portraitOrientationMiniPreviewTranslateY(){var e;return (e=this.stateManager.portraitOrientationMiniPreviewTranslateY)!=null?e:this.defaultMiniPreviewTranslateY}get landscapeOrientationMiniPreviewTranslateX(){var e;return (e=this.stateManager.landscapeOrientationMiniPreviewTranslateX)!=null?e:this.defaultMiniPreviewTranslateX}get landscapeOrientationMiniPreviewTranslateY(){var e;return (e=this.stateManager.landscapeOrientationMiniPreviewTranslateY)!=null?e:this.defaultMiniPreviewTranslateY}get defaultTriggerButtonTranslateX(){return this.parentViewSizes.width-Math.min(this.parentViewSizes.width/3,110)-90/2}get defaultTriggerButtonTranslateY(){return this.parentViewSizes.height-Math.min(this.parentViewSizes.height/3,250)-90/2}get defaultMiniPreviewTranslateX(){return this.parentViewSizes.width-225-16}get parentViewSizes(){var e,a;return {width:(e=this.sparkScanView.parentElement.clientWidth)!=null?e:window.innerWidth,height:(a=this.sparkScanView.parentElement.clientHeight)!=null?a:window.innerHeight}}get defaultMiniPreviewTranslateY(){return 16}static forView(e,a){return new u(e,a)}async prepareScanning(e){if(this._preparationPromise)return this._preparationPromise;this._stopScanningPromise&&await this._stopScanningPromise,this._preparationPromise=this._internalPrepareScanning(e);try{await this._preparationPromise;}catch(a){throw this._preparationPromise=null,a}return this._preparationPromise}async _internalPrepareScanning(e){var s,o;let a=this.context$,t=this.sparkScan$;this._dataCaptureView=await DataCaptureView.forContext(a),this._dataCaptureView.logoAnchor=Anchor.BottomCenter,this._dataCaptureView.logoStyle=LogoStyle.Minimal,this._dataCaptureView.setHiddenProperty("stopVideoTracksOnVisibilityChange",false),this._dataCaptureView.setHiddenProperty("freezeFrameWhenStoppingFrameSource",false),this._dataCaptureView.connectToElement(e),this.cameras=await Camera.getAll(false,isCameraFrameSource(a.frameSource));let i=isCameraFrameSource(a.frameSource)?a.frameSource:(o=(s=this.cameras.find(n=>n.position===this.sparkScanViewSettings.defaultCameraPosition))!=null?s:this.cameras[0])!=null?o:Camera.pickBestGuess();await a.setFrameSource(i),await i.applySettings(a$5.recommendedCameraSettings),await i.switchToDesiredState(FrameSourceState.Standby);let r=await i.isTorchAvailable();this.sparkScanView.setTorchAvailable(r),this.sparkScanView.setZoomAvailable(i.isZoomAvailable()),this.sparkScanView.cameraSwitchButtonTapped(r,i.position),await a.setMode(t),t.addListener(this),this.sparkScanOverlay=await a$6.withSparkScanForView(t,this._dataCaptureView),await this.sparkScanOverlay.setShouldRemoveLocationsAfterScan(this.stateManager.scanningBehavior==="continuous"),this.analyticsManager.startSession({cameraPosition:this.camera.position,hapticEnabled:this.sparkScanViewSettings.hapticEnabled,scanningMode:this.stateManager.scanningMode,soundEnabled:this.sparkScanViewSettings.soundEnabled,torchState:this.camera.getDesiredTorchState()}),await this.applyPreferences(),await this.switchToIdleState();}async stopScanning(e){if(this._stopScanningPromise)return this._stopScanningPromise;this._preparationPromise=null,this._stopScanningPromise=this._internalStopScanning(e);try{await this._stopScanningPromise;}finally{this._stopScanningPromise=null;}}async _internalStopScanning(e){var a,t,i,r;await((a=this.sparkScan)==null?void 0:a.setEnabled(false)),(t=this.sparkScan)==null||t.removeListener(this),await((i=this.camera)==null?void 0:i.switchToDesiredState(FrameSourceState.Off)),(r=this._dataCaptureView)==null||r.detachFromElement(),this.analyticsManager.setSessionStopReason(e.sessionStopReason),this.setState("Initial");}async startScanning(){await this.switchToActiveState();}async pauseScanning(){await this.switchToInactiveState({sessionStopReason:"user"});}async onTriggerButtonPointerDown(){this.stateManager.triggerButtonPressed=true;}async onTriggerButtonTap(){switch(this.stateManager.state){case "Initial":{this.stateManager.triggerButtonPressed=false;return}case "idle":case "inactive":{await this.switchToActiveState({barcodeFeedback:new c(Color.fromRGBA(0,0,0,0),this.defaultSuccessBrush,this.feedbackManager.tapFeedback)});return}case "error":{await this.switchToActiveState({barcodeFeedback:new c(Color.fromRGBA(0,0,0,0),this.defaultSuccessBrush,this.feedbackManager.tapFeedback)});return}case "active":await(this.stateManager.continuousModeEnabled?this.switchToInactiveState({sessionStopReason:"user",barcodeFeedback:new c(Color.fromRGBA(0,0,0,0),this.defaultSuccessBrush,this.feedbackManager.tapFeedback)}):this.switchToActiveState({barcodeFeedback:new c(Color.fromRGBA(0,0,0,0),this.defaultSuccessBrush,this.feedbackManager.tapFeedback)}));}}async onTriggerButtonLongPressStart(){var e;this.stateManager.triggerButtonPressed=true,this.sparkScanViewSettings.holdToScanEnabled&&(this.scanningBehaviorCache=this.stateManager.scanningBehavior,this.stateManager.scanningBehavior="continuous",this.stateManager.holdingToScan=true,await((e=this.sparkScanOverlay)==null?void 0:e.setShouldRemoveLocationsAfterScan(true)),await this.switchToActiveState({barcodeFeedback:new c(Color.fromRGBA(0,0,0,0),this.defaultSuccessBrush,this.feedbackManager.tapFeedback)}));}async onTriggerButtonLongPressEnd(){var e,a;this.sparkScanViewSettings.holdToScanEnabled&&this.stateManager.state!=="error"?(this.stateManager.scanningBehavior=(e=this.scanningBehaviorCache)!=null?e:"single",this.stateManager.holdingToScan=false,await((a=this.sparkScanOverlay)==null?void 0:a.setShouldRemoveLocationsAfterScan(this.stateManager.continuousModeEnabled)),await this.switchToInactiveState({sessionStopReason:"user",barcodeFeedback:new b$1("",0,Color.fromRGBA(0,0,0,0),this.defaultErrorBrush,this.feedbackManager.noFeedback)})):this.stateManager.triggerButtonPressed=false;}async onClickOutside(){this.stateManager.idleState||await this.switchToIdleState();}async onVisibilityChange(){await this.switchToIdleState();}async onTargetModeButtonTap(e,a=this.feedbackManager.tapFeedback,t=true){var o,n,p;a.emit();let i=String(e),r={true:e&&this.stateManager.scanningMode instanceof b$3,false:!e&&this.stateManager.scanningMode instanceof c$1}[i];r&&(this.stateManager.scanningMode=this.stateManager.scanningMode.changeMode()),this.enableTargetMode(e),await((o=this.sparkScanOverlay)==null?void 0:o.setShouldDrawViewfinder(e)),this.startTimeoutForCurrentState(),this.sparkScanView.targetModeButtonTapped(e,t),r&&((p=(n=this.listener)==null?void 0:n.didChangeScanningMode)==null||p.call(n,this.stateManager.scanningMode),this.analyticsManager.setScanningMode(this.stateManager.scanningMode));}async onScanningBehaviorButtonTap(e,a=this.feedbackManager.tapFeedback,t=true){var i;a.emit(),this.stateManager.scanningMode=this.stateManager.scanningMode.copyWith(e?"continuous":"single"),await((i=this.sparkScanOverlay)==null?void 0:i.setShouldRemoveLocationsAfterScan(e)),this.startTimeoutForCurrentState(),this.sparkScanView.scanningBehaviorButtonTapped(e,t),this.analyticsManager.setScanningMode(this.stateManager.scanningMode);}async onBarcodeFindButtonTap(){var e,a;await this.switchToIdleState({sessionStopReason:"user"}),(a=(e=this.listener)==null?void 0:e.didTapBarcodeFindButton)==null||a.call(e,this.sparkScanView),this.restartTimeouts();}async onLabelCaptureButtonTap(){var e,a;await this.switchToIdleState({sessionStopReason:"user"}),(a=(e=this.listener)==null?void 0:e.didTapLabelCaptureButton)==null||a.call(e,this.sparkScanView),this.restartTimeouts();}async onCameraSwitchButtonTap(){var t,i;if(this.feedbackManager.emitTapFeedback(),this.restartTimeouts(),!this.camera||this.stateManager.state==="error")return;let e={[CameraPosition.WorldFacing]:CameraPosition.UserFacing,[CameraPosition.UserFacing]:CameraPosition.WorldFacing}[(t=this.camera)==null?void 0:t.position],a=this.cameras.find(r=>r.position===e);a&&(await((i=this.camera)==null?void 0:i.switchToDesiredState(FrameSourceState.Off)),await this.context$.setFrameSource(a),await a.applySettings(this.camera.settings),await a.switchToDesiredState(FrameSourceState.On),this.sparkScanView.cameraSwitchButtonTapped(await a.isTorchAvailable(),e),this.analyticsManager.setCameraPosition(e));}async onTorchButtonTap(e,a=this.feedbackManager.tapFeedback,t=true){var i,r;a.emit(),this.stateManager.torchState=e?TorchState.On:TorchState.Off,((i=this.camera)==null?void 0:i.getCurrentState())===FrameSourceState.On&&await((r=this.camera)==null?void 0:r.setDesiredTorchState(this.stateManager.torchState)),this.startTimeoutForCurrentState(),this.sparkScanView.torchButtonTapped(e,t),this.analyticsManager.setTorchState(this.stateManager.torchState);}restartTimeouts(){for(let e of [this.triggerButtonCollapseTimeout,this.inactiveStateTimeout,this.resumeCapturingTimeout])(e==null?void 0:e.running)===true&&e.start();}stopTimeouts(){for(let e of [this.triggerButtonCollapseTimeout,this.inactiveStateTimeout,this.resumeCapturingTimeout])e==null||e.stop();}async onMiniPreviewCloseButtonTap(){await this.switchToIdleState({sessionStopReason:"user"});}onMiniPreviewResizeButtonTap(){(this.stateManager.state==="active"||this.stateManager.state==="inactive")&&(this.feedbackManager.emitTapFeedback(),this.startTimeoutForCurrentState());}async onMiniPreviewZoomButtonTap(e){this.feedbackManager.emitTapFeedback(),this.stateManager.zoomFactor=e,this.camera&&(this.camera.settings.zoomFactor=e,await this.camera.applySettings(this.camera.settings)),this.startTimeoutForCurrentState();}async onMiniPreviewDrag(e,a){switch(this.stateManager.state==="active"&&await this.sparkScan$.setEnabled(false),a){case "landscape-primary":case "landscape-secondary":{this.stateManager.landscapeOrientationMiniPreviewTranslateX=e.x,this.stateManager.landscapeOrientationMiniPreviewTranslateY=e.y;break}case "portrait-primary":case "portrait-secondary":{this.stateManager.portraitOrientationMiniPreviewTranslateX=e.x,this.stateManager.portraitOrientationMiniPreviewTranslateY=e.y;break}}this.restartTimeouts();}onMiniPreviewPointerMove(){this.restartTimeouts();}async onMiniPreviewPointerUp(){await this.switchToActiveState();}async onMiniPreviewDragEnd(){this.stateManager.state==="active"&&await this.sparkScan$.setEnabled(true);}onTriggerButtonDrag(e,a){switch(a){case "landscape-primary":case "landscape-secondary":{this.stateManager.landscapeOrientationTriggerButtonTranslateX=e.x,this.stateManager.landscapeOrientationTriggerButtonTranslateY=e.y;break}case "portrait-primary":case "portrait-secondary":{this.stateManager.portraitOrientationTriggerButtonTranslateX=e.x,this.stateManager.portraitOrientationTriggerButtonTranslateY=e.y;break}}}async onOrientationChange(){if(this.stateManager.state==="active"&&this.stateManager.holdingToScan){this.restartTimeouts();return}this.stateManager.state==="error"&&await this.switchToInactiveState({sessionStopReason:"user"});}async didScan(e,a){if(!a.newlyRecognizedBarcode)return;let t=this.sparkScanView.feedbackDelegate.getFeedbackForBarcode(a.newlyRecognizedBarcode);t&&(t instanceof b$1?await this.switchToErrorState({barcodeFeedback:t}):t instanceof c&&await(this.stateManager.continuousModeEnabled?this.switchToActiveState({barcodeFeedback:t}):this.switchToInactiveState({sessionStopReason:"user",barcodeFeedback:t,emitSuccessFeedback:true})),this.restartTimeouts());}setListener(e){this.listener=e;}brushForFeedback(e){return e.brush}async switchToIdleState(e={}){var a,t,i,r,s;this.feedbackManager.emitTapFeedback(),await((a=this.sparkScanOverlay)==null?void 0:a.overlayReadyForDraw()),this.setState("idle"),await this.sparkScan$.setEnabled(false),await((t=this.camera)==null?void 0:t.switchToDesiredState(FrameSourceState.Standby)),(i=this.triggerButtonCollapseTimeout)==null||i.stop(),(r=this.inactiveStateTimeout)==null||r.stop(),(s=this.resumeCapturingTimeout)==null||s.stop(),this.stateManager.triggerButtonPressed=false,this.sparkScanView.switchToIdleState(),e.sessionStopReason!=null&&this.analyticsManager.setSessionStopReason(e.sessionStopReason);}async switchToActiveState(e={}){var t,i,r,s,o,n,p,d,T;let a=this.stateManager.state;await((t=this.camera)==null?void 0:t.switchToDesiredState(FrameSourceState.On)),await((i=this.camera)==null?void 0:i.setDesiredTorchState(this.stateManager.torchState)),e.barcodeFeedback&&await((r=this.sparkScanOverlay)==null?void 0:r.setBrush(this.brushForFeedback(e.barcodeFeedback))),await((s=this.sparkScanOverlay)==null?void 0:s.setShouldRemoveLocationsAfterScan(this.stateManager.continuousModeEnabled)),await((o=this.sparkScanOverlay)==null?void 0:o.overlayReadyForDraw()),this.feedbackManager.emitBarcodeFeedback(e.barcodeFeedback),this.stateManager.holdingToScan||(n=this.inactiveStateTimeout)==null||n.start(),(p=this.triggerButtonCollapseTimeout)==null||p.stop(),(d=this.resumeCapturingTimeout)==null||d.stop(),await this.sparkScanView.switchToActiveState(this.sparkScanViewSettings.visualFeedbackEnabled&&e.barcodeFeedback instanceof c,this.stateManager.scanningBehavior,(T=e.barcodeFeedback)==null?void 0:T.visualFeedbackColor,this.stateManager.zoomedIn&&a!=="active"),await this.sparkScan$.setEnabled(true),this.setState("active");}async switchToInactiveState(e){var t,i,r,s,o,n,p,d;(e.emitSuccessFeedback)!=null||(e.emitSuccessFeedback=true),this.setState("inactive"),e.barcodeFeedback&&await((t=this.sparkScanOverlay)==null?void 0:t.setBrush(this.brushForFeedback(e.barcodeFeedback))),this.stateManager.shouldEnableSuppression?await this.sparkScan$.setResultSuppressionEnabled(true):await this.sparkScan$.setEnabled(false),this.stateManager.triggerButtonPressed=false,this.stateManager.scanningMode.previewBehavior==="persistent"?e.barcodeFeedback instanceof c&&await((i=this.sparkScanOverlay)==null?void 0:i.setShouldRemoveLocationsAfterScan(true)):await((r=this.camera)==null?void 0:r.switchToDesiredState(FrameSourceState.Standby)),this.feedbackManager.emitBarcodeFeedback(e.barcodeFeedback),await((s=this.sparkScanOverlay)==null?void 0:s.overlayReadyForDraw()),(o=this.triggerButtonCollapseTimeout)==null||o.start(),(n=this.inactiveStateTimeout)==null||n.stop(),(p=this.resumeCapturingTimeout)==null||p.stop(),await this.sparkScanView.switchToInactiveState(this.sparkScanViewSettings.visualFeedbackEnabled&&e.barcodeFeedback instanceof c&&e.emitSuccessFeedback,this.stateManager.scanningBehavior,this.stateManager.previewBehavior,(d=e.barcodeFeedback)==null?void 0:d.visualFeedbackColor),this.analyticsManager.setSessionStopReason(e.sessionStopReason);}async switchToErrorState(e){var t,i,r,s,o,n;let a=e.barcodeFeedback.resumeCapturingDelay>0;a&&(this.setState("error"),this.stateManager.scanningBehavior="single",await this.sparkScan$.setEnabled(false),await((t=this.camera)==null?void 0:t.switchToDesiredState(FrameSourceState.Standby)),this.resumeCapturingTimeout=new Timeout(e.barcodeFeedback.resumeCapturingDelay,async()=>{this.stateManager.state!=="active"&&this._preparationPromise&&await this.switchToActiveState();}),this.resumeCapturingTimeout.start()),await((i=this.sparkScanOverlay)==null?void 0:i.setErrorBrush(e.barcodeFeedback.brush)),await((r=this.sparkScanOverlay)==null?void 0:r.overlayReadyForDraw()),await((s=this.sparkScanOverlay)==null?void 0:s.setShouldRemoveLocationsAfterScan(e.barcodeFeedback.resumeCapturingDelay===0)),await this.sparkScan$.workerCommand("sparkScanEmitErrorFeedback",{shouldRemoveBrush:!a}),this.feedbackManager.emitBarcodeFeedback(e.barcodeFeedback),(o=this.triggerButtonCollapseTimeout)==null||o.stop(),(n=this.inactiveStateTimeout)==null||n.stop(),await this.sparkScanView.switchToErrorState(e.barcodeFeedback,this.sparkScanViewSettings.visualFeedbackEnabled);}enableTargetModeLocationSelection(e){var r;let a=e?b$2.SparkScan.SparkScanSettings.targetModeLocationSelection.radius:b$2.SparkScan.SparkScanSettings.locationSelection.radius,t=e?b$2.SparkScan.SparkScanSettings.targetModeLocationSelection.unit:b$2.SparkScan.SparkScanSettings.locationSelection.unit,i=new NumberWithUnit(a,t);this.sparkScan$.settings.locationSelection=new RadiusLocationSelection(i),(r=this.sparkScanOverlay)==null||r.setRadius(i);}enableTargetMode(e){this.enableTargetModeLocationSelection(e);}async applyPreferences(){await this.onTargetModeButtonTap(this.stateManager.targetModeEnabled,this.feedbackManager.noFeedback,false),await this.onScanningBehaviorButtonTap(this.stateManager.continuousModeEnabled,this.feedbackManager.noFeedback,false),await this.onTorchButtonTap(this.stateManager.torchEnabled,this.feedbackManager.noFeedback,false);}setState(e){var a,t;e!==this.stateManager.state&&(this.stateManager.state=e,(t=(a=this.listener)==null?void 0:a.didChangeViewState)==null||t.call(a,e));}startTimeoutForCurrentState(){let e=this.stateTimeouts[this.stateManager.state];e==null||e.start();}};a([v],u.prototype,"switchToActiveState",1),a([v],u.prototype,"switchToInactiveState",1),a([v],u.prototype,"switchToErrorState",1);var D=u;export{D as a};
@@ -0,0 +1 @@
1
+ import {a}from'./chunk-H7ATXKDX.js';import {ScanditHTMLElement,html,defineCustomElements,css}from'@scandit/web-datacapture-core/build/js/private/utils/index.js';import {Card}from'@scandit/web-datacapture-core/build/js/private/ui/atoms/Card.js';import {CardList,CardListEvents}from'@scandit/web-datacapture-core/build/js/private/ui/atoms/CardList.js';var l="cubic-bezier(0.4, 0, 0.2, 1)",L=(n=>(n.TextForCollapseCardsButton="text-for-collapse-cards-button",n))(L||{}),i=class i extends ScanditHTMLElement{constructor(){super();this.onCarListTapHandler=this.onCarListTap.bind(this);this.onCardListWillExpandHandler=this.onCardListWillExpand.bind(this);this.onCarouselButtonClickHandler=this.onCarouselButtonClick.bind(this);this.textNode=document.createTextNode("");let t=this.attachShadow({mode:"open"});t.append(i.createStyleElement().cloneNode(true));let s=document.createElement("div");s.id="root",s.innerHTML=html`<${a.tag} class="hide"></${a.tag}><${CardList.tag} collapsed></${CardList.tag}>`,t.append(s),this.carouselButton.append(this.textNode);}set"text-for-collapse-cards-button"(t){this.textNode.textContent=t;}get"text-for-collapse-cards-button"(){return this.textNode.textContent}get cardsList(){return this.shadowRoot.querySelector(CardList.tag)}get carouselButton(){return this.shadowRoot.querySelector(a.tag)}static create(){return document.createElement(i.tag)}static register(){defineCustomElements({[i.tag]:i,[a.tag]:a,[CardList.tag]:CardList,[Card.tag]:Card});}static createStyleElement(){return css`:host #root{align-items:center;display:flex;flex-direction:column;gap:.5rem;height:100%}:host #root ${a.tag}{opacity:1;transform:translateY(0);transition:opacity ${l} .5s,transform ${l} .5s}:host #root ${a.tag}.hide{opacity:0;transform:translateY(100%)}`}attributeChangeCallback(t,s,c){t==="text-for-collapse-cards-button"&&(this["text-for-collapse-cards-button"]=c);}connectedCallback(){this.textNode.textContent=this.getAttribute("text-for-collapse-cards-button"),this.carouselButton.addEventListener("click",this.onCarouselButtonClickHandler),this.cardsList.addEventListener(CardListEvents.Tap,this.onCarListTapHandler),this.cardsList.addEventListener(CardListEvents.WillExpand,this.onCardListWillExpandHandler);}disconnectedCallback(){this.carouselButton.removeEventListener("click",this.onCarouselButtonClickHandler),this.cardsList.removeEventListener(CardListEvents.Tap,this.onCarListTapHandler),this.cardsList.removeEventListener(CardListEvents.WillExpand,this.onCardListWillExpandHandler);}collapse(){this.carouselButton.classList.add("hide"),this.cardsList.collapsed=true;}expand(){this.carouselButton.classList.remove("hide"),this.cardsList.collapsed=false;}renderCards(t){this.cardsList.clearCards(),this.cardsList.renderCards(t);}async unshiftCard(t){return this.cardsList.unshift(t)}getCardBySelector(t){return this.cardsList.querySelector(t)}updateHeight(t){let s=this.carouselButton.clientHeight;this.cardsList.style.setProperty("--list-height",`${t}px`),this.cardsList.style.setProperty("--top-offset",`calc(${s===0?32:s}px + 5rem)`);}onCardListWillExpand(){this.carouselButton.classList.remove("hide");}onCarListTap(){this.cardsList.collapsed=false;}onCarouselButtonClick(){this.carouselButton.classList.add("hide"),this.cardsList.collapsed=true;}};i.tag="scandit-find-card-list-container",i.observedAttributes=["text-for-collapse-cards-button"];var o=i;o.register();export{L as a,o as b};
@@ -0,0 +1 @@
1
+ import {SvgIcon}from'@scandit/web-datacapture-core/build/js/private/ui/atoms/SvgIcon.js';import {defineCustomElements,html}from'@scandit/web-datacapture-core/build/js/private/utils/index.js';var t=class t extends SvgIcon{static create(){return document.createElement(t.tag)}static register(){defineCustomElements({[t.tag]:t});}render(){return html`<style>${t.tag}{display:flex}${t.tag}[shadow] svg{filter:drop-shadow(0px 1px 2px rgba(18, 22, 25, .3))}</style><svg width="${this.size}" height="${this.heightForViewbox(32,32)}" viewBox="0 0 32 32" fill="none"><path d="M23.0072 11.0026H18.3321L19.9687 5.27515C20.0113 5.12618 20.0187 4.96936 19.9903 4.81705C19.9619 4.66475 19.8985 4.52112 19.8051 4.39748C19.7118 4.27385 19.5909 4.17359 19.4522 4.10462C19.3135 4.03564 19.1606 3.99983 19.0057 4H12.0031C11.7834 3.9999 11.5699 4.07207 11.3954 4.20538C11.2209 4.33868 11.095 4.52571 11.0374 4.73761L8.03623 15.7378C7.99509 15.8864 7.98889 16.0426 8.01812 16.1941C8.04735 16.3456 8.11122 16.4882 8.20472 16.6109C8.29823 16.7336 8.41884 16.833 8.55714 16.9014C8.69543 16.9697 8.84766 17.0052 9.00192 17.0049H13.8037L12.0191 26.83C11.9767 27.0569 12.0142 27.2915 12.1251 27.494C12.236 27.6964 12.4135 27.8543 12.6276 27.9408C12.8416 28.0273 13.0789 28.0372 13.2994 27.9687C13.5198 27.9002 13.7098 27.7575 13.8371 27.5649L23.8409 12.5592C23.9417 12.4085 23.9997 12.2331 24.0085 12.052C24.0174 11.8708 23.9769 11.6906 23.8912 11.5307C23.8056 11.3708 23.6781 11.2372 23.5224 11.1442C23.3667 11.0512 23.1886 11.0023 23.0072 11.0026Z" fill="${this.fill}"/></svg>`}};t.tag="scandit-torch-on-icon";var e=t;e.register();export{e as a};
@@ -1 +1 @@
1
- import {a}from'./chunk-ZBWUSH2F.js';import {b}from'./chunk-OLJXVUYE.js';import {Brush}from'@scandit/web-datacapture-core';var h=(a=>(a.Frame="frame",a.Dot="dot",a))(h||{}),o=class c{constructor(){this.type="barcodeTrackingBasic";this._style=b.BarcodeBatch.BarcodeBatchBasicOverlay.defaultStyle;this._shouldShowScanAreaGuides=false;this._brushesForBarcodes=new Map;}get style(){return this._style}get listener(){return this._listener}set listener(e){this._listener=e;}get brush(){return this._brush}static async withBarcodeBatch(e){return c.withBarcodeBatchForView(e,null)}static async withBarcodeBatchForView(e,a){return c.withBarcodeBatchForViewWithStyle(e,a,b.BarcodeBatch.BarcodeBatchBasicOverlay.defaultStyle)}static async withBarcodeBatchForViewWithStyle(e,a$1,s){let r=new c;return r.barcodeBatch=e,r._style=s,r._brush=new Brush(b.BarcodeBatch.BarcodeBatchBasicOverlay.styles[r.style].DefaultBrush.fillColor,b.BarcodeBatch.BarcodeBatchBasicOverlay.styles[r.style].DefaultBrush.strokeColor,b.BarcodeBatch.BarcodeBatchBasicOverlay.styles[r.style].DefaultBrush.strokeWidth),a$1&&await a$1.addOverlay(r),r.privateListener=new a(r),e.addPrivateListener(r.privateListener),r}async setBrush(e){this._brush=e,await this.barcodeBatch.notifyContext();}shouldShowScanAreaGuides(){return this._shouldShowScanAreaGuides}async setShouldShowScanAreaGuides(e){this._shouldShowScanAreaGuides=e,await this.barcodeBatch.notifyContext();}async setBrushForTrackedBarcode(e,a){this._brushesForBarcodes.set(a.identifier,e),await this.barcodeBatch.notifyContext();}async clearTrackedBarcodeBrushes(){this._brushesForBarcodes.clear(),await this.barcodeBatch.notifyContext();}toJSONObject(){return {type:this.type,brush:this._brush.toJSONObject(),shouldShowScanAreaGuides:this._shouldShowScanAreaGuides,style:this._style,brushesForBarcodes:[...this._brushesForBarcodes.entries()].reduce((e,[a,s])=>(e[a]=s.toJSONObject(),e),{})}}};export{h as a,o as b};
1
+ import {a}from'./chunk-K37AJSFT.js';import {b}from'./chunk-6GGHOIBF.js';import {Brush}from'@scandit/web-datacapture-core';var h=(a=>(a.Frame="frame",a.Dot="dot",a))(h||{}),o=class c{constructor(){this.type="barcodeTrackingBasic";this._style=b.BarcodeBatch.BarcodeBatchBasicOverlay.defaultStyle;this._shouldShowScanAreaGuides=false;this._brushesForBarcodes=new Map;}get style(){return this._style}get listener(){return this._listener}set listener(e){this._listener=e;}get brush(){return this._brush}static async withBarcodeBatch(e){return c.withBarcodeBatchForView(e,null)}static async withBarcodeBatchForView(e,a){return c.withBarcodeBatchForViewWithStyle(e,a,b.BarcodeBatch.BarcodeBatchBasicOverlay.defaultStyle)}static async withBarcodeBatchForViewWithStyle(e,a$1,s){let r=new c;return r.barcodeBatch=e,r._style=s,r._brush=new Brush(b.BarcodeBatch.BarcodeBatchBasicOverlay.styles[r.style].DefaultBrush.fillColor,b.BarcodeBatch.BarcodeBatchBasicOverlay.styles[r.style].DefaultBrush.strokeColor,b.BarcodeBatch.BarcodeBatchBasicOverlay.styles[r.style].DefaultBrush.strokeWidth),a$1&&await a$1.addOverlay(r),r.privateListener=new a(r),e.addPrivateListener(r.privateListener),r}async setBrush(e){this._brush=e,await this.barcodeBatch.notifyContext();}shouldShowScanAreaGuides(){return this._shouldShowScanAreaGuides}async setShouldShowScanAreaGuides(e){this._shouldShowScanAreaGuides=e,await this.barcodeBatch.notifyContext();}async setBrushForTrackedBarcode(e,a){this._brushesForBarcodes.set(a.identifier,e),await this.barcodeBatch.notifyContext();}async clearTrackedBarcodeBrushes(){this._brushesForBarcodes.clear(),await this.barcodeBatch.notifyContext();}toJSONObject(){return {type:this.type,brush:this._brush.toJSONObject(),shouldShowScanAreaGuides:this._shouldShowScanAreaGuides,style:this._style,brushesForBarcodes:[...this._brushesForBarcodes.entries()].reduce((e,[a,s])=>(e[a]=s.toJSONObject(),e),{})}}};export{h as a,o as b};
@@ -1 +1 @@
1
- import {d,e as e$1,a,c,g,f,h,i,n,o,j,k,l,m}from'./chunk-HFXWQGKV.js';import {Color}from'@scandit/web-datacapture-core';import {defineCustomElements}from'@scandit/web-datacapture-core/build/js/private/utils/defineCustomElements.js';import {ScanditHTMLElement}from'@scandit/web-datacapture-core/build/js/private/utils/index.js';var e=class e extends ScanditHTMLElement{constructor(){super();this._defaultBackgroundColor=Color.fromHex("#000000");this._defaultTextColor=Color.fromHex("#FFFFFF");let t=this.attachShadow({mode:"open"});t.innerHTML=d(),t.append(e$1()),this.containerElement=t.querySelector(a),this.textElement=t.querySelector(c);}static create(){return e.register(),document.createElement(e.tag)}static register(){defineCustomElements({[e.tag]:e});}set icon(t){g(this,t);}get icon(){return f(this)}get backgroundColor(){return h(this,this._defaultBackgroundColor)}set backgroundColor(t){i(this,t);}get text(){return n(this.textElement)}set text(t){o(this.textElement,t);}get textColor(){return j(this,this._defaultTextColor)}set textColor(t){k(this,t);}get textSize(){return l(this)}set textSize(t){m(this,t);}connectedCallback(){this.backgroundColor=this.backgroundColor,this.textColor=this.textColor;}};e.tag="scandit-barcode-ar-info-annotation-footer";var x=e;export{x as a};
1
+ import {d,e as e$1,a,c,g,f,h,i,n,o,j,k,l,m}from'./chunk-FLBNQU3N.js';import {Color}from'@scandit/web-datacapture-core';import {defineCustomElements}from'@scandit/web-datacapture-core/build/js/private/utils/defineCustomElements.js';import {ScanditHTMLElement}from'@scandit/web-datacapture-core/build/js/private/utils/index.js';var e=class e extends ScanditHTMLElement{constructor(){super();this._defaultBackgroundColor=Color.fromHex("#000000");this._defaultTextColor=Color.fromHex("#FFFFFF");let t=this.attachShadow({mode:"open"});t.innerHTML=d(),t.append(e$1()),this.containerElement=t.querySelector(a),this.textElement=t.querySelector(c);}static create(){return e.register(),document.createElement(e.tag)}static register(){defineCustomElements({[e.tag]:e});}set icon(t){g(this,t);}get icon(){return f(this)}get backgroundColor(){return h(this,this._defaultBackgroundColor)}set backgroundColor(t){i(this,t);}get text(){return n(this.textElement)}set text(t){o(this.textElement,t);}get textColor(){return j(this,this._defaultTextColor)}set textColor(t){k(this,t);}get textSize(){return l(this)}set textSize(t){m(this,t);}connectedCallback(){this.backgroundColor=this.backgroundColor,this.textColor=this.textColor;}};e.tag="scandit-barcode-ar-info-annotation-footer";var x=e;export{x as a};
@@ -0,0 +1 @@
1
+ import {Color}from'@scandit/web-datacapture-core';import {html}from'@scandit/web-datacapture-core/build/js/private/utils/html.js';import {css}from'@scandit/web-datacapture-core/build/js/private/utils/index.js';var x=".container",u=".icon-text",m=".text";function f(){return html`<div class="container"><div class="icon-text"><slot name="barcode-icon"></slot><div class="text">Text</div></div></div>`}function g(){return css`:host{--background-color:#0000;--text-color:#000;--top-left-corner-radius:0px;--top-right-corner-radius:0px;--bottom-left-corner-radius:0px;--bottom-right-corner-radius:0px;--text-size:16px}.container{align-items:center;background-color:var(--background-color);border-radius:var(--top-left-corner-radius) var(--top-right-corner-radius) var(--bottom-right-corner-radius) var(--bottom-left-corner-radius);display:flex;flex-direction:row;justify-content:center;overflow:hidden;padding:.75rem;transition:.3s ease}.container.highlighted{opacity:.75}.icon-text{align-items:center;display:flex;gap:.5rem}.text{color:var(--text-color);font-size:var(--text-size);font-weight:600;width:100%}`}var c="[slot='barcode-icon']";function a(e){var t,o;return (o=(t=e.shadowRoot)==null?void 0:t.querySelector(c))==null?void 0:o.assignedElements()[0]}function T(e,t){let o=a(e);o!==t&&(o&&t==null&&o.remove(),t&&(t.slot="barcode-icon",e.append(t)));}function S(e,t){let o=e.style.getPropertyValue("--background-color");return o===""?t:Color.fromHex(o)}function E(e,t){e.style.setProperty("--background-color",`#${t.toJSON()}`);}function y(e,t){let o=e.style.getPropertyValue("--text-color");return o===""?t:Color.fromHex(o)}function C(e,t){e.style.setProperty("--text-color",`#${t.toJSON()}`);}function v(e){return Number.parseFloat(e.style.getPropertyValue("--text-size"))}function b(e,t){e.style.setProperty("--text-size",`${t}px`);}function L(e){var t;return (t=e.textContent)!=null?t:""}function H(e,t){e.textContent=t;}export{x as a,u as b,m as c,f as d,g as e,a as f,T as g,S as h,E as i,y as j,C as k,v as l,b as m,L as n,H as o};
@@ -1 +1 @@
1
- import {a as a$2}from'./chunk-7JPCVI74.js';import {a as a$1,b as b$1}from'./chunk-HTKUJZG2.js';import {a}from'./chunk-YWNGCXKZ.js';import {b}from'./chunk-OLJXVUYE.js';import {CameraSettings,convertToPublicFrameData}from'@scandit/web-datacapture-core';import {warnMultithreadingUnavailable}from'@scandit/web-datacapture-core/build/js/private/utils/warnMultithreadingUnavailable.js';var m=class u{constructor(){this.feedback=a.createDefaultFeedback();this.skipSerialization=true;this.type="barcodeFind";this._isEnabled=true;this._context=null;this.listeners=new Set;this.privateListeners=new Set;this.workerMessageListener=this.onWorkerMessage.bind(this);this._transformer=null;}static get recommendedCameraSettings(){let e=new CameraSettings(b.BarcodeFind.CameraSettings.settings);for(let[t,r]of Object.entries(b.BarcodeFind.CameraSettings.hiddenProperties))e.setProperty(t,r);return e}get context(){return this._context}get allListeners(){return [...this.privateListeners,...this.listeners]}static async forSettings(e){warnMultithreadingUnavailable();let t=new u;return t.settings=e,t}isEnabled(){return this._isEnabled}async setEnabled(e){var t;this._isEnabled=e,await this.workerCommand("barcodeFindSetEnabled",{enabled:e}),await((t=this.context)==null?void 0:t.update([{type:"modeEnabled",newValue:e}],{updateContext:false}));}async applySettings(e){this.settings=e,await this.workerCommand("barcodeFindApplySettings",{settings:e.toJSONObject()});}addListener(e){this.listeners.add(e);}removeListener(e){this.listeners.delete(e);}async setItemList(e){var t;for(let r of this.privateListeners)(t=r.onSetItemList)==null||t.call(r,e);return this.workerCommand("barcodeFindSetItemList",{itemList:e.map(r=>r.toJSONObject())})}async setBarcodeTransformer(e){var t;return this._transformer=e,this.workerCommand("barcodeFindSetTransformerFunction",{functionAsString:(t=this._transformer)==null?void 0:t.transformBarcodeData.toString()})}async start(){return this.workerCommand("barcodeFindSearchStart",{})}async stop(){return this.workerCommand("barcodeFindSearchStop",{})}async pause(){return this.workerCommand("barcodeFindSearchPause",{})}toJSONObject(){return {type:this.type,enabled:this.isEnabled(),settings:this.settings.toJSONObject()}}async workerCommand(e,t){this.context!=null&&await this.context.workerCommand(e,t);}async attachedToContext(e){this._context=e,this._context.subscribeToWorkerMessages(this.workerMessageListener),await this.workerCommand("barcodeFindForSettings",{settings:this.settings.toJSONObject()});}async detachedFromContext(){var e;await this.workerCommand("barcodeFindModeRemove",{}),(e=this._context)==null||e.unsubscribeToWorkerMessages(this.workerMessageListener),this._context=null;}async onWorkerMessage(e){var t,r,c;switch(e.type){case "barcodeFindDidUpdateSession":{if(this._context==null)return;for(let a of this.allListeners)(t=a.onDidUpdateSession)==null||t.call(a,this,a$2.fromJSON(e.payload.session),convertToPublicFrameData(e.payload.frameData,this._context));break}case "barcodeFindSearchPaused":{for(let a of this.allListeners){let i=e.payload.foundItems.map(o=>new a$1(new b$1(o),null));a.didPauseSearch(i);}break}case "barcodeFindSearchStarted":{for(let a of this.allListeners)a.didStartSearch();break}case "barcodeFindSearchStopped":{for(let a of this.allListeners){let i=e.payload.foundItems.map(o=>new a$1(new b$1(o),null));a.didStopSearch(i);}break}case "barcodeFindListUpdatedFeedback":{for(let a of this.allListeners)(r=a.onFindListUpdatedFeedback)==null||r.call(a);break}case "barcodeFindFeedback":{for(let a of this.allListeners)(c=a.onFeedback)==null||c.call(a);break}}}addPrivateListener(e){this.privateListeners.add(e);}removePrivateListener(e){this.privateListeners.delete(e);}};export{m as a};
1
+ import {a as a$2}from'./chunk-55SHUUX6.js';import {a as a$1,b as b$1}from'./chunk-HTKUJZG2.js';import {a}from'./chunk-V6XWYJR2.js';import {b}from'./chunk-6GGHOIBF.js';import {CameraSettings,convertToPublicFrameData}from'@scandit/web-datacapture-core';import {warnMultithreadingUnavailable}from'@scandit/web-datacapture-core/build/js/private/utils/warnMultithreadingUnavailable.js';var m=class u{constructor(){this.feedback=a.createDefaultFeedback();this.skipSerialization=true;this.type="barcodeFind";this._isEnabled=true;this._context=null;this.listeners=new Set;this.privateListeners=new Set;this.workerMessageListener=this.onWorkerMessage.bind(this);this._transformer=null;}static get recommendedCameraSettings(){let e=new CameraSettings(b.BarcodeFind.CameraSettings.settings);for(let[t,r]of Object.entries(b.BarcodeFind.CameraSettings.hiddenProperties))e.setProperty(t,r);return e}get context(){return this._context}get allListeners(){return [...this.privateListeners,...this.listeners]}static async forSettings(e){warnMultithreadingUnavailable();let t=new u;return t.settings=e,t}isEnabled(){return this._isEnabled}async setEnabled(e){var t;this._isEnabled=e,await this.workerCommand("barcodeFindSetEnabled",{enabled:e}),await((t=this.context)==null?void 0:t.update([{type:"modeEnabled",newValue:e}],{updateContext:false}));}async applySettings(e){this.settings=e,await this.workerCommand("barcodeFindApplySettings",{settings:e.toJSONObject()});}addListener(e){this.listeners.add(e);}removeListener(e){this.listeners.delete(e);}async setItemList(e){var t;for(let r of this.privateListeners)(t=r.onSetItemList)==null||t.call(r,e);return this.workerCommand("barcodeFindSetItemList",{itemList:e.map(r=>r.toJSONObject())})}async setBarcodeTransformer(e){var t;return this._transformer=e,this.workerCommand("barcodeFindSetTransformerFunction",{functionAsString:(t=this._transformer)==null?void 0:t.transformBarcodeData.toString()})}async start(){return this.workerCommand("barcodeFindSearchStart",{})}async stop(){return this.workerCommand("barcodeFindSearchStop",{})}async pause(){return this.workerCommand("barcodeFindSearchPause",{})}toJSONObject(){return {type:this.type,enabled:this.isEnabled(),settings:this.settings.toJSONObject()}}async workerCommand(e,t){this.context!=null&&await this.context.workerCommand(e,t);}async attachedToContext(e){this._context=e,this._context.subscribeToWorkerMessages(this.workerMessageListener),await this.workerCommand("barcodeFindForSettings",{settings:this.settings.toJSONObject()});}async detachedFromContext(){var e;await this.workerCommand("barcodeFindModeRemove",{}),(e=this._context)==null||e.unsubscribeToWorkerMessages(this.workerMessageListener),this._context=null;}async onWorkerMessage(e){var t,r,c;switch(e.type){case "barcodeFindDidUpdateSession":{if(this._context==null)return;for(let a of this.allListeners)(t=a.onDidUpdateSession)==null||t.call(a,this,a$2.fromJSON(e.payload.session),convertToPublicFrameData(e.payload.frameData,this._context));break}case "barcodeFindSearchPaused":{for(let a of this.allListeners){let i=e.payload.foundItems.map(o=>new a$1(new b$1(o),null));a.didPauseSearch(i);}break}case "barcodeFindSearchStarted":{for(let a of this.allListeners)a.didStartSearch();break}case "barcodeFindSearchStopped":{for(let a of this.allListeners){let i=e.payload.foundItems.map(o=>new a$1(new b$1(o),null));a.didStopSearch(i);}break}case "barcodeFindListUpdatedFeedback":{for(let a of this.allListeners)(r=a.onFindListUpdatedFeedback)==null||r.call(a);break}case "barcodeFindFeedback":{for(let a of this.allListeners)(c=a.onFeedback)==null||c.call(a);break}}}addPrivateListener(e){this.privateListeners.add(e);}removePrivateListener(e){this.privateListeners.delete(e);}};export{m as a};
@@ -0,0 +1 @@
1
+ import {Color}from'@scandit/web-datacapture-core';import {primaryTeal100,gray900}from'@scandit/web-datacapture-core/build/js/private/ui/colors.js';import {ScanditHTMLElement,html,defineCustomElements,css}from'@scandit/web-datacapture-core/build/js/private/utils/index.js';var i=class i extends ScanditHTMLElement{constructor(){super();let t=this.attachShadow({mode:"open"});t.innerHTML=html`<div class="dot"><div class="inner-dot"></div></div>`,t.append(i.createStyleElement().cloneNode(true));}set size(t){this.render({propChanged:"size",value:String(t)});}get size(){return Number(this.getAttribute("size"))}get variant(){return this.getAttribute("variant")}set variant(t){this.render({propChanged:"variant",value:t});}get pulse(){return !!this.getAttribute("pulse")}set pulse(t){this.render({propChanged:"pulse",value:t.toString()});}static create(){return i.createWithColors(primaryTeal100,Color.fromHex("#ffff"))}static createWithColors(t,r){let e=document.createElement(i.tag);return e.setPrimaryColor(t),e.setSecondaryColor(r),e}static register(){defineCustomElements({[i.tag]:i});}static createStyleElement(){return css`:host{display:block;--size:14px}.dot{--primary:#${primaryTeal100.toJSON()};--secondary:#${primaryTeal100.toJSON()};--primary-no-opacity:#${primaryTeal100.withAlpha(0).toJSON()};background-color:#fff;border-radius:50%;box-shadow:0 1px 2px 0 #${gray900.withAlpha(.3).toJSON()};height:var(--size);position:relative;width:var(--size)}.dot.pulse{animation:pulse 2s infinite}.dot.target{height:calc(var(--size) + var(--size)*1/1.285);width:calc(var(--size) + var(--size)*1/1.285)}.dot.target .inner-dot{background-color:var(--primary);height:calc(var(--size) + var(--size)*1/3);width:calc(var(--size) + var(--size)*1/3)}.inner-dot{background-color:var(--secondary);border-radius:50%;height:var(--size);left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:var(--size)}@keyframes pulse{0%{box-shadow:0 0 0 0 var(--primary)}70%{box-shadow:0 0 0 var(--size) var(--primary-no-opacity)}to{box-shadow:0 0 0 0 var(--primary-no-opacity)}}`}connectedCallback(){}setPrimaryColor(t){var e;let r=(e=this.shadowRoot)==null?void 0:e.querySelector(".dot");r&&(r.style.setProperty("--primary",`#${t.toJSON()}`),r.style.setProperty("--primary-no-opacity",`#${t.withAlpha(0).toJSON()}`));}setSecondaryColor(t){var e;let r=(e=this.shadowRoot)==null?void 0:e.querySelector(".dot");r&&r.style.setProperty("--secondary",`#${t.toJSON()}`);}render({propChanged:t,value:r}){var s;let e=(s=this.shadowRoot)==null?void 0:s.querySelector(".dot");switch(t){case "size":{e==null||e.style.setProperty("--size",`${r}px`);break}case "variant":{e==null||e.classList.toggle("target",r==="target");break}case "pulse":{e==null||e.classList.toggle("pulse",r==="true"||this.hasAttribute("pulse"));break}}}attributeChangedCallback(t,r,e){this.render({propChanged:t,value:e});}};i.tag="scandit-find-dot",i.observedAttributes=["size","variant","pulse"];var a=i;a.register();export{a};
@@ -1 +1 @@
1
- import {a}from'./chunk-DCUKY2F4.js';import {b}from'./chunk-OLJXVUYE.js';import {PrivateNoneLocationSelection}from'@scandit/web-datacapture-core';var S=class{constructor(){this.codeDuplicateFilter=b.BarcodeCapture.BarcodeCaptureSettings.codeDuplicateFilter;this.locationSelection=null;this.enabledCompositeTypes=[];this.scanIntention="manual";this.properties={};this.symbologies={};this._arucoDictionary=null;}get enabledSymbologies(){return Object.keys(this.symbologies).filter(o=>{var e;return (e=this.symbologies[o])==null?void 0:e.isEnabled})}get compositeTypeDescriptions(){return b.CompositeTypeDescriptions.reduce((o,e)=>(o[e.types[0]]=e,o),{})}settingsForSymbology(o){if(!this.symbologies[o]){let e=b.SymbologySettings[o];e._symbology=o,this.symbologies[o]=e;}return this.symbologies[o]}setProperty(o,e){this.properties[o]=e;}getProperty(o){return this.properties[o]}enableSymbologies(o){for(let e of o)this.enableSymbology(e,true);}enableSymbology(o,e){this.settingsForSymbology(o).isEnabled=e,o==="aruco"&&(this._arucoDictionary=a.fromPreset("5X5_50"));}enableSymbologiesForCompositeTypes(o){for(let e of o)this.enableSymbologies(this.compositeTypeDescriptions[e].symbologies);}setArucoDictionary(o){this._arucoDictionary=o;}toJSONObject(){var e,i,r,n,s;let o={};return {codeDuplicateFilter:this.codeDuplicateFilter,enabledCompositeTypes:[...this.enabledCompositeTypes],locationSelection:(i=(e=this.locationSelection)==null?void 0:e.toJSONObject())!=null?i:PrivateNoneLocationSelection,properties:{...this.properties},symbologies:Object.keys(this.symbologies).reduce((c,l)=>{var a;let y=(a=this.symbologies[l])==null?void 0:a.toJSONObject();return y&&(c[l]=y),c},o),scanIntention:(r=this.scanIntention)!=null?r:null,arucoDictionary:(s=(n=this._arucoDictionary)==null?void 0:n.toJSONObject())!=null?s:null}}};export{S as a};
1
+ import {a}from'./chunk-DCUKY2F4.js';import {b}from'./chunk-6GGHOIBF.js';import {PrivateNoneLocationSelection}from'@scandit/web-datacapture-core';var S=class{constructor(){this.codeDuplicateFilter=b.BarcodeCapture.BarcodeCaptureSettings.codeDuplicateFilter;this.locationSelection=null;this.enabledCompositeTypes=[];this.scanIntention="manual";this.properties={};this.symbologies={};this._arucoDictionary=null;}get enabledSymbologies(){return Object.keys(this.symbologies).filter(o=>{var e;return (e=this.symbologies[o])==null?void 0:e.isEnabled})}get compositeTypeDescriptions(){return b.CompositeTypeDescriptions.reduce((o,e)=>(o[e.types[0]]=e,o),{})}settingsForSymbology(o){if(!this.symbologies[o]){let e=b.SymbologySettings[o];e._symbology=o,this.symbologies[o]=e;}return this.symbologies[o]}setProperty(o,e){this.properties[o]=e;}getProperty(o){return this.properties[o]}enableSymbologies(o){for(let e of o)this.enableSymbology(e,true);}enableSymbology(o,e){this.settingsForSymbology(o).isEnabled=e,o==="aruco"&&(this._arucoDictionary=a.fromPreset("5X5_50"));}enableSymbologiesForCompositeTypes(o){for(let e of o)this.enableSymbologies(this.compositeTypeDescriptions[e].symbologies);}setArucoDictionary(o){this._arucoDictionary=o;}toJSONObject(){var e,i,r,n,s;let o={};return {codeDuplicateFilter:this.codeDuplicateFilter,enabledCompositeTypes:[...this.enabledCompositeTypes],locationSelection:(i=(e=this.locationSelection)==null?void 0:e.toJSONObject())!=null?i:PrivateNoneLocationSelection,properties:{...this.properties},symbologies:Object.keys(this.symbologies).reduce((c,l)=>{var a;let y=(a=this.symbologies[l])==null?void 0:a.toJSONObject();return y&&(c[l]=y),c},o),scanIntention:(r=this.scanIntention)!=null?r:null,arucoDictionary:(s=(n=this._arucoDictionary)==null?void 0:n.toJSONObject())!=null?s:null}}};export{S as a};
@@ -0,0 +1 @@
1
+ import {ScanditHTMLElement,html,defineCustomElements,css}from'@scandit/web-datacapture-core/build/js/private/utils/index.js';import {ScanditIconBuilder,ScanditIconType,Color}from'@scandit/web-datacapture-core';var t=class t extends ScanditHTMLElement{constructor(){super();let e=this.attachShadow({mode:"open"});e.innerHTML=html`<button><slot name="icon"></slot><slot></slot></button>`,e.append(t.createStyleElement().cloneNode(true));}async connectedCallback(){let o=await new ScanditIconBuilder().withIcon(ScanditIconType.ChevronDown).withIconColor(Color.fromHex("#3D4852").withAlpha(.8)).withWidth(24).withHeight(24).withIconSize(20).build();o.setAttribute("slot","icon"),this.append(o);}static create(){return document.createElement(t.tag)}static register(){defineCustomElements({[t.tag]:t});}static createStyleElement(){return css`:host{display:inline-block;font-family:SF Pro Text,sans-serif}:host button{align-items:center;background-color:#ffffffe6;border:none;border-radius:1rem;color:#3d4852cc;display:flex;font-size:.688rem;font-weight:600;gap:.25rem;justify-content:center;min-width:140px;min-width:100px;padding:.25rem .5rem}`}};t.tag="scandit-find-card-list-button";var n=t;n.register();export{n as a};
@@ -0,0 +1 @@
1
+ import {ProgressBar}from'@scandit/web-datacapture-core/build/js/private/ui/atoms/ProgressBar.js';import {html,ScanditHTMLElement,defineCustomElements,css}from'@scandit/web-datacapture-core/build/js/private/utils/index.js';var o=html`<div class="progress-container"><${ProgressBar.tag} id="scandit-progress" variant="gradient" min="0" max="1" value="0"></${ProgressBar.tag}><label for="scandit-progress" class="message">0 / 0</label></div>`,t=class t extends ScanditHTMLElement{constructor(){super();let e=this.attachShadow({mode:"open"});e.innerHTML=o,e.append(t.createStyleElement().cloneNode(true));}get value(){return Number(this.getAttribute("value"))}set value(e){this.setAttribute("value",e.toString());}get max(){return Number(this.getAttribute("max"))}set max(e){this.setAttribute("max",e.toString());}get progressBar(){var e;return (e=this.shadowRoot)==null?void 0:e.querySelector(ProgressBar.tag)}get label(){var e;return (e=this.shadowRoot)==null?void 0:e.querySelector("label")}static create(){return document.createElement(t.tag)}static register(){defineCustomElements({[t.tag]:t});}static createStyleElement(){return css`.progress-container{align-items:center;display:flex;flex-direction:row;gap:.5rem;justify-content:center}.progress-container label{color:#fff;font-family:SF Pro Display,sans-serif;font-weight:500;white-space:nowrap}`}connectedCallback(){this.render();}attributeChangedCallback(){this.render();}render(){this.progressBar==null||this.label==null||(this.progressBar.value=this.value,this.progressBar.max=this.max,this.label.textContent=`${this.progressBar.value} / ${this.progressBar.max}`);}};t.tag="scandit-find-progress-bar-with-label",t.observedAttributes=["value","max"];var a=t;a.register();export{a};
@@ -1 +1 @@
1
- import {a}from'./chunk-WPSMXGDG.js';import {a as a$1}from'./chunk-OLFIL5XY.js';import {b}from'./chunk-OLJXVUYE.js';import {CameraSettings,convertToPublicFrameData,Logger}from'@scandit/web-datacapture-core';var p=class u{constructor(){this.type="barcodeCapture";this._isEnabled=true;this._feedback=a.default;this._context=null;this.listeners=new Set;this.allowedRemainingWorkerMessages=new Set;this.workerMessageListener=this.onWorkerMessage.bind(this);}static get recommendedCameraSettings(){return new CameraSettings(b.BarcodeCapture.RecommendedCameraSettings)}get context(){return this._context}get feedback(){return this._feedback}static async forContext(e,a){let t=new u;return t.settings=a,e&&await e.setMode(t),t}async setFeedback(e){return this._feedback=e,this.notifyContext()}isEnabled(){return this._isEnabled}async setEnabled(e){this._isEnabled=e,await this.notifyContext();}async applySettings(e){return this.settings=e,this.notifyContext()}addListener(e){this.listeners.has(e)||this.listeners.add(e);}removeListener(e){this.listeners.delete(e);}toJSONObject(){return {type:this.type,enabled:this._isEnabled,feedback:this.feedback.toJSONObject(),settings:this.settings.toJSONObject()}}attachedToContext(e){this._context=e,this._context.subscribeToWorkerMessages(this.workerMessageListener);}async detachedFromContext(){var e;(e=this._context)==null||e.unsubscribeToWorkerMessages(this.workerMessageListener),this._context=null;}sendClearFrameDataRequest(e){setTimeout(()=>{var a;(a=this.context)==null||a.workerCommand("deleteFrameData",{frameId:e});},0);}async onDidScan(e){if(this.context==null)return;let a=a$1.fromJSON(e.payload.session),{frameData:t}=e.payload;if(!this._isEnabled){this.sendClearFrameDataRequest(t.frameId),this.allowedRemainingWorkerMessages.clear();return}this.allowedRemainingWorkerMessages.add("successFeedback");let o=[];for(let r of this.listeners)if(r.didScan)try{let s=r.didScan(this,a,convertToPublicFrameData(t,this.context));s instanceof Promise&&await s;}catch(s){o.push(s);}this.sendClearFrameDataRequest(t.frameId),this.allowedRemainingWorkerMessages.add("barcodeCaptureDidUpdateSession");for(let r of o)Logger.log(Logger.Level.Error,r);}onDidUpdateSession(e){let a=a$1.fromJSON(e.payload);if(!(!this._isEnabled&&!this.allowedRemainingWorkerMessages.has(e.type))){this.allowedRemainingWorkerMessages.delete(e.type);for(let t of this.listeners)t.didUpdateSession&&t.didUpdateSession(this,a);}}onSuccessFeedback(e){!this._isEnabled&&!this.allowedRemainingWorkerMessages.has(e.type)||(this.allowedRemainingWorkerMessages.delete(e.type),this.feedback.success.emit());}async onWorkerMessage(e){switch(e.type){case "barcodeCaptureDidScan":{this.onDidScan(e);break}case "barcodeCaptureDidUpdateSession":{this.onDidUpdateSession(e);break}case "successFeedback":{this.onSuccessFeedback(e);break}}}async notifyContext(){this.context!=null&&await this.context.update();}};export{p as a};
1
+ import {a}from'./chunk-WPSMXGDG.js';import {a as a$1}from'./chunk-CLT5UZMK.js';import {b}from'./chunk-6GGHOIBF.js';import {CameraSettings,convertToPublicFrameData,Logger}from'@scandit/web-datacapture-core';var p=class u{constructor(){this.type="barcodeCapture";this._isEnabled=true;this._feedback=a.default;this._context=null;this.listeners=new Set;this.allowedRemainingWorkerMessages=new Set;this.workerMessageListener=this.onWorkerMessage.bind(this);}static get recommendedCameraSettings(){return new CameraSettings(b.BarcodeCapture.RecommendedCameraSettings)}get context(){return this._context}get feedback(){return this._feedback}static async forContext(e,a){let t=new u;return t.settings=a,e&&await e.setMode(t),t}async setFeedback(e){return this._feedback=e,this.notifyContext()}isEnabled(){return this._isEnabled}async setEnabled(e){this._isEnabled=e,await this.notifyContext();}async applySettings(e){return this.settings=e,this.notifyContext()}addListener(e){this.listeners.has(e)||this.listeners.add(e);}removeListener(e){this.listeners.delete(e);}toJSONObject(){return {type:this.type,enabled:this._isEnabled,feedback:this.feedback.toJSONObject(),settings:this.settings.toJSONObject()}}attachedToContext(e){this._context=e,this._context.subscribeToWorkerMessages(this.workerMessageListener);}async detachedFromContext(){var e;(e=this._context)==null||e.unsubscribeToWorkerMessages(this.workerMessageListener),this._context=null;}sendClearFrameDataRequest(e){setTimeout(()=>{var a;(a=this.context)==null||a.workerCommand("deleteFrameData",{frameId:e});},0);}async onDidScan(e){if(this.context==null)return;let a=a$1.fromJSON(e.payload.session),{frameData:t}=e.payload;if(!this._isEnabled){this.sendClearFrameDataRequest(t.frameId),this.allowedRemainingWorkerMessages.clear();return}this.allowedRemainingWorkerMessages.add("successFeedback");let o=[];for(let r of this.listeners)if(r.didScan)try{let s=r.didScan(this,a,convertToPublicFrameData(t,this.context));s instanceof Promise&&await s;}catch(s){o.push(s);}this.sendClearFrameDataRequest(t.frameId),this.allowedRemainingWorkerMessages.add("barcodeCaptureDidUpdateSession");for(let r of o)Logger.log(Logger.Level.Error,r);}onDidUpdateSession(e){let a=a$1.fromJSON(e.payload);if(!(!this._isEnabled&&!this.allowedRemainingWorkerMessages.has(e.type))){this.allowedRemainingWorkerMessages.delete(e.type);for(let t of this.listeners)t.didUpdateSession&&t.didUpdateSession(this,a);}}onSuccessFeedback(e){!this._isEnabled&&!this.allowedRemainingWorkerMessages.has(e.type)||(this.allowedRemainingWorkerMessages.delete(e.type),this.feedback.success.emit());}async onWorkerMessage(e){switch(e.type){case "barcodeCaptureDidScan":{this.onDidScan(e);break}case "barcodeCaptureDidUpdateSession":{this.onDidUpdateSession(e);break}case "successFeedback":{this.onSuccessFeedback(e);break}}}async notifyContext(){this.context!=null&&await this.context.update();}};export{p as a};
@@ -1 +1 @@
1
- import {b}from'./chunk-OLJXVUYE.js';var i=class{constructor(){this.properties={};this.symbologies={};}get enabledSymbologies(){return Object.keys(this.symbologies).filter(e=>this.symbologies[e].isEnabled)}settingsForSymbology(e){if(!this.symbologies[e]){let o=b.SymbologySettings[e];o._symbology=e,this.symbologies[e]=o;}return this.symbologies[e]}setProperty(e,o){this.properties[e]=o;}getProperty(e){return this.properties[e]}enableSymbologies(e){for(let o of e)this.enableSymbology(o,true);}enableSymbology(e,o){this.settingsForSymbology(e).isEnabled=o;}toJSONObject(){return {properties:this.properties,symbologies:Object.keys(this.symbologies).reduce((e,o)=>(e[o]=this.symbologies[o].toJSONObject(),e),{})}}};export{i as a};
1
+ import {b}from'./chunk-6GGHOIBF.js';var i=class{constructor(){this.properties={};this.symbologies={};}get enabledSymbologies(){return Object.keys(this.symbologies).filter(e=>this.symbologies[e].isEnabled)}settingsForSymbology(e){if(!this.symbologies[e]){let o=b.SymbologySettings[e];o._symbology=e,this.symbologies[e]=o;}return this.symbologies[e]}setProperty(e,o){this.properties[e]=o;}getProperty(e){return this.properties[e]}enableSymbologies(e){for(let o of e)this.enableSymbology(o,true);}enableSymbology(e,o){this.settingsForSymbology(e).isEnabled=o;}toJSONObject(){return {properties:this.properties,symbologies:Object.keys(this.symbologies).reduce((e,o)=>(e[o]=this.symbologies[o].toJSONObject(),e),{})}}};export{i as a};
@@ -1 +1 @@
1
- import {a as a$1}from'./chunk-QZGFNS2K.js';import {a as a$2}from'./chunk-CYVVGAZ4.js';import {Color,ScanditIcon,ScanditIconBuilder,ScanditIconType,ScanditIconShape}from'@scandit/web-datacapture-core';import {SecondaryOrange100,gray900}from'@scandit/web-datacapture-core/build/js/private/ui/colors.js';import {ScanditHTMLElement}from'@scandit/web-datacapture-core/build/js/private/utils/ScanditHTMLElement.js';import {css}from'@scandit/web-datacapture-core/build/js/private/utils/css.js';import {defineCustomElements}from'@scandit/web-datacapture-core/build/js/private/utils/defineCustomElements.js';var c=(o=>(o[o.Top="top-center"]="Top",o[o.Bottom="bottom-center"]="Bottom",o[o.Left="left-center"]="Left",o[o.Right="right-center"]="Right",o))(c||{}),i=class i extends ScanditHTMLElement{constructor(){super();this.annotationTrigger="highlightTapAndBarcodeScan";this.anchor=c.Bottom;this.onToggleListener=this.onToggle.bind(this);this._backgroundColor=Color.fromHex("#fff");this._icon=null;this.statusIconContainer=a$1.create();}get barcode(){return this._barcode}set barcode(t){this._barcode=t;}set text(t){this.statusIconContainer.text=t;}get text(){return this.statusIconContainer.text}set hasTip(t){this.statusIconContainer.toggleAttribute("tip",t);}get hasTip(){return this.statusIconContainer.hasAttribute("tip")}set icon(t){var e;(e=this.icon)==null||e.remove(),this._icon=t,t&&(t.slot="barcode-icon",t.width=24,t.height=24,t.setIconSize(16),this.statusIconContainer.append(t));}get icon(){var t;return (t=this.statusIconContainer.querySelector(ScanditIcon.tag))!=null?t:this._icon}set backgroundColor(t){this._backgroundColor=t,this.statusIconContainer.backgroundColor=t;}get backgroundColor(){return this.statusIconContainer.backgroundColor}set textColor(t){this.statusIconContainer.textColor=t;}get textColor(){return this.statusIconContainer.textColor}static create(t){i.register();let e=document.createElement(i.tag);return e.barcode=t,e}static register(){defineCustomElements({[a$1.tag]:a$1,[i.tag]:i});}async connectedCallback(){if(!this._icon){let e=new ScanditIconBuilder().withIcon(ScanditIconType.ExclamationMark).withBackgroundShape(ScanditIconShape.Circle).withBackgroundColor(SecondaryOrange100).withIconColor(gray900).withWidth(24).withHeight(24).withIconSize(16);this._icon=await e.build();}this.icon=this._icon;let t=css`${i.tag}{align-items:center;display:flex;justify-content:center;min-height:48px;min-width:48px}`;this.append(t),this.append(this.statusIconContainer),this.statusIconContainer.append(this.icon),this.addEventListener("pointerup",this.onToggleListener);}disconnectedCallback(){this.removeEventListener("pointerup",this.onToggleListener);}onToggle(){this.statusIconContainer.expanded=!this.statusIconContainer.expanded;}updatePosition(t,e,o){a$2(this,t,e,o);}};i.tag="scandit-barcode-ar-status-icon-annotation";var a=i;export{c as a,a as b};
1
+ import {a as a$1}from'./chunk-SDQOQ2G3.js';import {a as a$2}from'./chunk-CYVVGAZ4.js';import {Color,ScanditIcon,ScanditIconBuilder,ScanditIconType,ScanditIconShape}from'@scandit/web-datacapture-core';import {SecondaryOrange100,gray900}from'@scandit/web-datacapture-core/build/js/private/ui/colors.js';import {ScanditHTMLElement}from'@scandit/web-datacapture-core/build/js/private/utils/ScanditHTMLElement.js';import {css}from'@scandit/web-datacapture-core/build/js/private/utils/css.js';import {defineCustomElements}from'@scandit/web-datacapture-core/build/js/private/utils/defineCustomElements.js';var c=(o=>(o[o.Top="top-center"]="Top",o[o.Bottom="bottom-center"]="Bottom",o[o.Left="left-center"]="Left",o[o.Right="right-center"]="Right",o))(c||{}),i=class i extends ScanditHTMLElement{constructor(){super();this.annotationTrigger="highlightTapAndBarcodeScan";this.anchor=c.Bottom;this.onToggleListener=this.onToggle.bind(this);this._backgroundColor=Color.fromHex("#fff");this._icon=null;this.statusIconContainer=a$1.create();}get barcode(){return this._barcode}set barcode(t){this._barcode=t;}set text(t){this.statusIconContainer.text=t;}get text(){return this.statusIconContainer.text}set hasTip(t){this.statusIconContainer.toggleAttribute("tip",t);}get hasTip(){return this.statusIconContainer.hasAttribute("tip")}set icon(t){var e;(e=this.icon)==null||e.remove(),this._icon=t,t&&(t.slot="barcode-icon",t.width=24,t.height=24,t.setIconSize(16),this.statusIconContainer.append(t));}get icon(){var t;return (t=this.statusIconContainer.querySelector(ScanditIcon.tag))!=null?t:this._icon}set backgroundColor(t){this._backgroundColor=t,this.statusIconContainer.backgroundColor=t;}get backgroundColor(){return this.statusIconContainer.backgroundColor}set textColor(t){this.statusIconContainer.textColor=t;}get textColor(){return this.statusIconContainer.textColor}static create(t){i.register();let e=document.createElement(i.tag);return e.barcode=t,e}static register(){defineCustomElements({[a$1.tag]:a$1,[i.tag]:i});}async connectedCallback(){if(!this._icon){let e=new ScanditIconBuilder().withIcon(ScanditIconType.ExclamationMark).withBackgroundShape(ScanditIconShape.Circle).withBackgroundColor(SecondaryOrange100).withIconColor(gray900).withWidth(24).withHeight(24).withIconSize(16);this._icon=await e.build();}this.icon=this._icon;let t=css`${i.tag}{align-items:center;display:flex;justify-content:center;min-height:48px;min-width:48px}`;this.append(t),this.append(this.statusIconContainer),this.statusIconContainer.append(this.icon),this.addEventListener("pointerup",this.onToggleListener);}disconnectedCallback(){this.removeEventListener("pointerup",this.onToggleListener);}onToggle(){this.statusIconContainer.expanded=!this.statusIconContainer.expanded;}updatePosition(t,e,o){a$2(this,t,e,o);}};i.tag="scandit-barcode-ar-status-icon-annotation";var a=i;export{c as a,a as b};
@@ -0,0 +1 @@
1
+ import {a}from'./chunk-F7NAOKPF.js';import {a as a$4}from'./chunk-KELYPKGG.js';import {a as a$2}from'./chunk-FD4QVJDW.js';import {a as a$3}from'./chunk-MHRGFVAW.js';import {a as a$1}from'./chunk-CYVVGAZ4.js';import {Color,ScanditIcon}from'@scandit/web-datacapture-core';import {ScanditHTMLElement,html,defineCustomElements,css}from'@scandit/web-datacapture-core/build/js/private/utils/index.js';var m=(o=>(o[o.Top="top-center"]="Top",o[o.Bottom="bottom-center"]="Bottom",o[o.Left="left-center"]="Left",o[o.Right="right-center"]="Right",o))(m||{}),N=(e=>(e.Small="small",e.Medium="medium",e.Large="large",e))(N||{}),U=(T=>(T.InfoAnnotationTap="BarcodeArInfoAnnotationEventTap",T))(U||{}),h="slot[name='header']",p="slot[name='footer']",v="--arrow-background-color",s=class s extends ScanditHTMLElement{constructor(){super();this.isEntireAnnotationTappable=false;this.annotationTrigger="highlightTapAndBarcodeScan";this._widthPreset="small";this.onPointerUpListener=this.onPointerUp.bind(this);this.onSlotChangeListener=this.onSlotChange.bind(this);this.highlightableElementListenerMap=new Map;let t=this.attachShadow({mode:"open"});t.innerHTML=html`<div class="container arw-${m.Bottom} ${"small"}"><slot name="header"></slot><div class="body-container"><slot></slot></div><slot name="footer"></slot></div>`,this.containerElement=t.querySelector(".container"),t.append(s.createStyleElement().cloneNode(true)),t.append(a());}get barcode(){return this._barcode}set barcode(t){this._barcode=t;}updatePosition(t,e,o){a$1(this,t,e,0);}set anchor(t){for(let e of Object.values(m))this.containerElement.classList.remove(`arw-${e}`);this.containerElement.classList.add(`arw-${t}`),this.updateArrowColor();}get anchor(){for(let t of Object.values(m))if(this.containerElement.classList.contains(`arw-${t}`))return t;return m.Bottom}set widthPreset(t){this._widthPreset=t,this.containerElement.classList.remove("small","medium","large"),this.containerElement.classList.add(t);}get widthPreset(){switch(true){case this.containerElement.classList.contains("small"):return "small";case this.containerElement.classList.contains("medium"):return "medium";case this.containerElement.classList.contains("large"):return "large";default:return "small"}}get backgroundColor(){let t=this.containerElement.style.getPropertyValue("--background-color");return Color.fromHex(t)}set backgroundColor(t){this.containerElement.style.setProperty("--background-color",`#${t.toJSON()}`),this.updateArrowColor();}set body(t){this.append(...t);}get body(){var e,o;let t=(e=this.shadowRoot)==null?void 0:e.querySelector("slot:not([name])");return (o=t==null?void 0:t.assignedElements({flatten:true}))!=null?o:[]}set header(t){let e=this.querySelector(h);t!=null&&(e==null?void 0:e.assignedElements()[0])!==t&&(e==null||e.remove(),t.setAttribute("slot","header"),this.append(t));}get header(){var e,o;let t=(e=this.shadowRoot)==null?void 0:e.querySelector(h);return ((o=t==null?void 0:t.assignedElements())!=null?o:[])[0]}set footer(t){let e=this.querySelector(p);t!=null&&(e==null?void 0:e.assignedElements()[0])!==t&&(e==null||e.remove(),t.setAttribute("slot","footer"),this.append(t));}get footer(){var e,o;let t=(e=this.shadowRoot)==null?void 0:e.querySelector(p);return ((o=t==null?void 0:t.assignedElements())!=null?o:[])[0]}set hasTip(t){this.containerElement.classList.toggle(`arw-${this.anchor}`,t);}get hasTip(){return this.containerElement.classList.contains(`arw-${this.anchor}`)}static create(t){s.register();let e=document.createElement(s.tag);return e.barcode=t,e}static register(){defineCustomElements({[a$4.tag]:a$4,[a$3.tag]:a$3,[a$2.tag]:a$2,[s.tag]:s});}static createStyleElement(){return css`:host{--background-color:#fff;--arrow-size:7px;--arrow-background-color:var(--background-color);--arrow-offset:10px;font-family:SF Pro Display,sans-serif}.container{background-color:var(--background-color);border-radius:16px;display:flex;flex-direction:column;min-width:100px;position:relative;transition:opacity .3s ease;width:100%}.container.highlighted{opacity:.75}.container.${"small"}{width:180px}.container.${"medium"}{width:210px}.container.${"large"}{width:240px}.body-container{padding-bottom:1rem}`}connectedCallback(){var o,n;this.widthPreset=this._widthPreset,this.addEventListener("pointerup",this.onPointerUpListener);let t=(o=this.shadowRoot)==null?void 0:o.querySelector(h),e=(n=this.shadowRoot)==null?void 0:n.querySelector(p);t==null||t.addEventListener("slotchange",this.onSlotChangeListener),e==null||e.addEventListener("slotchange",this.onSlotChangeListener),this.onSlotChange(),this.isEntireAnnotationTappable&&this.makeHighlightable(this.containerElement);}disconnectedCallback(){var o,n;let t=(o=this.shadowRoot)==null?void 0:o.querySelector(h),e=(n=this.shadowRoot)==null?void 0:n.querySelector(p);t==null||t.removeEventListener("slotchange",this.onSlotChangeListener),e==null||e.removeEventListener("slotchange",this.onSlotChangeListener),this.removeEventListener("pointerup",this.onPointerUpListener);for(let[i,a]of this.highlightableElementListenerMap)i.removeEventListener("pointerdown",a.pointerdown),i.removeEventListener("pointerup",a.pointerup);}onSlotChange(){var i,a,c,d;let t=(i=this.shadowRoot)==null?void 0:i.querySelector(h),e=(a=this.shadowRoot)==null?void 0:a.querySelector(p),o=(c=t==null?void 0:t.assignedElements())!=null?c:[],n=(d=e==null?void 0:e.assignedElements())!=null?d:[];for(let r of o)r.style.setProperty("--top-left-corner-radius","16px"),r.style.setProperty("--top-right-corner-radius","16px"),this.isEntireAnnotationTappable||this.makeHighlightable(r);for(let r of n)r.style.setProperty("--bottom-left-corner-radius","16px"),r.style.setProperty("--bottom-right-corner-radius","16px"),this.isEntireAnnotationTappable||this.makeHighlightable(r);this.updateArrowColor();}updateArrowColor(){this.style.removeProperty(v),this.header||this.footer?this.header&&this.anchor.startsWith("top")?this.style.setProperty(v,`#${this.header.backgroundColor.toJSON()}`):this.footer&&this.anchor.startsWith("bottom")&&this.style.setProperty(v,`#${this.footer.backgroundColor.toJSON()}`):this.body.length>0&&!this.header&&!this.footer&&this.style.setProperty(v,`#${this.backgroundColor.toJSON()}`);}makeHighlightable(t){var i;let e=t.classList.contains("container")?t:(i=t.shadowRoot)==null?void 0:i.querySelector(".container");if(!e||this.highlightableElementListenerMap.has(e))return;let o=()=>{e.classList.add("highlighted");},n=()=>{e.classList.remove("highlighted");};e.addEventListener("pointerdown",o),e.addEventListener("pointerup",n),this.highlightableElementListenerMap.set(e,{pointerdown:o,pointerup:n});}onPointerUp(t){var a,c,d,r,B,f,I,u,S,g,w,b,P;let e=(a=t.target)==null?void 0:a.closest(a$3.tag),o=(c=t.target)==null?void 0:c.closest(a$2.tag),n=(d=t.target)==null?void 0:d.closest(`${a$4.tag} ${ScanditIcon.tag}`),i=new CustomEvent("BarcodeArInfoAnnotationEventTap",{bubbles:true});if(e&&((B=(r=this.listener)==null?void 0:r.onInfoAnnotationHeaderTapped)==null||B.call(r,this),this.dispatchEvent(i)),o&&((I=(f=this.listener)==null?void 0:f.onInfoAnnotationFooterTapped)==null||I.call(f,this),this.dispatchEvent(i)),(n==null?void 0:n.slot)==="left-barcode-icon"){let l=this.body.findIndex(y=>y.contains(n));this.body[l].isLeftIconTappable&&((S=(u=this.listener)==null?void 0:u.onInfoAnnotationLeftIconTapped)==null||S.call(u,this,this.body[l],l),this.dispatchEvent(i));}if((n==null?void 0:n.slot)==="right-barcode-icon"){let l=this.body.findIndex(y=>y.contains(n));this.body[l].isRightIconTappable&&((w=(g=this.listener)==null?void 0:g.onInfoAnnotationRightIconTapped)==null||w.call(g,this,this.body[l],l),this.dispatchEvent(i));}this.isEntireAnnotationTappable&&((P=(b=this.listener)==null?void 0:b.onInfoAnnotationTapped)==null||P.call(b,this),this.dispatchEvent(i));}};s.tag="scandit-barcode-ar-info-annotation";var H=s;export{m as a,N as b,U as c,H as d};
@@ -1 +1 @@
1
- import {b}from'./chunk-OLJXVUYE.js';import {a}from'./chunk-IHTTMWUR.js';import {CameraSettings}from'@scandit/web-datacapture-core';import {warnMultithreadingUnavailable}from'@scandit/web-datacapture-core/build/js/private/utils/warnMultithreadingUnavailable.js';var o=class n{constructor(){this.type="barcodeTracking";this._isEnabled=true;this._context=null;this.listeners=[];this.privateListeners=new Set;this.workerMessageListener=this.onWorkerMessage.bind(this);}static get recommendedCameraSettings(){let e=new CameraSettings(b.BarcodeBatch.RecommendedCameraSettings);return e.setProperty("grayScaleFrameReader",true),e}get context(){return this._context}set context(e){this._context=e;}static async forContext(e,a){warnMultithreadingUnavailable();let t=new n;return t.settings=a,e!=null&&await e.setMode(t),t}isEnabled(){return this._isEnabled}async setEnabled(e){this._isEnabled=e,await this.notifyContext();}async applySettings(e){return this.settings=e,this.notifyContext()}addListener(e){this.listeners.includes(e)||this.listeners.push(e);}removeListener(e){this.listeners.includes(e)&&this.listeners.splice(this.listeners.indexOf(e),1);}toJSONObject(){return {type:this.type,enabled:this._isEnabled,settings:this.settings.toJSONObject()}}attachedToContext(e){this._context=e,this._context.subscribeToWorkerMessages(this.workerMessageListener);}detachedFromContext(){var e;(e=this._context)==null||e.unsubscribeToWorkerMessages(this.workerMessageListener),this._context=null;}addPrivateListener(e){this.privateListeners.add(e);}removePrivateListener(e){this.privateListeners.delete(e);}async onWorkerMessage(e){var a$1;switch(e.type){case "barcodeBatchDidUpdateSession":{{let t=a.fromJSON(e.payload);if(!this._isEnabled)return;for(let r of [...this.privateListeners,...this.listeners])r.didUpdateSession&&r.didUpdateSession(this,t);}break}case "didTapTrackedBarcode":{for(let t of this.privateListeners)(a$1=t.didTapTrackedBarcode)==null||a$1.call(t,e.payload);break}}}async notifyContext(){if(this.context)return this.context.update()}};export{o as a};
1
+ import {b}from'./chunk-6GGHOIBF.js';import {a}from'./chunk-JAFW53OO.js';import {CameraSettings}from'@scandit/web-datacapture-core';import {warnMultithreadingUnavailable}from'@scandit/web-datacapture-core/build/js/private/utils/warnMultithreadingUnavailable.js';var o=class n{constructor(){this.type="barcodeTracking";this._isEnabled=true;this._context=null;this.listeners=[];this.privateListeners=new Set;this.workerMessageListener=this.onWorkerMessage.bind(this);}static get recommendedCameraSettings(){let e=new CameraSettings(b.BarcodeBatch.RecommendedCameraSettings);return e.setProperty("grayScaleFrameReader",true),e}get context(){return this._context}set context(e){this._context=e;}static async forContext(e,a){warnMultithreadingUnavailable();let t=new n;return t.settings=a,e!=null&&await e.setMode(t),t}isEnabled(){return this._isEnabled}async setEnabled(e){this._isEnabled=e,await this.notifyContext();}async applySettings(e){return this.settings=e,this.notifyContext()}addListener(e){this.listeners.includes(e)||this.listeners.push(e);}removeListener(e){this.listeners.includes(e)&&this.listeners.splice(this.listeners.indexOf(e),1);}toJSONObject(){return {type:this.type,enabled:this._isEnabled,settings:this.settings.toJSONObject()}}attachedToContext(e){this._context=e,this._context.subscribeToWorkerMessages(this.workerMessageListener);}detachedFromContext(){var e;(e=this._context)==null||e.unsubscribeToWorkerMessages(this.workerMessageListener),this._context=null;}addPrivateListener(e){this.privateListeners.add(e);}removePrivateListener(e){this.privateListeners.delete(e);}async onWorkerMessage(e){var a$1;switch(e.type){case "barcodeBatchDidUpdateSession":{{let t=a.fromJSON(e.payload);if(!this._isEnabled)return;for(let r of [...this.privateListeners,...this.listeners])r.didUpdateSession&&r.didUpdateSession(this,t);}break}case "didTapTrackedBarcode":{for(let t of this.privateListeners)(a$1=t.didTapTrackedBarcode)==null||a$1.call(t,e.payload);break}}}async notifyContext(){if(this.context)return this.context.update()}};export{o as a};
@@ -0,0 +1 @@
1
+ import {a}from'./chunk-V6XWYJR2.js';import {TorchState,Camera,FrameSourceState}from'@scandit/web-datacapture-core';var h=(t=>(t.Started="started",t.Paused="paused",t.Stopped="stopped",t))(h||{}),c=class{constructor(e,i,t,s,o){this.viewState="paused";this.barcodeFindViewUiListener=null;this.torchState=TorchState.Off;this.sessionState=null;this.barcodeFindView=e,this.barcodeFind=t,this.context=i,this.viewSettings=s,this.cameraSettings=o,t.feedback=a.createWithOptions(this.viewSettings.soundEnabled,this.viewSettings.hapticEnabled);}async prepare(){await this.barcodeFind.setEnabled(false),this.barcodeFind.addPrivateListener(this);let e=Camera.pickBestGuess();await this.context.setFrameSource(e),await this.context.frameSource.applySettings(this.cameraSettings),this.isTorchAvailable=await e.isTorchAvailable();}async dispose(){await this.context.removeMode(this.barcodeFind),this.barcodeFind.removePrivateListener(this);}async didPauseSearch(e){this.barcodeFindView.switchToPaused(Object.values(this.customerItemsListState),e);}async didStartSearch(){this.barcodeFindView.switchToStarted();}async didStopSearch(e){var i;(i=this.barcodeFindViewUiListener)==null||i.didTapFinishButton(e);}async onSetItemList(e){this.customerItemsListState=e.reduce((i,t)=>(i[t.searchOptions.barcodeData]=t,i),{}),this.barcodeFind.feedback.itemListUpdated.emit(),this.barcodeFindView.updateProgressBar(0,Object.values(this.customerItemsListState).length);}onDidUpdateSession(e,i,t){this.sessionState=i,this.barcodeFindView.updateProgressBar(this.sessionState.allFoundItems.length),this.barcodeFindView.renderDots(this.sessionState);}async onShutterButtonClicked(){this.viewState==="paused"||this.viewState==="stopped"?await this.startSearching():await this.pauseSearching();}async onTorchButtonClicked(){this.isTorchAvailable&&(await this.context.frameSource.setDesiredTorchState(this.torchState===TorchState.Off?TorchState.On:TorchState.Off),this.torchState=this.torchState===TorchState.Off?TorchState.On:TorchState.Off,this.barcodeFindView.toggleTorchIcon(this.torchState));}onDotClick(e){var t,s;let i=(t=this.sessionState)==null?void 0:t.trackedBarcodes[e];if(i!=null){let o=this.customerItemsListState[(s=i.barcode.data)!=null?s:""];this.barcodeFindView.moveCardOnTheFront(o);}}onFinishButtonClicked(){this.stopSearching();}onFindListUpdatedFeedback(){this.barcodeFind.feedback.itemListUpdated.emit();}onFeedback(){this.barcodeFind.feedback.found.emit(),this.barcodeFindView.setShutterButtonPulse(true);}async pauseSearching(){var e;this.viewState="paused",await((e=this.context.frameSource)==null?void 0:e.switchToDesiredState(FrameSourceState.Standby)),await this.barcodeFind.setEnabled(false),await this.barcodeFind.pause(),this.barcodeFindView.setShutterButtonPulse(false);}async startSearching(){var e;this.viewState="started",await((e=this.context.frameSource)==null?void 0:e.switchToDesiredState(FrameSourceState.On)),await this.barcodeFind.setEnabled(true),await this.barcodeFind.start();}async stopSearching(){var e;this.viewState="stopped",await this.barcodeFind.setEnabled(false),await((e=this.context.frameSource)==null?void 0:e.switchToDesiredState(FrameSourceState.Off)),await this.barcodeFind.stop(),this.barcodeFindView.setShutterButtonPulse(false),this.sessionState=null;}};export{h as a,c as b};
@@ -1 +1 @@
1
- import {a}from'./chunk-L2JLFSNM.js';var t=class s{get addedTrackedBarcodes(){return this._addedTrackedBarcodes}get removedTrackedBarcodes(){return this._removedTrackedBarcodes}get updatedTrackedBarcodes(){return this._updatedTrackedBarcodes}get trackedBarcodes(){return this._trackedBarcodes}get frameSequenceID(){return this._frameSequenceID}static fromJSON(r){let d=new s;d._addedTrackedBarcodes=r.addedTrackedBarcodes.map(e=>a.fromJSON(e));for(let e of d._addedTrackedBarcodes)e.sessionFrameSequenceID=`${r.frameSequenceId}`;d._removedTrackedBarcodes=r.removedTrackedBarcodes,d._updatedTrackedBarcodes=r.updatedTrackedBarcodes.map(e=>a.fromJSON(e));for(let e of d._updatedTrackedBarcodes)e.sessionFrameSequenceID=`${r.frameSequenceId}`;return d._trackedBarcodes=Object.keys(r.trackedBarcodes).reduce((e,c)=>{let o=a.fromJSON(r.trackedBarcodes[c]);return o.sessionFrameSequenceID=`${r.frameSequenceId}`,e[c]=o,e},{}),d._frameSequenceID=r.frameSequenceId,d}};export{t as a};
1
+ import {a}from'./chunk-3KF7PG5K.js';var t=class s{get addedTrackedBarcodes(){return this._addedTrackedBarcodes}get removedTrackedBarcodes(){return this._removedTrackedBarcodes}get updatedTrackedBarcodes(){return this._updatedTrackedBarcodes}get trackedBarcodes(){return this._trackedBarcodes}get frameSequenceID(){return this._frameSequenceID}static fromJSON(r){let d=new s;d._addedTrackedBarcodes=r.addedTrackedBarcodes.map(e=>a.fromJSON(e));for(let e of d._addedTrackedBarcodes)e.sessionFrameSequenceID=`${r.frameSequenceId}`;d._removedTrackedBarcodes=r.removedTrackedBarcodes,d._updatedTrackedBarcodes=r.updatedTrackedBarcodes.map(e=>a.fromJSON(e));for(let e of d._updatedTrackedBarcodes)e.sessionFrameSequenceID=`${r.frameSequenceId}`;return d._trackedBarcodes=Object.keys(r.trackedBarcodes).reduce((e,c)=>{let o=a.fromJSON(r.trackedBarcodes[c]);return o.sessionFrameSequenceID=`${r.frameSequenceId}`,e[c]=o,e},{}),d._frameSequenceID=r.frameSequenceId,d}};export{t as a};