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