@pine-ds/icons 2.0.1 → 2.0.2

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 (356) hide show
  1. package/dist/cheatsheet.html +3 -3
  2. package/dist/cjs/index-b35d5b0f.js +1778 -0
  3. package/dist/cjs/index-b35d5b0f.js.map +1 -0
  4. package/dist/cjs/index.cjs.js +12 -0
  5. package/dist/cjs/index.cjs.js.map +1 -0
  6. package/dist/cjs/loader.cjs.js +15 -0
  7. package/dist/cjs/loader.cjs.js.map +1 -0
  8. package/dist/cjs/pds-icon.cjs.entry.js +190 -0
  9. package/dist/cjs/pds-icon.cjs.entry.js.map +1 -0
  10. package/dist/cjs/pds-icons.cjs.js +25 -0
  11. package/dist/cjs/pds-icons.cjs.js.map +1 -0
  12. package/dist/cjs/utils-395a38b7.js +81 -0
  13. package/dist/cjs/utils-395a38b7.js.map +1 -0
  14. package/dist/collection/collection-manifest.json +12 -0
  15. package/dist/collection/components/pds-icon/pds-icon.css +22 -0
  16. package/dist/collection/components/pds-icon/pds-icon.js +186 -0
  17. package/dist/collection/components/pds-icon/pds-icon.js.map +1 -0
  18. package/dist/collection/components/pds-icon/request.js +29 -0
  19. package/dist/collection/components/pds-icon/request.js.map +1 -0
  20. package/dist/collection/components/pds-icon/test/pds-icon.e2e.js +10 -0
  21. package/dist/collection/components/pds-icon/test/pds-icon.e2e.js.map +1 -0
  22. package/dist/collection/components/pds-icon/test/pds-icon.spec.js +70 -0
  23. package/dist/collection/components/pds-icon/test/pds-icon.spec.js.map +1 -0
  24. package/dist/collection/components/pds-icon/utils.js +81 -0
  25. package/dist/collection/components/pds-icon/utils.js.map +1 -0
  26. package/dist/collection/components/pds-icon/validate.js +44 -0
  27. package/dist/collection/components/pds-icon/validate.js.map +1 -0
  28. package/dist/collection/index.js +2 -0
  29. package/dist/collection/index.js.map +1 -0
  30. package/dist/docs.d.ts +421 -0
  31. package/dist/docs.json +95 -0
  32. package/dist/esm/index-8effeb27.js +1749 -0
  33. package/dist/esm/index-8effeb27.js.map +1 -0
  34. package/dist/esm/index.js +4 -0
  35. package/dist/esm/index.js.map +1 -0
  36. package/dist/esm/loader.js +11 -0
  37. package/dist/esm/loader.js.map +1 -0
  38. package/dist/esm/pds-icon.entry.js +186 -0
  39. package/dist/esm/pds-icon.entry.js.map +1 -0
  40. package/dist/esm/pds-icons.js +20 -0
  41. package/dist/esm/pds-icons.js.map +1 -0
  42. package/dist/esm/polyfills/core-js.js +11 -0
  43. package/dist/esm/polyfills/dom.js +79 -0
  44. package/dist/esm/polyfills/es5-html-element.js +1 -0
  45. package/dist/esm/polyfills/index.js +34 -0
  46. package/dist/esm/polyfills/system.js +6 -0
  47. package/dist/esm/utils-a0ad61d0.js +75 -0
  48. package/dist/esm/utils-a0ad61d0.js.map +1 -0
  49. package/dist/index.cjs.js +1 -0
  50. package/dist/index.js +1 -0
  51. package/dist/loader/cdn.js +3 -0
  52. package/dist/loader/index.cjs.js +3 -0
  53. package/dist/loader/index.d.ts +21 -0
  54. package/dist/loader/index.es2017.js +3 -0
  55. package/dist/loader/index.js +4 -0
  56. package/dist/loader/package.json +11 -0
  57. package/dist/pds-icons/index.esm.js +2 -0
  58. package/dist/pds-icons/index.esm.js.map +1 -0
  59. package/dist/pds-icons/p-91678731.entry.js +2 -0
  60. package/dist/pds-icons/p-91678731.entry.js.map +1 -0
  61. package/dist/pds-icons/p-a3383818.js +3 -0
  62. package/dist/pds-icons/p-a3383818.js.map +1 -0
  63. package/dist/pds-icons/p-dc5765cb.js +2 -0
  64. package/dist/pds-icons/p-dc5765cb.js.map +1 -0
  65. package/dist/pds-icons/pds-icons.esm.js +2 -0
  66. package/dist/pds-icons/pds-icons.esm.js.map +1 -0
  67. package/dist/pds-icons.json +1 -1
  68. package/dist/pds-icons.symbols.svg +1 -1
  69. package/dist/scripts/collection-copy.js +28 -0
  70. package/dist/scripts/collection-copy.js.map +1 -0
  71. package/dist/scripts/figma_icons/figma-icon-export.js +666 -0
  72. package/dist/scripts/figma_icons/figma-icon-export.js.map +1 -0
  73. package/dist/scripts/figma_icons/types.js +2 -0
  74. package/dist/scripts/figma_icons/types.js.map +1 -0
  75. package/dist/scripts/helpers.js +51 -0
  76. package/dist/scripts/helpers.js.map +1 -0
  77. package/dist/scripts/optimize-svgs.js +352 -0
  78. package/dist/scripts/optimize-svgs.js.map +1 -0
  79. package/dist/types/Users/julian.skinner/kajabi/pine-icons/.stencil/scripts/collection-copy.d.ts +1 -0
  80. package/dist/types/Users/julian.skinner/kajabi/pine-icons/.stencil/scripts/figma_icons/figma-icon-export.d.ts +1 -0
  81. package/dist/types/Users/julian.skinner/kajabi/pine-icons/.stencil/scripts/figma_icons/types.d.ts +112 -0
  82. package/dist/types/Users/julian.skinner/kajabi/pine-icons/.stencil/scripts/helpers.d.ts +55 -0
  83. package/dist/types/Users/julian.skinner/kajabi/pine-icons/.stencil/scripts/optimize-svgs.d.ts +7 -0
  84. package/dist/types/components/pds-icon/pds-icon.d.ts +37 -0
  85. package/dist/types/components/pds-icon/request.d.ts +2 -0
  86. package/dist/types/components/pds-icon/utils.d.ts +24 -0
  87. package/dist/types/components/pds-icon/validate.d.ts +2 -0
  88. package/dist/types/components.d.ts +71 -0
  89. package/dist/types/index.d.ts +2 -0
  90. package/dist/types/stencil-public-runtime.d.ts +1652 -0
  91. package/icons/index.d.ts +1 -1
  92. package/icons/index.js +1 -1
  93. package/icons/index.mjs +1 -1
  94. package/icons/package.json +1 -1
  95. package/package.json +1 -1
  96. package/readme.md +1 -1
  97. /package/dist/{pds-icons → collection/components/pds-icon}/svg/access-key.svg +0 -0
  98. /package/dist/{pds-icons → collection/components/pds-icon}/svg/add-circle.svg +0 -0
  99. /package/dist/{pds-icons → collection/components/pds-icon}/svg/add-image.svg +0 -0
  100. /package/dist/{pds-icons → collection/components/pds-icon}/svg/add-small.svg +0 -0
  101. /package/dist/{pds-icons → collection/components/pds-icon}/svg/add.svg +0 -0
  102. /package/dist/{pds-icons → collection/components/pds-icon}/svg/ai-sparkle.svg +0 -0
  103. /package/dist/{pds-icons → collection/components/pds-icon}/svg/ai-writer-filled.svg +0 -0
  104. /package/dist/{pds-icons → collection/components/pds-icon}/svg/ai-writer.svg +0 -0
  105. /package/dist/{pds-icons → collection/components/pds-icon}/svg/align-center.svg +0 -0
  106. /package/dist/{pds-icons → collection/components/pds-icon}/svg/align-justify.svg +0 -0
  107. /package/dist/{pds-icons → collection/components/pds-icon}/svg/align-left.svg +0 -0
  108. /package/dist/{pds-icons → collection/components/pds-icon}/svg/align-right.svg +0 -0
  109. /package/dist/{pds-icons → collection/components/pds-icon}/svg/analytics-filled.svg +0 -0
  110. /package/dist/{pds-icons → collection/components/pds-icon}/svg/analytics-outline.svg +0 -0
  111. /package/dist/{pds-icons → collection/components/pds-icon}/svg/app-store.svg +0 -0
  112. /package/dist/{pds-icons → collection/components/pds-icon}/svg/archive.svg +0 -0
  113. /package/dist/{pds-icons → collection/components/pds-icon}/svg/arrow-corner.svg +0 -0
  114. /package/dist/{pds-icons → collection/components/pds-icon}/svg/arrow-down.svg +0 -0
  115. /package/dist/{pds-icons → collection/components/pds-icon}/svg/arrow-left.svg +0 -0
  116. /package/dist/{pds-icons → collection/components/pds-icon}/svg/arrow-right.svg +0 -0
  117. /package/dist/{pds-icons → collection/components/pds-icon}/svg/arrow-up.svg +0 -0
  118. /package/dist/{pds-icons → collection/components/pds-icon}/svg/assessment.svg +0 -0
  119. /package/dist/{pds-icons → collection/components/pds-icon}/svg/at-sign.svg +0 -0
  120. /package/dist/{pds-icons → collection/components/pds-icon}/svg/attach.svg +0 -0
  121. /package/dist/{pds-icons → collection/components/pds-icon}/svg/automations.svg +0 -0
  122. /package/dist/{pds-icons → collection/components/pds-icon}/svg/ban.svg +0 -0
  123. /package/dist/{pds-icons → collection/components/pds-icon}/svg/bank.svg +0 -0
  124. /package/dist/{pds-icons → collection/components/pds-icon}/svg/bell.svg +0 -0
  125. /package/dist/{pds-icons → collection/components/pds-icon}/svg/blog.svg +0 -0
  126. /package/dist/{pds-icons → collection/components/pds-icon}/svg/bold.svg +0 -0
  127. /package/dist/{pds-icons → collection/components/pds-icon}/svg/broadcast.svg +0 -0
  128. /package/dist/{pds-icons → collection/components/pds-icon}/svg/calendar-date.svg +0 -0
  129. /package/dist/{pds-icons → collection/components/pds-icon}/svg/calendar-schedule.svg +0 -0
  130. /package/dist/{pds-icons → collection/components/pds-icon}/svg/calendar-simple.svg +0 -0
  131. /package/dist/{pds-icons → collection/components/pds-icon}/svg/card-bw-amex.svg +0 -0
  132. /package/dist/{pds-icons → collection/components/pds-icon}/svg/card-bw-apple-card.svg +0 -0
  133. /package/dist/{pds-icons → collection/components/pds-icon}/svg/card-bw-diners-club.svg +0 -0
  134. /package/dist/{pds-icons → collection/components/pds-icon}/svg/card-bw-discover.svg +0 -0
  135. /package/dist/{pds-icons → collection/components/pds-icon}/svg/card-bw-gpay-card.svg +0 -0
  136. /package/dist/{pds-icons → collection/components/pds-icon}/svg/card-bw-mastercard.svg +0 -0
  137. /package/dist/{pds-icons → collection/components/pds-icon}/svg/card-bw-paypal.svg +0 -0
  138. /package/dist/{pds-icons → collection/components/pds-icon}/svg/card-bw-stripe.svg +0 -0
  139. /package/dist/{pds-icons → collection/components/pds-icon}/svg/card-bw-visa.svg +0 -0
  140. /package/dist/{pds-icons → collection/components/pds-icon}/svg/card-update.svg +0 -0
  141. /package/dist/{pds-icons → collection/components/pds-icon}/svg/caret-down.svg +0 -0
  142. /package/dist/{pds-icons → collection/components/pds-icon}/svg/caret-left.svg +0 -0
  143. /package/dist/{pds-icons → collection/components/pds-icon}/svg/caret-right.svg +0 -0
  144. /package/dist/{pds-icons → collection/components/pds-icon}/svg/caret-up.svg +0 -0
  145. /package/dist/{pds-icons → collection/components/pds-icon}/svg/cart-add.svg +0 -0
  146. /package/dist/{pds-icons → collection/components/pds-icon}/svg/cart.svg +0 -0
  147. /package/dist/{pds-icons → collection/components/pds-icon}/svg/certificate.svg +0 -0
  148. /package/dist/{pds-icons → collection/components/pds-icon}/svg/check-circle-filled.svg +0 -0
  149. /package/dist/{pds-icons → collection/components/pds-icon}/svg/check-circle.svg +0 -0
  150. /package/dist/{pds-icons → collection/components/pds-icon}/svg/check.svg +0 -0
  151. /package/dist/{pds-icons → collection/components/pds-icon}/svg/circle-1.svg +0 -0
  152. /package/dist/{pds-icons → collection/components/pds-icon}/svg/circle-2.svg +0 -0
  153. /package/dist/{pds-icons → collection/components/pds-icon}/svg/circle-3.svg +0 -0
  154. /package/dist/{pds-icons → collection/components/pds-icon}/svg/circle-4.svg +0 -0
  155. /package/dist/{pds-icons → collection/components/pds-icon}/svg/circle-5.svg +0 -0
  156. /package/dist/{pds-icons → collection/components/pds-icon}/svg/circle-6.svg +0 -0
  157. /package/dist/{pds-icons → collection/components/pds-icon}/svg/circle-7.svg +0 -0
  158. /package/dist/{pds-icons → collection/components/pds-icon}/svg/circle-8.svg +0 -0
  159. /package/dist/{pds-icons → collection/components/pds-icon}/svg/circle-9.svg +0 -0
  160. /package/dist/{pds-icons → collection/components/pds-icon}/svg/clock.svg +0 -0
  161. /package/dist/{pds-icons → collection/components/pds-icon}/svg/closed-captions.svg +0 -0
  162. /package/dist/{pds-icons → collection/components/pds-icon}/svg/code.svg +0 -0
  163. /package/dist/{pds-icons → collection/components/pds-icon}/svg/color.svg +0 -0
  164. /package/dist/{pds-icons → collection/components/pds-icon}/svg/columns.svg +0 -0
  165. /package/dist/{pds-icons → collection/components/pds-icon}/svg/comment.svg +0 -0
  166. /package/dist/{pds-icons → collection/components/pds-icon}/svg/connect.svg +0 -0
  167. /package/dist/{pds-icons → collection/components/pds-icon}/svg/contact.svg +0 -0
  168. /package/dist/{pds-icons → collection/components/pds-icon}/svg/contacts-filled.svg +0 -0
  169. /package/dist/{pds-icons → collection/components/pds-icon}/svg/contacts-outline.svg +0 -0
  170. /package/dist/{pds-icons → collection/components/pds-icon}/svg/conversation.svg +0 -0
  171. /package/dist/{pds-icons → collection/components/pds-icon}/svg/copy.svg +0 -0
  172. /package/dist/{pds-icons → collection/components/pds-icon}/svg/coupon.svg +0 -0
  173. /package/dist/{pds-icons → collection/components/pds-icon}/svg/course.svg +0 -0
  174. /package/dist/{pds-icons → collection/components/pds-icon}/svg/creator-studio-filled.svg +0 -0
  175. /package/dist/{pds-icons → collection/components/pds-icon}/svg/creator-studio.svg +0 -0
  176. /package/dist/{pds-icons → collection/components/pds-icon}/svg/credit-card.svg +0 -0
  177. /package/dist/{pds-icons → collection/components/pds-icon}/svg/custom-field.svg +0 -0
  178. /package/dist/{pds-icons → collection/components/pds-icon}/svg/customize.svg +0 -0
  179. /package/dist/{pds-icons → collection/components/pds-icon}/svg/danger-filled.svg +0 -0
  180. /package/dist/{pds-icons → collection/components/pds-icon}/svg/danger.svg +0 -0
  181. /package/dist/{pds-icons → collection/components/pds-icon}/svg/dashboard-filled.svg +0 -0
  182. /package/dist/{pds-icons → collection/components/pds-icon}/svg/dashboard-outline.svg +0 -0
  183. /package/dist/{pds-icons → collection/components/pds-icon}/svg/delete-circle.svg +0 -0
  184. /package/dist/{pds-icons → collection/components/pds-icon}/svg/delete-key.svg +0 -0
  185. /package/dist/{pds-icons → collection/components/pds-icon}/svg/delete-x.svg +0 -0
  186. /package/dist/{pds-icons → collection/components/pds-icon}/svg/dollar-sign.svg +0 -0
  187. /package/dist/{pds-icons → collection/components/pds-icon}/svg/dot-menu-horizontal.svg +0 -0
  188. /package/dist/{pds-icons → collection/components/pds-icon}/svg/down-small.svg +0 -0
  189. /package/dist/{pds-icons → collection/components/pds-icon}/svg/download.svg +0 -0
  190. /package/dist/{pds-icons → collection/components/pds-icon}/svg/downsell.svg +0 -0
  191. /package/dist/{pds-icons → collection/components/pds-icon}/svg/draft.svg +0 -0
  192. /package/dist/{pds-icons → collection/components/pds-icon}/svg/drop.svg +0 -0
  193. /package/dist/{pds-icons → collection/components/pds-icon}/svg/duplicate.svg +0 -0
  194. /package/dist/{pds-icons → collection/components/pds-icon}/svg/email-activity.svg +0 -0
  195. /package/dist/{pds-icons → collection/components/pds-icon}/svg/emoji.svg +0 -0
  196. /package/dist/{pds-icons → collection/components/pds-icon}/svg/enlarge-vertical.svg +0 -0
  197. /package/dist/{pds-icons → collection/components/pds-icon}/svg/enlarge.svg +0 -0
  198. /package/dist/{pds-icons → collection/components/pds-icon}/svg/expand.svg +0 -0
  199. /package/dist/{pds-icons → collection/components/pds-icon}/svg/facebook-2.svg +0 -0
  200. /package/dist/{pds-icons → collection/components/pds-icon}/svg/facebook.svg +0 -0
  201. /package/dist/{pds-icons → collection/components/pds-icon}/svg/favorite.svg +0 -0
  202. /package/dist/{pds-icons → collection/components/pds-icon}/svg/feedback.svg +0 -0
  203. /package/dist/{pds-icons → collection/components/pds-icon}/svg/file-money.svg +0 -0
  204. /package/dist/{pds-icons → collection/components/pds-icon}/svg/file.svg +0 -0
  205. /package/dist/{pds-icons → collection/components/pds-icon}/svg/filter.svg +0 -0
  206. /package/dist/{pds-icons → collection/components/pds-icon}/svg/flag.svg +0 -0
  207. /package/dist/{pds-icons → collection/components/pds-icon}/svg/folder-group.svg +0 -0
  208. /package/dist/{pds-icons → collection/components/pds-icon}/svg/folder.svg +0 -0
  209. /package/dist/{pds-icons → collection/components/pds-icon}/svg/form-field.svg +0 -0
  210. /package/dist/{pds-icons → collection/components/pds-icon}/svg/form.svg +0 -0
  211. /package/dist/{pds-icons → collection/components/pds-icon}/svg/fullscreen.svg +0 -0
  212. /package/dist/{pds-icons → collection/components/pds-icon}/svg/funnel.svg +0 -0
  213. /package/dist/{pds-icons → collection/components/pds-icon}/svg/grant-offer.svg +0 -0
  214. /package/dist/{pds-icons → collection/components/pds-icon}/svg/handle-2-vertical.svg +0 -0
  215. /package/dist/{pds-icons → collection/components/pds-icon}/svg/handle-2.svg +0 -0
  216. /package/dist/{pds-icons → collection/components/pds-icon}/svg/handle.svg +0 -0
  217. /package/dist/{pds-icons → collection/components/pds-icon}/svg/hashtag.svg +0 -0
  218. /package/dist/{pds-icons → collection/components/pds-icon}/svg/heading-large.svg +0 -0
  219. /package/dist/{pds-icons → collection/components/pds-icon}/svg/heading-small.svg +0 -0
  220. /package/dist/{pds-icons → collection/components/pds-icon}/svg/headset.svg +0 -0
  221. /package/dist/{pds-icons → collection/components/pds-icon}/svg/help-filled.svg +0 -0
  222. /package/dist/{pds-icons → collection/components/pds-icon}/svg/help-outline.svg +0 -0
  223. /package/dist/{pds-icons → collection/components/pds-icon}/svg/home-alt.svg +0 -0
  224. /package/dist/{pds-icons → collection/components/pds-icon}/svg/horizontal-line.svg +0 -0
  225. /package/dist/{pds-icons → collection/components/pds-icon}/svg/image.svg +0 -0
  226. /package/dist/{pds-icons → collection/components/pds-icon}/svg/info-circle-filled.svg +0 -0
  227. /package/dist/{pds-icons → collection/components/pds-icon}/svg/info-circle.svg +0 -0
  228. /package/dist/{pds-icons → collection/components/pds-icon}/svg/instagram.svg +0 -0
  229. /package/dist/{pds-icons → collection/components/pds-icon}/svg/ios-battery.svg +0 -0
  230. /package/dist/{pds-icons → collection/components/pds-icon}/svg/ios-data.svg +0 -0
  231. /package/dist/{pds-icons → collection/components/pds-icon}/svg/ios-wifi.svg +0 -0
  232. /package/dist/{pds-icons → collection/components/pds-icon}/svg/italic.svg +0 -0
  233. /package/dist/{pds-icons → collection/components/pds-icon}/svg/kajabi-filled.svg +0 -0
  234. /package/dist/{pds-icons → collection/components/pds-icon}/svg/kajabi-outlined.svg +0 -0
  235. /package/dist/{pds-icons → collection/components/pds-icon}/svg/lab.svg +0 -0
  236. /package/dist/{pds-icons → collection/components/pds-icon}/svg/launch.svg +0 -0
  237. /package/dist/{pds-icons → collection/components/pds-icon}/svg/layout-grid.svg +0 -0
  238. /package/dist/{pds-icons → collection/components/pds-icon}/svg/layout-list.svg +0 -0
  239. /package/dist/{pds-icons → collection/components/pds-icon}/svg/left-small.svg +0 -0
  240. /package/dist/{pds-icons → collection/components/pds-icon}/svg/linkedin.svg +0 -0
  241. /package/dist/{pds-icons → collection/components/pds-icon}/svg/list-bullet.svg +0 -0
  242. /package/dist/{pds-icons → collection/components/pds-icon}/svg/list-numbers.svg +0 -0
  243. /package/dist/{pds-icons → collection/components/pds-icon}/svg/location.svg +0 -0
  244. /package/dist/{pds-icons → collection/components/pds-icon}/svg/lock-alt.svg +0 -0
  245. /package/dist/{pds-icons → collection/components/pds-icon}/svg/lock.svg +0 -0
  246. /package/dist/{pds-icons → collection/components/pds-icon}/svg/logo-afterpay.svg +0 -0
  247. /package/dist/{pds-icons → collection/components/pds-icon}/svg/loop.svg +0 -0
  248. /package/dist/{pds-icons → collection/components/pds-icon}/svg/mail.svg +0 -0
  249. /package/dist/{pds-icons → collection/components/pds-icon}/svg/mapped.svg +0 -0
  250. /package/dist/{pds-icons → collection/components/pds-icon}/svg/margin-left.svg +0 -0
  251. /package/dist/{pds-icons → collection/components/pds-icon}/svg/margin-right.svg +0 -0
  252. /package/dist/{pds-icons → collection/components/pds-icon}/svg/marker-filled.svg +0 -0
  253. /package/dist/{pds-icons → collection/components/pds-icon}/svg/marker.svg +0 -0
  254. /package/dist/{pds-icons → collection/components/pds-icon}/svg/marketing-filled.svg +0 -0
  255. /package/dist/{pds-icons → collection/components/pds-icon}/svg/marketing-outline.svg +0 -0
  256. /package/dist/{pds-icons → collection/components/pds-icon}/svg/menu-2.svg +0 -0
  257. /package/dist/{pds-icons → collection/components/pds-icon}/svg/menu-alt.svg +0 -0
  258. /package/dist/{pds-icons → collection/components/pds-icon}/svg/menu.svg +0 -0
  259. /package/dist/{pds-icons → collection/components/pds-icon}/svg/merge.svg +0 -0
  260. /package/dist/{pds-icons → collection/components/pds-icon}/svg/microphone-off.svg +0 -0
  261. /package/dist/{pds-icons → collection/components/pds-icon}/svg/microphone.svg +0 -0
  262. /package/dist/{pds-icons → collection/components/pds-icon}/svg/move-left.svg +0 -0
  263. /package/dist/{pds-icons → collection/components/pds-icon}/svg/move-right.svg +0 -0
  264. /package/dist/{pds-icons → collection/components/pds-icon}/svg/multi-pay.svg +0 -0
  265. /package/dist/{pds-icons → collection/components/pds-icon}/svg/newsletter.svg +0 -0
  266. /package/dist/{pds-icons → collection/components/pds-icon}/svg/one-off-session.svg +0 -0
  267. /package/dist/{pds-icons → collection/components/pds-icon}/svg/one-time.svg +0 -0
  268. /package/dist/{pds-icons → collection/components/pds-icon}/svg/partners-filled.svg +0 -0
  269. /package/dist/{pds-icons → collection/components/pds-icon}/svg/partners-outline.svg +0 -0
  270. /package/dist/{pds-icons → collection/components/pds-icon}/svg/pause-circle.svg +0 -0
  271. /package/dist/{pds-icons → collection/components/pds-icon}/svg/pause.svg +0 -0
  272. /package/dist/{pds-icons → collection/components/pds-icon}/svg/payout.svg +0 -0
  273. /package/dist/{pds-icons → collection/components/pds-icon}/svg/pen.svg +0 -0
  274. /package/dist/{pds-icons → collection/components/pds-icon}/svg/phone-portrait.svg +0 -0
  275. /package/dist/{pds-icons → collection/components/pds-icon}/svg/phone-toolbar.svg +0 -0
  276. /package/dist/{pds-icons → collection/components/pds-icon}/svg/play-circle.svg +0 -0
  277. /package/dist/{pds-icons → collection/components/pds-icon}/svg/play-outline.svg +0 -0
  278. /package/dist/{pds-icons → collection/components/pds-icon}/svg/play-store.svg +0 -0
  279. /package/dist/{pds-icons → collection/components/pds-icon}/svg/play.svg +0 -0
  280. /package/dist/{pds-icons → collection/components/pds-icon}/svg/plug.svg +0 -0
  281. /package/dist/{pds-icons → collection/components/pds-icon}/svg/present.svg +0 -0
  282. /package/dist/{pds-icons → collection/components/pds-icon}/svg/preview-off.svg +0 -0
  283. /package/dist/{pds-icons → collection/components/pds-icon}/svg/preview-on.svg +0 -0
  284. /package/dist/{pds-icons → collection/components/pds-icon}/svg/products-filled.svg +0 -0
  285. /package/dist/{pds-icons → collection/components/pds-icon}/svg/products-outline.svg +0 -0
  286. /package/dist/{pds-icons → collection/components/pds-icon}/svg/question-circle.svg +0 -0
  287. /package/dist/{pds-icons → collection/components/pds-icon}/svg/quote.svg +0 -0
  288. /package/dist/{pds-icons → collection/components/pds-icon}/svg/redo.svg +0 -0
  289. /package/dist/{pds-icons → collection/components/pds-icon}/svg/refresh.svg +0 -0
  290. /package/dist/{pds-icons → collection/components/pds-icon}/svg/remove-circle.svg +0 -0
  291. /package/dist/{pds-icons → collection/components/pds-icon}/svg/remove.svg +0 -0
  292. /package/dist/{pds-icons → collection/components/pds-icon}/svg/rename.svg +0 -0
  293. /package/dist/{pds-icons → collection/components/pds-icon}/svg/reset-password.svg +0 -0
  294. /package/dist/{pds-icons → collection/components/pds-icon}/svg/restore.svg +0 -0
  295. /package/dist/{pds-icons → collection/components/pds-icon}/svg/right-small.svg +0 -0
  296. /package/dist/{pds-icons → collection/components/pds-icon}/svg/round-dollar.svg +0 -0
  297. /package/dist/{pds-icons → collection/components/pds-icon}/svg/rows.svg +0 -0
  298. /package/dist/{pds-icons → collection/components/pds-icon}/svg/sales-filled.svg +0 -0
  299. /package/dist/{pds-icons → collection/components/pds-icon}/svg/sales-outline.svg +0 -0
  300. /package/dist/{pds-icons → collection/components/pds-icon}/svg/scissor.svg +0 -0
  301. /package/dist/{pds-icons → collection/components/pds-icon}/svg/screen-share-off.svg +0 -0
  302. /package/dist/{pds-icons → collection/components/pds-icon}/svg/screen-share-on.svg +0 -0
  303. /package/dist/{pds-icons → collection/components/pds-icon}/svg/search-small.svg +0 -0
  304. /package/dist/{pds-icons → collection/components/pds-icon}/svg/search.svg +0 -0
  305. /package/dist/{pds-icons → collection/components/pds-icon}/svg/send-message.svg +0 -0
  306. /package/dist/{pds-icons → collection/components/pds-icon}/svg/sequences.svg +0 -0
  307. /package/dist/{pds-icons → collection/components/pds-icon}/svg/series.svg +0 -0
  308. /package/dist/{pds-icons → collection/components/pds-icon}/svg/settings-filled.svg +0 -0
  309. /package/dist/{pds-icons → collection/components/pds-icon}/svg/settings-outline.svg +0 -0
  310. /package/dist/{pds-icons → collection/components/pds-icon}/svg/share.svg +0 -0
  311. /package/dist/{pds-icons → collection/components/pds-icon}/svg/skipped.svg +0 -0
  312. /package/dist/{pds-icons → collection/components/pds-icon}/svg/slash-divider.svg +0 -0
  313. /package/dist/{pds-icons → collection/components/pds-icon}/svg/sparkle-filled.svg +0 -0
  314. /package/dist/{pds-icons → collection/components/pds-icon}/svg/sparkle.svg +0 -0
  315. /package/dist/{pds-icons → collection/components/pds-icon}/svg/speaker.svg +0 -0
  316. /package/dist/{pds-icons → collection/components/pds-icon}/svg/stack.svg +0 -0
  317. /package/dist/{pds-icons → collection/components/pds-icon}/svg/star.svg +0 -0
  318. /package/dist/{pds-icons → collection/components/pds-icon}/svg/stop.svg +0 -0
  319. /package/dist/{pds-icons → collection/components/pds-icon}/svg/stopwatch.svg +0 -0
  320. /package/dist/{pds-icons → collection/components/pds-icon}/svg/strikethrough.svg +0 -0
  321. /package/dist/{pds-icons → collection/components/pds-icon}/svg/subscript.svg +0 -0
  322. /package/dist/{pds-icons → collection/components/pds-icon}/svg/subscriptions.svg +0 -0
  323. /package/dist/{pds-icons → collection/components/pds-icon}/svg/super-admin.svg +0 -0
  324. /package/dist/{pds-icons → collection/components/pds-icon}/svg/superscript.svg +0 -0
  325. /package/dist/{pds-icons → collection/components/pds-icon}/svg/sync.svg +0 -0
  326. /package/dist/{pds-icons → collection/components/pds-icon}/svg/tablet-landscape.svg +0 -0
  327. /package/dist/{pds-icons → collection/components/pds-icon}/svg/tablet-portrait.svg +0 -0
  328. /package/dist/{pds-icons → collection/components/pds-icon}/svg/text-styles.svg +0 -0
  329. /package/dist/{pds-icons → collection/components/pds-icon}/svg/theme-store.svg +0 -0
  330. /package/dist/{pds-icons → collection/components/pds-icon}/svg/thumbs-down-filled.svg +0 -0
  331. /package/dist/{pds-icons → collection/components/pds-icon}/svg/thumbs-down.svg +0 -0
  332. /package/dist/{pds-icons → collection/components/pds-icon}/svg/thumbs-up-filled.svg +0 -0
  333. /package/dist/{pds-icons → collection/components/pds-icon}/svg/thumbs-up.svg +0 -0
  334. /package/dist/{pds-icons → collection/components/pds-icon}/svg/tiktok.svg +0 -0
  335. /package/dist/{pds-icons → collection/components/pds-icon}/svg/trash.svg +0 -0
  336. /package/dist/{pds-icons → collection/components/pds-icon}/svg/twitter.svg +0 -0
  337. /package/dist/{pds-icons → collection/components/pds-icon}/svg/underline.svg +0 -0
  338. /package/dist/{pds-icons → collection/components/pds-icon}/svg/undo.svg +0 -0
  339. /package/dist/{pds-icons → collection/components/pds-icon}/svg/unlock.svg +0 -0
  340. /package/dist/{pds-icons → collection/components/pds-icon}/svg/unmapped.svg +0 -0
  341. /package/dist/{pds-icons → collection/components/pds-icon}/svg/up-small.svg +0 -0
  342. /package/dist/{pds-icons → collection/components/pds-icon}/svg/upload.svg +0 -0
  343. /package/dist/{pds-icons → collection/components/pds-icon}/svg/url.svg +0 -0
  344. /package/dist/{pds-icons → collection/components/pds-icon}/svg/user-filled.svg +0 -0
  345. /package/dist/{pds-icons → collection/components/pds-icon}/svg/user.svg +0 -0
  346. /package/dist/{pds-icons → collection/components/pds-icon}/svg/users-wm.svg +0 -0
  347. /package/dist/{pds-icons → collection/components/pds-icon}/svg/users.svg +0 -0
  348. /package/dist/{pds-icons → collection/components/pds-icon}/svg/video-off.svg +0 -0
  349. /package/dist/{pds-icons → collection/components/pds-icon}/svg/video-on.svg +0 -0
  350. /package/dist/{pds-icons → collection/components/pds-icon}/svg/warning-filled.svg +0 -0
  351. /package/dist/{pds-icons → collection/components/pds-icon}/svg/warning.svg +0 -0
  352. /package/dist/{pds-icons → collection/components/pds-icon}/svg/website-filled.svg +0 -0
  353. /package/dist/{pds-icons → collection/components/pds-icon}/svg/website-outline.svg +0 -0
  354. /package/dist/{pds-icons → collection/components/pds-icon}/svg/window-paragraph.svg +0 -0
  355. /package/dist/{pds-icons → collection/components/pds-icon}/svg/world.svg +0 -0
  356. /package/dist/{pds-icons → collection/components/pds-icon}/svg/youtube.svg +0 -0
@@ -0,0 +1,1749 @@
1
+ const NAMESPACE = 'pds-icons';
2
+
3
+ /**
4
+ * Virtual DOM patching algorithm based on Snabbdom by
5
+ * Simon Friis Vindum (@paldepind)
6
+ * Licensed under the MIT License
7
+ * https://github.com/snabbdom/snabbdom/blob/master/LICENSE
8
+ *
9
+ * Modified for Stencil's renderer and slot projection
10
+ */
11
+ let scopeId;
12
+ let hostTagName;
13
+ let isSvgMode = false;
14
+ let queuePending = false;
15
+ const getAssetPath = (path) => {
16
+ const assetUrl = new URL(path, plt.$resourcesUrl$);
17
+ return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
18
+ };
19
+ const createTime = (fnName, tagName = '') => {
20
+ {
21
+ return () => {
22
+ return;
23
+ };
24
+ }
25
+ };
26
+ const uniqueTime = (key, measureText) => {
27
+ {
28
+ return () => {
29
+ return;
30
+ };
31
+ }
32
+ };
33
+ const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
34
+ const XLINK_NS = 'http://www.w3.org/1999/xlink';
35
+ /**
36
+ * Default style mode id
37
+ */
38
+ /**
39
+ * Reusable empty obj/array
40
+ * Don't add values to these!!
41
+ */
42
+ const EMPTY_OBJ = {};
43
+ const isDef = (v) => v != null;
44
+ /**
45
+ * Check whether a value is a 'complex type', defined here as an object or a
46
+ * function.
47
+ *
48
+ * @param o the value to check
49
+ * @returns whether it's a complex type or not
50
+ */
51
+ const isComplexType = (o) => {
52
+ // https://jsperf.com/typeof-fn-object/5
53
+ o = typeof o;
54
+ return o === 'object' || o === 'function';
55
+ };
56
+ /**
57
+ * Helper method for querying a `meta` tag that contains a nonce value
58
+ * out of a DOM's head.
59
+ *
60
+ * @param doc The DOM containing the `head` to query against
61
+ * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag
62
+ * exists or the tag has no content.
63
+ */
64
+ function queryNonceMetaTagContent(doc) {
65
+ var _a, _b, _c;
66
+ 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;
67
+ }
68
+ /**
69
+ * Production h() function based on Preact by
70
+ * Jason Miller (@developit)
71
+ * Licensed under the MIT License
72
+ * https://github.com/developit/preact/blob/master/LICENSE
73
+ *
74
+ * Modified for Stencil's compiler and vdom
75
+ */
76
+ // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
77
+ // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
78
+ const h = (nodeName, vnodeData, ...children) => {
79
+ let child = null;
80
+ let key = null;
81
+ let simple = false;
82
+ let lastSimple = false;
83
+ const vNodeChildren = [];
84
+ const walk = (c) => {
85
+ for (let i = 0; i < c.length; i++) {
86
+ child = c[i];
87
+ if (Array.isArray(child)) {
88
+ walk(child);
89
+ }
90
+ else if (child != null && typeof child !== 'boolean') {
91
+ if ((simple = typeof nodeName !== 'function' && !isComplexType(child))) {
92
+ child = String(child);
93
+ }
94
+ if (simple && lastSimple) {
95
+ // If the previous child was simple (string), we merge both
96
+ vNodeChildren[vNodeChildren.length - 1].$text$ += child;
97
+ }
98
+ else {
99
+ // Append a new vNode, if it's text, we create a text vNode
100
+ vNodeChildren.push(simple ? newVNode(null, child) : child);
101
+ }
102
+ lastSimple = simple;
103
+ }
104
+ }
105
+ };
106
+ walk(children);
107
+ if (vnodeData) {
108
+ if (vnodeData.key) {
109
+ key = vnodeData.key;
110
+ }
111
+ // normalize class / className attributes
112
+ {
113
+ const classData = vnodeData.className || vnodeData.class;
114
+ if (classData) {
115
+ vnodeData.class =
116
+ typeof classData !== 'object'
117
+ ? classData
118
+ : Object.keys(classData)
119
+ .filter((k) => classData[k])
120
+ .join(' ');
121
+ }
122
+ }
123
+ }
124
+ const vnode = newVNode(nodeName, null);
125
+ vnode.$attrs$ = vnodeData;
126
+ if (vNodeChildren.length > 0) {
127
+ vnode.$children$ = vNodeChildren;
128
+ }
129
+ {
130
+ vnode.$key$ = key;
131
+ }
132
+ return vnode;
133
+ };
134
+ /**
135
+ * A utility function for creating a virtual DOM node from a tag and some
136
+ * possible text content.
137
+ *
138
+ * @param tag the tag for this element
139
+ * @param text possible text content for the node
140
+ * @returns a newly-minted virtual DOM node
141
+ */
142
+ const newVNode = (tag, text) => {
143
+ const vnode = {
144
+ $flags$: 0,
145
+ $tag$: tag,
146
+ $text$: text,
147
+ $elm$: null,
148
+ $children$: null,
149
+ };
150
+ {
151
+ vnode.$attrs$ = null;
152
+ }
153
+ {
154
+ vnode.$key$ = null;
155
+ }
156
+ return vnode;
157
+ };
158
+ const Host = {};
159
+ /**
160
+ * Check whether a given node is a Host node or not
161
+ *
162
+ * @param node the virtual DOM node to check
163
+ * @returns whether it's a Host node or not
164
+ */
165
+ const isHost = (node) => node && node.$tag$ === Host;
166
+ /**
167
+ * Parse a new property value for a given property type.
168
+ *
169
+ * While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
170
+ * it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
171
+ * 1. `any`, the type given to `propValue` in the function signature
172
+ * 2. the type stored from `propType`.
173
+ *
174
+ * This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
175
+ *
176
+ * Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
177
+ * a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
178
+ * based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
179
+ * ```tsx
180
+ * <my-cmp prop-val={0}></my-cmp>
181
+ * ```
182
+ *
183
+ * HTML prop values on the other hand, will always a string
184
+ *
185
+ * @param propValue the new value to coerce to some type
186
+ * @param propType the type of the prop, expressed as a binary number
187
+ * @returns the parsed/coerced value
188
+ */
189
+ const parsePropertyValue = (propValue, propType) => {
190
+ // ensure this value is of the correct prop type
191
+ if (propValue != null && !isComplexType(propValue)) {
192
+ if (propType & 1 /* MEMBER_FLAGS.String */) {
193
+ // could have been passed as a number or boolean
194
+ // but we still want it as a string
195
+ return String(propValue);
196
+ }
197
+ // redundant return here for better minification
198
+ return propValue;
199
+ }
200
+ // not sure exactly what type we want
201
+ // so no need to change to a different type
202
+ return propValue;
203
+ };
204
+ const getElement = (ref) => (getHostRef(ref).$hostElement$ );
205
+ /**
206
+ * Helper function to create & dispatch a custom Event on a provided target
207
+ * @param elm the target of the Event
208
+ * @param name the name to give the custom Event
209
+ * @param opts options for configuring a custom Event
210
+ * @returns the custom Event
211
+ */
212
+ const emitEvent = (elm, name, opts) => {
213
+ const ev = plt.ce(name, opts);
214
+ elm.dispatchEvent(ev);
215
+ return ev;
216
+ };
217
+ const rootAppliedStyles = /*@__PURE__*/ new WeakMap();
218
+ const registerStyle = (scopeId, cssText, allowCS) => {
219
+ let style = styles.get(scopeId);
220
+ if (supportsConstructableStylesheets && allowCS) {
221
+ style = (style || new CSSStyleSheet());
222
+ if (typeof style === 'string') {
223
+ style = cssText;
224
+ }
225
+ else {
226
+ style.replaceSync(cssText);
227
+ }
228
+ }
229
+ else {
230
+ style = cssText;
231
+ }
232
+ styles.set(scopeId, style);
233
+ };
234
+ const addStyle = (styleContainerNode, cmpMeta, mode) => {
235
+ var _a;
236
+ const scopeId = getScopeId(cmpMeta);
237
+ const style = styles.get(scopeId);
238
+ // if an element is NOT connected then getRootNode() will return the wrong root node
239
+ // so the fallback is to always use the document for the root node in those cases
240
+ styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;
241
+ if (style) {
242
+ if (typeof style === 'string') {
243
+ styleContainerNode = styleContainerNode.head || styleContainerNode;
244
+ let appliedStyles = rootAppliedStyles.get(styleContainerNode);
245
+ let styleElm;
246
+ if (!appliedStyles) {
247
+ rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
248
+ }
249
+ if (!appliedStyles.has(scopeId)) {
250
+ {
251
+ styleElm = doc.createElement('style');
252
+ styleElm.innerHTML = style;
253
+ // Apply CSP nonce to the style tag if it exists
254
+ const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
255
+ if (nonce != null) {
256
+ styleElm.setAttribute('nonce', nonce);
257
+ }
258
+ styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
259
+ }
260
+ if (appliedStyles) {
261
+ appliedStyles.add(scopeId);
262
+ }
263
+ }
264
+ }
265
+ else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
266
+ styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
267
+ }
268
+ }
269
+ return scopeId;
270
+ };
271
+ const attachStyles = (hostRef) => {
272
+ const cmpMeta = hostRef.$cmpMeta$;
273
+ const elm = hostRef.$hostElement$;
274
+ const flags = cmpMeta.$flags$;
275
+ const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
276
+ const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
277
+ if (flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) {
278
+ // only required when we're NOT using native shadow dom (slot)
279
+ // or this browser doesn't support native shadow dom
280
+ // and this host element was NOT created with SSR
281
+ // let's pick out the inner content for slot projection
282
+ // create a node to represent where the original
283
+ // content was first placed, which is useful later on
284
+ // DOM WRITE!!
285
+ elm['s-sc'] = scopeId;
286
+ elm.classList.add(scopeId + '-h');
287
+ }
288
+ endAttachStyles();
289
+ };
290
+ const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
291
+ /**
292
+ * Production setAccessor() function based on Preact by
293
+ * Jason Miller (@developit)
294
+ * Licensed under the MIT License
295
+ * https://github.com/developit/preact/blob/master/LICENSE
296
+ *
297
+ * Modified for Stencil's compiler and vdom
298
+ */
299
+ /**
300
+ * When running a VDom render set properties present on a VDom node onto the
301
+ * corresponding HTML element.
302
+ *
303
+ * Note that this function has special functionality for the `class`,
304
+ * `style`, `key`, and `ref` attributes, as well as event handlers (like
305
+ * `onClick`, etc). All others are just passed through as-is.
306
+ *
307
+ * @param elm the HTMLElement onto which attributes should be set
308
+ * @param memberName the name of the attribute to set
309
+ * @param oldValue the old value for the attribute
310
+ * @param newValue the new value for the attribute
311
+ * @param isSvg whether we're in an svg context or not
312
+ * @param flags bitflags for Vdom variables
313
+ */
314
+ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
315
+ if (oldValue !== newValue) {
316
+ let isProp = isMemberInElement(elm, memberName);
317
+ let ln = memberName.toLowerCase();
318
+ if (memberName === 'class') {
319
+ const classList = elm.classList;
320
+ const oldClasses = parseClassList(oldValue);
321
+ const newClasses = parseClassList(newValue);
322
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
323
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
324
+ }
325
+ else if (memberName === 'style') {
326
+ // update style attribute, css properties and values
327
+ {
328
+ for (const prop in oldValue) {
329
+ if (!newValue || newValue[prop] == null) {
330
+ if (prop.includes('-')) {
331
+ elm.style.removeProperty(prop);
332
+ }
333
+ else {
334
+ elm.style[prop] = '';
335
+ }
336
+ }
337
+ }
338
+ }
339
+ for (const prop in newValue) {
340
+ if (!oldValue || newValue[prop] !== oldValue[prop]) {
341
+ if (prop.includes('-')) {
342
+ elm.style.setProperty(prop, newValue[prop]);
343
+ }
344
+ else {
345
+ elm.style[prop] = newValue[prop];
346
+ }
347
+ }
348
+ }
349
+ }
350
+ else if (memberName === 'key')
351
+ ;
352
+ else if (memberName === 'ref') {
353
+ // minifier will clean this up
354
+ if (newValue) {
355
+ newValue(elm);
356
+ }
357
+ }
358
+ else if ((!isProp ) &&
359
+ memberName[0] === 'o' &&
360
+ memberName[1] === 'n') {
361
+ // Event Handlers
362
+ // so if the member name starts with "on" and the 3rd characters is
363
+ // a capital letter, and it's not already a member on the element,
364
+ // then we're assuming it's an event listener
365
+ if (memberName[2] === '-') {
366
+ // on- prefixed events
367
+ // allows to be explicit about the dom event to listen without any magic
368
+ // under the hood:
369
+ // <my-cmp on-click> // listens for "click"
370
+ // <my-cmp on-Click> // listens for "Click"
371
+ // <my-cmp on-ionChange> // listens for "ionChange"
372
+ // <my-cmp on-EVENTS> // listens for "EVENTS"
373
+ memberName = memberName.slice(3);
374
+ }
375
+ else if (isMemberInElement(win, ln)) {
376
+ // standard event
377
+ // the JSX attribute could have been "onMouseOver" and the
378
+ // member name "onmouseover" is on the window's prototype
379
+ // so let's add the listener "mouseover", which is all lowercased
380
+ memberName = ln.slice(2);
381
+ }
382
+ else {
383
+ // custom event
384
+ // the JSX attribute could have been "onMyCustomEvent"
385
+ // so let's trim off the "on" prefix and lowercase the first character
386
+ // and add the listener "myCustomEvent"
387
+ // except for the first character, we keep the event name case
388
+ memberName = ln[2] + memberName.slice(3);
389
+ }
390
+ if (oldValue) {
391
+ plt.rel(elm, memberName, oldValue, false);
392
+ }
393
+ if (newValue) {
394
+ plt.ael(elm, memberName, newValue, false);
395
+ }
396
+ }
397
+ else {
398
+ // Set property if it exists and it's not a SVG
399
+ const isComplex = isComplexType(newValue);
400
+ if ((isProp || (isComplex && newValue !== null)) && !isSvg) {
401
+ try {
402
+ if (!elm.tagName.includes('-')) {
403
+ const n = newValue == null ? '' : newValue;
404
+ // Workaround for Safari, moving the <input> caret when re-assigning the same valued
405
+ if (memberName === 'list') {
406
+ isProp = false;
407
+ }
408
+ else if (oldValue == null || elm[memberName] != n) {
409
+ elm[memberName] = n;
410
+ }
411
+ }
412
+ else {
413
+ elm[memberName] = newValue;
414
+ }
415
+ }
416
+ catch (e) { }
417
+ }
418
+ /**
419
+ * Need to manually update attribute if:
420
+ * - memberName is not an attribute
421
+ * - if we are rendering the host element in order to reflect attribute
422
+ * - if it's a SVG, since properties might not work in <svg>
423
+ * - if the newValue is null/undefined or 'false'.
424
+ */
425
+ let xlink = false;
426
+ {
427
+ if (ln !== (ln = ln.replace(/^xlink\:?/, ''))) {
428
+ memberName = ln;
429
+ xlink = true;
430
+ }
431
+ }
432
+ if (newValue == null || newValue === false) {
433
+ if (newValue !== false || elm.getAttribute(memberName) === '') {
434
+ if (xlink) {
435
+ elm.removeAttributeNS(XLINK_NS, memberName);
436
+ }
437
+ else {
438
+ elm.removeAttribute(memberName);
439
+ }
440
+ }
441
+ }
442
+ else if ((!isProp || flags & 4 /* VNODE_FLAGS.isHost */ || isSvg) && !isComplex) {
443
+ newValue = newValue === true ? '' : newValue;
444
+ if (xlink) {
445
+ elm.setAttributeNS(XLINK_NS, memberName, newValue);
446
+ }
447
+ else {
448
+ elm.setAttribute(memberName, newValue);
449
+ }
450
+ }
451
+ }
452
+ }
453
+ };
454
+ const parseClassListRegex = /\s/;
455
+ const parseClassList = (value) => (!value ? [] : value.split(parseClassListRegex));
456
+ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
457
+ // if the element passed in is a shadow root, which is a document fragment
458
+ // then we want to be adding attrs/props to the shadow root's "host" element
459
+ // if it's not a shadow root, then we add attrs/props to the same element
460
+ const elm = newVnode.$elm$.nodeType === 11 /* NODE_TYPE.DocumentFragment */ && newVnode.$elm$.host
461
+ ? newVnode.$elm$.host
462
+ : newVnode.$elm$;
463
+ const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
464
+ const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
465
+ {
466
+ // remove attributes no longer present on the vnode by setting them to undefined
467
+ for (memberName in oldVnodeAttrs) {
468
+ if (!(memberName in newVnodeAttrs)) {
469
+ setAccessor(elm, memberName, oldVnodeAttrs[memberName], undefined, isSvgMode, newVnode.$flags$);
470
+ }
471
+ }
472
+ }
473
+ // add new & update changed attributes
474
+ for (memberName in newVnodeAttrs) {
475
+ setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
476
+ }
477
+ };
478
+ /**
479
+ * Create a DOM Node corresponding to one of the children of a given VNode.
480
+ *
481
+ * @param oldParentVNode the parent VNode from the previous render
482
+ * @param newParentVNode the parent VNode from the current render
483
+ * @param childIndex the index of the VNode, in the _new_ parent node's
484
+ * children, for which we will create a new DOM node
485
+ * @param parentElm the parent DOM node which our new node will be a child of
486
+ * @returns the newly created node
487
+ */
488
+ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
489
+ // tslint:disable-next-line: prefer-const
490
+ const newVNode = newParentVNode.$children$[childIndex];
491
+ let i = 0;
492
+ let elm;
493
+ let childNode;
494
+ if (newVNode.$text$ !== null) {
495
+ // create text node
496
+ elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
497
+ }
498
+ else {
499
+ // create element
500
+ elm = newVNode.$elm$ = (doc.createElement(newVNode.$tag$));
501
+ // add css classes, attrs, props, listeners, etc.
502
+ {
503
+ updateElement(null, newVNode, isSvgMode);
504
+ }
505
+ if (isDef(scopeId) && elm['s-si'] !== scopeId) {
506
+ // if there is a scopeId and this is the initial render
507
+ // then let's add the scopeId as a css class
508
+ elm.classList.add((elm['s-si'] = scopeId));
509
+ }
510
+ if (newVNode.$children$) {
511
+ for (i = 0; i < newVNode.$children$.length; ++i) {
512
+ // create the node
513
+ childNode = createElm(oldParentVNode, newVNode, i);
514
+ // return node could have been null
515
+ if (childNode) {
516
+ // append our new node
517
+ elm.appendChild(childNode);
518
+ }
519
+ }
520
+ }
521
+ }
522
+ return elm;
523
+ };
524
+ /**
525
+ * Create DOM nodes corresponding to a list of {@link d.Vnode} objects and
526
+ * add them to the DOM in the appropriate place.
527
+ *
528
+ * @param parentElm the DOM node which should be used as a parent for the new
529
+ * DOM nodes
530
+ * @param before a child of the `parentElm` which the new children should be
531
+ * inserted before (optional)
532
+ * @param parentVNode the parent virtual DOM node
533
+ * @param vnodes the new child virtual DOM nodes to produce DOM nodes for
534
+ * @param startIdx the index in the child virtual DOM nodes at which to start
535
+ * creating DOM nodes (inclusive)
536
+ * @param endIdx the index in the child virtual DOM nodes at which to stop
537
+ * creating DOM nodes (inclusive)
538
+ */
539
+ const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
540
+ let containerElm = (parentElm);
541
+ let childNode;
542
+ if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
543
+ containerElm = containerElm.shadowRoot;
544
+ }
545
+ for (; startIdx <= endIdx; ++startIdx) {
546
+ if (vnodes[startIdx]) {
547
+ childNode = createElm(null, parentVNode, startIdx);
548
+ if (childNode) {
549
+ vnodes[startIdx].$elm$ = childNode;
550
+ containerElm.insertBefore(childNode, before);
551
+ }
552
+ }
553
+ }
554
+ };
555
+ /**
556
+ * Remove the DOM elements corresponding to a list of {@link d.VNode} objects.
557
+ * This can be used to, for instance, clean up after a list of children which
558
+ * should no longer be shown.
559
+ *
560
+ * This function also handles some of Stencil's slot relocation logic.
561
+ *
562
+ * @param vnodes a list of virtual DOM nodes to remove
563
+ * @param startIdx the index at which to start removing nodes (inclusive)
564
+ * @param endIdx the index at which to stop removing nodes (inclusive)
565
+ */
566
+ const removeVnodes = (vnodes, startIdx, endIdx) => {
567
+ for (let index = startIdx; index <= endIdx; ++index) {
568
+ const vnode = vnodes[index];
569
+ if (vnode) {
570
+ const elm = vnode.$elm$;
571
+ nullifyVNodeRefs(vnode);
572
+ if (elm) {
573
+ // remove the vnode's element from the dom
574
+ elm.remove();
575
+ }
576
+ }
577
+ }
578
+ };
579
+ /**
580
+ * Reconcile the children of a new VNode with the children of an old VNode by
581
+ * traversing the two collections of children, identifying nodes that are
582
+ * conserved or changed, calling out to `patch` to make any necessary
583
+ * updates to the DOM, and rearranging DOM nodes as needed.
584
+ *
585
+ * The algorithm for reconciling children works by analyzing two 'windows' onto
586
+ * the two arrays of children (`oldCh` and `newCh`). We keep track of the
587
+ * 'windows' by storing start and end indices and references to the
588
+ * corresponding array entries. Initially the two 'windows' are basically equal
589
+ * to the entire array, but we progressively narrow the windows until there are
590
+ * no children left to update by doing the following:
591
+ *
592
+ * 1. Skip any `null` entries at the beginning or end of the two arrays, so
593
+ * that if we have an initial array like the following we'll end up dealing
594
+ * only with a window bounded by the highlighted elements:
595
+ *
596
+ * [null, null, VNode1 , ... , VNode2, null, null]
597
+ * ^^^^^^ ^^^^^^
598
+ *
599
+ * 2. Check to see if the elements at the head and tail positions are equal
600
+ * across the windows. This will basically detect elements which haven't
601
+ * been added, removed, or changed position, i.e. if you had the following
602
+ * VNode elements (represented as HTML):
603
+ *
604
+ * oldVNode: `<div><p><span>HEY</span></p></div>`
605
+ * newVNode: `<div><p><span>THERE</span></p></div>`
606
+ *
607
+ * Then when comparing the children of the `<div>` tag we check the equality
608
+ * of the VNodes corresponding to the `<p>` tags and, since they are the
609
+ * same tag in the same position, we'd be able to avoid completely
610
+ * re-rendering the subtree under them with a new DOM element and would just
611
+ * call out to `patch` to handle reconciling their children and so on.
612
+ *
613
+ * 3. Check, for both windows, to see if the element at the beginning of the
614
+ * window corresponds to the element at the end of the other window. This is
615
+ * a heuristic which will let us identify _some_ situations in which
616
+ * elements have changed position, for instance it _should_ detect that the
617
+ * children nodes themselves have not changed but merely moved in the
618
+ * following example:
619
+ *
620
+ * oldVNode: `<div><element-one /><element-two /></div>`
621
+ * newVNode: `<div><element-two /><element-one /></div>`
622
+ *
623
+ * If we find cases like this then we also need to move the concrete DOM
624
+ * elements corresponding to the moved children to write the re-order to the
625
+ * DOM.
626
+ *
627
+ * 4. Finally, if VNodes have the `key` attribute set on them we check for any
628
+ * nodes in the old children which have the same key as the first element in
629
+ * our window on the new children. If we find such a node we handle calling
630
+ * out to `patch`, moving relevant DOM nodes, and so on, in accordance with
631
+ * what we find.
632
+ *
633
+ * Finally, once we've narrowed our 'windows' to the point that either of them
634
+ * collapse (i.e. they have length 0) we then handle any remaining VNode
635
+ * insertion or deletion that needs to happen to get a DOM state that correctly
636
+ * reflects the new child VNodes. If, for instance, after our window on the old
637
+ * children has collapsed we still have more nodes on the new children that
638
+ * we haven't dealt with yet then we need to add them, or if the new children
639
+ * collapse but we still have unhandled _old_ children then we need to make
640
+ * sure the corresponding DOM nodes are removed.
641
+ *
642
+ * @param parentElm the node into which the parent VNode is rendered
643
+ * @param oldCh the old children of the parent node
644
+ * @param newVNode the new VNode which will replace the parent
645
+ * @param newCh the new children of the parent node
646
+ */
647
+ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
648
+ let oldStartIdx = 0;
649
+ let newStartIdx = 0;
650
+ let idxInOld = 0;
651
+ let i = 0;
652
+ let oldEndIdx = oldCh.length - 1;
653
+ let oldStartVnode = oldCh[0];
654
+ let oldEndVnode = oldCh[oldEndIdx];
655
+ let newEndIdx = newCh.length - 1;
656
+ let newStartVnode = newCh[0];
657
+ let newEndVnode = newCh[newEndIdx];
658
+ let node;
659
+ let elmToMove;
660
+ while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
661
+ if (oldStartVnode == null) {
662
+ // VNode might have been moved left
663
+ oldStartVnode = oldCh[++oldStartIdx];
664
+ }
665
+ else if (oldEndVnode == null) {
666
+ oldEndVnode = oldCh[--oldEndIdx];
667
+ }
668
+ else if (newStartVnode == null) {
669
+ newStartVnode = newCh[++newStartIdx];
670
+ }
671
+ else if (newEndVnode == null) {
672
+ newEndVnode = newCh[--newEndIdx];
673
+ }
674
+ else if (isSameVnode(oldStartVnode, newStartVnode)) {
675
+ // if the start nodes are the same then we should patch the new VNode
676
+ // onto the old one, and increment our `newStartIdx` and `oldStartIdx`
677
+ // indices to reflect that. We don't need to move any DOM Nodes around
678
+ // since things are matched up in order.
679
+ patch(oldStartVnode, newStartVnode);
680
+ oldStartVnode = oldCh[++oldStartIdx];
681
+ newStartVnode = newCh[++newStartIdx];
682
+ }
683
+ else if (isSameVnode(oldEndVnode, newEndVnode)) {
684
+ // likewise, if the end nodes are the same we patch new onto old and
685
+ // decrement our end indices, and also likewise in this case we don't
686
+ // need to move any DOM Nodes.
687
+ patch(oldEndVnode, newEndVnode);
688
+ oldEndVnode = oldCh[--oldEndIdx];
689
+ newEndVnode = newCh[--newEndIdx];
690
+ }
691
+ else if (isSameVnode(oldStartVnode, newEndVnode)) {
692
+ patch(oldStartVnode, newEndVnode);
693
+ // We need to move the element for `oldStartVnode` into a position which
694
+ // will be appropriate for `newEndVnode`. For this we can use
695
+ // `.insertBefore` and `oldEndVnode.$elm$.nextSibling`. If there is a
696
+ // sibling for `oldEndVnode.$elm$` then we want to move the DOM node for
697
+ // `oldStartVnode` between `oldEndVnode` and it's sibling, like so:
698
+ //
699
+ // <old-start-node />
700
+ // <some-intervening-node />
701
+ // <old-end-node />
702
+ // <!-- -> <-- `oldStartVnode.$elm$` should be inserted here
703
+ // <next-sibling />
704
+ //
705
+ // If instead `oldEndVnode.$elm$` has no sibling then we just want to put
706
+ // the node for `oldStartVnode` at the end of the children of
707
+ // `parentElm`. Luckily, `Node.nextSibling` will return `null` if there
708
+ // aren't any siblings, and passing `null` to `Node.insertBefore` will
709
+ // append it to the children of the parent element.
710
+ parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
711
+ oldStartVnode = oldCh[++oldStartIdx];
712
+ newEndVnode = newCh[--newEndIdx];
713
+ }
714
+ else if (isSameVnode(oldEndVnode, newStartVnode)) {
715
+ patch(oldEndVnode, newStartVnode);
716
+ // We've already checked above if `oldStartVnode` and `newStartVnode` are
717
+ // the same node, so since we're here we know that they are not. Thus we
718
+ // can move the element for `oldEndVnode` _before_ the element for
719
+ // `oldStartVnode`, leaving `oldStartVnode` to be reconciled in the
720
+ // future.
721
+ parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
722
+ oldEndVnode = oldCh[--oldEndIdx];
723
+ newStartVnode = newCh[++newStartIdx];
724
+ }
725
+ else {
726
+ // Here we do some checks to match up old and new nodes based on the
727
+ // `$key$` attribute, which is set by putting a `key="my-key"` attribute
728
+ // in the JSX for a DOM element in the implementation of a Stencil
729
+ // component.
730
+ //
731
+ // First we check to see if there are any nodes in the array of old
732
+ // children which have the same key as the first node in the new
733
+ // children.
734
+ idxInOld = -1;
735
+ {
736
+ for (i = oldStartIdx; i <= oldEndIdx; ++i) {
737
+ if (oldCh[i] && oldCh[i].$key$ !== null && oldCh[i].$key$ === newStartVnode.$key$) {
738
+ idxInOld = i;
739
+ break;
740
+ }
741
+ }
742
+ }
743
+ if (idxInOld >= 0) {
744
+ // We found a node in the old children which matches up with the first
745
+ // node in the new children! So let's deal with that
746
+ elmToMove = oldCh[idxInOld];
747
+ if (elmToMove.$tag$ !== newStartVnode.$tag$) {
748
+ // the tag doesn't match so we'll need a new DOM element
749
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld);
750
+ }
751
+ else {
752
+ patch(elmToMove, newStartVnode);
753
+ // invalidate the matching old node so that we won't try to update it
754
+ // again later on
755
+ oldCh[idxInOld] = undefined;
756
+ node = elmToMove.$elm$;
757
+ }
758
+ newStartVnode = newCh[++newStartIdx];
759
+ }
760
+ else {
761
+ // We either didn't find an element in the old children that matches
762
+ // the key of the first new child OR the build is not using `key`
763
+ // attributes at all. In either case we need to create a new element
764
+ // for the new node.
765
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx);
766
+ newStartVnode = newCh[++newStartIdx];
767
+ }
768
+ if (node) {
769
+ // if we created a new node then handle inserting it to the DOM
770
+ {
771
+ oldStartVnode.$elm$.parentNode.insertBefore(node, oldStartVnode.$elm$);
772
+ }
773
+ }
774
+ }
775
+ }
776
+ if (oldStartIdx > oldEndIdx) {
777
+ // we have some more new nodes to add which don't match up with old nodes
778
+ addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx);
779
+ }
780
+ else if (newStartIdx > newEndIdx) {
781
+ // there are nodes in the `oldCh` array which no longer correspond to nodes
782
+ // in the new array, so lets remove them (which entails cleaning up the
783
+ // relevant DOM nodes)
784
+ removeVnodes(oldCh, oldStartIdx, oldEndIdx);
785
+ }
786
+ };
787
+ /**
788
+ * Compare two VNodes to determine if they are the same
789
+ *
790
+ * **NB**: This function is an equality _heuristic_ based on the available
791
+ * information set on the two VNodes and can be misleading under certain
792
+ * circumstances. In particular, if the two nodes do not have `key` attrs
793
+ * (available under `$key$` on VNodes) then the function falls back on merely
794
+ * checking that they have the same tag.
795
+ *
796
+ * So, in other words, if `key` attrs are not set on VNodes which may be
797
+ * changing order within a `children` array or something along those lines then
798
+ * we could obtain a false negative and then have to do needless re-rendering
799
+ * (i.e. we'd say two VNodes aren't equal when in fact they should be).
800
+ *
801
+ * @param leftVNode the first VNode to check
802
+ * @param rightVNode the second VNode to check
803
+ * @returns whether they're equal or not
804
+ */
805
+ const isSameVnode = (leftVNode, rightVNode) => {
806
+ // compare if two vnode to see if they're "technically" the same
807
+ // need to have the same element tag, and same key to be the same
808
+ if (leftVNode.$tag$ === rightVNode.$tag$) {
809
+ // this will be set if components in the build have `key` attrs set on them
810
+ {
811
+ return leftVNode.$key$ === rightVNode.$key$;
812
+ }
813
+ }
814
+ return false;
815
+ };
816
+ /**
817
+ * Handle reconciling an outdated VNode with a new one which corresponds to
818
+ * it. This function handles flushing updates to the DOM and reconciling the
819
+ * children of the two nodes (if any).
820
+ *
821
+ * @param oldVNode an old VNode whose DOM element and children we want to update
822
+ * @param newVNode a new VNode representing an updated version of the old one
823
+ */
824
+ const patch = (oldVNode, newVNode) => {
825
+ const elm = (newVNode.$elm$ = oldVNode.$elm$);
826
+ const oldChildren = oldVNode.$children$;
827
+ const newChildren = newVNode.$children$;
828
+ const text = newVNode.$text$;
829
+ if (text === null) {
830
+ {
831
+ {
832
+ // either this is the first render of an element OR it's an update
833
+ // AND we already know it's possible it could have changed
834
+ // this updates the element's css classes, attrs, props, listeners, etc.
835
+ updateElement(oldVNode, newVNode, isSvgMode);
836
+ }
837
+ }
838
+ if (oldChildren !== null && newChildren !== null) {
839
+ // looks like there's child vnodes for both the old and new vnodes
840
+ // so we need to call `updateChildren` to reconcile them
841
+ updateChildren(elm, oldChildren, newVNode, newChildren);
842
+ }
843
+ else if (newChildren !== null) {
844
+ // no old child vnodes, but there are new child vnodes to add
845
+ if (oldVNode.$text$ !== null) {
846
+ // the old vnode was text, so be sure to clear it out
847
+ elm.textContent = '';
848
+ }
849
+ // add the new vnode children
850
+ addVnodes(elm, null, newVNode, newChildren, 0, newChildren.length - 1);
851
+ }
852
+ else if (oldChildren !== null) {
853
+ // no new child vnodes, but there are old child vnodes to remove
854
+ removeVnodes(oldChildren, 0, oldChildren.length - 1);
855
+ }
856
+ }
857
+ else if (oldVNode.$text$ !== text) {
858
+ // update the text content for the text only vnode
859
+ // and also only if the text is different than before
860
+ elm.data = text;
861
+ }
862
+ };
863
+ /**
864
+ * 'Nullify' any VDom `ref` callbacks on a VDom node or its children by
865
+ * calling them with `null`. This signals that the DOM element corresponding to
866
+ * the VDom node has been removed from the DOM.
867
+ *
868
+ * @param vNode a virtual DOM node
869
+ */
870
+ const nullifyVNodeRefs = (vNode) => {
871
+ {
872
+ vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
873
+ vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
874
+ }
875
+ };
876
+ /**
877
+ * The main entry point for Stencil's virtual DOM-based rendering engine
878
+ *
879
+ * Given a {@link d.HostRef} container and some virtual DOM nodes, this
880
+ * function will handle creating a virtual DOM tree with a single root, patching
881
+ * the current virtual DOM tree onto an old one (if any), dealing with slot
882
+ * relocation, and reflecting attributes.
883
+ *
884
+ * @param hostRef data needed to root and render the virtual DOM tree, such as
885
+ * the DOM node into which it should be rendered.
886
+ * @param renderFnResults the virtual DOM nodes to be rendered
887
+ * @param isInitialLoad whether or not this is the first call after page load
888
+ */
889
+ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
890
+ const hostElm = hostRef.$hostElement$;
891
+ const cmpMeta = hostRef.$cmpMeta$;
892
+ const oldVNode = hostRef.$vnode$ || newVNode(null, null);
893
+ // if `renderFnResults` is a Host node then we can use it directly. If not,
894
+ // we need to call `h` again to wrap the children of our component in a
895
+ // 'dummy' Host node (well, an empty vnode) since `renderVdom` assumes
896
+ // implicitly that the top-level vdom node is 1) an only child and 2)
897
+ // contains attrs that need to be set on the host element.
898
+ const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
899
+ hostTagName = hostElm.tagName;
900
+ if (cmpMeta.$attrsToReflect$) {
901
+ rootVnode.$attrs$ = rootVnode.$attrs$ || {};
902
+ cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
903
+ }
904
+ // On the first render and *only* on the first render we want to check for
905
+ // any attributes set on the host element which are also set on the vdom
906
+ // node. If we find them, we override the value on the VDom node attrs with
907
+ // the value from the host element, which allows developers building apps
908
+ // with Stencil components to override e.g. the `role` attribute on a
909
+ // component even if it's already set on the `Host`.
910
+ if (isInitialLoad && rootVnode.$attrs$) {
911
+ for (const key of Object.keys(rootVnode.$attrs$)) {
912
+ // We have a special implementation in `setAccessor` for `style` and
913
+ // `class` which reconciles values coming from the VDom with values
914
+ // already present on the DOM element, so we don't want to override those
915
+ // attributes on the VDom tree with values from the host element if they
916
+ // are present.
917
+ //
918
+ // Likewise, `ref` and `key` are special internal values for the Stencil
919
+ // runtime and we don't want to override those either.
920
+ if (hostElm.hasAttribute(key) && !['key', 'ref', 'style', 'class'].includes(key)) {
921
+ rootVnode.$attrs$[key] = hostElm[key];
922
+ }
923
+ }
924
+ }
925
+ rootVnode.$tag$ = null;
926
+ rootVnode.$flags$ |= 4 /* VNODE_FLAGS.isHost */;
927
+ hostRef.$vnode$ = rootVnode;
928
+ rootVnode.$elm$ = oldVNode.$elm$ = (hostElm.shadowRoot || hostElm );
929
+ {
930
+ scopeId = hostElm['s-sc'];
931
+ }
932
+ // synchronous patch
933
+ patch(oldVNode, rootVnode);
934
+ };
935
+ const attachToAncestor = (hostRef, ancestorComponent) => {
936
+ if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
937
+ ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
938
+ }
939
+ };
940
+ const scheduleUpdate = (hostRef, isInitialLoad) => {
941
+ {
942
+ hostRef.$flags$ |= 16 /* HOST_FLAGS.isQueuedForUpdate */;
943
+ }
944
+ if (hostRef.$flags$ & 4 /* HOST_FLAGS.isWaitingForChildren */) {
945
+ hostRef.$flags$ |= 512 /* HOST_FLAGS.needsRerender */;
946
+ return;
947
+ }
948
+ attachToAncestor(hostRef, hostRef.$ancestorComponent$);
949
+ // there is no ancestor component or the ancestor component
950
+ // has already fired off its lifecycle update then
951
+ // fire off the initial update
952
+ const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
953
+ return writeTask(dispatch) ;
954
+ };
955
+ /**
956
+ * Dispatch initial-render and update lifecycle hooks, enqueuing calls to
957
+ * component lifecycle methods like `componentWillLoad` as well as
958
+ * {@link updateComponent}, which will kick off the virtual DOM re-render.
959
+ *
960
+ * @param hostRef a reference to a host DOM node
961
+ * @param isInitialLoad whether we're on the initial load or not
962
+ * @returns an empty Promise which is used to enqueue a series of operations for
963
+ * the component
964
+ */
965
+ const dispatchHooks = (hostRef, isInitialLoad) => {
966
+ const endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$);
967
+ const instance = hostRef.$lazyInstance$ ;
968
+ // We're going to use this variable together with `enqueue` to implement a
969
+ // little promise-based queue. We start out with it `undefined`. When we add
970
+ // the first function to the queue we'll set this variable to be that
971
+ // function's return value. When we attempt to add subsequent values to the
972
+ // queue we'll check that value and, if it was a `Promise`, we'll then chain
973
+ // the new function off of that `Promise` using `.then()`. This will give our
974
+ // queue two nice properties:
975
+ //
976
+ // 1. If all functions added to the queue are synchronous they'll be called
977
+ // synchronously right away.
978
+ // 2. If all functions added to the queue are asynchronous they'll all be
979
+ // called in order after `dispatchHooks` exits.
980
+ let maybePromise;
981
+ if (isInitialLoad) {
982
+ {
983
+ // If `componentWillLoad` returns a `Promise` then we want to wait on
984
+ // whatever's going on in that `Promise` before we launch into
985
+ // rendering the component, doing other lifecycle stuff, etc. So
986
+ // in that case we assign the returned promise to the variable we
987
+ // declared above to hold a possible 'queueing' Promise
988
+ maybePromise = safeCall(instance, 'componentWillLoad');
989
+ }
990
+ }
991
+ endSchedule();
992
+ return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
993
+ };
994
+ /**
995
+ * This function uses a Promise to implement a simple first-in, first-out queue
996
+ * of functions to be called.
997
+ *
998
+ * The queue is ordered on the basis of the first argument. If it's
999
+ * `undefined`, then nothing is on the queue yet, so the provided function can
1000
+ * be called synchronously (although note that this function may return a
1001
+ * `Promise`). The idea is that then the return value of that enqueueing
1002
+ * operation is kept around, so that if it was a `Promise` then subsequent
1003
+ * functions can be enqueued by calling this function again with that `Promise`
1004
+ * as the first argument.
1005
+ *
1006
+ * @param maybePromise either a `Promise` which should resolve before the next function is called or an 'empty' sentinel
1007
+ * @param fn a function to enqueue
1008
+ * @returns either a `Promise` or the return value of the provided function
1009
+ */
1010
+ const enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn) : fn();
1011
+ /**
1012
+ * Check that a value is a `Promise`. To check, we first see if the value is an
1013
+ * instance of the `Promise` global. In a few circumstances, in particular if
1014
+ * the global has been overwritten, this is could be misleading, so we also do
1015
+ * a little 'duck typing' check to see if the `.then` property of the value is
1016
+ * defined and a function.
1017
+ *
1018
+ * @param maybePromise it might be a promise!
1019
+ * @returns whether it is or not
1020
+ */
1021
+ const isPromisey = (maybePromise) => maybePromise instanceof Promise ||
1022
+ (maybePromise && maybePromise.then && typeof maybePromise.then === 'function');
1023
+ /**
1024
+ * Update a component given reference to its host elements and so on.
1025
+ *
1026
+ * @param hostRef an object containing references to the element's host node,
1027
+ * VDom nodes, and other metadata
1028
+ * @param instance a reference to the underlying host element where it will be
1029
+ * rendered
1030
+ * @param isInitialLoad whether or not this function is being called as part of
1031
+ * the first render cycle
1032
+ */
1033
+ const updateComponent = async (hostRef, instance, isInitialLoad) => {
1034
+ var _a;
1035
+ const elm = hostRef.$hostElement$;
1036
+ const endUpdate = createTime('update', hostRef.$cmpMeta$.$tagName$);
1037
+ const rc = elm['s-rc'];
1038
+ if (isInitialLoad) {
1039
+ // DOM WRITE!
1040
+ attachStyles(hostRef);
1041
+ }
1042
+ const endRender = createTime('render', hostRef.$cmpMeta$.$tagName$);
1043
+ {
1044
+ callRender(hostRef, instance, elm, isInitialLoad);
1045
+ }
1046
+ if (rc) {
1047
+ // ok, so turns out there are some child host elements
1048
+ // waiting on this parent element to load
1049
+ // let's fire off all update callbacks waiting
1050
+ rc.map((cb) => cb());
1051
+ elm['s-rc'] = undefined;
1052
+ }
1053
+ endRender();
1054
+ endUpdate();
1055
+ {
1056
+ const childrenPromises = (_a = elm['s-p']) !== null && _a !== void 0 ? _a : [];
1057
+ const postUpdate = () => postUpdateComponent(hostRef);
1058
+ if (childrenPromises.length === 0) {
1059
+ postUpdate();
1060
+ }
1061
+ else {
1062
+ Promise.all(childrenPromises).then(postUpdate);
1063
+ hostRef.$flags$ |= 4 /* HOST_FLAGS.isWaitingForChildren */;
1064
+ childrenPromises.length = 0;
1065
+ }
1066
+ }
1067
+ };
1068
+ /**
1069
+ * Handle making the call to the VDom renderer with the proper context given
1070
+ * various build variables
1071
+ *
1072
+ * @param hostRef an object containing references to the element's host node,
1073
+ * VDom nodes, and other metadata
1074
+ * @param instance a reference to the underlying host element where it will be
1075
+ * rendered
1076
+ * @param elm the Host element for the component
1077
+ * @param isInitialLoad whether or not this function is being called as part of
1078
+ * @returns an empty promise
1079
+ */
1080
+ const callRender = (hostRef, instance, elm, isInitialLoad) => {
1081
+ try {
1082
+ /**
1083
+ * minification optimization: `allRenderFn` is `true` if all components have a `render`
1084
+ * method, so we can call the method immediately. If not, check before calling it.
1085
+ */
1086
+ instance = instance.render() ;
1087
+ {
1088
+ hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
1089
+ }
1090
+ {
1091
+ hostRef.$flags$ |= 2 /* HOST_FLAGS.hasRendered */;
1092
+ }
1093
+ {
1094
+ {
1095
+ // looks like we've got child nodes to render into this host element
1096
+ // or we need to update the css class/attrs on the host element
1097
+ // DOM WRITE!
1098
+ {
1099
+ renderVdom(hostRef, instance, isInitialLoad);
1100
+ }
1101
+ }
1102
+ }
1103
+ }
1104
+ catch (e) {
1105
+ consoleError(e, hostRef.$hostElement$);
1106
+ }
1107
+ return null;
1108
+ };
1109
+ const postUpdateComponent = (hostRef) => {
1110
+ const tagName = hostRef.$cmpMeta$.$tagName$;
1111
+ const elm = hostRef.$hostElement$;
1112
+ const endPostUpdate = createTime('postUpdate', tagName);
1113
+ const ancestorComponent = hostRef.$ancestorComponent$;
1114
+ if (!(hostRef.$flags$ & 64 /* HOST_FLAGS.hasLoadedComponent */)) {
1115
+ hostRef.$flags$ |= 64 /* HOST_FLAGS.hasLoadedComponent */;
1116
+ {
1117
+ // DOM WRITE!
1118
+ addHydratedFlag(elm);
1119
+ }
1120
+ endPostUpdate();
1121
+ {
1122
+ hostRef.$onReadyResolve$(elm);
1123
+ if (!ancestorComponent) {
1124
+ appDidLoad();
1125
+ }
1126
+ }
1127
+ }
1128
+ else {
1129
+ endPostUpdate();
1130
+ }
1131
+ // load events fire from bottom to top
1132
+ // the deepest elements load first then bubbles up
1133
+ {
1134
+ if (hostRef.$onRenderResolve$) {
1135
+ hostRef.$onRenderResolve$();
1136
+ hostRef.$onRenderResolve$ = undefined;
1137
+ }
1138
+ if (hostRef.$flags$ & 512 /* HOST_FLAGS.needsRerender */) {
1139
+ nextTick(() => scheduleUpdate(hostRef, false));
1140
+ }
1141
+ hostRef.$flags$ &= ~(4 /* HOST_FLAGS.isWaitingForChildren */ | 512 /* HOST_FLAGS.needsRerender */);
1142
+ }
1143
+ // ( •_•)
1144
+ // ( •_•)>⌐■-■
1145
+ // (⌐■_■)
1146
+ };
1147
+ const appDidLoad = (who) => {
1148
+ // on appload
1149
+ // we have finish the first big initial render
1150
+ {
1151
+ addHydratedFlag(doc.documentElement);
1152
+ }
1153
+ nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
1154
+ };
1155
+ /**
1156
+ * Allows to safely call a method, e.g. `componentDidLoad`, on an instance,
1157
+ * e.g. custom element node. If a build figures out that e.g. no component
1158
+ * has a `componentDidLoad` method, the instance method gets removed from the
1159
+ * output bundle and this function returns `undefined`.
1160
+ * @param instance any object that may or may not contain methods
1161
+ * @param method method name
1162
+ * @param arg single arbitrary argument
1163
+ * @returns result of method call if it exists, otherwise `undefined`
1164
+ */
1165
+ const safeCall = (instance, method, arg) => {
1166
+ if (instance && instance[method]) {
1167
+ try {
1168
+ return instance[method](arg);
1169
+ }
1170
+ catch (e) {
1171
+ consoleError(e);
1172
+ }
1173
+ }
1174
+ return undefined;
1175
+ };
1176
+ const addHydratedFlag = (elm) => elm.classList.add('hydrated')
1177
+ ;
1178
+ const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
1179
+ const setValue = (ref, propName, newVal, cmpMeta) => {
1180
+ // check our new property value against our internal value
1181
+ const hostRef = getHostRef(ref);
1182
+ const elm = hostRef.$hostElement$ ;
1183
+ const oldVal = hostRef.$instanceValues$.get(propName);
1184
+ const flags = hostRef.$flags$;
1185
+ const instance = hostRef.$lazyInstance$ ;
1186
+ newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
1187
+ // explicitly check for NaN on both sides, as `NaN === NaN` is always false
1188
+ const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
1189
+ const didValueChange = newVal !== oldVal && !areBothNaN;
1190
+ if ((!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) || oldVal === undefined) && didValueChange) {
1191
+ // gadzooks! the property's value has changed!!
1192
+ // set our new value!
1193
+ hostRef.$instanceValues$.set(propName, newVal);
1194
+ if (instance) {
1195
+ // get an array of method names of watch functions to call
1196
+ if (cmpMeta.$watchers$ && flags & 128 /* HOST_FLAGS.isWatchReady */) {
1197
+ const watchMethods = cmpMeta.$watchers$[propName];
1198
+ if (watchMethods) {
1199
+ // this instance is watching for when this property changed
1200
+ watchMethods.map((watchMethodName) => {
1201
+ try {
1202
+ // fire off each of the watch methods that are watching this property
1203
+ instance[watchMethodName](newVal, oldVal, propName);
1204
+ }
1205
+ catch (e) {
1206
+ consoleError(e, elm);
1207
+ }
1208
+ });
1209
+ }
1210
+ }
1211
+ if ((flags & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) {
1212
+ // looks like this value actually changed, so we've got work to do!
1213
+ // but only if we've already rendered, otherwise just chill out
1214
+ // queue that we need to do an update, but don't worry about queuing
1215
+ // up millions cuz this function ensures it only runs once
1216
+ scheduleUpdate(hostRef, false);
1217
+ }
1218
+ }
1219
+ }
1220
+ };
1221
+ /**
1222
+ * Attach a series of runtime constructs to a compiled Stencil component
1223
+ * constructor, including getters and setters for the `@Prop` and `@State`
1224
+ * decorators, callbacks for when attributes change, and so on.
1225
+ *
1226
+ * @param Cstr the constructor for a component that we need to process
1227
+ * @param cmpMeta metadata collected previously about the component
1228
+ * @param flags a number used to store a series of bit flags
1229
+ * @returns a reference to the same constructor passed in (but now mutated)
1230
+ */
1231
+ const proxyComponent = (Cstr, cmpMeta, flags) => {
1232
+ var _a;
1233
+ if (cmpMeta.$members$) {
1234
+ if (Cstr.watchers) {
1235
+ cmpMeta.$watchers$ = Cstr.watchers;
1236
+ }
1237
+ // It's better to have a const than two Object.entries()
1238
+ const members = Object.entries(cmpMeta.$members$);
1239
+ const prototype = Cstr.prototype;
1240
+ members.map(([memberName, [memberFlags]]) => {
1241
+ if ((memberFlags & 31 /* MEMBER_FLAGS.Prop */ ||
1242
+ ((flags & 2 /* PROXY_FLAGS.proxyState */) && memberFlags & 32 /* MEMBER_FLAGS.State */))) {
1243
+ // proxyComponent - prop
1244
+ Object.defineProperty(prototype, memberName, {
1245
+ get() {
1246
+ // proxyComponent, get value
1247
+ return getValue(this, memberName);
1248
+ },
1249
+ set(newValue) {
1250
+ // proxyComponent, set value
1251
+ setValue(this, memberName, newValue, cmpMeta);
1252
+ },
1253
+ configurable: true,
1254
+ enumerable: true,
1255
+ });
1256
+ }
1257
+ });
1258
+ if ((flags & 1 /* PROXY_FLAGS.isElementConstructor */)) {
1259
+ const attrNameToPropName = new Map();
1260
+ prototype.attributeChangedCallback = function (attrName, oldValue, newValue) {
1261
+ plt.jmp(() => {
1262
+ const propName = attrNameToPropName.get(attrName);
1263
+ // In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
1264
+ // in the case where an attribute was set inline.
1265
+ // ```html
1266
+ // <my-component some-attribute="some-value"></my-component>
1267
+ // ```
1268
+ //
1269
+ // There is an edge case where a developer sets the attribute inline on a custom element and then
1270
+ // programmatically changes it before it has been upgraded as shown below:
1271
+ //
1272
+ // ```html
1273
+ // <!-- this component has _not_ been upgraded yet -->
1274
+ // <my-component id="test" some-attribute="some-value"></my-component>
1275
+ // <script>
1276
+ // // grab non-upgraded component
1277
+ // el = document.querySelector("#test");
1278
+ // el.someAttribute = "another-value";
1279
+ // // upgrade component
1280
+ // customElements.define('my-component', MyComponent);
1281
+ // </script>
1282
+ // ```
1283
+ // In this case if we do not un-shadow here and use the value of the shadowing property, attributeChangedCallback
1284
+ // will be called with `newValue = "some-value"` and will set the shadowed property (this.someAttribute = "another-value")
1285
+ // to the value that was set inline i.e. "some-value" from above example. When
1286
+ // the connectedCallback attempts to un-shadow it will use "some-value" as the initial value rather than "another-value"
1287
+ //
1288
+ // The case where the attribute was NOT set inline but was not set programmatically shall be handled/un-shadowed
1289
+ // by connectedCallback as this attributeChangedCallback will not fire.
1290
+ //
1291
+ // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
1292
+ //
1293
+ // TODO(STENCIL-16) we should think about whether or not we actually want to be reflecting the attributes to
1294
+ // properties here given that this goes against best practices outlined here
1295
+ // https://developers.google.com/web/fundamentals/web-components/best-practices#avoid-reentrancy
1296
+ if (this.hasOwnProperty(propName)) {
1297
+ newValue = this[propName];
1298
+ delete this[propName];
1299
+ }
1300
+ else if (prototype.hasOwnProperty(propName) &&
1301
+ typeof this[propName] === 'number' &&
1302
+ this[propName] == newValue) {
1303
+ // if the propName exists on the prototype of `Cstr`, this update may be a result of Stencil using native
1304
+ // APIs to reflect props as attributes. Calls to `setAttribute(someElement, propName)` will result in
1305
+ // `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.
1306
+ return;
1307
+ }
1308
+ else if (propName == null) {
1309
+ // At this point we should know this is not a "member", so we can treat it like watching an attribute
1310
+ // on a vanilla web component
1311
+ const hostRef = getHostRef(this);
1312
+ const flags = hostRef === null || hostRef === void 0 ? void 0 : hostRef.$flags$;
1313
+ // We only want to trigger the callback(s) if:
1314
+ // 1. The instance is ready
1315
+ // 2. The watchers are ready
1316
+ // 3. The value has changed
1317
+ if (!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) &&
1318
+ flags & 128 /* HOST_FLAGS.isWatchReady */ &&
1319
+ newValue !== oldValue) {
1320
+ const instance = hostRef.$lazyInstance$ ;
1321
+ const entry = cmpMeta.$watchers$[attrName];
1322
+ entry === null || entry === void 0 ? void 0 : entry.forEach((callbackName) => {
1323
+ if (instance[callbackName] != null) {
1324
+ instance[callbackName].call(instance, newValue, oldValue, attrName);
1325
+ }
1326
+ });
1327
+ }
1328
+ return;
1329
+ }
1330
+ this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
1331
+ });
1332
+ };
1333
+ // Create an array of attributes to observe
1334
+ // This list in comprised of all strings used within a `@Watch()` decorator
1335
+ // on a component as well as any Stencil-specific "members" (`@Prop()`s and `@State()`s).
1336
+ // As such, there is no way to guarantee type-safety here that a user hasn't entered
1337
+ // an invalid attribute.
1338
+ Cstr.observedAttributes = Array.from(new Set([
1339
+ ...Object.keys((_a = cmpMeta.$watchers$) !== null && _a !== void 0 ? _a : {}),
1340
+ ...members
1341
+ .filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */)
1342
+ .map(([propName, m]) => {
1343
+ const attrName = m[1] || propName;
1344
+ attrNameToPropName.set(attrName, propName);
1345
+ if (m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {
1346
+ cmpMeta.$attrsToReflect$.push([propName, attrName]);
1347
+ }
1348
+ return attrName;
1349
+ }),
1350
+ ]));
1351
+ }
1352
+ }
1353
+ return Cstr;
1354
+ };
1355
+ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
1356
+ // initializeComponent
1357
+ if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
1358
+ // Let the runtime know that the component has been initialized
1359
+ hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
1360
+ {
1361
+ // lazy loaded components
1362
+ // request the component's implementation to be
1363
+ // wired up with the host element
1364
+ Cstr = loadModule(cmpMeta);
1365
+ if (Cstr.then) {
1366
+ // Await creates a micro-task avoid if possible
1367
+ const endLoad = uniqueTime();
1368
+ Cstr = await Cstr;
1369
+ endLoad();
1370
+ }
1371
+ if (!Cstr.isProxied) {
1372
+ // we've never proxied this Constructor before
1373
+ // let's add the getters/setters to its prototype before
1374
+ // the first time we create an instance of the implementation
1375
+ {
1376
+ cmpMeta.$watchers$ = Cstr.watchers;
1377
+ }
1378
+ proxyComponent(Cstr, cmpMeta, 2 /* PROXY_FLAGS.proxyState */);
1379
+ Cstr.isProxied = true;
1380
+ }
1381
+ const endNewInstance = createTime('createInstance', cmpMeta.$tagName$);
1382
+ // ok, time to construct the instance
1383
+ // but let's keep track of when we start and stop
1384
+ // so that the getters/setters don't incorrectly step on data
1385
+ {
1386
+ hostRef.$flags$ |= 8 /* HOST_FLAGS.isConstructingInstance */;
1387
+ }
1388
+ // construct the lazy-loaded component implementation
1389
+ // passing the hostRef is very important during
1390
+ // construction in order to directly wire together the
1391
+ // host element and the lazy-loaded instance
1392
+ try {
1393
+ new Cstr(hostRef);
1394
+ }
1395
+ catch (e) {
1396
+ consoleError(e);
1397
+ }
1398
+ {
1399
+ hostRef.$flags$ &= ~8 /* HOST_FLAGS.isConstructingInstance */;
1400
+ }
1401
+ {
1402
+ hostRef.$flags$ |= 128 /* HOST_FLAGS.isWatchReady */;
1403
+ }
1404
+ endNewInstance();
1405
+ fireConnectedCallback(hostRef.$lazyInstance$);
1406
+ }
1407
+ if (Cstr.style) {
1408
+ // this component has styles but we haven't registered them yet
1409
+ let style = Cstr.style;
1410
+ const scopeId = getScopeId(cmpMeta);
1411
+ if (!styles.has(scopeId)) {
1412
+ const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);
1413
+ registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */));
1414
+ endRegisterStyles();
1415
+ }
1416
+ }
1417
+ }
1418
+ // we've successfully created a lazy instance
1419
+ const ancestorComponent = hostRef.$ancestorComponent$;
1420
+ const schedule = () => scheduleUpdate(hostRef, true);
1421
+ if (ancestorComponent && ancestorComponent['s-rc']) {
1422
+ // this is the initial load and this component it has an ancestor component
1423
+ // but the ancestor component has NOT fired its will update lifecycle yet
1424
+ // so let's just cool our jets and wait for the ancestor to continue first
1425
+ // this will get fired off when the ancestor component
1426
+ // finally gets around to rendering its lazy self
1427
+ // fire off the initial update
1428
+ ancestorComponent['s-rc'].push(schedule);
1429
+ }
1430
+ else {
1431
+ schedule();
1432
+ }
1433
+ };
1434
+ const fireConnectedCallback = (instance) => {
1435
+ {
1436
+ safeCall(instance, 'connectedCallback');
1437
+ }
1438
+ };
1439
+ const connectedCallback = (elm) => {
1440
+ if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
1441
+ const hostRef = getHostRef(elm);
1442
+ const cmpMeta = hostRef.$cmpMeta$;
1443
+ const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);
1444
+ if (!(hostRef.$flags$ & 1 /* HOST_FLAGS.hasConnected */)) {
1445
+ // first time this component has connected
1446
+ hostRef.$flags$ |= 1 /* HOST_FLAGS.hasConnected */;
1447
+ {
1448
+ // find the first ancestor component (if there is one) and register
1449
+ // this component as one of the actively loading child components for its ancestor
1450
+ let ancestorComponent = elm;
1451
+ while ((ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host)) {
1452
+ // climb up the ancestors looking for the first
1453
+ // component that hasn't finished its lifecycle update yet
1454
+ if (ancestorComponent['s-p']) {
1455
+ // we found this components first ancestor component
1456
+ // keep a reference to this component's ancestor component
1457
+ attachToAncestor(hostRef, (hostRef.$ancestorComponent$ = ancestorComponent));
1458
+ break;
1459
+ }
1460
+ }
1461
+ }
1462
+ // Lazy properties
1463
+ // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
1464
+ if (cmpMeta.$members$) {
1465
+ Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
1466
+ if (memberFlags & 31 /* MEMBER_FLAGS.Prop */ && elm.hasOwnProperty(memberName)) {
1467
+ const value = elm[memberName];
1468
+ delete elm[memberName];
1469
+ elm[memberName] = value;
1470
+ }
1471
+ });
1472
+ }
1473
+ {
1474
+ initializeComponent(elm, hostRef, cmpMeta);
1475
+ }
1476
+ }
1477
+ else {
1478
+ // fire off connectedCallback() on component instance
1479
+ if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$lazyInstance$) {
1480
+ fireConnectedCallback(hostRef.$lazyInstance$);
1481
+ }
1482
+ else if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$onReadyPromise$) {
1483
+ hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$));
1484
+ }
1485
+ }
1486
+ endConnected();
1487
+ }
1488
+ };
1489
+ const disconnectInstance = (instance) => {
1490
+ {
1491
+ safeCall(instance, 'disconnectedCallback');
1492
+ }
1493
+ };
1494
+ const disconnectedCallback = async (elm) => {
1495
+ if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
1496
+ const hostRef = getHostRef(elm);
1497
+ if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$lazyInstance$) {
1498
+ disconnectInstance(hostRef.$lazyInstance$);
1499
+ }
1500
+ else if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$onReadyPromise$) {
1501
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
1502
+ }
1503
+ }
1504
+ };
1505
+ const bootstrapLazy = (lazyBundles, options = {}) => {
1506
+ var _a;
1507
+ const endBootstrap = createTime();
1508
+ const cmpTags = [];
1509
+ const exclude = options.exclude || [];
1510
+ const customElements = win.customElements;
1511
+ const head = doc.head;
1512
+ const metaCharset = /*@__PURE__*/ head.querySelector('meta[charset]');
1513
+ const visibilityStyle = /*@__PURE__*/ doc.createElement('style');
1514
+ const deferredConnectedCallbacks = [];
1515
+ let appLoadFallback;
1516
+ let isBootstrapping = true;
1517
+ Object.assign(plt, options);
1518
+ plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
1519
+ lazyBundles.map((lazyBundle) => {
1520
+ lazyBundle[1].map((compactMeta) => {
1521
+ var _a;
1522
+ const cmpMeta = {
1523
+ $flags$: compactMeta[0],
1524
+ $tagName$: compactMeta[1],
1525
+ $members$: compactMeta[2],
1526
+ $listeners$: compactMeta[3],
1527
+ };
1528
+ {
1529
+ cmpMeta.$members$ = compactMeta[2];
1530
+ }
1531
+ {
1532
+ cmpMeta.$attrsToReflect$ = [];
1533
+ }
1534
+ {
1535
+ cmpMeta.$watchers$ = (_a = compactMeta[4]) !== null && _a !== void 0 ? _a : {};
1536
+ }
1537
+ const tagName = cmpMeta.$tagName$;
1538
+ const HostElement = class extends HTMLElement {
1539
+ // StencilLazyHost
1540
+ constructor(self) {
1541
+ // @ts-ignore
1542
+ super(self);
1543
+ self = this;
1544
+ registerHost(self, cmpMeta);
1545
+ if (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {
1546
+ // this component is using shadow dom
1547
+ // and this browser supports shadow dom
1548
+ // add the read-only property "shadowRoot" to the host element
1549
+ // adding the shadow root build conditionals to minimize runtime
1550
+ {
1551
+ {
1552
+ self.attachShadow({ mode: 'open' });
1553
+ }
1554
+ }
1555
+ }
1556
+ }
1557
+ connectedCallback() {
1558
+ if (appLoadFallback) {
1559
+ clearTimeout(appLoadFallback);
1560
+ appLoadFallback = null;
1561
+ }
1562
+ if (isBootstrapping) {
1563
+ // connectedCallback will be processed once all components have been registered
1564
+ deferredConnectedCallbacks.push(this);
1565
+ }
1566
+ else {
1567
+ plt.jmp(() => connectedCallback(this));
1568
+ }
1569
+ }
1570
+ disconnectedCallback() {
1571
+ plt.jmp(() => disconnectedCallback(this));
1572
+ }
1573
+ componentOnReady() {
1574
+ return getHostRef(this).$onReadyPromise$;
1575
+ }
1576
+ };
1577
+ cmpMeta.$lazyBundleId$ = lazyBundle[0];
1578
+ if (!exclude.includes(tagName) && !customElements.get(tagName)) {
1579
+ cmpTags.push(tagName);
1580
+ customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* PROXY_FLAGS.isElementConstructor */));
1581
+ }
1582
+ });
1583
+ });
1584
+ {
1585
+ visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
1586
+ visibilityStyle.setAttribute('data-styles', '');
1587
+ // Apply CSP nonce to the style tag if it exists
1588
+ const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
1589
+ if (nonce != null) {
1590
+ visibilityStyle.setAttribute('nonce', nonce);
1591
+ }
1592
+ head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
1593
+ }
1594
+ // Process deferred connectedCallbacks now all components have been registered
1595
+ isBootstrapping = false;
1596
+ if (deferredConnectedCallbacks.length) {
1597
+ deferredConnectedCallbacks.map((host) => host.connectedCallback());
1598
+ }
1599
+ else {
1600
+ {
1601
+ plt.jmp(() => (appLoadFallback = setTimeout(appDidLoad, 30)));
1602
+ }
1603
+ }
1604
+ // Fallback appLoad event
1605
+ endBootstrap();
1606
+ };
1607
+ /**
1608
+ * Assigns the given value to the nonce property on the runtime platform object.
1609
+ * During runtime, this value is used to set the nonce attribute on all dynamically created script and style tags.
1610
+ * @param nonce The value to be assigned to the platform nonce property.
1611
+ * @returns void
1612
+ */
1613
+ const setNonce = (nonce) => (plt.$nonce$ = nonce);
1614
+ /**
1615
+ * A WeakMap mapping runtime component references to their corresponding host reference
1616
+ * instances.
1617
+ */
1618
+ const hostRefs = /*@__PURE__*/ new WeakMap();
1619
+ /**
1620
+ * Given a {@link d.RuntimeRef} retrieve the corresponding {@link d.HostRef}
1621
+ *
1622
+ * @param ref the runtime ref of interest
1623
+ * @returns the Host reference (if found) or undefined
1624
+ */
1625
+ const getHostRef = (ref) => hostRefs.get(ref);
1626
+ /**
1627
+ * Register a lazy instance with the {@link hostRefs} object so it's
1628
+ * corresponding {@link d.HostRef} can be retrieved later.
1629
+ *
1630
+ * @param lazyInstance the lazy instance of interest
1631
+ * @param hostRef that instances `HostRef` object
1632
+ * @returns a reference to the host ref WeakMap
1633
+ */
1634
+ const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
1635
+ /**
1636
+ * Register a host element for a Stencil component, setting up various metadata
1637
+ * and callbacks based on {@link BUILD} flags as well as the component's runtime
1638
+ * metadata.
1639
+ *
1640
+ * @param hostElement the host element to register
1641
+ * @param cmpMeta runtime metadata for that component
1642
+ * @returns a reference to the host ref WeakMap
1643
+ */
1644
+ const registerHost = (hostElement, cmpMeta) => {
1645
+ const hostRef = {
1646
+ $flags$: 0,
1647
+ $hostElement$: hostElement,
1648
+ $cmpMeta$: cmpMeta,
1649
+ $instanceValues$: new Map(),
1650
+ };
1651
+ {
1652
+ hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
1653
+ hostElement['s-p'] = [];
1654
+ hostElement['s-rc'] = [];
1655
+ }
1656
+ return hostRefs.set(hostElement, hostRef);
1657
+ };
1658
+ const isMemberInElement = (elm, memberName) => memberName in elm;
1659
+ const consoleError = (e, el) => (0, console.error)(e, el);
1660
+ const cmpModules = /*@__PURE__*/ new Map();
1661
+ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
1662
+ // loadModuleImport
1663
+ const exportName = cmpMeta.$tagName$.replace(/-/g, '_');
1664
+ const bundleId = cmpMeta.$lazyBundleId$;
1665
+ const module = cmpModules.get(bundleId) ;
1666
+ if (module) {
1667
+ return module[exportName];
1668
+ }
1669
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/
1670
+ return import(
1671
+ /* @vite-ignore */
1672
+ /* webpackInclude: /\.entry\.js$/ */
1673
+ /* webpackExclude: /\.system\.entry\.js$/ */
1674
+ /* webpackMode: "lazy" */
1675
+ `./${bundleId}.entry.js${''}`).then((importedModule) => {
1676
+ {
1677
+ cmpModules.set(bundleId, importedModule);
1678
+ }
1679
+ return importedModule[exportName];
1680
+ }, consoleError);
1681
+ };
1682
+ const styles = /*@__PURE__*/ new Map();
1683
+ const win = typeof window !== 'undefined' ? window : {};
1684
+ const doc = win.document || { head: {} };
1685
+ const plt = {
1686
+ $flags$: 0,
1687
+ $resourcesUrl$: '',
1688
+ jmp: (h) => h(),
1689
+ raf: (h) => requestAnimationFrame(h),
1690
+ ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
1691
+ rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
1692
+ ce: (eventName, opts) => new CustomEvent(eventName, opts),
1693
+ };
1694
+ const promiseResolve = (v) => Promise.resolve(v);
1695
+ const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
1696
+ try {
1697
+ new CSSStyleSheet();
1698
+ return typeof new CSSStyleSheet().replaceSync === 'function';
1699
+ }
1700
+ catch (e) { }
1701
+ return false;
1702
+ })()
1703
+ ;
1704
+ const queueDomReads = [];
1705
+ const queueDomWrites = [];
1706
+ const queueTask = (queue, write) => (cb) => {
1707
+ queue.push(cb);
1708
+ if (!queuePending) {
1709
+ queuePending = true;
1710
+ if (write && plt.$flags$ & 4 /* PLATFORM_FLAGS.queueSync */) {
1711
+ nextTick(flush);
1712
+ }
1713
+ else {
1714
+ plt.raf(flush);
1715
+ }
1716
+ }
1717
+ };
1718
+ const consume = (queue) => {
1719
+ for (let i = 0; i < queue.length; i++) {
1720
+ try {
1721
+ queue[i](performance.now());
1722
+ }
1723
+ catch (e) {
1724
+ consoleError(e);
1725
+ }
1726
+ }
1727
+ queue.length = 0;
1728
+ };
1729
+ const flush = () => {
1730
+ // always force a bunch of medium callbacks to run, but still have
1731
+ // a throttle on how many can run in a certain time
1732
+ // DOM READS!!!
1733
+ consume(queueDomReads);
1734
+ // DOM WRITES!!!
1735
+ {
1736
+ consume(queueDomWrites);
1737
+ if ((queuePending = queueDomReads.length > 0)) {
1738
+ // still more to do yet, but we've run out of time
1739
+ // let's let this thing cool off and try again in the next tick
1740
+ plt.raf(flush);
1741
+ }
1742
+ }
1743
+ };
1744
+ const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
1745
+ const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
1746
+
1747
+ export { Host as H, getElement as a, bootstrapLazy as b, getAssetPath as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
1748
+
1749
+ //# sourceMappingURL=index-8effeb27.js.map