@duetds/components 6.0.2 → 6.0.4

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 (436) hide show
  1. package/hydrate/index.js +51 -41
  2. package/lib/cjs/duet-action-button.cjs.entry.js +3 -3
  3. package/lib/cjs/duet-alert.cjs.entry.js +1 -1
  4. package/lib/cjs/duet-badge.cjs.entry.js +1 -1
  5. package/lib/cjs/duet-breadcrumb.cjs.entry.js +1 -1
  6. package/lib/cjs/duet-breadcrumbs.cjs.entry.js +1 -1
  7. package/lib/cjs/duet-button_2.cjs.entry.js +3 -3
  8. package/lib/cjs/duet-caption_4.cjs.entry.js +3 -3
  9. package/lib/cjs/duet-card.cjs.entry.js +6 -5
  10. package/lib/cjs/duet-checkbox.cjs.entry.js +1 -1
  11. package/lib/cjs/duet-choice_2.cjs.entry.js +4 -4
  12. package/lib/cjs/duet-collapsible.cjs.entry.js +2 -2
  13. package/lib/cjs/duet-combobox.cjs.entry.js +1 -1
  14. package/lib/cjs/duet-cookie-consent.cjs.entry.js +1 -1
  15. package/lib/cjs/duet-date-picker.cjs.entry.js +2 -2
  16. package/lib/cjs/duet-divider_2.cjs.entry.js +1 -1
  17. package/lib/cjs/duet-editable-table_3.cjs.entry.js +17 -14
  18. package/lib/cjs/duet-empty-state.cjs.entry.js +1 -1
  19. package/lib/cjs/duet-fieldset.cjs.entry.js +1 -1
  20. package/lib/cjs/duet-footer.cjs.entry.js +1 -1
  21. package/lib/cjs/duet-grid_2.cjs.entry.js +2 -2
  22. package/lib/cjs/duet-header_2.cjs.entry.js +3 -3
  23. package/lib/cjs/duet-hero.cjs.entry.js +1 -1
  24. package/lib/cjs/duet-icon.cjs.entry.js +3 -3
  25. package/lib/cjs/duet-input_2.cjs.entry.js +1 -1
  26. package/lib/cjs/duet-layout.cjs.entry.js +1 -1
  27. package/lib/cjs/duet-list_2.cjs.entry.js +1 -1
  28. package/lib/cjs/duet-modal.cjs.entry.js +2 -2
  29. package/lib/cjs/duet-notification_2.cjs.entry.js +1 -1
  30. package/lib/cjs/duet-number-input.cjs.entry.js +1 -1
  31. package/lib/cjs/duet-pagination_2.cjs.entry.js +1 -1
  32. package/lib/cjs/duet-progress.cjs.entry.js +1 -1
  33. package/lib/cjs/duet-radio_2.cjs.entry.js +1 -1
  34. package/lib/cjs/duet-range-slider.cjs.entry.js +2 -2
  35. package/lib/cjs/duet-scrollable_3.cjs.entry.js +1 -1
  36. package/lib/cjs/duet-select.cjs.entry.js +1 -1
  37. package/lib/cjs/duet-step_2.cjs.entry.js +1 -1
  38. package/lib/cjs/duet-textarea.cjs.entry.js +1 -1
  39. package/lib/cjs/duet-toggle.cjs.entry.js +1 -1
  40. package/lib/cjs/duet-tooltip.cjs.entry.js +1 -1
  41. package/lib/cjs/duet-tray.cjs.entry.js +2 -2
  42. package/lib/cjs/duet-upload-aria-status.cjs.entry.js +1 -1
  43. package/lib/cjs/duet-visually-hidden.cjs.entry.js +1 -1
  44. package/lib/cjs/duet.cjs.js +1 -1
  45. package/lib/cjs/{focus-utils-8089a1a8.js → focus-utils-8a615003.js} +1 -1
  46. package/lib/cjs/{index-9d0e33db.js → index-d106d801.js} +1 -1
  47. package/lib/cjs/loader.cjs.js +1 -1
  48. package/lib/cjs/{token-utils-fef5b4eb.js → token-utils-f6e2f4ef.js} +1 -1
  49. package/lib/cjs/{tokens-29450bcb.js → tokens-4c69b122.js} +18 -15
  50. package/lib/cjs/{tokens.module-ef598645.js → tokens.module-1bb2d45e.js} +12 -10
  51. package/lib/collection/components/duet-card/duet-card.js +4 -2
  52. package/lib/collection/components/duet-choice/duet-choice.js +1 -1
  53. package/lib/collection/components/duet-choice-group/duet-choice-group.js +1 -1
  54. package/lib/collection/components/duet-upload/duet-upload.js +18 -15
  55. package/lib/dist-custom-elements/duet-action-button.d.ts +11 -0
  56. package/lib/dist-custom-elements/duet-action-button.js +9 -0
  57. package/lib/dist-custom-elements/duet-alert.d.ts +11 -0
  58. package/lib/dist-custom-elements/duet-alert.js +9 -0
  59. package/lib/dist-custom-elements/duet-badge.d.ts +11 -0
  60. package/lib/dist-custom-elements/duet-badge.js +9 -0
  61. package/lib/dist-custom-elements/duet-breadcrumb.d.ts +11 -0
  62. package/lib/dist-custom-elements/duet-breadcrumb.js +73 -0
  63. package/lib/dist-custom-elements/duet-breadcrumbs.d.ts +11 -0
  64. package/lib/dist-custom-elements/duet-breadcrumbs.js +90 -0
  65. package/lib/dist-custom-elements/duet-button.d.ts +11 -0
  66. package/lib/dist-custom-elements/duet-button.js +9 -0
  67. package/lib/dist-custom-elements/duet-caption.d.ts +11 -0
  68. package/lib/dist-custom-elements/duet-caption.js +9 -0
  69. package/lib/dist-custom-elements/duet-card.d.ts +11 -0
  70. package/lib/dist-custom-elements/duet-card.js +190 -0
  71. package/lib/dist-custom-elements/duet-checkbox.d.ts +11 -0
  72. package/lib/dist-custom-elements/duet-checkbox.js +163 -0
  73. package/lib/dist-custom-elements/duet-choice-group.d.ts +11 -0
  74. package/lib/dist-custom-elements/duet-choice-group.js +226 -0
  75. package/lib/dist-custom-elements/duet-choice.d.ts +11 -0
  76. package/lib/dist-custom-elements/duet-choice.js +390 -0
  77. package/lib/dist-custom-elements/duet-collapsible.d.ts +11 -0
  78. package/lib/dist-custom-elements/duet-collapsible.js +170 -0
  79. package/lib/dist-custom-elements/duet-combobox.d.ts +11 -0
  80. package/lib/dist-custom-elements/duet-combobox.js +432 -0
  81. package/lib/dist-custom-elements/duet-cookie-consent.d.ts +11 -0
  82. package/lib/dist-custom-elements/duet-cookie-consent.js +94 -0
  83. package/lib/dist-custom-elements/duet-date-picker.d.ts +11 -0
  84. package/lib/dist-custom-elements/duet-date-picker.js +906 -0
  85. package/lib/dist-custom-elements/duet-divider.d.ts +11 -0
  86. package/lib/dist-custom-elements/duet-divider.js +9 -0
  87. package/lib/dist-custom-elements/duet-editable-table.d.ts +11 -0
  88. package/lib/dist-custom-elements/duet-editable-table.js +9 -0
  89. package/lib/dist-custom-elements/duet-empty-state.d.ts +11 -0
  90. package/lib/dist-custom-elements/duet-empty-state.js +9 -0
  91. package/lib/dist-custom-elements/duet-fieldset.d.ts +11 -0
  92. package/lib/dist-custom-elements/duet-fieldset.js +9 -0
  93. package/lib/dist-custom-elements/duet-footer.d.ts +11 -0
  94. package/lib/dist-custom-elements/duet-footer.js +199 -0
  95. package/lib/dist-custom-elements/duet-grid-item.d.ts +11 -0
  96. package/lib/dist-custom-elements/duet-grid-item.js +9 -0
  97. package/lib/dist-custom-elements/duet-grid.d.ts +11 -0
  98. package/lib/dist-custom-elements/duet-grid.js +9 -0
  99. package/lib/dist-custom-elements/duet-header.d.ts +11 -0
  100. package/lib/dist-custom-elements/duet-header.js +764 -0
  101. package/lib/dist-custom-elements/duet-heading.d.ts +11 -0
  102. package/lib/dist-custom-elements/duet-heading.js +9 -0
  103. package/lib/dist-custom-elements/duet-hero.d.ts +11 -0
  104. package/lib/dist-custom-elements/duet-hero.js +314 -0
  105. package/lib/dist-custom-elements/duet-icon.d.ts +11 -0
  106. package/lib/dist-custom-elements/duet-icon.js +9 -0
  107. package/lib/dist-custom-elements/duet-input.d.ts +11 -0
  108. package/lib/dist-custom-elements/duet-input.js +9 -0
  109. package/lib/dist-custom-elements/duet-label.d.ts +11 -0
  110. package/lib/dist-custom-elements/duet-label.js +9 -0
  111. package/lib/dist-custom-elements/duet-layout.d.ts +11 -0
  112. package/lib/dist-custom-elements/duet-layout.js +107 -0
  113. package/lib/dist-custom-elements/duet-link.d.ts +11 -0
  114. package/lib/dist-custom-elements/duet-link.js +9 -0
  115. package/lib/dist-custom-elements/duet-list-item.d.ts +11 -0
  116. package/lib/dist-custom-elements/duet-list-item.js +9 -0
  117. package/lib/dist-custom-elements/duet-list.d.ts +11 -0
  118. package/lib/dist-custom-elements/duet-list.js +9 -0
  119. package/lib/dist-custom-elements/duet-logo.d.ts +11 -0
  120. package/lib/dist-custom-elements/duet-logo.js +9 -0
  121. package/lib/dist-custom-elements/duet-modal.d.ts +11 -0
  122. package/lib/dist-custom-elements/duet-modal.js +331 -0
  123. package/lib/dist-custom-elements/duet-notification-drawer.d.ts +11 -0
  124. package/lib/dist-custom-elements/duet-notification-drawer.js +194 -0
  125. package/lib/dist-custom-elements/duet-notification.d.ts +11 -0
  126. package/lib/dist-custom-elements/duet-notification.js +114 -0
  127. package/lib/dist-custom-elements/duet-number-input.d.ts +11 -0
  128. package/lib/dist-custom-elements/duet-number-input.js +516 -0
  129. package/lib/dist-custom-elements/duet-pagination.d.ts +11 -0
  130. package/lib/dist-custom-elements/duet-pagination.js +396 -0
  131. package/lib/dist-custom-elements/duet-paragraph.d.ts +11 -0
  132. package/lib/dist-custom-elements/duet-paragraph.js +9 -0
  133. package/lib/dist-custom-elements/duet-progress.d.ts +11 -0
  134. package/lib/dist-custom-elements/duet-progress.js +9 -0
  135. package/lib/dist-custom-elements/duet-radio-group.d.ts +11 -0
  136. package/lib/dist-custom-elements/duet-radio-group.js +216 -0
  137. package/lib/dist-custom-elements/duet-radio.d.ts +11 -0
  138. package/lib/dist-custom-elements/duet-radio.js +167 -0
  139. package/lib/dist-custom-elements/duet-range-slider.d.ts +11 -0
  140. package/lib/dist-custom-elements/duet-range-slider.js +209 -0
  141. package/lib/dist-custom-elements/duet-range-stepper.d.ts +11 -0
  142. package/lib/dist-custom-elements/duet-range-stepper.js +225 -0
  143. package/lib/dist-custom-elements/duet-scrollable.d.ts +11 -0
  144. package/lib/dist-custom-elements/duet-scrollable.js +9 -0
  145. package/lib/dist-custom-elements/duet-select.d.ts +11 -0
  146. package/lib/dist-custom-elements/duet-select.js +9 -0
  147. package/lib/dist-custom-elements/duet-spacer.d.ts +11 -0
  148. package/lib/dist-custom-elements/duet-spacer.js +9 -0
  149. package/lib/dist-custom-elements/duet-spinner.d.ts +11 -0
  150. package/lib/dist-custom-elements/duet-spinner.js +9 -0
  151. package/lib/dist-custom-elements/duet-step.d.ts +11 -0
  152. package/lib/dist-custom-elements/duet-step.js +150 -0
  153. package/lib/dist-custom-elements/duet-stepper.d.ts +11 -0
  154. package/lib/dist-custom-elements/duet-stepper.js +164 -0
  155. package/lib/dist-custom-elements/duet-tab-group.d.ts +11 -0
  156. package/lib/dist-custom-elements/duet-tab-group.js +301 -0
  157. package/lib/dist-custom-elements/duet-tab.d.ts +11 -0
  158. package/lib/dist-custom-elements/duet-tab.js +59 -0
  159. package/lib/dist-custom-elements/duet-table.d.ts +11 -0
  160. package/lib/dist-custom-elements/duet-table.js +9 -0
  161. package/lib/dist-custom-elements/duet-textarea.d.ts +11 -0
  162. package/lib/dist-custom-elements/duet-textarea.js +297 -0
  163. package/lib/dist-custom-elements/duet-toggle.d.ts +11 -0
  164. package/lib/dist-custom-elements/duet-toggle.js +150 -0
  165. package/lib/dist-custom-elements/duet-tooltip.d.ts +11 -0
  166. package/lib/dist-custom-elements/duet-tooltip.js +9 -0
  167. package/lib/dist-custom-elements/duet-tray.d.ts +11 -0
  168. package/lib/dist-custom-elements/duet-tray.js +175 -0
  169. package/lib/dist-custom-elements/duet-upload-aria-status.d.ts +11 -0
  170. package/lib/dist-custom-elements/duet-upload-aria-status.js +9 -0
  171. package/lib/dist-custom-elements/duet-upload.d.ts +11 -0
  172. package/lib/dist-custom-elements/duet-upload.js +1514 -0
  173. package/lib/dist-custom-elements/duet-visually-hidden.d.ts +11 -0
  174. package/lib/dist-custom-elements/duet-visually-hidden.js +9 -0
  175. package/lib/dist-custom-elements/index.d.ts +26 -0
  176. package/lib/dist-custom-elements/index.js +37 -0
  177. package/lib/dist-custom-elements/p-01de0640.js +37 -0
  178. package/lib/{esm/tokens-8ff8c570.js → dist-custom-elements/p-02305a1e.js} +18 -15
  179. package/lib/dist-custom-elements/p-08cfe544.js +125 -0
  180. package/lib/dist-custom-elements/p-09ed1ffa.js +160 -0
  181. package/lib/dist-custom-elements/p-0a928609.js +241 -0
  182. package/lib/dist-custom-elements/p-0b3f675e.js +47 -0
  183. package/lib/{esm/focus-utils-9e76623d.js → dist-custom-elements/p-0b8f16f1.js} +1 -1
  184. package/lib/dist-custom-elements/p-115c79b6.js +6 -0
  185. package/lib/dist-custom-elements/p-12721178.js +57 -0
  186. package/lib/dist-custom-elements/p-14dcd82b.js +133 -0
  187. package/lib/dist-custom-elements/p-16d518fd.js +66 -0
  188. package/lib/dist-custom-elements/p-213ef84c.js +87 -0
  189. package/lib/dist-custom-elements/p-266411cf.js +307 -0
  190. package/lib/dist-custom-elements/p-3d987b87.js +75 -0
  191. package/lib/dist-custom-elements/p-3fc2d124.js +1666 -0
  192. package/lib/dist-custom-elements/p-4717744e.js +110 -0
  193. package/lib/dist-custom-elements/p-4ebf1618.js +13 -0
  194. package/lib/dist-custom-elements/p-56118313.js +53 -0
  195. package/lib/dist-custom-elements/p-565779f5.js +199 -0
  196. package/lib/dist-custom-elements/p-5a9d75e1.js +55 -0
  197. package/lib/dist-custom-elements/p-65d3ead5.js +428 -0
  198. package/lib/dist-custom-elements/p-6886544b.js +129 -0
  199. package/lib/dist-custom-elements/p-6e74e660.js +275 -0
  200. package/lib/dist-custom-elements/p-704245ef.js +9 -0
  201. package/lib/dist-custom-elements/p-76f00bd5.js +10 -0
  202. package/lib/dist-custom-elements/p-7739604d.js +214 -0
  203. package/lib/dist-custom-elements/p-81c9b244.js +65 -0
  204. package/lib/{esm/token-utils-df78f4d8.js → dist-custom-elements/p-86faf728.js} +1 -1
  205. package/lib/dist-custom-elements/p-88511d7a.js +275 -0
  206. package/lib/dist-custom-elements/p-9c732bb9.js +193 -0
  207. package/lib/dist-custom-elements/p-acdba2db.js +114 -0
  208. package/lib/dist-custom-elements/p-b08e57cf.js +37 -0
  209. package/lib/dist-custom-elements/p-b9058029.js +138 -0
  210. package/lib/dist-custom-elements/p-bd4b92c4.js +86 -0
  211. package/lib/dist-custom-elements/p-bd779757.js +184 -0
  212. package/lib/dist-custom-elements/p-c1325e35.js +11 -0
  213. package/lib/dist-custom-elements/p-c70f3ccb.js +70 -0
  214. package/lib/dist-custom-elements/p-d004da5f.js +6 -0
  215. package/lib/dist-custom-elements/p-d4c234ed.js +390 -0
  216. package/lib/dist-custom-elements/p-d8549efe.js +20 -0
  217. package/lib/dist-custom-elements/p-d96debb6.js +287 -0
  218. package/lib/dist-custom-elements/p-da03a443.js +154 -0
  219. package/lib/dist-custom-elements/p-e294c0fb.js +341 -0
  220. package/lib/dist-custom-elements/p-e4d5fbc0.js +87 -0
  221. package/lib/dist-custom-elements/p-e5c8a58f.js +71 -0
  222. package/lib/dist-custom-elements/p-ede854e1.js +92 -0
  223. package/lib/dist-custom-elements/p-ef8eff22.js +64 -0
  224. package/lib/dist-custom-elements/p-f11208c3.js +6 -0
  225. package/lib/dist-custom-elements/p-f7db7c40.js +98 -0
  226. package/lib/dist-custom-elements/p-fc5362e7.js +61 -0
  227. package/lib/duet/duet.esm.js +1 -1
  228. package/lib/duet/duet.js +1 -1
  229. package/lib/duet/{p-9ed4eac7.system.entry.js → p-01c551f1.system.entry.js} +1 -1
  230. package/lib/duet/p-02305a1e.js +4 -0
  231. package/lib/duet/{p-f51969f5.entry.js → p-033bfa67.entry.js} +1 -1
  232. package/lib/duet/{p-86a3b203.system.entry.js → p-07a850a5.system.entry.js} +1 -1
  233. package/lib/duet/{p-211e59a0.system.entry.js → p-09e2ff96.system.entry.js} +1 -1
  234. package/lib/duet/{p-07f83b14.entry.js → p-0b74af40.entry.js} +1 -1
  235. package/lib/duet/{p-0c59905a.entry.js → p-0c2a51ac.entry.js} +1 -1
  236. package/lib/duet/{p-e56705ac.system.entry.js → p-0c9f0b8a.system.entry.js} +2 -2
  237. package/lib/duet/{p-4af6e3b1.entry.js → p-0d96924d.entry.js} +1 -1
  238. package/lib/duet/{p-67a78cbe.system.entry.js → p-0e48bca9.system.entry.js} +1 -1
  239. package/lib/duet/{p-82abc212.system.entry.js → p-0e98f667.system.entry.js} +1 -1
  240. package/lib/duet/{p-f5a06ff6.system.js → p-1999f503.system.js} +1 -1
  241. package/lib/duet/{p-e3a6351b.system.entry.js → p-1a41550e.system.entry.js} +1 -1
  242. package/lib/duet/{p-4d6b341d.system.entry.js → p-1bd57792.system.entry.js} +1 -1
  243. package/lib/duet/{p-567cab28.system.entry.js → p-1e0d7680.system.entry.js} +1 -1
  244. package/lib/duet/{p-921085f6.system.entry.js → p-1ebd7945.system.entry.js} +1 -1
  245. package/lib/duet/p-1fc60a60.system.js +4 -0
  246. package/lib/duet/{p-f416e108.entry.js → p-21662682.entry.js} +1 -1
  247. package/lib/duet/{p-2eea39f3.entry.js → p-23943f39.entry.js} +1 -1
  248. package/lib/duet/{p-9a3826e8.system.entry.js → p-23a8fa64.system.entry.js} +1 -1
  249. package/lib/duet/{p-902552a7.system.entry.js → p-264a0e0c.system.entry.js} +1 -1
  250. package/lib/duet/{p-5f407bd1.entry.js → p-27f72e70.entry.js} +1 -1
  251. package/lib/duet/{p-3c80d2fc.entry.js → p-2a3b1a2e.entry.js} +1 -1
  252. package/lib/duet/{p-6c022105.system.entry.js → p-2b320481.system.entry.js} +1 -1
  253. package/lib/duet/p-32f7178a.system.js +4 -0
  254. package/lib/duet/{p-196b2664.entry.js → p-3620ded5.entry.js} +1 -1
  255. package/lib/duet/{p-7d43d67b.entry.js → p-3904232a.entry.js} +1 -1
  256. package/lib/duet/{p-c89b1c28.entry.js → p-3b173cbd.entry.js} +1 -1
  257. package/lib/duet/{p-a9a9d22b.system.entry.js → p-430acad4.system.entry.js} +1 -1
  258. package/lib/duet/{p-5bde4aed.system.entry.js → p-4463946b.system.entry.js} +1 -1
  259. package/lib/duet/{p-cb1f9512.system.entry.js → p-44e9b1c8.system.entry.js} +1 -1
  260. package/lib/duet/p-49ce11a1.entry.js +4 -0
  261. package/lib/duet/{p-5d286e53.system.entry.js → p-4d6feeb5.system.entry.js} +1 -1
  262. package/lib/duet/{p-b4e8f605.system.entry.js → p-4d767c61.system.entry.js} +1 -1
  263. package/lib/duet/{p-94d496e1.system.entry.js → p-4f1fe415.system.entry.js} +1 -1
  264. package/lib/duet/{p-de3c0f4d.js → p-532e9db7.js} +1 -1
  265. package/lib/duet/{p-0250c7b7.system.entry.js → p-55fd512b.system.entry.js} +1 -1
  266. package/lib/duet/{p-398a79a0.js → p-588be556.js} +1 -1
  267. package/lib/duet/{p-f8a52ab0.entry.js → p-5af6d9e2.entry.js} +1 -1
  268. package/lib/duet/{p-626a5916.entry.js → p-5e1d64d8.entry.js} +1 -1
  269. package/lib/duet/{p-422c0465.system.entry.js → p-5f6452ce.system.entry.js} +1 -1
  270. package/lib/duet/{p-b57a4b2d.system.entry.js → p-60e29f52.system.entry.js} +1 -1
  271. package/lib/duet/{p-29157f26.system.entry.js → p-613c4099.system.entry.js} +1 -1
  272. package/lib/duet/{p-f0e4f685.system.entry.js → p-61444a3d.system.entry.js} +1 -1
  273. package/lib/duet/{p-9ef03ba6.js → p-6aca8584.js} +1 -1
  274. package/lib/duet/{p-0c83d107.system.entry.js → p-6e5f2016.system.entry.js} +1 -1
  275. package/lib/duet/{p-0930ce38.system.entry.js → p-6f93638a.system.entry.js} +1 -1
  276. package/lib/duet/{p-bc23dcde.entry.js → p-71105750.entry.js} +1 -1
  277. package/lib/duet/{p-3bbfe384.entry.js → p-73c6e5fb.entry.js} +1 -1
  278. package/lib/duet/{p-af3a016a.system.entry.js → p-751f6957.system.entry.js} +1 -1
  279. package/lib/duet/{p-920f9ff2.system.js → p-77600ed7.system.js} +1 -1
  280. package/lib/duet/{p-32883741.system.entry.js → p-77ca874f.system.entry.js} +1 -1
  281. package/lib/duet/{p-4427f4b2.entry.js → p-787f9eba.entry.js} +1 -1
  282. package/lib/duet/{p-8a91c7bb.system.entry.js → p-7ad2cb10.system.entry.js} +1 -1
  283. package/lib/duet/p-7de4d97d.entry.js +4 -0
  284. package/lib/duet/{p-20b5e96b.system.entry.js → p-8107aeb5.system.entry.js} +1 -1
  285. package/lib/duet/{p-a687eeaa.system.entry.js → p-86cb85b9.system.entry.js} +1 -1
  286. package/lib/duet/{p-d644302f.js → p-875ae637.js} +1 -1
  287. package/lib/duet/{p-39e1c6da.system.entry.js → p-8aafa8e7.system.entry.js} +1 -1
  288. package/lib/duet/{p-8bcd7936.entry.js → p-8b09a46f.entry.js} +1 -1
  289. package/lib/duet/{p-9059b7e3.entry.js → p-8c08e7ba.entry.js} +1 -1
  290. package/lib/duet/p-8e8f8b29.entry.js +4 -0
  291. package/lib/duet/{p-012e33e8.entry.js → p-9094fcf8.entry.js} +1 -1
  292. package/lib/duet/{p-2ebf682d.entry.js → p-988a781d.entry.js} +1 -1
  293. package/lib/duet/{p-194f22b3.system.entry.js → p-a395d4bc.system.entry.js} +1 -1
  294. package/lib/duet/{p-3f1c98d0.entry.js → p-a585113b.entry.js} +1 -1
  295. package/lib/duet/{p-e233e6ed.entry.js → p-aa8973fc.entry.js} +1 -1
  296. package/lib/duet/{p-b014fdca.entry.js → p-ab7f4070.entry.js} +1 -1
  297. package/lib/duet/{p-278340d9.system.entry.js → p-ab89d948.system.entry.js} +1 -1
  298. package/lib/duet/{p-14a2d6f2.entry.js → p-aef02083.entry.js} +1 -1
  299. package/lib/duet/{p-24978396.entry.js → p-afdc57da.entry.js} +1 -1
  300. package/lib/duet/{p-a124d4a0.entry.js → p-b2abaa9e.entry.js} +1 -1
  301. package/lib/duet/{p-68419f1e.entry.js → p-b55e55b5.entry.js} +1 -1
  302. package/lib/duet/{p-007d0250.system.entry.js → p-bbc91480.system.entry.js} +1 -1
  303. package/lib/duet/{p-ecc8ec3e.entry.js → p-bbe1a2cd.entry.js} +1 -1
  304. package/lib/duet/{p-9bd36dc0.system.entry.js → p-bd3c926c.system.entry.js} +1 -1
  305. package/lib/duet/{p-3feb442e.system.entry.js → p-bec16aea.system.entry.js} +1 -1
  306. package/lib/duet/p-bf59e11d.entry.js +4 -0
  307. package/lib/duet/{p-d5ef1959.system.entry.js → p-c4217626.system.entry.js} +1 -1
  308. package/lib/duet/{p-e1a1e52d.system.entry.js → p-c5f6ea62.system.entry.js} +1 -1
  309. package/lib/duet/{p-6ebb40da.entry.js → p-c6d05091.entry.js} +1 -1
  310. package/lib/duet/{p-c3d3f68d.system.entry.js → p-c73a591d.system.entry.js} +1 -1
  311. package/lib/duet/{p-35eaa5a8.entry.js → p-c863a0d1.entry.js} +1 -1
  312. package/lib/duet/{p-33300690.entry.js → p-c986532d.entry.js} +1 -1
  313. package/lib/duet/{p-b43a8c7a.entry.js → p-caa49454.entry.js} +1 -1
  314. package/lib/duet/{p-ddf8a652.system.entry.js → p-ccb0de84.system.entry.js} +1 -1
  315. package/lib/duet/{p-18cc5627.system.js → p-d209191d.system.js} +1 -1
  316. package/lib/duet/{p-4f235805.entry.js → p-defba7cd.entry.js} +1 -1
  317. package/lib/duet/{p-b9e9ac80.system.js → p-df785776.system.js} +1 -1
  318. package/lib/duet/{p-ea60602a.entry.js → p-e9862947.entry.js} +1 -1
  319. package/lib/duet/{p-b9b19fe9.entry.js → p-eb74c96e.entry.js} +1 -1
  320. package/lib/duet/{p-f96da661.entry.js → p-ece47184.entry.js} +1 -1
  321. package/lib/duet/{p-178e0ae7.entry.js → p-f09f968c.entry.js} +1 -1
  322. package/lib/duet/{p-2171d336.entry.js → p-f97776be.entry.js} +1 -1
  323. package/lib/duet/{p-1c0fdc62.system.entry.js → p-fe8fc877.system.entry.js} +1 -1
  324. package/lib/esm/duet-action-button.entry.js +3 -3
  325. package/lib/esm/duet-alert.entry.js +1 -1
  326. package/lib/esm/duet-badge.entry.js +1 -1
  327. package/lib/esm/duet-breadcrumb.entry.js +1 -1
  328. package/lib/esm/duet-breadcrumbs.entry.js +1 -1
  329. package/lib/esm/duet-button_2.entry.js +3 -3
  330. package/lib/esm/duet-caption_4.entry.js +3 -3
  331. package/lib/esm/duet-card.entry.js +6 -5
  332. package/lib/esm/duet-checkbox.entry.js +1 -1
  333. package/lib/esm/duet-choice_2.entry.js +4 -4
  334. package/lib/esm/duet-collapsible.entry.js +2 -2
  335. package/lib/esm/duet-combobox.entry.js +1 -1
  336. package/lib/esm/duet-cookie-consent.entry.js +1 -1
  337. package/lib/esm/duet-date-picker.entry.js +2 -2
  338. package/lib/esm/duet-divider_2.entry.js +1 -1
  339. package/lib/esm/duet-editable-table_3.entry.js +17 -14
  340. package/lib/esm/duet-empty-state.entry.js +1 -1
  341. package/lib/esm/duet-fieldset.entry.js +1 -1
  342. package/lib/esm/duet-footer.entry.js +1 -1
  343. package/lib/esm/duet-grid_2.entry.js +2 -2
  344. package/lib/esm/duet-header_2.entry.js +3 -3
  345. package/lib/esm/duet-hero.entry.js +1 -1
  346. package/lib/esm/duet-icon.entry.js +3 -3
  347. package/lib/esm/duet-input_2.entry.js +1 -1
  348. package/lib/esm/duet-layout.entry.js +1 -1
  349. package/lib/esm/duet-list_2.entry.js +1 -1
  350. package/lib/esm/duet-modal.entry.js +2 -2
  351. package/lib/esm/duet-notification_2.entry.js +1 -1
  352. package/lib/esm/duet-number-input.entry.js +1 -1
  353. package/lib/esm/duet-pagination_2.entry.js +1 -1
  354. package/lib/esm/duet-progress.entry.js +1 -1
  355. package/lib/esm/duet-radio_2.entry.js +1 -1
  356. package/lib/esm/duet-range-slider.entry.js +2 -2
  357. package/lib/esm/duet-scrollable_3.entry.js +1 -1
  358. package/lib/esm/duet-select.entry.js +1 -1
  359. package/lib/esm/duet-step_2.entry.js +1 -1
  360. package/lib/esm/duet-textarea.entry.js +1 -1
  361. package/lib/esm/duet-toggle.entry.js +1 -1
  362. package/lib/esm/duet-tooltip.entry.js +1 -1
  363. package/lib/esm/duet-tray.entry.js +2 -2
  364. package/lib/esm/duet-upload-aria-status.entry.js +1 -1
  365. package/lib/esm/duet-visually-hidden.entry.js +1 -1
  366. package/lib/esm/duet.js +1 -1
  367. package/lib/esm/focus-utils-236f580e.js +18 -0
  368. package/lib/esm/{index-0d0e51b6.js → index-b601aac1.js} +1 -1
  369. package/lib/esm/loader.js +1 -1
  370. package/lib/esm/token-utils-ebf797ab.js +92 -0
  371. package/lib/esm/tokens-b9d87fda.js +459 -0
  372. package/lib/esm/{tokens.module-f4572ed7.js → tokens.module-385c4cf8.js} +12 -10
  373. package/lib/esm-es5/duet-action-button.entry.js +1 -1
  374. package/lib/esm-es5/duet-alert.entry.js +1 -1
  375. package/lib/esm-es5/duet-badge.entry.js +1 -1
  376. package/lib/esm-es5/duet-breadcrumb.entry.js +1 -1
  377. package/lib/esm-es5/duet-breadcrumbs.entry.js +1 -1
  378. package/lib/esm-es5/duet-button_2.entry.js +1 -1
  379. package/lib/esm-es5/duet-caption_4.entry.js +1 -1
  380. package/lib/esm-es5/duet-card.entry.js +1 -1
  381. package/lib/esm-es5/duet-checkbox.entry.js +1 -1
  382. package/lib/esm-es5/duet-choice_2.entry.js +1 -1
  383. package/lib/esm-es5/duet-collapsible.entry.js +2 -2
  384. package/lib/esm-es5/duet-combobox.entry.js +1 -1
  385. package/lib/esm-es5/duet-cookie-consent.entry.js +1 -1
  386. package/lib/esm-es5/duet-date-picker.entry.js +1 -1
  387. package/lib/esm-es5/duet-divider_2.entry.js +1 -1
  388. package/lib/esm-es5/duet-editable-table_3.entry.js +1 -1
  389. package/lib/esm-es5/duet-empty-state.entry.js +1 -1
  390. package/lib/esm-es5/duet-fieldset.entry.js +1 -1
  391. package/lib/esm-es5/duet-footer.entry.js +1 -1
  392. package/lib/esm-es5/duet-grid_2.entry.js +1 -1
  393. package/lib/esm-es5/duet-header_2.entry.js +1 -1
  394. package/lib/esm-es5/duet-hero.entry.js +1 -1
  395. package/lib/esm-es5/duet-icon.entry.js +1 -1
  396. package/lib/esm-es5/duet-input_2.entry.js +1 -1
  397. package/lib/esm-es5/duet-layout.entry.js +1 -1
  398. package/lib/esm-es5/duet-list_2.entry.js +1 -1
  399. package/lib/esm-es5/duet-modal.entry.js +1 -1
  400. package/lib/esm-es5/duet-notification_2.entry.js +1 -1
  401. package/lib/esm-es5/duet-number-input.entry.js +1 -1
  402. package/lib/esm-es5/duet-pagination_2.entry.js +1 -1
  403. package/lib/esm-es5/duet-progress.entry.js +1 -1
  404. package/lib/esm-es5/duet-radio_2.entry.js +1 -1
  405. package/lib/esm-es5/duet-range-slider.entry.js +1 -1
  406. package/lib/esm-es5/duet-scrollable_3.entry.js +1 -1
  407. package/lib/esm-es5/duet-select.entry.js +1 -1
  408. package/lib/esm-es5/duet-step_2.entry.js +1 -1
  409. package/lib/esm-es5/duet-textarea.entry.js +2 -2
  410. package/lib/esm-es5/duet-toggle.entry.js +1 -1
  411. package/lib/esm-es5/duet-tooltip.entry.js +1 -1
  412. package/lib/esm-es5/duet-tray.entry.js +1 -1
  413. package/lib/esm-es5/duet-upload-aria-status.entry.js +1 -1
  414. package/lib/esm-es5/duet-visually-hidden.entry.js +1 -1
  415. package/lib/esm-es5/duet.js +1 -1
  416. package/lib/esm-es5/focus-utils-236f580e.js +4 -0
  417. package/lib/esm-es5/{index-0d0e51b6.js → index-b601aac1.js} +1 -1
  418. package/lib/esm-es5/loader.js +1 -1
  419. package/lib/esm-es5/{token-utils-df78f4d8.js → token-utils-ebf797ab.js} +1 -1
  420. package/lib/esm-es5/tokens-b9d87fda.js +4 -0
  421. package/lib/esm-es5/{tokens.module-f4572ed7.js → tokens.module-385c4cf8.js} +1 -1
  422. package/lib/types/components/duet-card/duet-card.d.ts +2 -0
  423. package/lib/types/components/duet-upload/duet-upload.d.ts +8 -8
  424. package/lib/types/components.d.ts +4 -4
  425. package/package.json +5 -5
  426. package/lib/custom-elements-bundle/index.d.ts +0 -399
  427. package/lib/custom-elements-bundle/index.js +0 -14109
  428. package/lib/duet/p-16d21cef.entry.js +0 -4
  429. package/lib/duet/p-6002f3d2.system.js +0 -4
  430. package/lib/duet/p-79817456.entry.js +0 -4
  431. package/lib/duet/p-835f4429.entry.js +0 -4
  432. package/lib/duet/p-a93a04b9.system.js +0 -4
  433. package/lib/duet/p-b6ef2e72.entry.js +0 -4
  434. package/lib/duet/p-d1746325.js +0 -4
  435. package/lib/esm-es5/focus-utils-9e76623d.js +0 -4
  436. package/lib/esm-es5/tokens-8ff8c570.js +0 -4
@@ -0,0 +1,1666 @@
1
+ /*!
2
+ * Built with Duet Design System
3
+ */
4
+ const NAMESPACE = 'duet';
5
+ const Env = /* duet */ {"cdnURILocal":"http://0.0.0.0:3334","cdnURIProd":"https://cdn.duetds.com/api","duetIconVersion":"3.0.4"};
6
+
7
+ let scopeId;
8
+ let contentRef;
9
+ let hostTagName;
10
+ let useNativeShadowDom = false;
11
+ let checkSlotFallbackVisibility = false;
12
+ let checkSlotRelocate = false;
13
+ let isSvgMode = false;
14
+ let queuePending = false;
15
+ const win = typeof window !== 'undefined' ? window : {};
16
+ const doc = win.document || { head: {} };
17
+ const H = (win.HTMLElement || class {
18
+ });
19
+ const plt = {
20
+ $flags$: 0,
21
+ $resourcesUrl$: '',
22
+ jmp: (h) => h(),
23
+ raf: (h) => requestAnimationFrame(h),
24
+ ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
25
+ rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
26
+ ce: (eventName, opts) => new CustomEvent(eventName, opts),
27
+ };
28
+ const supportsShadow = /*@__PURE__*/ (() => (doc.head.attachShadow + '').indexOf('[native') > -1)()
29
+ ;
30
+ const promiseResolve = (v) => Promise.resolve(v);
31
+ const supportsConstructibleStylesheets = /*@__PURE__*/ (() => {
32
+ try {
33
+ new CSSStyleSheet();
34
+ return typeof new CSSStyleSheet().replace === 'function';
35
+ }
36
+ catch (e) { }
37
+ return false;
38
+ })()
39
+ ;
40
+ const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
41
+ if (listeners) {
42
+ listeners.map(([flags, name, method]) => {
43
+ const target = getHostListenerTarget(elm, flags) ;
44
+ const handler = hostListenerProxy(hostRef, method);
45
+ const opts = hostListenerOpts(flags);
46
+ plt.ael(target, name, handler, opts);
47
+ (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
48
+ });
49
+ }
50
+ };
51
+ const hostListenerProxy = (hostRef, methodName) => (ev) => {
52
+ try {
53
+ {
54
+ hostRef.$hostElement$[methodName](ev);
55
+ }
56
+ }
57
+ catch (e) {
58
+ consoleError(e);
59
+ }
60
+ };
61
+ const getHostListenerTarget = (elm, flags) => {
62
+ if (flags & 4 /* TargetDocument */)
63
+ return doc;
64
+ if (flags & 8 /* TargetWindow */)
65
+ return win;
66
+ if (flags & 16 /* TargetBody */)
67
+ return doc.body;
68
+ return elm;
69
+ };
70
+ // prettier-ignore
71
+ const hostListenerOpts = (flags) => (flags & 2 /* Capture */) !== 0;
72
+ const XLINK_NS = 'http://www.w3.org/1999/xlink';
73
+ const createTime = (fnName, tagName = '') => {
74
+ {
75
+ return () => {
76
+ return;
77
+ };
78
+ }
79
+ };
80
+ const rootAppliedStyles = new WeakMap();
81
+ const registerStyle = (scopeId, cssText, allowCS) => {
82
+ let style = styles.get(scopeId);
83
+ if (supportsConstructibleStylesheets && allowCS) {
84
+ style = (style || new CSSStyleSheet());
85
+ style.replace(cssText);
86
+ }
87
+ else {
88
+ style = cssText;
89
+ }
90
+ styles.set(scopeId, style);
91
+ };
92
+ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
93
+ let scopeId = getScopeId(cmpMeta);
94
+ const style = styles.get(scopeId);
95
+ // if an element is NOT connected then getRootNode() will return the wrong root node
96
+ // so the fallback is to always use the document for the root node in those cases
97
+ styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
98
+ if (style) {
99
+ if (typeof style === 'string') {
100
+ styleContainerNode = styleContainerNode.head || styleContainerNode;
101
+ let appliedStyles = rootAppliedStyles.get(styleContainerNode);
102
+ let styleElm;
103
+ if (!appliedStyles) {
104
+ rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
105
+ }
106
+ if (!appliedStyles.has(scopeId)) {
107
+ {
108
+ {
109
+ styleElm = doc.createElement('style');
110
+ styleElm.innerHTML = style;
111
+ }
112
+ styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
113
+ }
114
+ if (appliedStyles) {
115
+ appliedStyles.add(scopeId);
116
+ }
117
+ }
118
+ }
119
+ else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
120
+ styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
121
+ }
122
+ }
123
+ return scopeId;
124
+ };
125
+ const attachStyles = (hostRef) => {
126
+ const cmpMeta = hostRef.$cmpMeta$;
127
+ const elm = hostRef.$hostElement$;
128
+ const flags = cmpMeta.$flags$;
129
+ const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
130
+ const scopeId = addStyle(supportsShadow && elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
131
+ if (flags & 10 /* needsScopedEncapsulation */) {
132
+ // only required when we're NOT using native shadow dom (slot)
133
+ // or this browser doesn't support native shadow dom
134
+ // and this host element was NOT created with SSR
135
+ // let's pick out the inner content for slot projection
136
+ // create a node to represent where the original
137
+ // content was first placed, which is useful later on
138
+ // DOM WRITE!!
139
+ elm['s-sc'] = scopeId;
140
+ elm.classList.add(scopeId + '-h');
141
+ if (flags & 2 /* scopedCssEncapsulation */) {
142
+ elm.classList.add(scopeId + '-s');
143
+ }
144
+ }
145
+ endAttachStyles();
146
+ };
147
+ const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
148
+ /**
149
+ * Default style mode id
150
+ */
151
+ /**
152
+ * Reusable empty obj/array
153
+ * Don't add values to these!!
154
+ */
155
+ const EMPTY_OBJ = {};
156
+ /**
157
+ * Namespaces
158
+ */
159
+ const SVG_NS = 'http://www.w3.org/2000/svg';
160
+ const HTML_NS = 'http://www.w3.org/1999/xhtml';
161
+ const isDef = (v) => v != null;
162
+ const isComplexType = (o) => {
163
+ // https://jsperf.com/typeof-fn-object/5
164
+ o = typeof o;
165
+ return o === 'object' || o === 'function';
166
+ };
167
+ /**
168
+ * Production h() function based on Preact by
169
+ * Jason Miller (@developit)
170
+ * Licensed under the MIT License
171
+ * https://github.com/developit/preact/blob/master/LICENSE
172
+ *
173
+ * Modified for Stencil's compiler and vdom
174
+ */
175
+ // const stack: any[] = [];
176
+ // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
177
+ // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
178
+ const h = (nodeName, vnodeData, ...children) => {
179
+ let child = null;
180
+ let key = null;
181
+ let slotName = null;
182
+ let simple = false;
183
+ let lastSimple = false;
184
+ const vNodeChildren = [];
185
+ const walk = (c) => {
186
+ for (let i = 0; i < c.length; i++) {
187
+ child = c[i];
188
+ if (Array.isArray(child)) {
189
+ walk(child);
190
+ }
191
+ else if (child != null && typeof child !== 'boolean') {
192
+ if ((simple = typeof nodeName !== 'function' && !isComplexType(child))) {
193
+ child = String(child);
194
+ }
195
+ if (simple && lastSimple) {
196
+ // If the previous child was simple (string), we merge both
197
+ vNodeChildren[vNodeChildren.length - 1].$text$ += child;
198
+ }
199
+ else {
200
+ // Append a new vNode, if it's text, we create a text vNode
201
+ vNodeChildren.push(simple ? newVNode(null, child) : child);
202
+ }
203
+ lastSimple = simple;
204
+ }
205
+ }
206
+ };
207
+ walk(children);
208
+ if (vnodeData) {
209
+ // normalize class / classname attributes
210
+ if (vnodeData.key) {
211
+ key = vnodeData.key;
212
+ }
213
+ if (vnodeData.name) {
214
+ slotName = vnodeData.name;
215
+ }
216
+ {
217
+ const classData = vnodeData.className || vnodeData.class;
218
+ if (classData) {
219
+ vnodeData.class =
220
+ typeof classData !== 'object'
221
+ ? classData
222
+ : Object.keys(classData)
223
+ .filter((k) => classData[k])
224
+ .join(' ');
225
+ }
226
+ }
227
+ }
228
+ if (typeof nodeName === 'function') {
229
+ // nodeName is a functional component
230
+ return nodeName(vnodeData === null ? {} : vnodeData, vNodeChildren, vdomFnUtils);
231
+ }
232
+ const vnode = newVNode(nodeName, null);
233
+ vnode.$attrs$ = vnodeData;
234
+ if (vNodeChildren.length > 0) {
235
+ vnode.$children$ = vNodeChildren;
236
+ }
237
+ {
238
+ vnode.$key$ = key;
239
+ }
240
+ {
241
+ vnode.$name$ = slotName;
242
+ }
243
+ return vnode;
244
+ };
245
+ const newVNode = (tag, text) => {
246
+ const vnode = {
247
+ $flags$: 0,
248
+ $tag$: tag,
249
+ $text$: text,
250
+ $elm$: null,
251
+ $children$: null,
252
+ };
253
+ {
254
+ vnode.$attrs$ = null;
255
+ }
256
+ {
257
+ vnode.$key$ = null;
258
+ }
259
+ {
260
+ vnode.$name$ = null;
261
+ }
262
+ return vnode;
263
+ };
264
+ const Host = {};
265
+ const isHost = (node) => node && node.$tag$ === Host;
266
+ const vdomFnUtils = {
267
+ forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
268
+ map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate),
269
+ };
270
+ const convertToPublic = (node) => ({
271
+ vattrs: node.$attrs$,
272
+ vchildren: node.$children$,
273
+ vkey: node.$key$,
274
+ vname: node.$name$,
275
+ vtag: node.$tag$,
276
+ vtext: node.$text$,
277
+ });
278
+ const convertToPrivate = (node) => {
279
+ if (typeof node.vtag === 'function') {
280
+ const vnodeData = Object.assign({}, node.vattrs);
281
+ if (node.vkey) {
282
+ vnodeData.key = node.vkey;
283
+ }
284
+ if (node.vname) {
285
+ vnodeData.name = node.vname;
286
+ }
287
+ return h(node.vtag, vnodeData, ...(node.vchildren || []));
288
+ }
289
+ const vnode = newVNode(node.vtag, node.vtext);
290
+ vnode.$attrs$ = node.vattrs;
291
+ vnode.$children$ = node.vchildren;
292
+ vnode.$key$ = node.vkey;
293
+ vnode.$name$ = node.vname;
294
+ return vnode;
295
+ };
296
+ /**
297
+ * Production setAccessor() function based on Preact by
298
+ * Jason Miller (@developit)
299
+ * Licensed under the MIT License
300
+ * https://github.com/developit/preact/blob/master/LICENSE
301
+ *
302
+ * Modified for Stencil's compiler and vdom
303
+ */
304
+ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
305
+ if (oldValue !== newValue) {
306
+ let isProp = isMemberInElement(elm, memberName);
307
+ let ln = memberName.toLowerCase();
308
+ if (memberName === 'class') {
309
+ const classList = elm.classList;
310
+ const oldClasses = parseClassList(oldValue);
311
+ const newClasses = parseClassList(newValue);
312
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
313
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
314
+ }
315
+ else if (memberName === 'style') {
316
+ // update style attribute, css properties and values
317
+ {
318
+ for (const prop in oldValue) {
319
+ if (!newValue || newValue[prop] == null) {
320
+ if (prop.includes('-')) {
321
+ elm.style.removeProperty(prop);
322
+ }
323
+ else {
324
+ elm.style[prop] = '';
325
+ }
326
+ }
327
+ }
328
+ }
329
+ for (const prop in newValue) {
330
+ if (!oldValue || newValue[prop] !== oldValue[prop]) {
331
+ if (prop.includes('-')) {
332
+ elm.style.setProperty(prop, newValue[prop]);
333
+ }
334
+ else {
335
+ elm.style[prop] = newValue[prop];
336
+ }
337
+ }
338
+ }
339
+ }
340
+ else if (memberName === 'key')
341
+ ;
342
+ else if (memberName === 'ref') {
343
+ // minifier will clean this up
344
+ if (newValue) {
345
+ newValue(elm);
346
+ }
347
+ }
348
+ else if ((!elm.__lookupSetter__(memberName)) &&
349
+ memberName[0] === 'o' &&
350
+ memberName[1] === 'n') {
351
+ // Event Handlers
352
+ // so if the member name starts with "on" and the 3rd characters is
353
+ // a capital letter, and it's not already a member on the element,
354
+ // then we're assuming it's an event listener
355
+ if (memberName[2] === '-') {
356
+ // on- prefixed events
357
+ // allows to be explicit about the dom event to listen without any magic
358
+ // under the hood:
359
+ // <my-cmp on-click> // listens for "click"
360
+ // <my-cmp on-Click> // listens for "Click"
361
+ // <my-cmp on-ionChange> // listens for "ionChange"
362
+ // <my-cmp on-EVENTS> // listens for "EVENTS"
363
+ memberName = memberName.slice(3);
364
+ }
365
+ else if (isMemberInElement(win, ln)) {
366
+ // standard event
367
+ // the JSX attribute could have been "onMouseOver" and the
368
+ // member name "onmouseover" is on the window's prototype
369
+ // so let's add the listener "mouseover", which is all lowercased
370
+ memberName = ln.slice(2);
371
+ }
372
+ else {
373
+ // custom event
374
+ // the JSX attribute could have been "onMyCustomEvent"
375
+ // so let's trim off the "on" prefix and lowercase the first character
376
+ // and add the listener "myCustomEvent"
377
+ // except for the first character, we keep the event name case
378
+ memberName = ln[2] + memberName.slice(3);
379
+ }
380
+ if (oldValue) {
381
+ plt.rel(elm, memberName, oldValue, false);
382
+ }
383
+ if (newValue) {
384
+ plt.ael(elm, memberName, newValue, false);
385
+ }
386
+ }
387
+ else {
388
+ // Set property if it exists and it's not a SVG
389
+ const isComplex = isComplexType(newValue);
390
+ if ((isProp || (isComplex && newValue !== null)) && !isSvg) {
391
+ try {
392
+ if (!elm.tagName.includes('-')) {
393
+ const n = newValue == null ? '' : newValue;
394
+ // Workaround for Safari, moving the <input> caret when re-assigning the same valued
395
+ if (memberName === 'list') {
396
+ isProp = false;
397
+ }
398
+ else if (oldValue == null || elm[memberName] != n) {
399
+ elm[memberName] = n;
400
+ }
401
+ }
402
+ else {
403
+ elm[memberName] = newValue;
404
+ }
405
+ }
406
+ catch (e) { }
407
+ }
408
+ /**
409
+ * Need to manually update attribute if:
410
+ * - memberName is not an attribute
411
+ * - if we are rendering the host element in order to reflect attribute
412
+ * - if it's a SVG, since properties might not work in <svg>
413
+ * - if the newValue is null/undefined or 'false'.
414
+ */
415
+ let xlink = false;
416
+ {
417
+ if (ln !== (ln = ln.replace(/^xlink\:?/, ''))) {
418
+ memberName = ln;
419
+ xlink = true;
420
+ }
421
+ }
422
+ if (newValue == null || newValue === false) {
423
+ if (newValue !== false || elm.getAttribute(memberName) === '') {
424
+ if (xlink) {
425
+ elm.removeAttributeNS(XLINK_NS, memberName);
426
+ }
427
+ else {
428
+ elm.removeAttribute(memberName);
429
+ }
430
+ }
431
+ }
432
+ else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
433
+ newValue = newValue === true ? '' : newValue;
434
+ if (xlink) {
435
+ elm.setAttributeNS(XLINK_NS, memberName, newValue);
436
+ }
437
+ else {
438
+ elm.setAttribute(memberName, newValue);
439
+ }
440
+ }
441
+ }
442
+ }
443
+ };
444
+ const parseClassListRegex = /\s/;
445
+ const parseClassList = (value) => (!value ? [] : value.split(parseClassListRegex));
446
+ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
447
+ // if the element passed in is a shadow root, which is a document fragment
448
+ // then we want to be adding attrs/props to the shadow root's "host" element
449
+ // if it's not a shadow root, then we add attrs/props to the same element
450
+ const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host
451
+ ? newVnode.$elm$.host
452
+ : newVnode.$elm$;
453
+ const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
454
+ const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
455
+ {
456
+ // remove attributes no longer present on the vnode by setting them to undefined
457
+ for (memberName in oldVnodeAttrs) {
458
+ if (!(memberName in newVnodeAttrs)) {
459
+ setAccessor(elm, memberName, oldVnodeAttrs[memberName], undefined, isSvgMode, newVnode.$flags$);
460
+ }
461
+ }
462
+ }
463
+ // add new & update changed attributes
464
+ for (memberName in newVnodeAttrs) {
465
+ setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
466
+ }
467
+ };
468
+ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
469
+ // tslint:disable-next-line: prefer-const
470
+ const newVNode = newParentVNode.$children$[childIndex];
471
+ let i = 0;
472
+ let elm;
473
+ let childNode;
474
+ let oldVNode;
475
+ if (!useNativeShadowDom) {
476
+ // remember for later we need to check to relocate nodes
477
+ checkSlotRelocate = true;
478
+ if (newVNode.$tag$ === 'slot') {
479
+ if (scopeId) {
480
+ // scoped css needs to add its scoped id to the parent element
481
+ parentElm.classList.add(scopeId + '-s');
482
+ }
483
+ newVNode.$flags$ |= newVNode.$children$
484
+ ? // slot element has fallback content
485
+ 2 /* isSlotFallback */
486
+ : // slot element does not have fallback content
487
+ 1 /* isSlotReference */;
488
+ }
489
+ }
490
+ if (newVNode.$text$ !== null) {
491
+ // create text node
492
+ elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
493
+ }
494
+ else if (newVNode.$flags$ & 1 /* isSlotReference */) {
495
+ // create a slot reference node
496
+ elm = newVNode.$elm$ =
497
+ doc.createTextNode('');
498
+ }
499
+ else {
500
+ if (!isSvgMode) {
501
+ isSvgMode = newVNode.$tag$ === 'svg';
502
+ }
503
+ // create element
504
+ elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$flags$ & 2 /* isSlotFallback */
505
+ ? 'slot-fb'
506
+ : newVNode.$tag$)
507
+ );
508
+ if (isSvgMode && newVNode.$tag$ === 'foreignObject') {
509
+ isSvgMode = false;
510
+ }
511
+ // add css classes, attrs, props, listeners, etc.
512
+ {
513
+ updateElement(null, newVNode, isSvgMode);
514
+ }
515
+ if (isDef(scopeId) && elm['s-si'] !== scopeId) {
516
+ // if there is a scopeId and this is the initial render
517
+ // then let's add the scopeId as a css class
518
+ elm.classList.add((elm['s-si'] = scopeId));
519
+ }
520
+ if (newVNode.$children$) {
521
+ for (i = 0; i < newVNode.$children$.length; ++i) {
522
+ // create the node
523
+ childNode = createElm(oldParentVNode, newVNode, i, elm);
524
+ // return node could have been null
525
+ if (childNode) {
526
+ // append our new node
527
+ elm.appendChild(childNode);
528
+ }
529
+ }
530
+ }
531
+ {
532
+ if (newVNode.$tag$ === 'svg') {
533
+ // Only reset the SVG context when we're exiting <svg> element
534
+ isSvgMode = false;
535
+ }
536
+ else if (elm.tagName === 'foreignObject') {
537
+ // Reenter SVG context when we're exiting <foreignObject> element
538
+ isSvgMode = true;
539
+ }
540
+ }
541
+ }
542
+ {
543
+ elm['s-hn'] = hostTagName;
544
+ if (newVNode.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
545
+ // remember the content reference comment
546
+ elm['s-sr'] = true;
547
+ // remember the content reference comment
548
+ elm['s-cr'] = contentRef;
549
+ // remember the slot name, or empty string for default slot
550
+ elm['s-sn'] = newVNode.$name$ || '';
551
+ // check if we've got an old vnode for this slot
552
+ oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
553
+ if (oldVNode && oldVNode.$tag$ === newVNode.$tag$ && oldParentVNode.$elm$) {
554
+ // we've got an old slot vnode and the wrapper is being replaced
555
+ // so let's move the old slot content back to it's original location
556
+ putBackInOriginalLocation(oldParentVNode.$elm$, false);
557
+ }
558
+ }
559
+ }
560
+ return elm;
561
+ };
562
+ const putBackInOriginalLocation = (parentElm, recursive) => {
563
+ plt.$flags$ |= 1 /* isTmpDisconnected */;
564
+ const oldSlotChildNodes = parentElm.childNodes;
565
+ for (let i = oldSlotChildNodes.length - 1; i >= 0; i--) {
566
+ const childNode = oldSlotChildNodes[i];
567
+ if (childNode['s-hn'] !== hostTagName && childNode['s-ol']) {
568
+ // // this child node in the old element is from another component
569
+ // // remove this node from the old slot's parent
570
+ // childNode.remove();
571
+ // and relocate it back to it's original location
572
+ parentReferenceNode(childNode).insertBefore(childNode, referenceNode(childNode));
573
+ // remove the old original location comment entirely
574
+ // later on the patch function will know what to do
575
+ // and move this to the correct spot in need be
576
+ childNode['s-ol'].remove();
577
+ childNode['s-ol'] = undefined;
578
+ checkSlotRelocate = true;
579
+ }
580
+ if (recursive) {
581
+ putBackInOriginalLocation(childNode, recursive);
582
+ }
583
+ }
584
+ plt.$flags$ &= ~1 /* isTmpDisconnected */;
585
+ };
586
+ const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
587
+ let containerElm = ((parentElm['s-cr'] && parentElm['s-cr'].parentNode) || parentElm);
588
+ let childNode;
589
+ if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
590
+ containerElm = containerElm.shadowRoot;
591
+ }
592
+ for (; startIdx <= endIdx; ++startIdx) {
593
+ if (vnodes[startIdx]) {
594
+ childNode = createElm(null, parentVNode, startIdx, parentElm);
595
+ if (childNode) {
596
+ vnodes[startIdx].$elm$ = childNode;
597
+ containerElm.insertBefore(childNode, referenceNode(before) );
598
+ }
599
+ }
600
+ }
601
+ };
602
+ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
603
+ for (; startIdx <= endIdx; ++startIdx) {
604
+ if ((vnode = vnodes[startIdx])) {
605
+ elm = vnode.$elm$;
606
+ callNodeRefs(vnode);
607
+ {
608
+ // we're removing this element
609
+ // so it's possible we need to show slot fallback content now
610
+ checkSlotFallbackVisibility = true;
611
+ if (elm['s-ol']) {
612
+ // remove the original location comment
613
+ elm['s-ol'].remove();
614
+ }
615
+ else {
616
+ // it's possible that child nodes of the node
617
+ // that's being removed are slot nodes
618
+ putBackInOriginalLocation(elm, true);
619
+ }
620
+ }
621
+ // remove the vnode's element from the dom
622
+ elm.remove();
623
+ }
624
+ }
625
+ };
626
+ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
627
+ let oldStartIdx = 0;
628
+ let newStartIdx = 0;
629
+ let idxInOld = 0;
630
+ let i = 0;
631
+ let oldEndIdx = oldCh.length - 1;
632
+ let oldStartVnode = oldCh[0];
633
+ let oldEndVnode = oldCh[oldEndIdx];
634
+ let newEndIdx = newCh.length - 1;
635
+ let newStartVnode = newCh[0];
636
+ let newEndVnode = newCh[newEndIdx];
637
+ let node;
638
+ let elmToMove;
639
+ while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
640
+ if (oldStartVnode == null) {
641
+ // Vnode might have been moved left
642
+ oldStartVnode = oldCh[++oldStartIdx];
643
+ }
644
+ else if (oldEndVnode == null) {
645
+ oldEndVnode = oldCh[--oldEndIdx];
646
+ }
647
+ else if (newStartVnode == null) {
648
+ newStartVnode = newCh[++newStartIdx];
649
+ }
650
+ else if (newEndVnode == null) {
651
+ newEndVnode = newCh[--newEndIdx];
652
+ }
653
+ else if (isSameVnode(oldStartVnode, newStartVnode)) {
654
+ patch(oldStartVnode, newStartVnode);
655
+ oldStartVnode = oldCh[++oldStartIdx];
656
+ newStartVnode = newCh[++newStartIdx];
657
+ }
658
+ else if (isSameVnode(oldEndVnode, newEndVnode)) {
659
+ patch(oldEndVnode, newEndVnode);
660
+ oldEndVnode = oldCh[--oldEndIdx];
661
+ newEndVnode = newCh[--newEndIdx];
662
+ }
663
+ else if (isSameVnode(oldStartVnode, newEndVnode)) {
664
+ // Vnode moved right
665
+ if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
666
+ putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
667
+ }
668
+ patch(oldStartVnode, newEndVnode);
669
+ parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
670
+ oldStartVnode = oldCh[++oldStartIdx];
671
+ newEndVnode = newCh[--newEndIdx];
672
+ }
673
+ else if (isSameVnode(oldEndVnode, newStartVnode)) {
674
+ // Vnode moved left
675
+ if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
676
+ putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
677
+ }
678
+ patch(oldEndVnode, newStartVnode);
679
+ parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
680
+ oldEndVnode = oldCh[--oldEndIdx];
681
+ newStartVnode = newCh[++newStartIdx];
682
+ }
683
+ else {
684
+ // createKeyToOldIdx
685
+ idxInOld = -1;
686
+ {
687
+ for (i = oldStartIdx; i <= oldEndIdx; ++i) {
688
+ if (oldCh[i] && oldCh[i].$key$ !== null && oldCh[i].$key$ === newStartVnode.$key$) {
689
+ idxInOld = i;
690
+ break;
691
+ }
692
+ }
693
+ }
694
+ if (idxInOld >= 0) {
695
+ elmToMove = oldCh[idxInOld];
696
+ if (elmToMove.$tag$ !== newStartVnode.$tag$) {
697
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld, parentElm);
698
+ }
699
+ else {
700
+ patch(elmToMove, newStartVnode);
701
+ oldCh[idxInOld] = undefined;
702
+ node = elmToMove.$elm$;
703
+ }
704
+ newStartVnode = newCh[++newStartIdx];
705
+ }
706
+ else {
707
+ // new element
708
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx, parentElm);
709
+ newStartVnode = newCh[++newStartIdx];
710
+ }
711
+ if (node) {
712
+ {
713
+ parentReferenceNode(oldStartVnode.$elm$).insertBefore(node, referenceNode(oldStartVnode.$elm$));
714
+ }
715
+ }
716
+ }
717
+ }
718
+ if (oldStartIdx > oldEndIdx) {
719
+ addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx);
720
+ }
721
+ else if (newStartIdx > newEndIdx) {
722
+ removeVnodes(oldCh, oldStartIdx, oldEndIdx);
723
+ }
724
+ };
725
+ const isSameVnode = (vnode1, vnode2) => {
726
+ // compare if two vnode to see if they're "technically" the same
727
+ // need to have the same element tag, and same key to be the same
728
+ if (vnode1.$tag$ === vnode2.$tag$) {
729
+ if (vnode1.$tag$ === 'slot') {
730
+ return vnode1.$name$ === vnode2.$name$;
731
+ }
732
+ {
733
+ return vnode1.$key$ === vnode2.$key$;
734
+ }
735
+ }
736
+ return false;
737
+ };
738
+ const referenceNode = (node) => {
739
+ // this node was relocated to a new location in the dom
740
+ // because of some other component's slot
741
+ // but we still have an html comment in place of where
742
+ // it's original location was according to it's original vdom
743
+ return (node && node['s-ol']) || node;
744
+ };
745
+ const parentReferenceNode = (node) => (node['s-ol'] ? node['s-ol'] : node).parentNode;
746
+ const patch = (oldVNode, newVNode) => {
747
+ const elm = (newVNode.$elm$ = oldVNode.$elm$);
748
+ const oldChildren = oldVNode.$children$;
749
+ const newChildren = newVNode.$children$;
750
+ const tag = newVNode.$tag$;
751
+ const text = newVNode.$text$;
752
+ let defaultHolder;
753
+ if (text === null) {
754
+ {
755
+ // test if we're rendering an svg element, or still rendering nodes inside of one
756
+ // only add this to the when the compiler sees we're using an svg somewhere
757
+ isSvgMode = tag === 'svg' ? true : tag === 'foreignObject' ? false : isSvgMode;
758
+ }
759
+ // element node
760
+ {
761
+ if (tag === 'slot')
762
+ ;
763
+ else {
764
+ // either this is the first render of an element OR it's an update
765
+ // AND we already know it's possible it could have changed
766
+ // this updates the element's css classes, attrs, props, listeners, etc.
767
+ updateElement(oldVNode, newVNode, isSvgMode);
768
+ }
769
+ }
770
+ if (oldChildren !== null && newChildren !== null) {
771
+ // looks like there's child vnodes for both the old and new vnodes
772
+ updateChildren(elm, oldChildren, newVNode, newChildren);
773
+ }
774
+ else if (newChildren !== null) {
775
+ // no old child vnodes, but there are new child vnodes to add
776
+ if (oldVNode.$text$ !== null) {
777
+ // the old vnode was text, so be sure to clear it out
778
+ elm.textContent = '';
779
+ }
780
+ // add the new vnode children
781
+ addVnodes(elm, null, newVNode, newChildren, 0, newChildren.length - 1);
782
+ }
783
+ else if (oldChildren !== null) {
784
+ // no new child vnodes, but there are old child vnodes to remove
785
+ removeVnodes(oldChildren, 0, oldChildren.length - 1);
786
+ }
787
+ if (isSvgMode && tag === 'svg') {
788
+ isSvgMode = false;
789
+ }
790
+ }
791
+ else if ((defaultHolder = elm['s-cr'])) {
792
+ // this element has slotted content
793
+ defaultHolder.parentNode.textContent = text;
794
+ }
795
+ else if (oldVNode.$text$ !== text) {
796
+ // update the text content for the text only vnode
797
+ // and also only if the text is different than before
798
+ elm.data = text;
799
+ }
800
+ };
801
+ const updateFallbackSlotVisibility = (elm) => {
802
+ // tslint:disable-next-line: prefer-const
803
+ const childNodes = elm.childNodes;
804
+ let childNode;
805
+ let i;
806
+ let ilen;
807
+ let j;
808
+ let slotNameAttr;
809
+ let nodeType;
810
+ for (i = 0, ilen = childNodes.length; i < ilen; i++) {
811
+ childNode = childNodes[i];
812
+ if (childNode.nodeType === 1 /* ElementNode */) {
813
+ if (childNode['s-sr']) {
814
+ // this is a slot fallback node
815
+ // get the slot name for this slot reference node
816
+ slotNameAttr = childNode['s-sn'];
817
+ // by default always show a fallback slot node
818
+ // then hide it if there are other slots in the light dom
819
+ childNode.hidden = false;
820
+ for (j = 0; j < ilen; j++) {
821
+ nodeType = childNodes[j].nodeType;
822
+ if (childNodes[j]['s-hn'] !== childNode['s-hn'] || slotNameAttr !== '') {
823
+ // this sibling node is from a different component OR is a named fallback slot node
824
+ if (nodeType === 1 /* ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {
825
+ childNode.hidden = true;
826
+ break;
827
+ }
828
+ }
829
+ else {
830
+ // this is a default fallback slot node
831
+ // any element or text node (with content)
832
+ // should hide the default fallback slot node
833
+ if (nodeType === 1 /* ElementNode */ ||
834
+ (nodeType === 3 /* TextNode */ && childNodes[j].textContent.trim() !== '')) {
835
+ childNode.hidden = true;
836
+ break;
837
+ }
838
+ }
839
+ }
840
+ }
841
+ // keep drilling down
842
+ updateFallbackSlotVisibility(childNode);
843
+ }
844
+ }
845
+ };
846
+ const relocateNodes = [];
847
+ const relocateSlotContent = (elm) => {
848
+ // tslint:disable-next-line: prefer-const
849
+ let childNode;
850
+ let node;
851
+ let hostContentNodes;
852
+ let slotNameAttr;
853
+ let relocateNodeData;
854
+ let j;
855
+ let i = 0;
856
+ const childNodes = elm.childNodes;
857
+ const ilen = childNodes.length;
858
+ for (; i < ilen; i++) {
859
+ childNode = childNodes[i];
860
+ if (childNode['s-sr'] && (node = childNode['s-cr']) && node.parentNode) {
861
+ // first got the content reference comment node
862
+ // then we got it's parent, which is where all the host content is in now
863
+ hostContentNodes = node.parentNode.childNodes;
864
+ slotNameAttr = childNode['s-sn'];
865
+ for (j = hostContentNodes.length - 1; j >= 0; j--) {
866
+ node = hostContentNodes[j];
867
+ if (!node['s-cn'] && !node['s-nr'] && node['s-hn'] !== childNode['s-hn']) {
868
+ // let's do some relocating to its new home
869
+ // but never relocate a content reference node
870
+ // that is suppose to always represent the original content location
871
+ if (isNodeLocatedInSlot(node, slotNameAttr)) {
872
+ // it's possible we've already decided to relocate this node
873
+ relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
874
+ // made some changes to slots
875
+ // let's make sure we also double check
876
+ // fallbacks are correctly hidden or shown
877
+ checkSlotFallbackVisibility = true;
878
+ node['s-sn'] = node['s-sn'] || slotNameAttr;
879
+ if (relocateNodeData) {
880
+ // previously we never found a slot home for this node
881
+ // but turns out we did, so let's remember it now
882
+ relocateNodeData.$slotRefNode$ = childNode;
883
+ }
884
+ else {
885
+ // add to our list of nodes to relocate
886
+ relocateNodes.push({
887
+ $slotRefNode$: childNode,
888
+ $nodeToRelocate$: node,
889
+ });
890
+ }
891
+ if (node['s-sr']) {
892
+ relocateNodes.map((relocateNode) => {
893
+ if (isNodeLocatedInSlot(relocateNode.$nodeToRelocate$, node['s-sn'])) {
894
+ relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
895
+ if (relocateNodeData && !relocateNode.$slotRefNode$) {
896
+ relocateNode.$slotRefNode$ = relocateNodeData.$slotRefNode$;
897
+ }
898
+ }
899
+ });
900
+ }
901
+ }
902
+ else if (!relocateNodes.some((r) => r.$nodeToRelocate$ === node)) {
903
+ // so far this element does not have a slot home, not setting slotRefNode on purpose
904
+ // if we never find a home for this element then we'll need to hide it
905
+ relocateNodes.push({
906
+ $nodeToRelocate$: node,
907
+ });
908
+ }
909
+ }
910
+ }
911
+ }
912
+ if (childNode.nodeType === 1 /* ElementNode */) {
913
+ relocateSlotContent(childNode);
914
+ }
915
+ }
916
+ };
917
+ const isNodeLocatedInSlot = (nodeToRelocate, slotNameAttr) => {
918
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
919
+ if (nodeToRelocate.getAttribute('slot') === null && slotNameAttr === '') {
920
+ return true;
921
+ }
922
+ if (nodeToRelocate.getAttribute('slot') === slotNameAttr) {
923
+ return true;
924
+ }
925
+ return false;
926
+ }
927
+ if (nodeToRelocate['s-sn'] === slotNameAttr) {
928
+ return true;
929
+ }
930
+ return slotNameAttr === '';
931
+ };
932
+ const callNodeRefs = (vNode) => {
933
+ {
934
+ vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
935
+ vNode.$children$ && vNode.$children$.map(callNodeRefs);
936
+ }
937
+ };
938
+ const renderVdom = (hostRef, renderFnResults) => {
939
+ const hostElm = hostRef.$hostElement$;
940
+ const cmpMeta = hostRef.$cmpMeta$;
941
+ const oldVNode = hostRef.$vnode$ || newVNode(null, null);
942
+ const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
943
+ hostTagName = hostElm.tagName;
944
+ if (cmpMeta.$attrsToReflect$) {
945
+ rootVnode.$attrs$ = rootVnode.$attrs$ || {};
946
+ cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
947
+ }
948
+ rootVnode.$tag$ = null;
949
+ rootVnode.$flags$ |= 4 /* isHost */;
950
+ hostRef.$vnode$ = rootVnode;
951
+ rootVnode.$elm$ = oldVNode.$elm$ = (hostElm.shadowRoot || hostElm );
952
+ {
953
+ scopeId = hostElm['s-sc'];
954
+ }
955
+ {
956
+ contentRef = hostElm['s-cr'];
957
+ useNativeShadowDom = supportsShadow && (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
958
+ // always reset
959
+ checkSlotFallbackVisibility = false;
960
+ }
961
+ // synchronous patch
962
+ patch(oldVNode, rootVnode);
963
+ {
964
+ // while we're moving nodes around existing nodes, temporarily disable
965
+ // the disconnectCallback from working
966
+ plt.$flags$ |= 1 /* isTmpDisconnected */;
967
+ if (checkSlotRelocate) {
968
+ relocateSlotContent(rootVnode.$elm$);
969
+ let relocateData;
970
+ let nodeToRelocate;
971
+ let orgLocationNode;
972
+ let parentNodeRef;
973
+ let insertBeforeNode;
974
+ let refNode;
975
+ let i = 0;
976
+ for (; i < relocateNodes.length; i++) {
977
+ relocateData = relocateNodes[i];
978
+ nodeToRelocate = relocateData.$nodeToRelocate$;
979
+ if (!nodeToRelocate['s-ol']) {
980
+ // add a reference node marking this node's original location
981
+ // keep a reference to this node for later lookups
982
+ orgLocationNode =
983
+ doc.createTextNode('');
984
+ orgLocationNode['s-nr'] = nodeToRelocate;
985
+ nodeToRelocate.parentNode.insertBefore((nodeToRelocate['s-ol'] = orgLocationNode), nodeToRelocate);
986
+ }
987
+ }
988
+ for (i = 0; i < relocateNodes.length; i++) {
989
+ relocateData = relocateNodes[i];
990
+ nodeToRelocate = relocateData.$nodeToRelocate$;
991
+ if (relocateData.$slotRefNode$) {
992
+ // by default we're just going to insert it directly
993
+ // after the slot reference node
994
+ parentNodeRef = relocateData.$slotRefNode$.parentNode;
995
+ insertBeforeNode = relocateData.$slotRefNode$.nextSibling;
996
+ orgLocationNode = nodeToRelocate['s-ol'];
997
+ while ((orgLocationNode = orgLocationNode.previousSibling)) {
998
+ refNode = orgLocationNode['s-nr'];
999
+ if (refNode && refNode['s-sn'] === nodeToRelocate['s-sn'] && parentNodeRef === refNode.parentNode) {
1000
+ refNode = refNode.nextSibling;
1001
+ if (!refNode || !refNode['s-nr']) {
1002
+ insertBeforeNode = refNode;
1003
+ break;
1004
+ }
1005
+ }
1006
+ }
1007
+ if ((!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode) ||
1008
+ nodeToRelocate.nextSibling !== insertBeforeNode) {
1009
+ // we've checked that it's worth while to relocate
1010
+ // since that the node to relocate
1011
+ // has a different next sibling or parent relocated
1012
+ if (nodeToRelocate !== insertBeforeNode) {
1013
+ if (!nodeToRelocate['s-hn'] && nodeToRelocate['s-ol']) {
1014
+ // probably a component in the index.html that doesn't have it's hostname set
1015
+ nodeToRelocate['s-hn'] = nodeToRelocate['s-ol'].parentNode.nodeName;
1016
+ }
1017
+ // add it back to the dom but in its new home
1018
+ parentNodeRef.insertBefore(nodeToRelocate, insertBeforeNode);
1019
+ }
1020
+ }
1021
+ }
1022
+ else {
1023
+ // this node doesn't have a slot home to go to, so let's hide it
1024
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1025
+ nodeToRelocate.hidden = true;
1026
+ }
1027
+ }
1028
+ }
1029
+ }
1030
+ if (checkSlotFallbackVisibility) {
1031
+ updateFallbackSlotVisibility(rootVnode.$elm$);
1032
+ }
1033
+ // done moving nodes around
1034
+ // allow the disconnect callback to work again
1035
+ plt.$flags$ &= ~1 /* isTmpDisconnected */;
1036
+ // always reset
1037
+ relocateNodes.length = 0;
1038
+ }
1039
+ };
1040
+ const getElement = (ref) => (ref);
1041
+ const createEvent = (ref, name, flags) => {
1042
+ const elm = getElement(ref);
1043
+ return {
1044
+ emit: (detail) => {
1045
+ return emitEvent(elm, name, {
1046
+ bubbles: !!(flags & 4 /* Bubbles */),
1047
+ composed: !!(flags & 2 /* Composed */),
1048
+ cancelable: !!(flags & 1 /* Cancellable */),
1049
+ detail,
1050
+ });
1051
+ },
1052
+ };
1053
+ };
1054
+ /**
1055
+ * Helper function to create & dispatch a custom Event on a provided target
1056
+ * @param elm the target of the Event
1057
+ * @param name the name to give the custom Event
1058
+ * @param opts options for configuring a custom Event
1059
+ * @returns the custom Event
1060
+ */
1061
+ const emitEvent = (elm, name, opts) => {
1062
+ const ev = plt.ce(name, opts);
1063
+ elm.dispatchEvent(ev);
1064
+ return ev;
1065
+ };
1066
+ const attachToAncestor = (hostRef, ancestorComponent) => {
1067
+ if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
1068
+ ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
1069
+ }
1070
+ };
1071
+ const scheduleUpdate = (hostRef, isInitialLoad) => {
1072
+ {
1073
+ hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
1074
+ }
1075
+ if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {
1076
+ hostRef.$flags$ |= 512 /* needsRerender */;
1077
+ return;
1078
+ }
1079
+ attachToAncestor(hostRef, hostRef.$ancestorComponent$);
1080
+ // there is no ancestor component or the ancestor component
1081
+ // has already fired off its lifecycle update then
1082
+ // fire off the initial update
1083
+ const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
1084
+ return writeTask(dispatch) ;
1085
+ };
1086
+ const dispatchHooks = (hostRef, isInitialLoad) => {
1087
+ const elm = hostRef.$hostElement$;
1088
+ const endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$);
1089
+ const instance = elm;
1090
+ let promise;
1091
+ if (isInitialLoad) {
1092
+ {
1093
+ promise = safeCall(instance, 'componentWillLoad');
1094
+ }
1095
+ }
1096
+ {
1097
+ promise = then(promise, () => safeCall(instance, 'componentWillRender'));
1098
+ }
1099
+ endSchedule();
1100
+ return then(promise, () => updateComponent(hostRef, instance, isInitialLoad));
1101
+ };
1102
+ const updateComponent = async (hostRef, instance, isInitialLoad) => {
1103
+ // updateComponent
1104
+ const elm = hostRef.$hostElement$;
1105
+ const endUpdate = createTime('update', hostRef.$cmpMeta$.$tagName$);
1106
+ const rc = elm['s-rc'];
1107
+ if (isInitialLoad) {
1108
+ // DOM WRITE!
1109
+ attachStyles(hostRef);
1110
+ }
1111
+ const endRender = createTime('render', hostRef.$cmpMeta$.$tagName$);
1112
+ {
1113
+ callRender(hostRef, instance);
1114
+ }
1115
+ if (rc) {
1116
+ // ok, so turns out there are some child host elements
1117
+ // waiting on this parent element to load
1118
+ // let's fire off all update callbacks waiting
1119
+ rc.map((cb) => cb());
1120
+ elm['s-rc'] = undefined;
1121
+ }
1122
+ endRender();
1123
+ endUpdate();
1124
+ {
1125
+ const childrenPromises = elm['s-p'];
1126
+ const postUpdate = () => postUpdateComponent(hostRef);
1127
+ if (childrenPromises.length === 0) {
1128
+ postUpdate();
1129
+ }
1130
+ else {
1131
+ Promise.all(childrenPromises).then(postUpdate);
1132
+ hostRef.$flags$ |= 4 /* isWaitingForChildren */;
1133
+ childrenPromises.length = 0;
1134
+ }
1135
+ }
1136
+ };
1137
+ const callRender = (hostRef, instance, elm) => {
1138
+ try {
1139
+ instance = instance.render() ;
1140
+ {
1141
+ hostRef.$flags$ &= ~16 /* isQueuedForUpdate */;
1142
+ }
1143
+ {
1144
+ hostRef.$flags$ |= 2 /* hasRendered */;
1145
+ }
1146
+ {
1147
+ {
1148
+ // looks like we've got child nodes to render into this host element
1149
+ // or we need to update the css class/attrs on the host element
1150
+ // DOM WRITE!
1151
+ {
1152
+ renderVdom(hostRef, instance);
1153
+ }
1154
+ }
1155
+ }
1156
+ }
1157
+ catch (e) {
1158
+ consoleError(e, hostRef.$hostElement$);
1159
+ }
1160
+ return null;
1161
+ };
1162
+ const postUpdateComponent = (hostRef) => {
1163
+ const tagName = hostRef.$cmpMeta$.$tagName$;
1164
+ const elm = hostRef.$hostElement$;
1165
+ const endPostUpdate = createTime('postUpdate', tagName);
1166
+ const instance = elm;
1167
+ const ancestorComponent = hostRef.$ancestorComponent$;
1168
+ {
1169
+ safeCall(instance, 'componentDidRender');
1170
+ }
1171
+ if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
1172
+ hostRef.$flags$ |= 64 /* hasLoadedComponent */;
1173
+ {
1174
+ // DOM WRITE!
1175
+ addHydratedFlag(elm);
1176
+ }
1177
+ {
1178
+ safeCall(instance, 'componentDidLoad');
1179
+ }
1180
+ endPostUpdate();
1181
+ {
1182
+ hostRef.$onReadyResolve$(elm);
1183
+ if (!ancestorComponent) {
1184
+ appDidLoad();
1185
+ }
1186
+ }
1187
+ }
1188
+ else {
1189
+ {
1190
+ safeCall(instance, 'componentDidUpdate');
1191
+ }
1192
+ endPostUpdate();
1193
+ }
1194
+ // load events fire from bottom to top
1195
+ // the deepest elements load first then bubbles up
1196
+ {
1197
+ if (hostRef.$onRenderResolve$) {
1198
+ hostRef.$onRenderResolve$();
1199
+ hostRef.$onRenderResolve$ = undefined;
1200
+ }
1201
+ if (hostRef.$flags$ & 512 /* needsRerender */) {
1202
+ nextTick(() => scheduleUpdate(hostRef, false));
1203
+ }
1204
+ hostRef.$flags$ &= ~(4 /* isWaitingForChildren */ | 512 /* needsRerender */);
1205
+ }
1206
+ // ( •_•)
1207
+ // ( •_•)>⌐■-■
1208
+ // (⌐■_■)
1209
+ };
1210
+ const appDidLoad = (who) => {
1211
+ // on appload
1212
+ // we have finish the first big initial render
1213
+ {
1214
+ addHydratedFlag(doc.documentElement);
1215
+ }
1216
+ nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
1217
+ };
1218
+ const safeCall = (instance, method, arg) => {
1219
+ if (instance && instance[method]) {
1220
+ try {
1221
+ return instance[method](arg);
1222
+ }
1223
+ catch (e) {
1224
+ consoleError(e);
1225
+ }
1226
+ }
1227
+ return undefined;
1228
+ };
1229
+ const then = (promise, thenFn) => {
1230
+ return promise && promise.then ? promise.then(thenFn) : thenFn();
1231
+ };
1232
+ const addHydratedFlag = (elm) => elm.classList.add('hydrated')
1233
+ ;
1234
+ /**
1235
+ * Parse a new property value for a given property type.
1236
+ *
1237
+ * While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
1238
+ * it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
1239
+ * 1. `any`, the type given to `propValue` in the function signature
1240
+ * 2. the type stored from `propType`.
1241
+ *
1242
+ * This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
1243
+ *
1244
+ * Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
1245
+ * a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
1246
+ * based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
1247
+ * ```tsx
1248
+ * <my-cmp prop-val={0}></my-cmp>
1249
+ * ```
1250
+ *
1251
+ * HTML prop values on the other hand, will always a string
1252
+ *
1253
+ * @param propValue the new value to coerce to some type
1254
+ * @param propType the type of the prop, expressed as a binary number
1255
+ * @returns the parsed/coerced value
1256
+ */
1257
+ const parsePropertyValue = (propValue, propType) => {
1258
+ // ensure this value is of the correct prop type
1259
+ if (propValue != null && !isComplexType(propValue)) {
1260
+ if (propType & 4 /* Boolean */) {
1261
+ // per the HTML spec, any string value means it is a boolean true value
1262
+ // but we'll cheat here and say that the string "false" is the boolean false
1263
+ return propValue === 'false' ? false : propValue === '' || !!propValue;
1264
+ }
1265
+ if (propType & 2 /* Number */) {
1266
+ // force it to be a number
1267
+ return parseFloat(propValue);
1268
+ }
1269
+ if (propType & 1 /* String */) {
1270
+ // could have been passed as a number or boolean
1271
+ // but we still want it as a string
1272
+ return String(propValue);
1273
+ }
1274
+ // redundant return here for better minification
1275
+ return propValue;
1276
+ }
1277
+ // not sure exactly what type we want
1278
+ // so no need to change to a different type
1279
+ return propValue;
1280
+ };
1281
+ const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
1282
+ const setValue = (ref, propName, newVal, cmpMeta) => {
1283
+ // check our new property value against our internal value
1284
+ const hostRef = getHostRef(ref);
1285
+ const elm = ref;
1286
+ const oldVal = hostRef.$instanceValues$.get(propName);
1287
+ const flags = hostRef.$flags$;
1288
+ const instance = elm;
1289
+ newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
1290
+ // explicitly check for NaN on both sides, as `NaN === NaN` is always false
1291
+ const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
1292
+ const didValueChange = newVal !== oldVal && !areBothNaN;
1293
+ if (didValueChange) {
1294
+ // gadzooks! the property's value has changed!!
1295
+ // set our new value!
1296
+ hostRef.$instanceValues$.set(propName, newVal);
1297
+ {
1298
+ // get an array of method names of watch functions to call
1299
+ if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
1300
+ const watchMethods = cmpMeta.$watchers$[propName];
1301
+ if (watchMethods) {
1302
+ // this instance is watching for when this property changed
1303
+ watchMethods.map((watchMethodName) => {
1304
+ try {
1305
+ // fire off each of the watch methods that are watching this property
1306
+ instance[watchMethodName](newVal, oldVal, propName);
1307
+ }
1308
+ catch (e) {
1309
+ consoleError(e, elm);
1310
+ }
1311
+ });
1312
+ }
1313
+ }
1314
+ if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
1315
+ // looks like this value actually changed, so we've got work to do!
1316
+ // but only if we've already rendered, otherwise just chill out
1317
+ // queue that we need to do an update, but don't worry about queuing
1318
+ // up millions cuz this function ensures it only runs once
1319
+ scheduleUpdate(hostRef, false);
1320
+ }
1321
+ }
1322
+ }
1323
+ };
1324
+ const proxyComponent = (Cstr, cmpMeta, flags) => {
1325
+ if (cmpMeta.$members$) {
1326
+ if (Cstr.watchers) {
1327
+ cmpMeta.$watchers$ = Cstr.watchers;
1328
+ }
1329
+ // It's better to have a const than two Object.entries()
1330
+ const members = Object.entries(cmpMeta.$members$);
1331
+ const prototype = Cstr.prototype;
1332
+ members.map(([memberName, [memberFlags]]) => {
1333
+ if ((memberFlags & 31 /* Prop */ ||
1334
+ (memberFlags & 32 /* State */))) {
1335
+ // proxyComponent - prop
1336
+ Object.defineProperty(prototype, memberName, {
1337
+ get() {
1338
+ // proxyComponent, get value
1339
+ return getValue(this, memberName);
1340
+ },
1341
+ set(newValue) {
1342
+ // proxyComponent, set value
1343
+ setValue(this, memberName, newValue, cmpMeta);
1344
+ },
1345
+ configurable: true,
1346
+ enumerable: true,
1347
+ });
1348
+ }
1349
+ });
1350
+ {
1351
+ const attrNameToPropName = new Map();
1352
+ prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
1353
+ plt.jmp(() => {
1354
+ const propName = attrNameToPropName.get(attrName);
1355
+ // In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
1356
+ // in the case where an attribute was set inline.
1357
+ // ```html
1358
+ // <my-component some-attribute="some-value"></my-component>
1359
+ // ```
1360
+ //
1361
+ // There is an edge case where a developer sets the attribute inline on a custom element and then
1362
+ // programmatically changes it before it has been upgraded as shown below:
1363
+ //
1364
+ // ```html
1365
+ // <!-- this component has _not_ been upgraded yet -->
1366
+ // <my-component id="test" some-attribute="some-value"></my-component>
1367
+ // <script>
1368
+ // // grab non-upgraded component
1369
+ // el = document.querySelector("#test");
1370
+ // el.someAttribute = "another-value";
1371
+ // // upgrade component
1372
+ // customElements.define('my-component', MyComponent);
1373
+ // </script>
1374
+ // ```
1375
+ // In this case if we do not unshadow here and use the value of the shadowing property, attributeChangedCallback
1376
+ // will be called with `newValue = "some-value"` and will set the shadowed property (this.someAttribute = "another-value")
1377
+ // to the value that was set inline i.e. "some-value" from above example. When
1378
+ // the connectedCallback attempts to unshadow it will use "some-value" as the initial value rather than "another-value"
1379
+ //
1380
+ // The case where the attribute was NOT set inline but was not set programmatically shall be handled/unshadowed
1381
+ // by connectedCallback as this attributeChangedCallback will not fire.
1382
+ //
1383
+ // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
1384
+ //
1385
+ // TODO(STENCIL-16) we should think about whether or not we actually want to be reflecting the attributes to
1386
+ // properties here given that this goes against best practices outlined here
1387
+ // https://developers.google.com/web/fundamentals/web-components/best-practices#avoid-reentrancy
1388
+ if (this.hasOwnProperty(propName)) {
1389
+ newValue = this[propName];
1390
+ delete this[propName];
1391
+ }
1392
+ else if (prototype.hasOwnProperty(propName) &&
1393
+ typeof this[propName] === 'number' &&
1394
+ this[propName] == newValue) {
1395
+ // if the propName exists on the prototype of `Cstr`, this update may be a result of Stencil using native
1396
+ // APIs to reflect props as attributes. Calls to `setAttribute(someElement, propName)` will result in
1397
+ // `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.
1398
+ return;
1399
+ }
1400
+ this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
1401
+ });
1402
+ };
1403
+ // create an array of attributes to observe
1404
+ // and also create a map of html attribute name to js property name
1405
+ Cstr.observedAttributes = members
1406
+ .filter(([_, m]) => m[0] & 15 /* HasAttribute */) // filter to only keep props that should match attributes
1407
+ .map(([propName, m]) => {
1408
+ const attrName = m[1] || propName;
1409
+ attrNameToPropName.set(attrName, propName);
1410
+ if (m[0] & 512 /* ReflectAttr */) {
1411
+ cmpMeta.$attrsToReflect$.push([propName, attrName]);
1412
+ }
1413
+ return attrName;
1414
+ });
1415
+ }
1416
+ }
1417
+ return Cstr;
1418
+ };
1419
+ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
1420
+ // initializeComponent
1421
+ if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
1422
+ {
1423
+ // sync constructor component
1424
+ Cstr = elm.constructor;
1425
+ hostRef.$flags$ |= 32 /* hasInitializedComponent */;
1426
+ // wait for the CustomElementRegistry to mark the component as ready before setting `isWatchReady`. Otherwise,
1427
+ // watchers may fire prematurely if `customElements.get()`/`customElements.whenDefined()` resolves _before_
1428
+ // Stencil has completed instantiating the component.
1429
+ customElements.whenDefined(cmpMeta.$tagName$).then(() => (hostRef.$flags$ |= 128 /* isWatchReady */));
1430
+ }
1431
+ if (Cstr.style) {
1432
+ // this component has styles but we haven't registered them yet
1433
+ let style = Cstr.style;
1434
+ const scopeId = getScopeId(cmpMeta);
1435
+ if (!styles.has(scopeId)) {
1436
+ const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);
1437
+ if (cmpMeta.$flags$ & 8 /* needsShadowDomShim */) {
1438
+ style = await import('./p-d4c234ed.js').then((m) => m.scopeCss(style, scopeId, false));
1439
+ }
1440
+ registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
1441
+ endRegisterStyles();
1442
+ }
1443
+ }
1444
+ }
1445
+ // we've successfully created a lazy instance
1446
+ const ancestorComponent = hostRef.$ancestorComponent$;
1447
+ const schedule = () => scheduleUpdate(hostRef, true);
1448
+ if (ancestorComponent && ancestorComponent['s-rc']) {
1449
+ // this is the initial load and this component it has an ancestor component
1450
+ // but the ancestor component has NOT fired its will update lifecycle yet
1451
+ // so let's just cool our jets and wait for the ancestor to continue first
1452
+ // this will get fired off when the ancestor component
1453
+ // finally gets around to rendering its lazy self
1454
+ // fire off the initial update
1455
+ ancestorComponent['s-rc'].push(schedule);
1456
+ }
1457
+ else {
1458
+ schedule();
1459
+ }
1460
+ };
1461
+ const connectedCallback = (elm) => {
1462
+ if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1463
+ const hostRef = getHostRef(elm);
1464
+ const cmpMeta = hostRef.$cmpMeta$;
1465
+ const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);
1466
+ if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
1467
+ // first time this component has connected
1468
+ hostRef.$flags$ |= 1 /* hasConnected */;
1469
+ {
1470
+ // initUpdate
1471
+ // if the slot polyfill is required we'll need to put some nodes
1472
+ // in here to act as original content anchors as we move nodes around
1473
+ // host element has been connected to the DOM
1474
+ if ((cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */))) {
1475
+ setContentReference(elm);
1476
+ }
1477
+ }
1478
+ {
1479
+ // find the first ancestor component (if there is one) and register
1480
+ // this component as one of the actively loading child components for its ancestor
1481
+ let ancestorComponent = elm;
1482
+ while ((ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host)) {
1483
+ // climb up the ancestors looking for the first
1484
+ // component that hasn't finished its lifecycle update yet
1485
+ if (ancestorComponent['s-p']) {
1486
+ // we found this components first ancestor component
1487
+ // keep a reference to this component's ancestor component
1488
+ attachToAncestor(hostRef, (hostRef.$ancestorComponent$ = ancestorComponent));
1489
+ break;
1490
+ }
1491
+ }
1492
+ }
1493
+ // Lazy properties
1494
+ // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
1495
+ if (cmpMeta.$members$) {
1496
+ Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
1497
+ if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
1498
+ const value = elm[memberName];
1499
+ delete elm[memberName];
1500
+ elm[memberName] = value;
1501
+ }
1502
+ });
1503
+ }
1504
+ {
1505
+ initializeComponent(elm, hostRef, cmpMeta);
1506
+ }
1507
+ }
1508
+ else {
1509
+ // not the first time this has connected
1510
+ // reattach any event listeners to the host
1511
+ // since they would have been removed when disconnected
1512
+ addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1513
+ }
1514
+ endConnected();
1515
+ }
1516
+ };
1517
+ const setContentReference = (elm) => {
1518
+ // only required when we're NOT using native shadow dom (slot)
1519
+ // or this browser doesn't support native shadow dom
1520
+ // and this host element was NOT created with SSR
1521
+ // let's pick out the inner content for slot projection
1522
+ // create a node to represent where the original
1523
+ // content was first placed, which is useful later on
1524
+ const contentRefElm = (elm['s-cr'] = doc.createComment(''));
1525
+ contentRefElm['s-cn'] = true;
1526
+ elm.insertBefore(contentRefElm, elm.firstChild);
1527
+ };
1528
+ const disconnectedCallback = (elm) => {
1529
+ if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1530
+ const hostRef = getHostRef(elm);
1531
+ {
1532
+ if (hostRef.$rmListeners$) {
1533
+ hostRef.$rmListeners$.map((rmListener) => rmListener());
1534
+ hostRef.$rmListeners$ = undefined;
1535
+ }
1536
+ }
1537
+ }
1538
+ };
1539
+ const proxyCustomElement = (Cstr, compactMeta) => {
1540
+ const cmpMeta = {
1541
+ $flags$: compactMeta[0],
1542
+ $tagName$: compactMeta[1],
1543
+ };
1544
+ {
1545
+ cmpMeta.$members$ = compactMeta[2];
1546
+ }
1547
+ {
1548
+ cmpMeta.$listeners$ = compactMeta[3];
1549
+ }
1550
+ {
1551
+ cmpMeta.$watchers$ = Cstr.$watchers$;
1552
+ }
1553
+ {
1554
+ cmpMeta.$attrsToReflect$ = [];
1555
+ }
1556
+ if (!supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
1557
+ cmpMeta.$flags$ |= 8 /* needsShadowDomShim */;
1558
+ }
1559
+ const originalConnectedCallback = Cstr.prototype.connectedCallback;
1560
+ const originalDisconnectedCallback = Cstr.prototype.disconnectedCallback;
1561
+ Object.assign(Cstr.prototype, {
1562
+ __registerHost() {
1563
+ registerHost(this, cmpMeta);
1564
+ },
1565
+ connectedCallback() {
1566
+ connectedCallback(this);
1567
+ if (originalConnectedCallback) {
1568
+ originalConnectedCallback.call(this);
1569
+ }
1570
+ },
1571
+ disconnectedCallback() {
1572
+ disconnectedCallback(this);
1573
+ if (originalDisconnectedCallback) {
1574
+ originalDisconnectedCallback.call(this);
1575
+ }
1576
+ },
1577
+ __attachShadow() {
1578
+ if (supportsShadow) {
1579
+ {
1580
+ this.attachShadow({
1581
+ mode: 'open',
1582
+ delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */),
1583
+ });
1584
+ }
1585
+ }
1586
+ else {
1587
+ this.shadowRoot = this;
1588
+ }
1589
+ },
1590
+ });
1591
+ Cstr.is = cmpMeta.$tagName$;
1592
+ return proxyComponent(Cstr, cmpMeta);
1593
+ };
1594
+ const setAssetPath = (path) => (plt.$resourcesUrl$ = path);
1595
+ const setPlatformOptions = (opts) => Object.assign(plt, opts);
1596
+ const Fragment = (_, children) => children;
1597
+ const hostRefs = new WeakMap();
1598
+ const getHostRef = (ref) => hostRefs.get(ref);
1599
+ const registerHost = (elm, cmpMeta) => {
1600
+ const hostRef = {
1601
+ $flags$: 0,
1602
+ $hostElement$: elm,
1603
+ $cmpMeta$: cmpMeta,
1604
+ $instanceValues$: new Map(),
1605
+ };
1606
+ {
1607
+ hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
1608
+ elm['s-p'] = [];
1609
+ elm['s-rc'] = [];
1610
+ }
1611
+ addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1612
+ return hostRefs.set(elm, hostRef);
1613
+ };
1614
+ const isMemberInElement = (elm, memberName) => memberName in elm;
1615
+ const consoleError = (e, el) => (0, console.error)(e, el);
1616
+ const styles = new Map();
1617
+ const queueDomReads = [];
1618
+ const queueDomWrites = [];
1619
+ const queueTask = (queue, write) => (cb) => {
1620
+ queue.push(cb);
1621
+ if (!queuePending) {
1622
+ queuePending = true;
1623
+ if (write && plt.$flags$ & 4 /* queueSync */) {
1624
+ nextTick(flush);
1625
+ }
1626
+ else {
1627
+ plt.raf(flush);
1628
+ }
1629
+ }
1630
+ };
1631
+ const consume = (queue) => {
1632
+ for (let i = 0; i < queue.length; i++) {
1633
+ try {
1634
+ queue[i](performance.now());
1635
+ }
1636
+ catch (e) {
1637
+ consoleError(e);
1638
+ }
1639
+ }
1640
+ queue.length = 0;
1641
+ };
1642
+ const flush = () => {
1643
+ // always force a bunch of medium callbacks to run, but still have
1644
+ // a throttle on how many can run in a certain time
1645
+ // DOM READS!!!
1646
+ consume(queueDomReads);
1647
+ // DOM WRITES!!!
1648
+ {
1649
+ consume(queueDomWrites);
1650
+ if ((queuePending = queueDomReads.length > 0)) {
1651
+ // still more to do yet, but we've run out of time
1652
+ // let's let this thing cool off and try again in the next tick
1653
+ plt.raf(flush);
1654
+ }
1655
+ }
1656
+ };
1657
+ const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
1658
+ const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
1659
+ const Build = {
1660
+ isDev: false,
1661
+ isBrowser: true,
1662
+ isServer: false,
1663
+ isTesting: false,
1664
+ };
1665
+
1666
+ export { Build as B, Env as E, Fragment as F, H, setPlatformOptions as a, Host as b, createEvent as c, h, proxyCustomElement as p, setAssetPath as s };