@scandit/web-datacapture-barcode 7.1.1 → 7.2.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (221) hide show
  1. package/build/js/BarcodeBatch.js +1 -1
  2. package/build/js/BarcodeBatchAdvancedOverlay.d.ts +1 -1
  3. package/build/js/BarcodeBatchAdvancedOverlay.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.js +1 -1
  9. package/build/js/BarcodeCaptureSettings.js +1 -1
  10. package/build/js/Defaults.js +1 -1
  11. package/build/js/PrivateBarcodeBatchAdvancedOverlayListener.d.ts +1 -1
  12. package/build/js/PrivateBarcodeBatchBasicOverlayListener.js +1 -1
  13. package/build/js/{SparkScanView-LXH0ExAN.d.ts → SparkScanView-BHTEutX-.d.ts} +3 -0
  14. package/build/js/SymbologyDescription.js +1 -1
  15. package/build/js/TrackedBarcode.js +1 -1
  16. package/build/js/TrackedBarcodeView.d.ts +1 -1
  17. package/build/js/TrackedBarcodeView.js +1 -1
  18. package/build/js/check/BarcodeCheck.js +1 -1
  19. package/build/js/check/BarcodeCheckFeedback.js +1 -1
  20. package/build/js/check/BarcodeCheckPresenter.js +1 -1
  21. package/build/js/check/BarcodeCheckSession.js +1 -1
  22. package/build/js/check/BarcodeCheckSettings.js +1 -1
  23. package/build/js/check/BarcodeCheckView.js +1 -1
  24. package/build/js/check/BarcodeCheckViewSettings.js +1 -1
  25. package/build/js/check/Defaults.js +1 -1
  26. package/build/js/check/ui/atoms/BarcodeCheckInfoAnnotationBodyComponent.js +1 -1
  27. package/build/js/check/ui/atoms/private/Backdrop.d.ts +1 -1
  28. package/build/js/check/ui/atoms/private/Backdrop.js +1 -1
  29. package/build/js/check/ui/atoms/private/BarcodeStatusIconContainer.js +1 -1
  30. package/build/js/check/ui/organisms/BarcodeCheckCircleHighlight.d.ts +3 -0
  31. package/build/js/check/ui/organisms/BarcodeCheckCircleHighlight.js +1 -1
  32. package/build/js/check/ui/organisms/BarcodeCheckInfoAnnotation.js +1 -1
  33. package/build/js/check/ui/organisms/BarcodeCheckPopoverAnnotation.js +1 -1
  34. package/build/js/check/ui/organisms/BarcodeCheckPopoverAnnotationButton.js +1 -1
  35. package/build/js/check/ui/organisms/BarcodeCheckStatusIconAnnotation.js +1 -1
  36. package/build/js/check/ui/organisms/private/CheckLayout.js +1 -1
  37. package/build/js/chunks/chunk-2FBL4IXV.js +1 -0
  38. package/build/js/chunks/{chunk-AU5BUV3N.js → chunk-3V5ISRFO.js} +1 -1
  39. package/build/js/chunks/chunk-4JEIREAU.js +1 -0
  40. package/build/js/chunks/chunk-4XFE7YMP.js +1 -0
  41. package/build/js/chunks/{chunk-QPUY23QD.js → chunk-5N7ZBGWC.js} +1 -1
  42. package/build/js/chunks/{chunk-FYHMFCYX.js → chunk-7JOXKPVL.js} +1 -1
  43. package/build/js/chunks/{chunk-YPGRTA4N.js → chunk-A6EZQ6R7.js} +1 -1
  44. package/build/js/chunks/chunk-A74KUZAS.js +1 -0
  45. package/build/js/chunks/chunk-AOU52W7O.js +1 -0
  46. package/build/js/chunks/{chunk-BDMG75S4.js → chunk-BQT57FBO.js} +1 -1
  47. package/build/js/chunks/chunk-BRFFJHOE.js +1 -0
  48. package/build/js/chunks/{chunk-PFYODZHW.js → chunk-BZ7BYARP.js} +1 -1
  49. package/build/js/chunks/chunk-C5GWADSL.js +1 -0
  50. package/build/js/chunks/chunk-D5WE7BQR.js +1 -0
  51. package/build/js/chunks/{chunk-HQL4OJUZ.js → chunk-DFIOIHPG.js} +1 -1
  52. package/build/js/chunks/chunk-DOA2Q3CZ.js +344 -0
  53. package/build/js/chunks/{chunk-W3YHPFLY.js → chunk-DOA33NUL.js} +1 -1
  54. package/build/js/chunks/chunk-DQT257RV.js +2 -0
  55. package/build/js/chunks/{chunk-CGGRMJUB.js → chunk-EI32ILEP.js} +1 -1
  56. package/build/js/chunks/{chunk-44HCLNRQ.js → chunk-EI4V2NZN.js} +1 -1
  57. package/build/js/chunks/chunk-EVBEQBF5.js +2 -0
  58. package/build/js/chunks/chunk-GHWLRMU5.js +1 -0
  59. package/build/js/chunks/{chunk-W7TZ36EI.js → chunk-GOGBXJU7.js} +1 -1
  60. package/build/js/chunks/chunk-GTHRQWPV.js +1 -0
  61. package/build/js/chunks/{chunk-FLTJ6FPP.js → chunk-H5VEANGI.js} +1 -1
  62. package/build/js/chunks/{chunk-7YWUYXR2.js → chunk-HFF47NXN.js} +1 -1
  63. package/build/js/chunks/{chunk-R2D7ULOM.js → chunk-HL6L6Q2I.js} +1 -1
  64. package/build/js/chunks/{chunk-Q6IBYUJQ.js → chunk-HWV5BPFU.js} +1 -1
  65. package/build/js/chunks/{chunk-7AIAIG5T.js → chunk-IVXQPFCR.js} +1 -1
  66. package/build/js/chunks/{chunk-GKYQONEA.js → chunk-J3CJTTKO.js} +1 -1
  67. package/build/js/chunks/{chunk-FCUTPMMU.js → chunk-JKO4EZPZ.js} +1 -1
  68. package/build/js/chunks/{chunk-Q6DVAVA5.js → chunk-KFQQXIWI.js} +1 -1
  69. package/build/js/chunks/{chunk-ATSBKHNK.js → chunk-KJJNY6TE.js} +1 -1
  70. package/build/js/chunks/chunk-L6RFD252.js +1 -0
  71. package/build/js/chunks/{chunk-OGDQ76GD.js → chunk-LFI7LFDQ.js} +1 -1
  72. package/build/js/chunks/{chunk-Z53C3VA7.js → chunk-MFWUTWZR.js} +1 -1
  73. package/build/js/chunks/{chunk-TCMZMAI3.js → chunk-NAQF3FE4.js} +1 -1
  74. package/build/js/chunks/chunk-OEYNGWOX.js +1 -0
  75. package/build/js/chunks/{chunk-UIE2K36Z.js → chunk-PJRNZPHO.js} +1 -1
  76. package/build/js/chunks/{chunk-6IUKFY3D.js → chunk-PTOM2RHF.js} +1 -1
  77. package/build/js/chunks/chunk-QE4R77EM.js +1 -0
  78. package/build/js/chunks/{chunk-FUS5WQC4.js → chunk-RKKRIK37.js} +1 -1
  79. package/build/js/chunks/{chunk-N7VOTJDF.js → chunk-RSGR6DP3.js} +1 -1
  80. package/build/js/chunks/{chunk-YAFD2FYD.js → chunk-RXYSNBJM.js} +1 -1
  81. package/build/js/chunks/{chunk-EZI7OJEV.js → chunk-S4DXFXOU.js} +1 -1
  82. package/build/js/chunks/{chunk-QKAIJQPA.js → chunk-SN5VMVMZ.js} +1 -1
  83. package/build/js/chunks/{chunk-G3LSLZYT.js → chunk-T44XGPSD.js} +1 -1
  84. package/build/js/chunks/chunk-UYTEE4UD.js +1 -0
  85. package/build/js/chunks/{chunk-FRG4ACMI.js → chunk-VIFEECK7.js} +1 -1
  86. package/build/js/chunks/{chunk-ZY3JZELC.js → chunk-WXMPKNQ2.js} +1 -1
  87. package/build/js/chunks/{chunk-K4MHNZXA.js → chunk-XSJEGOGN.js} +2 -2
  88. package/build/js/chunks/chunk-XXN5AMBG.js +211 -0
  89. package/build/js/chunks/chunk-YO7QRAX6.js +1 -0
  90. package/build/js/chunks/chunk-YQNNEW67.js +117 -0
  91. package/build/js/find/BarcodeFind.js +1 -1
  92. package/build/js/find/BarcodeFindFeedback.js +1 -1
  93. package/build/js/find/BarcodeFindPresenter.d.ts +1 -1
  94. package/build/js/find/BarcodeFindPresenter.js +1 -1
  95. package/build/js/find/BarcodeFindSession.js +1 -1
  96. package/build/js/find/BarcodeFindSettings.js +1 -1
  97. package/build/js/find/BarcodeFindView.js +1 -1
  98. package/build/js/find/index.js +1 -1
  99. package/build/js/find/ui/atoms/Card.js +1 -1
  100. package/build/js/find/ui/atoms/CardList.js +1 -1
  101. package/build/js/find/ui/atoms/CardListButton.js +1 -1
  102. package/build/js/find/ui/atoms/Dot.js +1 -1
  103. package/build/js/find/ui/atoms/ExitSvgIcon.js +1 -1
  104. package/build/js/find/ui/atoms/ItemFoundSvgIcon.js +1 -1
  105. package/build/js/find/ui/atoms/TorchOffSvgIcon.js +1 -1
  106. package/build/js/find/ui/atoms/TorchOnSvgIcon.js +1 -1
  107. package/build/js/find/ui/molecules/CardListContainer.js +1 -1
  108. package/build/js/find/ui/molecules/ProgressBarWithLabel.js +1 -1
  109. package/build/js/find/ui/molecules/TorchIconButton.d.ts +1 -1
  110. package/build/js/find/ui/molecules/TorchIconButton.js +1 -1
  111. package/build/js/find/ui/organisms/FindLayout.js +1 -1
  112. package/build/js/index.d.ts +2 -2
  113. package/build/js/index.js +1 -1
  114. package/build/js/moduleLoader.js +1 -1
  115. package/build/js/spark/SparkScan.js +1 -1
  116. package/build/js/spark/SparkScanBarcodeFeedback.js +1 -1
  117. package/build/js/spark/SparkScanOverlay.js +1 -1
  118. package/build/js/spark/SparkScanSettings.js +1 -1
  119. package/build/js/spark/SparkScanTargetAimerViewfinder.js +1 -1
  120. package/build/js/spark/index.d.ts +1 -1
  121. package/build/js/spark/index.js +1 -1
  122. package/build/js/spark/ui/SparkScanView.d.ts +1 -1
  123. package/build/js/spark/ui/SparkScanView.js +1 -1
  124. package/build/js/spark/ui/SparkScanViewFeedbackManager.js +1 -1
  125. package/build/js/spark/ui/SparkScanViewIcon.d.ts +1 -0
  126. package/build/js/spark/ui/SparkScanViewIcon.js +1 -1
  127. package/build/js/spark/ui/SparkScanViewMiniPreview.js +1 -1
  128. package/build/js/spark/ui/SparkScanViewPresenter.d.ts +2 -1
  129. package/build/js/spark/ui/SparkScanViewPresenter.js +1 -1
  130. package/build/js/spark/ui/SparkScanViewSettings.js +1 -1
  131. package/build/js/spark/ui/SparkScanViewToast.js +1 -1
  132. package/build/js/spark/ui/SparkScanViewToolbar.d.ts +9 -3
  133. package/build/js/spark/ui/SparkScanViewToolbar.js +1 -1
  134. package/build/js/spark/ui/SparkScanViewTriggerButton.js +1 -1
  135. package/build/js/spark/ui/SparkScanViewUiListener.d.ts +1 -1
  136. package/build/js/spark/ui/SparkScanViewVisualFeedback.js +1 -1
  137. package/build/js/spark/ui/constants/attributes.d.ts +2 -1
  138. package/build/js/spark/ui/constants/attributes.js +1 -1
  139. package/build/js/spark/ui/index.d.ts +1 -1
  140. package/build/js/spark/ui/index.js +1 -1
  141. package/build/js/worker/BarcodeBatchMode.d.ts +1 -1
  142. package/build/js/worker/BarcodeCaptureMode.d.ts +1 -1
  143. package/build/js/worker/BarcodeCaptureWorkerManager.d.ts +1 -1
  144. package/build/js/worker/BarcodeCaptureWorkerManager.js +1 -1
  145. package/build/js/worker/BarcodeCheckMode.d.ts +1 -1
  146. package/build/js/worker/BarcodeCheckMode.js +1 -1
  147. package/build/js/worker/BarcodeFindMode.d.ts +1 -1
  148. package/build/js/worker/BarcodeFindMode.js +1 -1
  149. package/build/js/worker/PropertyPushSource.d.ts +1 -1
  150. package/build/js/worker/SparkScanMode.d.ts +1 -1
  151. package/build/js/worker/WorkerMain.d.ts +1 -1
  152. package/build/js/worker/WorkerMain.js +1 -1
  153. package/build/js/worker/dataCapture.inlineWorker.d.ts +1 -1
  154. package/build/js/worker/dataCapture.inlineWorker.js +1 -1
  155. package/build/js/worker/dataCaptureEngine.d.ts +1 -1
  156. package/build/js/worker/dataCaptureEngine.js +1 -1
  157. package/build/js/worker/dataCaptureWorkerRelated.d.ts +1 -1
  158. package/build/js/worker/index.d.ts +1 -1
  159. package/package.json +3 -12
  160. package/sdc-lib/resources/models/barcode_classification_default_model.b90ecc5d362d6cb82801c877fdde7c3e64b6b5ef.model +0 -0
  161. package/sdc-lib/resources/models/barcode_localization_generic_postal_code_default_model.4c1ba34eafc0f30fbafdd458c6eed156bd3b3498.model +0 -0
  162. package/sdc-lib/resources/models/barcode_semantics_ocr_detector_default_model.e440ae4acaf7c7a2f42814ddc46c0920423eb372.model +0 -0
  163. package/sdc-lib/resources/models/ocr_barcode_semantics_default_model.4df1cd250f2d31a69eecb30466b7823bbdd06730.model +0 -0
  164. package/sdc-lib/scandit-datacapture-sdk-barcode-pthreads.js +1 -1
  165. package/sdc-lib/scandit-datacapture-sdk-barcode-pthreads.wasm +0 -0
  166. package/sdc-lib/scandit-datacapture-sdk-barcode-simd-pthreads.js +1 -1
  167. package/sdc-lib/scandit-datacapture-sdk-barcode-simd-pthreads.wasm +0 -0
  168. package/sdc-lib/scandit-datacapture-sdk-barcode-simd.js +1 -1
  169. package/sdc-lib/scandit-datacapture-sdk-barcode-simd.wasm +0 -0
  170. package/sdc-lib/scandit-datacapture-sdk-barcode.js +1 -1
  171. package/sdc-lib/scandit-datacapture-sdk-barcode.wasm +0 -0
  172. package/build/js/chunks/chunk-3C4HMC5F.js +0 -1
  173. package/build/js/chunks/chunk-3I3FVXFK.js +0 -1
  174. package/build/js/chunks/chunk-45ESK6RO.js +0 -1
  175. package/build/js/chunks/chunk-BGXJMGXV.js +0 -2
  176. package/build/js/chunks/chunk-DTO5ICFV.js +0 -246
  177. package/build/js/chunks/chunk-EB3IYU5V.js +0 -1
  178. package/build/js/chunks/chunk-ENVM4L4Z.js +0 -2
  179. package/build/js/chunks/chunk-HDKZXP5Y.js +0 -1
  180. package/build/js/chunks/chunk-HDL4B7UY.js +0 -211
  181. package/build/js/chunks/chunk-HNWVLPRV.js +0 -1
  182. package/build/js/chunks/chunk-HRHBXIPB.js +0 -1
  183. package/build/js/chunks/chunk-KALGMDTS.js +0 -88
  184. package/build/js/chunks/chunk-KBO3YYBN.js +0 -1
  185. package/build/js/chunks/chunk-NTBYC47J.js +0 -1
  186. package/build/js/chunks/chunk-PL47B3H5.js +0 -1
  187. package/build/js/chunks/chunk-QQUMOT3B.js +0 -1
  188. package/build/js/chunks/chunk-TBXQSBKX.js +0 -1
  189. package/build/js/chunks/chunk-WMUD7V77.js +0 -1
  190. package/build/js/chunks/chunk-WTBGDD52.js +0 -2
  191. package/build/js/chunks/chunk-XFGU5IHR.js +0 -1
  192. package/build/js/chunks/chunk-Y5ZY6264.js +0 -1
  193. package/build/js/chunks/chunk-Y6DC25EF.js +0 -1
  194. package/build/js/chunks/chunk-YLCNLTYD.js +0 -1
  195. package/build/js/private/symbols.d.ts +0 -6
  196. package/build/js/private/symbols.js +0 -1
  197. package/build/js/private/utils/trackedBarcodeViewUtils.d.ts +0 -14
  198. package/build/js/private/utils/trackedBarcodeViewUtils.js +0 -1
  199. package/build/js/private/warnMultithreadingUnavailable.d.ts +0 -3
  200. package/build/js/private/warnMultithreadingUnavailable.js +0 -1
  201. package/sdc-lib/resources/models/barcode_classification_default_model.0e0f78dcf2b31abc9b4fc5c1b7c5cb342a7d5e63.model +0 -0
  202. package/sdc-lib/resources/models/barcode_localization_french_post_default_model.8843b5d5d2eb71ebeab43204fbb9574c76f94fe7.model +0 -0
  203. package/sdc-lib/resources/models/barcode_localization_generic_postal_code_default_model.48b44ea31495024d80a11e1ca3ecde3d958eaf2d.model +0 -0
  204. package/sdc-lib/resources/models/barcode_localization_upu_enhanced_orange.da67055d9aa866fe157514a4d55c2c504ec68306.model +0 -0
  205. /package/build/js/chunks/{chunk-LXROKZUG.js → chunk-43WBSXOM.js} +0 -0
  206. /package/build/js/chunks/{chunk-QPNMXE7H.js → chunk-5GGUCEGU.js} +0 -0
  207. /package/build/js/chunks/{chunk-X5Z57UUL.js → chunk-65DU26S5.js} +0 -0
  208. /package/build/js/chunks/{chunk-K3EIYQPY.js → chunk-7J6MRLL2.js} +0 -0
  209. /package/build/js/chunks/{chunk-NSBGJLIO.js → chunk-7O2NHA3I.js} +0 -0
  210. /package/build/js/chunks/{chunk-BTW5QIG7.js → chunk-BDRKVLLV.js} +0 -0
  211. /package/build/js/chunks/{chunk-MSQTG4HE.js → chunk-CONYPETL.js} +0 -0
  212. /package/build/js/chunks/{chunk-TBCQMBEE.js → chunk-DORFGC2X.js} +0 -0
  213. /package/build/js/chunks/{chunk-OXLBBRZT.js → chunk-QJOHE5A3.js} +0 -0
  214. /package/build/js/chunks/{chunk-WBSINSMA.js → chunk-SEJXDETX.js} +0 -0
  215. /package/build/js/chunks/{chunk-FOZL6AM4.js → chunk-UHJ3O2ZT.js} +0 -0
  216. /package/build/js/chunks/{chunk-B6TRFCTV.js → chunk-UOZAN2H7.js} +0 -0
  217. /package/build/js/chunks/{chunk-X2U6LCRU.js → chunk-WRTJHOS5.js} +0 -0
  218. /package/build/js/chunks/{chunk-ADMKAYF6.js → chunk-XLC2JHJV.js} +0 -0
  219. /package/build/js/chunks/{chunk-ZDBP2TPZ.js → chunk-XY65BTLP.js} +0 -0
  220. /package/build/js/chunks/{chunk-VI6FIL4E.js → chunk-YH5IBNOK.js} +0 -0
  221. /package/build/js/chunks/{chunk-7TXFJMMW.js → chunk-YWCXI7D5.js} +0 -0
@@ -2,4 +2,4 @@ import {Color}from'@scandit/web-datacapture-core';import {gray900}from'@scandit/
2
2
  <slot name="left-barcode-icon"></slot>
3
3
  <div class="text"></div>
4
4
  <slot name="right-barcode-icon"></slot>
5
- </div>`,t.append(n.createStyleElement().cloneNode(!0)),this.textElement=t.querySelector(".text");}set rightIcon(t){var o;let e=(o=this.shadowRoot)==null?void 0:o.querySelector("[slot='right-barcode-icon']");(e==null?void 0:e.assignedSlot)!==t&&(e&&t==null&&e.remove(),t&&(t.slot="right-barcode-icon",this.append(t)));}get rightIcon(){var t,e,o;return ((o=(e=(t=this.shadowRoot)==null?void 0:t.querySelector("slot[name='right-barcode-icon']"))==null?void 0:e.assignedElements())!=null?o:[])[0]}set leftIcon(t){var o;let e=(o=this.shadowRoot)==null?void 0:o.querySelector("[slot='left-barcode-icon']");(e==null?void 0:e.assignedSlot)!==t&&(e&&t==null&&e.remove(),t&&(t.slot="left-barcode-icon",this.append(t)));}get leftIcon(){var t,e,o;return ((o=(e=(t=this.shadowRoot)==null?void 0:t.querySelector("slot[name='left-barcode-icon']"))==null?void 0:e.assignedElements())!=null?o:[])[0]}get text(){var t;return (t=this.textElement.textContent)!=null?t:""}set text(t){this.textElement.textContent=t;}get textSize(){return Number.parseInt(this.style.getPropertyValue("--text-size"),10)}set textSize(t){this.style.setProperty("--text-size",`${t}px`);}get textAlignment(){return this.textElement.style.textAlign===""?"start":this.textElement.style.textAlign}set textAlignment(t){this.textElement.style.textAlign=t;}get textColor(){let t=this.style.getPropertyValue("--text-color");return t===""?Color.fromRGBA(0,0,0,1):Color.fromHex(t)}set textColor(t){this.style.setProperty("--text-color",`#${t.toJSON()}`);}static create(){return n.register(),document.createElement(n.tag)}static register(){defineCustomElements({[n.tag]:n});}static createStyleElement(){return css`:host{--text-color:#${gray900.toJSON()};--text-size:14px}.container{align-items:center;display:flex;font-size:var(--text-size);gap:.75rem;padding:1rem 1rem 0}.text{color:var(--text-color);text-align:center}`}};n.tag="scandit-check-info-annotation-body";var l=n;export{l as a};
5
+ </div>`,t.append(n.createStyleElement().cloneNode(!0)),this.textElement=t.querySelector(".text");}set rightIcon(t){var o;let e=(o=this.shadowRoot)==null?void 0:o.querySelector("[slot='right-barcode-icon']");(e==null?void 0:e.assignedSlot)!==t&&(e&&t==null&&e.remove(),t&&(t.slot="right-barcode-icon",this.append(t)));}get rightIcon(){var t,e,o;return ((o=(e=(t=this.shadowRoot)==null?void 0:t.querySelector("slot[name='right-barcode-icon']"))==null?void 0:e.assignedElements())!=null?o:[])[0]}set leftIcon(t){var o;let e=(o=this.shadowRoot)==null?void 0:o.querySelector("[slot='left-barcode-icon']");(e==null?void 0:e.assignedSlot)!==t&&(e&&t==null&&e.remove(),t&&(t.slot="left-barcode-icon",this.append(t)));}get leftIcon(){var t,e,o;return ((o=(e=(t=this.shadowRoot)==null?void 0:t.querySelector("slot[name='left-barcode-icon']"))==null?void 0:e.assignedElements())!=null?o:[])[0]}get text(){var t;return (t=this.textElement.textContent)!=null?t:""}set text(t){this.textElement.textContent=t;}get textSize(){return Number.parseInt(this.style.getPropertyValue("--text-size"),10)}set textSize(t){this.style.setProperty("--text-size",`${t}px`);}get textAlignment(){return this.textElement.style.textAlign===""?"start":this.textElement.style.textAlign}set textAlignment(t){this.textElement.style.textAlign=t;}get textColor(){let t=this.style.getPropertyValue("--text-color");return t===""?Color.fromRGBA(0,0,0,1):Color.fromHex(t)}set textColor(t){this.style.setProperty("--text-color",`#${t.toJSON()}`);}static create(){return n.register(),document.createElement(n.tag)}static register(){defineCustomElements({[n.tag]:n});}static createStyleElement(){return css`:host{--text-color:#${gray900.toJSON()};--text-size:14px}.container{align-items:center;display:flex;font-size:var(--text-size);gap:.75rem;justify-content:center;padding:1rem 1rem 0}.text{color:var(--text-color);text-align:center}`}};n.tag="scandit-check-info-annotation-body";var l=n;export{l as a};
@@ -1 +1 @@
1
- import {a}from'./chunk-OXLBBRZT.js';import {ScanditHTMLElement,html,defineCustomElements,css,waitTransitionEndForElement}from'@scandit/web-datacapture-core/build/js/private/utils/index.js';var l="--position",w=(a=>(a.Collapsed="collapsed",a.WillCollapse="willcollapse",a.Expanded="expanded",a.WillExpand="willexpand",a.Tap="cardtap",a))(w||{}),y="cubic-bezier(0.4, 0, 0.2, 1)",s=class s extends ScanditHTMLElement{constructor(){super();this.onCardClickHandler=this.onCardClick.bind(this);this.updateFadeMaskHandler=this.updateFadeMask.bind(this);let t=this.attachShadow({mode:"open"});t.prepend(s.createStyleElement().cloneNode(!0));let e=document.createElement("div");if(e.role="list",e.id="root",e.innerHTML=html`<slot></slot>`,t.append(e),!CSS.supports("mask-image","linear-gradient(black, white)")){let o=document.createElement("div");o.innerHTML='<div class="fade top"></div><div class="fade bottom"></div>',o.classList.add("fade-layer"),t.prepend(o);}}set collapsed(t){if(!t){this.removeAttribute("collapsed");return}this.setAttribute("collapsed",t.toString());}get collapsed(){return !!this.getAttribute("collapsed")}get items(){return this.querySelectorAll(a.tag)}get root(){var t;return (t=this.shadowRoot)==null?void 0:t.querySelector("#root")}static create(){return document.createElement(s.tag)}static register(){defineCustomElements({[s.tag]:s});}static createStyleElement(){return css`:host{--top-offset:0rem;--list-height:600px;--animation-function:${y};--max-expanded-height:calc(var(--list-height) - var(--top-offset));--max-collapsed-height:115px;-webkit-tap-highlight-color:transparent;position:relative;width:100%}:host #root{cursor:pointer;display:block;height:calc(var(--max-expanded-height));mask-image:linear-gradient(to bottom,transparent 0,#000 var(--end-top-mask,0),#000 var(--start-bottom-mask,95%),transparent 100%);overflow-y:auto;scroll-behavior:smooth;scrollbar-width:none;transform-style:preserve-3d;transition:height .6s var(--animation-function);-webkit-overflow-scrolling:touch;-ms-overflow-style:none}:host .fade-layer{height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%;z-index:1}:host([collapsed]) .fade-layer div.fade{opacity:0!important}:host .fade-layer div.fade{height:64px;opacity:0;position:absolute;width:100%;z-index:1}:host .fade-layer div.fade.top{background:linear-gradient(180deg,rgba(0,0,0,.45),transparent);top:0}:host .fade-layer div.fade.bottom{background:linear-gradient(0deg,rgba(0,0,0,.45),transparent);bottom:0}:host #root::-webkit-scrollbar{display:none}:host([collapsed]) #root{height:var(--max-collapsed-height);mask:none;overflow:hidden}::slotted(${a.tag}){--position:0;--animation-duration:0.5s;--margin-bottom:calc(0.5rem*var(--position));--translate-y-value:calc(var(--position)*100% + var(--margin-bottom));--scale:1;opacity:1;position:absolute;transform:translateY(var(--translate-y-value)) scale(var(--scale));transition:transform var(--animation-duration) var(--animation-function),opacity var(--animation-duration) var(--animation-function);width:100%;will-change:transform,opacity;z-index:calc(var(--position)*-1)}:host([collapsed]) ::slotted(${a.tag}){--translate-y-value:calc(var(--position)*10%);--scale:calc(1 - var(--position)*0.05);opacity:1}:host([collapsed]) ::slotted(${a.tag}:nth-child(3)){opacity:.5}:host([collapsed]) ::slotted(${a.tag}:nth-child(n+4)){opacity:0}`}connectedCallback(){var t;this.addEventListener("click",this.onCardClickHandler),(t=this.root)==null||t.addEventListener("scroll",this.updateFadeMaskHandler),this.updateFadeMaskHandler();}disconnectedCallback(){var t;this.removeEventListener("click",this.onCardClickHandler),(t=this.root)==null||t.removeEventListener("scroll",this.updateFadeMaskHandler);}attributeChangedCallback(t,e,o){t==="collapsed"&&(this.hasAttribute("collapsed")?this.collapse():this.expand());}renderCards(t){let e=document.createDocumentFragment();for(let[o,a]of Object.entries(t))a.dataset.position=`${o}`,a.style.setProperty(l,o.toString()),e.append(a);this.append(e);}clearCards(){for(let t of this.querySelectorAll(a.tag))t.remove();}async unshift(t){if(t.dataset.position==="0"&&t.style.getPropertyValue(l)==="0")return;let e=new Animation(new KeyframeEffect(t,[{transform:"translateY(-100%)",scale:1.05,opacity:0},{transform:"translateY(0%)",scale:1,opacity:1}],{duration:500,easing:y}));t.remove(),t.dataset.position="0",t.style.setProperty(l,"0");let o="0";for(let[a,r]of Object.entries(this.items))o=`${Number(a)+1}`,r.dataset.position=o,r.style.setProperty(l,o);this.prepend(t),e.play(),await e.finished;}onCardClick(t){this.dispatchEvent(new CustomEvent("cardtap",{detail:{card:t.target}}));}updateFadeMask(t){var h,m,v,u,f;let{scrollTop:e=0,scrollHeight:o=0,clientHeight:a=0}=(h=t==null?void 0:t.target)!=null?h:this.root,r=o-a,i=Math.round(e/r*100);if(Number.isNaN(i))return;(m=this.root)==null||m.style.setProperty("--end-top-mask",`${Math.min(i,5)}%`),(v=this.root)==null||v.style.setProperty("--start-bottom-mask",`${Math.max(i,95)}%`);let c=(u=this.shadowRoot)==null?void 0:u.querySelector(".fade.top"),p=(f=this.shadowRoot)==null?void 0:f.querySelector(".fade.bottom");c!=null&&p!=null&&(c.style.setProperty("opacity",`${i/100}`),p.style.setProperty("opacity",`${1-i/100}`));}async toggle(t){var a;let e=[];t==="collapsed"&&((a=this.root)==null||a.scrollTo({behavior:"instant",top:0}));let o={collapsed:"willcollapse",expanded:"willexpand"}[t];this.dispatchEvent(new CustomEvent(o));for(let[r,i]of Object.entries(this.items))Number(r)!==0&&e.push(waitTransitionEndForElement(i)),t==="expanded"&&i.style.removeProperty("opacity"),i.style.setProperty(l,r);await Promise.all(e),this.dispatchEvent(new CustomEvent(t)),this.updateFadeMaskHandler();}async expand(){await this.toggle("expanded");}async collapse(){await this.toggle("collapsed");}};s.tag="scandit-find-card-list",s.observedAttributes=["collapsed"];var d=s;d.register();export{w as a,d as b};
1
+ import {a}from'./chunk-QJOHE5A3.js';import {ScanditHTMLElement,html,defineCustomElements,css,waitTransitionEndForElement}from'@scandit/web-datacapture-core/build/js/private/utils/index.js';var l="--position",w=(a=>(a.Collapsed="collapsed",a.WillCollapse="willcollapse",a.Expanded="expanded",a.WillExpand="willexpand",a.Tap="cardtap",a))(w||{}),y="cubic-bezier(0.4, 0, 0.2, 1)",s=class s extends ScanditHTMLElement{constructor(){super();this.onCardClickHandler=this.onCardClick.bind(this);this.updateFadeMaskHandler=this.updateFadeMask.bind(this);let t=this.attachShadow({mode:"open"});t.prepend(s.createStyleElement().cloneNode(!0));let e=document.createElement("div");if(e.role="list",e.id="root",e.innerHTML=html`<slot></slot>`,t.append(e),!CSS.supports("mask-image","linear-gradient(black, white)")){let o=document.createElement("div");o.innerHTML='<div class="fade top"></div><div class="fade bottom"></div>',o.classList.add("fade-layer"),t.prepend(o);}}set collapsed(t){if(!t){this.removeAttribute("collapsed");return}this.setAttribute("collapsed",t.toString());}get collapsed(){return !!this.getAttribute("collapsed")}get items(){return this.querySelectorAll(a.tag)}get root(){var t;return (t=this.shadowRoot)==null?void 0:t.querySelector("#root")}static create(){return document.createElement(s.tag)}static register(){defineCustomElements({[s.tag]:s});}static createStyleElement(){return css`:host{--top-offset:0rem;--list-height:600px;--animation-function:${y};--max-expanded-height:calc(var(--list-height) - var(--top-offset));--max-collapsed-height:115px;-webkit-tap-highlight-color:transparent;position:relative;width:100%}:host #root{cursor:pointer;display:block;height:calc(var(--max-expanded-height));mask-image:linear-gradient(to bottom,transparent 0,#000 var(--end-top-mask,0),#000 var(--start-bottom-mask,95%),transparent 100%);overflow-y:auto;scroll-behavior:smooth;scrollbar-width:none;transform-style:preserve-3d;transition:height .6s var(--animation-function);-webkit-overflow-scrolling:touch;-ms-overflow-style:none}:host .fade-layer{height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%;z-index:1}:host([collapsed]) .fade-layer div.fade{opacity:0!important}:host .fade-layer div.fade{height:64px;opacity:0;position:absolute;width:100%;z-index:1}:host .fade-layer div.fade.top{background:linear-gradient(180deg,rgba(0,0,0,.45),transparent);top:0}:host .fade-layer div.fade.bottom{background:linear-gradient(0deg,rgba(0,0,0,.45),transparent);bottom:0}:host #root::-webkit-scrollbar{display:none}:host([collapsed]) #root{height:var(--max-collapsed-height);mask:none;overflow:hidden}::slotted(${a.tag}){--position:0;--animation-duration:0.5s;--margin-bottom:calc(0.5rem*var(--position));--translate-y-value:calc(var(--position)*100% + var(--margin-bottom));--scale:1;opacity:1;position:absolute;transform:translateY(var(--translate-y-value)) scale(var(--scale));transition:transform var(--animation-duration) var(--animation-function),opacity var(--animation-duration) var(--animation-function);width:100%;will-change:transform,opacity;z-index:calc(var(--position)*-1)}:host([collapsed]) ::slotted(${a.tag}){--translate-y-value:calc(var(--position)*10%);--scale:calc(1 - var(--position)*0.05);opacity:1}:host([collapsed]) ::slotted(${a.tag}:nth-child(3)){opacity:.5}:host([collapsed]) ::slotted(${a.tag}:nth-child(n+4)){opacity:0}`}connectedCallback(){var t;this.addEventListener("click",this.onCardClickHandler),(t=this.root)==null||t.addEventListener("scroll",this.updateFadeMaskHandler),this.updateFadeMaskHandler();}disconnectedCallback(){var t;this.removeEventListener("click",this.onCardClickHandler),(t=this.root)==null||t.removeEventListener("scroll",this.updateFadeMaskHandler);}attributeChangedCallback(t,e,o){t==="collapsed"&&(this.hasAttribute("collapsed")?this.collapse():this.expand());}renderCards(t){let e=document.createDocumentFragment();for(let[o,a]of Object.entries(t))a.dataset.position=`${o}`,a.style.setProperty(l,o.toString()),e.append(a);this.append(e);}clearCards(){for(let t of this.querySelectorAll(a.tag))t.remove();}async unshift(t){if(t.dataset.position==="0"&&t.style.getPropertyValue(l)==="0")return;let e=new Animation(new KeyframeEffect(t,[{transform:"translateY(-100%)",scale:1.05,opacity:0},{transform:"translateY(0%)",scale:1,opacity:1}],{duration:500,easing:y}));t.remove(),t.dataset.position="0",t.style.setProperty(l,"0");let o="0";for(let[a,r]of Object.entries(this.items))o=`${Number(a)+1}`,r.dataset.position=o,r.style.setProperty(l,o);this.prepend(t),e.play(),await e.finished;}onCardClick(t){this.dispatchEvent(new CustomEvent("cardtap",{detail:{card:t.target}}));}updateFadeMask(t){var h,m,v,u,f;let{scrollTop:e=0,scrollHeight:o=0,clientHeight:a=0}=(h=t==null?void 0:t.target)!=null?h:this.root,r=o-a,i=Math.round(e/r*100);if(Number.isNaN(i))return;(m=this.root)==null||m.style.setProperty("--end-top-mask",`${Math.min(i,5)}%`),(v=this.root)==null||v.style.setProperty("--start-bottom-mask",`${Math.max(i,95)}%`);let c=(u=this.shadowRoot)==null?void 0:u.querySelector(".fade.top"),p=(f=this.shadowRoot)==null?void 0:f.querySelector(".fade.bottom");c!=null&&p!=null&&(c.style.setProperty("opacity",`${i/100}`),p.style.setProperty("opacity",`${1-i/100}`));}async toggle(t){var a;let e=[];t==="collapsed"&&((a=this.root)==null||a.scrollTo({behavior:"instant",top:0}));let o={collapsed:"willcollapse",expanded:"willexpand"}[t];this.dispatchEvent(new CustomEvent(o));for(let[r,i]of Object.entries(this.items))Number(r)!==0&&e.push(waitTransitionEndForElement(i)),t==="expanded"&&i.style.removeProperty("opacity"),i.style.setProperty(l,r);await Promise.all(e),this.dispatchEvent(new CustomEvent(t)),this.updateFadeMaskHandler();}async expand(){await this.toggle("expanded");}async collapse(){await this.toggle("collapsed");}};s.tag="scandit-find-card-list",s.observedAttributes=["collapsed"];var d=s;d.register();export{w as a,d as b};
@@ -1 +1 @@
1
- import {a as a$4}from'./chunk-FYHMFCYX.js';import {a as a$3}from'./chunk-NSBGJLIO.js';import {a as a$2}from'./chunk-LTNZJEG4.js';import {a as a$1}from'./chunk-2ZSOWJ2F.js';import {a}from'./chunk-WVIC3JWX.js';import {a as a$5}from'./chunk-PL47B3H5.js';import {DataCaptureEngine}from'@scandit/web-datacapture-core/build/js/worker/index.js';var c=class extends DataCaptureEngine{constructor(e,r){super(e,r);}getModeDeserializers(){this.barcodeCaptureMode=new a(this,this.Module,this.workerFunctions),this.barcodeBatchMode=new a$1(this,this.Module,this.workerFunctions),this.sparkScanMode=new a$2(this,this.Module,this.workerFunctions),this.barcodeFindMode=new a$3(this,this.Module,this.workerFunctions),this.barcodeCheckMode=new a$4(this,this.Module,this.workerFunctions);let e=super.getModeDeserializers();return e.push_back(this.barcodeCaptureMode.getCaptureDeserializer()),e.push_back(this.barcodeBatchMode.getBatchDeserializer()),e.push_back(this.sparkScanMode.getSparkScanDeserializer()),e}getWasmSideModuleFileName(){return ""}getWasmCoreFileName(e,r){return r?e?"scandit-datacapture-sdk-barcode-simd-pthreads.wasm":"scandit-datacapture-sdk-barcode-pthreads.wasm":e?"scandit-datacapture-sdk-barcode-simd.wasm":"scandit-datacapture-sdk-barcode.wasm"}getWasmCoreExpectedHash(e,r){return r?e?"cfb47d912a19974393e3daedd7799f3e7b219700dbcf830031770af09ba1a116":"d4fcda637ec2b306040f4f36f487e952c07ba2d3bfad31dc0e2d8445cdd85b02":e?"a1dde610d88a06391a5ac7fb07623d3f21c3a1e9e5510d179e2d4174c24295c0":"db18616364305f303ebab1150a7d02be193fa6529d7d72201daaedbbffdcd95b"}getWasmMetadata(){return a$5}};export{c as a};
1
+ import {a as a$2}from'./chunk-LTNZJEG4.js';import {a as a$1}from'./chunk-2ZSOWJ2F.js';import {a}from'./chunk-WVIC3JWX.js';import {a as a$4}from'./chunk-7JOXKPVL.js';import {a as a$3}from'./chunk-7O2NHA3I.js';import {a as a$5}from'./chunk-A74KUZAS.js';import {DataCaptureEngine}from'@scandit/web-datacapture-core/build/js/worker/index.js';var c=class extends DataCaptureEngine{constructor(e,r){super(e,r);}getModeDeserializers(){this.barcodeCaptureMode=new a(this,this.Module,this.workerFunctions),this.barcodeBatchMode=new a$1(this,this.Module,this.workerFunctions),this.sparkScanMode=new a$2(this,this.Module,this.workerFunctions),this.barcodeFindMode=new a$3(this,this.Module,this.workerFunctions),this.barcodeCheckMode=new a$4(this,this.Module,this.workerFunctions);let e=super.getModeDeserializers();return e.push_back(this.barcodeCaptureMode.getCaptureDeserializer()),e.push_back(this.barcodeBatchMode.getBatchDeserializer()),e.push_back(this.sparkScanMode.getSparkScanDeserializer()),e}getWasmSideModuleFileName(){return ""}getWasmCoreFileName(e,r){return r?e?"scandit-datacapture-sdk-barcode-simd-pthreads.wasm":"scandit-datacapture-sdk-barcode-pthreads.wasm":e?"scandit-datacapture-sdk-barcode-simd.wasm":"scandit-datacapture-sdk-barcode.wasm"}getWasmCoreExpectedHash(e,r){return r?e?"facf5e2c7de2bc472d54eda4d1ac0bcd66034a868287c4419387aecb6dde1e72":"d20e1585baec083b0f1482e6a2d1270be04b46247b76b7ec2ba703f5ab5629d2":e?"c435dd9c37a004a9c4f26828f6be62987148a528f94141edbb435084b253542c":"244ce77050b97c61605faca1c8039bbfa37a476cabe7ab2d47473539d9ff0d18"}getWasmMetadata(){return a$5}};export{c as a};
@@ -1,4 +1,4 @@
1
- import {a}from'./chunk-OHSTP7TM.js';import {a as a$2,b as b$3}from'./chunk-OPL5NVVM.js';import {b as b$1}from'./chunk-FJ4SOETD.js';import {b as b$2}from'./chunk-5DP5VNWQ.js';import {a as a$3}from'./chunk-T2Y2C76P.js';import {e,f as f$1,a as a$1,b as b$4,d,c}from'./chunk-DVHTYKDX.js';import {f}from'./chunk-YBD5JYCX.js';import {Point}from'@scandit/web-datacapture-core';import {ScanditHTMLElement,defineCustomElements}from'@scandit/web-datacapture-core/build/js/private/utils/index.js';var b=class f$2 extends ScanditHTMLElement{constructor(){super(...arguments);this._pointerDownListener=this.onPointerDown.bind(this);this._pointerUpListener=this.onPointerUp.bind(this);this._dragController=new b$1(this);this._longPressController=new b$2(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.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]:f$2}),document.createElement(f)}connectedCallback(){this.append(this.render()),this.addEventListener("pointerdown",this._pointerDownListener),this.addEventListener("pointerup",this._pointerUpListener),this.addEventListener("longpressstart",this._longPressStartListener),this._dragController.connect(),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(){this.removeEventListener("pointerdown",this._pointerDownListener),this.removeEventListener("pointerup",this._pointerUpListener),this.removeEventListener("longpressstart",this._longPressStartListener),this._dragController.disconnect(),this._longPressController.disconnect();}translateTo(t){this._dragController.translateTo(t,!1);}setImage(t){var n;let r=this.querySelector("div");(n=r.firstElementChild)==null||n.remove(),t&&r.append(t);}startPulsating(){var t;(t=this._pulseAnimation)==null||t.play();}stopPulsating(){this._pulseAnimation&&(this._pulseAnimation.cancel(),this._pulseAnimation.currentTime=0);}render(){return a`
1
+ import {a}from'./chunk-OHSTP7TM.js';import {b as b$1}from'./chunk-FJ4SOETD.js';import {b as b$2}from'./chunk-5DP5VNWQ.js';import {a as a$3}from'./chunk-T2Y2C76P.js';import {a as a$2,b as b$3}from'./chunk-OPL5NVVM.js';import {e,f as f$1,a as a$1,b as b$4,d,c}from'./chunk-DVHTYKDX.js';import {f}from'./chunk-YBD5JYCX.js';import {Point}from'@scandit/web-datacapture-core';import {ScanditHTMLElement,defineCustomElements}from'@scandit/web-datacapture-core/build/js/private/utils/index.js';var b=class f$2 extends ScanditHTMLElement{constructor(){super(...arguments);this._pointerDownListener=this.onPointerDown.bind(this);this._pointerUpListener=this.onPointerUp.bind(this);this._dragController=new b$1(this);this._longPressController=new b$2(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.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]:f$2}),document.createElement(f)}connectedCallback(){this.append(this.render()),this.addEventListener("pointerdown",this._pointerDownListener),this.addEventListener("pointerup",this._pointerUpListener),this.addEventListener("longpressstart",this._longPressStartListener),this._dragController.connect(),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(){this.removeEventListener("pointerdown",this._pointerDownListener),this.removeEventListener("pointerup",this._pointerUpListener),this.removeEventListener("longpressstart",this._longPressStartListener),this._dragController.disconnect(),this._longPressController.disconnect(),this.innerHTML="";}translateTo(t){this._dragController.translateTo(t,!1);}setImage(t){var n;let r=this.querySelector("div");(n=r.firstElementChild)==null||n.remove(),t&&r.append(t);}startPulsating(){var t;(t=this._pulseAnimation)==null||t.play();}stopPulsating(){this._pulseAnimation&&(this._pulseAnimation.cancel(),this._pulseAnimation.currentTime=0);}render(){return a`
2
2
  <div>
3
3
  <div class="pulse"></div>
4
4
  <svg width="49" height="26" viewBox="0 0 49 26" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -1 +1 @@
1
- import {a,b as b$1}from'./chunk-E5OIMFVX.js';import {b}from'./chunk-3I3FVXFK.js';import {Vibration,Feedback,Brush,Color}from'@scandit/web-datacapture-core';var r=class{constructor(e,c){this.visualFeedbackColor=e,this.feedback=c;}static defaultSuccessFeedback(){let e=Vibration.withPattern([300]);return new Feedback(e,a)}static defaultErrorFeedback(){let e=Vibration.withPattern(b.SparkScan.SparkScanFeedback.errorVibrationPattern);return new Feedback(e,b$1)}static defaultSuccessBrush(){return new Brush(Color.fromRGBA(0,0,0,0),Color.fromRGBA(250,250,250,1),3)}static defaultErrorBrush(){return new Brush(Color.fromRGBA(0,0,0,0),Color.fromRGBA(250,68,70,1),1)}static success(){return new u}},k=class extends r{constructor(e,c,a,s,o){super(a!=null?a:Color.fromRGBA(250,68,70,1),o!=null?o:r.defaultErrorFeedback()),this.message=e,this.resumeCapturingDelay=c,this.brush=s!=null?s:r.defaultErrorBrush();}toJSONObject(){return {type:"error",barcodeFeedback:{feedback:this.feedback.toJSONObject(),message:this.message,resumeCapturingDelay:this.resumeCapturingDelay,visualFeedbackColor:this.visualFeedbackColor.toJSON(),brush:this.brush.toJSONObject()}}}},u=class extends r{constructor(e,c,a){super(e!=null?e:Color.fromRGBA(46,193,206,1),a!=null?a:r.defaultSuccessFeedback()),this.brush=c!=null?c:r.defaultSuccessBrush();}toJSONObject(){return {type:"success",barcodeFeedback:{visualFeedbackColor:this.visualFeedbackColor.toJSON(),feedback:this.feedback.toJSONObject(),brush:this.brush.toJSONObject()}}}};export{r as a,k as b,u as c};
1
+ import {a,b as b$1}from'./chunk-E5OIMFVX.js';import {b}from'./chunk-YO7QRAX6.js';import {Vibration,Feedback,Brush,Color}from'@scandit/web-datacapture-core';var r=class{constructor(e,c){this.visualFeedbackColor=e,this.feedback=c;}static defaultSuccessFeedback(){let e=Vibration.withPattern([300]);return new Feedback(e,a)}static defaultErrorFeedback(){let e=Vibration.withPattern(b.SparkScan.SparkScanFeedback.errorVibrationPattern);return new Feedback(e,b$1)}static defaultSuccessBrush(){return new Brush(Color.fromRGBA(0,0,0,0),Color.fromRGBA(250,250,250,1),3)}static defaultErrorBrush(){return new Brush(Color.fromRGBA(0,0,0,0),Color.fromRGBA(250,68,70,1),1)}static success(){return new u}},k=class extends r{constructor(e,c,a,s,o){super(a!=null?a:Color.fromRGBA(250,68,70,1),o!=null?o:r.defaultErrorFeedback()),this.message=e,this.resumeCapturingDelay=c,this.brush=s!=null?s:r.defaultErrorBrush();}toJSONObject(){return {type:"error",barcodeFeedback:{feedback:this.feedback.toJSONObject(),message:this.message,resumeCapturingDelay:this.resumeCapturingDelay,visualFeedbackColor:this.visualFeedbackColor.toJSON(),brush:this.brush.toJSONObject()}}}},u=class extends r{constructor(e,c,a){super(e!=null?e:Color.fromRGBA(46,193,206,1),a!=null?a:r.defaultSuccessFeedback()),this.brush=c!=null?c:r.defaultSuccessBrush();}toJSONObject(){return {type:"success",barcodeFeedback:{visualFeedbackColor:this.visualFeedbackColor.toJSON(),feedback:this.feedback.toJSONObject(),brush:this.brush.toJSONObject()}}}};export{r as a,k as b,u as c};
@@ -1 +1 @@
1
- import {a as a$1}from'./chunk-ADMKAYF6.js';import {a}from'./chunk-WBSINSMA.js';import {Color}from'@scandit/web-datacapture-core';import {ScanditHTMLElement,html,defineCustomElements,css}from'@scandit/web-datacapture-core/build/js/private/utils/index.js';var o=class o extends ScanditHTMLElement{constructor(){super();this.onIcon=void 0;this.offIcon=void 0;let t=this.attachShadow({mode:"open"});t.innerHTML=html`<button><slot></slot></button>`,t.append(o.createStyleElement().cloneNode(!0));}get state(){var t;return (t=this.getAttribute("state"))!=null?t:"off"}set state(t){this.setAttribute("state",t);}static create(){return document.createElement(o.tag)}static register(){defineCustomElements({[o.tag]:o});}static createStyleElement(){return css`:host button{background:none;border:none;display:flex;margin:0;outline:none;padding:0}`}connectedCallback(){let t=Color.fromHex("#FFFFFF");this.onIcon=a.create(),this.offIcon=a$1.create(),this.onIcon.setAttribute("shadow",""),this.offIcon.setAttribute("shadow",""),this.onIcon.size=36,this.offIcon.size=36,this.offIcon.fill=`#${t.withAlpha(.5).toJSON()}`,this.onIcon.fill=`#${t.toJSON()}`;let e="off";(this.getAttribute("state")==="on"||this.getAttribute("state")==="off")&&(e=this.getAttribute("state")),this.state=e;}attributeChangedCallback(t,e,a){t==="state"&&this.render(a);}render(t){t==="on"?(this.offIcon!=null&&this.offIcon.remove(),this.onIcon!=null&&this.append(this.onIcon)):(this.onIcon!=null&&this.onIcon.remove(),this.offIcon!=null&&this.append(this.offIcon));}};o.tag="scandit-find-torch-button",o.observedAttributes=["state"];var n=o;n.register();export{n as a};
1
+ import {a as a$1}from'./chunk-XLC2JHJV.js';import {a}from'./chunk-SEJXDETX.js';import {Color}from'@scandit/web-datacapture-core';import {ScanditHTMLElement,html,defineCustomElements,css}from'@scandit/web-datacapture-core/build/js/private/utils/index.js';var o=class o extends ScanditHTMLElement{constructor(){super();this.onIcon=void 0;this.offIcon=void 0;let t=this.attachShadow({mode:"open"});t.innerHTML=html`<button><slot></slot></button>`,t.append(o.createStyleElement().cloneNode(!0));}get state(){var t;return (t=this.getAttribute("state"))!=null?t:"off"}set state(t){this.setAttribute("state",t);}static create(){return document.createElement(o.tag)}static register(){defineCustomElements({[o.tag]:o});}static createStyleElement(){return css`:host button{background:none;border:none;display:flex;margin:0;outline:none;padding:0}`}connectedCallback(){let t=Color.fromHex("#FFFFFF");this.onIcon=a.create(),this.offIcon=a$1.create(),this.onIcon.setAttribute("shadow",""),this.offIcon.setAttribute("shadow",""),this.onIcon.size=36,this.offIcon.size=36,this.offIcon.fill=`#${t.withAlpha(.5).toJSON()}`,this.onIcon.fill=`#${t.toJSON()}`;let e="off";(this.getAttribute("state")==="on"||this.getAttribute("state")==="off")&&(e=this.getAttribute("state")),this.state=e;}attributeChangedCallback(t,e,a){t==="state"&&this.render(a);}render(t){t==="on"?(this.offIcon!=null&&this.offIcon.remove(),this.onIcon!=null&&this.append(this.onIcon)):(this.onIcon!=null&&this.onIcon.remove(),this.offIcon!=null&&this.append(this.offIcon));}};o.tag="scandit-find-torch-button",o.observedAttributes=["state"];var n=o;n.register();export{n as a};
@@ -1 +1 @@
1
- import {a}from'./chunk-Z53C3VA7.js';import {b}from'./chunk-3I3FVXFK.js';import {Brush}from'@scandit/web-datacapture-core';var s=class o{constructor(){this.type="sparkScan";this._shouldShowScanAreaGuides=!1;this._shouldRemoveLocationsAfterScan=!0;this._shouldDrawViewfinder=!1;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-MFWUTWZR.js';import {b}from'./chunk-YO7QRAX6.js';import {Brush}from'@scandit/web-datacapture-core';var s=class o{constructor(){this.type="sparkScan";this._shouldShowScanAreaGuides=!1;this._shouldRemoveLocationsAfterScan=!0;this._shouldDrawViewfinder=!1;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 +1 @@
1
- import {a}from'./chunk-FOZL6AM4.js';import {a as a$8}from'./chunk-MSQTG4HE.js';import {a as a$5}from'./chunk-BBJPGTUG.js';import {a as a$6}from'./chunk-WL3PKWFT.js';import {c as c$1,b,a as a$9,d}from'./chunk-A2FMQ67Y.js';import {a as a$c}from'./chunk-Y2XISTOT.js';import {a as a$a}from'./chunk-QPUY23QD.js';import {a as a$7}from'./chunk-FCUTPMMU.js';import {a as a$2}from'./chunk-YAFD2FYD.js';import {a as a$4}from'./chunk-YLCNLTYD.js';import {a as a$b}from'./chunk-PWPSTL4C.js';import {a as a$1}from'./chunk-I53W7VSB.js';import {a as a$3}from'./chunk-QQUMOT3B.js';import {Anchor,DataCaptureView,Point,Size}from'@scandit/web-datacapture-core';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 {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 M={async highlightForBarcode(L,A){let t=a$c.create(L);A(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.onEdgesIntersectionObserverHandler=this.onEdgesIntersectionObserver.bind(this);this.pendingDeletionTimeout=null;}set shouldShowZoomControl(t){this.zoomButton&&(this.zoomButton.hidden=!t);}get shouldShowZoomControl(){return this.zoomButton===null?!1:!this.zoomButton.hidden}set shouldShowCameraSwitchControl(t){this.cameraSwitchButton&&(this.cameraSwitchButton.hidden=!t);}get shouldShowCameraSwitchControl(){return this.cameraSwitchButton===null?!1:!this.cameraSwitchButton.hidden}set shouldShowTorchControl(t){this.torchIconButton!==null&&(this.torchIconButton.hidden=!t);}get shouldShowTorchControl(){return this.torchIconButton===null?!1:!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.barcodeCheckViewSettings=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$5.tag]:a$5,[a$6.tag]:a$6,[a$7.tag]:a$7,[c.tag]:c,[a$8.tag]:a$8});}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}`}async start(){return this.presenter.startSearching()}async stop(){return this.presenter.stopSearching()}async pause(){return this.presenter.pauseSearching()}reset(){this.deletePendingViews(),this.deleteAllViews();}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`);}isValidIntersectionEntry(t){return t.rootBounds!=null&&!t.target.hidden}edgeObserverLandscapeLogic(t,e){t.direction="horizontal",(!t.anchor||c$1(t.anchor))&&(t.anchor=e.left?"left-center":"right-center"),e.left?t.anchor="left-center":e.right&&(t.anchor="right-center");}edgeObserverPortraitLogic(t,e){let o=e.bottom||e.top,i=e.left||e.right;o?(t.direction="vertical",t.anchor=e.bottom?"bottom-center":"top-center"):i&&(t.anchor!=null&&b(t.direction)&&c$1(t.anchor)?(t.anchor=e.left?"left-center":"right-center",t.direction="horizontal"):t.anchor!=null&&a$9(t.direction)&&d(t.anchor)&&(e.left&&t.anchor==="left-center"||e.right&&t.anchor==="right-center"||(t.anchor="top-center",t.direction="vertical")));}onEdgesIntersectionObserver(t){for(let e of t){let o=e.target;if(!this.isPopoverAnnotation(o)||!this.isValidIntersectionEntry(e))continue;let{boundingClientRect:i,rootBounds:n}=e,r=this.getTouchedEdges(i,n);!!(n!=null&&n.width&&(n!=null&&n.height)&&(n==null?void 0:n.width)>(n==null?void 0:n.height))?this.edgeObserverLandscapeLogic(o,r):this.edgeObserverPortraitLogic(o,r);}}connectedCallback(){this.torchIconButton=a$7.create(),this.torchIconButton.slot=`controls-${this.torchControlPosition}`,this.torchIconButton.hidden=!0,this.torchIconButton.addEventListener("pointerdown",this.onTorchButtonClickHandler),this.cameraSwitchButton=a$5.create(),this.cameraSwitchButton.slot=`controls-${this.cameraSwitchControlPosition}`,this.cameraSwitchButton.hidden=!0,this.cameraSwitchButton.addEventListener("pointerdown",this.onCameraSwitchButtonHandler),this.zoomButton=a$6.create(),this.zoomButton.slot=`controls-${this.zoomControlPosition}`,this.zoomButton.hidden=!0,this.zoomButton.addEventListener("pointerdown",this.onZoomButtonHandler),this.layout.append(this.torchIconButton,this.cameraSwitchButton,this.zoomButton),this.layout.addEventListener("pointerdown",this.onLayoutPointerDownHandler),this.layout.addEventListener("BarcodeCheckInfoAnnotationEventTap",this.onInfoAnnotationTapHandler),this.backdrop=a$8.create(),this.layout.append(this.backdrop),this.edgesObserver=new IntersectionObserver(this.onEdgesIntersectionObserverHandler,{root:this,threshold:[1,.75,.5,.25,0],rootMargin:"0px"}),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("BarcodeCheckInfoAnnotationEventTap",this.onInfoAnnotationTapHandler),this.edgesObserver.disconnect();}isPopoverAnnotation(t){return t instanceof a$a}areMultiplePopoverAllowed(){for(let t of this.layout.querySelectorAll(`${a$a.tag}`))if(t&&this.isPopoverAnnotation(t)&&t.annotationTrigger==="highlightAndBarcodeScan")return !0;return !1}async onLayoutPointerDown(t){let e=t.target,o=e==null?void 0:e.closest("[data-identifier$='-highlight']"),i=e==null?void 0:e.closest(a$a.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){this.presenter.emitTappedFeedback();let e=this.queryAnnotationByDataIdentifier(t.dataset.identifier.replace("-highlight",""));e&&(e instanceof a$a?await this.handlePopoverHighlightClick(e,t):e.hidden=!e.hidden);}async handlePopoverHighlightClick(t,e){var o;if(!this.areMultiplePopoverAllowed()){let i=this.layout.querySelector(`${a$a.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.hideBarcodeCheckPopover(i,r,!1);}await this.toggleBarcodeCheckPopover(t,e),this.edgesObserver.unobserve(t),this.edgesObserver.observe(t);}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.toggleBarcodeCheckPopover(t,o);}async handleClickOutside(){var i;if(this.areMultiplePopoverAllowed())return;let t=this.layout.querySelector(`${a$a.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.hideBarcodeCheckPopover(t,o);}onInfoAnnotationTap(){this.presenter.emitTappedFeedback();}async showBarcodeCheckPopover(t,e){t.dataset.onForeground="true",t.hidden=!1,e.dataset.onForeground="true",this.backdrop.open=!0;}async hideBarcodeCheckPopover(t,e,o=!0){t.dataset.onForeground="false",t.hidden=!0,e&&(e.dataset.onForeground="false"),o&&this.hideBackdropIfNoPopovers();}hideBackdropIfNoPopovers(){[...this.layout.querySelectorAll(`${a$a.tag}`)].every(e=>e.hidden)&&(this.backdrop.open=!1);}async toggleBarcodeCheckPopover(t,e){t.hidden?await this.showBarcodeCheckPopover(t,e):await this.hideBarcodeCheckPopover(t,e);}deleteAllViews(){for(let t of this.layout.querySelectorAll("[data-identifier]"))this.edgesObserver.unobserve(t),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:M)==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$b(t),n=this.queryAnnotationByDataId(i);if(n)n.dataset.couldBeDeleted="false";else {if(o.dataset.id=i,o.dataset.identifier=this.identifierForAnnotation(t.identifier),o.hidden=!0,this.layout.append(o),this.isPopoverAnnotation(o)){if(o.direction="vertical",o.anchor="top-center",this.edgesObserver.observe(o),this.areMultiplePopoverAllowed()||o.annotationTrigger==="highlightAndBarcodeScan"){let r=this.queryHighlightByDataId(i);if(!r)return;this.showBarcodeCheckPopover(o,r);}}else {let r=o;r.hidden=r.annotationTrigger==="highlightTap";}this.updateAnnotationPosition(t,o);}}async onHighlight(t,e){let o=a$b(t),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,p,u;let e=this.querySelectorAll("[data-identifier]");if(Object.keys(t.allTrackedBarcodes).length===0){for(let l of e)l.dataset.couldBeDeleted="true";(i=this.pendingDeletionTimeout)!=null&&i.running||(n=this.pendingDeletionTimeout)==null||n.start();return}let o=new Set(t.removedTrackedBarcodes);for(let l of e){let a=(r=l.dataset.identifier)==null?void 0:r.replace("-highlight","").replace("-annotation","");a!=null&&o.has(a)&&(l.dataset.couldBeDeleted="true");}(p=this.pendingDeletionTimeout)!=null&&p.running||(u=this.pendingDeletionTimeout)==null||u.start();}render(t){for(let[e,o]of Object.entries(t.allTrackedBarcodes)){t.addedTrackedBarcodes[e]!=null&&this.onHighlightsOrAnnotationForTrackedBarcode(o);let i=a$b(o),n=this.queryAnnotationByDataId(i),r=this.queryHighlightByDataId(i);r&&(r.type==="rectangle"&&this.updateBrushSize(r,o),this.updateHighlightPosition(o,r)),n&&r&&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);this.setPosition(e,n,{x:-50,y:-50},this.calculateRotationAngle(i.topLeft,i.topRight));}updateBrushSize(t,e){let o=this.dataCaptureView.viewAnchorPositionsForFrameAnchorPositions(e.anchorPositions),i=Math.round(calculateWidth(o)),n=Math.round(calculateHeight(o));t.type==="rectangle"&&(t.width!==i&&(t.width=i),t.height!==n&&(t.height=n));}getTransformOrigin(t){return {"top-center":{x:-50,y:0},"bottom-center":{x:-50,y:-100},"left-center":{x:0,y:-50},"right-center":{x:-100,y:-50}}[t]}calculateAnnotationPosition(t,e,o){var l;let n=t.orderVerticesByPosition(),r=this.normalizedViewPointFromFrameAnchorPositions(t,"center"),u={"bottom-center":()=>{let a=this.normalizedViewPointFromFrameAnchorPositions(n,"topCenter");return new Point(a.x,a.y-7)},"top-center":()=>{let a=this.normalizedViewPointFromFrameAnchorPositions(n,"bottomCenter");return new Point(a.x,a.y+7)},"right-center":()=>{let a=this.normalizedViewPointFromFrameAnchorPositions(n,"centerLeft");return new Point(a.x-7,a.y)},"left-center":()=>{let a=this.normalizedViewPointFromFrameAnchorPositions(n,"centerRight");return new Point(a.x+7,a.y)}}[e]();return (o==null?void 0:o.type)==="circle"&&(l={"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?l:u}updateAnnotationPosition(t,e,o){if(e.hidden)return;let i=this.dataCaptureView.viewAnchorPositionsForFrameAnchorPositions(t.anchorPositions);e.anchor||(e.anchor="top-center");let n=this.getTransformOrigin(e.anchor),r=this.calculateAnnotationPosition(i,e.anchor,o);this.setPosition(e,r,n);}setPosition(t,e,o,i=0){t.style.position="absolute",t.style.willChange="transform",t.style.transform=`translate3d(calc(${Math.round(e.x)}px + ${o.x}%), calc(${Math.round(e.y)}px + ${o.y}%), 0px) rotate(${i}deg)`;}getTouchedEdges(t,e){let o=t.top<=e.top,i=t.bottom>=e.bottom,n=t.left<=e.left,r=t.right>=e.right;return {top:o,bottom:i,left:n,right:r}}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,i=-(e.y-t.y),n=Math.atan2(i,o);return Math.round(n*(180/Math.PI))}};c.tag="scandit-barcode-check-view";var E=c;export{E as a};
1
+ import {a as a$5}from'./chunk-BBJPGTUG.js';import {a as a$6}from'./chunk-WL3PKWFT.js';import {c as c$1,b,a as a$9,d}from'./chunk-A2FMQ67Y.js';import {a}from'./chunk-UHJ3O2ZT.js';import {a as a$8}from'./chunk-CONYPETL.js';import {a as a$a}from'./chunk-5N7ZBGWC.js';import {a as a$c}from'./chunk-Y2XISTOT.js';import {a as a$7}from'./chunk-JKO4EZPZ.js';import {a as a$b}from'./chunk-PWPSTL4C.js';import {a as a$2}from'./chunk-RXYSNBJM.js';import {a as a$4}from'./chunk-4XFE7YMP.js';import {a as a$1}from'./chunk-I53W7VSB.js';import {a as a$3}from'./chunk-BRFFJHOE.js';import {Anchor,DataCaptureView,Point,Size}from'@scandit/web-datacapture-core';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 {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 M={async highlightForBarcode(L,A){let t=a$c.create(L);A(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.onEdgesIntersectionObserverHandler=this.onEdgesIntersectionObserver.bind(this);this.pendingDeletionTimeout=null;}set shouldShowZoomControl(t){this.zoomButton&&(this.zoomButton.hidden=!t);}get shouldShowZoomControl(){return this.zoomButton===null?!1:!this.zoomButton.hidden}set shouldShowCameraSwitchControl(t){this.cameraSwitchButton&&(this.cameraSwitchButton.hidden=!t);}get shouldShowCameraSwitchControl(){return this.cameraSwitchButton===null?!1:!this.cameraSwitchButton.hidden}set shouldShowTorchControl(t){this.torchIconButton!==null&&(this.torchIconButton.hidden=!t);}get shouldShowTorchControl(){return this.torchIconButton===null?!1:!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.barcodeCheckViewSettings=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$5.tag]:a$5,[a$6.tag]:a$6,[a$7.tag]:a$7,[c.tag]:c,[a$8.tag]:a$8});}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}`}async start(){return this.presenter.startSearching()}async stop(){return this.presenter.stopSearching()}async pause(){return this.presenter.pauseSearching()}reset(){this.deletePendingViews(),this.deleteAllViews();}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`);}isValidIntersectionEntry(t){return t.rootBounds!=null&&!t.target.hidden}edgeObserverLandscapeLogic(t,e){t.direction="horizontal",(!t.anchor||c$1(t.anchor))&&(t.anchor=e.left?"left-center":"right-center"),e.left?t.anchor="left-center":e.right&&(t.anchor="right-center");}edgeObserverPortraitLogic(t,e){let o=e.bottom||e.top,i=e.left||e.right;o?(t.direction="vertical",t.anchor=e.bottom?"bottom-center":"top-center"):i&&(t.anchor!=null&&b(t.direction)&&c$1(t.anchor)?(t.anchor=e.left?"left-center":"right-center",t.direction="horizontal"):t.anchor!=null&&a$9(t.direction)&&d(t.anchor)&&(e.left&&t.anchor==="left-center"||e.right&&t.anchor==="right-center"||(t.anchor="top-center",t.direction="vertical")));}onEdgesIntersectionObserver(t){for(let e of t){let o=e.target;if(!this.isPopoverAnnotation(o)||!this.isValidIntersectionEntry(e))continue;let{boundingClientRect:i,rootBounds:n}=e,r=this.getTouchedEdges(i,n);!!(n!=null&&n.width&&(n!=null&&n.height)&&(n==null?void 0:n.width)>(n==null?void 0:n.height))?this.edgeObserverLandscapeLogic(o,r):this.edgeObserverPortraitLogic(o,r);}}connectedCallback(){this.torchIconButton=a$7.create(),this.torchIconButton.slot=`controls-${this.torchControlPosition}`,this.torchIconButton.hidden=!0,this.torchIconButton.addEventListener("pointerdown",this.onTorchButtonClickHandler),this.cameraSwitchButton=a$5.create(),this.cameraSwitchButton.slot=`controls-${this.cameraSwitchControlPosition}`,this.cameraSwitchButton.hidden=!0,this.cameraSwitchButton.addEventListener("pointerdown",this.onCameraSwitchButtonHandler),this.zoomButton=a$6.create(),this.zoomButton.slot=`controls-${this.zoomControlPosition}`,this.zoomButton.hidden=!0,this.zoomButton.addEventListener("pointerdown",this.onZoomButtonHandler),this.layout.append(this.torchIconButton,this.cameraSwitchButton,this.zoomButton),this.layout.addEventListener("pointerdown",this.onLayoutPointerDownHandler),this.layout.addEventListener("BarcodeCheckInfoAnnotationEventTap",this.onInfoAnnotationTapHandler),this.backdrop=a$8.create(),this.layout.append(this.backdrop),this.edgesObserver=new IntersectionObserver(this.onEdgesIntersectionObserverHandler,{root:this,threshold:[1,.75,.5,.25,0],rootMargin:"0px"}),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("BarcodeCheckInfoAnnotationEventTap",this.onInfoAnnotationTapHandler),this.edgesObserver.disconnect();}isPopoverAnnotation(t){return t instanceof a$a}areMultiplePopoverAllowed(){for(let t of this.layout.querySelectorAll(`${a$a.tag}`))if(t&&this.isPopoverAnnotation(t)&&t.annotationTrigger==="highlightAndBarcodeScan")return !0;return !1}async onLayoutPointerDown(t){let e=t.target,o=e==null?void 0:e.closest("[data-identifier$='-highlight']"),i=e==null?void 0:e.closest(a$a.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){this.presenter.emitTappedFeedback();let e=this.queryAnnotationByDataIdentifier(t.dataset.identifier.replace("-highlight",""));e&&(e instanceof a$a?await this.handlePopoverHighlightClick(e,t):e.hidden=!e.hidden);}async handlePopoverHighlightClick(t,e){var o;if(!this.areMultiplePopoverAllowed()){let i=this.layout.querySelector(`${a$a.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.hideBarcodeCheckPopover(i,r,!1);}await this.toggleBarcodeCheckPopover(t,e),this.edgesObserver.unobserve(t),this.edgesObserver.observe(t);}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.toggleBarcodeCheckPopover(t,o);}async handleClickOutside(){var i;if(this.areMultiplePopoverAllowed())return;let t=this.layout.querySelector(`${a$a.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.hideBarcodeCheckPopover(t,o);}onInfoAnnotationTap(){this.presenter.emitTappedFeedback();}async showBarcodeCheckPopover(t,e){t.dataset.onForeground="true",t.hidden=!1,e.dataset.onForeground="true",this.backdrop.open=!0;}async hideBarcodeCheckPopover(t,e,o=!0){t.dataset.onForeground="false",t.hidden=!0,e&&(e.dataset.onForeground="false"),o&&this.hideBackdropIfNoPopovers();}hideBackdropIfNoPopovers(){[...this.layout.querySelectorAll(`${a$a.tag}`)].every(e=>e.hidden)&&(this.backdrop.open=!1);}async toggleBarcodeCheckPopover(t,e){t.hidden?await this.showBarcodeCheckPopover(t,e):await this.hideBarcodeCheckPopover(t,e);}deleteAllViews(){for(let t of this.layout.querySelectorAll("[data-identifier]"))this.edgesObserver.unobserve(t),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:M)==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$b(t),n=this.queryAnnotationByDataId(i);if(n)n.dataset.couldBeDeleted="false";else {if(o.dataset.id=i,o.dataset.identifier=this.identifierForAnnotation(t.identifier),o.hidden=!0,this.layout.append(o),this.isPopoverAnnotation(o)){if(o.direction="vertical",o.anchor="top-center",this.edgesObserver.observe(o),this.areMultiplePopoverAllowed()||o.annotationTrigger==="highlightAndBarcodeScan"){let r=this.queryHighlightByDataId(i);if(!r)return;this.showBarcodeCheckPopover(o,r);}}else {let r=o;r.hidden=r.annotationTrigger==="highlightTap";}this.updateAnnotationPosition(t,o);}}async onHighlight(t,e){let o=a$b(t),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,p,u;let e=this.querySelectorAll("[data-identifier]");if(Object.keys(t.allTrackedBarcodes).length===0){for(let l of e)l.dataset.couldBeDeleted="true";(i=this.pendingDeletionTimeout)!=null&&i.running||(n=this.pendingDeletionTimeout)==null||n.start();return}let o=new Set(t.removedTrackedBarcodes);for(let l of e){let a=(r=l.dataset.identifier)==null?void 0:r.replace("-highlight","").replace("-annotation","");a!=null&&o.has(a)&&(l.dataset.couldBeDeleted="true");}(p=this.pendingDeletionTimeout)!=null&&p.running||(u=this.pendingDeletionTimeout)==null||u.start();}render(t){for(let[e,o]of Object.entries(t.allTrackedBarcodes)){t.addedTrackedBarcodes[e]!=null&&this.onHighlightsOrAnnotationForTrackedBarcode(o);let i=a$b(o),n=this.queryAnnotationByDataId(i),r=this.queryHighlightByDataId(i);r&&(r.type==="rectangle"&&this.updateBrushSize(r,o),this.updateHighlightPosition(o,r)),n&&r&&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);this.setPosition(e,n,{x:-50,y:-50},this.calculateRotationAngle(i.topLeft,i.topRight));}updateBrushSize(t,e){let o=this.dataCaptureView.viewAnchorPositionsForFrameAnchorPositions(e.anchorPositions),i=Math.round(calculateWidth(o)),n=Math.round(calculateHeight(o));t.type==="rectangle"&&(t.width!==i&&(t.width=i),t.height!==n&&(t.height=n));}getTransformOrigin(t){return {"top-center":{x:-50,y:0},"bottom-center":{x:-50,y:-100},"left-center":{x:0,y:-50},"right-center":{x:-100,y:-50}}[t]}calculateAnnotationPosition(t,e,o){var l;let n=t.orderVerticesByPosition(),r=this.normalizedViewPointFromFrameAnchorPositions(t,"center"),u={"bottom-center":()=>{let a=this.normalizedViewPointFromFrameAnchorPositions(n,"topCenter");return new Point(a.x,a.y-7)},"top-center":()=>{let a=this.normalizedViewPointFromFrameAnchorPositions(n,"bottomCenter");return new Point(a.x,a.y+7)},"right-center":()=>{let a=this.normalizedViewPointFromFrameAnchorPositions(n,"centerLeft");return new Point(a.x-7,a.y)},"left-center":()=>{let a=this.normalizedViewPointFromFrameAnchorPositions(n,"centerRight");return new Point(a.x+7,a.y)}}[e]();return (o==null?void 0:o.type)==="circle"&&(l={"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?l:u}updateAnnotationPosition(t,e,o){if(e.hidden)return;let i=this.dataCaptureView.viewAnchorPositionsForFrameAnchorPositions(t.anchorPositions);e.anchor||(e.anchor="top-center");let n=this.getTransformOrigin(e.anchor),r=this.calculateAnnotationPosition(i,e.anchor,o);this.setPosition(e,r,n);}setPosition(t,e,o,i=0){t.style.position="absolute",t.style.willChange="transform",t.style.transform=`translate3d(calc(${Math.round(e.x)}px + ${o.x}%), calc(${Math.round(e.y)}px + ${o.y}%), 0px) rotate(${i}deg)`;}getTouchedEdges(t,e){let o=t.top<=e.top,i=t.bottom>=e.bottom,n=t.left<=e.left,r=t.right>=e.right;return {top:o,bottom:i,left:n,right:r}}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,i=-(e.y-t.y),n=Math.atan2(i,o);return Math.round(n*(180/Math.PI))}};c.tag="scandit-barcode-check-view";var E=c;export{E as a};
@@ -0,0 +1 @@
1
+ import {Color,Brush,ScanditIconBuilder,ScanditIconShape}from'@scandit/web-datacapture-core';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 {html}from'@scandit/web-datacapture-core/build/js/private/utils/html.js';var b=(t=>(t.Dot="dot",t.Icon="icon",t))(b||{}),o=Color.fromHex("#00FFFF"),g=o.withAlpha(0),i=class i extends ScanditHTMLElement{constructor(){super();this._isPulsing=!1;this.icon=null;this.type="circle";this.dot=null;this._brush=new Brush(o.withAlpha(.45),Color.fromHex("#00FFFF"),2);let t=this.attachShadow({mode:"open"});t.innerHTML=html`<slot></slot>`,t.append(i.createStyleElement().cloneNode(!0));}set isPulsing(t){this._isPulsing=t,this.toggleAttribute("pulse",t);}get isPulsing(){return this._isPulsing}set barcode(t){this._barcode=t;}get barcode(){return this._barcode}set brush(t){this._brush=t,this.updateBrush();}get brush(){return this._brush}set size(t){this._size=t,this.updateSize();}get size(){return this._size!==void 0?this._size:this.preset==="dot"?26:32}static create(t,l){i.register();let e=document.createElement(i.tag);return e.barcode=t,e.preset=l,e}static register(){defineCustomElements({[i.tag]:i});}static createStyleElement(){return css`:host{border-radius:50%;display:inline-flex;--fill:#${o.toJSON()};--fill-no-opacity:#${g.toJSON()};--size:20px}:host([pulse]){animation:pulse 1.5s infinite}@keyframes pulse{0%{box-shadow:0 0 0 0 var(--fill)}70%{box-shadow:0 0 0 var(--size) var(--fill-no-opacity)}to{box-shadow:0 0 0 0 var(--fill-no-opacity)}}`}async connectedCallback(){this.brushBuilder=new ScanditIconBuilder().withBackgroundShape(ScanditIconShape.Circle).withBackgroundColor(this.brush.fillColor).withBackgroundStrokeColor(this.brush.strokeColor).withBackgroundStrokeWidth(this.brush.strokeWidth),this.dot=await this.brushBuilder.build(),this.preset==="dot"?this.append(this.dot):this.icon!=null&&(this.icon.backgroundShape=ScanditIconShape.Circle,this.append(this.icon)),this.updateBrush(),this.updateSize();}updateSize(){this.dot&&(this.dot.width=this.size,this.dot.height=this.size),this.icon&&(this.icon.width=this.size,this.icon.height=this.size),this.style.setProperty("--size",`${this.size*9/10}px`);}updateBrush(){this.dot&&(this.dot.backgroundColor=this._brush.fillColor,this.dot.backgroundStrokeColor=this._brush.strokeColor,this.dot.backgroundStrokeWidth=this._brush.strokeWidth),this.icon&&(this.icon.backgroundColor=this._brush.fillColor,this.icon.backgroundStrokeColor=this._brush.strokeColor,this.icon.backgroundStrokeWidth=this._brush.strokeWidth),this.style.setProperty("--fill",`#${this._brush.fillColor.toJSON()}`),this.style.setProperty("--fill-no-opacity",`#${this._brush.fillColor.withAlpha(0).toJSON()}`);}};i.tag="scandit-check-circle-highlight";var s=i;export{b as a,s as b};
@@ -1 +1 @@
1
- import {b}from'./chunk-3I3FVXFK.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,!0);}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-YO7QRAX6.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,!0);}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 {b}from'./chunk-3I3FVXFK.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-YO7QRAX6.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,4 +1,4 @@
1
- import {a as a$7}from'./chunk-QPNMXE7H.js';import {b as b$1}from'./chunk-HQL4OJUZ.js';import {a}from'./chunk-X2U6LCRU.js';import {b}from'./chunk-ZDBP2TPZ.js';import {a as a$6}from'./chunk-OXLBBRZT.js';import {a as a$8}from'./chunk-K3EIYQPY.js';import {a as a$2}from'./chunk-VI6FIL4E.js';import {a as a$4}from'./chunk-HRHBXIPB.js';import {a as a$5}from'./chunk-POONUNDO.js';import {b as b$2}from'./chunk-EZI7OJEV.js';import {a as a$1}from'./chunk-FCUTPMMU.js';import {a as a$3}from'./chunk-I53W7VSB.js';import {b as b$3}from'./chunk-3I3FVXFK.js';import {Anchor,Localization,DataCaptureView,Size,Point}from'@scandit/web-datacapture-core';import {ShutterButton}from'@scandit/web-datacapture-core/build/js/private/ui/atoms/ShutterButton.js';import {ScanditHTMLElement}from'@scandit/web-datacapture-core/build/js/private/utils/ScanditHTMLElement.js';import {defineCustomElements}from'@scandit/web-datacapture-core/build/js/private/utils/defineCustomElements.js';import {html}from'@scandit/web-datacapture-core/build/js/private/utils/html.js';var d={FinishButton:a$2.tag,ShutterButton:ShutterButton.tag,ProgressBarWithLabel:a.tag,CardListContainer:b$1.tag,TorchIconButton:a$1.tag},c=class c extends ScanditHTMLElement{constructor(){super(...arguments);this.shouldShowCarousel=!0;this.shouldShowPauseButton=!0;this.shouldShowFinishButton=!0;this.shouldShowProgressBar=!0;this.shouldShowTorchControl=!1;this.torchControlPosition=Anchor.TopLeft;this.textForItemListUpdatedWhenPausedHint=null;this.textForItemListUpdatedHint=null;this.textForTapShutterToResumeSearchHint=null;this.textForTapShutterToPauseScreenHint=null;this.textForMoveCloserToBarcodesHint=null;this.textForPointAtBarcodesToSearchHint=null;this.textForAllItemsFoundSuccessfullyHint=null;this.textForCollapseCardsButton=Localization.getInstance().get("barcode.find.view.textForCollapseCardsButton");this.barcodeFindViewUiListener=null;this.shutterButton=null;this.finishButton=null;this.progressBar=null;this.cardList=null;this.onShutterButtonClickedHandler=this.onShutterButtonClicked.bind(this);this.onFinishButtonClickedHandler=this.onFinishButtonClicked.bind(this);this.onTorchButtonClickedHandler=this.onTorchButtonClicked.bind(this);this.torchIconButton=null;this.onDotClickHandler=this.onDotClick.bind(this);}get camera(){return this.presenter.context.frameSource}static async createWithSettings(t,o,i,s,r){let e=document.createElement(c.tag);return e.barcodeFindViewSettings=s,e.layout=b.create(),e.layout.innerHTML=html`
1
+ import {b as b$1}from'./chunk-DFIOIHPG.js';import {a}from'./chunk-WRTJHOS5.js';import {b}from'./chunk-XY65BTLP.js';import {a as a$6}from'./chunk-QJOHE5A3.js';import {a as a$8}from'./chunk-7J6MRLL2.js';import {a as a$2}from'./chunk-YH5IBNOK.js';import {a as a$7}from'./chunk-5GGUCEGU.js';import {a as a$4}from'./chunk-AOU52W7O.js';import {a as a$5}from'./chunk-POONUNDO.js';import {b as b$2}from'./chunk-S4DXFXOU.js';import {a as a$1}from'./chunk-JKO4EZPZ.js';import {a as a$3}from'./chunk-I53W7VSB.js';import {b as b$3}from'./chunk-YO7QRAX6.js';import {Anchor,Localization,DataCaptureView,Size,Point}from'@scandit/web-datacapture-core';import {ShutterButton}from'@scandit/web-datacapture-core/build/js/private/ui/atoms/ShutterButton.js';import {ScanditHTMLElement}from'@scandit/web-datacapture-core/build/js/private/utils/ScanditHTMLElement.js';import {defineCustomElements}from'@scandit/web-datacapture-core/build/js/private/utils/defineCustomElements.js';import {html}from'@scandit/web-datacapture-core/build/js/private/utils/html.js';var d={FinishButton:a$2.tag,ShutterButton:ShutterButton.tag,ProgressBarWithLabel:a.tag,CardListContainer:b$1.tag,TorchIconButton:a$1.tag},c=class c extends ScanditHTMLElement{constructor(){super(...arguments);this.shouldShowCarousel=!0;this.shouldShowPauseButton=!0;this.shouldShowFinishButton=!0;this.shouldShowProgressBar=!0;this.shouldShowTorchControl=!1;this.torchControlPosition=Anchor.TopLeft;this.textForItemListUpdatedWhenPausedHint=null;this.textForItemListUpdatedHint=null;this.textForTapShutterToResumeSearchHint=null;this.textForTapShutterToPauseScreenHint=null;this.textForMoveCloserToBarcodesHint=null;this.textForPointAtBarcodesToSearchHint=null;this.textForAllItemsFoundSuccessfullyHint=null;this.textForCollapseCardsButton=Localization.getInstance().get("barcode.find.view.textForCollapseCardsButton");this.barcodeFindViewUiListener=null;this.shutterButton=null;this.finishButton=null;this.progressBar=null;this.cardList=null;this.onShutterButtonClickedHandler=this.onShutterButtonClicked.bind(this);this.onFinishButtonClickedHandler=this.onFinishButtonClicked.bind(this);this.onTorchButtonClickedHandler=this.onTorchButtonClicked.bind(this);this.torchIconButton=null;this.onDotClickHandler=this.onDotClick.bind(this);}get camera(){return this.presenter.context.frameSource}static async createWithSettings(t,o,i,s,r){let e=document.createElement(c.tag);return e.barcodeFindViewSettings=s,e.layout=b.create(),e.layout.innerHTML=html`
2
2
  <${a.tag} slot="progress" value="0" max="1" ${e.shouldShowProgressBar?"":"hidden"}></${a.tag}>
3
3
  <${a$1.tag} slot="top-controls-left" ${e.shouldShowTorchControl?"":"hidden"}></${a$1.tag}>
4
4
  <${b$1.tag} slot="card-list" hidden text-for-collapse-cards-button=${e.textForCollapseCardsButton}></${b$1.tag}>
@@ -0,0 +1 @@
1
+ import {a}from'./chunk-7SWSAHI5.js';var o=class t{constructor(e){if(e!=null)return t.all[t.all.findIndex(i=>i.identifier===e)]}static get all(){return t.defaults().SymbologyDescriptions}get activeSymbolCountRange(){return this._activeSymbolCountRange}get defaultSymbolCountRange(){return this._defaultSymbolCountRange}get identifier(){return this._identifier}get isAvailable(){return this._isAvailable}get isColorInvertible(){return this._isColorInvertible}get readableName(){return this._readableName}get supportedExtensions(){return [...this._supportedExtensions]}get symbology(){return this.identifier}static forIdentifier(e){return t.all.findIndex(r=>r.identifier===e)===-1?null:new t(e)}static fromJSON(e){let i=new t;return i._identifier=e.identifier,i._readableName=e.readableName,i._isAvailable=e.isAvailable,i._isColorInvertible=e.isColorInvertible,i._activeSymbolCountRange=a.fromJSON(e.activeSymbolCountRange),i._defaultSymbolCountRange=a.fromJSON(e.defaultSymbolCountRange),i._supportedExtensions=new Set(e.supportedExtensions),i}};export{o as a};
@@ -1 +1 @@
1
- import {b}from'./chunk-3I3FVXFK.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,!0);}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-YO7QRAX6.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,!0);}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 {b}from'./chunk-3I3FVXFK.js';import {PrivateNoneLocationSelection}from'@scandit/web-datacapture-core';var p=class{constructor(){this.codeDuplicateFilter=b.BarcodeCapture.BarcodeCaptureSettings.codeDuplicateFilter;this.locationSelection=null;this.enabledCompositeTypes=[];this.scanIntention="manual";this.properties={};this.symbologies={};}get enabledSymbologies(){return Object.keys(this.symbologies).filter(e=>{var o;return (o=this.symbologies[e])==null?void 0:o.isEnabled})}get compositeTypeDescriptions(){return b.CompositeTypeDescriptions.reduce((e,o)=>(e[o.types[0]]=o,e),{})}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,!0);}enableSymbology(e,o){this.settingsForSymbology(e).isEnabled=o;}enableSymbologiesForCompositeTypes(e){for(let o of e)this.enableSymbologies(this.compositeTypeDescriptions[o].symbologies);}toJSONObject(){var o,i,s;let e={};return {codeDuplicateFilter:this.codeDuplicateFilter,enabledCompositeTypes:[...this.enabledCompositeTypes],locationSelection:(i=(o=this.locationSelection)==null?void 0:o.toJSONObject())!=null?i:PrivateNoneLocationSelection,properties:{...this.properties},symbologies:Object.keys(this.symbologies).reduce((n,l)=>{var y;let r=(y=this.symbologies[l])==null?void 0:y.toJSONObject();return r&&(n[l]=r),n},e),scanIntention:(s=this.scanIntention)!=null?s:null}}};export{p as a};
1
+ import {b}from'./chunk-YO7QRAX6.js';import {PrivateNoneLocationSelection}from'@scandit/web-datacapture-core';var p=class{constructor(){this.codeDuplicateFilter=b.BarcodeCapture.BarcodeCaptureSettings.codeDuplicateFilter;this.locationSelection=null;this.enabledCompositeTypes=[];this.scanIntention="manual";this.properties={};this.symbologies={};}get enabledSymbologies(){return Object.keys(this.symbologies).filter(e=>{var o;return (o=this.symbologies[e])==null?void 0:o.isEnabled})}get compositeTypeDescriptions(){return b.CompositeTypeDescriptions.reduce((e,o)=>(e[o.types[0]]=o,e),{})}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,!0);}enableSymbology(e,o){this.settingsForSymbology(e).isEnabled=o;}enableSymbologiesForCompositeTypes(e){for(let o of e)this.enableSymbologies(this.compositeTypeDescriptions[o].symbologies);}toJSONObject(){var o,i,s;let e={};return {codeDuplicateFilter:this.codeDuplicateFilter,enabledCompositeTypes:[...this.enabledCompositeTypes],locationSelection:(i=(o=this.locationSelection)==null?void 0:o.toJSONObject())!=null?i:PrivateNoneLocationSelection,properties:{...this.properties},symbologies:Object.keys(this.symbologies).reduce((n,l)=>{var y;let r=(y=this.symbologies[l])==null?void 0:y.toJSONObject();return r&&(n[l]=r),n},e),scanIntention:(s=this.scanIntention)!=null?s:null}}};export{p as a};
@@ -0,0 +1 @@
1
+ import {a}from'./chunk-H5VEANGI.js';import {b}from'./chunk-YO7QRAX6.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=!0;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",!0),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.addMode(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 +1 @@
1
- import {a}from'./chunk-Q6IBYUJQ.js';import {a as a$1}from'./chunk-KQ3LRAYO.js';import {unknownErrorToString}from'@scandit/web-datacapture-core/build/js/private/utils/unknownErrorToString.js';import {WorkerMain}from'@scandit/web-datacapture-core/build/js/worker/index.js';var i=class extends WorkerMain{constructor(e,a$1){super(e,a$1),this.dataCaptureInstance=new a(a$1,{postMessage:this.postMessage.bind(this),getOffscreenCanvas:this.getOffscreenCanvas.bind(this)});}async respondWith(e,a,r){let d=null,t;try{t=r(),t instanceof Promise&&(t=await t);}catch(c){t=void 0,d=unknownErrorToString(c);}let s={type:"workerTaskId",command:e,id:a,payload:this.hasPayload(t)?t.payload:void 0};d!=null&&(s.error=d),this.postMessage(s,this.hasTransferables(t)?t.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=a$1(a.functionAsString);this.dataCaptureInstance.barcodeFindMode.setTransformerFunction(r);}),!0}case"barcodeCheckForSettings":{let{data:a}=e;return this.respondWith(a.command,a.id,async()=>this.dataCaptureInstance.barcodeCheckMode.forSettings(a.settings)),!0}case"barcodeCheckModeRemove":{let{data:a}=e;return this.respondWith(a.command,a.id,async()=>this.dataCaptureInstance.barcodeCheckMode.removeMode()),!0}case"barcodeCheckSearchStart":return this.respondWith(e.data.command,e.data.id,()=>{this.dataCaptureInstance.barcodeCheckMode.start();}),!0;case"barcodeCheckSearchPause":return this.respondWith(e.data.command,e.data.id,()=>{this.dataCaptureInstance.barcodeCheckMode.pause();}),!0;case"barcodeCheckSearchStop":return this.respondWith(e.data.command,e.data.id,()=>{this.dataCaptureInstance.barcodeCheckMode.stop();}),!0;case"barcodeCheckSetEnabled":{let{data:a}=e;return this.respondWith(e.data.command,e.data.id,()=>{this.dataCaptureInstance.barcodeCheckMode.setEnabled(a.enabled);}),!0}case"barcodeCheckApplySettings":{let{data:a}=e;return this.respondWith(a.command,a.id,async()=>{this.dataCaptureInstance.barcodeCheckMode.applySettings(a.settings);}),!0}default:return super.onMessage(e)}}};export{i as a};
1
+ import {a}from'./chunk-HWV5BPFU.js';import {a as a$1}from'./chunk-KQ3LRAYO.js';import {unknownErrorToString}from'@scandit/web-datacapture-core/build/js/private/utils/unknownErrorToString.js';import {WorkerMain}from'@scandit/web-datacapture-core/build/js/worker/index.js';var i=class extends WorkerMain{constructor(e,a$1){super(e,a$1),this.dataCaptureInstance=new a(a$1,{postMessage:this.postMessage.bind(this),getOffscreenCanvas:this.getOffscreenCanvas.bind(this)});}async respondWith(e,a,r){let d=null,t;try{t=r(),t instanceof Promise&&(t=await t);}catch(c){t=void 0,d=unknownErrorToString(c);}let s={type:"workerTaskId",command:e,id:a,payload:this.hasPayload(t)?t.payload:void 0};d!=null&&(s.error=d),this.postMessage(s,this.hasTransferables(t)?t.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=a$1(a.functionAsString);this.dataCaptureInstance.barcodeFindMode.setTransformerFunction(r);}),!0}case"barcodeCheckForSettings":{let{data:a}=e;return this.respondWith(a.command,a.id,async()=>this.dataCaptureInstance.barcodeCheckMode.forSettings(a.settings)),!0}case"barcodeCheckModeRemove":{let{data:a}=e;return this.respondWith(a.command,a.id,async()=>this.dataCaptureInstance.barcodeCheckMode.removeMode()),!0}case"barcodeCheckSearchStart":return this.respondWith(e.data.command,e.data.id,()=>{this.dataCaptureInstance.barcodeCheckMode.start();}),!0;case"barcodeCheckSearchPause":return this.respondWith(e.data.command,e.data.id,()=>{this.dataCaptureInstance.barcodeCheckMode.pause();}),!0;case"barcodeCheckSearchStop":return this.respondWith(e.data.command,e.data.id,()=>{this.dataCaptureInstance.barcodeCheckMode.stop();}),!0;case"barcodeCheckSetEnabled":{let{data:a}=e;return this.respondWith(e.data.command,e.data.id,()=>{this.dataCaptureInstance.barcodeCheckMode.setEnabled(a.enabled);}),!0}case"barcodeCheckApplySettings":{let{data:a}=e;return this.respondWith(a.command,a.id,async()=>{this.dataCaptureInstance.barcodeCheckMode.applySettings(a.settings);}),!0}default:return super.onMessage(e)}}};export{i as a};
@@ -1 +1 @@
1
- import {a}from'./chunk-BRRT6GC7.js';import {b as b$1}from'./chunk-SZUPDKV5.js';import {b}from'./chunk-3I3FVXFK.js';var n=class{constructor(){this.defaultHandMode=b.SparkScan.SparkScanViewSettings.defaultHandMode;this.defaultScanningMode=new b$1("single","default");this.defaultTorchState=b.SparkScan.SparkScanViewSettings.defaultTorchState;this.defaultMiniPreviewSize=b.SparkScan.SparkScanViewSettings.defaultMiniPreviewSize;this.defaultCameraPosition=b.SparkScan.SparkScanViewSettings.defaultCameraPosition;this.hapticEnabled=b.SparkScan.SparkScanViewSettings.hapticEnabled;this.holdToScanEnabled=b.SparkScan.SparkScanViewSettings.holdToScanEnabled;this.inactiveStateTimeout=b.SparkScan.SparkScanViewSettings.inactiveStateTimeout;this.soundEnabled=b.SparkScan.SparkScanViewSettings.soundEnabled;this.toastSettings=new a;this.triggerButtonCollapseTimeout=b.SparkScan.SparkScanViewSettings.triggerButtonCollapseTimeout;this.visualFeedbackEnabled=b.SparkScan.SparkScanViewSettings.visualFeedbackEnabled;this.zoomFactorIn=b.SparkScan.SparkScanViewSettings.zoomFactorIn;this.zoomFactorOut=b.SparkScan.SparkScanViewSettings.zoomFactorOut;}toJSONObject(){return {defaultHandMode:this.defaultHandMode,defaultScanningMode:this.defaultScanningMode.toJSONObject(),defaultTorchState:this.defaultTorchState,defaultMiniPreviewSize:this.defaultMiniPreviewSize,defaultCameraPosition:this.defaultCameraPosition,hapticEnabled:this.hapticEnabled,holdToScanEnabled:this.holdToScanEnabled,inactiveStateTimeout:this.inactiveStateTimeout,soundEnabled:this.soundEnabled,toastSettings:this.toastSettings.toJSONObject(),triggerButtonCollapseTimeout:this.triggerButtonCollapseTimeout,visualFeedbackEnabled:this.visualFeedbackEnabled,zoomFactorIn:this.zoomFactorIn,zoomFactorOut:this.zoomFactorOut}}};export{n as a};
1
+ import {a}from'./chunk-BRRT6GC7.js';import {b as b$1}from'./chunk-SZUPDKV5.js';import {b}from'./chunk-YO7QRAX6.js';var n=class{constructor(){this.defaultHandMode=b.SparkScan.SparkScanViewSettings.defaultHandMode;this.defaultScanningMode=new b$1("single","default");this.defaultTorchState=b.SparkScan.SparkScanViewSettings.defaultTorchState;this.defaultMiniPreviewSize=b.SparkScan.SparkScanViewSettings.defaultMiniPreviewSize;this.defaultCameraPosition=b.SparkScan.SparkScanViewSettings.defaultCameraPosition;this.hapticEnabled=b.SparkScan.SparkScanViewSettings.hapticEnabled;this.holdToScanEnabled=b.SparkScan.SparkScanViewSettings.holdToScanEnabled;this.inactiveStateTimeout=b.SparkScan.SparkScanViewSettings.inactiveStateTimeout;this.soundEnabled=b.SparkScan.SparkScanViewSettings.soundEnabled;this.toastSettings=new a;this.triggerButtonCollapseTimeout=b.SparkScan.SparkScanViewSettings.triggerButtonCollapseTimeout;this.visualFeedbackEnabled=b.SparkScan.SparkScanViewSettings.visualFeedbackEnabled;this.zoomFactorIn=b.SparkScan.SparkScanViewSettings.zoomFactorIn;this.zoomFactorOut=b.SparkScan.SparkScanViewSettings.zoomFactorOut;}toJSONObject(){return {defaultHandMode:this.defaultHandMode,defaultScanningMode:this.defaultScanningMode.toJSONObject(),defaultTorchState:this.defaultTorchState,defaultMiniPreviewSize:this.defaultMiniPreviewSize,defaultCameraPosition:this.defaultCameraPosition,hapticEnabled:this.hapticEnabled,holdToScanEnabled:this.holdToScanEnabled,inactiveStateTimeout:this.inactiveStateTimeout,soundEnabled:this.soundEnabled,toastSettings:this.toastSettings.toJSONObject(),triggerButtonCollapseTimeout:this.triggerButtonCollapseTimeout,visualFeedbackEnabled:this.visualFeedbackEnabled,zoomFactorIn:this.zoomFactorIn,zoomFactorOut:this.zoomFactorOut}}};export{n as a};
@@ -1 +1 @@
1
- import {a}from'./chunk-B6TRFCTV.js';import {TorchState,isCameraFrameSource,Camera,FrameSourceState,CameraPosition}from'@scandit/web-datacapture-core';var h=class{constructor(e,t,c,n,d){this.torchState=TorchState.Off;this.cameraSupportMap=new Map;this.zoomFactor=1;this.view=e,this.context=t,this.barcodeCheck=c,this.viewSettings=n,this.cameraSettings=d;}get currentCamera(){if(isCameraFrameSource(this.context.frameSource))return this.context.frameSource;throw new Error("The current frame source is not a Camera")}async prepare(){await this.barcodeCheck.setEnabled(!1),this.barcodeCheck.feedback=await a.createWithOptions(!0,!0),this.barcodeCheck.addPrivateListener(this);let e=Camera.atPosition(this.viewSettings.defaultCameraPosition);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.barcodeCheck),this.barcodeCheck.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.barcodeCheck.setEnabled(!0),await this.barcodeCheck.start();}async stopSearching(){var e;this.view.deleteAllViews(),await((e=this.context.frameSource)==null?void 0:e.switchToDesiredState(FrameSourceState.Off)),await this.barcodeCheck.setEnabled(!1),await this.barcodeCheck.stop();}async pauseSearching(){var e;this.view.deletePendingViews(),await((e=this.context.frameSource)==null?void 0:e.switchToDesiredState(FrameSourceState.Standby)),await this.barcodeCheck.setEnabled(!1),await this.barcodeCheck.pause();}emitTappedFeedback(){this.barcodeCheck.feedback.tapped.emit();}didUpdateSession(e,t){Object.keys(t.addedTrackedBarcodes).length>0&&this.barcodeCheck.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(){let e=this.currentCamera.getCurrentState(),t=Camera.atPosition(this.currentCamera.position===CameraPosition.UserFacing?CameraPosition.WorldFacing:CameraPosition.UserFacing);await this.context.setFrameSource(t),await this.currentCamera.switchToDesiredState(e);}};export{h as a};
1
+ import {a}from'./chunk-UOZAN2H7.js';import {TorchState,isCameraFrameSource,Camera,FrameSourceState,CameraPosition}from'@scandit/web-datacapture-core';var h=class{constructor(e,t,c,n,d){this.torchState=TorchState.Off;this.cameraSupportMap=new Map;this.zoomFactor=1;this.view=e,this.context=t,this.barcodeCheck=c,this.viewSettings=n,this.cameraSettings=d;}get currentCamera(){if(isCameraFrameSource(this.context.frameSource))return this.context.frameSource;throw new Error("The current frame source is not a Camera")}async prepare(){await this.barcodeCheck.setEnabled(!1),this.barcodeCheck.feedback=await a.createWithOptions(!0,!0),this.barcodeCheck.addPrivateListener(this);let e=Camera.atPosition(this.viewSettings.defaultCameraPosition);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.barcodeCheck),this.barcodeCheck.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.barcodeCheck.setEnabled(!0),await this.barcodeCheck.start();}async stopSearching(){var e;this.view.deleteAllViews(),await((e=this.context.frameSource)==null?void 0:e.switchToDesiredState(FrameSourceState.Off)),await this.barcodeCheck.setEnabled(!1),await this.barcodeCheck.stop();}async pauseSearching(){var e;this.view.deletePendingViews(),await((e=this.context.frameSource)==null?void 0:e.switchToDesiredState(FrameSourceState.Standby)),await this.barcodeCheck.setEnabled(!1),await this.barcodeCheck.pause();}emitTappedFeedback(){this.barcodeCheck.feedback.tapped.emit();}didUpdateSession(e,t){Object.keys(t.addedTrackedBarcodes).length>0&&this.barcodeCheck.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(){let e=this.currentCamera.getCurrentState(),t=Camera.atPosition(this.currentCamera.position===CameraPosition.UserFacing?CameraPosition.WorldFacing:CameraPosition.UserFacing);await this.context.setFrameSource(t),await this.currentCamera.switchToDesiredState(e);}};export{h as a};
@@ -1 +1 @@
1
- import {a}from'./chunk-44HCLNRQ.js';import {TorchState,FrameSourceState,Camera}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(!1),this.barcodeFind.addPrivateListener(this);let e=Camera.default;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(!0);}async pauseSearching(){var e;this.viewState="paused",await((e=this.context.frameSource)==null?void 0:e.switchToDesiredState(FrameSourceState.Standby)),await this.barcodeFind.setEnabled(!1),await this.barcodeFind.pause(),this.barcodeFindView.setShutterButtonPulse(!1);}async startSearching(){var e;this.viewState="started",await((e=this.context.frameSource)==null?void 0:e.switchToDesiredState(FrameSourceState.On)),await this.barcodeFind.setEnabled(!0),await this.barcodeFind.start();}async stopSearching(){var e;this.viewState="stopped",await this.barcodeFind.setEnabled(!1),await((e=this.context.frameSource)==null?void 0:e.switchToDesiredState(FrameSourceState.Off)),await this.barcodeFind.stop(),this.barcodeFindView.setShutterButtonPulse(!1),this.sessionState=null;}};export{h as a,c as b};
1
+ import {a}from'./chunk-EI4V2NZN.js';import {TorchState,FrameSourceState,Camera}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(!1),this.barcodeFind.addPrivateListener(this);let e=Camera.default;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(!0);}async pauseSearching(){var e;this.viewState="paused",await((e=this.context.frameSource)==null?void 0:e.switchToDesiredState(FrameSourceState.Standby)),await this.barcodeFind.setEnabled(!1),await this.barcodeFind.pause(),this.barcodeFindView.setShutterButtonPulse(!1);}async startSearching(){var e;this.viewState="started",await((e=this.context.frameSource)==null?void 0:e.switchToDesiredState(FrameSourceState.On)),await this.barcodeFind.setEnabled(!0),await this.barcodeFind.start();}async stopSearching(){var e;this.viewState="stopped",await this.barcodeFind.setEnabled(!1),await((e=this.context.frameSource)==null?void 0:e.switchToDesiredState(FrameSourceState.Off)),await this.barcodeFind.stop(),this.barcodeFindView.setShutterButtonPulse(!1),this.sessionState=null;}};export{h as a,c as b};
@@ -1,4 +1,4 @@
1
- import {a}from'./chunk-E2UNDLF3.js';import {a as a$1}from'./chunk-7YWUYXR2.js';import {a as a$3}from'./chunk-5DXIU4KL.js';import {a as a$2}from'./chunk-DQW2EMPB.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 A=(o=>(o.Top="top-center",o.Bottom="bottom-center",o.Left="left-center",o.Right="right-center",o))(A||{}),q=(e=>(e.Small="small",e.Medium="medium",e.Large="large",e))(q||{}),U=(k=>(k.InfoAnnotationTap="BarcodeCheckInfoAnnotationEventTap",k))(U||{}),h="slot[name='header']",p="slot[name='footer']",v="--arrow-background-color",s=class s extends ScanditHTMLElement{constructor(){super();this.isEntireAnnotationTappable=!1;this.annotationTrigger="highlightAndBarcodeScan";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
1
+ import {a}from'./chunk-E2UNDLF3.js';import {a as a$1}from'./chunk-HFF47NXN.js';import {a as a$3}from'./chunk-5DXIU4KL.js';import {a as a$2}from'./chunk-DQW2EMPB.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 A=(o=>(o.Top="top-center",o.Bottom="bottom-center",o.Left="left-center",o.Right="right-center",o))(A||{}),q=(e=>(e.Small="small",e.Medium="medium",e.Large="large",e))(q||{}),U=(k=>(k.InfoAnnotationTap="BarcodeCheckInfoAnnotationEventTap",k))(U||{}),h="slot[name='header']",p="slot[name='footer']",v="--arrow-background-color",s=class s extends ScanditHTMLElement{constructor(){super();this.isEntireAnnotationTappable=!1;this.annotationTrigger="highlightAndBarcodeScan";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
2
2
  class="container arw-${"bottom-center"} ${"small"}"
3
3
  >
4
4
  <slot name="header"></slot>
@@ -1 +1 @@
1
- import {b}from'./chunk-3I3FVXFK.js';import {RadiusLocationSelection,NumberWithUnit}from'@scandit/web-datacapture-core';var S=class{constructor(){this.codeDuplicateFilter=b.SparkScan.SparkScanSettings.codeDuplicateFilter;this.scanIntention="manual";this._scanIntention=this.scanIntention;this.desiredScanIntention=this.scanIntention;this.locationSelection=new RadiusLocationSelection(new NumberWithUnit(b.SparkScan.SparkScanSettings.locationSelection.radius,b.SparkScan.SparkScanSettings.locationSelection.unit));this.properties={};this.symbologies={};return this.enableTargetModeHiddenProperties(1),new Proxy(this,{get:(e,t,o)=>t==="scanIntention"?e._scanIntention:Reflect.get(e,t,o),set:(e,t,o,i)=>(t==="scanIntention"&&(e._scanIntention=o,e.desiredScanIntention=o),Reflect.set(e,t,o,i))})}get enabledSymbologies(){return Object.keys(this.symbologies).filter(t=>{var o;return (o=this.symbologies[t])==null?void 0:o.isEnabled})}settingsForSymbology(e){if(!this.symbologies[e]){let t=b.SymbologySettings[e];t._symbology=e,this.symbologies[e]=t;}return this.symbologies[e]}setProperty(e,t){this.properties[e]=t;}getProperty(e){return this.properties[e]}enableSymbologies(e){for(let t of e)this.enableSymbology(t,!0);}enableSymbology(e,t){this.settingsForSymbology(e).isEnabled=t;}toJSONObject(){var o;let e={},t=Object.keys(this.symbologies);return {codeDuplicateFilter:this.codeDuplicateFilter,locationSelection:this.locationSelection.toJSONObject(),properties:{...this.properties},symbologies:t.reduce((i,r)=>{var a;let s=(a=this.symbologies[r])==null?void 0:a.toJSONObject();return s&&(i[r]=s),i},e),scanIntention:(o=this.scanIntention)!=null?o:null}}setScanIntentionForTargetMode(e){this._scanIntention=e?"manual":this.desiredScanIntention;}enableTargetModeHiddenProperties(e){var o;let t=(o={1:b.SparkScan.SparkScanSettings.hiddenProperties.zoom1x,2:b.SparkScan.SparkScanSettings.hiddenProperties.zoom2x}[e])!=null?o:{};for(let[i,r]of Object.entries(t))this.setProperty(i,r);}disableTargetModeHiddenProperties(){let e={...b.SparkScan.SparkScanSettings.hiddenProperties.zoom1x,...b.SparkScan.SparkScanSettings.hiddenProperties.zoom2x};for(let[t]of Object.entries(e))this.setProperty(t,void 0);}};export{S as a};
1
+ import {b}from'./chunk-YO7QRAX6.js';import {RadiusLocationSelection,NumberWithUnit}from'@scandit/web-datacapture-core';var S=class{constructor(){this.codeDuplicateFilter=b.SparkScan.SparkScanSettings.codeDuplicateFilter;this.scanIntention="manual";this._scanIntention=this.scanIntention;this.desiredScanIntention=this.scanIntention;this.locationSelection=new RadiusLocationSelection(new NumberWithUnit(b.SparkScan.SparkScanSettings.locationSelection.radius,b.SparkScan.SparkScanSettings.locationSelection.unit));this.properties={};this.symbologies={};return this.enableTargetModeHiddenProperties(1),new Proxy(this,{get:(e,t,o)=>t==="scanIntention"?e._scanIntention:Reflect.get(e,t,o),set:(e,t,o,i)=>(t==="scanIntention"&&(e._scanIntention=o,e.desiredScanIntention=o),Reflect.set(e,t,o,i))})}get enabledSymbologies(){return Object.keys(this.symbologies).filter(t=>{var o;return (o=this.symbologies[t])==null?void 0:o.isEnabled})}settingsForSymbology(e){if(!this.symbologies[e]){let t=b.SymbologySettings[e];t._symbology=e,this.symbologies[e]=t;}return this.symbologies[e]}setProperty(e,t){this.properties[e]=t;}getProperty(e){return this.properties[e]}enableSymbologies(e){for(let t of e)this.enableSymbology(t,!0);}enableSymbology(e,t){this.settingsForSymbology(e).isEnabled=t;}toJSONObject(){var o;let e={},t=Object.keys(this.symbologies);return {codeDuplicateFilter:this.codeDuplicateFilter,locationSelection:this.locationSelection.toJSONObject(),properties:{...this.properties},symbologies:t.reduce((i,r)=>{var a;let s=(a=this.symbologies[r])==null?void 0:a.toJSONObject();return s&&(i[r]=s),i},e),scanIntention:(o=this.scanIntention)!=null?o:null}}setScanIntentionForTargetMode(e){this._scanIntention=e?"manual":this.desiredScanIntention;}enableTargetModeHiddenProperties(e){var o;let t=(o={1:b.SparkScan.SparkScanSettings.hiddenProperties.zoom1x,2:b.SparkScan.SparkScanSettings.hiddenProperties.zoom2x}[e])!=null?o:{};for(let[i,r]of Object.entries(t))this.setProperty(i,r);}disableTargetModeHiddenProperties(){let e={...b.SparkScan.SparkScanSettings.hiddenProperties.zoom1x,...b.SparkScan.SparkScanSettings.hiddenProperties.zoom2x};for(let[t]of Object.entries(e))this.setProperty(t,void 0);}};export{S as a};
@@ -0,0 +1 @@
1
+ import {a as a$1}from'./chunk-DQT257RV.js';import {a}from'./chunk-LKZBVQXD.js';import {Localization}from'@scandit/web-datacapture-core';import {normalizeLibraryLocation}from'@scandit/web-datacapture-core/build/js/private/Helper.js';function b(r){return Localization.getInstance().updateIfMissing({...a}),r!=null&&r.libraryLocation&&(r.libraryLocation=normalizeLibraryLocation(r.libraryLocation)),{moduleName:"BarcodeCapture",load:async n=>{var e,o;let a=n;return await a$1.create({...a,libraryLocation:(e=r==null?void 0:r.libraryLocation)!=null?e:a.libraryLocation,highEndBlurryRecognition:(o=r==null?void 0:r.highEndBlurryRecognition)!=null?o:!1})}}}export{b as a};
@@ -1 +1 @@
1
- import {a}from'./chunk-TBCQMBEE.js';var s=class i{get frameSequenceId(){return this._frameSequenceId}get addedTrackedBarcodes(){return this._addedTrackedBarcodes}get removedTrackedBarcodes(){return this._removedTrackedBarcodes}get allTrackedBarcodes(){return this._allTrackedBarcodes}static fromJSON(d){let r=new i;r._frameSequenceId=d.frameSequenceId;let a$1=(e,[c,n])=>{let o=a.fromJSON(n);return e[o.identifier]=o,e};return r._addedTrackedBarcodes=Object.entries(d.addedTrackedBarcodes).reduce((e,c)=>a$1(e,c),{}),r._allTrackedBarcodes=Object.entries(d.allTrackedBarcodes).reduce((e,c)=>a$1(e,c),{}),r._removedTrackedBarcodes=d.removedTrackedBarcodes,r}};export{s as a};
1
+ import {a}from'./chunk-DORFGC2X.js';var s=class i{get frameSequenceId(){return this._frameSequenceId}get addedTrackedBarcodes(){return this._addedTrackedBarcodes}get removedTrackedBarcodes(){return this._removedTrackedBarcodes}get allTrackedBarcodes(){return this._allTrackedBarcodes}static fromJSON(d){let r=new i;r._frameSequenceId=d.frameSequenceId;let a$1=(e,[c,n])=>{let o=a.fromJSON(n);return e[o.identifier]=o,e};return r._addedTrackedBarcodes=Object.entries(d.addedTrackedBarcodes).reduce((e,c)=>a$1(e,c),{}),r._allTrackedBarcodes=Object.entries(d.allTrackedBarcodes).reduce((e,c)=>a$1(e,c),{}),r._removedTrackedBarcodes=d.removedTrackedBarcodes,r}};export{s as a};
@@ -1 +1 @@
1
- import {a}from'./chunk-QHNNJFNX.js';import {b}from'./chunk-3I3FVXFK.js';import {CameraSettings,convertToPublicFrameData,Logger}from'@scandit/web-datacapture-core';var c=class S{constructor(){this.type="sparkScan";this._isEnabled=!0;this._isSuppressed=!1;this._context=null;this.listeners=new Set;this.allowedRemainingWorkerMessages=new Set;this.workerMessageListener=this.onWorkerMessage.bind(this);}static get recommendedCameraSettings(){return new CameraSettings(b.SparkScan.CameraSettings.settings)}get context(){return this._context}static forSettings(e){let a=new S;return a.settings=e,a}isEnabled(){return this._isEnabled&&!this._isSuppressed}async setEnabled(e){this._isEnabled=e,await this.notifyContext();}async setResultSuppressionEnabled(e){this._isSuppressed=e,await this.notifyContext();}async applySettings(e){return this.settings=e,this.notifyContext()}addListener(e){this.listeners.add(e);}removeListener(e){this.listeners.delete(e);}toJSONObject(){return {type:this.type,enabled:this._isEnabled,settings:this.settings.toJSONObject(),isSuppressed:this._isSuppressed}}async workerCommand(e,a){this.context&&await this.context.workerCommand(e,a);}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){queueMicrotask(()=>{var a;(a=this.context)==null||a.workerCommand("deleteFrameData",{frameId:e});});}async onDidScan(e){if(this.context==null)return;let a$1=a.fromJSON(e.payload.session),{frameData:t}=e.payload;if(!this._isEnabled){this.sendClearFrameDataRequest(t.frameId),this.allowedRemainingWorkerMessages.clear();return}this.allowedRemainingWorkerMessages.add("successFeedback");let s=[];for(let r of this.listeners)if(r.didScan)try{let i=r.didScan(this,a$1,convertToPublicFrameData(t,this.context));i instanceof Promise&&await i;}catch(i){s.push(i);}this.sendClearFrameDataRequest(t.frameId),this.allowedRemainingWorkerMessages.add("sparkScanDidUpdateSession");for(let r of s)Logger.log(Logger.Level.Error,r);}onDidUpdateSession(e){var t;let a$1=a.fromJSON(e.payload);if(!(!this._isEnabled&&!this.allowedRemainingWorkerMessages.has(e.type))){this.allowedRemainingWorkerMessages.delete(e.type);for(let s of this.listeners)(t=s.didUpdateSession)==null||t.call(s,this,a$1);}}async onWorkerMessage(e){switch(e.type){case"sparkScanDidScan":{this.onDidScan(e);break}case"sparkScanDidUpdateSession":{this.onDidUpdateSession(e);break}}}async notifyContext(){this.context&&await this.context.update();}};export{c as a};
1
+ import {a}from'./chunk-QHNNJFNX.js';import {b}from'./chunk-YO7QRAX6.js';import {CameraSettings,convertToPublicFrameData,Logger}from'@scandit/web-datacapture-core';var c=class S{constructor(){this.type="sparkScan";this._isEnabled=!0;this._isSuppressed=!1;this._context=null;this.listeners=new Set;this.allowedRemainingWorkerMessages=new Set;this.workerMessageListener=this.onWorkerMessage.bind(this);}static get recommendedCameraSettings(){return new CameraSettings(b.SparkScan.CameraSettings.settings)}get context(){return this._context}static forSettings(e){let a=new S;return a.settings=e,a}isEnabled(){return this._isEnabled&&!this._isSuppressed}async setEnabled(e){this._isEnabled=e,await this.notifyContext();}async setResultSuppressionEnabled(e){this._isSuppressed=e,await this.notifyContext();}async applySettings(e){return this.settings=e,this.notifyContext()}addListener(e){this.listeners.add(e);}removeListener(e){this.listeners.delete(e);}toJSONObject(){return {type:this.type,enabled:this._isEnabled,settings:this.settings.toJSONObject(),isSuppressed:this._isSuppressed}}async workerCommand(e,a){this.context&&await this.context.workerCommand(e,a);}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){queueMicrotask(()=>{var a;(a=this.context)==null||a.workerCommand("deleteFrameData",{frameId:e});});}async onDidScan(e){if(this.context==null)return;let a$1=a.fromJSON(e.payload.session),{frameData:t}=e.payload;if(!this._isEnabled){this.sendClearFrameDataRequest(t.frameId),this.allowedRemainingWorkerMessages.clear();return}this.allowedRemainingWorkerMessages.add("successFeedback");let s=[];for(let r of this.listeners)if(r.didScan)try{let i=r.didScan(this,a$1,convertToPublicFrameData(t,this.context));i instanceof Promise&&await i;}catch(i){s.push(i);}this.sendClearFrameDataRequest(t.frameId),this.allowedRemainingWorkerMessages.add("sparkScanDidUpdateSession");for(let r of s)Logger.log(Logger.Level.Error,r);}onDidUpdateSession(e){var t;let a$1=a.fromJSON(e.payload);if(!(!this._isEnabled&&!this.allowedRemainingWorkerMessages.has(e.type))){this.allowedRemainingWorkerMessages.delete(e.type);for(let s of this.listeners)(t=s.didUpdateSession)==null||t.call(s,this,a$1);}}async onWorkerMessage(e){switch(e.type){case"sparkScanDidScan":{this.onDidScan(e);break}case"sparkScanDidUpdateSession":{this.onDidUpdateSession(e);break}}}async notifyContext(){this.context&&await this.context.update();}};export{c as a};
@@ -1,4 +1,4 @@
1
- import {e}from'./chunk-YBD5JYCX.js';import {ScanditHTMLElement,defineCustomElements,Timeout,html}from'@scandit/web-datacapture-core/build/js/private/utils/index.js';var a=class extends ScanditHTMLElement{get type(){var e;return (e=this.getAttribute("type"))!=null?e:"info"}set type(e){this.setAttribute("type",e);}get message(){var e;return (e=this.getAttribute("message"))!=null?e:""}set message(e){this.setAttribute("message",e);}get visible(){return this.hasAttribute("visible")}set visible(e){this.toggleAttribute("visible",e);}static create(){return defineCustomElements({[e]:this}),document.createElement(e)}show(e,i,s){this.hide(),this.type=e,this.message=i,this.visible=!0,this.timeout=new Timeout(s,this.hide.bind(this)),this.timeout.start();}hide(){var e;(e=this.timeout)==null||e.stop(),this.visible=!1;}render(){this.innerHTML=html`
1
+ import {e}from'./chunk-YBD5JYCX.js';import {ScanditHTMLElement,defineCustomElements,Timeout,html}from'@scandit/web-datacapture-core/build/js/private/utils/index.js';var i=class i extends ScanditHTMLElement{get type(){var e;return (e=this.getAttribute("type"))!=null?e:"info"}set type(e){this.setAttribute("type",e);}get message(){var e;return (e=this.getAttribute("message"))!=null?e:""}set message(e){this.setAttribute("message",e);}get visible(){return this.hasAttribute("visible")}set visible(e){this.toggleAttribute("visible",e);}static create(){return defineCustomElements({[e]:i}),document.createElement(e)}show(e,s,a){this.hide(),this.type=e,this.message=s,this.visible=!0,this.timeout=new Timeout(a,this.hide.bind(this)),this.timeout.start();}hide(){var e;(e=this.timeout)==null||e.stop(),this.visible=!1;}render(){this.innerHTML=html`
2
2
  <div class="${e} ${e}--${this.type}">${this.message}</div>
3
3
 
4
4
  <style>
@@ -38,4 +38,4 @@ import {e}from'./chunk-YBD5JYCX.js';import {ScanditHTMLElement,defineCustomEleme
38
38
  color: white;
39
39
  }
40
40
  </style>
41
- `;}connectedCallback(){this.render();}disconnectedCallback(){this.hide();}attributeChangedCallback(e,i,s){s!==i&&this.render();}};a.observedAttributes=["type","message"];export{a};
41
+ `;}connectedCallback(){this.render();}disconnectedCallback(){this.hide();}attributeChangedCallback(e,s,a){a!==s&&this.render();}};i.observedAttributes=["type","message"];var r=i;export{r as a};