@oiz/stzh-components 3.1.0 → 3.2.0-beta1

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 (673) hide show
  1. package/dist/cjs/{app-globals-0699ef40.js → app-globals-efe6d21d.js} +2 -2
  2. package/dist/cjs/{app-globals-0699ef40.js.map → app-globals-efe6d21d.js.map} +1 -1
  3. package/dist/cjs/index-92254d32.js +28 -16
  4. package/dist/cjs/index.cjs.js.map +1 -1
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/stzh-accordion_3.cjs.entry.js +24 -8
  7. package/dist/cjs/stzh-accordion_3.cjs.entry.js.map +1 -1
  8. package/dist/cjs/stzh-actions.cjs.entry.js +1 -1
  9. package/dist/cjs/stzh-anchornav.cjs.entry.js +4 -3
  10. package/dist/cjs/stzh-anchornav.cjs.entry.js.map +1 -1
  11. package/dist/cjs/stzh-app-bar.cjs.entry.js +48 -0
  12. package/dist/cjs/stzh-app-bar.cjs.entry.js.map +1 -0
  13. package/dist/cjs/stzh-appointments.cjs.entry.js +1 -1
  14. package/dist/cjs/stzh-audio.cjs.entry.js +1 -1
  15. package/dist/cjs/stzh-badge_3.cjs.entry.js +1 -1
  16. package/dist/cjs/stzh-card-navigation.cjs.entry.js +1 -1
  17. package/dist/cjs/stzh-card-searchresult.cjs.entry.js +1 -1
  18. package/dist/cjs/stzh-card-superteaser.cjs.entry.js +1 -1
  19. package/dist/cjs/stzh-card_2.cjs.entry.js +8 -2
  20. package/dist/cjs/stzh-card_2.cjs.entry.js.map +1 -1
  21. package/dist/cjs/stzh-carousel.cjs.entry.js +1 -1
  22. package/dist/cjs/stzh-checkbox.cjs.entry.js +1 -1
  23. package/dist/cjs/stzh-checkboxgroup.cjs.entry.js +1 -1
  24. package/dist/cjs/stzh-chip.cjs.entry.js +22 -32
  25. package/dist/cjs/stzh-chip.cjs.entry.js.map +1 -1
  26. package/dist/cjs/stzh-components.cjs.js +2 -2
  27. package/dist/cjs/stzh-contact-cv.cjs.entry.js +63 -0
  28. package/dist/cjs/stzh-contact-cv.cjs.entry.js.map +1 -0
  29. package/dist/cjs/stzh-contact.cjs.entry.js +5 -3
  30. package/dist/cjs/stzh-contact.cjs.entry.js.map +1 -1
  31. package/dist/cjs/stzh-container.cjs.entry.js +1 -1
  32. package/dist/cjs/stzh-container.cjs.entry.js.map +1 -1
  33. package/dist/cjs/stzh-cspace.cjs.entry.js +2 -2
  34. package/dist/cjs/stzh-cspace.cjs.entry.js.map +1 -1
  35. package/dist/cjs/stzh-cta.cjs.entry.js +1 -1
  36. package/dist/cjs/stzh-datatable.cjs.entry.js +1 -1
  37. package/dist/cjs/stzh-datepicker_3.cjs.entry.js +1 -1
  38. package/dist/cjs/stzh-datepicker_3.cjs.entry.js.map +1 -1
  39. package/dist/cjs/stzh-daterange.cjs.entry.js +1 -1
  40. package/dist/cjs/stzh-details.cjs.entry.js +1 -1
  41. package/dist/cjs/stzh-dialog.cjs.entry.js +1 -1
  42. package/dist/cjs/stzh-dialog.cjs.entry.js.map +1 -1
  43. package/dist/cjs/stzh-disturber.cjs.entry.js +1 -1
  44. package/dist/cjs/stzh-dropdown.cjs.entry.js +1 -1
  45. package/dist/cjs/stzh-eventinfo.cjs.entry.js +1 -1
  46. package/dist/cjs/stzh-figure.cjs.entry.js +1 -1
  47. package/dist/cjs/stzh-footer.cjs.entry.js +2 -2
  48. package/dist/cjs/stzh-footer.cjs.entry.js.map +1 -1
  49. package/dist/cjs/stzh-ghettobox_3.cjs.entry.js +27 -19
  50. package/dist/cjs/stzh-ghettobox_3.cjs.entry.js.map +1 -1
  51. package/dist/cjs/stzh-header.cjs.entry.js +2 -2
  52. package/dist/cjs/stzh-header.cjs.entry.js.map +1 -1
  53. package/dist/cjs/stzh-homepage-service-highlights.cjs.entry.js +1 -1
  54. package/dist/cjs/stzh-homepage-service-highlights.cjs.entry.js.map +1 -1
  55. package/dist/cjs/stzh-iframe.cjs.entry.js +2881 -24
  56. package/dist/cjs/stzh-iframe.cjs.entry.js.map +1 -1
  57. package/dist/cjs/stzh-input.cjs.entry.js +8 -4
  58. package/dist/cjs/stzh-input.cjs.entry.js.map +1 -1
  59. package/dist/cjs/stzh-link.cjs.entry.js +1 -1
  60. package/dist/cjs/{stzh-list.cjs.entry.js → stzh-list_2.cjs.entry.js} +20 -1
  61. package/dist/cjs/stzh-list_2.cjs.entry.js.map +1 -0
  62. package/dist/cjs/stzh-menu_2.cjs.entry.js +1 -1
  63. package/dist/cjs/stzh-pagecontent.cjs.entry.js +1 -1
  64. package/dist/cjs/stzh-pagetitle-hero.cjs.entry.js +1 -1
  65. package/dist/cjs/stzh-pagetitle-home.cjs.entry.js +2 -2
  66. package/dist/cjs/stzh-pagetitle-home.cjs.entry.js.map +1 -1
  67. package/dist/cjs/stzh-pagetitle.cjs.entry.js +2 -2
  68. package/dist/cjs/stzh-pagetitle.cjs.entry.js.map +1 -1
  69. package/dist/cjs/stzh-panorama.cjs.entry.js +1 -1
  70. package/dist/cjs/stzh-panorama.cjs.entry.js.map +1 -1
  71. package/dist/cjs/stzh-pi-content-navigation.cjs.entry.js +1 -1
  72. package/dist/cjs/stzh-pi-pagetitle.cjs.entry.js +1 -1
  73. package/dist/cjs/stzh-pi-teaser.cjs.entry.js +1 -1
  74. package/dist/cjs/stzh-popover_2.cjs.entry.js +90 -67
  75. package/dist/cjs/stzh-popover_2.cjs.entry.js.map +1 -1
  76. package/dist/cjs/stzh-print_2.cjs.entry.js +1 -1
  77. package/dist/cjs/stzh-ratio.cjs.entry.js +1 -1
  78. package/dist/cjs/stzh-ratio.cjs.entry.js.map +1 -1
  79. package/dist/cjs/stzh-readspeaker.cjs.entry.js +1 -1
  80. package/dist/cjs/stzh-scrollup.cjs.entry.js +6 -6
  81. package/dist/cjs/stzh-scrollup.cjs.entry.js.map +1 -1
  82. package/dist/cjs/stzh-search.cjs.entry.js +1 -1
  83. package/dist/cjs/stzh-section.cjs.entry.js +1 -1
  84. package/dist/cjs/stzh-section.cjs.entry.js.map +1 -1
  85. package/dist/cjs/stzh-skin-portal-mitwirken.cjs.entry.js +1 -1
  86. package/dist/cjs/stzh-skin-portal-mitwirken.cjs.entry.js.map +1 -1
  87. package/dist/cjs/stzh-sticky-actions.cjs.entry.js +9 -8
  88. package/dist/cjs/stzh-sticky-actions.cjs.entry.js.map +1 -1
  89. package/dist/cjs/stzh-sticky.cjs.entry.js +1 -1
  90. package/dist/cjs/stzh-table.cjs.entry.js +1 -1
  91. package/dist/cjs/stzh-textandimage.cjs.entry.js +1 -1
  92. package/dist/cjs/stzh-timeline-item.cjs.entry.js +1 -1
  93. package/dist/cjs/stzh-toast.cjs.entry.js +1 -1
  94. package/dist/cjs/stzh-toggle.cjs.entry.js +1 -1
  95. package/dist/cjs/stzh-tooltip.cjs.entry.js +2 -2
  96. package/dist/cjs/stzh-tooltip.cjs.entry.js.map +1 -1
  97. package/dist/cjs/stzh-twocolumns.cjs.entry.js +1 -1
  98. package/dist/cjs/stzh-upload.cjs.entry.js +3101 -7
  99. package/dist/cjs/stzh-upload.cjs.entry.js.map +1 -1
  100. package/dist/cjs/stzh-vbz-carousel.cjs.entry.js +1 -1
  101. package/dist/cjs/stzh-vbz-carousel.cjs.entry.js.map +1 -1
  102. package/dist/cjs/stzh-vbz-connection-finder.cjs.entry.js +25 -0
  103. package/dist/cjs/stzh-vbz-connection-finder.cjs.entry.js.map +1 -0
  104. package/dist/cjs/stzh-vbz-intro.cjs.entry.js +58 -0
  105. package/dist/cjs/stzh-vbz-intro.cjs.entry.js.map +1 -0
  106. package/dist/cjs/stzh-vbz-linechip.cjs.entry.js +1 -1
  107. package/dist/cjs/stzh-vbz-linechip.cjs.entry.js.map +1 -1
  108. package/dist/cjs/stzh-vbz-ticker.cjs.entry.js +33 -44
  109. package/dist/cjs/stzh-vbz-ticker.cjs.entry.js.map +1 -1
  110. package/dist/cjs/{utils-d0fff87f.js → utils-d091c010.js} +40 -9
  111. package/dist/cjs/utils-d091c010.js.map +1 -0
  112. package/dist/collection/assets/i18n/de.json +22 -7
  113. package/dist/collection/assets/i18n/en.json +22 -7
  114. package/dist/collection/assets/media/icons/mono/construction.svg +1 -1
  115. package/dist/collection/assets/media/icons/mono/crop.svg +1 -0
  116. package/dist/collection/assets/meta/icons-preview.html +6 -1
  117. package/dist/collection/assets/mock/appl/mobiscan/publicEndpoint/image/retreive-pdf +5 -0
  118. package/dist/collection/assets/mock/appl/mobiscan/publicEndpoint/ping +3 -0
  119. package/dist/collection/assets/mock/appl/mobiscan/publicEndpoint/url +3 -0
  120. package/dist/collection/assets/mock/appl/mobiscan/rs/auth +4 -0
  121. package/dist/collection/assets/mock/appl/mobiscan/rs/config +5 -0
  122. package/dist/collection/assets/vendors/iframe-resizer/iframeResizer.contentWindow.js +1311 -0
  123. package/dist/collection/collection-manifest.json +4 -0
  124. package/dist/collection/components/stzh-accordion/stzh-accordion.css +39 -0
  125. package/dist/collection/components/stzh-accordion/stzh-accordion.js +20 -0
  126. package/dist/collection/components/stzh-accordion/stzh-accordion.js.map +1 -1
  127. package/dist/collection/components/stzh-accordion-item/stzh-accordion-item.css +5 -0
  128. package/dist/collection/components/stzh-anchornav/stzh-anchornav.js +5 -4
  129. package/dist/collection/components/stzh-anchornav/stzh-anchornav.js.map +1 -1
  130. package/dist/collection/components/stzh-app-bar/stzh-app-bar.css +253 -0
  131. package/dist/collection/components/stzh-app-bar/stzh-app-bar.e2e.js +16 -0
  132. package/dist/collection/components/stzh-app-bar/stzh-app-bar.e2e.js.map +1 -0
  133. package/dist/collection/components/stzh-app-bar/stzh-app-bar.js +54 -0
  134. package/dist/collection/components/stzh-app-bar/stzh-app-bar.js.map +1 -0
  135. package/dist/collection/components/stzh-app-bar/stzh-app-bar.stories.js +45 -0
  136. package/dist/collection/components/stzh-cardlist/stzh-cardlist.css +5 -0
  137. package/dist/collection/components/stzh-cardlist/stzh-cardlist.js +9 -2
  138. package/dist/collection/components/stzh-cardlist/stzh-cardlist.js.map +1 -1
  139. package/dist/collection/components/stzh-chip/stzh-chip.js +23 -33
  140. package/dist/collection/components/stzh-chip/stzh-chip.js.map +1 -1
  141. package/dist/collection/components/stzh-contact/stzh-contact.css +47 -15
  142. package/dist/collection/components/stzh-contact/stzh-contact.js +21 -1
  143. package/dist/collection/components/stzh-contact/stzh-contact.js.map +1 -1
  144. package/dist/collection/components/stzh-contact/stzh-contact.stories.js +68 -49
  145. package/dist/collection/components/stzh-contact-cv/stzh-contact-cv.css +196 -0
  146. package/dist/collection/components/stzh-contact-cv/stzh-contact-cv.e2e.js +16 -0
  147. package/dist/collection/components/stzh-contact-cv/stzh-contact-cv.e2e.js.map +1 -0
  148. package/dist/collection/components/stzh-contact-cv/stzh-contact-cv.js +163 -0
  149. package/dist/collection/components/stzh-contact-cv/stzh-contact-cv.js.map +1 -0
  150. package/dist/collection/components/stzh-contact-cv/stzh-contact-cv.localization.js +2 -0
  151. package/dist/collection/components/stzh-contact-cv/stzh-contact-cv.localization.js.map +1 -0
  152. package/dist/collection/components/stzh-contact-cv/stzh-contact-cv.stories.js +52 -0
  153. package/dist/collection/components/stzh-container/stzh-container.css +2 -1
  154. package/dist/collection/components/stzh-cspace/stzh-cspace.css +53 -0
  155. package/dist/collection/components/stzh-datepicker/stzh-datepicker.js +1 -1
  156. package/dist/collection/components/stzh-datepicker/stzh-datepicker.js.map +1 -1
  157. package/dist/collection/components/stzh-footer/stzh-footer.css +10 -2
  158. package/dist/collection/components/stzh-header/stzh-header.css +19 -3
  159. package/dist/collection/components/stzh-homepage-service-highlights/stzh-homepage-service-highlights.css +14 -3
  160. package/dist/collection/components/stzh-homepage-service-highlights/stzh-homepage-service-highlights.stories.js +1 -1
  161. package/dist/collection/components/stzh-iframe/stzh-iframe.css +8 -1
  162. package/dist/collection/components/stzh-iframe/stzh-iframe.js +139 -26
  163. package/dist/collection/components/stzh-iframe/stzh-iframe.js.map +1 -1
  164. package/dist/collection/components/stzh-iframe/stzh-iframe.stories.js +30 -11
  165. package/dist/collection/components/stzh-input/stzh-input.css +1 -1
  166. package/dist/collection/components/stzh-input/stzh-input.js +8 -3
  167. package/dist/collection/components/stzh-input/stzh-input.js.map +1 -1
  168. package/dist/collection/components/stzh-pagetitle/stzh-pagetitle.css +2 -1
  169. package/dist/collection/components/stzh-pagetitle-home/stzh-pagetitle-home.css +19 -0
  170. package/dist/collection/components/stzh-pagination/stzh-pagination.css +11 -1
  171. package/dist/collection/components/stzh-pagination/stzh-pagination.js +43 -6
  172. package/dist/collection/components/stzh-pagination/stzh-pagination.js.map +1 -1
  173. package/dist/collection/components/stzh-panorama/stzh-panorama.js +1 -1
  174. package/dist/collection/components/stzh-panorama/stzh-panorama.js.map +1 -1
  175. package/dist/collection/components/stzh-popover/stzh-popover.js +101 -75
  176. package/dist/collection/components/stzh-popover/stzh-popover.js.map +1 -1
  177. package/dist/collection/components/stzh-ratio/stzh-ratio.css +6 -0
  178. package/dist/collection/components/stzh-richtext/stzh-richtext.js +28 -20
  179. package/dist/collection/components/stzh-richtext/stzh-richtext.js.map +1 -1
  180. package/dist/collection/components/stzh-richtext/stzh-richtext.stories.js +15 -6
  181. package/dist/collection/components/stzh-scrollup/stzh-scrollup.js +6 -6
  182. package/dist/collection/components/stzh-scrollup/stzh-scrollup.js.map +1 -1
  183. package/dist/collection/components/stzh-section/stzh-section.css +134 -1
  184. package/dist/collection/components/stzh-section/stzh-section.js +2 -2
  185. package/dist/collection/components/stzh-section/stzh-section.js.map +1 -1
  186. package/dist/collection/components/stzh-skin-portal-mitwirken/stzh-skin-portal-mitwirken.css +206 -22
  187. package/dist/collection/components/stzh-sticky-actions/stzh-sticky-actions.css +4 -0
  188. package/dist/collection/components/stzh-sticky-actions/stzh-sticky-actions.js +11 -9
  189. package/dist/collection/components/stzh-sticky-actions/stzh-sticky-actions.js.map +1 -1
  190. package/dist/collection/components/stzh-tooltip/stzh-tooltip.css +8 -4
  191. package/dist/collection/components/stzh-upload/models/stzh-photographing-configuration.dto.js +2 -0
  192. package/dist/collection/components/stzh-upload/models/stzh-photographing-configuration.dto.js.map +1 -0
  193. package/dist/collection/components/stzh-upload/models/stzh-photographing-pdf-file.dto.js +3 -0
  194. package/dist/collection/components/stzh-upload/models/stzh-photographing-pdf-file.dto.js.map +1 -0
  195. package/dist/collection/components/stzh-upload/models/stzh-photographing-url-details.dto.js +2 -0
  196. package/dist/collection/components/stzh-upload/models/stzh-photographing-url-details.dto.js.map +1 -0
  197. package/dist/collection/components/stzh-upload/stzh-upload.css +84 -11
  198. package/dist/collection/components/stzh-upload/stzh-upload.js +274 -4
  199. package/dist/collection/components/stzh-upload/stzh-upload.js.map +1 -1
  200. package/dist/collection/components/stzh-upload/stzh-upload.localization.js.map +1 -1
  201. package/dist/collection/components/stzh-upload/stzh-upload.stories.js +13 -7
  202. package/dist/collection/components/stzh-vbz-carousel/stzh-vbz-carousel.css +6 -4
  203. package/dist/collection/components/stzh-vbz-carousel/stzh-vbz-carousel.stories.js +2 -5
  204. package/dist/collection/components/stzh-vbz-connection-finder/stzh-vbz-connection-finder.css +192 -0
  205. package/dist/collection/components/stzh-vbz-connection-finder/stzh-vbz-connection-finder.e2e.js +18 -0
  206. package/dist/collection/components/stzh-vbz-connection-finder/stzh-vbz-connection-finder.e2e.js.map +1 -0
  207. package/dist/collection/components/stzh-vbz-connection-finder/stzh-vbz-connection-finder.js +26 -0
  208. package/dist/collection/components/stzh-vbz-connection-finder/stzh-vbz-connection-finder.js.map +1 -0
  209. package/dist/collection/components/stzh-vbz-connection-finder/stzh-vbz-connection-finder.stories.js +39 -0
  210. package/dist/collection/components/stzh-vbz-intro/stzh-vbz-intro.css +341 -0
  211. package/dist/collection/components/stzh-vbz-intro/stzh-vbz-intro.e2e.js +16 -0
  212. package/dist/collection/components/stzh-vbz-intro/stzh-vbz-intro.e2e.js.map +1 -0
  213. package/dist/collection/components/stzh-vbz-intro/stzh-vbz-intro.js +110 -0
  214. package/dist/collection/components/stzh-vbz-intro/stzh-vbz-intro.js.map +1 -0
  215. package/dist/collection/components/stzh-vbz-intro/stzh-vbz-intro.localization.js +2 -0
  216. package/dist/collection/components/stzh-vbz-intro/stzh-vbz-intro.localization.js.map +1 -0
  217. package/dist/collection/components/stzh-vbz-intro/stzh-vbz-intro.stories.js +75 -0
  218. package/dist/collection/components/stzh-vbz-linechip/stzh-vbz-linechip.css +3 -3
  219. package/dist/collection/components/stzh-vbz-majorticker/stzh-vbz-majorticker.stories.js +8 -10
  220. package/dist/collection/components/stzh-vbz-ticker/stzh-vbz-ticker.css +17 -21
  221. package/dist/collection/components/stzh-vbz-ticker/stzh-vbz-ticker.js +34 -45
  222. package/dist/collection/components/stzh-vbz-ticker/stzh-vbz-ticker.js.map +1 -1
  223. package/dist/collection/components/stzh-vbz-ticker/stzh-vbz-ticker.localization.js.map +1 -1
  224. package/dist/collection/components/stzh-vbz-ticker/stzh-vbz-ticker.stories.js +10 -12
  225. package/dist/collection/index.js.map +1 -1
  226. package/dist/collection/pages/mkz/mkz.e2e.js +16 -0
  227. package/dist/collection/pages/mkz/mkz.e2e.js.map +1 -0
  228. package/dist/collection/pages/upload-photographing/upload-photographing.e2e.js +16 -0
  229. package/dist/collection/pages/upload-photographing/upload-photographing.e2e.js.map +1 -0
  230. package/dist/collection/patterns/contact-accordion/contact-accordion.e2e.js +21 -0
  231. package/dist/collection/patterns/contact-accordion/contact-accordion.e2e.js.map +1 -0
  232. package/dist/collection/patterns/poi/poi.e2e.js +21 -0
  233. package/dist/collection/patterns/poi/poi.e2e.js.map +1 -0
  234. package/dist/collection/utils/utils.js +38 -8
  235. package/dist/collection/utils/utils.js.map +1 -1
  236. package/dist/components/index.js +1 -1
  237. package/dist/components/index2.js.map +1 -1
  238. package/dist/components/stzh-accordion-item2.js +1 -1
  239. package/dist/components/stzh-accordion-item2.js.map +1 -1
  240. package/dist/components/stzh-accordion2.js +17 -1
  241. package/dist/components/stzh-accordion2.js.map +1 -1
  242. package/dist/components/stzh-anchornav.js +4 -3
  243. package/dist/components/stzh-anchornav.js.map +1 -1
  244. package/dist/components/stzh-app-bar.d.ts +11 -0
  245. package/dist/components/stzh-app-bar.js +60 -0
  246. package/dist/components/stzh-app-bar.js.map +1 -0
  247. package/dist/components/stzh-cardlist2.js +9 -2
  248. package/dist/components/stzh-cardlist2.js.map +1 -1
  249. package/dist/components/stzh-chip2.js +22 -32
  250. package/dist/components/stzh-chip2.js.map +1 -1
  251. package/dist/components/stzh-contact-cv.d.ts +11 -0
  252. package/dist/components/stzh-contact-cv.js +102 -0
  253. package/dist/components/stzh-contact-cv.js.map +1 -0
  254. package/dist/components/stzh-contact.js +5 -2
  255. package/dist/components/stzh-contact.js.map +1 -1
  256. package/dist/components/stzh-container.js +1 -1
  257. package/dist/components/stzh-container.js.map +1 -1
  258. package/dist/components/stzh-cspace.js +1 -1
  259. package/dist/components/stzh-cspace.js.map +1 -1
  260. package/dist/components/stzh-datepicker2.js.map +1 -1
  261. package/dist/components/stzh-dialog.js +1 -226
  262. package/dist/components/stzh-dialog.js.map +1 -1
  263. package/dist/components/stzh-dialog2.js +230 -0
  264. package/dist/components/stzh-dialog2.js.map +1 -0
  265. package/dist/components/stzh-footer.js +1 -1
  266. package/dist/components/stzh-footer.js.map +1 -1
  267. package/dist/components/stzh-header.js +1 -1
  268. package/dist/components/stzh-header.js.map +1 -1
  269. package/dist/components/stzh-homepage-service-highlights.js +1 -1
  270. package/dist/components/stzh-homepage-service-highlights.js.map +1 -1
  271. package/dist/components/stzh-iframe2.js +2883 -23
  272. package/dist/components/stzh-iframe2.js.map +1 -1
  273. package/dist/components/stzh-input2.js +9 -4
  274. package/dist/components/stzh-input2.js.map +1 -1
  275. package/dist/components/stzh-list-item.js +1 -34
  276. package/dist/components/stzh-list-item.js.map +1 -1
  277. package/dist/{esm/stzh-list-item.entry.js → components/stzh-list-item2.js} +24 -9
  278. package/dist/components/stzh-list-item2.js.map +1 -0
  279. package/dist/components/stzh-list.js +1 -36
  280. package/dist/components/stzh-list.js.map +1 -1
  281. package/dist/{esm/stzh-list.entry.js → components/stzh-list2.js} +26 -9
  282. package/dist/components/stzh-list2.js.map +1 -0
  283. package/dist/components/stzh-pagetitle-home.js +1 -1
  284. package/dist/components/stzh-pagetitle-home.js.map +1 -1
  285. package/dist/components/stzh-pagetitle.js +1 -1
  286. package/dist/components/stzh-pagetitle.js.map +1 -1
  287. package/dist/components/stzh-pagination2.js +9 -6
  288. package/dist/components/stzh-pagination2.js.map +1 -1
  289. package/dist/components/stzh-panorama.js +1 -1
  290. package/dist/components/stzh-panorama.js.map +1 -1
  291. package/dist/components/stzh-popover2.js +93 -67
  292. package/dist/components/stzh-popover2.js.map +1 -1
  293. package/dist/components/stzh-ratio2.js +1 -1
  294. package/dist/components/stzh-ratio2.js.map +1 -1
  295. package/dist/components/stzh-richtext2.js +26 -18
  296. package/dist/components/stzh-richtext2.js.map +1 -1
  297. package/dist/components/stzh-scrollup.js +5 -5
  298. package/dist/components/stzh-scrollup.js.map +1 -1
  299. package/dist/components/stzh-section.js +1 -1
  300. package/dist/components/stzh-section.js.map +1 -1
  301. package/dist/components/stzh-share2.js +1 -1
  302. package/dist/components/stzh-skin-portal-mitwirken.js +1 -1
  303. package/dist/components/stzh-skin-portal-mitwirken.js.map +1 -1
  304. package/dist/components/stzh-sticky-actions.js +10 -8
  305. package/dist/components/stzh-sticky-actions.js.map +1 -1
  306. package/dist/components/stzh-tooltip2.js +1 -1
  307. package/dist/components/stzh-tooltip2.js.map +1 -1
  308. package/dist/components/stzh-upload.js +3127 -6
  309. package/dist/components/stzh-upload.js.map +1 -1
  310. package/dist/components/stzh-vbz-carousel.js +1 -1
  311. package/dist/components/stzh-vbz-carousel.js.map +1 -1
  312. package/dist/components/stzh-vbz-connection-finder.d.ts +11 -0
  313. package/dist/components/stzh-vbz-connection-finder.js +38 -0
  314. package/dist/components/stzh-vbz-connection-finder.js.map +1 -0
  315. package/dist/components/stzh-vbz-intro.d.ts +11 -0
  316. package/dist/components/stzh-vbz-intro.js +100 -0
  317. package/dist/components/stzh-vbz-intro.js.map +1 -0
  318. package/dist/components/stzh-vbz-linechip2.js +1 -1
  319. package/dist/components/stzh-vbz-linechip2.js.map +1 -1
  320. package/dist/components/stzh-vbz-majorticker.js +1 -1
  321. package/dist/components/stzh-vbz-ticker.js +33 -44
  322. package/dist/components/stzh-vbz-ticker.js.map +1 -1
  323. package/dist/components/utils.js +39 -9
  324. package/dist/components/utils.js.map +1 -1
  325. package/dist/esm/{app-globals-ab5b077d.js → app-globals-93678901.js} +2 -2
  326. package/dist/esm/{app-globals-ab5b077d.js.map → app-globals-93678901.js.map} +1 -1
  327. package/dist/esm/index-e3050b18.js +28 -16
  328. package/dist/esm/index.js.map +1 -1
  329. package/dist/esm/loader.js +2 -2
  330. package/dist/esm/stzh-accordion_3.entry.js +25 -9
  331. package/dist/esm/stzh-accordion_3.entry.js.map +1 -1
  332. package/dist/esm/stzh-actions.entry.js +1 -1
  333. package/dist/esm/stzh-anchornav.entry.js +4 -3
  334. package/dist/esm/stzh-anchornav.entry.js.map +1 -1
  335. package/dist/esm/stzh-app-bar.entry.js +44 -0
  336. package/dist/esm/stzh-app-bar.entry.js.map +1 -0
  337. package/dist/esm/stzh-appointments.entry.js +1 -1
  338. package/dist/esm/stzh-audio.entry.js +1 -1
  339. package/dist/esm/stzh-badge_3.entry.js +1 -1
  340. package/dist/esm/stzh-card-navigation.entry.js +1 -1
  341. package/dist/esm/stzh-card-searchresult.entry.js +1 -1
  342. package/dist/esm/stzh-card-superteaser.entry.js +1 -1
  343. package/dist/esm/stzh-card_2.entry.js +8 -2
  344. package/dist/esm/stzh-card_2.entry.js.map +1 -1
  345. package/dist/esm/stzh-carousel.entry.js +1 -1
  346. package/dist/esm/stzh-checkbox.entry.js +1 -1
  347. package/dist/esm/stzh-checkboxgroup.entry.js +1 -1
  348. package/dist/esm/stzh-chip.entry.js +22 -32
  349. package/dist/esm/stzh-chip.entry.js.map +1 -1
  350. package/dist/esm/stzh-components.js +2 -2
  351. package/dist/esm/stzh-contact-cv.entry.js +59 -0
  352. package/dist/esm/stzh-contact-cv.entry.js.map +1 -0
  353. package/dist/esm/stzh-contact.entry.js +5 -3
  354. package/dist/esm/stzh-contact.entry.js.map +1 -1
  355. package/dist/esm/stzh-container.entry.js +1 -1
  356. package/dist/esm/stzh-container.entry.js.map +1 -1
  357. package/dist/esm/stzh-cspace.entry.js +2 -2
  358. package/dist/esm/stzh-cspace.entry.js.map +1 -1
  359. package/dist/esm/stzh-cta.entry.js +1 -1
  360. package/dist/esm/stzh-datatable.entry.js +1 -1
  361. package/dist/esm/stzh-datepicker_3.entry.js +1 -1
  362. package/dist/esm/stzh-datepicker_3.entry.js.map +1 -1
  363. package/dist/esm/stzh-daterange.entry.js +1 -1
  364. package/dist/esm/stzh-details.entry.js +1 -1
  365. package/dist/esm/stzh-dialog.entry.js +1 -1
  366. package/dist/esm/stzh-dialog.entry.js.map +1 -1
  367. package/dist/esm/stzh-disturber.entry.js +1 -1
  368. package/dist/esm/stzh-dropdown.entry.js +1 -1
  369. package/dist/esm/stzh-eventinfo.entry.js +1 -1
  370. package/dist/esm/stzh-figure.entry.js +1 -1
  371. package/dist/esm/stzh-footer.entry.js +2 -2
  372. package/dist/esm/stzh-footer.entry.js.map +1 -1
  373. package/dist/esm/stzh-ghettobox_3.entry.js +27 -19
  374. package/dist/esm/stzh-ghettobox_3.entry.js.map +1 -1
  375. package/dist/esm/stzh-header.entry.js +2 -2
  376. package/dist/esm/stzh-header.entry.js.map +1 -1
  377. package/dist/esm/stzh-homepage-service-highlights.entry.js +1 -1
  378. package/dist/esm/stzh-homepage-service-highlights.entry.js.map +1 -1
  379. package/dist/esm/stzh-iframe.entry.js +2881 -24
  380. package/dist/esm/stzh-iframe.entry.js.map +1 -1
  381. package/dist/esm/stzh-input.entry.js +8 -4
  382. package/dist/esm/stzh-input.entry.js.map +1 -1
  383. package/dist/esm/stzh-link.entry.js +1 -1
  384. package/dist/esm/stzh-list_2.entry.js +41 -0
  385. package/dist/esm/stzh-list_2.entry.js.map +1 -0
  386. package/dist/esm/stzh-menu_2.entry.js +1 -1
  387. package/dist/esm/stzh-pagecontent.entry.js +1 -1
  388. package/dist/esm/stzh-pagetitle-hero.entry.js +1 -1
  389. package/dist/esm/stzh-pagetitle-home.entry.js +2 -2
  390. package/dist/esm/stzh-pagetitle-home.entry.js.map +1 -1
  391. package/dist/esm/stzh-pagetitle.entry.js +2 -2
  392. package/dist/esm/stzh-pagetitle.entry.js.map +1 -1
  393. package/dist/esm/stzh-panorama.entry.js +1 -1
  394. package/dist/esm/stzh-panorama.entry.js.map +1 -1
  395. package/dist/esm/stzh-pi-content-navigation.entry.js +1 -1
  396. package/dist/esm/stzh-pi-pagetitle.entry.js +1 -1
  397. package/dist/esm/stzh-pi-teaser.entry.js +1 -1
  398. package/dist/esm/stzh-popover_2.entry.js +91 -68
  399. package/dist/esm/stzh-popover_2.entry.js.map +1 -1
  400. package/dist/esm/stzh-print_2.entry.js +1 -1
  401. package/dist/esm/stzh-ratio.entry.js +1 -1
  402. package/dist/esm/stzh-ratio.entry.js.map +1 -1
  403. package/dist/esm/stzh-readspeaker.entry.js +1 -1
  404. package/dist/esm/stzh-scrollup.entry.js +6 -6
  405. package/dist/esm/stzh-scrollup.entry.js.map +1 -1
  406. package/dist/esm/stzh-search.entry.js +1 -1
  407. package/dist/esm/stzh-section.entry.js +1 -1
  408. package/dist/esm/stzh-section.entry.js.map +1 -1
  409. package/dist/esm/stzh-skin-portal-mitwirken.entry.js +1 -1
  410. package/dist/esm/stzh-skin-portal-mitwirken.entry.js.map +1 -1
  411. package/dist/esm/stzh-sticky-actions.entry.js +9 -8
  412. package/dist/esm/stzh-sticky-actions.entry.js.map +1 -1
  413. package/dist/esm/stzh-sticky.entry.js +1 -1
  414. package/dist/esm/stzh-table.entry.js +1 -1
  415. package/dist/esm/stzh-textandimage.entry.js +1 -1
  416. package/dist/esm/stzh-timeline-item.entry.js +1 -1
  417. package/dist/esm/stzh-toast.entry.js +1 -1
  418. package/dist/esm/stzh-toggle.entry.js +1 -1
  419. package/dist/esm/stzh-tooltip.entry.js +2 -2
  420. package/dist/esm/stzh-tooltip.entry.js.map +1 -1
  421. package/dist/esm/stzh-twocolumns.entry.js +1 -1
  422. package/dist/esm/stzh-upload.entry.js +3098 -4
  423. package/dist/esm/stzh-upload.entry.js.map +1 -1
  424. package/dist/esm/stzh-vbz-carousel.entry.js +1 -1
  425. package/dist/esm/stzh-vbz-carousel.entry.js.map +1 -1
  426. package/dist/esm/stzh-vbz-connection-finder.entry.js +21 -0
  427. package/dist/esm/stzh-vbz-connection-finder.entry.js.map +1 -0
  428. package/dist/esm/stzh-vbz-intro.entry.js +54 -0
  429. package/dist/esm/stzh-vbz-intro.entry.js.map +1 -0
  430. package/dist/esm/stzh-vbz-linechip.entry.js +1 -1
  431. package/dist/esm/stzh-vbz-linechip.entry.js.map +1 -1
  432. package/dist/esm/stzh-vbz-ticker.entry.js +33 -44
  433. package/dist/esm/stzh-vbz-ticker.entry.js.map +1 -1
  434. package/dist/esm/{utils-54aead01.js → utils-90658cfe.js} +40 -10
  435. package/dist/esm/utils-90658cfe.js.map +1 -0
  436. package/dist/stzh-components/assets/i18n/de.json +22 -7
  437. package/dist/stzh-components/assets/i18n/en.json +22 -7
  438. package/dist/stzh-components/assets/media/icons/mono/construction.svg +1 -1
  439. package/dist/stzh-components/assets/media/icons/mono/crop.svg +1 -0
  440. package/dist/stzh-components/assets/meta/icons-preview.html +6 -1
  441. package/dist/stzh-components/assets/mock/appl/mobiscan/publicEndpoint/image/retreive-pdf +5 -0
  442. package/dist/stzh-components/assets/mock/appl/mobiscan/publicEndpoint/ping +3 -0
  443. package/dist/stzh-components/assets/mock/appl/mobiscan/publicEndpoint/url +3 -0
  444. package/dist/stzh-components/assets/mock/appl/mobiscan/rs/auth +4 -0
  445. package/dist/stzh-components/assets/mock/appl/mobiscan/rs/config +5 -0
  446. package/dist/stzh-components/assets/vendors/iframe-resizer/iframeResizer.contentWindow.js +1311 -0
  447. package/dist/stzh-components/index.esm.js.map +1 -1
  448. package/dist/stzh-components/p-05127d71.entry.js +2 -0
  449. package/dist/stzh-components/p-05127d71.entry.js.map +1 -0
  450. package/dist/stzh-components/{p-9684b22d.entry.js → p-09480ffe.entry.js} +2 -2
  451. package/dist/stzh-components/{p-c877d32c.entry.js → p-0b0c7cb8.entry.js} +2 -2
  452. package/dist/stzh-components/p-0b0c7cb8.entry.js.map +1 -0
  453. package/dist/stzh-components/{p-161ae3d1.entry.js → p-0b15d79b.entry.js} +2 -2
  454. package/dist/stzh-components/p-109a885b.entry.js +2 -0
  455. package/dist/stzh-components/{p-2d7966cf.entry.js.map → p-109a885b.entry.js.map} +1 -1
  456. package/dist/stzh-components/{p-c1cd45e1.entry.js → p-12bffe97.entry.js} +2 -2
  457. package/dist/stzh-components/p-13cd7748.entry.js +2 -0
  458. package/dist/stzh-components/p-13cd7748.entry.js.map +1 -0
  459. package/dist/stzh-components/{p-27d5ad01.entry.js → p-16a2675e.entry.js} +2 -2
  460. package/dist/stzh-components/{p-75b79adf.entry.js → p-1cbf5c84.entry.js} +2 -2
  461. package/dist/stzh-components/p-1cbf5c84.entry.js.map +1 -0
  462. package/dist/stzh-components/{p-20db8d01.entry.js → p-1fd858a2.entry.js} +2 -2
  463. package/dist/stzh-components/p-1fd858a2.entry.js.map +1 -0
  464. package/dist/stzh-components/p-21c351b4.entry.js +2 -0
  465. package/dist/stzh-components/p-21c351b4.entry.js.map +1 -0
  466. package/dist/stzh-components/{p-59a1a257.entry.js → p-21f7064d.entry.js} +2 -2
  467. package/dist/stzh-components/p-21f7064d.entry.js.map +1 -0
  468. package/dist/stzh-components/p-23de5712.entry.js +2 -0
  469. package/dist/stzh-components/p-23de5712.entry.js.map +1 -0
  470. package/dist/stzh-components/{p-0fb40e48.entry.js → p-24ea178a.entry.js} +2 -2
  471. package/dist/stzh-components/{p-3f0d3919.entry.js → p-2812752a.entry.js} +2 -2
  472. package/dist/stzh-components/{p-68d33cd3.entry.js → p-29c1cb5c.entry.js} +2 -2
  473. package/dist/stzh-components/p-2d405b51.js +2 -0
  474. package/dist/stzh-components/{p-cc1f8acc.js.map → p-2d405b51.js.map} +1 -1
  475. package/dist/stzh-components/{p-801af922.entry.js → p-30a522e0.entry.js} +2 -2
  476. package/dist/stzh-components/{p-d10a6897.entry.js → p-30a7c058.entry.js} +2 -2
  477. package/dist/stzh-components/{p-7ca981d1.entry.js → p-3261eab4.entry.js} +2 -2
  478. package/dist/stzh-components/{p-5d4a2df0.entry.js → p-32cb5b94.entry.js} +2 -2
  479. package/dist/stzh-components/{p-97df1d9f.entry.js → p-346d2f3d.entry.js} +2 -2
  480. package/dist/stzh-components/p-346f8661.entry.js +2 -0
  481. package/dist/stzh-components/p-346f8661.entry.js.map +1 -0
  482. package/dist/stzh-components/{p-8f1dbd3b.entry.js → p-3912a256.entry.js} +2 -2
  483. package/dist/stzh-components/{p-6fdc4c74.entry.js → p-39acdb68.entry.js} +2 -2
  484. package/dist/stzh-components/p-3cc6f193.entry.js +2 -0
  485. package/dist/stzh-components/p-3cc6f193.entry.js.map +1 -0
  486. package/dist/stzh-components/{p-204a6e41.entry.js → p-466263ff.entry.js} +2 -2
  487. package/dist/stzh-components/p-466263ff.entry.js.map +1 -0
  488. package/dist/stzh-components/p-49d356da.entry.js +2 -0
  489. package/dist/stzh-components/p-49d356da.entry.js.map +1 -0
  490. package/dist/stzh-components/p-585551c1.entry.js +2 -0
  491. package/dist/stzh-components/p-585551c1.entry.js.map +1 -0
  492. package/dist/stzh-components/{p-edf77853.entry.js → p-63c76fd5.entry.js} +2 -2
  493. package/dist/stzh-components/{p-533fea0b.entry.js → p-67e61035.entry.js} +2 -2
  494. package/dist/stzh-components/p-6e0c8764.entry.js +2 -0
  495. package/dist/stzh-components/p-6e0c8764.entry.js.map +1 -0
  496. package/dist/stzh-components/{p-80fafa1d.entry.js → p-6fffe2c8.entry.js} +2 -2
  497. package/dist/stzh-components/p-7b14ef7a.entry.js +2 -0
  498. package/dist/stzh-components/p-7b14ef7a.entry.js.map +1 -0
  499. package/dist/stzh-components/{p-eb79f3ed.entry.js → p-82c53e4f.entry.js} +2 -2
  500. package/dist/stzh-components/p-85143b35.entry.js +2 -0
  501. package/dist/stzh-components/p-85143b35.entry.js.map +1 -0
  502. package/dist/stzh-components/{p-8e0a2441.entry.js → p-87f3052b.entry.js} +2 -2
  503. package/dist/stzh-components/{p-b566a2c0.entry.js → p-8a82bf60.entry.js} +2 -2
  504. package/dist/stzh-components/{p-9b43127f.entry.js → p-8b04698a.entry.js} +2 -2
  505. package/dist/stzh-components/p-8b3828e7.entry.js +2 -0
  506. package/dist/stzh-components/p-8b3828e7.entry.js.map +1 -0
  507. package/dist/stzh-components/{p-4db427d5.entry.js → p-8c4d543d.entry.js} +2 -2
  508. package/dist/stzh-components/p-8c4d543d.entry.js.map +1 -0
  509. package/dist/stzh-components/p-90772ec6.entry.js +2 -0
  510. package/dist/stzh-components/p-90772ec6.entry.js.map +1 -0
  511. package/dist/stzh-components/p-9bc12eff.entry.js +2 -0
  512. package/dist/stzh-components/p-9bc12eff.entry.js.map +1 -0
  513. package/dist/stzh-components/{p-7754870d.entry.js → p-9c1b3929.entry.js} +2 -2
  514. package/dist/stzh-components/{p-5c3fddec.entry.js → p-9c643610.entry.js} +2 -2
  515. package/dist/stzh-components/{p-5c3fddec.entry.js.map → p-9c643610.entry.js.map} +1 -1
  516. package/dist/stzh-components/{p-4f49450d.entry.js → p-9e4f0532.entry.js} +2 -2
  517. package/dist/stzh-components/p-9e4f0532.entry.js.map +1 -0
  518. package/dist/stzh-components/{p-cff05968.entry.js → p-a249f3f6.entry.js} +2 -2
  519. package/dist/stzh-components/{p-a2e9723b.entry.js → p-aa3e4203.entry.js} +2 -2
  520. package/dist/stzh-components/{p-f5821678.entry.js → p-ab5ee55b.entry.js} +2 -2
  521. package/dist/stzh-components/{p-ce99f5e8.entry.js → p-acef653a.entry.js} +2 -2
  522. package/dist/stzh-components/{p-c5dbf7ad.entry.js → p-b03f41c3.entry.js} +2 -2
  523. package/dist/stzh-components/p-b273f95c.entry.js +2 -0
  524. package/dist/stzh-components/p-b273f95c.entry.js.map +1 -0
  525. package/dist/stzh-components/{p-72c375c7.entry.js → p-b397337c.entry.js} +2 -2
  526. package/dist/stzh-components/p-b397337c.entry.js.map +1 -0
  527. package/dist/stzh-components/{p-ef21f4dc.entry.js → p-ba716237.entry.js} +2 -2
  528. package/dist/stzh-components/p-ba716237.entry.js.map +1 -0
  529. package/dist/stzh-components/p-bcaef6d7.entry.js +2 -0
  530. package/dist/stzh-components/{p-012dc71e.entry.js.map → p-bcaef6d7.entry.js.map} +1 -1
  531. package/dist/stzh-components/p-bdff55a6.entry.js +2 -0
  532. package/dist/stzh-components/{p-78a16599.entry.js.map → p-bdff55a6.entry.js.map} +1 -1
  533. package/dist/stzh-components/{p-ee82f53c.entry.js → p-c169f243.entry.js} +2 -2
  534. package/dist/stzh-components/{p-7d030c40.entry.js → p-c3816fd3.entry.js} +2 -2
  535. package/dist/stzh-components/{p-7aac960b.entry.js → p-ce6dbd52.entry.js} +2 -2
  536. package/dist/stzh-components/{p-50c1632e.entry.js → p-d0ecdd5b.entry.js} +2 -2
  537. package/dist/stzh-components/{p-50c1632e.entry.js.map → p-d0ecdd5b.entry.js.map} +1 -1
  538. package/dist/stzh-components/{p-722b9e40.entry.js → p-d46bbc8c.entry.js} +2 -2
  539. package/dist/stzh-components/{p-c9eecee7.entry.js → p-d48ecb2f.entry.js} +2 -2
  540. package/dist/stzh-components/{p-ea152ff3.entry.js → p-d7697cf8.entry.js} +2 -2
  541. package/dist/stzh-components/p-d789647a.entry.js +2 -0
  542. package/dist/stzh-components/p-d789647a.entry.js.map +1 -0
  543. package/dist/stzh-components/{p-472b3327.entry.js → p-d7f1ed07.entry.js} +2 -2
  544. package/dist/stzh-components/{p-afde3fcd.entry.js → p-d8265b82.entry.js} +2 -2
  545. package/dist/stzh-components/{p-afde3fcd.entry.js.map → p-d8265b82.entry.js.map} +1 -1
  546. package/dist/stzh-components/{p-56346206.entry.js → p-d9fa718c.entry.js} +2 -2
  547. package/dist/stzh-components/p-e30a5acc.js +2 -0
  548. package/dist/stzh-components/p-e30a5acc.js.map +1 -0
  549. package/dist/stzh-components/{p-f4ed8d7e.entry.js → p-ef47c976.entry.js} +2 -2
  550. package/dist/stzh-components/p-ef47c976.entry.js.map +1 -0
  551. package/dist/stzh-components/{p-66007952.entry.js → p-f34720e2.entry.js} +2 -2
  552. package/dist/stzh-components/p-f34720e2.entry.js.map +1 -0
  553. package/dist/stzh-components/p-ffbb7594.entry.js +2 -0
  554. package/dist/stzh-components/p-ffbb7594.entry.js.map +1 -0
  555. package/dist/stzh-components/stzh-components.css +206 -22
  556. package/dist/stzh-components/stzh-components.esm.js +1 -1
  557. package/dist/stzh-components/stzh-components.esm.js.map +1 -1
  558. package/dist/types/components/stzh-accordion/stzh-accordion.d.ts +3 -0
  559. package/dist/types/components/stzh-app-bar/stzh-app-bar.d.ts +15 -0
  560. package/dist/types/components/stzh-cardlist/stzh-cardlist.d.ts +1 -0
  561. package/dist/types/components/stzh-chip/stzh-chip.d.ts +1 -1
  562. package/dist/types/components/stzh-contact/stzh-contact.d.ts +2 -0
  563. package/dist/types/components/stzh-contact-cv/stzh-contact-cv.d.ts +23 -0
  564. package/dist/types/components/stzh-contact-cv/stzh-contact-cv.localization.d.ts +8 -0
  565. package/dist/types/components/stzh-datepicker/stzh-datepicker.d.ts +1 -1
  566. package/dist/types/components/stzh-iframe/stzh-iframe.d.ts +9 -1
  567. package/dist/types/components/stzh-input/stzh-input.d.ts +3 -0
  568. package/dist/types/components/stzh-pagination/stzh-pagination.d.ts +4 -0
  569. package/dist/types/components/stzh-popover/stzh-popover.d.ts +12 -3
  570. package/dist/types/components/stzh-section/stzh-section.d.ts +1 -1
  571. package/dist/types/components/stzh-sticky-actions/stzh-sticky-actions.d.ts +1 -0
  572. package/dist/types/components/stzh-upload/models/stzh-photographing-configuration.dto.d.ts +5 -0
  573. package/dist/types/components/stzh-upload/models/stzh-photographing-pdf-file.dto.d.ts +5 -0
  574. package/dist/types/components/stzh-upload/models/stzh-photographing-url-details.dto.d.ts +4 -0
  575. package/dist/types/components/stzh-upload/stzh-upload.d.ts +36 -0
  576. package/dist/types/components/stzh-upload/stzh-upload.localization.d.ts +6 -0
  577. package/dist/types/components/stzh-vbz-connection-finder/stzh-vbz-connection-finder.d.ts +7 -0
  578. package/dist/types/components/stzh-vbz-intro/stzh-vbz-intro.d.ts +15 -0
  579. package/dist/types/components/stzh-vbz-intro/stzh-vbz-intro.localization.d.ts +4 -0
  580. package/dist/types/components/stzh-vbz-ticker/stzh-vbz-ticker.d.ts +2 -1
  581. package/dist/types/components/stzh-vbz-ticker/stzh-vbz-ticker.localization.d.ts +1 -2
  582. package/dist/types/components.d.ts +186 -10
  583. package/dist/types/index.d.ts +4 -0
  584. package/dist/types/utils/utils.d.ts +7 -0
  585. package/dist/vscode-data.json +120 -1
  586. package/package.json +3 -1
  587. package/dist/cjs/stzh-list-item.cjs.entry.js +0 -27
  588. package/dist/cjs/stzh-list-item.cjs.entry.js.map +0 -1
  589. package/dist/cjs/stzh-list.cjs.entry.js.map +0 -1
  590. package/dist/cjs/utils-d0fff87f.js.map +0 -1
  591. package/dist/esm/stzh-list-item.entry.js.map +0 -1
  592. package/dist/esm/stzh-list.entry.js.map +0 -1
  593. package/dist/esm/utils-54aead01.js.map +0 -1
  594. package/dist/stzh-components/p-012dc71e.entry.js +0 -2
  595. package/dist/stzh-components/p-100d4052.entry.js +0 -2
  596. package/dist/stzh-components/p-100d4052.entry.js.map +0 -1
  597. package/dist/stzh-components/p-1f0e8499.entry.js +0 -2
  598. package/dist/stzh-components/p-1f0e8499.entry.js.map +0 -1
  599. package/dist/stzh-components/p-204a6e41.entry.js.map +0 -1
  600. package/dist/stzh-components/p-20db8d01.entry.js.map +0 -1
  601. package/dist/stzh-components/p-2d7966cf.entry.js +0 -2
  602. package/dist/stzh-components/p-4db427d5.entry.js.map +0 -1
  603. package/dist/stzh-components/p-4f49450d.entry.js.map +0 -1
  604. package/dist/stzh-components/p-523c0bb1.entry.js +0 -2
  605. package/dist/stzh-components/p-523c0bb1.entry.js.map +0 -1
  606. package/dist/stzh-components/p-52a914cd.entry.js +0 -2
  607. package/dist/stzh-components/p-52a914cd.entry.js.map +0 -1
  608. package/dist/stzh-components/p-59a1a257.entry.js.map +0 -1
  609. package/dist/stzh-components/p-648b7232.entry.js +0 -2
  610. package/dist/stzh-components/p-648b7232.entry.js.map +0 -1
  611. package/dist/stzh-components/p-66007952.entry.js.map +0 -1
  612. package/dist/stzh-components/p-6ab9dee8.entry.js +0 -2
  613. package/dist/stzh-components/p-6ab9dee8.entry.js.map +0 -1
  614. package/dist/stzh-components/p-6c2289da.entry.js +0 -2
  615. package/dist/stzh-components/p-6c2289da.entry.js.map +0 -1
  616. package/dist/stzh-components/p-72c375c7.entry.js.map +0 -1
  617. package/dist/stzh-components/p-75b79adf.entry.js.map +0 -1
  618. package/dist/stzh-components/p-771d370d.entry.js +0 -2
  619. package/dist/stzh-components/p-771d370d.entry.js.map +0 -1
  620. package/dist/stzh-components/p-77ba1f21.entry.js +0 -2
  621. package/dist/stzh-components/p-77ba1f21.entry.js.map +0 -1
  622. package/dist/stzh-components/p-78a16599.entry.js +0 -2
  623. package/dist/stzh-components/p-7e304ea3.js +0 -2
  624. package/dist/stzh-components/p-7e304ea3.js.map +0 -1
  625. package/dist/stzh-components/p-7efbb643.entry.js +0 -2
  626. package/dist/stzh-components/p-7efbb643.entry.js.map +0 -1
  627. package/dist/stzh-components/p-991309dd.entry.js +0 -2
  628. package/dist/stzh-components/p-991309dd.entry.js.map +0 -1
  629. package/dist/stzh-components/p-af7855ff.entry.js +0 -2
  630. package/dist/stzh-components/p-af7855ff.entry.js.map +0 -1
  631. package/dist/stzh-components/p-c877d32c.entry.js.map +0 -1
  632. package/dist/stzh-components/p-cc1f8acc.js +0 -2
  633. package/dist/stzh-components/p-cf856610.entry.js +0 -2
  634. package/dist/stzh-components/p-cf856610.entry.js.map +0 -1
  635. package/dist/stzh-components/p-ef21f4dc.entry.js.map +0 -1
  636. package/dist/stzh-components/p-f4ed8d7e.entry.js.map +0 -1
  637. package/dist/stzh-components/p-fdd6e755.entry.js +0 -2
  638. package/dist/stzh-components/p-fdd6e755.entry.js.map +0 -1
  639. /package/dist/stzh-components/{p-9684b22d.entry.js.map → p-09480ffe.entry.js.map} +0 -0
  640. /package/dist/stzh-components/{p-161ae3d1.entry.js.map → p-0b15d79b.entry.js.map} +0 -0
  641. /package/dist/stzh-components/{p-c1cd45e1.entry.js.map → p-12bffe97.entry.js.map} +0 -0
  642. /package/dist/stzh-components/{p-27d5ad01.entry.js.map → p-16a2675e.entry.js.map} +0 -0
  643. /package/dist/stzh-components/{p-0fb40e48.entry.js.map → p-24ea178a.entry.js.map} +0 -0
  644. /package/dist/stzh-components/{p-3f0d3919.entry.js.map → p-2812752a.entry.js.map} +0 -0
  645. /package/dist/stzh-components/{p-68d33cd3.entry.js.map → p-29c1cb5c.entry.js.map} +0 -0
  646. /package/dist/stzh-components/{p-801af922.entry.js.map → p-30a522e0.entry.js.map} +0 -0
  647. /package/dist/stzh-components/{p-d10a6897.entry.js.map → p-30a7c058.entry.js.map} +0 -0
  648. /package/dist/stzh-components/{p-7ca981d1.entry.js.map → p-3261eab4.entry.js.map} +0 -0
  649. /package/dist/stzh-components/{p-5d4a2df0.entry.js.map → p-32cb5b94.entry.js.map} +0 -0
  650. /package/dist/stzh-components/{p-97df1d9f.entry.js.map → p-346d2f3d.entry.js.map} +0 -0
  651. /package/dist/stzh-components/{p-8f1dbd3b.entry.js.map → p-3912a256.entry.js.map} +0 -0
  652. /package/dist/stzh-components/{p-6fdc4c74.entry.js.map → p-39acdb68.entry.js.map} +0 -0
  653. /package/dist/stzh-components/{p-edf77853.entry.js.map → p-63c76fd5.entry.js.map} +0 -0
  654. /package/dist/stzh-components/{p-533fea0b.entry.js.map → p-67e61035.entry.js.map} +0 -0
  655. /package/dist/stzh-components/{p-80fafa1d.entry.js.map → p-6fffe2c8.entry.js.map} +0 -0
  656. /package/dist/stzh-components/{p-eb79f3ed.entry.js.map → p-82c53e4f.entry.js.map} +0 -0
  657. /package/dist/stzh-components/{p-8e0a2441.entry.js.map → p-87f3052b.entry.js.map} +0 -0
  658. /package/dist/stzh-components/{p-b566a2c0.entry.js.map → p-8a82bf60.entry.js.map} +0 -0
  659. /package/dist/stzh-components/{p-9b43127f.entry.js.map → p-8b04698a.entry.js.map} +0 -0
  660. /package/dist/stzh-components/{p-7754870d.entry.js.map → p-9c1b3929.entry.js.map} +0 -0
  661. /package/dist/stzh-components/{p-cff05968.entry.js.map → p-a249f3f6.entry.js.map} +0 -0
  662. /package/dist/stzh-components/{p-a2e9723b.entry.js.map → p-aa3e4203.entry.js.map} +0 -0
  663. /package/dist/stzh-components/{p-f5821678.entry.js.map → p-ab5ee55b.entry.js.map} +0 -0
  664. /package/dist/stzh-components/{p-ce99f5e8.entry.js.map → p-acef653a.entry.js.map} +0 -0
  665. /package/dist/stzh-components/{p-c5dbf7ad.entry.js.map → p-b03f41c3.entry.js.map} +0 -0
  666. /package/dist/stzh-components/{p-ee82f53c.entry.js.map → p-c169f243.entry.js.map} +0 -0
  667. /package/dist/stzh-components/{p-7d030c40.entry.js.map → p-c3816fd3.entry.js.map} +0 -0
  668. /package/dist/stzh-components/{p-7aac960b.entry.js.map → p-ce6dbd52.entry.js.map} +0 -0
  669. /package/dist/stzh-components/{p-722b9e40.entry.js.map → p-d46bbc8c.entry.js.map} +0 -0
  670. /package/dist/stzh-components/{p-c9eecee7.entry.js.map → p-d48ecb2f.entry.js.map} +0 -0
  671. /package/dist/stzh-components/{p-ea152ff3.entry.js.map → p-d7697cf8.entry.js.map} +0 -0
  672. /package/dist/stzh-components/{p-472b3327.entry.js.map → p-d7f1ed07.entry.js.map} +0 -0
  673. /package/dist/stzh-components/{p-56346206.entry.js.map → p-d9fa718c.entry.js.map} +0 -0
@@ -3,9 +3,10 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-92254d32.js');
6
- const utils = require('./utils-d0fff87f.js');
6
+ const utils$2 = require('./utils-d091c010.js');
7
7
  const translationUtils = require('./translation-utils-18767769.js');
8
8
  const stzhInputDescription = require('./stzh-input-description-36e6c258.js');
9
+ const _commonjsHelpers = require('./_commonjsHelpers-dcc4cf71.js');
9
10
  require('./string-utils-5dd70320.js');
10
11
 
11
12
  (function webpackUniversalModuleDefinition(root, factory) {
@@ -10360,7 +10361,2880 @@ window.Dropzone = Dropzone;
10360
10361
  ;
10361
10362
  });
10362
10363
 
10363
- const stzhUploadCss = ":host{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);color:var(--stzh-base-color);box-sizing:border-box;display:block;}:host[hidden]{display:none}:host::-moz-selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}:host::selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}:host *,:host *::before,:host *::after{box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness);-webkit-text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink);text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink)}:host .has-focus{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}:host .stzh-fylingfocus-focused{outline-style:none !important}:host .stzh-fylingfocus-focused::-moz-focus-inner{border:0 !important}stzh-upload{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);color:var(--stzh-base-color);box-sizing:border-box;display:block;--list-grid-template-areas:var(\n --stzh-upload-list-grid-template-areas,\n \"list list list list\"\n );--list-grid-template-columns:var(\n --stzh-upload-list-grid-template-columns,\n repeat(4, minmax(0, 1fr))\n )}stzh-upload[hidden]{display:none}stzh-upload::-moz-selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}stzh-upload::selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}stzh-upload *,stzh-upload *::before,stzh-upload *::after{box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness);-webkit-text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink);text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink)}stzh-upload .has-focus{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}stzh-upload .stzh-fylingfocus-focused{outline-style:none !important}stzh-upload .stzh-fylingfocus-focused::-moz-focus-inner{border:0 !important}@media screen and (min-width: 600px){stzh-upload{--list-grid-template-areas:var(\n --stzh-upload-list-grid-template-areas,\n \"list list list .\"\n )}}@media screen and (min-width: 900px){stzh-upload{--list-grid-template-areas:var(\n --stzh-upload-list-grid-template-areas,\n \"list list list list list . . .\"\n );--list-grid-template-columns:var(\n --stzh-upload-list-grid-template-columns,\n repeat(8, minmax(0, 1fr))\n )}}stzh-upload[disabled]:not([disabled=false]){--description-color:var(--stzh-color-grey70)}.stzh-upload{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);position:relative;color:var(--stzh-color-grey70);box-sizing:border-box;display:flex;flex-direction:column;}.stzh-upload__marker-symbol{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium)}.stzh-upload__marker-text{border:0;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}.stzh-upload__description-wrapper{display:flex;flex-direction:column-reverse;min-height:var(--description-min-height, var(--stzh-description-min-height, none))}.stzh-upload__error,.stzh-upload__description{font-size:var(--stzh-font-nano-font-size);line-height:var(--stzh-font-nano-text-line-height)}.stzh-upload__error{color:var(--stzh-color-error60)}.stzh-upload__error-list{list-style:none;margin:0;padding:0}.stzh-upload__description{display:flex;align-items:flex-start;color:var(--stzh-input-description-color, var(--description-color, var(--stzh-color-coolgrey70)));transition:color var(--stzh-base-transition-animation-speed)}.stzh-upload__description-long{margin-right:var(--stzh-space-xxsmall);margin-top:0.125rem}@supports (font: -apple-system-body) and (-webkit-appearance: none){.stzh-upload__description-long{margin-top:0}}.stzh-upload__description-long-popover{--width:auto;--max-width:27.3125rem}.stzh-upload__description-long-button{display:flex;justify-content:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-family:inherit;padding:0;border:none;background-color:transparent;border-radius:0.5rem;cursor:pointer}.stzh-upload stzh-icon.stzh-upload__description-long-icon{--size:var(--stzh-icon-size-xsmall)}.stzh-upload--has-error .stzh-upload__error,.stzh-upload--has-description .stzh-upload__description{margin-top:var(--stzh-space-xxxsmall)}.stzh-upload__label{font-family:var(--stzh-font-family-title);font-weight:var(--stzh-font-weight-title);font-style:var(--stzh-font-style-title);font-size:var(--stzh-font-curve-h4-default-font-size, var(--stzh-font-milli-font-size));line-height:var(--stzh-font-curve-h4-default-text-line-height, var(--stzh-font-milli-text-line-height));letter-spacing:var(--stzh-font-curve-h4-default-text-letter-spacing);color:var(--stzh-heading-color);margin-bottom:var(--stzh-space-small)}@media screen and (min-width: 600px){.stzh-upload__label{font-size:var(--stzh-font-curve-h4-small-font-size, var(--stzh-font-centi-font-size));line-height:var(--stzh-font-curve-h4-small-text-line-height, var(--stzh-font-centi-text-line-height));letter-spacing:var(--stzh-font-curve-h4-small-text-letter-spacing)}}@media screen and (min-width: 1260px){.stzh-upload__label{font-size:var(--stzh-font-curve-h4-large-font-size, var(--stzh-font-deci-font-size));line-height:var(--stzh-font-curve-h4-large-text-line-height, var(--stzh-font-deci-text-line-height));letter-spacing:var(--stzh-font-curve-h4-large-text-letter-spacing)}}@media screen and (min-width: 1600px){.stzh-upload__label{font-size:var(--stzh-font-curve-h4-ultra-font-size, var(--stzh-font-deca-font-size));line-height:var(--stzh-font-curve-h4-ultra-text-line-height, var(--stzh-font-deca-text-line-height));letter-spacing:var(--stzh-font-curve-h4-ultra-text-letter-spacing, var(--stzh-font-deca-text-letter-spacing))}}.stzh-upload__clickarea{font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);padding:var(--stzh-space-xlarge);display:flex;flex-direction:column;align-items:center;gap:var(--stzh-space-medium);text-align:center;border:0.0625rem solid var(--stzh-color-black);background-color:var(--stzh-color-grey10);border-image-source:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAABMSURBVHgB7dexCgAQEIDhO2X2ih7NK5oNTEo3kFI3+L+Z/BnkNMXSZVFbVtmw663b/UGc6Sw6lb82z3W/AQDgJSSAAAIAgP+Afj8dD2mcJJvEMWjkAAAAAElFTkSuQmCC');border-image-slice:8;border-image-width:0.5rem;border-image-repeat:round;transition:background-color var(--stzh-base-transition-animation-speed)}@media screen and (min-width: 900px){.stzh-upload__clickarea{padding:var(--stzh-space-xxlarge)}}@media screen and (min-width: 1260px){.stzh-upload__clickarea{padding:var(--stzh-space-xxxlarge)}}@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi){.stzh-upload__clickarea{border-image-source:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAB5SURBVHgB7dsxCoQwFEXRl4Gp3aJLc4vWFtpbaCGC8M5ZQEIu/CYkY/ovey6s2zzywN36d97e/5dyAqTcOM/I05n7uvN5jUDK1QcAAAAA+rgTTDkBUk6AlBMg5QRIOQFSToCUEyAAAAAAZbwPSDkBUm74O1xOgJQ7AMC9JLtRTkNkAAAAAElFTkSuQmCC');border-image-slice:16}}.stzh-upload__heading-wrapper{font-family:var(--stzh-font-family-heavy);font-weight:var(--stzh-font-weight-heavy);font-style:var(--stzh-font-style-heavy);font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);display:flex;align-items:flex-start;gap:var(--stzh-space-medium);color:var(--stzh-color-grey90);transition:color var(--stzh-base-transition-animation-speed)}.stzh-upload__heading-inner-wrapper{display:flex;flex-direction:column;align-items:center;gap:var(--stzh-space-xsmall)}.stzh-upload__button-wrapper{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);font-size:var(--stzh-font-micro-font-size);line-height:var(--stzh-font-micro-text-line-height);display:flex;align-items:center;gap:var(--stzh-space-xsmall);color:var(--stzh-color-secondary60)}.stzh-upload__instructions{font-size:var(--stzh-font-nano-font-size);line-height:var(--stzh-font-nano-text-line-height)}.stzh-upload stzh-icon.stzh-upload__delete-icon{display:none}.stzh-upload__previews-wrapper{-moz-column-gap:var(--stzh-grid-gutter);column-gap:var(--stzh-grid-gutter);display:grid;grid-template-columns:repeat(4, minmax(0, 1fr));grid-template-areas:var(--list-grid-template-areas);grid-template-columns:var(--list-grid-template-columns)}@media screen and (min-width: 600px){.stzh-upload__previews-wrapper{-moz-column-gap:var(--stzh-grid-gutter-small);column-gap:var(--stzh-grid-gutter-small)}}@media screen and (min-width: 900px){.stzh-upload__previews-wrapper{-moz-column-gap:var(--stzh-grid-gutter-medium);column-gap:var(--stzh-grid-gutter-medium)}}@media screen and (min-width: 1260px){.stzh-upload__previews-wrapper{-moz-column-gap:var(--stzh-grid-gutter-large);column-gap:var(--stzh-grid-gutter-large)}}@media screen and (min-width: 1600px){.stzh-upload__previews-wrapper{-moz-column-gap:var(--stzh-grid-gutter-ultra);column-gap:var(--stzh-grid-gutter-ultra)}}@media screen and (min-width: 900px){.stzh-upload__previews-wrapper{grid-template-columns:repeat(8, minmax(0, 1fr))}}@media screen and (min-width: 1260px){.stzh-upload__previews-wrapper{grid-template-columns:repeat(12, minmax(0, 1fr))}}.stzh-upload__previews-inner-wrapper{grid-area:list}.stzh-upload__preview{padding-top:var(--stzh-space-xsmall);padding-bottom:var(--stzh-space-xsmall);display:flex;align-items:center}@media screen and (min-width: 900px){.stzh-upload__preview{padding-top:var(--stzh-space-small)}}@media screen and (min-width: 1260px){.stzh-upload__preview{padding-top:var(--stzh-space-medium)}}@media screen and (min-width: 900px){.stzh-upload__preview{padding-bottom:var(--stzh-space-small)}}@media screen and (min-width: 1260px){.stzh-upload__preview{padding-bottom:var(--stzh-space-medium)}}.stzh-upload__preview.dz-error .stzh-upload__title,.stzh-upload__preview.dz-error .stzh-upload__link[href]:not([href=\"\"]),.stzh-upload__preview.dz-error .stzh-upload__link[href]:not([href=\"\"]):hover{color:var(--stzh-color-error60)}.stzh-upload__preview.dz-error .stzh-upload__error-message{display:block}.stzh-upload__preview.dz-error .stzh-upload__meta{display:none}.stzh-upload__preview.dz-complete:not(.dz-error) stzh-icon.stzh-upload__delete-icon-error{display:none}.stzh-upload__preview.dz-complete:not(.dz-error) stzh-icon.stzh-upload__delete-icon{display:inline-flex}.stzh-upload__preview.dz-complete .stzh-upload__info-wrapper-processing{display:none}.stzh-upload__preview.dz-complete .stzh-upload__info-wrapper-complete{display:flex}.stzh-upload__preview.dz-empty .stzh-upload__separator{display:none}.stzh-upload__preview.dz-empty .stzh-upload__size{display:none}.stzh-upload__details{flex-grow:1;display:flex;overflow:hidden}.stzh-upload__info-wrapper{flex-grow:1;display:flex;overflow:hidden}.stzh-upload__info-wrapper-processing,.stzh-upload__info-wrapper-complete{flex-grow:1;display:flex;flex-direction:column;justify-content:center;overflow:hidden}.stzh-upload__info-wrapper-complete{display:none}.stzh-upload__actions{flex-shrink:0;display:flex;align-items:center}.stzh-upload__actions:not(:empty){margin-left:var(--stzh-space-xsmall)}.stzh-upload__infos{font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);display:flex;justify-content:space-between;align-items:center}.stzh-upload__title,.stzh-upload__subtitle{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.stzh-upload__title{font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing)}.stzh-upload__link[href]:not([href=\"\"]){color:var(--stzh-link-color)}.stzh-upload__link[href]:not([href=\"\"]):hover{color:var(--stzh-link-hover-color)}.stzh-upload__meta{font-size:var(--stzh-font-nano-font-size);line-height:var(--stzh-font-nano-text-line-height);letter-spacing:0.01em;display:flex;align-items:center;gap:var(--stzh-space-xsmall)}.stzh-upload__info-wrapper-processing .stzh-upload__meta{display:none}.stzh-upload__size strong{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium)}.stzh-upload__image{display:none}.stzh-upload__progress{display:block;height:0.375rem;background-color:var(--stzh-color-black20op);margin-top:var(--stzh-space-xsmall)}.stzh-upload__progress-bar{display:block;height:100%;width:0;background:var(--stzh-color-secondary40)}.stzh-upload__progress-text{font-size:var(--stzh-font-nano-font-size);line-height:var(--stzh-font-nano-text-line-height);letter-spacing:0.01em;margin-left:var(--stzh-space-medium);font-variant-numeric:tabular-nums}.stzh-upload__separator{width:0.0625rem;height:calc(100% - 0.25rem);background-color:currentColor}.stzh-upload__extension{text-transform:uppercase}.stzh-upload__extension:empty+.stzh-upload__separator{display:none}.stzh-upload__error-message{font-size:var(--stzh-font-nano-font-size);line-height:var(--stzh-font-nano-text-line-height);letter-spacing:0.01em;color:var(--stzh-color-error60);transition:color var(--stzh-base-transition-animation-speed);display:none}.stzh-upload.dz-started .stzh-upload__errors,.stzh-upload:has(.stzh-upload__preview) .stzh-upload__errors{margin-top:var(--stzh-space-medium)}.stzh-upload.dz-drag-hover .stzh-upload__clickarea{background-color:var(--stzh-color-secondary10);border-image-source:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAABMSURBVHgB7ddBCgAQEEDRGa7iRs7pRq4iVkqzIKVm4b81+VnIaMy1y6KVpLJh11u3+4M401l0Kn9tnut+AwDAS0gAAQQAAP8B/X46HlNzJxHDedWMAAAAAElFTkSuQmCC')}@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi){.stzh-upload.dz-drag-hover .stzh-upload__clickarea{border-image-source:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAB5SURBVHgB7dvBCYQwFEXRl5lW7Mg67chWRPcudCGC8M4pICEX/iYk4z+vey5syzTywN36d97e/5dyAqTcOM/I05n7uvN5jUDK1QcAAAAA+rgTTDkBUk6AlBMg5QRIOQFSToCUEyAAAAAAZbwPSDkBUm74O1xOgJQ7AO1EJzEUHPSNAAAAAElFTkSuQmCC')}}.stzh-upload.dz-drag-hover .stzh-upload__heading-wrapper{color:var(--stzh-color-primary70)}.stzh-upload--has-hidden-progress .stzh-upload__progress,.stzh-upload--has-hidden-progress .stzh-upload__progress-text,.stzh-upload--has-hidden-progress-while-idle .stzh-upload__preview:not(.dz-processing) .stzh-upload__progress,.stzh-upload--has-hidden-progress-while-idle .stzh-upload__preview:not(.dz-processing) .stzh-upload__progress-text{display:none}.stzh-upload--has-hidden-progress .stzh-upload__info-wrapper-processing .stzh-upload__meta,.stzh-upload--has-hidden-progress-while-idle .stzh-upload__preview:not(.dz-processing) .stzh-upload__info-wrapper-processing .stzh-upload__meta{display:flex}.stzh-upload--is-invalid .stzh-upload__clickarea{border-image-source:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAABNSURBVHgB7dcxDgAQDEDRlt0p3P9ETmEXJol0IBJJB//NxI9BVEtMXRa5VZUNu9663R/Emc6iU/lr81z3GwAAXkICCCAAAPgP6PfT8QDnDCW4JpVRXgAAAABJRU5ErkJggg==')}@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi){.stzh-upload--is-invalid .stzh-upload__clickarea{border-image-source:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAB5SURBVHgB7duxCYUwGIXRm/d6p3D/iZzCXrS30EIE4Z4zQEI++JuQjOU/7bkwb+vIA3fr33l7/1/KCZBy4zwjT2fu687nNQIpVx8AAAAA6ONOMOUESDkBUk6AlBMg5QRIOQFSToAAAAAAlPE+IOUESLnh73A5AVLuAFA3JdhPogvLAAAAAElFTkSuQmCC')}}.stzh-upload--has-error .stzh-upload__error,.stzh-upload--has-description .stzh-upload__description{margin-top:var(--stzh-space-small)}.stzh-upload--is-disabled .stzh-upload__clickarea{cursor:not-allowed;background-color:var(--stzh-color-grey10)}";
10364
+ // can-promise has a crash in some versions of react native that dont have
10365
+ // standard global objects
10366
+ // https://github.com/soldair/node-qrcode/issues/157
10367
+
10368
+ var canPromise = function () {
10369
+ return typeof Promise === 'function' && Promise.prototype && Promise.prototype.then
10370
+ };
10371
+
10372
+ let toSJISFunction;
10373
+ const CODEWORDS_COUNT = [
10374
+ 0, // Not used
10375
+ 26, 44, 70, 100, 134, 172, 196, 242, 292, 346,
10376
+ 404, 466, 532, 581, 655, 733, 815, 901, 991, 1085,
10377
+ 1156, 1258, 1364, 1474, 1588, 1706, 1828, 1921, 2051, 2185,
10378
+ 2323, 2465, 2611, 2761, 2876, 3034, 3196, 3362, 3532, 3706
10379
+ ];
10380
+
10381
+ /**
10382
+ * Returns the QR Code size for the specified version
10383
+ *
10384
+ * @param {Number} version QR Code version
10385
+ * @return {Number} size of QR code
10386
+ */
10387
+ var getSymbolSize$1 = function getSymbolSize (version) {
10388
+ if (!version) throw new Error('"version" cannot be null or undefined')
10389
+ if (version < 1 || version > 40) throw new Error('"version" should be in range from 1 to 40')
10390
+ return version * 4 + 17
10391
+ };
10392
+
10393
+ /**
10394
+ * Returns the total number of codewords used to store data and EC information.
10395
+ *
10396
+ * @param {Number} version QR Code version
10397
+ * @return {Number} Data length in bits
10398
+ */
10399
+ var getSymbolTotalCodewords = function getSymbolTotalCodewords (version) {
10400
+ return CODEWORDS_COUNT[version]
10401
+ };
10402
+
10403
+ /**
10404
+ * Encode data with Bose-Chaudhuri-Hocquenghem
10405
+ *
10406
+ * @param {Number} data Value to encode
10407
+ * @return {Number} Encoded value
10408
+ */
10409
+ var getBCHDigit = function (data) {
10410
+ let digit = 0;
10411
+
10412
+ while (data !== 0) {
10413
+ digit++;
10414
+ data >>>= 1;
10415
+ }
10416
+
10417
+ return digit
10418
+ };
10419
+
10420
+ var setToSJISFunction = function setToSJISFunction (f) {
10421
+ if (typeof f !== 'function') {
10422
+ throw new Error('"toSJISFunc" is not a valid function.')
10423
+ }
10424
+
10425
+ toSJISFunction = f;
10426
+ };
10427
+
10428
+ var isKanjiModeEnabled = function () {
10429
+ return typeof toSJISFunction !== 'undefined'
10430
+ };
10431
+
10432
+ var toSJIS = function toSJIS (kanji) {
10433
+ return toSJISFunction(kanji)
10434
+ };
10435
+
10436
+ var utils$1 = {
10437
+ getSymbolSize: getSymbolSize$1,
10438
+ getSymbolTotalCodewords: getSymbolTotalCodewords,
10439
+ getBCHDigit: getBCHDigit,
10440
+ setToSJISFunction: setToSJISFunction,
10441
+ isKanjiModeEnabled: isKanjiModeEnabled,
10442
+ toSJIS: toSJIS
10443
+ };
10444
+
10445
+ var errorCorrectionLevel = _commonjsHelpers.createCommonjsModule(function (module, exports) {
10446
+ exports.L = { bit: 1 };
10447
+ exports.M = { bit: 0 };
10448
+ exports.Q = { bit: 3 };
10449
+ exports.H = { bit: 2 };
10450
+
10451
+ function fromString (string) {
10452
+ if (typeof string !== 'string') {
10453
+ throw new Error('Param is not a string')
10454
+ }
10455
+
10456
+ const lcStr = string.toLowerCase();
10457
+
10458
+ switch (lcStr) {
10459
+ case 'l':
10460
+ case 'low':
10461
+ return exports.L
10462
+
10463
+ case 'm':
10464
+ case 'medium':
10465
+ return exports.M
10466
+
10467
+ case 'q':
10468
+ case 'quartile':
10469
+ return exports.Q
10470
+
10471
+ case 'h':
10472
+ case 'high':
10473
+ return exports.H
10474
+
10475
+ default:
10476
+ throw new Error('Unknown EC Level: ' + string)
10477
+ }
10478
+ }
10479
+
10480
+ exports.isValid = function isValid (level) {
10481
+ return level && typeof level.bit !== 'undefined' &&
10482
+ level.bit >= 0 && level.bit < 4
10483
+ };
10484
+
10485
+ exports.from = function from (value, defaultValue) {
10486
+ if (exports.isValid(value)) {
10487
+ return value
10488
+ }
10489
+
10490
+ try {
10491
+ return fromString(value)
10492
+ } catch (e) {
10493
+ return defaultValue
10494
+ }
10495
+ };
10496
+ });
10497
+
10498
+ function BitBuffer () {
10499
+ this.buffer = [];
10500
+ this.length = 0;
10501
+ }
10502
+
10503
+ BitBuffer.prototype = {
10504
+
10505
+ get: function (index) {
10506
+ const bufIndex = Math.floor(index / 8);
10507
+ return ((this.buffer[bufIndex] >>> (7 - index % 8)) & 1) === 1
10508
+ },
10509
+
10510
+ put: function (num, length) {
10511
+ for (let i = 0; i < length; i++) {
10512
+ this.putBit(((num >>> (length - i - 1)) & 1) === 1);
10513
+ }
10514
+ },
10515
+
10516
+ getLengthInBits: function () {
10517
+ return this.length
10518
+ },
10519
+
10520
+ putBit: function (bit) {
10521
+ const bufIndex = Math.floor(this.length / 8);
10522
+ if (this.buffer.length <= bufIndex) {
10523
+ this.buffer.push(0);
10524
+ }
10525
+
10526
+ if (bit) {
10527
+ this.buffer[bufIndex] |= (0x80 >>> (this.length % 8));
10528
+ }
10529
+
10530
+ this.length++;
10531
+ }
10532
+ };
10533
+
10534
+ var bitBuffer = BitBuffer;
10535
+
10536
+ /**
10537
+ * Helper class to handle QR Code symbol modules
10538
+ *
10539
+ * @param {Number} size Symbol size
10540
+ */
10541
+ function BitMatrix (size) {
10542
+ if (!size || size < 1) {
10543
+ throw new Error('BitMatrix size must be defined and greater than 0')
10544
+ }
10545
+
10546
+ this.size = size;
10547
+ this.data = new Uint8Array(size * size);
10548
+ this.reservedBit = new Uint8Array(size * size);
10549
+ }
10550
+
10551
+ /**
10552
+ * Set bit value at specified location
10553
+ * If reserved flag is set, this bit will be ignored during masking process
10554
+ *
10555
+ * @param {Number} row
10556
+ * @param {Number} col
10557
+ * @param {Boolean} value
10558
+ * @param {Boolean} reserved
10559
+ */
10560
+ BitMatrix.prototype.set = function (row, col, value, reserved) {
10561
+ const index = row * this.size + col;
10562
+ this.data[index] = value;
10563
+ if (reserved) this.reservedBit[index] = true;
10564
+ };
10565
+
10566
+ /**
10567
+ * Returns bit value at specified location
10568
+ *
10569
+ * @param {Number} row
10570
+ * @param {Number} col
10571
+ * @return {Boolean}
10572
+ */
10573
+ BitMatrix.prototype.get = function (row, col) {
10574
+ return this.data[row * this.size + col]
10575
+ };
10576
+
10577
+ /**
10578
+ * Applies xor operator at specified location
10579
+ * (used during masking process)
10580
+ *
10581
+ * @param {Number} row
10582
+ * @param {Number} col
10583
+ * @param {Boolean} value
10584
+ */
10585
+ BitMatrix.prototype.xor = function (row, col, value) {
10586
+ this.data[row * this.size + col] ^= value;
10587
+ };
10588
+
10589
+ /**
10590
+ * Check if bit at specified location is reserved
10591
+ *
10592
+ * @param {Number} row
10593
+ * @param {Number} col
10594
+ * @return {Boolean}
10595
+ */
10596
+ BitMatrix.prototype.isReserved = function (row, col) {
10597
+ return this.reservedBit[row * this.size + col]
10598
+ };
10599
+
10600
+ var bitMatrix = BitMatrix;
10601
+
10602
+ var alignmentPattern = _commonjsHelpers.createCommonjsModule(function (module, exports) {
10603
+ /**
10604
+ * Alignment pattern are fixed reference pattern in defined positions
10605
+ * in a matrix symbology, which enables the decode software to re-synchronise
10606
+ * the coordinate mapping of the image modules in the event of moderate amounts
10607
+ * of distortion of the image.
10608
+ *
10609
+ * Alignment patterns are present only in QR Code symbols of version 2 or larger
10610
+ * and their number depends on the symbol version.
10611
+ */
10612
+
10613
+ const getSymbolSize = utils$1.getSymbolSize;
10614
+
10615
+ /**
10616
+ * Calculate the row/column coordinates of the center module of each alignment pattern
10617
+ * for the specified QR Code version.
10618
+ *
10619
+ * The alignment patterns are positioned symmetrically on either side of the diagonal
10620
+ * running from the top left corner of the symbol to the bottom right corner.
10621
+ *
10622
+ * Since positions are simmetrical only half of the coordinates are returned.
10623
+ * Each item of the array will represent in turn the x and y coordinate.
10624
+ * @see {@link getPositions}
10625
+ *
10626
+ * @param {Number} version QR Code version
10627
+ * @return {Array} Array of coordinate
10628
+ */
10629
+ exports.getRowColCoords = function getRowColCoords (version) {
10630
+ if (version === 1) return []
10631
+
10632
+ const posCount = Math.floor(version / 7) + 2;
10633
+ const size = getSymbolSize(version);
10634
+ const intervals = size === 145 ? 26 : Math.ceil((size - 13) / (2 * posCount - 2)) * 2;
10635
+ const positions = [size - 7]; // Last coord is always (size - 7)
10636
+
10637
+ for (let i = 1; i < posCount - 1; i++) {
10638
+ positions[i] = positions[i - 1] - intervals;
10639
+ }
10640
+
10641
+ positions.push(6); // First coord is always 6
10642
+
10643
+ return positions.reverse()
10644
+ };
10645
+
10646
+ /**
10647
+ * Returns an array containing the positions of each alignment pattern.
10648
+ * Each array's element represent the center point of the pattern as (x, y) coordinates
10649
+ *
10650
+ * Coordinates are calculated expanding the row/column coordinates returned by {@link getRowColCoords}
10651
+ * and filtering out the items that overlaps with finder pattern
10652
+ *
10653
+ * @example
10654
+ * For a Version 7 symbol {@link getRowColCoords} returns values 6, 22 and 38.
10655
+ * The alignment patterns, therefore, are to be centered on (row, column)
10656
+ * positions (6,22), (22,6), (22,22), (22,38), (38,22), (38,38).
10657
+ * Note that the coordinates (6,6), (6,38), (38,6) are occupied by finder patterns
10658
+ * and are not therefore used for alignment patterns.
10659
+ *
10660
+ * let pos = getPositions(7)
10661
+ * // [[6,22], [22,6], [22,22], [22,38], [38,22], [38,38]]
10662
+ *
10663
+ * @param {Number} version QR Code version
10664
+ * @return {Array} Array of coordinates
10665
+ */
10666
+ exports.getPositions = function getPositions (version) {
10667
+ const coords = [];
10668
+ const pos = exports.getRowColCoords(version);
10669
+ const posLength = pos.length;
10670
+
10671
+ for (let i = 0; i < posLength; i++) {
10672
+ for (let j = 0; j < posLength; j++) {
10673
+ // Skip if position is occupied by finder patterns
10674
+ if ((i === 0 && j === 0) || // top-left
10675
+ (i === 0 && j === posLength - 1) || // bottom-left
10676
+ (i === posLength - 1 && j === 0)) { // top-right
10677
+ continue
10678
+ }
10679
+
10680
+ coords.push([pos[i], pos[j]]);
10681
+ }
10682
+ }
10683
+
10684
+ return coords
10685
+ };
10686
+ });
10687
+
10688
+ const getSymbolSize = utils$1.getSymbolSize;
10689
+ const FINDER_PATTERN_SIZE = 7;
10690
+
10691
+ /**
10692
+ * Returns an array containing the positions of each finder pattern.
10693
+ * Each array's element represent the top-left point of the pattern as (x, y) coordinates
10694
+ *
10695
+ * @param {Number} version QR Code version
10696
+ * @return {Array} Array of coordinates
10697
+ */
10698
+ var getPositions = function getPositions (version) {
10699
+ const size = getSymbolSize(version);
10700
+
10701
+ return [
10702
+ // top-left
10703
+ [0, 0],
10704
+ // top-right
10705
+ [size - FINDER_PATTERN_SIZE, 0],
10706
+ // bottom-left
10707
+ [0, size - FINDER_PATTERN_SIZE]
10708
+ ]
10709
+ };
10710
+
10711
+ var finderPattern = {
10712
+ getPositions: getPositions
10713
+ };
10714
+
10715
+ var maskPattern = _commonjsHelpers.createCommonjsModule(function (module, exports) {
10716
+ /**
10717
+ * Data mask pattern reference
10718
+ * @type {Object}
10719
+ */
10720
+ exports.Patterns = {
10721
+ PATTERN000: 0,
10722
+ PATTERN001: 1,
10723
+ PATTERN010: 2,
10724
+ PATTERN011: 3,
10725
+ PATTERN100: 4,
10726
+ PATTERN101: 5,
10727
+ PATTERN110: 6,
10728
+ PATTERN111: 7
10729
+ };
10730
+
10731
+ /**
10732
+ * Weighted penalty scores for the undesirable features
10733
+ * @type {Object}
10734
+ */
10735
+ const PenaltyScores = {
10736
+ N1: 3,
10737
+ N2: 3,
10738
+ N3: 40,
10739
+ N4: 10
10740
+ };
10741
+
10742
+ /**
10743
+ * Check if mask pattern value is valid
10744
+ *
10745
+ * @param {Number} mask Mask pattern
10746
+ * @return {Boolean} true if valid, false otherwise
10747
+ */
10748
+ exports.isValid = function isValid (mask) {
10749
+ return mask != null && mask !== '' && !isNaN(mask) && mask >= 0 && mask <= 7
10750
+ };
10751
+
10752
+ /**
10753
+ * Returns mask pattern from a value.
10754
+ * If value is not valid, returns undefined
10755
+ *
10756
+ * @param {Number|String} value Mask pattern value
10757
+ * @return {Number} Valid mask pattern or undefined
10758
+ */
10759
+ exports.from = function from (value) {
10760
+ return exports.isValid(value) ? parseInt(value, 10) : undefined
10761
+ };
10762
+
10763
+ /**
10764
+ * Find adjacent modules in row/column with the same color
10765
+ * and assign a penalty value.
10766
+ *
10767
+ * Points: N1 + i
10768
+ * i is the amount by which the number of adjacent modules of the same color exceeds 5
10769
+ */
10770
+ exports.getPenaltyN1 = function getPenaltyN1 (data) {
10771
+ const size = data.size;
10772
+ let points = 0;
10773
+ let sameCountCol = 0;
10774
+ let sameCountRow = 0;
10775
+ let lastCol = null;
10776
+ let lastRow = null;
10777
+
10778
+ for (let row = 0; row < size; row++) {
10779
+ sameCountCol = sameCountRow = 0;
10780
+ lastCol = lastRow = null;
10781
+
10782
+ for (let col = 0; col < size; col++) {
10783
+ let module = data.get(row, col);
10784
+ if (module === lastCol) {
10785
+ sameCountCol++;
10786
+ } else {
10787
+ if (sameCountCol >= 5) points += PenaltyScores.N1 + (sameCountCol - 5);
10788
+ lastCol = module;
10789
+ sameCountCol = 1;
10790
+ }
10791
+
10792
+ module = data.get(col, row);
10793
+ if (module === lastRow) {
10794
+ sameCountRow++;
10795
+ } else {
10796
+ if (sameCountRow >= 5) points += PenaltyScores.N1 + (sameCountRow - 5);
10797
+ lastRow = module;
10798
+ sameCountRow = 1;
10799
+ }
10800
+ }
10801
+
10802
+ if (sameCountCol >= 5) points += PenaltyScores.N1 + (sameCountCol - 5);
10803
+ if (sameCountRow >= 5) points += PenaltyScores.N1 + (sameCountRow - 5);
10804
+ }
10805
+
10806
+ return points
10807
+ };
10808
+
10809
+ /**
10810
+ * Find 2x2 blocks with the same color and assign a penalty value
10811
+ *
10812
+ * Points: N2 * (m - 1) * (n - 1)
10813
+ */
10814
+ exports.getPenaltyN2 = function getPenaltyN2 (data) {
10815
+ const size = data.size;
10816
+ let points = 0;
10817
+
10818
+ for (let row = 0; row < size - 1; row++) {
10819
+ for (let col = 0; col < size - 1; col++) {
10820
+ const last = data.get(row, col) +
10821
+ data.get(row, col + 1) +
10822
+ data.get(row + 1, col) +
10823
+ data.get(row + 1, col + 1);
10824
+
10825
+ if (last === 4 || last === 0) points++;
10826
+ }
10827
+ }
10828
+
10829
+ return points * PenaltyScores.N2
10830
+ };
10831
+
10832
+ /**
10833
+ * Find 1:1:3:1:1 ratio (dark:light:dark:light:dark) pattern in row/column,
10834
+ * preceded or followed by light area 4 modules wide
10835
+ *
10836
+ * Points: N3 * number of pattern found
10837
+ */
10838
+ exports.getPenaltyN3 = function getPenaltyN3 (data) {
10839
+ const size = data.size;
10840
+ let points = 0;
10841
+ let bitsCol = 0;
10842
+ let bitsRow = 0;
10843
+
10844
+ for (let row = 0; row < size; row++) {
10845
+ bitsCol = bitsRow = 0;
10846
+ for (let col = 0; col < size; col++) {
10847
+ bitsCol = ((bitsCol << 1) & 0x7FF) | data.get(row, col);
10848
+ if (col >= 10 && (bitsCol === 0x5D0 || bitsCol === 0x05D)) points++;
10849
+
10850
+ bitsRow = ((bitsRow << 1) & 0x7FF) | data.get(col, row);
10851
+ if (col >= 10 && (bitsRow === 0x5D0 || bitsRow === 0x05D)) points++;
10852
+ }
10853
+ }
10854
+
10855
+ return points * PenaltyScores.N3
10856
+ };
10857
+
10858
+ /**
10859
+ * Calculate proportion of dark modules in entire symbol
10860
+ *
10861
+ * Points: N4 * k
10862
+ *
10863
+ * k is the rating of the deviation of the proportion of dark modules
10864
+ * in the symbol from 50% in steps of 5%
10865
+ */
10866
+ exports.getPenaltyN4 = function getPenaltyN4 (data) {
10867
+ let darkCount = 0;
10868
+ const modulesCount = data.data.length;
10869
+
10870
+ for (let i = 0; i < modulesCount; i++) darkCount += data.data[i];
10871
+
10872
+ const k = Math.abs(Math.ceil((darkCount * 100 / modulesCount) / 5) - 10);
10873
+
10874
+ return k * PenaltyScores.N4
10875
+ };
10876
+
10877
+ /**
10878
+ * Return mask value at given position
10879
+ *
10880
+ * @param {Number} maskPattern Pattern reference value
10881
+ * @param {Number} i Row
10882
+ * @param {Number} j Column
10883
+ * @return {Boolean} Mask value
10884
+ */
10885
+ function getMaskAt (maskPattern, i, j) {
10886
+ switch (maskPattern) {
10887
+ case exports.Patterns.PATTERN000: return (i + j) % 2 === 0
10888
+ case exports.Patterns.PATTERN001: return i % 2 === 0
10889
+ case exports.Patterns.PATTERN010: return j % 3 === 0
10890
+ case exports.Patterns.PATTERN011: return (i + j) % 3 === 0
10891
+ case exports.Patterns.PATTERN100: return (Math.floor(i / 2) + Math.floor(j / 3)) % 2 === 0
10892
+ case exports.Patterns.PATTERN101: return (i * j) % 2 + (i * j) % 3 === 0
10893
+ case exports.Patterns.PATTERN110: return ((i * j) % 2 + (i * j) % 3) % 2 === 0
10894
+ case exports.Patterns.PATTERN111: return ((i * j) % 3 + (i + j) % 2) % 2 === 0
10895
+
10896
+ default: throw new Error('bad maskPattern:' + maskPattern)
10897
+ }
10898
+ }
10899
+
10900
+ /**
10901
+ * Apply a mask pattern to a BitMatrix
10902
+ *
10903
+ * @param {Number} pattern Pattern reference number
10904
+ * @param {BitMatrix} data BitMatrix data
10905
+ */
10906
+ exports.applyMask = function applyMask (pattern, data) {
10907
+ const size = data.size;
10908
+
10909
+ for (let col = 0; col < size; col++) {
10910
+ for (let row = 0; row < size; row++) {
10911
+ if (data.isReserved(row, col)) continue
10912
+ data.xor(row, col, getMaskAt(pattern, row, col));
10913
+ }
10914
+ }
10915
+ };
10916
+
10917
+ /**
10918
+ * Returns the best mask pattern for data
10919
+ *
10920
+ * @param {BitMatrix} data
10921
+ * @return {Number} Mask pattern reference number
10922
+ */
10923
+ exports.getBestMask = function getBestMask (data, setupFormatFunc) {
10924
+ const numPatterns = Object.keys(exports.Patterns).length;
10925
+ let bestPattern = 0;
10926
+ let lowerPenalty = Infinity;
10927
+
10928
+ for (let p = 0; p < numPatterns; p++) {
10929
+ setupFormatFunc(p);
10930
+ exports.applyMask(p, data);
10931
+
10932
+ // Calculate penalty
10933
+ const penalty =
10934
+ exports.getPenaltyN1(data) +
10935
+ exports.getPenaltyN2(data) +
10936
+ exports.getPenaltyN3(data) +
10937
+ exports.getPenaltyN4(data);
10938
+
10939
+ // Undo previously applied mask
10940
+ exports.applyMask(p, data);
10941
+
10942
+ if (penalty < lowerPenalty) {
10943
+ lowerPenalty = penalty;
10944
+ bestPattern = p;
10945
+ }
10946
+ }
10947
+
10948
+ return bestPattern
10949
+ };
10950
+ });
10951
+
10952
+ const EC_BLOCKS_TABLE = [
10953
+ // L M Q H
10954
+ 1, 1, 1, 1,
10955
+ 1, 1, 1, 1,
10956
+ 1, 1, 2, 2,
10957
+ 1, 2, 2, 4,
10958
+ 1, 2, 4, 4,
10959
+ 2, 4, 4, 4,
10960
+ 2, 4, 6, 5,
10961
+ 2, 4, 6, 6,
10962
+ 2, 5, 8, 8,
10963
+ 4, 5, 8, 8,
10964
+ 4, 5, 8, 11,
10965
+ 4, 8, 10, 11,
10966
+ 4, 9, 12, 16,
10967
+ 4, 9, 16, 16,
10968
+ 6, 10, 12, 18,
10969
+ 6, 10, 17, 16,
10970
+ 6, 11, 16, 19,
10971
+ 6, 13, 18, 21,
10972
+ 7, 14, 21, 25,
10973
+ 8, 16, 20, 25,
10974
+ 8, 17, 23, 25,
10975
+ 9, 17, 23, 34,
10976
+ 9, 18, 25, 30,
10977
+ 10, 20, 27, 32,
10978
+ 12, 21, 29, 35,
10979
+ 12, 23, 34, 37,
10980
+ 12, 25, 34, 40,
10981
+ 13, 26, 35, 42,
10982
+ 14, 28, 38, 45,
10983
+ 15, 29, 40, 48,
10984
+ 16, 31, 43, 51,
10985
+ 17, 33, 45, 54,
10986
+ 18, 35, 48, 57,
10987
+ 19, 37, 51, 60,
10988
+ 19, 38, 53, 63,
10989
+ 20, 40, 56, 66,
10990
+ 21, 43, 59, 70,
10991
+ 22, 45, 62, 74,
10992
+ 24, 47, 65, 77,
10993
+ 25, 49, 68, 81
10994
+ ];
10995
+
10996
+ const EC_CODEWORDS_TABLE = [
10997
+ // L M Q H
10998
+ 7, 10, 13, 17,
10999
+ 10, 16, 22, 28,
11000
+ 15, 26, 36, 44,
11001
+ 20, 36, 52, 64,
11002
+ 26, 48, 72, 88,
11003
+ 36, 64, 96, 112,
11004
+ 40, 72, 108, 130,
11005
+ 48, 88, 132, 156,
11006
+ 60, 110, 160, 192,
11007
+ 72, 130, 192, 224,
11008
+ 80, 150, 224, 264,
11009
+ 96, 176, 260, 308,
11010
+ 104, 198, 288, 352,
11011
+ 120, 216, 320, 384,
11012
+ 132, 240, 360, 432,
11013
+ 144, 280, 408, 480,
11014
+ 168, 308, 448, 532,
11015
+ 180, 338, 504, 588,
11016
+ 196, 364, 546, 650,
11017
+ 224, 416, 600, 700,
11018
+ 224, 442, 644, 750,
11019
+ 252, 476, 690, 816,
11020
+ 270, 504, 750, 900,
11021
+ 300, 560, 810, 960,
11022
+ 312, 588, 870, 1050,
11023
+ 336, 644, 952, 1110,
11024
+ 360, 700, 1020, 1200,
11025
+ 390, 728, 1050, 1260,
11026
+ 420, 784, 1140, 1350,
11027
+ 450, 812, 1200, 1440,
11028
+ 480, 868, 1290, 1530,
11029
+ 510, 924, 1350, 1620,
11030
+ 540, 980, 1440, 1710,
11031
+ 570, 1036, 1530, 1800,
11032
+ 570, 1064, 1590, 1890,
11033
+ 600, 1120, 1680, 1980,
11034
+ 630, 1204, 1770, 2100,
11035
+ 660, 1260, 1860, 2220,
11036
+ 720, 1316, 1950, 2310,
11037
+ 750, 1372, 2040, 2430
11038
+ ];
11039
+
11040
+ /**
11041
+ * Returns the number of error correction block that the QR Code should contain
11042
+ * for the specified version and error correction level.
11043
+ *
11044
+ * @param {Number} version QR Code version
11045
+ * @param {Number} errorCorrectionLevel Error correction level
11046
+ * @return {Number} Number of error correction blocks
11047
+ */
11048
+ var getBlocksCount = function getBlocksCount (version, errorCorrectionLevel$1) {
11049
+ switch (errorCorrectionLevel$1) {
11050
+ case errorCorrectionLevel.L:
11051
+ return EC_BLOCKS_TABLE[(version - 1) * 4 + 0]
11052
+ case errorCorrectionLevel.M:
11053
+ return EC_BLOCKS_TABLE[(version - 1) * 4 + 1]
11054
+ case errorCorrectionLevel.Q:
11055
+ return EC_BLOCKS_TABLE[(version - 1) * 4 + 2]
11056
+ case errorCorrectionLevel.H:
11057
+ return EC_BLOCKS_TABLE[(version - 1) * 4 + 3]
11058
+ default:
11059
+ return undefined
11060
+ }
11061
+ };
11062
+
11063
+ /**
11064
+ * Returns the number of error correction codewords to use for the specified
11065
+ * version and error correction level.
11066
+ *
11067
+ * @param {Number} version QR Code version
11068
+ * @param {Number} errorCorrectionLevel Error correction level
11069
+ * @return {Number} Number of error correction codewords
11070
+ */
11071
+ var getTotalCodewordsCount = function getTotalCodewordsCount (version, errorCorrectionLevel$1) {
11072
+ switch (errorCorrectionLevel$1) {
11073
+ case errorCorrectionLevel.L:
11074
+ return EC_CODEWORDS_TABLE[(version - 1) * 4 + 0]
11075
+ case errorCorrectionLevel.M:
11076
+ return EC_CODEWORDS_TABLE[(version - 1) * 4 + 1]
11077
+ case errorCorrectionLevel.Q:
11078
+ return EC_CODEWORDS_TABLE[(version - 1) * 4 + 2]
11079
+ case errorCorrectionLevel.H:
11080
+ return EC_CODEWORDS_TABLE[(version - 1) * 4 + 3]
11081
+ default:
11082
+ return undefined
11083
+ }
11084
+ };
11085
+
11086
+ var errorCorrectionCode = {
11087
+ getBlocksCount: getBlocksCount,
11088
+ getTotalCodewordsCount: getTotalCodewordsCount
11089
+ };
11090
+
11091
+ const EXP_TABLE = new Uint8Array(512);
11092
+ const LOG_TABLE = new Uint8Array(256)
11093
+ /**
11094
+ * Precompute the log and anti-log tables for faster computation later
11095
+ *
11096
+ * For each possible value in the galois field 2^8, we will pre-compute
11097
+ * the logarithm and anti-logarithm (exponential) of this value
11098
+ *
11099
+ * ref {@link https://en.wikiversity.org/wiki/Reed%E2%80%93Solomon_codes_for_coders#Introduction_to_mathematical_fields}
11100
+ */
11101
+ ;(function initTables () {
11102
+ let x = 1;
11103
+ for (let i = 0; i < 255; i++) {
11104
+ EXP_TABLE[i] = x;
11105
+ LOG_TABLE[x] = i;
11106
+
11107
+ x <<= 1; // multiply by 2
11108
+
11109
+ // The QR code specification says to use byte-wise modulo 100011101 arithmetic.
11110
+ // This means that when a number is 256 or larger, it should be XORed with 0x11D.
11111
+ if (x & 0x100) { // similar to x >= 256, but a lot faster (because 0x100 == 256)
11112
+ x ^= 0x11D;
11113
+ }
11114
+ }
11115
+
11116
+ // Optimization: double the size of the anti-log table so that we don't need to mod 255 to
11117
+ // stay inside the bounds (because we will mainly use this table for the multiplication of
11118
+ // two GF numbers, no more).
11119
+ // @see {@link mul}
11120
+ for (let i = 255; i < 512; i++) {
11121
+ EXP_TABLE[i] = EXP_TABLE[i - 255];
11122
+ }
11123
+ }());
11124
+
11125
+ /**
11126
+ * Returns log value of n inside Galois Field
11127
+ *
11128
+ * @param {Number} n
11129
+ * @return {Number}
11130
+ */
11131
+ var log = function log (n) {
11132
+ if (n < 1) throw new Error('log(' + n + ')')
11133
+ return LOG_TABLE[n]
11134
+ };
11135
+
11136
+ /**
11137
+ * Returns anti-log value of n inside Galois Field
11138
+ *
11139
+ * @param {Number} n
11140
+ * @return {Number}
11141
+ */
11142
+ var exp = function exp (n) {
11143
+ return EXP_TABLE[n]
11144
+ };
11145
+
11146
+ /**
11147
+ * Multiplies two number inside Galois Field
11148
+ *
11149
+ * @param {Number} x
11150
+ * @param {Number} y
11151
+ * @return {Number}
11152
+ */
11153
+ var mul = function mul (x, y) {
11154
+ if (x === 0 || y === 0) return 0
11155
+
11156
+ // should be EXP_TABLE[(LOG_TABLE[x] + LOG_TABLE[y]) % 255] if EXP_TABLE wasn't oversized
11157
+ // @see {@link initTables}
11158
+ return EXP_TABLE[LOG_TABLE[x] + LOG_TABLE[y]]
11159
+ };
11160
+
11161
+ var galoisField = {
11162
+ log: log,
11163
+ exp: exp,
11164
+ mul: mul
11165
+ };
11166
+
11167
+ var polynomial = _commonjsHelpers.createCommonjsModule(function (module, exports) {
11168
+ /**
11169
+ * Multiplies two polynomials inside Galois Field
11170
+ *
11171
+ * @param {Uint8Array} p1 Polynomial
11172
+ * @param {Uint8Array} p2 Polynomial
11173
+ * @return {Uint8Array} Product of p1 and p2
11174
+ */
11175
+ exports.mul = function mul (p1, p2) {
11176
+ const coeff = new Uint8Array(p1.length + p2.length - 1);
11177
+
11178
+ for (let i = 0; i < p1.length; i++) {
11179
+ for (let j = 0; j < p2.length; j++) {
11180
+ coeff[i + j] ^= galoisField.mul(p1[i], p2[j]);
11181
+ }
11182
+ }
11183
+
11184
+ return coeff
11185
+ };
11186
+
11187
+ /**
11188
+ * Calculate the remainder of polynomials division
11189
+ *
11190
+ * @param {Uint8Array} divident Polynomial
11191
+ * @param {Uint8Array} divisor Polynomial
11192
+ * @return {Uint8Array} Remainder
11193
+ */
11194
+ exports.mod = function mod (divident, divisor) {
11195
+ let result = new Uint8Array(divident);
11196
+
11197
+ while ((result.length - divisor.length) >= 0) {
11198
+ const coeff = result[0];
11199
+
11200
+ for (let i = 0; i < divisor.length; i++) {
11201
+ result[i] ^= galoisField.mul(divisor[i], coeff);
11202
+ }
11203
+
11204
+ // remove all zeros from buffer head
11205
+ let offset = 0;
11206
+ while (offset < result.length && result[offset] === 0) offset++;
11207
+ result = result.slice(offset);
11208
+ }
11209
+
11210
+ return result
11211
+ };
11212
+
11213
+ /**
11214
+ * Generate an irreducible generator polynomial of specified degree
11215
+ * (used by Reed-Solomon encoder)
11216
+ *
11217
+ * @param {Number} degree Degree of the generator polynomial
11218
+ * @return {Uint8Array} Buffer containing polynomial coefficients
11219
+ */
11220
+ exports.generateECPolynomial = function generateECPolynomial (degree) {
11221
+ let poly = new Uint8Array([1]);
11222
+ for (let i = 0; i < degree; i++) {
11223
+ poly = exports.mul(poly, new Uint8Array([1, galoisField.exp(i)]));
11224
+ }
11225
+
11226
+ return poly
11227
+ };
11228
+ });
11229
+
11230
+ function ReedSolomonEncoder (degree) {
11231
+ this.genPoly = undefined;
11232
+ this.degree = degree;
11233
+
11234
+ if (this.degree) this.initialize(this.degree);
11235
+ }
11236
+
11237
+ /**
11238
+ * Initialize the encoder.
11239
+ * The input param should correspond to the number of error correction codewords.
11240
+ *
11241
+ * @param {Number} degree
11242
+ */
11243
+ ReedSolomonEncoder.prototype.initialize = function initialize (degree) {
11244
+ // create an irreducible generator polynomial
11245
+ this.degree = degree;
11246
+ this.genPoly = polynomial.generateECPolynomial(this.degree);
11247
+ };
11248
+
11249
+ /**
11250
+ * Encodes a chunk of data
11251
+ *
11252
+ * @param {Uint8Array} data Buffer containing input data
11253
+ * @return {Uint8Array} Buffer containing encoded data
11254
+ */
11255
+ ReedSolomonEncoder.prototype.encode = function encode (data) {
11256
+ if (!this.genPoly) {
11257
+ throw new Error('Encoder not initialized')
11258
+ }
11259
+
11260
+ // Calculate EC for this data block
11261
+ // extends data size to data+genPoly size
11262
+ const paddedData = new Uint8Array(data.length + this.degree);
11263
+ paddedData.set(data);
11264
+
11265
+ // The error correction codewords are the remainder after dividing the data codewords
11266
+ // by a generator polynomial
11267
+ const remainder = polynomial.mod(paddedData, this.genPoly);
11268
+
11269
+ // return EC data blocks (last n byte, where n is the degree of genPoly)
11270
+ // If coefficients number in remainder are less than genPoly degree,
11271
+ // pad with 0s to the left to reach the needed number of coefficients
11272
+ const start = this.degree - remainder.length;
11273
+ if (start > 0) {
11274
+ const buff = new Uint8Array(this.degree);
11275
+ buff.set(remainder, start);
11276
+
11277
+ return buff
11278
+ }
11279
+
11280
+ return remainder
11281
+ };
11282
+
11283
+ var reedSolomonEncoder = ReedSolomonEncoder;
11284
+
11285
+ /**
11286
+ * Check if QR Code version is valid
11287
+ *
11288
+ * @param {Number} version QR Code version
11289
+ * @return {Boolean} true if valid version, false otherwise
11290
+ */
11291
+ var isValid = function isValid (version) {
11292
+ return !isNaN(version) && version >= 1 && version <= 40
11293
+ };
11294
+
11295
+ var versionCheck = {
11296
+ isValid: isValid
11297
+ };
11298
+
11299
+ const numeric = '[0-9]+';
11300
+ const alphanumeric = '[A-Z $%*+\\-./:]+';
11301
+ let kanji = '(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|' +
11302
+ '[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|' +
11303
+ '[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|' +
11304
+ '[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+';
11305
+ kanji = kanji.replace(/u/g, '\\u');
11306
+
11307
+ const byte = '(?:(?![A-Z0-9 $%*+\\-./:]|' + kanji + ')(?:.|[\r\n]))+';
11308
+
11309
+ var KANJI = new RegExp(kanji, 'g');
11310
+ var BYTE_KANJI = new RegExp('[^A-Z0-9 $%*+\\-./:]+', 'g');
11311
+ var BYTE = new RegExp(byte, 'g');
11312
+ var NUMERIC = new RegExp(numeric, 'g');
11313
+ var ALPHANUMERIC = new RegExp(alphanumeric, 'g');
11314
+
11315
+ const TEST_KANJI = new RegExp('^' + kanji + '$');
11316
+ const TEST_NUMERIC = new RegExp('^' + numeric + '$');
11317
+ const TEST_ALPHANUMERIC = new RegExp('^[A-Z0-9 $%*+\\-./:]+$');
11318
+
11319
+ var testKanji = function testKanji (str) {
11320
+ return TEST_KANJI.test(str)
11321
+ };
11322
+
11323
+ var testNumeric = function testNumeric (str) {
11324
+ return TEST_NUMERIC.test(str)
11325
+ };
11326
+
11327
+ var testAlphanumeric = function testAlphanumeric (str) {
11328
+ return TEST_ALPHANUMERIC.test(str)
11329
+ };
11330
+
11331
+ var regex = {
11332
+ KANJI: KANJI,
11333
+ BYTE_KANJI: BYTE_KANJI,
11334
+ BYTE: BYTE,
11335
+ NUMERIC: NUMERIC,
11336
+ ALPHANUMERIC: ALPHANUMERIC,
11337
+ testKanji: testKanji,
11338
+ testNumeric: testNumeric,
11339
+ testAlphanumeric: testAlphanumeric
11340
+ };
11341
+
11342
+ var mode = _commonjsHelpers.createCommonjsModule(function (module, exports) {
11343
+ /**
11344
+ * Numeric mode encodes data from the decimal digit set (0 - 9)
11345
+ * (byte values 30HEX to 39HEX).
11346
+ * Normally, 3 data characters are represented by 10 bits.
11347
+ *
11348
+ * @type {Object}
11349
+ */
11350
+ exports.NUMERIC = {
11351
+ id: 'Numeric',
11352
+ bit: 1 << 0,
11353
+ ccBits: [10, 12, 14]
11354
+ };
11355
+
11356
+ /**
11357
+ * Alphanumeric mode encodes data from a set of 45 characters,
11358
+ * i.e. 10 numeric digits (0 - 9),
11359
+ * 26 alphabetic characters (A - Z),
11360
+ * and 9 symbols (SP, $, %, *, +, -, ., /, :).
11361
+ * Normally, two input characters are represented by 11 bits.
11362
+ *
11363
+ * @type {Object}
11364
+ */
11365
+ exports.ALPHANUMERIC = {
11366
+ id: 'Alphanumeric',
11367
+ bit: 1 << 1,
11368
+ ccBits: [9, 11, 13]
11369
+ };
11370
+
11371
+ /**
11372
+ * In byte mode, data is encoded at 8 bits per character.
11373
+ *
11374
+ * @type {Object}
11375
+ */
11376
+ exports.BYTE = {
11377
+ id: 'Byte',
11378
+ bit: 1 << 2,
11379
+ ccBits: [8, 16, 16]
11380
+ };
11381
+
11382
+ /**
11383
+ * The Kanji mode efficiently encodes Kanji characters in accordance with
11384
+ * the Shift JIS system based on JIS X 0208.
11385
+ * The Shift JIS values are shifted from the JIS X 0208 values.
11386
+ * JIS X 0208 gives details of the shift coded representation.
11387
+ * Each two-byte character value is compacted to a 13-bit binary codeword.
11388
+ *
11389
+ * @type {Object}
11390
+ */
11391
+ exports.KANJI = {
11392
+ id: 'Kanji',
11393
+ bit: 1 << 3,
11394
+ ccBits: [8, 10, 12]
11395
+ };
11396
+
11397
+ /**
11398
+ * Mixed mode will contain a sequences of data in a combination of any of
11399
+ * the modes described above
11400
+ *
11401
+ * @type {Object}
11402
+ */
11403
+ exports.MIXED = {
11404
+ bit: -1
11405
+ };
11406
+
11407
+ /**
11408
+ * Returns the number of bits needed to store the data length
11409
+ * according to QR Code specifications.
11410
+ *
11411
+ * @param {Mode} mode Data mode
11412
+ * @param {Number} version QR Code version
11413
+ * @return {Number} Number of bits
11414
+ */
11415
+ exports.getCharCountIndicator = function getCharCountIndicator (mode, version) {
11416
+ if (!mode.ccBits) throw new Error('Invalid mode: ' + mode)
11417
+
11418
+ if (!versionCheck.isValid(version)) {
11419
+ throw new Error('Invalid version: ' + version)
11420
+ }
11421
+
11422
+ if (version >= 1 && version < 10) return mode.ccBits[0]
11423
+ else if (version < 27) return mode.ccBits[1]
11424
+ return mode.ccBits[2]
11425
+ };
11426
+
11427
+ /**
11428
+ * Returns the most efficient mode to store the specified data
11429
+ *
11430
+ * @param {String} dataStr Input data string
11431
+ * @return {Mode} Best mode
11432
+ */
11433
+ exports.getBestModeForData = function getBestModeForData (dataStr) {
11434
+ if (regex.testNumeric(dataStr)) return exports.NUMERIC
11435
+ else if (regex.testAlphanumeric(dataStr)) return exports.ALPHANUMERIC
11436
+ else if (regex.testKanji(dataStr)) return exports.KANJI
11437
+ else return exports.BYTE
11438
+ };
11439
+
11440
+ /**
11441
+ * Return mode name as string
11442
+ *
11443
+ * @param {Mode} mode Mode object
11444
+ * @returns {String} Mode name
11445
+ */
11446
+ exports.toString = function toString (mode) {
11447
+ if (mode && mode.id) return mode.id
11448
+ throw new Error('Invalid mode')
11449
+ };
11450
+
11451
+ /**
11452
+ * Check if input param is a valid mode object
11453
+ *
11454
+ * @param {Mode} mode Mode object
11455
+ * @returns {Boolean} True if valid mode, false otherwise
11456
+ */
11457
+ exports.isValid = function isValid (mode) {
11458
+ return mode && mode.bit && mode.ccBits
11459
+ };
11460
+
11461
+ /**
11462
+ * Get mode object from its name
11463
+ *
11464
+ * @param {String} string Mode name
11465
+ * @returns {Mode} Mode object
11466
+ */
11467
+ function fromString (string) {
11468
+ if (typeof string !== 'string') {
11469
+ throw new Error('Param is not a string')
11470
+ }
11471
+
11472
+ const lcStr = string.toLowerCase();
11473
+
11474
+ switch (lcStr) {
11475
+ case 'numeric':
11476
+ return exports.NUMERIC
11477
+ case 'alphanumeric':
11478
+ return exports.ALPHANUMERIC
11479
+ case 'kanji':
11480
+ return exports.KANJI
11481
+ case 'byte':
11482
+ return exports.BYTE
11483
+ default:
11484
+ throw new Error('Unknown mode: ' + string)
11485
+ }
11486
+ }
11487
+
11488
+ /**
11489
+ * Returns mode from a value.
11490
+ * If value is not a valid mode, returns defaultValue
11491
+ *
11492
+ * @param {Mode|String} value Encoding mode
11493
+ * @param {Mode} defaultValue Fallback value
11494
+ * @return {Mode} Encoding mode
11495
+ */
11496
+ exports.from = function from (value, defaultValue) {
11497
+ if (exports.isValid(value)) {
11498
+ return value
11499
+ }
11500
+
11501
+ try {
11502
+ return fromString(value)
11503
+ } catch (e) {
11504
+ return defaultValue
11505
+ }
11506
+ };
11507
+ });
11508
+
11509
+ var version = _commonjsHelpers.createCommonjsModule(function (module, exports) {
11510
+ // Generator polynomial used to encode version information
11511
+ const G18 = (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0);
11512
+ const G18_BCH = utils$1.getBCHDigit(G18);
11513
+
11514
+ function getBestVersionForDataLength (mode, length, errorCorrectionLevel) {
11515
+ for (let currentVersion = 1; currentVersion <= 40; currentVersion++) {
11516
+ if (length <= exports.getCapacity(currentVersion, errorCorrectionLevel, mode)) {
11517
+ return currentVersion
11518
+ }
11519
+ }
11520
+
11521
+ return undefined
11522
+ }
11523
+
11524
+ function getReservedBitsCount (mode$1, version) {
11525
+ // Character count indicator + mode indicator bits
11526
+ return mode.getCharCountIndicator(mode$1, version) + 4
11527
+ }
11528
+
11529
+ function getTotalBitsFromDataArray (segments, version) {
11530
+ let totalBits = 0;
11531
+
11532
+ segments.forEach(function (data) {
11533
+ const reservedBits = getReservedBitsCount(data.mode, version);
11534
+ totalBits += reservedBits + data.getBitsLength();
11535
+ });
11536
+
11537
+ return totalBits
11538
+ }
11539
+
11540
+ function getBestVersionForMixedData (segments, errorCorrectionLevel) {
11541
+ for (let currentVersion = 1; currentVersion <= 40; currentVersion++) {
11542
+ const length = getTotalBitsFromDataArray(segments, currentVersion);
11543
+ if (length <= exports.getCapacity(currentVersion, errorCorrectionLevel, mode.MIXED)) {
11544
+ return currentVersion
11545
+ }
11546
+ }
11547
+
11548
+ return undefined
11549
+ }
11550
+
11551
+ /**
11552
+ * Returns version number from a value.
11553
+ * If value is not a valid version, returns defaultValue
11554
+ *
11555
+ * @param {Number|String} value QR Code version
11556
+ * @param {Number} defaultValue Fallback value
11557
+ * @return {Number} QR Code version number
11558
+ */
11559
+ exports.from = function from (value, defaultValue) {
11560
+ if (versionCheck.isValid(value)) {
11561
+ return parseInt(value, 10)
11562
+ }
11563
+
11564
+ return defaultValue
11565
+ };
11566
+
11567
+ /**
11568
+ * Returns how much data can be stored with the specified QR code version
11569
+ * and error correction level
11570
+ *
11571
+ * @param {Number} version QR Code version (1-40)
11572
+ * @param {Number} errorCorrectionLevel Error correction level
11573
+ * @param {Mode} mode Data mode
11574
+ * @return {Number} Quantity of storable data
11575
+ */
11576
+ exports.getCapacity = function getCapacity (version, errorCorrectionLevel, mode$1) {
11577
+ if (!versionCheck.isValid(version)) {
11578
+ throw new Error('Invalid QR Code version')
11579
+ }
11580
+
11581
+ // Use Byte mode as default
11582
+ if (typeof mode$1 === 'undefined') mode$1 = mode.BYTE;
11583
+
11584
+ // Total codewords for this QR code version (Data + Error correction)
11585
+ const totalCodewords = utils$1.getSymbolTotalCodewords(version);
11586
+
11587
+ // Total number of error correction codewords
11588
+ const ecTotalCodewords = errorCorrectionCode.getTotalCodewordsCount(version, errorCorrectionLevel);
11589
+
11590
+ // Total number of data codewords
11591
+ const dataTotalCodewordsBits = (totalCodewords - ecTotalCodewords) * 8;
11592
+
11593
+ if (mode$1 === mode.MIXED) return dataTotalCodewordsBits
11594
+
11595
+ const usableBits = dataTotalCodewordsBits - getReservedBitsCount(mode$1, version);
11596
+
11597
+ // Return max number of storable codewords
11598
+ switch (mode$1) {
11599
+ case mode.NUMERIC:
11600
+ return Math.floor((usableBits / 10) * 3)
11601
+
11602
+ case mode.ALPHANUMERIC:
11603
+ return Math.floor((usableBits / 11) * 2)
11604
+
11605
+ case mode.KANJI:
11606
+ return Math.floor(usableBits / 13)
11607
+
11608
+ case mode.BYTE:
11609
+ default:
11610
+ return Math.floor(usableBits / 8)
11611
+ }
11612
+ };
11613
+
11614
+ /**
11615
+ * Returns the minimum version needed to contain the amount of data
11616
+ *
11617
+ * @param {Segment} data Segment of data
11618
+ * @param {Number} [errorCorrectionLevel=H] Error correction level
11619
+ * @param {Mode} mode Data mode
11620
+ * @return {Number} QR Code version
11621
+ */
11622
+ exports.getBestVersionForData = function getBestVersionForData (data, errorCorrectionLevel$1) {
11623
+ let seg;
11624
+
11625
+ const ecl = errorCorrectionLevel.from(errorCorrectionLevel$1, errorCorrectionLevel.M);
11626
+
11627
+ if (Array.isArray(data)) {
11628
+ if (data.length > 1) {
11629
+ return getBestVersionForMixedData(data, ecl)
11630
+ }
11631
+
11632
+ if (data.length === 0) {
11633
+ return 1
11634
+ }
11635
+
11636
+ seg = data[0];
11637
+ } else {
11638
+ seg = data;
11639
+ }
11640
+
11641
+ return getBestVersionForDataLength(seg.mode, seg.getLength(), ecl)
11642
+ };
11643
+
11644
+ /**
11645
+ * Returns version information with relative error correction bits
11646
+ *
11647
+ * The version information is included in QR Code symbols of version 7 or larger.
11648
+ * It consists of an 18-bit sequence containing 6 data bits,
11649
+ * with 12 error correction bits calculated using the (18, 6) Golay code.
11650
+ *
11651
+ * @param {Number} version QR Code version
11652
+ * @return {Number} Encoded version info bits
11653
+ */
11654
+ exports.getEncodedBits = function getEncodedBits (version) {
11655
+ if (!versionCheck.isValid(version) || version < 7) {
11656
+ throw new Error('Invalid QR Code version')
11657
+ }
11658
+
11659
+ let d = version << 12;
11660
+
11661
+ while (utils$1.getBCHDigit(d) - G18_BCH >= 0) {
11662
+ d ^= (G18 << (utils$1.getBCHDigit(d) - G18_BCH));
11663
+ }
11664
+
11665
+ return (version << 12) | d
11666
+ };
11667
+ });
11668
+
11669
+ const G15 = (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0);
11670
+ const G15_MASK = (1 << 14) | (1 << 12) | (1 << 10) | (1 << 4) | (1 << 1);
11671
+ const G15_BCH = utils$1.getBCHDigit(G15);
11672
+
11673
+ /**
11674
+ * Returns format information with relative error correction bits
11675
+ *
11676
+ * The format information is a 15-bit sequence containing 5 data bits,
11677
+ * with 10 error correction bits calculated using the (15, 5) BCH code.
11678
+ *
11679
+ * @param {Number} errorCorrectionLevel Error correction level
11680
+ * @param {Number} mask Mask pattern
11681
+ * @return {Number} Encoded format information bits
11682
+ */
11683
+ var getEncodedBits = function getEncodedBits (errorCorrectionLevel, mask) {
11684
+ const data = ((errorCorrectionLevel.bit << 3) | mask);
11685
+ let d = data << 10;
11686
+
11687
+ while (utils$1.getBCHDigit(d) - G15_BCH >= 0) {
11688
+ d ^= (G15 << (utils$1.getBCHDigit(d) - G15_BCH));
11689
+ }
11690
+
11691
+ // xor final data with mask pattern in order to ensure that
11692
+ // no combination of Error Correction Level and data mask pattern
11693
+ // will result in an all-zero data string
11694
+ return ((data << 10) | d) ^ G15_MASK
11695
+ };
11696
+
11697
+ var formatInfo = {
11698
+ getEncodedBits: getEncodedBits
11699
+ };
11700
+
11701
+ function NumericData (data) {
11702
+ this.mode = mode.NUMERIC;
11703
+ this.data = data.toString();
11704
+ }
11705
+
11706
+ NumericData.getBitsLength = function getBitsLength (length) {
11707
+ return 10 * Math.floor(length / 3) + ((length % 3) ? ((length % 3) * 3 + 1) : 0)
11708
+ };
11709
+
11710
+ NumericData.prototype.getLength = function getLength () {
11711
+ return this.data.length
11712
+ };
11713
+
11714
+ NumericData.prototype.getBitsLength = function getBitsLength () {
11715
+ return NumericData.getBitsLength(this.data.length)
11716
+ };
11717
+
11718
+ NumericData.prototype.write = function write (bitBuffer) {
11719
+ let i, group, value;
11720
+
11721
+ // The input data string is divided into groups of three digits,
11722
+ // and each group is converted to its 10-bit binary equivalent.
11723
+ for (i = 0; i + 3 <= this.data.length; i += 3) {
11724
+ group = this.data.substr(i, 3);
11725
+ value = parseInt(group, 10);
11726
+
11727
+ bitBuffer.put(value, 10);
11728
+ }
11729
+
11730
+ // If the number of input digits is not an exact multiple of three,
11731
+ // the final one or two digits are converted to 4 or 7 bits respectively.
11732
+ const remainingNum = this.data.length - i;
11733
+ if (remainingNum > 0) {
11734
+ group = this.data.substr(i);
11735
+ value = parseInt(group, 10);
11736
+
11737
+ bitBuffer.put(value, remainingNum * 3 + 1);
11738
+ }
11739
+ };
11740
+
11741
+ var numericData = NumericData;
11742
+
11743
+ /**
11744
+ * Array of characters available in alphanumeric mode
11745
+ *
11746
+ * As per QR Code specification, to each character
11747
+ * is assigned a value from 0 to 44 which in this case coincides
11748
+ * with the array index
11749
+ *
11750
+ * @type {Array}
11751
+ */
11752
+ const ALPHA_NUM_CHARS = [
11753
+ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
11754
+ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
11755
+ 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
11756
+ ' ', '$', '%', '*', '+', '-', '.', '/', ':'
11757
+ ];
11758
+
11759
+ function AlphanumericData (data) {
11760
+ this.mode = mode.ALPHANUMERIC;
11761
+ this.data = data;
11762
+ }
11763
+
11764
+ AlphanumericData.getBitsLength = function getBitsLength (length) {
11765
+ return 11 * Math.floor(length / 2) + 6 * (length % 2)
11766
+ };
11767
+
11768
+ AlphanumericData.prototype.getLength = function getLength () {
11769
+ return this.data.length
11770
+ };
11771
+
11772
+ AlphanumericData.prototype.getBitsLength = function getBitsLength () {
11773
+ return AlphanumericData.getBitsLength(this.data.length)
11774
+ };
11775
+
11776
+ AlphanumericData.prototype.write = function write (bitBuffer) {
11777
+ let i;
11778
+
11779
+ // Input data characters are divided into groups of two characters
11780
+ // and encoded as 11-bit binary codes.
11781
+ for (i = 0; i + 2 <= this.data.length; i += 2) {
11782
+ // The character value of the first character is multiplied by 45
11783
+ let value = ALPHA_NUM_CHARS.indexOf(this.data[i]) * 45;
11784
+
11785
+ // The character value of the second digit is added to the product
11786
+ value += ALPHA_NUM_CHARS.indexOf(this.data[i + 1]);
11787
+
11788
+ // The sum is then stored as 11-bit binary number
11789
+ bitBuffer.put(value, 11);
11790
+ }
11791
+
11792
+ // If the number of input data characters is not a multiple of two,
11793
+ // the character value of the final character is encoded as a 6-bit binary number.
11794
+ if (this.data.length % 2) {
11795
+ bitBuffer.put(ALPHA_NUM_CHARS.indexOf(this.data[i]), 6);
11796
+ }
11797
+ };
11798
+
11799
+ var alphanumericData = AlphanumericData;
11800
+
11801
+ var encodeUtf8 = function encodeUtf8 (input) {
11802
+ var result = [];
11803
+ var size = input.length;
11804
+
11805
+ for (var index = 0; index < size; index++) {
11806
+ var point = input.charCodeAt(index);
11807
+
11808
+ if (point >= 0xD800 && point <= 0xDBFF && size > index + 1) {
11809
+ var second = input.charCodeAt(index + 1);
11810
+
11811
+ if (second >= 0xDC00 && second <= 0xDFFF) {
11812
+ // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
11813
+ point = (point - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;
11814
+ index += 1;
11815
+ }
11816
+ }
11817
+
11818
+ // US-ASCII
11819
+ if (point < 0x80) {
11820
+ result.push(point);
11821
+ continue
11822
+ }
11823
+
11824
+ // 2-byte UTF-8
11825
+ if (point < 0x800) {
11826
+ result.push((point >> 6) | 192);
11827
+ result.push((point & 63) | 128);
11828
+ continue
11829
+ }
11830
+
11831
+ // 3-byte UTF-8
11832
+ if (point < 0xD800 || (point >= 0xE000 && point < 0x10000)) {
11833
+ result.push((point >> 12) | 224);
11834
+ result.push(((point >> 6) & 63) | 128);
11835
+ result.push((point & 63) | 128);
11836
+ continue
11837
+ }
11838
+
11839
+ // 4-byte UTF-8
11840
+ if (point >= 0x10000 && point <= 0x10FFFF) {
11841
+ result.push((point >> 18) | 240);
11842
+ result.push(((point >> 12) & 63) | 128);
11843
+ result.push(((point >> 6) & 63) | 128);
11844
+ result.push((point & 63) | 128);
11845
+ continue
11846
+ }
11847
+
11848
+ // Invalid character
11849
+ result.push(0xEF, 0xBF, 0xBD);
11850
+ }
11851
+
11852
+ return new Uint8Array(result).buffer
11853
+ };
11854
+
11855
+ function ByteData (data) {
11856
+ this.mode = mode.BYTE;
11857
+ if (typeof (data) === 'string') {
11858
+ data = encodeUtf8(data);
11859
+ }
11860
+ this.data = new Uint8Array(data);
11861
+ }
11862
+
11863
+ ByteData.getBitsLength = function getBitsLength (length) {
11864
+ return length * 8
11865
+ };
11866
+
11867
+ ByteData.prototype.getLength = function getLength () {
11868
+ return this.data.length
11869
+ };
11870
+
11871
+ ByteData.prototype.getBitsLength = function getBitsLength () {
11872
+ return ByteData.getBitsLength(this.data.length)
11873
+ };
11874
+
11875
+ ByteData.prototype.write = function (bitBuffer) {
11876
+ for (let i = 0, l = this.data.length; i < l; i++) {
11877
+ bitBuffer.put(this.data[i], 8);
11878
+ }
11879
+ };
11880
+
11881
+ var byteData = ByteData;
11882
+
11883
+ function KanjiData (data) {
11884
+ this.mode = mode.KANJI;
11885
+ this.data = data;
11886
+ }
11887
+
11888
+ KanjiData.getBitsLength = function getBitsLength (length) {
11889
+ return length * 13
11890
+ };
11891
+
11892
+ KanjiData.prototype.getLength = function getLength () {
11893
+ return this.data.length
11894
+ };
11895
+
11896
+ KanjiData.prototype.getBitsLength = function getBitsLength () {
11897
+ return KanjiData.getBitsLength(this.data.length)
11898
+ };
11899
+
11900
+ KanjiData.prototype.write = function (bitBuffer) {
11901
+ let i;
11902
+
11903
+ // In the Shift JIS system, Kanji characters are represented by a two byte combination.
11904
+ // These byte values are shifted from the JIS X 0208 values.
11905
+ // JIS X 0208 gives details of the shift coded representation.
11906
+ for (i = 0; i < this.data.length; i++) {
11907
+ let value = utils$1.toSJIS(this.data[i]);
11908
+
11909
+ // For characters with Shift JIS values from 0x8140 to 0x9FFC:
11910
+ if (value >= 0x8140 && value <= 0x9FFC) {
11911
+ // Subtract 0x8140 from Shift JIS value
11912
+ value -= 0x8140;
11913
+
11914
+ // For characters with Shift JIS values from 0xE040 to 0xEBBF
11915
+ } else if (value >= 0xE040 && value <= 0xEBBF) {
11916
+ // Subtract 0xC140 from Shift JIS value
11917
+ value -= 0xC140;
11918
+ } else {
11919
+ throw new Error(
11920
+ 'Invalid SJIS character: ' + this.data[i] + '\n' +
11921
+ 'Make sure your charset is UTF-8')
11922
+ }
11923
+
11924
+ // Multiply most significant byte of result by 0xC0
11925
+ // and add least significant byte to product
11926
+ value = (((value >>> 8) & 0xff) * 0xC0) + (value & 0xff);
11927
+
11928
+ // Convert result to a 13-bit binary string
11929
+ bitBuffer.put(value, 13);
11930
+ }
11931
+ };
11932
+
11933
+ var kanjiData = KanjiData;
11934
+
11935
+ var dijkstra_1 = _commonjsHelpers.createCommonjsModule(function (module) {
11936
+
11937
+ /******************************************************************************
11938
+ * Created 2008-08-19.
11939
+ *
11940
+ * Dijkstra path-finding functions. Adapted from the Dijkstar Python project.
11941
+ *
11942
+ * Copyright (C) 2008
11943
+ * Wyatt Baldwin <self@wyattbaldwin.com>
11944
+ * All rights reserved
11945
+ *
11946
+ * Licensed under the MIT license.
11947
+ *
11948
+ * http://www.opensource.org/licenses/mit-license.php
11949
+ *
11950
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11951
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
11952
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
11953
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
11954
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
11955
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
11956
+ * THE SOFTWARE.
11957
+ *****************************************************************************/
11958
+ var dijkstra = {
11959
+ single_source_shortest_paths: function(graph, s, d) {
11960
+ // Predecessor map for each node that has been encountered.
11961
+ // node ID => predecessor node ID
11962
+ var predecessors = {};
11963
+
11964
+ // Costs of shortest paths from s to all nodes encountered.
11965
+ // node ID => cost
11966
+ var costs = {};
11967
+ costs[s] = 0;
11968
+
11969
+ // Costs of shortest paths from s to all nodes encountered; differs from
11970
+ // `costs` in that it provides easy access to the node that currently has
11971
+ // the known shortest path from s.
11972
+ // XXX: Do we actually need both `costs` and `open`?
11973
+ var open = dijkstra.PriorityQueue.make();
11974
+ open.push(s, 0);
11975
+
11976
+ var closest,
11977
+ u, v,
11978
+ cost_of_s_to_u,
11979
+ adjacent_nodes,
11980
+ cost_of_e,
11981
+ cost_of_s_to_u_plus_cost_of_e,
11982
+ cost_of_s_to_v,
11983
+ first_visit;
11984
+ while (!open.empty()) {
11985
+ // In the nodes remaining in graph that have a known cost from s,
11986
+ // find the node, u, that currently has the shortest path from s.
11987
+ closest = open.pop();
11988
+ u = closest.value;
11989
+ cost_of_s_to_u = closest.cost;
11990
+
11991
+ // Get nodes adjacent to u...
11992
+ adjacent_nodes = graph[u] || {};
11993
+
11994
+ // ...and explore the edges that connect u to those nodes, updating
11995
+ // the cost of the shortest paths to any or all of those nodes as
11996
+ // necessary. v is the node across the current edge from u.
11997
+ for (v in adjacent_nodes) {
11998
+ if (adjacent_nodes.hasOwnProperty(v)) {
11999
+ // Get the cost of the edge running from u to v.
12000
+ cost_of_e = adjacent_nodes[v];
12001
+
12002
+ // Cost of s to u plus the cost of u to v across e--this is *a*
12003
+ // cost from s to v that may or may not be less than the current
12004
+ // known cost to v.
12005
+ cost_of_s_to_u_plus_cost_of_e = cost_of_s_to_u + cost_of_e;
12006
+
12007
+ // If we haven't visited v yet OR if the current known cost from s to
12008
+ // v is greater than the new cost we just found (cost of s to u plus
12009
+ // cost of u to v across e), update v's cost in the cost list and
12010
+ // update v's predecessor in the predecessor list (it's now u).
12011
+ cost_of_s_to_v = costs[v];
12012
+ first_visit = (typeof costs[v] === 'undefined');
12013
+ if (first_visit || cost_of_s_to_v > cost_of_s_to_u_plus_cost_of_e) {
12014
+ costs[v] = cost_of_s_to_u_plus_cost_of_e;
12015
+ open.push(v, cost_of_s_to_u_plus_cost_of_e);
12016
+ predecessors[v] = u;
12017
+ }
12018
+ }
12019
+ }
12020
+ }
12021
+
12022
+ if (typeof d !== 'undefined' && typeof costs[d] === 'undefined') {
12023
+ var msg = ['Could not find a path from ', s, ' to ', d, '.'].join('');
12024
+ throw new Error(msg);
12025
+ }
12026
+
12027
+ return predecessors;
12028
+ },
12029
+
12030
+ extract_shortest_path_from_predecessor_list: function(predecessors, d) {
12031
+ var nodes = [];
12032
+ var u = d;
12033
+ while (u) {
12034
+ nodes.push(u);
12035
+ u = predecessors[u];
12036
+ }
12037
+ nodes.reverse();
12038
+ return nodes;
12039
+ },
12040
+
12041
+ find_path: function(graph, s, d) {
12042
+ var predecessors = dijkstra.single_source_shortest_paths(graph, s, d);
12043
+ return dijkstra.extract_shortest_path_from_predecessor_list(
12044
+ predecessors, d);
12045
+ },
12046
+
12047
+ /**
12048
+ * A very naive priority queue implementation.
12049
+ */
12050
+ PriorityQueue: {
12051
+ make: function (opts) {
12052
+ var T = dijkstra.PriorityQueue,
12053
+ t = {},
12054
+ key;
12055
+ opts = opts || {};
12056
+ for (key in T) {
12057
+ if (T.hasOwnProperty(key)) {
12058
+ t[key] = T[key];
12059
+ }
12060
+ }
12061
+ t.queue = [];
12062
+ t.sorter = opts.sorter || T.default_sorter;
12063
+ return t;
12064
+ },
12065
+
12066
+ default_sorter: function (a, b) {
12067
+ return a.cost - b.cost;
12068
+ },
12069
+
12070
+ /**
12071
+ * Add a new item to the queue and ensure the highest priority element
12072
+ * is at the front of the queue.
12073
+ */
12074
+ push: function (value, cost) {
12075
+ var item = {value: value, cost: cost};
12076
+ this.queue.push(item);
12077
+ this.queue.sort(this.sorter);
12078
+ },
12079
+
12080
+ /**
12081
+ * Return the highest priority element in the queue.
12082
+ */
12083
+ pop: function () {
12084
+ return this.queue.shift();
12085
+ },
12086
+
12087
+ empty: function () {
12088
+ return this.queue.length === 0;
12089
+ }
12090
+ }
12091
+ };
12092
+
12093
+
12094
+ // node.js module exports
12095
+ {
12096
+ module.exports = dijkstra;
12097
+ }
12098
+ });
12099
+
12100
+ var segments = _commonjsHelpers.createCommonjsModule(function (module, exports) {
12101
+ /**
12102
+ * Returns UTF8 byte length
12103
+ *
12104
+ * @param {String} str Input string
12105
+ * @return {Number} Number of byte
12106
+ */
12107
+ function getStringByteLength (str) {
12108
+ return unescape(encodeURIComponent(str)).length
12109
+ }
12110
+
12111
+ /**
12112
+ * Get a list of segments of the specified mode
12113
+ * from a string
12114
+ *
12115
+ * @param {Mode} mode Segment mode
12116
+ * @param {String} str String to process
12117
+ * @return {Array} Array of object with segments data
12118
+ */
12119
+ function getSegments (regex, mode, str) {
12120
+ const segments = [];
12121
+ let result;
12122
+
12123
+ while ((result = regex.exec(str)) !== null) {
12124
+ segments.push({
12125
+ data: result[0],
12126
+ index: result.index,
12127
+ mode: mode,
12128
+ length: result[0].length
12129
+ });
12130
+ }
12131
+
12132
+ return segments
12133
+ }
12134
+
12135
+ /**
12136
+ * Extracts a series of segments with the appropriate
12137
+ * modes from a string
12138
+ *
12139
+ * @param {String} dataStr Input string
12140
+ * @return {Array} Array of object with segments data
12141
+ */
12142
+ function getSegmentsFromString (dataStr) {
12143
+ const numSegs = getSegments(regex.NUMERIC, mode.NUMERIC, dataStr);
12144
+ const alphaNumSegs = getSegments(regex.ALPHANUMERIC, mode.ALPHANUMERIC, dataStr);
12145
+ let byteSegs;
12146
+ let kanjiSegs;
12147
+
12148
+ if (utils$1.isKanjiModeEnabled()) {
12149
+ byteSegs = getSegments(regex.BYTE, mode.BYTE, dataStr);
12150
+ kanjiSegs = getSegments(regex.KANJI, mode.KANJI, dataStr);
12151
+ } else {
12152
+ byteSegs = getSegments(regex.BYTE_KANJI, mode.BYTE, dataStr);
12153
+ kanjiSegs = [];
12154
+ }
12155
+
12156
+ const segs = numSegs.concat(alphaNumSegs, byteSegs, kanjiSegs);
12157
+
12158
+ return segs
12159
+ .sort(function (s1, s2) {
12160
+ return s1.index - s2.index
12161
+ })
12162
+ .map(function (obj) {
12163
+ return {
12164
+ data: obj.data,
12165
+ mode: obj.mode,
12166
+ length: obj.length
12167
+ }
12168
+ })
12169
+ }
12170
+
12171
+ /**
12172
+ * Returns how many bits are needed to encode a string of
12173
+ * specified length with the specified mode
12174
+ *
12175
+ * @param {Number} length String length
12176
+ * @param {Mode} mode Segment mode
12177
+ * @return {Number} Bit length
12178
+ */
12179
+ function getSegmentBitsLength (length, mode$1) {
12180
+ switch (mode$1) {
12181
+ case mode.NUMERIC:
12182
+ return numericData.getBitsLength(length)
12183
+ case mode.ALPHANUMERIC:
12184
+ return alphanumericData.getBitsLength(length)
12185
+ case mode.KANJI:
12186
+ return kanjiData.getBitsLength(length)
12187
+ case mode.BYTE:
12188
+ return byteData.getBitsLength(length)
12189
+ }
12190
+ }
12191
+
12192
+ /**
12193
+ * Merges adjacent segments which have the same mode
12194
+ *
12195
+ * @param {Array} segs Array of object with segments data
12196
+ * @return {Array} Array of object with segments data
12197
+ */
12198
+ function mergeSegments (segs) {
12199
+ return segs.reduce(function (acc, curr) {
12200
+ const prevSeg = acc.length - 1 >= 0 ? acc[acc.length - 1] : null;
12201
+ if (prevSeg && prevSeg.mode === curr.mode) {
12202
+ acc[acc.length - 1].data += curr.data;
12203
+ return acc
12204
+ }
12205
+
12206
+ acc.push(curr);
12207
+ return acc
12208
+ }, [])
12209
+ }
12210
+
12211
+ /**
12212
+ * Generates a list of all possible nodes combination which
12213
+ * will be used to build a segments graph.
12214
+ *
12215
+ * Nodes are divided by groups. Each group will contain a list of all the modes
12216
+ * in which is possible to encode the given text.
12217
+ *
12218
+ * For example the text '12345' can be encoded as Numeric, Alphanumeric or Byte.
12219
+ * The group for '12345' will contain then 3 objects, one for each
12220
+ * possible encoding mode.
12221
+ *
12222
+ * Each node represents a possible segment.
12223
+ *
12224
+ * @param {Array} segs Array of object with segments data
12225
+ * @return {Array} Array of object with segments data
12226
+ */
12227
+ function buildNodes (segs) {
12228
+ const nodes = [];
12229
+ for (let i = 0; i < segs.length; i++) {
12230
+ const seg = segs[i];
12231
+
12232
+ switch (seg.mode) {
12233
+ case mode.NUMERIC:
12234
+ nodes.push([seg,
12235
+ { data: seg.data, mode: mode.ALPHANUMERIC, length: seg.length },
12236
+ { data: seg.data, mode: mode.BYTE, length: seg.length }
12237
+ ]);
12238
+ break
12239
+ case mode.ALPHANUMERIC:
12240
+ nodes.push([seg,
12241
+ { data: seg.data, mode: mode.BYTE, length: seg.length }
12242
+ ]);
12243
+ break
12244
+ case mode.KANJI:
12245
+ nodes.push([seg,
12246
+ { data: seg.data, mode: mode.BYTE, length: getStringByteLength(seg.data) }
12247
+ ]);
12248
+ break
12249
+ case mode.BYTE:
12250
+ nodes.push([
12251
+ { data: seg.data, mode: mode.BYTE, length: getStringByteLength(seg.data) }
12252
+ ]);
12253
+ }
12254
+ }
12255
+
12256
+ return nodes
12257
+ }
12258
+
12259
+ /**
12260
+ * Builds a graph from a list of nodes.
12261
+ * All segments in each node group will be connected with all the segments of
12262
+ * the next group and so on.
12263
+ *
12264
+ * At each connection will be assigned a weight depending on the
12265
+ * segment's byte length.
12266
+ *
12267
+ * @param {Array} nodes Array of object with segments data
12268
+ * @param {Number} version QR Code version
12269
+ * @return {Object} Graph of all possible segments
12270
+ */
12271
+ function buildGraph (nodes, version) {
12272
+ const table = {};
12273
+ const graph = { start: {} };
12274
+ let prevNodeIds = ['start'];
12275
+
12276
+ for (let i = 0; i < nodes.length; i++) {
12277
+ const nodeGroup = nodes[i];
12278
+ const currentNodeIds = [];
12279
+
12280
+ for (let j = 0; j < nodeGroup.length; j++) {
12281
+ const node = nodeGroup[j];
12282
+ const key = '' + i + j;
12283
+
12284
+ currentNodeIds.push(key);
12285
+ table[key] = { node: node, lastCount: 0 };
12286
+ graph[key] = {};
12287
+
12288
+ for (let n = 0; n < prevNodeIds.length; n++) {
12289
+ const prevNodeId = prevNodeIds[n];
12290
+
12291
+ if (table[prevNodeId] && table[prevNodeId].node.mode === node.mode) {
12292
+ graph[prevNodeId][key] =
12293
+ getSegmentBitsLength(table[prevNodeId].lastCount + node.length, node.mode) -
12294
+ getSegmentBitsLength(table[prevNodeId].lastCount, node.mode);
12295
+
12296
+ table[prevNodeId].lastCount += node.length;
12297
+ } else {
12298
+ if (table[prevNodeId]) table[prevNodeId].lastCount = node.length;
12299
+
12300
+ graph[prevNodeId][key] = getSegmentBitsLength(node.length, node.mode) +
12301
+ 4 + mode.getCharCountIndicator(node.mode, version); // switch cost
12302
+ }
12303
+ }
12304
+ }
12305
+
12306
+ prevNodeIds = currentNodeIds;
12307
+ }
12308
+
12309
+ for (let n = 0; n < prevNodeIds.length; n++) {
12310
+ graph[prevNodeIds[n]].end = 0;
12311
+ }
12312
+
12313
+ return { map: graph, table: table }
12314
+ }
12315
+
12316
+ /**
12317
+ * Builds a segment from a specified data and mode.
12318
+ * If a mode is not specified, the more suitable will be used.
12319
+ *
12320
+ * @param {String} data Input data
12321
+ * @param {Mode | String} modesHint Data mode
12322
+ * @return {Segment} Segment
12323
+ */
12324
+ function buildSingleSegment (data, modesHint) {
12325
+ let mode$1;
12326
+ const bestMode = mode.getBestModeForData(data);
12327
+
12328
+ mode$1 = mode.from(modesHint, bestMode);
12329
+
12330
+ // Make sure data can be encoded
12331
+ if (mode$1 !== mode.BYTE && mode$1.bit < bestMode.bit) {
12332
+ throw new Error('"' + data + '"' +
12333
+ ' cannot be encoded with mode ' + mode.toString(mode$1) +
12334
+ '.\n Suggested mode is: ' + mode.toString(bestMode))
12335
+ }
12336
+
12337
+ // Use Mode.BYTE if Kanji support is disabled
12338
+ if (mode$1 === mode.KANJI && !utils$1.isKanjiModeEnabled()) {
12339
+ mode$1 = mode.BYTE;
12340
+ }
12341
+
12342
+ switch (mode$1) {
12343
+ case mode.NUMERIC:
12344
+ return new numericData(data)
12345
+
12346
+ case mode.ALPHANUMERIC:
12347
+ return new alphanumericData(data)
12348
+
12349
+ case mode.KANJI:
12350
+ return new kanjiData(data)
12351
+
12352
+ case mode.BYTE:
12353
+ return new byteData(data)
12354
+ }
12355
+ }
12356
+
12357
+ /**
12358
+ * Builds a list of segments from an array.
12359
+ * Array can contain Strings or Objects with segment's info.
12360
+ *
12361
+ * For each item which is a string, will be generated a segment with the given
12362
+ * string and the more appropriate encoding mode.
12363
+ *
12364
+ * For each item which is an object, will be generated a segment with the given
12365
+ * data and mode.
12366
+ * Objects must contain at least the property "data".
12367
+ * If property "mode" is not present, the more suitable mode will be used.
12368
+ *
12369
+ * @param {Array} array Array of objects with segments data
12370
+ * @return {Array} Array of Segments
12371
+ */
12372
+ exports.fromArray = function fromArray (array) {
12373
+ return array.reduce(function (acc, seg) {
12374
+ if (typeof seg === 'string') {
12375
+ acc.push(buildSingleSegment(seg, null));
12376
+ } else if (seg.data) {
12377
+ acc.push(buildSingleSegment(seg.data, seg.mode));
12378
+ }
12379
+
12380
+ return acc
12381
+ }, [])
12382
+ };
12383
+
12384
+ /**
12385
+ * Builds an optimized sequence of segments from a string,
12386
+ * which will produce the shortest possible bitstream.
12387
+ *
12388
+ * @param {String} data Input string
12389
+ * @param {Number} version QR Code version
12390
+ * @return {Array} Array of segments
12391
+ */
12392
+ exports.fromString = function fromString (data, version) {
12393
+ const segs = getSegmentsFromString(data, utils$1.isKanjiModeEnabled());
12394
+
12395
+ const nodes = buildNodes(segs);
12396
+ const graph = buildGraph(nodes, version);
12397
+ const path = dijkstra_1.find_path(graph.map, 'start', 'end');
12398
+
12399
+ const optimizedSegs = [];
12400
+ for (let i = 1; i < path.length - 1; i++) {
12401
+ optimizedSegs.push(graph.table[path[i]].node);
12402
+ }
12403
+
12404
+ return exports.fromArray(mergeSegments(optimizedSegs))
12405
+ };
12406
+
12407
+ /**
12408
+ * Splits a string in various segments with the modes which
12409
+ * best represent their content.
12410
+ * The produced segments are far from being optimized.
12411
+ * The output of this function is only used to estimate a QR Code version
12412
+ * which may contain the data.
12413
+ *
12414
+ * @param {string} data Input string
12415
+ * @return {Array} Array of segments
12416
+ */
12417
+ exports.rawSplit = function rawSplit (data) {
12418
+ return exports.fromArray(
12419
+ getSegmentsFromString(data, utils$1.isKanjiModeEnabled())
12420
+ )
12421
+ };
12422
+ });
12423
+
12424
+ /**
12425
+ * QRCode for JavaScript
12426
+ *
12427
+ * modified by Ryan Day for nodejs support
12428
+ * Copyright (c) 2011 Ryan Day
12429
+ *
12430
+ * Licensed under the MIT license:
12431
+ * http://www.opensource.org/licenses/mit-license.php
12432
+ *
12433
+ //---------------------------------------------------------------------
12434
+ // QRCode for JavaScript
12435
+ //
12436
+ // Copyright (c) 2009 Kazuhiko Arase
12437
+ //
12438
+ // URL: http://www.d-project.com/
12439
+ //
12440
+ // Licensed under the MIT license:
12441
+ // http://www.opensource.org/licenses/mit-license.php
12442
+ //
12443
+ // The word "QR Code" is registered trademark of
12444
+ // DENSO WAVE INCORPORATED
12445
+ // http://www.denso-wave.com/qrcode/faqpatent-e.html
12446
+ //
12447
+ //---------------------------------------------------------------------
12448
+ */
12449
+
12450
+ /**
12451
+ * Add finder patterns bits to matrix
12452
+ *
12453
+ * @param {BitMatrix} matrix Modules matrix
12454
+ * @param {Number} version QR Code version
12455
+ */
12456
+ function setupFinderPattern (matrix, version) {
12457
+ const size = matrix.size;
12458
+ const pos = finderPattern.getPositions(version);
12459
+
12460
+ for (let i = 0; i < pos.length; i++) {
12461
+ const row = pos[i][0];
12462
+ const col = pos[i][1];
12463
+
12464
+ for (let r = -1; r <= 7; r++) {
12465
+ if (row + r <= -1 || size <= row + r) continue
12466
+
12467
+ for (let c = -1; c <= 7; c++) {
12468
+ if (col + c <= -1 || size <= col + c) continue
12469
+
12470
+ if ((r >= 0 && r <= 6 && (c === 0 || c === 6)) ||
12471
+ (c >= 0 && c <= 6 && (r === 0 || r === 6)) ||
12472
+ (r >= 2 && r <= 4 && c >= 2 && c <= 4)) {
12473
+ matrix.set(row + r, col + c, true, true);
12474
+ } else {
12475
+ matrix.set(row + r, col + c, false, true);
12476
+ }
12477
+ }
12478
+ }
12479
+ }
12480
+ }
12481
+
12482
+ /**
12483
+ * Add timing pattern bits to matrix
12484
+ *
12485
+ * Note: this function must be called before {@link setupAlignmentPattern}
12486
+ *
12487
+ * @param {BitMatrix} matrix Modules matrix
12488
+ */
12489
+ function setupTimingPattern (matrix) {
12490
+ const size = matrix.size;
12491
+
12492
+ for (let r = 8; r < size - 8; r++) {
12493
+ const value = r % 2 === 0;
12494
+ matrix.set(r, 6, value, true);
12495
+ matrix.set(6, r, value, true);
12496
+ }
12497
+ }
12498
+
12499
+ /**
12500
+ * Add alignment patterns bits to matrix
12501
+ *
12502
+ * Note: this function must be called after {@link setupTimingPattern}
12503
+ *
12504
+ * @param {BitMatrix} matrix Modules matrix
12505
+ * @param {Number} version QR Code version
12506
+ */
12507
+ function setupAlignmentPattern (matrix, version) {
12508
+ const pos = alignmentPattern.getPositions(version);
12509
+
12510
+ for (let i = 0; i < pos.length; i++) {
12511
+ const row = pos[i][0];
12512
+ const col = pos[i][1];
12513
+
12514
+ for (let r = -2; r <= 2; r++) {
12515
+ for (let c = -2; c <= 2; c++) {
12516
+ if (r === -2 || r === 2 || c === -2 || c === 2 ||
12517
+ (r === 0 && c === 0)) {
12518
+ matrix.set(row + r, col + c, true, true);
12519
+ } else {
12520
+ matrix.set(row + r, col + c, false, true);
12521
+ }
12522
+ }
12523
+ }
12524
+ }
12525
+ }
12526
+
12527
+ /**
12528
+ * Add version info bits to matrix
12529
+ *
12530
+ * @param {BitMatrix} matrix Modules matrix
12531
+ * @param {Number} version QR Code version
12532
+ */
12533
+ function setupVersionInfo (matrix, version$1) {
12534
+ const size = matrix.size;
12535
+ const bits = version.getEncodedBits(version$1);
12536
+ let row, col, mod;
12537
+
12538
+ for (let i = 0; i < 18; i++) {
12539
+ row = Math.floor(i / 3);
12540
+ col = i % 3 + size - 8 - 3;
12541
+ mod = ((bits >> i) & 1) === 1;
12542
+
12543
+ matrix.set(row, col, mod, true);
12544
+ matrix.set(col, row, mod, true);
12545
+ }
12546
+ }
12547
+
12548
+ /**
12549
+ * Add format info bits to matrix
12550
+ *
12551
+ * @param {BitMatrix} matrix Modules matrix
12552
+ * @param {ErrorCorrectionLevel} errorCorrectionLevel Error correction level
12553
+ * @param {Number} maskPattern Mask pattern reference value
12554
+ */
12555
+ function setupFormatInfo (matrix, errorCorrectionLevel, maskPattern) {
12556
+ const size = matrix.size;
12557
+ const bits = formatInfo.getEncodedBits(errorCorrectionLevel, maskPattern);
12558
+ let i, mod;
12559
+
12560
+ for (i = 0; i < 15; i++) {
12561
+ mod = ((bits >> i) & 1) === 1;
12562
+
12563
+ // vertical
12564
+ if (i < 6) {
12565
+ matrix.set(i, 8, mod, true);
12566
+ } else if (i < 8) {
12567
+ matrix.set(i + 1, 8, mod, true);
12568
+ } else {
12569
+ matrix.set(size - 15 + i, 8, mod, true);
12570
+ }
12571
+
12572
+ // horizontal
12573
+ if (i < 8) {
12574
+ matrix.set(8, size - i - 1, mod, true);
12575
+ } else if (i < 9) {
12576
+ matrix.set(8, 15 - i - 1 + 1, mod, true);
12577
+ } else {
12578
+ matrix.set(8, 15 - i - 1, mod, true);
12579
+ }
12580
+ }
12581
+
12582
+ // fixed module
12583
+ matrix.set(size - 8, 8, 1, true);
12584
+ }
12585
+
12586
+ /**
12587
+ * Add encoded data bits to matrix
12588
+ *
12589
+ * @param {BitMatrix} matrix Modules matrix
12590
+ * @param {Uint8Array} data Data codewords
12591
+ */
12592
+ function setupData (matrix, data) {
12593
+ const size = matrix.size;
12594
+ let inc = -1;
12595
+ let row = size - 1;
12596
+ let bitIndex = 7;
12597
+ let byteIndex = 0;
12598
+
12599
+ for (let col = size - 1; col > 0; col -= 2) {
12600
+ if (col === 6) col--;
12601
+
12602
+ while (true) {
12603
+ for (let c = 0; c < 2; c++) {
12604
+ if (!matrix.isReserved(row, col - c)) {
12605
+ let dark = false;
12606
+
12607
+ if (byteIndex < data.length) {
12608
+ dark = (((data[byteIndex] >>> bitIndex) & 1) === 1);
12609
+ }
12610
+
12611
+ matrix.set(row, col - c, dark);
12612
+ bitIndex--;
12613
+
12614
+ if (bitIndex === -1) {
12615
+ byteIndex++;
12616
+ bitIndex = 7;
12617
+ }
12618
+ }
12619
+ }
12620
+
12621
+ row += inc;
12622
+
12623
+ if (row < 0 || size <= row) {
12624
+ row -= inc;
12625
+ inc = -inc;
12626
+ break
12627
+ }
12628
+ }
12629
+ }
12630
+ }
12631
+
12632
+ /**
12633
+ * Create encoded codewords from data input
12634
+ *
12635
+ * @param {Number} version QR Code version
12636
+ * @param {ErrorCorrectionLevel} errorCorrectionLevel Error correction level
12637
+ * @param {ByteData} data Data input
12638
+ * @return {Uint8Array} Buffer containing encoded codewords
12639
+ */
12640
+ function createData (version, errorCorrectionLevel, segments) {
12641
+ // Prepare data buffer
12642
+ const buffer = new bitBuffer();
12643
+
12644
+ segments.forEach(function (data) {
12645
+ // prefix data with mode indicator (4 bits)
12646
+ buffer.put(data.mode.bit, 4);
12647
+
12648
+ // Prefix data with character count indicator.
12649
+ // The character count indicator is a string of bits that represents the
12650
+ // number of characters that are being encoded.
12651
+ // The character count indicator must be placed after the mode indicator
12652
+ // and must be a certain number of bits long, depending on the QR version
12653
+ // and data mode
12654
+ // @see {@link Mode.getCharCountIndicator}.
12655
+ buffer.put(data.getLength(), mode.getCharCountIndicator(data.mode, version));
12656
+
12657
+ // add binary data sequence to buffer
12658
+ data.write(buffer);
12659
+ });
12660
+
12661
+ // Calculate required number of bits
12662
+ const totalCodewords = utils$1.getSymbolTotalCodewords(version);
12663
+ const ecTotalCodewords = errorCorrectionCode.getTotalCodewordsCount(version, errorCorrectionLevel);
12664
+ const dataTotalCodewordsBits = (totalCodewords - ecTotalCodewords) * 8;
12665
+
12666
+ // Add a terminator.
12667
+ // If the bit string is shorter than the total number of required bits,
12668
+ // a terminator of up to four 0s must be added to the right side of the string.
12669
+ // If the bit string is more than four bits shorter than the required number of bits,
12670
+ // add four 0s to the end.
12671
+ if (buffer.getLengthInBits() + 4 <= dataTotalCodewordsBits) {
12672
+ buffer.put(0, 4);
12673
+ }
12674
+
12675
+ // If the bit string is fewer than four bits shorter, add only the number of 0s that
12676
+ // are needed to reach the required number of bits.
12677
+
12678
+ // After adding the terminator, if the number of bits in the string is not a multiple of 8,
12679
+ // pad the string on the right with 0s to make the string's length a multiple of 8.
12680
+ while (buffer.getLengthInBits() % 8 !== 0) {
12681
+ buffer.putBit(0);
12682
+ }
12683
+
12684
+ // Add pad bytes if the string is still shorter than the total number of required bits.
12685
+ // Extend the buffer to fill the data capacity of the symbol corresponding to
12686
+ // the Version and Error Correction Level by adding the Pad Codewords 11101100 (0xEC)
12687
+ // and 00010001 (0x11) alternately.
12688
+ const remainingByte = (dataTotalCodewordsBits - buffer.getLengthInBits()) / 8;
12689
+ for (let i = 0; i < remainingByte; i++) {
12690
+ buffer.put(i % 2 ? 0x11 : 0xEC, 8);
12691
+ }
12692
+
12693
+ return createCodewords(buffer, version, errorCorrectionLevel)
12694
+ }
12695
+
12696
+ /**
12697
+ * Encode input data with Reed-Solomon and return codewords with
12698
+ * relative error correction bits
12699
+ *
12700
+ * @param {BitBuffer} bitBuffer Data to encode
12701
+ * @param {Number} version QR Code version
12702
+ * @param {ErrorCorrectionLevel} errorCorrectionLevel Error correction level
12703
+ * @return {Uint8Array} Buffer containing encoded codewords
12704
+ */
12705
+ function createCodewords (bitBuffer, version, errorCorrectionLevel) {
12706
+ // Total codewords for this QR code version (Data + Error correction)
12707
+ const totalCodewords = utils$1.getSymbolTotalCodewords(version);
12708
+
12709
+ // Total number of error correction codewords
12710
+ const ecTotalCodewords = errorCorrectionCode.getTotalCodewordsCount(version, errorCorrectionLevel);
12711
+
12712
+ // Total number of data codewords
12713
+ const dataTotalCodewords = totalCodewords - ecTotalCodewords;
12714
+
12715
+ // Total number of blocks
12716
+ const ecTotalBlocks = errorCorrectionCode.getBlocksCount(version, errorCorrectionLevel);
12717
+
12718
+ // Calculate how many blocks each group should contain
12719
+ const blocksInGroup2 = totalCodewords % ecTotalBlocks;
12720
+ const blocksInGroup1 = ecTotalBlocks - blocksInGroup2;
12721
+
12722
+ const totalCodewordsInGroup1 = Math.floor(totalCodewords / ecTotalBlocks);
12723
+
12724
+ const dataCodewordsInGroup1 = Math.floor(dataTotalCodewords / ecTotalBlocks);
12725
+ const dataCodewordsInGroup2 = dataCodewordsInGroup1 + 1;
12726
+
12727
+ // Number of EC codewords is the same for both groups
12728
+ const ecCount = totalCodewordsInGroup1 - dataCodewordsInGroup1;
12729
+
12730
+ // Initialize a Reed-Solomon encoder with a generator polynomial of degree ecCount
12731
+ const rs = new reedSolomonEncoder(ecCount);
12732
+
12733
+ let offset = 0;
12734
+ const dcData = new Array(ecTotalBlocks);
12735
+ const ecData = new Array(ecTotalBlocks);
12736
+ let maxDataSize = 0;
12737
+ const buffer = new Uint8Array(bitBuffer.buffer);
12738
+
12739
+ // Divide the buffer into the required number of blocks
12740
+ for (let b = 0; b < ecTotalBlocks; b++) {
12741
+ const dataSize = b < blocksInGroup1 ? dataCodewordsInGroup1 : dataCodewordsInGroup2;
12742
+
12743
+ // extract a block of data from buffer
12744
+ dcData[b] = buffer.slice(offset, offset + dataSize);
12745
+
12746
+ // Calculate EC codewords for this data block
12747
+ ecData[b] = rs.encode(dcData[b]);
12748
+
12749
+ offset += dataSize;
12750
+ maxDataSize = Math.max(maxDataSize, dataSize);
12751
+ }
12752
+
12753
+ // Create final data
12754
+ // Interleave the data and error correction codewords from each block
12755
+ const data = new Uint8Array(totalCodewords);
12756
+ let index = 0;
12757
+ let i, r;
12758
+
12759
+ // Add data codewords
12760
+ for (i = 0; i < maxDataSize; i++) {
12761
+ for (r = 0; r < ecTotalBlocks; r++) {
12762
+ if (i < dcData[r].length) {
12763
+ data[index++] = dcData[r][i];
12764
+ }
12765
+ }
12766
+ }
12767
+
12768
+ // Apped EC codewords
12769
+ for (i = 0; i < ecCount; i++) {
12770
+ for (r = 0; r < ecTotalBlocks; r++) {
12771
+ data[index++] = ecData[r][i];
12772
+ }
12773
+ }
12774
+
12775
+ return data
12776
+ }
12777
+
12778
+ /**
12779
+ * Build QR Code symbol
12780
+ *
12781
+ * @param {String} data Input string
12782
+ * @param {Number} version QR Code version
12783
+ * @param {ErrorCorretionLevel} errorCorrectionLevel Error level
12784
+ * @param {MaskPattern} maskPattern Mask pattern
12785
+ * @return {Object} Object containing symbol data
12786
+ */
12787
+ function createSymbol (data, version$1, errorCorrectionLevel, maskPattern$1) {
12788
+ let segments$1;
12789
+
12790
+ if (Array.isArray(data)) {
12791
+ segments$1 = segments.fromArray(data);
12792
+ } else if (typeof data === 'string') {
12793
+ let estimatedVersion = version$1;
12794
+
12795
+ if (!estimatedVersion) {
12796
+ const rawSegments = segments.rawSplit(data);
12797
+
12798
+ // Estimate best version that can contain raw splitted segments
12799
+ estimatedVersion = version.getBestVersionForData(rawSegments, errorCorrectionLevel);
12800
+ }
12801
+
12802
+ // Build optimized segments
12803
+ // If estimated version is undefined, try with the highest version
12804
+ segments$1 = segments.fromString(data, estimatedVersion || 40);
12805
+ } else {
12806
+ throw new Error('Invalid data')
12807
+ }
12808
+
12809
+ // Get the min version that can contain data
12810
+ const bestVersion = version.getBestVersionForData(segments$1, errorCorrectionLevel);
12811
+
12812
+ // If no version is found, data cannot be stored
12813
+ if (!bestVersion) {
12814
+ throw new Error('The amount of data is too big to be stored in a QR Code')
12815
+ }
12816
+
12817
+ // If not specified, use min version as default
12818
+ if (!version$1) {
12819
+ version$1 = bestVersion;
12820
+
12821
+ // Check if the specified version can contain the data
12822
+ } else if (version$1 < bestVersion) {
12823
+ throw new Error('\n' +
12824
+ 'The chosen QR Code version cannot contain this amount of data.\n' +
12825
+ 'Minimum version required to store current data is: ' + bestVersion + '.\n'
12826
+ )
12827
+ }
12828
+
12829
+ const dataBits = createData(version$1, errorCorrectionLevel, segments$1);
12830
+
12831
+ // Allocate matrix buffer
12832
+ const moduleCount = utils$1.getSymbolSize(version$1);
12833
+ const modules = new bitMatrix(moduleCount);
12834
+
12835
+ // Add function modules
12836
+ setupFinderPattern(modules, version$1);
12837
+ setupTimingPattern(modules);
12838
+ setupAlignmentPattern(modules, version$1);
12839
+
12840
+ // Add temporary dummy bits for format info just to set them as reserved.
12841
+ // This is needed to prevent these bits from being masked by {@link MaskPattern.applyMask}
12842
+ // since the masking operation must be performed only on the encoding region.
12843
+ // These blocks will be replaced with correct values later in code.
12844
+ setupFormatInfo(modules, errorCorrectionLevel, 0);
12845
+
12846
+ if (version$1 >= 7) {
12847
+ setupVersionInfo(modules, version$1);
12848
+ }
12849
+
12850
+ // Add data codewords
12851
+ setupData(modules, dataBits);
12852
+
12853
+ if (isNaN(maskPattern$1)) {
12854
+ // Find best mask pattern
12855
+ maskPattern$1 = maskPattern.getBestMask(modules,
12856
+ setupFormatInfo.bind(null, modules, errorCorrectionLevel));
12857
+ }
12858
+
12859
+ // Apply mask pattern
12860
+ maskPattern.applyMask(maskPattern$1, modules);
12861
+
12862
+ // Replace format info bits with correct values
12863
+ setupFormatInfo(modules, errorCorrectionLevel, maskPattern$1);
12864
+
12865
+ return {
12866
+ modules: modules,
12867
+ version: version$1,
12868
+ errorCorrectionLevel: errorCorrectionLevel,
12869
+ maskPattern: maskPattern$1,
12870
+ segments: segments$1
12871
+ }
12872
+ }
12873
+
12874
+ /**
12875
+ * QR Code
12876
+ *
12877
+ * @param {String | Array} data Input data
12878
+ * @param {Object} options Optional configurations
12879
+ * @param {Number} options.version QR Code version
12880
+ * @param {String} options.errorCorrectionLevel Error correction level
12881
+ * @param {Function} options.toSJISFunc Helper func to convert utf8 to sjis
12882
+ */
12883
+ var create$1 = function create (data, options) {
12884
+ if (typeof data === 'undefined' || data === '') {
12885
+ throw new Error('No input text')
12886
+ }
12887
+
12888
+ let errorCorrectionLevel$1 = errorCorrectionLevel.M;
12889
+ let version$1;
12890
+ let mask;
12891
+
12892
+ if (typeof options !== 'undefined') {
12893
+ // Use higher error correction level as default
12894
+ errorCorrectionLevel$1 = errorCorrectionLevel.from(options.errorCorrectionLevel, errorCorrectionLevel.M);
12895
+ version$1 = version.from(options.version);
12896
+ mask = maskPattern.from(options.maskPattern);
12897
+
12898
+ if (options.toSJISFunc) {
12899
+ utils$1.setToSJISFunction(options.toSJISFunc);
12900
+ }
12901
+ }
12902
+
12903
+ return createSymbol(data, version$1, errorCorrectionLevel$1, mask)
12904
+ };
12905
+
12906
+ var qrcode = {
12907
+ create: create$1
12908
+ };
12909
+
12910
+ var utils = _commonjsHelpers.createCommonjsModule(function (module, exports) {
12911
+ function hex2rgba (hex) {
12912
+ if (typeof hex === 'number') {
12913
+ hex = hex.toString();
12914
+ }
12915
+
12916
+ if (typeof hex !== 'string') {
12917
+ throw new Error('Color should be defined as hex string')
12918
+ }
12919
+
12920
+ let hexCode = hex.slice().replace('#', '').split('');
12921
+ if (hexCode.length < 3 || hexCode.length === 5 || hexCode.length > 8) {
12922
+ throw new Error('Invalid hex color: ' + hex)
12923
+ }
12924
+
12925
+ // Convert from short to long form (fff -> ffffff)
12926
+ if (hexCode.length === 3 || hexCode.length === 4) {
12927
+ hexCode = Array.prototype.concat.apply([], hexCode.map(function (c) {
12928
+ return [c, c]
12929
+ }));
12930
+ }
12931
+
12932
+ // Add default alpha value
12933
+ if (hexCode.length === 6) hexCode.push('F', 'F');
12934
+
12935
+ const hexValue = parseInt(hexCode.join(''), 16);
12936
+
12937
+ return {
12938
+ r: (hexValue >> 24) & 255,
12939
+ g: (hexValue >> 16) & 255,
12940
+ b: (hexValue >> 8) & 255,
12941
+ a: hexValue & 255,
12942
+ hex: '#' + hexCode.slice(0, 6).join('')
12943
+ }
12944
+ }
12945
+
12946
+ exports.getOptions = function getOptions (options) {
12947
+ if (!options) options = {};
12948
+ if (!options.color) options.color = {};
12949
+
12950
+ const margin = typeof options.margin === 'undefined' ||
12951
+ options.margin === null ||
12952
+ options.margin < 0
12953
+ ? 4
12954
+ : options.margin;
12955
+
12956
+ const width = options.width && options.width >= 21 ? options.width : undefined;
12957
+ const scale = options.scale || 4;
12958
+
12959
+ return {
12960
+ width: width,
12961
+ scale: width ? 4 : scale,
12962
+ margin: margin,
12963
+ color: {
12964
+ dark: hex2rgba(options.color.dark || '#000000ff'),
12965
+ light: hex2rgba(options.color.light || '#ffffffff')
12966
+ },
12967
+ type: options.type,
12968
+ rendererOpts: options.rendererOpts || {}
12969
+ }
12970
+ };
12971
+
12972
+ exports.getScale = function getScale (qrSize, opts) {
12973
+ return opts.width && opts.width >= qrSize + opts.margin * 2
12974
+ ? opts.width / (qrSize + opts.margin * 2)
12975
+ : opts.scale
12976
+ };
12977
+
12978
+ exports.getImageWidth = function getImageWidth (qrSize, opts) {
12979
+ const scale = exports.getScale(qrSize, opts);
12980
+ return Math.floor((qrSize + opts.margin * 2) * scale)
12981
+ };
12982
+
12983
+ exports.qrToImageData = function qrToImageData (imgData, qr, opts) {
12984
+ const size = qr.modules.size;
12985
+ const data = qr.modules.data;
12986
+ const scale = exports.getScale(size, opts);
12987
+ const symbolSize = Math.floor((size + opts.margin * 2) * scale);
12988
+ const scaledMargin = opts.margin * scale;
12989
+ const palette = [opts.color.light, opts.color.dark];
12990
+
12991
+ for (let i = 0; i < symbolSize; i++) {
12992
+ for (let j = 0; j < symbolSize; j++) {
12993
+ let posDst = (i * symbolSize + j) * 4;
12994
+ let pxColor = opts.color.light;
12995
+
12996
+ if (i >= scaledMargin && j >= scaledMargin &&
12997
+ i < symbolSize - scaledMargin && j < symbolSize - scaledMargin) {
12998
+ const iSrc = Math.floor((i - scaledMargin) / scale);
12999
+ const jSrc = Math.floor((j - scaledMargin) / scale);
13000
+ pxColor = palette[data[iSrc * size + jSrc] ? 1 : 0];
13001
+ }
13002
+
13003
+ imgData[posDst++] = pxColor.r;
13004
+ imgData[posDst++] = pxColor.g;
13005
+ imgData[posDst++] = pxColor.b;
13006
+ imgData[posDst] = pxColor.a;
13007
+ }
13008
+ }
13009
+ };
13010
+ });
13011
+
13012
+ var canvas = _commonjsHelpers.createCommonjsModule(function (module, exports) {
13013
+ function clearCanvas (ctx, canvas, size) {
13014
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
13015
+
13016
+ if (!canvas.style) canvas.style = {};
13017
+ canvas.height = size;
13018
+ canvas.width = size;
13019
+ canvas.style.height = size + 'px';
13020
+ canvas.style.width = size + 'px';
13021
+ }
13022
+
13023
+ function getCanvasElement () {
13024
+ try {
13025
+ return document.createElement('canvas')
13026
+ } catch (e) {
13027
+ throw new Error('You need to specify a canvas element')
13028
+ }
13029
+ }
13030
+
13031
+ exports.render = function render (qrData, canvas, options) {
13032
+ let opts = options;
13033
+ let canvasEl = canvas;
13034
+
13035
+ if (typeof opts === 'undefined' && (!canvas || !canvas.getContext)) {
13036
+ opts = canvas;
13037
+ canvas = undefined;
13038
+ }
13039
+
13040
+ if (!canvas) {
13041
+ canvasEl = getCanvasElement();
13042
+ }
13043
+
13044
+ opts = utils.getOptions(opts);
13045
+ const size = utils.getImageWidth(qrData.modules.size, opts);
13046
+
13047
+ const ctx = canvasEl.getContext('2d');
13048
+ const image = ctx.createImageData(size, size);
13049
+ utils.qrToImageData(image.data, qrData, opts);
13050
+
13051
+ clearCanvas(ctx, canvasEl, size);
13052
+ ctx.putImageData(image, 0, 0);
13053
+
13054
+ return canvasEl
13055
+ };
13056
+
13057
+ exports.renderToDataURL = function renderToDataURL (qrData, canvas, options) {
13058
+ let opts = options;
13059
+
13060
+ if (typeof opts === 'undefined' && (!canvas || !canvas.getContext)) {
13061
+ opts = canvas;
13062
+ canvas = undefined;
13063
+ }
13064
+
13065
+ if (!opts) opts = {};
13066
+
13067
+ const canvasEl = exports.render(qrData, canvas, opts);
13068
+
13069
+ const type = opts.type || 'image/png';
13070
+ const rendererOpts = opts.rendererOpts || {};
13071
+
13072
+ return canvasEl.toDataURL(type, rendererOpts.quality)
13073
+ };
13074
+ });
13075
+
13076
+ function getColorAttrib (color, attrib) {
13077
+ const alpha = color.a / 255;
13078
+ const str = attrib + '="' + color.hex + '"';
13079
+
13080
+ return alpha < 1
13081
+ ? str + ' ' + attrib + '-opacity="' + alpha.toFixed(2).slice(1) + '"'
13082
+ : str
13083
+ }
13084
+
13085
+ function svgCmd (cmd, x, y) {
13086
+ let str = cmd + x;
13087
+ if (typeof y !== 'undefined') str += ' ' + y;
13088
+
13089
+ return str
13090
+ }
13091
+
13092
+ function qrToPath (data, size, margin) {
13093
+ let path = '';
13094
+ let moveBy = 0;
13095
+ let newRow = false;
13096
+ let lineLength = 0;
13097
+
13098
+ for (let i = 0; i < data.length; i++) {
13099
+ const col = Math.floor(i % size);
13100
+ const row = Math.floor(i / size);
13101
+
13102
+ if (!col && !newRow) newRow = true;
13103
+
13104
+ if (data[i]) {
13105
+ lineLength++;
13106
+
13107
+ if (!(i > 0 && col > 0 && data[i - 1])) {
13108
+ path += newRow
13109
+ ? svgCmd('M', col + margin, 0.5 + row + margin)
13110
+ : svgCmd('m', moveBy, 0);
13111
+
13112
+ moveBy = 0;
13113
+ newRow = false;
13114
+ }
13115
+
13116
+ if (!(col + 1 < size && data[i + 1])) {
13117
+ path += svgCmd('h', lineLength);
13118
+ lineLength = 0;
13119
+ }
13120
+ } else {
13121
+ moveBy++;
13122
+ }
13123
+ }
13124
+
13125
+ return path
13126
+ }
13127
+
13128
+ var render = function render (qrData, options, cb) {
13129
+ const opts = utils.getOptions(options);
13130
+ const size = qrData.modules.size;
13131
+ const data = qrData.modules.data;
13132
+ const qrcodesize = size + opts.margin * 2;
13133
+
13134
+ const bg = !opts.color.light.a
13135
+ ? ''
13136
+ : '<path ' + getColorAttrib(opts.color.light, 'fill') +
13137
+ ' d="M0 0h' + qrcodesize + 'v' + qrcodesize + 'H0z"/>';
13138
+
13139
+ const path =
13140
+ '<path ' + getColorAttrib(opts.color.dark, 'stroke') +
13141
+ ' d="' + qrToPath(data, size, opts.margin) + '"/>';
13142
+
13143
+ const viewBox = 'viewBox="' + '0 0 ' + qrcodesize + ' ' + qrcodesize + '"';
13144
+
13145
+ const width = !opts.width ? '' : 'width="' + opts.width + '" height="' + opts.width + '" ';
13146
+
13147
+ const svgTag = '<svg xmlns="http://www.w3.org/2000/svg" ' + width + viewBox + ' shape-rendering="crispEdges">' + bg + path + '</svg>\n';
13148
+
13149
+ if (typeof cb === 'function') {
13150
+ cb(null, svgTag);
13151
+ }
13152
+
13153
+ return svgTag
13154
+ };
13155
+
13156
+ var svgTag = {
13157
+ render: render
13158
+ };
13159
+
13160
+ function renderCanvas (renderFunc, canvas, text, opts, cb) {
13161
+ const args = [].slice.call(arguments, 1);
13162
+ const argsNum = args.length;
13163
+ const isLastArgCb = typeof args[argsNum - 1] === 'function';
13164
+
13165
+ if (!isLastArgCb && !canPromise()) {
13166
+ throw new Error('Callback required as last argument')
13167
+ }
13168
+
13169
+ if (isLastArgCb) {
13170
+ if (argsNum < 2) {
13171
+ throw new Error('Too few arguments provided')
13172
+ }
13173
+
13174
+ if (argsNum === 2) {
13175
+ cb = text;
13176
+ text = canvas;
13177
+ canvas = opts = undefined;
13178
+ } else if (argsNum === 3) {
13179
+ if (canvas.getContext && typeof cb === 'undefined') {
13180
+ cb = opts;
13181
+ opts = undefined;
13182
+ } else {
13183
+ cb = opts;
13184
+ opts = text;
13185
+ text = canvas;
13186
+ canvas = undefined;
13187
+ }
13188
+ }
13189
+ } else {
13190
+ if (argsNum < 1) {
13191
+ throw new Error('Too few arguments provided')
13192
+ }
13193
+
13194
+ if (argsNum === 1) {
13195
+ text = canvas;
13196
+ canvas = opts = undefined;
13197
+ } else if (argsNum === 2 && !canvas.getContext) {
13198
+ opts = text;
13199
+ text = canvas;
13200
+ canvas = undefined;
13201
+ }
13202
+
13203
+ return new Promise(function (resolve, reject) {
13204
+ try {
13205
+ const data = qrcode.create(text, opts);
13206
+ resolve(renderFunc(data, canvas, opts));
13207
+ } catch (e) {
13208
+ reject(e);
13209
+ }
13210
+ })
13211
+ }
13212
+
13213
+ try {
13214
+ const data = qrcode.create(text, opts);
13215
+ cb(null, renderFunc(data, canvas, opts));
13216
+ } catch (e) {
13217
+ cb(e);
13218
+ }
13219
+ }
13220
+
13221
+ var create = qrcode.create;
13222
+ var toCanvas = renderCanvas.bind(null, canvas.render);
13223
+ var toDataURL = renderCanvas.bind(null, canvas.renderToDataURL);
13224
+
13225
+ // only svg for now.
13226
+ var toString_1 = renderCanvas.bind(null, function (data, _, opts) {
13227
+ return svgTag.render(data, opts)
13228
+ });
13229
+
13230
+ var browser = {
13231
+ create: create,
13232
+ toCanvas: toCanvas,
13233
+ toDataURL: toDataURL,
13234
+ toString: toString_1
13235
+ };
13236
+
13237
+ const stzhUploadCss = ":host{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);color:var(--stzh-base-color);box-sizing:border-box;display:block;}:host[hidden]{display:none}:host::-moz-selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}:host::selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}:host *,:host *::before,:host *::after{box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness);-webkit-text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink);text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink)}:host .has-focus{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}:host .stzh-fylingfocus-focused{outline-style:none !important}:host .stzh-fylingfocus-focused::-moz-focus-inner{border:0 !important}stzh-upload{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);color:var(--stzh-base-color);box-sizing:border-box;display:block;--list-grid-template-areas:var(\n --stzh-upload-list-grid-template-areas,\n \"list list list list\"\n );--list-grid-template-columns:var(\n --stzh-upload-list-grid-template-columns,\n repeat(4, minmax(0, 1fr))\n )}stzh-upload[hidden]{display:none}stzh-upload::-moz-selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}stzh-upload::selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}stzh-upload *,stzh-upload *::before,stzh-upload *::after{box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness);-webkit-text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink);text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink)}stzh-upload .has-focus{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}stzh-upload .stzh-fylingfocus-focused{outline-style:none !important}stzh-upload .stzh-fylingfocus-focused::-moz-focus-inner{border:0 !important}@media screen and (min-width: 600px){stzh-upload{--list-grid-template-areas:var(\n --stzh-upload-list-grid-template-areas,\n \"list list list .\"\n )}}@media screen and (min-width: 900px){stzh-upload{--list-grid-template-areas:var(\n --stzh-upload-list-grid-template-areas,\n \"list list list list list . . .\"\n );--list-grid-template-columns:var(\n --stzh-upload-list-grid-template-columns,\n repeat(8, minmax(0, 1fr))\n )}}stzh-upload[disabled]:not([disabled=false]){--description-color:var(--stzh-color-grey70)}.stzh-upload{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);position:relative;color:var(--stzh-color-grey70);box-sizing:border-box;display:flex;flex-direction:column;}.stzh-upload__marker-symbol{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium)}.stzh-upload__marker-text{border:0;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}.stzh-upload__description-wrapper{display:flex;flex-direction:column-reverse;min-height:var(--description-min-height, var(--stzh-description-min-height, none))}.stzh-upload__error,.stzh-upload__description{font-size:var(--stzh-font-nano-font-size);line-height:var(--stzh-font-nano-text-line-height)}.stzh-upload__error{color:var(--stzh-color-error60)}.stzh-upload__error-list{list-style:none;margin:0;padding:0}.stzh-upload__description{display:flex;align-items:flex-start;color:var(--stzh-input-description-color, var(--description-color, var(--stzh-color-coolgrey70)));transition:color var(--stzh-base-transition-animation-speed)}.stzh-upload__description-long{margin-right:var(--stzh-space-xxsmall);margin-top:0.125rem}@supports (font: -apple-system-body) and (-webkit-appearance: none){.stzh-upload__description-long{margin-top:0}}.stzh-upload__description-long-popover{--width:auto;--max-width:27.3125rem}.stzh-upload__description-long-button{display:flex;justify-content:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-family:inherit;padding:0;border:none;background-color:transparent;border-radius:0.5rem;cursor:pointer}.stzh-upload stzh-icon.stzh-upload__description-long-icon{--size:var(--stzh-icon-size-xsmall)}.stzh-upload--has-error .stzh-upload__error,.stzh-upload--has-description .stzh-upload__description{margin-top:var(--stzh-space-xxxsmall)}.stzh-upload__label{font-family:var(--stzh-font-family-title);font-weight:var(--stzh-font-weight-title);font-style:var(--stzh-font-style-title);font-size:var(--stzh-font-curve-h4-default-font-size, var(--stzh-font-milli-font-size));line-height:var(--stzh-font-curve-h4-default-text-line-height, var(--stzh-font-milli-text-line-height));letter-spacing:var(--stzh-font-curve-h4-default-text-letter-spacing);color:var(--stzh-heading-color);margin-bottom:var(--stzh-space-small)}@media screen and (min-width: 600px){.stzh-upload__label{font-size:var(--stzh-font-curve-h4-small-font-size, var(--stzh-font-centi-font-size));line-height:var(--stzh-font-curve-h4-small-text-line-height, var(--stzh-font-centi-text-line-height));letter-spacing:var(--stzh-font-curve-h4-small-text-letter-spacing)}}@media screen and (min-width: 1260px){.stzh-upload__label{font-size:var(--stzh-font-curve-h4-large-font-size, var(--stzh-font-deci-font-size));line-height:var(--stzh-font-curve-h4-large-text-line-height, var(--stzh-font-deci-text-line-height));letter-spacing:var(--stzh-font-curve-h4-large-text-letter-spacing)}}@media screen and (min-width: 1600px){.stzh-upload__label{font-size:var(--stzh-font-curve-h4-ultra-font-size, var(--stzh-font-deca-font-size));line-height:var(--stzh-font-curve-h4-ultra-text-line-height, var(--stzh-font-deca-text-line-height));letter-spacing:var(--stzh-font-curve-h4-ultra-text-letter-spacing, var(--stzh-font-deca-text-letter-spacing))}}.stzh-upload__clickarea{font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);padding:var(--stzh-space-xlarge);display:flex;flex-direction:column;align-items:center;gap:var(--stzh-space-medium);text-align:center;border:0.0625rem solid var(--stzh-color-black);background-color:var(--stzh-color-grey10);border-image-source:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAABMSURBVHgB7dexCgAQEIDhO2X2ih7NK5oNTEo3kFI3+L+Z/BnkNMXSZVFbVtmw663b/UGc6Sw6lb82z3W/AQDgJSSAAAIAgP+Afj8dD2mcJJvEMWjkAAAAAElFTkSuQmCC');border-image-slice:8;border-image-width:0.5rem;border-image-repeat:round;transition:background-color var(--stzh-base-transition-animation-speed)}@media screen and (min-width: 900px){.stzh-upload__clickarea{padding:var(--stzh-space-xxlarge)}}@media screen and (min-width: 1260px){.stzh-upload__clickarea{padding:var(--stzh-space-xxxlarge)}}@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi){.stzh-upload__clickarea{border-image-source:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAB5SURBVHgB7dsxCoQwFEXRl4Gp3aJLc4vWFtpbaCGC8M5ZQEIu/CYkY/ovey6s2zzywN36d97e/5dyAqTcOM/I05n7uvN5jUDK1QcAAAAA+rgTTDkBUk6AlBMg5QRIOQFSToCUEyAAAAAAZbwPSDkBUm74O1xOgJQ7AMC9JLtRTkNkAAAAAElFTkSuQmCC');border-image-slice:16}}.stzh-upload__heading-wrapper{width:100%;font-family:var(--stzh-font-family-heavy);font-weight:var(--stzh-font-weight-heavy);font-style:var(--stzh-font-style-heavy);font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);display:flex;align-items:flex-start;gap:var(--stzh-space-medium);color:var(--stzh-color-grey90);transition:color var(--stzh-base-transition-animation-speed)}.stzh-upload__heading-inner-wrapper{width:100%;display:flex;flex-direction:column;align-items:center;gap:var(--stzh-space-xsmall)}.stzh-upload__buttons-wrapper{display:flex;flex-direction:column;gap:var(--stzh-space-medium);width:100%}@media screen and (min-width: 900px){.stzh-upload__buttons-wrapper{flex-direction:row;justify-content:center}}.stzh-upload__button,.stzh-upload__button-scan{width:100%}.stzh-upload__hint-wrapper{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);font-size:var(--stzh-font-micro-font-size);line-height:var(--stzh-font-micro-text-line-height);display:flex;align-items:center;gap:var(--stzh-space-xsmall);color:var(--stzh-color-secondary60)}.stzh-upload__instructions{font-size:var(--stzh-font-nano-font-size);line-height:var(--stzh-font-nano-text-line-height)}.stzh-upload stzh-icon.stzh-upload__delete-icon{display:none}.stzh-upload__previews-wrapper{-moz-column-gap:var(--stzh-grid-gutter);column-gap:var(--stzh-grid-gutter);display:grid;grid-template-columns:repeat(4, minmax(0, 1fr));grid-template-areas:var(--list-grid-template-areas);grid-template-columns:var(--list-grid-template-columns)}@media screen and (min-width: 600px){.stzh-upload__previews-wrapper{-moz-column-gap:var(--stzh-grid-gutter-small);column-gap:var(--stzh-grid-gutter-small)}}@media screen and (min-width: 900px){.stzh-upload__previews-wrapper{-moz-column-gap:var(--stzh-grid-gutter-medium);column-gap:var(--stzh-grid-gutter-medium)}}@media screen and (min-width: 1260px){.stzh-upload__previews-wrapper{-moz-column-gap:var(--stzh-grid-gutter-large);column-gap:var(--stzh-grid-gutter-large)}}@media screen and (min-width: 1600px){.stzh-upload__previews-wrapper{-moz-column-gap:var(--stzh-grid-gutter-ultra);column-gap:var(--stzh-grid-gutter-ultra)}}@media screen and (min-width: 900px){.stzh-upload__previews-wrapper{grid-template-columns:repeat(8, minmax(0, 1fr))}}@media screen and (min-width: 1260px){.stzh-upload__previews-wrapper{grid-template-columns:repeat(12, minmax(0, 1fr))}}.stzh-upload__previews-inner-wrapper{grid-area:list}.stzh-upload__preview{padding-top:var(--stzh-space-xsmall);padding-bottom:var(--stzh-space-xsmall);display:flex;align-items:center}@media screen and (min-width: 900px){.stzh-upload__preview{padding-top:var(--stzh-space-small)}}@media screen and (min-width: 1260px){.stzh-upload__preview{padding-top:var(--stzh-space-medium)}}@media screen and (min-width: 900px){.stzh-upload__preview{padding-bottom:var(--stzh-space-small)}}@media screen and (min-width: 1260px){.stzh-upload__preview{padding-bottom:var(--stzh-space-medium)}}.stzh-upload__preview.dz-error .stzh-upload__title,.stzh-upload__preview.dz-error .stzh-upload__link[href]:not([href=\"\"]),.stzh-upload__preview.dz-error .stzh-upload__link[href]:not([href=\"\"]):hover{color:var(--stzh-color-error60)}.stzh-upload__preview.dz-error .stzh-upload__error-message{display:block}.stzh-upload__preview.dz-error .stzh-upload__meta{display:none}.stzh-upload__preview.dz-complete:not(.dz-error) stzh-icon.stzh-upload__delete-icon-error{display:none}.stzh-upload__preview.dz-complete:not(.dz-error) stzh-icon.stzh-upload__delete-icon{display:inline-flex}.stzh-upload__preview.dz-complete .stzh-upload__info-wrapper-processing{display:none}.stzh-upload__preview.dz-complete .stzh-upload__info-wrapper-complete{display:flex}.stzh-upload__preview.dz-empty .stzh-upload__separator{display:none}.stzh-upload__preview.dz-empty .stzh-upload__size{display:none}.stzh-upload__details{flex-grow:1;display:flex;overflow:hidden}.stzh-upload__info-wrapper{flex-grow:1;display:flex;overflow:hidden}.stzh-upload__info-wrapper-processing,.stzh-upload__info-wrapper-complete{flex-grow:1;display:flex;flex-direction:column;justify-content:center;overflow:hidden}.stzh-upload__info-wrapper-complete{display:none}.stzh-upload__actions{flex-shrink:0;display:flex;align-items:center}.stzh-upload__actions:not(:empty){margin-left:var(--stzh-space-xsmall)}.stzh-upload__infos{font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);display:flex;justify-content:space-between;align-items:center}.stzh-upload__title,.stzh-upload__subtitle{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.stzh-upload__title{font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing)}.stzh-upload__link[href]:not([href=\"\"]){color:var(--stzh-link-color)}.stzh-upload__link[href]:not([href=\"\"]):hover{color:var(--stzh-link-hover-color)}.stzh-upload__meta{font-size:var(--stzh-font-nano-font-size);line-height:var(--stzh-font-nano-text-line-height);letter-spacing:0.01em;display:flex;align-items:center;gap:var(--stzh-space-xsmall)}.stzh-upload__info-wrapper-processing .stzh-upload__meta{display:none}.stzh-upload__size strong{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium)}.stzh-upload__image{display:none}.stzh-upload__progress{display:block;height:0.375rem;background-color:var(--stzh-color-black20op);margin-top:var(--stzh-space-xsmall)}.stzh-upload__progress-bar{display:block;height:100%;width:0;background:var(--stzh-color-secondary40)}.stzh-upload__progress-text{font-size:var(--stzh-font-nano-font-size);line-height:var(--stzh-font-nano-text-line-height);letter-spacing:0.01em;margin-left:var(--stzh-space-medium);font-variant-numeric:tabular-nums}.stzh-upload__separator{width:0.0625rem;height:calc(100% - 0.25rem);background-color:currentColor}.stzh-upload__extension{text-transform:uppercase}.stzh-upload__extension:empty+.stzh-upload__separator{display:none}.stzh-upload__error-message{font-size:var(--stzh-font-nano-font-size);line-height:var(--stzh-font-nano-text-line-height);letter-spacing:0.01em;color:var(--stzh-color-error60);transition:color var(--stzh-base-transition-animation-speed);display:none}.stzh-upload.dz-started .stzh-upload__errors,.stzh-upload:has(.stzh-upload__preview) .stzh-upload__errors{margin-top:var(--stzh-space-medium)}.stzh-upload.dz-drag-hover .stzh-upload__clickarea{background-color:var(--stzh-color-secondary10);border-image-source:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAABMSURBVHgB7ddBCgAQEEDRGa7iRs7pRq4iVkqzIKVm4b81+VnIaMy1y6KVpLJh11u3+4M401l0Kn9tnut+AwDAS0gAAQQAAP8B/X46HlNzJxHDedWMAAAAAElFTkSuQmCC')}@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi){.stzh-upload.dz-drag-hover .stzh-upload__clickarea{border-image-source:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAB5SURBVHgB7dvBCYQwFEXRl5lW7Mg67chWRPcudCGC8M4pICEX/iYk4z+vey5syzTywN36d97e/5dyAqTcOM/I05n7uvN5jUDK1QcAAAAA+rgTTDkBUk6AlBMg5QRIOQFSToCUEyAAAAAAZbwPSDkBUm74O1xOgJQ7AO1EJzEUHPSNAAAAAElFTkSuQmCC')}}.stzh-upload.dz-drag-hover .stzh-upload__heading-wrapper{color:var(--stzh-color-primary70)}.stzh-upload--has-hidden-progress .stzh-upload__progress,.stzh-upload--has-hidden-progress .stzh-upload__progress-text,.stzh-upload--has-hidden-progress-while-idle .stzh-upload__preview:not(.dz-processing) .stzh-upload__progress,.stzh-upload--has-hidden-progress-while-idle .stzh-upload__preview:not(.dz-processing) .stzh-upload__progress-text{display:none}.stzh-upload--has-hidden-progress .stzh-upload__info-wrapper-processing .stzh-upload__meta,.stzh-upload--has-hidden-progress-while-idle .stzh-upload__preview:not(.dz-processing) .stzh-upload__info-wrapper-processing .stzh-upload__meta{display:flex}.stzh-upload--is-invalid .stzh-upload__clickarea{border-image-source:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAABNSURBVHgB7dcxDgAQDEDRlt0p3P9ETmEXJol0IBJJB//NxI9BVEtMXRa5VZUNu9663R/Emc6iU/lr81z3GwAAXkICCCAAAPgP6PfT8QDnDCW4JpVRXgAAAABJRU5ErkJggg==')}@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi){.stzh-upload--is-invalid .stzh-upload__clickarea{border-image-source:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAB5SURBVHgB7duxCYUwGIXRm/d6p3D/iZzCXrS30EIE4Z4zQEI++JuQjOU/7bkwb+vIA3fr33l7/1/KCZBy4zwjT2fu687nNQIpVx8AAAAA6ONOMOUESDkBUk6AlBMg5QRIOQFSToAAAAAAlPE+IOUESLnh73A5AVLuAFA3JdhPogvLAAAAAElFTkSuQmCC')}}.stzh-upload--has-error .stzh-upload__error,.stzh-upload--has-description .stzh-upload__description{margin-top:var(--stzh-space-small)}.stzh-upload--is-disabled .stzh-upload__clickarea{cursor:not-allowed;background-color:var(--stzh-color-grey10)}.stzh-upload-photographing__info:not(:last-child){padding-bottom:var(--stzh-space-xxlarge)}@media screen and (min-width: 900px){.stzh-upload-photographing__info:not(:last-child){padding-bottom:var(--stzh-space-xxxlarge)}}@media screen and (min-width: 1260px){.stzh-upload-photographing__info:not(:last-child){padding-bottom:var(--stzh-space-xxxxlarge)}}.stzh-upload-photographing__text-qrcode{display:grid;grid-template-columns:1fr auto;gap:var(--stzh-space-large)}.stzh-upload-photographing-qrcode{width:7.5rem;height:7.5rem}@media screen and (min-width: 1260px){.stzh-upload-photographing-qrcode{width:8.75rem;height:8.75rem}}.stzh-upload-photographing-link{margin-top:var(--stzh-space-medium);word-break:break-word}@media screen and (min-width: 900px){.stzh-upload-photographing-link{margin-top:var(--stzh-space-large)}}.stzh-upload-photographing__back-button{margin-bottom:var(--stzh-space-medium)}@media screen and (min-width: 600px){.stzh-upload-photographing__back-button{margin-bottom:var(--stzh-space-large)}}@media screen and (min-width: 900px){.stzh-upload-photographing__back-button{margin-bottom:var(--stzh-space-xlarge)}}@media screen and (min-width: 1260px){.stzh-upload-photographing__back-button{margin-bottom:var(--stzh-space-xxlarge)}}";
10364
13238
 
10365
13239
  window.Dropzone.autoDiscover = false;
10366
13240
  const ATTR_NAME = "data-dz-name";
@@ -10396,9 +13270,35 @@ const StzhUpload = class {
10396
13270
  this.stzhComplete = index.createEvent(this, "stzhComplete", 7);
10397
13271
  this.stzhCompleteMultiple = index.createEvent(this, "stzhCompleteMultiple", 7);
10398
13272
  this._existingFiles = [];
13273
+ this.PHOTOGRAPHING_BASE_URL = "/appl/mobiscan/rs";
13274
+ this.PHOTOGRAPHING_ENDPOINTS = {
13275
+ PING: "/ping",
13276
+ URL: "/url",
13277
+ IMAGE: "/image",
13278
+ CONFIG: "/config",
13279
+ AUTH: "/auth",
13280
+ };
10399
13281
  this.handleReset = () => {
10400
13282
  this.removeAllFiles(true);
10401
13283
  };
13284
+ this.closePhotographingWebsocketConnection = () => {
13285
+ this.photographingWebsocket.close();
13286
+ };
13287
+ this.onButtonScanClick = event => {
13288
+ event.preventDefault();
13289
+ event.stopPropagation();
13290
+ this.photographingOverlayElement.show().then();
13291
+ if (this.isPhotographingAvailable) {
13292
+ this.startPhotographingUserSession()
13293
+ .then()
13294
+ .catch(photographingUserSessionException => {
13295
+ console.error("photographingUserSessionException", photographingUserSessionException);
13296
+ });
13297
+ }
13298
+ };
13299
+ this.closePhotographingOverlay = async () => {
13300
+ this.photographingOverlayElement.hide().catch();
13301
+ };
10402
13302
  this.filesize = function (size) {
10403
13303
  let selectedSize = 0;
10404
13304
  let selectedUnit = "b";
@@ -10426,6 +13326,8 @@ const StzhUpload = class {
10426
13326
  this.heading = "";
10427
13327
  this.description = "";
10428
13328
  this.button = "";
13329
+ this.buttonScan = "";
13330
+ this.photographingEnabled = false;
10429
13331
  this.url = "";
10430
13332
  this.method = "post";
10431
13333
  this.withCredentials = false;
@@ -10460,6 +13362,13 @@ const StzhUpload = class {
10460
13362
  this.hiddenInputContainer = undefined;
10461
13363
  this.preventHiddenInputClear = false;
10462
13364
  this.localization = undefined;
13365
+ this.environment = undefined;
13366
+ this.isPhotographingAvailable = false;
13367
+ this.photographingUrlDetails = undefined;
13368
+ this.photographingHost = undefined;
13369
+ this.photographingConfig = undefined;
13370
+ this.photographingWebsocket = undefined;
13371
+ this.photographingToken = undefined;
10463
13372
  }
10464
13373
  resetListener(event) {
10465
13374
  if (event.target.contains(this.element)) {
@@ -10530,6 +13439,164 @@ const StzhUpload = class {
10530
13439
  async removeAllFiles(cancelIfNecessary = false, force = false) {
10531
13440
  return this.dropzone.removeAllFiles(cancelIfNecessary, force);
10532
13441
  }
13442
+ async getToken() {
13443
+ if (this.photographingToken &&
13444
+ this.photographingToken.access_token &&
13445
+ Date.now() < this.photographingToken.expires_in) {
13446
+ return this.photographingToken;
13447
+ }
13448
+ else {
13449
+ return await this.requestPhotographingToken();
13450
+ }
13451
+ }
13452
+ async requestPhotographingToken() {
13453
+ try {
13454
+ const response = await fetch(`${this.photographingHost}${this.PHOTOGRAPHING_BASE_URL}${this.PHOTOGRAPHING_ENDPOINTS.AUTH}`);
13455
+ if (!response.ok) {
13456
+ throw new Error("Token retrieval failed");
13457
+ }
13458
+ const parsedResponse = await response.json();
13459
+ this.photographingToken = {
13460
+ access_token: parsedResponse.access_token,
13461
+ expires_in: Date.now() + parsedResponse.expires_in * 1000,
13462
+ };
13463
+ return this.photographingToken;
13464
+ }
13465
+ catch (error) {
13466
+ console.error("Token retrieval failed", error);
13467
+ throw new Error("Token retrieval failed");
13468
+ }
13469
+ }
13470
+ async initializePhotographingWithEnvironment(environment) {
13471
+ this.photographingHost = this.getPhotographingHostForEnvironment(environment);
13472
+ await this.setPhotographingConfig();
13473
+ if (this.photographingConfig) {
13474
+ await this.checkPhotographingAvailability();
13475
+ }
13476
+ }
13477
+ async startPhotographingUserSession() {
13478
+ try {
13479
+ const response = await fetch(`${this.photographingConfig.publicEndpoint}${this.PHOTOGRAPHING_ENDPOINTS.URL}`, await this.getPhotographingHttpOptionsWithToken());
13480
+ if (!response.ok) ;
13481
+ else {
13482
+ const url = await response.json();
13483
+ const urlObject = new URL(url.url);
13484
+ const params = new URLSearchParams(urlObject.search);
13485
+ this.photographingUrlDetails = {
13486
+ url: url.url,
13487
+ userId: params.get("id"),
13488
+ };
13489
+ try {
13490
+ await browser.toCanvas(this.photographingQrcodeElement, url.url);
13491
+ }
13492
+ catch (error) {
13493
+ console.error("Error generating QR code:", error);
13494
+ }
13495
+ await this.establishPhotographingWebsocketConnection();
13496
+ }
13497
+ }
13498
+ catch (startPhotographingUserSessionException) {
13499
+ console.error(`StzhUpload.startPhotographingUserSession() - startPhotographingUserSessionException:`, startPhotographingUserSessionException);
13500
+ }
13501
+ }
13502
+ async retreivePhotographingPdf() {
13503
+ try {
13504
+ const response = await fetch(`${this.photographingConfig.publicEndpoint}${this.PHOTOGRAPHING_ENDPOINTS.IMAGE}/retreive-pdf?id=${this.photographingUrlDetails.userId}`, await this.getPhotographingHttpOptionsWithToken());
13505
+ if (!response.ok) {
13506
+ console.error(`StzhUpload.retreivePhotographingPdf() - HTTP error! status: ${response.status}`);
13507
+ }
13508
+ else {
13509
+ const parsedResponse = await response.json();
13510
+ const file = await this.fetchFile(parsedResponse.downloadLink);
13511
+ this.dropzone.addFile(file);
13512
+ await this.closePhotographingOverlay();
13513
+ }
13514
+ }
13515
+ catch (retreivePhotographingPdfException) {
13516
+ console.error(`StzhUpload.retreivePhotographingPdf() - retreivePhotographingPdfException:`, retreivePhotographingPdfException);
13517
+ }
13518
+ }
13519
+ async fetchFile(url) {
13520
+ const response = await fetch(url);
13521
+ const blob = await response.blob();
13522
+ const fileName = url.split("/").pop();
13523
+ const cleanFileName = fileName.split("?")[0];
13524
+ if (blob.type === "application/octet-stream") {
13525
+ return new File([blob], cleanFileName, { type: "application/pdf" });
13526
+ }
13527
+ return new File([blob], cleanFileName, { type: blob.type });
13528
+ }
13529
+ async establishPhotographingWebsocketConnection() {
13530
+ this.photographingWebsocket = new WebSocket(`${this.photographingConfig.wsClientUrl}${this.photographingUrlDetails.userId}`, ["chat", (await this.getToken()).access_token]);
13531
+ this.photographingWebsocket.onopen = () => {
13532
+ setInterval(() => {
13533
+ this.sendPhotographingWebsocketMessage("Ping");
13534
+ }, 20000);
13535
+ };
13536
+ this.photographingWebsocket.onmessage = async (event) => {
13537
+ const message = event.data;
13538
+ if (message === "retreivePdf") {
13539
+ await this.retreivePhotographingPdf();
13540
+ }
13541
+ };
13542
+ this.photographingWebsocket.onerror = error => {
13543
+ console.error("WebSocket error: ", error);
13544
+ };
13545
+ }
13546
+ sendPhotographingWebsocketMessage(message) {
13547
+ this.photographingWebsocket.send(message);
13548
+ }
13549
+ async getPhotographingHttpOptionsWithToken() {
13550
+ const token = await this.getToken();
13551
+ return {
13552
+ headers: {
13553
+ Authorization: `Bearer ${token.access_token}`,
13554
+ },
13555
+ };
13556
+ }
13557
+ async checkPhotographingAvailability() {
13558
+ try {
13559
+ const response = await fetch(`${this.photographingConfig.publicEndpoint}${this.PHOTOGRAPHING_ENDPOINTS.PING}`, await this.getPhotographingHttpOptionsWithToken());
13560
+ if (!response.ok) {
13561
+ console.error(`StzhUpload.isAvailable() - HTTP error! status: ${response.status}`);
13562
+ this.isPhotographingAvailable = false;
13563
+ }
13564
+ else {
13565
+ this.isPhotographingAvailable = true;
13566
+ }
13567
+ }
13568
+ catch (isAvailableException) {
13569
+ console.error(`StzhUpload.isAvailable() - isAvailableException:`, isAvailableException);
13570
+ this.isPhotographingAvailable = false;
13571
+ }
13572
+ }
13573
+ async setPhotographingConfig() {
13574
+ try {
13575
+ const response = await fetch(`${this.photographingHost}${this.PHOTOGRAPHING_BASE_URL}${this.PHOTOGRAPHING_ENDPOINTS.CONFIG}`);
13576
+ if (!response.ok) {
13577
+ console.error(`StzhUpload.getConfig() - HTTP error! status: ${response.status}`);
13578
+ }
13579
+ else {
13580
+ this.photographingConfig = await response.json();
13581
+ }
13582
+ }
13583
+ catch (getConfigException) {
13584
+ console.error(`StzhUpload.getConfig() - getConfigException:`, getConfigException);
13585
+ }
13586
+ }
13587
+ getPhotographingHostForEnvironment(environment) {
13588
+ switch (environment) {
13589
+ case "DEV":
13590
+ return "https://www.test.stadt-zuerich.loc";
13591
+ case "UAT":
13592
+ return "https://www.integ.stadt-zuerich.ch";
13593
+ case "PROD":
13594
+ return "https://www.stadt-zuerich.ch";
13595
+ case "UNKNOWN":
13596
+ this.PHOTOGRAPHING_BASE_URL = `/stzh-components/assets/mock${this.PHOTOGRAPHING_BASE_URL}`;
13597
+ return `${window.location.origin}`;
13598
+ }
13599
+ }
10533
13600
  async componentWillLoad() {
10534
13601
  this.uploadId = `stzh-upload-${uploadCounter++}`;
10535
13602
  this.existingFilesWatcher(this.existingFiles);
@@ -10537,6 +13604,12 @@ const StzhUpload = class {
10537
13604
  if (!this.localization) {
10538
13605
  this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, "upload");
10539
13606
  }
13607
+ this.environment = utils$2.getStzhEnvironment();
13608
+ if (this.photographingEnabled) {
13609
+ this.initializePhotographingWithEnvironment(this.environment).catch(initializePhotographingWithEnvironmentException => {
13610
+ console.error("initializePhotographingWithEnvironmentException", initializePhotographingWithEnvironmentException);
13611
+ });
13612
+ }
10540
13613
  }
10541
13614
  componentDidRender() {
10542
13615
  if (this.dropzone) {
@@ -10552,7 +13625,7 @@ const StzhUpload = class {
10552
13625
  for (var node of file.previewElement.querySelectorAll(`[${ATTR_LINK}]`)) {
10553
13626
  node.setAttribute("href", fileHref);
10554
13627
  node.setAttribute("download", file.name);
10555
- const isStzh = utils.isStzhElement(node);
13628
+ const isStzh = utils$2.isStzhElement(node);
10556
13629
  const fileId = self.filePreviewId(file);
10557
13630
  node.setAttribute(isStzh ? "analytics-id" : "s-object-id", `${self.localization.downloadFile} ${file.name}`);
10558
13631
  node.setAttribute(isStzh ? "a11y-label" : "aria-label", `${self.localization.downloadFile} ${file.name}`);
@@ -10597,6 +13670,24 @@ const StzhUpload = class {
10597
13670
  dictResponseError: this.localization.responseError,
10598
13671
  dictInvalidFileType: this.localization.invalidFileType,
10599
13672
  dictFileTooBig: this.localization.fileTooBig,
13673
+ // Called when a file is dropped to the dropzone
13674
+ // Receives `event`
13675
+ drop: e => {
13676
+ var _a;
13677
+ // Merge files in hidden input.
13678
+ if (this.preventHiddenInputClear) {
13679
+ const hiddenFileInput = (_a = this.hiddenInputContainerElement) === null || _a === void 0 ? void 0 : _a.querySelector("input");
13680
+ const dataTransfer = new DataTransfer();
13681
+ for (let i = 0; i < hiddenFileInput.files.length; i++) {
13682
+ dataTransfer.items.add(hiddenFileInput.files[i]);
13683
+ }
13684
+ for (const file of e.dataTransfer.files) {
13685
+ dataTransfer.items.add(file);
13686
+ }
13687
+ hiddenFileInput.files = dataTransfer.files;
13688
+ }
13689
+ return this.element.classList.remove("dz-drag-hover");
13690
+ },
10600
13691
  // Called when a file is added to the queue
10601
13692
  // Receives `file`
10602
13693
  // Taken from https://github.com/dropzone/dropzone/blob/v5.9.3/src/options.js#L594
@@ -10647,7 +13738,7 @@ const StzhUpload = class {
10647
13738
  };
10648
13739
  for (let removeLink of file.previewElement.querySelectorAll(`[${ATTR_REMOVE}]`)) {
10649
13740
  removeLink.addEventListener("click", removeFileEvent);
10650
- const isStzh = utils.isStzhElement(removeLink);
13741
+ const isStzh = utils$2.isStzhElement(removeLink);
10651
13742
  const fileId = self.filePreviewId(file);
10652
13743
  removeLink.setAttribute(isStzh ? "analytics-id" : "s-object-id", `${this.options.dictRemoveFile}`);
10653
13744
  removeLink.setAttribute(isStzh ? "a11y-label" : "aria-label", `${this.options.dictRemoveFile} ${file.name}`);
@@ -10664,7 +13755,7 @@ const StzhUpload = class {
10664
13755
  for (let node of file.previewElement.querySelectorAll(`[${ATTR_REMOVE}]`)) {
10665
13756
  const hasErrorState = file.status === "error";
10666
13757
  const removeOrDeleteLabel = hasErrorState ? this.options.dictRemoveFile : this.options.dictDeleteFile;
10667
- const isStzh = utils.isStzhElement(node);
13758
+ const isStzh = utils$2.isStzhElement(node);
10668
13759
  const fileId = self.filePreviewId(file);
10669
13760
  node.setAttribute(isStzh ? "a11y-label" : "aria-label", `${removeOrDeleteLabel} ${file.name}`);
10670
13761
  node.setAttribute(isStzh ? "a11y-describedby" : "aria-describedby", `${fileId}-error-message ${fileId}-meta`);
@@ -10892,7 +13983,7 @@ const StzhUpload = class {
10892
13983
  }
10893
13984
  render() {
10894
13985
  var _a, _b;
10895
- const errorUsed = utils.hasSlot(this.element, "error") || ((_a = this._error) === null || _a === void 0 ? void 0 : _a.length) > 0;
13986
+ const errorUsed = utils$2.hasSlot(this.element, "error") || ((_a = this._error) === null || _a === void 0 ? void 0 : _a.length) > 0;
10896
13987
  const classes = {
10897
13988
  "stzh-upload": true,
10898
13989
  "stzh-upload--is-invalid": this.invalid || errorUsed,
@@ -10902,7 +13993,10 @@ const StzhUpload = class {
10902
13993
  "stzh-upload--has-error": errorUsed,
10903
13994
  "stzh-upload--has-instructions": !!this.description || !!this.localization.description,
10904
13995
  };
10905
- return (index.h(index.Host, { "is-invalid": this.invalid || errorUsed }, index.h("div", { class: classes, ref: el => (this.dropzoneElement = el) }, index.h("div", { ref: el => (this.hiddenInputContainerElement = el) }), index.h("div", { id: `${this.uploadId}-label` }, this.label && index.h("div", { class: "stzh-upload__label" }, this.label)), index.h("div", { class: "stzh-upload__clickarea", ref: el => (this.clickareaElement = el) }, index.h("div", { class: "stzh-upload__heading-wrapper" }, index.h("div", { class: "stzh-upload__heading-inner-wrapper" }, index.h("div", { class: "stzh-upload__heading" }, this.heading ? this.heading : this.localization.heading), index.h("div", { class: "stzh-upload__button-wrapper" }, index.h("span", null, this.localization.buttonIntro), index.h("stzh-link", { class: "stzh-upload__button", ref: el => (this.linkElement = el), size: "inherit", variant: "secondary", a11yDescribedby: `${this.uploadId}-label ${this.uploadId}-instruction ${this.uploadId}-description`, disabled: this.disabled, a11yControls: `${this.uploadId}-previews` }, this.button ? this.button : translationUtils.tc(this.localization.button, this.maxFiles)))), index.h("stzh-icon", { class: "stzh-upload__heading-icon", name: "upload" })), index.h("div", { class: "stzh-upload__instructions", id: `${this.uploadId}-instruction` }, this.description ? this.description : translationUtils.tc(this.localization.description, this.maxFiles))), ((_b = this._error) === null || _b === void 0 ? void 0 : _b.length) > 0 && (index.h(stzhInputDescription.StzhInputDescription, { classPrefix: "stzh-upload", id: `${this.uploadId}-description`, error: this._error })), index.h("div", { id: `${this.uploadId}-previews`, class: "stzh-upload__previews-wrapper" }, index.h("div", { class: "stzh-upload__previews-inner-wrapper" }, index.h("div", { class: "stzh-upload__errors", ref: el => (this.errorsElement = el) }), index.h("div", { class: "stzh-upload__previews dropzone-previews", ref: el => (this.previewsElement = el) }))))));
13996
+ const description = this.description ? this.description : this.localization.description;
13997
+ return (index.h(index.Host, { "is-invalid": this.invalid || errorUsed }, index.h("div", { class: classes, ref: el => (this.dropzoneElement = el) }, index.h("div", { ref: el => (this.hiddenInputContainerElement = el) }), index.h("div", { id: `${this.uploadId}-label` }, this.label && index.h("div", { class: "stzh-upload__label" }, this.label)), index.h("div", { class: "stzh-upload__clickarea", ref: el => (this.clickareaElement = el) }, index.h("div", { class: "stzh-upload__heading-wrapper" }, index.h("div", { class: "stzh-upload__heading-inner-wrapper" }, index.h("div", { class: "stzh-upload__heading" }, this.heading ? this.heading : this.localization.heading), index.h("div", { class: "stzh-upload__buttons-wrapper" }, index.h("stzh-button", { class: "stzh-upload__button", variant: "secondary", size: "small", ref: el => (this.linkElement = el), label: this.button ? this.button : translationUtils.tc(this.localization.button, this.maxFiles), a11yDescribedby: `${this.uploadId}-label ${this.uploadId}-instruction ${this.uploadId}-description`, disabled: this.disabled, a11yControls: `${this.uploadId}-previews` }, index.h("stzh-icon", { slot: "icon", name: "upload" })), this.isPhotographingAvailable && (index.h("stzh-button", { class: "stzh-upload__button-scan", variant: "secondary", size: "small", label: this.buttonScan ? this.buttonScan : translationUtils.tc(this.localization.buttonScan, this.maxFiles), onClick: this.onButtonScanClick }, index.h("stzh-icon", { slot: "icon", name: "camera" })))), index.h("div", { class: "stzh-upload__hint-wrapper" }, index.h("span", null, this.localization.buttonIntro)))), index.h("div", { class: "stzh-upload__instructions", id: `${this.uploadId}-instruction` }, description
13998
+ .replace("{{fileformats}}", this.acceptedFiles ? this.acceptedFiles : "Alle")
13999
+ .replace("{{filesize}}", `${this.maxFilesize}`))), ((_b = this._error) === null || _b === void 0 ? void 0 : _b.length) > 0 && (index.h(stzhInputDescription.StzhInputDescription, { classPrefix: "stzh-upload", id: `${this.uploadId}-description`, error: this._error })), index.h("div", { id: `${this.uploadId}-previews`, class: "stzh-upload__previews-wrapper" }, index.h("div", { class: "stzh-upload__previews-inner-wrapper" }, index.h("div", { class: "stzh-upload__errors", ref: el => (this.errorsElement = el) }), index.h("div", { class: "stzh-upload__previews dropzone-previews", ref: el => (this.previewsElement = el) })))), index.h("stzh-dialog", { ref: el => (this.photographingOverlayElement = el), onStzhClose: this.closePhotographingWebsocketConnection }, index.h("stzh-button", { class: "stzh-upload-photographing__back-button", icon: "arrow-left", size: "small", variant: "tertiary-plain", "no-padding-left": "true", "no-padding-right": "true", onClick: this.closePhotographingOverlay }, this.localization.back), this.isPhotographingAvailable && (index.h(index.Fragment, null, index.h("div", { class: "stzh-upload-photographing__info" }, index.h("stzh-heading", { level: "3" }, this.localization.photographingTitle1), index.h("div", { class: "stzh-upload-photographing__text-qrcode" }, index.h("div", null, index.h("stzh-text", null, this.localization.photographingText1), !!this.photographingUrlDetails && (index.h("stzh-link", { class: "stzh-upload-photographing-link", href: this.photographingUrlDetails.url, target: "_blank" }, this.photographingUrlDetails.url))), index.h("canvas", { class: "stzh-upload-photographing-qrcode", ref: el => (this.photographingQrcodeElement = el) }))), index.h("div", { class: "stzh-upload-photographing__info" }, index.h("stzh-heading", { level: "3" }, this.localization.photographingTitle2), index.h("stzh-text", null, this.localization.photographingText2)))))));
10906
14000
  }
10907
14001
  get element() { return index.getElement(this); }
10908
14002
  static get watchers() { return {