le-kit 0.1.13 → 0.1.14

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 (337) hide show
  1. package/dist/core/cjs/{index-BsRb_UTe.js → index-B0mg71He.js} +6 -6
  2. package/dist/core/cjs/index-B0mg71He.js.map +1 -0
  3. package/dist/core/cjs/index.cjs.js +2 -2
  4. package/dist/core/cjs/le-box.cjs.entry.js +2 -2
  5. package/dist/core/cjs/le-button.cjs.entry.js +2 -2
  6. package/dist/core/cjs/le-card.cjs.entry.js +2 -2
  7. package/dist/core/cjs/le-checkbox.cjs.entry.js +2 -2
  8. package/dist/core/cjs/le-kit.cjs.js +1 -1
  9. package/dist/core/cjs/le-number-input.cjs.entry.js +2 -2
  10. package/dist/core/cjs/le-popover.cjs.entry.js +1 -1
  11. package/dist/core/cjs/le-popup.cjs.entry.js +1 -1
  12. package/dist/core/cjs/le-round-progress.cjs.entry.js +1 -1
  13. package/dist/core/cjs/le-stack.cjs.entry.js +2 -2
  14. package/dist/core/cjs/le-string-input.cjs.entry.js +2 -2
  15. package/dist/core/cjs/le-text.cjs.entry.js +2 -2
  16. package/dist/core/cjs/le-turntable.cjs.entry.js +1 -1
  17. package/dist/core/cjs/loader.cjs.js +1 -1
  18. package/dist/{cjs/utils-DqhadIxH.js → core/cjs/utils-jdqP71LP.js} +3 -3
  19. package/dist/core/cjs/{utils-nsP8_w8_.js.map → utils-jdqP71LP.js.map} +1 -1
  20. package/dist/core/collection/global/app.js +4 -4
  21. package/dist/core/collection/global/app.js.map +1 -1
  22. package/dist/core/components/index.js.map +1 -1
  23. package/dist/core/components/le-box.js +34 -2
  24. package/dist/core/components/le-box.js.map +1 -1
  25. package/dist/core/components/le-button.js +1 -1
  26. package/dist/core/components/le-button2.js +1031 -6
  27. package/dist/core/components/le-button2.js.map +1 -1
  28. package/dist/core/components/le-card.js +36 -4
  29. package/dist/core/components/le-card.js.map +1 -1
  30. package/dist/core/components/le-checkbox.js +1 -79
  31. package/dist/core/components/le-checkbox.js.map +1 -1
  32. package/dist/core/components/le-component.d.ts +11 -0
  33. package/dist/core/components/le-number-input.js +30 -4
  34. package/dist/core/components/le-number-input.js.map +1 -1
  35. package/dist/core/components/le-popover.js +1 -377
  36. package/dist/core/components/le-popover.js.map +1 -1
  37. package/dist/core/components/le-popup.js +30 -4
  38. package/dist/core/components/le-popup.js.map +1 -1
  39. package/dist/core/components/le-round-progress.js +1 -1
  40. package/dist/core/components/le-round-progress.js.map +1 -1
  41. package/dist/core/components/le-slot.d.ts +11 -0
  42. package/dist/core/components/le-stack.js +36 -4
  43. package/dist/core/components/le-stack.js.map +1 -1
  44. package/dist/core/components/le-string-input.js +1 -119
  45. package/dist/core/components/le-string-input.js.map +1 -1
  46. package/dist/core/components/le-text.js +34 -2
  47. package/dist/core/components/le-text.js.map +1 -1
  48. package/dist/core/components/le-turntable.js +1 -1
  49. package/dist/core/components/le-turntable.js.map +1 -1
  50. package/dist/core/components/utils.js +4 -4
  51. package/dist/core/components/utils.js.map +1 -1
  52. package/dist/core/esm/{index-CJ-z5Zj1.js → index-SKsXnjWI.js} +6 -6
  53. package/dist/core/{le-kit/p-CJ-z5Zj1.js.map → esm/index-SKsXnjWI.js.map} +1 -1
  54. package/dist/core/esm/index.js +2 -2
  55. package/dist/core/esm/le-box.entry.js +2 -2
  56. package/dist/core/esm/le-button.entry.js +2 -2
  57. package/dist/core/esm/le-card.entry.js +2 -2
  58. package/dist/core/esm/le-checkbox.entry.js +2 -2
  59. package/dist/core/esm/le-kit.js +2 -2
  60. package/dist/core/esm/le-number-input.entry.js +2 -2
  61. package/dist/core/esm/le-popover.entry.js +1 -1
  62. package/dist/core/esm/le-popup.entry.js +1 -1
  63. package/dist/core/esm/le-round-progress.entry.js +1 -1
  64. package/dist/core/esm/le-stack.entry.js +2 -2
  65. package/dist/core/esm/le-string-input.entry.js +2 -2
  66. package/dist/core/esm/le-text.entry.js +2 -2
  67. package/dist/core/esm/le-turntable.entry.js +1 -1
  68. package/dist/core/esm/loader.js +2 -2
  69. package/dist/{esm/utils-Cf7fMI0j.js → core/esm/utils-DZdP1JiG.js} +3 -3
  70. package/dist/core/esm/{utils-Bxmld82M.js.map → utils-DZdP1JiG.js.map} +1 -1
  71. package/dist/core/le-kit/index.esm.js +1 -1
  72. package/dist/core/le-kit/le-kit.esm.js +1 -1
  73. package/dist/core/le-kit/p--VxUdzYV.js +2 -0
  74. package/dist/core/le-kit/{p-Drz36PDp.js.map → p--VxUdzYV.js.map} +1 -1
  75. package/dist/core/le-kit/{p-2ac4789a.entry.js → p-189cb775.entry.js} +2 -2
  76. package/dist/core/le-kit/{p-556086ca.entry.js → p-35c1d413.entry.js} +2 -2
  77. package/dist/core/le-kit/{p-aa6e906f.entry.js → p-4f133e72.entry.js} +2 -2
  78. package/dist/core/le-kit/{p-df552906.entry.js → p-55f70091.entry.js} +2 -2
  79. package/dist/core/le-kit/{p-e0861e82.entry.js → p-5fd7b23a.entry.js} +2 -2
  80. package/dist/core/le-kit/{p-5ef81068.entry.js → p-6e414a5c.entry.js} +2 -2
  81. package/dist/core/le-kit/{p-d75214f9.entry.js → p-7b121ca7.entry.js} +2 -2
  82. package/dist/core/le-kit/{p-45eace7c.entry.js → p-8c81fa95.entry.js} +2 -2
  83. package/dist/core/le-kit/{p-257495cc.entry.js → p-9aa81442.entry.js} +2 -2
  84. package/dist/core/le-kit/p-SKsXnjWI.js +3 -0
  85. package/dist/core/le-kit/p-SKsXnjWI.js.map +1 -0
  86. package/dist/core/le-kit/{p-66d35f48.entry.js → p-a9d05ef6.entry.js} +2 -2
  87. package/dist/core/le-kit/{p-73682c5e.entry.js → p-b2bd2a80.entry.js} +2 -2
  88. package/dist/core/le-kit/{p-0308bd1f.entry.js → p-ccac9611.entry.js} +2 -2
  89. package/dist/core/types/global/app.d.ts +4 -4
  90. package/dist/le-kit/assets/custom-elements.json +1007 -1007
  91. package/dist/le-kit/index-CAY3Hk_i.js +4559 -0
  92. package/dist/le-kit/index-CAY3Hk_i.js.map +1 -0
  93. package/dist/le-kit/index.esm.js +116 -2
  94. package/dist/le-kit/index.esm.js.map +1 -1
  95. package/dist/{esm → le-kit}/le-box.entry.js +3 -3
  96. package/dist/le-kit/le-button.entry.esm.js.map +1 -0
  97. package/dist/le-kit/le-button.entry.js +90 -0
  98. package/dist/{esm → le-kit}/le-card.entry.js +3 -3
  99. package/dist/le-kit/le-checkbox.entry.esm.js.map +1 -0
  100. package/dist/le-kit/le-checkbox.entry.js +59 -0
  101. package/dist/le-kit/le-component.entry.esm.js.map +1 -0
  102. package/dist/{collection/components/le-component/le-component.js → le-kit/le-component.entry.js} +19 -138
  103. package/dist/le-kit/le-kit.css +1010 -1
  104. package/dist/le-kit/le-kit.esm.js +48 -2
  105. package/dist/le-kit/le-kit.esm.js.map +1 -1
  106. package/dist/{esm → le-kit}/le-number-input.entry.js +5 -5
  107. package/dist/le-kit/le-popover.entry.esm.js.map +1 -0
  108. package/dist/{collection/components/le-popover/le-popover.js → le-kit/le-popover.entry.js} +16 -363
  109. package/dist/{esm → le-kit}/le-popup.entry.js +6 -6
  110. package/dist/{esm → le-kit}/le-round-progress.entry.js +2 -2
  111. package/dist/le-kit/le-slot.entry.esm.js.map +1 -0
  112. package/dist/{collection/components/le-slot/le-slot.js → le-kit/le-slot.entry.js} +20 -273
  113. package/dist/{esm → le-kit}/le-stack.entry.js +3 -3
  114. package/dist/le-kit/le-string-input.entry.esm.js.map +1 -0
  115. package/dist/le-kit/le-string-input.entry.js +93 -0
  116. package/dist/{esm → le-kit}/le-text.entry.js +3 -3
  117. package/dist/{esm → le-kit}/le-turntable.entry.js +2 -2
  118. package/dist/{core/esm/utils-Bxmld82M.js → le-kit/utils-cwSNy7ZS.js} +3 -3
  119. package/dist/{esm/utils-Cf7fMI0j.js.map → le-kit/utils-cwSNy7ZS.js.map} +1 -1
  120. package/dist/types/global/app.d.ts +4 -4
  121. package/package.json +3 -4
  122. package/readme.md +2 -2
  123. package/custom-elements.json +0 -4305
  124. package/dist/cjs/index-o1DRKw1g.js +0 -1842
  125. package/dist/cjs/index-o1DRKw1g.js.map +0 -1
  126. package/dist/cjs/index.cjs.js +0 -119
  127. package/dist/cjs/index.cjs.js.map +0 -1
  128. package/dist/cjs/le-box.cjs.entry.js +0 -184
  129. package/dist/cjs/le-box.entry.cjs.js.map +0 -1
  130. package/dist/cjs/le-button.le-checkbox.le-component.le-popover.le-slot.le-string-input.entry.cjs.js.map +0 -1
  131. package/dist/cjs/le-button_6.cjs.entry.js +0 -1206
  132. package/dist/cjs/le-card.cjs.entry.js +0 -29
  133. package/dist/cjs/le-card.entry.cjs.js.map +0 -1
  134. package/dist/cjs/le-kit.cjs.js +0 -25
  135. package/dist/cjs/le-kit.cjs.js.map +0 -1
  136. package/dist/cjs/le-number-input.cjs.entry.js +0 -202
  137. package/dist/cjs/le-number-input.entry.cjs.js.map +0 -1
  138. package/dist/cjs/le-popup.cjs.entry.js +0 -212
  139. package/dist/cjs/le-popup.entry.cjs.js.map +0 -1
  140. package/dist/cjs/le-round-progress.cjs.entry.js +0 -106
  141. package/dist/cjs/le-round-progress.entry.cjs.js.map +0 -1
  142. package/dist/cjs/le-stack.cjs.entry.js +0 -135
  143. package/dist/cjs/le-stack.entry.cjs.js.map +0 -1
  144. package/dist/cjs/le-text.cjs.entry.js +0 -335
  145. package/dist/cjs/le-text.entry.cjs.js.map +0 -1
  146. package/dist/cjs/le-turntable.cjs.entry.js +0 -139
  147. package/dist/cjs/le-turntable.entry.cjs.js.map +0 -1
  148. package/dist/cjs/loader.cjs.js +0 -13
  149. package/dist/cjs/loader.cjs.js.map +0 -1
  150. package/dist/cjs/utils-DqhadIxH.js.map +0 -1
  151. package/dist/collection/assets/custom-elements.json +0 -4305
  152. package/dist/collection/collection-manifest.json +0 -26
  153. package/dist/collection/components/le-box/le-box.default.css +0 -37
  154. package/dist/collection/components/le-box/le-box.js +0 -614
  155. package/dist/collection/components/le-box/le-box.js.map +0 -1
  156. package/dist/collection/components/le-button/le-button.default.css +0 -263
  157. package/dist/collection/components/le-button/le-button.js +0 -368
  158. package/dist/collection/components/le-button/le-button.js.map +0 -1
  159. package/dist/collection/components/le-card/le-card.default.css +0 -74
  160. package/dist/collection/components/le-card/le-card.js +0 -102
  161. package/dist/collection/components/le-card/le-card.js.map +0 -1
  162. package/dist/collection/components/le-checkbox/le-checkbox.css +0 -93
  163. package/dist/collection/components/le-checkbox/le-checkbox.js +0 -192
  164. package/dist/collection/components/le-checkbox/le-checkbox.js.map +0 -1
  165. package/dist/collection/components/le-component/le-component.css +0 -189
  166. package/dist/collection/components/le-component/le-component.js.map +0 -1
  167. package/dist/collection/components/le-number-input/le-number-input.css +0 -135
  168. package/dist/collection/components/le-number-input/le-number-input.js +0 -515
  169. package/dist/collection/components/le-number-input/le-number-input.js.map +0 -1
  170. package/dist/collection/components/le-popover/le-popover.css +0 -143
  171. package/dist/collection/components/le-popover/le-popover.js.map +0 -1
  172. package/dist/collection/components/le-popup/le-popup.api.js +0 -101
  173. package/dist/collection/components/le-popup/le-popup.api.js.map +0 -1
  174. package/dist/collection/components/le-popup/le-popup.css +0 -222
  175. package/dist/collection/components/le-popup/le-popup.js +0 -596
  176. package/dist/collection/components/le-popup/le-popup.js.map +0 -1
  177. package/dist/collection/components/le-round-progress/le-round-progress.css +0 -34
  178. package/dist/collection/components/le-round-progress/le-round-progress.js +0 -184
  179. package/dist/collection/components/le-round-progress/le-round-progress.js.map +0 -1
  180. package/dist/collection/components/le-slot/le-slot.default.css +0 -222
  181. package/dist/collection/components/le-slot/le-slot.js.map +0 -1
  182. package/dist/collection/components/le-stack/le-stack.default.css +0 -37
  183. package/dist/collection/components/le-stack/le-stack.js +0 -389
  184. package/dist/collection/components/le-stack/le-stack.js.map +0 -1
  185. package/dist/collection/components/le-string-input/le-string-input.css +0 -83
  186. package/dist/collection/components/le-string-input/le-string-input.js +0 -359
  187. package/dist/collection/components/le-string-input/le-string-input.js.map +0 -1
  188. package/dist/collection/components/le-text/le-text.default.css +0 -169
  189. package/dist/collection/components/le-text/le-text.js +0 -475
  190. package/dist/collection/components/le-text/le-text.js.map +0 -1
  191. package/dist/collection/components/le-turntable/le-turntable.css +0 -10
  192. package/dist/collection/components/le-turntable/le-turntable.js +0 -210
  193. package/dist/collection/components/le-turntable/le-turntable.js.map +0 -1
  194. package/dist/collection/global/app.js +0 -167
  195. package/dist/collection/global/app.js.map +0 -1
  196. package/dist/collection/index.js +0 -15
  197. package/dist/collection/index.js.map +0 -1
  198. package/dist/collection/types/blocks.js +0 -115
  199. package/dist/collection/types/blocks.js.map +0 -1
  200. package/dist/collection/types/options.js +0 -2
  201. package/dist/collection/types/options.js.map +0 -1
  202. package/dist/collection/utils/utils.js +0 -141
  203. package/dist/collection/utils/utils.js.map +0 -1
  204. package/dist/components/index.js +0 -113
  205. package/dist/components/index.js.map +0 -1
  206. package/dist/components/le-box.js +0 -257
  207. package/dist/components/le-box.js.map +0 -1
  208. package/dist/components/le-button.js +0 -9
  209. package/dist/components/le-button.js.map +0 -1
  210. package/dist/components/le-button2.js +0 -1149
  211. package/dist/components/le-button2.js.map +0 -1
  212. package/dist/components/le-card.js +0 -84
  213. package/dist/components/le-card.js.map +0 -1
  214. package/dist/components/le-checkbox.js +0 -9
  215. package/dist/components/le-checkbox.js.map +0 -1
  216. package/dist/components/le-number-input.js +0 -272
  217. package/dist/components/le-number-input.js.map +0 -1
  218. package/dist/components/le-popover.js +0 -9
  219. package/dist/components/le-popover.js.map +0 -1
  220. package/dist/components/le-popup.js +0 -279
  221. package/dist/components/le-popup.js.map +0 -1
  222. package/dist/components/le-round-progress.js +0 -135
  223. package/dist/components/le-round-progress.js.map +0 -1
  224. package/dist/components/le-stack.js +0 -199
  225. package/dist/components/le-stack.js.map +0 -1
  226. package/dist/components/le-string-input.js +0 -9
  227. package/dist/components/le-string-input.js.map +0 -1
  228. package/dist/components/le-text.js +0 -399
  229. package/dist/components/le-text.js.map +0 -1
  230. package/dist/components/le-turntable.js +0 -164
  231. package/dist/components/le-turntable.js.map +0 -1
  232. package/dist/components/utils.js +0 -310
  233. package/dist/components/utils.js.map +0 -1
  234. package/dist/core/cjs/index-BsRb_UTe.js.map +0 -1
  235. package/dist/core/cjs/utils-nsP8_w8_.js +0 -152
  236. package/dist/core/collection/assets/custom-elements.json +0 -4305
  237. package/dist/core/collection/themes/base.css +0 -89
  238. package/dist/core/collection/themes/dark.css +0 -100
  239. package/dist/core/collection/themes/default.css +0 -108
  240. package/dist/core/collection/themes/gradient.css +0 -100
  241. package/dist/core/collection/themes/index.css +0 -413
  242. package/dist/core/collection/themes/minimal.css +0 -100
  243. package/dist/core/collection/themes/warm.css +0 -100
  244. package/dist/core/esm/index-CJ-z5Zj1.js.map +0 -1
  245. package/dist/core/le-kit/p-CJ-z5Zj1.js +0 -3
  246. package/dist/core/le-kit/p-Drz36PDp.js +0 -2
  247. package/dist/docs.d.ts +0 -443
  248. package/dist/docs.json +0 -5185
  249. package/dist/esm/index-CwNQ1GTa.js +0 -1824
  250. package/dist/esm/index-CwNQ1GTa.js.map +0 -1
  251. package/dist/esm/index.js +0 -106
  252. package/dist/esm/index.js.map +0 -1
  253. package/dist/esm/le-box.entry.js.map +0 -1
  254. package/dist/esm/le-button.le-checkbox.le-component.le-popover.le-slot.le-string-input.entry.js.map +0 -1
  255. package/dist/esm/le-button_6.entry.js +0 -1199
  256. package/dist/esm/le-card.entry.js.map +0 -1
  257. package/dist/esm/le-kit.js +0 -21
  258. package/dist/esm/le-kit.js.map +0 -1
  259. package/dist/esm/le-number-input.entry.js.map +0 -1
  260. package/dist/esm/le-popup.entry.js.map +0 -1
  261. package/dist/esm/le-round-progress.entry.js.map +0 -1
  262. package/dist/esm/le-stack.entry.js.map +0 -1
  263. package/dist/esm/le-text.entry.js.map +0 -1
  264. package/dist/esm/le-turntable.entry.js.map +0 -1
  265. package/dist/esm/loader.js +0 -11
  266. package/dist/esm/loader.js.map +0 -1
  267. package/dist/index.cjs.js +0 -1
  268. package/dist/index.js +0 -1
  269. package/dist/le-kit/dist/collection/themes/base.css +0 -89
  270. package/dist/le-kit/dist/collection/themes/dark.css +0 -100
  271. package/dist/le-kit/dist/collection/themes/default.css +0 -108
  272. package/dist/le-kit/dist/collection/themes/gradient.css +0 -100
  273. package/dist/le-kit/dist/collection/themes/index.css +0 -413
  274. package/dist/le-kit/dist/collection/themes/minimal.css +0 -100
  275. package/dist/le-kit/dist/collection/themes/warm.css +0 -100
  276. package/dist/le-kit/le-button.le-checkbox.le-component.le-popover.le-slot.le-string-input.entry.esm.js.map +0 -1
  277. package/dist/le-kit/p-08dbcc25.entry.js +0 -2
  278. package/dist/le-kit/p-08dbcc25.entry.js.map +0 -1
  279. package/dist/le-kit/p-5dc35729.entry.js +0 -2
  280. package/dist/le-kit/p-5dc35729.entry.js.map +0 -1
  281. package/dist/le-kit/p-64374730.entry.js +0 -2
  282. package/dist/le-kit/p-64374730.entry.js.map +0 -1
  283. package/dist/le-kit/p-79ec6f7c.entry.js +0 -2
  284. package/dist/le-kit/p-79ec6f7c.entry.js.map +0 -1
  285. package/dist/le-kit/p-8daf3c7f.entry.js +0 -2
  286. package/dist/le-kit/p-8daf3c7f.entry.js.map +0 -1
  287. package/dist/le-kit/p-9c69235d.entry.js +0 -2
  288. package/dist/le-kit/p-9c69235d.entry.js.map +0 -1
  289. package/dist/le-kit/p-CwNQ1GTa.js +0 -3
  290. package/dist/le-kit/p-CwNQ1GTa.js.map +0 -1
  291. package/dist/le-kit/p-ad398acd.entry.js +0 -2
  292. package/dist/le-kit/p-ad398acd.entry.js.map +0 -1
  293. package/dist/le-kit/p-b8122ad6.entry.js +0 -2
  294. package/dist/le-kit/p-b8122ad6.entry.js.map +0 -1
  295. package/dist/le-kit/p-f9008505.entry.js +0 -2
  296. package/dist/le-kit/p-f9008505.entry.js.map +0 -1
  297. package/dist/le-kit/p-y3FECAx9.js +0 -2
  298. package/dist/le-kit/p-y3FECAx9.js.map +0 -1
  299. package/dist/themes/base.css +0 -89
  300. package/dist/themes/dark.css +0 -100
  301. package/dist/themes/default.css +0 -108
  302. package/dist/themes/gradient.css +0 -100
  303. package/dist/themes/index.css +0 -413
  304. package/dist/themes/minimal.css +0 -100
  305. package/dist/themes/warm.css +0 -100
  306. /package/dist/{collection/dist/collection → components}/themes/base.css +0 -0
  307. /package/dist/{collection/dist/collection → components}/themes/dark.css +0 -0
  308. /package/dist/{collection/dist/collection → components}/themes/default.css +0 -0
  309. /package/dist/{collection/dist/collection → components}/themes/gradient.css +0 -0
  310. /package/dist/{collection/dist/collection → components}/themes/index.css +0 -0
  311. /package/dist/{collection/dist/collection → components}/themes/minimal.css +0 -0
  312. /package/dist/{collection/dist/collection → components}/themes/warm.css +0 -0
  313. /package/dist/{components → core/components}/le-component.js +0 -0
  314. /package/dist/{components → core/components}/le-component.js.map +0 -0
  315. /package/dist/{components → core/components}/le-popover2.js +0 -0
  316. /package/dist/{components → core/components}/le-popover2.js.map +0 -0
  317. /package/dist/{components → core/components}/le-slot.js +0 -0
  318. /package/dist/{components → core/components}/le-slot.js.map +0 -0
  319. /package/dist/core/le-kit/{p-2ac4789a.entry.js.map → p-189cb775.entry.js.map} +0 -0
  320. /package/dist/core/le-kit/{p-556086ca.entry.js.map → p-35c1d413.entry.js.map} +0 -0
  321. /package/dist/core/le-kit/{p-aa6e906f.entry.js.map → p-4f133e72.entry.js.map} +0 -0
  322. /package/dist/core/le-kit/{p-df552906.entry.js.map → p-55f70091.entry.js.map} +0 -0
  323. /package/dist/core/le-kit/{p-e0861e82.entry.js.map → p-5fd7b23a.entry.js.map} +0 -0
  324. /package/dist/core/le-kit/{p-5ef81068.entry.js.map → p-6e414a5c.entry.js.map} +0 -0
  325. /package/dist/core/le-kit/{p-d75214f9.entry.js.map → p-7b121ca7.entry.js.map} +0 -0
  326. /package/dist/core/le-kit/{p-45eace7c.entry.js.map → p-8c81fa95.entry.js.map} +0 -0
  327. /package/dist/core/le-kit/{p-257495cc.entry.js.map → p-9aa81442.entry.js.map} +0 -0
  328. /package/dist/core/le-kit/{p-66d35f48.entry.js.map → p-a9d05ef6.entry.js.map} +0 -0
  329. /package/dist/core/le-kit/{p-73682c5e.entry.js.map → p-b2bd2a80.entry.js.map} +0 -0
  330. /package/dist/core/le-kit/{p-0308bd1f.entry.js.map → p-ccac9611.entry.js.map} +0 -0
  331. /package/dist/{collection → le-kit/dist/components}/themes/base.css +0 -0
  332. /package/dist/{collection → le-kit/dist/components}/themes/dark.css +0 -0
  333. /package/dist/{collection → le-kit/dist/components}/themes/default.css +0 -0
  334. /package/dist/{collection → le-kit/dist/components}/themes/gradient.css +0 -0
  335. /package/dist/{collection → le-kit/dist/components}/themes/index.css +0 -0
  336. /package/dist/{collection → le-kit/dist/components}/themes/minimal.css +0 -0
  337. /package/dist/{collection → le-kit/dist/components}/themes/warm.css +0 -0
@@ -1,1842 +0,0 @@
1
- 'use strict';
2
-
3
- const NAMESPACE = 'le-kit';
4
- const BUILD = /* le-kit */ { hydratedSelectorName: "hydrated", lazyLoad: true, propChangeCallback: true, state: true, updatable: true};
5
-
6
- /**
7
- * Global mode initialization for le-kit components.
8
- *
9
- * Mode inheritance works as follows:
10
- * 1. Check the element's own `mode` attribute
11
- * 2. Traverse up the DOM to find a parent with `mode` attribute
12
- * 3. Check the document root element (html) for `mode` attribute
13
- * 4. Fall back to 'default'
14
- *
15
- * This allows setting mode at any level:
16
- * - `<html mode="admin">` - all components in admin mode
17
- * - `<le-card mode="admin">` - this card and its children in admin mode
18
- */
19
- function initializeMode() {
20
- }
21
- /**
22
- * Helper function to get the current mode for an element.
23
- * Can be used programmatically in components.
24
- *
25
- * This function traverses both regular DOM and shadow DOM boundaries
26
- * to find the nearest mode attribute.
27
- */
28
- function getMode(el) {
29
- // Check element's own mode
30
- const ownMode = el.getAttribute('mode');
31
- if (ownMode) {
32
- return ownMode;
33
- }
34
- // Traverse up DOM, crossing shadow boundaries
35
- let current = el;
36
- while (current) {
37
- // Try parent element first
38
- if (current instanceof Element && current.parentElement) {
39
- current = current.parentElement;
40
- const mode = current.getAttribute?.('mode');
41
- if (mode) {
42
- return mode;
43
- }
44
- }
45
- else {
46
- // No parent element - check if we're in a shadow root
47
- const root = current.getRootNode();
48
- if (root instanceof ShadowRoot) {
49
- // Cross the shadow boundary to the host element
50
- current = root.host;
51
- const mode = current.getAttribute?.('mode');
52
- if (mode) {
53
- return mode;
54
- }
55
- }
56
- else {
57
- // We've reached the document root
58
- break;
59
- }
60
- }
61
- }
62
- // Check document root
63
- const rootMode = document.documentElement.getAttribute('mode');
64
- if (rootMode) {
65
- return rootMode;
66
- }
67
- return 'default';
68
- }
69
- /**
70
- * Helper function to get the current theme for an element.
71
- * Theme inheritance works the same as mode - cascades through DOM.
72
- */
73
- function getTheme(el) {
74
- // Check element's own theme
75
- const ownTheme = el.getAttribute('theme');
76
- if (ownTheme) {
77
- return ownTheme;
78
- }
79
- // Traverse up DOM
80
- let parent = el.parentElement;
81
- while (parent) {
82
- const parentTheme = parent.getAttribute('theme');
83
- if (parentTheme) {
84
- return parentTheme;
85
- }
86
- parent = parent.parentElement;
87
- }
88
- // Check root
89
- const rootTheme = document.documentElement.getAttribute('theme');
90
- if (rootTheme) {
91
- return rootTheme;
92
- }
93
- return 'default';
94
- }
95
- /**
96
- * Helper function to set mode on the document root.
97
- * Useful for switching all components to admin mode.
98
- */
99
- function setGlobalMode(mode) {
100
- document.documentElement.setAttribute('mode', mode);
101
- }
102
- /**
103
- * Helper function to set theme on the document root.
104
- * Useful for switching all components to a different theme.
105
- */
106
- function setGlobalTheme(theme) {
107
- document.documentElement.setAttribute('theme', theme);
108
- }
109
- /**
110
- * Global configuration for le-kit
111
- */
112
- let leKitConfig = {
113
- /**
114
- * URL to the custom-elements.json manifest.
115
- * Used by admin components (le-component, le-slot) to load component metadata.
116
- *
117
- * Default: '/custom-elements.json' (served from app root)
118
- *
119
- * For apps using le-kit, you may need to:
120
- * 1. Copy the manifest from node_modules/le-kit/custom-elements.json to your public folder
121
- * 2. Or set this to point to where the manifest is served
122
- */
123
- manifestUrl: '/custom-elements.json',
124
- };
125
- /**
126
- * Configure le-kit global settings.
127
- *
128
- * @example
129
- * ```ts
130
- * import { configureLeki } from 'le-kit';
131
- *
132
- * configureLeki({
133
- * manifestUrl: '/assets/custom-elements.json'
134
- * });
135
- * ```
136
- */
137
- function configureLeKit(config) {
138
- leKitConfig = { ...leKitConfig, ...config };
139
- }
140
- /**
141
- * Get the current le-kit configuration.
142
- */
143
- function getLeKitConfig() {
144
- return leKitConfig;
145
- }
146
-
147
- const globalScripts = initializeMode;
148
- const globalStyles = ":root{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--le-spacing-0:0;--le-spacing-1:0.25rem;--le-spacing-2:0.5rem;--le-spacing-3:0.75rem;--le-spacing-4:1rem;--le-spacing-5:1.25rem;--le-spacing-6:1.5rem;--le-spacing-8:2rem;--le-spacing-10:2.5rem;--le-spacing-12:3rem;--le-spacing-16:4rem;--le-font-family-base:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;--le-font-family-mono:'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;--le-font-size-xs:0.75rem;--le-font-size-sm:0.875rem;--le-font-size-md:1rem;--le-font-size-lg:1.125rem;--le-font-size-xl:1.25rem;--le-font-size-2xl:1.5rem;--le-font-size-3xl:1.875rem;--le-font-size-4xl:2.25rem;--le-font-weight-normal:400;--le-font-weight-medium:500;--le-font-weight-semibold:600;--le-font-weight-bold:700;--le-line-height-tight:1.25;--le-line-height-normal:1.5;--le-line-height-relaxed:1.75;--le-radius-none:0;--le-radius-xs:0.066rem;--le-radius-sm:0.125rem;--le-radius-md:0.25rem;--le-radius-lg:0.5rem;--le-radius-xl:0.75rem;--le-radius-2xl:1rem;--le-radius-full:9999px;--le-transition-fast:100ms;--le-transition-normal:200ms;--le-transition-slow:300ms;--le-transition-easing:cubic-bezier(0.4, 0, 0.2, 1);--le-z-dropdown:1000;--le-z-sticky:1020;--le-z-fixed:1030;--le-z-modal-backdrop:1040;--le-z-modal:1050;--le-z-popover:1060;--le-z-tooltip:1070}:root,[theme=\"default\"]{--le-color-primary:#0088ff;--le-color-primary-light:#4da6ff;--le-color-primary-dark:#0066cc;--le-color-primary-contrast:#ffffff;--le-color-secondary:#6c757d;--le-color-secondary-light:#868e96;--le-color-secondary-dark:#545b62;--le-color-secondary-contrast:#ffffff;--le-color-success:#28a745;--le-color-success-light:#48c764;--le-color-success-dark:#1e7e34;--le-color-success-contrast:#ffffff;--le-color-warning:#ffc107;--le-color-warning-light:#ffcd39;--le-color-warning-dark:#d39e00;--le-color-warning-contrast:#212529;--le-color-danger:#dc3545;--le-color-danger-light:#e4606d;--le-color-danger-dark:#bd2130;--le-color-danger-contrast:#ffffff;--le-color-info:#17a2b8;--le-color-info-light:#3ab0c3;--le-color-info-dark:#117a8b;--le-color-info-contrast:#ffffff;--le-color-white:#ffffff;--le-color-black:#000000;--le-color-gray-50:#fafafa;--le-color-gray-100:#f5f5f5;--le-color-gray-200:#eeeeee;--le-color-gray-300:#e0e0e0;--le-color-gray-400:#bdbdbd;--le-color-gray-500:#9e9e9e;--le-color-gray-600:#757575;--le-color-gray-700:#616161;--le-color-gray-800:#424242;--le-color-gray-900:#212121;--le-color-background:#ffffff;--le-color-background-secondary:#f5f5f5;--le-color-background-tertiary:#eeeeee;--le-color-surface:#ffffff;--le-color-surface-elevated:#ffffff;--le-color-text-primary:#212121;--le-color-text-secondary:#757575;--le-color-text-disabled:#9e9e9e;--le-color-text-inverse:#ffffff;--le-color-border:#e0e0e0;--le-color-border-light:#eeeeee;--le-color-border-dark:#bdbdbd;--le-border-width:2px;--le-color-border-input:#c4d6e6;--le-color-focus:rgba(0, 136, 255, 0.5);--le-radius-none:0;--le-radius-sm:0.125rem;--le-radius-md:0.25rem;--le-radius-lg:0.5rem;--le-radius-xl:0.75rem;--le-radius-2xl:1rem;--le-radius-full:9999px;--le-shadow-none:none;--le-shadow-sm:0 1px 2px rgba(0, 0, 0, 0.05);--le-shadow-md:0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);--le-shadow-lg:0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);--le-shadow-xl:0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);--le-shadow-2xl:0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04)}[theme=\"dark\"]{--le-color-primary:#4da6ff;--le-color-primary-light:#80c1ff;--le-color-primary-dark:#0088ff;--le-color-primary-contrast:#000000;--le-color-secondary:#868e96;--le-color-secondary-light:#adb5bd;--le-color-secondary-dark:#6c757d;--le-color-secondary-contrast:#000000;--le-color-success:#48c764;--le-color-success-light:#6dd587;--le-color-success-dark:#28a745;--le-color-success-contrast:#000000;--le-color-warning:#ffcd39;--le-color-warning-light:#ffda6a;--le-color-warning-dark:#ffc107;--le-color-warning-contrast:#000000;--le-color-danger:#e4606d;--le-color-danger-light:#ea868f;--le-color-danger-dark:#dc3545;--le-color-danger-contrast:#000000;--le-color-info:#3ab0c3;--le-color-info-light:#6dc4d3;--le-color-info-dark:#17a2b8;--le-color-info-contrast:#000000;--le-color-white:#ffffff;--le-color-black:#000000;--le-color-gray-50:#212121;--le-color-gray-100:#424242;--le-color-gray-200:#616161;--le-color-gray-300:#757575;--le-color-gray-400:#9e9e9e;--le-color-gray-500:#bdbdbd;--le-color-gray-600:#e0e0e0;--le-color-gray-700:#eeeeee;--le-color-gray-800:#f5f5f5;--le-color-gray-900:#fafafa;--le-color-background:#121212;--le-color-background-secondary:#1e1e1e;--le-color-background-tertiary:#2d2d2d;--le-color-surface:#1e1e1e;--le-color-surface-elevated:#2d2d2d;--le-color-text-primary:#ffffff;--le-color-text-secondary:#b3b3b3;--le-color-text-disabled:#666666;--le-color-text-inverse:#121212;--le-color-border:#333333;--le-color-border-light:#2d2d2d;--le-color-border-dark:#444444;--le-border-width:2px;--le-color-border-input:#515c6b;--le-color-focus:rgba(77, 166, 255, 0.5);--le-radius-none:0;--le-radius-sm:0.125rem;--le-radius-md:0.25rem;--le-radius-lg:0.5rem;--le-radius-xl:0.75rem;--le-radius-2xl:1rem;--le-radius-full:9999px;--le-shadow-none:none;--le-shadow-sm:0 1px 2px rgba(0, 0, 0, 0.3);--le-shadow-md:0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);--le-shadow-lg:0 4px 6px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.3);--le-shadow-xl:0 10px 15px rgba(0, 0, 0, 0.4), 0 4px 6px rgba(0, 0, 0, 0.3);--le-shadow-2xl:0 20px 25px rgba(0, 0, 0, 0.4), 0 10px 10px rgba(0, 0, 0, 0.3)}[theme=\"gradient\"]{--le-color-primary:#8b5cf6;--le-color-primary-light:#a78bfa;--le-color-primary-dark:#7c3aed;--le-color-primary-contrast:#ffffff;--le-color-secondary:#ec4899;--le-color-secondary-light:#f472b6;--le-color-secondary-dark:#db2777;--le-color-secondary-contrast:#ffffff;--le-color-success:#10b981;--le-color-success-light:#34d399;--le-color-success-dark:#059669;--le-color-success-contrast:#ffffff;--le-color-warning:#f59e0b;--le-color-warning-light:#fbbf24;--le-color-warning-dark:#d97706;--le-color-warning-contrast:#000000;--le-color-danger:#ef4444;--le-color-danger-light:#f87171;--le-color-danger-dark:#dc2626;--le-color-danger-contrast:#ffffff;--le-color-info:#06b6d4;--le-color-info-light:#22d3ee;--le-color-info-dark:#0891b2;--le-color-info-contrast:#ffffff;--le-color-white:#ffffff;--le-color-black:#000000;--le-color-gray-50:#faf5ff;--le-color-gray-100:#f3e8ff;--le-color-gray-200:#e9d5ff;--le-color-gray-300:#d8b4fe;--le-color-gray-400:#c084fc;--le-color-gray-500:#a855f7;--le-color-gray-600:#9333ea;--le-color-gray-700:#7e22ce;--le-color-gray-800:#6b21a8;--le-color-gray-900:#581c87;--le-color-background:linear-gradient(135deg, #667eea 0%, #764ba2 100%);--le-color-background-secondary:rgba(255, 255, 255, 0.1);--le-color-background-tertiary:rgba(255, 255, 255, 0.05);--le-color-surface:rgba(255, 255, 255, 0.95);--le-color-surface-elevated:#ffffff;--le-color-text-primary:#1f2937;--le-color-text-secondary:#6b7280;--le-color-text-disabled:#9ca3af;--le-color-text-inverse:#ffffff;--le-color-border:rgba(139, 92, 246, 0.3);--le-color-border-light:rgba(139, 92, 246, 0.1);--le-color-border-dark:rgba(139, 92, 246, 0.5);--le-border-width:2px;--le-color-border-input:#eccddd;--le-color-focus:rgba(139, 92, 246, 0.5);--le-radius-none:0;--le-radius-sm:0.25rem;--le-radius-md:0.5rem;--le-radius-lg:1rem;--le-radius-xl:1.5rem;--le-radius-2xl:2rem;--le-radius-full:9999px;--le-shadow-none:none;--le-shadow-sm:0 1px 2px rgba(139, 92, 246, 0.1);--le-shadow-md:0 4px 6px rgba(139, 92, 246, 0.15), 0 2px 4px rgba(139, 92, 246, 0.1);--le-shadow-lg:0 10px 20px rgba(139, 92, 246, 0.2), 0 4px 8px rgba(139, 92, 246, 0.1);--le-shadow-xl:0 20px 40px rgba(139, 92, 246, 0.25), 0 8px 16px rgba(139, 92, 246, 0.15);--le-shadow-2xl:0 30px 60px rgba(139, 92, 246, 0.3), 0 15px 30px rgba(139, 92, 246, 0.2)}[theme=\"minimal\"]{--le-color-primary:#111827;--le-color-primary-light:#374151;--le-color-primary-dark:#030712;--le-color-primary-contrast:#ffffff;--le-color-secondary:#6b7280;--le-color-secondary-light:#9ca3af;--le-color-secondary-dark:#4b5563;--le-color-secondary-contrast:#ffffff;--le-color-success:#059669;--le-color-success-light:#10b981;--le-color-success-dark:#047857;--le-color-success-contrast:#ffffff;--le-color-warning:#d97706;--le-color-warning-light:#f59e0b;--le-color-warning-dark:#b45309;--le-color-warning-contrast:#ffffff;--le-color-danger:#dc2626;--le-color-danger-light:#ef4444;--le-color-danger-dark:#b91c1c;--le-color-danger-contrast:#ffffff;--le-color-info:#0284c7;--le-color-info-light:#0ea5e9;--le-color-info-dark:#0369a1;--le-color-info-contrast:#ffffff;--le-color-white:#ffffff;--le-color-black:#000000;--le-color-gray-50:#f9fafb;--le-color-gray-100:#f3f4f6;--le-color-gray-200:#e5e7eb;--le-color-gray-300:#d1d5db;--le-color-gray-400:#9ca3af;--le-color-gray-500:#6b7280;--le-color-gray-600:#4b5563;--le-color-gray-700:#374151;--le-color-gray-800:#1f2937;--le-color-gray-900:#111827;--le-color-background:#ffffff;--le-color-background-secondary:#fafafa;--le-color-background-tertiary:#f5f5f5;--le-color-surface:#ffffff;--le-color-surface-elevated:#ffffff;--le-color-text-primary:#111827;--le-color-text-secondary:#6b7280;--le-color-text-disabled:#9ca3af;--le-color-text-inverse:#ffffff;--le-color-border:#e5e7eb;--le-color-border-light:#f3f4f6;--le-color-border-dark:#d1d5db;--le-border-width:1px;--le-color-border-input:#c8cfdd;--le-color-focus:rgba(17, 24, 39, 0.3);--le-radius-none:0;--le-radius-sm:0;--le-radius-md:2px;--le-radius-lg:4px;--le-radius-xl:6px;--le-radius-2xl:8px;--le-radius-full:9999px;--le-shadow-none:none;--le-shadow-sm:none;--le-shadow-md:0 1px 2px rgba(0, 0, 0, 0.05);--le-shadow-lg:0 1px 3px rgba(0, 0, 0, 0.08);--le-shadow-xl:0 2px 4px rgba(0, 0, 0, 0.1);--le-shadow-2xl:0 4px 8px rgba(0, 0, 0, 0.1)}[theme=\"warm\"]{--le-color-primary:#ea580c;--le-color-primary-light:#fb923c;--le-color-primary-dark:#c2410c;--le-color-primary-contrast:#ffffff;--le-color-secondary:#b45309;--le-color-secondary-light:#d97706;--le-color-secondary-dark:#92400e;--le-color-secondary-contrast:#ffffff;--le-color-success:#16a34a;--le-color-success-light:#22c55e;--le-color-success-dark:#15803d;--le-color-success-contrast:#ffffff;--le-color-warning:#ca8a04;--le-color-warning-light:#eab308;--le-color-warning-dark:#a16207;--le-color-warning-contrast:#000000;--le-color-danger:#dc2626;--le-color-danger-light:#ef4444;--le-color-danger-dark:#b91c1c;--le-color-danger-contrast:#ffffff;--le-color-info:#0891b2;--le-color-info-light:#06b6d4;--le-color-info-dark:#0e7490;--le-color-info-contrast:#ffffff;--le-color-white:#ffffff;--le-color-black:#000000;--le-color-gray-50:#fffbeb;--le-color-gray-100:#fef3c7;--le-color-gray-200:#fde68a;--le-color-gray-300:#fcd34d;--le-color-gray-400:#fbbf24;--le-color-gray-500:#f59e0b;--le-color-gray-600:#d97706;--le-color-gray-700:#b45309;--le-color-gray-800:#92400e;--le-color-gray-900:#78350f;--le-color-background:#fffbeb;--le-color-background-secondary:#fef3c7;--le-color-background-tertiary:#fde68a;--le-color-surface:#ffffff;--le-color-surface-elevated:#ffffff;--le-color-text-primary:#78350f;--le-color-text-secondary:#92400e;--le-color-text-disabled:#d97706;--le-color-text-inverse:#ffffff;--le-color-border:#fcd34d;--le-color-border-light:#fde68a;--le-color-border-dark:#fbbf24;--le-border-width:2px;--le-color-border-input:#e7d4c4;--le-color-focus:rgba(234, 88, 12, 0.5);--le-radius-none:0;--le-radius-sm:0.125rem;--le-radius-md:0.375rem;--le-radius-lg:0.625rem;--le-radius-xl:0.875rem;--le-radius-2xl:1.125rem;--le-radius-full:9999px;--le-shadow-none:none;--le-shadow-sm:0 1px 2px rgba(234, 88, 12, 0.05);--le-shadow-md:0 4px 6px rgba(234, 88, 12, 0.1), 0 2px 4px rgba(234, 88, 12, 0.06);--le-shadow-lg:0 10px 15px rgba(234, 88, 12, 0.15), 0 4px 6px rgba(234, 88, 12, 0.08);--le-shadow-xl:0 20px 25px rgba(234, 88, 12, 0.15), 0 10px 10px rgba(234, 88, 12, 0.1);--le-shadow-2xl:0 25px 50px rgba(234, 88, 12, 0.2), 0 12px 24px rgba(234, 88, 12, 0.12)}:root{--le-space-xs:4px;--le-space-sm:8px;--le-space-md:16px;--le-space-lg:24px;--le-space-xl:32px;--le-space-2xl:48px;--le-space-3xl:64px;--le-font-family:system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;--le-font-family-mono:'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;--le-font-size-xs:0.75rem;--le-font-size-sm:0.875rem;--le-font-size-md:1rem;--le-font-size-lg:1.125rem;--le-font-size-xl:1.25rem;--le-font-size-2xl:1.5rem;--le-font-size-3xl:2rem;--le-font-size-4xl:2.5rem;--le-font-weight-normal:400;--le-font-weight-medium:500;--le-font-weight-semibold:600;--le-font-weight-bold:700;--le-line-height-tight:1.25;--le-line-height-normal:1.5;--le-line-height-relaxed:1.75;--le-transition-fast:150ms ease;--le-transition-normal:250ms ease;--le-transition-slow:400ms ease;--le-transition-bounce:400ms cubic-bezier(0.68, -0.55, 0.265, 1.55);--le-z-dropdown:1000;--le-z-sticky:1020;--le-z-fixed:1030;--le-z-modal-backdrop:1040;--le-z-modal:1050;--le-z-popover:1060;--le-z-tooltip:1070}:root,[theme=\"default\"]{--le-color-primary:#3b82f6;--le-color-primary-hover:#2563eb;--le-color-primary-active:#1d4ed8;--le-color-primary-subtle:#eff6ff;--le-color-on-primary:#ffffff;--le-color-secondary:#64748b;--le-color-secondary-hover:#475569;--le-color-secondary-active:#334155;--le-color-secondary-subtle:#f1f5f9;--le-color-on-secondary:#ffffff;--le-color-success:#22c55e;--le-color-success-subtle:#f0fdf4;--le-color-on-success:#ffffff;--le-color-warning:#f59e0b;--le-color-warning-subtle:#fffbeb;--le-color-on-warning:#000000;--le-color-error:#ef4444;--le-color-error-subtle:#fef2f2;--le-color-on-error:#ffffff;--le-color-info:#06b6d4;--le-color-info-subtle:#ecfeff;--le-color-on-info:#ffffff;--le-color-background:#ffffff;--le-color-surface:#ffffff;--le-color-surface-raised:#ffffff;--le-color-surface-overlay:rgba(0, 0, 0, 0.5);--le-color-text:#1e293b;--le-color-text-secondary:#64748b;--le-color-text-muted:#94a3b8;--le-color-text-inverse:#ffffff;--le-color-border:#e2e8f0;--le-color-border-strong:#cbd5e1;--le-color-border-focus:var(--le-color-primary);--le-radius-none:0;--le-radius-sm:4px;--le-radius-md:7px;--le-radius-lg:12px;--le-radius-xl:16px;--le-radius-2xl:24px;--le-radius-full:9999px;--le-shadow-sm:0 1px 2px 0 rgba(0, 0, 0, 0.05);--le-shadow-md:0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);--le-shadow-lg:0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);--le-shadow-xl:0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);--le-shadow-focus:0 0 0 3px rgba(59, 130, 246, 0.3)}[theme=\"dark\"]{--le-color-primary:#60a5fa;--le-color-primary-hover:#93c5fd;--le-color-primary-active:#3b82f6;--le-color-primary-subtle:#1e3a5f;--le-color-on-primary:#0f172a;--le-color-secondary:#94a3b8;--le-color-secondary-hover:#cbd5e1;--le-color-secondary-active:#64748b;--le-color-secondary-subtle:#1e293b;--le-color-on-secondary:#0f172a;--le-color-success:#4ade80;--le-color-success-subtle:#14532d;--le-color-on-success:#0f172a;--le-color-warning:#fbbf24;--le-color-warning-subtle:#422006;--le-color-on-warning:#0f172a;--le-color-error:#f87171;--le-color-error-subtle:#450a0a;--le-color-on-error:#0f172a;--le-color-info:#22d3ee;--le-color-info-subtle:#164e63;--le-color-on-info:#0f172a;--le-color-background:#0f172a;--le-color-surface:#1e293b;--le-color-surface-raised:#334155;--le-color-surface-overlay:rgba(0, 0, 0, 0.7);--le-color-text:#f1f5f9;--le-color-text-secondary:#94a3b8;--le-color-text-muted:#64748b;--le-color-text-inverse:#0f172a;--le-color-border:#334155;--le-color-border-strong:#475569;--le-color-border-focus:var(--le-color-primary);--le-shadow-sm:0 1px 2px 0 rgba(0, 0, 0, 0.3);--le-shadow-md:0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);--le-shadow-lg:0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);--le-shadow-xl:0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);--le-shadow-focus:0 0 0 3px rgba(96, 165, 250, 0.4)}[theme=\"gradient\"]{--le-color-primary:#8b5cf6;--le-color-primary-hover:#a78bfa;--le-color-primary-active:#7c3aed;--le-color-primary-subtle:#f5f3ff;--le-color-on-primary:#ffffff;--le-color-secondary:#ec4899;--le-color-secondary-hover:#f472b6;--le-color-secondary-active:#db2777;--le-color-secondary-subtle:#fdf2f8;--le-color-on-secondary:#ffffff;--le-color-success:#10b981;--le-color-success-subtle:#ecfdf5;--le-color-on-success:#ffffff;--le-color-warning:#f59e0b;--le-color-warning-subtle:#fffbeb;--le-color-on-warning:#000000;--le-color-error:#f43f5e;--le-color-error-subtle:#fff1f2;--le-color-on-error:#ffffff;--le-color-info:#06b6d4;--le-color-info-subtle:#ecfeff;--le-color-on-info:#ffffff;--le-color-background:linear-gradient(135deg, #faf5ff 0%, #fdf2f8 50%, #fff7ed 100%);--le-color-surface:rgba(255, 255, 255, 0.9);--le-color-surface-raised:#ffffff;--le-color-surface-overlay:rgba(139, 92, 246, 0.3);--le-color-text:#1f2937;--le-color-text-secondary:#6b7280;--le-color-text-muted:#9ca3af;--le-color-text-inverse:#ffffff;--le-color-border:rgba(139, 92, 246, 0.2);--le-color-border-strong:rgba(139, 92, 246, 0.4);--le-color-border-focus:var(--le-color-primary);--le-radius-sm:6px;--le-radius-md:12px;--le-radius-lg:16px;--le-radius-xl:20px;--le-radius-2xl:28px;--le-shadow-sm:0 1px 3px 0 rgba(139, 92, 246, 0.1);--le-shadow-md:0 4px 6px -1px rgba(139, 92, 246, 0.15), 0 2px 4px -2px rgba(236, 72, 153, 0.1);--le-shadow-lg:0 10px 15px -3px rgba(139, 92, 246, 0.2), 0 4px 6px -4px rgba(236, 72, 153, 0.15);--le-shadow-xl:0 20px 25px -5px rgba(139, 92, 246, 0.25), 0 8px 10px -6px rgba(236, 72, 153, 0.2);--le-shadow-focus:0 0 0 3px rgba(139, 92, 246, 0.4)}[theme=\"minimal\"]{--le-color-primary:#374151;--le-color-primary-hover:#1f2937;--le-color-primary-active:#111827;--le-color-primary-subtle:#f3f4f6;--le-color-on-primary:#ffffff;--le-color-secondary:#9ca3af;--le-color-secondary-hover:#6b7280;--le-color-secondary-active:#4b5563;--le-color-secondary-subtle:#f9fafb;--le-color-on-secondary:#ffffff;--le-color-success:#059669;--le-color-success-subtle:#f0fdf4;--le-color-on-success:#ffffff;--le-color-warning:#d97706;--le-color-warning-subtle:#fffbeb;--le-color-on-warning:#ffffff;--le-color-error:#dc2626;--le-color-error-subtle:#fef2f2;--le-color-on-error:#ffffff;--le-color-info:#0891b2;--le-color-info-subtle:#ecfeff;--le-color-on-info:#ffffff;--le-color-background:#fafafa;--le-color-surface:#ffffff;--le-color-surface-raised:#ffffff;--le-color-surface-overlay:rgba(0, 0, 0, 0.4);--le-color-text:#111827;--le-color-text-secondary:#6b7280;--le-color-text-muted:#9ca3af;--le-color-text-inverse:#ffffff;--le-color-border:#e5e7eb;--le-color-border-strong:#d1d5db;--le-color-border-focus:var(--le-color-primary);--le-radius-none:0;--le-radius-sm:2px;--le-radius-md:4px;--le-radius-lg:6px;--le-radius-xl:8px;--le-radius-2xl:12px;--le-radius-full:9999px;--le-shadow-sm:0 1px 2px 0 rgba(0, 0, 0, 0.03);--le-shadow-md:0 2px 4px -1px rgba(0, 0, 0, 0.06);--le-shadow-lg:0 4px 8px -2px rgba(0, 0, 0, 0.08);--le-shadow-xl:0 8px 16px -4px rgba(0, 0, 0, 0.1);--le-shadow-focus:0 0 0 2px rgba(55, 65, 81, 0.2)}[theme=\"warm\"]{--le-color-primary:#ea580c;--le-color-primary-hover:#f97316;--le-color-primary-active:#c2410c;--le-color-primary-subtle:#fff7ed;--le-color-on-primary:#ffffff;--le-color-secondary:#78716c;--le-color-secondary-hover:#57534e;--le-color-secondary-active:#44403c;--le-color-secondary-subtle:#fafaf9;--le-color-on-secondary:#ffffff;--le-color-success:#65a30d;--le-color-success-subtle:#f7fee7;--le-color-on-success:#ffffff;--le-color-warning:#d97706;--le-color-warning-subtle:#fffbeb;--le-color-on-warning:#000000;--le-color-error:#dc2626;--le-color-error-subtle:#fef2f2;--le-color-on-error:#ffffff;--le-color-info:#0891b2;--le-color-info-subtle:#ecfeff;--le-color-on-info:#ffffff;--le-color-background:#fffbf5;--le-color-surface:#ffffff;--le-color-surface-raised:#ffffff;--le-color-surface-overlay:rgba(120, 53, 15, 0.4);--le-color-text:#292524;--le-color-text-secondary:#78716c;--le-color-text-muted:#a8a29e;--le-color-text-inverse:#ffffff;--le-color-border:#e7e5e4;--le-color-border-strong:#d6d3d1;--le-color-border-focus:var(--le-color-primary);--le-radius-sm:4px;--le-radius-md:8px;--le-radius-lg:12px;--le-radius-xl:16px;--le-radius-2xl:24px;--le-shadow-sm:0 1px 2px 0 rgba(120, 53, 15, 0.05);--le-shadow-md:0 4px 6px -1px rgba(120, 53, 15, 0.1), 0 2px 4px -2px rgba(120, 53, 15, 0.08);--le-shadow-lg:0 10px 15px -3px rgba(120, 53, 15, 0.12), 0 4px 6px -4px rgba(120, 53, 15, 0.1);--le-shadow-xl:0 20px 25px -5px rgba(120, 53, 15, 0.15), 0 8px 10px -6px rgba(120, 53, 15, 0.12);--le-shadow-focus:0 0 0 3px rgba(234, 88, 12, 0.3)}";
149
-
150
- /*
151
- Stencil Client Platform v4.38.3 | MIT Licensed | https://stenciljs.com
152
- */
153
- var __defProp = Object.defineProperty;
154
- var __export = (target, all) => {
155
- for (var name in all)
156
- __defProp(target, name, { get: all[name], enumerable: true });
157
- };
158
-
159
- // src/utils/constants.ts
160
- var SVG_NS = "http://www.w3.org/2000/svg";
161
- var HTML_NS = "http://www.w3.org/1999/xhtml";
162
- var reWireGetterSetter = (instance, hostRef) => {
163
- var _a;
164
- const cmpMeta = hostRef.$cmpMeta$;
165
- const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
166
- members.map(([memberName, [memberFlags]]) => {
167
- if ((memberFlags & 31 /* Prop */ || memberFlags & 32 /* State */)) {
168
- const ogValue = instance[memberName];
169
- const ogDescriptor = getPropertyDescriptor(Object.getPrototypeOf(instance), memberName) || Object.getOwnPropertyDescriptor(instance, memberName);
170
- if (ogDescriptor) {
171
- Object.defineProperty(instance, memberName, {
172
- get() {
173
- return ogDescriptor.get.call(this);
174
- },
175
- set(newValue) {
176
- ogDescriptor.set.call(this, newValue);
177
- },
178
- configurable: true,
179
- enumerable: true
180
- });
181
- }
182
- instance[memberName] = hostRef.$instanceValues$.has(memberName) ? hostRef.$instanceValues$.get(memberName) : ogValue;
183
- }
184
- });
185
- };
186
- function getPropertyDescriptor(obj, memberName) {
187
- while (obj) {
188
- const desc = Object.getOwnPropertyDescriptor(obj, memberName);
189
- if (desc == null ? void 0 : desc.get) return desc;
190
- obj = Object.getPrototypeOf(obj);
191
- }
192
- return void 0;
193
- }
194
-
195
- // src/client/client-host-ref.ts
196
- var getHostRef = (ref) => {
197
- if (ref.__stencil__getHostRef) {
198
- return ref.__stencil__getHostRef();
199
- }
200
- return void 0;
201
- };
202
- var registerInstance = (lazyInstance, hostRef) => {
203
- if (!hostRef) return;
204
- lazyInstance.__stencil__getHostRef = () => hostRef;
205
- hostRef.$lazyInstance$ = lazyInstance;
206
- if (hostRef.$cmpMeta$.$flags$ & 512 /* hasModernPropertyDecls */ && (BUILD.state)) {
207
- reWireGetterSetter(lazyInstance, hostRef);
208
- }
209
- };
210
- var registerHost = (hostElement, cmpMeta) => {
211
- const hostRef = {
212
- $flags$: 0,
213
- $hostElement$: hostElement,
214
- $cmpMeta$: cmpMeta,
215
- $instanceValues$: /* @__PURE__ */ new Map(),
216
- $serializerValues$: /* @__PURE__ */ new Map()
217
- };
218
- {
219
- hostRef.$onInstancePromise$ = new Promise((r) => hostRef.$onInstanceResolve$ = r);
220
- }
221
- {
222
- hostRef.$onReadyPromise$ = new Promise((r) => hostRef.$onReadyResolve$ = r);
223
- hostElement["s-p"] = [];
224
- hostElement["s-rc"] = [];
225
- }
226
- {
227
- hostRef.$fetchedCbList$ = [];
228
- }
229
- const ref = hostRef;
230
- hostElement.__stencil__getHostRef = () => ref;
231
- return ref;
232
- };
233
- var isMemberInElement = (elm, memberName) => memberName in elm;
234
- var consoleError = (e, el) => (0, console.error)(e, el);
235
-
236
- // src/client/client-load-module.ts
237
- var cmpModules = /* @__PURE__ */ new Map();
238
- var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
239
- const exportName = cmpMeta.$tagName$.replace(/-/g, "_");
240
- const bundleId = cmpMeta.$lazyBundleId$;
241
- if (!bundleId) {
242
- return void 0;
243
- }
244
- const module = cmpModules.get(bundleId) ;
245
- if (module) {
246
- return module[exportName];
247
- }
248
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/
249
- return import(
250
- /* @vite-ignore */
251
- /* webpackInclude: /\.entry\.js$/ */
252
- /* webpackExclude: /\.system\.entry\.js$/ */
253
- /* webpackMode: "lazy" */
254
- `./${bundleId}.entry.js${""}`
255
- ).then(
256
- (importedModule) => {
257
- {
258
- cmpModules.set(bundleId, importedModule);
259
- }
260
- return importedModule[exportName];
261
- },
262
- (e) => {
263
- consoleError(e, hostRef.$hostElement$);
264
- }
265
- );
266
- };
267
-
268
- // src/client/client-style.ts
269
- var styles = /* @__PURE__ */ new Map();
270
- var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
271
- var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
272
- var XLINK_NS = "http://www.w3.org/1999/xlink";
273
- var win = typeof window !== "undefined" ? window : {};
274
- var plt = {
275
- $flags$: 0,
276
- $resourcesUrl$: "",
277
- jmp: (h2) => h2(),
278
- raf: (h2) => requestAnimationFrame(h2),
279
- ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
280
- rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
281
- ce: (eventName, opts) => new CustomEvent(eventName, opts)
282
- };
283
- var supportsListenerOptions = /* @__PURE__ */ (() => {
284
- var _a;
285
- let supportsListenerOptions2 = false;
286
- try {
287
- (_a = win.document) == null ? void 0 : _a.addEventListener(
288
- "e",
289
- null,
290
- Object.defineProperty({}, "passive", {
291
- get() {
292
- supportsListenerOptions2 = true;
293
- }
294
- })
295
- );
296
- } catch (e) {
297
- }
298
- return supportsListenerOptions2;
299
- })();
300
- var promiseResolve = (v) => Promise.resolve(v);
301
- var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
302
- try {
303
- new CSSStyleSheet();
304
- return typeof new CSSStyleSheet().replaceSync === "function";
305
- } catch (e) {
306
- }
307
- return false;
308
- })() ;
309
- var supportsMutableAdoptedStyleSheets = supportsConstructableStylesheets ? /* @__PURE__ */ (() => !!win.document && Object.getOwnPropertyDescriptor(win.document.adoptedStyleSheets, "length").writable)() : false;
310
- var queuePending = false;
311
- var queueDomReads = [];
312
- var queueDomWrites = [];
313
- var queueTask = (queue, write) => (cb) => {
314
- queue.push(cb);
315
- if (!queuePending) {
316
- queuePending = true;
317
- if (write && plt.$flags$ & 4 /* queueSync */) {
318
- nextTick(flush);
319
- } else {
320
- plt.raf(flush);
321
- }
322
- }
323
- };
324
- var consume = (queue) => {
325
- for (let i2 = 0; i2 < queue.length; i2++) {
326
- try {
327
- queue[i2](performance.now());
328
- } catch (e) {
329
- consoleError(e);
330
- }
331
- }
332
- queue.length = 0;
333
- };
334
- var flush = () => {
335
- consume(queueDomReads);
336
- {
337
- consume(queueDomWrites);
338
- if (queuePending = queueDomReads.length > 0) {
339
- plt.raf(flush);
340
- }
341
- }
342
- };
343
- var nextTick = (cb) => promiseResolve().then(cb);
344
- var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
345
-
346
- // src/runtime/asset-path.ts
347
- var getAssetPath = (path) => {
348
- const assetUrl = new URL(path, plt.$resourcesUrl$);
349
- return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
350
- };
351
- var isComplexType = (o) => {
352
- o = typeof o;
353
- return o === "object" || o === "function";
354
- };
355
-
356
- // src/utils/query-nonce-meta-tag-content.ts
357
- function queryNonceMetaTagContent(doc) {
358
- var _a, _b, _c;
359
- 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;
360
- }
361
-
362
- // src/utils/regular-expression.ts
363
- var escapeRegExpSpecialCharacters = (text) => {
364
- return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
365
- };
366
-
367
- // src/utils/result.ts
368
- var result_exports = {};
369
- __export(result_exports, {
370
- err: () => err,
371
- map: () => map,
372
- ok: () => ok,
373
- unwrap: () => unwrap,
374
- unwrapErr: () => unwrapErr
375
- });
376
- var ok = (value) => ({
377
- isOk: true,
378
- isErr: false,
379
- value
380
- });
381
- var err = (value) => ({
382
- isOk: false,
383
- isErr: true,
384
- value
385
- });
386
- function map(result, fn) {
387
- if (result.isOk) {
388
- const val = fn(result.value);
389
- if (val instanceof Promise) {
390
- return val.then((newVal) => ok(newVal));
391
- } else {
392
- return ok(val);
393
- }
394
- }
395
- if (result.isErr) {
396
- const value = result.value;
397
- return err(value);
398
- }
399
- throw "should never get here";
400
- }
401
- var unwrap = (result) => {
402
- if (result.isOk) {
403
- return result.value;
404
- } else {
405
- throw result.value;
406
- }
407
- };
408
- var unwrapErr = (result) => {
409
- if (result.isErr) {
410
- return result.value;
411
- } else {
412
- throw result.value;
413
- }
414
- };
415
-
416
- // src/utils/style.ts
417
- function createStyleSheetIfNeededAndSupported(styles2) {
418
- if (!supportsConstructableStylesheets) return void 0;
419
- const sheet = new CSSStyleSheet();
420
- sheet.replaceSync(styles2);
421
- return sheet;
422
- }
423
-
424
- // src/utils/shadow-root.ts
425
- var globalStyleSheet;
426
- function createShadowRoot(cmpMeta) {
427
- var _a;
428
- const shadowRoot = this.attachShadow({ mode: "open" });
429
- if (globalStyleSheet === void 0) globalStyleSheet = (_a = createStyleSheetIfNeededAndSupported(globalStyles)) != null ? _a : null;
430
- if (globalStyleSheet) {
431
- if (supportsMutableAdoptedStyleSheets) {
432
- shadowRoot.adoptedStyleSheets.push(globalStyleSheet);
433
- } else {
434
- shadowRoot.adoptedStyleSheets = [...shadowRoot.adoptedStyleSheets, globalStyleSheet];
435
- }
436
- }
437
- }
438
- var createTime = (fnName, tagName = "") => {
439
- {
440
- return () => {
441
- return;
442
- };
443
- }
444
- };
445
- var uniqueTime = (key, measureText) => {
446
- {
447
- return () => {
448
- return;
449
- };
450
- }
451
- };
452
- var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
453
- var registerStyle = (scopeId2, cssText, allowCS) => {
454
- let style = styles.get(scopeId2);
455
- if (supportsConstructableStylesheets && allowCS) {
456
- style = style || new CSSStyleSheet();
457
- if (typeof style === "string") {
458
- style = cssText;
459
- } else {
460
- style.replaceSync(cssText);
461
- }
462
- } else {
463
- style = cssText;
464
- }
465
- styles.set(scopeId2, style);
466
- };
467
- var addStyle = (styleContainerNode, cmpMeta, mode) => {
468
- var _a;
469
- const scopeId2 = getScopeId(cmpMeta);
470
- const style = styles.get(scopeId2);
471
- if (!win.document) {
472
- return scopeId2;
473
- }
474
- styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
475
- if (style) {
476
- if (typeof style === "string") {
477
- styleContainerNode = styleContainerNode.head || styleContainerNode;
478
- let appliedStyles = rootAppliedStyles.get(styleContainerNode);
479
- let styleElm;
480
- if (!appliedStyles) {
481
- rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
482
- }
483
- if (!appliedStyles.has(scopeId2)) {
484
- {
485
- styleElm = win.document.createElement("style");
486
- styleElm.innerHTML = style;
487
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
488
- if (nonce != null) {
489
- styleElm.setAttribute("nonce", nonce);
490
- }
491
- if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
492
- if (styleContainerNode.nodeName === "HEAD") {
493
- const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
494
- const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
495
- styleContainerNode.insertBefore(
496
- styleElm,
497
- (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
498
- );
499
- } else if ("host" in styleContainerNode) {
500
- if (supportsConstructableStylesheets) {
501
- const stylesheet = new CSSStyleSheet();
502
- stylesheet.replaceSync(style);
503
- if (supportsMutableAdoptedStyleSheets) {
504
- styleContainerNode.adoptedStyleSheets.unshift(stylesheet);
505
- } else {
506
- styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
507
- }
508
- } else {
509
- const existingStyleContainer = styleContainerNode.querySelector("style");
510
- if (existingStyleContainer) {
511
- existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
512
- } else {
513
- styleContainerNode.prepend(styleElm);
514
- }
515
- }
516
- } else {
517
- styleContainerNode.append(styleElm);
518
- }
519
- }
520
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
521
- styleContainerNode.insertBefore(styleElm, null);
522
- }
523
- }
524
- if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
525
- styleElm.innerHTML += SLOT_FB_CSS;
526
- }
527
- if (appliedStyles) {
528
- appliedStyles.add(scopeId2);
529
- }
530
- }
531
- } else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
532
- if (supportsMutableAdoptedStyleSheets) {
533
- styleContainerNode.adoptedStyleSheets.push(style);
534
- } else {
535
- styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
536
- }
537
- }
538
- }
539
- return scopeId2;
540
- };
541
- var attachStyles = (hostRef) => {
542
- const cmpMeta = hostRef.$cmpMeta$;
543
- const elm = hostRef.$hostElement$;
544
- const flags = cmpMeta.$flags$;
545
- const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
546
- const scopeId2 = addStyle(
547
- elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
548
- cmpMeta);
549
- if (flags & 10 /* needsScopedEncapsulation */) {
550
- elm["s-sc"] = scopeId2;
551
- elm.classList.add(scopeId2 + "-h");
552
- }
553
- endAttachStyles();
554
- };
555
- var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
556
- var h = (nodeName, vnodeData, ...children) => {
557
- let child = null;
558
- let key = null;
559
- let simple = false;
560
- let lastSimple = false;
561
- const vNodeChildren = [];
562
- const walk = (c) => {
563
- for (let i2 = 0; i2 < c.length; i2++) {
564
- child = c[i2];
565
- if (Array.isArray(child)) {
566
- walk(child);
567
- } else if (child != null && typeof child !== "boolean") {
568
- if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
569
- child = String(child);
570
- }
571
- if (simple && lastSimple) {
572
- vNodeChildren[vNodeChildren.length - 1].$text$ += child;
573
- } else {
574
- vNodeChildren.push(simple ? newVNode(null, child) : child);
575
- }
576
- lastSimple = simple;
577
- }
578
- }
579
- };
580
- walk(children);
581
- if (vnodeData) {
582
- if (vnodeData.key) {
583
- key = vnodeData.key;
584
- }
585
- {
586
- const classData = vnodeData.className || vnodeData.class;
587
- if (classData) {
588
- vnodeData.class = typeof classData !== "object" ? classData : Object.keys(classData).filter((k) => classData[k]).join(" ");
589
- }
590
- }
591
- }
592
- if (typeof nodeName === "function") {
593
- return nodeName(
594
- vnodeData === null ? {} : vnodeData,
595
- vNodeChildren,
596
- vdomFnUtils
597
- );
598
- }
599
- const vnode = newVNode(nodeName, null);
600
- vnode.$attrs$ = vnodeData;
601
- if (vNodeChildren.length > 0) {
602
- vnode.$children$ = vNodeChildren;
603
- }
604
- {
605
- vnode.$key$ = key;
606
- }
607
- return vnode;
608
- };
609
- var newVNode = (tag, text) => {
610
- const vnode = {
611
- $flags$: 0,
612
- $tag$: tag,
613
- $text$: text,
614
- $elm$: null,
615
- $children$: null
616
- };
617
- {
618
- vnode.$attrs$ = null;
619
- }
620
- {
621
- vnode.$key$ = null;
622
- }
623
- return vnode;
624
- };
625
- var Host = {};
626
- var isHost = (node) => node && node.$tag$ === Host;
627
- var vdomFnUtils = {
628
- forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
629
- map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate)
630
- };
631
- var convertToPublic = (node) => ({
632
- vattrs: node.$attrs$,
633
- vchildren: node.$children$,
634
- vkey: node.$key$,
635
- vname: node.$name$,
636
- vtag: node.$tag$,
637
- vtext: node.$text$
638
- });
639
- var convertToPrivate = (node) => {
640
- if (typeof node.vtag === "function") {
641
- const vnodeData = { ...node.vattrs };
642
- if (node.vkey) {
643
- vnodeData.key = node.vkey;
644
- }
645
- if (node.vname) {
646
- vnodeData.name = node.vname;
647
- }
648
- return h(node.vtag, vnodeData, ...node.vchildren || []);
649
- }
650
- const vnode = newVNode(node.vtag, node.vtext);
651
- vnode.$attrs$ = node.vattrs;
652
- vnode.$children$ = node.vchildren;
653
- vnode.$key$ = node.vkey;
654
- vnode.$name$ = node.vname;
655
- return vnode;
656
- };
657
- var createSupportsRuleRe = (selector) => {
658
- const safeSelector2 = escapeRegExpSpecialCharacters(selector);
659
- return new RegExp(
660
- // First capture group: match any context before the selector that's not inside @supports selector()
661
- // Using negative lookahead to avoid matching inside @supports selector(...) condition
662
- `(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${safeSelector2}))(${safeSelector2}\\b)`,
663
- "g"
664
- );
665
- };
666
- createSupportsRuleRe("::slotted");
667
- createSupportsRuleRe(":host");
668
- createSupportsRuleRe(":host-context");
669
- var parsePropertyValue = (propValue, propType, isFormAssociated) => {
670
- if (propValue != null && !isComplexType(propValue)) {
671
- if (propType & 4 /* Boolean */) {
672
- {
673
- return propValue === "false" ? false : propValue === "" || !!propValue;
674
- }
675
- }
676
- if (propType & 2 /* Number */) {
677
- return typeof propValue === "string" ? parseFloat(propValue) : typeof propValue === "number" ? propValue : NaN;
678
- }
679
- if (propType & 1 /* String */) {
680
- return String(propValue);
681
- }
682
- return propValue;
683
- }
684
- return propValue;
685
- };
686
- var getElement = (ref) => {
687
- var _a;
688
- return (_a = getHostRef(ref)) == null ? void 0 : _a.$hostElement$ ;
689
- };
690
-
691
- // src/runtime/event-emitter.ts
692
- var createEvent = (ref, name, flags) => {
693
- const elm = getElement(ref);
694
- return {
695
- emit: (detail) => {
696
- return emitEvent(elm, name, {
697
- bubbles: true,
698
- composed: true,
699
- cancelable: true,
700
- detail
701
- });
702
- }
703
- };
704
- };
705
- var emitEvent = (elm, name, opts) => {
706
- const ev = plt.ce(name, opts);
707
- elm.dispatchEvent(ev);
708
- return ev;
709
- };
710
- var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
711
- if (oldValue === newValue) {
712
- return;
713
- }
714
- let isProp = isMemberInElement(elm, memberName);
715
- let ln = memberName.toLowerCase();
716
- if (memberName === "class") {
717
- const classList = elm.classList;
718
- const oldClasses = parseClassList(oldValue);
719
- let newClasses = parseClassList(newValue);
720
- {
721
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
722
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
723
- }
724
- } else if (memberName === "style") {
725
- {
726
- for (const prop in oldValue) {
727
- if (!newValue || newValue[prop] == null) {
728
- if (prop.includes("-")) {
729
- elm.style.removeProperty(prop);
730
- } else {
731
- elm.style[prop] = "";
732
- }
733
- }
734
- }
735
- }
736
- for (const prop in newValue) {
737
- if (!oldValue || newValue[prop] !== oldValue[prop]) {
738
- if (prop.includes("-")) {
739
- elm.style.setProperty(prop, newValue[prop]);
740
- } else {
741
- elm.style[prop] = newValue[prop];
742
- }
743
- }
744
- }
745
- } else if (memberName === "key") ; else if (memberName === "ref") {
746
- if (newValue) {
747
- newValue(elm);
748
- }
749
- } else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
750
- if (memberName[2] === "-") {
751
- memberName = memberName.slice(3);
752
- } else if (isMemberInElement(win, ln)) {
753
- memberName = ln.slice(2);
754
- } else {
755
- memberName = ln[2] + memberName.slice(3);
756
- }
757
- if (oldValue || newValue) {
758
- const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
759
- memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
760
- if (oldValue) {
761
- plt.rel(elm, memberName, oldValue, capture);
762
- }
763
- if (newValue) {
764
- plt.ael(elm, memberName, newValue, capture);
765
- }
766
- }
767
- } else {
768
- const isComplex = isComplexType(newValue);
769
- if ((isProp || isComplex && newValue !== null) && !isSvg) {
770
- try {
771
- if (!elm.tagName.includes("-")) {
772
- const n = newValue == null ? "" : newValue;
773
- if (memberName === "list") {
774
- isProp = false;
775
- } else if (oldValue == null || elm[memberName] != n) {
776
- if (typeof elm.__lookupSetter__(memberName) === "function") {
777
- elm[memberName] = n;
778
- } else {
779
- elm.setAttribute(memberName, n);
780
- }
781
- }
782
- } else if (elm[memberName] !== newValue) {
783
- elm[memberName] = newValue;
784
- }
785
- } catch (e) {
786
- }
787
- }
788
- let xlink = false;
789
- {
790
- if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
791
- memberName = ln;
792
- xlink = true;
793
- }
794
- }
795
- if (newValue == null || newValue === false) {
796
- if (newValue !== false || elm.getAttribute(memberName) === "") {
797
- if (xlink) {
798
- elm.removeAttributeNS(XLINK_NS, memberName);
799
- } else {
800
- elm.removeAttribute(memberName);
801
- }
802
- }
803
- } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {
804
- newValue = newValue === true ? "" : newValue;
805
- if (xlink) {
806
- elm.setAttributeNS(XLINK_NS, memberName, newValue);
807
- } else {
808
- elm.setAttribute(memberName, newValue);
809
- }
810
- }
811
- }
812
- };
813
- var parseClassListRegex = /\s/;
814
- var parseClassList = (value) => {
815
- if (typeof value === "object" && value && "baseVal" in value) {
816
- value = value.baseVal;
817
- }
818
- if (!value || typeof value !== "string") {
819
- return [];
820
- }
821
- return value.split(parseClassListRegex);
822
- };
823
- var CAPTURE_EVENT_SUFFIX = "Capture";
824
- var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
825
-
826
- // src/runtime/vdom/update-element.ts
827
- var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
828
- const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
829
- const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
830
- const newVnodeAttrs = newVnode.$attrs$ || {};
831
- {
832
- for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
833
- if (!(memberName in newVnodeAttrs)) {
834
- setAccessor(
835
- elm,
836
- memberName,
837
- oldVnodeAttrs[memberName],
838
- void 0,
839
- isSvgMode2,
840
- newVnode.$flags$);
841
- }
842
- }
843
- }
844
- for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
845
- setAccessor(
846
- elm,
847
- memberName,
848
- oldVnodeAttrs[memberName],
849
- newVnodeAttrs[memberName],
850
- isSvgMode2,
851
- newVnode.$flags$);
852
- }
853
- };
854
- function sortedAttrNames(attrNames) {
855
- return attrNames.includes("ref") ? (
856
- // we need to sort these to ensure that `'ref'` is the last attr
857
- [...attrNames.filter((attr) => attr !== "ref"), "ref"]
858
- ) : (
859
- // no need to sort, return the original array
860
- attrNames
861
- );
862
- }
863
- var hostTagName;
864
- var isSvgMode = false;
865
- var createElm = (oldParentVNode, newParentVNode, childIndex) => {
866
- const newVNode2 = newParentVNode.$children$[childIndex];
867
- let i2 = 0;
868
- let elm;
869
- let childNode;
870
- if (newVNode2.$text$ !== null) {
871
- elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
872
- } else {
873
- if (!isSvgMode) {
874
- isSvgMode = newVNode2.$tag$ === "svg";
875
- }
876
- if (!win.document) {
877
- throw new Error(
878
- "You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component."
879
- );
880
- }
881
- elm = newVNode2.$elm$ = win.document.createElementNS(
882
- isSvgMode ? SVG_NS : HTML_NS,
883
- newVNode2.$tag$
884
- ) ;
885
- if (isSvgMode && newVNode2.$tag$ === "foreignObject") {
886
- isSvgMode = false;
887
- }
888
- {
889
- updateElement(null, newVNode2, isSvgMode);
890
- }
891
- if (newVNode2.$children$) {
892
- for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
893
- childNode = createElm(oldParentVNode, newVNode2, i2);
894
- if (childNode) {
895
- elm.appendChild(childNode);
896
- }
897
- }
898
- }
899
- {
900
- if (newVNode2.$tag$ === "svg") {
901
- isSvgMode = false;
902
- } else if (elm.tagName === "foreignObject") {
903
- isSvgMode = true;
904
- }
905
- }
906
- }
907
- elm["s-hn"] = hostTagName;
908
- return elm;
909
- };
910
- var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
911
- let containerElm = parentElm;
912
- let childNode;
913
- if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
914
- containerElm = containerElm.shadowRoot;
915
- }
916
- for (; startIdx <= endIdx; ++startIdx) {
917
- if (vnodes[startIdx]) {
918
- childNode = createElm(null, parentVNode, startIdx);
919
- if (childNode) {
920
- vnodes[startIdx].$elm$ = childNode;
921
- insertBefore(containerElm, childNode, before);
922
- }
923
- }
924
- }
925
- };
926
- var removeVnodes = (vnodes, startIdx, endIdx) => {
927
- for (let index = startIdx; index <= endIdx; ++index) {
928
- const vnode = vnodes[index];
929
- if (vnode) {
930
- const elm = vnode.$elm$;
931
- nullifyVNodeRefs(vnode);
932
- if (elm) {
933
- elm.remove();
934
- }
935
- }
936
- }
937
- };
938
- var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = false) => {
939
- let oldStartIdx = 0;
940
- let newStartIdx = 0;
941
- let idxInOld = 0;
942
- let i2 = 0;
943
- let oldEndIdx = oldCh.length - 1;
944
- let oldStartVnode = oldCh[0];
945
- let oldEndVnode = oldCh[oldEndIdx];
946
- let newEndIdx = newCh.length - 1;
947
- let newStartVnode = newCh[0];
948
- let newEndVnode = newCh[newEndIdx];
949
- let node;
950
- let elmToMove;
951
- while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
952
- if (oldStartVnode == null) {
953
- oldStartVnode = oldCh[++oldStartIdx];
954
- } else if (oldEndVnode == null) {
955
- oldEndVnode = oldCh[--oldEndIdx];
956
- } else if (newStartVnode == null) {
957
- newStartVnode = newCh[++newStartIdx];
958
- } else if (newEndVnode == null) {
959
- newEndVnode = newCh[--newEndIdx];
960
- } else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {
961
- patch(oldStartVnode, newStartVnode, isInitialRender);
962
- oldStartVnode = oldCh[++oldStartIdx];
963
- newStartVnode = newCh[++newStartIdx];
964
- } else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {
965
- patch(oldEndVnode, newEndVnode, isInitialRender);
966
- oldEndVnode = oldCh[--oldEndIdx];
967
- newEndVnode = newCh[--newEndIdx];
968
- } else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
969
- patch(oldStartVnode, newEndVnode, isInitialRender);
970
- insertBefore(parentElm, oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
971
- oldStartVnode = oldCh[++oldStartIdx];
972
- newEndVnode = newCh[--newEndIdx];
973
- } else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
974
- patch(oldEndVnode, newStartVnode, isInitialRender);
975
- insertBefore(parentElm, oldEndVnode.$elm$, oldStartVnode.$elm$);
976
- oldEndVnode = oldCh[--oldEndIdx];
977
- newStartVnode = newCh[++newStartIdx];
978
- } else {
979
- idxInOld = -1;
980
- {
981
- for (i2 = oldStartIdx; i2 <= oldEndIdx; ++i2) {
982
- if (oldCh[i2] && oldCh[i2].$key$ !== null && oldCh[i2].$key$ === newStartVnode.$key$) {
983
- idxInOld = i2;
984
- break;
985
- }
986
- }
987
- }
988
- if (idxInOld >= 0) {
989
- elmToMove = oldCh[idxInOld];
990
- if (elmToMove.$tag$ !== newStartVnode.$tag$) {
991
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
992
- } else {
993
- patch(elmToMove, newStartVnode, isInitialRender);
994
- oldCh[idxInOld] = void 0;
995
- node = elmToMove.$elm$;
996
- }
997
- newStartVnode = newCh[++newStartIdx];
998
- } else {
999
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
1000
- newStartVnode = newCh[++newStartIdx];
1001
- }
1002
- if (node) {
1003
- {
1004
- insertBefore(oldStartVnode.$elm$.parentNode, node, oldStartVnode.$elm$);
1005
- }
1006
- }
1007
- }
1008
- }
1009
- if (oldStartIdx > oldEndIdx) {
1010
- addVnodes(
1011
- parentElm,
1012
- newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$,
1013
- newVNode2,
1014
- newCh,
1015
- newStartIdx,
1016
- newEndIdx
1017
- );
1018
- } else if (newStartIdx > newEndIdx) {
1019
- removeVnodes(oldCh, oldStartIdx, oldEndIdx);
1020
- }
1021
- };
1022
- var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
1023
- if (leftVNode.$tag$ === rightVNode.$tag$) {
1024
- if (!isInitialRender) {
1025
- return leftVNode.$key$ === rightVNode.$key$;
1026
- }
1027
- if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
1028
- leftVNode.$key$ = rightVNode.$key$;
1029
- }
1030
- return true;
1031
- }
1032
- return false;
1033
- };
1034
- var patch = (oldVNode, newVNode2, isInitialRender = false) => {
1035
- const elm = newVNode2.$elm$ = oldVNode.$elm$;
1036
- const oldChildren = oldVNode.$children$;
1037
- const newChildren = newVNode2.$children$;
1038
- const tag = newVNode2.$tag$;
1039
- const text = newVNode2.$text$;
1040
- if (text === null) {
1041
- {
1042
- isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
1043
- }
1044
- {
1045
- updateElement(oldVNode, newVNode2, isSvgMode);
1046
- }
1047
- if (oldChildren !== null && newChildren !== null) {
1048
- updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
1049
- } else if (newChildren !== null) {
1050
- if (oldVNode.$text$ !== null) {
1051
- elm.textContent = "";
1052
- }
1053
- addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
1054
- } else if (
1055
- // don't do this on initial render as it can cause non-hydrated content to be removed
1056
- !isInitialRender && BUILD.updatable && oldChildren !== null
1057
- ) {
1058
- removeVnodes(oldChildren, 0, oldChildren.length - 1);
1059
- } else ;
1060
- if (isSvgMode && tag === "svg") {
1061
- isSvgMode = false;
1062
- }
1063
- } else if (oldVNode.$text$ !== text) {
1064
- elm.data = text;
1065
- }
1066
- };
1067
- var nullifyVNodeRefs = (vNode) => {
1068
- {
1069
- vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
1070
- vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
1071
- }
1072
- };
1073
- var insertBefore = (parent, newNode, reference) => {
1074
- {
1075
- return parent == null ? void 0 : parent.insertBefore(newNode, reference);
1076
- }
1077
- };
1078
- var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1079
- const hostElm = hostRef.$hostElement$;
1080
- const cmpMeta = hostRef.$cmpMeta$;
1081
- const oldVNode = hostRef.$vnode$ || newVNode(null, null);
1082
- const isHostElement = isHost(renderFnResults);
1083
- const rootVnode = isHostElement ? renderFnResults : h(null, null, renderFnResults);
1084
- hostTagName = hostElm.tagName;
1085
- if (cmpMeta.$attrsToReflect$) {
1086
- rootVnode.$attrs$ = rootVnode.$attrs$ || {};
1087
- cmpMeta.$attrsToReflect$.forEach(([propName, attribute]) => {
1088
- {
1089
- rootVnode.$attrs$[attribute] = hostElm[propName];
1090
- }
1091
- });
1092
- }
1093
- if (isInitialLoad && rootVnode.$attrs$) {
1094
- for (const key of Object.keys(rootVnode.$attrs$)) {
1095
- if (hostElm.hasAttribute(key) && !["key", "ref", "style", "class"].includes(key)) {
1096
- rootVnode.$attrs$[key] = hostElm[key];
1097
- }
1098
- }
1099
- }
1100
- rootVnode.$tag$ = null;
1101
- rootVnode.$flags$ |= 4 /* isHost */;
1102
- hostRef.$vnode$ = rootVnode;
1103
- rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
1104
- patch(oldVNode, rootVnode, isInitialLoad);
1105
- };
1106
-
1107
- // src/runtime/update-component.ts
1108
- var attachToAncestor = (hostRef, ancestorComponent) => {
1109
- if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
1110
- const index = ancestorComponent["s-p"].push(
1111
- new Promise(
1112
- (r) => hostRef.$onRenderResolve$ = () => {
1113
- ancestorComponent["s-p"].splice(index - 1, 1);
1114
- r();
1115
- }
1116
- )
1117
- );
1118
- }
1119
- };
1120
- var scheduleUpdate = (hostRef, isInitialLoad) => {
1121
- {
1122
- hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
1123
- }
1124
- if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {
1125
- hostRef.$flags$ |= 512 /* needsRerender */;
1126
- return;
1127
- }
1128
- attachToAncestor(hostRef, hostRef.$ancestorComponent$);
1129
- const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
1130
- if (isInitialLoad) {
1131
- queueMicrotask(() => {
1132
- dispatch();
1133
- });
1134
- return;
1135
- }
1136
- return writeTask(dispatch) ;
1137
- };
1138
- var dispatchHooks = (hostRef, isInitialLoad) => {
1139
- const elm = hostRef.$hostElement$;
1140
- const endSchedule = createTime("scheduleUpdate", hostRef.$cmpMeta$.$tagName$);
1141
- const instance = hostRef.$lazyInstance$ ;
1142
- if (!instance) {
1143
- throw new Error(
1144
- `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`
1145
- );
1146
- }
1147
- let maybePromise;
1148
- if (isInitialLoad) {
1149
- {
1150
- {
1151
- hostRef.$flags$ |= 256 /* isListenReady */;
1152
- if (hostRef.$queuedListeners$) {
1153
- hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
1154
- hostRef.$queuedListeners$ = void 0;
1155
- }
1156
- }
1157
- if (hostRef.$fetchedCbList$.length) {
1158
- hostRef.$fetchedCbList$.forEach((cb) => cb(elm));
1159
- }
1160
- }
1161
- maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
1162
- } else {
1163
- maybePromise = safeCall(instance, "componentWillUpdate", void 0, elm);
1164
- }
1165
- maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
1166
- endSchedule();
1167
- return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
1168
- };
1169
- var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn).catch((err2) => {
1170
- console.error(err2);
1171
- fn();
1172
- }) : fn();
1173
- var isPromisey = (maybePromise) => maybePromise instanceof Promise || maybePromise && maybePromise.then && typeof maybePromise.then === "function";
1174
- var updateComponent = async (hostRef, instance, isInitialLoad) => {
1175
- var _a;
1176
- const elm = hostRef.$hostElement$;
1177
- const endUpdate = createTime("update", hostRef.$cmpMeta$.$tagName$);
1178
- const rc = elm["s-rc"];
1179
- if (isInitialLoad) {
1180
- attachStyles(hostRef);
1181
- }
1182
- const endRender = createTime("render", hostRef.$cmpMeta$.$tagName$);
1183
- {
1184
- callRender(hostRef, instance, elm, isInitialLoad);
1185
- }
1186
- if (rc) {
1187
- rc.map((cb) => cb());
1188
- elm["s-rc"] = void 0;
1189
- }
1190
- endRender();
1191
- endUpdate();
1192
- {
1193
- const childrenPromises = (_a = elm["s-p"]) != null ? _a : [];
1194
- const postUpdate = () => postUpdateComponent(hostRef);
1195
- if (childrenPromises.length === 0) {
1196
- postUpdate();
1197
- } else {
1198
- Promise.all(childrenPromises).then(postUpdate);
1199
- hostRef.$flags$ |= 4 /* isWaitingForChildren */;
1200
- childrenPromises.length = 0;
1201
- }
1202
- }
1203
- };
1204
- var callRender = (hostRef, instance, elm, isInitialLoad) => {
1205
- try {
1206
- instance = instance.render() ;
1207
- {
1208
- hostRef.$flags$ &= -17 /* isQueuedForUpdate */;
1209
- }
1210
- {
1211
- hostRef.$flags$ |= 2 /* hasRendered */;
1212
- }
1213
- {
1214
- {
1215
- {
1216
- renderVdom(hostRef, instance, isInitialLoad);
1217
- }
1218
- }
1219
- }
1220
- } catch (e) {
1221
- consoleError(e, hostRef.$hostElement$);
1222
- }
1223
- return null;
1224
- };
1225
- var postUpdateComponent = (hostRef) => {
1226
- const tagName = hostRef.$cmpMeta$.$tagName$;
1227
- const elm = hostRef.$hostElement$;
1228
- const endPostUpdate = createTime("postUpdate", tagName);
1229
- const instance = hostRef.$lazyInstance$ ;
1230
- const ancestorComponent = hostRef.$ancestorComponent$;
1231
- safeCall(instance, "componentDidRender", void 0, elm);
1232
- if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
1233
- hostRef.$flags$ |= 64 /* hasLoadedComponent */;
1234
- {
1235
- addHydratedFlag(elm);
1236
- }
1237
- safeCall(instance, "componentDidLoad", void 0, elm);
1238
- endPostUpdate();
1239
- {
1240
- hostRef.$onReadyResolve$(elm);
1241
- if (!ancestorComponent) {
1242
- appDidLoad();
1243
- }
1244
- }
1245
- } else {
1246
- safeCall(instance, "componentDidUpdate", void 0, elm);
1247
- endPostUpdate();
1248
- }
1249
- {
1250
- hostRef.$onInstanceResolve$(elm);
1251
- }
1252
- {
1253
- if (hostRef.$onRenderResolve$) {
1254
- hostRef.$onRenderResolve$();
1255
- hostRef.$onRenderResolve$ = void 0;
1256
- }
1257
- if (hostRef.$flags$ & 512 /* needsRerender */) {
1258
- nextTick(() => scheduleUpdate(hostRef, false));
1259
- }
1260
- hostRef.$flags$ &= -517;
1261
- }
1262
- };
1263
- var appDidLoad = (who) => {
1264
- nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
1265
- };
1266
- var safeCall = (instance, method, arg, elm) => {
1267
- if (instance && instance[method]) {
1268
- try {
1269
- return instance[method](arg);
1270
- } catch (e) {
1271
- consoleError(e, elm);
1272
- }
1273
- }
1274
- return void 0;
1275
- };
1276
- var addHydratedFlag = (elm) => {
1277
- var _a;
1278
- return elm.classList.add((_a = BUILD.hydratedSelectorName) != null ? _a : "hydrated") ;
1279
- };
1280
-
1281
- // src/runtime/set-value.ts
1282
- var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
1283
- var setValue = (ref, propName, newVal, cmpMeta) => {
1284
- const hostRef = getHostRef(ref);
1285
- if (!hostRef) {
1286
- return;
1287
- }
1288
- if (!hostRef) {
1289
- throw new Error(
1290
- `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).`
1291
- );
1292
- }
1293
- const elm = hostRef.$hostElement$ ;
1294
- const oldVal = hostRef.$instanceValues$.get(propName);
1295
- const flags = hostRef.$flags$;
1296
- const instance = hostRef.$lazyInstance$ ;
1297
- newVal = parsePropertyValue(
1298
- newVal,
1299
- cmpMeta.$members$[propName][0]);
1300
- const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
1301
- const didValueChange = newVal !== oldVal && !areBothNaN;
1302
- if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
1303
- hostRef.$instanceValues$.set(propName, newVal);
1304
- if (instance) {
1305
- if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
1306
- const watchMethods = cmpMeta.$watchers$[propName];
1307
- if (watchMethods) {
1308
- watchMethods.map((watchMethodName) => {
1309
- try {
1310
- instance[watchMethodName](newVal, oldVal, propName);
1311
- } catch (e) {
1312
- consoleError(e, elm);
1313
- }
1314
- });
1315
- }
1316
- }
1317
- if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
1318
- if (instance.componentShouldUpdate) {
1319
- if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
1320
- return;
1321
- }
1322
- }
1323
- scheduleUpdate(hostRef, false);
1324
- }
1325
- }
1326
- }
1327
- };
1328
-
1329
- // src/runtime/proxy-component.ts
1330
- var proxyComponent = (Cstr, cmpMeta, flags) => {
1331
- var _a, _b;
1332
- const prototype = Cstr.prototype;
1333
- if (cmpMeta.$members$ || BUILD.propChangeCallback) {
1334
- {
1335
- if (Cstr.watchers && !cmpMeta.$watchers$) {
1336
- cmpMeta.$watchers$ = Cstr.watchers;
1337
- }
1338
- if (Cstr.deserializers && !cmpMeta.$deserializers$) {
1339
- cmpMeta.$deserializers$ = Cstr.deserializers;
1340
- }
1341
- if (Cstr.serializers && !cmpMeta.$serializers$) {
1342
- cmpMeta.$serializers$ = Cstr.serializers;
1343
- }
1344
- }
1345
- const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
1346
- members.map(([memberName, [memberFlags]]) => {
1347
- if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
1348
- const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
1349
- if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
1350
- if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
1351
- if (flags & 1 /* isElementConstructor */ || !origGetter) {
1352
- Object.defineProperty(prototype, memberName, {
1353
- get() {
1354
- {
1355
- if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
1356
- return getValue(this, memberName);
1357
- }
1358
- const ref = getHostRef(this);
1359
- const instance = ref ? ref.$lazyInstance$ : prototype;
1360
- if (!instance) return;
1361
- return instance[memberName];
1362
- }
1363
- },
1364
- configurable: true,
1365
- enumerable: true
1366
- });
1367
- }
1368
- Object.defineProperty(prototype, memberName, {
1369
- set(newValue) {
1370
- const ref = getHostRef(this);
1371
- if (!ref) {
1372
- return;
1373
- }
1374
- if (origSetter) {
1375
- const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
1376
- if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
1377
- newValue = ref.$instanceValues$.get(memberName);
1378
- }
1379
- origSetter.apply(this, [
1380
- parsePropertyValue(
1381
- newValue,
1382
- memberFlags)
1383
- ]);
1384
- newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
1385
- setValue(this, memberName, newValue, cmpMeta);
1386
- return;
1387
- }
1388
- {
1389
- if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
1390
- setValue(this, memberName, newValue, cmpMeta);
1391
- if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
1392
- ref.$fetchedCbList$.push(() => {
1393
- if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
1394
- ref.$lazyInstance$[memberName] = newValue;
1395
- }
1396
- });
1397
- }
1398
- return;
1399
- }
1400
- const setterSetVal = () => {
1401
- const currentValue = ref.$lazyInstance$[memberName];
1402
- if (!ref.$instanceValues$.get(memberName) && currentValue) {
1403
- ref.$instanceValues$.set(memberName, currentValue);
1404
- }
1405
- ref.$lazyInstance$[memberName] = parsePropertyValue(
1406
- newValue,
1407
- memberFlags);
1408
- setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
1409
- };
1410
- if (ref.$lazyInstance$) {
1411
- setterSetVal();
1412
- } else {
1413
- ref.$fetchedCbList$.push(() => {
1414
- setterSetVal();
1415
- });
1416
- }
1417
- }
1418
- }
1419
- });
1420
- } else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
1421
- Object.defineProperty(prototype, memberName, {
1422
- value(...args) {
1423
- var _a2;
1424
- const ref = getHostRef(this);
1425
- return (_a2 = ref == null ? void 0 : ref.$onInstancePromise$) == null ? void 0 : _a2.then(() => {
1426
- var _a3;
1427
- return (_a3 = ref.$lazyInstance$) == null ? void 0 : _a3[memberName](...args);
1428
- });
1429
- }
1430
- });
1431
- }
1432
- });
1433
- if ((flags & 1 /* isElementConstructor */)) {
1434
- const attrNameToPropName = /* @__PURE__ */ new Map();
1435
- prototype.attributeChangedCallback = function(attrName, oldValue, newValue) {
1436
- plt.jmp(() => {
1437
- var _a2;
1438
- const propName = attrNameToPropName.get(attrName);
1439
- const hostRef = getHostRef(this);
1440
- if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
1441
- newValue = this[propName];
1442
- delete this[propName];
1443
- }
1444
- if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
1445
- this[propName] == newValue) {
1446
- return;
1447
- } else if (propName == null) {
1448
- const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
1449
- if (hostRef && flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
1450
- const instance = hostRef.$lazyInstance$ ;
1451
- const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
1452
- entry == null ? void 0 : entry.forEach((callbackName) => {
1453
- if (instance[callbackName] != null) {
1454
- instance[callbackName].call(instance, newValue, oldValue, attrName);
1455
- }
1456
- });
1457
- }
1458
- return;
1459
- }
1460
- const propFlags = members.find(([m]) => m === propName);
1461
- if (propFlags && propFlags[1][0] & 4 /* Boolean */) {
1462
- newValue = newValue === null || newValue === "false" ? false : true;
1463
- }
1464
- const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
1465
- if (newValue != this[propName] && (!propDesc.get || !!propDesc.set)) {
1466
- this[propName] = newValue;
1467
- }
1468
- });
1469
- };
1470
- Cstr.observedAttributes = Array.from(
1471
- /* @__PURE__ */ new Set([
1472
- ...Object.keys((_b = cmpMeta.$watchers$) != null ? _b : {}),
1473
- ...members.filter(([_, m]) => m[0] & 31 /* HasAttribute */).map(([propName, m]) => {
1474
- var _a2;
1475
- const attrName = m[1] || propName;
1476
- attrNameToPropName.set(attrName, propName);
1477
- if (m[0] & 512 /* ReflectAttr */) {
1478
- (_a2 = cmpMeta.$attrsToReflect$) == null ? void 0 : _a2.push([propName, attrName]);
1479
- }
1480
- return attrName;
1481
- })
1482
- ])
1483
- );
1484
- }
1485
- }
1486
- return Cstr;
1487
- };
1488
-
1489
- // src/runtime/initialize-component.ts
1490
- var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1491
- let Cstr;
1492
- if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
1493
- hostRef.$flags$ |= 32 /* hasInitializedComponent */;
1494
- const bundleId = cmpMeta.$lazyBundleId$;
1495
- if (bundleId) {
1496
- const CstrImport = loadModule(cmpMeta, hostRef);
1497
- if (CstrImport && "then" in CstrImport) {
1498
- const endLoad = uniqueTime();
1499
- Cstr = await CstrImport;
1500
- endLoad();
1501
- } else {
1502
- Cstr = CstrImport;
1503
- }
1504
- if (!Cstr) {
1505
- throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
1506
- }
1507
- if (!Cstr.isProxied) {
1508
- {
1509
- cmpMeta.$watchers$ = Cstr.watchers;
1510
- cmpMeta.$serializers$ = Cstr.serializers;
1511
- cmpMeta.$deserializers$ = Cstr.deserializers;
1512
- }
1513
- proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
1514
- Cstr.isProxied = true;
1515
- }
1516
- const endNewInstance = createTime("createInstance", cmpMeta.$tagName$);
1517
- {
1518
- hostRef.$flags$ |= 8 /* isConstructingInstance */;
1519
- }
1520
- try {
1521
- new Cstr(hostRef);
1522
- } catch (e) {
1523
- consoleError(e, elm);
1524
- }
1525
- {
1526
- hostRef.$flags$ &= -9 /* isConstructingInstance */;
1527
- }
1528
- {
1529
- hostRef.$flags$ |= 128 /* isWatchReady */;
1530
- }
1531
- endNewInstance();
1532
- fireConnectedCallback(hostRef.$lazyInstance$, elm);
1533
- } else {
1534
- Cstr = elm.constructor;
1535
- const cmpTag = elm.localName;
1536
- customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
1537
- }
1538
- if (Cstr && Cstr.style) {
1539
- let style;
1540
- if (typeof Cstr.style === "string") {
1541
- style = Cstr.style;
1542
- }
1543
- const scopeId2 = getScopeId(cmpMeta);
1544
- if (!styles.has(scopeId2)) {
1545
- const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
1546
- registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
1547
- endRegisterStyles();
1548
- }
1549
- }
1550
- }
1551
- const ancestorComponent = hostRef.$ancestorComponent$;
1552
- const schedule = () => scheduleUpdate(hostRef, true);
1553
- if (ancestorComponent && ancestorComponent["s-rc"]) {
1554
- ancestorComponent["s-rc"].push(schedule);
1555
- } else {
1556
- schedule();
1557
- }
1558
- };
1559
- var fireConnectedCallback = (instance, elm) => {
1560
- {
1561
- safeCall(instance, "connectedCallback", void 0, elm);
1562
- }
1563
- };
1564
-
1565
- // src/runtime/connected-callback.ts
1566
- var connectedCallback = (elm) => {
1567
- if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1568
- const hostRef = getHostRef(elm);
1569
- if (!hostRef) {
1570
- return;
1571
- }
1572
- const cmpMeta = hostRef.$cmpMeta$;
1573
- const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
1574
- if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
1575
- hostRef.$flags$ |= 1 /* hasConnected */;
1576
- {
1577
- let ancestorComponent = elm;
1578
- while (ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host) {
1579
- if (ancestorComponent["s-p"]) {
1580
- attachToAncestor(hostRef, hostRef.$ancestorComponent$ = ancestorComponent);
1581
- break;
1582
- }
1583
- }
1584
- }
1585
- if (cmpMeta.$members$) {
1586
- Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
1587
- if (memberFlags & 31 /* Prop */ && memberName in elm && elm[memberName] !== Object.prototype[memberName]) {
1588
- const value = elm[memberName];
1589
- delete elm[memberName];
1590
- elm[memberName] = value;
1591
- }
1592
- });
1593
- }
1594
- {
1595
- initializeComponent(elm, hostRef, cmpMeta);
1596
- }
1597
- } else {
1598
- addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1599
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1600
- fireConnectedCallback(hostRef.$lazyInstance$, elm);
1601
- } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1602
- hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
1603
- }
1604
- }
1605
- endConnected();
1606
- }
1607
- };
1608
- var disconnectInstance = (instance, elm) => {
1609
- {
1610
- safeCall(instance, "disconnectedCallback", void 0, elm || instance);
1611
- }
1612
- };
1613
- var disconnectedCallback = async (elm) => {
1614
- if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1615
- const hostRef = getHostRef(elm);
1616
- {
1617
- if (hostRef == null ? void 0 : hostRef.$rmListeners$) {
1618
- hostRef.$rmListeners$.map((rmListener) => rmListener());
1619
- hostRef.$rmListeners$ = void 0;
1620
- }
1621
- }
1622
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1623
- disconnectInstance(hostRef.$lazyInstance$, elm);
1624
- } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1625
- hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
1626
- }
1627
- }
1628
- if (rootAppliedStyles.has(elm)) {
1629
- rootAppliedStyles.delete(elm);
1630
- }
1631
- if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
1632
- rootAppliedStyles.delete(elm.shadowRoot);
1633
- }
1634
- };
1635
-
1636
- // src/runtime/bootstrap-lazy.ts
1637
- var bootstrapLazy = (lazyBundles, options = {}) => {
1638
- var _a;
1639
- if (!win.document) {
1640
- console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");
1641
- return;
1642
- }
1643
- const endBootstrap = createTime();
1644
- const cmpTags = [];
1645
- const exclude = options.exclude || [];
1646
- const customElements2 = win.customElements;
1647
- const head = win.document.head;
1648
- const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
1649
- const dataStyles = /* @__PURE__ */ win.document.createElement("style");
1650
- const deferredConnectedCallbacks = [];
1651
- let appLoadFallback;
1652
- let isBootstrapping = true;
1653
- Object.assign(plt, options);
1654
- plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", win.document.baseURI).href;
1655
- let hasSlotRelocation = false;
1656
- lazyBundles.map((lazyBundle) => {
1657
- lazyBundle[1].map((compactMeta) => {
1658
- var _a2, _b, _c;
1659
- const cmpMeta = {
1660
- $flags$: compactMeta[0],
1661
- $tagName$: compactMeta[1],
1662
- $members$: compactMeta[2],
1663
- $listeners$: compactMeta[3]
1664
- };
1665
- if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
1666
- hasSlotRelocation = true;
1667
- }
1668
- {
1669
- cmpMeta.$members$ = compactMeta[2];
1670
- }
1671
- {
1672
- cmpMeta.$listeners$ = compactMeta[3];
1673
- }
1674
- {
1675
- cmpMeta.$attrsToReflect$ = [];
1676
- }
1677
- {
1678
- cmpMeta.$watchers$ = (_a2 = compactMeta[4]) != null ? _a2 : {};
1679
- cmpMeta.$serializers$ = (_b = compactMeta[5]) != null ? _b : {};
1680
- cmpMeta.$deserializers$ = (_c = compactMeta[6]) != null ? _c : {};
1681
- }
1682
- const tagName = cmpMeta.$tagName$;
1683
- const HostElement = class extends HTMLElement {
1684
- // StencilLazyHost
1685
- constructor(self) {
1686
- super(self);
1687
- this.hasRegisteredEventListeners = false;
1688
- self = this;
1689
- registerHost(self, cmpMeta);
1690
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
1691
- {
1692
- if (!self.shadowRoot) {
1693
- createShadowRoot.call(self, cmpMeta);
1694
- } else {
1695
- if (self.shadowRoot.mode !== "open") {
1696
- throw new Error(
1697
- `Unable to re-use existing shadow root for ${cmpMeta.$tagName$}! Mode is set to ${self.shadowRoot.mode} but Stencil only supports open shadow roots.`
1698
- );
1699
- }
1700
- }
1701
- }
1702
- }
1703
- }
1704
- connectedCallback() {
1705
- const hostRef = getHostRef(this);
1706
- if (!hostRef) {
1707
- return;
1708
- }
1709
- if (!this.hasRegisteredEventListeners) {
1710
- this.hasRegisteredEventListeners = true;
1711
- addHostEventListeners(this, hostRef, cmpMeta.$listeners$);
1712
- }
1713
- if (appLoadFallback) {
1714
- clearTimeout(appLoadFallback);
1715
- appLoadFallback = null;
1716
- }
1717
- if (isBootstrapping) {
1718
- deferredConnectedCallbacks.push(this);
1719
- } else {
1720
- plt.jmp(() => connectedCallback(this));
1721
- }
1722
- }
1723
- disconnectedCallback() {
1724
- plt.jmp(() => disconnectedCallback(this));
1725
- plt.raf(() => {
1726
- var _a3;
1727
- const hostRef = getHostRef(this);
1728
- if (!hostRef) {
1729
- return;
1730
- }
1731
- const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
1732
- if (i2 > -1) {
1733
- deferredConnectedCallbacks.splice(i2, 1);
1734
- }
1735
- if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
1736
- delete hostRef.$vnode$.$elm$;
1737
- }
1738
- });
1739
- }
1740
- componentOnReady() {
1741
- var _a3;
1742
- return (_a3 = getHostRef(this)) == null ? void 0 : _a3.$onReadyPromise$;
1743
- }
1744
- };
1745
- cmpMeta.$lazyBundleId$ = lazyBundle[0];
1746
- if (!exclude.includes(tagName) && !customElements2.get(tagName)) {
1747
- cmpTags.push(tagName);
1748
- customElements2.define(
1749
- tagName,
1750
- proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */)
1751
- );
1752
- }
1753
- });
1754
- });
1755
- if (cmpTags.length > 0) {
1756
- if (hasSlotRelocation) {
1757
- dataStyles.textContent += SLOT_FB_CSS;
1758
- }
1759
- {
1760
- dataStyles.textContent += cmpTags.sort() + HYDRATED_CSS;
1761
- }
1762
- if (dataStyles.innerHTML.length) {
1763
- dataStyles.setAttribute("data-styles", "");
1764
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
1765
- if (nonce != null) {
1766
- dataStyles.setAttribute("nonce", nonce);
1767
- }
1768
- head.insertBefore(dataStyles, metaCharset ? metaCharset.nextSibling : head.firstChild);
1769
- }
1770
- }
1771
- isBootstrapping = false;
1772
- if (deferredConnectedCallbacks.length) {
1773
- deferredConnectedCallbacks.map((host) => host.connectedCallback());
1774
- } else {
1775
- {
1776
- plt.jmp(() => appLoadFallback = setTimeout(appDidLoad, 30));
1777
- }
1778
- }
1779
- endBootstrap();
1780
- };
1781
-
1782
- // src/runtime/fragment.ts
1783
- var Fragment = (_, children) => children;
1784
- var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
1785
- if (listeners && win.document) {
1786
- listeners.map(([flags, name, method]) => {
1787
- const target = getHostListenerTarget(win.document, elm, flags) ;
1788
- const handler = hostListenerProxy(hostRef, method);
1789
- const opts = hostListenerOpts(flags);
1790
- plt.ael(target, name, handler, opts);
1791
- (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
1792
- });
1793
- }
1794
- };
1795
- var hostListenerProxy = (hostRef, methodName) => (ev) => {
1796
- var _a;
1797
- try {
1798
- {
1799
- if (hostRef.$flags$ & 256 /* isListenReady */) {
1800
- (_a = hostRef.$lazyInstance$) == null ? void 0 : _a[methodName](ev);
1801
- } else {
1802
- (hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
1803
- }
1804
- }
1805
- } catch (e) {
1806
- consoleError(e, hostRef.$hostElement$);
1807
- }
1808
- };
1809
- var getHostListenerTarget = (doc, elm, flags) => {
1810
- if (flags & 8 /* TargetWindow */) {
1811
- return win;
1812
- }
1813
- return elm;
1814
- };
1815
- var hostListenerOpts = (flags) => supportsListenerOptions ? {
1816
- passive: (flags & 1 /* Passive */) !== 0,
1817
- capture: (flags & 2 /* Capture */) !== 0
1818
- } : (flags & 2 /* Capture */) !== 0;
1819
-
1820
- // src/runtime/nonce.ts
1821
- var setNonce = (nonce) => plt.$nonce$ = nonce;
1822
-
1823
- exports.Fragment = Fragment;
1824
- exports.Host = Host;
1825
- exports.bootstrapLazy = bootstrapLazy;
1826
- exports.configureLeKit = configureLeKit;
1827
- exports.createEvent = createEvent;
1828
- exports.getAssetPath = getAssetPath;
1829
- exports.getElement = getElement;
1830
- exports.getLeKitConfig = getLeKitConfig;
1831
- exports.getMode = getMode;
1832
- exports.getTheme = getTheme;
1833
- exports.globalScripts = globalScripts;
1834
- exports.h = h;
1835
- exports.promiseResolve = promiseResolve;
1836
- exports.registerInstance = registerInstance;
1837
- exports.setGlobalMode = setGlobalMode;
1838
- exports.setGlobalTheme = setGlobalTheme;
1839
- exports.setNonce = setNonce;
1840
- //# sourceMappingURL=index-o1DRKw1g.js.map
1841
-
1842
- //# sourceMappingURL=index-o1DRKw1g.js.map