@watermarkinsights/ripple 5.16.0-alpha.12 → 5.16.0-alpha.13

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 (307) hide show
  1. package/dist/cjs/app-globals-9NXIHgu3.js +7 -0
  2. package/dist/cjs/{chartFunctions-ce91b2c9.js → chartFunctions-DFMB7Bjs.js} +2 -3
  3. package/dist/cjs/{functions-ea3eae05.js → functions-Cv4tH2z-.js} +74 -79
  4. package/dist/cjs/{index-788526f5.js → index-H4E3eeKZ.js} +777 -410
  5. package/dist/cjs/{intl-ea56dd40.js → intl-CDsbzEBp.js} +1 -1
  6. package/dist/cjs/loader.cjs.js +3 -5
  7. package/dist/cjs/priv-calendar.cjs.entry.js +6 -12
  8. package/dist/cjs/priv-chart-popover.cjs.entry.js +4 -8
  9. package/dist/cjs/priv-navigator-button.cjs.entry.js +2 -5
  10. package/dist/cjs/priv-navigator-item.cjs.entry.js +2 -5
  11. package/dist/cjs/priv-option-list.cjs.entry.js +10 -16
  12. package/dist/cjs/ripple.cjs.js +7 -7
  13. package/dist/cjs/wm-action-menu_2.cjs.entry.js +9 -18
  14. package/dist/cjs/wm-button.cjs.entry.js +8 -16
  15. package/dist/cjs/wm-chart-slice.cjs.entry.js +1 -8
  16. package/dist/cjs/wm-chart.cjs.entry.js +14 -18
  17. package/dist/cjs/wm-date-range.cjs.entry.js +9 -14
  18. package/dist/cjs/wm-datepicker.cjs.entry.js +6 -11
  19. package/dist/cjs/wm-file-list.cjs.entry.js +2 -5
  20. package/dist/cjs/wm-file.cjs.entry.js +5 -15
  21. package/dist/cjs/wm-flyout.cjs.entry.js +5 -16
  22. package/dist/cjs/wm-input.cjs.entry.js +5 -17
  23. package/dist/cjs/wm-line-chart.cjs.entry.js +18 -28
  24. package/dist/cjs/wm-modal-pss_3.cjs.entry.js +8 -14
  25. package/dist/cjs/wm-modal_3.cjs.entry.js +7 -14
  26. package/dist/cjs/wm-navigation_3.cjs.entry.js +9 -18
  27. package/dist/cjs/wm-navigator.cjs.entry.js +17 -15
  28. package/dist/cjs/wm-nested-select.cjs.entry.js +11 -16
  29. package/dist/cjs/wm-optgroup.cjs.entry.js +3 -7
  30. package/dist/cjs/wm-option_2.cjs.entry.js +10 -17
  31. package/dist/cjs/wm-pagination.cjs.entry.js +10 -13
  32. package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +10 -27
  33. package/dist/cjs/wm-search.cjs.entry.js +25 -9
  34. package/dist/cjs/wm-snackbar.cjs.entry.js +8 -10
  35. package/dist/cjs/wm-tab-item_3.cjs.entry.js +20 -16
  36. package/dist/cjs/wm-tag-input.cjs.entry.js +12 -25
  37. package/dist/cjs/wm-tag-option.cjs.entry.js +2 -8
  38. package/dist/cjs/wm-textarea.cjs.entry.js +5 -12
  39. package/dist/cjs/wm-timepicker.cjs.entry.js +9 -14
  40. package/dist/cjs/wm-toggletip.cjs.entry.js +7 -12
  41. package/dist/cjs/wm-uploader.cjs.entry.js +9 -19
  42. package/dist/cjs/wm-wrapper.cjs.entry.js +1 -3
  43. package/dist/collection/collection-manifest.json +2 -2
  44. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +8 -4
  45. package/dist/collection/components/charts/wm-chart/wm-chart-slice.js +15 -12
  46. package/dist/collection/components/charts/wm-chart/wm-chart.js +45 -22
  47. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.js +52 -33
  48. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +23 -16
  49. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +9 -6
  50. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-slice.js +15 -12
  51. package/dist/collection/components/datepickers/priv-calendar/priv-calendar.js +21 -12
  52. package/dist/collection/components/datepickers/wm-date-range.js +39 -19
  53. package/dist/collection/components/datepickers/wm-datepicker.js +27 -13
  54. package/dist/collection/components/selects/priv-option-list/priv-option-list.js +27 -16
  55. package/dist/collection/components/selects/wm-nested-select/wm-nested-select.js +46 -22
  56. package/dist/collection/components/selects/wm-optgroup/wm-optgroup.js +12 -5
  57. package/dist/collection/components/selects/wm-option/wm-option.js +15 -6
  58. package/dist/collection/components/selects/wm-select/wm-select.js +41 -19
  59. package/dist/collection/components/wm-action-menu/wm-action-menu.js +24 -15
  60. package/dist/collection/components/wm-button/wm-button.js +43 -22
  61. package/dist/collection/components/wm-file/wm-file.js +29 -18
  62. package/dist/collection/components/wm-file-list/wm-file-list.js +3 -1
  63. package/dist/collection/components/wm-flyout/wm-flyout.js +31 -19
  64. package/dist/collection/components/wm-input/wm-input.js +55 -28
  65. package/dist/collection/components/wm-menuitem/wm-menuitem.js +10 -4
  66. package/dist/collection/components/wm-modal/wm-modal-footer.js +15 -5
  67. package/dist/collection/components/wm-modal/wm-modal-header.js +6 -2
  68. package/dist/collection/components/wm-modal/wm-modal.js +13 -7
  69. package/dist/collection/components/wm-modal-pss/wm-modal-pss-footer.js +15 -5
  70. package/dist/collection/components/wm-modal-pss/wm-modal-pss-header.js +6 -2
  71. package/dist/collection/components/wm-modal-pss/wm-modal-pss.js +14 -7
  72. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +5 -4
  73. package/dist/collection/components/wm-navigation/wm-navigation-item.js +9 -8
  74. package/dist/collection/components/wm-navigation/wm-navigation.js +4 -2
  75. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +6 -2
  76. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +9 -3
  77. package/dist/collection/components/wm-navigator/wm-navigator.js +34 -15
  78. package/dist/collection/components/wm-pagination/wm-pagination.js +21 -11
  79. package/dist/collection/components/wm-search/wm-search.js +45 -10
  80. package/dist/collection/components/wm-snackbar/wm-snackbar.js +7 -4
  81. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +18 -6
  82. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +9 -6
  83. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +12 -2
  84. package/dist/collection/components/wm-tag-input/wm-tag-input.js +50 -32
  85. package/dist/collection/components/wm-tag-input/wm-tag-option/wm-tag-option.js +18 -10
  86. package/dist/collection/components/wm-textarea/wm-textarea.js +34 -16
  87. package/dist/collection/components/wm-timepicker/wm-timepicker.js +27 -15
  88. package/dist/collection/components/wm-toggletip/wm-toggletip.js +19 -11
  89. package/dist/collection/components/wm-uploader/wm-uploader.css +1 -0
  90. package/dist/collection/components/wm-uploader/wm-uploader.js +37 -22
  91. package/dist/esm/app-globals-BNPUkoUt.js +5 -0
  92. package/dist/esm/{chartFunctions-ebe4f673.js → chartFunctions-BLjGh_yo.js} +3 -4
  93. package/dist/esm/{functions-fbf8519f.js → functions-DT2ztGYg.js} +75 -80
  94. package/dist/esm/{index-130e07bb.js → index-C-E-By4e.js} +774 -406
  95. package/dist/esm/{intl-30a9319d.js → intl-BnrBfoLu.js} +1 -1
  96. package/dist/esm/loader.js +4 -4
  97. package/dist/esm/priv-calendar.entry.js +6 -10
  98. package/dist/esm/priv-chart-popover.entry.js +4 -6
  99. package/dist/esm/priv-navigator-button.entry.js +2 -3
  100. package/dist/esm/priv-navigator-item.entry.js +2 -3
  101. package/dist/esm/priv-option-list.entry.js +10 -14
  102. package/dist/esm/ripple.js +6 -5
  103. package/dist/esm/wm-action-menu_2.entry.js +9 -16
  104. package/dist/esm/wm-button.entry.js +8 -14
  105. package/dist/esm/wm-chart-slice.entry.js +1 -6
  106. package/dist/esm/wm-chart.entry.js +14 -16
  107. package/dist/esm/wm-date-range.entry.js +9 -12
  108. package/dist/esm/wm-datepicker.entry.js +6 -9
  109. package/dist/esm/wm-file-list.entry.js +2 -3
  110. package/dist/esm/wm-file.entry.js +5 -13
  111. package/dist/esm/wm-flyout.entry.js +5 -14
  112. package/dist/esm/wm-input.entry.js +5 -15
  113. package/dist/esm/wm-line-chart.entry.js +18 -26
  114. package/dist/esm/wm-modal-pss_3.entry.js +8 -12
  115. package/dist/esm/wm-modal_3.entry.js +7 -12
  116. package/dist/esm/wm-navigation_3.entry.js +9 -16
  117. package/dist/esm/wm-navigator.entry.js +17 -13
  118. package/dist/esm/wm-nested-select.entry.js +11 -14
  119. package/dist/esm/wm-optgroup.entry.js +3 -5
  120. package/dist/esm/wm-option_2.entry.js +10 -15
  121. package/dist/esm/wm-pagination.entry.js +10 -11
  122. package/dist/esm/wm-progress-indicator_3.entry.js +10 -25
  123. package/dist/esm/wm-search.entry.js +25 -7
  124. package/dist/esm/wm-snackbar.entry.js +8 -8
  125. package/dist/esm/wm-tab-item_3.entry.js +20 -14
  126. package/dist/esm/wm-tag-input.entry.js +12 -23
  127. package/dist/esm/wm-tag-option.entry.js +2 -6
  128. package/dist/esm/wm-textarea.entry.js +5 -10
  129. package/dist/esm/wm-timepicker.entry.js +9 -12
  130. package/dist/esm/wm-toggletip.entry.js +7 -10
  131. package/dist/esm/wm-uploader.entry.js +9 -17
  132. package/dist/esm/wm-wrapper.entry.js +1 -1
  133. package/dist/esm-es5/app-globals-BNPUkoUt.js +1 -0
  134. package/dist/esm-es5/chartFunctions-BLjGh_yo.js +1 -0
  135. package/dist/esm-es5/functions-DT2ztGYg.js +1 -0
  136. package/dist/esm-es5/index-C-E-By4e.js +1 -0
  137. package/dist/esm-es5/{intl-30a9319d.js → intl-BnrBfoLu.js} +1 -1
  138. package/dist/esm-es5/loader.js +1 -1
  139. package/dist/esm-es5/priv-calendar.entry.js +1 -1
  140. package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
  141. package/dist/esm-es5/priv-navigator-button.entry.js +1 -1
  142. package/dist/esm-es5/priv-navigator-item.entry.js +1 -1
  143. package/dist/esm-es5/priv-option-list.entry.js +1 -1
  144. package/dist/esm-es5/ripple.js +1 -1
  145. package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
  146. package/dist/esm-es5/wm-button.entry.js +1 -1
  147. package/dist/esm-es5/wm-chart-slice.entry.js +1 -1
  148. package/dist/esm-es5/wm-chart.entry.js +1 -1
  149. package/dist/esm-es5/wm-date-range.entry.js +1 -1
  150. package/dist/esm-es5/wm-datepicker.entry.js +1 -1
  151. package/dist/esm-es5/wm-file-list.entry.js +1 -1
  152. package/dist/esm-es5/wm-file.entry.js +1 -1
  153. package/dist/esm-es5/wm-flyout.entry.js +1 -1
  154. package/dist/esm-es5/wm-input.entry.js +1 -1
  155. package/dist/esm-es5/wm-line-chart.entry.js +1 -1
  156. package/dist/esm-es5/wm-modal-pss_3.entry.js +1 -1
  157. package/dist/esm-es5/wm-modal_3.entry.js +1 -1
  158. package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
  159. package/dist/esm-es5/wm-navigator.entry.js +1 -1
  160. package/dist/esm-es5/wm-nested-select.entry.js +1 -1
  161. package/dist/esm-es5/wm-optgroup.entry.js +1 -1
  162. package/dist/esm-es5/wm-option_2.entry.js +1 -1
  163. package/dist/esm-es5/wm-pagination.entry.js +1 -1
  164. package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
  165. package/dist/esm-es5/wm-search.entry.js +1 -1
  166. package/dist/esm-es5/wm-snackbar.entry.js +1 -1
  167. package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
  168. package/dist/esm-es5/wm-tag-input.entry.js +1 -1
  169. package/dist/esm-es5/wm-tag-option.entry.js +1 -1
  170. package/dist/esm-es5/wm-textarea.entry.js +1 -1
  171. package/dist/esm-es5/wm-timepicker.entry.js +1 -1
  172. package/dist/esm-es5/wm-toggletip.entry.js +1 -1
  173. package/dist/esm-es5/wm-uploader.entry.js +1 -1
  174. package/dist/esm-es5/wm-wrapper.entry.js +1 -1
  175. package/dist/ripple/{p-5a5d5833.system.entry.js → p-0327a2c8.system.entry.js} +1 -1
  176. package/dist/ripple/{p-8a64e2bd.system.entry.js → p-089abdfc.system.entry.js} +1 -1
  177. package/dist/ripple/{p-31d35d2d.system.entry.js → p-17c731d6.system.entry.js} +1 -1
  178. package/dist/ripple/{p-4df89f8f.entry.js → p-19865407.entry.js} +1 -1
  179. package/dist/ripple/{p-09f61d38.system.entry.js → p-1ca43593.system.entry.js} +1 -1
  180. package/dist/ripple/p-1ccf6d7c.entry.js +1 -0
  181. package/dist/ripple/p-2021c4f7.entry.js +1 -0
  182. package/dist/ripple/p-2be4ae61.entry.js +1 -0
  183. package/dist/ripple/{p-c8d2c849.system.entry.js → p-36b4df18.system.entry.js} +1 -1
  184. package/dist/ripple/p-37f4622f.entry.js +1 -0
  185. package/dist/ripple/p-385147aa.entry.js +1 -0
  186. package/dist/ripple/{p-840ad3a3.system.entry.js → p-3b7bf277.system.entry.js} +1 -1
  187. package/dist/ripple/{p-324aed64.system.entry.js → p-3d0c35c9.system.entry.js} +1 -1
  188. package/dist/ripple/{p-904f4c90.entry.js → p-3f4274a3.entry.js} +1 -1
  189. package/dist/ripple/{p-86c752be.system.entry.js → p-40f123ee.system.entry.js} +1 -1
  190. package/dist/ripple/{p-cd0cc88d.entry.js → p-41d8be2e.entry.js} +1 -1
  191. package/dist/ripple/{p-f3b31fae.entry.js → p-45ab6c4a.entry.js} +1 -1
  192. package/dist/ripple/{p-5f9d81df.system.entry.js → p-478e5069.system.entry.js} +1 -1
  193. package/dist/ripple/{p-5405f9d3.system.entry.js → p-484c87d1.system.entry.js} +1 -1
  194. package/dist/ripple/{p-c242e70f.entry.js → p-4af98b35.entry.js} +1 -1
  195. package/dist/ripple/{p-2a85d4ce.system.entry.js → p-4afb057b.system.entry.js} +1 -1
  196. package/dist/ripple/p-4d32daeb.entry.js +1 -0
  197. package/dist/ripple/{p-924ab54c.entry.js → p-4eb6930b.entry.js} +1 -1
  198. package/dist/ripple/{p-c4b48cd4.system.entry.js → p-540de835.system.entry.js} +1 -1
  199. package/dist/ripple/{p-fde1212a.system.entry.js → p-57885083.system.entry.js} +1 -1
  200. package/dist/ripple/{p-03381d63.system.entry.js → p-5884f2af.system.entry.js} +1 -1
  201. package/dist/ripple/{p-b9d609fb.system.entry.js → p-5cc69165.system.entry.js} +1 -1
  202. package/dist/ripple/p-5d2348b6.entry.js +1 -0
  203. package/dist/ripple/{p-8ee90e17.system.entry.js → p-62f475c1.system.entry.js} +1 -1
  204. package/dist/ripple/{p-34808b52.system.entry.js → p-63dd7bb4.system.entry.js} +1 -1
  205. package/dist/ripple/{p-043901ab.system.entry.js → p-6589b394.system.entry.js} +1 -1
  206. package/dist/ripple/{p-8c33cb29.entry.js → p-68d8df0f.entry.js} +1 -1
  207. package/dist/ripple/p-6aa3d014.entry.js +1 -0
  208. package/dist/ripple/{p-2e10a2dc.system.entry.js → p-6c066023.system.entry.js} +1 -1
  209. package/dist/ripple/{p-6723e469.system.entry.js → p-6ed6019f.system.entry.js} +1 -1
  210. package/dist/ripple/{p-c9e9ce61.system.entry.js → p-70c8d4f4.system.entry.js} +1 -1
  211. package/dist/ripple/{p-4af5ad94.system.entry.js → p-72c61438.system.entry.js} +1 -1
  212. package/dist/ripple/p-7309ba5e.entry.js +1 -0
  213. package/dist/ripple/p-76b54b8a.entry.js +1 -0
  214. package/dist/ripple/p-795ecc2f.entry.js +1 -0
  215. package/dist/ripple/p-885a1fdb.system.entry.js +1 -0
  216. package/dist/ripple/{p-6b4e1fe9.entry.js → p-8ab6b775.entry.js} +1 -1
  217. package/dist/ripple/p-8af9a491.entry.js +1 -0
  218. package/dist/ripple/{p-22d9b079.system.entry.js → p-8d315da3.system.entry.js} +1 -1
  219. package/dist/ripple/{p-f9f9fbae.system.entry.js → p-90052a7f.system.entry.js} +1 -1
  220. package/dist/ripple/p-911907c5.entry.js +1 -0
  221. package/dist/ripple/p-936bee47.entry.js +1 -0
  222. package/dist/ripple/{p-7b06e308.system.entry.js → p-983ab2ad.system.entry.js} +1 -1
  223. package/dist/ripple/p-9d0ca16a.entry.js +1 -0
  224. package/dist/ripple/p-B5BgystP.system.js +2 -0
  225. package/dist/ripple/p-BDF61j7P.system.js +1 -0
  226. package/dist/ripple/p-BUP1pADI.system.js +1 -0
  227. package/dist/ripple/p-Bc1r16wF.js +1 -0
  228. package/dist/ripple/p-C-E-By4e.js +2 -0
  229. package/dist/ripple/p-C4CRgsL9.js +1 -0
  230. package/dist/ripple/{p-9c6bacb9.js → p-ChCup6OE.js} +1 -1
  231. package/dist/ripple/p-D0eZSvEu.system.js +1 -0
  232. package/dist/ripple/p-DT2ztGYg.js +1 -0
  233. package/dist/ripple/p-Dg5uzcYb.system.js +1 -0
  234. package/dist/ripple/{p-e71b1146.system.js → p-LmBQIm9U.system.js} +1 -1
  235. package/dist/ripple/{p-a424e0a7.system.entry.js → p-a60e886d.system.entry.js} +1 -1
  236. package/dist/ripple/p-a82d08f1.entry.js +1 -0
  237. package/dist/ripple/{p-75ad7567.system.entry.js → p-a91703be.system.entry.js} +1 -1
  238. package/dist/ripple/p-ab05d1f0.entry.js +1 -0
  239. package/dist/ripple/p-ab2a734d.entry.js +1 -0
  240. package/dist/ripple/{p-c7a57fc7.entry.js → p-acca480e.entry.js} +1 -1
  241. package/dist/ripple/p-ae00335a.entry.js +1 -0
  242. package/dist/ripple/{p-80664bf3.system.entry.js → p-b125c946.system.entry.js} +1 -1
  243. package/dist/ripple/p-b18d9709.entry.js +1 -0
  244. package/dist/ripple/{p-42174be5.system.entry.js → p-c5688577.system.entry.js} +1 -1
  245. package/dist/ripple/{p-be3213fc.entry.js → p-cb32b5f5.entry.js} +1 -1
  246. package/dist/ripple/{p-086c2905.system.entry.js → p-cb40a99a.system.entry.js} +1 -1
  247. package/dist/ripple/{p-d2b60968.system.entry.js → p-cd9f7986.system.entry.js} +1 -1
  248. package/dist/ripple/{p-12174831.entry.js → p-cfe55c87.entry.js} +1 -1
  249. package/dist/ripple/{p-7c6e0168.entry.js → p-d276f67c.entry.js} +1 -1
  250. package/dist/ripple/p-d5f04a3c.entry.js +1 -0
  251. package/dist/ripple/{p-76aef56f.entry.js → p-d998d931.entry.js} +1 -1
  252. package/dist/ripple/p-e527d2c6.system.entry.js +1 -0
  253. package/dist/ripple/{p-4e97bf26.system.entry.js → p-e9b4a77a.system.entry.js} +1 -1
  254. package/dist/ripple/p-f2ad44e2.system.entry.js +1 -0
  255. package/dist/ripple/p-f7065bc8.entry.js +1 -0
  256. package/dist/ripple/ripple.esm.js +1 -1
  257. package/dist/ripple/ripple.js +1 -1
  258. package/dist/types/components.d.ts +986 -0
  259. package/dist/types/stencil-public-runtime.d.ts +37 -2
  260. package/package.json +2 -2
  261. package/dist/cjs/app-globals-1079ca72.js +0 -92
  262. package/dist/esm/app-globals-1087214a.js +0 -90
  263. package/dist/esm-es5/app-globals-1087214a.js +0 -1
  264. package/dist/esm-es5/chartFunctions-ebe4f673.js +0 -1
  265. package/dist/esm-es5/functions-fbf8519f.js +0 -1
  266. package/dist/esm-es5/index-130e07bb.js +0 -1
  267. package/dist/loader/package.json +0 -11
  268. package/dist/ripple/p-02951ad1.system.js +0 -1
  269. package/dist/ripple/p-0d3a26ff.entry.js +0 -1
  270. package/dist/ripple/p-13b1d775.entry.js +0 -1
  271. package/dist/ripple/p-13ddc53d.entry.js +0 -1
  272. package/dist/ripple/p-17e93d1b.entry.js +0 -1
  273. package/dist/ripple/p-2be53f45.entry.js +0 -1
  274. package/dist/ripple/p-4436c014.entry.js +0 -1
  275. package/dist/ripple/p-4f13d03e.entry.js +0 -1
  276. package/dist/ripple/p-535165fc.system.js +0 -1
  277. package/dist/ripple/p-55f979d4.system.js +0 -1
  278. package/dist/ripple/p-57bce206.system.js +0 -1
  279. package/dist/ripple/p-5b7d56aa.entry.js +0 -1
  280. package/dist/ripple/p-5c0db525.entry.js +0 -1
  281. package/dist/ripple/p-67109fb1.entry.js +0 -1
  282. package/dist/ripple/p-823d7b4e.system.entry.js +0 -1
  283. package/dist/ripple/p-8905ad76.entry.js +0 -1
  284. package/dist/ripple/p-8c2f8f78.entry.js +0 -1
  285. package/dist/ripple/p-94c6bde9.js +0 -1
  286. package/dist/ripple/p-9627b8a6.entry.js +0 -1
  287. package/dist/ripple/p-9f2b6c58.entry.js +0 -1
  288. package/dist/ripple/p-b8dd9e8c.entry.js +0 -1
  289. package/dist/ripple/p-c6ba7e07.entry.js +0 -1
  290. package/dist/ripple/p-cef8a45b.system.js +0 -2
  291. package/dist/ripple/p-d210db32.entry.js +0 -1
  292. package/dist/ripple/p-d45bcccf.js +0 -1
  293. package/dist/ripple/p-d9da0502.js +0 -2
  294. package/dist/ripple/p-dc7acef5.entry.js +0 -1
  295. package/dist/ripple/p-dd62178f.system.entry.js +0 -1
  296. package/dist/ripple/p-e0d21c51.entry.js +0 -1
  297. package/dist/ripple/p-e7d03cf5.js +0 -1
  298. package/dist/ripple/p-efe8c61e.entry.js +0 -1
  299. package/dist/ripple/p-f0eae6dc.entry.js +0 -1
  300. package/dist/ripple/p-f0f57f41.system.entry.js +0 -1
  301. package/dist/ripple/p-f46983da.entry.js +0 -1
  302. /package/dist/cjs/{interfaces-85d78ae9.js → interfaces-C7YbtGnk.js} +0 -0
  303. /package/dist/esm/{interfaces-cc5b177f.js → interfaces-COwzv5zO.js} +0 -0
  304. /package/dist/esm-es5/{interfaces-cc5b177f.js → interfaces-COwzv5zO.js} +0 -0
  305. /package/dist/ripple/{p-2732bddd.js → p-COwzv5zO.js} +0 -0
  306. /package/dist/ripple/{p-42fa7a77.system.js → p-ClUp3GkF.system.js} +0 -0
  307. /package/dist/ripple/{p-50ea2036.system.js → p-YWpyar7R.system.js} +0 -0
@@ -1,17 +1,115 @@
1
1
  const NAMESPACE = 'ripple';
2
- const BUILD = /* ripple */ { allRenderFn: false, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: true, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: true, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: true, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: true, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };
2
+ const BUILD = /* ripple */ { hydratedSelectorName: "hydrated", lazyLoad: true, slotRelocation: true, updatable: true};
3
+
4
+ const version = "5.16.0-alpha.13";
5
+
6
+ // PRINT RIPPLE VERSION IN CONSOLE
7
+ // test envs return 0 for plugin.length
8
+ // do not print version number there as it causes issues
9
+ if (window.navigator.plugins.length > 0) {
10
+ console.log("%cRipple component library %c%s", "color: #575195; font-weight: bold", "font-weight: bold", version);
11
+ }
12
+ // Dispatching events to track whether user is navigating with keyboard or mouse
13
+ // no longer necessary for keyboard focus indicators (thanks to :focus-visible)
14
+ // but still used in several components for other things (search for isTabbing)
15
+ function wmComponentKeys(ev) {
16
+ if (ev.key == "Tab") {
17
+ var event = new Event("wmUserIsTabbing");
18
+ window.dispatchEvent(event);
19
+ document.querySelector("body").classList.add("wmcl-user-is-tabbing");
20
+ }
21
+ if (ev.key == "ArrowLeft" || ev.key == "ArrowUp" || ev.key == "ArrowRight" || ev.key == "ArrowDown") {
22
+ var event = new Event("wmUserIsKeying");
23
+ window.dispatchEvent(event);
24
+ document.querySelector("body").classList.add("wmcl-user-is-keying");
25
+ }
26
+ }
27
+ function wmComponentMouseDownOnce() {
28
+ var event = new Event("wmUserIsNotTabbing");
29
+ window.dispatchEvent(event);
30
+ document.querySelector("body").classList.remove("wmcl-user-is-tabbing");
31
+ document.querySelector("body").classList.remove("wmcl-user-is-keying");
32
+ }
33
+ window.addEventListener("keydown", wmComponentKeys);
34
+ window.addEventListener("mousedown", wmComponentMouseDownOnce);
35
+ // TOOLTIP
36
+ // Add a tooltip element
37
+ // This allows tooltips to be always at the highest stacking context (always on top)
38
+ // Element is added withing a container to avoid performance impact
39
+ const tooltipContainer = document.createElement("div");
40
+ tooltipContainer.id = "wm-tooltip-container";
41
+ const tooltipEl = document.createElement("div");
42
+ tooltipEl.id = "wm-tooltip";
43
+ tooltipEl.classList.add("wm-tooltip");
44
+ tooltipEl.setAttribute("popover", "manual");
45
+ tooltipEl.setAttribute("aria-hidden", "true");
46
+ const tooltipStyles = document.createElement("style");
47
+ tooltipStyles.textContent = `
48
+ .wm-tooltip {
49
+ position: fixed;
50
+ overflow: hidden;
51
+ pointer-events: none;
52
+ line-height: normal;
53
+ font-family: inherit;
54
+ font-size: 0.875rem;
55
+ text-transform: none;
56
+ font-weight: normal;
57
+ background: var(--wmcolor-tooltip-background);
58
+ color: var(--wmcolor-tooltip-text);
59
+ z-index: 999999;
60
+ max-width: var(--wmTooltipMaxWidth, 13.75rem);
61
+ margin-right: 1.5rem;
62
+ padding: 0.375rem;
63
+ transition-property: opacity;
64
+ transition-delay: 0s;
65
+ opacity: 0;
66
+ inset: unset;
67
+ top: 0;
68
+ left: 0;
69
+ transform: translateZ(0);
70
+ will-change: transform;
71
+ transform: translate(var(--wmTooltipLeft), var(--wmTooltipTop));
72
+ border: none;
73
+ }
74
+
75
+ .wm-tooltip:popover-open {
76
+ opacity: 0;
77
+ }
78
+
79
+ .wm-tooltip.show {
80
+ transition-delay: 500ms;
81
+ opacity: 1;
82
+ }
83
+ `;
84
+ document.head.appendChild(tooltipStyles);
85
+ tooltipContainer.appendChild(tooltipEl);
86
+ document.querySelector("body").appendChild(tooltipContainer);
87
+ const globalFn = () => { };
3
88
 
4
89
  /*
5
- Stencil Client Platform v4.21.0 | MIT Licensed | https://stenciljs.com
90
+ Stencil Client Platform v4.36.2 | MIT Licensed | https://stenciljs.com
6
91
  */
7
92
  var __defProp = Object.defineProperty;
8
93
  var __export = (target, all) => {
9
94
  for (var name in all)
10
95
  __defProp(target, name, { get: all[name], enumerable: true });
11
96
  };
12
- var hostRefs = /* @__PURE__ */ new WeakMap();
13
- var getHostRef = (ref) => hostRefs.get(ref);
14
- var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
97
+
98
+ // src/utils/constants.ts
99
+ var SVG_NS = "http://www.w3.org/2000/svg";
100
+ var HTML_NS = "http://www.w3.org/1999/xhtml";
101
+
102
+ // src/client/client-host-ref.ts
103
+ var getHostRef = (ref) => {
104
+ if (ref.__stencil__getHostRef) {
105
+ return ref.__stencil__getHostRef();
106
+ }
107
+ return void 0;
108
+ };
109
+ var registerInstance = (lazyInstance, hostRef) => {
110
+ lazyInstance.__stencil__getHostRef = () => hostRef;
111
+ hostRef.$lazyInstance$ = lazyInstance;
112
+ };
15
113
  var registerHost = (hostElement, cmpMeta) => {
16
114
  const hostRef = {
17
115
  $flags$: 0,
@@ -27,7 +125,9 @@ var registerHost = (hostElement, cmpMeta) => {
27
125
  hostElement["s-p"] = [];
28
126
  hostElement["s-rc"] = [];
29
127
  }
30
- return hostRefs.set(hostElement, hostRef);
128
+ const ref = hostRef;
129
+ hostElement.__stencil__getHostRef = () => ref;
130
+ return ref;
31
131
  };
32
132
  var isMemberInElement = (elm, memberName) => memberName in elm;
33
133
  var consoleError = (e, el) => (0, console.error)(e, el);
@@ -52,6 +152,18 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
52
152
  }
53
153
  switch(bundleId) {
54
154
 
155
+ case 'wm-tag-option':
156
+ return import(
157
+ /* webpackMode: "lazy" */
158
+ './wm-tag-option.entry.js').then(processMod, consoleError);
159
+ case 'wm-wrapper':
160
+ return import(
161
+ /* webpackMode: "lazy" */
162
+ './wm-wrapper.entry.js').then(processMod, consoleError);
163
+ case 'wm-chart-slice':
164
+ return import(
165
+ /* webpackMode: "lazy" */
166
+ './wm-chart-slice.entry.js').then(processMod, consoleError);
55
167
  case 'wm-button':
56
168
  return import(
57
169
  /* webpackMode: "lazy" */
@@ -80,10 +192,6 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
80
192
  return import(
81
193
  /* webpackMode: "lazy" */
82
194
  './wm-input.entry.js').then(processMod, consoleError);
83
- case 'wm-navigator':
84
- return import(
85
- /* webpackMode: "lazy" */
86
- './wm-navigator.entry.js').then(processMod, consoleError);
87
195
  case 'wm-pagination':
88
196
  return import(
89
197
  /* webpackMode: "lazy" */
@@ -108,10 +216,6 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
108
216
  return import(
109
217
  /* webpackMode: "lazy" */
110
218
  './wm-tag-input.entry.js').then(processMod, consoleError);
111
- case 'wm-tag-option':
112
- return import(
113
- /* webpackMode: "lazy" */
114
- './wm-tag-option.entry.js').then(processMod, consoleError);
115
219
  case 'wm-textarea':
116
220
  return import(
117
221
  /* webpackMode: "lazy" */
@@ -120,42 +224,6 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
120
224
  return import(
121
225
  /* webpackMode: "lazy" */
122
226
  './wm-uploader.entry.js').then(processMod, consoleError);
123
- case 'wm-wrapper':
124
- return import(
125
- /* webpackMode: "lazy" */
126
- './wm-wrapper.entry.js').then(processMod, consoleError);
127
- case 'wm-action-menu_2':
128
- return import(
129
- /* webpackMode: "lazy" */
130
- './wm-action-menu_2.entry.js').then(processMod, consoleError);
131
- case 'wm-option_2':
132
- return import(
133
- /* webpackMode: "lazy" */
134
- './wm-option_2.entry.js').then(processMod, consoleError);
135
- case 'wm-modal_3':
136
- return import(
137
- /* webpackMode: "lazy" */
138
- './wm-modal_3.entry.js').then(processMod, consoleError);
139
- case 'wm-modal-pss_3':
140
- return import(
141
- /* webpackMode: "lazy" */
142
- './wm-modal-pss_3.entry.js').then(processMod, consoleError);
143
- case 'wm-navigation_3':
144
- return import(
145
- /* webpackMode: "lazy" */
146
- './wm-navigation_3.entry.js').then(processMod, consoleError);
147
- case 'wm-progress-indicator_3':
148
- return import(
149
- /* webpackMode: "lazy" */
150
- './wm-progress-indicator_3.entry.js').then(processMod, consoleError);
151
- case 'wm-tab-item_3':
152
- return import(
153
- /* webpackMode: "lazy" */
154
- './wm-tab-item_3.entry.js').then(processMod, consoleError);
155
- case 'wm-chart-slice':
156
- return import(
157
- /* webpackMode: "lazy" */
158
- './wm-chart-slice.entry.js').then(processMod, consoleError);
159
227
  case 'wm-date-range':
160
228
  return import(
161
229
  /* webpackMode: "lazy" */
@@ -192,6 +260,38 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
192
260
  return import(
193
261
  /* webpackMode: "lazy" */
194
262
  './priv-option-list.entry.js').then(processMod, consoleError);
263
+ case 'wm-navigator':
264
+ return import(
265
+ /* webpackMode: "lazy" */
266
+ './wm-navigator.entry.js').then(processMod, consoleError);
267
+ case 'wm-action-menu_2':
268
+ return import(
269
+ /* webpackMode: "lazy" */
270
+ './wm-action-menu_2.entry.js').then(processMod, consoleError);
271
+ case 'wm-option_2':
272
+ return import(
273
+ /* webpackMode: "lazy" */
274
+ './wm-option_2.entry.js').then(processMod, consoleError);
275
+ case 'wm-progress-indicator_3':
276
+ return import(
277
+ /* webpackMode: "lazy" */
278
+ './wm-progress-indicator_3.entry.js').then(processMod, consoleError);
279
+ case 'wm-modal_3':
280
+ return import(
281
+ /* webpackMode: "lazy" */
282
+ './wm-modal_3.entry.js').then(processMod, consoleError);
283
+ case 'wm-modal-pss_3':
284
+ return import(
285
+ /* webpackMode: "lazy" */
286
+ './wm-modal-pss_3.entry.js').then(processMod, consoleError);
287
+ case 'wm-navigation_3':
288
+ return import(
289
+ /* webpackMode: "lazy" */
290
+ './wm-navigation_3.entry.js').then(processMod, consoleError);
291
+ case 'wm-tab-item_3':
292
+ return import(
293
+ /* webpackMode: "lazy" */
294
+ './wm-tab-item_3.entry.js').then(processMod, consoleError);
195
295
  }
196
296
  }
197
297
  return import(
@@ -200,12 +300,17 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
200
300
  /* webpackExclude: /\.system\.entry\.js$/ */
201
301
  /* webpackMode: "lazy" */
202
302
  `./${bundleId}.entry.js${""}`
203
- ).then((importedModule) => {
204
- {
205
- cmpModules.set(bundleId, importedModule);
303
+ ).then(
304
+ (importedModule) => {
305
+ {
306
+ cmpModules.set(bundleId, importedModule);
307
+ }
308
+ return importedModule[exportName];
309
+ },
310
+ (e) => {
311
+ consoleError(e, hostRef.$hostElement$);
206
312
  }
207
- return importedModule[exportName];
208
- }, consoleError);
313
+ );
209
314
  };
210
315
 
211
316
  // src/client/client-style.ts
@@ -214,7 +319,6 @@ var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
214
319
  var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
215
320
  var XLINK_NS = "http://www.w3.org/1999/xlink";
216
321
  var win = typeof window !== "undefined" ? window : {};
217
- var doc = win.document || { head: {} };
218
322
  var plt = {
219
323
  $flags$: 0,
220
324
  $resourcesUrl$: "",
@@ -225,9 +329,10 @@ var plt = {
225
329
  ce: (eventName, opts) => new CustomEvent(eventName, opts)
226
330
  };
227
331
  var supportsListenerOptions = /* @__PURE__ */ (() => {
332
+ var _a;
228
333
  let supportsListenerOptions2 = false;
229
334
  try {
230
- doc.addEventListener(
335
+ (_a = win.document) == null ? void 0 : _a.addEventListener(
231
336
  "e",
232
337
  null,
233
338
  Object.defineProperty({}, "passive", {
@@ -249,6 +354,7 @@ var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
249
354
  }
250
355
  return false;
251
356
  })() ;
357
+ var supportsMutableAdoptedStyleSheets = supportsConstructableStylesheets ? /* @__PURE__ */ (() => !!win.document && Object.getOwnPropertyDescriptor(win.document.adoptedStyleSheets, "length").writable)() : false;
252
358
  var queuePending = false;
253
359
  var queueDomReads = [];
254
360
  var queueDomWrites = [];
@@ -284,25 +390,22 @@ var flush = () => {
284
390
  };
285
391
  var nextTick = (cb) => promiseResolve().then(cb);
286
392
  var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
287
-
288
- // src/utils/constants.ts
289
- var EMPTY_OBJ = {};
290
- var SVG_NS = "http://www.w3.org/2000/svg";
291
- var HTML_NS = "http://www.w3.org/1999/xhtml";
292
-
293
- // src/utils/helpers.ts
294
- var isDef = (v) => v != null;
295
393
  var isComplexType = (o) => {
296
394
  o = typeof o;
297
395
  return o === "object" || o === "function";
298
396
  };
299
397
 
300
398
  // src/utils/query-nonce-meta-tag-content.ts
301
- function queryNonceMetaTagContent(doc2) {
399
+ function queryNonceMetaTagContent(doc) {
302
400
  var _a, _b, _c;
303
- return (_c = (_b = (_a = doc2.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
401
+ return (_c = (_b = (_a = doc.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
304
402
  }
305
403
 
404
+ // src/utils/regular-expression.ts
405
+ var escapeRegExpSpecialCharacters = (text) => {
406
+ return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
407
+ };
408
+
306
409
  // src/utils/result.ts
307
410
  var result_exports = {};
308
411
  __export(result_exports, {
@@ -351,6 +454,135 @@ var unwrapErr = (result) => {
351
454
  throw result.value;
352
455
  }
353
456
  };
457
+
458
+ // src/utils/style.ts
459
+ function createStyleSheetIfNeededAndSupported(styles2) {
460
+ return void 0;
461
+ }
462
+
463
+ // src/utils/shadow-root.ts
464
+ var globalStyleSheet;
465
+ function createShadowRoot(cmpMeta) {
466
+ var _a;
467
+ const shadowRoot = this.attachShadow({
468
+ mode: "open",
469
+ delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */)
470
+ }) ;
471
+ if (globalStyleSheet === void 0) globalStyleSheet = (_a = createStyleSheetIfNeededAndSupported()) != null ? _a : null;
472
+ if (globalStyleSheet) {
473
+ if (supportsMutableAdoptedStyleSheets) {
474
+ shadowRoot.adoptedStyleSheets.push(globalStyleSheet);
475
+ } else {
476
+ shadowRoot.adoptedStyleSheets = [...shadowRoot.adoptedStyleSheets, globalStyleSheet];
477
+ }
478
+ }
479
+ }
480
+ var updateFallbackSlotVisibility = (elm) => {
481
+ const childNodes = internalCall(elm, "childNodes");
482
+ if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
483
+ getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
484
+ if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
485
+ if (getSlotChildSiblings(slotNode, getSlotName(slotNode), false).length) {
486
+ slotNode.hidden = true;
487
+ } else {
488
+ slotNode.hidden = false;
489
+ }
490
+ }
491
+ });
492
+ }
493
+ let i2 = 0;
494
+ for (i2 = 0; i2 < childNodes.length; i2++) {
495
+ const childNode = childNodes[i2];
496
+ if (childNode.nodeType === 1 /* ElementNode */ && internalCall(childNode, "childNodes").length) {
497
+ updateFallbackSlotVisibility(childNode);
498
+ }
499
+ }
500
+ };
501
+ var getSlottedChildNodes = (childNodes) => {
502
+ const result = [];
503
+ for (let i2 = 0; i2 < childNodes.length; i2++) {
504
+ const slottedNode = childNodes[i2]["s-nr"] || void 0;
505
+ if (slottedNode && slottedNode.isConnected) {
506
+ result.push(slottedNode);
507
+ }
508
+ }
509
+ return result;
510
+ };
511
+ function getHostSlotNodes(childNodes, hostName, slotName) {
512
+ let i2 = 0;
513
+ let slottedNodes = [];
514
+ let childNode;
515
+ for (; i2 < childNodes.length; i2++) {
516
+ childNode = childNodes[i2];
517
+ if (childNode["s-sr"] && (!hostName || childNode["s-hn"] === hostName) && (slotName === void 0)) {
518
+ slottedNodes.push(childNode);
519
+ }
520
+ slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
521
+ }
522
+ return slottedNodes;
523
+ }
524
+ var getSlotChildSiblings = (slot, slotName, includeSlot = true) => {
525
+ const childNodes = [];
526
+ if (includeSlot && slot["s-sr"] || !slot["s-sr"]) childNodes.push(slot);
527
+ let node = slot;
528
+ while (node = node.nextSibling) {
529
+ if (getSlotName(node) === slotName && (includeSlot || !node["s-sr"])) childNodes.push(node);
530
+ }
531
+ return childNodes;
532
+ };
533
+ var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
534
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
535
+ if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
536
+ return true;
537
+ }
538
+ if (nodeToRelocate.getAttribute("slot") === slotName) {
539
+ return true;
540
+ }
541
+ return false;
542
+ }
543
+ if (nodeToRelocate["s-sn"] === slotName) {
544
+ return true;
545
+ }
546
+ return slotName === "";
547
+ };
548
+ var getSlotName = (node) => typeof node["s-sn"] === "string" ? node["s-sn"] : node.nodeType === 1 && node.getAttribute("slot") || void 0;
549
+ function patchSlotNode(node) {
550
+ if (node.assignedElements || node.assignedNodes || !node["s-sr"]) return;
551
+ const assignedFactory = (elementsOnly) => (function(opts) {
552
+ const toReturn = [];
553
+ const slotName = this["s-sn"];
554
+ if (opts == null ? void 0 : opts.flatten) {
555
+ console.error(`
556
+ Flattening is not supported for Stencil non-shadow slots.
557
+ You can use \`.childNodes\` to nested slot fallback content.
558
+ If you have a particular use case, please open an issue on the Stencil repo.
559
+ `);
560
+ }
561
+ const parent = this["s-cr"].parentElement;
562
+ const slottedNodes = parent.__childNodes ? parent.childNodes : getSlottedChildNodes(parent.childNodes);
563
+ slottedNodes.forEach((n) => {
564
+ if (slotName === getSlotName(n)) {
565
+ toReturn.push(n);
566
+ }
567
+ });
568
+ if (elementsOnly) {
569
+ return toReturn.filter((n) => n.nodeType === 1 /* ElementNode */);
570
+ }
571
+ return toReturn;
572
+ }).bind(node);
573
+ node.assignedElements = assignedFactory(true);
574
+ node.assignedNodes = assignedFactory(false);
575
+ }
576
+ function internalCall(node, method) {
577
+ if ("__" + method in node) {
578
+ const toReturn = node["__" + method];
579
+ if (typeof toReturn !== "function") return toReturn;
580
+ return toReturn.bind(node);
581
+ } else {
582
+ if (typeof node[method] !== "function") return node[method];
583
+ return node[method].bind(node);
584
+ }
585
+ }
354
586
  var createTime = (fnName, tagName = "") => {
355
587
  {
356
588
  return () => {
@@ -365,6 +597,110 @@ var uniqueTime = (key, measureText) => {
365
597
  };
366
598
  }
367
599
  };
600
+ var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
601
+ var registerStyle = (scopeId2, cssText, allowCS) => {
602
+ let style = styles.get(scopeId2);
603
+ if (supportsConstructableStylesheets && allowCS) {
604
+ style = style || new CSSStyleSheet();
605
+ if (typeof style === "string") {
606
+ style = cssText;
607
+ } else {
608
+ style.replaceSync(cssText);
609
+ }
610
+ } else {
611
+ style = cssText;
612
+ }
613
+ styles.set(scopeId2, style);
614
+ };
615
+ var addStyle = (styleContainerNode, cmpMeta, mode) => {
616
+ var _a;
617
+ const scopeId2 = getScopeId(cmpMeta);
618
+ const style = styles.get(scopeId2);
619
+ if (!win.document) {
620
+ return scopeId2;
621
+ }
622
+ styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
623
+ if (style) {
624
+ if (typeof style === "string") {
625
+ styleContainerNode = styleContainerNode.head || styleContainerNode;
626
+ let appliedStyles = rootAppliedStyles.get(styleContainerNode);
627
+ let styleElm;
628
+ if (!appliedStyles) {
629
+ rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
630
+ }
631
+ if (!appliedStyles.has(scopeId2)) {
632
+ {
633
+ styleElm = win.document.createElement("style");
634
+ styleElm.innerHTML = style;
635
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
636
+ if (nonce != null) {
637
+ styleElm.setAttribute("nonce", nonce);
638
+ }
639
+ if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
640
+ if (styleContainerNode.nodeName === "HEAD") {
641
+ const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
642
+ const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
643
+ styleContainerNode.insertBefore(
644
+ styleElm,
645
+ (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
646
+ );
647
+ } else if ("host" in styleContainerNode) {
648
+ if (supportsConstructableStylesheets) {
649
+ const stylesheet = new CSSStyleSheet();
650
+ stylesheet.replaceSync(style);
651
+ if (supportsMutableAdoptedStyleSheets) {
652
+ styleContainerNode.adoptedStyleSheets.unshift(stylesheet);
653
+ } else {
654
+ styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
655
+ }
656
+ } else {
657
+ const existingStyleContainer = styleContainerNode.querySelector("style");
658
+ if (existingStyleContainer) {
659
+ existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
660
+ } else {
661
+ styleContainerNode.prepend(styleElm);
662
+ }
663
+ }
664
+ } else {
665
+ styleContainerNode.append(styleElm);
666
+ }
667
+ }
668
+ if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
669
+ styleContainerNode.insertBefore(styleElm, null);
670
+ }
671
+ }
672
+ if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
673
+ styleElm.innerHTML += SLOT_FB_CSS;
674
+ }
675
+ if (appliedStyles) {
676
+ appliedStyles.add(scopeId2);
677
+ }
678
+ }
679
+ } else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
680
+ if (supportsMutableAdoptedStyleSheets) {
681
+ styleContainerNode.adoptedStyleSheets.push(style);
682
+ } else {
683
+ styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
684
+ }
685
+ }
686
+ }
687
+ return scopeId2;
688
+ };
689
+ var attachStyles = (hostRef) => {
690
+ const cmpMeta = hostRef.$cmpMeta$;
691
+ const elm = hostRef.$hostElement$;
692
+ const flags = cmpMeta.$flags$;
693
+ const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
694
+ const scopeId2 = addStyle(
695
+ elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
696
+ cmpMeta);
697
+ if (flags & 10 /* needsScopedEncapsulation */) {
698
+ elm["s-sc"] = scopeId2;
699
+ elm.classList.add(scopeId2 + "-h");
700
+ }
701
+ endAttachStyles();
702
+ };
703
+ var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
368
704
  var h = (nodeName, vnodeData, ...children) => {
369
705
  let child = null;
370
706
  let key = null;
@@ -476,13 +812,33 @@ var convertToPrivate = (node) => {
476
812
  vnode.$name$ = node.vname;
477
813
  return vnode;
478
814
  };
479
- var parsePropertyValue = (propValue, propType) => {
815
+ var createSupportsRuleRe = (selector) => {
816
+ const safeSelector2 = escapeRegExpSpecialCharacters(selector);
817
+ return new RegExp(
818
+ // First capture group: match any context before the selector that's not inside @supports selector()
819
+ // Using negative lookahead to avoid matching inside @supports selector(...) condition
820
+ `(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${safeSelector2}))(${safeSelector2}\\b)`,
821
+ "g"
822
+ );
823
+ };
824
+ createSupportsRuleRe("::slotted");
825
+ createSupportsRuleRe(":host");
826
+ createSupportsRuleRe(":host-context");
827
+ var parsePropertyValue = (propValue, propType, isFormAssociated) => {
828
+ if (typeof propValue === "string" && (propType & 16 /* Unknown */ || propType & 8 /* Any */) && (propValue.startsWith("{") && propValue.endsWith("}") || propValue.startsWith("[") && propValue.endsWith("]"))) {
829
+ try {
830
+ return JSON.parse(propValue);
831
+ } catch (e) {
832
+ }
833
+ }
480
834
  if (propValue != null && !isComplexType(propValue)) {
481
835
  if (propType & 4 /* Boolean */) {
482
- return propValue === "false" ? false : propValue === "" || !!propValue;
836
+ {
837
+ return propValue === "false" ? false : propValue === "" || !!propValue;
838
+ }
483
839
  }
484
840
  if (propType & 2 /* Number */) {
485
- return parseFloat(propValue);
841
+ return typeof propValue === "string" ? parseFloat(propValue) : typeof propValue === "number" ? propValue : NaN;
486
842
  }
487
843
  if (propType & 1 /* String */) {
488
844
  return String(propValue);
@@ -491,7 +847,10 @@ var parsePropertyValue = (propValue, propType) => {
491
847
  }
492
848
  return propValue;
493
849
  };
494
- var getElement = (ref) => getHostRef(ref).$hostElement$ ;
850
+ var getElement = (ref) => {
851
+ var _a;
852
+ return (_a = getHostRef(ref)) == null ? void 0 : _a.$hostElement$ ;
853
+ };
495
854
 
496
855
  // src/runtime/event-emitter.ts
497
856
  var createEvent = (ref, name, flags) => {
@@ -512,204 +871,148 @@ var emitEvent = (elm, name, opts) => {
512
871
  elm.dispatchEvent(ev);
513
872
  return ev;
514
873
  };
515
- var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
516
- var registerStyle = (scopeId2, cssText, allowCS) => {
517
- let style = styles.get(scopeId2);
518
- if (supportsConstructableStylesheets && allowCS) {
519
- style = style || new CSSStyleSheet();
520
- if (typeof style === "string") {
521
- style = cssText;
522
- } else {
523
- style.replaceSync(cssText);
524
- }
525
- } else {
526
- style = cssText;
527
- }
528
- styles.set(scopeId2, style);
529
- };
530
- var addStyle = (styleContainerNode, cmpMeta, mode) => {
531
- var _a;
532
- const scopeId2 = getScopeId(cmpMeta);
533
- const style = styles.get(scopeId2);
534
- styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
535
- if (style) {
536
- if (typeof style === "string") {
537
- styleContainerNode = styleContainerNode.head || styleContainerNode;
538
- let appliedStyles = rootAppliedStyles.get(styleContainerNode);
539
- let styleElm;
540
- if (!appliedStyles) {
541
- rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
542
- }
543
- if (!appliedStyles.has(scopeId2)) {
544
- {
545
- styleElm = doc.createElement("style");
546
- styleElm.innerHTML = style;
547
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
548
- if (nonce != null) {
549
- styleElm.setAttribute("nonce", nonce);
550
- }
551
- if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
552
- if (styleContainerNode.nodeName === "HEAD") {
553
- const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
554
- const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : document.querySelector("style");
555
- styleContainerNode.insertBefore(styleElm, referenceNode2);
556
- } else if ("host" in styleContainerNode) {
557
- styleContainerNode.prepend(styleElm);
558
- } else {
559
- styleContainerNode.append(styleElm);
560
- }
561
- }
562
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
563
- styleContainerNode.insertBefore(styleElm, null);
564
- }
565
- }
566
- if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
567
- styleElm.innerHTML += SLOT_FB_CSS;
568
- }
569
- if (appliedStyles) {
570
- appliedStyles.add(scopeId2);
571
- }
572
- }
573
- } else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
574
- styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
575
- }
576
- }
577
- return scopeId2;
578
- };
579
- var attachStyles = (hostRef) => {
580
- const cmpMeta = hostRef.$cmpMeta$;
581
- const elm = hostRef.$hostElement$;
582
- const flags = cmpMeta.$flags$;
583
- const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
584
- const scopeId2 = addStyle(
585
- elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
586
- cmpMeta);
587
- if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
588
- elm["s-sc"] = scopeId2;
589
- elm.classList.add(scopeId2 + "-h");
874
+ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
875
+ if (oldValue === newValue) {
876
+ return;
590
877
  }
591
- endAttachStyles();
592
- };
593
- var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
594
- var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
595
- if (oldValue !== newValue) {
596
- let isProp = isMemberInElement(elm, memberName);
597
- let ln = memberName.toLowerCase();
598
- if (memberName === "class") {
599
- const classList = elm.classList;
600
- const oldClasses = parseClassList(oldValue);
601
- const newClasses = parseClassList(newValue);
878
+ let isProp = isMemberInElement(elm, memberName);
879
+ let ln = memberName.toLowerCase();
880
+ if (memberName === "class") {
881
+ const classList = elm.classList;
882
+ const oldClasses = parseClassList(oldValue);
883
+ let newClasses = parseClassList(newValue);
884
+ {
602
885
  classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
603
886
  classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
604
- } else if (memberName === "style") {
605
- {
606
- for (const prop in oldValue) {
607
- if (!newValue || newValue[prop] == null) {
608
- if (prop.includes("-")) {
609
- elm.style.removeProperty(prop);
610
- } else {
611
- elm.style[prop] = "";
612
- }
613
- }
614
- }
615
- }
616
- for (const prop in newValue) {
617
- if (!oldValue || newValue[prop] !== oldValue[prop]) {
887
+ }
888
+ } else if (memberName === "style") {
889
+ {
890
+ for (const prop in oldValue) {
891
+ if (!newValue || newValue[prop] == null) {
618
892
  if (prop.includes("-")) {
619
- elm.style.setProperty(prop, newValue[prop]);
893
+ elm.style.removeProperty(prop);
620
894
  } else {
621
- elm.style[prop] = newValue[prop];
895
+ elm.style[prop] = "";
622
896
  }
623
897
  }
624
898
  }
625
- } else if (memberName === "key") ; else if (memberName === "ref") {
626
- if (newValue) {
627
- newValue(elm);
628
- }
629
- } else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
630
- if (memberName[2] === "-") {
631
- memberName = memberName.slice(3);
632
- } else if (isMemberInElement(win, ln)) {
633
- memberName = ln.slice(2);
634
- } else {
635
- memberName = ln[2] + memberName.slice(3);
636
- }
637
- if (oldValue || newValue) {
638
- const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
639
- memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
640
- if (oldValue) {
641
- plt.rel(elm, memberName, oldValue, capture);
642
- }
643
- if (newValue) {
644
- plt.ael(elm, memberName, newValue, capture);
899
+ }
900
+ for (const prop in newValue) {
901
+ if (!oldValue || newValue[prop] !== oldValue[prop]) {
902
+ if (prop.includes("-")) {
903
+ elm.style.setProperty(prop, newValue[prop]);
904
+ } else {
905
+ elm.style[prop] = newValue[prop];
645
906
  }
646
907
  }
908
+ }
909
+ } else if (memberName === "key") ; else if (memberName === "ref") {
910
+ if (newValue) {
911
+ newValue(elm);
912
+ }
913
+ } else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
914
+ if (memberName[2] === "-") {
915
+ memberName = memberName.slice(3);
916
+ } else if (isMemberInElement(win, ln)) {
917
+ memberName = ln.slice(2);
647
918
  } else {
648
- const isComplex = isComplexType(newValue);
649
- if ((isProp || isComplex && newValue !== null) && !isSvg) {
650
- try {
651
- if (!elm.tagName.includes("-")) {
652
- const n = newValue == null ? "" : newValue;
653
- if (memberName === "list") {
654
- isProp = false;
655
- } else if (oldValue == null || elm[memberName] != n) {
656
- if (typeof elm.__lookupSetter__(memberName) === "function") {
657
- elm[memberName] = n;
658
- } else {
659
- elm.setAttribute(memberName, n);
660
- }
919
+ memberName = ln[2] + memberName.slice(3);
920
+ }
921
+ if (oldValue || newValue) {
922
+ const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
923
+ memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
924
+ if (oldValue) {
925
+ plt.rel(elm, memberName, oldValue, capture);
926
+ }
927
+ if (newValue) {
928
+ plt.ael(elm, memberName, newValue, capture);
929
+ }
930
+ }
931
+ } else {
932
+ const isComplex = isComplexType(newValue);
933
+ if ((isProp || isComplex && newValue !== null) && !isSvg) {
934
+ try {
935
+ if (!elm.tagName.includes("-")) {
936
+ const n = newValue == null ? "" : newValue;
937
+ if (memberName === "list") {
938
+ isProp = false;
939
+ } else if (oldValue == null || elm[memberName] != n) {
940
+ if (typeof elm.__lookupSetter__(memberName) === "function") {
941
+ elm[memberName] = n;
942
+ } else {
943
+ elm.setAttribute(memberName, n);
661
944
  }
662
- } else {
663
- elm[memberName] = newValue;
664
945
  }
665
- } catch (e) {
946
+ } else if (elm[memberName] !== newValue) {
947
+ elm[memberName] = newValue;
666
948
  }
949
+ } catch (e) {
667
950
  }
668
- let xlink = false;
669
- {
670
- if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
671
- memberName = ln;
672
- xlink = true;
673
- }
951
+ }
952
+ let xlink = false;
953
+ {
954
+ if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
955
+ memberName = ln;
956
+ xlink = true;
674
957
  }
675
- if (newValue == null || newValue === false) {
676
- if (newValue !== false || elm.getAttribute(memberName) === "") {
677
- if (xlink) {
678
- elm.removeAttributeNS(XLINK_NS, memberName);
679
- } else {
680
- elm.removeAttribute(memberName);
681
- }
682
- }
683
- } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
684
- newValue = newValue === true ? "" : newValue;
958
+ }
959
+ if (newValue == null || newValue === false) {
960
+ if (newValue !== false || elm.getAttribute(memberName) === "") {
685
961
  if (xlink) {
686
- elm.setAttributeNS(XLINK_NS, memberName, newValue);
962
+ elm.removeAttributeNS(XLINK_NS, memberName);
687
963
  } else {
688
- elm.setAttribute(memberName, newValue);
964
+ elm.removeAttribute(memberName);
689
965
  }
690
966
  }
967
+ } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {
968
+ newValue = newValue === true ? "" : newValue;
969
+ if (xlink) {
970
+ elm.setAttributeNS(XLINK_NS, memberName, newValue);
971
+ } else {
972
+ elm.setAttribute(memberName, newValue);
973
+ }
691
974
  }
692
975
  }
693
976
  };
694
977
  var parseClassListRegex = /\s/;
695
- var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
978
+ var parseClassList = (value) => {
979
+ if (typeof value === "object" && value && "baseVal" in value) {
980
+ value = value.baseVal;
981
+ }
982
+ if (!value || typeof value !== "string") {
983
+ return [];
984
+ }
985
+ return value.split(parseClassListRegex);
986
+ };
696
987
  var CAPTURE_EVENT_SUFFIX = "Capture";
697
988
  var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
698
989
 
699
990
  // src/runtime/vdom/update-element.ts
700
- var updateElement = (oldVnode, newVnode, isSvgMode2) => {
991
+ var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
701
992
  const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
702
- const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
703
- const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
993
+ const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
994
+ const newVnodeAttrs = newVnode.$attrs$ || {};
704
995
  {
705
996
  for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
706
997
  if (!(memberName in newVnodeAttrs)) {
707
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
998
+ setAccessor(
999
+ elm,
1000
+ memberName,
1001
+ oldVnodeAttrs[memberName],
1002
+ void 0,
1003
+ isSvgMode2,
1004
+ newVnode.$flags$);
708
1005
  }
709
1006
  }
710
1007
  }
711
1008
  for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
712
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
1009
+ setAccessor(
1010
+ elm,
1011
+ memberName,
1012
+ oldVnodeAttrs[memberName],
1013
+ newVnodeAttrs[memberName],
1014
+ isSvgMode2,
1015
+ newVnode.$flags$);
713
1016
  }
714
1017
  };
715
1018
  function sortedAttrNames(attrNames) {
@@ -721,16 +1024,13 @@ function sortedAttrNames(attrNames) {
721
1024
  attrNames
722
1025
  );
723
1026
  }
724
-
725
- // src/runtime/vdom/vdom-render.ts
726
- var scopeId;
727
1027
  var contentRef;
728
1028
  var hostTagName;
729
1029
  var useNativeShadowDom = false;
730
1030
  var checkSlotFallbackVisibility = false;
731
1031
  var checkSlotRelocate = false;
732
1032
  var isSvgMode = false;
733
- var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
1033
+ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
734
1034
  var _a;
735
1035
  const newVNode2 = newParentVNode.$children$[childIndex];
736
1036
  let i2 = 0;
@@ -740,9 +1040,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
740
1040
  if (!useNativeShadowDom) {
741
1041
  checkSlotRelocate = true;
742
1042
  if (newVNode2.$tag$ === "slot") {
743
- if (scopeId) {
744
- parentElm.classList.add(scopeId + "-s");
745
- }
746
1043
  newVNode2.$flags$ |= newVNode2.$children$ ? (
747
1044
  // slot element has fallback content
748
1045
  // still create an element that "mocks" the slot element
@@ -756,14 +1053,22 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
756
1053
  }
757
1054
  }
758
1055
  if (newVNode2.$text$ !== null) {
759
- elm = newVNode2.$elm$ = doc.createTextNode(newVNode2.$text$);
1056
+ elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
760
1057
  } else if (newVNode2.$flags$ & 1 /* isSlotReference */) {
761
- elm = newVNode2.$elm$ = doc.createTextNode("");
1058
+ elm = newVNode2.$elm$ = win.document.createTextNode("");
1059
+ {
1060
+ updateElement(null, newVNode2, isSvgMode);
1061
+ }
762
1062
  } else {
763
1063
  if (!isSvgMode) {
764
1064
  isSvgMode = newVNode2.$tag$ === "svg";
765
1065
  }
766
- elm = newVNode2.$elm$ = doc.createElementNS(
1066
+ if (!win.document) {
1067
+ throw new Error(
1068
+ "You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component."
1069
+ );
1070
+ }
1071
+ elm = newVNode2.$elm$ = win.document.createElementNS(
767
1072
  isSvgMode ? SVG_NS : HTML_NS,
768
1073
  !useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
769
1074
  ) ;
@@ -773,14 +1078,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
773
1078
  {
774
1079
  updateElement(null, newVNode2, isSvgMode);
775
1080
  }
776
- const rootNode = elm.getRootNode();
777
- const isElementWithinShadowRoot = !rootNode.querySelector("body");
778
- if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
779
- elm.classList.add(elm["s-si"] = scopeId);
780
- }
781
1081
  if (newVNode2.$children$) {
782
1082
  for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
783
- childNode = createElm(oldParentVNode, newVNode2, i2, elm);
1083
+ childNode = createElm(oldParentVNode, newVNode2, i2);
784
1084
  if (childNode) {
785
1085
  elm.appendChild(childNode);
786
1086
  }
@@ -801,6 +1101,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
801
1101
  elm["s-cr"] = contentRef;
802
1102
  elm["s-sn"] = newVNode2.$name$ || "";
803
1103
  elm["s-rf"] = (_a = newVNode2.$attrs$) == null ? void 0 : _a.ref;
1104
+ patchSlotNode(elm);
804
1105
  oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
805
1106
  if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
806
1107
  {
@@ -813,19 +1114,11 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
813
1114
  };
814
1115
  var putBackInOriginalLocation = (parentElm, recursive) => {
815
1116
  plt.$flags$ |= 1 /* isTmpDisconnected */;
816
- const oldSlotChildNodes = Array.from(parentElm.childNodes);
817
- if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
818
- let node = parentElm;
819
- while (node = node.nextSibling) {
820
- if (node && node["s-sn"] === parentElm["s-sn"] && node["s-sh"] === hostTagName) {
821
- oldSlotChildNodes.push(node);
822
- }
823
- }
824
- }
1117
+ const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
825
1118
  for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
826
1119
  const childNode = oldSlotChildNodes[i2];
827
1120
  if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
828
- insertBefore(parentReferenceNode(childNode), childNode, referenceNode(childNode));
1121
+ insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
829
1122
  childNode["s-ol"].remove();
830
1123
  childNode["s-ol"] = void 0;
831
1124
  childNode["s-sh"] = void 0;
@@ -835,7 +1128,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
835
1128
  putBackInOriginalLocation(childNode, recursive);
836
1129
  }
837
1130
  }
838
- plt.$flags$ &= ~1 /* isTmpDisconnected */;
1131
+ plt.$flags$ &= -2 /* isTmpDisconnected */;
839
1132
  };
840
1133
  var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
841
1134
  let containerElm = parentElm["s-cr"] && parentElm["s-cr"].parentNode || parentElm;
@@ -845,7 +1138,7 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
845
1138
  }
846
1139
  for (; startIdx <= endIdx; ++startIdx) {
847
1140
  if (vnodes[startIdx]) {
848
- childNode = createElm(null, parentVNode, startIdx, parentElm);
1141
+ childNode = createElm(null, parentVNode, startIdx);
849
1142
  if (childNode) {
850
1143
  vnodes[startIdx].$elm$ = childNode;
851
1144
  insertBefore(containerElm, childNode, referenceNode(before) );
@@ -932,7 +1225,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
932
1225
  if (idxInOld >= 0) {
933
1226
  elmToMove = oldCh[idxInOld];
934
1227
  if (elmToMove.$tag$ !== newStartVnode.$tag$) {
935
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld, parentElm);
1228
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
936
1229
  } else {
937
1230
  patch(elmToMove, newStartVnode, isInitialRender);
938
1231
  oldCh[idxInOld] = void 0;
@@ -940,12 +1233,16 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
940
1233
  }
941
1234
  newStartVnode = newCh[++newStartIdx];
942
1235
  } else {
943
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx, parentElm);
1236
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
944
1237
  newStartVnode = newCh[++newStartIdx];
945
1238
  }
946
1239
  if (node) {
947
1240
  {
948
- insertBefore(parentReferenceNode(oldStartVnode.$elm$), node, referenceNode(oldStartVnode.$elm$));
1241
+ insertBefore(
1242
+ referenceNode(oldStartVnode.$elm$).parentNode,
1243
+ node,
1244
+ referenceNode(oldStartVnode.$elm$)
1245
+ );
949
1246
  }
950
1247
  }
951
1248
  }
@@ -966,28 +1263,19 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
966
1263
  var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
967
1264
  if (leftVNode.$tag$ === rightVNode.$tag$) {
968
1265
  if (leftVNode.$tag$ === "slot") {
969
- if (
970
- // The component gets hydrated and no VDOM has been initialized.
971
- // Here the comparison can't happen as $name$ property is not set for `leftNode`.
972
- "$nodeId$" in leftVNode && isInitialRender && // `leftNode` is not from type HTMLComment which would cause many
973
- // hydration comments to be removed
974
- leftVNode.$elm$.nodeType !== 8
975
- ) {
976
- return false;
977
- }
978
1266
  return leftVNode.$name$ === rightVNode.$name$;
979
1267
  }
980
1268
  if (!isInitialRender) {
981
1269
  return leftVNode.$key$ === rightVNode.$key$;
982
1270
  }
1271
+ if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
1272
+ leftVNode.$key$ = rightVNode.$key$;
1273
+ }
983
1274
  return true;
984
1275
  }
985
1276
  return false;
986
1277
  };
987
- var referenceNode = (node) => {
988
- return node && node["s-ol"] || node;
989
- };
990
- var parentReferenceNode = (node) => (node["s-ol"] ? node["s-ol"] : node).parentNode;
1278
+ var referenceNode = (node) => node && node["s-ol"] || node;
991
1279
  var patch = (oldVNode, newVNode2, isInitialRender = false) => {
992
1280
  const elm = newVNode2.$elm$ = oldVNode.$elm$;
993
1281
  const oldChildren = oldVNode.$children$;
@@ -1000,9 +1288,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
1000
1288
  isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
1001
1289
  }
1002
1290
  {
1003
- if (tag === "slot" && !useNativeShadowDom) ; else {
1004
- updateElement(oldVNode, newVNode2, isSvgMode);
1005
- }
1291
+ updateElement(oldVNode, newVNode2, isSvgMode);
1006
1292
  }
1007
1293
  if (oldChildren !== null && newChildren !== null) {
1008
1294
  updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
@@ -1016,7 +1302,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
1016
1302
  !isInitialRender && BUILD.updatable && oldChildren !== null
1017
1303
  ) {
1018
1304
  removeVnodes(oldChildren, 0, oldChildren.length - 1);
1019
- }
1305
+ } else ;
1020
1306
  if (isSvgMode && tag === "svg") {
1021
1307
  isSvgMode = false;
1022
1308
  }
@@ -1026,45 +1312,19 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
1026
1312
  elm.data = text;
1027
1313
  }
1028
1314
  };
1029
- var updateFallbackSlotVisibility = (elm) => {
1030
- const childNodes = elm.childNodes;
1031
- for (const childNode of childNodes) {
1032
- if (childNode.nodeType === 1 /* ElementNode */) {
1033
- if (childNode["s-sr"]) {
1034
- const slotName = childNode["s-sn"];
1035
- childNode.hidden = false;
1036
- for (const siblingNode of childNodes) {
1037
- if (siblingNode !== childNode) {
1038
- if (siblingNode["s-hn"] !== childNode["s-hn"] || slotName !== "") {
1039
- if (siblingNode.nodeType === 1 /* ElementNode */ && (slotName === siblingNode.getAttribute("slot") || slotName === siblingNode["s-sn"]) || siblingNode.nodeType === 3 /* TextNode */ && slotName === siblingNode["s-sn"]) {
1040
- childNode.hidden = true;
1041
- break;
1042
- }
1043
- } else {
1044
- if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
1045
- childNode.hidden = true;
1046
- break;
1047
- }
1048
- }
1049
- }
1050
- }
1051
- }
1052
- updateFallbackSlotVisibility(childNode);
1053
- }
1054
- }
1055
- };
1056
1315
  var relocateNodes = [];
1057
1316
  var markSlotContentForRelocation = (elm) => {
1058
1317
  let node;
1059
1318
  let hostContentNodes;
1060
1319
  let j;
1061
- for (const childNode of elm.childNodes) {
1320
+ const children = elm.__childNodes || elm.childNodes;
1321
+ for (const childNode of children) {
1062
1322
  if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
1063
- hostContentNodes = node.parentNode.childNodes;
1323
+ hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
1064
1324
  const slotName = childNode["s-sn"];
1065
1325
  for (j = hostContentNodes.length - 1; j >= 0; j--) {
1066
1326
  node = hostContentNodes[j];
1067
- if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (!BUILD.experimentalSlotFixes )) {
1327
+ if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (true)) {
1068
1328
  if (isNodeLocatedInSlot(node, slotName)) {
1069
1329
  let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
1070
1330
  checkSlotFallbackVisibility = true;
@@ -1102,21 +1362,6 @@ var markSlotContentForRelocation = (elm) => {
1102
1362
  }
1103
1363
  }
1104
1364
  };
1105
- var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
1106
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1107
- if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
1108
- return true;
1109
- }
1110
- if (nodeToRelocate.getAttribute("slot") === slotName) {
1111
- return true;
1112
- }
1113
- return false;
1114
- }
1115
- if (nodeToRelocate["s-sn"] === slotName) {
1116
- return true;
1117
- }
1118
- return slotName === "";
1119
- };
1120
1365
  var nullifyVNodeRefs = (vNode) => {
1121
1366
  {
1122
1367
  vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
@@ -1124,15 +1369,17 @@ var nullifyVNodeRefs = (vNode) => {
1124
1369
  }
1125
1370
  };
1126
1371
  var insertBefore = (parent, newNode, reference) => {
1127
- const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
1128
- return inserted;
1372
+ {
1373
+ return parent == null ? void 0 : parent.insertBefore(newNode, reference);
1374
+ }
1129
1375
  };
1130
1376
  var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1131
1377
  var _a, _b, _c, _d;
1132
1378
  const hostElm = hostRef.$hostElement$;
1133
1379
  const cmpMeta = hostRef.$cmpMeta$;
1134
1380
  const oldVNode = hostRef.$vnode$ || newVNode(null, null);
1135
- const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
1381
+ const isHostElement = isHost(renderFnResults);
1382
+ const rootVnode = isHostElement ? renderFnResults : h(null, null, renderFnResults);
1136
1383
  hostTagName = hostElm.tagName;
1137
1384
  if (cmpMeta.$attrsToReflect$) {
1138
1385
  rootVnode.$attrs$ = rootVnode.$attrs$ || {};
@@ -1151,10 +1398,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1151
1398
  rootVnode.$flags$ |= 4 /* isHost */;
1152
1399
  hostRef.$vnode$ = rootVnode;
1153
1400
  rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
1154
- {
1155
- scopeId = hostElm["s-sc"];
1156
- }
1157
- useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
1401
+ useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
1158
1402
  {
1159
1403
  contentRef = hostElm["s-cr"];
1160
1404
  checkSlotFallbackVisibility = false;
@@ -1166,8 +1410,8 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1166
1410
  markSlotContentForRelocation(rootVnode.$elm$);
1167
1411
  for (const relocateData of relocateNodes) {
1168
1412
  const nodeToRelocate = relocateData.$nodeToRelocate$;
1169
- if (!nodeToRelocate["s-ol"]) {
1170
- const orgLocationNode = doc.createTextNode("");
1413
+ if (!nodeToRelocate["s-ol"] && win.document) {
1414
+ const orgLocationNode = win.document.createTextNode("");
1171
1415
  orgLocationNode["s-nr"] = nodeToRelocate;
1172
1416
  insertBefore(nodeToRelocate.parentNode, nodeToRelocate["s-ol"] = orgLocationNode, nodeToRelocate);
1173
1417
  }
@@ -1182,7 +1426,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1182
1426
  let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
1183
1427
  while (orgLocationNode) {
1184
1428
  let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
1185
- if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === refNode.parentNode) {
1429
+ if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === (refNode.__parentNode || refNode.parentNode)) {
1186
1430
  refNode = refNode.nextSibling;
1187
1431
  while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
1188
1432
  refNode = refNode == null ? void 0 : refNode.nextSibling;
@@ -1195,18 +1439,20 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1195
1439
  orgLocationNode = orgLocationNode.previousSibling;
1196
1440
  }
1197
1441
  }
1198
- if (!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode || nodeToRelocate.nextSibling !== insertBeforeNode) {
1442
+ const parent = nodeToRelocate.__parentNode || nodeToRelocate.parentNode;
1443
+ const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
1444
+ if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
1199
1445
  if (nodeToRelocate !== insertBeforeNode) {
1200
1446
  if (!nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
1201
1447
  nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
1202
1448
  }
1203
1449
  insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
1204
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1450
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
1205
1451
  nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
1206
1452
  }
1207
1453
  }
1208
1454
  }
1209
- nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](nodeToRelocate);
1455
+ nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](slotRefNode);
1210
1456
  } else {
1211
1457
  if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1212
1458
  if (isInitialLoad) {
@@ -1220,7 +1466,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1220
1466
  if (checkSlotFallbackVisibility) {
1221
1467
  updateFallbackSlotVisibility(rootVnode.$elm$);
1222
1468
  }
1223
- plt.$flags$ &= ~1 /* isTmpDisconnected */;
1469
+ plt.$flags$ &= -2 /* isTmpDisconnected */;
1224
1470
  relocateNodes.length = 0;
1225
1471
  }
1226
1472
  contentRef = void 0;
@@ -1229,7 +1475,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1229
1475
  // src/runtime/update-component.ts
1230
1476
  var attachToAncestor = (hostRef, ancestorComponent) => {
1231
1477
  if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
1232
- ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
1478
+ const index = ancestorComponent["s-p"].push(
1479
+ new Promise(
1480
+ (r) => hostRef.$onRenderResolve$ = () => {
1481
+ ancestorComponent["s-p"].splice(index - 1, 1);
1482
+ r();
1483
+ }
1484
+ )
1485
+ );
1233
1486
  }
1234
1487
  };
1235
1488
  var scheduleUpdate = (hostRef, isInitialLoad) => {
@@ -1242,6 +1495,12 @@ var scheduleUpdate = (hostRef, isInitialLoad) => {
1242
1495
  }
1243
1496
  attachToAncestor(hostRef, hostRef.$ancestorComponent$);
1244
1497
  const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
1498
+ if (isInitialLoad) {
1499
+ queueMicrotask(() => {
1500
+ dispatch();
1501
+ });
1502
+ return;
1503
+ }
1245
1504
  return writeTask(dispatch) ;
1246
1505
  };
1247
1506
  var dispatchHooks = (hostRef, isInitialLoad) => {
@@ -1258,18 +1517,15 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
1258
1517
  {
1259
1518
  hostRef.$flags$ |= 256 /* isListenReady */;
1260
1519
  if (hostRef.$queuedListeners$) {
1261
- hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
1520
+ hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
1262
1521
  hostRef.$queuedListeners$ = void 0;
1263
1522
  }
1264
1523
  }
1265
- {
1266
- maybePromise = safeCall(instance, "componentWillLoad");
1267
- }
1524
+ maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
1268
1525
  } else {
1269
- {
1270
- maybePromise = safeCall(instance, "componentWillUpdate");
1271
- }
1526
+ maybePromise = safeCall(instance, "componentWillUpdate", void 0, elm);
1272
1527
  }
1528
+ maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
1273
1529
  endSchedule();
1274
1530
  return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
1275
1531
  };
@@ -1312,7 +1568,7 @@ var callRender = (hostRef, instance, elm, isInitialLoad) => {
1312
1568
  try {
1313
1569
  instance = instance.render && instance.render();
1314
1570
  {
1315
- hostRef.$flags$ &= ~16 /* isQueuedForUpdate */;
1571
+ hostRef.$flags$ &= -17 /* isQueuedForUpdate */;
1316
1572
  }
1317
1573
  {
1318
1574
  hostRef.$flags$ |= 2 /* hasRendered */;
@@ -1335,17 +1591,13 @@ var postUpdateComponent = (hostRef) => {
1335
1591
  const endPostUpdate = createTime("postUpdate", tagName);
1336
1592
  const instance = hostRef.$lazyInstance$ ;
1337
1593
  const ancestorComponent = hostRef.$ancestorComponent$;
1338
- {
1339
- safeCall(instance, "componentDidRender");
1340
- }
1594
+ safeCall(instance, "componentDidRender", void 0, elm);
1341
1595
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
1342
1596
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
1343
1597
  {
1344
1598
  addHydratedFlag(elm);
1345
1599
  }
1346
- {
1347
- safeCall(instance, "componentDidLoad");
1348
- }
1600
+ safeCall(instance, "componentDidLoad", void 0, elm);
1349
1601
  endPostUpdate();
1350
1602
  {
1351
1603
  hostRef.$onReadyResolve$(elm);
@@ -1354,9 +1606,7 @@ var postUpdateComponent = (hostRef) => {
1354
1606
  }
1355
1607
  }
1356
1608
  } else {
1357
- {
1358
- safeCall(instance, "componentDidUpdate");
1359
- }
1609
+ safeCall(instance, "componentDidUpdate", void 0, elm);
1360
1610
  endPostUpdate();
1361
1611
  }
1362
1612
  {
@@ -1370,13 +1620,14 @@ var postUpdateComponent = (hostRef) => {
1370
1620
  if (hostRef.$flags$ & 512 /* needsRerender */) {
1371
1621
  nextTick(() => scheduleUpdate(hostRef, false));
1372
1622
  }
1373
- hostRef.$flags$ &= ~(4 /* isWaitingForChildren */ | 512 /* needsRerender */);
1623
+ hostRef.$flags$ &= -517;
1374
1624
  }
1375
1625
  };
1376
1626
  var forceUpdate = (ref) => {
1627
+ var _a;
1377
1628
  {
1378
1629
  const hostRef = getHostRef(ref);
1379
- const isConnected = hostRef.$hostElement$.isConnected;
1630
+ const isConnected = (_a = hostRef == null ? void 0 : hostRef.$hostElement$) == null ? void 0 : _a.isConnected;
1380
1631
  if (isConnected && (hostRef.$flags$ & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
1381
1632
  scheduleUpdate(hostRef, false);
1382
1633
  }
@@ -1384,17 +1635,14 @@ var forceUpdate = (ref) => {
1384
1635
  }
1385
1636
  };
1386
1637
  var appDidLoad = (who) => {
1387
- {
1388
- addHydratedFlag(doc.documentElement);
1389
- }
1390
1638
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
1391
1639
  };
1392
- var safeCall = (instance, method, arg) => {
1640
+ var safeCall = (instance, method, arg, elm) => {
1393
1641
  if (instance && instance[method]) {
1394
1642
  try {
1395
1643
  return instance[method](arg);
1396
1644
  } catch (e) {
1397
- consoleError(e);
1645
+ consoleError(e, elm);
1398
1646
  }
1399
1647
  }
1400
1648
  return void 0;
@@ -1408,16 +1656,21 @@ var addHydratedFlag = (elm) => {
1408
1656
  var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
1409
1657
  var setValue = (ref, propName, newVal, cmpMeta) => {
1410
1658
  const hostRef = getHostRef(ref);
1659
+ if (!hostRef) {
1660
+ return;
1661
+ }
1411
1662
  if (!hostRef) {
1412
1663
  throw new Error(
1413
- `Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`
1664
+ `Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`
1414
1665
  );
1415
1666
  }
1416
1667
  const elm = hostRef.$hostElement$ ;
1417
1668
  const oldVal = hostRef.$instanceValues$.get(propName);
1418
1669
  const flags = hostRef.$flags$;
1419
1670
  const instance = hostRef.$lazyInstance$ ;
1420
- newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
1671
+ newVal = parsePropertyValue(
1672
+ newVal,
1673
+ cmpMeta.$members$[propName][0]);
1421
1674
  const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
1422
1675
  const didValueChange = newVal !== oldVal && !areBothNaN;
1423
1676
  if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
@@ -1436,6 +1689,11 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
1436
1689
  }
1437
1690
  }
1438
1691
  if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
1692
+ if (instance.componentShouldUpdate) {
1693
+ if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
1694
+ return;
1695
+ }
1696
+ }
1439
1697
  scheduleUpdate(hostRef, false);
1440
1698
  }
1441
1699
  }
@@ -1453,15 +1711,77 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1453
1711
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
1454
1712
  members.map(([memberName, [memberFlags]]) => {
1455
1713
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
1714
+ const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
1715
+ if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
1716
+ if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
1717
+ if (flags & 1 /* isElementConstructor */ || !origGetter) {
1718
+ Object.defineProperty(prototype, memberName, {
1719
+ get() {
1720
+ {
1721
+ if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
1722
+ return getValue(this, memberName);
1723
+ }
1724
+ const ref = getHostRef(this);
1725
+ const instance = ref ? ref.$lazyInstance$ : prototype;
1726
+ if (!instance) return;
1727
+ return instance[memberName];
1728
+ }
1729
+ },
1730
+ configurable: true,
1731
+ enumerable: true
1732
+ });
1733
+ }
1456
1734
  Object.defineProperty(prototype, memberName, {
1457
- get() {
1458
- return getValue(this, memberName);
1459
- },
1460
1735
  set(newValue) {
1461
- setValue(this, memberName, newValue, cmpMeta);
1462
- },
1463
- configurable: true,
1464
- enumerable: true
1736
+ const ref = getHostRef(this);
1737
+ if (!ref) {
1738
+ return;
1739
+ }
1740
+ if (origSetter) {
1741
+ const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
1742
+ if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
1743
+ newValue = ref.$instanceValues$.get(memberName);
1744
+ } else if (!ref.$instanceValues$.get(memberName) && currentValue) {
1745
+ ref.$instanceValues$.set(memberName, currentValue);
1746
+ }
1747
+ origSetter.apply(this, [
1748
+ parsePropertyValue(
1749
+ newValue,
1750
+ memberFlags)
1751
+ ]);
1752
+ newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
1753
+ setValue(this, memberName, newValue, cmpMeta);
1754
+ return;
1755
+ }
1756
+ {
1757
+ if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
1758
+ setValue(this, memberName, newValue, cmpMeta);
1759
+ if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
1760
+ ref.$onReadyPromise$.then(() => {
1761
+ if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
1762
+ ref.$lazyInstance$[memberName] = newValue;
1763
+ }
1764
+ });
1765
+ }
1766
+ return;
1767
+ }
1768
+ const setterSetVal = () => {
1769
+ const currentValue = ref.$lazyInstance$[memberName];
1770
+ if (!ref.$instanceValues$.get(memberName) && currentValue) {
1771
+ ref.$instanceValues$.set(memberName, currentValue);
1772
+ }
1773
+ ref.$lazyInstance$[memberName] = parsePropertyValue(
1774
+ newValue,
1775
+ memberFlags);
1776
+ setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
1777
+ };
1778
+ if (ref.$lazyInstance$) {
1779
+ setterSetVal();
1780
+ } else {
1781
+ ref.$onReadyPromise$.then(() => setterSetVal());
1782
+ }
1783
+ }
1784
+ }
1465
1785
  });
1466
1786
  } else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
1467
1787
  Object.defineProperty(prototype, memberName, {
@@ -1482,7 +1802,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1482
1802
  plt.jmp(() => {
1483
1803
  var _a2;
1484
1804
  const propName = attrNameToPropName.get(attrName);
1485
- if (this.hasOwnProperty(propName)) {
1805
+ if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
1486
1806
  newValue = this[propName];
1487
1807
  delete this[propName];
1488
1808
  } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
@@ -1491,7 +1811,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1491
1811
  } else if (propName == null) {
1492
1812
  const hostRef = getHostRef(this);
1493
1813
  const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
1494
- if (flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
1814
+ if (hostRef && flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
1495
1815
  const instance = hostRef.$lazyInstance$ ;
1496
1816
  const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
1497
1817
  entry == null ? void 0 : entry.forEach((callbackName) => {
@@ -1502,7 +1822,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1502
1822
  }
1503
1823
  return;
1504
1824
  }
1505
- this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1825
+ const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
1826
+ newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1827
+ if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
1828
+ this[propName] = newValue;
1829
+ }
1506
1830
  });
1507
1831
  };
1508
1832
  Cstr.observedAttributes = Array.from(
@@ -1531,7 +1855,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1531
1855
  hostRef.$flags$ |= 32 /* hasInitializedComponent */;
1532
1856
  const bundleId = cmpMeta.$lazyBundleId$;
1533
1857
  if (bundleId) {
1534
- const CstrImport = loadModule(cmpMeta);
1858
+ const CstrImport = loadModule(cmpMeta, hostRef);
1535
1859
  if (CstrImport && "then" in CstrImport) {
1536
1860
  const endLoad = uniqueTime();
1537
1861
  Cstr = await CstrImport;
@@ -1556,15 +1880,16 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1556
1880
  try {
1557
1881
  new Cstr(hostRef);
1558
1882
  } catch (e) {
1559
- consoleError(e);
1883
+ consoleError(e, elm);
1560
1884
  }
1561
1885
  {
1562
- hostRef.$flags$ &= ~8 /* isConstructingInstance */;
1886
+ hostRef.$flags$ &= -9 /* isConstructingInstance */;
1563
1887
  }
1564
1888
  {
1565
1889
  hostRef.$flags$ |= 128 /* isWatchReady */;
1566
1890
  }
1567
1891
  endNewInstance();
1892
+ fireConnectedCallback(hostRef.$lazyInstance$, elm);
1568
1893
  } else {
1569
1894
  Cstr = elm.constructor;
1570
1895
  const cmpTag = elm.localName;
@@ -1591,13 +1916,19 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1591
1916
  schedule();
1592
1917
  }
1593
1918
  };
1594
- var fireConnectedCallback = (instance) => {
1919
+ var fireConnectedCallback = (instance, elm) => {
1920
+ {
1921
+ safeCall(instance, "connectedCallback", void 0, elm);
1922
+ }
1595
1923
  };
1596
1924
 
1597
1925
  // src/runtime/connected-callback.ts
1598
1926
  var connectedCallback = (elm) => {
1599
1927
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1600
1928
  const hostRef = getHostRef(elm);
1929
+ if (!hostRef) {
1930
+ return;
1931
+ }
1601
1932
  const cmpMeta = hostRef.$cmpMeta$;
1602
1933
  const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
1603
1934
  if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
@@ -1631,52 +1962,72 @@ var connectedCallback = (elm) => {
1631
1962
  }
1632
1963
  } else {
1633
1964
  addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1634
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1635
- hostRef.$onReadyPromise$.then(() => fireConnectedCallback());
1965
+ if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1966
+ fireConnectedCallback(hostRef.$lazyInstance$, elm);
1967
+ } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1968
+ hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
1636
1969
  }
1637
1970
  }
1638
1971
  endConnected();
1639
1972
  }
1640
1973
  };
1641
1974
  var setContentReference = (elm) => {
1642
- const contentRefElm = elm["s-cr"] = doc.createComment(
1975
+ if (!win.document) {
1976
+ return;
1977
+ }
1978
+ const contentRefElm = elm["s-cr"] = win.document.createComment(
1643
1979
  ""
1644
1980
  );
1645
1981
  contentRefElm["s-cn"] = true;
1646
1982
  insertBefore(elm, contentRefElm, elm.firstChild);
1647
1983
  };
1648
- var disconnectInstance = (instance) => {
1984
+ var disconnectInstance = (instance, elm) => {
1985
+ {
1986
+ safeCall(instance, "disconnectedCallback", void 0, elm || instance);
1987
+ }
1649
1988
  };
1650
1989
  var disconnectedCallback = async (elm) => {
1651
1990
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1652
1991
  const hostRef = getHostRef(elm);
1653
1992
  {
1654
- if (hostRef.$rmListeners$) {
1993
+ if (hostRef == null ? void 0 : hostRef.$rmListeners$) {
1655
1994
  hostRef.$rmListeners$.map((rmListener) => rmListener());
1656
1995
  hostRef.$rmListeners$ = void 0;
1657
1996
  }
1658
1997
  }
1659
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1660
- hostRef.$onReadyPromise$.then(() => disconnectInstance());
1998
+ if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1999
+ disconnectInstance(hostRef.$lazyInstance$, elm);
2000
+ } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
2001
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
1661
2002
  }
1662
2003
  }
2004
+ if (rootAppliedStyles.has(elm)) {
2005
+ rootAppliedStyles.delete(elm);
2006
+ }
2007
+ if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
2008
+ rootAppliedStyles.delete(elm.shadowRoot);
2009
+ }
1663
2010
  };
1664
2011
 
1665
2012
  // src/runtime/bootstrap-lazy.ts
1666
2013
  var bootstrapLazy = (lazyBundles, options = {}) => {
1667
2014
  var _a;
2015
+ if (!win.document) {
2016
+ console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");
2017
+ return;
2018
+ }
1668
2019
  const endBootstrap = createTime();
1669
2020
  const cmpTags = [];
1670
2021
  const exclude = options.exclude || [];
1671
2022
  const customElements2 = win.customElements;
1672
- const head = doc.head;
2023
+ const head = win.document.head;
1673
2024
  const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
1674
- const dataStyles = /* @__PURE__ */ doc.createElement("style");
2025
+ const dataStyles = /* @__PURE__ */ win.document.createElement("style");
1675
2026
  const deferredConnectedCallbacks = [];
1676
2027
  let appLoadFallback;
1677
2028
  let isBootstrapping = true;
1678
2029
  Object.assign(plt, options);
1679
- plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", doc.baseURI).href;
2030
+ plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", win.document.baseURI).href;
1680
2031
  let hasSlotRelocation = false;
1681
2032
  lazyBundles.map((lazyBundle) => {
1682
2033
  lazyBundle[1].map((compactMeta) => {
@@ -1713,12 +2064,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1713
2064
  if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
1714
2065
  {
1715
2066
  if (!self.shadowRoot) {
1716
- {
1717
- self.attachShadow({
1718
- mode: "open",
1719
- delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */)
1720
- });
1721
- }
2067
+ createShadowRoot.call(self, cmpMeta);
1722
2068
  } else {
1723
2069
  if (self.shadowRoot.mode !== "open") {
1724
2070
  throw new Error(
@@ -1731,6 +2077,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1731
2077
  }
1732
2078
  connectedCallback() {
1733
2079
  const hostRef = getHostRef(this);
2080
+ if (!hostRef) {
2081
+ return;
2082
+ }
1734
2083
  if (!this.hasRegisteredEventListeners) {
1735
2084
  this.hasRegisteredEventListeners = true;
1736
2085
  addHostEventListeners(this, hostRef, cmpMeta.$listeners$);
@@ -1747,9 +2096,24 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1747
2096
  }
1748
2097
  disconnectedCallback() {
1749
2098
  plt.jmp(() => disconnectedCallback(this));
2099
+ plt.raf(() => {
2100
+ var _a3;
2101
+ const hostRef = getHostRef(this);
2102
+ if (!hostRef) {
2103
+ return;
2104
+ }
2105
+ const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
2106
+ if (i2 > -1) {
2107
+ deferredConnectedCallbacks.splice(i2, 1);
2108
+ }
2109
+ if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
2110
+ delete hostRef.$vnode$.$elm$;
2111
+ }
2112
+ });
1750
2113
  }
1751
2114
  componentOnReady() {
1752
- return getHostRef(this).$onReadyPromise$;
2115
+ var _a3;
2116
+ return (_a3 = getHostRef(this)) == null ? void 0 : _a3.$onReadyPromise$;
1753
2117
  }
1754
2118
  };
1755
2119
  cmpMeta.$lazyBundleId$ = lazyBundle[0];
@@ -1771,7 +2135,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1771
2135
  }
1772
2136
  if (dataStyles.innerHTML.length) {
1773
2137
  dataStyles.setAttribute("data-styles", "");
1774
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
2138
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
1775
2139
  if (nonce != null) {
1776
2140
  dataStyles.setAttribute("nonce", nonce);
1777
2141
  }
@@ -1792,9 +2156,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1792
2156
  // src/runtime/fragment.ts
1793
2157
  var Fragment = (_, children) => children;
1794
2158
  var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
1795
- if (listeners) {
2159
+ if (listeners && win.document) {
1796
2160
  listeners.map(([flags, name, method]) => {
1797
- const target = getHostListenerTarget(elm, flags) ;
2161
+ const target = getHostListenerTarget(win.document, elm, flags) ;
1798
2162
  const handler = hostListenerProxy(hostRef, method);
1799
2163
  const opts = hostListenerOpts(flags);
1800
2164
  plt.ael(target, name, handler, opts);
@@ -1813,12 +2177,16 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
1813
2177
  }
1814
2178
  }
1815
2179
  } catch (e) {
1816
- consoleError(e);
2180
+ consoleError(e, hostRef.$hostElement$);
1817
2181
  }
1818
2182
  };
1819
- var getHostListenerTarget = (elm, flags) => {
1820
- if (flags & 4 /* TargetDocument */) return doc;
1821
- if (flags & 8 /* TargetWindow */) return win;
2183
+ var getHostListenerTarget = (doc, elm, flags) => {
2184
+ if (flags & 4 /* TargetDocument */) {
2185
+ return doc;
2186
+ }
2187
+ if (flags & 8 /* TargetWindow */) {
2188
+ return win;
2189
+ }
1822
2190
  return elm;
1823
2191
  };
1824
2192
  var hostListenerOpts = (flags) => supportsListenerOptions ? {
@@ -1829,4 +2197,4 @@ var hostListenerOpts = (flags) => supportsListenerOptions ? {
1829
2197
  // src/runtime/nonce.ts
1830
2198
  var setNonce = (nonce) => plt.$nonce$ = nonce;
1831
2199
 
1832
- export { Fragment as F, Host as H, bootstrapLazy as b, createEvent as c, forceUpdate as f, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
2200
+ export { Fragment as F, Host as H, getElement as a, bootstrapLazy as b, createEvent as c, forceUpdate as f, globalFn as g, h, promiseResolve as p, registerInstance as r, setNonce as s };