@webquark/core 1.0.2 → 1.1.0-dev.10

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 (519) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +17 -98
  3. package/dist/browser/components/index.d.ts +1 -0
  4. package/dist/browser/components/index.js +1 -0
  5. package/dist/browser/components/q-accordion.d.ts +1 -0
  6. package/dist/browser/components/q-accordion.js +1 -0
  7. package/dist/browser/components/q-alert.d.ts +1 -0
  8. package/dist/browser/components/q-alert.js +1 -0
  9. package/dist/browser/components/q-avatar.d.ts +1 -0
  10. package/dist/browser/components/q-avatar.js +1 -0
  11. package/dist/browser/components/q-banner.d.ts +1 -0
  12. package/dist/browser/components/q-banner.js +1 -0
  13. package/dist/browser/components/q-button.d.ts +1 -0
  14. package/dist/browser/components/q-button.js +1 -0
  15. package/dist/browser/components/q-card.d.ts +1 -0
  16. package/dist/browser/components/q-card.js +1 -0
  17. package/dist/browser/components/q-carousel.d.ts +1 -0
  18. package/dist/browser/components/q-carousel.js +1 -0
  19. package/dist/browser/components/q-chip.d.ts +1 -0
  20. package/dist/browser/components/q-chip.js +1 -0
  21. package/dist/browser/components/q-conversation-bubble.d.ts +1 -0
  22. package/dist/browser/components/q-conversation-bubble.js +1 -0
  23. package/dist/browser/components/q-data-table.d.ts +1 -0
  24. package/dist/browser/components/q-data-table.js +1 -0
  25. package/dist/browser/components/q-dialog.d.ts +1 -0
  26. package/dist/browser/components/q-dialog.js +1 -0
  27. package/dist/browser/components/q-dropdown.d.ts +1 -0
  28. package/dist/browser/components/q-dropdown.js +1 -0
  29. package/dist/browser/components/q-form.d.ts +1 -0
  30. package/dist/browser/components/q-form.js +1 -0
  31. package/dist/browser/components/q-grid.d.ts +1 -0
  32. package/dist/browser/components/q-grid.js +1 -0
  33. package/dist/browser/components/q-icon.d.ts +1 -0
  34. package/dist/browser/components/q-icon.js +1 -0
  35. package/dist/browser/components/q-image-comparison.d.ts +1 -0
  36. package/dist/browser/components/q-image-comparison.js +1 -0
  37. package/dist/browser/components/q-inline.d.ts +1 -0
  38. package/dist/browser/components/q-inline.js +1 -0
  39. package/dist/browser/components/q-input.d.ts +1 -0
  40. package/dist/browser/components/q-input.js +1 -0
  41. package/dist/browser/components/q-link.d.ts +1 -0
  42. package/dist/browser/components/q-link.js +1 -0
  43. package/dist/browser/components/q-map.d.ts +1 -0
  44. package/dist/browser/components/q-map.js +1 -0
  45. package/dist/browser/components/q-media.d.ts +1 -0
  46. package/dist/browser/components/q-media.js +1 -0
  47. package/dist/browser/components/q-navbar.d.ts +1 -0
  48. package/dist/browser/components/q-navbar.js +1 -0
  49. package/dist/browser/components/q-pagination.d.ts +1 -0
  50. package/dist/browser/components/q-pagination.js +1 -0
  51. package/dist/browser/components/q-panel.d.ts +1 -0
  52. package/dist/browser/components/q-panel.js +1 -0
  53. package/dist/browser/components/q-progress.d.ts +1 -0
  54. package/dist/browser/components/q-progress.js +1 -0
  55. package/dist/browser/components/q-quantity-selector.d.ts +1 -0
  56. package/dist/browser/components/q-quantity-selector.js +1 -0
  57. package/dist/browser/components/q-radio-group.d.ts +1 -0
  58. package/dist/browser/components/q-radio-group.js +1 -0
  59. package/dist/browser/components/q-reel.d.ts +1 -0
  60. package/dist/browser/components/q-reel.js +1 -0
  61. package/dist/browser/components/q-scrollable.d.ts +1 -0
  62. package/dist/browser/components/q-scrollable.js +1 -0
  63. package/dist/browser/components/q-section.d.ts +1 -0
  64. package/dist/browser/components/q-section.js +1 -0
  65. package/dist/browser/components/q-sidepanel.d.ts +1 -0
  66. package/dist/browser/components/q-sidepanel.js +1 -0
  67. package/dist/browser/components/q-stack.d.ts +1 -0
  68. package/dist/browser/components/q-stack.js +1 -0
  69. package/dist/browser/components/q-step-diagram-item.d.ts +1 -0
  70. package/dist/browser/components/q-step-diagram-item.js +1 -0
  71. package/dist/browser/components/q-step-diagram.d.ts +1 -0
  72. package/dist/browser/components/q-step-diagram.js +1 -0
  73. package/dist/browser/components/q-syntax-box.d.ts +1 -0
  74. package/dist/browser/components/q-syntax-box.js +1 -0
  75. package/dist/browser/components/q-tabs.d.ts +1 -0
  76. package/dist/browser/components/q-tabs.js +1 -0
  77. package/dist/browser/components/q-textarea.d.ts +1 -0
  78. package/dist/browser/components/q-textarea.js +1 -0
  79. package/dist/browser/components/q-thumbnail.d.ts +1 -0
  80. package/dist/browser/components/q-thumbnail.js +1 -0
  81. package/dist/browser/components/q-toast.d.ts +1 -0
  82. package/dist/browser/components/q-toast.js +1 -0
  83. package/dist/browser/components/q-toggle.d.ts +1 -0
  84. package/dist/browser/components/q-toggle.js +1 -0
  85. package/dist/browser/components/q-toolbar.d.ts +1 -0
  86. package/dist/browser/components/q-toolbar.js +1 -0
  87. package/dist/browser/components/q-tooltip.d.ts +1 -0
  88. package/dist/browser/components/q-tooltip.js +1 -0
  89. package/dist/browser/index.cjs +1 -0
  90. package/dist/browser/index.d.ts +1 -0
  91. package/dist/browser/index.js +1 -0
  92. package/dist/browser/loader/index.cjs +1 -0
  93. package/dist/browser/loader/index.d.ts +1 -0
  94. package/dist/browser/loader/index.js +1 -0
  95. package/dist/browser/native-content.css +24 -0
  96. package/dist/browser/webquark.css +1 -0
  97. package/dist/playground/assets/comparison-after.svg +1 -0
  98. package/dist/playground/assets/comparison-before.svg +1 -0
  99. package/dist/playground/assets/icons/braces.svg +14 -14
  100. package/dist/playground/assets/icons/check-preview.png +0 -0
  101. package/dist/playground/assets/icons/check.svg +1 -1
  102. package/dist/playground/assets/icons/chevron-down.svg +1 -1
  103. package/dist/playground/assets/icons/chevron-left.svg +1 -1
  104. package/dist/playground/assets/icons/chevron-right.svg +1 -1
  105. package/dist/playground/assets/icons/chevron-up.svg +1 -1
  106. package/dist/playground/assets/icons/copy.svg +4 -4
  107. package/dist/playground/assets/icons/eye-off.svg +1 -1
  108. package/dist/playground/assets/icons/eye.svg +1 -1
  109. package/dist/playground/assets/icons/minus.svg +1 -1
  110. package/dist/playground/assets/icons/play.svg +1 -1
  111. package/dist/playground/assets/icons/plus.svg +1 -1
  112. package/dist/playground/assets/icons/search.svg +1 -1
  113. package/dist/playground/assets/icons/spinner.svg +1 -1
  114. package/dist/playground/assets/icons/trash-2.svg +1 -1
  115. package/dist/playground/assets/icons/x.svg +1 -1
  116. package/dist/playground/build/index.esm.js +1 -1
  117. package/dist/playground/build/p-023f8437.entry.js +1 -0
  118. package/dist/playground/build/p-030ecde3.entry.js +1 -0
  119. package/dist/playground/build/p-04c8cb9e.entry.js +1 -0
  120. package/dist/playground/build/p-059daa8a.entry.js +1 -0
  121. package/dist/playground/build/p-09cca7b9.entry.js +1 -0
  122. package/dist/playground/build/p-0aa74ad6.entry.js +1 -0
  123. package/dist/playground/build/p-0ae43d6c.entry.js +1 -0
  124. package/dist/playground/build/p-0c3aac3f.entry.js +1 -0
  125. package/dist/playground/build/p-144ef339.entry.js +1 -0
  126. package/dist/playground/build/p-296fbdb1.entry.js +1 -0
  127. package/dist/playground/build/p-36118d90.entry.js +1 -0
  128. package/dist/playground/build/p-3bc4629c.entry.js +1 -0
  129. package/dist/playground/build/p-48fb5228.entry.js +1 -0
  130. package/dist/playground/build/p-4d61b70d.entry.js +1 -0
  131. package/dist/playground/build/p-5f232b44.entry.js +13 -0
  132. package/dist/playground/build/p-64096386.entry.js +1 -0
  133. package/dist/playground/build/p-6bfffa79.entry.js +1 -0
  134. package/dist/playground/build/p-6e28cfe2.entry.js +1 -0
  135. package/dist/playground/build/p-70d9ffde.entry.js +1 -0
  136. package/dist/playground/build/p-888e46a8.entry.js +1 -0
  137. package/dist/playground/build/p-8ece2c62.entry.js +1 -0
  138. package/dist/playground/build/p-90b0858c.entry.js +1 -0
  139. package/dist/playground/build/p-91fff6b6.entry.js +1 -0
  140. package/dist/playground/build/p-923dac41.entry.js +1 -0
  141. package/dist/playground/build/p-97a89cae.entry.js +1 -0
  142. package/dist/playground/build/p-99d785ca.entry.js +1 -0
  143. package/dist/playground/build/p-9e78b796.entry.js +1 -0
  144. package/dist/playground/build/p-9ff7e5a4.entry.js +1 -0
  145. package/dist/playground/build/p-B4Mg1xEw.js +1 -0
  146. package/dist/playground/build/p-B5ElFlHv.js +3 -0
  147. package/dist/playground/build/p-BIIQL66b.js +1 -0
  148. package/dist/playground/build/p-BOdNg0jc.js +1 -0
  149. package/dist/playground/build/p-BcL0NVv0.js +1 -0
  150. package/dist/playground/build/p-Bj2RJb2E.js +1 -0
  151. package/dist/playground/build/p-ByfrUWx1.js +1 -0
  152. package/dist/playground/build/p-CGZPmEUB.js +1 -0
  153. package/dist/playground/build/p-CGml_DQ8.js +1 -0
  154. package/dist/playground/build/p-C_RztzNv.js +5 -0
  155. package/dist/playground/build/p-CoIMrUb3.js +1 -0
  156. package/dist/playground/build/p-CpI3m4_T.js +1 -0
  157. package/dist/playground/build/p-DKrPmn2y.js +13 -0
  158. package/dist/playground/build/p-DWO-pleQ.js +1 -0
  159. package/dist/playground/build/p-DYMWBqU1.js +5 -0
  160. package/dist/playground/build/p-Dhsn99q4.js +1 -0
  161. package/dist/playground/build/p-DstNl_WY.js +1 -0
  162. package/dist/playground/build/p-DuX-9GOi.js +1 -0
  163. package/dist/playground/build/p-SzKf4WZF.js +1 -0
  164. package/dist/playground/build/p-c523ec6f.entry.js +1 -0
  165. package/dist/playground/build/p-c923c9c0.js +1 -0
  166. package/dist/playground/build/p-d0253d64.entry.js +1 -0
  167. package/dist/playground/build/p-d0fbd2b1.entry.js +1 -0
  168. package/dist/playground/build/p-dd115868.entry.js +1 -0
  169. package/dist/playground/build/p-e0bb74ae.css +1 -0
  170. package/dist/playground/build/p-f1bac94c.entry.js +1 -0
  171. package/dist/playground/build/p-f4f97e74.entry.js +1 -0
  172. package/dist/playground/build/p-f63b7214.entry.js +1 -0
  173. package/dist/playground/build/p-f98f9439.entry.js +1 -0
  174. package/dist/playground/build/p-f9ad63ff.entry.js +1 -0
  175. package/dist/playground/build/p-fe200f68.entry.js +1 -0
  176. package/dist/playground/build/p-fe8c634a.entry.js +13 -0
  177. package/dist/playground/build/p-fec6fe0a.entry.js +1 -0
  178. package/dist/playground/build/webquark.css +1 -1
  179. package/dist/playground/build/webquark.esm.js +1 -1
  180. package/dist/playground/css/base.css +122 -145
  181. package/dist/playground/index.html +1 -29
  182. package/dist/playground/logo.svg +8 -8
  183. package/dist/playground/native-content.css +24 -0
  184. package/dist/playground/playground/components.manifest.json +43 -20
  185. package/dist/playground/playground/specs/q-avatar.sandbox.json +24 -0
  186. package/dist/playground/playground/specs/q-button.sandbox.json +210 -198
  187. package/dist/playground/playground/specs/q-card.sandbox.json +178 -144
  188. package/dist/playground/playground/specs/q-carousel.sandbox.json +135 -120
  189. package/dist/playground/playground/specs/q-chip.sandbox.json +105 -0
  190. package/dist/playground/playground/specs/q-conversation-bubble.sandbox.json +26 -0
  191. package/dist/playground/playground/specs/q-data-table.sandbox.json +185 -108
  192. package/dist/playground/playground/specs/q-dialog.sandbox.json +118 -108
  193. package/dist/playground/playground/specs/q-dropdown.sandbox.json +131 -116
  194. package/dist/playground/playground/specs/q-form.sandbox.json +98 -0
  195. package/dist/playground/playground/specs/q-grid.sandbox.json +56 -0
  196. package/dist/playground/playground/specs/q-icon.sandbox.json +154 -138
  197. package/dist/playground/playground/specs/q-image-comparison.sandbox.json +24 -0
  198. package/dist/playground/playground/specs/q-inline.sandbox.json +60 -0
  199. package/dist/playground/playground/specs/q-input.sandbox.json +202 -192
  200. package/dist/playground/playground/specs/q-link.sandbox.json +27 -0
  201. package/dist/playground/playground/specs/q-map.sandbox.json +203 -0
  202. package/dist/playground/playground/specs/q-navbar.sandbox.json +40 -0
  203. package/dist/playground/playground/specs/q-panel.sandbox.json +149 -0
  204. package/dist/playground/playground/specs/q-progress.sandbox.json +117 -0
  205. package/dist/playground/playground/specs/q-quantity-selector.sandbox.json +110 -99
  206. package/dist/playground/playground/specs/q-radio-group.sandbox.json +94 -0
  207. package/dist/playground/playground/specs/q-reel.sandbox.json +70 -70
  208. package/dist/playground/playground/specs/q-scrollable.sandbox.json +102 -102
  209. package/dist/playground/playground/specs/q-sidepanel.sandbox.json +152 -147
  210. package/dist/playground/playground/specs/q-stack.sandbox.json +56 -0
  211. package/dist/playground/playground/specs/q-step-diagram.sandbox.json +56 -56
  212. package/dist/playground/playground/specs/q-syntax-box.sandbox.json +204 -160
  213. package/dist/playground/playground/specs/q-textarea.sandbox.json +153 -133
  214. package/dist/playground/playground/specs/q-toast.sandbox.json +32 -0
  215. package/dist/playground/playground/specs/q-toggle.sandbox.json +206 -196
  216. package/dist/playground/playground/specs/q-toolbar.sandbox.json +111 -0
  217. package/dist/playground/playground/specs/q-tooltip.sandbox.json +65 -65
  218. package/dist/playground/playground.js +1989 -947
  219. package/dist/playground/presets.html +47 -0
  220. package/dist/playground/views/tooling/sample-feed.json +13 -0
  221. package/dist/playground/views/tooling/sample-notes.md +14 -0
  222. package/dist/playground/views/tooling/tooling.html +69 -0
  223. package/dist/tooling/changelog/index.d.ts +1 -0
  224. package/dist/tooling/changelog/index.js +1 -0
  225. package/package.json +68 -84
  226. package/scripts/package.json +1 -0
  227. package/scripts/webquark-serve.js +3 -78
  228. package/scripts/wq-changelog.js +4 -0
  229. package/scripts/wq-switch/README.md +208 -0
  230. package/scripts/wq-switch/dist/index.js +2 -0
  231. package/scripts/wq-switch/dist/setup.js +2 -0
  232. package/dist/cjs/dom-CTqgGpWA.js +0 -238
  233. package/dist/cjs/index-CLlvFbDw.js +0 -1774
  234. package/dist/cjs/index-DGQOjEwT.js +0 -33
  235. package/dist/cjs/index.cjs.js +0 -7
  236. package/dist/cjs/loader.cjs.js +0 -12
  237. package/dist/cjs/q-button_3.cjs.entry.js +0 -603
  238. package/dist/cjs/q-card.cjs.entry.js +0 -55
  239. package/dist/cjs/q-carousel.cjs.entry.js +0 -288
  240. package/dist/cjs/q-circular-progress_2.cjs.entry.js +0 -255
  241. package/dist/cjs/q-data-table.cjs.entry.js +0 -197
  242. package/dist/cjs/q-dialog.cjs.entry.js +0 -143
  243. package/dist/cjs/q-dropdown.cjs.entry.js +0 -348
  244. package/dist/cjs/q-icon.cjs.entry.js +0 -184
  245. package/dist/cjs/q-quantity-selector.cjs.entry.js +0 -178
  246. package/dist/cjs/q-reel.cjs.entry.js +0 -117
  247. package/dist/cjs/q-sidepanel.cjs.entry.js +0 -215
  248. package/dist/cjs/q-step-diagram-item.cjs.entry.js +0 -48
  249. package/dist/cjs/q-step-diagram.cjs.entry.js +0 -47
  250. package/dist/cjs/q-syntax-box.cjs.entry.js +0 -457
  251. package/dist/cjs/q-textarea.cjs.entry.js +0 -136
  252. package/dist/cjs/q-thumbnail.cjs.entry.js +0 -44
  253. package/dist/cjs/q-toggle.cjs.entry.js +0 -148
  254. package/dist/cjs/webquark.cjs.js +0 -24
  255. package/dist/collection/assets/icons/braces.svg +0 -14
  256. package/dist/collection/assets/icons/check.svg +0 -1
  257. package/dist/collection/assets/icons/chevron-down.svg +0 -1
  258. package/dist/collection/assets/icons/chevron-left.svg +0 -1
  259. package/dist/collection/assets/icons/chevron-right.svg +0 -1
  260. package/dist/collection/assets/icons/chevron-up.svg +0 -1
  261. package/dist/collection/assets/icons/copy.svg +0 -4
  262. package/dist/collection/assets/icons/eye-off.svg +0 -1
  263. package/dist/collection/assets/icons/eye.svg +0 -1
  264. package/dist/collection/assets/icons/minus.svg +0 -1
  265. package/dist/collection/assets/icons/play.svg +0 -1
  266. package/dist/collection/assets/icons/plus.svg +0 -1
  267. package/dist/collection/assets/icons/search.svg +0 -1
  268. package/dist/collection/assets/icons/spinner.svg +0 -1
  269. package/dist/collection/assets/icons/trash-2.svg +0 -1
  270. package/dist/collection/assets/icons/x.svg +0 -1
  271. package/dist/collection/collection-manifest.json +0 -32
  272. package/dist/collection/components/button/button.css +0 -174
  273. package/dist/collection/components/button/button.js +0 -358
  274. package/dist/collection/components/card/card.css +0 -96
  275. package/dist/collection/components/card/card.js +0 -147
  276. package/dist/collection/components/carousel/carousel.css +0 -177
  277. package/dist/collection/components/carousel/carousel.js +0 -467
  278. package/dist/collection/components/circular-progress/circular-progress.css +0 -85
  279. package/dist/collection/components/circular-progress/circular-progress.js +0 -122
  280. package/dist/collection/components/data-table/data-table.css +0 -219
  281. package/dist/collection/components/data-table/data-table.js +0 -481
  282. package/dist/collection/components/dialog/dialog.css +0 -240
  283. package/dist/collection/components/dialog/dialog.js +0 -481
  284. package/dist/collection/components/dropdown/dropdown.css +0 -292
  285. package/dist/collection/components/dropdown/dropdown.js +0 -606
  286. package/dist/collection/components/icon/icon.css +0 -39
  287. package/dist/collection/components/icon/icon.js +0 -297
  288. package/dist/collection/components/input/input.css +0 -276
  289. package/dist/collection/components/input/input.js +0 -609
  290. package/dist/collection/components/quantity-selector/quantity-selector.css +0 -131
  291. package/dist/collection/components/quantity-selector/quantity-selector.js +0 -361
  292. package/dist/collection/components/reel/reel.css +0 -185
  293. package/dist/collection/components/reel/reel.js +0 -214
  294. package/dist/collection/components/scrollable/scrollable.css +0 -122
  295. package/dist/collection/components/scrollable/scrollable.js +0 -536
  296. package/dist/collection/components/sidepanel/sidepanel.css +0 -371
  297. package/dist/collection/components/sidepanel/sidepanel.js +0 -460
  298. package/dist/collection/components/step-diagram/step-diagram.css +0 -21
  299. package/dist/collection/components/step-diagram/step-diagram.js +0 -74
  300. package/dist/collection/components/step-diagram-item/step-diagram-item.css +0 -253
  301. package/dist/collection/components/step-diagram-item/step-diagram-item.js +0 -131
  302. package/dist/collection/components/syntax-box/syntax-box.css +0 -206
  303. package/dist/collection/components/syntax-box/syntax-box.js +0 -534
  304. package/dist/collection/components/textarea/textarea.css +0 -83
  305. package/dist/collection/components/textarea/textarea.js +0 -461
  306. package/dist/collection/components/thumbnail/thumbnail.css +0 -109
  307. package/dist/collection/components/thumbnail/thumbnail.js +0 -171
  308. package/dist/collection/components/toggle/toggle.css +0 -212
  309. package/dist/collection/components/toggle/toggle.js +0 -390
  310. package/dist/collection/components/tooltip/tooltip.css +0 -65
  311. package/dist/collection/components/tooltip/tooltip.js +0 -249
  312. package/dist/collection/index.js +0 -10
  313. package/dist/collection/playground/components/playground-code-preview/playground-code-preview.js +0 -48
  314. package/dist/collection/playground/components/playground-event-log/playground-event-log.js +0 -63
  315. package/dist/collection/playground/components/playground-header/playground-header.js +0 -65
  316. package/dist/collection/playground/components/playground-sidebar/playground-sidebar.js +0 -74
  317. package/dist/collection/playground/components/properties-panel/properties-panel.js +0 -146
  318. package/dist/collection/playground/components/properties-panel/property-row.js +0 -31
  319. package/dist/collection/playground/components/properties-panel/slot-row.js +0 -27
  320. package/dist/collection/playground/components/sandbox-viewport/sandbox-panel.js +0 -334
  321. package/dist/collection/playground/components/sandbox-viewport/sandbox-viewport.js +0 -155
  322. package/dist/collection/playground/components/sandbox-viewport/variant-card.js +0 -86
  323. package/dist/collection/playground/components/sandbox-viewport/viewport-tabs.js +0 -39
  324. package/dist/collection/playground/components/theme-designer/theme-designer.js +0 -89
  325. package/dist/collection/playground/components/theme-designer/token-row.js +0 -70
  326. package/dist/collection/playground/components/theme-designer/token-section.js +0 -19
  327. package/dist/collection/playground/dom-factory.js +0 -76
  328. package/dist/collection/playground/events.js +0 -37
  329. package/dist/collection/playground/logo.svg +0 -8
  330. package/dist/collection/playground/playground.bundled.js +0 -2831
  331. package/dist/collection/playground/playground.js +0 -10
  332. package/dist/collection/playground/state.js +0 -158
  333. package/dist/collection/playground/utils/color.js +0 -26
  334. package/dist/collection/playground/utils/dom.js +0 -38
  335. package/dist/collection/playground/utils/index.js +0 -2
  336. package/dist/collection/playground/views/q-button-view/q-button-view.js +0 -6
  337. package/dist/collection/playground/views/q-input-view/q-input-view.js +0 -6
  338. package/dist/collection/utils/dom.js +0 -228
  339. package/dist/collection/utils/formatter.js +0 -177
  340. package/dist/collection/utils/formatter.unit.test.js +0 -53
  341. package/dist/collection/utils/math.js +0 -19
  342. package/dist/collection/utils/syntax.js +0 -110
  343. package/dist/collection/utils/utils.js +0 -28
  344. package/dist/collection/utils/utils.unit.test.js +0 -16
  345. package/dist/components/index.d.ts +0 -35
  346. package/dist/components/index.js +0 -1
  347. package/dist/components/p-91lJS0-v.js +0 -1
  348. package/dist/components/p-B4IF9WVv.js +0 -1
  349. package/dist/components/p-BCSpNDGG.js +0 -1
  350. package/dist/components/p-DScvq41R.js +0 -1
  351. package/dist/components/p-DfTW9B7V.js +0 -1
  352. package/dist/components/p-DgaKWrjd.js +0 -1
  353. package/dist/components/p-Do2ppeKL.js +0 -1
  354. package/dist/components/p-DoQvrOHk.js +0 -1
  355. package/dist/components/q-button.d.ts +0 -11
  356. package/dist/components/q-button.js +0 -1
  357. package/dist/components/q-card.d.ts +0 -11
  358. package/dist/components/q-card.js +0 -1
  359. package/dist/components/q-carousel.d.ts +0 -11
  360. package/dist/components/q-carousel.js +0 -1
  361. package/dist/components/q-circular-progress.d.ts +0 -11
  362. package/dist/components/q-circular-progress.js +0 -1
  363. package/dist/components/q-data-table.d.ts +0 -11
  364. package/dist/components/q-data-table.js +0 -1
  365. package/dist/components/q-dialog.d.ts +0 -11
  366. package/dist/components/q-dialog.js +0 -1
  367. package/dist/components/q-dropdown.d.ts +0 -11
  368. package/dist/components/q-dropdown.js +0 -1
  369. package/dist/components/q-icon.d.ts +0 -11
  370. package/dist/components/q-icon.js +0 -1
  371. package/dist/components/q-input.d.ts +0 -11
  372. package/dist/components/q-input.js +0 -1
  373. package/dist/components/q-quantity-selector.d.ts +0 -11
  374. package/dist/components/q-quantity-selector.js +0 -1
  375. package/dist/components/q-reel.d.ts +0 -11
  376. package/dist/components/q-reel.js +0 -1
  377. package/dist/components/q-scrollable.d.ts +0 -11
  378. package/dist/components/q-scrollable.js +0 -1
  379. package/dist/components/q-sidepanel.d.ts +0 -11
  380. package/dist/components/q-sidepanel.js +0 -1
  381. package/dist/components/q-step-diagram-item.d.ts +0 -11
  382. package/dist/components/q-step-diagram-item.js +0 -1
  383. package/dist/components/q-step-diagram.d.ts +0 -11
  384. package/dist/components/q-step-diagram.js +0 -1
  385. package/dist/components/q-syntax-box.d.ts +0 -11
  386. package/dist/components/q-syntax-box.js +0 -1
  387. package/dist/components/q-textarea.d.ts +0 -11
  388. package/dist/components/q-textarea.js +0 -1
  389. package/dist/components/q-thumbnail.d.ts +0 -11
  390. package/dist/components/q-thumbnail.js +0 -1
  391. package/dist/components/q-toggle.d.ts +0 -11
  392. package/dist/components/q-toggle.js +0 -1
  393. package/dist/components/q-tooltip.d.ts +0 -11
  394. package/dist/components/q-tooltip.js +0 -1
  395. package/dist/esm/dom-DoQvrOHk.js +0 -230
  396. package/dist/esm/index-BJiYCN3i.js +0 -30
  397. package/dist/esm/index-CYoQ4Zv3.js +0 -1764
  398. package/dist/esm/index.js +0 -1
  399. package/dist/esm/loader.js +0 -10
  400. package/dist/esm/q-button_3.entry.js +0 -599
  401. package/dist/esm/q-card.entry.js +0 -53
  402. package/dist/esm/q-carousel.entry.js +0 -286
  403. package/dist/esm/q-circular-progress_2.entry.js +0 -252
  404. package/dist/esm/q-data-table.entry.js +0 -195
  405. package/dist/esm/q-dialog.entry.js +0 -141
  406. package/dist/esm/q-dropdown.entry.js +0 -346
  407. package/dist/esm/q-icon.entry.js +0 -182
  408. package/dist/esm/q-quantity-selector.entry.js +0 -176
  409. package/dist/esm/q-reel.entry.js +0 -115
  410. package/dist/esm/q-sidepanel.entry.js +0 -213
  411. package/dist/esm/q-step-diagram-item.entry.js +0 -46
  412. package/dist/esm/q-step-diagram.entry.js +0 -45
  413. package/dist/esm/q-syntax-box.entry.js +0 -455
  414. package/dist/esm/q-textarea.entry.js +0 -134
  415. package/dist/esm/q-thumbnail.entry.js +0 -42
  416. package/dist/esm/q-toggle.entry.js +0 -146
  417. package/dist/esm/webquark.js +0 -20
  418. package/dist/index.cjs.js +0 -1
  419. package/dist/index.js +0 -1
  420. package/dist/loader/cdn.js +0 -1
  421. package/dist/loader/index.cjs.js +0 -1
  422. package/dist/loader/index.d.ts +0 -24
  423. package/dist/loader/index.es2017.js +0 -1
  424. package/dist/loader/index.js +0 -2
  425. package/dist/playground/build/p-095635d3.entry.js +0 -1
  426. package/dist/playground/build/p-1187e439.entry.js +0 -1
  427. package/dist/playground/build/p-389e2cd3.entry.js +0 -1
  428. package/dist/playground/build/p-38d9e75b.entry.js +0 -1
  429. package/dist/playground/build/p-4ce667f1.entry.js +0 -1
  430. package/dist/playground/build/p-66b0eb0f.entry.js +0 -1
  431. package/dist/playground/build/p-69d33f9d.entry.js +0 -1
  432. package/dist/playground/build/p-6dc7b987.entry.js +0 -1
  433. package/dist/playground/build/p-76e04a7f.entry.js +0 -1
  434. package/dist/playground/build/p-776a0eb6.entry.js +0 -1
  435. package/dist/playground/build/p-7c4532f3.entry.js +0 -1
  436. package/dist/playground/build/p-7d2144cf.entry.js +0 -1
  437. package/dist/playground/build/p-84185204.entry.js +0 -1
  438. package/dist/playground/build/p-938cd8a6.entry.js +0 -1
  439. package/dist/playground/build/p-CYoQ4Zv3.js +0 -2
  440. package/dist/playground/build/p-DoQvrOHk.js +0 -1
  441. package/dist/playground/build/p-a182b818.entry.js +0 -1
  442. package/dist/playground/build/p-aa017815.entry.js +0 -1
  443. package/dist/playground/build/p-d7607e11.entry.js +0 -1
  444. package/dist/playground/playground/specs/q-circular-progress.sandbox.json +0 -91
  445. package/dist/types/components/button/button.d.ts +0 -26
  446. package/dist/types/components/card/card.d.ts +0 -12
  447. package/dist/types/components/carousel/carousel.d.ts +0 -44
  448. package/dist/types/components/circular-progress/circular-progress.d.ts +0 -7
  449. package/dist/types/components/data-table/data-table.d.ts +0 -45
  450. package/dist/types/components/dialog/dialog.d.ts +0 -35
  451. package/dist/types/components/dropdown/dropdown.d.ts +0 -49
  452. package/dist/types/components/icon/icon.d.ts +0 -33
  453. package/dist/types/components/input/input.d.ts +0 -43
  454. package/dist/types/components/quantity-selector/quantity-selector.d.ts +0 -31
  455. package/dist/types/components/reel/reel.d.ts +0 -23
  456. package/dist/types/components/scrollable/scrollable.d.ts +0 -47
  457. package/dist/types/components/sidepanel/sidepanel.d.ts +0 -58
  458. package/dist/types/components/step-diagram/step-diagram.d.ts +0 -10
  459. package/dist/types/components/step-diagram-item/step-diagram-item.d.ts +0 -12
  460. package/dist/types/components/syntax-box/syntax-box.d.ts +0 -37
  461. package/dist/types/components/textarea/textarea.d.ts +0 -36
  462. package/dist/types/components/thumbnail/thumbnail.d.ts +0 -18
  463. package/dist/types/components/toggle/toggle.d.ts +0 -36
  464. package/dist/types/components/tooltip/tooltip.d.ts +0 -29
  465. package/dist/types/components.d.ts +0 -1752
  466. package/dist/types/declarations.d.ts +0 -9
  467. package/dist/types/index.d.ts +0 -11
  468. package/dist/types/playground/components/playground-code-preview/playground-code-preview.d.ts +0 -9
  469. package/dist/types/playground/components/playground-event-log/playground-event-log.d.ts +0 -11
  470. package/dist/types/playground/components/playground-header/playground-header.d.ts +0 -10
  471. package/dist/types/playground/components/playground-sidebar/playground-sidebar.d.ts +0 -11
  472. package/dist/types/playground/components/properties-panel/properties-panel.d.ts +0 -15
  473. package/dist/types/playground/components/properties-panel/property-row.d.ts +0 -6
  474. package/dist/types/playground/components/properties-panel/slot-row.d.ts +0 -7
  475. package/dist/types/playground/components/sandbox-viewport/sandbox-panel.d.ts +0 -15
  476. package/dist/types/playground/components/sandbox-viewport/sandbox-viewport.d.ts +0 -14
  477. package/dist/types/playground/components/sandbox-viewport/variant-card.d.ts +0 -7
  478. package/dist/types/playground/components/sandbox-viewport/viewport-tabs.d.ts +0 -5
  479. package/dist/types/playground/components/theme-designer/theme-designer.d.ts +0 -15
  480. package/dist/types/playground/components/theme-designer/token-row.d.ts +0 -13
  481. package/dist/types/playground/components/theme-designer/token-section.d.ts +0 -7
  482. package/dist/types/playground/dom-factory.d.ts +0 -12
  483. package/dist/types/playground/events.d.ts +0 -24
  484. package/dist/types/playground/playground.d.ts +0 -7
  485. package/dist/types/playground/state.d.ts +0 -44
  486. package/dist/types/playground/utils/color.d.ts +0 -8
  487. package/dist/types/playground/utils/dom.d.ts +0 -15
  488. package/dist/types/playground/utils/index.d.ts +0 -2
  489. package/dist/types/stencil-public-runtime.d.ts +0 -1861
  490. package/dist/types/utils/dom.d.ts +0 -68
  491. package/dist/types/utils/formatter.d.ts +0 -24
  492. package/dist/types/utils/formatter.unit.test.d.ts +0 -1
  493. package/dist/types/utils/math.d.ts +0 -10
  494. package/dist/types/utils/syntax.d.ts +0 -9
  495. package/dist/types/utils/utils.d.ts +0 -11
  496. package/dist/types/utils/utils.unit.test.d.ts +0 -1
  497. package/dist/webquark/index.esm.js +0 -1
  498. package/dist/webquark/p-095635d3.entry.js +0 -1
  499. package/dist/webquark/p-1187e439.entry.js +0 -1
  500. package/dist/webquark/p-389e2cd3.entry.js +0 -1
  501. package/dist/webquark/p-38d9e75b.entry.js +0 -1
  502. package/dist/webquark/p-4ce667f1.entry.js +0 -1
  503. package/dist/webquark/p-66b0eb0f.entry.js +0 -1
  504. package/dist/webquark/p-69d33f9d.entry.js +0 -1
  505. package/dist/webquark/p-6dc7b987.entry.js +0 -1
  506. package/dist/webquark/p-76e04a7f.entry.js +0 -1
  507. package/dist/webquark/p-776a0eb6.entry.js +0 -1
  508. package/dist/webquark/p-7c4532f3.entry.js +0 -1
  509. package/dist/webquark/p-7d2144cf.entry.js +0 -1
  510. package/dist/webquark/p-84185204.entry.js +0 -1
  511. package/dist/webquark/p-938cd8a6.entry.js +0 -1
  512. package/dist/webquark/p-BJiYCN3i.js +0 -1
  513. package/dist/webquark/p-CYoQ4Zv3.js +0 -2
  514. package/dist/webquark/p-DoQvrOHk.js +0 -1
  515. package/dist/webquark/p-a182b818.entry.js +0 -1
  516. package/dist/webquark/p-aa017815.entry.js +0 -1
  517. package/dist/webquark/p-d7607e11.entry.js +0 -1
  518. package/dist/webquark/webquark.css +0 -1
  519. package/dist/webquark/webquark.esm.js +0 -1
@@ -1,1774 +0,0 @@
1
- 'use strict';
2
-
3
- const NAMESPACE = 'webquark';
4
- const BUILD = /* webquark */ { hotModuleReplacement: false, hydratedSelectorName: "hydrated", lazyLoad: true, propChangeCallback: true, state: true, updatable: true};
5
-
6
- const globalScripts = () => {};
7
- const globalStyles = ":root{--q-color-primary:#60a5fa;--q-color-primary-hover:#93c5fd;--q-color-secondary:#9777ea;--q-color-success:#34d399;--q-color-warning:#fbbf24;--q-color-danger:#f87171;--q-bg-base:#111827;--q-bg-surface-1:#1f2937;--q-bg-surface-2:#374151;--q-bg-surface-3:#4b5563;--q-bg-card:var(--q-bg-surface-1);--q-bg-glass:rgba(31, 41, 55, 0.85);--q-bg-overlay:rgba(0, 0, 0, 0.85);--q-fg-base:#f9fafb;--q-fg-muted:#9ca3af;--q-border-color:#374151;--q-glass-blur:12px;--q-shadow-low:0 2px 4px rgba(0, 0, 0, 0.2);--q-shadow-medium:0 8px 16px rgba(0, 0, 0, 0.3);--q-shadow-high:0 16px 32px rgba(0, 0, 0, 0.45);--q-glow-interactive:0 0 20px rgba(96, 165, 250, 0.3);--q-border-width:1px;--q-border:var(--q-border-width) solid var(--q-border-color);--q-focus-ring:2px solid var(--q-color-primary);--q-font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;--q-font-size-sm:0.7rem;--q-font-size-base:0.9rem;--q-font-size-lg:1rem;--q-font-weight-normal:400;--q-font-weight-bold:600;--q-radius-sm:4px;--q-radius-md:7px;--q-radius-lg:11px;--q-padding-sm:4px;--q-padding-md:9px;--q-padding-lg:16px;--q-transition-fast:150ms ease;--q-transition-normal:250ms cubic-bezier(0.4, 0, 0.2, 1);--q-transition-slow:400ms cubic-bezier(0.4, 0, 0.2, 1);--q-hover-transform:translateY(-4px) scale(1.02);--q-btn-hover-overlay:color-mix(in srgb, var(--q-fg-base) 8%, transparent);--q-card-min-width:280px;--q-card-border:var(--q-border);--q-card-hover-transform:var(--q-hover-transform);--q-card-transition-duration:var(--q-transition-normal);--q-step-diag-line:2px solid var(--q-border-color);--q-step-diag-border:var(--q-border);--q-step-diag-icon-size:32px;--q-step-diag-item-gap:24px;--q-thumb-aspect-ratio:16 / 9;--q-thumb-border:var(--q-border);--q-thumb-hover-transform:var(--q-hover-transform);--q-thumb-overlay-bg:rgba(0, 0, 0, 0.4);--q-thumb-radius:var(--q-radius-md);--q-thumb-border-color:transparent;--q-thumb-glow:var(--q-glow-interactive);--q-reel-gap:12px;--q-reel-columns-desktop:repeat(auto-fill, minmax(200px, 1fr));--q-reel-columns-mobile:1fr;--q-lightbox-max-size:90vh;--q-carousel-gap:16px;--q-carousel-padding:24px 20px;--q-carousel-arrow-bg:var(--q-bg-overlay);--q-carousel-arrow-border:var(--q-border);--q-carousel-arrow-color:#ffffff;--q-carousel-arrow-size:40px;--q-carousel-indicator-gap:8px;--q-carousel-indicator-size:6px;--q-progress-size:120px;--q-progress-stroke-width:8px;--q-progress-linecap:round;--q-progress-track-color:var(--q-border-color);--q-progress-fill-color:var(--q-color-primary);--q-progress-font-size:var(--q-font-size-lg);--q-progress-font-weight:var(--q-font-weight-bold);--q-progress-animation-duration:1s;--q-btn-radius:var(--q-radius-md);--q-btn-font-size:var(--q-font-size-base);--q-btn-font-weight:var(--q-font-weight-bold);--q-btn-active-transform:scale(0.97);--q-btn-transition:all 150ms cubic-bezier(0.4, 0, 0.2, 1);--q-btn-padding-sm:6px 10px;--q-btn-padding-md:5px 8px;--q-btn-padding-lg:9px 16px;--q-field-bg:var(--q-bg-surface-2);--q-field-border:var(--q-border);--q-field-radius:var(--q-radius-md);--q-field-padding:10px 14px;--q-field-border-color-focus:var(--q-color-primary);--q-input-bg:var(--q-field-bg);--q-input-border:var(--q-field-border);--q-input-radius:var(--q-field-radius);--q-input-padding:var(--q-field-padding);--q-dropdown-bg:var(--q-field-bg);--q-dropdown-menu-bg:var(--q-bg-surface-3);--q-dropdown-border:var(--q-field-border);--q-dropdown-radius:var(--q-field-radius);--q-panel-bg:var(--q-bg-surface-1);--q-panel-border:var(--q-border);--q-panel-shadow:var(--q-shadow-high);--q-scrollbar-width:6px;--q-scrollbar-width-thin:thin;--q-scrollbar-track-color:transparent;--q-scrollbar-thumb-color:var(--q-border-color, #374151);--q-scrollbar-thumb-color-hover:var(--q-color-primary, #60a5fa);--q-scrollbar-radius:var(--q-radius-sm, 4px)}@media (prefers-color-scheme: light){:root{--q-color-primary:#3b82f6;--q-color-primary-hover:#2563eb;--q-color-secondary:#7c3aed;--q-color-success:#10b981;--q-color-warning:#f59e0b;--q-color-danger:#ef4444;--q-bg-base:#ffffff;--q-bg-surface-1:#f3f4f6;--q-bg-surface-2:#e5e7eb;--q-bg-surface-3:#d1d5db;--q-bg-card:var(--q-bg-surface-1);--q-bg-glass:rgba(255, 255, 255, 0.85);--q-bg-overlay:rgba(0, 0, 0, 0.6);--q-fg-base:#1f2937;--q-fg-muted:#4b5563;--q-border-color:#e5e7eb;--q-shadow-low:0 2px 4px rgba(0, 0, 0, 0.05);--q-shadow-medium:0 8px 16px rgba(0, 0, 0, 0.08);--q-shadow-high:0 16px 32px rgba(0, 0, 0, 0.12);--q-glow-interactive:0 0 20px rgba(59, 130, 246, 0.3)}}[data-theme='light']{--q-color-primary:#3b82f6;--q-color-primary-hover:#2563eb;--q-color-secondary:#7c3aed;--q-color-success:#10b981;--q-color-warning:#f59e0b;--q-color-danger:#ef4444;--q-bg-base:#ffffff;--q-bg-surface-1:#f3f4f6;--q-bg-surface-2:#e5e7eb;--q-bg-surface-3:#d1d5db;--q-bg-card:var(--q-bg-surface-1);--q-bg-glass:rgba(255, 255, 255, 0.85);--q-bg-overlay:rgba(0, 0, 0, 0.6);--q-fg-base:#1f2937;--q-fg-muted:#4b5563;--q-border-color:#e5e7eb;--q-shadow-low:0 2px 4px rgba(0, 0, 0, 0.05);--q-shadow-medium:0 8px 16px rgba(0, 0, 0, 0.08);--q-shadow-high:0 16px 32px rgba(0, 0, 0, 0.12);--q-glow-interactive:0 0 20px rgba(59, 130, 246, 0.3)}[data-theme='dark']{--q-color-primary:#60a5fa;--q-color-primary-hover:#93c5fd;--q-color-secondary:#9777ea;--q-color-success:#34d399;--q-color-warning:#fbbf24;--q-color-danger:#f87171;--q-bg-base:#111827;--q-bg-surface-1:#1f2937;--q-bg-surface-2:#374151;--q-bg-surface-3:#4b5563;--q-bg-card:var(--q-bg-surface-1);--q-bg-glass:rgba(31, 41, 55, 0.85);--q-bg-overlay:rgba(0, 0, 0, 0.85);--q-fg-base:#f9fafb;--q-fg-muted:#9ca3af;--q-border-color:#374151;--q-shadow-low:0 2px 4px rgba(0, 0, 0, 0.2);--q-shadow-medium:0 8px 16px rgba(0, 0, 0, 0.3);--q-shadow-high:0 16px 32px rgba(0, 0, 0, 0.45);--q-glow-interactive:0 0 20px rgba(96, 165, 250, 0.3)}";
8
-
9
- /*
10
- Stencil Client Platform v4.43.5 | MIT Licensed | https://stenciljs.com
11
- */
12
-
13
-
14
- // src/utils/constants.ts
15
- var SVG_NS = "http://www.w3.org/2000/svg";
16
- var HTML_NS = "http://www.w3.org/1999/xhtml";
17
-
18
- // src/utils/get-prop-descriptor.ts
19
- function getPropertyDescriptor(obj, memberName, getOnly) {
20
- const stopAt = typeof HTMLElement !== "undefined" ? HTMLElement.prototype : null;
21
- while (obj && obj !== stopAt) {
22
- const desc = Object.getOwnPropertyDescriptor(obj, memberName);
23
- if (desc && (!getOnly || desc.get)) return desc;
24
- obj = Object.getPrototypeOf(obj);
25
- }
26
- return void 0;
27
- }
28
-
29
- // src/utils/es2022-rewire-class-members.ts
30
- var reWireGetterSetter = (instance, hostRef) => {
31
- var _a;
32
- const cmpMeta = hostRef.$cmpMeta$;
33
- const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
34
- members.map(([memberName, [memberFlags]]) => {
35
- if ((memberFlags & 31 /* Prop */ || memberFlags & 32 /* State */)) {
36
- const ogValue = instance[memberName];
37
- const ogDescriptor = getPropertyDescriptor(Object.getPrototypeOf(instance), memberName, true) || Object.getOwnPropertyDescriptor(instance, memberName);
38
- if (ogDescriptor) {
39
- Object.defineProperty(instance, memberName, {
40
- get() {
41
- return ogDescriptor.get.call(this);
42
- },
43
- set(newValue) {
44
- ogDescriptor.set.call(this, newValue);
45
- },
46
- configurable: true,
47
- enumerable: true
48
- });
49
- }
50
- if (hostRef.$instanceValues$.has(memberName)) {
51
- instance[memberName] = hostRef.$instanceValues$.get(memberName);
52
- } else if (ogValue !== void 0) {
53
- instance[memberName] = ogValue;
54
- }
55
- }
56
- });
57
- };
58
-
59
- // src/client/client-host-ref.ts
60
- var getHostRef = (ref) => {
61
- if (ref.__stencil__getHostRef) {
62
- return ref.__stencil__getHostRef();
63
- }
64
- return void 0;
65
- };
66
- var registerInstance = (lazyInstance, hostRef) => {
67
- if (!hostRef) return;
68
- lazyInstance.__stencil__getHostRef = () => hostRef;
69
- hostRef.$lazyInstance$ = lazyInstance;
70
- if (hostRef.$cmpMeta$.$flags$ & 512 /* hasModernPropertyDecls */ && (BUILD.state)) {
71
- reWireGetterSetter(lazyInstance, hostRef);
72
- }
73
- };
74
- var registerHost = (hostElement, cmpMeta) => {
75
- const hostRef = {
76
- $flags$: 0,
77
- $hostElement$: hostElement,
78
- $cmpMeta$: cmpMeta,
79
- $instanceValues$: /* @__PURE__ */ new Map(),
80
- $serializerValues$: /* @__PURE__ */ new Map()
81
- };
82
- {
83
- hostRef.$onInstancePromise$ = new Promise((r) => hostRef.$onInstanceResolve$ = r);
84
- }
85
- {
86
- hostRef.$onReadyPromise$ = new Promise((r) => hostRef.$onReadyResolve$ = r);
87
- hostElement["s-p"] = [];
88
- hostElement["s-rc"] = [];
89
- }
90
- {
91
- hostRef.$fetchedCbList$ = [];
92
- }
93
- const ref = hostRef;
94
- hostElement.__stencil__getHostRef = () => ref;
95
- return ref;
96
- };
97
- var isMemberInElement = (elm, memberName) => memberName in elm;
98
- var consoleError = (e, el) => (0, console.error)(e, el);
99
-
100
- // src/client/client-load-module.ts
101
- var cmpModules = /* @__PURE__ */ new Map();
102
- var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
103
- const exportName = cmpMeta.$tagName$.replace(/-/g, "_");
104
- const bundleId = cmpMeta.$lazyBundleId$;
105
- if (!bundleId) {
106
- return void 0;
107
- }
108
- const module = cmpModules.get(bundleId) ;
109
- if (module) {
110
- return module[exportName];
111
- }
112
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/
113
- return import(
114
- /* @vite-ignore */
115
- /* webpackInclude: /\.entry\.js$/ */
116
- /* webpackExclude: /\.system\.entry\.js$/ */
117
- /* webpackMode: "lazy" */
118
- `./${bundleId}.entry.js${""}`
119
- ).then(
120
- (importedModule) => {
121
- {
122
- cmpModules.set(bundleId, importedModule);
123
- }
124
- return importedModule[exportName];
125
- },
126
- (e) => {
127
- consoleError(e, hostRef.$hostElement$);
128
- }
129
- );
130
- };
131
-
132
- // src/client/client-style.ts
133
- var styles = /* @__PURE__ */ new Map();
134
- var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
135
- var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
136
- var FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS = [
137
- "formAssociatedCallback",
138
- "formResetCallback",
139
- "formDisabledCallback",
140
- "formStateRestoreCallback"
141
- ];
142
- var win = typeof window !== "undefined" ? window : {};
143
- var plt = {
144
- $flags$: 0,
145
- $resourcesUrl$: "",
146
- jmp: (h2) => h2(),
147
- raf: (h2) => requestAnimationFrame(h2),
148
- ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
149
- rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
150
- ce: (eventName, opts) => new CustomEvent(eventName, opts)
151
- };
152
- var supportsListenerOptions = /* @__PURE__ */ (() => {
153
- var _a;
154
- let supportsListenerOptions2 = false;
155
- try {
156
- (_a = win.document) == null ? void 0 : _a.addEventListener(
157
- "e",
158
- null,
159
- Object.defineProperty({}, "passive", {
160
- get() {
161
- supportsListenerOptions2 = true;
162
- }
163
- })
164
- );
165
- } catch (e) {
166
- }
167
- return supportsListenerOptions2;
168
- })();
169
- var promiseResolve = (v) => Promise.resolve(v);
170
- var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
171
- try {
172
- if (!win.document.adoptedStyleSheets) {
173
- return false;
174
- }
175
- new CSSStyleSheet();
176
- return typeof new CSSStyleSheet().replaceSync === "function";
177
- } catch (e) {
178
- }
179
- return false;
180
- })() ;
181
- var supportsMutableAdoptedStyleSheets = supportsConstructableStylesheets ? /* @__PURE__ */ (() => !!win.document && Object.getOwnPropertyDescriptor(win.document.adoptedStyleSheets, "length").writable)() : false;
182
- var queuePending = false;
183
- var queueDomReads = [];
184
- var queueDomWrites = [];
185
- var queueTask = (queue, write) => (cb) => {
186
- queue.push(cb);
187
- if (!queuePending) {
188
- queuePending = true;
189
- if (write && plt.$flags$ & 4 /* queueSync */) {
190
- nextTick(flush);
191
- } else {
192
- plt.raf(flush);
193
- }
194
- }
195
- };
196
- var consume = (queue) => {
197
- for (let i2 = 0; i2 < queue.length; i2++) {
198
- try {
199
- queue[i2](performance.now());
200
- } catch (e) {
201
- consoleError(e);
202
- }
203
- }
204
- queue.length = 0;
205
- };
206
- var flush = () => {
207
- consume(queueDomReads);
208
- {
209
- consume(queueDomWrites);
210
- if (queuePending = queueDomReads.length > 0) {
211
- plt.raf(flush);
212
- }
213
- }
214
- };
215
- var nextTick = (cb) => promiseResolve().then(cb);
216
- var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
217
-
218
- // src/utils/style.ts
219
- function createStyleSheetIfNeededAndSupported(styles2) {
220
- if (!supportsConstructableStylesheets) return void 0;
221
- const sheet = new CSSStyleSheet();
222
- sheet.replaceSync(styles2);
223
- return sheet;
224
- }
225
-
226
- // src/utils/shadow-root.ts
227
- var globalStyleSheet;
228
- function createShadowRoot(cmpMeta) {
229
- var _a;
230
- const opts = { mode: "open" };
231
- {
232
- opts.delegatesFocus = !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */);
233
- }
234
- const shadowRoot = this.attachShadow(opts);
235
- if (globalStyleSheet === void 0) globalStyleSheet = (_a = createStyleSheetIfNeededAndSupported(globalStyles)) != null ? _a : null;
236
- if (globalStyleSheet) {
237
- if (supportsMutableAdoptedStyleSheets) {
238
- shadowRoot.adoptedStyleSheets.push(globalStyleSheet);
239
- } else {
240
- shadowRoot.adoptedStyleSheets = [...shadowRoot.adoptedStyleSheets, globalStyleSheet];
241
- }
242
- } else if (!supportsConstructableStylesheets) {
243
- const styleElm = document.createElement("style");
244
- styleElm.innerHTML = globalStyles;
245
- shadowRoot.prepend(styleElm);
246
- }
247
- }
248
- var createTime = (fnName, tagName = "") => {
249
- {
250
- return () => {
251
- return;
252
- };
253
- }
254
- };
255
- var uniqueTime = (key, measureText) => {
256
- {
257
- return () => {
258
- return;
259
- };
260
- }
261
- };
262
-
263
- // src/utils/query-nonce-meta-tag-content.ts
264
- function queryNonceMetaTagContent(doc) {
265
- var _a, _b, _c;
266
- return (_c = (_b = (_a = doc.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
267
- }
268
-
269
- // src/runtime/styles.ts
270
- var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
271
- var registerStyle = (scopeId2, cssText, allowCS) => {
272
- let style = styles.get(scopeId2);
273
- if (supportsConstructableStylesheets && allowCS) {
274
- style = style || new CSSStyleSheet();
275
- if (typeof style === "string") {
276
- style = cssText;
277
- } else {
278
- style.replaceSync(cssText);
279
- }
280
- } else {
281
- style = cssText;
282
- }
283
- styles.set(scopeId2, style);
284
- };
285
- var addStyle = (styleContainerNode, cmpMeta, mode) => {
286
- var _a, _b, _c;
287
- const scopeId2 = getScopeId(cmpMeta);
288
- const style = styles.get(scopeId2);
289
- if (!win.document) {
290
- return scopeId2;
291
- }
292
- styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
293
- if (style) {
294
- if (typeof style === "string") {
295
- styleContainerNode = styleContainerNode.head || styleContainerNode;
296
- let appliedStyles = rootAppliedStyles.get(styleContainerNode);
297
- let styleElm;
298
- if (!appliedStyles) {
299
- rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
300
- }
301
- if (!appliedStyles.has(scopeId2)) {
302
- styleElm = win.document.createElement("style");
303
- styleElm.textContent = style;
304
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
305
- if (nonce != null) {
306
- styleElm.setAttribute("nonce", nonce);
307
- }
308
- if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
309
- if (styleContainerNode.nodeName === "HEAD") {
310
- const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
311
- const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
312
- styleContainerNode.insertBefore(
313
- styleElm,
314
- (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
315
- );
316
- } else if ("host" in styleContainerNode) {
317
- if (supportsConstructableStylesheets) {
318
- const currentWindow = (_b = styleContainerNode.defaultView) != null ? _b : styleContainerNode.ownerDocument.defaultView;
319
- const stylesheet = new currentWindow.CSSStyleSheet();
320
- stylesheet.replaceSync(style);
321
- if (supportsMutableAdoptedStyleSheets) {
322
- styleContainerNode.adoptedStyleSheets.unshift(stylesheet);
323
- } else {
324
- styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
325
- }
326
- } else {
327
- const existingStyleContainer = styleContainerNode.querySelector("style");
328
- if (existingStyleContainer && true) {
329
- existingStyleContainer.textContent = style + existingStyleContainer.textContent;
330
- } else {
331
- styleContainerNode.prepend(styleElm);
332
- }
333
- }
334
- } else {
335
- styleContainerNode.append(styleElm);
336
- }
337
- }
338
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
339
- styleContainerNode.insertBefore(styleElm, null);
340
- }
341
- if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
342
- styleElm.textContent += SLOT_FB_CSS;
343
- }
344
- if (appliedStyles) {
345
- appliedStyles.add(scopeId2);
346
- }
347
- }
348
- } else {
349
- let appliedStyles = rootAppliedStyles.get(styleContainerNode);
350
- if (!appliedStyles) {
351
- rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
352
- }
353
- if (!appliedStyles.has(scopeId2)) {
354
- const currentWindow = (_c = styleContainerNode.defaultView) != null ? _c : styleContainerNode.ownerDocument.defaultView;
355
- let stylesheet;
356
- if (style.constructor === currentWindow.CSSStyleSheet) {
357
- stylesheet = style;
358
- } else {
359
- stylesheet = new currentWindow.CSSStyleSheet();
360
- for (let i2 = 0; i2 < style.cssRules.length; i2++) {
361
- stylesheet.insertRule(style.cssRules[i2].cssText, i2);
362
- }
363
- }
364
- if (supportsMutableAdoptedStyleSheets) {
365
- styleContainerNode.adoptedStyleSheets.push(stylesheet);
366
- } else {
367
- styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, stylesheet];
368
- }
369
- appliedStyles.add(scopeId2);
370
- }
371
- }
372
- }
373
- return scopeId2;
374
- };
375
- var attachStyles = (hostRef) => {
376
- const cmpMeta = hostRef.$cmpMeta$;
377
- const elm = hostRef.$hostElement$;
378
- const flags = cmpMeta.$flags$;
379
- const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
380
- const scopeId2 = addStyle(
381
- elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
382
- cmpMeta);
383
- if (flags & 10 /* needsScopedEncapsulation */) {
384
- elm["s-sc"] = scopeId2;
385
- elm.classList.add(scopeId2 + "-h");
386
- }
387
- endAttachStyles();
388
- };
389
- var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
390
- var isComplexType = (o) => {
391
- o = typeof o;
392
- return o === "object" || o === "function";
393
- };
394
-
395
- // src/runtime/vdom/h.ts
396
- var h = (nodeName, vnodeData, ...children) => {
397
- if (typeof nodeName === "string") {
398
- nodeName = transformTag(nodeName);
399
- }
400
- let child = null;
401
- let key = null;
402
- let simple = false;
403
- let lastSimple = false;
404
- const vNodeChildren = [];
405
- const walk = (c) => {
406
- for (let i2 = 0; i2 < c.length; i2++) {
407
- child = c[i2];
408
- if (Array.isArray(child)) {
409
- walk(child);
410
- } else if (child != null && typeof child !== "boolean") {
411
- if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
412
- child = String(child);
413
- }
414
- if (simple && lastSimple) {
415
- vNodeChildren[vNodeChildren.length - 1].$text$ += child;
416
- } else {
417
- vNodeChildren.push(simple ? newVNode(null, child) : child);
418
- }
419
- lastSimple = simple;
420
- }
421
- }
422
- };
423
- walk(children);
424
- if (vnodeData) {
425
- if (vnodeData.key) {
426
- key = vnodeData.key;
427
- }
428
- {
429
- const classData = vnodeData.className || vnodeData.class;
430
- if (classData) {
431
- vnodeData.class = typeof classData !== "object" ? classData : Object.keys(classData).filter((k) => classData[k]).join(" ");
432
- }
433
- }
434
- }
435
- const vnode = newVNode(nodeName, null);
436
- vnode.$attrs$ = vnodeData;
437
- if (vNodeChildren.length > 0) {
438
- vnode.$children$ = vNodeChildren;
439
- }
440
- {
441
- vnode.$key$ = key;
442
- }
443
- return vnode;
444
- };
445
- var newVNode = (tag, text) => {
446
- const vnode = {
447
- $flags$: 0,
448
- $tag$: tag,
449
- // Normalize undefined to null to prevent rendering "undefined" as text
450
- $text$: text != null ? text : null,
451
- $elm$: null,
452
- $children$: null
453
- };
454
- {
455
- vnode.$attrs$ = null;
456
- }
457
- {
458
- vnode.$key$ = null;
459
- }
460
- return vnode;
461
- };
462
- var Host = {};
463
- var isHost = (node) => node && node.$tag$ === Host;
464
-
465
- // src/runtime/normalize-watchers.ts
466
- var normalizeWatchers = (raw) => {
467
- if (!raw) return void 0;
468
- const keys = Object.keys(raw);
469
- if (keys.length === 0) return void 0;
470
- let hasLegacy = false;
471
- for (const propName of keys) {
472
- if (hasLegacy) break;
473
- for (const h2 of raw[propName]) {
474
- if (typeof h2 === "string") {
475
- hasLegacy = true;
476
- break;
477
- }
478
- }
479
- }
480
- if (!hasLegacy) return raw;
481
- const out = {};
482
- for (const propName of keys) {
483
- out[propName] = raw[propName].map(
484
- (h2) => typeof h2 === "string" ? { [h2]: 0 } : h2
485
- );
486
- }
487
- return out;
488
- };
489
-
490
- // src/runtime/parse-property-value.ts
491
- var parsePropertyValue = (propValue, propType, isFormAssociated) => {
492
- if (propValue != null && !isComplexType(propValue)) {
493
- if (propType & 4 /* Boolean */) {
494
- if (isFormAssociated && typeof propValue === "string") {
495
- return propValue === "" || !!propValue;
496
- } else {
497
- return propValue === "false" ? false : propValue === "" || !!propValue;
498
- }
499
- }
500
- if (propType & 2 /* Number */) {
501
- return typeof propValue === "string" ? parseFloat(propValue) : typeof propValue === "number" ? propValue : NaN;
502
- }
503
- if (propType & 1 /* String */) {
504
- return String(propValue);
505
- }
506
- return propValue;
507
- }
508
- return propValue;
509
- };
510
- var getElement = (ref) => {
511
- var _a;
512
- return (_a = getHostRef(ref)) == null ? void 0 : _a.$hostElement$ ;
513
- };
514
-
515
- // src/runtime/event-emitter.ts
516
- var createEvent = (ref, name, flags) => {
517
- const elm = getElement(ref);
518
- return {
519
- emit: (detail) => {
520
- return emitEvent(elm, name, {
521
- bubbles: true,
522
- composed: true,
523
- cancelable: true,
524
- detail
525
- });
526
- }
527
- };
528
- };
529
- var emitEvent = (elm, name, opts) => {
530
- const ev = plt.ce(name, opts);
531
- elm.dispatchEvent(ev);
532
- return ev;
533
- };
534
- var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
535
- if (oldValue === newValue) {
536
- return;
537
- }
538
- let isProp = isMemberInElement(elm, memberName);
539
- let ln = memberName.toLowerCase();
540
- if (memberName === "class") {
541
- const classList = elm.classList;
542
- const oldClasses = parseClassList(oldValue);
543
- let newClasses = parseClassList(newValue);
544
- {
545
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
546
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
547
- }
548
- } else if (memberName === "style") {
549
- {
550
- for (const prop in oldValue) {
551
- if (!newValue || newValue[prop] == null) {
552
- if (prop.includes("-")) {
553
- elm.style.removeProperty(prop);
554
- } else {
555
- elm.style[prop] = "";
556
- }
557
- }
558
- }
559
- }
560
- for (const prop in newValue) {
561
- if (!oldValue || newValue[prop] !== oldValue[prop]) {
562
- if (prop.includes("-")) {
563
- elm.style.setProperty(prop, newValue[prop]);
564
- } else {
565
- elm.style[prop] = newValue[prop];
566
- }
567
- }
568
- }
569
- } else if (memberName === "key") ; else if (memberName === "ref") {
570
- if (newValue) {
571
- queueRefAttachment(newValue, elm);
572
- }
573
- } else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
574
- if (memberName[2] === "-") {
575
- memberName = memberName.slice(3);
576
- } else if (isMemberInElement(win, ln)) {
577
- memberName = ln.slice(2);
578
- } else {
579
- memberName = ln[2] + memberName.slice(3);
580
- }
581
- if (oldValue || newValue) {
582
- const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
583
- memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
584
- if (oldValue) {
585
- plt.rel(elm, memberName, oldValue, capture);
586
- }
587
- if (newValue) {
588
- plt.ael(elm, memberName, newValue, capture);
589
- }
590
- }
591
- } else if (memberName[0] === "a" && memberName.startsWith("attr:")) {
592
- const propName = memberName.slice(5);
593
- let attrName;
594
- {
595
- const hostRef = getHostRef(elm);
596
- if (hostRef && hostRef.$cmpMeta$ && hostRef.$cmpMeta$.$members$) {
597
- const memberMeta = hostRef.$cmpMeta$.$members$[propName];
598
- if (memberMeta && memberMeta[1]) {
599
- attrName = memberMeta[1];
600
- }
601
- }
602
- }
603
- if (!attrName) {
604
- attrName = propName.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
605
- }
606
- if (newValue == null || newValue === false) {
607
- if (newValue !== false || elm.getAttribute(attrName) === "") {
608
- elm.removeAttribute(attrName);
609
- }
610
- } else {
611
- elm.setAttribute(attrName, newValue === true ? "" : newValue);
612
- }
613
- return;
614
- } else if (memberName[0] === "p" && memberName.startsWith("prop:")) {
615
- const propName = memberName.slice(5);
616
- try {
617
- elm[propName] = newValue;
618
- } catch (e) {
619
- }
620
- return;
621
- } else {
622
- const isComplex = isComplexType(newValue);
623
- if ((isProp || isComplex && newValue !== null) && !isSvg) {
624
- try {
625
- if (!elm.tagName.includes("-")) {
626
- const n = newValue == null ? "" : newValue;
627
- if (memberName === "list") {
628
- isProp = false;
629
- } else if (oldValue == null || elm[memberName] !== n) {
630
- if (typeof elm.__lookupSetter__(memberName) === "function") {
631
- elm[memberName] = n;
632
- } else {
633
- elm.setAttribute(memberName, n);
634
- }
635
- }
636
- } else if (elm[memberName] !== newValue) {
637
- elm[memberName] = newValue;
638
- }
639
- } catch (e) {
640
- }
641
- }
642
- if (newValue == null || newValue === false) {
643
- if (newValue !== false || elm.getAttribute(memberName) === "") {
644
- {
645
- elm.removeAttribute(memberName);
646
- }
647
- }
648
- } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {
649
- newValue = newValue === true ? "" : newValue;
650
- {
651
- elm.setAttribute(memberName, newValue);
652
- }
653
- }
654
- }
655
- };
656
- var parseClassListRegex = /\s/;
657
- var parseClassList = (value) => {
658
- if (typeof value === "object" && value && "baseVal" in value) {
659
- value = value.baseVal;
660
- }
661
- if (!value || typeof value !== "string") {
662
- return [];
663
- }
664
- return value.split(parseClassListRegex);
665
- };
666
- var CAPTURE_EVENT_SUFFIX = "Capture";
667
- var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
668
-
669
- // src/runtime/vdom/update-element.ts
670
- var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
671
- const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
672
- const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
673
- const newVnodeAttrs = newVnode.$attrs$ || {};
674
- {
675
- for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
676
- if (!(memberName in newVnodeAttrs)) {
677
- setAccessor(
678
- elm,
679
- memberName,
680
- oldVnodeAttrs[memberName],
681
- void 0,
682
- isSvgMode2,
683
- newVnode.$flags$);
684
- }
685
- }
686
- }
687
- for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
688
- setAccessor(
689
- elm,
690
- memberName,
691
- oldVnodeAttrs[memberName],
692
- newVnodeAttrs[memberName],
693
- isSvgMode2,
694
- newVnode.$flags$);
695
- }
696
- };
697
- function sortedAttrNames(attrNames) {
698
- return attrNames.includes("ref") ? (
699
- // we need to sort these to ensure that `'ref'` is the last attr
700
- [...attrNames.filter((attr) => attr !== "ref"), "ref"]
701
- ) : (
702
- // no need to sort, return the original array
703
- attrNames
704
- );
705
- }
706
- var hostTagName;
707
- var useNativeShadowDom = false;
708
- var isSvgMode = false;
709
- var refCallbacksToRemove = [];
710
- var refCallbacksToAttach = [];
711
- var createElm = (oldParentVNode, newParentVNode, childIndex) => {
712
- const newVNode2 = newParentVNode.$children$[childIndex];
713
- let i2 = 0;
714
- let elm;
715
- let childNode;
716
- if (newVNode2.$text$ != null) {
717
- elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
718
- } else {
719
- if (!isSvgMode) {
720
- isSvgMode = newVNode2.$tag$ === "svg";
721
- }
722
- if (!win.document) {
723
- throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");
724
- }
725
- elm = newVNode2.$elm$ = win.document.createElementNS(
726
- isSvgMode ? SVG_NS : HTML_NS,
727
- newVNode2.$tag$
728
- ) ;
729
- if (isSvgMode && newVNode2.$tag$ === "foreignObject") {
730
- isSvgMode = false;
731
- }
732
- {
733
- updateElement(null, newVNode2, isSvgMode);
734
- }
735
- if (newVNode2.$children$) {
736
- const appendTarget = newVNode2.$tag$ === "template" ? elm.content : elm;
737
- for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
738
- childNode = createElm(oldParentVNode, newVNode2, i2);
739
- if (childNode) {
740
- appendTarget.appendChild(childNode);
741
- }
742
- }
743
- }
744
- {
745
- if (newVNode2.$tag$ === "svg") {
746
- isSvgMode = false;
747
- } else if (elm.tagName === "foreignObject") {
748
- isSvgMode = true;
749
- }
750
- }
751
- }
752
- elm["s-hn"] = hostTagName;
753
- return elm;
754
- };
755
- var relocateToHostRoot = (parentElm) => {
756
- plt.$flags$ |= 1 /* isTmpDisconnected */;
757
- const host = parentElm.closest(hostTagName.toLowerCase());
758
- if (host != null) {
759
- const contentRefNode = Array.from(host.__childNodes || host.childNodes).find(
760
- (ref) => ref["s-cr"]
761
- );
762
- const childNodeArray = Array.from(
763
- parentElm.__childNodes || parentElm.childNodes
764
- );
765
- for (const childNode of contentRefNode ? childNodeArray.reverse() : childNodeArray) {
766
- if (childNode["s-sh"] != null) {
767
- insertBefore(host, childNode, contentRefNode != null ? contentRefNode : null);
768
- childNode["s-sh"] = void 0;
769
- }
770
- }
771
- }
772
- plt.$flags$ &= -2 /* isTmpDisconnected */;
773
- };
774
- var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
775
- let containerElm = parentElm;
776
- let childNode;
777
- if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
778
- containerElm = containerElm.shadowRoot;
779
- }
780
- if (parentVNode.$tag$ === "template") {
781
- containerElm = containerElm.content;
782
- }
783
- for (; startIdx <= endIdx; ++startIdx) {
784
- if (vnodes[startIdx]) {
785
- childNode = createElm(null, parentVNode, startIdx);
786
- if (childNode) {
787
- vnodes[startIdx].$elm$ = childNode;
788
- insertBefore(containerElm, childNode, before);
789
- }
790
- }
791
- }
792
- };
793
- var removeVnodes = (vnodes, startIdx, endIdx) => {
794
- for (let index = startIdx; index <= endIdx; ++index) {
795
- const vnode = vnodes[index];
796
- if (vnode) {
797
- const elm = vnode.$elm$;
798
- nullifyVNodeRefs(vnode);
799
- if (elm) {
800
- elm.remove();
801
- }
802
- }
803
- }
804
- };
805
- var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = false) => {
806
- let oldStartIdx = 0;
807
- let newStartIdx = 0;
808
- let idxInOld = 0;
809
- let i2 = 0;
810
- let oldEndIdx = oldCh.length - 1;
811
- let oldStartVnode = oldCh[0];
812
- let oldEndVnode = oldCh[oldEndIdx];
813
- let newEndIdx = newCh.length - 1;
814
- let newStartVnode = newCh[0];
815
- let newEndVnode = newCh[newEndIdx];
816
- let node;
817
- let elmToMove;
818
- const containerElm = newVNode2.$tag$ === "template" ? parentElm.content : parentElm;
819
- while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
820
- if (oldStartVnode == null) {
821
- oldStartVnode = oldCh[++oldStartIdx];
822
- } else if (oldEndVnode == null) {
823
- oldEndVnode = oldCh[--oldEndIdx];
824
- } else if (newStartVnode == null) {
825
- newStartVnode = newCh[++newStartIdx];
826
- } else if (newEndVnode == null) {
827
- newEndVnode = newCh[--newEndIdx];
828
- } else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {
829
- patch(oldStartVnode, newStartVnode, isInitialRender);
830
- oldStartVnode = oldCh[++oldStartIdx];
831
- newStartVnode = newCh[++newStartIdx];
832
- } else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {
833
- patch(oldEndVnode, newEndVnode, isInitialRender);
834
- oldEndVnode = oldCh[--oldEndIdx];
835
- newEndVnode = newCh[--newEndIdx];
836
- } else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
837
- patch(oldStartVnode, newEndVnode, isInitialRender);
838
- insertBefore(containerElm, oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
839
- oldStartVnode = oldCh[++oldStartIdx];
840
- newEndVnode = newCh[--newEndIdx];
841
- } else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
842
- patch(oldEndVnode, newStartVnode, isInitialRender);
843
- insertBefore(containerElm, oldEndVnode.$elm$, oldStartVnode.$elm$);
844
- oldEndVnode = oldCh[--oldEndIdx];
845
- newStartVnode = newCh[++newStartIdx];
846
- } else {
847
- idxInOld = -1;
848
- {
849
- for (i2 = oldStartIdx; i2 <= oldEndIdx; ++i2) {
850
- if (oldCh[i2] && oldCh[i2].$key$ !== null && oldCh[i2].$key$ === newStartVnode.$key$) {
851
- idxInOld = i2;
852
- break;
853
- }
854
- }
855
- }
856
- if (idxInOld >= 0) {
857
- elmToMove = oldCh[idxInOld];
858
- if (elmToMove.$tag$ !== newStartVnode.$tag$) {
859
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
860
- } else {
861
- patch(elmToMove, newStartVnode, isInitialRender);
862
- oldCh[idxInOld] = void 0;
863
- node = elmToMove.$elm$;
864
- }
865
- newStartVnode = newCh[++newStartIdx];
866
- } else {
867
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
868
- newStartVnode = newCh[++newStartIdx];
869
- }
870
- if (node) {
871
- {
872
- insertBefore(oldStartVnode.$elm$.parentNode, node, oldStartVnode.$elm$);
873
- }
874
- }
875
- }
876
- }
877
- if (oldStartIdx > oldEndIdx) {
878
- addVnodes(
879
- parentElm,
880
- newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$,
881
- newVNode2,
882
- newCh,
883
- newStartIdx,
884
- newEndIdx
885
- );
886
- } else if (newStartIdx > newEndIdx) {
887
- removeVnodes(oldCh, oldStartIdx, oldEndIdx);
888
- }
889
- };
890
- var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
891
- if (leftVNode.$tag$ === rightVNode.$tag$) {
892
- if (!isInitialRender) {
893
- return leftVNode.$key$ === rightVNode.$key$;
894
- }
895
- if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
896
- leftVNode.$key$ = rightVNode.$key$;
897
- }
898
- return true;
899
- }
900
- return false;
901
- };
902
- var patch = (oldVNode, newVNode2, isInitialRender = false) => {
903
- const elm = newVNode2.$elm$ = oldVNode.$elm$;
904
- const oldChildren = oldVNode.$children$;
905
- const newChildren = newVNode2.$children$;
906
- const tag = newVNode2.$tag$;
907
- const text = newVNode2.$text$;
908
- if (text == null) {
909
- {
910
- isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
911
- }
912
- {
913
- if (tag === "slot" && !useNativeShadowDom) {
914
- if (oldVNode.$name$ !== newVNode2.$name$) {
915
- newVNode2.$elm$["s-sn"] = newVNode2.$name$ || "";
916
- relocateToHostRoot(newVNode2.$elm$.parentElement);
917
- }
918
- }
919
- updateElement(oldVNode, newVNode2, isSvgMode);
920
- }
921
- if (oldChildren !== null && newChildren !== null) {
922
- updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
923
- } else if (newChildren !== null) {
924
- if (oldVNode.$text$ !== null) {
925
- elm.textContent = "";
926
- }
927
- addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
928
- } else if (
929
- // don't do this on initial render as it can cause non-hydrated content to be removed
930
- !isInitialRender && BUILD.updatable && oldChildren !== null
931
- ) {
932
- removeVnodes(oldChildren, 0, oldChildren.length - 1);
933
- } else ;
934
- if (isSvgMode && tag === "svg") {
935
- isSvgMode = false;
936
- }
937
- } else if (oldVNode.$text$ !== text) {
938
- elm.data = text;
939
- }
940
- };
941
- var nullifyVNodeRefs = (vNode) => {
942
- {
943
- if (vNode.$attrs$ && vNode.$attrs$.ref) {
944
- refCallbacksToRemove.push(() => vNode.$attrs$.ref(null));
945
- }
946
- vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
947
- }
948
- };
949
- var queueRefAttachment = (refCallback, elm) => {
950
- {
951
- refCallbacksToAttach.push(() => refCallback(elm));
952
- }
953
- };
954
- var flushQueuedRefCallbacks = () => {
955
- {
956
- refCallbacksToRemove.forEach((cb) => cb());
957
- refCallbacksToRemove.length = 0;
958
- refCallbacksToAttach.forEach((cb) => cb());
959
- refCallbacksToAttach.length = 0;
960
- }
961
- };
962
- var insertBefore = (parent, newNode, reference, isInitialLoad) => {
963
- if (parent.__insertBefore) {
964
- return parent.__insertBefore(newNode, reference);
965
- } else {
966
- return parent == null ? void 0 : parent.insertBefore(newNode, reference);
967
- }
968
- };
969
- var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
970
- const hostElm = hostRef.$hostElement$;
971
- const cmpMeta = hostRef.$cmpMeta$;
972
- const oldVNode = hostRef.$vnode$ || newVNode(null, null);
973
- const isHostElement = isHost(renderFnResults);
974
- const rootVnode = isHostElement ? renderFnResults : h(null, null, renderFnResults);
975
- hostTagName = hostElm.tagName;
976
- if (cmpMeta.$attrsToReflect$) {
977
- rootVnode.$attrs$ = rootVnode.$attrs$ || {};
978
- cmpMeta.$attrsToReflect$.forEach(([propName, attribute]) => {
979
- {
980
- rootVnode.$attrs$[attribute] = hostElm[propName];
981
- }
982
- });
983
- }
984
- if (isInitialLoad && rootVnode.$attrs$) {
985
- for (const key of Object.keys(rootVnode.$attrs$)) {
986
- if (hostElm.hasAttribute(key) && !["key", "ref", "style", "class"].includes(key)) {
987
- rootVnode.$attrs$[key] = hostElm[key];
988
- }
989
- }
990
- }
991
- rootVnode.$tag$ = null;
992
- rootVnode.$flags$ |= 4 /* isHost */;
993
- hostRef.$vnode$ = rootVnode;
994
- rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
995
- useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
996
- patch(oldVNode, rootVnode, isInitialLoad);
997
- flushQueuedRefCallbacks();
998
- };
999
-
1000
- // src/runtime/update-component.ts
1001
- var attachToAncestor = (hostRef, ancestorComponent) => {
1002
- if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
1003
- const index = ancestorComponent["s-p"].push(
1004
- new Promise(
1005
- (r) => hostRef.$onRenderResolve$ = () => {
1006
- ancestorComponent["s-p"].splice(index - 1, 1);
1007
- r();
1008
- }
1009
- )
1010
- );
1011
- }
1012
- };
1013
- var scheduleUpdate = (hostRef, isInitialLoad) => {
1014
- {
1015
- hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
1016
- }
1017
- if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {
1018
- hostRef.$flags$ |= 512 /* needsRerender */;
1019
- return;
1020
- }
1021
- attachToAncestor(hostRef, hostRef.$ancestorComponent$);
1022
- const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
1023
- if (isInitialLoad) {
1024
- queueMicrotask(() => {
1025
- dispatch();
1026
- });
1027
- return;
1028
- }
1029
- return writeTask(dispatch) ;
1030
- };
1031
- var dispatchHooks = (hostRef, isInitialLoad) => {
1032
- const elm = hostRef.$hostElement$;
1033
- const endSchedule = createTime("scheduleUpdate", hostRef.$cmpMeta$.$tagName$);
1034
- const instance = hostRef.$lazyInstance$ ;
1035
- if (!instance) {
1036
- throw new Error(
1037
- `Can't render component <${elm.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`
1038
- );
1039
- }
1040
- let maybePromise;
1041
- if (isInitialLoad) {
1042
- {
1043
- {
1044
- hostRef.$flags$ |= 256 /* isListenReady */;
1045
- if (hostRef.$queuedListeners$) {
1046
- hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
1047
- hostRef.$queuedListeners$ = void 0;
1048
- }
1049
- }
1050
- if (hostRef.$fetchedCbList$.length) {
1051
- hostRef.$fetchedCbList$.forEach((cb) => cb(elm));
1052
- }
1053
- }
1054
- maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
1055
- } else {
1056
- maybePromise = safeCall(instance, "componentWillUpdate", void 0, elm);
1057
- }
1058
- maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
1059
- endSchedule();
1060
- return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
1061
- };
1062
- var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn).catch((err) => {
1063
- console.error(err);
1064
- fn();
1065
- }) : fn();
1066
- var isPromisey = (maybePromise) => maybePromise instanceof Promise || maybePromise && maybePromise.then && typeof maybePromise.then === "function";
1067
- var updateComponent = async (hostRef, instance, isInitialLoad) => {
1068
- var _a;
1069
- const elm = hostRef.$hostElement$;
1070
- const endUpdate = createTime("update", hostRef.$cmpMeta$.$tagName$);
1071
- const rc = elm["s-rc"];
1072
- if (isInitialLoad) {
1073
- attachStyles(hostRef);
1074
- }
1075
- const endRender = createTime("render", hostRef.$cmpMeta$.$tagName$);
1076
- {
1077
- callRender(hostRef, instance, elm, isInitialLoad);
1078
- }
1079
- if (rc) {
1080
- rc.map((cb) => cb());
1081
- elm["s-rc"] = void 0;
1082
- }
1083
- endRender();
1084
- endUpdate();
1085
- {
1086
- const childrenPromises = (_a = elm["s-p"]) != null ? _a : [];
1087
- const postUpdate = () => postUpdateComponent(hostRef);
1088
- if (childrenPromises.length === 0) {
1089
- postUpdate();
1090
- } else {
1091
- Promise.all(childrenPromises).then(postUpdate).catch(postUpdate);
1092
- hostRef.$flags$ |= 4 /* isWaitingForChildren */;
1093
- childrenPromises.length = 0;
1094
- }
1095
- }
1096
- };
1097
- var callRender = (hostRef, instance, elm, isInitialLoad) => {
1098
- try {
1099
- instance = instance.render() ;
1100
- {
1101
- hostRef.$flags$ &= -17 /* isQueuedForUpdate */;
1102
- }
1103
- {
1104
- hostRef.$flags$ |= 2 /* hasRendered */;
1105
- }
1106
- {
1107
- {
1108
- {
1109
- renderVdom(hostRef, instance, isInitialLoad);
1110
- }
1111
- }
1112
- }
1113
- } catch (e) {
1114
- consoleError(e, hostRef.$hostElement$);
1115
- }
1116
- return null;
1117
- };
1118
- var postUpdateComponent = (hostRef) => {
1119
- const tagName = hostRef.$cmpMeta$.$tagName$;
1120
- const elm = hostRef.$hostElement$;
1121
- const endPostUpdate = createTime("postUpdate", tagName);
1122
- const instance = hostRef.$lazyInstance$ ;
1123
- const ancestorComponent = hostRef.$ancestorComponent$;
1124
- safeCall(instance, "componentDidRender", void 0, elm);
1125
- if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
1126
- hostRef.$flags$ |= 64 /* hasLoadedComponent */;
1127
- {
1128
- addHydratedFlag(elm);
1129
- }
1130
- safeCall(instance, "componentDidLoad", void 0, elm);
1131
- endPostUpdate();
1132
- {
1133
- hostRef.$onReadyResolve$(elm);
1134
- if (!ancestorComponent) {
1135
- appDidLoad();
1136
- }
1137
- }
1138
- } else {
1139
- safeCall(instance, "componentDidUpdate", void 0, elm);
1140
- endPostUpdate();
1141
- }
1142
- {
1143
- hostRef.$onInstanceResolve$(elm);
1144
- }
1145
- {
1146
- if (hostRef.$onRenderResolve$) {
1147
- hostRef.$onRenderResolve$();
1148
- hostRef.$onRenderResolve$ = void 0;
1149
- }
1150
- if (hostRef.$flags$ & 512 /* needsRerender */) {
1151
- nextTick(() => scheduleUpdate(hostRef, false));
1152
- }
1153
- hostRef.$flags$ &= -517;
1154
- }
1155
- };
1156
- var appDidLoad = (who) => {
1157
- nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
1158
- };
1159
- var safeCall = (instance, method, arg, elm) => {
1160
- if (instance && instance[method]) {
1161
- try {
1162
- return instance[method](arg);
1163
- } catch (e) {
1164
- consoleError(e, elm);
1165
- }
1166
- }
1167
- return void 0;
1168
- };
1169
- var addHydratedFlag = (elm) => {
1170
- var _a;
1171
- return elm.classList.add((_a = BUILD.hydratedSelectorName) != null ? _a : "hydrated") ;
1172
- };
1173
-
1174
- // src/runtime/set-value.ts
1175
- var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
1176
- var setValue = (ref, propName, newVal, cmpMeta) => {
1177
- const hostRef = getHostRef(ref);
1178
- if (!hostRef) {
1179
- return;
1180
- }
1181
- if (!hostRef) {
1182
- throw new Error(
1183
- `Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`
1184
- );
1185
- }
1186
- const elm = hostRef.$hostElement$ ;
1187
- const oldVal = hostRef.$instanceValues$.get(propName);
1188
- const flags = hostRef.$flags$;
1189
- const instance = hostRef.$lazyInstance$ ;
1190
- newVal = parsePropertyValue(
1191
- newVal,
1192
- cmpMeta.$members$[propName][0],
1193
- !!(cmpMeta.$flags$ & 64 /* formAssociated */)
1194
- );
1195
- const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
1196
- const didValueChange = newVal !== oldVal && !areBothNaN;
1197
- if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
1198
- hostRef.$instanceValues$.set(propName, newVal);
1199
- if (cmpMeta.$watchers$) {
1200
- const watchMethods = cmpMeta.$watchers$[propName];
1201
- if (watchMethods) {
1202
- watchMethods.map((watcher) => {
1203
- try {
1204
- const [[watchMethodName, watcherFlags]] = Object.entries(watcher);
1205
- if (flags & 128 /* isWatchReady */ || watcherFlags & 1 /* Immediate */) {
1206
- if (!instance) {
1207
- hostRef.$fetchedCbList$.push(() => {
1208
- hostRef.$lazyInstance$[watchMethodName](newVal, oldVal, propName);
1209
- });
1210
- } else {
1211
- instance[watchMethodName](newVal, oldVal, propName);
1212
- }
1213
- }
1214
- } catch (e) {
1215
- consoleError(e, elm);
1216
- }
1217
- });
1218
- }
1219
- }
1220
- if (flags & 2 /* hasRendered */) {
1221
- if (instance.componentShouldUpdate) {
1222
- const shouldUpdate = instance.componentShouldUpdate(newVal, oldVal, propName);
1223
- if (shouldUpdate === false && !(flags & 16 /* isQueuedForUpdate */)) {
1224
- return;
1225
- }
1226
- }
1227
- if (!(flags & 16 /* isQueuedForUpdate */)) {
1228
- scheduleUpdate(hostRef, false);
1229
- }
1230
- }
1231
- }
1232
- };
1233
-
1234
- // src/runtime/proxy-component.ts
1235
- var proxyComponent = (Cstr, cmpMeta, flags) => {
1236
- var _a, _b;
1237
- const prototype = Cstr.prototype;
1238
- if (cmpMeta.$flags$ & 64 /* formAssociated */ && flags & 1 /* isElementConstructor */) {
1239
- FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS.forEach((cbName) => {
1240
- Object.defineProperty(prototype, cbName, {
1241
- value(...args) {
1242
- var _a2;
1243
- const hostRef = getHostRef(this);
1244
- const instance = hostRef == null ? void 0 : hostRef.$lazyInstance$ ;
1245
- if (!instance) {
1246
- (_a2 = hostRef == null ? void 0 : hostRef.$onReadyPromise$) == null ? void 0 : _a2.then((asyncInstance) => {
1247
- const cb = asyncInstance[cbName];
1248
- typeof cb === "function" && cb.call(asyncInstance, ...args);
1249
- });
1250
- } else {
1251
- const cb = instance[cbName] ;
1252
- typeof cb === "function" && cb.call(instance, ...args);
1253
- }
1254
- }
1255
- });
1256
- });
1257
- }
1258
- if (cmpMeta.$members$ || BUILD.propChangeCallback) {
1259
- {
1260
- if (Cstr.watchers && !cmpMeta.$watchers$) {
1261
- cmpMeta.$watchers$ = normalizeWatchers(Cstr.watchers);
1262
- }
1263
- if (Cstr.deserializers && !cmpMeta.$deserializers$) {
1264
- cmpMeta.$deserializers$ = Cstr.deserializers;
1265
- }
1266
- if (Cstr.serializers && !cmpMeta.$serializers$) {
1267
- cmpMeta.$serializers$ = Cstr.serializers;
1268
- }
1269
- }
1270
- const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
1271
- members.map(([memberName, [memberFlags]]) => {
1272
- if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
1273
- const { get: origGetter, set: origSetter } = getPropertyDescriptor(prototype, memberName) || {};
1274
- if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
1275
- if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
1276
- if (flags & 1 /* isElementConstructor */ || !origGetter) {
1277
- Object.defineProperty(prototype, memberName, {
1278
- get() {
1279
- {
1280
- if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
1281
- return getValue(this, memberName);
1282
- }
1283
- const ref = getHostRef(this);
1284
- const instance = ref ? ref.$lazyInstance$ : prototype;
1285
- if (!instance) return;
1286
- return instance[memberName];
1287
- }
1288
- },
1289
- configurable: true,
1290
- enumerable: true
1291
- });
1292
- }
1293
- Object.defineProperty(prototype, memberName, {
1294
- set(newValue) {
1295
- const ref = getHostRef(this);
1296
- if (!ref) {
1297
- return;
1298
- }
1299
- if (origSetter) {
1300
- const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
1301
- if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
1302
- newValue = ref.$instanceValues$.get(memberName);
1303
- }
1304
- origSetter.apply(this, [
1305
- parsePropertyValue(
1306
- newValue,
1307
- memberFlags,
1308
- !!(cmpMeta.$flags$ & 64 /* formAssociated */)
1309
- )
1310
- ]);
1311
- newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
1312
- setValue(this, memberName, newValue, cmpMeta);
1313
- return;
1314
- }
1315
- {
1316
- if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
1317
- setValue(this, memberName, newValue, cmpMeta);
1318
- if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
1319
- ref.$fetchedCbList$.push(() => {
1320
- if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
1321
- ref.$lazyInstance$[memberName] = newValue;
1322
- }
1323
- });
1324
- }
1325
- return;
1326
- }
1327
- const setterSetVal = () => {
1328
- const currentValue = ref.$lazyInstance$[memberName];
1329
- if (!ref.$instanceValues$.get(memberName) && currentValue) {
1330
- ref.$instanceValues$.set(memberName, currentValue);
1331
- }
1332
- ref.$lazyInstance$[memberName] = parsePropertyValue(
1333
- newValue,
1334
- memberFlags,
1335
- !!(cmpMeta.$flags$ & 64 /* formAssociated */)
1336
- );
1337
- setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
1338
- };
1339
- if (ref.$lazyInstance$) {
1340
- setterSetVal();
1341
- } else {
1342
- ref.$fetchedCbList$.push(() => {
1343
- setterSetVal();
1344
- });
1345
- }
1346
- }
1347
- }
1348
- });
1349
- } else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
1350
- Object.defineProperty(prototype, memberName, {
1351
- value(...args) {
1352
- var _a2;
1353
- const ref = getHostRef(this);
1354
- return (_a2 = ref == null ? void 0 : ref.$onInstancePromise$) == null ? void 0 : _a2.then(() => {
1355
- var _a3;
1356
- return (_a3 = ref.$lazyInstance$) == null ? void 0 : _a3[memberName](...args);
1357
- });
1358
- }
1359
- });
1360
- }
1361
- });
1362
- if ((flags & 1 /* isElementConstructor */)) {
1363
- const attrNameToPropName = /* @__PURE__ */ new Map();
1364
- prototype.attributeChangedCallback = function(attrName, oldValue, newValue) {
1365
- plt.jmp(() => {
1366
- var _a2;
1367
- const propName = attrNameToPropName.get(attrName);
1368
- const hostRef = getHostRef(this);
1369
- if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
1370
- newValue = this[propName];
1371
- delete this[propName];
1372
- }
1373
- if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
1374
- this[propName] == newValue) {
1375
- return;
1376
- } else if (propName == null) {
1377
- const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
1378
- if (hostRef && flags2 && !(flags2 & 8 /* isConstructingInstance */) && newValue !== oldValue) {
1379
- const instance = hostRef.$lazyInstance$ ;
1380
- const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
1381
- entry == null ? void 0 : entry.forEach((watcher) => {
1382
- const [[watchMethodName, watcherFlags]] = Object.entries(watcher);
1383
- if (instance[watchMethodName] != null && (flags2 & 128 /* isWatchReady */ || watcherFlags & 1 /* Immediate */)) {
1384
- instance[watchMethodName].call(instance, newValue, oldValue, attrName);
1385
- }
1386
- });
1387
- }
1388
- return;
1389
- }
1390
- const propFlags = members.find(([m]) => m === propName);
1391
- const isBooleanTarget = propFlags && propFlags[1][0] & 4 /* Boolean */;
1392
- const isSpuriousBooleanRemoval = isBooleanTarget && newValue === null && this[propName] === void 0;
1393
- if (isBooleanTarget) {
1394
- newValue = newValue === null || newValue === "false" ? false : true;
1395
- }
1396
- const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
1397
- if (!isSpuriousBooleanRemoval && newValue != this[propName] && (!propDesc.get || !!propDesc.set)) {
1398
- this[propName] = newValue;
1399
- }
1400
- });
1401
- };
1402
- Cstr.observedAttributes = Array.from(
1403
- /* @__PURE__ */ new Set([
1404
- ...Object.keys((_b = cmpMeta.$watchers$) != null ? _b : {}),
1405
- ...members.filter(([_, m]) => m[0] & 31 /* HasAttribute */).map(([propName, m]) => {
1406
- var _a2;
1407
- const attrName = m[1] || propName;
1408
- attrNameToPropName.set(attrName, propName);
1409
- if (m[0] & 512 /* ReflectAttr */) {
1410
- (_a2 = cmpMeta.$attrsToReflect$) == null ? void 0 : _a2.push([propName, attrName]);
1411
- }
1412
- return attrName;
1413
- })
1414
- ])
1415
- );
1416
- }
1417
- }
1418
- return Cstr;
1419
- };
1420
-
1421
- // src/runtime/initialize-component.ts
1422
- var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1423
- let Cstr;
1424
- try {
1425
- if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
1426
- hostRef.$flags$ |= 32 /* hasInitializedComponent */;
1427
- const bundleId = cmpMeta.$lazyBundleId$;
1428
- if (bundleId) {
1429
- const CstrImport = loadModule(cmpMeta, hostRef);
1430
- if (CstrImport && "then" in CstrImport) {
1431
- const endLoad = uniqueTime();
1432
- Cstr = await CstrImport;
1433
- endLoad();
1434
- } else {
1435
- Cstr = CstrImport;
1436
- }
1437
- if (!Cstr) {
1438
- throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
1439
- }
1440
- if (!Cstr.isProxied) {
1441
- {
1442
- cmpMeta.$watchers$ = normalizeWatchers(Cstr.watchers);
1443
- cmpMeta.$serializers$ = Cstr.serializers;
1444
- cmpMeta.$deserializers$ = Cstr.deserializers;
1445
- }
1446
- proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
1447
- Cstr.isProxied = true;
1448
- }
1449
- const endNewInstance = createTime("createInstance", cmpMeta.$tagName$);
1450
- {
1451
- hostRef.$flags$ |= 8 /* isConstructingInstance */;
1452
- }
1453
- try {
1454
- new Cstr(hostRef);
1455
- } catch (e) {
1456
- consoleError(e, elm);
1457
- }
1458
- {
1459
- hostRef.$flags$ &= -9 /* isConstructingInstance */;
1460
- }
1461
- {
1462
- hostRef.$flags$ |= 128 /* isWatchReady */;
1463
- }
1464
- endNewInstance();
1465
- {
1466
- fireConnectedCallback(hostRef.$lazyInstance$, elm);
1467
- }
1468
- } else {
1469
- Cstr = elm.constructor;
1470
- const cmpTag = elm.localName;
1471
- customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
1472
- }
1473
- if (Cstr && Cstr.style) {
1474
- let style;
1475
- if (typeof Cstr.style === "string") {
1476
- style = Cstr.style;
1477
- }
1478
- const scopeId2 = getScopeId(cmpMeta);
1479
- if (!styles.has(scopeId2) || BUILD.hotModuleReplacement) {
1480
- const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
1481
- registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
1482
- endRegisterStyles();
1483
- }
1484
- }
1485
- }
1486
- const ancestorComponent = hostRef.$ancestorComponent$;
1487
- const schedule = () => scheduleUpdate(hostRef, true);
1488
- if (ancestorComponent && ancestorComponent["s-rc"]) {
1489
- ancestorComponent["s-rc"].push(schedule);
1490
- } else {
1491
- schedule();
1492
- }
1493
- } catch (e) {
1494
- consoleError(e, elm);
1495
- if (hostRef.$onRenderResolve$) {
1496
- hostRef.$onRenderResolve$();
1497
- hostRef.$onRenderResolve$ = void 0;
1498
- }
1499
- if (hostRef.$onReadyResolve$) {
1500
- hostRef.$onReadyResolve$(elm);
1501
- }
1502
- }
1503
- };
1504
- var fireConnectedCallback = (instance, elm) => {
1505
- {
1506
- safeCall(instance, "connectedCallback", void 0, elm);
1507
- }
1508
- };
1509
-
1510
- // src/runtime/connected-callback.ts
1511
- var connectedCallback = (elm) => {
1512
- if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1513
- const hostRef = getHostRef(elm);
1514
- if (!hostRef) {
1515
- return;
1516
- }
1517
- const cmpMeta = hostRef.$cmpMeta$;
1518
- const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
1519
- if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
1520
- hostRef.$flags$ |= 1 /* hasConnected */;
1521
- {
1522
- let ancestorComponent = elm;
1523
- while (ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host) {
1524
- if (ancestorComponent["s-p"]) {
1525
- attachToAncestor(hostRef, hostRef.$ancestorComponent$ = ancestorComponent);
1526
- break;
1527
- }
1528
- }
1529
- }
1530
- if (cmpMeta.$members$) {
1531
- Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
1532
- if (memberFlags & 31 /* Prop */ && Object.prototype.hasOwnProperty.call(elm, memberName)) {
1533
- const value = elm[memberName];
1534
- delete elm[memberName];
1535
- elm[memberName] = value;
1536
- }
1537
- });
1538
- }
1539
- {
1540
- initializeComponent(elm, hostRef, cmpMeta);
1541
- }
1542
- } else {
1543
- addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1544
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1545
- fireConnectedCallback(hostRef.$lazyInstance$, elm);
1546
- } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1547
- hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
1548
- }
1549
- }
1550
- endConnected();
1551
- }
1552
- };
1553
- var disconnectInstance = (instance, elm) => {
1554
- {
1555
- safeCall(instance, "disconnectedCallback", void 0, elm || instance);
1556
- }
1557
- };
1558
- var disconnectedCallback = async (elm) => {
1559
- if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1560
- const hostRef = getHostRef(elm);
1561
- {
1562
- if (hostRef == null ? void 0 : hostRef.$rmListeners$) {
1563
- hostRef.$rmListeners$.map((rmListener) => rmListener());
1564
- hostRef.$rmListeners$ = void 0;
1565
- }
1566
- }
1567
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1568
- disconnectInstance(hostRef.$lazyInstance$, elm);
1569
- } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1570
- hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
1571
- }
1572
- }
1573
- if (rootAppliedStyles.has(elm)) {
1574
- rootAppliedStyles.delete(elm);
1575
- }
1576
- if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
1577
- rootAppliedStyles.delete(elm.shadowRoot);
1578
- }
1579
- };
1580
-
1581
- // src/runtime/bootstrap-lazy.ts
1582
- var bootstrapLazy = (lazyBundles, options = {}) => {
1583
- var _a;
1584
- if (!win.document) {
1585
- console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");
1586
- return;
1587
- }
1588
- const endBootstrap = createTime();
1589
- const cmpTags = [];
1590
- const exclude = options.exclude || [];
1591
- const customElements2 = win.customElements;
1592
- const head = win.document.head;
1593
- const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
1594
- const dataStyles = /* @__PURE__ */ win.document.createElement("style");
1595
- const deferredConnectedCallbacks = [];
1596
- let appLoadFallback;
1597
- let isBootstrapping = true;
1598
- Object.assign(plt, options);
1599
- plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", win.document.baseURI).href;
1600
- lazyBundles.map((lazyBundle) => {
1601
- lazyBundle[1].map((compactMeta) => {
1602
- var _a2, _b;
1603
- const cmpMeta = {
1604
- $flags$: compactMeta[0],
1605
- $tagName$: compactMeta[1],
1606
- $members$: compactMeta[2],
1607
- $listeners$: compactMeta[3]
1608
- };
1609
- {
1610
- cmpMeta.$members$ = compactMeta[2];
1611
- }
1612
- {
1613
- cmpMeta.$listeners$ = compactMeta[3];
1614
- }
1615
- {
1616
- cmpMeta.$attrsToReflect$ = [];
1617
- }
1618
- {
1619
- cmpMeta.$watchers$ = normalizeWatchers(compactMeta[4]);
1620
- cmpMeta.$serializers$ = (_a2 = compactMeta[5]) != null ? _a2 : {};
1621
- cmpMeta.$deserializers$ = (_b = compactMeta[6]) != null ? _b : {};
1622
- }
1623
- const tagName = transformTag(cmpMeta.$tagName$);
1624
- const HostElement = class extends HTMLElement {
1625
- ["s-p"];
1626
- ["s-rc"];
1627
- hasRegisteredEventListeners = false;
1628
- // StencilLazyHost
1629
- constructor(self) {
1630
- super(self);
1631
- self = this;
1632
- registerHost(self, cmpMeta);
1633
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
1634
- {
1635
- if (!self.shadowRoot) {
1636
- createShadowRoot.call(self, cmpMeta);
1637
- } else {
1638
- if (self.shadowRoot.mode !== "open") {
1639
- throw new Error(
1640
- `Unable to re-use existing shadow root for ${cmpMeta.$tagName$}! Mode is set to ${self.shadowRoot.mode} but Stencil only supports open shadow roots.`
1641
- );
1642
- }
1643
- }
1644
- }
1645
- }
1646
- }
1647
- connectedCallback() {
1648
- const hostRef = getHostRef(this);
1649
- if (!hostRef) {
1650
- return;
1651
- }
1652
- if (!this.hasRegisteredEventListeners) {
1653
- this.hasRegisteredEventListeners = true;
1654
- addHostEventListeners(this, hostRef, cmpMeta.$listeners$);
1655
- }
1656
- if (appLoadFallback) {
1657
- clearTimeout(appLoadFallback);
1658
- appLoadFallback = null;
1659
- }
1660
- if (isBootstrapping) {
1661
- deferredConnectedCallbacks.push(this);
1662
- } else {
1663
- plt.jmp(() => connectedCallback(this));
1664
- }
1665
- }
1666
- disconnectedCallback() {
1667
- plt.jmp(() => disconnectedCallback(this));
1668
- plt.raf(() => {
1669
- var _a3;
1670
- const hostRef = getHostRef(this);
1671
- if (!hostRef) {
1672
- return;
1673
- }
1674
- const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
1675
- if (i2 > -1) {
1676
- deferredConnectedCallbacks.splice(i2, 1);
1677
- }
1678
- if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
1679
- delete hostRef.$vnode$.$elm$;
1680
- }
1681
- });
1682
- }
1683
- componentOnReady() {
1684
- var _a3;
1685
- return (_a3 = getHostRef(this)) == null ? void 0 : _a3.$onReadyPromise$;
1686
- }
1687
- };
1688
- if (cmpMeta.$flags$ & 64 /* formAssociated */) {
1689
- HostElement.formAssociated = true;
1690
- }
1691
- cmpMeta.$lazyBundleId$ = lazyBundle[0];
1692
- if (!exclude.includes(tagName) && !customElements2.get(tagName)) {
1693
- cmpTags.push(tagName);
1694
- customElements2.define(
1695
- tagName,
1696
- proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */)
1697
- );
1698
- }
1699
- });
1700
- });
1701
- if (cmpTags.length > 0) {
1702
- {
1703
- dataStyles.textContent += cmpTags.sort() + HYDRATED_CSS;
1704
- }
1705
- if (dataStyles.innerHTML.length) {
1706
- dataStyles.setAttribute("data-styles", "");
1707
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
1708
- if (nonce != null) {
1709
- dataStyles.setAttribute("nonce", nonce);
1710
- }
1711
- head.insertBefore(dataStyles, metaCharset ? metaCharset.nextSibling : head.firstChild);
1712
- }
1713
- }
1714
- isBootstrapping = false;
1715
- if (deferredConnectedCallbacks.length) {
1716
- deferredConnectedCallbacks.map((host) => host.connectedCallback());
1717
- } else {
1718
- {
1719
- plt.jmp(() => appLoadFallback = setTimeout(appDidLoad, 30));
1720
- }
1721
- }
1722
- endBootstrap();
1723
- };
1724
- var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
1725
- if (listeners && win.document) {
1726
- listeners.map(([flags, name, method]) => {
1727
- const target = getHostListenerTarget(win.document, elm, flags) ;
1728
- const handler = hostListenerProxy(hostRef, method);
1729
- const opts = hostListenerOpts(flags);
1730
- plt.ael(target, name, handler, opts);
1731
- (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
1732
- });
1733
- }
1734
- };
1735
- var hostListenerProxy = (hostRef, methodName) => (ev) => {
1736
- var _a;
1737
- try {
1738
- {
1739
- if (hostRef.$flags$ & 256 /* isListenReady */) {
1740
- (_a = hostRef.$lazyInstance$) == null ? void 0 : _a[methodName](ev);
1741
- } else {
1742
- (hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
1743
- }
1744
- }
1745
- } catch (e) {
1746
- consoleError(e, hostRef.$hostElement$);
1747
- }
1748
- };
1749
- var getHostListenerTarget = (doc, elm, flags) => {
1750
- if (flags & 8 /* TargetWindow */) {
1751
- return win;
1752
- }
1753
- return elm;
1754
- };
1755
- var hostListenerOpts = (flags) => supportsListenerOptions ? {
1756
- passive: (flags & 1 /* Passive */) !== 0,
1757
- capture: (flags & 2 /* Capture */) !== 0
1758
- } : (flags & 2 /* Capture */) !== 0;
1759
-
1760
- // src/runtime/nonce.ts
1761
- var setNonce = (nonce) => plt.$nonce$ = nonce;
1762
- function transformTag(tag) {
1763
- return tag;
1764
- }
1765
-
1766
- exports.Host = Host;
1767
- exports.bootstrapLazy = bootstrapLazy;
1768
- exports.createEvent = createEvent;
1769
- exports.getElement = getElement;
1770
- exports.globalScripts = globalScripts;
1771
- exports.h = h;
1772
- exports.promiseResolve = promiseResolve;
1773
- exports.registerInstance = registerInstance;
1774
- exports.setNonce = setNonce;