@pine-ds/core 1.1.0 → 1.3.0-dev.0

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 (957) hide show
  1. package/components/index.d.ts +2 -0
  2. package/components/pds-accordion.d.ts +0 -0
  3. package/components/pds-avatar.d.ts +0 -0
  4. package/components/pds-box.d.ts +0 -0
  5. package/components/pds-button.d.ts +0 -0
  6. package/components/pds-checkbox.d.ts +0 -0
  7. package/components/pds-chip.d.ts +0 -0
  8. package/components/pds-copytext.d.ts +0 -0
  9. package/components/pds-divider.d.ts +0 -0
  10. package/components/pds-image.d.ts +0 -0
  11. package/components/pds-input.d.ts +0 -0
  12. package/components/pds-link.d.ts +0 -0
  13. package/components/pds-loader.d.ts +11 -0
  14. package/components/pds-progress.d.ts +0 -0
  15. package/components/pds-radio.d.ts +0 -0
  16. package/components/pds-row.d.ts +0 -0
  17. package/components/pds-sortable-item.d.ts +0 -0
  18. package/components/pds-sortable.d.ts +0 -0
  19. package/components/pds-switch.d.ts +0 -0
  20. package/components/pds-tab.d.ts +0 -0
  21. package/components/pds-table-body.d.ts +0 -0
  22. package/components/pds-table-cell.d.ts +0 -0
  23. package/components/pds-table-head-cell.d.ts +0 -0
  24. package/components/pds-table-head.d.ts +0 -0
  25. package/components/pds-table-row.d.ts +0 -0
  26. package/components/pds-table.d.ts +0 -0
  27. package/components/pds-tabpanel.d.ts +0 -0
  28. package/components/pds-tabs.d.ts +0 -0
  29. package/components/pds-textarea.d.ts +0 -0
  30. package/components/pds-tooltip.d.ts +0 -0
  31. package/dist/docs.json +312 -70
  32. package/dist/pine-core/closest-d2d192be.js +11 -0
  33. package/dist/pine-core/closest-d2d192be.js.map +1 -0
  34. package/dist/pine-core/index-00e73f84.js +329 -0
  35. package/dist/pine-core/index-00e73f84.js.map +1 -0
  36. package/dist/{cjs/index-7d9c71f6.js → pine-core/index-cccc19b7.js} +1575 -213
  37. package/dist/pine-core/index-cccc19b7.js.map +1 -0
  38. package/dist/pine-core/index.esm.js +1 -0
  39. package/dist/pine-core/index.esm.js.map +1 -1
  40. package/dist/{esm → pine-core}/pds-accordion.entry.js +4 -5
  41. package/dist/pine-core/pds-accordion.entry.js.map +1 -0
  42. package/dist/{esm → pine-core}/pds-avatar.entry.js +6 -7
  43. package/dist/pine-core/pds-avatar.entry.js.map +1 -0
  44. package/dist/pine-core/pds-box.entry.js +77 -0
  45. package/dist/pine-core/pds-box.entry.js.map +1 -0
  46. package/dist/{esm → pine-core}/pds-button.entry.js +7 -5
  47. package/dist/pine-core/pds-button.entry.js.map +1 -0
  48. package/dist/pine-core/pds-checkbox.entry.js +70 -0
  49. package/dist/pine-core/pds-checkbox.entry.js.map +1 -0
  50. package/dist/pine-core/pds-chip.entry.js +46 -0
  51. package/dist/pine-core/pds-chip.entry.js.map +1 -0
  52. package/dist/{esm → pine-core}/pds-copytext.entry.js +4 -5
  53. package/dist/pine-core/pds-copytext.entry.js.map +1 -0
  54. package/dist/pine-core/pds-divider.entry.js +31 -0
  55. package/dist/pine-core/pds-divider.entry.js.map +1 -0
  56. package/dist/{esm → pine-core}/pds-image.entry.js +2 -3
  57. package/dist/pine-core/pds-image.entry.js.map +1 -0
  58. package/dist/{esm → pine-core}/pds-input.entry.js +4 -5
  59. package/dist/pine-core/pds-input.entry.js.map +1 -0
  60. package/dist/{esm/pds-label-d7e11551.js → pine-core/pds-label-7201663d.js} +2 -2
  61. package/dist/{esm/pds-label-d7e11551.js.map → pine-core/pds-label-7201663d.js.map} +1 -1
  62. package/dist/{esm → pine-core}/pds-link.entry.js +4 -5
  63. package/dist/pine-core/pds-link.entry.js.map +1 -0
  64. package/dist/pine-core/pds-loader.entry.js +44 -0
  65. package/dist/pine-core/pds-loader.entry.js.map +1 -0
  66. package/dist/pine-core/pds-progress.entry.js +23 -0
  67. package/dist/pine-core/pds-progress.entry.js.map +1 -0
  68. package/dist/pine-core/pds-radio.entry.js +49 -0
  69. package/dist/pine-core/pds-radio.entry.js.map +1 -0
  70. package/dist/pine-core/pds-row.entry.js +46 -0
  71. package/dist/pine-core/pds-row.entry.js.map +1 -0
  72. package/dist/pine-core/pds-sortable-item.entry.js +30 -0
  73. package/dist/pine-core/pds-sortable-item.entry.js.map +1 -0
  74. package/dist/{esm → pine-core}/pds-sortable.entry.js +705 -5
  75. package/dist/pine-core/pds-sortable.entry.js.map +1 -0
  76. package/dist/pine-core/pds-switch.entry.js +51 -0
  77. package/dist/pine-core/pds-switch.entry.js.map +1 -0
  78. package/dist/pine-core/pds-tab.entry.js +29 -0
  79. package/dist/pine-core/pds-tab.entry.js.map +1 -0
  80. package/dist/pine-core/pds-table-body.entry.js +17 -0
  81. package/dist/pine-core/pds-table-body.entry.js.map +1 -0
  82. package/{components/pds-table-cell2.js → dist/pine-core/pds-table-cell.entry.js} +12 -31
  83. package/dist/pine-core/pds-table-cell.entry.js.map +1 -0
  84. package/dist/{esm → pine-core}/pds-table-head-cell.entry.js +7 -7
  85. package/dist/pine-core/pds-table-head-cell.entry.js.map +1 -0
  86. package/dist/pine-core/pds-table-head.entry.js +50 -0
  87. package/dist/pine-core/pds-table-head.entry.js.map +1 -0
  88. package/dist/pine-core/pds-table-row.entry.js +61 -0
  89. package/dist/pine-core/pds-table-row.entry.js.map +1 -0
  90. package/dist/{esm → pine-core}/pds-table.entry.js +28 -5
  91. package/dist/pine-core/pds-table.entry.js.map +1 -0
  92. package/dist/{esm → pine-core}/pds-tabpanel.entry.js +3 -4
  93. package/dist/pine-core/pds-tabpanel.entry.js.map +1 -0
  94. package/dist/{esm → pine-core}/pds-tabs.entry.js +4 -5
  95. package/dist/pine-core/pds-tabs.entry.js.map +1 -0
  96. package/dist/{esm → pine-core}/pds-textarea.entry.js +8 -9
  97. package/dist/pine-core/pds-textarea.entry.js.map +1 -0
  98. package/dist/{esm → pine-core}/pds-tooltip.entry.js +5 -6
  99. package/dist/pine-core/pds-tooltip.entry.js.map +1 -0
  100. package/dist/pine-core/pine-core.css +180 -1
  101. package/dist/pine-core/pine-core.esm.js +52 -1
  102. package/dist/pine-core/pine-core.esm.js.map +1 -1
  103. package/dist/pine-core/shadow-css-2e0fed52.js +478 -0
  104. package/dist/pine-core/shadow-css-2e0fed52.js.map +1 -0
  105. package/dist/types/components/pds-checkbox/pds-checkbox.d.ts +4 -1
  106. package/dist/types/components/pds-loader/pds-loader.d.ts +24 -0
  107. package/dist/types/components/pds-table/pds-table-cell/pds-table-cell.d.ts +1 -1
  108. package/dist/types/components/pds-table/pds-table-head/pds-table-head.d.ts +18 -1
  109. package/dist/types/components/pds-table/pds-table-head-cell/pds-table-head-cell.d.ts +5 -1
  110. package/dist/types/components/pds-table/pds-table-row/pds-table-row.d.ts +12 -6
  111. package/dist/types/components/pds-table/pds-table.d.ts +21 -1
  112. package/dist/types/components.d.ts +133 -1
  113. package/dist/types/utils/closest.d.ts +1 -0
  114. package/hydrate/index.js +241 -248
  115. package/hydrate/package.json +0 -0
  116. package/package.json +2 -2
  117. package/components/index.js +0 -32
  118. package/components/index.js.map +0 -1
  119. package/components/index2.js +0 -14
  120. package/components/index2.js.map +0 -1
  121. package/components/pds-accordion.js +0 -68
  122. package/components/pds-accordion.js.map +0 -1
  123. package/components/pds-avatar.js +0 -103
  124. package/components/pds-avatar.js.map +0 -1
  125. package/components/pds-box.js +0 -124
  126. package/components/pds-box.js.map +0 -1
  127. package/components/pds-button.js +0 -8
  128. package/components/pds-button.js.map +0 -1
  129. package/components/pds-button2.js +0 -84
  130. package/components/pds-button2.js.map +0 -1
  131. package/components/pds-checkbox.js +0 -8
  132. package/components/pds-checkbox.js.map +0 -1
  133. package/components/pds-checkbox2.js +0 -86
  134. package/components/pds-checkbox2.js.map +0 -1
  135. package/components/pds-chip.js +0 -78
  136. package/components/pds-chip.js.map +0 -1
  137. package/components/pds-copytext.js +0 -88
  138. package/components/pds-copytext.js.map +0 -1
  139. package/components/pds-divider.js +0 -54
  140. package/components/pds-divider.js.map +0 -1
  141. package/components/pds-icon.js +0 -8
  142. package/components/pds-icon.js.map +0 -1
  143. package/components/pds-icon2.js +0 -359
  144. package/components/pds-icon2.js.map +0 -1
  145. package/components/pds-image.js +0 -55
  146. package/components/pds-image.js.map +0 -1
  147. package/components/pds-input.js +0 -72
  148. package/components/pds-input.js.map +0 -1
  149. package/components/pds-label.js +0 -39
  150. package/components/pds-label.js.map +0 -1
  151. package/components/pds-link.js +0 -65
  152. package/components/pds-link.js.map +0 -1
  153. package/components/pds-progress.js +0 -49
  154. package/components/pds-progress.js.map +0 -1
  155. package/components/pds-radio.js +0 -78
  156. package/components/pds-radio.js.map +0 -1
  157. package/components/pds-row.js +0 -72
  158. package/components/pds-row.js.map +0 -1
  159. package/components/pds-sortable-item.js +0 -58
  160. package/components/pds-sortable-item.js.map +0 -1
  161. package/components/pds-sortable.js +0 -2722
  162. package/components/pds-sortable.js.map +0 -1
  163. package/components/pds-switch.js +0 -82
  164. package/components/pds-switch.js.map +0 -1
  165. package/components/pds-tab.js +0 -53
  166. package/components/pds-tab.js.map +0 -1
  167. package/components/pds-table-body.js +0 -36
  168. package/components/pds-table-body.js.map +0 -1
  169. package/components/pds-table-cell.js +0 -8
  170. package/components/pds-table-cell.js.map +0 -1
  171. package/components/pds-table-cell2.js.map +0 -1
  172. package/components/pds-table-head-cell.js +0 -8
  173. package/components/pds-table-head-cell.js.map +0 -1
  174. package/components/pds-table-head-cell2.js +0 -96
  175. package/components/pds-table-head-cell2.js.map +0 -1
  176. package/components/pds-table-head.js +0 -56
  177. package/components/pds-table-head.js.map +0 -1
  178. package/components/pds-table-row.js +0 -78
  179. package/components/pds-table-row.js.map +0 -1
  180. package/components/pds-table.js +0 -100
  181. package/components/pds-table.js.map +0 -1
  182. package/components/pds-tabpanel.js +0 -45
  183. package/components/pds-tabpanel.js.map +0 -1
  184. package/components/pds-tabs.js +0 -119
  185. package/components/pds-tabs.js.map +0 -1
  186. package/components/pds-textarea.js +0 -82
  187. package/components/pds-textarea.js.map +0 -1
  188. package/components/pds-tooltip.js +0 -178
  189. package/components/pds-tooltip.js.map +0 -1
  190. package/dist/cjs/app-globals-3a1e7e63.js +0 -7
  191. package/dist/cjs/app-globals-3a1e7e63.js.map +0 -1
  192. package/dist/cjs/index-33465846.js +0 -24
  193. package/dist/cjs/index-33465846.js.map +0 -1
  194. package/dist/cjs/index-7d9c71f6.js.map +0 -1
  195. package/dist/cjs/index.cjs.js +0 -4
  196. package/dist/cjs/index.cjs.js.map +0 -1
  197. package/dist/cjs/loader.cjs.js +0 -17
  198. package/dist/cjs/loader.cjs.js.map +0 -1
  199. package/dist/cjs/pds-accordion.cjs.entry.js +0 -43
  200. package/dist/cjs/pds-accordion.cjs.entry.js.map +0 -1
  201. package/dist/cjs/pds-avatar.cjs.entry.js +0 -75
  202. package/dist/cjs/pds-avatar.cjs.entry.js.map +0 -1
  203. package/dist/cjs/pds-box.cjs.entry.js +0 -82
  204. package/dist/cjs/pds-box.cjs.entry.js.map +0 -1
  205. package/dist/cjs/pds-button.cjs.entry.js +0 -59
  206. package/dist/cjs/pds-button.cjs.entry.js.map +0 -1
  207. package/dist/cjs/pds-checkbox_2.cjs.entry.js +0 -112
  208. package/dist/cjs/pds-checkbox_2.cjs.entry.js.map +0 -1
  209. package/dist/cjs/pds-chip.cjs.entry.js +0 -51
  210. package/dist/cjs/pds-chip.cjs.entry.js.map +0 -1
  211. package/dist/cjs/pds-copytext.cjs.entry.js +0 -56
  212. package/dist/cjs/pds-copytext.cjs.entry.js.map +0 -1
  213. package/dist/cjs/pds-divider.cjs.entry.js +0 -36
  214. package/dist/cjs/pds-divider.cjs.entry.js.map +0 -1
  215. package/dist/cjs/pds-icon.cjs.entry.js +0 -335
  216. package/dist/cjs/pds-icon.cjs.entry.js.map +0 -1
  217. package/dist/cjs/pds-image.cjs.entry.js +0 -32
  218. package/dist/cjs/pds-image.cjs.entry.js.map +0 -1
  219. package/dist/cjs/pds-input.cjs.entry.js +0 -45
  220. package/dist/cjs/pds-input.cjs.entry.js.map +0 -1
  221. package/dist/cjs/pds-label-5ebae56e.js +0 -44
  222. package/dist/cjs/pds-label-5ebae56e.js.map +0 -1
  223. package/dist/cjs/pds-link.cjs.entry.js +0 -39
  224. package/dist/cjs/pds-link.cjs.entry.js.map +0 -1
  225. package/dist/cjs/pds-progress.cjs.entry.js +0 -28
  226. package/dist/cjs/pds-progress.cjs.entry.js.map +0 -1
  227. package/dist/cjs/pds-radio.cjs.entry.js +0 -54
  228. package/dist/cjs/pds-radio.cjs.entry.js.map +0 -1
  229. package/dist/cjs/pds-row.cjs.entry.js +0 -51
  230. package/dist/cjs/pds-row.cjs.entry.js.map +0 -1
  231. package/dist/cjs/pds-sortable-item.cjs.entry.js +0 -35
  232. package/dist/cjs/pds-sortable-item.cjs.entry.js.map +0 -1
  233. package/dist/cjs/pds-sortable.cjs.entry.js +0 -2704
  234. package/dist/cjs/pds-sortable.cjs.entry.js.map +0 -1
  235. package/dist/cjs/pds-switch.cjs.entry.js +0 -56
  236. package/dist/cjs/pds-switch.cjs.entry.js.map +0 -1
  237. package/dist/cjs/pds-tab.cjs.entry.js +0 -34
  238. package/dist/cjs/pds-tab.cjs.entry.js.map +0 -1
  239. package/dist/cjs/pds-table-body.cjs.entry.js +0 -22
  240. package/dist/cjs/pds-table-body.cjs.entry.js.map +0 -1
  241. package/dist/cjs/pds-table-head-cell.cjs.entry.js +0 -75
  242. package/dist/cjs/pds-table-head-cell.cjs.entry.js.map +0 -1
  243. package/dist/cjs/pds-table-head.cjs.entry.js +0 -30
  244. package/dist/cjs/pds-table-head.cjs.entry.js.map +0 -1
  245. package/dist/cjs/pds-table-row.cjs.entry.js +0 -50
  246. package/dist/cjs/pds-table-row.cjs.entry.js.map +0 -1
  247. package/dist/cjs/pds-table.cjs.entry.js +0 -78
  248. package/dist/cjs/pds-table.cjs.entry.js.map +0 -1
  249. package/dist/cjs/pds-tabpanel.cjs.entry.js +0 -27
  250. package/dist/cjs/pds-tabpanel.cjs.entry.js.map +0 -1
  251. package/dist/cjs/pds-tabs.cjs.entry.js +0 -99
  252. package/dist/cjs/pds-tabs.cjs.entry.js.map +0 -1
  253. package/dist/cjs/pds-textarea.cjs.entry.js +0 -55
  254. package/dist/cjs/pds-textarea.cjs.entry.js.map +0 -1
  255. package/dist/cjs/pds-tooltip.cjs.entry.js +0 -152
  256. package/dist/cjs/pds-tooltip.cjs.entry.js.map +0 -1
  257. package/dist/cjs/pine-core.cjs.js +0 -27
  258. package/dist/cjs/pine-core.cjs.js.map +0 -1
  259. package/dist/collection/collection-manifest.json +0 -46
  260. package/dist/collection/components/_internal/pds-label/pds-label.js +0 -7
  261. package/dist/collection/components/_internal/pds-label/pds-label.js.map +0 -1
  262. package/dist/collection/components/pds-accordion/pds-accordion.css +0 -65
  263. package/dist/collection/components/pds-accordion/pds-accordion.js +0 -94
  264. package/dist/collection/components/pds-accordion/pds-accordion.js.map +0 -1
  265. package/dist/collection/components/pds-accordion/stories/pds-accordion.stories.js +0 -34
  266. package/dist/collection/components/pds-avatar/pds-avatar.css +0 -65
  267. package/dist/collection/components/pds-avatar/pds-avatar.js +0 -224
  268. package/dist/collection/components/pds-avatar/pds-avatar.js.map +0 -1
  269. package/dist/collection/components/pds-avatar/stories/pds-avatar.stories.js +0 -65
  270. package/dist/collection/components/pds-box/pds-box.css +0 -1234
  271. package/dist/collection/components/pds-box/pds-box.js +0 -678
  272. package/dist/collection/components/pds-box/pds-box.js.map +0 -1
  273. package/dist/collection/components/pds-box/stories/pds-box.stories.js +0 -50
  274. package/dist/collection/components/pds-button/pds-button.css +0 -131
  275. package/dist/collection/components/pds-button/pds-button.js +0 -193
  276. package/dist/collection/components/pds-button/pds-button.js.map +0 -1
  277. package/dist/collection/components/pds-button/stories/pds-button.stories.js +0 -66
  278. package/dist/collection/components/pds-checkbox/checkbox-interface.js +0 -2
  279. package/dist/collection/components/pds-checkbox/checkbox-interface.js.map +0 -1
  280. package/dist/collection/components/pds-checkbox/pds-checkbox.css +0 -121
  281. package/dist/collection/components/pds-checkbox/pds-checkbox.js +0 -293
  282. package/dist/collection/components/pds-checkbox/pds-checkbox.js.map +0 -1
  283. package/dist/collection/components/pds-checkbox/stories/pds-checkbox.stories.js +0 -82
  284. package/dist/collection/components/pds-chip/pds-chip.css +0 -239
  285. package/dist/collection/components/pds-chip/pds-chip.js +0 -189
  286. package/dist/collection/components/pds-chip/pds-chip.js.map +0 -1
  287. package/dist/collection/components/pds-chip/stories/pds-chip.stories.js +0 -79
  288. package/dist/collection/components/pds-copytext/pds-copytext.css +0 -87
  289. package/dist/collection/components/pds-copytext/pds-copytext.js +0 -173
  290. package/dist/collection/components/pds-copytext/pds-copytext.js.map +0 -1
  291. package/dist/collection/components/pds-copytext/stories/pds-copytext.stories.js +0 -57
  292. package/dist/collection/components/pds-divider/pds-divider.css +0 -92
  293. package/dist/collection/components/pds-divider/pds-divider.js +0 -94
  294. package/dist/collection/components/pds-divider/pds-divider.js.map +0 -1
  295. package/dist/collection/components/pds-divider/stories/pds-divider.stories.js +0 -25
  296. package/dist/collection/components/pds-icon/stories/pds-icon.stories.js +0 -16
  297. package/dist/collection/components/pds-image/pds-image.css +0 -13
  298. package/dist/collection/components/pds-image/pds-image.js +0 -173
  299. package/dist/collection/components/pds-image/pds-image.js.map +0 -1
  300. package/dist/collection/components/pds-image/stories/pds-image.stories.js +0 -35
  301. package/dist/collection/components/pds-input/pds-input.css +0 -92
  302. package/dist/collection/components/pds-input/pds-input.js +0 -279
  303. package/dist/collection/components/pds-input/pds-input.js.map +0 -1
  304. package/dist/collection/components/pds-input/stories/pds-input.stories.js +0 -110
  305. package/dist/collection/components/pds-link/pds-link.css +0 -68
  306. package/dist/collection/components/pds-link/pds-link.js +0 -140
  307. package/dist/collection/components/pds-link/pds-link.js.map +0 -1
  308. package/dist/collection/components/pds-link/stories/pds-link.stories.js +0 -49
  309. package/dist/collection/components/pds-progress/pds-progress.css +0 -79
  310. package/dist/collection/components/pds-progress/pds-progress.js +0 -148
  311. package/dist/collection/components/pds-progress/pds-progress.js.map +0 -1
  312. package/dist/collection/components/pds-progress/stories/pds-progress.stories.js +0 -65
  313. package/dist/collection/components/pds-radio/pds-radio.css +0 -104
  314. package/dist/collection/components/pds-radio/pds-radio.js +0 -261
  315. package/dist/collection/components/pds-radio/pds-radio.js.map +0 -1
  316. package/dist/collection/components/pds-radio/stories/pds-radio.stories.js +0 -71
  317. package/dist/collection/components/pds-row/pds-row.css +0 -78
  318. package/dist/collection/components/pds-row/pds-row.js +0 -186
  319. package/dist/collection/components/pds-row/pds-row.js.map +0 -1
  320. package/dist/collection/components/pds-row/stories/pds-row.stories.js +0 -75
  321. package/dist/collection/components/pds-sortable/pds-sortable-item/pds-sortable-item.css +0 -63
  322. package/dist/collection/components/pds-sortable/pds-sortable-item/pds-sortable-item.js +0 -100
  323. package/dist/collection/components/pds-sortable/pds-sortable-item/pds-sortable-item.js.map +0 -1
  324. package/dist/collection/components/pds-sortable/pds-sortable-item/stories/pds-sortable-item.stories.js +0 -24
  325. package/dist/collection/components/pds-sortable/pds-sortable.css +0 -10
  326. package/dist/collection/components/pds-sortable/pds-sortable.js +0 -150
  327. package/dist/collection/components/pds-sortable/pds-sortable.js.map +0 -1
  328. package/dist/collection/components/pds-sortable/sortable-interface.js +0 -2
  329. package/dist/collection/components/pds-sortable/sortable-interface.js.map +0 -1
  330. package/dist/collection/components/pds-sortable/stories/pds-sortable.stories.js +0 -130
  331. package/dist/collection/components/pds-switch/pds-switch.css +0 -136
  332. package/dist/collection/components/pds-switch/pds-switch.js +0 -277
  333. package/dist/collection/components/pds-switch/pds-switch.js.map +0 -1
  334. package/dist/collection/components/pds-switch/stories/pds-switch.stories.js +0 -102
  335. package/dist/collection/components/pds-table/pds-table-body/pds-table-body.css +0 -5
  336. package/dist/collection/components/pds-table/pds-table-body/pds-table-body.js +0 -19
  337. package/dist/collection/components/pds-table/pds-table-body/pds-table-body.js.map +0 -1
  338. package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.css +0 -45
  339. package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.js +0 -83
  340. package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.js.map +0 -1
  341. package/dist/collection/components/pds-table/pds-table-cell/stories/pds-table-cell.stories.js +0 -26
  342. package/dist/collection/components/pds-table/pds-table-head/pds-table-head.css +0 -18
  343. package/dist/collection/components/pds-table/pds-table-head/pds-table-head.js +0 -27
  344. package/dist/collection/components/pds-table/pds-table-head/pds-table-head.js.map +0 -1
  345. package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.css +0 -54
  346. package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.js +0 -118
  347. package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.js.map +0 -1
  348. package/dist/collection/components/pds-table/pds-table-head-cell/stories/pds-table-head-cell.stories.js +0 -24
  349. package/dist/collection/components/pds-table/pds-table-row/pds-table-row.css +0 -22
  350. package/dist/collection/components/pds-table/pds-table-row/pds-table-row.js +0 -71
  351. package/dist/collection/components/pds-table/pds-table-row/pds-table-row.js.map +0 -1
  352. package/dist/collection/components/pds-table/pds-table-row/stories/pds-table-row.stories.js +0 -26
  353. package/dist/collection/components/pds-table/pds-table.css +0 -21
  354. package/dist/collection/components/pds-table/pds-table.js +0 -181
  355. package/dist/collection/components/pds-table/pds-table.js.map +0 -1
  356. package/dist/collection/components/pds-table/stories/pds-table.stories.js +0 -227
  357. package/dist/collection/components/pds-tabs/pds-tab/pds-tab.css +0 -160
  358. package/dist/collection/components/pds-tabs/pds-tab/pds-tab.js +0 -154
  359. package/dist/collection/components/pds-tabs/pds-tab/pds-tab.js.map +0 -1
  360. package/dist/collection/components/pds-tabs/pds-tabpanel/pds-tabpanel.css +0 -12
  361. package/dist/collection/components/pds-tabs/pds-tabpanel/pds-tabpanel.js +0 -107
  362. package/dist/collection/components/pds-tabs/pds-tabpanel/pds-tabpanel.js.map +0 -1
  363. package/dist/collection/components/pds-tabs/pds-tabs.css +0 -29
  364. package/dist/collection/components/pds-tabs/pds-tabs.js +0 -209
  365. package/dist/collection/components/pds-tabs/pds-tabs.js.map +0 -1
  366. package/dist/collection/components/pds-tabs/stories/pds-tabs.stories.js +0 -63
  367. package/dist/collection/components/pds-textarea/pds-textarea.css +0 -88
  368. package/dist/collection/components/pds-textarea/pds-textarea.js +0 -303
  369. package/dist/collection/components/pds-textarea/pds-textarea.js.map +0 -1
  370. package/dist/collection/components/pds-textarea/stories/pds-textarea.stories.js +0 -111
  371. package/dist/collection/components/pds-textarea/textarea-interface.js +0 -2
  372. package/dist/collection/components/pds-textarea/textarea-interface.js.map +0 -1
  373. package/dist/collection/components/pds-tooltip/pds-tooltip.css +0 -147
  374. package/dist/collection/components/pds-tooltip/pds-tooltip.js +0 -287
  375. package/dist/collection/components/pds-tooltip/pds-tooltip.js.map +0 -1
  376. package/dist/collection/components/pds-tooltip/stories/pds-tooltip.stories.js +0 -103
  377. package/dist/collection/global/pine-ui-global.js +0 -2
  378. package/dist/collection/global/pine-ui-global.js.map +0 -1
  379. package/dist/collection/index.js +0 -2
  380. package/dist/collection/index.js.map +0 -1
  381. package/dist/collection/stories/_helpers/index.js +0 -15
  382. package/dist/collection/stories/_helpers/index.js.map +0 -1
  383. package/dist/collection/utils/form.js +0 -28
  384. package/dist/collection/utils/form.js.map +0 -1
  385. package/dist/collection/utils/overlay.js +0 -68
  386. package/dist/collection/utils/overlay.js.map +0 -1
  387. package/dist/collection/utils/types.js +0 -2
  388. package/dist/collection/utils/types.js.map +0 -1
  389. package/dist/collection/utils/utils.js +0 -7
  390. package/dist/collection/utils/utils.js.map +0 -1
  391. package/dist/esm/index-6f0bb1b9.js +0 -2792
  392. package/dist/esm/index-6f0bb1b9.js.map +0 -1
  393. package/dist/esm/index-bdeab80c.js +0 -14
  394. package/dist/esm/index-bdeab80c.js.map +0 -1
  395. package/dist/esm/index.js +0 -3
  396. package/dist/esm/index.js.map +0 -1
  397. package/dist/esm/loader.js +0 -13
  398. package/dist/esm/loader.js.map +0 -1
  399. package/dist/esm/pds-accordion.entry.js.map +0 -1
  400. package/dist/esm/pds-avatar.entry.js.map +0 -1
  401. package/dist/esm/pds-box.entry.js +0 -78
  402. package/dist/esm/pds-box.entry.js.map +0 -1
  403. package/dist/esm/pds-button.entry.js.map +0 -1
  404. package/dist/esm/pds-checkbox_2.entry.js +0 -107
  405. package/dist/esm/pds-checkbox_2.entry.js.map +0 -1
  406. package/dist/esm/pds-chip.entry.js +0 -47
  407. package/dist/esm/pds-chip.entry.js.map +0 -1
  408. package/dist/esm/pds-copytext.entry.js.map +0 -1
  409. package/dist/esm/pds-divider.entry.js +0 -32
  410. package/dist/esm/pds-divider.entry.js.map +0 -1
  411. package/dist/esm/pds-icon.entry.js +0 -331
  412. package/dist/esm/pds-icon.entry.js.map +0 -1
  413. package/dist/esm/pds-image.entry.js.map +0 -1
  414. package/dist/esm/pds-input.entry.js.map +0 -1
  415. package/dist/esm/pds-link.entry.js.map +0 -1
  416. package/dist/esm/pds-progress.entry.js +0 -24
  417. package/dist/esm/pds-progress.entry.js.map +0 -1
  418. package/dist/esm/pds-radio.entry.js +0 -50
  419. package/dist/esm/pds-radio.entry.js.map +0 -1
  420. package/dist/esm/pds-row.entry.js +0 -47
  421. package/dist/esm/pds-row.entry.js.map +0 -1
  422. package/dist/esm/pds-sortable-item.entry.js +0 -31
  423. package/dist/esm/pds-sortable-item.entry.js.map +0 -1
  424. package/dist/esm/pds-sortable.entry.js.map +0 -1
  425. package/dist/esm/pds-switch.entry.js +0 -52
  426. package/dist/esm/pds-switch.entry.js.map +0 -1
  427. package/dist/esm/pds-tab.entry.js +0 -30
  428. package/dist/esm/pds-tab.entry.js.map +0 -1
  429. package/dist/esm/pds-table-body.entry.js +0 -18
  430. package/dist/esm/pds-table-body.entry.js.map +0 -1
  431. package/dist/esm/pds-table-head-cell.entry.js.map +0 -1
  432. package/dist/esm/pds-table-head.entry.js +0 -26
  433. package/dist/esm/pds-table-head.entry.js.map +0 -1
  434. package/dist/esm/pds-table-row.entry.js +0 -46
  435. package/dist/esm/pds-table-row.entry.js.map +0 -1
  436. package/dist/esm/pds-table.entry.js.map +0 -1
  437. package/dist/esm/pds-tabpanel.entry.js.map +0 -1
  438. package/dist/esm/pds-tabs.entry.js.map +0 -1
  439. package/dist/esm/pds-textarea.entry.js.map +0 -1
  440. package/dist/esm/pds-tooltip.entry.js.map +0 -1
  441. package/dist/esm/pine-core.js +0 -22
  442. package/dist/esm/pine-core.js.map +0 -1
  443. package/dist/esm/polyfills/core-js.js +0 -11
  444. package/dist/esm/polyfills/dom.js +0 -79
  445. package/dist/esm/polyfills/es5-html-element.js +0 -1
  446. package/dist/esm/polyfills/index.js +0 -34
  447. package/dist/esm/polyfills/system.js +0 -6
  448. package/dist/esm-es5/app-globals-0f993ce5.js +0 -2
  449. package/dist/esm-es5/app-globals-0f993ce5.js.map +0 -1
  450. package/dist/esm-es5/index-6f0bb1b9.js +0 -3
  451. package/dist/esm-es5/index-6f0bb1b9.js.map +0 -1
  452. package/dist/esm-es5/index-bdeab80c.js +0 -2
  453. package/dist/esm-es5/index-bdeab80c.js.map +0 -1
  454. package/dist/esm-es5/index.js +0 -2
  455. package/dist/esm-es5/index.js.map +0 -1
  456. package/dist/esm-es5/loader.js +0 -2
  457. package/dist/esm-es5/loader.js.map +0 -1
  458. package/dist/esm-es5/pds-accordion.entry.js +0 -2
  459. package/dist/esm-es5/pds-accordion.entry.js.map +0 -1
  460. package/dist/esm-es5/pds-avatar.entry.js +0 -2
  461. package/dist/esm-es5/pds-avatar.entry.js.map +0 -1
  462. package/dist/esm-es5/pds-box.entry.js +0 -2
  463. package/dist/esm-es5/pds-box.entry.js.map +0 -1
  464. package/dist/esm-es5/pds-button.entry.js +0 -2
  465. package/dist/esm-es5/pds-button.entry.js.map +0 -1
  466. package/dist/esm-es5/pds-checkbox_2.entry.js +0 -2
  467. package/dist/esm-es5/pds-checkbox_2.entry.js.map +0 -1
  468. package/dist/esm-es5/pds-chip.entry.js +0 -2
  469. package/dist/esm-es5/pds-chip.entry.js.map +0 -1
  470. package/dist/esm-es5/pds-copytext.entry.js +0 -2
  471. package/dist/esm-es5/pds-copytext.entry.js.map +0 -1
  472. package/dist/esm-es5/pds-divider.entry.js +0 -2
  473. package/dist/esm-es5/pds-divider.entry.js.map +0 -1
  474. package/dist/esm-es5/pds-icon.entry.js +0 -2
  475. package/dist/esm-es5/pds-icon.entry.js.map +0 -1
  476. package/dist/esm-es5/pds-image.entry.js +0 -2
  477. package/dist/esm-es5/pds-image.entry.js.map +0 -1
  478. package/dist/esm-es5/pds-input.entry.js +0 -2
  479. package/dist/esm-es5/pds-input.entry.js.map +0 -1
  480. package/dist/esm-es5/pds-label-d7e11551.js +0 -2
  481. package/dist/esm-es5/pds-label-d7e11551.js.map +0 -1
  482. package/dist/esm-es5/pds-link.entry.js +0 -2
  483. package/dist/esm-es5/pds-link.entry.js.map +0 -1
  484. package/dist/esm-es5/pds-progress.entry.js +0 -2
  485. package/dist/esm-es5/pds-progress.entry.js.map +0 -1
  486. package/dist/esm-es5/pds-radio.entry.js +0 -2
  487. package/dist/esm-es5/pds-radio.entry.js.map +0 -1
  488. package/dist/esm-es5/pds-row.entry.js +0 -2
  489. package/dist/esm-es5/pds-row.entry.js.map +0 -1
  490. package/dist/esm-es5/pds-sortable-item.entry.js +0 -2
  491. package/dist/esm-es5/pds-sortable-item.entry.js.map +0 -1
  492. package/dist/esm-es5/pds-sortable.entry.js +0 -8
  493. package/dist/esm-es5/pds-sortable.entry.js.map +0 -1
  494. package/dist/esm-es5/pds-switch.entry.js +0 -2
  495. package/dist/esm-es5/pds-switch.entry.js.map +0 -1
  496. package/dist/esm-es5/pds-tab.entry.js +0 -2
  497. package/dist/esm-es5/pds-tab.entry.js.map +0 -1
  498. package/dist/esm-es5/pds-table-body.entry.js +0 -2
  499. package/dist/esm-es5/pds-table-body.entry.js.map +0 -1
  500. package/dist/esm-es5/pds-table-head-cell.entry.js +0 -2
  501. package/dist/esm-es5/pds-table-head-cell.entry.js.map +0 -1
  502. package/dist/esm-es5/pds-table-head.entry.js +0 -2
  503. package/dist/esm-es5/pds-table-head.entry.js.map +0 -1
  504. package/dist/esm-es5/pds-table-row.entry.js +0 -2
  505. package/dist/esm-es5/pds-table-row.entry.js.map +0 -1
  506. package/dist/esm-es5/pds-table.entry.js +0 -2
  507. package/dist/esm-es5/pds-table.entry.js.map +0 -1
  508. package/dist/esm-es5/pds-tabpanel.entry.js +0 -2
  509. package/dist/esm-es5/pds-tabpanel.entry.js.map +0 -1
  510. package/dist/esm-es5/pds-tabs.entry.js +0 -2
  511. package/dist/esm-es5/pds-tabs.entry.js.map +0 -1
  512. package/dist/esm-es5/pds-textarea.entry.js +0 -2
  513. package/dist/esm-es5/pds-textarea.entry.js.map +0 -1
  514. package/dist/esm-es5/pds-tooltip.entry.js +0 -2
  515. package/dist/esm-es5/pds-tooltip.entry.js.map +0 -1
  516. package/dist/esm-es5/pine-core.js +0 -2
  517. package/dist/esm-es5/pine-core.js.map +0 -1
  518. package/dist/index.cjs.js +0 -1
  519. package/dist/index.js +0 -1
  520. package/dist/pine-core/p-019edcbb.entry.js +0 -2
  521. package/dist/pine-core/p-019edcbb.entry.js.map +0 -1
  522. package/dist/pine-core/p-0a1e2528.system.entry.js +0 -2
  523. package/dist/pine-core/p-0a1e2528.system.entry.js.map +0 -1
  524. package/dist/pine-core/p-0a636312.system.entry.js +0 -2
  525. package/dist/pine-core/p-0a636312.system.entry.js.map +0 -1
  526. package/dist/pine-core/p-0af86d62.entry.js +0 -2
  527. package/dist/pine-core/p-0af86d62.entry.js.map +0 -1
  528. package/dist/pine-core/p-0ec12306.system.js +0 -2
  529. package/dist/pine-core/p-0ec12306.system.js.map +0 -1
  530. package/dist/pine-core/p-12e537ba.system.entry.js +0 -2
  531. package/dist/pine-core/p-12e537ba.system.entry.js.map +0 -1
  532. package/dist/pine-core/p-1330a135.entry.js +0 -2
  533. package/dist/pine-core/p-1330a135.entry.js.map +0 -1
  534. package/dist/pine-core/p-16e9d55b.entry.js +0 -2
  535. package/dist/pine-core/p-16e9d55b.entry.js.map +0 -1
  536. package/dist/pine-core/p-1922e07e.system.entry.js +0 -2
  537. package/dist/pine-core/p-1922e07e.system.entry.js.map +0 -1
  538. package/dist/pine-core/p-209bc3fd.entry.js +0 -2
  539. package/dist/pine-core/p-209bc3fd.entry.js.map +0 -1
  540. package/dist/pine-core/p-2250dc45.entry.js +0 -2
  541. package/dist/pine-core/p-2250dc45.entry.js.map +0 -1
  542. package/dist/pine-core/p-2af2432d.system.entry.js +0 -2
  543. package/dist/pine-core/p-2af2432d.system.entry.js.map +0 -1
  544. package/dist/pine-core/p-2e19ec3d.system.entry.js +0 -2
  545. package/dist/pine-core/p-2e19ec3d.system.entry.js.map +0 -1
  546. package/dist/pine-core/p-2f77dbd3.js +0 -3
  547. package/dist/pine-core/p-2f77dbd3.js.map +0 -1
  548. package/dist/pine-core/p-30ca2db1.entry.js +0 -2
  549. package/dist/pine-core/p-30ca2db1.entry.js.map +0 -1
  550. package/dist/pine-core/p-30cb97ee.system.entry.js +0 -2
  551. package/dist/pine-core/p-30cb97ee.system.entry.js.map +0 -1
  552. package/dist/pine-core/p-320e4c53.system.entry.js +0 -2
  553. package/dist/pine-core/p-320e4c53.system.entry.js.map +0 -1
  554. package/dist/pine-core/p-327e1afa.system.entry.js +0 -2
  555. package/dist/pine-core/p-327e1afa.system.entry.js.map +0 -1
  556. package/dist/pine-core/p-380e465b.entry.js +0 -2
  557. package/dist/pine-core/p-380e465b.entry.js.map +0 -1
  558. package/dist/pine-core/p-3caa5870.system.entry.js +0 -2
  559. package/dist/pine-core/p-3caa5870.system.entry.js.map +0 -1
  560. package/dist/pine-core/p-3e527956.system.entry.js +0 -2
  561. package/dist/pine-core/p-3e527956.system.entry.js.map +0 -1
  562. package/dist/pine-core/p-43783da1.system.entry.js +0 -2
  563. package/dist/pine-core/p-43783da1.system.entry.js.map +0 -1
  564. package/dist/pine-core/p-478689a0.system.entry.js +0 -2
  565. package/dist/pine-core/p-478689a0.system.entry.js.map +0 -1
  566. package/dist/pine-core/p-49a28a19.system.entry.js +0 -2
  567. package/dist/pine-core/p-49a28a19.system.entry.js.map +0 -1
  568. package/dist/pine-core/p-4d4bea0a.entry.js +0 -2
  569. package/dist/pine-core/p-4d4bea0a.entry.js.map +0 -1
  570. package/dist/pine-core/p-4f7ee11c.entry.js +0 -2
  571. package/dist/pine-core/p-4f7ee11c.entry.js.map +0 -1
  572. package/dist/pine-core/p-5073b1c0.entry.js +0 -8
  573. package/dist/pine-core/p-5073b1c0.entry.js.map +0 -1
  574. package/dist/pine-core/p-50ea2036.system.js +0 -2
  575. package/dist/pine-core/p-50ea2036.system.js.map +0 -1
  576. package/dist/pine-core/p-51651124.entry.js +0 -2
  577. package/dist/pine-core/p-51651124.entry.js.map +0 -1
  578. package/dist/pine-core/p-564e8159.entry.js +0 -2
  579. package/dist/pine-core/p-564e8159.entry.js.map +0 -1
  580. package/dist/pine-core/p-56ba5cbf.system.js +0 -2
  581. package/dist/pine-core/p-56ba5cbf.system.js.map +0 -1
  582. package/dist/pine-core/p-5f2b3f57.entry.js +0 -2
  583. package/dist/pine-core/p-5f2b3f57.entry.js.map +0 -1
  584. package/dist/pine-core/p-5f9fa644.system.entry.js +0 -2
  585. package/dist/pine-core/p-5f9fa644.system.entry.js.map +0 -1
  586. package/dist/pine-core/p-5ffec55d.system.js +0 -2
  587. package/dist/pine-core/p-5ffec55d.system.js.map +0 -1
  588. package/dist/pine-core/p-61ab207f.entry.js +0 -2
  589. package/dist/pine-core/p-61ab207f.entry.js.map +0 -1
  590. package/dist/pine-core/p-6370aa12.system.entry.js +0 -2
  591. package/dist/pine-core/p-6370aa12.system.entry.js.map +0 -1
  592. package/dist/pine-core/p-64b4cb70.system.js +0 -3
  593. package/dist/pine-core/p-64b4cb70.system.js.map +0 -1
  594. package/dist/pine-core/p-65a167b8.entry.js +0 -2
  595. package/dist/pine-core/p-65a167b8.entry.js.map +0 -1
  596. package/dist/pine-core/p-737d5042.entry.js +0 -2
  597. package/dist/pine-core/p-737d5042.entry.js.map +0 -1
  598. package/dist/pine-core/p-7611d073.system.js +0 -2
  599. package/dist/pine-core/p-7611d073.system.js.map +0 -1
  600. package/dist/pine-core/p-77da68b4.system.entry.js +0 -2
  601. package/dist/pine-core/p-77da68b4.system.entry.js.map +0 -1
  602. package/dist/pine-core/p-78ae6c93.system.entry.js +0 -2
  603. package/dist/pine-core/p-78ae6c93.system.entry.js.map +0 -1
  604. package/dist/pine-core/p-7f917c20.entry.js +0 -2
  605. package/dist/pine-core/p-7f917c20.entry.js.map +0 -1
  606. package/dist/pine-core/p-8144b8d8.system.entry.js +0 -2
  607. package/dist/pine-core/p-8144b8d8.system.entry.js.map +0 -1
  608. package/dist/pine-core/p-825cdc06.entry.js +0 -2
  609. package/dist/pine-core/p-825cdc06.entry.js.map +0 -1
  610. package/dist/pine-core/p-87c2ac18.entry.js +0 -2
  611. package/dist/pine-core/p-87c2ac18.entry.js.map +0 -1
  612. package/dist/pine-core/p-8c5e76d4.system.entry.js +0 -2
  613. package/dist/pine-core/p-8c5e76d4.system.entry.js.map +0 -1
  614. package/dist/pine-core/p-9e33f4fb.system.entry.js +0 -9
  615. package/dist/pine-core/p-9e33f4fb.system.entry.js.map +0 -1
  616. package/dist/pine-core/p-9f8a1aa6.entry.js +0 -2
  617. package/dist/pine-core/p-9f8a1aa6.entry.js.map +0 -1
  618. package/dist/pine-core/p-afdfadb0.entry.js +0 -2
  619. package/dist/pine-core/p-afdfadb0.entry.js.map +0 -1
  620. package/dist/pine-core/p-b7897f94.js +0 -2
  621. package/dist/pine-core/p-b7897f94.js.map +0 -1
  622. package/dist/pine-core/p-bb099830.system.entry.js +0 -2
  623. package/dist/pine-core/p-bb099830.system.entry.js.map +0 -1
  624. package/dist/pine-core/p-bc1cb8e2.entry.js +0 -2
  625. package/dist/pine-core/p-bc1cb8e2.entry.js.map +0 -1
  626. package/dist/pine-core/p-bc3782a0.entry.js +0 -2
  627. package/dist/pine-core/p-bc3782a0.entry.js.map +0 -1
  628. package/dist/pine-core/p-bd5135c3.entry.js +0 -2
  629. package/dist/pine-core/p-bd5135c3.entry.js.map +0 -1
  630. package/dist/pine-core/p-c721d912.system.entry.js +0 -2
  631. package/dist/pine-core/p-c721d912.system.entry.js.map +0 -1
  632. package/dist/pine-core/p-cf147dfc.system.entry.js +0 -2
  633. package/dist/pine-core/p-cf147dfc.system.entry.js.map +0 -1
  634. package/dist/pine-core/p-d99998a4.system.entry.js +0 -2
  635. package/dist/pine-core/p-d99998a4.system.entry.js.map +0 -1
  636. package/dist/pine-core/p-dacd68cf.system.entry.js +0 -2
  637. package/dist/pine-core/p-dacd68cf.system.entry.js.map +0 -1
  638. package/dist/pine-core/p-e1255160.js +0 -2
  639. package/dist/pine-core/p-e1255160.js.map +0 -1
  640. package/dist/pine-core/p-e43fd36e.entry.js +0 -2
  641. package/dist/pine-core/p-e43fd36e.entry.js.map +0 -1
  642. package/dist/pine-core/p-e4f30321.js +0 -2
  643. package/dist/pine-core/p-e4f30321.js.map +0 -1
  644. package/dist/pine-core/p-ec56491f.system.entry.js +0 -2
  645. package/dist/pine-core/p-ec56491f.system.entry.js.map +0 -1
  646. package/dist/pine-core/p-ecbf0b15.system.entry.js +0 -2
  647. package/dist/pine-core/p-ecbf0b15.system.entry.js.map +0 -1
  648. package/dist/pine-core/p-edbc3b8d.entry.js +0 -2
  649. package/dist/pine-core/p-edbc3b8d.entry.js.map +0 -1
  650. package/dist/pine-core/p-ff9044ed.entry.js +0 -2
  651. package/dist/pine-core/p-ff9044ed.entry.js.map +0 -1
  652. package/dist/pine-core/pine-core.js +0 -127
  653. package/dist/pine-core/svg/access-key.svg +0 -1
  654. package/dist/pine-core/svg/add-circle.svg +0 -1
  655. package/dist/pine-core/svg/add-image.svg +0 -1
  656. package/dist/pine-core/svg/add-small.svg +0 -1
  657. package/dist/pine-core/svg/add-square.svg +0 -1
  658. package/dist/pine-core/svg/add.svg +0 -1
  659. package/dist/pine-core/svg/advanced.svg +0 -1
  660. package/dist/pine-core/svg/ai-sparkle.svg +0 -1
  661. package/dist/pine-core/svg/ai-writer-filled.svg +0 -1
  662. package/dist/pine-core/svg/ai-writer.svg +0 -1
  663. package/dist/pine-core/svg/align-center.svg +0 -1
  664. package/dist/pine-core/svg/align-justify.svg +0 -1
  665. package/dist/pine-core/svg/align-left.svg +0 -1
  666. package/dist/pine-core/svg/align-right.svg +0 -1
  667. package/dist/pine-core/svg/app-store.svg +0 -1
  668. package/dist/pine-core/svg/archive.svg +0 -1
  669. package/dist/pine-core/svg/arrow-corner.svg +0 -1
  670. package/dist/pine-core/svg/arrow-down.svg +0 -1
  671. package/dist/pine-core/svg/arrow-left.svg +0 -1
  672. package/dist/pine-core/svg/arrow-right.svg +0 -1
  673. package/dist/pine-core/svg/arrow-up.svg +0 -1
  674. package/dist/pine-core/svg/assessment.svg +0 -1
  675. package/dist/pine-core/svg/at-sign.svg +0 -1
  676. package/dist/pine-core/svg/attach.svg +0 -1
  677. package/dist/pine-core/svg/automations.svg +0 -1
  678. package/dist/pine-core/svg/ban.svg +0 -1
  679. package/dist/pine-core/svg/bank.svg +0 -1
  680. package/dist/pine-core/svg/bell.svg +0 -1
  681. package/dist/pine-core/svg/block.svg +0 -1
  682. package/dist/pine-core/svg/blog-filled.svg +0 -1
  683. package/dist/pine-core/svg/blog.svg +0 -1
  684. package/dist/pine-core/svg/bold.svg +0 -1
  685. package/dist/pine-core/svg/broadcast.svg +0 -1
  686. package/dist/pine-core/svg/button.svg +0 -1
  687. package/dist/pine-core/svg/calendar-date.svg +0 -1
  688. package/dist/pine-core/svg/calendar-schedule.svg +0 -1
  689. package/dist/pine-core/svg/calendar-simple.svg +0 -1
  690. package/dist/pine-core/svg/card-amex.svg +0 -1
  691. package/dist/pine-core/svg/card-android.svg +0 -1
  692. package/dist/pine-core/svg/card-apple.svg +0 -1
  693. package/dist/pine-core/svg/card-diners-club.svg +0 -1
  694. package/dist/pine-core/svg/card-discover.svg +0 -1
  695. package/dist/pine-core/svg/card-generic.svg +0 -1
  696. package/dist/pine-core/svg/card-gpay.svg +0 -1
  697. package/dist/pine-core/svg/card-mastercard.svg +0 -1
  698. package/dist/pine-core/svg/card-paypal.svg +0 -1
  699. package/dist/pine-core/svg/card-stripe.svg +0 -1
  700. package/dist/pine-core/svg/card-update.svg +0 -1
  701. package/dist/pine-core/svg/card-visa.svg +0 -1
  702. package/dist/pine-core/svg/caret-down.svg +0 -1
  703. package/dist/pine-core/svg/caret-left.svg +0 -1
  704. package/dist/pine-core/svg/caret-right.svg +0 -1
  705. package/dist/pine-core/svg/caret-up.svg +0 -1
  706. package/dist/pine-core/svg/cart-add.svg +0 -1
  707. package/dist/pine-core/svg/cart.svg +0 -1
  708. package/dist/pine-core/svg/certificate.svg +0 -1
  709. package/dist/pine-core/svg/chart-filled.svg +0 -1
  710. package/dist/pine-core/svg/chart.svg +0 -1
  711. package/dist/pine-core/svg/check-circle-filled.svg +0 -1
  712. package/dist/pine-core/svg/check-circle.svg +0 -1
  713. package/dist/pine-core/svg/check.svg +0 -1
  714. package/dist/pine-core/svg/circle-1.svg +0 -1
  715. package/dist/pine-core/svg/circle-2.svg +0 -1
  716. package/dist/pine-core/svg/circle-3.svg +0 -1
  717. package/dist/pine-core/svg/circle-4.svg +0 -1
  718. package/dist/pine-core/svg/circle-5.svg +0 -1
  719. package/dist/pine-core/svg/circle-6.svg +0 -1
  720. package/dist/pine-core/svg/circle-7.svg +0 -1
  721. package/dist/pine-core/svg/circle-8.svg +0 -1
  722. package/dist/pine-core/svg/circle-9.svg +0 -1
  723. package/dist/pine-core/svg/circle-a.svg +0 -1
  724. package/dist/pine-core/svg/circle-b.svg +0 -1
  725. package/dist/pine-core/svg/circle-dashed.svg +0 -1
  726. package/dist/pine-core/svg/clock.svg +0 -1
  727. package/dist/pine-core/svg/closed-captions.svg +0 -1
  728. package/dist/pine-core/svg/cloud-upload.svg +0 -1
  729. package/dist/pine-core/svg/code-block.svg +0 -1
  730. package/dist/pine-core/svg/code.svg +0 -1
  731. package/dist/pine-core/svg/color.svg +0 -1
  732. package/dist/pine-core/svg/columns.svg +0 -1
  733. package/dist/pine-core/svg/comment-no.svg +0 -1
  734. package/dist/pine-core/svg/comment.svg +0 -1
  735. package/dist/pine-core/svg/connect.svg +0 -1
  736. package/dist/pine-core/svg/contact.svg +0 -1
  737. package/dist/pine-core/svg/conversation.svg +0 -1
  738. package/dist/pine-core/svg/copy.svg +0 -1
  739. package/dist/pine-core/svg/coupon.svg +0 -1
  740. package/dist/pine-core/svg/course.svg +0 -1
  741. package/dist/pine-core/svg/creator-studio-filled.svg +0 -1
  742. package/dist/pine-core/svg/creator-studio.svg +0 -1
  743. package/dist/pine-core/svg/cursor-pointer.svg +0 -1
  744. package/dist/pine-core/svg/cursor.svg +0 -1
  745. package/dist/pine-core/svg/custom-field.svg +0 -1
  746. package/dist/pine-core/svg/customize.svg +0 -1
  747. package/dist/pine-core/svg/danger-filled.svg +0 -1
  748. package/dist/pine-core/svg/danger.svg +0 -1
  749. package/dist/pine-core/svg/delete-circle.svg +0 -1
  750. package/dist/pine-core/svg/delete-key.svg +0 -1
  751. package/dist/pine-core/svg/delete-x.svg +0 -1
  752. package/dist/pine-core/svg/dollar.svg +0 -1
  753. package/dist/pine-core/svg/dot-menu-horizontal.svg +0 -1
  754. package/dist/pine-core/svg/down-small.svg +0 -1
  755. package/dist/pine-core/svg/download.svg +0 -1
  756. package/dist/pine-core/svg/downsell.svg +0 -1
  757. package/dist/pine-core/svg/draft.svg +0 -1
  758. package/dist/pine-core/svg/drawer-collapse.svg +0 -1
  759. package/dist/pine-core/svg/drawer-expand.svg +0 -1
  760. package/dist/pine-core/svg/drop.svg +0 -1
  761. package/dist/pine-core/svg/duplicate.svg +0 -1
  762. package/dist/pine-core/svg/editor-filled.svg +0 -1
  763. package/dist/pine-core/svg/editor.svg +0 -1
  764. package/dist/pine-core/svg/email-activity.svg +0 -1
  765. package/dist/pine-core/svg/emoji.svg +0 -1
  766. package/dist/pine-core/svg/enlarge-vertical.svg +0 -1
  767. package/dist/pine-core/svg/enlarge.svg +0 -1
  768. package/dist/pine-core/svg/expand.svg +0 -1
  769. package/dist/pine-core/svg/favorite.svg +0 -1
  770. package/dist/pine-core/svg/feedback.svg +0 -1
  771. package/dist/pine-core/svg/file-money.svg +0 -1
  772. package/dist/pine-core/svg/file.svg +0 -1
  773. package/dist/pine-core/svg/filter.svg +0 -1
  774. package/dist/pine-core/svg/flag.svg +0 -1
  775. package/dist/pine-core/svg/flash-filled.svg +0 -1
  776. package/dist/pine-core/svg/flash.svg +0 -1
  777. package/dist/pine-core/svg/floppy-disk.svg +0 -1
  778. package/dist/pine-core/svg/folder-group.svg +0 -1
  779. package/dist/pine-core/svg/folder.svg +0 -1
  780. package/dist/pine-core/svg/form-field.svg +0 -1
  781. package/dist/pine-core/svg/form-filled.svg +0 -1
  782. package/dist/pine-core/svg/form.svg +0 -1
  783. package/dist/pine-core/svg/fullscreen.svg +0 -1
  784. package/dist/pine-core/svg/funnel.svg +0 -1
  785. package/dist/pine-core/svg/gear-filled.svg +0 -1
  786. package/dist/pine-core/svg/gear.svg +0 -1
  787. package/dist/pine-core/svg/grant-offer.svg +0 -1
  788. package/dist/pine-core/svg/handle-2-vertical.svg +0 -1
  789. package/dist/pine-core/svg/handle-2.svg +0 -1
  790. package/dist/pine-core/svg/handle.svg +0 -1
  791. package/dist/pine-core/svg/hashtag.svg +0 -1
  792. package/dist/pine-core/svg/hd-video.svg +0 -1
  793. package/dist/pine-core/svg/heading-1.svg +0 -1
  794. package/dist/pine-core/svg/heading-2.svg +0 -1
  795. package/dist/pine-core/svg/heading-3.svg +0 -1
  796. package/dist/pine-core/svg/heading-4.svg +0 -1
  797. package/dist/pine-core/svg/heading-5.svg +0 -1
  798. package/dist/pine-core/svg/heading-6.svg +0 -1
  799. package/dist/pine-core/svg/heading-large.svg +0 -1
  800. package/dist/pine-core/svg/heading-small.svg +0 -1
  801. package/dist/pine-core/svg/headset.svg +0 -1
  802. package/dist/pine-core/svg/help-filled.svg +0 -1
  803. package/dist/pine-core/svg/help.svg +0 -1
  804. package/dist/pine-core/svg/home-alt.svg +0 -1
  805. package/dist/pine-core/svg/home-filled.svg +0 -1
  806. package/dist/pine-core/svg/home.svg +0 -1
  807. package/dist/pine-core/svg/horizontal-line.svg +0 -1
  808. package/dist/pine-core/svg/image.svg +0 -1
  809. package/dist/pine-core/svg/info-circle-filled.svg +0 -1
  810. package/dist/pine-core/svg/info-circle.svg +0 -1
  811. package/dist/pine-core/svg/ios-battery.svg +0 -1
  812. package/dist/pine-core/svg/ios-data.svg +0 -1
  813. package/dist/pine-core/svg/ios-wifi.svg +0 -1
  814. package/dist/pine-core/svg/italic.svg +0 -1
  815. package/dist/pine-core/svg/kajabi-filled.svg +0 -1
  816. package/dist/pine-core/svg/kajabi.svg +0 -1
  817. package/dist/pine-core/svg/klarna.svg +0 -1
  818. package/dist/pine-core/svg/lab.svg +0 -1
  819. package/dist/pine-core/svg/launch.svg +0 -1
  820. package/dist/pine-core/svg/layout-grid.svg +0 -1
  821. package/dist/pine-core/svg/layout-list.svg +0 -1
  822. package/dist/pine-core/svg/left-small.svg +0 -1
  823. package/dist/pine-core/svg/list-bullet.svg +0 -1
  824. package/dist/pine-core/svg/list-details.svg +0 -1
  825. package/dist/pine-core/svg/list-numbers.svg +0 -1
  826. package/dist/pine-core/svg/location.svg +0 -1
  827. package/dist/pine-core/svg/lock-alt.svg +0 -1
  828. package/dist/pine-core/svg/lock.svg +0 -1
  829. package/dist/pine-core/svg/logo-afterpay.svg +0 -1
  830. package/dist/pine-core/svg/logo-facebook-round.svg +0 -1
  831. package/dist/pine-core/svg/logo-facebook.svg +0 -1
  832. package/dist/pine-core/svg/logo-instagram.svg +0 -1
  833. package/dist/pine-core/svg/logo-linkedin.svg +0 -1
  834. package/dist/pine-core/svg/logo-tiktok.svg +0 -1
  835. package/dist/pine-core/svg/logo-twitter-x.svg +0 -1
  836. package/dist/pine-core/svg/logo-twitter.svg +0 -1
  837. package/dist/pine-core/svg/logo-youtube.svg +0 -1
  838. package/dist/pine-core/svg/loop.svg +0 -1
  839. package/dist/pine-core/svg/mail-filled.svg +0 -1
  840. package/dist/pine-core/svg/mail-open.svg +0 -1
  841. package/dist/pine-core/svg/mail.svg +0 -1
  842. package/dist/pine-core/svg/map.svg +0 -1
  843. package/dist/pine-core/svg/mapped.svg +0 -1
  844. package/dist/pine-core/svg/margin-left.svg +0 -1
  845. package/dist/pine-core/svg/margin-right.svg +0 -1
  846. package/dist/pine-core/svg/marker-filled.svg +0 -1
  847. package/dist/pine-core/svg/marker.svg +0 -1
  848. package/dist/pine-core/svg/megaphone-filled.svg +0 -1
  849. package/dist/pine-core/svg/megaphone.svg +0 -1
  850. package/dist/pine-core/svg/menu-alt.svg +0 -1
  851. package/dist/pine-core/svg/menu-bordered.svg +0 -1
  852. package/dist/pine-core/svg/menu.svg +0 -1
  853. package/dist/pine-core/svg/merge.svg +0 -1
  854. package/dist/pine-core/svg/microphone-off.svg +0 -1
  855. package/dist/pine-core/svg/microphone.svg +0 -1
  856. package/dist/pine-core/svg/monitor-filled.svg +0 -1
  857. package/dist/pine-core/svg/monitor.svg +0 -1
  858. package/dist/pine-core/svg/more-menu-filled.svg +0 -1
  859. package/dist/pine-core/svg/more-menu.svg +0 -1
  860. package/dist/pine-core/svg/move-left.svg +0 -1
  861. package/dist/pine-core/svg/move-right.svg +0 -1
  862. package/dist/pine-core/svg/multi-pay.svg +0 -1
  863. package/dist/pine-core/svg/newsletter-2.svg +0 -1
  864. package/dist/pine-core/svg/newsletter.svg +0 -1
  865. package/dist/pine-core/svg/one-off-session.svg +0 -1
  866. package/dist/pine-core/svg/one-time.svg +0 -1
  867. package/dist/pine-core/svg/packages.svg +0 -1
  868. package/dist/pine-core/svg/pause-circle.svg +0 -1
  869. package/dist/pine-core/svg/pause.svg +0 -1
  870. package/dist/pine-core/svg/payout.svg +0 -1
  871. package/dist/pine-core/svg/pen.svg +0 -1
  872. package/dist/pine-core/svg/phone-portrait.svg +0 -1
  873. package/dist/pine-core/svg/phone-toolbar-filled.svg +0 -1
  874. package/dist/pine-core/svg/phone-toolbar.svg +0 -1
  875. package/dist/pine-core/svg/play-circle.svg +0 -1
  876. package/dist/pine-core/svg/play-outline.svg +0 -1
  877. package/dist/pine-core/svg/play-store.svg +0 -1
  878. package/dist/pine-core/svg/play.svg +0 -1
  879. package/dist/pine-core/svg/plug.svg +0 -1
  880. package/dist/pine-core/svg/premium.svg +0 -1
  881. package/dist/pine-core/svg/present.svg +0 -1
  882. package/dist/pine-core/svg/preview-off.svg +0 -1
  883. package/dist/pine-core/svg/preview-on.svg +0 -1
  884. package/dist/pine-core/svg/product-filled.svg +0 -1
  885. package/dist/pine-core/svg/product.svg +0 -1
  886. package/dist/pine-core/svg/question-circle.svg +0 -1
  887. package/dist/pine-core/svg/quote.svg +0 -1
  888. package/dist/pine-core/svg/redo.svg +0 -1
  889. package/dist/pine-core/svg/refresh.svg +0 -1
  890. package/dist/pine-core/svg/remove-circle.svg +0 -1
  891. package/dist/pine-core/svg/remove.svg +0 -1
  892. package/dist/pine-core/svg/rename.svg +0 -1
  893. package/dist/pine-core/svg/reset-password.svg +0 -1
  894. package/dist/pine-core/svg/restore.svg +0 -1
  895. package/dist/pine-core/svg/right-small.svg +0 -1
  896. package/dist/pine-core/svg/rocket-filled.svg +0 -1
  897. package/dist/pine-core/svg/rocket.svg +0 -1
  898. package/dist/pine-core/svg/round-dollar.svg +0 -1
  899. package/dist/pine-core/svg/rows.svg +0 -1
  900. package/dist/pine-core/svg/scissor.svg +0 -1
  901. package/dist/pine-core/svg/screen-share-off.svg +0 -1
  902. package/dist/pine-core/svg/screen-share-on.svg +0 -1
  903. package/dist/pine-core/svg/search-small.svg +0 -1
  904. package/dist/pine-core/svg/search.svg +0 -1
  905. package/dist/pine-core/svg/send-message.svg +0 -1
  906. package/dist/pine-core/svg/sequences.svg +0 -1
  907. package/dist/pine-core/svg/share.svg +0 -1
  908. package/dist/pine-core/svg/skipped.svg +0 -1
  909. package/dist/pine-core/svg/slash-divider.svg +0 -1
  910. package/dist/pine-core/svg/speaker.svg +0 -1
  911. package/dist/pine-core/svg/stack.svg +0 -1
  912. package/dist/pine-core/svg/star.svg +0 -1
  913. package/dist/pine-core/svg/stop.svg +0 -1
  914. package/dist/pine-core/svg/stopwatch.svg +0 -1
  915. package/dist/pine-core/svg/strikethrough.svg +0 -1
  916. package/dist/pine-core/svg/subscript.svg +0 -1
  917. package/dist/pine-core/svg/subscriptions.svg +0 -1
  918. package/dist/pine-core/svg/super-admin.svg +0 -1
  919. package/dist/pine-core/svg/superscript.svg +0 -1
  920. package/dist/pine-core/svg/sync.svg +0 -1
  921. package/dist/pine-core/svg/tablet-landscape.svg +0 -1
  922. package/dist/pine-core/svg/tablet-portrait.svg +0 -1
  923. package/dist/pine-core/svg/tag-filled.svg +0 -1
  924. package/dist/pine-core/svg/tag.svg +0 -1
  925. package/dist/pine-core/svg/text-styles.svg +0 -1
  926. package/dist/pine-core/svg/theme-store-filled.svg +0 -1
  927. package/dist/pine-core/svg/theme-store.svg +0 -1
  928. package/dist/pine-core/svg/thumb-down-filled.svg +0 -1
  929. package/dist/pine-core/svg/thumb-down.svg +0 -1
  930. package/dist/pine-core/svg/thumb-up-filled.svg +0 -1
  931. package/dist/pine-core/svg/thumb-up.svg +0 -1
  932. package/dist/pine-core/svg/trash.svg +0 -1
  933. package/dist/pine-core/svg/trophy.svg +0 -1
  934. package/dist/pine-core/svg/underline.svg +0 -1
  935. package/dist/pine-core/svg/undo.svg +0 -1
  936. package/dist/pine-core/svg/unlock.svg +0 -1
  937. package/dist/pine-core/svg/unmapped.svg +0 -1
  938. package/dist/pine-core/svg/up-small.svg +0 -1
  939. package/dist/pine-core/svg/upload.svg +0 -1
  940. package/dist/pine-core/svg/url.svg +0 -1
  941. package/dist/pine-core/svg/user-circle-filled.svg +0 -1
  942. package/dist/pine-core/svg/user-circle.svg +0 -1
  943. package/dist/pine-core/svg/user-filled.svg +0 -1
  944. package/dist/pine-core/svg/user-star-filled.svg +0 -1
  945. package/dist/pine-core/svg/user-star.svg +0 -1
  946. package/dist/pine-core/svg/user.svg +0 -1
  947. package/dist/pine-core/svg/users-alt.svg +0 -1
  948. package/dist/pine-core/svg/users.svg +0 -1
  949. package/dist/pine-core/svg/video-off.svg +0 -1
  950. package/dist/pine-core/svg/video-on.svg +0 -1
  951. package/dist/pine-core/svg/warning-filled.svg +0 -1
  952. package/dist/pine-core/svg/warning.svg +0 -1
  953. package/dist/pine-core/svg/window-paragraph.svg +0 -1
  954. package/dist/pine-core/svg/world.svg +0 -1
  955. package/dist/pine-core/svg/wrench.svg +0 -1
  956. /package/dist/{esm → pine-core}/app-globals-0f993ce5.js +0 -0
  957. /package/dist/{esm → pine-core}/app-globals-0f993ce5.js.map +0 -0
@@ -1,27 +1,6 @@
1
- 'use strict';
2
-
3
- function _interopNamespace(e) {
4
- if (e && e.__esModule) return e;
5
- var n = Object.create(null);
6
- if (e) {
7
- Object.keys(e).forEach(function (k) {
8
- if (k !== 'default') {
9
- var d = Object.getOwnPropertyDescriptor(e, k);
10
- Object.defineProperty(n, k, d.get ? d : {
11
- enumerable: true,
12
- get: function () {
13
- return e[k];
14
- }
15
- });
16
- }
17
- });
18
- }
19
- n['default'] = e;
20
- return Object.freeze(n);
21
- }
22
-
23
1
  const NAMESPACE = 'pine-core';
24
- const BUILD = /* pine-core */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, 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: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: true, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: true, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: true, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: false, 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 };
2
+ const BUILD = /* pine-core */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: true, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, constructableCSS: false, cssAnnotations: true, devTools: true, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: true, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: true, hydrateClientSide: true, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: true, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, observeAttribute: true, profile: true, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: true, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, 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 };
3
+ const Env = /* pine-core */ {};
25
4
 
26
5
  /**
27
6
  * Virtual DOM patching algorithm based on Snabbdom by
@@ -34,25 +13,112 @@ const BUILD = /* pine-core */ { allRenderFn: true, appendChildSlotFix: false, as
34
13
  let scopeId;
35
14
  let contentRef;
36
15
  let hostTagName;
16
+ let customError;
17
+ let i = 0;
37
18
  let useNativeShadowDom = false;
38
19
  let checkSlotFallbackVisibility = false;
39
20
  let checkSlotRelocate = false;
40
21
  let isSvgMode = false;
22
+ let renderingRef = null;
23
+ let queueCongestion = 0;
41
24
  let queuePending = false;
25
+ const Build = {
26
+ isDev: BUILD.isDev ? true : false,
27
+ isBrowser: true,
28
+ isServer: false,
29
+ isTesting: BUILD.isTesting ? true : false,
30
+ };
31
+ const getAssetPath = (path) => {
32
+ const assetUrl = new URL(path, plt.$resourcesUrl$);
33
+ return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
34
+ };
35
+ const setAssetPath = (path) => (plt.$resourcesUrl$ = path);
42
36
  const createTime = (fnName, tagName = '') => {
43
- {
37
+ if (BUILD.profile && performance.mark) {
38
+ const key = `st:${fnName}:${tagName}:${i++}`;
39
+ // Start
40
+ performance.mark(key);
41
+ // End
42
+ return () => performance.measure(`[Stencil] ${fnName}() <${tagName}>`, key);
43
+ }
44
+ else {
44
45
  return () => {
45
46
  return;
46
47
  };
47
48
  }
48
49
  };
49
50
  const uniqueTime = (key, measureText) => {
50
- {
51
+ if (BUILD.profile && performance.mark) {
52
+ if (performance.getEntriesByName(key, 'mark').length === 0) {
53
+ performance.mark(key);
54
+ }
55
+ return () => {
56
+ if (performance.getEntriesByName(measureText, 'measure').length === 0) {
57
+ performance.measure(measureText, key);
58
+ }
59
+ };
60
+ }
61
+ else {
51
62
  return () => {
52
63
  return;
53
64
  };
54
65
  }
55
66
  };
67
+ const inspect = (ref) => {
68
+ const hostRef = getHostRef(ref);
69
+ if (!hostRef) {
70
+ return undefined;
71
+ }
72
+ const flags = hostRef.$flags$;
73
+ const hostElement = hostRef.$hostElement$;
74
+ return {
75
+ renderCount: hostRef.$renderCount$,
76
+ flags: {
77
+ hasRendered: !!(flags & 2 /* HOST_FLAGS.hasRendered */),
78
+ hasConnected: !!(flags & 1 /* HOST_FLAGS.hasConnected */),
79
+ isWaitingForChildren: !!(flags & 4 /* HOST_FLAGS.isWaitingForChildren */),
80
+ isConstructingInstance: !!(flags & 8 /* HOST_FLAGS.isConstructingInstance */),
81
+ isQueuedForUpdate: !!(flags & 16 /* HOST_FLAGS.isQueuedForUpdate */),
82
+ hasInitializedComponent: !!(flags & 32 /* HOST_FLAGS.hasInitializedComponent */),
83
+ hasLoadedComponent: !!(flags & 64 /* HOST_FLAGS.hasLoadedComponent */),
84
+ isWatchReady: !!(flags & 128 /* HOST_FLAGS.isWatchReady */),
85
+ isListenReady: !!(flags & 256 /* HOST_FLAGS.isListenReady */),
86
+ needsRerender: !!(flags & 512 /* HOST_FLAGS.needsRerender */),
87
+ },
88
+ instanceValues: hostRef.$instanceValues$,
89
+ ancestorComponent: hostRef.$ancestorComponent$,
90
+ hostElement,
91
+ lazyInstance: hostRef.$lazyInstance$,
92
+ vnode: hostRef.$vnode$,
93
+ modeName: hostRef.$modeName$,
94
+ onReadyPromise: hostRef.$onReadyPromise$,
95
+ onReadyResolve: hostRef.$onReadyResolve$,
96
+ onInstancePromise: hostRef.$onInstancePromise$,
97
+ onInstanceResolve: hostRef.$onInstanceResolve$,
98
+ onRenderResolve: hostRef.$onRenderResolve$,
99
+ queuedListeners: hostRef.$queuedListeners$,
100
+ rmListeners: hostRef.$rmListeners$,
101
+ ['s-id']: hostElement['s-id'],
102
+ ['s-cr']: hostElement['s-cr'],
103
+ ['s-lr']: hostElement['s-lr'],
104
+ ['s-p']: hostElement['s-p'],
105
+ ['s-rc']: hostElement['s-rc'],
106
+ ['s-sc']: hostElement['s-sc'],
107
+ };
108
+ };
109
+ const installDevTools = () => {
110
+ if (BUILD.devTools) {
111
+ const stencil = (win.stencil = win.stencil || {});
112
+ const originalInspect = stencil.inspect;
113
+ stencil.inspect = (ref) => {
114
+ let result = inspect(ref);
115
+ if (!result && typeof originalInspect === 'function') {
116
+ result = originalInspect(ref);
117
+ }
118
+ return result;
119
+ };
120
+ }
121
+ };
56
122
  const CONTENT_REF_ID = 'r';
57
123
  const ORG_LOCATION_ID = 'o';
58
124
  const SLOT_NODE_ID = 's';
@@ -69,6 +135,12 @@ const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
69
135
  */
70
136
  const SLOT_FB_CSS = 'slot-fb{display:contents}slot-fb[hidden]{display:none}';
71
137
  const XLINK_NS = 'http://www.w3.org/1999/xlink';
138
+ const FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS = [
139
+ 'formAssociatedCallback',
140
+ 'formResetCallback',
141
+ 'formDisabledCallback',
142
+ 'formStateRestoreCallback',
143
+ ];
72
144
  /**
73
145
  * Default style mode id
74
146
  */
@@ -77,6 +149,11 @@ const XLINK_NS = 'http://www.w3.org/1999/xlink';
77
149
  * Don't add values to these!!
78
150
  */
79
151
  const EMPTY_OBJ = {};
152
+ /**
153
+ * Namespaces
154
+ */
155
+ const SVG_NS = 'http://www.w3.org/2000/svg';
156
+ const HTML_NS = 'http://www.w3.org/1999/xhtml';
80
157
  const isDef = (v) => v != null;
81
158
  /**
82
159
  * Check whether a value is a 'complex type', defined here as an object or a
@@ -129,6 +206,11 @@ const h = (nodeName, vnodeData, ...children) => {
129
206
  if ((simple = typeof nodeName !== 'function' && !isComplexType(child))) {
130
207
  child = String(child);
131
208
  }
209
+ else if (BUILD.isDev && typeof nodeName !== 'function' && child.$flags$ === undefined) {
210
+ consoleDevError(`vNode passed as children has unexpected type.
211
+ Make sure it's using the correct h() function.
212
+ Empty objects can also be the cause, look for JSX comments that became objects.`);
213
+ }
132
214
  if (simple && lastSimple) {
133
215
  // If the previous child was simple (string), we merge both
134
216
  vNodeChildren[vNodeChildren.length - 1].$text$ += child;
@@ -143,14 +225,17 @@ const h = (nodeName, vnodeData, ...children) => {
143
225
  };
144
226
  walk(children);
145
227
  if (vnodeData) {
146
- if (vnodeData.key) {
228
+ if (BUILD.isDev && nodeName === 'input') {
229
+ validateInputProperties(vnodeData);
230
+ }
231
+ if (BUILD.vdomKey && vnodeData.key) {
147
232
  key = vnodeData.key;
148
233
  }
149
- if (vnodeData.name) {
234
+ if (BUILD.slotRelocation && vnodeData.name) {
150
235
  slotName = vnodeData.name;
151
236
  }
152
237
  // normalize class / className attributes
153
- {
238
+ if (BUILD.vdomClass) {
154
239
  const classData = vnodeData.className || vnodeData.class;
155
240
  if (classData) {
156
241
  vnodeData.class =
@@ -162,7 +247,12 @@ const h = (nodeName, vnodeData, ...children) => {
162
247
  }
163
248
  }
164
249
  }
165
- if (typeof nodeName === 'function') {
250
+ if (BUILD.isDev && vNodeChildren.some(isHost)) {
251
+ consoleDevError(`The <Host> must be the single root component. Make sure:
252
+ - You are NOT using hostData() and <Host> in the same component.
253
+ - <Host> is used once, and it's the single root component of the render() function.`);
254
+ }
255
+ if (BUILD.vdomFunctional && typeof nodeName === 'function') {
166
256
  // nodeName is a functional component
167
257
  return nodeName(vnodeData === null ? {} : vnodeData, vNodeChildren, vdomFnUtils);
168
258
  }
@@ -171,10 +261,10 @@ const h = (nodeName, vnodeData, ...children) => {
171
261
  if (vNodeChildren.length > 0) {
172
262
  vnode.$children$ = vNodeChildren;
173
263
  }
174
- {
264
+ if (BUILD.vdomKey) {
175
265
  vnode.$key$ = key;
176
266
  }
177
- {
267
+ if (BUILD.slotRelocation) {
178
268
  vnode.$name$ = slotName;
179
269
  }
180
270
  return vnode;
@@ -195,13 +285,13 @@ const newVNode = (tag, text) => {
195
285
  $elm$: null,
196
286
  $children$: null,
197
287
  };
198
- {
288
+ if (BUILD.vdomAttribute) {
199
289
  vnode.$attrs$ = null;
200
290
  }
201
- {
291
+ if (BUILD.vdomKey) {
202
292
  vnode.$key$ = null;
203
293
  }
204
- {
294
+ if (BUILD.slotRelocation) {
205
295
  vnode.$name$ = null;
206
296
  }
207
297
  return vnode;
@@ -267,6 +357,25 @@ const convertToPrivate = (node) => {
267
357
  vnode.$name$ = node.vname;
268
358
  return vnode;
269
359
  };
360
+ /**
361
+ * Validates the ordering of attributes on an input element
362
+ *
363
+ * @param inputElm the element to validate
364
+ */
365
+ const validateInputProperties = (inputElm) => {
366
+ const props = Object.keys(inputElm);
367
+ const value = props.indexOf('value');
368
+ if (value === -1) {
369
+ return;
370
+ }
371
+ const typeIndex = props.indexOf('type');
372
+ const minIndex = props.indexOf('min');
373
+ const maxIndex = props.indexOf('max');
374
+ const stepIndex = props.indexOf('step');
375
+ if (value < typeIndex || value < minIndex || value < maxIndex || value < stepIndex) {
376
+ consoleDevWarn(`The "value" prop of <input> should be set after "min", "max", "type" and "step"`);
377
+ }
378
+ };
270
379
  /**
271
380
  * Entrypoint of the client-side hydration process. Facilitates calls to hydrate the
272
381
  * document and all its nodes.
@@ -283,7 +392,7 @@ const initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
283
392
  const shadowRoot = hostElm.shadowRoot;
284
393
  const childRenderNodes = [];
285
394
  const slotNodes = [];
286
- const shadowRootNodes = shadowRoot ? [] : null;
395
+ const shadowRootNodes = BUILD.shadowDom && shadowRoot ? [] : null;
287
396
  const vnode = (hostRef.$vnode$ = newVNode(tagName, null));
288
397
  if (!plt.$orgLocNodes$) {
289
398
  initializeDocumentHydrate(doc.body, (plt.$orgLocNodes$ = new Map()));
@@ -309,7 +418,7 @@ const initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
309
418
  }
310
419
  plt.$orgLocNodes$.delete(orgLocationId);
311
420
  });
312
- if (shadowRoot) {
421
+ if (BUILD.shadowDom && shadowRoot) {
313
422
  shadowRootNodes.map((shadowRootNode) => {
314
423
  if (shadowRootNode) {
315
424
  shadowRoot.appendChild(shadowRootNode);
@@ -435,7 +544,7 @@ const clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes
435
544
  node['s-sn'] = '';
436
545
  }
437
546
  node['s-sr'] = true;
438
- if (shadowRootNodes) {
547
+ if (BUILD.shadowDom && shadowRootNodes) {
439
548
  // browser support shadowRoot and this is a shadow dom component
440
549
  // create an actual slot element
441
550
  childVNode.$elm$ = doc.createElement(childVNode.$tag$);
@@ -459,11 +568,11 @@ const clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes
459
568
  }
460
569
  else if (childNodeType === CONTENT_REF_ID) {
461
570
  // `${CONTENT_REF_ID}.${hostId}`;
462
- if (shadowRootNodes) {
571
+ if (BUILD.shadowDom && shadowRootNodes) {
463
572
  // remove the content ref comment since it's not needed for shadow
464
573
  node.remove();
465
574
  }
466
- else {
575
+ else if (BUILD.slotRelocation) {
467
576
  hostElm['s-cr'] = node;
468
577
  node['s-cn'] = true;
469
578
  }
@@ -508,6 +617,11 @@ const initializeDocumentHydrate = (node, orgLocNodes) => {
508
617
  }
509
618
  }
510
619
  };
620
+ // Private
621
+ const computeMode = (elm) => modeResolutionChain.map((h) => h(elm)).find((m) => !!m);
622
+ // Public
623
+ const setMode = (handler) => modeResolutionChain.push(handler);
624
+ const getMode = (ref) => getHostRef(ref).$modeName$;
511
625
  /**
512
626
  * Parse a new property value for a given property type.
513
627
  *
@@ -534,16 +648,16 @@ const initializeDocumentHydrate = (node, orgLocNodes) => {
534
648
  const parsePropertyValue = (propValue, propType) => {
535
649
  // ensure this value is of the correct prop type
536
650
  if (propValue != null && !isComplexType(propValue)) {
537
- if (propType & 4 /* MEMBER_FLAGS.Boolean */) {
651
+ if (BUILD.propBoolean && propType & 4 /* MEMBER_FLAGS.Boolean */) {
538
652
  // per the HTML spec, any string value means it is a boolean true value
539
653
  // but we'll cheat here and say that the string "false" is the boolean false
540
654
  return propValue === 'false' ? false : propValue === '' || !!propValue;
541
655
  }
542
- if (propType & 2 /* MEMBER_FLAGS.Number */) {
656
+ if (BUILD.propNumber && propType & 2 /* MEMBER_FLAGS.Number */) {
543
657
  // force it to be a number
544
658
  return parseFloat(propValue);
545
659
  }
546
- if (propType & 1 /* MEMBER_FLAGS.String */) {
660
+ if (BUILD.propString && propType & 1 /* MEMBER_FLAGS.String */) {
547
661
  // could have been passed as a number or boolean
548
662
  // but we still want it as a string
549
663
  return String(propValue);
@@ -555,11 +669,14 @@ const parsePropertyValue = (propValue, propType) => {
555
669
  // so no need to change to a different type
556
670
  return propValue;
557
671
  };
558
- const getElement = (ref) => (getHostRef(ref).$hostElement$ );
672
+ const getElement = (ref) => (BUILD.lazyLoad ? getHostRef(ref).$hostElement$ : ref);
559
673
  const createEvent = (ref, name, flags) => {
560
674
  const elm = getElement(ref);
561
675
  return {
562
676
  emit: (detail) => {
677
+ if (BUILD.isDev && !elm.isConnected) {
678
+ consoleDevWarn(`The "${name}" event was emitted, but the dispatcher node is no longer connected to the dom.`);
679
+ }
563
680
  return emitEvent(elm, name, {
564
681
  bubbles: !!(flags & 4 /* EVENT_FLAGS.Bubbles */),
565
682
  composed: !!(flags & 2 /* EVENT_FLAGS.Composed */),
@@ -600,8 +717,11 @@ const registerStyle = (scopeId, cssText, allowCS) => {
600
717
  };
601
718
  const addStyle = (styleContainerNode, cmpMeta, mode) => {
602
719
  var _a;
603
- const scopeId = getScopeId(cmpMeta);
720
+ const scopeId = getScopeId(cmpMeta, mode);
604
721
  const style = styles.get(scopeId);
722
+ if (!BUILD.attachStyles) {
723
+ return scopeId;
724
+ }
605
725
  // if an element is NOT connected then getRootNode() will return the wrong root node
606
726
  // so the fallback is to always use the document for the root node in those cases
607
727
  styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;
@@ -614,7 +734,8 @@ const addStyle = (styleContainerNode, cmpMeta, mode) => {
614
734
  rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
615
735
  }
616
736
  if (!appliedStyles.has(scopeId)) {
617
- if (styleContainerNode.host &&
737
+ if (BUILD.hydrateClientSide &&
738
+ styleContainerNode.host &&
618
739
  (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId}"]`))) {
619
740
  // This is only happening on native shadow-dom, do not needs CSS var shim
620
741
  styleElm.innerHTML = style;
@@ -627,6 +748,9 @@ const addStyle = (styleContainerNode, cmpMeta, mode) => {
627
748
  if (nonce != null) {
628
749
  styleElm.setAttribute('nonce', nonce);
629
750
  }
751
+ if (BUILD.hydrateServerSide || BUILD.hotModuleReplacement) {
752
+ styleElm.setAttribute(HYDRATED_STYLE_ID, scopeId);
753
+ }
630
754
  styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
631
755
  }
632
756
  // Add styles for `slot-fb` elements if we're using slots outside the Shadow DOM
@@ -638,7 +762,7 @@ const addStyle = (styleContainerNode, cmpMeta, mode) => {
638
762
  }
639
763
  }
640
764
  }
641
- else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
765
+ else if (BUILD.constructableCSS && !styleContainerNode.adoptedStyleSheets.includes(style)) {
642
766
  styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
643
767
  }
644
768
  }
@@ -649,8 +773,8 @@ const attachStyles = (hostRef) => {
649
773
  const elm = hostRef.$hostElement$;
650
774
  const flags = cmpMeta.$flags$;
651
775
  const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
652
- const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
653
- if (flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) {
776
+ const scopeId = addStyle(BUILD.shadowDom && supportsShadow && elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta, hostRef.$modeName$);
777
+ if ((BUILD.shadowDom || BUILD.scoped) && BUILD.cssAnnotations && flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) {
654
778
  // only required when we're NOT using native shadow dom (slot)
655
779
  // or this browser doesn't support native shadow dom
656
780
  // and this host element was NOT created with SSR
@@ -660,13 +784,13 @@ const attachStyles = (hostRef) => {
660
784
  // DOM WRITE!!
661
785
  elm['s-sc'] = scopeId;
662
786
  elm.classList.add(scopeId + '-h');
663
- if (flags & 2 /* CMP_FLAGS.scopedCssEncapsulation */) {
787
+ if (BUILD.scoped && flags & 2 /* CMP_FLAGS.scopedCssEncapsulation */) {
664
788
  elm.classList.add(scopeId + '-s');
665
789
  }
666
790
  }
667
791
  endAttachStyles();
668
792
  };
669
- const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
793
+ const getScopeId = (cmp, mode) => 'sc-' + (BUILD.mode && mode && cmp.$flags$ & 32 /* CMP_FLAGS.hasMode */ ? cmp.$tagName$ + '-' + mode : cmp.$tagName$);
670
794
  const convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, '$1{');
671
795
  /**
672
796
  * Production setAccessor() function based on Preact by
@@ -695,19 +819,19 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
695
819
  if (oldValue !== newValue) {
696
820
  let isProp = isMemberInElement(elm, memberName);
697
821
  let ln = memberName.toLowerCase();
698
- if (memberName === 'class') {
822
+ if (BUILD.vdomClass && memberName === 'class') {
699
823
  const classList = elm.classList;
700
824
  const oldClasses = parseClassList(oldValue);
701
825
  const newClasses = parseClassList(newValue);
702
826
  classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
703
827
  classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
704
828
  }
705
- else if (memberName === 'style') {
829
+ else if (BUILD.vdomStyle && memberName === 'style') {
706
830
  // update style attribute, css properties and values
707
- {
831
+ if (BUILD.updatable) {
708
832
  for (const prop in oldValue) {
709
833
  if (!newValue || newValue[prop] == null) {
710
- if (prop.includes('-')) {
834
+ if (!BUILD.hydrateServerSide && prop.includes('-')) {
711
835
  elm.style.removeProperty(prop);
712
836
  }
713
837
  else {
@@ -718,7 +842,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
718
842
  }
719
843
  for (const prop in newValue) {
720
844
  if (!oldValue || newValue[prop] !== oldValue[prop]) {
721
- if (prop.includes('-')) {
845
+ if (!BUILD.hydrateServerSide && prop.includes('-')) {
722
846
  elm.style.setProperty(prop, newValue[prop]);
723
847
  }
724
848
  else {
@@ -727,15 +851,16 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
727
851
  }
728
852
  }
729
853
  }
730
- else if (memberName === 'key')
854
+ else if (BUILD.vdomKey && memberName === 'key')
731
855
  ;
732
- else if (memberName === 'ref') {
856
+ else if (BUILD.vdomRef && memberName === 'ref') {
733
857
  // minifier will clean this up
734
858
  if (newValue) {
735
859
  newValue(elm);
736
860
  }
737
861
  }
738
- else if ((!isProp ) &&
862
+ else if (BUILD.vdomListener &&
863
+ (BUILD.lazyLoad ? !isProp : !elm.__lookupSetter__(memberName)) &&
739
864
  memberName[0] === 'o' &&
740
865
  memberName[1] === 'n') {
741
866
  // Event Handlers
@@ -782,7 +907,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
782
907
  }
783
908
  }
784
909
  }
785
- else {
910
+ else if (BUILD.vdomPropOrAttr) {
786
911
  // Set property if it exists and it's not a SVG
787
912
  const isComplex = isComplexType(newValue);
788
913
  if ((isProp || (isComplex && newValue !== null)) && !isSvg) {
@@ -815,7 +940,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
815
940
  * - if the newValue is null/undefined or 'false'.
816
941
  */
817
942
  let xlink = false;
818
- {
943
+ if (BUILD.vdomXlink) {
819
944
  if (ln !== (ln = ln.replace(/^xlink\:?/, ''))) {
820
945
  memberName = ln;
821
946
  xlink = true;
@@ -823,7 +948,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
823
948
  }
824
949
  if (newValue == null || newValue === false) {
825
950
  if (newValue !== false || elm.getAttribute(memberName) === '') {
826
- if (xlink) {
951
+ if (BUILD.vdomXlink && xlink) {
827
952
  elm.removeAttributeNS(XLINK_NS, memberName);
828
953
  }
829
954
  else {
@@ -833,7 +958,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
833
958
  }
834
959
  else if ((!isProp || flags & 4 /* VNODE_FLAGS.isHost */ || isSvg) && !isComplex) {
835
960
  newValue = newValue === true ? '' : newValue;
836
- if (xlink) {
961
+ if (BUILD.vdomXlink && xlink) {
837
962
  elm.setAttributeNS(XLINK_NS, memberName, newValue);
838
963
  }
839
964
  else {
@@ -861,7 +986,7 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
861
986
  : newVnode.$elm$;
862
987
  const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
863
988
  const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
864
- {
989
+ if (BUILD.updatable) {
865
990
  // remove attributes no longer present on the vnode by setting them to undefined
866
991
  for (memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
867
992
  if (!(memberName in newVnodeAttrs)) {
@@ -910,7 +1035,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
910
1035
  let elm;
911
1036
  let childNode;
912
1037
  let oldVNode;
913
- if (!useNativeShadowDom) {
1038
+ if (BUILD.slotRelocation && !useNativeShadowDom) {
914
1039
  // remember for later we need to check to relocate nodes
915
1040
  checkSlotRelocate = true;
916
1041
  if (newVNode.$tag$ === 'slot') {
@@ -925,25 +1050,38 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
925
1050
  1 /* VNODE_FLAGS.isSlotReference */;
926
1051
  }
927
1052
  }
928
- if (newVNode.$text$ !== null) {
1053
+ if (BUILD.isDev && newVNode.$elm$) {
1054
+ consoleDevError(`The JSX ${newVNode.$text$ !== null ? `"${newVNode.$text$}" text` : `"${newVNode.$tag$}" element`} node should not be shared within the same renderer. The renderer caches element lookups in order to improve performance. However, a side effect from this is that the exact same JSX node should not be reused. For more information please see https://stenciljs.com/docs/templating-jsx#avoid-shared-jsx-nodes`);
1055
+ }
1056
+ if (BUILD.vdomText && newVNode.$text$ !== null) {
929
1057
  // create text node
930
1058
  elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
931
1059
  }
932
- else if (newVNode.$flags$ & 1 /* VNODE_FLAGS.isSlotReference */) {
1060
+ else if (BUILD.slotRelocation && newVNode.$flags$ & 1 /* VNODE_FLAGS.isSlotReference */) {
933
1061
  // create a slot reference node
934
1062
  elm = newVNode.$elm$ =
935
- doc.createTextNode('');
1063
+ BUILD.isDebug || BUILD.hydrateServerSide ? slotReferenceDebugNode(newVNode) : doc.createTextNode('');
936
1064
  }
937
1065
  else {
1066
+ if (BUILD.svg && !isSvgMode) {
1067
+ isSvgMode = newVNode.$tag$ === 'svg';
1068
+ }
938
1069
  // create element
939
- elm = newVNode.$elm$ = (doc.createElement(newVNode.$flags$ & 2 /* VNODE_FLAGS.isSlotFallback */
1070
+ elm = newVNode.$elm$ = (BUILD.svg
1071
+ ? doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, BUILD.slotRelocation && newVNode.$flags$ & 2 /* VNODE_FLAGS.isSlotFallback */
1072
+ ? 'slot-fb'
1073
+ : newVNode.$tag$)
1074
+ : doc.createElement(BUILD.slotRelocation && newVNode.$flags$ & 2 /* VNODE_FLAGS.isSlotFallback */
940
1075
  ? 'slot-fb'
941
1076
  : newVNode.$tag$));
1077
+ if (BUILD.svg && isSvgMode && newVNode.$tag$ === 'foreignObject') {
1078
+ isSvgMode = false;
1079
+ }
942
1080
  // add css classes, attrs, props, listeners, etc.
943
- {
1081
+ if (BUILD.vdomAttribute) {
944
1082
  updateElement(null, newVNode, isSvgMode);
945
1083
  }
946
- if (isDef(scopeId) && elm['s-si'] !== scopeId) {
1084
+ if ((BUILD.shadowDom || BUILD.scoped) && isDef(scopeId) && elm['s-si'] !== scopeId) {
947
1085
  // if there is a scopeId and this is the initial render
948
1086
  // then let's add the scopeId as a css class
949
1087
  elm.classList.add((elm['s-si'] = scopeId));
@@ -959,11 +1097,21 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
959
1097
  }
960
1098
  }
961
1099
  }
1100
+ if (BUILD.svg) {
1101
+ if (newVNode.$tag$ === 'svg') {
1102
+ // Only reset the SVG context when we're exiting <svg> element
1103
+ isSvgMode = false;
1104
+ }
1105
+ else if (elm.tagName === 'foreignObject') {
1106
+ // Reenter SVG context when we're exiting <foreignObject> element
1107
+ isSvgMode = true;
1108
+ }
1109
+ }
962
1110
  }
963
1111
  // This needs to always happen so we can hide nodes that are projected
964
1112
  // to another component but don't end up in a slot
965
1113
  elm['s-hn'] = hostTagName;
966
- {
1114
+ if (BUILD.slotRelocation) {
967
1115
  if (newVNode.$flags$ & (2 /* VNODE_FLAGS.isSlotFallback */ | 1 /* VNODE_FLAGS.isSlotReference */)) {
968
1116
  // remember the content reference comment
969
1117
  elm['s-sr'] = true;
@@ -976,7 +1124,12 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
976
1124
  // check if we've got an old vnode for this slot
977
1125
  oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
978
1126
  if (oldVNode && oldVNode.$tag$ === newVNode.$tag$ && oldParentVNode.$elm$) {
979
- {
1127
+ if (BUILD.experimentalSlotFixes) {
1128
+ // we've got an old slot vnode and the wrapper is being replaced
1129
+ // so let's move the old slot content to the root of the element currently being rendered
1130
+ relocateToHostRoot(oldParentVNode.$elm$);
1131
+ }
1132
+ else {
980
1133
  // we've got an old slot vnode and the wrapper is being replaced
981
1134
  // so let's move the old slot content back to its original location
982
1135
  putBackInOriginalLocation(oldParentVNode.$elm$, false);
@@ -986,6 +1139,36 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
986
1139
  }
987
1140
  return elm;
988
1141
  };
1142
+ /**
1143
+ * Relocates all child nodes of an element that were a part of a previous slot relocation
1144
+ * to the root of the Stencil component currently being rendered. This happens when a parent
1145
+ * element of a slot reference node dynamically changes and triggers a re-render. We cannot use
1146
+ * `putBackInOriginalLocation()` because that may relocate nodes to elements that will not be re-rendered
1147
+ * and so they will not be relocated again.
1148
+ *
1149
+ * @param parentElm The element potentially containing relocated nodes.
1150
+ */
1151
+ const relocateToHostRoot = (parentElm) => {
1152
+ plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
1153
+ const host = parentElm.closest(hostTagName.toLowerCase());
1154
+ if (host != null) {
1155
+ const contentRefNode = Array.from(host.childNodes).find((ref) => ref['s-cr']);
1156
+ const childNodeArray = Array.from(parentElm.childNodes);
1157
+ // If we have a content ref, we need to invert the order of the nodes we're relocating
1158
+ // to preserve the correct order of elements in the DOM on future relocations
1159
+ for (const childNode of contentRefNode ? childNodeArray.reverse() : childNodeArray) {
1160
+ // Only relocate nodes that were slotted in
1161
+ if (childNode['s-sh'] != null) {
1162
+ host.insertBefore(childNode, contentRefNode !== null && contentRefNode !== void 0 ? contentRefNode : null);
1163
+ // Reset so we can correctly move the node around again.
1164
+ childNode['s-sh'] = undefined;
1165
+ // Need to tell the render pipeline to check to relocate slot content again
1166
+ checkSlotRelocate = true;
1167
+ }
1168
+ }
1169
+ }
1170
+ plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;
1171
+ };
989
1172
  const putBackInOriginalLocation = (parentElm, recursive) => {
990
1173
  plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
991
1174
  const oldSlotChildNodes = Array.from(parentElm.childNodes);
@@ -1033,9 +1216,9 @@ const putBackInOriginalLocation = (parentElm, recursive) => {
1033
1216
  * creating DOM nodes (inclusive)
1034
1217
  */
1035
1218
  const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
1036
- let containerElm = ((parentElm['s-cr'] && parentElm['s-cr'].parentNode) || parentElm);
1219
+ let containerElm = ((BUILD.slotRelocation && parentElm['s-cr'] && parentElm['s-cr'].parentNode) || parentElm);
1037
1220
  let childNode;
1038
- if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
1221
+ if (BUILD.shadowDom && containerElm.shadowRoot && containerElm.tagName === hostTagName) {
1039
1222
  containerElm = containerElm.shadowRoot;
1040
1223
  }
1041
1224
  for (; startIdx <= endIdx; ++startIdx) {
@@ -1043,7 +1226,7 @@ const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) =>
1043
1226
  childNode = createElm(null, parentVNode, startIdx, parentElm);
1044
1227
  if (childNode) {
1045
1228
  vnodes[startIdx].$elm$ = childNode;
1046
- containerElm.insertBefore(childNode, referenceNode(before) );
1229
+ containerElm.insertBefore(childNode, BUILD.slotRelocation ? referenceNode(before) : before);
1047
1230
  }
1048
1231
  }
1049
1232
  }
@@ -1066,7 +1249,7 @@ const removeVnodes = (vnodes, startIdx, endIdx) => {
1066
1249
  const elm = vnode.$elm$;
1067
1250
  nullifyVNodeRefs(vnode);
1068
1251
  if (elm) {
1069
- {
1252
+ if (BUILD.slotRelocation) {
1070
1253
  // we're removing this element
1071
1254
  // so it's possible we need to show slot fallback content now
1072
1255
  checkSlotFallbackVisibility = true;
@@ -1214,7 +1397,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh, isInitialRender = fal
1214
1397
  //
1215
1398
  // In this situation we need to patch `newEndVnode` onto `oldStartVnode`
1216
1399
  // and move the DOM element for `oldStartVnode`.
1217
- if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
1400
+ if (BUILD.slotRelocation && (oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
1218
1401
  putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
1219
1402
  }
1220
1403
  patch(oldStartVnode, newEndVnode, isInitialRender);
@@ -1255,7 +1438,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh, isInitialRender = fal
1255
1438
  // (which will handle updating any changed attributes, reconciling their
1256
1439
  // children etc) but we also need to move the DOM node to which
1257
1440
  // `oldEndVnode` corresponds.
1258
- if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
1441
+ if (BUILD.slotRelocation && (oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
1259
1442
  putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
1260
1443
  }
1261
1444
  patch(oldEndVnode, newStartVnode, isInitialRender);
@@ -1278,7 +1461,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh, isInitialRender = fal
1278
1461
  // children which have the same key as the first node in the new
1279
1462
  // children.
1280
1463
  idxInOld = -1;
1281
- {
1464
+ if (BUILD.vdomKey) {
1282
1465
  for (i = oldStartIdx; i <= oldEndIdx; ++i) {
1283
1466
  if (oldCh[i] && oldCh[i].$key$ !== null && oldCh[i].$key$ === newStartVnode.$key$) {
1284
1467
  idxInOld = i;
@@ -1286,7 +1469,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh, isInitialRender = fal
1286
1469
  }
1287
1470
  }
1288
1471
  }
1289
- if (idxInOld >= 0) {
1472
+ if (BUILD.vdomKey && idxInOld >= 0) {
1290
1473
  // We found a node in the old children which matches up with the first
1291
1474
  // node in the new children! So let's deal with that
1292
1475
  elmToMove = oldCh[idxInOld];
@@ -1313,9 +1496,12 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh, isInitialRender = fal
1313
1496
  }
1314
1497
  if (node) {
1315
1498
  // if we created a new node then handle inserting it to the DOM
1316
- {
1499
+ if (BUILD.slotRelocation) {
1317
1500
  parentReferenceNode(oldStartVnode.$elm$).insertBefore(node, referenceNode(oldStartVnode.$elm$));
1318
1501
  }
1502
+ else {
1503
+ oldStartVnode.$elm$.parentNode.insertBefore(node, oldStartVnode.$elm$);
1504
+ }
1319
1505
  }
1320
1506
  }
1321
1507
  }
@@ -1323,7 +1509,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh, isInitialRender = fal
1323
1509
  // we have some more new nodes to add which don't match up with old nodes
1324
1510
  addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx);
1325
1511
  }
1326
- else if (newStartIdx > newEndIdx) {
1512
+ else if (BUILD.updatable && newStartIdx > newEndIdx) {
1327
1513
  // there are nodes in the `oldCh` array which no longer correspond to nodes
1328
1514
  // in the new array, so lets remove them (which entails cleaning up the
1329
1515
  // relevant DOM nodes)
@@ -1353,7 +1539,7 @@ const isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
1353
1539
  // compare if two vnode to see if they're "technically" the same
1354
1540
  // need to have the same element tag, and same key to be the same
1355
1541
  if (leftVNode.$tag$ === rightVNode.$tag$) {
1356
- if (leftVNode.$tag$ === 'slot') {
1542
+ if (BUILD.slotRelocation && leftVNode.$tag$ === 'slot') {
1357
1543
  return leftVNode.$name$ === rightVNode.$name$;
1358
1544
  }
1359
1545
  // this will be set if JSX tags in the build have `key` attrs set on them
@@ -1361,7 +1547,7 @@ const isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
1361
1547
  // first render `leftVNode.$key$` will always be `null`, so we can be led
1362
1548
  // astray and, for instance, accidentally delete a DOM node that we want to
1363
1549
  // keep around.
1364
- if (!isInitialRender) {
1550
+ if (BUILD.vdomKey && !isInitialRender) {
1365
1551
  return leftVNode.$key$ === rightVNode.$key$;
1366
1552
  }
1367
1553
  return true;
@@ -1392,9 +1578,19 @@ const patch = (oldVNode, newVNode, isInitialRender = false) => {
1392
1578
  const tag = newVNode.$tag$;
1393
1579
  const text = newVNode.$text$;
1394
1580
  let defaultHolder;
1395
- if (text === null) {
1396
- {
1397
- if (tag === 'slot' && !useNativeShadowDom) ;
1581
+ if (!BUILD.vdomText || text === null) {
1582
+ if (BUILD.svg) {
1583
+ // test if we're rendering an svg element, or still rendering nodes inside of one
1584
+ // only add this to the when the compiler sees we're using an svg somewhere
1585
+ isSvgMode = tag === 'svg' ? true : tag === 'foreignObject' ? false : isSvgMode;
1586
+ }
1587
+ if (BUILD.vdomAttribute || BUILD.reflect) {
1588
+ if (BUILD.slot && tag === 'slot' && !useNativeShadowDom) {
1589
+ if (BUILD.experimentalSlotFixes && oldVNode.$name$ !== newVNode.$name$) {
1590
+ newVNode.$elm$['s-sn'] = newVNode.$name$ || '';
1591
+ relocateToHostRoot(newVNode.$elm$.parentElement);
1592
+ }
1593
+ }
1398
1594
  else {
1399
1595
  // either this is the first render of an element OR it's an update
1400
1596
  // AND we already know it's possible it could have changed
@@ -1402,30 +1598,33 @@ const patch = (oldVNode, newVNode, isInitialRender = false) => {
1402
1598
  updateElement(oldVNode, newVNode, isSvgMode);
1403
1599
  }
1404
1600
  }
1405
- if (oldChildren !== null && newChildren !== null) {
1601
+ if (BUILD.updatable && oldChildren !== null && newChildren !== null) {
1406
1602
  // looks like there's child vnodes for both the old and new vnodes
1407
1603
  // so we need to call `updateChildren` to reconcile them
1408
1604
  updateChildren(elm, oldChildren, newVNode, newChildren, isInitialRender);
1409
1605
  }
1410
1606
  else if (newChildren !== null) {
1411
1607
  // no old child vnodes, but there are new child vnodes to add
1412
- if (oldVNode.$text$ !== null) {
1608
+ if (BUILD.updatable && BUILD.vdomText && oldVNode.$text$ !== null) {
1413
1609
  // the old vnode was text, so be sure to clear it out
1414
1610
  elm.textContent = '';
1415
1611
  }
1416
1612
  // add the new vnode children
1417
1613
  addVnodes(elm, null, newVNode, newChildren, 0, newChildren.length - 1);
1418
1614
  }
1419
- else if (oldChildren !== null) {
1615
+ else if (BUILD.updatable && oldChildren !== null) {
1420
1616
  // no new child vnodes, but there are old child vnodes to remove
1421
1617
  removeVnodes(oldChildren, 0, oldChildren.length - 1);
1422
1618
  }
1619
+ if (BUILD.svg && isSvgMode && tag === 'svg') {
1620
+ isSvgMode = false;
1621
+ }
1423
1622
  }
1424
- else if ((defaultHolder = elm['s-cr'])) {
1623
+ else if (BUILD.vdomText && BUILD.slotRelocation && (defaultHolder = elm['s-cr'])) {
1425
1624
  // this element has slotted content
1426
1625
  defaultHolder.parentNode.textContent = text;
1427
1626
  }
1428
- else if (oldVNode.$text$ !== text) {
1627
+ else if (BUILD.vdomText && oldVNode.$text$ !== text) {
1429
1628
  // update the text content for the text only vnode
1430
1629
  // and also only if the text is different than before
1431
1630
  elm.data = text;
@@ -1526,7 +1725,7 @@ const markSlotContentForRelocation = (elm) => {
1526
1725
  if (!node['s-cn'] &&
1527
1726
  !node['s-nr'] &&
1528
1727
  node['s-hn'] !== childNode['s-hn'] &&
1529
- (!BUILD.experimentalSlotFixes )) {
1728
+ (!BUILD.experimentalSlotFixes || !node['s-sh'] || node['s-sh'] !== childNode['s-hn'])) {
1530
1729
  // if `node` is located in the slot that `childNode` refers to (via the
1531
1730
  // `'s-sn'` property) then we need to relocate it from it's current spot
1532
1731
  // (under the host element parent) to the right slot location
@@ -1616,7 +1815,7 @@ const isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
1616
1815
  * @param vNode a virtual DOM node
1617
1816
  */
1618
1817
  const nullifyVNodeRefs = (vNode) => {
1619
- {
1818
+ if (BUILD.vdomRef) {
1620
1819
  vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
1621
1820
  vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
1622
1821
  }
@@ -1635,7 +1834,7 @@ const nullifyVNodeRefs = (vNode) => {
1635
1834
  * @param isInitialLoad whether or not this is the first call after page load
1636
1835
  */
1637
1836
  const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1638
- var _a, _b, _c, _d;
1837
+ var _a, _b, _c, _d, _e;
1639
1838
  const hostElm = hostRef.$hostElement$;
1640
1839
  const cmpMeta = hostRef.$cmpMeta$;
1641
1840
  const oldVNode = hostRef.$vnode$ || newVNode(null, null);
@@ -1646,7 +1845,22 @@ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1646
1845
  // contains attrs that need to be set on the host element.
1647
1846
  const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
1648
1847
  hostTagName = hostElm.tagName;
1649
- if (cmpMeta.$attrsToReflect$) {
1848
+ // <Host> runtime check
1849
+ if (BUILD.isDev && Array.isArray(renderFnResults) && renderFnResults.some(isHost)) {
1850
+ throw new Error(`The <Host> must be the single root component.
1851
+ Looks like the render() function of "${hostTagName.toLowerCase()}" is returning an array that contains the <Host>.
1852
+
1853
+ The render() function should look like this instead:
1854
+
1855
+ render() {
1856
+ // Do not return an array
1857
+ return (
1858
+ <Host>{content}</Host>
1859
+ );
1860
+ }
1861
+ `);
1862
+ }
1863
+ if (BUILD.reflect && cmpMeta.$attrsToReflect$) {
1650
1864
  rootVnode.$attrs$ = rootVnode.$attrs$ || {};
1651
1865
  cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
1652
1866
  }
@@ -1674,19 +1888,19 @@ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1674
1888
  rootVnode.$tag$ = null;
1675
1889
  rootVnode.$flags$ |= 4 /* VNODE_FLAGS.isHost */;
1676
1890
  hostRef.$vnode$ = rootVnode;
1677
- rootVnode.$elm$ = oldVNode.$elm$ = (hostElm.shadowRoot || hostElm );
1678
- {
1891
+ rootVnode.$elm$ = oldVNode.$elm$ = (BUILD.shadowDom ? hostElm.shadowRoot || hostElm : hostElm);
1892
+ if (BUILD.scoped || BUILD.shadowDom) {
1679
1893
  scopeId = hostElm['s-sc'];
1680
1894
  }
1681
- useNativeShadowDom = (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) !== 0;
1682
- {
1895
+ useNativeShadowDom = supportsShadow && (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) !== 0;
1896
+ if (BUILD.slotRelocation) {
1683
1897
  contentRef = hostElm['s-cr'];
1684
1898
  // always reset
1685
1899
  checkSlotFallbackVisibility = false;
1686
1900
  }
1687
1901
  // synchronous patch
1688
1902
  patch(oldVNode, rootVnode, isInitialLoad);
1689
- {
1903
+ if (BUILD.slotRelocation) {
1690
1904
  // while we're moving nodes around existing nodes, temporarily disable
1691
1905
  // the disconnectCallback from working
1692
1906
  plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
@@ -1697,7 +1911,9 @@ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1697
1911
  if (!nodeToRelocate['s-ol']) {
1698
1912
  // add a reference node marking this node's original location
1699
1913
  // keep a reference to this node for later lookups
1700
- const orgLocationNode = doc.createTextNode('');
1914
+ const orgLocationNode = BUILD.isDebug || BUILD.hydrateServerSide
1915
+ ? originalLocationDebugNode(nodeToRelocate)
1916
+ : doc.createTextNode('');
1701
1917
  orgLocationNode['s-nr'] = nodeToRelocate;
1702
1918
  nodeToRelocate.parentNode.insertBefore((nodeToRelocate['s-ol'] = orgLocationNode), nodeToRelocate);
1703
1919
  }
@@ -1721,7 +1937,8 @@ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1721
1937
  // to make sure they get inserted into their new home in the same order they were declared in their original location.
1722
1938
  //
1723
1939
  // TODO(STENCIL-914): Remove `experimentalSlotFixes` check
1724
- {
1940
+ if (!BUILD.experimentalSlotFixes ||
1941
+ (insertBeforeNode && insertBeforeNode.nodeType === 1 /* NODE_TYPE.ElementNode */)) {
1725
1942
  let orgLocationNode = (_a = nodeToRelocate['s-ol']) === null || _a === void 0 ? void 0 : _a.previousSibling;
1726
1943
  while (orgLocationNode) {
1727
1944
  let refNode = (_b = orgLocationNode['s-nr']) !== null && _b !== void 0 ? _b : null;
@@ -1746,7 +1963,7 @@ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1746
1963
  // since that the node to relocate
1747
1964
  // has a different next sibling or parent relocated
1748
1965
  if (nodeToRelocate !== insertBeforeNode) {
1749
- if (!nodeToRelocate['s-hn'] && nodeToRelocate['s-ol']) {
1966
+ if (!BUILD.experimentalSlotFixes && !nodeToRelocate['s-hn'] && nodeToRelocate['s-ol']) {
1750
1967
  // probably a component in the index.html that doesn't have its hostname set
1751
1968
  nodeToRelocate['s-hn'] = nodeToRelocate['s-ol'].parentNode.nodeName;
1752
1969
  }
@@ -1788,19 +2005,41 @@ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1788
2005
  // always reset
1789
2006
  relocateNodes.length = 0;
1790
2007
  }
2008
+ // Hide any elements that were projected through, but don't have a slot to go to.
2009
+ // Only an issue if there were no "slots" rendered. Otherwise, nodes are hidden correctly.
2010
+ // This _only_ happens for `scoped` components!
2011
+ if (BUILD.experimentalScopedSlotChanges && cmpMeta.$flags$ & 2 /* CMP_FLAGS.scopedCssEncapsulation */) {
2012
+ for (const childNode of rootVnode.$elm$.childNodes) {
2013
+ if (childNode['s-hn'] !== hostTagName && !childNode['s-sh']) {
2014
+ // Store the initial value of `hidden` so we can reset it later when
2015
+ // moving nodes around.
2016
+ if (isInitialLoad && childNode['s-ih'] == null) {
2017
+ childNode['s-ih'] = (_e = childNode.hidden) !== null && _e !== void 0 ? _e : false;
2018
+ }
2019
+ childNode.hidden = true;
2020
+ }
2021
+ }
2022
+ }
1791
2023
  // Clear the content ref so we don't create a memory leak
1792
2024
  contentRef = undefined;
1793
2025
  };
2026
+ // slot comment debug nodes only created with the `--debug` flag
2027
+ // otherwise these nodes are text nodes w/out content
2028
+ const slotReferenceDebugNode = (slotVNode) => doc.createComment(`<slot${slotVNode.$name$ ? ' name="' + slotVNode.$name$ + '"' : ''}> (host=${hostTagName.toLowerCase()})`);
2029
+ const originalLocationDebugNode = (nodeToRelocate) => doc.createComment(`org-location for ` +
2030
+ (nodeToRelocate.localName
2031
+ ? `<${nodeToRelocate.localName}> (host=${nodeToRelocate['s-hn']})`
2032
+ : `[${nodeToRelocate.textContent}]`));
1794
2033
  const attachToAncestor = (hostRef, ancestorComponent) => {
1795
- if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
2034
+ if (BUILD.asyncLoading && ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
1796
2035
  ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
1797
2036
  }
1798
2037
  };
1799
2038
  const scheduleUpdate = (hostRef, isInitialLoad) => {
1800
- {
2039
+ if (BUILD.taskQueue && BUILD.updatable) {
1801
2040
  hostRef.$flags$ |= 16 /* HOST_FLAGS.isQueuedForUpdate */;
1802
2041
  }
1803
- if (hostRef.$flags$ & 4 /* HOST_FLAGS.isWaitingForChildren */) {
2042
+ if (BUILD.asyncLoading && hostRef.$flags$ & 4 /* HOST_FLAGS.isWaitingForChildren */) {
1804
2043
  hostRef.$flags$ |= 512 /* HOST_FLAGS.needsRerender */;
1805
2044
  return;
1806
2045
  }
@@ -1809,7 +2048,7 @@ const scheduleUpdate = (hostRef, isInitialLoad) => {
1809
2048
  // has already fired off its lifecycle update then
1810
2049
  // fire off the initial update
1811
2050
  const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
1812
- return writeTask(dispatch) ;
2051
+ return BUILD.taskQueue ? writeTask(dispatch) : dispatch();
1813
2052
  };
1814
2053
  /**
1815
2054
  * Dispatch initial-render and update lifecycle hooks, enqueuing calls to
@@ -1822,8 +2061,9 @@ const scheduleUpdate = (hostRef, isInitialLoad) => {
1822
2061
  * the component
1823
2062
  */
1824
2063
  const dispatchHooks = (hostRef, isInitialLoad) => {
2064
+ const elm = hostRef.$hostElement$;
1825
2065
  const endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$);
1826
- const instance = hostRef.$lazyInstance$ ;
2066
+ const instance = BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;
1827
2067
  // We're going to use this variable together with `enqueue` to implement a
1828
2068
  // little promise-based queue. We start out with it `undefined`. When we add
1829
2069
  // the first function to the queue we'll set this variable to be that
@@ -1838,14 +2078,15 @@ const dispatchHooks = (hostRef, isInitialLoad) => {
1838
2078
  // called in order after `dispatchHooks` exits.
1839
2079
  let maybePromise;
1840
2080
  if (isInitialLoad) {
1841
- {
2081
+ if (BUILD.lazyLoad && BUILD.hostListener) {
1842
2082
  hostRef.$flags$ |= 256 /* HOST_FLAGS.isListenReady */;
1843
2083
  if (hostRef.$queuedListeners$) {
1844
2084
  hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
1845
2085
  hostRef.$queuedListeners$ = undefined;
1846
2086
  }
1847
2087
  }
1848
- {
2088
+ emitLifecycleEvent(elm, 'componentWillLoad');
2089
+ if (BUILD.cmpWillLoad) {
1849
2090
  // If `componentWillLoad` returns a `Promise` then we want to wait on
1850
2091
  // whatever's going on in that `Promise` before we launch into
1851
2092
  // rendering the component, doing other lifecycle stuff, etc. So
@@ -1854,7 +2095,19 @@ const dispatchHooks = (hostRef, isInitialLoad) => {
1854
2095
  maybePromise = safeCall(instance, 'componentWillLoad');
1855
2096
  }
1856
2097
  }
1857
- {
2098
+ else {
2099
+ emitLifecycleEvent(elm, 'componentWillUpdate');
2100
+ if (BUILD.cmpWillUpdate) {
2101
+ // Like `componentWillLoad` above, we allow Stencil component
2102
+ // authors to return a `Promise` from this lifecycle callback, and
2103
+ // we specify that our runtime will wait for that `Promise` to
2104
+ // resolve before the component re-renders. So if the method
2105
+ // returns a `Promise` we need to keep it around!
2106
+ maybePromise = safeCall(instance, 'componentWillUpdate');
2107
+ }
2108
+ }
2109
+ emitLifecycleEvent(elm, 'componentWillRender');
2110
+ if (BUILD.cmpWillRender) {
1858
2111
  maybePromise = enqueue(maybePromise, () => safeCall(instance, 'componentWillRender'));
1859
2112
  }
1860
2113
  endSchedule();
@@ -1904,15 +2157,43 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
1904
2157
  const elm = hostRef.$hostElement$;
1905
2158
  const endUpdate = createTime('update', hostRef.$cmpMeta$.$tagName$);
1906
2159
  const rc = elm['s-rc'];
1907
- if (isInitialLoad) {
2160
+ if (BUILD.style && isInitialLoad) {
1908
2161
  // DOM WRITE!
1909
2162
  attachStyles(hostRef);
1910
2163
  }
1911
2164
  const endRender = createTime('render', hostRef.$cmpMeta$.$tagName$);
1912
- {
2165
+ if (BUILD.isDev) {
2166
+ hostRef.$flags$ |= 1024 /* HOST_FLAGS.devOnRender */;
2167
+ }
2168
+ if (BUILD.hydrateServerSide) {
2169
+ await callRender(hostRef, instance, elm, isInitialLoad);
2170
+ }
2171
+ else {
1913
2172
  callRender(hostRef, instance, elm, isInitialLoad);
1914
2173
  }
1915
- if (rc) {
2174
+ if (BUILD.isDev) {
2175
+ hostRef.$renderCount$ = hostRef.$renderCount$ === undefined ? 1 : hostRef.$renderCount$ + 1;
2176
+ hostRef.$flags$ &= ~1024 /* HOST_FLAGS.devOnRender */;
2177
+ }
2178
+ if (BUILD.hydrateServerSide) {
2179
+ try {
2180
+ // manually connected child components during server-side hydrate
2181
+ serverSideConnected(elm);
2182
+ if (isInitialLoad) {
2183
+ // using only during server-side hydrate
2184
+ if (hostRef.$cmpMeta$.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {
2185
+ elm['s-en'] = '';
2186
+ }
2187
+ else if (hostRef.$cmpMeta$.$flags$ & 2 /* CMP_FLAGS.scopedCssEncapsulation */) {
2188
+ elm['s-en'] = 'c';
2189
+ }
2190
+ }
2191
+ }
2192
+ catch (e) {
2193
+ consoleError(e, elm);
2194
+ }
2195
+ }
2196
+ if (BUILD.asyncLoading && rc) {
1916
2197
  // ok, so turns out there are some child host elements
1917
2198
  // waiting on this parent element to load
1918
2199
  // let's fire off all update callbacks waiting
@@ -1921,7 +2202,7 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
1921
2202
  }
1922
2203
  endRender();
1923
2204
  endUpdate();
1924
- {
2205
+ if (BUILD.asyncLoading) {
1925
2206
  const childrenPromises = (_a = elm['s-p']) !== null && _a !== void 0 ? _a : [];
1926
2207
  const postUpdate = () => postUpdateComponent(hostRef);
1927
2208
  if (childrenPromises.length === 0) {
@@ -1933,6 +2214,9 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
1933
2214
  childrenPromises.length = 0;
1934
2215
  }
1935
2216
  }
2217
+ else {
2218
+ postUpdateComponent(hostRef);
2219
+ }
1936
2220
  };
1937
2221
  /**
1938
2222
  * Handle making the call to the VDom renderer with the proper context given
@@ -1947,72 +2231,119 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
1947
2231
  * @returns an empty promise
1948
2232
  */
1949
2233
  const callRender = (hostRef, instance, elm, isInitialLoad) => {
2234
+ // in order for bundlers to correctly tree-shake the BUILD object
2235
+ // we need to ensure BUILD is not deoptimized within a try/catch
2236
+ // https://rollupjs.org/guide/en/#treeshake tryCatchDeoptimization
2237
+ const allRenderFn = BUILD.allRenderFn ? true : false;
2238
+ const lazyLoad = BUILD.lazyLoad ? true : false;
2239
+ const taskQueue = BUILD.taskQueue ? true : false;
2240
+ const updatable = BUILD.updatable ? true : false;
1950
2241
  try {
2242
+ renderingRef = instance;
1951
2243
  /**
1952
2244
  * minification optimization: `allRenderFn` is `true` if all components have a `render`
1953
2245
  * method, so we can call the method immediately. If not, check before calling it.
1954
2246
  */
1955
- instance = instance.render() ;
1956
- {
2247
+ instance = allRenderFn ? instance.render() : instance.render && instance.render();
2248
+ if (updatable && taskQueue) {
1957
2249
  hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
1958
2250
  }
1959
- {
2251
+ if (updatable || lazyLoad) {
1960
2252
  hostRef.$flags$ |= 2 /* HOST_FLAGS.hasRendered */;
1961
2253
  }
1962
- {
1963
- {
2254
+ if (BUILD.hasRenderFn || BUILD.reflect) {
2255
+ if (BUILD.vdomRender || BUILD.reflect) {
1964
2256
  // looks like we've got child nodes to render into this host element
1965
2257
  // or we need to update the css class/attrs on the host element
1966
2258
  // DOM WRITE!
1967
- {
2259
+ if (BUILD.hydrateServerSide) {
2260
+ return Promise.resolve(instance).then((value) => renderVdom(hostRef, value, isInitialLoad));
2261
+ }
2262
+ else {
1968
2263
  renderVdom(hostRef, instance, isInitialLoad);
1969
2264
  }
1970
2265
  }
2266
+ else {
2267
+ const shadowRoot = elm.shadowRoot;
2268
+ if (hostRef.$cmpMeta$.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {
2269
+ shadowRoot.textContent = instance;
2270
+ }
2271
+ else {
2272
+ elm.textContent = instance;
2273
+ }
2274
+ }
1971
2275
  }
1972
2276
  }
1973
2277
  catch (e) {
1974
2278
  consoleError(e, hostRef.$hostElement$);
1975
2279
  }
2280
+ renderingRef = null;
1976
2281
  return null;
1977
2282
  };
2283
+ const getRenderingRef = () => renderingRef;
1978
2284
  const postUpdateComponent = (hostRef) => {
1979
2285
  const tagName = hostRef.$cmpMeta$.$tagName$;
1980
2286
  const elm = hostRef.$hostElement$;
1981
2287
  const endPostUpdate = createTime('postUpdate', tagName);
1982
- const instance = hostRef.$lazyInstance$ ;
2288
+ const instance = BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;
1983
2289
  const ancestorComponent = hostRef.$ancestorComponent$;
1984
- {
2290
+ if (BUILD.cmpDidRender) {
2291
+ if (BUILD.isDev) {
2292
+ hostRef.$flags$ |= 1024 /* HOST_FLAGS.devOnRender */;
2293
+ }
1985
2294
  safeCall(instance, 'componentDidRender');
2295
+ if (BUILD.isDev) {
2296
+ hostRef.$flags$ &= ~1024 /* HOST_FLAGS.devOnRender */;
2297
+ }
1986
2298
  }
2299
+ emitLifecycleEvent(elm, 'componentDidRender');
1987
2300
  if (!(hostRef.$flags$ & 64 /* HOST_FLAGS.hasLoadedComponent */)) {
1988
2301
  hostRef.$flags$ |= 64 /* HOST_FLAGS.hasLoadedComponent */;
1989
- {
2302
+ if (BUILD.asyncLoading && BUILD.cssAnnotations) {
1990
2303
  // DOM WRITE!
1991
2304
  addHydratedFlag(elm);
1992
2305
  }
1993
- {
2306
+ if (BUILD.cmpDidLoad) {
2307
+ if (BUILD.isDev) {
2308
+ hostRef.$flags$ |= 2048 /* HOST_FLAGS.devOnDidLoad */;
2309
+ }
1994
2310
  safeCall(instance, 'componentDidLoad');
2311
+ if (BUILD.isDev) {
2312
+ hostRef.$flags$ &= ~2048 /* HOST_FLAGS.devOnDidLoad */;
2313
+ }
1995
2314
  }
2315
+ emitLifecycleEvent(elm, 'componentDidLoad');
1996
2316
  endPostUpdate();
1997
- {
2317
+ if (BUILD.asyncLoading) {
1998
2318
  hostRef.$onReadyResolve$(elm);
1999
2319
  if (!ancestorComponent) {
2000
- appDidLoad();
2320
+ appDidLoad(tagName);
2001
2321
  }
2002
2322
  }
2003
2323
  }
2004
2324
  else {
2005
- {
2325
+ if (BUILD.cmpDidUpdate) {
2326
+ // we've already loaded this component
2327
+ // fire off the user's componentDidUpdate method (if one was provided)
2328
+ // componentDidUpdate runs AFTER render() has been called
2329
+ // and all child components have finished updating
2330
+ if (BUILD.isDev) {
2331
+ hostRef.$flags$ |= 1024 /* HOST_FLAGS.devOnRender */;
2332
+ }
2006
2333
  safeCall(instance, 'componentDidUpdate');
2334
+ if (BUILD.isDev) {
2335
+ hostRef.$flags$ &= ~1024 /* HOST_FLAGS.devOnRender */;
2336
+ }
2007
2337
  }
2338
+ emitLifecycleEvent(elm, 'componentDidUpdate');
2008
2339
  endPostUpdate();
2009
2340
  }
2010
- {
2341
+ if (BUILD.method && BUILD.lazyLoad) {
2011
2342
  hostRef.$onInstanceResolve$(elm);
2012
2343
  }
2013
2344
  // load events fire from bottom to top
2014
2345
  // the deepest elements load first then bubbles up
2015
- {
2346
+ if (BUILD.asyncLoading) {
2016
2347
  if (hostRef.$onRenderResolve$) {
2017
2348
  hostRef.$onRenderResolve$();
2018
2349
  hostRef.$onRenderResolve$ = undefined;
@@ -2026,13 +2357,32 @@ const postUpdateComponent = (hostRef) => {
2026
2357
  // ( •_•)>⌐■-■
2027
2358
  // (⌐■_■)
2028
2359
  };
2360
+ const forceUpdate = (ref) => {
2361
+ if (BUILD.updatable && (Build.isBrowser || Build.isTesting)) {
2362
+ const hostRef = getHostRef(ref);
2363
+ const isConnected = hostRef.$hostElement$.isConnected;
2364
+ if (isConnected &&
2365
+ (hostRef.$flags$ & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) {
2366
+ scheduleUpdate(hostRef, false);
2367
+ }
2368
+ // Returns "true" when the forced update was successfully scheduled
2369
+ return isConnected;
2370
+ }
2371
+ return false;
2372
+ };
2029
2373
  const appDidLoad = (who) => {
2030
2374
  // on appload
2031
2375
  // we have finish the first big initial render
2032
- {
2376
+ if (BUILD.cssAnnotations) {
2033
2377
  addHydratedFlag(doc.documentElement);
2034
2378
  }
2379
+ if (BUILD.asyncQueue) {
2380
+ plt.$flags$ |= 2 /* PLATFORM_FLAGS.appLoaded */;
2381
+ }
2035
2382
  nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
2383
+ if (BUILD.profile && performance.measure) {
2384
+ performance.measure(`[Stencil] ${NAMESPACE} initial load (by ${who})`, 'st:app:start');
2385
+ }
2036
2386
  };
2037
2387
  /**
2038
2388
  * Allows to safely call a method, e.g. `componentDidLoad`, on an instance,
@@ -2055,27 +2405,67 @@ const safeCall = (instance, method, arg) => {
2055
2405
  }
2056
2406
  return undefined;
2057
2407
  };
2058
- const addHydratedFlag = (elm) => elm.classList.add('hydrated')
2059
- ;
2408
+ /**
2409
+ * For debugging purposes as `BUILD.lifecycleDOMEvents` is `false` by default and will
2410
+ * get removed by the compiler. Used for timing events to see how long they take.
2411
+ * @param elm the target of the Event
2412
+ * @param lifecycleName name of the event
2413
+ */
2414
+ const emitLifecycleEvent = (elm, lifecycleName) => {
2415
+ if (BUILD.lifecycleDOMEvents) {
2416
+ emitEvent(elm, 'stencil_' + lifecycleName, {
2417
+ bubbles: true,
2418
+ composed: true,
2419
+ detail: {
2420
+ namespace: NAMESPACE,
2421
+ },
2422
+ });
2423
+ }
2424
+ };
2425
+ const addHydratedFlag = (elm) => BUILD.hydratedClass
2426
+ ? elm.classList.add('hydrated')
2427
+ : BUILD.hydratedAttribute
2428
+ ? elm.setAttribute('hydrated', '')
2429
+ : undefined;
2430
+ const serverSideConnected = (elm) => {
2431
+ const children = elm.children;
2432
+ if (children != null) {
2433
+ for (let i = 0, ii = children.length; i < ii; i++) {
2434
+ const childElm = children[i];
2435
+ if (typeof childElm.connectedCallback === 'function') {
2436
+ childElm.connectedCallback();
2437
+ }
2438
+ serverSideConnected(childElm);
2439
+ }
2440
+ }
2441
+ };
2060
2442
  const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
2061
2443
  const setValue = (ref, propName, newVal, cmpMeta) => {
2062
2444
  // check our new property value against our internal value
2063
2445
  const hostRef = getHostRef(ref);
2064
- const elm = hostRef.$hostElement$ ;
2446
+ const elm = BUILD.lazyLoad ? hostRef.$hostElement$ : ref;
2065
2447
  const oldVal = hostRef.$instanceValues$.get(propName);
2066
2448
  const flags = hostRef.$flags$;
2067
- const instance = hostRef.$lazyInstance$ ;
2449
+ const instance = BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;
2068
2450
  newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
2069
2451
  // explicitly check for NaN on both sides, as `NaN === NaN` is always false
2070
2452
  const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
2071
2453
  const didValueChange = newVal !== oldVal && !areBothNaN;
2072
- if ((!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) || oldVal === undefined) && didValueChange) {
2454
+ if ((!BUILD.lazyLoad || !(flags & 8 /* HOST_FLAGS.isConstructingInstance */) || oldVal === undefined) && didValueChange) {
2073
2455
  // gadzooks! the property's value has changed!!
2074
2456
  // set our new value!
2075
2457
  hostRef.$instanceValues$.set(propName, newVal);
2076
- if (instance) {
2458
+ if (BUILD.isDev) {
2459
+ if (hostRef.$flags$ & 1024 /* HOST_FLAGS.devOnRender */) {
2460
+ consoleDevWarn(`The state/prop "${propName}" changed during rendering. This can potentially lead to infinite-loops and other bugs.`, '\nElement', elm, '\nNew value', newVal, '\nOld value', oldVal);
2461
+ }
2462
+ else if (hostRef.$flags$ & 2048 /* HOST_FLAGS.devOnDidLoad */) {
2463
+ consoleDevWarn(`The state/prop "${propName}" changed during "componentDidLoad()", this triggers extra re-renders, try to setup on "componentWillLoad()"`, '\nElement', elm, '\nNew value', newVal, '\nOld value', oldVal);
2464
+ }
2465
+ }
2466
+ if (!BUILD.lazyLoad || instance) {
2077
2467
  // get an array of method names of watch functions to call
2078
- if (cmpMeta.$watchers$ && flags & 128 /* HOST_FLAGS.isWatchReady */) {
2468
+ if (BUILD.watchCallback && cmpMeta.$watchers$ && flags & 128 /* HOST_FLAGS.isWatchReady */) {
2079
2469
  const watchMethods = cmpMeta.$watchers$[propName];
2080
2470
  if (watchMethods) {
2081
2471
  // this instance is watching for when this property changed
@@ -2090,7 +2480,13 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
2090
2480
  });
2091
2481
  }
2092
2482
  }
2093
- if ((flags & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) {
2483
+ if (BUILD.updatable &&
2484
+ (flags & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) {
2485
+ if (BUILD.cmpShouldUpdate && instance.componentShouldUpdate) {
2486
+ if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
2487
+ return;
2488
+ }
2489
+ }
2094
2490
  // looks like this value actually changed, so we've got work to do!
2095
2491
  // but only if we've already rendered, otherwise just chill out
2096
2492
  // queue that we need to do an update, but don't worry about queuing
@@ -2113,15 +2509,39 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
2113
2509
  const proxyComponent = (Cstr, cmpMeta, flags) => {
2114
2510
  var _a;
2115
2511
  const prototype = Cstr.prototype;
2116
- if (cmpMeta.$members$) {
2117
- if (Cstr.watchers) {
2512
+ /**
2513
+ * proxy form associated custom element lifecycle callbacks
2514
+ * @ref https://web.dev/articles/more-capable-form-controls#lifecycle_callbacks
2515
+ */
2516
+ if (BUILD.formAssociated && cmpMeta.$flags$ & 64 /* CMP_FLAGS.formAssociated */ && flags & 1 /* PROXY_FLAGS.isElementConstructor */) {
2517
+ FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS.forEach((cbName) => Object.defineProperty(prototype, cbName, {
2518
+ value(...args) {
2519
+ const hostRef = getHostRef(this);
2520
+ const elm = BUILD.lazyLoad ? hostRef.$hostElement$ : this;
2521
+ const instance = BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;
2522
+ if (!instance) {
2523
+ hostRef.$onReadyPromise$.then((instance) => {
2524
+ const cb = instance[cbName];
2525
+ typeof cb === 'function' && cb.call(instance, ...args);
2526
+ });
2527
+ }
2528
+ else {
2529
+ const cb = instance[cbName];
2530
+ typeof cb === 'function' && cb.call(instance, ...args);
2531
+ }
2532
+ },
2533
+ }));
2534
+ }
2535
+ if (BUILD.member && cmpMeta.$members$) {
2536
+ if (BUILD.watchCallback && Cstr.watchers) {
2118
2537
  cmpMeta.$watchers$ = Cstr.watchers;
2119
2538
  }
2120
2539
  // It's better to have a const than two Object.entries()
2121
2540
  const members = Object.entries(cmpMeta.$members$);
2122
2541
  members.map(([memberName, [memberFlags]]) => {
2123
- if ((memberFlags & 31 /* MEMBER_FLAGS.Prop */ ||
2124
- ((flags & 2 /* PROXY_FLAGS.proxyState */) && memberFlags & 32 /* MEMBER_FLAGS.State */))) {
2542
+ if ((BUILD.prop || BUILD.state) &&
2543
+ (memberFlags & 31 /* MEMBER_FLAGS.Prop */ ||
2544
+ ((!BUILD.lazyLoad || flags & 2 /* PROXY_FLAGS.proxyState */) && memberFlags & 32 /* MEMBER_FLAGS.State */))) {
2125
2545
  // proxyComponent - prop
2126
2546
  Object.defineProperty(prototype, memberName, {
2127
2547
  get() {
@@ -2129,6 +2549,21 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
2129
2549
  return getValue(this, memberName);
2130
2550
  },
2131
2551
  set(newValue) {
2552
+ // only during dev time
2553
+ if (BUILD.isDev) {
2554
+ const ref = getHostRef(this);
2555
+ if (
2556
+ // we are proxying the instance (not element)
2557
+ (flags & 1 /* PROXY_FLAGS.isElementConstructor */) === 0 &&
2558
+ // the element is not constructing
2559
+ (ref && ref.$flags$ & 8 /* HOST_FLAGS.isConstructingInstance */) === 0 &&
2560
+ // the member is a prop
2561
+ (memberFlags & 31 /* MEMBER_FLAGS.Prop */) !== 0 &&
2562
+ // the member is not mutable
2563
+ (memberFlags & 1024 /* MEMBER_FLAGS.Mutable */) === 0) {
2564
+ consoleDevWarn(`@Prop() "${memberName}" on <${cmpMeta.$tagName$}> is immutable but was modified from within the component.\nMore information: https://stenciljs.com/docs/properties#prop-mutability`);
2565
+ }
2566
+ }
2132
2567
  // proxyComponent, set value
2133
2568
  setValue(this, memberName, newValue, cmpMeta);
2134
2569
  },
@@ -2136,7 +2571,9 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
2136
2571
  enumerable: true,
2137
2572
  });
2138
2573
  }
2139
- else if (flags & 1 /* PROXY_FLAGS.isElementConstructor */ &&
2574
+ else if (BUILD.lazyLoad &&
2575
+ BUILD.method &&
2576
+ flags & 1 /* PROXY_FLAGS.isElementConstructor */ &&
2140
2577
  memberFlags & 64 /* MEMBER_FLAGS.Method */) {
2141
2578
  // proxyComponent - method
2142
2579
  Object.defineProperty(prototype, memberName, {
@@ -2148,7 +2585,7 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
2148
2585
  });
2149
2586
  }
2150
2587
  });
2151
- if ((flags & 1 /* PROXY_FLAGS.isElementConstructor */)) {
2588
+ if (BUILD.observeAttribute && (!BUILD.lazyLoad || flags & 1 /* PROXY_FLAGS.isElementConstructor */)) {
2152
2589
  const attrNameToPropName = new Map();
2153
2590
  prototype.attributeChangedCallback = function (attrName, oldValue, newValue) {
2154
2591
  plt.jmp(() => {
@@ -2212,7 +2649,8 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
2212
2649
  !(flags & 8 /* HOST_FLAGS.isConstructingInstance */) &&
2213
2650
  flags & 128 /* HOST_FLAGS.isWatchReady */ &&
2214
2651
  newValue !== oldValue) {
2215
- const instance = hostRef.$lazyInstance$ ;
2652
+ const elm = BUILD.lazyLoad ? hostRef.$hostElement$ : this;
2653
+ const instance = BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;
2216
2654
  const entry = (_a = cmpMeta.$watchers$) === null || _a === void 0 ? void 0 : _a[attrName];
2217
2655
  entry === null || entry === void 0 ? void 0 : entry.forEach((callbackName) => {
2218
2656
  if (instance[callbackName] != null) {
@@ -2238,7 +2676,7 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
2238
2676
  var _a;
2239
2677
  const attrName = m[1] || propName;
2240
2678
  attrNameToPropName.set(attrName, propName);
2241
- if (m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {
2679
+ if (BUILD.reflect && m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {
2242
2680
  (_a = cmpMeta.$attrsToReflect$) === null || _a === void 0 ? void 0 : _a.push([propName, attrName]);
2243
2681
  }
2244
2682
  return attrName;
@@ -2265,22 +2703,25 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2265
2703
  // Let the runtime know that the component has been initialized
2266
2704
  hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
2267
2705
  const bundleId = cmpMeta.$lazyBundleId$;
2268
- if (bundleId) {
2706
+ if ((BUILD.lazyLoad || BUILD.hydrateClientSide) && bundleId) {
2269
2707
  // lazy loaded components
2270
2708
  // request the component's implementation to be
2271
2709
  // wired up with the host element
2272
- Cstr = loadModule(cmpMeta);
2710
+ Cstr = loadModule(cmpMeta, hostRef, hmrVersionId);
2273
2711
  if (Cstr.then) {
2274
2712
  // Await creates a micro-task avoid if possible
2275
- const endLoad = uniqueTime();
2713
+ const endLoad = uniqueTime(`st:load:${cmpMeta.$tagName$}:${hostRef.$modeName$}`, `[Stencil] Load module for <${cmpMeta.$tagName$}>`);
2276
2714
  Cstr = await Cstr;
2277
2715
  endLoad();
2278
2716
  }
2279
- if (!Cstr.isProxied) {
2717
+ if ((BUILD.isDev || BUILD.isDebug) && !Cstr) {
2718
+ throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
2719
+ }
2720
+ if (BUILD.member && !Cstr.isProxied) {
2280
2721
  // we've never proxied this Constructor before
2281
2722
  // let's add the getters/setters to its prototype before
2282
2723
  // the first time we create an instance of the implementation
2283
- {
2724
+ if (BUILD.watchCallback) {
2284
2725
  cmpMeta.$watchers$ = Cstr.watchers;
2285
2726
  }
2286
2727
  proxyComponent(Cstr, cmpMeta, 2 /* PROXY_FLAGS.proxyState */);
@@ -2290,7 +2731,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2290
2731
  // ok, time to construct the instance
2291
2732
  // but let's keep track of when we start and stop
2292
2733
  // so that the getters/setters don't incorrectly step on data
2293
- {
2734
+ if (BUILD.member) {
2294
2735
  hostRef.$flags$ |= 8 /* HOST_FLAGS.isConstructingInstance */;
2295
2736
  }
2296
2737
  // construct the lazy-loaded component implementation
@@ -2303,10 +2744,10 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2303
2744
  catch (e) {
2304
2745
  consoleError(e);
2305
2746
  }
2306
- {
2747
+ if (BUILD.member) {
2307
2748
  hostRef.$flags$ &= ~8 /* HOST_FLAGS.isConstructingInstance */;
2308
2749
  }
2309
- {
2750
+ if (BUILD.watchCallback) {
2310
2751
  hostRef.$flags$ |= 128 /* HOST_FLAGS.isWatchReady */;
2311
2752
  }
2312
2753
  endNewInstance();
@@ -2320,12 +2761,25 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2320
2761
  // Stencil has completed instantiating the component.
2321
2762
  customElements.whenDefined(cmpMeta.$tagName$).then(() => (hostRef.$flags$ |= 128 /* HOST_FLAGS.isWatchReady */));
2322
2763
  }
2323
- if (Cstr.style) {
2764
+ if (BUILD.style && Cstr.style) {
2324
2765
  // this component has styles but we haven't registered them yet
2325
2766
  let style = Cstr.style;
2326
- const scopeId = getScopeId(cmpMeta);
2767
+ if (BUILD.mode && typeof style !== 'string') {
2768
+ style = style[(hostRef.$modeName$ = computeMode(elm))];
2769
+ if (BUILD.hydrateServerSide && hostRef.$modeName$) {
2770
+ elm.setAttribute('s-mode', hostRef.$modeName$);
2771
+ }
2772
+ }
2773
+ const scopeId = getScopeId(cmpMeta, hostRef.$modeName$);
2327
2774
  if (!styles.has(scopeId)) {
2328
2775
  const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);
2776
+ if (!BUILD.hydrateServerSide &&
2777
+ BUILD.shadowDom &&
2778
+ // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
2779
+ BUILD.shadowDomShim &&
2780
+ cmpMeta.$flags$ & 8 /* CMP_FLAGS.needsShadowDomShim */) {
2781
+ style = await import('./shadow-css-2e0fed52.js').then((m) => m.scopeCss(style, scopeId, false));
2782
+ }
2329
2783
  registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */));
2330
2784
  endRegisterStyles();
2331
2785
  }
@@ -2334,7 +2788,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2334
2788
  // we've successfully created a lazy instance
2335
2789
  const ancestorComponent = hostRef.$ancestorComponent$;
2336
2790
  const schedule = () => scheduleUpdate(hostRef, true);
2337
- if (ancestorComponent && ancestorComponent['s-rc']) {
2791
+ if (BUILD.asyncLoading && ancestorComponent && ancestorComponent['s-rc']) {
2338
2792
  // this is the initial load and this component it has an ancestor component
2339
2793
  // but the ancestor component has NOT fired its will update lifecycle yet
2340
2794
  // so let's just cool our jets and wait for the ancestor to continue first
@@ -2348,7 +2802,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2348
2802
  }
2349
2803
  };
2350
2804
  const fireConnectedCallback = (instance) => {
2351
- {
2805
+ if (BUILD.lazyLoad && BUILD.connectedCallback) {
2352
2806
  safeCall(instance, 'connectedCallback');
2353
2807
  }
2354
2808
  };
@@ -2357,38 +2811,47 @@ const connectedCallback = (elm) => {
2357
2811
  const hostRef = getHostRef(elm);
2358
2812
  const cmpMeta = hostRef.$cmpMeta$;
2359
2813
  const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);
2814
+ if (BUILD.hostListenerTargetParent) {
2815
+ // only run if we have listeners being attached to a parent
2816
+ addHostEventListeners(elm, hostRef, cmpMeta.$listeners$, true);
2817
+ }
2360
2818
  if (!(hostRef.$flags$ & 1 /* HOST_FLAGS.hasConnected */)) {
2361
2819
  // first time this component has connected
2362
2820
  hostRef.$flags$ |= 1 /* HOST_FLAGS.hasConnected */;
2363
2821
  let hostId;
2364
- {
2822
+ if (BUILD.hydrateClientSide) {
2365
2823
  hostId = elm.getAttribute(HYDRATE_ID);
2366
2824
  if (hostId) {
2367
- if (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {
2368
- const scopeId = addStyle(elm.shadowRoot, cmpMeta);
2825
+ if (BUILD.shadowDom && supportsShadow && cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {
2826
+ const scopeId = BUILD.mode
2827
+ ? addStyle(elm.shadowRoot, cmpMeta, elm.getAttribute('s-mode'))
2828
+ : addStyle(elm.shadowRoot, cmpMeta);
2369
2829
  elm.classList.remove(scopeId + '-h', scopeId + '-s');
2370
2830
  }
2371
2831
  initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
2372
2832
  }
2373
2833
  }
2374
- if (!hostId) {
2834
+ if (BUILD.slotRelocation && !hostId) {
2375
2835
  // initUpdate
2376
2836
  // if the slot polyfill is required we'll need to put some nodes
2377
2837
  // in here to act as original content anchors as we move nodes around
2378
2838
  // host element has been connected to the DOM
2379
- if ((// TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
2839
+ if (BUILD.hydrateServerSide ||
2840
+ ((BUILD.slot || BUILD.shadowDom) &&
2841
+ // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
2380
2842
  cmpMeta.$flags$ & (4 /* CMP_FLAGS.hasSlotRelocation */ | 8 /* CMP_FLAGS.needsShadowDomShim */))) {
2381
2843
  setContentReference(elm);
2382
2844
  }
2383
2845
  }
2384
- {
2846
+ if (BUILD.asyncLoading) {
2385
2847
  // find the first ancestor component (if there is one) and register
2386
2848
  // this component as one of the actively loading child components for its ancestor
2387
2849
  let ancestorComponent = elm;
2388
2850
  while ((ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host)) {
2389
2851
  // climb up the ancestors looking for the first
2390
2852
  // component that hasn't finished its lifecycle update yet
2391
- if ((ancestorComponent.nodeType === 1 /* NODE_TYPE.ElementNode */ &&
2853
+ if ((BUILD.hydrateClientSide &&
2854
+ ancestorComponent.nodeType === 1 /* NODE_TYPE.ElementNode */ &&
2392
2855
  ancestorComponent.hasAttribute('s-id') &&
2393
2856
  ancestorComponent['s-p']) ||
2394
2857
  ancestorComponent['s-p']) {
@@ -2401,7 +2864,7 @@ const connectedCallback = (elm) => {
2401
2864
  }
2402
2865
  // Lazy properties
2403
2866
  // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
2404
- if (cmpMeta.$members$) {
2867
+ if (BUILD.prop && !BUILD.hydrateServerSide && cmpMeta.$members$) {
2405
2868
  Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
2406
2869
  if (memberFlags & 31 /* MEMBER_FLAGS.Prop */ && elm.hasOwnProperty(memberName)) {
2407
2870
  const value = elm[memberName];
@@ -2410,7 +2873,14 @@ const connectedCallback = (elm) => {
2410
2873
  }
2411
2874
  });
2412
2875
  }
2413
- {
2876
+ if (BUILD.initializeNextTick) {
2877
+ // connectedCallback, taskQueue, initialLoad
2878
+ // angular sets attribute AFTER connectCallback
2879
+ // https://github.com/angular/angular/issues/18909
2880
+ // https://github.com/angular/angular/issues/19940
2881
+ nextTick(() => initializeComponent(elm, hostRef, cmpMeta));
2882
+ }
2883
+ else {
2414
2884
  initializeComponent(elm, hostRef, cmpMeta);
2415
2885
  }
2416
2886
  }
@@ -2418,7 +2888,7 @@ const connectedCallback = (elm) => {
2418
2888
  // not the first time this has connected
2419
2889
  // reattach any event listeners to the host
2420
2890
  // since they would have been removed when disconnected
2421
- addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
2891
+ addHostEventListeners(elm, hostRef, cmpMeta.$listeners$, false);
2422
2892
  // fire off connectedCallback() on component instance
2423
2893
  if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$lazyInstance$) {
2424
2894
  fireConnectedCallback(hostRef.$lazyInstance$);
@@ -2437,25 +2907,31 @@ const setContentReference = (elm) => {
2437
2907
  // let's pick out the inner content for slot projection
2438
2908
  // create a node to represent where the original
2439
2909
  // content was first placed, which is useful later on
2440
- const contentRefElm = (elm['s-cr'] = doc.createComment(''));
2910
+ const contentRefElm = (elm['s-cr'] = doc.createComment(BUILD.isDebug ? `content-ref (host=${elm.localName})` : ''));
2441
2911
  contentRefElm['s-cn'] = true;
2442
2912
  elm.insertBefore(contentRefElm, elm.firstChild);
2443
2913
  };
2444
2914
  const disconnectInstance = (instance) => {
2445
- {
2915
+ if (BUILD.lazyLoad && BUILD.disconnectedCallback) {
2446
2916
  safeCall(instance, 'disconnectedCallback');
2447
2917
  }
2918
+ if (BUILD.cmpDidUnload) {
2919
+ safeCall(instance, 'componentDidUnload');
2920
+ }
2448
2921
  };
2449
2922
  const disconnectedCallback = async (elm) => {
2450
2923
  if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
2451
2924
  const hostRef = getHostRef(elm);
2452
- {
2925
+ if (BUILD.hostListener) {
2453
2926
  if (hostRef.$rmListeners$) {
2454
2927
  hostRef.$rmListeners$.map((rmListener) => rmListener());
2455
2928
  hostRef.$rmListeners$ = undefined;
2456
2929
  }
2457
2930
  }
2458
- if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$lazyInstance$) {
2931
+ if (!BUILD.lazyLoad) {
2932
+ disconnectInstance(elm);
2933
+ }
2934
+ else if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$lazyInstance$) {
2459
2935
  disconnectInstance(hostRef.$lazyInstance$);
2460
2936
  }
2461
2937
  else if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$onReadyPromise$) {
@@ -2463,9 +2939,556 @@ const disconnectedCallback = async (elm) => {
2463
2939
  }
2464
2940
  }
2465
2941
  };
2942
+ const patchPseudoShadowDom = (hostElementPrototype, descriptorPrototype) => {
2943
+ patchCloneNode(hostElementPrototype);
2944
+ patchSlotAppendChild(hostElementPrototype);
2945
+ patchSlotAppend(hostElementPrototype);
2946
+ patchSlotPrepend(hostElementPrototype);
2947
+ patchSlotInsertAdjacentElement(hostElementPrototype);
2948
+ patchSlotInsertAdjacentHTML(hostElementPrototype);
2949
+ patchSlotInsertAdjacentText(hostElementPrototype);
2950
+ patchTextContent(hostElementPrototype);
2951
+ patchChildSlotNodes(hostElementPrototype, descriptorPrototype);
2952
+ patchSlotRemoveChild(hostElementPrototype);
2953
+ };
2954
+ const patchCloneNode = (HostElementPrototype) => {
2955
+ const orgCloneNode = HostElementPrototype.cloneNode;
2956
+ HostElementPrototype.cloneNode = function (deep) {
2957
+ const srcNode = this;
2958
+ const isShadowDom = BUILD.shadowDom ? srcNode.shadowRoot && supportsShadow : false;
2959
+ const clonedNode = orgCloneNode.call(srcNode, isShadowDom ? deep : false);
2960
+ if (BUILD.slot && !isShadowDom && deep) {
2961
+ let i = 0;
2962
+ let slotted, nonStencilNode;
2963
+ const stencilPrivates = [
2964
+ 's-id',
2965
+ 's-cr',
2966
+ 's-lr',
2967
+ 's-rc',
2968
+ 's-sc',
2969
+ 's-p',
2970
+ 's-cn',
2971
+ 's-sr',
2972
+ 's-sn',
2973
+ 's-hn',
2974
+ 's-ol',
2975
+ 's-nr',
2976
+ 's-si',
2977
+ 's-rf',
2978
+ ];
2979
+ for (; i < srcNode.childNodes.length; i++) {
2980
+ slotted = srcNode.childNodes[i]['s-nr'];
2981
+ nonStencilNode = stencilPrivates.every((privateField) => !srcNode.childNodes[i][privateField]);
2982
+ if (slotted) {
2983
+ if (BUILD.appendChildSlotFix && clonedNode.__appendChild) {
2984
+ clonedNode.__appendChild(slotted.cloneNode(true));
2985
+ }
2986
+ else {
2987
+ clonedNode.appendChild(slotted.cloneNode(true));
2988
+ }
2989
+ }
2990
+ if (nonStencilNode) {
2991
+ clonedNode.appendChild(srcNode.childNodes[i].cloneNode(true));
2992
+ }
2993
+ }
2994
+ }
2995
+ return clonedNode;
2996
+ };
2997
+ };
2998
+ /**
2999
+ * Patches the `appendChild` method on a `scoped` Stencil component.
3000
+ * The patch will attempt to find a slot with the same name as the node being appended
3001
+ * and insert it into the slot reference if found. Otherwise, it falls-back to the original
3002
+ * `appendChild` method.
3003
+ *
3004
+ * @param HostElementPrototype The Stencil component to be patched
3005
+ */
3006
+ const patchSlotAppendChild = (HostElementPrototype) => {
3007
+ HostElementPrototype.__appendChild = HostElementPrototype.appendChild;
3008
+ HostElementPrototype.appendChild = function (newChild) {
3009
+ const slotName = (newChild['s-sn'] = getSlotName(newChild));
3010
+ const slotNode = getHostSlotNode(this.childNodes, slotName, this.tagName);
3011
+ if (slotNode) {
3012
+ const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
3013
+ const appendAfter = slotChildNodes[slotChildNodes.length - 1];
3014
+ const insertedNode = appendAfter.parentNode.insertBefore(newChild, appendAfter.nextSibling);
3015
+ // Check if there is fallback content that should be hidden
3016
+ updateFallbackSlotVisibility(this);
3017
+ return insertedNode;
3018
+ }
3019
+ return this.__appendChild(newChild);
3020
+ };
3021
+ };
3022
+ /**
3023
+ * Patches the `removeChild` method on a `scoped` Stencil component.
3024
+ * This patch attempts to remove the specified node from a slot reference
3025
+ * if the slot exists. Otherwise, it falls-back to the original `removeChild` method.
3026
+ *
3027
+ * @param ElementPrototype The Stencil component to be patched
3028
+ */
3029
+ const patchSlotRemoveChild = (ElementPrototype) => {
3030
+ ElementPrototype.__removeChild = ElementPrototype.removeChild;
3031
+ ElementPrototype.removeChild = function (toRemove) {
3032
+ if (toRemove && typeof toRemove['s-sn'] !== 'undefined') {
3033
+ const slotNode = getHostSlotNode(this.childNodes, toRemove['s-sn'], this.tagName);
3034
+ if (slotNode) {
3035
+ // Get all slot content
3036
+ const slotChildNodes = getHostSlotChildNodes(slotNode, toRemove['s-sn']);
3037
+ // See if any of the slotted content matches the node to remove
3038
+ const existingNode = slotChildNodes.find((n) => n === toRemove);
3039
+ if (existingNode) {
3040
+ existingNode.remove();
3041
+ // Check if there is fallback content that should be displayed if that
3042
+ // was the last node in the slot
3043
+ updateFallbackSlotVisibility(this);
3044
+ return;
3045
+ }
3046
+ }
3047
+ }
3048
+ return this.__removeChild(toRemove);
3049
+ };
3050
+ };
3051
+ /**
3052
+ * Patches the `prepend` method for a slotted node inside a scoped component.
3053
+ *
3054
+ * @param HostElementPrototype the `Element` to be patched
3055
+ */
3056
+ const patchSlotPrepend = (HostElementPrototype) => {
3057
+ const originalPrepend = HostElementPrototype.prepend;
3058
+ HostElementPrototype.prepend = function (...newChildren) {
3059
+ newChildren.forEach((newChild) => {
3060
+ if (typeof newChild === 'string') {
3061
+ newChild = this.ownerDocument.createTextNode(newChild);
3062
+ }
3063
+ const slotName = (newChild['s-sn'] = getSlotName(newChild));
3064
+ const slotNode = getHostSlotNode(this.childNodes, slotName, this.tagName);
3065
+ if (slotNode) {
3066
+ const slotPlaceholder = document.createTextNode('');
3067
+ slotPlaceholder['s-nr'] = newChild;
3068
+ slotNode['s-cr'].parentNode.__appendChild(slotPlaceholder);
3069
+ newChild['s-ol'] = slotPlaceholder;
3070
+ const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
3071
+ const appendAfter = slotChildNodes[0];
3072
+ return appendAfter.parentNode.insertBefore(newChild, appendAfter.nextSibling);
3073
+ }
3074
+ if (newChild.nodeType === 1 && !!newChild.getAttribute('slot')) {
3075
+ newChild.hidden = true;
3076
+ }
3077
+ return originalPrepend.call(this, newChild);
3078
+ });
3079
+ };
3080
+ };
3081
+ /**
3082
+ * Patches the `append` method for a slotted node inside a scoped component. The patched method uses
3083
+ * `appendChild` under-the-hood while creating text nodes for any new children that passed as bare strings.
3084
+ *
3085
+ * @param HostElementPrototype the `Element` to be patched
3086
+ */
3087
+ const patchSlotAppend = (HostElementPrototype) => {
3088
+ HostElementPrototype.append = function (...newChildren) {
3089
+ newChildren.forEach((newChild) => {
3090
+ if (typeof newChild === 'string') {
3091
+ newChild = this.ownerDocument.createTextNode(newChild);
3092
+ }
3093
+ this.appendChild(newChild);
3094
+ });
3095
+ };
3096
+ };
3097
+ /**
3098
+ * Patches the `insertAdjacentHTML` method for a slotted node inside a scoped component. Specifically,
3099
+ * we only need to patch the behavior for the specific `beforeend` and `afterbegin` positions so the element
3100
+ * gets inserted into the DOM in the correct location.
3101
+ *
3102
+ * @param HostElementPrototype the `Element` to be patched
3103
+ */
3104
+ const patchSlotInsertAdjacentHTML = (HostElementPrototype) => {
3105
+ const originalInsertAdjacentHtml = HostElementPrototype.insertAdjacentHTML;
3106
+ HostElementPrototype.insertAdjacentHTML = function (position, text) {
3107
+ if (position !== 'afterbegin' && position !== 'beforeend') {
3108
+ return originalInsertAdjacentHtml.call(this, position, text);
3109
+ }
3110
+ const container = this.ownerDocument.createElement('_');
3111
+ let node;
3112
+ container.innerHTML = text;
3113
+ if (position === 'afterbegin') {
3114
+ while ((node = container.firstChild)) {
3115
+ this.prepend(node);
3116
+ }
3117
+ }
3118
+ else if (position === 'beforeend') {
3119
+ while ((node = container.firstChild)) {
3120
+ this.append(node);
3121
+ }
3122
+ }
3123
+ };
3124
+ };
3125
+ /**
3126
+ * Patches the `insertAdjacentText` method for a slotted node inside a scoped component. Specifically,
3127
+ * we only need to patch the behavior for the specific `beforeend` and `afterbegin` positions so the text node
3128
+ * gets inserted into the DOM in the correct location.
3129
+ *
3130
+ * @param HostElementPrototype the `Element` to be patched
3131
+ */
3132
+ const patchSlotInsertAdjacentText = (HostElementPrototype) => {
3133
+ HostElementPrototype.insertAdjacentText = function (position, text) {
3134
+ this.insertAdjacentHTML(position, text);
3135
+ };
3136
+ };
3137
+ /**
3138
+ * Patches the `insertAdjacentElement` method for a slotted node inside a scoped component. Specifically,
3139
+ * we only need to patch the behavior for the specific `beforeend` and `afterbegin` positions so the element
3140
+ * gets inserted into the DOM in the correct location.
3141
+ *
3142
+ * @param HostElementPrototype the `Element` to be patched
3143
+ */
3144
+ const patchSlotInsertAdjacentElement = (HostElementPrototype) => {
3145
+ const originalInsertAdjacentElement = HostElementPrototype.insertAdjacentElement;
3146
+ HostElementPrototype.insertAdjacentElement = function (position, element) {
3147
+ if (position !== 'afterbegin' && position !== 'beforeend') {
3148
+ return originalInsertAdjacentElement.call(this, position, element);
3149
+ }
3150
+ if (position === 'afterbegin') {
3151
+ this.prepend(element);
3152
+ return element;
3153
+ }
3154
+ else if (position === 'beforeend') {
3155
+ this.append(element);
3156
+ return element;
3157
+ }
3158
+ return element;
3159
+ };
3160
+ };
3161
+ /**
3162
+ * Patches the text content of an unnamed slotted node inside a scoped component
3163
+ * @param hostElementPrototype the `Element` to be patched
3164
+ */
3165
+ const patchTextContent = (hostElementPrototype) => {
3166
+ const descriptor = Object.getOwnPropertyDescriptor(Node.prototype, 'textContent');
3167
+ Object.defineProperty(hostElementPrototype, '__textContent', descriptor);
3168
+ if (BUILD.experimentalScopedSlotChanges) {
3169
+ // Patch `textContent` to mimic shadow root behavior
3170
+ Object.defineProperty(hostElementPrototype, 'textContent', {
3171
+ // To mimic shadow root behavior, we need to return the text content of all
3172
+ // nodes in a slot reference node
3173
+ get() {
3174
+ const slotRefNodes = getAllChildSlotNodes(this.childNodes);
3175
+ const textContent = slotRefNodes
3176
+ .map((node) => {
3177
+ var _a, _b;
3178
+ const text = [];
3179
+ // Need to get the text content of all nodes in the slot reference node
3180
+ let slotContent = node.nextSibling;
3181
+ while (slotContent && slotContent['s-sn'] === node['s-sn']) {
3182
+ if (slotContent.nodeType === 3 /* NODE_TYPES.TEXT_NODE */ || slotContent.nodeType === 1 /* NODE_TYPES.ELEMENT_NODE */) {
3183
+ text.push((_b = (_a = slotContent.textContent) === null || _a === void 0 ? void 0 : _a.trim()) !== null && _b !== void 0 ? _b : '');
3184
+ }
3185
+ slotContent = slotContent.nextSibling;
3186
+ }
3187
+ return text.filter((ref) => ref !== '').join(' ');
3188
+ })
3189
+ .filter((text) => text !== '')
3190
+ .join(' ');
3191
+ // Pad the string to return
3192
+ return ' ' + textContent + ' ';
3193
+ },
3194
+ // To mimic shadow root behavior, we need to overwrite all nodes in a slot
3195
+ // reference node. If a default slot reference node exists, the text content will be
3196
+ // placed there. Otherwise, the new text node will be hidden
3197
+ set(value) {
3198
+ const slotRefNodes = getAllChildSlotNodes(this.childNodes);
3199
+ slotRefNodes.forEach((node) => {
3200
+ // Remove the existing content of the slot
3201
+ let slotContent = node.nextSibling;
3202
+ while (slotContent && slotContent['s-sn'] === node['s-sn']) {
3203
+ const tmp = slotContent;
3204
+ slotContent = slotContent.nextSibling;
3205
+ tmp.remove();
3206
+ }
3207
+ // If this is a default slot, add the text node in the slot location.
3208
+ // Otherwise, destroy the slot reference node
3209
+ if (node['s-sn'] === '') {
3210
+ const textNode = this.ownerDocument.createTextNode(value);
3211
+ textNode['s-sn'] = '';
3212
+ node.parentElement.insertBefore(textNode, node.nextSibling);
3213
+ }
3214
+ else {
3215
+ node.remove();
3216
+ }
3217
+ });
3218
+ },
3219
+ });
3220
+ }
3221
+ else {
3222
+ Object.defineProperty(hostElementPrototype, 'textContent', {
3223
+ get() {
3224
+ var _a;
3225
+ // get the 'default slot', which would be the first slot in a shadow tree (if we were using one), whose name is
3226
+ // the empty string
3227
+ const slotNode = getHostSlotNode(this.childNodes, '', this.tagName);
3228
+ // when a slot node is found, the textContent _may_ be found in the next sibling (text) node, depending on how
3229
+ // nodes were reordered during the vdom render. first try to get the text content from the sibling.
3230
+ if (((_a = slotNode === null || slotNode === void 0 ? void 0 : slotNode.nextSibling) === null || _a === void 0 ? void 0 : _a.nodeType) === 3 /* NODE_TYPES.TEXT_NODE */) {
3231
+ return slotNode.nextSibling.textContent;
3232
+ }
3233
+ else if (slotNode) {
3234
+ return slotNode.textContent;
3235
+ }
3236
+ else {
3237
+ // fallback to the original implementation
3238
+ return this.__textContent;
3239
+ }
3240
+ },
3241
+ set(value) {
3242
+ var _a;
3243
+ // get the 'default slot', which would be the first slot in a shadow tree (if we were using one), whose name is
3244
+ // the empty string
3245
+ const slotNode = getHostSlotNode(this.childNodes, '', this.tagName);
3246
+ // when a slot node is found, the textContent _may_ need to be placed in the next sibling (text) node,
3247
+ // depending on how nodes were reordered during the vdom render. first try to set the text content on the
3248
+ // sibling.
3249
+ if (((_a = slotNode === null || slotNode === void 0 ? void 0 : slotNode.nextSibling) === null || _a === void 0 ? void 0 : _a.nodeType) === 3 /* NODE_TYPES.TEXT_NODE */) {
3250
+ slotNode.nextSibling.textContent = value;
3251
+ }
3252
+ else if (slotNode) {
3253
+ slotNode.textContent = value;
3254
+ }
3255
+ else {
3256
+ // we couldn't find a slot, but that doesn't mean that there isn't one. if this check ran before the DOM
3257
+ // loaded, we could have missed it. check for a content reference element on the scoped component and insert
3258
+ // it there
3259
+ this.__textContent = value;
3260
+ const contentRefElm = this['s-cr'];
3261
+ if (contentRefElm) {
3262
+ this.insertBefore(contentRefElm, this.firstChild);
3263
+ }
3264
+ }
3265
+ },
3266
+ });
3267
+ }
3268
+ };
3269
+ const patchChildSlotNodes = (elm, cmpMeta) => {
3270
+ class FakeNodeList extends Array {
3271
+ item(n) {
3272
+ return this[n];
3273
+ }
3274
+ }
3275
+ // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
3276
+ if (cmpMeta.$flags$ & 8 /* CMP_FLAGS.needsShadowDomShim */) {
3277
+ const childNodesFn = elm.__lookupGetter__('childNodes');
3278
+ Object.defineProperty(elm, 'children', {
3279
+ get() {
3280
+ return this.childNodes.map((n) => n.nodeType === 1);
3281
+ },
3282
+ });
3283
+ Object.defineProperty(elm, 'childElementCount', {
3284
+ get() {
3285
+ return elm.children.length;
3286
+ },
3287
+ });
3288
+ Object.defineProperty(elm, 'childNodes', {
3289
+ get() {
3290
+ const childNodes = childNodesFn.call(this);
3291
+ if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0 &&
3292
+ getHostRef(this).$flags$ & 2 /* HOST_FLAGS.hasRendered */) {
3293
+ const result = new FakeNodeList();
3294
+ for (let i = 0; i < childNodes.length; i++) {
3295
+ const slot = childNodes[i]['s-nr'];
3296
+ if (slot) {
3297
+ result.push(slot);
3298
+ }
3299
+ }
3300
+ return result;
3301
+ }
3302
+ return FakeNodeList.from(childNodes);
3303
+ },
3304
+ });
3305
+ }
3306
+ };
3307
+ /**
3308
+ * Recursively finds all slot reference nodes ('s-sr') in a series of child nodes.
3309
+ *
3310
+ * @param childNodes The set of child nodes to search for slot reference nodes.
3311
+ * @returns An array of slot reference nodes.
3312
+ */
3313
+ const getAllChildSlotNodes = (childNodes) => {
3314
+ const slotRefNodes = [];
3315
+ for (const childNode of Array.from(childNodes)) {
3316
+ if (childNode['s-sr']) {
3317
+ slotRefNodes.push(childNode);
3318
+ }
3319
+ slotRefNodes.push(...getAllChildSlotNodes(childNode.childNodes));
3320
+ }
3321
+ return slotRefNodes;
3322
+ };
3323
+ const getSlotName = (node) => node['s-sn'] || (node.nodeType === 1 && node.getAttribute('slot')) || '';
3324
+ /**
3325
+ * Recursively searches a series of child nodes for a slot with the provided name.
3326
+ * @param childNodes the nodes to search for a slot with a specific name.
3327
+ * @param slotName the name of the slot to match on.
3328
+ * @param hostName the host name of the slot to match on.
3329
+ * @returns a reference to the slot node that matches the provided name, `null` otherwise
3330
+ */
3331
+ const getHostSlotNode = (childNodes, slotName, hostName) => {
3332
+ let i = 0;
3333
+ let childNode;
3334
+ for (; i < childNodes.length; i++) {
3335
+ childNode = childNodes[i];
3336
+ if (childNode['s-sr'] && childNode['s-sn'] === slotName && childNode['s-hn'] === hostName) {
3337
+ return childNode;
3338
+ }
3339
+ childNode = getHostSlotNode(childNode.childNodes, slotName, hostName);
3340
+ if (childNode) {
3341
+ return childNode;
3342
+ }
3343
+ }
3344
+ return null;
3345
+ };
3346
+ const getHostSlotChildNodes = (n, slotName) => {
3347
+ const childNodes = [n];
3348
+ while ((n = n.nextSibling) && n['s-sn'] === slotName) {
3349
+ childNodes.push(n);
3350
+ }
3351
+ return childNodes;
3352
+ };
3353
+ const defineCustomElement = (Cstr, compactMeta) => {
3354
+ customElements.define(compactMeta[1], proxyCustomElement(Cstr, compactMeta));
3355
+ };
3356
+ const proxyCustomElement = (Cstr, compactMeta) => {
3357
+ const cmpMeta = {
3358
+ $flags$: compactMeta[0],
3359
+ $tagName$: compactMeta[1],
3360
+ };
3361
+ if (BUILD.member) {
3362
+ cmpMeta.$members$ = compactMeta[2];
3363
+ }
3364
+ if (BUILD.hostListener) {
3365
+ cmpMeta.$listeners$ = compactMeta[3];
3366
+ }
3367
+ if (BUILD.watchCallback) {
3368
+ cmpMeta.$watchers$ = Cstr.$watchers$;
3369
+ }
3370
+ if (BUILD.reflect) {
3371
+ cmpMeta.$attrsToReflect$ = [];
3372
+ }
3373
+ if (BUILD.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {
3374
+ // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
3375
+ cmpMeta.$flags$ |= 8 /* CMP_FLAGS.needsShadowDomShim */;
3376
+ }
3377
+ // TODO(STENCIL-914): this check and `else` block can go away and be replaced by just the `scoped` check
3378
+ if (BUILD.experimentalSlotFixes) {
3379
+ if (BUILD.scoped && cmpMeta.$flags$ & 2 /* CMP_FLAGS.scopedCssEncapsulation */) {
3380
+ // This check is intentionally not combined with the surrounding `experimentalSlotFixes` check
3381
+ // since, moving forward, we only want to patch the pseudo shadow DOM when the component is scoped
3382
+ patchPseudoShadowDom(Cstr.prototype, cmpMeta);
3383
+ }
3384
+ }
3385
+ else {
3386
+ if (BUILD.slotChildNodesFix) {
3387
+ patchChildSlotNodes(Cstr.prototype, cmpMeta);
3388
+ }
3389
+ if (BUILD.cloneNodeFix) {
3390
+ patchCloneNode(Cstr.prototype);
3391
+ }
3392
+ if (BUILD.appendChildSlotFix) {
3393
+ patchSlotAppendChild(Cstr.prototype);
3394
+ }
3395
+ if (BUILD.scopedSlotTextContentFix && cmpMeta.$flags$ & 2 /* CMP_FLAGS.scopedCssEncapsulation */) {
3396
+ patchTextContent(Cstr.prototype);
3397
+ }
3398
+ }
3399
+ const originalConnectedCallback = Cstr.prototype.connectedCallback;
3400
+ const originalDisconnectedCallback = Cstr.prototype.disconnectedCallback;
3401
+ Object.assign(Cstr.prototype, {
3402
+ __registerHost() {
3403
+ registerHost(this, cmpMeta);
3404
+ },
3405
+ connectedCallback() {
3406
+ connectedCallback(this);
3407
+ if (BUILD.connectedCallback && originalConnectedCallback) {
3408
+ originalConnectedCallback.call(this);
3409
+ }
3410
+ },
3411
+ disconnectedCallback() {
3412
+ disconnectedCallback(this);
3413
+ if (BUILD.disconnectedCallback && originalDisconnectedCallback) {
3414
+ originalDisconnectedCallback.call(this);
3415
+ }
3416
+ },
3417
+ __attachShadow() {
3418
+ if (supportsShadow) {
3419
+ if (BUILD.shadowDelegatesFocus) {
3420
+ this.attachShadow({
3421
+ mode: 'open',
3422
+ delegatesFocus: !!(cmpMeta.$flags$ & 16 /* CMP_FLAGS.shadowDelegatesFocus */),
3423
+ });
3424
+ }
3425
+ else {
3426
+ this.attachShadow({ mode: 'open' });
3427
+ }
3428
+ }
3429
+ else {
3430
+ this.shadowRoot = this;
3431
+ }
3432
+ },
3433
+ });
3434
+ Cstr.is = cmpMeta.$tagName$;
3435
+ return proxyComponent(Cstr, cmpMeta, 1 /* PROXY_FLAGS.isElementConstructor */ | 2 /* PROXY_FLAGS.proxyState */);
3436
+ };
3437
+ const forceModeUpdate = (elm) => {
3438
+ if (BUILD.style && BUILD.mode && !BUILD.lazyLoad) {
3439
+ const mode = computeMode(elm);
3440
+ const hostRef = getHostRef(elm);
3441
+ if (hostRef.$modeName$ !== mode) {
3442
+ const cmpMeta = hostRef.$cmpMeta$;
3443
+ const oldScopeId = elm['s-sc'];
3444
+ const scopeId = getScopeId(cmpMeta, mode);
3445
+ const style = elm.constructor.style[mode];
3446
+ const flags = cmpMeta.$flags$;
3447
+ if (style) {
3448
+ if (!styles.has(scopeId)) {
3449
+ registerStyle(scopeId, style, !!(flags & 1 /* CMP_FLAGS.shadowDomEncapsulation */));
3450
+ }
3451
+ hostRef.$modeName$ = mode;
3452
+ elm.classList.remove(oldScopeId + '-h', oldScopeId + '-s');
3453
+ attachStyles(hostRef);
3454
+ forceUpdate(elm);
3455
+ }
3456
+ }
3457
+ }
3458
+ };
3459
+ /**
3460
+ * Kick off hot-module-replacement for a component. In order to replace the
3461
+ * component in-place we:
3462
+ *
3463
+ * 1. get a reference to the {@link d.HostRef} for the element
3464
+ * 2. reset the element's runtime flags
3465
+ * 3. re-run the initialization logic for the element (via
3466
+ * {@link initializeComponent})
3467
+ *
3468
+ * @param hostElement the host element for the component which we want to start
3469
+ * doing HMR
3470
+ * @param cmpMeta runtime metadata for the component
3471
+ * @param hmrVersionId the current HMR version ID
3472
+ */
3473
+ const hmrStart = (hostElement, cmpMeta, hmrVersionId) => {
3474
+ // ¯\_(ツ)_/¯
3475
+ const hostRef = getHostRef(hostElement);
3476
+ // reset state flags to only have been connected
3477
+ hostRef.$flags$ = 1 /* HOST_FLAGS.hasConnected */;
3478
+ // TODO
3479
+ // detach any event listeners that may have been added
3480
+ // because we're not passing an exact event name it'll
3481
+ // remove all of this element's event, which is good
3482
+ // re-initialize the component
3483
+ initializeComponent(hostElement, hostRef, cmpMeta, hmrVersionId);
3484
+ };
2466
3485
  const bootstrapLazy = (lazyBundles, options = {}) => {
2467
3486
  var _a;
2468
- const endBootstrap = createTime();
3487
+ if (BUILD.profile && performance.mark) {
3488
+ performance.mark('st:app:start');
3489
+ }
3490
+ installDevTools();
3491
+ const endBootstrap = createTime('bootstrapLazy');
2469
3492
  const cmpTags = [];
2470
3493
  const exclude = options.exclude || [];
2471
3494
  const customElements = win.customElements;
@@ -2479,12 +3502,17 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
2479
3502
  let i = 0;
2480
3503
  Object.assign(plt, options);
2481
3504
  plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
2482
- {
3505
+ if (BUILD.asyncQueue) {
3506
+ if (options.syncQueue) {
3507
+ plt.$flags$ |= 4 /* PLATFORM_FLAGS.queueSync */;
3508
+ }
3509
+ }
3510
+ if (BUILD.hydrateClientSide) {
2483
3511
  // If the app is already hydrated there is not point to disable the
2484
3512
  // async queue. This will improve the first input delay
2485
3513
  plt.$flags$ |= 2 /* PLATFORM_FLAGS.appLoaded */;
2486
3514
  }
2487
- {
3515
+ if (BUILD.hydrateClientSide && BUILD.shadowDom) {
2488
3516
  for (; i < styles.length; i++) {
2489
3517
  registerStyle(styles[i].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles[i].innerHTML), true);
2490
3518
  }
@@ -2504,19 +3532,25 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
2504
3532
  if (cmpMeta.$flags$ & 4 /* CMP_FLAGS.hasSlotRelocation */) {
2505
3533
  hasSlotRelocation = true;
2506
3534
  }
2507
- {
3535
+ if (BUILD.member) {
2508
3536
  cmpMeta.$members$ = compactMeta[2];
2509
3537
  }
2510
- {
3538
+ if (BUILD.hostListener) {
2511
3539
  cmpMeta.$listeners$ = compactMeta[3];
2512
3540
  }
2513
- {
3541
+ if (BUILD.reflect) {
2514
3542
  cmpMeta.$attrsToReflect$ = [];
2515
3543
  }
2516
- {
3544
+ if (BUILD.watchCallback) {
2517
3545
  cmpMeta.$watchers$ = (_a = compactMeta[4]) !== null && _a !== void 0 ? _a : {};
2518
3546
  }
2519
- const tagName = cmpMeta.$tagName$;
3547
+ if (BUILD.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {
3548
+ // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
3549
+ cmpMeta.$flags$ |= 8 /* CMP_FLAGS.needsShadowDomShim */;
3550
+ }
3551
+ const tagName = BUILD.transformTagName && options.transformTagName
3552
+ ? options.transformTagName(cmpMeta.$tagName$)
3553
+ : cmpMeta.$tagName$;
2520
3554
  const HostElement = class extends HTMLElement {
2521
3555
  // StencilLazyHost
2522
3556
  constructor(self) {
@@ -2524,16 +3558,25 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
2524
3558
  super(self);
2525
3559
  self = this;
2526
3560
  registerHost(self, cmpMeta);
2527
- if (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {
3561
+ if (BUILD.shadowDom && cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {
2528
3562
  // this component is using shadow dom
2529
3563
  // and this browser supports shadow dom
2530
3564
  // add the read-only property "shadowRoot" to the host element
2531
3565
  // adding the shadow root build conditionals to minimize runtime
2532
- {
2533
- {
3566
+ if (supportsShadow) {
3567
+ if (BUILD.shadowDelegatesFocus) {
3568
+ self.attachShadow({
3569
+ mode: 'open',
3570
+ delegatesFocus: !!(cmpMeta.$flags$ & 16 /* CMP_FLAGS.shadowDelegatesFocus */),
3571
+ });
3572
+ }
3573
+ else {
2534
3574
  self.attachShadow({ mode: 'open' });
2535
3575
  }
2536
3576
  }
3577
+ else if (!BUILD.hydrateServerSide && !('shadowRoot' in self)) {
3578
+ self.shadowRoot = self;
3579
+ }
2537
3580
  }
2538
3581
  }
2539
3582
  connectedCallback() {
@@ -2556,6 +3599,42 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
2556
3599
  return getHostRef(this).$onReadyPromise$;
2557
3600
  }
2558
3601
  };
3602
+ // TODO(STENCIL-914): this check and `else` block can go away and be replaced by just the `scoped` check
3603
+ if (BUILD.experimentalSlotFixes) {
3604
+ // This check is intentionally not combined with the surrounding `experimentalSlotFixes` check
3605
+ // since, moving forward, we only want to patch the pseudo shadow DOM when the component is scoped
3606
+ if (BUILD.scoped && cmpMeta.$flags$ & 2 /* CMP_FLAGS.scopedCssEncapsulation */) {
3607
+ patchPseudoShadowDom(HostElement.prototype, cmpMeta);
3608
+ }
3609
+ }
3610
+ else {
3611
+ if (BUILD.slotChildNodesFix) {
3612
+ patchChildSlotNodes(HostElement.prototype, cmpMeta);
3613
+ }
3614
+ if (BUILD.cloneNodeFix) {
3615
+ patchCloneNode(HostElement.prototype);
3616
+ }
3617
+ if (BUILD.appendChildSlotFix) {
3618
+ patchSlotAppendChild(HostElement.prototype);
3619
+ }
3620
+ if (BUILD.scopedSlotTextContentFix && cmpMeta.$flags$ & 2 /* CMP_FLAGS.scopedCssEncapsulation */) {
3621
+ patchTextContent(HostElement.prototype);
3622
+ }
3623
+ }
3624
+ // if the component is formAssociated we need to set that on the host
3625
+ // element so that it will be ready for `attachInternals` to be called on
3626
+ // it later on
3627
+ if (BUILD.formAssociated && cmpMeta.$flags$ & 64 /* CMP_FLAGS.formAssociated */) {
3628
+ HostElement.formAssociated = true;
3629
+ }
3630
+ if (BUILD.hotModuleReplacement) {
3631
+ // if we're in an HMR dev build then we need to set up the callback
3632
+ // which will carry out the work of actually replacing the module for
3633
+ // this particular component
3634
+ HostElement.prototype['s-hmr'] = function (hmrVersionId) {
3635
+ hmrStart(this, cmpMeta, hmrVersionId);
3636
+ };
3637
+ }
2559
3638
  cmpMeta.$lazyBundleId$ = lazyBundle[0];
2560
3639
  if (!exclude.includes(tagName) && !customElements.get(tagName)) {
2561
3640
  cmpTags.push(tagName);
@@ -2571,7 +3650,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
2571
3650
  dataStyles.textContent += SLOT_FB_CSS;
2572
3651
  }
2573
3652
  // Add hydration styles
2574
- {
3653
+ if (BUILD.invisiblePrehydration && (BUILD.hydratedClass || BUILD.hydratedAttribute)) {
2575
3654
  dataStyles.textContent += cmpTags + HYDRATED_CSS;
2576
3655
  }
2577
3656
  // If we have styles, add them to the DOM
@@ -2593,17 +3672,40 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
2593
3672
  deferredConnectedCallbacks.map((host) => host.connectedCallback());
2594
3673
  }
2595
3674
  else {
2596
- {
3675
+ if (BUILD.profile) {
3676
+ plt.jmp(() => (appLoadFallback = setTimeout(appDidLoad, 30, 'timeout')));
3677
+ }
3678
+ else {
2597
3679
  plt.jmp(() => (appLoadFallback = setTimeout(appDidLoad, 30)));
2598
3680
  }
2599
3681
  }
2600
3682
  // Fallback appLoad event
2601
3683
  endBootstrap();
2602
3684
  };
3685
+ const Fragment = (_, children) => children;
2603
3686
  const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
2604
- if (listeners) {
3687
+ if (BUILD.hostListener && listeners) {
3688
+ // this is called immediately within the element's constructor
3689
+ // initialize our event listeners on the host element
3690
+ // we do this now so that we can listen to events that may
3691
+ // have fired even before the instance is ready
3692
+ if (BUILD.hostListenerTargetParent) {
3693
+ // this component may have event listeners that should be attached to the parent
3694
+ if (attachParentListeners) {
3695
+ // this is being ran from within the connectedCallback
3696
+ // which is important so that we know the host element actually has a parent element
3697
+ // filter out the listeners to only have the ones that ARE being attached to the parent
3698
+ listeners = listeners.filter(([flags]) => flags & 32 /* LISTENER_FLAGS.TargetParent */);
3699
+ }
3700
+ else {
3701
+ // this is being ran from within the component constructor
3702
+ // everything BUT the parent element listeners should be attached at this time
3703
+ // filter out the listeners that are NOT being attached to the parent
3704
+ listeners = listeners.filter(([flags]) => !(flags & 32 /* LISTENER_FLAGS.TargetParent */));
3705
+ }
3706
+ }
2605
3707
  listeners.map(([flags, name, method]) => {
2606
- const target = getHostListenerTarget(elm, flags) ;
3708
+ const target = BUILD.hostListenerTarget ? getHostListenerTarget(elm, flags) : elm;
2607
3709
  const handler = hostListenerProxy(hostRef, method);
2608
3710
  const opts = hostListenerOpts(flags);
2609
3711
  plt.ael(target, name, handler, opts);
@@ -2613,7 +3715,7 @@ const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) =
2613
3715
  };
2614
3716
  const hostListenerProxy = (hostRef, methodName) => (ev) => {
2615
3717
  try {
2616
- {
3718
+ if (BUILD.lazyLoad) {
2617
3719
  if (hostRef.$flags$ & 256 /* HOST_FLAGS.isListenReady */) {
2618
3720
  // instance is ready, let's call it's member method for this event
2619
3721
  hostRef.$lazyInstance$[methodName](ev);
@@ -2622,14 +3724,23 @@ const hostListenerProxy = (hostRef, methodName) => (ev) => {
2622
3724
  (hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
2623
3725
  }
2624
3726
  }
3727
+ else {
3728
+ hostRef.$hostElement$[methodName](ev);
3729
+ }
2625
3730
  }
2626
3731
  catch (e) {
2627
3732
  consoleError(e);
2628
3733
  }
2629
3734
  };
2630
3735
  const getHostListenerTarget = (elm, flags) => {
2631
- if (flags & 16 /* LISTENER_FLAGS.TargetBody */)
3736
+ if (BUILD.hostListenerTargetDocument && flags & 4 /* LISTENER_FLAGS.TargetDocument */)
3737
+ return doc;
3738
+ if (BUILD.hostListenerTargetWindow && flags & 8 /* LISTENER_FLAGS.TargetWindow */)
3739
+ return win;
3740
+ if (BUILD.hostListenerTargetBody && flags & 16 /* LISTENER_FLAGS.TargetBody */)
2632
3741
  return doc.body;
3742
+ if (BUILD.hostListenerTargetParent && flags & 32 /* LISTENER_FLAGS.TargetParent */)
3743
+ return elm.parentElement;
2633
3744
  return elm;
2634
3745
  };
2635
3746
  // prettier-ignore
@@ -2646,6 +3757,194 @@ const hostListenerOpts = (flags) => supportsListenerOptions
2646
3757
  * @returns void
2647
3758
  */
2648
3759
  const setNonce = (nonce) => (plt.$nonce$ = nonce);
3760
+ const setPlatformOptions = (opts) => Object.assign(plt, opts);
3761
+ /**
3762
+ * Updates the DOM generated on the server with annotations such as node attributes and
3763
+ * comment nodes to facilitate future client-side hydration. These annotations are used for things
3764
+ * like moving elements back to their original hosts if using Shadow DOM on the client, and for quickly
3765
+ * reconstructing the vNode representations of the DOM.
3766
+ *
3767
+ * @param doc The DOM generated by the server.
3768
+ * @param staticComponents Any components that should be considered static and do not need client-side hydration.
3769
+ */
3770
+ const insertVdomAnnotations = (doc, staticComponents) => {
3771
+ if (doc != null) {
3772
+ const docData = {
3773
+ hostIds: 0,
3774
+ rootLevelIds: 0,
3775
+ staticComponents: new Set(staticComponents),
3776
+ };
3777
+ const orgLocationNodes = [];
3778
+ parseVNodeAnnotations(doc, doc.body, docData, orgLocationNodes);
3779
+ orgLocationNodes.forEach((orgLocationNode) => {
3780
+ var _a, _b;
3781
+ if (orgLocationNode != null && orgLocationNode['s-nr']) {
3782
+ const nodeRef = orgLocationNode['s-nr'];
3783
+ let hostId = nodeRef['s-host-id'];
3784
+ let nodeId = nodeRef['s-node-id'];
3785
+ let childId = `${hostId}.${nodeId}`;
3786
+ if (hostId == null) {
3787
+ hostId = 0;
3788
+ docData.rootLevelIds++;
3789
+ nodeId = docData.rootLevelIds;
3790
+ childId = `${hostId}.${nodeId}`;
3791
+ if (nodeRef.nodeType === 1 /* NODE_TYPE.ElementNode */) {
3792
+ nodeRef.setAttribute(HYDRATE_CHILD_ID, childId);
3793
+ }
3794
+ else if (nodeRef.nodeType === 3 /* NODE_TYPE.TextNode */) {
3795
+ if (hostId === 0) {
3796
+ const textContent = (_a = nodeRef.nodeValue) === null || _a === void 0 ? void 0 : _a.trim();
3797
+ if (textContent === '') {
3798
+ // useless whitespace node at the document root
3799
+ orgLocationNode.remove();
3800
+ return;
3801
+ }
3802
+ }
3803
+ const commentBeforeTextNode = doc.createComment(childId);
3804
+ commentBeforeTextNode.nodeValue = `${TEXT_NODE_ID}.${childId}`;
3805
+ (_b = nodeRef.parentNode) === null || _b === void 0 ? void 0 : _b.insertBefore(commentBeforeTextNode, nodeRef);
3806
+ }
3807
+ }
3808
+ let orgLocationNodeId = `${ORG_LOCATION_ID}.${childId}`;
3809
+ const orgLocationParentNode = orgLocationNode.parentElement;
3810
+ if (orgLocationParentNode) {
3811
+ if (orgLocationParentNode['s-en'] === '') {
3812
+ // ending with a "." means that the parent element
3813
+ // of this node's original location is a SHADOW dom element
3814
+ // and this node is apart of the root level light dom
3815
+ orgLocationNodeId += `.`;
3816
+ }
3817
+ else if (orgLocationParentNode['s-en'] === 'c') {
3818
+ // ending with a ".c" means that the parent element
3819
+ // of this node's original location is a SCOPED element
3820
+ // and this node is apart of the root level light dom
3821
+ orgLocationNodeId += `.c`;
3822
+ }
3823
+ }
3824
+ orgLocationNode.nodeValue = orgLocationNodeId;
3825
+ }
3826
+ });
3827
+ }
3828
+ };
3829
+ /**
3830
+ * Recursively parses a node generated by the server and its children to set host and child id
3831
+ * attributes read during client-side hydration. This function also tracks whether each node is
3832
+ * an original location reference node meaning that a node has been moved via slot relocation.
3833
+ *
3834
+ * @param doc The DOM generated by the server.
3835
+ * @param node The node to parse.
3836
+ * @param docData An object containing metadata about the document.
3837
+ * @param orgLocationNodes An array of nodes that have been moved via slot relocation.
3838
+ */
3839
+ const parseVNodeAnnotations = (doc, node, docData, orgLocationNodes) => {
3840
+ if (node == null) {
3841
+ return;
3842
+ }
3843
+ if (node['s-nr'] != null) {
3844
+ orgLocationNodes.push(node);
3845
+ }
3846
+ if (node.nodeType === 1 /* NODE_TYPE.ElementNode */) {
3847
+ node.childNodes.forEach((childNode) => {
3848
+ const hostRef = getHostRef(childNode);
3849
+ if (hostRef != null && !docData.staticComponents.has(childNode.nodeName.toLowerCase())) {
3850
+ const cmpData = {
3851
+ nodeIds: 0,
3852
+ };
3853
+ insertVNodeAnnotations(doc, childNode, hostRef.$vnode$, docData, cmpData);
3854
+ }
3855
+ parseVNodeAnnotations(doc, childNode, docData, orgLocationNodes);
3856
+ });
3857
+ }
3858
+ };
3859
+ /**
3860
+ * Insert attribute annotations on an element for its host ID and, potentially, its child ID.
3861
+ * Also makes calls to insert annotations on the element's children, keeping track of the depth of
3862
+ * the component tree.
3863
+ *
3864
+ * @param doc The DOM generated by the server.
3865
+ * @param hostElm The element to insert annotations for.
3866
+ * @param vnode The vNode representation of the element.
3867
+ * @param docData An object containing metadata about the document.
3868
+ * @param cmpData An object containing metadata about the component.
3869
+ */
3870
+ const insertVNodeAnnotations = (doc, hostElm, vnode, docData, cmpData) => {
3871
+ if (vnode != null) {
3872
+ const hostId = ++docData.hostIds;
3873
+ hostElm.setAttribute(HYDRATE_ID, hostId);
3874
+ if (hostElm['s-cr'] != null) {
3875
+ hostElm['s-cr'].nodeValue = `${CONTENT_REF_ID}.${hostId}`;
3876
+ }
3877
+ if (vnode.$children$ != null) {
3878
+ const depth = 0;
3879
+ vnode.$children$.forEach((vnodeChild, index) => {
3880
+ insertChildVNodeAnnotations(doc, vnodeChild, cmpData, hostId, depth, index);
3881
+ });
3882
+ }
3883
+ // If this element does not already have a child ID and has a sibling comment node
3884
+ // representing a slot, we use the content of the comment to set the child ID attribute
3885
+ // on the host element.
3886
+ if (hostElm && vnode && vnode.$elm$ && !hostElm.hasAttribute(HYDRATE_CHILD_ID)) {
3887
+ const parent = hostElm.parentElement;
3888
+ if (parent && parent.childNodes) {
3889
+ const parentChildNodes = Array.from(parent.childNodes);
3890
+ const comment = parentChildNodes.find((node) => node.nodeType === 8 /* NODE_TYPE.CommentNode */ && node['s-sr']);
3891
+ if (comment) {
3892
+ const index = parentChildNodes.indexOf(hostElm) - 1;
3893
+ vnode.$elm$.setAttribute(HYDRATE_CHILD_ID, `${comment['s-host-id']}.${comment['s-node-id']}.0.${index}`);
3894
+ }
3895
+ }
3896
+ }
3897
+ }
3898
+ };
3899
+ /**
3900
+ * Recursively analyzes the type of a child vNode and inserts annotations on the vNodes's element based on its type.
3901
+ * Element nodes receive a child ID attribute, text nodes have a comment with the child ID inserted before them,
3902
+ * and comment nodes representing a slot have their node value set to a slot node ID containing the child ID.
3903
+ *
3904
+ * @param doc The DOM generated by the server.
3905
+ * @param vnodeChild The vNode to insert annotations for.
3906
+ * @param cmpData An object containing metadata about the component.
3907
+ * @param hostId The host ID of this element's parent.
3908
+ * @param depth How deep this element sits in the component tree relative to its parent.
3909
+ * @param index The index of this element in its parent's children array.
3910
+ */
3911
+ const insertChildVNodeAnnotations = (doc, vnodeChild, cmpData, hostId, depth, index) => {
3912
+ const childElm = vnodeChild.$elm$;
3913
+ if (childElm == null) {
3914
+ return;
3915
+ }
3916
+ const nodeId = cmpData.nodeIds++;
3917
+ const childId = `${hostId}.${nodeId}.${depth}.${index}`;
3918
+ childElm['s-host-id'] = hostId;
3919
+ childElm['s-node-id'] = nodeId;
3920
+ if (childElm.nodeType === 1 /* NODE_TYPE.ElementNode */) {
3921
+ childElm.setAttribute(HYDRATE_CHILD_ID, childId);
3922
+ }
3923
+ else if (childElm.nodeType === 3 /* NODE_TYPE.TextNode */) {
3924
+ const parentNode = childElm.parentNode;
3925
+ const nodeName = parentNode === null || parentNode === void 0 ? void 0 : parentNode.nodeName;
3926
+ if (nodeName !== 'STYLE' && nodeName !== 'SCRIPT') {
3927
+ const textNodeId = `${TEXT_NODE_ID}.${childId}`;
3928
+ const commentBeforeTextNode = doc.createComment(textNodeId);
3929
+ parentNode === null || parentNode === void 0 ? void 0 : parentNode.insertBefore(commentBeforeTextNode, childElm);
3930
+ }
3931
+ }
3932
+ else if (childElm.nodeType === 8 /* NODE_TYPE.CommentNode */) {
3933
+ if (childElm['s-sr']) {
3934
+ const slotName = childElm['s-sn'] || '';
3935
+ const slotNodeId = `${SLOT_NODE_ID}.${childId}.${slotName}`;
3936
+ childElm.nodeValue = slotNodeId;
3937
+ }
3938
+ }
3939
+ if (vnodeChild.$children$ != null) {
3940
+ // Increment depth each time we recur deeper into the tree
3941
+ const childDepth = depth + 1;
3942
+ vnodeChild.$children$.forEach((vnode, index) => {
3943
+ insertChildVNodeAnnotations(doc, vnode, cmpData, hostId, childDepth, index);
3944
+ });
3945
+ }
3946
+ };
3947
+ var _a;
2649
3948
  /**
2650
3949
  * A WeakMap mapping runtime component references to their corresponding host reference
2651
3950
  * instances.
@@ -2661,7 +3960,9 @@ const setNonce = (nonce) => (plt.$nonce$ = nonce);
2661
3960
  * component will not have access to the previous hostRef map, leading to a
2662
3961
  * bug where the new version of the component cannot properly initialize.
2663
3962
  */
2664
- const hostRefs = new WeakMap();
3963
+ const hostRefs = BUILD.hotModuleReplacement
3964
+ ? ((_a = window).__STENCIL_HOSTREFS__ || (_a.__STENCIL_HOSTREFS__ = new WeakMap()))
3965
+ : new WeakMap();
2665
3966
  /**
2666
3967
  * Given a {@link d.RuntimeRef} retrieve the corresponding {@link d.HostRef}
2667
3968
  *
@@ -2694,44 +3995,64 @@ const registerHost = (hostElement, cmpMeta) => {
2694
3995
  $cmpMeta$: cmpMeta,
2695
3996
  $instanceValues$: new Map(),
2696
3997
  };
2697
- {
3998
+ if (BUILD.isDev) {
3999
+ hostRef.$renderCount$ = 0;
4000
+ }
4001
+ if (BUILD.method && BUILD.lazyLoad) {
2698
4002
  hostRef.$onInstancePromise$ = new Promise((r) => (hostRef.$onInstanceResolve$ = r));
2699
4003
  }
2700
- {
4004
+ if (BUILD.asyncLoading) {
2701
4005
  hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
2702
4006
  hostElement['s-p'] = [];
2703
4007
  hostElement['s-rc'] = [];
2704
4008
  }
2705
- addHostEventListeners(hostElement, hostRef, cmpMeta.$listeners$);
4009
+ addHostEventListeners(hostElement, hostRef, cmpMeta.$listeners$, false);
2706
4010
  return hostRefs.set(hostElement, hostRef);
2707
4011
  };
2708
4012
  const isMemberInElement = (elm, memberName) => memberName in elm;
2709
- const consoleError = (e, el) => (0, console.error)(e, el);
4013
+ const consoleError = (e, el) => (customError || console.error)(e, el);
4014
+ const STENCIL_DEV_MODE = BUILD.isTesting
4015
+ ? ['STENCIL:'] // E2E testing
4016
+ : [
4017
+ '%cstencil',
4018
+ 'color: white;background:#4c47ff;font-weight: bold; font-size:10px; padding:2px 6px; border-radius: 5px',
4019
+ ];
4020
+ const consoleDevError = (...m) => console.error(...STENCIL_DEV_MODE, ...m);
4021
+ const consoleDevWarn = (...m) => console.warn(...STENCIL_DEV_MODE, ...m);
4022
+ const consoleDevInfo = (...m) => console.info(...STENCIL_DEV_MODE, ...m);
4023
+ const setErrorHandler = (handler) => (customError = handler);
2710
4024
  const cmpModules = /*@__PURE__*/ new Map();
2711
4025
  const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
2712
4026
  // loadModuleImport
2713
4027
  const exportName = cmpMeta.$tagName$.replace(/-/g, '_');
2714
4028
  const bundleId = cmpMeta.$lazyBundleId$;
2715
- const module = cmpModules.get(bundleId) ;
4029
+ if (BUILD.isDev && typeof bundleId !== 'string') {
4030
+ consoleDevError(`Trying to lazily load component <${cmpMeta.$tagName$}> with style mode "${hostRef.$modeName$}", but it does not exist.`);
4031
+ return undefined;
4032
+ }
4033
+ const module = !BUILD.hotModuleReplacement ? cmpModules.get(bundleId) : false;
2716
4034
  if (module) {
2717
4035
  return module[exportName];
2718
4036
  }
2719
4037
  /*!__STENCIL_STATIC_IMPORT_SWITCH__*/
2720
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
4038
+ return import(
2721
4039
  /* @vite-ignore */
2722
4040
  /* webpackInclude: /\.entry\.js$/ */
2723
4041
  /* webpackExclude: /\.system\.entry\.js$/ */
2724
4042
  /* webpackMode: "lazy" */
2725
- `./${bundleId}.entry.js${''}`)); }).then((importedModule) => {
2726
- {
4043
+ `./${bundleId}.entry.js${BUILD.hotModuleReplacement && hmrVersionId ? '?s-hmr=' + hmrVersionId : ''}`).then((importedModule) => {
4044
+ if (!BUILD.hotModuleReplacement) {
2727
4045
  cmpModules.set(bundleId, importedModule);
2728
4046
  }
2729
4047
  return importedModule[exportName];
2730
4048
  }, consoleError);
2731
4049
  };
2732
4050
  const styles = /*@__PURE__*/ new Map();
4051
+ const modeResolutionChain = [];
2733
4052
  const win = typeof window !== 'undefined' ? window : {};
2734
4053
  const doc = win.document || { head: {} };
4054
+ const H = (win.HTMLElement || class {
4055
+ });
2735
4056
  const plt = {
2736
4057
  $flags$: 0,
2737
4058
  $resourcesUrl$: '',
@@ -2741,9 +4062,14 @@ const plt = {
2741
4062
  rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
2742
4063
  ce: (eventName, opts) => new CustomEvent(eventName, opts),
2743
4064
  };
4065
+ const setPlatformHelpers = (helpers) => {
4066
+ Object.assign(plt, helpers);
4067
+ };
2744
4068
  const supportsShadow =
2745
4069
  // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
2746
- true;
4070
+ BUILD.shadowDomShim && BUILD.shadowDom
4071
+ ? /*@__PURE__*/ (() => (doc.head.attachShadow + '').indexOf('[native') > -1)()
4072
+ : true;
2747
4073
  const supportsListenerOptions = /*@__PURE__*/ (() => {
2748
4074
  let supportsListenerOptions = false;
2749
4075
  try {
@@ -2757,7 +4083,8 @@ const supportsListenerOptions = /*@__PURE__*/ (() => {
2757
4083
  return supportsListenerOptions;
2758
4084
  })();
2759
4085
  const promiseResolve = (v) => Promise.resolve(v);
2760
- const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
4086
+ const supportsConstructableStylesheets = BUILD.constructableCSS
4087
+ ? /*@__PURE__*/ (() => {
2761
4088
  try {
2762
4089
  new CSSStyleSheet();
2763
4090
  return typeof new CSSStyleSheet().replaceSync === 'function';
@@ -2765,9 +4092,10 @@ const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
2765
4092
  catch (e) { }
2766
4093
  return false;
2767
4094
  })()
2768
- ;
4095
+ : false;
2769
4096
  const queueDomReads = [];
2770
4097
  const queueDomWrites = [];
4098
+ const queueDomWritesLow = [];
2771
4099
  const queueTask = (queue, write) => (cb) => {
2772
4100
  queue.push(cb);
2773
4101
  if (!queuePending) {
@@ -2791,13 +4119,53 @@ const consume = (queue) => {
2791
4119
  }
2792
4120
  queue.length = 0;
2793
4121
  };
4122
+ const consumeTimeout = (queue, timeout) => {
4123
+ let i = 0;
4124
+ let ts = 0;
4125
+ while (i < queue.length && (ts = performance.now()) < timeout) {
4126
+ try {
4127
+ queue[i++](ts);
4128
+ }
4129
+ catch (e) {
4130
+ consoleError(e);
4131
+ }
4132
+ }
4133
+ if (i === queue.length) {
4134
+ queue.length = 0;
4135
+ }
4136
+ else if (i !== 0) {
4137
+ queue.splice(0, i);
4138
+ }
4139
+ };
2794
4140
  const flush = () => {
4141
+ if (BUILD.asyncQueue) {
4142
+ queueCongestion++;
4143
+ }
2795
4144
  // always force a bunch of medium callbacks to run, but still have
2796
4145
  // a throttle on how many can run in a certain time
2797
4146
  // DOM READS!!!
2798
4147
  consume(queueDomReads);
2799
4148
  // DOM WRITES!!!
2800
- {
4149
+ if (BUILD.asyncQueue) {
4150
+ const timeout = (plt.$flags$ & 6 /* PLATFORM_FLAGS.queueMask */) === 2 /* PLATFORM_FLAGS.appLoaded */
4151
+ ? performance.now() + 14 * Math.ceil(queueCongestion * (1.0 / 10.0))
4152
+ : Infinity;
4153
+ consumeTimeout(queueDomWrites, timeout);
4154
+ consumeTimeout(queueDomWritesLow, timeout);
4155
+ if (queueDomWrites.length > 0) {
4156
+ queueDomWritesLow.push(...queueDomWrites);
4157
+ queueDomWrites.length = 0;
4158
+ }
4159
+ if ((queuePending = queueDomReads.length + queueDomWrites.length + queueDomWritesLow.length > 0)) {
4160
+ // still more to do yet, but we've run out of time
4161
+ // let's let this thing cool off and try again in the next tick
4162
+ plt.raf(flush);
4163
+ }
4164
+ else {
4165
+ queueCongestion = 0;
4166
+ }
4167
+ }
4168
+ else {
2801
4169
  consume(queueDomWrites);
2802
4170
  if ((queuePending = queueDomReads.length > 0)) {
2803
4171
  // still more to do yet, but we've run out of time
@@ -2807,15 +4175,9 @@ const flush = () => {
2807
4175
  }
2808
4176
  };
2809
4177
  const nextTick = (cb) => promiseResolve().then(cb);
4178
+ const readTask = /*@__PURE__*/ queueTask(queueDomReads, false);
2810
4179
  const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
2811
4180
 
2812
- exports.Host = Host;
2813
- exports.bootstrapLazy = bootstrapLazy;
2814
- exports.createEvent = createEvent;
2815
- exports.getElement = getElement;
2816
- exports.h = h;
2817
- exports.promiseResolve = promiseResolve;
2818
- exports.registerInstance = registerInstance;
2819
- exports.setNonce = setNonce;
4181
+ export { BUILD as B, H, NAMESPACE as N, Host as a, bootstrapLazy as b, consoleDevInfo as c, doc as d, createEvent as e, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
2820
4182
 
2821
- //# sourceMappingURL=index-7d9c71f6.js.map
4183
+ //# sourceMappingURL=index-cccc19b7.js.map