@ionic/core 8.4.2-dev.11736277041.14f34ba1 → 8.4.2-dev.11736797843.16cc5058

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 (591) hide show
  1. package/components/action-sheet.js +32 -16
  2. package/components/alert.js +36 -18
  3. package/components/backdrop.js +9 -0
  4. package/components/button.js +25 -17
  5. package/components/buttons.js +12 -0
  6. package/components/checkbox.js +32 -9
  7. package/components/content.js +22 -2
  8. package/components/focus-visible.js +34 -4
  9. package/components/header.js +9 -2
  10. package/components/ion-accordion-group.js +17 -2
  11. package/components/ion-accordion.js +28 -8
  12. package/components/ion-back-button.js +8 -7
  13. package/components/ion-badge.js +0 -1
  14. package/components/ion-breadcrumb.js +17 -13
  15. package/components/ion-breadcrumbs.js +12 -6
  16. package/components/ion-card-header.js +5 -1
  17. package/components/ion-card-subtitle.js +0 -1
  18. package/components/ion-card-title.js +0 -1
  19. package/components/ion-card.js +13 -6
  20. package/components/ion-chip.js +6 -1
  21. package/components/ion-col.js +0 -24
  22. package/components/ion-datetime-button.js +12 -8
  23. package/components/ion-datetime.js +117 -42
  24. package/components/ion-fab-button.js +33 -14
  25. package/components/ion-fab-list.js +6 -0
  26. package/components/ion-fab.js +9 -2
  27. package/components/ion-footer.js +10 -3
  28. package/components/ion-grid.js +3 -0
  29. package/components/ion-img.js +0 -4
  30. package/components/ion-infinite-scroll-content.js +0 -2
  31. package/components/ion-infinite-scroll.js +26 -4
  32. package/components/ion-input-password-toggle.js +4 -4
  33. package/components/ion-input.js +65 -35
  34. package/components/ion-item-divider.js +7 -1
  35. package/components/ion-item-option.js +12 -8
  36. package/components/ion-item-options.js +4 -0
  37. package/components/ion-item-sliding.js +3 -0
  38. package/components/ion-loading.js +31 -12
  39. package/components/ion-menu-button.js +12 -5
  40. package/components/ion-menu-toggle.js +8 -3
  41. package/components/ion-menu.js +21 -3
  42. package/components/ion-nav-link.js +4 -4
  43. package/components/ion-nav.js +3 -5
  44. package/components/ion-note.js +0 -1
  45. package/components/ion-picker-legacy.js +39 -17
  46. package/components/ion-progress-bar.js +16 -1
  47. package/components/ion-range.js +61 -19
  48. package/components/ion-refresher-content.js +0 -4
  49. package/components/ion-refresher.js +50 -0
  50. package/components/ion-reorder-group.js +3 -0
  51. package/components/ion-route-redirect.js +0 -2
  52. package/components/ion-route.js +6 -4
  53. package/components/ion-router-link.js +5 -6
  54. package/components/ion-router-outlet.js +6 -3
  55. package/components/ion-router.js +18 -0
  56. package/components/ion-searchbar.js +75 -24
  57. package/components/ion-segment-button.js +17 -6
  58. package/components/ion-segment-view.js +3 -1
  59. package/components/ion-segment.js +20 -7
  60. package/components/ion-select-option.js +3 -1
  61. package/components/ion-select.js +45 -20
  62. package/components/ion-skeleton-text.js +3 -0
  63. package/components/ion-split-pane.js +8 -1
  64. package/components/ion-tab-bar.js +5 -2
  65. package/components/ion-tab-button.js +8 -8
  66. package/components/ion-tab.js +1 -3
  67. package/components/ion-tabs.js +2 -2
  68. package/components/ion-text.js +0 -1
  69. package/components/ion-textarea.js +59 -29
  70. package/components/ion-toast.js +48 -23
  71. package/components/ion-toggle.js +33 -10
  72. package/components/item.js +16 -8
  73. package/components/label.js +0 -2
  74. package/components/list-header.js +0 -2
  75. package/components/list.js +3 -1
  76. package/components/modal.js +92 -25
  77. package/components/picker-column-option.js +16 -1
  78. package/components/picker-column.js +22 -6
  79. package/components/picker-column2.js +0 -1
  80. package/components/popover.js +122 -28
  81. package/components/radio-group.js +8 -4
  82. package/components/radio.js +25 -9
  83. package/components/ripple-effect.js +9 -0
  84. package/components/select-modal.js +3 -5
  85. package/components/select-popover.js +3 -4
  86. package/components/spinner.js +3 -3
  87. package/components/title.js +0 -2
  88. package/components/toolbar.js +0 -1
  89. package/dist/cjs/{app-globals-21afee77.js → app-globals-d2d85416.js} +1 -1
  90. package/dist/cjs/{button-active-3f2f60b4.js → button-active-8d4c8099.js} +1 -1
  91. package/dist/cjs/{focus-visible-8657bbbf.js → focus-visible-7a0ce04f.js} +34 -4
  92. package/dist/cjs/{hardware-back-button-9e8a2c4f.js → hardware-back-button-f0972dab.js} +2 -2
  93. package/dist/cjs/{index-f05acd21.js → index-213cabf1.js} +4 -4
  94. package/dist/cjs/{index-73f75efb.js → index-2e7a27db.js} +1205 -837
  95. package/dist/cjs/{index-8e789962.js → index-38a015a8.js} +2 -2
  96. package/dist/cjs/index.cjs.js +8 -8
  97. package/dist/cjs/ion-accordion_2.cjs.entry.js +47 -12
  98. package/dist/cjs/ion-action-sheet.cjs.entry.js +37 -21
  99. package/dist/cjs/ion-alert.cjs.entry.js +41 -23
  100. package/dist/cjs/ion-app_8.cjs.entry.js +66 -20
  101. package/dist/cjs/ion-avatar_3.cjs.entry.js +2 -3
  102. package/dist/cjs/ion-back-button.cjs.entry.js +10 -9
  103. package/dist/cjs/ion-backdrop.cjs.entry.js +11 -2
  104. package/dist/cjs/ion-breadcrumb_2.cjs.entry.js +31 -21
  105. package/dist/cjs/ion-button_2.cjs.entry.js +27 -19
  106. package/dist/cjs/ion-card_5.cjs.entry.js +20 -11
  107. package/dist/cjs/ion-checkbox.cjs.entry.js +34 -11
  108. package/dist/cjs/ion-chip.cjs.entry.js +8 -3
  109. package/dist/cjs/ion-col_3.cjs.entry.js +5 -26
  110. package/dist/cjs/ion-datetime-button.cjs.entry.js +14 -10
  111. package/dist/cjs/ion-datetime_3.cjs.entry.js +161 -65
  112. package/dist/cjs/ion-fab_3.cjs.entry.js +50 -18
  113. package/dist/cjs/ion-img.cjs.entry.js +2 -6
  114. package/dist/cjs/ion-infinite-scroll_2.cjs.entry.js +28 -8
  115. package/dist/cjs/ion-input-password-toggle.cjs.entry.js +6 -6
  116. package/dist/cjs/ion-input.cjs.entry.js +67 -37
  117. package/dist/cjs/ion-item-option_3.cjs.entry.js +21 -10
  118. package/dist/cjs/ion-item_8.cjs.entry.js +31 -17
  119. package/dist/cjs/ion-loading.cjs.entry.js +35 -16
  120. package/dist/cjs/ion-menu_3.cjs.entry.js +46 -16
  121. package/dist/cjs/ion-modal.cjs.entry.js +97 -30
  122. package/dist/cjs/ion-nav_2.cjs.entry.js +10 -12
  123. package/dist/cjs/ion-picker-column-option.cjs.entry.js +18 -3
  124. package/dist/cjs/ion-picker-column.cjs.entry.js +24 -8
  125. package/dist/cjs/ion-picker.cjs.entry.js +1 -1
  126. package/dist/cjs/ion-popover.cjs.entry.js +127 -33
  127. package/dist/cjs/ion-progress-bar.cjs.entry.js +18 -3
  128. package/dist/cjs/ion-radio_2.cjs.entry.js +35 -15
  129. package/dist/cjs/ion-range.cjs.entry.js +63 -21
  130. package/dist/cjs/ion-refresher_2.cjs.entry.js +52 -6
  131. package/dist/cjs/ion-reorder_2.cjs.entry.js +5 -2
  132. package/dist/cjs/ion-ripple-effect.cjs.entry.js +11 -2
  133. package/dist/cjs/ion-route_4.cjs.entry.js +31 -14
  134. package/dist/cjs/ion-searchbar.cjs.entry.js +77 -26
  135. package/dist/cjs/ion-segment-content.cjs.entry.js +1 -1
  136. package/dist/cjs/ion-segment-view.cjs.entry.js +4 -2
  137. package/dist/cjs/ion-segment_2.cjs.entry.js +39 -15
  138. package/dist/cjs/ion-select-modal.cjs.entry.js +7 -9
  139. package/dist/cjs/ion-select_3.cjs.entry.js +55 -29
  140. package/dist/cjs/ion-spinner.cjs.entry.js +5 -5
  141. package/dist/cjs/ion-split-pane.cjs.entry.js +10 -3
  142. package/dist/cjs/ion-tab-bar_2.cjs.entry.js +15 -12
  143. package/dist/cjs/ion-tab_2.cjs.entry.js +4 -6
  144. package/dist/cjs/ion-text.cjs.entry.js +2 -3
  145. package/dist/cjs/ion-textarea.cjs.entry.js +61 -31
  146. package/dist/cjs/ion-toast.cjs.entry.js +52 -27
  147. package/dist/cjs/ion-toggle.cjs.entry.js +35 -12
  148. package/dist/cjs/{ionic-global-d9a8bb5b.js → ionic-global-3c758a1a.js} +1 -1
  149. package/dist/cjs/ionic.cjs.js +4 -4
  150. package/dist/cjs/{ios.transition-cf40433b.js → ios.transition-ac964d6c.js} +3 -3
  151. package/dist/cjs/loader.cjs.js +3 -3
  152. package/dist/cjs/{md.transition-ededf99f.js → md.transition-45089eda.js} +3 -3
  153. package/dist/cjs/{overlays-aa669eb8.js → overlays-56fecd6c.js} +2 -2
  154. package/dist/cjs/{status-tap-37681226.js → status-tap-84e22ef3.js} +1 -1
  155. package/dist/collection/collection-manifest.json +2 -2
  156. package/dist/collection/components/accordion/accordion.js +38 -8
  157. package/dist/collection/components/accordion-group/accordion-group.js +29 -2
  158. package/dist/collection/components/action-sheet/action-sheet.js +68 -20
  159. package/dist/collection/components/alert/alert.js +76 -22
  160. package/dist/collection/components/back-button/back-button.js +23 -8
  161. package/dist/collection/components/backdrop/backdrop.js +15 -0
  162. package/dist/collection/components/badge/badge.js +2 -3
  163. package/dist/collection/components/breadcrumb/breadcrumb.js +44 -14
  164. package/dist/collection/components/breadcrumbs/breadcrumbs.js +20 -6
  165. package/dist/collection/components/button/button.js +58 -18
  166. package/dist/collection/components/buttons/buttons.js +14 -0
  167. package/dist/collection/components/card/card.js +34 -7
  168. package/dist/collection/components/card-header/card-header.js +9 -1
  169. package/dist/collection/components/card-subtitle/card-subtitle.js +2 -3
  170. package/dist/collection/components/card-title/card-title.js +2 -3
  171. package/dist/collection/components/checkbox/checkbox.js +50 -9
  172. package/dist/collection/components/chip/chip.js +12 -1
  173. package/dist/collection/components/col/col.js +48 -26
  174. package/dist/collection/components/content/content.js +36 -2
  175. package/dist/collection/components/datetime/datetime.js +181 -46
  176. package/dist/collection/components/datetime-button/datetime-button.js +18 -8
  177. package/dist/collection/components/fab/fab.js +17 -2
  178. package/dist/collection/components/fab-button/fab-button.js +62 -15
  179. package/dist/collection/components/fab-list/fab-list.js +10 -0
  180. package/dist/collection/components/footer/footer.js +14 -3
  181. package/dist/collection/components/grid/grid.js +5 -0
  182. package/dist/collection/components/header/header.js +13 -2
  183. package/dist/collection/components/img/img.js +4 -4
  184. package/dist/collection/components/infinite-scroll/infinite-scroll.js +32 -4
  185. package/dist/collection/components/infinite-scroll-content/infinite-scroll-content.js +4 -2
  186. package/dist/collection/components/input/input.js +134 -36
  187. package/dist/collection/components/input-password-toggle/input-password-toggle.js +12 -4
  188. package/dist/collection/components/item/item.js +43 -9
  189. package/dist/collection/components/item-divider/item-divider.js +11 -1
  190. package/dist/collection/components/item-option/item-option.js +28 -8
  191. package/dist/collection/components/item-options/item-options.js +6 -0
  192. package/dist/collection/components/item-sliding/item-sliding.js +5 -0
  193. package/dist/collection/components/label/label.js +4 -2
  194. package/dist/collection/components/list/list.js +7 -1
  195. package/dist/collection/components/list-header/list-header.js +4 -4
  196. package/dist/collection/components/loading/loading.js +69 -16
  197. package/dist/collection/components/menu/menu.js +35 -3
  198. package/dist/collection/components/menu-button/menu-button.js +22 -5
  199. package/dist/collection/components/menu-toggle/menu-toggle.js +12 -3
  200. package/dist/collection/components/modal/modal.js +147 -32
  201. package/dist/collection/components/nav/nav.js +18 -8
  202. package/dist/collection/components/nav-link/nav-link.js +14 -6
  203. package/dist/collection/components/note/note.js +2 -3
  204. package/dist/collection/components/picker-column/picker-column.js +30 -6
  205. package/dist/collection/components/picker-column-option/picker-column-option.js +22 -1
  206. package/dist/collection/components/picker-legacy/picker.js +75 -21
  207. package/dist/collection/components/picker-legacy-column/picker-column.js +3 -2
  208. package/dist/collection/components/popover/popover.js +181 -33
  209. package/dist/collection/components/progress-bar/progress-bar.js +26 -1
  210. package/dist/collection/components/radio/radio.js +39 -9
  211. package/dist/collection/components/radio-group/radio-group.js +16 -4
  212. package/dist/collection/components/range/range.js +93 -19
  213. package/dist/collection/components/refresher/refresher.js +62 -0
  214. package/dist/collection/components/refresher-content/refresher-content.js +8 -4
  215. package/dist/collection/components/reorder-group/reorder-group.js +5 -0
  216. package/dist/collection/components/ripple-effect/ripple-effect.js +11 -0
  217. package/dist/collection/components/route/route.js +19 -7
  218. package/dist/collection/components/route-redirect/route-redirect.js +4 -4
  219. package/dist/collection/components/router/router.js +22 -0
  220. package/dist/collection/components/router-link/router-link.js +18 -7
  221. package/dist/collection/components/router-outlet/router-outlet.js +19 -6
  222. package/dist/collection/components/searchbar/searchbar.js +119 -24
  223. package/dist/collection/components/segment/segment.js +32 -7
  224. package/dist/collection/components/segment-button/segment-button.js +27 -6
  225. package/dist/collection/components/segment-view/segment-view.js +5 -1
  226. package/dist/collection/components/select/select.js +83 -20
  227. package/dist/collection/components/select-modal/select-modal.ios.css +186 -0
  228. package/dist/collection/components/select-modal/select-modal.js +8 -4
  229. package/dist/collection/components/select-option/select-option.js +7 -1
  230. package/dist/collection/components/select-popover/select-popover.js +13 -4
  231. package/dist/collection/components/skeleton-text/skeleton-text.js +5 -0
  232. package/dist/collection/components/spinner/spinner.js +11 -3
  233. package/dist/collection/components/split-pane/split-pane.js +14 -1
  234. package/dist/collection/components/tab/tab.js +10 -4
  235. package/dist/collection/components/tab-bar/tab-bar.js +11 -2
  236. package/dist/collection/components/tab-button/tab-button.js +24 -8
  237. package/dist/collection/components/tabs/tabs.js +4 -2
  238. package/dist/collection/components/text/text.js +2 -3
  239. package/dist/collection/components/textarea/textarea.js +116 -30
  240. package/dist/collection/components/title/title.js +4 -4
  241. package/dist/collection/components/toast/toast.js +97 -28
  242. package/dist/collection/components/toggle/toggle.js +51 -10
  243. package/dist/collection/components/toolbar/toolbar.js +2 -1
  244. package/dist/collection/utils/focus-visible.js +34 -4
  245. package/dist/docs.d.ts +8 -0
  246. package/dist/docs.json +1710 -572
  247. package/dist/esm/{app-globals-5dbb61a5.js → app-globals-1318774c.js} +1 -1
  248. package/dist/esm/{button-active-f6503382.js → button-active-10b36beb.js} +1 -1
  249. package/dist/esm/{focus-visible-ea5a37bc.js → focus-visible-dd40d69f.js} +34 -4
  250. package/dist/esm/{hardware-back-button-06ef3c3e.js → hardware-back-button-0a284222.js} +2 -2
  251. package/dist/esm/{index-3ad7f18b.js → index-13b48bcb.js} +4 -4
  252. package/dist/esm/{index-24b48b06.js → index-ed9a6c67.js} +2 -2
  253. package/dist/esm/{index-28849c61.js → index-fcdfc1aa.js} +1205 -837
  254. package/dist/esm/index.js +8 -8
  255. package/dist/esm/ion-accordion_2.entry.js +47 -12
  256. package/dist/esm/ion-action-sheet.entry.js +37 -21
  257. package/dist/esm/ion-alert.entry.js +41 -23
  258. package/dist/esm/ion-app_8.entry.js +66 -20
  259. package/dist/esm/ion-avatar_3.entry.js +2 -3
  260. package/dist/esm/ion-back-button.entry.js +10 -9
  261. package/dist/esm/ion-backdrop.entry.js +11 -2
  262. package/dist/esm/ion-breadcrumb_2.entry.js +31 -21
  263. package/dist/esm/ion-button_2.entry.js +27 -19
  264. package/dist/esm/ion-card_5.entry.js +20 -11
  265. package/dist/esm/ion-checkbox.entry.js +34 -11
  266. package/dist/esm/ion-chip.entry.js +8 -3
  267. package/dist/esm/ion-col_3.entry.js +5 -26
  268. package/dist/esm/ion-datetime-button.entry.js +14 -10
  269. package/dist/esm/ion-datetime_3.entry.js +161 -65
  270. package/dist/esm/ion-fab_3.entry.js +50 -18
  271. package/dist/esm/ion-img.entry.js +2 -6
  272. package/dist/esm/ion-infinite-scroll_2.entry.js +28 -8
  273. package/dist/esm/ion-input-password-toggle.entry.js +6 -6
  274. package/dist/esm/ion-input.entry.js +67 -37
  275. package/dist/esm/ion-item-option_3.entry.js +21 -10
  276. package/dist/esm/ion-item_8.entry.js +31 -17
  277. package/dist/esm/ion-loading.entry.js +35 -16
  278. package/dist/esm/ion-menu_3.entry.js +46 -16
  279. package/dist/esm/ion-modal.entry.js +97 -30
  280. package/dist/esm/ion-nav_2.entry.js +10 -12
  281. package/dist/esm/ion-picker-column-option.entry.js +18 -3
  282. package/dist/esm/ion-picker-column.entry.js +24 -8
  283. package/dist/esm/ion-picker.entry.js +1 -1
  284. package/dist/esm/ion-popover.entry.js +127 -33
  285. package/dist/esm/ion-progress-bar.entry.js +18 -3
  286. package/dist/esm/ion-radio_2.entry.js +35 -15
  287. package/dist/esm/ion-range.entry.js +63 -21
  288. package/dist/esm/ion-refresher_2.entry.js +52 -6
  289. package/dist/esm/ion-reorder_2.entry.js +5 -2
  290. package/dist/esm/ion-ripple-effect.entry.js +11 -2
  291. package/dist/esm/ion-route_4.entry.js +31 -14
  292. package/dist/esm/ion-searchbar.entry.js +77 -26
  293. package/dist/esm/ion-segment-content.entry.js +1 -1
  294. package/dist/esm/ion-segment-view.entry.js +4 -2
  295. package/dist/esm/ion-segment_2.entry.js +39 -15
  296. package/dist/esm/ion-select-modal.entry.js +7 -9
  297. package/dist/esm/ion-select_3.entry.js +55 -29
  298. package/dist/esm/ion-spinner.entry.js +5 -5
  299. package/dist/esm/ion-split-pane.entry.js +10 -3
  300. package/dist/esm/ion-tab-bar_2.entry.js +15 -12
  301. package/dist/esm/ion-tab_2.entry.js +4 -6
  302. package/dist/esm/ion-text.entry.js +2 -3
  303. package/dist/esm/ion-textarea.entry.js +61 -31
  304. package/dist/esm/ion-toast.entry.js +52 -27
  305. package/dist/esm/ion-toggle.entry.js +35 -12
  306. package/dist/esm/{ionic-global-c81d82ab.js → ionic-global-6b9f2b5a.js} +1 -1
  307. package/dist/esm/ionic.js +5 -5
  308. package/dist/esm/{ios.transition-4ee1a3af.js → ios.transition-1cb16beb.js} +3 -3
  309. package/dist/esm/loader.js +4 -4
  310. package/dist/esm/{md.transition-5106a0d2.js → md.transition-20f80721.js} +3 -3
  311. package/dist/esm/{overlays-e7b9d6d9.js → overlays-6163edd5.js} +2 -2
  312. package/dist/esm/{status-tap-f472b09f.js → status-tap-6971c722.js} +1 -1
  313. package/dist/esm-es5/app-globals-1318774c.js +4 -0
  314. package/dist/esm-es5/{button-active-f6503382.js → button-active-10b36beb.js} +1 -1
  315. package/dist/esm-es5/focus-visible-dd40d69f.js +4 -0
  316. package/dist/esm-es5/{hardware-back-button-06ef3c3e.js → hardware-back-button-0a284222.js} +1 -1
  317. package/dist/esm-es5/{index-3ad7f18b.js → index-13b48bcb.js} +1 -1
  318. package/dist/esm-es5/{index-24b48b06.js → index-ed9a6c67.js} +1 -1
  319. package/dist/esm-es5/index-fcdfc1aa.js +5 -0
  320. package/dist/esm-es5/index.js +1 -1
  321. package/dist/esm-es5/ion-accordion_2.entry.js +1 -1
  322. package/dist/esm-es5/ion-action-sheet.entry.js +1 -1
  323. package/dist/esm-es5/ion-alert.entry.js +1 -1
  324. package/dist/esm-es5/ion-app_8.entry.js +1 -1
  325. package/dist/esm-es5/ion-avatar_3.entry.js +1 -1
  326. package/dist/esm-es5/ion-back-button.entry.js +1 -1
  327. package/dist/esm-es5/ion-backdrop.entry.js +1 -1
  328. package/dist/esm-es5/ion-breadcrumb_2.entry.js +1 -1
  329. package/dist/esm-es5/ion-button_2.entry.js +1 -1
  330. package/dist/esm-es5/ion-card_5.entry.js +1 -1
  331. package/dist/esm-es5/ion-checkbox.entry.js +1 -1
  332. package/dist/esm-es5/ion-chip.entry.js +1 -1
  333. package/dist/esm-es5/ion-col_3.entry.js +1 -1
  334. package/dist/esm-es5/ion-datetime-button.entry.js +1 -1
  335. package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
  336. package/dist/esm-es5/ion-fab_3.entry.js +1 -1
  337. package/dist/esm-es5/ion-img.entry.js +1 -1
  338. package/dist/esm-es5/ion-infinite-scroll_2.entry.js +1 -1
  339. package/dist/esm-es5/ion-input-password-toggle.entry.js +1 -1
  340. package/dist/esm-es5/ion-input.entry.js +1 -1
  341. package/dist/esm-es5/ion-item-option_3.entry.js +1 -1
  342. package/dist/esm-es5/ion-item_8.entry.js +1 -1
  343. package/dist/esm-es5/ion-loading.entry.js +1 -1
  344. package/dist/esm-es5/ion-menu_3.entry.js +1 -1
  345. package/dist/esm-es5/ion-modal.entry.js +1 -1
  346. package/dist/esm-es5/ion-nav_2.entry.js +1 -1
  347. package/dist/esm-es5/ion-picker-column-option.entry.js +1 -1
  348. package/dist/esm-es5/ion-picker-column.entry.js +1 -1
  349. package/dist/esm-es5/ion-picker.entry.js +1 -1
  350. package/dist/esm-es5/ion-popover.entry.js +1 -1
  351. package/dist/esm-es5/ion-progress-bar.entry.js +1 -1
  352. package/dist/esm-es5/ion-radio_2.entry.js +1 -1
  353. package/dist/esm-es5/ion-range.entry.js +1 -1
  354. package/dist/esm-es5/ion-refresher_2.entry.js +1 -1
  355. package/dist/esm-es5/ion-reorder_2.entry.js +1 -1
  356. package/dist/esm-es5/ion-ripple-effect.entry.js +1 -1
  357. package/dist/esm-es5/ion-route_4.entry.js +1 -1
  358. package/dist/esm-es5/ion-searchbar.entry.js +1 -1
  359. package/dist/esm-es5/ion-segment-content.entry.js +1 -1
  360. package/dist/esm-es5/ion-segment-view.entry.js +1 -1
  361. package/dist/esm-es5/ion-segment_2.entry.js +1 -1
  362. package/dist/esm-es5/ion-select-modal.entry.js +1 -1
  363. package/dist/esm-es5/ion-select_3.entry.js +1 -1
  364. package/dist/esm-es5/ion-spinner.entry.js +1 -1
  365. package/dist/esm-es5/ion-split-pane.entry.js +1 -1
  366. package/dist/esm-es5/ion-tab-bar_2.entry.js +1 -1
  367. package/dist/esm-es5/ion-tab_2.entry.js +1 -1
  368. package/dist/esm-es5/ion-text.entry.js +1 -1
  369. package/dist/esm-es5/ion-textarea.entry.js +1 -1
  370. package/dist/esm-es5/ion-toast.entry.js +1 -1
  371. package/dist/esm-es5/ion-toggle.entry.js +1 -1
  372. package/dist/esm-es5/{ionic-global-c81d82ab.js → ionic-global-6b9f2b5a.js} +1 -1
  373. package/dist/esm-es5/ionic.js +1 -1
  374. package/dist/esm-es5/{ios.transition-4ee1a3af.js → ios.transition-1cb16beb.js} +1 -1
  375. package/dist/esm-es5/loader.js +1 -1
  376. package/dist/esm-es5/md.transition-20f80721.js +4 -0
  377. package/dist/esm-es5/{overlays-e7b9d6d9.js → overlays-6163edd5.js} +1 -1
  378. package/dist/esm-es5/{status-tap-f472b09f.js → status-tap-6971c722.js} +1 -1
  379. package/dist/ionic/index.esm.js +1 -1
  380. package/dist/ionic/ionic.esm.js +1 -1
  381. package/dist/ionic/ionic.js +1 -1
  382. package/dist/ionic/p-009f82b0.entry.js +4 -0
  383. package/dist/ionic/{p-ed75fcfb.system.entry.js → p-00d0d756.system.entry.js} +1 -1
  384. package/dist/ionic/p-02a67bb6.entry.js +4 -0
  385. package/dist/ionic/p-06db9f72.system.entry.js +4 -0
  386. package/dist/ionic/p-0b7a6f61.system.entry.js +4 -0
  387. package/dist/ionic/p-0e3657b4.system.entry.js +4 -0
  388. package/dist/ionic/p-0f461830.entry.js +4 -0
  389. package/dist/ionic/p-1050c06b.entry.js +4 -0
  390. package/dist/ionic/p-10e0c150.entry.js +4 -0
  391. package/dist/ionic/p-12130ed6.entry.js +4 -0
  392. package/dist/ionic/{p-cac0e0b3.system.entry.js → p-12f321c2.system.entry.js} +1 -1
  393. package/dist/ionic/{p-e85d901b.system.entry.js → p-13672c38.system.entry.js} +1 -1
  394. package/dist/ionic/p-1424bf51.system.entry.js +4 -0
  395. package/dist/ionic/p-14862d17.js +4 -0
  396. package/dist/ionic/p-15764963.entry.js +4 -0
  397. package/dist/ionic/{p-d6841eac.js → p-178f8860.js} +1 -1
  398. package/dist/ionic/p-19d9e3c1.entry.js +4 -0
  399. package/dist/ionic/{p-322c5fb4.system.js → p-1a02bce6.system.js} +1 -1
  400. package/dist/ionic/{p-8b8be2fd.entry.js → p-1c152e5e.entry.js} +1 -1
  401. package/dist/ionic/{p-a4565eb5.system.js → p-1fd5d9bc.system.js} +1 -1
  402. package/dist/ionic/{p-33a8a71b.entry.js → p-20034878.entry.js} +1 -1
  403. package/dist/ionic/p-231bc1a6.entry.js +4 -0
  404. package/dist/ionic/p-256d6439.system.entry.js +4 -0
  405. package/dist/ionic/{p-424eb140.system.entry.js → p-25ffd217.system.entry.js} +1 -1
  406. package/dist/ionic/p-2799a566.entry.js +4 -0
  407. package/dist/ionic/p-27c32980.system.entry.js +4 -0
  408. package/dist/ionic/p-28dfa27e.entry.js +4 -0
  409. package/dist/ionic/p-2af55ad8.entry.js +4 -0
  410. package/dist/ionic/p-2d31d826.entry.js +4 -0
  411. package/dist/ionic/{p-0303d0f8.js → p-2e092bfc.js} +1 -1
  412. package/dist/ionic/{p-4439fc2a.entry.js → p-2e25154e.entry.js} +1 -1
  413. package/dist/ionic/p-33e4b80b.entry.js +4 -0
  414. package/dist/ionic/p-39d3c108.entry.js +4 -0
  415. package/dist/ionic/{p-1e010627.system.entry.js → p-39f7d87a.system.entry.js} +1 -1
  416. package/dist/ionic/{p-b335ffed.system.entry.js → p-3be897c8.system.entry.js} +1 -1
  417. package/dist/ionic/{p-5da94421.system.js → p-3e9fea9e.system.js} +1 -1
  418. package/dist/ionic/{p-88e63c7d.js → p-40b63137.js} +1 -1
  419. package/dist/ionic/{p-63b0abde.system.entry.js → p-47dc25dc.system.entry.js} +1 -1
  420. package/dist/ionic/p-48da821c.system.js +4 -0
  421. package/dist/ionic/p-49e8212a.entry.js +4 -0
  422. package/dist/ionic/p-4c553a2a.system.entry.js +4 -0
  423. package/dist/ionic/{p-6499df44.system.entry.js → p-4e9cfad5.system.entry.js} +2 -2
  424. package/dist/ionic/{p-5823babc.system.entry.js → p-50d264fa.system.entry.js} +1 -1
  425. package/dist/ionic/{p-7ddc46c3.system.entry.js → p-515d6848.system.entry.js} +1 -1
  426. package/dist/ionic/{p-ca065903.system.entry.js → p-548a72aa.system.entry.js} +1 -1
  427. package/dist/ionic/p-550a3b74.system.entry.js +4 -0
  428. package/dist/ionic/p-56b2ba69.system.entry.js +4 -0
  429. package/dist/ionic/{p-21e5e7e4.js → p-576c3a98.js} +1 -1
  430. package/dist/ionic/{p-14be4015.entry.js → p-58f53534.entry.js} +1 -1
  431. package/dist/ionic/p-5d9ac963.entry.js +4 -0
  432. package/dist/ionic/p-5ed6403e.system.entry.js +4 -0
  433. package/dist/ionic/{p-2507278c.system.entry.js → p-639d0578.system.entry.js} +1 -1
  434. package/dist/ionic/p-64bbdc67.entry.js +4 -0
  435. package/dist/ionic/p-65d01407.entry.js +4 -0
  436. package/dist/ionic/p-6b2e506b.entry.js +4 -0
  437. package/dist/ionic/{p-fca6ef5f.system.entry.js → p-6b6a8f94.system.entry.js} +1 -1
  438. package/dist/ionic/{p-7ed1657c.system.entry.js → p-6d119deb.system.entry.js} +1 -1
  439. package/dist/ionic/p-7148eaf9.system.js +4 -0
  440. package/dist/ionic/p-72bfbdb8.entry.js +4 -0
  441. package/dist/ionic/{p-d743e981.js → p-782beb5a.js} +1 -1
  442. package/dist/ionic/{p-a61cba41.entry.js → p-78667ff0.entry.js} +1 -1
  443. package/dist/ionic/{p-69666e8a.system.entry.js → p-78c786a5.system.entry.js} +2 -2
  444. package/dist/ionic/{p-3c8e5c23.system.js → p-7a1241fe.system.js} +1 -1
  445. package/dist/ionic/p-7b5771f9.entry.js +4 -0
  446. package/dist/ionic/p-7e58bbf9.system.js +5 -0
  447. package/dist/ionic/p-81757650.entry.js +4 -0
  448. package/dist/ionic/{p-14e159ea.system.entry.js → p-825e7bd7.system.entry.js} +1 -1
  449. package/dist/ionic/{p-6d32975a.entry.js → p-8318c25d.entry.js} +1 -1
  450. package/dist/ionic/p-861176bf.js +5 -0
  451. package/dist/ionic/p-87a5a16c.system.entry.js +4 -0
  452. package/dist/ionic/{p-f3102647.system.entry.js → p-87ce1c7b.system.entry.js} +1 -1
  453. package/dist/ionic/p-8dd3da91.entry.js +4 -0
  454. package/dist/ionic/p-8e640927.entry.js +4 -0
  455. package/dist/ionic/{p-ecceeb90.js → p-8ef7a3d4.js} +1 -1
  456. package/dist/ionic/{p-5fce0c0b.system.entry.js → p-900bf295.system.entry.js} +1 -1
  457. package/dist/ionic/{p-bc36ad98.system.entry.js → p-9437291a.system.entry.js} +1 -1
  458. package/dist/ionic/{p-372ae7f4.system.js → p-95902a17.system.js} +1 -1
  459. package/dist/ionic/p-976cffa3.js +4 -0
  460. package/dist/ionic/p-9a87fe2d.entry.js +4 -0
  461. package/dist/ionic/{p-1046866e.system.entry.js → p-9b48727c.system.entry.js} +1 -1
  462. package/dist/ionic/p-a049797d.system.entry.js +4 -0
  463. package/dist/ionic/p-a09686af.system.entry.js +4 -0
  464. package/dist/ionic/p-aa92906a.entry.js +4 -0
  465. package/dist/ionic/{p-2e46590d.system.entry.js → p-ae304d51.system.entry.js} +1 -1
  466. package/dist/ionic/p-ae830361.entry.js +4 -0
  467. package/dist/ionic/p-aee73160.entry.js +4 -0
  468. package/dist/ionic/p-af19e17f.entry.js +4 -0
  469. package/dist/ionic/{p-c449820c.system.js → p-b13c5a74.system.js} +1 -1
  470. package/dist/ionic/p-b5400a4e.entry.js +4 -0
  471. package/dist/ionic/{p-2bd0ae94.system.entry.js → p-b84b4728.system.entry.js} +2 -2
  472. package/dist/ionic/p-bc35609f.system.entry.js +4 -0
  473. package/dist/ionic/p-c29e3a26.entry.js +4 -0
  474. package/dist/ionic/p-c468af8a.system.js +4 -0
  475. package/dist/ionic/p-c5bbf6c1.system.entry.js +4 -0
  476. package/dist/ionic/{p-a69b9fc5.system.js → p-c7d9e292.system.js} +1 -1
  477. package/dist/ionic/{p-2abae1cc.system.entry.js → p-ccba2087.system.entry.js} +1 -1
  478. package/dist/ionic/{p-567de071.system.entry.js → p-cdf6fc3a.system.entry.js} +1 -1
  479. package/dist/ionic/{p-f9a53abb.system.js → p-cec30029.system.js} +1 -1
  480. package/dist/ionic/p-d3e8f550.entry.js +4 -0
  481. package/dist/ionic/{p-37cb43bd.system.entry.js → p-d46804b1.system.entry.js} +1 -1
  482. package/dist/ionic/p-d47265c8.js +4 -0
  483. package/dist/ionic/p-da1d2cb3.entry.js +4 -0
  484. package/dist/ionic/p-dbdccd05.entry.js +4 -0
  485. package/dist/ionic/p-dc480111.entry.js +4 -0
  486. package/dist/ionic/{p-e4f69534.system.entry.js → p-dc75988a.system.entry.js} +1 -1
  487. package/dist/ionic/{p-0aa833fb.system.js → p-de104ff8.system.js} +1 -1
  488. package/dist/ionic/{p-16799667.system.entry.js → p-e3177e13.system.entry.js} +1 -1
  489. package/dist/ionic/p-e4e3296d.system.js +4 -0
  490. package/dist/ionic/{p-ebf042e0.system.entry.js → p-e8d1ae44.system.entry.js} +1 -1
  491. package/dist/ionic/{p-0574e87e.js → p-e992e256.js} +1 -1
  492. package/dist/ionic/p-eb82a2ad.entry.js +4 -0
  493. package/dist/ionic/p-ebef8e16.system.entry.js +4 -0
  494. package/dist/ionic/p-f03983ca.system.entry.js +4 -0
  495. package/dist/ionic/p-f244eea8.system.entry.js +4 -0
  496. package/dist/ionic/p-f2e5ec87.entry.js +4 -0
  497. package/dist/ionic/{p-f1acf541.system.entry.js → p-f5aef6f1.system.entry.js} +1 -1
  498. package/dist/ionic/p-f5b1cfba.entry.js +4 -0
  499. package/dist/ionic/p-f8ff5ad1.entry.js +4 -0
  500. package/dist/ionic/p-fa459c81.entry.js +4 -0
  501. package/dist/ionic/p-fa7120fe.entry.js +4 -0
  502. package/dist/ionic/{p-52d7a191.entry.js → p-fbebb25d.entry.js} +1 -1
  503. package/dist/ionic/{p-b2272f51.system.entry.js → p-fc8bdbc9.system.entry.js} +1 -1
  504. package/dist/ionic/{p-2799c6d3.system.entry.js → p-fca658be.system.entry.js} +1 -1
  505. package/dist/ionic/p-fdb92b6d.entry.js +4 -0
  506. package/dist/ionic/{p-e6635685.js → p-fe10600c.js} +1 -1
  507. package/dist/ionic/p-fe5dca01.system.entry.js +4 -0
  508. package/dist/ionic/p-fe6ab8d4.entry.js +4 -0
  509. package/dist/ionic/p-fee6c9c2.system.entry.js +4 -0
  510. package/dist/types/stencil-public-runtime.d.ts +6 -0
  511. package/hydrate/index.d.ts +10 -4
  512. package/hydrate/index.js +3057 -1456
  513. package/hydrate/index.mjs +3057 -1456
  514. package/package.json +3 -3
  515. package/dist/esm-es5/app-globals-5dbb61a5.js +0 -4
  516. package/dist/esm-es5/focus-visible-ea5a37bc.js +0 -4
  517. package/dist/esm-es5/index-28849c61.js +0 -5
  518. package/dist/esm-es5/md.transition-5106a0d2.js +0 -4
  519. package/dist/ionic/p-01186920.system.entry.js +0 -4
  520. package/dist/ionic/p-021c1da5.js +0 -4
  521. package/dist/ionic/p-081a4ce4.entry.js +0 -4
  522. package/dist/ionic/p-0bf0e55c.entry.js +0 -4
  523. package/dist/ionic/p-0c786bdf.system.entry.js +0 -4
  524. package/dist/ionic/p-12a722b8.system.entry.js +0 -4
  525. package/dist/ionic/p-141f79c7.entry.js +0 -4
  526. package/dist/ionic/p-15e76dd1.entry.js +0 -4
  527. package/dist/ionic/p-16188af7.entry.js +0 -4
  528. package/dist/ionic/p-16bfb979.system.entry.js +0 -4
  529. package/dist/ionic/p-17474161.system.js +0 -4
  530. package/dist/ionic/p-19ec4f42.entry.js +0 -4
  531. package/dist/ionic/p-1e67b266.system.entry.js +0 -4
  532. package/dist/ionic/p-2172893e.system.entry.js +0 -4
  533. package/dist/ionic/p-25180df3.system.js +0 -5
  534. package/dist/ionic/p-2b838f86.system.entry.js +0 -4
  535. package/dist/ionic/p-2b9b78c7.entry.js +0 -4
  536. package/dist/ionic/p-2fc0dafe.entry.js +0 -4
  537. package/dist/ionic/p-45693d7e.entry.js +0 -4
  538. package/dist/ionic/p-49a0e74c.entry.js +0 -4
  539. package/dist/ionic/p-4ec778aa.entry.js +0 -4
  540. package/dist/ionic/p-508d024a.entry.js +0 -4
  541. package/dist/ionic/p-58d5df0c.system.entry.js +0 -4
  542. package/dist/ionic/p-5ab1b709.entry.js +0 -4
  543. package/dist/ionic/p-5b932840.entry.js +0 -4
  544. package/dist/ionic/p-626fd66d.system.entry.js +0 -4
  545. package/dist/ionic/p-62af944c.entry.js +0 -4
  546. package/dist/ionic/p-66640ff7.system.entry.js +0 -4
  547. package/dist/ionic/p-69066a53.js +0 -4
  548. package/dist/ionic/p-6b280620.entry.js +0 -4
  549. package/dist/ionic/p-6d6cedc5.entry.js +0 -4
  550. package/dist/ionic/p-73dc4950.entry.js +0 -4
  551. package/dist/ionic/p-7458862e.system.entry.js +0 -4
  552. package/dist/ionic/p-797eeea8.system.entry.js +0 -4
  553. package/dist/ionic/p-7b9a2b23.entry.js +0 -4
  554. package/dist/ionic/p-8a5b9491.system.entry.js +0 -4
  555. package/dist/ionic/p-908d6080.entry.js +0 -4
  556. package/dist/ionic/p-937a7e21.entry.js +0 -4
  557. package/dist/ionic/p-942b5e13.entry.js +0 -4
  558. package/dist/ionic/p-95775830.entry.js +0 -4
  559. package/dist/ionic/p-982315a6.entry.js +0 -4
  560. package/dist/ionic/p-98231c01.system.entry.js +0 -4
  561. package/dist/ionic/p-985a7e17.system.entry.js +0 -4
  562. package/dist/ionic/p-98ff6b32.entry.js +0 -4
  563. package/dist/ionic/p-9df2c6fb.entry.js +0 -4
  564. package/dist/ionic/p-9ee1e8a6.entry.js +0 -4
  565. package/dist/ionic/p-9f3008d4.system.js +0 -4
  566. package/dist/ionic/p-9fa07aec.entry.js +0 -4
  567. package/dist/ionic/p-a43467d8.entry.js +0 -4
  568. package/dist/ionic/p-a49378bb.system.entry.js +0 -4
  569. package/dist/ionic/p-afecb188.entry.js +0 -4
  570. package/dist/ionic/p-b79ba17c.entry.js +0 -4
  571. package/dist/ionic/p-b82d4cab.js +0 -4
  572. package/dist/ionic/p-b9d7015f.entry.js +0 -4
  573. package/dist/ionic/p-bb0db172.entry.js +0 -4
  574. package/dist/ionic/p-bdad26e3.entry.js +0 -4
  575. package/dist/ionic/p-c29f8157.system.entry.js +0 -4
  576. package/dist/ionic/p-c41ac815.entry.js +0 -4
  577. package/dist/ionic/p-c4b53b16.system.entry.js +0 -4
  578. package/dist/ionic/p-c9f3a539.entry.js +0 -4
  579. package/dist/ionic/p-cdc83025.entry.js +0 -4
  580. package/dist/ionic/p-cf130350.system.js +0 -4
  581. package/dist/ionic/p-d18ab582.system.entry.js +0 -4
  582. package/dist/ionic/p-d7aa6b00.entry.js +0 -4
  583. package/dist/ionic/p-d836d43e.js +0 -5
  584. package/dist/ionic/p-da074ff7.entry.js +0 -4
  585. package/dist/ionic/p-de930745.entry.js +0 -4
  586. package/dist/ionic/p-e4ee80be.system.entry.js +0 -4
  587. package/dist/ionic/p-e563a35c.entry.js +0 -4
  588. package/dist/ionic/p-e7ed4a7f.system.js +0 -4
  589. package/dist/ionic/p-eba29931.entry.js +0 -4
  590. package/dist/ionic/p-efaffe74.entry.js +0 -4
  591. package/dist/ionic/p-fec61c32.entry.js +0 -4
@@ -24,10 +24,10 @@ function _interopNamespace(e) {
24
24
  }
25
25
 
26
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 };
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, modernPropertyDecls: false, 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 };
28
28
 
29
29
  /*
30
- Stencil Client Platform v4.20.0 | MIT Licensed | https://stenciljs.com
30
+ Stencil Client Platform v4.23.2 | MIT Licensed | https://stenciljs.com
31
31
  */
32
32
  var __defProp = Object.defineProperty;
33
33
  var __export = (target, all) => {
@@ -40,9 +40,17 @@ var Build = {
40
40
  isServer: false,
41
41
  isTesting: false
42
42
  };
43
+
44
+ // src/utils/constants.ts
45
+ var SVG_NS = "http://www.w3.org/2000/svg";
46
+ var HTML_NS = "http://www.w3.org/1999/xhtml";
47
+
48
+ // src/client/client-host-ref.ts
43
49
  var hostRefs = /* @__PURE__ */ new WeakMap();
44
50
  var getHostRef = (ref) => hostRefs.get(ref);
45
- var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
51
+ var registerInstance = (lazyInstance, hostRef) => {
52
+ hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
53
+ };
46
54
  var registerHost = (hostElement, cmpMeta) => {
47
55
  const hostRef = {
48
56
  $flags$: 0,
@@ -58,7 +66,8 @@ var registerHost = (hostElement, cmpMeta) => {
58
66
  hostElement["s-p"] = [];
59
67
  hostElement["s-rc"] = [];
60
68
  }
61
- return hostRefs.set(hostElement, hostRef);
69
+ const ref = hostRefs.set(hostElement, hostRef);
70
+ return ref;
62
71
  };
63
72
  var isMemberInElement = (elm, memberName) => memberName in elm;
64
73
  var consoleError = (e, el) => (0, console.error)(e, el);
@@ -99,6 +108,7 @@ var CONTENT_REF_ID = "r";
99
108
  var ORG_LOCATION_ID = "o";
100
109
  var SLOT_NODE_ID = "s";
101
110
  var TEXT_NODE_ID = "t";
111
+ var COMMENT_NODE_ID = "c";
102
112
  var HYDRATE_ID = "s-id";
103
113
  var HYDRATED_STYLE_ID = "sty-id";
104
114
  var HYDRATE_CHILD_ID = "c-id";
@@ -190,13 +200,8 @@ var getAssetPath = (path) => {
190
200
  return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
191
201
  };
192
202
 
193
- // src/utils/constants.ts
194
- var EMPTY_OBJ = {};
195
- var SVG_NS = "http://www.w3.org/2000/svg";
196
- var HTML_NS = "http://www.w3.org/1999/xhtml";
197
-
198
203
  // src/utils/helpers.ts
199
- var isDef = (v) => v != null;
204
+ var isDef = (v) => v != null && v !== void 0;
200
205
  var isComplexType = (o) => {
201
206
  o = typeof o;
202
207
  return o === "object" || o === "function";
@@ -256,20 +261,106 @@ var unwrapErr = (result) => {
256
261
  throw result.value;
257
262
  }
258
263
  };
259
- var createTime = (fnName, tagName = "") => {
260
- {
261
- return () => {
262
- return;
263
- };
264
+ var updateFallbackSlotVisibility = (elm) => {
265
+ const childNodes = elm.__childNodes || elm.childNodes;
266
+ if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
267
+ getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
268
+ var _a;
269
+ if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
270
+ if ((_a = getHostSlotChildNodes(slotNode, slotNode["s-sn"], false)) == null ? void 0 : _a.length) {
271
+ slotNode.hidden = true;
272
+ } else {
273
+ slotNode.hidden = false;
274
+ }
275
+ }
276
+ });
277
+ }
278
+ for (const childNode of childNodes) {
279
+ if (childNode.nodeType === 1 /* ElementNode */ && (childNode.__childNodes || childNode.childNodes).length) {
280
+ updateFallbackSlotVisibility(childNode);
281
+ }
264
282
  }
265
283
  };
266
- var uniqueTime = (key, measureText) => {
267
- {
268
- return () => {
269
- return;
270
- };
284
+ var getSlottedChildNodes = (childNodes) => {
285
+ const result = [];
286
+ for (let i2 = 0; i2 < childNodes.length; i2++) {
287
+ const slottedNode = childNodes[i2]["s-nr"];
288
+ if (slottedNode && slottedNode.isConnected) {
289
+ result.push(slottedNode);
290
+ }
291
+ }
292
+ return result;
293
+ };
294
+ var getHostSlotNodes = (childNodes, hostName, slotName) => {
295
+ let i2 = 0;
296
+ let slottedNodes = [];
297
+ let childNode;
298
+ for (; i2 < childNodes.length; i2++) {
299
+ childNode = childNodes[i2];
300
+ if (childNode["s-sr"] && childNode["s-hn"] === hostName && (!slotName || childNode["s-sn"] === slotName)) {
301
+ slottedNodes.push(childNode);
302
+ if (typeof slotName !== "undefined") return slottedNodes;
303
+ }
304
+ slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
305
+ }
306
+ return slottedNodes;
307
+ };
308
+ var getHostSlotChildNodes = (node, slotName, includeSlot = true) => {
309
+ const childNodes = [];
310
+ if (includeSlot && node["s-sr"] || !node["s-sr"]) childNodes.push(node);
311
+ while ((node = node.nextSibling) && node["s-sn"] === slotName) {
312
+ childNodes.push(node);
313
+ }
314
+ return childNodes;
315
+ };
316
+ var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
317
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
318
+ if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
319
+ return true;
320
+ }
321
+ if (nodeToRelocate.getAttribute("slot") === slotName) {
322
+ return true;
323
+ }
324
+ return false;
325
+ }
326
+ if (nodeToRelocate["s-sn"] === slotName) {
327
+ return true;
328
+ }
329
+ return slotName === "";
330
+ };
331
+ var addSlotRelocateNode = (newChild, slotNode, prepend, position) => {
332
+ let slottedNodeLocation;
333
+ if (newChild["s-ol"] && newChild["s-ol"].isConnected) {
334
+ slottedNodeLocation = newChild["s-ol"];
335
+ } else {
336
+ slottedNodeLocation = document.createTextNode("");
337
+ slottedNodeLocation["s-nr"] = newChild;
338
+ }
339
+ if (!slotNode["s-cr"] || !slotNode["s-cr"].parentNode) return;
340
+ const parent = slotNode["s-cr"].parentNode;
341
+ const appendMethod = prepend ? parent.__prepend || parent.prepend : parent.__appendChild || parent.appendChild;
342
+ if (typeof position !== "undefined") {
343
+ {
344
+ slottedNodeLocation["s-oo"] = position;
345
+ const childNodes = parent.__childNodes || parent.childNodes;
346
+ const slotRelocateNodes = [slottedNodeLocation];
347
+ childNodes.forEach((n) => {
348
+ if (n["s-nr"]) slotRelocateNodes.push(n);
349
+ });
350
+ slotRelocateNodes.sort((a, b) => {
351
+ if (!a["s-oo"] || a["s-oo"] < b["s-oo"]) return -1;
352
+ else if (!b["s-oo"] || b["s-oo"] < a["s-oo"]) return 1;
353
+ return 0;
354
+ });
355
+ slotRelocateNodes.forEach((n) => appendMethod.call(parent, n));
356
+ }
357
+ } else {
358
+ appendMethod.call(parent, slottedNodeLocation);
271
359
  }
360
+ newChild["s-ol"] = slottedNodeLocation;
361
+ newChild["s-sh"] = slotNode["s-hn"];
272
362
  };
363
+ var getSlotName = (node) => node["s-sn"] || node.nodeType === 1 && node.getAttribute("slot") || "";
273
364
  var h = (nodeName, vnodeData, ...children) => {
274
365
  let child = null;
275
366
  let key = null;
@@ -381,431 +472,134 @@ var convertToPrivate = (node) => {
381
472
  vnode.$name$ = node.vname;
382
473
  return vnode;
383
474
  };
384
-
385
- // src/runtime/client-hydrate.ts
386
- var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
387
- const endHydrate = createTime("hydrateClient", tagName);
388
- const shadowRoot = hostElm.shadowRoot;
389
- const childRenderNodes = [];
390
- const slotNodes = [];
391
- const shadowRootNodes = shadowRoot ? [] : null;
392
- const vnode = hostRef.$vnode$ = newVNode(tagName, null);
393
- if (!plt.$orgLocNodes$) {
394
- initializeDocumentHydrate(doc.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
395
- }
396
- hostElm[HYDRATE_ID] = hostId;
397
- hostElm.removeAttribute(HYDRATE_ID);
398
- clientHydrate(vnode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, hostElm, hostId);
399
- childRenderNodes.map((c) => {
400
- const orgLocationId = c.$hostId$ + "." + c.$nodeId$;
401
- const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
402
- const node = c.$elm$;
403
- if (orgLocationNode && supportsShadow && orgLocationNode["s-en"] === "") {
404
- orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
405
- }
406
- if (!shadowRoot) {
407
- node["s-hn"] = tagName;
408
- if (orgLocationNode) {
409
- node["s-ol"] = orgLocationNode;
410
- node["s-ol"]["s-nr"] = node;
411
- }
412
- }
413
- plt.$orgLocNodes$.delete(orgLocationId);
414
- });
415
- if (shadowRoot) {
416
- shadowRootNodes.map((shadowRootNode) => {
417
- if (shadowRootNode) {
418
- shadowRoot.appendChild(shadowRootNode);
475
+ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
476
+ if (oldValue !== newValue) {
477
+ let isProp = isMemberInElement(elm, memberName);
478
+ let ln = memberName.toLowerCase();
479
+ if (memberName === "class") {
480
+ const classList = elm.classList;
481
+ const oldClasses = parseClassList(oldValue);
482
+ let newClasses = parseClassList(newValue);
483
+ if (elm["s-si"]) {
484
+ newClasses.push(elm["s-si"]);
485
+ oldClasses.forEach((c) => {
486
+ if (c.startsWith(elm["s-si"])) newClasses.push(c);
487
+ });
488
+ newClasses = [...new Set(newClasses)];
489
+ classList.add(...newClasses);
490
+ delete elm["s-si"];
491
+ } else {
492
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
493
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
419
494
  }
420
- });
421
- }
422
- endHydrate();
423
- };
424
- var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId) => {
425
- let childNodeType;
426
- let childIdSplt;
427
- let childVNode;
428
- let i2;
429
- if (node.nodeType === 1 /* ElementNode */) {
430
- childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
431
- if (childNodeType) {
432
- childIdSplt = childNodeType.split(".");
433
- if (childIdSplt[0] === hostId || childIdSplt[0] === "0") {
434
- childVNode = {
435
- $flags$: 0,
436
- $hostId$: childIdSplt[0],
437
- $nodeId$: childIdSplt[1],
438
- $depth$: childIdSplt[2],
439
- $index$: childIdSplt[3],
440
- $tag$: node.tagName.toLowerCase(),
441
- $elm$: node,
442
- $attrs$: null,
443
- $children$: null,
444
- $key$: null,
445
- $name$: null,
446
- $text$: null
447
- };
448
- childRenderNodes.push(childVNode);
449
- node.removeAttribute(HYDRATE_CHILD_ID);
450
- if (!parentVNode.$children$) {
451
- parentVNode.$children$ = [];
495
+ } else if (memberName === "style") {
496
+ {
497
+ for (const prop in oldValue) {
498
+ if (!newValue || newValue[prop] == null) {
499
+ if (prop.includes("-")) {
500
+ elm.style.removeProperty(prop);
501
+ } else {
502
+ elm.style[prop] = "";
503
+ }
504
+ }
452
505
  }
453
- parentVNode.$children$[childVNode.$index$] = childVNode;
454
- parentVNode = childVNode;
455
- if (shadowRootNodes && childVNode.$depth$ === "0") {
456
- shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
506
+ }
507
+ for (const prop in newValue) {
508
+ if (!oldValue || newValue[prop] !== oldValue[prop]) {
509
+ if (prop.includes("-")) {
510
+ elm.style.setProperty(prop, newValue[prop]);
511
+ } else {
512
+ elm.style[prop] = newValue[prop];
513
+ }
457
514
  }
458
515
  }
459
- }
460
- if (node.shadowRoot) {
461
- for (i2 = node.shadowRoot.childNodes.length - 1; i2 >= 0; i2--) {
462
- clientHydrate(
463
- parentVNode,
464
- childRenderNodes,
465
- slotNodes,
466
- shadowRootNodes,
467
- hostElm,
468
- node.shadowRoot.childNodes[i2],
469
- hostId
470
- );
516
+ } else if (memberName === "key") ; else if (memberName === "ref") {
517
+ if (newValue) {
518
+ newValue(elm);
471
519
  }
472
- }
473
- for (i2 = node.childNodes.length - 1; i2 >= 0; i2--) {
474
- clientHydrate(
475
- parentVNode,
476
- childRenderNodes,
477
- slotNodes,
478
- shadowRootNodes,
479
- hostElm,
480
- node.childNodes[i2],
481
- hostId
482
- );
483
- }
484
- } else if (node.nodeType === 8 /* CommentNode */) {
485
- childIdSplt = node.nodeValue.split(".");
486
- if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
487
- childNodeType = childIdSplt[0];
488
- childVNode = {
489
- $flags$: 0,
490
- $hostId$: childIdSplt[1],
491
- $nodeId$: childIdSplt[2],
492
- $depth$: childIdSplt[3],
493
- $index$: childIdSplt[4],
494
- $elm$: node,
495
- $attrs$: null,
496
- $children$: null,
497
- $key$: null,
498
- $name$: null,
499
- $tag$: null,
500
- $text$: null
501
- };
502
- if (childNodeType === TEXT_NODE_ID) {
503
- childVNode.$elm$ = node.nextSibling;
504
- if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
505
- childVNode.$text$ = childVNode.$elm$.textContent;
506
- childRenderNodes.push(childVNode);
507
- node.remove();
508
- if (!parentVNode.$children$) {
509
- parentVNode.$children$ = [];
510
- }
511
- parentVNode.$children$[childVNode.$index$] = childVNode;
512
- if (shadowRootNodes && childVNode.$depth$ === "0") {
513
- shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
514
- }
520
+ } else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
521
+ if (memberName[2] === "-") {
522
+ memberName = memberName.slice(3);
523
+ } else if (isMemberInElement(win, ln)) {
524
+ memberName = ln.slice(2);
525
+ } else {
526
+ memberName = ln[2] + memberName.slice(3);
527
+ }
528
+ if (oldValue || newValue) {
529
+ const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
530
+ memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
531
+ if (oldValue) {
532
+ plt.rel(elm, memberName, oldValue, capture);
515
533
  }
516
- } else if (childVNode.$hostId$ === hostId) {
517
- if (childNodeType === SLOT_NODE_ID) {
518
- childVNode.$tag$ = "slot";
519
- if (childIdSplt[5]) {
520
- node["s-sn"] = childVNode.$name$ = childIdSplt[5];
521
- } else {
522
- node["s-sn"] = "";
523
- }
524
- node["s-sr"] = true;
525
- if (shadowRootNodes) {
526
- childVNode.$elm$ = doc.createElement(childVNode.$tag$);
527
- if (childVNode.$name$) {
528
- childVNode.$elm$.setAttribute("name", childVNode.$name$);
529
- }
530
- node.parentNode.insertBefore(childVNode.$elm$, node);
531
- node.remove();
532
- if (childVNode.$depth$ === "0") {
533
- shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
534
+ if (newValue) {
535
+ plt.ael(elm, memberName, newValue, capture);
536
+ }
537
+ }
538
+ } else {
539
+ const isComplex = isComplexType(newValue);
540
+ if ((isProp || isComplex && newValue !== null) && !isSvg) {
541
+ try {
542
+ if (!elm.tagName.includes("-")) {
543
+ const n = newValue == null ? "" : newValue;
544
+ if (memberName === "list") {
545
+ isProp = false;
546
+ } else if (oldValue == null || elm[memberName] != n) {
547
+ if (typeof elm.__lookupSetter__(memberName) === "function") {
548
+ elm[memberName] = n;
549
+ } else {
550
+ elm.setAttribute(memberName, n);
551
+ }
534
552
  }
553
+ } else {
554
+ elm[memberName] = newValue;
535
555
  }
536
- slotNodes.push(childVNode);
537
- if (!parentVNode.$children$) {
538
- parentVNode.$children$ = [];
539
- }
540
- parentVNode.$children$[childVNode.$index$] = childVNode;
541
- } else if (childNodeType === CONTENT_REF_ID) {
542
- if (shadowRootNodes) {
543
- node.remove();
556
+ } catch (e) {
557
+ }
558
+ }
559
+ let xlink = false;
560
+ {
561
+ if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
562
+ memberName = ln;
563
+ xlink = true;
564
+ }
565
+ }
566
+ if (newValue == null || newValue === false) {
567
+ if (newValue !== false || elm.getAttribute(memberName) === "") {
568
+ if (xlink) {
569
+ elm.removeAttributeNS(XLINK_NS, memberName);
544
570
  } else {
545
- hostElm["s-cr"] = node;
546
- node["s-cn"] = true;
571
+ elm.removeAttribute(memberName);
547
572
  }
548
573
  }
574
+ } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
575
+ newValue = newValue === true ? "" : newValue;
576
+ if (xlink) {
577
+ elm.setAttributeNS(XLINK_NS, memberName, newValue);
578
+ } else {
579
+ elm.setAttribute(memberName, newValue);
580
+ }
549
581
  }
550
582
  }
551
- } else if (parentVNode && parentVNode.$tag$ === "style") {
552
- const vnode = newVNode(null, node.textContent);
553
- vnode.$elm$ = node;
554
- vnode.$index$ = "0";
555
- parentVNode.$children$ = [vnode];
556
- }
557
- };
558
- var initializeDocumentHydrate = (node, orgLocNodes) => {
559
- if (node.nodeType === 1 /* ElementNode */) {
560
- let i2 = 0;
561
- if (node.shadowRoot) {
562
- for (; i2 < node.shadowRoot.childNodes.length; i2++) {
563
- initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
564
- }
565
- }
566
- for (i2 = 0; i2 < node.childNodes.length; i2++) {
567
- initializeDocumentHydrate(node.childNodes[i2], orgLocNodes);
568
- }
569
- } else if (node.nodeType === 8 /* CommentNode */) {
570
- const childIdSplt = node.nodeValue.split(".");
571
- if (childIdSplt[0] === ORG_LOCATION_ID) {
572
- orgLocNodes.set(childIdSplt[1] + "." + childIdSplt[2], node);
573
- node.nodeValue = "";
574
- node["s-en"] = childIdSplt[3];
575
- }
576
- }
577
- };
578
-
579
- // src/runtime/mode.ts
580
- var computeMode = (elm) => modeResolutionChain.map((h2) => h2(elm)).find((m) => !!m);
581
- var setMode = (handler) => modeResolutionChain.push(handler);
582
- var getMode = (ref) => getHostRef(ref).$modeName$;
583
- var parsePropertyValue = (propValue, propType) => {
584
- if (propValue != null && !isComplexType(propValue)) {
585
- if (propType & 4 /* Boolean */) {
586
- return propValue === "false" ? false : propValue === "" || !!propValue;
587
- }
588
- if (propType & 2 /* Number */) {
589
- return parseFloat(propValue);
590
- }
591
- if (propType & 1 /* String */) {
592
- return String(propValue);
593
- }
594
- return propValue;
595
- }
596
- return propValue;
597
- };
598
- var getElement = (ref) => getHostRef(ref).$hostElement$ ;
599
-
600
- // src/runtime/event-emitter.ts
601
- var createEvent = (ref, name, flags) => {
602
- const elm = getElement(ref);
603
- return {
604
- emit: (detail) => {
605
- return emitEvent(elm, name, {
606
- bubbles: !!(flags & 4 /* Bubbles */),
607
- composed: !!(flags & 2 /* Composed */),
608
- cancelable: !!(flags & 1 /* Cancellable */),
609
- detail
610
- });
611
- }
612
- };
613
- };
614
- var emitEvent = (elm, name, opts) => {
615
- const ev = plt.ce(name, opts);
616
- elm.dispatchEvent(ev);
617
- return ev;
618
- };
619
- var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
620
- var registerStyle = (scopeId2, cssText, allowCS) => {
621
- let style = styles.get(scopeId2);
622
- if (supportsConstructableStylesheets && allowCS) {
623
- style = style || new CSSStyleSheet();
624
- if (typeof style === "string") {
625
- style = cssText;
626
- } else {
627
- style.replaceSync(cssText);
628
- }
629
- } else {
630
- style = cssText;
631
- }
632
- styles.set(scopeId2, style);
633
- };
634
- var addStyle = (styleContainerNode, cmpMeta, mode) => {
635
- var _a;
636
- const scopeId2 = getScopeId(cmpMeta, mode);
637
- const style = styles.get(scopeId2);
638
- styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
639
- if (style) {
640
- if (typeof style === "string") {
641
- styleContainerNode = styleContainerNode.head || styleContainerNode;
642
- let appliedStyles = rootAppliedStyles.get(styleContainerNode);
643
- let styleElm;
644
- if (!appliedStyles) {
645
- rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
646
- }
647
- if (!appliedStyles.has(scopeId2)) {
648
- if (styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
649
- styleElm.innerHTML = style;
650
- } else {
651
- styleElm = doc.createElement("style");
652
- styleElm.innerHTML = style;
653
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
654
- if (nonce != null) {
655
- styleElm.setAttribute("nonce", nonce);
656
- }
657
- const injectStyle = (
658
- /**
659
- * we render a scoped component
660
- */
661
- !(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) || /**
662
- * we are using shadow dom and render the style tag within the shadowRoot
663
- */
664
- cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD"
665
- );
666
- if (injectStyle) {
667
- styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
668
- }
669
- }
670
- if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
671
- styleElm.innerHTML += SLOT_FB_CSS;
672
- }
673
- if (appliedStyles) {
674
- appliedStyles.add(scopeId2);
675
- }
676
- }
677
- } else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
678
- styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
679
- }
680
583
  }
681
- return scopeId2;
682
584
  };
683
- var attachStyles = (hostRef) => {
684
- const cmpMeta = hostRef.$cmpMeta$;
685
- const elm = hostRef.$hostElement$;
686
- const flags = cmpMeta.$flags$;
687
- const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
688
- const scopeId2 = addStyle(
689
- elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
690
- cmpMeta,
691
- hostRef.$modeName$
692
- );
693
- if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
694
- elm["s-sc"] = scopeId2;
695
- elm.classList.add(scopeId2 + "-h");
696
- if (flags & 2 /* scopedCssEncapsulation */) {
697
- elm.classList.add(scopeId2 + "-s");
698
- }
585
+ var parseClassListRegex = /\s/;
586
+ var parseClassList = (value) => {
587
+ if (typeof value === "object" && "baseVal" in value) {
588
+ value = value.baseVal;
699
589
  }
700
- endAttachStyles();
701
- };
702
- var getScopeId = (cmp, mode) => "sc-" + (mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
703
- var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
704
- if (oldValue !== newValue) {
705
- let isProp = isMemberInElement(elm, memberName);
706
- let ln = memberName.toLowerCase();
707
- if (memberName === "class") {
708
- const classList = elm.classList;
709
- const oldClasses = parseClassList(oldValue);
710
- const newClasses = parseClassList(newValue);
711
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
712
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
713
- } else if (memberName === "style") {
714
- {
715
- for (const prop in oldValue) {
716
- if (!newValue || newValue[prop] == null) {
717
- if (prop.includes("-")) {
718
- elm.style.removeProperty(prop);
719
- } else {
720
- elm.style[prop] = "";
721
- }
722
- }
723
- }
724
- }
725
- for (const prop in newValue) {
726
- if (!oldValue || newValue[prop] !== oldValue[prop]) {
727
- if (prop.includes("-")) {
728
- elm.style.setProperty(prop, newValue[prop]);
729
- } else {
730
- elm.style[prop] = newValue[prop];
731
- }
732
- }
733
- }
734
- } else if (memberName === "key") ; else if (memberName === "ref") {
735
- if (newValue) {
736
- newValue(elm);
737
- }
738
- } else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
739
- if (memberName[2] === "-") {
740
- memberName = memberName.slice(3);
741
- } else if (isMemberInElement(win, ln)) {
742
- memberName = ln.slice(2);
743
- } else {
744
- memberName = ln[2] + memberName.slice(3);
745
- }
746
- if (oldValue || newValue) {
747
- const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
748
- memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
749
- if (oldValue) {
750
- plt.rel(elm, memberName, oldValue, capture);
751
- }
752
- if (newValue) {
753
- plt.ael(elm, memberName, newValue, capture);
754
- }
755
- }
756
- } else {
757
- const isComplex = isComplexType(newValue);
758
- if ((isProp || isComplex && newValue !== null) && !isSvg) {
759
- try {
760
- if (!elm.tagName.includes("-")) {
761
- const n = newValue == null ? "" : newValue;
762
- if (memberName === "list") {
763
- isProp = false;
764
- } else if (oldValue == null || elm[memberName] != n) {
765
- elm[memberName] = n;
766
- }
767
- } else {
768
- elm[memberName] = newValue;
769
- }
770
- } catch (e) {
771
- }
772
- }
773
- let xlink = false;
774
- {
775
- if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
776
- memberName = ln;
777
- xlink = true;
778
- }
779
- }
780
- if (newValue == null || newValue === false) {
781
- if (newValue !== false || elm.getAttribute(memberName) === "") {
782
- if (xlink) {
783
- elm.removeAttributeNS(XLINK_NS, memberName);
784
- } else {
785
- elm.removeAttribute(memberName);
786
- }
787
- }
788
- } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
789
- newValue = newValue === true ? "" : newValue;
790
- if (xlink) {
791
- elm.setAttributeNS(XLINK_NS, memberName, newValue);
792
- } else {
793
- elm.setAttribute(memberName, newValue);
794
- }
795
- }
796
- }
590
+ if (!value) {
591
+ return [];
797
592
  }
593
+ return value.split(parseClassListRegex);
798
594
  };
799
- var parseClassListRegex = /\s/;
800
- var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
801
595
  var CAPTURE_EVENT_SUFFIX = "Capture";
802
596
  var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
803
597
 
804
598
  // src/runtime/vdom/update-element.ts
805
599
  var updateElement = (oldVnode, newVnode, isSvgMode2) => {
806
600
  const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
807
- const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
808
- const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
601
+ const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
602
+ const newVnodeAttrs = newVnode.$attrs$ || {};
809
603
  {
810
604
  for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
811
605
  if (!(memberName in newVnodeAttrs)) {
@@ -835,7 +629,7 @@ var useNativeShadowDom = false;
835
629
  var checkSlotFallbackVisibility = false;
836
630
  var checkSlotRelocate = false;
837
631
  var isSvgMode = false;
838
- var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
632
+ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
839
633
  var _a;
840
634
  const newVNode2 = newParentVNode.$children$[childIndex];
841
635
  let i2 = 0;
@@ -845,9 +639,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
845
639
  if (!useNativeShadowDom) {
846
640
  checkSlotRelocate = true;
847
641
  if (newVNode2.$tag$ === "slot") {
848
- if (scopeId) {
849
- parentElm.classList.add(scopeId + "-s");
850
- }
851
642
  newVNode2.$flags$ |= newVNode2.$children$ ? (
852
643
  // slot element has fallback content
853
644
  // still create an element that "mocks" the slot element
@@ -878,17 +669,12 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
878
669
  {
879
670
  updateElement(null, newVNode2, isSvgMode);
880
671
  }
881
- const rootNode = elm.getRootNode();
882
- const isElementWithinShadowRoot = !rootNode.querySelector("body");
883
- if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
672
+ if (isDef(scopeId) && elm["s-si"] !== scopeId) {
884
673
  elm.classList.add(elm["s-si"] = scopeId);
885
674
  }
886
- {
887
- updateElementScopeIds(elm, parentElm);
888
- }
889
675
  if (newVNode2.$children$) {
890
676
  for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
891
- childNode = createElm(oldParentVNode, newVNode2, i2, elm);
677
+ childNode = createElm(oldParentVNode, newVNode2, i2);
892
678
  if (childNode) {
893
679
  elm.appendChild(childNode);
894
680
  }
@@ -915,6 +701,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
915
701
  relocateToHostRoot(oldParentVNode.$elm$);
916
702
  }
917
703
  }
704
+ {
705
+ addRemoveSlotScopedClass(contentRef, elm, newParentVNode.$elm$, oldParentVNode == null ? void 0 : oldParentVNode.$elm$);
706
+ }
918
707
  }
919
708
  }
920
709
  return elm;
@@ -923,8 +712,12 @@ var relocateToHostRoot = (parentElm) => {
923
712
  plt.$flags$ |= 1 /* isTmpDisconnected */;
924
713
  const host = parentElm.closest(hostTagName.toLowerCase());
925
714
  if (host != null) {
926
- const contentRefNode = Array.from(host.childNodes).find((ref) => ref["s-cr"]);
927
- const childNodeArray = Array.from(parentElm.childNodes);
715
+ const contentRefNode = Array.from(host.__childNodes || host.childNodes).find(
716
+ (ref) => ref["s-cr"]
717
+ );
718
+ const childNodeArray = Array.from(
719
+ parentElm.__childNodes || parentElm.childNodes
720
+ );
928
721
  for (const childNode of contentRefNode ? childNodeArray.reverse() : childNodeArray) {
929
722
  if (childNode["s-sh"] != null) {
930
723
  insertBefore(host, childNode, contentRefNode != null ? contentRefNode : null);
@@ -937,7 +730,7 @@ var relocateToHostRoot = (parentElm) => {
937
730
  };
938
731
  var putBackInOriginalLocation = (parentElm, recursive) => {
939
732
  plt.$flags$ |= 1 /* isTmpDisconnected */;
940
- const oldSlotChildNodes = Array.from(parentElm.childNodes);
733
+ const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
941
734
  if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
942
735
  let node = parentElm;
943
736
  while (node = node.nextSibling) {
@@ -949,7 +742,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
949
742
  for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
950
743
  const childNode = oldSlotChildNodes[i2];
951
744
  if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
952
- insertBefore(parentReferenceNode(childNode), childNode, referenceNode(childNode));
745
+ insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
953
746
  childNode["s-ol"].remove();
954
747
  childNode["s-ol"] = void 0;
955
748
  childNode["s-sh"] = void 0;
@@ -969,7 +762,7 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
969
762
  }
970
763
  for (; startIdx <= endIdx; ++startIdx) {
971
764
  if (vnodes[startIdx]) {
972
- childNode = createElm(null, parentVNode, startIdx, parentElm);
765
+ childNode = createElm(null, parentVNode, startIdx);
973
766
  if (childNode) {
974
767
  vnodes[startIdx].$elm$ = childNode;
975
768
  insertBefore(containerElm, childNode, referenceNode(before) );
@@ -1056,7 +849,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
1056
849
  if (idxInOld >= 0) {
1057
850
  elmToMove = oldCh[idxInOld];
1058
851
  if (elmToMove.$tag$ !== newStartVnode.$tag$) {
1059
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld, parentElm);
852
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
1060
853
  } else {
1061
854
  patch(elmToMove, newStartVnode, isInitialRender);
1062
855
  oldCh[idxInOld] = void 0;
@@ -1064,12 +857,16 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
1064
857
  }
1065
858
  newStartVnode = newCh[++newStartIdx];
1066
859
  } else {
1067
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx, parentElm);
860
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
1068
861
  newStartVnode = newCh[++newStartIdx];
1069
862
  }
1070
863
  if (node) {
1071
864
  {
1072
- insertBefore(parentReferenceNode(oldStartVnode.$elm$), node, referenceNode(oldStartVnode.$elm$));
865
+ insertBefore(
866
+ referenceNode(oldStartVnode.$elm$).parentNode,
867
+ node,
868
+ referenceNode(oldStartVnode.$elm$)
869
+ );
1073
870
  }
1074
871
  }
1075
872
  }
@@ -1090,28 +887,19 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
1090
887
  var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
1091
888
  if (leftVNode.$tag$ === rightVNode.$tag$) {
1092
889
  if (leftVNode.$tag$ === "slot") {
1093
- if (
1094
- // The component gets hydrated and no VDOM has been initialized.
1095
- // Here the comparison can't happen as $name$ property is not set for `leftNode`.
1096
- "$nodeId$" in leftVNode && isInitialRender && // `leftNode` is not from type HTMLComment which would cause many
1097
- // hydration comments to be removed
1098
- leftVNode.$elm$.nodeType !== 8
1099
- ) {
1100
- return false;
1101
- }
1102
890
  return leftVNode.$name$ === rightVNode.$name$;
1103
891
  }
1104
892
  if (!isInitialRender) {
1105
893
  return leftVNode.$key$ === rightVNode.$key$;
1106
894
  }
895
+ if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
896
+ leftVNode.$key$ = rightVNode.$key$;
897
+ }
1107
898
  return true;
1108
899
  }
1109
900
  return false;
1110
901
  };
1111
- var referenceNode = (node) => {
1112
- return node && node["s-ol"] || node;
1113
- };
1114
- var parentReferenceNode = (node) => (node["s-ol"] ? node["s-ol"] : node).parentNode;
902
+ var referenceNode = (node) => node && node["s-ol"] || node;
1115
903
  var patch = (oldVNode, newVNode2, isInitialRender = false) => {
1116
904
  const elm = newVNode2.$elm$ = oldVNode.$elm$;
1117
905
  const oldChildren = oldVNode.$children$;
@@ -1155,41 +943,15 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
1155
943
  elm.data = text;
1156
944
  }
1157
945
  };
1158
- var updateFallbackSlotVisibility = (elm) => {
1159
- const childNodes = elm.childNodes;
1160
- for (const childNode of childNodes) {
1161
- if (childNode.nodeType === 1 /* ElementNode */) {
1162
- if (childNode["s-sr"]) {
1163
- const slotName = childNode["s-sn"];
1164
- childNode.hidden = false;
1165
- for (const siblingNode of childNodes) {
1166
- if (siblingNode !== childNode) {
1167
- if (siblingNode["s-hn"] !== childNode["s-hn"] || slotName !== "") {
1168
- if (siblingNode.nodeType === 1 /* ElementNode */ && (slotName === siblingNode.getAttribute("slot") || slotName === siblingNode["s-sn"]) || siblingNode.nodeType === 3 /* TextNode */ && slotName === siblingNode["s-sn"]) {
1169
- childNode.hidden = true;
1170
- break;
1171
- }
1172
- } else {
1173
- if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
1174
- childNode.hidden = true;
1175
- break;
1176
- }
1177
- }
1178
- }
1179
- }
1180
- }
1181
- updateFallbackSlotVisibility(childNode);
1182
- }
1183
- }
1184
- };
1185
946
  var relocateNodes = [];
1186
947
  var markSlotContentForRelocation = (elm) => {
1187
948
  let node;
1188
949
  let hostContentNodes;
1189
950
  let j;
1190
- for (const childNode of elm.childNodes) {
951
+ const children = elm.__childNodes || elm.childNodes;
952
+ for (const childNode of children) {
1191
953
  if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
1192
- hostContentNodes = node.parentNode.childNodes;
954
+ hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
1193
955
  const slotName = childNode["s-sn"];
1194
956
  for (j = hostContentNodes.length - 1; j >= 0; j--) {
1195
957
  node = hostContentNodes[j];
@@ -1231,21 +993,6 @@ var markSlotContentForRelocation = (elm) => {
1231
993
  }
1232
994
  }
1233
995
  };
1234
- var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
1235
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1236
- if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
1237
- return true;
1238
- }
1239
- if (nodeToRelocate.getAttribute("slot") === slotName) {
1240
- return true;
1241
- }
1242
- return false;
1243
- }
1244
- if (nodeToRelocate["s-sn"] === slotName) {
1245
- return true;
1246
- }
1247
- return slotName === "";
1248
- };
1249
996
  var nullifyVNodeRefs = (vNode) => {
1250
997
  {
1251
998
  vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
@@ -1253,38 +1000,33 @@ var nullifyVNodeRefs = (vNode) => {
1253
1000
  }
1254
1001
  };
1255
1002
  var insertBefore = (parent, newNode, reference) => {
1256
- const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
1257
- {
1258
- updateElementScopeIds(newNode, parent);
1003
+ if (typeof newNode["s-sn"] === "string" && !!newNode["s-sr"] && !!newNode["s-cr"]) {
1004
+ addRemoveSlotScopedClass(newNode["s-cr"], newNode, parent, newNode.parentElement);
1259
1005
  }
1006
+ const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
1260
1007
  return inserted;
1261
1008
  };
1262
- var findScopeIds = (element) => {
1263
- const scopeIds = [];
1264
- if (element) {
1265
- scopeIds.push(
1266
- ...element["s-scs"] || [],
1267
- element["s-si"],
1268
- element["s-sc"],
1269
- ...findScopeIds(element.parentElement)
1270
- );
1271
- }
1272
- return scopeIds;
1273
- };
1274
- var updateElementScopeIds = (element, parent, iterateChildNodes = false) => {
1009
+ function addRemoveSlotScopedClass(reference, slotNode, newParent, oldParent) {
1275
1010
  var _a;
1276
- if (element && parent && element.nodeType === 1 /* ElementNode */) {
1277
- const scopeIds = new Set(findScopeIds(parent).filter(Boolean));
1278
- if (scopeIds.size) {
1279
- (_a = element.classList) == null ? void 0 : _a.add(...element["s-scs"] = [...scopeIds]);
1280
- if (element["s-ol"] || iterateChildNodes) {
1281
- for (const childNode of Array.from(element.childNodes)) {
1282
- updateElementScopeIds(childNode, element, true);
1011
+ let scopeId2;
1012
+ if (reference && typeof slotNode["s-sn"] === "string" && !!slotNode["s-sr"] && reference.parentNode && reference.parentNode["s-sc"] && (scopeId2 = slotNode["s-si"] || reference.parentNode["s-sc"])) {
1013
+ const scopeName = slotNode["s-sn"];
1014
+ const hostName = slotNode["s-hn"];
1015
+ (_a = newParent.classList) == null ? void 0 : _a.add(scopeId2 + "-s");
1016
+ if (oldParent && oldParent.classList.contains(scopeId2 + "-s")) {
1017
+ let child = (oldParent.__childNodes || oldParent.childNodes)[0];
1018
+ let found = false;
1019
+ while (child) {
1020
+ if (child["s-sn"] !== scopeName && child["s-hn"] === hostName && !!child["s-sr"]) {
1021
+ found = true;
1022
+ break;
1283
1023
  }
1024
+ child = child.nextSibling;
1284
1025
  }
1026
+ if (!found) oldParent.classList.remove(scopeId2 + "-s");
1285
1027
  }
1286
1028
  }
1287
- };
1029
+ }
1288
1030
  var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1289
1031
  var _a, _b, _c, _d, _e;
1290
1032
  const hostElm = hostRef.$hostElement$;
@@ -1336,7 +1078,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1336
1078
  if (slotRefNode) {
1337
1079
  const parentNodeRef = slotRefNode.parentNode;
1338
1080
  let insertBeforeNode = slotRefNode.nextSibling;
1339
- if (insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */) {
1081
+ if ((insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */)) {
1340
1082
  let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
1341
1083
  while (orgLocationNode) {
1342
1084
  let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
@@ -1356,40 +1098,882 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1356
1098
  if (!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode || nodeToRelocate.nextSibling !== insertBeforeNode) {
1357
1099
  if (nodeToRelocate !== insertBeforeNode) {
1358
1100
  insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
1359
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1101
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
1360
1102
  nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
1361
1103
  }
1362
1104
  }
1363
1105
  }
1364
- nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](nodeToRelocate);
1365
- } else {
1366
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1367
- if (isInitialLoad) {
1368
- nodeToRelocate["s-ih"] = (_d = nodeToRelocate.hidden) != null ? _d : false;
1369
- }
1370
- nodeToRelocate.hidden = true;
1106
+ nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](nodeToRelocate);
1107
+ } else {
1108
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1109
+ if (isInitialLoad) {
1110
+ nodeToRelocate["s-ih"] = (_d = nodeToRelocate.hidden) != null ? _d : false;
1111
+ }
1112
+ nodeToRelocate.hidden = true;
1113
+ }
1114
+ }
1115
+ }
1116
+ }
1117
+ if (checkSlotFallbackVisibility) {
1118
+ updateFallbackSlotVisibility(rootVnode.$elm$);
1119
+ }
1120
+ plt.$flags$ &= ~1 /* isTmpDisconnected */;
1121
+ relocateNodes.length = 0;
1122
+ }
1123
+ if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
1124
+ const children = rootVnode.$elm$.__childNodes || rootVnode.$elm$.childNodes;
1125
+ for (const childNode of children) {
1126
+ if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
1127
+ if (isInitialLoad && childNode["s-ih"] == null) {
1128
+ childNode["s-ih"] = (_e = childNode.hidden) != null ? _e : false;
1129
+ }
1130
+ childNode.hidden = true;
1131
+ }
1132
+ }
1133
+ }
1134
+ contentRef = void 0;
1135
+ };
1136
+
1137
+ // src/runtime/dom-extras.ts
1138
+ var patchPseudoShadowDom = (hostElementPrototype) => {
1139
+ patchCloneNode(hostElementPrototype);
1140
+ patchSlotAppendChild(hostElementPrototype);
1141
+ patchSlotAppend(hostElementPrototype);
1142
+ patchSlotPrepend(hostElementPrototype);
1143
+ patchSlotInsertAdjacentElement(hostElementPrototype);
1144
+ patchSlotInsertAdjacentHTML(hostElementPrototype);
1145
+ patchSlotInsertAdjacentText(hostElementPrototype);
1146
+ patchTextContent(hostElementPrototype);
1147
+ patchChildSlotNodes(hostElementPrototype);
1148
+ patchSlotRemoveChild(hostElementPrototype);
1149
+ };
1150
+ var patchCloneNode = (HostElementPrototype) => {
1151
+ const orgCloneNode = HostElementPrototype.cloneNode;
1152
+ HostElementPrototype.cloneNode = function(deep) {
1153
+ const srcNode = this;
1154
+ const isShadowDom = srcNode.shadowRoot && supportsShadow ;
1155
+ const clonedNode = orgCloneNode.call(srcNode, isShadowDom ? deep : false);
1156
+ if (!isShadowDom && deep) {
1157
+ let i2 = 0;
1158
+ let slotted, nonStencilNode;
1159
+ const stencilPrivates = [
1160
+ "s-id",
1161
+ "s-cr",
1162
+ "s-lr",
1163
+ "s-rc",
1164
+ "s-sc",
1165
+ "s-p",
1166
+ "s-cn",
1167
+ "s-sr",
1168
+ "s-sn",
1169
+ "s-hn",
1170
+ "s-ol",
1171
+ "s-nr",
1172
+ "s-si",
1173
+ "s-rf",
1174
+ "s-scs"
1175
+ ];
1176
+ const childNodes = this.__childNodes || this.childNodes;
1177
+ for (; i2 < childNodes.length; i2++) {
1178
+ slotted = childNodes[i2]["s-nr"];
1179
+ nonStencilNode = stencilPrivates.every((privateField) => !childNodes[i2][privateField]);
1180
+ if (slotted) {
1181
+ if (clonedNode.__appendChild) {
1182
+ clonedNode.__appendChild(slotted.cloneNode(true));
1183
+ } else {
1184
+ clonedNode.appendChild(slotted.cloneNode(true));
1185
+ }
1186
+ }
1187
+ if (nonStencilNode) {
1188
+ clonedNode.appendChild(childNodes[i2].cloneNode(true));
1189
+ }
1190
+ }
1191
+ }
1192
+ return clonedNode;
1193
+ };
1194
+ };
1195
+ var patchSlotAppendChild = (HostElementPrototype) => {
1196
+ HostElementPrototype.__appendChild = HostElementPrototype.appendChild;
1197
+ HostElementPrototype.appendChild = function(newChild) {
1198
+ const slotName = newChild["s-sn"] = getSlotName(newChild);
1199
+ const slotNode = getHostSlotNodes(this.__childNodes || this.childNodes, this.tagName, slotName)[0];
1200
+ if (slotNode) {
1201
+ addSlotRelocateNode(newChild, slotNode);
1202
+ const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
1203
+ const appendAfter = slotChildNodes[slotChildNodes.length - 1];
1204
+ const insertedNode = insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
1205
+ updateFallbackSlotVisibility(this);
1206
+ return insertedNode;
1207
+ }
1208
+ return this.__appendChild(newChild);
1209
+ };
1210
+ };
1211
+ var patchSlotRemoveChild = (ElementPrototype) => {
1212
+ ElementPrototype.__removeChild = ElementPrototype.removeChild;
1213
+ ElementPrototype.removeChild = function(toRemove) {
1214
+ if (toRemove && typeof toRemove["s-sn"] !== "undefined") {
1215
+ const childNodes = this.__childNodes || this.childNodes;
1216
+ const slotNode = getHostSlotNodes(childNodes, this.tagName, toRemove["s-sn"]);
1217
+ if (slotNode && toRemove.isConnected) {
1218
+ toRemove.remove();
1219
+ updateFallbackSlotVisibility(this);
1220
+ return;
1221
+ }
1222
+ }
1223
+ return this.__removeChild(toRemove);
1224
+ };
1225
+ };
1226
+ var patchSlotPrepend = (HostElementPrototype) => {
1227
+ HostElementPrototype.__prepend = HostElementPrototype.prepend;
1228
+ HostElementPrototype.prepend = function(...newChildren) {
1229
+ newChildren.forEach((newChild) => {
1230
+ if (typeof newChild === "string") {
1231
+ newChild = this.ownerDocument.createTextNode(newChild);
1232
+ }
1233
+ const slotName = newChild["s-sn"] = getSlotName(newChild);
1234
+ const childNodes = this.__childNodes || this.childNodes;
1235
+ const slotNode = getHostSlotNodes(childNodes, this.tagName, slotName)[0];
1236
+ if (slotNode) {
1237
+ addSlotRelocateNode(newChild, slotNode, true);
1238
+ const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
1239
+ const appendAfter = slotChildNodes[0];
1240
+ return insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
1241
+ }
1242
+ if (newChild.nodeType === 1 && !!newChild.getAttribute("slot")) {
1243
+ newChild.hidden = true;
1244
+ }
1245
+ return HostElementPrototype.__prepend(newChild);
1246
+ });
1247
+ };
1248
+ };
1249
+ var patchSlotAppend = (HostElementPrototype) => {
1250
+ HostElementPrototype.__append = HostElementPrototype.append;
1251
+ HostElementPrototype.append = function(...newChildren) {
1252
+ newChildren.forEach((newChild) => {
1253
+ if (typeof newChild === "string") {
1254
+ newChild = this.ownerDocument.createTextNode(newChild);
1255
+ }
1256
+ this.appendChild(newChild);
1257
+ });
1258
+ };
1259
+ };
1260
+ var patchSlotInsertAdjacentHTML = (HostElementPrototype) => {
1261
+ const originalInsertAdjacentHtml = HostElementPrototype.insertAdjacentHTML;
1262
+ HostElementPrototype.insertAdjacentHTML = function(position, text) {
1263
+ if (position !== "afterbegin" && position !== "beforeend") {
1264
+ return originalInsertAdjacentHtml.call(this, position, text);
1265
+ }
1266
+ const container = this.ownerDocument.createElement("_");
1267
+ let node;
1268
+ container.innerHTML = text;
1269
+ if (position === "afterbegin") {
1270
+ while (node = container.firstChild) {
1271
+ this.prepend(node);
1272
+ }
1273
+ } else if (position === "beforeend") {
1274
+ while (node = container.firstChild) {
1275
+ this.append(node);
1276
+ }
1277
+ }
1278
+ };
1279
+ };
1280
+ var patchSlotInsertAdjacentText = (HostElementPrototype) => {
1281
+ HostElementPrototype.insertAdjacentText = function(position, text) {
1282
+ this.insertAdjacentHTML(position, text);
1283
+ };
1284
+ };
1285
+ var patchSlotInsertAdjacentElement = (HostElementPrototype) => {
1286
+ const originalInsertAdjacentElement = HostElementPrototype.insertAdjacentElement;
1287
+ HostElementPrototype.insertAdjacentElement = function(position, element) {
1288
+ if (position !== "afterbegin" && position !== "beforeend") {
1289
+ return originalInsertAdjacentElement.call(this, position, element);
1290
+ }
1291
+ if (position === "afterbegin") {
1292
+ this.prepend(element);
1293
+ return element;
1294
+ } else if (position === "beforeend") {
1295
+ this.append(element);
1296
+ return element;
1297
+ }
1298
+ return element;
1299
+ };
1300
+ };
1301
+ var patchTextContent = (hostElementPrototype) => {
1302
+ patchHostOriginalAccessor("textContent", hostElementPrototype);
1303
+ Object.defineProperty(hostElementPrototype, "textContent", {
1304
+ get: function() {
1305
+ let text = "";
1306
+ const childNodes = this.__childNodes ? this.childNodes : getSlottedChildNodes(this.childNodes);
1307
+ childNodes.forEach((node) => text += node.textContent || "");
1308
+ return text;
1309
+ },
1310
+ set: function(value) {
1311
+ const childNodes = this.__childNodes ? this.childNodes : getSlottedChildNodes(this.childNodes);
1312
+ childNodes.forEach((node) => {
1313
+ if (node["s-ol"]) node["s-ol"].remove();
1314
+ node.remove();
1315
+ });
1316
+ this.insertAdjacentHTML("beforeend", value);
1317
+ }
1318
+ });
1319
+ };
1320
+ var patchChildSlotNodes = (elm) => {
1321
+ class FakeNodeList extends Array {
1322
+ item(n) {
1323
+ return this[n];
1324
+ }
1325
+ }
1326
+ patchHostOriginalAccessor("children", elm);
1327
+ Object.defineProperty(elm, "children", {
1328
+ get() {
1329
+ return this.childNodes.filter((n) => n.nodeType === 1);
1330
+ }
1331
+ });
1332
+ Object.defineProperty(elm, "childElementCount", {
1333
+ get() {
1334
+ return this.children.length;
1335
+ }
1336
+ });
1337
+ patchHostOriginalAccessor("firstChild", elm);
1338
+ Object.defineProperty(elm, "firstChild", {
1339
+ get() {
1340
+ return this.childNodes[0];
1341
+ }
1342
+ });
1343
+ patchHostOriginalAccessor("lastChild", elm);
1344
+ Object.defineProperty(elm, "lastChild", {
1345
+ get() {
1346
+ return this.childNodes[this.childNodes.length - 1];
1347
+ }
1348
+ });
1349
+ patchHostOriginalAccessor("childNodes", elm);
1350
+ Object.defineProperty(elm, "childNodes", {
1351
+ get() {
1352
+ var _a, _b;
1353
+ if (!plt.$flags$ || !((_a = getHostRef(this)) == null ? void 0 : _a.$flags$) || (plt.$flags$ & 1 /* isTmpDisconnected */) === 0 && ((_b = getHostRef(this)) == null ? void 0 : _b.$flags$) & 2 /* hasRendered */) {
1354
+ const result = new FakeNodeList();
1355
+ const nodes = getSlottedChildNodes(this.__childNodes);
1356
+ result.push(...nodes);
1357
+ return result;
1358
+ }
1359
+ return FakeNodeList.from(this.__childNodes);
1360
+ }
1361
+ });
1362
+ };
1363
+ var patchNextPrev = (node) => {
1364
+ if (!node || node.__nextSibling || !globalThis.Node) return;
1365
+ patchNextSibling(node);
1366
+ patchPreviousSibling(node);
1367
+ if (node.nodeType === Node.ELEMENT_NODE) {
1368
+ patchNextElementSibling(node);
1369
+ patchPreviousElementSibling(node);
1370
+ }
1371
+ };
1372
+ var patchNextSibling = (node) => {
1373
+ if (!node || node.__nextSibling) return;
1374
+ patchHostOriginalAccessor("nextSibling", node);
1375
+ Object.defineProperty(node, "nextSibling", {
1376
+ get: function() {
1377
+ var _a;
1378
+ const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.childNodes;
1379
+ const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
1380
+ if (parentNodes && index > -1) {
1381
+ return parentNodes[index + 1];
1382
+ }
1383
+ return this.__nextSibling;
1384
+ }
1385
+ });
1386
+ };
1387
+ var patchNextElementSibling = (element) => {
1388
+ if (!element || element.__nextElementSibling) return;
1389
+ patchHostOriginalAccessor("nextElementSibling", element);
1390
+ Object.defineProperty(element, "nextElementSibling", {
1391
+ get: function() {
1392
+ var _a;
1393
+ const parentEles = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.children;
1394
+ const index = parentEles == null ? void 0 : parentEles.indexOf(this);
1395
+ if (parentEles && index > -1) {
1396
+ return parentEles[index + 1];
1397
+ }
1398
+ return this.__nextElementSibling;
1399
+ }
1400
+ });
1401
+ };
1402
+ var patchPreviousSibling = (node) => {
1403
+ if (!node || node.__previousSibling) return;
1404
+ patchHostOriginalAccessor("previousSibling", node);
1405
+ Object.defineProperty(node, "previousSibling", {
1406
+ get: function() {
1407
+ var _a;
1408
+ const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.childNodes;
1409
+ const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
1410
+ if (parentNodes && index > -1) {
1411
+ return parentNodes[index - 1];
1412
+ }
1413
+ return this.__previousSibling;
1414
+ }
1415
+ });
1416
+ };
1417
+ var patchPreviousElementSibling = (element) => {
1418
+ if (!element || element.__previousElementSibling) return;
1419
+ patchHostOriginalAccessor("previousElementSibling", element);
1420
+ Object.defineProperty(element, "previousElementSibling", {
1421
+ get: function() {
1422
+ var _a;
1423
+ const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.children;
1424
+ const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
1425
+ if (parentNodes && index > -1) {
1426
+ return parentNodes[index - 1];
1427
+ }
1428
+ return this.__previousElementSibling;
1429
+ }
1430
+ });
1431
+ };
1432
+ var validElementPatches = ["children", "nextElementSibling", "previousElementSibling"];
1433
+ var validNodesPatches = [
1434
+ "childNodes",
1435
+ "firstChild",
1436
+ "lastChild",
1437
+ "nextSibling",
1438
+ "previousSibling",
1439
+ "textContent"
1440
+ ];
1441
+ function patchHostOriginalAccessor(accessorName, node) {
1442
+ let accessor;
1443
+ if (validElementPatches.includes(accessorName)) {
1444
+ accessor = Object.getOwnPropertyDescriptor(Element.prototype, accessorName);
1445
+ } else if (validNodesPatches.includes(accessorName)) {
1446
+ accessor = Object.getOwnPropertyDescriptor(Node.prototype, accessorName);
1447
+ }
1448
+ if (!accessor) {
1449
+ accessor = Object.getOwnPropertyDescriptor(node, accessorName);
1450
+ }
1451
+ if (accessor) Object.defineProperty(node, "__" + accessorName, accessor);
1452
+ }
1453
+ var createTime = (fnName, tagName = "") => {
1454
+ {
1455
+ return () => {
1456
+ return;
1457
+ };
1458
+ }
1459
+ };
1460
+ var uniqueTime = (key, measureText) => {
1461
+ {
1462
+ return () => {
1463
+ return;
1464
+ };
1465
+ }
1466
+ };
1467
+
1468
+ // src/runtime/client-hydrate.ts
1469
+ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1470
+ const endHydrate = createTime("hydrateClient", tagName);
1471
+ const shadowRoot = hostElm.shadowRoot;
1472
+ const childRenderNodes = [];
1473
+ const slotNodes = [];
1474
+ const slottedNodes = [];
1475
+ const shadowRootNodes = shadowRoot ? [] : null;
1476
+ const vnode = newVNode(tagName, null);
1477
+ vnode.$elm$ = hostElm;
1478
+ let scopeId2;
1479
+ {
1480
+ const cmpMeta = hostRef.$cmpMeta$;
1481
+ if (cmpMeta && cmpMeta.$flags$ & 10 /* needsScopedEncapsulation */ && hostElm["s-sc"]) {
1482
+ scopeId2 = hostElm["s-sc"];
1483
+ hostElm.classList.add(scopeId2 + "-h");
1484
+ } else if (hostElm["s-sc"]) {
1485
+ delete hostElm["s-sc"];
1486
+ }
1487
+ }
1488
+ if (!plt.$orgLocNodes$) {
1489
+ initializeDocumentHydrate(doc.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
1490
+ }
1491
+ hostElm[HYDRATE_ID] = hostId;
1492
+ hostElm.removeAttribute(HYDRATE_ID);
1493
+ hostRef.$vnode$ = clientHydrate(
1494
+ vnode,
1495
+ childRenderNodes,
1496
+ slotNodes,
1497
+ shadowRootNodes,
1498
+ hostElm,
1499
+ hostElm,
1500
+ hostId,
1501
+ slottedNodes
1502
+ );
1503
+ let crIndex = 0;
1504
+ const crLength = childRenderNodes.length;
1505
+ let childRenderNode;
1506
+ for (crIndex; crIndex < crLength; crIndex++) {
1507
+ childRenderNode = childRenderNodes[crIndex];
1508
+ const orgLocationId = childRenderNode.$hostId$ + "." + childRenderNode.$nodeId$;
1509
+ const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
1510
+ const node = childRenderNode.$elm$;
1511
+ if (!shadowRoot) {
1512
+ node["s-hn"] = tagName.toUpperCase();
1513
+ if (childRenderNode.$tag$ === "slot") {
1514
+ node["s-cr"] = hostElm["s-cr"];
1515
+ }
1516
+ }
1517
+ if (childRenderNode.$tag$ === "slot") {
1518
+ if (childRenderNode.$children$) {
1519
+ childRenderNode.$flags$ |= 2 /* isSlotFallback */;
1520
+ if (!childRenderNode.$elm$.childNodes.length) {
1521
+ childRenderNode.$children$.forEach((c) => {
1522
+ childRenderNode.$elm$.appendChild(c.$elm$);
1523
+ });
1524
+ }
1525
+ } else {
1526
+ childRenderNode.$flags$ |= 1 /* isSlotReference */;
1527
+ }
1528
+ }
1529
+ if (orgLocationNode && orgLocationNode.isConnected) {
1530
+ if (shadowRoot && orgLocationNode["s-en"] === "") {
1531
+ orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
1532
+ }
1533
+ orgLocationNode.parentNode.removeChild(orgLocationNode);
1534
+ if (!shadowRoot) {
1535
+ node["s-oo"] = parseInt(childRenderNode.$nodeId$);
1536
+ }
1537
+ }
1538
+ plt.$orgLocNodes$.delete(orgLocationId);
1539
+ }
1540
+ const hosts = [];
1541
+ const snLen = slottedNodes.length;
1542
+ let snIndex = 0;
1543
+ let slotGroup;
1544
+ let snGroupIdx;
1545
+ let snGroupLen;
1546
+ let slottedItem;
1547
+ for (snIndex; snIndex < snLen; snIndex++) {
1548
+ slotGroup = slottedNodes[snIndex];
1549
+ if (!slotGroup || !slotGroup.length) continue;
1550
+ snGroupLen = slotGroup.length;
1551
+ snGroupIdx = 0;
1552
+ for (snGroupIdx; snGroupIdx < snGroupLen; snGroupIdx++) {
1553
+ slottedItem = slotGroup[snGroupIdx];
1554
+ if (!hosts[slottedItem.hostId]) {
1555
+ hosts[slottedItem.hostId] = plt.$orgLocNodes$.get(slottedItem.hostId);
1556
+ }
1557
+ if (!hosts[slottedItem.hostId]) continue;
1558
+ const hostEle = hosts[slottedItem.hostId];
1559
+ if (!hostEle.shadowRoot || !shadowRoot) {
1560
+ slottedItem.slot["s-cr"] = hostEle["s-cr"];
1561
+ if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
1562
+ slottedItem.slot["s-cr"] = hostEle;
1563
+ } else {
1564
+ slottedItem.slot["s-cr"] = (hostEle.__childNodes || hostEle.childNodes)[0];
1565
+ }
1566
+ addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
1567
+ {
1568
+ patchNextPrev(slottedItem.node);
1569
+ }
1570
+ }
1571
+ if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
1572
+ hostEle.appendChild(slottedItem.node);
1573
+ }
1574
+ }
1575
+ }
1576
+ if (scopeId2 && slotNodes.length) {
1577
+ slotNodes.forEach((slot) => {
1578
+ slot.$elm$.parentElement.classList.add(scopeId2 + "-s");
1579
+ });
1580
+ }
1581
+ if (shadowRoot) {
1582
+ let rnIdex = 0;
1583
+ const rnLen = shadowRootNodes.length;
1584
+ for (rnIdex; rnIdex < rnLen; rnIdex++) {
1585
+ shadowRoot.appendChild(shadowRootNodes[rnIdex]);
1586
+ }
1587
+ Array.from(hostElm.childNodes).forEach((node) => {
1588
+ if (node.nodeType === 8 /* CommentNode */ && typeof node["s-sn"] !== "string") {
1589
+ node.parentNode.removeChild(node);
1590
+ }
1591
+ });
1592
+ }
1593
+ hostRef.$hostElement$ = hostElm;
1594
+ endHydrate();
1595
+ };
1596
+ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId, slottedNodes = []) => {
1597
+ let childNodeType;
1598
+ let childIdSplt;
1599
+ let childVNode;
1600
+ let i2;
1601
+ const scopeId2 = hostElm["s-sc"];
1602
+ if (node.nodeType === 1 /* ElementNode */) {
1603
+ childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
1604
+ if (childNodeType) {
1605
+ childIdSplt = childNodeType.split(".");
1606
+ if (childIdSplt[0] === hostId || childIdSplt[0] === "0") {
1607
+ childVNode = createSimpleVNode({
1608
+ $flags$: 0,
1609
+ $hostId$: childIdSplt[0],
1610
+ $nodeId$: childIdSplt[1],
1611
+ $depth$: childIdSplt[2],
1612
+ $index$: childIdSplt[3],
1613
+ $tag$: node.tagName.toLowerCase(),
1614
+ $elm$: node,
1615
+ // If we don't add the initial classes to the VNode, the first `vdom-render.ts` patch
1616
+ // won't try to reconcile them. Classes set on the node will be blown away.
1617
+ $attrs$: { class: node.className || "" }
1618
+ });
1619
+ childRenderNodes.push(childVNode);
1620
+ node.removeAttribute(HYDRATE_CHILD_ID);
1621
+ if (!parentVNode.$children$) {
1622
+ parentVNode.$children$ = [];
1623
+ }
1624
+ if (scopeId2) {
1625
+ node["s-si"] = scopeId2;
1626
+ childVNode.$attrs$.class += " " + scopeId2;
1627
+ }
1628
+ const slotName = childVNode.$elm$.getAttribute("s-sn");
1629
+ if (typeof slotName === "string") {
1630
+ if (childVNode.$tag$ === "slot-fb") {
1631
+ addSlot(
1632
+ slotName,
1633
+ childIdSplt[2],
1634
+ childVNode,
1635
+ node,
1636
+ parentVNode,
1637
+ childRenderNodes,
1638
+ slotNodes,
1639
+ shadowRootNodes,
1640
+ slottedNodes
1641
+ );
1642
+ if (scopeId2) {
1643
+ node.classList.add(scopeId2);
1644
+ }
1645
+ }
1646
+ childVNode.$elm$["s-sn"] = slotName;
1647
+ childVNode.$elm$.removeAttribute("s-sn");
1648
+ }
1649
+ if (childVNode.$index$ !== void 0) {
1650
+ parentVNode.$children$[childVNode.$index$] = childVNode;
1651
+ }
1652
+ parentVNode = childVNode;
1653
+ if (shadowRootNodes && childVNode.$depth$ === "0") {
1654
+ shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
1655
+ }
1656
+ }
1657
+ }
1658
+ if (node.shadowRoot) {
1659
+ for (i2 = node.shadowRoot.childNodes.length - 1; i2 >= 0; i2--) {
1660
+ clientHydrate(
1661
+ parentVNode,
1662
+ childRenderNodes,
1663
+ slotNodes,
1664
+ shadowRootNodes,
1665
+ hostElm,
1666
+ node.shadowRoot.childNodes[i2],
1667
+ hostId,
1668
+ slottedNodes
1669
+ );
1670
+ }
1671
+ }
1672
+ const nonShadowNodes = node.__childNodes || node.childNodes;
1673
+ for (i2 = nonShadowNodes.length - 1; i2 >= 0; i2--) {
1674
+ clientHydrate(
1675
+ parentVNode,
1676
+ childRenderNodes,
1677
+ slotNodes,
1678
+ shadowRootNodes,
1679
+ hostElm,
1680
+ nonShadowNodes[i2],
1681
+ hostId,
1682
+ slottedNodes
1683
+ );
1684
+ }
1685
+ } else if (node.nodeType === 8 /* CommentNode */) {
1686
+ childIdSplt = node.nodeValue.split(".");
1687
+ if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
1688
+ childNodeType = childIdSplt[0];
1689
+ childVNode = createSimpleVNode({
1690
+ $hostId$: childIdSplt[1],
1691
+ $nodeId$: childIdSplt[2],
1692
+ $depth$: childIdSplt[3],
1693
+ $index$: childIdSplt[4] || "0",
1694
+ $elm$: node,
1695
+ $attrs$: null,
1696
+ $children$: null,
1697
+ $key$: null,
1698
+ $name$: null,
1699
+ $tag$: null,
1700
+ $text$: null
1701
+ });
1702
+ if (childNodeType === TEXT_NODE_ID) {
1703
+ childVNode.$elm$ = node.nextSibling;
1704
+ if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
1705
+ childVNode.$text$ = childVNode.$elm$.textContent;
1706
+ childRenderNodes.push(childVNode);
1707
+ node.remove();
1708
+ if (hostId === childVNode.$hostId$) {
1709
+ if (!parentVNode.$children$) {
1710
+ parentVNode.$children$ = [];
1711
+ }
1712
+ parentVNode.$children$[childVNode.$index$] = childVNode;
1713
+ }
1714
+ if (shadowRootNodes && childVNode.$depth$ === "0") {
1715
+ shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
1716
+ }
1717
+ }
1718
+ } else if (childNodeType === COMMENT_NODE_ID) {
1719
+ childVNode.$elm$ = node.nextSibling;
1720
+ if (childVNode.$elm$ && childVNode.$elm$.nodeType === 8 /* CommentNode */) {
1721
+ childRenderNodes.push(childVNode);
1722
+ node.remove();
1723
+ }
1724
+ } else if (childVNode.$hostId$ === hostId) {
1725
+ if (childNodeType === SLOT_NODE_ID) {
1726
+ const slotName = node["s-sn"] = childIdSplt[5] || "";
1727
+ addSlot(
1728
+ slotName,
1729
+ childIdSplt[2],
1730
+ childVNode,
1731
+ node,
1732
+ parentVNode,
1733
+ childRenderNodes,
1734
+ slotNodes,
1735
+ shadowRootNodes,
1736
+ slottedNodes
1737
+ );
1738
+ } else if (childNodeType === CONTENT_REF_ID) {
1739
+ if (shadowRootNodes) {
1740
+ node.remove();
1741
+ } else {
1742
+ hostElm["s-cr"] = node;
1743
+ node["s-cn"] = true;
1744
+ }
1745
+ }
1746
+ }
1747
+ }
1748
+ } else if (parentVNode && parentVNode.$tag$ === "style") {
1749
+ const vnode = newVNode(null, node.textContent);
1750
+ vnode.$elm$ = node;
1751
+ vnode.$index$ = "0";
1752
+ parentVNode.$children$ = [vnode];
1753
+ }
1754
+ return parentVNode;
1755
+ };
1756
+ var initializeDocumentHydrate = (node, orgLocNodes) => {
1757
+ if (node.nodeType === 1 /* ElementNode */) {
1758
+ const componentId = node[HYDRATE_ID] || node.getAttribute(HYDRATE_ID);
1759
+ if (componentId) {
1760
+ orgLocNodes.set(componentId, node);
1761
+ }
1762
+ let i2 = 0;
1763
+ if (node.shadowRoot) {
1764
+ for (; i2 < node.shadowRoot.childNodes.length; i2++) {
1765
+ initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
1766
+ }
1767
+ }
1768
+ const nonShadowNodes = node.__childNodes || node.childNodes;
1769
+ for (i2 = 0; i2 < nonShadowNodes.length; i2++) {
1770
+ initializeDocumentHydrate(nonShadowNodes[i2], orgLocNodes);
1771
+ }
1772
+ } else if (node.nodeType === 8 /* CommentNode */) {
1773
+ const childIdSplt = node.nodeValue.split(".");
1774
+ if (childIdSplt[0] === ORG_LOCATION_ID) {
1775
+ orgLocNodes.set(childIdSplt[1] + "." + childIdSplt[2], node);
1776
+ node.nodeValue = "";
1777
+ node["s-en"] = childIdSplt[3];
1778
+ }
1779
+ }
1780
+ };
1781
+ var createSimpleVNode = (vnode) => {
1782
+ const defaultVNode = {
1783
+ $flags$: 0,
1784
+ $hostId$: null,
1785
+ $nodeId$: null,
1786
+ $depth$: null,
1787
+ $index$: "0",
1788
+ $elm$: null,
1789
+ $attrs$: null,
1790
+ $children$: null,
1791
+ $key$: null,
1792
+ $name$: null,
1793
+ $tag$: null,
1794
+ $text$: null
1795
+ };
1796
+ return { ...defaultVNode, ...vnode };
1797
+ };
1798
+ function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNodes, slotNodes, shadowRootNodes, slottedNodes) {
1799
+ node["s-sr"] = true;
1800
+ childVNode.$name$ = slotName || null;
1801
+ childVNode.$tag$ = "slot";
1802
+ const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
1803
+ if (shadowRootNodes) {
1804
+ const slot = childVNode.$elm$ = doc.createElement(childVNode.$tag$);
1805
+ if (childVNode.$name$) {
1806
+ childVNode.$elm$.setAttribute("name", slotName);
1807
+ }
1808
+ if (parentNodeId && parentNodeId !== childVNode.$hostId$) {
1809
+ parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
1810
+ } else {
1811
+ node.parentNode.insertBefore(childVNode.$elm$, node);
1812
+ }
1813
+ addSlottedNodes(slottedNodes, slotId, slotName, node, childVNode.$hostId$);
1814
+ node.remove();
1815
+ if (childVNode.$depth$ === "0") {
1816
+ shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
1817
+ }
1818
+ } else {
1819
+ const slot = childVNode.$elm$;
1820
+ const shouldMove = parentNodeId && parentNodeId !== childVNode.$hostId$ && parentVNode.$elm$.shadowRoot;
1821
+ addSlottedNodes(slottedNodes, slotId, slotName, node, shouldMove ? parentNodeId : childVNode.$hostId$);
1822
+ if (shouldMove) {
1823
+ parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
1824
+ }
1825
+ childRenderNodes.push(childVNode);
1826
+ }
1827
+ slotNodes.push(childVNode);
1828
+ if (!parentVNode.$children$) {
1829
+ parentVNode.$children$ = [];
1830
+ }
1831
+ parentVNode.$children$[childVNode.$index$] = childVNode;
1832
+ }
1833
+ var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) => {
1834
+ let slottedNode = slotNode.nextSibling;
1835
+ slottedNodes[slotNodeId] = slottedNodes[slotNodeId] || [];
1836
+ 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 */))) {
1837
+ slottedNode["s-sn"] = slotName;
1838
+ slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
1839
+ slottedNode = slottedNode.nextSibling;
1840
+ }
1841
+ };
1842
+
1843
+ // src/runtime/mode.ts
1844
+ var computeMode = (elm) => modeResolutionChain.map((h2) => h2(elm)).find((m) => !!m);
1845
+ var setMode = (handler) => modeResolutionChain.push(handler);
1846
+ var getMode = (ref) => getHostRef(ref).$modeName$;
1847
+ var parsePropertyValue = (propValue, propType) => {
1848
+ if (propValue != null && !isComplexType(propValue)) {
1849
+ if (propType & 4 /* Boolean */) {
1850
+ return propValue === "false" ? false : propValue === "" || !!propValue;
1851
+ }
1852
+ if (propType & 2 /* Number */) {
1853
+ return parseFloat(propValue);
1854
+ }
1855
+ if (propType & 1 /* String */) {
1856
+ return String(propValue);
1857
+ }
1858
+ return propValue;
1859
+ }
1860
+ return propValue;
1861
+ };
1862
+ var getElement = (ref) => getHostRef(ref).$hostElement$ ;
1863
+
1864
+ // src/runtime/event-emitter.ts
1865
+ var createEvent = (ref, name, flags) => {
1866
+ const elm = getElement(ref);
1867
+ return {
1868
+ emit: (detail) => {
1869
+ return emitEvent(elm, name, {
1870
+ bubbles: !!(flags & 4 /* Bubbles */),
1871
+ composed: !!(flags & 2 /* Composed */),
1872
+ cancelable: !!(flags & 1 /* Cancellable */),
1873
+ detail
1874
+ });
1875
+ }
1876
+ };
1877
+ };
1878
+ var emitEvent = (elm, name, opts) => {
1879
+ const ev = plt.ce(name, opts);
1880
+ elm.dispatchEvent(ev);
1881
+ return ev;
1882
+ };
1883
+ var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
1884
+ var registerStyle = (scopeId2, cssText, allowCS) => {
1885
+ let style = styles.get(scopeId2);
1886
+ if (supportsConstructableStylesheets && allowCS) {
1887
+ style = style || new CSSStyleSheet();
1888
+ if (typeof style === "string") {
1889
+ style = cssText;
1890
+ } else {
1891
+ style.replaceSync(cssText);
1892
+ }
1893
+ } else {
1894
+ style = cssText;
1895
+ }
1896
+ styles.set(scopeId2, style);
1897
+ };
1898
+ var addStyle = (styleContainerNode, cmpMeta, mode) => {
1899
+ var _a;
1900
+ const scopeId2 = getScopeId(cmpMeta, mode);
1901
+ const style = styles.get(scopeId2);
1902
+ styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
1903
+ if (style) {
1904
+ if (typeof style === "string") {
1905
+ styleContainerNode = styleContainerNode.head || styleContainerNode;
1906
+ let appliedStyles = rootAppliedStyles.get(styleContainerNode);
1907
+ let styleElm;
1908
+ if (!appliedStyles) {
1909
+ rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
1910
+ }
1911
+ if (!appliedStyles.has(scopeId2)) {
1912
+ if (styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
1913
+ styleElm.innerHTML = style;
1914
+ } else {
1915
+ styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
1916
+ styleElm.innerHTML = style;
1917
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
1918
+ if (nonce != null) {
1919
+ styleElm.setAttribute("nonce", nonce);
1920
+ }
1921
+ if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
1922
+ if (styleContainerNode.nodeName === "HEAD") {
1923
+ const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
1924
+ const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
1925
+ styleContainerNode.insertBefore(styleElm, referenceNode2);
1926
+ } else if ("host" in styleContainerNode) {
1927
+ if (supportsConstructableStylesheets) {
1928
+ const stylesheet = new CSSStyleSheet();
1929
+ stylesheet.replaceSync(style);
1930
+ styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
1931
+ } else {
1932
+ const existingStyleContainer = styleContainerNode.querySelector("style");
1933
+ if (existingStyleContainer) {
1934
+ existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
1935
+ } else {
1936
+ styleContainerNode.prepend(styleElm);
1937
+ }
1938
+ }
1939
+ } else {
1940
+ styleContainerNode.append(styleElm);
1941
+ }
1942
+ }
1943
+ if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
1944
+ styleContainerNode.insertBefore(styleElm, null);
1371
1945
  }
1372
1946
  }
1373
- }
1374
- }
1375
- if (checkSlotFallbackVisibility) {
1376
- updateFallbackSlotVisibility(rootVnode.$elm$);
1377
- }
1378
- plt.$flags$ &= ~1 /* isTmpDisconnected */;
1379
- relocateNodes.length = 0;
1380
- }
1381
- if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
1382
- for (const childNode of rootVnode.$elm$.childNodes) {
1383
- if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
1384
- if (isInitialLoad && childNode["s-ih"] == null) {
1385
- childNode["s-ih"] = (_e = childNode.hidden) != null ? _e : false;
1947
+ if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
1948
+ styleElm.innerHTML += SLOT_FB_CSS;
1949
+ }
1950
+ if (appliedStyles) {
1951
+ appliedStyles.add(scopeId2);
1386
1952
  }
1387
- childNode.hidden = true;
1388
1953
  }
1954
+ } else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
1955
+ styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
1389
1956
  }
1390
1957
  }
1391
- contentRef = void 0;
1958
+ return scopeId2;
1959
+ };
1960
+ var attachStyles = (hostRef) => {
1961
+ const cmpMeta = hostRef.$cmpMeta$;
1962
+ const elm = hostRef.$hostElement$;
1963
+ const flags = cmpMeta.$flags$;
1964
+ const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
1965
+ const scopeId2 = addStyle(
1966
+ elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
1967
+ cmpMeta,
1968
+ hostRef.$modeName$
1969
+ );
1970
+ if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
1971
+ elm["s-sc"] = scopeId2;
1972
+ elm.classList.add(scopeId2 + "-h");
1973
+ }
1974
+ endAttachStyles();
1392
1975
  };
1976
+ var getScopeId = (cmp, mode) => "sc-" + (mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
1393
1977
 
1394
1978
  // src/runtime/update-component.ts
1395
1979
  var attachToAncestor = (hostRef, ancestorComponent) => {
@@ -1617,16 +2201,62 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1617
2201
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
1618
2202
  members.map(([memberName, [memberFlags]]) => {
1619
2203
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
1620
- Object.defineProperty(prototype, memberName, {
1621
- get() {
1622
- return getValue(this, memberName);
1623
- },
1624
- set(newValue) {
1625
- setValue(this, memberName, newValue, cmpMeta);
1626
- },
1627
- configurable: true,
1628
- enumerable: true
1629
- });
2204
+ if ((memberFlags & 2048 /* Getter */) === 0) {
2205
+ Object.defineProperty(prototype, memberName, {
2206
+ get() {
2207
+ return getValue(this, memberName);
2208
+ },
2209
+ set(newValue) {
2210
+ setValue(this, memberName, newValue, cmpMeta);
2211
+ },
2212
+ configurable: true,
2213
+ enumerable: true
2214
+ });
2215
+ } else if (flags & 1 /* isElementConstructor */ && memberFlags & 2048 /* Getter */) {
2216
+ {
2217
+ Object.defineProperty(prototype, memberName, {
2218
+ get() {
2219
+ const ref = getHostRef(this);
2220
+ const instance = ref ? ref.$lazyInstance$ : prototype;
2221
+ if (!instance) return;
2222
+ return instance[memberName];
2223
+ },
2224
+ configurable: true,
2225
+ enumerable: true
2226
+ });
2227
+ }
2228
+ if (memberFlags & 4096 /* Setter */) {
2229
+ const origSetter = Object.getOwnPropertyDescriptor(prototype, memberName).set;
2230
+ Object.defineProperty(prototype, memberName, {
2231
+ set(newValue) {
2232
+ const ref = getHostRef(this);
2233
+ if (origSetter) {
2234
+ const currentValue = ref.$hostElement$[memberName];
2235
+ if (!ref.$instanceValues$.get(memberName) && currentValue) {
2236
+ ref.$instanceValues$.set(memberName, currentValue);
2237
+ }
2238
+ origSetter.apply(this, [parsePropertyValue(newValue, cmpMeta.$members$[memberName][0])]);
2239
+ setValue(this, memberName, ref.$hostElement$[memberName], cmpMeta);
2240
+ return;
2241
+ }
2242
+ if (!ref) return;
2243
+ const setterSetVal = () => {
2244
+ const currentValue = ref.$lazyInstance$[memberName];
2245
+ if (!ref.$instanceValues$.get(memberName) && currentValue) {
2246
+ ref.$instanceValues$.set(memberName, currentValue);
2247
+ }
2248
+ ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, cmpMeta.$members$[memberName][0]);
2249
+ setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
2250
+ };
2251
+ if (ref.$lazyInstance$) {
2252
+ setterSetVal();
2253
+ } else {
2254
+ ref.$onReadyPromise$.then(() => setterSetVal());
2255
+ }
2256
+ }
2257
+ });
2258
+ }
2259
+ }
1630
2260
  } else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
1631
2261
  Object.defineProperty(prototype, memberName, {
1632
2262
  value(...args) {
@@ -1646,7 +2276,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1646
2276
  plt.jmp(() => {
1647
2277
  var _a2;
1648
2278
  const propName = attrNameToPropName.get(attrName);
1649
- if (this.hasOwnProperty(propName)) {
2279
+ if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
1650
2280
  newValue = this[propName];
1651
2281
  delete this[propName];
1652
2282
  } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
@@ -1666,7 +2296,10 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1666
2296
  }
1667
2297
  return;
1668
2298
  }
1669
- this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
2299
+ const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
2300
+ if (!propDesc.get || !!propDesc.set) {
2301
+ this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
2302
+ }
1670
2303
  });
1671
2304
  };
1672
2305
  Cstr.observedAttributes = Array.from(
@@ -1782,6 +2415,9 @@ var connectedCallback = (elm) => {
1782
2415
  if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
1783
2416
  const scopeId2 = addStyle(elm.shadowRoot, cmpMeta, elm.getAttribute("s-mode")) ;
1784
2417
  elm.classList.remove(scopeId2 + "-h", scopeId2 + "-s");
2418
+ } else if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2419
+ const scopeId2 = getScopeId(cmpMeta, elm.getAttribute("s-mode") );
2420
+ elm["s-sc"] = scopeId2;
1785
2421
  }
1786
2422
  initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
1787
2423
  }
@@ -1851,287 +2487,12 @@ var disconnectedCallback = async (elm) => {
1851
2487
  hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
1852
2488
  }
1853
2489
  }
1854
- };
1855
- var patchPseudoShadowDom = (hostElementPrototype, descriptorPrototype) => {
1856
- patchCloneNode(hostElementPrototype);
1857
- patchSlotAppendChild(hostElementPrototype);
1858
- patchSlotAppend(hostElementPrototype);
1859
- patchSlotPrepend(hostElementPrototype);
1860
- patchSlotInsertAdjacentElement(hostElementPrototype);
1861
- patchSlotInsertAdjacentHTML(hostElementPrototype);
1862
- patchSlotInsertAdjacentText(hostElementPrototype);
1863
- patchTextContent(hostElementPrototype);
1864
- patchChildSlotNodes(hostElementPrototype, descriptorPrototype);
1865
- patchSlotRemoveChild(hostElementPrototype);
1866
- };
1867
- var patchCloneNode = (HostElementPrototype) => {
1868
- const orgCloneNode = HostElementPrototype.cloneNode;
1869
- HostElementPrototype.cloneNode = function(deep) {
1870
- const srcNode = this;
1871
- const isShadowDom = srcNode.shadowRoot && supportsShadow ;
1872
- const clonedNode = orgCloneNode.call(srcNode, isShadowDom ? deep : false);
1873
- if (!isShadowDom && deep) {
1874
- let i2 = 0;
1875
- let slotted, nonStencilNode;
1876
- const stencilPrivates = [
1877
- "s-id",
1878
- "s-cr",
1879
- "s-lr",
1880
- "s-rc",
1881
- "s-sc",
1882
- "s-p",
1883
- "s-cn",
1884
- "s-sr",
1885
- "s-sn",
1886
- "s-hn",
1887
- "s-ol",
1888
- "s-nr",
1889
- "s-si",
1890
- "s-rf",
1891
- "s-scs"
1892
- ];
1893
- for (; i2 < srcNode.childNodes.length; i2++) {
1894
- slotted = srcNode.childNodes[i2]["s-nr"];
1895
- nonStencilNode = stencilPrivates.every((privateField) => !srcNode.childNodes[i2][privateField]);
1896
- if (slotted) {
1897
- if (clonedNode.__appendChild) {
1898
- clonedNode.__appendChild(slotted.cloneNode(true));
1899
- } else {
1900
- clonedNode.appendChild(slotted.cloneNode(true));
1901
- }
1902
- }
1903
- if (nonStencilNode) {
1904
- clonedNode.appendChild(srcNode.childNodes[i2].cloneNode(true));
1905
- }
1906
- }
1907
- }
1908
- return clonedNode;
1909
- };
1910
- };
1911
- var patchSlotAppendChild = (HostElementPrototype) => {
1912
- HostElementPrototype.__appendChild = HostElementPrototype.appendChild;
1913
- HostElementPrototype.appendChild = function(newChild) {
1914
- const slotName = newChild["s-sn"] = getSlotName(newChild);
1915
- const slotNode = getHostSlotNode(this.childNodes, slotName, this.tagName);
1916
- if (slotNode) {
1917
- const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
1918
- const appendAfter = slotChildNodes[slotChildNodes.length - 1];
1919
- const insertedNode = insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
1920
- updateFallbackSlotVisibility(this);
1921
- return insertedNode;
1922
- }
1923
- return this.__appendChild(newChild);
1924
- };
1925
- };
1926
- var patchSlotRemoveChild = (ElementPrototype) => {
1927
- ElementPrototype.__removeChild = ElementPrototype.removeChild;
1928
- ElementPrototype.removeChild = function(toRemove) {
1929
- if (toRemove && typeof toRemove["s-sn"] !== "undefined") {
1930
- const slotNode = getHostSlotNode(this.childNodes, toRemove["s-sn"], this.tagName);
1931
- if (slotNode) {
1932
- const slotChildNodes = getHostSlotChildNodes(slotNode, toRemove["s-sn"]);
1933
- const existingNode = slotChildNodes.find((n) => n === toRemove);
1934
- if (existingNode) {
1935
- existingNode.remove();
1936
- updateFallbackSlotVisibility(this);
1937
- return;
1938
- }
1939
- }
1940
- }
1941
- return this.__removeChild(toRemove);
1942
- };
1943
- };
1944
- var patchSlotPrepend = (HostElementPrototype) => {
1945
- const originalPrepend = HostElementPrototype.prepend;
1946
- HostElementPrototype.prepend = function(...newChildren) {
1947
- newChildren.forEach((newChild) => {
1948
- if (typeof newChild === "string") {
1949
- newChild = this.ownerDocument.createTextNode(newChild);
1950
- }
1951
- const slotName = newChild["s-sn"] = getSlotName(newChild);
1952
- const slotNode = getHostSlotNode(this.childNodes, slotName, this.tagName);
1953
- if (slotNode) {
1954
- const slotPlaceholder = document.createTextNode("");
1955
- slotPlaceholder["s-nr"] = newChild;
1956
- slotNode["s-cr"].parentNode.__appendChild(slotPlaceholder);
1957
- newChild["s-ol"] = slotPlaceholder;
1958
- const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
1959
- const appendAfter = slotChildNodes[0];
1960
- return insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
1961
- }
1962
- if (newChild.nodeType === 1 && !!newChild.getAttribute("slot")) {
1963
- newChild.hidden = true;
1964
- }
1965
- return originalPrepend.call(this, newChild);
1966
- });
1967
- };
1968
- };
1969
- var patchSlotAppend = (HostElementPrototype) => {
1970
- HostElementPrototype.append = function(...newChildren) {
1971
- newChildren.forEach((newChild) => {
1972
- if (typeof newChild === "string") {
1973
- newChild = this.ownerDocument.createTextNode(newChild);
1974
- }
1975
- this.appendChild(newChild);
1976
- });
1977
- };
1978
- };
1979
- var patchSlotInsertAdjacentHTML = (HostElementPrototype) => {
1980
- const originalInsertAdjacentHtml = HostElementPrototype.insertAdjacentHTML;
1981
- HostElementPrototype.insertAdjacentHTML = function(position, text) {
1982
- if (position !== "afterbegin" && position !== "beforeend") {
1983
- return originalInsertAdjacentHtml.call(this, position, text);
1984
- }
1985
- const container = this.ownerDocument.createElement("_");
1986
- let node;
1987
- container.innerHTML = text;
1988
- if (position === "afterbegin") {
1989
- while (node = container.firstChild) {
1990
- this.prepend(node);
1991
- }
1992
- } else if (position === "beforeend") {
1993
- while (node = container.firstChild) {
1994
- this.append(node);
1995
- }
1996
- }
1997
- };
1998
- };
1999
- var patchSlotInsertAdjacentText = (HostElementPrototype) => {
2000
- HostElementPrototype.insertAdjacentText = function(position, text) {
2001
- this.insertAdjacentHTML(position, text);
2002
- };
2003
- };
2004
- var patchSlotInsertAdjacentElement = (HostElementPrototype) => {
2005
- const originalInsertAdjacentElement = HostElementPrototype.insertAdjacentElement;
2006
- HostElementPrototype.insertAdjacentElement = function(position, element) {
2007
- if (position !== "afterbegin" && position !== "beforeend") {
2008
- return originalInsertAdjacentElement.call(this, position, element);
2009
- }
2010
- if (position === "afterbegin") {
2011
- this.prepend(element);
2012
- return element;
2013
- } else if (position === "beforeend") {
2014
- this.append(element);
2015
- return element;
2016
- }
2017
- return element;
2018
- };
2019
- };
2020
- var patchTextContent = (hostElementPrototype) => {
2021
- const descriptor = Object.getOwnPropertyDescriptor(Node.prototype, "textContent");
2022
- Object.defineProperty(hostElementPrototype, "__textContent", descriptor);
2023
- {
2024
- Object.defineProperty(hostElementPrototype, "textContent", {
2025
- // To mimic shadow root behavior, we need to return the text content of all
2026
- // nodes in a slot reference node
2027
- get() {
2028
- const slotRefNodes = getAllChildSlotNodes(this.childNodes);
2029
- const textContent = slotRefNodes.map((node) => {
2030
- var _a, _b;
2031
- const text = [];
2032
- let slotContent = node.nextSibling;
2033
- while (slotContent && slotContent["s-sn"] === node["s-sn"]) {
2034
- if (slotContent.nodeType === 3 /* TEXT_NODE */ || slotContent.nodeType === 1 /* ELEMENT_NODE */) {
2035
- text.push((_b = (_a = slotContent.textContent) == null ? void 0 : _a.trim()) != null ? _b : "");
2036
- }
2037
- slotContent = slotContent.nextSibling;
2038
- }
2039
- return text.filter((ref) => ref !== "").join(" ");
2040
- }).filter((text) => text !== "").join(" ");
2041
- return " " + textContent + " ";
2042
- },
2043
- // To mimic shadow root behavior, we need to overwrite all nodes in a slot
2044
- // reference node. If a default slot reference node exists, the text content will be
2045
- // placed there. Otherwise, the new text node will be hidden
2046
- set(value) {
2047
- const slotRefNodes = getAllChildSlotNodes(this.childNodes);
2048
- slotRefNodes.forEach((node) => {
2049
- let slotContent = node.nextSibling;
2050
- while (slotContent && slotContent["s-sn"] === node["s-sn"]) {
2051
- const tmp = slotContent;
2052
- slotContent = slotContent.nextSibling;
2053
- tmp.remove();
2054
- }
2055
- if (node["s-sn"] === "") {
2056
- const textNode = this.ownerDocument.createTextNode(value);
2057
- textNode["s-sn"] = "";
2058
- insertBefore(node.parentElement, textNode, node.nextSibling);
2059
- } else {
2060
- node.remove();
2061
- }
2062
- });
2063
- }
2064
- });
2065
- }
2066
- };
2067
- var patchChildSlotNodes = (elm, cmpMeta) => {
2068
- class FakeNodeList extends Array {
2069
- item(n) {
2070
- return this[n];
2071
- }
2072
- }
2073
- if (cmpMeta.$flags$ & 8 /* needsShadowDomShim */) {
2074
- const childNodesFn = elm.__lookupGetter__("childNodes");
2075
- Object.defineProperty(elm, "children", {
2076
- get() {
2077
- return this.childNodes.map((n) => n.nodeType === 1);
2078
- }
2079
- });
2080
- Object.defineProperty(elm, "childElementCount", {
2081
- get() {
2082
- return elm.children.length;
2083
- }
2084
- });
2085
- Object.defineProperty(elm, "childNodes", {
2086
- get() {
2087
- const childNodes = childNodesFn.call(this);
2088
- if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0 && getHostRef(this).$flags$ & 2 /* hasRendered */) {
2089
- const result = new FakeNodeList();
2090
- for (let i2 = 0; i2 < childNodes.length; i2++) {
2091
- const slot = childNodes[i2]["s-nr"];
2092
- if (slot) {
2093
- result.push(slot);
2094
- }
2095
- }
2096
- return result;
2097
- }
2098
- return FakeNodeList.from(childNodes);
2099
- }
2100
- });
2101
- }
2102
- };
2103
- var getAllChildSlotNodes = (childNodes) => {
2104
- const slotRefNodes = [];
2105
- for (const childNode of Array.from(childNodes)) {
2106
- if (childNode["s-sr"]) {
2107
- slotRefNodes.push(childNode);
2108
- }
2109
- slotRefNodes.push(...getAllChildSlotNodes(childNode.childNodes));
2110
- }
2111
- return slotRefNodes;
2112
- };
2113
- var getSlotName = (node) => node["s-sn"] || node.nodeType === 1 && node.getAttribute("slot") || "";
2114
- var getHostSlotNode = (childNodes, slotName, hostName) => {
2115
- let i2 = 0;
2116
- let childNode;
2117
- for (; i2 < childNodes.length; i2++) {
2118
- childNode = childNodes[i2];
2119
- if (childNode["s-sr"] && childNode["s-sn"] === slotName && childNode["s-hn"] === hostName) {
2120
- return childNode;
2121
- }
2122
- childNode = getHostSlotNode(childNode.childNodes, slotName, hostName);
2123
- if (childNode) {
2124
- return childNode;
2125
- }
2490
+ if (rootAppliedStyles.has(elm)) {
2491
+ rootAppliedStyles.delete(elm);
2126
2492
  }
2127
- return null;
2128
- };
2129
- var getHostSlotChildNodes = (n, slotName) => {
2130
- const childNodes = [n];
2131
- while ((n = n.nextSibling) && n["s-sn"] === slotName) {
2132
- childNodes.push(n);
2493
+ if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
2494
+ rootAppliedStyles.delete(elm.shadowRoot);
2133
2495
  }
2134
- return childNodes;
2135
2496
  };
2136
2497
 
2137
2498
  // src/runtime/bootstrap-lazy.ts
@@ -2222,6 +2583,13 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2222
2583
  }
2223
2584
  disconnectedCallback() {
2224
2585
  plt.jmp(() => disconnectedCallback(this));
2586
+ plt.raf(() => {
2587
+ var _a3;
2588
+ const hostRef = getHostRef(this);
2589
+ if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
2590
+ delete hostRef.$vnode$.$elm$;
2591
+ }
2592
+ });
2225
2593
  }
2226
2594
  componentOnReady() {
2227
2595
  return getHostRef(this).$onReadyPromise$;
@@ -2229,7 +2597,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2229
2597
  };
2230
2598
  {
2231
2599
  if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2232
- patchPseudoShadowDom(HostElement.prototype, cmpMeta);
2600
+ patchPseudoShadowDom(HostElement.prototype);
2233
2601
  }
2234
2602
  }
2235
2603
  cmpMeta.$lazyBundleId$ = lazyBundle[0];