@zonos/elements 1.0.16

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 (930) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +22 -0
  3. package/dist/cjs/cart-e27fd17c.js +607 -0
  4. package/dist/cjs/cart-e27fd17c.js.map +1 -0
  5. package/dist/cjs/classes-b7918f56.js +16 -0
  6. package/dist/cjs/classes-b7918f56.js.map +1 -0
  7. package/dist/cjs/getBorderRadius-2904800c.js +20 -0
  8. package/dist/cjs/getBorderRadius-2904800c.js.map +1 -0
  9. package/dist/cjs/getHasMoreSpaceOnRight-2855491b.js +12 -0
  10. package/dist/cjs/getHasMoreSpaceOnRight-2855491b.js.map +1 -0
  11. package/dist/cjs/index-9542d2e7.js +1917 -0
  12. package/dist/cjs/index-9542d2e7.js.map +1 -0
  13. package/dist/cjs/index.cjs.js +4 -0
  14. package/dist/cjs/index.cjs.js.map +1 -0
  15. package/dist/cjs/isColorVariable-c1ed7303.js +18 -0
  16. package/dist/cjs/isColorVariable-c1ed7303.js.map +1 -0
  17. package/dist/cjs/isDarkColor-a86b8a05.js +1199 -0
  18. package/dist/cjs/isDarkColor-a86b8a05.js.map +1 -0
  19. package/dist/cjs/loader.cjs.js +15 -0
  20. package/dist/cjs/loader.cjs.js.map +1 -0
  21. package/dist/cjs/localization-f6a1b679.js +3387 -0
  22. package/dist/cjs/localization-f6a1b679.js.map +1 -0
  23. package/dist/cjs/submitGtag-b1b96579.js +29 -0
  24. package/dist/cjs/submitGtag-b1b96579.js.map +1 -0
  25. package/dist/cjs/zonos-address_2.cjs.entry.js +126 -0
  26. package/dist/cjs/zonos-address_2.cjs.entry.js.map +1 -0
  27. package/dist/cjs/zonos-badge.cjs.entry.js +36 -0
  28. package/dist/cjs/zonos-badge.cjs.entry.js.map +1 -0
  29. package/dist/cjs/zonos-banner_2.cjs.entry.js +120 -0
  30. package/dist/cjs/zonos-banner_2.cjs.entry.js.map +1 -0
  31. package/dist/cjs/zonos-button_2.cjs.entry.js +129 -0
  32. package/dist/cjs/zonos-button_2.cjs.entry.js.map +1 -0
  33. package/dist/cjs/zonos-card_2.cjs.entry.js +47 -0
  34. package/dist/cjs/zonos-card_2.cjs.entry.js.map +1 -0
  35. package/dist/cjs/zonos-cart-items_10.cjs.entry.js +505 -0
  36. package/dist/cjs/zonos-cart-items_10.cjs.entry.js.map +1 -0
  37. package/dist/cjs/zonos-checkout.cjs.entry.js +337 -0
  38. package/dist/cjs/zonos-checkout.cjs.entry.js.map +1 -0
  39. package/dist/cjs/zonos-component.cjs.entry.js +31 -0
  40. package/dist/cjs/zonos-component.cjs.entry.js.map +1 -0
  41. package/dist/cjs/zonos-controller.cjs.entry.js +169 -0
  42. package/dist/cjs/zonos-controller.cjs.entry.js.map +1 -0
  43. package/dist/cjs/zonos-country-flag_4.cjs.entry.js +1902 -0
  44. package/dist/cjs/zonos-country-flag_4.cjs.entry.js.map +1 -0
  45. package/dist/cjs/zonos-elements.cjs.js +25 -0
  46. package/dist/cjs/zonos-elements.cjs.js.map +1 -0
  47. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +115 -0
  48. package/dist/cjs/zonos-hello-dialog.cjs.entry.js.map +1 -0
  49. package/dist/cjs/zonos-hello.cjs.entry.js +485 -0
  50. package/dist/cjs/zonos-hello.cjs.entry.js.map +1 -0
  51. package/dist/cjs/zonos-icon.cjs.entry.js +34 -0
  52. package/dist/cjs/zonos-icon.cjs.entry.js.map +1 -0
  53. package/dist/cjs/zonos-notification.cjs.entry.js +71 -0
  54. package/dist/cjs/zonos-notification.cjs.entry.js.map +1 -0
  55. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +54 -0
  56. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js.map +1 -0
  57. package/dist/cjs/zonos-text.cjs.entry.js +160 -0
  58. package/dist/cjs/zonos-text.cjs.entry.js.map +1 -0
  59. package/dist/cjs/zonosStore-960e5542.js +2650 -0
  60. package/dist/cjs/zonosStore-960e5542.js.map +1 -0
  61. package/dist/collection/collection-manifest.json +43 -0
  62. package/dist/collection/components/checkout/zonos-checkout/assets/LeftArrow.svg +1 -0
  63. package/dist/collection/components/checkout/zonos-checkout/assets/MessageIcon.svg +3 -0
  64. package/dist/collection/components/checkout/zonos-checkout/assets/RemoveIcon.svg +1 -0
  65. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-items/assets/empty-item.jpeg +0 -0
  66. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.css +49 -0
  67. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.js +41 -0
  68. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.js.map +1 -0
  69. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/assets/InfoIcon.svg +4 -0
  70. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.css +58 -0
  71. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +53 -0
  72. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js.map +1 -0
  73. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/assets/RemoveIcon.svg +1 -0
  74. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/assets/SuccessIcon.svg +1 -0
  75. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.css +57 -0
  76. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +173 -0
  77. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js.map +1 -0
  78. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.css +63 -0
  79. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +161 -0
  80. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js.map +1 -0
  81. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.css +207 -0
  82. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +562 -0
  83. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js.map +1 -0
  84. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.css +63 -0
  85. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +163 -0
  86. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js.map +1 -0
  87. package/dist/collection/components/checkout/zonos-checkout/zonos-review/assets/ChevronDownIcon.svg +1 -0
  88. package/dist/collection/components/checkout/zonos-checkout/zonos-review/assets/ChevronUpIcon.svg +1 -0
  89. package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.css +49 -0
  90. package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.js +122 -0
  91. package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.js.map +1 -0
  92. package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.css +69 -0
  93. package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +176 -0
  94. package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js.map +1 -0
  95. package/dist/collection/components/common/countries.js +267 -0
  96. package/dist/collection/components/common/countries.js.map +1 -0
  97. package/dist/collection/components/common/zonos-badge/zonos-badge.css +108 -0
  98. package/dist/collection/components/common/zonos-badge/zonos-badge.js +192 -0
  99. package/dist/collection/components/common/zonos-badge/zonos-badge.js.map +1 -0
  100. package/dist/collection/components/common/zonos-banner/zonos-banner.css +68 -0
  101. package/dist/collection/components/common/zonos-banner/zonos-banner.js +135 -0
  102. package/dist/collection/components/common/zonos-banner/zonos-banner.js.map +1 -0
  103. package/dist/collection/components/common/zonos-button/zonos-button.css +245 -0
  104. package/dist/collection/components/common/zonos-button/zonos-button.js +418 -0
  105. package/dist/collection/components/common/zonos-button/zonos-button.js.map +1 -0
  106. package/dist/collection/components/common/zonos-card/zonos-card.css +67 -0
  107. package/dist/collection/components/common/zonos-card/zonos-card.js +169 -0
  108. package/dist/collection/components/common/zonos-card/zonos-card.js.map +1 -0
  109. package/dist/collection/components/common/zonos-collapse/zonos-collapse.css +43 -0
  110. package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +88 -0
  111. package/dist/collection/components/common/zonos-collapse/zonos-collapse.js.map +1 -0
  112. package/dist/collection/components/common/zonos-country-flag/zonos-country-flag.css +48 -0
  113. package/dist/collection/components/common/zonos-country-flag/zonos-country-flag.js +106 -0
  114. package/dist/collection/components/common/zonos-country-flag/zonos-country-flag.js.map +1 -0
  115. package/dist/collection/components/common/zonos-country-select/assets/arrowLeftBlue.svg +1 -0
  116. package/dist/collection/components/common/zonos-country-select/zonos-country-select.css +76 -0
  117. package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +79 -0
  118. package/dist/collection/components/common/zonos-country-select/zonos-country-select.js.map +1 -0
  119. package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.css +38 -0
  120. package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +63 -0
  121. package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js.map +1 -0
  122. package/dist/collection/components/common/zonos-dialog/assets/removeIcon.svg +1 -0
  123. package/dist/collection/components/common/zonos-dialog/zonos-dialog.css +150 -0
  124. package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +383 -0
  125. package/dist/collection/components/common/zonos-dialog/zonos-dialog.js.map +1 -0
  126. package/dist/collection/components/common/zonos-icon/zonos-icon.css +38 -0
  127. package/dist/collection/components/common/zonos-icon/zonos-icon.js +127 -0
  128. package/dist/collection/components/common/zonos-icon/zonos-icon.js.map +1 -0
  129. package/dist/collection/components/common/zonos-logo/assets/ZonosLogo.png +0 -0
  130. package/dist/collection/components/common/zonos-logo/zonos-logo.css +36 -0
  131. package/dist/collection/components/common/zonos-logo/zonos-logo.js +96 -0
  132. package/dist/collection/components/common/zonos-logo/zonos-logo.js.map +1 -0
  133. package/dist/collection/components/common/zonos-notification/zonos-notification.css +67 -0
  134. package/dist/collection/components/common/zonos-notification/zonos-notification.js +131 -0
  135. package/dist/collection/components/common/zonos-notification/zonos-notification.js.map +1 -0
  136. package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.css +70 -0
  137. package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +176 -0
  138. package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js.map +1 -0
  139. package/dist/collection/components/common/zonos-spinner/zonos-spinner.css +104 -0
  140. package/dist/collection/components/common/zonos-spinner/zonos-spinner.js +78 -0
  141. package/dist/collection/components/common/zonos-spinner/zonos-spinner.js.map +1 -0
  142. package/dist/collection/components/common/zonos-text/zonos-text.css +80 -0
  143. package/dist/collection/components/common/zonos-text/zonos-text.js +199 -0
  144. package/dist/collection/components/common/zonos-text/zonos-text.js.map +1 -0
  145. package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.css +35 -0
  146. package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +74 -0
  147. package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js.map +1 -0
  148. package/dist/collection/components/component-template/zonos-component/zonos-component.css +33 -0
  149. package/dist/collection/components/component-template/zonos-component/zonos-component.js +86 -0
  150. package/dist/collection/components/component-template/zonos-component/zonos-component.js.map +1 -0
  151. package/dist/collection/components/hello/zonos-hello/zonos-hello.css +262 -0
  152. package/dist/collection/components/hello/zonos-hello/zonos-hello.js +342 -0
  153. package/dist/collection/components/hello/zonos-hello/zonos-hello.js.map +1 -0
  154. package/dist/collection/components/hello/zonos-hello-dialog/assets/bagIcon.svg +3 -0
  155. package/dist/collection/components/hello/zonos-hello-dialog/assets/messageIcon.svg +3 -0
  156. package/dist/collection/components/hello/zonos-hello-dialog/assets/moneyIcon.svg +3 -0
  157. package/dist/collection/components/hello/zonos-hello-dialog/assets/removeIcon.svg +1 -0
  158. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/assets/chevronDownIcon.svg +1 -0
  159. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/assets/zonosIcon.svg +5 -0
  160. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.css +522 -0
  161. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +82 -0
  162. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js.map +1 -0
  163. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.css +162 -0
  164. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +255 -0
  165. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js.map +1 -0
  166. package/dist/collection/components/main/zonos-controller.css +34 -0
  167. package/dist/collection/components/main/zonos-controller.js +287 -0
  168. package/dist/collection/components/main/zonos-controller.js.map +1 -0
  169. package/dist/collection/components/store/checkout/cart.js +198 -0
  170. package/dist/collection/components/store/checkout/cart.js.map +1 -0
  171. package/dist/collection/components/store/checkout/stripe.js +309 -0
  172. package/dist/collection/components/store/checkout/stripe.js.map +1 -0
  173. package/dist/collection/components/store/hello/localization.js +120 -0
  174. package/dist/collection/components/store/hello/localization.js.map +1 -0
  175. package/dist/collection/components/store/translationStore/strings.arabic.js +141 -0
  176. package/dist/collection/components/store/translationStore/strings.arabic.js.map +1 -0
  177. package/dist/collection/components/store/translationStore/strings.base.js +141 -0
  178. package/dist/collection/components/store/translationStore/strings.base.js.map +1 -0
  179. package/dist/collection/components/store/translationStore/strings.chinese.js +141 -0
  180. package/dist/collection/components/store/translationStore/strings.chinese.js.map +1 -0
  181. package/dist/collection/components/store/translationStore/strings.danish.js +141 -0
  182. package/dist/collection/components/store/translationStore/strings.danish.js.map +1 -0
  183. package/dist/collection/components/store/translationStore/strings.dutch.js +141 -0
  184. package/dist/collection/components/store/translationStore/strings.dutch.js.map +1 -0
  185. package/dist/collection/components/store/translationStore/strings.french.js +141 -0
  186. package/dist/collection/components/store/translationStore/strings.french.js.map +1 -0
  187. package/dist/collection/components/store/translationStore/strings.german.js +141 -0
  188. package/dist/collection/components/store/translationStore/strings.german.js.map +1 -0
  189. package/dist/collection/components/store/translationStore/strings.hebrew.js +141 -0
  190. package/dist/collection/components/store/translationStore/strings.hebrew.js.map +1 -0
  191. package/dist/collection/components/store/translationStore/strings.indonesian.js +141 -0
  192. package/dist/collection/components/store/translationStore/strings.indonesian.js.map +1 -0
  193. package/dist/collection/components/store/translationStore/strings.italian.js +141 -0
  194. package/dist/collection/components/store/translationStore/strings.italian.js.map +1 -0
  195. package/dist/collection/components/store/translationStore/strings.japanese.js +141 -0
  196. package/dist/collection/components/store/translationStore/strings.japanese.js.map +1 -0
  197. package/dist/collection/components/store/translationStore/strings.korean.js +141 -0
  198. package/dist/collection/components/store/translationStore/strings.korean.js.map +1 -0
  199. package/dist/collection/components/store/translationStore/strings.norwegian.js +141 -0
  200. package/dist/collection/components/store/translationStore/strings.norwegian.js.map +1 -0
  201. package/dist/collection/components/store/translationStore/strings.polish.js +141 -0
  202. package/dist/collection/components/store/translationStore/strings.polish.js.map +1 -0
  203. package/dist/collection/components/store/translationStore/strings.portuguese.js +141 -0
  204. package/dist/collection/components/store/translationStore/strings.portuguese.js.map +1 -0
  205. package/dist/collection/components/store/translationStore/strings.russian.js +141 -0
  206. package/dist/collection/components/store/translationStore/strings.russian.js.map +1 -0
  207. package/dist/collection/components/store/translationStore/strings.spanish.js +141 -0
  208. package/dist/collection/components/store/translationStore/strings.spanish.js.map +1 -0
  209. package/dist/collection/components/store/translationStore/strings.swedish.js +141 -0
  210. package/dist/collection/components/store/translationStore/strings.swedish.js.map +1 -0
  211. package/dist/collection/components/store/translationStore/strings.turkish.js +141 -0
  212. package/dist/collection/components/store/translationStore/strings.turkish.js.map +1 -0
  213. package/dist/collection/components/store/translationStore/strings.vietnamese.js +141 -0
  214. package/dist/collection/components/store/translationStore/strings.vietnamese.js.map +1 -0
  215. package/dist/collection/components/store/translationStore.js +94 -0
  216. package/dist/collection/components/store/translationStore.js.map +1 -0
  217. package/dist/collection/components/store/zonosStore.js +102 -0
  218. package/dist/collection/components/store/zonosStore.js.map +1 -0
  219. package/dist/collection/components/stripe/zonos-address/zonos-address.css +32 -0
  220. package/dist/collection/components/stripe/zonos-address/zonos-address.js +151 -0
  221. package/dist/collection/components/stripe/zonos-address/zonos-address.js.map +1 -0
  222. package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.css +32 -0
  223. package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +87 -0
  224. package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js.map +1 -0
  225. package/dist/collection/components/stripe/zonos-payment/zonos-payment.css +32 -0
  226. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +92 -0
  227. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js.map +1 -0
  228. package/dist/collection/components/utils/addDays.js +12 -0
  229. package/dist/collection/components/utils/addDays.js.map +1 -0
  230. package/dist/collection/components/utils/api/calculateLandedCost.js +16 -0
  231. package/dist/collection/components/utils/api/calculateLandedCost.js.map +1 -0
  232. package/dist/collection/components/utils/api/getCountries.js +16 -0
  233. package/dist/collection/components/utils/api/getCountries.js.map +1 -0
  234. package/dist/collection/components/utils/api/getCountryLandedCost.js +16 -0
  235. package/dist/collection/components/utils/api/getCountryLandedCost.js.map +1 -0
  236. package/dist/collection/components/utils/api/getExchangeRate.js +18 -0
  237. package/dist/collection/components/utils/api/getExchangeRate.js.map +1 -0
  238. package/dist/collection/components/utils/api/getLocaleMessages.js +13 -0
  239. package/dist/collection/components/utils/api/getLocaleMessages.js.map +1 -0
  240. package/dist/collection/components/utils/api/getLocalization.js +22 -0
  241. package/dist/collection/components/utils/api/getLocalization.js.map +1 -0
  242. package/dist/collection/components/utils/api/getShippingZones.js +14 -0
  243. package/dist/collection/components/utils/api/getShippingZones.js.map +1 -0
  244. package/dist/collection/components/utils/api/getZonosSetting.js +12 -0
  245. package/dist/collection/components/utils/api/getZonosSetting.js.map +1 -0
  246. package/dist/collection/components/utils/api/prepCalculateLandedCost.js +39 -0
  247. package/dist/collection/components/utils/api/prepCalculateLandedCost.js.map +1 -0
  248. package/dist/collection/components/utils/changeDeepProperty.js +43 -0
  249. package/dist/collection/components/utils/changeDeepProperty.js.map +1 -0
  250. package/dist/collection/components/utils/changeDeepPropertyAtIndex.js +66 -0
  251. package/dist/collection/components/utils/changeDeepPropertyAtIndex.js.map +1 -0
  252. package/dist/collection/components/utils/checkout/initCheckout.js +25 -0
  253. package/dist/collection/components/utils/checkout/initCheckout.js.map +1 -0
  254. package/dist/collection/components/utils/checkout/isCheckoutMobile.js +5 -0
  255. package/dist/collection/components/utils/checkout/isCheckoutMobile.js.map +1 -0
  256. package/dist/collection/components/utils/classes.js +11 -0
  257. package/dist/collection/components/utils/classes.js.map +1 -0
  258. package/dist/collection/components/utils/darkenColor.js +8 -0
  259. package/dist/collection/components/utils/darkenColor.js.map +1 -0
  260. package/dist/collection/components/utils/formatCurrency.js +10 -0
  261. package/dist/collection/components/utils/formatCurrency.js.map +1 -0
  262. package/dist/collection/components/utils/formatDate.js +5 -0
  263. package/dist/collection/components/utils/formatDate.js.map +1 -0
  264. package/dist/collection/components/utils/getBorderRadius.js +14 -0
  265. package/dist/collection/components/utils/getBorderRadius.js.map +1 -0
  266. package/dist/collection/components/utils/getButtonTheme.js +17 -0
  267. package/dist/collection/components/utils/getButtonTheme.js.map +1 -0
  268. package/dist/collection/components/utils/getDaysDifference.js +7 -0
  269. package/dist/collection/components/utils/getDaysDifference.js.map +1 -0
  270. package/dist/collection/components/utils/handleFetch.js +89 -0
  271. package/dist/collection/components/utils/handleFetch.js.map +1 -0
  272. package/dist/collection/components/utils/hello/currencyConversion/currencyConvert.js +13 -0
  273. package/dist/collection/components/utils/hello/currencyConversion/currencyConvert.js.map +1 -0
  274. package/dist/collection/components/utils/hello/currencyConversion/currencyConvertAndFormat.js +8 -0
  275. package/dist/collection/components/utils/hello/currencyConversion/currencyConvertAndFormat.js.map +1 -0
  276. package/dist/collection/components/utils/hello/currencyConversion/currencyDisplay.js +18 -0
  277. package/dist/collection/components/utils/hello/currencyConversion/currencyDisplay.js.map +1 -0
  278. package/dist/collection/components/utils/hello/currencyConversion/currencyFormat.js +33 -0
  279. package/dist/collection/components/utils/hello/currencyConversion/currencyFormat.js.map +1 -0
  280. package/dist/collection/components/utils/hello/currencyConversion/defaultCurrencyConverter.js +48 -0
  281. package/dist/collection/components/utils/hello/currencyConversion/defaultCurrencyConverter.js.map +1 -0
  282. package/dist/collection/components/utils/hello/currencyConversion/getCurrencyCode.js +10 -0
  283. package/dist/collection/components/utils/hello/currencyConversion/getCurrencyCode.js.map +1 -0
  284. package/dist/collection/components/utils/hello/currencyConversion/getCurrencyElements.js +19 -0
  285. package/dist/collection/components/utils/hello/currencyConversion/getCurrencyElements.js.map +1 -0
  286. package/dist/collection/components/utils/hello/currencyConversion/getInitialElementAmount.js +16 -0
  287. package/dist/collection/components/utils/hello/currencyConversion/getInitialElementAmount.js.map +1 -0
  288. package/dist/collection/components/utils/hello/currencyConversion/getLanguageCode.js +10 -0
  289. package/dist/collection/components/utils/hello/currencyConversion/getLanguageCode.js.map +1 -0
  290. package/dist/collection/components/utils/hello/getCurrentHelloLocalePage.js +20 -0
  291. package/dist/collection/components/utils/hello/getCurrentHelloLocalePage.js.map +1 -0
  292. package/dist/collection/components/utils/hello/getHasMoreSpaceOnRight.js +10 -0
  293. package/dist/collection/components/utils/hello/getHasMoreSpaceOnRight.js.map +1 -0
  294. package/dist/collection/components/utils/hello/initHello.js +23 -0
  295. package/dist/collection/components/utils/hello/initHello.js.map +1 -0
  296. package/dist/collection/components/utils/isColorVariable.js +13 -0
  297. package/dist/collection/components/utils/isColorVariable.js.map +1 -0
  298. package/dist/collection/components/utils/isDarkColor.js +5 -0
  299. package/dist/collection/components/utils/isDarkColor.js.map +1 -0
  300. package/dist/collection/components/utils/isValidSelector.js +17 -0
  301. package/dist/collection/components/utils/isValidSelector.js.map +1 -0
  302. package/dist/collection/components/utils/jsonParse.js +14 -0
  303. package/dist/collection/components/utils/jsonParse.js.map +1 -0
  304. package/dist/collection/components/utils/lightenColor.js +8 -0
  305. package/dist/collection/components/utils/lightenColor.js.map +1 -0
  306. package/dist/collection/components/utils/logging/log.js +25 -0
  307. package/dist/collection/components/utils/logging/log.js.map +1 -0
  308. package/dist/collection/components/utils/logging/logError.js +5 -0
  309. package/dist/collection/components/utils/logging/logError.js.map +1 -0
  310. package/dist/collection/components/utils/mergeConfig.js +12 -0
  311. package/dist/collection/components/utils/mergeConfig.js.map +1 -0
  312. package/dist/collection/components/utils/submitGtag.js +17 -0
  313. package/dist/collection/components/utils/submitGtag.js.map +1 -0
  314. package/dist/collection/environment.js +68 -0
  315. package/dist/collection/environment.js.map +1 -0
  316. package/dist/collection/index.js +2 -0
  317. package/dist/collection/index.js.map +1 -0
  318. package/dist/collection/scripts/loadStripe.js +17 -0
  319. package/dist/collection/scripts/loadStripe.js.map +1 -0
  320. package/dist/collection/scripts/stripe.js +115 -0
  321. package/dist/collection/scripts/stripe.js.map +1 -0
  322. package/dist/collection/scripts/zonos.js +164 -0
  323. package/dist/collection/scripts/zonos.js.map +1 -0
  324. package/dist/collection/styles/stripe/addressRuleStyle.js +17 -0
  325. package/dist/collection/styles/stripe/addressRuleStyle.js.map +1 -0
  326. package/dist/collection/styles/stripe/defaultVariable.js +18 -0
  327. package/dist/collection/styles/stripe/defaultVariable.js.map +1 -0
  328. package/dist/collection/types/ICountryJson.js +2 -0
  329. package/dist/collection/types/ICountryJson.js.map +1 -0
  330. package/dist/collection/types/JsonError.js +2 -0
  331. package/dist/collection/types/JsonError.js.map +1 -0
  332. package/dist/collection/types/NoInfer.js +2 -0
  333. package/dist/collection/types/NoInfer.js.map +1 -0
  334. package/dist/collection/types/Translation.js +2 -0
  335. package/dist/collection/types/Translation.js.map +1 -0
  336. package/dist/collection/types/checkout/CheckoutConfig.js +2 -0
  337. package/dist/collection/types/checkout/CheckoutConfig.js.map +1 -0
  338. package/dist/collection/types/checkout/api/CalculateLandedCostRequest.js +2 -0
  339. package/dist/collection/types/checkout/api/CalculateLandedCostRequest.js.map +1 -0
  340. package/dist/collection/types/generated/graphql.customer.types.js +1634 -0
  341. package/dist/collection/types/generated/graphql.customer.types.js.map +1 -0
  342. package/dist/collection/types/generated/graphql.frontend.types.js +396 -0
  343. package/dist/collection/types/generated/graphql.frontend.types.js.map +1 -0
  344. package/dist/collection/types/hello/HelloConfig.js +2 -0
  345. package/dist/collection/types/hello/HelloConfig.js.map +1 -0
  346. package/dist/collection/types/index.js +12 -0
  347. package/dist/collection/types/index.js.map +1 -0
  348. package/dist/collection/types/online-store/OnlineStoreConfig.js +2 -0
  349. package/dist/collection/types/online-store/OnlineStoreConfig.js.map +1 -0
  350. package/dist/collection/types/stripe/Apperance.js +60 -0
  351. package/dist/collection/types/stripe/Apperance.js.map +1 -0
  352. package/dist/collection/types/styles/Color.js +23 -0
  353. package/dist/collection/types/styles/Color.js.map +1 -0
  354. package/dist/collection/types/styles/GridSpacing.js +2 -0
  355. package/dist/collection/types/styles/GridSpacing.js.map +1 -0
  356. package/dist/collection/types/styles/Text.js +100 -0
  357. package/dist/collection/types/styles/Text.js.map +1 -0
  358. package/dist/collection/types/utils/deep/IDeepKeyof.js +4 -0
  359. package/dist/collection/types/utils/deep/IDeepKeyof.js.map +1 -0
  360. package/dist/collection/types/utils/deep/IDeepKeyofAtIndex.js +2 -0
  361. package/dist/collection/types/utils/deep/IDeepKeyofAtIndex.js.map +1 -0
  362. package/dist/collection/utils/format.js +4 -0
  363. package/dist/collection/utils/format.js.map +1 -0
  364. package/dist/collection/utils/generateVercelDeployUrl.js +29 -0
  365. package/dist/collection/utils/generateVercelDeployUrl.js.map +1 -0
  366. package/dist/components/classes.js +14 -0
  367. package/dist/components/classes.js.map +1 -0
  368. package/dist/components/formatCurrency.js +13 -0
  369. package/dist/components/formatCurrency.js.map +1 -0
  370. package/dist/components/getBorderRadius.js +18 -0
  371. package/dist/components/getBorderRadius.js.map +1 -0
  372. package/dist/components/index.d.ts +33 -0
  373. package/dist/components/index.js +3 -0
  374. package/dist/components/index.js.map +1 -0
  375. package/dist/components/isColorVariable.js +16 -0
  376. package/dist/components/isColorVariable.js.map +1 -0
  377. package/dist/components/isDarkColor.js +1197 -0
  378. package/dist/components/isDarkColor.js.map +1 -0
  379. package/dist/components/localization.js +3374 -0
  380. package/dist/components/localization.js.map +1 -0
  381. package/dist/components/stripe.js +591 -0
  382. package/dist/components/stripe.js.map +1 -0
  383. package/dist/components/submitGtag.js +21 -0
  384. package/dist/components/submitGtag.js.map +1 -0
  385. package/dist/components/zonos-address.d.ts +11 -0
  386. package/dist/components/zonos-address.js +8 -0
  387. package/dist/components/zonos-address.js.map +1 -0
  388. package/dist/components/zonos-address2.js +101 -0
  389. package/dist/components/zonos-address2.js.map +1 -0
  390. package/dist/components/zonos-badge.d.ts +11 -0
  391. package/dist/components/zonos-badge.js +8 -0
  392. package/dist/components/zonos-badge.js.map +1 -0
  393. package/dist/components/zonos-badge2.js +55 -0
  394. package/dist/components/zonos-badge2.js.map +1 -0
  395. package/dist/components/zonos-banner.d.ts +11 -0
  396. package/dist/components/zonos-banner.js +8 -0
  397. package/dist/components/zonos-banner.js.map +1 -0
  398. package/dist/components/zonos-banner2.js +90 -0
  399. package/dist/components/zonos-banner2.js.map +1 -0
  400. package/dist/components/zonos-button.d.ts +11 -0
  401. package/dist/components/zonos-button.js +8 -0
  402. package/dist/components/zonos-button.js.map +1 -0
  403. package/dist/components/zonos-button2.js +144 -0
  404. package/dist/components/zonos-button2.js.map +1 -0
  405. package/dist/components/zonos-card.d.ts +11 -0
  406. package/dist/components/zonos-card.js +8 -0
  407. package/dist/components/zonos-card.js.map +1 -0
  408. package/dist/components/zonos-card2.js +51 -0
  409. package/dist/components/zonos-card2.js.map +1 -0
  410. package/dist/components/zonos-cart-items.d.ts +11 -0
  411. package/dist/components/zonos-cart-items.js +8 -0
  412. package/dist/components/zonos-cart-items.js.map +1 -0
  413. package/dist/components/zonos-cart-items2.js +55 -0
  414. package/dist/components/zonos-cart-items2.js.map +1 -0
  415. package/dist/components/zonos-cart-subtotal.d.ts +11 -0
  416. package/dist/components/zonos-cart-subtotal.js +8 -0
  417. package/dist/components/zonos-cart-subtotal.js.map +1 -0
  418. package/dist/components/zonos-cart-subtotal2.js +87 -0
  419. package/dist/components/zonos-cart-subtotal2.js.map +1 -0
  420. package/dist/components/zonos-checkout-finish.d.ts +11 -0
  421. package/dist/components/zonos-checkout-finish.js +8 -0
  422. package/dist/components/zonos-checkout-finish.js.map +1 -0
  423. package/dist/components/zonos-checkout-finish2.js +119 -0
  424. package/dist/components/zonos-checkout-finish2.js.map +1 -0
  425. package/dist/components/zonos-checkout-payment.d.ts +11 -0
  426. package/dist/components/zonos-checkout-payment.js +8 -0
  427. package/dist/components/zonos-checkout-payment.js.map +1 -0
  428. package/dist/components/zonos-checkout-payment2.js +104 -0
  429. package/dist/components/zonos-checkout-payment2.js.map +1 -0
  430. package/dist/components/zonos-checkout.d.ts +11 -0
  431. package/dist/components/zonos-checkout.js +510 -0
  432. package/dist/components/zonos-checkout.js.map +1 -0
  433. package/dist/components/zonos-collapse.d.ts +11 -0
  434. package/dist/components/zonos-collapse.js +8 -0
  435. package/dist/components/zonos-collapse.js.map +1 -0
  436. package/dist/components/zonos-collapse2.js +57 -0
  437. package/dist/components/zonos-collapse2.js.map +1 -0
  438. package/dist/components/zonos-component.d.ts +11 -0
  439. package/dist/components/zonos-component.js +49 -0
  440. package/dist/components/zonos-component.js.map +1 -0
  441. package/dist/components/zonos-controller.d.ts +11 -0
  442. package/dist/components/zonos-controller.js +200 -0
  443. package/dist/components/zonos-controller.js.map +1 -0
  444. package/dist/components/zonos-country-flag.d.ts +11 -0
  445. package/dist/components/zonos-country-flag.js +8 -0
  446. package/dist/components/zonos-country-flag.js.map +1 -0
  447. package/dist/components/zonos-country-flag2.js +52 -0
  448. package/dist/components/zonos-country-flag2.js.map +1 -0
  449. package/dist/components/zonos-country-select.d.ts +11 -0
  450. package/dist/components/zonos-country-select.js +8 -0
  451. package/dist/components/zonos-country-select.js.map +1 -0
  452. package/dist/components/zonos-country-select2.js +1878 -0
  453. package/dist/components/zonos-country-select2.js.map +1 -0
  454. package/dist/components/zonos-custom-message.d.ts +11 -0
  455. package/dist/components/zonos-custom-message.js +8 -0
  456. package/dist/components/zonos-custom-message.js.map +1 -0
  457. package/dist/components/zonos-custom-message2.js +55 -0
  458. package/dist/components/zonos-custom-message2.js.map +1 -0
  459. package/dist/components/zonos-customer-info.d.ts +11 -0
  460. package/dist/components/zonos-customer-info.js +8 -0
  461. package/dist/components/zonos-customer-info.js.map +1 -0
  462. package/dist/components/zonos-customer-info2.js +103 -0
  463. package/dist/components/zonos-customer-info2.js.map +1 -0
  464. package/dist/components/zonos-dialog.d.ts +11 -0
  465. package/dist/components/zonos-dialog.js +8 -0
  466. package/dist/components/zonos-dialog.js.map +1 -0
  467. package/dist/components/zonos-dialog2.js +123 -0
  468. package/dist/components/zonos-dialog2.js.map +1 -0
  469. package/dist/components/zonos-hello-dialog-footer.d.ts +11 -0
  470. package/dist/components/zonos-hello-dialog-footer.js +8 -0
  471. package/dist/components/zonos-hello-dialog-footer.js.map +1 -0
  472. package/dist/components/zonos-hello-dialog-footer2.js +71 -0
  473. package/dist/components/zonos-hello-dialog-footer2.js.map +1 -0
  474. package/dist/components/zonos-hello-dialog.d.ts +11 -0
  475. package/dist/components/zonos-hello-dialog.js +8 -0
  476. package/dist/components/zonos-hello-dialog.js.map +1 -0
  477. package/dist/components/zonos-hello-dialog2.js +202 -0
  478. package/dist/components/zonos-hello-dialog2.js.map +1 -0
  479. package/dist/components/zonos-hello.d.ts +11 -0
  480. package/dist/components/zonos-hello.js +576 -0
  481. package/dist/components/zonos-hello.js.map +1 -0
  482. package/dist/components/zonos-icon.d.ts +11 -0
  483. package/dist/components/zonos-icon.js +8 -0
  484. package/dist/components/zonos-icon.js.map +1 -0
  485. package/dist/components/zonos-icon2.js +50 -0
  486. package/dist/components/zonos-icon2.js.map +1 -0
  487. package/dist/components/zonos-link-authentication.d.ts +11 -0
  488. package/dist/components/zonos-link-authentication.js +8 -0
  489. package/dist/components/zonos-link-authentication.js.map +1 -0
  490. package/dist/components/zonos-link-authentication2.js +75 -0
  491. package/dist/components/zonos-link-authentication2.js.map +1 -0
  492. package/dist/components/zonos-logo.d.ts +11 -0
  493. package/dist/components/zonos-logo.js +8 -0
  494. package/dist/components/zonos-logo.js.map +1 -0
  495. package/dist/components/zonos-logo2.js +47 -0
  496. package/dist/components/zonos-logo2.js.map +1 -0
  497. package/dist/components/zonos-notification.d.ts +11 -0
  498. package/dist/components/zonos-notification.js +8 -0
  499. package/dist/components/zonos-notification.js.map +1 -0
  500. package/dist/components/zonos-notification2.js +92 -0
  501. package/dist/components/zonos-notification2.js.map +1 -0
  502. package/dist/components/zonos-payment.d.ts +11 -0
  503. package/dist/components/zonos-payment.js +8 -0
  504. package/dist/components/zonos-payment.js.map +1 -0
  505. package/dist/components/zonos-payment2.js +79 -0
  506. package/dist/components/zonos-payment2.js.map +1 -0
  507. package/dist/components/zonos-review.d.ts +11 -0
  508. package/dist/components/zonos-review.js +8 -0
  509. package/dist/components/zonos-review.js.map +1 -0
  510. package/dist/components/zonos-review2.js +98 -0
  511. package/dist/components/zonos-review2.js.map +1 -0
  512. package/dist/components/zonos-shipping-rich-radio.d.ts +11 -0
  513. package/dist/components/zonos-shipping-rich-radio.js +8 -0
  514. package/dist/components/zonos-shipping-rich-radio.js.map +1 -0
  515. package/dist/components/zonos-shipping-rich-radio2.js +77 -0
  516. package/dist/components/zonos-shipping-rich-radio2.js.map +1 -0
  517. package/dist/components/zonos-shipping.d.ts +11 -0
  518. package/dist/components/zonos-shipping.js +8 -0
  519. package/dist/components/zonos-shipping.js.map +1 -0
  520. package/dist/components/zonos-shipping2.js +136 -0
  521. package/dist/components/zonos-shipping2.js.map +1 -0
  522. package/dist/components/zonos-spinner.d.ts +11 -0
  523. package/dist/components/zonos-spinner.js +8 -0
  524. package/dist/components/zonos-spinner.js.map +1 -0
  525. package/dist/components/zonos-spinner2.js +44 -0
  526. package/dist/components/zonos-spinner2.js.map +1 -0
  527. package/dist/components/zonos-text.d.ts +11 -0
  528. package/dist/components/zonos-text.js +8 -0
  529. package/dist/components/zonos-text.js.map +1 -0
  530. package/dist/components/zonos-text2.js +179 -0
  531. package/dist/components/zonos-text2.js.map +1 -0
  532. package/dist/components/zonos-v-stack.d.ts +11 -0
  533. package/dist/components/zonos-v-stack.js +8 -0
  534. package/dist/components/zonos-v-stack.js.map +1 -0
  535. package/dist/components/zonos-v-stack2.js +38 -0
  536. package/dist/components/zonos-v-stack2.js.map +1 -0
  537. package/dist/components/zonosStore.js +2639 -0
  538. package/dist/components/zonosStore.js.map +1 -0
  539. package/dist/esm/cart-36c33342.js +591 -0
  540. package/dist/esm/cart-36c33342.js.map +1 -0
  541. package/dist/esm/classes-0d95c529.js +14 -0
  542. package/dist/esm/classes-0d95c529.js.map +1 -0
  543. package/dist/esm/getBorderRadius-82fbaf25.js +18 -0
  544. package/dist/esm/getBorderRadius-82fbaf25.js.map +1 -0
  545. package/dist/esm/getHasMoreSpaceOnRight-feba1ae2.js +10 -0
  546. package/dist/esm/getHasMoreSpaceOnRight-feba1ae2.js.map +1 -0
  547. package/dist/esm/index-d1aa9293.js +1884 -0
  548. package/dist/esm/index-d1aa9293.js.map +1 -0
  549. package/dist/esm/index.js +3 -0
  550. package/dist/esm/index.js.map +1 -0
  551. package/dist/esm/isColorVariable-4cda28c9.js +16 -0
  552. package/dist/esm/isColorVariable-4cda28c9.js.map +1 -0
  553. package/dist/esm/isDarkColor-b21326ae.js +1197 -0
  554. package/dist/esm/isDarkColor-b21326ae.js.map +1 -0
  555. package/dist/esm/loader.js +11 -0
  556. package/dist/esm/loader.js.map +1 -0
  557. package/dist/esm/localization-4a424f49.js +3374 -0
  558. package/dist/esm/localization-4a424f49.js.map +1 -0
  559. package/dist/esm/polyfills/core-js.js +11 -0
  560. package/dist/esm/polyfills/dom.js +79 -0
  561. package/dist/esm/polyfills/es5-html-element.js +1 -0
  562. package/dist/esm/polyfills/index.js +34 -0
  563. package/dist/esm/polyfills/system.js +6 -0
  564. package/dist/esm/submitGtag-fbdb454b.js +26 -0
  565. package/dist/esm/submitGtag-fbdb454b.js.map +1 -0
  566. package/dist/esm/zonos-address_2.entry.js +121 -0
  567. package/dist/esm/zonos-address_2.entry.js.map +1 -0
  568. package/dist/esm/zonos-badge.entry.js +32 -0
  569. package/dist/esm/zonos-badge.entry.js.map +1 -0
  570. package/dist/esm/zonos-banner_2.entry.js +115 -0
  571. package/dist/esm/zonos-banner_2.entry.js.map +1 -0
  572. package/dist/esm/zonos-button_2.entry.js +124 -0
  573. package/dist/esm/zonos-button_2.entry.js.map +1 -0
  574. package/dist/esm/zonos-card_2.entry.js +42 -0
  575. package/dist/esm/zonos-card_2.entry.js.map +1 -0
  576. package/dist/esm/zonos-cart-items_10.entry.js +492 -0
  577. package/dist/esm/zonos-cart-items_10.entry.js.map +1 -0
  578. package/dist/esm/zonos-checkout.entry.js +333 -0
  579. package/dist/esm/zonos-checkout.entry.js.map +1 -0
  580. package/dist/esm/zonos-component.entry.js +27 -0
  581. package/dist/esm/zonos-component.entry.js.map +1 -0
  582. package/dist/esm/zonos-controller.entry.js +165 -0
  583. package/dist/esm/zonos-controller.entry.js.map +1 -0
  584. package/dist/esm/zonos-country-flag_4.entry.js +1895 -0
  585. package/dist/esm/zonos-country-flag_4.entry.js.map +1 -0
  586. package/dist/esm/zonos-elements.js +20 -0
  587. package/dist/esm/zonos-elements.js.map +1 -0
  588. package/dist/esm/zonos-hello-dialog.entry.js +111 -0
  589. package/dist/esm/zonos-hello-dialog.entry.js.map +1 -0
  590. package/dist/esm/zonos-hello.entry.js +481 -0
  591. package/dist/esm/zonos-hello.entry.js.map +1 -0
  592. package/dist/esm/zonos-icon.entry.js +30 -0
  593. package/dist/esm/zonos-icon.entry.js.map +1 -0
  594. package/dist/esm/zonos-notification.entry.js +67 -0
  595. package/dist/esm/zonos-notification.entry.js.map +1 -0
  596. package/dist/esm/zonos-shipping-rich-radio.entry.js +50 -0
  597. package/dist/esm/zonos-shipping-rich-radio.entry.js.map +1 -0
  598. package/dist/esm/zonos-text.entry.js +156 -0
  599. package/dist/esm/zonos-text.entry.js.map +1 -0
  600. package/dist/esm/zonosStore-13a7b534.js +2639 -0
  601. package/dist/esm/zonosStore-13a7b534.js.map +1 -0
  602. package/dist/esm-es5/cart-36c33342.js +2 -0
  603. package/dist/esm-es5/cart-36c33342.js.map +1 -0
  604. package/dist/esm-es5/classes-0d95c529.js +2 -0
  605. package/dist/esm-es5/classes-0d95c529.js.map +1 -0
  606. package/dist/esm-es5/getBorderRadius-82fbaf25.js +2 -0
  607. package/dist/esm-es5/getBorderRadius-82fbaf25.js.map +1 -0
  608. package/dist/esm-es5/getHasMoreSpaceOnRight-feba1ae2.js +2 -0
  609. package/dist/esm-es5/getHasMoreSpaceOnRight-feba1ae2.js.map +1 -0
  610. package/dist/esm-es5/index-d1aa9293.js +3 -0
  611. package/dist/esm-es5/index-d1aa9293.js.map +1 -0
  612. package/dist/esm-es5/index.js +2 -0
  613. package/dist/esm-es5/index.js.map +1 -0
  614. package/dist/esm-es5/isColorVariable-4cda28c9.js +2 -0
  615. package/dist/esm-es5/isColorVariable-4cda28c9.js.map +1 -0
  616. package/dist/esm-es5/isDarkColor-b21326ae.js +2 -0
  617. package/dist/esm-es5/isDarkColor-b21326ae.js.map +1 -0
  618. package/dist/esm-es5/loader.js +2 -0
  619. package/dist/esm-es5/loader.js.map +1 -0
  620. package/dist/esm-es5/localization-4a424f49.js +2 -0
  621. package/dist/esm-es5/localization-4a424f49.js.map +1 -0
  622. package/dist/esm-es5/submitGtag-fbdb454b.js +2 -0
  623. package/dist/esm-es5/submitGtag-fbdb454b.js.map +1 -0
  624. package/dist/esm-es5/zonos-address_2.entry.js +2 -0
  625. package/dist/esm-es5/zonos-address_2.entry.js.map +1 -0
  626. package/dist/esm-es5/zonos-badge.entry.js +2 -0
  627. package/dist/esm-es5/zonos-badge.entry.js.map +1 -0
  628. package/dist/esm-es5/zonos-banner_2.entry.js +2 -0
  629. package/dist/esm-es5/zonos-banner_2.entry.js.map +1 -0
  630. package/dist/esm-es5/zonos-button_2.entry.js +2 -0
  631. package/dist/esm-es5/zonos-button_2.entry.js.map +1 -0
  632. package/dist/esm-es5/zonos-card_2.entry.js +2 -0
  633. package/dist/esm-es5/zonos-card_2.entry.js.map +1 -0
  634. package/dist/esm-es5/zonos-cart-items_10.entry.js +2 -0
  635. package/dist/esm-es5/zonos-cart-items_10.entry.js.map +1 -0
  636. package/dist/esm-es5/zonos-checkout.entry.js +2 -0
  637. package/dist/esm-es5/zonos-checkout.entry.js.map +1 -0
  638. package/dist/esm-es5/zonos-component.entry.js +2 -0
  639. package/dist/esm-es5/zonos-component.entry.js.map +1 -0
  640. package/dist/esm-es5/zonos-controller.entry.js +2 -0
  641. package/dist/esm-es5/zonos-controller.entry.js.map +1 -0
  642. package/dist/esm-es5/zonos-country-flag_4.entry.js +2 -0
  643. package/dist/esm-es5/zonos-country-flag_4.entry.js.map +1 -0
  644. package/dist/esm-es5/zonos-elements.js +2 -0
  645. package/dist/esm-es5/zonos-elements.js.map +1 -0
  646. package/dist/esm-es5/zonos-hello-dialog.entry.js +2 -0
  647. package/dist/esm-es5/zonos-hello-dialog.entry.js.map +1 -0
  648. package/dist/esm-es5/zonos-hello.entry.js +2 -0
  649. package/dist/esm-es5/zonos-hello.entry.js.map +1 -0
  650. package/dist/esm-es5/zonos-icon.entry.js +2 -0
  651. package/dist/esm-es5/zonos-icon.entry.js.map +1 -0
  652. package/dist/esm-es5/zonos-notification.entry.js +2 -0
  653. package/dist/esm-es5/zonos-notification.entry.js.map +1 -0
  654. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +2 -0
  655. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js.map +1 -0
  656. package/dist/esm-es5/zonos-text.entry.js +2 -0
  657. package/dist/esm-es5/zonos-text.entry.js.map +1 -0
  658. package/dist/esm-es5/zonosStore-13a7b534.js +2 -0
  659. package/dist/esm-es5/zonosStore-13a7b534.js.map +1 -0
  660. package/dist/index.cjs.js +1 -0
  661. package/dist/index.js +1 -0
  662. package/dist/types/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.d.ts +4 -0
  663. package/dist/types/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.d.ts +3 -0
  664. package/dist/types/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.d.ts +36 -0
  665. package/dist/types/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.d.ts +34 -0
  666. package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +86 -0
  667. package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +35 -0
  668. package/dist/types/components/checkout/zonos-checkout/zonos-review/zonos-review.d.ts +16 -0
  669. package/dist/types/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.d.ts +33 -0
  670. package/dist/types/components/common/countries.d.ts +3 -0
  671. package/dist/types/components/common/zonos-badge/zonos-badge.d.ts +38 -0
  672. package/dist/types/components/common/zonos-banner/zonos-banner.d.ts +24 -0
  673. package/dist/types/components/common/zonos-button/zonos-button.d.ts +96 -0
  674. package/dist/types/components/common/zonos-card/zonos-card.d.ts +31 -0
  675. package/dist/types/components/common/zonos-collapse/zonos-collapse.d.ts +16 -0
  676. package/dist/types/components/common/zonos-country-flag/zonos-country-flag.d.ts +19 -0
  677. package/dist/types/components/common/zonos-country-select/zonos-country-select.d.ts +11 -0
  678. package/dist/types/components/common/zonos-custom-message/zonos-custom-message.d.ts +11 -0
  679. package/dist/types/components/common/zonos-dialog/zonos-dialog.d.ts +79 -0
  680. package/dist/types/components/common/zonos-icon/zonos-icon.d.ts +30 -0
  681. package/dist/types/components/common/zonos-logo/zonos-logo.d.ts +16 -0
  682. package/dist/types/components/common/zonos-notification/zonos-notification.d.ts +35 -0
  683. package/dist/types/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.d.ts +41 -0
  684. package/dist/types/components/common/zonos-spinner/zonos-spinner.d.ts +14 -0
  685. package/dist/types/components/common/zonos-text/zonos-text.d.ts +34 -0
  686. package/dist/types/components/common/zonos-v-stack/zonos-v-stack.d.ts +13 -0
  687. package/dist/types/components/component-template/zonos-component/zonos-component.d.ts +16 -0
  688. package/dist/types/components/hello/zonos-hello/zonos-hello.d.ts +50 -0
  689. package/dist/types/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.d.ts +13 -0
  690. package/dist/types/components/hello/zonos-hello-dialog/zonos-hello-dialog.d.ts +40 -0
  691. package/dist/types/components/main/zonos-controller.d.ts +44 -0
  692. package/dist/types/components/store/checkout/cart.d.ts +68 -0
  693. package/dist/types/components/store/checkout/stripe.d.ts +71 -0
  694. package/dist/types/components/store/hello/localization.d.ts +30 -0
  695. package/dist/types/components/store/translationStore/strings.arabic.d.ts +140 -0
  696. package/dist/types/components/store/translationStore/strings.base.d.ts +140 -0
  697. package/dist/types/components/store/translationStore/strings.chinese.d.ts +140 -0
  698. package/dist/types/components/store/translationStore/strings.danish.d.ts +140 -0
  699. package/dist/types/components/store/translationStore/strings.dutch.d.ts +140 -0
  700. package/dist/types/components/store/translationStore/strings.french.d.ts +140 -0
  701. package/dist/types/components/store/translationStore/strings.german.d.ts +140 -0
  702. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +140 -0
  703. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +140 -0
  704. package/dist/types/components/store/translationStore/strings.italian.d.ts +140 -0
  705. package/dist/types/components/store/translationStore/strings.japanese.d.ts +140 -0
  706. package/dist/types/components/store/translationStore/strings.korean.d.ts +140 -0
  707. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +140 -0
  708. package/dist/types/components/store/translationStore/strings.polish.d.ts +140 -0
  709. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +140 -0
  710. package/dist/types/components/store/translationStore/strings.russian.d.ts +140 -0
  711. package/dist/types/components/store/translationStore/strings.spanish.d.ts +140 -0
  712. package/dist/types/components/store/translationStore/strings.swedish.d.ts +140 -0
  713. package/dist/types/components/store/translationStore/strings.turkish.d.ts +140 -0
  714. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +140 -0
  715. package/dist/types/components/store/translationStore.d.ts +11 -0
  716. package/dist/types/components/store/zonosStore.d.ts +39 -0
  717. package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +20 -0
  718. package/dist/types/components/stripe/zonos-link-authentication/zonos-link-authentication.d.ts +12 -0
  719. package/dist/types/components/stripe/zonos-payment/zonos-payment.d.ts +13 -0
  720. package/dist/types/components/utils/addDays.d.ts +14 -0
  721. package/dist/types/components/utils/api/calculateLandedCost.d.ts +2 -0
  722. package/dist/types/components/utils/api/getCountries.d.ts +2 -0
  723. package/dist/types/components/utils/api/getCountryLandedCost.d.ts +10 -0
  724. package/dist/types/components/utils/api/getExchangeRate.d.ts +16 -0
  725. package/dist/types/components/utils/api/getLocaleMessages.d.ts +20 -0
  726. package/dist/types/components/utils/api/getLocalization.d.ts +8 -0
  727. package/dist/types/components/utils/api/getShippingZones.d.ts +1 -0
  728. package/dist/types/components/utils/api/getZonosSetting.d.ts +8 -0
  729. package/dist/types/components/utils/api/prepCalculateLandedCost.d.ts +2 -0
  730. package/dist/types/components/utils/changeDeepProperty.d.ts +44 -0
  731. package/dist/types/components/utils/changeDeepPropertyAtIndex.d.ts +68 -0
  732. package/dist/types/components/utils/checkout/initCheckout.d.ts +2 -0
  733. package/dist/types/components/utils/checkout/isCheckoutMobile.d.ts +2 -0
  734. package/dist/types/components/utils/classes.d.ts +10 -0
  735. package/dist/types/components/utils/darkenColor.d.ts +4 -0
  736. package/dist/types/components/utils/formatCurrency.d.ts +5 -0
  737. package/dist/types/components/utils/formatDate.d.ts +10 -0
  738. package/dist/types/components/utils/getBorderRadius.d.ts +7 -0
  739. package/dist/types/components/utils/getButtonTheme.d.ts +4 -0
  740. package/dist/types/components/utils/getDaysDifference.d.ts +1 -0
  741. package/dist/types/components/utils/handleFetch.d.ts +15 -0
  742. package/dist/types/components/utils/hello/currencyConversion/currencyConvert.d.ts +1 -0
  743. package/dist/types/components/utils/hello/currencyConversion/currencyConvertAndFormat.d.ts +1 -0
  744. package/dist/types/components/utils/hello/currencyConversion/currencyDisplay.d.ts +1 -0
  745. package/dist/types/components/utils/hello/currencyConversion/currencyFormat.d.ts +1 -0
  746. package/dist/types/components/utils/hello/currencyConversion/defaultCurrencyConverter.d.ts +1 -0
  747. package/dist/types/components/utils/hello/currencyConversion/getCurrencyCode.d.ts +3 -0
  748. package/dist/types/components/utils/hello/currencyConversion/getCurrencyElements.d.ts +1 -0
  749. package/dist/types/components/utils/hello/currencyConversion/getInitialElementAmount.d.ts +1 -0
  750. package/dist/types/components/utils/hello/currencyConversion/getLanguageCode.d.ts +2 -0
  751. package/dist/types/components/utils/hello/getCurrentHelloLocalePage.d.ts +1 -0
  752. package/dist/types/components/utils/hello/getHasMoreSpaceOnRight.d.ts +1 -0
  753. package/dist/types/components/utils/hello/initHello.d.ts +2 -0
  754. package/dist/types/components/utils/isColorVariable.d.ts +1 -0
  755. package/dist/types/components/utils/isDarkColor.d.ts +1 -0
  756. package/dist/types/components/utils/isValidSelector.d.ts +7 -0
  757. package/dist/types/components/utils/jsonParse.d.ts +1 -0
  758. package/dist/types/components/utils/lightenColor.d.ts +4 -0
  759. package/dist/types/components/utils/logging/log.d.ts +3 -0
  760. package/dist/types/components/utils/logging/logError.d.ts +1 -0
  761. package/dist/types/components/utils/mergeConfig.d.ts +9 -0
  762. package/dist/types/components/utils/submitGtag.d.ts +11 -0
  763. package/dist/types/components.d.ts +1603 -0
  764. package/dist/types/environment.d.ts +36 -0
  765. package/dist/types/index.d.ts +1 -0
  766. package/dist/types/scripts/loadStripe.d.ts +2 -0
  767. package/dist/types/scripts/stripe.d.ts +13 -0
  768. package/dist/types/scripts/zonos.d.ts +42 -0
  769. package/dist/types/stencil-public-runtime.d.ts +1652 -0
  770. package/dist/types/styles/stripe/addressRuleStyle.d.ts +4 -0
  771. package/dist/types/styles/stripe/defaultVariable.d.ts +6 -0
  772. package/dist/types/types/ICountryJson.d.ts +29 -0
  773. package/dist/types/types/JsonError.d.ts +5 -0
  774. package/dist/types/types/NoInfer.d.ts +5 -0
  775. package/dist/types/types/Translation.d.ts +3 -0
  776. package/dist/types/types/checkout/CheckoutConfig.d.ts +55 -0
  777. package/dist/types/types/checkout/api/CalculateLandedCostRequest.d.ts +19 -0
  778. package/dist/types/types/generated/graphql.customer.types.d.ts +2352 -0
  779. package/dist/types/types/generated/graphql.customer.types.ts +2688 -0
  780. package/dist/types/types/generated/graphql.frontend.types.d.ts +502 -0
  781. package/dist/types/types/generated/graphql.frontend.types.ts +527 -0
  782. package/dist/types/types/global.d.ts +19 -0
  783. package/dist/types/types/hello/HelloConfig.d.ts +19 -0
  784. package/dist/types/types/index.d.ts +10 -0
  785. package/dist/types/types/online-store/OnlineStoreConfig.d.ts +3 -0
  786. package/dist/types/types/stripe/Apperance.d.ts +19 -0
  787. package/dist/types/types/styles/Color.d.ts +5 -0
  788. package/dist/types/types/styles/GridSpacing.d.ts +2 -0
  789. package/dist/types/types/styles/Text.d.ts +97 -0
  790. package/dist/types/types/ts-reset/common.d.ts +9 -0
  791. package/dist/types/types/ts-reset/fetch.d.ts +4 -0
  792. package/dist/types/types/ts-reset/reset.d.ts +2 -0
  793. package/dist/types/types/utils/deep/IDeepKeyof.d.ts +20 -0
  794. package/dist/types/types/utils/deep/IDeepKeyofAtIndex.d.ts +14 -0
  795. package/dist/types/utils/format.d.ts +1 -0
  796. package/dist/types/utils/generateVercelDeployUrl.d.ts +11 -0
  797. package/dist/zonos-elements/assets/ChevronDownIcon.svg +1 -0
  798. package/dist/zonos-elements/assets/ChevronUpIcon.svg +1 -0
  799. package/dist/zonos-elements/assets/InfoIcon.svg +4 -0
  800. package/dist/zonos-elements/assets/LeftArrow.svg +1 -0
  801. package/dist/zonos-elements/assets/MessageIcon.svg +3 -0
  802. package/dist/zonos-elements/assets/RemoveIcon.svg +1 -0
  803. package/dist/zonos-elements/assets/SuccessIcon.svg +1 -0
  804. package/dist/zonos-elements/assets/ZonosLogo.png +0 -0
  805. package/dist/zonos-elements/assets/bagIcon.svg +3 -0
  806. package/dist/zonos-elements/assets/empty-item.jpeg +0 -0
  807. package/dist/zonos-elements/assets/messageIcon.svg +3 -0
  808. package/dist/zonos-elements/assets/moneyIcon.svg +3 -0
  809. package/dist/zonos-elements/assets/removeIcon.svg +1 -0
  810. package/dist/zonos-elements/cart-36c33342.js +591 -0
  811. package/dist/zonos-elements/cart-36c33342.js.map +1 -0
  812. package/dist/zonos-elements/cart-ecd9011b.system.js +2 -0
  813. package/dist/zonos-elements/cart-ecd9011b.system.js.map +1 -0
  814. package/dist/zonos-elements/classes-0d95c529.js +14 -0
  815. package/dist/zonos-elements/classes-0d95c529.js.map +1 -0
  816. package/dist/zonos-elements/classes-ce25a814.system.js +2 -0
  817. package/dist/zonos-elements/classes-ce25a814.system.js.map +1 -0
  818. package/dist/zonos-elements/getBorderRadius-4fbe49de.system.js +2 -0
  819. package/dist/zonos-elements/getBorderRadius-4fbe49de.system.js.map +1 -0
  820. package/dist/zonos-elements/getBorderRadius-82fbaf25.js +18 -0
  821. package/dist/zonos-elements/getBorderRadius-82fbaf25.js.map +1 -0
  822. package/dist/zonos-elements/getHasMoreSpaceOnRight-5a9efd60.system.js +2 -0
  823. package/dist/zonos-elements/getHasMoreSpaceOnRight-5a9efd60.system.js.map +1 -0
  824. package/dist/zonos-elements/getHasMoreSpaceOnRight-feba1ae2.js +10 -0
  825. package/dist/zonos-elements/getHasMoreSpaceOnRight-feba1ae2.js.map +1 -0
  826. package/dist/zonos-elements/index-87193773.system.js +3 -0
  827. package/dist/zonos-elements/index-87193773.system.js.map +1 -0
  828. package/dist/zonos-elements/index-d1aa9293.js +1884 -0
  829. package/dist/zonos-elements/index-d1aa9293.js.map +1 -0
  830. package/dist/zonos-elements/index.esm.js +3 -0
  831. package/dist/zonos-elements/index.esm.js.map +1 -0
  832. package/dist/zonos-elements/index.system.js +2 -0
  833. package/dist/zonos-elements/index.system.js.map +1 -0
  834. package/dist/zonos-elements/isColorVariable-4cda28c9.js +16 -0
  835. package/dist/zonos-elements/isColorVariable-4cda28c9.js.map +1 -0
  836. package/dist/zonos-elements/isColorVariable-be454101.system.js +2 -0
  837. package/dist/zonos-elements/isColorVariable-be454101.system.js.map +1 -0
  838. package/dist/zonos-elements/isDarkColor-b21326ae.js +1197 -0
  839. package/dist/zonos-elements/isDarkColor-b21326ae.js.map +1 -0
  840. package/dist/zonos-elements/isDarkColor-dc2b7c8f.system.js +2 -0
  841. package/dist/zonos-elements/isDarkColor-dc2b7c8f.system.js.map +1 -0
  842. package/dist/zonos-elements/localization-3c43290f.system.js +2 -0
  843. package/dist/zonos-elements/localization-3c43290f.system.js.map +1 -0
  844. package/dist/zonos-elements/localization-4a424f49.js +3374 -0
  845. package/dist/zonos-elements/localization-4a424f49.js.map +1 -0
  846. package/dist/zonos-elements/submitGtag-23ecdc20.system.js +2 -0
  847. package/dist/zonos-elements/submitGtag-23ecdc20.system.js.map +1 -0
  848. package/dist/zonos-elements/submitGtag-fbdb454b.js +26 -0
  849. package/dist/zonos-elements/submitGtag-fbdb454b.js.map +1 -0
  850. package/dist/zonos-elements/zonos-address_2.entry.js +121 -0
  851. package/dist/zonos-elements/zonos-address_2.entry.js.map +1 -0
  852. package/dist/zonos-elements/zonos-address_2.system.entry.js +2 -0
  853. package/dist/zonos-elements/zonos-address_2.system.entry.js.map +1 -0
  854. package/dist/zonos-elements/zonos-badge.entry.js +32 -0
  855. package/dist/zonos-elements/zonos-badge.entry.js.map +1 -0
  856. package/dist/zonos-elements/zonos-badge.system.entry.js +2 -0
  857. package/dist/zonos-elements/zonos-badge.system.entry.js.map +1 -0
  858. package/dist/zonos-elements/zonos-banner_2.entry.js +115 -0
  859. package/dist/zonos-elements/zonos-banner_2.entry.js.map +1 -0
  860. package/dist/zonos-elements/zonos-banner_2.system.entry.js +2 -0
  861. package/dist/zonos-elements/zonos-banner_2.system.entry.js.map +1 -0
  862. package/dist/zonos-elements/zonos-button_2.entry.js +124 -0
  863. package/dist/zonos-elements/zonos-button_2.entry.js.map +1 -0
  864. package/dist/zonos-elements/zonos-button_2.system.entry.js +2 -0
  865. package/dist/zonos-elements/zonos-button_2.system.entry.js.map +1 -0
  866. package/dist/zonos-elements/zonos-card_2.entry.js +42 -0
  867. package/dist/zonos-elements/zonos-card_2.entry.js.map +1 -0
  868. package/dist/zonos-elements/zonos-card_2.system.entry.js +2 -0
  869. package/dist/zonos-elements/zonos-card_2.system.entry.js.map +1 -0
  870. package/dist/zonos-elements/zonos-cart-items_10.entry.js +492 -0
  871. package/dist/zonos-elements/zonos-cart-items_10.entry.js.map +1 -0
  872. package/dist/zonos-elements/zonos-cart-items_10.system.entry.js +2 -0
  873. package/dist/zonos-elements/zonos-cart-items_10.system.entry.js.map +1 -0
  874. package/dist/zonos-elements/zonos-checkout.entry.js +333 -0
  875. package/dist/zonos-elements/zonos-checkout.entry.js.map +1 -0
  876. package/dist/zonos-elements/zonos-checkout.system.entry.js +2 -0
  877. package/dist/zonos-elements/zonos-checkout.system.entry.js.map +1 -0
  878. package/dist/zonos-elements/zonos-component.entry.js +27 -0
  879. package/dist/zonos-elements/zonos-component.entry.js.map +1 -0
  880. package/dist/zonos-elements/zonos-component.system.entry.js +2 -0
  881. package/dist/zonos-elements/zonos-component.system.entry.js.map +1 -0
  882. package/dist/zonos-elements/zonos-controller.entry.js +165 -0
  883. package/dist/zonos-elements/zonos-controller.entry.js.map +1 -0
  884. package/dist/zonos-elements/zonos-controller.system.entry.js +2 -0
  885. package/dist/zonos-elements/zonos-controller.system.entry.js.map +1 -0
  886. package/dist/zonos-elements/zonos-country-flag_4.entry.js +1895 -0
  887. package/dist/zonos-elements/zonos-country-flag_4.entry.js.map +1 -0
  888. package/dist/zonos-elements/zonos-country-flag_4.system.entry.js +2 -0
  889. package/dist/zonos-elements/zonos-country-flag_4.system.entry.js.map +1 -0
  890. package/dist/zonos-elements/zonos-elements.css +37 -0
  891. package/dist/zonos-elements/zonos-elements.esm.js +20 -0
  892. package/dist/zonos-elements/zonos-elements.esm.js.map +1 -0
  893. package/dist/zonos-elements/zonos-elements.js +127 -0
  894. package/dist/zonos-elements/zonos-elements.system.js +2 -0
  895. package/dist/zonos-elements/zonos-elements.system.js.map +1 -0
  896. package/dist/zonos-elements/zonos-hello-dialog.entry.js +111 -0
  897. package/dist/zonos-elements/zonos-hello-dialog.entry.js.map +1 -0
  898. package/dist/zonos-elements/zonos-hello-dialog.system.entry.js +2 -0
  899. package/dist/zonos-elements/zonos-hello-dialog.system.entry.js.map +1 -0
  900. package/dist/zonos-elements/zonos-hello.entry.js +481 -0
  901. package/dist/zonos-elements/zonos-hello.entry.js.map +1 -0
  902. package/dist/zonos-elements/zonos-hello.system.entry.js +2 -0
  903. package/dist/zonos-elements/zonos-hello.system.entry.js.map +1 -0
  904. package/dist/zonos-elements/zonos-icon.entry.js +30 -0
  905. package/dist/zonos-elements/zonos-icon.entry.js.map +1 -0
  906. package/dist/zonos-elements/zonos-icon.system.entry.js +2 -0
  907. package/dist/zonos-elements/zonos-icon.system.entry.js.map +1 -0
  908. package/dist/zonos-elements/zonos-notification.entry.js +67 -0
  909. package/dist/zonos-elements/zonos-notification.entry.js.map +1 -0
  910. package/dist/zonos-elements/zonos-notification.system.entry.js +2 -0
  911. package/dist/zonos-elements/zonos-notification.system.entry.js.map +1 -0
  912. package/dist/zonos-elements/zonos-shipping-rich-radio.entry.js +50 -0
  913. package/dist/zonos-elements/zonos-shipping-rich-radio.entry.js.map +1 -0
  914. package/dist/zonos-elements/zonos-shipping-rich-radio.system.entry.js +2 -0
  915. package/dist/zonos-elements/zonos-shipping-rich-radio.system.entry.js.map +1 -0
  916. package/dist/zonos-elements/zonos-text.entry.js +156 -0
  917. package/dist/zonos-elements/zonos-text.entry.js.map +1 -0
  918. package/dist/zonos-elements/zonos-text.system.entry.js +2 -0
  919. package/dist/zonos-elements/zonos-text.system.entry.js.map +1 -0
  920. package/dist/zonos-elements/zonosStore-13a7b534.js +2639 -0
  921. package/dist/zonos-elements/zonosStore-13a7b534.js.map +1 -0
  922. package/dist/zonos-elements/zonosStore-77bcd7c0.system.js +2 -0
  923. package/dist/zonos-elements/zonosStore-77bcd7c0.system.js.map +1 -0
  924. package/loader/cdn.js +3 -0
  925. package/loader/index.cjs.js +3 -0
  926. package/loader/index.d.ts +21 -0
  927. package/loader/index.es2017.js +3 -0
  928. package/loader/index.js +4 -0
  929. package/loader/package.json +11 -0
  930. package/package.json +155 -0
@@ -0,0 +1,1917 @@
1
+ 'use strict';
2
+
3
+ function _interopNamespace(e) {
4
+ if (e && e.__esModule) return e;
5
+ var n = Object.create(null);
6
+ if (e) {
7
+ Object.keys(e).forEach(function (k) {
8
+ if (k !== 'default') {
9
+ var d = Object.getOwnPropertyDescriptor(e, k);
10
+ Object.defineProperty(n, k, d.get ? d : {
11
+ enumerable: true,
12
+ get: function () {
13
+ return e[k];
14
+ }
15
+ });
16
+ }
17
+ });
18
+ }
19
+ n['default'] = e;
20
+ return Object.freeze(n);
21
+ }
22
+
23
+ const NAMESPACE = 'zonos-elements';
24
+
25
+ /**
26
+ * Virtual DOM patching algorithm based on Snabbdom by
27
+ * Simon Friis Vindum (@paldepind)
28
+ * Licensed under the MIT License
29
+ * https://github.com/snabbdom/snabbdom/blob/master/LICENSE
30
+ *
31
+ * Modified for Stencil's renderer and slot projection
32
+ */
33
+ let scopeId;
34
+ let hostTagName;
35
+ let isSvgMode = false;
36
+ let renderingRef = null;
37
+ let queuePending = false;
38
+ const getAssetPath = (path) => {
39
+ const assetUrl = new URL(path, plt.$resourcesUrl$);
40
+ return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
41
+ };
42
+ const createTime = (fnName, tagName = '') => {
43
+ {
44
+ return () => {
45
+ return;
46
+ };
47
+ }
48
+ };
49
+ const uniqueTime = (key, measureText) => {
50
+ {
51
+ return () => {
52
+ return;
53
+ };
54
+ }
55
+ };
56
+ const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
57
+ /**
58
+ * Default style mode id
59
+ */
60
+ /**
61
+ * Reusable empty obj/array
62
+ * Don't add values to these!!
63
+ */
64
+ const EMPTY_OBJ = {};
65
+ /**
66
+ * Namespaces
67
+ */
68
+ const SVG_NS = 'http://www.w3.org/2000/svg';
69
+ const HTML_NS = 'http://www.w3.org/1999/xhtml';
70
+ const isDef = (v) => v != null;
71
+ /**
72
+ * Check whether a value is a 'complex type', defined here as an object or a
73
+ * function.
74
+ *
75
+ * @param o the value to check
76
+ * @returns whether it's a complex type or not
77
+ */
78
+ const isComplexType = (o) => {
79
+ // https://jsperf.com/typeof-fn-object/5
80
+ o = typeof o;
81
+ return o === 'object' || o === 'function';
82
+ };
83
+ /**
84
+ * Helper method for querying a `meta` tag that contains a nonce value
85
+ * out of a DOM's head.
86
+ *
87
+ * @param doc The DOM containing the `head` to query against
88
+ * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag
89
+ * exists or the tag has no content.
90
+ */
91
+ function queryNonceMetaTagContent(doc) {
92
+ var _a, _b, _c;
93
+ return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;
94
+ }
95
+ /**
96
+ * Production h() function based on Preact by
97
+ * Jason Miller (@developit)
98
+ * Licensed under the MIT License
99
+ * https://github.com/developit/preact/blob/master/LICENSE
100
+ *
101
+ * Modified for Stencil's compiler and vdom
102
+ */
103
+ // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
104
+ // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
105
+ const h = (nodeName, vnodeData, ...children) => {
106
+ let child = null;
107
+ let key = null;
108
+ let simple = false;
109
+ let lastSimple = false;
110
+ const vNodeChildren = [];
111
+ const walk = (c) => {
112
+ for (let i = 0; i < c.length; i++) {
113
+ child = c[i];
114
+ if (Array.isArray(child)) {
115
+ walk(child);
116
+ }
117
+ else if (child != null && typeof child !== 'boolean') {
118
+ if ((simple = typeof nodeName !== 'function' && !isComplexType(child))) {
119
+ child = String(child);
120
+ }
121
+ if (simple && lastSimple) {
122
+ // If the previous child was simple (string), we merge both
123
+ vNodeChildren[vNodeChildren.length - 1].$text$ += child;
124
+ }
125
+ else {
126
+ // Append a new vNode, if it's text, we create a text vNode
127
+ vNodeChildren.push(simple ? newVNode(null, child) : child);
128
+ }
129
+ lastSimple = simple;
130
+ }
131
+ }
132
+ };
133
+ walk(children);
134
+ if (vnodeData) {
135
+ if (vnodeData.key) {
136
+ key = vnodeData.key;
137
+ }
138
+ // normalize class / className attributes
139
+ {
140
+ const classData = vnodeData.className || vnodeData.class;
141
+ if (classData) {
142
+ vnodeData.class =
143
+ typeof classData !== 'object'
144
+ ? classData
145
+ : Object.keys(classData)
146
+ .filter((k) => classData[k])
147
+ .join(' ');
148
+ }
149
+ }
150
+ }
151
+ if (typeof nodeName === 'function') {
152
+ // nodeName is a functional component
153
+ return nodeName(vnodeData === null ? {} : vnodeData, vNodeChildren, vdomFnUtils);
154
+ }
155
+ const vnode = newVNode(nodeName, null);
156
+ vnode.$attrs$ = vnodeData;
157
+ if (vNodeChildren.length > 0) {
158
+ vnode.$children$ = vNodeChildren;
159
+ }
160
+ {
161
+ vnode.$key$ = key;
162
+ }
163
+ return vnode;
164
+ };
165
+ /**
166
+ * A utility function for creating a virtual DOM node from a tag and some
167
+ * possible text content.
168
+ *
169
+ * @param tag the tag for this element
170
+ * @param text possible text content for the node
171
+ * @returns a newly-minted virtual DOM node
172
+ */
173
+ const newVNode = (tag, text) => {
174
+ const vnode = {
175
+ $flags$: 0,
176
+ $tag$: tag,
177
+ $text$: text,
178
+ $elm$: null,
179
+ $children$: null,
180
+ };
181
+ {
182
+ vnode.$attrs$ = null;
183
+ }
184
+ {
185
+ vnode.$key$ = null;
186
+ }
187
+ return vnode;
188
+ };
189
+ const Host = {};
190
+ /**
191
+ * Check whether a given node is a Host node or not
192
+ *
193
+ * @param node the virtual DOM node to check
194
+ * @returns whether it's a Host node or not
195
+ */
196
+ const isHost = (node) => node && node.$tag$ === Host;
197
+ /**
198
+ * Implementation of {@link d.FunctionalUtilities} for Stencil's VDom.
199
+ *
200
+ * Note that these functions convert from {@link d.VNode} to
201
+ * {@link d.ChildNode} to give functional component developers a friendly
202
+ * interface.
203
+ */
204
+ const vdomFnUtils = {
205
+ forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
206
+ map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate),
207
+ };
208
+ /**
209
+ * Convert a {@link d.VNode} to a {@link d.ChildNode} in order to present a
210
+ * friendlier public interface (hence, 'convertToPublic').
211
+ *
212
+ * @param node the virtual DOM node to convert
213
+ * @returns a converted child node
214
+ */
215
+ const convertToPublic = (node) => ({
216
+ vattrs: node.$attrs$,
217
+ vchildren: node.$children$,
218
+ vkey: node.$key$,
219
+ vname: node.$name$,
220
+ vtag: node.$tag$,
221
+ vtext: node.$text$,
222
+ });
223
+ /**
224
+ * Convert a {@link d.ChildNode} back to an equivalent {@link d.VNode} in
225
+ * order to use the resulting object in the virtual DOM. The initial object was
226
+ * likely created as part of presenting a public API, so converting it back
227
+ * involved making it 'private' again (hence, `convertToPrivate`).
228
+ *
229
+ * @param node the child node to convert
230
+ * @returns a converted virtual DOM node
231
+ */
232
+ const convertToPrivate = (node) => {
233
+ if (typeof node.vtag === 'function') {
234
+ const vnodeData = Object.assign({}, node.vattrs);
235
+ if (node.vkey) {
236
+ vnodeData.key = node.vkey;
237
+ }
238
+ if (node.vname) {
239
+ vnodeData.name = node.vname;
240
+ }
241
+ return h(node.vtag, vnodeData, ...(node.vchildren || []));
242
+ }
243
+ const vnode = newVNode(node.vtag, node.vtext);
244
+ vnode.$attrs$ = node.vattrs;
245
+ vnode.$children$ = node.vchildren;
246
+ vnode.$key$ = node.vkey;
247
+ vnode.$name$ = node.vname;
248
+ return vnode;
249
+ };
250
+ /**
251
+ * Parse a new property value for a given property type.
252
+ *
253
+ * While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
254
+ * it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
255
+ * 1. `any`, the type given to `propValue` in the function signature
256
+ * 2. the type stored from `propType`.
257
+ *
258
+ * This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
259
+ *
260
+ * Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
261
+ * a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
262
+ * based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
263
+ * ```tsx
264
+ * <my-cmp prop-val={0}></my-cmp>
265
+ * ```
266
+ *
267
+ * HTML prop values on the other hand, will always a string
268
+ *
269
+ * @param propValue the new value to coerce to some type
270
+ * @param propType the type of the prop, expressed as a binary number
271
+ * @returns the parsed/coerced value
272
+ */
273
+ const parsePropertyValue = (propValue, propType) => {
274
+ // ensure this value is of the correct prop type
275
+ if (propValue != null && !isComplexType(propValue)) {
276
+ if (propType & 4 /* MEMBER_FLAGS.Boolean */) {
277
+ // per the HTML spec, any string value means it is a boolean true value
278
+ // but we'll cheat here and say that the string "false" is the boolean false
279
+ return propValue === 'false' ? false : propValue === '' || !!propValue;
280
+ }
281
+ if (propType & 2 /* MEMBER_FLAGS.Number */) {
282
+ // force it to be a number
283
+ return parseFloat(propValue);
284
+ }
285
+ if (propType & 1 /* MEMBER_FLAGS.String */) {
286
+ // could have been passed as a number or boolean
287
+ // but we still want it as a string
288
+ return String(propValue);
289
+ }
290
+ // redundant return here for better minification
291
+ return propValue;
292
+ }
293
+ // not sure exactly what type we want
294
+ // so no need to change to a different type
295
+ return propValue;
296
+ };
297
+ const getElement = (ref) => (getHostRef(ref).$hostElement$ );
298
+ const createEvent = (ref, name, flags) => {
299
+ const elm = getElement(ref);
300
+ return {
301
+ emit: (detail) => {
302
+ return emitEvent(elm, name, {
303
+ bubbles: !!(flags & 4 /* EVENT_FLAGS.Bubbles */),
304
+ composed: !!(flags & 2 /* EVENT_FLAGS.Composed */),
305
+ cancelable: !!(flags & 1 /* EVENT_FLAGS.Cancellable */),
306
+ detail,
307
+ });
308
+ },
309
+ };
310
+ };
311
+ /**
312
+ * Helper function to create & dispatch a custom Event on a provided target
313
+ * @param elm the target of the Event
314
+ * @param name the name to give the custom Event
315
+ * @param opts options for configuring a custom Event
316
+ * @returns the custom Event
317
+ */
318
+ const emitEvent = (elm, name, opts) => {
319
+ const ev = plt.ce(name, opts);
320
+ elm.dispatchEvent(ev);
321
+ return ev;
322
+ };
323
+ const rootAppliedStyles = /*@__PURE__*/ new WeakMap();
324
+ const registerStyle = (scopeId, cssText, allowCS) => {
325
+ let style = styles.get(scopeId);
326
+ if (supportsConstructableStylesheets && allowCS) {
327
+ style = (style || new CSSStyleSheet());
328
+ if (typeof style === 'string') {
329
+ style = cssText;
330
+ }
331
+ else {
332
+ style.replaceSync(cssText);
333
+ }
334
+ }
335
+ else {
336
+ style = cssText;
337
+ }
338
+ styles.set(scopeId, style);
339
+ };
340
+ const addStyle = (styleContainerNode, cmpMeta, mode) => {
341
+ var _a;
342
+ const scopeId = getScopeId(cmpMeta);
343
+ const style = styles.get(scopeId);
344
+ // if an element is NOT connected then getRootNode() will return the wrong root node
345
+ // so the fallback is to always use the document for the root node in those cases
346
+ styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;
347
+ if (style) {
348
+ if (typeof style === 'string') {
349
+ styleContainerNode = styleContainerNode.head || styleContainerNode;
350
+ let appliedStyles = rootAppliedStyles.get(styleContainerNode);
351
+ let styleElm;
352
+ if (!appliedStyles) {
353
+ rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
354
+ }
355
+ if (!appliedStyles.has(scopeId)) {
356
+ {
357
+ styleElm = doc.createElement('style');
358
+ styleElm.innerHTML = style;
359
+ // Apply CSP nonce to the style tag if it exists
360
+ const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
361
+ if (nonce != null) {
362
+ styleElm.setAttribute('nonce', nonce);
363
+ }
364
+ styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
365
+ }
366
+ if (appliedStyles) {
367
+ appliedStyles.add(scopeId);
368
+ }
369
+ }
370
+ }
371
+ else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
372
+ styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
373
+ }
374
+ }
375
+ return scopeId;
376
+ };
377
+ const attachStyles = (hostRef) => {
378
+ const cmpMeta = hostRef.$cmpMeta$;
379
+ const elm = hostRef.$hostElement$;
380
+ const flags = cmpMeta.$flags$;
381
+ const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
382
+ const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
383
+ if (flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) {
384
+ // only required when we're NOT using native shadow dom (slot)
385
+ // or this browser doesn't support native shadow dom
386
+ // and this host element was NOT created with SSR
387
+ // let's pick out the inner content for slot projection
388
+ // create a node to represent where the original
389
+ // content was first placed, which is useful later on
390
+ // DOM WRITE!!
391
+ elm['s-sc'] = scopeId;
392
+ elm.classList.add(scopeId + '-h');
393
+ if (flags & 2 /* CMP_FLAGS.scopedCssEncapsulation */) {
394
+ elm.classList.add(scopeId + '-s');
395
+ }
396
+ }
397
+ endAttachStyles();
398
+ };
399
+ const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
400
+ /**
401
+ * Production setAccessor() function based on Preact by
402
+ * Jason Miller (@developit)
403
+ * Licensed under the MIT License
404
+ * https://github.com/developit/preact/blob/master/LICENSE
405
+ *
406
+ * Modified for Stencil's compiler and vdom
407
+ */
408
+ /**
409
+ * When running a VDom render set properties present on a VDom node onto the
410
+ * corresponding HTML element.
411
+ *
412
+ * Note that this function has special functionality for the `class`,
413
+ * `style`, `key`, and `ref` attributes, as well as event handlers (like
414
+ * `onClick`, etc). All others are just passed through as-is.
415
+ *
416
+ * @param elm the HTMLElement onto which attributes should be set
417
+ * @param memberName the name of the attribute to set
418
+ * @param oldValue the old value for the attribute
419
+ * @param newValue the new value for the attribute
420
+ * @param isSvg whether we're in an svg context or not
421
+ * @param flags bitflags for Vdom variables
422
+ */
423
+ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
424
+ if (oldValue !== newValue) {
425
+ let isProp = isMemberInElement(elm, memberName);
426
+ let ln = memberName.toLowerCase();
427
+ if (memberName === 'class') {
428
+ const classList = elm.classList;
429
+ const oldClasses = parseClassList(oldValue);
430
+ const newClasses = parseClassList(newValue);
431
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
432
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
433
+ }
434
+ else if (memberName === 'style') {
435
+ // update style attribute, css properties and values
436
+ {
437
+ for (const prop in oldValue) {
438
+ if (!newValue || newValue[prop] == null) {
439
+ if (prop.includes('-')) {
440
+ elm.style.removeProperty(prop);
441
+ }
442
+ else {
443
+ elm.style[prop] = '';
444
+ }
445
+ }
446
+ }
447
+ }
448
+ for (const prop in newValue) {
449
+ if (!oldValue || newValue[prop] !== oldValue[prop]) {
450
+ if (prop.includes('-')) {
451
+ elm.style.setProperty(prop, newValue[prop]);
452
+ }
453
+ else {
454
+ elm.style[prop] = newValue[prop];
455
+ }
456
+ }
457
+ }
458
+ }
459
+ else if (memberName === 'key')
460
+ ;
461
+ else if (memberName === 'ref') {
462
+ // minifier will clean this up
463
+ if (newValue) {
464
+ newValue(elm);
465
+ }
466
+ }
467
+ else if ((!isProp ) &&
468
+ memberName[0] === 'o' &&
469
+ memberName[1] === 'n') {
470
+ // Event Handlers
471
+ // so if the member name starts with "on" and the 3rd characters is
472
+ // a capital letter, and it's not already a member on the element,
473
+ // then we're assuming it's an event listener
474
+ if (memberName[2] === '-') {
475
+ // on- prefixed events
476
+ // allows to be explicit about the dom event to listen without any magic
477
+ // under the hood:
478
+ // <my-cmp on-click> // listens for "click"
479
+ // <my-cmp on-Click> // listens for "Click"
480
+ // <my-cmp on-ionChange> // listens for "ionChange"
481
+ // <my-cmp on-EVENTS> // listens for "EVENTS"
482
+ memberName = memberName.slice(3);
483
+ }
484
+ else if (isMemberInElement(win, ln)) {
485
+ // standard event
486
+ // the JSX attribute could have been "onMouseOver" and the
487
+ // member name "onmouseover" is on the window's prototype
488
+ // so let's add the listener "mouseover", which is all lowercased
489
+ memberName = ln.slice(2);
490
+ }
491
+ else {
492
+ // custom event
493
+ // the JSX attribute could have been "onMyCustomEvent"
494
+ // so let's trim off the "on" prefix and lowercase the first character
495
+ // and add the listener "myCustomEvent"
496
+ // except for the first character, we keep the event name case
497
+ memberName = ln[2] + memberName.slice(3);
498
+ }
499
+ if (oldValue) {
500
+ plt.rel(elm, memberName, oldValue, false);
501
+ }
502
+ if (newValue) {
503
+ plt.ael(elm, memberName, newValue, false);
504
+ }
505
+ }
506
+ else {
507
+ // Set property if it exists and it's not a SVG
508
+ const isComplex = isComplexType(newValue);
509
+ if ((isProp || (isComplex && newValue !== null)) && !isSvg) {
510
+ try {
511
+ if (!elm.tagName.includes('-')) {
512
+ const n = newValue == null ? '' : newValue;
513
+ // Workaround for Safari, moving the <input> caret when re-assigning the same valued
514
+ if (memberName === 'list') {
515
+ isProp = false;
516
+ }
517
+ else if (oldValue == null || elm[memberName] != n) {
518
+ elm[memberName] = n;
519
+ }
520
+ }
521
+ else {
522
+ elm[memberName] = newValue;
523
+ }
524
+ }
525
+ catch (e) { }
526
+ }
527
+ if (newValue == null || newValue === false) {
528
+ if (newValue !== false || elm.getAttribute(memberName) === '') {
529
+ {
530
+ elm.removeAttribute(memberName);
531
+ }
532
+ }
533
+ }
534
+ else if ((!isProp || flags & 4 /* VNODE_FLAGS.isHost */ || isSvg) && !isComplex) {
535
+ newValue = newValue === true ? '' : newValue;
536
+ {
537
+ elm.setAttribute(memberName, newValue);
538
+ }
539
+ }
540
+ }
541
+ }
542
+ };
543
+ const parseClassListRegex = /\s/;
544
+ const parseClassList = (value) => (!value ? [] : value.split(parseClassListRegex));
545
+ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
546
+ // if the element passed in is a shadow root, which is a document fragment
547
+ // then we want to be adding attrs/props to the shadow root's "host" element
548
+ // if it's not a shadow root, then we add attrs/props to the same element
549
+ const elm = newVnode.$elm$.nodeType === 11 /* NODE_TYPE.DocumentFragment */ && newVnode.$elm$.host
550
+ ? newVnode.$elm$.host
551
+ : newVnode.$elm$;
552
+ const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
553
+ const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
554
+ {
555
+ // remove attributes no longer present on the vnode by setting them to undefined
556
+ for (memberName in oldVnodeAttrs) {
557
+ if (!(memberName in newVnodeAttrs)) {
558
+ setAccessor(elm, memberName, oldVnodeAttrs[memberName], undefined, isSvgMode, newVnode.$flags$);
559
+ }
560
+ }
561
+ }
562
+ // add new & update changed attributes
563
+ for (memberName in newVnodeAttrs) {
564
+ setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
565
+ }
566
+ };
567
+ /**
568
+ * Create a DOM Node corresponding to one of the children of a given VNode.
569
+ *
570
+ * @param oldParentVNode the parent VNode from the previous render
571
+ * @param newParentVNode the parent VNode from the current render
572
+ * @param childIndex the index of the VNode, in the _new_ parent node's
573
+ * children, for which we will create a new DOM node
574
+ * @param parentElm the parent DOM node which our new node will be a child of
575
+ * @returns the newly created node
576
+ */
577
+ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
578
+ // tslint:disable-next-line: prefer-const
579
+ const newVNode = newParentVNode.$children$[childIndex];
580
+ let i = 0;
581
+ let elm;
582
+ let childNode;
583
+ if (newVNode.$text$ !== null) {
584
+ // create text node
585
+ elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
586
+ }
587
+ else {
588
+ if (!isSvgMode) {
589
+ isSvgMode = newVNode.$tag$ === 'svg';
590
+ }
591
+ // create element
592
+ elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$tag$)
593
+ );
594
+ if (isSvgMode && newVNode.$tag$ === 'foreignObject') {
595
+ isSvgMode = false;
596
+ }
597
+ // add css classes, attrs, props, listeners, etc.
598
+ {
599
+ updateElement(null, newVNode, isSvgMode);
600
+ }
601
+ if (isDef(scopeId) && elm['s-si'] !== scopeId) {
602
+ // if there is a scopeId and this is the initial render
603
+ // then let's add the scopeId as a css class
604
+ elm.classList.add((elm['s-si'] = scopeId));
605
+ }
606
+ if (newVNode.$children$) {
607
+ for (i = 0; i < newVNode.$children$.length; ++i) {
608
+ // create the node
609
+ childNode = createElm(oldParentVNode, newVNode, i);
610
+ // return node could have been null
611
+ if (childNode) {
612
+ // append our new node
613
+ elm.appendChild(childNode);
614
+ }
615
+ }
616
+ }
617
+ {
618
+ if (newVNode.$tag$ === 'svg') {
619
+ // Only reset the SVG context when we're exiting <svg> element
620
+ isSvgMode = false;
621
+ }
622
+ else if (elm.tagName === 'foreignObject') {
623
+ // Reenter SVG context when we're exiting <foreignObject> element
624
+ isSvgMode = true;
625
+ }
626
+ }
627
+ }
628
+ return elm;
629
+ };
630
+ /**
631
+ * Create DOM nodes corresponding to a list of {@link d.Vnode} objects and
632
+ * add them to the DOM in the appropriate place.
633
+ *
634
+ * @param parentElm the DOM node which should be used as a parent for the new
635
+ * DOM nodes
636
+ * @param before a child of the `parentElm` which the new children should be
637
+ * inserted before (optional)
638
+ * @param parentVNode the parent virtual DOM node
639
+ * @param vnodes the new child virtual DOM nodes to produce DOM nodes for
640
+ * @param startIdx the index in the child virtual DOM nodes at which to start
641
+ * creating DOM nodes (inclusive)
642
+ * @param endIdx the index in the child virtual DOM nodes at which to stop
643
+ * creating DOM nodes (inclusive)
644
+ */
645
+ const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
646
+ let containerElm = (parentElm);
647
+ let childNode;
648
+ if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
649
+ containerElm = containerElm.shadowRoot;
650
+ }
651
+ for (; startIdx <= endIdx; ++startIdx) {
652
+ if (vnodes[startIdx]) {
653
+ childNode = createElm(null, parentVNode, startIdx);
654
+ if (childNode) {
655
+ vnodes[startIdx].$elm$ = childNode;
656
+ containerElm.insertBefore(childNode, before);
657
+ }
658
+ }
659
+ }
660
+ };
661
+ /**
662
+ * Remove the DOM elements corresponding to a list of {@link d.VNode} objects.
663
+ * This can be used to, for instance, clean up after a list of children which
664
+ * should no longer be shown.
665
+ *
666
+ * This function also handles some of Stencil's slot relocation logic.
667
+ *
668
+ * @param vnodes a list of virtual DOM nodes to remove
669
+ * @param startIdx the index at which to start removing nodes (inclusive)
670
+ * @param endIdx the index at which to stop removing nodes (inclusive)
671
+ */
672
+ const removeVnodes = (vnodes, startIdx, endIdx) => {
673
+ for (let index = startIdx; index <= endIdx; ++index) {
674
+ const vnode = vnodes[index];
675
+ if (vnode) {
676
+ const elm = vnode.$elm$;
677
+ nullifyVNodeRefs(vnode);
678
+ if (elm) {
679
+ // remove the vnode's element from the dom
680
+ elm.remove();
681
+ }
682
+ }
683
+ }
684
+ };
685
+ /**
686
+ * Reconcile the children of a new VNode with the children of an old VNode by
687
+ * traversing the two collections of children, identifying nodes that are
688
+ * conserved or changed, calling out to `patch` to make any necessary
689
+ * updates to the DOM, and rearranging DOM nodes as needed.
690
+ *
691
+ * The algorithm for reconciling children works by analyzing two 'windows' onto
692
+ * the two arrays of children (`oldCh` and `newCh`). We keep track of the
693
+ * 'windows' by storing start and end indices and references to the
694
+ * corresponding array entries. Initially the two 'windows' are basically equal
695
+ * to the entire array, but we progressively narrow the windows until there are
696
+ * no children left to update by doing the following:
697
+ *
698
+ * 1. Skip any `null` entries at the beginning or end of the two arrays, so
699
+ * that if we have an initial array like the following we'll end up dealing
700
+ * only with a window bounded by the highlighted elements:
701
+ *
702
+ * [null, null, VNode1 , ... , VNode2, null, null]
703
+ * ^^^^^^ ^^^^^^
704
+ *
705
+ * 2. Check to see if the elements at the head and tail positions are equal
706
+ * across the windows. This will basically detect elements which haven't
707
+ * been added, removed, or changed position, i.e. if you had the following
708
+ * VNode elements (represented as HTML):
709
+ *
710
+ * oldVNode: `<div><p><span>HEY</span></p></div>`
711
+ * newVNode: `<div><p><span>THERE</span></p></div>`
712
+ *
713
+ * Then when comparing the children of the `<div>` tag we check the equality
714
+ * of the VNodes corresponding to the `<p>` tags and, since they are the
715
+ * same tag in the same position, we'd be able to avoid completely
716
+ * re-rendering the subtree under them with a new DOM element and would just
717
+ * call out to `patch` to handle reconciling their children and so on.
718
+ *
719
+ * 3. Check, for both windows, to see if the element at the beginning of the
720
+ * window corresponds to the element at the end of the other window. This is
721
+ * a heuristic which will let us identify _some_ situations in which
722
+ * elements have changed position, for instance it _should_ detect that the
723
+ * children nodes themselves have not changed but merely moved in the
724
+ * following example:
725
+ *
726
+ * oldVNode: `<div><element-one /><element-two /></div>`
727
+ * newVNode: `<div><element-two /><element-one /></div>`
728
+ *
729
+ * If we find cases like this then we also need to move the concrete DOM
730
+ * elements corresponding to the moved children to write the re-order to the
731
+ * DOM.
732
+ *
733
+ * 4. Finally, if VNodes have the `key` attribute set on them we check for any
734
+ * nodes in the old children which have the same key as the first element in
735
+ * our window on the new children. If we find such a node we handle calling
736
+ * out to `patch`, moving relevant DOM nodes, and so on, in accordance with
737
+ * what we find.
738
+ *
739
+ * Finally, once we've narrowed our 'windows' to the point that either of them
740
+ * collapse (i.e. they have length 0) we then handle any remaining VNode
741
+ * insertion or deletion that needs to happen to get a DOM state that correctly
742
+ * reflects the new child VNodes. If, for instance, after our window on the old
743
+ * children has collapsed we still have more nodes on the new children that
744
+ * we haven't dealt with yet then we need to add them, or if the new children
745
+ * collapse but we still have unhandled _old_ children then we need to make
746
+ * sure the corresponding DOM nodes are removed.
747
+ *
748
+ * @param parentElm the node into which the parent VNode is rendered
749
+ * @param oldCh the old children of the parent node
750
+ * @param newVNode the new VNode which will replace the parent
751
+ * @param newCh the new children of the parent node
752
+ */
753
+ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
754
+ let oldStartIdx = 0;
755
+ let newStartIdx = 0;
756
+ let idxInOld = 0;
757
+ let i = 0;
758
+ let oldEndIdx = oldCh.length - 1;
759
+ let oldStartVnode = oldCh[0];
760
+ let oldEndVnode = oldCh[oldEndIdx];
761
+ let newEndIdx = newCh.length - 1;
762
+ let newStartVnode = newCh[0];
763
+ let newEndVnode = newCh[newEndIdx];
764
+ let node;
765
+ let elmToMove;
766
+ while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
767
+ if (oldStartVnode == null) {
768
+ // VNode might have been moved left
769
+ oldStartVnode = oldCh[++oldStartIdx];
770
+ }
771
+ else if (oldEndVnode == null) {
772
+ oldEndVnode = oldCh[--oldEndIdx];
773
+ }
774
+ else if (newStartVnode == null) {
775
+ newStartVnode = newCh[++newStartIdx];
776
+ }
777
+ else if (newEndVnode == null) {
778
+ newEndVnode = newCh[--newEndIdx];
779
+ }
780
+ else if (isSameVnode(oldStartVnode, newStartVnode)) {
781
+ // if the start nodes are the same then we should patch the new VNode
782
+ // onto the old one, and increment our `newStartIdx` and `oldStartIdx`
783
+ // indices to reflect that. We don't need to move any DOM Nodes around
784
+ // since things are matched up in order.
785
+ patch(oldStartVnode, newStartVnode);
786
+ oldStartVnode = oldCh[++oldStartIdx];
787
+ newStartVnode = newCh[++newStartIdx];
788
+ }
789
+ else if (isSameVnode(oldEndVnode, newEndVnode)) {
790
+ // likewise, if the end nodes are the same we patch new onto old and
791
+ // decrement our end indices, and also likewise in this case we don't
792
+ // need to move any DOM Nodes.
793
+ patch(oldEndVnode, newEndVnode);
794
+ oldEndVnode = oldCh[--oldEndIdx];
795
+ newEndVnode = newCh[--newEndIdx];
796
+ }
797
+ else if (isSameVnode(oldStartVnode, newEndVnode)) {
798
+ patch(oldStartVnode, newEndVnode);
799
+ // We need to move the element for `oldStartVnode` into a position which
800
+ // will be appropriate for `newEndVnode`. For this we can use
801
+ // `.insertBefore` and `oldEndVnode.$elm$.nextSibling`. If there is a
802
+ // sibling for `oldEndVnode.$elm$` then we want to move the DOM node for
803
+ // `oldStartVnode` between `oldEndVnode` and it's sibling, like so:
804
+ //
805
+ // <old-start-node />
806
+ // <some-intervening-node />
807
+ // <old-end-node />
808
+ // <!-- -> <-- `oldStartVnode.$elm$` should be inserted here
809
+ // <next-sibling />
810
+ //
811
+ // If instead `oldEndVnode.$elm$` has no sibling then we just want to put
812
+ // the node for `oldStartVnode` at the end of the children of
813
+ // `parentElm`. Luckily, `Node.nextSibling` will return `null` if there
814
+ // aren't any siblings, and passing `null` to `Node.insertBefore` will
815
+ // append it to the children of the parent element.
816
+ parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
817
+ oldStartVnode = oldCh[++oldStartIdx];
818
+ newEndVnode = newCh[--newEndIdx];
819
+ }
820
+ else if (isSameVnode(oldEndVnode, newStartVnode)) {
821
+ patch(oldEndVnode, newStartVnode);
822
+ // We've already checked above if `oldStartVnode` and `newStartVnode` are
823
+ // the same node, so since we're here we know that they are not. Thus we
824
+ // can move the element for `oldEndVnode` _before_ the element for
825
+ // `oldStartVnode`, leaving `oldStartVnode` to be reconciled in the
826
+ // future.
827
+ parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
828
+ oldEndVnode = oldCh[--oldEndIdx];
829
+ newStartVnode = newCh[++newStartIdx];
830
+ }
831
+ else {
832
+ // Here we do some checks to match up old and new nodes based on the
833
+ // `$key$` attribute, which is set by putting a `key="my-key"` attribute
834
+ // in the JSX for a DOM element in the implementation of a Stencil
835
+ // component.
836
+ //
837
+ // First we check to see if there are any nodes in the array of old
838
+ // children which have the same key as the first node in the new
839
+ // children.
840
+ idxInOld = -1;
841
+ {
842
+ for (i = oldStartIdx; i <= oldEndIdx; ++i) {
843
+ if (oldCh[i] && oldCh[i].$key$ !== null && oldCh[i].$key$ === newStartVnode.$key$) {
844
+ idxInOld = i;
845
+ break;
846
+ }
847
+ }
848
+ }
849
+ if (idxInOld >= 0) {
850
+ // We found a node in the old children which matches up with the first
851
+ // node in the new children! So let's deal with that
852
+ elmToMove = oldCh[idxInOld];
853
+ if (elmToMove.$tag$ !== newStartVnode.$tag$) {
854
+ // the tag doesn't match so we'll need a new DOM element
855
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld);
856
+ }
857
+ else {
858
+ patch(elmToMove, newStartVnode);
859
+ // invalidate the matching old node so that we won't try to update it
860
+ // again later on
861
+ oldCh[idxInOld] = undefined;
862
+ node = elmToMove.$elm$;
863
+ }
864
+ newStartVnode = newCh[++newStartIdx];
865
+ }
866
+ else {
867
+ // We either didn't find an element in the old children that matches
868
+ // the key of the first new child OR the build is not using `key`
869
+ // attributes at all. In either case we need to create a new element
870
+ // for the new node.
871
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx);
872
+ newStartVnode = newCh[++newStartIdx];
873
+ }
874
+ if (node) {
875
+ // if we created a new node then handle inserting it to the DOM
876
+ {
877
+ oldStartVnode.$elm$.parentNode.insertBefore(node, oldStartVnode.$elm$);
878
+ }
879
+ }
880
+ }
881
+ }
882
+ if (oldStartIdx > oldEndIdx) {
883
+ // we have some more new nodes to add which don't match up with old nodes
884
+ addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx);
885
+ }
886
+ else if (newStartIdx > newEndIdx) {
887
+ // there are nodes in the `oldCh` array which no longer correspond to nodes
888
+ // in the new array, so lets remove them (which entails cleaning up the
889
+ // relevant DOM nodes)
890
+ removeVnodes(oldCh, oldStartIdx, oldEndIdx);
891
+ }
892
+ };
893
+ /**
894
+ * Compare two VNodes to determine if they are the same
895
+ *
896
+ * **NB**: This function is an equality _heuristic_ based on the available
897
+ * information set on the two VNodes and can be misleading under certain
898
+ * circumstances. In particular, if the two nodes do not have `key` attrs
899
+ * (available under `$key$` on VNodes) then the function falls back on merely
900
+ * checking that they have the same tag.
901
+ *
902
+ * So, in other words, if `key` attrs are not set on VNodes which may be
903
+ * changing order within a `children` array or something along those lines then
904
+ * we could obtain a false negative and then have to do needless re-rendering
905
+ * (i.e. we'd say two VNodes aren't equal when in fact they should be).
906
+ *
907
+ * @param leftVNode the first VNode to check
908
+ * @param rightVNode the second VNode to check
909
+ * @returns whether they're equal or not
910
+ */
911
+ const isSameVnode = (leftVNode, rightVNode) => {
912
+ // compare if two vnode to see if they're "technically" the same
913
+ // need to have the same element tag, and same key to be the same
914
+ if (leftVNode.$tag$ === rightVNode.$tag$) {
915
+ // this will be set if components in the build have `key` attrs set on them
916
+ {
917
+ return leftVNode.$key$ === rightVNode.$key$;
918
+ }
919
+ }
920
+ return false;
921
+ };
922
+ /**
923
+ * Handle reconciling an outdated VNode with a new one which corresponds to
924
+ * it. This function handles flushing updates to the DOM and reconciling the
925
+ * children of the two nodes (if any).
926
+ *
927
+ * @param oldVNode an old VNode whose DOM element and children we want to update
928
+ * @param newVNode a new VNode representing an updated version of the old one
929
+ */
930
+ const patch = (oldVNode, newVNode) => {
931
+ const elm = (newVNode.$elm$ = oldVNode.$elm$);
932
+ const oldChildren = oldVNode.$children$;
933
+ const newChildren = newVNode.$children$;
934
+ const tag = newVNode.$tag$;
935
+ const text = newVNode.$text$;
936
+ if (text === null) {
937
+ {
938
+ // test if we're rendering an svg element, or still rendering nodes inside of one
939
+ // only add this to the when the compiler sees we're using an svg somewhere
940
+ isSvgMode = tag === 'svg' ? true : tag === 'foreignObject' ? false : isSvgMode;
941
+ }
942
+ {
943
+ if (tag === 'slot')
944
+ ;
945
+ else {
946
+ // either this is the first render of an element OR it's an update
947
+ // AND we already know it's possible it could have changed
948
+ // this updates the element's css classes, attrs, props, listeners, etc.
949
+ updateElement(oldVNode, newVNode, isSvgMode);
950
+ }
951
+ }
952
+ if (oldChildren !== null && newChildren !== null) {
953
+ // looks like there's child vnodes for both the old and new vnodes
954
+ // so we need to call `updateChildren` to reconcile them
955
+ updateChildren(elm, oldChildren, newVNode, newChildren);
956
+ }
957
+ else if (newChildren !== null) {
958
+ // no old child vnodes, but there are new child vnodes to add
959
+ if (oldVNode.$text$ !== null) {
960
+ // the old vnode was text, so be sure to clear it out
961
+ elm.textContent = '';
962
+ }
963
+ // add the new vnode children
964
+ addVnodes(elm, null, newVNode, newChildren, 0, newChildren.length - 1);
965
+ }
966
+ else if (oldChildren !== null) {
967
+ // no new child vnodes, but there are old child vnodes to remove
968
+ removeVnodes(oldChildren, 0, oldChildren.length - 1);
969
+ }
970
+ if (isSvgMode && tag === 'svg') {
971
+ isSvgMode = false;
972
+ }
973
+ }
974
+ else if (oldVNode.$text$ !== text) {
975
+ // update the text content for the text only vnode
976
+ // and also only if the text is different than before
977
+ elm.data = text;
978
+ }
979
+ };
980
+ /**
981
+ * 'Nullify' any VDom `ref` callbacks on a VDom node or its children by
982
+ * calling them with `null`. This signals that the DOM element corresponding to
983
+ * the VDom node has been removed from the DOM.
984
+ *
985
+ * @param vNode a virtual DOM node
986
+ */
987
+ const nullifyVNodeRefs = (vNode) => {
988
+ {
989
+ vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
990
+ vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
991
+ }
992
+ };
993
+ /**
994
+ * The main entry point for Stencil's virtual DOM-based rendering engine
995
+ *
996
+ * Given a {@link d.HostRef} container and some virtual DOM nodes, this
997
+ * function will handle creating a virtual DOM tree with a single root, patching
998
+ * the current virtual DOM tree onto an old one (if any), dealing with slot
999
+ * relocation, and reflecting attributes.
1000
+ *
1001
+ * @param hostRef data needed to root and render the virtual DOM tree, such as
1002
+ * the DOM node into which it should be rendered.
1003
+ * @param renderFnResults the virtual DOM nodes to be rendered
1004
+ * @param isInitialLoad whether or not this is the first call after page load
1005
+ */
1006
+ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1007
+ const hostElm = hostRef.$hostElement$;
1008
+ const oldVNode = hostRef.$vnode$ || newVNode(null, null);
1009
+ // if `renderFnResults` is a Host node then we can use it directly. If not,
1010
+ // we need to call `h` again to wrap the children of our component in a
1011
+ // 'dummy' Host node (well, an empty vnode) since `renderVdom` assumes
1012
+ // implicitly that the top-level vdom node is 1) an only child and 2)
1013
+ // contains attrs that need to be set on the host element.
1014
+ const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
1015
+ hostTagName = hostElm.tagName;
1016
+ // On the first render and *only* on the first render we want to check for
1017
+ // any attributes set on the host element which are also set on the vdom
1018
+ // node. If we find them, we override the value on the VDom node attrs with
1019
+ // the value from the host element, which allows developers building apps
1020
+ // with Stencil components to override e.g. the `role` attribute on a
1021
+ // component even if it's already set on the `Host`.
1022
+ if (isInitialLoad && rootVnode.$attrs$) {
1023
+ for (const key of Object.keys(rootVnode.$attrs$)) {
1024
+ // We have a special implementation in `setAccessor` for `style` and
1025
+ // `class` which reconciles values coming from the VDom with values
1026
+ // already present on the DOM element, so we don't want to override those
1027
+ // attributes on the VDom tree with values from the host element if they
1028
+ // are present.
1029
+ //
1030
+ // Likewise, `ref` and `key` are special internal values for the Stencil
1031
+ // runtime and we don't want to override those either.
1032
+ if (hostElm.hasAttribute(key) && !['key', 'ref', 'style', 'class'].includes(key)) {
1033
+ rootVnode.$attrs$[key] = hostElm[key];
1034
+ }
1035
+ }
1036
+ }
1037
+ rootVnode.$tag$ = null;
1038
+ rootVnode.$flags$ |= 4 /* VNODE_FLAGS.isHost */;
1039
+ hostRef.$vnode$ = rootVnode;
1040
+ rootVnode.$elm$ = oldVNode.$elm$ = (hostElm.shadowRoot || hostElm );
1041
+ {
1042
+ scopeId = hostElm['s-sc'];
1043
+ }
1044
+ // synchronous patch
1045
+ patch(oldVNode, rootVnode);
1046
+ };
1047
+ const attachToAncestor = (hostRef, ancestorComponent) => {
1048
+ if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
1049
+ ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
1050
+ }
1051
+ };
1052
+ const scheduleUpdate = (hostRef, isInitialLoad) => {
1053
+ {
1054
+ hostRef.$flags$ |= 16 /* HOST_FLAGS.isQueuedForUpdate */;
1055
+ }
1056
+ if (hostRef.$flags$ & 4 /* HOST_FLAGS.isWaitingForChildren */) {
1057
+ hostRef.$flags$ |= 512 /* HOST_FLAGS.needsRerender */;
1058
+ return;
1059
+ }
1060
+ attachToAncestor(hostRef, hostRef.$ancestorComponent$);
1061
+ // there is no ancestor component or the ancestor component
1062
+ // has already fired off its lifecycle update then
1063
+ // fire off the initial update
1064
+ const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
1065
+ return writeTask(dispatch) ;
1066
+ };
1067
+ /**
1068
+ * Dispatch initial-render and update lifecycle hooks, enqueuing calls to
1069
+ * component lifecycle methods like `componentWillLoad` as well as
1070
+ * {@link updateComponent}, which will kick off the virtual DOM re-render.
1071
+ *
1072
+ * @param hostRef a reference to a host DOM node
1073
+ * @param isInitialLoad whether we're on the initial load or not
1074
+ * @returns an empty Promise which is used to enqueue a series of operations for
1075
+ * the component
1076
+ */
1077
+ const dispatchHooks = (hostRef, isInitialLoad) => {
1078
+ const endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$);
1079
+ const instance = hostRef.$lazyInstance$ ;
1080
+ // We're going to use this variable together with `enqueue` to implement a
1081
+ // little promise-based queue. We start out with it `undefined`. When we add
1082
+ // the first function to the queue we'll set this variable to be that
1083
+ // function's return value. When we attempt to add subsequent values to the
1084
+ // queue we'll check that value and, if it was a `Promise`, we'll then chain
1085
+ // the new function off of that `Promise` using `.then()`. This will give our
1086
+ // queue two nice properties:
1087
+ //
1088
+ // 1. If all functions added to the queue are synchronous they'll be called
1089
+ // synchronously right away.
1090
+ // 2. If all functions added to the queue are asynchronous they'll all be
1091
+ // called in order after `dispatchHooks` exits.
1092
+ let maybePromise;
1093
+ if (isInitialLoad) {
1094
+ {
1095
+ hostRef.$flags$ |= 256 /* HOST_FLAGS.isListenReady */;
1096
+ if (hostRef.$queuedListeners$) {
1097
+ hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
1098
+ hostRef.$queuedListeners$ = undefined;
1099
+ }
1100
+ }
1101
+ {
1102
+ // If `componentWillLoad` returns a `Promise` then we want to wait on
1103
+ // whatever's going on in that `Promise` before we launch into
1104
+ // rendering the component, doing other lifecycle stuff, etc. So
1105
+ // in that case we assign the returned promise to the variable we
1106
+ // declared above to hold a possible 'queueing' Promise
1107
+ maybePromise = safeCall(instance, 'componentWillLoad');
1108
+ }
1109
+ }
1110
+ endSchedule();
1111
+ return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
1112
+ };
1113
+ /**
1114
+ * This function uses a Promise to implement a simple first-in, first-out queue
1115
+ * of functions to be called.
1116
+ *
1117
+ * The queue is ordered on the basis of the first argument. If it's
1118
+ * `undefined`, then nothing is on the queue yet, so the provided function can
1119
+ * be called synchronously (although note that this function may return a
1120
+ * `Promise`). The idea is that then the return value of that enqueueing
1121
+ * operation is kept around, so that if it was a `Promise` then subsequent
1122
+ * functions can be enqueued by calling this function again with that `Promise`
1123
+ * as the first argument.
1124
+ *
1125
+ * @param maybePromise either a `Promise` which should resolve before the next function is called or an 'empty' sentinel
1126
+ * @param fn a function to enqueue
1127
+ * @returns either a `Promise` or the return value of the provided function
1128
+ */
1129
+ const enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn) : fn();
1130
+ /**
1131
+ * Check that a value is a `Promise`. To check, we first see if the value is an
1132
+ * instance of the `Promise` global. In a few circumstances, in particular if
1133
+ * the global has been overwritten, this is could be misleading, so we also do
1134
+ * a little 'duck typing' check to see if the `.then` property of the value is
1135
+ * defined and a function.
1136
+ *
1137
+ * @param maybePromise it might be a promise!
1138
+ * @returns whether it is or not
1139
+ */
1140
+ const isPromisey = (maybePromise) => maybePromise instanceof Promise ||
1141
+ (maybePromise && maybePromise.then && typeof maybePromise.then === 'function');
1142
+ /**
1143
+ * Update a component given reference to its host elements and so on.
1144
+ *
1145
+ * @param hostRef an object containing references to the element's host node,
1146
+ * VDom nodes, and other metadata
1147
+ * @param instance a reference to the underlying host element where it will be
1148
+ * rendered
1149
+ * @param isInitialLoad whether or not this function is being called as part of
1150
+ * the first render cycle
1151
+ */
1152
+ const updateComponent = async (hostRef, instance, isInitialLoad) => {
1153
+ var _a;
1154
+ const elm = hostRef.$hostElement$;
1155
+ const endUpdate = createTime('update', hostRef.$cmpMeta$.$tagName$);
1156
+ const rc = elm['s-rc'];
1157
+ if (isInitialLoad) {
1158
+ // DOM WRITE!
1159
+ attachStyles(hostRef);
1160
+ }
1161
+ const endRender = createTime('render', hostRef.$cmpMeta$.$tagName$);
1162
+ {
1163
+ callRender(hostRef, instance, elm, isInitialLoad);
1164
+ }
1165
+ if (rc) {
1166
+ // ok, so turns out there are some child host elements
1167
+ // waiting on this parent element to load
1168
+ // let's fire off all update callbacks waiting
1169
+ rc.map((cb) => cb());
1170
+ elm['s-rc'] = undefined;
1171
+ }
1172
+ endRender();
1173
+ endUpdate();
1174
+ {
1175
+ const childrenPromises = (_a = elm['s-p']) !== null && _a !== void 0 ? _a : [];
1176
+ const postUpdate = () => postUpdateComponent(hostRef);
1177
+ if (childrenPromises.length === 0) {
1178
+ postUpdate();
1179
+ }
1180
+ else {
1181
+ Promise.all(childrenPromises).then(postUpdate);
1182
+ hostRef.$flags$ |= 4 /* HOST_FLAGS.isWaitingForChildren */;
1183
+ childrenPromises.length = 0;
1184
+ }
1185
+ }
1186
+ };
1187
+ /**
1188
+ * Handle making the call to the VDom renderer with the proper context given
1189
+ * various build variables
1190
+ *
1191
+ * @param hostRef an object containing references to the element's host node,
1192
+ * VDom nodes, and other metadata
1193
+ * @param instance a reference to the underlying host element where it will be
1194
+ * rendered
1195
+ * @param elm the Host element for the component
1196
+ * @param isInitialLoad whether or not this function is being called as part of
1197
+ * @returns an empty promise
1198
+ */
1199
+ const callRender = (hostRef, instance, elm, isInitialLoad) => {
1200
+ try {
1201
+ renderingRef = instance;
1202
+ instance = instance.render() ;
1203
+ {
1204
+ hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
1205
+ }
1206
+ {
1207
+ hostRef.$flags$ |= 2 /* HOST_FLAGS.hasRendered */;
1208
+ }
1209
+ {
1210
+ {
1211
+ // looks like we've got child nodes to render into this host element
1212
+ // or we need to update the css class/attrs on the host element
1213
+ // DOM WRITE!
1214
+ {
1215
+ renderVdom(hostRef, instance, isInitialLoad);
1216
+ }
1217
+ }
1218
+ }
1219
+ }
1220
+ catch (e) {
1221
+ consoleError(e, hostRef.$hostElement$);
1222
+ }
1223
+ renderingRef = null;
1224
+ return null;
1225
+ };
1226
+ const getRenderingRef = () => renderingRef;
1227
+ const postUpdateComponent = (hostRef) => {
1228
+ const tagName = hostRef.$cmpMeta$.$tagName$;
1229
+ const elm = hostRef.$hostElement$;
1230
+ const endPostUpdate = createTime('postUpdate', tagName);
1231
+ const instance = hostRef.$lazyInstance$ ;
1232
+ const ancestorComponent = hostRef.$ancestorComponent$;
1233
+ {
1234
+ safeCall(instance, 'componentDidRender');
1235
+ }
1236
+ if (!(hostRef.$flags$ & 64 /* HOST_FLAGS.hasLoadedComponent */)) {
1237
+ hostRef.$flags$ |= 64 /* HOST_FLAGS.hasLoadedComponent */;
1238
+ {
1239
+ // DOM WRITE!
1240
+ addHydratedFlag(elm);
1241
+ }
1242
+ {
1243
+ safeCall(instance, 'componentDidLoad');
1244
+ }
1245
+ endPostUpdate();
1246
+ {
1247
+ hostRef.$onReadyResolve$(elm);
1248
+ if (!ancestorComponent) {
1249
+ appDidLoad();
1250
+ }
1251
+ }
1252
+ }
1253
+ else {
1254
+ endPostUpdate();
1255
+ }
1256
+ {
1257
+ hostRef.$onInstanceResolve$(elm);
1258
+ }
1259
+ // load events fire from bottom to top
1260
+ // the deepest elements load first then bubbles up
1261
+ {
1262
+ if (hostRef.$onRenderResolve$) {
1263
+ hostRef.$onRenderResolve$();
1264
+ hostRef.$onRenderResolve$ = undefined;
1265
+ }
1266
+ if (hostRef.$flags$ & 512 /* HOST_FLAGS.needsRerender */) {
1267
+ nextTick(() => scheduleUpdate(hostRef, false));
1268
+ }
1269
+ hostRef.$flags$ &= ~(4 /* HOST_FLAGS.isWaitingForChildren */ | 512 /* HOST_FLAGS.needsRerender */);
1270
+ }
1271
+ // ( •_•)
1272
+ // ( •_•)>⌐■-■
1273
+ // (⌐■_■)
1274
+ };
1275
+ const forceUpdate = (ref) => {
1276
+ {
1277
+ const hostRef = getHostRef(ref);
1278
+ const isConnected = hostRef.$hostElement$.isConnected;
1279
+ if (isConnected &&
1280
+ (hostRef.$flags$ & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) {
1281
+ scheduleUpdate(hostRef, false);
1282
+ }
1283
+ // Returns "true" when the forced update was successfully scheduled
1284
+ return isConnected;
1285
+ }
1286
+ };
1287
+ const appDidLoad = (who) => {
1288
+ // on appload
1289
+ // we have finish the first big initial render
1290
+ {
1291
+ addHydratedFlag(doc.documentElement);
1292
+ }
1293
+ nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
1294
+ };
1295
+ const safeCall = (instance, method, arg) => {
1296
+ if (instance && instance[method]) {
1297
+ try {
1298
+ return instance[method](arg);
1299
+ }
1300
+ catch (e) {
1301
+ consoleError(e);
1302
+ }
1303
+ }
1304
+ return undefined;
1305
+ };
1306
+ const addHydratedFlag = (elm) => elm.classList.add('hydrated')
1307
+ ;
1308
+ const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
1309
+ const setValue = (ref, propName, newVal, cmpMeta) => {
1310
+ // check our new property value against our internal value
1311
+ const hostRef = getHostRef(ref);
1312
+ const elm = hostRef.$hostElement$ ;
1313
+ const oldVal = hostRef.$instanceValues$.get(propName);
1314
+ const flags = hostRef.$flags$;
1315
+ const instance = hostRef.$lazyInstance$ ;
1316
+ newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
1317
+ // explicitly check for NaN on both sides, as `NaN === NaN` is always false
1318
+ const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
1319
+ const didValueChange = newVal !== oldVal && !areBothNaN;
1320
+ if ((!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) || oldVal === undefined) && didValueChange) {
1321
+ // gadzooks! the property's value has changed!!
1322
+ // set our new value!
1323
+ hostRef.$instanceValues$.set(propName, newVal);
1324
+ if (instance) {
1325
+ // get an array of method names of watch functions to call
1326
+ if (cmpMeta.$watchers$ && flags & 128 /* HOST_FLAGS.isWatchReady */) {
1327
+ const watchMethods = cmpMeta.$watchers$[propName];
1328
+ if (watchMethods) {
1329
+ // this instance is watching for when this property changed
1330
+ watchMethods.map((watchMethodName) => {
1331
+ try {
1332
+ // fire off each of the watch methods that are watching this property
1333
+ instance[watchMethodName](newVal, oldVal, propName);
1334
+ }
1335
+ catch (e) {
1336
+ consoleError(e, elm);
1337
+ }
1338
+ });
1339
+ }
1340
+ }
1341
+ if ((flags & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) {
1342
+ // looks like this value actually changed, so we've got work to do!
1343
+ // but only if we've already rendered, otherwise just chill out
1344
+ // queue that we need to do an update, but don't worry about queuing
1345
+ // up millions cuz this function ensures it only runs once
1346
+ scheduleUpdate(hostRef, false);
1347
+ }
1348
+ }
1349
+ }
1350
+ };
1351
+ /**
1352
+ * Attach a series of runtime constructs to a compiled Stencil component
1353
+ * constructor, including getters and setters for the `@Prop` and `@State`
1354
+ * decorators, callbacks for when attributes change, and so on.
1355
+ *
1356
+ * @param Cstr the constructor for a component that we need to process
1357
+ * @param cmpMeta metadata collected previously about the component
1358
+ * @param flags a number used to store a series of bit flags
1359
+ * @returns a reference to the same constructor passed in (but now mutated)
1360
+ */
1361
+ const proxyComponent = (Cstr, cmpMeta, flags) => {
1362
+ var _a;
1363
+ if (cmpMeta.$members$) {
1364
+ if (Cstr.watchers) {
1365
+ cmpMeta.$watchers$ = Cstr.watchers;
1366
+ }
1367
+ // It's better to have a const than two Object.entries()
1368
+ const members = Object.entries(cmpMeta.$members$);
1369
+ const prototype = Cstr.prototype;
1370
+ members.map(([memberName, [memberFlags]]) => {
1371
+ if ((memberFlags & 31 /* MEMBER_FLAGS.Prop */ ||
1372
+ ((flags & 2 /* PROXY_FLAGS.proxyState */) && memberFlags & 32 /* MEMBER_FLAGS.State */))) {
1373
+ // proxyComponent - prop
1374
+ Object.defineProperty(prototype, memberName, {
1375
+ get() {
1376
+ // proxyComponent, get value
1377
+ return getValue(this, memberName);
1378
+ },
1379
+ set(newValue) {
1380
+ // proxyComponent, set value
1381
+ setValue(this, memberName, newValue, cmpMeta);
1382
+ },
1383
+ configurable: true,
1384
+ enumerable: true,
1385
+ });
1386
+ }
1387
+ else if (flags & 1 /* PROXY_FLAGS.isElementConstructor */ &&
1388
+ memberFlags & 64 /* MEMBER_FLAGS.Method */) {
1389
+ // proxyComponent - method
1390
+ Object.defineProperty(prototype, memberName, {
1391
+ value(...args) {
1392
+ const ref = getHostRef(this);
1393
+ return ref.$onInstancePromise$.then(() => ref.$lazyInstance$[memberName](...args));
1394
+ },
1395
+ });
1396
+ }
1397
+ });
1398
+ if ((flags & 1 /* PROXY_FLAGS.isElementConstructor */)) {
1399
+ const attrNameToPropName = new Map();
1400
+ prototype.attributeChangedCallback = function (attrName, oldValue, newValue) {
1401
+ plt.jmp(() => {
1402
+ const propName = attrNameToPropName.get(attrName);
1403
+ // In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
1404
+ // in the case where an attribute was set inline.
1405
+ // ```html
1406
+ // <my-component some-attribute="some-value"></my-component>
1407
+ // ```
1408
+ //
1409
+ // There is an edge case where a developer sets the attribute inline on a custom element and then
1410
+ // programmatically changes it before it has been upgraded as shown below:
1411
+ //
1412
+ // ```html
1413
+ // <!-- this component has _not_ been upgraded yet -->
1414
+ // <my-component id="test" some-attribute="some-value"></my-component>
1415
+ // <script>
1416
+ // // grab non-upgraded component
1417
+ // el = document.querySelector("#test");
1418
+ // el.someAttribute = "another-value";
1419
+ // // upgrade component
1420
+ // customElements.define('my-component', MyComponent);
1421
+ // </script>
1422
+ // ```
1423
+ // In this case if we do not un-shadow here and use the value of the shadowing property, attributeChangedCallback
1424
+ // will be called with `newValue = "some-value"` and will set the shadowed property (this.someAttribute = "another-value")
1425
+ // to the value that was set inline i.e. "some-value" from above example. When
1426
+ // the connectedCallback attempts to un-shadow it will use "some-value" as the initial value rather than "another-value"
1427
+ //
1428
+ // The case where the attribute was NOT set inline but was not set programmatically shall be handled/un-shadowed
1429
+ // by connectedCallback as this attributeChangedCallback will not fire.
1430
+ //
1431
+ // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
1432
+ //
1433
+ // TODO(STENCIL-16) we should think about whether or not we actually want to be reflecting the attributes to
1434
+ // properties here given that this goes against best practices outlined here
1435
+ // https://developers.google.com/web/fundamentals/web-components/best-practices#avoid-reentrancy
1436
+ if (this.hasOwnProperty(propName)) {
1437
+ newValue = this[propName];
1438
+ delete this[propName];
1439
+ }
1440
+ else if (prototype.hasOwnProperty(propName) &&
1441
+ typeof this[propName] === 'number' &&
1442
+ this[propName] == newValue) {
1443
+ // if the propName exists on the prototype of `Cstr`, this update may be a result of Stencil using native
1444
+ // APIs to reflect props as attributes. Calls to `setAttribute(someElement, propName)` will result in
1445
+ // `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.
1446
+ return;
1447
+ }
1448
+ else if (propName == null) {
1449
+ // At this point we should know this is not a "member", so we can treat it like watching an attribute
1450
+ // on a vanilla web component
1451
+ const hostRef = getHostRef(this);
1452
+ const flags = hostRef === null || hostRef === void 0 ? void 0 : hostRef.$flags$;
1453
+ // We only want to trigger the callback(s) if:
1454
+ // 1. The instance is ready
1455
+ // 2. The watchers are ready
1456
+ // 3. The value has changed
1457
+ if (!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) &&
1458
+ flags & 128 /* HOST_FLAGS.isWatchReady */ &&
1459
+ newValue !== oldValue) {
1460
+ const instance = hostRef.$lazyInstance$ ;
1461
+ const entry = cmpMeta.$watchers$[attrName];
1462
+ entry === null || entry === void 0 ? void 0 : entry.forEach((callbackName) => {
1463
+ if (instance[callbackName] != null) {
1464
+ instance[callbackName].call(instance, newValue, oldValue, attrName);
1465
+ }
1466
+ });
1467
+ }
1468
+ return;
1469
+ }
1470
+ this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
1471
+ });
1472
+ };
1473
+ // Create an array of attributes to observe
1474
+ // This list in comprised of all strings used within a `@Watch()` decorator
1475
+ // on a component as well as any Stencil-specific "members" (`@Prop()`s and `@State()`s).
1476
+ // As such, there is no way to guarantee type-safety here that a user hasn't entered
1477
+ // an invalid attribute.
1478
+ Cstr.observedAttributes = Array.from(new Set([
1479
+ ...Object.keys((_a = cmpMeta.$watchers$) !== null && _a !== void 0 ? _a : {}),
1480
+ ...members
1481
+ .filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */)
1482
+ .map(([propName, m]) => {
1483
+ const attrName = m[1] || propName;
1484
+ attrNameToPropName.set(attrName, propName);
1485
+ return attrName;
1486
+ }),
1487
+ ]));
1488
+ }
1489
+ }
1490
+ return Cstr;
1491
+ };
1492
+ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
1493
+ // initializeComponent
1494
+ if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
1495
+ // Let the runtime know that the component has been initialized
1496
+ hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
1497
+ {
1498
+ // lazy loaded components
1499
+ // request the component's implementation to be
1500
+ // wired up with the host element
1501
+ Cstr = loadModule(cmpMeta);
1502
+ if (Cstr.then) {
1503
+ // Await creates a micro-task avoid if possible
1504
+ const endLoad = uniqueTime();
1505
+ Cstr = await Cstr;
1506
+ endLoad();
1507
+ }
1508
+ if (!Cstr.isProxied) {
1509
+ // we've never proxied this Constructor before
1510
+ // let's add the getters/setters to its prototype before
1511
+ // the first time we create an instance of the implementation
1512
+ {
1513
+ cmpMeta.$watchers$ = Cstr.watchers;
1514
+ }
1515
+ proxyComponent(Cstr, cmpMeta, 2 /* PROXY_FLAGS.proxyState */);
1516
+ Cstr.isProxied = true;
1517
+ }
1518
+ const endNewInstance = createTime('createInstance', cmpMeta.$tagName$);
1519
+ // ok, time to construct the instance
1520
+ // but let's keep track of when we start and stop
1521
+ // so that the getters/setters don't incorrectly step on data
1522
+ {
1523
+ hostRef.$flags$ |= 8 /* HOST_FLAGS.isConstructingInstance */;
1524
+ }
1525
+ // construct the lazy-loaded component implementation
1526
+ // passing the hostRef is very important during
1527
+ // construction in order to directly wire together the
1528
+ // host element and the lazy-loaded instance
1529
+ try {
1530
+ new Cstr(hostRef);
1531
+ }
1532
+ catch (e) {
1533
+ consoleError(e);
1534
+ }
1535
+ {
1536
+ hostRef.$flags$ &= ~8 /* HOST_FLAGS.isConstructingInstance */;
1537
+ }
1538
+ {
1539
+ hostRef.$flags$ |= 128 /* HOST_FLAGS.isWatchReady */;
1540
+ }
1541
+ endNewInstance();
1542
+ }
1543
+ if (Cstr.style) {
1544
+ // this component has styles but we haven't registered them yet
1545
+ let style = Cstr.style;
1546
+ const scopeId = getScopeId(cmpMeta);
1547
+ if (!styles.has(scopeId)) {
1548
+ const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);
1549
+ registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */));
1550
+ endRegisterStyles();
1551
+ }
1552
+ }
1553
+ }
1554
+ // we've successfully created a lazy instance
1555
+ const ancestorComponent = hostRef.$ancestorComponent$;
1556
+ const schedule = () => scheduleUpdate(hostRef, true);
1557
+ if (ancestorComponent && ancestorComponent['s-rc']) {
1558
+ // this is the initial load and this component it has an ancestor component
1559
+ // but the ancestor component has NOT fired its will update lifecycle yet
1560
+ // so let's just cool our jets and wait for the ancestor to continue first
1561
+ // this will get fired off when the ancestor component
1562
+ // finally gets around to rendering its lazy self
1563
+ // fire off the initial update
1564
+ ancestorComponent['s-rc'].push(schedule);
1565
+ }
1566
+ else {
1567
+ schedule();
1568
+ }
1569
+ };
1570
+ const fireConnectedCallback = (instance) => {
1571
+ };
1572
+ const connectedCallback = (elm) => {
1573
+ if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
1574
+ const hostRef = getHostRef(elm);
1575
+ const cmpMeta = hostRef.$cmpMeta$;
1576
+ const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);
1577
+ if (!(hostRef.$flags$ & 1 /* HOST_FLAGS.hasConnected */)) {
1578
+ // first time this component has connected
1579
+ hostRef.$flags$ |= 1 /* HOST_FLAGS.hasConnected */;
1580
+ {
1581
+ // find the first ancestor component (if there is one) and register
1582
+ // this component as one of the actively loading child components for its ancestor
1583
+ let ancestorComponent = elm;
1584
+ while ((ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host)) {
1585
+ // climb up the ancestors looking for the first
1586
+ // component that hasn't finished its lifecycle update yet
1587
+ if (ancestorComponent['s-p']) {
1588
+ // we found this components first ancestor component
1589
+ // keep a reference to this component's ancestor component
1590
+ attachToAncestor(hostRef, (hostRef.$ancestorComponent$ = ancestorComponent));
1591
+ break;
1592
+ }
1593
+ }
1594
+ }
1595
+ // Lazy properties
1596
+ // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
1597
+ if (cmpMeta.$members$) {
1598
+ Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
1599
+ if (memberFlags & 31 /* MEMBER_FLAGS.Prop */ && elm.hasOwnProperty(memberName)) {
1600
+ const value = elm[memberName];
1601
+ delete elm[memberName];
1602
+ elm[memberName] = value;
1603
+ }
1604
+ });
1605
+ }
1606
+ {
1607
+ initializeComponent(elm, hostRef, cmpMeta);
1608
+ }
1609
+ }
1610
+ else {
1611
+ // not the first time this has connected
1612
+ // reattach any event listeners to the host
1613
+ // since they would have been removed when disconnected
1614
+ addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1615
+ // fire off connectedCallback() on component instance
1616
+ if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$lazyInstance$) ;
1617
+ else if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$onReadyPromise$) {
1618
+ hostRef.$onReadyPromise$.then(() => fireConnectedCallback());
1619
+ }
1620
+ }
1621
+ endConnected();
1622
+ }
1623
+ };
1624
+ const disconnectInstance = (instance) => {
1625
+ {
1626
+ safeCall(instance, 'disconnectedCallback');
1627
+ }
1628
+ };
1629
+ const disconnectedCallback = async (elm) => {
1630
+ if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
1631
+ const hostRef = getHostRef(elm);
1632
+ {
1633
+ if (hostRef.$rmListeners$) {
1634
+ hostRef.$rmListeners$.map((rmListener) => rmListener());
1635
+ hostRef.$rmListeners$ = undefined;
1636
+ }
1637
+ }
1638
+ if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$lazyInstance$) {
1639
+ disconnectInstance(hostRef.$lazyInstance$);
1640
+ }
1641
+ else if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$onReadyPromise$) {
1642
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
1643
+ }
1644
+ }
1645
+ };
1646
+ const bootstrapLazy = (lazyBundles, options = {}) => {
1647
+ var _a;
1648
+ const endBootstrap = createTime();
1649
+ const cmpTags = [];
1650
+ const exclude = options.exclude || [];
1651
+ const customElements = win.customElements;
1652
+ const head = doc.head;
1653
+ const metaCharset = /*@__PURE__*/ head.querySelector('meta[charset]');
1654
+ const visibilityStyle = /*@__PURE__*/ doc.createElement('style');
1655
+ const deferredConnectedCallbacks = [];
1656
+ let appLoadFallback;
1657
+ let isBootstrapping = true;
1658
+ Object.assign(plt, options);
1659
+ plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
1660
+ lazyBundles.map((lazyBundle) => {
1661
+ lazyBundle[1].map((compactMeta) => {
1662
+ var _a;
1663
+ const cmpMeta = {
1664
+ $flags$: compactMeta[0],
1665
+ $tagName$: compactMeta[1],
1666
+ $members$: compactMeta[2],
1667
+ $listeners$: compactMeta[3],
1668
+ };
1669
+ {
1670
+ cmpMeta.$members$ = compactMeta[2];
1671
+ }
1672
+ {
1673
+ cmpMeta.$listeners$ = compactMeta[3];
1674
+ }
1675
+ {
1676
+ cmpMeta.$watchers$ = (_a = compactMeta[4]) !== null && _a !== void 0 ? _a : {};
1677
+ }
1678
+ const tagName = cmpMeta.$tagName$;
1679
+ const HostElement = class extends HTMLElement {
1680
+ // StencilLazyHost
1681
+ constructor(self) {
1682
+ // @ts-ignore
1683
+ super(self);
1684
+ self = this;
1685
+ registerHost(self, cmpMeta);
1686
+ if (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {
1687
+ // this component is using shadow dom
1688
+ // and this browser supports shadow dom
1689
+ // add the read-only property "shadowRoot" to the host element
1690
+ // adding the shadow root build conditionals to minimize runtime
1691
+ {
1692
+ {
1693
+ self.attachShadow({ mode: 'open' });
1694
+ }
1695
+ }
1696
+ }
1697
+ }
1698
+ connectedCallback() {
1699
+ if (appLoadFallback) {
1700
+ clearTimeout(appLoadFallback);
1701
+ appLoadFallback = null;
1702
+ }
1703
+ if (isBootstrapping) {
1704
+ // connectedCallback will be processed once all components have been registered
1705
+ deferredConnectedCallbacks.push(this);
1706
+ }
1707
+ else {
1708
+ plt.jmp(() => connectedCallback(this));
1709
+ }
1710
+ }
1711
+ disconnectedCallback() {
1712
+ plt.jmp(() => disconnectedCallback(this));
1713
+ }
1714
+ componentOnReady() {
1715
+ return getHostRef(this).$onReadyPromise$;
1716
+ }
1717
+ };
1718
+ cmpMeta.$lazyBundleId$ = lazyBundle[0];
1719
+ if (!exclude.includes(tagName) && !customElements.get(tagName)) {
1720
+ cmpTags.push(tagName);
1721
+ customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* PROXY_FLAGS.isElementConstructor */));
1722
+ }
1723
+ });
1724
+ });
1725
+ {
1726
+ visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
1727
+ visibilityStyle.setAttribute('data-styles', '');
1728
+ // Apply CSP nonce to the style tag if it exists
1729
+ const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
1730
+ if (nonce != null) {
1731
+ visibilityStyle.setAttribute('nonce', nonce);
1732
+ }
1733
+ head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
1734
+ }
1735
+ // Process deferred connectedCallbacks now all components have been registered
1736
+ isBootstrapping = false;
1737
+ if (deferredConnectedCallbacks.length) {
1738
+ deferredConnectedCallbacks.map((host) => host.connectedCallback());
1739
+ }
1740
+ else {
1741
+ {
1742
+ plt.jmp(() => (appLoadFallback = setTimeout(appDidLoad, 30)));
1743
+ }
1744
+ }
1745
+ // Fallback appLoad event
1746
+ endBootstrap();
1747
+ };
1748
+ const Fragment = (_, children) => children;
1749
+ const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
1750
+ if (listeners) {
1751
+ listeners.map(([flags, name, method]) => {
1752
+ const target = getHostListenerTarget(elm, flags) ;
1753
+ const handler = hostListenerProxy(hostRef, method);
1754
+ const opts = hostListenerOpts(flags);
1755
+ plt.ael(target, name, handler, opts);
1756
+ (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
1757
+ });
1758
+ }
1759
+ };
1760
+ const hostListenerProxy = (hostRef, methodName) => (ev) => {
1761
+ try {
1762
+ {
1763
+ if (hostRef.$flags$ & 256 /* HOST_FLAGS.isListenReady */) {
1764
+ // instance is ready, let's call it's member method for this event
1765
+ hostRef.$lazyInstance$[methodName](ev);
1766
+ }
1767
+ else {
1768
+ (hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
1769
+ }
1770
+ }
1771
+ }
1772
+ catch (e) {
1773
+ consoleError(e);
1774
+ }
1775
+ };
1776
+ const getHostListenerTarget = (elm, flags) => {
1777
+ if (flags & 4 /* LISTENER_FLAGS.TargetDocument */)
1778
+ return doc;
1779
+ if (flags & 8 /* LISTENER_FLAGS.TargetWindow */)
1780
+ return win;
1781
+ if (flags & 16 /* LISTENER_FLAGS.TargetBody */)
1782
+ return doc.body;
1783
+ return elm;
1784
+ };
1785
+ // prettier-ignore
1786
+ const hostListenerOpts = (flags) => (flags & 2 /* LISTENER_FLAGS.Capture */) !== 0;
1787
+ /**
1788
+ * Assigns the given value to the nonce property on the runtime platform object.
1789
+ * During runtime, this value is used to set the nonce attribute on all dynamically created script and style tags.
1790
+ * @param nonce The value to be assigned to the platform nonce property.
1791
+ * @returns void
1792
+ */
1793
+ const setNonce = (nonce) => (plt.$nonce$ = nonce);
1794
+ const hostRefs = /*@__PURE__*/ new WeakMap();
1795
+ const getHostRef = (ref) => hostRefs.get(ref);
1796
+ const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
1797
+ const registerHost = (elm, cmpMeta) => {
1798
+ const hostRef = {
1799
+ $flags$: 0,
1800
+ $hostElement$: elm,
1801
+ $cmpMeta$: cmpMeta,
1802
+ $instanceValues$: new Map(),
1803
+ };
1804
+ {
1805
+ hostRef.$onInstancePromise$ = new Promise((r) => (hostRef.$onInstanceResolve$ = r));
1806
+ }
1807
+ {
1808
+ hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
1809
+ elm['s-p'] = [];
1810
+ elm['s-rc'] = [];
1811
+ }
1812
+ addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1813
+ return hostRefs.set(elm, hostRef);
1814
+ };
1815
+ const isMemberInElement = (elm, memberName) => memberName in elm;
1816
+ const consoleError = (e, el) => (0, console.error)(e, el);
1817
+ const cmpModules = /*@__PURE__*/ new Map();
1818
+ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
1819
+ // loadModuleImport
1820
+ const exportName = cmpMeta.$tagName$.replace(/-/g, '_');
1821
+ const bundleId = cmpMeta.$lazyBundleId$;
1822
+ const module = cmpModules.get(bundleId) ;
1823
+ if (module) {
1824
+ return module[exportName];
1825
+ }
1826
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/
1827
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1828
+ /* @vite-ignore */
1829
+ /* webpackInclude: /\.entry\.js$/ */
1830
+ /* webpackExclude: /\.system\.entry\.js$/ */
1831
+ /* webpackMode: "lazy" */
1832
+ `./${bundleId}.entry.js${''}`)); }).then((importedModule) => {
1833
+ {
1834
+ cmpModules.set(bundleId, importedModule);
1835
+ }
1836
+ return importedModule[exportName];
1837
+ }, consoleError);
1838
+ };
1839
+ const styles = /*@__PURE__*/ new Map();
1840
+ const win = typeof window !== 'undefined' ? window : {};
1841
+ const doc = win.document || { head: {} };
1842
+ const plt = {
1843
+ $flags$: 0,
1844
+ $resourcesUrl$: '',
1845
+ jmp: (h) => h(),
1846
+ raf: (h) => requestAnimationFrame(h),
1847
+ ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
1848
+ rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
1849
+ ce: (eventName, opts) => new CustomEvent(eventName, opts),
1850
+ };
1851
+ const promiseResolve = (v) => Promise.resolve(v);
1852
+ const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
1853
+ try {
1854
+ new CSSStyleSheet();
1855
+ return typeof new CSSStyleSheet().replaceSync === 'function';
1856
+ }
1857
+ catch (e) { }
1858
+ return false;
1859
+ })()
1860
+ ;
1861
+ const queueDomReads = [];
1862
+ const queueDomWrites = [];
1863
+ const queueTask = (queue, write) => (cb) => {
1864
+ queue.push(cb);
1865
+ if (!queuePending) {
1866
+ queuePending = true;
1867
+ if (write && plt.$flags$ & 4 /* PLATFORM_FLAGS.queueSync */) {
1868
+ nextTick(flush);
1869
+ }
1870
+ else {
1871
+ plt.raf(flush);
1872
+ }
1873
+ }
1874
+ };
1875
+ const consume = (queue) => {
1876
+ for (let i = 0; i < queue.length; i++) {
1877
+ try {
1878
+ queue[i](performance.now());
1879
+ }
1880
+ catch (e) {
1881
+ consoleError(e);
1882
+ }
1883
+ }
1884
+ queue.length = 0;
1885
+ };
1886
+ const flush = () => {
1887
+ // always force a bunch of medium callbacks to run, but still have
1888
+ // a throttle on how many can run in a certain time
1889
+ // DOM READS!!!
1890
+ consume(queueDomReads);
1891
+ // DOM WRITES!!!
1892
+ {
1893
+ consume(queueDomWrites);
1894
+ if ((queuePending = queueDomReads.length > 0)) {
1895
+ // still more to do yet, but we've run out of time
1896
+ // let's let this thing cool off and try again in the next tick
1897
+ plt.raf(flush);
1898
+ }
1899
+ }
1900
+ };
1901
+ const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
1902
+ const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
1903
+
1904
+ exports.Fragment = Fragment;
1905
+ exports.Host = Host;
1906
+ exports.bootstrapLazy = bootstrapLazy;
1907
+ exports.createEvent = createEvent;
1908
+ exports.forceUpdate = forceUpdate;
1909
+ exports.getAssetPath = getAssetPath;
1910
+ exports.getElement = getElement;
1911
+ exports.getRenderingRef = getRenderingRef;
1912
+ exports.h = h;
1913
+ exports.promiseResolve = promiseResolve;
1914
+ exports.registerInstance = registerInstance;
1915
+ exports.setNonce = setNonce;
1916
+
1917
+ //# sourceMappingURL=index-9542d2e7.js.map