proto-ikon-loader-wc 0.0.378 → 0.0.379

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 (388) hide show
  1. package/dist/cjs/acura-ikon.cjs.entry.js +1 -1
  2. package/dist/cjs/alfa-romeo-alt-ikon.cjs.entry.js +1 -1
  3. package/dist/cjs/alfa-romeo-ikon.cjs.entry.js +1 -1
  4. package/dist/cjs/alien-icon.cjs.entry.js +1 -1
  5. package/dist/cjs/am-general-ikon.cjs.entry.js +1 -1
  6. package/dist/cjs/asterisk-icon.cjs.entry.js +1 -1
  7. package/dist/cjs/aston-martin-alt-ikon.cjs.entry.js +1 -1
  8. package/dist/cjs/aston-martin-ikon.cjs.entry.js +1 -1
  9. package/dist/cjs/audi-ikon.cjs.entry.js +1 -1
  10. package/dist/cjs/barcode-icon.cjs.entry.js +1 -1
  11. package/dist/cjs/barcode-scan-icon.cjs.entry.js +1 -1
  12. package/dist/cjs/bash-icon.cjs.entry.js +1 -1
  13. package/dist/cjs/beaker-icon.cjs.entry.js +1 -1
  14. package/dist/cjs/bently-ikon.cjs.entry.js +1 -1
  15. package/dist/cjs/bmw-ikon.cjs.entry.js +1 -1
  16. package/dist/cjs/bugatti-ikon.cjs.entry.js +1 -1
  17. package/dist/cjs/buick-ikon.cjs.entry.js +1 -1
  18. package/dist/cjs/cadillac-ikon.cjs.entry.js +1 -1
  19. package/dist/cjs/chart-bar-icon.cjs.entry.js +1 -1
  20. package/dist/cjs/chart-bubble-icon.cjs.entry.js +1 -1
  21. package/dist/cjs/chart-donut-icon.cjs.entry.js +1 -1
  22. package/dist/cjs/chart-donuts-icon.cjs.entry.js +1 -1
  23. package/dist/cjs/check-icon.cjs.entry.js +1 -1
  24. package/dist/cjs/chevrolet-ikon.cjs.entry.js +1 -1
  25. package/dist/cjs/chevron-double-left-icon.cjs.entry.js +1 -1
  26. package/dist/cjs/chrysler-ikon.cjs.entry.js +1 -1
  27. package/dist/cjs/circular-saw-icon.cjs.entry.js +1 -1
  28. package/dist/cjs/citroen-ikon.cjs.entry.js +1 -1
  29. package/dist/cjs/close-icon.cjs.entry.js +1 -1
  30. package/dist/cjs/daewoo-ikon.cjs.entry.js +1 -1
  31. package/dist/cjs/dodge-ikon.cjs.entry.js +1 -1
  32. package/dist/cjs/eagle-ikon.cjs.entry.js +1 -1
  33. package/dist/cjs/ferrari-ikon.cjs.entry.js +1 -1
  34. package/dist/cjs/fiat-alt-ikon.cjs.entry.js +1 -1
  35. package/dist/cjs/fiat-ikon.cjs.entry.js +1 -1
  36. package/dist/cjs/fingerprint-icon.cjs.entry.js +1 -1
  37. package/dist/cjs/fire-icon.cjs.entry.js +1 -1
  38. package/dist/cjs/fisker-ikon.cjs.entry.js +1 -1
  39. package/dist/cjs/flask-icon.cjs.entry.js +1 -1
  40. package/dist/cjs/ford-ikon.cjs.entry.js +1 -1
  41. package/dist/cjs/genesis-ikon.cjs.entry.js +1 -1
  42. package/dist/cjs/geo-ikon.cjs.entry.js +1 -1
  43. package/dist/cjs/git-icon.cjs.entry.js +1 -1
  44. package/dist/cjs/gmc-ikon.cjs.entry.js +1 -1
  45. package/dist/cjs/honda-ikon.cjs.entry.js +1 -1
  46. package/dist/cjs/hummer-ikon.cjs.entry.js +1 -1
  47. package/dist/cjs/hyundai-ikon.cjs.entry.js +1 -1
  48. package/dist/cjs/index-90ebe2be.js +1122 -0
  49. package/dist/cjs/infiniti-ikon.cjs.entry.js +1 -1
  50. package/dist/cjs/isuzu-ikon.cjs.entry.js +1 -1
  51. package/dist/cjs/jaguar-alt-ikon.cjs.entry.js +1 -1
  52. package/dist/cjs/jaguar-ikon.cjs.entry.js +1 -1
  53. package/dist/cjs/java-script-icon.cjs.entry.js +1 -1
  54. package/dist/cjs/jeep-alt-ikon.cjs.entry.js +1 -1
  55. package/dist/cjs/jeep-ikon.cjs.entry.js +1 -1
  56. package/dist/cjs/kia-ikon.cjs.entry.js +1 -1
  57. package/dist/cjs/lamborghini-alt-ikon.cjs.entry.js +1 -1
  58. package/dist/cjs/lamborghini-ikon.cjs.entry.js +1 -1
  59. package/dist/cjs/land-rover-ikon.cjs.entry.js +1 -1
  60. package/dist/cjs/lexus-ikon.cjs.entry.js +1 -1
  61. package/dist/cjs/lincoln-ikon.cjs.entry.js +1 -1
  62. package/dist/cjs/loader.cjs.js +1 -1
  63. package/dist/cjs/lotus-alt-ikon.cjs.entry.js +1 -1
  64. package/dist/cjs/lotus-ikon.cjs.entry.js +1 -1
  65. package/dist/cjs/maserati-ikon.cjs.entry.js +1 -1
  66. package/dist/cjs/maybach-ikon.cjs.entry.js +1 -1
  67. package/dist/cjs/mazda-alt-ikon.cjs.entry.js +1 -1
  68. package/dist/cjs/mazda-ikon.cjs.entry.js +1 -1
  69. package/dist/cjs/mclaren-alt-ikon.cjs.entry.js +1 -1
  70. package/dist/cjs/mclaren-ikon.cjs.entry.js +1 -1
  71. package/dist/cjs/mercedes-benz-alt-ikon.cjs.entry.js +1 -1
  72. package/dist/cjs/mercedes-benz-ikon.cjs.entry.js +1 -1
  73. package/dist/cjs/mercury-ikon.cjs.entry.js +1 -1
  74. package/dist/cjs/mini-alt-ikon.cjs.entry.js +1 -1
  75. package/dist/cjs/mini-ikon.cjs.entry.js +1 -1
  76. package/dist/cjs/mitsubishi-ikon.cjs.entry.js +1 -1
  77. package/dist/cjs/nissan-ikon.cjs.entry.js +1 -1
  78. package/dist/cjs/oldsmobile-ikon.cjs.entry.js +1 -1
  79. package/dist/cjs/one-password-icon.cjs.entry.js +1 -1
  80. package/dist/cjs/opel-ikon.cjs.entry.js +1 -1
  81. package/dist/cjs/panoz-ikon.cjs.entry.js +1 -1
  82. package/dist/cjs/paw-icon.cjs.entry.js +1 -1
  83. package/dist/cjs/peugeot-alt-ikon.cjs.entry.js +1 -1
  84. package/dist/cjs/peugeot-ikon.cjs.entry.js +1 -1
  85. package/dist/cjs/plymouth-ikon.cjs.entry.js +1 -1
  86. package/dist/cjs/pontiac-ikon.cjs.entry.js +1 -1
  87. package/dist/cjs/porsche-ikon.cjs.entry.js +1 -1
  88. package/dist/cjs/proto-ikon-loader-wc.cjs.js +9 -9
  89. package/dist/cjs/proto-ikon-loader_2.cjs.entry.js +1 -1
  90. package/dist/cjs/protocol-icon.cjs.entry.js +1 -1
  91. package/dist/cjs/pulse-icon.cjs.entry.js +1 -1
  92. package/dist/cjs/puzzle-icon.cjs.entry.js +1 -1
  93. package/dist/cjs/qr-code-icon.cjs.entry.js +1 -1
  94. package/dist/cjs/radio-2-icon.cjs.entry.js +1 -1
  95. package/dist/cjs/radio-icon.cjs.entry.js +1 -1
  96. package/dist/cjs/ram-alt-ikon.cjs.entry.js +1 -1
  97. package/dist/cjs/ram-ikon.cjs.entry.js +1 -1
  98. package/dist/cjs/refresh-icon.cjs.entry.js +1 -1
  99. package/dist/cjs/renault-alt-ikon.cjs.entry.js +1 -1
  100. package/dist/cjs/renault-ikon.cjs.entry.js +1 -1
  101. package/dist/cjs/rolls-royce-ikon.cjs.entry.js +1 -1
  102. package/dist/cjs/saab-alt-ikon.cjs.entry.js +1 -1
  103. package/dist/cjs/saab-ikon.cjs.entry.js +1 -1
  104. package/dist/cjs/saturn-ikon.cjs.entry.js +1 -1
  105. package/dist/cjs/scion-ikon.cjs.entry.js +1 -1
  106. package/dist/cjs/seat-ikon.cjs.entry.js +1 -1
  107. package/dist/cjs/skoda-ikon.cjs.entry.js +1 -1
  108. package/dist/cjs/slug-icon.cjs.entry.js +1 -1
  109. package/dist/cjs/smart-ikon.cjs.entry.js +1 -1
  110. package/dist/cjs/spider-icon.cjs.entry.js +1 -1
  111. package/dist/cjs/spyker-alt-ikon.cjs.entry.js +1 -1
  112. package/dist/cjs/spyker-ikon.cjs.entry.js +1 -1
  113. package/dist/cjs/subaru-alt-ikon.cjs.entry.js +1 -1
  114. package/dist/cjs/subaru-ikon.cjs.entry.js +1 -1
  115. package/dist/cjs/suzuki-ikon.cjs.entry.js +1 -1
  116. package/dist/cjs/svg-icon.cjs.entry.js +1 -1
  117. package/dist/cjs/tesla-ikon.cjs.entry.js +1 -1
  118. package/dist/cjs/toyota-ikon.cjs.entry.js +1 -1
  119. package/dist/cjs/vector-curve-icon.cjs.entry.js +1 -1
  120. package/dist/cjs/volkswagen-ikon.cjs.entry.js +1 -1
  121. package/dist/cjs/volvo-alt-ikon.cjs.entry.js +1 -1
  122. package/dist/cjs/volvo-ikon.cjs.entry.js +1 -1
  123. package/dist/cjs/webhook-icon.cjs.entry.js +1 -1
  124. package/dist/collection/collection-manifest.json +1 -1
  125. package/dist/esm/acura-ikon.entry.js +1 -1
  126. package/dist/esm/alfa-romeo-alt-ikon.entry.js +1 -1
  127. package/dist/esm/alfa-romeo-ikon.entry.js +1 -1
  128. package/dist/esm/alien-icon.entry.js +1 -1
  129. package/dist/esm/am-general-ikon.entry.js +1 -1
  130. package/dist/esm/asterisk-icon.entry.js +1 -1
  131. package/dist/esm/aston-martin-alt-ikon.entry.js +1 -1
  132. package/dist/esm/aston-martin-ikon.entry.js +1 -1
  133. package/dist/esm/audi-ikon.entry.js +1 -1
  134. package/dist/esm/barcode-icon.entry.js +1 -1
  135. package/dist/esm/barcode-scan-icon.entry.js +1 -1
  136. package/dist/esm/bash-icon.entry.js +1 -1
  137. package/dist/esm/beaker-icon.entry.js +1 -1
  138. package/dist/esm/bently-ikon.entry.js +1 -1
  139. package/dist/esm/bmw-ikon.entry.js +1 -1
  140. package/dist/esm/bugatti-ikon.entry.js +1 -1
  141. package/dist/esm/buick-ikon.entry.js +1 -1
  142. package/dist/esm/cadillac-ikon.entry.js +1 -1
  143. package/dist/esm/chart-bar-icon.entry.js +1 -1
  144. package/dist/esm/chart-bubble-icon.entry.js +1 -1
  145. package/dist/esm/chart-donut-icon.entry.js +1 -1
  146. package/dist/esm/chart-donuts-icon.entry.js +1 -1
  147. package/dist/esm/check-icon.entry.js +1 -1
  148. package/dist/esm/chevrolet-ikon.entry.js +1 -1
  149. package/dist/esm/chevron-double-left-icon.entry.js +1 -1
  150. package/dist/esm/chrysler-ikon.entry.js +1 -1
  151. package/dist/esm/circular-saw-icon.entry.js +1 -1
  152. package/dist/esm/citroen-ikon.entry.js +1 -1
  153. package/dist/esm/close-icon.entry.js +1 -1
  154. package/dist/esm/daewoo-ikon.entry.js +1 -1
  155. package/dist/esm/dodge-ikon.entry.js +1 -1
  156. package/dist/esm/eagle-ikon.entry.js +1 -1
  157. package/dist/esm/ferrari-ikon.entry.js +1 -1
  158. package/dist/esm/fiat-alt-ikon.entry.js +1 -1
  159. package/dist/esm/fiat-ikon.entry.js +1 -1
  160. package/dist/esm/fingerprint-icon.entry.js +1 -1
  161. package/dist/esm/fire-icon.entry.js +1 -1
  162. package/dist/esm/fisker-ikon.entry.js +1 -1
  163. package/dist/esm/flask-icon.entry.js +1 -1
  164. package/dist/esm/ford-ikon.entry.js +1 -1
  165. package/dist/esm/genesis-ikon.entry.js +1 -1
  166. package/dist/esm/geo-ikon.entry.js +1 -1
  167. package/dist/esm/git-icon.entry.js +1 -1
  168. package/dist/esm/gmc-ikon.entry.js +1 -1
  169. package/dist/esm/honda-ikon.entry.js +1 -1
  170. package/dist/esm/hummer-ikon.entry.js +1 -1
  171. package/dist/esm/hyundai-ikon.entry.js +1 -1
  172. package/dist/esm/index-e013e909.js +1095 -0
  173. package/dist/esm/infiniti-ikon.entry.js +1 -1
  174. package/dist/esm/isuzu-ikon.entry.js +1 -1
  175. package/dist/esm/jaguar-alt-ikon.entry.js +1 -1
  176. package/dist/esm/jaguar-ikon.entry.js +1 -1
  177. package/dist/esm/java-script-icon.entry.js +1 -1
  178. package/dist/esm/jeep-alt-ikon.entry.js +1 -1
  179. package/dist/esm/jeep-ikon.entry.js +1 -1
  180. package/dist/esm/kia-ikon.entry.js +1 -1
  181. package/dist/esm/lamborghini-alt-ikon.entry.js +1 -1
  182. package/dist/esm/lamborghini-ikon.entry.js +1 -1
  183. package/dist/esm/land-rover-ikon.entry.js +1 -1
  184. package/dist/esm/lexus-ikon.entry.js +1 -1
  185. package/dist/esm/lincoln-ikon.entry.js +1 -1
  186. package/dist/esm/loader.js +2 -2
  187. package/dist/esm/lotus-alt-ikon.entry.js +1 -1
  188. package/dist/esm/lotus-ikon.entry.js +1 -1
  189. package/dist/esm/maserati-ikon.entry.js +1 -1
  190. package/dist/esm/maybach-ikon.entry.js +1 -1
  191. package/dist/esm/mazda-alt-ikon.entry.js +1 -1
  192. package/dist/esm/mazda-ikon.entry.js +1 -1
  193. package/dist/esm/mclaren-alt-ikon.entry.js +1 -1
  194. package/dist/esm/mclaren-ikon.entry.js +1 -1
  195. package/dist/esm/mercedes-benz-alt-ikon.entry.js +1 -1
  196. package/dist/esm/mercedes-benz-ikon.entry.js +1 -1
  197. package/dist/esm/mercury-ikon.entry.js +1 -1
  198. package/dist/esm/mini-alt-ikon.entry.js +1 -1
  199. package/dist/esm/mini-ikon.entry.js +1 -1
  200. package/dist/esm/mitsubishi-ikon.entry.js +1 -1
  201. package/dist/esm/nissan-ikon.entry.js +1 -1
  202. package/dist/esm/oldsmobile-ikon.entry.js +1 -1
  203. package/dist/esm/one-password-icon.entry.js +1 -1
  204. package/dist/esm/opel-ikon.entry.js +1 -1
  205. package/dist/esm/panoz-ikon.entry.js +1 -1
  206. package/dist/esm/paw-icon.entry.js +1 -1
  207. package/dist/esm/peugeot-alt-ikon.entry.js +1 -1
  208. package/dist/esm/peugeot-ikon.entry.js +1 -1
  209. package/dist/esm/plymouth-ikon.entry.js +1 -1
  210. package/dist/esm/pontiac-ikon.entry.js +1 -1
  211. package/dist/esm/porsche-ikon.entry.js +1 -1
  212. package/dist/esm/proto-ikon-loader-wc.js +10 -10
  213. package/dist/esm/proto-ikon-loader_2.entry.js +1 -1
  214. package/dist/esm/protocol-icon.entry.js +1 -1
  215. package/dist/esm/pulse-icon.entry.js +1 -1
  216. package/dist/esm/puzzle-icon.entry.js +1 -1
  217. package/dist/esm/qr-code-icon.entry.js +1 -1
  218. package/dist/esm/radio-2-icon.entry.js +1 -1
  219. package/dist/esm/radio-icon.entry.js +1 -1
  220. package/dist/esm/ram-alt-ikon.entry.js +1 -1
  221. package/dist/esm/ram-ikon.entry.js +1 -1
  222. package/dist/esm/refresh-icon.entry.js +1 -1
  223. package/dist/esm/renault-alt-ikon.entry.js +1 -1
  224. package/dist/esm/renault-ikon.entry.js +1 -1
  225. package/dist/esm/rolls-royce-ikon.entry.js +1 -1
  226. package/dist/esm/saab-alt-ikon.entry.js +1 -1
  227. package/dist/esm/saab-ikon.entry.js +1 -1
  228. package/dist/esm/saturn-ikon.entry.js +1 -1
  229. package/dist/esm/scion-ikon.entry.js +1 -1
  230. package/dist/esm/seat-ikon.entry.js +1 -1
  231. package/dist/esm/skoda-ikon.entry.js +1 -1
  232. package/dist/esm/slug-icon.entry.js +1 -1
  233. package/dist/esm/smart-ikon.entry.js +1 -1
  234. package/dist/esm/spider-icon.entry.js +1 -1
  235. package/dist/esm/spyker-alt-ikon.entry.js +1 -1
  236. package/dist/esm/spyker-ikon.entry.js +1 -1
  237. package/dist/esm/subaru-alt-ikon.entry.js +1 -1
  238. package/dist/esm/subaru-ikon.entry.js +1 -1
  239. package/dist/esm/suzuki-ikon.entry.js +1 -1
  240. package/dist/esm/svg-icon.entry.js +1 -1
  241. package/dist/esm/tesla-ikon.entry.js +1 -1
  242. package/dist/esm/toyota-ikon.entry.js +1 -1
  243. package/dist/esm/vector-curve-icon.entry.js +1 -1
  244. package/dist/esm/volkswagen-ikon.entry.js +1 -1
  245. package/dist/esm/volvo-alt-ikon.entry.js +1 -1
  246. package/dist/esm/volvo-ikon.entry.js +1 -1
  247. package/dist/esm/webhook-icon.entry.js +1 -1
  248. package/dist/proto-ikon-loader-wc/{p-95554342.entry.js → p-04119531.entry.js} +1 -1
  249. package/dist/proto-ikon-loader-wc/p-06908bcf.entry.js +1 -0
  250. package/dist/proto-ikon-loader-wc/{p-de05bdf9.entry.js → p-07d7505d.entry.js} +1 -1
  251. package/dist/proto-ikon-loader-wc/{p-bb253baf.entry.js → p-08986ced.entry.js} +1 -1
  252. package/dist/proto-ikon-loader-wc/{p-c4f6be25.entry.js → p-096f7987.entry.js} +1 -1
  253. package/dist/proto-ikon-loader-wc/{p-ff3708e2.entry.js → p-0a282dc8.entry.js} +1 -1
  254. package/dist/proto-ikon-loader-wc/{p-554468af.entry.js → p-0b78f6d9.entry.js} +1 -1
  255. package/dist/proto-ikon-loader-wc/{p-d8091138.entry.js → p-0bdd94c0.entry.js} +1 -1
  256. package/dist/proto-ikon-loader-wc/{p-13d3b575.entry.js → p-0ddf38f7.entry.js} +1 -1
  257. package/dist/proto-ikon-loader-wc/{p-78aaf08e.entry.js → p-1005240e.entry.js} +1 -1
  258. package/dist/proto-ikon-loader-wc/{p-b2b039e3.entry.js → p-1499395a.entry.js} +1 -1
  259. package/dist/proto-ikon-loader-wc/{p-a9862236.entry.js → p-174e261d.entry.js} +1 -1
  260. package/dist/proto-ikon-loader-wc/p-1d4398e1.entry.js +1 -0
  261. package/dist/proto-ikon-loader-wc/{p-9917d073.entry.js → p-1efbf7ed.entry.js} +1 -1
  262. package/dist/proto-ikon-loader-wc/{p-800569b4.entry.js → p-2032ac8a.entry.js} +1 -1
  263. package/dist/proto-ikon-loader-wc/{p-7a7c97f7.entry.js → p-2140cd08.entry.js} +1 -1
  264. package/dist/proto-ikon-loader-wc/{p-daebea62.entry.js → p-23437958.entry.js} +1 -1
  265. package/dist/proto-ikon-loader-wc/{p-517a0df1.entry.js → p-248e0fcf.entry.js} +1 -1
  266. package/dist/proto-ikon-loader-wc/{p-99b9b098.entry.js → p-2569e350.entry.js} +1 -1
  267. package/dist/proto-ikon-loader-wc/{p-460ef3ce.entry.js → p-258d3047.entry.js} +1 -1
  268. package/dist/proto-ikon-loader-wc/{p-36245eae.entry.js → p-287233ca.entry.js} +1 -1
  269. package/dist/proto-ikon-loader-wc/{p-824fc583.entry.js → p-2b1b4317.entry.js} +1 -1
  270. package/dist/proto-ikon-loader-wc/{p-fd6dd93c.entry.js → p-2fdc7b23.entry.js} +1 -1
  271. package/dist/proto-ikon-loader-wc/{p-a34c0ed5.entry.js → p-34e6289d.entry.js} +1 -1
  272. package/dist/proto-ikon-loader-wc/{p-c2a508ba.entry.js → p-35854ff7.entry.js} +1 -1
  273. package/dist/proto-ikon-loader-wc/{p-5c14da69.entry.js → p-35ad247c.entry.js} +1 -1
  274. package/dist/proto-ikon-loader-wc/{p-f17dda42.entry.js → p-37e8ad8e.entry.js} +1 -1
  275. package/dist/proto-ikon-loader-wc/p-395d02c0.js +2 -0
  276. package/dist/proto-ikon-loader-wc/{p-671789fe.entry.js → p-398d98a9.entry.js} +1 -1
  277. package/dist/proto-ikon-loader-wc/{p-faac751f.entry.js → p-3a1cce3e.entry.js} +1 -1
  278. package/dist/proto-ikon-loader-wc/{p-bd62f201.entry.js → p-3d80e3ec.entry.js} +1 -1
  279. package/dist/proto-ikon-loader-wc/p-3f81b9bf.entry.js +1 -0
  280. package/dist/proto-ikon-loader-wc/{p-7d0f7b50.entry.js → p-45eb686e.entry.js} +1 -1
  281. package/dist/proto-ikon-loader-wc/{p-d477210b.entry.js → p-464f5585.entry.js} +1 -1
  282. package/dist/proto-ikon-loader-wc/{p-f7914b8d.entry.js → p-4823a2e1.entry.js} +1 -1
  283. package/dist/proto-ikon-loader-wc/{p-160561cf.entry.js → p-4ff4e3ab.entry.js} +1 -1
  284. package/dist/proto-ikon-loader-wc/{p-98df3c83.entry.js → p-5041db2f.entry.js} +1 -1
  285. package/dist/proto-ikon-loader-wc/{p-2914c301.entry.js → p-505a9b71.entry.js} +1 -1
  286. package/dist/proto-ikon-loader-wc/{p-323c4db4.entry.js → p-51070a1b.entry.js} +1 -1
  287. package/dist/proto-ikon-loader-wc/p-5277c7bd.entry.js +1 -0
  288. package/dist/proto-ikon-loader-wc/{p-18745421.entry.js → p-57617294.entry.js} +1 -1
  289. package/dist/proto-ikon-loader-wc/p-59a7d8b3.entry.js +1 -0
  290. package/dist/proto-ikon-loader-wc/{p-8b79385a.entry.js → p-5a08f556.entry.js} +1 -1
  291. package/dist/proto-ikon-loader-wc/{p-2af63405.entry.js → p-5a21986e.entry.js} +1 -1
  292. package/dist/proto-ikon-loader-wc/p-5a69f422.entry.js +1 -0
  293. package/dist/proto-ikon-loader-wc/p-5cc6e964.entry.js +1 -0
  294. package/dist/proto-ikon-loader-wc/{p-68b2dfd7.entry.js → p-5d43de32.entry.js} +1 -1
  295. package/dist/proto-ikon-loader-wc/p-5dd8dec7.entry.js +1 -0
  296. package/dist/proto-ikon-loader-wc/{p-154bef32.entry.js → p-5fed790b.entry.js} +1 -1
  297. package/dist/proto-ikon-loader-wc/{p-ac7d8850.entry.js → p-63cf8555.entry.js} +1 -1
  298. package/dist/proto-ikon-loader-wc/{p-9a964a21.entry.js → p-6721843a.entry.js} +1 -1
  299. package/dist/proto-ikon-loader-wc/{p-d105ab28.entry.js → p-677118ca.entry.js} +1 -1
  300. package/dist/proto-ikon-loader-wc/{p-299c0966.entry.js → p-69335160.entry.js} +1 -1
  301. package/dist/proto-ikon-loader-wc/{p-4a80b67b.entry.js → p-6b4c253e.entry.js} +1 -1
  302. package/dist/proto-ikon-loader-wc/{p-76b400ba.entry.js → p-6e8ff59a.entry.js} +1 -1
  303. package/dist/proto-ikon-loader-wc/{p-9445c000.entry.js → p-730ebb2b.entry.js} +1 -1
  304. package/dist/proto-ikon-loader-wc/{p-f4bbb5cf.entry.js → p-7481affd.entry.js} +1 -1
  305. package/dist/proto-ikon-loader-wc/{p-a6d8d3de.entry.js → p-78565458.entry.js} +1 -1
  306. package/dist/proto-ikon-loader-wc/p-78659d77.entry.js +1 -0
  307. package/dist/proto-ikon-loader-wc/{p-f5f05d96.entry.js → p-7b5d6ef9.entry.js} +1 -1
  308. package/dist/proto-ikon-loader-wc/p-7ce6c5df.entry.js +1 -0
  309. package/dist/proto-ikon-loader-wc/{p-9e8ae6dc.entry.js → p-7ec583ea.entry.js} +1 -1
  310. package/dist/proto-ikon-loader-wc/{p-040940f2.entry.js → p-7fdbc5ec.entry.js} +1 -1
  311. package/dist/proto-ikon-loader-wc/{p-16cbfbac.entry.js → p-82567114.entry.js} +1 -1
  312. package/dist/proto-ikon-loader-wc/p-83d2b676.entry.js +1 -0
  313. package/dist/proto-ikon-loader-wc/{p-5e8c0c97.entry.js → p-857fe9a4.entry.js} +1 -1
  314. package/dist/proto-ikon-loader-wc/{p-173d4e6a.entry.js → p-860fdd43.entry.js} +1 -1
  315. package/dist/proto-ikon-loader-wc/{p-bf8c6c53.entry.js → p-86be9c82.entry.js} +1 -1
  316. package/dist/proto-ikon-loader-wc/{p-953d12df.entry.js → p-8a9c65c3.entry.js} +1 -1
  317. package/dist/proto-ikon-loader-wc/{p-e10a36c5.entry.js → p-8d4ebb7d.entry.js} +1 -1
  318. package/dist/proto-ikon-loader-wc/{p-500e070f.entry.js → p-8f5c5d07.entry.js} +1 -1
  319. package/dist/proto-ikon-loader-wc/{p-54a5e17e.entry.js → p-94130391.entry.js} +1 -1
  320. package/dist/proto-ikon-loader-wc/{p-8ad2a01b.entry.js → p-98ba0a4f.entry.js} +1 -1
  321. package/dist/proto-ikon-loader-wc/{p-2ee32d60.entry.js → p-99184353.entry.js} +1 -1
  322. package/dist/proto-ikon-loader-wc/{p-4b5bb1bd.entry.js → p-999e279d.entry.js} +1 -1
  323. package/dist/proto-ikon-loader-wc/{p-fb8808cd.entry.js → p-9bc7767b.entry.js} +1 -1
  324. package/dist/proto-ikon-loader-wc/{p-f919809e.entry.js → p-9e07e522.entry.js} +1 -1
  325. package/dist/proto-ikon-loader-wc/p-a08a5cc6.entry.js +1 -0
  326. package/dist/proto-ikon-loader-wc/{p-3c63062e.entry.js → p-a259db26.entry.js} +1 -1
  327. package/dist/proto-ikon-loader-wc/{p-09820ca7.entry.js → p-a2f3bb55.entry.js} +1 -1
  328. package/dist/proto-ikon-loader-wc/{p-c571bca2.entry.js → p-a61d0bba.entry.js} +1 -1
  329. package/dist/proto-ikon-loader-wc/{p-2706395d.entry.js → p-a9d1aad5.entry.js} +1 -1
  330. package/dist/proto-ikon-loader-wc/{p-f8cec354.entry.js → p-adb331c2.entry.js} +1 -1
  331. package/dist/proto-ikon-loader-wc/{p-e6935e21.entry.js → p-ae949b55.entry.js} +1 -1
  332. package/dist/proto-ikon-loader-wc/{p-8a8fa06c.entry.js → p-afacbc50.entry.js} +1 -1
  333. package/dist/proto-ikon-loader-wc/{p-1a041550.entry.js → p-b17cc550.entry.js} +1 -1
  334. package/dist/proto-ikon-loader-wc/p-b182984d.entry.js +1 -0
  335. package/dist/proto-ikon-loader-wc/{p-d9e50cc5.entry.js → p-b2cc87df.entry.js} +1 -1
  336. package/dist/proto-ikon-loader-wc/{p-97edd14b.entry.js → p-b5f7af1d.entry.js} +1 -1
  337. package/dist/proto-ikon-loader-wc/{p-20735224.entry.js → p-b6d6d2b9.entry.js} +1 -1
  338. package/dist/proto-ikon-loader-wc/{p-0eeb6909.entry.js → p-b813bd89.entry.js} +1 -1
  339. package/dist/proto-ikon-loader-wc/{p-61ddad0e.entry.js → p-bb2022a9.entry.js} +1 -1
  340. package/dist/proto-ikon-loader-wc/{p-af4476ff.entry.js → p-bdb27e4a.entry.js} +1 -1
  341. package/dist/proto-ikon-loader-wc/{p-224ba975.entry.js → p-bdb51f4d.entry.js} +1 -1
  342. package/dist/proto-ikon-loader-wc/{p-283b0a97.entry.js → p-bf996321.entry.js} +1 -1
  343. package/dist/proto-ikon-loader-wc/{p-f9699ff2.entry.js → p-c0c8e109.entry.js} +1 -1
  344. package/dist/proto-ikon-loader-wc/{p-7c675180.entry.js → p-c4db4671.entry.js} +1 -1
  345. package/dist/proto-ikon-loader-wc/{p-14220473.entry.js → p-c5f1b466.entry.js} +1 -1
  346. package/dist/proto-ikon-loader-wc/{p-85bc9cd6.entry.js → p-ce81fc79.entry.js} +1 -1
  347. package/dist/proto-ikon-loader-wc/{p-148c2ce0.entry.js → p-cf381347.entry.js} +1 -1
  348. package/dist/proto-ikon-loader-wc/{p-594f2b83.entry.js → p-d013c219.entry.js} +1 -1
  349. package/dist/proto-ikon-loader-wc/{p-6eba0b3c.entry.js → p-d949b324.entry.js} +1 -1
  350. package/dist/proto-ikon-loader-wc/{p-9c7d8783.entry.js → p-dd0b0aea.entry.js} +1 -1
  351. package/dist/proto-ikon-loader-wc/{p-345a41ca.entry.js → p-dfd7cb0f.entry.js} +1 -1
  352. package/dist/proto-ikon-loader-wc/{p-ccd7a640.entry.js → p-e04356cb.entry.js} +1 -1
  353. package/dist/proto-ikon-loader-wc/p-e1318615.entry.js +1 -0
  354. package/dist/proto-ikon-loader-wc/{p-ef4b73a1.entry.js → p-e170d62b.entry.js} +1 -1
  355. package/dist/proto-ikon-loader-wc/{p-aff3d5c6.entry.js → p-e1b45603.entry.js} +1 -1
  356. package/dist/proto-ikon-loader-wc/{p-53c59694.entry.js → p-e4f05c9c.entry.js} +1 -1
  357. package/dist/proto-ikon-loader-wc/{p-a59f9df5.entry.js → p-e5750eb2.entry.js} +1 -1
  358. package/dist/proto-ikon-loader-wc/p-e91ba2c1.entry.js +1 -0
  359. package/dist/proto-ikon-loader-wc/{p-6ccc3166.entry.js → p-e934850f.entry.js} +1 -1
  360. package/dist/proto-ikon-loader-wc/{p-420bf5c2.entry.js → p-ec07a8b4.entry.js} +1 -1
  361. package/dist/proto-ikon-loader-wc/{p-79078266.entry.js → p-f3aa7b5b.entry.js} +1 -1
  362. package/dist/proto-ikon-loader-wc/{p-3d33ebb6.entry.js → p-f471bb15.entry.js} +1 -1
  363. package/dist/proto-ikon-loader-wc/{p-7689afbf.entry.js → p-f5481b74.entry.js} +1 -1
  364. package/dist/proto-ikon-loader-wc/{p-2ca039fc.entry.js → p-f5dd0c9e.entry.js} +1 -1
  365. package/dist/proto-ikon-loader-wc/{p-4a463835.entry.js → p-f6a9a9f8.entry.js} +1 -1
  366. package/dist/proto-ikon-loader-wc/{p-8204c064.entry.js → p-f7dc67fa.entry.js} +1 -1
  367. package/dist/proto-ikon-loader-wc/{p-251f0ff4.entry.js → p-faa3b473.entry.js} +1 -1
  368. package/dist/proto-ikon-loader-wc/{p-497eff06.entry.js → p-ffc01f18.entry.js} +1 -1
  369. package/dist/proto-ikon-loader-wc/proto-ikon-loader-wc.esm.js +1 -1
  370. package/package.json +4 -4
  371. package/dist/cjs/index-2e5a65bc.js +0 -1799
  372. package/dist/esm/index-57e7b648.js +0 -1772
  373. package/dist/proto-ikon-loader-wc/p-16fb3512.entry.js +0 -1
  374. package/dist/proto-ikon-loader-wc/p-191f6a75.entry.js +0 -1
  375. package/dist/proto-ikon-loader-wc/p-2c56dce7.entry.js +0 -1
  376. package/dist/proto-ikon-loader-wc/p-2d982ba9.entry.js +0 -1
  377. package/dist/proto-ikon-loader-wc/p-2dadf5d0.entry.js +0 -1
  378. package/dist/proto-ikon-loader-wc/p-3e161105.entry.js +0 -1
  379. package/dist/proto-ikon-loader-wc/p-53e62cb7.entry.js +0 -1
  380. package/dist/proto-ikon-loader-wc/p-70911102.entry.js +0 -1
  381. package/dist/proto-ikon-loader-wc/p-7dca5080.entry.js +0 -1
  382. package/dist/proto-ikon-loader-wc/p-aae39bb1.js +0 -2
  383. package/dist/proto-ikon-loader-wc/p-ab5ed2bc.entry.js +0 -1
  384. package/dist/proto-ikon-loader-wc/p-b2c46033.entry.js +0 -1
  385. package/dist/proto-ikon-loader-wc/p-c450c404.entry.js +0 -1
  386. package/dist/proto-ikon-loader-wc/p-c96f5287.entry.js +0 -1
  387. package/dist/proto-ikon-loader-wc/p-d0671485.entry.js +0 -1
  388. package/dist/proto-ikon-loader-wc/p-eadd1252.entry.js +0 -1
@@ -1,1799 +0,0 @@
1
- 'use strict';
2
-
3
- function _interopNamespace(e) {
4
- if (e && e.__esModule) return e;
5
- var n = Object.create(null);
6
- if (e) {
7
- Object.keys(e).forEach(function (k) {
8
- if (k !== 'default') {
9
- var d = Object.getOwnPropertyDescriptor(e, k);
10
- Object.defineProperty(n, k, d.get ? d : {
11
- enumerable: true,
12
- get: function () {
13
- return e[k];
14
- }
15
- });
16
- }
17
- });
18
- }
19
- n['default'] = e;
20
- return Object.freeze(n);
21
- }
22
-
23
- const NAMESPACE = 'proto-ikon-loader-wc';
24
-
25
- /**
26
- * Virtual DOM patching algorithm based on Snabbdom by
27
- * Simon Friis Vindum (@paldepind)
28
- * Licensed under the MIT License
29
- * https://github.com/snabbdom/snabbdom/blob/master/LICENSE
30
- *
31
- * Modified for Stencil's renderer and slot projection
32
- */
33
- let scopeId;
34
- let hostTagName;
35
- let isSvgMode = false;
36
- let queuePending = false;
37
- const createTime = (fnName, tagName = '') => {
38
- {
39
- return () => {
40
- return;
41
- };
42
- }
43
- };
44
- const uniqueTime = (key, measureText) => {
45
- {
46
- return () => {
47
- return;
48
- };
49
- }
50
- };
51
- const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
52
- /**
53
- * Constant for styles to be globally applied to `slot-fb` elements for pseudo-slot behavior.
54
- *
55
- * Two cascading rules must be used instead of a `:not()` selector due to Stencil browser
56
- * support as of Stencil v4.
57
- */
58
- const SLOT_FB_CSS = 'slot-fb{display:contents}slot-fb[hidden]{display:none}';
59
- const XLINK_NS = 'http://www.w3.org/1999/xlink';
60
- /**
61
- * Default style mode id
62
- */
63
- /**
64
- * Reusable empty obj/array
65
- * Don't add values to these!!
66
- */
67
- const EMPTY_OBJ = {};
68
- /**
69
- * Namespaces
70
- */
71
- const SVG_NS = 'http://www.w3.org/2000/svg';
72
- const HTML_NS = 'http://www.w3.org/1999/xhtml';
73
- const isDef = (v) => v != null;
74
- /**
75
- * Check whether a value is a 'complex type', defined here as an object or a
76
- * function.
77
- *
78
- * @param o the value to check
79
- * @returns whether it's a complex type or not
80
- */
81
- const isComplexType = (o) => {
82
- // https://jsperf.com/typeof-fn-object/5
83
- o = typeof o;
84
- return o === 'object' || o === 'function';
85
- };
86
- /**
87
- * Helper method for querying a `meta` tag that contains a nonce value
88
- * out of a DOM's head.
89
- *
90
- * @param doc The DOM containing the `head` to query against
91
- * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag
92
- * exists or the tag has no content.
93
- */
94
- function queryNonceMetaTagContent(doc) {
95
- var _a, _b, _c;
96
- return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;
97
- }
98
- /**
99
- * Production h() function based on Preact by
100
- * Jason Miller (@developit)
101
- * Licensed under the MIT License
102
- * https://github.com/developit/preact/blob/master/LICENSE
103
- *
104
- * Modified for Stencil's compiler and vdom
105
- */
106
- // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
107
- // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
108
- const h = (nodeName, vnodeData, ...children) => {
109
- let child = null;
110
- let key = null;
111
- let simple = false;
112
- let lastSimple = false;
113
- const vNodeChildren = [];
114
- const walk = (c) => {
115
- for (let i = 0; i < c.length; i++) {
116
- child = c[i];
117
- if (Array.isArray(child)) {
118
- walk(child);
119
- }
120
- else if (child != null && typeof child !== 'boolean') {
121
- if ((simple = typeof nodeName !== 'function' && !isComplexType(child))) {
122
- child = String(child);
123
- }
124
- if (simple && lastSimple) {
125
- // If the previous child was simple (string), we merge both
126
- vNodeChildren[vNodeChildren.length - 1].$text$ += child;
127
- }
128
- else {
129
- // Append a new vNode, if it's text, we create a text vNode
130
- vNodeChildren.push(simple ? newVNode(null, child) : child);
131
- }
132
- lastSimple = simple;
133
- }
134
- }
135
- };
136
- walk(children);
137
- if (vnodeData) {
138
- if (vnodeData.key) {
139
- key = vnodeData.key;
140
- }
141
- // normalize class / className attributes
142
- {
143
- const classData = vnodeData.className || vnodeData.class;
144
- if (classData) {
145
- vnodeData.class =
146
- typeof classData !== 'object'
147
- ? classData
148
- : Object.keys(classData)
149
- .filter((k) => classData[k])
150
- .join(' ');
151
- }
152
- }
153
- }
154
- if (typeof nodeName === 'function') {
155
- // nodeName is a functional component
156
- return nodeName(vnodeData === null ? {} : vnodeData, vNodeChildren, vdomFnUtils);
157
- }
158
- const vnode = newVNode(nodeName, null);
159
- vnode.$attrs$ = vnodeData;
160
- if (vNodeChildren.length > 0) {
161
- vnode.$children$ = vNodeChildren;
162
- }
163
- {
164
- vnode.$key$ = key;
165
- }
166
- return vnode;
167
- };
168
- /**
169
- * A utility function for creating a virtual DOM node from a tag and some
170
- * possible text content.
171
- *
172
- * @param tag the tag for this element
173
- * @param text possible text content for the node
174
- * @returns a newly-minted virtual DOM node
175
- */
176
- const newVNode = (tag, text) => {
177
- const vnode = {
178
- $flags$: 0,
179
- $tag$: tag,
180
- $text$: text,
181
- $elm$: null,
182
- $children$: null,
183
- };
184
- {
185
- vnode.$attrs$ = null;
186
- }
187
- {
188
- vnode.$key$ = null;
189
- }
190
- return vnode;
191
- };
192
- const Host = {};
193
- /**
194
- * Check whether a given node is a Host node or not
195
- *
196
- * @param node the virtual DOM node to check
197
- * @returns whether it's a Host node or not
198
- */
199
- const isHost = (node) => node && node.$tag$ === Host;
200
- /**
201
- * Implementation of {@link d.FunctionalUtilities} for Stencil's VDom.
202
- *
203
- * Note that these functions convert from {@link d.VNode} to
204
- * {@link d.ChildNode} to give functional component developers a friendly
205
- * interface.
206
- */
207
- const vdomFnUtils = {
208
- forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
209
- map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate),
210
- };
211
- /**
212
- * Convert a {@link d.VNode} to a {@link d.ChildNode} in order to present a
213
- * friendlier public interface (hence, 'convertToPublic').
214
- *
215
- * @param node the virtual DOM node to convert
216
- * @returns a converted child node
217
- */
218
- const convertToPublic = (node) => ({
219
- vattrs: node.$attrs$,
220
- vchildren: node.$children$,
221
- vkey: node.$key$,
222
- vname: node.$name$,
223
- vtag: node.$tag$,
224
- vtext: node.$text$,
225
- });
226
- /**
227
- * Convert a {@link d.ChildNode} back to an equivalent {@link d.VNode} in
228
- * order to use the resulting object in the virtual DOM. The initial object was
229
- * likely created as part of presenting a public API, so converting it back
230
- * involved making it 'private' again (hence, `convertToPrivate`).
231
- *
232
- * @param node the child node to convert
233
- * @returns a converted virtual DOM node
234
- */
235
- const convertToPrivate = (node) => {
236
- if (typeof node.vtag === 'function') {
237
- const vnodeData = Object.assign({}, node.vattrs);
238
- if (node.vkey) {
239
- vnodeData.key = node.vkey;
240
- }
241
- if (node.vname) {
242
- vnodeData.name = node.vname;
243
- }
244
- return h(node.vtag, vnodeData, ...(node.vchildren || []));
245
- }
246
- const vnode = newVNode(node.vtag, node.vtext);
247
- vnode.$attrs$ = node.vattrs;
248
- vnode.$children$ = node.vchildren;
249
- vnode.$key$ = node.vkey;
250
- vnode.$name$ = node.vname;
251
- return vnode;
252
- };
253
- /**
254
- * Parse a new property value for a given property type.
255
- *
256
- * While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
257
- * it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
258
- * 1. `any`, the type given to `propValue` in the function signature
259
- * 2. the type stored from `propType`.
260
- *
261
- * This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
262
- *
263
- * Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
264
- * a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
265
- * based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
266
- * ```tsx
267
- * <my-cmp prop-val={0}></my-cmp>
268
- * ```
269
- *
270
- * HTML prop values on the other hand, will always a string
271
- *
272
- * @param propValue the new value to coerce to some type
273
- * @param propType the type of the prop, expressed as a binary number
274
- * @returns the parsed/coerced value
275
- */
276
- const parsePropertyValue = (propValue, propType) => {
277
- // ensure this value is of the correct prop type
278
- if (propValue != null && !isComplexType(propValue)) {
279
- if (propType & 4 /* MEMBER_FLAGS.Boolean */) {
280
- // per the HTML spec, any string value means it is a boolean true value
281
- // but we'll cheat here and say that the string "false" is the boolean false
282
- return propValue === 'false' ? false : propValue === '' || !!propValue;
283
- }
284
- if (propType & 2 /* MEMBER_FLAGS.Number */) {
285
- // force it to be a number
286
- return parseFloat(propValue);
287
- }
288
- if (propType & 1 /* MEMBER_FLAGS.String */) {
289
- // could have been passed as a number or boolean
290
- // but we still want it as a string
291
- return String(propValue);
292
- }
293
- // redundant return here for better minification
294
- return propValue;
295
- }
296
- // not sure exactly what type we want
297
- // so no need to change to a different type
298
- return propValue;
299
- };
300
- const getElement = (ref) => (getHostRef(ref).$hostElement$ );
301
- /**
302
- * Helper function to create & dispatch a custom Event on a provided target
303
- * @param elm the target of the Event
304
- * @param name the name to give the custom Event
305
- * @param opts options for configuring a custom Event
306
- * @returns the custom Event
307
- */
308
- const emitEvent = (elm, name, opts) => {
309
- const ev = plt.ce(name, opts);
310
- elm.dispatchEvent(ev);
311
- return ev;
312
- };
313
- const rootAppliedStyles = /*@__PURE__*/ new WeakMap();
314
- const registerStyle = (scopeId, cssText, allowCS) => {
315
- let style = styles.get(scopeId);
316
- if (supportsConstructableStylesheets && allowCS) {
317
- style = (style || new CSSStyleSheet());
318
- if (typeof style === 'string') {
319
- style = cssText;
320
- }
321
- else {
322
- style.replaceSync(cssText);
323
- }
324
- }
325
- else {
326
- style = cssText;
327
- }
328
- styles.set(scopeId, style);
329
- };
330
- const addStyle = (styleContainerNode, cmpMeta, mode) => {
331
- var _a;
332
- const scopeId = getScopeId(cmpMeta);
333
- const style = styles.get(scopeId);
334
- // if an element is NOT connected then getRootNode() will return the wrong root node
335
- // so the fallback is to always use the document for the root node in those cases
336
- styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;
337
- if (style) {
338
- if (typeof style === 'string') {
339
- styleContainerNode = styleContainerNode.head || styleContainerNode;
340
- let appliedStyles = rootAppliedStyles.get(styleContainerNode);
341
- let styleElm;
342
- if (!appliedStyles) {
343
- rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
344
- }
345
- if (!appliedStyles.has(scopeId)) {
346
- {
347
- styleElm = doc.createElement('style');
348
- styleElm.innerHTML = style;
349
- // Apply CSP nonce to the style tag if it exists
350
- const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
351
- if (nonce != null) {
352
- styleElm.setAttribute('nonce', nonce);
353
- }
354
- styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
355
- }
356
- // Add styles for `slot-fb` elements if we're using slots outside the Shadow DOM
357
- if (cmpMeta.$flags$ & 4 /* CMP_FLAGS.hasSlotRelocation */) {
358
- styleElm.innerHTML += SLOT_FB_CSS;
359
- }
360
- if (appliedStyles) {
361
- appliedStyles.add(scopeId);
362
- }
363
- }
364
- }
365
- else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
366
- styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
367
- }
368
- }
369
- return scopeId;
370
- };
371
- const attachStyles = (hostRef) => {
372
- const cmpMeta = hostRef.$cmpMeta$;
373
- const elm = hostRef.$hostElement$;
374
- const flags = cmpMeta.$flags$;
375
- const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
376
- const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
377
- if (flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) {
378
- // only required when we're NOT using native shadow dom (slot)
379
- // or this browser doesn't support native shadow dom
380
- // and this host element was NOT created with SSR
381
- // let's pick out the inner content for slot projection
382
- // create a node to represent where the original
383
- // content was first placed, which is useful later on
384
- // DOM WRITE!!
385
- elm['s-sc'] = scopeId;
386
- elm.classList.add(scopeId + '-h');
387
- }
388
- endAttachStyles();
389
- };
390
- const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
391
- /**
392
- * Production setAccessor() function based on Preact by
393
- * Jason Miller (@developit)
394
- * Licensed under the MIT License
395
- * https://github.com/developit/preact/blob/master/LICENSE
396
- *
397
- * Modified for Stencil's compiler and vdom
398
- */
399
- /**
400
- * When running a VDom render set properties present on a VDom node onto the
401
- * corresponding HTML element.
402
- *
403
- * Note that this function has special functionality for the `class`,
404
- * `style`, `key`, and `ref` attributes, as well as event handlers (like
405
- * `onClick`, etc). All others are just passed through as-is.
406
- *
407
- * @param elm the HTMLElement onto which attributes should be set
408
- * @param memberName the name of the attribute to set
409
- * @param oldValue the old value for the attribute
410
- * @param newValue the new value for the attribute
411
- * @param isSvg whether we're in an svg context or not
412
- * @param flags bitflags for Vdom variables
413
- */
414
- const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
415
- if (oldValue !== newValue) {
416
- let isProp = isMemberInElement(elm, memberName);
417
- let ln = memberName.toLowerCase();
418
- if (memberName === 'class') {
419
- const classList = elm.classList;
420
- const oldClasses = parseClassList(oldValue);
421
- const newClasses = parseClassList(newValue);
422
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
423
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
424
- }
425
- else if (memberName === 'key')
426
- ;
427
- else {
428
- // Set property if it exists and it's not a SVG
429
- const isComplex = isComplexType(newValue);
430
- if ((isProp || (isComplex && newValue !== null)) && !isSvg) {
431
- try {
432
- if (!elm.tagName.includes('-')) {
433
- const n = newValue == null ? '' : newValue;
434
- // Workaround for Safari, moving the <input> caret when re-assigning the same valued
435
- if (memberName === 'list') {
436
- isProp = false;
437
- }
438
- else if (oldValue == null || elm[memberName] != n) {
439
- elm[memberName] = n;
440
- }
441
- }
442
- else {
443
- elm[memberName] = newValue;
444
- }
445
- }
446
- catch (e) {
447
- /**
448
- * in case someone tries to set a read-only property, e.g. "namespaceURI", we just ignore it
449
- */
450
- }
451
- }
452
- /**
453
- * Need to manually update attribute if:
454
- * - memberName is not an attribute
455
- * - if we are rendering the host element in order to reflect attribute
456
- * - if it's a SVG, since properties might not work in <svg>
457
- * - if the newValue is null/undefined or 'false'.
458
- */
459
- let xlink = false;
460
- {
461
- if (ln !== (ln = ln.replace(/^xlink\:?/, ''))) {
462
- memberName = ln;
463
- xlink = true;
464
- }
465
- }
466
- if (newValue == null || newValue === false) {
467
- if (newValue !== false || elm.getAttribute(memberName) === '') {
468
- if (xlink) {
469
- elm.removeAttributeNS(XLINK_NS, memberName);
470
- }
471
- else {
472
- elm.removeAttribute(memberName);
473
- }
474
- }
475
- }
476
- else if ((!isProp || flags & 4 /* VNODE_FLAGS.isHost */ || isSvg) && !isComplex) {
477
- newValue = newValue === true ? '' : newValue;
478
- if (xlink) {
479
- elm.setAttributeNS(XLINK_NS, memberName, newValue);
480
- }
481
- else {
482
- elm.setAttribute(memberName, newValue);
483
- }
484
- }
485
- }
486
- }
487
- };
488
- const parseClassListRegex = /\s/;
489
- /**
490
- * Parsed a string of classnames into an array
491
- * @param value className string, e.g. "foo bar baz"
492
- * @returns list of classes, e.g. ["foo", "bar", "baz"]
493
- */
494
- const parseClassList = (value) => (!value ? [] : value.split(parseClassListRegex));
495
- const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
496
- // if the element passed in is a shadow root, which is a document fragment
497
- // then we want to be adding attrs/props to the shadow root's "host" element
498
- // if it's not a shadow root, then we add attrs/props to the same element
499
- const elm = newVnode.$elm$.nodeType === 11 /* NODE_TYPE.DocumentFragment */ && newVnode.$elm$.host
500
- ? newVnode.$elm$.host
501
- : newVnode.$elm$;
502
- const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
503
- const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
504
- {
505
- // remove attributes no longer present on the vnode by setting them to undefined
506
- for (memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
507
- if (!(memberName in newVnodeAttrs)) {
508
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], undefined, isSvgMode, newVnode.$flags$);
509
- }
510
- }
511
- }
512
- // add new & update changed attributes
513
- for (memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
514
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
515
- }
516
- };
517
- /**
518
- * Sort a list of attribute names to ensure that all the attribute names which
519
- * are _not_ `"ref"` come before `"ref"`. Preserve the order of the non-ref
520
- * attributes.
521
- *
522
- * **Note**: if the supplied attributes do not include `'ref'` then the same
523
- * (by reference) array will be returned without modification.
524
- *
525
- * @param attrNames attribute names to sort
526
- * @returns a list of attribute names, sorted if they include `"ref"`
527
- */
528
- function sortedAttrNames(attrNames) {
529
- return attrNames.includes('ref')
530
- ? // we need to sort these to ensure that `'ref'` is the last attr
531
- [...attrNames.filter((attr) => attr !== 'ref'), 'ref']
532
- : // no need to sort, return the original array
533
- attrNames;
534
- }
535
- /**
536
- * Create a DOM Node corresponding to one of the children of a given VNode.
537
- *
538
- * @param oldParentVNode the parent VNode from the previous render
539
- * @param newParentVNode the parent VNode from the current render
540
- * @param childIndex the index of the VNode, in the _new_ parent node's
541
- * children, for which we will create a new DOM node
542
- * @param parentElm the parent DOM node which our new node will be a child of
543
- * @returns the newly created node
544
- */
545
- const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
546
- // tslint:disable-next-line: prefer-const
547
- const newVNode = newParentVNode.$children$[childIndex];
548
- let i = 0;
549
- let elm;
550
- let childNode;
551
- if (newVNode.$text$ !== null) {
552
- // create text node
553
- elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
554
- }
555
- else {
556
- if (!isSvgMode) {
557
- isSvgMode = newVNode.$tag$ === 'svg';
558
- }
559
- // create element
560
- elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$tag$)
561
- );
562
- if (isSvgMode && newVNode.$tag$ === 'foreignObject') {
563
- isSvgMode = false;
564
- }
565
- // add css classes, attrs, props, listeners, etc.
566
- {
567
- updateElement(null, newVNode, isSvgMode);
568
- }
569
- if (isDef(scopeId) && elm['s-si'] !== scopeId) {
570
- // if there is a scopeId and this is the initial render
571
- // then let's add the scopeId as a css class
572
- elm.classList.add((elm['s-si'] = scopeId));
573
- }
574
- if (newVNode.$children$) {
575
- for (i = 0; i < newVNode.$children$.length; ++i) {
576
- // create the node
577
- childNode = createElm(oldParentVNode, newVNode, i);
578
- // return node could have been null
579
- if (childNode) {
580
- // append our new node
581
- elm.appendChild(childNode);
582
- }
583
- }
584
- }
585
- {
586
- if (newVNode.$tag$ === 'svg') {
587
- // Only reset the SVG context when we're exiting <svg> element
588
- isSvgMode = false;
589
- }
590
- else if (elm.tagName === 'foreignObject') {
591
- // Reenter SVG context when we're exiting <foreignObject> element
592
- isSvgMode = true;
593
- }
594
- }
595
- }
596
- // This needs to always happen so we can hide nodes that are projected
597
- // to another component but don't end up in a slot
598
- elm['s-hn'] = hostTagName;
599
- return elm;
600
- };
601
- /**
602
- * Create DOM nodes corresponding to a list of {@link d.Vnode} objects and
603
- * add them to the DOM in the appropriate place.
604
- *
605
- * @param parentElm the DOM node which should be used as a parent for the new
606
- * DOM nodes
607
- * @param before a child of the `parentElm` which the new children should be
608
- * inserted before (optional)
609
- * @param parentVNode the parent virtual DOM node
610
- * @param vnodes the new child virtual DOM nodes to produce DOM nodes for
611
- * @param startIdx the index in the child virtual DOM nodes at which to start
612
- * creating DOM nodes (inclusive)
613
- * @param endIdx the index in the child virtual DOM nodes at which to stop
614
- * creating DOM nodes (inclusive)
615
- */
616
- const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
617
- let containerElm = (parentElm);
618
- let childNode;
619
- if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
620
- containerElm = containerElm.shadowRoot;
621
- }
622
- for (; startIdx <= endIdx; ++startIdx) {
623
- if (vnodes[startIdx]) {
624
- childNode = createElm(null, parentVNode, startIdx);
625
- if (childNode) {
626
- vnodes[startIdx].$elm$ = childNode;
627
- containerElm.insertBefore(childNode, before);
628
- }
629
- }
630
- }
631
- };
632
- /**
633
- * Remove the DOM elements corresponding to a list of {@link d.VNode} objects.
634
- * This can be used to, for instance, clean up after a list of children which
635
- * should no longer be shown.
636
- *
637
- * This function also handles some of Stencil's slot relocation logic.
638
- *
639
- * @param vnodes a list of virtual DOM nodes to remove
640
- * @param startIdx the index at which to start removing nodes (inclusive)
641
- * @param endIdx the index at which to stop removing nodes (inclusive)
642
- */
643
- const removeVnodes = (vnodes, startIdx, endIdx) => {
644
- for (let index = startIdx; index <= endIdx; ++index) {
645
- const vnode = vnodes[index];
646
- if (vnode) {
647
- const elm = vnode.$elm$;
648
- if (elm) {
649
- // remove the vnode's element from the dom
650
- elm.remove();
651
- }
652
- }
653
- }
654
- };
655
- /**
656
- * Reconcile the children of a new VNode with the children of an old VNode by
657
- * traversing the two collections of children, identifying nodes that are
658
- * conserved or changed, calling out to `patch` to make any necessary
659
- * updates to the DOM, and rearranging DOM nodes as needed.
660
- *
661
- * The algorithm for reconciling children works by analyzing two 'windows' onto
662
- * the two arrays of children (`oldCh` and `newCh`). We keep track of the
663
- * 'windows' by storing start and end indices and references to the
664
- * corresponding array entries. Initially the two 'windows' are basically equal
665
- * to the entire array, but we progressively narrow the windows until there are
666
- * no children left to update by doing the following:
667
- *
668
- * 1. Skip any `null` entries at the beginning or end of the two arrays, so
669
- * that if we have an initial array like the following we'll end up dealing
670
- * only with a window bounded by the highlighted elements:
671
- *
672
- * [null, null, VNode1 , ... , VNode2, null, null]
673
- * ^^^^^^ ^^^^^^
674
- *
675
- * 2. Check to see if the elements at the head and tail positions are equal
676
- * across the windows. This will basically detect elements which haven't
677
- * been added, removed, or changed position, i.e. if you had the following
678
- * VNode elements (represented as HTML):
679
- *
680
- * oldVNode: `<div><p><span>HEY</span></p></div>`
681
- * newVNode: `<div><p><span>THERE</span></p></div>`
682
- *
683
- * Then when comparing the children of the `<div>` tag we check the equality
684
- * of the VNodes corresponding to the `<p>` tags and, since they are the
685
- * same tag in the same position, we'd be able to avoid completely
686
- * re-rendering the subtree under them with a new DOM element and would just
687
- * call out to `patch` to handle reconciling their children and so on.
688
- *
689
- * 3. Check, for both windows, to see if the element at the beginning of the
690
- * window corresponds to the element at the end of the other window. This is
691
- * a heuristic which will let us identify _some_ situations in which
692
- * elements have changed position, for instance it _should_ detect that the
693
- * children nodes themselves have not changed but merely moved in the
694
- * following example:
695
- *
696
- * oldVNode: `<div><element-one /><element-two /></div>`
697
- * newVNode: `<div><element-two /><element-one /></div>`
698
- *
699
- * If we find cases like this then we also need to move the concrete DOM
700
- * elements corresponding to the moved children to write the re-order to the
701
- * DOM.
702
- *
703
- * 4. Finally, if VNodes have the `key` attribute set on them we check for any
704
- * nodes in the old children which have the same key as the first element in
705
- * our window on the new children. If we find such a node we handle calling
706
- * out to `patch`, moving relevant DOM nodes, and so on, in accordance with
707
- * what we find.
708
- *
709
- * Finally, once we've narrowed our 'windows' to the point that either of them
710
- * collapse (i.e. they have length 0) we then handle any remaining VNode
711
- * insertion or deletion that needs to happen to get a DOM state that correctly
712
- * reflects the new child VNodes. If, for instance, after our window on the old
713
- * children has collapsed we still have more nodes on the new children that
714
- * we haven't dealt with yet then we need to add them, or if the new children
715
- * collapse but we still have unhandled _old_ children then we need to make
716
- * sure the corresponding DOM nodes are removed.
717
- *
718
- * @param parentElm the node into which the parent VNode is rendered
719
- * @param oldCh the old children of the parent node
720
- * @param newVNode the new VNode which will replace the parent
721
- * @param newCh the new children of the parent node
722
- * @param isInitialRender whether or not this is the first render of the vdom
723
- */
724
- const updateChildren = (parentElm, oldCh, newVNode, newCh, isInitialRender = false) => {
725
- let oldStartIdx = 0;
726
- let newStartIdx = 0;
727
- let idxInOld = 0;
728
- let i = 0;
729
- let oldEndIdx = oldCh.length - 1;
730
- let oldStartVnode = oldCh[0];
731
- let oldEndVnode = oldCh[oldEndIdx];
732
- let newEndIdx = newCh.length - 1;
733
- let newStartVnode = newCh[0];
734
- let newEndVnode = newCh[newEndIdx];
735
- let node;
736
- let elmToMove;
737
- while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
738
- if (oldStartVnode == null) {
739
- // VNode might have been moved left
740
- oldStartVnode = oldCh[++oldStartIdx];
741
- }
742
- else if (oldEndVnode == null) {
743
- oldEndVnode = oldCh[--oldEndIdx];
744
- }
745
- else if (newStartVnode == null) {
746
- newStartVnode = newCh[++newStartIdx];
747
- }
748
- else if (newEndVnode == null) {
749
- newEndVnode = newCh[--newEndIdx];
750
- }
751
- else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {
752
- // if the start nodes are the same then we should patch the new VNode
753
- // onto the old one, and increment our `newStartIdx` and `oldStartIdx`
754
- // indices to reflect that. We don't need to move any DOM Nodes around
755
- // since things are matched up in order.
756
- patch(oldStartVnode, newStartVnode, isInitialRender);
757
- oldStartVnode = oldCh[++oldStartIdx];
758
- newStartVnode = newCh[++newStartIdx];
759
- }
760
- else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {
761
- // likewise, if the end nodes are the same we patch new onto old and
762
- // decrement our end indices, and also likewise in this case we don't
763
- // need to move any DOM Nodes.
764
- patch(oldEndVnode, newEndVnode, isInitialRender);
765
- oldEndVnode = oldCh[--oldEndIdx];
766
- newEndVnode = newCh[--newEndIdx];
767
- }
768
- else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
769
- patch(oldStartVnode, newEndVnode, isInitialRender);
770
- // We need to move the element for `oldStartVnode` into a position which
771
- // will be appropriate for `newEndVnode`. For this we can use
772
- // `.insertBefore` and `oldEndVnode.$elm$.nextSibling`. If there is a
773
- // sibling for `oldEndVnode.$elm$` then we want to move the DOM node for
774
- // `oldStartVnode` between `oldEndVnode` and it's sibling, like so:
775
- //
776
- // <old-start-node />
777
- // <some-intervening-node />
778
- // <old-end-node />
779
- // <!-- -> <-- `oldStartVnode.$elm$` should be inserted here
780
- // <next-sibling />
781
- //
782
- // If instead `oldEndVnode.$elm$` has no sibling then we just want to put
783
- // the node for `oldStartVnode` at the end of the children of
784
- // `parentElm`. Luckily, `Node.nextSibling` will return `null` if there
785
- // aren't any siblings, and passing `null` to `Node.insertBefore` will
786
- // append it to the children of the parent element.
787
- parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
788
- oldStartVnode = oldCh[++oldStartIdx];
789
- newEndVnode = newCh[--newEndIdx];
790
- }
791
- else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
792
- patch(oldEndVnode, newStartVnode, isInitialRender);
793
- // We've already checked above if `oldStartVnode` and `newStartVnode` are
794
- // the same node, so since we're here we know that they are not. Thus we
795
- // can move the element for `oldEndVnode` _before_ the element for
796
- // `oldStartVnode`, leaving `oldStartVnode` to be reconciled in the
797
- // future.
798
- parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
799
- oldEndVnode = oldCh[--oldEndIdx];
800
- newStartVnode = newCh[++newStartIdx];
801
- }
802
- else {
803
- // Here we do some checks to match up old and new nodes based on the
804
- // `$key$` attribute, which is set by putting a `key="my-key"` attribute
805
- // in the JSX for a DOM element in the implementation of a Stencil
806
- // component.
807
- //
808
- // First we check to see if there are any nodes in the array of old
809
- // children which have the same key as the first node in the new
810
- // children.
811
- idxInOld = -1;
812
- {
813
- for (i = oldStartIdx; i <= oldEndIdx; ++i) {
814
- if (oldCh[i] && oldCh[i].$key$ !== null && oldCh[i].$key$ === newStartVnode.$key$) {
815
- idxInOld = i;
816
- break;
817
- }
818
- }
819
- }
820
- if (idxInOld >= 0) {
821
- // We found a node in the old children which matches up with the first
822
- // node in the new children! So let's deal with that
823
- elmToMove = oldCh[idxInOld];
824
- if (elmToMove.$tag$ !== newStartVnode.$tag$) {
825
- // the tag doesn't match so we'll need a new DOM element
826
- node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld);
827
- }
828
- else {
829
- patch(elmToMove, newStartVnode, isInitialRender);
830
- // invalidate the matching old node so that we won't try to update it
831
- // again later on
832
- oldCh[idxInOld] = undefined;
833
- node = elmToMove.$elm$;
834
- }
835
- newStartVnode = newCh[++newStartIdx];
836
- }
837
- else {
838
- // We either didn't find an element in the old children that matches
839
- // the key of the first new child OR the build is not using `key`
840
- // attributes at all. In either case we need to create a new element
841
- // for the new node.
842
- node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx);
843
- newStartVnode = newCh[++newStartIdx];
844
- }
845
- if (node) {
846
- // if we created a new node then handle inserting it to the DOM
847
- {
848
- oldStartVnode.$elm$.parentNode.insertBefore(node, oldStartVnode.$elm$);
849
- }
850
- }
851
- }
852
- }
853
- if (oldStartIdx > oldEndIdx) {
854
- // we have some more new nodes to add which don't match up with old nodes
855
- addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx);
856
- }
857
- else if (newStartIdx > newEndIdx) {
858
- // there are nodes in the `oldCh` array which no longer correspond to nodes
859
- // in the new array, so lets remove them (which entails cleaning up the
860
- // relevant DOM nodes)
861
- removeVnodes(oldCh, oldStartIdx, oldEndIdx);
862
- }
863
- };
864
- /**
865
- * Compare two VNodes to determine if they are the same
866
- *
867
- * **NB**: This function is an equality _heuristic_ based on the available
868
- * information set on the two VNodes and can be misleading under certain
869
- * circumstances. In particular, if the two nodes do not have `key` attrs
870
- * (available under `$key$` on VNodes) then the function falls back on merely
871
- * checking that they have the same tag.
872
- *
873
- * So, in other words, if `key` attrs are not set on VNodes which may be
874
- * changing order within a `children` array or something along those lines then
875
- * we could obtain a false negative and then have to do needless re-rendering
876
- * (i.e. we'd say two VNodes aren't equal when in fact they should be).
877
- *
878
- * @param leftVNode the first VNode to check
879
- * @param rightVNode the second VNode to check
880
- * @param isInitialRender whether or not this is the first render of the vdom
881
- * @returns whether they're equal or not
882
- */
883
- const isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
884
- // compare if two vnode to see if they're "technically" the same
885
- // need to have the same element tag, and same key to be the same
886
- if (leftVNode.$tag$ === rightVNode.$tag$) {
887
- // this will be set if JSX tags in the build have `key` attrs set on them
888
- // we only want to check this if we're not on the first render since on
889
- // first render `leftVNode.$key$` will always be `null`, so we can be led
890
- // astray and, for instance, accidentally delete a DOM node that we want to
891
- // keep around.
892
- if (!isInitialRender) {
893
- return leftVNode.$key$ === rightVNode.$key$;
894
- }
895
- return true;
896
- }
897
- return false;
898
- };
899
- /**
900
- * Handle reconciling an outdated VNode with a new one which corresponds to
901
- * it. This function handles flushing updates to the DOM and reconciling the
902
- * children of the two nodes (if any).
903
- *
904
- * @param oldVNode an old VNode whose DOM element and children we want to update
905
- * @param newVNode a new VNode representing an updated version of the old one
906
- * @param isInitialRender whether or not this is the first render of the vdom
907
- */
908
- const patch = (oldVNode, newVNode, isInitialRender = false) => {
909
- const elm = (newVNode.$elm$ = oldVNode.$elm$);
910
- const oldChildren = oldVNode.$children$;
911
- const newChildren = newVNode.$children$;
912
- const tag = newVNode.$tag$;
913
- const text = newVNode.$text$;
914
- if (text === null) {
915
- {
916
- // test if we're rendering an svg element, or still rendering nodes inside of one
917
- // only add this to the when the compiler sees we're using an svg somewhere
918
- isSvgMode = tag === 'svg' ? true : tag === 'foreignObject' ? false : isSvgMode;
919
- }
920
- {
921
- {
922
- // either this is the first render of an element OR it's an update
923
- // AND we already know it's possible it could have changed
924
- // this updates the element's css classes, attrs, props, listeners, etc.
925
- updateElement(oldVNode, newVNode, isSvgMode);
926
- }
927
- }
928
- if (oldChildren !== null && newChildren !== null) {
929
- // looks like there's child vnodes for both the old and new vnodes
930
- // so we need to call `updateChildren` to reconcile them
931
- updateChildren(elm, oldChildren, newVNode, newChildren, isInitialRender);
932
- }
933
- else if (newChildren !== null) {
934
- // no old child vnodes, but there are new child vnodes to add
935
- if (oldVNode.$text$ !== null) {
936
- // the old vnode was text, so be sure to clear it out
937
- elm.textContent = '';
938
- }
939
- // add the new vnode children
940
- addVnodes(elm, null, newVNode, newChildren, 0, newChildren.length - 1);
941
- }
942
- else if (oldChildren !== null) {
943
- // no new child vnodes, but there are old child vnodes to remove
944
- removeVnodes(oldChildren, 0, oldChildren.length - 1);
945
- }
946
- if (isSvgMode && tag === 'svg') {
947
- isSvgMode = false;
948
- }
949
- }
950
- else if (oldVNode.$text$ !== text) {
951
- // update the text content for the text only vnode
952
- // and also only if the text is different than before
953
- elm.data = text;
954
- }
955
- };
956
- /**
957
- * The main entry point for Stencil's virtual DOM-based rendering engine
958
- *
959
- * Given a {@link d.HostRef} container and some virtual DOM nodes, this
960
- * function will handle creating a virtual DOM tree with a single root, patching
961
- * the current virtual DOM tree onto an old one (if any), dealing with slot
962
- * relocation, and reflecting attributes.
963
- *
964
- * @param hostRef data needed to root and render the virtual DOM tree, such as
965
- * the DOM node into which it should be rendered.
966
- * @param renderFnResults the virtual DOM nodes to be rendered
967
- * @param isInitialLoad whether or not this is the first call after page load
968
- */
969
- const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
970
- const hostElm = hostRef.$hostElement$;
971
- const oldVNode = hostRef.$vnode$ || newVNode(null, null);
972
- // if `renderFnResults` is a Host node then we can use it directly. If not,
973
- // we need to call `h` again to wrap the children of our component in a
974
- // 'dummy' Host node (well, an empty vnode) since `renderVdom` assumes
975
- // implicitly that the top-level vdom node is 1) an only child and 2)
976
- // contains attrs that need to be set on the host element.
977
- const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
978
- hostTagName = hostElm.tagName;
979
- // On the first render and *only* on the first render we want to check for
980
- // any attributes set on the host element which are also set on the vdom
981
- // node. If we find them, we override the value on the VDom node attrs with
982
- // the value from the host element, which allows developers building apps
983
- // with Stencil components to override e.g. the `role` attribute on a
984
- // component even if it's already set on the `Host`.
985
- if (isInitialLoad && rootVnode.$attrs$) {
986
- for (const key of Object.keys(rootVnode.$attrs$)) {
987
- // We have a special implementation in `setAccessor` for `style` and
988
- // `class` which reconciles values coming from the VDom with values
989
- // already present on the DOM element, so we don't want to override those
990
- // attributes on the VDom tree with values from the host element if they
991
- // are present.
992
- //
993
- // Likewise, `ref` and `key` are special internal values for the Stencil
994
- // runtime and we don't want to override those either.
995
- if (hostElm.hasAttribute(key) && !['key', 'ref', 'style', 'class'].includes(key)) {
996
- rootVnode.$attrs$[key] = hostElm[key];
997
- }
998
- }
999
- }
1000
- rootVnode.$tag$ = null;
1001
- rootVnode.$flags$ |= 4 /* VNODE_FLAGS.isHost */;
1002
- hostRef.$vnode$ = rootVnode;
1003
- rootVnode.$elm$ = oldVNode.$elm$ = (hostElm.shadowRoot || hostElm );
1004
- {
1005
- scopeId = hostElm['s-sc'];
1006
- }
1007
- // synchronous patch
1008
- patch(oldVNode, rootVnode, isInitialLoad);
1009
- };
1010
- const attachToAncestor = (hostRef, ancestorComponent) => {
1011
- if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
1012
- ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
1013
- }
1014
- };
1015
- const scheduleUpdate = (hostRef, isInitialLoad) => {
1016
- {
1017
- hostRef.$flags$ |= 16 /* HOST_FLAGS.isQueuedForUpdate */;
1018
- }
1019
- if (hostRef.$flags$ & 4 /* HOST_FLAGS.isWaitingForChildren */) {
1020
- hostRef.$flags$ |= 512 /* HOST_FLAGS.needsRerender */;
1021
- return;
1022
- }
1023
- attachToAncestor(hostRef, hostRef.$ancestorComponent$);
1024
- // there is no ancestor component or the ancestor component
1025
- // has already fired off its lifecycle update then
1026
- // fire off the initial update
1027
- const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
1028
- return writeTask(dispatch) ;
1029
- };
1030
- /**
1031
- * Dispatch initial-render and update lifecycle hooks, enqueuing calls to
1032
- * component lifecycle methods like `componentWillLoad` as well as
1033
- * {@link updateComponent}, which will kick off the virtual DOM re-render.
1034
- *
1035
- * @param hostRef a reference to a host DOM node
1036
- * @param isInitialLoad whether we're on the initial load or not
1037
- * @returns an empty Promise which is used to enqueue a series of operations for
1038
- * the component
1039
- */
1040
- const dispatchHooks = (hostRef, isInitialLoad) => {
1041
- const endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$);
1042
- const instance = hostRef.$lazyInstance$ ;
1043
- // We're going to use this variable together with `enqueue` to implement a
1044
- // little promise-based queue. We start out with it `undefined`. When we add
1045
- // the first function to the queue we'll set this variable to be that
1046
- // function's return value. When we attempt to add subsequent values to the
1047
- // queue we'll check that value and, if it was a `Promise`, we'll then chain
1048
- // the new function off of that `Promise` using `.then()`. This will give our
1049
- // queue two nice properties:
1050
- //
1051
- // 1. If all functions added to the queue are synchronous they'll be called
1052
- // synchronously right away.
1053
- // 2. If all functions added to the queue are asynchronous they'll all be
1054
- // called in order after `dispatchHooks` exits.
1055
- let maybePromise;
1056
- endSchedule();
1057
- return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
1058
- };
1059
- /**
1060
- * This function uses a Promise to implement a simple first-in, first-out queue
1061
- * of functions to be called.
1062
- *
1063
- * The queue is ordered on the basis of the first argument. If it's
1064
- * `undefined`, then nothing is on the queue yet, so the provided function can
1065
- * be called synchronously (although note that this function may return a
1066
- * `Promise`). The idea is that then the return value of that enqueueing
1067
- * operation is kept around, so that if it was a `Promise` then subsequent
1068
- * functions can be enqueued by calling this function again with that `Promise`
1069
- * as the first argument.
1070
- *
1071
- * @param maybePromise either a `Promise` which should resolve before the next function is called or an 'empty' sentinel
1072
- * @param fn a function to enqueue
1073
- * @returns either a `Promise` or the return value of the provided function
1074
- */
1075
- const enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn) : fn();
1076
- /**
1077
- * Check that a value is a `Promise`. To check, we first see if the value is an
1078
- * instance of the `Promise` global. In a few circumstances, in particular if
1079
- * the global has been overwritten, this is could be misleading, so we also do
1080
- * a little 'duck typing' check to see if the `.then` property of the value is
1081
- * defined and a function.
1082
- *
1083
- * @param maybePromise it might be a promise!
1084
- * @returns whether it is or not
1085
- */
1086
- const isPromisey = (maybePromise) => maybePromise instanceof Promise ||
1087
- (maybePromise && maybePromise.then && typeof maybePromise.then === 'function');
1088
- /**
1089
- * Update a component given reference to its host elements and so on.
1090
- *
1091
- * @param hostRef an object containing references to the element's host node,
1092
- * VDom nodes, and other metadata
1093
- * @param instance a reference to the underlying host element where it will be
1094
- * rendered
1095
- * @param isInitialLoad whether or not this function is being called as part of
1096
- * the first render cycle
1097
- */
1098
- const updateComponent = async (hostRef, instance, isInitialLoad) => {
1099
- var _a;
1100
- const elm = hostRef.$hostElement$;
1101
- const endUpdate = createTime('update', hostRef.$cmpMeta$.$tagName$);
1102
- const rc = elm['s-rc'];
1103
- if (isInitialLoad) {
1104
- // DOM WRITE!
1105
- attachStyles(hostRef);
1106
- }
1107
- const endRender = createTime('render', hostRef.$cmpMeta$.$tagName$);
1108
- {
1109
- callRender(hostRef, instance, elm, isInitialLoad);
1110
- }
1111
- if (rc) {
1112
- // ok, so turns out there are some child host elements
1113
- // waiting on this parent element to load
1114
- // let's fire off all update callbacks waiting
1115
- rc.map((cb) => cb());
1116
- elm['s-rc'] = undefined;
1117
- }
1118
- endRender();
1119
- endUpdate();
1120
- {
1121
- const childrenPromises = (_a = elm['s-p']) !== null && _a !== void 0 ? _a : [];
1122
- const postUpdate = () => postUpdateComponent(hostRef);
1123
- if (childrenPromises.length === 0) {
1124
- postUpdate();
1125
- }
1126
- else {
1127
- Promise.all(childrenPromises).then(postUpdate);
1128
- hostRef.$flags$ |= 4 /* HOST_FLAGS.isWaitingForChildren */;
1129
- childrenPromises.length = 0;
1130
- }
1131
- }
1132
- };
1133
- /**
1134
- * Handle making the call to the VDom renderer with the proper context given
1135
- * various build variables
1136
- *
1137
- * @param hostRef an object containing references to the element's host node,
1138
- * VDom nodes, and other metadata
1139
- * @param instance a reference to the underlying host element where it will be
1140
- * rendered
1141
- * @param elm the Host element for the component
1142
- * @param isInitialLoad whether or not this function is being called as part of
1143
- * @returns an empty promise
1144
- */
1145
- const callRender = (hostRef, instance, elm, isInitialLoad) => {
1146
- try {
1147
- /**
1148
- * minification optimization: `allRenderFn` is `true` if all components have a `render`
1149
- * method, so we can call the method immediately. If not, check before calling it.
1150
- */
1151
- instance = instance.render() ;
1152
- {
1153
- hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
1154
- }
1155
- {
1156
- hostRef.$flags$ |= 2 /* HOST_FLAGS.hasRendered */;
1157
- }
1158
- {
1159
- {
1160
- // looks like we've got child nodes to render into this host element
1161
- // or we need to update the css class/attrs on the host element
1162
- // DOM WRITE!
1163
- {
1164
- renderVdom(hostRef, instance, isInitialLoad);
1165
- }
1166
- }
1167
- }
1168
- }
1169
- catch (e) {
1170
- consoleError(e, hostRef.$hostElement$);
1171
- }
1172
- return null;
1173
- };
1174
- const postUpdateComponent = (hostRef) => {
1175
- const tagName = hostRef.$cmpMeta$.$tagName$;
1176
- const elm = hostRef.$hostElement$;
1177
- const endPostUpdate = createTime('postUpdate', tagName);
1178
- const ancestorComponent = hostRef.$ancestorComponent$;
1179
- if (!(hostRef.$flags$ & 64 /* HOST_FLAGS.hasLoadedComponent */)) {
1180
- hostRef.$flags$ |= 64 /* HOST_FLAGS.hasLoadedComponent */;
1181
- {
1182
- // DOM WRITE!
1183
- addHydratedFlag(elm);
1184
- }
1185
- endPostUpdate();
1186
- {
1187
- hostRef.$onReadyResolve$(elm);
1188
- if (!ancestorComponent) {
1189
- appDidLoad();
1190
- }
1191
- }
1192
- }
1193
- else {
1194
- endPostUpdate();
1195
- }
1196
- // load events fire from bottom to top
1197
- // the deepest elements load first then bubbles up
1198
- {
1199
- if (hostRef.$onRenderResolve$) {
1200
- hostRef.$onRenderResolve$();
1201
- hostRef.$onRenderResolve$ = undefined;
1202
- }
1203
- if (hostRef.$flags$ & 512 /* HOST_FLAGS.needsRerender */) {
1204
- nextTick(() => scheduleUpdate(hostRef, false));
1205
- }
1206
- hostRef.$flags$ &= ~(4 /* HOST_FLAGS.isWaitingForChildren */ | 512 /* HOST_FLAGS.needsRerender */);
1207
- }
1208
- // ( •_•)
1209
- // ( •_•)>⌐■-■
1210
- // (⌐■_■)
1211
- };
1212
- const appDidLoad = (who) => {
1213
- // on appload
1214
- // we have finish the first big initial render
1215
- {
1216
- addHydratedFlag(doc.documentElement);
1217
- }
1218
- nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
1219
- };
1220
- const addHydratedFlag = (elm) => elm.classList.add('hydrated')
1221
- ;
1222
- const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
1223
- const setValue = (ref, propName, newVal, cmpMeta) => {
1224
- // check our new property value against our internal value
1225
- const hostRef = getHostRef(ref);
1226
- const oldVal = hostRef.$instanceValues$.get(propName);
1227
- const flags = hostRef.$flags$;
1228
- const instance = hostRef.$lazyInstance$ ;
1229
- newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
1230
- // explicitly check for NaN on both sides, as `NaN === NaN` is always false
1231
- const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
1232
- const didValueChange = newVal !== oldVal && !areBothNaN;
1233
- if ((!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) || oldVal === undefined) && didValueChange) {
1234
- // gadzooks! the property's value has changed!!
1235
- // set our new value!
1236
- hostRef.$instanceValues$.set(propName, newVal);
1237
- if (instance) {
1238
- if ((flags & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) {
1239
- // looks like this value actually changed, so we've got work to do!
1240
- // but only if we've already rendered, otherwise just chill out
1241
- // queue that we need to do an update, but don't worry about queuing
1242
- // up millions cuz this function ensures it only runs once
1243
- scheduleUpdate(hostRef, false);
1244
- }
1245
- }
1246
- }
1247
- };
1248
- /**
1249
- * Attach a series of runtime constructs to a compiled Stencil component
1250
- * constructor, including getters and setters for the `@Prop` and `@State`
1251
- * decorators, callbacks for when attributes change, and so on.
1252
- *
1253
- * @param Cstr the constructor for a component that we need to process
1254
- * @param cmpMeta metadata collected previously about the component
1255
- * @param flags a number used to store a series of bit flags
1256
- * @returns a reference to the same constructor passed in (but now mutated)
1257
- */
1258
- const proxyComponent = (Cstr, cmpMeta, flags) => {
1259
- var _a;
1260
- const prototype = Cstr.prototype;
1261
- if (cmpMeta.$members$) {
1262
- // It's better to have a const than two Object.entries()
1263
- const members = Object.entries(cmpMeta.$members$);
1264
- members.map(([memberName, [memberFlags]]) => {
1265
- if ((memberFlags & 31 /* MEMBER_FLAGS.Prop */ ||
1266
- ((flags & 2 /* PROXY_FLAGS.proxyState */) && memberFlags & 32 /* MEMBER_FLAGS.State */))) {
1267
- // proxyComponent - prop
1268
- Object.defineProperty(prototype, memberName, {
1269
- get() {
1270
- // proxyComponent, get value
1271
- return getValue(this, memberName);
1272
- },
1273
- set(newValue) {
1274
- // proxyComponent, set value
1275
- setValue(this, memberName, newValue, cmpMeta);
1276
- },
1277
- configurable: true,
1278
- enumerable: true,
1279
- });
1280
- }
1281
- });
1282
- if ((flags & 1 /* PROXY_FLAGS.isElementConstructor */)) {
1283
- const attrNameToPropName = new Map();
1284
- prototype.attributeChangedCallback = function (attrName, oldValue, newValue) {
1285
- plt.jmp(() => {
1286
- var _a;
1287
- const propName = attrNameToPropName.get(attrName);
1288
- // In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
1289
- // in the case where an attribute was set inline.
1290
- // ```html
1291
- // <my-component some-attribute="some-value"></my-component>
1292
- // ```
1293
- //
1294
- // There is an edge case where a developer sets the attribute inline on a custom element and then
1295
- // programmatically changes it before it has been upgraded as shown below:
1296
- //
1297
- // ```html
1298
- // <!-- this component has _not_ been upgraded yet -->
1299
- // <my-component id="test" some-attribute="some-value"></my-component>
1300
- // <script>
1301
- // // grab non-upgraded component
1302
- // el = document.querySelector("#test");
1303
- // el.someAttribute = "another-value";
1304
- // // upgrade component
1305
- // customElements.define('my-component', MyComponent);
1306
- // </script>
1307
- // ```
1308
- // In this case if we do not un-shadow here and use the value of the shadowing property, attributeChangedCallback
1309
- // will be called with `newValue = "some-value"` and will set the shadowed property (this.someAttribute = "another-value")
1310
- // to the value that was set inline i.e. "some-value" from above example. When
1311
- // the connectedCallback attempts to un-shadow it will use "some-value" as the initial value rather than "another-value"
1312
- //
1313
- // The case where the attribute was NOT set inline but was not set programmatically shall be handled/un-shadowed
1314
- // by connectedCallback as this attributeChangedCallback will not fire.
1315
- //
1316
- // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
1317
- //
1318
- // TODO(STENCIL-16) we should think about whether or not we actually want to be reflecting the attributes to
1319
- // properties here given that this goes against best practices outlined here
1320
- // https://developers.google.com/web/fundamentals/web-components/best-practices#avoid-reentrancy
1321
- if (this.hasOwnProperty(propName)) {
1322
- newValue = this[propName];
1323
- delete this[propName];
1324
- }
1325
- else if (prototype.hasOwnProperty(propName) &&
1326
- typeof this[propName] === 'number' &&
1327
- this[propName] == newValue) {
1328
- // if the propName exists on the prototype of `Cstr`, this update may be a result of Stencil using native
1329
- // APIs to reflect props as attributes. Calls to `setAttribute(someElement, propName)` will result in
1330
- // `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.
1331
- return;
1332
- }
1333
- else if (propName == null) {
1334
- // At this point we should know this is not a "member", so we can treat it like watching an attribute
1335
- // on a vanilla web component
1336
- const hostRef = getHostRef(this);
1337
- const flags = hostRef === null || hostRef === void 0 ? void 0 : hostRef.$flags$;
1338
- // We only want to trigger the callback(s) if:
1339
- // 1. The instance is ready
1340
- // 2. The watchers are ready
1341
- // 3. The value has changed
1342
- if (flags &&
1343
- !(flags & 8 /* HOST_FLAGS.isConstructingInstance */) &&
1344
- flags & 128 /* HOST_FLAGS.isWatchReady */ &&
1345
- newValue !== oldValue) {
1346
- const instance = hostRef.$lazyInstance$ ;
1347
- const entry = (_a = cmpMeta.$watchers$) === null || _a === void 0 ? void 0 : _a[attrName];
1348
- entry === null || entry === void 0 ? void 0 : entry.forEach((callbackName) => {
1349
- if (instance[callbackName] != null) {
1350
- instance[callbackName].call(instance, newValue, oldValue, attrName);
1351
- }
1352
- });
1353
- }
1354
- return;
1355
- }
1356
- this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
1357
- });
1358
- };
1359
- // Create an array of attributes to observe
1360
- // This list in comprised of all strings used within a `@Watch()` decorator
1361
- // on a component as well as any Stencil-specific "members" (`@Prop()`s and `@State()`s).
1362
- // As such, there is no way to guarantee type-safety here that a user hasn't entered
1363
- // an invalid attribute.
1364
- Cstr.observedAttributes = Array.from(new Set([
1365
- ...Object.keys((_a = cmpMeta.$watchers$) !== null && _a !== void 0 ? _a : {}),
1366
- ...members
1367
- .filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */)
1368
- .map(([propName, m]) => {
1369
- const attrName = m[1] || propName;
1370
- attrNameToPropName.set(attrName, propName);
1371
- return attrName;
1372
- }),
1373
- ]));
1374
- }
1375
- }
1376
- return Cstr;
1377
- };
1378
- /**
1379
- * Initialize a Stencil component given a reference to its host element, its
1380
- * runtime bookkeeping data structure, runtime metadata about the component,
1381
- * and (optionally) an HMR version ID.
1382
- *
1383
- * @param elm a host element
1384
- * @param hostRef the element's runtime bookkeeping object
1385
- * @param cmpMeta runtime metadata for the Stencil component
1386
- * @param hmrVersionId an (optional) HMR version ID
1387
- */
1388
- const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1389
- let Cstr;
1390
- // initializeComponent
1391
- if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
1392
- // Let the runtime know that the component has been initialized
1393
- hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
1394
- const bundleId = cmpMeta.$lazyBundleId$;
1395
- if (bundleId) {
1396
- // lazy loaded components
1397
- // request the component's implementation to be
1398
- // wired up with the host element
1399
- Cstr = loadModule(cmpMeta);
1400
- if (Cstr.then) {
1401
- // Await creates a micro-task avoid if possible
1402
- const endLoad = uniqueTime();
1403
- Cstr = await Cstr;
1404
- endLoad();
1405
- }
1406
- if (!Cstr.isProxied) {
1407
- proxyComponent(Cstr, cmpMeta, 2 /* PROXY_FLAGS.proxyState */);
1408
- Cstr.isProxied = true;
1409
- }
1410
- const endNewInstance = createTime('createInstance', cmpMeta.$tagName$);
1411
- // ok, time to construct the instance
1412
- // but let's keep track of when we start and stop
1413
- // so that the getters/setters don't incorrectly step on data
1414
- {
1415
- hostRef.$flags$ |= 8 /* HOST_FLAGS.isConstructingInstance */;
1416
- }
1417
- // construct the lazy-loaded component implementation
1418
- // passing the hostRef is very important during
1419
- // construction in order to directly wire together the
1420
- // host element and the lazy-loaded instance
1421
- try {
1422
- new Cstr(hostRef);
1423
- }
1424
- catch (e) {
1425
- consoleError(e);
1426
- }
1427
- {
1428
- hostRef.$flags$ &= ~8 /* HOST_FLAGS.isConstructingInstance */;
1429
- }
1430
- endNewInstance();
1431
- }
1432
- else {
1433
- // sync constructor component
1434
- Cstr = elm.constructor;
1435
- // wait for the CustomElementRegistry to mark the component as ready before setting `isWatchReady`. Otherwise,
1436
- // watchers may fire prematurely if `customElements.get()`/`customElements.whenDefined()` resolves _before_
1437
- // Stencil has completed instantiating the component.
1438
- customElements.whenDefined(cmpMeta.$tagName$).then(() => (hostRef.$flags$ |= 128 /* HOST_FLAGS.isWatchReady */));
1439
- }
1440
- if (Cstr.style) {
1441
- // this component has styles but we haven't registered them yet
1442
- let style = Cstr.style;
1443
- const scopeId = getScopeId(cmpMeta);
1444
- if (!styles.has(scopeId)) {
1445
- const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);
1446
- registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */));
1447
- endRegisterStyles();
1448
- }
1449
- }
1450
- }
1451
- // we've successfully created a lazy instance
1452
- const ancestorComponent = hostRef.$ancestorComponent$;
1453
- const schedule = () => scheduleUpdate(hostRef, true);
1454
- if (ancestorComponent && ancestorComponent['s-rc']) {
1455
- // this is the initial load and this component it has an ancestor component
1456
- // but the ancestor component has NOT fired its will update lifecycle yet
1457
- // so let's just cool our jets and wait for the ancestor to continue first
1458
- // this will get fired off when the ancestor component
1459
- // finally gets around to rendering its lazy self
1460
- // fire off the initial update
1461
- ancestorComponent['s-rc'].push(schedule);
1462
- }
1463
- else {
1464
- schedule();
1465
- }
1466
- };
1467
- const fireConnectedCallback = (instance) => {
1468
- };
1469
- const connectedCallback = (elm) => {
1470
- if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
1471
- const hostRef = getHostRef(elm);
1472
- const cmpMeta = hostRef.$cmpMeta$;
1473
- const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);
1474
- if (!(hostRef.$flags$ & 1 /* HOST_FLAGS.hasConnected */)) {
1475
- // first time this component has connected
1476
- hostRef.$flags$ |= 1 /* HOST_FLAGS.hasConnected */;
1477
- {
1478
- // find the first ancestor component (if there is one) and register
1479
- // this component as one of the actively loading child components for its ancestor
1480
- let ancestorComponent = elm;
1481
- while ((ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host)) {
1482
- // climb up the ancestors looking for the first
1483
- // component that hasn't finished its lifecycle update yet
1484
- if (ancestorComponent['s-p']) {
1485
- // we found this components first ancestor component
1486
- // keep a reference to this component's ancestor component
1487
- attachToAncestor(hostRef, (hostRef.$ancestorComponent$ = ancestorComponent));
1488
- break;
1489
- }
1490
- }
1491
- }
1492
- // Lazy properties
1493
- // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
1494
- if (cmpMeta.$members$) {
1495
- Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
1496
- if (memberFlags & 31 /* MEMBER_FLAGS.Prop */ && elm.hasOwnProperty(memberName)) {
1497
- const value = elm[memberName];
1498
- delete elm[memberName];
1499
- elm[memberName] = value;
1500
- }
1501
- });
1502
- }
1503
- {
1504
- initializeComponent(elm, hostRef, cmpMeta);
1505
- }
1506
- }
1507
- else {
1508
- // fire off connectedCallback() on component instance
1509
- if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$lazyInstance$) ;
1510
- else if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$onReadyPromise$) {
1511
- hostRef.$onReadyPromise$.then(() => fireConnectedCallback());
1512
- }
1513
- }
1514
- endConnected();
1515
- }
1516
- };
1517
- const disconnectInstance = (instance) => {
1518
- };
1519
- const disconnectedCallback = async (elm) => {
1520
- if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
1521
- const hostRef = getHostRef(elm);
1522
- if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$lazyInstance$) ;
1523
- else if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$onReadyPromise$) {
1524
- hostRef.$onReadyPromise$.then(() => disconnectInstance());
1525
- }
1526
- }
1527
- };
1528
- const bootstrapLazy = (lazyBundles, options = {}) => {
1529
- var _a;
1530
- const endBootstrap = createTime();
1531
- const cmpTags = [];
1532
- const exclude = options.exclude || [];
1533
- const customElements = win.customElements;
1534
- const head = doc.head;
1535
- const metaCharset = /*@__PURE__*/ head.querySelector('meta[charset]');
1536
- const dataStyles = /*@__PURE__*/ doc.createElement('style');
1537
- const deferredConnectedCallbacks = [];
1538
- let appLoadFallback;
1539
- let isBootstrapping = true;
1540
- Object.assign(plt, options);
1541
- plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
1542
- let hasSlotRelocation = false;
1543
- lazyBundles.map((lazyBundle) => {
1544
- lazyBundle[1].map((compactMeta) => {
1545
- const cmpMeta = {
1546
- $flags$: compactMeta[0],
1547
- $tagName$: compactMeta[1],
1548
- $members$: compactMeta[2],
1549
- $listeners$: compactMeta[3],
1550
- };
1551
- // Check if we are using slots outside the shadow DOM in this component.
1552
- // We'll use this information later to add styles for `slot-fb` elements
1553
- if (cmpMeta.$flags$ & 4 /* CMP_FLAGS.hasSlotRelocation */) {
1554
- hasSlotRelocation = true;
1555
- }
1556
- {
1557
- cmpMeta.$members$ = compactMeta[2];
1558
- }
1559
- const tagName = cmpMeta.$tagName$;
1560
- const HostElement = class extends HTMLElement {
1561
- // StencilLazyHost
1562
- constructor(self) {
1563
- // @ts-ignore
1564
- super(self);
1565
- self = this;
1566
- registerHost(self, cmpMeta);
1567
- if (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {
1568
- // this component is using shadow dom
1569
- // and this browser supports shadow dom
1570
- // add the read-only property "shadowRoot" to the host element
1571
- // adding the shadow root build conditionals to minimize runtime
1572
- {
1573
- {
1574
- self.attachShadow({ mode: 'open' });
1575
- }
1576
- }
1577
- }
1578
- }
1579
- connectedCallback() {
1580
- if (appLoadFallback) {
1581
- clearTimeout(appLoadFallback);
1582
- appLoadFallback = null;
1583
- }
1584
- if (isBootstrapping) {
1585
- // connectedCallback will be processed once all components have been registered
1586
- deferredConnectedCallbacks.push(this);
1587
- }
1588
- else {
1589
- plt.jmp(() => connectedCallback(this));
1590
- }
1591
- }
1592
- disconnectedCallback() {
1593
- plt.jmp(() => disconnectedCallback(this));
1594
- }
1595
- componentOnReady() {
1596
- return getHostRef(this).$onReadyPromise$;
1597
- }
1598
- };
1599
- cmpMeta.$lazyBundleId$ = lazyBundle[0];
1600
- if (!exclude.includes(tagName) && !customElements.get(tagName)) {
1601
- cmpTags.push(tagName);
1602
- customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* PROXY_FLAGS.isElementConstructor */));
1603
- }
1604
- });
1605
- });
1606
- // Only bother generating CSS if we have components
1607
- // TODO(STENCIL-1118): Add test cases for CSS content based on conditionals
1608
- if (cmpTags.length > 0) {
1609
- // Add styles for `slot-fb` elements if any of our components are using slots outside the Shadow DOM
1610
- if (hasSlotRelocation) {
1611
- dataStyles.textContent += SLOT_FB_CSS;
1612
- }
1613
- // Add hydration styles
1614
- {
1615
- dataStyles.textContent += cmpTags + HYDRATED_CSS;
1616
- }
1617
- // If we have styles, add them to the DOM
1618
- if (dataStyles.innerHTML.length) {
1619
- dataStyles.setAttribute('data-styles', '');
1620
- // Apply CSP nonce to the style tag if it exists
1621
- const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
1622
- if (nonce != null) {
1623
- dataStyles.setAttribute('nonce', nonce);
1624
- }
1625
- // Insert the styles into the document head
1626
- // NOTE: this _needs_ to happen last so we can ensure the nonce (and other attributes) are applied
1627
- head.insertBefore(dataStyles, metaCharset ? metaCharset.nextSibling : head.firstChild);
1628
- }
1629
- }
1630
- // Process deferred connectedCallbacks now all components have been registered
1631
- isBootstrapping = false;
1632
- if (deferredConnectedCallbacks.length) {
1633
- deferredConnectedCallbacks.map((host) => host.connectedCallback());
1634
- }
1635
- else {
1636
- {
1637
- plt.jmp(() => (appLoadFallback = setTimeout(appDidLoad, 30)));
1638
- }
1639
- }
1640
- // Fallback appLoad event
1641
- endBootstrap();
1642
- };
1643
- /**
1644
- * Assigns the given value to the nonce property on the runtime platform object.
1645
- * During runtime, this value is used to set the nonce attribute on all dynamically created script and style tags.
1646
- * @param nonce The value to be assigned to the platform nonce property.
1647
- * @returns void
1648
- */
1649
- const setNonce = (nonce) => (plt.$nonce$ = nonce);
1650
- /**
1651
- * A WeakMap mapping runtime component references to their corresponding host reference
1652
- * instances.
1653
- *
1654
- * **Note**: If we're in an HMR context we need to store a reference to this
1655
- * value on `window` in order to maintain the mapping of {@link d.RuntimeRef}
1656
- * to {@link d.HostRef} across HMR updates.
1657
- *
1658
- * This is necessary because when HMR updates for a component are processed by
1659
- * the browser-side dev server client the JS bundle for that component is
1660
- * re-fetched. Since the module containing {@link hostRefs} is included in
1661
- * that bundle, if we do not store a reference to it the new iteration of the
1662
- * component will not have access to the previous hostRef map, leading to a
1663
- * bug where the new version of the component cannot properly initialize.
1664
- */
1665
- const hostRefs = new WeakMap();
1666
- /**
1667
- * Given a {@link d.RuntimeRef} retrieve the corresponding {@link d.HostRef}
1668
- *
1669
- * @param ref the runtime ref of interest
1670
- * @returns the Host reference (if found) or undefined
1671
- */
1672
- const getHostRef = (ref) => hostRefs.get(ref);
1673
- /**
1674
- * Register a lazy instance with the {@link hostRefs} object so it's
1675
- * corresponding {@link d.HostRef} can be retrieved later.
1676
- *
1677
- * @param lazyInstance the lazy instance of interest
1678
- * @param hostRef that instances `HostRef` object
1679
- * @returns a reference to the host ref WeakMap
1680
- */
1681
- const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
1682
- /**
1683
- * Register a host element for a Stencil component, setting up various metadata
1684
- * and callbacks based on {@link BUILD} flags as well as the component's runtime
1685
- * metadata.
1686
- *
1687
- * @param hostElement the host element to register
1688
- * @param cmpMeta runtime metadata for that component
1689
- * @returns a reference to the host ref WeakMap
1690
- */
1691
- const registerHost = (hostElement, cmpMeta) => {
1692
- const hostRef = {
1693
- $flags$: 0,
1694
- $hostElement$: hostElement,
1695
- $cmpMeta$: cmpMeta,
1696
- $instanceValues$: new Map(),
1697
- };
1698
- {
1699
- hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
1700
- hostElement['s-p'] = [];
1701
- hostElement['s-rc'] = [];
1702
- }
1703
- return hostRefs.set(hostElement, hostRef);
1704
- };
1705
- const isMemberInElement = (elm, memberName) => memberName in elm;
1706
- const consoleError = (e, el) => (0, console.error)(e, el);
1707
- const cmpModules = /*@__PURE__*/ new Map();
1708
- const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
1709
- // loadModuleImport
1710
- const exportName = cmpMeta.$tagName$.replace(/-/g, '_');
1711
- const bundleId = cmpMeta.$lazyBundleId$;
1712
- const module = cmpModules.get(bundleId) ;
1713
- if (module) {
1714
- return module[exportName];
1715
- }
1716
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/
1717
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1718
- /* @vite-ignore */
1719
- /* webpackInclude: /\.entry\.js$/ */
1720
- /* webpackExclude: /\.system\.entry\.js$/ */
1721
- /* webpackMode: "lazy" */
1722
- `./${bundleId}.entry.js${''}`)); }).then((importedModule) => {
1723
- {
1724
- cmpModules.set(bundleId, importedModule);
1725
- }
1726
- return importedModule[exportName];
1727
- }, consoleError);
1728
- };
1729
- const styles = /*@__PURE__*/ new Map();
1730
- const win = typeof window !== 'undefined' ? window : {};
1731
- const doc = win.document || { head: {} };
1732
- const plt = {
1733
- $flags$: 0,
1734
- $resourcesUrl$: '',
1735
- jmp: (h) => h(),
1736
- raf: (h) => requestAnimationFrame(h),
1737
- ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
1738
- rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
1739
- ce: (eventName, opts) => new CustomEvent(eventName, opts),
1740
- };
1741
- const promiseResolve = (v) => Promise.resolve(v);
1742
- const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
1743
- try {
1744
- new CSSStyleSheet();
1745
- return typeof new CSSStyleSheet().replaceSync === 'function';
1746
- }
1747
- catch (e) { }
1748
- return false;
1749
- })()
1750
- ;
1751
- const queueDomReads = [];
1752
- const queueDomWrites = [];
1753
- const queueTask = (queue, write) => (cb) => {
1754
- queue.push(cb);
1755
- if (!queuePending) {
1756
- queuePending = true;
1757
- if (write && plt.$flags$ & 4 /* PLATFORM_FLAGS.queueSync */) {
1758
- nextTick(flush);
1759
- }
1760
- else {
1761
- plt.raf(flush);
1762
- }
1763
- }
1764
- };
1765
- const consume = (queue) => {
1766
- for (let i = 0; i < queue.length; i++) {
1767
- try {
1768
- queue[i](performance.now());
1769
- }
1770
- catch (e) {
1771
- consoleError(e);
1772
- }
1773
- }
1774
- queue.length = 0;
1775
- };
1776
- const flush = () => {
1777
- // always force a bunch of medium callbacks to run, but still have
1778
- // a throttle on how many can run in a certain time
1779
- // DOM READS!!!
1780
- consume(queueDomReads);
1781
- // DOM WRITES!!!
1782
- {
1783
- consume(queueDomWrites);
1784
- if ((queuePending = queueDomReads.length > 0)) {
1785
- // still more to do yet, but we've run out of time
1786
- // let's let this thing cool off and try again in the next tick
1787
- plt.raf(flush);
1788
- }
1789
- }
1790
- };
1791
- const nextTick = (cb) => promiseResolve().then(cb);
1792
- const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
1793
-
1794
- exports.bootstrapLazy = bootstrapLazy;
1795
- exports.getElement = getElement;
1796
- exports.h = h;
1797
- exports.promiseResolve = promiseResolve;
1798
- exports.registerInstance = registerInstance;
1799
- exports.setNonce = setNonce;