@amwaljs/checkout-button 0.3.1 → 0.3.2

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 (888) hide show
  1. package/README.md +1 -1
  2. package/dist/checkout/checkout.esm.js +1 -1
  3. package/dist/checkout/{p-c03b6161.entry.js → p-00045a8c.entry.js} +1 -1
  4. package/dist/checkout/p-01bbe74f.entry.js +1 -0
  5. package/dist/checkout/p-051412fa.entry.js +1 -0
  6. package/dist/checkout/p-09cbe586.entry.js +4 -0
  7. package/dist/checkout/{p-439ad699.entry.js → p-0a85a01f.entry.js} +2 -2
  8. package/dist/checkout/{p-d5652cd4.entry.js → p-0bbfeb3c.entry.js} +1 -1
  9. package/dist/checkout/{p-4ae1a390.entry.js → p-0d96b482.entry.js} +1 -1
  10. package/dist/checkout/{p-DUa_5Mmb.js → p-0f03cd28.js} +2 -2
  11. package/dist/checkout/p-104d7733.entry.js +1 -0
  12. package/dist/checkout/{p-8036cf49.entry.js → p-10ad151a.entry.js} +5 -5
  13. package/dist/checkout/p-112455b1.js +1 -0
  14. package/dist/checkout/p-11beffea.entry.js +1 -0
  15. package/dist/checkout/p-13245fd4.js +1 -0
  16. package/dist/checkout/p-13741a94.entry.js +1 -0
  17. package/dist/checkout/p-14ea2c82.entry.js +1 -0
  18. package/dist/checkout/p-167dc7a7.entry.js +4 -0
  19. package/dist/checkout/p-1a749b59.entry.js +1 -0
  20. package/dist/checkout/p-1c718939.entry.js +1 -0
  21. package/dist/checkout/{p-11205aeb.entry.js → p-1cbb13f2.entry.js} +1 -1
  22. package/dist/checkout/{p-46ff73b3.entry.js → p-20df5234.entry.js} +1 -1
  23. package/dist/checkout/p-24068b1c.entry.js +1 -0
  24. package/dist/checkout/{p-7006753a.entry.js → p-28ccecc7.entry.js} +2 -2
  25. package/dist/checkout/p-361649c3.js +4 -0
  26. package/dist/{components/p-DoR35tr_.js → checkout/p-39ad94cf.js} +2 -2
  27. package/dist/checkout/p-3b75b22a.js +5 -0
  28. package/dist/checkout/p-3b80783d.js +8 -0
  29. package/dist/checkout/p-3d3eefc3.js +4 -0
  30. package/dist/checkout/p-3e1e3453.js +4 -0
  31. package/dist/checkout/p-3e681e57.js +4 -0
  32. package/dist/checkout/{p-bf933eb6.entry.js → p-3e8da476.entry.js} +1 -1
  33. package/dist/checkout/{p-1dc08181.entry.js → p-4028c0d2.entry.js} +1 -1
  34. package/dist/checkout/p-44c91c42.entry.js +1 -0
  35. package/dist/checkout/p-464f5a60.entry.js +1 -0
  36. package/dist/checkout/p-46b7ee7f.entry.js +1 -0
  37. package/dist/checkout/p-48784250.entry.js +1 -0
  38. package/dist/{components/p-wiOwkFtc.js → checkout/p-4be20bf2.js} +1 -1
  39. package/dist/{components/p-Dl_WhQZu.js → checkout/p-4f78d3a0.js} +2 -2
  40. package/dist/checkout/{p-4da4ecc4.entry.js → p-529bce3f.entry.js} +1 -1
  41. package/dist/checkout/p-536a0294.js +4 -0
  42. package/dist/checkout/{p-eae2d3f2.entry.js → p-5eecd5ef.entry.js} +1 -1
  43. package/dist/checkout/p-64257c8d.entry.js +1 -0
  44. package/dist/checkout/{p-5903b3af.entry.js → p-64bd1dd3.entry.js} +1 -1
  45. package/dist/checkout/{p-9b7d7231.entry.js → p-68a4caba.entry.js} +1 -1
  46. package/dist/checkout/{p-978b3762.entry.js → p-69242ed6.entry.js} +1 -1
  47. package/dist/checkout/{p-62b7c8b0.entry.js → p-6d886d7e.entry.js} +1 -1
  48. package/dist/checkout/{p-ofaUly0p.js → p-6fa979e3.js} +2 -2
  49. package/dist/checkout/p-6fb474f3.entry.js +1 -0
  50. package/dist/checkout/p-77104220.js +7 -0
  51. package/dist/checkout/{p-aba43d04.entry.js → p-79ec3e4b.entry.js} +1 -1
  52. package/dist/checkout/{p-cd2c344b.entry.js → p-7b51bf67.entry.js} +2 -2
  53. package/dist/checkout/p-7f0004c9.js +4 -0
  54. package/dist/checkout/p-7fe50ab4.entry.js +1 -0
  55. package/dist/checkout/p-880b451c.entry.js +4 -0
  56. package/dist/checkout/p-886dad62.entry.js +1 -0
  57. package/dist/checkout/p-886e8746.entry.js +1 -0
  58. package/dist/checkout/p-88abdf59.js +4 -0
  59. package/dist/checkout/{p-f845e91b.entry.js → p-8a97a411.entry.js} +1 -1
  60. package/dist/checkout/p-8af3c6cc.entry.js +1 -0
  61. package/dist/checkout/{p-8b015c21.entry.js → p-8c022f5d.entry.js} +1 -1
  62. package/dist/checkout/{p-56e307eb.entry.js → p-91855eae.entry.js} +1 -1
  63. package/dist/checkout/{p-ca257d45.entry.js → p-9185e55b.entry.js} +1 -1
  64. package/dist/checkout/{p-4b34896c.entry.js → p-926eda98.entry.js} +1 -1
  65. package/dist/checkout/p-93e5b313.entry.js +4 -0
  66. package/dist/checkout/{p-4a86b731.entry.js → p-97024acb.entry.js} +1 -1
  67. package/dist/checkout/p-99e447f9.js +1 -0
  68. package/dist/{components/p-BgOwfqIY.js → checkout/p-9b519de5.js} +2 -2
  69. package/dist/checkout/{p-b8245f6a.entry.js → p-9b65a6e5.entry.js} +1 -1
  70. package/dist/checkout/{p-53ae9dd0.entry.js → p-9cc1fdfb.entry.js} +1 -1
  71. package/dist/checkout/{p-8fc1287a.entry.js → p-9f26fb71.entry.js} +1 -1
  72. package/dist/checkout/p-9f41a631.entry.js +1 -0
  73. package/dist/checkout/{p-5f005b5e.entry.js → p-a2ce8858.entry.js} +1 -1
  74. package/dist/checkout/{p-e4d0702d.entry.js → p-a3fca65c.entry.js} +1 -1
  75. package/dist/checkout/{p-d370e756.entry.js → p-a6056eb1.entry.js} +2 -2
  76. package/dist/checkout/{p-c929d6ea.entry.js → p-a7b2cbb9.entry.js} +1 -1
  77. package/dist/{components/p-Dwo-QLgs.js → checkout/p-ab16e6ce.js} +1 -1
  78. package/dist/checkout/{p-63db3363.entry.js → p-ab9a18c4.entry.js} +1 -1
  79. package/dist/checkout/p-b038db20.js +4 -0
  80. package/dist/checkout/p-b4ad8642.entry.js +1 -0
  81. package/dist/checkout/p-b4cf78ad.entry.js +1 -0
  82. package/dist/checkout/p-b7be2ec0.js +4 -0
  83. package/dist/checkout/p-b84d9e44.js +4 -0
  84. package/dist/{components/p-CwRU9ccI.js → checkout/p-b8fdd517.js} +1 -1
  85. package/dist/checkout/{p-d799009b.entry.js → p-b9d8ab12.entry.js} +1 -1
  86. package/dist/checkout/p-bb1f698e.js +4 -0
  87. package/dist/checkout/p-bd17be25.js +4 -0
  88. package/dist/checkout/p-bd4df0bc.entry.js +1 -0
  89. package/dist/checkout/p-c152bdea.js +4 -0
  90. package/dist/checkout/{p-f22v7XAM.js → p-c30e2b28.js} +2 -2
  91. package/dist/checkout/{p-c2296aa1.entry.js → p-c61a3d5d.entry.js} +1 -1
  92. package/dist/checkout/p-c6ee4bb6.entry.js +1 -0
  93. package/dist/checkout/p-c771a565.entry.js +1 -0
  94. package/dist/checkout/{p-3c9a8bee.entry.js → p-c82b2823.entry.js} +1 -1
  95. package/dist/checkout/p-c8f7d1b5.entry.js +1 -0
  96. package/dist/checkout/p-ceef30cd.entry.js +1 -0
  97. package/dist/checkout/p-d5733333.entry.js +1 -0
  98. package/dist/checkout/p-d5bba69c.entry.js +1 -0
  99. package/dist/checkout/p-d60b2328.js +4 -0
  100. package/dist/checkout/p-d60e05e2.entry.js +1 -0
  101. package/dist/checkout/p-d6b04157.entry.js +1 -0
  102. package/dist/checkout/p-d7a430bf.js +2 -0
  103. package/dist/checkout/{p-B3WORC1a.js → p-d839c693.js} +1 -1
  104. package/dist/checkout/{p-141f2eab.entry.js → p-d9dfb3ae.entry.js} +3 -3
  105. package/dist/checkout/p-dc51d318.js +5 -0
  106. package/dist/checkout/p-ddbe30b8.entry.js +1 -0
  107. package/dist/checkout/p-de418dd1.entry.js +1 -0
  108. package/dist/checkout/{p-b4000357.entry.js → p-defa5f72.entry.js} +2 -2
  109. package/dist/checkout/{p-b90c064e.entry.js → p-df0fa5e1.entry.js} +2 -2
  110. package/dist/checkout/{p-c8740acc.entry.js → p-e0f073f1.entry.js} +3 -3
  111. package/dist/checkout/p-e237d611.entry.js +1 -0
  112. package/dist/checkout/p-ea71fb8d.entry.js +1 -0
  113. package/dist/checkout/{p-95563c4c.entry.js → p-eda93a0b.entry.js} +1 -1
  114. package/dist/checkout/p-eee05053.entry.js +1 -0
  115. package/dist/checkout/{p-95431a73.entry.js → p-f8460dc4.entry.js} +1 -1
  116. package/dist/checkout/p-f875507d.entry.js +1 -0
  117. package/dist/checkout/p-faf06441.js +4 -0
  118. package/dist/checkout/p-fb147065.entry.js +1 -0
  119. package/dist/checkout/{p-af32124b.entry.js → p-fb45cdd1.entry.js} +1 -1
  120. package/dist/cjs/_commonjsHelpers-537d719a.js +20 -0
  121. package/dist/cjs/amwal-checkout-button_5.cjs.entry.js +1298 -2881
  122. package/dist/cjs/amwal-installments-guide.cjs.entry.js +42 -43
  123. package/dist/cjs/amwal-pos.cjs.entry.js +3180 -3452
  124. package/dist/cjs/amwal-widget-modal.cjs.entry.js +162 -175
  125. package/dist/cjs/amwal-widget.cjs.entry.js +314 -343
  126. package/dist/cjs/{animation-BhN-MT4J.js → animation-26241cb2.js} +2 -2
  127. package/dist/cjs/{app-globals-NtXImkuk.js → app-globals-42a13029.js} +1 -1
  128. package/dist/cjs/{ar-CbT6TM-Q.js → ar-3a6829a4.js} +10 -4
  129. package/dist/cjs/{capacitor-CqhugS19.js → capacitor-a9365f60.js} +1 -1
  130. package/dist/cjs/checkout.cjs.js +19 -16
  131. package/dist/cjs/{data-UgkxeXMB.js → data-19081291.js} +1 -1
  132. package/dist/cjs/{form-controller-DRf0gBOg.js → form-controller-3ffb27b1.js} +1 -1
  133. package/dist/cjs/{framework-delegate-D-6PUvOi.js → framework-delegate-ab2cc190.js} +1 -1
  134. package/dist/cjs/{gesture-controller-IMq9Cgi2.js → gesture-controller-b1c0efac.js} +1 -1
  135. package/dist/cjs/{haptic-CC9tl6g8.js → haptic-80174512.js} +1 -1
  136. package/dist/cjs/{hardware-back-button-C2D2eOk8.js → hardware-back-button-ddfefd22.js} +3 -3
  137. package/dist/cjs/{helpers-B4vhh9gt.js → helpers-72ba682d.js} +4 -1
  138. package/dist/cjs/i18n-18ad02d5.js +13 -0
  139. package/dist/cjs/{index-CKcQE8Zg.js → index-0d0b84fb.js} +4 -3
  140. package/dist/cjs/{index-6eOg4xTk.js → index-2602a653.js} +0 -1
  141. package/dist/cjs/{index-DZA7ogU0.js → index-2cd1a895.js} +4 -4
  142. package/dist/cjs/index-7522b3a9.js +2256 -0
  143. package/dist/cjs/{index-bc_r9XRf.js → index-9b7d2c31.js} +9 -9
  144. package/dist/cjs/{index-q1ImtF5k.js → index-ce06e6a3.js} +3 -3
  145. package/dist/cjs/{index-XMjUjboS.js → index-da554121.js} +3 -3
  146. package/dist/cjs/{input-shims-CCRbO2DB.js → input-shims-1a8ed779.js} +6 -6
  147. package/dist/cjs/{input.utils-CyVgmmWQ.js → input.utils-67143876.js} +3 -3
  148. package/dist/cjs/ion-accordion-group.cjs.entry.js +199 -203
  149. package/dist/cjs/ion-accordion.cjs.entry.js +305 -305
  150. package/dist/cjs/ion-action-sheet_3.cjs.entry.js +695 -705
  151. package/dist/cjs/ion-app.cjs.entry.js +95 -93
  152. package/dist/cjs/ion-avatar.cjs.entry.js +14 -12
  153. package/dist/cjs/ion-back-button.cjs.entry.js +78 -76
  154. package/dist/cjs/ion-backdrop.cjs.entry.js +44 -42
  155. package/dist/cjs/ion-badge.cjs.entry.js +19 -17
  156. package/dist/cjs/ion-breadcrumb.cjs.entry.js +86 -84
  157. package/dist/cjs/ion-breadcrumbs.cjs.entry.js +120 -124
  158. package/dist/cjs/ion-buttons_3.cjs.entry.js +822 -822
  159. package/dist/cjs/ion-card-content.cjs.entry.js +19 -17
  160. package/dist/cjs/ion-card-header.cjs.entry.js +22 -20
  161. package/dist/cjs/ion-card-subtitle.cjs.entry.js +20 -18
  162. package/dist/cjs/ion-card-title.cjs.entry.js +20 -18
  163. package/dist/cjs/ion-card.cjs.entry.js +55 -53
  164. package/dist/cjs/ion-checkbox_7.cjs.entry.js +862 -882
  165. package/dist/cjs/ion-chip.cjs.entry.js +24 -22
  166. package/dist/cjs/ion-col.cjs.entry.js +110 -108
  167. package/dist/cjs/ion-content.cjs.entry.js +376 -374
  168. package/dist/cjs/ion-datetime-button.cjs.entry.js +330 -328
  169. package/dist/cjs/ion-datetime.cjs.entry.js +1547 -1567
  170. package/dist/cjs/ion-fab-button.cjs.entry.js +78 -76
  171. package/dist/cjs/ion-fab-list.cjs.entry.js +31 -31
  172. package/dist/cjs/ion-fab.cjs.entry.js +58 -58
  173. package/dist/cjs/ion-footer.cjs.entry.js +94 -92
  174. package/dist/cjs/ion-grid.cjs.entry.js +17 -15
  175. package/dist/cjs/ion-header.cjs.entry.js +143 -141
  176. package/dist/cjs/ion-icon.cjs.entry.js +104 -112
  177. package/dist/cjs/ion-img.cjs.entry.js +83 -83
  178. package/dist/cjs/ion-infinite-scroll-content.cjs.entry.js +34 -32
  179. package/dist/cjs/ion-infinite-scroll.cjs.entry.js +174 -176
  180. package/dist/cjs/ion-input.cjs.entry.js +447 -453
  181. package/dist/cjs/ion-item-divider.cjs.entry.js +23 -21
  182. package/dist/cjs/ion-item-group.cjs.entry.js +20 -18
  183. package/dist/cjs/ion-item-option.cjs.entry.js +45 -43
  184. package/dist/cjs/ion-item-options.cjs.entry.js +40 -38
  185. package/dist/cjs/ion-item-sliding.cjs.entry.js +391 -391
  186. package/dist/cjs/ion-loading.cjs.entry.js +162 -164
  187. package/dist/cjs/ion-menu-button.cjs.entry.js +60 -58
  188. package/dist/cjs/ion-menu-toggle.cjs.entry.js +36 -34
  189. package/dist/cjs/ion-menu.cjs.entry.js +606 -612
  190. package/dist/cjs/ion-modal.cjs.entry.js +551 -553
  191. package/dist/cjs/ion-nav-link.cjs.entry.js +17 -15
  192. package/dist/cjs/ion-nav.cjs.entry.js +823 -825
  193. package/dist/cjs/ion-note.cjs.entry.js +19 -17
  194. package/dist/cjs/ion-picker-column.cjs.entry.js +327 -327
  195. package/dist/cjs/ion-picker.cjs.entry.js +198 -200
  196. package/dist/cjs/ion-popover.cjs.entry.js +326 -330
  197. package/dist/cjs/ion-progress-bar.cjs.entry.js +44 -42
  198. package/dist/cjs/ion-range.cjs.entry.js +644 -654
  199. package/dist/cjs/ion-refresher-content.cjs.entry.js +53 -51
  200. package/dist/cjs/ion-refresher.cjs.entry.js +586 -586
  201. package/dist/cjs/ion-reorder-group.cjs.entry.js +252 -252
  202. package/dist/cjs/ion-reorder.cjs.entry.js +26 -24
  203. package/dist/cjs/ion-route-redirect.cjs.entry.js +19 -21
  204. package/dist/cjs/ion-route.cjs.entry.js +37 -41
  205. package/dist/cjs/ion-router-link.cjs.entry.js +31 -29
  206. package/dist/cjs/ion-router-outlet.cjs.entry.js +178 -178
  207. package/dist/cjs/ion-router.cjs.entry.js +266 -264
  208. package/dist/cjs/ion-row.cjs.entry.js +12 -10
  209. package/dist/cjs/ion-searchbar.cjs.entry.js +388 -396
  210. package/dist/cjs/ion-segment-button.cjs.entry.js +96 -96
  211. package/dist/cjs/ion-segment.cjs.entry.js +414 -420
  212. package/dist/cjs/ion-select-option.cjs.entry.js +16 -14
  213. package/dist/cjs/ion-select.cjs.entry.js +693 -699
  214. package/dist/cjs/ion-skeleton-text.cjs.entry.js +35 -33
  215. package/dist/cjs/ion-spinner.cjs.entry.js +50 -48
  216. package/dist/cjs/ion-split-pane.cjs.entry.js +120 -124
  217. package/dist/cjs/ion-tab-bar.cjs.entry.js +66 -66
  218. package/dist/cjs/ion-tab-button.cjs.entry.js +82 -80
  219. package/dist/cjs/ion-tab.cjs.entry.js +50 -50
  220. package/dist/cjs/ion-tabs.cjs.entry.js +134 -132
  221. package/dist/cjs/ion-textarea.cjs.entry.js +396 -400
  222. package/dist/cjs/ion-thumbnail.cjs.entry.js +12 -10
  223. package/dist/cjs/ion-title.cjs.entry.js +43 -43
  224. package/dist/cjs/ion-toast.cjs.entry.js +371 -375
  225. package/dist/cjs/ion-toggle.cjs.entry.js +230 -230
  226. package/dist/cjs/ion-toolbar.cjs.entry.js +61 -59
  227. package/dist/cjs/{ionic-global-DRLi5Iq3.js → ionic-global-3915f1f1.js} +55 -58
  228. package/dist/cjs/{ios.transition-D4vyO_a_.js → ios.transition-b9c0b967.js} +5 -5
  229. package/dist/cjs/{keyboard-iyHR2ZF4.js → keyboard-5d4b83b3.js} +3 -3
  230. package/dist/cjs/{keyboard-DuKzsHsS.js → keyboard-bc8ebbf7.js} +1 -1
  231. package/dist/cjs/{keyboard-controller-rH21qC_2.js → keyboard-controller-c6633754.js} +2 -2
  232. package/dist/cjs/loader.cjs.js +19 -8
  233. package/dist/cjs/{md.transition-Dkxy3kpE.js → md.transition-830acbb7.js} +5 -5
  234. package/dist/cjs/{menu-toggle-util-CmPuayU0.js → menu-toggle-util-315c26b3.js} +1 -1
  235. package/dist/cjs/{notch-controller-Dtpow1eD.js → notch-controller-dcf09601.js} +2 -2
  236. package/dist/cjs/{overlays-Bc8tk6t5.js → overlays-08819e3f.js} +6 -6
  237. package/dist/cjs/{refresher.utils-CPl6gciv.js → refresher.utils-e41509f7.js} +3 -3
  238. package/dist/cjs/{status-tap-XtIhF72O.js → status-tap-ec021cb4.js} +4 -4
  239. package/dist/cjs/{swipe-back-C9j0kufI.js → swipe-back-3d3a5129.js} +4 -4
  240. package/dist/collection/collection-manifest.json +8 -8
  241. package/dist/collection/components/amwal-checkout-button/amwal-checkout-button.js +1714 -1888
  242. package/dist/collection/components/amwal-checkout-button/amwal-checkout-button.stories.js +84 -84
  243. package/dist/collection/components/amwal-installments-guide/amwal-installments-guide.js +75 -80
  244. package/dist/collection/components/amwal-installments-guide/amwal-installments-guide.stories.js +25 -25
  245. package/dist/collection/components/amwal-installments-timeline/amwal-installments-timeline.js +506 -569
  246. package/dist/collection/components/amwal-installments-timeline/amwal-installments-timeline.stories.js +80 -80
  247. package/dist/collection/components/amwal-pos/amwal-pos.js +1022 -1094
  248. package/dist/collection/components/amwal-pos/amwal-pos.stories.js +209 -209
  249. package/dist/collection/components/amwal-widget/amwal-widget-modal.js +326 -350
  250. package/dist/collection/components/amwal-widget/amwal-widget.js +673 -736
  251. package/dist/collection/components/amwal-widget/amwal-widget.stories.js +184 -184
  252. package/dist/collection/lang/i18n.js +7 -7
  253. package/dist/components/amwal-checkout-button.d.ts +2 -2
  254. package/dist/components/amwal-checkout-button.js +3811 -1
  255. package/dist/components/amwal-installments-guide.d.ts +2 -2
  256. package/dist/components/amwal-installments-guide.js +75 -1
  257. package/dist/components/amwal-installments-timeline.d.ts +2 -2
  258. package/dist/components/amwal-installments-timeline.js +6 -1
  259. package/dist/components/amwal-pos.d.ts +2 -2
  260. package/dist/components/amwal-pos.js +3391 -1
  261. package/dist/components/amwal-widget-modal.d.ts +2 -2
  262. package/dist/components/amwal-widget-modal.js +6 -1
  263. package/dist/components/amwal-widget.d.ts +2 -2
  264. package/dist/components/amwal-widget.js +389 -1
  265. package/dist/components/index.d.ts +0 -6
  266. package/dist/components/index.js +6 -1
  267. package/dist/components/ion-accordion-group.js +248 -1
  268. package/dist/components/ion-accordion.js +353 -1
  269. package/dist/components/ion-action-sheet.js +6 -1
  270. package/dist/components/ion-alert.js +6 -1
  271. package/dist/components/ion-app.js +125 -1
  272. package/dist/components/ion-avatar.js +39 -1
  273. package/dist/components/ion-back-button.js +127 -1
  274. package/dist/components/ion-backdrop.js +6 -1
  275. package/dist/components/ion-badge.js +46 -1
  276. package/dist/components/ion-breadcrumb.js +131 -1
  277. package/dist/components/ion-breadcrumbs.js +152 -1
  278. package/dist/components/ion-button.js +6 -1
  279. package/dist/components/ion-buttons.js +6 -1
  280. package/dist/components/ion-card-content.js +43 -1
  281. package/dist/components/ion-card-header.js +50 -1
  282. package/dist/components/ion-card-subtitle.js +47 -1
  283. package/dist/components/ion-card-title.js +47 -1
  284. package/dist/components/ion-card.js +98 -1
  285. package/dist/components/ion-checkbox.js +6 -1
  286. package/dist/components/ion-chip.js +59 -1
  287. package/dist/components/ion-col.js +186 -2
  288. package/dist/components/ion-content.js +440 -1
  289. package/dist/components/ion-datetime-button.js +378 -1
  290. package/dist/components/ion-datetime.js +1961 -2
  291. package/dist/components/ion-fab-button.js +130 -1
  292. package/dist/components/ion-fab-list.js +56 -1
  293. package/dist/components/ion-fab.js +90 -1
  294. package/dist/components/ion-footer.js +152 -2
  295. package/dist/components/ion-grid.js +41 -1
  296. package/dist/components/ion-header.js +356 -2
  297. package/dist/components/ion-icon.js +6 -1
  298. package/dist/components/ion-img.js +124 -1
  299. package/dist/components/ion-infinite-scroll-content.js +69 -1
  300. package/dist/components/ion-infinite-scroll.js +209 -1
  301. package/dist/components/ion-input.js +564 -1
  302. package/dist/components/ion-item-divider.js +51 -1
  303. package/dist/components/ion-item-group.js +44 -1
  304. package/dist/components/ion-item-option.js +85 -1
  305. package/dist/components/ion-item-options.js +67 -1
  306. package/dist/components/ion-item-sliding.js +449 -1
  307. package/dist/components/ion-item.js +6 -1
  308. package/dist/components/ion-label.js +6 -1
  309. package/dist/components/ion-list-header.js +6 -1
  310. package/dist/components/ion-list.js +6 -1
  311. package/dist/components/ion-loading.js +325 -3
  312. package/dist/components/ion-menu-button.js +100 -1
  313. package/dist/components/ion-menu-toggle.js +57 -1
  314. package/dist/components/ion-menu.js +679 -1
  315. package/dist/components/ion-modal.js +1775 -3
  316. package/dist/components/ion-nav-link.js +63 -2
  317. package/dist/components/ion-nav.js +945 -2
  318. package/dist/components/ion-note.js +6 -1
  319. package/dist/components/ion-picker-column-internal.js +6 -1
  320. package/dist/components/ion-picker-column.js +6 -1
  321. package/dist/components/ion-picker-internal.js +6 -1
  322. package/dist/components/ion-picker.js +317 -3
  323. package/dist/components/ion-popover.js +6 -1
  324. package/dist/components/ion-progress-bar.js +79 -1
  325. package/dist/components/ion-radio-group.js +6 -1
  326. package/dist/components/ion-radio.js +6 -1
  327. package/dist/components/ion-range.js +778 -2
  328. package/dist/components/ion-refresher-content.js +90 -1
  329. package/dist/components/ion-refresher.js +652 -1
  330. package/dist/components/ion-reorder-group.js +300 -1
  331. package/dist/components/ion-reorder.js +58 -1
  332. package/dist/components/ion-ripple-effect.js +6 -1
  333. package/dist/components/ion-route-redirect.js +42 -1
  334. package/dist/components/ion-route.js +66 -1
  335. package/dist/components/ion-router-link.js +60 -1
  336. package/dist/components/ion-router-outlet.js +219 -1
  337. package/dist/components/ion-router.js +833 -3
  338. package/dist/components/ion-row.js +34 -1
  339. package/dist/components/ion-searchbar.js +472 -1
  340. package/dist/components/ion-segment-button.js +139 -1
  341. package/dist/components/ion-segment.js +472 -1
  342. package/dist/components/ion-select-option.js +42 -1
  343. package/dist/components/ion-select-popover.js +6 -1
  344. package/dist/components/ion-select.js +864 -1
  345. package/dist/components/ion-skeleton-text.js +59 -1
  346. package/dist/components/ion-spinner.js +6 -1
  347. package/dist/components/ion-split-pane.js +166 -1
  348. package/dist/components/ion-tab-bar.js +95 -1
  349. package/dist/components/ion-tab-button.js +125 -1
  350. package/dist/components/ion-tab.js +80 -1
  351. package/dist/components/ion-tabs.js +176 -1
  352. package/dist/components/ion-text.js +6 -1
  353. package/dist/components/ion-textarea.js +496 -1
  354. package/dist/components/ion-thumbnail.js +34 -1
  355. package/dist/components/ion-title.js +71 -1
  356. package/dist/components/ion-toast.js +914 -3
  357. package/dist/components/ion-toggle.js +282 -1
  358. package/dist/components/ion-toolbar.js +91 -1
  359. package/dist/components/p-01b49f83.js +269 -0
  360. package/dist/{esm/ios.transition-DMsViooj.js → components/p-02b77441.js} +2 -5
  361. package/dist/components/p-02bc6b21.js +203 -0
  362. package/dist/components/p-031ed92d.js +389 -0
  363. package/dist/components/p-03803c7d.js +369 -0
  364. package/dist/components/p-089e034e.js +234 -0
  365. package/dist/components/p-0dc7a5ff.js +512 -0
  366. package/dist/components/p-110f8490.js +566 -0
  367. package/dist/components/p-112455b1.js +17 -0
  368. package/dist/{esm/index-BMJhFU53.js → components/p-1596e301.js} +4 -4
  369. package/dist/components/p-1785e30a.js +318 -0
  370. package/dist/{esm/helpers-C6kqtbmV.js → components/p-2bb89b46.js} +5 -2
  371. package/dist/components/p-2d7d745d.js +224 -0
  372. package/dist/components/p-2fc99fef.js +262 -0
  373. package/dist/{esm/input-shims-DSFPFhb7.js → components/p-3296ebd9.js} +4 -6
  374. package/dist/{esm/data-Cl-_yBA0.js → components/p-39ad94cf.js} +2 -2
  375. package/dist/{esm/capacitor-CG3xQUND.js → components/p-3d3eefc3.js} +1 -1
  376. package/dist/{esm/form-controller-xetTxjL6.js → components/p-3e1d2896.js} +1 -1
  377. package/dist/{esm/keyboard-controller-CqGCg8tB.js → components/p-3e1e3453.js} +2 -2
  378. package/dist/{esm/md.transition-BQT2r4ED.js → components/p-503328f2.js} +2 -5
  379. package/dist/components/p-51c44f42.js +98 -0
  380. package/dist/components/p-5280b372.js +42 -0
  381. package/dist/{esm/index-DuUXGZp2.js → components/p-53e2dbe4.js} +3 -3
  382. package/dist/components/p-5441c730.js +851 -0
  383. package/dist/{esm/refresher.utils-D4tPnZsM.js → components/p-74e68924.js} +4 -4
  384. package/dist/{esm/framework-delegate-D_uGiYYw.js → components/p-76525f0f.js} +1 -1
  385. package/dist/{esm/index-CcopIPA0.js → components/p-77104220.js} +6 -4
  386. package/dist/components/p-77ccb793.js +185 -0
  387. package/dist/components/p-83e529db.js +380 -0
  388. package/dist/{esm/animation-DRf3dwMu.js → components/p-89c4c5cb.js} +2 -2
  389. package/dist/components/p-8b3d1e06.js +67 -0
  390. package/dist/components/p-901c16c5.js +210 -0
  391. package/dist/components/p-93e2a608.js +374 -0
  392. package/dist/components/p-95c79593.js +43 -0
  393. package/dist/components/p-96073863.js +82 -0
  394. package/dist/components/p-99e447f9.js +13 -0
  395. package/dist/{esm/keyboard-DgiyREKb.js → components/p-9b519de5.js} +1 -1
  396. package/dist/{esm/input.utils-BuIvhxo3.js → components/p-9d350d61.js} +3 -3
  397. package/dist/{esm/notch-controller-CQeDnZLe.js → components/p-9df67c24.js} +2 -2
  398. package/dist/components/p-a0e691dd.js +39 -0
  399. package/dist/components/p-ab10d1ae.js +47 -0
  400. package/dist/components/p-abc01c5d.js +194 -0
  401. package/dist/components/p-abd248d1.js +196 -0
  402. package/dist/{esm/haptic-D5jGzBs8.js → components/p-af073aaf.js} +2 -2
  403. package/dist/{esm/swipe-back-DE05lWQD.js → components/p-b32529b9.js} +3 -4
  404. package/dist/{esm/index-C75BfBAE.js → components/p-b8fdd517.js} +1 -2
  405. package/dist/components/p-cebc113f.js +38 -0
  406. package/dist/components/p-d25fd077.js +331 -0
  407. package/dist/{esm/menu-toggle-util-wdO31cdC.js → components/p-d3596f64.js} +1 -1
  408. package/dist/{esm/keyboard-DcbqYXj5.js → components/p-d60b2328.js} +1 -3
  409. package/dist/components/p-d69dc32f.js +97 -0
  410. package/dist/{esm/hardware-back-button-CzxcJiYO.js → components/p-d72e8d7b.js} +2 -3
  411. package/dist/{esm/ar-B3WORC1a.js → components/p-d839c693.js} +12 -5
  412. package/dist/{esm/index-D8d_89Nl.js → components/p-e187a77c.js} +1 -1
  413. package/dist/components/p-e65ea9fb.js +1379 -0
  414. package/dist/components/p-ec0e3f3f.js +2040 -0
  415. package/dist/components/p-ecb4db1c.js +64 -0
  416. package/dist/{esm/gesture-controller-CukVBo5-.js → components/p-f728a68f.js} +1 -1
  417. package/dist/components/p-f7e3c502.js +73 -0
  418. package/dist/components/p-fe463a42.js +272 -0
  419. package/dist/esm/_commonjsHelpers-9943807e.js +17 -0
  420. package/dist/esm/amwal-checkout-button_5.entry.js +1296 -2881
  421. package/dist/esm/amwal-installments-guide.entry.js +40 -43
  422. package/dist/esm/amwal-pos.entry.js +3178 -3452
  423. package/dist/esm/amwal-widget-modal.entry.js +160 -175
  424. package/dist/esm/amwal-widget.entry.js +312 -343
  425. package/dist/esm/animation-a6d5c3b1.js +1063 -0
  426. package/dist/esm/{app-globals-BHnkZZiH.js → app-globals-c817b28b.js} +1 -1
  427. package/dist/esm/ar-7d2629bf.js +51 -0
  428. package/dist/esm/capacitor-ba4337da.js +13 -0
  429. package/dist/esm/checkout.js +18 -16
  430. package/dist/esm/config-8e06237c.js +171 -0
  431. package/dist/esm/cubic-bezier-874f336d.js +90 -0
  432. package/dist/esm/data-8916315d.js +1628 -0
  433. package/dist/esm/dir-1d4aa386.js +18 -0
  434. package/dist/esm/focus-visible-32968d3d.js +75 -0
  435. package/dist/esm/form-controller-b1aa7393.js +64 -0
  436. package/dist/esm/framework-delegate-de1aa369.js +140 -0
  437. package/dist/esm/gesture-controller-58ffa500.js +195 -0
  438. package/dist/esm/haptic-4d4d8eb1.js +206 -0
  439. package/dist/esm/hardware-back-button-f93acff0.js +116 -0
  440. package/dist/esm/helpers-f0dcbd72.js +418 -0
  441. package/dist/esm/i18n-53f85411.js +13 -0
  442. package/dist/esm/{index-CNcx43L8.js → index-0b560278.js} +4 -4
  443. package/dist/esm/index-5894dd63.js +196 -0
  444. package/dist/esm/{index-DUF6JAQL.js → index-5a126e54.js} +6 -6
  445. package/dist/esm/index-5e663431.js +128 -0
  446. package/dist/esm/index-8cc94b11.js +2219 -0
  447. package/dist/esm/index-afdf867c.js +26 -0
  448. package/dist/esm/index-d9b41a43.js +34 -0
  449. package/dist/esm/index-f6dce931.js +466 -0
  450. package/dist/esm/index-fb97e55c.js +7 -0
  451. package/dist/esm/input-shims-75d4750d.js +617 -0
  452. package/dist/esm/input.utils-79bde07f.js +138 -0
  453. package/dist/esm/ion-accordion-group.entry.js +197 -203
  454. package/dist/esm/ion-accordion.entry.js +303 -305
  455. package/dist/esm/ion-action-sheet_3.entry.js +693 -705
  456. package/dist/esm/ion-app.entry.js +93 -93
  457. package/dist/esm/ion-avatar.entry.js +12 -12
  458. package/dist/esm/ion-back-button.entry.js +76 -76
  459. package/dist/esm/ion-backdrop.entry.js +42 -42
  460. package/dist/esm/ion-badge.entry.js +17 -17
  461. package/dist/esm/ion-breadcrumb.entry.js +84 -84
  462. package/dist/esm/ion-breadcrumbs.entry.js +118 -124
  463. package/dist/esm/ion-buttons_3.entry.js +820 -822
  464. package/dist/esm/ion-card-content.entry.js +17 -17
  465. package/dist/esm/ion-card-header.entry.js +20 -20
  466. package/dist/esm/ion-card-subtitle.entry.js +18 -18
  467. package/dist/esm/ion-card-title.entry.js +18 -18
  468. package/dist/esm/ion-card.entry.js +53 -53
  469. package/dist/esm/ion-checkbox_7.entry.js +860 -882
  470. package/dist/esm/ion-chip.entry.js +22 -22
  471. package/dist/esm/ion-col.entry.js +108 -108
  472. package/dist/esm/ion-content.entry.js +374 -374
  473. package/dist/esm/ion-datetime-button.entry.js +328 -328
  474. package/dist/esm/ion-datetime.entry.js +1545 -1567
  475. package/dist/esm/ion-fab-button.entry.js +76 -76
  476. package/dist/esm/ion-fab-list.entry.js +29 -31
  477. package/dist/esm/ion-fab.entry.js +56 -58
  478. package/dist/esm/ion-footer.entry.js +92 -92
  479. package/dist/esm/ion-grid.entry.js +15 -15
  480. package/dist/esm/ion-header.entry.js +141 -141
  481. package/dist/esm/ion-icon.entry.js +102 -112
  482. package/dist/esm/ion-img.entry.js +81 -83
  483. package/dist/esm/ion-infinite-scroll-content.entry.js +32 -32
  484. package/dist/esm/ion-infinite-scroll.entry.js +172 -176
  485. package/dist/esm/ion-input.entry.js +445 -453
  486. package/dist/esm/ion-item-divider.entry.js +21 -21
  487. package/dist/esm/ion-item-group.entry.js +18 -18
  488. package/dist/esm/ion-item-option.entry.js +43 -43
  489. package/dist/esm/ion-item-options.entry.js +38 -38
  490. package/dist/esm/ion-item-sliding.entry.js +389 -391
  491. package/dist/esm/ion-loading.entry.js +160 -164
  492. package/dist/esm/ion-menu-button.entry.js +58 -58
  493. package/dist/esm/ion-menu-toggle.entry.js +34 -34
  494. package/dist/esm/ion-menu.entry.js +604 -612
  495. package/dist/esm/ion-modal.entry.js +549 -553
  496. package/dist/esm/ion-nav-link.entry.js +15 -15
  497. package/dist/esm/ion-nav.entry.js +821 -825
  498. package/dist/esm/ion-note.entry.js +17 -17
  499. package/dist/esm/ion-picker-column.entry.js +325 -327
  500. package/dist/esm/ion-picker.entry.js +196 -200
  501. package/dist/esm/ion-popover.entry.js +324 -330
  502. package/dist/esm/ion-progress-bar.entry.js +42 -42
  503. package/dist/esm/ion-range.entry.js +642 -654
  504. package/dist/esm/ion-refresher-content.entry.js +51 -51
  505. package/dist/esm/ion-refresher.entry.js +584 -586
  506. package/dist/esm/ion-reorder-group.entry.js +250 -252
  507. package/dist/esm/ion-reorder.entry.js +24 -24
  508. package/dist/esm/ion-route-redirect.entry.js +17 -21
  509. package/dist/esm/ion-route.entry.js +35 -41
  510. package/dist/esm/ion-router-link.entry.js +29 -29
  511. package/dist/esm/ion-router-outlet.entry.js +176 -178
  512. package/dist/esm/ion-router.entry.js +264 -264
  513. package/dist/esm/ion-row.entry.js +10 -10
  514. package/dist/esm/ion-searchbar.entry.js +386 -396
  515. package/dist/esm/ion-segment-button.entry.js +94 -96
  516. package/dist/esm/ion-segment.entry.js +412 -420
  517. package/dist/esm/ion-select-option.entry.js +14 -14
  518. package/dist/esm/ion-select.entry.js +691 -699
  519. package/dist/esm/ion-skeleton-text.entry.js +33 -33
  520. package/dist/esm/ion-spinner.entry.js +48 -48
  521. package/dist/esm/ion-split-pane.entry.js +118 -124
  522. package/dist/esm/ion-tab-bar.entry.js +64 -66
  523. package/dist/esm/ion-tab-button.entry.js +80 -80
  524. package/dist/esm/ion-tab.entry.js +48 -50
  525. package/dist/esm/ion-tabs.entry.js +132 -132
  526. package/dist/esm/ion-textarea.entry.js +394 -400
  527. package/dist/esm/ion-thumbnail.entry.js +10 -10
  528. package/dist/esm/ion-title.entry.js +41 -43
  529. package/dist/esm/ion-toast.entry.js +369 -375
  530. package/dist/esm/ion-toggle.entry.js +228 -230
  531. package/dist/esm/ion-toolbar.entry.js +59 -59
  532. package/dist/esm/{ionic-global-DXXzPLPc.js → ionic-global-0b7766cb.js} +55 -58
  533. package/dist/esm/ios.transition-22fb53bc.js +651 -0
  534. package/dist/esm/keyboard-1f073554.js +82 -0
  535. package/dist/esm/keyboard-96b6e80b.js +146 -0
  536. package/dist/esm/keyboard-controller-5a2f625f.js +165 -0
  537. package/dist/esm/loader.js +17 -8
  538. package/dist/esm/lock-controller-632e3c10.js +38 -0
  539. package/dist/esm/md.transition-f6ff9834.js +57 -0
  540. package/dist/esm/menu-toggle-util-594849ff.js +12 -0
  541. package/dist/esm/notch-controller-d511b3b3.js +153 -0
  542. package/dist/esm/{overlays-SBLrmFy6.js → overlays-642a91df.js} +7 -7
  543. package/dist/esm/polyfills/core-js.js +11 -0
  544. package/dist/esm/polyfills/css-shim.js +1 -0
  545. package/dist/esm/polyfills/dom.js +79 -0
  546. package/dist/esm/polyfills/es5-html-element.js +1 -0
  547. package/dist/esm/polyfills/index.js +34 -0
  548. package/dist/esm/polyfills/system.js +6 -0
  549. package/dist/esm/refresher.utils-19137568.js +196 -0
  550. package/dist/esm/{status-tap-CjxQA4Bj.js → status-tap-bb6959a8.js} +4 -4
  551. package/dist/esm/swipe-back-6cec4c33.js +79 -0
  552. package/dist/esm/theme-35c700b7.js +43 -0
  553. package/dist/esm/watch-options-7bf43687.js +47 -0
  554. package/dist/node_modules/@ionic/core/dist/collection/components/accordion/accordion.ios.css +193 -0
  555. package/dist/node_modules/@ionic/core/dist/collection/components/accordion/accordion.md.css +135 -0
  556. package/dist/node_modules/@ionic/core/dist/collection/components/accordion-group/accordion-group.ios.css +127 -0
  557. package/dist/node_modules/@ionic/core/dist/collection/components/accordion-group/accordion-group.md.css +229 -0
  558. package/dist/node_modules/@ionic/core/dist/collection/components/action-sheet/action-sheet.ios.css +456 -0
  559. package/dist/node_modules/@ionic/core/dist/collection/components/action-sheet/action-sheet.md.css +384 -0
  560. package/dist/node_modules/@ionic/core/dist/collection/components/alert/alert.ios.css +755 -0
  561. package/dist/node_modules/@ionic/core/dist/collection/components/alert/alert.md.css +770 -0
  562. package/dist/node_modules/@ionic/core/dist/collection/components/app/app.css +17 -0
  563. package/dist/node_modules/@ionic/core/dist/collection/components/avatar/avatar.ios.css +132 -0
  564. package/dist/node_modules/@ionic/core/dist/collection/components/avatar/avatar.md.css +132 -0
  565. package/dist/node_modules/@ionic/core/dist/collection/components/back-button/back-button.ios.css +372 -0
  566. package/dist/node_modules/@ionic/core/dist/collection/components/back-button/back-button.md.css +385 -0
  567. package/dist/node_modules/@ionic/core/dist/collection/components/backdrop/backdrop.ios.css +136 -0
  568. package/dist/node_modules/@ionic/core/dist/collection/components/backdrop/backdrop.md.css +136 -0
  569. package/dist/node_modules/@ionic/core/dist/collection/components/badge/badge.ios.css +168 -0
  570. package/dist/node_modules/@ionic/core/dist/collection/components/badge/badge.md.css +164 -0
  571. package/dist/node_modules/@ionic/core/dist/collection/components/breadcrumb/breadcrumb.ios.css +326 -0
  572. package/dist/node_modules/@ionic/core/dist/collection/components/breadcrumb/breadcrumb.md.css +310 -0
  573. package/dist/node_modules/@ionic/core/dist/collection/components/breadcrumbs/breadcrumbs.ios.css +81 -0
  574. package/dist/node_modules/@ionic/core/dist/collection/components/breadcrumbs/breadcrumbs.md.css +80 -0
  575. package/dist/node_modules/@ionic/core/dist/collection/components/button/button.ios.css +596 -0
  576. package/dist/node_modules/@ionic/core/dist/collection/components/button/button.md.css +517 -0
  577. package/dist/node_modules/@ionic/core/dist/collection/components/buttons/buttons.ios.css +279 -0
  578. package/dist/node_modules/@ionic/core/dist/collection/components/buttons/buttons.md.css +299 -0
  579. package/dist/node_modules/@ionic/core/dist/collection/components/card/card.ios.css +203 -0
  580. package/dist/node_modules/@ionic/core/dist/collection/components/card/card.md.css +198 -0
  581. package/dist/node_modules/@ionic/core/dist/collection/components/card-content/card-content.ios.css +163 -0
  582. package/dist/node_modules/@ionic/core/dist/collection/components/card-content/card-content.md.css +165 -0
  583. package/dist/node_modules/@ionic/core/dist/collection/components/card-header/card-header.ios.css +141 -0
  584. package/dist/node_modules/@ionic/core/dist/collection/components/card-header/card-header.md.css +138 -0
  585. package/dist/node_modules/@ionic/core/dist/collection/components/card-subtitle/card-subtitle.ios.css +138 -0
  586. package/dist/node_modules/@ionic/core/dist/collection/components/card-subtitle/card-subtitle.md.css +136 -0
  587. package/dist/node_modules/@ionic/core/dist/collection/components/card-title/card-title.ios.css +137 -0
  588. package/dist/node_modules/@ionic/core/dist/collection/components/card-title/card-title.md.css +137 -0
  589. package/dist/node_modules/@ionic/core/dist/collection/components/checkbox/checkbox.ios.css +536 -0
  590. package/dist/node_modules/@ionic/core/dist/collection/components/checkbox/checkbox.md.css +552 -0
  591. package/dist/node_modules/@ionic/core/dist/collection/components/chip/chip.ios.css +212 -0
  592. package/dist/node_modules/@ionic/core/dist/collection/components/chip/chip.md.css +207 -0
  593. package/dist/node_modules/@ionic/core/dist/collection/components/col/col.css +200 -0
  594. package/dist/node_modules/@ionic/core/dist/collection/components/content/content.css +282 -0
  595. package/dist/node_modules/@ionic/core/dist/collection/components/datetime/datetime.ios.css +850 -0
  596. package/dist/node_modules/@ionic/core/dist/collection/components/datetime/datetime.md.css +706 -0
  597. package/dist/node_modules/@ionic/core/dist/collection/components/datetime-button/datetime-button.css +100 -0
  598. package/dist/node_modules/@ionic/core/dist/collection/components/fab/fab.css +366 -0
  599. package/dist/node_modules/@ionic/core/dist/collection/components/fab-button/fab-button.ios.css +422 -0
  600. package/dist/node_modules/@ionic/core/dist/collection/components/fab-button/fab-button.md.css +393 -0
  601. package/dist/node_modules/@ionic/core/dist/collection/components/fab-list/fab-list.css +240 -0
  602. package/dist/node_modules/@ionic/core/dist/collection/components/footer/footer.ios.css +146 -0
  603. package/dist/node_modules/@ionic/core/dist/collection/components/footer/footer.md.css +129 -0
  604. package/dist/node_modules/@ionic/core/dist/collection/components/grid/grid.css +235 -0
  605. package/dist/node_modules/@ionic/core/dist/collection/components/header/header.ios.css +250 -0
  606. package/dist/node_modules/@ionic/core/dist/collection/components/header/header.md.css +133 -0
  607. package/dist/node_modules/@ionic/core/dist/collection/components/img/img.css +12 -0
  608. package/dist/node_modules/@ionic/core/dist/collection/components/infinite-scroll/infinite-scroll.css +8 -0
  609. package/dist/node_modules/@ionic/core/dist/collection/components/infinite-scroll-content/infinite-scroll-content.ios.css +156 -0
  610. package/dist/node_modules/@ionic/core/dist/collection/components/infinite-scroll-content/infinite-scroll-content.md.css +156 -0
  611. package/dist/node_modules/@ionic/core/dist/collection/components/input/input.ios.css +833 -0
  612. package/dist/node_modules/@ionic/core/dist/collection/components/input/input.md.css +1446 -0
  613. package/dist/node_modules/@ionic/core/dist/collection/components/item/item.ios.css +815 -0
  614. package/dist/node_modules/@ionic/core/dist/collection/components/item/item.md.css +1187 -0
  615. package/dist/node_modules/@ionic/core/dist/collection/components/item-divider/item-divider.ios.css +351 -0
  616. package/dist/node_modules/@ionic/core/dist/collection/components/item-divider/item-divider.md.css +417 -0
  617. package/dist/node_modules/@ionic/core/dist/collection/components/item-group/item-group.ios.css +114 -0
  618. package/dist/node_modules/@ionic/core/dist/collection/components/item-group/item-group.md.css +114 -0
  619. package/dist/node_modules/@ionic/core/dist/collection/components/item-option/item-option.ios.css +242 -0
  620. package/dist/node_modules/@ionic/core/dist/collection/components/item-option/item-option.md.css +236 -0
  621. package/dist/node_modules/@ionic/core/dist/collection/components/item-options/item-options.ios.css +287 -0
  622. package/dist/node_modules/@ionic/core/dist/collection/components/item-options/item-options.md.css +284 -0
  623. package/dist/node_modules/@ionic/core/dist/collection/components/item-sliding/item-sliding.css +121 -0
  624. package/dist/node_modules/@ionic/core/dist/collection/components/label/label.ios.css +334 -0
  625. package/dist/node_modules/@ionic/core/dist/collection/components/label/label.md.css +421 -0
  626. package/dist/node_modules/@ionic/core/dist/collection/components/list/list.ios.css +242 -0
  627. package/dist/node_modules/@ionic/core/dist/collection/components/list/list.md.css +287 -0
  628. package/dist/node_modules/@ionic/core/dist/collection/components/list-header/list-header.ios.css +285 -0
  629. package/dist/node_modules/@ionic/core/dist/collection/components/list-header/list-header.md.css +266 -0
  630. package/dist/node_modules/@ionic/core/dist/collection/components/loading/loading.ios.css +205 -0
  631. package/dist/node_modules/@ionic/core/dist/collection/components/loading/loading.md.css +196 -0
  632. package/dist/node_modules/@ionic/core/dist/collection/components/menu/menu.ios.css +378 -0
  633. package/dist/node_modules/@ionic/core/dist/collection/components/menu/menu.md.css +374 -0
  634. package/dist/node_modules/@ionic/core/dist/collection/components/menu-button/menu-button.ios.css +279 -0
  635. package/dist/node_modules/@ionic/core/dist/collection/components/menu-button/menu-button.md.css +282 -0
  636. package/dist/node_modules/@ionic/core/dist/collection/components/menu-toggle/menu-toggle.css +3 -0
  637. package/dist/node_modules/@ionic/core/dist/collection/components/modal/modal.ios.css +357 -0
  638. package/dist/node_modules/@ionic/core/dist/collection/components/modal/modal.md.css +272 -0
  639. package/dist/node_modules/@ionic/core/dist/collection/components/nav/nav.css +64 -0
  640. package/dist/node_modules/@ionic/core/dist/collection/components/note/note.ios.css +127 -0
  641. package/dist/node_modules/@ionic/core/dist/collection/components/note/note.md.css +127 -0
  642. package/dist/node_modules/@ionic/core/dist/collection/components/picker/picker.ios.css +367 -0
  643. package/dist/node_modules/@ionic/core/dist/collection/components/picker/picker.md.css +354 -0
  644. package/dist/node_modules/@ionic/core/dist/collection/components/picker-column/picker-column.ios.css +255 -0
  645. package/dist/node_modules/@ionic/core/dist/collection/components/picker-column/picker-column.md.css +246 -0
  646. package/dist/node_modules/@ionic/core/dist/collection/components/picker-column-internal/picker-column-internal.ios.css +138 -0
  647. package/dist/node_modules/@ionic/core/dist/collection/components/picker-column-internal/picker-column-internal.md.css +196 -0
  648. package/dist/node_modules/@ionic/core/dist/collection/components/picker-internal/picker-internal.ios.css +262 -0
  649. package/dist/node_modules/@ionic/core/dist/collection/components/picker-internal/picker-internal.md.css +258 -0
  650. package/dist/node_modules/@ionic/core/dist/collection/components/popover/popover.ios.css +366 -0
  651. package/dist/node_modules/@ionic/core/dist/collection/components/popover/popover.md.css +266 -0
  652. package/dist/node_modules/@ionic/core/dist/collection/components/progress-bar/progress-bar.ios.css +261 -0
  653. package/dist/node_modules/@ionic/core/dist/collection/components/progress-bar/progress-bar.md.css +261 -0
  654. package/dist/node_modules/@ionic/core/dist/collection/components/radio/radio.ios.css +557 -0
  655. package/dist/node_modules/@ionic/core/dist/collection/components/radio/radio.md.css +580 -0
  656. package/dist/node_modules/@ionic/core/dist/collection/components/range/range.ios.css +660 -0
  657. package/dist/node_modules/@ionic/core/dist/collection/components/range/range.md.css +819 -0
  658. package/dist/node_modules/@ionic/core/dist/collection/components/refresher/refresher.ios.css +321 -0
  659. package/dist/node_modules/@ionic/core/dist/collection/components/refresher/refresher.md.css +316 -0
  660. package/dist/node_modules/@ionic/core/dist/collection/components/reorder/reorder.ios.css +77 -0
  661. package/dist/node_modules/@ionic/core/dist/collection/components/reorder/reorder.md.css +77 -0
  662. package/dist/node_modules/@ionic/core/dist/collection/components/reorder-group/reorder-group.css +89 -0
  663. package/dist/node_modules/@ionic/core/dist/collection/components/ripple-effect/ripple-effect.css +113 -0
  664. package/dist/node_modules/@ionic/core/dist/collection/components/router-link/router-link.css +84 -0
  665. package/dist/node_modules/@ionic/core/dist/collection/components/router-outlet/router-outlet.css +64 -0
  666. package/dist/node_modules/@ionic/core/dist/collection/components/row/row.css +136 -0
  667. package/dist/node_modules/@ionic/core/dist/collection/components/searchbar/searchbar.ios.css +477 -0
  668. package/dist/node_modules/@ionic/core/dist/collection/components/searchbar/searchbar.md.css +456 -0
  669. package/dist/node_modules/@ionic/core/dist/collection/components/segment/segment.ios.css +224 -0
  670. package/dist/node_modules/@ionic/core/dist/collection/components/segment/segment.md.css +214 -0
  671. package/dist/node_modules/@ionic/core/dist/collection/components/segment-button/segment-button.ios.css +520 -0
  672. package/dist/node_modules/@ionic/core/dist/collection/components/segment-button/segment-button.md.css +506 -0
  673. package/dist/node_modules/@ionic/core/dist/collection/components/select/select.ios.css +787 -0
  674. package/dist/node_modules/@ionic/core/dist/collection/components/select/select.md.css +1374 -0
  675. package/dist/node_modules/@ionic/core/dist/collection/components/select-option/select-option.css +3 -0
  676. package/dist/node_modules/@ionic/core/dist/collection/components/select-popover/select-popover.ios.css +190 -0
  677. package/dist/node_modules/@ionic/core/dist/collection/components/select-popover/select-popover.md.css +212 -0
  678. package/dist/node_modules/@ionic/core/dist/collection/components/skeleton-text/skeleton-text.css +108 -0
  679. package/dist/node_modules/@ionic/core/dist/collection/components/spinner/spinner.css +232 -0
  680. package/dist/node_modules/@ionic/core/dist/collection/components/split-pane/split-pane.ios.css +265 -0
  681. package/dist/node_modules/@ionic/core/dist/collection/components/split-pane/split-pane.md.css +265 -0
  682. package/dist/node_modules/@ionic/core/dist/collection/components/tab/tab.css +4 -0
  683. package/dist/node_modules/@ionic/core/dist/collection/components/tab-bar/tab-bar.ios.css +252 -0
  684. package/dist/node_modules/@ionic/core/dist/collection/components/tab-bar/tab-bar.md.css +239 -0
  685. package/dist/node_modules/@ionic/core/dist/collection/components/tab-button/tab-button.ios.css +477 -0
  686. package/dist/node_modules/@ionic/core/dist/collection/components/tab-button/tab-button.md.css +501 -0
  687. package/dist/node_modules/@ionic/core/dist/collection/components/tabs/tabs.css +74 -0
  688. package/dist/node_modules/@ionic/core/dist/collection/components/text/text.css +58 -0
  689. package/dist/node_modules/@ionic/core/dist/collection/components/textarea/textarea.ios.css +987 -0
  690. package/dist/node_modules/@ionic/core/dist/collection/components/textarea/textarea.md.css +1553 -0
  691. package/dist/node_modules/@ionic/core/dist/collection/components/thumbnail/thumbnail.css +76 -0
  692. package/dist/node_modules/@ionic/core/dist/collection/components/title/title.ios.css +183 -0
  693. package/dist/node_modules/@ionic/core/dist/collection/components/title/title.md.css +102 -0
  694. package/dist/node_modules/@ionic/core/dist/collection/components/toast/toast.ios.css +399 -0
  695. package/dist/node_modules/@ionic/core/dist/collection/components/toast/toast.md.css +429 -0
  696. package/dist/node_modules/@ionic/core/dist/collection/components/toggle/toggle.ios.css +680 -0
  697. package/dist/node_modules/@ionic/core/dist/collection/components/toggle/toggle.md.css +625 -0
  698. package/dist/node_modules/@ionic/core/dist/collection/components/toolbar/toolbar.ios.css +265 -0
  699. package/dist/node_modules/@ionic/core/dist/collection/components/toolbar/toolbar.md.css +244 -0
  700. package/dist/node_modules/ionicons/dist/collection/components/icon/icon.css +144 -0
  701. package/dist/types/components/amwal-checkout-button/amwal-checkout-button.d.ts +327 -327
  702. package/dist/types/components/amwal-checkout-button/amwal-checkout-button.stories.d.ts +34 -34
  703. package/dist/types/components/amwal-installments-guide/amwal-installments-guide.d.ts +14 -14
  704. package/dist/types/components/amwal-installments-guide/amwal-installments-guide.stories.d.ts +17 -17
  705. package/dist/types/components/amwal-installments-timeline/amwal-installments-timeline.d.ts +106 -106
  706. package/dist/types/components/amwal-installments-timeline/amwal-installments-timeline.stories.d.ts +67 -67
  707. package/dist/types/components/amwal-pos/amwal-pos.d.ts +228 -228
  708. package/dist/types/components/amwal-pos/amwal-pos.stories.d.ts +185 -185
  709. package/dist/types/components/amwal-widget/amwal-widget-modal.d.ts +56 -56
  710. package/dist/types/components/amwal-widget/amwal-widget.d.ts +165 -165
  711. package/dist/types/components/amwal-widget/amwal-widget.stories.d.ts +101 -101
  712. package/dist/types/components.d.ts +0 -206
  713. package/dist/types/lang/i18n.d.ts +1 -1
  714. package/dist/types/stencil-public-runtime.d.ts +21 -191
  715. package/loader/cdn.js +3 -1
  716. package/loader/index.cjs.js +3 -1
  717. package/loader/index.d.ts +1 -4
  718. package/loader/index.es2017.js +3 -1
  719. package/loader/index.js +3 -1
  720. package/loader/package.json +11 -0
  721. package/package.json +28 -34
  722. package/dist/checkout/p-0161d109.entry.js +0 -1
  723. package/dist/checkout/p-0a8ef1ec.entry.js +0 -1
  724. package/dist/checkout/p-10a72fbe.entry.js +0 -1
  725. package/dist/checkout/p-12ed4081.entry.js +0 -1
  726. package/dist/checkout/p-13c36adc.entry.js +0 -1
  727. package/dist/checkout/p-194b17d8.entry.js +0 -1
  728. package/dist/checkout/p-272a1ffd.entry.js +0 -1
  729. package/dist/checkout/p-307af48b.entry.js +0 -1
  730. package/dist/checkout/p-3207674d.entry.js +0 -1
  731. package/dist/checkout/p-3208e56f.entry.js +0 -1
  732. package/dist/checkout/p-4426eb3b.entry.js +0 -1
  733. package/dist/checkout/p-458da59f.entry.js +0 -1
  734. package/dist/checkout/p-46e69508.entry.js +0 -1
  735. package/dist/checkout/p-49046c16.entry.js +0 -4
  736. package/dist/checkout/p-53dc0e86.entry.js +0 -1
  737. package/dist/checkout/p-5a6fc9fd.entry.js +0 -1
  738. package/dist/checkout/p-5e65653a.entry.js +0 -1
  739. package/dist/checkout/p-5f124c24.entry.js +0 -1
  740. package/dist/checkout/p-6a8ad104.entry.js +0 -1
  741. package/dist/checkout/p-76fb4325.entry.js +0 -1
  742. package/dist/checkout/p-78db60fb.entry.js +0 -1
  743. package/dist/checkout/p-8e34a1bb.entry.js +0 -1
  744. package/dist/checkout/p-91474b10.entry.js +0 -1
  745. package/dist/checkout/p-93OyAGoo.js +0 -2
  746. package/dist/checkout/p-94a57258.entry.js +0 -1
  747. package/dist/checkout/p-BEVStXwd.js +0 -7
  748. package/dist/checkout/p-BQu7QPd5.js +0 -4
  749. package/dist/checkout/p-BR7SJd-v.js +0 -4
  750. package/dist/checkout/p-BcFRJSFv.js +0 -4
  751. package/dist/checkout/p-BcUxrseY.js +0 -1
  752. package/dist/checkout/p-BdG893XR.js +0 -4
  753. package/dist/checkout/p-BgOwfqIY.js +0 -4
  754. package/dist/checkout/p-Bm9bMvCb.js +0 -4
  755. package/dist/checkout/p-C03M5ZSM.js +0 -1
  756. package/dist/checkout/p-C6kqtbmV.js +0 -4
  757. package/dist/checkout/p-C75BfBAE.js +0 -1
  758. package/dist/checkout/p-CVrvo9Qz.js +0 -4
  759. package/dist/checkout/p-ChixdDt6.js +0 -4
  760. package/dist/checkout/p-Cjnmql4G.js +0 -8
  761. package/dist/checkout/p-D0I0TqZU.js +0 -4
  762. package/dist/checkout/p-D2NxOvQ8.js +0 -4
  763. package/dist/checkout/p-D8d_89Nl.js +0 -4
  764. package/dist/checkout/p-DAhcxcAh.js +0 -4
  765. package/dist/checkout/p-DDtPO7yO.js +0 -4
  766. package/dist/checkout/p-DKg_dYcq.js +0 -4
  767. package/dist/checkout/p-DMAPbDyG.js +0 -4
  768. package/dist/checkout/p-DihS-5gH.js +0 -4
  769. package/dist/checkout/p-DkrNcwKK.js +0 -5
  770. package/dist/checkout/p-Dzj_jqIY.js +0 -4
  771. package/dist/checkout/p-E8AXUhZ3.js +0 -7
  772. package/dist/checkout/p-Ufaww5Lq.js +0 -4
  773. package/dist/checkout/p-a90efa79.entry.js +0 -1
  774. package/dist/checkout/p-abd12b84.entry.js +0 -1
  775. package/dist/checkout/p-abe1becc.entry.js +0 -1
  776. package/dist/checkout/p-b2f66c60.entry.js +0 -4
  777. package/dist/checkout/p-b45f5952.entry.js +0 -1
  778. package/dist/checkout/p-c2240d19.entry.js +0 -1
  779. package/dist/checkout/p-c28b4374.entry.js +0 -1
  780. package/dist/checkout/p-cb2db223.entry.js +0 -1
  781. package/dist/checkout/p-cb3967fc.entry.js +0 -1
  782. package/dist/checkout/p-cef16f11.entry.js +0 -1
  783. package/dist/checkout/p-df1b4347.entry.js +0 -4
  784. package/dist/checkout/p-e4bc42fb.entry.js +0 -1
  785. package/dist/checkout/p-e785fb8a.entry.js +0 -1
  786. package/dist/checkout/p-e8bd206a.entry.js +0 -1
  787. package/dist/checkout/p-ef749875.entry.js +0 -1
  788. package/dist/checkout/p-f157b6b2.entry.js +0 -4
  789. package/dist/checkout/p-f351a19a.entry.js +0 -1
  790. package/dist/checkout/p-ff2e59e3.entry.js +0 -1
  791. package/dist/checkout/p-hAETByzF.js +0 -5
  792. package/dist/checkout/p-vn1iXXUO.js +0 -9
  793. package/dist/cjs/i18n-uGNv9SLK.js +0 -13
  794. package/dist/cjs/index-DncWzXDA.js +0 -3738
  795. package/dist/components/p-55BwDerf.js +0 -8
  796. package/dist/components/p-B-M4K7iJ.js +0 -7
  797. package/dist/components/p-B-hirT0v.js +0 -4
  798. package/dist/components/p-B3WORC1a.js +0 -1
  799. package/dist/components/p-B5XH2zAk.js +0 -1
  800. package/dist/components/p-B5ZghgSh.js +0 -4
  801. package/dist/components/p-BEVStXwd.js +0 -7
  802. package/dist/components/p-BH0TCnxk.js +0 -4
  803. package/dist/components/p-BIA8A9ZO.js +0 -1
  804. package/dist/components/p-BOkYKP6F.js +0 -1
  805. package/dist/components/p-BOm0KT2x.js +0 -1
  806. package/dist/components/p-Bb_Zji0h.js +0 -4
  807. package/dist/components/p-BmVRXR1y.js +0 -4
  808. package/dist/components/p-BnQDByf2.js +0 -1
  809. package/dist/components/p-BoxjYI-Q.js +0 -4
  810. package/dist/components/p-BriBxgcM.js +0 -1
  811. package/dist/components/p-BwKjt_Dc.js +0 -4
  812. package/dist/components/p-Bx78uXfc.js +0 -5
  813. package/dist/components/p-C-20JWsp.js +0 -4
  814. package/dist/components/p-C03M5ZSM.js +0 -1
  815. package/dist/components/p-C53feagD.js +0 -4
  816. package/dist/components/p-CLrB3zV0.js +0 -4
  817. package/dist/components/p-CN34uOrj.js +0 -9
  818. package/dist/components/p-CQmcNwZM.js +0 -4
  819. package/dist/components/p-CYd0Smt1.js +0 -1
  820. package/dist/components/p-CgPXSjzI.js +0 -4
  821. package/dist/components/p-Cho32MPa.js +0 -4
  822. package/dist/components/p-ClE6rMJs.js +0 -4
  823. package/dist/components/p-Cm9b7fIl.js +0 -1
  824. package/dist/components/p-CukVBo5-.js +0 -4
  825. package/dist/components/p-D2NxOvQ8.js +0 -4
  826. package/dist/components/p-D4DqwBlW.js +0 -4
  827. package/dist/components/p-D7YY0NXg.js +0 -4
  828. package/dist/components/p-D8OVJo1v.js +0 -7
  829. package/dist/components/p-DKg_dYcq.js +0 -4
  830. package/dist/components/p-DLVYPrYs.js +0 -1
  831. package/dist/components/p-DMmSL7_l.js +0 -1
  832. package/dist/components/p-DOPF2QRF.js +0 -1
  833. package/dist/components/p-DTgJTJD6.js +0 -1
  834. package/dist/components/p-DiVJyqlX.js +0 -4
  835. package/dist/components/p-DrS88eFz.js +0 -1
  836. package/dist/components/p-Dtdm8lKC.js +0 -4
  837. package/dist/components/p-DuZ7hY1a.js +0 -4
  838. package/dist/components/p-Dx-C8Ob_.js +0 -7
  839. package/dist/components/p-DxEgz9x_.js +0 -1
  840. package/dist/components/p-DxSo4SXG.js +0 -1
  841. package/dist/components/p-HSPzo8it.js +0 -1
  842. package/dist/components/p-OrwCUtWu.js +0 -4
  843. package/dist/components/p-UgkI2Wa4.js +0 -1
  844. package/dist/components/p-VeNdmYSo.js +0 -1
  845. package/dist/components/p-YbpebnFS.js +0 -4
  846. package/dist/components/p-ZjP4CjeZ.js +0 -4
  847. package/dist/components/p-_VuKPdkD.js +0 -4
  848. package/dist/components/p-aWL6BxTN.js +0 -4
  849. package/dist/components/p-hHmYLOfE.js +0 -4
  850. package/dist/components/p-qoI-S7yk.js +0 -4
  851. package/dist/components/p-uXV7tzS3.js +0 -1
  852. package/dist/components/p-yu3xCFhr.js +0 -7
  853. package/dist/components/p-zp5f483d.js +0 -1
  854. package/dist/esm/i18n-C_AfxZ5D.js +0 -13
  855. package/dist/esm/index-93OyAGoo.js +0 -3721
  856. /package/dist/checkout/{p-B-hirT0v.js → p-01ad898f.js} +0 -0
  857. /package/dist/checkout/{p-DiVJyqlX.js → p-350e7423.js} +0 -0
  858. /package/dist/checkout/{p-sObYyvOy.js → p-52b4c112.js} +0 -0
  859. /package/dist/checkout/{p-BmVRXR1y.js → p-620fa0ec.js} +0 -0
  860. /package/dist/checkout/{p-hHmYLOfE.js → p-94286cc3.js} +0 -0
  861. /package/dist/checkout/{p-D4RIp70E.js → p-9efbca93.js} +0 -0
  862. /package/dist/checkout/{p-Dtdm8lKC.js → p-9f4ac833.js} +0 -0
  863. /package/dist/checkout/{p-yu3xCFhr.js → p-b2289937.js} +0 -0
  864. /package/dist/checkout/{p-C53feagD.js → p-d5862637.js} +0 -0
  865. /package/dist/checkout/{p-ZjP4CjeZ.js → p-d7fe59ee.js} +0 -0
  866. /package/dist/{components/p-CYPPT3AE.js → checkout/p-e187a77c.js} +0 -0
  867. /package/dist/checkout/{p-CukVBo5-.js → p-f728a68f.js} +0 -0
  868. /package/dist/cjs/{compare-with-utils-JlLIkecm.js → compare-with-utils-adbe64a6.js} +0 -0
  869. /package/dist/cjs/{config-ptk2Lf4l.js → config-e2a8c0c7.js} +0 -0
  870. /package/dist/cjs/{cubic-bezier-Bv3PvaRI.js → cubic-bezier-5ff9b04e.js} +0 -0
  871. /package/dist/cjs/{dir-Br-7_bel.js → dir-374f13f2.js} +0 -0
  872. /package/dist/cjs/{focus-visible-Da2o6bTP.js → focus-visible-b7381162.js} +0 -0
  873. /package/dist/cjs/{index-CH3IFTaK.js → index-071786b4.js} +0 -0
  874. /package/dist/cjs/{index-D3mJ1Cix.js → index-a281cac3.js} +0 -0
  875. /package/dist/cjs/{lock-controller-58TZFRHC.js → lock-controller-e2dfece6.js} +0 -0
  876. /package/dist/cjs/{spinner-configs-BN41iw42.js → spinner-configs-036ebfd8.js} +0 -0
  877. /package/dist/cjs/{theme-DbHdw1Nx.js → theme-12dec869.js} +0 -0
  878. /package/dist/cjs/{watch-options-DOFUPyuf.js → watch-options-1cccbe6a.js} +0 -0
  879. /package/dist/{esm/lock-controller-B-hirT0v.js → components/p-01ad898f.js} +0 -0
  880. /package/dist/{esm/theme-DiVJyqlX.js → components/p-350e7423.js} +0 -0
  881. /package/dist/{esm/focus-visible-BmVRXR1y.js → components/p-620fa0ec.js} +0 -0
  882. /package/dist/{esm/cubic-bezier-hHmYLOfE.js → components/p-94286cc3.js} +0 -0
  883. /package/dist/{esm/watch-options-Dtdm8lKC.js → components/p-9f4ac833.js} +0 -0
  884. /package/dist/{esm/config-yu3xCFhr.js → components/p-b2289937.js} +0 -0
  885. /package/dist/{esm/dir-C53feagD.js → components/p-d5862637.js} +0 -0
  886. /package/dist/{esm/index-ZjP4CjeZ.js → components/p-d7fe59ee.js} +0 -0
  887. /package/dist/esm/{compare-with-utils-sObYyvOy.js → compare-with-utils-d58be312.js} +0 -0
  888. /package/dist/esm/{spinner-configs-D4RIp70E.js → spinner-configs-c9fb0813.js} +0 -0
@@ -0,0 +1,2040 @@
1
+ const NAMESPACE = 'checkout';
2
+
3
+ /**
4
+ * Virtual DOM patching algorithm based on Snabbdom by
5
+ * Simon Friis Vindum (@paldepind)
6
+ * Licensed under the MIT License
7
+ * https://github.com/snabbdom/snabbdom/blob/master/LICENSE
8
+ *
9
+ * Modified for Stencil's renderer and slot projection
10
+ */
11
+ let scopeId;
12
+ let contentRef;
13
+ let hostTagName;
14
+ let useNativeShadowDom = false;
15
+ let checkSlotFallbackVisibility = false;
16
+ let checkSlotRelocate = false;
17
+ let isSvgMode = false;
18
+ let queuePending = false;
19
+ const setAssetPath = (path) => (plt.$resourcesUrl$ = path);
20
+ const createTime = (fnName, tagName = '') => {
21
+ {
22
+ return () => {
23
+ return;
24
+ };
25
+ }
26
+ };
27
+ const XLINK_NS = 'http://www.w3.org/1999/xlink';
28
+ /**
29
+ * Default style mode id
30
+ */
31
+ /**
32
+ * Reusable empty obj/array
33
+ * Don't add values to these!!
34
+ */
35
+ const EMPTY_OBJ = {};
36
+ /**
37
+ * Namespaces
38
+ */
39
+ const SVG_NS = 'http://www.w3.org/2000/svg';
40
+ const HTML_NS = 'http://www.w3.org/1999/xhtml';
41
+ const isDef = (v) => v != null;
42
+ /**
43
+ * Check whether a value is a 'complex type', defined here as an object or a
44
+ * function.
45
+ *
46
+ * @param o the value to check
47
+ * @returns whether it's a complex type or not
48
+ */
49
+ const isComplexType = (o) => {
50
+ // https://jsperf.com/typeof-fn-object/5
51
+ o = typeof o;
52
+ return o === 'object' || o === 'function';
53
+ };
54
+ /**
55
+ * Helper method for querying a `meta` tag that contains a nonce value
56
+ * out of a DOM's head.
57
+ *
58
+ * @param doc The DOM containing the `head` to query against
59
+ * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag
60
+ * exists or the tag has no content.
61
+ */
62
+ function queryNonceMetaTagContent(doc) {
63
+ var _a, _b, _c;
64
+ 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;
65
+ }
66
+ /**
67
+ * Production h() function based on Preact by
68
+ * Jason Miller (@developit)
69
+ * Licensed under the MIT License
70
+ * https://github.com/developit/preact/blob/master/LICENSE
71
+ *
72
+ * Modified for Stencil's compiler and vdom
73
+ */
74
+ // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
75
+ // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
76
+ const h = (nodeName, vnodeData, ...children) => {
77
+ let child = null;
78
+ let key = null;
79
+ let slotName = null;
80
+ let simple = false;
81
+ let lastSimple = false;
82
+ const vNodeChildren = [];
83
+ const walk = (c) => {
84
+ for (let i = 0; i < c.length; i++) {
85
+ child = c[i];
86
+ if (Array.isArray(child)) {
87
+ walk(child);
88
+ }
89
+ else if (child != null && typeof child !== 'boolean') {
90
+ if ((simple = typeof nodeName !== 'function' && !isComplexType(child))) {
91
+ child = String(child);
92
+ }
93
+ if (simple && lastSimple) {
94
+ // If the previous child was simple (string), we merge both
95
+ vNodeChildren[vNodeChildren.length - 1].$text$ += child;
96
+ }
97
+ else {
98
+ // Append a new vNode, if it's text, we create a text vNode
99
+ vNodeChildren.push(simple ? newVNode(null, child) : child);
100
+ }
101
+ lastSimple = simple;
102
+ }
103
+ }
104
+ };
105
+ walk(children);
106
+ if (vnodeData) {
107
+ // normalize class / classname attributes
108
+ if (vnodeData.key) {
109
+ key = vnodeData.key;
110
+ }
111
+ if (vnodeData.name) {
112
+ slotName = vnodeData.name;
113
+ }
114
+ {
115
+ const classData = vnodeData.className || vnodeData.class;
116
+ if (classData) {
117
+ vnodeData.class =
118
+ typeof classData !== 'object'
119
+ ? classData
120
+ : Object.keys(classData)
121
+ .filter((k) => classData[k])
122
+ .join(' ');
123
+ }
124
+ }
125
+ }
126
+ if (typeof nodeName === 'function') {
127
+ // nodeName is a functional component
128
+ return nodeName(vnodeData === null ? {} : vnodeData, vNodeChildren, vdomFnUtils);
129
+ }
130
+ const vnode = newVNode(nodeName, null);
131
+ vnode.$attrs$ = vnodeData;
132
+ if (vNodeChildren.length > 0) {
133
+ vnode.$children$ = vNodeChildren;
134
+ }
135
+ {
136
+ vnode.$key$ = key;
137
+ }
138
+ {
139
+ vnode.$name$ = slotName;
140
+ }
141
+ return vnode;
142
+ };
143
+ /**
144
+ * A utility function for creating a virtual DOM node from a tag and some
145
+ * possible text content.
146
+ *
147
+ * @param tag the tag for this element
148
+ * @param text possible text content for the node
149
+ * @returns a newly-minted virtual DOM node
150
+ */
151
+ const newVNode = (tag, text) => {
152
+ const vnode = {
153
+ $flags$: 0,
154
+ $tag$: tag,
155
+ $text$: text,
156
+ $elm$: null,
157
+ $children$: null,
158
+ };
159
+ {
160
+ vnode.$attrs$ = null;
161
+ }
162
+ {
163
+ vnode.$key$ = null;
164
+ }
165
+ {
166
+ vnode.$name$ = null;
167
+ }
168
+ return vnode;
169
+ };
170
+ const Host = {};
171
+ /**
172
+ * Check whether a given node is a Host node or not
173
+ *
174
+ * @param node the virtual DOM node to check
175
+ * @returns whether it's a Host node or not
176
+ */
177
+ const isHost = (node) => node && node.$tag$ === Host;
178
+ /**
179
+ * Implementation of {@link d.FunctionalUtilities} for Stencil's VDom.
180
+ *
181
+ * Note that these functions convert from {@link d.VNode} to
182
+ * {@link d.ChildNode} to give functional component developers a friendly
183
+ * interface.
184
+ */
185
+ const vdomFnUtils = {
186
+ forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
187
+ map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate),
188
+ };
189
+ /**
190
+ * Convert a {@link d.VNode} to a {@link d.ChildNode} in order to present a
191
+ * friendlier public interface (hence, 'convertToPublic').
192
+ *
193
+ * @param node the virtual DOM node to convert
194
+ * @returns a converted child node
195
+ */
196
+ const convertToPublic = (node) => ({
197
+ vattrs: node.$attrs$,
198
+ vchildren: node.$children$,
199
+ vkey: node.$key$,
200
+ vname: node.$name$,
201
+ vtag: node.$tag$,
202
+ vtext: node.$text$,
203
+ });
204
+ /**
205
+ * Convert a {@link d.ChildNode} back to an equivalent {@link d.VNode} in
206
+ * order to use the resulting object in the virtual DOM. The initial object was
207
+ * likely created as part of presenting a public API, so converting it back
208
+ * involved making it 'private' again (hence, `convertToPrivate`).
209
+ *
210
+ * @param node the child node to convert
211
+ * @returns a converted virtual DOM node
212
+ */
213
+ const convertToPrivate = (node) => {
214
+ if (typeof node.vtag === 'function') {
215
+ const vnodeData = Object.assign({}, node.vattrs);
216
+ if (node.vkey) {
217
+ vnodeData.key = node.vkey;
218
+ }
219
+ if (node.vname) {
220
+ vnodeData.name = node.vname;
221
+ }
222
+ return h(node.vtag, vnodeData, ...(node.vchildren || []));
223
+ }
224
+ const vnode = newVNode(node.vtag, node.vtext);
225
+ vnode.$attrs$ = node.vattrs;
226
+ vnode.$children$ = node.vchildren;
227
+ vnode.$key$ = node.vkey;
228
+ vnode.$name$ = node.vname;
229
+ return vnode;
230
+ };
231
+ // Private
232
+ const computeMode = (elm) => modeResolutionChain.map((h) => h(elm)).find((m) => !!m);
233
+ /**
234
+ * Parse a new property value for a given property type.
235
+ *
236
+ * While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
237
+ * it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
238
+ * 1. `any`, the type given to `propValue` in the function signature
239
+ * 2. the type stored from `propType`.
240
+ *
241
+ * This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
242
+ *
243
+ * Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
244
+ * a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
245
+ * based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
246
+ * ```tsx
247
+ * <my-cmp prop-val={0}></my-cmp>
248
+ * ```
249
+ *
250
+ * HTML prop values on the other hand, will always a string
251
+ *
252
+ * @param propValue the new value to coerce to some type
253
+ * @param propType the type of the prop, expressed as a binary number
254
+ * @returns the parsed/coerced value
255
+ */
256
+ const parsePropertyValue = (propValue, propType) => {
257
+ // ensure this value is of the correct prop type
258
+ if (propValue != null && !isComplexType(propValue)) {
259
+ if (propType & 4 /* MEMBER_FLAGS.Boolean */) {
260
+ // per the HTML spec, any string value means it is a boolean true value
261
+ // but we'll cheat here and say that the string "false" is the boolean false
262
+ return propValue === 'false' ? false : propValue === '' || !!propValue;
263
+ }
264
+ if (propType & 2 /* MEMBER_FLAGS.Number */) {
265
+ // force it to be a number
266
+ return parseFloat(propValue);
267
+ }
268
+ if (propType & 1 /* MEMBER_FLAGS.String */) {
269
+ // could have been passed as a number or boolean
270
+ // but we still want it as a string
271
+ return String(propValue);
272
+ }
273
+ // redundant return here for better minification
274
+ return propValue;
275
+ }
276
+ // not sure exactly what type we want
277
+ // so no need to change to a different type
278
+ return propValue;
279
+ };
280
+ const getElement = (ref) => (ref);
281
+ const createEvent = (ref, name, flags) => {
282
+ const elm = getElement(ref);
283
+ return {
284
+ emit: (detail) => {
285
+ return emitEvent(elm, name, {
286
+ bubbles: !!(flags & 4 /* EVENT_FLAGS.Bubbles */),
287
+ composed: !!(flags & 2 /* EVENT_FLAGS.Composed */),
288
+ cancelable: !!(flags & 1 /* EVENT_FLAGS.Cancellable */),
289
+ detail,
290
+ });
291
+ },
292
+ };
293
+ };
294
+ /**
295
+ * Helper function to create & dispatch a custom Event on a provided target
296
+ * @param elm the target of the Event
297
+ * @param name the name to give the custom Event
298
+ * @param opts options for configuring a custom Event
299
+ * @returns the custom Event
300
+ */
301
+ const emitEvent = (elm, name, opts) => {
302
+ const ev = plt.ce(name, opts);
303
+ elm.dispatchEvent(ev);
304
+ return ev;
305
+ };
306
+ const rootAppliedStyles = /*@__PURE__*/ new WeakMap();
307
+ const registerStyle = (scopeId, cssText, allowCS) => {
308
+ let style = styles.get(scopeId);
309
+ if (supportsConstructableStylesheets && allowCS) {
310
+ style = (style || new CSSStyleSheet());
311
+ if (typeof style === 'string') {
312
+ style = cssText;
313
+ }
314
+ else {
315
+ style.replaceSync(cssText);
316
+ }
317
+ }
318
+ else {
319
+ style = cssText;
320
+ }
321
+ styles.set(scopeId, style);
322
+ };
323
+ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
324
+ var _a;
325
+ let scopeId = getScopeId(cmpMeta, mode);
326
+ const style = styles.get(scopeId);
327
+ // if an element is NOT connected then getRootNode() will return the wrong root node
328
+ // so the fallback is to always use the document for the root node in those cases
329
+ styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;
330
+ if (style) {
331
+ if (typeof style === 'string') {
332
+ styleContainerNode = styleContainerNode.head || styleContainerNode;
333
+ let appliedStyles = rootAppliedStyles.get(styleContainerNode);
334
+ let styleElm;
335
+ if (!appliedStyles) {
336
+ rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
337
+ }
338
+ if (!appliedStyles.has(scopeId)) {
339
+ {
340
+ // TODO(STENCIL-659): Remove code implementing the CSS variable shim
341
+ {
342
+ styleElm = doc.createElement('style');
343
+ styleElm.innerHTML = style;
344
+ }
345
+ // Apply CSP nonce to the style tag if it exists
346
+ const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
347
+ if (nonce != null) {
348
+ styleElm.setAttribute('nonce', nonce);
349
+ }
350
+ styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
351
+ }
352
+ if (appliedStyles) {
353
+ appliedStyles.add(scopeId);
354
+ }
355
+ }
356
+ }
357
+ else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
358
+ styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
359
+ }
360
+ }
361
+ return scopeId;
362
+ };
363
+ const attachStyles = (hostRef) => {
364
+ const cmpMeta = hostRef.$cmpMeta$;
365
+ const elm = hostRef.$hostElement$;
366
+ const flags = cmpMeta.$flags$;
367
+ const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
368
+ const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta, hostRef.$modeName$);
369
+ // TODO(STENCIL-662): Remove code related to deprecated shadowDomShim field
370
+ if (flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) {
371
+ // only required when we're NOT using native shadow dom (slot)
372
+ // or this browser doesn't support native shadow dom
373
+ // and this host element was NOT created with SSR
374
+ // let's pick out the inner content for slot projection
375
+ // create a node to represent where the original
376
+ // content was first placed, which is useful later on
377
+ // DOM WRITE!!
378
+ elm['s-sc'] = scopeId;
379
+ elm.classList.add(scopeId + '-h');
380
+ if (flags & 2 /* CMP_FLAGS.scopedCssEncapsulation */) {
381
+ elm.classList.add(scopeId + '-s');
382
+ }
383
+ }
384
+ endAttachStyles();
385
+ };
386
+ const getScopeId = (cmp, mode) => 'sc-' + (mode && cmp.$flags$ & 32 /* CMP_FLAGS.hasMode */ ? cmp.$tagName$ + '-' + mode : cmp.$tagName$);
387
+ /**
388
+ * Production setAccessor() function based on Preact by
389
+ * Jason Miller (@developit)
390
+ * Licensed under the MIT License
391
+ * https://github.com/developit/preact/blob/master/LICENSE
392
+ *
393
+ * Modified for Stencil's compiler and vdom
394
+ */
395
+ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
396
+ if (oldValue !== newValue) {
397
+ let isProp = isMemberInElement(elm, memberName);
398
+ let ln = memberName.toLowerCase();
399
+ if (memberName === 'class') {
400
+ const classList = elm.classList;
401
+ const oldClasses = parseClassList(oldValue);
402
+ const newClasses = parseClassList(newValue);
403
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
404
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
405
+ }
406
+ else if (memberName === 'style') {
407
+ // update style attribute, css properties and values
408
+ {
409
+ for (const prop in oldValue) {
410
+ if (!newValue || newValue[prop] == null) {
411
+ if (prop.includes('-')) {
412
+ elm.style.removeProperty(prop);
413
+ }
414
+ else {
415
+ elm.style[prop] = '';
416
+ }
417
+ }
418
+ }
419
+ }
420
+ for (const prop in newValue) {
421
+ if (!oldValue || newValue[prop] !== oldValue[prop]) {
422
+ if (prop.includes('-')) {
423
+ elm.style.setProperty(prop, newValue[prop]);
424
+ }
425
+ else {
426
+ elm.style[prop] = newValue[prop];
427
+ }
428
+ }
429
+ }
430
+ }
431
+ else if (memberName === 'key')
432
+ ;
433
+ else if (memberName === 'ref') {
434
+ // minifier will clean this up
435
+ if (newValue) {
436
+ newValue(elm);
437
+ }
438
+ }
439
+ else if ((!elm.__lookupSetter__(memberName)) &&
440
+ memberName[0] === 'o' &&
441
+ memberName[1] === 'n') {
442
+ // Event Handlers
443
+ // so if the member name starts with "on" and the 3rd characters is
444
+ // a capital letter, and it's not already a member on the element,
445
+ // then we're assuming it's an event listener
446
+ if (memberName[2] === '-') {
447
+ // on- prefixed events
448
+ // allows to be explicit about the dom event to listen without any magic
449
+ // under the hood:
450
+ // <my-cmp on-click> // listens for "click"
451
+ // <my-cmp on-Click> // listens for "Click"
452
+ // <my-cmp on-ionChange> // listens for "ionChange"
453
+ // <my-cmp on-EVENTS> // listens for "EVENTS"
454
+ memberName = memberName.slice(3);
455
+ }
456
+ else if (isMemberInElement(win, ln)) {
457
+ // standard event
458
+ // the JSX attribute could have been "onMouseOver" and the
459
+ // member name "onmouseover" is on the window's prototype
460
+ // so let's add the listener "mouseover", which is all lowercased
461
+ memberName = ln.slice(2);
462
+ }
463
+ else {
464
+ // custom event
465
+ // the JSX attribute could have been "onMyCustomEvent"
466
+ // so let's trim off the "on" prefix and lowercase the first character
467
+ // and add the listener "myCustomEvent"
468
+ // except for the first character, we keep the event name case
469
+ memberName = ln[2] + memberName.slice(3);
470
+ }
471
+ if (oldValue) {
472
+ plt.rel(elm, memberName, oldValue, false);
473
+ }
474
+ if (newValue) {
475
+ plt.ael(elm, memberName, newValue, false);
476
+ }
477
+ }
478
+ else {
479
+ // Set property if it exists and it's not a SVG
480
+ const isComplex = isComplexType(newValue);
481
+ if ((isProp || (isComplex && newValue !== null)) && !isSvg) {
482
+ try {
483
+ if (!elm.tagName.includes('-')) {
484
+ const n = newValue == null ? '' : newValue;
485
+ // Workaround for Safari, moving the <input> caret when re-assigning the same valued
486
+ if (memberName === 'list') {
487
+ isProp = false;
488
+ }
489
+ else if (oldValue == null || elm[memberName] != n) {
490
+ elm[memberName] = n;
491
+ }
492
+ }
493
+ else {
494
+ elm[memberName] = newValue;
495
+ }
496
+ }
497
+ catch (e) { }
498
+ }
499
+ /**
500
+ * Need to manually update attribute if:
501
+ * - memberName is not an attribute
502
+ * - if we are rendering the host element in order to reflect attribute
503
+ * - if it's a SVG, since properties might not work in <svg>
504
+ * - if the newValue is null/undefined or 'false'.
505
+ */
506
+ let xlink = false;
507
+ {
508
+ if (ln !== (ln = ln.replace(/^xlink\:?/, ''))) {
509
+ memberName = ln;
510
+ xlink = true;
511
+ }
512
+ }
513
+ if (newValue == null || newValue === false) {
514
+ if (newValue !== false || elm.getAttribute(memberName) === '') {
515
+ if (xlink) {
516
+ elm.removeAttributeNS(XLINK_NS, memberName);
517
+ }
518
+ else {
519
+ elm.removeAttribute(memberName);
520
+ }
521
+ }
522
+ }
523
+ else if ((!isProp || flags & 4 /* VNODE_FLAGS.isHost */ || isSvg) && !isComplex) {
524
+ newValue = newValue === true ? '' : newValue;
525
+ if (xlink) {
526
+ elm.setAttributeNS(XLINK_NS, memberName, newValue);
527
+ }
528
+ else {
529
+ elm.setAttribute(memberName, newValue);
530
+ }
531
+ }
532
+ }
533
+ }
534
+ };
535
+ const parseClassListRegex = /\s/;
536
+ const parseClassList = (value) => (!value ? [] : value.split(parseClassListRegex));
537
+ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
538
+ // if the element passed in is a shadow root, which is a document fragment
539
+ // then we want to be adding attrs/props to the shadow root's "host" element
540
+ // if it's not a shadow root, then we add attrs/props to the same element
541
+ const elm = newVnode.$elm$.nodeType === 11 /* NODE_TYPE.DocumentFragment */ && newVnode.$elm$.host
542
+ ? newVnode.$elm$.host
543
+ : newVnode.$elm$;
544
+ const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
545
+ const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
546
+ {
547
+ // remove attributes no longer present on the vnode by setting them to undefined
548
+ for (memberName in oldVnodeAttrs) {
549
+ if (!(memberName in newVnodeAttrs)) {
550
+ setAccessor(elm, memberName, oldVnodeAttrs[memberName], undefined, isSvgMode, newVnode.$flags$);
551
+ }
552
+ }
553
+ }
554
+ // add new & update changed attributes
555
+ for (memberName in newVnodeAttrs) {
556
+ setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
557
+ }
558
+ };
559
+ /**
560
+ * Create a DOM Node corresponding to one of the children of a given VNode.
561
+ *
562
+ * @param oldParentVNode the parent VNode from the previous render
563
+ * @param newParentVNode the parent VNode from the current render
564
+ * @param childIndex the index of the VNode, in the _new_ parent node's
565
+ * children, for which we will create a new DOM node
566
+ * @param parentElm the parent DOM node which our new node will be a child of
567
+ * @returns the newly created node
568
+ */
569
+ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
570
+ // tslint:disable-next-line: prefer-const
571
+ const newVNode = newParentVNode.$children$[childIndex];
572
+ let i = 0;
573
+ let elm;
574
+ let childNode;
575
+ let oldVNode;
576
+ if (!useNativeShadowDom) {
577
+ // remember for later we need to check to relocate nodes
578
+ checkSlotRelocate = true;
579
+ if (newVNode.$tag$ === 'slot') {
580
+ if (scopeId) {
581
+ // scoped css needs to add its scoped id to the parent element
582
+ parentElm.classList.add(scopeId + '-s');
583
+ }
584
+ newVNode.$flags$ |= newVNode.$children$
585
+ ? // slot element has fallback content
586
+ 2 /* VNODE_FLAGS.isSlotFallback */
587
+ : // slot element does not have fallback content
588
+ 1 /* VNODE_FLAGS.isSlotReference */;
589
+ }
590
+ }
591
+ if (newVNode.$text$ !== null) {
592
+ // create text node
593
+ elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
594
+ }
595
+ else if (newVNode.$flags$ & 1 /* VNODE_FLAGS.isSlotReference */) {
596
+ // create a slot reference node
597
+ elm = newVNode.$elm$ =
598
+ doc.createTextNode('');
599
+ }
600
+ else {
601
+ if (!isSvgMode) {
602
+ isSvgMode = newVNode.$tag$ === 'svg';
603
+ }
604
+ // create element
605
+ elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$flags$ & 2 /* VNODE_FLAGS.isSlotFallback */
606
+ ? 'slot-fb'
607
+ : newVNode.$tag$)
608
+ );
609
+ if (isSvgMode && newVNode.$tag$ === 'foreignObject') {
610
+ isSvgMode = false;
611
+ }
612
+ // add css classes, attrs, props, listeners, etc.
613
+ {
614
+ updateElement(null, newVNode, isSvgMode);
615
+ }
616
+ if (isDef(scopeId) && elm['s-si'] !== scopeId) {
617
+ // if there is a scopeId and this is the initial render
618
+ // then let's add the scopeId as a css class
619
+ elm.classList.add((elm['s-si'] = scopeId));
620
+ }
621
+ if (newVNode.$children$) {
622
+ for (i = 0; i < newVNode.$children$.length; ++i) {
623
+ // create the node
624
+ childNode = createElm(oldParentVNode, newVNode, i, elm);
625
+ // return node could have been null
626
+ if (childNode) {
627
+ // append our new node
628
+ elm.appendChild(childNode);
629
+ }
630
+ }
631
+ }
632
+ {
633
+ if (newVNode.$tag$ === 'svg') {
634
+ // Only reset the SVG context when we're exiting <svg> element
635
+ isSvgMode = false;
636
+ }
637
+ else if (elm.tagName === 'foreignObject') {
638
+ // Reenter SVG context when we're exiting <foreignObject> element
639
+ isSvgMode = true;
640
+ }
641
+ }
642
+ }
643
+ {
644
+ elm['s-hn'] = hostTagName;
645
+ if (newVNode.$flags$ & (2 /* VNODE_FLAGS.isSlotFallback */ | 1 /* VNODE_FLAGS.isSlotReference */)) {
646
+ // remember the content reference comment
647
+ elm['s-sr'] = true;
648
+ // remember the content reference comment
649
+ elm['s-cr'] = contentRef;
650
+ // remember the slot name, or empty string for default slot
651
+ elm['s-sn'] = newVNode.$name$ || '';
652
+ // check if we've got an old vnode for this slot
653
+ oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
654
+ if (oldVNode && oldVNode.$tag$ === newVNode.$tag$ && oldParentVNode.$elm$) {
655
+ // we've got an old slot vnode and the wrapper is being replaced
656
+ // so let's move the old slot content back to it's original location
657
+ putBackInOriginalLocation(oldParentVNode.$elm$, false);
658
+ }
659
+ }
660
+ }
661
+ return elm;
662
+ };
663
+ const putBackInOriginalLocation = (parentElm, recursive) => {
664
+ plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
665
+ const oldSlotChildNodes = parentElm.childNodes;
666
+ for (let i = oldSlotChildNodes.length - 1; i >= 0; i--) {
667
+ const childNode = oldSlotChildNodes[i];
668
+ if (childNode['s-hn'] !== hostTagName && childNode['s-ol']) {
669
+ // // this child node in the old element is from another component
670
+ // // remove this node from the old slot's parent
671
+ // childNode.remove();
672
+ // and relocate it back to it's original location
673
+ parentReferenceNode(childNode).insertBefore(childNode, referenceNode(childNode));
674
+ // remove the old original location comment entirely
675
+ // later on the patch function will know what to do
676
+ // and move this to the correct spot in need be
677
+ childNode['s-ol'].remove();
678
+ childNode['s-ol'] = undefined;
679
+ checkSlotRelocate = true;
680
+ }
681
+ if (recursive) {
682
+ putBackInOriginalLocation(childNode, recursive);
683
+ }
684
+ }
685
+ plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;
686
+ };
687
+ /**
688
+ * Create DOM nodes corresponding to a list of {@link d.Vnode} objects and
689
+ * add them to the DOM in the appropriate place.
690
+ *
691
+ * @param parentElm the DOM node which should be used as a parent for the new
692
+ * DOM nodes
693
+ * @param before a child of the `parentElm` which the new children should be
694
+ * inserted before (optional)
695
+ * @param parentVNode the parent virtual DOM node
696
+ * @param vnodes the new child virtual DOM nodes to produce DOM nodes for
697
+ * @param startIdx the index in the child virtual DOM nodes at which to start
698
+ * creating DOM nodes (inclusive)
699
+ * @param endIdx the index in the child virtual DOM nodes at which to stop
700
+ * creating DOM nodes (inclusive)
701
+ */
702
+ const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
703
+ let containerElm = ((parentElm['s-cr'] && parentElm['s-cr'].parentNode) || parentElm);
704
+ let childNode;
705
+ if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
706
+ containerElm = containerElm.shadowRoot;
707
+ }
708
+ for (; startIdx <= endIdx; ++startIdx) {
709
+ if (vnodes[startIdx]) {
710
+ childNode = createElm(null, parentVNode, startIdx, parentElm);
711
+ if (childNode) {
712
+ vnodes[startIdx].$elm$ = childNode;
713
+ containerElm.insertBefore(childNode, referenceNode(before) );
714
+ }
715
+ }
716
+ }
717
+ };
718
+ /**
719
+ * Remove the DOM elements corresponding to a list of {@link d.VNode} objects.
720
+ * This can be used to, for instance, clean up after a list of children which
721
+ * should no longer be shown.
722
+ *
723
+ * This function also handles some of Stencil's slot relocation logic.
724
+ *
725
+ * @param vnodes a list of virtual DOM nodes to remove
726
+ * @param startIdx the index at which to start removing nodes (inclusive)
727
+ * @param endIdx the index at which to stop removing nodes (inclusive)
728
+ */
729
+ const removeVnodes = (vnodes, startIdx, endIdx) => {
730
+ for (let index = startIdx; index <= endIdx; ++index) {
731
+ const vnode = vnodes[index];
732
+ if (vnode) {
733
+ const elm = vnode.$elm$;
734
+ nullifyVNodeRefs(vnode);
735
+ if (elm) {
736
+ {
737
+ // we're removing this element
738
+ // so it's possible we need to show slot fallback content now
739
+ checkSlotFallbackVisibility = true;
740
+ if (elm['s-ol']) {
741
+ // remove the original location comment
742
+ elm['s-ol'].remove();
743
+ }
744
+ else {
745
+ // it's possible that child nodes of the node
746
+ // that's being removed are slot nodes
747
+ putBackInOriginalLocation(elm, true);
748
+ }
749
+ }
750
+ // remove the vnode's element from the dom
751
+ elm.remove();
752
+ }
753
+ }
754
+ }
755
+ };
756
+ /**
757
+ * Reconcile the children of a new VNode with the children of an old VNode by
758
+ * traversing the two collections of children, identifying nodes that are
759
+ * conserved or changed, calling out to `patch` to make any necessary
760
+ * updates to the DOM, and rearranging DOM nodes as needed.
761
+ *
762
+ * The algorithm for reconciling children works by analyzing two 'windows' onto
763
+ * the two arrays of children (`oldCh` and `newCh`). We keep track of the
764
+ * 'windows' by storing start and end indices and references to the
765
+ * corresponding array entries. Initially the two 'windows' are basically equal
766
+ * to the entire array, but we progressively narrow the windows until there are
767
+ * no children left to update by doing the following:
768
+ *
769
+ * 1. Skip any `null` entries at the beginning or end of the two arrays, so
770
+ * that if we have an initial array like the following we'll end up dealing
771
+ * only with a window bounded by the highlighted elements:
772
+ *
773
+ * [null, null, VNode1 , ... , VNode2, null, null]
774
+ * ^^^^^^ ^^^^^^
775
+ *
776
+ * 2. Check to see if the elements at the head and tail positions are equal
777
+ * across the windows. This will basically detect elements which haven't
778
+ * been added, removed, or changed position, i.e. if you had the following
779
+ * VNode elements (represented as HTML):
780
+ *
781
+ * oldVNode: `<div><p><span>HEY</span></p></div>`
782
+ * newVNode: `<div><p><span>THERE</span></p></div>`
783
+ *
784
+ * Then when comparing the children of the `<div>` tag we check the equality
785
+ * of the VNodes corresponding to the `<p>` tags and, since they are the
786
+ * same tag in the same position, we'd be able to avoid completely
787
+ * re-rendering the subtree under them with a new DOM element and would just
788
+ * call out to `patch` to handle reconciling their children and so on.
789
+ *
790
+ * 3. Check, for both windows, to see if the element at the beginning of the
791
+ * window corresponds to the element at the end of the other window. This is
792
+ * a heuristic which will let us identify _some_ situations in which
793
+ * elements have changed position, for instance it _should_ detect that the
794
+ * children nodes themselves have not changed but merely moved in the
795
+ * following example:
796
+ *
797
+ * oldVNode: `<div><element-one /><element-two /></div>`
798
+ * newVNode: `<div><element-two /><element-one /></div>`
799
+ *
800
+ * If we find cases like this then we also need to move the concrete DOM
801
+ * elements corresponding to the moved children to write the re-order to the
802
+ * DOM.
803
+ *
804
+ * 4. Finally, if VNodes have the `key` attribute set on them we check for any
805
+ * nodes in the old children which have the same key as the first element in
806
+ * our window on the new children. If we find such a node we handle calling
807
+ * out to `patch`, moving relevant DOM nodes, and so on, in accordance with
808
+ * what we find.
809
+ *
810
+ * Finally, once we've narrowed our 'windows' to the point that either of them
811
+ * collapse (i.e. they have length 0) we then handle any remaining VNode
812
+ * insertion or deletion that needs to happen to get a DOM state that correctly
813
+ * reflects the new child VNodes. If, for instance, after our window on the old
814
+ * children has collapsed we still have more nodes on the new children that
815
+ * we haven't dealt with yet then we need to add them, or if the new children
816
+ * collapse but we still have unhandled _old_ children then we need to make
817
+ * sure the corresponding DOM nodes are removed.
818
+ *
819
+ * @param parentElm the node into which the parent VNode is rendered
820
+ * @param oldCh the old children of the parent node
821
+ * @param newVNode the new VNode which will replace the parent
822
+ * @param newCh the new children of the parent node
823
+ */
824
+ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
825
+ let oldStartIdx = 0;
826
+ let newStartIdx = 0;
827
+ let idxInOld = 0;
828
+ let i = 0;
829
+ let oldEndIdx = oldCh.length - 1;
830
+ let oldStartVnode = oldCh[0];
831
+ let oldEndVnode = oldCh[oldEndIdx];
832
+ let newEndIdx = newCh.length - 1;
833
+ let newStartVnode = newCh[0];
834
+ let newEndVnode = newCh[newEndIdx];
835
+ let node;
836
+ let elmToMove;
837
+ while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
838
+ if (oldStartVnode == null) {
839
+ // VNode might have been moved left
840
+ oldStartVnode = oldCh[++oldStartIdx];
841
+ }
842
+ else if (oldEndVnode == null) {
843
+ oldEndVnode = oldCh[--oldEndIdx];
844
+ }
845
+ else if (newStartVnode == null) {
846
+ newStartVnode = newCh[++newStartIdx];
847
+ }
848
+ else if (newEndVnode == null) {
849
+ newEndVnode = newCh[--newEndIdx];
850
+ }
851
+ else if (isSameVnode(oldStartVnode, newStartVnode)) {
852
+ // if the start nodes are the same then we should patch the new VNode
853
+ // onto the old one, and increment our `newStartIdx` and `oldStartIdx`
854
+ // indices to reflect that. We don't need to move any DOM Nodes around
855
+ // since things are matched up in order.
856
+ patch(oldStartVnode, newStartVnode);
857
+ oldStartVnode = oldCh[++oldStartIdx];
858
+ newStartVnode = newCh[++newStartIdx];
859
+ }
860
+ else if (isSameVnode(oldEndVnode, newEndVnode)) {
861
+ // likewise, if the end nodes are the same we patch new onto old and
862
+ // decrement our end indices, and also likewise in this case we don't
863
+ // need to move any DOM Nodes.
864
+ patch(oldEndVnode, newEndVnode);
865
+ oldEndVnode = oldCh[--oldEndIdx];
866
+ newEndVnode = newCh[--newEndIdx];
867
+ }
868
+ else if (isSameVnode(oldStartVnode, newEndVnode)) {
869
+ // case: "Vnode moved right"
870
+ //
871
+ // We've found that the last node in our window on the new children is
872
+ // the same VNode as the _first_ node in our window on the old children
873
+ // we're dealing with now. Visually, this is the layout of these two
874
+ // nodes:
875
+ //
876
+ // newCh: [..., newStartVnode , ... , newEndVnode , ...]
877
+ // ^^^^^^^^^^^
878
+ // oldCh: [..., oldStartVnode , ... , oldEndVnode , ...]
879
+ // ^^^^^^^^^^^^^
880
+ //
881
+ // In this situation we need to patch `newEndVnode` onto `oldStartVnode`
882
+ // and move the DOM element for `oldStartVnode`.
883
+ if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
884
+ putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
885
+ }
886
+ patch(oldStartVnode, newEndVnode);
887
+ // We need to move the element for `oldStartVnode` into a position which
888
+ // will be appropriate for `newEndVnode`. For this we can use
889
+ // `.insertBefore` and `oldEndVnode.$elm$.nextSibling`. If there is a
890
+ // sibling for `oldEndVnode.$elm$` then we want to move the DOM node for
891
+ // `oldStartVnode` between `oldEndVnode` and it's sibling, like so:
892
+ //
893
+ // <old-start-node />
894
+ // <some-intervening-node />
895
+ // <old-end-node />
896
+ // <!-- -> <-- `oldStartVnode.$elm$` should be inserted here
897
+ // <next-sibling />
898
+ //
899
+ // If instead `oldEndVnode.$elm$` has no sibling then we just want to put
900
+ // the node for `oldStartVnode` at the end of the children of
901
+ // `parentElm`. Luckily, `Node.nextSibling` will return `null` if there
902
+ // aren't any siblings, and passing `null` to `Node.insertBefore` will
903
+ // append it to the children of the parent element.
904
+ parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
905
+ oldStartVnode = oldCh[++oldStartIdx];
906
+ newEndVnode = newCh[--newEndIdx];
907
+ }
908
+ else if (isSameVnode(oldEndVnode, newStartVnode)) {
909
+ // case: "Vnode moved left"
910
+ //
911
+ // We've found that the first node in our window on the new children is
912
+ // the same VNode as the _last_ node in our window on the old children.
913
+ // Visually, this is the layout of these two nodes:
914
+ //
915
+ // newCh: [..., newStartVnode , ... , newEndVnode , ...]
916
+ // ^^^^^^^^^^^^^
917
+ // oldCh: [..., oldStartVnode , ... , oldEndVnode , ...]
918
+ // ^^^^^^^^^^^
919
+ //
920
+ // In this situation we need to patch `newStartVnode` onto `oldEndVnode`
921
+ // (which will handle updating any changed attributes, reconciling their
922
+ // children etc) but we also need to move the DOM node to which
923
+ // `oldEndVnode` corresponds.
924
+ if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
925
+ putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
926
+ }
927
+ patch(oldEndVnode, newStartVnode);
928
+ // We've already checked above if `oldStartVnode` and `newStartVnode` are
929
+ // the same node, so since we're here we know that they are not. Thus we
930
+ // can move the element for `oldEndVnode` _before_ the element for
931
+ // `oldStartVnode`, leaving `oldStartVnode` to be reconciled in the
932
+ // future.
933
+ parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
934
+ oldEndVnode = oldCh[--oldEndIdx];
935
+ newStartVnode = newCh[++newStartIdx];
936
+ }
937
+ else {
938
+ // Here we do some checks to match up old and new nodes based on the
939
+ // `$key$` attribute, which is set by putting a `key="my-key"` attribute
940
+ // in the JSX for a DOM element in the implementation of a Stencil
941
+ // component.
942
+ //
943
+ // First we check to see if there are any nodes in the array of old
944
+ // children which have the same key as the first node in the new
945
+ // children.
946
+ idxInOld = -1;
947
+ {
948
+ for (i = oldStartIdx; i <= oldEndIdx; ++i) {
949
+ if (oldCh[i] && oldCh[i].$key$ !== null && oldCh[i].$key$ === newStartVnode.$key$) {
950
+ idxInOld = i;
951
+ break;
952
+ }
953
+ }
954
+ }
955
+ if (idxInOld >= 0) {
956
+ // We found a node in the old children which matches up with the first
957
+ // node in the new children! So let's deal with that
958
+ elmToMove = oldCh[idxInOld];
959
+ if (elmToMove.$tag$ !== newStartVnode.$tag$) {
960
+ // the tag doesn't match so we'll need a new DOM element
961
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld, parentElm);
962
+ }
963
+ else {
964
+ patch(elmToMove, newStartVnode);
965
+ // invalidate the matching old node so that we won't try to update it
966
+ // again later on
967
+ oldCh[idxInOld] = undefined;
968
+ node = elmToMove.$elm$;
969
+ }
970
+ newStartVnode = newCh[++newStartIdx];
971
+ }
972
+ else {
973
+ // We either didn't find an element in the old children that matches
974
+ // the key of the first new child OR the build is not using `key`
975
+ // attributes at all. In either case we need to create a new element
976
+ // for the new node.
977
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx, parentElm);
978
+ newStartVnode = newCh[++newStartIdx];
979
+ }
980
+ if (node) {
981
+ // if we created a new node then handle inserting it to the DOM
982
+ {
983
+ parentReferenceNode(oldStartVnode.$elm$).insertBefore(node, referenceNode(oldStartVnode.$elm$));
984
+ }
985
+ }
986
+ }
987
+ }
988
+ if (oldStartIdx > oldEndIdx) {
989
+ // we have some more new nodes to add which don't match up with old nodes
990
+ addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx);
991
+ }
992
+ else if (newStartIdx > newEndIdx) {
993
+ // there are nodes in the `oldCh` array which no longer correspond to nodes
994
+ // in the new array, so lets remove them (which entails cleaning up the
995
+ // relevant DOM nodes)
996
+ removeVnodes(oldCh, oldStartIdx, oldEndIdx);
997
+ }
998
+ };
999
+ /**
1000
+ * Compare two VNodes to determine if they are the same
1001
+ *
1002
+ * **NB**: This function is an equality _heuristic_ based on the available
1003
+ * information set on the two VNodes and can be misleading under certain
1004
+ * circumstances. In particular, if the two nodes do not have `key` attrs
1005
+ * (available under `$key$` on VNodes) then the function falls back on merely
1006
+ * checking that they have the same tag.
1007
+ *
1008
+ * So, in other words, if `key` attrs are not set on VNodes which may be
1009
+ * changing order within a `children` array or something along those lines then
1010
+ * we could obtain a false negative and then have to do needless re-rendering
1011
+ * (i.e. we'd say two VNodes aren't equal when in fact they should be).
1012
+ *
1013
+ * @param leftVNode the first VNode to check
1014
+ * @param rightVNode the second VNode to check
1015
+ * @returns whether they're equal or not
1016
+ */
1017
+ const isSameVnode = (leftVNode, rightVNode) => {
1018
+ // compare if two vnode to see if they're "technically" the same
1019
+ // need to have the same element tag, and same key to be the same
1020
+ if (leftVNode.$tag$ === rightVNode.$tag$) {
1021
+ if (leftVNode.$tag$ === 'slot') {
1022
+ return leftVNode.$name$ === rightVNode.$name$;
1023
+ }
1024
+ // this will be set if components in the build have `key` attrs set on them
1025
+ {
1026
+ return leftVNode.$key$ === rightVNode.$key$;
1027
+ }
1028
+ }
1029
+ return false;
1030
+ };
1031
+ const referenceNode = (node) => {
1032
+ // this node was relocated to a new location in the dom
1033
+ // because of some other component's slot
1034
+ // but we still have an html comment in place of where
1035
+ // it's original location was according to it's original vdom
1036
+ return (node && node['s-ol']) || node;
1037
+ };
1038
+ const parentReferenceNode = (node) => (node['s-ol'] ? node['s-ol'] : node).parentNode;
1039
+ /**
1040
+ * Handle reconciling an outdated VNode with a new one which corresponds to
1041
+ * it. This function handles flushing updates to the DOM and reconciling the
1042
+ * children of the two nodes (if any).
1043
+ *
1044
+ * @param oldVNode an old VNode whose DOM element and children we want to update
1045
+ * @param newVNode a new VNode representing an updated version of the old one
1046
+ */
1047
+ const patch = (oldVNode, newVNode) => {
1048
+ const elm = (newVNode.$elm$ = oldVNode.$elm$);
1049
+ const oldChildren = oldVNode.$children$;
1050
+ const newChildren = newVNode.$children$;
1051
+ const tag = newVNode.$tag$;
1052
+ const text = newVNode.$text$;
1053
+ let defaultHolder;
1054
+ if (text === null) {
1055
+ {
1056
+ // test if we're rendering an svg element, or still rendering nodes inside of one
1057
+ // only add this to the when the compiler sees we're using an svg somewhere
1058
+ isSvgMode = tag === 'svg' ? true : tag === 'foreignObject' ? false : isSvgMode;
1059
+ }
1060
+ {
1061
+ if (tag === 'slot')
1062
+ ;
1063
+ else {
1064
+ // either this is the first render of an element OR it's an update
1065
+ // AND we already know it's possible it could have changed
1066
+ // this updates the element's css classes, attrs, props, listeners, etc.
1067
+ updateElement(oldVNode, newVNode, isSvgMode);
1068
+ }
1069
+ }
1070
+ if (oldChildren !== null && newChildren !== null) {
1071
+ // looks like there's child vnodes for both the old and new vnodes
1072
+ // so we need to call `updateChildren` to reconcile them
1073
+ updateChildren(elm, oldChildren, newVNode, newChildren);
1074
+ }
1075
+ else if (newChildren !== null) {
1076
+ // no old child vnodes, but there are new child vnodes to add
1077
+ if (oldVNode.$text$ !== null) {
1078
+ // the old vnode was text, so be sure to clear it out
1079
+ elm.textContent = '';
1080
+ }
1081
+ // add the new vnode children
1082
+ addVnodes(elm, null, newVNode, newChildren, 0, newChildren.length - 1);
1083
+ }
1084
+ else if (oldChildren !== null) {
1085
+ // no new child vnodes, but there are old child vnodes to remove
1086
+ removeVnodes(oldChildren, 0, oldChildren.length - 1);
1087
+ }
1088
+ if (isSvgMode && tag === 'svg') {
1089
+ isSvgMode = false;
1090
+ }
1091
+ }
1092
+ else if ((defaultHolder = elm['s-cr'])) {
1093
+ // this element has slotted content
1094
+ defaultHolder.parentNode.textContent = text;
1095
+ }
1096
+ else if (oldVNode.$text$ !== text) {
1097
+ // update the text content for the text only vnode
1098
+ // and also only if the text is different than before
1099
+ elm.data = text;
1100
+ }
1101
+ };
1102
+ const updateFallbackSlotVisibility = (elm) => {
1103
+ // tslint:disable-next-line: prefer-const
1104
+ const childNodes = elm.childNodes;
1105
+ let childNode;
1106
+ let i;
1107
+ let ilen;
1108
+ let j;
1109
+ let slotNameAttr;
1110
+ let nodeType;
1111
+ for (i = 0, ilen = childNodes.length; i < ilen; i++) {
1112
+ childNode = childNodes[i];
1113
+ if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
1114
+ if (childNode['s-sr']) {
1115
+ // this is a slot fallback node
1116
+ // get the slot name for this slot reference node
1117
+ slotNameAttr = childNode['s-sn'];
1118
+ // by default always show a fallback slot node
1119
+ // then hide it if there are other slots in the light dom
1120
+ childNode.hidden = false;
1121
+ for (j = 0; j < ilen; j++) {
1122
+ nodeType = childNodes[j].nodeType;
1123
+ if (childNodes[j]['s-hn'] !== childNode['s-hn'] || slotNameAttr !== '') {
1124
+ // this sibling node is from a different component OR is a named fallback slot node
1125
+ if (nodeType === 1 /* NODE_TYPE.ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {
1126
+ childNode.hidden = true;
1127
+ break;
1128
+ }
1129
+ }
1130
+ else {
1131
+ // this is a default fallback slot node
1132
+ // any element or text node (with content)
1133
+ // should hide the default fallback slot node
1134
+ if (nodeType === 1 /* NODE_TYPE.ElementNode */ ||
1135
+ (nodeType === 3 /* NODE_TYPE.TextNode */ && childNodes[j].textContent.trim() !== '')) {
1136
+ childNode.hidden = true;
1137
+ break;
1138
+ }
1139
+ }
1140
+ }
1141
+ }
1142
+ // keep drilling down
1143
+ updateFallbackSlotVisibility(childNode);
1144
+ }
1145
+ }
1146
+ };
1147
+ const relocateNodes = [];
1148
+ const relocateSlotContent = (elm) => {
1149
+ // tslint:disable-next-line: prefer-const
1150
+ let childNode;
1151
+ let node;
1152
+ let hostContentNodes;
1153
+ let slotNameAttr;
1154
+ let relocateNodeData;
1155
+ let j;
1156
+ let i = 0;
1157
+ const childNodes = elm.childNodes;
1158
+ const ilen = childNodes.length;
1159
+ for (; i < ilen; i++) {
1160
+ childNode = childNodes[i];
1161
+ if (childNode['s-sr'] && (node = childNode['s-cr']) && node.parentNode) {
1162
+ // first got the content reference comment node
1163
+ // then we got it's parent, which is where all the host content is in now
1164
+ hostContentNodes = node.parentNode.childNodes;
1165
+ slotNameAttr = childNode['s-sn'];
1166
+ for (j = hostContentNodes.length - 1; j >= 0; j--) {
1167
+ node = hostContentNodes[j];
1168
+ if (!node['s-cn'] && !node['s-nr'] && node['s-hn'] !== childNode['s-hn']) {
1169
+ // let's do some relocating to its new home
1170
+ // but never relocate a content reference node
1171
+ // that is suppose to always represent the original content location
1172
+ if (isNodeLocatedInSlot(node, slotNameAttr)) {
1173
+ // it's possible we've already decided to relocate this node
1174
+ relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
1175
+ // made some changes to slots
1176
+ // let's make sure we also double check
1177
+ // fallbacks are correctly hidden or shown
1178
+ checkSlotFallbackVisibility = true;
1179
+ node['s-sn'] = node['s-sn'] || slotNameAttr;
1180
+ if (relocateNodeData) {
1181
+ // previously we never found a slot home for this node
1182
+ // but turns out we did, so let's remember it now
1183
+ relocateNodeData.$slotRefNode$ = childNode;
1184
+ }
1185
+ else {
1186
+ // add to our list of nodes to relocate
1187
+ relocateNodes.push({
1188
+ $slotRefNode$: childNode,
1189
+ $nodeToRelocate$: node,
1190
+ });
1191
+ }
1192
+ if (node['s-sr']) {
1193
+ relocateNodes.map((relocateNode) => {
1194
+ if (isNodeLocatedInSlot(relocateNode.$nodeToRelocate$, node['s-sn'])) {
1195
+ relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
1196
+ if (relocateNodeData && !relocateNode.$slotRefNode$) {
1197
+ relocateNode.$slotRefNode$ = relocateNodeData.$slotRefNode$;
1198
+ }
1199
+ }
1200
+ });
1201
+ }
1202
+ }
1203
+ else if (!relocateNodes.some((r) => r.$nodeToRelocate$ === node)) {
1204
+ // so far this element does not have a slot home, not setting slotRefNode on purpose
1205
+ // if we never find a home for this element then we'll need to hide it
1206
+ relocateNodes.push({
1207
+ $nodeToRelocate$: node,
1208
+ });
1209
+ }
1210
+ }
1211
+ }
1212
+ }
1213
+ if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
1214
+ relocateSlotContent(childNode);
1215
+ }
1216
+ }
1217
+ };
1218
+ const isNodeLocatedInSlot = (nodeToRelocate, slotNameAttr) => {
1219
+ if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
1220
+ if (nodeToRelocate.getAttribute('slot') === null && slotNameAttr === '') {
1221
+ return true;
1222
+ }
1223
+ if (nodeToRelocate.getAttribute('slot') === slotNameAttr) {
1224
+ return true;
1225
+ }
1226
+ return false;
1227
+ }
1228
+ if (nodeToRelocate['s-sn'] === slotNameAttr) {
1229
+ return true;
1230
+ }
1231
+ return slotNameAttr === '';
1232
+ };
1233
+ /**
1234
+ * 'Nullify' any VDom `ref` callbacks on a VDom node or its children by
1235
+ * calling them with `null`. This signals that the DOM element corresponding to
1236
+ * the VDom node has been removed from the DOM.
1237
+ *
1238
+ * @param vNode a virtual DOM node
1239
+ */
1240
+ const nullifyVNodeRefs = (vNode) => {
1241
+ {
1242
+ vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
1243
+ vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
1244
+ }
1245
+ };
1246
+ /**
1247
+ * The main entry point for Stencil's virtual DOM-based rendering engine
1248
+ *
1249
+ * Given a {@link d.HostRef} container and some virtual DOM nodes, this
1250
+ * function will handle creating a virtual DOM tree with a single root, patching
1251
+ * the current virtual DOM tree onto an old one (if any), dealing with slot
1252
+ * relocation, and reflecting attributes.
1253
+ *
1254
+ * @param hostRef data needed to root and render the virtual DOM tree, such as
1255
+ * the DOM node into which it should be rendered.
1256
+ * @param renderFnResults the virtual DOM nodes to be rendered
1257
+ */
1258
+ const renderVdom = (hostRef, renderFnResults) => {
1259
+ const hostElm = hostRef.$hostElement$;
1260
+ const cmpMeta = hostRef.$cmpMeta$;
1261
+ const oldVNode = hostRef.$vnode$ || newVNode(null, null);
1262
+ const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
1263
+ hostTagName = hostElm.tagName;
1264
+ if (cmpMeta.$attrsToReflect$) {
1265
+ rootVnode.$attrs$ = rootVnode.$attrs$ || {};
1266
+ cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
1267
+ }
1268
+ rootVnode.$tag$ = null;
1269
+ rootVnode.$flags$ |= 4 /* VNODE_FLAGS.isHost */;
1270
+ hostRef.$vnode$ = rootVnode;
1271
+ rootVnode.$elm$ = oldVNode.$elm$ = (hostElm.shadowRoot || hostElm );
1272
+ {
1273
+ scopeId = hostElm['s-sc'];
1274
+ }
1275
+ {
1276
+ contentRef = hostElm['s-cr'];
1277
+ useNativeShadowDom = (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) !== 0;
1278
+ // always reset
1279
+ checkSlotFallbackVisibility = false;
1280
+ }
1281
+ // synchronous patch
1282
+ patch(oldVNode, rootVnode);
1283
+ {
1284
+ // while we're moving nodes around existing nodes, temporarily disable
1285
+ // the disconnectCallback from working
1286
+ plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
1287
+ if (checkSlotRelocate) {
1288
+ relocateSlotContent(rootVnode.$elm$);
1289
+ let relocateData;
1290
+ let nodeToRelocate;
1291
+ let orgLocationNode;
1292
+ let parentNodeRef;
1293
+ let insertBeforeNode;
1294
+ let refNode;
1295
+ let i = 0;
1296
+ for (; i < relocateNodes.length; i++) {
1297
+ relocateData = relocateNodes[i];
1298
+ nodeToRelocate = relocateData.$nodeToRelocate$;
1299
+ if (!nodeToRelocate['s-ol']) {
1300
+ // add a reference node marking this node's original location
1301
+ // keep a reference to this node for later lookups
1302
+ orgLocationNode =
1303
+ doc.createTextNode('');
1304
+ orgLocationNode['s-nr'] = nodeToRelocate;
1305
+ nodeToRelocate.parentNode.insertBefore((nodeToRelocate['s-ol'] = orgLocationNode), nodeToRelocate);
1306
+ }
1307
+ }
1308
+ for (i = 0; i < relocateNodes.length; i++) {
1309
+ relocateData = relocateNodes[i];
1310
+ nodeToRelocate = relocateData.$nodeToRelocate$;
1311
+ if (relocateData.$slotRefNode$) {
1312
+ // by default we're just going to insert it directly
1313
+ // after the slot reference node
1314
+ parentNodeRef = relocateData.$slotRefNode$.parentNode;
1315
+ insertBeforeNode = relocateData.$slotRefNode$.nextSibling;
1316
+ orgLocationNode = nodeToRelocate['s-ol'];
1317
+ while ((orgLocationNode = orgLocationNode.previousSibling)) {
1318
+ refNode = orgLocationNode['s-nr'];
1319
+ if (refNode && refNode['s-sn'] === nodeToRelocate['s-sn'] && parentNodeRef === refNode.parentNode) {
1320
+ refNode = refNode.nextSibling;
1321
+ if (!refNode || !refNode['s-nr']) {
1322
+ insertBeforeNode = refNode;
1323
+ break;
1324
+ }
1325
+ }
1326
+ }
1327
+ if ((!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode) ||
1328
+ nodeToRelocate.nextSibling !== insertBeforeNode) {
1329
+ // we've checked that it's worth while to relocate
1330
+ // since that the node to relocate
1331
+ // has a different next sibling or parent relocated
1332
+ if (nodeToRelocate !== insertBeforeNode) {
1333
+ if (!nodeToRelocate['s-hn'] && nodeToRelocate['s-ol']) {
1334
+ // probably a component in the index.html that doesn't have it's hostname set
1335
+ nodeToRelocate['s-hn'] = nodeToRelocate['s-ol'].parentNode.nodeName;
1336
+ }
1337
+ // add it back to the dom but in its new home
1338
+ parentNodeRef.insertBefore(nodeToRelocate, insertBeforeNode);
1339
+ }
1340
+ }
1341
+ }
1342
+ else {
1343
+ // this node doesn't have a slot home to go to, so let's hide it
1344
+ if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
1345
+ nodeToRelocate.hidden = true;
1346
+ }
1347
+ }
1348
+ }
1349
+ }
1350
+ if (checkSlotFallbackVisibility) {
1351
+ updateFallbackSlotVisibility(rootVnode.$elm$);
1352
+ }
1353
+ // done moving nodes around
1354
+ // allow the disconnect callback to work again
1355
+ plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;
1356
+ // always reset
1357
+ relocateNodes.length = 0;
1358
+ }
1359
+ };
1360
+ const attachToAncestor = (hostRef, ancestorComponent) => {
1361
+ if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
1362
+ ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
1363
+ }
1364
+ };
1365
+ const scheduleUpdate = (hostRef, isInitialLoad) => {
1366
+ {
1367
+ hostRef.$flags$ |= 16 /* HOST_FLAGS.isQueuedForUpdate */;
1368
+ }
1369
+ if (hostRef.$flags$ & 4 /* HOST_FLAGS.isWaitingForChildren */) {
1370
+ hostRef.$flags$ |= 512 /* HOST_FLAGS.needsRerender */;
1371
+ return;
1372
+ }
1373
+ attachToAncestor(hostRef, hostRef.$ancestorComponent$);
1374
+ // there is no ancestor component or the ancestor component
1375
+ // has already fired off its lifecycle update then
1376
+ // fire off the initial update
1377
+ const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
1378
+ return writeTask(dispatch) ;
1379
+ };
1380
+ /**
1381
+ * Dispatch initial-render and update lifecycle hooks, enqueuing calls to
1382
+ * component lifecycle methods like `componentWillLoad` as well as
1383
+ * {@link updateComponent}, which will kick off the virtual DOM re-render.
1384
+ *
1385
+ * @param hostRef a reference to a host DOM node
1386
+ * @param isInitialLoad whether we're on the initial load or not
1387
+ * @returns an empty Promise which is used to enqueue a series of operations for
1388
+ * the component
1389
+ */
1390
+ const dispatchHooks = (hostRef, isInitialLoad) => {
1391
+ const elm = hostRef.$hostElement$;
1392
+ const endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$);
1393
+ const instance = elm;
1394
+ // We're going to use this variable together with `enqueue` to implement a
1395
+ // little promise-based queue. We start out with it `undefined`. When we add
1396
+ // the first function to the queue we'll set this variable to be that
1397
+ // function's return value. When we attempt to add subsequent values to the
1398
+ // queue we'll check that value and, if it was a `Promise`, we'll then chain
1399
+ // the new function off of that `Promise` using `.then()`. This will give our
1400
+ // queue two nice properties:
1401
+ //
1402
+ // 1. If all functions added to the queue are synchronous they'll be called
1403
+ // synchronously right away.
1404
+ // 2. If all functions added to the queue are asynchronous they'll all be
1405
+ // called in order after `dispatchHooks` exits.
1406
+ let maybePromise;
1407
+ if (isInitialLoad) {
1408
+ {
1409
+ // If `componentWillLoad` returns a `Promise` then we want to wait on
1410
+ // whatever's going on in that `Promise` before we launch into
1411
+ // rendering the component, doing other lifecycle stuff, etc. So
1412
+ // in that case we assign the returned promise to the variable we
1413
+ // declared above to hold a possible 'queueing' Promise
1414
+ maybePromise = safeCall(instance, 'componentWillLoad');
1415
+ }
1416
+ }
1417
+ {
1418
+ maybePromise = enqueue(maybePromise, () => safeCall(instance, 'componentWillRender'));
1419
+ }
1420
+ endSchedule();
1421
+ return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
1422
+ };
1423
+ /**
1424
+ * This function uses a Promise to implement a simple first-in, first-out queue
1425
+ * of functions to be called.
1426
+ *
1427
+ * The queue is ordered on the basis of the first argument. If it's
1428
+ * `undefined`, then nothing is on the queue yet, so the provided function can
1429
+ * be called synchronously (although note that this function may return a
1430
+ * `Promise`). The idea is that then the return value of that enqueueing
1431
+ * operation is kept around, so that if it was a `Promise` then subsequent
1432
+ * functions can be enqueued by calling this function again with that `Promise`
1433
+ * as the first argument.
1434
+ *
1435
+ * @param maybePromise either a `Promise` which should resolve before the next function is called or an 'empty' sentinel
1436
+ * @param fn a function to enqueue
1437
+ * @returns either a `Promise` or the return value of the provided function
1438
+ */
1439
+ const enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn) : fn();
1440
+ /**
1441
+ * Check that a value is a `Promise`. To check, we first see if the value is an
1442
+ * instance of the `Promise` global. In a few circumstances, in particular if
1443
+ * the global has been overwritten, this is could be misleading, so we also do
1444
+ * a little 'duck typing' check to see if the `.then` property of the value is
1445
+ * defined and a function.
1446
+ *
1447
+ * @param maybePromise it might be a promise!
1448
+ * @returns whether it is or not
1449
+ */
1450
+ const isPromisey = (maybePromise) => maybePromise instanceof Promise ||
1451
+ (maybePromise && maybePromise.then && typeof maybePromise.then === 'function');
1452
+ const updateComponent = async (hostRef, instance, isInitialLoad) => {
1453
+ var _a;
1454
+ const elm = hostRef.$hostElement$;
1455
+ const endUpdate = createTime('update', hostRef.$cmpMeta$.$tagName$);
1456
+ const rc = elm['s-rc'];
1457
+ if (isInitialLoad) {
1458
+ // DOM WRITE!
1459
+ attachStyles(hostRef);
1460
+ }
1461
+ const endRender = createTime('render', hostRef.$cmpMeta$.$tagName$);
1462
+ {
1463
+ callRender(hostRef, instance);
1464
+ }
1465
+ if (rc) {
1466
+ // ok, so turns out there are some child host elements
1467
+ // waiting on this parent element to load
1468
+ // let's fire off all update callbacks waiting
1469
+ rc.map((cb) => cb());
1470
+ elm['s-rc'] = undefined;
1471
+ }
1472
+ endRender();
1473
+ endUpdate();
1474
+ {
1475
+ const childrenPromises = (_a = elm['s-p']) !== null && _a !== void 0 ? _a : [];
1476
+ const postUpdate = () => postUpdateComponent(hostRef);
1477
+ if (childrenPromises.length === 0) {
1478
+ postUpdate();
1479
+ }
1480
+ else {
1481
+ Promise.all(childrenPromises).then(postUpdate);
1482
+ hostRef.$flags$ |= 4 /* HOST_FLAGS.isWaitingForChildren */;
1483
+ childrenPromises.length = 0;
1484
+ }
1485
+ }
1486
+ };
1487
+ const callRender = (hostRef, instance, elm) => {
1488
+ try {
1489
+ instance = instance.render && instance.render();
1490
+ {
1491
+ hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
1492
+ }
1493
+ {
1494
+ hostRef.$flags$ |= 2 /* HOST_FLAGS.hasRendered */;
1495
+ }
1496
+ {
1497
+ {
1498
+ // looks like we've got child nodes to render into this host element
1499
+ // or we need to update the css class/attrs on the host element
1500
+ // DOM WRITE!
1501
+ {
1502
+ renderVdom(hostRef, instance);
1503
+ }
1504
+ }
1505
+ }
1506
+ }
1507
+ catch (e) {
1508
+ consoleError(e, hostRef.$hostElement$);
1509
+ }
1510
+ return null;
1511
+ };
1512
+ const postUpdateComponent = (hostRef) => {
1513
+ const tagName = hostRef.$cmpMeta$.$tagName$;
1514
+ const elm = hostRef.$hostElement$;
1515
+ const endPostUpdate = createTime('postUpdate', tagName);
1516
+ const instance = elm;
1517
+ const ancestorComponent = hostRef.$ancestorComponent$;
1518
+ {
1519
+ safeCall(instance, 'componentDidRender');
1520
+ }
1521
+ if (!(hostRef.$flags$ & 64 /* HOST_FLAGS.hasLoadedComponent */)) {
1522
+ hostRef.$flags$ |= 64 /* HOST_FLAGS.hasLoadedComponent */;
1523
+ {
1524
+ // DOM WRITE!
1525
+ addHydratedFlag(elm);
1526
+ }
1527
+ {
1528
+ safeCall(instance, 'componentDidLoad');
1529
+ }
1530
+ endPostUpdate();
1531
+ {
1532
+ hostRef.$onReadyResolve$(elm);
1533
+ if (!ancestorComponent) {
1534
+ appDidLoad();
1535
+ }
1536
+ }
1537
+ }
1538
+ else {
1539
+ {
1540
+ safeCall(instance, 'componentDidUpdate');
1541
+ }
1542
+ endPostUpdate();
1543
+ }
1544
+ // load events fire from bottom to top
1545
+ // the deepest elements load first then bubbles up
1546
+ {
1547
+ if (hostRef.$onRenderResolve$) {
1548
+ hostRef.$onRenderResolve$();
1549
+ hostRef.$onRenderResolve$ = undefined;
1550
+ }
1551
+ if (hostRef.$flags$ & 512 /* HOST_FLAGS.needsRerender */) {
1552
+ nextTick(() => scheduleUpdate(hostRef, false));
1553
+ }
1554
+ hostRef.$flags$ &= ~(4 /* HOST_FLAGS.isWaitingForChildren */ | 512 /* HOST_FLAGS.needsRerender */);
1555
+ }
1556
+ // ( •_•)
1557
+ // ( •_•)>⌐■-■
1558
+ // (⌐■_■)
1559
+ };
1560
+ const forceUpdate = (ref) => {
1561
+ {
1562
+ const hostRef = getHostRef(ref);
1563
+ const isConnected = hostRef.$hostElement$.isConnected;
1564
+ if (isConnected &&
1565
+ (hostRef.$flags$ & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) {
1566
+ scheduleUpdate(hostRef, false);
1567
+ }
1568
+ // Returns "true" when the forced update was successfully scheduled
1569
+ return isConnected;
1570
+ }
1571
+ };
1572
+ const appDidLoad = (who) => {
1573
+ // on appload
1574
+ // we have finish the first big initial render
1575
+ {
1576
+ addHydratedFlag(doc.documentElement);
1577
+ }
1578
+ nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
1579
+ };
1580
+ const safeCall = (instance, method, arg) => {
1581
+ if (instance && instance[method]) {
1582
+ try {
1583
+ return instance[method](arg);
1584
+ }
1585
+ catch (e) {
1586
+ consoleError(e);
1587
+ }
1588
+ }
1589
+ return undefined;
1590
+ };
1591
+ const addHydratedFlag = (elm) => elm.classList.add('hydrated')
1592
+ ;
1593
+ const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
1594
+ const setValue = (ref, propName, newVal, cmpMeta) => {
1595
+ // check our new property value against our internal value
1596
+ const hostRef = getHostRef(ref);
1597
+ const elm = ref;
1598
+ const oldVal = hostRef.$instanceValues$.get(propName);
1599
+ const flags = hostRef.$flags$;
1600
+ const instance = elm;
1601
+ newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
1602
+ // explicitly check for NaN on both sides, as `NaN === NaN` is always false
1603
+ const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
1604
+ const didValueChange = newVal !== oldVal && !areBothNaN;
1605
+ if (didValueChange) {
1606
+ // gadzooks! the property's value has changed!!
1607
+ // set our new value!
1608
+ hostRef.$instanceValues$.set(propName, newVal);
1609
+ {
1610
+ // get an array of method names of watch functions to call
1611
+ if (cmpMeta.$watchers$ && flags & 128 /* HOST_FLAGS.isWatchReady */) {
1612
+ const watchMethods = cmpMeta.$watchers$[propName];
1613
+ if (watchMethods) {
1614
+ // this instance is watching for when this property changed
1615
+ watchMethods.map((watchMethodName) => {
1616
+ try {
1617
+ // fire off each of the watch methods that are watching this property
1618
+ instance[watchMethodName](newVal, oldVal, propName);
1619
+ }
1620
+ catch (e) {
1621
+ consoleError(e, elm);
1622
+ }
1623
+ });
1624
+ }
1625
+ }
1626
+ if ((flags & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) {
1627
+ // looks like this value actually changed, so we've got work to do!
1628
+ // but only if we've already rendered, otherwise just chill out
1629
+ // queue that we need to do an update, but don't worry about queuing
1630
+ // up millions cuz this function ensures it only runs once
1631
+ scheduleUpdate(hostRef, false);
1632
+ }
1633
+ }
1634
+ }
1635
+ };
1636
+ /**
1637
+ * Attach a series of runtime constructs to a compiled Stencil component
1638
+ * constructor, including getters and setters for the `@Prop` and `@State`
1639
+ * decorators, callbacks for when attributes change, and so on.
1640
+ *
1641
+ * @param Cstr the constructor for a component that we need to process
1642
+ * @param cmpMeta metadata collected previously about the component
1643
+ * @param flags a number used to store a series of bit flags
1644
+ * @returns a reference to the same constructor passed in (but now mutated)
1645
+ */
1646
+ const proxyComponent = (Cstr, cmpMeta, flags) => {
1647
+ if (cmpMeta.$members$) {
1648
+ if (Cstr.watchers) {
1649
+ cmpMeta.$watchers$ = Cstr.watchers;
1650
+ }
1651
+ // It's better to have a const than two Object.entries()
1652
+ const members = Object.entries(cmpMeta.$members$);
1653
+ const prototype = Cstr.prototype;
1654
+ members.map(([memberName, [memberFlags]]) => {
1655
+ if ((memberFlags & 31 /* MEMBER_FLAGS.Prop */ ||
1656
+ (memberFlags & 32 /* MEMBER_FLAGS.State */))) {
1657
+ // proxyComponent - prop
1658
+ Object.defineProperty(prototype, memberName, {
1659
+ get() {
1660
+ // proxyComponent, get value
1661
+ return getValue(this, memberName);
1662
+ },
1663
+ set(newValue) {
1664
+ // proxyComponent, set value
1665
+ setValue(this, memberName, newValue, cmpMeta);
1666
+ },
1667
+ configurable: true,
1668
+ enumerable: true,
1669
+ });
1670
+ }
1671
+ });
1672
+ {
1673
+ const attrNameToPropName = new Map();
1674
+ prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
1675
+ plt.jmp(() => {
1676
+ const propName = attrNameToPropName.get(attrName);
1677
+ // In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
1678
+ // in the case where an attribute was set inline.
1679
+ // ```html
1680
+ // <my-component some-attribute="some-value"></my-component>
1681
+ // ```
1682
+ //
1683
+ // There is an edge case where a developer sets the attribute inline on a custom element and then
1684
+ // programmatically changes it before it has been upgraded as shown below:
1685
+ //
1686
+ // ```html
1687
+ // <!-- this component has _not_ been upgraded yet -->
1688
+ // <my-component id="test" some-attribute="some-value"></my-component>
1689
+ // <script>
1690
+ // // grab non-upgraded component
1691
+ // el = document.querySelector("#test");
1692
+ // el.someAttribute = "another-value";
1693
+ // // upgrade component
1694
+ // customElements.define('my-component', MyComponent);
1695
+ // </script>
1696
+ // ```
1697
+ // In this case if we do not unshadow here and use the value of the shadowing property, attributeChangedCallback
1698
+ // will be called with `newValue = "some-value"` and will set the shadowed property (this.someAttribute = "another-value")
1699
+ // to the value that was set inline i.e. "some-value" from above example. When
1700
+ // the connectedCallback attempts to unshadow it will use "some-value" as the initial value rather than "another-value"
1701
+ //
1702
+ // The case where the attribute was NOT set inline but was not set programmatically shall be handled/unshadowed
1703
+ // by connectedCallback as this attributeChangedCallback will not fire.
1704
+ //
1705
+ // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
1706
+ //
1707
+ // TODO(STENCIL-16) we should think about whether or not we actually want to be reflecting the attributes to
1708
+ // properties here given that this goes against best practices outlined here
1709
+ // https://developers.google.com/web/fundamentals/web-components/best-practices#avoid-reentrancy
1710
+ if (this.hasOwnProperty(propName)) {
1711
+ newValue = this[propName];
1712
+ delete this[propName];
1713
+ }
1714
+ else if (prototype.hasOwnProperty(propName) &&
1715
+ typeof this[propName] === 'number' &&
1716
+ this[propName] == newValue) {
1717
+ // if the propName exists on the prototype of `Cstr`, this update may be a result of Stencil using native
1718
+ // APIs to reflect props as attributes. Calls to `setAttribute(someElement, propName)` will result in
1719
+ // `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.
1720
+ return;
1721
+ }
1722
+ this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
1723
+ });
1724
+ };
1725
+ // create an array of attributes to observe
1726
+ // and also create a map of html attribute name to js property name
1727
+ Cstr.observedAttributes = members
1728
+ .filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */) // filter to only keep props that should match attributes
1729
+ .map(([propName, m]) => {
1730
+ const attrName = m[1] || propName;
1731
+ attrNameToPropName.set(attrName, propName);
1732
+ if (m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {
1733
+ cmpMeta.$attrsToReflect$.push([propName, attrName]);
1734
+ }
1735
+ return attrName;
1736
+ });
1737
+ }
1738
+ }
1739
+ return Cstr;
1740
+ };
1741
+ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
1742
+ // initializeComponent
1743
+ if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
1744
+ // Let the runtime know that the component has been initialized
1745
+ hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
1746
+ {
1747
+ // sync constructor component
1748
+ Cstr = elm.constructor;
1749
+ // wait for the CustomElementRegistry to mark the component as ready before setting `isWatchReady`. Otherwise,
1750
+ // watchers may fire prematurely if `customElements.get()`/`customElements.whenDefined()` resolves _before_
1751
+ // Stencil has completed instantiating the component.
1752
+ customElements.whenDefined(cmpMeta.$tagName$).then(() => (hostRef.$flags$ |= 128 /* HOST_FLAGS.isWatchReady */));
1753
+ }
1754
+ if (Cstr.style) {
1755
+ // this component has styles but we haven't registered them yet
1756
+ let style = Cstr.style;
1757
+ if (typeof style !== 'string') {
1758
+ style = style[(hostRef.$modeName$ = computeMode(elm))];
1759
+ }
1760
+ const scopeId = getScopeId(cmpMeta, hostRef.$modeName$);
1761
+ if (!styles.has(scopeId)) {
1762
+ const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);
1763
+ registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */));
1764
+ endRegisterStyles();
1765
+ }
1766
+ }
1767
+ }
1768
+ // we've successfully created a lazy instance
1769
+ const ancestorComponent = hostRef.$ancestorComponent$;
1770
+ const schedule = () => scheduleUpdate(hostRef, true);
1771
+ if (ancestorComponent && ancestorComponent['s-rc']) {
1772
+ // this is the initial load and this component it has an ancestor component
1773
+ // but the ancestor component has NOT fired its will update lifecycle yet
1774
+ // so let's just cool our jets and wait for the ancestor to continue first
1775
+ // this will get fired off when the ancestor component
1776
+ // finally gets around to rendering its lazy self
1777
+ // fire off the initial update
1778
+ ancestorComponent['s-rc'].push(schedule);
1779
+ }
1780
+ else {
1781
+ schedule();
1782
+ }
1783
+ };
1784
+ const connectedCallback = (elm) => {
1785
+ if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
1786
+ const hostRef = getHostRef(elm);
1787
+ const cmpMeta = hostRef.$cmpMeta$;
1788
+ const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);
1789
+ if (!(hostRef.$flags$ & 1 /* HOST_FLAGS.hasConnected */)) {
1790
+ // first time this component has connected
1791
+ hostRef.$flags$ |= 1 /* HOST_FLAGS.hasConnected */;
1792
+ {
1793
+ // initUpdate
1794
+ // if the slot polyfill is required we'll need to put some nodes
1795
+ // in here to act as original content anchors as we move nodes around
1796
+ // host element has been connected to the DOM
1797
+ if ((// TODO(STENCIL-662): Remove code related to deprecated shadowDomShim field
1798
+ cmpMeta.$flags$ & (4 /* CMP_FLAGS.hasSlotRelocation */ | 8 /* CMP_FLAGS.needsShadowDomShim */))) {
1799
+ setContentReference(elm);
1800
+ }
1801
+ }
1802
+ {
1803
+ // find the first ancestor component (if there is one) and register
1804
+ // this component as one of the actively loading child components for its ancestor
1805
+ let ancestorComponent = elm;
1806
+ while ((ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host)) {
1807
+ // climb up the ancestors looking for the first
1808
+ // component that hasn't finished its lifecycle update yet
1809
+ if (ancestorComponent['s-p']) {
1810
+ // we found this components first ancestor component
1811
+ // keep a reference to this component's ancestor component
1812
+ attachToAncestor(hostRef, (hostRef.$ancestorComponent$ = ancestorComponent));
1813
+ break;
1814
+ }
1815
+ }
1816
+ }
1817
+ // Lazy properties
1818
+ // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
1819
+ if (cmpMeta.$members$) {
1820
+ Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
1821
+ if (memberFlags & 31 /* MEMBER_FLAGS.Prop */ && elm.hasOwnProperty(memberName)) {
1822
+ const value = elm[memberName];
1823
+ delete elm[memberName];
1824
+ elm[memberName] = value;
1825
+ }
1826
+ });
1827
+ }
1828
+ {
1829
+ initializeComponent(elm, hostRef, cmpMeta);
1830
+ }
1831
+ }
1832
+ else {
1833
+ // not the first time this has connected
1834
+ // reattach any event listeners to the host
1835
+ // since they would have been removed when disconnected
1836
+ addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1837
+ }
1838
+ endConnected();
1839
+ }
1840
+ };
1841
+ const setContentReference = (elm) => {
1842
+ // only required when we're NOT using native shadow dom (slot)
1843
+ // or this browser doesn't support native shadow dom
1844
+ // and this host element was NOT created with SSR
1845
+ // let's pick out the inner content for slot projection
1846
+ // create a node to represent where the original
1847
+ // content was first placed, which is useful later on
1848
+ const contentRefElm = (elm['s-cr'] = doc.createComment(''));
1849
+ contentRefElm['s-cn'] = true;
1850
+ elm.insertBefore(contentRefElm, elm.firstChild);
1851
+ };
1852
+ const disconnectedCallback = (elm) => {
1853
+ if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
1854
+ const hostRef = getHostRef(elm);
1855
+ {
1856
+ if (hostRef.$rmListeners$) {
1857
+ hostRef.$rmListeners$.map((rmListener) => rmListener());
1858
+ hostRef.$rmListeners$ = undefined;
1859
+ }
1860
+ }
1861
+ }
1862
+ };
1863
+ const proxyCustomElement = (Cstr, compactMeta) => {
1864
+ const cmpMeta = {
1865
+ $flags$: compactMeta[0],
1866
+ $tagName$: compactMeta[1],
1867
+ };
1868
+ {
1869
+ cmpMeta.$members$ = compactMeta[2];
1870
+ }
1871
+ {
1872
+ cmpMeta.$listeners$ = compactMeta[3];
1873
+ }
1874
+ {
1875
+ cmpMeta.$watchers$ = Cstr.$watchers$;
1876
+ }
1877
+ {
1878
+ cmpMeta.$attrsToReflect$ = [];
1879
+ }
1880
+ const originalConnectedCallback = Cstr.prototype.connectedCallback;
1881
+ const originalDisconnectedCallback = Cstr.prototype.disconnectedCallback;
1882
+ Object.assign(Cstr.prototype, {
1883
+ __registerHost() {
1884
+ registerHost(this, cmpMeta);
1885
+ },
1886
+ connectedCallback() {
1887
+ connectedCallback(this);
1888
+ if (originalConnectedCallback) {
1889
+ originalConnectedCallback.call(this);
1890
+ }
1891
+ },
1892
+ disconnectedCallback() {
1893
+ disconnectedCallback(this);
1894
+ if (originalDisconnectedCallback) {
1895
+ originalDisconnectedCallback.call(this);
1896
+ }
1897
+ },
1898
+ __attachShadow() {
1899
+ {
1900
+ {
1901
+ this.attachShadow({
1902
+ mode: 'open',
1903
+ delegatesFocus: !!(cmpMeta.$flags$ & 16 /* CMP_FLAGS.shadowDelegatesFocus */),
1904
+ });
1905
+ }
1906
+ }
1907
+ },
1908
+ });
1909
+ Cstr.is = cmpMeta.$tagName$;
1910
+ return proxyComponent(Cstr, cmpMeta);
1911
+ };
1912
+ const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
1913
+ if (listeners) {
1914
+ listeners.map(([flags, name, method]) => {
1915
+ const target = getHostListenerTarget(elm, flags) ;
1916
+ const handler = hostListenerProxy(hostRef, method);
1917
+ const opts = hostListenerOpts(flags);
1918
+ plt.ael(target, name, handler, opts);
1919
+ (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
1920
+ });
1921
+ }
1922
+ };
1923
+ const hostListenerProxy = (hostRef, methodName) => (ev) => {
1924
+ try {
1925
+ {
1926
+ hostRef.$hostElement$[methodName](ev);
1927
+ }
1928
+ }
1929
+ catch (e) {
1930
+ consoleError(e);
1931
+ }
1932
+ };
1933
+ const getHostListenerTarget = (elm, flags) => {
1934
+ if (flags & 4 /* LISTENER_FLAGS.TargetDocument */)
1935
+ return doc;
1936
+ if (flags & 8 /* LISTENER_FLAGS.TargetWindow */)
1937
+ return win;
1938
+ if (flags & 16 /* LISTENER_FLAGS.TargetBody */)
1939
+ return doc.body;
1940
+ return elm;
1941
+ };
1942
+ // prettier-ignore
1943
+ const hostListenerOpts = (flags) => (flags & 2 /* LISTENER_FLAGS.Capture */) !== 0;
1944
+ /**
1945
+ * Assigns the given value to the nonce property on the runtime platform object.
1946
+ * During runtime, this value is used to set the nonce attribute on all dynamically created script and style tags.
1947
+ * @param nonce The value to be assigned to the platform nonce property.
1948
+ * @returns void
1949
+ */
1950
+ const setNonce = (nonce) => (plt.$nonce$ = nonce);
1951
+ const setPlatformOptions = (opts) => Object.assign(plt, opts);
1952
+ const hostRefs = /*@__PURE__*/ new WeakMap();
1953
+ const getHostRef = (ref) => hostRefs.get(ref);
1954
+ const registerHost = (elm, cmpMeta) => {
1955
+ const hostRef = {
1956
+ $flags$: 0,
1957
+ $hostElement$: elm,
1958
+ $cmpMeta$: cmpMeta,
1959
+ $instanceValues$: new Map(),
1960
+ };
1961
+ {
1962
+ hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
1963
+ elm['s-p'] = [];
1964
+ elm['s-rc'] = [];
1965
+ }
1966
+ addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1967
+ return hostRefs.set(elm, hostRef);
1968
+ };
1969
+ const isMemberInElement = (elm, memberName) => memberName in elm;
1970
+ const consoleError = (e, el) => (0, console.error)(e, el);
1971
+ const styles = /*@__PURE__*/ new Map();
1972
+ const modeResolutionChain = [];
1973
+ const win = typeof window !== 'undefined' ? window : {};
1974
+ const doc = win.document || { head: {} };
1975
+ const H = (win.HTMLElement || class {
1976
+ });
1977
+ const plt = {
1978
+ $flags$: 0,
1979
+ $resourcesUrl$: '',
1980
+ jmp: (h) => h(),
1981
+ raf: (h) => requestAnimationFrame(h),
1982
+ ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
1983
+ rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
1984
+ ce: (eventName, opts) => new CustomEvent(eventName, opts),
1985
+ };
1986
+ const promiseResolve = (v) => Promise.resolve(v);
1987
+ const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
1988
+ try {
1989
+ new CSSStyleSheet();
1990
+ return typeof new CSSStyleSheet().replaceSync === 'function';
1991
+ }
1992
+ catch (e) { }
1993
+ return false;
1994
+ })()
1995
+ ;
1996
+ const queueDomReads = [];
1997
+ const queueDomWrites = [];
1998
+ const queueTask = (queue, write) => (cb) => {
1999
+ queue.push(cb);
2000
+ if (!queuePending) {
2001
+ queuePending = true;
2002
+ if (write && plt.$flags$ & 4 /* PLATFORM_FLAGS.queueSync */) {
2003
+ nextTick(flush);
2004
+ }
2005
+ else {
2006
+ plt.raf(flush);
2007
+ }
2008
+ }
2009
+ };
2010
+ const consume = (queue) => {
2011
+ for (let i = 0; i < queue.length; i++) {
2012
+ try {
2013
+ queue[i](performance.now());
2014
+ }
2015
+ catch (e) {
2016
+ consoleError(e);
2017
+ }
2018
+ }
2019
+ queue.length = 0;
2020
+ };
2021
+ const flush = () => {
2022
+ // always force a bunch of medium callbacks to run, but still have
2023
+ // a throttle on how many can run in a certain time
2024
+ // DOM READS!!!
2025
+ consume(queueDomReads);
2026
+ // DOM WRITES!!!
2027
+ {
2028
+ consume(queueDomWrites);
2029
+ if ((queuePending = queueDomReads.length > 0)) {
2030
+ // still more to do yet, but we've run out of time
2031
+ // let's let this thing cool off and try again in the next tick
2032
+ plt.raf(flush);
2033
+ }
2034
+ }
2035
+ };
2036
+ const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
2037
+ const readTask = /*@__PURE__*/ queueTask(queueDomReads, false);
2038
+ const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
2039
+
2040
+ export { H, setNonce as a, setPlatformOptions as b, createEvent as c, Host as d, forceUpdate as f, h, proxyCustomElement as p, readTask as r, setAssetPath as s, writeTask as w };