voyager-ionic-core 8.5.7 → 8.6.1

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 (811) hide show
  1. package/components/action-sheet.js +37 -23
  2. package/components/alert.js +42 -26
  3. package/components/animation.js +2 -2
  4. package/components/backdrop.js +11 -4
  5. package/components/button-active.js +1 -1
  6. package/components/button.js +53 -29
  7. package/components/buttons.js +14 -4
  8. package/components/capacitor.js +1 -1
  9. package/components/checkbox.js +40 -16
  10. package/components/config.js +1 -1
  11. package/components/content.js +24 -5
  12. package/components/data.js +31 -6
  13. package/components/gesture-controller.js +1 -1
  14. package/components/haptic.js +1 -1
  15. package/components/hardware-back-button.js +2 -2
  16. package/components/header.js +12 -7
  17. package/components/helpers.js +3 -6
  18. package/components/icon.js +1 -2
  19. package/components/index.js +1 -1
  20. package/components/index2.js +1 -1
  21. package/components/index3.js +3 -5
  22. package/components/index4.js +1 -1
  23. package/components/index5.js +2 -2
  24. package/components/index6.js +28 -3
  25. package/components/index7.js +163 -27
  26. package/components/index8.js +1 -1
  27. package/components/index9.js +3 -163
  28. package/components/input-shims.js +25 -2
  29. package/components/input.utils.js +2 -2
  30. package/components/ion-accordion-group.js +20 -7
  31. package/components/ion-accordion.js +32 -14
  32. package/components/ion-app.js +4 -5
  33. package/components/ion-avatar.js +2 -4
  34. package/components/ion-back-button.js +12 -13
  35. package/components/ion-badge.js +2 -5
  36. package/components/ion-breadcrumb.js +22 -20
  37. package/components/ion-breadcrumbs.js +14 -10
  38. package/components/ion-card-content.js +2 -4
  39. package/components/ion-card-header.js +7 -5
  40. package/components/ion-card-subtitle.js +2 -5
  41. package/components/ion-card-title.js +2 -5
  42. package/components/ion-card.js +16 -11
  43. package/components/ion-chip.js +8 -5
  44. package/components/ion-col.js +1 -26
  45. package/components/ion-datetime-button.js +16 -14
  46. package/components/ion-datetime.js +222 -131
  47. package/components/ion-fab-button.js +37 -20
  48. package/components/ion-fab-list.js +7 -2
  49. package/components/ion-fab.js +10 -4
  50. package/components/ion-footer.js +13 -8
  51. package/components/ion-grid.js +4 -2
  52. package/components/ion-img.js +1 -6
  53. package/components/ion-infinite-scroll-content.js +2 -6
  54. package/components/ion-infinite-scroll.js +27 -6
  55. package/components/ion-input-otp.d.ts +11 -0
  56. package/components/ion-input-otp.js +631 -0
  57. package/components/ion-input-password-toggle.js +11 -13
  58. package/components/ion-input.js +79 -51
  59. package/components/ion-item-divider.js +11 -7
  60. package/components/ion-item-group.js +3 -5
  61. package/components/ion-item-option.js +16 -14
  62. package/components/ion-item-options.js +7 -5
  63. package/components/ion-item-sliding.js +8 -5
  64. package/components/ion-loading.js +38 -21
  65. package/components/ion-menu-button.js +17 -12
  66. package/components/ion-menu-toggle.js +11 -7
  67. package/components/ion-menu.js +28 -12
  68. package/components/ion-nav-link.js +7 -7
  69. package/components/ion-nav.js +9 -12
  70. package/components/ion-note.js +4 -7
  71. package/components/ion-picker-legacy.js +47 -27
  72. package/components/ion-progress-bar.js +20 -7
  73. package/components/ion-range.js +69 -29
  74. package/components/ion-refresher-content.js +2 -6
  75. package/components/ion-refresher.js +56 -8
  76. package/components/ion-reorder-group.js +7 -5
  77. package/components/ion-reorder.js +4 -6
  78. package/components/ion-route-redirect.js +0 -2
  79. package/components/ion-route.js +9 -7
  80. package/components/ion-router-link.js +9 -11
  81. package/components/ion-router-outlet.js +12 -10
  82. package/components/ion-router.js +19 -1
  83. package/components/ion-row.js +2 -3
  84. package/components/ion-searchbar.js +82 -33
  85. package/components/ion-segment-button.js +22 -13
  86. package/components/ion-segment-content.js +2 -3
  87. package/components/ion-segment-view.js +7 -7
  88. package/components/ion-segment.js +24 -13
  89. package/components/ion-select-option.js +5 -4
  90. package/components/ion-select.js +68 -34
  91. package/components/ion-skeleton-text.js +6 -4
  92. package/components/ion-split-pane.js +13 -8
  93. package/components/ion-tab-bar.js +9 -8
  94. package/components/ion-tab-button.js +12 -14
  95. package/components/ion-tab.js +5 -8
  96. package/components/ion-tabs.js +5 -6
  97. package/components/ion-text.js +3 -5
  98. package/components/ion-textarea.js +72 -36
  99. package/components/ion-thumbnail.js +2 -3
  100. package/components/ion-toast.js +58 -35
  101. package/components/ion-toggle.js +55 -24
  102. package/components/ionic-global.js +1 -1
  103. package/components/item.js +20 -14
  104. package/components/keyboard-controller.js +2 -2
  105. package/components/keyboard.js +134 -69
  106. package/components/keyboard2.js +69 -134
  107. package/components/label.js +4 -8
  108. package/components/list-header.js +4 -8
  109. package/components/list.js +6 -6
  110. package/components/modal.js +252 -205
  111. package/components/notch-controller.js +1 -1
  112. package/components/overlays.js +3 -3
  113. package/components/picker-column-option.js +20 -7
  114. package/components/picker-column.js +25 -10
  115. package/components/picker-column2.js +8 -11
  116. package/components/picker.js +2 -4
  117. package/components/popover.js +132 -40
  118. package/components/radio-group.js +11 -11
  119. package/components/radio.js +30 -16
  120. package/components/refresher.utils.js +2 -2
  121. package/components/ripple-effect.js +11 -3
  122. package/components/select-modal.js +4 -9
  123. package/components/select-popover.js +6 -9
  124. package/components/spinner.js +5 -6
  125. package/components/swipe-back.js +1 -1
  126. package/components/title.js +4 -8
  127. package/components/toolbar.js +4 -7
  128. package/css/core.css +1 -1
  129. package/css/core.css.map +1 -1
  130. package/css/global.bundle.css +1 -1
  131. package/css/global.bundle.css.map +1 -1
  132. package/css/ionic.bundle.css +1 -1
  133. package/css/ionic.bundle.css.map +1 -1
  134. package/css/structure.css +1 -1
  135. package/css/structure.css.map +1 -1
  136. package/dist/cjs/{animation-ab2d3449.js → animation-0T7gKwOt.js} +2 -2
  137. package/dist/cjs/{button-active-43e2b419.js → button-active-C-4ud7Ht.js} +3 -3
  138. package/dist/cjs/{capacitor-c04564bf.js → capacitor-DmA66EwP.js} +1 -1
  139. package/dist/cjs/{config-f6225ae7.js → config-U7OAuj53.js} +1 -1
  140. package/dist/cjs/{data-94e8d392.js → data-DRqa6oM4.js} +30 -5
  141. package/dist/cjs/{framework-delegate-862d9d00.js → framework-delegate-C7sIJyT5.js} +1 -1
  142. package/dist/cjs/{gesture-controller-9436f482.js → gesture-controller-dtqlP_q4.js} +1 -1
  143. package/dist/cjs/{haptic-f6b37aa3.js → haptic-ClPPQ_PS.js} +1 -1
  144. package/dist/cjs/{hardware-back-button-3d2b1004.js → hardware-back-button-D90qZxju.js} +2 -2
  145. package/dist/cjs/{helpers-8a48fdea.js → helpers-BITAzJfi.js} +2 -5
  146. package/dist/cjs/{index-dbe01e08.js → index-BDBT0u4l.js} +3 -3
  147. package/dist/cjs/{index-ee07ed59.js → index-CAvQ7Tka.js} +3 -4
  148. package/dist/cjs/{index-073c7cdc.js → index-CPbAsnJK.js} +1 -0
  149. package/dist/cjs/{index-31b07b9c.js → index-CVa6JE57.js} +3 -3
  150. package/dist/cjs/{index-a96d31ae.js → index-CxfLS2mX.js} +8 -9
  151. package/dist/cjs/{index-2e236a04.js → index-DODXXb_r.js} +1676 -675
  152. package/dist/cjs/{index-1eff7149.js → index-y0QaNtCi.js} +6 -7
  153. package/dist/cjs/index.cjs.js +22 -28
  154. package/dist/cjs/{input-shims-415be7ee.js → input-shims-D1Mfgd4s.js} +29 -6
  155. package/dist/cjs/{input.utils-a7957fd6.js → input.utils-DSoBEyUu.js} +3 -3
  156. package/dist/cjs/ion-accordion_2.cjs.entry.js +56 -29
  157. package/dist/cjs/ion-action-sheet.cjs.entry.js +50 -40
  158. package/dist/cjs/ion-alert.cjs.entry.js +59 -47
  159. package/dist/cjs/ion-app_8.cjs.entry.js +134 -105
  160. package/dist/cjs/ion-avatar_3.cjs.entry.js +10 -20
  161. package/dist/cjs/ion-back-button.cjs.entry.js +21 -26
  162. package/dist/cjs/ion-backdrop.cjs.entry.js +13 -10
  163. package/dist/cjs/ion-breadcrumb_2.cjs.entry.js +39 -37
  164. package/dist/cjs/ion-button_2.cjs.entry.js +54 -37
  165. package/dist/cjs/ion-card_5.cjs.entry.js +36 -41
  166. package/dist/cjs/ion-checkbox.cjs.entry.js +44 -24
  167. package/dist/cjs/ion-chip.cjs.entry.js +11 -12
  168. package/dist/cjs/ion-col_3.cjs.entry.js +10 -38
  169. package/dist/cjs/ion-datetime-button.cjs.entry.js +23 -25
  170. package/dist/cjs/ion-datetime_3.cjs.entry.js +344 -241
  171. package/dist/cjs/ion-fab_3.cjs.entry.js +59 -35
  172. package/dist/cjs/ion-img.cjs.entry.js +4 -13
  173. package/dist/cjs/ion-infinite-scroll_2.cjs.entry.js +38 -25
  174. package/dist/cjs/ion-input-otp.cjs.entry.js +593 -0
  175. package/dist/cjs/ion-input-password-toggle.cjs.entry.js +17 -23
  176. package/dist/cjs/ion-input.cjs.entry.js +86 -62
  177. package/dist/cjs/ion-item-option_3.cjs.entry.js +40 -37
  178. package/dist/cjs/ion-item_8.cjs.entry.js +69 -74
  179. package/dist/cjs/ion-loading.cjs.entry.js +50 -37
  180. package/dist/cjs/ion-menu_3.cjs.entry.js +84 -63
  181. package/dist/cjs/ion-modal.cjs.entry.js +271 -228
  182. package/dist/cjs/ion-nav_2.cjs.entry.js +30 -37
  183. package/dist/cjs/ion-picker-column-option.cjs.entry.js +24 -15
  184. package/dist/cjs/ion-picker-column.cjs.entry.js +32 -21
  185. package/dist/cjs/ion-picker.cjs.entry.js +4 -9
  186. package/dist/cjs/ion-popover.cjs.entry.js +143 -55
  187. package/dist/cjs/ion-progress-bar.cjs.entry.js +24 -15
  188. package/dist/cjs/ion-radio_2.cjs.entry.js +47 -37
  189. package/dist/cjs/ion-range.cjs.entry.js +78 -42
  190. package/dist/cjs/ion-refresher_2.cjs.entry.js +81 -41
  191. package/dist/cjs/ion-reorder_2.cjs.entry.js +19 -23
  192. package/dist/cjs/ion-ripple-effect.cjs.entry.js +13 -9
  193. package/dist/cjs/ion-route_4.cjs.entry.js +52 -40
  194. package/dist/cjs/ion-searchbar.cjs.entry.js +91 -46
  195. package/dist/cjs/ion-segment-content.cjs.entry.js +3 -6
  196. package/dist/cjs/ion-segment-view.cjs.entry.js +8 -10
  197. package/dist/cjs/ion-segment_2.cjs.entry.js +55 -39
  198. package/dist/cjs/ion-select-modal.cjs.entry.js +12 -21
  199. package/dist/cjs/ion-select_3.cjs.entry.js +98 -70
  200. package/dist/cjs/ion-spinner.cjs.entry.js +12 -17
  201. package/dist/cjs/ion-split-pane.cjs.entry.js +16 -15
  202. package/dist/cjs/ion-tab-bar_2.cjs.entry.js +31 -36
  203. package/dist/cjs/ion-tab_2.cjs.entry.js +13 -20
  204. package/dist/cjs/ion-text.cjs.entry.js +6 -12
  205. package/dist/cjs/ion-textarea.cjs.entry.js +79 -47
  206. package/dist/cjs/ion-toast.cjs.entry.js +82 -63
  207. package/dist/cjs/ion-toggle.cjs.entry.js +64 -37
  208. package/dist/cjs/ionic.cjs.js +7 -10
  209. package/dist/cjs/{ios.transition-a131cd4d.js → ios.transition-baEy2tr4.js} +5 -6
  210. package/dist/cjs/{keyboard-0272231f.js → keyboard-UuAS4D_9.js} +1 -1
  211. package/dist/cjs/{keyboard-controller-c05e747a.js → keyboard-controller-GXBiBRKS.js} +2 -2
  212. package/dist/cjs/{keyboard-af1bb365.js → keyboard-hHzlEQpk.js} +3 -3
  213. package/dist/cjs/loader.cjs.js +3 -8
  214. package/dist/cjs/{md.transition-e018ebe5.js → md.transition-Bvc-JrM5.js} +5 -6
  215. package/dist/cjs/{notch-controller-09b7f358.js → notch-controller-BAbqGXRi.js} +2 -2
  216. package/dist/cjs/{overlays-4c291a05.js → overlays-DRDumz2b.js} +9 -10
  217. package/dist/cjs/{status-tap-f1acefac.js → status-tap-Db3WeCkO.js} +3 -4
  218. package/dist/cjs/{swipe-back-442ca3d7.js → swipe-back-bLyc4PSi.js} +5 -5
  219. package/dist/collection/collection-manifest.json +3 -2
  220. package/dist/collection/components/accordion/accordion.js +43 -13
  221. package/dist/collection/components/accordion-group/accordion-group.js +35 -8
  222. package/dist/collection/components/action-sheet/action-sheet.js +84 -31
  223. package/dist/collection/components/alert/alert.js +94 -34
  224. package/dist/collection/components/back-button/back-button.js +30 -14
  225. package/dist/collection/components/backdrop/backdrop.js +18 -3
  226. package/dist/collection/components/badge/badge.js +3 -4
  227. package/dist/collection/components/breadcrumb/breadcrumb.js +57 -26
  228. package/dist/collection/components/breadcrumbs/breadcrumbs.js +24 -10
  229. package/dist/collection/components/button/button.js +97 -36
  230. package/dist/collection/components/buttons/buttons.js +15 -1
  231. package/dist/collection/components/card/card.js +44 -16
  232. package/dist/collection/components/card-header/card-header.js +11 -3
  233. package/dist/collection/components/card-subtitle/card-subtitle.js +3 -4
  234. package/dist/collection/components/card-title/card-title.js +3 -4
  235. package/dist/collection/components/checkbox/checkbox.js +74 -24
  236. package/dist/collection/components/chip/chip.js +15 -4
  237. package/dist/collection/components/col/col.js +72 -50
  238. package/dist/collection/components/content/content.js +43 -9
  239. package/dist/collection/components/datetime/datetime.ios.css +7 -2
  240. package/dist/collection/components/datetime/datetime.js +323 -147
  241. package/dist/collection/components/datetime/datetime.md.css +9 -3
  242. package/dist/collection/components/datetime/utils/data.js +29 -4
  243. package/dist/collection/components/datetime-button/datetime-button.js +21 -11
  244. package/dist/collection/components/fab/fab.js +21 -6
  245. package/dist/collection/components/fab-button/fab-button.js +76 -28
  246. package/dist/collection/components/fab-list/fab-list.js +12 -2
  247. package/dist/collection/components/footer/footer.js +16 -5
  248. package/dist/collection/components/grid/grid.js +6 -1
  249. package/dist/collection/components/header/header.js +15 -4
  250. package/dist/collection/components/img/img.js +6 -6
  251. package/dist/collection/components/infinite-scroll/infinite-scroll.js +35 -7
  252. package/dist/collection/components/infinite-scroll-content/infinite-scroll-content.js +6 -4
  253. package/dist/collection/components/input/input.js +178 -79
  254. package/dist/collection/components/input-otp/input-otp-interface.js +1 -0
  255. package/dist/collection/components/input-otp/input-otp.ios.css +381 -0
  256. package/dist/collection/components/input-otp/input-otp.js +1003 -0
  257. package/dist/collection/components/input-otp/input-otp.md.css +381 -0
  258. package/dist/collection/components/input-password-toggle/input-password-toggle.js +19 -11
  259. package/dist/collection/components/item/item.js +56 -21
  260. package/dist/collection/components/item-divider/item-divider.js +15 -5
  261. package/dist/collection/components/item-group/item-group.js +1 -1
  262. package/dist/collection/components/item-option/item-option.js +38 -18
  263. package/dist/collection/components/item-options/item-options.js +8 -2
  264. package/dist/collection/components/item-sliding/item-sliding.js +9 -3
  265. package/dist/collection/components/label/label.js +8 -6
  266. package/dist/collection/components/list/list.js +10 -4
  267. package/dist/collection/components/list-header/list-header.js +8 -8
  268. package/dist/collection/components/loading/loading.js +88 -31
  269. package/dist/collection/components/menu/menu.js +44 -12
  270. package/dist/collection/components/menu-button/menu-button.js +29 -12
  271. package/dist/collection/components/menu-toggle/menu-toggle.js +16 -7
  272. package/dist/collection/components/modal/animations/ios.enter.js +1 -41
  273. package/dist/collection/components/modal/animations/ios.leave.js +2 -24
  274. package/dist/collection/components/modal/animations/md.enter.js +2 -42
  275. package/dist/collection/components/modal/animations/md.leave.js +2 -24
  276. package/dist/collection/components/modal/gestures/sheet.js +122 -29
  277. package/dist/collection/components/modal/modal.ios.css +0 -10
  278. package/dist/collection/components/modal/modal.js +192 -55
  279. package/dist/collection/components/nav/nav.js +25 -12
  280. package/dist/collection/components/nav-link/nav-link.js +19 -9
  281. package/dist/collection/components/note/note.js +5 -6
  282. package/dist/collection/components/picker-column/picker-column.js +34 -10
  283. package/dist/collection/components/picker-column-option/picker-column-option.js +27 -6
  284. package/dist/collection/components/picker-legacy/picker.js +93 -33
  285. package/dist/collection/components/picker-legacy-column/picker-column.js +7 -5
  286. package/dist/collection/components/popover/popover.js +211 -58
  287. package/dist/collection/components/progress-bar/progress-bar.js +32 -7
  288. package/dist/collection/components/radio/radio.js +49 -19
  289. package/dist/collection/components/radio-group/radio-group.js +27 -13
  290. package/dist/collection/components/range/range.js +112 -37
  291. package/dist/collection/components/refresher/refresher.js +69 -7
  292. package/dist/collection/components/refresher-content/refresher-content.js +13 -9
  293. package/dist/collection/components/reorder/reorder.js +1 -1
  294. package/dist/collection/components/reorder-group/reorder-group.js +7 -2
  295. package/dist/collection/components/ripple-effect/ripple-effect.js +13 -2
  296. package/dist/collection/components/route/route.js +24 -9
  297. package/dist/collection/components/route-redirect/route-redirect.js +6 -6
  298. package/dist/collection/components/router/router.js +24 -2
  299. package/dist/collection/components/router-link/router-link.js +26 -14
  300. package/dist/collection/components/router-outlet/router-outlet.js +25 -9
  301. package/dist/collection/components/row/row.js +1 -1
  302. package/dist/collection/components/searchbar/searchbar.js +146 -51
  303. package/dist/collection/components/segment/segment.js +40 -15
  304. package/dist/collection/components/segment-button/segment-button.js +34 -13
  305. package/dist/collection/components/segment-content/segment-content.js +1 -1
  306. package/dist/collection/components/segment-view/segment-view.js +8 -4
  307. package/dist/collection/components/select/select.js +128 -48
  308. package/dist/collection/components/select-modal/select-modal.js +10 -5
  309. package/dist/collection/components/select-option/select-option.js +10 -4
  310. package/dist/collection/components/select-popover/select-popover.js +19 -9
  311. package/dist/collection/components/skeleton-text/skeleton-text.js +8 -3
  312. package/dist/collection/components/spinner/spinner.js +16 -8
  313. package/dist/collection/components/split-pane/split-pane.js +19 -6
  314. package/dist/collection/components/tab/tab.js +16 -9
  315. package/dist/collection/components/tab-bar/tab-bar.js +16 -7
  316. package/dist/collection/components/tab-button/tab-button.js +34 -18
  317. package/dist/collection/components/tabs/tabs.js +6 -4
  318. package/dist/collection/components/text/text.js +5 -6
  319. package/dist/collection/components/textarea/textarea.js +154 -59
  320. package/dist/collection/components/thumbnail/thumbnail.js +1 -1
  321. package/dist/collection/components/title/title.js +8 -8
  322. package/dist/collection/components/toast/toast.js +121 -47
  323. package/dist/collection/components/toggle/toggle.js +86 -28
  324. package/dist/collection/components/toolbar/toolbar.js +5 -4
  325. package/dist/collection/utils/input-shims/hacks/scroll-assist.js +23 -0
  326. package/dist/docs.d.ts +8 -0
  327. package/dist/docs.json +4490 -942
  328. package/dist/esm/{animation-8b25e105.js → animation-BWcUKtbn.js} +2 -2
  329. package/dist/esm/{button-active-90f1dbc4.js → button-active-Bxcnevju.js} +3 -3
  330. package/dist/esm/{capacitor-59395cbd.js → capacitor-CFERIeaU.js} +1 -1
  331. package/dist/esm/{config-9898ed97.js → config-AaTyISnm.js} +1 -1
  332. package/dist/esm/{data-0d7ea6eb.js → data-GIsHsYIB.js} +31 -6
  333. package/dist/esm/{framework-delegate-56b467ad.js → framework-delegate-DxcnWic_.js} +1 -1
  334. package/dist/esm/{gesture-controller-314a54f6.js → gesture-controller-BTEOs1at.js} +1 -1
  335. package/dist/esm/{haptic-ac164e4c.js → haptic-DzAMWJuk.js} +2 -2
  336. package/dist/esm/{hardware-back-button-a7eb8233.js → hardware-back-button-DcH0BbDp.js} +2 -2
  337. package/dist/esm/{helpers-d94bc8ad.js → helpers-1O4D2b7y.js} +3 -6
  338. package/dist/esm/{index-e2cf2ceb.js → index-BLV6ykCk.js} +2 -1
  339. package/dist/esm/{index-527b9e34.js → index-B_U9CtaY.js} +1667 -654
  340. package/dist/esm/{index-9a17db3d.js → index-BlJTBdxG.js} +3 -3
  341. package/dist/esm/{index-be190feb.js → index-CWbP1eJz.js} +3 -3
  342. package/dist/esm/{index-39782642.js → index-CfgBF1SE.js} +4 -6
  343. package/dist/esm/{index-18f31305.js → index-D8sncTHY.js} +5 -6
  344. package/dist/esm/{index-68c0d151.js → index-DfBA5ztX.js} +4 -5
  345. package/dist/esm/index.js +16 -18
  346. package/dist/esm/{input-shims-279903e2.js → input-shims-C3lNp93k.js} +29 -6
  347. package/dist/esm/{input.utils-40504d6d.js → input.utils-zWijNCrx.js} +3 -3
  348. package/dist/esm/ion-accordion_2.entry.js +52 -23
  349. package/dist/esm/ion-action-sheet.entry.js +48 -36
  350. package/dist/esm/ion-alert.entry.js +53 -39
  351. package/dist/esm/ion-app_8.entry.js +99 -68
  352. package/dist/esm/ion-avatar_3.entry.js +8 -16
  353. package/dist/esm/ion-back-button.entry.js +14 -17
  354. package/dist/esm/ion-backdrop.entry.js +12 -7
  355. package/dist/esm/ion-breadcrumb_2.entry.js +37 -33
  356. package/dist/esm/ion-button_2.entry.js +50 -31
  357. package/dist/esm/ion-card_5.entry.js +31 -34
  358. package/dist/esm/ion-checkbox.entry.js +43 -21
  359. package/dist/esm/ion-chip.entry.js +10 -9
  360. package/dist/esm/ion-col_3.entry.js +8 -34
  361. package/dist/esm/ion-datetime-button.entry.js +18 -18
  362. package/dist/esm/ion-datetime_3.entry.js +279 -174
  363. package/dist/esm/ion-fab_3.entry.js +56 -30
  364. package/dist/esm/ion-img.entry.js +3 -10
  365. package/dist/esm/ion-infinite-scroll_2.entry.js +33 -18
  366. package/dist/esm/ion-input-otp.entry.js +591 -0
  367. package/dist/esm/ion-input-password-toggle.entry.js +12 -16
  368. package/dist/esm/ion-input.entry.js +84 -58
  369. package/dist/esm/ion-item-option_3.entry.js +36 -31
  370. package/dist/esm/ion-item_8.entry.js +60 -63
  371. package/dist/esm/ion-loading.entry.js +46 -31
  372. package/dist/esm/ion-menu_3.entry.js +66 -43
  373. package/dist/esm/ion-modal.entry.js +260 -215
  374. package/dist/esm/ion-nav_2.entry.js +17 -22
  375. package/dist/esm/ion-picker-column-option.entry.js +23 -12
  376. package/dist/esm/ion-picker-column.entry.js +29 -16
  377. package/dist/esm/ion-picker.entry.js +4 -7
  378. package/dist/esm/ion-popover.entry.js +137 -47
  379. package/dist/esm/ion-progress-bar.entry.js +22 -11
  380. package/dist/esm/ion-radio_2.entry.js +45 -33
  381. package/dist/esm/ion-range.entry.js +72 -34
  382. package/dist/esm/ion-refresher_2.entry.js +68 -26
  383. package/dist/esm/ion-reorder_2.entry.js +17 -19
  384. package/dist/esm/ion-ripple-effect.entry.js +12 -6
  385. package/dist/esm/ion-route_4.entry.js +35 -21
  386. package/dist/esm/ion-searchbar.entry.js +86 -39
  387. package/dist/esm/ion-segment-content.entry.js +3 -4
  388. package/dist/esm/ion-segment-view.entry.js +8 -8
  389. package/dist/esm/ion-segment_2.entry.js +50 -32
  390. package/dist/esm/ion-select-modal.entry.js +12 -19
  391. package/dist/esm/ion-select_3.entry.js +88 -58
  392. package/dist/esm/ion-spinner.entry.js +8 -11
  393. package/dist/esm/ion-split-pane.entry.js +13 -10
  394. package/dist/esm/ion-tab-bar_2.entry.js +28 -31
  395. package/dist/esm/ion-tab_2.entry.js +11 -16
  396. package/dist/esm/ion-text.entry.js +5 -9
  397. package/dist/esm/ion-textarea.entry.js +77 -43
  398. package/dist/esm/ion-toast.entry.js +65 -44
  399. package/dist/esm/ion-toggle.entry.js +62 -33
  400. package/dist/esm/ionic.js +5 -7
  401. package/dist/esm/{ios.transition-4047cb68.js → ios.transition-BmXtMRXZ.js} +5 -6
  402. package/dist/esm/{keyboard-73175e24.js → keyboard-CUw4ekVy.js} +1 -1
  403. package/dist/esm/{keyboard-controller-ec5c2bfa.js → keyboard-controller-BaaVITYt.js} +2 -2
  404. package/dist/esm/{keyboard-52278bd7.js → keyboard-ywgs5efA.js} +3 -3
  405. package/dist/esm/loader.js +3 -6
  406. package/dist/esm/{md.transition-30ce8d1b.js → md.transition-CLI683c7.js} +5 -6
  407. package/dist/esm/{notch-controller-1a1f7183.js → notch-controller-C5LPspO8.js} +2 -2
  408. package/dist/esm/{overlays-d99dcb0a.js → overlays-8Y2rA-ps.js} +6 -7
  409. package/dist/esm/{status-tap-42a8af65.js → status-tap-7t9T91bG.js} +3 -4
  410. package/dist/esm/{swipe-back-04123e7c.js → swipe-back-D_6Vqlwy.js} +5 -5
  411. package/dist/html.html-data.json +377 -1
  412. package/dist/index.js +1 -1
  413. package/dist/ionic/index.esm.js +1 -1
  414. package/dist/ionic/ionic.esm.js +1 -1
  415. package/dist/ionic/p-0fc6fc38.entry.js +4 -0
  416. package/dist/ionic/p-14ae45e4.entry.js +4 -0
  417. package/dist/ionic/p-15da9760.entry.js +4 -0
  418. package/dist/ionic/p-1739f5f2.entry.js +4 -0
  419. package/dist/ionic/p-18f1813b.entry.js +4 -0
  420. package/dist/ionic/p-2020aa51.entry.js +4 -0
  421. package/dist/ionic/p-2c6c6991.entry.js +4 -0
  422. package/dist/ionic/p-2cfd6b61.entry.js +4 -0
  423. package/dist/ionic/p-2d01ecd5.entry.js +4 -0
  424. package/dist/ionic/p-2da6a16b.entry.js +4 -0
  425. package/dist/ionic/p-3a4feac2.entry.js +4 -0
  426. package/dist/ionic/p-473877b6.entry.js +4 -0
  427. package/dist/ionic/p-4b7d1f35.entry.js +4 -0
  428. package/dist/ionic/p-4d61f20b.entry.js +4 -0
  429. package/dist/ionic/p-4ddc10ef.entry.js +4 -0
  430. package/dist/ionic/p-56712fd4.entry.js +4 -0
  431. package/dist/ionic/p-6b666996.entry.js +4 -0
  432. package/dist/ionic/p-7149db7e.entry.js +4 -0
  433. package/dist/ionic/p-73d7ad90.entry.js +4 -0
  434. package/dist/ionic/p-76b697a3.entry.js +4 -0
  435. package/dist/ionic/{p-ed005d9c.js → p-7qk7mxdr.js} +1 -1
  436. package/dist/ionic/p-81f1b778.entry.js +4 -0
  437. package/dist/ionic/p-8957540a.entry.js +4 -0
  438. package/dist/ionic/p-8a8ef46b.entry.js +4 -0
  439. package/dist/ionic/p-8c674371.entry.js +4 -0
  440. package/dist/ionic/p-8f2f76e0.entry.js +4 -0
  441. package/dist/ionic/p-91bde659.entry.js +4 -0
  442. package/dist/ionic/p-96389029.entry.js +4 -0
  443. package/dist/ionic/p-97667b9c.entry.js +4 -0
  444. package/dist/ionic/p-9b46b31b.entry.js +4 -0
  445. package/dist/ionic/p-9e699d4a.entry.js +4 -0
  446. package/dist/ionic/p-9eeaBrnk.js +4 -0
  447. package/dist/ionic/p-B1MNHTYX.js +4 -0
  448. package/dist/ionic/p-B3XSxWNQ.js +4 -0
  449. package/dist/ionic/{p-da2b833b.js → p-BLV6ykCk.js} +1 -1
  450. package/dist/ionic/p-BROiNJRB.js +4 -0
  451. package/dist/ionic/p-B_U9CtaY.js +5 -0
  452. package/dist/ionic/{p-f08a92cc.js → p-BhLqfMrf.js} +1 -1
  453. package/dist/ionic/{p-2bb55ebc.js → p-BmQduG8c.js} +1 -1
  454. package/dist/ionic/p-CIGNaXM1.js +4 -0
  455. package/dist/ionic/{p-89b61afc.js → p-CKvCXMs9.js} +1 -1
  456. package/dist/ionic/p-CL-KfWxq.js +4 -0
  457. package/dist/ionic/p-CPgXVSua.js +4 -0
  458. package/dist/ionic/p-CRiGyYOA.js +4 -0
  459. package/dist/ionic/{p-10a1bddc.js → p-CbI9XwwW.js} +1 -1
  460. package/dist/ionic/p-Cl0B-RWe.js +4 -0
  461. package/dist/ionic/p-CtWGkNnJ.js +4 -0
  462. package/dist/ionic/{p-27281edd.js → p-D13Eaw-8.js} +1 -1
  463. package/dist/ionic/{p-0f5e6225.js → p-DCfS5Jk_.js} +1 -1
  464. package/dist/ionic/p-DgdWETCP.js +4 -0
  465. package/dist/ionic/p-Do-uqmtX.js +4 -0
  466. package/dist/ionic/p-DonTxalL.js +4 -0
  467. package/dist/ionic/{p-b7b1d91a.js → p-DzH0J0yi.js} +1 -1
  468. package/dist/ionic/p-QwEXyOze.js +4 -0
  469. package/dist/ionic/p-a6282370.entry.js +4 -0
  470. package/dist/ionic/p-a9ac80bd.entry.js +4 -0
  471. package/dist/ionic/p-a9f99c74.entry.js +4 -0
  472. package/dist/ionic/p-aIxOGKys.js +4 -0
  473. package/dist/ionic/p-aa8956c2.entry.js +4 -0
  474. package/dist/ionic/p-b37dbc31.entry.js +4 -0
  475. package/dist/ionic/p-b9f79efc.entry.js +4 -0
  476. package/dist/ionic/p-bNmY-WfR.js +4 -0
  477. package/dist/ionic/p-bb5fc02e.entry.js +4 -0
  478. package/dist/ionic/p-bc01c127.entry.js +4 -0
  479. package/dist/ionic/p-bec79123.entry.js +4 -0
  480. package/dist/ionic/p-c0335397.entry.js +4 -0
  481. package/dist/ionic/p-c448135a.entry.js +4 -0
  482. package/dist/ionic/p-c4912ca5.entry.js +4 -0
  483. package/dist/ionic/p-c884d7e3.entry.js +4 -0
  484. package/dist/ionic/p-cb787a4b.entry.js +4 -0
  485. package/dist/ionic/p-cd12ed1c.entry.js +4 -0
  486. package/dist/ionic/p-cf632ee2.entry.js +4 -0
  487. package/dist/ionic/p-d8ed5df0.entry.js +4 -0
  488. package/dist/ionic/p-e1260ed5.entry.js +4 -0
  489. package/dist/ionic/p-e30ff968.entry.js +4 -0
  490. package/dist/ionic/{p-b6d324f0.js → p-ei_RiGrl.js} +1 -1
  491. package/dist/ionic/p-f83db8cd.entry.js +4 -0
  492. package/dist/ionic/p-fbc5481b.entry.js +4 -0
  493. package/dist/ionic/p-fcc7437b.entry.js +4 -0
  494. package/dist/types/components/button/button.d.ts +11 -0
  495. package/dist/types/components/datetime/datetime-interface.d.ts +1 -0
  496. package/dist/types/components/datetime/datetime.d.ts +6 -0
  497. package/dist/types/components/datetime/utils/data.d.ts +3 -1
  498. package/dist/types/components/datetime/utils/manipulation.d.ts +1 -0
  499. package/dist/types/components/input-otp/input-otp-interface.d.ts +21 -0
  500. package/dist/types/components/input-otp/input-otp.d.ts +268 -0
  501. package/dist/types/components/searchbar/searchbar.d.ts +1 -1
  502. package/dist/types/components.d.ts +786 -2
  503. package/dist/types/interface.d.ts +1 -0
  504. package/dist/types/stencil-public-runtime.d.ts +29 -1
  505. package/hydrate/index.d.ts +44 -7
  506. package/hydrate/index.js +5671 -2585
  507. package/hydrate/index.mjs +5670 -2584
  508. package/loader/cdn.js +1 -2
  509. package/loader/index.cjs.js +1 -2
  510. package/loader/index.es2017.js +0 -1
  511. package/loader/index.js +1 -2
  512. package/package.json +4 -4
  513. package/dist/cjs/app-globals-ddceb1f4.js +0 -10
  514. package/dist/cjs/index-cc858e97.js +0 -129
  515. package/dist/cjs/ionic-global-6dea5a96.js +0 -152
  516. package/dist/esm/app-globals-dbdbb3df.js +0 -8
  517. package/dist/esm/index-cfd9c1f2.js +0 -121
  518. package/dist/esm/ionic-global-b26f573e.js +0 -147
  519. package/dist/esm/polyfills/core-js.js +0 -11
  520. package/dist/esm/polyfills/dom.js +0 -79
  521. package/dist/esm/polyfills/es5-html-element.js +0 -1
  522. package/dist/esm/polyfills/index.js +0 -34
  523. package/dist/esm/polyfills/system.js +0 -6
  524. package/dist/esm-es5/animation-8b25e105.js +0 -4
  525. package/dist/esm-es5/app-globals-dbdbb3df.js +0 -4
  526. package/dist/esm-es5/button-active-90f1dbc4.js +0 -4
  527. package/dist/esm-es5/capacitor-59395cbd.js +0 -4
  528. package/dist/esm-es5/compare-with-utils-a96ff2ea.js +0 -4
  529. package/dist/esm-es5/config-9898ed97.js +0 -4
  530. package/dist/esm-es5/cubic-bezier-fe2083dc.js +0 -4
  531. package/dist/esm-es5/data-0d7ea6eb.js +0 -4
  532. package/dist/esm-es5/dir-babeabeb.js +0 -4
  533. package/dist/esm-es5/focus-visible-dd40d69f.js +0 -4
  534. package/dist/esm-es5/framework-delegate-56b467ad.js +0 -4
  535. package/dist/esm-es5/gesture-controller-314a54f6.js +0 -4
  536. package/dist/esm-es5/haptic-ac164e4c.js +0 -4
  537. package/dist/esm-es5/hardware-back-button-a7eb8233.js +0 -4
  538. package/dist/esm-es5/helpers-d94bc8ad.js +0 -4
  539. package/dist/esm-es5/index-18f31305.js +0 -4
  540. package/dist/esm-es5/index-39782642.js +0 -4
  541. package/dist/esm-es5/index-527b9e34.js +0 -5
  542. package/dist/esm-es5/index-68c0d151.js +0 -4
  543. package/dist/esm-es5/index-9a17db3d.js +0 -4
  544. package/dist/esm-es5/index-a5d50daf.js +0 -4
  545. package/dist/esm-es5/index-be190feb.js +0 -4
  546. package/dist/esm-es5/index-cfd9c1f2.js +0 -5
  547. package/dist/esm-es5/index-e2cf2ceb.js +0 -4
  548. package/dist/esm-es5/index.js +0 -4
  549. package/dist/esm-es5/input-shims-279903e2.js +0 -4
  550. package/dist/esm-es5/input.utils-40504d6d.js +0 -4
  551. package/dist/esm-es5/ion-accordion_2.entry.js +0 -4
  552. package/dist/esm-es5/ion-action-sheet.entry.js +0 -4
  553. package/dist/esm-es5/ion-alert.entry.js +0 -4
  554. package/dist/esm-es5/ion-app_8.entry.js +0 -4
  555. package/dist/esm-es5/ion-avatar_3.entry.js +0 -4
  556. package/dist/esm-es5/ion-back-button.entry.js +0 -4
  557. package/dist/esm-es5/ion-backdrop.entry.js +0 -4
  558. package/dist/esm-es5/ion-breadcrumb_2.entry.js +0 -4
  559. package/dist/esm-es5/ion-button_2.entry.js +0 -4
  560. package/dist/esm-es5/ion-card_5.entry.js +0 -4
  561. package/dist/esm-es5/ion-checkbox.entry.js +0 -4
  562. package/dist/esm-es5/ion-chip.entry.js +0 -4
  563. package/dist/esm-es5/ion-col_3.entry.js +0 -4
  564. package/dist/esm-es5/ion-datetime-button.entry.js +0 -4
  565. package/dist/esm-es5/ion-datetime_3.entry.js +0 -4
  566. package/dist/esm-es5/ion-fab_3.entry.js +0 -4
  567. package/dist/esm-es5/ion-img.entry.js +0 -4
  568. package/dist/esm-es5/ion-infinite-scroll_2.entry.js +0 -4
  569. package/dist/esm-es5/ion-input-password-toggle.entry.js +0 -4
  570. package/dist/esm-es5/ion-input.entry.js +0 -4
  571. package/dist/esm-es5/ion-item-option_3.entry.js +0 -4
  572. package/dist/esm-es5/ion-item_8.entry.js +0 -4
  573. package/dist/esm-es5/ion-loading.entry.js +0 -4
  574. package/dist/esm-es5/ion-menu_3.entry.js +0 -4
  575. package/dist/esm-es5/ion-modal.entry.js +0 -4
  576. package/dist/esm-es5/ion-nav_2.entry.js +0 -4
  577. package/dist/esm-es5/ion-picker-column-option.entry.js +0 -4
  578. package/dist/esm-es5/ion-picker-column.entry.js +0 -4
  579. package/dist/esm-es5/ion-picker.entry.js +0 -4
  580. package/dist/esm-es5/ion-popover.entry.js +0 -4
  581. package/dist/esm-es5/ion-progress-bar.entry.js +0 -4
  582. package/dist/esm-es5/ion-radio_2.entry.js +0 -4
  583. package/dist/esm-es5/ion-range.entry.js +0 -4
  584. package/dist/esm-es5/ion-refresher_2.entry.js +0 -4
  585. package/dist/esm-es5/ion-reorder_2.entry.js +0 -4
  586. package/dist/esm-es5/ion-ripple-effect.entry.js +0 -4
  587. package/dist/esm-es5/ion-route_4.entry.js +0 -4
  588. package/dist/esm-es5/ion-searchbar.entry.js +0 -4
  589. package/dist/esm-es5/ion-segment-content.entry.js +0 -4
  590. package/dist/esm-es5/ion-segment-view.entry.js +0 -4
  591. package/dist/esm-es5/ion-segment_2.entry.js +0 -4
  592. package/dist/esm-es5/ion-select-modal.entry.js +0 -4
  593. package/dist/esm-es5/ion-select_3.entry.js +0 -4
  594. package/dist/esm-es5/ion-spinner.entry.js +0 -4
  595. package/dist/esm-es5/ion-split-pane.entry.js +0 -4
  596. package/dist/esm-es5/ion-tab-bar_2.entry.js +0 -4
  597. package/dist/esm-es5/ion-tab_2.entry.js +0 -4
  598. package/dist/esm-es5/ion-text.entry.js +0 -4
  599. package/dist/esm-es5/ion-textarea.entry.js +0 -4
  600. package/dist/esm-es5/ion-toast.entry.js +0 -4
  601. package/dist/esm-es5/ion-toggle.entry.js +0 -4
  602. package/dist/esm-es5/ionic-global-b26f573e.js +0 -4
  603. package/dist/esm-es5/ionic.js +0 -4
  604. package/dist/esm-es5/ios.transition-4047cb68.js +0 -4
  605. package/dist/esm-es5/keyboard-52278bd7.js +0 -4
  606. package/dist/esm-es5/keyboard-73175e24.js +0 -4
  607. package/dist/esm-es5/keyboard-controller-ec5c2bfa.js +0 -4
  608. package/dist/esm-es5/loader.js +0 -4
  609. package/dist/esm-es5/lock-controller-316928be.js +0 -4
  610. package/dist/esm-es5/md.transition-30ce8d1b.js +0 -4
  611. package/dist/esm-es5/notch-controller-1a1f7183.js +0 -4
  612. package/dist/esm-es5/overlays-d99dcb0a.js +0 -4
  613. package/dist/esm-es5/spinner-configs-964f7cf3.js +0 -4
  614. package/dist/esm-es5/status-tap-42a8af65.js +0 -4
  615. package/dist/esm-es5/swipe-back-04123e7c.js +0 -4
  616. package/dist/esm-es5/theme-01f3f29c.js +0 -4
  617. package/dist/esm-es5/watch-options-c2911ace.js +0 -4
  618. package/dist/ionic/ionic.js +0 -127
  619. package/dist/ionic/p-00023f5a.system.js +0 -4
  620. package/dist/ionic/p-012c3ceb.system.js +0 -4
  621. package/dist/ionic/p-03480b95.system.entry.js +0 -4
  622. package/dist/ionic/p-08cef0b1.entry.js +0 -4
  623. package/dist/ionic/p-08e01816.system.js +0 -4
  624. package/dist/ionic/p-0af640d6.entry.js +0 -4
  625. package/dist/ionic/p-105b2e8b.entry.js +0 -4
  626. package/dist/ionic/p-117d0013.system.entry.js +0 -4
  627. package/dist/ionic/p-11dca959.entry.js +0 -4
  628. package/dist/ionic/p-12193821.system.js +0 -4
  629. package/dist/ionic/p-12830298.system.entry.js +0 -4
  630. package/dist/ionic/p-14154301.system.entry.js +0 -4
  631. package/dist/ionic/p-1706b406.system.entry.js +0 -4
  632. package/dist/ionic/p-17e21141.js +0 -4
  633. package/dist/ionic/p-19494658.system.entry.js +0 -4
  634. package/dist/ionic/p-1966a13c.system.js +0 -4
  635. package/dist/ionic/p-1974d5b2.system.js +0 -4
  636. package/dist/ionic/p-1a7df1c3.system.js +0 -4
  637. package/dist/ionic/p-1a81ac09.system.js +0 -4
  638. package/dist/ionic/p-1b9c59ab.js +0 -4
  639. package/dist/ionic/p-1d307396.system.js +0 -4
  640. package/dist/ionic/p-1dfc11b3.system.js +0 -4
  641. package/dist/ionic/p-1e4371bd.js +0 -4
  642. package/dist/ionic/p-1e955a45.system.js +0 -4
  643. package/dist/ionic/p-200fc491.js +0 -4
  644. package/dist/ionic/p-20d469d0.system.js +0 -4
  645. package/dist/ionic/p-21891ead.js +0 -4
  646. package/dist/ionic/p-2233344a.system.js +0 -4
  647. package/dist/ionic/p-2469240b.entry.js +0 -4
  648. package/dist/ionic/p-24a6c8a3.system.entry.js +0 -4
  649. package/dist/ionic/p-257fb777.entry.js +0 -4
  650. package/dist/ionic/p-25b10f81.js +0 -4
  651. package/dist/ionic/p-2b7827c7.js +0 -4
  652. package/dist/ionic/p-2bff0e69.system.entry.js +0 -4
  653. package/dist/ionic/p-31dc303d.entry.js +0 -4
  654. package/dist/ionic/p-3535d6b5.entry.js +0 -4
  655. package/dist/ionic/p-35cdfd77.system.entry.js +0 -4
  656. package/dist/ionic/p-393ffcc2.entry.js +0 -4
  657. package/dist/ionic/p-39fa7dd1.system.entry.js +0 -4
  658. package/dist/ionic/p-3a30f31b.system.entry.js +0 -4
  659. package/dist/ionic/p-3e1e14d9.system.js +0 -4
  660. package/dist/ionic/p-42f08b26.system.entry.js +0 -4
  661. package/dist/ionic/p-4609d030.system.js +0 -4
  662. package/dist/ionic/p-481e0885.entry.js +0 -4
  663. package/dist/ionic/p-4a5be299.system.entry.js +0 -4
  664. package/dist/ionic/p-4c667fce.js +0 -4
  665. package/dist/ionic/p-4cf4172e.entry.js +0 -4
  666. package/dist/ionic/p-4da92dac.entry.js +0 -4
  667. package/dist/ionic/p-4ed5db19.system.js +0 -4
  668. package/dist/ionic/p-4f255d5a.system.js +0 -4
  669. package/dist/ionic/p-50cb2e8b.system.entry.js +0 -4
  670. package/dist/ionic/p-57957c0f.entry.js +0 -4
  671. package/dist/ionic/p-57d6e18e.entry.js +0 -4
  672. package/dist/ionic/p-57e55ecb.system.js +0 -4
  673. package/dist/ionic/p-5b67b447.js +0 -4
  674. package/dist/ionic/p-5c9feddc.system.entry.js +0 -4
  675. package/dist/ionic/p-5fac20aa.system.entry.js +0 -4
  676. package/dist/ionic/p-612096e6.system.entry.js +0 -4
  677. package/dist/ionic/p-6201c4ba.entry.js +0 -4
  678. package/dist/ionic/p-625248d0.system.js +0 -4
  679. package/dist/ionic/p-663413be.system.js +0 -4
  680. package/dist/ionic/p-6636a436.js +0 -4
  681. package/dist/ionic/p-66a5d6a8.js +0 -5
  682. package/dist/ionic/p-66df5468.system.entry.js +0 -4
  683. package/dist/ionic/p-67077d48.entry.js +0 -4
  684. package/dist/ionic/p-67cacd6d.entry.js +0 -4
  685. package/dist/ionic/p-6835ebdd.system.entry.js +0 -4
  686. package/dist/ionic/p-6b8530f5.system.entry.js +0 -4
  687. package/dist/ionic/p-6c474e87.entry.js +0 -4
  688. package/dist/ionic/p-6dd86ff5.system.entry.js +0 -4
  689. package/dist/ionic/p-6ec0c94a.entry.js +0 -4
  690. package/dist/ionic/p-6f832afe.system.entry.js +0 -4
  691. package/dist/ionic/p-707408c5.system.entry.js +0 -4
  692. package/dist/ionic/p-712c0131.entry.js +0 -4
  693. package/dist/ionic/p-721f43f9.entry.js +0 -4
  694. package/dist/ionic/p-7445a2e5.system.js +0 -4
  695. package/dist/ionic/p-7611ede3.system.entry.js +0 -4
  696. package/dist/ionic/p-781e2dbb.system.js +0 -4
  697. package/dist/ionic/p-792919fd.system.js +0 -4
  698. package/dist/ionic/p-7b8c12c3.entry.js +0 -4
  699. package/dist/ionic/p-7c5c7ae1.system.entry.js +0 -4
  700. package/dist/ionic/p-7e3e6ed2.entry.js +0 -4
  701. package/dist/ionic/p-7ffedf77.system.entry.js +0 -4
  702. package/dist/ionic/p-809483ac.js +0 -4
  703. package/dist/ionic/p-81904a80.entry.js +0 -4
  704. package/dist/ionic/p-84096b45.system.js +0 -4
  705. package/dist/ionic/p-8450f761.entry.js +0 -4
  706. package/dist/ionic/p-8460d95a.entry.js +0 -4
  707. package/dist/ionic/p-85b01465.js +0 -4
  708. package/dist/ionic/p-865fe95c.entry.js +0 -4
  709. package/dist/ionic/p-8674af94.entry.js +0 -4
  710. package/dist/ionic/p-890a4ee2.entry.js +0 -4
  711. package/dist/ionic/p-891553d8.entry.js +0 -4
  712. package/dist/ionic/p-8985cdb6.system.js +0 -4
  713. package/dist/ionic/p-8b050e84.system.js +0 -4
  714. package/dist/ionic/p-8d2d39d0.js +0 -4
  715. package/dist/ionic/p-8dacf4e2.entry.js +0 -4
  716. package/dist/ionic/p-8ededb41.js +0 -4
  717. package/dist/ionic/p-94551927.js +0 -4
  718. package/dist/ionic/p-95001a19.js +0 -4
  719. package/dist/ionic/p-965287fb.system.entry.js +0 -4
  720. package/dist/ionic/p-979d4f5c.system.js +0 -4
  721. package/dist/ionic/p-98fd942b.system.entry.js +0 -4
  722. package/dist/ionic/p-9df5043e.system.entry.js +0 -4
  723. package/dist/ionic/p-9e753482.system.entry.js +0 -4
  724. package/dist/ionic/p-a0fd2fe5.system.entry.js +0 -4
  725. package/dist/ionic/p-a2c6a9c8.entry.js +0 -4
  726. package/dist/ionic/p-a2dd5b69.system.entry.js +0 -4
  727. package/dist/ionic/p-a4866e3e.system.js +0 -4
  728. package/dist/ionic/p-a5dbe0ff.system.entry.js +0 -4
  729. package/dist/ionic/p-a7a97bf4.system.entry.js +0 -4
  730. package/dist/ionic/p-a835aca8.entry.js +0 -4
  731. package/dist/ionic/p-a83e3290.system.js +0 -4
  732. package/dist/ionic/p-a93873de.system.js +0 -4
  733. package/dist/ionic/p-aad57e35.entry.js +0 -4
  734. package/dist/ionic/p-ab7337e1.entry.js +0 -4
  735. package/dist/ionic/p-abe101da.system.js +0 -4
  736. package/dist/ionic/p-ad592db9.entry.js +0 -4
  737. package/dist/ionic/p-aded71ec.js +0 -4
  738. package/dist/ionic/p-ae039072.entry.js +0 -4
  739. package/dist/ionic/p-aebfab05.system.entry.js +0 -4
  740. package/dist/ionic/p-b06ac4a5.system.js +0 -4
  741. package/dist/ionic/p-b2e7eda0.system.entry.js +0 -4
  742. package/dist/ionic/p-b445ff65.entry.js +0 -4
  743. package/dist/ionic/p-b4d17da0.system.entry.js +0 -4
  744. package/dist/ionic/p-b5432d15.entry.js +0 -4
  745. package/dist/ionic/p-b8050298.system.entry.js +0 -4
  746. package/dist/ionic/p-b904cfe2.system.entry.js +0 -4
  747. package/dist/ionic/p-b9c793d4.entry.js +0 -4
  748. package/dist/ionic/p-bafc3eae.system.entry.js +0 -4
  749. package/dist/ionic/p-bf184319.system.entry.js +0 -4
  750. package/dist/ionic/p-bfb763d0.system.entry.js +0 -4
  751. package/dist/ionic/p-c16443a8.system.js +0 -4
  752. package/dist/ionic/p-c1b7d311.system.entry.js +0 -4
  753. package/dist/ionic/p-c2160d8c.entry.js +0 -4
  754. package/dist/ionic/p-c468af8a.system.js +0 -4
  755. package/dist/ionic/p-c5b77054.entry.js +0 -4
  756. package/dist/ionic/p-c5bfa3e9.entry.js +0 -4
  757. package/dist/ionic/p-c61cc894.js +0 -4
  758. package/dist/ionic/p-cad82569.entry.js +0 -4
  759. package/dist/ionic/p-d16fab3f.entry.js +0 -4
  760. package/dist/ionic/p-d1eb2d7f.entry.js +0 -4
  761. package/dist/ionic/p-d382f09c.system.js +0 -4
  762. package/dist/ionic/p-d8d84afa.system.js +0 -4
  763. package/dist/ionic/p-d984c1ab.system.entry.js +0 -4
  764. package/dist/ionic/p-dabe3bd4.js +0 -4
  765. package/dist/ionic/p-df069a0d.entry.js +0 -4
  766. package/dist/ionic/p-e1678e42.entry.js +0 -4
  767. package/dist/ionic/p-e6068998.system.entry.js +0 -4
  768. package/dist/ionic/p-e673a0a2.system.js +0 -4
  769. package/dist/ionic/p-e727e32d.system.entry.js +0 -4
  770. package/dist/ionic/p-e8245753.entry.js +0 -4
  771. package/dist/ionic/p-e887b6a9.system.js +0 -4
  772. package/dist/ionic/p-f08dfb19.entry.js +0 -4
  773. package/dist/ionic/p-f0c9f8e3.system.entry.js +0 -4
  774. package/dist/ionic/p-f0ef39ab.entry.js +0 -4
  775. package/dist/ionic/p-f11a9436.system.js +0 -5
  776. package/dist/ionic/p-f22490a7.system.entry.js +0 -4
  777. package/dist/ionic/p-f6bb9be7.system.entry.js +0 -4
  778. package/dist/ionic/p-f6e7d104.system.js +0 -4
  779. package/dist/ionic/p-f725bf9e.system.js +0 -4
  780. package/dist/ionic/p-f9a87db2.system.entry.js +0 -4
  781. package/dist/ionic/p-fa3f4b96.system.js +0 -4
  782. package/dist/ionic/p-fe063952.system.entry.js +0 -4
  783. package/loader/package.json +0 -11
  784. /package/dist/cjs/{compare-with-utils-df1001d7.js → compare-with-utils-DSicavqM.js} +0 -0
  785. /package/dist/cjs/{cubic-bezier-f2dccc53.js → cubic-bezier-DAjy1V-e.js} +0 -0
  786. /package/dist/cjs/{dir-94c21456.js → dir-Cn0z1rJH.js} +0 -0
  787. /package/dist/cjs/{focus-visible-7a0ce04f.js → focus-visible-CCvKiLh3.js} +0 -0
  788. /package/dist/cjs/{index-c8d52405.js → index-DkNv4J_i.js} +0 -0
  789. /package/dist/cjs/{lock-controller-6585a42a.js → lock-controller-aDB9wrEf.js} +0 -0
  790. /package/dist/cjs/{spinner-configs-282fd50a.js → spinner-configs-DxHKnd3-.js} +0 -0
  791. /package/dist/cjs/{theme-d1c573d2.js → theme-CeDs6Hcv.js} +0 -0
  792. /package/dist/cjs/{watch-options-f5f3e158.js → watch-options-CviOsrTS.js} +0 -0
  793. /package/dist/esm/{compare-with-utils-a96ff2ea.js → compare-with-utils-sObYyvOy.js} +0 -0
  794. /package/dist/esm/{cubic-bezier-fe2083dc.js → cubic-bezier-hHmYLOfE.js} +0 -0
  795. /package/dist/esm/{dir-babeabeb.js → dir-C53feagD.js} +0 -0
  796. /package/dist/esm/{focus-visible-dd40d69f.js → focus-visible-BmVRXR1y.js} +0 -0
  797. /package/dist/esm/{index-a5d50daf.js → index-ZjP4CjeZ.js} +0 -0
  798. /package/dist/esm/{lock-controller-316928be.js → lock-controller-B-hirT0v.js} +0 -0
  799. /package/dist/esm/{spinner-configs-964f7cf3.js → spinner-configs-D4RIp70E.js} +0 -0
  800. /package/dist/esm/{theme-01f3f29c.js → theme-DiVJyqlX.js} +0 -0
  801. /package/dist/esm/{watch-options-c2911ace.js → watch-options-Dtdm8lKC.js} +0 -0
  802. /package/dist/ionic/{p-ccd02320.js → p-B-hirT0v.js} +0 -0
  803. /package/dist/ionic/{p-9b97df10.js → p-BTEOs1at.js} +0 -0
  804. /package/dist/ionic/{p-d47265c8.js → p-BmVRXR1y.js} +0 -0
  805. /package/dist/ionic/{p-fb813dab.js → p-C53feagD.js} +0 -0
  806. /package/dist/ionic/{p-f0c2a614.js → p-D4RIp70E.js} +0 -0
  807. /package/dist/ionic/{p-47794def.js → p-DiVJyqlX.js} +0 -0
  808. /package/dist/ionic/{p-459d13d5.js → p-Dtdm8lKC.js} +0 -0
  809. /package/dist/ionic/{p-7b30edcc.js → p-ZjP4CjeZ.js} +0 -0
  810. /package/dist/ionic/{p-2408c236.js → p-hHmYLOfE.js} +0 -0
  811. /package/dist/ionic/{p-de756e5c.js → p-sObYyvOy.js} +0 -0
@@ -2,10 +2,270 @@
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
4
  const NAMESPACE = 'ionic';
5
- const BUILD = /* ionic */ { allRenderFn: false, appendChildSlotFix: true, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: true, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: true, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: true, experimentalSlotFixes: true, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: true, hostListenerTargetDocument: true, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: false, hydrateClientSide: true, 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: true, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: true, scopedSlotTextContentFix: true, scriptDataOpts: false, shadowDelegatesFocus: true, shadowDom: true, slot: true, slotChildNodesFix: true, 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 };
5
+ const BUILD = /* ionic */ { experimentalSlotFixes: true, hydratedSelectorName: "hydrated", lazyLoad: true, shadowDom: true, slotRelocation: true, updatable: true};
6
+
7
+ // TODO(FW-2832): types
8
+ class Config {
9
+ constructor() {
10
+ this.m = new Map();
11
+ }
12
+ reset(configObj) {
13
+ this.m = new Map(Object.entries(configObj));
14
+ }
15
+ get(key, fallback) {
16
+ const value = this.m.get(key);
17
+ return value !== undefined ? value : fallback;
18
+ }
19
+ getBoolean(key, fallback = false) {
20
+ const val = this.m.get(key);
21
+ if (val === undefined) {
22
+ return fallback;
23
+ }
24
+ if (typeof val === 'string') {
25
+ return val === 'true';
26
+ }
27
+ return !!val;
28
+ }
29
+ getNumber(key, fallback) {
30
+ const val = parseFloat(this.m.get(key));
31
+ return isNaN(val) ? (fallback !== undefined ? fallback : NaN) : val;
32
+ }
33
+ set(key, value) {
34
+ this.m.set(key, value);
35
+ }
36
+ }
37
+ const config = /*@__PURE__*/ new Config();
38
+ const configFromSession = (win) => {
39
+ try {
40
+ const configStr = win.sessionStorage.getItem(IONIC_SESSION_KEY);
41
+ return configStr !== null ? JSON.parse(configStr) : {};
42
+ }
43
+ catch (e) {
44
+ return {};
45
+ }
46
+ };
47
+ const saveConfig = (win, c) => {
48
+ try {
49
+ win.sessionStorage.setItem(IONIC_SESSION_KEY, JSON.stringify(c));
50
+ }
51
+ catch (e) {
52
+ return;
53
+ }
54
+ };
55
+ const configFromURL = (win) => {
56
+ const configObj = {};
57
+ win.location.search
58
+ .slice(1)
59
+ .split('&')
60
+ .map((entry) => entry.split('='))
61
+ .map(([key, value]) => {
62
+ try {
63
+ return [decodeURIComponent(key), decodeURIComponent(value)];
64
+ }
65
+ catch (e) {
66
+ return ['', ''];
67
+ }
68
+ })
69
+ .filter(([key]) => startsWith(key, IONIC_PREFIX))
70
+ .map(([key, value]) => [key.slice(IONIC_PREFIX.length), value])
71
+ .forEach(([key, value]) => {
72
+ configObj[key] = value;
73
+ });
74
+ return configObj;
75
+ };
76
+ const startsWith = (input, search) => {
77
+ return input.substr(0, search.length) === search;
78
+ };
79
+ const IONIC_PREFIX = 'ionic:';
80
+ const IONIC_SESSION_KEY = 'ionic-persist-config';
81
+
82
+ var LogLevel;
83
+ (function (LogLevel) {
84
+ LogLevel["OFF"] = "OFF";
85
+ LogLevel["ERROR"] = "ERROR";
86
+ LogLevel["WARN"] = "WARN";
87
+ })(LogLevel || (LogLevel = {}));
88
+ /**
89
+ * Logs a warning to the console with an Ionic prefix
90
+ * to indicate the library that is warning the developer.
91
+ *
92
+ * @param message - The string message to be logged to the console.
93
+ */
94
+ const printIonWarning = (message, ...params) => {
95
+ const logLevel = config.get('logLevel', LogLevel.WARN);
96
+ if ([LogLevel.WARN].includes(logLevel)) {
97
+ return console.warn(`[Ionic Warning]: ${message}`, ...params);
98
+ }
99
+ };
100
+ /**
101
+ * Logs an error to the console with an Ionic prefix
102
+ * to indicate the library that is warning the developer.
103
+ *
104
+ * @param message - The string message to be logged to the console.
105
+ * @param params - Additional arguments to supply to the console.error.
106
+ */
107
+ const printIonError = (message, ...params) => {
108
+ const logLevel = config.get('logLevel', LogLevel.ERROR);
109
+ if ([LogLevel.ERROR, LogLevel.WARN].includes(logLevel)) {
110
+ return console.error(`[Ionic Error]: ${message}`, ...params);
111
+ }
112
+ };
113
+ /**
114
+ * Prints an error informing developers that an implementation requires an element to be used
115
+ * within a specific selector.
116
+ *
117
+ * @param el The web component element this is requiring the element.
118
+ * @param targetSelectors The selector or selectors that were not found.
119
+ */
120
+ const printRequiredElementError = (el, ...targetSelectors) => {
121
+ return console.error(`<${el.tagName.toLowerCase()}> must be used inside ${targetSelectors.join(' or ')}.`);
122
+ };
123
+
124
+ const getPlatforms = (win) => setupPlatforms(win);
125
+ const isPlatform = (winOrPlatform, platform) => {
126
+ if (typeof winOrPlatform === 'string') {
127
+ platform = winOrPlatform;
128
+ winOrPlatform = undefined;
129
+ }
130
+ return getPlatforms(winOrPlatform).includes(platform);
131
+ };
132
+ const setupPlatforms = (win = window) => {
133
+ if (typeof win === 'undefined') {
134
+ return [];
135
+ }
136
+ win.Ionic = win.Ionic || {};
137
+ let platforms = win.Ionic.platforms;
138
+ if (platforms == null) {
139
+ platforms = win.Ionic.platforms = detectPlatforms(win);
140
+ platforms.forEach((p) => win.document.documentElement.classList.add(`plt-${p}`));
141
+ }
142
+ return platforms;
143
+ };
144
+ const detectPlatforms = (win) => {
145
+ const customPlatformMethods = config.get('platform');
146
+ return Object.keys(PLATFORMS_MAP).filter((p) => {
147
+ const customMethod = customPlatformMethods === null || customPlatformMethods === void 0 ? void 0 : customPlatformMethods[p];
148
+ return typeof customMethod === 'function' ? customMethod(win) : PLATFORMS_MAP[p](win);
149
+ });
150
+ };
151
+ const isMobileWeb = (win) => isMobile(win) && !isHybrid(win);
152
+ const isIpad = (win) => {
153
+ // iOS 12 and below
154
+ if (testUserAgent(win, /iPad/i)) {
155
+ return true;
156
+ }
157
+ // iOS 13+
158
+ if (testUserAgent(win, /Macintosh/i) && isMobile(win)) {
159
+ return true;
160
+ }
161
+ return false;
162
+ };
163
+ const isIphone = (win) => testUserAgent(win, /iPhone/i);
164
+ const isIOS = (win) => testUserAgent(win, /iPhone|iPod/i) || isIpad(win);
165
+ const isAndroid = (win) => testUserAgent(win, /android|sink/i);
166
+ const isAndroidTablet = (win) => {
167
+ return isAndroid(win) && !testUserAgent(win, /mobile/i);
168
+ };
169
+ const isPhablet = (win) => {
170
+ const width = win.innerWidth;
171
+ const height = win.innerHeight;
172
+ const smallest = Math.min(width, height);
173
+ const largest = Math.max(width, height);
174
+ return smallest > 390 && smallest < 520 && largest > 620 && largest < 800;
175
+ };
176
+ const isTablet = (win) => {
177
+ const width = win.innerWidth;
178
+ const height = win.innerHeight;
179
+ const smallest = Math.min(width, height);
180
+ const largest = Math.max(width, height);
181
+ return isIpad(win) || isAndroidTablet(win) || (smallest > 460 && smallest < 820 && largest > 780 && largest < 1400);
182
+ };
183
+ const isMobile = (win) => matchMedia(win, '(any-pointer:coarse)');
184
+ const isDesktop = (win) => !isMobile(win);
185
+ const isHybrid = (win) => isCordova(win) || isCapacitorNative(win);
186
+ const isCordova = (win) => !!(win['cordova'] || win['phonegap'] || win['PhoneGap']);
187
+ const isCapacitorNative = (win) => {
188
+ const capacitor = win['Capacitor'];
189
+ // TODO(ROU-11693): Remove when we no longer support Capacitor 2, which does not have isNativePlatform
190
+ return !!((capacitor === null || capacitor === void 0 ? void 0 : capacitor.isNative) || ((capacitor === null || capacitor === void 0 ? void 0 : capacitor.isNativePlatform) && !!capacitor.isNativePlatform()));
191
+ };
192
+ const isElectron = (win) => testUserAgent(win, /electron/i);
193
+ const isPWA = (win) => { var _a; return !!(((_a = win.matchMedia) === null || _a === void 0 ? void 0 : _a.call(win, '(display-mode: standalone)').matches) || win.navigator.standalone); };
194
+ const testUserAgent = (win, expr) => expr.test(win.navigator.userAgent);
195
+ const matchMedia = (win, query) => { var _a; return (_a = win.matchMedia) === null || _a === void 0 ? void 0 : _a.call(win, query).matches; };
196
+ const PLATFORMS_MAP = {
197
+ ipad: isIpad,
198
+ iphone: isIphone,
199
+ ios: isIOS,
200
+ android: isAndroid,
201
+ phablet: isPhablet,
202
+ tablet: isTablet,
203
+ cordova: isCordova,
204
+ capacitor: isCapacitorNative,
205
+ electron: isElectron,
206
+ pwa: isPWA,
207
+ mobile: isMobile,
208
+ mobileweb: isMobileWeb,
209
+ desktop: isDesktop,
210
+ hybrid: isHybrid,
211
+ };
212
+
213
+ // TODO(FW-2832): types
214
+ let defaultMode;
215
+ const getIonMode = (ref) => {
216
+ return (ref && getMode(ref)) || defaultMode;
217
+ };
218
+ const initialize = (userConfig = {}) => {
219
+ if (typeof window === 'undefined') {
220
+ return;
221
+ }
222
+ const doc = window.document;
223
+ const win = window;
224
+ const Ionic = (win.Ionic = win.Ionic || {});
225
+ // create the Ionic.config from raw config object (if it exists)
226
+ // and convert Ionic.config into a ConfigApi that has a get() fn
227
+ const configObj = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, configFromSession(win)), { persistConfig: false }), Ionic.config), configFromURL(win)), userConfig);
228
+ config.reset(configObj);
229
+ if (config.getBoolean('persistConfig')) {
230
+ saveConfig(win, configObj);
231
+ }
232
+ // Setup platforms
233
+ setupPlatforms(win);
234
+ // first see if the mode was set as an attribute on <html>
235
+ // which could have been set by the user, or by pre-rendering
236
+ // otherwise get the mode via config settings, and fallback to md
237
+ Ionic.config = config;
238
+ Ionic.mode = defaultMode = config.get('mode', doc.documentElement.getAttribute('mode') || (isPlatform(win, 'ios') ? 'ios' : 'md'));
239
+ config.set('mode', defaultMode);
240
+ doc.documentElement.setAttribute('mode', defaultMode);
241
+ doc.documentElement.classList.add(defaultMode);
242
+ if (config.getBoolean('_testing')) {
243
+ config.set('animated', false);
244
+ }
245
+ const isIonicElement = (elm) => { var _a; return (_a = elm.tagName) === null || _a === void 0 ? void 0 : _a.startsWith('ION-'); };
246
+ const isAllowedIonicModeValue = (elmMode) => ['ios', 'md'].includes(elmMode);
247
+ setMode((elm) => {
248
+ while (elm) {
249
+ const elmMode = elm.mode || elm.getAttribute('mode');
250
+ if (elmMode) {
251
+ if (isAllowedIonicModeValue(elmMode)) {
252
+ return elmMode;
253
+ }
254
+ else if (isIonicElement(elm)) {
255
+ printIonWarning('Invalid ionic mode: "' + elmMode + '", expected: "ios" or "md"');
256
+ }
257
+ }
258
+ elm = elm.parentElement;
259
+ }
260
+ return defaultMode;
261
+ });
262
+ };
263
+
264
+ const globalScripts = initialize;
265
+ const globalStyles = "";
6
266
 
7
267
  /*
8
- Stencil Client Platform v4.20.0 | MIT Licensed | https://stenciljs.com
268
+ Stencil Client Platform v4.33.1 | MIT Licensed | https://stenciljs.com
9
269
  */
10
270
  var __defProp = Object.defineProperty;
11
271
  var __export = (target, all) => {
@@ -13,14 +273,47 @@ var __export = (target, all) => {
13
273
  __defProp(target, name, { get: all[name], enumerable: true });
14
274
  };
15
275
  var Build = {
16
- isDev: false,
17
- isBrowser: true,
18
- isServer: false,
19
- isTesting: false
20
- };
21
- var hostRefs = /* @__PURE__ */ new WeakMap();
22
- var getHostRef = (ref) => hostRefs.get(ref);
23
- var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
276
+ isBrowser: true};
277
+
278
+ // src/utils/constants.ts
279
+ var SVG_NS = "http://www.w3.org/2000/svg";
280
+ var HTML_NS = "http://www.w3.org/1999/xhtml";
281
+ var PrimitiveType = /* @__PURE__ */ ((PrimitiveType2) => {
282
+ PrimitiveType2["Undefined"] = "undefined";
283
+ PrimitiveType2["Null"] = "null";
284
+ PrimitiveType2["String"] = "string";
285
+ PrimitiveType2["Number"] = "number";
286
+ PrimitiveType2["SpecialNumber"] = "number";
287
+ PrimitiveType2["Boolean"] = "boolean";
288
+ PrimitiveType2["BigInt"] = "bigint";
289
+ return PrimitiveType2;
290
+ })(PrimitiveType || {});
291
+ var NonPrimitiveType = /* @__PURE__ */ ((NonPrimitiveType2) => {
292
+ NonPrimitiveType2["Array"] = "array";
293
+ NonPrimitiveType2["Date"] = "date";
294
+ NonPrimitiveType2["Map"] = "map";
295
+ NonPrimitiveType2["Object"] = "object";
296
+ NonPrimitiveType2["RegularExpression"] = "regexp";
297
+ NonPrimitiveType2["Set"] = "set";
298
+ NonPrimitiveType2["Channel"] = "channel";
299
+ NonPrimitiveType2["Symbol"] = "symbol";
300
+ return NonPrimitiveType2;
301
+ })(NonPrimitiveType || {});
302
+ var TYPE_CONSTANT = "type";
303
+ var VALUE_CONSTANT = "value";
304
+ var SERIALIZED_PREFIX = "serialized:";
305
+
306
+ // src/client/client-host-ref.ts
307
+ var getHostRef = (ref) => {
308
+ if (ref.__stencil__getHostRef) {
309
+ return ref.__stencil__getHostRef();
310
+ }
311
+ return void 0;
312
+ };
313
+ var registerInstance = (lazyInstance, hostRef) => {
314
+ lazyInstance.__stencil__getHostRef = () => hostRef;
315
+ hostRef.$lazyInstance$ = lazyInstance;
316
+ };
24
317
  var registerHost = (hostElement, cmpMeta) => {
25
318
  const hostRef = {
26
319
  $flags$: 0,
@@ -36,7 +329,9 @@ var registerHost = (hostElement, cmpMeta) => {
36
329
  hostElement["s-p"] = [];
37
330
  hostElement["s-rc"] = [];
38
331
  }
39
- return hostRefs.set(hostElement, hostRef);
332
+ const ref = hostRef;
333
+ hostElement.__stencil__getHostRef = () => ref;
334
+ return ref;
40
335
  };
41
336
  var isMemberInElement = (elm, memberName) => memberName in elm;
42
337
  var consoleError = (e, el) => (0, console.error)(e, el);
@@ -60,12 +355,17 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
60
355
  /* webpackExclude: /\.system\.entry\.js$/ */
61
356
  /* webpackMode: "lazy" */
62
357
  `./${bundleId}.entry.js${""}`
63
- ).then((importedModule) => {
64
- {
65
- cmpModules.set(bundleId, importedModule);
358
+ ).then(
359
+ (importedModule) => {
360
+ {
361
+ cmpModules.set(bundleId, importedModule);
362
+ }
363
+ return importedModule[exportName];
364
+ },
365
+ (e) => {
366
+ consoleError(e, hostRef.$hostElement$);
66
367
  }
67
- return importedModule[exportName];
68
- }, consoleError);
368
+ );
69
369
  };
70
370
 
71
371
  // src/client/client-style.ts
@@ -77,6 +377,7 @@ var CONTENT_REF_ID = "r";
77
377
  var ORG_LOCATION_ID = "o";
78
378
  var SLOT_NODE_ID = "s";
79
379
  var TEXT_NODE_ID = "t";
380
+ var COMMENT_NODE_ID = "c";
80
381
  var HYDRATE_ID = "s-id";
81
382
  var HYDRATED_STYLE_ID = "sty-id";
82
383
  var HYDRATE_CHILD_ID = "c-id";
@@ -84,7 +385,6 @@ var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
84
385
  var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
85
386
  var XLINK_NS = "http://www.w3.org/1999/xlink";
86
387
  var win = typeof window !== "undefined" ? window : {};
87
- var doc = win.document || { head: {} };
88
388
  var H = win.HTMLElement || class {
89
389
  };
90
390
  var plt = {
@@ -98,9 +398,10 @@ var plt = {
98
398
  };
99
399
  var supportsShadow = BUILD.shadowDom;
100
400
  var supportsListenerOptions = /* @__PURE__ */ (() => {
401
+ var _a;
101
402
  let supportsListenerOptions2 = false;
102
403
  try {
103
- doc.addEventListener(
404
+ (_a = win.document) == null ? void 0 : _a.addEventListener(
104
405
  "e",
105
406
  null,
106
407
  Object.defineProperty({}, "passive", {
@@ -165,24 +466,119 @@ var getAssetPath = (path) => {
165
466
  return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
166
467
  };
167
468
 
168
- // src/utils/constants.ts
169
- var EMPTY_OBJ = {};
170
- var SVG_NS = "http://www.w3.org/2000/svg";
171
- var HTML_NS = "http://www.w3.org/1999/xhtml";
172
-
173
469
  // src/utils/helpers.ts
174
- var isDef = (v) => v != null;
470
+ var isDef = (v) => v != null && v !== void 0;
175
471
  var isComplexType = (o) => {
176
472
  o = typeof o;
177
473
  return o === "object" || o === "function";
178
474
  };
179
475
 
180
476
  // src/utils/query-nonce-meta-tag-content.ts
181
- function queryNonceMetaTagContent(doc2) {
477
+ function queryNonceMetaTagContent(doc) {
182
478
  var _a, _b, _c;
183
- 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;
479
+ 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;
184
480
  }
185
481
 
482
+ // src/utils/regular-expression.ts
483
+ var escapeRegExpSpecialCharacters = (text) => {
484
+ return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
485
+ };
486
+
487
+ // src/utils/remote-value.ts
488
+ var RemoteValue = class _RemoteValue {
489
+ /**
490
+ * Deserializes a LocalValue serialized object back to its original JavaScript representation
491
+ *
492
+ * @param serialized The serialized LocalValue object
493
+ * @returns The original JavaScript value/object
494
+ */
495
+ static fromLocalValue(serialized) {
496
+ const type = serialized[TYPE_CONSTANT];
497
+ const value = VALUE_CONSTANT in serialized ? serialized[VALUE_CONSTANT] : void 0;
498
+ switch (type) {
499
+ case "string" /* String */:
500
+ return value;
501
+ case "boolean" /* Boolean */:
502
+ return value;
503
+ case "bigint" /* BigInt */:
504
+ return BigInt(value);
505
+ case "undefined" /* Undefined */:
506
+ return void 0;
507
+ case "null" /* Null */:
508
+ return null;
509
+ case "number" /* Number */:
510
+ if (value === "NaN") return NaN;
511
+ if (value === "-0") return -0;
512
+ if (value === "Infinity") return Infinity;
513
+ if (value === "-Infinity") return -Infinity;
514
+ return value;
515
+ case "array" /* Array */:
516
+ return value.map((item) => _RemoteValue.fromLocalValue(item));
517
+ case "date" /* Date */:
518
+ return new Date(value);
519
+ case "map" /* Map */:
520
+ const map2 = /* @__PURE__ */ new Map();
521
+ for (const [key, val] of value) {
522
+ const deserializedKey = typeof key === "object" && key !== null ? _RemoteValue.fromLocalValue(key) : key;
523
+ const deserializedValue = _RemoteValue.fromLocalValue(val);
524
+ map2.set(deserializedKey, deserializedValue);
525
+ }
526
+ return map2;
527
+ case "object" /* Object */:
528
+ const obj = {};
529
+ for (const [key, val] of value) {
530
+ obj[key] = _RemoteValue.fromLocalValue(val);
531
+ }
532
+ return obj;
533
+ case "regexp" /* RegularExpression */:
534
+ const { pattern, flags } = value;
535
+ return new RegExp(pattern, flags);
536
+ case "set" /* Set */:
537
+ const set = /* @__PURE__ */ new Set();
538
+ for (const item of value) {
539
+ set.add(_RemoteValue.fromLocalValue(item));
540
+ }
541
+ return set;
542
+ case "symbol" /* Symbol */:
543
+ return Symbol(value);
544
+ default:
545
+ throw new Error(`Unsupported type: ${type}`);
546
+ }
547
+ }
548
+ /**
549
+ * Utility method to deserialize multiple LocalValues at once
550
+ *
551
+ * @param serializedValues Array of serialized LocalValue objects
552
+ * @returns Array of deserialized JavaScript values
553
+ */
554
+ static fromLocalValueArray(serializedValues) {
555
+ return serializedValues.map((value) => _RemoteValue.fromLocalValue(value));
556
+ }
557
+ /**
558
+ * Verifies if the given object matches the structure of a serialized LocalValue
559
+ *
560
+ * @param obj Object to verify
561
+ * @returns boolean indicating if the object has LocalValue structure
562
+ */
563
+ static isLocalValueObject(obj) {
564
+ if (typeof obj !== "object" || obj === null) {
565
+ return false;
566
+ }
567
+ if (!obj.hasOwnProperty(TYPE_CONSTANT)) {
568
+ return false;
569
+ }
570
+ const type = obj[TYPE_CONSTANT];
571
+ const hasTypeProperty = Object.values({ ...PrimitiveType, ...NonPrimitiveType }).includes(type);
572
+ if (!hasTypeProperty) {
573
+ return false;
574
+ }
575
+ if (type !== "null" /* Null */ && type !== "undefined" /* Undefined */) {
576
+ return obj.hasOwnProperty(VALUE_CONSTANT);
577
+ }
578
+ return true;
579
+ }
580
+ };
581
+
186
582
  // src/utils/result.ts
187
583
  var result_exports = {};
188
584
  __export(result_exports, {
@@ -231,6 +627,538 @@ var unwrapErr = (result) => {
231
627
  throw result.value;
232
628
  }
233
629
  };
630
+
631
+ // src/utils/serialize.ts
632
+ function deserializeProperty(value) {
633
+ if (typeof value !== "string" || !value.startsWith(SERIALIZED_PREFIX)) {
634
+ return value;
635
+ }
636
+ return RemoteValue.fromLocalValue(JSON.parse(atob(value.slice(SERIALIZED_PREFIX.length))));
637
+ }
638
+ function createShadowRoot(cmpMeta) {
639
+ const shadowRoot = this.attachShadow({
640
+ mode: "open",
641
+ delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */)
642
+ }) ;
643
+ if (supportsConstructableStylesheets) {
644
+ const sheet = new CSSStyleSheet();
645
+ sheet.replaceSync(globalStyles);
646
+ shadowRoot.adoptedStyleSheets.push(sheet);
647
+ }
648
+ }
649
+ var updateFallbackSlotVisibility = (elm) => {
650
+ const childNodes = internalCall(elm, "childNodes");
651
+ if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
652
+ getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
653
+ if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
654
+ if (getSlotChildSiblings(slotNode, getSlotName(slotNode), false).length) {
655
+ slotNode.hidden = true;
656
+ } else {
657
+ slotNode.hidden = false;
658
+ }
659
+ }
660
+ });
661
+ }
662
+ let i2 = 0;
663
+ for (i2 = 0; i2 < childNodes.length; i2++) {
664
+ const childNode = childNodes[i2];
665
+ if (childNode.nodeType === 1 /* ElementNode */ && internalCall(childNode, "childNodes").length) {
666
+ updateFallbackSlotVisibility(childNode);
667
+ }
668
+ }
669
+ };
670
+ var getSlottedChildNodes = (childNodes) => {
671
+ const result = [];
672
+ for (let i2 = 0; i2 < childNodes.length; i2++) {
673
+ const slottedNode = childNodes[i2]["s-nr"] || void 0;
674
+ if (slottedNode && slottedNode.isConnected) {
675
+ result.push(slottedNode);
676
+ }
677
+ }
678
+ return result;
679
+ };
680
+ function getHostSlotNodes(childNodes, hostName, slotName) {
681
+ let i2 = 0;
682
+ let slottedNodes = [];
683
+ let childNode;
684
+ for (; i2 < childNodes.length; i2++) {
685
+ childNode = childNodes[i2];
686
+ if (childNode["s-sr"] && (!hostName || childNode["s-hn"] === hostName) && (slotName === void 0 || getSlotName(childNode) === slotName)) {
687
+ slottedNodes.push(childNode);
688
+ if (typeof slotName !== "undefined") return slottedNodes;
689
+ }
690
+ slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
691
+ }
692
+ return slottedNodes;
693
+ }
694
+ var getSlotChildSiblings = (slot, slotName, includeSlot = true) => {
695
+ const childNodes = [];
696
+ if (includeSlot && slot["s-sr"] || !slot["s-sr"]) childNodes.push(slot);
697
+ let node = slot;
698
+ while (node = node.nextSibling) {
699
+ if (getSlotName(node) === slotName && (includeSlot || !node["s-sr"])) childNodes.push(node);
700
+ }
701
+ return childNodes;
702
+ };
703
+ var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
704
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
705
+ if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
706
+ return true;
707
+ }
708
+ if (nodeToRelocate.getAttribute("slot") === slotName) {
709
+ return true;
710
+ }
711
+ return false;
712
+ }
713
+ if (nodeToRelocate["s-sn"] === slotName) {
714
+ return true;
715
+ }
716
+ return slotName === "";
717
+ };
718
+ var addSlotRelocateNode = (newChild, slotNode, prepend, position) => {
719
+ if (newChild["s-ol"] && newChild["s-ol"].isConnected) {
720
+ return;
721
+ }
722
+ const slottedNodeLocation = document.createTextNode("");
723
+ slottedNodeLocation["s-nr"] = newChild;
724
+ if (!slotNode["s-cr"] || !slotNode["s-cr"].parentNode) return;
725
+ const parent = slotNode["s-cr"].parentNode;
726
+ const appendMethod = prepend ? internalCall(parent, "prepend") : internalCall(parent, "appendChild");
727
+ if (typeof position !== "undefined") {
728
+ slottedNodeLocation["s-oo"] = position;
729
+ const childNodes = internalCall(parent, "childNodes");
730
+ const slotRelocateNodes = [slottedNodeLocation];
731
+ childNodes.forEach((n) => {
732
+ if (n["s-nr"]) slotRelocateNodes.push(n);
733
+ });
734
+ slotRelocateNodes.sort((a, b) => {
735
+ if (!a["s-oo"] || a["s-oo"] < (b["s-oo"] || 0)) return -1;
736
+ else if (!b["s-oo"] || b["s-oo"] < a["s-oo"]) return 1;
737
+ return 0;
738
+ });
739
+ slotRelocateNodes.forEach((n) => appendMethod.call(parent, n));
740
+ } else {
741
+ appendMethod.call(parent, slottedNodeLocation);
742
+ }
743
+ newChild["s-ol"] = slottedNodeLocation;
744
+ newChild["s-sh"] = slotNode["s-hn"];
745
+ };
746
+ var getSlotName = (node) => typeof node["s-sn"] === "string" ? node["s-sn"] : node.nodeType === 1 && node.getAttribute("slot") || void 0;
747
+ function patchSlotNode(node) {
748
+ if (node.assignedElements || node.assignedNodes || !node["s-sr"]) return;
749
+ const assignedFactory = (elementsOnly) => (function(opts) {
750
+ const toReturn = [];
751
+ const slotName = this["s-sn"];
752
+ if (opts == null ? void 0 : opts.flatten) {
753
+ console.error(`
754
+ Flattening is not supported for Stencil non-shadow slots.
755
+ You can use \`.childNodes\` to nested slot fallback content.
756
+ If you have a particular use case, please open an issue on the Stencil repo.
757
+ `);
758
+ }
759
+ const parent = this["s-cr"].parentElement;
760
+ const slottedNodes = parent.__childNodes ? parent.childNodes : getSlottedChildNodes(parent.childNodes);
761
+ slottedNodes.forEach((n) => {
762
+ if (slotName === getSlotName(n)) {
763
+ toReturn.push(n);
764
+ }
765
+ });
766
+ if (elementsOnly) {
767
+ return toReturn.filter((n) => n.nodeType === 1 /* ElementNode */);
768
+ }
769
+ return toReturn;
770
+ }).bind(node);
771
+ node.assignedElements = assignedFactory(true);
772
+ node.assignedNodes = assignedFactory(false);
773
+ }
774
+ function dispatchSlotChangeEvent(elm) {
775
+ elm.dispatchEvent(new CustomEvent("slotchange", { bubbles: false, cancelable: false, composed: false }));
776
+ }
777
+ function findSlotFromSlottedNode(slottedNode, parentHost) {
778
+ var _a;
779
+ parentHost = parentHost || ((_a = slottedNode["s-ol"]) == null ? void 0 : _a.parentElement);
780
+ if (!parentHost) return { slotNode: null, slotName: "" };
781
+ const slotName = slottedNode["s-sn"] = getSlotName(slottedNode) || "";
782
+ const childNodes = internalCall(parentHost, "childNodes");
783
+ const slotNode = getHostSlotNodes(childNodes, parentHost.tagName, slotName)[0];
784
+ return { slotNode, slotName };
785
+ }
786
+
787
+ // src/runtime/dom-extras.ts
788
+ var patchPseudoShadowDom = (hostElementPrototype) => {
789
+ patchCloneNode(hostElementPrototype);
790
+ patchSlotAppendChild(hostElementPrototype);
791
+ patchSlotAppend(hostElementPrototype);
792
+ patchSlotPrepend(hostElementPrototype);
793
+ patchSlotInsertAdjacentElement(hostElementPrototype);
794
+ patchSlotInsertAdjacentHTML(hostElementPrototype);
795
+ patchSlotInsertAdjacentText(hostElementPrototype);
796
+ patchInsertBefore(hostElementPrototype);
797
+ patchTextContent(hostElementPrototype);
798
+ patchChildSlotNodes(hostElementPrototype);
799
+ patchSlotRemoveChild(hostElementPrototype);
800
+ };
801
+ var patchCloneNode = (HostElementPrototype) => {
802
+ const orgCloneNode = HostElementPrototype.cloneNode;
803
+ HostElementPrototype.cloneNode = function(deep) {
804
+ const srcNode = this;
805
+ const isShadowDom = srcNode.shadowRoot && supportsShadow ;
806
+ const clonedNode = orgCloneNode.call(srcNode, isShadowDom ? deep : false);
807
+ if (!isShadowDom && deep) {
808
+ let i2 = 0;
809
+ let slotted, nonStencilNode;
810
+ const stencilPrivates = [
811
+ "s-id",
812
+ "s-cr",
813
+ "s-lr",
814
+ "s-rc",
815
+ "s-sc",
816
+ "s-p",
817
+ "s-cn",
818
+ "s-sr",
819
+ "s-sn",
820
+ "s-hn",
821
+ "s-ol",
822
+ "s-nr",
823
+ "s-si",
824
+ "s-rf",
825
+ "s-scs"
826
+ ];
827
+ const childNodes = this.__childNodes || this.childNodes;
828
+ for (; i2 < childNodes.length; i2++) {
829
+ slotted = childNodes[i2]["s-nr"];
830
+ nonStencilNode = stencilPrivates.every((privateField) => !childNodes[i2][privateField]);
831
+ if (slotted) {
832
+ if (clonedNode.__appendChild) {
833
+ clonedNode.__appendChild(slotted.cloneNode(true));
834
+ } else {
835
+ clonedNode.appendChild(slotted.cloneNode(true));
836
+ }
837
+ }
838
+ if (nonStencilNode) {
839
+ clonedNode.appendChild(childNodes[i2].cloneNode(true));
840
+ }
841
+ }
842
+ }
843
+ return clonedNode;
844
+ };
845
+ };
846
+ var patchSlotAppendChild = (HostElementPrototype) => {
847
+ HostElementPrototype.__appendChild = HostElementPrototype.appendChild;
848
+ HostElementPrototype.appendChild = function(newChild) {
849
+ const { slotName, slotNode } = findSlotFromSlottedNode(newChild, this);
850
+ if (slotNode) {
851
+ addSlotRelocateNode(newChild, slotNode);
852
+ const slotChildNodes = getSlotChildSiblings(slotNode, slotName);
853
+ const appendAfter = slotChildNodes[slotChildNodes.length - 1];
854
+ const parent = internalCall(appendAfter, "parentNode");
855
+ const insertedNode = internalCall(parent, "insertBefore")(newChild, appendAfter.nextSibling);
856
+ dispatchSlotChangeEvent(slotNode);
857
+ updateFallbackSlotVisibility(this);
858
+ return insertedNode;
859
+ }
860
+ return this.__appendChild(newChild);
861
+ };
862
+ };
863
+ var patchSlotRemoveChild = (ElementPrototype) => {
864
+ ElementPrototype.__removeChild = ElementPrototype.removeChild;
865
+ ElementPrototype.removeChild = function(toRemove) {
866
+ if (toRemove && typeof toRemove["s-sn"] !== "undefined") {
867
+ const childNodes = this.__childNodes || this.childNodes;
868
+ const slotNode = getHostSlotNodes(childNodes, this.tagName, toRemove["s-sn"]);
869
+ if (slotNode && toRemove.isConnected) {
870
+ toRemove.remove();
871
+ updateFallbackSlotVisibility(this);
872
+ return;
873
+ }
874
+ }
875
+ return this.__removeChild(toRemove);
876
+ };
877
+ };
878
+ var patchSlotPrepend = (HostElementPrototype) => {
879
+ HostElementPrototype.__prepend = HostElementPrototype.prepend;
880
+ HostElementPrototype.prepend = function(...newChildren) {
881
+ newChildren.forEach((newChild) => {
882
+ if (typeof newChild === "string") {
883
+ newChild = this.ownerDocument.createTextNode(newChild);
884
+ }
885
+ const slotName = (newChild["s-sn"] = getSlotName(newChild)) || "";
886
+ const childNodes = internalCall(this, "childNodes");
887
+ const slotNode = getHostSlotNodes(childNodes, this.tagName, slotName)[0];
888
+ if (slotNode) {
889
+ addSlotRelocateNode(newChild, slotNode, true);
890
+ const slotChildNodes = getSlotChildSiblings(slotNode, slotName);
891
+ const appendAfter = slotChildNodes[0];
892
+ const parent = internalCall(appendAfter, "parentNode");
893
+ const toReturn = internalCall(parent, "insertBefore")(newChild, internalCall(appendAfter, "nextSibling"));
894
+ dispatchSlotChangeEvent(slotNode);
895
+ return toReturn;
896
+ }
897
+ if (newChild.nodeType === 1 && !!newChild.getAttribute("slot")) {
898
+ newChild.hidden = true;
899
+ }
900
+ return HostElementPrototype.__prepend(newChild);
901
+ });
902
+ };
903
+ };
904
+ var patchSlotAppend = (HostElementPrototype) => {
905
+ HostElementPrototype.__append = HostElementPrototype.append;
906
+ HostElementPrototype.append = function(...newChildren) {
907
+ newChildren.forEach((newChild) => {
908
+ if (typeof newChild === "string") {
909
+ newChild = this.ownerDocument.createTextNode(newChild);
910
+ }
911
+ this.appendChild(newChild);
912
+ });
913
+ };
914
+ };
915
+ var patchSlotInsertAdjacentHTML = (HostElementPrototype) => {
916
+ const originalInsertAdjacentHtml = HostElementPrototype.insertAdjacentHTML;
917
+ HostElementPrototype.insertAdjacentHTML = function(position, text) {
918
+ if (position !== "afterbegin" && position !== "beforeend") {
919
+ return originalInsertAdjacentHtml.call(this, position, text);
920
+ }
921
+ const container = this.ownerDocument.createElement("_");
922
+ let node;
923
+ container.innerHTML = text;
924
+ if (position === "afterbegin") {
925
+ while (node = container.firstChild) {
926
+ this.prepend(node);
927
+ }
928
+ } else if (position === "beforeend") {
929
+ while (node = container.firstChild) {
930
+ this.append(node);
931
+ }
932
+ }
933
+ };
934
+ };
935
+ var patchSlotInsertAdjacentText = (HostElementPrototype) => {
936
+ HostElementPrototype.insertAdjacentText = function(position, text) {
937
+ this.insertAdjacentHTML(position, text);
938
+ };
939
+ };
940
+ var patchInsertBefore = (HostElementPrototype) => {
941
+ const eleProto = HostElementPrototype;
942
+ if (eleProto.__insertBefore) return;
943
+ eleProto.__insertBefore = HostElementPrototype.insertBefore;
944
+ HostElementPrototype.insertBefore = function(newChild, currentChild) {
945
+ const { slotName, slotNode } = findSlotFromSlottedNode(newChild, this);
946
+ const slottedNodes = this.__childNodes ? this.childNodes : getSlottedChildNodes(this.childNodes);
947
+ if (slotNode) {
948
+ let found = false;
949
+ slottedNodes.forEach((childNode) => {
950
+ if (childNode === currentChild || currentChild === null) {
951
+ found = true;
952
+ if (currentChild === null || slotName !== currentChild["s-sn"]) {
953
+ this.appendChild(newChild);
954
+ return;
955
+ }
956
+ if (slotName === currentChild["s-sn"]) {
957
+ addSlotRelocateNode(newChild, slotNode);
958
+ const parent = internalCall(currentChild, "parentNode");
959
+ internalCall(parent, "insertBefore")(newChild, currentChild);
960
+ dispatchSlotChangeEvent(slotNode);
961
+ }
962
+ return;
963
+ }
964
+ });
965
+ if (found) return newChild;
966
+ }
967
+ const parentNode = currentChild == null ? void 0 : currentChild.__parentNode;
968
+ if (parentNode && !this.isSameNode(parentNode)) {
969
+ return this.appendChild(newChild);
970
+ }
971
+ return this.__insertBefore(newChild, currentChild);
972
+ };
973
+ };
974
+ var patchSlotInsertAdjacentElement = (HostElementPrototype) => {
975
+ const originalInsertAdjacentElement = HostElementPrototype.insertAdjacentElement;
976
+ HostElementPrototype.insertAdjacentElement = function(position, element) {
977
+ if (position !== "afterbegin" && position !== "beforeend") {
978
+ return originalInsertAdjacentElement.call(this, position, element);
979
+ }
980
+ if (position === "afterbegin") {
981
+ this.prepend(element);
982
+ return element;
983
+ } else if (position === "beforeend") {
984
+ this.append(element);
985
+ return element;
986
+ }
987
+ return element;
988
+ };
989
+ };
990
+ var patchTextContent = (hostElementPrototype) => {
991
+ patchHostOriginalAccessor("textContent", hostElementPrototype);
992
+ Object.defineProperty(hostElementPrototype, "textContent", {
993
+ get: function() {
994
+ let text = "";
995
+ const childNodes = this.__childNodes ? this.childNodes : getSlottedChildNodes(this.childNodes);
996
+ childNodes.forEach((node) => text += node.textContent || "");
997
+ return text;
998
+ },
999
+ set: function(value) {
1000
+ const childNodes = this.__childNodes ? this.childNodes : getSlottedChildNodes(this.childNodes);
1001
+ childNodes.forEach((node) => {
1002
+ if (node["s-ol"]) node["s-ol"].remove();
1003
+ node.remove();
1004
+ });
1005
+ this.insertAdjacentHTML("beforeend", value);
1006
+ }
1007
+ });
1008
+ };
1009
+ var patchChildSlotNodes = (elm) => {
1010
+ class FakeNodeList extends Array {
1011
+ item(n) {
1012
+ return this[n];
1013
+ }
1014
+ }
1015
+ patchHostOriginalAccessor("children", elm);
1016
+ Object.defineProperty(elm, "children", {
1017
+ get() {
1018
+ return this.childNodes.filter((n) => n.nodeType === 1);
1019
+ }
1020
+ });
1021
+ Object.defineProperty(elm, "childElementCount", {
1022
+ get() {
1023
+ return this.children.length;
1024
+ }
1025
+ });
1026
+ patchHostOriginalAccessor("firstChild", elm);
1027
+ Object.defineProperty(elm, "firstChild", {
1028
+ get() {
1029
+ return this.childNodes[0];
1030
+ }
1031
+ });
1032
+ patchHostOriginalAccessor("lastChild", elm);
1033
+ Object.defineProperty(elm, "lastChild", {
1034
+ get() {
1035
+ return this.childNodes[this.childNodes.length - 1];
1036
+ }
1037
+ });
1038
+ patchHostOriginalAccessor("childNodes", elm);
1039
+ Object.defineProperty(elm, "childNodes", {
1040
+ get() {
1041
+ const result = new FakeNodeList();
1042
+ result.push(...getSlottedChildNodes(this.__childNodes));
1043
+ return result;
1044
+ }
1045
+ });
1046
+ };
1047
+ var patchSlottedNode = (node) => {
1048
+ if (!node || node.__nextSibling !== void 0 || !globalThis.Node) return;
1049
+ patchNextSibling(node);
1050
+ patchPreviousSibling(node);
1051
+ patchParentNode(node);
1052
+ if (node.nodeType === Node.ELEMENT_NODE) {
1053
+ patchNextElementSibling(node);
1054
+ patchPreviousElementSibling(node);
1055
+ }
1056
+ };
1057
+ var patchNextSibling = (node) => {
1058
+ if (!node || node.__nextSibling) return;
1059
+ patchHostOriginalAccessor("nextSibling", node);
1060
+ Object.defineProperty(node, "nextSibling", {
1061
+ get: function() {
1062
+ var _a;
1063
+ const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.childNodes;
1064
+ const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
1065
+ if (parentNodes && index > -1) {
1066
+ return parentNodes[index + 1];
1067
+ }
1068
+ return this.__nextSibling;
1069
+ }
1070
+ });
1071
+ };
1072
+ var patchNextElementSibling = (element) => {
1073
+ if (!element || element.__nextElementSibling) return;
1074
+ patchHostOriginalAccessor("nextElementSibling", element);
1075
+ Object.defineProperty(element, "nextElementSibling", {
1076
+ get: function() {
1077
+ var _a;
1078
+ const parentEles = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.children;
1079
+ const index = parentEles == null ? void 0 : parentEles.indexOf(this);
1080
+ if (parentEles && index > -1) {
1081
+ return parentEles[index + 1];
1082
+ }
1083
+ return this.__nextElementSibling;
1084
+ }
1085
+ });
1086
+ };
1087
+ var patchPreviousSibling = (node) => {
1088
+ if (!node || node.__previousSibling) return;
1089
+ patchHostOriginalAccessor("previousSibling", node);
1090
+ Object.defineProperty(node, "previousSibling", {
1091
+ get: function() {
1092
+ var _a;
1093
+ const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.childNodes;
1094
+ const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
1095
+ if (parentNodes && index > -1) {
1096
+ return parentNodes[index - 1];
1097
+ }
1098
+ return this.__previousSibling;
1099
+ }
1100
+ });
1101
+ };
1102
+ var patchPreviousElementSibling = (element) => {
1103
+ if (!element || element.__previousElementSibling) return;
1104
+ patchHostOriginalAccessor("previousElementSibling", element);
1105
+ Object.defineProperty(element, "previousElementSibling", {
1106
+ get: function() {
1107
+ var _a;
1108
+ const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.children;
1109
+ const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
1110
+ if (parentNodes && index > -1) {
1111
+ return parentNodes[index - 1];
1112
+ }
1113
+ return this.__previousElementSibling;
1114
+ }
1115
+ });
1116
+ };
1117
+ var patchParentNode = (node) => {
1118
+ if (!node || node.__parentNode) return;
1119
+ patchHostOriginalAccessor("parentNode", node);
1120
+ Object.defineProperty(node, "parentNode", {
1121
+ get: function() {
1122
+ var _a;
1123
+ return ((_a = this["s-ol"]) == null ? void 0 : _a.parentNode) || this.__parentNode;
1124
+ },
1125
+ set: function(value) {
1126
+ this.__parentNode = value;
1127
+ }
1128
+ });
1129
+ };
1130
+ var validElementPatches = ["children", "nextElementSibling", "previousElementSibling"];
1131
+ var validNodesPatches = [
1132
+ "childNodes",
1133
+ "firstChild",
1134
+ "lastChild",
1135
+ "nextSibling",
1136
+ "previousSibling",
1137
+ "textContent",
1138
+ "parentNode"
1139
+ ];
1140
+ function patchHostOriginalAccessor(accessorName, node) {
1141
+ let accessor;
1142
+ if (validElementPatches.includes(accessorName)) {
1143
+ accessor = Object.getOwnPropertyDescriptor(Element.prototype, accessorName);
1144
+ } else if (validNodesPatches.includes(accessorName)) {
1145
+ accessor = Object.getOwnPropertyDescriptor(Node.prototype, accessorName);
1146
+ }
1147
+ if (!accessor) {
1148
+ accessor = Object.getOwnPropertyDescriptor(node, accessorName);
1149
+ }
1150
+ if (accessor) Object.defineProperty(node, "__" + accessorName, accessor);
1151
+ }
1152
+ function internalCall(node, method) {
1153
+ if ("__" + method in node) {
1154
+ const toReturn = node["__" + method];
1155
+ if (typeof toReturn !== "function") return toReturn;
1156
+ return toReturn.bind(node);
1157
+ } else {
1158
+ if (typeof node[method] !== "function") return node[method];
1159
+ return node[method].bind(node);
1160
+ }
1161
+ }
234
1162
  var createTime = (fnName, tagName = "") => {
235
1163
  {
236
1164
  return () => {
@@ -359,54 +1287,166 @@ var convertToPrivate = (node) => {
359
1287
 
360
1288
  // src/runtime/client-hydrate.ts
361
1289
  var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1290
+ var _a;
362
1291
  const endHydrate = createTime("hydrateClient", tagName);
363
1292
  const shadowRoot = hostElm.shadowRoot;
364
1293
  const childRenderNodes = [];
365
1294
  const slotNodes = [];
1295
+ const slottedNodes = [];
366
1296
  const shadowRootNodes = shadowRoot ? [] : null;
367
- const vnode = hostRef.$vnode$ = newVNode(tagName, null);
368
- if (!plt.$orgLocNodes$) {
369
- initializeDocumentHydrate(doc.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
1297
+ const vnode = newVNode(tagName, null);
1298
+ vnode.$elm$ = hostElm;
1299
+ const members = Object.entries(((_a = hostRef.$cmpMeta$) == null ? void 0 : _a.$members$) || {});
1300
+ members.forEach(([memberName, [memberFlags, metaAttributeName]]) => {
1301
+ var _a2;
1302
+ if (!(memberFlags & 31 /* Prop */)) {
1303
+ return;
1304
+ }
1305
+ const attributeName = metaAttributeName || memberName;
1306
+ const attrVal = hostElm.getAttribute(attributeName);
1307
+ if (attrVal !== null) {
1308
+ const attrPropVal = parsePropertyValue(attrVal, memberFlags);
1309
+ (_a2 = hostRef == null ? void 0 : hostRef.$instanceValues$) == null ? void 0 : _a2.set(memberName, attrPropVal);
1310
+ }
1311
+ });
1312
+ let scopeId2;
1313
+ {
1314
+ const cmpMeta = hostRef.$cmpMeta$;
1315
+ if (cmpMeta && cmpMeta.$flags$ & 10 /* needsScopedEncapsulation */ && hostElm["s-sc"]) {
1316
+ scopeId2 = hostElm["s-sc"];
1317
+ hostElm.classList.add(scopeId2 + "-h");
1318
+ } else if (hostElm["s-sc"]) {
1319
+ delete hostElm["s-sc"];
1320
+ }
1321
+ }
1322
+ if (win.document && (!plt.$orgLocNodes$ || !plt.$orgLocNodes$.size)) {
1323
+ initializeDocumentHydrate(win.document.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
370
1324
  }
371
1325
  hostElm[HYDRATE_ID] = hostId;
372
1326
  hostElm.removeAttribute(HYDRATE_ID);
373
- clientHydrate(vnode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, hostElm, hostId);
374
- childRenderNodes.map((c) => {
375
- const orgLocationId = c.$hostId$ + "." + c.$nodeId$;
1327
+ hostRef.$vnode$ = clientHydrate(
1328
+ vnode,
1329
+ childRenderNodes,
1330
+ slotNodes,
1331
+ shadowRootNodes,
1332
+ hostElm,
1333
+ hostElm,
1334
+ hostId,
1335
+ slottedNodes
1336
+ );
1337
+ let crIndex = 0;
1338
+ const crLength = childRenderNodes.length;
1339
+ let childRenderNode;
1340
+ for (crIndex; crIndex < crLength; crIndex++) {
1341
+ childRenderNode = childRenderNodes[crIndex];
1342
+ const orgLocationId = childRenderNode.$hostId$ + "." + childRenderNode.$nodeId$;
376
1343
  const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
377
- const node = c.$elm$;
378
- if (orgLocationNode && supportsShadow && orgLocationNode["s-en"] === "") {
379
- orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
380
- }
1344
+ const node = childRenderNode.$elm$;
381
1345
  if (!shadowRoot) {
382
- node["s-hn"] = tagName;
383
- if (orgLocationNode) {
384
- node["s-ol"] = orgLocationNode;
385
- node["s-ol"]["s-nr"] = node;
1346
+ node["s-hn"] = tagName.toUpperCase();
1347
+ if (childRenderNode.$tag$ === "slot") {
1348
+ node["s-cr"] = hostElm["s-cr"];
1349
+ }
1350
+ }
1351
+ if (childRenderNode.$tag$ === "slot") {
1352
+ childRenderNode.$name$ = childRenderNode.$elm$["s-sn"] || childRenderNode.$elm$["name"] || null;
1353
+ if (childRenderNode.$children$) {
1354
+ childRenderNode.$flags$ |= 2 /* isSlotFallback */;
1355
+ if (!childRenderNode.$elm$.childNodes.length) {
1356
+ childRenderNode.$children$.forEach((c) => {
1357
+ childRenderNode.$elm$.appendChild(c.$elm$);
1358
+ });
1359
+ }
1360
+ } else {
1361
+ childRenderNode.$flags$ |= 1 /* isSlotReference */;
1362
+ }
1363
+ }
1364
+ if (orgLocationNode && orgLocationNode.isConnected) {
1365
+ if (shadowRoot && orgLocationNode["s-en"] === "") {
1366
+ orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
1367
+ }
1368
+ orgLocationNode.parentNode.removeChild(orgLocationNode);
1369
+ if (!shadowRoot) {
1370
+ node["s-oo"] = parseInt(childRenderNode.$nodeId$);
386
1371
  }
387
1372
  }
388
1373
  plt.$orgLocNodes$.delete(orgLocationId);
389
- });
390
- if (shadowRoot) {
391
- shadowRootNodes.map((shadowRootNode) => {
392
- if (shadowRootNode) {
393
- shadowRoot.appendChild(shadowRootNode);
1374
+ }
1375
+ const hosts = [];
1376
+ const snLen = slottedNodes.length;
1377
+ let snIndex = 0;
1378
+ let slotGroup;
1379
+ let snGroupIdx;
1380
+ let snGroupLen;
1381
+ let slottedItem;
1382
+ for (snIndex; snIndex < snLen; snIndex++) {
1383
+ slotGroup = slottedNodes[snIndex];
1384
+ if (!slotGroup || !slotGroup.length) continue;
1385
+ snGroupLen = slotGroup.length;
1386
+ snGroupIdx = 0;
1387
+ for (snGroupIdx; snGroupIdx < snGroupLen; snGroupIdx++) {
1388
+ slottedItem = slotGroup[snGroupIdx];
1389
+ if (!hosts[slottedItem.hostId]) {
1390
+ hosts[slottedItem.hostId] = plt.$orgLocNodes$.get(slottedItem.hostId);
1391
+ }
1392
+ if (!hosts[slottedItem.hostId]) continue;
1393
+ const hostEle = hosts[slottedItem.hostId];
1394
+ if (!hostEle.shadowRoot || !shadowRoot) {
1395
+ slottedItem.slot["s-cr"] = hostEle["s-cr"];
1396
+ if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
1397
+ slottedItem.slot["s-cr"] = hostEle;
1398
+ } else {
1399
+ slottedItem.slot["s-cr"] = (hostEle.__childNodes || hostEle.childNodes)[0];
1400
+ }
1401
+ addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
1402
+ {
1403
+ patchSlottedNode(slottedItem.node);
1404
+ }
1405
+ }
1406
+ if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
1407
+ hostEle.appendChild(slottedItem.node);
394
1408
  }
1409
+ }
1410
+ }
1411
+ if (scopeId2 && slotNodes.length) {
1412
+ slotNodes.forEach((slot) => {
1413
+ slot.$elm$.parentElement.classList.add(scopeId2 + "-s");
395
1414
  });
396
1415
  }
1416
+ if (shadowRoot && !shadowRoot.childNodes.length) {
1417
+ let rnIdex = 0;
1418
+ const rnLen = shadowRootNodes.length;
1419
+ if (rnLen) {
1420
+ for (rnIdex; rnIdex < rnLen; rnIdex++) {
1421
+ shadowRoot.appendChild(shadowRootNodes[rnIdex]);
1422
+ }
1423
+ Array.from(hostElm.childNodes).forEach((node) => {
1424
+ if (typeof node["s-sn"] !== "string") {
1425
+ if (node.nodeType === 1 /* ElementNode */ && node.slot && node.hidden) {
1426
+ node.removeAttribute("hidden");
1427
+ } else if (node.nodeType === 8 /* CommentNode */ || node.nodeType === 3 /* TextNode */ && !node.wholeText.trim()) {
1428
+ node.parentNode.removeChild(node);
1429
+ }
1430
+ }
1431
+ });
1432
+ }
1433
+ }
1434
+ plt.$orgLocNodes$.delete(hostElm["s-id"]);
1435
+ hostRef.$hostElement$ = hostElm;
397
1436
  endHydrate();
398
1437
  };
399
- var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId) => {
1438
+ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId, slottedNodes = []) => {
400
1439
  let childNodeType;
401
1440
  let childIdSplt;
402
1441
  let childVNode;
403
1442
  let i2;
1443
+ const scopeId2 = hostElm["s-sc"];
404
1444
  if (node.nodeType === 1 /* ElementNode */) {
405
1445
  childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
406
1446
  if (childNodeType) {
407
1447
  childIdSplt = childNodeType.split(".");
408
1448
  if (childIdSplt[0] === hostId || childIdSplt[0] === "0") {
409
- childVNode = {
1449
+ childVNode = createSimpleVNode({
410
1450
  $flags$: 0,
411
1451
  $hostId$: childIdSplt[0],
412
1452
  $nodeId$: childIdSplt[1],
@@ -414,18 +1454,43 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
414
1454
  $index$: childIdSplt[3],
415
1455
  $tag$: node.tagName.toLowerCase(),
416
1456
  $elm$: node,
417
- $attrs$: null,
418
- $children$: null,
419
- $key$: null,
420
- $name$: null,
421
- $text$: null
422
- };
1457
+ // If we don't add the initial classes to the VNode, the first `vdom-render.ts` patch
1458
+ // won't try to reconcile them. Classes set on the node will be blown away.
1459
+ $attrs$: { class: node.className || "" }
1460
+ });
423
1461
  childRenderNodes.push(childVNode);
424
1462
  node.removeAttribute(HYDRATE_CHILD_ID);
425
1463
  if (!parentVNode.$children$) {
426
1464
  parentVNode.$children$ = [];
427
1465
  }
428
- parentVNode.$children$[childVNode.$index$] = childVNode;
1466
+ if (scopeId2) {
1467
+ node["s-si"] = scopeId2;
1468
+ childVNode.$attrs$.class += " " + scopeId2;
1469
+ }
1470
+ const slotName = childVNode.$elm$.getAttribute("s-sn");
1471
+ if (typeof slotName === "string") {
1472
+ if (childVNode.$tag$ === "slot-fb") {
1473
+ addSlot(
1474
+ slotName,
1475
+ childIdSplt[2],
1476
+ childVNode,
1477
+ node,
1478
+ parentVNode,
1479
+ childRenderNodes,
1480
+ slotNodes,
1481
+ shadowRootNodes,
1482
+ slottedNodes
1483
+ );
1484
+ if (scopeId2) {
1485
+ node.classList.add(scopeId2);
1486
+ }
1487
+ }
1488
+ childVNode.$elm$["s-sn"] = slotName;
1489
+ childVNode.$elm$.removeAttribute("s-sn");
1490
+ }
1491
+ if (childVNode.$index$ !== void 0) {
1492
+ parentVNode.$children$[childVNode.$index$] = childVNode;
1493
+ }
429
1494
  parentVNode = childVNode;
430
1495
  if (shadowRootNodes && childVNode.$depth$ === "0") {
431
1496
  shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
@@ -441,31 +1506,33 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
441
1506
  shadowRootNodes,
442
1507
  hostElm,
443
1508
  node.shadowRoot.childNodes[i2],
444
- hostId
1509
+ hostId,
1510
+ slottedNodes
445
1511
  );
446
1512
  }
447
1513
  }
448
- for (i2 = node.childNodes.length - 1; i2 >= 0; i2--) {
1514
+ const nonShadowNodes = node.__childNodes || node.childNodes;
1515
+ for (i2 = nonShadowNodes.length - 1; i2 >= 0; i2--) {
449
1516
  clientHydrate(
450
1517
  parentVNode,
451
1518
  childRenderNodes,
452
1519
  slotNodes,
453
1520
  shadowRootNodes,
454
1521
  hostElm,
455
- node.childNodes[i2],
456
- hostId
1522
+ nonShadowNodes[i2],
1523
+ hostId,
1524
+ slottedNodes
457
1525
  );
458
1526
  }
459
1527
  } else if (node.nodeType === 8 /* CommentNode */) {
460
1528
  childIdSplt = node.nodeValue.split(".");
461
1529
  if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
462
1530
  childNodeType = childIdSplt[0];
463
- childVNode = {
464
- $flags$: 0,
1531
+ childVNode = createSimpleVNode({
465
1532
  $hostId$: childIdSplt[1],
466
1533
  $nodeId$: childIdSplt[2],
467
1534
  $depth$: childIdSplt[3],
468
- $index$: childIdSplt[4],
1535
+ $index$: childIdSplt[4] || "0",
469
1536
  $elm$: node,
470
1537
  $attrs$: null,
471
1538
  $children$: null,
@@ -473,46 +1540,43 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
473
1540
  $name$: null,
474
1541
  $tag$: null,
475
1542
  $text$: null
476
- };
1543
+ });
477
1544
  if (childNodeType === TEXT_NODE_ID) {
478
- childVNode.$elm$ = node.nextSibling;
1545
+ childVNode.$elm$ = findCorrespondingNode(node, 3 /* TextNode */);
479
1546
  if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
480
1547
  childVNode.$text$ = childVNode.$elm$.textContent;
481
1548
  childRenderNodes.push(childVNode);
482
1549
  node.remove();
483
- if (!parentVNode.$children$) {
484
- parentVNode.$children$ = [];
1550
+ if (hostId === childVNode.$hostId$) {
1551
+ if (!parentVNode.$children$) {
1552
+ parentVNode.$children$ = [];
1553
+ }
1554
+ parentVNode.$children$[childVNode.$index$] = childVNode;
485
1555
  }
486
- parentVNode.$children$[childVNode.$index$] = childVNode;
487
1556
  if (shadowRootNodes && childVNode.$depth$ === "0") {
488
1557
  shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
489
1558
  }
490
1559
  }
1560
+ } else if (childNodeType === COMMENT_NODE_ID) {
1561
+ childVNode.$elm$ = findCorrespondingNode(node, 8 /* CommentNode */);
1562
+ if (childVNode.$elm$ && childVNode.$elm$.nodeType === 8 /* CommentNode */) {
1563
+ childRenderNodes.push(childVNode);
1564
+ node.remove();
1565
+ }
491
1566
  } else if (childVNode.$hostId$ === hostId) {
492
1567
  if (childNodeType === SLOT_NODE_ID) {
493
- childVNode.$tag$ = "slot";
494
- if (childIdSplt[5]) {
495
- node["s-sn"] = childVNode.$name$ = childIdSplt[5];
496
- } else {
497
- node["s-sn"] = "";
498
- }
499
- node["s-sr"] = true;
500
- if (shadowRootNodes) {
501
- childVNode.$elm$ = doc.createElement(childVNode.$tag$);
502
- if (childVNode.$name$) {
503
- childVNode.$elm$.setAttribute("name", childVNode.$name$);
504
- }
505
- node.parentNode.insertBefore(childVNode.$elm$, node);
506
- node.remove();
507
- if (childVNode.$depth$ === "0") {
508
- shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
509
- }
510
- }
511
- slotNodes.push(childVNode);
512
- if (!parentVNode.$children$) {
513
- parentVNode.$children$ = [];
514
- }
515
- parentVNode.$children$[childVNode.$index$] = childVNode;
1568
+ const slotName = node["s-sn"] = childIdSplt[5] || "";
1569
+ addSlot(
1570
+ slotName,
1571
+ childIdSplt[2],
1572
+ childVNode,
1573
+ node,
1574
+ parentVNode,
1575
+ childRenderNodes,
1576
+ slotNodes,
1577
+ shadowRootNodes,
1578
+ slottedNodes
1579
+ );
516
1580
  } else if (childNodeType === CONTENT_REF_ID) {
517
1581
  if (shadowRootNodes) {
518
1582
  node.remove();
@@ -528,18 +1592,28 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
528
1592
  vnode.$elm$ = node;
529
1593
  vnode.$index$ = "0";
530
1594
  parentVNode.$children$ = [vnode];
1595
+ } else {
1596
+ if (node.nodeType === 3 /* TextNode */ && !node.wholeText.trim()) {
1597
+ node.remove();
1598
+ }
531
1599
  }
1600
+ return parentVNode;
532
1601
  };
533
1602
  var initializeDocumentHydrate = (node, orgLocNodes) => {
534
1603
  if (node.nodeType === 1 /* ElementNode */) {
1604
+ const componentId = node[HYDRATE_ID] || node.getAttribute(HYDRATE_ID);
1605
+ if (componentId) {
1606
+ orgLocNodes.set(componentId, node);
1607
+ }
535
1608
  let i2 = 0;
536
1609
  if (node.shadowRoot) {
537
1610
  for (; i2 < node.shadowRoot.childNodes.length; i2++) {
538
1611
  initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
539
1612
  }
540
1613
  }
541
- for (i2 = 0; i2 < node.childNodes.length; i2++) {
542
- initializeDocumentHydrate(node.childNodes[i2], orgLocNodes);
1614
+ const nonShadowNodes = node.__childNodes || node.childNodes;
1615
+ for (i2 = 0; i2 < nonShadowNodes.length; i2++) {
1616
+ initializeDocumentHydrate(nonShadowNodes[i2], orgLocNodes);
543
1617
  }
544
1618
  } else if (node.nodeType === 8 /* CommentNode */) {
545
1619
  const childIdSplt = node.nodeValue.split(".");
@@ -550,18 +1624,110 @@ var initializeDocumentHydrate = (node, orgLocNodes) => {
550
1624
  }
551
1625
  }
552
1626
  };
1627
+ var createSimpleVNode = (vnode) => {
1628
+ const defaultVNode = {
1629
+ $flags$: 0,
1630
+ $hostId$: null,
1631
+ $nodeId$: null,
1632
+ $depth$: null,
1633
+ $index$: "0",
1634
+ $elm$: null,
1635
+ $attrs$: null,
1636
+ $children$: null,
1637
+ $key$: null,
1638
+ $name$: null,
1639
+ $tag$: null,
1640
+ $text$: null
1641
+ };
1642
+ return { ...defaultVNode, ...vnode };
1643
+ };
1644
+ function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNodes, slotNodes, shadowRootNodes, slottedNodes) {
1645
+ node["s-sr"] = true;
1646
+ childVNode.$name$ = slotName || null;
1647
+ childVNode.$tag$ = "slot";
1648
+ const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
1649
+ if (shadowRootNodes && win.document) {
1650
+ const slot = childVNode.$elm$ = win.document.createElement(childVNode.$tag$);
1651
+ if (childVNode.$name$) {
1652
+ childVNode.$elm$.setAttribute("name", slotName);
1653
+ }
1654
+ if (parentNodeId && parentNodeId !== childVNode.$hostId$) {
1655
+ parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
1656
+ } else {
1657
+ node.parentNode.insertBefore(childVNode.$elm$, node);
1658
+ }
1659
+ addSlottedNodes(slottedNodes, slotId, slotName, node, childVNode.$hostId$);
1660
+ node.remove();
1661
+ if (childVNode.$depth$ === "0") {
1662
+ shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
1663
+ }
1664
+ } else {
1665
+ const slot = childVNode.$elm$;
1666
+ const shouldMove = parentNodeId && parentNodeId !== childVNode.$hostId$ && parentVNode.$elm$.shadowRoot;
1667
+ addSlottedNodes(slottedNodes, slotId, slotName, node, shouldMove ? parentNodeId : childVNode.$hostId$);
1668
+ patchSlotNode(node);
1669
+ if (shouldMove) {
1670
+ parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
1671
+ }
1672
+ childRenderNodes.push(childVNode);
1673
+ }
1674
+ slotNodes.push(childVNode);
1675
+ if (!parentVNode.$children$) {
1676
+ parentVNode.$children$ = [];
1677
+ }
1678
+ parentVNode.$children$[childVNode.$index$] = childVNode;
1679
+ }
1680
+ var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) => {
1681
+ let slottedNode = slotNode.nextSibling;
1682
+ slottedNodes[slotNodeId] = slottedNodes[slotNodeId] || [];
1683
+ while (slottedNode && ((slottedNode["getAttribute"] && slottedNode.getAttribute("slot") || slottedNode["s-sn"]) === slotName || slotName === "" && !slottedNode["s-sn"] && (slottedNode.nodeType === 8 /* CommentNode */ && slottedNode.nodeValue.indexOf(".") !== 1 || slottedNode.nodeType === 3 /* TextNode */))) {
1684
+ slottedNode["s-sn"] = slotName;
1685
+ slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
1686
+ slottedNode = slottedNode.nextSibling;
1687
+ }
1688
+ };
1689
+ var findCorrespondingNode = (node, type) => {
1690
+ let sibling = node;
1691
+ do {
1692
+ sibling = sibling.nextSibling;
1693
+ } while (sibling && (sibling.nodeType !== type || !sibling.nodeValue));
1694
+ return sibling;
1695
+ };
1696
+ var createSupportsRuleRe = (selector) => {
1697
+ const safeSelector2 = escapeRegExpSpecialCharacters(selector);
1698
+ return new RegExp(
1699
+ // First capture group: match any context before the selector that's not inside @supports selector()
1700
+ // Using negative lookahead to avoid matching inside @supports selector(...) condition
1701
+ `(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${safeSelector2}))(${safeSelector2}\\b)`,
1702
+ "g"
1703
+ );
1704
+ };
1705
+ createSupportsRuleRe("::slotted");
1706
+ createSupportsRuleRe(":host");
1707
+ createSupportsRuleRe(":host-context");
553
1708
 
554
1709
  // src/runtime/mode.ts
555
1710
  var computeMode = (elm) => modeResolutionChain.map((h2) => h2(elm)).find((m) => !!m);
556
1711
  var setMode = (handler) => modeResolutionChain.push(handler);
557
1712
  var getMode = (ref) => getHostRef(ref).$modeName$;
558
1713
  var parsePropertyValue = (propValue, propType) => {
1714
+ if (typeof propValue === "string" && (propValue.startsWith("{") && propValue.endsWith("}") || propValue.startsWith("[") && propValue.endsWith("]"))) {
1715
+ try {
1716
+ propValue = JSON.parse(propValue);
1717
+ return propValue;
1718
+ } catch (e) {
1719
+ }
1720
+ }
1721
+ if (typeof propValue === "string" && propValue.startsWith(SERIALIZED_PREFIX)) {
1722
+ propValue = deserializeProperty(propValue);
1723
+ return propValue;
1724
+ }
559
1725
  if (propValue != null && !isComplexType(propValue)) {
560
1726
  if (propType & 4 /* Boolean */) {
561
1727
  return propValue === "false" ? false : propValue === "" || !!propValue;
562
1728
  }
563
1729
  if (propType & 2 /* Number */) {
564
- return parseFloat(propValue);
1730
+ return typeof propValue === "string" ? parseFloat(propValue) : typeof propValue === "number" ? propValue : NaN;
565
1731
  }
566
1732
  if (propType & 1 /* String */) {
567
1733
  return String(propValue);
@@ -610,7 +1776,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
610
1776
  var _a;
611
1777
  const scopeId2 = getScopeId(cmpMeta, mode);
612
1778
  const style = styles.get(scopeId2);
613
- styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
1779
+ if (!win.document) {
1780
+ return scopeId2;
1781
+ }
1782
+ styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
614
1783
  if (style) {
615
1784
  if (typeof style === "string") {
616
1785
  styleContainerNode = styleContainerNode.head || styleContainerNode;
@@ -623,23 +1792,39 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
623
1792
  if (styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
624
1793
  styleElm.innerHTML = style;
625
1794
  } else {
626
- styleElm = doc.createElement("style");
1795
+ styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || win.document.createElement("style");
627
1796
  styleElm.innerHTML = style;
628
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
1797
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
629
1798
  if (nonce != null) {
630
1799
  styleElm.setAttribute("nonce", nonce);
631
1800
  }
632
- const injectStyle = (
633
- /**
634
- * we render a scoped component
635
- */
636
- !(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) || /**
637
- * we are using shadow dom and render the style tag within the shadowRoot
638
- */
639
- cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD"
640
- );
641
- if (injectStyle) {
642
- styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
1801
+ if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
1802
+ if (styleContainerNode.nodeName === "HEAD") {
1803
+ const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
1804
+ const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
1805
+ styleContainerNode.insertBefore(
1806
+ styleElm,
1807
+ (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
1808
+ );
1809
+ } else if ("host" in styleContainerNode) {
1810
+ if (supportsConstructableStylesheets) {
1811
+ const stylesheet = new CSSStyleSheet();
1812
+ stylesheet.replaceSync(style);
1813
+ styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
1814
+ } else {
1815
+ const existingStyleContainer = styleContainerNode.querySelector("style");
1816
+ if (existingStyleContainer) {
1817
+ existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
1818
+ } else {
1819
+ styleContainerNode.prepend(styleElm);
1820
+ }
1821
+ }
1822
+ } else {
1823
+ styleContainerNode.append(styleElm);
1824
+ }
1825
+ }
1826
+ if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
1827
+ styleContainerNode.insertBefore(styleElm, null);
643
1828
  }
644
1829
  }
645
1830
  if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
@@ -665,131 +1850,177 @@ var attachStyles = (hostRef) => {
665
1850
  cmpMeta,
666
1851
  hostRef.$modeName$
667
1852
  );
668
- if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
1853
+ if (flags & 10 /* needsScopedEncapsulation */) {
669
1854
  elm["s-sc"] = scopeId2;
670
1855
  elm.classList.add(scopeId2 + "-h");
671
- if (flags & 2 /* scopedCssEncapsulation */) {
672
- elm.classList.add(scopeId2 + "-s");
673
- }
674
1856
  }
675
1857
  endAttachStyles();
676
1858
  };
677
1859
  var getScopeId = (cmp, mode) => "sc-" + (mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
678
- var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
679
- if (oldValue !== newValue) {
680
- let isProp = isMemberInElement(elm, memberName);
681
- let ln = memberName.toLowerCase();
682
- if (memberName === "class") {
683
- const classList = elm.classList;
684
- const oldClasses = parseClassList(oldValue);
685
- const newClasses = parseClassList(newValue);
1860
+ var convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{");
1861
+ var hydrateScopedToShadow = () => {
1862
+ if (!win.document) {
1863
+ return;
1864
+ }
1865
+ const styles2 = win.document.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
1866
+ let i2 = 0;
1867
+ for (; i2 < styles2.length; i2++) {
1868
+ registerStyle(styles2[i2].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles2[i2].innerHTML), true);
1869
+ }
1870
+ };
1871
+ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
1872
+ if (oldValue === newValue) {
1873
+ return;
1874
+ }
1875
+ let isProp = isMemberInElement(elm, memberName);
1876
+ let ln = memberName.toLowerCase();
1877
+ if (memberName === "class") {
1878
+ const classList = elm.classList;
1879
+ const oldClasses = parseClassList(oldValue);
1880
+ let newClasses = parseClassList(newValue);
1881
+ if (elm["s-si"] && initialRender) {
1882
+ newClasses.push(elm["s-si"]);
1883
+ oldClasses.forEach((c) => {
1884
+ if (c.startsWith(elm["s-si"])) newClasses.push(c);
1885
+ });
1886
+ newClasses = [...new Set(newClasses)];
1887
+ classList.add(...newClasses);
1888
+ } else {
686
1889
  classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
687
1890
  classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
688
- } else if (memberName === "style") {
689
- {
690
- for (const prop in oldValue) {
691
- if (!newValue || newValue[prop] == null) {
692
- if (prop.includes("-")) {
693
- elm.style.removeProperty(prop);
694
- } else {
695
- elm.style[prop] = "";
696
- }
697
- }
698
- }
699
- }
700
- for (const prop in newValue) {
701
- if (!oldValue || newValue[prop] !== oldValue[prop]) {
1891
+ }
1892
+ } else if (memberName === "style") {
1893
+ {
1894
+ for (const prop in oldValue) {
1895
+ if (!newValue || newValue[prop] == null) {
702
1896
  if (prop.includes("-")) {
703
- elm.style.setProperty(prop, newValue[prop]);
1897
+ elm.style.removeProperty(prop);
704
1898
  } else {
705
- elm.style[prop] = newValue[prop];
1899
+ elm.style[prop] = "";
706
1900
  }
707
1901
  }
708
1902
  }
709
- } else if (memberName === "key") ; else if (memberName === "ref") {
710
- if (newValue) {
711
- newValue(elm);
712
- }
713
- } else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
714
- if (memberName[2] === "-") {
715
- memberName = memberName.slice(3);
716
- } else if (isMemberInElement(win, ln)) {
717
- memberName = ln.slice(2);
718
- } else {
719
- memberName = ln[2] + memberName.slice(3);
720
- }
721
- if (oldValue || newValue) {
722
- const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
723
- memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
724
- if (oldValue) {
725
- plt.rel(elm, memberName, oldValue, capture);
726
- }
727
- if (newValue) {
728
- plt.ael(elm, memberName, newValue, capture);
1903
+ }
1904
+ for (const prop in newValue) {
1905
+ if (!oldValue || newValue[prop] !== oldValue[prop]) {
1906
+ if (prop.includes("-")) {
1907
+ elm.style.setProperty(prop, newValue[prop]);
1908
+ } else {
1909
+ elm.style[prop] = newValue[prop];
729
1910
  }
730
1911
  }
1912
+ }
1913
+ } else if (memberName === "key") ; else if (memberName === "ref") {
1914
+ if (newValue) {
1915
+ newValue(elm);
1916
+ }
1917
+ } else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
1918
+ if (memberName[2] === "-") {
1919
+ memberName = memberName.slice(3);
1920
+ } else if (isMemberInElement(win, ln)) {
1921
+ memberName = ln.slice(2);
731
1922
  } else {
732
- const isComplex = isComplexType(newValue);
733
- if ((isProp || isComplex && newValue !== null) && !isSvg) {
734
- try {
735
- if (!elm.tagName.includes("-")) {
736
- const n = newValue == null ? "" : newValue;
737
- if (memberName === "list") {
738
- isProp = false;
739
- } else if (oldValue == null || elm[memberName] != n) {
1923
+ memberName = ln[2] + memberName.slice(3);
1924
+ }
1925
+ if (oldValue || newValue) {
1926
+ const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
1927
+ memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
1928
+ if (oldValue) {
1929
+ plt.rel(elm, memberName, oldValue, capture);
1930
+ }
1931
+ if (newValue) {
1932
+ plt.ael(elm, memberName, newValue, capture);
1933
+ }
1934
+ }
1935
+ } else {
1936
+ const isComplex = isComplexType(newValue);
1937
+ if ((isProp || isComplex && newValue !== null) && !isSvg) {
1938
+ try {
1939
+ if (!elm.tagName.includes("-")) {
1940
+ const n = newValue == null ? "" : newValue;
1941
+ if (memberName === "list") {
1942
+ isProp = false;
1943
+ } else if (oldValue == null || elm[memberName] != n) {
1944
+ if (typeof elm.__lookupSetter__(memberName) === "function") {
740
1945
  elm[memberName] = n;
1946
+ } else {
1947
+ elm.setAttribute(memberName, n);
741
1948
  }
742
- } else {
743
- elm[memberName] = newValue;
744
1949
  }
745
- } catch (e) {
1950
+ } else if (elm[memberName] !== newValue) {
1951
+ elm[memberName] = newValue;
746
1952
  }
1953
+ } catch (e) {
747
1954
  }
748
- let xlink = false;
749
- {
750
- if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
751
- memberName = ln;
752
- xlink = true;
753
- }
1955
+ }
1956
+ let xlink = false;
1957
+ {
1958
+ if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
1959
+ memberName = ln;
1960
+ xlink = true;
754
1961
  }
755
- if (newValue == null || newValue === false) {
756
- if (newValue !== false || elm.getAttribute(memberName) === "") {
757
- if (xlink) {
758
- elm.removeAttributeNS(XLINK_NS, memberName);
759
- } else {
760
- elm.removeAttribute(memberName);
761
- }
762
- }
763
- } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
764
- newValue = newValue === true ? "" : newValue;
1962
+ }
1963
+ if (newValue == null || newValue === false) {
1964
+ if (newValue !== false || elm.getAttribute(memberName) === "") {
765
1965
  if (xlink) {
766
- elm.setAttributeNS(XLINK_NS, memberName, newValue);
1966
+ elm.removeAttributeNS(XLINK_NS, memberName);
767
1967
  } else {
768
- elm.setAttribute(memberName, newValue);
1968
+ elm.removeAttribute(memberName);
769
1969
  }
770
1970
  }
1971
+ } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {
1972
+ newValue = newValue === true ? "" : newValue;
1973
+ if (xlink) {
1974
+ elm.setAttributeNS(XLINK_NS, memberName, newValue);
1975
+ } else {
1976
+ elm.setAttribute(memberName, newValue);
1977
+ }
771
1978
  }
772
1979
  }
773
1980
  };
774
1981
  var parseClassListRegex = /\s/;
775
- var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
1982
+ var parseClassList = (value) => {
1983
+ if (typeof value === "object" && value && "baseVal" in value) {
1984
+ value = value.baseVal;
1985
+ }
1986
+ if (!value || typeof value !== "string") {
1987
+ return [];
1988
+ }
1989
+ return value.split(parseClassListRegex);
1990
+ };
776
1991
  var CAPTURE_EVENT_SUFFIX = "Capture";
777
1992
  var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
778
1993
 
779
1994
  // src/runtime/vdom/update-element.ts
780
- var updateElement = (oldVnode, newVnode, isSvgMode2) => {
1995
+ var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
781
1996
  const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
782
- const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
783
- const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
1997
+ const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
1998
+ const newVnodeAttrs = newVnode.$attrs$ || {};
784
1999
  {
785
2000
  for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
786
2001
  if (!(memberName in newVnodeAttrs)) {
787
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
2002
+ setAccessor(
2003
+ elm,
2004
+ memberName,
2005
+ oldVnodeAttrs[memberName],
2006
+ void 0,
2007
+ isSvgMode2,
2008
+ newVnode.$flags$,
2009
+ isInitialRender
2010
+ );
788
2011
  }
789
2012
  }
790
2013
  }
791
2014
  for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
792
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
2015
+ setAccessor(
2016
+ elm,
2017
+ memberName,
2018
+ oldVnodeAttrs[memberName],
2019
+ newVnodeAttrs[memberName],
2020
+ isSvgMode2,
2021
+ newVnode.$flags$,
2022
+ isInitialRender
2023
+ );
793
2024
  }
794
2025
  };
795
2026
  function sortedAttrNames(attrNames) {
@@ -810,7 +2041,7 @@ var useNativeShadowDom = false;
810
2041
  var checkSlotFallbackVisibility = false;
811
2042
  var checkSlotRelocate = false;
812
2043
  var isSvgMode = false;
813
- var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
2044
+ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
814
2045
  var _a;
815
2046
  const newVNode2 = newParentVNode.$children$[childIndex];
816
2047
  let i2 = 0;
@@ -820,9 +2051,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
820
2051
  if (!useNativeShadowDom) {
821
2052
  checkSlotRelocate = true;
822
2053
  if (newVNode2.$tag$ === "slot") {
823
- if (scopeId) {
824
- parentElm.classList.add(scopeId + "-s");
825
- }
826
2054
  newVNode2.$flags$ |= newVNode2.$children$ ? (
827
2055
  // slot element has fallback content
828
2056
  // still create an element that "mocks" the slot element
@@ -836,14 +2064,22 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
836
2064
  }
837
2065
  }
838
2066
  if (newVNode2.$text$ !== null) {
839
- elm = newVNode2.$elm$ = doc.createTextNode(newVNode2.$text$);
2067
+ elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
840
2068
  } else if (newVNode2.$flags$ & 1 /* isSlotReference */) {
841
- elm = newVNode2.$elm$ = doc.createTextNode("");
2069
+ elm = newVNode2.$elm$ = win.document.createTextNode("");
2070
+ {
2071
+ updateElement(null, newVNode2, isSvgMode);
2072
+ }
842
2073
  } else {
843
2074
  if (!isSvgMode) {
844
2075
  isSvgMode = newVNode2.$tag$ === "svg";
845
2076
  }
846
- elm = newVNode2.$elm$ = doc.createElementNS(
2077
+ if (!win.document) {
2078
+ throw new Error(
2079
+ "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."
2080
+ );
2081
+ }
2082
+ elm = newVNode2.$elm$ = win.document.createElementNS(
847
2083
  isSvgMode ? SVG_NS : HTML_NS,
848
2084
  !useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
849
2085
  ) ;
@@ -853,17 +2089,12 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
853
2089
  {
854
2090
  updateElement(null, newVNode2, isSvgMode);
855
2091
  }
856
- const rootNode = elm.getRootNode();
857
- const isElementWithinShadowRoot = !rootNode.querySelector("body");
858
- if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
2092
+ if (isDef(scopeId) && elm["s-si"] !== scopeId) {
859
2093
  elm.classList.add(elm["s-si"] = scopeId);
860
2094
  }
861
- {
862
- updateElementScopeIds(elm, parentElm);
863
- }
864
2095
  if (newVNode2.$children$) {
865
2096
  for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
866
- childNode = createElm(oldParentVNode, newVNode2, i2, elm);
2097
+ childNode = createElm(oldParentVNode, newVNode2, i2);
867
2098
  if (childNode) {
868
2099
  elm.appendChild(childNode);
869
2100
  }
@@ -884,12 +2115,16 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
884
2115
  elm["s-cr"] = contentRef;
885
2116
  elm["s-sn"] = newVNode2.$name$ || "";
886
2117
  elm["s-rf"] = (_a = newVNode2.$attrs$) == null ? void 0 : _a.ref;
2118
+ patchSlotNode(elm);
887
2119
  oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
888
2120
  if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
889
2121
  {
890
2122
  relocateToHostRoot(oldParentVNode.$elm$);
891
2123
  }
892
2124
  }
2125
+ {
2126
+ addRemoveSlotScopedClass(contentRef, elm, newParentVNode.$elm$, oldParentVNode == null ? void 0 : oldParentVNode.$elm$);
2127
+ }
893
2128
  }
894
2129
  }
895
2130
  return elm;
@@ -898,8 +2133,12 @@ var relocateToHostRoot = (parentElm) => {
898
2133
  plt.$flags$ |= 1 /* isTmpDisconnected */;
899
2134
  const host = parentElm.closest(hostTagName.toLowerCase());
900
2135
  if (host != null) {
901
- const contentRefNode = Array.from(host.childNodes).find((ref) => ref["s-cr"]);
902
- const childNodeArray = Array.from(parentElm.childNodes);
2136
+ const contentRefNode = Array.from(host.__childNodes || host.childNodes).find(
2137
+ (ref) => ref["s-cr"]
2138
+ );
2139
+ const childNodeArray = Array.from(
2140
+ parentElm.__childNodes || parentElm.childNodes
2141
+ );
903
2142
  for (const childNode of contentRefNode ? childNodeArray.reverse() : childNodeArray) {
904
2143
  if (childNode["s-sh"] != null) {
905
2144
  insertBefore(host, childNode, contentRefNode != null ? contentRefNode : null);
@@ -908,11 +2147,11 @@ var relocateToHostRoot = (parentElm) => {
908
2147
  }
909
2148
  }
910
2149
  }
911
- plt.$flags$ &= ~1 /* isTmpDisconnected */;
2150
+ plt.$flags$ &= -2 /* isTmpDisconnected */;
912
2151
  };
913
2152
  var putBackInOriginalLocation = (parentElm, recursive) => {
914
2153
  plt.$flags$ |= 1 /* isTmpDisconnected */;
915
- const oldSlotChildNodes = Array.from(parentElm.childNodes);
2154
+ const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
916
2155
  if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
917
2156
  let node = parentElm;
918
2157
  while (node = node.nextSibling) {
@@ -924,7 +2163,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
924
2163
  for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
925
2164
  const childNode = oldSlotChildNodes[i2];
926
2165
  if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
927
- insertBefore(parentReferenceNode(childNode), childNode, referenceNode(childNode));
2166
+ insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
928
2167
  childNode["s-ol"].remove();
929
2168
  childNode["s-ol"] = void 0;
930
2169
  childNode["s-sh"] = void 0;
@@ -934,7 +2173,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
934
2173
  putBackInOriginalLocation(childNode, recursive);
935
2174
  }
936
2175
  }
937
- plt.$flags$ &= ~1 /* isTmpDisconnected */;
2176
+ plt.$flags$ &= -2 /* isTmpDisconnected */;
938
2177
  };
939
2178
  var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
940
2179
  let containerElm = parentElm["s-cr"] && parentElm["s-cr"].parentNode || parentElm;
@@ -944,7 +2183,7 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
944
2183
  }
945
2184
  for (; startIdx <= endIdx; ++startIdx) {
946
2185
  if (vnodes[startIdx]) {
947
- childNode = createElm(null, parentVNode, startIdx, parentElm);
2186
+ childNode = createElm(null, parentVNode, startIdx);
948
2187
  if (childNode) {
949
2188
  vnodes[startIdx].$elm$ = childNode;
950
2189
  insertBefore(containerElm, childNode, referenceNode(before) );
@@ -1031,7 +2270,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
1031
2270
  if (idxInOld >= 0) {
1032
2271
  elmToMove = oldCh[idxInOld];
1033
2272
  if (elmToMove.$tag$ !== newStartVnode.$tag$) {
1034
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld, parentElm);
2273
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
1035
2274
  } else {
1036
2275
  patch(elmToMove, newStartVnode, isInitialRender);
1037
2276
  oldCh[idxInOld] = void 0;
@@ -1039,12 +2278,16 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
1039
2278
  }
1040
2279
  newStartVnode = newCh[++newStartIdx];
1041
2280
  } else {
1042
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx, parentElm);
2281
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
1043
2282
  newStartVnode = newCh[++newStartIdx];
1044
2283
  }
1045
2284
  if (node) {
1046
2285
  {
1047
- insertBefore(parentReferenceNode(oldStartVnode.$elm$), node, referenceNode(oldStartVnode.$elm$));
2286
+ insertBefore(
2287
+ referenceNode(oldStartVnode.$elm$).parentNode,
2288
+ node,
2289
+ referenceNode(oldStartVnode.$elm$)
2290
+ );
1048
2291
  }
1049
2292
  }
1050
2293
  }
@@ -1065,28 +2308,19 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
1065
2308
  var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
1066
2309
  if (leftVNode.$tag$ === rightVNode.$tag$) {
1067
2310
  if (leftVNode.$tag$ === "slot") {
1068
- if (
1069
- // The component gets hydrated and no VDOM has been initialized.
1070
- // Here the comparison can't happen as $name$ property is not set for `leftNode`.
1071
- "$nodeId$" in leftVNode && isInitialRender && // `leftNode` is not from type HTMLComment which would cause many
1072
- // hydration comments to be removed
1073
- leftVNode.$elm$.nodeType !== 8
1074
- ) {
1075
- return false;
1076
- }
1077
2311
  return leftVNode.$name$ === rightVNode.$name$;
1078
2312
  }
1079
2313
  if (!isInitialRender) {
1080
2314
  return leftVNode.$key$ === rightVNode.$key$;
1081
2315
  }
2316
+ if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
2317
+ leftVNode.$key$ = rightVNode.$key$;
2318
+ }
1082
2319
  return true;
1083
2320
  }
1084
2321
  return false;
1085
2322
  };
1086
- var referenceNode = (node) => {
1087
- return node && node["s-ol"] || node;
1088
- };
1089
- var parentReferenceNode = (node) => (node["s-ol"] ? node["s-ol"] : node).parentNode;
2323
+ var referenceNode = (node) => node && node["s-ol"] || node;
1090
2324
  var patch = (oldVNode, newVNode2, isInitialRender = false) => {
1091
2325
  const elm = newVNode2.$elm$ = oldVNode.$elm$;
1092
2326
  const oldChildren = oldVNode.$children$;
@@ -1104,9 +2338,8 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
1104
2338
  newVNode2.$elm$["s-sn"] = newVNode2.$name$ || "";
1105
2339
  relocateToHostRoot(newVNode2.$elm$.parentElement);
1106
2340
  }
1107
- } else {
1108
- updateElement(oldVNode, newVNode2, isSvgMode);
1109
2341
  }
2342
+ updateElement(oldVNode, newVNode2, isSvgMode, isInitialRender);
1110
2343
  }
1111
2344
  if (oldChildren !== null && newChildren !== null) {
1112
2345
  updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
@@ -1130,41 +2363,15 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
1130
2363
  elm.data = text;
1131
2364
  }
1132
2365
  };
1133
- var updateFallbackSlotVisibility = (elm) => {
1134
- const childNodes = elm.childNodes;
1135
- for (const childNode of childNodes) {
1136
- if (childNode.nodeType === 1 /* ElementNode */) {
1137
- if (childNode["s-sr"]) {
1138
- const slotName = childNode["s-sn"];
1139
- childNode.hidden = false;
1140
- for (const siblingNode of childNodes) {
1141
- if (siblingNode !== childNode) {
1142
- if (siblingNode["s-hn"] !== childNode["s-hn"] || slotName !== "") {
1143
- if (siblingNode.nodeType === 1 /* ElementNode */ && (slotName === siblingNode.getAttribute("slot") || slotName === siblingNode["s-sn"]) || siblingNode.nodeType === 3 /* TextNode */ && slotName === siblingNode["s-sn"]) {
1144
- childNode.hidden = true;
1145
- break;
1146
- }
1147
- } else {
1148
- if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
1149
- childNode.hidden = true;
1150
- break;
1151
- }
1152
- }
1153
- }
1154
- }
1155
- }
1156
- updateFallbackSlotVisibility(childNode);
1157
- }
1158
- }
1159
- };
1160
2366
  var relocateNodes = [];
1161
2367
  var markSlotContentForRelocation = (elm) => {
1162
2368
  let node;
1163
2369
  let hostContentNodes;
1164
2370
  let j;
1165
- for (const childNode of elm.childNodes) {
2371
+ const children = elm.__childNodes || elm.childNodes;
2372
+ for (const childNode of children) {
1166
2373
  if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
1167
- hostContentNodes = node.parentNode.childNodes;
2374
+ hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
1168
2375
  const slotName = childNode["s-sn"];
1169
2376
  for (j = hostContentNodes.length - 1; j >= 0; j--) {
1170
2377
  node = hostContentNodes[j];
@@ -1206,21 +2413,6 @@ var markSlotContentForRelocation = (elm) => {
1206
2413
  }
1207
2414
  }
1208
2415
  };
1209
- var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
1210
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1211
- if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
1212
- return true;
1213
- }
1214
- if (nodeToRelocate.getAttribute("slot") === slotName) {
1215
- return true;
1216
- }
1217
- return false;
1218
- }
1219
- if (nodeToRelocate["s-sn"] === slotName) {
1220
- return true;
1221
- }
1222
- return slotName === "";
1223
- };
1224
2416
  var nullifyVNodeRefs = (vNode) => {
1225
2417
  {
1226
2418
  vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
@@ -1228,44 +2420,51 @@ var nullifyVNodeRefs = (vNode) => {
1228
2420
  }
1229
2421
  };
1230
2422
  var insertBefore = (parent, newNode, reference) => {
1231
- const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
1232
- {
1233
- updateElementScopeIds(newNode, parent);
1234
- }
1235
- return inserted;
1236
- };
1237
- var findScopeIds = (element) => {
1238
- const scopeIds = [];
1239
- if (element) {
1240
- scopeIds.push(
1241
- ...element["s-scs"] || [],
1242
- element["s-si"],
1243
- element["s-sc"],
1244
- ...findScopeIds(element.parentElement)
1245
- );
2423
+ if (typeof newNode["s-sn"] === "string" && !!newNode["s-sr"] && !!newNode["s-cr"]) {
2424
+ addRemoveSlotScopedClass(newNode["s-cr"], newNode, parent, newNode.parentElement);
2425
+ } else if (typeof newNode["s-sn"] === "string") {
2426
+ if (parent.getRootNode().nodeType !== 11 /* DOCUMENT_FRAGMENT_NODE */) {
2427
+ patchParentNode(newNode);
2428
+ }
2429
+ parent.insertBefore(newNode, reference);
2430
+ const { slotNode } = findSlotFromSlottedNode(newNode);
2431
+ if (slotNode) dispatchSlotChangeEvent(slotNode);
2432
+ return newNode;
2433
+ }
2434
+ if (parent.__insertBefore) {
2435
+ return parent.__insertBefore(newNode, reference);
2436
+ } else {
2437
+ return parent == null ? void 0 : parent.insertBefore(newNode, reference);
1246
2438
  }
1247
- return scopeIds;
1248
2439
  };
1249
- var updateElementScopeIds = (element, parent, iterateChildNodes = false) => {
1250
- var _a;
1251
- if (element && parent && element.nodeType === 1 /* ElementNode */) {
1252
- const scopeIds = new Set(findScopeIds(parent).filter(Boolean));
1253
- if (scopeIds.size) {
1254
- (_a = element.classList) == null ? void 0 : _a.add(...element["s-scs"] = [...scopeIds]);
1255
- if (element["s-ol"] || iterateChildNodes) {
1256
- for (const childNode of Array.from(element.childNodes)) {
1257
- updateElementScopeIds(childNode, element, true);
2440
+ function addRemoveSlotScopedClass(reference, slotNode, newParent, oldParent) {
2441
+ var _a, _b;
2442
+ let scopeId2;
2443
+ if (reference && typeof slotNode["s-sn"] === "string" && !!slotNode["s-sr"] && reference.parentNode && reference.parentNode["s-sc"] && (scopeId2 = slotNode["s-si"] || reference.parentNode["s-sc"])) {
2444
+ const scopeName = slotNode["s-sn"];
2445
+ const hostName = slotNode["s-hn"];
2446
+ (_a = newParent.classList) == null ? void 0 : _a.add(scopeId2 + "-s");
2447
+ if (oldParent && ((_b = oldParent.classList) == null ? void 0 : _b.contains(scopeId2 + "-s"))) {
2448
+ let child = (oldParent.__childNodes || oldParent.childNodes)[0];
2449
+ let found = false;
2450
+ while (child) {
2451
+ if (child["s-sn"] !== scopeName && child["s-hn"] === hostName && !!child["s-sr"]) {
2452
+ found = true;
2453
+ break;
1258
2454
  }
2455
+ child = child.nextSibling;
1259
2456
  }
2457
+ if (!found) oldParent.classList.remove(scopeId2 + "-s");
1260
2458
  }
1261
2459
  }
1262
- };
2460
+ }
1263
2461
  var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1264
2462
  var _a, _b, _c, _d, _e;
1265
2463
  const hostElm = hostRef.$hostElement$;
1266
2464
  const cmpMeta = hostRef.$cmpMeta$;
1267
2465
  const oldVNode = hostRef.$vnode$ || newVNode(null, null);
1268
- const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
2466
+ const isHostElement = isHost(renderFnResults);
2467
+ const rootVnode = isHostElement ? renderFnResults : h(null, null, renderFnResults);
1269
2468
  hostTagName = hostElm.tagName;
1270
2469
  if (cmpMeta.$attrsToReflect$) {
1271
2470
  rootVnode.$attrs$ = rootVnode.$attrs$ || {};
@@ -1287,7 +2486,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1287
2486
  {
1288
2487
  scopeId = hostElm["s-sc"];
1289
2488
  }
1290
- useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
2489
+ useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
1291
2490
  {
1292
2491
  contentRef = hostElm["s-cr"];
1293
2492
  checkSlotFallbackVisibility = false;
@@ -1299,8 +2498,8 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1299
2498
  markSlotContentForRelocation(rootVnode.$elm$);
1300
2499
  for (const relocateData of relocateNodes) {
1301
2500
  const nodeToRelocate = relocateData.$nodeToRelocate$;
1302
- if (!nodeToRelocate["s-ol"]) {
1303
- const orgLocationNode = doc.createTextNode("");
2501
+ if (!nodeToRelocate["s-ol"] && win.document) {
2502
+ const orgLocationNode = win.document.createTextNode("");
1304
2503
  orgLocationNode["s-nr"] = nodeToRelocate;
1305
2504
  insertBefore(nodeToRelocate.parentNode, nodeToRelocate["s-ol"] = orgLocationNode, nodeToRelocate);
1306
2505
  }
@@ -1311,11 +2510,11 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1311
2510
  if (slotRefNode) {
1312
2511
  const parentNodeRef = slotRefNode.parentNode;
1313
2512
  let insertBeforeNode = slotRefNode.nextSibling;
1314
- if (insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */) {
2513
+ if ((insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */)) {
1315
2514
  let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
1316
2515
  while (orgLocationNode) {
1317
2516
  let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
1318
- if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === refNode.parentNode) {
2517
+ if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === (refNode.__parentNode || refNode.parentNode)) {
1319
2518
  refNode = refNode.nextSibling;
1320
2519
  while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
1321
2520
  refNode = refNode == null ? void 0 : refNode.nextSibling;
@@ -1328,15 +2527,17 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1328
2527
  orgLocationNode = orgLocationNode.previousSibling;
1329
2528
  }
1330
2529
  }
1331
- if (!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode || nodeToRelocate.nextSibling !== insertBeforeNode) {
2530
+ const parent = nodeToRelocate.__parentNode || nodeToRelocate.parentNode;
2531
+ const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
2532
+ if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
1332
2533
  if (nodeToRelocate !== insertBeforeNode) {
1333
2534
  insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
1334
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
2535
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
1335
2536
  nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
1336
2537
  }
1337
2538
  }
1338
2539
  }
1339
- nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](nodeToRelocate);
2540
+ nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](slotRefNode);
1340
2541
  } else {
1341
2542
  if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1342
2543
  if (isInitialLoad) {
@@ -1350,11 +2551,12 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1350
2551
  if (checkSlotFallbackVisibility) {
1351
2552
  updateFallbackSlotVisibility(rootVnode.$elm$);
1352
2553
  }
1353
- plt.$flags$ &= ~1 /* isTmpDisconnected */;
2554
+ plt.$flags$ &= -2 /* isTmpDisconnected */;
1354
2555
  relocateNodes.length = 0;
1355
2556
  }
1356
2557
  if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
1357
- for (const childNode of rootVnode.$elm$.childNodes) {
2558
+ const children = rootVnode.$elm$.__childNodes || rootVnode.$elm$.childNodes;
2559
+ for (const childNode of children) {
1358
2560
  if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
1359
2561
  if (isInitialLoad && childNode["s-ih"] == null) {
1360
2562
  childNode["s-ih"] = (_e = childNode.hidden) != null ? _e : false;
@@ -1369,7 +2571,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1369
2571
  // src/runtime/update-component.ts
1370
2572
  var attachToAncestor = (hostRef, ancestorComponent) => {
1371
2573
  if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
1372
- ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
2574
+ const index = ancestorComponent["s-p"].push(
2575
+ new Promise(
2576
+ (r) => hostRef.$onRenderResolve$ = () => {
2577
+ ancestorComponent["s-p"].splice(index - 1, 1);
2578
+ r();
2579
+ }
2580
+ )
2581
+ );
1373
2582
  }
1374
2583
  };
1375
2584
  var scheduleUpdate = (hostRef, isInitialLoad) => {
@@ -1398,17 +2607,15 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
1398
2607
  {
1399
2608
  hostRef.$flags$ |= 256 /* isListenReady */;
1400
2609
  if (hostRef.$queuedListeners$) {
1401
- hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
2610
+ hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
1402
2611
  hostRef.$queuedListeners$ = void 0;
1403
2612
  }
1404
2613
  }
1405
- {
1406
- maybePromise = safeCall(instance, "componentWillLoad");
1407
- }
1408
- }
1409
- {
1410
- maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender"));
2614
+ maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
2615
+ } else {
2616
+ maybePromise = safeCall(instance, "componentWillUpdate", void 0, elm);
1411
2617
  }
2618
+ maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
1412
2619
  endSchedule();
1413
2620
  return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
1414
2621
  };
@@ -1451,7 +2658,7 @@ var callRender = (hostRef, instance, elm, isInitialLoad) => {
1451
2658
  try {
1452
2659
  instance = instance.render && instance.render();
1453
2660
  {
1454
- hostRef.$flags$ &= ~16 /* isQueuedForUpdate */;
2661
+ hostRef.$flags$ &= -17 /* isQueuedForUpdate */;
1455
2662
  }
1456
2663
  {
1457
2664
  hostRef.$flags$ |= 2 /* hasRendered */;
@@ -1474,17 +2681,13 @@ var postUpdateComponent = (hostRef) => {
1474
2681
  const endPostUpdate = createTime("postUpdate", tagName);
1475
2682
  const instance = hostRef.$lazyInstance$ ;
1476
2683
  const ancestorComponent = hostRef.$ancestorComponent$;
1477
- {
1478
- safeCall(instance, "componentDidRender");
1479
- }
2684
+ safeCall(instance, "componentDidRender", void 0, elm);
1480
2685
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
1481
2686
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
1482
2687
  {
1483
2688
  addHydratedFlag(elm);
1484
2689
  }
1485
- {
1486
- safeCall(instance, "componentDidLoad");
1487
- }
2690
+ safeCall(instance, "componentDidLoad", void 0, elm);
1488
2691
  endPostUpdate();
1489
2692
  {
1490
2693
  hostRef.$onReadyResolve$(elm);
@@ -1493,9 +2696,7 @@ var postUpdateComponent = (hostRef) => {
1493
2696
  }
1494
2697
  }
1495
2698
  } else {
1496
- {
1497
- safeCall(instance, "componentDidUpdate");
1498
- }
2699
+ safeCall(instance, "componentDidUpdate", void 0, elm);
1499
2700
  endPostUpdate();
1500
2701
  }
1501
2702
  {
@@ -1509,7 +2710,7 @@ var postUpdateComponent = (hostRef) => {
1509
2710
  if (hostRef.$flags$ & 512 /* needsRerender */) {
1510
2711
  nextTick(() => scheduleUpdate(hostRef, false));
1511
2712
  }
1512
- hostRef.$flags$ &= ~(4 /* isWaitingForChildren */ | 512 /* needsRerender */);
2713
+ hostRef.$flags$ &= -517;
1513
2714
  }
1514
2715
  };
1515
2716
  var forceUpdate = (ref) => {
@@ -1523,17 +2724,14 @@ var forceUpdate = (ref) => {
1523
2724
  }
1524
2725
  };
1525
2726
  var appDidLoad = (who) => {
1526
- {
1527
- addHydratedFlag(doc.documentElement);
1528
- }
1529
2727
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
1530
2728
  };
1531
- var safeCall = (instance, method, arg) => {
2729
+ var safeCall = (instance, method, arg, elm) => {
1532
2730
  if (instance && instance[method]) {
1533
2731
  try {
1534
2732
  return instance[method](arg);
1535
2733
  } catch (e) {
1536
- consoleError(e);
2734
+ consoleError(e, elm);
1537
2735
  }
1538
2736
  }
1539
2737
  return void 0;
@@ -1549,7 +2747,7 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
1549
2747
  const hostRef = getHostRef(ref);
1550
2748
  if (!hostRef) {
1551
2749
  throw new Error(
1552
- `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).`
2750
+ `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).`
1553
2751
  );
1554
2752
  }
1555
2753
  const elm = hostRef.$hostElement$ ;
@@ -1575,6 +2773,11 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
1575
2773
  }
1576
2774
  }
1577
2775
  if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
2776
+ if (instance.componentShouldUpdate) {
2777
+ if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
2778
+ return;
2779
+ }
2780
+ }
1578
2781
  scheduleUpdate(hostRef, false);
1579
2782
  }
1580
2783
  }
@@ -1592,15 +2795,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1592
2795
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
1593
2796
  members.map(([memberName, [memberFlags]]) => {
1594
2797
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
2798
+ const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
2799
+ if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
2800
+ if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
2801
+ if (flags & 1 /* isElementConstructor */ || !origGetter) {
2802
+ Object.defineProperty(prototype, memberName, {
2803
+ get() {
2804
+ {
2805
+ if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
2806
+ return getValue(this, memberName);
2807
+ }
2808
+ const ref = getHostRef(this);
2809
+ const instance = ref ? ref.$lazyInstance$ : prototype;
2810
+ if (!instance) return;
2811
+ return instance[memberName];
2812
+ }
2813
+ },
2814
+ configurable: true,
2815
+ enumerable: true
2816
+ });
2817
+ }
1595
2818
  Object.defineProperty(prototype, memberName, {
1596
- get() {
1597
- return getValue(this, memberName);
1598
- },
1599
2819
  set(newValue) {
1600
- setValue(this, memberName, newValue, cmpMeta);
1601
- },
1602
- configurable: true,
1603
- enumerable: true
2820
+ const ref = getHostRef(this);
2821
+ if (origSetter) {
2822
+ const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
2823
+ if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
2824
+ newValue = ref.$instanceValues$.get(memberName);
2825
+ } else if (!ref.$instanceValues$.get(memberName) && currentValue) {
2826
+ ref.$instanceValues$.set(memberName, currentValue);
2827
+ }
2828
+ origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
2829
+ newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
2830
+ setValue(this, memberName, newValue, cmpMeta);
2831
+ return;
2832
+ }
2833
+ {
2834
+ if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
2835
+ setValue(this, memberName, newValue, cmpMeta);
2836
+ if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
2837
+ ref.$onReadyPromise$.then(() => {
2838
+ if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
2839
+ ref.$lazyInstance$[memberName] = newValue;
2840
+ }
2841
+ });
2842
+ }
2843
+ return;
2844
+ }
2845
+ const setterSetVal = () => {
2846
+ const currentValue = ref.$lazyInstance$[memberName];
2847
+ if (!ref.$instanceValues$.get(memberName) && currentValue) {
2848
+ ref.$instanceValues$.set(memberName, currentValue);
2849
+ }
2850
+ ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
2851
+ setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
2852
+ };
2853
+ if (ref.$lazyInstance$) {
2854
+ setterSetVal();
2855
+ } else {
2856
+ ref.$onReadyPromise$.then(() => setterSetVal());
2857
+ }
2858
+ }
2859
+ }
1604
2860
  });
1605
2861
  } else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
1606
2862
  Object.defineProperty(prototype, memberName, {
@@ -1621,7 +2877,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1621
2877
  plt.jmp(() => {
1622
2878
  var _a2;
1623
2879
  const propName = attrNameToPropName.get(attrName);
1624
- if (this.hasOwnProperty(propName)) {
2880
+ if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
1625
2881
  newValue = this[propName];
1626
2882
  delete this[propName];
1627
2883
  } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
@@ -1641,7 +2897,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1641
2897
  }
1642
2898
  return;
1643
2899
  }
1644
- this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
2900
+ const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
2901
+ newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
2902
+ if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
2903
+ this[propName] = newValue;
2904
+ }
1645
2905
  });
1646
2906
  };
1647
2907
  Cstr.observedAttributes = Array.from(
@@ -1670,7 +2930,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1670
2930
  hostRef.$flags$ |= 32 /* hasInitializedComponent */;
1671
2931
  const bundleId = cmpMeta.$lazyBundleId$;
1672
2932
  if (bundleId) {
1673
- const CstrImport = loadModule(cmpMeta);
2933
+ const CstrImport = loadModule(cmpMeta, hostRef);
1674
2934
  if (CstrImport && "then" in CstrImport) {
1675
2935
  const endLoad = uniqueTime();
1676
2936
  Cstr = await CstrImport;
@@ -1695,16 +2955,16 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1695
2955
  try {
1696
2956
  new Cstr(hostRef);
1697
2957
  } catch (e) {
1698
- consoleError(e);
2958
+ consoleError(e, elm);
1699
2959
  }
1700
2960
  {
1701
- hostRef.$flags$ &= ~8 /* isConstructingInstance */;
2961
+ hostRef.$flags$ &= -9 /* isConstructingInstance */;
1702
2962
  }
1703
2963
  {
1704
2964
  hostRef.$flags$ |= 128 /* isWatchReady */;
1705
2965
  }
1706
2966
  endNewInstance();
1707
- fireConnectedCallback(hostRef.$lazyInstance$);
2967
+ fireConnectedCallback(hostRef.$lazyInstance$, elm);
1708
2968
  } else {
1709
2969
  Cstr = elm.constructor;
1710
2970
  const cmpTag = elm.localName;
@@ -1736,9 +2996,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1736
2996
  schedule();
1737
2997
  }
1738
2998
  };
1739
- var fireConnectedCallback = (instance) => {
2999
+ var fireConnectedCallback = (instance, elm) => {
1740
3000
  {
1741
- safeCall(instance, "connectedCallback");
3001
+ safeCall(instance, "connectedCallback", void 0, elm);
1742
3002
  }
1743
3003
  };
1744
3004
 
@@ -1757,6 +3017,9 @@ var connectedCallback = (elm) => {
1757
3017
  if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
1758
3018
  const scopeId2 = addStyle(elm.shadowRoot, cmpMeta, elm.getAttribute("s-mode")) ;
1759
3019
  elm.classList.remove(scopeId2 + "-h", scopeId2 + "-s");
3020
+ } else if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
3021
+ const scopeId2 = getScopeId(cmpMeta, elm.getAttribute("s-mode") );
3022
+ elm["s-sc"] = scopeId2;
1760
3023
  }
1761
3024
  initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
1762
3025
  }
@@ -1791,24 +3054,27 @@ var connectedCallback = (elm) => {
1791
3054
  } else {
1792
3055
  addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1793
3056
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1794
- fireConnectedCallback(hostRef.$lazyInstance$);
3057
+ fireConnectedCallback(hostRef.$lazyInstance$, elm);
1795
3058
  } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1796
- hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$));
3059
+ hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
1797
3060
  }
1798
3061
  }
1799
3062
  endConnected();
1800
3063
  }
1801
3064
  };
1802
3065
  var setContentReference = (elm) => {
1803
- const contentRefElm = elm["s-cr"] = doc.createComment(
3066
+ if (!win.document) {
3067
+ return;
3068
+ }
3069
+ const contentRefElm = elm["s-cr"] = win.document.createComment(
1804
3070
  ""
1805
3071
  );
1806
3072
  contentRefElm["s-cn"] = true;
1807
3073
  insertBefore(elm, contentRefElm, elm.firstChild);
1808
3074
  };
1809
- var disconnectInstance = (instance) => {
3075
+ var disconnectInstance = (instance, elm) => {
1810
3076
  {
1811
- safeCall(instance, "disconnectedCallback");
3077
+ safeCall(instance, "disconnectedCallback", void 0, elm || instance);
1812
3078
  }
1813
3079
  };
1814
3080
  var disconnectedCallback = async (elm) => {
@@ -1821,312 +3087,44 @@ var disconnectedCallback = async (elm) => {
1821
3087
  }
1822
3088
  }
1823
3089
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1824
- disconnectInstance(hostRef.$lazyInstance$);
3090
+ disconnectInstance(hostRef.$lazyInstance$, elm);
1825
3091
  } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1826
- hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
1827
- }
1828
- }
1829
- };
1830
- var patchPseudoShadowDom = (hostElementPrototype, descriptorPrototype) => {
1831
- patchCloneNode(hostElementPrototype);
1832
- patchSlotAppendChild(hostElementPrototype);
1833
- patchSlotAppend(hostElementPrototype);
1834
- patchSlotPrepend(hostElementPrototype);
1835
- patchSlotInsertAdjacentElement(hostElementPrototype);
1836
- patchSlotInsertAdjacentHTML(hostElementPrototype);
1837
- patchSlotInsertAdjacentText(hostElementPrototype);
1838
- patchTextContent(hostElementPrototype);
1839
- patchChildSlotNodes(hostElementPrototype, descriptorPrototype);
1840
- patchSlotRemoveChild(hostElementPrototype);
1841
- };
1842
- var patchCloneNode = (HostElementPrototype) => {
1843
- const orgCloneNode = HostElementPrototype.cloneNode;
1844
- HostElementPrototype.cloneNode = function(deep) {
1845
- const srcNode = this;
1846
- const isShadowDom = srcNode.shadowRoot && supportsShadow ;
1847
- const clonedNode = orgCloneNode.call(srcNode, isShadowDom ? deep : false);
1848
- if (!isShadowDom && deep) {
1849
- let i2 = 0;
1850
- let slotted, nonStencilNode;
1851
- const stencilPrivates = [
1852
- "s-id",
1853
- "s-cr",
1854
- "s-lr",
1855
- "s-rc",
1856
- "s-sc",
1857
- "s-p",
1858
- "s-cn",
1859
- "s-sr",
1860
- "s-sn",
1861
- "s-hn",
1862
- "s-ol",
1863
- "s-nr",
1864
- "s-si",
1865
- "s-rf",
1866
- "s-scs"
1867
- ];
1868
- for (; i2 < srcNode.childNodes.length; i2++) {
1869
- slotted = srcNode.childNodes[i2]["s-nr"];
1870
- nonStencilNode = stencilPrivates.every((privateField) => !srcNode.childNodes[i2][privateField]);
1871
- if (slotted) {
1872
- if (clonedNode.__appendChild) {
1873
- clonedNode.__appendChild(slotted.cloneNode(true));
1874
- } else {
1875
- clonedNode.appendChild(slotted.cloneNode(true));
1876
- }
1877
- }
1878
- if (nonStencilNode) {
1879
- clonedNode.appendChild(srcNode.childNodes[i2].cloneNode(true));
1880
- }
1881
- }
1882
- }
1883
- return clonedNode;
1884
- };
1885
- };
1886
- var patchSlotAppendChild = (HostElementPrototype) => {
1887
- HostElementPrototype.__appendChild = HostElementPrototype.appendChild;
1888
- HostElementPrototype.appendChild = function(newChild) {
1889
- const slotName = newChild["s-sn"] = getSlotName(newChild);
1890
- const slotNode = getHostSlotNode(this.childNodes, slotName, this.tagName);
1891
- if (slotNode) {
1892
- const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
1893
- const appendAfter = slotChildNodes[slotChildNodes.length - 1];
1894
- const insertedNode = insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
1895
- updateFallbackSlotVisibility(this);
1896
- return insertedNode;
1897
- }
1898
- return this.__appendChild(newChild);
1899
- };
1900
- };
1901
- var patchSlotRemoveChild = (ElementPrototype) => {
1902
- ElementPrototype.__removeChild = ElementPrototype.removeChild;
1903
- ElementPrototype.removeChild = function(toRemove) {
1904
- if (toRemove && typeof toRemove["s-sn"] !== "undefined") {
1905
- const slotNode = getHostSlotNode(this.childNodes, toRemove["s-sn"], this.tagName);
1906
- if (slotNode) {
1907
- const slotChildNodes = getHostSlotChildNodes(slotNode, toRemove["s-sn"]);
1908
- const existingNode = slotChildNodes.find((n) => n === toRemove);
1909
- if (existingNode) {
1910
- existingNode.remove();
1911
- updateFallbackSlotVisibility(this);
1912
- return;
1913
- }
1914
- }
1915
- }
1916
- return this.__removeChild(toRemove);
1917
- };
1918
- };
1919
- var patchSlotPrepend = (HostElementPrototype) => {
1920
- const originalPrepend = HostElementPrototype.prepend;
1921
- HostElementPrototype.prepend = function(...newChildren) {
1922
- newChildren.forEach((newChild) => {
1923
- if (typeof newChild === "string") {
1924
- newChild = this.ownerDocument.createTextNode(newChild);
1925
- }
1926
- const slotName = newChild["s-sn"] = getSlotName(newChild);
1927
- const slotNode = getHostSlotNode(this.childNodes, slotName, this.tagName);
1928
- if (slotNode) {
1929
- const slotPlaceholder = document.createTextNode("");
1930
- slotPlaceholder["s-nr"] = newChild;
1931
- slotNode["s-cr"].parentNode.__appendChild(slotPlaceholder);
1932
- newChild["s-ol"] = slotPlaceholder;
1933
- const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
1934
- const appendAfter = slotChildNodes[0];
1935
- return insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
1936
- }
1937
- if (newChild.nodeType === 1 && !!newChild.getAttribute("slot")) {
1938
- newChild.hidden = true;
1939
- }
1940
- return originalPrepend.call(this, newChild);
1941
- });
1942
- };
1943
- };
1944
- var patchSlotAppend = (HostElementPrototype) => {
1945
- HostElementPrototype.append = function(...newChildren) {
1946
- newChildren.forEach((newChild) => {
1947
- if (typeof newChild === "string") {
1948
- newChild = this.ownerDocument.createTextNode(newChild);
1949
- }
1950
- this.appendChild(newChild);
1951
- });
1952
- };
1953
- };
1954
- var patchSlotInsertAdjacentHTML = (HostElementPrototype) => {
1955
- const originalInsertAdjacentHtml = HostElementPrototype.insertAdjacentHTML;
1956
- HostElementPrototype.insertAdjacentHTML = function(position, text) {
1957
- if (position !== "afterbegin" && position !== "beforeend") {
1958
- return originalInsertAdjacentHtml.call(this, position, text);
1959
- }
1960
- const container = this.ownerDocument.createElement("_");
1961
- let node;
1962
- container.innerHTML = text;
1963
- if (position === "afterbegin") {
1964
- while (node = container.firstChild) {
1965
- this.prepend(node);
1966
- }
1967
- } else if (position === "beforeend") {
1968
- while (node = container.firstChild) {
1969
- this.append(node);
1970
- }
1971
- }
1972
- };
1973
- };
1974
- var patchSlotInsertAdjacentText = (HostElementPrototype) => {
1975
- HostElementPrototype.insertAdjacentText = function(position, text) {
1976
- this.insertAdjacentHTML(position, text);
1977
- };
1978
- };
1979
- var patchSlotInsertAdjacentElement = (HostElementPrototype) => {
1980
- const originalInsertAdjacentElement = HostElementPrototype.insertAdjacentElement;
1981
- HostElementPrototype.insertAdjacentElement = function(position, element) {
1982
- if (position !== "afterbegin" && position !== "beforeend") {
1983
- return originalInsertAdjacentElement.call(this, position, element);
1984
- }
1985
- if (position === "afterbegin") {
1986
- this.prepend(element);
1987
- return element;
1988
- } else if (position === "beforeend") {
1989
- this.append(element);
1990
- return element;
1991
- }
1992
- return element;
1993
- };
1994
- };
1995
- var patchTextContent = (hostElementPrototype) => {
1996
- const descriptor = Object.getOwnPropertyDescriptor(Node.prototype, "textContent");
1997
- Object.defineProperty(hostElementPrototype, "__textContent", descriptor);
1998
- {
1999
- Object.defineProperty(hostElementPrototype, "textContent", {
2000
- // To mimic shadow root behavior, we need to return the text content of all
2001
- // nodes in a slot reference node
2002
- get() {
2003
- const slotRefNodes = getAllChildSlotNodes(this.childNodes);
2004
- const textContent = slotRefNodes.map((node) => {
2005
- var _a, _b;
2006
- const text = [];
2007
- let slotContent = node.nextSibling;
2008
- while (slotContent && slotContent["s-sn"] === node["s-sn"]) {
2009
- if (slotContent.nodeType === 3 /* TEXT_NODE */ || slotContent.nodeType === 1 /* ELEMENT_NODE */) {
2010
- text.push((_b = (_a = slotContent.textContent) == null ? void 0 : _a.trim()) != null ? _b : "");
2011
- }
2012
- slotContent = slotContent.nextSibling;
2013
- }
2014
- return text.filter((ref) => ref !== "").join(" ");
2015
- }).filter((text) => text !== "").join(" ");
2016
- return " " + textContent + " ";
2017
- },
2018
- // To mimic shadow root behavior, we need to overwrite all nodes in a slot
2019
- // reference node. If a default slot reference node exists, the text content will be
2020
- // placed there. Otherwise, the new text node will be hidden
2021
- set(value) {
2022
- const slotRefNodes = getAllChildSlotNodes(this.childNodes);
2023
- slotRefNodes.forEach((node) => {
2024
- let slotContent = node.nextSibling;
2025
- while (slotContent && slotContent["s-sn"] === node["s-sn"]) {
2026
- const tmp = slotContent;
2027
- slotContent = slotContent.nextSibling;
2028
- tmp.remove();
2029
- }
2030
- if (node["s-sn"] === "") {
2031
- const textNode = this.ownerDocument.createTextNode(value);
2032
- textNode["s-sn"] = "";
2033
- insertBefore(node.parentElement, textNode, node.nextSibling);
2034
- } else {
2035
- node.remove();
2036
- }
2037
- });
2038
- }
2039
- });
2040
- }
2041
- };
2042
- var patchChildSlotNodes = (elm, cmpMeta) => {
2043
- class FakeNodeList extends Array {
2044
- item(n) {
2045
- return this[n];
2046
- }
2047
- }
2048
- if (cmpMeta.$flags$ & 8 /* needsShadowDomShim */) {
2049
- const childNodesFn = elm.__lookupGetter__("childNodes");
2050
- Object.defineProperty(elm, "children", {
2051
- get() {
2052
- return this.childNodes.map((n) => n.nodeType === 1);
2053
- }
2054
- });
2055
- Object.defineProperty(elm, "childElementCount", {
2056
- get() {
2057
- return elm.children.length;
2058
- }
2059
- });
2060
- Object.defineProperty(elm, "childNodes", {
2061
- get() {
2062
- const childNodes = childNodesFn.call(this);
2063
- if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0 && getHostRef(this).$flags$ & 2 /* hasRendered */) {
2064
- const result = new FakeNodeList();
2065
- for (let i2 = 0; i2 < childNodes.length; i2++) {
2066
- const slot = childNodes[i2]["s-nr"];
2067
- if (slot) {
2068
- result.push(slot);
2069
- }
2070
- }
2071
- return result;
2072
- }
2073
- return FakeNodeList.from(childNodes);
2074
- }
2075
- });
2076
- }
2077
- };
2078
- var getAllChildSlotNodes = (childNodes) => {
2079
- const slotRefNodes = [];
2080
- for (const childNode of Array.from(childNodes)) {
2081
- if (childNode["s-sr"]) {
2082
- slotRefNodes.push(childNode);
3092
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
2083
3093
  }
2084
- slotRefNodes.push(...getAllChildSlotNodes(childNode.childNodes));
2085
3094
  }
2086
- return slotRefNodes;
2087
- };
2088
- var getSlotName = (node) => node["s-sn"] || node.nodeType === 1 && node.getAttribute("slot") || "";
2089
- var getHostSlotNode = (childNodes, slotName, hostName) => {
2090
- let i2 = 0;
2091
- let childNode;
2092
- for (; i2 < childNodes.length; i2++) {
2093
- childNode = childNodes[i2];
2094
- if (childNode["s-sr"] && childNode["s-sn"] === slotName && childNode["s-hn"] === hostName) {
2095
- return childNode;
2096
- }
2097
- childNode = getHostSlotNode(childNode.childNodes, slotName, hostName);
2098
- if (childNode) {
2099
- return childNode;
2100
- }
3095
+ if (rootAppliedStyles.has(elm)) {
3096
+ rootAppliedStyles.delete(elm);
2101
3097
  }
2102
- return null;
2103
- };
2104
- var getHostSlotChildNodes = (n, slotName) => {
2105
- const childNodes = [n];
2106
- while ((n = n.nextSibling) && n["s-sn"] === slotName) {
2107
- childNodes.push(n);
3098
+ if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
3099
+ rootAppliedStyles.delete(elm.shadowRoot);
2108
3100
  }
2109
- return childNodes;
2110
3101
  };
2111
3102
 
2112
3103
  // src/runtime/bootstrap-lazy.ts
2113
3104
  var bootstrapLazy = (lazyBundles, options = {}) => {
2114
3105
  var _a;
3106
+ if (!win.document) {
3107
+ console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");
3108
+ return;
3109
+ }
2115
3110
  const endBootstrap = createTime();
2116
3111
  const cmpTags = [];
2117
3112
  const exclude = options.exclude || [];
2118
3113
  const customElements2 = win.customElements;
2119
- const head = doc.head;
3114
+ const head = win.document.head;
2120
3115
  const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
2121
- const dataStyles = /* @__PURE__ */ doc.createElement("style");
3116
+ const dataStyles = /* @__PURE__ */ win.document.createElement("style");
2122
3117
  const deferredConnectedCallbacks = [];
2123
3118
  let appLoadFallback;
2124
3119
  let isBootstrapping = true;
2125
3120
  Object.assign(plt, options);
2126
- plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", doc.baseURI).href;
3121
+ plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", win.document.baseURI).href;
2127
3122
  {
2128
3123
  plt.$flags$ |= 2 /* appLoaded */;
2129
3124
  }
3125
+ {
3126
+ hydrateScopedToShadow();
3127
+ }
2130
3128
  let hasSlotRelocation = false;
2131
3129
  lazyBundles.map((lazyBundle) => {
2132
3130
  lazyBundle[1].map((compactMeta) => {
@@ -2163,12 +3161,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2163
3161
  if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2164
3162
  {
2165
3163
  if (!self.shadowRoot) {
2166
- {
2167
- self.attachShadow({
2168
- mode: "open",
2169
- delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */)
2170
- });
2171
- }
3164
+ createShadowRoot.call(self, cmpMeta);
2172
3165
  } else {
2173
3166
  if (self.shadowRoot.mode !== "open") {
2174
3167
  throw new Error(
@@ -2197,6 +3190,17 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2197
3190
  }
2198
3191
  disconnectedCallback() {
2199
3192
  plt.jmp(() => disconnectedCallback(this));
3193
+ plt.raf(() => {
3194
+ var _a3;
3195
+ const hostRef = getHostRef(this);
3196
+ const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
3197
+ if (i2 > -1) {
3198
+ deferredConnectedCallbacks.splice(i2, 1);
3199
+ }
3200
+ if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
3201
+ delete hostRef.$vnode$.$elm$;
3202
+ }
3203
+ });
2200
3204
  }
2201
3205
  componentOnReady() {
2202
3206
  return getHostRef(this).$onReadyPromise$;
@@ -2204,7 +3208,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2204
3208
  };
2205
3209
  {
2206
3210
  if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2207
- patchPseudoShadowDom(HostElement.prototype, cmpMeta);
3211
+ patchPseudoShadowDom(HostElement.prototype);
2208
3212
  }
2209
3213
  }
2210
3214
  cmpMeta.$lazyBundleId$ = lazyBundle[0];
@@ -2226,7 +3230,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2226
3230
  }
2227
3231
  if (dataStyles.innerHTML.length) {
2228
3232
  dataStyles.setAttribute("data-styles", "");
2229
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
3233
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
2230
3234
  if (nonce != null) {
2231
3235
  dataStyles.setAttribute("nonce", nonce);
2232
3236
  }
@@ -2243,10 +3247,13 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2243
3247
  }
2244
3248
  endBootstrap();
2245
3249
  };
3250
+
3251
+ // src/runtime/fragment.ts
3252
+ var Fragment = (_, children) => children;
2246
3253
  var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
2247
- if (listeners) {
3254
+ if (listeners && win.document) {
2248
3255
  listeners.map(([flags, name, method]) => {
2249
- const target = getHostListenerTarget(elm, flags) ;
3256
+ const target = getHostListenerTarget(win.document, elm, flags) ;
2250
3257
  const handler = hostListenerProxy(hostRef, method);
2251
3258
  const opts = hostListenerOpts(flags);
2252
3259
  plt.ael(target, name, handler, opts);
@@ -2265,13 +3272,19 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
2265
3272
  }
2266
3273
  }
2267
3274
  } catch (e) {
2268
- consoleError(e);
3275
+ consoleError(e, hostRef.$hostElement$);
2269
3276
  }
2270
3277
  };
2271
- var getHostListenerTarget = (elm, flags) => {
2272
- if (flags & 4 /* TargetDocument */) return doc;
2273
- if (flags & 8 /* TargetWindow */) return win;
2274
- if (flags & 16 /* TargetBody */) return doc.body;
3278
+ var getHostListenerTarget = (doc, elm, flags) => {
3279
+ if (flags & 4 /* TargetDocument */) {
3280
+ return doc;
3281
+ }
3282
+ if (flags & 8 /* TargetWindow */) {
3283
+ return win;
3284
+ }
3285
+ if (flags & 16 /* TargetBody */) {
3286
+ return doc.body;
3287
+ }
2275
3288
  return elm;
2276
3289
  };
2277
3290
  var hostListenerOpts = (flags) => supportsListenerOptions ? {
@@ -2282,4 +3295,4 @@ var hostListenerOpts = (flags) => supportsListenerOptions ? {
2282
3295
  // src/runtime/nonce.ts
2283
3296
  var setNonce = (nonce) => plt.$nonce$ = nonce;
2284
3297
 
2285
- export { Build as B, H, setMode as a, bootstrapLazy as b, createEvent as c, readTask as d, Host as e, getElement as f, getMode as g, h, forceUpdate as i, getAssetPath as j, promiseResolve as p, registerInstance as r, setNonce as s, writeTask as w };
3298
+ export { Build as B, Fragment as F, H, LogLevel as L, isPlatform as a, bootstrapLazy as b, getPlatforms as c, createEvent as d, getIonMode as e, readTask as f, globalScripts as g, h, initialize as i, Host as j, getElement as k, config as l, printIonWarning as m, forceUpdate as n, printIonError as o, promiseResolve as p, getAssetPath as q, registerInstance as r, setNonce as s, printRequiredElementError as t, writeTask as w };