@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,994 +0,0 @@
1
- 'use strict';
2
-
3
- // -------------------------------------------------------------------------------------
4
- /**
5
- * @since 2.0.0
6
- */
7
- function identity(a) {
8
- return a;
9
- }
10
- /**
11
- * @since 2.0.0
12
- */
13
- function constant(a) {
14
- return function () { return a; };
15
- }
16
- /**
17
- * A thunk that returns always `null`.
18
- *
19
- * @since 2.0.0
20
- */
21
- var constNull =
22
- /*#__PURE__*/
23
- constant(null);
24
- /**
25
- * A thunk that returns always `undefined`.
26
- *
27
- * @since 2.0.0
28
- */
29
- var constUndefined =
30
- /*#__PURE__*/
31
- constant(undefined);
32
- function pipe(a, ab, bc, cd, de, ef, fg, gh, hi, ij, jk, kl, lm, mn, no, op, pq, qr, rs, st) {
33
- switch (arguments.length) {
34
- case 1:
35
- return a;
36
- case 2:
37
- return ab(a);
38
- case 3:
39
- return bc(ab(a));
40
- case 4:
41
- return cd(bc(ab(a)));
42
- case 5:
43
- return de(cd(bc(ab(a))));
44
- case 6:
45
- return ef(de(cd(bc(ab(a)))));
46
- case 7:
47
- return fg(ef(de(cd(bc(ab(a))))));
48
- case 8:
49
- return gh(fg(ef(de(cd(bc(ab(a)))))));
50
- case 9:
51
- return hi(gh(fg(ef(de(cd(bc(ab(a))))))));
52
- case 10:
53
- return ij(hi(gh(fg(ef(de(cd(bc(ab(a)))))))));
54
- case 11:
55
- return jk(ij(hi(gh(fg(ef(de(cd(bc(ab(a))))))))));
56
- case 12:
57
- return kl(jk(ij(hi(gh(fg(ef(de(cd(bc(ab(a)))))))))));
58
- case 13:
59
- return lm(kl(jk(ij(hi(gh(fg(ef(de(cd(bc(ab(a))))))))))));
60
- case 14:
61
- return mn(lm(kl(jk(ij(hi(gh(fg(ef(de(cd(bc(ab(a)))))))))))));
62
- case 15:
63
- return no(mn(lm(kl(jk(ij(hi(gh(fg(ef(de(cd(bc(ab(a))))))))))))));
64
- case 16:
65
- return op(no(mn(lm(kl(jk(ij(hi(gh(fg(ef(de(cd(bc(ab(a)))))))))))))));
66
- case 17:
67
- return pq(op(no(mn(lm(kl(jk(ij(hi(gh(fg(ef(de(cd(bc(ab(a))))))))))))))));
68
- case 18:
69
- return qr(pq(op(no(mn(lm(kl(jk(ij(hi(gh(fg(ef(de(cd(bc(ab(a)))))))))))))))));
70
- case 19:
71
- return rs(qr(pq(op(no(mn(lm(kl(jk(ij(hi(gh(fg(ef(de(cd(bc(ab(a))))))))))))))))));
72
- case 20:
73
- return st(rs(qr(pq(op(no(mn(lm(kl(jk(ij(hi(gh(fg(ef(de(cd(bc(ab(a)))))))))))))))))));
74
- }
75
- return;
76
- }
77
-
78
- // -------------------------------------------------------------------------------------
79
- // Option
80
- // -------------------------------------------------------------------------------------
81
- /** @internal */
82
- var isSome$1 = function (fa) { return fa._tag === 'Some'; };
83
-
84
- // -------------------------------------------------------------------------------------
85
- // guards
86
- // -------------------------------------------------------------------------------------
87
- /**
88
- * Returns `true` if the option is an instance of `Some`, `false` otherwise.
89
- *
90
- * @example
91
- * import { some, none, isSome } from 'fp-ts/Option'
92
- *
93
- * assert.strictEqual(isSome(some(1)), true)
94
- * assert.strictEqual(isSome(none), false)
95
- *
96
- * @category guards
97
- * @since 2.0.0
98
- */
99
- var isSome = isSome$1;
100
- /**
101
- * Returns `true` if the option is `None`, `false` otherwise.
102
- *
103
- * @example
104
- * import { some, none, isNone } from 'fp-ts/Option'
105
- *
106
- * assert.strictEqual(isNone(some(1)), false)
107
- * assert.strictEqual(isNone(none), true)
108
- *
109
- * @category guards
110
- * @since 2.0.0
111
- */
112
- var isNone = function (fa) { return fa._tag === 'None'; };
113
- // -------------------------------------------------------------------------------------
114
- // constructors
115
- // -------------------------------------------------------------------------------------
116
- /**
117
- * `None` doesn't have a constructor, instead you can use it directly as a value. Represents a missing value.
118
- *
119
- * @category constructors
120
- * @since 2.0.0
121
- */
122
- var none = { _tag: 'None' };
123
- /**
124
- * Constructs a `Some`. Represents an optional value that exists.
125
- *
126
- * @category constructors
127
- * @since 2.0.0
128
- */
129
- var some = function (a) { return ({ _tag: 'Some', value: a }); };
130
- // -------------------------------------------------------------------------------------
131
- // destructors
132
- // -------------------------------------------------------------------------------------
133
- /**
134
- * Less strict version of [`match`](#match).
135
- *
136
- * @category destructors
137
- * @since 2.10.0
138
- */
139
- var matchW = function (onNone, onSome) { return function (ma) {
140
- return isNone(ma) ? onNone() : onSome(ma.value);
141
- }; };
142
- /**
143
- * Takes a (lazy) default value, a function, and an `Option` value, if the `Option` value is `None` the default value is
144
- * returned, otherwise the function is applied to the value inside the `Some` and the result is returned.
145
- *
146
- * @example
147
- * import { some, none, match } from 'fp-ts/Option'
148
- * import { pipe } from 'fp-ts/function'
149
- *
150
- * assert.strictEqual(
151
- * pipe(
152
- * some(1),
153
- * match(() => 'a none', a => `a some containing ${a}`)
154
- * ),
155
- * 'a some containing 1'
156
- * )
157
- *
158
- * assert.strictEqual(
159
- * pipe(
160
- * none,
161
- * match(() => 'a none', a => `a some containing ${a}`)
162
- * ),
163
- * 'a none'
164
- * )
165
- *
166
- * @category destructors
167
- * @since 2.10.0
168
- */
169
- var match = matchW;
170
- /**
171
- * Alias of [`match`](#match).
172
- *
173
- * @category destructors
174
- * @since 2.0.0
175
- */
176
- var fold = match;
177
- /**
178
- * Less strict version of [`getOrElse`](#getOrElse).
179
- *
180
- * @category destructors
181
- * @since 2.6.0
182
- */
183
- var getOrElseW = function (onNone) { return function (ma) { return (isNone(ma) ? onNone() : ma.value); }; };
184
- /**
185
- * Extracts the value out of the structure, if it exists. Otherwise returns the given default value
186
- *
187
- * @example
188
- * import { some, none, getOrElse } from 'fp-ts/Option'
189
- * import { pipe } from 'fp-ts/function'
190
- *
191
- * assert.strictEqual(
192
- * pipe(
193
- * some(1),
194
- * getOrElse(() => 0)
195
- * ),
196
- * 1
197
- * )
198
- * assert.strictEqual(
199
- * pipe(
200
- * none,
201
- * getOrElse(() => 0)
202
- * ),
203
- * 0
204
- * )
205
- *
206
- * @category destructors
207
- * @since 2.0.0
208
- */
209
- var getOrElse = getOrElseW;
210
- // -------------------------------------------------------------------------------------
211
- // interop
212
- // -------------------------------------------------------------------------------------
213
- /**
214
- * Constructs a new `Option` from a nullable type. If the value is `null` or `undefined`, returns `None`, otherwise
215
- * returns the value wrapped in a `Some`.
216
- *
217
- * @example
218
- * import { none, some, fromNullable } from 'fp-ts/Option'
219
- *
220
- * assert.deepStrictEqual(fromNullable(undefined), none)
221
- * assert.deepStrictEqual(fromNullable(null), none)
222
- * assert.deepStrictEqual(fromNullable(1), some(1))
223
- *
224
- * @category interop
225
- * @since 2.0.0
226
- */
227
- var fromNullable = function (a) { return (a == null ? none : some(a)); };
228
- /**
229
- * Extracts the value out of the structure, if it exists. Otherwise returns `null`.
230
- *
231
- * @example
232
- * import { some, none, toNullable } from 'fp-ts/Option'
233
- * import { pipe } from 'fp-ts/function'
234
- *
235
- * assert.strictEqual(
236
- * pipe(
237
- * some(1),
238
- * toNullable
239
- * ),
240
- * 1
241
- * )
242
- * assert.strictEqual(
243
- * pipe(
244
- * none,
245
- * toNullable
246
- * ),
247
- * null
248
- * )
249
- *
250
- * @category interop
251
- * @since 2.0.0
252
- */
253
- var toNullable =
254
- /*#__PURE__*/
255
- match(constNull, identity);
256
- /**
257
- * Extracts the value out of the structure, if it exists. Otherwise returns `undefined`.
258
- *
259
- * @example
260
- * import { some, none, toUndefined } from 'fp-ts/Option'
261
- * import { pipe } from 'fp-ts/function'
262
- *
263
- * assert.strictEqual(
264
- * pipe(
265
- * some(1),
266
- * toUndefined
267
- * ),
268
- * 1
269
- * )
270
- * assert.strictEqual(
271
- * pipe(
272
- * none,
273
- * toUndefined
274
- * ),
275
- * undefined
276
- * )
277
- *
278
- * @category interop
279
- * @since 2.0.0
280
- */
281
- var toUndefined =
282
- /*#__PURE__*/
283
- match(constUndefined, identity);
284
- // -------------------------------------------------------------------------------------
285
- // type class members
286
- // -------------------------------------------------------------------------------------
287
- /**
288
- * `map` can be used to turn functions `(a: A) => B` into functions `(fa: F<A>) => F<B>` whose argument and return types
289
- * use the type constructor `F` to represent some computational context.
290
- *
291
- * @category Functor
292
- * @since 2.0.0
293
- */
294
- var map = function (f) { return function (fa) {
295
- return isNone(fa) ? none : some(f(fa.value));
296
- }; };
297
- /**
298
- * Composes computations in sequence, using the return value of one computation to determine the next computation.
299
- *
300
- * @category Monad
301
- * @since 2.0.0
302
- */
303
- var chain = function (f) { return function (ma) {
304
- return isNone(ma) ? none : f(ma.value);
305
- }; };
306
-
307
- var __assign$1 = (undefined && undefined.__assign) || function () {
308
- __assign$1 = Object.assign || function(t) {
309
- for (var s, i = 1, n = arguments.length; i < n; i++) {
310
- s = arguments[i];
311
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
312
- t[p] = s[p];
313
- }
314
- return t;
315
- };
316
- return __assign$1.apply(this, arguments);
317
- };
318
- var __spreadArrays$2 = (undefined && undefined.__spreadArrays) || function () {
319
- for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
320
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
321
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
322
- r[k] = a[j];
323
- return r;
324
- };
325
- var mix = function (one, two, mergeArrays) {
326
- if (mergeArrays === void 0) { mergeArrays = false; }
327
- if (!one || !two || typeof one !== "object" || typeof two !== "object")
328
- return one;
329
- var clone = __assign$1({}, one);
330
- for (var prop in two) {
331
- if (two.hasOwnProperty(prop)) {
332
- if (two[prop] instanceof Array && one[prop] instanceof Array) {
333
- clone[prop] = mergeArrays ? __spreadArrays$2(one[prop], two[prop]) : two[prop];
334
- }
335
- else if (typeof two[prop] === "object" && typeof one[prop] === "object") {
336
- clone[prop] = mix(one[prop], two[prop], mergeArrays);
337
- }
338
- else {
339
- clone[prop] = two[prop];
340
- }
341
- }
342
- }
343
- return clone;
344
- };
345
-
346
- var __spreadArrays$1 = (undefined && undefined.__spreadArrays) || function () {
347
- for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
348
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
349
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
350
- r[k] = a[j];
351
- return r;
352
- };
353
- var config = {
354
- // Default options
355
- defaults: {},
356
- // Error type
357
- errorType: null,
358
- // Polyfills
359
- polyfills: {
360
- fetch: null,
361
- FormData: null,
362
- URLSearchParams: null,
363
- performance: null,
364
- PerformanceObserver: null,
365
- AbortController: null
366
- },
367
- polyfill: function (p, _a) {
368
- var _b = _a === void 0 ? {} : _a, _c = _b.doThrow, doThrow = _c === void 0 ? true : _c, _d = _b.instance, instance = _d === void 0 ? false : _d;
369
- var args = [];
370
- for (var _i = 2; _i < arguments.length; _i++) {
371
- args[_i - 2] = arguments[_i];
372
- }
373
- var res = this.polyfills[p] ||
374
- (typeof self !== "undefined" ? self[p] : null) ||
375
- (typeof global !== "undefined" ? global[p] : null);
376
- if (doThrow && !res)
377
- throw new Error(p + " is not defined");
378
- return instance && res ? new (res.bind.apply(res, __spreadArrays$1([void 0], args)))() : res;
379
- }
380
- };
381
-
382
- var onMatch = function (entries, name, callback, _performance) {
383
- if (!entries.getEntriesByName)
384
- return false;
385
- var matches = entries.getEntriesByName(name);
386
- if (matches && matches.length > 0) {
387
- callback(matches.reverse()[0]);
388
- if (_performance.clearMeasures)
389
- _performance.clearMeasures(name);
390
- perfs.callbacks.delete(name);
391
- if (perfs.callbacks.size < 1) {
392
- perfs.observer.disconnect();
393
- if (_performance.clearResourceTimings) {
394
- _performance.clearResourceTimings();
395
- }
396
- }
397
- return true;
398
- }
399
- return false;
400
- };
401
- var lazyObserver = function (_performance, _observer) {
402
- if (!perfs.observer && _performance && _observer) {
403
- perfs.observer = new _observer(function (entries) {
404
- perfs.callbacks.forEach(function (callback, name) {
405
- onMatch(entries, name, callback, _performance);
406
- });
407
- });
408
- if (_performance.clearResourceTimings)
409
- _performance.clearResourceTimings();
410
- }
411
- return perfs.observer;
412
- };
413
- var perfs = {
414
- callbacks: new Map(),
415
- observer: null,
416
- observe: function (name, callback) {
417
- if (!name || !callback)
418
- return;
419
- var _performance = config.polyfill("performance", { doThrow: false });
420
- var _observer = config.polyfill("PerformanceObserver", { doThrow: false });
421
- if (!lazyObserver(_performance, _observer))
422
- return;
423
- if (!onMatch(_performance, name, callback, _performance)) {
424
- if (perfs.callbacks.size < 1)
425
- perfs.observer.observe({ entryTypes: ["resource", "measure"] });
426
- perfs.callbacks.set(name, callback);
427
- }
428
- }
429
- };
430
-
431
- var middlewareHelper = function (middlewares) { return function (fetchFunction) {
432
- return (middlewares.length === 0 ?
433
- fetchFunction :
434
- middlewares.length === 1 ?
435
- middlewares[0](fetchFunction) :
436
- middlewares.reduceRight(function (acc, curr, idx) {
437
- return (idx === middlewares.length - 2) ? curr(acc(fetchFunction)) : curr(acc);
438
- }));
439
- }; };
440
-
441
- var WretchErrorWrapper = /** @class */ (function () {
442
- function WretchErrorWrapper(error) {
443
- this.error = error;
444
- }
445
- return WretchErrorWrapper;
446
- }());
447
- var resolver = function (wretcher) {
448
- var url = wretcher._url, _catchers = wretcher._catchers, resolvers = wretcher._resolvers, middlewares = wretcher._middlewares, opts = wretcher._options;
449
- var catchers = new Map(_catchers);
450
- var finalOptions = mix(config.defaults, opts);
451
- var fetchController = config.polyfill("AbortController", { doThrow: false, instance: true });
452
- if (!finalOptions["signal"] && fetchController) {
453
- finalOptions["signal"] = fetchController.signal;
454
- }
455
- // Request timeout
456
- var timeout = {
457
- ref: null,
458
- clear: function () {
459
- if (timeout.ref) {
460
- clearTimeout(timeout.ref);
461
- timeout.ref = null;
462
- }
463
- }
464
- };
465
- // The generated fetch request
466
- var fetchRequest = middlewareHelper(middlewares)(config.polyfill("fetch"))(url, finalOptions);
467
- // Throws on an http error
468
- var throwingPromise = fetchRequest
469
- .catch(function (error) {
470
- throw new WretchErrorWrapper(error);
471
- })
472
- .then(function (response) {
473
- timeout.clear();
474
- if (!response.ok) {
475
- return response[config.errorType || "text"]().then(function (msg) {
476
- // Enhances the error object
477
- var err = new Error(msg);
478
- err[config.errorType || "text"] = msg;
479
- err["status"] = response.status;
480
- err["response"] = response;
481
- throw err;
482
- });
483
- }
484
- return response;
485
- });
486
- // Wraps the Promise in order to dispatch the error to a matching catcher
487
- var catchersWrapper = function (promise) {
488
- return promise.catch(function (err) {
489
- timeout.clear();
490
- var error = err instanceof WretchErrorWrapper ? err.error : err;
491
- if (err instanceof WretchErrorWrapper && catchers.has("__fromFetch"))
492
- return catchers.get("__fromFetch")(error, wretcher);
493
- else if (catchers.has(error.status))
494
- return catchers.get(error.status)(error, wretcher);
495
- else if (catchers.has(error.name))
496
- return catchers.get(error.name)(error, wretcher);
497
- else
498
- throw error;
499
- });
500
- };
501
- var bodyParser = function (funName) { return function (cb) { return funName ?
502
- // If a callback is provided, then callback with the body result otherwise return the parsed body itself.
503
- catchersWrapper(throwingPromise.then(function (_) { return _ && _[funName](); }).then(function (_) { return cb ? cb(_) : _; })) :
504
- // No body parsing method - return the response
505
- catchersWrapper(throwingPromise.then(function (_) { return cb ? cb(_) : _; })); }; };
506
- var responseChain = {
507
- /**
508
- * Retrieves the raw result as a promise.
509
- */
510
- res: bodyParser(null),
511
- /**
512
- * Retrieves the result as a parsed JSON object.
513
- */
514
- json: bodyParser("json"),
515
- /**
516
- * Retrieves the result as a Blob object.
517
- */
518
- blob: bodyParser("blob"),
519
- /**
520
- * Retrieves the result as a FormData object.
521
- */
522
- formData: bodyParser("formData"),
523
- /**
524
- * Retrieves the result as an ArrayBuffer object.
525
- */
526
- arrayBuffer: bodyParser("arrayBuffer"),
527
- /**
528
- * Retrieves the result as a string.
529
- */
530
- text: bodyParser("text"),
531
- /**
532
- * Performs a callback on the API performance timings of the request.
533
- *
534
- * Warning: Still experimental on browsers and node.js
535
- */
536
- perfs: function (cb) {
537
- fetchRequest.then(function (res) { return perfs.observe(res.url, cb); });
538
- return responseChain;
539
- },
540
- /**
541
- * Aborts the request after a fixed time.
542
- *
543
- * @param time Time in milliseconds
544
- * @param controller A custom controller
545
- */
546
- setTimeout: function (time, controller) {
547
- if (controller === void 0) { controller = fetchController; }
548
- timeout.clear();
549
- timeout.ref = setTimeout(function () { return controller.abort(); }, time);
550
- return responseChain;
551
- },
552
- /**
553
- * Returns the automatically generated AbortController alongside the current wretch response as a pair.
554
- */
555
- controller: function () { return [fetchController, responseChain]; },
556
- /**
557
- * Catches an http response with a specific error code or name and performs a callback.
558
- */
559
- error: function (errorId, cb) {
560
- catchers.set(errorId, cb);
561
- return responseChain;
562
- },
563
- /**
564
- * Catches a bad request (http code 400) and performs a callback.
565
- */
566
- badRequest: function (cb) { return responseChain.error(400, cb); },
567
- /**
568
- * Catches an unauthorized request (http code 401) and performs a callback.
569
- */
570
- unauthorized: function (cb) { return responseChain.error(401, cb); },
571
- /**
572
- * Catches a forbidden request (http code 403) and performs a callback.
573
- */
574
- forbidden: function (cb) { return responseChain.error(403, cb); },
575
- /**
576
- * Catches a "not found" request (http code 404) and performs a callback.
577
- */
578
- notFound: function (cb) { return responseChain.error(404, cb); },
579
- /**
580
- * Catches a timeout (http code 408) and performs a callback.
581
- */
582
- timeout: function (cb) { return responseChain.error(408, cb); },
583
- /**
584
- * Catches an internal server error (http code 500) and performs a callback.
585
- */
586
- internalError: function (cb) { return responseChain.error(500, cb); },
587
- /**
588
- * Catches errors thrown when calling the fetch function and performs a callback.
589
- */
590
- fetchError: function (cb) { return responseChain.error("__fromFetch", cb); },
591
- /**
592
- * Catches an AbortError and performs a callback.
593
- */
594
- onAbort: function (cb) { return responseChain.error("AbortError", cb); }
595
- };
596
- return resolvers.reduce(function (chain, r) { return r(chain, wretcher); }, responseChain);
597
- };
598
-
599
- var __assign = (undefined && undefined.__assign) || function () {
600
- __assign = Object.assign || function(t) {
601
- for (var s, i = 1, n = arguments.length; i < n; i++) {
602
- s = arguments[i];
603
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
604
- t[p] = s[p];
605
- }
606
- return t;
607
- };
608
- return __assign.apply(this, arguments);
609
- };
610
- var __spreadArrays = (undefined && undefined.__spreadArrays) || function () {
611
- for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
612
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
613
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
614
- r[k] = a[j];
615
- return r;
616
- };
617
- var JSON_MIME = "application/json";
618
- var CONTENT_TYPE_HEADER = "Content-Type";
619
- /**
620
- * The Wretcher class used to perform easy fetch requests.
621
- *
622
- * Immutability : almost every method of this class return a fresh Wretcher object.
623
- */
624
- var Wretcher = /** @class */ (function () {
625
- function Wretcher(_url, _options, _catchers, _resolvers, _middlewares, _deferredChain) {
626
- if (_catchers === void 0) { _catchers = new Map(); }
627
- if (_resolvers === void 0) { _resolvers = []; }
628
- if (_middlewares === void 0) { _middlewares = []; }
629
- if (_deferredChain === void 0) { _deferredChain = []; }
630
- this._url = _url;
631
- this._options = _options;
632
- this._catchers = _catchers;
633
- this._resolvers = _resolvers;
634
- this._middlewares = _middlewares;
635
- this._deferredChain = _deferredChain;
636
- }
637
- Wretcher.factory = function (url, options) {
638
- if (url === void 0) { url = ""; }
639
- if (options === void 0) { options = {}; }
640
- return new Wretcher(url, options);
641
- };
642
- Wretcher.prototype.selfFactory = function (_a) {
643
- var _b = _a === void 0 ? {} : _a, _c = _b.url, url = _c === void 0 ? this._url : _c, _d = _b.options, options = _d === void 0 ? this._options : _d, _e = _b.catchers, catchers = _e === void 0 ? this._catchers : _e, _f = _b.resolvers, resolvers = _f === void 0 ? this._resolvers : _f, _g = _b.middlewares, middlewares = _g === void 0 ? this._middlewares : _g, _h = _b.deferredChain, deferredChain = _h === void 0 ? this._deferredChain : _h;
644
- return new Wretcher(url, __assign({}, options), new Map(catchers), __spreadArrays(resolvers), __spreadArrays(middlewares), __spreadArrays(deferredChain));
645
- };
646
- /**
647
- * Sets the default fetch options used for every subsequent fetch call.
648
- * @param options New default options
649
- * @param mixin If true, mixes in instead of replacing the existing options
650
- */
651
- Wretcher.prototype.defaults = function (options, mixin) {
652
- if (mixin === void 0) { mixin = false; }
653
- config.defaults = mixin ? mix(config.defaults, options) : options;
654
- return this;
655
- };
656
- /**
657
- * Sets the method (text, json ...) used to parse the data contained in the response body in case of an HTTP error.
658
- *
659
- * Persists for every subsequent requests.
660
- *
661
- * Default is "text".
662
- */
663
- Wretcher.prototype.errorType = function (method) {
664
- config.errorType = method;
665
- return this;
666
- };
667
- /**
668
- * Sets the non-global polyfills which will be used for every subsequent calls.
669
- *
670
- * Needed for libraries like [fetch-ponyfill](https://github.com/qubyte/fetch-ponyfill).
671
- *
672
- * @param polyfills An object containing the polyfills.
673
- */
674
- Wretcher.prototype.polyfills = function (polyfills) {
675
- config.polyfills = __assign(__assign({}, config.polyfills), polyfills);
676
- return this;
677
- };
678
- /**
679
- * Returns a new Wretcher object with the argument url appended and the same options.
680
- * @param url String url
681
- * @param replace Boolean If true, replaces the current url instead of appending
682
- */
683
- Wretcher.prototype.url = function (url, replace) {
684
- if (replace === void 0) { replace = false; }
685
- if (replace)
686
- return this.selfFactory({ url: url });
687
- var split = this._url.split("?");
688
- return this.selfFactory({
689
- url: split.length > 1 ?
690
- split[0] + url + "?" + split[1] :
691
- this._url + url
692
- });
693
- };
694
- /**
695
- * Returns a new Wretcher object with the same url and new options.
696
- * @param options New options
697
- * @param mixin If true, mixes in instead of replacing the existing options
698
- */
699
- Wretcher.prototype.options = function (options, mixin) {
700
- if (mixin === void 0) { mixin = true; }
701
- return this.selfFactory({ options: mixin ? mix(this._options, options) : options });
702
- };
703
- /**
704
- * Converts a javascript object to query parameters,
705
- * then appends this query string to the current url.
706
- *
707
- * If given a string, use the string as the query verbatim.
708
- *
709
- * ```
710
- * let w = wretch("http://example.com") // url is http://example.com
711
- *
712
- * // Chain query calls
713
- * w = w.query({ a: 1, b : 2 }) // url is now http://example.com?a=1&b=2
714
- * w = w.query("foo-bar-baz-woz") // url is now http://example.com?a=1&b=2&foo-bar-baz-woz
715
- *
716
- * // Pass true as the second argument to replace existing query parameters
717
- * w = w.query("c=3&d=4", true) // url is now http://example.com?c=3&d=4
718
- * ```
719
- *
720
- * @param qp An object which will be converted, or a string which will be used verbatim.
721
- */
722
- Wretcher.prototype.query = function (qp, replace) {
723
- if (replace === void 0) { replace = false; }
724
- return this.selfFactory({ url: appendQueryParams(this._url, qp, replace) });
725
- };
726
- /**
727
- * Set request headers.
728
- * @param headerValues An object containing header keys and values
729
- */
730
- Wretcher.prototype.headers = function (headerValues) {
731
- return this.selfFactory({ options: mix(this._options, { headers: headerValues || {} }) });
732
- };
733
- /**
734
- * Shortcut to set the "Accept" header.
735
- * @param headerValue Header value
736
- */
737
- Wretcher.prototype.accept = function (headerValue) {
738
- return this.headers({ Accept: headerValue });
739
- };
740
- /**
741
- * Shortcut to set the "Content-Type" header.
742
- * @param headerValue Header value
743
- */
744
- Wretcher.prototype.content = function (headerValue) {
745
- var _a;
746
- return this.headers((_a = {}, _a[CONTENT_TYPE_HEADER] = headerValue, _a));
747
- };
748
- /**
749
- * Shortcut to set the "Authorization" header.
750
- * @param headerValue Header value
751
- */
752
- Wretcher.prototype.auth = function (headerValue) {
753
- return this.headers({ Authorization: headerValue });
754
- };
755
- /**
756
- * Adds a default catcher which will be called on every subsequent request error when the error code matches.
757
- * @param errorId Error code or name
758
- * @param catcher: The catcher method
759
- */
760
- Wretcher.prototype.catcher = function (errorId, catcher) {
761
- var newMap = new Map(this._catchers);
762
- newMap.set(errorId, catcher);
763
- return this.selfFactory({ catchers: newMap });
764
- };
765
- /**
766
- * Associates a custom signal with the request.
767
- * @param controller : An AbortController
768
- */
769
- Wretcher.prototype.signal = function (controller) {
770
- return this.selfFactory({ options: __assign(__assign({}, this._options), { signal: controller.signal }) });
771
- };
772
- /**
773
- * Program a resolver to perform response chain tasks automatically.
774
- * @param doResolve : Resolver callback
775
- */
776
- Wretcher.prototype.resolve = function (doResolve, clear) {
777
- if (clear === void 0) { clear = false; }
778
- return this.selfFactory({ resolvers: clear ? [doResolve] : __spreadArrays(this._resolvers, [doResolve]) });
779
- };
780
- /**
781
- * Defer wretcher methods that will be chained and called just before the request is performed.
782
- */
783
- Wretcher.prototype.defer = function (callback, clear) {
784
- if (clear === void 0) { clear = false; }
785
- return this.selfFactory({
786
- deferredChain: clear ? [callback] : __spreadArrays(this._deferredChain, [callback])
787
- });
788
- };
789
- /**
790
- * Add middlewares to intercept a request before being sent.
791
- */
792
- Wretcher.prototype.middlewares = function (middlewares, clear) {
793
- if (clear === void 0) { clear = false; }
794
- return this.selfFactory({
795
- middlewares: clear ? middlewares : __spreadArrays(this._middlewares, middlewares)
796
- });
797
- };
798
- Wretcher.prototype.method = function (method, options, body) {
799
- if (options === void 0) { options = {}; }
800
- if (body === void 0) { body = null; }
801
- var headers = this._options.headers;
802
- var baseWretcher = !body ? this :
803
- typeof body === "object" && (!headers ||
804
- Object.entries(headers).every(function (_a) {
805
- var k = _a[0], v = _a[1];
806
- return k.toLowerCase() !== CONTENT_TYPE_HEADER.toLowerCase() ||
807
- v.startsWith(JSON_MIME);
808
- })) ? this.json(body) :
809
- this.body(body);
810
- baseWretcher = baseWretcher.options(__assign(__assign({}, options), { method: method }));
811
- var deferredWretcher = baseWretcher._deferredChain.reduce(function (acc, curr) { return curr(acc, acc._url, acc._options); }, baseWretcher);
812
- return resolver(deferredWretcher);
813
- };
814
- /**
815
- * Performs a get request.
816
- */
817
- Wretcher.prototype.get = function (options) {
818
- return this.method("GET", options);
819
- };
820
- /**
821
- * Performs a delete request.
822
- */
823
- Wretcher.prototype.delete = function (options) {
824
- return this.method("DELETE", options);
825
- };
826
- /**
827
- * Performs a put request.
828
- */
829
- Wretcher.prototype.put = function (body, options) {
830
- return this.method("PUT", options, body);
831
- };
832
- /**
833
- * Performs a post request.
834
- */
835
- Wretcher.prototype.post = function (body, options) {
836
- return this.method("POST", options, body);
837
- };
838
- /**
839
- * Performs a patch request.
840
- */
841
- Wretcher.prototype.patch = function (body, options) {
842
- return this.method("PATCH", options, body);
843
- };
844
- /**
845
- * Performs a head request.
846
- */
847
- Wretcher.prototype.head = function (options) {
848
- return this.method("HEAD", options);
849
- };
850
- /**
851
- * Performs an options request
852
- */
853
- Wretcher.prototype.opts = function (options) {
854
- return this.method("OPTIONS", options);
855
- };
856
- /**
857
- * Replay a request.
858
- */
859
- Wretcher.prototype.replay = function (options) {
860
- return this.method(this._options.method, options);
861
- };
862
- /**
863
- * Sets the request body with any content.
864
- * @param contents The body contents
865
- */
866
- Wretcher.prototype.body = function (contents) {
867
- return this.selfFactory({ options: __assign(__assign({}, this._options), { body: contents }) });
868
- };
869
- /**
870
- * Sets the content type header, stringifies an object and sets the request body.
871
- * @param jsObject An object which will be serialized into a JSON
872
- */
873
- Wretcher.prototype.json = function (jsObject) {
874
- var _a;
875
- var preservedContentType = (_a = Object.entries(this._options.headers || {}).find(function (_a) {
876
- var k = _a[0], v = _a[1];
877
- return k.toLowerCase() === CONTENT_TYPE_HEADER.toLowerCase() && v.startsWith(JSON_MIME);
878
- })) === null || _a === void 0 ? void 0 : _a[1];
879
- return this.content(preservedContentType || JSON_MIME).body(JSON.stringify(jsObject));
880
- };
881
- /**
882
- * Converts the javascript object to a FormData and sets the request body.
883
- * @param formObject An object which will be converted to a FormData
884
- * @param recursive If `true`, will recurse through all nested objects
885
- * Can be set as an array of string to exclude specific keys.
886
- * See https://github.com/elbywan/wretch/issues/68 for more details.
887
- */
888
- Wretcher.prototype.formData = function (formObject, recursive) {
889
- if (recursive === void 0) { recursive = false; }
890
- return this.body(convertFormData(formObject, recursive));
891
- };
892
- /**
893
- * Converts the input to an url encoded string and sets the content-type header and body.
894
- * If the input argument is already a string, skips the conversion part.
895
- *
896
- * @param input An object to convert into an url encoded string or an already encoded string
897
- */
898
- Wretcher.prototype.formUrl = function (input) {
899
- return this
900
- .body(typeof input === "string" ? input : convertFormUrl(input))
901
- .content("application/x-www-form-urlencoded");
902
- };
903
- return Wretcher;
904
- }());
905
- // Internal helpers
906
- var appendQueryParams = function (url, qp, replace) {
907
- var queryString;
908
- if (typeof qp === "string") {
909
- queryString = qp;
910
- }
911
- else {
912
- var usp = config.polyfill("URLSearchParams", { instance: true });
913
- for (var key in qp) {
914
- if (qp[key] instanceof Array) {
915
- for (var _i = 0, _a = qp[key]; _i < _a.length; _i++) {
916
- var val = _a[_i];
917
- usp.append(key, val);
918
- }
919
- }
920
- else {
921
- usp.append(key, qp[key]);
922
- }
923
- }
924
- queryString = usp.toString();
925
- }
926
- var split = url.split("?");
927
- if (replace || split.length < 2)
928
- return split[0] + "?" + queryString;
929
- return url + "&" + queryString;
930
- };
931
- function convertFormData(formObject, recursive, formData, ancestors) {
932
- if (recursive === void 0) { recursive = false; }
933
- if (formData === void 0) { formData = config.polyfill("FormData", { instance: true }); }
934
- if (ancestors === void 0) { ancestors = []; }
935
- Object.entries(formObject).forEach(function (_a) {
936
- var key = _a[0], value = _a[1];
937
- var formKey = ancestors.reduce(function (acc, ancestor) { return (acc ? acc + "[" + ancestor + "]" : ancestor); }, null);
938
- formKey = formKey ? formKey + "[" + key + "]" : key;
939
- if (value instanceof Array) {
940
- for (var _i = 0, value_1 = value; _i < value_1.length; _i++) {
941
- var item = value_1[_i];
942
- formData.append(formKey + "[]", item);
943
- }
944
- }
945
- else if (recursive &&
946
- typeof value === "object" &&
947
- (!(recursive instanceof Array) ||
948
- !recursive.includes(key))) {
949
- if (value !== null) {
950
- convertFormData(value, recursive, formData, __spreadArrays(ancestors, [key]));
951
- }
952
- }
953
- else {
954
- formData.append(formKey, value);
955
- }
956
- });
957
- return formData;
958
- }
959
- function encodeQueryValue(key, value) {
960
- return encodeURIComponent(key) +
961
- "=" +
962
- encodeURIComponent(typeof value === "object" ?
963
- JSON.stringify(value) :
964
- "" + value);
965
- }
966
- function convertFormUrl(formObject) {
967
- return Object.keys(formObject)
968
- .map(function (key) {
969
- var value = formObject[key];
970
- if (value instanceof Array) {
971
- return value.map(function (v) { return encodeQueryValue(key, v); }).join("&");
972
- }
973
- return encodeQueryValue(key, value);
974
- })
975
- .join("&");
976
- }
977
-
978
- var factory = Wretcher.factory;
979
- factory["default"] = Wretcher.factory;
980
-
981
- exports.chain = chain;
982
- exports.factory = factory;
983
- exports.fold = fold;
984
- exports.fromNullable = fromNullable;
985
- exports.getOrElse = getOrElse;
986
- exports.getOrElseW = getOrElseW;
987
- exports.isNone = isNone;
988
- exports.isSome = isSome;
989
- exports.map = map;
990
- exports.none = none;
991
- exports.pipe = pipe;
992
- exports.some = some;
993
- exports.toNullable = toNullable;
994
- exports.toUndefined = toUndefined;