@flarehr/apollo-benefits 1.2.97 → 1.3.54109

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 (376) hide show
  1. package/README.md +19 -0
  2. package/dist/assets/@splitsoftware-7d799540.js +18 -0
  3. package/dist/assets/all_tab_color-548783b9.svg +21 -0
  4. package/dist/assets/all_tab_gray-a5051313.svg +6 -0
  5. package/dist/assets/check-57fe1dcb.svg +15 -0
  6. package/dist/assets/datadog-9aa4bf28.js +5 -0
  7. package/dist/assets/date-fns-c5d8fbc0.js +1 -0
  8. package/dist/assets/default_backdrop-fdd955b8.png +0 -0
  9. package/dist/assets/external_link-599a0aec.svg +3 -0
  10. package/dist/assets/external_link_white-55111b2e.svg +3 -0
  11. package/dist/assets/framer-motion-bb8d6b82.js +1 -0
  12. package/dist/assets/index-18cd5088.js +35 -0
  13. package/dist/assets/index-cfa25e28.css +1 -0
  14. package/dist/assets/index-e4f1c441.js +5 -0
  15. package/dist/assets/lodash-5d893f8c.js +1 -0
  16. package/dist/assets/logo-a34e9b4b.png +0 -0
  17. package/dist/assets/oidc-client-6f6e47c2.js +101 -0
  18. package/dist/assets/padlock-8c081120.svg +26 -0
  19. package/dist/assets/suitcase-6471ad05.svg +17 -0
  20. package/dist/assets/vendor-2d0139ca.js +788 -0
  21. package/dist/assets/warning-a7f1af23.svg +14 -0
  22. package/dist/assets/welcome_image_mobile-dbde6c80.png +0 -0
  23. package/dist/assets/welcome_image_v2-869c59e4.png +0 -0
  24. package/dist/assets/wellbeing_banner-6903d615.png +0 -0
  25. package/dist/assets/workplace_link_banner_mobile-6ebaa24b.png +0 -0
  26. package/dist/assets/workplace_link_banner_v2-c81ed849.png +0 -0
  27. package/dist/config.json +14 -0
  28. package/dist/favicon.ico +0 -0
  29. package/dist/icons/android-chrome-192x192.png +0 -0
  30. package/dist/icons/android-chrome-512x512.png +0 -0
  31. package/dist/icons/apple-touch-icon.png +0 -0
  32. package/dist/icons/favicon-16x16.png +0 -0
  33. package/dist/icons/favicon-32x32.png +0 -0
  34. package/dist/index.html +114 -0
  35. package/dist/manifest.json +21 -0
  36. package/dist/sw-esm.js +16 -0
  37. package/package.json +127 -69
  38. package/LICENSE +0 -21
  39. package/dist/lib/apollo-benefits/apollo-benefits.esm.js +0 -1
  40. package/dist/lib/apollo-benefits/assets/Hero_Background.png +0 -0
  41. package/dist/lib/apollo-benefits/assets/car-placeholder.svg +0 -5
  42. package/dist/lib/apollo-benefits/assets/check.svg +0 -13
  43. package/dist/lib/apollo-benefits/common-assets/icon-info.svg +0 -4
  44. package/dist/lib/apollo-benefits/index.esm.js +0 -0
  45. package/dist/lib/apollo-benefits/p-054d1471.js +0 -1
  46. package/dist/lib/apollo-benefits/p-066d8e7b.js +0 -15
  47. package/dist/lib/apollo-benefits/p-08376428.entry.js +0 -1
  48. package/dist/lib/apollo-benefits/p-1d7ab1b9.entry.js +0 -1
  49. package/dist/lib/apollo-benefits/p-25a89275.entry.js +0 -1
  50. package/dist/lib/apollo-benefits/p-26d363c9.entry.js +0 -1
  51. package/dist/lib/apollo-benefits/p-337ce3df.js +0 -1
  52. package/dist/lib/apollo-benefits/p-3dc9a379.js +0 -1
  53. package/dist/lib/apollo-benefits/p-4376366b.js +0 -46
  54. package/dist/lib/apollo-benefits/p-4e2d34f4.entry.js +0 -1
  55. package/dist/lib/apollo-benefits/p-50bbf713.js +0 -1
  56. package/dist/lib/apollo-benefits/p-53c5e861.entry.js +0 -1
  57. package/dist/lib/apollo-benefits/p-556fdb43.js +0 -1
  58. package/dist/lib/apollo-benefits/p-57d4702d.entry.js +0 -1
  59. package/dist/lib/apollo-benefits/p-58ee670f.js +0 -1
  60. package/dist/lib/apollo-benefits/p-6a54654f.entry.js +0 -11
  61. package/dist/lib/apollo-benefits/p-6bd33850.js +0 -1
  62. package/dist/lib/apollo-benefits/p-79c3b633.entry.js +0 -1
  63. package/dist/lib/apollo-benefits/p-7f3a2f3b.entry.js +0 -1
  64. package/dist/lib/apollo-benefits/p-82d42c2b.js +0 -1
  65. package/dist/lib/apollo-benefits/p-9b3e978e.js +0 -1
  66. package/dist/lib/apollo-benefits/p-a1dd0cba.entry.js +0 -1
  67. package/dist/lib/apollo-benefits/p-aa379cfe.entry.js +0 -1
  68. package/dist/lib/apollo-benefits/p-aaf0e527.entry.js +0 -1
  69. package/dist/lib/apollo-benefits/p-b0b9425b.js +0 -1
  70. package/dist/lib/apollo-benefits/p-d0ef83f8.entry.js +0 -1
  71. package/dist/lib/apollo-benefits/p-db4a65f0.entry.js +0 -1
  72. package/dist/lib/apollo-benefits/p-dc67f942.entry.js +0 -1
  73. package/dist/lib/apollo-benefits/p-e1fd79bb.entry.js +0 -1
  74. package/dist/lib/apollo-benefits/p-ea120e31.js +0 -1
  75. package/dist/lib/apollo-benefits/p-ef5f33ca.js +0 -1
  76. package/dist/lib/apollo-benefits/p-f5254031.js +0 -1
  77. package/dist/lib/apollo-benefits/p-f63d9d89.js +0 -1
  78. package/dist/lib/apollo-benefits/p-fcfa5255.entry.js +0 -1
  79. package/dist/lib/cjs/Option-98dab0b8.js +0 -1988
  80. package/dist/lib/cjs/active-router-90429847.js +0 -75
  81. package/dist/lib/cjs/ap-ben-asset_5.cjs.entry.js +0 -1856
  82. package/dist/lib/cjs/ap-ben-benefit-card.cjs.entry.js +0 -45
  83. package/dist/lib/cjs/ap-ben-benefit-list-item.cjs.entry.js +0 -56
  84. package/dist/lib/cjs/ap-ben-benefit-url_27.cjs.entry.js +0 -48767
  85. package/dist/lib/cjs/ap-ben-benefits-list_3.cjs.entry.js +0 -55
  86. package/dist/lib/cjs/ap-ben-benefits-page.cjs.entry.js +0 -55
  87. package/dist/lib/cjs/ap-ben-choose-vehicle-section_4.cjs.entry.js +0 -2779
  88. package/dist/lib/cjs/ap-ben-notifications-section.cjs.entry.js +0 -243
  89. package/dist/lib/cjs/ap-ben-oidc-callback-page.cjs.entry.js +0 -40
  90. package/dist/lib/cjs/apollo-benefits.cjs.js +0 -25
  91. package/dist/lib/cjs/app-globals-e04ab04b.js +0 -12
  92. package/dist/lib/cjs/authentication.service-11c30071.js +0 -237
  93. package/dist/lib/cjs/benefits.api-b46ee2ea.js +0 -35
  94. package/dist/lib/cjs/cars-calculator-app.cjs.entry.js +0 -60
  95. package/dist/lib/cjs/cars-calculator.service-a8beab79.js +0 -166
  96. package/dist/lib/cjs/context-consumer.cjs.entry.js +0 -29
  97. package/dist/lib/cjs/datorama-akita-792b4d1d.js +0 -2553
  98. package/dist/lib/cjs/delay-e91dba76.js +0 -206
  99. package/dist/lib/cjs/event-tracking.service-6f723d9c.js +0 -155
  100. package/dist/lib/cjs/event-tracking.service-d6f9a51c.js +0 -259
  101. package/dist/lib/cjs/filter-c38164e6.js +0 -378
  102. package/dist/lib/cjs/fl-dropdown-async.cjs.entry.js +0 -422
  103. package/dist/lib/cjs/fl-dropdown.cjs.entry.js +0 -232
  104. package/dist/lib/cjs/fl-style-guide.cjs.entry.js +0 -91
  105. package/dist/lib/cjs/index-4f00f593.js +0 -994
  106. package/dist/lib/cjs/index-6e643fec.js +0 -1734
  107. package/dist/lib/cjs/index-889ce6c6.js +0 -27
  108. package/dist/lib/cjs/index.cjs.js +0 -2
  109. package/dist/lib/cjs/loader.cjs.js +0 -27
  110. package/dist/lib/cjs/scheduleArray-0ba3d6f8.js +0 -753
  111. package/dist/lib/cjs/stencil-async-content.cjs.entry.js +0 -32
  112. package/dist/lib/cjs/stencil-route-title.cjs.entry.js +0 -32
  113. package/dist/lib/cjs/stencil-router-prompt.cjs.entry.js +0 -59
  114. package/dist/lib/cjs/stencil-router-redirect.cjs.entry.js +0 -32
  115. package/dist/lib/cjs/view.service-ec43dea6.js +0 -21
  116. package/dist/lib/collection/assets/image/complete.svg +0 -122
  117. package/dist/lib/collection/collection-manifest.json +0 -81
  118. package/dist/lib/collection/components/benefits-app/apis/api-client.js +0 -16
  119. package/dist/lib/collection/components/benefits-app/apis/benefits-api/benefits-api.dto.js +0 -16
  120. package/dist/lib/collection/components/benefits-app/apis/benefits-api/benefits.api.js +0 -30
  121. package/dist/lib/collection/components/benefits-app/apis/event-tracking-api/event-tracking-api.dto.js +0 -1
  122. package/dist/lib/collection/components/benefits-app/apis/event-tracking-api/event-tracking-api.js +0 -7
  123. package/dist/lib/collection/components/benefits-app/apis/user-api/user-api.dto.js +0 -8
  124. package/dist/lib/collection/components/benefits-app/apis/user-api/user.api.js +0 -16
  125. package/dist/lib/collection/components/benefits-app/benefits-app.css +0 -399
  126. package/dist/lib/collection/components/benefits-app/benefits-app.js +0 -216
  127. package/dist/lib/collection/components/benefits-app/pages/benefits-page/benefits-list/benefit-list-item.css +0 -23
  128. package/dist/lib/collection/components/benefits-app/pages/benefits-page/benefits-list/benefits-list-item.js +0 -80
  129. package/dist/lib/collection/components/benefits-app/pages/benefits-page/benefits-list/benefits-list.js +0 -32
  130. package/dist/lib/collection/components/benefits-app/pages/benefits-page/benefits-page.js +0 -47
  131. package/dist/lib/collection/components/benefits-app/pages/benefits-page/hero-banner/assets/Hero_Background.png +0 -0
  132. package/dist/lib/collection/components/benefits-app/pages/benefits-page/hero-banner/hero-banner.css +0 -8
  133. package/dist/lib/collection/components/benefits-app/pages/benefits-page/hero-banner/hero-banner.js +0 -53
  134. package/dist/lib/collection/components/benefits-app/pages/benefits-page/promoted-benefits/benefit-card.css +0 -3
  135. package/dist/lib/collection/components/benefits-app/pages/benefits-page/promoted-benefits/benefit-card.js +0 -62
  136. package/dist/lib/collection/components/benefits-app/pages/benefits-page/promoted-benefits/promoted-benefits.js +0 -33
  137. package/dist/lib/collection/components/benefits-app/pages/manage-benefits-page/api/manage-benefits-api.dto.js +0 -36
  138. package/dist/lib/collection/components/benefits-app/pages/manage-benefits-page/api/manage-benefits.api.js +0 -23
  139. package/dist/lib/collection/components/benefits-app/pages/manage-benefits-page/edit-benefit-page/confirm-dialog.js +0 -158
  140. package/dist/lib/collection/components/benefits-app/pages/manage-benefits-page/edit-benefit-page/edit-benefit-form/benefit-url.css +0 -8
  141. package/dist/lib/collection/components/benefits-app/pages/manage-benefits-page/edit-benefit-page/edit-benefit-form/benefit-url.js +0 -126
  142. package/dist/lib/collection/components/benefits-app/pages/manage-benefits-page/edit-benefit-page/edit-benefit-form/edit-benefit-form.js +0 -138
  143. package/dist/lib/collection/components/benefits-app/pages/manage-benefits-page/edit-benefit-page/edit-benefit-form/upload-benefit-icon.css +0 -24
  144. package/dist/lib/collection/components/benefits-app/pages/manage-benefits-page/edit-benefit-page/edit-benefit-form/upload-benefit-icon.js +0 -102
  145. package/dist/lib/collection/components/benefits-app/pages/manage-benefits-page/edit-benefit-page/edit-benefit-form/upload-file.css +0 -18
  146. package/dist/lib/collection/components/benefits-app/pages/manage-benefits-page/edit-benefit-page/edit-benefit-form/upload-file.js +0 -120
  147. package/dist/lib/collection/components/benefits-app/pages/manage-benefits-page/edit-benefit-page/edit-benefit-page.js +0 -154
  148. package/dist/lib/collection/components/benefits-app/pages/manage-benefits-page/edit-benefit-page/edit-benefit.query.js +0 -18
  149. package/dist/lib/collection/components/benefits-app/pages/manage-benefits-page/edit-benefit-page/edit-benefit.service.js +0 -155
  150. package/dist/lib/collection/components/benefits-app/pages/manage-benefits-page/empty-benefits.js +0 -36
  151. package/dist/lib/collection/components/benefits-app/pages/manage-benefits-page/manage-benefits-header-row.js +0 -13
  152. package/dist/lib/collection/components/benefits-app/pages/manage-benefits-page/manage-benefits-page.css +0 -3
  153. package/dist/lib/collection/components/benefits-app/pages/manage-benefits-page/manage-benefits-page.js +0 -88
  154. package/dist/lib/collection/components/benefits-app/pages/manage-benefits-page/manage-benefits-page.routes.js +0 -24
  155. package/dist/lib/collection/components/benefits-app/pages/manage-benefits-page/manage-benefits.service.js +0 -37
  156. package/dist/lib/collection/components/benefits-app/pages/manage-benefits-page/managed-benefit-item/managed-benefit-item.css +0 -10
  157. package/dist/lib/collection/components/benefits-app/pages/manage-benefits-page/managed-benefit-item/managed-benefit-item.js +0 -89
  158. package/dist/lib/collection/components/benefits-app/pages/manage-benefits-page/store/manage-benefits.query.js +0 -11
  159. package/dist/lib/collection/components/benefits-app/pages/manage-benefits-page/store/manage-benefits.store.js +0 -51
  160. package/dist/lib/collection/components/benefits-app/pages/role-management-page/api/role-management.api.js +0 -21
  161. package/dist/lib/collection/components/benefits-app/pages/role-management-page/role-editors-section/role-editors-section.js +0 -104
  162. package/dist/lib/collection/components/benefits-app/pages/role-management-page/role-management-page.js +0 -50
  163. package/dist/lib/collection/components/benefits-app/pages/role-management-page/role-management.service.js +0 -44
  164. package/dist/lib/collection/components/benefits-app/pages/role-management-page/role-owner-section/role-owner-section.js +0 -40
  165. package/dist/lib/collection/components/benefits-app/pages/role-management-page/store/role-management.query.js +0 -13
  166. package/dist/lib/collection/components/benefits-app/pages/role-management-page/store/role-management.store.js +0 -42
  167. package/dist/lib/collection/components/benefits-app/services/benefits-app.service.js +0 -36
  168. package/dist/lib/collection/components/benefits-app/services/benefits.service.js +0 -11
  169. package/dist/lib/collection/components/benefits-app/services/event-tracking.service.js +0 -40
  170. package/dist/lib/collection/components/benefits-app/services/navigation.service.js +0 -34
  171. package/dist/lib/collection/components/benefits-app/store/benefits-app.query.js +0 -13
  172. package/dist/lib/collection/components/benefits-app/store/benefits-app.store.js +0 -24
  173. package/dist/lib/collection/components/benefits-app-host/benefits-app-host.js +0 -48
  174. package/dist/lib/collection/components/benefits-app-host/loading-page.js +0 -9
  175. package/dist/lib/collection/components/benefits-app-host/oidc-callback-page/oidc-callback-page.js +0 -65
  176. package/dist/lib/collection/components/benefits-app-host/oidc-callback-page/oidc-callback-page.routes.js +0 -11
  177. package/dist/lib/collection/components/benefits-app-host/services/app-configuration.query.js +0 -18
  178. package/dist/lib/collection/components/benefits-app-host/services/app-configuration.service.js +0 -23
  179. package/dist/lib/collection/components/benefits-app-host/services/authentication.query.js +0 -21
  180. package/dist/lib/collection/components/benefits-app-host/services/authentication.service.js +0 -96
  181. package/dist/lib/collection/components/benefits-app-host/services/session.store.js +0 -33
  182. package/dist/lib/collection/components/cars-calculator-app/api/api-client.js +0 -5
  183. package/dist/lib/collection/components/cars-calculator-app/api/cars-calculator-events.model.js +0 -1
  184. package/dist/lib/collection/components/cars-calculator-app/api/cars-calculator.api.js +0 -45
  185. package/dist/lib/collection/components/cars-calculator-app/api/event-tracking.api.js +0 -7
  186. package/dist/lib/collection/components/cars-calculator-app/cars-calculator-app.css +0 -22
  187. package/dist/lib/collection/components/cars-calculator-app/cars-calculator-app.js +0 -97
  188. package/dist/lib/collection/components/cars-calculator-app/notifications-section/notifications-section.js +0 -25
  189. package/dist/lib/collection/components/cars-calculator-app/pages/asset.component.js +0 -27
  190. package/dist/lib/collection/components/cars-calculator-app/pages/assets/car-placeholder.svg +0 -5
  191. package/dist/lib/collection/components/cars-calculator-app/pages/assets/check.svg +0 -13
  192. package/dist/lib/collection/components/cars-calculator-app/pages/choose-vehicle-section.component.js +0 -234
  193. package/dist/lib/collection/components/cars-calculator-app/pages/common-assets/icon-info.svg +0 -4
  194. package/dist/lib/collection/components/cars-calculator-app/pages/complete-section.component.js +0 -38
  195. package/dist/lib/collection/components/cars-calculator-app/pages/cost-breakdown-section.component.js +0 -45
  196. package/dist/lib/collection/components/cars-calculator-app/pages/model-variants-section.component.css +0 -34
  197. package/dist/lib/collection/components/cars-calculator-app/pages/model-variants-section.component.js +0 -93
  198. package/dist/lib/collection/components/cars-calculator-app/pages/personal-info-section.component.js +0 -71
  199. package/dist/lib/collection/components/cars-calculator-app/pages/quote-result-section.component.js +0 -117
  200. package/dist/lib/collection/components/cars-calculator-app/pages/submit-quote-section.component.js +0 -87
  201. package/dist/lib/collection/components/cars-calculator-app/services/app-configuration.service.js +0 -13
  202. package/dist/lib/collection/components/cars-calculator-app/services/cars-calculator.service.js +0 -117
  203. package/dist/lib/collection/components/cars-calculator-app/services/event-tracking.service.js +0 -37
  204. package/dist/lib/collection/components/cars-calculator-app/services/notifications.service.js +0 -37
  205. package/dist/lib/collection/components/cars-calculator-app/services/notifications.store.js +0 -3
  206. package/dist/lib/collection/components/cars-calculator-app/services/session.query.js +0 -38
  207. package/dist/lib/collection/components/cars-calculator-app/services/session.store.js +0 -80
  208. package/dist/lib/collection/components/cars-calculator-app/services/view.service.js +0 -16
  209. package/dist/lib/collection/components/shared/file-icon/file-icon.css +0 -15
  210. package/dist/lib/collection/components/shared/file-icon/file-icon.js +0 -84
  211. package/dist/lib/collection/components/shared/icon.js +0 -77
  212. package/dist/lib/collection/components/shared/icons-library.js +0 -11
  213. package/dist/lib/collection/components/shared/modal-section.js +0 -138
  214. package/dist/lib/collection/components/shared/tooltip.css +0 -3
  215. package/dist/lib/collection/components/shared/tooltip.js +0 -115
  216. package/dist/lib/collection/components/shared/ui-container/ui-container.css +0 -39
  217. package/dist/lib/collection/components/shared/ui-container/ui-container.js +0 -27
  218. package/dist/lib/collection/global/config.js +0 -2
  219. package/dist/lib/collection/global/main.dev.js +0 -31
  220. package/dist/lib/collection/global/main.js +0 -5
  221. package/dist/lib/collection/index.js +0 -2
  222. package/dist/lib/collection/utils/config.js +0 -2
  223. package/dist/lib/collection/utils/index.js +0 -28
  224. package/dist/lib/collection/utils/lazy.js +0 -29
  225. package/dist/lib/collection/utils/promise.js +0 -7
  226. package/dist/lib/esm/Option-53ef163a.js +0 -1982
  227. package/dist/lib/esm/active-router-134fe07f.js +0 -73
  228. package/dist/lib/esm/ap-ben-asset_5.entry.js +0 -1848
  229. package/dist/lib/esm/ap-ben-benefit-card.entry.js +0 -41
  230. package/dist/lib/esm/ap-ben-benefit-list-item.entry.js +0 -52
  231. package/dist/lib/esm/ap-ben-benefit-url_27.entry.js +0 -48737
  232. package/dist/lib/esm/ap-ben-benefits-list_3.entry.js +0 -49
  233. package/dist/lib/esm/ap-ben-benefits-page.entry.js +0 -51
  234. package/dist/lib/esm/ap-ben-choose-vehicle-section_4.entry.js +0 -2772
  235. package/dist/lib/esm/ap-ben-notifications-section.entry.js +0 -239
  236. package/dist/lib/esm/ap-ben-oidc-callback-page.entry.js +0 -36
  237. package/dist/lib/esm/apollo-benefits.js +0 -23
  238. package/dist/lib/esm/app-globals-ff43b669.js +0 -10
  239. package/dist/lib/esm/authentication.service-4dbff8a5.js +0 -232
  240. package/dist/lib/esm/benefits.api-5a0c5fa7.js +0 -33
  241. package/dist/lib/esm/cars-calculator-app.entry.js +0 -56
  242. package/dist/lib/esm/cars-calculator.service-1278f563.js +0 -163
  243. package/dist/lib/esm/context-consumer.entry.js +0 -25
  244. package/dist/lib/esm/datorama-akita-e42d9911.js +0 -2547
  245. package/dist/lib/esm/delay-d08c267f.js +0 -200
  246. package/dist/lib/esm/event-tracking.service-27d79066.js +0 -253
  247. package/dist/lib/esm/event-tracking.service-429d997c.js +0 -146
  248. package/dist/lib/esm/filter-aeb65cac.js +0 -370
  249. package/dist/lib/esm/fl-dropdown-async.entry.js +0 -418
  250. package/dist/lib/esm/fl-dropdown.entry.js +0 -228
  251. package/dist/lib/esm/fl-style-guide.entry.js +0 -87
  252. package/dist/lib/esm/index-1351f893.js +0 -979
  253. package/dist/lib/esm/index-8676bf1e.js +0 -22
  254. package/dist/lib/esm/index-d4b319a7.js +0 -1702
  255. package/dist/lib/esm/index.js +0 -1
  256. package/dist/lib/esm/loader.js +0 -23
  257. package/dist/lib/esm/polyfills/core-js.js +0 -11
  258. package/dist/lib/esm/polyfills/css-shim.js +0 -1
  259. package/dist/lib/esm/polyfills/dom.js +0 -79
  260. package/dist/lib/esm/polyfills/es5-html-element.js +0 -1
  261. package/dist/lib/esm/polyfills/index.js +0 -34
  262. package/dist/lib/esm/polyfills/system.js +0 -6
  263. package/dist/lib/esm/scheduleArray-b9669898.js +0 -738
  264. package/dist/lib/esm/stencil-async-content.entry.js +0 -28
  265. package/dist/lib/esm/stencil-route-title.entry.js +0 -28
  266. package/dist/lib/esm/stencil-router-prompt.entry.js +0 -55
  267. package/dist/lib/esm/stencil-router-redirect.entry.js +0 -28
  268. package/dist/lib/esm/view.service-6adbec31.js +0 -19
  269. package/dist/lib/index.cjs.js +0 -1
  270. package/dist/lib/index.js +0 -1
  271. package/dist/lib/loader/cdn.js +0 -3
  272. package/dist/lib/loader/index.cjs.js +0 -3
  273. package/dist/lib/loader/index.d.ts +0 -13
  274. package/dist/lib/loader/index.es2017.js +0 -3
  275. package/dist/lib/loader/index.js +0 -4
  276. package/dist/lib/loader/package.json +0 -10
  277. package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/button/button.css +0 -118
  278. package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/dropdown/dropdown.css +0 -9
  279. package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/dropdown-async/dropdown-async.css +0 -9
  280. package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/loading-indicator/loading-indicator.css +0 -141
  281. package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/promise-button/promise-button.css +0 -5
  282. package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/style-guide/style-guide.css +0 -0
  283. package/dist/lib/node_modules/@stencil/router/dist/collection/components/route/route.css +0 -3
  284. package/dist/lib/types/components/benefits-app/apis/api-client.d.ts +0 -7
  285. package/dist/lib/types/components/benefits-app/apis/benefits-api/benefits-api.dto.d.ts +0 -44
  286. package/dist/lib/types/components/benefits-app/apis/benefits-api/benefits.api.d.ts +0 -9
  287. package/dist/lib/types/components/benefits-app/apis/event-tracking-api/event-tracking-api.d.ts +0 -6
  288. package/dist/lib/types/components/benefits-app/apis/event-tracking-api/event-tracking-api.dto.d.ts +0 -18
  289. package/dist/lib/types/components/benefits-app/apis/user-api/user-api.dto.d.ts +0 -30
  290. package/dist/lib/types/components/benefits-app/apis/user-api/user.api.d.ts +0 -8
  291. package/dist/lib/types/components/benefits-app/benefits-app.d.ts +0 -22
  292. package/dist/lib/types/components/benefits-app/pages/benefits-page/benefits-list/benefits-list-item.d.ts +0 -10
  293. package/dist/lib/types/components/benefits-app/pages/benefits-page/benefits-list/benefits-list.d.ts +0 -5
  294. package/dist/lib/types/components/benefits-app/pages/benefits-page/benefits-page.d.ts +0 -10
  295. package/dist/lib/types/components/benefits-app/pages/benefits-page/hero-banner/hero-banner.d.ts +0 -5
  296. package/dist/lib/types/components/benefits-app/pages/benefits-page/promoted-benefits/benefit-card.d.ts +0 -8
  297. package/dist/lib/types/components/benefits-app/pages/benefits-page/promoted-benefits/promoted-benefits.d.ts +0 -5
  298. package/dist/lib/types/components/benefits-app/pages/manage-benefits-page/api/manage-benefits-api.dto.d.ts +0 -39
  299. package/dist/lib/types/components/benefits-app/pages/manage-benefits-page/api/manage-benefits.api.d.ts +0 -9
  300. package/dist/lib/types/components/benefits-app/pages/manage-benefits-page/edit-benefit-page/confirm-dialog.d.ts +0 -16
  301. package/dist/lib/types/components/benefits-app/pages/manage-benefits-page/edit-benefit-page/edit-benefit-form/benefit-url.d.ts +0 -21
  302. package/dist/lib/types/components/benefits-app/pages/manage-benefits-page/edit-benefit-page/edit-benefit-form/edit-benefit-form.d.ts +0 -12
  303. package/dist/lib/types/components/benefits-app/pages/manage-benefits-page/edit-benefit-page/edit-benefit-form/upload-benefit-icon.d.ts +0 -16
  304. package/dist/lib/types/components/benefits-app/pages/manage-benefits-page/edit-benefit-page/edit-benefit-form/upload-file.d.ts +0 -17
  305. package/dist/lib/types/components/benefits-app/pages/manage-benefits-page/edit-benefit-page/edit-benefit-page.d.ts +0 -24
  306. package/dist/lib/types/components/benefits-app/pages/manage-benefits-page/edit-benefit-page/edit-benefit.query.d.ts +0 -16
  307. package/dist/lib/types/components/benefits-app/pages/manage-benefits-page/edit-benefit-page/edit-benefit.service.d.ts +0 -20
  308. package/dist/lib/types/components/benefits-app/pages/manage-benefits-page/empty-benefits.d.ts +0 -5
  309. package/dist/lib/types/components/benefits-app/pages/manage-benefits-page/manage-benefits-header-row.d.ts +0 -3
  310. package/dist/lib/types/components/benefits-app/pages/manage-benefits-page/manage-benefits-page.d.ts +0 -16
  311. package/dist/lib/types/components/benefits-app/pages/manage-benefits-page/manage-benefits-page.routes.d.ts +0 -6
  312. package/dist/lib/types/components/benefits-app/pages/manage-benefits-page/manage-benefits.service.d.ts +0 -8
  313. package/dist/lib/types/components/benefits-app/pages/manage-benefits-page/managed-benefit-item/managed-benefit-item.d.ts +0 -11
  314. package/dist/lib/types/components/benefits-app/pages/manage-benefits-page/store/manage-benefits.query.d.ts +0 -10
  315. package/dist/lib/types/components/benefits-app/pages/manage-benefits-page/store/manage-benefits.store.d.ts +0 -51
  316. package/dist/lib/types/components/benefits-app/pages/role-management-page/api/role-management.api.d.ts +0 -7
  317. package/dist/lib/types/components/benefits-app/pages/role-management-page/role-editors-section/role-editors-section.d.ts +0 -15
  318. package/dist/lib/types/components/benefits-app/pages/role-management-page/role-management-page.d.ts +0 -9
  319. package/dist/lib/types/components/benefits-app/pages/role-management-page/role-management.service.d.ts +0 -11
  320. package/dist/lib/types/components/benefits-app/pages/role-management-page/role-owner-section/role-owner-section.d.ts +0 -5
  321. package/dist/lib/types/components/benefits-app/pages/role-management-page/store/role-management.query.d.ts +0 -12
  322. package/dist/lib/types/components/benefits-app/pages/role-management-page/store/role-management.store.d.ts +0 -17
  323. package/dist/lib/types/components/benefits-app/services/benefits-app.service.d.ts +0 -13
  324. package/dist/lib/types/components/benefits-app/services/benefits.service.d.ts +0 -8
  325. package/dist/lib/types/components/benefits-app/services/event-tracking.service.d.ts +0 -11
  326. package/dist/lib/types/components/benefits-app/services/navigation.service.d.ts +0 -14
  327. package/dist/lib/types/components/benefits-app/store/benefits-app.query.d.ts +0 -12
  328. package/dist/lib/types/components/benefits-app/store/benefits-app.store.d.ts +0 -31
  329. package/dist/lib/types/components/benefits-app-host/benefits-app-host.d.ts +0 -9
  330. package/dist/lib/types/components/benefits-app-host/loading-page.d.ts +0 -3
  331. package/dist/lib/types/components/benefits-app-host/oidc-callback-page/oidc-callback-page.d.ts +0 -8
  332. package/dist/lib/types/components/benefits-app-host/oidc-callback-page/oidc-callback-page.routes.d.ts +0 -1
  333. package/dist/lib/types/components/benefits-app-host/services/app-configuration.query.d.ts +0 -11
  334. package/dist/lib/types/components/benefits-app-host/services/app-configuration.service.d.ts +0 -9
  335. package/dist/lib/types/components/benefits-app-host/services/authentication.query.d.ts +0 -13
  336. package/dist/lib/types/components/benefits-app-host/services/authentication.service.d.ts +0 -25
  337. package/dist/lib/types/components/benefits-app-host/services/session.store.d.ts +0 -25
  338. package/dist/lib/types/components/cars-calculator-app/api/api-client.d.ts +0 -2
  339. package/dist/lib/types/components/cars-calculator-app/api/cars-calculator-events.model.d.ts +0 -39
  340. package/dist/lib/types/components/cars-calculator-app/api/cars-calculator.api.d.ts +0 -100
  341. package/dist/lib/types/components/cars-calculator-app/api/event-tracking.api.d.ts +0 -6
  342. package/dist/lib/types/components/cars-calculator-app/cars-calculator-app.d.ts +0 -18
  343. package/dist/lib/types/components/cars-calculator-app/notifications-section/notifications-section.d.ts +0 -5
  344. package/dist/lib/types/components/cars-calculator-app/pages/asset.component.d.ts +0 -4
  345. package/dist/lib/types/components/cars-calculator-app/pages/choose-vehicle-section.component.d.ts +0 -23
  346. package/dist/lib/types/components/cars-calculator-app/pages/complete-section.component.d.ts +0 -5
  347. package/dist/lib/types/components/cars-calculator-app/pages/cost-breakdown-section.component.d.ts +0 -6
  348. package/dist/lib/types/components/cars-calculator-app/pages/model-variants-section.component.d.ts +0 -12
  349. package/dist/lib/types/components/cars-calculator-app/pages/personal-info-section.component.d.ts +0 -10
  350. package/dist/lib/types/components/cars-calculator-app/pages/quote-result-section.component.d.ts +0 -16
  351. package/dist/lib/types/components/cars-calculator-app/pages/submit-quote-section.component.d.ts +0 -12
  352. package/dist/lib/types/components/cars-calculator-app/services/app-configuration.service.d.ts +0 -7
  353. package/dist/lib/types/components/cars-calculator-app/services/cars-calculator.service.d.ts +0 -11
  354. package/dist/lib/types/components/cars-calculator-app/services/event-tracking.service.d.ts +0 -13
  355. package/dist/lib/types/components/cars-calculator-app/services/notifications.service.d.ts +0 -15
  356. package/dist/lib/types/components/cars-calculator-app/services/notifications.store.d.ts +0 -14
  357. package/dist/lib/types/components/cars-calculator-app/services/session.query.d.ts +0 -26
  358. package/dist/lib/types/components/cars-calculator-app/services/session.store.d.ts +0 -78
  359. package/dist/lib/types/components/cars-calculator-app/services/view.service.d.ts +0 -8
  360. package/dist/lib/types/components/shared/file-icon/file-icon.d.ts +0 -11
  361. package/dist/lib/types/components/shared/icon.d.ts +0 -7
  362. package/dist/lib/types/components/shared/icons-library.d.ts +0 -1
  363. package/dist/lib/types/components/shared/modal-section.d.ts +0 -16
  364. package/dist/lib/types/components/shared/tooltip.d.ts +0 -13
  365. package/dist/lib/types/components/shared/ui-container/ui-container.d.ts +0 -5
  366. package/dist/lib/types/components.d.ts +0 -606
  367. package/dist/lib/types/global/config.d.ts +0 -2
  368. package/dist/lib/types/global/main.d.ts +0 -1
  369. package/dist/lib/types/global/main.dev.d.ts +0 -1
  370. package/dist/lib/types/index.d.ts +0 -2
  371. package/dist/lib/types/stencil-public-runtime.d.ts +0 -1555
  372. package/dist/lib/types/utils/config.d.ts +0 -2
  373. package/dist/lib/types/utils/index.d.ts +0 -10
  374. package/dist/lib/types/utils/lazy.d.ts +0 -12
  375. package/dist/lib/types/utils/promise.d.ts +0 -1
  376. package/readme.md +0 -1
@@ -1,1734 +0,0 @@
1
- 'use strict';
2
-
3
- function _interopNamespace(e) {
4
- if (e && e.__esModule) return e;
5
- var n = Object.create(null);
6
- if (e) {
7
- Object.keys(e).forEach(function (k) {
8
- if (k !== 'default') {
9
- var d = Object.getOwnPropertyDescriptor(e, k);
10
- Object.defineProperty(n, k, d.get ? d : {
11
- enumerable: true,
12
- get: function () {
13
- return e[k];
14
- }
15
- });
16
- }
17
- });
18
- }
19
- n['default'] = e;
20
- return Object.freeze(n);
21
- }
22
-
23
- const NAMESPACE = 'apollo-benefits';
24
-
25
- let scopeId;
26
- let contentRef;
27
- let hostTagName;
28
- let useNativeShadowDom = false;
29
- let checkSlotFallbackVisibility = false;
30
- let checkSlotRelocate = false;
31
- let isSvgMode = false;
32
- let renderingRef = null;
33
- let queuePending = false;
34
- const win = typeof window !== 'undefined' ? window : {};
35
- const doc = win.document || { head: {} };
36
- const plt = {
37
- $flags$: 0,
38
- $resourcesUrl$: '',
39
- jmp: h => h(),
40
- raf: h => requestAnimationFrame(h),
41
- ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
42
- rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
43
- ce: (eventName, opts) => new CustomEvent(eventName, opts),
44
- };
45
- const promiseResolve = (v) => Promise.resolve(v);
46
- const supportsConstructibleStylesheets = /*@__PURE__*/ (() => {
47
- try {
48
- new CSSStyleSheet();
49
- return typeof (new CSSStyleSheet()).replace === 'function';
50
- }
51
- catch (e) { }
52
- return false;
53
- })()
54
- ;
55
- const Context = {};
56
- const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
57
- if (listeners) {
58
- listeners.map(([flags, name, method]) => {
59
- const target = elm;
60
- const handler = hostListenerProxy(hostRef, method);
61
- const opts = hostListenerOpts(flags);
62
- plt.ael(target, name, handler, opts);
63
- (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
64
- });
65
- }
66
- };
67
- const hostListenerProxy = (hostRef, methodName) => (ev) => {
68
- try {
69
- {
70
- if (hostRef.$flags$ & 256 /* isListenReady */) {
71
- // instance is ready, let's call it's member method for this event
72
- hostRef.$lazyInstance$[methodName](ev);
73
- }
74
- else {
75
- (hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
76
- }
77
- }
78
- }
79
- catch (e) {
80
- consoleError(e);
81
- }
82
- };
83
- // prettier-ignore
84
- const hostListenerOpts = (flags) => (flags & 2 /* Capture */) !== 0;
85
- const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
86
- const XLINK_NS = 'http://www.w3.org/1999/xlink';
87
- const createTime = (fnName, tagName = '') => {
88
- {
89
- return () => {
90
- return;
91
- };
92
- }
93
- };
94
- const uniqueTime = (key, measureText) => {
95
- {
96
- return () => {
97
- return;
98
- };
99
- }
100
- };
101
- const rootAppliedStyles = new WeakMap();
102
- const registerStyle = (scopeId, cssText, allowCS) => {
103
- let style = styles.get(scopeId);
104
- if (supportsConstructibleStylesheets && allowCS) {
105
- style = (style || new CSSStyleSheet());
106
- style.replace(cssText);
107
- }
108
- else {
109
- style = cssText;
110
- }
111
- styles.set(scopeId, style);
112
- };
113
- const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
114
- let scopeId = getScopeId(cmpMeta);
115
- let style = styles.get(scopeId);
116
- // if an element is NOT connected then getRootNode() will return the wrong root node
117
- // so the fallback is to always use the document for the root node in those cases
118
- styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
119
- if (style) {
120
- if (typeof style === 'string') {
121
- styleContainerNode = styleContainerNode.head || styleContainerNode;
122
- let appliedStyles = rootAppliedStyles.get(styleContainerNode);
123
- let styleElm;
124
- if (!appliedStyles) {
125
- rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
126
- }
127
- if (!appliedStyles.has(scopeId)) {
128
- {
129
- {
130
- styleElm = doc.createElement('style');
131
- styleElm.innerHTML = style;
132
- }
133
- styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
134
- }
135
- if (appliedStyles) {
136
- appliedStyles.add(scopeId);
137
- }
138
- }
139
- }
140
- else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
141
- styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
142
- }
143
- }
144
- return scopeId;
145
- };
146
- const attachStyles = (hostRef) => {
147
- const cmpMeta = hostRef.$cmpMeta$;
148
- const elm = hostRef.$hostElement$;
149
- const flags = cmpMeta.$flags$;
150
- const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
151
- const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
152
- if (flags & 10 /* needsScopedEncapsulation */) {
153
- // only required when we're NOT using native shadow dom (slot)
154
- // or this browser doesn't support native shadow dom
155
- // and this host element was NOT created with SSR
156
- // let's pick out the inner content for slot projection
157
- // create a node to represent where the original
158
- // content was first placed, which is useful later on
159
- // DOM WRITE!!
160
- elm['s-sc'] = scopeId;
161
- elm.classList.add(scopeId + '-h');
162
- }
163
- endAttachStyles();
164
- };
165
- const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
166
- /**
167
- * Default style mode id
168
- */
169
- /**
170
- * Reusable empty obj/array
171
- * Don't add values to these!!
172
- */
173
- const EMPTY_OBJ = {};
174
- const isDef = (v) => v != null;
175
- const isComplexType = (o) => {
176
- // https://jsperf.com/typeof-fn-object/5
177
- o = typeof o;
178
- return o === 'object' || o === 'function';
179
- };
180
- /**
181
- * Production h() function based on Preact by
182
- * Jason Miller (@developit)
183
- * Licensed under the MIT License
184
- * https://github.com/developit/preact/blob/master/LICENSE
185
- *
186
- * Modified for Stencil's compiler and vdom
187
- */
188
- // const stack: any[] = [];
189
- // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
190
- // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
191
- const h = (nodeName, vnodeData, ...children) => {
192
- let child = null;
193
- let key = null;
194
- let slotName = null;
195
- let simple = false;
196
- let lastSimple = false;
197
- let vNodeChildren = [];
198
- const walk = (c) => {
199
- for (let i = 0; i < c.length; i++) {
200
- child = c[i];
201
- if (Array.isArray(child)) {
202
- walk(child);
203
- }
204
- else if (child != null && typeof child !== 'boolean') {
205
- if ((simple = typeof nodeName !== 'function' && !isComplexType(child))) {
206
- child = String(child);
207
- }
208
- if (simple && lastSimple) {
209
- // If the previous child was simple (string), we merge both
210
- vNodeChildren[vNodeChildren.length - 1].$text$ += child;
211
- }
212
- else {
213
- // Append a new vNode, if it's text, we create a text vNode
214
- vNodeChildren.push(simple ? newVNode(null, child) : child);
215
- }
216
- lastSimple = simple;
217
- }
218
- }
219
- };
220
- walk(children);
221
- if (vnodeData) {
222
- // normalize class / classname attributes
223
- if (vnodeData.key) {
224
- key = vnodeData.key;
225
- }
226
- if (vnodeData.name) {
227
- slotName = vnodeData.name;
228
- }
229
- {
230
- const classData = vnodeData.className || vnodeData.class;
231
- if (classData) {
232
- vnodeData.class =
233
- typeof classData !== 'object'
234
- ? classData
235
- : Object.keys(classData)
236
- .filter(k => classData[k])
237
- .join(' ');
238
- }
239
- }
240
- }
241
- if (typeof nodeName === 'function') {
242
- // nodeName is a functional component
243
- return nodeName(vnodeData === null ? {} : vnodeData, vNodeChildren, vdomFnUtils);
244
- }
245
- const vnode = newVNode(nodeName, null);
246
- vnode.$attrs$ = vnodeData;
247
- if (vNodeChildren.length > 0) {
248
- vnode.$children$ = vNodeChildren;
249
- }
250
- {
251
- vnode.$key$ = key;
252
- }
253
- {
254
- vnode.$name$ = slotName;
255
- }
256
- return vnode;
257
- };
258
- const newVNode = (tag, text) => {
259
- const vnode = {
260
- $flags$: 0,
261
- $tag$: tag,
262
- $text$: text,
263
- $elm$: null,
264
- $children$: null,
265
- };
266
- {
267
- vnode.$attrs$ = null;
268
- }
269
- {
270
- vnode.$key$ = null;
271
- }
272
- {
273
- vnode.$name$ = null;
274
- }
275
- return vnode;
276
- };
277
- const Host = {};
278
- const isHost = (node) => node && node.$tag$ === Host;
279
- const vdomFnUtils = {
280
- forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
281
- map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate),
282
- };
283
- const convertToPublic = (node) => ({
284
- vattrs: node.$attrs$,
285
- vchildren: node.$children$,
286
- vkey: node.$key$,
287
- vname: node.$name$,
288
- vtag: node.$tag$,
289
- vtext: node.$text$,
290
- });
291
- const convertToPrivate = (node) => {
292
- if (typeof node.vtag === 'function') {
293
- const vnodeData = Object.assign({}, node.vattrs);
294
- if (node.vkey) {
295
- vnodeData.key = node.vkey;
296
- }
297
- if (node.vname) {
298
- vnodeData.name = node.vname;
299
- }
300
- return h(node.vtag, vnodeData, ...(node.vchildren || []));
301
- }
302
- const vnode = newVNode(node.vtag, node.vtext);
303
- vnode.$attrs$ = node.vattrs;
304
- vnode.$children$ = node.vchildren;
305
- vnode.$key$ = node.vkey;
306
- vnode.$name$ = node.vname;
307
- return vnode;
308
- };
309
- /**
310
- * Production setAccessor() function based on Preact by
311
- * Jason Miller (@developit)
312
- * Licensed under the MIT License
313
- * https://github.com/developit/preact/blob/master/LICENSE
314
- *
315
- * Modified for Stencil's compiler and vdom
316
- */
317
- const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
318
- if (oldValue !== newValue) {
319
- let isProp = isMemberInElement(elm, memberName);
320
- let ln = memberName.toLowerCase();
321
- if (memberName === 'class') {
322
- const classList = elm.classList;
323
- const oldClasses = parseClassList(oldValue);
324
- const newClasses = parseClassList(newValue);
325
- classList.remove(...oldClasses.filter(c => c && !newClasses.includes(c)));
326
- classList.add(...newClasses.filter(c => c && !oldClasses.includes(c)));
327
- }
328
- else if (memberName === 'style') {
329
- // update style attribute, css properties and values
330
- {
331
- for (const prop in oldValue) {
332
- if (!newValue || newValue[prop] == null) {
333
- if (prop.includes('-')) {
334
- elm.style.removeProperty(prop);
335
- }
336
- else {
337
- elm.style[prop] = '';
338
- }
339
- }
340
- }
341
- }
342
- for (const prop in newValue) {
343
- if (!oldValue || newValue[prop] !== oldValue[prop]) {
344
- if (prop.includes('-')) {
345
- elm.style.setProperty(prop, newValue[prop]);
346
- }
347
- else {
348
- elm.style[prop] = newValue[prop];
349
- }
350
- }
351
- }
352
- }
353
- else if (memberName === 'key')
354
- ;
355
- else if (memberName === 'ref') {
356
- // minifier will clean this up
357
- if (newValue) {
358
- newValue(elm);
359
- }
360
- }
361
- else if ((!isProp ) && memberName[0] === 'o' && memberName[1] === 'n') {
362
- // Event Handlers
363
- // so if the member name starts with "on" and the 3rd characters is
364
- // a capital letter, and it's not already a member on the element,
365
- // then we're assuming it's an event listener
366
- if (memberName[2] === '-') {
367
- // on- prefixed events
368
- // allows to be explicit about the dom event to listen without any magic
369
- // under the hood:
370
- // <my-cmp on-click> // listens for "click"
371
- // <my-cmp on-Click> // listens for "Click"
372
- // <my-cmp on-ionChange> // listens for "ionChange"
373
- // <my-cmp on-EVENTS> // listens for "EVENTS"
374
- memberName = memberName.slice(3);
375
- }
376
- else if (isMemberInElement(win, ln)) {
377
- // standard event
378
- // the JSX attribute could have been "onMouseOver" and the
379
- // member name "onmouseover" is on the window's prototype
380
- // so let's add the listener "mouseover", which is all lowercased
381
- memberName = ln.slice(2);
382
- }
383
- else {
384
- // custom event
385
- // the JSX attribute could have been "onMyCustomEvent"
386
- // so let's trim off the "on" prefix and lowercase the first character
387
- // and add the listener "myCustomEvent"
388
- // except for the first character, we keep the event name case
389
- memberName = ln[2] + memberName.slice(3);
390
- }
391
- if (oldValue) {
392
- plt.rel(elm, memberName, oldValue, false);
393
- }
394
- if (newValue) {
395
- plt.ael(elm, memberName, newValue, false);
396
- }
397
- }
398
- else {
399
- // Set property if it exists and it's not a SVG
400
- const isComplex = isComplexType(newValue);
401
- if ((isProp || (isComplex && newValue !== null)) && !isSvg) {
402
- try {
403
- if (!elm.tagName.includes('-')) {
404
- let n = newValue == null ? '' : newValue;
405
- // Workaround for Safari, moving the <input> caret when re-assigning the same valued
406
- if (memberName === 'list') {
407
- isProp = false;
408
- // tslint:disable-next-line: triple-equals
409
- }
410
- else if (oldValue == null || elm[memberName] != n) {
411
- elm[memberName] = n;
412
- }
413
- }
414
- else {
415
- elm[memberName] = newValue;
416
- }
417
- }
418
- catch (e) { }
419
- }
420
- /**
421
- * Need to manually update attribute if:
422
- * - memberName is not an attribute
423
- * - if we are rendering the host element in order to reflect attribute
424
- * - if it's a SVG, since properties might not work in <svg>
425
- * - if the newValue is null/undefined or 'false'.
426
- */
427
- let xlink = false;
428
- {
429
- if (ln !== (ln = ln.replace(/^xlink\:?/, ''))) {
430
- memberName = ln;
431
- xlink = true;
432
- }
433
- }
434
- if (newValue == null || newValue === false) {
435
- if (newValue !== false || elm.getAttribute(memberName) === '') {
436
- if (xlink) {
437
- elm.removeAttributeNS(XLINK_NS, memberName);
438
- }
439
- else {
440
- elm.removeAttribute(memberName);
441
- }
442
- }
443
- }
444
- else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
445
- newValue = newValue === true ? '' : newValue;
446
- if (xlink) {
447
- elm.setAttributeNS(XLINK_NS, memberName, newValue);
448
- }
449
- else {
450
- elm.setAttribute(memberName, newValue);
451
- }
452
- }
453
- }
454
- }
455
- };
456
- const parseClassListRegex = /\s/;
457
- const parseClassList = (value) => (!value ? [] : value.split(parseClassListRegex));
458
- const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
459
- // if the element passed in is a shadow root, which is a document fragment
460
- // then we want to be adding attrs/props to the shadow root's "host" element
461
- // if it's not a shadow root, then we add attrs/props to the same element
462
- const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : 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
- const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
479
- // tslint:disable-next-line: prefer-const
480
- let newVNode = newParentVNode.$children$[childIndex];
481
- let i = 0;
482
- let elm;
483
- let childNode;
484
- let oldVNode;
485
- if (!useNativeShadowDom) {
486
- // remember for later we need to check to relocate nodes
487
- checkSlotRelocate = true;
488
- if (newVNode.$tag$ === 'slot') {
489
- if (scopeId) {
490
- // scoped css needs to add its scoped id to the parent element
491
- parentElm.classList.add(scopeId + '-s');
492
- }
493
- newVNode.$flags$ |= newVNode.$children$
494
- ? // slot element has fallback content
495
- 2 /* isSlotFallback */
496
- : // slot element does not have fallback content
497
- 1 /* isSlotReference */;
498
- }
499
- }
500
- if (newVNode.$text$ !== null) {
501
- // create text node
502
- elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
503
- }
504
- else if (newVNode.$flags$ & 1 /* isSlotReference */) {
505
- // create a slot reference node
506
- elm = newVNode.$elm$ = doc.createTextNode('');
507
- }
508
- else {
509
- // create element
510
- elm = newVNode.$elm$ = (doc.createElement(newVNode.$flags$ & 2 /* isSlotFallback */ ? 'slot-fb' : newVNode.$tag$));
511
- // add css classes, attrs, props, listeners, etc.
512
- {
513
- updateElement(null, newVNode, isSvgMode);
514
- }
515
- if (isDef(scopeId) && elm['s-si'] !== scopeId) {
516
- // if there is a scopeId and this is the initial render
517
- // then let's add the scopeId as a css class
518
- elm.classList.add((elm['s-si'] = scopeId));
519
- }
520
- if (newVNode.$children$) {
521
- for (i = 0; i < newVNode.$children$.length; ++i) {
522
- // create the node
523
- childNode = createElm(oldParentVNode, newVNode, i, elm);
524
- // return node could have been null
525
- if (childNode) {
526
- // append our new node
527
- elm.appendChild(childNode);
528
- }
529
- }
530
- }
531
- }
532
- {
533
- elm['s-hn'] = hostTagName;
534
- if (newVNode.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
535
- // remember the content reference comment
536
- elm['s-sr'] = true;
537
- // remember the content reference comment
538
- elm['s-cr'] = contentRef;
539
- // remember the slot name, or empty string for default slot
540
- elm['s-sn'] = newVNode.$name$ || '';
541
- // check if we've got an old vnode for this slot
542
- oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
543
- if (oldVNode && oldVNode.$tag$ === newVNode.$tag$ && oldParentVNode.$elm$) {
544
- // we've got an old slot vnode and the wrapper is being replaced
545
- // so let's move the old slot content back to it's original location
546
- putBackInOriginalLocation(oldParentVNode.$elm$, false);
547
- }
548
- }
549
- }
550
- return elm;
551
- };
552
- const putBackInOriginalLocation = (parentElm, recursive) => {
553
- plt.$flags$ |= 1 /* isTmpDisconnected */;
554
- const oldSlotChildNodes = parentElm.childNodes;
555
- for (let i = oldSlotChildNodes.length - 1; i >= 0; i--) {
556
- const childNode = oldSlotChildNodes[i];
557
- if (childNode['s-hn'] !== hostTagName && childNode['s-ol']) {
558
- // // this child node in the old element is from another component
559
- // // remove this node from the old slot's parent
560
- // childNode.remove();
561
- // and relocate it back to it's original location
562
- parentReferenceNode(childNode).insertBefore(childNode, referenceNode(childNode));
563
- // remove the old original location comment entirely
564
- // later on the patch function will know what to do
565
- // and move this to the correct spot in need be
566
- childNode['s-ol'].remove();
567
- childNode['s-ol'] = undefined;
568
- checkSlotRelocate = true;
569
- }
570
- if (recursive) {
571
- putBackInOriginalLocation(childNode, recursive);
572
- }
573
- }
574
- plt.$flags$ &= ~1 /* isTmpDisconnected */;
575
- };
576
- const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
577
- let containerElm = ((parentElm['s-cr'] && parentElm['s-cr'].parentNode) || parentElm);
578
- let childNode;
579
- if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
580
- containerElm = containerElm.shadowRoot;
581
- }
582
- for (; startIdx <= endIdx; ++startIdx) {
583
- if (vnodes[startIdx]) {
584
- childNode = createElm(null, parentVNode, startIdx, parentElm);
585
- if (childNode) {
586
- vnodes[startIdx].$elm$ = childNode;
587
- containerElm.insertBefore(childNode, referenceNode(before) );
588
- }
589
- }
590
- }
591
- };
592
- const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
593
- for (; startIdx <= endIdx; ++startIdx) {
594
- if ((vnode = vnodes[startIdx])) {
595
- elm = vnode.$elm$;
596
- callNodeRefs(vnode);
597
- {
598
- // we're removing this element
599
- // so it's possible we need to show slot fallback content now
600
- checkSlotFallbackVisibility = true;
601
- if (elm['s-ol']) {
602
- // remove the original location comment
603
- elm['s-ol'].remove();
604
- }
605
- else {
606
- // it's possible that child nodes of the node
607
- // that's being removed are slot nodes
608
- putBackInOriginalLocation(elm, true);
609
- }
610
- }
611
- // remove the vnode's element from the dom
612
- elm.remove();
613
- }
614
- }
615
- };
616
- const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
617
- let oldStartIdx = 0;
618
- let newStartIdx = 0;
619
- let idxInOld = 0;
620
- let i = 0;
621
- let oldEndIdx = oldCh.length - 1;
622
- let oldStartVnode = oldCh[0];
623
- let oldEndVnode = oldCh[oldEndIdx];
624
- let newEndIdx = newCh.length - 1;
625
- let newStartVnode = newCh[0];
626
- let newEndVnode = newCh[newEndIdx];
627
- let node;
628
- let elmToMove;
629
- while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
630
- if (oldStartVnode == null) {
631
- // Vnode might have been moved left
632
- oldStartVnode = oldCh[++oldStartIdx];
633
- }
634
- else if (oldEndVnode == null) {
635
- oldEndVnode = oldCh[--oldEndIdx];
636
- }
637
- else if (newStartVnode == null) {
638
- newStartVnode = newCh[++newStartIdx];
639
- }
640
- else if (newEndVnode == null) {
641
- newEndVnode = newCh[--newEndIdx];
642
- }
643
- else if (isSameVnode(oldStartVnode, newStartVnode)) {
644
- patch(oldStartVnode, newStartVnode);
645
- oldStartVnode = oldCh[++oldStartIdx];
646
- newStartVnode = newCh[++newStartIdx];
647
- }
648
- else if (isSameVnode(oldEndVnode, newEndVnode)) {
649
- patch(oldEndVnode, newEndVnode);
650
- oldEndVnode = oldCh[--oldEndIdx];
651
- newEndVnode = newCh[--newEndIdx];
652
- }
653
- else if (isSameVnode(oldStartVnode, newEndVnode)) {
654
- // Vnode moved right
655
- if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
656
- putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
657
- }
658
- patch(oldStartVnode, newEndVnode);
659
- parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
660
- oldStartVnode = oldCh[++oldStartIdx];
661
- newEndVnode = newCh[--newEndIdx];
662
- }
663
- else if (isSameVnode(oldEndVnode, newStartVnode)) {
664
- // Vnode moved left
665
- if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
666
- putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
667
- }
668
- patch(oldEndVnode, newStartVnode);
669
- parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
670
- oldEndVnode = oldCh[--oldEndIdx];
671
- newStartVnode = newCh[++newStartIdx];
672
- }
673
- else {
674
- // createKeyToOldIdx
675
- idxInOld = -1;
676
- {
677
- for (i = oldStartIdx; i <= oldEndIdx; ++i) {
678
- if (oldCh[i] && oldCh[i].$key$ !== null && oldCh[i].$key$ === newStartVnode.$key$) {
679
- idxInOld = i;
680
- break;
681
- }
682
- }
683
- }
684
- if (idxInOld >= 0) {
685
- elmToMove = oldCh[idxInOld];
686
- if (elmToMove.$tag$ !== newStartVnode.$tag$) {
687
- node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld, parentElm);
688
- }
689
- else {
690
- patch(elmToMove, newStartVnode);
691
- oldCh[idxInOld] = undefined;
692
- node = elmToMove.$elm$;
693
- }
694
- newStartVnode = newCh[++newStartIdx];
695
- }
696
- else {
697
- // new element
698
- node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx, parentElm);
699
- newStartVnode = newCh[++newStartIdx];
700
- }
701
- if (node) {
702
- {
703
- parentReferenceNode(oldStartVnode.$elm$).insertBefore(node, referenceNode(oldStartVnode.$elm$));
704
- }
705
- }
706
- }
707
- }
708
- if (oldStartIdx > oldEndIdx) {
709
- addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx);
710
- }
711
- else if (newStartIdx > newEndIdx) {
712
- removeVnodes(oldCh, oldStartIdx, oldEndIdx);
713
- }
714
- };
715
- const isSameVnode = (vnode1, vnode2) => {
716
- // compare if two vnode to see if they're "technically" the same
717
- // need to have the same element tag, and same key to be the same
718
- if (vnode1.$tag$ === vnode2.$tag$) {
719
- if (vnode1.$tag$ === 'slot') {
720
- return vnode1.$name$ === vnode2.$name$;
721
- }
722
- {
723
- return vnode1.$key$ === vnode2.$key$;
724
- }
725
- }
726
- return false;
727
- };
728
- const referenceNode = (node) => {
729
- // this node was relocated to a new location in the dom
730
- // because of some other component's slot
731
- // but we still have an html comment in place of where
732
- // it's original location was according to it's original vdom
733
- return (node && node['s-ol']) || node;
734
- };
735
- const parentReferenceNode = (node) => (node['s-ol'] ? node['s-ol'] : node).parentNode;
736
- const patch = (oldVNode, newVNode) => {
737
- const elm = (newVNode.$elm$ = oldVNode.$elm$);
738
- const oldChildren = oldVNode.$children$;
739
- const newChildren = newVNode.$children$;
740
- const tag = newVNode.$tag$;
741
- const text = newVNode.$text$;
742
- let defaultHolder;
743
- if (text === null) {
744
- // element node
745
- {
746
- if (tag === 'slot')
747
- ;
748
- else {
749
- // either this is the first render of an element OR it's an update
750
- // AND we already know it's possible it could have changed
751
- // this updates the element's css classes, attrs, props, listeners, etc.
752
- updateElement(oldVNode, newVNode, isSvgMode);
753
- }
754
- }
755
- if (oldChildren !== null && newChildren !== null) {
756
- // looks like there's child vnodes for both the old and new vnodes
757
- updateChildren(elm, oldChildren, newVNode, newChildren);
758
- }
759
- else if (newChildren !== null) {
760
- // no old child vnodes, but there are new child vnodes to add
761
- if (oldVNode.$text$ !== null) {
762
- // the old vnode was text, so be sure to clear it out
763
- elm.textContent = '';
764
- }
765
- // add the new vnode children
766
- addVnodes(elm, null, newVNode, newChildren, 0, newChildren.length - 1);
767
- }
768
- else if (oldChildren !== null) {
769
- // no new child vnodes, but there are old child vnodes to remove
770
- removeVnodes(oldChildren, 0, oldChildren.length - 1);
771
- }
772
- }
773
- else if ((defaultHolder = elm['s-cr'])) {
774
- // this element has slotted content
775
- defaultHolder.parentNode.textContent = text;
776
- }
777
- else if (oldVNode.$text$ !== text) {
778
- // update the text content for the text only vnode
779
- // and also only if the text is different than before
780
- elm.data = text;
781
- }
782
- };
783
- const updateFallbackSlotVisibility = (elm) => {
784
- // tslint:disable-next-line: prefer-const
785
- let childNodes = elm.childNodes;
786
- let childNode;
787
- let i;
788
- let ilen;
789
- let j;
790
- let slotNameAttr;
791
- let nodeType;
792
- for (i = 0, ilen = childNodes.length; i < ilen; i++) {
793
- childNode = childNodes[i];
794
- if (childNode.nodeType === 1 /* ElementNode */) {
795
- if (childNode['s-sr']) {
796
- // this is a slot fallback node
797
- // get the slot name for this slot reference node
798
- slotNameAttr = childNode['s-sn'];
799
- // by default always show a fallback slot node
800
- // then hide it if there are other slots in the light dom
801
- childNode.hidden = false;
802
- for (j = 0; j < ilen; j++) {
803
- nodeType = childNodes[j].nodeType;
804
- if (childNodes[j]['s-hn'] !== childNode['s-hn'] || slotNameAttr !== '') {
805
- // this sibling node is from a different component OR is a named fallback slot node
806
- if (nodeType === 1 /* ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {
807
- childNode.hidden = true;
808
- break;
809
- }
810
- }
811
- else {
812
- // this is a default fallback slot node
813
- // any element or text node (with content)
814
- // should hide the default fallback slot node
815
- if (nodeType === 1 /* ElementNode */ ||
816
- (nodeType === 3 /* TextNode */ && childNodes[j].textContent.trim() !== '')) {
817
- childNode.hidden = true;
818
- break;
819
- }
820
- }
821
- }
822
- }
823
- // keep drilling down
824
- updateFallbackSlotVisibility(childNode);
825
- }
826
- }
827
- };
828
- const relocateNodes = [];
829
- const relocateSlotContent = (elm) => {
830
- // tslint:disable-next-line: prefer-const
831
- let childNode;
832
- let node;
833
- let hostContentNodes;
834
- let slotNameAttr;
835
- let relocateNodeData;
836
- let j;
837
- let i = 0;
838
- let childNodes = elm.childNodes;
839
- let ilen = childNodes.length;
840
- for (; i < ilen; i++) {
841
- childNode = childNodes[i];
842
- if (childNode['s-sr'] && (node = childNode['s-cr']) && node.parentNode) {
843
- // first got the content reference comment node
844
- // then we got it's parent, which is where all the host content is in now
845
- hostContentNodes = node.parentNode.childNodes;
846
- slotNameAttr = childNode['s-sn'];
847
- for (j = hostContentNodes.length - 1; j >= 0; j--) {
848
- node = hostContentNodes[j];
849
- if (!node['s-cn'] && !node['s-nr'] && node['s-hn'] !== childNode['s-hn']) {
850
- // let's do some relocating to its new home
851
- // but never relocate a content reference node
852
- // that is suppose to always represent the original content location
853
- if (isNodeLocatedInSlot(node, slotNameAttr)) {
854
- // it's possible we've already decided to relocate this node
855
- relocateNodeData = relocateNodes.find(r => r.$nodeToRelocate$ === node);
856
- // made some changes to slots
857
- // let's make sure we also double check
858
- // fallbacks are correctly hidden or shown
859
- checkSlotFallbackVisibility = true;
860
- node['s-sn'] = node['s-sn'] || slotNameAttr;
861
- if (relocateNodeData) {
862
- // previously we never found a slot home for this node
863
- // but turns out we did, so let's remember it now
864
- relocateNodeData.$slotRefNode$ = childNode;
865
- }
866
- else {
867
- // add to our list of nodes to relocate
868
- relocateNodes.push({
869
- $slotRefNode$: childNode,
870
- $nodeToRelocate$: node,
871
- });
872
- }
873
- if (node['s-sr']) {
874
- relocateNodes.map(relocateNode => {
875
- if (isNodeLocatedInSlot(relocateNode.$nodeToRelocate$, node['s-sn'])) {
876
- relocateNodeData = relocateNodes.find(r => r.$nodeToRelocate$ === node);
877
- if (relocateNodeData && !relocateNode.$slotRefNode$) {
878
- relocateNode.$slotRefNode$ = relocateNodeData.$slotRefNode$;
879
- }
880
- }
881
- });
882
- }
883
- }
884
- else if (!relocateNodes.some(r => r.$nodeToRelocate$ === node)) {
885
- // so far this element does not have a slot home, not setting slotRefNode on purpose
886
- // if we never find a home for this element then we'll need to hide it
887
- relocateNodes.push({
888
- $nodeToRelocate$: node,
889
- });
890
- }
891
- }
892
- }
893
- }
894
- if (childNode.nodeType === 1 /* ElementNode */) {
895
- relocateSlotContent(childNode);
896
- }
897
- }
898
- };
899
- const isNodeLocatedInSlot = (nodeToRelocate, slotNameAttr) => {
900
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
901
- if (nodeToRelocate.getAttribute('slot') === null && slotNameAttr === '') {
902
- return true;
903
- }
904
- if (nodeToRelocate.getAttribute('slot') === slotNameAttr) {
905
- return true;
906
- }
907
- return false;
908
- }
909
- if (nodeToRelocate['s-sn'] === slotNameAttr) {
910
- return true;
911
- }
912
- return slotNameAttr === '';
913
- };
914
- const callNodeRefs = (vNode) => {
915
- {
916
- vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
917
- vNode.$children$ && vNode.$children$.map(callNodeRefs);
918
- }
919
- };
920
- const renderVdom = (hostRef, renderFnResults) => {
921
- const hostElm = hostRef.$hostElement$;
922
- const cmpMeta = hostRef.$cmpMeta$;
923
- const oldVNode = hostRef.$vnode$ || newVNode(null, null);
924
- const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
925
- hostTagName = hostElm.tagName;
926
- if (cmpMeta.$attrsToReflect$) {
927
- rootVnode.$attrs$ = rootVnode.$attrs$ || {};
928
- cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
929
- }
930
- rootVnode.$tag$ = null;
931
- rootVnode.$flags$ |= 4 /* isHost */;
932
- hostRef.$vnode$ = rootVnode;
933
- rootVnode.$elm$ = oldVNode.$elm$ = (hostElm.shadowRoot || hostElm );
934
- {
935
- scopeId = hostElm['s-sc'];
936
- }
937
- {
938
- contentRef = hostElm['s-cr'];
939
- useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
940
- // always reset
941
- checkSlotFallbackVisibility = false;
942
- }
943
- // synchronous patch
944
- patch(oldVNode, rootVnode);
945
- {
946
- // while we're moving nodes around existing nodes, temporarily disable
947
- // the disconnectCallback from working
948
- plt.$flags$ |= 1 /* isTmpDisconnected */;
949
- if (checkSlotRelocate) {
950
- relocateSlotContent(rootVnode.$elm$);
951
- let relocateData;
952
- let nodeToRelocate;
953
- let orgLocationNode;
954
- let parentNodeRef;
955
- let insertBeforeNode;
956
- let refNode;
957
- let i = 0;
958
- for (; i < relocateNodes.length; i++) {
959
- relocateData = relocateNodes[i];
960
- nodeToRelocate = relocateData.$nodeToRelocate$;
961
- if (!nodeToRelocate['s-ol']) {
962
- // add a reference node marking this node's original location
963
- // keep a reference to this node for later lookups
964
- orgLocationNode = doc.createTextNode('');
965
- orgLocationNode['s-nr'] = nodeToRelocate;
966
- nodeToRelocate.parentNode.insertBefore((nodeToRelocate['s-ol'] = orgLocationNode), nodeToRelocate);
967
- }
968
- }
969
- for (i = 0; i < relocateNodes.length; i++) {
970
- relocateData = relocateNodes[i];
971
- nodeToRelocate = relocateData.$nodeToRelocate$;
972
- if (relocateData.$slotRefNode$) {
973
- // by default we're just going to insert it directly
974
- // after the slot reference node
975
- parentNodeRef = relocateData.$slotRefNode$.parentNode;
976
- insertBeforeNode = relocateData.$slotRefNode$.nextSibling;
977
- orgLocationNode = nodeToRelocate['s-ol'];
978
- while ((orgLocationNode = orgLocationNode.previousSibling)) {
979
- refNode = orgLocationNode['s-nr'];
980
- if (refNode && refNode['s-sn'] === nodeToRelocate['s-sn'] && parentNodeRef === refNode.parentNode) {
981
- refNode = refNode.nextSibling;
982
- if (!refNode || !refNode['s-nr']) {
983
- insertBeforeNode = refNode;
984
- break;
985
- }
986
- }
987
- }
988
- if ((!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode) || nodeToRelocate.nextSibling !== insertBeforeNode) {
989
- // we've checked that it's worth while to relocate
990
- // since that the node to relocate
991
- // has a different next sibling or parent relocated
992
- if (nodeToRelocate !== insertBeforeNode) {
993
- if (!nodeToRelocate['s-hn'] && nodeToRelocate['s-ol']) {
994
- // probably a component in the index.html that doesn't have it's hostname set
995
- nodeToRelocate['s-hn'] = nodeToRelocate['s-ol'].parentNode.nodeName;
996
- }
997
- // add it back to the dom but in its new home
998
- parentNodeRef.insertBefore(nodeToRelocate, insertBeforeNode);
999
- }
1000
- }
1001
- }
1002
- else {
1003
- // this node doesn't have a slot home to go to, so let's hide it
1004
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1005
- nodeToRelocate.hidden = true;
1006
- }
1007
- }
1008
- }
1009
- }
1010
- if (checkSlotFallbackVisibility) {
1011
- updateFallbackSlotVisibility(rootVnode.$elm$);
1012
- }
1013
- // done moving nodes around
1014
- // allow the disconnect callback to work again
1015
- plt.$flags$ &= ~1 /* isTmpDisconnected */;
1016
- // always reset
1017
- relocateNodes.length = 0;
1018
- }
1019
- };
1020
- const getElement = (ref) => (getHostRef(ref).$hostElement$ );
1021
- const createEvent = (ref, name, flags) => {
1022
- const elm = getElement(ref);
1023
- return {
1024
- emit: (detail) => {
1025
- return emitEvent(elm, name, {
1026
- bubbles: !!(flags & 4 /* Bubbles */),
1027
- composed: !!(flags & 2 /* Composed */),
1028
- cancelable: !!(flags & 1 /* Cancellable */),
1029
- detail,
1030
- });
1031
- },
1032
- };
1033
- };
1034
- const emitEvent = (elm, name, opts) => {
1035
- const ev = plt.ce(name, opts);
1036
- elm.dispatchEvent(ev);
1037
- return ev;
1038
- };
1039
- const attachToAncestor = (hostRef, ancestorComponent) => {
1040
- if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
1041
- ancestorComponent['s-p'].push(new Promise(r => (hostRef.$onRenderResolve$ = r)));
1042
- }
1043
- };
1044
- const scheduleUpdate = (hostRef, isInitialLoad) => {
1045
- {
1046
- hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
1047
- }
1048
- if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {
1049
- hostRef.$flags$ |= 512 /* needsRerender */;
1050
- return;
1051
- }
1052
- attachToAncestor(hostRef, hostRef.$ancestorComponent$);
1053
- // there is no ancestor component or the ancestor component
1054
- // has already fired off its lifecycle update then
1055
- // fire off the initial update
1056
- const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
1057
- return writeTask(dispatch) ;
1058
- };
1059
- const dispatchHooks = (hostRef, isInitialLoad) => {
1060
- const endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$);
1061
- const instance = hostRef.$lazyInstance$ ;
1062
- let promise;
1063
- if (isInitialLoad) {
1064
- {
1065
- hostRef.$flags$ |= 256 /* isListenReady */;
1066
- if (hostRef.$queuedListeners$) {
1067
- hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
1068
- hostRef.$queuedListeners$ = null;
1069
- }
1070
- }
1071
- {
1072
- promise = safeCall(instance, 'componentWillLoad');
1073
- }
1074
- }
1075
- endSchedule();
1076
- return then(promise, () => updateComponent(hostRef, instance, isInitialLoad));
1077
- };
1078
- const updateComponent = async (hostRef, instance, isInitialLoad) => {
1079
- // updateComponent
1080
- const elm = hostRef.$hostElement$;
1081
- const endUpdate = createTime('update', hostRef.$cmpMeta$.$tagName$);
1082
- const rc = elm['s-rc'];
1083
- if (isInitialLoad) {
1084
- // DOM WRITE!
1085
- attachStyles(hostRef);
1086
- }
1087
- const endRender = createTime('render', hostRef.$cmpMeta$.$tagName$);
1088
- {
1089
- callRender(hostRef, instance);
1090
- }
1091
- if (rc) {
1092
- // ok, so turns out there are some child host elements
1093
- // waiting on this parent element to load
1094
- // let's fire off all update callbacks waiting
1095
- rc.map(cb => cb());
1096
- elm['s-rc'] = undefined;
1097
- }
1098
- endRender();
1099
- endUpdate();
1100
- {
1101
- const childrenPromises = elm['s-p'];
1102
- const postUpdate = () => postUpdateComponent(hostRef);
1103
- if (childrenPromises.length === 0) {
1104
- postUpdate();
1105
- }
1106
- else {
1107
- Promise.all(childrenPromises).then(postUpdate);
1108
- hostRef.$flags$ |= 4 /* isWaitingForChildren */;
1109
- childrenPromises.length = 0;
1110
- }
1111
- }
1112
- };
1113
- const callRender = (hostRef, instance, elm) => {
1114
- try {
1115
- renderingRef = instance;
1116
- instance = instance.render && instance.render();
1117
- {
1118
- hostRef.$flags$ &= ~16 /* isQueuedForUpdate */;
1119
- }
1120
- {
1121
- hostRef.$flags$ |= 2 /* hasRendered */;
1122
- }
1123
- {
1124
- {
1125
- // looks like we've got child nodes to render into this host element
1126
- // or we need to update the css class/attrs on the host element
1127
- // DOM WRITE!
1128
- {
1129
- renderVdom(hostRef, instance);
1130
- }
1131
- }
1132
- }
1133
- }
1134
- catch (e) {
1135
- consoleError(e, hostRef.$hostElement$);
1136
- }
1137
- renderingRef = null;
1138
- return null;
1139
- };
1140
- const getRenderingRef = () => renderingRef;
1141
- const postUpdateComponent = (hostRef) => {
1142
- const tagName = hostRef.$cmpMeta$.$tagName$;
1143
- const elm = hostRef.$hostElement$;
1144
- const endPostUpdate = createTime('postUpdate', tagName);
1145
- const instance = hostRef.$lazyInstance$ ;
1146
- const ancestorComponent = hostRef.$ancestorComponent$;
1147
- {
1148
- safeCall(instance, 'componentDidRender');
1149
- }
1150
- if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
1151
- hostRef.$flags$ |= 64 /* hasLoadedComponent */;
1152
- {
1153
- // DOM WRITE!
1154
- addHydratedFlag(elm);
1155
- }
1156
- {
1157
- safeCall(instance, 'componentDidLoad');
1158
- }
1159
- endPostUpdate();
1160
- {
1161
- hostRef.$onReadyResolve$(elm);
1162
- if (!ancestorComponent) {
1163
- appDidLoad();
1164
- }
1165
- }
1166
- }
1167
- else {
1168
- {
1169
- safeCall(instance, 'componentDidUpdate');
1170
- }
1171
- endPostUpdate();
1172
- }
1173
- // load events fire from bottom to top
1174
- // the deepest elements load first then bubbles up
1175
- {
1176
- if (hostRef.$onRenderResolve$) {
1177
- hostRef.$onRenderResolve$();
1178
- hostRef.$onRenderResolve$ = undefined;
1179
- }
1180
- if (hostRef.$flags$ & 512 /* needsRerender */) {
1181
- nextTick(() => scheduleUpdate(hostRef, false));
1182
- }
1183
- hostRef.$flags$ &= ~(4 /* isWaitingForChildren */ | 512 /* needsRerender */);
1184
- }
1185
- // ( •_•)
1186
- // ( •_•)>⌐■-■
1187
- // (⌐■_■)
1188
- };
1189
- const forceUpdate = (ref) => {
1190
- {
1191
- const hostRef = getHostRef(ref);
1192
- const isConnected = hostRef.$hostElement$.isConnected;
1193
- if (isConnected && (hostRef.$flags$ & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
1194
- scheduleUpdate(hostRef, false);
1195
- }
1196
- // Returns "true" when the forced update was successfully scheduled
1197
- return isConnected;
1198
- }
1199
- };
1200
- const appDidLoad = (who) => {
1201
- // on appload
1202
- // we have finish the first big initial render
1203
- {
1204
- addHydratedFlag(doc.documentElement);
1205
- }
1206
- nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
1207
- };
1208
- const safeCall = (instance, method, arg) => {
1209
- if (instance && instance[method]) {
1210
- try {
1211
- return instance[method](arg);
1212
- }
1213
- catch (e) {
1214
- consoleError(e);
1215
- }
1216
- }
1217
- return undefined;
1218
- };
1219
- const then = (promise, thenFn) => {
1220
- return promise && promise.then ? promise.then(thenFn) : thenFn();
1221
- };
1222
- const addHydratedFlag = (elm) => (elm.classList.add('hydrated') );
1223
- const parsePropertyValue = (propValue, propType) => {
1224
- // ensure this value is of the correct prop type
1225
- if (propValue != null && !isComplexType(propValue)) {
1226
- if (propType & 4 /* Boolean */) {
1227
- // per the HTML spec, any string value means it is a boolean true value
1228
- // but we'll cheat here and say that the string "false" is the boolean false
1229
- return propValue === 'false' ? false : propValue === '' || !!propValue;
1230
- }
1231
- if (propType & 2 /* Number */) {
1232
- // force it to be a number
1233
- return parseFloat(propValue);
1234
- }
1235
- if (propType & 1 /* String */) {
1236
- // could have been passed as a number or boolean
1237
- // but we still want it as a string
1238
- return String(propValue);
1239
- }
1240
- // redundant return here for better minification
1241
- return propValue;
1242
- }
1243
- // not sure exactly what type we want
1244
- // so no need to change to a different type
1245
- return propValue;
1246
- };
1247
- const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
1248
- const setValue = (ref, propName, newVal, cmpMeta) => {
1249
- // check our new property value against our internal value
1250
- const hostRef = getHostRef(ref);
1251
- const elm = hostRef.$hostElement$ ;
1252
- const oldVal = hostRef.$instanceValues$.get(propName);
1253
- const flags = hostRef.$flags$;
1254
- const instance = hostRef.$lazyInstance$ ;
1255
- newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
1256
- if ((!(flags & 8 /* isConstructingInstance */) || oldVal === undefined) && newVal !== oldVal) {
1257
- // gadzooks! the property's value has changed!!
1258
- // set our new value!
1259
- hostRef.$instanceValues$.set(propName, newVal);
1260
- if (instance) {
1261
- // get an array of method names of watch functions to call
1262
- if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
1263
- const watchMethods = cmpMeta.$watchers$[propName];
1264
- if (watchMethods) {
1265
- // this instance is watching for when this property changed
1266
- watchMethods.map(watchMethodName => {
1267
- try {
1268
- // fire off each of the watch methods that are watching this property
1269
- instance[watchMethodName](newVal, oldVal, propName);
1270
- }
1271
- catch (e) {
1272
- consoleError(e, elm);
1273
- }
1274
- });
1275
- }
1276
- }
1277
- if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
1278
- // looks like this value actually changed, so we've got work to do!
1279
- // but only if we've already rendered, otherwise just chill out
1280
- // queue that we need to do an update, but don't worry about queuing
1281
- // up millions cuz this function ensures it only runs once
1282
- scheduleUpdate(hostRef, false);
1283
- }
1284
- }
1285
- }
1286
- };
1287
- const proxyComponent = (Cstr, cmpMeta, flags) => {
1288
- if (cmpMeta.$members$) {
1289
- if (Cstr.watchers) {
1290
- cmpMeta.$watchers$ = Cstr.watchers;
1291
- }
1292
- // It's better to have a const than two Object.entries()
1293
- const members = Object.entries(cmpMeta.$members$);
1294
- const prototype = Cstr.prototype;
1295
- members.map(([memberName, [memberFlags]]) => {
1296
- if ((memberFlags & 31 /* Prop */ || ((flags & 2 /* proxyState */) && memberFlags & 32 /* State */))) {
1297
- // proxyComponent - prop
1298
- Object.defineProperty(prototype, memberName, {
1299
- get() {
1300
- // proxyComponent, get value
1301
- return getValue(this, memberName);
1302
- },
1303
- set(newValue) {
1304
- // proxyComponent, set value
1305
- setValue(this, memberName, newValue, cmpMeta);
1306
- },
1307
- configurable: true,
1308
- enumerable: true,
1309
- });
1310
- }
1311
- });
1312
- if ((flags & 1 /* isElementConstructor */)) {
1313
- const attrNameToPropName = new Map();
1314
- prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
1315
- plt.jmp(() => {
1316
- const propName = attrNameToPropName.get(attrName);
1317
- this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
1318
- });
1319
- };
1320
- // create an array of attributes to observe
1321
- // and also create a map of html attribute name to js property name
1322
- Cstr.observedAttributes = members
1323
- .filter(([_, m]) => m[0] & 15 /* HasAttribute */) // filter to only keep props that should match attributes
1324
- .map(([propName, m]) => {
1325
- const attrName = m[1] || propName;
1326
- attrNameToPropName.set(attrName, propName);
1327
- if (m[0] & 512 /* ReflectAttr */) {
1328
- cmpMeta.$attrsToReflect$.push([propName, attrName]);
1329
- }
1330
- return attrName;
1331
- });
1332
- }
1333
- }
1334
- return Cstr;
1335
- };
1336
- const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
1337
- // initializeComponent
1338
- if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
1339
- {
1340
- // we haven't initialized this element yet
1341
- hostRef.$flags$ |= 32 /* hasInitializedComponent */;
1342
- // lazy loaded components
1343
- // request the component's implementation to be
1344
- // wired up with the host element
1345
- Cstr = loadModule(cmpMeta);
1346
- if (Cstr.then) {
1347
- // Await creates a micro-task avoid if possible
1348
- const endLoad = uniqueTime();
1349
- Cstr = await Cstr;
1350
- endLoad();
1351
- }
1352
- if (!Cstr.isProxied) {
1353
- // we'eve never proxied this Constructor before
1354
- // let's add the getters/setters to its prototype before
1355
- // the first time we create an instance of the implementation
1356
- {
1357
- cmpMeta.$watchers$ = Cstr.watchers;
1358
- }
1359
- proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
1360
- Cstr.isProxied = true;
1361
- }
1362
- const endNewInstance = createTime('createInstance', cmpMeta.$tagName$);
1363
- // ok, time to construct the instance
1364
- // but let's keep track of when we start and stop
1365
- // so that the getters/setters don't incorrectly step on data
1366
- {
1367
- hostRef.$flags$ |= 8 /* isConstructingInstance */;
1368
- }
1369
- // construct the lazy-loaded component implementation
1370
- // passing the hostRef is very important during
1371
- // construction in order to directly wire together the
1372
- // host element and the lazy-loaded instance
1373
- try {
1374
- new Cstr(hostRef);
1375
- }
1376
- catch (e) {
1377
- consoleError(e);
1378
- }
1379
- {
1380
- hostRef.$flags$ &= ~8 /* isConstructingInstance */;
1381
- }
1382
- {
1383
- hostRef.$flags$ |= 128 /* isWatchReady */;
1384
- }
1385
- endNewInstance();
1386
- fireConnectedCallback(hostRef.$lazyInstance$);
1387
- }
1388
- if (Cstr.style) {
1389
- // this component has styles but we haven't registered them yet
1390
- let style = Cstr.style;
1391
- const scopeId = getScopeId(cmpMeta);
1392
- if (!styles.has(scopeId)) {
1393
- const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);
1394
- registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
1395
- endRegisterStyles();
1396
- }
1397
- }
1398
- }
1399
- // we've successfully created a lazy instance
1400
- const ancestorComponent = hostRef.$ancestorComponent$;
1401
- const schedule = () => scheduleUpdate(hostRef, true);
1402
- if (ancestorComponent && ancestorComponent['s-rc']) {
1403
- // this is the intial load and this component it has an ancestor component
1404
- // but the ancestor component has NOT fired its will update lifecycle yet
1405
- // so let's just cool our jets and wait for the ancestor to continue first
1406
- // this will get fired off when the ancestor component
1407
- // finally gets around to rendering its lazy self
1408
- // fire off the initial update
1409
- ancestorComponent['s-rc'].push(schedule);
1410
- }
1411
- else {
1412
- schedule();
1413
- }
1414
- };
1415
- const fireConnectedCallback = (instance) => {
1416
- {
1417
- safeCall(instance, 'connectedCallback');
1418
- }
1419
- };
1420
- const connectedCallback = (elm) => {
1421
- if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1422
- const hostRef = getHostRef(elm);
1423
- const cmpMeta = hostRef.$cmpMeta$;
1424
- const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);
1425
- if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
1426
- // first time this component has connected
1427
- hostRef.$flags$ |= 1 /* hasConnected */;
1428
- {
1429
- // initUpdate
1430
- // if the slot polyfill is required we'll need to put some nodes
1431
- // in here to act as original content anchors as we move nodes around
1432
- // host element has been connected to the DOM
1433
- if ((cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */))) {
1434
- setContentReference(elm);
1435
- }
1436
- }
1437
- {
1438
- // find the first ancestor component (if there is one) and register
1439
- // this component as one of the actively loading child components for its ancestor
1440
- let ancestorComponent = elm;
1441
- while ((ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host)) {
1442
- // climb up the ancestors looking for the first
1443
- // component that hasn't finished its lifecycle update yet
1444
- if (ancestorComponent['s-p']) {
1445
- // we found this components first ancestor component
1446
- // keep a reference to this component's ancestor component
1447
- attachToAncestor(hostRef, (hostRef.$ancestorComponent$ = ancestorComponent));
1448
- break;
1449
- }
1450
- }
1451
- }
1452
- // Lazy properties
1453
- // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
1454
- if (cmpMeta.$members$) {
1455
- Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
1456
- if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
1457
- const value = elm[memberName];
1458
- delete elm[memberName];
1459
- elm[memberName] = value;
1460
- }
1461
- });
1462
- }
1463
- {
1464
- initializeComponent(elm, hostRef, cmpMeta);
1465
- }
1466
- }
1467
- else {
1468
- // not the first time this has connected
1469
- // reattach any event listeners to the host
1470
- // since they would have been removed when disconnected
1471
- addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1472
- // fire off connectedCallback() on component instance
1473
- fireConnectedCallback(hostRef.$lazyInstance$);
1474
- }
1475
- endConnected();
1476
- }
1477
- };
1478
- const setContentReference = (elm) => {
1479
- // only required when we're NOT using native shadow dom (slot)
1480
- // or this browser doesn't support native shadow dom
1481
- // and this host element was NOT created with SSR
1482
- // let's pick out the inner content for slot projection
1483
- // create a node to represent where the original
1484
- // content was first placed, which is useful later on
1485
- const contentRefElm = (elm['s-cr'] = doc.createComment(''));
1486
- contentRefElm['s-cn'] = true;
1487
- elm.insertBefore(contentRefElm, elm.firstChild);
1488
- };
1489
- const disconnectedCallback = (elm) => {
1490
- if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1491
- const hostRef = getHostRef(elm);
1492
- const instance = hostRef.$lazyInstance$ ;
1493
- {
1494
- if (hostRef.$rmListeners$) {
1495
- hostRef.$rmListeners$.map(rmListener => rmListener());
1496
- hostRef.$rmListeners$ = undefined;
1497
- }
1498
- }
1499
- {
1500
- safeCall(instance, 'disconnectedCallback');
1501
- }
1502
- {
1503
- safeCall(instance, 'componentDidUnload');
1504
- }
1505
- }
1506
- };
1507
- const bootstrapLazy = (lazyBundles, options = {}) => {
1508
- const endBootstrap = createTime();
1509
- const cmpTags = [];
1510
- const exclude = options.exclude || [];
1511
- const customElements = win.customElements;
1512
- const head = doc.head;
1513
- const metaCharset = /*@__PURE__*/ head.querySelector('meta[charset]');
1514
- const visibilityStyle = /*@__PURE__*/ doc.createElement('style');
1515
- const deferredConnectedCallbacks = [];
1516
- let appLoadFallback;
1517
- let isBootstrapping = true;
1518
- Object.assign(plt, options);
1519
- plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
1520
- lazyBundles.map(lazyBundle => lazyBundle[1].map(compactMeta => {
1521
- const cmpMeta = {
1522
- $flags$: compactMeta[0],
1523
- $tagName$: compactMeta[1],
1524
- $members$: compactMeta[2],
1525
- $listeners$: compactMeta[3],
1526
- };
1527
- {
1528
- cmpMeta.$members$ = compactMeta[2];
1529
- }
1530
- {
1531
- cmpMeta.$listeners$ = compactMeta[3];
1532
- }
1533
- {
1534
- cmpMeta.$attrsToReflect$ = [];
1535
- }
1536
- {
1537
- cmpMeta.$watchers$ = {};
1538
- }
1539
- const tagName = cmpMeta.$tagName$;
1540
- const HostElement = class extends HTMLElement {
1541
- // StencilLazyHost
1542
- constructor(self) {
1543
- // @ts-ignore
1544
- super(self);
1545
- self = this;
1546
- registerHost(self, cmpMeta);
1547
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
1548
- // this component is using shadow dom
1549
- // and this browser supports shadow dom
1550
- // add the read-only property "shadowRoot" to the host element
1551
- // adding the shadow root build conditionals to minimize runtime
1552
- {
1553
- {
1554
- self.attachShadow({ mode: 'open' });
1555
- }
1556
- }
1557
- }
1558
- }
1559
- connectedCallback() {
1560
- if (appLoadFallback) {
1561
- clearTimeout(appLoadFallback);
1562
- appLoadFallback = null;
1563
- }
1564
- if (isBootstrapping) {
1565
- // connectedCallback will be processed once all components have been registered
1566
- deferredConnectedCallbacks.push(this);
1567
- }
1568
- else {
1569
- plt.jmp(() => connectedCallback(this));
1570
- }
1571
- }
1572
- disconnectedCallback() {
1573
- plt.jmp(() => disconnectedCallback(this));
1574
- }
1575
- componentOnReady() {
1576
- return getHostRef(this).$onReadyPromise$;
1577
- }
1578
- };
1579
- cmpMeta.$lazyBundleId$ = lazyBundle[0];
1580
- if (!exclude.includes(tagName) && !customElements.get(tagName)) {
1581
- cmpTags.push(tagName);
1582
- customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */));
1583
- }
1584
- }));
1585
- {
1586
- visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
1587
- visibilityStyle.setAttribute('data-styles', '');
1588
- head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
1589
- }
1590
- // Process deferred connectedCallbacks now all components have been registered
1591
- isBootstrapping = false;
1592
- if (deferredConnectedCallbacks.length) {
1593
- deferredConnectedCallbacks.map(host => host.connectedCallback());
1594
- }
1595
- else {
1596
- {
1597
- plt.jmp(() => (appLoadFallback = setTimeout(appDidLoad, 30)));
1598
- }
1599
- }
1600
- // Fallback appLoad event
1601
- endBootstrap();
1602
- };
1603
- const getAssetPath = (path) => {
1604
- const assetUrl = new URL(path, plt.$resourcesUrl$);
1605
- return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
1606
- };
1607
- const getContext = (_elm, context) => {
1608
- if (context in Context) {
1609
- return Context[context];
1610
- }
1611
- else if (context === 'window') {
1612
- return win;
1613
- }
1614
- else if (context === 'document') {
1615
- return doc;
1616
- }
1617
- else if (context === 'isServer' || context === 'isPrerender') {
1618
- return false;
1619
- }
1620
- else if (context === 'isClient') {
1621
- return true;
1622
- }
1623
- else if (context === 'resourcesUrl' || context === 'publicPath') {
1624
- return getAssetPath('.');
1625
- }
1626
- else if (context === 'queue') {
1627
- return {
1628
- write: writeTask,
1629
- read: readTask,
1630
- tick: {
1631
- then(cb) {
1632
- return nextTick(cb);
1633
- },
1634
- },
1635
- };
1636
- }
1637
- return undefined;
1638
- };
1639
- const hostRefs = new WeakMap();
1640
- const getHostRef = (ref) => hostRefs.get(ref);
1641
- const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
1642
- const registerHost = (elm, cmpMeta) => {
1643
- const hostRef = {
1644
- $flags$: 0,
1645
- $hostElement$: elm,
1646
- $cmpMeta$: cmpMeta,
1647
- $instanceValues$: new Map(),
1648
- };
1649
- {
1650
- hostRef.$onReadyPromise$ = new Promise(r => (hostRef.$onReadyResolve$ = r));
1651
- elm['s-p'] = [];
1652
- elm['s-rc'] = [];
1653
- }
1654
- addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1655
- return hostRefs.set(elm, hostRef);
1656
- };
1657
- const isMemberInElement = (elm, memberName) => memberName in elm;
1658
- const consoleError = (e, el) => (0, console.error)(e, el);
1659
- const cmpModules = /*@__PURE__*/ new Map();
1660
- const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
1661
- // loadModuleImport
1662
- const exportName = cmpMeta.$tagName$.replace(/-/g, '_');
1663
- const bundleId = cmpMeta.$lazyBundleId$;
1664
- const module = cmpModules.get(bundleId) ;
1665
- if (module) {
1666
- return module[exportName];
1667
- }
1668
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1669
- /* webpackInclude: /\.entry\.js$/ */
1670
- /* webpackExclude: /\.system\.entry\.js$/ */
1671
- /* webpackMode: "lazy" */
1672
- `./${bundleId}.entry.js${''}`)); }).then(importedModule => {
1673
- {
1674
- cmpModules.set(bundleId, importedModule);
1675
- }
1676
- return importedModule[exportName];
1677
- }, consoleError);
1678
- };
1679
- const styles = new Map();
1680
- const queueDomReads = [];
1681
- const queueDomWrites = [];
1682
- const queueTask = (queue, write) => (cb) => {
1683
- queue.push(cb);
1684
- if (!queuePending) {
1685
- queuePending = true;
1686
- if (write && plt.$flags$ & 4 /* queueSync */) {
1687
- nextTick(flush);
1688
- }
1689
- else {
1690
- plt.raf(flush);
1691
- }
1692
- }
1693
- };
1694
- const consume = (queue) => {
1695
- for (let i = 0; i < queue.length; i++) {
1696
- try {
1697
- queue[i](performance.now());
1698
- }
1699
- catch (e) {
1700
- consoleError(e);
1701
- }
1702
- }
1703
- queue.length = 0;
1704
- };
1705
- const flush = () => {
1706
- // always force a bunch of medium callbacks to run, but still have
1707
- // a throttle on how many can run in a certain time
1708
- // DOM READS!!!
1709
- consume(queueDomReads);
1710
- // DOM WRITES!!!
1711
- {
1712
- consume(queueDomWrites);
1713
- if ((queuePending = queueDomReads.length > 0)) {
1714
- // still more to do yet, but we've run out of time
1715
- // let's let this thing cool off and try again in the next tick
1716
- plt.raf(flush);
1717
- }
1718
- }
1719
- };
1720
- const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
1721
- const readTask = /*@__PURE__*/ queueTask(queueDomReads, false);
1722
- const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
1723
-
1724
- exports.Host = Host;
1725
- exports.bootstrapLazy = bootstrapLazy;
1726
- exports.createEvent = createEvent;
1727
- exports.forceUpdate = forceUpdate;
1728
- exports.getAssetPath = getAssetPath;
1729
- exports.getContext = getContext;
1730
- exports.getElement = getElement;
1731
- exports.getRenderingRef = getRenderingRef;
1732
- exports.h = h;
1733
- exports.promiseResolve = promiseResolve;
1734
- exports.registerInstance = registerInstance;