@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
@@ -2,10 +2,10 @@
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
4
  const NAMESPACE = 'ionic';
5
- const BUILD = /* ionic */ { allRenderFn: false, appendChildSlotFix: true, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: true, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: true, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: true, experimentalSlotFixes: true, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: true, hostListenerTargetDocument: true, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: false, hydrateClientSide: true, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: true, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: true, scopedSlotTextContentFix: true, scriptDataOpts: false, shadowDelegatesFocus: true, shadowDom: true, slot: true, slotChildNodesFix: true, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };
5
+ const BUILD = /* ionic */ { 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 };
6
6
 
7
7
  /*
8
- Stencil Client Platform v4.20.0 | MIT Licensed | https://stenciljs.com
8
+ Stencil Client Platform v4.23.2 | MIT Licensed | https://stenciljs.com
9
9
  */
10
10
  var __defProp = Object.defineProperty;
11
11
  var __export = (target, all) => {
@@ -18,9 +18,17 @@ var Build = {
18
18
  isServer: false,
19
19
  isTesting: false
20
20
  };
21
+
22
+ // src/utils/constants.ts
23
+ var SVG_NS = "http://www.w3.org/2000/svg";
24
+ var HTML_NS = "http://www.w3.org/1999/xhtml";
25
+
26
+ // src/client/client-host-ref.ts
21
27
  var hostRefs = /* @__PURE__ */ new WeakMap();
22
28
  var getHostRef = (ref) => hostRefs.get(ref);
23
- var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
29
+ var registerInstance = (lazyInstance, hostRef) => {
30
+ hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
31
+ };
24
32
  var registerHost = (hostElement, cmpMeta) => {
25
33
  const hostRef = {
26
34
  $flags$: 0,
@@ -36,7 +44,8 @@ var registerHost = (hostElement, cmpMeta) => {
36
44
  hostElement["s-p"] = [];
37
45
  hostElement["s-rc"] = [];
38
46
  }
39
- return hostRefs.set(hostElement, hostRef);
47
+ const ref = hostRefs.set(hostElement, hostRef);
48
+ return ref;
40
49
  };
41
50
  var isMemberInElement = (elm, memberName) => memberName in elm;
42
51
  var consoleError = (e, el) => (0, console.error)(e, el);
@@ -77,6 +86,7 @@ var CONTENT_REF_ID = "r";
77
86
  var ORG_LOCATION_ID = "o";
78
87
  var SLOT_NODE_ID = "s";
79
88
  var TEXT_NODE_ID = "t";
89
+ var COMMENT_NODE_ID = "c";
80
90
  var HYDRATE_ID = "s-id";
81
91
  var HYDRATED_STYLE_ID = "sty-id";
82
92
  var HYDRATE_CHILD_ID = "c-id";
@@ -168,13 +178,8 @@ var getAssetPath = (path) => {
168
178
  return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
169
179
  };
170
180
 
171
- // src/utils/constants.ts
172
- var EMPTY_OBJ = {};
173
- var SVG_NS = "http://www.w3.org/2000/svg";
174
- var HTML_NS = "http://www.w3.org/1999/xhtml";
175
-
176
181
  // src/utils/helpers.ts
177
- var isDef = (v) => v != null;
182
+ var isDef = (v) => v != null && v !== void 0;
178
183
  var isComplexType = (o) => {
179
184
  o = typeof o;
180
185
  return o === "object" || o === "function";
@@ -234,20 +239,106 @@ var unwrapErr = (result) => {
234
239
  throw result.value;
235
240
  }
236
241
  };
237
- var createTime = (fnName, tagName = "") => {
238
- {
239
- return () => {
240
- return;
241
- };
242
+ var updateFallbackSlotVisibility = (elm) => {
243
+ const childNodes = elm.__childNodes || elm.childNodes;
244
+ if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
245
+ getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
246
+ var _a;
247
+ if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
248
+ if ((_a = getHostSlotChildNodes(slotNode, slotNode["s-sn"], false)) == null ? void 0 : _a.length) {
249
+ slotNode.hidden = true;
250
+ } else {
251
+ slotNode.hidden = false;
252
+ }
253
+ }
254
+ });
255
+ }
256
+ for (const childNode of childNodes) {
257
+ if (childNode.nodeType === 1 /* ElementNode */ && (childNode.__childNodes || childNode.childNodes).length) {
258
+ updateFallbackSlotVisibility(childNode);
259
+ }
242
260
  }
243
261
  };
244
- var uniqueTime = (key, measureText) => {
245
- {
246
- return () => {
247
- return;
248
- };
262
+ var getSlottedChildNodes = (childNodes) => {
263
+ const result = [];
264
+ for (let i2 = 0; i2 < childNodes.length; i2++) {
265
+ const slottedNode = childNodes[i2]["s-nr"];
266
+ if (slottedNode && slottedNode.isConnected) {
267
+ result.push(slottedNode);
268
+ }
269
+ }
270
+ return result;
271
+ };
272
+ var getHostSlotNodes = (childNodes, hostName, slotName) => {
273
+ let i2 = 0;
274
+ let slottedNodes = [];
275
+ let childNode;
276
+ for (; i2 < childNodes.length; i2++) {
277
+ childNode = childNodes[i2];
278
+ if (childNode["s-sr"] && childNode["s-hn"] === hostName && (!slotName || childNode["s-sn"] === slotName)) {
279
+ slottedNodes.push(childNode);
280
+ if (typeof slotName !== "undefined") return slottedNodes;
281
+ }
282
+ slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
283
+ }
284
+ return slottedNodes;
285
+ };
286
+ var getHostSlotChildNodes = (node, slotName, includeSlot = true) => {
287
+ const childNodes = [];
288
+ if (includeSlot && node["s-sr"] || !node["s-sr"]) childNodes.push(node);
289
+ while ((node = node.nextSibling) && node["s-sn"] === slotName) {
290
+ childNodes.push(node);
291
+ }
292
+ return childNodes;
293
+ };
294
+ var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
295
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
296
+ if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
297
+ return true;
298
+ }
299
+ if (nodeToRelocate.getAttribute("slot") === slotName) {
300
+ return true;
301
+ }
302
+ return false;
303
+ }
304
+ if (nodeToRelocate["s-sn"] === slotName) {
305
+ return true;
306
+ }
307
+ return slotName === "";
308
+ };
309
+ var addSlotRelocateNode = (newChild, slotNode, prepend, position) => {
310
+ let slottedNodeLocation;
311
+ if (newChild["s-ol"] && newChild["s-ol"].isConnected) {
312
+ slottedNodeLocation = newChild["s-ol"];
313
+ } else {
314
+ slottedNodeLocation = document.createTextNode("");
315
+ slottedNodeLocation["s-nr"] = newChild;
316
+ }
317
+ if (!slotNode["s-cr"] || !slotNode["s-cr"].parentNode) return;
318
+ const parent = slotNode["s-cr"].parentNode;
319
+ const appendMethod = prepend ? parent.__prepend || parent.prepend : parent.__appendChild || parent.appendChild;
320
+ if (typeof position !== "undefined") {
321
+ {
322
+ slottedNodeLocation["s-oo"] = position;
323
+ const childNodes = parent.__childNodes || parent.childNodes;
324
+ const slotRelocateNodes = [slottedNodeLocation];
325
+ childNodes.forEach((n) => {
326
+ if (n["s-nr"]) slotRelocateNodes.push(n);
327
+ });
328
+ slotRelocateNodes.sort((a, b) => {
329
+ if (!a["s-oo"] || a["s-oo"] < b["s-oo"]) return -1;
330
+ else if (!b["s-oo"] || b["s-oo"] < a["s-oo"]) return 1;
331
+ return 0;
332
+ });
333
+ slotRelocateNodes.forEach((n) => appendMethod.call(parent, n));
334
+ }
335
+ } else {
336
+ appendMethod.call(parent, slottedNodeLocation);
249
337
  }
338
+ newChild["s-ol"] = slottedNodeLocation;
339
+ newChild["s-sh"] = slotNode["s-hn"];
250
340
  };
341
+ var getSlotName = (node) => node["s-sn"] || node.nodeType === 1 && node.getAttribute("slot") || "";
251
342
  var h = (nodeName, vnodeData, ...children) => {
252
343
  let child = null;
253
344
  let key = null;
@@ -359,431 +450,134 @@ var convertToPrivate = (node) => {
359
450
  vnode.$name$ = node.vname;
360
451
  return vnode;
361
452
  };
362
-
363
- // src/runtime/client-hydrate.ts
364
- var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
365
- const endHydrate = createTime("hydrateClient", tagName);
366
- const shadowRoot = hostElm.shadowRoot;
367
- const childRenderNodes = [];
368
- const slotNodes = [];
369
- const shadowRootNodes = shadowRoot ? [] : null;
370
- const vnode = hostRef.$vnode$ = newVNode(tagName, null);
371
- if (!plt.$orgLocNodes$) {
372
- initializeDocumentHydrate(doc.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
373
- }
374
- hostElm[HYDRATE_ID] = hostId;
375
- hostElm.removeAttribute(HYDRATE_ID);
376
- clientHydrate(vnode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, hostElm, hostId);
377
- childRenderNodes.map((c) => {
378
- const orgLocationId = c.$hostId$ + "." + c.$nodeId$;
379
- const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
380
- const node = c.$elm$;
381
- if (orgLocationNode && supportsShadow && orgLocationNode["s-en"] === "") {
382
- orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
383
- }
384
- if (!shadowRoot) {
385
- node["s-hn"] = tagName;
386
- if (orgLocationNode) {
387
- node["s-ol"] = orgLocationNode;
388
- node["s-ol"]["s-nr"] = node;
389
- }
390
- }
391
- plt.$orgLocNodes$.delete(orgLocationId);
392
- });
393
- if (shadowRoot) {
394
- shadowRootNodes.map((shadowRootNode) => {
395
- if (shadowRootNode) {
396
- shadowRoot.appendChild(shadowRootNode);
453
+ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
454
+ if (oldValue !== newValue) {
455
+ let isProp = isMemberInElement(elm, memberName);
456
+ let ln = memberName.toLowerCase();
457
+ if (memberName === "class") {
458
+ const classList = elm.classList;
459
+ const oldClasses = parseClassList(oldValue);
460
+ let newClasses = parseClassList(newValue);
461
+ if (elm["s-si"]) {
462
+ newClasses.push(elm["s-si"]);
463
+ oldClasses.forEach((c) => {
464
+ if (c.startsWith(elm["s-si"])) newClasses.push(c);
465
+ });
466
+ newClasses = [...new Set(newClasses)];
467
+ classList.add(...newClasses);
468
+ delete elm["s-si"];
469
+ } else {
470
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
471
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
397
472
  }
398
- });
399
- }
400
- endHydrate();
401
- };
402
- var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId) => {
403
- let childNodeType;
404
- let childIdSplt;
405
- let childVNode;
406
- let i2;
407
- if (node.nodeType === 1 /* ElementNode */) {
408
- childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
409
- if (childNodeType) {
410
- childIdSplt = childNodeType.split(".");
411
- if (childIdSplt[0] === hostId || childIdSplt[0] === "0") {
412
- childVNode = {
413
- $flags$: 0,
414
- $hostId$: childIdSplt[0],
415
- $nodeId$: childIdSplt[1],
416
- $depth$: childIdSplt[2],
417
- $index$: childIdSplt[3],
418
- $tag$: node.tagName.toLowerCase(),
419
- $elm$: node,
420
- $attrs$: null,
421
- $children$: null,
422
- $key$: null,
423
- $name$: null,
424
- $text$: null
425
- };
426
- childRenderNodes.push(childVNode);
427
- node.removeAttribute(HYDRATE_CHILD_ID);
428
- if (!parentVNode.$children$) {
429
- parentVNode.$children$ = [];
473
+ } else if (memberName === "style") {
474
+ {
475
+ for (const prop in oldValue) {
476
+ if (!newValue || newValue[prop] == null) {
477
+ if (prop.includes("-")) {
478
+ elm.style.removeProperty(prop);
479
+ } else {
480
+ elm.style[prop] = "";
481
+ }
482
+ }
430
483
  }
431
- parentVNode.$children$[childVNode.$index$] = childVNode;
432
- parentVNode = childVNode;
433
- if (shadowRootNodes && childVNode.$depth$ === "0") {
434
- shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
484
+ }
485
+ for (const prop in newValue) {
486
+ if (!oldValue || newValue[prop] !== oldValue[prop]) {
487
+ if (prop.includes("-")) {
488
+ elm.style.setProperty(prop, newValue[prop]);
489
+ } else {
490
+ elm.style[prop] = newValue[prop];
491
+ }
435
492
  }
436
493
  }
437
- }
438
- if (node.shadowRoot) {
439
- for (i2 = node.shadowRoot.childNodes.length - 1; i2 >= 0; i2--) {
440
- clientHydrate(
441
- parentVNode,
442
- childRenderNodes,
443
- slotNodes,
444
- shadowRootNodes,
445
- hostElm,
446
- node.shadowRoot.childNodes[i2],
447
- hostId
448
- );
494
+ } else if (memberName === "key") ; else if (memberName === "ref") {
495
+ if (newValue) {
496
+ newValue(elm);
449
497
  }
450
- }
451
- for (i2 = node.childNodes.length - 1; i2 >= 0; i2--) {
452
- clientHydrate(
453
- parentVNode,
454
- childRenderNodes,
455
- slotNodes,
456
- shadowRootNodes,
457
- hostElm,
458
- node.childNodes[i2],
459
- hostId
460
- );
461
- }
462
- } else if (node.nodeType === 8 /* CommentNode */) {
463
- childIdSplt = node.nodeValue.split(".");
464
- if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
465
- childNodeType = childIdSplt[0];
466
- childVNode = {
467
- $flags$: 0,
468
- $hostId$: childIdSplt[1],
469
- $nodeId$: childIdSplt[2],
470
- $depth$: childIdSplt[3],
471
- $index$: childIdSplt[4],
472
- $elm$: node,
473
- $attrs$: null,
474
- $children$: null,
475
- $key$: null,
476
- $name$: null,
477
- $tag$: null,
478
- $text$: null
479
- };
480
- if (childNodeType === TEXT_NODE_ID) {
481
- childVNode.$elm$ = node.nextSibling;
482
- if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
483
- childVNode.$text$ = childVNode.$elm$.textContent;
484
- childRenderNodes.push(childVNode);
485
- node.remove();
486
- if (!parentVNode.$children$) {
487
- parentVNode.$children$ = [];
488
- }
489
- parentVNode.$children$[childVNode.$index$] = childVNode;
490
- if (shadowRootNodes && childVNode.$depth$ === "0") {
491
- shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
492
- }
498
+ } else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
499
+ if (memberName[2] === "-") {
500
+ memberName = memberName.slice(3);
501
+ } else if (isMemberInElement(win, ln)) {
502
+ memberName = ln.slice(2);
503
+ } else {
504
+ memberName = ln[2] + memberName.slice(3);
505
+ }
506
+ if (oldValue || newValue) {
507
+ const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
508
+ memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
509
+ if (oldValue) {
510
+ plt.rel(elm, memberName, oldValue, capture);
493
511
  }
494
- } else if (childVNode.$hostId$ === hostId) {
495
- if (childNodeType === SLOT_NODE_ID) {
496
- childVNode.$tag$ = "slot";
497
- if (childIdSplt[5]) {
498
- node["s-sn"] = childVNode.$name$ = childIdSplt[5];
499
- } else {
500
- node["s-sn"] = "";
501
- }
502
- node["s-sr"] = true;
503
- if (shadowRootNodes) {
504
- childVNode.$elm$ = doc.createElement(childVNode.$tag$);
505
- if (childVNode.$name$) {
506
- childVNode.$elm$.setAttribute("name", childVNode.$name$);
507
- }
508
- node.parentNode.insertBefore(childVNode.$elm$, node);
509
- node.remove();
510
- if (childVNode.$depth$ === "0") {
511
- shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
512
+ if (newValue) {
513
+ plt.ael(elm, memberName, newValue, capture);
514
+ }
515
+ }
516
+ } else {
517
+ const isComplex = isComplexType(newValue);
518
+ if ((isProp || isComplex && newValue !== null) && !isSvg) {
519
+ try {
520
+ if (!elm.tagName.includes("-")) {
521
+ const n = newValue == null ? "" : newValue;
522
+ if (memberName === "list") {
523
+ isProp = false;
524
+ } else if (oldValue == null || elm[memberName] != n) {
525
+ if (typeof elm.__lookupSetter__(memberName) === "function") {
526
+ elm[memberName] = n;
527
+ } else {
528
+ elm.setAttribute(memberName, n);
529
+ }
512
530
  }
531
+ } else {
532
+ elm[memberName] = newValue;
513
533
  }
514
- slotNodes.push(childVNode);
515
- if (!parentVNode.$children$) {
516
- parentVNode.$children$ = [];
517
- }
518
- parentVNode.$children$[childVNode.$index$] = childVNode;
519
- } else if (childNodeType === CONTENT_REF_ID) {
520
- if (shadowRootNodes) {
521
- node.remove();
534
+ } catch (e) {
535
+ }
536
+ }
537
+ let xlink = false;
538
+ {
539
+ if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
540
+ memberName = ln;
541
+ xlink = true;
542
+ }
543
+ }
544
+ if (newValue == null || newValue === false) {
545
+ if (newValue !== false || elm.getAttribute(memberName) === "") {
546
+ if (xlink) {
547
+ elm.removeAttributeNS(XLINK_NS, memberName);
522
548
  } else {
523
- hostElm["s-cr"] = node;
524
- node["s-cn"] = true;
549
+ elm.removeAttribute(memberName);
525
550
  }
526
551
  }
552
+ } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
553
+ newValue = newValue === true ? "" : newValue;
554
+ if (xlink) {
555
+ elm.setAttributeNS(XLINK_NS, memberName, newValue);
556
+ } else {
557
+ elm.setAttribute(memberName, newValue);
558
+ }
527
559
  }
528
560
  }
529
- } else if (parentVNode && parentVNode.$tag$ === "style") {
530
- const vnode = newVNode(null, node.textContent);
531
- vnode.$elm$ = node;
532
- vnode.$index$ = "0";
533
- parentVNode.$children$ = [vnode];
534
- }
535
- };
536
- var initializeDocumentHydrate = (node, orgLocNodes) => {
537
- if (node.nodeType === 1 /* ElementNode */) {
538
- let i2 = 0;
539
- if (node.shadowRoot) {
540
- for (; i2 < node.shadowRoot.childNodes.length; i2++) {
541
- initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
542
- }
543
- }
544
- for (i2 = 0; i2 < node.childNodes.length; i2++) {
545
- initializeDocumentHydrate(node.childNodes[i2], orgLocNodes);
546
- }
547
- } else if (node.nodeType === 8 /* CommentNode */) {
548
- const childIdSplt = node.nodeValue.split(".");
549
- if (childIdSplt[0] === ORG_LOCATION_ID) {
550
- orgLocNodes.set(childIdSplt[1] + "." + childIdSplt[2], node);
551
- node.nodeValue = "";
552
- node["s-en"] = childIdSplt[3];
553
- }
554
- }
555
- };
556
-
557
- // src/runtime/mode.ts
558
- var computeMode = (elm) => modeResolutionChain.map((h2) => h2(elm)).find((m) => !!m);
559
- var setMode = (handler) => modeResolutionChain.push(handler);
560
- var getMode = (ref) => getHostRef(ref).$modeName$;
561
- var parsePropertyValue = (propValue, propType) => {
562
- if (propValue != null && !isComplexType(propValue)) {
563
- if (propType & 4 /* Boolean */) {
564
- return propValue === "false" ? false : propValue === "" || !!propValue;
565
- }
566
- if (propType & 2 /* Number */) {
567
- return parseFloat(propValue);
568
- }
569
- if (propType & 1 /* String */) {
570
- return String(propValue);
571
- }
572
- return propValue;
573
- }
574
- return propValue;
575
- };
576
- var getElement = (ref) => getHostRef(ref).$hostElement$ ;
577
-
578
- // src/runtime/event-emitter.ts
579
- var createEvent = (ref, name, flags) => {
580
- const elm = getElement(ref);
581
- return {
582
- emit: (detail) => {
583
- return emitEvent(elm, name, {
584
- bubbles: !!(flags & 4 /* Bubbles */),
585
- composed: !!(flags & 2 /* Composed */),
586
- cancelable: !!(flags & 1 /* Cancellable */),
587
- detail
588
- });
589
- }
590
- };
591
- };
592
- var emitEvent = (elm, name, opts) => {
593
- const ev = plt.ce(name, opts);
594
- elm.dispatchEvent(ev);
595
- return ev;
596
- };
597
- var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
598
- var registerStyle = (scopeId2, cssText, allowCS) => {
599
- let style = styles.get(scopeId2);
600
- if (supportsConstructableStylesheets && allowCS) {
601
- style = style || new CSSStyleSheet();
602
- if (typeof style === "string") {
603
- style = cssText;
604
- } else {
605
- style.replaceSync(cssText);
606
- }
607
- } else {
608
- style = cssText;
609
- }
610
- styles.set(scopeId2, style);
611
- };
612
- var addStyle = (styleContainerNode, cmpMeta, mode) => {
613
- var _a;
614
- const scopeId2 = getScopeId(cmpMeta, mode);
615
- const style = styles.get(scopeId2);
616
- styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
617
- if (style) {
618
- if (typeof style === "string") {
619
- styleContainerNode = styleContainerNode.head || styleContainerNode;
620
- let appliedStyles = rootAppliedStyles.get(styleContainerNode);
621
- let styleElm;
622
- if (!appliedStyles) {
623
- rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
624
- }
625
- if (!appliedStyles.has(scopeId2)) {
626
- if (styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
627
- styleElm.innerHTML = style;
628
- } else {
629
- styleElm = doc.createElement("style");
630
- styleElm.innerHTML = style;
631
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
632
- if (nonce != null) {
633
- styleElm.setAttribute("nonce", nonce);
634
- }
635
- const injectStyle = (
636
- /**
637
- * we render a scoped component
638
- */
639
- !(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) || /**
640
- * we are using shadow dom and render the style tag within the shadowRoot
641
- */
642
- cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD"
643
- );
644
- if (injectStyle) {
645
- styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
646
- }
647
- }
648
- if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
649
- styleElm.innerHTML += SLOT_FB_CSS;
650
- }
651
- if (appliedStyles) {
652
- appliedStyles.add(scopeId2);
653
- }
654
- }
655
- } else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
656
- styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
657
- }
658
561
  }
659
- return scopeId2;
660
562
  };
661
- var attachStyles = (hostRef) => {
662
- const cmpMeta = hostRef.$cmpMeta$;
663
- const elm = hostRef.$hostElement$;
664
- const flags = cmpMeta.$flags$;
665
- const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
666
- const scopeId2 = addStyle(
667
- elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
668
- cmpMeta,
669
- hostRef.$modeName$
670
- );
671
- if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
672
- elm["s-sc"] = scopeId2;
673
- elm.classList.add(scopeId2 + "-h");
674
- if (flags & 2 /* scopedCssEncapsulation */) {
675
- elm.classList.add(scopeId2 + "-s");
676
- }
563
+ var parseClassListRegex = /\s/;
564
+ var parseClassList = (value) => {
565
+ if (typeof value === "object" && "baseVal" in value) {
566
+ value = value.baseVal;
677
567
  }
678
- endAttachStyles();
679
- };
680
- var getScopeId = (cmp, mode) => "sc-" + (mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
681
- var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
682
- if (oldValue !== newValue) {
683
- let isProp = isMemberInElement(elm, memberName);
684
- let ln = memberName.toLowerCase();
685
- if (memberName === "class") {
686
- const classList = elm.classList;
687
- const oldClasses = parseClassList(oldValue);
688
- const newClasses = parseClassList(newValue);
689
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
690
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
691
- } else if (memberName === "style") {
692
- {
693
- for (const prop in oldValue) {
694
- if (!newValue || newValue[prop] == null) {
695
- if (prop.includes("-")) {
696
- elm.style.removeProperty(prop);
697
- } else {
698
- elm.style[prop] = "";
699
- }
700
- }
701
- }
702
- }
703
- for (const prop in newValue) {
704
- if (!oldValue || newValue[prop] !== oldValue[prop]) {
705
- if (prop.includes("-")) {
706
- elm.style.setProperty(prop, newValue[prop]);
707
- } else {
708
- elm.style[prop] = newValue[prop];
709
- }
710
- }
711
- }
712
- } else if (memberName === "key") ; else if (memberName === "ref") {
713
- if (newValue) {
714
- newValue(elm);
715
- }
716
- } else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
717
- if (memberName[2] === "-") {
718
- memberName = memberName.slice(3);
719
- } else if (isMemberInElement(win, ln)) {
720
- memberName = ln.slice(2);
721
- } else {
722
- memberName = ln[2] + memberName.slice(3);
723
- }
724
- if (oldValue || newValue) {
725
- const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
726
- memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
727
- if (oldValue) {
728
- plt.rel(elm, memberName, oldValue, capture);
729
- }
730
- if (newValue) {
731
- plt.ael(elm, memberName, newValue, capture);
732
- }
733
- }
734
- } else {
735
- const isComplex = isComplexType(newValue);
736
- if ((isProp || isComplex && newValue !== null) && !isSvg) {
737
- try {
738
- if (!elm.tagName.includes("-")) {
739
- const n = newValue == null ? "" : newValue;
740
- if (memberName === "list") {
741
- isProp = false;
742
- } else if (oldValue == null || elm[memberName] != n) {
743
- elm[memberName] = n;
744
- }
745
- } else {
746
- elm[memberName] = newValue;
747
- }
748
- } catch (e) {
749
- }
750
- }
751
- let xlink = false;
752
- {
753
- if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
754
- memberName = ln;
755
- xlink = true;
756
- }
757
- }
758
- if (newValue == null || newValue === false) {
759
- if (newValue !== false || elm.getAttribute(memberName) === "") {
760
- if (xlink) {
761
- elm.removeAttributeNS(XLINK_NS, memberName);
762
- } else {
763
- elm.removeAttribute(memberName);
764
- }
765
- }
766
- } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
767
- newValue = newValue === true ? "" : newValue;
768
- if (xlink) {
769
- elm.setAttributeNS(XLINK_NS, memberName, newValue);
770
- } else {
771
- elm.setAttribute(memberName, newValue);
772
- }
773
- }
774
- }
568
+ if (!value) {
569
+ return [];
775
570
  }
571
+ return value.split(parseClassListRegex);
776
572
  };
777
- var parseClassListRegex = /\s/;
778
- var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
779
573
  var CAPTURE_EVENT_SUFFIX = "Capture";
780
574
  var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
781
575
 
782
576
  // src/runtime/vdom/update-element.ts
783
577
  var updateElement = (oldVnode, newVnode, isSvgMode2) => {
784
578
  const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
785
- const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
786
- const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
579
+ const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
580
+ const newVnodeAttrs = newVnode.$attrs$ || {};
787
581
  {
788
582
  for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
789
583
  if (!(memberName in newVnodeAttrs)) {
@@ -813,7 +607,7 @@ var useNativeShadowDom = false;
813
607
  var checkSlotFallbackVisibility = false;
814
608
  var checkSlotRelocate = false;
815
609
  var isSvgMode = false;
816
- var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
610
+ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
817
611
  var _a;
818
612
  const newVNode2 = newParentVNode.$children$[childIndex];
819
613
  let i2 = 0;
@@ -823,9 +617,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
823
617
  if (!useNativeShadowDom) {
824
618
  checkSlotRelocate = true;
825
619
  if (newVNode2.$tag$ === "slot") {
826
- if (scopeId) {
827
- parentElm.classList.add(scopeId + "-s");
828
- }
829
620
  newVNode2.$flags$ |= newVNode2.$children$ ? (
830
621
  // slot element has fallback content
831
622
  // still create an element that "mocks" the slot element
@@ -856,17 +647,12 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
856
647
  {
857
648
  updateElement(null, newVNode2, isSvgMode);
858
649
  }
859
- const rootNode = elm.getRootNode();
860
- const isElementWithinShadowRoot = !rootNode.querySelector("body");
861
- if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
650
+ if (isDef(scopeId) && elm["s-si"] !== scopeId) {
862
651
  elm.classList.add(elm["s-si"] = scopeId);
863
652
  }
864
- {
865
- updateElementScopeIds(elm, parentElm);
866
- }
867
653
  if (newVNode2.$children$) {
868
654
  for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
869
- childNode = createElm(oldParentVNode, newVNode2, i2, elm);
655
+ childNode = createElm(oldParentVNode, newVNode2, i2);
870
656
  if (childNode) {
871
657
  elm.appendChild(childNode);
872
658
  }
@@ -893,6 +679,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
893
679
  relocateToHostRoot(oldParentVNode.$elm$);
894
680
  }
895
681
  }
682
+ {
683
+ addRemoveSlotScopedClass(contentRef, elm, newParentVNode.$elm$, oldParentVNode == null ? void 0 : oldParentVNode.$elm$);
684
+ }
896
685
  }
897
686
  }
898
687
  return elm;
@@ -901,8 +690,12 @@ var relocateToHostRoot = (parentElm) => {
901
690
  plt.$flags$ |= 1 /* isTmpDisconnected */;
902
691
  const host = parentElm.closest(hostTagName.toLowerCase());
903
692
  if (host != null) {
904
- const contentRefNode = Array.from(host.childNodes).find((ref) => ref["s-cr"]);
905
- const childNodeArray = Array.from(parentElm.childNodes);
693
+ const contentRefNode = Array.from(host.__childNodes || host.childNodes).find(
694
+ (ref) => ref["s-cr"]
695
+ );
696
+ const childNodeArray = Array.from(
697
+ parentElm.__childNodes || parentElm.childNodes
698
+ );
906
699
  for (const childNode of contentRefNode ? childNodeArray.reverse() : childNodeArray) {
907
700
  if (childNode["s-sh"] != null) {
908
701
  insertBefore(host, childNode, contentRefNode != null ? contentRefNode : null);
@@ -915,7 +708,7 @@ var relocateToHostRoot = (parentElm) => {
915
708
  };
916
709
  var putBackInOriginalLocation = (parentElm, recursive) => {
917
710
  plt.$flags$ |= 1 /* isTmpDisconnected */;
918
- const oldSlotChildNodes = Array.from(parentElm.childNodes);
711
+ const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
919
712
  if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
920
713
  let node = parentElm;
921
714
  while (node = node.nextSibling) {
@@ -927,7 +720,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
927
720
  for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
928
721
  const childNode = oldSlotChildNodes[i2];
929
722
  if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
930
- insertBefore(parentReferenceNode(childNode), childNode, referenceNode(childNode));
723
+ insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
931
724
  childNode["s-ol"].remove();
932
725
  childNode["s-ol"] = void 0;
933
726
  childNode["s-sh"] = void 0;
@@ -947,7 +740,7 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
947
740
  }
948
741
  for (; startIdx <= endIdx; ++startIdx) {
949
742
  if (vnodes[startIdx]) {
950
- childNode = createElm(null, parentVNode, startIdx, parentElm);
743
+ childNode = createElm(null, parentVNode, startIdx);
951
744
  if (childNode) {
952
745
  vnodes[startIdx].$elm$ = childNode;
953
746
  insertBefore(containerElm, childNode, referenceNode(before) );
@@ -1034,7 +827,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
1034
827
  if (idxInOld >= 0) {
1035
828
  elmToMove = oldCh[idxInOld];
1036
829
  if (elmToMove.$tag$ !== newStartVnode.$tag$) {
1037
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld, parentElm);
830
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
1038
831
  } else {
1039
832
  patch(elmToMove, newStartVnode, isInitialRender);
1040
833
  oldCh[idxInOld] = void 0;
@@ -1042,12 +835,16 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
1042
835
  }
1043
836
  newStartVnode = newCh[++newStartIdx];
1044
837
  } else {
1045
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx, parentElm);
838
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
1046
839
  newStartVnode = newCh[++newStartIdx];
1047
840
  }
1048
841
  if (node) {
1049
842
  {
1050
- insertBefore(parentReferenceNode(oldStartVnode.$elm$), node, referenceNode(oldStartVnode.$elm$));
843
+ insertBefore(
844
+ referenceNode(oldStartVnode.$elm$).parentNode,
845
+ node,
846
+ referenceNode(oldStartVnode.$elm$)
847
+ );
1051
848
  }
1052
849
  }
1053
850
  }
@@ -1068,28 +865,19 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
1068
865
  var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
1069
866
  if (leftVNode.$tag$ === rightVNode.$tag$) {
1070
867
  if (leftVNode.$tag$ === "slot") {
1071
- if (
1072
- // The component gets hydrated and no VDOM has been initialized.
1073
- // Here the comparison can't happen as $name$ property is not set for `leftNode`.
1074
- "$nodeId$" in leftVNode && isInitialRender && // `leftNode` is not from type HTMLComment which would cause many
1075
- // hydration comments to be removed
1076
- leftVNode.$elm$.nodeType !== 8
1077
- ) {
1078
- return false;
1079
- }
1080
868
  return leftVNode.$name$ === rightVNode.$name$;
1081
869
  }
1082
870
  if (!isInitialRender) {
1083
871
  return leftVNode.$key$ === rightVNode.$key$;
1084
872
  }
873
+ if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
874
+ leftVNode.$key$ = rightVNode.$key$;
875
+ }
1085
876
  return true;
1086
877
  }
1087
878
  return false;
1088
879
  };
1089
- var referenceNode = (node) => {
1090
- return node && node["s-ol"] || node;
1091
- };
1092
- var parentReferenceNode = (node) => (node["s-ol"] ? node["s-ol"] : node).parentNode;
880
+ var referenceNode = (node) => node && node["s-ol"] || node;
1093
881
  var patch = (oldVNode, newVNode2, isInitialRender = false) => {
1094
882
  const elm = newVNode2.$elm$ = oldVNode.$elm$;
1095
883
  const oldChildren = oldVNode.$children$;
@@ -1133,41 +921,15 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
1133
921
  elm.data = text;
1134
922
  }
1135
923
  };
1136
- var updateFallbackSlotVisibility = (elm) => {
1137
- const childNodes = elm.childNodes;
1138
- for (const childNode of childNodes) {
1139
- if (childNode.nodeType === 1 /* ElementNode */) {
1140
- if (childNode["s-sr"]) {
1141
- const slotName = childNode["s-sn"];
1142
- childNode.hidden = false;
1143
- for (const siblingNode of childNodes) {
1144
- if (siblingNode !== childNode) {
1145
- if (siblingNode["s-hn"] !== childNode["s-hn"] || slotName !== "") {
1146
- if (siblingNode.nodeType === 1 /* ElementNode */ && (slotName === siblingNode.getAttribute("slot") || slotName === siblingNode["s-sn"]) || siblingNode.nodeType === 3 /* TextNode */ && slotName === siblingNode["s-sn"]) {
1147
- childNode.hidden = true;
1148
- break;
1149
- }
1150
- } else {
1151
- if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
1152
- childNode.hidden = true;
1153
- break;
1154
- }
1155
- }
1156
- }
1157
- }
1158
- }
1159
- updateFallbackSlotVisibility(childNode);
1160
- }
1161
- }
1162
- };
1163
924
  var relocateNodes = [];
1164
925
  var markSlotContentForRelocation = (elm) => {
1165
926
  let node;
1166
927
  let hostContentNodes;
1167
928
  let j;
1168
- for (const childNode of elm.childNodes) {
929
+ const children = elm.__childNodes || elm.childNodes;
930
+ for (const childNode of children) {
1169
931
  if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
1170
- hostContentNodes = node.parentNode.childNodes;
932
+ hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
1171
933
  const slotName = childNode["s-sn"];
1172
934
  for (j = hostContentNodes.length - 1; j >= 0; j--) {
1173
935
  node = hostContentNodes[j];
@@ -1209,21 +971,6 @@ var markSlotContentForRelocation = (elm) => {
1209
971
  }
1210
972
  }
1211
973
  };
1212
- var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
1213
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1214
- if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
1215
- return true;
1216
- }
1217
- if (nodeToRelocate.getAttribute("slot") === slotName) {
1218
- return true;
1219
- }
1220
- return false;
1221
- }
1222
- if (nodeToRelocate["s-sn"] === slotName) {
1223
- return true;
1224
- }
1225
- return slotName === "";
1226
- };
1227
974
  var nullifyVNodeRefs = (vNode) => {
1228
975
  {
1229
976
  vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
@@ -1231,38 +978,33 @@ var nullifyVNodeRefs = (vNode) => {
1231
978
  }
1232
979
  };
1233
980
  var insertBefore = (parent, newNode, reference) => {
1234
- const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
1235
- {
1236
- updateElementScopeIds(newNode, parent);
981
+ if (typeof newNode["s-sn"] === "string" && !!newNode["s-sr"] && !!newNode["s-cr"]) {
982
+ addRemoveSlotScopedClass(newNode["s-cr"], newNode, parent, newNode.parentElement);
1237
983
  }
984
+ const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
1238
985
  return inserted;
1239
986
  };
1240
- var findScopeIds = (element) => {
1241
- const scopeIds = [];
1242
- if (element) {
1243
- scopeIds.push(
1244
- ...element["s-scs"] || [],
1245
- element["s-si"],
1246
- element["s-sc"],
1247
- ...findScopeIds(element.parentElement)
1248
- );
1249
- }
1250
- return scopeIds;
1251
- };
1252
- var updateElementScopeIds = (element, parent, iterateChildNodes = false) => {
987
+ function addRemoveSlotScopedClass(reference, slotNode, newParent, oldParent) {
1253
988
  var _a;
1254
- if (element && parent && element.nodeType === 1 /* ElementNode */) {
1255
- const scopeIds = new Set(findScopeIds(parent).filter(Boolean));
1256
- if (scopeIds.size) {
1257
- (_a = element.classList) == null ? void 0 : _a.add(...element["s-scs"] = [...scopeIds]);
1258
- if (element["s-ol"] || iterateChildNodes) {
1259
- for (const childNode of Array.from(element.childNodes)) {
1260
- updateElementScopeIds(childNode, element, true);
989
+ let scopeId2;
990
+ if (reference && typeof slotNode["s-sn"] === "string" && !!slotNode["s-sr"] && reference.parentNode && reference.parentNode["s-sc"] && (scopeId2 = slotNode["s-si"] || reference.parentNode["s-sc"])) {
991
+ const scopeName = slotNode["s-sn"];
992
+ const hostName = slotNode["s-hn"];
993
+ (_a = newParent.classList) == null ? void 0 : _a.add(scopeId2 + "-s");
994
+ if (oldParent && oldParent.classList.contains(scopeId2 + "-s")) {
995
+ let child = (oldParent.__childNodes || oldParent.childNodes)[0];
996
+ let found = false;
997
+ while (child) {
998
+ if (child["s-sn"] !== scopeName && child["s-hn"] === hostName && !!child["s-sr"]) {
999
+ found = true;
1000
+ break;
1261
1001
  }
1002
+ child = child.nextSibling;
1262
1003
  }
1004
+ if (!found) oldParent.classList.remove(scopeId2 + "-s");
1263
1005
  }
1264
1006
  }
1265
- };
1007
+ }
1266
1008
  var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1267
1009
  var _a, _b, _c, _d, _e;
1268
1010
  const hostElm = hostRef.$hostElement$;
@@ -1314,7 +1056,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1314
1056
  if (slotRefNode) {
1315
1057
  const parentNodeRef = slotRefNode.parentNode;
1316
1058
  let insertBeforeNode = slotRefNode.nextSibling;
1317
- if (insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */) {
1059
+ if ((insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */)) {
1318
1060
  let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
1319
1061
  while (orgLocationNode) {
1320
1062
  let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
@@ -1334,40 +1076,882 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1334
1076
  if (!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode || nodeToRelocate.nextSibling !== insertBeforeNode) {
1335
1077
  if (nodeToRelocate !== insertBeforeNode) {
1336
1078
  insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
1337
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1079
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
1338
1080
  nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
1339
1081
  }
1340
1082
  }
1341
1083
  }
1342
- nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](nodeToRelocate);
1343
- } else {
1344
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1345
- if (isInitialLoad) {
1346
- nodeToRelocate["s-ih"] = (_d = nodeToRelocate.hidden) != null ? _d : false;
1347
- }
1348
- nodeToRelocate.hidden = true;
1084
+ nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](nodeToRelocate);
1085
+ } else {
1086
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1087
+ if (isInitialLoad) {
1088
+ nodeToRelocate["s-ih"] = (_d = nodeToRelocate.hidden) != null ? _d : false;
1089
+ }
1090
+ nodeToRelocate.hidden = true;
1091
+ }
1092
+ }
1093
+ }
1094
+ }
1095
+ if (checkSlotFallbackVisibility) {
1096
+ updateFallbackSlotVisibility(rootVnode.$elm$);
1097
+ }
1098
+ plt.$flags$ &= ~1 /* isTmpDisconnected */;
1099
+ relocateNodes.length = 0;
1100
+ }
1101
+ if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
1102
+ const children = rootVnode.$elm$.__childNodes || rootVnode.$elm$.childNodes;
1103
+ for (const childNode of children) {
1104
+ if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
1105
+ if (isInitialLoad && childNode["s-ih"] == null) {
1106
+ childNode["s-ih"] = (_e = childNode.hidden) != null ? _e : false;
1107
+ }
1108
+ childNode.hidden = true;
1109
+ }
1110
+ }
1111
+ }
1112
+ contentRef = void 0;
1113
+ };
1114
+
1115
+ // src/runtime/dom-extras.ts
1116
+ var patchPseudoShadowDom = (hostElementPrototype) => {
1117
+ patchCloneNode(hostElementPrototype);
1118
+ patchSlotAppendChild(hostElementPrototype);
1119
+ patchSlotAppend(hostElementPrototype);
1120
+ patchSlotPrepend(hostElementPrototype);
1121
+ patchSlotInsertAdjacentElement(hostElementPrototype);
1122
+ patchSlotInsertAdjacentHTML(hostElementPrototype);
1123
+ patchSlotInsertAdjacentText(hostElementPrototype);
1124
+ patchTextContent(hostElementPrototype);
1125
+ patchChildSlotNodes(hostElementPrototype);
1126
+ patchSlotRemoveChild(hostElementPrototype);
1127
+ };
1128
+ var patchCloneNode = (HostElementPrototype) => {
1129
+ const orgCloneNode = HostElementPrototype.cloneNode;
1130
+ HostElementPrototype.cloneNode = function(deep) {
1131
+ const srcNode = this;
1132
+ const isShadowDom = srcNode.shadowRoot && supportsShadow ;
1133
+ const clonedNode = orgCloneNode.call(srcNode, isShadowDom ? deep : false);
1134
+ if (!isShadowDom && deep) {
1135
+ let i2 = 0;
1136
+ let slotted, nonStencilNode;
1137
+ const stencilPrivates = [
1138
+ "s-id",
1139
+ "s-cr",
1140
+ "s-lr",
1141
+ "s-rc",
1142
+ "s-sc",
1143
+ "s-p",
1144
+ "s-cn",
1145
+ "s-sr",
1146
+ "s-sn",
1147
+ "s-hn",
1148
+ "s-ol",
1149
+ "s-nr",
1150
+ "s-si",
1151
+ "s-rf",
1152
+ "s-scs"
1153
+ ];
1154
+ const childNodes = this.__childNodes || this.childNodes;
1155
+ for (; i2 < childNodes.length; i2++) {
1156
+ slotted = childNodes[i2]["s-nr"];
1157
+ nonStencilNode = stencilPrivates.every((privateField) => !childNodes[i2][privateField]);
1158
+ if (slotted) {
1159
+ if (clonedNode.__appendChild) {
1160
+ clonedNode.__appendChild(slotted.cloneNode(true));
1161
+ } else {
1162
+ clonedNode.appendChild(slotted.cloneNode(true));
1163
+ }
1164
+ }
1165
+ if (nonStencilNode) {
1166
+ clonedNode.appendChild(childNodes[i2].cloneNode(true));
1167
+ }
1168
+ }
1169
+ }
1170
+ return clonedNode;
1171
+ };
1172
+ };
1173
+ var patchSlotAppendChild = (HostElementPrototype) => {
1174
+ HostElementPrototype.__appendChild = HostElementPrototype.appendChild;
1175
+ HostElementPrototype.appendChild = function(newChild) {
1176
+ const slotName = newChild["s-sn"] = getSlotName(newChild);
1177
+ const slotNode = getHostSlotNodes(this.__childNodes || this.childNodes, this.tagName, slotName)[0];
1178
+ if (slotNode) {
1179
+ addSlotRelocateNode(newChild, slotNode);
1180
+ const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
1181
+ const appendAfter = slotChildNodes[slotChildNodes.length - 1];
1182
+ const insertedNode = insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
1183
+ updateFallbackSlotVisibility(this);
1184
+ return insertedNode;
1185
+ }
1186
+ return this.__appendChild(newChild);
1187
+ };
1188
+ };
1189
+ var patchSlotRemoveChild = (ElementPrototype) => {
1190
+ ElementPrototype.__removeChild = ElementPrototype.removeChild;
1191
+ ElementPrototype.removeChild = function(toRemove) {
1192
+ if (toRemove && typeof toRemove["s-sn"] !== "undefined") {
1193
+ const childNodes = this.__childNodes || this.childNodes;
1194
+ const slotNode = getHostSlotNodes(childNodes, this.tagName, toRemove["s-sn"]);
1195
+ if (slotNode && toRemove.isConnected) {
1196
+ toRemove.remove();
1197
+ updateFallbackSlotVisibility(this);
1198
+ return;
1199
+ }
1200
+ }
1201
+ return this.__removeChild(toRemove);
1202
+ };
1203
+ };
1204
+ var patchSlotPrepend = (HostElementPrototype) => {
1205
+ HostElementPrototype.__prepend = HostElementPrototype.prepend;
1206
+ HostElementPrototype.prepend = function(...newChildren) {
1207
+ newChildren.forEach((newChild) => {
1208
+ if (typeof newChild === "string") {
1209
+ newChild = this.ownerDocument.createTextNode(newChild);
1210
+ }
1211
+ const slotName = newChild["s-sn"] = getSlotName(newChild);
1212
+ const childNodes = this.__childNodes || this.childNodes;
1213
+ const slotNode = getHostSlotNodes(childNodes, this.tagName, slotName)[0];
1214
+ if (slotNode) {
1215
+ addSlotRelocateNode(newChild, slotNode, true);
1216
+ const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
1217
+ const appendAfter = slotChildNodes[0];
1218
+ return insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
1219
+ }
1220
+ if (newChild.nodeType === 1 && !!newChild.getAttribute("slot")) {
1221
+ newChild.hidden = true;
1222
+ }
1223
+ return HostElementPrototype.__prepend(newChild);
1224
+ });
1225
+ };
1226
+ };
1227
+ var patchSlotAppend = (HostElementPrototype) => {
1228
+ HostElementPrototype.__append = HostElementPrototype.append;
1229
+ HostElementPrototype.append = function(...newChildren) {
1230
+ newChildren.forEach((newChild) => {
1231
+ if (typeof newChild === "string") {
1232
+ newChild = this.ownerDocument.createTextNode(newChild);
1233
+ }
1234
+ this.appendChild(newChild);
1235
+ });
1236
+ };
1237
+ };
1238
+ var patchSlotInsertAdjacentHTML = (HostElementPrototype) => {
1239
+ const originalInsertAdjacentHtml = HostElementPrototype.insertAdjacentHTML;
1240
+ HostElementPrototype.insertAdjacentHTML = function(position, text) {
1241
+ if (position !== "afterbegin" && position !== "beforeend") {
1242
+ return originalInsertAdjacentHtml.call(this, position, text);
1243
+ }
1244
+ const container = this.ownerDocument.createElement("_");
1245
+ let node;
1246
+ container.innerHTML = text;
1247
+ if (position === "afterbegin") {
1248
+ while (node = container.firstChild) {
1249
+ this.prepend(node);
1250
+ }
1251
+ } else if (position === "beforeend") {
1252
+ while (node = container.firstChild) {
1253
+ this.append(node);
1254
+ }
1255
+ }
1256
+ };
1257
+ };
1258
+ var patchSlotInsertAdjacentText = (HostElementPrototype) => {
1259
+ HostElementPrototype.insertAdjacentText = function(position, text) {
1260
+ this.insertAdjacentHTML(position, text);
1261
+ };
1262
+ };
1263
+ var patchSlotInsertAdjacentElement = (HostElementPrototype) => {
1264
+ const originalInsertAdjacentElement = HostElementPrototype.insertAdjacentElement;
1265
+ HostElementPrototype.insertAdjacentElement = function(position, element) {
1266
+ if (position !== "afterbegin" && position !== "beforeend") {
1267
+ return originalInsertAdjacentElement.call(this, position, element);
1268
+ }
1269
+ if (position === "afterbegin") {
1270
+ this.prepend(element);
1271
+ return element;
1272
+ } else if (position === "beforeend") {
1273
+ this.append(element);
1274
+ return element;
1275
+ }
1276
+ return element;
1277
+ };
1278
+ };
1279
+ var patchTextContent = (hostElementPrototype) => {
1280
+ patchHostOriginalAccessor("textContent", hostElementPrototype);
1281
+ Object.defineProperty(hostElementPrototype, "textContent", {
1282
+ get: function() {
1283
+ let text = "";
1284
+ const childNodes = this.__childNodes ? this.childNodes : getSlottedChildNodes(this.childNodes);
1285
+ childNodes.forEach((node) => text += node.textContent || "");
1286
+ return text;
1287
+ },
1288
+ set: function(value) {
1289
+ const childNodes = this.__childNodes ? this.childNodes : getSlottedChildNodes(this.childNodes);
1290
+ childNodes.forEach((node) => {
1291
+ if (node["s-ol"]) node["s-ol"].remove();
1292
+ node.remove();
1293
+ });
1294
+ this.insertAdjacentHTML("beforeend", value);
1295
+ }
1296
+ });
1297
+ };
1298
+ var patchChildSlotNodes = (elm) => {
1299
+ class FakeNodeList extends Array {
1300
+ item(n) {
1301
+ return this[n];
1302
+ }
1303
+ }
1304
+ patchHostOriginalAccessor("children", elm);
1305
+ Object.defineProperty(elm, "children", {
1306
+ get() {
1307
+ return this.childNodes.filter((n) => n.nodeType === 1);
1308
+ }
1309
+ });
1310
+ Object.defineProperty(elm, "childElementCount", {
1311
+ get() {
1312
+ return this.children.length;
1313
+ }
1314
+ });
1315
+ patchHostOriginalAccessor("firstChild", elm);
1316
+ Object.defineProperty(elm, "firstChild", {
1317
+ get() {
1318
+ return this.childNodes[0];
1319
+ }
1320
+ });
1321
+ patchHostOriginalAccessor("lastChild", elm);
1322
+ Object.defineProperty(elm, "lastChild", {
1323
+ get() {
1324
+ return this.childNodes[this.childNodes.length - 1];
1325
+ }
1326
+ });
1327
+ patchHostOriginalAccessor("childNodes", elm);
1328
+ Object.defineProperty(elm, "childNodes", {
1329
+ get() {
1330
+ var _a, _b;
1331
+ 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 */) {
1332
+ const result = new FakeNodeList();
1333
+ const nodes = getSlottedChildNodes(this.__childNodes);
1334
+ result.push(...nodes);
1335
+ return result;
1336
+ }
1337
+ return FakeNodeList.from(this.__childNodes);
1338
+ }
1339
+ });
1340
+ };
1341
+ var patchNextPrev = (node) => {
1342
+ if (!node || node.__nextSibling || !globalThis.Node) return;
1343
+ patchNextSibling(node);
1344
+ patchPreviousSibling(node);
1345
+ if (node.nodeType === Node.ELEMENT_NODE) {
1346
+ patchNextElementSibling(node);
1347
+ patchPreviousElementSibling(node);
1348
+ }
1349
+ };
1350
+ var patchNextSibling = (node) => {
1351
+ if (!node || node.__nextSibling) return;
1352
+ patchHostOriginalAccessor("nextSibling", node);
1353
+ Object.defineProperty(node, "nextSibling", {
1354
+ get: function() {
1355
+ var _a;
1356
+ const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.childNodes;
1357
+ const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
1358
+ if (parentNodes && index > -1) {
1359
+ return parentNodes[index + 1];
1360
+ }
1361
+ return this.__nextSibling;
1362
+ }
1363
+ });
1364
+ };
1365
+ var patchNextElementSibling = (element) => {
1366
+ if (!element || element.__nextElementSibling) return;
1367
+ patchHostOriginalAccessor("nextElementSibling", element);
1368
+ Object.defineProperty(element, "nextElementSibling", {
1369
+ get: function() {
1370
+ var _a;
1371
+ const parentEles = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.children;
1372
+ const index = parentEles == null ? void 0 : parentEles.indexOf(this);
1373
+ if (parentEles && index > -1) {
1374
+ return parentEles[index + 1];
1375
+ }
1376
+ return this.__nextElementSibling;
1377
+ }
1378
+ });
1379
+ };
1380
+ var patchPreviousSibling = (node) => {
1381
+ if (!node || node.__previousSibling) return;
1382
+ patchHostOriginalAccessor("previousSibling", node);
1383
+ Object.defineProperty(node, "previousSibling", {
1384
+ get: function() {
1385
+ var _a;
1386
+ const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.childNodes;
1387
+ const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
1388
+ if (parentNodes && index > -1) {
1389
+ return parentNodes[index - 1];
1390
+ }
1391
+ return this.__previousSibling;
1392
+ }
1393
+ });
1394
+ };
1395
+ var patchPreviousElementSibling = (element) => {
1396
+ if (!element || element.__previousElementSibling) return;
1397
+ patchHostOriginalAccessor("previousElementSibling", element);
1398
+ Object.defineProperty(element, "previousElementSibling", {
1399
+ get: function() {
1400
+ var _a;
1401
+ const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.children;
1402
+ const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
1403
+ if (parentNodes && index > -1) {
1404
+ return parentNodes[index - 1];
1405
+ }
1406
+ return this.__previousElementSibling;
1407
+ }
1408
+ });
1409
+ };
1410
+ var validElementPatches = ["children", "nextElementSibling", "previousElementSibling"];
1411
+ var validNodesPatches = [
1412
+ "childNodes",
1413
+ "firstChild",
1414
+ "lastChild",
1415
+ "nextSibling",
1416
+ "previousSibling",
1417
+ "textContent"
1418
+ ];
1419
+ function patchHostOriginalAccessor(accessorName, node) {
1420
+ let accessor;
1421
+ if (validElementPatches.includes(accessorName)) {
1422
+ accessor = Object.getOwnPropertyDescriptor(Element.prototype, accessorName);
1423
+ } else if (validNodesPatches.includes(accessorName)) {
1424
+ accessor = Object.getOwnPropertyDescriptor(Node.prototype, accessorName);
1425
+ }
1426
+ if (!accessor) {
1427
+ accessor = Object.getOwnPropertyDescriptor(node, accessorName);
1428
+ }
1429
+ if (accessor) Object.defineProperty(node, "__" + accessorName, accessor);
1430
+ }
1431
+ var createTime = (fnName, tagName = "") => {
1432
+ {
1433
+ return () => {
1434
+ return;
1435
+ };
1436
+ }
1437
+ };
1438
+ var uniqueTime = (key, measureText) => {
1439
+ {
1440
+ return () => {
1441
+ return;
1442
+ };
1443
+ }
1444
+ };
1445
+
1446
+ // src/runtime/client-hydrate.ts
1447
+ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1448
+ const endHydrate = createTime("hydrateClient", tagName);
1449
+ const shadowRoot = hostElm.shadowRoot;
1450
+ const childRenderNodes = [];
1451
+ const slotNodes = [];
1452
+ const slottedNodes = [];
1453
+ const shadowRootNodes = shadowRoot ? [] : null;
1454
+ const vnode = newVNode(tagName, null);
1455
+ vnode.$elm$ = hostElm;
1456
+ let scopeId2;
1457
+ {
1458
+ const cmpMeta = hostRef.$cmpMeta$;
1459
+ if (cmpMeta && cmpMeta.$flags$ & 10 /* needsScopedEncapsulation */ && hostElm["s-sc"]) {
1460
+ scopeId2 = hostElm["s-sc"];
1461
+ hostElm.classList.add(scopeId2 + "-h");
1462
+ } else if (hostElm["s-sc"]) {
1463
+ delete hostElm["s-sc"];
1464
+ }
1465
+ }
1466
+ if (!plt.$orgLocNodes$) {
1467
+ initializeDocumentHydrate(doc.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
1468
+ }
1469
+ hostElm[HYDRATE_ID] = hostId;
1470
+ hostElm.removeAttribute(HYDRATE_ID);
1471
+ hostRef.$vnode$ = clientHydrate(
1472
+ vnode,
1473
+ childRenderNodes,
1474
+ slotNodes,
1475
+ shadowRootNodes,
1476
+ hostElm,
1477
+ hostElm,
1478
+ hostId,
1479
+ slottedNodes
1480
+ );
1481
+ let crIndex = 0;
1482
+ const crLength = childRenderNodes.length;
1483
+ let childRenderNode;
1484
+ for (crIndex; crIndex < crLength; crIndex++) {
1485
+ childRenderNode = childRenderNodes[crIndex];
1486
+ const orgLocationId = childRenderNode.$hostId$ + "." + childRenderNode.$nodeId$;
1487
+ const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
1488
+ const node = childRenderNode.$elm$;
1489
+ if (!shadowRoot) {
1490
+ node["s-hn"] = tagName.toUpperCase();
1491
+ if (childRenderNode.$tag$ === "slot") {
1492
+ node["s-cr"] = hostElm["s-cr"];
1493
+ }
1494
+ }
1495
+ if (childRenderNode.$tag$ === "slot") {
1496
+ if (childRenderNode.$children$) {
1497
+ childRenderNode.$flags$ |= 2 /* isSlotFallback */;
1498
+ if (!childRenderNode.$elm$.childNodes.length) {
1499
+ childRenderNode.$children$.forEach((c) => {
1500
+ childRenderNode.$elm$.appendChild(c.$elm$);
1501
+ });
1502
+ }
1503
+ } else {
1504
+ childRenderNode.$flags$ |= 1 /* isSlotReference */;
1505
+ }
1506
+ }
1507
+ if (orgLocationNode && orgLocationNode.isConnected) {
1508
+ if (shadowRoot && orgLocationNode["s-en"] === "") {
1509
+ orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
1510
+ }
1511
+ orgLocationNode.parentNode.removeChild(orgLocationNode);
1512
+ if (!shadowRoot) {
1513
+ node["s-oo"] = parseInt(childRenderNode.$nodeId$);
1514
+ }
1515
+ }
1516
+ plt.$orgLocNodes$.delete(orgLocationId);
1517
+ }
1518
+ const hosts = [];
1519
+ const snLen = slottedNodes.length;
1520
+ let snIndex = 0;
1521
+ let slotGroup;
1522
+ let snGroupIdx;
1523
+ let snGroupLen;
1524
+ let slottedItem;
1525
+ for (snIndex; snIndex < snLen; snIndex++) {
1526
+ slotGroup = slottedNodes[snIndex];
1527
+ if (!slotGroup || !slotGroup.length) continue;
1528
+ snGroupLen = slotGroup.length;
1529
+ snGroupIdx = 0;
1530
+ for (snGroupIdx; snGroupIdx < snGroupLen; snGroupIdx++) {
1531
+ slottedItem = slotGroup[snGroupIdx];
1532
+ if (!hosts[slottedItem.hostId]) {
1533
+ hosts[slottedItem.hostId] = plt.$orgLocNodes$.get(slottedItem.hostId);
1534
+ }
1535
+ if (!hosts[slottedItem.hostId]) continue;
1536
+ const hostEle = hosts[slottedItem.hostId];
1537
+ if (!hostEle.shadowRoot || !shadowRoot) {
1538
+ slottedItem.slot["s-cr"] = hostEle["s-cr"];
1539
+ if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
1540
+ slottedItem.slot["s-cr"] = hostEle;
1541
+ } else {
1542
+ slottedItem.slot["s-cr"] = (hostEle.__childNodes || hostEle.childNodes)[0];
1543
+ }
1544
+ addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
1545
+ {
1546
+ patchNextPrev(slottedItem.node);
1547
+ }
1548
+ }
1549
+ if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
1550
+ hostEle.appendChild(slottedItem.node);
1551
+ }
1552
+ }
1553
+ }
1554
+ if (scopeId2 && slotNodes.length) {
1555
+ slotNodes.forEach((slot) => {
1556
+ slot.$elm$.parentElement.classList.add(scopeId2 + "-s");
1557
+ });
1558
+ }
1559
+ if (shadowRoot) {
1560
+ let rnIdex = 0;
1561
+ const rnLen = shadowRootNodes.length;
1562
+ for (rnIdex; rnIdex < rnLen; rnIdex++) {
1563
+ shadowRoot.appendChild(shadowRootNodes[rnIdex]);
1564
+ }
1565
+ Array.from(hostElm.childNodes).forEach((node) => {
1566
+ if (node.nodeType === 8 /* CommentNode */ && typeof node["s-sn"] !== "string") {
1567
+ node.parentNode.removeChild(node);
1568
+ }
1569
+ });
1570
+ }
1571
+ hostRef.$hostElement$ = hostElm;
1572
+ endHydrate();
1573
+ };
1574
+ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId, slottedNodes = []) => {
1575
+ let childNodeType;
1576
+ let childIdSplt;
1577
+ let childVNode;
1578
+ let i2;
1579
+ const scopeId2 = hostElm["s-sc"];
1580
+ if (node.nodeType === 1 /* ElementNode */) {
1581
+ childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
1582
+ if (childNodeType) {
1583
+ childIdSplt = childNodeType.split(".");
1584
+ if (childIdSplt[0] === hostId || childIdSplt[0] === "0") {
1585
+ childVNode = createSimpleVNode({
1586
+ $flags$: 0,
1587
+ $hostId$: childIdSplt[0],
1588
+ $nodeId$: childIdSplt[1],
1589
+ $depth$: childIdSplt[2],
1590
+ $index$: childIdSplt[3],
1591
+ $tag$: node.tagName.toLowerCase(),
1592
+ $elm$: node,
1593
+ // If we don't add the initial classes to the VNode, the first `vdom-render.ts` patch
1594
+ // won't try to reconcile them. Classes set on the node will be blown away.
1595
+ $attrs$: { class: node.className || "" }
1596
+ });
1597
+ childRenderNodes.push(childVNode);
1598
+ node.removeAttribute(HYDRATE_CHILD_ID);
1599
+ if (!parentVNode.$children$) {
1600
+ parentVNode.$children$ = [];
1601
+ }
1602
+ if (scopeId2) {
1603
+ node["s-si"] = scopeId2;
1604
+ childVNode.$attrs$.class += " " + scopeId2;
1605
+ }
1606
+ const slotName = childVNode.$elm$.getAttribute("s-sn");
1607
+ if (typeof slotName === "string") {
1608
+ if (childVNode.$tag$ === "slot-fb") {
1609
+ addSlot(
1610
+ slotName,
1611
+ childIdSplt[2],
1612
+ childVNode,
1613
+ node,
1614
+ parentVNode,
1615
+ childRenderNodes,
1616
+ slotNodes,
1617
+ shadowRootNodes,
1618
+ slottedNodes
1619
+ );
1620
+ if (scopeId2) {
1621
+ node.classList.add(scopeId2);
1622
+ }
1623
+ }
1624
+ childVNode.$elm$["s-sn"] = slotName;
1625
+ childVNode.$elm$.removeAttribute("s-sn");
1626
+ }
1627
+ if (childVNode.$index$ !== void 0) {
1628
+ parentVNode.$children$[childVNode.$index$] = childVNode;
1629
+ }
1630
+ parentVNode = childVNode;
1631
+ if (shadowRootNodes && childVNode.$depth$ === "0") {
1632
+ shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
1633
+ }
1634
+ }
1635
+ }
1636
+ if (node.shadowRoot) {
1637
+ for (i2 = node.shadowRoot.childNodes.length - 1; i2 >= 0; i2--) {
1638
+ clientHydrate(
1639
+ parentVNode,
1640
+ childRenderNodes,
1641
+ slotNodes,
1642
+ shadowRootNodes,
1643
+ hostElm,
1644
+ node.shadowRoot.childNodes[i2],
1645
+ hostId,
1646
+ slottedNodes
1647
+ );
1648
+ }
1649
+ }
1650
+ const nonShadowNodes = node.__childNodes || node.childNodes;
1651
+ for (i2 = nonShadowNodes.length - 1; i2 >= 0; i2--) {
1652
+ clientHydrate(
1653
+ parentVNode,
1654
+ childRenderNodes,
1655
+ slotNodes,
1656
+ shadowRootNodes,
1657
+ hostElm,
1658
+ nonShadowNodes[i2],
1659
+ hostId,
1660
+ slottedNodes
1661
+ );
1662
+ }
1663
+ } else if (node.nodeType === 8 /* CommentNode */) {
1664
+ childIdSplt = node.nodeValue.split(".");
1665
+ if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
1666
+ childNodeType = childIdSplt[0];
1667
+ childVNode = createSimpleVNode({
1668
+ $hostId$: childIdSplt[1],
1669
+ $nodeId$: childIdSplt[2],
1670
+ $depth$: childIdSplt[3],
1671
+ $index$: childIdSplt[4] || "0",
1672
+ $elm$: node,
1673
+ $attrs$: null,
1674
+ $children$: null,
1675
+ $key$: null,
1676
+ $name$: null,
1677
+ $tag$: null,
1678
+ $text$: null
1679
+ });
1680
+ if (childNodeType === TEXT_NODE_ID) {
1681
+ childVNode.$elm$ = node.nextSibling;
1682
+ if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
1683
+ childVNode.$text$ = childVNode.$elm$.textContent;
1684
+ childRenderNodes.push(childVNode);
1685
+ node.remove();
1686
+ if (hostId === childVNode.$hostId$) {
1687
+ if (!parentVNode.$children$) {
1688
+ parentVNode.$children$ = [];
1689
+ }
1690
+ parentVNode.$children$[childVNode.$index$] = childVNode;
1691
+ }
1692
+ if (shadowRootNodes && childVNode.$depth$ === "0") {
1693
+ shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
1694
+ }
1695
+ }
1696
+ } else if (childNodeType === COMMENT_NODE_ID) {
1697
+ childVNode.$elm$ = node.nextSibling;
1698
+ if (childVNode.$elm$ && childVNode.$elm$.nodeType === 8 /* CommentNode */) {
1699
+ childRenderNodes.push(childVNode);
1700
+ node.remove();
1701
+ }
1702
+ } else if (childVNode.$hostId$ === hostId) {
1703
+ if (childNodeType === SLOT_NODE_ID) {
1704
+ const slotName = node["s-sn"] = childIdSplt[5] || "";
1705
+ addSlot(
1706
+ slotName,
1707
+ childIdSplt[2],
1708
+ childVNode,
1709
+ node,
1710
+ parentVNode,
1711
+ childRenderNodes,
1712
+ slotNodes,
1713
+ shadowRootNodes,
1714
+ slottedNodes
1715
+ );
1716
+ } else if (childNodeType === CONTENT_REF_ID) {
1717
+ if (shadowRootNodes) {
1718
+ node.remove();
1719
+ } else {
1720
+ hostElm["s-cr"] = node;
1721
+ node["s-cn"] = true;
1722
+ }
1723
+ }
1724
+ }
1725
+ }
1726
+ } else if (parentVNode && parentVNode.$tag$ === "style") {
1727
+ const vnode = newVNode(null, node.textContent);
1728
+ vnode.$elm$ = node;
1729
+ vnode.$index$ = "0";
1730
+ parentVNode.$children$ = [vnode];
1731
+ }
1732
+ return parentVNode;
1733
+ };
1734
+ var initializeDocumentHydrate = (node, orgLocNodes) => {
1735
+ if (node.nodeType === 1 /* ElementNode */) {
1736
+ const componentId = node[HYDRATE_ID] || node.getAttribute(HYDRATE_ID);
1737
+ if (componentId) {
1738
+ orgLocNodes.set(componentId, node);
1739
+ }
1740
+ let i2 = 0;
1741
+ if (node.shadowRoot) {
1742
+ for (; i2 < node.shadowRoot.childNodes.length; i2++) {
1743
+ initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
1744
+ }
1745
+ }
1746
+ const nonShadowNodes = node.__childNodes || node.childNodes;
1747
+ for (i2 = 0; i2 < nonShadowNodes.length; i2++) {
1748
+ initializeDocumentHydrate(nonShadowNodes[i2], orgLocNodes);
1749
+ }
1750
+ } else if (node.nodeType === 8 /* CommentNode */) {
1751
+ const childIdSplt = node.nodeValue.split(".");
1752
+ if (childIdSplt[0] === ORG_LOCATION_ID) {
1753
+ orgLocNodes.set(childIdSplt[1] + "." + childIdSplt[2], node);
1754
+ node.nodeValue = "";
1755
+ node["s-en"] = childIdSplt[3];
1756
+ }
1757
+ }
1758
+ };
1759
+ var createSimpleVNode = (vnode) => {
1760
+ const defaultVNode = {
1761
+ $flags$: 0,
1762
+ $hostId$: null,
1763
+ $nodeId$: null,
1764
+ $depth$: null,
1765
+ $index$: "0",
1766
+ $elm$: null,
1767
+ $attrs$: null,
1768
+ $children$: null,
1769
+ $key$: null,
1770
+ $name$: null,
1771
+ $tag$: null,
1772
+ $text$: null
1773
+ };
1774
+ return { ...defaultVNode, ...vnode };
1775
+ };
1776
+ function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNodes, slotNodes, shadowRootNodes, slottedNodes) {
1777
+ node["s-sr"] = true;
1778
+ childVNode.$name$ = slotName || null;
1779
+ childVNode.$tag$ = "slot";
1780
+ const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
1781
+ if (shadowRootNodes) {
1782
+ const slot = childVNode.$elm$ = doc.createElement(childVNode.$tag$);
1783
+ if (childVNode.$name$) {
1784
+ childVNode.$elm$.setAttribute("name", slotName);
1785
+ }
1786
+ if (parentNodeId && parentNodeId !== childVNode.$hostId$) {
1787
+ parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
1788
+ } else {
1789
+ node.parentNode.insertBefore(childVNode.$elm$, node);
1790
+ }
1791
+ addSlottedNodes(slottedNodes, slotId, slotName, node, childVNode.$hostId$);
1792
+ node.remove();
1793
+ if (childVNode.$depth$ === "0") {
1794
+ shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
1795
+ }
1796
+ } else {
1797
+ const slot = childVNode.$elm$;
1798
+ const shouldMove = parentNodeId && parentNodeId !== childVNode.$hostId$ && parentVNode.$elm$.shadowRoot;
1799
+ addSlottedNodes(slottedNodes, slotId, slotName, node, shouldMove ? parentNodeId : childVNode.$hostId$);
1800
+ if (shouldMove) {
1801
+ parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
1802
+ }
1803
+ childRenderNodes.push(childVNode);
1804
+ }
1805
+ slotNodes.push(childVNode);
1806
+ if (!parentVNode.$children$) {
1807
+ parentVNode.$children$ = [];
1808
+ }
1809
+ parentVNode.$children$[childVNode.$index$] = childVNode;
1810
+ }
1811
+ var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) => {
1812
+ let slottedNode = slotNode.nextSibling;
1813
+ slottedNodes[slotNodeId] = slottedNodes[slotNodeId] || [];
1814
+ 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 */))) {
1815
+ slottedNode["s-sn"] = slotName;
1816
+ slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
1817
+ slottedNode = slottedNode.nextSibling;
1818
+ }
1819
+ };
1820
+
1821
+ // src/runtime/mode.ts
1822
+ var computeMode = (elm) => modeResolutionChain.map((h2) => h2(elm)).find((m) => !!m);
1823
+ var setMode = (handler) => modeResolutionChain.push(handler);
1824
+ var getMode = (ref) => getHostRef(ref).$modeName$;
1825
+ var parsePropertyValue = (propValue, propType) => {
1826
+ if (propValue != null && !isComplexType(propValue)) {
1827
+ if (propType & 4 /* Boolean */) {
1828
+ return propValue === "false" ? false : propValue === "" || !!propValue;
1829
+ }
1830
+ if (propType & 2 /* Number */) {
1831
+ return parseFloat(propValue);
1832
+ }
1833
+ if (propType & 1 /* String */) {
1834
+ return String(propValue);
1835
+ }
1836
+ return propValue;
1837
+ }
1838
+ return propValue;
1839
+ };
1840
+ var getElement = (ref) => getHostRef(ref).$hostElement$ ;
1841
+
1842
+ // src/runtime/event-emitter.ts
1843
+ var createEvent = (ref, name, flags) => {
1844
+ const elm = getElement(ref);
1845
+ return {
1846
+ emit: (detail) => {
1847
+ return emitEvent(elm, name, {
1848
+ bubbles: !!(flags & 4 /* Bubbles */),
1849
+ composed: !!(flags & 2 /* Composed */),
1850
+ cancelable: !!(flags & 1 /* Cancellable */),
1851
+ detail
1852
+ });
1853
+ }
1854
+ };
1855
+ };
1856
+ var emitEvent = (elm, name, opts) => {
1857
+ const ev = plt.ce(name, opts);
1858
+ elm.dispatchEvent(ev);
1859
+ return ev;
1860
+ };
1861
+ var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
1862
+ var registerStyle = (scopeId2, cssText, allowCS) => {
1863
+ let style = styles.get(scopeId2);
1864
+ if (supportsConstructableStylesheets && allowCS) {
1865
+ style = style || new CSSStyleSheet();
1866
+ if (typeof style === "string") {
1867
+ style = cssText;
1868
+ } else {
1869
+ style.replaceSync(cssText);
1870
+ }
1871
+ } else {
1872
+ style = cssText;
1873
+ }
1874
+ styles.set(scopeId2, style);
1875
+ };
1876
+ var addStyle = (styleContainerNode, cmpMeta, mode) => {
1877
+ var _a;
1878
+ const scopeId2 = getScopeId(cmpMeta, mode);
1879
+ const style = styles.get(scopeId2);
1880
+ styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
1881
+ if (style) {
1882
+ if (typeof style === "string") {
1883
+ styleContainerNode = styleContainerNode.head || styleContainerNode;
1884
+ let appliedStyles = rootAppliedStyles.get(styleContainerNode);
1885
+ let styleElm;
1886
+ if (!appliedStyles) {
1887
+ rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
1888
+ }
1889
+ if (!appliedStyles.has(scopeId2)) {
1890
+ if (styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
1891
+ styleElm.innerHTML = style;
1892
+ } else {
1893
+ styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
1894
+ styleElm.innerHTML = style;
1895
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
1896
+ if (nonce != null) {
1897
+ styleElm.setAttribute("nonce", nonce);
1898
+ }
1899
+ if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
1900
+ if (styleContainerNode.nodeName === "HEAD") {
1901
+ const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
1902
+ const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
1903
+ styleContainerNode.insertBefore(styleElm, referenceNode2);
1904
+ } else if ("host" in styleContainerNode) {
1905
+ if (supportsConstructableStylesheets) {
1906
+ const stylesheet = new CSSStyleSheet();
1907
+ stylesheet.replaceSync(style);
1908
+ styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
1909
+ } else {
1910
+ const existingStyleContainer = styleContainerNode.querySelector("style");
1911
+ if (existingStyleContainer) {
1912
+ existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
1913
+ } else {
1914
+ styleContainerNode.prepend(styleElm);
1915
+ }
1916
+ }
1917
+ } else {
1918
+ styleContainerNode.append(styleElm);
1919
+ }
1920
+ }
1921
+ if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
1922
+ styleContainerNode.insertBefore(styleElm, null);
1349
1923
  }
1350
1924
  }
1351
- }
1352
- }
1353
- if (checkSlotFallbackVisibility) {
1354
- updateFallbackSlotVisibility(rootVnode.$elm$);
1355
- }
1356
- plt.$flags$ &= ~1 /* isTmpDisconnected */;
1357
- relocateNodes.length = 0;
1358
- }
1359
- if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
1360
- for (const childNode of rootVnode.$elm$.childNodes) {
1361
- if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
1362
- if (isInitialLoad && childNode["s-ih"] == null) {
1363
- childNode["s-ih"] = (_e = childNode.hidden) != null ? _e : false;
1925
+ if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
1926
+ styleElm.innerHTML += SLOT_FB_CSS;
1927
+ }
1928
+ if (appliedStyles) {
1929
+ appliedStyles.add(scopeId2);
1364
1930
  }
1365
- childNode.hidden = true;
1366
1931
  }
1932
+ } else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
1933
+ styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
1367
1934
  }
1368
1935
  }
1369
- contentRef = void 0;
1936
+ return scopeId2;
1937
+ };
1938
+ var attachStyles = (hostRef) => {
1939
+ const cmpMeta = hostRef.$cmpMeta$;
1940
+ const elm = hostRef.$hostElement$;
1941
+ const flags = cmpMeta.$flags$;
1942
+ const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
1943
+ const scopeId2 = addStyle(
1944
+ elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
1945
+ cmpMeta,
1946
+ hostRef.$modeName$
1947
+ );
1948
+ if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
1949
+ elm["s-sc"] = scopeId2;
1950
+ elm.classList.add(scopeId2 + "-h");
1951
+ }
1952
+ endAttachStyles();
1370
1953
  };
1954
+ var getScopeId = (cmp, mode) => "sc-" + (mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
1371
1955
 
1372
1956
  // src/runtime/update-component.ts
1373
1957
  var attachToAncestor = (hostRef, ancestorComponent) => {
@@ -1595,16 +2179,62 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1595
2179
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
1596
2180
  members.map(([memberName, [memberFlags]]) => {
1597
2181
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
1598
- Object.defineProperty(prototype, memberName, {
1599
- get() {
1600
- return getValue(this, memberName);
1601
- },
1602
- set(newValue) {
1603
- setValue(this, memberName, newValue, cmpMeta);
1604
- },
1605
- configurable: true,
1606
- enumerable: true
1607
- });
2182
+ if ((memberFlags & 2048 /* Getter */) === 0) {
2183
+ Object.defineProperty(prototype, memberName, {
2184
+ get() {
2185
+ return getValue(this, memberName);
2186
+ },
2187
+ set(newValue) {
2188
+ setValue(this, memberName, newValue, cmpMeta);
2189
+ },
2190
+ configurable: true,
2191
+ enumerable: true
2192
+ });
2193
+ } else if (flags & 1 /* isElementConstructor */ && memberFlags & 2048 /* Getter */) {
2194
+ {
2195
+ Object.defineProperty(prototype, memberName, {
2196
+ get() {
2197
+ const ref = getHostRef(this);
2198
+ const instance = ref ? ref.$lazyInstance$ : prototype;
2199
+ if (!instance) return;
2200
+ return instance[memberName];
2201
+ },
2202
+ configurable: true,
2203
+ enumerable: true
2204
+ });
2205
+ }
2206
+ if (memberFlags & 4096 /* Setter */) {
2207
+ const origSetter = Object.getOwnPropertyDescriptor(prototype, memberName).set;
2208
+ Object.defineProperty(prototype, memberName, {
2209
+ set(newValue) {
2210
+ const ref = getHostRef(this);
2211
+ if (origSetter) {
2212
+ const currentValue = ref.$hostElement$[memberName];
2213
+ if (!ref.$instanceValues$.get(memberName) && currentValue) {
2214
+ ref.$instanceValues$.set(memberName, currentValue);
2215
+ }
2216
+ origSetter.apply(this, [parsePropertyValue(newValue, cmpMeta.$members$[memberName][0])]);
2217
+ setValue(this, memberName, ref.$hostElement$[memberName], cmpMeta);
2218
+ return;
2219
+ }
2220
+ if (!ref) return;
2221
+ const setterSetVal = () => {
2222
+ const currentValue = ref.$lazyInstance$[memberName];
2223
+ if (!ref.$instanceValues$.get(memberName) && currentValue) {
2224
+ ref.$instanceValues$.set(memberName, currentValue);
2225
+ }
2226
+ ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, cmpMeta.$members$[memberName][0]);
2227
+ setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
2228
+ };
2229
+ if (ref.$lazyInstance$) {
2230
+ setterSetVal();
2231
+ } else {
2232
+ ref.$onReadyPromise$.then(() => setterSetVal());
2233
+ }
2234
+ }
2235
+ });
2236
+ }
2237
+ }
1608
2238
  } else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
1609
2239
  Object.defineProperty(prototype, memberName, {
1610
2240
  value(...args) {
@@ -1624,7 +2254,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1624
2254
  plt.jmp(() => {
1625
2255
  var _a2;
1626
2256
  const propName = attrNameToPropName.get(attrName);
1627
- if (this.hasOwnProperty(propName)) {
2257
+ if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
1628
2258
  newValue = this[propName];
1629
2259
  delete this[propName];
1630
2260
  } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
@@ -1644,7 +2274,10 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1644
2274
  }
1645
2275
  return;
1646
2276
  }
1647
- this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
2277
+ const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
2278
+ if (!propDesc.get || !!propDesc.set) {
2279
+ this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
2280
+ }
1648
2281
  });
1649
2282
  };
1650
2283
  Cstr.observedAttributes = Array.from(
@@ -1760,6 +2393,9 @@ var connectedCallback = (elm) => {
1760
2393
  if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
1761
2394
  const scopeId2 = addStyle(elm.shadowRoot, cmpMeta, elm.getAttribute("s-mode")) ;
1762
2395
  elm.classList.remove(scopeId2 + "-h", scopeId2 + "-s");
2396
+ } else if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2397
+ const scopeId2 = getScopeId(cmpMeta, elm.getAttribute("s-mode") );
2398
+ elm["s-sc"] = scopeId2;
1763
2399
  }
1764
2400
  initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
1765
2401
  }
@@ -1829,287 +2465,12 @@ var disconnectedCallback = async (elm) => {
1829
2465
  hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
1830
2466
  }
1831
2467
  }
1832
- };
1833
- var patchPseudoShadowDom = (hostElementPrototype, descriptorPrototype) => {
1834
- patchCloneNode(hostElementPrototype);
1835
- patchSlotAppendChild(hostElementPrototype);
1836
- patchSlotAppend(hostElementPrototype);
1837
- patchSlotPrepend(hostElementPrototype);
1838
- patchSlotInsertAdjacentElement(hostElementPrototype);
1839
- patchSlotInsertAdjacentHTML(hostElementPrototype);
1840
- patchSlotInsertAdjacentText(hostElementPrototype);
1841
- patchTextContent(hostElementPrototype);
1842
- patchChildSlotNodes(hostElementPrototype, descriptorPrototype);
1843
- patchSlotRemoveChild(hostElementPrototype);
1844
- };
1845
- var patchCloneNode = (HostElementPrototype) => {
1846
- const orgCloneNode = HostElementPrototype.cloneNode;
1847
- HostElementPrototype.cloneNode = function(deep) {
1848
- const srcNode = this;
1849
- const isShadowDom = srcNode.shadowRoot && supportsShadow ;
1850
- const clonedNode = orgCloneNode.call(srcNode, isShadowDom ? deep : false);
1851
- if (!isShadowDom && deep) {
1852
- let i2 = 0;
1853
- let slotted, nonStencilNode;
1854
- const stencilPrivates = [
1855
- "s-id",
1856
- "s-cr",
1857
- "s-lr",
1858
- "s-rc",
1859
- "s-sc",
1860
- "s-p",
1861
- "s-cn",
1862
- "s-sr",
1863
- "s-sn",
1864
- "s-hn",
1865
- "s-ol",
1866
- "s-nr",
1867
- "s-si",
1868
- "s-rf",
1869
- "s-scs"
1870
- ];
1871
- for (; i2 < srcNode.childNodes.length; i2++) {
1872
- slotted = srcNode.childNodes[i2]["s-nr"];
1873
- nonStencilNode = stencilPrivates.every((privateField) => !srcNode.childNodes[i2][privateField]);
1874
- if (slotted) {
1875
- if (clonedNode.__appendChild) {
1876
- clonedNode.__appendChild(slotted.cloneNode(true));
1877
- } else {
1878
- clonedNode.appendChild(slotted.cloneNode(true));
1879
- }
1880
- }
1881
- if (nonStencilNode) {
1882
- clonedNode.appendChild(srcNode.childNodes[i2].cloneNode(true));
1883
- }
1884
- }
1885
- }
1886
- return clonedNode;
1887
- };
1888
- };
1889
- var patchSlotAppendChild = (HostElementPrototype) => {
1890
- HostElementPrototype.__appendChild = HostElementPrototype.appendChild;
1891
- HostElementPrototype.appendChild = function(newChild) {
1892
- const slotName = newChild["s-sn"] = getSlotName(newChild);
1893
- const slotNode = getHostSlotNode(this.childNodes, slotName, this.tagName);
1894
- if (slotNode) {
1895
- const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
1896
- const appendAfter = slotChildNodes[slotChildNodes.length - 1];
1897
- const insertedNode = insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
1898
- updateFallbackSlotVisibility(this);
1899
- return insertedNode;
1900
- }
1901
- return this.__appendChild(newChild);
1902
- };
1903
- };
1904
- var patchSlotRemoveChild = (ElementPrototype) => {
1905
- ElementPrototype.__removeChild = ElementPrototype.removeChild;
1906
- ElementPrototype.removeChild = function(toRemove) {
1907
- if (toRemove && typeof toRemove["s-sn"] !== "undefined") {
1908
- const slotNode = getHostSlotNode(this.childNodes, toRemove["s-sn"], this.tagName);
1909
- if (slotNode) {
1910
- const slotChildNodes = getHostSlotChildNodes(slotNode, toRemove["s-sn"]);
1911
- const existingNode = slotChildNodes.find((n) => n === toRemove);
1912
- if (existingNode) {
1913
- existingNode.remove();
1914
- updateFallbackSlotVisibility(this);
1915
- return;
1916
- }
1917
- }
1918
- }
1919
- return this.__removeChild(toRemove);
1920
- };
1921
- };
1922
- var patchSlotPrepend = (HostElementPrototype) => {
1923
- const originalPrepend = HostElementPrototype.prepend;
1924
- HostElementPrototype.prepend = function(...newChildren) {
1925
- newChildren.forEach((newChild) => {
1926
- if (typeof newChild === "string") {
1927
- newChild = this.ownerDocument.createTextNode(newChild);
1928
- }
1929
- const slotName = newChild["s-sn"] = getSlotName(newChild);
1930
- const slotNode = getHostSlotNode(this.childNodes, slotName, this.tagName);
1931
- if (slotNode) {
1932
- const slotPlaceholder = document.createTextNode("");
1933
- slotPlaceholder["s-nr"] = newChild;
1934
- slotNode["s-cr"].parentNode.__appendChild(slotPlaceholder);
1935
- newChild["s-ol"] = slotPlaceholder;
1936
- const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
1937
- const appendAfter = slotChildNodes[0];
1938
- return insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
1939
- }
1940
- if (newChild.nodeType === 1 && !!newChild.getAttribute("slot")) {
1941
- newChild.hidden = true;
1942
- }
1943
- return originalPrepend.call(this, newChild);
1944
- });
1945
- };
1946
- };
1947
- var patchSlotAppend = (HostElementPrototype) => {
1948
- HostElementPrototype.append = function(...newChildren) {
1949
- newChildren.forEach((newChild) => {
1950
- if (typeof newChild === "string") {
1951
- newChild = this.ownerDocument.createTextNode(newChild);
1952
- }
1953
- this.appendChild(newChild);
1954
- });
1955
- };
1956
- };
1957
- var patchSlotInsertAdjacentHTML = (HostElementPrototype) => {
1958
- const originalInsertAdjacentHtml = HostElementPrototype.insertAdjacentHTML;
1959
- HostElementPrototype.insertAdjacentHTML = function(position, text) {
1960
- if (position !== "afterbegin" && position !== "beforeend") {
1961
- return originalInsertAdjacentHtml.call(this, position, text);
1962
- }
1963
- const container = this.ownerDocument.createElement("_");
1964
- let node;
1965
- container.innerHTML = text;
1966
- if (position === "afterbegin") {
1967
- while (node = container.firstChild) {
1968
- this.prepend(node);
1969
- }
1970
- } else if (position === "beforeend") {
1971
- while (node = container.firstChild) {
1972
- this.append(node);
1973
- }
1974
- }
1975
- };
1976
- };
1977
- var patchSlotInsertAdjacentText = (HostElementPrototype) => {
1978
- HostElementPrototype.insertAdjacentText = function(position, text) {
1979
- this.insertAdjacentHTML(position, text);
1980
- };
1981
- };
1982
- var patchSlotInsertAdjacentElement = (HostElementPrototype) => {
1983
- const originalInsertAdjacentElement = HostElementPrototype.insertAdjacentElement;
1984
- HostElementPrototype.insertAdjacentElement = function(position, element) {
1985
- if (position !== "afterbegin" && position !== "beforeend") {
1986
- return originalInsertAdjacentElement.call(this, position, element);
1987
- }
1988
- if (position === "afterbegin") {
1989
- this.prepend(element);
1990
- return element;
1991
- } else if (position === "beforeend") {
1992
- this.append(element);
1993
- return element;
1994
- }
1995
- return element;
1996
- };
1997
- };
1998
- var patchTextContent = (hostElementPrototype) => {
1999
- const descriptor = Object.getOwnPropertyDescriptor(Node.prototype, "textContent");
2000
- Object.defineProperty(hostElementPrototype, "__textContent", descriptor);
2001
- {
2002
- Object.defineProperty(hostElementPrototype, "textContent", {
2003
- // To mimic shadow root behavior, we need to return the text content of all
2004
- // nodes in a slot reference node
2005
- get() {
2006
- const slotRefNodes = getAllChildSlotNodes(this.childNodes);
2007
- const textContent = slotRefNodes.map((node) => {
2008
- var _a, _b;
2009
- const text = [];
2010
- let slotContent = node.nextSibling;
2011
- while (slotContent && slotContent["s-sn"] === node["s-sn"]) {
2012
- if (slotContent.nodeType === 3 /* TEXT_NODE */ || slotContent.nodeType === 1 /* ELEMENT_NODE */) {
2013
- text.push((_b = (_a = slotContent.textContent) == null ? void 0 : _a.trim()) != null ? _b : "");
2014
- }
2015
- slotContent = slotContent.nextSibling;
2016
- }
2017
- return text.filter((ref) => ref !== "").join(" ");
2018
- }).filter((text) => text !== "").join(" ");
2019
- return " " + textContent + " ";
2020
- },
2021
- // To mimic shadow root behavior, we need to overwrite all nodes in a slot
2022
- // reference node. If a default slot reference node exists, the text content will be
2023
- // placed there. Otherwise, the new text node will be hidden
2024
- set(value) {
2025
- const slotRefNodes = getAllChildSlotNodes(this.childNodes);
2026
- slotRefNodes.forEach((node) => {
2027
- let slotContent = node.nextSibling;
2028
- while (slotContent && slotContent["s-sn"] === node["s-sn"]) {
2029
- const tmp = slotContent;
2030
- slotContent = slotContent.nextSibling;
2031
- tmp.remove();
2032
- }
2033
- if (node["s-sn"] === "") {
2034
- const textNode = this.ownerDocument.createTextNode(value);
2035
- textNode["s-sn"] = "";
2036
- insertBefore(node.parentElement, textNode, node.nextSibling);
2037
- } else {
2038
- node.remove();
2039
- }
2040
- });
2041
- }
2042
- });
2043
- }
2044
- };
2045
- var patchChildSlotNodes = (elm, cmpMeta) => {
2046
- class FakeNodeList extends Array {
2047
- item(n) {
2048
- return this[n];
2049
- }
2050
- }
2051
- if (cmpMeta.$flags$ & 8 /* needsShadowDomShim */) {
2052
- const childNodesFn = elm.__lookupGetter__("childNodes");
2053
- Object.defineProperty(elm, "children", {
2054
- get() {
2055
- return this.childNodes.map((n) => n.nodeType === 1);
2056
- }
2057
- });
2058
- Object.defineProperty(elm, "childElementCount", {
2059
- get() {
2060
- return elm.children.length;
2061
- }
2062
- });
2063
- Object.defineProperty(elm, "childNodes", {
2064
- get() {
2065
- const childNodes = childNodesFn.call(this);
2066
- if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0 && getHostRef(this).$flags$ & 2 /* hasRendered */) {
2067
- const result = new FakeNodeList();
2068
- for (let i2 = 0; i2 < childNodes.length; i2++) {
2069
- const slot = childNodes[i2]["s-nr"];
2070
- if (slot) {
2071
- result.push(slot);
2072
- }
2073
- }
2074
- return result;
2075
- }
2076
- return FakeNodeList.from(childNodes);
2077
- }
2078
- });
2079
- }
2080
- };
2081
- var getAllChildSlotNodes = (childNodes) => {
2082
- const slotRefNodes = [];
2083
- for (const childNode of Array.from(childNodes)) {
2084
- if (childNode["s-sr"]) {
2085
- slotRefNodes.push(childNode);
2086
- }
2087
- slotRefNodes.push(...getAllChildSlotNodes(childNode.childNodes));
2088
- }
2089
- return slotRefNodes;
2090
- };
2091
- var getSlotName = (node) => node["s-sn"] || node.nodeType === 1 && node.getAttribute("slot") || "";
2092
- var getHostSlotNode = (childNodes, slotName, hostName) => {
2093
- let i2 = 0;
2094
- let childNode;
2095
- for (; i2 < childNodes.length; i2++) {
2096
- childNode = childNodes[i2];
2097
- if (childNode["s-sr"] && childNode["s-sn"] === slotName && childNode["s-hn"] === hostName) {
2098
- return childNode;
2099
- }
2100
- childNode = getHostSlotNode(childNode.childNodes, slotName, hostName);
2101
- if (childNode) {
2102
- return childNode;
2103
- }
2468
+ if (rootAppliedStyles.has(elm)) {
2469
+ rootAppliedStyles.delete(elm);
2104
2470
  }
2105
- return null;
2106
- };
2107
- var getHostSlotChildNodes = (n, slotName) => {
2108
- const childNodes = [n];
2109
- while ((n = n.nextSibling) && n["s-sn"] === slotName) {
2110
- childNodes.push(n);
2471
+ if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
2472
+ rootAppliedStyles.delete(elm.shadowRoot);
2111
2473
  }
2112
- return childNodes;
2113
2474
  };
2114
2475
 
2115
2476
  // src/runtime/bootstrap-lazy.ts
@@ -2200,6 +2561,13 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2200
2561
  }
2201
2562
  disconnectedCallback() {
2202
2563
  plt.jmp(() => disconnectedCallback(this));
2564
+ plt.raf(() => {
2565
+ var _a3;
2566
+ const hostRef = getHostRef(this);
2567
+ if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
2568
+ delete hostRef.$vnode$.$elm$;
2569
+ }
2570
+ });
2203
2571
  }
2204
2572
  componentOnReady() {
2205
2573
  return getHostRef(this).$onReadyPromise$;
@@ -2207,7 +2575,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2207
2575
  };
2208
2576
  {
2209
2577
  if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2210
- patchPseudoShadowDom(HostElement.prototype, cmpMeta);
2578
+ patchPseudoShadowDom(HostElement.prototype);
2211
2579
  }
2212
2580
  }
2213
2581
  cmpMeta.$lazyBundleId$ = lazyBundle[0];