@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
@@ -4,9 +4,2809 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-92254d32.js');
6
6
  const js_cookie = require('./js.cookie-b422ea10.js');
7
- require('./_commonjsHelpers-dcc4cf71.js');
7
+ const _commonjsHelpers = require('./_commonjsHelpers-dcc4cf71.js');
8
+ const utils = require('./utils-d091c010.js');
9
+ require('./string-utils-5dd70320.js');
8
10
 
9
- const stzhIframeCss = ".sc-stzh-iframe-h{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}[hidden].sc-stzh-iframe-h{display:none}.sc-stzh-iframe-h::-moz-selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}.sc-stzh-iframe-h::selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}.sc-stzh-iframe-h *.sc-stzh-iframe,.sc-stzh-iframe-h *.sc-stzh-iframe::before,.sc-stzh-iframe-h *.sc-stzh-iframe::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)}.sc-stzh-iframe-h .has-focus.sc-stzh-iframe{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}.sc-stzh-iframe-h .stzh-fylingfocus-focused.sc-stzh-iframe{outline-style:none !important}.sc-stzh-iframe-h .stzh-fylingfocus-focused.sc-stzh-iframe::-moz-focus-inner{border:0 !important}.sc-stzh-iframe-h{position:relative}.sc-stzh-iframe-h .sc-stzh-iframe-s>[slot=preview-logo]{width:100%}.sc-stzh-iframe-h .sc-stzh-iframe-s>[slot=preview-image]{position:absolute;top:0;left:0;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.sc-stzh-iframe-h .sc-stzh-iframe-s>[slot=cookiewall-text]{margin:0}.sc-stzh-iframe-h .sc-stzh-iframe-s>[slot=cookiewall-text] p{margin:0}.sc-stzh-iframe-h .sc-stzh-iframe-s>[slot=cookiewall-text] p:not(:last-child){margin-bottom:var(--stzh-space-small)}@media screen and (min-width: 900px){.sc-stzh-iframe-h .sc-stzh-iframe-s>[slot=cookiewall-text] p:not(:last-child){margin-bottom:var(--stzh-space-medium)}}@media screen and (min-width: 1260px){.sc-stzh-iframe-h .sc-stzh-iframe-s>[slot=cookiewall-text] p:not(:last-child){margin-bottom:var(--stzh-space-large)}}.stzh-iframe__iframe.sc-stzh-iframe,.stzh-iframe__cookiewall.sc-stzh-iframe,.stzh-iframe__preview.sc-stzh-iframe{position:absolute;top:0;left:0;width:100%;height:100%}.stzh-iframe__iframe.sc-stzh-iframe,.stzh-iframe__preview.sc-stzh-iframe{border:none}.stzh-iframe__preview.sc-stzh-iframe,.stzh-iframe__cookiewall.sc-stzh-iframe{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:var(--stzh-space-medium);visibility:hidden}.stzh-iframe__preview.is-visible.sc-stzh-iframe,.stzh-iframe__cookiewall.is-visible.sc-stzh-iframe{visibility:visible}.stzh-iframe__preview.sc-stzh-iframe{z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;background-color:var(--stzh-color-grey20)}.stzh-iframe__preview-image-wrapper.sc-stzh-iframe:not(:empty)+.stzh-iframe__preview-logo-wrapper.sc-stzh-iframe{display:none}.stzh-iframe__preview-logo-wrapper.sc-stzh-iframe{top:var(--stzh-space-xlarge);left:var(--stzh-space-xlarge);position:absolute;width:45%}@media screen and (min-width: 900px){.stzh-iframe__preview-logo-wrapper.sc-stzh-iframe{top:var(--stzh-space-xxlarge)}}@media screen and (min-width: 1260px){.stzh-iframe__preview-logo-wrapper.sc-stzh-iframe{top:var(--stzh-space-xxxlarge)}}@media screen and (min-width: 900px){.stzh-iframe__preview-logo-wrapper.sc-stzh-iframe{left:var(--stzh-space-xxlarge)}}@media screen and (min-width: 1260px){.stzh-iframe__preview-logo-wrapper.sc-stzh-iframe{left:var(--stzh-space-xxxlarge)}}.stzh-iframe__preview-run.sc-stzh-iframe{position:relative;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;background-color:var(--stzh-color-primary);color:var(--stzh-color-white);display:flex;flex-direction:column;align-items:center;justify-content:center;width:var(--stzh-form-input-small-height);height:var(--stzh-form-input-small-height);visibility:hidden;transition:background-color var(--stzh-base-transition-animation-speed)}.stzh-iframe__preview-run.is-visible.sc-stzh-iframe{visibility:visible}@media screen and (min-width: 900px){.stzh-iframe__preview-run.sc-stzh-iframe{width:var(--stzh-form-input-height);height:var(--stzh-form-input-height)}}.stzh-iframe__preview.sc-stzh-iframe:hover .stzh-iframe__preview-run.sc-stzh-iframe{background-color:var(--stzh-color-secondary60)}@media screen and (min-width: 900px){.stzh-iframe__preview-run-icon.sc-stzh-iframe{--size:var(--stzh-icon-size-large)}}.stzh-iframe__cookiewall.sc-stzh-iframe{padding-left:var(--stzh-space-medium);padding-right:var(--stzh-space-medium);z-index:2;text-align:center;background-color:var(--stzh-color-black60op);color:var(--stzh-color-white)}@media screen and (min-width: 600px){.stzh-iframe__cookiewall.sc-stzh-iframe{padding-left:var(--stzh-space-large)}}@media screen and (min-width: 900px){.stzh-iframe__cookiewall.sc-stzh-iframe{padding-left:var(--stzh-space-xlarge)}}@media screen and (min-width: 1260px){.stzh-iframe__cookiewall.sc-stzh-iframe{padding-left:var(--stzh-space-xxlarge)}}@media screen and (min-width: 600px){.stzh-iframe__cookiewall.sc-stzh-iframe{padding-right:var(--stzh-space-large)}}@media screen and (min-width: 900px){.stzh-iframe__cookiewall.sc-stzh-iframe{padding-right:var(--stzh-space-xlarge)}}@media screen and (min-width: 1260px){.stzh-iframe__cookiewall.sc-stzh-iframe{padding-right:var(--stzh-space-xxlarge)}}@media screen and (min-width: 900px){.stzh-iframe__cookiewall.sc-stzh-iframe{-moz-column-gap:var(--stzh-grid-gutter);column-gap:var(--stzh-grid-gutter);display:grid;grid-template-areas:\". content content content content content content .\";grid-template-columns:repeat(8, minmax(0, 1fr));padding-left:0;padding-right:0}}@media screen and (min-width: 900px) and (min-width: 600px){.stzh-iframe__cookiewall.sc-stzh-iframe{-moz-column-gap:var(--stzh-grid-gutter-small);column-gap:var(--stzh-grid-gutter-small)}}@media screen and (min-width: 900px) and (min-width: 900px){.stzh-iframe__cookiewall.sc-stzh-iframe{-moz-column-gap:var(--stzh-grid-gutter-medium);column-gap:var(--stzh-grid-gutter-medium)}}@media screen and (min-width: 900px) and (min-width: 1260px){.stzh-iframe__cookiewall.sc-stzh-iframe{-moz-column-gap:var(--stzh-grid-gutter-large);column-gap:var(--stzh-grid-gutter-large)}}@media screen and (min-width: 900px) and (min-width: 1600px){.stzh-iframe__cookiewall.sc-stzh-iframe{-moz-column-gap:var(--stzh-grid-gutter-ultra);column-gap:var(--stzh-grid-gutter-ultra)}}@media screen and (min-width: 900px){.stzh-iframe__cookiewall-content.sc-stzh-iframe{grid-area:content}}.stzh-iframe__cookiewall-text.sc-stzh-iframe{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-top:var(--stzh-space-small);padding-bottom:var(--stzh-space-small);margin-bottom:var(--stzh-space-medium)}@media screen and (min-width: 900px){.stzh-iframe__cookiewall-text.sc-stzh-iframe{padding-top:var(--stzh-space-medium)}}@media screen and (min-width: 1260px){.stzh-iframe__cookiewall-text.sc-stzh-iframe{padding-top:var(--stzh-space-large)}}@media screen and (min-width: 900px){.stzh-iframe__cookiewall-text.sc-stzh-iframe{padding-bottom:var(--stzh-space-medium)}}@media screen and (min-width: 1260px){.stzh-iframe__cookiewall-text.sc-stzh-iframe{padding-bottom:var(--stzh-space-large)}}@media screen and (min-width: 600px){.stzh-iframe__cookiewall-text.sc-stzh-iframe{margin-bottom:var(--stzh-space-large)}}@media screen and (min-width: 900px){.stzh-iframe__cookiewall-text.sc-stzh-iframe{margin-bottom:var(--stzh-space-xlarge)}}@media screen and (min-width: 1260px){.stzh-iframe__cookiewall-text.sc-stzh-iframe{margin-bottom:var(--stzh-space-xxlarge)}}.stzh-iframe__cookiewall-close.sc-stzh-iframe{top:0;right:0;position:absolute;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;display:flex;align-items:center;justify-content:center;padding:var(--stzh-space-xsmall);background-color:transparent;color:var(--stzh-color-white);cursor:pointer}";
11
+ var iframeResizer$1 = _commonjsHelpers.createCommonjsModule(function (module) {
12
+ /*
13
+ * File: iframeResizer.js
14
+ * Desc: Force iframes to size to content.
15
+ * Requires: iframeResizer.contentWindow.js to be loaded into the target frame.
16
+ * Doc: https://iframe-resizer.com
17
+ * Author: David J. Bradshaw - info@iframe-resizer.com
18
+ */
19
+
20
+ console.info(`
21
+ IFRAME-RESIZER
22
+
23
+ Iframe-Resizer 5 is now available via the following two packages:
24
+
25
+ * @iframe-resizer/parent
26
+ * @iframe-resizer/child
27
+
28
+ Additionally their are also new versions of iframe-resizer for React, Vue, and jQuery.
29
+
30
+ Version 5 of iframe-resizer has been extensively rewritten to use modern browser APIs, which has enabled significantly better performance and greater accuracy in the detection of content resizing events.
31
+
32
+ Please see https://iframe-resizer.com/upgrade for more details.
33
+ `)
34
+
35
+ // eslint-disable-next-line sonarjs/cognitive-complexity, no-shadow-restricted-names
36
+ ;(function (undefined$1) {
37
+ if (typeof window === 'undefined') return // don't run for server side render
38
+
39
+ // var VERSION = '4.3.11'
40
+
41
+ var count = 0,
42
+ destroyObserver,
43
+ logEnabled = false,
44
+ hiddenCheckEnabled = false,
45
+ msgHeader = 'message',
46
+ msgHeaderLen = msgHeader.length,
47
+ msgId = '[iFrameSizer]', // Must match iframe msg ID
48
+ msgIdLen = msgId.length,
49
+ pagePosition = null,
50
+ requestAnimationFrame = window.requestAnimationFrame,
51
+ resetRequiredMethods = Object.freeze({
52
+ max: 1,
53
+ scroll: 1,
54
+ bodyScroll: 1,
55
+ documentElementScroll: 1
56
+ }),
57
+ settings = {},
58
+ timer = null,
59
+ defaults = Object.freeze({
60
+ autoResize: true,
61
+ bodyBackground: null,
62
+ bodyMargin: null,
63
+ bodyMarginV1: 8,
64
+ bodyPadding: null,
65
+ checkOrigin: true,
66
+ inPageLinks: false,
67
+ enablePublicMethods: true,
68
+ heightCalculationMethod: 'bodyOffset',
69
+ id: 'iFrameResizer',
70
+ interval: 32,
71
+ license: '1jqr0si6pnt',
72
+ log: false,
73
+ maxHeight: Infinity,
74
+ maxWidth: Infinity,
75
+ minHeight: 0,
76
+ minWidth: 0,
77
+ mouseEvents: true,
78
+ resizeFrom: 'parent',
79
+ scrolling: false,
80
+ sizeHeight: true,
81
+ sizeWidth: false,
82
+ warningTimeout: 5000,
83
+ tolerance: 0,
84
+ widthCalculationMethod: 'scroll',
85
+ onClose: function () {
86
+ return true
87
+ },
88
+ onClosed: function () {},
89
+ onInit: function () {},
90
+ onMessage: function () {
91
+ warn('onMessage function not defined');
92
+ },
93
+ onMouseEnter: function () {},
94
+ onMouseLeave: function () {},
95
+ onResized: function () {},
96
+ onScroll: function () {
97
+ return true
98
+ }
99
+ });
100
+
101
+ function getMutationObserver() {
102
+ return (
103
+ window.MutationObserver ||
104
+ window.WebKitMutationObserver ||
105
+ window.MozMutationObserver
106
+ )
107
+ }
108
+
109
+ function addEventListener(el, evt, func) {
110
+ el.addEventListener(evt, func, false);
111
+ }
112
+
113
+ function removeEventListener(el, evt, func) {
114
+ el.removeEventListener(evt, func, false);
115
+ }
116
+
117
+ function setupRequestAnimationFrame() {
118
+ var vendors = ['moz', 'webkit', 'o', 'ms'];
119
+ var x;
120
+
121
+ // Remove vendor prefixing if prefixed and break early if not
122
+ for (x = 0; x < vendors.length && !requestAnimationFrame; x += 1) {
123
+ requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];
124
+ }
125
+
126
+ if (requestAnimationFrame) {
127
+ // Firefox extension content-scripts have a globalThis object that is not the same as window.
128
+ // Binding `requestAnimationFrame` to window allows the function to work and prevents errors
129
+ // being thrown when run in that context, and should be a no-op in every other context.
130
+ requestAnimationFrame = requestAnimationFrame.bind(window);
131
+ } else {
132
+ log('setup', 'RequestAnimationFrame not supported');
133
+ }
134
+ }
135
+
136
+ function getMyID(iframeId) {
137
+ var retStr = 'Host page: ' + iframeId;
138
+
139
+ if (window.top !== window.self) {
140
+ retStr =
141
+ window.parentIFrame && window.parentIFrame.getId
142
+ ? window.parentIFrame.getId() + ': ' + iframeId
143
+ : 'Nested host page: ' + iframeId;
144
+ }
145
+
146
+ return retStr
147
+ }
148
+
149
+ function formatLogHeader(iframeId) {
150
+ return msgId + '[' + getMyID(iframeId) + ']'
151
+ }
152
+
153
+ function isLogEnabled(iframeId) {
154
+ return settings[iframeId] ? settings[iframeId].log : logEnabled
155
+ }
156
+
157
+ function log(iframeId, msg) {
158
+ output('log', iframeId, msg, isLogEnabled(iframeId));
159
+ }
160
+
161
+ function info(iframeId, msg) {
162
+ output('info', iframeId, msg, isLogEnabled(iframeId));
163
+ }
164
+
165
+ function warn(iframeId, msg) {
166
+ output('warn', iframeId, msg, true);
167
+ }
168
+
169
+ function output(type, iframeId, msg, enabled) {
170
+ if (true === enabled && 'object' === typeof window.console) {
171
+ // eslint-disable-next-line no-console
172
+ console[type](formatLogHeader(iframeId), msg);
173
+ }
174
+ }
175
+
176
+ function iFrameListener(event) {
177
+ function resizeIFrame() {
178
+ function resize() {
179
+ setSize(messageData);
180
+ setPagePosition(iframeId);
181
+ on('onResized', messageData);
182
+ }
183
+
184
+ ensureInRange('Height');
185
+ ensureInRange('Width');
186
+
187
+ syncResize(resize, messageData, 'init');
188
+ }
189
+
190
+ function processMsg() {
191
+ var data = msg.slice(msgIdLen).split(':');
192
+ var height = data[1] ? parseInt(data[1], 10) : 0;
193
+ var iframe = settings[data[0]] && settings[data[0]].iframe;
194
+ var compStyle = getComputedStyle(iframe);
195
+
196
+ return {
197
+ iframe: iframe,
198
+ id: data[0],
199
+ height: height + getPaddingEnds(compStyle) + getBorderEnds(compStyle),
200
+ width: data[2],
201
+ type: data[3]
202
+ }
203
+ }
204
+
205
+ function getPaddingEnds(compStyle) {
206
+ if (compStyle.boxSizing !== 'border-box') {
207
+ return 0
208
+ }
209
+ var top = compStyle.paddingTop ? parseInt(compStyle.paddingTop, 10) : 0;
210
+ var bot = compStyle.paddingBottom
211
+ ? parseInt(compStyle.paddingBottom, 10)
212
+ : 0;
213
+ return top + bot
214
+ }
215
+
216
+ function getBorderEnds(compStyle) {
217
+ if (compStyle.boxSizing !== 'border-box') {
218
+ return 0
219
+ }
220
+ var top = compStyle.borderTopWidth
221
+ ? parseInt(compStyle.borderTopWidth, 10)
222
+ : 0;
223
+ var bot = compStyle.borderBottomWidth
224
+ ? parseInt(compStyle.borderBottomWidth, 10)
225
+ : 0;
226
+ return top + bot
227
+ }
228
+
229
+ function ensureInRange(Dimension) {
230
+ var max = Number(settings[iframeId]['max' + Dimension]),
231
+ min = Number(settings[iframeId]['min' + Dimension]),
232
+ dimension = Dimension.toLowerCase(),
233
+ size = Number(messageData[dimension]);
234
+
235
+ log(iframeId, 'Checking ' + dimension + ' is in range ' + min + '-' + max);
236
+
237
+ if (size < min) {
238
+ size = min;
239
+ log(iframeId, 'Set ' + dimension + ' to min value');
240
+ }
241
+
242
+ if (size > max) {
243
+ size = max;
244
+ log(iframeId, 'Set ' + dimension + ' to max value');
245
+ }
246
+
247
+ messageData[dimension] = '' + size;
248
+ }
249
+
250
+ function isMessageFromIFrame() {
251
+ function checkAllowedOrigin() {
252
+ function checkList() {
253
+ var i = 0,
254
+ retCode = false;
255
+
256
+ log(
257
+ iframeId,
258
+ 'Checking connection is from allowed list of origins: ' +
259
+ checkOrigin
260
+ );
261
+
262
+ for (; i < checkOrigin.length; i++) {
263
+ if (checkOrigin[i] === origin) {
264
+ retCode = true;
265
+ break
266
+ }
267
+ }
268
+ return retCode
269
+ }
270
+
271
+ function checkSingle() {
272
+ var remoteHost = settings[iframeId] && settings[iframeId].remoteHost;
273
+ log(iframeId, 'Checking connection is from: ' + remoteHost);
274
+ return origin === remoteHost
275
+ }
276
+
277
+ return checkOrigin.constructor === Array ? checkList() : checkSingle()
278
+ }
279
+
280
+ var origin = event.origin,
281
+ checkOrigin = settings[iframeId] && settings[iframeId].checkOrigin;
282
+
283
+ if (checkOrigin && '' + origin !== 'null' && !checkAllowedOrigin()) {
284
+ throw new Error(
285
+ 'Unexpected message received from: ' +
286
+ origin +
287
+ ' for ' +
288
+ messageData.iframe.id +
289
+ '. Message was: ' +
290
+ event.data +
291
+ '. This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.'
292
+ )
293
+ }
294
+
295
+ return true
296
+ }
297
+
298
+ function isMessageForUs() {
299
+ return (
300
+ msgId === ('' + msg).slice(0, msgIdLen) &&
301
+ msg.slice(msgIdLen).split(':')[0] in settings
302
+ ) // ''+Protects against non-string msg
303
+ }
304
+
305
+ function isMessageFromMetaParent() {
306
+ // Test if this message is from a parent above us. This is an ugly test, however, updating
307
+ // the message format would break backwards compatibility.
308
+ var retCode = messageData.type in { true: 1, false: 1, undefined: 1 };
309
+
310
+ if (retCode) {
311
+ log(iframeId, 'Ignoring init message from meta parent page');
312
+ }
313
+
314
+ return retCode
315
+ }
316
+
317
+ function getMsgBody(offset) {
318
+ return msg.slice(msg.indexOf(':') + msgHeaderLen + offset)
319
+ }
320
+
321
+ function forwardMsgFromIFrame(msgBody) {
322
+ log(
323
+ iframeId,
324
+ 'onMessage passed: {iframe: ' +
325
+ messageData.iframe.id +
326
+ ', message: ' +
327
+ msgBody +
328
+ '}'
329
+ );
330
+
331
+ on('onMessage', {
332
+ iframe: messageData.iframe,
333
+ message: JSON.parse(msgBody)
334
+ });
335
+
336
+ log(iframeId, '--');
337
+ }
338
+
339
+ function getPageInfo() {
340
+ var bodyPosition = document.body.getBoundingClientRect(),
341
+ iFramePosition = messageData.iframe.getBoundingClientRect();
342
+
343
+ return JSON.stringify({
344
+ iframeHeight: iFramePosition.height,
345
+ iframeWidth: iFramePosition.width,
346
+ clientHeight: Math.max(
347
+ document.documentElement.clientHeight,
348
+ window.innerHeight || 0
349
+ ),
350
+ clientWidth: Math.max(
351
+ document.documentElement.clientWidth,
352
+ window.innerWidth || 0
353
+ ),
354
+ offsetTop: parseInt(iFramePosition.top - bodyPosition.top, 10),
355
+ offsetLeft: parseInt(iFramePosition.left - bodyPosition.left, 10),
356
+ scrollTop: window.pageYOffset,
357
+ scrollLeft: window.pageXOffset,
358
+ documentHeight: document.documentElement.clientHeight,
359
+ documentWidth: document.documentElement.clientWidth,
360
+ windowHeight: window.innerHeight,
361
+ windowWidth: window.innerWidth
362
+ })
363
+ }
364
+
365
+ function sendPageInfoToIframe(iframe, iframeId) {
366
+ function debouncedTrigger() {
367
+ trigger('Send Page Info', 'pageInfo:' + getPageInfo(), iframe, iframeId);
368
+ }
369
+ debounceFrameEvents(debouncedTrigger, 32, iframeId);
370
+ }
371
+
372
+ function startPageInfoMonitor() {
373
+ function setListener(type, func) {
374
+ function sendPageInfo() {
375
+ if (settings[id]) {
376
+ sendPageInfoToIframe(settings[id].iframe, id);
377
+ } else {
378
+ stop();
379
+ }
380
+ }
381
+ ['scroll', 'resize'].forEach(function (evt) {
382
+ log(id, type + evt + ' listener for sendPageInfo');
383
+ func(window, evt, sendPageInfo);
384
+ });
385
+ }
386
+
387
+ function stop() {
388
+ setListener('Remove ', removeEventListener);
389
+ }
390
+
391
+ function start() {
392
+ setListener('Add ', addEventListener);
393
+ }
394
+
395
+ var id = iframeId; // Create locally scoped copy of iFrame ID
396
+
397
+ start();
398
+
399
+ if (settings[id]) {
400
+ settings[id].stopPageInfo = stop;
401
+ }
402
+ }
403
+
404
+ function stopPageInfoMonitor() {
405
+ if (settings[iframeId] && settings[iframeId].stopPageInfo) {
406
+ settings[iframeId].stopPageInfo();
407
+ delete settings[iframeId].stopPageInfo;
408
+ }
409
+ }
410
+
411
+ function checkIFrameExists() {
412
+ var retBool = true;
413
+
414
+ if (null === messageData.iframe) {
415
+ warn(iframeId, 'IFrame (' + messageData.id + ') not found');
416
+ retBool = false;
417
+ }
418
+ return retBool
419
+ }
420
+
421
+ function getElementPosition(target) {
422
+ var iFramePosition = target.getBoundingClientRect();
423
+
424
+ getPagePosition(iframeId);
425
+
426
+ return {
427
+ x: Math.floor(Number(iFramePosition.left) + Number(pagePosition.x)),
428
+ y: Math.floor(Number(iFramePosition.top) + Number(pagePosition.y))
429
+ }
430
+ }
431
+
432
+ function scrollRequestFromChild(addOffset) {
433
+ /* istanbul ignore next */ // Not testable in Karma
434
+ function reposition() {
435
+ pagePosition = newPosition;
436
+ scrollTo();
437
+ log(iframeId, '--');
438
+ }
439
+
440
+ function calcOffset() {
441
+ return {
442
+ x: Number(messageData.width) + offset.x,
443
+ y: Number(messageData.height) + offset.y
444
+ }
445
+ }
446
+
447
+ function scrollParent() {
448
+ if (window.parentIFrame) {
449
+ window.parentIFrame['scrollTo' + (addOffset ? 'Offset' : '')](
450
+ newPosition.x,
451
+ newPosition.y
452
+ );
453
+ } else {
454
+ warn(
455
+ iframeId,
456
+ 'Unable to scroll to requested position, window.parentIFrame not found'
457
+ );
458
+ }
459
+ }
460
+
461
+ var offset = addOffset
462
+ ? getElementPosition(messageData.iframe)
463
+ : { x: 0, y: 0 },
464
+ newPosition = calcOffset();
465
+
466
+ log(
467
+ iframeId,
468
+ 'Reposition requested from iFrame (offset x:' +
469
+ offset.x +
470
+ ' y:' +
471
+ offset.y +
472
+ ')'
473
+ );
474
+
475
+ if (window.top === window.self) {
476
+ reposition();
477
+ } else {
478
+ scrollParent();
479
+ }
480
+ }
481
+
482
+ function scrollTo() {
483
+ if (false === on('onScroll', pagePosition)) {
484
+ unsetPagePosition();
485
+ } else {
486
+ setPagePosition(iframeId);
487
+ }
488
+ }
489
+
490
+ function findTarget(location) {
491
+ function jumpToTarget() {
492
+ var jumpPosition = getElementPosition(target);
493
+
494
+ log(
495
+ iframeId,
496
+ 'Moving to in page link (#' +
497
+ hash +
498
+ ') at x: ' +
499
+ jumpPosition.x +
500
+ ' y: ' +
501
+ jumpPosition.y
502
+ );
503
+ pagePosition = {
504
+ x: jumpPosition.x,
505
+ y: jumpPosition.y
506
+ };
507
+
508
+ scrollTo();
509
+ log(iframeId, '--');
510
+ }
511
+
512
+ function jumpToParent() {
513
+ if (window.parentIFrame) {
514
+ window.parentIFrame.moveToAnchor(hash);
515
+ } else {
516
+ log(
517
+ iframeId,
518
+ 'In page link #' +
519
+ hash +
520
+ ' not found and window.parentIFrame not found'
521
+ );
522
+ }
523
+ }
524
+
525
+ var hash = location.split('#')[1] || '',
526
+ hashData = decodeURIComponent(hash),
527
+ target =
528
+ document.getElementById(hashData) ||
529
+ document.getElementsByName(hashData)[0];
530
+
531
+ if (target) {
532
+ jumpToTarget();
533
+ } else if (window.top === window.self) {
534
+ log(iframeId, 'In page link #' + hash + ' not found');
535
+ } else {
536
+ jumpToParent();
537
+ }
538
+ }
539
+
540
+ function onMouse(event) {
541
+ var mousePos = {};
542
+
543
+ if (Number(messageData.width) === 0 && Number(messageData.height) === 0) {
544
+ var data = getMsgBody(9).split(':');
545
+ mousePos = {
546
+ x: data[1],
547
+ y: data[0]
548
+ };
549
+ } else {
550
+ mousePos = {
551
+ x: messageData.width,
552
+ y: messageData.height
553
+ };
554
+ }
555
+
556
+ on(event, {
557
+ iframe: messageData.iframe,
558
+ screenX: Number(mousePos.x),
559
+ screenY: Number(mousePos.y),
560
+ type: messageData.type
561
+ });
562
+ }
563
+
564
+ function on(funcName, val) {
565
+ return chkEvent(iframeId, funcName, val)
566
+ }
567
+
568
+ function actionMsg() {
569
+ if (settings[iframeId] && settings[iframeId].firstRun) firstRun();
570
+
571
+ switch (messageData.type) {
572
+ case 'close': {
573
+ closeIFrame(messageData.iframe);
574
+ break
575
+ }
576
+
577
+ case 'message': {
578
+ forwardMsgFromIFrame(getMsgBody(6));
579
+ break
580
+ }
581
+
582
+ case 'mouseenter': {
583
+ onMouse('onMouseEnter');
584
+ break
585
+ }
586
+
587
+ case 'mouseleave': {
588
+ onMouse('onMouseLeave');
589
+ break
590
+ }
591
+
592
+ case 'autoResize': {
593
+ settings[iframeId].autoResize = JSON.parse(getMsgBody(9));
594
+ break
595
+ }
596
+
597
+ case 'scrollTo': {
598
+ scrollRequestFromChild(false);
599
+ break
600
+ }
601
+
602
+ case 'scrollToOffset': {
603
+ scrollRequestFromChild(true);
604
+ break
605
+ }
606
+
607
+ case 'pageInfo': {
608
+ sendPageInfoToIframe(
609
+ settings[iframeId] && settings[iframeId].iframe,
610
+ iframeId
611
+ );
612
+ startPageInfoMonitor();
613
+ break
614
+ }
615
+
616
+ case 'pageInfoStop': {
617
+ stopPageInfoMonitor();
618
+ break
619
+ }
620
+
621
+ case 'inPageLink': {
622
+ findTarget(getMsgBody(9));
623
+ break
624
+ }
625
+
626
+ case 'reset': {
627
+ resetIFrame(messageData);
628
+ break
629
+ }
630
+
631
+ case 'init': {
632
+ resizeIFrame();
633
+ on('onInit', messageData.iframe);
634
+ break
635
+ }
636
+
637
+ default: {
638
+ if (
639
+ Number(messageData.width) === 0 &&
640
+ Number(messageData.height) === 0
641
+ ) {
642
+ warn(
643
+ 'Unsupported message received (' +
644
+ messageData.type +
645
+ '), this is likely due to the iframe containing a later ' +
646
+ 'version of iframe-resizer than the parent page'
647
+ );
648
+ } else {
649
+ resizeIFrame();
650
+ }
651
+ }
652
+ }
653
+ }
654
+
655
+ function hasSettings(iframeId) {
656
+ var retBool = true;
657
+
658
+ if (!settings[iframeId]) {
659
+ retBool = false;
660
+ warn(
661
+ messageData.type +
662
+ ' No settings for ' +
663
+ iframeId +
664
+ '. Message was: ' +
665
+ msg
666
+ );
667
+ }
668
+
669
+ return retBool
670
+ }
671
+
672
+ function iFrameReadyMsgReceived() {
673
+ // eslint-disable-next-line no-restricted-syntax, guard-for-in
674
+ for (var iframeId in settings) {
675
+ trigger(
676
+ 'iFrame requested init',
677
+ createOutgoingMsg(iframeId),
678
+ settings[iframeId].iframe,
679
+ iframeId
680
+ );
681
+ }
682
+ }
683
+
684
+ function firstRun() {
685
+ if (settings[iframeId]) {
686
+ settings[iframeId].firstRun = false;
687
+ }
688
+ }
689
+
690
+ var msg = event.data,
691
+ messageData = {},
692
+ iframeId = null;
693
+
694
+ if ('[iFrameResizerChild]Ready' === msg) {
695
+ iFrameReadyMsgReceived();
696
+ } else if (isMessageForUs()) {
697
+ messageData = processMsg();
698
+ iframeId = messageData.id;
699
+ if (settings[iframeId]) {
700
+ settings[iframeId].loaded = true;
701
+ }
702
+
703
+ if (!isMessageFromMetaParent() && hasSettings(iframeId)) {
704
+ log(iframeId, 'Received: ' + msg);
705
+
706
+ if (checkIFrameExists() && isMessageFromIFrame()) {
707
+ actionMsg();
708
+ }
709
+ }
710
+ } else {
711
+ info(iframeId, 'Ignored: ' + msg);
712
+ }
713
+ }
714
+
715
+ function chkEvent(iframeId, funcName, val) {
716
+ var func = null,
717
+ retVal = null;
718
+
719
+ if (settings[iframeId]) {
720
+ func = settings[iframeId][funcName];
721
+
722
+ if ('function' === typeof func) {
723
+ retVal = func(val);
724
+ } else {
725
+ throw new TypeError(
726
+ funcName + ' on iFrame[' + iframeId + '] is not a function'
727
+ )
728
+ }
729
+ }
730
+
731
+ return retVal
732
+ }
733
+
734
+ function removeIframeListeners(iframe) {
735
+ var iframeId = iframe.id;
736
+ delete settings[iframeId];
737
+ }
738
+
739
+ function closeIFrame(iframe) {
740
+ var iframeId = iframe.id;
741
+ if (chkEvent(iframeId, 'onClose', iframeId) === false) {
742
+ log(iframeId, 'Close iframe cancelled by onClose event');
743
+ return
744
+ }
745
+ log(iframeId, 'Removing iFrame: ' + iframeId);
746
+
747
+ try {
748
+ // Catch race condition error with React
749
+ if (iframe.parentNode) {
750
+ iframe.parentNode.removeChild(iframe);
751
+ }
752
+ } catch (error) {
753
+ warn(error);
754
+ }
755
+
756
+ chkEvent(iframeId, 'onClosed', iframeId);
757
+ log(iframeId, '--');
758
+ removeIframeListeners(iframe);
759
+ if (destroyObserver) {
760
+ destroyObserver.disconnect();
761
+ destroyObserver = null;
762
+ }
763
+ }
764
+
765
+ function getPagePosition(iframeId) {
766
+ if (null === pagePosition) {
767
+ pagePosition = {
768
+ x:
769
+ window.pageXOffset === undefined$1
770
+ ? document.documentElement.scrollLeft
771
+ : window.pageXOffset,
772
+ y:
773
+ window.pageYOffset === undefined$1
774
+ ? document.documentElement.scrollTop
775
+ : window.pageYOffset
776
+ };
777
+ log(
778
+ iframeId,
779
+ 'Get page position: ' + pagePosition.x + ',' + pagePosition.y
780
+ );
781
+ }
782
+ }
783
+
784
+ function setPagePosition(iframeId) {
785
+ if (null !== pagePosition) {
786
+ window.scrollTo(pagePosition.x, pagePosition.y);
787
+ log(
788
+ iframeId,
789
+ 'Set page position: ' + pagePosition.x + ',' + pagePosition.y
790
+ );
791
+ unsetPagePosition();
792
+ }
793
+ }
794
+
795
+ function unsetPagePosition() {
796
+ pagePosition = null;
797
+ }
798
+
799
+ function resetIFrame(messageData) {
800
+ function reset() {
801
+ setSize(messageData);
802
+ trigger('reset', 'reset', messageData.iframe, messageData.id);
803
+ }
804
+
805
+ log(
806
+ messageData.id,
807
+ 'Size reset requested by ' +
808
+ ('init' === messageData.type ? 'host page' : 'iFrame')
809
+ );
810
+ getPagePosition(messageData.id);
811
+ syncResize(reset, messageData, 'reset');
812
+ }
813
+
814
+ function setSize(messageData) {
815
+ function setDimension(dimension) {
816
+ if (!messageData.id) {
817
+ log('undefined', 'messageData id not set');
818
+ return
819
+ }
820
+ messageData.iframe.style[dimension] = messageData[dimension] + 'px';
821
+ log(
822
+ messageData.id,
823
+ 'IFrame (' +
824
+ iframeId +
825
+ ') ' +
826
+ dimension +
827
+ ' set to ' +
828
+ messageData[dimension] +
829
+ 'px'
830
+ );
831
+ }
832
+
833
+ function chkZero(dimension) {
834
+ // FireFox sets dimension of hidden iFrames to zero.
835
+ // So if we detect that set up an event to check for
836
+ // when iFrame becomes visible.
837
+
838
+ /* istanbul ignore next */ // Not testable in PhantomJS
839
+ if (!hiddenCheckEnabled && '0' === messageData[dimension]) {
840
+ hiddenCheckEnabled = true;
841
+ log(iframeId, 'Hidden iFrame detected, creating visibility listener');
842
+ fixHiddenIFrames();
843
+ }
844
+ }
845
+
846
+ function processDimension(dimension) {
847
+ setDimension(dimension);
848
+ chkZero(dimension);
849
+ }
850
+
851
+ var iframeId = messageData.iframe.id;
852
+
853
+ if (settings[iframeId]) {
854
+ if (settings[iframeId].sizeHeight) {
855
+ processDimension('height');
856
+ }
857
+ if (settings[iframeId].sizeWidth) {
858
+ processDimension('width');
859
+ }
860
+ }
861
+ }
862
+
863
+ function syncResize(func, messageData, doNotSync) {
864
+ /* istanbul ignore if */ // Not testable in PhantomJS
865
+ if (
866
+ doNotSync !== messageData.type &&
867
+ requestAnimationFrame &&
868
+ // including check for jasmine because had trouble getting spy to work in unit test using requestAnimationFrame
869
+ !window.jasmine
870
+ ) {
871
+ log(messageData.id, 'Requesting animation frame');
872
+ requestAnimationFrame(func);
873
+ } else {
874
+ func();
875
+ }
876
+ }
877
+
878
+ function trigger(calleeMsg, msg, iframe, id, noResponseWarning) {
879
+ function postMessageToIFrame() {
880
+ var target = settings[id] && settings[id].targetOrigin;
881
+ log(
882
+ id,
883
+ '[' +
884
+ calleeMsg +
885
+ '] Sending msg to iframe[' +
886
+ id +
887
+ '] (' +
888
+ msg +
889
+ ') targetOrigin: ' +
890
+ target
891
+ );
892
+ iframe.contentWindow.postMessage(msgId + msg, target);
893
+ }
894
+
895
+ function iFrameNotFound() {
896
+ warn(id, '[' + calleeMsg + '] IFrame(' + id + ') not found');
897
+ }
898
+
899
+ function chkAndSend() {
900
+ if (
901
+ iframe &&
902
+ 'contentWindow' in iframe &&
903
+ null !== iframe.contentWindow
904
+ ) {
905
+ // Null test for PhantomJS
906
+ postMessageToIFrame();
907
+ } else {
908
+ iFrameNotFound();
909
+ }
910
+ }
911
+
912
+ function warnOnNoResponse() {
913
+ function warning() {
914
+ if (settings[id] && !settings[id].loaded && !errorShown) {
915
+ errorShown = true;
916
+ warn(
917
+ id,
918
+ 'IFrame has not responded within ' +
919
+ settings[id].warningTimeout / 1000 +
920
+ ' seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning.'
921
+ );
922
+ }
923
+ }
924
+
925
+ if (
926
+ !!noResponseWarning &&
927
+ settings[id] &&
928
+ !!settings[id].warningTimeout
929
+ ) {
930
+ settings[id].msgTimeout = setTimeout(
931
+ warning,
932
+ settings[id].warningTimeout
933
+ );
934
+ }
935
+ }
936
+
937
+ var errorShown = false;
938
+
939
+ id = id || iframe.id;
940
+
941
+ if (settings[id]) {
942
+ chkAndSend();
943
+ warnOnNoResponse();
944
+ }
945
+ }
946
+
947
+ function createOutgoingMsg(iframeId) {
948
+ return (
949
+ iframeId +
950
+ ':' +
951
+ settings[iframeId].bodyMarginV1 +
952
+ ':' +
953
+ settings[iframeId].sizeWidth +
954
+ ':' +
955
+ settings[iframeId].log +
956
+ ':' +
957
+ settings[iframeId].interval +
958
+ ':' +
959
+ settings[iframeId].enablePublicMethods +
960
+ ':' +
961
+ settings[iframeId].autoResize +
962
+ ':' +
963
+ settings[iframeId].bodyMargin +
964
+ ':' +
965
+ settings[iframeId].heightCalculationMethod +
966
+ ':' +
967
+ settings[iframeId].bodyBackground +
968
+ ':' +
969
+ settings[iframeId].bodyPadding +
970
+ ':' +
971
+ settings[iframeId].tolerance +
972
+ ':' +
973
+ settings[iframeId].inPageLinks +
974
+ ':' +
975
+ settings[iframeId].resizeFrom +
976
+ ':' +
977
+ settings[iframeId].widthCalculationMethod +
978
+ ':' +
979
+ settings[iframeId].mouseEvents
980
+ )
981
+ }
982
+
983
+ function isNumber(value) {
984
+ return typeof value === 'number'
985
+ }
986
+
987
+ function setupIFrame(iframe, options) {
988
+ function setLimits() {
989
+ function addStyle(style) {
990
+ var styleValue = settings[iframeId][style];
991
+ if (Infinity !== styleValue && 0 !== styleValue) {
992
+ iframe.style[style] = isNumber(styleValue)
993
+ ? styleValue + 'px'
994
+ : styleValue;
995
+ log(iframeId, 'Set ' + style + ' = ' + iframe.style[style]);
996
+ }
997
+ }
998
+
999
+ function chkMinMax(dimension) {
1000
+ if (
1001
+ settings[iframeId]['min' + dimension] >
1002
+ settings[iframeId]['max' + dimension]
1003
+ ) {
1004
+ throw new Error(
1005
+ 'Value for min' +
1006
+ dimension +
1007
+ ' can not be greater than max' +
1008
+ dimension
1009
+ )
1010
+ }
1011
+ }
1012
+
1013
+ chkMinMax('Height');
1014
+ chkMinMax('Width');
1015
+
1016
+ addStyle('maxHeight');
1017
+ addStyle('minHeight');
1018
+ addStyle('maxWidth');
1019
+ addStyle('minWidth');
1020
+ }
1021
+
1022
+ function newId() {
1023
+ var id = (options && options.id) || defaults.id + count++;
1024
+ if (null !== document.getElementById(id)) {
1025
+ id += count++;
1026
+ }
1027
+ return id
1028
+ }
1029
+
1030
+ function ensureHasId(iframeId) {
1031
+ if (typeof iframeId !== 'string') {
1032
+ throw new TypeError('Invaild id for iFrame. Expected String')
1033
+ }
1034
+
1035
+ if ('' === iframeId) {
1036
+ // eslint-disable-next-line no-multi-assign
1037
+ iframe.id = iframeId = newId();
1038
+ logEnabled = (options || {}).log;
1039
+ log(
1040
+ iframeId,
1041
+ 'Added missing iframe ID: ' + iframeId + ' (' + iframe.src + ')'
1042
+ );
1043
+ }
1044
+
1045
+ return iframeId
1046
+ }
1047
+
1048
+ function setScrolling() {
1049
+ log(
1050
+ iframeId,
1051
+ 'IFrame scrolling ' +
1052
+ (settings[iframeId] && settings[iframeId].scrolling
1053
+ ? 'enabled'
1054
+ : 'disabled') +
1055
+ ' for ' +
1056
+ iframeId
1057
+ );
1058
+ iframe.style.overflow =
1059
+ false === (settings[iframeId] && settings[iframeId].scrolling)
1060
+ ? 'hidden'
1061
+ : 'auto';
1062
+ switch (settings[iframeId] && settings[iframeId].scrolling) {
1063
+ case 'omit': {
1064
+ break
1065
+ }
1066
+
1067
+ case true: {
1068
+ iframe.scrolling = 'yes';
1069
+ break
1070
+ }
1071
+
1072
+ case false: {
1073
+ iframe.scrolling = 'no';
1074
+ break
1075
+ }
1076
+
1077
+ default: {
1078
+ iframe.scrolling = settings[iframeId]
1079
+ ? settings[iframeId].scrolling
1080
+ : 'no';
1081
+ }
1082
+ }
1083
+ }
1084
+
1085
+ // The V1 iFrame script expects an int, where as in V2 expects a CSS
1086
+ // string value such as '1px 3em', so if we have an int for V2, set V1=V2
1087
+ // and then convert V2 to a string PX value.
1088
+ function setupBodyMarginValues() {
1089
+ if (
1090
+ 'number' ===
1091
+ typeof (settings[iframeId] && settings[iframeId].bodyMargin) ||
1092
+ '0' === (settings[iframeId] && settings[iframeId].bodyMargin)
1093
+ ) {
1094
+ settings[iframeId].bodyMarginV1 = settings[iframeId].bodyMargin;
1095
+ settings[iframeId].bodyMargin =
1096
+ '' + settings[iframeId].bodyMargin + 'px';
1097
+ }
1098
+ }
1099
+
1100
+ function checkReset() {
1101
+ // Reduce scope of firstRun to function, because IE8's JS execution
1102
+ // context stack is borked and this value gets externally
1103
+ // changed midway through running this function!!!
1104
+ var firstRun = settings[iframeId] && settings[iframeId].firstRun,
1105
+ resetRequertMethod =
1106
+ settings[iframeId] &&
1107
+ settings[iframeId].heightCalculationMethod in resetRequiredMethods;
1108
+
1109
+ if (!firstRun && resetRequertMethod) {
1110
+ resetIFrame({ iframe: iframe, height: 0, width: 0, type: 'init' });
1111
+ }
1112
+ }
1113
+
1114
+ function setupIFrameObject() {
1115
+ if (settings[iframeId]) {
1116
+ settings[iframeId].iframe.iFrameResizer = {
1117
+ close: closeIFrame.bind(null, settings[iframeId].iframe),
1118
+
1119
+ removeListeners: removeIframeListeners.bind(
1120
+ null,
1121
+ settings[iframeId].iframe
1122
+ ),
1123
+
1124
+ resize: trigger.bind(
1125
+ null,
1126
+ 'Window resize',
1127
+ 'resize',
1128
+ settings[iframeId].iframe
1129
+ ),
1130
+
1131
+ moveToAnchor: function (anchor) {
1132
+ trigger(
1133
+ 'Move to anchor',
1134
+ 'moveToAnchor:' + anchor,
1135
+ settings[iframeId].iframe,
1136
+ iframeId
1137
+ );
1138
+ },
1139
+
1140
+ sendMessage: function (message) {
1141
+ message = JSON.stringify(message);
1142
+ trigger(
1143
+ 'Send Message',
1144
+ 'message:' + message,
1145
+ settings[iframeId].iframe,
1146
+ iframeId
1147
+ );
1148
+ }
1149
+ };
1150
+ }
1151
+ }
1152
+
1153
+ // We have to call trigger twice, as we can not be sure if all
1154
+ // iframes have completed loading when this code runs. The
1155
+ // event listener also catches the page changing in the iFrame.
1156
+ function init(msg) {
1157
+ function iFrameLoaded() {
1158
+ trigger('iFrame.onload', msg, iframe, undefined$1, true);
1159
+ checkReset();
1160
+ }
1161
+
1162
+ function createDestroyObserver(MutationObserver) {
1163
+ if (!iframe.parentNode) {
1164
+ return null
1165
+ }
1166
+
1167
+ var destroyObserver = new MutationObserver(function (mutations) {
1168
+ mutations.forEach(function (mutation) {
1169
+ var removedNodes = Array.prototype.slice.call(mutation.removedNodes); // Transform NodeList into an Array
1170
+ removedNodes.forEach(function (removedNode) {
1171
+ if (removedNode === iframe) {
1172
+ closeIFrame(iframe);
1173
+ }
1174
+ });
1175
+ });
1176
+ });
1177
+ destroyObserver.observe(iframe.parentNode, {
1178
+ childList: true
1179
+ });
1180
+ return destroyObserver
1181
+ }
1182
+
1183
+ var MutationObserver = getMutationObserver();
1184
+ if (MutationObserver) {
1185
+ destroyObserver = createDestroyObserver(MutationObserver);
1186
+ }
1187
+
1188
+ addEventListener(iframe, 'load', iFrameLoaded);
1189
+ trigger('init', msg, iframe, undefined$1, true);
1190
+ }
1191
+
1192
+ function checkOptions(options) {
1193
+ if ('object' !== typeof options) {
1194
+ throw new TypeError('Options is not an object')
1195
+ }
1196
+ }
1197
+
1198
+ function copyOptions(options) {
1199
+ // eslint-disable-next-line no-restricted-syntax
1200
+ for (var option in defaults) {
1201
+ if (Object.prototype.hasOwnProperty.call(defaults, option)) {
1202
+ settings[iframeId][option] = Object.prototype.hasOwnProperty.call(
1203
+ options,
1204
+ option
1205
+ )
1206
+ ? options[option]
1207
+ : defaults[option];
1208
+ }
1209
+ }
1210
+ }
1211
+
1212
+ function getTargetOrigin(remoteHost) {
1213
+ return '' === remoteHost ||
1214
+ null !== remoteHost.match(/^(about:blank|javascript:|file:\/\/)/)
1215
+ ? '*'
1216
+ : remoteHost
1217
+ }
1218
+
1219
+ function depricate(key) {
1220
+ var splitName = key.split('Callback');
1221
+
1222
+ if (splitName.length === 2) {
1223
+ var name =
1224
+ 'on' + splitName[0].charAt(0).toUpperCase() + splitName[0].slice(1);
1225
+ this[name] = this[key];
1226
+ delete this[key];
1227
+ warn(
1228
+ iframeId,
1229
+ "Deprecated: '" +
1230
+ key +
1231
+ "' has been renamed '" +
1232
+ name +
1233
+ "'. The old method will be removed in the next major version."
1234
+ );
1235
+ }
1236
+ }
1237
+
1238
+ function processOptions(options) {
1239
+ options = options || {};
1240
+
1241
+ settings[iframeId] = Object.create(null); // Protect against prototype attacks
1242
+ settings[iframeId].iframe = iframe;
1243
+ settings[iframeId].firstRun = true;
1244
+ settings[iframeId].remoteHost =
1245
+ iframe.src && iframe.src.split('/').slice(0, 3).join('/');
1246
+
1247
+ checkOptions(options);
1248
+ Object.keys(options).forEach(depricate, options);
1249
+ copyOptions(options);
1250
+
1251
+ if (settings[iframeId]) {
1252
+ settings[iframeId].targetOrigin =
1253
+ true === settings[iframeId].checkOrigin
1254
+ ? getTargetOrigin(settings[iframeId].remoteHost)
1255
+ : '*';
1256
+ }
1257
+ }
1258
+
1259
+ function beenHere() {
1260
+ return iframeId in settings && 'iFrameResizer' in iframe
1261
+ }
1262
+
1263
+ var iframeId = ensureHasId(iframe.id);
1264
+
1265
+ if (beenHere()) {
1266
+ warn(iframeId, 'Ignored iFrame, already setup.');
1267
+ } else {
1268
+ processOptions(options);
1269
+ setScrolling();
1270
+ setLimits();
1271
+ setupBodyMarginValues();
1272
+ init(createOutgoingMsg(iframeId));
1273
+ setupIFrameObject();
1274
+ }
1275
+ }
1276
+
1277
+ function debouce(fn, time) {
1278
+ if (null === timer) {
1279
+ timer = setTimeout(function () {
1280
+ timer = null;
1281
+ fn();
1282
+ }, time);
1283
+ }
1284
+ }
1285
+
1286
+ var frameTimer = {};
1287
+ function debounceFrameEvents(fn, time, frameId) {
1288
+ if (!frameTimer[frameId]) {
1289
+ frameTimer[frameId] = setTimeout(function () {
1290
+ frameTimer[frameId] = null;
1291
+ fn();
1292
+ }, time);
1293
+ }
1294
+ }
1295
+
1296
+ // Not testable in PhantomJS
1297
+ /* istanbul ignore next */
1298
+
1299
+ function fixHiddenIFrames() {
1300
+ function checkIFrames() {
1301
+ function checkIFrame(settingId) {
1302
+ function chkDimension(dimension) {
1303
+ return (
1304
+ '0px' ===
1305
+ (settings[settingId] && settings[settingId].iframe.style[dimension])
1306
+ )
1307
+ }
1308
+
1309
+ function isVisible(el) {
1310
+ return null !== el.offsetParent
1311
+ }
1312
+
1313
+ if (
1314
+ settings[settingId] &&
1315
+ isVisible(settings[settingId].iframe) &&
1316
+ (chkDimension('height') || chkDimension('width'))
1317
+ ) {
1318
+ trigger(
1319
+ 'Visibility change',
1320
+ 'resize',
1321
+ settings[settingId].iframe,
1322
+ settingId
1323
+ );
1324
+ }
1325
+ }
1326
+
1327
+ Object.keys(settings).forEach(function (key) {
1328
+ checkIFrame(key);
1329
+ });
1330
+ }
1331
+
1332
+ function mutationObserved(mutations) {
1333
+ log(
1334
+ 'window',
1335
+ 'Mutation observed: ' + mutations[0].target + ' ' + mutations[0].type
1336
+ );
1337
+ debouce(checkIFrames, 16);
1338
+ }
1339
+
1340
+ function createMutationObserver() {
1341
+ var target = document.querySelector('body'),
1342
+ config = {
1343
+ attributes: true,
1344
+ attributeOldValue: false,
1345
+ characterData: true,
1346
+ characterDataOldValue: false,
1347
+ childList: true,
1348
+ subtree: true
1349
+ },
1350
+ observer = new MutationObserver(mutationObserved);
1351
+
1352
+ observer.observe(target, config);
1353
+ }
1354
+
1355
+ var MutationObserver = getMutationObserver();
1356
+ if (MutationObserver) {
1357
+ createMutationObserver();
1358
+ }
1359
+ }
1360
+
1361
+ function resizeIFrames(event) {
1362
+ function resize() {
1363
+ sendTriggerMsg('Window ' + event, 'resize');
1364
+ }
1365
+
1366
+ log('window', 'Trigger event: ' + event);
1367
+ debouce(resize, 16);
1368
+ }
1369
+
1370
+ // Not testable in PhantomJS
1371
+ /* istanbul ignore next */
1372
+ function tabVisible() {
1373
+ function resize() {
1374
+ sendTriggerMsg('Tab Visible', 'resize');
1375
+ }
1376
+
1377
+ if ('hidden' !== document.visibilityState) {
1378
+ log('document', 'Trigger event: Visibility change');
1379
+ debouce(resize, 16);
1380
+ }
1381
+ }
1382
+
1383
+ function sendTriggerMsg(eventName, event) {
1384
+ function isIFrameResizeEnabled(iframeId) {
1385
+ return (
1386
+ settings[iframeId] &&
1387
+ 'parent' === settings[iframeId].resizeFrom &&
1388
+ settings[iframeId].autoResize &&
1389
+ !settings[iframeId].firstRun
1390
+ )
1391
+ }
1392
+
1393
+ Object.keys(settings).forEach(function (iframeId) {
1394
+ if (isIFrameResizeEnabled(iframeId)) {
1395
+ trigger(eventName, event, settings[iframeId].iframe, iframeId);
1396
+ }
1397
+ });
1398
+ }
1399
+
1400
+ function setupEventListeners() {
1401
+ addEventListener(window, 'message', iFrameListener);
1402
+
1403
+ addEventListener(window, 'resize', function () {
1404
+ resizeIFrames('resize');
1405
+ });
1406
+
1407
+ addEventListener(document, 'visibilitychange', tabVisible);
1408
+
1409
+ addEventListener(document, '-webkit-visibilitychange', tabVisible);
1410
+ }
1411
+
1412
+ function factory() {
1413
+ function init(options, element) {
1414
+ function chkType() {
1415
+ if (!element.tagName) {
1416
+ throw new TypeError('Object is not a valid DOM element')
1417
+ } else if ('IFRAME' !== element.tagName.toUpperCase()) {
1418
+ throw new TypeError(
1419
+ 'Expected <IFRAME> tag, found <' + element.tagName + '>'
1420
+ )
1421
+ }
1422
+ }
1423
+
1424
+ if (element) {
1425
+ chkType();
1426
+ setupIFrame(element, options);
1427
+ iFrames.push(element);
1428
+ }
1429
+ }
1430
+
1431
+ function warnDeprecatedOptions(options) {
1432
+ if (options && options.enablePublicMethods) {
1433
+ warn(
1434
+ 'enablePublicMethods option has been removed, public methods are now always available in the iFrame'
1435
+ );
1436
+ }
1437
+ }
1438
+
1439
+ var iFrames;
1440
+
1441
+ setupRequestAnimationFrame();
1442
+ setupEventListeners();
1443
+
1444
+ return function iFrameResizeF(options, target) {
1445
+ iFrames = []; // Only return iFrames past in on this call
1446
+
1447
+ warnDeprecatedOptions(options);
1448
+
1449
+ switch (typeof target) {
1450
+ case 'undefined':
1451
+ case 'string': {
1452
+ Array.prototype.forEach.call(
1453
+ document.querySelectorAll(target || 'iframe'),
1454
+ init.bind(undefined$1, options)
1455
+ );
1456
+ break
1457
+ }
1458
+
1459
+ case 'object': {
1460
+ init(options, target);
1461
+ break
1462
+ }
1463
+
1464
+ default: {
1465
+ throw new TypeError('Unexpected data type (' + typeof target + ')')
1466
+ }
1467
+ }
1468
+
1469
+ return iFrames
1470
+ }
1471
+ }
1472
+
1473
+ function createJQueryPublicMethod($) {
1474
+ if (!$.fn) {
1475
+ info('', 'Unable to bind to jQuery, it is not fully loaded.');
1476
+ } else if (!$.fn.iFrameResize) {
1477
+ $.fn.iFrameResize = function $iFrameResizeF(options) {
1478
+ function init(index, element) {
1479
+ setupIFrame(element, options);
1480
+ }
1481
+
1482
+ return this.filter('iframe').each(init).end()
1483
+ };
1484
+ }
1485
+ }
1486
+
1487
+ if (window.jQuery !== undefined$1) {
1488
+ createJQueryPublicMethod(window.jQuery);
1489
+ }
1490
+
1491
+ if (typeof undefined$1 === 'function' && undefined$1.amd) {
1492
+ undefined$1([], factory);
1493
+ } else {
1494
+ // Node for browserfy
1495
+ module.exports = factory();
1496
+ }
1497
+ window.iFrameResize = window.iFrameResize || factory();
1498
+ })();
1499
+ });
1500
+
1501
+ var iframeResizer_contentWindow = _commonjsHelpers.createCommonjsModule(function (module) {
1502
+ (function (undefined$1) {
1503
+ if (typeof window === 'undefined') return // don't run for server side render
1504
+
1505
+ var autoResize = true,
1506
+ base = 10,
1507
+ bodyBackground = '',
1508
+ bodyMargin = 0,
1509
+ bodyMarginStr = '',
1510
+ bodyObserver = null,
1511
+ bodyPadding = '',
1512
+ calculateWidth = false,
1513
+ doubleEventList = { resize: 1, click: 1 },
1514
+ eventCancelTimer = 128,
1515
+ firstRun = true,
1516
+ height = 1,
1517
+ heightCalcModeDefault = 'bodyOffset',
1518
+ heightCalcMode = heightCalcModeDefault,
1519
+ initLock = true,
1520
+ initMsg = '',
1521
+ inPageLinks = {},
1522
+ interval = 32,
1523
+ intervalTimer = null,
1524
+ logging = false,
1525
+ mouseEvents = false,
1526
+ msgID = '[iFrameSizer]', // Must match host page msg ID
1527
+ msgIdLen = msgID.length,
1528
+ myID = '',
1529
+ resetRequiredMethods = {
1530
+ max: 1,
1531
+ min: 1,
1532
+ bodyScroll: 1,
1533
+ documentElementScroll: 1
1534
+ },
1535
+ resizeFrom = 'child',
1536
+ target = window.parent,
1537
+ targetOriginDefault = '*',
1538
+ tolerance = 0,
1539
+ triggerLocked = false,
1540
+ triggerLockedTimer = null,
1541
+ throttledTimer = 16,
1542
+ width = 1,
1543
+ widthCalcModeDefault = 'scroll',
1544
+ widthCalcMode = widthCalcModeDefault,
1545
+ win = window,
1546
+ onMessage = function () {
1547
+ warn('onMessage function not defined');
1548
+ },
1549
+ onReady = function () {},
1550
+ onPageInfo = function () {},
1551
+ customCalcMethods = {
1552
+ height: function () {
1553
+ warn('Custom height calculation function not defined');
1554
+ return document.documentElement.offsetHeight
1555
+ },
1556
+ width: function () {
1557
+ warn('Custom width calculation function not defined');
1558
+ return document.body.scrollWidth
1559
+ }
1560
+ },
1561
+ eventHandlersByName = {},
1562
+ passiveSupported = false;
1563
+
1564
+ function noop() {}
1565
+
1566
+ try {
1567
+ var options = Object.create(
1568
+ {},
1569
+ {
1570
+ passive: {
1571
+ // eslint-disable-next-line getter-return
1572
+ get: function () {
1573
+ passiveSupported = true;
1574
+ }
1575
+ }
1576
+ }
1577
+ );
1578
+ window.addEventListener('test', noop, options);
1579
+ window.removeEventListener('test', noop, options);
1580
+ } catch (error) {
1581
+ /* */
1582
+ }
1583
+
1584
+ function addEventListener(el, evt, func, options) {
1585
+ el.addEventListener(evt, func, passiveSupported ? options || {} : false);
1586
+ }
1587
+
1588
+ function removeEventListener(el, evt, func) {
1589
+ el.removeEventListener(evt, func, false);
1590
+ }
1591
+
1592
+ function capitalizeFirstLetter(string) {
1593
+ return string.charAt(0).toUpperCase() + string.slice(1)
1594
+ }
1595
+
1596
+ // Based on underscore.js
1597
+ function throttle(func) {
1598
+ var context,
1599
+ args,
1600
+ result,
1601
+ timeout = null,
1602
+ previous = 0,
1603
+ later = function () {
1604
+ previous = Date.now();
1605
+ timeout = null;
1606
+ result = func.apply(context, args);
1607
+ if (!timeout) {
1608
+ // eslint-disable-next-line no-multi-assign
1609
+ context = args = null;
1610
+ }
1611
+ };
1612
+
1613
+ return function () {
1614
+ var now = Date.now();
1615
+
1616
+ if (!previous) {
1617
+ previous = now;
1618
+ }
1619
+
1620
+ var remaining = throttledTimer - (now - previous);
1621
+
1622
+ context = this;
1623
+ args = arguments;
1624
+
1625
+ if (remaining <= 0 || remaining > throttledTimer) {
1626
+ if (timeout) {
1627
+ clearTimeout(timeout);
1628
+ timeout = null;
1629
+ }
1630
+
1631
+ previous = now;
1632
+ result = func.apply(context, args);
1633
+
1634
+ if (!timeout) {
1635
+ // eslint-disable-next-line no-multi-assign
1636
+ context = args = null;
1637
+ }
1638
+ } else if (!timeout) {
1639
+ timeout = setTimeout(later, remaining);
1640
+ }
1641
+
1642
+ return result
1643
+ }
1644
+ }
1645
+
1646
+ function formatLogMsg(msg) {
1647
+ return msgID + '[' + myID + '] ' + msg
1648
+ }
1649
+
1650
+ function log(msg) {
1651
+ if (logging && 'object' === typeof window.console) {
1652
+ // eslint-disable-next-line no-console
1653
+ console.log(formatLogMsg(msg));
1654
+ }
1655
+ }
1656
+
1657
+ function warn(msg) {
1658
+ if ('object' === typeof window.console) {
1659
+ // eslint-disable-next-line no-console
1660
+ console.warn(formatLogMsg(msg));
1661
+ }
1662
+ }
1663
+
1664
+ function init() {
1665
+ readDataFromParent();
1666
+ log('Initialising iFrame (' + window.location.href + ')');
1667
+ readDataFromPage();
1668
+ setMargin();
1669
+ setBodyStyle('background', bodyBackground);
1670
+ setBodyStyle('padding', bodyPadding);
1671
+ injectClearFixIntoBodyElement();
1672
+ checkHeightMode();
1673
+ checkWidthMode();
1674
+ stopInfiniteResizingOfIFrame();
1675
+ setupPublicMethods();
1676
+ setupMouseEvents();
1677
+ startEventListeners();
1678
+ inPageLinks = setupInPageLinks();
1679
+ sendSize('init', 'Init message from host page');
1680
+ onReady();
1681
+ }
1682
+
1683
+ function readDataFromParent() {
1684
+ function strBool(str) {
1685
+ return 'true' === str
1686
+ }
1687
+
1688
+ var data = initMsg.slice(msgIdLen).split(':');
1689
+
1690
+ myID = data[0];
1691
+ bodyMargin = undefined$1 === data[1] ? bodyMargin : Number(data[1]); // For V1 compatibility
1692
+ calculateWidth = undefined$1 === data[2] ? calculateWidth : strBool(data[2]);
1693
+ logging = undefined$1 === data[3] ? logging : strBool(data[3]);
1694
+ interval = undefined$1 === data[4] ? interval : Number(data[4]);
1695
+ autoResize = undefined$1 === data[6] ? autoResize : strBool(data[6]);
1696
+ bodyMarginStr = data[7];
1697
+ heightCalcMode = undefined$1 === data[8] ? heightCalcMode : data[8];
1698
+ bodyBackground = data[9];
1699
+ bodyPadding = data[10];
1700
+ tolerance = undefined$1 === data[11] ? tolerance : Number(data[11]);
1701
+ inPageLinks.enable = undefined$1 === data[12] ? false : strBool(data[12]);
1702
+ resizeFrom = undefined$1 === data[13] ? resizeFrom : data[13];
1703
+ widthCalcMode = undefined$1 === data[14] ? widthCalcMode : data[14];
1704
+ mouseEvents = undefined$1 === data[15] ? mouseEvents : strBool(data[15]);
1705
+ }
1706
+
1707
+ function depricate(key) {
1708
+ var splitName = key.split('Callback');
1709
+
1710
+ if (splitName.length === 2) {
1711
+ var name =
1712
+ 'on' + splitName[0].charAt(0).toUpperCase() + splitName[0].slice(1);
1713
+ this[name] = this[key];
1714
+ delete this[key];
1715
+ warn(
1716
+ "Deprecated: '" +
1717
+ key +
1718
+ "' has been renamed '" +
1719
+ name +
1720
+ "'. The old method will be removed in the next major version."
1721
+ );
1722
+ }
1723
+ }
1724
+
1725
+ function readDataFromPage() {
1726
+ function readData() {
1727
+ var data = window.iFrameResizer;
1728
+
1729
+ log('Reading data from page: ' + JSON.stringify(data));
1730
+ Object.keys(data).forEach(depricate, data);
1731
+
1732
+ onMessage = 'onMessage' in data ? data.onMessage : onMessage;
1733
+ onReady = 'onReady' in data ? data.onReady : onReady;
1734
+ targetOriginDefault =
1735
+ 'targetOrigin' in data ? data.targetOrigin : targetOriginDefault;
1736
+ heightCalcMode =
1737
+ 'heightCalculationMethod' in data
1738
+ ? data.heightCalculationMethod
1739
+ : heightCalcMode;
1740
+ widthCalcMode =
1741
+ 'widthCalculationMethod' in data
1742
+ ? data.widthCalculationMethod
1743
+ : widthCalcMode;
1744
+ }
1745
+
1746
+ function setupCustomCalcMethods(calcMode, calcFunc) {
1747
+ if ('function' === typeof calcMode) {
1748
+ log('Setup custom ' + calcFunc + 'CalcMethod');
1749
+ customCalcMethods[calcFunc] = calcMode;
1750
+ calcMode = 'custom';
1751
+ }
1752
+
1753
+ return calcMode
1754
+ }
1755
+
1756
+ if (
1757
+ 'iFrameResizer' in window &&
1758
+ Object === window.iFrameResizer.constructor
1759
+ ) {
1760
+ readData();
1761
+ heightCalcMode = setupCustomCalcMethods(heightCalcMode, 'height');
1762
+ widthCalcMode = setupCustomCalcMethods(widthCalcMode, 'width');
1763
+ }
1764
+
1765
+ log('TargetOrigin for parent set to: ' + targetOriginDefault);
1766
+ }
1767
+
1768
+ function chkCSS(attr, value) {
1769
+ if (-1 !== value.indexOf('-')) {
1770
+ warn('Negative CSS value ignored for ' + attr);
1771
+ value = '';
1772
+ }
1773
+ return value
1774
+ }
1775
+
1776
+ function setBodyStyle(attr, value) {
1777
+ if (undefined$1 !== value && '' !== value && 'null' !== value) {
1778
+ document.body.style[attr] = value;
1779
+ log('Body ' + attr + ' set to "' + value + '"');
1780
+ }
1781
+ }
1782
+
1783
+ function setMargin() {
1784
+ // If called via V1 script, convert bodyMargin from int to str
1785
+ if (undefined$1 === bodyMarginStr) {
1786
+ bodyMarginStr = bodyMargin + 'px';
1787
+ }
1788
+
1789
+ setBodyStyle('margin', chkCSS('margin', bodyMarginStr));
1790
+ }
1791
+
1792
+ function stopInfiniteResizingOfIFrame() {
1793
+ document.documentElement.style.height = '';
1794
+ document.body.style.height = '';
1795
+ log('HTML & body height set to "auto"');
1796
+ }
1797
+
1798
+ function manageTriggerEvent(options) {
1799
+ var listener = {
1800
+ add: function (eventName) {
1801
+ function handleEvent() {
1802
+ sendSize(options.eventName, options.eventType);
1803
+ }
1804
+
1805
+ eventHandlersByName[eventName] = handleEvent;
1806
+
1807
+ addEventListener(window, eventName, handleEvent, { passive: true });
1808
+ },
1809
+ remove: function (eventName) {
1810
+ var handleEvent = eventHandlersByName[eventName];
1811
+ delete eventHandlersByName[eventName];
1812
+
1813
+ removeEventListener(window, eventName, handleEvent);
1814
+ }
1815
+ };
1816
+
1817
+ if (options.eventNames && Array.prototype.map) {
1818
+ options.eventName = options.eventNames[0];
1819
+ options.eventNames.map(listener[options.method]);
1820
+ } else {
1821
+ listener[options.method](options.eventName);
1822
+ }
1823
+
1824
+ log(
1825
+ capitalizeFirstLetter(options.method) +
1826
+ ' event listener: ' +
1827
+ options.eventType
1828
+ );
1829
+ }
1830
+
1831
+ function manageEventListeners(method) {
1832
+ manageTriggerEvent({
1833
+ method: method,
1834
+ eventType: 'Animation Start',
1835
+ eventNames: ['animationstart', 'webkitAnimationStart']
1836
+ });
1837
+ manageTriggerEvent({
1838
+ method: method,
1839
+ eventType: 'Animation Iteration',
1840
+ eventNames: ['animationiteration', 'webkitAnimationIteration']
1841
+ });
1842
+ manageTriggerEvent({
1843
+ method: method,
1844
+ eventType: 'Animation End',
1845
+ eventNames: ['animationend', 'webkitAnimationEnd']
1846
+ });
1847
+ manageTriggerEvent({
1848
+ method: method,
1849
+ eventType: 'Input',
1850
+ eventName: 'input'
1851
+ });
1852
+ manageTriggerEvent({
1853
+ method: method,
1854
+ eventType: 'Mouse Up',
1855
+ eventName: 'mouseup'
1856
+ });
1857
+ manageTriggerEvent({
1858
+ method: method,
1859
+ eventType: 'Mouse Down',
1860
+ eventName: 'mousedown'
1861
+ });
1862
+ manageTriggerEvent({
1863
+ method: method,
1864
+ eventType: 'Orientation Change',
1865
+ eventName: 'orientationchange'
1866
+ });
1867
+ manageTriggerEvent({
1868
+ method: method,
1869
+ eventType: 'Print',
1870
+ eventNames: ['afterprint', 'beforeprint']
1871
+ });
1872
+ manageTriggerEvent({
1873
+ method: method,
1874
+ eventType: 'Ready State Change',
1875
+ eventName: 'readystatechange'
1876
+ });
1877
+ manageTriggerEvent({
1878
+ method: method,
1879
+ eventType: 'Touch Start',
1880
+ eventName: 'touchstart'
1881
+ });
1882
+ manageTriggerEvent({
1883
+ method: method,
1884
+ eventType: 'Touch End',
1885
+ eventName: 'touchend'
1886
+ });
1887
+ manageTriggerEvent({
1888
+ method: method,
1889
+ eventType: 'Touch Cancel',
1890
+ eventName: 'touchcancel'
1891
+ });
1892
+ manageTriggerEvent({
1893
+ method: method,
1894
+ eventType: 'Transition Start',
1895
+ eventNames: [
1896
+ 'transitionstart',
1897
+ 'webkitTransitionStart',
1898
+ 'MSTransitionStart',
1899
+ 'oTransitionStart',
1900
+ 'otransitionstart'
1901
+ ]
1902
+ });
1903
+ manageTriggerEvent({
1904
+ method: method,
1905
+ eventType: 'Transition Iteration',
1906
+ eventNames: [
1907
+ 'transitioniteration',
1908
+ 'webkitTransitionIteration',
1909
+ 'MSTransitionIteration',
1910
+ 'oTransitionIteration',
1911
+ 'otransitioniteration'
1912
+ ]
1913
+ });
1914
+ manageTriggerEvent({
1915
+ method: method,
1916
+ eventType: 'Transition End',
1917
+ eventNames: [
1918
+ 'transitionend',
1919
+ 'webkitTransitionEnd',
1920
+ 'MSTransitionEnd',
1921
+ 'oTransitionEnd',
1922
+ 'otransitionend'
1923
+ ]
1924
+ });
1925
+ if ('child' === resizeFrom) {
1926
+ manageTriggerEvent({
1927
+ method: method,
1928
+ eventType: 'IFrame Resized',
1929
+ eventName: 'resize'
1930
+ });
1931
+ }
1932
+ }
1933
+
1934
+ function checkCalcMode(calcMode, calcModeDefault, modes, type) {
1935
+ if (calcModeDefault !== calcMode) {
1936
+ if (!(calcMode in modes)) {
1937
+ warn(
1938
+ calcMode + ' is not a valid option for ' + type + 'CalculationMethod.'
1939
+ );
1940
+ calcMode = calcModeDefault;
1941
+ }
1942
+ log(type + ' calculation method set to "' + calcMode + '"');
1943
+ }
1944
+
1945
+ return calcMode
1946
+ }
1947
+
1948
+ function checkHeightMode() {
1949
+ heightCalcMode = checkCalcMode(
1950
+ heightCalcMode,
1951
+ heightCalcModeDefault,
1952
+ getHeight,
1953
+ 'height'
1954
+ );
1955
+ }
1956
+
1957
+ function checkWidthMode() {
1958
+ widthCalcMode = checkCalcMode(
1959
+ widthCalcMode,
1960
+ widthCalcModeDefault,
1961
+ getWidth,
1962
+ 'width'
1963
+ );
1964
+ }
1965
+
1966
+ function startEventListeners() {
1967
+ if (true === autoResize) {
1968
+ manageEventListeners('add');
1969
+ setupMutationObserver();
1970
+ } else {
1971
+ log('Auto Resize disabled');
1972
+ }
1973
+ }
1974
+
1975
+ // function stopMsgsToParent() {
1976
+ // log('Disable outgoing messages')
1977
+ // sendPermit = false
1978
+ // }
1979
+
1980
+ // function removeMsgListener() {
1981
+ // log('Remove event listener: Message')
1982
+ // removeEventListener(window, 'message', receiver)
1983
+ // }
1984
+
1985
+ function disconnectMutationObserver() {
1986
+ if (null !== bodyObserver) {
1987
+ /* istanbul ignore next */ // Not testable in PhantonJS
1988
+ bodyObserver.disconnect();
1989
+ }
1990
+ }
1991
+
1992
+ function stopEventListeners() {
1993
+ manageEventListeners('remove');
1994
+ disconnectMutationObserver();
1995
+ clearInterval(intervalTimer);
1996
+ }
1997
+
1998
+ // function teardown() {
1999
+ // stopMsgsToParent()
2000
+ // removeMsgListener()
2001
+ // if (true === autoResize) stopEventListeners()
2002
+ // }
2003
+
2004
+ function injectClearFixIntoBodyElement() {
2005
+ var clearFix = document.createElement('div');
2006
+ clearFix.style.clear = 'both';
2007
+ // Guard against the following having been globally redefined in CSS.
2008
+ clearFix.style.display = 'block';
2009
+ clearFix.style.height = '0';
2010
+ document.body.appendChild(clearFix);
2011
+ }
2012
+
2013
+ function setupInPageLinks() {
2014
+ function getPagePosition() {
2015
+ return {
2016
+ x:
2017
+ window.pageXOffset === undefined$1
2018
+ ? document.documentElement.scrollLeft
2019
+ : window.pageXOffset,
2020
+ y:
2021
+ window.pageYOffset === undefined$1
2022
+ ? document.documentElement.scrollTop
2023
+ : window.pageYOffset
2024
+ }
2025
+ }
2026
+
2027
+ function getElementPosition(el) {
2028
+ var elPosition = el.getBoundingClientRect(),
2029
+ pagePosition = getPagePosition();
2030
+
2031
+ return {
2032
+ x: parseInt(elPosition.left, 10) + parseInt(pagePosition.x, 10),
2033
+ y: parseInt(elPosition.top, 10) + parseInt(pagePosition.y, 10)
2034
+ }
2035
+ }
2036
+
2037
+ function findTarget(location) {
2038
+ function jumpToTarget(target) {
2039
+ var jumpPosition = getElementPosition(target);
2040
+
2041
+ log(
2042
+ 'Moving to in page link (#' +
2043
+ hash +
2044
+ ') at x: ' +
2045
+ jumpPosition.x +
2046
+ ' y: ' +
2047
+ jumpPosition.y
2048
+ );
2049
+ sendMsg(jumpPosition.y, jumpPosition.x, 'scrollToOffset'); // X&Y reversed at sendMsg uses height/width
2050
+ }
2051
+
2052
+ var hash = location.split('#')[1] || location, // Remove # if present
2053
+ hashData = decodeURIComponent(hash),
2054
+ target =
2055
+ document.getElementById(hashData) ||
2056
+ document.getElementsByName(hashData)[0];
2057
+
2058
+ if (undefined$1 === target) {
2059
+ log(
2060
+ 'In page link (#' +
2061
+ hash +
2062
+ ') not found in iFrame, so sending to parent'
2063
+ );
2064
+ sendMsg(0, 0, 'inPageLink', '#' + hash);
2065
+ } else {
2066
+ jumpToTarget(target);
2067
+ }
2068
+ }
2069
+
2070
+ function checkLocationHash() {
2071
+ var hash = window.location.hash;
2072
+ var href = window.location.href;
2073
+
2074
+ if ('' !== hash && '#' !== hash) {
2075
+ findTarget(href);
2076
+ }
2077
+ }
2078
+
2079
+ function bindAnchors() {
2080
+ function setupLink(el) {
2081
+ function linkClicked(e) {
2082
+ e.preventDefault();
2083
+
2084
+ /* jshint validthis:true */
2085
+ findTarget(this.getAttribute('href'));
2086
+ }
2087
+
2088
+ if ('#' !== el.getAttribute('href')) {
2089
+ addEventListener(el, 'click', linkClicked);
2090
+ }
2091
+ }
2092
+
2093
+ Array.prototype.forEach.call(
2094
+ document.querySelectorAll('a[href^="#"]'),
2095
+ setupLink
2096
+ );
2097
+ }
2098
+
2099
+ function bindLocationHash() {
2100
+ addEventListener(window, 'hashchange', checkLocationHash);
2101
+ }
2102
+
2103
+ function initCheck() {
2104
+ // Check if page loaded with location hash after init resize
2105
+ setTimeout(checkLocationHash, eventCancelTimer);
2106
+ }
2107
+
2108
+ function enableInPageLinks() {
2109
+ /* istanbul ignore else */ // Not testable in phantonJS
2110
+ if (Array.prototype.forEach && document.querySelectorAll) {
2111
+ log('Setting up location.hash handlers');
2112
+ bindAnchors();
2113
+ bindLocationHash();
2114
+ initCheck();
2115
+ } else {
2116
+ warn(
2117
+ 'In page linking not fully supported in this browser! (See README.md for IE8 workaround)'
2118
+ );
2119
+ }
2120
+ }
2121
+
2122
+ if (inPageLinks.enable) {
2123
+ enableInPageLinks();
2124
+ } else {
2125
+ log('In page linking not enabled');
2126
+ }
2127
+
2128
+ return {
2129
+ findTarget: findTarget
2130
+ }
2131
+ }
2132
+
2133
+ function setupMouseEvents() {
2134
+ if (mouseEvents !== true) return
2135
+
2136
+ function sendMouse(e) {
2137
+ sendMsg(0, 0, e.type, e.screenY + ':' + e.screenX);
2138
+ }
2139
+
2140
+ function addMouseListener(evt, name) {
2141
+ log('Add event listener: ' + name);
2142
+ addEventListener(window.document, evt, sendMouse);
2143
+ }
2144
+
2145
+ addMouseListener('mouseenter', 'Mouse Enter');
2146
+ addMouseListener('mouseleave', 'Mouse Leave');
2147
+ }
2148
+
2149
+ function setupPublicMethods() {
2150
+ log('Enable public methods');
2151
+
2152
+ win.parentIFrame = {
2153
+ autoResize: function autoResizeF(resize) {
2154
+ if (true === resize && false === autoResize) {
2155
+ autoResize = true;
2156
+ startEventListeners();
2157
+ } else if (false === resize && true === autoResize) {
2158
+ autoResize = false;
2159
+ stopEventListeners();
2160
+ }
2161
+ sendMsg(0, 0, 'autoResize', JSON.stringify(autoResize));
2162
+ return autoResize
2163
+ },
2164
+
2165
+ close: function closeF() {
2166
+ sendMsg(0, 0, 'close');
2167
+ // teardown()
2168
+ },
2169
+
2170
+ getId: function getIdF() {
2171
+ return myID
2172
+ },
2173
+
2174
+ getPageInfo: function getPageInfoF(callback) {
2175
+ if ('function' === typeof callback) {
2176
+ onPageInfo = callback;
2177
+ sendMsg(0, 0, 'pageInfo');
2178
+ } else {
2179
+ onPageInfo = function () {};
2180
+ sendMsg(0, 0, 'pageInfoStop');
2181
+ }
2182
+ },
2183
+
2184
+ moveToAnchor: function moveToAnchorF(hash) {
2185
+ inPageLinks.findTarget(hash);
2186
+ },
2187
+
2188
+ reset: function resetF() {
2189
+ resetIFrame('parentIFrame.reset');
2190
+ },
2191
+
2192
+ scrollTo: function scrollToF(x, y) {
2193
+ sendMsg(y, x, 'scrollTo'); // X&Y reversed at sendMsg uses height/width
2194
+ },
2195
+
2196
+ scrollToOffset: function scrollToF(x, y) {
2197
+ sendMsg(y, x, 'scrollToOffset'); // X&Y reversed at sendMsg uses height/width
2198
+ },
2199
+
2200
+ sendMessage: function sendMessageF(msg, targetOrigin) {
2201
+ sendMsg(0, 0, 'message', JSON.stringify(msg), targetOrigin);
2202
+ },
2203
+
2204
+ setHeightCalculationMethod: function setHeightCalculationMethodF(
2205
+ heightCalculationMethod
2206
+ ) {
2207
+ heightCalcMode = heightCalculationMethod;
2208
+ checkHeightMode();
2209
+ },
2210
+
2211
+ setWidthCalculationMethod: function setWidthCalculationMethodF(
2212
+ widthCalculationMethod
2213
+ ) {
2214
+ widthCalcMode = widthCalculationMethod;
2215
+ checkWidthMode();
2216
+ },
2217
+
2218
+ setTargetOrigin: function setTargetOriginF(targetOrigin) {
2219
+ log('Set targetOrigin: ' + targetOrigin);
2220
+ targetOriginDefault = targetOrigin;
2221
+ },
2222
+
2223
+ size: function sizeF(customHeight, customWidth) {
2224
+ var valString =
2225
+ '' + (customHeight || '') + (customWidth ? ',' + customWidth : '');
2226
+ sendSize(
2227
+ 'size',
2228
+ 'parentIFrame.size(' + valString + ')',
2229
+ customHeight,
2230
+ customWidth
2231
+ );
2232
+ }
2233
+ };
2234
+ }
2235
+
2236
+ function initInterval() {
2237
+ if (0 !== interval) {
2238
+ log('setInterval: ' + interval + 'ms');
2239
+ intervalTimer = setInterval(function () {
2240
+ sendSize('interval', 'setInterval: ' + interval);
2241
+ }, Math.abs(interval));
2242
+ }
2243
+ }
2244
+
2245
+ // Not testable in PhantomJS
2246
+ /* istanbul ignore next */
2247
+ function setupBodyMutationObserver() {
2248
+ function addImageLoadListners(mutation) {
2249
+ function addImageLoadListener(element) {
2250
+ if (false === element.complete) {
2251
+ log('Attach listeners to ' + element.src);
2252
+ element.addEventListener('load', imageLoaded, false);
2253
+ element.addEventListener('error', imageError, false);
2254
+ elements.push(element);
2255
+ }
2256
+ }
2257
+
2258
+ if (mutation.type === 'attributes' && mutation.attributeName === 'src') {
2259
+ addImageLoadListener(mutation.target);
2260
+ } else if (mutation.type === 'childList') {
2261
+ Array.prototype.forEach.call(
2262
+ mutation.target.querySelectorAll('img'),
2263
+ addImageLoadListener
2264
+ );
2265
+ }
2266
+ }
2267
+
2268
+ function removeFromArray(element) {
2269
+ elements.splice(elements.indexOf(element), 1);
2270
+ }
2271
+
2272
+ function removeImageLoadListener(element) {
2273
+ log('Remove listeners from ' + element.src);
2274
+ element.removeEventListener('load', imageLoaded, false);
2275
+ element.removeEventListener('error', imageError, false);
2276
+ removeFromArray(element);
2277
+ }
2278
+
2279
+ function imageEventTriggered(event, type, typeDesc) {
2280
+ removeImageLoadListener(event.target);
2281
+ sendSize(type, typeDesc + ': ' + event.target.src);
2282
+ }
2283
+
2284
+ function imageLoaded(event) {
2285
+ imageEventTriggered(event, 'imageLoad', 'Image loaded');
2286
+ }
2287
+
2288
+ function imageError(event) {
2289
+ imageEventTriggered(event, 'imageLoadFailed', 'Image load failed');
2290
+ }
2291
+
2292
+ function mutationObserved(mutations) {
2293
+ sendSize(
2294
+ 'mutationObserver',
2295
+ 'mutationObserver: ' + mutations[0].target + ' ' + mutations[0].type
2296
+ );
2297
+
2298
+ // Deal with WebKit / Blink asyncing image loading when tags are injected into the page
2299
+ mutations.forEach(addImageLoadListners);
2300
+ }
2301
+
2302
+ function createMutationObserver() {
2303
+ var target = document.querySelector('body'),
2304
+ config = {
2305
+ attributes: true,
2306
+ attributeOldValue: false,
2307
+ characterData: true,
2308
+ characterDataOldValue: false,
2309
+ childList: true,
2310
+ subtree: true
2311
+ };
2312
+
2313
+ observer = new MutationObserver(mutationObserved);
2314
+
2315
+ log('Create body MutationObserver');
2316
+ observer.observe(target, config);
2317
+
2318
+ return observer
2319
+ }
2320
+
2321
+ var elements = [],
2322
+ MutationObserver =
2323
+ window.MutationObserver || window.WebKitMutationObserver,
2324
+ observer = createMutationObserver();
2325
+
2326
+ return {
2327
+ disconnect: function () {
2328
+ if ('disconnect' in observer) {
2329
+ log('Disconnect body MutationObserver');
2330
+ observer.disconnect();
2331
+ elements.forEach(removeImageLoadListener);
2332
+ }
2333
+ }
2334
+ }
2335
+ }
2336
+
2337
+ function setupMutationObserver() {
2338
+ var forceIntervalTimer = 0 > interval;
2339
+
2340
+ // Not testable in PhantomJS
2341
+ /* istanbul ignore if */ if (
2342
+ window.MutationObserver ||
2343
+ window.WebKitMutationObserver
2344
+ ) {
2345
+ if (forceIntervalTimer) {
2346
+ initInterval();
2347
+ } else {
2348
+ bodyObserver = setupBodyMutationObserver();
2349
+ }
2350
+ } else {
2351
+ log('MutationObserver not supported in this browser!');
2352
+ initInterval();
2353
+ }
2354
+ }
2355
+
2356
+ // document.documentElement.offsetHeight is not reliable, so
2357
+ // we have to jump through hoops to get a better value.
2358
+ function getComputedStyle(prop, el) {
2359
+ var retVal = 0;
2360
+ el = el || document.body; // Not testable in phantonJS
2361
+
2362
+ retVal = document.defaultView.getComputedStyle(el, null);
2363
+ retVal = null === retVal ? 0 : retVal[prop];
2364
+
2365
+ return parseInt(retVal, base)
2366
+ }
2367
+
2368
+ function chkEventThottle(timer) {
2369
+ if (timer > throttledTimer / 2) {
2370
+ throttledTimer = 2 * timer;
2371
+ log('Event throttle increased to ' + throttledTimer + 'ms');
2372
+ }
2373
+ }
2374
+
2375
+ // Idea from https://github.com/guardian/iframe-messenger
2376
+ function getMaxElement(side, elements) {
2377
+ var elementsLength = elements.length,
2378
+ elVal = 0,
2379
+ maxVal = 0,
2380
+ Side = capitalizeFirstLetter(side),
2381
+ timer = Date.now();
2382
+
2383
+ for (var i = 0; i < elementsLength; i++) {
2384
+ elVal =
2385
+ elements[i].getBoundingClientRect()[side] +
2386
+ getComputedStyle('margin' + Side, elements[i]);
2387
+ if (elVal > maxVal) {
2388
+ maxVal = elVal;
2389
+ }
2390
+ }
2391
+
2392
+ timer = Date.now() - timer;
2393
+
2394
+ log('Parsed ' + elementsLength + ' HTML elements');
2395
+ log('Element position calculated in ' + timer + 'ms');
2396
+
2397
+ chkEventThottle(timer);
2398
+
2399
+ return maxVal
2400
+ }
2401
+
2402
+ function getAllMeasurements(dimensions) {
2403
+ return [
2404
+ dimensions.bodyOffset(),
2405
+ dimensions.bodyScroll(),
2406
+ dimensions.documentElementOffset(),
2407
+ dimensions.documentElementScroll()
2408
+ ]
2409
+ }
2410
+
2411
+ function getTaggedElements(side, tag) {
2412
+ function noTaggedElementsFound() {
2413
+ warn('No tagged elements (' + tag + ') found on page');
2414
+ return document.querySelectorAll('body *')
2415
+ }
2416
+
2417
+ var elements = document.querySelectorAll('[' + tag + ']');
2418
+
2419
+ if (elements.length === 0) noTaggedElementsFound();
2420
+
2421
+ return getMaxElement(side, elements)
2422
+ }
2423
+
2424
+ function getAllElements() {
2425
+ return document.querySelectorAll('body *')
2426
+ }
2427
+
2428
+ var getHeight = {
2429
+ bodyOffset: function getBodyOffsetHeight() {
2430
+ return (
2431
+ document.body.offsetHeight +
2432
+ getComputedStyle('marginTop') +
2433
+ getComputedStyle('marginBottom')
2434
+ )
2435
+ },
2436
+
2437
+ offset: function () {
2438
+ return getHeight.bodyOffset() // Backwards compatibility
2439
+ },
2440
+
2441
+ bodyScroll: function getBodyScrollHeight() {
2442
+ return document.body.scrollHeight
2443
+ },
2444
+
2445
+ custom: function getCustomWidth() {
2446
+ return customCalcMethods.height()
2447
+ },
2448
+
2449
+ documentElementOffset: function getDEOffsetHeight() {
2450
+ return document.documentElement.offsetHeight
2451
+ },
2452
+
2453
+ documentElementScroll: function getDEScrollHeight() {
2454
+ return document.documentElement.scrollHeight
2455
+ },
2456
+
2457
+ max: function getMaxHeight() {
2458
+ return Math.max.apply(null, getAllMeasurements(getHeight))
2459
+ },
2460
+
2461
+ min: function getMinHeight() {
2462
+ return Math.min.apply(null, getAllMeasurements(getHeight))
2463
+ },
2464
+
2465
+ grow: function growHeight() {
2466
+ return getHeight.max() // Run max without the forced downsizing
2467
+ },
2468
+
2469
+ lowestElement: function getBestHeight() {
2470
+ return Math.max(
2471
+ getHeight.bodyOffset() || getHeight.documentElementOffset(),
2472
+ getMaxElement('bottom', getAllElements())
2473
+ )
2474
+ },
2475
+
2476
+ taggedElement: function getTaggedElementsHeight() {
2477
+ return getTaggedElements('bottom', 'data-iframe-height')
2478
+ }
2479
+ },
2480
+ getWidth = {
2481
+ bodyScroll: function getBodyScrollWidth() {
2482
+ return document.body.scrollWidth
2483
+ },
2484
+
2485
+ bodyOffset: function getBodyOffsetWidth() {
2486
+ return document.body.offsetWidth
2487
+ },
2488
+
2489
+ custom: function getCustomWidth() {
2490
+ return customCalcMethods.width()
2491
+ },
2492
+
2493
+ documentElementScroll: function getDEScrollWidth() {
2494
+ return document.documentElement.scrollWidth
2495
+ },
2496
+
2497
+ documentElementOffset: function getDEOffsetWidth() {
2498
+ return document.documentElement.offsetWidth
2499
+ },
2500
+
2501
+ scroll: function getMaxWidth() {
2502
+ return Math.max(getWidth.bodyScroll(), getWidth.documentElementScroll())
2503
+ },
2504
+
2505
+ max: function getMaxWidth() {
2506
+ return Math.max.apply(null, getAllMeasurements(getWidth))
2507
+ },
2508
+
2509
+ min: function getMinWidth() {
2510
+ return Math.min.apply(null, getAllMeasurements(getWidth))
2511
+ },
2512
+
2513
+ rightMostElement: function rightMostElement() {
2514
+ return getMaxElement('right', getAllElements())
2515
+ },
2516
+
2517
+ taggedElement: function getTaggedElementsWidth() {
2518
+ return getTaggedElements('right', 'data-iframe-width')
2519
+ }
2520
+ };
2521
+
2522
+ function sizeIFrame(
2523
+ triggerEvent,
2524
+ triggerEventDesc,
2525
+ customHeight,
2526
+ customWidth
2527
+ ) {
2528
+ function resizeIFrame() {
2529
+ height = currentHeight;
2530
+ width = currentWidth;
2531
+
2532
+ sendMsg(height, width, triggerEvent);
2533
+ }
2534
+
2535
+ function isSizeChangeDetected() {
2536
+ function checkTolarance(a, b) {
2537
+ var retVal = Math.abs(a - b) <= tolerance;
2538
+ return !retVal
2539
+ }
2540
+
2541
+ currentHeight =
2542
+ undefined$1 === customHeight ? getHeight[heightCalcMode]() : customHeight;
2543
+ currentWidth =
2544
+ undefined$1 === customWidth ? getWidth[widthCalcMode]() : customWidth;
2545
+
2546
+ return (
2547
+ checkTolarance(height, currentHeight) ||
2548
+ (calculateWidth && checkTolarance(width, currentWidth))
2549
+ )
2550
+ }
2551
+
2552
+ function isForceResizableEvent() {
2553
+ return !(triggerEvent in { init: 1, interval: 1, size: 1 })
2554
+ }
2555
+
2556
+ function isForceResizableCalcMode() {
2557
+ return (
2558
+ heightCalcMode in resetRequiredMethods ||
2559
+ (calculateWidth && widthCalcMode in resetRequiredMethods)
2560
+ )
2561
+ }
2562
+
2563
+ function logIgnored() {
2564
+ log('No change in size detected');
2565
+ }
2566
+
2567
+ function checkDownSizing() {
2568
+ if (isForceResizableEvent() && isForceResizableCalcMode()) {
2569
+ resetIFrame(triggerEventDesc);
2570
+ } else if (!(triggerEvent in { interval: 1 })) {
2571
+ logIgnored();
2572
+ }
2573
+ }
2574
+
2575
+ var currentHeight, currentWidth;
2576
+
2577
+ if (isSizeChangeDetected() || 'init' === triggerEvent) {
2578
+ lockTrigger();
2579
+ resizeIFrame();
2580
+ } else {
2581
+ checkDownSizing();
2582
+ }
2583
+ }
2584
+
2585
+ var sizeIFrameThrottled = throttle(sizeIFrame);
2586
+
2587
+ function sendSize(triggerEvent, triggerEventDesc, customHeight, customWidth) {
2588
+ function recordTrigger() {
2589
+ if (!(triggerEvent in { reset: 1, resetPage: 1, init: 1 })) {
2590
+ log('Trigger event: ' + triggerEventDesc);
2591
+ }
2592
+ }
2593
+
2594
+ function isDoubleFiredEvent() {
2595
+ return triggerLocked && triggerEvent in doubleEventList
2596
+ }
2597
+
2598
+ if (isDoubleFiredEvent()) {
2599
+ log('Trigger event cancelled: ' + triggerEvent);
2600
+ } else {
2601
+ recordTrigger();
2602
+ if (triggerEvent === 'init') {
2603
+ sizeIFrame(triggerEvent, triggerEventDesc, customHeight, customWidth);
2604
+ } else {
2605
+ sizeIFrameThrottled(
2606
+ triggerEvent,
2607
+ triggerEventDesc,
2608
+ customHeight,
2609
+ customWidth
2610
+ );
2611
+ }
2612
+ }
2613
+ }
2614
+
2615
+ function lockTrigger() {
2616
+ if (!triggerLocked) {
2617
+ triggerLocked = true;
2618
+ log('Trigger event lock on');
2619
+ }
2620
+ clearTimeout(triggerLockedTimer);
2621
+ triggerLockedTimer = setTimeout(function () {
2622
+ triggerLocked = false;
2623
+ log('Trigger event lock off');
2624
+ log('--');
2625
+ }, eventCancelTimer);
2626
+ }
2627
+
2628
+ function triggerReset(triggerEvent) {
2629
+ height = getHeight[heightCalcMode]();
2630
+ width = getWidth[widthCalcMode]();
2631
+
2632
+ sendMsg(height, width, triggerEvent);
2633
+ }
2634
+
2635
+ function resetIFrame(triggerEventDesc) {
2636
+ var hcm = heightCalcMode;
2637
+ heightCalcMode = heightCalcModeDefault;
2638
+
2639
+ log('Reset trigger event: ' + triggerEventDesc);
2640
+ lockTrigger();
2641
+ triggerReset('reset');
2642
+
2643
+ heightCalcMode = hcm;
2644
+ }
2645
+
2646
+ function sendMsg(height, width, triggerEvent, msg, targetOrigin) {
2647
+ function setTargetOrigin() {
2648
+ if (undefined$1 === targetOrigin) {
2649
+ targetOrigin = targetOriginDefault;
2650
+ } else {
2651
+ log('Message targetOrigin: ' + targetOrigin);
2652
+ }
2653
+ }
2654
+
2655
+ function sendToParent() {
2656
+ var size = height + ':' + width,
2657
+ message =
2658
+ myID +
2659
+ ':' +
2660
+ size +
2661
+ ':' +
2662
+ triggerEvent +
2663
+ (undefined$1 === msg ? '' : ':' + msg);
2664
+
2665
+ log('Sending message to host page (' + message + ')');
2666
+ target.postMessage(msgID + message, targetOrigin);
2667
+ }
2668
+
2669
+ {
2670
+ setTargetOrigin();
2671
+ sendToParent();
2672
+ }
2673
+ }
2674
+
2675
+ function receiver(event) {
2676
+ var processRequestFromParent = {
2677
+ init: function initFromParent() {
2678
+ initMsg = event.data;
2679
+ target = event.source;
2680
+
2681
+ init();
2682
+ firstRun = false;
2683
+ setTimeout(function () {
2684
+ initLock = false;
2685
+ }, eventCancelTimer);
2686
+ },
2687
+
2688
+ reset: function resetFromParent() {
2689
+ if (initLock) {
2690
+ log('Page reset ignored by init');
2691
+ } else {
2692
+ log('Page size reset by host page');
2693
+ triggerReset('resetPage');
2694
+ }
2695
+ },
2696
+
2697
+ resize: function resizeFromParent() {
2698
+ sendSize('resizeParent', 'Parent window requested size check');
2699
+ },
2700
+
2701
+ moveToAnchor: function moveToAnchorF() {
2702
+ inPageLinks.findTarget(getData());
2703
+ },
2704
+ inPageLink: function inPageLinkF() {
2705
+ this.moveToAnchor();
2706
+ }, // Backward compatibility
2707
+
2708
+ pageInfo: function pageInfoFromParent() {
2709
+ var msgBody = getData();
2710
+ log('PageInfoFromParent called from parent: ' + msgBody);
2711
+ onPageInfo(JSON.parse(msgBody));
2712
+ log(' --');
2713
+ },
2714
+
2715
+ message: function messageFromParent() {
2716
+ var msgBody = getData();
2717
+
2718
+ log('onMessage called from parent: ' + msgBody);
2719
+ // eslint-disable-next-line sonarjs/no-extra-arguments
2720
+ onMessage(JSON.parse(msgBody));
2721
+ log(' --');
2722
+ }
2723
+ };
2724
+
2725
+ function isMessageForUs() {
2726
+ return msgID === ('' + event.data).slice(0, msgIdLen) // ''+ Protects against non-string messages
2727
+ }
2728
+
2729
+ function getMessageType() {
2730
+ return event.data.split(']')[1].split(':')[0]
2731
+ }
2732
+
2733
+ function getData() {
2734
+ return event.data.slice(event.data.indexOf(':') + 1)
2735
+ }
2736
+
2737
+ function isMiddleTier() {
2738
+ return (
2739
+ (!(module.exports) &&
2740
+ 'iFrameResize' in window) ||
2741
+ (window.jQuery !== undefined$1 &&
2742
+ 'iFrameResize' in window.jQuery.prototype)
2743
+ )
2744
+ }
2745
+
2746
+ function isInitMsg() {
2747
+ // Test if this message is from a child below us. This is an ugly test, however, updating
2748
+ // the message format would break backwards compatibility.
2749
+ return event.data.split(':')[2] in { true: 1, false: 1 }
2750
+ }
2751
+
2752
+ function callFromParent() {
2753
+ var messageType = getMessageType();
2754
+
2755
+ if (messageType in processRequestFromParent) {
2756
+ processRequestFromParent[messageType]();
2757
+ } else if (!isMiddleTier() && !isInitMsg()) {
2758
+ warn('Unexpected message (' + event.data + ')');
2759
+ }
2760
+ }
2761
+
2762
+ function processMessage() {
2763
+ if (false === firstRun) {
2764
+ callFromParent();
2765
+ } else if (isInitMsg()) {
2766
+ processRequestFromParent.init();
2767
+ } else {
2768
+ log(
2769
+ 'Ignored message of type "' +
2770
+ getMessageType() +
2771
+ '". Received before initialization.'
2772
+ );
2773
+ }
2774
+ }
2775
+
2776
+ if (isMessageForUs()) {
2777
+ processMessage();
2778
+ }
2779
+ }
2780
+
2781
+ // Normally the parent kicks things off when it detects the iFrame has loaded.
2782
+ // If this script is async-loaded, then tell parent page to retry init.
2783
+ function chkLateLoaded() {
2784
+ if ('loading' !== document.readyState) {
2785
+ window.parent.postMessage('[iFrameResizerChild]Ready', '*');
2786
+ }
2787
+ }
2788
+
2789
+ // Setup if not already running
2790
+ if (!('iframeResizer' in window)) {
2791
+ window.iframeChildListener = function (data) {
2792
+ receiver({ data, sameDomian: true });
2793
+ };
2794
+ addEventListener(window, 'message', receiver);
2795
+ addEventListener(window, 'readystatechange', chkLateLoaded);
2796
+ chkLateLoaded();
2797
+ }
2798
+
2799
+
2800
+ })();
2801
+ });
2802
+
2803
+ var iframeResizer = {
2804
+ iframeResize: iframeResizer$1,
2805
+ iframeResizer: iframeResizer$1, // Backwards compatibility
2806
+ contentWindow: iframeResizer_contentWindow
2807
+ };
2808
+
2809
+ const stzhIframeCss = ".sc-stzh-iframe-h{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}[hidden].sc-stzh-iframe-h{display:none}.sc-stzh-iframe-h::-moz-selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}.sc-stzh-iframe-h::selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}.sc-stzh-iframe-h *.sc-stzh-iframe,.sc-stzh-iframe-h *.sc-stzh-iframe::before,.sc-stzh-iframe-h *.sc-stzh-iframe::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)}.sc-stzh-iframe-h .has-focus.sc-stzh-iframe{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}.sc-stzh-iframe-h .stzh-fylingfocus-focused.sc-stzh-iframe{outline-style:none !important}.sc-stzh-iframe-h .stzh-fylingfocus-focused.sc-stzh-iframe::-moz-focus-inner{border:0 !important}.sc-stzh-iframe-h{position:relative}.sc-stzh-iframe-h .sc-stzh-iframe-s>[slot=preview-logo]{width:100%}.sc-stzh-iframe-h .sc-stzh-iframe-s>[slot=preview-image]{position:absolute;top:0;left:0;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.sc-stzh-iframe-h .sc-stzh-iframe-s>[slot=cookiewall-text]{margin:0}.sc-stzh-iframe-h .sc-stzh-iframe-s>[slot=cookiewall-text] p{margin:0}.sc-stzh-iframe-h .sc-stzh-iframe-s>[slot=cookiewall-text] p:not(:last-child){margin-bottom:var(--stzh-space-small)}@media screen and (min-width: 900px){.sc-stzh-iframe-h .sc-stzh-iframe-s>[slot=cookiewall-text] p:not(:last-child){margin-bottom:var(--stzh-space-medium)}}@media screen and (min-width: 1260px){.sc-stzh-iframe-h .sc-stzh-iframe-s>[slot=cookiewall-text] p:not(:last-child){margin-bottom:var(--stzh-space-large)}}.stzh-iframe.sc-stzh-iframe{width:100%;height:100%}.stzh-iframe__iframe.sc-stzh-iframe{width:100%}.stzh-iframe__cookiewall.sc-stzh-iframe,.stzh-iframe__preview.sc-stzh-iframe{position:absolute;top:0;left:0;width:100%;height:100%}.stzh-iframe__iframe.sc-stzh-iframe,.stzh-iframe__preview.sc-stzh-iframe{border:none}.stzh-iframe__preview.sc-stzh-iframe,.stzh-iframe__cookiewall.sc-stzh-iframe{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:var(--stzh-space-medium);visibility:hidden}.stzh-iframe__preview.is-visible.sc-stzh-iframe,.stzh-iframe__cookiewall.is-visible.sc-stzh-iframe{visibility:visible}.stzh-iframe__preview.sc-stzh-iframe{z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;background-color:var(--stzh-color-grey20)}.stzh-iframe__preview-image-wrapper.sc-stzh-iframe:not(:empty)+.stzh-iframe__preview-logo-wrapper.sc-stzh-iframe{display:none}.stzh-iframe__preview-logo-wrapper.sc-stzh-iframe{top:var(--stzh-space-xlarge);left:var(--stzh-space-xlarge);position:absolute;width:45%}@media screen and (min-width: 900px){.stzh-iframe__preview-logo-wrapper.sc-stzh-iframe{top:var(--stzh-space-xxlarge)}}@media screen and (min-width: 1260px){.stzh-iframe__preview-logo-wrapper.sc-stzh-iframe{top:var(--stzh-space-xxxlarge)}}@media screen and (min-width: 900px){.stzh-iframe__preview-logo-wrapper.sc-stzh-iframe{left:var(--stzh-space-xxlarge)}}@media screen and (min-width: 1260px){.stzh-iframe__preview-logo-wrapper.sc-stzh-iframe{left:var(--stzh-space-xxxlarge)}}.stzh-iframe__preview-run.sc-stzh-iframe{position:relative;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;background-color:var(--stzh-color-primary);color:var(--stzh-color-white);display:flex;flex-direction:column;align-items:center;justify-content:center;width:var(--stzh-form-input-small-height);height:var(--stzh-form-input-small-height);visibility:hidden;transition:background-color var(--stzh-base-transition-animation-speed)}.stzh-iframe__preview-run.is-visible.sc-stzh-iframe{visibility:visible}@media screen and (min-width: 900px){.stzh-iframe__preview-run.sc-stzh-iframe{width:var(--stzh-form-input-height);height:var(--stzh-form-input-height)}}.stzh-iframe__preview.sc-stzh-iframe:hover .stzh-iframe__preview-run.sc-stzh-iframe{background-color:var(--stzh-color-secondary60)}@media screen and (min-width: 900px){.stzh-iframe__preview-run-icon.sc-stzh-iframe{--size:var(--stzh-icon-size-large)}}.stzh-iframe__cookiewall.sc-stzh-iframe{padding-left:var(--stzh-space-medium);padding-right:var(--stzh-space-medium);z-index:2;text-align:center;background-color:var(--stzh-color-black60op);color:var(--stzh-color-white)}@media screen and (min-width: 600px){.stzh-iframe__cookiewall.sc-stzh-iframe{padding-left:var(--stzh-space-large)}}@media screen and (min-width: 900px){.stzh-iframe__cookiewall.sc-stzh-iframe{padding-left:var(--stzh-space-xlarge)}}@media screen and (min-width: 1260px){.stzh-iframe__cookiewall.sc-stzh-iframe{padding-left:var(--stzh-space-xxlarge)}}@media screen and (min-width: 600px){.stzh-iframe__cookiewall.sc-stzh-iframe{padding-right:var(--stzh-space-large)}}@media screen and (min-width: 900px){.stzh-iframe__cookiewall.sc-stzh-iframe{padding-right:var(--stzh-space-xlarge)}}@media screen and (min-width: 1260px){.stzh-iframe__cookiewall.sc-stzh-iframe{padding-right:var(--stzh-space-xxlarge)}}@media screen and (min-width: 900px){.stzh-iframe__cookiewall.sc-stzh-iframe{-moz-column-gap:var(--stzh-grid-gutter);column-gap:var(--stzh-grid-gutter);display:grid;grid-template-areas:\". content content content content content content .\";grid-template-columns:repeat(8, minmax(0, 1fr));padding-left:0;padding-right:0}}@media screen and (min-width: 900px) and (min-width: 600px){.stzh-iframe__cookiewall.sc-stzh-iframe{-moz-column-gap:var(--stzh-grid-gutter-small);column-gap:var(--stzh-grid-gutter-small)}}@media screen and (min-width: 900px) and (min-width: 900px){.stzh-iframe__cookiewall.sc-stzh-iframe{-moz-column-gap:var(--stzh-grid-gutter-medium);column-gap:var(--stzh-grid-gutter-medium)}}@media screen and (min-width: 900px) and (min-width: 1260px){.stzh-iframe__cookiewall.sc-stzh-iframe{-moz-column-gap:var(--stzh-grid-gutter-large);column-gap:var(--stzh-grid-gutter-large)}}@media screen and (min-width: 900px) and (min-width: 1600px){.stzh-iframe__cookiewall.sc-stzh-iframe{-moz-column-gap:var(--stzh-grid-gutter-ultra);column-gap:var(--stzh-grid-gutter-ultra)}}@media screen and (min-width: 900px){.stzh-iframe__cookiewall-content.sc-stzh-iframe{grid-area:content}}.stzh-iframe__cookiewall-text.sc-stzh-iframe{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-top:var(--stzh-space-small);padding-bottom:var(--stzh-space-small);margin-bottom:var(--stzh-space-medium)}@media screen and (min-width: 900px){.stzh-iframe__cookiewall-text.sc-stzh-iframe{padding-top:var(--stzh-space-medium)}}@media screen and (min-width: 1260px){.stzh-iframe__cookiewall-text.sc-stzh-iframe{padding-top:var(--stzh-space-large)}}@media screen and (min-width: 900px){.stzh-iframe__cookiewall-text.sc-stzh-iframe{padding-bottom:var(--stzh-space-medium)}}@media screen and (min-width: 1260px){.stzh-iframe__cookiewall-text.sc-stzh-iframe{padding-bottom:var(--stzh-space-large)}}@media screen and (min-width: 600px){.stzh-iframe__cookiewall-text.sc-stzh-iframe{margin-bottom:var(--stzh-space-large)}}@media screen and (min-width: 900px){.stzh-iframe__cookiewall-text.sc-stzh-iframe{margin-bottom:var(--stzh-space-xlarge)}}@media screen and (min-width: 1260px){.stzh-iframe__cookiewall-text.sc-stzh-iframe{margin-bottom:var(--stzh-space-xxlarge)}}.stzh-iframe__cookiewall-close.sc-stzh-iframe{top:0;right:0;position:absolute;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;display:flex;align-items:center;justify-content:center;padding:var(--stzh-space-xsmall);background-color:transparent;color:var(--stzh-color-white);cursor:pointer}";
10
2810
 
11
2811
  const COOKIE_PREFIX_CONFIRM = "stzh-components-iframe-confirm";
12
2812
  let iframeCounter = 0;
@@ -22,24 +2822,25 @@ const StzhIframe = class {
22
2822
  this.iframeElement.focus();
23
2823
  this.updateFocus = false;
24
2824
  }
2825
+ this.initializeIframeResizing();
25
2826
  };
26
2827
  this.handleCookiewallCloseClick = () => {
27
2828
  this.updateFocus = true;
28
2829
  this.view = "preview";
29
2830
  this.stzhViewChange.emit({
30
2831
  component: "stzh-iframe",
31
- value: this.view
2832
+ value: this.view,
32
2833
  });
33
2834
  };
34
2835
  this.handleCookiewallConfirmClick = () => {
35
2836
  js_cookie.js_cookie.set(`${COOKIE_PREFIX_CONFIRM}-${this.cookie}`, "1", {
36
- expires: this.cookieExpires || null
2837
+ expires: this.cookieExpires || null,
37
2838
  });
38
2839
  this.updateFocus = true;
39
2840
  this.view = "iframe";
40
2841
  this.stzhViewChange.emit({
41
2842
  component: "stzh-iframe",
42
- value: this.view
2843
+ value: this.view,
43
2844
  });
44
2845
  };
45
2846
  this.handlePreviewClick = () => {
@@ -53,18 +2854,21 @@ const StzhIframe = class {
53
2854
  }
54
2855
  this.stzhViewChange.emit({
55
2856
  component: "stzh-iframe",
56
- value: this.view
2857
+ value: this.view,
57
2858
  });
58
2859
  };
59
2860
  this.localization = undefined;
60
2861
  this.iframeId = undefined;
61
2862
  this.iframeErrorText = undefined;
2863
+ this.iframeResizerVariant = "None";
2864
+ this.iframeResizerHeightCorrection = undefined;
2865
+ this.iframeResizerSecondlevelDomain = undefined;
62
2866
  this.name = undefined;
63
2867
  this.sandbox = undefined;
64
2868
  this.referrerpolicy = undefined;
65
2869
  this.allow = "autoplay; fullscreen";
66
- this.width = undefined;
67
- this.height = undefined;
2870
+ this.width = "100%";
2871
+ this.height = "100%";
68
2872
  this.src = "";
69
2873
  this.cookie = undefined;
70
2874
  this.cookieExpires = 365;
@@ -90,13 +2894,70 @@ const StzhIframe = class {
90
2894
  this._src = null;
91
2895
  }
92
2896
  }
2897
+ initializeIframeResizing() {
2898
+ switch (this.iframeResizerVariant) {
2899
+ case "None":
2900
+ return;
2901
+ case "PostMessage":
2902
+ console.log("iFrameResizeModule", iframeResizer);
2903
+ iframeResizer.iframeResize({ log: utils.getStzhEnvironment() !== utils.StzhEnvironmentEnum.PROD, checkOrigin: false }, this.iframeElement);
2904
+ break;
2905
+ case "SameSecondLevelDomain":
2906
+ if (!this.iframeResizerSecondlevelDomain) {
2907
+ console.log("stzh-iframe:", "property 'iframeSecondlevelDomain' not filled out.");
2908
+ }
2909
+ this.setupIframeAutoSizing({
2910
+ frameId: this.iframeId,
2911
+ heightCorrection: this.iframeResizerHeightCorrection || 0,
2912
+ hasSameDomain: false,
2913
+ secondLevelDomain: this.iframeResizerSecondlevelDomain,
2914
+ });
2915
+ break;
2916
+ }
2917
+ }
2918
+ setupIframeAutoSizing(config) {
2919
+ const createResizer = (iframe, config) => {
2920
+ return () => {
2921
+ var _a;
2922
+ try {
2923
+ const newHeight = ((_a = iframe.contentWindow) === null || _a === void 0 ? void 0 : _a.document.body.scrollHeight) || 0;
2924
+ if (newHeight > 0) {
2925
+ iframe.style.height = `${newHeight + config.heightCorrection}px`;
2926
+ }
2927
+ }
2928
+ catch (error) {
2929
+ console.warn("stzh-iframe:", "Resizing not possible, perhaps due to cross-domain restrictions:", error);
2930
+ }
2931
+ };
2932
+ };
2933
+ if (!config.hasSameDomain) {
2934
+ document.domain = config.secondLevelDomain;
2935
+ }
2936
+ const iframe = document.getElementById(config.frameId);
2937
+ if (!iframe) {
2938
+ console.error(`Iframe with ID ${config.frameId} not found`);
2939
+ return;
2940
+ }
2941
+ const resizer = createResizer(iframe, config);
2942
+ window.addEventListener("resize", resizer);
2943
+ iframe.addEventListener("load", resizer);
2944
+ iframe.addEventListener("blur", resizer);
2945
+ iframe.addEventListener("readystatechange", resizer); // hack for internet explorer...
2946
+ try {
2947
+ // this might go wrong on IE, if iframe hasn't fully loaded yet, but it doesn't matter.
2948
+ resizer();
2949
+ }
2950
+ catch (error) {
2951
+ console.warn("Initial resize failed, likely due to iframe not being fully loaded yet:", error);
2952
+ }
2953
+ }
93
2954
  async componentWillLoad() {
94
2955
  this.internalId = `stzh-iframe-${iframeCounter++}`;
95
2956
  const cookieAccepted = js_cookie.js_cookie.get(`${COOKIE_PREFIX_CONFIRM}-${this.cookie}`) || false;
96
- if (((!this.cookie || cookieAccepted) && (this.skipPreviewIfCookieAccepted || this.skipPreview))
97
- || (!this.cookie && this.skipPreview)) {
2957
+ if (((!this.cookie || cookieAccepted) && (this.skipPreviewIfCookieAccepted || this.skipPreview)) ||
2958
+ (!this.cookie && this.skipPreview)) {
98
2959
  this.stzhPreviewSkip.emit({
99
- component: "stzh-iframe"
2960
+ component: "stzh-iframe",
100
2961
  });
101
2962
  this.view = "iframe";
102
2963
  }
@@ -125,22 +2986,18 @@ const StzhIframe = class {
125
2986
  const classes = {
126
2987
  "stzh-iframe": true,
127
2988
  };
128
- return (index.h(index.Host, null, index.h("div", { class: classes }, this.view === "iframe" &&
129
- index.h("iframe", { id: this.iframeId, name: this.name, sandbox: this.sandbox, referrerPolicy: this.referrerpolicy, width: this.width, height: this.height, ref: (el) => (this.iframeElement = el), class: "stzh-iframe__iframe", src: this._src, allow: this.allow, onLoad: this.handleIframeLoad }, this.iframeErrorText), index.h("button", { ref: (el) => (this.previewButtonElement = el), onClick: this.handlePreviewClick, "aria-label": this.previewLabel || this.localization.defaultPreviewLabel,
2989
+ return (index.h(index.Host, null, index.h("div", { class: classes }, this.view === "iframe" && (index.h("iframe", { id: this.iframeId, name: this.name, sandbox: this.sandbox, referrerPolicy: this.referrerpolicy, width: this.width, height: this.height, ref: el => (this.iframeElement = el), class: "stzh-iframe__iframe", src: this._src, allow: this.allow, onLoad: this.handleIframeLoad }, this.iframeErrorText)), index.h("button", { ref: el => (this.previewButtonElement = el), onClick: this.handlePreviewClick, "aria-label": this.previewLabel || this.localization.defaultPreviewLabel,
130
2990
  // disabled={this.view === "cookiewall"}
131
2991
  class: {
132
2992
  "stzh-iframe__preview": true,
133
- "is-visible": this.view === "preview" || this.view === "cookiewall"
134
- } }, index.h("div", { class: "stzh-iframe__preview-image-wrapper" }, index.h("slot", { name: "preview-image" })), index.h("div", { class: "stzh-iframe__preview-logo-wrapper" }, index.h("slot", { name: "preview-logo" })), this.previewIcon &&
135
- index.h("div", { class: {
136
- "stzh-iframe__preview-run": true,
137
- "is-visible": this.view === "preview"
138
- } }, index.h("stzh-icon", { class: "stzh-iframe__preview-run-icon", name: this.previewIcon }))), this.cookie &&
139
- index.h("div", { class: {
140
- "stzh-iframe__cookiewall": true,
141
- "is-visible": this.view === "cookiewall"
142
- } }, index.h("div", { class: "stzh-iframe__cookiewall-content" }, index.h("div", { class: "stzh-iframe__cookiewall-text", id: `${this.internalId}-cookiewall-text` }, this.cookieConfirmText ? this.cookieConfirmText : index.h("slot", { name: "cookiewall-text" })), index.h("stzh-button", { ref: (el) => (this.confirmButtonElement = el), class: "stzh-iframe__cookiewall-button", size: "small", a11yDescribedby: `${this.internalId}-cookiewall-text`, icon: this.cookieConfirmIcon, label: this.cookieConfirmLabel || this.localization.defaultConfirmLabel, onClick: this.handleCookiewallConfirmClick })), !this.skipPreview &&
143
- index.h("button", { class: "stzh-iframe__cookiewall-close", onClick: this.handleCookiewallCloseClick, "aria-label": this.localization.confirmCloseLabel }, index.h("stzh-icon", { class: "stzh-iframe__cookiewall-close-icon", name: "close" }))))));
2993
+ "is-visible": this.view === "preview" || this.view === "cookiewall",
2994
+ } }, index.h("div", { class: "stzh-iframe__preview-image-wrapper" }, index.h("slot", { name: "preview-image" })), index.h("div", { class: "stzh-iframe__preview-logo-wrapper" }, index.h("slot", { name: "preview-logo" })), this.previewIcon && (index.h("div", { class: {
2995
+ "stzh-iframe__preview-run": true,
2996
+ "is-visible": this.view === "preview",
2997
+ } }, index.h("stzh-icon", { class: "stzh-iframe__preview-run-icon", name: this.previewIcon })))), this.cookie && (index.h("div", { class: {
2998
+ "stzh-iframe__cookiewall": true,
2999
+ "is-visible": this.view === "cookiewall",
3000
+ } }, index.h("div", { class: "stzh-iframe__cookiewall-content" }, index.h("div", { class: "stzh-iframe__cookiewall-text", id: `${this.internalId}-cookiewall-text` }, this.cookieConfirmText ? this.cookieConfirmText : index.h("slot", { name: "cookiewall-text" })), index.h("stzh-button", { ref: el => (this.confirmButtonElement = el), class: "stzh-iframe__cookiewall-button", size: "small", a11yDescribedby: `${this.internalId}-cookiewall-text`, icon: this.cookieConfirmIcon, label: this.cookieConfirmLabel || this.localization.defaultConfirmLabel, onClick: this.handleCookiewallConfirmClick })), !this.skipPreview && (index.h("button", { class: "stzh-iframe__cookiewall-close", onClick: this.handleCookiewallCloseClick, "aria-label": this.localization.confirmCloseLabel }, index.h("stzh-icon", { class: "stzh-iframe__cookiewall-close-icon", name: "close" }))))))));
144
3001
  }
145
3002
  get element() { return index.getElement(this); }
146
3003
  static get watchers() { return {