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
@@ -3,31 +3,271 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- function _interopNamespace(e) {
7
- if (e && e.__esModule) return e;
8
- var n = Object.create(null);
9
- if (e) {
10
- Object.keys(e).forEach(function (k) {
11
- if (k !== 'default') {
12
- var d = Object.getOwnPropertyDescriptor(e, k);
13
- Object.defineProperty(n, k, d.get ? d : {
14
- enumerable: true,
15
- get: function () {
16
- return e[k];
17
- }
18
- });
19
- }
20
- });
21
- }
22
- n['default'] = e;
23
- return Object.freeze(n);
6
+ const NAMESPACE = 'ionic';
7
+ const BUILD = /* ionic */ { experimentalSlotFixes: true, hydratedSelectorName: "hydrated", lazyLoad: true, shadowDom: true, slotRelocation: true, updatable: true};
8
+
9
+ // TODO(FW-2832): types
10
+ class Config {
11
+ constructor() {
12
+ this.m = new Map();
13
+ }
14
+ reset(configObj) {
15
+ this.m = new Map(Object.entries(configObj));
16
+ }
17
+ get(key, fallback) {
18
+ const value = this.m.get(key);
19
+ return value !== undefined ? value : fallback;
20
+ }
21
+ getBoolean(key, fallback = false) {
22
+ const val = this.m.get(key);
23
+ if (val === undefined) {
24
+ return fallback;
25
+ }
26
+ if (typeof val === 'string') {
27
+ return val === 'true';
28
+ }
29
+ return !!val;
30
+ }
31
+ getNumber(key, fallback) {
32
+ const val = parseFloat(this.m.get(key));
33
+ return isNaN(val) ? (fallback !== undefined ? fallback : NaN) : val;
34
+ }
35
+ set(key, value) {
36
+ this.m.set(key, value);
37
+ }
24
38
  }
39
+ const config = /*@__PURE__*/ new Config();
40
+ const configFromSession = (win) => {
41
+ try {
42
+ const configStr = win.sessionStorage.getItem(IONIC_SESSION_KEY);
43
+ return configStr !== null ? JSON.parse(configStr) : {};
44
+ }
45
+ catch (e) {
46
+ return {};
47
+ }
48
+ };
49
+ const saveConfig = (win, c) => {
50
+ try {
51
+ win.sessionStorage.setItem(IONIC_SESSION_KEY, JSON.stringify(c));
52
+ }
53
+ catch (e) {
54
+ return;
55
+ }
56
+ };
57
+ const configFromURL = (win) => {
58
+ const configObj = {};
59
+ win.location.search
60
+ .slice(1)
61
+ .split('&')
62
+ .map((entry) => entry.split('='))
63
+ .map(([key, value]) => {
64
+ try {
65
+ return [decodeURIComponent(key), decodeURIComponent(value)];
66
+ }
67
+ catch (e) {
68
+ return ['', ''];
69
+ }
70
+ })
71
+ .filter(([key]) => startsWith(key, IONIC_PREFIX))
72
+ .map(([key, value]) => [key.slice(IONIC_PREFIX.length), value])
73
+ .forEach(([key, value]) => {
74
+ configObj[key] = value;
75
+ });
76
+ return configObj;
77
+ };
78
+ const startsWith = (input, search) => {
79
+ return input.substr(0, search.length) === search;
80
+ };
81
+ const IONIC_PREFIX = 'ionic:';
82
+ const IONIC_SESSION_KEY = 'ionic-persist-config';
25
83
 
26
- const NAMESPACE = 'ionic';
27
- 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 };
84
+ exports.LogLevel = void 0;
85
+ (function (LogLevel) {
86
+ LogLevel["OFF"] = "OFF";
87
+ LogLevel["ERROR"] = "ERROR";
88
+ LogLevel["WARN"] = "WARN";
89
+ })(exports.LogLevel || (exports.LogLevel = {}));
90
+ /**
91
+ * Logs a warning to the console with an Ionic prefix
92
+ * to indicate the library that is warning the developer.
93
+ *
94
+ * @param message - The string message to be logged to the console.
95
+ */
96
+ const printIonWarning = (message, ...params) => {
97
+ const logLevel = config.get('logLevel', exports.LogLevel.WARN);
98
+ if ([exports.LogLevel.WARN].includes(logLevel)) {
99
+ return console.warn(`[Ionic Warning]: ${message}`, ...params);
100
+ }
101
+ };
102
+ /**
103
+ * Logs an error to the console with an Ionic prefix
104
+ * to indicate the library that is warning the developer.
105
+ *
106
+ * @param message - The string message to be logged to the console.
107
+ * @param params - Additional arguments to supply to the console.error.
108
+ */
109
+ const printIonError = (message, ...params) => {
110
+ const logLevel = config.get('logLevel', exports.LogLevel.ERROR);
111
+ if ([exports.LogLevel.ERROR, exports.LogLevel.WARN].includes(logLevel)) {
112
+ return console.error(`[Ionic Error]: ${message}`, ...params);
113
+ }
114
+ };
115
+ /**
116
+ * Prints an error informing developers that an implementation requires an element to be used
117
+ * within a specific selector.
118
+ *
119
+ * @param el The web component element this is requiring the element.
120
+ * @param targetSelectors The selector or selectors that were not found.
121
+ */
122
+ const printRequiredElementError = (el, ...targetSelectors) => {
123
+ return console.error(`<${el.tagName.toLowerCase()}> must be used inside ${targetSelectors.join(' or ')}.`);
124
+ };
125
+
126
+ const getPlatforms = (win) => setupPlatforms(win);
127
+ const isPlatform = (winOrPlatform, platform) => {
128
+ if (typeof winOrPlatform === 'string') {
129
+ platform = winOrPlatform;
130
+ winOrPlatform = undefined;
131
+ }
132
+ return getPlatforms(winOrPlatform).includes(platform);
133
+ };
134
+ const setupPlatforms = (win = window) => {
135
+ if (typeof win === 'undefined') {
136
+ return [];
137
+ }
138
+ win.Ionic = win.Ionic || {};
139
+ let platforms = win.Ionic.platforms;
140
+ if (platforms == null) {
141
+ platforms = win.Ionic.platforms = detectPlatforms(win);
142
+ platforms.forEach((p) => win.document.documentElement.classList.add(`plt-${p}`));
143
+ }
144
+ return platforms;
145
+ };
146
+ const detectPlatforms = (win) => {
147
+ const customPlatformMethods = config.get('platform');
148
+ return Object.keys(PLATFORMS_MAP).filter((p) => {
149
+ const customMethod = customPlatformMethods === null || customPlatformMethods === void 0 ? void 0 : customPlatformMethods[p];
150
+ return typeof customMethod === 'function' ? customMethod(win) : PLATFORMS_MAP[p](win);
151
+ });
152
+ };
153
+ const isMobileWeb = (win) => isMobile(win) && !isHybrid(win);
154
+ const isIpad = (win) => {
155
+ // iOS 12 and below
156
+ if (testUserAgent(win, /iPad/i)) {
157
+ return true;
158
+ }
159
+ // iOS 13+
160
+ if (testUserAgent(win, /Macintosh/i) && isMobile(win)) {
161
+ return true;
162
+ }
163
+ return false;
164
+ };
165
+ const isIphone = (win) => testUserAgent(win, /iPhone/i);
166
+ const isIOS = (win) => testUserAgent(win, /iPhone|iPod/i) || isIpad(win);
167
+ const isAndroid = (win) => testUserAgent(win, /android|sink/i);
168
+ const isAndroidTablet = (win) => {
169
+ return isAndroid(win) && !testUserAgent(win, /mobile/i);
170
+ };
171
+ const isPhablet = (win) => {
172
+ const width = win.innerWidth;
173
+ const height = win.innerHeight;
174
+ const smallest = Math.min(width, height);
175
+ const largest = Math.max(width, height);
176
+ return smallest > 390 && smallest < 520 && largest > 620 && largest < 800;
177
+ };
178
+ const isTablet = (win) => {
179
+ const width = win.innerWidth;
180
+ const height = win.innerHeight;
181
+ const smallest = Math.min(width, height);
182
+ const largest = Math.max(width, height);
183
+ return isIpad(win) || isAndroidTablet(win) || (smallest > 460 && smallest < 820 && largest > 780 && largest < 1400);
184
+ };
185
+ const isMobile = (win) => matchMedia(win, '(any-pointer:coarse)');
186
+ const isDesktop = (win) => !isMobile(win);
187
+ const isHybrid = (win) => isCordova(win) || isCapacitorNative(win);
188
+ const isCordova = (win) => !!(win['cordova'] || win['phonegap'] || win['PhoneGap']);
189
+ const isCapacitorNative = (win) => {
190
+ const capacitor = win['Capacitor'];
191
+ // TODO(ROU-11693): Remove when we no longer support Capacitor 2, which does not have isNativePlatform
192
+ return !!((capacitor === null || capacitor === void 0 ? void 0 : capacitor.isNative) || ((capacitor === null || capacitor === void 0 ? void 0 : capacitor.isNativePlatform) && !!capacitor.isNativePlatform()));
193
+ };
194
+ const isElectron = (win) => testUserAgent(win, /electron/i);
195
+ 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); };
196
+ const testUserAgent = (win, expr) => expr.test(win.navigator.userAgent);
197
+ const matchMedia = (win, query) => { var _a; return (_a = win.matchMedia) === null || _a === void 0 ? void 0 : _a.call(win, query).matches; };
198
+ const PLATFORMS_MAP = {
199
+ ipad: isIpad,
200
+ iphone: isIphone,
201
+ ios: isIOS,
202
+ android: isAndroid,
203
+ phablet: isPhablet,
204
+ tablet: isTablet,
205
+ cordova: isCordova,
206
+ capacitor: isCapacitorNative,
207
+ electron: isElectron,
208
+ pwa: isPWA,
209
+ mobile: isMobile,
210
+ mobileweb: isMobileWeb,
211
+ desktop: isDesktop,
212
+ hybrid: isHybrid,
213
+ };
214
+
215
+ // TODO(FW-2832): types
216
+ let defaultMode;
217
+ const getIonMode = (ref) => {
218
+ return (ref && getMode(ref)) || defaultMode;
219
+ };
220
+ const initialize = (userConfig = {}) => {
221
+ if (typeof window === 'undefined') {
222
+ return;
223
+ }
224
+ const doc = window.document;
225
+ const win = window;
226
+ const Ionic = (win.Ionic = win.Ionic || {});
227
+ // create the Ionic.config from raw config object (if it exists)
228
+ // and convert Ionic.config into a ConfigApi that has a get() fn
229
+ const configObj = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, configFromSession(win)), { persistConfig: false }), Ionic.config), configFromURL(win)), userConfig);
230
+ config.reset(configObj);
231
+ if (config.getBoolean('persistConfig')) {
232
+ saveConfig(win, configObj);
233
+ }
234
+ // Setup platforms
235
+ setupPlatforms(win);
236
+ // first see if the mode was set as an attribute on <html>
237
+ // which could have been set by the user, or by pre-rendering
238
+ // otherwise get the mode via config settings, and fallback to md
239
+ Ionic.config = config;
240
+ Ionic.mode = defaultMode = config.get('mode', doc.documentElement.getAttribute('mode') || (isPlatform(win, 'ios') ? 'ios' : 'md'));
241
+ config.set('mode', defaultMode);
242
+ doc.documentElement.setAttribute('mode', defaultMode);
243
+ doc.documentElement.classList.add(defaultMode);
244
+ if (config.getBoolean('_testing')) {
245
+ config.set('animated', false);
246
+ }
247
+ const isIonicElement = (elm) => { var _a; return (_a = elm.tagName) === null || _a === void 0 ? void 0 : _a.startsWith('ION-'); };
248
+ const isAllowedIonicModeValue = (elmMode) => ['ios', 'md'].includes(elmMode);
249
+ setMode((elm) => {
250
+ while (elm) {
251
+ const elmMode = elm.mode || elm.getAttribute('mode');
252
+ if (elmMode) {
253
+ if (isAllowedIonicModeValue(elmMode)) {
254
+ return elmMode;
255
+ }
256
+ else if (isIonicElement(elm)) {
257
+ printIonWarning('Invalid ionic mode: "' + elmMode + '", expected: "ios" or "md"');
258
+ }
259
+ }
260
+ elm = elm.parentElement;
261
+ }
262
+ return defaultMode;
263
+ });
264
+ };
265
+
266
+ const globalScripts = initialize;
267
+ const globalStyles = "";
28
268
 
29
269
  /*
30
- Stencil Client Platform v4.20.0 | MIT Licensed | https://stenciljs.com
270
+ Stencil Client Platform v4.33.1 | MIT Licensed | https://stenciljs.com
31
271
  */
32
272
  var __defProp = Object.defineProperty;
33
273
  var __export = (target, all) => {
@@ -35,14 +275,47 @@ var __export = (target, all) => {
35
275
  __defProp(target, name, { get: all[name], enumerable: true });
36
276
  };
37
277
  var Build = {
38
- isDev: false,
39
- isBrowser: true,
40
- isServer: false,
41
- isTesting: false
42
- };
43
- var hostRefs = /* @__PURE__ */ new WeakMap();
44
- var getHostRef = (ref) => hostRefs.get(ref);
45
- var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
278
+ isBrowser: true};
279
+
280
+ // src/utils/constants.ts
281
+ var SVG_NS = "http://www.w3.org/2000/svg";
282
+ var HTML_NS = "http://www.w3.org/1999/xhtml";
283
+ var PrimitiveType = /* @__PURE__ */ ((PrimitiveType2) => {
284
+ PrimitiveType2["Undefined"] = "undefined";
285
+ PrimitiveType2["Null"] = "null";
286
+ PrimitiveType2["String"] = "string";
287
+ PrimitiveType2["Number"] = "number";
288
+ PrimitiveType2["SpecialNumber"] = "number";
289
+ PrimitiveType2["Boolean"] = "boolean";
290
+ PrimitiveType2["BigInt"] = "bigint";
291
+ return PrimitiveType2;
292
+ })(PrimitiveType || {});
293
+ var NonPrimitiveType = /* @__PURE__ */ ((NonPrimitiveType2) => {
294
+ NonPrimitiveType2["Array"] = "array";
295
+ NonPrimitiveType2["Date"] = "date";
296
+ NonPrimitiveType2["Map"] = "map";
297
+ NonPrimitiveType2["Object"] = "object";
298
+ NonPrimitiveType2["RegularExpression"] = "regexp";
299
+ NonPrimitiveType2["Set"] = "set";
300
+ NonPrimitiveType2["Channel"] = "channel";
301
+ NonPrimitiveType2["Symbol"] = "symbol";
302
+ return NonPrimitiveType2;
303
+ })(NonPrimitiveType || {});
304
+ var TYPE_CONSTANT = "type";
305
+ var VALUE_CONSTANT = "value";
306
+ var SERIALIZED_PREFIX = "serialized:";
307
+
308
+ // src/client/client-host-ref.ts
309
+ var getHostRef = (ref) => {
310
+ if (ref.__stencil__getHostRef) {
311
+ return ref.__stencil__getHostRef();
312
+ }
313
+ return void 0;
314
+ };
315
+ var registerInstance = (lazyInstance, hostRef) => {
316
+ lazyInstance.__stencil__getHostRef = () => hostRef;
317
+ hostRef.$lazyInstance$ = lazyInstance;
318
+ };
46
319
  var registerHost = (hostElement, cmpMeta) => {
47
320
  const hostRef = {
48
321
  $flags$: 0,
@@ -58,7 +331,9 @@ var registerHost = (hostElement, cmpMeta) => {
58
331
  hostElement["s-p"] = [];
59
332
  hostElement["s-rc"] = [];
60
333
  }
61
- return hostRefs.set(hostElement, hostRef);
334
+ const ref = hostRef;
335
+ hostElement.__stencil__getHostRef = () => ref;
336
+ return ref;
62
337
  };
63
338
  var isMemberInElement = (elm, memberName) => memberName in elm;
64
339
  var consoleError = (e, el) => (0, console.error)(e, el);
@@ -76,18 +351,23 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
76
351
  return module[exportName];
77
352
  }
78
353
  /*!__STENCIL_STATIC_IMPORT_SWITCH__*/
79
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
354
+ return import(
80
355
  /* @vite-ignore */
81
356
  /* webpackInclude: /\.entry\.js$/ */
82
357
  /* webpackExclude: /\.system\.entry\.js$/ */
83
358
  /* webpackMode: "lazy" */
84
359
  `./${bundleId}.entry.js${""}`
85
- )); }).then((importedModule) => {
86
- {
87
- cmpModules.set(bundleId, importedModule);
360
+ ).then(
361
+ (importedModule) => {
362
+ {
363
+ cmpModules.set(bundleId, importedModule);
364
+ }
365
+ return importedModule[exportName];
366
+ },
367
+ (e) => {
368
+ consoleError(e, hostRef.$hostElement$);
88
369
  }
89
- return importedModule[exportName];
90
- }, consoleError);
370
+ );
91
371
  };
92
372
 
93
373
  // src/client/client-style.ts
@@ -99,6 +379,7 @@ var CONTENT_REF_ID = "r";
99
379
  var ORG_LOCATION_ID = "o";
100
380
  var SLOT_NODE_ID = "s";
101
381
  var TEXT_NODE_ID = "t";
382
+ var COMMENT_NODE_ID = "c";
102
383
  var HYDRATE_ID = "s-id";
103
384
  var HYDRATED_STYLE_ID = "sty-id";
104
385
  var HYDRATE_CHILD_ID = "c-id";
@@ -106,7 +387,6 @@ var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
106
387
  var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
107
388
  var XLINK_NS = "http://www.w3.org/1999/xlink";
108
389
  var win = typeof window !== "undefined" ? window : {};
109
- var doc = win.document || { head: {} };
110
390
  var H = win.HTMLElement || class {
111
391
  };
112
392
  var plt = {
@@ -120,9 +400,10 @@ var plt = {
120
400
  };
121
401
  var supportsShadow = BUILD.shadowDom;
122
402
  var supportsListenerOptions = /* @__PURE__ */ (() => {
403
+ var _a;
123
404
  let supportsListenerOptions2 = false;
124
405
  try {
125
- doc.addEventListener(
406
+ (_a = win.document) == null ? void 0 : _a.addEventListener(
126
407
  "e",
127
408
  null,
128
409
  Object.defineProperty({}, "passive", {
@@ -187,24 +468,119 @@ var getAssetPath = (path) => {
187
468
  return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
188
469
  };
189
470
 
190
- // src/utils/constants.ts
191
- var EMPTY_OBJ = {};
192
- var SVG_NS = "http://www.w3.org/2000/svg";
193
- var HTML_NS = "http://www.w3.org/1999/xhtml";
194
-
195
471
  // src/utils/helpers.ts
196
- var isDef = (v) => v != null;
472
+ var isDef = (v) => v != null && v !== void 0;
197
473
  var isComplexType = (o) => {
198
474
  o = typeof o;
199
475
  return o === "object" || o === "function";
200
476
  };
201
477
 
202
478
  // src/utils/query-nonce-meta-tag-content.ts
203
- function queryNonceMetaTagContent(doc2) {
479
+ function queryNonceMetaTagContent(doc) {
204
480
  var _a, _b, _c;
205
- 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;
481
+ 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;
206
482
  }
207
483
 
484
+ // src/utils/regular-expression.ts
485
+ var escapeRegExpSpecialCharacters = (text) => {
486
+ return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
487
+ };
488
+
489
+ // src/utils/remote-value.ts
490
+ var RemoteValue = class _RemoteValue {
491
+ /**
492
+ * Deserializes a LocalValue serialized object back to its original JavaScript representation
493
+ *
494
+ * @param serialized The serialized LocalValue object
495
+ * @returns The original JavaScript value/object
496
+ */
497
+ static fromLocalValue(serialized) {
498
+ const type = serialized[TYPE_CONSTANT];
499
+ const value = VALUE_CONSTANT in serialized ? serialized[VALUE_CONSTANT] : void 0;
500
+ switch (type) {
501
+ case "string" /* String */:
502
+ return value;
503
+ case "boolean" /* Boolean */:
504
+ return value;
505
+ case "bigint" /* BigInt */:
506
+ return BigInt(value);
507
+ case "undefined" /* Undefined */:
508
+ return void 0;
509
+ case "null" /* Null */:
510
+ return null;
511
+ case "number" /* Number */:
512
+ if (value === "NaN") return NaN;
513
+ if (value === "-0") return -0;
514
+ if (value === "Infinity") return Infinity;
515
+ if (value === "-Infinity") return -Infinity;
516
+ return value;
517
+ case "array" /* Array */:
518
+ return value.map((item) => _RemoteValue.fromLocalValue(item));
519
+ case "date" /* Date */:
520
+ return new Date(value);
521
+ case "map" /* Map */:
522
+ const map2 = /* @__PURE__ */ new Map();
523
+ for (const [key, val] of value) {
524
+ const deserializedKey = typeof key === "object" && key !== null ? _RemoteValue.fromLocalValue(key) : key;
525
+ const deserializedValue = _RemoteValue.fromLocalValue(val);
526
+ map2.set(deserializedKey, deserializedValue);
527
+ }
528
+ return map2;
529
+ case "object" /* Object */:
530
+ const obj = {};
531
+ for (const [key, val] of value) {
532
+ obj[key] = _RemoteValue.fromLocalValue(val);
533
+ }
534
+ return obj;
535
+ case "regexp" /* RegularExpression */:
536
+ const { pattern, flags } = value;
537
+ return new RegExp(pattern, flags);
538
+ case "set" /* Set */:
539
+ const set = /* @__PURE__ */ new Set();
540
+ for (const item of value) {
541
+ set.add(_RemoteValue.fromLocalValue(item));
542
+ }
543
+ return set;
544
+ case "symbol" /* Symbol */:
545
+ return Symbol(value);
546
+ default:
547
+ throw new Error(`Unsupported type: ${type}`);
548
+ }
549
+ }
550
+ /**
551
+ * Utility method to deserialize multiple LocalValues at once
552
+ *
553
+ * @param serializedValues Array of serialized LocalValue objects
554
+ * @returns Array of deserialized JavaScript values
555
+ */
556
+ static fromLocalValueArray(serializedValues) {
557
+ return serializedValues.map((value) => _RemoteValue.fromLocalValue(value));
558
+ }
559
+ /**
560
+ * Verifies if the given object matches the structure of a serialized LocalValue
561
+ *
562
+ * @param obj Object to verify
563
+ * @returns boolean indicating if the object has LocalValue structure
564
+ */
565
+ static isLocalValueObject(obj) {
566
+ if (typeof obj !== "object" || obj === null) {
567
+ return false;
568
+ }
569
+ if (!obj.hasOwnProperty(TYPE_CONSTANT)) {
570
+ return false;
571
+ }
572
+ const type = obj[TYPE_CONSTANT];
573
+ const hasTypeProperty = Object.values({ ...PrimitiveType, ...NonPrimitiveType }).includes(type);
574
+ if (!hasTypeProperty) {
575
+ return false;
576
+ }
577
+ if (type !== "null" /* Null */ && type !== "undefined" /* Undefined */) {
578
+ return obj.hasOwnProperty(VALUE_CONSTANT);
579
+ }
580
+ return true;
581
+ }
582
+ };
583
+
208
584
  // src/utils/result.ts
209
585
  var result_exports = {};
210
586
  __export(result_exports, {
@@ -253,6 +629,538 @@ var unwrapErr = (result) => {
253
629
  throw result.value;
254
630
  }
255
631
  };
632
+
633
+ // src/utils/serialize.ts
634
+ function deserializeProperty(value) {
635
+ if (typeof value !== "string" || !value.startsWith(SERIALIZED_PREFIX)) {
636
+ return value;
637
+ }
638
+ return RemoteValue.fromLocalValue(JSON.parse(atob(value.slice(SERIALIZED_PREFIX.length))));
639
+ }
640
+ function createShadowRoot(cmpMeta) {
641
+ const shadowRoot = this.attachShadow({
642
+ mode: "open",
643
+ delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */)
644
+ }) ;
645
+ if (supportsConstructableStylesheets) {
646
+ const sheet = new CSSStyleSheet();
647
+ sheet.replaceSync(globalStyles);
648
+ shadowRoot.adoptedStyleSheets.push(sheet);
649
+ }
650
+ }
651
+ var updateFallbackSlotVisibility = (elm) => {
652
+ const childNodes = internalCall(elm, "childNodes");
653
+ if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
654
+ getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
655
+ if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
656
+ if (getSlotChildSiblings(slotNode, getSlotName(slotNode), false).length) {
657
+ slotNode.hidden = true;
658
+ } else {
659
+ slotNode.hidden = false;
660
+ }
661
+ }
662
+ });
663
+ }
664
+ let i2 = 0;
665
+ for (i2 = 0; i2 < childNodes.length; i2++) {
666
+ const childNode = childNodes[i2];
667
+ if (childNode.nodeType === 1 /* ElementNode */ && internalCall(childNode, "childNodes").length) {
668
+ updateFallbackSlotVisibility(childNode);
669
+ }
670
+ }
671
+ };
672
+ var getSlottedChildNodes = (childNodes) => {
673
+ const result = [];
674
+ for (let i2 = 0; i2 < childNodes.length; i2++) {
675
+ const slottedNode = childNodes[i2]["s-nr"] || void 0;
676
+ if (slottedNode && slottedNode.isConnected) {
677
+ result.push(slottedNode);
678
+ }
679
+ }
680
+ return result;
681
+ };
682
+ function getHostSlotNodes(childNodes, hostName, slotName) {
683
+ let i2 = 0;
684
+ let slottedNodes = [];
685
+ let childNode;
686
+ for (; i2 < childNodes.length; i2++) {
687
+ childNode = childNodes[i2];
688
+ if (childNode["s-sr"] && (!hostName || childNode["s-hn"] === hostName) && (slotName === void 0 || getSlotName(childNode) === slotName)) {
689
+ slottedNodes.push(childNode);
690
+ if (typeof slotName !== "undefined") return slottedNodes;
691
+ }
692
+ slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
693
+ }
694
+ return slottedNodes;
695
+ }
696
+ var getSlotChildSiblings = (slot, slotName, includeSlot = true) => {
697
+ const childNodes = [];
698
+ if (includeSlot && slot["s-sr"] || !slot["s-sr"]) childNodes.push(slot);
699
+ let node = slot;
700
+ while (node = node.nextSibling) {
701
+ if (getSlotName(node) === slotName && (includeSlot || !node["s-sr"])) childNodes.push(node);
702
+ }
703
+ return childNodes;
704
+ };
705
+ var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
706
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
707
+ if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
708
+ return true;
709
+ }
710
+ if (nodeToRelocate.getAttribute("slot") === slotName) {
711
+ return true;
712
+ }
713
+ return false;
714
+ }
715
+ if (nodeToRelocate["s-sn"] === slotName) {
716
+ return true;
717
+ }
718
+ return slotName === "";
719
+ };
720
+ var addSlotRelocateNode = (newChild, slotNode, prepend, position) => {
721
+ if (newChild["s-ol"] && newChild["s-ol"].isConnected) {
722
+ return;
723
+ }
724
+ const slottedNodeLocation = document.createTextNode("");
725
+ slottedNodeLocation["s-nr"] = newChild;
726
+ if (!slotNode["s-cr"] || !slotNode["s-cr"].parentNode) return;
727
+ const parent = slotNode["s-cr"].parentNode;
728
+ const appendMethod = prepend ? internalCall(parent, "prepend") : internalCall(parent, "appendChild");
729
+ if (typeof position !== "undefined") {
730
+ slottedNodeLocation["s-oo"] = position;
731
+ const childNodes = internalCall(parent, "childNodes");
732
+ const slotRelocateNodes = [slottedNodeLocation];
733
+ childNodes.forEach((n) => {
734
+ if (n["s-nr"]) slotRelocateNodes.push(n);
735
+ });
736
+ slotRelocateNodes.sort((a, b) => {
737
+ if (!a["s-oo"] || a["s-oo"] < (b["s-oo"] || 0)) return -1;
738
+ else if (!b["s-oo"] || b["s-oo"] < a["s-oo"]) return 1;
739
+ return 0;
740
+ });
741
+ slotRelocateNodes.forEach((n) => appendMethod.call(parent, n));
742
+ } else {
743
+ appendMethod.call(parent, slottedNodeLocation);
744
+ }
745
+ newChild["s-ol"] = slottedNodeLocation;
746
+ newChild["s-sh"] = slotNode["s-hn"];
747
+ };
748
+ var getSlotName = (node) => typeof node["s-sn"] === "string" ? node["s-sn"] : node.nodeType === 1 && node.getAttribute("slot") || void 0;
749
+ function patchSlotNode(node) {
750
+ if (node.assignedElements || node.assignedNodes || !node["s-sr"]) return;
751
+ const assignedFactory = (elementsOnly) => (function(opts) {
752
+ const toReturn = [];
753
+ const slotName = this["s-sn"];
754
+ if (opts == null ? void 0 : opts.flatten) {
755
+ console.error(`
756
+ Flattening is not supported for Stencil non-shadow slots.
757
+ You can use \`.childNodes\` to nested slot fallback content.
758
+ If you have a particular use case, please open an issue on the Stencil repo.
759
+ `);
760
+ }
761
+ const parent = this["s-cr"].parentElement;
762
+ const slottedNodes = parent.__childNodes ? parent.childNodes : getSlottedChildNodes(parent.childNodes);
763
+ slottedNodes.forEach((n) => {
764
+ if (slotName === getSlotName(n)) {
765
+ toReturn.push(n);
766
+ }
767
+ });
768
+ if (elementsOnly) {
769
+ return toReturn.filter((n) => n.nodeType === 1 /* ElementNode */);
770
+ }
771
+ return toReturn;
772
+ }).bind(node);
773
+ node.assignedElements = assignedFactory(true);
774
+ node.assignedNodes = assignedFactory(false);
775
+ }
776
+ function dispatchSlotChangeEvent(elm) {
777
+ elm.dispatchEvent(new CustomEvent("slotchange", { bubbles: false, cancelable: false, composed: false }));
778
+ }
779
+ function findSlotFromSlottedNode(slottedNode, parentHost) {
780
+ var _a;
781
+ parentHost = parentHost || ((_a = slottedNode["s-ol"]) == null ? void 0 : _a.parentElement);
782
+ if (!parentHost) return { slotNode: null, slotName: "" };
783
+ const slotName = slottedNode["s-sn"] = getSlotName(slottedNode) || "";
784
+ const childNodes = internalCall(parentHost, "childNodes");
785
+ const slotNode = getHostSlotNodes(childNodes, parentHost.tagName, slotName)[0];
786
+ return { slotNode, slotName };
787
+ }
788
+
789
+ // src/runtime/dom-extras.ts
790
+ var patchPseudoShadowDom = (hostElementPrototype) => {
791
+ patchCloneNode(hostElementPrototype);
792
+ patchSlotAppendChild(hostElementPrototype);
793
+ patchSlotAppend(hostElementPrototype);
794
+ patchSlotPrepend(hostElementPrototype);
795
+ patchSlotInsertAdjacentElement(hostElementPrototype);
796
+ patchSlotInsertAdjacentHTML(hostElementPrototype);
797
+ patchSlotInsertAdjacentText(hostElementPrototype);
798
+ patchInsertBefore(hostElementPrototype);
799
+ patchTextContent(hostElementPrototype);
800
+ patchChildSlotNodes(hostElementPrototype);
801
+ patchSlotRemoveChild(hostElementPrototype);
802
+ };
803
+ var patchCloneNode = (HostElementPrototype) => {
804
+ const orgCloneNode = HostElementPrototype.cloneNode;
805
+ HostElementPrototype.cloneNode = function(deep) {
806
+ const srcNode = this;
807
+ const isShadowDom = srcNode.shadowRoot && supportsShadow ;
808
+ const clonedNode = orgCloneNode.call(srcNode, isShadowDom ? deep : false);
809
+ if (!isShadowDom && deep) {
810
+ let i2 = 0;
811
+ let slotted, nonStencilNode;
812
+ const stencilPrivates = [
813
+ "s-id",
814
+ "s-cr",
815
+ "s-lr",
816
+ "s-rc",
817
+ "s-sc",
818
+ "s-p",
819
+ "s-cn",
820
+ "s-sr",
821
+ "s-sn",
822
+ "s-hn",
823
+ "s-ol",
824
+ "s-nr",
825
+ "s-si",
826
+ "s-rf",
827
+ "s-scs"
828
+ ];
829
+ const childNodes = this.__childNodes || this.childNodes;
830
+ for (; i2 < childNodes.length; i2++) {
831
+ slotted = childNodes[i2]["s-nr"];
832
+ nonStencilNode = stencilPrivates.every((privateField) => !childNodes[i2][privateField]);
833
+ if (slotted) {
834
+ if (clonedNode.__appendChild) {
835
+ clonedNode.__appendChild(slotted.cloneNode(true));
836
+ } else {
837
+ clonedNode.appendChild(slotted.cloneNode(true));
838
+ }
839
+ }
840
+ if (nonStencilNode) {
841
+ clonedNode.appendChild(childNodes[i2].cloneNode(true));
842
+ }
843
+ }
844
+ }
845
+ return clonedNode;
846
+ };
847
+ };
848
+ var patchSlotAppendChild = (HostElementPrototype) => {
849
+ HostElementPrototype.__appendChild = HostElementPrototype.appendChild;
850
+ HostElementPrototype.appendChild = function(newChild) {
851
+ const { slotName, slotNode } = findSlotFromSlottedNode(newChild, this);
852
+ if (slotNode) {
853
+ addSlotRelocateNode(newChild, slotNode);
854
+ const slotChildNodes = getSlotChildSiblings(slotNode, slotName);
855
+ const appendAfter = slotChildNodes[slotChildNodes.length - 1];
856
+ const parent = internalCall(appendAfter, "parentNode");
857
+ const insertedNode = internalCall(parent, "insertBefore")(newChild, appendAfter.nextSibling);
858
+ dispatchSlotChangeEvent(slotNode);
859
+ updateFallbackSlotVisibility(this);
860
+ return insertedNode;
861
+ }
862
+ return this.__appendChild(newChild);
863
+ };
864
+ };
865
+ var patchSlotRemoveChild = (ElementPrototype) => {
866
+ ElementPrototype.__removeChild = ElementPrototype.removeChild;
867
+ ElementPrototype.removeChild = function(toRemove) {
868
+ if (toRemove && typeof toRemove["s-sn"] !== "undefined") {
869
+ const childNodes = this.__childNodes || this.childNodes;
870
+ const slotNode = getHostSlotNodes(childNodes, this.tagName, toRemove["s-sn"]);
871
+ if (slotNode && toRemove.isConnected) {
872
+ toRemove.remove();
873
+ updateFallbackSlotVisibility(this);
874
+ return;
875
+ }
876
+ }
877
+ return this.__removeChild(toRemove);
878
+ };
879
+ };
880
+ var patchSlotPrepend = (HostElementPrototype) => {
881
+ HostElementPrototype.__prepend = HostElementPrototype.prepend;
882
+ HostElementPrototype.prepend = function(...newChildren) {
883
+ newChildren.forEach((newChild) => {
884
+ if (typeof newChild === "string") {
885
+ newChild = this.ownerDocument.createTextNode(newChild);
886
+ }
887
+ const slotName = (newChild["s-sn"] = getSlotName(newChild)) || "";
888
+ const childNodes = internalCall(this, "childNodes");
889
+ const slotNode = getHostSlotNodes(childNodes, this.tagName, slotName)[0];
890
+ if (slotNode) {
891
+ addSlotRelocateNode(newChild, slotNode, true);
892
+ const slotChildNodes = getSlotChildSiblings(slotNode, slotName);
893
+ const appendAfter = slotChildNodes[0];
894
+ const parent = internalCall(appendAfter, "parentNode");
895
+ const toReturn = internalCall(parent, "insertBefore")(newChild, internalCall(appendAfter, "nextSibling"));
896
+ dispatchSlotChangeEvent(slotNode);
897
+ return toReturn;
898
+ }
899
+ if (newChild.nodeType === 1 && !!newChild.getAttribute("slot")) {
900
+ newChild.hidden = true;
901
+ }
902
+ return HostElementPrototype.__prepend(newChild);
903
+ });
904
+ };
905
+ };
906
+ var patchSlotAppend = (HostElementPrototype) => {
907
+ HostElementPrototype.__append = HostElementPrototype.append;
908
+ HostElementPrototype.append = function(...newChildren) {
909
+ newChildren.forEach((newChild) => {
910
+ if (typeof newChild === "string") {
911
+ newChild = this.ownerDocument.createTextNode(newChild);
912
+ }
913
+ this.appendChild(newChild);
914
+ });
915
+ };
916
+ };
917
+ var patchSlotInsertAdjacentHTML = (HostElementPrototype) => {
918
+ const originalInsertAdjacentHtml = HostElementPrototype.insertAdjacentHTML;
919
+ HostElementPrototype.insertAdjacentHTML = function(position, text) {
920
+ if (position !== "afterbegin" && position !== "beforeend") {
921
+ return originalInsertAdjacentHtml.call(this, position, text);
922
+ }
923
+ const container = this.ownerDocument.createElement("_");
924
+ let node;
925
+ container.innerHTML = text;
926
+ if (position === "afterbegin") {
927
+ while (node = container.firstChild) {
928
+ this.prepend(node);
929
+ }
930
+ } else if (position === "beforeend") {
931
+ while (node = container.firstChild) {
932
+ this.append(node);
933
+ }
934
+ }
935
+ };
936
+ };
937
+ var patchSlotInsertAdjacentText = (HostElementPrototype) => {
938
+ HostElementPrototype.insertAdjacentText = function(position, text) {
939
+ this.insertAdjacentHTML(position, text);
940
+ };
941
+ };
942
+ var patchInsertBefore = (HostElementPrototype) => {
943
+ const eleProto = HostElementPrototype;
944
+ if (eleProto.__insertBefore) return;
945
+ eleProto.__insertBefore = HostElementPrototype.insertBefore;
946
+ HostElementPrototype.insertBefore = function(newChild, currentChild) {
947
+ const { slotName, slotNode } = findSlotFromSlottedNode(newChild, this);
948
+ const slottedNodes = this.__childNodes ? this.childNodes : getSlottedChildNodes(this.childNodes);
949
+ if (slotNode) {
950
+ let found = false;
951
+ slottedNodes.forEach((childNode) => {
952
+ if (childNode === currentChild || currentChild === null) {
953
+ found = true;
954
+ if (currentChild === null || slotName !== currentChild["s-sn"]) {
955
+ this.appendChild(newChild);
956
+ return;
957
+ }
958
+ if (slotName === currentChild["s-sn"]) {
959
+ addSlotRelocateNode(newChild, slotNode);
960
+ const parent = internalCall(currentChild, "parentNode");
961
+ internalCall(parent, "insertBefore")(newChild, currentChild);
962
+ dispatchSlotChangeEvent(slotNode);
963
+ }
964
+ return;
965
+ }
966
+ });
967
+ if (found) return newChild;
968
+ }
969
+ const parentNode = currentChild == null ? void 0 : currentChild.__parentNode;
970
+ if (parentNode && !this.isSameNode(parentNode)) {
971
+ return this.appendChild(newChild);
972
+ }
973
+ return this.__insertBefore(newChild, currentChild);
974
+ };
975
+ };
976
+ var patchSlotInsertAdjacentElement = (HostElementPrototype) => {
977
+ const originalInsertAdjacentElement = HostElementPrototype.insertAdjacentElement;
978
+ HostElementPrototype.insertAdjacentElement = function(position, element) {
979
+ if (position !== "afterbegin" && position !== "beforeend") {
980
+ return originalInsertAdjacentElement.call(this, position, element);
981
+ }
982
+ if (position === "afterbegin") {
983
+ this.prepend(element);
984
+ return element;
985
+ } else if (position === "beforeend") {
986
+ this.append(element);
987
+ return element;
988
+ }
989
+ return element;
990
+ };
991
+ };
992
+ var patchTextContent = (hostElementPrototype) => {
993
+ patchHostOriginalAccessor("textContent", hostElementPrototype);
994
+ Object.defineProperty(hostElementPrototype, "textContent", {
995
+ get: function() {
996
+ let text = "";
997
+ const childNodes = this.__childNodes ? this.childNodes : getSlottedChildNodes(this.childNodes);
998
+ childNodes.forEach((node) => text += node.textContent || "");
999
+ return text;
1000
+ },
1001
+ set: function(value) {
1002
+ const childNodes = this.__childNodes ? this.childNodes : getSlottedChildNodes(this.childNodes);
1003
+ childNodes.forEach((node) => {
1004
+ if (node["s-ol"]) node["s-ol"].remove();
1005
+ node.remove();
1006
+ });
1007
+ this.insertAdjacentHTML("beforeend", value);
1008
+ }
1009
+ });
1010
+ };
1011
+ var patchChildSlotNodes = (elm) => {
1012
+ class FakeNodeList extends Array {
1013
+ item(n) {
1014
+ return this[n];
1015
+ }
1016
+ }
1017
+ patchHostOriginalAccessor("children", elm);
1018
+ Object.defineProperty(elm, "children", {
1019
+ get() {
1020
+ return this.childNodes.filter((n) => n.nodeType === 1);
1021
+ }
1022
+ });
1023
+ Object.defineProperty(elm, "childElementCount", {
1024
+ get() {
1025
+ return this.children.length;
1026
+ }
1027
+ });
1028
+ patchHostOriginalAccessor("firstChild", elm);
1029
+ Object.defineProperty(elm, "firstChild", {
1030
+ get() {
1031
+ return this.childNodes[0];
1032
+ }
1033
+ });
1034
+ patchHostOriginalAccessor("lastChild", elm);
1035
+ Object.defineProperty(elm, "lastChild", {
1036
+ get() {
1037
+ return this.childNodes[this.childNodes.length - 1];
1038
+ }
1039
+ });
1040
+ patchHostOriginalAccessor("childNodes", elm);
1041
+ Object.defineProperty(elm, "childNodes", {
1042
+ get() {
1043
+ const result = new FakeNodeList();
1044
+ result.push(...getSlottedChildNodes(this.__childNodes));
1045
+ return result;
1046
+ }
1047
+ });
1048
+ };
1049
+ var patchSlottedNode = (node) => {
1050
+ if (!node || node.__nextSibling !== void 0 || !globalThis.Node) return;
1051
+ patchNextSibling(node);
1052
+ patchPreviousSibling(node);
1053
+ patchParentNode(node);
1054
+ if (node.nodeType === Node.ELEMENT_NODE) {
1055
+ patchNextElementSibling(node);
1056
+ patchPreviousElementSibling(node);
1057
+ }
1058
+ };
1059
+ var patchNextSibling = (node) => {
1060
+ if (!node || node.__nextSibling) return;
1061
+ patchHostOriginalAccessor("nextSibling", node);
1062
+ Object.defineProperty(node, "nextSibling", {
1063
+ get: function() {
1064
+ var _a;
1065
+ const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.childNodes;
1066
+ const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
1067
+ if (parentNodes && index > -1) {
1068
+ return parentNodes[index + 1];
1069
+ }
1070
+ return this.__nextSibling;
1071
+ }
1072
+ });
1073
+ };
1074
+ var patchNextElementSibling = (element) => {
1075
+ if (!element || element.__nextElementSibling) return;
1076
+ patchHostOriginalAccessor("nextElementSibling", element);
1077
+ Object.defineProperty(element, "nextElementSibling", {
1078
+ get: function() {
1079
+ var _a;
1080
+ const parentEles = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.children;
1081
+ const index = parentEles == null ? void 0 : parentEles.indexOf(this);
1082
+ if (parentEles && index > -1) {
1083
+ return parentEles[index + 1];
1084
+ }
1085
+ return this.__nextElementSibling;
1086
+ }
1087
+ });
1088
+ };
1089
+ var patchPreviousSibling = (node) => {
1090
+ if (!node || node.__previousSibling) return;
1091
+ patchHostOriginalAccessor("previousSibling", node);
1092
+ Object.defineProperty(node, "previousSibling", {
1093
+ get: function() {
1094
+ var _a;
1095
+ const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.childNodes;
1096
+ const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
1097
+ if (parentNodes && index > -1) {
1098
+ return parentNodes[index - 1];
1099
+ }
1100
+ return this.__previousSibling;
1101
+ }
1102
+ });
1103
+ };
1104
+ var patchPreviousElementSibling = (element) => {
1105
+ if (!element || element.__previousElementSibling) return;
1106
+ patchHostOriginalAccessor("previousElementSibling", element);
1107
+ Object.defineProperty(element, "previousElementSibling", {
1108
+ get: function() {
1109
+ var _a;
1110
+ const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.children;
1111
+ const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
1112
+ if (parentNodes && index > -1) {
1113
+ return parentNodes[index - 1];
1114
+ }
1115
+ return this.__previousElementSibling;
1116
+ }
1117
+ });
1118
+ };
1119
+ var patchParentNode = (node) => {
1120
+ if (!node || node.__parentNode) return;
1121
+ patchHostOriginalAccessor("parentNode", node);
1122
+ Object.defineProperty(node, "parentNode", {
1123
+ get: function() {
1124
+ var _a;
1125
+ return ((_a = this["s-ol"]) == null ? void 0 : _a.parentNode) || this.__parentNode;
1126
+ },
1127
+ set: function(value) {
1128
+ this.__parentNode = value;
1129
+ }
1130
+ });
1131
+ };
1132
+ var validElementPatches = ["children", "nextElementSibling", "previousElementSibling"];
1133
+ var validNodesPatches = [
1134
+ "childNodes",
1135
+ "firstChild",
1136
+ "lastChild",
1137
+ "nextSibling",
1138
+ "previousSibling",
1139
+ "textContent",
1140
+ "parentNode"
1141
+ ];
1142
+ function patchHostOriginalAccessor(accessorName, node) {
1143
+ let accessor;
1144
+ if (validElementPatches.includes(accessorName)) {
1145
+ accessor = Object.getOwnPropertyDescriptor(Element.prototype, accessorName);
1146
+ } else if (validNodesPatches.includes(accessorName)) {
1147
+ accessor = Object.getOwnPropertyDescriptor(Node.prototype, accessorName);
1148
+ }
1149
+ if (!accessor) {
1150
+ accessor = Object.getOwnPropertyDescriptor(node, accessorName);
1151
+ }
1152
+ if (accessor) Object.defineProperty(node, "__" + accessorName, accessor);
1153
+ }
1154
+ function internalCall(node, method) {
1155
+ if ("__" + method in node) {
1156
+ const toReturn = node["__" + method];
1157
+ if (typeof toReturn !== "function") return toReturn;
1158
+ return toReturn.bind(node);
1159
+ } else {
1160
+ if (typeof node[method] !== "function") return node[method];
1161
+ return node[method].bind(node);
1162
+ }
1163
+ }
256
1164
  var createTime = (fnName, tagName = "") => {
257
1165
  {
258
1166
  return () => {
@@ -381,54 +1289,166 @@ var convertToPrivate = (node) => {
381
1289
 
382
1290
  // src/runtime/client-hydrate.ts
383
1291
  var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1292
+ var _a;
384
1293
  const endHydrate = createTime("hydrateClient", tagName);
385
1294
  const shadowRoot = hostElm.shadowRoot;
386
1295
  const childRenderNodes = [];
387
1296
  const slotNodes = [];
1297
+ const slottedNodes = [];
388
1298
  const shadowRootNodes = shadowRoot ? [] : null;
389
- const vnode = hostRef.$vnode$ = newVNode(tagName, null);
390
- if (!plt.$orgLocNodes$) {
391
- initializeDocumentHydrate(doc.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
1299
+ const vnode = newVNode(tagName, null);
1300
+ vnode.$elm$ = hostElm;
1301
+ const members = Object.entries(((_a = hostRef.$cmpMeta$) == null ? void 0 : _a.$members$) || {});
1302
+ members.forEach(([memberName, [memberFlags, metaAttributeName]]) => {
1303
+ var _a2;
1304
+ if (!(memberFlags & 31 /* Prop */)) {
1305
+ return;
1306
+ }
1307
+ const attributeName = metaAttributeName || memberName;
1308
+ const attrVal = hostElm.getAttribute(attributeName);
1309
+ if (attrVal !== null) {
1310
+ const attrPropVal = parsePropertyValue(attrVal, memberFlags);
1311
+ (_a2 = hostRef == null ? void 0 : hostRef.$instanceValues$) == null ? void 0 : _a2.set(memberName, attrPropVal);
1312
+ }
1313
+ });
1314
+ let scopeId2;
1315
+ {
1316
+ const cmpMeta = hostRef.$cmpMeta$;
1317
+ if (cmpMeta && cmpMeta.$flags$ & 10 /* needsScopedEncapsulation */ && hostElm["s-sc"]) {
1318
+ scopeId2 = hostElm["s-sc"];
1319
+ hostElm.classList.add(scopeId2 + "-h");
1320
+ } else if (hostElm["s-sc"]) {
1321
+ delete hostElm["s-sc"];
1322
+ }
1323
+ }
1324
+ if (win.document && (!plt.$orgLocNodes$ || !plt.$orgLocNodes$.size)) {
1325
+ initializeDocumentHydrate(win.document.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
392
1326
  }
393
1327
  hostElm[HYDRATE_ID] = hostId;
394
1328
  hostElm.removeAttribute(HYDRATE_ID);
395
- clientHydrate(vnode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, hostElm, hostId);
396
- childRenderNodes.map((c) => {
397
- const orgLocationId = c.$hostId$ + "." + c.$nodeId$;
1329
+ hostRef.$vnode$ = clientHydrate(
1330
+ vnode,
1331
+ childRenderNodes,
1332
+ slotNodes,
1333
+ shadowRootNodes,
1334
+ hostElm,
1335
+ hostElm,
1336
+ hostId,
1337
+ slottedNodes
1338
+ );
1339
+ let crIndex = 0;
1340
+ const crLength = childRenderNodes.length;
1341
+ let childRenderNode;
1342
+ for (crIndex; crIndex < crLength; crIndex++) {
1343
+ childRenderNode = childRenderNodes[crIndex];
1344
+ const orgLocationId = childRenderNode.$hostId$ + "." + childRenderNode.$nodeId$;
398
1345
  const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
399
- const node = c.$elm$;
400
- if (orgLocationNode && supportsShadow && orgLocationNode["s-en"] === "") {
401
- orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
402
- }
1346
+ const node = childRenderNode.$elm$;
403
1347
  if (!shadowRoot) {
404
- node["s-hn"] = tagName;
405
- if (orgLocationNode) {
406
- node["s-ol"] = orgLocationNode;
407
- node["s-ol"]["s-nr"] = node;
1348
+ node["s-hn"] = tagName.toUpperCase();
1349
+ if (childRenderNode.$tag$ === "slot") {
1350
+ node["s-cr"] = hostElm["s-cr"];
1351
+ }
1352
+ }
1353
+ if (childRenderNode.$tag$ === "slot") {
1354
+ childRenderNode.$name$ = childRenderNode.$elm$["s-sn"] || childRenderNode.$elm$["name"] || null;
1355
+ if (childRenderNode.$children$) {
1356
+ childRenderNode.$flags$ |= 2 /* isSlotFallback */;
1357
+ if (!childRenderNode.$elm$.childNodes.length) {
1358
+ childRenderNode.$children$.forEach((c) => {
1359
+ childRenderNode.$elm$.appendChild(c.$elm$);
1360
+ });
1361
+ }
1362
+ } else {
1363
+ childRenderNode.$flags$ |= 1 /* isSlotReference */;
1364
+ }
1365
+ }
1366
+ if (orgLocationNode && orgLocationNode.isConnected) {
1367
+ if (shadowRoot && orgLocationNode["s-en"] === "") {
1368
+ orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
1369
+ }
1370
+ orgLocationNode.parentNode.removeChild(orgLocationNode);
1371
+ if (!shadowRoot) {
1372
+ node["s-oo"] = parseInt(childRenderNode.$nodeId$);
408
1373
  }
409
1374
  }
410
1375
  plt.$orgLocNodes$.delete(orgLocationId);
411
- });
412
- if (shadowRoot) {
413
- shadowRootNodes.map((shadowRootNode) => {
414
- if (shadowRootNode) {
415
- shadowRoot.appendChild(shadowRootNode);
1376
+ }
1377
+ const hosts = [];
1378
+ const snLen = slottedNodes.length;
1379
+ let snIndex = 0;
1380
+ let slotGroup;
1381
+ let snGroupIdx;
1382
+ let snGroupLen;
1383
+ let slottedItem;
1384
+ for (snIndex; snIndex < snLen; snIndex++) {
1385
+ slotGroup = slottedNodes[snIndex];
1386
+ if (!slotGroup || !slotGroup.length) continue;
1387
+ snGroupLen = slotGroup.length;
1388
+ snGroupIdx = 0;
1389
+ for (snGroupIdx; snGroupIdx < snGroupLen; snGroupIdx++) {
1390
+ slottedItem = slotGroup[snGroupIdx];
1391
+ if (!hosts[slottedItem.hostId]) {
1392
+ hosts[slottedItem.hostId] = plt.$orgLocNodes$.get(slottedItem.hostId);
1393
+ }
1394
+ if (!hosts[slottedItem.hostId]) continue;
1395
+ const hostEle = hosts[slottedItem.hostId];
1396
+ if (!hostEle.shadowRoot || !shadowRoot) {
1397
+ slottedItem.slot["s-cr"] = hostEle["s-cr"];
1398
+ if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
1399
+ slottedItem.slot["s-cr"] = hostEle;
1400
+ } else {
1401
+ slottedItem.slot["s-cr"] = (hostEle.__childNodes || hostEle.childNodes)[0];
1402
+ }
1403
+ addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
1404
+ {
1405
+ patchSlottedNode(slottedItem.node);
1406
+ }
416
1407
  }
1408
+ if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
1409
+ hostEle.appendChild(slottedItem.node);
1410
+ }
1411
+ }
1412
+ }
1413
+ if (scopeId2 && slotNodes.length) {
1414
+ slotNodes.forEach((slot) => {
1415
+ slot.$elm$.parentElement.classList.add(scopeId2 + "-s");
417
1416
  });
418
1417
  }
1418
+ if (shadowRoot && !shadowRoot.childNodes.length) {
1419
+ let rnIdex = 0;
1420
+ const rnLen = shadowRootNodes.length;
1421
+ if (rnLen) {
1422
+ for (rnIdex; rnIdex < rnLen; rnIdex++) {
1423
+ shadowRoot.appendChild(shadowRootNodes[rnIdex]);
1424
+ }
1425
+ Array.from(hostElm.childNodes).forEach((node) => {
1426
+ if (typeof node["s-sn"] !== "string") {
1427
+ if (node.nodeType === 1 /* ElementNode */ && node.slot && node.hidden) {
1428
+ node.removeAttribute("hidden");
1429
+ } else if (node.nodeType === 8 /* CommentNode */ || node.nodeType === 3 /* TextNode */ && !node.wholeText.trim()) {
1430
+ node.parentNode.removeChild(node);
1431
+ }
1432
+ }
1433
+ });
1434
+ }
1435
+ }
1436
+ plt.$orgLocNodes$.delete(hostElm["s-id"]);
1437
+ hostRef.$hostElement$ = hostElm;
419
1438
  endHydrate();
420
1439
  };
421
- var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId) => {
1440
+ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId, slottedNodes = []) => {
422
1441
  let childNodeType;
423
1442
  let childIdSplt;
424
1443
  let childVNode;
425
1444
  let i2;
1445
+ const scopeId2 = hostElm["s-sc"];
426
1446
  if (node.nodeType === 1 /* ElementNode */) {
427
1447
  childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
428
1448
  if (childNodeType) {
429
1449
  childIdSplt = childNodeType.split(".");
430
1450
  if (childIdSplt[0] === hostId || childIdSplt[0] === "0") {
431
- childVNode = {
1451
+ childVNode = createSimpleVNode({
432
1452
  $flags$: 0,
433
1453
  $hostId$: childIdSplt[0],
434
1454
  $nodeId$: childIdSplt[1],
@@ -436,18 +1456,43 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
436
1456
  $index$: childIdSplt[3],
437
1457
  $tag$: node.tagName.toLowerCase(),
438
1458
  $elm$: node,
439
- $attrs$: null,
440
- $children$: null,
441
- $key$: null,
442
- $name$: null,
443
- $text$: null
444
- };
1459
+ // If we don't add the initial classes to the VNode, the first `vdom-render.ts` patch
1460
+ // won't try to reconcile them. Classes set on the node will be blown away.
1461
+ $attrs$: { class: node.className || "" }
1462
+ });
445
1463
  childRenderNodes.push(childVNode);
446
1464
  node.removeAttribute(HYDRATE_CHILD_ID);
447
1465
  if (!parentVNode.$children$) {
448
1466
  parentVNode.$children$ = [];
449
1467
  }
450
- parentVNode.$children$[childVNode.$index$] = childVNode;
1468
+ if (scopeId2) {
1469
+ node["s-si"] = scopeId2;
1470
+ childVNode.$attrs$.class += " " + scopeId2;
1471
+ }
1472
+ const slotName = childVNode.$elm$.getAttribute("s-sn");
1473
+ if (typeof slotName === "string") {
1474
+ if (childVNode.$tag$ === "slot-fb") {
1475
+ addSlot(
1476
+ slotName,
1477
+ childIdSplt[2],
1478
+ childVNode,
1479
+ node,
1480
+ parentVNode,
1481
+ childRenderNodes,
1482
+ slotNodes,
1483
+ shadowRootNodes,
1484
+ slottedNodes
1485
+ );
1486
+ if (scopeId2) {
1487
+ node.classList.add(scopeId2);
1488
+ }
1489
+ }
1490
+ childVNode.$elm$["s-sn"] = slotName;
1491
+ childVNode.$elm$.removeAttribute("s-sn");
1492
+ }
1493
+ if (childVNode.$index$ !== void 0) {
1494
+ parentVNode.$children$[childVNode.$index$] = childVNode;
1495
+ }
451
1496
  parentVNode = childVNode;
452
1497
  if (shadowRootNodes && childVNode.$depth$ === "0") {
453
1498
  shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
@@ -463,31 +1508,33 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
463
1508
  shadowRootNodes,
464
1509
  hostElm,
465
1510
  node.shadowRoot.childNodes[i2],
466
- hostId
1511
+ hostId,
1512
+ slottedNodes
467
1513
  );
468
1514
  }
469
1515
  }
470
- for (i2 = node.childNodes.length - 1; i2 >= 0; i2--) {
1516
+ const nonShadowNodes = node.__childNodes || node.childNodes;
1517
+ for (i2 = nonShadowNodes.length - 1; i2 >= 0; i2--) {
471
1518
  clientHydrate(
472
1519
  parentVNode,
473
1520
  childRenderNodes,
474
1521
  slotNodes,
475
1522
  shadowRootNodes,
476
1523
  hostElm,
477
- node.childNodes[i2],
478
- hostId
1524
+ nonShadowNodes[i2],
1525
+ hostId,
1526
+ slottedNodes
479
1527
  );
480
1528
  }
481
1529
  } else if (node.nodeType === 8 /* CommentNode */) {
482
1530
  childIdSplt = node.nodeValue.split(".");
483
1531
  if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
484
1532
  childNodeType = childIdSplt[0];
485
- childVNode = {
486
- $flags$: 0,
1533
+ childVNode = createSimpleVNode({
487
1534
  $hostId$: childIdSplt[1],
488
1535
  $nodeId$: childIdSplt[2],
489
1536
  $depth$: childIdSplt[3],
490
- $index$: childIdSplt[4],
1537
+ $index$: childIdSplt[4] || "0",
491
1538
  $elm$: node,
492
1539
  $attrs$: null,
493
1540
  $children$: null,
@@ -495,46 +1542,43 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
495
1542
  $name$: null,
496
1543
  $tag$: null,
497
1544
  $text$: null
498
- };
1545
+ });
499
1546
  if (childNodeType === TEXT_NODE_ID) {
500
- childVNode.$elm$ = node.nextSibling;
1547
+ childVNode.$elm$ = findCorrespondingNode(node, 3 /* TextNode */);
501
1548
  if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
502
1549
  childVNode.$text$ = childVNode.$elm$.textContent;
503
1550
  childRenderNodes.push(childVNode);
504
1551
  node.remove();
505
- if (!parentVNode.$children$) {
506
- parentVNode.$children$ = [];
1552
+ if (hostId === childVNode.$hostId$) {
1553
+ if (!parentVNode.$children$) {
1554
+ parentVNode.$children$ = [];
1555
+ }
1556
+ parentVNode.$children$[childVNode.$index$] = childVNode;
507
1557
  }
508
- parentVNode.$children$[childVNode.$index$] = childVNode;
509
1558
  if (shadowRootNodes && childVNode.$depth$ === "0") {
510
1559
  shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
511
1560
  }
512
1561
  }
1562
+ } else if (childNodeType === COMMENT_NODE_ID) {
1563
+ childVNode.$elm$ = findCorrespondingNode(node, 8 /* CommentNode */);
1564
+ if (childVNode.$elm$ && childVNode.$elm$.nodeType === 8 /* CommentNode */) {
1565
+ childRenderNodes.push(childVNode);
1566
+ node.remove();
1567
+ }
513
1568
  } else if (childVNode.$hostId$ === hostId) {
514
1569
  if (childNodeType === SLOT_NODE_ID) {
515
- childVNode.$tag$ = "slot";
516
- if (childIdSplt[5]) {
517
- node["s-sn"] = childVNode.$name$ = childIdSplt[5];
518
- } else {
519
- node["s-sn"] = "";
520
- }
521
- node["s-sr"] = true;
522
- if (shadowRootNodes) {
523
- childVNode.$elm$ = doc.createElement(childVNode.$tag$);
524
- if (childVNode.$name$) {
525
- childVNode.$elm$.setAttribute("name", childVNode.$name$);
526
- }
527
- node.parentNode.insertBefore(childVNode.$elm$, node);
528
- node.remove();
529
- if (childVNode.$depth$ === "0") {
530
- shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
531
- }
532
- }
533
- slotNodes.push(childVNode);
534
- if (!parentVNode.$children$) {
535
- parentVNode.$children$ = [];
536
- }
537
- parentVNode.$children$[childVNode.$index$] = childVNode;
1570
+ const slotName = node["s-sn"] = childIdSplt[5] || "";
1571
+ addSlot(
1572
+ slotName,
1573
+ childIdSplt[2],
1574
+ childVNode,
1575
+ node,
1576
+ parentVNode,
1577
+ childRenderNodes,
1578
+ slotNodes,
1579
+ shadowRootNodes,
1580
+ slottedNodes
1581
+ );
538
1582
  } else if (childNodeType === CONTENT_REF_ID) {
539
1583
  if (shadowRootNodes) {
540
1584
  node.remove();
@@ -550,18 +1594,28 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
550
1594
  vnode.$elm$ = node;
551
1595
  vnode.$index$ = "0";
552
1596
  parentVNode.$children$ = [vnode];
1597
+ } else {
1598
+ if (node.nodeType === 3 /* TextNode */ && !node.wholeText.trim()) {
1599
+ node.remove();
1600
+ }
553
1601
  }
1602
+ return parentVNode;
554
1603
  };
555
1604
  var initializeDocumentHydrate = (node, orgLocNodes) => {
556
1605
  if (node.nodeType === 1 /* ElementNode */) {
1606
+ const componentId = node[HYDRATE_ID] || node.getAttribute(HYDRATE_ID);
1607
+ if (componentId) {
1608
+ orgLocNodes.set(componentId, node);
1609
+ }
557
1610
  let i2 = 0;
558
1611
  if (node.shadowRoot) {
559
1612
  for (; i2 < node.shadowRoot.childNodes.length; i2++) {
560
1613
  initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
561
1614
  }
562
1615
  }
563
- for (i2 = 0; i2 < node.childNodes.length; i2++) {
564
- initializeDocumentHydrate(node.childNodes[i2], orgLocNodes);
1616
+ const nonShadowNodes = node.__childNodes || node.childNodes;
1617
+ for (i2 = 0; i2 < nonShadowNodes.length; i2++) {
1618
+ initializeDocumentHydrate(nonShadowNodes[i2], orgLocNodes);
565
1619
  }
566
1620
  } else if (node.nodeType === 8 /* CommentNode */) {
567
1621
  const childIdSplt = node.nodeValue.split(".");
@@ -572,18 +1626,110 @@ var initializeDocumentHydrate = (node, orgLocNodes) => {
572
1626
  }
573
1627
  }
574
1628
  };
1629
+ var createSimpleVNode = (vnode) => {
1630
+ const defaultVNode = {
1631
+ $flags$: 0,
1632
+ $hostId$: null,
1633
+ $nodeId$: null,
1634
+ $depth$: null,
1635
+ $index$: "0",
1636
+ $elm$: null,
1637
+ $attrs$: null,
1638
+ $children$: null,
1639
+ $key$: null,
1640
+ $name$: null,
1641
+ $tag$: null,
1642
+ $text$: null
1643
+ };
1644
+ return { ...defaultVNode, ...vnode };
1645
+ };
1646
+ function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNodes, slotNodes, shadowRootNodes, slottedNodes) {
1647
+ node["s-sr"] = true;
1648
+ childVNode.$name$ = slotName || null;
1649
+ childVNode.$tag$ = "slot";
1650
+ const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
1651
+ if (shadowRootNodes && win.document) {
1652
+ const slot = childVNode.$elm$ = win.document.createElement(childVNode.$tag$);
1653
+ if (childVNode.$name$) {
1654
+ childVNode.$elm$.setAttribute("name", slotName);
1655
+ }
1656
+ if (parentNodeId && parentNodeId !== childVNode.$hostId$) {
1657
+ parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
1658
+ } else {
1659
+ node.parentNode.insertBefore(childVNode.$elm$, node);
1660
+ }
1661
+ addSlottedNodes(slottedNodes, slotId, slotName, node, childVNode.$hostId$);
1662
+ node.remove();
1663
+ if (childVNode.$depth$ === "0") {
1664
+ shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
1665
+ }
1666
+ } else {
1667
+ const slot = childVNode.$elm$;
1668
+ const shouldMove = parentNodeId && parentNodeId !== childVNode.$hostId$ && parentVNode.$elm$.shadowRoot;
1669
+ addSlottedNodes(slottedNodes, slotId, slotName, node, shouldMove ? parentNodeId : childVNode.$hostId$);
1670
+ patchSlotNode(node);
1671
+ if (shouldMove) {
1672
+ parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
1673
+ }
1674
+ childRenderNodes.push(childVNode);
1675
+ }
1676
+ slotNodes.push(childVNode);
1677
+ if (!parentVNode.$children$) {
1678
+ parentVNode.$children$ = [];
1679
+ }
1680
+ parentVNode.$children$[childVNode.$index$] = childVNode;
1681
+ }
1682
+ var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) => {
1683
+ let slottedNode = slotNode.nextSibling;
1684
+ slottedNodes[slotNodeId] = slottedNodes[slotNodeId] || [];
1685
+ 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 */))) {
1686
+ slottedNode["s-sn"] = slotName;
1687
+ slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
1688
+ slottedNode = slottedNode.nextSibling;
1689
+ }
1690
+ };
1691
+ var findCorrespondingNode = (node, type) => {
1692
+ let sibling = node;
1693
+ do {
1694
+ sibling = sibling.nextSibling;
1695
+ } while (sibling && (sibling.nodeType !== type || !sibling.nodeValue));
1696
+ return sibling;
1697
+ };
1698
+ var createSupportsRuleRe = (selector) => {
1699
+ const safeSelector2 = escapeRegExpSpecialCharacters(selector);
1700
+ return new RegExp(
1701
+ // First capture group: match any context before the selector that's not inside @supports selector()
1702
+ // Using negative lookahead to avoid matching inside @supports selector(...) condition
1703
+ `(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${safeSelector2}))(${safeSelector2}\\b)`,
1704
+ "g"
1705
+ );
1706
+ };
1707
+ createSupportsRuleRe("::slotted");
1708
+ createSupportsRuleRe(":host");
1709
+ createSupportsRuleRe(":host-context");
575
1710
 
576
1711
  // src/runtime/mode.ts
577
1712
  var computeMode = (elm) => modeResolutionChain.map((h2) => h2(elm)).find((m) => !!m);
578
1713
  var setMode = (handler) => modeResolutionChain.push(handler);
579
1714
  var getMode = (ref) => getHostRef(ref).$modeName$;
580
1715
  var parsePropertyValue = (propValue, propType) => {
1716
+ if (typeof propValue === "string" && (propValue.startsWith("{") && propValue.endsWith("}") || propValue.startsWith("[") && propValue.endsWith("]"))) {
1717
+ try {
1718
+ propValue = JSON.parse(propValue);
1719
+ return propValue;
1720
+ } catch (e) {
1721
+ }
1722
+ }
1723
+ if (typeof propValue === "string" && propValue.startsWith(SERIALIZED_PREFIX)) {
1724
+ propValue = deserializeProperty(propValue);
1725
+ return propValue;
1726
+ }
581
1727
  if (propValue != null && !isComplexType(propValue)) {
582
1728
  if (propType & 4 /* Boolean */) {
583
1729
  return propValue === "false" ? false : propValue === "" || !!propValue;
584
1730
  }
585
1731
  if (propType & 2 /* Number */) {
586
- return parseFloat(propValue);
1732
+ return typeof propValue === "string" ? parseFloat(propValue) : typeof propValue === "number" ? propValue : NaN;
587
1733
  }
588
1734
  if (propType & 1 /* String */) {
589
1735
  return String(propValue);
@@ -632,7 +1778,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
632
1778
  var _a;
633
1779
  const scopeId2 = getScopeId(cmpMeta, mode);
634
1780
  const style = styles.get(scopeId2);
635
- styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
1781
+ if (!win.document) {
1782
+ return scopeId2;
1783
+ }
1784
+ styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
636
1785
  if (style) {
637
1786
  if (typeof style === "string") {
638
1787
  styleContainerNode = styleContainerNode.head || styleContainerNode;
@@ -645,23 +1794,39 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
645
1794
  if (styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
646
1795
  styleElm.innerHTML = style;
647
1796
  } else {
648
- styleElm = doc.createElement("style");
1797
+ styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || win.document.createElement("style");
649
1798
  styleElm.innerHTML = style;
650
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
1799
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
651
1800
  if (nonce != null) {
652
1801
  styleElm.setAttribute("nonce", nonce);
653
1802
  }
654
- const injectStyle = (
655
- /**
656
- * we render a scoped component
657
- */
658
- !(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) || /**
659
- * we are using shadow dom and render the style tag within the shadowRoot
660
- */
661
- cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD"
662
- );
663
- if (injectStyle) {
664
- styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
1803
+ if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
1804
+ if (styleContainerNode.nodeName === "HEAD") {
1805
+ const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
1806
+ const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
1807
+ styleContainerNode.insertBefore(
1808
+ styleElm,
1809
+ (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
1810
+ );
1811
+ } else if ("host" in styleContainerNode) {
1812
+ if (supportsConstructableStylesheets) {
1813
+ const stylesheet = new CSSStyleSheet();
1814
+ stylesheet.replaceSync(style);
1815
+ styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
1816
+ } else {
1817
+ const existingStyleContainer = styleContainerNode.querySelector("style");
1818
+ if (existingStyleContainer) {
1819
+ existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
1820
+ } else {
1821
+ styleContainerNode.prepend(styleElm);
1822
+ }
1823
+ }
1824
+ } else {
1825
+ styleContainerNode.append(styleElm);
1826
+ }
1827
+ }
1828
+ if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
1829
+ styleContainerNode.insertBefore(styleElm, null);
665
1830
  }
666
1831
  }
667
1832
  if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
@@ -687,131 +1852,177 @@ var attachStyles = (hostRef) => {
687
1852
  cmpMeta,
688
1853
  hostRef.$modeName$
689
1854
  );
690
- if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
1855
+ if (flags & 10 /* needsScopedEncapsulation */) {
691
1856
  elm["s-sc"] = scopeId2;
692
1857
  elm.classList.add(scopeId2 + "-h");
693
- if (flags & 2 /* scopedCssEncapsulation */) {
694
- elm.classList.add(scopeId2 + "-s");
695
- }
696
1858
  }
697
1859
  endAttachStyles();
698
1860
  };
699
1861
  var getScopeId = (cmp, mode) => "sc-" + (mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
700
- var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
701
- if (oldValue !== newValue) {
702
- let isProp = isMemberInElement(elm, memberName);
703
- let ln = memberName.toLowerCase();
704
- if (memberName === "class") {
705
- const classList = elm.classList;
706
- const oldClasses = parseClassList(oldValue);
707
- const newClasses = parseClassList(newValue);
1862
+ var convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{");
1863
+ var hydrateScopedToShadow = () => {
1864
+ if (!win.document) {
1865
+ return;
1866
+ }
1867
+ const styles2 = win.document.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
1868
+ let i2 = 0;
1869
+ for (; i2 < styles2.length; i2++) {
1870
+ registerStyle(styles2[i2].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles2[i2].innerHTML), true);
1871
+ }
1872
+ };
1873
+ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
1874
+ if (oldValue === newValue) {
1875
+ return;
1876
+ }
1877
+ let isProp = isMemberInElement(elm, memberName);
1878
+ let ln = memberName.toLowerCase();
1879
+ if (memberName === "class") {
1880
+ const classList = elm.classList;
1881
+ const oldClasses = parseClassList(oldValue);
1882
+ let newClasses = parseClassList(newValue);
1883
+ if (elm["s-si"] && initialRender) {
1884
+ newClasses.push(elm["s-si"]);
1885
+ oldClasses.forEach((c) => {
1886
+ if (c.startsWith(elm["s-si"])) newClasses.push(c);
1887
+ });
1888
+ newClasses = [...new Set(newClasses)];
1889
+ classList.add(...newClasses);
1890
+ } else {
708
1891
  classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
709
1892
  classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
710
- } else if (memberName === "style") {
711
- {
712
- for (const prop in oldValue) {
713
- if (!newValue || newValue[prop] == null) {
714
- if (prop.includes("-")) {
715
- elm.style.removeProperty(prop);
716
- } else {
717
- elm.style[prop] = "";
718
- }
719
- }
720
- }
721
- }
722
- for (const prop in newValue) {
723
- if (!oldValue || newValue[prop] !== oldValue[prop]) {
1893
+ }
1894
+ } else if (memberName === "style") {
1895
+ {
1896
+ for (const prop in oldValue) {
1897
+ if (!newValue || newValue[prop] == null) {
724
1898
  if (prop.includes("-")) {
725
- elm.style.setProperty(prop, newValue[prop]);
1899
+ elm.style.removeProperty(prop);
726
1900
  } else {
727
- elm.style[prop] = newValue[prop];
1901
+ elm.style[prop] = "";
728
1902
  }
729
1903
  }
730
1904
  }
731
- } else if (memberName === "key") ; else if (memberName === "ref") {
732
- if (newValue) {
733
- newValue(elm);
734
- }
735
- } else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
736
- if (memberName[2] === "-") {
737
- memberName = memberName.slice(3);
738
- } else if (isMemberInElement(win, ln)) {
739
- memberName = ln.slice(2);
740
- } else {
741
- memberName = ln[2] + memberName.slice(3);
742
- }
743
- if (oldValue || newValue) {
744
- const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
745
- memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
746
- if (oldValue) {
747
- plt.rel(elm, memberName, oldValue, capture);
748
- }
749
- if (newValue) {
750
- plt.ael(elm, memberName, newValue, capture);
1905
+ }
1906
+ for (const prop in newValue) {
1907
+ if (!oldValue || newValue[prop] !== oldValue[prop]) {
1908
+ if (prop.includes("-")) {
1909
+ elm.style.setProperty(prop, newValue[prop]);
1910
+ } else {
1911
+ elm.style[prop] = newValue[prop];
751
1912
  }
752
1913
  }
1914
+ }
1915
+ } else if (memberName === "key") ; else if (memberName === "ref") {
1916
+ if (newValue) {
1917
+ newValue(elm);
1918
+ }
1919
+ } else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
1920
+ if (memberName[2] === "-") {
1921
+ memberName = memberName.slice(3);
1922
+ } else if (isMemberInElement(win, ln)) {
1923
+ memberName = ln.slice(2);
753
1924
  } else {
754
- const isComplex = isComplexType(newValue);
755
- if ((isProp || isComplex && newValue !== null) && !isSvg) {
756
- try {
757
- if (!elm.tagName.includes("-")) {
758
- const n = newValue == null ? "" : newValue;
759
- if (memberName === "list") {
760
- isProp = false;
761
- } else if (oldValue == null || elm[memberName] != n) {
1925
+ memberName = ln[2] + memberName.slice(3);
1926
+ }
1927
+ if (oldValue || newValue) {
1928
+ const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
1929
+ memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
1930
+ if (oldValue) {
1931
+ plt.rel(elm, memberName, oldValue, capture);
1932
+ }
1933
+ if (newValue) {
1934
+ plt.ael(elm, memberName, newValue, capture);
1935
+ }
1936
+ }
1937
+ } else {
1938
+ const isComplex = isComplexType(newValue);
1939
+ if ((isProp || isComplex && newValue !== null) && !isSvg) {
1940
+ try {
1941
+ if (!elm.tagName.includes("-")) {
1942
+ const n = newValue == null ? "" : newValue;
1943
+ if (memberName === "list") {
1944
+ isProp = false;
1945
+ } else if (oldValue == null || elm[memberName] != n) {
1946
+ if (typeof elm.__lookupSetter__(memberName) === "function") {
762
1947
  elm[memberName] = n;
1948
+ } else {
1949
+ elm.setAttribute(memberName, n);
763
1950
  }
764
- } else {
765
- elm[memberName] = newValue;
766
1951
  }
767
- } catch (e) {
1952
+ } else if (elm[memberName] !== newValue) {
1953
+ elm[memberName] = newValue;
768
1954
  }
1955
+ } catch (e) {
769
1956
  }
770
- let xlink = false;
771
- {
772
- if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
773
- memberName = ln;
774
- xlink = true;
775
- }
1957
+ }
1958
+ let xlink = false;
1959
+ {
1960
+ if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
1961
+ memberName = ln;
1962
+ xlink = true;
776
1963
  }
777
- if (newValue == null || newValue === false) {
778
- if (newValue !== false || elm.getAttribute(memberName) === "") {
779
- if (xlink) {
780
- elm.removeAttributeNS(XLINK_NS, memberName);
781
- } else {
782
- elm.removeAttribute(memberName);
783
- }
784
- }
785
- } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
786
- newValue = newValue === true ? "" : newValue;
1964
+ }
1965
+ if (newValue == null || newValue === false) {
1966
+ if (newValue !== false || elm.getAttribute(memberName) === "") {
787
1967
  if (xlink) {
788
- elm.setAttributeNS(XLINK_NS, memberName, newValue);
1968
+ elm.removeAttributeNS(XLINK_NS, memberName);
789
1969
  } else {
790
- elm.setAttribute(memberName, newValue);
1970
+ elm.removeAttribute(memberName);
791
1971
  }
792
1972
  }
1973
+ } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {
1974
+ newValue = newValue === true ? "" : newValue;
1975
+ if (xlink) {
1976
+ elm.setAttributeNS(XLINK_NS, memberName, newValue);
1977
+ } else {
1978
+ elm.setAttribute(memberName, newValue);
1979
+ }
793
1980
  }
794
1981
  }
795
1982
  };
796
1983
  var parseClassListRegex = /\s/;
797
- var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
1984
+ var parseClassList = (value) => {
1985
+ if (typeof value === "object" && value && "baseVal" in value) {
1986
+ value = value.baseVal;
1987
+ }
1988
+ if (!value || typeof value !== "string") {
1989
+ return [];
1990
+ }
1991
+ return value.split(parseClassListRegex);
1992
+ };
798
1993
  var CAPTURE_EVENT_SUFFIX = "Capture";
799
1994
  var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
800
1995
 
801
1996
  // src/runtime/vdom/update-element.ts
802
- var updateElement = (oldVnode, newVnode, isSvgMode2) => {
1997
+ var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
803
1998
  const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
804
- const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
805
- const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
1999
+ const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
2000
+ const newVnodeAttrs = newVnode.$attrs$ || {};
806
2001
  {
807
2002
  for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
808
2003
  if (!(memberName in newVnodeAttrs)) {
809
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
2004
+ setAccessor(
2005
+ elm,
2006
+ memberName,
2007
+ oldVnodeAttrs[memberName],
2008
+ void 0,
2009
+ isSvgMode2,
2010
+ newVnode.$flags$,
2011
+ isInitialRender
2012
+ );
810
2013
  }
811
2014
  }
812
2015
  }
813
2016
  for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
814
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
2017
+ setAccessor(
2018
+ elm,
2019
+ memberName,
2020
+ oldVnodeAttrs[memberName],
2021
+ newVnodeAttrs[memberName],
2022
+ isSvgMode2,
2023
+ newVnode.$flags$,
2024
+ isInitialRender
2025
+ );
815
2026
  }
816
2027
  };
817
2028
  function sortedAttrNames(attrNames) {
@@ -832,7 +2043,7 @@ var useNativeShadowDom = false;
832
2043
  var checkSlotFallbackVisibility = false;
833
2044
  var checkSlotRelocate = false;
834
2045
  var isSvgMode = false;
835
- var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
2046
+ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
836
2047
  var _a;
837
2048
  const newVNode2 = newParentVNode.$children$[childIndex];
838
2049
  let i2 = 0;
@@ -842,9 +2053,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
842
2053
  if (!useNativeShadowDom) {
843
2054
  checkSlotRelocate = true;
844
2055
  if (newVNode2.$tag$ === "slot") {
845
- if (scopeId) {
846
- parentElm.classList.add(scopeId + "-s");
847
- }
848
2056
  newVNode2.$flags$ |= newVNode2.$children$ ? (
849
2057
  // slot element has fallback content
850
2058
  // still create an element that "mocks" the slot element
@@ -858,14 +2066,22 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
858
2066
  }
859
2067
  }
860
2068
  if (newVNode2.$text$ !== null) {
861
- elm = newVNode2.$elm$ = doc.createTextNode(newVNode2.$text$);
2069
+ elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
862
2070
  } else if (newVNode2.$flags$ & 1 /* isSlotReference */) {
863
- elm = newVNode2.$elm$ = doc.createTextNode("");
2071
+ elm = newVNode2.$elm$ = win.document.createTextNode("");
2072
+ {
2073
+ updateElement(null, newVNode2, isSvgMode);
2074
+ }
864
2075
  } else {
865
2076
  if (!isSvgMode) {
866
2077
  isSvgMode = newVNode2.$tag$ === "svg";
867
2078
  }
868
- elm = newVNode2.$elm$ = doc.createElementNS(
2079
+ if (!win.document) {
2080
+ throw new Error(
2081
+ "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."
2082
+ );
2083
+ }
2084
+ elm = newVNode2.$elm$ = win.document.createElementNS(
869
2085
  isSvgMode ? SVG_NS : HTML_NS,
870
2086
  !useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
871
2087
  ) ;
@@ -875,17 +2091,12 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
875
2091
  {
876
2092
  updateElement(null, newVNode2, isSvgMode);
877
2093
  }
878
- const rootNode = elm.getRootNode();
879
- const isElementWithinShadowRoot = !rootNode.querySelector("body");
880
- if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
2094
+ if (isDef(scopeId) && elm["s-si"] !== scopeId) {
881
2095
  elm.classList.add(elm["s-si"] = scopeId);
882
2096
  }
883
- {
884
- updateElementScopeIds(elm, parentElm);
885
- }
886
2097
  if (newVNode2.$children$) {
887
2098
  for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
888
- childNode = createElm(oldParentVNode, newVNode2, i2, elm);
2099
+ childNode = createElm(oldParentVNode, newVNode2, i2);
889
2100
  if (childNode) {
890
2101
  elm.appendChild(childNode);
891
2102
  }
@@ -906,12 +2117,16 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
906
2117
  elm["s-cr"] = contentRef;
907
2118
  elm["s-sn"] = newVNode2.$name$ || "";
908
2119
  elm["s-rf"] = (_a = newVNode2.$attrs$) == null ? void 0 : _a.ref;
2120
+ patchSlotNode(elm);
909
2121
  oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
910
2122
  if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
911
2123
  {
912
2124
  relocateToHostRoot(oldParentVNode.$elm$);
913
2125
  }
914
2126
  }
2127
+ {
2128
+ addRemoveSlotScopedClass(contentRef, elm, newParentVNode.$elm$, oldParentVNode == null ? void 0 : oldParentVNode.$elm$);
2129
+ }
915
2130
  }
916
2131
  }
917
2132
  return elm;
@@ -920,8 +2135,12 @@ var relocateToHostRoot = (parentElm) => {
920
2135
  plt.$flags$ |= 1 /* isTmpDisconnected */;
921
2136
  const host = parentElm.closest(hostTagName.toLowerCase());
922
2137
  if (host != null) {
923
- const contentRefNode = Array.from(host.childNodes).find((ref) => ref["s-cr"]);
924
- const childNodeArray = Array.from(parentElm.childNodes);
2138
+ const contentRefNode = Array.from(host.__childNodes || host.childNodes).find(
2139
+ (ref) => ref["s-cr"]
2140
+ );
2141
+ const childNodeArray = Array.from(
2142
+ parentElm.__childNodes || parentElm.childNodes
2143
+ );
925
2144
  for (const childNode of contentRefNode ? childNodeArray.reverse() : childNodeArray) {
926
2145
  if (childNode["s-sh"] != null) {
927
2146
  insertBefore(host, childNode, contentRefNode != null ? contentRefNode : null);
@@ -930,11 +2149,11 @@ var relocateToHostRoot = (parentElm) => {
930
2149
  }
931
2150
  }
932
2151
  }
933
- plt.$flags$ &= ~1 /* isTmpDisconnected */;
2152
+ plt.$flags$ &= -2 /* isTmpDisconnected */;
934
2153
  };
935
2154
  var putBackInOriginalLocation = (parentElm, recursive) => {
936
2155
  plt.$flags$ |= 1 /* isTmpDisconnected */;
937
- const oldSlotChildNodes = Array.from(parentElm.childNodes);
2156
+ const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
938
2157
  if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
939
2158
  let node = parentElm;
940
2159
  while (node = node.nextSibling) {
@@ -946,7 +2165,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
946
2165
  for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
947
2166
  const childNode = oldSlotChildNodes[i2];
948
2167
  if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
949
- insertBefore(parentReferenceNode(childNode), childNode, referenceNode(childNode));
2168
+ insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
950
2169
  childNode["s-ol"].remove();
951
2170
  childNode["s-ol"] = void 0;
952
2171
  childNode["s-sh"] = void 0;
@@ -956,7 +2175,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
956
2175
  putBackInOriginalLocation(childNode, recursive);
957
2176
  }
958
2177
  }
959
- plt.$flags$ &= ~1 /* isTmpDisconnected */;
2178
+ plt.$flags$ &= -2 /* isTmpDisconnected */;
960
2179
  };
961
2180
  var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
962
2181
  let containerElm = parentElm["s-cr"] && parentElm["s-cr"].parentNode || parentElm;
@@ -966,7 +2185,7 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
966
2185
  }
967
2186
  for (; startIdx <= endIdx; ++startIdx) {
968
2187
  if (vnodes[startIdx]) {
969
- childNode = createElm(null, parentVNode, startIdx, parentElm);
2188
+ childNode = createElm(null, parentVNode, startIdx);
970
2189
  if (childNode) {
971
2190
  vnodes[startIdx].$elm$ = childNode;
972
2191
  insertBefore(containerElm, childNode, referenceNode(before) );
@@ -1053,7 +2272,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
1053
2272
  if (idxInOld >= 0) {
1054
2273
  elmToMove = oldCh[idxInOld];
1055
2274
  if (elmToMove.$tag$ !== newStartVnode.$tag$) {
1056
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld, parentElm);
2275
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
1057
2276
  } else {
1058
2277
  patch(elmToMove, newStartVnode, isInitialRender);
1059
2278
  oldCh[idxInOld] = void 0;
@@ -1061,12 +2280,16 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
1061
2280
  }
1062
2281
  newStartVnode = newCh[++newStartIdx];
1063
2282
  } else {
1064
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx, parentElm);
2283
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
1065
2284
  newStartVnode = newCh[++newStartIdx];
1066
2285
  }
1067
2286
  if (node) {
1068
2287
  {
1069
- insertBefore(parentReferenceNode(oldStartVnode.$elm$), node, referenceNode(oldStartVnode.$elm$));
2288
+ insertBefore(
2289
+ referenceNode(oldStartVnode.$elm$).parentNode,
2290
+ node,
2291
+ referenceNode(oldStartVnode.$elm$)
2292
+ );
1070
2293
  }
1071
2294
  }
1072
2295
  }
@@ -1087,28 +2310,19 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
1087
2310
  var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
1088
2311
  if (leftVNode.$tag$ === rightVNode.$tag$) {
1089
2312
  if (leftVNode.$tag$ === "slot") {
1090
- if (
1091
- // The component gets hydrated and no VDOM has been initialized.
1092
- // Here the comparison can't happen as $name$ property is not set for `leftNode`.
1093
- "$nodeId$" in leftVNode && isInitialRender && // `leftNode` is not from type HTMLComment which would cause many
1094
- // hydration comments to be removed
1095
- leftVNode.$elm$.nodeType !== 8
1096
- ) {
1097
- return false;
1098
- }
1099
2313
  return leftVNode.$name$ === rightVNode.$name$;
1100
2314
  }
1101
2315
  if (!isInitialRender) {
1102
2316
  return leftVNode.$key$ === rightVNode.$key$;
1103
2317
  }
2318
+ if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
2319
+ leftVNode.$key$ = rightVNode.$key$;
2320
+ }
1104
2321
  return true;
1105
2322
  }
1106
2323
  return false;
1107
2324
  };
1108
- var referenceNode = (node) => {
1109
- return node && node["s-ol"] || node;
1110
- };
1111
- var parentReferenceNode = (node) => (node["s-ol"] ? node["s-ol"] : node).parentNode;
2325
+ var referenceNode = (node) => node && node["s-ol"] || node;
1112
2326
  var patch = (oldVNode, newVNode2, isInitialRender = false) => {
1113
2327
  const elm = newVNode2.$elm$ = oldVNode.$elm$;
1114
2328
  const oldChildren = oldVNode.$children$;
@@ -1126,9 +2340,8 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
1126
2340
  newVNode2.$elm$["s-sn"] = newVNode2.$name$ || "";
1127
2341
  relocateToHostRoot(newVNode2.$elm$.parentElement);
1128
2342
  }
1129
- } else {
1130
- updateElement(oldVNode, newVNode2, isSvgMode);
1131
2343
  }
2344
+ updateElement(oldVNode, newVNode2, isSvgMode, isInitialRender);
1132
2345
  }
1133
2346
  if (oldChildren !== null && newChildren !== null) {
1134
2347
  updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
@@ -1152,41 +2365,15 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
1152
2365
  elm.data = text;
1153
2366
  }
1154
2367
  };
1155
- var updateFallbackSlotVisibility = (elm) => {
1156
- const childNodes = elm.childNodes;
1157
- for (const childNode of childNodes) {
1158
- if (childNode.nodeType === 1 /* ElementNode */) {
1159
- if (childNode["s-sr"]) {
1160
- const slotName = childNode["s-sn"];
1161
- childNode.hidden = false;
1162
- for (const siblingNode of childNodes) {
1163
- if (siblingNode !== childNode) {
1164
- if (siblingNode["s-hn"] !== childNode["s-hn"] || slotName !== "") {
1165
- if (siblingNode.nodeType === 1 /* ElementNode */ && (slotName === siblingNode.getAttribute("slot") || slotName === siblingNode["s-sn"]) || siblingNode.nodeType === 3 /* TextNode */ && slotName === siblingNode["s-sn"]) {
1166
- childNode.hidden = true;
1167
- break;
1168
- }
1169
- } else {
1170
- if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
1171
- childNode.hidden = true;
1172
- break;
1173
- }
1174
- }
1175
- }
1176
- }
1177
- }
1178
- updateFallbackSlotVisibility(childNode);
1179
- }
1180
- }
1181
- };
1182
2368
  var relocateNodes = [];
1183
2369
  var markSlotContentForRelocation = (elm) => {
1184
2370
  let node;
1185
2371
  let hostContentNodes;
1186
2372
  let j;
1187
- for (const childNode of elm.childNodes) {
2373
+ const children = elm.__childNodes || elm.childNodes;
2374
+ for (const childNode of children) {
1188
2375
  if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
1189
- hostContentNodes = node.parentNode.childNodes;
2376
+ hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
1190
2377
  const slotName = childNode["s-sn"];
1191
2378
  for (j = hostContentNodes.length - 1; j >= 0; j--) {
1192
2379
  node = hostContentNodes[j];
@@ -1228,21 +2415,6 @@ var markSlotContentForRelocation = (elm) => {
1228
2415
  }
1229
2416
  }
1230
2417
  };
1231
- var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
1232
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1233
- if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
1234
- return true;
1235
- }
1236
- if (nodeToRelocate.getAttribute("slot") === slotName) {
1237
- return true;
1238
- }
1239
- return false;
1240
- }
1241
- if (nodeToRelocate["s-sn"] === slotName) {
1242
- return true;
1243
- }
1244
- return slotName === "";
1245
- };
1246
2418
  var nullifyVNodeRefs = (vNode) => {
1247
2419
  {
1248
2420
  vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
@@ -1250,44 +2422,51 @@ var nullifyVNodeRefs = (vNode) => {
1250
2422
  }
1251
2423
  };
1252
2424
  var insertBefore = (parent, newNode, reference) => {
1253
- const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
1254
- {
1255
- updateElementScopeIds(newNode, parent);
1256
- }
1257
- return inserted;
1258
- };
1259
- var findScopeIds = (element) => {
1260
- const scopeIds = [];
1261
- if (element) {
1262
- scopeIds.push(
1263
- ...element["s-scs"] || [],
1264
- element["s-si"],
1265
- element["s-sc"],
1266
- ...findScopeIds(element.parentElement)
1267
- );
2425
+ if (typeof newNode["s-sn"] === "string" && !!newNode["s-sr"] && !!newNode["s-cr"]) {
2426
+ addRemoveSlotScopedClass(newNode["s-cr"], newNode, parent, newNode.parentElement);
2427
+ } else if (typeof newNode["s-sn"] === "string") {
2428
+ if (parent.getRootNode().nodeType !== 11 /* DOCUMENT_FRAGMENT_NODE */) {
2429
+ patchParentNode(newNode);
2430
+ }
2431
+ parent.insertBefore(newNode, reference);
2432
+ const { slotNode } = findSlotFromSlottedNode(newNode);
2433
+ if (slotNode) dispatchSlotChangeEvent(slotNode);
2434
+ return newNode;
2435
+ }
2436
+ if (parent.__insertBefore) {
2437
+ return parent.__insertBefore(newNode, reference);
2438
+ } else {
2439
+ return parent == null ? void 0 : parent.insertBefore(newNode, reference);
1268
2440
  }
1269
- return scopeIds;
1270
2441
  };
1271
- var updateElementScopeIds = (element, parent, iterateChildNodes = false) => {
1272
- var _a;
1273
- if (element && parent && element.nodeType === 1 /* ElementNode */) {
1274
- const scopeIds = new Set(findScopeIds(parent).filter(Boolean));
1275
- if (scopeIds.size) {
1276
- (_a = element.classList) == null ? void 0 : _a.add(...element["s-scs"] = [...scopeIds]);
1277
- if (element["s-ol"] || iterateChildNodes) {
1278
- for (const childNode of Array.from(element.childNodes)) {
1279
- updateElementScopeIds(childNode, element, true);
2442
+ function addRemoveSlotScopedClass(reference, slotNode, newParent, oldParent) {
2443
+ var _a, _b;
2444
+ let scopeId2;
2445
+ if (reference && typeof slotNode["s-sn"] === "string" && !!slotNode["s-sr"] && reference.parentNode && reference.parentNode["s-sc"] && (scopeId2 = slotNode["s-si"] || reference.parentNode["s-sc"])) {
2446
+ const scopeName = slotNode["s-sn"];
2447
+ const hostName = slotNode["s-hn"];
2448
+ (_a = newParent.classList) == null ? void 0 : _a.add(scopeId2 + "-s");
2449
+ if (oldParent && ((_b = oldParent.classList) == null ? void 0 : _b.contains(scopeId2 + "-s"))) {
2450
+ let child = (oldParent.__childNodes || oldParent.childNodes)[0];
2451
+ let found = false;
2452
+ while (child) {
2453
+ if (child["s-sn"] !== scopeName && child["s-hn"] === hostName && !!child["s-sr"]) {
2454
+ found = true;
2455
+ break;
1280
2456
  }
2457
+ child = child.nextSibling;
1281
2458
  }
2459
+ if (!found) oldParent.classList.remove(scopeId2 + "-s");
1282
2460
  }
1283
2461
  }
1284
- };
2462
+ }
1285
2463
  var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1286
2464
  var _a, _b, _c, _d, _e;
1287
2465
  const hostElm = hostRef.$hostElement$;
1288
2466
  const cmpMeta = hostRef.$cmpMeta$;
1289
2467
  const oldVNode = hostRef.$vnode$ || newVNode(null, null);
1290
- const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
2468
+ const isHostElement = isHost(renderFnResults);
2469
+ const rootVnode = isHostElement ? renderFnResults : h(null, null, renderFnResults);
1291
2470
  hostTagName = hostElm.tagName;
1292
2471
  if (cmpMeta.$attrsToReflect$) {
1293
2472
  rootVnode.$attrs$ = rootVnode.$attrs$ || {};
@@ -1309,7 +2488,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1309
2488
  {
1310
2489
  scopeId = hostElm["s-sc"];
1311
2490
  }
1312
- useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
2491
+ useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
1313
2492
  {
1314
2493
  contentRef = hostElm["s-cr"];
1315
2494
  checkSlotFallbackVisibility = false;
@@ -1321,8 +2500,8 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1321
2500
  markSlotContentForRelocation(rootVnode.$elm$);
1322
2501
  for (const relocateData of relocateNodes) {
1323
2502
  const nodeToRelocate = relocateData.$nodeToRelocate$;
1324
- if (!nodeToRelocate["s-ol"]) {
1325
- const orgLocationNode = doc.createTextNode("");
2503
+ if (!nodeToRelocate["s-ol"] && win.document) {
2504
+ const orgLocationNode = win.document.createTextNode("");
1326
2505
  orgLocationNode["s-nr"] = nodeToRelocate;
1327
2506
  insertBefore(nodeToRelocate.parentNode, nodeToRelocate["s-ol"] = orgLocationNode, nodeToRelocate);
1328
2507
  }
@@ -1333,11 +2512,11 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1333
2512
  if (slotRefNode) {
1334
2513
  const parentNodeRef = slotRefNode.parentNode;
1335
2514
  let insertBeforeNode = slotRefNode.nextSibling;
1336
- if (insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */) {
2515
+ if ((insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */)) {
1337
2516
  let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
1338
2517
  while (orgLocationNode) {
1339
2518
  let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
1340
- if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === refNode.parentNode) {
2519
+ if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === (refNode.__parentNode || refNode.parentNode)) {
1341
2520
  refNode = refNode.nextSibling;
1342
2521
  while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
1343
2522
  refNode = refNode == null ? void 0 : refNode.nextSibling;
@@ -1350,15 +2529,17 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1350
2529
  orgLocationNode = orgLocationNode.previousSibling;
1351
2530
  }
1352
2531
  }
1353
- if (!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode || nodeToRelocate.nextSibling !== insertBeforeNode) {
2532
+ const parent = nodeToRelocate.__parentNode || nodeToRelocate.parentNode;
2533
+ const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
2534
+ if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
1354
2535
  if (nodeToRelocate !== insertBeforeNode) {
1355
2536
  insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
1356
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
2537
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
1357
2538
  nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
1358
2539
  }
1359
2540
  }
1360
2541
  }
1361
- nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](nodeToRelocate);
2542
+ nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](slotRefNode);
1362
2543
  } else {
1363
2544
  if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1364
2545
  if (isInitialLoad) {
@@ -1372,11 +2553,12 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1372
2553
  if (checkSlotFallbackVisibility) {
1373
2554
  updateFallbackSlotVisibility(rootVnode.$elm$);
1374
2555
  }
1375
- plt.$flags$ &= ~1 /* isTmpDisconnected */;
2556
+ plt.$flags$ &= -2 /* isTmpDisconnected */;
1376
2557
  relocateNodes.length = 0;
1377
2558
  }
1378
2559
  if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
1379
- for (const childNode of rootVnode.$elm$.childNodes) {
2560
+ const children = rootVnode.$elm$.__childNodes || rootVnode.$elm$.childNodes;
2561
+ for (const childNode of children) {
1380
2562
  if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
1381
2563
  if (isInitialLoad && childNode["s-ih"] == null) {
1382
2564
  childNode["s-ih"] = (_e = childNode.hidden) != null ? _e : false;
@@ -1391,7 +2573,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1391
2573
  // src/runtime/update-component.ts
1392
2574
  var attachToAncestor = (hostRef, ancestorComponent) => {
1393
2575
  if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
1394
- ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
2576
+ const index = ancestorComponent["s-p"].push(
2577
+ new Promise(
2578
+ (r) => hostRef.$onRenderResolve$ = () => {
2579
+ ancestorComponent["s-p"].splice(index - 1, 1);
2580
+ r();
2581
+ }
2582
+ )
2583
+ );
1395
2584
  }
1396
2585
  };
1397
2586
  var scheduleUpdate = (hostRef, isInitialLoad) => {
@@ -1420,17 +2609,15 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
1420
2609
  {
1421
2610
  hostRef.$flags$ |= 256 /* isListenReady */;
1422
2611
  if (hostRef.$queuedListeners$) {
1423
- hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
2612
+ hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
1424
2613
  hostRef.$queuedListeners$ = void 0;
1425
2614
  }
1426
2615
  }
1427
- {
1428
- maybePromise = safeCall(instance, "componentWillLoad");
1429
- }
1430
- }
1431
- {
1432
- maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender"));
2616
+ maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
2617
+ } else {
2618
+ maybePromise = safeCall(instance, "componentWillUpdate", void 0, elm);
1433
2619
  }
2620
+ maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
1434
2621
  endSchedule();
1435
2622
  return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
1436
2623
  };
@@ -1473,7 +2660,7 @@ var callRender = (hostRef, instance, elm, isInitialLoad) => {
1473
2660
  try {
1474
2661
  instance = instance.render && instance.render();
1475
2662
  {
1476
- hostRef.$flags$ &= ~16 /* isQueuedForUpdate */;
2663
+ hostRef.$flags$ &= -17 /* isQueuedForUpdate */;
1477
2664
  }
1478
2665
  {
1479
2666
  hostRef.$flags$ |= 2 /* hasRendered */;
@@ -1496,17 +2683,13 @@ var postUpdateComponent = (hostRef) => {
1496
2683
  const endPostUpdate = createTime("postUpdate", tagName);
1497
2684
  const instance = hostRef.$lazyInstance$ ;
1498
2685
  const ancestorComponent = hostRef.$ancestorComponent$;
1499
- {
1500
- safeCall(instance, "componentDidRender");
1501
- }
2686
+ safeCall(instance, "componentDidRender", void 0, elm);
1502
2687
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
1503
2688
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
1504
2689
  {
1505
2690
  addHydratedFlag(elm);
1506
2691
  }
1507
- {
1508
- safeCall(instance, "componentDidLoad");
1509
- }
2692
+ safeCall(instance, "componentDidLoad", void 0, elm);
1510
2693
  endPostUpdate();
1511
2694
  {
1512
2695
  hostRef.$onReadyResolve$(elm);
@@ -1515,9 +2698,7 @@ var postUpdateComponent = (hostRef) => {
1515
2698
  }
1516
2699
  }
1517
2700
  } else {
1518
- {
1519
- safeCall(instance, "componentDidUpdate");
1520
- }
2701
+ safeCall(instance, "componentDidUpdate", void 0, elm);
1521
2702
  endPostUpdate();
1522
2703
  }
1523
2704
  {
@@ -1531,7 +2712,7 @@ var postUpdateComponent = (hostRef) => {
1531
2712
  if (hostRef.$flags$ & 512 /* needsRerender */) {
1532
2713
  nextTick(() => scheduleUpdate(hostRef, false));
1533
2714
  }
1534
- hostRef.$flags$ &= ~(4 /* isWaitingForChildren */ | 512 /* needsRerender */);
2715
+ hostRef.$flags$ &= -517;
1535
2716
  }
1536
2717
  };
1537
2718
  var forceUpdate = (ref) => {
@@ -1545,17 +2726,14 @@ var forceUpdate = (ref) => {
1545
2726
  }
1546
2727
  };
1547
2728
  var appDidLoad = (who) => {
1548
- {
1549
- addHydratedFlag(doc.documentElement);
1550
- }
1551
2729
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
1552
2730
  };
1553
- var safeCall = (instance, method, arg) => {
2731
+ var safeCall = (instance, method, arg, elm) => {
1554
2732
  if (instance && instance[method]) {
1555
2733
  try {
1556
2734
  return instance[method](arg);
1557
2735
  } catch (e) {
1558
- consoleError(e);
2736
+ consoleError(e, elm);
1559
2737
  }
1560
2738
  }
1561
2739
  return void 0;
@@ -1571,7 +2749,7 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
1571
2749
  const hostRef = getHostRef(ref);
1572
2750
  if (!hostRef) {
1573
2751
  throw new Error(
1574
- `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).`
2752
+ `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).`
1575
2753
  );
1576
2754
  }
1577
2755
  const elm = hostRef.$hostElement$ ;
@@ -1597,6 +2775,11 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
1597
2775
  }
1598
2776
  }
1599
2777
  if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
2778
+ if (instance.componentShouldUpdate) {
2779
+ if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
2780
+ return;
2781
+ }
2782
+ }
1600
2783
  scheduleUpdate(hostRef, false);
1601
2784
  }
1602
2785
  }
@@ -1614,15 +2797,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1614
2797
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
1615
2798
  members.map(([memberName, [memberFlags]]) => {
1616
2799
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
2800
+ const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
2801
+ if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
2802
+ if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
2803
+ if (flags & 1 /* isElementConstructor */ || !origGetter) {
2804
+ Object.defineProperty(prototype, memberName, {
2805
+ get() {
2806
+ {
2807
+ if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
2808
+ return getValue(this, memberName);
2809
+ }
2810
+ const ref = getHostRef(this);
2811
+ const instance = ref ? ref.$lazyInstance$ : prototype;
2812
+ if (!instance) return;
2813
+ return instance[memberName];
2814
+ }
2815
+ },
2816
+ configurable: true,
2817
+ enumerable: true
2818
+ });
2819
+ }
1617
2820
  Object.defineProperty(prototype, memberName, {
1618
- get() {
1619
- return getValue(this, memberName);
1620
- },
1621
2821
  set(newValue) {
1622
- setValue(this, memberName, newValue, cmpMeta);
1623
- },
1624
- configurable: true,
1625
- enumerable: true
2822
+ const ref = getHostRef(this);
2823
+ if (origSetter) {
2824
+ const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
2825
+ if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
2826
+ newValue = ref.$instanceValues$.get(memberName);
2827
+ } else if (!ref.$instanceValues$.get(memberName) && currentValue) {
2828
+ ref.$instanceValues$.set(memberName, currentValue);
2829
+ }
2830
+ origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
2831
+ newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
2832
+ setValue(this, memberName, newValue, cmpMeta);
2833
+ return;
2834
+ }
2835
+ {
2836
+ if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
2837
+ setValue(this, memberName, newValue, cmpMeta);
2838
+ if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
2839
+ ref.$onReadyPromise$.then(() => {
2840
+ if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
2841
+ ref.$lazyInstance$[memberName] = newValue;
2842
+ }
2843
+ });
2844
+ }
2845
+ return;
2846
+ }
2847
+ const setterSetVal = () => {
2848
+ const currentValue = ref.$lazyInstance$[memberName];
2849
+ if (!ref.$instanceValues$.get(memberName) && currentValue) {
2850
+ ref.$instanceValues$.set(memberName, currentValue);
2851
+ }
2852
+ ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
2853
+ setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
2854
+ };
2855
+ if (ref.$lazyInstance$) {
2856
+ setterSetVal();
2857
+ } else {
2858
+ ref.$onReadyPromise$.then(() => setterSetVal());
2859
+ }
2860
+ }
2861
+ }
1626
2862
  });
1627
2863
  } else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
1628
2864
  Object.defineProperty(prototype, memberName, {
@@ -1643,7 +2879,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1643
2879
  plt.jmp(() => {
1644
2880
  var _a2;
1645
2881
  const propName = attrNameToPropName.get(attrName);
1646
- if (this.hasOwnProperty(propName)) {
2882
+ if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
1647
2883
  newValue = this[propName];
1648
2884
  delete this[propName];
1649
2885
  } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
@@ -1663,7 +2899,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1663
2899
  }
1664
2900
  return;
1665
2901
  }
1666
- this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
2902
+ const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
2903
+ newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
2904
+ if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
2905
+ this[propName] = newValue;
2906
+ }
1667
2907
  });
1668
2908
  };
1669
2909
  Cstr.observedAttributes = Array.from(
@@ -1692,7 +2932,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1692
2932
  hostRef.$flags$ |= 32 /* hasInitializedComponent */;
1693
2933
  const bundleId = cmpMeta.$lazyBundleId$;
1694
2934
  if (bundleId) {
1695
- const CstrImport = loadModule(cmpMeta);
2935
+ const CstrImport = loadModule(cmpMeta, hostRef);
1696
2936
  if (CstrImport && "then" in CstrImport) {
1697
2937
  const endLoad = uniqueTime();
1698
2938
  Cstr = await CstrImport;
@@ -1717,16 +2957,16 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1717
2957
  try {
1718
2958
  new Cstr(hostRef);
1719
2959
  } catch (e) {
1720
- consoleError(e);
2960
+ consoleError(e, elm);
1721
2961
  }
1722
2962
  {
1723
- hostRef.$flags$ &= ~8 /* isConstructingInstance */;
2963
+ hostRef.$flags$ &= -9 /* isConstructingInstance */;
1724
2964
  }
1725
2965
  {
1726
2966
  hostRef.$flags$ |= 128 /* isWatchReady */;
1727
2967
  }
1728
2968
  endNewInstance();
1729
- fireConnectedCallback(hostRef.$lazyInstance$);
2969
+ fireConnectedCallback(hostRef.$lazyInstance$, elm);
1730
2970
  } else {
1731
2971
  Cstr = elm.constructor;
1732
2972
  const cmpTag = elm.localName;
@@ -1758,9 +2998,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1758
2998
  schedule();
1759
2999
  }
1760
3000
  };
1761
- var fireConnectedCallback = (instance) => {
3001
+ var fireConnectedCallback = (instance, elm) => {
1762
3002
  {
1763
- safeCall(instance, "connectedCallback");
3003
+ safeCall(instance, "connectedCallback", void 0, elm);
1764
3004
  }
1765
3005
  };
1766
3006
 
@@ -1779,6 +3019,9 @@ var connectedCallback = (elm) => {
1779
3019
  if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
1780
3020
  const scopeId2 = addStyle(elm.shadowRoot, cmpMeta, elm.getAttribute("s-mode")) ;
1781
3021
  elm.classList.remove(scopeId2 + "-h", scopeId2 + "-s");
3022
+ } else if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
3023
+ const scopeId2 = getScopeId(cmpMeta, elm.getAttribute("s-mode") );
3024
+ elm["s-sc"] = scopeId2;
1782
3025
  }
1783
3026
  initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
1784
3027
  }
@@ -1813,24 +3056,27 @@ var connectedCallback = (elm) => {
1813
3056
  } else {
1814
3057
  addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1815
3058
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1816
- fireConnectedCallback(hostRef.$lazyInstance$);
3059
+ fireConnectedCallback(hostRef.$lazyInstance$, elm);
1817
3060
  } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1818
- hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$));
3061
+ hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
1819
3062
  }
1820
3063
  }
1821
3064
  endConnected();
1822
3065
  }
1823
3066
  };
1824
3067
  var setContentReference = (elm) => {
1825
- const contentRefElm = elm["s-cr"] = doc.createComment(
3068
+ if (!win.document) {
3069
+ return;
3070
+ }
3071
+ const contentRefElm = elm["s-cr"] = win.document.createComment(
1826
3072
  ""
1827
3073
  );
1828
3074
  contentRefElm["s-cn"] = true;
1829
3075
  insertBefore(elm, contentRefElm, elm.firstChild);
1830
3076
  };
1831
- var disconnectInstance = (instance) => {
3077
+ var disconnectInstance = (instance, elm) => {
1832
3078
  {
1833
- safeCall(instance, "disconnectedCallback");
3079
+ safeCall(instance, "disconnectedCallback", void 0, elm || instance);
1834
3080
  }
1835
3081
  };
1836
3082
  var disconnectedCallback = async (elm) => {
@@ -1843,312 +3089,44 @@ var disconnectedCallback = async (elm) => {
1843
3089
  }
1844
3090
  }
1845
3091
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1846
- disconnectInstance(hostRef.$lazyInstance$);
3092
+ disconnectInstance(hostRef.$lazyInstance$, elm);
1847
3093
  } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1848
- hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
1849
- }
1850
- }
1851
- };
1852
- var patchPseudoShadowDom = (hostElementPrototype, descriptorPrototype) => {
1853
- patchCloneNode(hostElementPrototype);
1854
- patchSlotAppendChild(hostElementPrototype);
1855
- patchSlotAppend(hostElementPrototype);
1856
- patchSlotPrepend(hostElementPrototype);
1857
- patchSlotInsertAdjacentElement(hostElementPrototype);
1858
- patchSlotInsertAdjacentHTML(hostElementPrototype);
1859
- patchSlotInsertAdjacentText(hostElementPrototype);
1860
- patchTextContent(hostElementPrototype);
1861
- patchChildSlotNodes(hostElementPrototype, descriptorPrototype);
1862
- patchSlotRemoveChild(hostElementPrototype);
1863
- };
1864
- var patchCloneNode = (HostElementPrototype) => {
1865
- const orgCloneNode = HostElementPrototype.cloneNode;
1866
- HostElementPrototype.cloneNode = function(deep) {
1867
- const srcNode = this;
1868
- const isShadowDom = srcNode.shadowRoot && supportsShadow ;
1869
- const clonedNode = orgCloneNode.call(srcNode, isShadowDom ? deep : false);
1870
- if (!isShadowDom && deep) {
1871
- let i2 = 0;
1872
- let slotted, nonStencilNode;
1873
- const stencilPrivates = [
1874
- "s-id",
1875
- "s-cr",
1876
- "s-lr",
1877
- "s-rc",
1878
- "s-sc",
1879
- "s-p",
1880
- "s-cn",
1881
- "s-sr",
1882
- "s-sn",
1883
- "s-hn",
1884
- "s-ol",
1885
- "s-nr",
1886
- "s-si",
1887
- "s-rf",
1888
- "s-scs"
1889
- ];
1890
- for (; i2 < srcNode.childNodes.length; i2++) {
1891
- slotted = srcNode.childNodes[i2]["s-nr"];
1892
- nonStencilNode = stencilPrivates.every((privateField) => !srcNode.childNodes[i2][privateField]);
1893
- if (slotted) {
1894
- if (clonedNode.__appendChild) {
1895
- clonedNode.__appendChild(slotted.cloneNode(true));
1896
- } else {
1897
- clonedNode.appendChild(slotted.cloneNode(true));
1898
- }
1899
- }
1900
- if (nonStencilNode) {
1901
- clonedNode.appendChild(srcNode.childNodes[i2].cloneNode(true));
1902
- }
1903
- }
1904
- }
1905
- return clonedNode;
1906
- };
1907
- };
1908
- var patchSlotAppendChild = (HostElementPrototype) => {
1909
- HostElementPrototype.__appendChild = HostElementPrototype.appendChild;
1910
- HostElementPrototype.appendChild = function(newChild) {
1911
- const slotName = newChild["s-sn"] = getSlotName(newChild);
1912
- const slotNode = getHostSlotNode(this.childNodes, slotName, this.tagName);
1913
- if (slotNode) {
1914
- const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
1915
- const appendAfter = slotChildNodes[slotChildNodes.length - 1];
1916
- const insertedNode = insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
1917
- updateFallbackSlotVisibility(this);
1918
- return insertedNode;
1919
- }
1920
- return this.__appendChild(newChild);
1921
- };
1922
- };
1923
- var patchSlotRemoveChild = (ElementPrototype) => {
1924
- ElementPrototype.__removeChild = ElementPrototype.removeChild;
1925
- ElementPrototype.removeChild = function(toRemove) {
1926
- if (toRemove && typeof toRemove["s-sn"] !== "undefined") {
1927
- const slotNode = getHostSlotNode(this.childNodes, toRemove["s-sn"], this.tagName);
1928
- if (slotNode) {
1929
- const slotChildNodes = getHostSlotChildNodes(slotNode, toRemove["s-sn"]);
1930
- const existingNode = slotChildNodes.find((n) => n === toRemove);
1931
- if (existingNode) {
1932
- existingNode.remove();
1933
- updateFallbackSlotVisibility(this);
1934
- return;
1935
- }
1936
- }
1937
- }
1938
- return this.__removeChild(toRemove);
1939
- };
1940
- };
1941
- var patchSlotPrepend = (HostElementPrototype) => {
1942
- const originalPrepend = HostElementPrototype.prepend;
1943
- HostElementPrototype.prepend = function(...newChildren) {
1944
- newChildren.forEach((newChild) => {
1945
- if (typeof newChild === "string") {
1946
- newChild = this.ownerDocument.createTextNode(newChild);
1947
- }
1948
- const slotName = newChild["s-sn"] = getSlotName(newChild);
1949
- const slotNode = getHostSlotNode(this.childNodes, slotName, this.tagName);
1950
- if (slotNode) {
1951
- const slotPlaceholder = document.createTextNode("");
1952
- slotPlaceholder["s-nr"] = newChild;
1953
- slotNode["s-cr"].parentNode.__appendChild(slotPlaceholder);
1954
- newChild["s-ol"] = slotPlaceholder;
1955
- const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
1956
- const appendAfter = slotChildNodes[0];
1957
- return insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
1958
- }
1959
- if (newChild.nodeType === 1 && !!newChild.getAttribute("slot")) {
1960
- newChild.hidden = true;
1961
- }
1962
- return originalPrepend.call(this, newChild);
1963
- });
1964
- };
1965
- };
1966
- var patchSlotAppend = (HostElementPrototype) => {
1967
- HostElementPrototype.append = function(...newChildren) {
1968
- newChildren.forEach((newChild) => {
1969
- if (typeof newChild === "string") {
1970
- newChild = this.ownerDocument.createTextNode(newChild);
1971
- }
1972
- this.appendChild(newChild);
1973
- });
1974
- };
1975
- };
1976
- var patchSlotInsertAdjacentHTML = (HostElementPrototype) => {
1977
- const originalInsertAdjacentHtml = HostElementPrototype.insertAdjacentHTML;
1978
- HostElementPrototype.insertAdjacentHTML = function(position, text) {
1979
- if (position !== "afterbegin" && position !== "beforeend") {
1980
- return originalInsertAdjacentHtml.call(this, position, text);
1981
- }
1982
- const container = this.ownerDocument.createElement("_");
1983
- let node;
1984
- container.innerHTML = text;
1985
- if (position === "afterbegin") {
1986
- while (node = container.firstChild) {
1987
- this.prepend(node);
1988
- }
1989
- } else if (position === "beforeend") {
1990
- while (node = container.firstChild) {
1991
- this.append(node);
1992
- }
1993
- }
1994
- };
1995
- };
1996
- var patchSlotInsertAdjacentText = (HostElementPrototype) => {
1997
- HostElementPrototype.insertAdjacentText = function(position, text) {
1998
- this.insertAdjacentHTML(position, text);
1999
- };
2000
- };
2001
- var patchSlotInsertAdjacentElement = (HostElementPrototype) => {
2002
- const originalInsertAdjacentElement = HostElementPrototype.insertAdjacentElement;
2003
- HostElementPrototype.insertAdjacentElement = function(position, element) {
2004
- if (position !== "afterbegin" && position !== "beforeend") {
2005
- return originalInsertAdjacentElement.call(this, position, element);
2006
- }
2007
- if (position === "afterbegin") {
2008
- this.prepend(element);
2009
- return element;
2010
- } else if (position === "beforeend") {
2011
- this.append(element);
2012
- return element;
2013
- }
2014
- return element;
2015
- };
2016
- };
2017
- var patchTextContent = (hostElementPrototype) => {
2018
- const descriptor = Object.getOwnPropertyDescriptor(Node.prototype, "textContent");
2019
- Object.defineProperty(hostElementPrototype, "__textContent", descriptor);
2020
- {
2021
- Object.defineProperty(hostElementPrototype, "textContent", {
2022
- // To mimic shadow root behavior, we need to return the text content of all
2023
- // nodes in a slot reference node
2024
- get() {
2025
- const slotRefNodes = getAllChildSlotNodes(this.childNodes);
2026
- const textContent = slotRefNodes.map((node) => {
2027
- var _a, _b;
2028
- const text = [];
2029
- let slotContent = node.nextSibling;
2030
- while (slotContent && slotContent["s-sn"] === node["s-sn"]) {
2031
- if (slotContent.nodeType === 3 /* TEXT_NODE */ || slotContent.nodeType === 1 /* ELEMENT_NODE */) {
2032
- text.push((_b = (_a = slotContent.textContent) == null ? void 0 : _a.trim()) != null ? _b : "");
2033
- }
2034
- slotContent = slotContent.nextSibling;
2035
- }
2036
- return text.filter((ref) => ref !== "").join(" ");
2037
- }).filter((text) => text !== "").join(" ");
2038
- return " " + textContent + " ";
2039
- },
2040
- // To mimic shadow root behavior, we need to overwrite all nodes in a slot
2041
- // reference node. If a default slot reference node exists, the text content will be
2042
- // placed there. Otherwise, the new text node will be hidden
2043
- set(value) {
2044
- const slotRefNodes = getAllChildSlotNodes(this.childNodes);
2045
- slotRefNodes.forEach((node) => {
2046
- let slotContent = node.nextSibling;
2047
- while (slotContent && slotContent["s-sn"] === node["s-sn"]) {
2048
- const tmp = slotContent;
2049
- slotContent = slotContent.nextSibling;
2050
- tmp.remove();
2051
- }
2052
- if (node["s-sn"] === "") {
2053
- const textNode = this.ownerDocument.createTextNode(value);
2054
- textNode["s-sn"] = "";
2055
- insertBefore(node.parentElement, textNode, node.nextSibling);
2056
- } else {
2057
- node.remove();
2058
- }
2059
- });
2060
- }
2061
- });
2062
- }
2063
- };
2064
- var patchChildSlotNodes = (elm, cmpMeta) => {
2065
- class FakeNodeList extends Array {
2066
- item(n) {
2067
- return this[n];
2068
- }
2069
- }
2070
- if (cmpMeta.$flags$ & 8 /* needsShadowDomShim */) {
2071
- const childNodesFn = elm.__lookupGetter__("childNodes");
2072
- Object.defineProperty(elm, "children", {
2073
- get() {
2074
- return this.childNodes.map((n) => n.nodeType === 1);
2075
- }
2076
- });
2077
- Object.defineProperty(elm, "childElementCount", {
2078
- get() {
2079
- return elm.children.length;
2080
- }
2081
- });
2082
- Object.defineProperty(elm, "childNodes", {
2083
- get() {
2084
- const childNodes = childNodesFn.call(this);
2085
- if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0 && getHostRef(this).$flags$ & 2 /* hasRendered */) {
2086
- const result = new FakeNodeList();
2087
- for (let i2 = 0; i2 < childNodes.length; i2++) {
2088
- const slot = childNodes[i2]["s-nr"];
2089
- if (slot) {
2090
- result.push(slot);
2091
- }
2092
- }
2093
- return result;
2094
- }
2095
- return FakeNodeList.from(childNodes);
2096
- }
2097
- });
2098
- }
2099
- };
2100
- var getAllChildSlotNodes = (childNodes) => {
2101
- const slotRefNodes = [];
2102
- for (const childNode of Array.from(childNodes)) {
2103
- if (childNode["s-sr"]) {
2104
- slotRefNodes.push(childNode);
3094
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
2105
3095
  }
2106
- slotRefNodes.push(...getAllChildSlotNodes(childNode.childNodes));
2107
3096
  }
2108
- return slotRefNodes;
2109
- };
2110
- var getSlotName = (node) => node["s-sn"] || node.nodeType === 1 && node.getAttribute("slot") || "";
2111
- var getHostSlotNode = (childNodes, slotName, hostName) => {
2112
- let i2 = 0;
2113
- let childNode;
2114
- for (; i2 < childNodes.length; i2++) {
2115
- childNode = childNodes[i2];
2116
- if (childNode["s-sr"] && childNode["s-sn"] === slotName && childNode["s-hn"] === hostName) {
2117
- return childNode;
2118
- }
2119
- childNode = getHostSlotNode(childNode.childNodes, slotName, hostName);
2120
- if (childNode) {
2121
- return childNode;
2122
- }
3097
+ if (rootAppliedStyles.has(elm)) {
3098
+ rootAppliedStyles.delete(elm);
2123
3099
  }
2124
- return null;
2125
- };
2126
- var getHostSlotChildNodes = (n, slotName) => {
2127
- const childNodes = [n];
2128
- while ((n = n.nextSibling) && n["s-sn"] === slotName) {
2129
- childNodes.push(n);
3100
+ if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
3101
+ rootAppliedStyles.delete(elm.shadowRoot);
2130
3102
  }
2131
- return childNodes;
2132
3103
  };
2133
3104
 
2134
3105
  // src/runtime/bootstrap-lazy.ts
2135
3106
  var bootstrapLazy = (lazyBundles, options = {}) => {
2136
3107
  var _a;
3108
+ if (!win.document) {
3109
+ console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");
3110
+ return;
3111
+ }
2137
3112
  const endBootstrap = createTime();
2138
3113
  const cmpTags = [];
2139
3114
  const exclude = options.exclude || [];
2140
3115
  const customElements2 = win.customElements;
2141
- const head = doc.head;
3116
+ const head = win.document.head;
2142
3117
  const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
2143
- const dataStyles = /* @__PURE__ */ doc.createElement("style");
3118
+ const dataStyles = /* @__PURE__ */ win.document.createElement("style");
2144
3119
  const deferredConnectedCallbacks = [];
2145
3120
  let appLoadFallback;
2146
3121
  let isBootstrapping = true;
2147
3122
  Object.assign(plt, options);
2148
- plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", doc.baseURI).href;
3123
+ plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", win.document.baseURI).href;
2149
3124
  {
2150
3125
  plt.$flags$ |= 2 /* appLoaded */;
2151
3126
  }
3127
+ {
3128
+ hydrateScopedToShadow();
3129
+ }
2152
3130
  let hasSlotRelocation = false;
2153
3131
  lazyBundles.map((lazyBundle) => {
2154
3132
  lazyBundle[1].map((compactMeta) => {
@@ -2185,12 +3163,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2185
3163
  if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2186
3164
  {
2187
3165
  if (!self.shadowRoot) {
2188
- {
2189
- self.attachShadow({
2190
- mode: "open",
2191
- delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */)
2192
- });
2193
- }
3166
+ createShadowRoot.call(self, cmpMeta);
2194
3167
  } else {
2195
3168
  if (self.shadowRoot.mode !== "open") {
2196
3169
  throw new Error(
@@ -2219,6 +3192,17 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2219
3192
  }
2220
3193
  disconnectedCallback() {
2221
3194
  plt.jmp(() => disconnectedCallback(this));
3195
+ plt.raf(() => {
3196
+ var _a3;
3197
+ const hostRef = getHostRef(this);
3198
+ const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
3199
+ if (i2 > -1) {
3200
+ deferredConnectedCallbacks.splice(i2, 1);
3201
+ }
3202
+ if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
3203
+ delete hostRef.$vnode$.$elm$;
3204
+ }
3205
+ });
2222
3206
  }
2223
3207
  componentOnReady() {
2224
3208
  return getHostRef(this).$onReadyPromise$;
@@ -2226,7 +3210,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2226
3210
  };
2227
3211
  {
2228
3212
  if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2229
- patchPseudoShadowDom(HostElement.prototype, cmpMeta);
3213
+ patchPseudoShadowDom(HostElement.prototype);
2230
3214
  }
2231
3215
  }
2232
3216
  cmpMeta.$lazyBundleId$ = lazyBundle[0];
@@ -2248,7 +3232,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2248
3232
  }
2249
3233
  if (dataStyles.innerHTML.length) {
2250
3234
  dataStyles.setAttribute("data-styles", "");
2251
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
3235
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
2252
3236
  if (nonce != null) {
2253
3237
  dataStyles.setAttribute("nonce", nonce);
2254
3238
  }
@@ -2265,10 +3249,13 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2265
3249
  }
2266
3250
  endBootstrap();
2267
3251
  };
3252
+
3253
+ // src/runtime/fragment.ts
3254
+ var Fragment = (_, children) => children;
2268
3255
  var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
2269
- if (listeners) {
3256
+ if (listeners && win.document) {
2270
3257
  listeners.map(([flags, name, method]) => {
2271
- const target = getHostListenerTarget(elm, flags) ;
3258
+ const target = getHostListenerTarget(win.document, elm, flags) ;
2272
3259
  const handler = hostListenerProxy(hostRef, method);
2273
3260
  const opts = hostListenerOpts(flags);
2274
3261
  plt.ael(target, name, handler, opts);
@@ -2287,13 +3274,19 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
2287
3274
  }
2288
3275
  }
2289
3276
  } catch (e) {
2290
- consoleError(e);
3277
+ consoleError(e, hostRef.$hostElement$);
2291
3278
  }
2292
3279
  };
2293
- var getHostListenerTarget = (elm, flags) => {
2294
- if (flags & 4 /* TargetDocument */) return doc;
2295
- if (flags & 8 /* TargetWindow */) return win;
2296
- if (flags & 16 /* TargetBody */) return doc.body;
3280
+ var getHostListenerTarget = (doc, elm, flags) => {
3281
+ if (flags & 4 /* TargetDocument */) {
3282
+ return doc;
3283
+ }
3284
+ if (flags & 8 /* TargetWindow */) {
3285
+ return win;
3286
+ }
3287
+ if (flags & 16 /* TargetBody */) {
3288
+ return doc.body;
3289
+ }
2297
3290
  return elm;
2298
3291
  };
2299
3292
  var hostListenerOpts = (flags) => supportsListenerOptions ? {
@@ -2305,18 +3298,26 @@ var hostListenerOpts = (flags) => supportsListenerOptions ? {
2305
3298
  var setNonce = (nonce) => plt.$nonce$ = nonce;
2306
3299
 
2307
3300
  exports.Build = Build;
3301
+ exports.Fragment = Fragment;
2308
3302
  exports.H = H;
2309
3303
  exports.Host = Host;
2310
3304
  exports.bootstrapLazy = bootstrapLazy;
3305
+ exports.config = config;
2311
3306
  exports.createEvent = createEvent;
2312
3307
  exports.forceUpdate = forceUpdate;
2313
3308
  exports.getAssetPath = getAssetPath;
2314
3309
  exports.getElement = getElement;
2315
- exports.getMode = getMode;
3310
+ exports.getIonMode = getIonMode;
3311
+ exports.getPlatforms = getPlatforms;
3312
+ exports.globalScripts = globalScripts;
2316
3313
  exports.h = h;
3314
+ exports.initialize = initialize;
3315
+ exports.isPlatform = isPlatform;
3316
+ exports.printIonError = printIonError;
3317
+ exports.printIonWarning = printIonWarning;
3318
+ exports.printRequiredElementError = printRequiredElementError;
2317
3319
  exports.promiseResolve = promiseResolve;
2318
3320
  exports.readTask = readTask;
2319
3321
  exports.registerInstance = registerInstance;
2320
- exports.setMode = setMode;
2321
3322
  exports.setNonce = setNonce;
2322
3323
  exports.writeTask = writeTask;