@progressive-development/pd-spa-helper 0.3.101 → 0.3.103

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 (380) hide show
  1. package/dist/index.js +72 -0
  2. package/dist/node_modules/@firebase/app/dist/esm/index.esm2017.js +749 -0
  3. package/dist/node_modules/@firebase/auth/dist/esm2017/index-68602d24.js +6265 -0
  4. package/dist/node_modules/@firebase/component/dist/esm/index.esm2017.js +341 -0
  5. package/dist/node_modules/@firebase/firestore/dist/index.esm2017.js +10250 -0
  6. package/dist/node_modules/@firebase/functions/dist/index.esm2017.js +513 -0
  7. package/dist/node_modules/@firebase/installations/dist/esm/index.esm2017.js +863 -0
  8. package/dist/node_modules/@firebase/logger/dist/esm/index.esm2017.js +122 -0
  9. package/dist/node_modules/@firebase/messaging/dist/esm/index.esm2017.js +1019 -0
  10. package/dist/node_modules/@firebase/storage/dist/index.esm2017.js +2042 -0
  11. package/dist/node_modules/@firebase/util/dist/index.esm2017.js +931 -0
  12. package/dist/node_modules/@firebase/webchannel-wrapper/dist/bloom-blob/esm/bloom_blob_es2018.js +417 -0
  13. package/dist/node_modules/@firebase/webchannel-wrapper/dist/webchannel-blob/esm/webchannel_blob_es2018.js +2155 -0
  14. package/dist/node_modules/@lit/reactive-element/decorators/custom-element.js +14 -0
  15. package/dist/node_modules/@lit/reactive-element/decorators/property.js +20 -0
  16. package/dist/node_modules/@lit/reactive-element/decorators/query-assigned-elements.js +7 -0
  17. package/dist/node_modules/@progressive-development/pd-dialog/pd-popup-dialog.js +5 -0
  18. package/dist/node_modules/@progressive-development/pd-dialog/pd-popup.js +2 -0
  19. package/dist/node_modules/@progressive-development/pd-dialog/src/PdPopup.js +113 -0
  20. package/dist/node_modules/@progressive-development/pd-dialog/src/PdPopupDialog.js +189 -0
  21. package/dist/node_modules/@progressive-development/pd-forms/pd-button.js +2 -0
  22. package/dist/node_modules/@progressive-development/pd-forms/pd-form-container.js +2 -0
  23. package/dist/node_modules/@progressive-development/pd-forms/pd-form-row.js +2 -0
  24. package/dist/node_modules/@progressive-development/pd-forms/pd-hover-box.js +2 -0
  25. package/dist/node_modules/@progressive-development/pd-forms/pd-input.js +2 -0
  26. package/dist/node_modules/@progressive-development/pd-forms/src/PdBaseInputElement.js +86 -0
  27. package/dist/node_modules/@progressive-development/pd-forms/src/PdBaseUi.js +34 -0
  28. package/dist/node_modules/@progressive-development/pd-forms/src/PdBaseUiInput.js +227 -0
  29. package/dist/node_modules/@progressive-development/pd-forms/src/PdButton.js +194 -0
  30. package/dist/node_modules/@progressive-development/pd-forms/src/PdFormContainer.js +167 -0
  31. package/dist/node_modules/@progressive-development/pd-forms/src/PdFormRow.js +92 -0
  32. package/dist/node_modules/@progressive-development/pd-forms/src/PdHoverBox.js +108 -0
  33. package/dist/node_modules/@progressive-development/pd-forms/src/PdInput.js +79 -0
  34. package/dist/node_modules/@progressive-development/pd-forms/src/generated/locale/be.js +11 -0
  35. package/dist/node_modules/@progressive-development/pd-forms/src/generated/locale/en.js +11 -0
  36. package/dist/node_modules/@progressive-development/pd-forms/src/shared-input-field-styles.js +152 -0
  37. package/dist/node_modules/@progressive-development/pd-forms/src/shared-input-styles.js +64 -0
  38. package/dist/node_modules/@progressive-development/pd-icon/pd-icon.js +4 -0
  39. package/dist/node_modules/@progressive-development/pd-icon/src/PdIcon.js +596 -0
  40. package/dist/node_modules/@progressive-development/pd-order/dist/locales/be.js +15 -0
  41. package/dist/node_modules/@progressive-development/pd-order/dist/locales/de.js +15 -0
  42. package/dist/node_modules/@progressive-development/pd-order/dist/locales/en.js +15 -0
  43. package/dist/node_modules/@progressive-development/pd-order/dist/node_modules/@progressive-development/pd-contact/pd-contact.js +2 -0
  44. package/dist/node_modules/@progressive-development/pd-order/dist/node_modules/@progressive-development/pd-contact/src/PdContact.js +567 -0
  45. package/dist/node_modules/@progressive-development/pd-order/dist/node_modules/@progressive-development/pd-content/pd-collapse.js +2 -0
  46. package/dist/node_modules/@progressive-development/pd-order/dist/node_modules/@progressive-development/pd-content/pd-edit-content.js +2 -0
  47. package/dist/node_modules/@progressive-development/pd-order/dist/node_modules/@progressive-development/pd-content/src/PdCollapse.js +136 -0
  48. package/dist/node_modules/@progressive-development/pd-order/dist/node_modules/@progressive-development/pd-content/src/PdEditContent.js +224 -0
  49. package/dist/node_modules/@progressive-development/pd-order/dist/node_modules/@progressive-development/pd-dialog/pd-popup.js +2 -0
  50. package/dist/node_modules/@progressive-development/pd-order/dist/node_modules/@progressive-development/pd-dialog/src/PdPopup.js +113 -0
  51. package/dist/node_modules/@progressive-development/pd-order/dist/node_modules/@progressive-development/pd-forms/pd-checkbox.js +2 -0
  52. package/dist/node_modules/@progressive-development/pd-order/dist/node_modules/@progressive-development/pd-forms/pd-form-container.js +2 -0
  53. package/dist/node_modules/@progressive-development/pd-order/dist/node_modules/@progressive-development/pd-forms/pd-form-row.js +2 -0
  54. package/dist/node_modules/@progressive-development/pd-order/dist/node_modules/@progressive-development/pd-forms/pd-hover-box.js +2 -0
  55. package/dist/node_modules/@progressive-development/pd-order/dist/node_modules/@progressive-development/pd-forms/pd-input.js +2 -0
  56. package/dist/node_modules/@progressive-development/pd-order/dist/node_modules/@progressive-development/pd-forms/pd-radio-group.js +2 -0
  57. package/dist/node_modules/@progressive-development/pd-order/dist/node_modules/@progressive-development/pd-forms/src/PdBaseInputElement.js +86 -0
  58. package/dist/node_modules/@progressive-development/pd-order/dist/node_modules/@progressive-development/pd-forms/src/PdBaseUi.js +34 -0
  59. package/dist/node_modules/@progressive-development/pd-order/dist/node_modules/@progressive-development/pd-forms/src/PdBaseUiInput.js +229 -0
  60. package/dist/node_modules/@progressive-development/pd-order/dist/node_modules/@progressive-development/pd-forms/src/PdCheckbox.js +230 -0
  61. package/dist/node_modules/@progressive-development/pd-order/dist/node_modules/@progressive-development/pd-forms/src/PdFormContainer.js +167 -0
  62. package/dist/node_modules/@progressive-development/pd-order/dist/node_modules/@progressive-development/pd-forms/src/PdFormRow.js +92 -0
  63. package/dist/node_modules/@progressive-development/pd-order/dist/node_modules/@progressive-development/pd-forms/src/PdHoverBox.js +108 -0
  64. package/dist/node_modules/@progressive-development/pd-order/dist/node_modules/@progressive-development/pd-forms/src/PdInput.js +79 -0
  65. package/dist/node_modules/@progressive-development/pd-order/dist/node_modules/@progressive-development/pd-forms/src/PdRadioGroup.js +72 -0
  66. package/dist/node_modules/@progressive-development/pd-order/dist/node_modules/@progressive-development/pd-forms/src/shared-input-field-styles.js +152 -0
  67. package/dist/node_modules/@progressive-development/pd-order/dist/node_modules/@progressive-development/pd-forms/src/shared-input-styles.js +64 -0
  68. package/dist/node_modules/@progressive-development/pd-order/dist/node_modules/@progressive-development/pd-icon/pd-icon.js +4 -0
  69. package/dist/node_modules/@progressive-development/pd-order/dist/node_modules/@progressive-development/pd-icon/src/PdIcon.js +596 -0
  70. package/dist/node_modules/@progressive-development/pd-order/dist/node_modules/@progressive-development/pd-price/pd-pricetable.js +2 -0
  71. package/dist/node_modules/@progressive-development/pd-order/dist/node_modules/@progressive-development/pd-price/src/PdPricetable.js +149 -0
  72. package/dist/node_modules/@progressive-development/pd-order/dist/node_modules/fecha/lib/fecha.js +200 -0
  73. package/dist/node_modules/@progressive-development/pd-order/dist/node_modules/lit/node_modules/lit-html/directive.js +27 -0
  74. package/dist/node_modules/@progressive-development/pd-order/dist/node_modules/lit/node_modules/lit-html/directives/class-map.js +36 -0
  75. package/dist/node_modules/@progressive-development/pd-order/dist/node_modules/lit/node_modules/lit-html/lit-html.js +242 -0
  76. package/dist/node_modules/@progressive-development/pd-order/dist/pd-order-contacts.js +2 -0
  77. package/dist/node_modules/@progressive-development/pd-order/dist/pd-order-summary.js +2 -0
  78. package/dist/node_modules/@progressive-development/pd-order/dist/src/PdOrderContacts.js +192 -0
  79. package/dist/node_modules/@progressive-development/pd-order/dist/src/PdOrderSummary.js +243 -0
  80. package/dist/node_modules/@progressive-development/pd-page/pd-footer.js +2 -0
  81. package/dist/node_modules/@progressive-development/pd-page/pd-menu.js +2 -0
  82. package/dist/node_modules/@progressive-development/pd-page/src/PdFooter.js +141 -0
  83. package/dist/node_modules/@progressive-development/pd-page/src/PdMenu.js +450 -0
  84. package/dist/node_modules/@progressive-development/pd-shared-styles/src/shared-color-styles.js +30 -0
  85. package/dist/node_modules/@progressive-development/pd-shared-styles/src/shared-font-styles.js +32 -0
  86. package/dist/node_modules/@progressive-development/pd-wizard/pd-wizard.js +2 -0
  87. package/dist/node_modules/@progressive-development/pd-wizard/src/PdSteps.js +191 -0
  88. package/dist/node_modules/@progressive-development/pd-wizard/src/PdWizard.js +280 -0
  89. package/dist/node_modules/firebase/app/dist/esm/index.esm.js +35 -0
  90. package/dist/node_modules/idb/build/index.js +81 -0
  91. package/dist/node_modules/idb/build/wrap-idb-value.js +148 -0
  92. package/dist/node_modules/lit/node_modules/lit-html/directive.js +27 -0
  93. package/dist/node_modules/lit/node_modules/lit-html/directives/class-map.js +36 -0
  94. package/dist/node_modules/lit/node_modules/lit-html/lit-html.js +242 -0
  95. package/dist/node_modules/lit-element-router/lit-element-router.js +131 -0
  96. package/dist/node_modules/lit-element-router/utility/router-utility.js +36 -0
  97. package/dist/node_modules/mini-rx-store/index.esm.js +458 -0
  98. package/dist/node_modules/pwa-helpers/media-query.js +17 -0
  99. package/dist/node_modules/rxjs/dist/esm5/internal/Observable.js +100 -0
  100. package/dist/node_modules/rxjs/dist/esm5/internal/Subscriber.js +147 -0
  101. package/dist/node_modules/rxjs/dist/esm5/internal/Subscription.js +139 -0
  102. package/dist/node_modules/rxjs/dist/esm5/internal/config.js +10 -0
  103. package/dist/node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js +159 -0
  104. package/dist/node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js +52 -0
  105. package/dist/node_modules/rxjs/dist/esm5/internal/operators/catchError.js +28 -0
  106. package/dist/node_modules/rxjs/dist/esm5/internal/operators/distinctUntilChanged.js +27 -0
  107. package/dist/node_modules/rxjs/dist/esm5/internal/operators/filter.js +13 -0
  108. package/dist/node_modules/rxjs/dist/esm5/internal/operators/map.js +13 -0
  109. package/dist/node_modules/rxjs/dist/esm5/internal/operators/observeOn.js +26 -0
  110. package/dist/node_modules/rxjs/dist/esm5/internal/operators/tap.js +36 -0
  111. package/dist/node_modules/rxjs/dist/esm5/internal/operators/withLatestFrom.js +43 -0
  112. package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js +18 -0
  113. package/dist/node_modules/rxjs/dist/esm5/internal/symbol/iterator.js +11 -0
  114. package/dist/node_modules/rxjs/dist/esm5/internal/symbol/observable.js +6 -0
  115. package/dist/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js +14 -0
  116. package/dist/node_modules/rxjs/dist/esm5/internal/util/args.js +10 -0
  117. package/dist/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js +9 -0
  118. package/dist/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js +13 -0
  119. package/dist/node_modules/rxjs/dist/esm5/internal/util/errorContext.js +8 -0
  120. package/dist/node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js +23 -0
  121. package/dist/node_modules/rxjs/dist/esm5/internal/util/identity.js +6 -0
  122. package/dist/node_modules/rxjs/dist/esm5/internal/util/isArrayLike.js +6 -0
  123. package/dist/node_modules/rxjs/dist/esm5/internal/util/isAsyncIterable.js +7 -0
  124. package/dist/node_modules/rxjs/dist/esm5/internal/util/isFunction.js +6 -0
  125. package/dist/node_modules/rxjs/dist/esm5/internal/util/isInteropObservable.js +8 -0
  126. package/dist/node_modules/rxjs/dist/esm5/internal/util/isIterable.js +8 -0
  127. package/dist/node_modules/rxjs/dist/esm5/internal/util/isPromise.js +7 -0
  128. package/dist/node_modules/rxjs/dist/esm5/internal/util/isReadableStreamLike.js +46 -0
  129. package/dist/node_modules/rxjs/dist/esm5/internal/util/lift.js +22 -0
  130. package/dist/node_modules/rxjs/dist/esm5/internal/util/noop.js +5 -0
  131. package/dist/node_modules/rxjs/dist/esm5/internal/util/pipe.js +17 -0
  132. package/dist/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js +11 -0
  133. package/dist/node_modules/rxjs/dist/esm5/internal/util/throwUnobservableError.js +6 -0
  134. package/dist/node_modules/tslib/tslib.es6.js +240 -0
  135. package/dist/pd-panel-viewer.js +189 -0
  136. package/dist/pd-panel.js +51 -0
  137. package/dist/src/PdSpaHelper.js +320 -403
  138. package/dist/src/defaultpage/default-confirm-popup.js +61 -41
  139. package/dist/src/defaultpage/default-dialog-popup.js +74 -60
  140. package/dist/src/defaultpage/default-login.js +31 -20
  141. package/dist/src/defaultpage/default-popup.js +13 -10
  142. package/dist/src/defaultpage/default-step-address.js +52 -42
  143. package/dist/src/defaultpage/default-step-summary.js +58 -49
  144. package/dist/src/defaultpage/default-view-page.js +31 -23
  145. package/dist/src/defaultpage/default-wizard-step.js +119 -111
  146. package/dist/src/defaultpage/default-wizard.js +199 -195
  147. package/dist/src/generated/locale-wrapper/be-wrapper.js +14 -11
  148. package/dist/src/generated/locale-wrapper/de-wrapper.js +12 -9
  149. package/dist/src/generated/locale-wrapper/en-wrapper.js +14 -11
  150. package/dist/src/generated/locales/be.js +17 -19
  151. package/dist/src/generated/locales/de.js +17 -19
  152. package/dist/src/generated/locales/en.js +17 -19
  153. package/dist/src/helper/helper-utils.js +29 -24
  154. package/dist/src/model/spa-model.js +6 -3
  155. package/dist/src/popup/wizard-close-popup.js +37 -27
  156. package/dist/src/popup/wizard-reload-popup.js +35 -23
  157. package/dist/src/router/AppMain.js +23 -12
  158. package/dist/src/service-provider/firebase/auth.js +50 -73
  159. package/dist/src/service-provider/firebase/firestorage-client.js +194 -243
  160. package/dist/src/service-provider/firebase/firestore-client.js +19 -25
  161. package/dist/src/service-provider/firebase/functions-client.js +27 -59
  162. package/dist/src/service-provider/firebase/messagingFirebaseClient.js +60 -59
  163. package/dist/src/service-provider/mock/auth.js +54 -54
  164. package/dist/src/service-provider/mock/function-client.js +28 -27
  165. package/dist/src/service-provider/mock/storage-client.js +86 -92
  166. package/dist/src/service-provider/service-provider-impl.js +206 -211
  167. package/dist/src/service-provider/service-provider-model.js +1 -2
  168. package/dist/src/store/indexDB.js +133 -180
  169. package/dist/src/store/mini-rx.store.js +36 -38
  170. package/dist/src/store/spa-app-actions.js +27 -14
  171. package/dist/src/store/spa-app-effects.js +60 -40
  172. package/dist/src/store/spa-app-reducer.js +42 -33
  173. package/dist/src/store/spa-app-selector.js +31 -15
  174. package/dist/src/tmpown/pd-loading-state.js +49 -39
  175. package/dist/src/tmpown/pd-login.js +76 -67
  176. package/dist/src/tmpown/pd-toast.js +74 -65
  177. package/package.json +16 -13
  178. package/.editorconfig +0 -29
  179. package/.storybook/main.ts +0 -14
  180. package/.storybook/preview.ts +0 -15
  181. package/demo/index.html +0 -29
  182. package/dist/src/InitApplicationData.d.ts +0 -3
  183. package/dist/src/InitApplicationData.js +0 -8
  184. package/dist/src/InitApplicationData.js.map +0 -1
  185. package/dist/src/PdSpaHelper.d.ts +0 -93
  186. package/dist/src/PdSpaHelper.js.map +0 -1
  187. package/dist/src/defaultpage/default-confirm-popup.d.ts +0 -19
  188. package/dist/src/defaultpage/default-confirm-popup.js.map +0 -1
  189. package/dist/src/defaultpage/default-dialog-popup.d.ts +0 -16
  190. package/dist/src/defaultpage/default-dialog-popup.js.map +0 -1
  191. package/dist/src/defaultpage/default-login.d.ts +0 -8
  192. package/dist/src/defaultpage/default-login.js.map +0 -1
  193. package/dist/src/defaultpage/default-popup.d.ts +0 -7
  194. package/dist/src/defaultpage/default-popup.js.map +0 -1
  195. package/dist/src/defaultpage/default-step-address.d.ts +0 -19
  196. package/dist/src/defaultpage/default-step-address.js.map +0 -1
  197. package/dist/src/defaultpage/default-step-summary.d.ts +0 -30
  198. package/dist/src/defaultpage/default-step-summary.js.map +0 -1
  199. package/dist/src/defaultpage/default-view-page.d.ts +0 -9
  200. package/dist/src/defaultpage/default-view-page.js.map +0 -1
  201. package/dist/src/defaultpage/default-wizard-step.d.ts +0 -34
  202. package/dist/src/defaultpage/default-wizard-step.js.map +0 -1
  203. package/dist/src/defaultpage/default-wizard.d.ts +0 -33
  204. package/dist/src/defaultpage/default-wizard.js.map +0 -1
  205. package/dist/src/firebase/auth.d.ts +0 -4
  206. package/dist/src/firebase/auth.js +0 -28
  207. package/dist/src/firebase/auth.js.map +0 -1
  208. package/dist/src/firebase/firestore-client.d.ts +0 -9
  209. package/dist/src/firebase/firestore-client.js +0 -19
  210. package/dist/src/firebase/firestore-client.js.map +0 -1
  211. package/dist/src/firebase/functions-client.d.ts +0 -34
  212. package/dist/src/firebase/functions-client.js +0 -70
  213. package/dist/src/firebase/functions-client.js.map +0 -1
  214. package/dist/src/generated/locale-codes.d.ts +0 -13
  215. package/dist/src/generated/locale-codes.js +0 -25
  216. package/dist/src/generated/locale-codes.js.map +0 -1
  217. package/dist/src/generated/locale-wrapper/be-wrapper.d.ts +0 -1
  218. package/dist/src/generated/locale-wrapper/be-wrapper.js.map +0 -1
  219. package/dist/src/generated/locale-wrapper/de-wrapper.d.ts +0 -15
  220. package/dist/src/generated/locale-wrapper/de-wrapper.js.map +0 -1
  221. package/dist/src/generated/locale-wrapper/en-wrapper.d.ts +0 -1
  222. package/dist/src/generated/locale-wrapper/en-wrapper.js.map +0 -1
  223. package/dist/src/generated/locales/be.d.ts +0 -15
  224. package/dist/src/generated/locales/be.js.map +0 -1
  225. package/dist/src/generated/locales/de.d.ts +0 -15
  226. package/dist/src/generated/locales/de.js.map +0 -1
  227. package/dist/src/generated/locales/en.d.ts +0 -15
  228. package/dist/src/generated/locales/en.js.map +0 -1
  229. package/dist/src/helper/helper-utils.d.ts +0 -5
  230. package/dist/src/helper/helper-utils.js.map +0 -1
  231. package/dist/src/index.d.ts +0 -22
  232. package/dist/src/index.js +0 -33
  233. package/dist/src/index.js.map +0 -1
  234. package/dist/src/model/spa-model.d.ts +0 -16
  235. package/dist/src/model/spa-model.js.map +0 -1
  236. package/dist/src/pd-spa-helper.d.ts +0 -0
  237. package/dist/src/pd-spa-helper.js +0 -5
  238. package/dist/src/pd-spa-helper.js.map +0 -1
  239. package/dist/src/popup/wizard-close-popup.d.ts +0 -10
  240. package/dist/src/popup/wizard-close-popup.js.map +0 -1
  241. package/dist/src/popup/wizard-reload-popup.d.ts +0 -13
  242. package/dist/src/popup/wizard-reload-popup.js.map +0 -1
  243. package/dist/src/router/AppMain.d.ts +0 -6
  244. package/dist/src/router/AppMain.js.map +0 -1
  245. package/dist/src/service-call-controller2.d.ts +0 -16
  246. package/dist/src/service-call-controller2.js +0 -43
  247. package/dist/src/service-call-controller2.js.map +0 -1
  248. package/dist/src/service-provider/firebase/auth.d.ts +0 -14
  249. package/dist/src/service-provider/firebase/auth.js.map +0 -1
  250. package/dist/src/service-provider/firebase/firestorage-client.d.ts +0 -20
  251. package/dist/src/service-provider/firebase/firestorage-client.js.map +0 -1
  252. package/dist/src/service-provider/firebase/firestore-client.d.ts +0 -11
  253. package/dist/src/service-provider/firebase/firestore-client.js.map +0 -1
  254. package/dist/src/service-provider/firebase/functions-client.d.ts +0 -9
  255. package/dist/src/service-provider/firebase/functions-client.js.map +0 -1
  256. package/dist/src/service-provider/firebase/messagingFirebaseClient.d.ts +0 -8
  257. package/dist/src/service-provider/firebase/messagingFirebaseClient.js.map +0 -1
  258. package/dist/src/service-provider/mock/auth.d.ts +0 -5
  259. package/dist/src/service-provider/mock/auth.js.map +0 -1
  260. package/dist/src/service-provider/mock/function-client.d.ts +0 -8
  261. package/dist/src/service-provider/mock/function-client.js.map +0 -1
  262. package/dist/src/service-provider/mock/storage-client.d.ts +0 -10
  263. package/dist/src/service-provider/mock/storage-client.js.map +0 -1
  264. package/dist/src/service-provider/service-provider-impl.d.ts +0 -21
  265. package/dist/src/service-provider/service-provider-impl.js.map +0 -1
  266. package/dist/src/service-provider/service-provider-model.d.ts +0 -135
  267. package/dist/src/service-provider/service-provider-model.js.map +0 -1
  268. package/dist/src/store/indexDB.d.ts +0 -27
  269. package/dist/src/store/indexDB.js.map +0 -1
  270. package/dist/src/store/mini-rx.store.d.ts +0 -4
  271. package/dist/src/store/mini-rx.store.js.map +0 -1
  272. package/dist/src/store/spa-app-actions.d.ts +0 -104
  273. package/dist/src/store/spa-app-actions.js.map +0 -1
  274. package/dist/src/store/spa-app-effects.d.ts +0 -23
  275. package/dist/src/store/spa-app-effects.js.map +0 -1
  276. package/dist/src/store/spa-app-reducer.d.ts +0 -9
  277. package/dist/src/store/spa-app-reducer.js.map +0 -1
  278. package/dist/src/store/spa-app-selector.d.ts +0 -6
  279. package/dist/src/store/spa-app-selector.js.map +0 -1
  280. package/dist/src/stories/Button.d.ts +0 -27
  281. package/dist/src/stories/Button.js +0 -20
  282. package/dist/src/stories/Button.js.map +0 -1
  283. package/dist/src/stories/Button.stories.d.ts +0 -9
  284. package/dist/src/stories/Button.stories.js +0 -41
  285. package/dist/src/stories/Button.stories.js.map +0 -1
  286. package/dist/src/stories/Header.d.ts +0 -12
  287. package/dist/src/stories/Header.js +0 -44
  288. package/dist/src/stories/Header.js.map +0 -1
  289. package/dist/src/stories/Header.stories.d.ts +0 -7
  290. package/dist/src/stories/Header.stories.js +0 -17
  291. package/dist/src/stories/Header.stories.js.map +0 -1
  292. package/dist/src/stories/Page.d.ts +0 -12
  293. package/dist/src/stories/Page.js +0 -61
  294. package/dist/src/stories/Page.js.map +0 -1
  295. package/dist/src/stories/Page.stories.d.ts +0 -7
  296. package/dist/src/stories/Page.stories.js +0 -19
  297. package/dist/src/stories/Page.stories.js.map +0 -1
  298. package/dist/src/stories/pd-loading-state.stories.d.ts +0 -30
  299. package/dist/src/stories/pd-loading-state.stories.js +0 -153
  300. package/dist/src/stories/pd-loading-state.stories.js.map +0 -1
  301. package/dist/src/stories/pd-toast.stories.d.ts +0 -23
  302. package/dist/src/stories/pd-toast.stories.js +0 -34
  303. package/dist/src/stories/pd-toast.stories.js.map +0 -1
  304. package/dist/src/tmpown/pd-loading-state.d.ts +0 -9
  305. package/dist/src/tmpown/pd-loading-state.js.map +0 -1
  306. package/dist/src/tmpown/pd-login.d.ts +0 -14
  307. package/dist/src/tmpown/pd-login.js.map +0 -1
  308. package/dist/src/tmpown/pd-panel-viewer.d.ts +0 -18
  309. package/dist/src/tmpown/pd-panel-viewer.js +0 -188
  310. package/dist/src/tmpown/pd-panel-viewer.js.map +0 -1
  311. package/dist/src/tmpown/pd-panel.d.ts +0 -5
  312. package/dist/src/tmpown/pd-panel.js +0 -41
  313. package/dist/src/tmpown/pd-panel.js.map +0 -1
  314. package/dist/src/tmpown/pd-toast.d.ts +0 -12
  315. package/dist/src/tmpown/pd-toast.js.map +0 -1
  316. package/dist/stories/index.stories.d.ts +0 -33
  317. package/dist/stories/index.stories.js +0 -37
  318. package/dist/stories/index.stories.js.map +0 -1
  319. package/dist/test/pd-spa-helper.test.d.ts +0 -1
  320. package/dist/test/pd-spa-helper.test.js +0 -22
  321. package/dist/test/pd-spa-helper.test.js.map +0 -1
  322. package/dist/tsconfig.tsbuildinfo +0 -1
  323. package/index.d.ts +0 -15
  324. package/lit-localize.json +0 -15
  325. package/pd-spa-helper.iml +0 -9
  326. package/src/PdSpaHelper.ts +0 -619
  327. package/src/defaultpage/default-confirm-popup.ts +0 -78
  328. package/src/defaultpage/default-dialog-popup.ts +0 -105
  329. package/src/defaultpage/default-login.ts +0 -41
  330. package/src/defaultpage/default-popup.ts +0 -26
  331. package/src/defaultpage/default-step-address.ts +0 -57
  332. package/src/defaultpage/default-step-summary.ts +0 -88
  333. package/src/defaultpage/default-view-page.ts +0 -58
  334. package/src/defaultpage/default-wizard-step.ts +0 -142
  335. package/src/defaultpage/default-wizard.ts +0 -273
  336. package/src/generated/locale-codes.ts +0 -27
  337. package/src/generated/locale-wrapper/be-wrapper.ts +0 -13
  338. package/src/generated/locale-wrapper/de-wrapper.ts +0 -11
  339. package/src/generated/locale-wrapper/en-wrapper.ts +0 -13
  340. package/src/generated/locales/be.ts +0 -26
  341. package/src/generated/locales/de.ts +0 -26
  342. package/src/generated/locales/en.ts +0 -26
  343. package/src/helper/helper-utils.ts +0 -35
  344. package/src/index.ts +0 -66
  345. package/src/model/spa-model.ts +0 -20
  346. package/src/pd-spa-helper.ts +0 -3
  347. package/src/popup/wizard-close-popup.ts +0 -52
  348. package/src/popup/wizard-reload-popup.ts +0 -69
  349. package/src/router/AppMain.ts +0 -10
  350. package/src/service-call-controller2.ts +0 -68
  351. package/src/service-provider/firebase/auth.ts +0 -89
  352. package/src/service-provider/firebase/firestorage-client.ts +0 -327
  353. package/src/service-provider/firebase/firestore-client.ts +0 -40
  354. package/src/service-provider/firebase/functions-client.ts +0 -73
  355. package/src/service-provider/firebase/messagingFirebaseClient.ts +0 -102
  356. package/src/service-provider/mock/auth.ts +0 -86
  357. package/src/service-provider/mock/function-client.ts +0 -42
  358. package/src/service-provider/mock/storage-client.ts +0 -149
  359. package/src/service-provider/service-provider-impl.ts +0 -286
  360. package/src/service-provider/service-provider-model.ts +0 -162
  361. package/src/store/indexDB.ts +0 -244
  362. package/src/store/mini-rx.store.ts +0 -48
  363. package/src/store/spa-app-actions.ts +0 -36
  364. package/src/store/spa-app-effects.ts +0 -73
  365. package/src/store/spa-app-reducer.ts +0 -86
  366. package/src/store/spa-app-selector.ts +0 -41
  367. package/src/stories/pd-loading-state.stories.ts +0 -168
  368. package/src/stories/pd-toast.stories.ts +0 -43
  369. package/src/tmpown/pd-loading-state.ts +0 -177
  370. package/src/tmpown/pd-login.ts +0 -131
  371. package/src/tmpown/pd-panel-viewer.ts +0 -193
  372. package/src/tmpown/pd-panel.ts +0 -43
  373. package/src/tmpown/pd-toast.ts +0 -118
  374. package/test/pd-spa-helper.test.ts +0 -26
  375. package/tsconfig.json +0 -22
  376. package/web-dev-server.config.mjs +0 -27
  377. package/web-test-runner.config.mjs +0 -41
  378. package/xliff/be.xlf +0 -60
  379. package/xliff/de.xlf +0 -46
  380. package/xliff/en.xlf +0 -58
@@ -0,0 +1,931 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2017 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ /**
18
+ * @license
19
+ * Copyright 2017 Google LLC
20
+ *
21
+ * Licensed under the Apache License, Version 2.0 (the "License");
22
+ * you may not use this file except in compliance with the License.
23
+ * You may obtain a copy of the License at
24
+ *
25
+ * http://www.apache.org/licenses/LICENSE-2.0
26
+ *
27
+ * Unless required by applicable law or agreed to in writing, software
28
+ * distributed under the License is distributed on an "AS IS" BASIS,
29
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
30
+ * See the License for the specific language governing permissions and
31
+ * limitations under the License.
32
+ */
33
+ const stringToByteArray$1 = function(str) {
34
+ const out = [];
35
+ let p = 0;
36
+ for (let i = 0; i < str.length; i++) {
37
+ let c = str.charCodeAt(i);
38
+ if (c < 128) {
39
+ out[p++] = c;
40
+ } else if (c < 2048) {
41
+ out[p++] = c >> 6 | 192;
42
+ out[p++] = c & 63 | 128;
43
+ } else if ((c & 64512) === 55296 && i + 1 < str.length && (str.charCodeAt(i + 1) & 64512) === 56320) {
44
+ c = 65536 + ((c & 1023) << 10) + (str.charCodeAt(++i) & 1023);
45
+ out[p++] = c >> 18 | 240;
46
+ out[p++] = c >> 12 & 63 | 128;
47
+ out[p++] = c >> 6 & 63 | 128;
48
+ out[p++] = c & 63 | 128;
49
+ } else {
50
+ out[p++] = c >> 12 | 224;
51
+ out[p++] = c >> 6 & 63 | 128;
52
+ out[p++] = c & 63 | 128;
53
+ }
54
+ }
55
+ return out;
56
+ };
57
+ const byteArrayToString = function(bytes) {
58
+ const out = [];
59
+ let pos = 0, c = 0;
60
+ while (pos < bytes.length) {
61
+ const c1 = bytes[pos++];
62
+ if (c1 < 128) {
63
+ out[c++] = String.fromCharCode(c1);
64
+ } else if (c1 > 191 && c1 < 224) {
65
+ const c2 = bytes[pos++];
66
+ out[c++] = String.fromCharCode((c1 & 31) << 6 | c2 & 63);
67
+ } else if (c1 > 239 && c1 < 365) {
68
+ const c2 = bytes[pos++];
69
+ const c3 = bytes[pos++];
70
+ const c4 = bytes[pos++];
71
+ const u = ((c1 & 7) << 18 | (c2 & 63) << 12 | (c3 & 63) << 6 | c4 & 63) - 65536;
72
+ out[c++] = String.fromCharCode(55296 + (u >> 10));
73
+ out[c++] = String.fromCharCode(56320 + (u & 1023));
74
+ } else {
75
+ const c2 = bytes[pos++];
76
+ const c3 = bytes[pos++];
77
+ out[c++] = String.fromCharCode((c1 & 15) << 12 | (c2 & 63) << 6 | c3 & 63);
78
+ }
79
+ }
80
+ return out.join("");
81
+ };
82
+ const base64 = {
83
+ /**
84
+ * Maps bytes to characters.
85
+ */
86
+ byteToCharMap_: null,
87
+ /**
88
+ * Maps characters to bytes.
89
+ */
90
+ charToByteMap_: null,
91
+ /**
92
+ * Maps bytes to websafe characters.
93
+ * @private
94
+ */
95
+ byteToCharMapWebSafe_: null,
96
+ /**
97
+ * Maps websafe characters to bytes.
98
+ * @private
99
+ */
100
+ charToByteMapWebSafe_: null,
101
+ /**
102
+ * Our default alphabet, shared between
103
+ * ENCODED_VALS and ENCODED_VALS_WEBSAFE
104
+ */
105
+ ENCODED_VALS_BASE: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
106
+ /**
107
+ * Our default alphabet. Value 64 (=) is special; it means "nothing."
108
+ */
109
+ get ENCODED_VALS() {
110
+ return this.ENCODED_VALS_BASE + "+/=";
111
+ },
112
+ /**
113
+ * Our websafe alphabet.
114
+ */
115
+ get ENCODED_VALS_WEBSAFE() {
116
+ return this.ENCODED_VALS_BASE + "-_.";
117
+ },
118
+ /**
119
+ * Whether this browser supports the atob and btoa functions. This extension
120
+ * started at Mozilla but is now implemented by many browsers. We use the
121
+ * ASSUME_* variables to avoid pulling in the full useragent detection library
122
+ * but still allowing the standard per-browser compilations.
123
+ *
124
+ */
125
+ HAS_NATIVE_SUPPORT: typeof atob === "function",
126
+ /**
127
+ * Base64-encode an array of bytes.
128
+ *
129
+ * @param input An array of bytes (numbers with
130
+ * value in [0, 255]) to encode.
131
+ * @param webSafe Boolean indicating we should use the
132
+ * alternative alphabet.
133
+ * @return The base64 encoded string.
134
+ */
135
+ encodeByteArray(input, webSafe) {
136
+ if (!Array.isArray(input)) {
137
+ throw Error("encodeByteArray takes an array as a parameter");
138
+ }
139
+ this.init_();
140
+ const byteToCharMap = webSafe ? this.byteToCharMapWebSafe_ : this.byteToCharMap_;
141
+ const output = [];
142
+ for (let i = 0; i < input.length; i += 3) {
143
+ const byte1 = input[i];
144
+ const haveByte2 = i + 1 < input.length;
145
+ const byte2 = haveByte2 ? input[i + 1] : 0;
146
+ const haveByte3 = i + 2 < input.length;
147
+ const byte3 = haveByte3 ? input[i + 2] : 0;
148
+ const outByte1 = byte1 >> 2;
149
+ const outByte2 = (byte1 & 3) << 4 | byte2 >> 4;
150
+ let outByte3 = (byte2 & 15) << 2 | byte3 >> 6;
151
+ let outByte4 = byte3 & 63;
152
+ if (!haveByte3) {
153
+ outByte4 = 64;
154
+ if (!haveByte2) {
155
+ outByte3 = 64;
156
+ }
157
+ }
158
+ output.push(byteToCharMap[outByte1], byteToCharMap[outByte2], byteToCharMap[outByte3], byteToCharMap[outByte4]);
159
+ }
160
+ return output.join("");
161
+ },
162
+ /**
163
+ * Base64-encode a string.
164
+ *
165
+ * @param input A string to encode.
166
+ * @param webSafe If true, we should use the
167
+ * alternative alphabet.
168
+ * @return The base64 encoded string.
169
+ */
170
+ encodeString(input, webSafe) {
171
+ if (this.HAS_NATIVE_SUPPORT && !webSafe) {
172
+ return btoa(input);
173
+ }
174
+ return this.encodeByteArray(stringToByteArray$1(input), webSafe);
175
+ },
176
+ /**
177
+ * Base64-decode a string.
178
+ *
179
+ * @param input to decode.
180
+ * @param webSafe True if we should use the
181
+ * alternative alphabet.
182
+ * @return string representing the decoded value.
183
+ */
184
+ decodeString(input, webSafe) {
185
+ if (this.HAS_NATIVE_SUPPORT && !webSafe) {
186
+ return atob(input);
187
+ }
188
+ return byteArrayToString(this.decodeStringToByteArray(input, webSafe));
189
+ },
190
+ /**
191
+ * Base64-decode a string.
192
+ *
193
+ * In base-64 decoding, groups of four characters are converted into three
194
+ * bytes. If the encoder did not apply padding, the input length may not
195
+ * be a multiple of 4.
196
+ *
197
+ * In this case, the last group will have fewer than 4 characters, and
198
+ * padding will be inferred. If the group has one or two characters, it decodes
199
+ * to one byte. If the group has three characters, it decodes to two bytes.
200
+ *
201
+ * @param input Input to decode.
202
+ * @param webSafe True if we should use the web-safe alphabet.
203
+ * @return bytes representing the decoded value.
204
+ */
205
+ decodeStringToByteArray(input, webSafe) {
206
+ this.init_();
207
+ const charToByteMap = webSafe ? this.charToByteMapWebSafe_ : this.charToByteMap_;
208
+ const output = [];
209
+ for (let i = 0; i < input.length; ) {
210
+ const byte1 = charToByteMap[input.charAt(i++)];
211
+ const haveByte2 = i < input.length;
212
+ const byte2 = haveByte2 ? charToByteMap[input.charAt(i)] : 0;
213
+ ++i;
214
+ const haveByte3 = i < input.length;
215
+ const byte3 = haveByte3 ? charToByteMap[input.charAt(i)] : 64;
216
+ ++i;
217
+ const haveByte4 = i < input.length;
218
+ const byte4 = haveByte4 ? charToByteMap[input.charAt(i)] : 64;
219
+ ++i;
220
+ if (byte1 == null || byte2 == null || byte3 == null || byte4 == null) {
221
+ throw new DecodeBase64StringError();
222
+ }
223
+ const outByte1 = byte1 << 2 | byte2 >> 4;
224
+ output.push(outByte1);
225
+ if (byte3 !== 64) {
226
+ const outByte2 = byte2 << 4 & 240 | byte3 >> 2;
227
+ output.push(outByte2);
228
+ if (byte4 !== 64) {
229
+ const outByte3 = byte3 << 6 & 192 | byte4;
230
+ output.push(outByte3);
231
+ }
232
+ }
233
+ }
234
+ return output;
235
+ },
236
+ /**
237
+ * Lazy static initialization function. Called before
238
+ * accessing any of the static map variables.
239
+ * @private
240
+ */
241
+ init_() {
242
+ if (!this.byteToCharMap_) {
243
+ this.byteToCharMap_ = {};
244
+ this.charToByteMap_ = {};
245
+ this.byteToCharMapWebSafe_ = {};
246
+ this.charToByteMapWebSafe_ = {};
247
+ for (let i = 0; i < this.ENCODED_VALS.length; i++) {
248
+ this.byteToCharMap_[i] = this.ENCODED_VALS.charAt(i);
249
+ this.charToByteMap_[this.byteToCharMap_[i]] = i;
250
+ this.byteToCharMapWebSafe_[i] = this.ENCODED_VALS_WEBSAFE.charAt(i);
251
+ this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[i]] = i;
252
+ if (i >= this.ENCODED_VALS_BASE.length) {
253
+ this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(i)] = i;
254
+ this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(i)] = i;
255
+ }
256
+ }
257
+ }
258
+ }
259
+ };
260
+ class DecodeBase64StringError extends Error {
261
+ constructor() {
262
+ super(...arguments);
263
+ this.name = "DecodeBase64StringError";
264
+ }
265
+ }
266
+ const base64Encode = function(str) {
267
+ const utf8Bytes = stringToByteArray$1(str);
268
+ return base64.encodeByteArray(utf8Bytes, true);
269
+ };
270
+ const base64urlEncodeWithoutPadding = function(str) {
271
+ return base64Encode(str).replace(/\./g, "");
272
+ };
273
+ const base64Decode = function(str) {
274
+ try {
275
+ return base64.decodeString(str, true);
276
+ } catch (e) {
277
+ console.error("base64Decode failed: ", e);
278
+ }
279
+ return null;
280
+ };
281
+ /**
282
+ * @license
283
+ * Copyright 2022 Google LLC
284
+ *
285
+ * Licensed under the Apache License, Version 2.0 (the "License");
286
+ * you may not use this file except in compliance with the License.
287
+ * You may obtain a copy of the License at
288
+ *
289
+ * http://www.apache.org/licenses/LICENSE-2.0
290
+ *
291
+ * Unless required by applicable law or agreed to in writing, software
292
+ * distributed under the License is distributed on an "AS IS" BASIS,
293
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
294
+ * See the License for the specific language governing permissions and
295
+ * limitations under the License.
296
+ */
297
+ function getGlobal() {
298
+ if (typeof self !== "undefined") {
299
+ return self;
300
+ }
301
+ if (typeof window !== "undefined") {
302
+ return window;
303
+ }
304
+ if (typeof global !== "undefined") {
305
+ return global;
306
+ }
307
+ throw new Error("Unable to locate global object.");
308
+ }
309
+ /**
310
+ * @license
311
+ * Copyright 2022 Google LLC
312
+ *
313
+ * Licensed under the Apache License, Version 2.0 (the "License");
314
+ * you may not use this file except in compliance with the License.
315
+ * You may obtain a copy of the License at
316
+ *
317
+ * http://www.apache.org/licenses/LICENSE-2.0
318
+ *
319
+ * Unless required by applicable law or agreed to in writing, software
320
+ * distributed under the License is distributed on an "AS IS" BASIS,
321
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
322
+ * See the License for the specific language governing permissions and
323
+ * limitations under the License.
324
+ */
325
+ const getDefaultsFromGlobal = () => getGlobal().__FIREBASE_DEFAULTS__;
326
+ const getDefaultsFromEnvVariable = () => {
327
+ if (typeof process === "undefined" || typeof process.env === "undefined") {
328
+ return;
329
+ }
330
+ const defaultsJsonString = process.env.__FIREBASE_DEFAULTS__;
331
+ if (defaultsJsonString) {
332
+ return JSON.parse(defaultsJsonString);
333
+ }
334
+ };
335
+ const getDefaultsFromCookie = () => {
336
+ if (typeof document === "undefined") {
337
+ return;
338
+ }
339
+ let match;
340
+ try {
341
+ match = document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/);
342
+ } catch (e) {
343
+ return;
344
+ }
345
+ const decoded = match && base64Decode(match[1]);
346
+ return decoded && JSON.parse(decoded);
347
+ };
348
+ const getDefaults = () => {
349
+ try {
350
+ return getDefaultsFromGlobal() || getDefaultsFromEnvVariable() || getDefaultsFromCookie();
351
+ } catch (e) {
352
+ console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`);
353
+ return;
354
+ }
355
+ };
356
+ const getDefaultEmulatorHost = (productName) => {
357
+ var _a, _b;
358
+ return (_b = (_a = getDefaults()) === null || _a === void 0 ? void 0 : _a.emulatorHosts) === null || _b === void 0 ? void 0 : _b[productName];
359
+ };
360
+ const getDefaultEmulatorHostnameAndPort = (productName) => {
361
+ const host = getDefaultEmulatorHost(productName);
362
+ if (!host) {
363
+ return void 0;
364
+ }
365
+ const separatorIndex = host.lastIndexOf(":");
366
+ if (separatorIndex <= 0 || separatorIndex + 1 === host.length) {
367
+ throw new Error(`Invalid host ${host} with no separate hostname and port!`);
368
+ }
369
+ const port = parseInt(host.substring(separatorIndex + 1), 10);
370
+ if (host[0] === "[") {
371
+ return [host.substring(1, separatorIndex - 1), port];
372
+ } else {
373
+ return [host.substring(0, separatorIndex), port];
374
+ }
375
+ };
376
+ const getDefaultAppConfig = () => {
377
+ var _a;
378
+ return (_a = getDefaults()) === null || _a === void 0 ? void 0 : _a.config;
379
+ };
380
+ const getExperimentalSetting = (name) => {
381
+ var _a;
382
+ return (_a = getDefaults()) === null || _a === void 0 ? void 0 : _a[`_${name}`];
383
+ };
384
+ /**
385
+ * @license
386
+ * Copyright 2017 Google LLC
387
+ *
388
+ * Licensed under the Apache License, Version 2.0 (the "License");
389
+ * you may not use this file except in compliance with the License.
390
+ * You may obtain a copy of the License at
391
+ *
392
+ * http://www.apache.org/licenses/LICENSE-2.0
393
+ *
394
+ * Unless required by applicable law or agreed to in writing, software
395
+ * distributed under the License is distributed on an "AS IS" BASIS,
396
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
397
+ * See the License for the specific language governing permissions and
398
+ * limitations under the License.
399
+ */
400
+ class Deferred {
401
+ constructor() {
402
+ this.reject = () => {
403
+ };
404
+ this.resolve = () => {
405
+ };
406
+ this.promise = new Promise((resolve, reject) => {
407
+ this.resolve = resolve;
408
+ this.reject = reject;
409
+ });
410
+ }
411
+ /**
412
+ * Our API internals are not promisified and cannot because our callback APIs have subtle expectations around
413
+ * invoking promises inline, which Promises are forbidden to do. This method accepts an optional node-style callback
414
+ * and returns a node-style callback which will resolve or reject the Deferred's promise.
415
+ */
416
+ wrapCallback(callback) {
417
+ return (error, value) => {
418
+ if (error) {
419
+ this.reject(error);
420
+ } else {
421
+ this.resolve(value);
422
+ }
423
+ if (typeof callback === "function") {
424
+ this.promise.catch(() => {
425
+ });
426
+ if (callback.length === 1) {
427
+ callback(error);
428
+ } else {
429
+ callback(error, value);
430
+ }
431
+ }
432
+ };
433
+ }
434
+ }
435
+ /**
436
+ * @license
437
+ * Copyright 2021 Google LLC
438
+ *
439
+ * Licensed under the Apache License, Version 2.0 (the "License");
440
+ * you may not use this file except in compliance with the License.
441
+ * You may obtain a copy of the License at
442
+ *
443
+ * http://www.apache.org/licenses/LICENSE-2.0
444
+ *
445
+ * Unless required by applicable law or agreed to in writing, software
446
+ * distributed under the License is distributed on an "AS IS" BASIS,
447
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
448
+ * See the License for the specific language governing permissions and
449
+ * limitations under the License.
450
+ */
451
+ function createMockUserToken(token, projectId) {
452
+ if (token.uid) {
453
+ throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');
454
+ }
455
+ const header = {
456
+ alg: "none",
457
+ type: "JWT"
458
+ };
459
+ const project = projectId || "demo-project";
460
+ const iat = token.iat || 0;
461
+ const sub = token.sub || token.user_id;
462
+ if (!sub) {
463
+ throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");
464
+ }
465
+ const payload = Object.assign({
466
+ // Set all required fields to decent defaults
467
+ iss: `https://securetoken.google.com/${project}`,
468
+ aud: project,
469
+ iat,
470
+ exp: iat + 3600,
471
+ auth_time: iat,
472
+ sub,
473
+ user_id: sub,
474
+ firebase: {
475
+ sign_in_provider: "custom",
476
+ identities: {}
477
+ }
478
+ }, token);
479
+ const signature = "";
480
+ return [
481
+ base64urlEncodeWithoutPadding(JSON.stringify(header)),
482
+ base64urlEncodeWithoutPadding(JSON.stringify(payload)),
483
+ signature
484
+ ].join(".");
485
+ }
486
+ /**
487
+ * @license
488
+ * Copyright 2017 Google LLC
489
+ *
490
+ * Licensed under the Apache License, Version 2.0 (the "License");
491
+ * you may not use this file except in compliance with the License.
492
+ * You may obtain a copy of the License at
493
+ *
494
+ * http://www.apache.org/licenses/LICENSE-2.0
495
+ *
496
+ * Unless required by applicable law or agreed to in writing, software
497
+ * distributed under the License is distributed on an "AS IS" BASIS,
498
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
499
+ * See the License for the specific language governing permissions and
500
+ * limitations under the License.
501
+ */
502
+ function getUA() {
503
+ if (typeof navigator !== "undefined" && typeof navigator["userAgent"] === "string") {
504
+ return navigator["userAgent"];
505
+ } else {
506
+ return "";
507
+ }
508
+ }
509
+ function isMobileCordova() {
510
+ return typeof window !== "undefined" && // @ts-ignore Setting up an broadly applicable index signature for Window
511
+ // just to deal with this case would probably be a bad idea.
512
+ !!(window["cordova"] || window["phonegap"] || window["PhoneGap"]) && /ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(getUA());
513
+ }
514
+ function isNode() {
515
+ var _a;
516
+ const forceEnvironment = (_a = getDefaults()) === null || _a === void 0 ? void 0 : _a.forceEnvironment;
517
+ if (forceEnvironment === "node") {
518
+ return true;
519
+ } else if (forceEnvironment === "browser") {
520
+ return false;
521
+ }
522
+ try {
523
+ return Object.prototype.toString.call(global.process) === "[object process]";
524
+ } catch (e) {
525
+ return false;
526
+ }
527
+ }
528
+ function isCloudflareWorker() {
529
+ return typeof navigator !== "undefined" && navigator.userAgent === "Cloudflare-Workers";
530
+ }
531
+ function isBrowserExtension() {
532
+ const runtime = typeof chrome === "object" ? chrome.runtime : typeof browser === "object" ? browser.runtime : void 0;
533
+ return typeof runtime === "object" && runtime.id !== void 0;
534
+ }
535
+ function isReactNative() {
536
+ return typeof navigator === "object" && navigator["product"] === "ReactNative";
537
+ }
538
+ function isIE() {
539
+ const ua = getUA();
540
+ return ua.indexOf("MSIE ") >= 0 || ua.indexOf("Trident/") >= 0;
541
+ }
542
+ function isSafari() {
543
+ return !isNode() && !!navigator.userAgent && navigator.userAgent.includes("Safari") && !navigator.userAgent.includes("Chrome");
544
+ }
545
+ function isIndexedDBAvailable() {
546
+ try {
547
+ return typeof indexedDB === "object";
548
+ } catch (e) {
549
+ return false;
550
+ }
551
+ }
552
+ function validateIndexedDBOpenable() {
553
+ return new Promise((resolve, reject) => {
554
+ try {
555
+ let preExist = true;
556
+ const DB_CHECK_NAME = "validate-browser-context-for-indexeddb-analytics-module";
557
+ const request = self.indexedDB.open(DB_CHECK_NAME);
558
+ request.onsuccess = () => {
559
+ request.result.close();
560
+ if (!preExist) {
561
+ self.indexedDB.deleteDatabase(DB_CHECK_NAME);
562
+ }
563
+ resolve(true);
564
+ };
565
+ request.onupgradeneeded = () => {
566
+ preExist = false;
567
+ };
568
+ request.onerror = () => {
569
+ var _a;
570
+ reject(((_a = request.error) === null || _a === void 0 ? void 0 : _a.message) || "");
571
+ };
572
+ } catch (error) {
573
+ reject(error);
574
+ }
575
+ });
576
+ }
577
+ function areCookiesEnabled() {
578
+ if (typeof navigator === "undefined" || !navigator.cookieEnabled) {
579
+ return false;
580
+ }
581
+ return true;
582
+ }
583
+ /**
584
+ * @license
585
+ * Copyright 2017 Google LLC
586
+ *
587
+ * Licensed under the Apache License, Version 2.0 (the "License");
588
+ * you may not use this file except in compliance with the License.
589
+ * You may obtain a copy of the License at
590
+ *
591
+ * http://www.apache.org/licenses/LICENSE-2.0
592
+ *
593
+ * Unless required by applicable law or agreed to in writing, software
594
+ * distributed under the License is distributed on an "AS IS" BASIS,
595
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
596
+ * See the License for the specific language governing permissions and
597
+ * limitations under the License.
598
+ */
599
+ const ERROR_NAME = "FirebaseError";
600
+ class FirebaseError extends Error {
601
+ constructor(code, message, customData) {
602
+ super(message);
603
+ this.code = code;
604
+ this.customData = customData;
605
+ this.name = ERROR_NAME;
606
+ Object.setPrototypeOf(this, FirebaseError.prototype);
607
+ if (Error.captureStackTrace) {
608
+ Error.captureStackTrace(this, ErrorFactory.prototype.create);
609
+ }
610
+ }
611
+ }
612
+ class ErrorFactory {
613
+ constructor(service, serviceName, errors) {
614
+ this.service = service;
615
+ this.serviceName = serviceName;
616
+ this.errors = errors;
617
+ }
618
+ create(code, ...data) {
619
+ const customData = data[0] || {};
620
+ const fullCode = `${this.service}/${code}`;
621
+ const template = this.errors[code];
622
+ const message = template ? replaceTemplate(template, customData) : "Error";
623
+ const fullMessage = `${this.serviceName}: ${message} (${fullCode}).`;
624
+ const error = new FirebaseError(fullCode, fullMessage, customData);
625
+ return error;
626
+ }
627
+ }
628
+ function replaceTemplate(template, data) {
629
+ return template.replace(PATTERN, (_, key) => {
630
+ const value = data[key];
631
+ return value != null ? String(value) : `<${key}?>`;
632
+ });
633
+ }
634
+ const PATTERN = /\{\$([^}]+)}/g;
635
+ function isEmpty(obj) {
636
+ for (const key in obj) {
637
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
638
+ return false;
639
+ }
640
+ }
641
+ return true;
642
+ }
643
+ function deepEqual(a, b) {
644
+ if (a === b) {
645
+ return true;
646
+ }
647
+ const aKeys = Object.keys(a);
648
+ const bKeys = Object.keys(b);
649
+ for (const k of aKeys) {
650
+ if (!bKeys.includes(k)) {
651
+ return false;
652
+ }
653
+ const aProp = a[k];
654
+ const bProp = b[k];
655
+ if (isObject(aProp) && isObject(bProp)) {
656
+ if (!deepEqual(aProp, bProp)) {
657
+ return false;
658
+ }
659
+ } else if (aProp !== bProp) {
660
+ return false;
661
+ }
662
+ }
663
+ for (const k of bKeys) {
664
+ if (!aKeys.includes(k)) {
665
+ return false;
666
+ }
667
+ }
668
+ return true;
669
+ }
670
+ function isObject(thing) {
671
+ return thing !== null && typeof thing === "object";
672
+ }
673
+ /**
674
+ * @license
675
+ * Copyright 2017 Google LLC
676
+ *
677
+ * Licensed under the Apache License, Version 2.0 (the "License");
678
+ * you may not use this file except in compliance with the License.
679
+ * You may obtain a copy of the License at
680
+ *
681
+ * http://www.apache.org/licenses/LICENSE-2.0
682
+ *
683
+ * Unless required by applicable law or agreed to in writing, software
684
+ * distributed under the License is distributed on an "AS IS" BASIS,
685
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
686
+ * See the License for the specific language governing permissions and
687
+ * limitations under the License.
688
+ */
689
+ function querystring(querystringParams) {
690
+ const params = [];
691
+ for (const [key, value] of Object.entries(querystringParams)) {
692
+ if (Array.isArray(value)) {
693
+ value.forEach((arrayVal) => {
694
+ params.push(encodeURIComponent(key) + "=" + encodeURIComponent(arrayVal));
695
+ });
696
+ } else {
697
+ params.push(encodeURIComponent(key) + "=" + encodeURIComponent(value));
698
+ }
699
+ }
700
+ return params.length ? "&" + params.join("&") : "";
701
+ }
702
+ function querystringDecode(querystring2) {
703
+ const obj = {};
704
+ const tokens = querystring2.replace(/^\?/, "").split("&");
705
+ tokens.forEach((token) => {
706
+ if (token) {
707
+ const [key, value] = token.split("=");
708
+ obj[decodeURIComponent(key)] = decodeURIComponent(value);
709
+ }
710
+ });
711
+ return obj;
712
+ }
713
+ function extractQuerystring(url) {
714
+ const queryStart = url.indexOf("?");
715
+ if (!queryStart) {
716
+ return "";
717
+ }
718
+ const fragmentStart = url.indexOf("#", queryStart);
719
+ return url.substring(queryStart, fragmentStart > 0 ? fragmentStart : void 0);
720
+ }
721
+ function createSubscribe(executor, onNoObservers) {
722
+ const proxy = new ObserverProxy(executor, onNoObservers);
723
+ return proxy.subscribe.bind(proxy);
724
+ }
725
+ class ObserverProxy {
726
+ /**
727
+ * @param executor Function which can make calls to a single Observer
728
+ * as a proxy.
729
+ * @param onNoObservers Callback when count of Observers goes to zero.
730
+ */
731
+ constructor(executor, onNoObservers) {
732
+ this.observers = [];
733
+ this.unsubscribes = [];
734
+ this.observerCount = 0;
735
+ this.task = Promise.resolve();
736
+ this.finalized = false;
737
+ this.onNoObservers = onNoObservers;
738
+ this.task.then(() => {
739
+ executor(this);
740
+ }).catch((e) => {
741
+ this.error(e);
742
+ });
743
+ }
744
+ next(value) {
745
+ this.forEachObserver((observer) => {
746
+ observer.next(value);
747
+ });
748
+ }
749
+ error(error) {
750
+ this.forEachObserver((observer) => {
751
+ observer.error(error);
752
+ });
753
+ this.close(error);
754
+ }
755
+ complete() {
756
+ this.forEachObserver((observer) => {
757
+ observer.complete();
758
+ });
759
+ this.close();
760
+ }
761
+ /**
762
+ * Subscribe function that can be used to add an Observer to the fan-out list.
763
+ *
764
+ * - We require that no event is sent to a subscriber synchronously to their
765
+ * call to subscribe().
766
+ */
767
+ subscribe(nextOrObserver, error, complete) {
768
+ let observer;
769
+ if (nextOrObserver === void 0 && error === void 0 && complete === void 0) {
770
+ throw new Error("Missing Observer.");
771
+ }
772
+ if (implementsAnyMethods(nextOrObserver, [
773
+ "next",
774
+ "error",
775
+ "complete"
776
+ ])) {
777
+ observer = nextOrObserver;
778
+ } else {
779
+ observer = {
780
+ next: nextOrObserver,
781
+ error,
782
+ complete
783
+ };
784
+ }
785
+ if (observer.next === void 0) {
786
+ observer.next = noop;
787
+ }
788
+ if (observer.error === void 0) {
789
+ observer.error = noop;
790
+ }
791
+ if (observer.complete === void 0) {
792
+ observer.complete = noop;
793
+ }
794
+ const unsub = this.unsubscribeOne.bind(this, this.observers.length);
795
+ if (this.finalized) {
796
+ this.task.then(() => {
797
+ try {
798
+ if (this.finalError) {
799
+ observer.error(this.finalError);
800
+ } else {
801
+ observer.complete();
802
+ }
803
+ } catch (e) {
804
+ }
805
+ return;
806
+ });
807
+ }
808
+ this.observers.push(observer);
809
+ return unsub;
810
+ }
811
+ // Unsubscribe is synchronous - we guarantee that no events are sent to
812
+ // any unsubscribed Observer.
813
+ unsubscribeOne(i) {
814
+ if (this.observers === void 0 || this.observers[i] === void 0) {
815
+ return;
816
+ }
817
+ delete this.observers[i];
818
+ this.observerCount -= 1;
819
+ if (this.observerCount === 0 && this.onNoObservers !== void 0) {
820
+ this.onNoObservers(this);
821
+ }
822
+ }
823
+ forEachObserver(fn) {
824
+ if (this.finalized) {
825
+ return;
826
+ }
827
+ for (let i = 0; i < this.observers.length; i++) {
828
+ this.sendOne(i, fn);
829
+ }
830
+ }
831
+ // Call the Observer via one of it's callback function. We are careful to
832
+ // confirm that the observe has not been unsubscribed since this asynchronous
833
+ // function had been queued.
834
+ sendOne(i, fn) {
835
+ this.task.then(() => {
836
+ if (this.observers !== void 0 && this.observers[i] !== void 0) {
837
+ try {
838
+ fn(this.observers[i]);
839
+ } catch (e) {
840
+ if (typeof console !== "undefined" && console.error) {
841
+ console.error(e);
842
+ }
843
+ }
844
+ }
845
+ });
846
+ }
847
+ close(err) {
848
+ if (this.finalized) {
849
+ return;
850
+ }
851
+ this.finalized = true;
852
+ if (err !== void 0) {
853
+ this.finalError = err;
854
+ }
855
+ this.task.then(() => {
856
+ this.observers = void 0;
857
+ this.onNoObservers = void 0;
858
+ });
859
+ }
860
+ }
861
+ function implementsAnyMethods(obj, methods) {
862
+ if (typeof obj !== "object" || obj === null) {
863
+ return false;
864
+ }
865
+ for (const method of methods) {
866
+ if (method in obj && typeof obj[method] === "function") {
867
+ return true;
868
+ }
869
+ }
870
+ return false;
871
+ }
872
+ function noop() {
873
+ }
874
+ /**
875
+ * @license
876
+ * Copyright 2021 Google LLC
877
+ *
878
+ * Licensed under the Apache License, Version 2.0 (the "License");
879
+ * you may not use this file except in compliance with the License.
880
+ * You may obtain a copy of the License at
881
+ *
882
+ * http://www.apache.org/licenses/LICENSE-2.0
883
+ *
884
+ * Unless required by applicable law or agreed to in writing, software
885
+ * distributed under the License is distributed on an "AS IS" BASIS,
886
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
887
+ * See the License for the specific language governing permissions and
888
+ * limitations under the License.
889
+ */
890
+ function getModularInstance(service) {
891
+ if (service && service._delegate) {
892
+ return service._delegate;
893
+ } else {
894
+ return service;
895
+ }
896
+ }
897
+ export {
898
+ DecodeBase64StringError,
899
+ Deferred,
900
+ ErrorFactory,
901
+ FirebaseError,
902
+ areCookiesEnabled,
903
+ base64,
904
+ base64Decode,
905
+ base64Encode,
906
+ base64urlEncodeWithoutPadding,
907
+ createMockUserToken,
908
+ createSubscribe,
909
+ deepEqual,
910
+ extractQuerystring,
911
+ getDefaultAppConfig,
912
+ getDefaultEmulatorHost,
913
+ getDefaultEmulatorHostnameAndPort,
914
+ getDefaults,
915
+ getExperimentalSetting,
916
+ getGlobal,
917
+ getModularInstance,
918
+ getUA,
919
+ isBrowserExtension,
920
+ isCloudflareWorker,
921
+ isEmpty,
922
+ isIE,
923
+ isIndexedDBAvailable,
924
+ isMobileCordova,
925
+ isNode,
926
+ isReactNative,
927
+ isSafari,
928
+ querystring,
929
+ querystringDecode,
930
+ validateIndexedDBOpenable
931
+ };