{"version":3,"sources":["node_modules/dayjs/dayjs.min.js","node_modules/dayjs/plugin/utc.js","libs/uikit/src/lib/empty-state/empty-state.component.ts","libs/uikit/src/lib/empty-state/empty-state.component.html","libs/uikit/src/lib/empty-state/empty-state.module.ts","libs/uikit/src/lib/confirmation/confirmation.module.ts","libs/uikit/src/lib/assets/i18n/en_devel.json","libs/uikit/src/lib/constants.ts","libs/uikit/src/lib/date-range-selector/date-range-selector.service.ts","libs/uikit/src/lib/date-range-selector/constants.ts","libs/uikit/src/lib/date-range-selector/date-range-selector.component.ts","libs/uikit/src/lib/date-range-selector/date-range-selector.component.html","libs/uikit/src/lib/date-range-selector/date-range-selector.module.ts","libs/uikit/src/lib/va-cards/va-cards.interface.ts","libs/uikit/src/lib/va-cards/va-card/va-card.component.ts","libs/uikit/src/lib/va-cards/va-card/va-card.component.html","libs/uikit/src/lib/va-cards/va-card-header/va-card-header.component.ts","libs/uikit/src/lib/va-cards/va-card-header/va-card-header.component.html","libs/uikit/src/lib/va-cards/va-card-link-button/va-card-link-button.component.ts","libs/uikit/src/lib/va-cards/va-card-link-button/va-card-link-button.component.html","libs/uikit/src/lib/va-cards/va-card-break-line/va-card-break-line.component.ts","libs/uikit/src/lib/va-cards/va-card-content/va-card-content.component.ts","libs/uikit/src/lib/va-cards/va-card-content/va-card-content.component.html","libs/uikit/src/lib/va-cards/va-card-break-group/va-card-break-group.component.ts","libs/uikit/src/lib/va-cards/va-card-break-group/va-card-break-group.component.html","libs/uikit/src/lib/va-cards/va-layout.directive.ts","libs/uikit/src/lib/common-pipes/display-value.pipe.ts","libs/uikit/src/lib/va-cards/va-card-content/options/number-with-change/number-with-change.component.ts","libs/uikit/src/lib/va-cards/va-card-content/options/number-with-change/number-with-change.component.html","libs/uikit/src/lib/common-pipes/phone-number.pipe.ts","libs/uikit/src/lib/common-pipes/common-pipes.module.ts","libs/uikit/src/lib/va-cards/va-cards.module.ts","node_modules/marked/lib/marked.esm.js","node_modules/ngx-markdown/fesm2020/ngx-markdown.mjs","libs/uikit/src/lib/va-icon/icon.component.ts","libs/uikit/src/lib/va-icon/icon.module.ts","libs/uikit/src/lib/project-milestones/project-milestones.module.ts","libs/uikit/src/lib/search-box/search-box-input.directive.ts","libs/uikit/src/lib/local-storage.service.ts","libs/uikit/src/lib/search-box/search-box.service.ts","libs/uikit/src/lib/search-box/search-box.component.ts","libs/uikit/src/lib/search-box/va-search-box.module.ts","libs/uikit/src/lib/va-badge/va-badge.component.ts","libs/uikit/src/lib/va-badge/va-badge.module.ts","libs/uikit/src/lib/va-breadcrumbs/va-breadcrumbs.ts","libs/uikit/src/lib/va-breadcrumbs/va-breadcrumbs.component.ts","libs/uikit/src/lib/va-breadcrumbs/va-breadcrumbs.component.html","libs/uikit/src/lib/va-breadcrumbs/va-breadcrumbs.module.ts","libs/uikit/src/lib/va-filter-chips/va-filter-chip/va-filter-chip.component.ts","libs/uikit/src/lib/va-filter-chips/va-filter-chip/va-filter-chip.component.html","libs/uikit/src/lib/va-filter-chips/va-filter-chip-container/va-filter-chip-container.component.ts","libs/uikit/src/lib/va-filter-chips/va-filter-chip-container/va-filter-chip-container.component.html","libs/uikit/src/lib/va-filter-chips/va-filter-chips.module.ts","libs/uikit/src/lib/va-search-select/search-select.component.ts","libs/uikit/src/lib/va-search-select/search-select.component.html","libs/uikit/src/lib/va-search-select/va-search-select.module.ts","libs/uikit/src/lib/va-items-and-status/va-items-and-status.component.ts","libs/uikit/src/lib/va-items-and-status/va-items-and-status.component.html","libs/uikit/src/lib/va-items-and-status/va-items-and-status.module.ts","libs/uikit/src/lib/va-multi-select/va-multi-select.component.ts","libs/uikit/src/lib/va-multi-select/va-multi-select.component.html","libs/uikit/src/lib/va-multi-select/va-multi-select.module.ts","libs/uikit/src/lib/va-filter/filters/filter.translation.ts","libs/uikit/src/lib/va-filter/filters/filter.ts","libs/uikit/src/lib/va-filter/filters/multi-items-and-status/filter-field-multi-items-and-status.ts","libs/uikit/src/lib/va-filter/filters/multi-select/filter-field-multi-select.ts","libs/uikit/src/lib/va-filter/filters/tabbed/filter-field-tabbed.ts","libs/uikit/src/lib/va-filter/filters/radio/filter-field-radio.translation.ts","libs/uikit/src/lib/va-filter/filters/radio/filter-field-radio.ts","libs/uikit/src/lib/va-filter/applied-filters-bar.component.ts","libs/uikit/src/lib/va-filter/filters/filter-field.component.ts","libs/uikit/src/lib/va-filter/filters/text/filter-field-text.component.ts","libs/uikit/src/lib/va-filter/filters/checkbox/filter-field-checkbox.ts","libs/uikit/src/lib/va-filter/filters/checkbox/filter-field-checkbox.component.ts","libs/uikit/src/lib/va-filter/filters/date-picker/filter-field-date-picker.ts","libs/uikit/src/lib/va-filter/filters/date-picker/filter-field-date-picker.component.ts","libs/uikit/src/lib/va-filter/filters/search-select/filter-field-search-select.ts","libs/uikit/src/lib/va-filter/filters/search-select/filter-field-search-select.component.ts","libs/uikit/src/lib/va-filter/filters/items-and-status/filter-field-items-and-status.component.ts","libs/uikit/src/lib/va-filter/filters/multi-items-and-status/filter-field-multi-items-and-status.component.ts","libs/uikit/src/lib/va-filter/filters/multi-select/filter-field-multi-select.component.ts","libs/uikit/src/lib/va-filter/filters/tabbed/filter-field-tabbed.component.ts","libs/uikit/src/lib/va-filter/filters/radio/filter-field-radio.component.ts","libs/uikit/src/lib/va-filter/filters/range/filter-field-range.component.ts","libs/uikit/src/lib/va-filter/filters/filter.directive.ts","libs/uikit/src/lib/url-param.service.ts","libs/uikit/src/lib/va-filter/filter.service.ts","libs/uikit/src/lib/va-filter/save-applied-filters-dialog.component.ts","libs/uikit/src/lib/va-filter/manage-saved-filters-dialog.component.ts","libs/uikit/src/lib/va-filter/saved-filters-menu.component.ts","libs/uikit/src/lib/va-filter/filter.component.ts","libs/uikit/src/lib/va-filter/filter-container.component.ts","libs/uikit/src/lib/va-filter/filter.module.ts","libs/uikit/src/lib/va-action-menu/va-action-menu.component.ts","libs/uikit/src/lib/va-action-menu/va-action-menu.module.ts","libs/uikit/src/lib/sort/sort.ts","libs/uikit/src/lib/va-list/va-list.module.ts","libs/uikit/src/lib/va-mat-table/actions/advanced-column-organizer/advanced-column-organizer.ts","libs/uikit/src/lib/va-mat-table/actions/advanced-column-organizer/advanced-column-organizer.service.ts","libs/uikit/src/lib/va-mat-table/actions/advanced-column-organizer/advanced-column-organizer.compontent.ts","libs/uikit/src/lib/va-mat-table/actions/advanced-column-organizer/advanced-column-organizer.component.html","libs/uikit/src/lib/va-mat-table/actions/advanced-column-organizer/advanced-column-organizer-button.component.ts","libs/uikit/src/lib/va-mat-table/actions/column-sorter/column-sorter.service.ts","libs/uikit/src/lib/va-mat-table/actions/column-sorter/column-sorter.component.ts","libs/uikit/src/lib/va-mat-table/actions/column-sorter/column-sorter.component.html","libs/uikit/src/lib/va-mat-table/va-mat-table.component.ts","libs/uikit/src/lib/va-mat-table/va-mat-table.component.html","libs/uikit/src/lib/va-mat-table/va-mat-table.module.ts","node_modules/@angular/material/fesm2022/badge.mjs","libs/uikit/src/lib/va-status-banner/va-status-banner.component.ts","libs/uikit/src/lib/va-status-banner/va-status-banner.component.html","libs/uikit/src/lib/va-status-banner/va-status-banner.module.ts","libs/uikit/src/lib/va-stencils/list-stencil.component.ts","libs/uikit/src/lib/va-stencils/stencils.module.ts","libs/uikit/src/lib/wrappers/va-button/va-button.component.ts","libs/uikit/src/lib/wrappers/va-button/va-button.module.ts","libs/uikit/src/lib/wrappers/va-checkbox/va-checkbox.component.ts","libs/uikit/src/lib/wrappers/va-checkbox/va-checkbox.module.ts","libs/uikit/src/lib/wrappers/va-chip/va-chip.component.ts","libs/uikit/src/lib/wrappers/va-chip/va-chip.module.ts","libs/uikit/src/lib/wrappers/va-expand/va-expand.directive.ts","libs/uikit/src/lib/wrappers/va-expand/va-expand.module.ts","libs/uikit/src/lib/wrappers/va-menu/va-menu.component.ts","libs/uikit/src/lib/wrappers/va-menu/va-menu.module.ts","libs/uikit/src/lib/wrappers/va-multiline/va-multiline.component.ts","libs/uikit/src/lib/wrappers/va-multiline/va-multiline.module.ts","libs/uikit/src/lib/wrappers/va-switch/va-switch.component.ts","libs/uikit/src/lib/wrappers/va-switch/va-switch.module.ts","libs/uikit/src/lib/va-table/cells/cell.directive.ts","libs/uikit/src/lib/va-table/table.ts","libs/uikit/src/lib/va-table/table.pipe.ts","libs/uikit/src/lib/va-table/table.component.ts","libs/uikit/src/lib/va-table/table.module.ts","libs/uikit/src/lib/get-pro-dialog/get-pro-dialog.component.ts","libs/uikit/src/lib/get-pro-dialog/get-pro-dialog.component.html","libs/uikit/src/lib/get-pro-dialog/get-pro-dialog.module.ts","libs/uikit/src/lib/goal-table/goal-table.module.ts","libs/uikit/src/lib/safe-html/safe-html.pipe.ts","libs/uikit/src/lib/safe-html/safe-html.module.ts","libs/uikit/src/lib/lightbox/lightbox.component.ts","libs/uikit/src/lib/lightbox/lightbox.component.html","libs/uikit/src/lib/lightbox/fullscreen-lightbox.service.ts","libs/uikit/src/lib/va-image-gallery/image-gallery.component.ts","libs/uikit/src/lib/va-nav/nav-item-list/nav-item-list.module.ts","libs/uikit/src/lib/va-nav/nav-item/nav-item.module.ts","libs/uikit/src/lib/va-nav/nav.module.ts","libs/uikit/src/lib/va-nested-selector/nested-selector.ts","libs/uikit/src/lib/va-nested-selector/va-nested-selector.module.ts","libs/uikit/src/lib/va-product-nav/va-product-nav.service.ts","libs/atlas/core/src/config.service.ts","node_modules/@vendasta/atlas/fesm2020/vendasta-atlas.mjs","libs/atlas/core/src/language.ts","libs/atlas/core/src/data.service.ts","libs/atlas/core/src/language.service.ts","node_modules/firebase/app/dist/esm/index.esm.js","node_modules/@angular/fire/fesm2022/angular-fire.mjs","node_modules/@angular/fire/fesm2022/angular-fire-app.mjs","node_modules/@firebase/app-check/dist/esm/index.esm2017.js","node_modules/@angular/fire/fesm2022/angular-fire-app-check.mjs","node_modules/firebase/compat/app/dist/esm/index.esm.js","node_modules/@angular/fire/fesm2022/angular-fire-compat.mjs","node_modules/@angular/fire/fesm2022/angular-fire-compat-auth.mjs","node_modules/@firebase/firestore-compat/dist/index.esm2017.js","node_modules/@angular/fire/fesm2022/angular-fire-compat-firestore.mjs","libs/atlas/src/lib/menu/menu.service.ts","libs/atlas/src/lib/menu-item/menu-item.component.ts","libs/atlas/src/lib/menu-item/menu-item.component.html","libs/atlas/src/lib/menu/menu.component.ts","libs/atlas/src/lib/menu/menu.component.html","libs/atlas/src/lib/core-components/chip/chip.component.ts","libs/atlas/src/lib/core-components/chip/chip.component.html","libs/atlas/src/lib/item/item.component.ts","libs/atlas/src/lib/item/item.component.html","libs/atlas/src/lib/center-selector/center-selector.component.ts","libs/atlas/src/lib/center-selector/center-selector.component.html","libs/atlas/src/lib/core-components/panel/panel-content.component.ts","libs/atlas/src/lib/core-components/panel/panel-content.component.html","libs/atlas/src/lib/core-components/button/icon-button.directive.ts","libs/atlas/src/lib/core-components/panel/panel-header.component.ts","libs/atlas/src/lib/core-components/panel/panel-header.component.html","libs/atlas/src/lib/core-components/panel/panel.component.ts","libs/atlas/src/lib/core-components/panel/panel.component.html","libs/atlas/src/lib/core-components/loader/loader.component.ts","libs/atlas/src/lib/core-components/loader/loader.component.html","libs/atlas/src/lib/core-components/button/button.component.ts","libs/atlas/src/lib/core-components/button/button.component.html","libs/atlas/src/lib/core-components/checkbox/checkbox.component.ts","libs/atlas/src/lib/core-components/checkbox/checkbox.component.html","libs/atlas/src/lib/core-components/ink-bar/ink-bar.component.ts","libs/atlas/src/lib/core-components/modal/modal-content.component.ts","libs/atlas/src/lib/core-components/modal/modal-content.component.html","libs/atlas/src/lib/core-components/modal/modal-footer.component.ts","libs/atlas/src/lib/core-components/modal/modal-footer.component.html","libs/atlas/src/lib/core-components/modal/modal-header.component.ts","libs/atlas/src/lib/core-components/modal/modal-header.component.html","libs/atlas/src/lib/core-components/modal/modal.component.ts","libs/atlas/src/lib/core-components/modal/modal.component.html","libs/atlas/src/lib/core-components/modal/modal.service.ts","libs/atlas/src/lib/core-components/panel/panel-description.component.ts","libs/atlas/src/lib/core-components/panel/panel-description.component.html","libs/atlas/src/lib/core-components/panel/panel-title.component.ts","libs/atlas/src/lib/core-components/panel/panel-title.component.html","libs/atlas/src/lib/core-components/snackbar/snackbar.service.ts","libs/atlas/src/lib/core-components/tab/tab.component.ts","libs/atlas/src/lib/core-components/tab/tab.component.html","libs/atlas/src/lib/core-components/tab/tab-header.component.ts","libs/atlas/src/lib/core-components/tab/tab-header.component.html","libs/atlas/src/lib/core-components/tab/tab-group.component.ts","libs/atlas/src/lib/core-components/tab/tab-group.component.html","libs/atlas/src/lib/core-components/tooltip/tooltip-animations.ts","libs/atlas/src/lib/core-components/tooltip/tooltip.ts","libs/atlas/src/lib/core-components/tooltip/tooltip.html","libs/atlas/src/lib/core-components/tooltip/tooltip-module.ts","libs/atlas/src/lib/email-verification/email-verification.service.ts","libs/atlas/src/lib/email-verification/email-verification.component.ts","libs/atlas/src/lib/email-verification/email-verification.component.html","libs/atlas/src/lib/language-selector/modal/language-list/language-list-item/language-list-item.component.ts","libs/atlas/src/lib/language-selector/modal/language-list/language-list-item/language-list-item.component.html","libs/atlas/src/lib/language-selector/modal/language-list/language-list.component.ts","libs/atlas/src/lib/language-selector/modal/language-list/language-list.component.html","libs/atlas/src/lib/language-selector/modal/language-selector-modal.component.ts","libs/atlas/src/lib/language-selector/modal/language-selector-modal.component.html","libs/atlas/src/lib/languages/en_devel.json","libs/atlas/src/lib/vbc_sdk/host.service.ts","libs/atlas/src/lib/vbc_sdk/_internal/objects/notifications.ts","libs/atlas/src/lib/vbc_sdk/_internal/notifications.api.service.ts","libs/atlas/src/lib/vbc_sdk/notifications.service.ts","libs/atlas/src/lib/account-notification.service.ts","node_modules/@vendasta/notifications-sdk/fesm2020/vendasta-notifications-sdk.mjs","libs/atlas/src/lib/notifications/strip-html.ts","libs/atlas/src/lib/notifications/notifications.service.ts","libs/atlas/src/lib/notifications/settings/settings-form/settings-form.component.ts","libs/atlas/src/lib/notifications/settings/settings-form/settings-form.component.html","libs/atlas/src/lib/notifications/settings/settings.component.ts","libs/atlas/src/lib/notifications/settings/settings.component.html","libs/atlas/src/lib/theming.service.ts","libs/atlas/src/lib/top-bar/top-bar.service.ts","libs/atlas/src/lib/user-language-modal/user-language-modal.component.ts","libs/atlas/src/lib/user-language-modal/user-language-modal.component.html","libs/atlas/src/lib/user-language-modal/user-language-modal.service.ts","node_modules/firebase/node_modules/@firebase/auth/dist/esm2017/index-dd468b12.js","node_modules/@angular/fire/fesm2022/angular-fire-auth.mjs","node_modules/rxfire/firestore/index.esm.js","node_modules/@angular/fire/fesm2022/angular-fire-firestore.mjs","libs/atlas/src/lib/realtime/firestore.ts","libs/atlas/src/lib/notifications/notification.ts","libs/atlas/src/lib/notifications/subscription-state.ts","libs/atlas/src/lib/notifications/notification/notification.component.ts","libs/atlas/src/lib/notifications/notification/notification.component.html","libs/atlas/src/lib/notifications/flyout/flyout.component.ts","libs/atlas/src/lib/notifications/flyout/flyout.component.html","libs/atlas/src/lib/notifications/notifications.component.ts","libs/atlas/src/lib/notifications/notifications.component.html","libs/atlas/src/lib/user-switcher-modal/user-switcher-modal.component.ts","libs/atlas/src/lib/user-switcher-modal/user-switcher-modal.component.html","libs/atlas/src/lib/user-dropdown/user-dropdown.component.ts","libs/atlas/src/lib/user-dropdown/user-dropdown.component.html","libs/atlas/src/lib/top-bar/top-bar.component.ts","libs/atlas/src/lib/top-bar/top-bar.component.html","libs/atlas/src/lib/nav/nav.component.ts","libs/atlas/src/lib/nav/nav.component.html","libs/atlas/src/lib/title/title.component.ts","libs/atlas/src/lib/title/title.component.html","libs/atlas/src/lib/realtime/config.ts","libs/atlas/src/lib/atlas.module.ts","libs/uikit/src/lib/va-product-nav/va-product-nav.module.ts","libs/uikit/src/lib/va-welcome/welcome.module.ts","libs/uikit/src/lib/uikit.module.ts","libs/uikit/src/lib/va-chart/va-legend-item/va-legend-item.component.ts","libs/uikit/src/lib/va-chart/va-legend-item/va-legend-item.component.html","libs/uikit/src/lib/va-chart/va-chart.module.ts","libs/uikit/src/lib/async-ui/async-ui.model.ts","libs/uikit/src/lib/async-ui/success-data.directive.ts","libs/uikit/src/lib/async-ui/async-ui.component.ts","libs/uikit/src/lib/async-ui/async-ui.component.html","libs/uikit/src/lib/async-ui/async-ui.module.ts","libs/uikit/src/lib/confirmation/confirmation.service.ts","libs/uikit/src/lib/datepicker/date-utilities.ts","libs/uikit/src/lib/local-refreshing-cache.service.ts","libs/uikit/src/lib/va-table/cells/button-cell.ts","libs/uikit/src/lib/va-table/cells/chip-cell.ts","libs/uikit/src/lib/va-table/cells/menu-cell.ts","libs/uikit/src/lib/va-table/cells/multiline-cell.ts","libs/uikit/src/lib/va-table/cells/switch-cell.ts","libs/uikit/src/lib/vimg/v-img.module.ts"],"sourcesContent":["!function (t, e) {\n \"object\" == typeof exports && \"undefined\" != typeof module ? module.exports = e() : \"function\" == typeof define && define.amd ? define(e) : (t = \"undefined\" != typeof globalThis ? globalThis : t || self).dayjs = e();\n}(this, function () {\n \"use strict\";\n\n var t = 1e3,\n e = 6e4,\n n = 36e5,\n r = \"millisecond\",\n i = \"second\",\n s = \"minute\",\n u = \"hour\",\n a = \"day\",\n o = \"week\",\n c = \"month\",\n f = \"quarter\",\n h = \"year\",\n d = \"date\",\n l = \"Invalid Date\",\n $ = /^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,\n y = /\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,\n M = {\n name: \"en\",\n weekdays: \"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),\n months: \"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),\n ordinal: function (t) {\n var e = [\"th\", \"st\", \"nd\", \"rd\"],\n n = t % 100;\n return \"[\" + t + (e[(n - 20) % 10] || e[n] || e[0]) + \"]\";\n }\n },\n m = function (t, e, n) {\n var r = String(t);\n return !r || r.length >= e ? t : \"\" + Array(e + 1 - r.length).join(n) + t;\n },\n v = {\n s: m,\n z: function (t) {\n var e = -t.utcOffset(),\n n = Math.abs(e),\n r = Math.floor(n / 60),\n i = n % 60;\n return (e <= 0 ? \"+\" : \"-\") + m(r, 2, \"0\") + \":\" + m(i, 2, \"0\");\n },\n m: function t(e, n) {\n if (e.date() < n.date()) return -t(n, e);\n var r = 12 * (n.year() - e.year()) + (n.month() - e.month()),\n i = e.clone().add(r, c),\n s = n - i < 0,\n u = e.clone().add(r + (s ? -1 : 1), c);\n return +(-(r + (n - i) / (s ? i - u : u - i)) || 0);\n },\n a: function (t) {\n return t < 0 ? Math.ceil(t) || 0 : Math.floor(t);\n },\n p: function (t) {\n return {\n M: c,\n y: h,\n w: o,\n d: a,\n D: d,\n h: u,\n m: s,\n s: i,\n ms: r,\n Q: f\n }[t] || String(t || \"\").toLowerCase().replace(/s$/, \"\");\n },\n u: function (t) {\n return void 0 === t;\n }\n },\n g = \"en\",\n D = {};\n D[g] = M;\n var p = \"$isDayjsObject\",\n S = function (t) {\n return t instanceof _ || !(!t || !t[p]);\n },\n w = function t(e, n, r) {\n var i;\n if (!e) return g;\n if (\"string\" == typeof e) {\n var s = e.toLowerCase();\n D[s] && (i = s), n && (D[s] = n, i = s);\n var u = e.split(\"-\");\n if (!i && u.length > 1) return t(u[0]);\n } else {\n var a = e.name;\n D[a] = e, i = a;\n }\n return !r && i && (g = i), i || !r && g;\n },\n O = function (t, e) {\n if (S(t)) return t.clone();\n var n = \"object\" == typeof e ? e : {};\n return n.date = t, n.args = arguments, new _(n);\n },\n b = v;\n b.l = w, b.i = S, b.w = function (t, e) {\n return O(t, {\n locale: e.$L,\n utc: e.$u,\n x: e.$x,\n $offset: e.$offset\n });\n };\n var _ = function () {\n function M(t) {\n this.$L = w(t.locale, null, !0), this.parse(t), this.$x = this.$x || t.x || {}, this[p] = !0;\n }\n var m = M.prototype;\n return m.parse = function (t) {\n this.$d = function (t) {\n var e = t.date,\n n = t.utc;\n if (null === e) return new Date(NaN);\n if (b.u(e)) return new Date();\n if (e instanceof Date) return new Date(e);\n if (\"string\" == typeof e && !/Z$/i.test(e)) {\n var r = e.match($);\n if (r) {\n var i = r[2] - 1 || 0,\n s = (r[7] || \"0\").substring(0, 3);\n return n ? new Date(Date.UTC(r[1], i, r[3] || 1, r[4] || 0, r[5] || 0, r[6] || 0, s)) : new Date(r[1], i, r[3] || 1, r[4] || 0, r[5] || 0, r[6] || 0, s);\n }\n }\n return new Date(e);\n }(t), this.init();\n }, m.init = function () {\n var t = this.$d;\n this.$y = t.getFullYear(), this.$M = t.getMonth(), this.$D = t.getDate(), this.$W = t.getDay(), this.$H = t.getHours(), this.$m = t.getMinutes(), this.$s = t.getSeconds(), this.$ms = t.getMilliseconds();\n }, m.$utils = function () {\n return b;\n }, m.isValid = function () {\n return !(this.$d.toString() === l);\n }, m.isSame = function (t, e) {\n var n = O(t);\n return this.startOf(e) <= n && n <= this.endOf(e);\n }, m.isAfter = function (t, e) {\n return O(t) < this.startOf(e);\n }, m.isBefore = function (t, e) {\n return this.endOf(e) < O(t);\n }, m.$g = function (t, e, n) {\n return b.u(t) ? this[e] : this.set(n, t);\n }, m.unix = function () {\n return Math.floor(this.valueOf() / 1e3);\n }, m.valueOf = function () {\n return this.$d.getTime();\n }, m.startOf = function (t, e) {\n var n = this,\n r = !!b.u(e) || e,\n f = b.p(t),\n l = function (t, e) {\n var i = b.w(n.$u ? Date.UTC(n.$y, e, t) : new Date(n.$y, e, t), n);\n return r ? i : i.endOf(a);\n },\n $ = function (t, e) {\n return b.w(n.toDate()[t].apply(n.toDate(\"s\"), (r ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e)), n);\n },\n y = this.$W,\n M = this.$M,\n m = this.$D,\n v = \"set\" + (this.$u ? \"UTC\" : \"\");\n switch (f) {\n case h:\n return r ? l(1, 0) : l(31, 11);\n case c:\n return r ? l(1, M) : l(0, M + 1);\n case o:\n var g = this.$locale().weekStart || 0,\n D = (y < g ? y + 7 : y) - g;\n return l(r ? m - D : m + (6 - D), M);\n case a:\n case d:\n return $(v + \"Hours\", 0);\n case u:\n return $(v + \"Minutes\", 1);\n case s:\n return $(v + \"Seconds\", 2);\n case i:\n return $(v + \"Milliseconds\", 3);\n default:\n return this.clone();\n }\n }, m.endOf = function (t) {\n return this.startOf(t, !1);\n }, m.$set = function (t, e) {\n var n,\n o = b.p(t),\n f = \"set\" + (this.$u ? \"UTC\" : \"\"),\n l = (n = {}, n[a] = f + \"Date\", n[d] = f + \"Date\", n[c] = f + \"Month\", n[h] = f + \"FullYear\", n[u] = f + \"Hours\", n[s] = f + \"Minutes\", n[i] = f + \"Seconds\", n[r] = f + \"Milliseconds\", n)[o],\n $ = o === a ? this.$D + (e - this.$W) : e;\n if (o === c || o === h) {\n var y = this.clone().set(d, 1);\n y.$d[l]($), y.init(), this.$d = y.set(d, Math.min(this.$D, y.daysInMonth())).$d;\n } else l && this.$d[l]($);\n return this.init(), this;\n }, m.set = function (t, e) {\n return this.clone().$set(t, e);\n }, m.get = function (t) {\n return this[b.p(t)]();\n }, m.add = function (r, f) {\n var d,\n l = this;\n r = Number(r);\n var $ = b.p(f),\n y = function (t) {\n var e = O(l);\n return b.w(e.date(e.date() + Math.round(t * r)), l);\n };\n if ($ === c) return this.set(c, this.$M + r);\n if ($ === h) return this.set(h, this.$y + r);\n if ($ === a) return y(1);\n if ($ === o) return y(7);\n var M = (d = {}, d[s] = e, d[u] = n, d[i] = t, d)[$] || 1,\n m = this.$d.getTime() + r * M;\n return b.w(m, this);\n }, m.subtract = function (t, e) {\n return this.add(-1 * t, e);\n }, m.format = function (t) {\n var e = this,\n n = this.$locale();\n if (!this.isValid()) return n.invalidDate || l;\n var r = t || \"YYYY-MM-DDTHH:mm:ssZ\",\n i = b.z(this),\n s = this.$H,\n u = this.$m,\n a = this.$M,\n o = n.weekdays,\n c = n.months,\n f = n.meridiem,\n h = function (t, n, i, s) {\n return t && (t[n] || t(e, r)) || i[n].slice(0, s);\n },\n d = function (t) {\n return b.s(s % 12 || 12, t, \"0\");\n },\n $ = f || function (t, e, n) {\n var r = t < 12 ? \"AM\" : \"PM\";\n return n ? r.toLowerCase() : r;\n };\n return r.replace(y, function (t, r) {\n return r || function (t) {\n switch (t) {\n case \"YY\":\n return String(e.$y).slice(-2);\n case \"YYYY\":\n return b.s(e.$y, 4, \"0\");\n case \"M\":\n return a + 1;\n case \"MM\":\n return b.s(a + 1, 2, \"0\");\n case \"MMM\":\n return h(n.monthsShort, a, c, 3);\n case \"MMMM\":\n return h(c, a);\n case \"D\":\n return e.$D;\n case \"DD\":\n return b.s(e.$D, 2, \"0\");\n case \"d\":\n return String(e.$W);\n case \"dd\":\n return h(n.weekdaysMin, e.$W, o, 2);\n case \"ddd\":\n return h(n.weekdaysShort, e.$W, o, 3);\n case \"dddd\":\n return o[e.$W];\n case \"H\":\n return String(s);\n case \"HH\":\n return b.s(s, 2, \"0\");\n case \"h\":\n return d(1);\n case \"hh\":\n return d(2);\n case \"a\":\n return $(s, u, !0);\n case \"A\":\n return $(s, u, !1);\n case \"m\":\n return String(u);\n case \"mm\":\n return b.s(u, 2, \"0\");\n case \"s\":\n return String(e.$s);\n case \"ss\":\n return b.s(e.$s, 2, \"0\");\n case \"SSS\":\n return b.s(e.$ms, 3, \"0\");\n case \"Z\":\n return i;\n }\n return null;\n }(t) || i.replace(\":\", \"\");\n });\n }, m.utcOffset = function () {\n return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);\n }, m.diff = function (r, d, l) {\n var $,\n y = this,\n M = b.p(d),\n m = O(r),\n v = (m.utcOffset() - this.utcOffset()) * e,\n g = this - m,\n D = function () {\n return b.m(y, m);\n };\n switch (M) {\n case h:\n $ = D() / 12;\n break;\n case c:\n $ = D();\n break;\n case f:\n $ = D() / 3;\n break;\n case o:\n $ = (g - v) / 6048e5;\n break;\n case a:\n $ = (g - v) / 864e5;\n break;\n case u:\n $ = g / n;\n break;\n case s:\n $ = g / e;\n break;\n case i:\n $ = g / t;\n break;\n default:\n $ = g;\n }\n return l ? $ : b.a($);\n }, m.daysInMonth = function () {\n return this.endOf(c).$D;\n }, m.$locale = function () {\n return D[this.$L];\n }, m.locale = function (t, e) {\n if (!t) return this.$L;\n var n = this.clone(),\n r = w(t, e, !0);\n return r && (n.$L = r), n;\n }, m.clone = function () {\n return b.w(this.$d, this);\n }, m.toDate = function () {\n return new Date(this.valueOf());\n }, m.toJSON = function () {\n return this.isValid() ? this.toISOString() : null;\n }, m.toISOString = function () {\n return this.$d.toISOString();\n }, m.toString = function () {\n return this.$d.toUTCString();\n }, M;\n }(),\n k = _.prototype;\n return O.prototype = k, [[\"$ms\", r], [\"$s\", i], [\"$m\", s], [\"$H\", u], [\"$W\", a], [\"$M\", c], [\"$y\", h], [\"$D\", d]].forEach(function (t) {\n k[t[1]] = function (e) {\n return this.$g(e, t[0], t[1]);\n };\n }), O.extend = function (t, e) {\n return t.$i || (t(e, _, O), t.$i = !0), O;\n }, O.locale = w, O.isDayjs = S, O.unix = function (t) {\n return O(1e3 * t);\n }, O.en = D[g], O.Ls = D, O.p = {}, O;\n});","!function (t, i) {\n \"object\" == typeof exports && \"undefined\" != typeof module ? module.exports = i() : \"function\" == typeof define && define.amd ? define(i) : (t = \"undefined\" != typeof globalThis ? globalThis : t || self).dayjs_plugin_utc = i();\n}(this, function () {\n \"use strict\";\n\n var t = \"minute\",\n i = /[+-]\\d\\d(?::?\\d\\d)?/g,\n e = /([+-]|\\d\\d)/g;\n return function (s, f, n) {\n var u = f.prototype;\n n.utc = function (t) {\n var i = {\n date: t,\n utc: !0,\n args: arguments\n };\n return new f(i);\n }, u.utc = function (i) {\n var e = n(this.toDate(), {\n locale: this.$L,\n utc: !0\n });\n return i ? e.add(this.utcOffset(), t) : e;\n }, u.local = function () {\n return n(this.toDate(), {\n locale: this.$L,\n utc: !1\n });\n };\n var o = u.parse;\n u.parse = function (t) {\n t.utc && (this.$u = !0), this.$utils().u(t.$offset) || (this.$offset = t.$offset), o.call(this, t);\n };\n var r = u.init;\n u.init = function () {\n if (this.$u) {\n var t = this.$d;\n this.$y = t.getUTCFullYear(), this.$M = t.getUTCMonth(), this.$D = t.getUTCDate(), this.$W = t.getUTCDay(), this.$H = t.getUTCHours(), this.$m = t.getUTCMinutes(), this.$s = t.getUTCSeconds(), this.$ms = t.getUTCMilliseconds();\n } else r.call(this);\n };\n var a = u.utcOffset;\n u.utcOffset = function (s, f) {\n var n = this.$utils().u;\n if (n(s)) return this.$u ? 0 : n(this.$offset) ? a.call(this) : this.$offset;\n if (\"string\" == typeof s && (s = function (t) {\n void 0 === t && (t = \"\");\n var s = t.match(i);\n if (!s) return null;\n var f = (\"\" + s[0]).match(e) || [\"-\", 0, 0],\n n = f[0],\n u = 60 * +f[1] + +f[2];\n return 0 === u ? 0 : \"+\" === n ? u : -u;\n }(s), null === s)) return this;\n var u = Math.abs(s) <= 16 ? 60 * s : s,\n o = this;\n if (f) return o.$offset = u, o.$u = 0 === s, o;\n if (0 !== s) {\n var r = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();\n (o = this.local().add(u + r, t)).$offset = u, o.$x.$localOffset = r;\n } else o = this.utc();\n return o;\n };\n var h = u.format;\n u.format = function (t) {\n var i = t || (this.$u ? \"YYYY-MM-DDTHH:mm:ss[Z]\" : \"\");\n return h.call(this, i);\n }, u.valueOf = function () {\n var t = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());\n return this.$d.valueOf() - 6e4 * t;\n }, u.isUTC = function () {\n return !!this.$u;\n }, u.toISOString = function () {\n return this.toDate().toISOString();\n }, u.toString = function () {\n return this.toDate().toUTCString();\n };\n var l = u.toDate;\n u.toDate = function (t) {\n return \"s\" === t && this.$offset ? n(this.format(\"YYYY-MM-DD HH:mm:ss:SSS\")).toDate() : l.call(this);\n };\n var c = u.diff;\n u.diff = function (t, i, e) {\n if (t && this.$u === t.$u) return c.call(this, t, i, e);\n var s = this.local(),\n f = n(t).local();\n return c.call(s, f, i, e);\n };\n };\n});","import { Component, EventEmitter, Input, Output } from '@angular/core';\n\n/**\n * @deprecated Use `glxy-empty-state`: https://github.com/vendasta/galaxy/tree/master/libs/galaxy/empty-state\n */\n@Component({\n selector: 'uikit-empty-state',\n templateUrl: './empty-state.component.html',\n styleUrls: ['./empty-state.component.scss'],\n})\nexport class EmptyStateComponent {\n // Can only provide one of iconName or svgIconName\n @Input() iconName?: string; // A material icon name\n @Input() svgIconName?: string; // A SVG icon name, prerequisite: MUST be registered by hosting app\n @Input() title?: string;\n @Input() ctaPrimaryText?: string;\n @Input() ctaSecondaryText?: string;\n\n @Output() ctaPrimaryEvent: EventEmitter = new EventEmitter();\n @Output() ctaSecondaryEvent: EventEmitter = new EventEmitter();\n\n public primaryAction(): void {\n this.ctaPrimaryEvent.emit(null);\n }\n\n public secondaryAction(): void {\n this.ctaSecondaryEvent.emit(null);\n }\n}\n","
\n {{ iconName }}\n \n

{{ title }}

\n

\n \n

\n \n {{ ctaSecondaryText }}\n \n \n {{ ctaPrimaryText }}\n \n
\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { EmptyStateComponent } from './empty-state.component';\n\n@NgModule({\n declarations: [EmptyStateComponent],\n exports: [EmptyStateComponent],\n imports: [CommonModule, MatIconModule, MatButtonModule],\n})\nexport class EmptyStateModule {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { ConfirmationDialogComponent } from './confirmation-dialog.component';\n\n@NgModule({\n imports: [CommonModule, MatButtonModule, MatDialogModule],\n declarations: [ConfirmationDialogComponent],\n providers: [],\n exports: [],\n})\nexport class ConfirmationModule {}\n","{\n \"FRONTEND\": {\n \"UIKIT\": {\n \"VA_FILTER\": {\n \"FILTERS\": \"Filters\",\n \"EXPORT_FILTER\": \"Export filter\",\n \"IMPORT_THIS_STRING\": \"Import this string to apply your current filters:\",\n \"COPY_TO_CLIPBOARD\": \"Copy to clipboard\",\n \"IMPORT_FILTER\": \"Import filter\",\n \"PASTE_YOUR_FILTER_STRING\": \"Paste your filter string to apply its filters\",\n \"APPLY\": \"Apply\",\n \"MANAGE_YOUR_SAVED_FILTERS\": \"Manage your saved filters\",\n \"CHOOSE_FILTER_NAME\": \"Choose a name for your filter\",\n \"SAVE_YOUR_FILTER\": \"Save your filter\",\n \"SAVE_THIS_FILTER\": \"Save this filter\",\n \"YOUR_BOOKMARKED_FILTERS\": \"Your bookmarked filters\",\n \"MANAGE_FILTERS\": \"Manage filters\"\n },\n \"VA_MAT_TABLE\": {\n \"COLUMNS\": \"Columns\"\n }\n },\n \"DATE_RANGE_SELECTOR\": {\n \"FILTERS\": {\n \"DATE\": {\n \"SEVEN_DAYS\": \"Last 7 days\",\n \"THIRTY_DAYS\": \"Last 30 days\",\n \"NINETY_DAYS\": \"Last 90 days\",\n \"SIX_MONTHS\": \"Last 6 months\",\n \"TWELVE_MONTHS\": \"Last 12 months\",\n \"CUSTOM\": \"Custom\",\n \"MONTH\": \"Month\",\n \"QUARTER\": \"Quarter\",\n \"CHIP\": \"Date\"\n },\n \"QUARTER\": {\n \"FIRST_QUARTER\": \"Q1\",\n \"SECOND_QUARTER\": \"Q2\",\n \"THIRD_QUARTER\": \"Q3\",\n \"FOURTH_QUARTER\": \"Q4\"\n }\n },\n \"COMMON\": {\n \"ACTION_LABELS\": {\n \"CANCEL\": \"Cancel\",\n \"APPLY\": \"Apply\"\n }\n },\n \"TITLE\": \"Selected Date Range\",\n \"DATE_PICKER\": {\n \"START_DATE\": \"Start date\",\n \"END_DATE\": \"End date\"\n },\n \"COMPARE_TO\": \"Compare to\",\n \"PERIOD\": \"Period\"\n }\n }\n}\n","export const WEBLATE_COMPONENT_NAME = 'common/uikit';\n","import { Injectable, OnDestroy } from '@angular/core';\nimport { BehaviorSubject, Observable, Subscription } from 'rxjs';\nimport moment from 'moment';\nimport { DATE_FILTERS, DateFilterOptions, QuarterFilterOption, SEASON_FILTERS } from './constants';\n\nexport interface DateRangeFilter extends DateRange {\n i18nKey?: string;\n}\n\nexport interface DateOption {\n key: DateFilterOptions;\n i18nKey: string;\n daysOffset?: number;\n monthsOffset?: number;\n}\n\nexport interface DateRange {\n start: Date;\n end: Date;\n}\n\nexport interface QuarterOption {\n section: QuarterFilterOption;\n i18nKey: string;\n startMonth: number;\n endMonth: number;\n}\n\nexport interface MomentDateRange {\n start: moment.Moment;\n end: moment.Moment;\n}\n\n// @dynamic\n@Injectable({ providedIn: 'root' })\nexport class DateRangeSelectorService implements OnDestroy {\n private currentKey$$ = new BehaviorSubject(DateFilterOptions.ThirtyDay);\n private dateRangeFilter$$ = new BehaviorSubject(null);\n private compareDateRangeFilter$$ = new BehaviorSubject(null);\n private currKeySub: Subscription;\n private customDates: MomentDateRange;\n private compareDates: DateRange;\n private changeDatePickerType$$: BehaviorSubject = new BehaviorSubject(false);\n private currentCompareDate$$: BehaviorSubject = new BehaviorSubject('');\n\n private static calculateStartDate(end: moment.Moment, daysOffset: number, monthsOffset?: number): moment.Moment {\n const date = moment(end);\n if (monthsOffset && monthsOffset !== 0) {\n date.subtract(monthsOffset, 'months');\n return date;\n }\n date.subtract(daysOffset, 'days');\n return date;\n }\n\n private static getEntryFor(key: DateFilterOptions): DateOption {\n if (key === DateFilterOptions.Month || key === DateFilterOptions.Quarter) {\n return SEASON_FILTERS.find((entry) => key === entry.key);\n }\n return DATE_FILTERS.find((entry) => key === entry.key);\n }\n\n constructor() {\n this.currKeySub = this.currentKey$$.subscribe((key) => {\n this.updateFilter(key);\n this.updateCompareFilter(key);\n });\n }\n\n ngOnDestroy(): void {\n this.currKeySub.unsubscribe();\n }\n\n public getKey(): DateFilterOptions {\n return this.currentKey$$.getValue();\n }\n\n public setKey(newKey: DateFilterOptions): void {\n this.currentKey$$.next(newKey);\n }\n\n public getFilter(): Observable {\n return this.dateRangeFilter$$;\n }\n\n public getCompareFilter(): Observable {\n return this.compareDateRangeFilter$$;\n }\n\n public setAsCustom(customDates: MomentDateRange, compareDateRange?: DateRange): void {\n this.customDates = { ...this.customDates, ...customDates };\n this.compareDates = { ...this.compareDates, ...compareDateRange };\n this.setKey(DateFilterOptions.Custom);\n }\n\n public setAsMonthly(compareDateRange: DateRange): void {\n this.compareDates = { ...this.compareDates, ...compareDateRange };\n this.setKey(DateFilterOptions.Month);\n }\n\n public setAsQuarter(compareDateRange: DateRange): void {\n this.compareDates = { ...this.compareDates, ...compareDateRange };\n this.setKey(DateFilterOptions.Quarter);\n }\n\n public setDatePickerType(useComparableDatePicker: boolean): void {\n this.changeDatePickerType$$.next(useComparableDatePicker);\n }\n\n public getDatePickerType(): Observable {\n return this.changeDatePickerType$$;\n }\n\n public updatePanelCompareDate(newKey: DateFilterOptions, startDate?: Date, endDate?: Date): void {\n this.updateCompareDate(newKey, startDate, endDate);\n }\n\n public getCompareDate(): Observable {\n return this.currentCompareDate$$.asObservable();\n }\n\n private updateFilter(newKey: DateFilterOptions): void {\n const { i18nKey, daysOffset } = DateRangeSelectorService.getEntryFor(newKey);\n\n let start: moment.Moment;\n let end: moment.Moment;\n\n if (newKey === DateFilterOptions.Custom) {\n start = this.customDates.start;\n end = this.customDates.end;\n } else {\n end = moment.utc();\n start = DateRangeSelectorService.calculateStartDate(end, daysOffset);\n }\n\n const newFilter: DateRangeFilter = {\n i18nKey,\n start: moment(start).startOf('day').toDate(),\n end: moment(end).endOf('day').toDate(),\n };\n\n this.dateRangeFilter$$.next(newFilter);\n }\n\n private updateCompareFilter(newKey: DateFilterOptions): void {\n const { i18nKey, daysOffset, monthsOffset } = DateRangeSelectorService.getEntryFor(newKey);\n let start: moment.Moment;\n let end: moment.Moment;\n\n if (\n newKey === DateFilterOptions.Custom ||\n newKey === DateFilterOptions.Month ||\n newKey === DateFilterOptions.Quarter\n ) {\n start = moment(this.compareDates.start);\n end = moment(this.compareDates.end);\n } else {\n end = moment().startOf('day');\n start = DateRangeSelectorService.calculateStartDate(end, daysOffset - 1, monthsOffset - 1);\n }\n\n const newFilter: DateRangeFilter = {\n i18nKey,\n start: start.toDate(),\n end: end.toDate(),\n };\n\n this.compareDateRangeFilter$$.next(newFilter);\n }\n\n private updateCompareDate(newKey: DateFilterOptions, startDate?: Date, endDate?: Date): void {\n const { daysOffset, monthsOffset } = DateRangeSelectorService.getEntryFor(newKey);\n\n let start: moment.Moment;\n let end: moment.Moment;\n const transferStartDate = moment(startDate);\n const transferEndDate = moment(endDate);\n if (newKey === DateFilterOptions.Custom) {\n const diff = transferEndDate.diff(transferStartDate) / (1000 * 24 * 60 * 60);\n end = DateRangeSelectorService.calculateStartDate(transferStartDate.startOf('day'), 1, 0);\n start = DateRangeSelectorService.calculateStartDate(transferStartDate, diff + 1, monthsOffset + 1);\n } else if (newKey === DateFilterOptions.Month) {\n start = moment()\n .year(startDate.getFullYear())\n .month(startDate.getMonth() - 1)\n .startOf('month');\n end = moment()\n .year(startDate.getFullYear())\n .month(startDate.getMonth() - 1)\n .endOf('month');\n } else if (newKey === DateFilterOptions.Quarter) {\n let compareYear = startDate.getFullYear();\n let startMonth = startDate.getMonth();\n if (startDate.getMonth() === 1) {\n compareYear -= 1;\n startMonth = 13;\n }\n end = moment()\n .year(compareYear)\n .month(startMonth - 1)\n .endOf('month');\n start = moment()\n .year(compareYear)\n .month(end.month() - 2)\n .startOf('month');\n } else {\n end = DateRangeSelectorService.calculateStartDate(\n moment().subtract(1, 'day').startOf('day'),\n daysOffset - 1,\n monthsOffset - 1,\n );\n start = DateRangeSelectorService.calculateStartDate(end, daysOffset - 1, monthsOffset - 1);\n }\n const compareRange: DateRange = {\n start: start.toDate(),\n end: end.toDate(),\n };\n this.currentCompareDate$$.next(\n moment(compareRange.start).format('ll') + ' - ' + moment(compareRange.end).format('ll'),\n );\n }\n\n public updateStartDate(newKey: DateFilterOptions): Date {\n const { daysOffset, monthsOffset } = DateRangeSelectorService.getEntryFor(newKey);\n const startDate = DateRangeSelectorService.calculateStartDate(\n moment().startOf('day'),\n daysOffset - 1,\n monthsOffset,\n );\n return moment(startDate).startOf('day').toDate();\n }\n}\n","import { DateOption, QuarterOption } from './date-range-selector.service';\nconst DATE_FILTER_I18N_PATH = 'FRONTEND.DATE_RANGE_SELECTOR.FILTERS.DATE';\nconst QUARTER_FILTER_I18N_PATH = 'FRONTEND.DATE_RANGE_SELECTOR.FILTERS.QUARTER';\n\nexport enum DateFilterOptions {\n Custom,\n SevenDay,\n ThirtyDay,\n ThreeMonth,\n SixMonth,\n TwelveMonth,\n Month,\n Quarter,\n}\n\nexport enum QuarterFilterOption {\n First_Quarter,\n Second_Quarter,\n Third_Quarter,\n Fourth_Quarter,\n}\n\nexport const DATE_FILTERS: DateOption[] = [\n {\n key: DateFilterOptions.Custom,\n i18nKey: `${DATE_FILTER_I18N_PATH}.CUSTOM`,\n },\n {\n key: DateFilterOptions.SevenDay,\n i18nKey: `${DATE_FILTER_I18N_PATH}.SEVEN_DAYS`,\n daysOffset: 7,\n },\n {\n key: DateFilterOptions.ThirtyDay,\n i18nKey: `${DATE_FILTER_I18N_PATH}.THIRTY_DAYS`,\n daysOffset: 30,\n },\n {\n key: DateFilterOptions.ThreeMonth,\n i18nKey: `${DATE_FILTER_I18N_PATH}.NINETY_DAYS`,\n daysOffset: 90,\n },\n {\n key: DateFilterOptions.SixMonth,\n i18nKey: `${DATE_FILTER_I18N_PATH}.SIX_MONTHS`,\n daysOffset: 180,\n monthsOffset: 6,\n },\n {\n key: DateFilterOptions.TwelveMonth,\n i18nKey: `${DATE_FILTER_I18N_PATH}.TWELVE_MONTHS`,\n daysOffset: 365,\n monthsOffset: 12,\n },\n];\n\nexport const SEASON_FILTERS: DateOption[] = [\n {\n key: DateFilterOptions.Month,\n i18nKey: `${DATE_FILTER_I18N_PATH}.MONTH`,\n },\n {\n key: DateFilterOptions.Quarter,\n i18nKey: `${DATE_FILTER_I18N_PATH}.QUARTER`,\n },\n];\n\nexport const QUARTER_FILTERS: QuarterOption[] = [\n {\n section: QuarterFilterOption.First_Quarter,\n i18nKey: `${QUARTER_FILTER_I18N_PATH}.FIRST_QUARTER`,\n startMonth: 1,\n endMonth: 3,\n },\n {\n section: QuarterFilterOption.Second_Quarter,\n i18nKey: `${QUARTER_FILTER_I18N_PATH}.SECOND_QUARTER`,\n startMonth: 4,\n endMonth: 6,\n },\n {\n section: QuarterFilterOption.Third_Quarter,\n i18nKey: `${QUARTER_FILTER_I18N_PATH}.THIRD_QUARTER`,\n startMonth: 7,\n endMonth: 9,\n },\n {\n section: QuarterFilterOption.Fourth_Quarter,\n i18nKey: `${QUARTER_FILTER_I18N_PATH}.FOURTH_QUARTER`,\n startMonth: 10,\n endMonth: 12,\n },\n];\n","import { Component, Inject, OnDestroy, OnInit } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport {\n DateOption,\n DateRange,\n DateRangeSelectorService,\n MomentDateRange,\n QuarterOption,\n} from './date-range-selector.service';\nimport moment from 'moment';\nimport { Observable, Subscription } from 'rxjs';\nimport { DATE_FILTERS, DateFilterOptions, QUARTER_FILTERS, QuarterFilterOption, SEASON_FILTERS } from './constants';\n\n@Component({\n templateUrl: './date-range-selector.component.html',\n styleUrls: ['./date-range-selector.component.scss'],\n})\nexport class DateRangeSelectorComponent implements OnInit, OnDestroy {\n filterOptions: DateOption[] = [...DATE_FILTERS];\n\n seasonOptions: DateOption[] = [...SEASON_FILTERS];\n\n selected: DateFilterOptions;\n customDate: MomentDateRange = {\n start: moment(),\n end: moment(),\n };\n\n compareDateRange: DateRange = {\n start: new Date(),\n end: new Date(),\n };\n\n quarters: QuarterOption[] = [...QUARTER_FILTERS];\n\n monthList: Date[] = [];\n yearList: number[] = [];\n\n maxEndDate = moment();\n maxEndCompareDate = new Date();\n\n currentMonth = moment().month(1).toDate();\n currentQuarter = QuarterFilterOption.First_Quarter;\n currentYear = new Date().getFullYear();\n\n private customDateSub: Subscription[] = [];\n\n comparableDatePicker$: Observable;\n\n compareDateRange$: Observable = this.dateRangeService.getCompareDate();\n\n seasonDatePickerType: string;\n\n constructor(\n public dialogRef: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) public data: DateOption,\n public dateRangeService: DateRangeSelectorService,\n ) {}\n\n ngOnInit(): void {\n this.selected = this.dateRangeService.getKey();\n this.comparableDatePicker$ = this.dateRangeService.getDatePickerType();\n this.customDateSub.push(\n this.dateRangeService.getFilter().subscribe((filter) => {\n this.customDate.start = moment(filter.start);\n this.customDate.end = moment(filter.end);\n }),\n );\n this.customDateSub.push(\n this.dateRangeService.getCompareFilter().subscribe((filter) => {\n this.compareDateRange.start = filter.start;\n this.compareDateRange.end = filter.end;\n this.currentMonth = moment().month(filter.end.getMonth()).toDate();\n this.currentYear = filter.start.getFullYear();\n this.dateRangeService.updatePanelCompareDate(this.selected, filter.start, filter.end);\n if (this.selected === DateFilterOptions.Quarter) {\n this.currentQuarter = QUARTER_FILTERS.find(\n (entry) => filter.start.getMonth() + 1 === entry.startMonth,\n ).section;\n } else {\n this.currentQuarter = QuarterFilterOption.First_Quarter;\n }\n }),\n );\n this.updateSeasonDate(this.selected);\n this.initializeList();\n }\n\n ngOnDestroy(): void {\n this.customDateSub.forEach((subs) => subs.unsubscribe());\n }\n\n submit(): void {\n if (this.selected === DateFilterOptions.Custom) {\n this.dateRangeService.setAsCustom(this.customDate, this.compareDateRange);\n } else if (this.selected === DateFilterOptions.Month) {\n this.dateRangeService.setAsMonthly(this.compareDateRange);\n } else if (this.selected === DateFilterOptions.Quarter) {\n this.dateRangeService.setAsQuarter(this.compareDateRange);\n } else {\n this.dateRangeService.setKey(this.selected);\n }\n this.dialogRef.close();\n }\n\n onCustomStartChange(momentDate: moment.Moment, date?: Date): void {\n this.selected = DateFilterOptions.Custom;\n this.customDate.start = momentDate;\n this.compareDateRange.start = date;\n this.dateRangeService.updatePanelCompareDate(this.selected, this.compareDateRange.start, this.compareDateRange.end);\n }\n\n onCustomEndChange(momentDate: moment.Moment, date?: Date): void {\n this.selected = DateFilterOptions.Custom;\n this.customDate.end = momentDate;\n this.compareDateRange.end = date;\n this.dateRangeService.updatePanelCompareDate(this.selected, this.compareDateRange.start, this.compareDateRange.end);\n }\n\n onMonthSelectChanged(selectedMonth?: any, selectedYear?: any): void {\n let month, year;\n if (selectedMonth) {\n month = moment().month(selectedMonth).format('M');\n month -= 1;\n this.currentMonth = moment().month(month).toDate();\n year = this.currentYear;\n } else if (selectedYear) {\n year = selectedYear;\n this.currentYear = selectedYear;\n month = this.currentMonth.getMonth();\n } else {\n year = this.currentYear;\n month = this.currentMonth.getMonth();\n }\n this.compareDateRange.start = moment().year(year).month(month).startOf('month').toDate();\n this.compareDateRange.end = moment().year(year).month(month).endOf('month').toDate();\n this.dateRangeService.updatePanelCompareDate(\n DateFilterOptions.Month,\n this.compareDateRange.start,\n this.compareDateRange.end,\n );\n }\n\n onQuarterSelectChanged(selectedQuarter?: QuarterFilterOption, selectedYear?: number): void {\n let quarter, year;\n if (selectedQuarter != null) {\n this.currentQuarter = selectedQuarter;\n quarter = selectedQuarter;\n year = this.compareDateRange.start.getFullYear();\n } else if (selectedYear) {\n this.currentYear = selectedYear;\n year = selectedYear;\n quarter = this.currentQuarter;\n } else {\n quarter = this.currentQuarter;\n year = this.currentYear;\n }\n const startMonth = QUARTER_FILTERS.find((entry) => quarter === entry.section).startMonth;\n const endMonth = QUARTER_FILTERS.find((entry) => quarter === entry.section).endMonth;\n this.compareDateRange.start = moment()\n .year(year)\n .month(startMonth - 1)\n .startOf('month')\n .toDate();\n this.compareDateRange.end = moment()\n .year(year)\n .month(endMonth - 1)\n .endOf('month')\n .toDate();\n this.dateRangeService.updatePanelCompareDate(\n DateFilterOptions.Quarter,\n this.compareDateRange.start,\n this.compareDateRange.end,\n );\n }\n\n updateDateRangeData(selectedKey: DateFilterOptions): void {\n if (selectedKey !== DateFilterOptions.Custom) {\n this.compareDateRange.start = this.dateRangeService.updateStartDate(selectedKey);\n this.compareDateRange.end = moment().startOf('day').toDate();\n this.dateRangeService.updatePanelCompareDate(selectedKey, this.compareDateRange.start, this.compareDateRange.end);\n }\n this.seasonDatePickerType = '';\n }\n\n updateSeasonDate(selectedKey: DateFilterOptions): void {\n if (selectedKey === DateFilterOptions.Month) {\n this.seasonDatePickerType = 'Month';\n this.onMonthSelectChanged();\n } else if (selectedKey === DateFilterOptions.Quarter) {\n this.seasonDatePickerType = 'Quarter';\n this.onQuarterSelectChanged();\n } else {\n this.seasonDatePickerType = '';\n }\n }\n\n initializeList(): void {\n for (let i = 2000; i <= new Date().getFullYear(); i++) {\n this.yearList.push(i);\n }\n\n for (let s = 1; s <= 12; s++) {\n this.monthList.push(\n moment()\n .month(s - 1)\n .toDate(),\n );\n }\n }\n}\n","

\n {{ 'FRONTEND.DATE_RANGE_SELECTOR.TITLE' | translate }}\n close\n

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
{{ 'FRONTEND.DATE_RANGE_SELECTOR.PERIOD' | translate }}
\n \n \n {{ option.i18nKey | translate }}\n \n \n {{ seasonOptions[0].i18nKey | translate }}\n \n \n \n \n \n {{ option | date: 'LLLL' }}\n \n \n \n \n \n \n {{ option }}\n \n \n \n \n \n {{ seasonOptions[1].i18nKey | translate }}\n \n \n \n \n \n {{ option.i18nKey | translate }}\n \n \n \n \n \n \n {{ option }}\n \n \n \n \n \n
\n
\n\n\n \n \n \n {{ option.i18nKey | translate }}\n \n \n\n
\n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n\n\n \n \n\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDatepickerModule } from '@angular/material/datepicker';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatRadioModule } from '@angular/material/radio';\nimport { MatSelectModule } from '@angular/material/select';\nimport { LexiconModule } from '@galaxy/lexicon';\nimport { TranslateModule } from '@ngx-translate/core';\nimport baseTranslation from '../assets/i18n/en_devel.json';\nimport { WEBLATE_COMPONENT_NAME } from '../constants';\nimport { DateRangeSelectorComponent } from './date-range-selector.component';\n\n@NgModule({\n imports: [\n CommonModule,\n MatDialogModule,\n MatRadioModule,\n MatDatepickerModule,\n FormsModule,\n MatFormFieldModule,\n TranslateModule,\n LexiconModule.forChild({\n componentName: WEBLATE_COMPONENT_NAME,\n baseTranslation: baseTranslation,\n }),\n MatInputModule,\n MatButtonModule,\n MatIconModule,\n MatSelectModule,\n ],\n declarations: [DateRangeSelectorComponent],\n})\nexport class DateRangeSelectorModule {}\n","export enum Sizes {\n OneThird = 'one-third',\n Half = 'half',\n TwoThirds = 'two-thirds',\n Full = 'full',\n}\n\nexport enum Layout {\n Vertical = 'vertical',\n Horizontal = 'horizontal',\n}\n","/**\n * Component for rendering a card\n */\n\nimport { Component, Input, HostBinding } from '@angular/core';\nimport { Sizes } from '../va-cards.interface';\n\n@Component({\n selector: 'va-card',\n templateUrl: './va-card.component.html',\n styleUrls: ['./va-card.component.scss'],\n})\nexport class VaCardComponent {\n @Input() size?: Sizes = Sizes.OneThird;\n @HostBinding('class.size-one-third') @Input() get isOneThird(): boolean {\n return this.size === Sizes.OneThird;\n }\n @HostBinding('class.size-half') @Input() get isHalf(): boolean {\n return this.size === Sizes.Half;\n }\n @HostBinding('class.size-two-thirds') @Input() get isTwoThird(): boolean {\n return this.size === Sizes.TwoThirds;\n }\n @HostBinding('class.size-full') @Input() get isFull(): boolean {\n return this.size === Sizes.Full;\n }\n}\n","
\n \n
\n","/**\n * Component for rendering card headers, with additional header contents\n */\n\nimport { Component, Input } from '@angular/core';\nimport { I18NDescriptor } from '../../uikit.interface';\n\n@Component({\n selector: 'va-card-header',\n templateUrl: './va-card-header.component.html',\n styleUrls: ['./va-card-header.component.scss'],\n})\nexport class VaCardHeaderComponent {\n @Input() title: I18NDescriptor;\n @Input() subtitle?: I18NDescriptor;\n @Input() info?: I18NDescriptor;\n}\n","
\n \n \n {{ title.key | translate: title.params }}\n \n \n info_outline\n \n \n \n \n \n {{ subtitle.key | translate: subtitle.params }}\n \n \n \n
\n","/**\n * Component for rendering links that are used in cards. Usually used as footers.\n */\n\nimport { Component, Input, Output, EventEmitter } from '@angular/core';\nimport { I18NDescriptor } from '../../uikit.interface';\n\nconst ICON_CHEVRON_RIGHT = 'chevron_right';\n\n@Component({\n selector: 'va-card-link-button',\n templateUrl: './va-card-link-button.component.html',\n styleUrls: ['./va-card-link-button.component.scss'],\n})\nexport class VaCardLinkButtonComponent {\n @Input() text: I18NDescriptor;\n @Input() iconUrl: string;\n @Input() navigationIconName?: string = ICON_CHEVRON_RIGHT;\n @Input() url?: string;\n @Output() linkClick = new EventEmitter();\n\n onClick(): void {\n this.linkClick.emit();\n }\n}\n","\n \n\n \n {{ text.key | translate: text.params }}\n \n \n {{ navigationIconName }}\n \n\n","/**\n * A component for rendering breaks in cards\n */\n\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'va-card-break-line',\n template: '',\n styleUrls: ['./va-card-break-line.component.scss'],\n})\nexport class VaCardBreakLineComponent {}\n","/**\n * Component for wrapping and rendering content into a card's body\n */\n\nimport { Component, Input } from '@angular/core';\nimport { I18NDescriptor } from '../../uikit.interface';\n\n@Component({\n selector: 'va-card-content',\n templateUrl: './va-card-content.component.html',\n styleUrls: ['./va-card-content.component.scss'],\n})\nexport class VaCardContentComponent {\n @Input() title?: I18NDescriptor;\n}\n","\n \n {{ title.key | translate: title.params }}\n \n\n\n","/**\n * Component used for grouping card content when breaking via:\n * - screen size\n * - card layout\n */\n\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'va-card-break-group',\n templateUrl: './va-card-break-group.component.html',\n styleUrls: ['./va-card-break-group.component.scss'],\n})\nexport class VaCardBreakGroupComponent {}\n","\n","import { Directive, HostBinding } from '@angular/core';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[vertical]',\n})\nexport class VerticalLayoutDirective {\n @HostBinding('class.is-vertical') isVertical = true;\n}\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[horizontal]',\n})\nexport class HorizontalLayoutDirective {\n @HostBinding('class.is-horizontal') isHorizontal = true;\n}\n","import { CurrencyPipe, DecimalPipe, PercentPipe } from '@angular/common';\nimport { OnDestroy, Pipe, PipeTransform } from '@angular/core';\nimport { TranslateService } from '@ngx-translate/core';\nimport { Subscription } from 'rxjs';\n\nconst DEFAULT_CURRENCY_CODE = 'USD';\nconst DEFAULT_LOCALE = 'en-us';\nexport type DisplayType = 'currency' | 'percentage' | 'number' | 'string' | 'translate' | 'fraction';\n\nexport interface DisplayValueDescriptor {\n value: number | string;\n displayType: DisplayType;\n outOfValue?: number | string;\n currencyCode?: string;\n locale?: string;\n maxDecimalPlaces?: number;\n}\n\n@Pipe({ name: 'displayValue' })\nexport class DisplayValuePipe implements PipeTransform, OnDestroy {\n value: number | string;\n outOfValue?: number | string;\n displayType?: DisplayType;\n currencyCode: string;\n locale = DEFAULT_LOCALE;\n displayValue: any;\n\n onTranslationChange?: Subscription;\n onLangChange?: Subscription;\n onDefaultLangChange?: Subscription;\n digitsInfo?: string;\n\n constructor(private translateService: TranslateService) {}\n\n updateValue(): void {\n switch (this.displayType) {\n case 'currency': {\n const currencyPipe = new CurrencyPipe(this.locale);\n this.displayValue = currencyPipe.transform(this.value, this.currencyCode, 'symbol', '1.0-2', this.locale);\n break;\n }\n case 'percentage': {\n const percentPipe = new PercentPipe(this.locale);\n this.displayValue = percentPipe.transform(this.value, this.digitsInfo ? this.digitsInfo : '1.0-2', this.locale);\n break;\n }\n case 'number': {\n const decimalPipe = new DecimalPipe(this.locale);\n this.displayValue = decimalPipe.transform(this.value, this.digitsInfo, this.locale);\n break;\n }\n case 'string':\n this.displayValue = this.value;\n break;\n case 'translate':\n this.displayValue = this.translateService.instant(this.value as string);\n break;\n case 'fraction':\n this.displayValue = this.value + '/' + this.outOfValue;\n break;\n }\n }\n\n transform(displayValue: DisplayValueDescriptor): any {\n if (!displayValue) {\n return undefined;\n }\n const { value, outOfValue, displayType, currencyCode = DEFAULT_CURRENCY_CODE, locale } = displayValue;\n this.value = value;\n this.outOfValue = outOfValue;\n this.displayType = displayType;\n this.currencyCode = currencyCode;\n this.locale = locale || this.locale;\n this.digitsInfo =\n displayValue.maxDecimalPlaces || displayValue.maxDecimalPlaces === 0\n ? '1.0-' + displayValue.maxDecimalPlaces\n : undefined;\n\n this.updateValue();\n\n if (!this.onTranslationChange) {\n this.onTranslationChange = this.translateService.onTranslationChange.subscribe(() => {\n this.updateValue();\n });\n }\n if (!this.onLangChange) {\n this.onLangChange = this.translateService.onLangChange.subscribe(() => {\n this.updateValue();\n });\n }\n if (!this.onDefaultLangChange) {\n this.onDefaultLangChange = this.translateService.onDefaultLangChange.subscribe(() => {\n this.updateValue();\n });\n }\n\n return this.displayValue;\n }\n\n ngOnDestroy(): void {\n if (typeof this.onTranslationChange !== 'undefined') {\n this.onTranslationChange.unsubscribe();\n this.onTranslationChange = undefined;\n }\n if (typeof this.onLangChange !== 'undefined') {\n this.onLangChange.unsubscribe();\n this.onLangChange = undefined;\n }\n if (typeof this.onDefaultLangChange !== 'undefined') {\n this.onDefaultLangChange.unsubscribe();\n this.onDefaultLangChange = undefined;\n }\n }\n}\n","import { Component, ChangeDetectionStrategy, Input } from '@angular/core';\nimport { DisplayValueDescriptor } from '../../../../common-pipes/display-value.pipe';\n\n// The direction the caret will face\nexport enum CHANGE_DIRECTION {\n NO_CHANGE,\n UPWARD_CHANGE,\n DOWNWARD_CHANGE,\n}\n\n// The color of the change\nexport enum CHANGE_TYPE {\n NO_CHANGE,\n POSITIVE_CHANGE,\n NEGATIVE_CHANGE,\n}\n\nexport interface NumberWithChangeConfig {\n currentPeriod: DisplayValueDescriptor;\n previousPeriod?: DisplayValueDescriptor;\n previousPeriodChangeDirection?: CHANGE_DIRECTION;\n previousPeriodChangeType?: CHANGE_TYPE;\n}\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'number-with-change, div[number-with-change]',\n templateUrl: './number-with-change.component.html',\n styleUrls: ['./number-with-change.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NumberWithChangeComponent {\n @Input()\n changeInfo: NumberWithChangeConfig;\n\n changeType = CHANGE_TYPE;\n changeDirection = CHANGE_DIRECTION;\n}\n","
\n
\n {{ changeInfo.currentPeriod | displayValue }}\n
\n \n \n arrow_drop_up\n \n \n arrow_drop_down\n \n {{ changeInfo.previousPeriod | displayValue }}\n
\n\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { CountryCode, formatNumber } from 'libphonenumber-js';\n\nexport function formatPhoneNumber(\n phoneNumber: string | number,\n formatForInternational: boolean,\n countryCode?: string,\n): string {\n const numberString = phoneNumber.toString();\n if (numberString === '') {\n return '';\n }\n const formatting = formatForInternational ? 'INTERNATIONAL' : 'NATIONAL';\n if (countryCode as CountryCode) {\n const newCountryCode = countryCode;\n try {\n return formatNumber(numberString, newCountryCode, formatting);\n } catch (e) {\n return numberString;\n }\n }\n return numberString;\n}\n\n@Pipe({ name: 'phone' })\nexport class PhoneNumberFormatPipe implements PipeTransform {\n transform(phoneNumber: string | number, countryCode?: string): string {\n return formatPhoneNumber(phoneNumber, false, countryCode);\n }\n}\n\n@Pipe({ name: 'phone_intl' })\nexport class InternationalPhoneNumberFormatPipe implements PipeTransform {\n transform(phoneNumber: string | number, countryCode?: string): string {\n return formatPhoneNumber(phoneNumber, true, countryCode);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { InternationalPhoneNumberFormatPipe, PhoneNumberFormatPipe } from './phone-number.pipe';\nimport { DisplayValuePipe } from './display-value.pipe';\n\n@NgModule({\n declarations: [InternationalPhoneNumberFormatPipe, PhoneNumberFormatPipe, DisplayValuePipe],\n exports: [InternationalPhoneNumberFormatPipe, PhoneNumberFormatPipe, DisplayValuePipe],\n providers: [InternationalPhoneNumberFormatPipe, PhoneNumberFormatPipe, DisplayValuePipe],\n})\nexport class CommonPipesModule {}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatCardModule } from '@angular/material/card';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { VaCardComponent } from './va-card/va-card.component';\nimport { VaCardHeaderComponent } from './va-card-header/va-card-header.component';\nimport { VaCardLinkButtonComponent } from './va-card-link-button/va-card-link-button.component';\nimport { VaCardBreakLineComponent } from './va-card-break-line/va-card-break-line.component';\nimport { VaCardContentComponent } from './va-card-content/va-card-content.component';\nimport { VaCardBreakGroupComponent } from './va-card-break-group/va-card-break-group.component';\nimport { VerticalLayoutDirective, HorizontalLayoutDirective } from './va-layout.directive';\nimport { NumberWithChangeComponent } from './va-card-content/options/number-with-change/number-with-change.component';\nimport { CommonPipesModule } from '../common-pipes/common-pipes.module';\nimport { LexiconModule } from '@galaxy/lexicon';\nimport baseTranslation from '../assets/i18n/en_devel.json';\nimport { WEBLATE_COMPONENT_NAME } from '../constants';\n\n@NgModule({\n declarations: [\n VaCardComponent,\n VaCardHeaderComponent,\n VaCardLinkButtonComponent,\n VaCardBreakLineComponent,\n VaCardContentComponent,\n VaCardBreakGroupComponent,\n VerticalLayoutDirective,\n HorizontalLayoutDirective,\n NumberWithChangeComponent,\n ],\n imports: [\n CommonModule,\n MatCardModule,\n MatIconModule,\n TranslateModule,\n LexiconModule.forChild({\n componentName: WEBLATE_COMPONENT_NAME,\n baseTranslation: baseTranslation,\n }),\n MatTooltipModule,\n CommonPipesModule,\n ],\n exports: [\n VaCardComponent,\n VaCardHeaderComponent,\n VaCardLinkButtonComponent,\n VaCardBreakLineComponent,\n VaCardContentComponent,\n VaCardBreakGroupComponent,\n VerticalLayoutDirective,\n HorizontalLayoutDirective,\n NumberWithChangeComponent,\n ],\n})\nexport class VaCardsModule {}\n","/**\n * marked v4.3.0 - a markdown parser\n * Copyright (c) 2011-2023, Christopher Jeffrey. (MIT Licensed)\n * https://github.com/markedjs/marked\n */\n\n/**\n * DO NOT EDIT THIS FILE\n * The code in this file is generated from files in ./src/\n */\n\nfunction getDefaults() {\n return {\n async: false,\n baseUrl: null,\n breaks: false,\n extensions: null,\n gfm: true,\n headerIds: true,\n headerPrefix: '',\n highlight: null,\n hooks: null,\n langPrefix: 'language-',\n mangle: true,\n pedantic: false,\n renderer: null,\n sanitize: false,\n sanitizer: null,\n silent: false,\n smartypants: false,\n tokenizer: null,\n walkTokens: null,\n xhtml: false\n };\n}\nlet defaults = getDefaults();\nfunction changeDefaults(newDefaults) {\n defaults = newDefaults;\n}\n\n/**\n * Helpers\n */\nconst escapeTest = /[&<>\"']/;\nconst escapeReplace = new RegExp(escapeTest.source, 'g');\nconst escapeTestNoEncode = /[<>\"']|&(?!(#\\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\\w+);)/;\nconst escapeReplaceNoEncode = new RegExp(escapeTestNoEncode.source, 'g');\nconst escapeReplacements = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": '''\n};\nconst getEscapeReplacement = ch => escapeReplacements[ch];\nfunction escape(html, encode) {\n if (encode) {\n if (escapeTest.test(html)) {\n return html.replace(escapeReplace, getEscapeReplacement);\n }\n } else {\n if (escapeTestNoEncode.test(html)) {\n return html.replace(escapeReplaceNoEncode, getEscapeReplacement);\n }\n }\n return html;\n}\nconst unescapeTest = /&(#(?:\\d+)|(?:#x[0-9A-Fa-f]+)|(?:\\w+));?/ig;\n\n/**\n * @param {string} html\n */\nfunction unescape(html) {\n // explicitly match decimal, hex, and named HTML entities\n return html.replace(unescapeTest, (_, n) => {\n n = n.toLowerCase();\n if (n === 'colon') return ':';\n if (n.charAt(0) === '#') {\n return n.charAt(1) === 'x' ? String.fromCharCode(parseInt(n.substring(2), 16)) : String.fromCharCode(+n.substring(1));\n }\n return '';\n });\n}\nconst caret = /(^|[^\\[])\\^/g;\n\n/**\n * @param {string | RegExp} regex\n * @param {string} opt\n */\nfunction edit(regex, opt) {\n regex = typeof regex === 'string' ? regex : regex.source;\n opt = opt || '';\n const obj = {\n replace: (name, val) => {\n val = val.source || val;\n val = val.replace(caret, '$1');\n regex = regex.replace(name, val);\n return obj;\n },\n getRegex: () => {\n return new RegExp(regex, opt);\n }\n };\n return obj;\n}\nconst nonWordAndColonTest = /[^\\w:]/g;\nconst originIndependentUrl = /^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;\n\n/**\n * @param {boolean} sanitize\n * @param {string} base\n * @param {string} href\n */\nfunction cleanUrl(sanitize, base, href) {\n if (sanitize) {\n let prot;\n try {\n prot = decodeURIComponent(unescape(href)).replace(nonWordAndColonTest, '').toLowerCase();\n } catch (e) {\n return null;\n }\n if (prot.indexOf('javascript:') === 0 || prot.indexOf('vbscript:') === 0 || prot.indexOf('data:') === 0) {\n return null;\n }\n }\n if (base && !originIndependentUrl.test(href)) {\n href = resolveUrl(base, href);\n }\n try {\n href = encodeURI(href).replace(/%25/g, '%');\n } catch (e) {\n return null;\n }\n return href;\n}\nconst baseUrls = {};\nconst justDomain = /^[^:]+:\\/*[^/]*$/;\nconst protocol = /^([^:]+:)[\\s\\S]*$/;\nconst domain = /^([^:]+:\\/*[^/]*)[\\s\\S]*$/;\n\n/**\n * @param {string} base\n * @param {string} href\n */\nfunction resolveUrl(base, href) {\n if (!baseUrls[' ' + base]) {\n // we can ignore everything in base after the last slash of its path component,\n // but we might need to add _that_\n // https://tools.ietf.org/html/rfc3986#section-3\n if (justDomain.test(base)) {\n baseUrls[' ' + base] = base + '/';\n } else {\n baseUrls[' ' + base] = rtrim(base, '/', true);\n }\n }\n base = baseUrls[' ' + base];\n const relativeBase = base.indexOf(':') === -1;\n if (href.substring(0, 2) === '//') {\n if (relativeBase) {\n return href;\n }\n return base.replace(protocol, '$1') + href;\n } else if (href.charAt(0) === '/') {\n if (relativeBase) {\n return href;\n }\n return base.replace(domain, '$1') + href;\n } else {\n return base + href;\n }\n}\nconst noopTest = {\n exec: function noopTest() {}\n};\nfunction splitCells(tableRow, count) {\n // ensure that every cell-delimiting pipe has a space\n // before it to distinguish it from an escaped pipe\n const row = tableRow.replace(/\\|/g, (match, offset, str) => {\n let escaped = false,\n curr = offset;\n while (--curr >= 0 && str[curr] === '\\\\') escaped = !escaped;\n if (escaped) {\n // odd number of slashes means | is escaped\n // so we leave it alone\n return '|';\n } else {\n // add space before unescaped |\n return ' |';\n }\n }),\n cells = row.split(/ \\|/);\n let i = 0;\n\n // First/last cell in a row cannot be empty if it has no leading/trailing pipe\n if (!cells[0].trim()) {\n cells.shift();\n }\n if (cells.length > 0 && !cells[cells.length - 1].trim()) {\n cells.pop();\n }\n if (cells.length > count) {\n cells.splice(count);\n } else {\n while (cells.length < count) cells.push('');\n }\n for (; i < cells.length; i++) {\n // leading or trailing whitespace is ignored per the gfm spec\n cells[i] = cells[i].trim().replace(/\\\\\\|/g, '|');\n }\n return cells;\n}\n\n/**\n * Remove trailing 'c's. Equivalent to str.replace(/c*$/, '').\n * /c*$/ is vulnerable to REDOS.\n *\n * @param {string} str\n * @param {string} c\n * @param {boolean} invert Remove suffix of non-c chars instead. Default falsey.\n */\nfunction rtrim(str, c, invert) {\n const l = str.length;\n if (l === 0) {\n return '';\n }\n\n // Length of suffix matching the invert condition.\n let suffLen = 0;\n\n // Step left until we fail to match the invert condition.\n while (suffLen < l) {\n const currChar = str.charAt(l - suffLen - 1);\n if (currChar === c && !invert) {\n suffLen++;\n } else if (currChar !== c && invert) {\n suffLen++;\n } else {\n break;\n }\n }\n return str.slice(0, l - suffLen);\n}\nfunction findClosingBracket(str, b) {\n if (str.indexOf(b[1]) === -1) {\n return -1;\n }\n const l = str.length;\n let level = 0,\n i = 0;\n for (; i < l; i++) {\n if (str[i] === '\\\\') {\n i++;\n } else if (str[i] === b[0]) {\n level++;\n } else if (str[i] === b[1]) {\n level--;\n if (level < 0) {\n return i;\n }\n }\n }\n return -1;\n}\nfunction checkSanitizeDeprecation(opt) {\n if (opt && opt.sanitize && !opt.silent) {\n console.warn('marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options');\n }\n}\n\n// copied from https://stackoverflow.com/a/5450113/806777\n/**\n * @param {string} pattern\n * @param {number} count\n */\nfunction repeatString(pattern, count) {\n if (count < 1) {\n return '';\n }\n let result = '';\n while (count > 1) {\n if (count & 1) {\n result += pattern;\n }\n count >>= 1;\n pattern += pattern;\n }\n return result + pattern;\n}\nfunction outputLink(cap, link, raw, lexer) {\n const href = link.href;\n const title = link.title ? escape(link.title) : null;\n const text = cap[1].replace(/\\\\([\\[\\]])/g, '$1');\n if (cap[0].charAt(0) !== '!') {\n lexer.state.inLink = true;\n const token = {\n type: 'link',\n raw,\n href,\n title,\n text,\n tokens: lexer.inlineTokens(text)\n };\n lexer.state.inLink = false;\n return token;\n }\n return {\n type: 'image',\n raw,\n href,\n title,\n text: escape(text)\n };\n}\nfunction indentCodeCompensation(raw, text) {\n const matchIndentToCode = raw.match(/^(\\s+)(?:```)/);\n if (matchIndentToCode === null) {\n return text;\n }\n const indentToCode = matchIndentToCode[1];\n return text.split('\\n').map(node => {\n const matchIndentInNode = node.match(/^\\s+/);\n if (matchIndentInNode === null) {\n return node;\n }\n const [indentInNode] = matchIndentInNode;\n if (indentInNode.length >= indentToCode.length) {\n return node.slice(indentToCode.length);\n }\n return node;\n }).join('\\n');\n}\n\n/**\n * Tokenizer\n */\nclass Tokenizer {\n constructor(options) {\n this.options = options || defaults;\n }\n space(src) {\n const cap = this.rules.block.newline.exec(src);\n if (cap && cap[0].length > 0) {\n return {\n type: 'space',\n raw: cap[0]\n };\n }\n }\n code(src) {\n const cap = this.rules.block.code.exec(src);\n if (cap) {\n const text = cap[0].replace(/^ {1,4}/gm, '');\n return {\n type: 'code',\n raw: cap[0],\n codeBlockStyle: 'indented',\n text: !this.options.pedantic ? rtrim(text, '\\n') : text\n };\n }\n }\n fences(src) {\n const cap = this.rules.block.fences.exec(src);\n if (cap) {\n const raw = cap[0];\n const text = indentCodeCompensation(raw, cap[3] || '');\n return {\n type: 'code',\n raw,\n lang: cap[2] ? cap[2].trim().replace(this.rules.inline._escapes, '$1') : cap[2],\n text\n };\n }\n }\n heading(src) {\n const cap = this.rules.block.heading.exec(src);\n if (cap) {\n let text = cap[2].trim();\n\n // remove trailing #s\n if (/#$/.test(text)) {\n const trimmed = rtrim(text, '#');\n if (this.options.pedantic) {\n text = trimmed.trim();\n } else if (!trimmed || / $/.test(trimmed)) {\n // CommonMark requires space before trailing #s\n text = trimmed.trim();\n }\n }\n return {\n type: 'heading',\n raw: cap[0],\n depth: cap[1].length,\n text,\n tokens: this.lexer.inline(text)\n };\n }\n }\n hr(src) {\n const cap = this.rules.block.hr.exec(src);\n if (cap) {\n return {\n type: 'hr',\n raw: cap[0]\n };\n }\n }\n blockquote(src) {\n const cap = this.rules.block.blockquote.exec(src);\n if (cap) {\n const text = cap[0].replace(/^ *>[ \\t]?/gm, '');\n const top = this.lexer.state.top;\n this.lexer.state.top = true;\n const tokens = this.lexer.blockTokens(text);\n this.lexer.state.top = top;\n return {\n type: 'blockquote',\n raw: cap[0],\n tokens,\n text\n };\n }\n }\n list(src) {\n let cap = this.rules.block.list.exec(src);\n if (cap) {\n let raw, istask, ischecked, indent, i, blankLine, endsWithBlankLine, line, nextLine, rawLine, itemContents, endEarly;\n let bull = cap[1].trim();\n const isordered = bull.length > 1;\n const list = {\n type: 'list',\n raw: '',\n ordered: isordered,\n start: isordered ? +bull.slice(0, -1) : '',\n loose: false,\n items: []\n };\n bull = isordered ? `\\\\d{1,9}\\\\${bull.slice(-1)}` : `\\\\${bull}`;\n if (this.options.pedantic) {\n bull = isordered ? bull : '[*+-]';\n }\n\n // Get next list item\n const itemRegex = new RegExp(`^( {0,3}${bull})((?:[\\t ][^\\\\n]*)?(?:\\\\n|$))`);\n\n // Check if current bullet point can start a new List Item\n while (src) {\n endEarly = false;\n if (!(cap = itemRegex.exec(src))) {\n break;\n }\n if (this.rules.block.hr.test(src)) {\n // End list if bullet was actually HR (possibly move into itemRegex?)\n break;\n }\n raw = cap[0];\n src = src.substring(raw.length);\n line = cap[2].split('\\n', 1)[0].replace(/^\\t+/, t => ' '.repeat(3 * t.length));\n nextLine = src.split('\\n', 1)[0];\n if (this.options.pedantic) {\n indent = 2;\n itemContents = line.trimLeft();\n } else {\n indent = cap[2].search(/[^ ]/); // Find first non-space char\n indent = indent > 4 ? 1 : indent; // Treat indented code blocks (> 4 spaces) as having only 1 indent\n itemContents = line.slice(indent);\n indent += cap[1].length;\n }\n blankLine = false;\n if (!line && /^ *$/.test(nextLine)) {\n // Items begin with at most one blank line\n raw += nextLine + '\\n';\n src = src.substring(nextLine.length + 1);\n endEarly = true;\n }\n if (!endEarly) {\n const nextBulletRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}(?:[*+-]|\\\\d{1,9}[.)])((?:[ \\t][^\\\\n]*)?(?:\\\\n|$))`);\n const hrRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\\\* *){3,})(?:\\\\n+|$)`);\n const fencesBeginRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}(?:\\`\\`\\`|~~~)`);\n const headingBeginRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}#`);\n\n // Check if following lines should be included in List Item\n while (src) {\n rawLine = src.split('\\n', 1)[0];\n nextLine = rawLine;\n\n // Re-align to follow commonmark nesting rules\n if (this.options.pedantic) {\n nextLine = nextLine.replace(/^ {1,4}(?=( {4})*[^ ])/g, ' ');\n }\n\n // End list item if found code fences\n if (fencesBeginRegex.test(nextLine)) {\n break;\n }\n\n // End list item if found start of new heading\n if (headingBeginRegex.test(nextLine)) {\n break;\n }\n\n // End list item if found start of new bullet\n if (nextBulletRegex.test(nextLine)) {\n break;\n }\n\n // Horizontal rule found\n if (hrRegex.test(src)) {\n break;\n }\n if (nextLine.search(/[^ ]/) >= indent || !nextLine.trim()) {\n // Dedent if possible\n itemContents += '\\n' + nextLine.slice(indent);\n } else {\n // not enough indentation\n if (blankLine) {\n break;\n }\n\n // paragraph continuation unless last line was a different block level element\n if (line.search(/[^ ]/) >= 4) {\n // indented code block\n break;\n }\n if (fencesBeginRegex.test(line)) {\n break;\n }\n if (headingBeginRegex.test(line)) {\n break;\n }\n if (hrRegex.test(line)) {\n break;\n }\n itemContents += '\\n' + nextLine;\n }\n if (!blankLine && !nextLine.trim()) {\n // Check if current line is blank\n blankLine = true;\n }\n raw += rawLine + '\\n';\n src = src.substring(rawLine.length + 1);\n line = nextLine.slice(indent);\n }\n }\n if (!list.loose) {\n // If the previous item ended with a blank line, the list is loose\n if (endsWithBlankLine) {\n list.loose = true;\n } else if (/\\n *\\n *$/.test(raw)) {\n endsWithBlankLine = true;\n }\n }\n\n // Check for task list items\n if (this.options.gfm) {\n istask = /^\\[[ xX]\\] /.exec(itemContents);\n if (istask) {\n ischecked = istask[0] !== '[ ] ';\n itemContents = itemContents.replace(/^\\[[ xX]\\] +/, '');\n }\n }\n list.items.push({\n type: 'list_item',\n raw,\n task: !!istask,\n checked: ischecked,\n loose: false,\n text: itemContents\n });\n list.raw += raw;\n }\n\n // Do not consume newlines at end of final item. Alternatively, make itemRegex *start* with any newlines to simplify/speed up endsWithBlankLine logic\n list.items[list.items.length - 1].raw = raw.trimRight();\n list.items[list.items.length - 1].text = itemContents.trimRight();\n list.raw = list.raw.trimRight();\n const l = list.items.length;\n\n // Item child tokens handled here at end because we needed to have the final item to trim it first\n for (i = 0; i < l; i++) {\n this.lexer.state.top = false;\n list.items[i].tokens = this.lexer.blockTokens(list.items[i].text, []);\n if (!list.loose) {\n // Check if list should be loose\n const spacers = list.items[i].tokens.filter(t => t.type === 'space');\n const hasMultipleLineBreaks = spacers.length > 0 && spacers.some(t => /\\n.*\\n/.test(t.raw));\n list.loose = hasMultipleLineBreaks;\n }\n }\n\n // Set all items to loose if list is loose\n if (list.loose) {\n for (i = 0; i < l; i++) {\n list.items[i].loose = true;\n }\n }\n return list;\n }\n }\n html(src) {\n const cap = this.rules.block.html.exec(src);\n if (cap) {\n const token = {\n type: 'html',\n raw: cap[0],\n pre: !this.options.sanitizer && (cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style'),\n text: cap[0]\n };\n if (this.options.sanitize) {\n const text = this.options.sanitizer ? this.options.sanitizer(cap[0]) : escape(cap[0]);\n token.type = 'paragraph';\n token.text = text;\n token.tokens = this.lexer.inline(text);\n }\n return token;\n }\n }\n def(src) {\n const cap = this.rules.block.def.exec(src);\n if (cap) {\n const tag = cap[1].toLowerCase().replace(/\\s+/g, ' ');\n const href = cap[2] ? cap[2].replace(/^<(.*)>$/, '$1').replace(this.rules.inline._escapes, '$1') : '';\n const title = cap[3] ? cap[3].substring(1, cap[3].length - 1).replace(this.rules.inline._escapes, '$1') : cap[3];\n return {\n type: 'def',\n tag,\n raw: cap[0],\n href,\n title\n };\n }\n }\n table(src) {\n const cap = this.rules.block.table.exec(src);\n if (cap) {\n const item = {\n type: 'table',\n header: splitCells(cap[1]).map(c => {\n return {\n text: c\n };\n }),\n align: cap[2].replace(/^ *|\\| *$/g, '').split(/ *\\| */),\n rows: cap[3] && cap[3].trim() ? cap[3].replace(/\\n[ \\t]*$/, '').split('\\n') : []\n };\n if (item.header.length === item.align.length) {\n item.raw = cap[0];\n let l = item.align.length;\n let i, j, k, row;\n for (i = 0; i < l; i++) {\n if (/^ *-+: *$/.test(item.align[i])) {\n item.align[i] = 'right';\n } else if (/^ *:-+: *$/.test(item.align[i])) {\n item.align[i] = 'center';\n } else if (/^ *:-+ *$/.test(item.align[i])) {\n item.align[i] = 'left';\n } else {\n item.align[i] = null;\n }\n }\n l = item.rows.length;\n for (i = 0; i < l; i++) {\n item.rows[i] = splitCells(item.rows[i], item.header.length).map(c => {\n return {\n text: c\n };\n });\n }\n\n // parse child tokens inside headers and cells\n\n // header child tokens\n l = item.header.length;\n for (j = 0; j < l; j++) {\n item.header[j].tokens = this.lexer.inline(item.header[j].text);\n }\n\n // cell child tokens\n l = item.rows.length;\n for (j = 0; j < l; j++) {\n row = item.rows[j];\n for (k = 0; k < row.length; k++) {\n row[k].tokens = this.lexer.inline(row[k].text);\n }\n }\n return item;\n }\n }\n }\n lheading(src) {\n const cap = this.rules.block.lheading.exec(src);\n if (cap) {\n return {\n type: 'heading',\n raw: cap[0],\n depth: cap[2].charAt(0) === '=' ? 1 : 2,\n text: cap[1],\n tokens: this.lexer.inline(cap[1])\n };\n }\n }\n paragraph(src) {\n const cap = this.rules.block.paragraph.exec(src);\n if (cap) {\n const text = cap[1].charAt(cap[1].length - 1) === '\\n' ? cap[1].slice(0, -1) : cap[1];\n return {\n type: 'paragraph',\n raw: cap[0],\n text,\n tokens: this.lexer.inline(text)\n };\n }\n }\n text(src) {\n const cap = this.rules.block.text.exec(src);\n if (cap) {\n return {\n type: 'text',\n raw: cap[0],\n text: cap[0],\n tokens: this.lexer.inline(cap[0])\n };\n }\n }\n escape(src) {\n const cap = this.rules.inline.escape.exec(src);\n if (cap) {\n return {\n type: 'escape',\n raw: cap[0],\n text: escape(cap[1])\n };\n }\n }\n tag(src) {\n const cap = this.rules.inline.tag.exec(src);\n if (cap) {\n if (!this.lexer.state.inLink && /^/i.test(cap[0])) {\n this.lexer.state.inLink = false;\n }\n if (!this.lexer.state.inRawBlock && /^<(pre|code|kbd|script)(\\s|>)/i.test(cap[0])) {\n this.lexer.state.inRawBlock = true;\n } else if (this.lexer.state.inRawBlock && /^<\\/(pre|code|kbd|script)(\\s|>)/i.test(cap[0])) {\n this.lexer.state.inRawBlock = false;\n }\n return {\n type: this.options.sanitize ? 'text' : 'html',\n raw: cap[0],\n inLink: this.lexer.state.inLink,\n inRawBlock: this.lexer.state.inRawBlock,\n text: this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(cap[0]) : escape(cap[0]) : cap[0]\n };\n }\n }\n link(src) {\n const cap = this.rules.inline.link.exec(src);\n if (cap) {\n const trimmedUrl = cap[2].trim();\n if (!this.options.pedantic && /^$/.test(trimmedUrl)) {\n return;\n }\n\n // ending angle bracket cannot be escaped\n const rtrimSlash = rtrim(trimmedUrl.slice(0, -1), '\\\\');\n if ((trimmedUrl.length - rtrimSlash.length) % 2 === 0) {\n return;\n }\n } else {\n // find closing parenthesis\n const lastParenIndex = findClosingBracket(cap[2], '()');\n if (lastParenIndex > -1) {\n const start = cap[0].indexOf('!') === 0 ? 5 : 4;\n const linkLen = start + cap[1].length + lastParenIndex;\n cap[2] = cap[2].substring(0, lastParenIndex);\n cap[0] = cap[0].substring(0, linkLen).trim();\n cap[3] = '';\n }\n }\n let href = cap[2];\n let title = '';\n if (this.options.pedantic) {\n // split pedantic href and title\n const link = /^([^'\"]*[^\\s])\\s+(['\"])(.*)\\2/.exec(href);\n if (link) {\n href = link[1];\n title = link[3];\n }\n } else {\n title = cap[3] ? cap[3].slice(1, -1) : '';\n }\n href = href.trim();\n if (/^$/.test(trimmedUrl)) {\n // pedantic allows starting angle bracket without ending angle bracket\n href = href.slice(1);\n } else {\n href = href.slice(1, -1);\n }\n }\n return outputLink(cap, {\n href: href ? href.replace(this.rules.inline._escapes, '$1') : href,\n title: title ? title.replace(this.rules.inline._escapes, '$1') : title\n }, cap[0], this.lexer);\n }\n }\n reflink(src, links) {\n let cap;\n if ((cap = this.rules.inline.reflink.exec(src)) || (cap = this.rules.inline.nolink.exec(src))) {\n let link = (cap[2] || cap[1]).replace(/\\s+/g, ' ');\n link = links[link.toLowerCase()];\n if (!link) {\n const text = cap[0].charAt(0);\n return {\n type: 'text',\n raw: text,\n text\n };\n }\n return outputLink(cap, link, cap[0], this.lexer);\n }\n }\n emStrong(src, maskedSrc, prevChar = '') {\n let match = this.rules.inline.emStrong.lDelim.exec(src);\n if (!match) return;\n\n // _ can't be between two alphanumerics. \\p{L}\\p{N} includes non-english alphabet/numbers as well\n if (match[3] && prevChar.match(/[\\p{L}\\p{N}]/u)) return;\n const nextChar = match[1] || match[2] || '';\n if (!nextChar || nextChar && (prevChar === '' || this.rules.inline.punctuation.exec(prevChar))) {\n const lLength = match[0].length - 1;\n let rDelim,\n rLength,\n delimTotal = lLength,\n midDelimTotal = 0;\n const endReg = match[0][0] === '*' ? this.rules.inline.emStrong.rDelimAst : this.rules.inline.emStrong.rDelimUnd;\n endReg.lastIndex = 0;\n\n // Clip maskedSrc to same section of string as src (move to lexer?)\n maskedSrc = maskedSrc.slice(-1 * src.length + lLength);\n while ((match = endReg.exec(maskedSrc)) != null) {\n rDelim = match[1] || match[2] || match[3] || match[4] || match[5] || match[6];\n if (!rDelim) continue; // skip single * in __abc*abc__\n\n rLength = rDelim.length;\n if (match[3] || match[4]) {\n // found another Left Delim\n delimTotal += rLength;\n continue;\n } else if (match[5] || match[6]) {\n // either Left or Right Delim\n if (lLength % 3 && !((lLength + rLength) % 3)) {\n midDelimTotal += rLength;\n continue; // CommonMark Emphasis Rules 9-10\n }\n }\n delimTotal -= rLength;\n if (delimTotal > 0) continue; // Haven't found enough closing delimiters\n\n // Remove extra characters. *a*** -> *a*\n rLength = Math.min(rLength, rLength + delimTotal + midDelimTotal);\n const raw = src.slice(0, lLength + match.index + (match[0].length - rDelim.length) + rLength);\n\n // Create `em` if smallest delimiter has odd char count. *a***\n if (Math.min(lLength, rLength) % 2) {\n const text = raw.slice(1, -1);\n return {\n type: 'em',\n raw,\n text,\n tokens: this.lexer.inlineTokens(text)\n };\n }\n\n // Create 'strong' if smallest delimiter has even char count. **a***\n const text = raw.slice(2, -2);\n return {\n type: 'strong',\n raw,\n text,\n tokens: this.lexer.inlineTokens(text)\n };\n }\n }\n }\n codespan(src) {\n const cap = this.rules.inline.code.exec(src);\n if (cap) {\n let text = cap[2].replace(/\\n/g, ' ');\n const hasNonSpaceChars = /[^ ]/.test(text);\n const hasSpaceCharsOnBothEnds = /^ /.test(text) && / $/.test(text);\n if (hasNonSpaceChars && hasSpaceCharsOnBothEnds) {\n text = text.substring(1, text.length - 1);\n }\n text = escape(text, true);\n return {\n type: 'codespan',\n raw: cap[0],\n text\n };\n }\n }\n br(src) {\n const cap = this.rules.inline.br.exec(src);\n if (cap) {\n return {\n type: 'br',\n raw: cap[0]\n };\n }\n }\n del(src) {\n const cap = this.rules.inline.del.exec(src);\n if (cap) {\n return {\n type: 'del',\n raw: cap[0],\n text: cap[2],\n tokens: this.lexer.inlineTokens(cap[2])\n };\n }\n }\n autolink(src, mangle) {\n const cap = this.rules.inline.autolink.exec(src);\n if (cap) {\n let text, href;\n if (cap[2] === '@') {\n text = escape(this.options.mangle ? mangle(cap[1]) : cap[1]);\n href = 'mailto:' + text;\n } else {\n text = escape(cap[1]);\n href = text;\n }\n return {\n type: 'link',\n raw: cap[0],\n text,\n href,\n tokens: [{\n type: 'text',\n raw: text,\n text\n }]\n };\n }\n }\n url(src, mangle) {\n let cap;\n if (cap = this.rules.inline.url.exec(src)) {\n let text, href;\n if (cap[2] === '@') {\n text = escape(this.options.mangle ? mangle(cap[0]) : cap[0]);\n href = 'mailto:' + text;\n } else {\n // do extended autolink path validation\n let prevCapZero;\n do {\n prevCapZero = cap[0];\n cap[0] = this.rules.inline._backpedal.exec(cap[0])[0];\n } while (prevCapZero !== cap[0]);\n text = escape(cap[0]);\n if (cap[1] === 'www.') {\n href = 'http://' + cap[0];\n } else {\n href = cap[0];\n }\n }\n return {\n type: 'link',\n raw: cap[0],\n text,\n href,\n tokens: [{\n type: 'text',\n raw: text,\n text\n }]\n };\n }\n }\n inlineText(src, smartypants) {\n const cap = this.rules.inline.text.exec(src);\n if (cap) {\n let text;\n if (this.lexer.state.inRawBlock) {\n text = this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(cap[0]) : escape(cap[0]) : cap[0];\n } else {\n text = escape(this.options.smartypants ? smartypants(cap[0]) : cap[0]);\n }\n return {\n type: 'text',\n raw: cap[0],\n text\n };\n }\n }\n}\n\n/**\n * Block-Level Grammar\n */\nconst block = {\n newline: /^(?: *(?:\\n|$))+/,\n code: /^( {4}[^\\n]+(?:\\n(?: *(?:\\n|$))*)?)+/,\n fences: /^ {0,3}(`{3,}(?=[^`\\n]*(?:\\n|$))|~{3,})([^\\n]*)(?:\\n|$)(?:|([\\s\\S]*?)(?:\\n|$))(?: {0,3}\\1[~`]* *(?=\\n|$)|$)/,\n hr: /^ {0,3}((?:-[\\t ]*){3,}|(?:_[ \\t]*){3,}|(?:\\*[ \\t]*){3,})(?:\\n+|$)/,\n heading: /^ {0,3}(#{1,6})(?=\\s|$)(.*)(?:\\n+|$)/,\n blockquote: /^( {0,3}> ?(paragraph|[^\\n]*)(?:\\n|$))+/,\n list: /^( {0,3}bull)([ \\t][^\\n]+?)?(?:\\n|$)/,\n html: '^ {0,3}(?:' // optional indentation\n + '<(script|pre|style|textarea)[\\\\s>][\\\\s\\\\S]*?(?:[^\\\\n]*\\\\n+|$)' // (1)\n + '|comment[^\\\\n]*(\\\\n+|$)' // (2)\n + '|<\\\\?[\\\\s\\\\S]*?(?:\\\\?>\\\\n*|$)' // (3)\n + '|\\\\n*|$)' // (4)\n + '|\\\\n*|$)' // (5)\n + '|)[\\\\s\\\\S]*?(?:(?:\\\\n *)+\\\\n|$)' // (6)\n + '|<(?!script|pre|style|textarea)([a-z][\\\\w-]*)(?:attribute)*? */?>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n *)+\\\\n|$)' // (7) open tag\n + '|(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n *)+\\\\n|$)' // (7) closing tag\n + ')',\n def: /^ {0,3}\\[(label)\\]: *(?:\\n *)?([^<\\s][^\\s]*|<.*?>)(?:(?: +(?:\\n *)?| *\\n *)(title))? *(?:\\n+|$)/,\n table: noopTest,\n lheading: /^((?:.|\\n(?!\\n))+?)\\n {0,3}(=+|-+) *(?:\\n+|$)/,\n // regex template, placeholders will be replaced according to different paragraph\n // interruption rules of commonmark and the original markdown spec:\n _paragraph: /^([^\\n]+(?:\\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\\n)[^\\n]+)*)/,\n text: /^[^\\n]+/\n};\nblock._label = /(?!\\s*\\])(?:\\\\.|[^\\[\\]\\\\])+/;\nblock._title = /(?:\"(?:\\\\\"?|[^\"\\\\])*\"|'[^'\\n]*(?:\\n[^'\\n]+)*\\n?'|\\([^()]*\\))/;\nblock.def = edit(block.def).replace('label', block._label).replace('title', block._title).getRegex();\nblock.bullet = /(?:[*+-]|\\d{1,9}[.)])/;\nblock.listItemStart = edit(/^( *)(bull) */).replace('bull', block.bullet).getRegex();\nblock.list = edit(block.list).replace(/bull/g, block.bullet).replace('hr', '\\\\n+(?=\\\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\\\* *){3,})(?:\\\\n+|$))').replace('def', '\\\\n+(?=' + block.def.source + ')').getRegex();\nblock._tag = 'address|article|aside|base|basefont|blockquote|body|caption' + '|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption' + '|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe' + '|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option' + '|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr' + '|track|ul';\nblock._comment = /|$)/;\nblock.html = edit(block.html, 'i').replace('comment', block._comment).replace('tag', block._tag).replace('attribute', / +[a-zA-Z:_][\\w.:-]*(?: *= *\"[^\"\\n]*\"| *= *'[^'\\n]*'| *= *[^\\s\"'=<>`]+)?/).getRegex();\nblock.paragraph = edit(block._paragraph).replace('hr', block.hr).replace('heading', ' {0,3}#{1,6} ').replace('|lheading', '') // setex headings don't interrupt commonmark paragraphs\n.replace('|table', '').replace('blockquote', ' {0,3}>').replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n').replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n.replace('html', ')|<(?:script|pre|style|textarea|!--)').replace('tag', block._tag) // pars can be interrupted by type (6) html blocks\n.getRegex();\nblock.blockquote = edit(block.blockquote).replace('paragraph', block.paragraph).getRegex();\n\n/**\n * Normal Block Grammar\n */\n\nblock.normal = {\n ...block\n};\n\n/**\n * GFM Block Grammar\n */\n\nblock.gfm = {\n ...block.normal,\n table: '^ *([^\\\\n ].*\\\\|.*)\\\\n' // Header\n + ' {0,3}(?:\\\\| *)?(:?-+:? *(?:\\\\| *:?-+:? *)*)(?:\\\\| *)?' // Align\n + '(?:\\\\n((?:(?! *\\\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\\\n|$))*)\\\\n*|$)' // Cells\n};\nblock.gfm.table = edit(block.gfm.table).replace('hr', block.hr).replace('heading', ' {0,3}#{1,6} ').replace('blockquote', ' {0,3}>').replace('code', ' {4}[^\\\\n]').replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n').replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n.replace('html', ')|<(?:script|pre|style|textarea|!--)').replace('tag', block._tag) // tables can be interrupted by type (6) html blocks\n.getRegex();\nblock.gfm.paragraph = edit(block._paragraph).replace('hr', block.hr).replace('heading', ' {0,3}#{1,6} ').replace('|lheading', '') // setex headings don't interrupt commonmark paragraphs\n.replace('table', block.gfm.table) // interrupt paragraphs with table\n.replace('blockquote', ' {0,3}>').replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n').replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n.replace('html', ')|<(?:script|pre|style|textarea|!--)').replace('tag', block._tag) // pars can be interrupted by type (6) html blocks\n.getRegex();\n/**\n * Pedantic grammar (original John Gruber's loose markdown specification)\n */\n\nblock.pedantic = {\n ...block.normal,\n html: edit('^ *(?:comment *(?:\\\\n|\\\\s*$)' + '|<(tag)[\\\\s\\\\S]+? *(?:\\\\n{2,}|\\\\s*$)' // closed tag\n + '|\\\\s]*)*?/?> *(?:\\\\n{2,}|\\\\s*$))').replace('comment', block._comment).replace(/tag/g, '(?!(?:' + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub' + '|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)' + '\\\\b)\\\\w+(?!:|[^\\\\w\\\\s@]*@)\\\\b').getRegex(),\n def: /^ *\\[([^\\]]+)\\]: *]+)>?(?: +([\"(][^\\n]+[\")]))? *(?:\\n+|$)/,\n heading: /^(#{1,6})(.*)(?:\\n+|$)/,\n fences: noopTest,\n // fences not supported\n lheading: /^(.+?)\\n {0,3}(=+|-+) *(?:\\n+|$)/,\n paragraph: edit(block.normal._paragraph).replace('hr', block.hr).replace('heading', ' *#{1,6} *[^\\n]').replace('lheading', block.lheading).replace('blockquote', ' {0,3}>').replace('|fences', '').replace('|list', '').replace('|html', '').getRegex()\n};\n\n/**\n * Inline-Level Grammar\n */\nconst inline = {\n escape: /^\\\\([!\"#$%&'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/,\n autolink: /^<(scheme:[^\\s\\x00-\\x1f<>]*|email)>/,\n url: noopTest,\n tag: '^comment' + '|^' // self-closing tag\n + '|^<[a-zA-Z][\\\\w-]*(?:attribute)*?\\\\s*/?>' // open tag\n + '|^<\\\\?[\\\\s\\\\S]*?\\\\?>' // processing instruction, e.g. \n + '|^' // declaration, e.g. \n + '|^',\n // CDATA section\n link: /^!?\\[(label)\\]\\(\\s*(href)(?:\\s+(title))?\\s*\\)/,\n reflink: /^!?\\[(label)\\]\\[(ref)\\]/,\n nolink: /^!?\\[(ref)\\](?:\\[\\])?/,\n reflinkSearch: 'reflink|nolink(?!\\\\()',\n emStrong: {\n lDelim: /^(?:\\*+(?:([punct_])|[^\\s*]))|^_+(?:([punct*])|([^\\s_]))/,\n // (1) and (2) can only be a Right Delimiter. (3) and (4) can only be Left. (5) and (6) can be either Left or Right.\n // () Skip orphan inside strong () Consume to delim (1) #*** (2) a***#, a*** (3) #***a, ***a (4) ***# (5) #***# (6) a***a\n rDelimAst: /^(?:[^_*\\\\]|\\\\.)*?\\_\\_(?:[^_*\\\\]|\\\\.)*?\\*(?:[^_*\\\\]|\\\\.)*?(?=\\_\\_)|(?:[^*\\\\]|\\\\.)+(?=[^*])|[punct_](\\*+)(?=[\\s]|$)|(?:[^punct*_\\s\\\\]|\\\\.)(\\*+)(?=[punct_\\s]|$)|[punct_\\s](\\*+)(?=[^punct*_\\s])|[\\s](\\*+)(?=[punct_])|[punct_](\\*+)(?=[punct_])|(?:[^punct*_\\s\\\\]|\\\\.)(\\*+)(?=[^punct*_\\s])/,\n rDelimUnd: /^(?:[^_*\\\\]|\\\\.)*?\\*\\*(?:[^_*\\\\]|\\\\.)*?\\_(?:[^_*\\\\]|\\\\.)*?(?=\\*\\*)|(?:[^_\\\\]|\\\\.)+(?=[^_])|[punct*](\\_+)(?=[\\s]|$)|(?:[^punct*_\\s\\\\]|\\\\.)(\\_+)(?=[punct*\\s]|$)|[punct*\\s](\\_+)(?=[^punct*_\\s])|[\\s](\\_+)(?=[punct*])|[punct*](\\_+)(?=[punct*])/ // ^- Not allowed for _\n },\n code: /^(`+)([^`]|[^`][\\s\\S]*?[^`])\\1(?!`)/,\n br: /^( {2,}|\\\\)\\n(?!\\s*$)/,\n del: noopTest,\n text: /^(`+|[^`])(?:(?= {2,}\\n)|[\\s\\S]*?(?:(?=[\\\\?@\\\\[\\\\]`^{|}~';\ninline.punctuation = edit(inline.punctuation).replace(/punctuation/g, inline._punctuation).getRegex();\n\n// sequences em should skip over [title](link), `code`, \ninline.blockSkip = /\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>/g;\n// lookbehind is not available on Safari as of version 16\n// inline.escapedEmSt = /(?<=(?:^|[^\\\\)(?:\\\\[^])*)\\\\[*_]/g;\ninline.escapedEmSt = /(?:^|[^\\\\])(?:\\\\\\\\)*\\\\[*_]/g;\ninline._comment = edit(block._comment).replace('(?:-->|$)', '-->').getRegex();\ninline.emStrong.lDelim = edit(inline.emStrong.lDelim).replace(/punct/g, inline._punctuation).getRegex();\ninline.emStrong.rDelimAst = edit(inline.emStrong.rDelimAst, 'g').replace(/punct/g, inline._punctuation).getRegex();\ninline.emStrong.rDelimUnd = edit(inline.emStrong.rDelimUnd, 'g').replace(/punct/g, inline._punctuation).getRegex();\ninline._escapes = /\\\\([!\"#$%&'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/g;\ninline._scheme = /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;\ninline._email = /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;\ninline.autolink = edit(inline.autolink).replace('scheme', inline._scheme).replace('email', inline._email).getRegex();\ninline._attribute = /\\s+[a-zA-Z:_][\\w.:-]*(?:\\s*=\\s*\"[^\"]*\"|\\s*=\\s*'[^']*'|\\s*=\\s*[^\\s\"'=<>`]+)?/;\ninline.tag = edit(inline.tag).replace('comment', inline._comment).replace('attribute', inline._attribute).getRegex();\ninline._label = /(?:\\[(?:\\\\.|[^\\[\\]\\\\])*\\]|\\\\.|`[^`]*`|[^\\[\\]\\\\`])*?/;\ninline._href = /<(?:\\\\.|[^\\n<>\\\\])+>|[^\\s\\x00-\\x1f]*/;\ninline._title = /\"(?:\\\\\"?|[^\"\\\\])*\"|'(?:\\\\'?|[^'\\\\])*'|\\((?:\\\\\\)?|[^)\\\\])*\\)/;\ninline.link = edit(inline.link).replace('label', inline._label).replace('href', inline._href).replace('title', inline._title).getRegex();\ninline.reflink = edit(inline.reflink).replace('label', inline._label).replace('ref', block._label).getRegex();\ninline.nolink = edit(inline.nolink).replace('ref', block._label).getRegex();\ninline.reflinkSearch = edit(inline.reflinkSearch, 'g').replace('reflink', inline.reflink).replace('nolink', inline.nolink).getRegex();\n\n/**\n * Normal Inline Grammar\n */\n\ninline.normal = {\n ...inline\n};\n\n/**\n * Pedantic Inline Grammar\n */\n\ninline.pedantic = {\n ...inline.normal,\n strong: {\n start: /^__|\\*\\*/,\n middle: /^__(?=\\S)([\\s\\S]*?\\S)__(?!_)|^\\*\\*(?=\\S)([\\s\\S]*?\\S)\\*\\*(?!\\*)/,\n endAst: /\\*\\*(?!\\*)/g,\n endUnd: /__(?!_)/g\n },\n em: {\n start: /^_|\\*/,\n middle: /^()\\*(?=\\S)([\\s\\S]*?\\S)\\*(?!\\*)|^_(?=\\S)([\\s\\S]*?\\S)_(?!_)/,\n endAst: /\\*(?!\\*)/g,\n endUnd: /_(?!_)/g\n },\n link: edit(/^!?\\[(label)\\]\\((.*?)\\)/).replace('label', inline._label).getRegex(),\n reflink: edit(/^!?\\[(label)\\]\\s*\\[([^\\]]*)\\]/).replace('label', inline._label).getRegex()\n};\n\n/**\n * GFM Inline Grammar\n */\n\ninline.gfm = {\n ...inline.normal,\n escape: edit(inline.escape).replace('])', '~|])').getRegex(),\n _extended_email: /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,\n url: /^((?:ftp|https?):\\/\\/|www\\.)(?:[a-zA-Z0-9\\-]+\\.?)+[^\\s<]*|^email/,\n _backpedal: /(?:[^?!.,:;*_'\"~()&]+|\\([^)]*\\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'\"~)]+(?!$))+/,\n del: /^(~~?)(?=[^\\s~])([\\s\\S]*?[^\\s~])\\1(?=[^~]|$)/,\n text: /^([`~]+|[^`~])(?:(?= {2,}\\n)|(?=[a-zA-Z0-9.!#$%&'*+\\/=?_`{\\|}~-]+@)|[\\s\\S]*?(?:(?=[\\\\ 0.5) {\n ch = 'x' + ch.toString(16);\n }\n out += '&#' + ch + ';';\n }\n return out;\n}\n\n/**\n * Block Lexer\n */\nclass Lexer {\n constructor(options) {\n this.tokens = [];\n this.tokens.links = Object.create(null);\n this.options = options || defaults;\n this.options.tokenizer = this.options.tokenizer || new Tokenizer();\n this.tokenizer = this.options.tokenizer;\n this.tokenizer.options = this.options;\n this.tokenizer.lexer = this;\n this.inlineQueue = [];\n this.state = {\n inLink: false,\n inRawBlock: false,\n top: true\n };\n const rules = {\n block: block.normal,\n inline: inline.normal\n };\n if (this.options.pedantic) {\n rules.block = block.pedantic;\n rules.inline = inline.pedantic;\n } else if (this.options.gfm) {\n rules.block = block.gfm;\n if (this.options.breaks) {\n rules.inline = inline.breaks;\n } else {\n rules.inline = inline.gfm;\n }\n }\n this.tokenizer.rules = rules;\n }\n\n /**\n * Expose Rules\n */\n static get rules() {\n return {\n block,\n inline\n };\n }\n\n /**\n * Static Lex Method\n */\n static lex(src, options) {\n const lexer = new Lexer(options);\n return lexer.lex(src);\n }\n\n /**\n * Static Lex Inline Method\n */\n static lexInline(src, options) {\n const lexer = new Lexer(options);\n return lexer.inlineTokens(src);\n }\n\n /**\n * Preprocessing\n */\n lex(src) {\n src = src.replace(/\\r\\n|\\r/g, '\\n');\n this.blockTokens(src, this.tokens);\n let next;\n while (next = this.inlineQueue.shift()) {\n this.inlineTokens(next.src, next.tokens);\n }\n return this.tokens;\n }\n\n /**\n * Lexing\n */\n blockTokens(src, tokens = []) {\n if (this.options.pedantic) {\n src = src.replace(/\\t/g, ' ').replace(/^ +$/gm, '');\n } else {\n src = src.replace(/^( *)(\\t+)/gm, (_, leading, tabs) => {\n return leading + ' '.repeat(tabs.length);\n });\n }\n let token, lastToken, cutSrc, lastParagraphClipped;\n while (src) {\n if (this.options.extensions && this.options.extensions.block && this.options.extensions.block.some(extTokenizer => {\n if (token = extTokenizer.call({\n lexer: this\n }, src, tokens)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n return true;\n }\n return false;\n })) {\n continue;\n }\n\n // newline\n if (token = this.tokenizer.space(src)) {\n src = src.substring(token.raw.length);\n if (token.raw.length === 1 && tokens.length > 0) {\n // if there's a single \\n as a spacer, it's terminating the last line,\n // so move it there so that we don't get unecessary paragraph tags\n tokens[tokens.length - 1].raw += '\\n';\n } else {\n tokens.push(token);\n }\n continue;\n }\n\n // code\n if (token = this.tokenizer.code(src)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1];\n // An indented code block cannot interrupt a paragraph.\n if (lastToken && (lastToken.type === 'paragraph' || lastToken.type === 'text')) {\n lastToken.raw += '\\n' + token.raw;\n lastToken.text += '\\n' + token.text;\n this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n } else {\n tokens.push(token);\n }\n continue;\n }\n\n // fences\n if (token = this.tokenizer.fences(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // heading\n if (token = this.tokenizer.heading(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // hr\n if (token = this.tokenizer.hr(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // blockquote\n if (token = this.tokenizer.blockquote(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // list\n if (token = this.tokenizer.list(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // html\n if (token = this.tokenizer.html(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // def\n if (token = this.tokenizer.def(src)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1];\n if (lastToken && (lastToken.type === 'paragraph' || lastToken.type === 'text')) {\n lastToken.raw += '\\n' + token.raw;\n lastToken.text += '\\n' + token.raw;\n this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n } else if (!this.tokens.links[token.tag]) {\n this.tokens.links[token.tag] = {\n href: token.href,\n title: token.title\n };\n }\n continue;\n }\n\n // table (gfm)\n if (token = this.tokenizer.table(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // lheading\n if (token = this.tokenizer.lheading(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // top-level paragraph\n // prevent paragraph consuming extensions by clipping 'src' to extension start\n cutSrc = src;\n if (this.options.extensions && this.options.extensions.startBlock) {\n let startIndex = Infinity;\n const tempSrc = src.slice(1);\n let tempStart;\n this.options.extensions.startBlock.forEach(function (getStartIndex) {\n tempStart = getStartIndex.call({\n lexer: this\n }, tempSrc);\n if (typeof tempStart === 'number' && tempStart >= 0) {\n startIndex = Math.min(startIndex, tempStart);\n }\n });\n if (startIndex < Infinity && startIndex >= 0) {\n cutSrc = src.substring(0, startIndex + 1);\n }\n }\n if (this.state.top && (token = this.tokenizer.paragraph(cutSrc))) {\n lastToken = tokens[tokens.length - 1];\n if (lastParagraphClipped && lastToken.type === 'paragraph') {\n lastToken.raw += '\\n' + token.raw;\n lastToken.text += '\\n' + token.text;\n this.inlineQueue.pop();\n this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n } else {\n tokens.push(token);\n }\n lastParagraphClipped = cutSrc.length !== src.length;\n src = src.substring(token.raw.length);\n continue;\n }\n\n // text\n if (token = this.tokenizer.text(src)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1];\n if (lastToken && lastToken.type === 'text') {\n lastToken.raw += '\\n' + token.raw;\n lastToken.text += '\\n' + token.text;\n this.inlineQueue.pop();\n this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n } else {\n tokens.push(token);\n }\n continue;\n }\n if (src) {\n const errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0);\n if (this.options.silent) {\n console.error(errMsg);\n break;\n } else {\n throw new Error(errMsg);\n }\n }\n }\n this.state.top = true;\n return tokens;\n }\n inline(src, tokens = []) {\n this.inlineQueue.push({\n src,\n tokens\n });\n return tokens;\n }\n\n /**\n * Lexing/Compiling\n */\n inlineTokens(src, tokens = []) {\n let token, lastToken, cutSrc;\n\n // String with links masked to avoid interference with em and strong\n let maskedSrc = src;\n let match;\n let keepPrevChar, prevChar;\n\n // Mask out reflinks\n if (this.tokens.links) {\n const links = Object.keys(this.tokens.links);\n if (links.length > 0) {\n while ((match = this.tokenizer.rules.inline.reflinkSearch.exec(maskedSrc)) != null) {\n if (links.includes(match[0].slice(match[0].lastIndexOf('[') + 1, -1))) {\n maskedSrc = maskedSrc.slice(0, match.index) + '[' + repeatString('a', match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex);\n }\n }\n }\n }\n // Mask out other blocks\n while ((match = this.tokenizer.rules.inline.blockSkip.exec(maskedSrc)) != null) {\n maskedSrc = maskedSrc.slice(0, match.index) + '[' + repeatString('a', match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);\n }\n\n // Mask out escaped em & strong delimiters\n while ((match = this.tokenizer.rules.inline.escapedEmSt.exec(maskedSrc)) != null) {\n maskedSrc = maskedSrc.slice(0, match.index + match[0].length - 2) + '++' + maskedSrc.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);\n this.tokenizer.rules.inline.escapedEmSt.lastIndex--;\n }\n while (src) {\n if (!keepPrevChar) {\n prevChar = '';\n }\n keepPrevChar = false;\n\n // extensions\n if (this.options.extensions && this.options.extensions.inline && this.options.extensions.inline.some(extTokenizer => {\n if (token = extTokenizer.call({\n lexer: this\n }, src, tokens)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n return true;\n }\n return false;\n })) {\n continue;\n }\n\n // escape\n if (token = this.tokenizer.escape(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // tag\n if (token = this.tokenizer.tag(src)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1];\n if (lastToken && token.type === 'text' && lastToken.type === 'text') {\n lastToken.raw += token.raw;\n lastToken.text += token.text;\n } else {\n tokens.push(token);\n }\n continue;\n }\n\n // link\n if (token = this.tokenizer.link(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // reflink, nolink\n if (token = this.tokenizer.reflink(src, this.tokens.links)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1];\n if (lastToken && token.type === 'text' && lastToken.type === 'text') {\n lastToken.raw += token.raw;\n lastToken.text += token.text;\n } else {\n tokens.push(token);\n }\n continue;\n }\n\n // em & strong\n if (token = this.tokenizer.emStrong(src, maskedSrc, prevChar)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // code\n if (token = this.tokenizer.codespan(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // br\n if (token = this.tokenizer.br(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // del (gfm)\n if (token = this.tokenizer.del(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // autolink\n if (token = this.tokenizer.autolink(src, mangle)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // url (gfm)\n if (!this.state.inLink && (token = this.tokenizer.url(src, mangle))) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // text\n // prevent inlineText consuming extensions by clipping 'src' to extension start\n cutSrc = src;\n if (this.options.extensions && this.options.extensions.startInline) {\n let startIndex = Infinity;\n const tempSrc = src.slice(1);\n let tempStart;\n this.options.extensions.startInline.forEach(function (getStartIndex) {\n tempStart = getStartIndex.call({\n lexer: this\n }, tempSrc);\n if (typeof tempStart === 'number' && tempStart >= 0) {\n startIndex = Math.min(startIndex, tempStart);\n }\n });\n if (startIndex < Infinity && startIndex >= 0) {\n cutSrc = src.substring(0, startIndex + 1);\n }\n }\n if (token = this.tokenizer.inlineText(cutSrc, smartypants)) {\n src = src.substring(token.raw.length);\n if (token.raw.slice(-1) !== '_') {\n // Track prevChar before string of ____ started\n prevChar = token.raw.slice(-1);\n }\n keepPrevChar = true;\n lastToken = tokens[tokens.length - 1];\n if (lastToken && lastToken.type === 'text') {\n lastToken.raw += token.raw;\n lastToken.text += token.text;\n } else {\n tokens.push(token);\n }\n continue;\n }\n if (src) {\n const errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0);\n if (this.options.silent) {\n console.error(errMsg);\n break;\n } else {\n throw new Error(errMsg);\n }\n }\n }\n return tokens;\n }\n}\n\n/**\n * Renderer\n */\nclass Renderer {\n constructor(options) {\n this.options = options || defaults;\n }\n code(code, infostring, escaped) {\n const lang = (infostring || '').match(/\\S*/)[0];\n if (this.options.highlight) {\n const out = this.options.highlight(code, lang);\n if (out != null && out !== code) {\n escaped = true;\n code = out;\n }\n }\n code = code.replace(/\\n$/, '') + '\\n';\n if (!lang) {\n return '
' + (escaped ? code : escape(code, true)) + '
\\n';\n }\n return '
' + (escaped ? code : escape(code, true)) + '
\\n';\n }\n\n /**\n * @param {string} quote\n */\n blockquote(quote) {\n return `
\\n${quote}
\\n`;\n }\n html(html) {\n return html;\n }\n\n /**\n * @param {string} text\n * @param {string} level\n * @param {string} raw\n * @param {any} slugger\n */\n heading(text, level, raw, slugger) {\n if (this.options.headerIds) {\n const id = this.options.headerPrefix + slugger.slug(raw);\n return `${text}\\n`;\n }\n\n // ignore IDs\n return `${text}\\n`;\n }\n hr() {\n return this.options.xhtml ? '
\\n' : '
\\n';\n }\n list(body, ordered, start) {\n const type = ordered ? 'ol' : 'ul',\n startatt = ordered && start !== 1 ? ' start=\"' + start + '\"' : '';\n return '<' + type + startatt + '>\\n' + body + '\\n';\n }\n\n /**\n * @param {string} text\n */\n listitem(text) {\n return `
  • ${text}
  • \\n`;\n }\n checkbox(checked) {\n return ' ';\n }\n\n /**\n * @param {string} text\n */\n paragraph(text) {\n return `

    ${text}

    \\n`;\n }\n\n /**\n * @param {string} header\n * @param {string} body\n */\n table(header, body) {\n if (body) body = `${body}`;\n return '\\n' + '\\n' + header + '\\n' + body + '
    \\n';\n }\n\n /**\n * @param {string} content\n */\n tablerow(content) {\n return `\\n${content}\\n`;\n }\n tablecell(content, flags) {\n const type = flags.header ? 'th' : 'td';\n const tag = flags.align ? `<${type} align=\"${flags.align}\">` : `<${type}>`;\n return tag + content + `\\n`;\n }\n\n /**\n * span level renderer\n * @param {string} text\n */\n strong(text) {\n return `${text}`;\n }\n\n /**\n * @param {string} text\n */\n em(text) {\n return `${text}`;\n }\n\n /**\n * @param {string} text\n */\n codespan(text) {\n return `${text}`;\n }\n br() {\n return this.options.xhtml ? '
    ' : '
    ';\n }\n\n /**\n * @param {string} text\n */\n del(text) {\n return `${text}`;\n }\n\n /**\n * @param {string} href\n * @param {string} title\n * @param {string} text\n */\n link(href, title, text) {\n href = cleanUrl(this.options.sanitize, this.options.baseUrl, href);\n if (href === null) {\n return text;\n }\n let out = '
    ';\n return out;\n }\n\n /**\n * @param {string} href\n * @param {string} title\n * @param {string} text\n */\n image(href, title, text) {\n href = cleanUrl(this.options.sanitize, this.options.baseUrl, href);\n if (href === null) {\n return text;\n }\n let out = `\"${text}\"`;\n' : '>';\n return out;\n }\n text(text) {\n return text;\n }\n}\n\n/**\n * TextRenderer\n * returns only the textual part of the token\n */\nclass TextRenderer {\n // no need for block level renderers\n strong(text) {\n return text;\n }\n em(text) {\n return text;\n }\n codespan(text) {\n return text;\n }\n del(text) {\n return text;\n }\n html(text) {\n return text;\n }\n text(text) {\n return text;\n }\n link(href, title, text) {\n return '' + text;\n }\n image(href, title, text) {\n return '' + text;\n }\n br() {\n return '';\n }\n}\n\n/**\n * Slugger generates header id\n */\nclass Slugger {\n constructor() {\n this.seen = {};\n }\n\n /**\n * @param {string} value\n */\n serialize(value) {\n return value.toLowerCase().trim()\n // remove html tags\n .replace(/<[!\\/a-z].*?>/ig, '')\n // remove unwanted chars\n .replace(/[\\u2000-\\u206F\\u2E00-\\u2E7F\\\\'!\"#$%&()*+,./:;<=>?@[\\]^`{|}~]/g, '').replace(/\\s/g, '-');\n }\n\n /**\n * Finds the next safe (unique) slug to use\n * @param {string} originalSlug\n * @param {boolean} isDryRun\n */\n getNextSafeSlug(originalSlug, isDryRun) {\n let slug = originalSlug;\n let occurenceAccumulator = 0;\n if (this.seen.hasOwnProperty(slug)) {\n occurenceAccumulator = this.seen[originalSlug];\n do {\n occurenceAccumulator++;\n slug = originalSlug + '-' + occurenceAccumulator;\n } while (this.seen.hasOwnProperty(slug));\n }\n if (!isDryRun) {\n this.seen[originalSlug] = occurenceAccumulator;\n this.seen[slug] = 0;\n }\n return slug;\n }\n\n /**\n * Convert string to unique id\n * @param {object} [options]\n * @param {boolean} [options.dryrun] Generates the next unique slug without\n * updating the internal accumulator.\n */\n slug(value, options = {}) {\n const slug = this.serialize(value);\n return this.getNextSafeSlug(slug, options.dryrun);\n }\n}\n\n/**\n * Parsing & Compiling\n */\nclass Parser {\n constructor(options) {\n this.options = options || defaults;\n this.options.renderer = this.options.renderer || new Renderer();\n this.renderer = this.options.renderer;\n this.renderer.options = this.options;\n this.textRenderer = new TextRenderer();\n this.slugger = new Slugger();\n }\n\n /**\n * Static Parse Method\n */\n static parse(tokens, options) {\n const parser = new Parser(options);\n return parser.parse(tokens);\n }\n\n /**\n * Static Parse Inline Method\n */\n static parseInline(tokens, options) {\n const parser = new Parser(options);\n return parser.parseInline(tokens);\n }\n\n /**\n * Parse Loop\n */\n parse(tokens, top = true) {\n let out = '',\n i,\n j,\n k,\n l2,\n l3,\n row,\n cell,\n header,\n body,\n token,\n ordered,\n start,\n loose,\n itemBody,\n item,\n checked,\n task,\n checkbox,\n ret;\n const l = tokens.length;\n for (i = 0; i < l; i++) {\n token = tokens[i];\n\n // Run any renderer extensions\n if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[token.type]) {\n ret = this.options.extensions.renderers[token.type].call({\n parser: this\n }, token);\n if (ret !== false || !['space', 'hr', 'heading', 'code', 'table', 'blockquote', 'list', 'html', 'paragraph', 'text'].includes(token.type)) {\n out += ret || '';\n continue;\n }\n }\n switch (token.type) {\n case 'space':\n {\n continue;\n }\n case 'hr':\n {\n out += this.renderer.hr();\n continue;\n }\n case 'heading':\n {\n out += this.renderer.heading(this.parseInline(token.tokens), token.depth, unescape(this.parseInline(token.tokens, this.textRenderer)), this.slugger);\n continue;\n }\n case 'code':\n {\n out += this.renderer.code(token.text, token.lang, token.escaped);\n continue;\n }\n case 'table':\n {\n header = '';\n\n // header\n cell = '';\n l2 = token.header.length;\n for (j = 0; j < l2; j++) {\n cell += this.renderer.tablecell(this.parseInline(token.header[j].tokens), {\n header: true,\n align: token.align[j]\n });\n }\n header += this.renderer.tablerow(cell);\n body = '';\n l2 = token.rows.length;\n for (j = 0; j < l2; j++) {\n row = token.rows[j];\n cell = '';\n l3 = row.length;\n for (k = 0; k < l3; k++) {\n cell += this.renderer.tablecell(this.parseInline(row[k].tokens), {\n header: false,\n align: token.align[k]\n });\n }\n body += this.renderer.tablerow(cell);\n }\n out += this.renderer.table(header, body);\n continue;\n }\n case 'blockquote':\n {\n body = this.parse(token.tokens);\n out += this.renderer.blockquote(body);\n continue;\n }\n case 'list':\n {\n ordered = token.ordered;\n start = token.start;\n loose = token.loose;\n l2 = token.items.length;\n body = '';\n for (j = 0; j < l2; j++) {\n item = token.items[j];\n checked = item.checked;\n task = item.task;\n itemBody = '';\n if (item.task) {\n checkbox = this.renderer.checkbox(checked);\n if (loose) {\n if (item.tokens.length > 0 && item.tokens[0].type === 'paragraph') {\n item.tokens[0].text = checkbox + ' ' + item.tokens[0].text;\n if (item.tokens[0].tokens && item.tokens[0].tokens.length > 0 && item.tokens[0].tokens[0].type === 'text') {\n item.tokens[0].tokens[0].text = checkbox + ' ' + item.tokens[0].tokens[0].text;\n }\n } else {\n item.tokens.unshift({\n type: 'text',\n text: checkbox\n });\n }\n } else {\n itemBody += checkbox;\n }\n }\n itemBody += this.parse(item.tokens, loose);\n body += this.renderer.listitem(itemBody, task, checked);\n }\n out += this.renderer.list(body, ordered, start);\n continue;\n }\n case 'html':\n {\n // TODO parse inline content if parameter markdown=1\n out += this.renderer.html(token.text);\n continue;\n }\n case 'paragraph':\n {\n out += this.renderer.paragraph(this.parseInline(token.tokens));\n continue;\n }\n case 'text':\n {\n body = token.tokens ? this.parseInline(token.tokens) : token.text;\n while (i + 1 < l && tokens[i + 1].type === 'text') {\n token = tokens[++i];\n body += '\\n' + (token.tokens ? this.parseInline(token.tokens) : token.text);\n }\n out += top ? this.renderer.paragraph(body) : body;\n continue;\n }\n default:\n {\n const errMsg = 'Token with \"' + token.type + '\" type was not found.';\n if (this.options.silent) {\n console.error(errMsg);\n return;\n } else {\n throw new Error(errMsg);\n }\n }\n }\n }\n return out;\n }\n\n /**\n * Parse Inline Tokens\n */\n parseInline(tokens, renderer) {\n renderer = renderer || this.renderer;\n let out = '',\n i,\n token,\n ret;\n const l = tokens.length;\n for (i = 0; i < l; i++) {\n token = tokens[i];\n\n // Run any renderer extensions\n if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[token.type]) {\n ret = this.options.extensions.renderers[token.type].call({\n parser: this\n }, token);\n if (ret !== false || !['escape', 'html', 'link', 'image', 'strong', 'em', 'codespan', 'br', 'del', 'text'].includes(token.type)) {\n out += ret || '';\n continue;\n }\n }\n switch (token.type) {\n case 'escape':\n {\n out += renderer.text(token.text);\n break;\n }\n case 'html':\n {\n out += renderer.html(token.text);\n break;\n }\n case 'link':\n {\n out += renderer.link(token.href, token.title, this.parseInline(token.tokens, renderer));\n break;\n }\n case 'image':\n {\n out += renderer.image(token.href, token.title, token.text);\n break;\n }\n case 'strong':\n {\n out += renderer.strong(this.parseInline(token.tokens, renderer));\n break;\n }\n case 'em':\n {\n out += renderer.em(this.parseInline(token.tokens, renderer));\n break;\n }\n case 'codespan':\n {\n out += renderer.codespan(token.text);\n break;\n }\n case 'br':\n {\n out += renderer.br();\n break;\n }\n case 'del':\n {\n out += renderer.del(this.parseInline(token.tokens, renderer));\n break;\n }\n case 'text':\n {\n out += renderer.text(token.text);\n break;\n }\n default:\n {\n const errMsg = 'Token with \"' + token.type + '\" type was not found.';\n if (this.options.silent) {\n console.error(errMsg);\n return;\n } else {\n throw new Error(errMsg);\n }\n }\n }\n }\n return out;\n }\n}\nclass Hooks {\n constructor(options) {\n this.options = options || defaults;\n }\n static passThroughHooks = new Set(['preprocess', 'postprocess']);\n\n /**\n * Process markdown before marked\n */\n preprocess(markdown) {\n return markdown;\n }\n\n /**\n * Process HTML after marked is finished\n */\n postprocess(html) {\n return html;\n }\n}\nfunction onError(silent, async, callback) {\n return e => {\n e.message += '\\nPlease report this to https://github.com/markedjs/marked.';\n if (silent) {\n const msg = '

    An error occurred:

    ' + escape(e.message + '', true) + '
    ';\n if (async) {\n return Promise.resolve(msg);\n }\n if (callback) {\n callback(null, msg);\n return;\n }\n return msg;\n }\n if (async) {\n return Promise.reject(e);\n }\n if (callback) {\n callback(e);\n return;\n }\n throw e;\n };\n}\nfunction parseMarkdown(lexer, parser) {\n return (src, opt, callback) => {\n if (typeof opt === 'function') {\n callback = opt;\n opt = null;\n }\n const origOpt = {\n ...opt\n };\n opt = {\n ...marked.defaults,\n ...origOpt\n };\n const throwError = onError(opt.silent, opt.async, callback);\n\n // throw error in case of non string input\n if (typeof src === 'undefined' || src === null) {\n return throwError(new Error('marked(): input parameter is undefined or null'));\n }\n if (typeof src !== 'string') {\n return throwError(new Error('marked(): input parameter is of type ' + Object.prototype.toString.call(src) + ', string expected'));\n }\n checkSanitizeDeprecation(opt);\n if (opt.hooks) {\n opt.hooks.options = opt;\n }\n if (callback) {\n const highlight = opt.highlight;\n let tokens;\n try {\n if (opt.hooks) {\n src = opt.hooks.preprocess(src);\n }\n tokens = lexer(src, opt);\n } catch (e) {\n return throwError(e);\n }\n const done = function (err) {\n let out;\n if (!err) {\n try {\n if (opt.walkTokens) {\n marked.walkTokens(tokens, opt.walkTokens);\n }\n out = parser(tokens, opt);\n if (opt.hooks) {\n out = opt.hooks.postprocess(out);\n }\n } catch (e) {\n err = e;\n }\n }\n opt.highlight = highlight;\n return err ? throwError(err) : callback(null, out);\n };\n if (!highlight || highlight.length < 3) {\n return done();\n }\n delete opt.highlight;\n if (!tokens.length) return done();\n let pending = 0;\n marked.walkTokens(tokens, function (token) {\n if (token.type === 'code') {\n pending++;\n setTimeout(() => {\n highlight(token.text, token.lang, function (err, code) {\n if (err) {\n return done(err);\n }\n if (code != null && code !== token.text) {\n token.text = code;\n token.escaped = true;\n }\n pending--;\n if (pending === 0) {\n done();\n }\n });\n }, 0);\n }\n });\n if (pending === 0) {\n done();\n }\n return;\n }\n if (opt.async) {\n return Promise.resolve(opt.hooks ? opt.hooks.preprocess(src) : src).then(src => lexer(src, opt)).then(tokens => opt.walkTokens ? Promise.all(marked.walkTokens(tokens, opt.walkTokens)).then(() => tokens) : tokens).then(tokens => parser(tokens, opt)).then(html => opt.hooks ? opt.hooks.postprocess(html) : html).catch(throwError);\n }\n try {\n if (opt.hooks) {\n src = opt.hooks.preprocess(src);\n }\n const tokens = lexer(src, opt);\n if (opt.walkTokens) {\n marked.walkTokens(tokens, opt.walkTokens);\n }\n let html = parser(tokens, opt);\n if (opt.hooks) {\n html = opt.hooks.postprocess(html);\n }\n return html;\n } catch (e) {\n return throwError(e);\n }\n };\n}\n\n/**\n * Marked\n */\nfunction marked(src, opt, callback) {\n return parseMarkdown(Lexer.lex, Parser.parse)(src, opt, callback);\n}\n\n/**\n * Options\n */\n\nmarked.options = marked.setOptions = function (opt) {\n marked.defaults = {\n ...marked.defaults,\n ...opt\n };\n changeDefaults(marked.defaults);\n return marked;\n};\nmarked.getDefaults = getDefaults;\nmarked.defaults = defaults;\n\n/**\n * Use Extension\n */\n\nmarked.use = function (...args) {\n const extensions = marked.defaults.extensions || {\n renderers: {},\n childTokens: {}\n };\n args.forEach(pack => {\n // copy options to new object\n const opts = {\n ...pack\n };\n\n // set async to true if it was set to true before\n opts.async = marked.defaults.async || opts.async || false;\n\n // ==-- Parse \"addon\" extensions --== //\n if (pack.extensions) {\n pack.extensions.forEach(ext => {\n if (!ext.name) {\n throw new Error('extension name required');\n }\n if (ext.renderer) {\n // Renderer extensions\n const prevRenderer = extensions.renderers[ext.name];\n if (prevRenderer) {\n // Replace extension with func to run new extension but fall back if false\n extensions.renderers[ext.name] = function (...args) {\n let ret = ext.renderer.apply(this, args);\n if (ret === false) {\n ret = prevRenderer.apply(this, args);\n }\n return ret;\n };\n } else {\n extensions.renderers[ext.name] = ext.renderer;\n }\n }\n if (ext.tokenizer) {\n // Tokenizer Extensions\n if (!ext.level || ext.level !== 'block' && ext.level !== 'inline') {\n throw new Error(\"extension level must be 'block' or 'inline'\");\n }\n if (extensions[ext.level]) {\n extensions[ext.level].unshift(ext.tokenizer);\n } else {\n extensions[ext.level] = [ext.tokenizer];\n }\n if (ext.start) {\n // Function to check for start of token\n if (ext.level === 'block') {\n if (extensions.startBlock) {\n extensions.startBlock.push(ext.start);\n } else {\n extensions.startBlock = [ext.start];\n }\n } else if (ext.level === 'inline') {\n if (extensions.startInline) {\n extensions.startInline.push(ext.start);\n } else {\n extensions.startInline = [ext.start];\n }\n }\n }\n }\n if (ext.childTokens) {\n // Child tokens to be visited by walkTokens\n extensions.childTokens[ext.name] = ext.childTokens;\n }\n });\n opts.extensions = extensions;\n }\n\n // ==-- Parse \"overwrite\" extensions --== //\n if (pack.renderer) {\n const renderer = marked.defaults.renderer || new Renderer();\n for (const prop in pack.renderer) {\n const prevRenderer = renderer[prop];\n // Replace renderer with func to run extension, but fall back if false\n renderer[prop] = (...args) => {\n let ret = pack.renderer[prop].apply(renderer, args);\n if (ret === false) {\n ret = prevRenderer.apply(renderer, args);\n }\n return ret;\n };\n }\n opts.renderer = renderer;\n }\n if (pack.tokenizer) {\n const tokenizer = marked.defaults.tokenizer || new Tokenizer();\n for (const prop in pack.tokenizer) {\n const prevTokenizer = tokenizer[prop];\n // Replace tokenizer with func to run extension, but fall back if false\n tokenizer[prop] = (...args) => {\n let ret = pack.tokenizer[prop].apply(tokenizer, args);\n if (ret === false) {\n ret = prevTokenizer.apply(tokenizer, args);\n }\n return ret;\n };\n }\n opts.tokenizer = tokenizer;\n }\n\n // ==-- Parse Hooks extensions --== //\n if (pack.hooks) {\n const hooks = marked.defaults.hooks || new Hooks();\n for (const prop in pack.hooks) {\n const prevHook = hooks[prop];\n if (Hooks.passThroughHooks.has(prop)) {\n hooks[prop] = arg => {\n if (marked.defaults.async) {\n return Promise.resolve(pack.hooks[prop].call(hooks, arg)).then(ret => {\n return prevHook.call(hooks, ret);\n });\n }\n const ret = pack.hooks[prop].call(hooks, arg);\n return prevHook.call(hooks, ret);\n };\n } else {\n hooks[prop] = (...args) => {\n let ret = pack.hooks[prop].apply(hooks, args);\n if (ret === false) {\n ret = prevHook.apply(hooks, args);\n }\n return ret;\n };\n }\n }\n opts.hooks = hooks;\n }\n\n // ==-- Parse WalkTokens extensions --== //\n if (pack.walkTokens) {\n const walkTokens = marked.defaults.walkTokens;\n opts.walkTokens = function (token) {\n let values = [];\n values.push(pack.walkTokens.call(this, token));\n if (walkTokens) {\n values = values.concat(walkTokens.call(this, token));\n }\n return values;\n };\n }\n marked.setOptions(opts);\n });\n};\n\n/**\n * Run callback for every token\n */\n\nmarked.walkTokens = function (tokens, callback) {\n let values = [];\n for (const token of tokens) {\n values = values.concat(callback.call(marked, token));\n switch (token.type) {\n case 'table':\n {\n for (const cell of token.header) {\n values = values.concat(marked.walkTokens(cell.tokens, callback));\n }\n for (const row of token.rows) {\n for (const cell of row) {\n values = values.concat(marked.walkTokens(cell.tokens, callback));\n }\n }\n break;\n }\n case 'list':\n {\n values = values.concat(marked.walkTokens(token.items, callback));\n break;\n }\n default:\n {\n if (marked.defaults.extensions && marked.defaults.extensions.childTokens && marked.defaults.extensions.childTokens[token.type]) {\n // Walk any extensions\n marked.defaults.extensions.childTokens[token.type].forEach(function (childTokens) {\n values = values.concat(marked.walkTokens(token[childTokens], callback));\n });\n } else if (token.tokens) {\n values = values.concat(marked.walkTokens(token.tokens, callback));\n }\n }\n }\n }\n return values;\n};\n\n/**\n * Parse Inline\n * @param {string} src\n */\nmarked.parseInline = parseMarkdown(Lexer.lexInline, Parser.parseInline);\n\n/**\n * Expose\n */\nmarked.Parser = Parser;\nmarked.parser = Parser.parse;\nmarked.Renderer = Renderer;\nmarked.TextRenderer = TextRenderer;\nmarked.Lexer = Lexer;\nmarked.lexer = Lexer.lex;\nmarked.Tokenizer = Tokenizer;\nmarked.Slugger = Slugger;\nmarked.Hooks = Hooks;\nmarked.parse = marked;\nconst options = marked.options;\nconst setOptions = marked.setOptions;\nconst use = marked.use;\nconst walkTokens = marked.walkTokens;\nconst parseInline = marked.parseInline;\nconst parse = marked;\nconst parser = Parser.parse;\nconst lexer = Lexer.lex;\nexport { Hooks, Lexer, Parser, Renderer, Slugger, TextRenderer, Tokenizer, defaults, getDefaults, lexer, marked, options, parse, parseInline, parser, setOptions, use, walkTokens };","import * as i0 from '@angular/core';\nimport { Component, ChangeDetectionStrategy, Pipe, InjectionToken, PLATFORM_ID, Injectable, Inject, Optional, EventEmitter, Input, Output, SecurityContext, NgModule } from '@angular/core';\nimport { Subject, merge, of, timer } from 'rxjs';\nimport { switchMap, mapTo, distinctUntilChanged, shareReplay, startWith, map, takeUntil, first } from 'rxjs/operators';\nimport * as i1 from '@angular/common';\nimport { isPlatformBrowser, CommonModule } from '@angular/common';\nimport { Renderer, marked } from 'marked';\nexport { Renderer as MarkedRenderer } from 'marked';\nimport * as i1$1 from '@angular/common/http';\nimport * as i4 from '@angular/platform-browser';\nconst _c0 = [\"*\"];\nconst BUTTON_TEXT_COPY = 'Copy';\nconst BUTTON_TEXT_COPIED = 'Copied';\nlet ClipboardButtonComponent = /*#__PURE__*/(() => {\n class ClipboardButtonComponent {\n constructor() {\n this._buttonClick$ = new Subject();\n this.copied$ = this._buttonClick$.pipe(switchMap(() => merge(of(true), timer(3000).pipe(mapTo(false)))), distinctUntilChanged(), shareReplay(1));\n this.copiedText$ = this.copied$.pipe(startWith(false), map(copied => copied ? BUTTON_TEXT_COPIED : BUTTON_TEXT_COPY));\n }\n onCopyToClipboardClick() {\n this._buttonClick$.next();\n }\n }\n ClipboardButtonComponent.ɵfac = function ClipboardButtonComponent_Factory(t) {\n return new (t || ClipboardButtonComponent)();\n };\n ClipboardButtonComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: ClipboardButtonComponent,\n selectors: [[\"markdown-clipboard\"]],\n decls: 4,\n vars: 7,\n consts: [[1, \"markdown-clipboard-button\", 3, \"click\"]],\n template: function ClipboardButtonComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"button\", 0);\n i0.ɵɵpipe(1, \"async\");\n i0.ɵɵlistener(\"click\", function ClipboardButtonComponent_Template_button_click_0_listener() {\n return ctx.onCopyToClipboardClick();\n });\n i0.ɵɵtext(2);\n i0.ɵɵpipe(3, \"async\");\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵclassProp(\"copied\", i0.ɵɵpipeBind1(1, 3, ctx.copied$));\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 5, ctx.copiedText$));\n }\n },\n dependencies: [i1.AsyncPipe],\n encapsulation: 2,\n changeDetection: 0\n });\n return ClipboardButtonComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nclass ClipboardOptions {}\nclass ClipboardRenderOptions extends ClipboardOptions {}\n\n/* eslint-disable */\nclass KatexSpecificOptions {}\nlet LanguagePipe = /*#__PURE__*/(() => {\n class LanguagePipe {\n transform(value, language) {\n if (value == null) {\n value = '';\n }\n if (language == null) {\n language = '';\n }\n if (typeof value !== 'string') {\n console.error(`LanguagePipe has been invoked with an invalid value type [${typeof value}]`);\n return value;\n }\n if (typeof language !== 'string') {\n console.error(`LanguagePipe has been invoked with an invalid parameter [${typeof language}]`);\n return value;\n }\n return '```' + language + '\\n' + value + '\\n```';\n }\n }\n LanguagePipe.ɵfac = function LanguagePipe_Factory(t) {\n return new (t || LanguagePipe)();\n };\n LanguagePipe.ɵpipe = /* @__PURE__ */i0.ɵɵdefinePipe({\n name: \"language\",\n type: LanguagePipe,\n pure: true\n });\n return LanguagePipe;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nvar PrismPlugin = /*#__PURE__*/function (PrismPlugin) {\n PrismPlugin[\"CommandLine\"] = \"command-line\";\n PrismPlugin[\"LineHighlight\"] = \"line-highlight\";\n PrismPlugin[\"LineNumbers\"] = \"line-numbers\";\n return PrismPlugin;\n}(PrismPlugin || {});\nclass MarkedOptions {}\n\n/* eslint-disable max-len */\nconst errorJoyPixelsNotLoaded = '[ngx-markdown] When using the `emoji` attribute you *have to* include Emoji-Toolkit files to `angular.json` or use imports. See README for more information';\nconst errorKatexNotLoaded = '[ngx-markdown] When using the `katex` attribute you *have to* include KaTeX files to `angular.json` or use imports. See README for more information';\nconst errorMermaidNotLoaded = '[ngx-markdown] When using the `mermaid` attribute you *have to* include Mermaid files to `angular.json` or use imports. See README for more information';\nconst errorClipboardNotLoaded = '[ngx-markdown] When using the `clipboard` attribute you *have to* include Clipboard files to `angular.json` or use imports. See README for more information';\nconst errorClipboardViewContainerRequired = '[ngx-markdown] When using the `clipboard` attribute you *have to* provide the `viewContainerRef` parameter to `MarkdownService.render()` function';\nconst errorSrcWithoutHttpClient = '[ngx-markdown] When using the `src` attribute you *have to* pass the `HttpClient` as a parameter of the `forRoot` method. See README for more information';\n/* eslint-enable max-len */\nconst SECURITY_CONTEXT = new InjectionToken('SECURITY_CONTEXT');\nclass ExtendedRenderer extends Renderer {\n constructor() {\n super(...arguments);\n this.ɵNgxMarkdownRendererExtended = false;\n }\n}\nlet MarkdownService = /*#__PURE__*/(() => {\n class MarkdownService {\n constructor(platform, securityContext, http, clipboardOptions, options, sanitizer) {\n this.platform = platform;\n this.securityContext = securityContext;\n this.http = http;\n this.clipboardOptions = clipboardOptions;\n this.sanitizer = sanitizer;\n this.DEFAULT_PARSE_OPTIONS = {\n decodeHtml: false,\n inline: false,\n emoji: false,\n mermaid: false,\n markedOptions: undefined\n };\n this.DEFAULT_RENDER_OPTIONS = {\n clipboard: false,\n clipboardOptions: undefined,\n katex: false,\n katexOptions: undefined,\n mermaid: false,\n mermaidOptions: undefined\n };\n this.DEFAULT_MARKED_OPTIONS = {\n renderer: new Renderer()\n };\n this.DEFAULT_KATEX_OPTIONS = {\n delimiters: [{\n left: \"$$\",\n right: \"$$\",\n display: true\n }, {\n left: \"$\",\n right: \"$\",\n display: false\n }, {\n left: \"\\\\(\",\n right: \"\\\\)\",\n display: false\n }, {\n left: \"\\\\begin{equation}\",\n right: \"\\\\end{equation}\",\n display: true\n }, {\n left: \"\\\\begin{align}\",\n right: \"\\\\end{align}\",\n display: true\n }, {\n left: \"\\\\begin{alignat}\",\n right: \"\\\\end{alignat}\",\n display: true\n }, {\n left: \"\\\\begin{gather}\",\n right: \"\\\\end{gather}\",\n display: true\n }, {\n left: \"\\\\begin{CD}\",\n right: \"\\\\end{CD}\",\n display: true\n }, {\n left: \"\\\\[\",\n right: \"\\\\]\",\n display: true\n }]\n };\n this.DEFAULT_MERMAID_OPTIONS = {\n startOnLoad: false\n };\n this.DEFAULT_CLIPBOARD_OPTIONS = {\n buttonComponent: undefined\n };\n this._reload$ = new Subject();\n this.reload$ = this._reload$.asObservable();\n this.options = options;\n }\n get options() {\n return this._options;\n }\n set options(value) {\n this._options = {\n ...this.DEFAULT_MARKED_OPTIONS,\n ...value\n };\n }\n get renderer() {\n return this.options.renderer;\n }\n set renderer(value) {\n this.options.renderer = value;\n }\n parse(markdown, options = this.DEFAULT_PARSE_OPTIONS) {\n const {\n decodeHtml,\n inline,\n emoji,\n mermaid,\n markedOptions = this.options\n } = options;\n if (mermaid) {\n this.renderer = this.extendRenderer(markedOptions.renderer || new Renderer());\n }\n const trimmed = this.trimIndentation(markdown);\n const decoded = decodeHtml ? this.decodeHtml(trimmed) : trimmed;\n const emojified = emoji ? this.parseEmoji(decoded) : decoded;\n const marked = this.parseMarked(emojified, markedOptions, inline);\n return this.sanitizer.sanitize(this.securityContext, marked) || '';\n }\n render(element, options = this.DEFAULT_RENDER_OPTIONS, viewContainerRef) {\n const {\n clipboard,\n clipboardOptions,\n katex,\n katexOptions,\n mermaid,\n mermaidOptions\n } = options;\n if (clipboard) {\n this.renderClipboard(element, viewContainerRef, {\n ...this.DEFAULT_CLIPBOARD_OPTIONS,\n ...this.clipboardOptions,\n ...clipboardOptions\n });\n }\n if (katex) {\n this.renderKatex(element, {\n ...this.DEFAULT_KATEX_OPTIONS,\n ...katexOptions\n });\n }\n if (mermaid) {\n this.renderMermaid(element, {\n ...this.DEFAULT_MERMAID_OPTIONS,\n ...mermaidOptions\n });\n }\n this.highlight(element);\n }\n reload() {\n this._reload$.next();\n }\n getSource(src) {\n if (!this.http) {\n throw new Error(errorSrcWithoutHttpClient);\n }\n return this.http.get(src, {\n responseType: 'text'\n }).pipe(map(markdown => this.handleExtension(src, markdown)));\n }\n highlight(element) {\n if (!isPlatformBrowser(this.platform)) {\n return;\n }\n if (typeof Prism === 'undefined' || typeof Prism.highlightAllUnder === 'undefined') {\n return;\n }\n if (!element) {\n element = document;\n }\n const noLanguageElements = element.querySelectorAll('pre code:not([class*=\"language-\"])');\n Array.prototype.forEach.call(noLanguageElements, x => x.classList.add('language-none'));\n Prism.highlightAllUnder(element);\n }\n decodeHtml(html) {\n if (!isPlatformBrowser(this.platform)) {\n return html;\n }\n const textarea = document.createElement('textarea');\n textarea.innerHTML = html;\n return textarea.value;\n }\n extendRenderer(renderer) {\n const extendedRenderer = renderer;\n if (extendedRenderer.ɵNgxMarkdownRendererExtended === true) {\n return renderer;\n }\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const defaultCode = renderer.code;\n renderer.code = function (code, language, isEscaped) {\n return language === 'mermaid' ? `
    ${code}
    ` : defaultCode.call(this, code, language, isEscaped);\n };\n extendedRenderer.ɵNgxMarkdownRendererExtended = true;\n return renderer;\n }\n handleExtension(src, markdown) {\n const urlProtocolIndex = src.lastIndexOf('://');\n const urlWithoutProtocol = urlProtocolIndex > -1 ? src.substring(urlProtocolIndex + 4) : src;\n const lastSlashIndex = urlWithoutProtocol.lastIndexOf('/');\n const lastUrlSegment = lastSlashIndex > -1 ? urlWithoutProtocol.substring(lastSlashIndex + 1).split('?')[0] : '';\n const lastDotIndex = lastUrlSegment.lastIndexOf('.');\n const extension = lastDotIndex > -1 ? lastUrlSegment.substring(lastDotIndex + 1) : '';\n return !!extension && extension !== 'md' ? '```' + extension + '\\n' + markdown + '\\n```' : markdown;\n }\n parseMarked(html, markedOptions, inline = false) {\n if (!isPlatformBrowser(this.platform)) {\n return html;\n }\n if (inline) {\n return marked.parseInline(html, markedOptions);\n }\n return marked.parse(html, markedOptions);\n }\n parseEmoji(html) {\n if (!isPlatformBrowser(this.platform)) {\n return html;\n }\n if (typeof joypixels === 'undefined' || typeof joypixels.shortnameToUnicode === 'undefined') {\n throw new Error(errorJoyPixelsNotLoaded);\n }\n return joypixels.shortnameToUnicode(html);\n }\n renderKatex(element, options) {\n if (!isPlatformBrowser(this.platform)) {\n return;\n }\n if (typeof katex === 'undefined' || typeof renderMathInElement === 'undefined') {\n throw new Error(errorKatexNotLoaded);\n }\n renderMathInElement(element, options);\n }\n renderClipboard(element, viewContainerRef, options) {\n if (!isPlatformBrowser(this.platform)) {\n return;\n }\n if (typeof ClipboardJS === 'undefined') {\n throw new Error(errorClipboardNotLoaded);\n }\n if (!viewContainerRef) {\n throw new Error(errorClipboardViewContainerRequired);\n }\n const {\n buttonComponent,\n buttonTemplate\n } = options;\n // target every
     elements\n      const preElements = element.querySelectorAll('pre');\n      for (let i = 0; i < preElements.length; i++) {\n        const preElement = preElements.item(i);\n        // create 
     wrapper element\n        const preWrapperElement = document.createElement('div');\n        preWrapperElement.style.position = 'relative';\n        preElement.parentNode.insertBefore(preWrapperElement, preElement);\n        preWrapperElement.appendChild(preElement);\n        // create toolbar element\n        const toolbarWrapperElement = document.createElement('div');\n        toolbarWrapperElement.style.position = 'absolute';\n        toolbarWrapperElement.style.top = '.5em';\n        toolbarWrapperElement.style.right = '.5em';\n        toolbarWrapperElement.style.opacity = '0';\n        toolbarWrapperElement.style.transition = 'opacity 250ms ease-out';\n        preWrapperElement.insertAdjacentElement('beforeend', toolbarWrapperElement);\n        // register listener to show/hide toolbar\n        preElement.onmouseover = () => toolbarWrapperElement.style.opacity = '1';\n        preElement.onmouseout = () => toolbarWrapperElement.style.opacity = '0';\n        // declare embeddedViewRef holding variable\n        let embeddedViewRef;\n        // use provided component via input property\n        // or provided via ClipboardOptions provider\n        if (buttonComponent) {\n          const componentRef = viewContainerRef.createComponent(buttonComponent);\n          embeddedViewRef = componentRef.hostView;\n        }\n        // use provided template via input property\n        else if (buttonTemplate) {\n          embeddedViewRef = viewContainerRef.createEmbeddedView(buttonTemplate);\n        }\n        // use default component\n        else {\n          const componentRef = viewContainerRef.createComponent(ClipboardButtonComponent);\n          embeddedViewRef = componentRef.hostView;\n        }\n        // declare clipboard instance variable\n        let clipboardInstance;\n        // attach clipboard.js to root node\n        embeddedViewRef.rootNodes.forEach(node => {\n          node.onmouseover = () => toolbarWrapperElement.style.opacity = '1';\n          toolbarWrapperElement.appendChild(node);\n          clipboardInstance = new ClipboardJS(node, {\n            text: () => preElement.innerText\n          });\n        });\n        // destroy clipboard instance when view is destroyed\n        embeddedViewRef.onDestroy(() => clipboardInstance.destroy());\n      }\n    }\n    renderMermaid(element, options = this.DEFAULT_MERMAID_OPTIONS) {\n      if (!isPlatformBrowser(this.platform)) {\n        return;\n      }\n      if (typeof mermaid === 'undefined' || typeof mermaid.init === 'undefined') {\n        throw new Error(errorMermaidNotLoaded);\n      }\n      const mermaidElements = element.querySelectorAll('.mermaid');\n      if (mermaidElements.length === 0) {\n        return;\n      }\n      mermaid.initialize(options);\n      mermaid.init(mermaidElements);\n    }\n    trimIndentation(markdown) {\n      if (!markdown) {\n        return '';\n      }\n      let indentStart;\n      return markdown.split('\\n').map(line => {\n        let lineIdentStart = indentStart;\n        if (line.length > 0) {\n          lineIdentStart = isNaN(lineIdentStart) ? line.search(/\\S|$/) : Math.min(line.search(/\\S|$/), lineIdentStart);\n        }\n        if (isNaN(indentStart)) {\n          indentStart = lineIdentStart;\n        }\n        return lineIdentStart ? line.substring(lineIdentStart) : line;\n      }).join('\\n');\n    }\n  }\n  MarkdownService.ɵfac = function MarkdownService_Factory(t) {\n    return new (t || MarkdownService)(i0.ɵɵinject(PLATFORM_ID), i0.ɵɵinject(SECURITY_CONTEXT), i0.ɵɵinject(i1$1.HttpClient, 8), i0.ɵɵinject(ClipboardOptions, 8), i0.ɵɵinject(MarkedOptions, 8), i0.ɵɵinject(i4.DomSanitizer));\n  };\n  MarkdownService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: MarkdownService,\n    factory: MarkdownService.ɵfac\n  });\n  return MarkdownService;\n})();\n(() => {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\nlet MarkdownComponent = /*#__PURE__*/(() => {\n  class MarkdownComponent {\n    constructor(element, markdownService, viewContainerRef) {\n      this.element = element;\n      this.markdownService = markdownService;\n      this.viewContainerRef = viewContainerRef;\n      // Event emitters\n      this.error = new EventEmitter();\n      this.load = new EventEmitter();\n      this.ready = new EventEmitter();\n      this._commandLine = false;\n      this._clipboard = false;\n      this._emoji = false;\n      this._inline = false;\n      this._katex = false;\n      this._lineHighlight = false;\n      this._lineNumbers = false;\n      this._mermaid = false;\n      this.destroyed$ = new Subject();\n    }\n    get inline() {\n      return this._inline;\n    }\n    set inline(value) {\n      this._inline = this.coerceBooleanProperty(value);\n    }\n    // Plugin - clipboard\n    get clipboard() {\n      return this._clipboard;\n    }\n    set clipboard(value) {\n      this._clipboard = this.coerceBooleanProperty(value);\n    }\n    // Plugin - emoji\n    get emoji() {\n      return this._emoji;\n    }\n    set emoji(value) {\n      this._emoji = this.coerceBooleanProperty(value);\n    }\n    // Plugin - katex\n    get katex() {\n      return this._katex;\n    }\n    set katex(value) {\n      this._katex = this.coerceBooleanProperty(value);\n    }\n    // Plugin - mermaid\n    get mermaid() {\n      return this._mermaid;\n    }\n    set mermaid(value) {\n      this._mermaid = this.coerceBooleanProperty(value);\n    }\n    // Plugin - lineHighlight\n    get lineHighlight() {\n      return this._lineHighlight;\n    }\n    set lineHighlight(value) {\n      this._lineHighlight = this.coerceBooleanProperty(value);\n    }\n    // Plugin - lineNumbers\n    get lineNumbers() {\n      return this._lineNumbers;\n    }\n    set lineNumbers(value) {\n      this._lineNumbers = this.coerceBooleanProperty(value);\n    }\n    // Plugin - commandLine\n    get commandLine() {\n      return this._commandLine;\n    }\n    set commandLine(value) {\n      this._commandLine = this.coerceBooleanProperty(value);\n    }\n    ngOnChanges() {\n      this.loadContent();\n    }\n    loadContent() {\n      if (this.data != null) {\n        this.handleData();\n        return;\n      }\n      if (this.src != null) {\n        this.handleSrc();\n        return;\n      }\n    }\n    ngAfterViewInit() {\n      if (!this.data && !this.src) {\n        this.handleTransclusion();\n      }\n      this.markdownService.reload$.pipe(takeUntil(this.destroyed$)).subscribe(() => this.loadContent());\n    }\n    ngOnDestroy() {\n      this.destroyed$.next();\n      this.destroyed$.complete();\n    }\n    render(markdown, decodeHtml = false) {\n      const parsedOptions = {\n        decodeHtml,\n        inline: this.inline,\n        emoji: this.emoji,\n        mermaid: this.mermaid\n      };\n      const renderOptions = {\n        clipboard: this.clipboard,\n        clipboardOptions: {\n          buttonComponent: this.clipboardButtonComponent,\n          buttonTemplate: this.clipboardButtonTemplate\n        },\n        katex: this.katex,\n        katexOptions: this.katexOptions,\n        mermaid: this.mermaid,\n        mermaidOptions: this.mermaidOptions\n      };\n      const parsed = this.markdownService.parse(markdown, parsedOptions);\n      this.element.nativeElement.innerHTML = parsed;\n      this.handlePlugins();\n      this.markdownService.render(this.element.nativeElement, renderOptions, this.viewContainerRef);\n      this.ready.emit();\n    }\n    coerceBooleanProperty(value) {\n      return value != null && `${String(value)}` !== 'false';\n    }\n    handleData() {\n      this.render(this.data);\n    }\n    handleSrc() {\n      this.markdownService.getSource(this.src).subscribe({\n        next: markdown => {\n          this.render(markdown);\n          this.load.emit(markdown);\n        },\n        error: error => this.error.emit(error)\n      });\n    }\n    handleTransclusion() {\n      this.render(this.element.nativeElement.innerHTML, true);\n    }\n    handlePlugins() {\n      if (this.commandLine) {\n        this.setPluginClass(this.element.nativeElement, PrismPlugin.CommandLine);\n        this.setPluginOptions(this.element.nativeElement, {\n          dataFilterOutput: this.filterOutput,\n          dataHost: this.host,\n          dataPrompt: this.prompt,\n          dataOutput: this.output,\n          dataUser: this.user\n        });\n      }\n      if (this.lineHighlight) {\n        this.setPluginOptions(this.element.nativeElement, {\n          dataLine: this.line,\n          dataLineOffset: this.lineOffset\n        });\n      }\n      if (this.lineNumbers) {\n        this.setPluginClass(this.element.nativeElement, PrismPlugin.LineNumbers);\n        this.setPluginOptions(this.element.nativeElement, {\n          dataStart: this.start\n        });\n      }\n    }\n    setPluginClass(element, plugin) {\n      const preElements = element.querySelectorAll('pre');\n      for (let i = 0; i < preElements.length; i++) {\n        const classes = plugin instanceof Array ? plugin : [plugin];\n        preElements.item(i).classList.add(...classes);\n      }\n    }\n    setPluginOptions(element, options) {\n      const preElements = element.querySelectorAll('pre');\n      for (let i = 0; i < preElements.length; i++) {\n        Object.keys(options).forEach(option => {\n          const attributeValue = options[option];\n          if (attributeValue) {\n            const attributeName = this.toLispCase(option);\n            preElements.item(i).setAttribute(attributeName, attributeValue.toString());\n          }\n        });\n      }\n    }\n    toLispCase(value) {\n      const upperChars = value.match(/([A-Z])/g);\n      if (!upperChars) {\n        return value;\n      }\n      let str = value.toString();\n      for (let i = 0, n = upperChars.length; i < n; i++) {\n        str = str.replace(new RegExp(upperChars[i]), '-' + upperChars[i].toLowerCase());\n      }\n      if (str.slice(0, 1) === '-') {\n        str = str.slice(1);\n      }\n      return str;\n    }\n  }\n  MarkdownComponent.ɵfac = function MarkdownComponent_Factory(t) {\n    return new (t || MarkdownComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(MarkdownService), i0.ɵɵdirectiveInject(i0.ViewContainerRef));\n  };\n  MarkdownComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n    type: MarkdownComponent,\n    selectors: [[\"markdown\"], [\"\", \"markdown\", \"\"]],\n    inputs: {\n      data: \"data\",\n      src: \"src\",\n      inline: \"inline\",\n      clipboard: \"clipboard\",\n      clipboardButtonComponent: \"clipboardButtonComponent\",\n      clipboardButtonTemplate: \"clipboardButtonTemplate\",\n      emoji: \"emoji\",\n      katex: \"katex\",\n      katexOptions: \"katexOptions\",\n      mermaid: \"mermaid\",\n      mermaidOptions: \"mermaidOptions\",\n      lineHighlight: \"lineHighlight\",\n      line: \"line\",\n      lineOffset: \"lineOffset\",\n      lineNumbers: \"lineNumbers\",\n      start: \"start\",\n      commandLine: \"commandLine\",\n      filterOutput: \"filterOutput\",\n      host: \"host\",\n      prompt: \"prompt\",\n      output: \"output\",\n      user: \"user\"\n    },\n    outputs: {\n      error: \"error\",\n      load: \"load\",\n      ready: \"ready\"\n    },\n    features: [i0.ɵɵNgOnChangesFeature],\n    ngContentSelectors: _c0,\n    decls: 1,\n    vars: 0,\n    template: function MarkdownComponent_Template(rf, ctx) {\n      if (rf & 1) {\n        i0.ɵɵprojectionDef();\n        i0.ɵɵprojection(0);\n      }\n    },\n    encapsulation: 2\n  });\n  return MarkdownComponent;\n})();\n(() => {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet MarkdownPipe = /*#__PURE__*/(() => {\n  class MarkdownPipe {\n    constructor(domSanitizer, elementRef, markdownService, viewContainerRef, zone) {\n      this.domSanitizer = domSanitizer;\n      this.elementRef = elementRef;\n      this.markdownService = markdownService;\n      this.viewContainerRef = viewContainerRef;\n      this.zone = zone;\n    }\n    transform(value, options) {\n      if (value == null) {\n        return '';\n      }\n      if (typeof value !== 'string') {\n        console.error(`MarkdownPipe has been invoked with an invalid value type [${typeof value}]`);\n        return value;\n      }\n      const markdown = this.markdownService.parse(value, options);\n      this.zone.onStable.pipe(first()).subscribe(() => this.markdownService.render(this.elementRef.nativeElement, options, this.viewContainerRef));\n      return this.domSanitizer.bypassSecurityTrustHtml(markdown);\n    }\n  }\n  MarkdownPipe.ɵfac = function MarkdownPipe_Factory(t) {\n    return new (t || MarkdownPipe)(i0.ɵɵdirectiveInject(i4.DomSanitizer, 16), i0.ɵɵdirectiveInject(i0.ElementRef, 16), i0.ɵɵdirectiveInject(MarkdownService, 16), i0.ɵɵdirectiveInject(i0.ViewContainerRef, 16), i0.ɵɵdirectiveInject(i0.NgZone, 16));\n  };\n  MarkdownPipe.ɵpipe = /* @__PURE__ */i0.ɵɵdefinePipe({\n    name: \"markdown\",\n    type: MarkdownPipe,\n    pure: true\n  });\n  return MarkdownPipe;\n})();\n(() => {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst sharedDeclarations = [ClipboardButtonComponent, LanguagePipe, MarkdownComponent, MarkdownPipe];\nconst sharedEntryComponents = [ClipboardButtonComponent];\nlet MarkdownModule = /*#__PURE__*/(() => {\n  class MarkdownModule {\n    static forRoot(markdownModuleConfig) {\n      return {\n        ngModule: MarkdownModule,\n        providers: [MarkdownService, markdownModuleConfig && markdownModuleConfig.loader || [], markdownModuleConfig && markdownModuleConfig.clipboardOptions || [], markdownModuleConfig && markdownModuleConfig.markedOptions || [], {\n          provide: SECURITY_CONTEXT,\n          useValue: markdownModuleConfig && markdownModuleConfig.sanitize != null ? markdownModuleConfig.sanitize : SecurityContext.HTML\n        }]\n      };\n    }\n    static forChild() {\n      return {\n        ngModule: MarkdownModule\n      };\n    }\n  }\n  MarkdownModule.ɵfac = function MarkdownModule_Factory(t) {\n    return new (t || MarkdownModule)();\n  };\n  MarkdownModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n    type: MarkdownModule\n  });\n  MarkdownModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n    imports: [CommonModule]\n  });\n  return MarkdownModule;\n})();\n(() => {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/* eslint-disable */\nvar MermaidAPI;\n(function (MermaidAPI) {\n  let SecurityLevel;\n  (function (SecurityLevel) {\n    /**\r\n     * (default) tags in text are encoded, click functionality is disabled\r\n     */\n    SecurityLevel[\"Strict\"] = \"strict\";\n    /**\r\n     * tags in text are allowed, click functionality is enabled\r\n     */\n    SecurityLevel[\"Loose\"] = \"loose\";\n    /**\r\n     * html tags in text are allowed, (only script element is removed), click functionality is enabled\r\n     */\n    SecurityLevel[\"Antiscript\"] = \"antiscript\";\n    /**\r\n     * with this security level all rendering takes place in a sandboxed iframe.\r\n     * This prevent any javascript running in the context.\r\n     * This may hinder interactive functionality of the diagram like scripts,\r\n     * popups in sequence diagram or links to other tabs/targets etc.\r\n     */\n    SecurityLevel[\"Sandbox\"] = \"sandbox\";\n  })(SecurityLevel = MermaidAPI.SecurityLevel || (MermaidAPI.SecurityLevel = {}));\n  let Theme;\n  (function (Theme) {\n    /**\r\n     * Designed to modified, as the name implies it is supposed to be used as the base for making custom themes.\r\n     */\n    Theme[\"Base\"] = \"base\";\n    /**\r\n     * A theme full of light greens that is easy on the eyes.\r\n     */\n    Theme[\"Forest\"] = \"forest\";\n    /**\r\n     * A theme that would go well with other dark colored elements.\r\n     */\n    Theme[\"Dark\"] = \"dark\";\n    /**\r\n     *  The default theme for all diagrams.\r\n     */\n    Theme[\"Default\"] = \"default\";\n    /**\r\n     * The theme to be used for black and white printing\r\n     */\n    Theme[\"Neutral\"] = \"neutral\";\n  })(Theme = MermaidAPI.Theme || (MermaidAPI.Theme = {}));\n  let LogLevel;\n  (function (LogLevel) {\n    LogLevel[LogLevel[\"Debug\"] = 1] = \"Debug\";\n    LogLevel[LogLevel[\"Info\"] = 2] = \"Info\";\n    LogLevel[LogLevel[\"Warn\"] = 3] = \"Warn\";\n    LogLevel[LogLevel[\"Error\"] = 4] = \"Error\";\n    LogLevel[LogLevel[\"Fatal\"] = 5] = \"Fatal\";\n  })(LogLevel = MermaidAPI.LogLevel || (MermaidAPI.LogLevel = {}));\n})(MermaidAPI || (MermaidAPI = {}));\n\n/**\r\n * Generated bundle index. Do not edit.\r\n */\n\nexport { ClipboardButtonComponent, ClipboardOptions, ClipboardRenderOptions, ExtendedRenderer, KatexSpecificOptions, LanguagePipe, MarkdownComponent, MarkdownModule, MarkdownPipe, MarkdownService, MarkedOptions, MermaidAPI, PrismPlugin, SECURITY_CONTEXT, errorClipboardNotLoaded, errorClipboardViewContainerRequired, errorJoyPixelsNotLoaded, errorKatexNotLoaded, errorMermaidNotLoaded, errorSrcWithoutHttpClient };\n","import { Component, Input } from '@angular/core';\nimport { NgIf, NgStyle } from '@angular/common';\n\nexport interface IconDescriptor {\n  iconUrl: string;\n  name: string;\n  diameter?: number;\n}\n\n@Component({\n  standalone: true,\n  imports: [NgStyle, NgIf],\n  selector: 'va-icon',\n  template: `\n    \n      \n      \n        {{ getAbbreviationForName() }}\n      \n      
    \n \n `,\n styleUrls: ['./icon.component.scss'],\n})\nexport class IconComponent {\n @Input() iconUrl: string;\n @Input() iconName: string; // it seems like the angular template is not recognizing the variable 'name'\n @Input() diameter = 60;\n @Input() backgroundColor = null;\n @Input() borderColor = null;\n @Input() fontColor = 'white';\n\n public getAbbreviationForName(): string {\n const defaultAbbreviation = 'U'; // untitled\n if (this.iconName) {\n // example input \"Partner Central\"\n // example output \"PC\"\n\n // example input \"Partner\"\n // example output \"P\"\n const names = this.iconName.trim().split(' ')?.filter(Boolean);\n return names.length > 1 ? names[0][0] + names[1][0] : names[0][0];\n }\n return defaultAbbreviation;\n }\n\n getIconColorForName(): string {\n // determine an icon color for a product with no icon by using the product name\n const COLOR_CODES = [\n '#EF5350',\n '#42A5F5',\n '#66BB6A',\n '#FFA726',\n '#AB47BC',\n '#FFCA28',\n '#EC407A',\n '#26C6DA',\n '#FF7B57',\n ];\n let nameSum = 0;\n const defaultColor = '#808080';\n if (this.backgroundColor) {\n return this.backgroundColor;\n }\n if (!this.iconName) {\n return defaultColor;\n }\n for (let i = 0; i < this.iconName.length; i++) {\n nameSum += this.iconName[i].charCodeAt(0);\n }\n const index = nameSum % COLOR_CODES.length;\n\n return COLOR_CODES[index];\n }\n\n getIconSize(): any {\n return { 'font-size': this.diameter + 'px' };\n }\n}\n","import { NgModule } from '@angular/core';\nimport { IconComponent } from './icon.component';\n\n@NgModule({\n imports: [IconComponent],\n declarations: [],\n exports: [IconComponent],\n})\nexport class VaIconModule {}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatCardModule } from '@angular/material/card';\nimport { MatExpansionModule } from '@angular/material/expansion';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\n\nimport { ProjectMilestonesComponent } from './project-milestones.component';\nimport { VaIconModule } from './../va-icon/icon.module';\nimport { MarkdownModule } from 'ngx-markdown';\n\n@NgModule({\n imports: [\n CommonModule,\n MatCardModule,\n MatExpansionModule,\n MatIconModule,\n MatProgressBarModule,\n VaIconModule,\n MarkdownModule,\n ],\n declarations: [ProjectMilestonesComponent],\n exports: [ProjectMilestonesComponent, MarkdownModule],\n})\nexport class ProjectMilestonesModule {}\n","import { ElementRef, Directive, Inject } from '@angular/core';\n\n@Directive({ standalone: true, selector: '[vaSearchInput]' })\nexport class VaSearchInputDirective {\n constructor(@Inject(ElementRef) private elementRef: ElementRef) {}\n\n focus(): void {\n this.elementRef.nativeElement.focus();\n }\n\n selector(): void {\n this.elementRef.nativeElement.select();\n }\n}\n","import { Injectable } from '@angular/core';\n\nexport interface Storage {\n get(name: string): string | null;\n\n set(name: string, value: string): void;\n\n remove(name: string): void;\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class LocalStorageService implements Storage {\n get(name: string): string | null {\n return this.browserSupport ? localStorage.getItem(name) : null;\n }\n\n set(name: string, value: string): string | null {\n if (this.browserSupport) {\n localStorage.setItem(name, value);\n return value;\n } else {\n return null;\n }\n }\n\n remove(name: string): void {\n if (this.browserSupport) {\n localStorage.removeItem(name);\n }\n }\n\n get browserSupport(): boolean {\n return !!typeof Storage;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { LocalStorageService } from '../local-storage.service';\n\nconst SEARCH_TERM_FILTER = 'search-term-filter';\n@Injectable({ providedIn: 'root' })\nexport class SearchBoxService {\n constructor(private localStorageService: LocalStorageService) {}\n\n saveSearchTerm(contextKey: string, input: string): void {\n this.localStorageService.set(contextKey || '' + SEARCH_TERM_FILTER, input);\n }\n\n getSearchTerm(contextKey: string): string | null {\n return this.localStorageService.get(contextKey || '' + SEARCH_TERM_FILTER);\n }\n}\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';\nimport { VaSearchInputDirective } from './search-box-input.directive';\nimport { SearchBoxService } from './search-box.service';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { MatIconModule } from '@angular/material/icon';\n\n@Component({\n standalone: true,\n imports: [CommonModule, FormsModule, MatIconModule, VaSearchInputDirective],\n selector: 'va-search-box',\n template: `\n \n \n search\n \n `,\n styleUrls: ['search-box.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SearchBoxComponent implements OnInit {\n @ViewChild(VaSearchInputDirective, { static: true }) inputArea: VaSearchInputDirective;\n @Output() update = new EventEmitter();\n // eslint-disable-next-line @angular-eslint/no-output-native\n @Output() submit = new EventEmitter();\n @Input() highlightWhenSelected = true;\n @Input() disabled = false;\n @Input() initial = '';\n @Input() enabledSaveSearchTerm = false;\n @Input() contextKey = '';\n @Input() placeholder = '';\n isSelected = false;\n constructor(private searchBoxService: SearchBoxService) {}\n\n ngOnInit(): void {\n if (!this.initial && this.enabledSaveSearchTerm) {\n this.initial = this.searchBoxService.getSearchTerm(this.contextKey);\n if (this.initial) {\n this.update.emit(this.initial);\n }\n }\n }\n\n submitSearch(term: string): void {\n this.submit.emit(term);\n if (this.enabledSaveSearchTerm) {\n this.searchBoxService.saveSearchTerm(this.contextKey, term);\n }\n this.inputArea.selector();\n }\n\n updateSearch(term: string): void {\n this.update.emit(term);\n if (this.enabledSaveSearchTerm) {\n this.searchBoxService.saveSearchTerm(this.contextKey, term);\n }\n }\n\n focusOnSearchBox(): void {\n window.setTimeout(() => this.inputArea.focus(), 0);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { SearchBoxComponent } from './search-box.component';\n\n@NgModule({\n imports: [SearchBoxComponent],\n exports: [SearchBoxComponent],\n})\nexport class VaSearchBoxModule {}\n","import { Component, Input } from '@angular/core';\n\n@Component({\n selector: 'va-badge',\n styleUrls: ['./va-badge.component.scss'],\n template: `\n \n `,\n})\nexport class VaBadgeComponent {\n @Input() color: string;\n}\n","import { NgModule } from '@angular/core';\nimport { VaBadgeComponent } from './va-badge.component';\n\n@NgModule({\n declarations: [VaBadgeComponent],\n exports: [VaBadgeComponent],\n})\nexport class VaBadgeModule {}\n","export enum NavigationOption {\n ROUTERLINK = 'routerLink',\n HREF = 'href',\n}\n\nexport interface Breadcrumbs {\n url?: string;\n text: string;\n navigationOption?: NavigationOption;\n}\n","import { Component, Input } from '@angular/core';\nimport { Breadcrumbs, NavigationOption } from './va-breadcrumbs';\n\n@Component({\n selector: 'va-breadcrumbs',\n styleUrls: ['./va-breadcrumbs.component.scss'],\n templateUrl: './va-breadcrumbs.component.html',\n})\nexport class VaBreadcrumbsComponent {\n @Input() breadcrumbs: Breadcrumbs[];\n NavigationOption_ROUTERLINK = NavigationOption.ROUTERLINK;\n NavigationOption_HREF = NavigationOption.HREF;\n}\n","
    \n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { RouterModule } from '@angular/router';\nimport { TranslateModule } from '@ngx-translate/core';\n\nimport { VaBreadcrumbsComponent } from './va-breadcrumbs.component';\nimport { LexiconModule } from '@galaxy/lexicon';\nimport baseTranslation from '../assets/i18n/en_devel.json';\nimport { WEBLATE_COMPONENT_NAME } from '../constants';\n\n@NgModule({\n declarations: [VaBreadcrumbsComponent],\n imports: [\n CommonModule,\n RouterModule,\n TranslateModule,\n LexiconModule.forChild({\n componentName: WEBLATE_COMPONENT_NAME,\n baseTranslation: baseTranslation,\n }),\n ],\n exports: [VaBreadcrumbsComponent],\n})\nexport class VaBreadcrumbsModule {}\n","import { Component, Input, Output, EventEmitter } from '@angular/core';\nimport { I18NDescriptor } from '../../uikit.interface';\n\n@Component({\n selector: 'va-filter-chip',\n templateUrl: './va-filter-chip.component.html',\n styleUrls: ['./va-filter-chip.component.scss'],\n})\nexport class VaFilterChipComponent {\n @Input() title: I18NDescriptor;\n @Input() canDisable?: boolean;\n @Input() icon?: string;\n @Input() text?: I18NDescriptor;\n @Input() id?: string;\n\n // eslint-disable-next-line @angular-eslint/no-output-on-prefix\n @Output() onClick = new EventEmitter();\n // eslint-disable-next-line @angular-eslint/no-output-on-prefix\n @Output() onDelete = new EventEmitter();\n\n emitClickEvent(event: MouseEvent): void {\n event.stopPropagation();\n this.onClick.emit(event);\n }\n\n emitDeleteEvent(event: MouseEvent): void {\n event.stopPropagation();\n this.onDelete.emit(event);\n }\n}\n","
    \n {{ icon }}\n {{ title.key | translate }}{{ text ? ':' : '' }}\n {{ text.key | translate }}\n \n cancel\n \n \n
    \n","import { Component, Input, Output, EventEmitter } from '@angular/core';\nimport { ComponentType } from '@angular/cdk/portal';\nimport { I18NDescriptor } from '../../uikit.interface';\nimport { MatDialog } from '@angular/material/dialog';\n\nexport interface VaFilterChipDialogConfig {\n component: ComponentType;\n width?: string;\n height?: string;\n}\n\nexport interface VaFilterChipConfig {\n id: string; // Used to differentiate filters and chips.\n title: I18NDescriptor; // Title for the chip text.\n data: object; // Initial data to send to the dialog\n canDisable?: boolean; // Whether or not to allow removal of this filter. Shows delete button.\n enabled?: boolean; // If true, the component will be turned on. Good for initial setup.\n icon?: string; // Icon to show on the leftside of the chip.\n text?: I18NDescriptor; // Value text to show for the chip.\n dialog?: VaFilterChipDialogConfig;\n}\n\nexport interface VaFilterChipContainerConfig {\n canAddAndRemove?: boolean; // Used to turn off and on UI for adding and removing filter chips.\n}\n\n@Component({\n selector: 'va-filter-chip-container',\n templateUrl: './va-filter-chip-container.component.html',\n styleUrls: ['./va-filter-chip-container.component.scss'],\n})\nexport class VaFilterChipContainerComponent {\n @Input() filters: VaFilterChipConfig[];\n @Input() config?: VaFilterChipContainerConfig;\n // eslint-disable-next-line @angular-eslint/no-output-on-prefix\n @Output() onFilterClick = new EventEmitter();\n // eslint-disable-next-line @angular-eslint/no-output-on-prefix\n @Output() onFilterDisable = new EventEmitter();\n // eslint-disable-next-line @angular-eslint/no-output-on-prefix\n @Output() onFilterDataChange = new EventEmitter();\n\n constructor(private dialog: MatDialog) {}\n\n /**\n * Disable all filters that can be disabled.\n */\n clearAll(): void {\n this.filters.filter((filter) => filter.enabled).forEach((filter) => this.onDisableFilter(filter.id));\n }\n\n /**\n * Disable a filter from the filters list.\n *\n * @param filterId - ID of the filter to disable\n */\n onDisableFilter(filterId: string): void {\n const filterToDisable = this.filters.find((filter) => filter.id === filterId);\n if (!filterToDisable) {\n return;\n }\n\n if (filterToDisable.canDisable) {\n filterToDisable.enabled = false;\n }\n\n this.onFilterDisable.emit({\n id: filterToDisable.id,\n });\n }\n\n /**\n * When a filter item is picked from the dropdown, enable it.\n *\n * @param filterId - Id of the filter that was selecetd from the list.\n */\n onFilterMenuItemClick(filterId: string): void {\n const filterItem = this.filters.find((filter) => filter.id === filterId);\n if (!filterItem) {\n return;\n }\n\n filterItem.enabled = true;\n\n // Defer opening of the filter dropdown to ensure that filter chip is present in the DOM\n requestAnimationFrame(() => {\n this.onClickFilter(filterId);\n });\n }\n\n /**\n * Emits and event when a chip is clicked.\n *\n * @param filterId - ID of the filter that was clicked\n */\n onClickFilter(filterId: string): void {\n const filterItem = this.filters.find((filter) => filter.id === filterId);\n if (!filterItem) {\n return;\n }\n\n this.onFilterClick.emit({\n id: filterId,\n });\n\n if (filterItem.dialog) {\n this.openFilterDialog(filterItem);\n }\n }\n\n openFilterDialog(filterItem: VaFilterChipConfig): void {\n const { dialog, data, id } = filterItem;\n const { component, width, height } = dialog!;\n\n const dialogRef = this.dialog.open(component, { data: { ...data }, id, width, height });\n\n const closeSub = dialogRef.afterClosed().subscribe((res) => {\n closeSub.unsubscribe();\n\n if (typeof res !== 'undefined') {\n this.onFilterDataChange.emit({\n id,\n data: res.data,\n });\n }\n });\n }\n}\n","\n \n \n {{ filter.title.key | translate }}...\n \n \n\n\n
    \n filter_list\n \n \n \n \n \n |\n \n \n
    \n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatRippleModule } from '@angular/material/core';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatDividerModule } from '@angular/material/divider';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { CommonPipesModule } from '../common-pipes/common-pipes.module';\nimport { VaFilterChipContainerComponent } from './va-filter-chip-container/va-filter-chip-container.component';\nimport { VaFilterChipComponent } from './va-filter-chip/va-filter-chip.component';\nimport { LexiconModule } from '@galaxy/lexicon';\nimport baseTranslation from '../assets/i18n/en_devel.json';\nimport { WEBLATE_COMPONENT_NAME } from '../constants';\n\n@NgModule({\n declarations: [VaFilterChipContainerComponent, VaFilterChipComponent],\n exports: [VaFilterChipContainerComponent, VaFilterChipComponent],\n imports: [\n CommonModule,\n MatIconModule,\n TranslateModule,\n LexiconModule.forChild({\n componentName: WEBLATE_COMPONENT_NAME,\n baseTranslation: baseTranslation,\n }),\n CommonPipesModule,\n MatDialogModule,\n MatDividerModule,\n MatButtonModule,\n MatRippleModule,\n MatMenuModule,\n ],\n})\nexport class VaFilterChipsModule {}\n","import {\n Component,\n forwardRef,\n EventEmitter,\n Input,\n Output,\n ViewChild,\n ElementRef,\n HostListener,\n OnInit,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';\nimport { SearchBoxComponent } from '../search-box/search-box.component';\n\nconst STRING_CONTROL_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SearchSelectComponent),\n multi: true,\n};\n\n@Component({\n selector: 'uikit-search-select',\n templateUrl: 'search-select.component.html',\n styleUrls: ['search-select.component.scss'],\n providers: [STRING_CONTROL_ACCESSOR],\n})\nexport class SearchSelectComponent implements ControlValueAccessor, OnInit {\n @ViewChild('selectSearch', { static: true }) selectSearch: ElementRef;\n @ViewChild(SearchBoxComponent) SearchBox: SearchBoxComponent;\n @Output() selection = new EventEmitter();\n @Input() options: any[];\n @Input() alwaysFirstValue: string; // if this value in options, it will remain at the top (not considered in sorting)\n @Input() selected: any;\n @Input() showSearch = false;\n @Input() displayProperty: string;\n @Input() formControlProperty: string;\n @Input() sorted = false;\n @Input() placeholderText: string;\n @Input() width = 200;\n @Input() dropdownWidth: string;\n // Hack to handle reactive forms.\n @Input() setValues: boolean;\n @Input() closeOnClick: boolean;\n searchTerm: string;\n isSelecting: boolean;\n\n protected innerValue: string;\n private onTouch: any;\n private onModelChange: any;\n\n ngOnInit(): void {\n if (!this.dropdownWidth) {\n this.dropdownWidth = String(this.computedWidth) + 'px';\n }\n }\n\n optionClicked(option: any, event: any): void {\n if (this.setValues) {\n this.value = this.formControlProperty ? option[this.formControlProperty] : option;\n this.selected = option;\n }\n if (this.closeOnClick) {\n this.isSelecting = false;\n }\n this.selection.emit(option);\n event.stopPropagation();\n }\n\n optionText(option: any): string {\n if (!option) {\n return this.placeholderText;\n }\n\n if (this.displayProperty && option) {\n return option[this.displayProperty];\n }\n return option;\n }\n\n selectedText(selected: any): string {\n if (this.value) {\n if (this.displayProperty) {\n if (selected) {\n return selected[this.displayProperty];\n }\n }\n return this.value;\n }\n\n return this.optionText(selected);\n }\n\n @HostListener('document: click', ['$event'])\n toggleActionItems(event: any): void {\n const selectSearchClicked = this.selectSearch.nativeElement.contains(event.target);\n if (this.isSelecting && selectSearchClicked) {\n this.isSelecting = false;\n } else {\n this.isSelecting = selectSearchClicked;\n if (this.showSearch) {\n this.SearchBox.focusOnSearchBox();\n }\n }\n }\n\n filteredOptions(term: string): any[] {\n if (this.sorted) {\n this.options.sort((a, b) => {\n const val1 = a[this.displayProperty];\n const val2 = b[this.displayProperty];\n\n if (this.alwaysFirstValue && val1.toLowerCase() === this.alwaysFirstValue.toLowerCase()) {\n return -1;\n }\n\n return val1.localeCompare(val2);\n });\n }\n return term\n ? this.options.filter((option) => this.optionText(option).toLowerCase().indexOf(term.toLowerCase()) !== -1)\n : this.options;\n }\n\n dropdownIcon(): string {\n if (!this.isSelecting) {\n return 'arrow_drop_down';\n } else {\n return 'arrow_drop_up';\n }\n }\n\n get selectClass(): string {\n return this.isSelecting ? 'selected' : 'unselected';\n }\n\n get computedWidth(): number {\n return this.width - 10;\n }\n\n get value(): string {\n return this.innerValue;\n }\n\n set value(v: string) {\n if (this.innerValue !== v) {\n this.innerValue = v;\n if (this.onModelChange) {\n this.onModelChange(v);\n }\n }\n }\n\n writeValue(v: string): void {\n if (this.innerValue !== v) {\n this.innerValue = v;\n }\n }\n\n registerOnChange(fn: any): void {\n this.onModelChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouch = fn;\n }\n}\n","\n {{ '' + selectedText(selected) | translate }}\n {{ dropdownIcon() }}\n\n\n \n
      \n \n {{ '' + optionText(option) | translate }}\n \n
    \n\n","import { SearchSelectComponent } from './search-select.component';\nimport { NgModule } from '@angular/core';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { MatIconModule } from '@angular/material/icon';\nimport { CommonModule } from '@angular/common';\nimport { VaSearchBoxModule } from '../search-box/va-search-box.module';\nimport { LexiconModule } from '@galaxy/lexicon';\nimport baseTranslation from '../assets/i18n/en_devel.json';\nimport { WEBLATE_COMPONENT_NAME } from '../constants';\n\n@NgModule({\n imports: [\n CommonModule,\n VaSearchBoxModule,\n MatIconModule,\n TranslateModule,\n LexiconModule.forChild({\n componentName: WEBLATE_COMPONENT_NAME,\n baseTranslation: baseTranslation,\n }),\n ],\n declarations: [SearchSelectComponent],\n exports: [SearchSelectComponent],\n})\nexport class VaSearchSelectModule {}\n","import { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { ItemAndStatus, SelectorConfig, ItemAndStatusOptions } from './va-items-and-status';\n\nconst defaultConfig: SelectorConfig = {\n alwaysFirstValue: null,\n displayProperty: null,\n sorted: true,\n placeholderText: null,\n dropdownWidth: null,\n};\n\n@Component({\n selector: 'va-items-and-status',\n templateUrl: './va-items-and-status.component.html',\n styles: [\n `\n .item-and-status-separator {\n margin-top: 5px;\n }\n `,\n ],\n})\nexport class ItemsAndStatusComponent {\n @Output() selection = new EventEmitter();\n @Input() options: ItemAndStatusOptions[];\n @Input() itemConfig: SelectorConfig = defaultConfig;\n @Input() statusConfig: SelectorConfig = defaultConfig;\n @Input() editionConfig: SelectorConfig = defaultConfig;\n @Input() appliedSelection: ItemAndStatus = { item: null, status: null, edition: null };\n @Input() closeSelectOnClick = true;\n\n addItemListItem(item: any): void {\n this.appliedSelection = { item: item, status: null, edition: null };\n this.appliedSelection.status = this.statusMenuOptions()[0];\n this.selection.emit(this.appliedSelection);\n }\n\n changeItemStatus(status: any): void {\n this.appliedSelection.status = status;\n this.selection.emit(this.appliedSelection);\n }\n\n changeItemEdition(edition: any): void {\n this.appliedSelection.edition = edition;\n this.selection.emit(this.appliedSelection);\n }\n\n itemMenuOptions(): any[] {\n return this.options.map((option) => option.item) || [];\n }\n\n statusMenuOptions(): any[] {\n return this.options.find((option) => option.item === this.appliedSelection.item)!.statuses;\n }\n\n editionMenuOptions(): any[] {\n return this.options.find((option) => option.item === this.appliedSelection.item)!.editions;\n }\n}\n","\n
    \n\n 0\"\n class=\"item-and-status-separator\"\n>\n 0\"\n (selection)=\"changeItemEdition($event)\"\n [options]=\"editionMenuOptions()\"\n [alwaysFirstValue]=\"editionConfig.alwaysFirstValue\"\n [displayProperty]=\"editionConfig.displayProperty\"\n [sorted]=\"editionConfig.sorted\"\n [selected]=\"appliedSelection?.edition\"\n [placeholderText]=\"editionConfig.placeholderText\"\n [showSearch]=\"false\"\n [closeOnClick]=\"closeSelectOnClick\"\n>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { VaSearchSelectModule } from '../va-search-select/va-search-select.module';\nimport { ItemsAndStatusComponent } from './va-items-and-status.component';\n\n@NgModule({\n imports: [CommonModule, VaSearchSelectModule],\n declarations: [ItemsAndStatusComponent],\n exports: [ItemsAndStatusComponent],\n})\nexport class VaItemsAndStatusModule {}\n","import { ChangeDetectorRef, Component, EventEmitter, Input, Output } from '@angular/core';\nimport { FormControl } from '@angular/forms';\n\nexport interface MultiSelectOption {\n id: string;\n text: string;\n}\n\n// SearchFunc can be used to filter options on fields other than optionText\nexport type SearchFunc = (searchTerm: string, option: any) => boolean;\n\n@Component({\n selector: 'va-multi-select',\n templateUrl: './va-multi-select.component.html',\n styleUrls: ['va-multi-select.component.scss'],\n})\nexport class VaMultiSelectComponent {\n @Output() selection = new EventEmitter();\n\n @Input() options: MultiSelectOption[];\n @Input() selected: MultiSelectOption[] = [];\n @Input() displayProperty: string;\n @Input() placeholderText: string;\n @Input() allowNew = false; // if true, will allow new values (not in options) to be selected\n @Input() limitResults = false; // constrain the number of results that are rendered into the option box\n @Input() searchFunc: SearchFunc; // if set this function will be used to search options instead of matching optionText\n\n inputControl = new FormControl('');\n\n constructor(private cdr: ChangeDetectorRef) {}\n\n deselectOption(option: any): void {\n const index = this.selected.indexOf(option);\n if (index > -1) {\n this.selected.splice(index, 1);\n this.selection.emit(this.selected);\n }\n\n this.cdr.detectChanges();\n }\n\n optionSelected(event: any): void {\n // don't allow selection of duplicate items (we can potentially make this an option later)\n if (this.selected.indexOf(event.option.value) === -1) {\n this.selected.push(event.option.value);\n this.selection.emit(this.selected);\n }\n this.inputControl.setValue('');\n }\n\n optionText(option: any): string {\n return this.displayProperty ? option[this.displayProperty] : option;\n }\n\n optionTextPostMatch(option: any): string {\n // returns the portion of the optionText after a matching search term\n if (!this.inputControl.value) {\n return '';\n }\n const optionText = this.optionText(option);\n const index = optionText.toLowerCase().indexOf(this.inputControl.value.toLowerCase());\n return optionText.slice(index + this.inputControl.value.length);\n }\n\n optionTextMatch(option: any): string {\n // returns the portion of the optionText matching the search term\n if (!this.inputControl.value) {\n return '';\n }\n const optionText = this.optionText(option);\n const index = optionText.toLowerCase().indexOf(this.inputControl.value.toLowerCase());\n return optionText.slice(index, index + this.inputControl.value.length);\n }\n\n optionTextPreMatch(option: any): string {\n // returns the portion of the optionText before a matching search term\n const optionText = this.optionText(option);\n if (!this.inputControl.value) {\n return optionText;\n }\n const index = optionText.toLowerCase().indexOf(this.inputControl.value.toLowerCase());\n return optionText.slice(0, index);\n }\n\n get filteredOptions(): any[] {\n let displayedOptions: MultiSelectOption[];\n const options = this.options.filter((option) => !this.selected.find((selected) => selected === option));\n\n if (this.inputControl.value) {\n let filteredOptions: MultiSelectOption[];\n if (this.searchFunc) {\n filteredOptions = this.options.filter((option) => this.searchFunc(this.inputControl.value || '', option));\n } else {\n filteredOptions = this.options.filter(\n (option) =>\n this.optionText(option)\n .toLowerCase()\n .indexOf((this.inputControl.value || '').toLowerCase()) !== -1,\n );\n }\n if (this.allowNew) {\n if (\n filteredOptions\n .map((option) => this.optionText(option).toLowerCase())\n .indexOf(this.inputControl.value.toLowerCase()) === -1\n ) {\n // no exact match term found, so add a new one to the options\n filteredOptions.unshift(this.buildOption(this.inputControl.value));\n }\n }\n displayedOptions = filteredOptions;\n } else {\n displayedOptions = options;\n }\n\n if (this.limitResults) {\n displayedOptions = displayedOptions.slice(0, 50);\n }\n\n return displayedOptions;\n }\n\n private buildOption(name: string): any {\n // if using displayProperty, return an object containing just that, otherwise just the string itself\n if (this.displayProperty) {\n const option = {};\n option[this.displayProperty] = name;\n return option;\n }\n return name;\n }\n}\n","\n {{ placeholderText }}\n \n \n {{ optionText(option) }}\n cancel\n \n \n \n \n \n \n \n \n\n\n\n {{ optionText(option) }}\n\n\n\n {{ optionTextPreMatch(option) }}\n {{ optionTextMatch(option) }}\n {{ optionTextPostMatch(option) }}\n\n","import { NgModule } from '@angular/core';\nimport { MatIconModule } from '@angular/material/icon';\nimport { CommonModule } from '@angular/common';\nimport { VaMultiSelectComponent } from './va-multi-select.component';\nimport { GalaxyWrapModule } from '@vendasta/galaxy/galaxy-wrap';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatInputModule } from '@angular/material/input';\nimport { GalaxyFormFieldModule } from '@vendasta/galaxy/form-field';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { MatAutocompleteModule } from '@angular/material/autocomplete';\nimport { MatChipsModule } from '@angular/material/chips';\n\n@NgModule({\n imports: [\n CommonModule,\n MatIconModule,\n GalaxyWrapModule,\n MatSelectModule,\n MatInputModule,\n GalaxyFormFieldModule,\n FormsModule,\n MatAutocompleteModule,\n ReactiveFormsModule,\n MatChipsModule,\n ],\n declarations: [VaMultiSelectComponent],\n exports: [VaMultiSelectComponent],\n})\nexport class VaMultiSelectModule {}\n","import { ChangeDetectorRef } from '@angular/core';\nimport { Observable, Subscription } from 'rxjs';\nimport { FilterField, FilterSection } from './filter';\n\n/**\n * This cannot safely be called before the AfterViewInit angular lifecycle hook.\n *\n * When attaching a translator, it will assume that the values given for\n * things like filter name are actually translation keys, and will use them as\n * inputs during translation.\n *\n * Provide ChangeDetectorRef to inform the app when new values are set by the\n * translator during the change detection round.\n *\n * IMPORTANT: Calling this function will create observable subscriptions. You\n * will need to clean them up during the OnDestroy lifecycle hook of your\n * filter component. The subscriptions are provided on the return value of\n * this function.\n */\nexport function subscribeFilterFieldToTranslator(\n field: FilterField,\n translateService: {\n instant: (key: string | Array) => string | any;\n stream: (key: string | Array) => Observable;\n },\n changeDetector: ChangeDetectorRef,\n): Subscription[] {\n const nameKey = field.name;\n field.name = translateService.instant(nameKey);\n const sub = translateService.stream(nameKey).subscribe((translatedName) => {\n field.name = translatedName;\n changeDetector.detectChanges();\n });\n return [sub];\n}\n\n/**\n * This cannot safely be called before the AfterViewInit angular lifecycle hook.\n *\n * @see subscribeFilterFieldToTranslator as this behaves similarly\n *\n * The `subscribeChildFields` parameter can be set to `true` to hook up all of\n * the children of this section to receive translation updates.\n */\nexport function subscribeFilterSectionToTranslator(\n section: FilterSection,\n translator: {\n stream: (key: string | Array) => Observable;\n instant: (key: string | Array) => string | any;\n },\n cd: ChangeDetectorRef,\n subscribeChildFields: boolean,\n): Subscription[] {\n const nameKey = section.title;\n section.title = translator.instant(nameKey!);\n const sub = translator.stream(nameKey!).subscribe((translatedName) => {\n section.title = translatedName;\n cd.detectChanges();\n });\n\n const subs = [sub];\n if (subscribeChildFields) {\n section.fields.forEach((field) => {\n subs.push(...field.subscribeToTranslator(translator, cd));\n });\n }\n return subs;\n}\n","import { ChangeDetectorRef } from '@angular/core';\nimport { merge as observableMerge, Observable, Observer, Subscription } from 'rxjs';\nimport { share } from 'rxjs/operators';\nimport { subscribeFilterFieldToTranslator, subscribeFilterSectionToTranslator } from './filter.translation';\n\nexport type FilterFieldType =\n | 'checkbox'\n | 'search-select'\n | 'date-picker'\n | 'items-and-status'\n | 'multi-items-and-status'\n | 'multi-select'\n | 'tabbed'\n | 'range'\n | 'radio'\n | 'text';\n\nexport type FilterSectionType = 'or' | 'and';\n\nexport class FilterSection {\n title?: string | null;\n type: FilterSectionType;\n fields: FilterField[];\n collapsed: boolean;\n hideSection?: boolean;\n hideSelectors?: boolean;\n fieldValuesObservable: Observable>;\n fieldOptionsObservable: Observable>;\n\n constructor(options: { title?: string; type: FilterSectionType; fields: FilterField[]; collapsed?: boolean }) {\n this.title = options.title || null;\n this.type = options.type;\n this.fields = options.fields || [];\n this.collapsed = options.collapsed || false;\n this.fieldValuesObservable = this.fields\n .map((field) => field.valueObservable)\n .reduce((previous, next) => observableMerge(previous, next));\n this.fieldOptionsObservable = this.fields\n .map((field) => field.optionsObservable)\n .reduce((previous, next) => observableMerge(previous, next));\n }\n\n toggleCollapsed(): void {\n this.collapsed = !this.collapsed;\n }\n\n subscribeToTranslator(\n translator: {\n stream: (key: string | Array) => Observable;\n instant: (key: string | Array) => string | any;\n },\n cd: ChangeDetectorRef,\n attachToFields: boolean,\n ): Subscription[] {\n return subscribeFilterSectionToTranslator(this, translator, cd, attachToFields);\n }\n}\n\n// An icon associated with a filter field\nexport interface FilterFieldIcon {\n url: string;\n width?: number;\n height?: number;\n}\n\nexport interface FilterFieldConfig {\n name: string;\n value: any;\n options?: any[];\n condition?: (item: any, value: any) => boolean;\n id?: string;\n appliedTextPrefix?: string;\n suffix?: string;\n icon?: FilterFieldIcon; // Currently only supported by checkbox fields\n disableTranslations?: boolean;\n}\n\nexport abstract class FilterField {\n name: string;\n type: FilterFieldType;\n condition?: (item: any, value: T) => boolean;\n id: string;\n appliedTextPrefix?: string | null;\n suffix: string;\n value: T | null;\n valueObservable: Observable>;\n valueChanged: (value: FilterField) => void;\n options: any[];\n optionsObservable: Observable>;\n optionsChanged: (value: FilterField) => void;\n icon?: FilterFieldIcon; // Currently only supported by checkbox fields\n disableTranslation?: boolean;\n\n constructor(config: FilterFieldConfig) {\n this.name = config.name;\n this.value = config.value;\n this.options = config.options || [];\n this.condition = config.condition;\n this.id = config.id || config.name.toLowerCase().split(' ').join('_');\n this.appliedTextPrefix = config.appliedTextPrefix || null;\n this.valueObservable = Observable.create((observer: Observer>) => {\n this.valueChanged = (value: FilterField) => {\n observer.next(value);\n };\n }).pipe(share());\n this.optionsObservable = Observable.create((observer: Observer>) => {\n this.optionsChanged = (value: FilterField) => {\n observer.next(value);\n };\n }).pipe(share());\n this.suffix = config.suffix || '';\n this.icon = config.icon;\n this.disableTranslation = config.disableTranslations || false;\n }\n\n public changeValue(value?: any): void {\n this.value = value;\n if (this.valueChanged) {\n this.valueChanged(this);\n }\n }\n\n public clearValue(): void {\n this.value = null;\n if (this.valueChanged) {\n this.valueChanged(this);\n }\n }\n\n public setOptions(options: any[]): void {\n this.options = options;\n if (this.optionsChanged) {\n this.optionsChanged(this);\n }\n }\n\n // This function is used to specify how to stringify the field value\n serializeValue(): string {\n return JSON.stringify(this.value);\n }\n\n /*\n Note: If overriding on a child class, special checking might need to be done to ensure the value from the url is valid.\n If not, this function should return null */\n deserializeValue(urlParam: string): T | null {\n return JSON.parse(urlParam);\n }\n\n appliedFieldDisplayText(value?: any): string {\n if (this.appliedTextPrefix) {\n return `${this.appliedTextPrefix}: ${this.appliedFieldText(value)}`;\n } else {\n return this.appliedFieldText(value);\n }\n }\n\n protected abstract appliedFieldText(value?: any): string;\n\n /**\n * @see subscribeFilterFieldToTranslator\n */\n subscribeToTranslator(\n translator: {\n stream: (key: string | Array) => Observable;\n instant: (key: string | Array) => string | any;\n },\n cd: ChangeDetectorRef,\n ): Subscription[] {\n return subscribeFilterFieldToTranslator(this, translator, cd);\n }\n}\n\nexport class Filters {\n id: string;\n fieldValuesObservable: Observable>;\n fieldOptionsObservable: Observable>;\n\n constructor(public title: string, public innerSections: FilterSection[]) {\n this.id = title.toLowerCase().replace(' ', '_');\n this.fieldValuesObservable = this.innerSections\n .map((section) => section.fieldValuesObservable)\n .reduce((previous, next) => observableMerge(previous, next));\n this.fieldOptionsObservable = this.innerSections\n .map((section) => section.fieldOptionsObservable)\n .reduce((previous, next) => observableMerge(previous, next));\n }\n\n public applyFilters(items: any[]): any[] {\n return items.filter((item) => this.applyFiltersToItem(item));\n }\n\n get sections(): FilterSection[] {\n return this.innerSections.filter((section) => !section.hideSection);\n }\n\n get fields(): FilterField[] {\n return this.sections.map((section) => section.fields).reduce((allFields, fields) => allFields.concat(fields));\n }\n\n get activeFields(): FilterField[] {\n return this.fields.filter((field) => {\n // If its a list make sure its empty\n if (Array.isArray(field.value) && field.value.length === 0) {\n return false;\n }\n // If its an object check that it's not just an empty object ({})\n if (!!field.value && typeof field.value === 'object' && Object.getOwnPropertyNames(field.value).length === 0) {\n // A Date object is also considered 'Empty', check to make sure its not just a date object\n return field.value instanceof Date;\n }\n // Otherwise truthyness should suffice\n return !!field.value;\n });\n }\n\n public clearAll(): void {\n this.fields.forEach((field) => field.clearValue());\n }\n\n public setValueForField(value: any, field: FilterField): void {\n this.fields.find((f) => f === field)!.changeValue(value);\n }\n\n public setValueForFieldname(value: any, fieldname: string): void {\n this.fields.find((field) => field.name === fieldname)!.value = value;\n }\n\n private applyFiltersToItem(item: any): boolean {\n for (let i = 0; i < this.sections.length; i++) {\n const section = this.sections[i];\n if (!this.filterBySection(item, section)) {\n return false;\n }\n }\n return true;\n }\n\n private filterBySection(item: any, section: FilterSection): boolean {\n let doesPass = true;\n for (let i = 0; i < section.fields.length; i++) {\n const field = section.fields[i];\n if (!!field.value && !!field.condition) {\n doesPass = field.condition(item, field.value);\n if (!doesPass && section.type === 'and') {\n break;\n } else if (doesPass && section.type === 'or') {\n break;\n }\n }\n }\n return doesPass;\n }\n}\n","import { FilterField, FilterFieldType, FilterFieldConfig } from '../filter';\nimport { SelectorConfig, ItemAndStatus, ItemAndStatusOptions } from '../../../va-items-and-status/va-items-and-status';\n\nexport interface ItemsAndStatusFilterFieldConfig extends FilterFieldConfig {\n options?: ItemAndStatusOptions[];\n itemSelectorConfig?: SelectorConfig;\n statusSelectorConfig?: SelectorConfig;\n editionSelectorConfig?: SelectorConfig;\n}\n\nexport class MultiItemsAndStatusFilterField extends FilterField {\n readonly type: FilterFieldType = 'multi-items-and-status';\n options: ItemAndStatusOptions[];\n itemSelectorConfig: SelectorConfig | null;\n statusSelectorConfig: SelectorConfig | null;\n editionSelectorConfig: SelectorConfig | null;\n\n constructor(config: ItemsAndStatusFilterFieldConfig) {\n super(config);\n this.options = config.options || [];\n this.itemSelectorConfig = config.itemSelectorConfig || null;\n this.statusSelectorConfig = config.statusSelectorConfig || null;\n this.editionSelectorConfig = config.editionSelectorConfig || null;\n this.value = config.value || null;\n }\n\n updateValue(oldValue: ItemAndStatus, newValue: ItemAndStatus): void {\n const indexOfExisting = this.value!.findIndex((existing) => existing.item === oldValue.item);\n if (indexOfExisting >= 0) {\n this.value![indexOfExisting] = newValue;\n }\n if (this.valueChanged) {\n this.valueChanged(this);\n }\n }\n\n removeValue(value: ItemAndStatus): void {\n if (Array.isArray(this.value)) {\n const index = this.value.indexOf(value);\n this.value.splice(index, 1);\n }\n if (this.valueChanged) {\n this.valueChanged(this);\n }\n }\n\n public clearValue(): void {\n this.value = [];\n if (this.valueChanged) {\n this.valueChanged(this);\n }\n }\n\n appliedFieldText(value: ItemAndStatus): string {\n // Destructure display properties for cleaner access\n const itemDisplayProperty = this.itemSelectorConfig!.displayProperty!;\n const statusDisplayProperty = this.statusSelectorConfig!.displayProperty!;\n const editionDisplayProperty = this.editionSelectorConfig!.displayProperty!;\n\n // Construct the base string with item\n let resultString = `${this.name}: ${value.item[itemDisplayProperty]}`;\n\n // Conditionally append edition if it's not null\n if (value.edition && editionDisplayProperty) {\n resultString += ` ${value.edition[editionDisplayProperty]}`;\n }\n\n resultString += `: ${value.status[statusDisplayProperty]}`;\n\n return resultString;\n }\n\n serializeValue(): string {\n if (!Array.isArray(this.value) || this.value.length === 0) {\n return '';\n }\n\n const itemDisplayProperty = this.itemSelectorConfig!.displayProperty!;\n const statusDisplayProperty = this.statusSelectorConfig!.displayProperty!;\n const editionDisplayProperty = this.editionSelectorConfig!.displayProperty!;\n\n // Use map to transform each value to a string and join with commas\n const queryParts = this.value.map((value) => {\n // Base string with item and status\n let part = `${value.item[itemDisplayProperty]}:${value.status[statusDisplayProperty]}`;\n\n // Conditionally append edition if it's not null\n if (value.edition && editionDisplayProperty) {\n part += `:${value.edition[editionDisplayProperty]}`;\n }\n\n return part;\n });\n\n // Join all parts with a comma and return\n return queryParts.join(',');\n }\n\n deserializeValue(urlParam: string): ItemAndStatus[] | null {\n const valueList = urlParam.split(',');\n const matches: ItemAndStatus[] = [];\n valueList.forEach((value) => {\n const paramItem = value.split(':')[0];\n const paramStatus = value.split(':')[1];\n const paramEdition = value.split(':')[2];\n // find the matching Item\n const matchingItem = this.options.find(\n (option) => option.item[this.itemSelectorConfig!.displayProperty!] === paramItem,\n );\n if (matchingItem) {\n // find the matching status in the item\n const matchingStatus = matchingItem.statuses.find(\n (status) => status[this.statusSelectorConfig!.displayProperty!] === paramStatus,\n );\n const matchingEdition = matchingItem.editions?.find((edition) => edition.editionId === paramEdition);\n if (matchingStatus) {\n // append the matching ItemAndStatus to list that we will return\n matches.push({ item: matchingItem.item, status: matchingStatus, edition: matchingEdition });\n }\n }\n });\n // If there are no matching items in the list, return null\n return matches.length > 0 ? matches : null;\n }\n}\n","import { FilterField, FilterFieldType, FilterFieldConfig } from '../filter';\n\nexport interface MultiSelectFilterFieldConfig extends FilterFieldConfig {\n optionDisplayProperty?: string;\n optionIdProperty?: string;\n options?: any[];\n selected?: any[];\n placeholderText?: string;\n limitResults?: boolean;\n}\n\nexport class MultiSelectFilterField extends FilterField {\n readonly type: FilterFieldType = 'multi-select';\n optionDisplayProperty: string | null;\n optionIdProperty: string | null;\n selected: any[];\n displayProperty: string;\n placeholderText: string | null;\n limitResults: boolean;\n\n constructor(config: MultiSelectFilterFieldConfig) {\n super(config);\n this.optionDisplayProperty = config.optionDisplayProperty || null;\n this.optionIdProperty = config.optionIdProperty || null;\n this.selected = config.selected || [];\n this.placeholderText = config.placeholderText || null;\n this.limitResults = config.limitResults || false;\n }\n\n removeValue(value: any): void {\n if (Array.isArray(this.value)) {\n const index = this.value.indexOf(value);\n this.value.splice(index, 1);\n }\n if (this.valueChanged) {\n this.valueChanged(this);\n }\n }\n\n public clearValue(): void {\n this.value = [];\n if (this.valueChanged) {\n this.valueChanged(this);\n }\n }\n\n appliedFieldText(value?: any): string {\n let buttonText = '';\n if (this.optionDisplayProperty) {\n buttonText += `${this.name}: ${value[this.optionDisplayProperty]}`;\n } else {\n buttonText += `${this.name}: ${value}`;\n }\n return buttonText;\n }\n\n serializeValue(): string {\n let queryParam = '';\n this.value!.forEach((item) => {\n if (this.optionIdProperty) {\n queryParam += `,${item[this.optionIdProperty]}`;\n } else if (this.optionDisplayProperty) {\n queryParam += `,${item[this.optionDisplayProperty]}`;\n } else {\n queryParam += ',' + item;\n }\n });\n queryParam = queryParam.substring(1);\n return queryParam;\n }\n\n deserializeValue(urlParam: string): any[] {\n const paramsList = urlParam.split(',');\n if (this.optionIdProperty) {\n return this.options.filter((option) => {\n return paramsList.some((param) => {\n return param === option[this.optionIdProperty!];\n });\n });\n } else if (this.optionDisplayProperty) {\n return this.options.filter((option) => {\n return paramsList.some((param) => {\n return param === option[this.optionDisplayProperty!];\n });\n });\n } else {\n return this.options.filter((option) => paramsList.some((param) => param === option));\n }\n }\n}\n","import { FilterField, FilterFieldConfig, FilterFieldType } from '../filter';\n\nexport interface Tab {\n name: string;\n id: string;\n}\n\nexport class TabbedFilterField extends FilterField {\n readonly type: FilterFieldType = 'tabbed';\n options: Tab[];\n\n constructor(config: FilterFieldConfig) {\n super(config);\n this.value = config.value || config.options![0];\n }\n\n appliedFieldText(): string {\n return this.value!.name;\n }\n\n serializeValue(): string {\n return this.value!.id;\n }\n\n deserializeValue(urlParam: string): Tab | null {\n return this.options.find((tab) => tab.id === urlParam) || null;\n }\n}\n","import { ChangeDetectorRef } from '@angular/core';\nimport { Observable, Subscription } from 'rxjs';\nimport { Radio, RadioFilterField } from './filter-field-radio';\n\ntype TranslationResult = string | { [key: string]: string } | any;\n\n/**\n * This cannot safely be called before the AfterViewInit angular lifecycle hook.\n *\n * When attaching a translator, it will assume that the values given for\n * things like filter name and option name are actually translation keys, and\n * will use them as inputs during translation.\n *\n * Provide ChangeDetectorRef to inform the app when new values are set by the\n * translator during the change detection round.\n *\n * IMPORTANT: Calling this function will create observable subscriptions. You\n * will need to clean them up during the OnDestroy lifecycle hook of your\n * filter component. THe subscriptions are provided on the return value of\n * this function.\n */\nexport function subscribeRadioFilterFieldToTranslator(\n field: RadioFilterField,\n translateService: {\n instant: (key: string | Array) => TranslationResult;\n stream: (key: string | Array) => Observable;\n },\n changeDetector: ChangeDetectorRef,\n): Subscription[] {\n const optionSubs = updateOptionNamesOnLanguageChange(field, (key) => translateService.stream(key), changeDetector);\n field.options = translateOptions(field, (key) => translateService.instant(key));\n return optionSubs;\n}\n\nfunction updateOptionNamesOnLanguageChange(\n field: RadioFilterField,\n stream: (key: string | Array) => Observable,\n changeDetector: ChangeDetectorRef,\n): Subscription[] {\n const subs: Subscription[] = [];\n const optionKeys = field.options;\n const keys = optionKeys.map((k) => k.name);\n subs.push(\n stream(keys).subscribe((translated) => {\n field.options = zipTranslated(optionKeys, translated);\n changeDetector.detectChanges();\n }),\n );\n return subs;\n}\n\nfunction translateOptions(\n field: RadioFilterField,\n instant: (key: string | Array) => TranslationResult,\n): Radio[] {\n const optionKeys = field.options;\n const keys = optionKeys.map((k) => k.name);\n const translated: { [key: string]: string } = instant(keys);\n return zipTranslated(optionKeys, translated);\n}\n\n/**\n * Replaces the names of the given radio options using the given translations.\n */\nfunction zipTranslated(optionKeys: Radio[], translated: { [key: string]: string }): Radio[] {\n return optionKeys.map((key) => ({ name: translated[key.name], id: key.id }));\n}\n","import { ChangeDetectorRef } from '@angular/core';\nimport { Observable, Subscription, Subject } from 'rxjs';\nimport { FilterField, FilterFieldConfig, FilterFieldType } from '../filter';\nimport { subscribeRadioFilterFieldToTranslator } from './filter-field-radio.translation';\n\nexport interface Radio {\n name: string;\n id: string;\n}\n\nexport class RadioFilterField extends FilterField {\n readonly type: FilterFieldType = 'radio';\n private readonly valueChanged$$ = new Subject();\n readonly valueChanged$ = this.valueChanged$$.asObservable();\n\n options: Radio[];\n\n constructor(config: FilterFieldConfig) {\n super(config);\n this.value = config.value || config.options![0];\n }\n\n appliedFieldText(): string {\n return this.value!.name;\n }\n\n serializeValue(): string {\n return this.value!.id;\n }\n\n deserializeValue(urlParam: string): Radio | null {\n return this.options.find((radio) => radio.id === urlParam) || null;\n }\n\n public changeValue(value?: any): void {\n if (value === this.value) {\n return;\n }\n\n this.value = value;\n if (this.valueChanged) {\n this.valueChanged(this);\n }\n this.valueChanged$$.next();\n }\n\n /**\n * @see subscribeRadioFilterFieldToTranslator\n */\n subscribeToTranslator(\n translator: {\n stream: (key: string | Array) => Observable;\n instant: (key: string | Array) => string | any;\n },\n cd: ChangeDetectorRef,\n ): Subscription[] {\n const superSubs = super.subscribeToTranslator(translator, cd);\n const radioSubs = subscribeRadioFilterFieldToTranslator(this, translator, cd);\n return superSubs.concat(radioSubs);\n }\n}\n","import { Component, EventEmitter, Input, Output } from '@angular/core';\n\nimport { Filters, FilterField } from './filters/filter';\nimport { MultiItemsAndStatusFilterField } from './filters/multi-items-and-status/filter-field-multi-items-and-status';\nimport { MultiSelectFilterField } from './filters/multi-select/filter-field-multi-select';\nimport { TabbedFilterField } from './filters/tabbed/filter-field-tabbed';\nimport { RadioFilterField } from './filters/radio/filter-field-radio';\n\n@Component({\n selector: 'va-applied-filters-bar',\n template: `\n
    0\" class=\"applied-filters-bar\">\n \n \n \n {{ field.appliedFieldDisplayText() }}\n cancel\n \n \n \n {{ field.appliedFieldDisplayText(value) }}\n cancel\n \n \n \n \n
    \n `,\n styleUrls: ['applied-filters-bar.component.scss'],\n})\nexport class AppliedFiltersBarComponent {\n @Input() filters: Filters;\n @Output() fieldValueChanged = new EventEmitter();\n\n isArray(value: any): boolean {\n return Array.isArray(value);\n }\n\n get appliedFilters(): FilterField[] {\n return this.filters.activeFields.filter(\n /* Exclude RadioFilterField because it always has a default value. It will mess up the applied filter bar\n If there are a lot of RadioFilterFields and remove the selected filter tag will not clear the filter*/\n (field) => !(field instanceof TabbedFilterField || field instanceof RadioFilterField),\n );\n }\n\n clearValue(field: FilterField, value?: any): void {\n if (field instanceof MultiItemsAndStatusFilterField) {\n field.removeValue(value);\n } else if (field instanceof MultiSelectFilterField) {\n field.removeValue(value);\n } else {\n field.clearValue();\n }\n this.fieldValueChanged.emit(field);\n }\n}\n","import { Component, Input, Output, EventEmitter } from '@angular/core';\nimport { FilterField } from './filter';\n\n@Component({\n template: '',\n})\nexport class FilterFieldComponent> {\n @Input() filterField: T;\n @Output() filterApplied: EventEmitter = new EventEmitter();\n\n applyFilter(value: any): void {\n this.filterField.changeValue(value);\n this.filterApplied.emit(this.filterField);\n }\n}\n","import { Component } from '@angular/core';\nimport { TextFilterField } from './filter-field-text';\nimport { FilterFieldComponent } from '../filter-field.component';\n\n@Component({\n selector: 'va-filter-text',\n template: `\n \n \n \n `,\n})\nexport class TextFilterFieldComponent extends FilterFieldComponent {\n filterValue: string;\n}\n","import { FilterField, FilterFieldType } from '../filter';\n\nexport class CheckboxFilterField extends FilterField {\n readonly type: FilterFieldType = 'checkbox';\n\n public clearValue(): void {\n this.value = false;\n if (this.valueChanged) {\n this.valueChanged(this);\n }\n }\n\n appliedFieldText(): string {\n return this.name;\n }\n}\n","import { Component } from '@angular/core';\nimport { CheckboxFilterField } from './filter-field-checkbox';\nimport { FilterFieldComponent } from '../filter-field.component';\n\n@Component({\n selector: 'va-filter-checkbox',\n styleUrls: ['./filter-field-checkbox.scss'],\n template: `\n \n \n \n {{\n '' + (filterField.disableTranslation ? filterField.name : (filterField.name | translate)) + filterField.suffix\n }}\n \n `,\n})\nexport class CheckboxFilterFieldComponent extends FilterFieldComponent {}\n","import { FilterField, FilterFieldType } from '../filter';\nimport * as moment from 'moment';\n\nexport class DatePickerFilterField extends FilterField {\n readonly type: FilterFieldType = 'date-picker';\n\n appliedFieldText(): string {\n return `${this.name}: ${new Date(this.value!.toISOString()).toDateString()}`;\n }\n\n serializeValue(): string {\n return this.value!.toISOString();\n }\n\n deserializeValue(urlParam: string): moment.Moment {\n return moment.utc(urlParam);\n }\n}\n","import { Component } from '@angular/core';\nimport { MatDatepickerInputEvent } from '@angular/material/datepicker';\nimport * as moment from 'moment';\nimport { FilterFieldComponent } from '../filter-field.component';\nimport { DatePickerFilterField } from './filter-field-date-picker';\nimport { DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE } from '@angular/material/core';\nimport { getLocale } from '@vendasta/galaxy/utility/locale';\nimport { DateFnsAdapter, MAT_DATE_FNS_FORMATS } from '@angular/material-date-fns-adapter';\n\n@Component({\n selector: 'va-filter-date-picker',\n template: `\n \n \n \n {{ '' + filterField.name | translate }}\n \n \n \n \n `,\n styles: [\n `\n :host {\n display: block;\n margin-bottom: -24px;\n }\n `,\n ],\n providers: [\n //for browsers with a negative GMT, the default datepicker would show the previous day\n { provide: MAT_DATE_LOCALE, useValue: getLocale() },\n {\n provide: DateAdapter,\n useClass: DateFnsAdapter,\n },\n { provide: MAT_DATE_FORMATS, useValue: MAT_DATE_FNS_FORMATS },\n ],\n})\nexport class DatePickerFilterFieldComponent extends FilterFieldComponent {\n dateChange(event: MatDatepickerInputEvent): void {\n this.applyFilter(event.value);\n }\n}\n","import { FilterField, FilterFieldType, FilterFieldConfig } from '../filter';\n\nexport interface SearchSelectFilterFieldConfig extends FilterFieldConfig {\n options?: any[];\n optionDisplayProperty?: string;\n placeholder?: string;\n showSearch?: boolean;\n title?: string;\n dropdownWidth?: string;\n width?: number;\n closeOnClick?: boolean;\n}\n\nconst MIN_WIDTH = 200;\n\nexport class SearchSelectFilterField extends FilterField {\n readonly type: FilterFieldType = 'search-select';\n options: any[];\n optionDisplayProperty: string | null;\n placeholder: string | null;\n showSearch: boolean;\n title: string | null;\n dropdownWidth: string | null;\n closeOnClick: boolean;\n width: number;\n\n constructor(config: SearchSelectFilterFieldConfig) {\n super(config);\n this.options = config.options || [];\n this.optionDisplayProperty = config.optionDisplayProperty || null;\n this.placeholder = config.placeholder || null;\n this.showSearch = config.showSearch !== undefined ? config.showSearch : true;\n this.title = config.title || null;\n this.dropdownWidth = config.dropdownWidth || null;\n this.width = config.width && config.width > MIN_WIDTH ? config.width : MIN_WIDTH;\n // default to true to support original functionality\n const { closeOnClick = true } = config;\n this.closeOnClick = !!closeOnClick;\n }\n\n appliedFieldText(): string {\n return `${this.name}: ${this.value[this.optionDisplayProperty!]}`;\n }\n\n serializeValue(): string {\n return `${this.value[this.optionDisplayProperty!]}`;\n }\n\n deserializeValue(urlParam: string): any {\n return this.options.find((option) => option[this.optionDisplayProperty!] === urlParam) || null;\n }\n\n searchSelectFieldWidth(): number {\n return this.width;\n }\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { FilterFieldComponent } from '../filter-field.component';\nimport { SearchSelectFilterField } from './filter-field-search-select';\n\n@Component({\n selector: 'va-filter-search-select',\n changeDetection: ChangeDetectionStrategy.OnPush,\n styleUrls: ['filter-field-search-select.scss'],\n template: `\n
    \n
    \n {{ '' + filterField.title | translate }}\n
    \n \n
    \n `,\n})\nexport class SearchSelectFilterFieldComponent extends FilterFieldComponent {}\n","import { Component } from '@angular/core';\nimport { FilterFieldComponent } from '../filter-field.component';\nimport { ItemsAndStatusFilterField } from './filter-field-items-and-status';\n\n@Component({\n selector: 'va-filter-items-and-status',\n template: `\n \n `,\n})\nexport class ItemsAndStatusFilterFieldComponent extends FilterFieldComponent {\n newItemSelected(item: any): void {\n const statusOptions = this.filterField.statusOptionsForItem(item);\n let firstStatusOption = null;\n if (Array.isArray(statusOptions)) {\n firstStatusOption = statusOptions[0];\n }\n this.filterField.changeValue({ item: item, status: firstStatusOption });\n }\n\n itemMenuOptions(): any[] {\n return this.filterField.options.map((option) => option.item) || [];\n }\n}\n","import { Component } from '@angular/core';\nimport { ItemAndStatus } from '../../../va-items-and-status/va-items-and-status';\nimport { FilterFieldComponent } from '../filter-field.component';\nimport { MultiItemsAndStatusFilterField } from './filter-field-multi-items-and-status';\n\n@Component({\n selector: 'va-filter-multi-items-and-status',\n template: `\n \n 0 || filterField.options.length === 0\"\n [options]=\"selectItemOptions()\"\n [itemConfig]=\"filterField.itemSelectorConfig\"\n [statusConfig]=\"filterField.statusSelectorConfig\"\n [editionConfig]=\"filterField.editionSelectorConfig\"\n [appliedSelection]=\"emptyItemAndStatus\"\n (selection)=\"addItemAndStatus($event)\"\n >\n `,\n styles: [\n `\n va-items-and-status {\n display: block;\n }\n :not(va-items-and-status:last-child) {\n margin-bottom: 10px;\n }\n `,\n ],\n})\nexport class MultiItemsAndStatusFilterFieldComponent extends FilterFieldComponent {\n public emptyItemAndStatus: ItemAndStatus = { item: null, status: null, edition: null };\n\n updateItemAndStatus(oldValue: ItemAndStatus, newValue: ItemAndStatus): void {\n this.filterField.updateValue(oldValue, newValue);\n this.filterApplied.emit(this.filterField);\n }\n\n addItemAndStatus(value: ItemAndStatus): void {\n let selectedValues = this.filterField.value;\n if (this.filterField.value === null) {\n selectedValues = [value];\n } else if (\n !this.filterField.value.some(\n (existingValue) =>\n existingValue.item === value.item &&\n existingValue.status === value.status &&\n existingValue.edition?.editionId === value.edition?.editionId,\n )\n ) {\n // If there is not an existing value with the same item and status, push the new value to the array\n selectedValues!.push(value);\n }\n this.applyFilter(selectedValues);\n this.emptyItemAndStatus = { item: null, status: null, edition: null };\n }\n\n selectItemOptions(): any[] {\n return this.filterField.options.filter((option) => {\n return !this.filterField.value!.find((itemList) => itemList.item === option.item);\n });\n }\n}\n","import { Component } from '@angular/core';\nimport { FilterFieldComponent } from '../filter-field.component';\nimport { MultiSelectFilterField } from './filter-field-multi-select';\n\n@Component({\n selector: 'va-filter-multi-items-and-status',\n template: `\n \n `,\n})\nexport class MultiSelectFilterFieldComponent extends FilterFieldComponent {}\n","import { Component, Input } from '@angular/core';\nimport { MatTabChangeEvent } from '@angular/material/tabs';\nimport { FilterFieldComponent } from '../filter-field.component';\nimport { TabbedFilterField } from './filter-field-tabbed';\n\nexport type TabFilterTheme = 'gradient' | 'plain';\n\n@Component({\n selector: 'va-filter-tabbed',\n template: `\n
    \n

    0\" class=\"page-title\">{{ '' + filterField.name | translate }}

    \n \n \n \n \n \n \n \n \n
    \n `,\n styleUrls: ['filter-field-tabbed.component.scss'],\n})\nexport class TabbedFilterFieldComponent extends FilterFieldComponent {\n @Input() useCustomCase = false;\n @Input() theme: TabFilterTheme = 'gradient';\n changeTab(event: MatTabChangeEvent): void {\n const tab = this.filterField.options[event.index];\n this.applyFilter(tab);\n }\n\n get selectedIndex(): number {\n if (this.filterField.value) {\n return this.filterField.options.findIndex((tab) => tab.id === this.filterField.value!.id);\n }\n return 0;\n }\n\n getThemeClasses(): string {\n switch (this.theme) {\n case 'gradient':\n return 'tab-container gradient';\n case 'plain':\n return 'plain';\n }\n }\n}\n","import { Component, OnDestroy, OnInit } from '@angular/core';\nimport { MatRadioChange } from '@angular/material/radio';\nimport { Subscription } from 'rxjs';\nimport { FilterFieldComponent } from '../filter-field.component';\nimport { RadioFilterField } from './filter-field-radio';\n\n@Component({\n selector: 'va-filter-radio',\n template: `\n \n \n {{ '' + radio.name | translate }}\n \n \n `,\n styleUrls: ['filter-field-radio.component.scss'],\n})\nexport class RadioFilterFieldComponent extends FilterFieldComponent implements OnInit, OnDestroy {\n selectedRadio: string;\n private sub: Subscription;\n\n // If RadioFilterField.changeValue called from a class Outside the `RadioFilterFieldComponent`\n // we need to push that value change to parent components, and update the the current instance\n // to reflect the correct value.\n private updateValue = () => {\n this.selectedRadio = this.filterField.value!.id;\n this.applyFilter(this.filterField.value);\n };\n\n ngOnInit(): void {\n if (this.filterField.value) {\n this.updateValue();\n }\n\n this.sub = this.filterField.valueChanged$.subscribe(this.updateValue);\n }\n\n radioChange(event: MatRadioChange): void {\n const newValue = this.filterField.options.find((v) => v.id === event.value);\n this.filterField.changeValue(newValue);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n applyFilter(value: any): void {\n this.filterApplied.emit(this.filterField);\n }\n\n ngOnDestroy(): void {\n this.sub.unsubscribe();\n }\n}\n","import { Component, AfterViewInit } from '@angular/core';\nimport { FilterFieldComponent } from '../filter-field.component';\nimport { RangeFilterField } from './filter-field-range';\nimport { UntypedFormControl, Validators, AbstractControl } from '@angular/forms';\n\n@Component({\n selector: 'va-filter-range',\n template: `\n
    \n \n \n {{ filterField.suffix }}\n \n to\n \n \n {{ filterField.suffix }}\n \n
    \n Minimum is required\n Maximum is required\n Minimum must be a number\n Maximum must be a number\n \n Minimum must be from {{ filterField.bounds.minimum }} to {{ filterField.bounds.maximum }}.\n \n \n Maximum must be from {{ filterField.bounds.minimum }} to {{ filterField.bounds.maximum }}.\n \n \n Minimum must be less than or equal to the maximum\n \n `,\n styles: [\n `\n .range-container {\n width: 100%;\n display: flex;\n justify-content: space-around;\n align-items: center;\n min-width: 198px;\n color: rgba(0, 0, 0, 0.54);\n }\n `,\n `\n .range-value-container {\n width: 55px;\n }\n `,\n `\n input {\n margin: 0;\n padding: 0;\n border: 0;\n vertical-align: initial;\n }\n `,\n ],\n})\nexport class RangeFilterFieldComponent extends FilterFieldComponent implements AfterViewInit {\n private validators = [\n Validators.required,\n Validators.pattern('^-?\\\\d+$'),\n this.minMaxValidator.bind(this),\n this.boundsValidator.bind(this),\n ];\n\n minValueFormControl = new UntypedFormControl('', this.validators);\n maxValueFormControl = new UntypedFormControl('', this.validators);\n\n ngAfterViewInit(): void {\n this.revalidateForm();\n }\n\n updateRange(): void {\n this.revalidateForm();\n if (\n !this.isValid() ||\n (this.filterField.minimum === this.minValueFormControl.value &&\n this.filterField.maximum === this.maxValueFormControl.value)\n ) {\n return;\n }\n this.filterField.value = {\n minimum: this.minValueFormControl.value,\n maximum: this.maxValueFormControl.value,\n };\n this.applyFilter(this.filterField.value);\n }\n\n handleKeyDown($event: KeyboardEvent): void {\n if ($event.keyCode === 13) {\n this.updateRange();\n }\n }\n\n private revalidateForm(): void {\n this.minValueFormControl.updateValueAndValidity({ onlySelf: true, emitEvent: false });\n this.maxValueFormControl.updateValueAndValidity({ onlySelf: true, emitEvent: false });\n }\n\n private isValid(): boolean {\n return !this.maxValueFormControl.invalid && !this.minValueFormControl.invalid;\n }\n\n private minMaxValidator(control: AbstractControl): { [key: string]: any } | null {\n let valid = true;\n if (!!this.minValueFormControl && !!this.maxValueFormControl) {\n valid = this.minValueFormControl.value <= this.maxValueFormControl.value;\n }\n return valid ? null : { minMax: { value: control.value } };\n }\n\n private boundsValidator(control: AbstractControl): { [key: string]: any } | null {\n let valid = true;\n if (!!this.minValueFormControl && !!this.maxValueFormControl) {\n valid =\n this.minValueFormControl.value >= this.filterField.bounds.minimum &&\n this.maxValueFormControl.value <= this.filterField.bounds.maximum;\n }\n return valid ? null : { bounds: { value: control.value } };\n }\n}\n","import { ComponentRef, Directive, EventEmitter, Input, OnInit, Output, Type, ViewContainerRef } from '@angular/core';\nimport { CheckboxFilterFieldComponent } from './checkbox/filter-field-checkbox.component';\nimport { DatePickerFilterFieldComponent } from './date-picker/filter-field-date-picker.component';\nimport { FilterField } from './filter';\nimport { FilterFieldComponent } from './filter-field.component';\nimport { ItemsAndStatusFilterFieldComponent } from './items-and-status/filter-field-items-and-status.component';\nimport { MultiItemsAndStatusFilterFieldComponent } from './multi-items-and-status/filter-field-multi-items-and-status.component';\nimport { MultiSelectFilterFieldComponent } from './multi-select/filter-field-multi-select.component';\nimport { RadioFilterFieldComponent } from './radio/filter-field-radio.component';\nimport { RangeFilterFieldComponent } from './range/filter-field-range.component';\nimport { SearchSelectFilterFieldComponent } from './search-select/filter-field-search-select.component';\nimport { TextFilterFieldComponent } from './text/filter-field-text.component';\n\nconst FilterMap: { [type: string]: Type>> } = {\n checkbox: CheckboxFilterFieldComponent,\n 'search-select': SearchSelectFilterFieldComponent,\n 'date-picker': DatePickerFilterFieldComponent,\n 'items-and-status': ItemsAndStatusFilterFieldComponent,\n 'multi-items-and-status': MultiItemsAndStatusFilterFieldComponent,\n 'multi-select': MultiSelectFilterFieldComponent,\n range: RangeFilterFieldComponent,\n radio: RadioFilterFieldComponent,\n text: TextFilterFieldComponent,\n};\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[filter]',\n})\nexport class FilterFieldDirective implements OnInit {\n @Input() filterField: FilterField;\n @Output() filterApplied = new EventEmitter>();\n\n component: ComponentRef>>;\n\n constructor(private container: ViewContainerRef) {}\n\n ngOnInit(): void {\n if (!this.component) {\n this.initializeComponent();\n }\n }\n\n initializeComponent(): void {\n if (!this.filterField) {\n return; // Component was constructed before the filterField input was ready\n }\n\n this.component = this.container.createComponent>>(\n FilterMap[this.filterField.type],\n );\n this.component.instance.filterField = this.filterField;\n this.component.instance.filterApplied.subscribe((value: any) => this.filterApplied.emit(value));\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ActivatedRoute, Router, Params, NavigationEnd } from '@angular/router';\nimport { Location } from '@angular/common';\nimport { filter } from 'rxjs/operators';\n\n@Injectable({ providedIn: 'root' })\nexport class URLParamService {\n appliedParams: Params = {};\n\n constructor(private router: Router, private route: ActivatedRoute, private location: Location) {\n this.router.events.pipe(filter((event) => event instanceof NavigationEnd)).subscribe(() => {\n this.applyParams(this.appliedParams);\n });\n }\n\n applyParams(newParams: Params): void {\n const params = Object.assign({}, this.route.snapshot.queryParams, this.appliedParams, newParams);\n this.appliedParams = Object.assign(this.appliedParams, newParams);\n this.location.replaceState(window.location.pathname, this.serialize(params));\n }\n\n removeParams(oldParams: string[]): void {\n const currentParams = Object.assign({}, this.route.snapshot.queryParams, this.appliedParams);\n oldParams.forEach((param) => {\n if (this.appliedParams[param]) {\n delete this.appliedParams[param];\n }\n if (currentParams[param]) {\n delete currentParams[param];\n }\n });\n this.location.replaceState(window.location.pathname, this.serialize(currentParams));\n }\n\n serialize(obj: object) {\n const params = Object.keys(obj);\n if (params.length === 0) {\n return '';\n }\n return (\n '?' +\n params\n .reduce(function (a: string[], k: string) {\n a.push(k + '=' + encodeURIComponent(obj[k]));\n return a;\n }, [])\n .join('&')\n );\n }\n /* tslint:enable */\n}\n","import { Injectable, OnDestroy } from '@angular/core';\nimport { Filters, FilterField } from './filters/filter';\nimport { ActivatedRoute } from '@angular/router';\nimport { Observable, BehaviorSubject, Subscription } from 'rxjs';\nimport { filter, skipWhile, map } from 'rxjs/operators';\nimport { URLParamService } from '../url-param.service';\nimport { LocalStorageService } from '../local-storage.service';\n\nexport interface SavedFilter {\n name: string;\n serializedFields: string | null;\n expiry: number | null;\n}\nconst LAST_APPLIED_FIELDS = '__last_applied_fields__';\nconst EXPIRY_LAST_APPLIED_FIELDS = 30 * 60 * 1000; // 30 min expiry time for last applied fields\n\n@Injectable()\nexport class FilterService implements OnDestroy {\n public filters: Filters;\n /*\n What: lazyLoadedFields are a mechanism for the consumer of the service to tell the filter service that these\n filter fields may not immediately have their `option` values. In knowing this, the filter service can subscribe\n to those fields changing options, and once the options have all been filled, apply the filter values\n Why: Since many of our filter fields can take a list of `any` type of object, we need to serialize those\n objects into a much more consistent and concise representation in the url/storage. Upon deserializing these\n values, we need to check to see they are still valid, and map back to an original object, based on the filter field options.\n Since many fields do not have their options loaded when this service is instantiated, we can keep this list\n of fields, and wait for their options to load before we deserialize the url/storage values.\n */\n public lazyLoadedFields: FilterField[] = [];\n private initializationParams: any = {};\n private fieldSubscription: Subscription;\n private lazyFieldSubscription: Subscription;\n private _savedFilters = new BehaviorSubject(null);\n /*\n What: batchChangedFields is a local list of fields that the service is currently updating. Once complete, the service will\n emit a new list of values through the fieldValueChanges observable, and this value will be flushed.\n Why: When changing several fields at once, we don't want to trigger the consumer (a component using the service)\n to make an ajax request for each changed field. By batching value changes, and emiting them all at once, we can allow\n the consumer to intelligently cascade many updates at a time to the data it is filtering.\n */\n private batchChangedFields: FilterField[] = [];\n private _fieldValueChanges = new BehaviorSubject[] | null>(null);\n\n constructor(\n private route: ActivatedRoute,\n private paramService: URLParamService,\n private localStorageService: LocalStorageService,\n ) {}\n\n public setFilters(allFilters: Filters, lazyLoadedFields?: FilterField[], disableSavedFilters?: boolean): void {\n this.filters = allFilters;\n if (!this.filters) {\n return;\n }\n this.fieldSubscription = this.filters.fieldValuesObservable.subscribe((field: FilterField) => {\n this.updateUrl();\n this.saveCurrentFilter(LAST_APPLIED_FIELDS, Date.now() + EXPIRY_LAST_APPLIED_FIELDS);\n if (!this.isFieldIncludedInBatch(field)) {\n this._fieldValueChanges.next([field]);\n }\n });\n if (lazyLoadedFields) {\n this.setLazyLoadedFields(lazyLoadedFields);\n }\n\n const params = this.getFilterValuesFromUrl(this.filters);\n\n const existingSavedFilters = this.localStorageService.get(this.filters.id);\n if (existingSavedFilters && !disableSavedFilters) {\n const savedFilters = JSON.parse(existingSavedFilters);\n this._savedFilters.next(savedFilters);\n }\n\n this.initializationParams = params || JSON.parse(this.lastAppliedFields.serializedFields!) || null;\n if (this.initializationParams) {\n this.updateFilterFields(this.filters.fields, this.initializationParams);\n }\n\n this.updateUrl();\n }\n\n public setLazyLoadedFields(lazyLoadedFields: FilterField[]): void {\n this.lazyLoadedFields = lazyLoadedFields;\n this.lazyFieldSubscription = this.filters.fieldOptionsObservable\n .pipe(filter((field) => this.lazyLoadedFields.some((lazyField) => lazyField === field)))\n .subscribe((field) => this.trackLazyLoadedFieldOptionChanges(field, this.lazyLoadedFields));\n }\n\n public get savedFilters(): Observable {\n return this._savedFilters.asObservable().pipe(\n skipWhile((value: any) => value === null),\n map((savedFilters: SavedFilter[]) => {\n return savedFilters.filter((savedFilter: SavedFilter) => savedFilter.name !== LAST_APPLIED_FIELDS);\n }),\n );\n }\n\n public get fieldValueChanges(): Observable[] | null> {\n return this._fieldValueChanges.asObservable().pipe(skipWhile((value) => value === null));\n }\n\n public saveCurrentFilter(name: string, expiry: number | null = null): boolean {\n if (!name) {\n return false;\n }\n const currentlyAppliedFields = this.serializeFilters();\n const savedFilters = this._savedFilters.getValue() || [];\n const existingSavedFilterIndex = savedFilters.findIndex((savedFilter) => savedFilter.name === name);\n if (existingSavedFilterIndex !== -1) {\n savedFilters[existingSavedFilterIndex] = {\n name: name,\n serializedFields: currentlyAppliedFields,\n expiry: expiry,\n };\n } else {\n savedFilters.push({\n name: name,\n serializedFields: currentlyAppliedFields,\n expiry: expiry,\n });\n }\n const success = this.localStorageService.set(this.filters.id, JSON.stringify(savedFilters));\n if (success) {\n this._savedFilters.next(savedFilters);\n return true;\n } else {\n return false;\n }\n }\n\n public removeSavedFilter(name: string): boolean {\n const savedFilters = this._savedFilters.getValue() || [];\n const existingSavedFilterIndex = savedFilters.findIndex((savedFilter) => savedFilter.name === name);\n if (existingSavedFilterIndex !== -1) {\n savedFilters.splice(existingSavedFilterIndex, 1);\n const success = this.localStorageService.set(this.filters.id, JSON.stringify(savedFilters));\n if (success) {\n this._savedFilters.next(savedFilters);\n return true;\n } else {\n return false;\n }\n } else {\n return false;\n }\n }\n\n public applySavedFilter(savedFilter: SavedFilter): void {\n const paramValues = JSON.parse(savedFilter.serializedFields!);\n this.updateFilterFields(this.filters.fields, paramValues);\n }\n\n public getFilterValuesFromUrl(filters: Filters): any {\n const params = this.route.snapshot.queryParams;\n if (!params[filters.id]) {\n return null;\n }\n return JSON.parse(decodeURIComponent(params[filters.id]));\n }\n\n public updateUrl(): void {\n const serializedFilters = this.serializeFilters();\n if (serializedFilters !== '{}') {\n const filterParam = {};\n filterParam[this.filters.id] = serializedFilters;\n this.paramService.applyParams(filterParam);\n } else {\n this.paramService.removeParams([this.filters.id]);\n }\n }\n\n private isFieldIncludedInBatch(field: FilterField): boolean {\n return this.batchChangedFields.some((changedField) => changedField === field);\n }\n\n private get lastAppliedFields(): SavedFilter {\n const savedFilters = this._savedFilters.getValue() || [];\n let lastAppliedFields: SavedFilter | undefined | null = savedFilters.find(\n (savedFilter) => savedFilter.name === LAST_APPLIED_FIELDS,\n );\n if (lastAppliedFields && lastAppliedFields.expiry && lastAppliedFields.expiry < Date.now()) {\n this.removeSavedFilter(LAST_APPLIED_FIELDS);\n lastAppliedFields = null;\n }\n const emptyFilterSelection: SavedFilter = { name: LAST_APPLIED_FIELDS, serializedFields: null, expiry: null };\n return lastAppliedFields || emptyFilterSelection;\n }\n\n private trackLazyLoadedFieldOptionChanges(field: FilterField, lazyLoadedFields: FilterField[]): void {\n const indexOfField = lazyLoadedFields.findIndex((f) => f === field);\n lazyLoadedFields.splice(indexOfField, 1);\n if (lazyLoadedFields.length === 0 && this.initializationParams) {\n const fieldsToUpdate = this.filters.fields.filter((f) => this.initializationParams[f.id]);\n this.updateFilterFields(fieldsToUpdate, this.initializationParams);\n this.initializationParams = null;\n }\n }\n\n private serializeFilters(): any {\n return JSON.stringify(this.serializeAllActiveFields());\n }\n\n private serializeAllActiveFields(): object {\n return this.filters.activeFields.reduce((previous, current) => {\n previous[current.id] = current.serializeValue();\n return previous;\n }, {});\n }\n\n private updateFilterFields(fieldsToUpdate: FilterField[], paramValues: any): void {\n fieldsToUpdate.forEach((field, index, fieldArray) => {\n const key = field.id;\n // If no paramValue present for field, clear the value\n const newValue = paramValues[key] ? field.deserializeValue(paramValues[key]) : null;\n const publishChanges = index === fieldArray.length - 1;\n this.updateFilterField(field, newValue, publishChanges);\n });\n }\n\n private updateFilterField(field: FilterField, newValue: any, publishChanges: boolean): void {\n this.batchChangedFields.push(field);\n if (newValue === null) {\n field.clearValue();\n } else if (field.value !== newValue) {\n field.changeValue(newValue);\n }\n if (publishChanges) {\n this._fieldValueChanges.next(this.batchChangedFields);\n this.batchChangedFields = [];\n }\n }\n\n public exportFilterString(): string {\n return this.serializeFilters();\n }\n\n public importFilterFields(importString: string): void {\n const paramValues = JSON.parse(importString);\n this.updateFilterFields(this.filters.fields, paramValues);\n }\n\n ngOnDestroy(): void {\n if (this.filters) {\n this.paramService.removeParams([this.filters.id]);\n }\n if (this.fieldSubscription) {\n this.fieldSubscription.unsubscribe();\n }\n if (this.lazyFieldSubscription) {\n this.lazyFieldSubscription.unsubscribe();\n }\n }\n}\n","import { Component, ElementRef, ViewChild } from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\n\n@Component({\n selector: 'uikit-save-applied-filters-dialog',\n template: `\n

    {{ 'FRONTEND.UIKIT.VA_FILTER.CHOOSE_FILTER_NAME' | translate }}

    \n \n \n \n \n \n \n \n \n \n \n `,\n styleUrls: ['./save-applied-filters-dialog.component.scss'],\n})\nexport class SaveAppliedFiltersDialogComponent {\n @ViewChild('nameInput', { static: true }) nameInput: ElementRef;\n constructor(public dialogRef: MatDialogRef) {}\n\n close(): void {\n this.dialogRef.close(this.nameInput.nativeElement.value);\n }\n}\n","import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { MatDialogRef } from '@angular/material/dialog';\n\nimport { SavedFilter } from './filter.service';\n\n@Component({\n selector: 'uikit-manage-saved-filters-dialog',\n template: `\n

    {{ 'FRONTEND.UIKIT.VA_FILTER.MANAGE_YOUR_SAVED_FILTERS' | translate }}

    \n \n \n \n {{ option.name }}\n \n \n \n \n `,\n styleUrls: ['./manage-saved-filters-dialog.component.scss'],\n})\nexport class ManageSavedFiltersDialogComponent implements OnInit {\n @Input() savedFilters: Observable;\n @Output() removeSavedFilter = new EventEmitter();\n\n constructor(public dialogRef: MatDialogRef) {}\n\n ngOnInit(): void {\n this.savedFilters.subscribe((savedFilters) => this.closeDialogIfSavedFiltersEmpty(savedFilters));\n }\n\n closeDialogIfSavedFiltersEmpty(savedFilters: SavedFilter[]): void {\n if (!savedFilters.length) {\n this.dialogRef.close();\n }\n }\n}\n","import { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { MatDialogRef, MatDialog } from '@angular/material/dialog';\nimport { Observable } from 'rxjs';\n\nimport { SavedFilter } from './filter.service';\nimport { SaveAppliedFiltersDialogComponent } from './save-applied-filters-dialog.component';\nimport { ManageSavedFiltersDialogComponent } from './manage-saved-filters-dialog.component';\n\n@Component({\n selector: 'uikit-saved-filters-menu',\n template: `\n \n bookmark\n \n \n \n \n
    0\" />\n
    \n \n \n \n \n \n \n \n
    \n `,\n styleUrls: ['saved-filters-menu.component.scss'],\n})\nexport class SavedFiltersMenuComponent {\n @Input() options: Observable;\n @Input() showFilterSharing? = false;\n @Output() selection = new EventEmitter();\n @Output() saveCurrentFilter = new EventEmitter();\n @Output() removeSavedFilter = new EventEmitter();\n @Output() exportFilterDialog = new EventEmitter();\n @Output() importFilterDialog = new EventEmitter();\n\n private saveAppliedFiltersDialogRef: MatDialogRef;\n private manageSavedFiltersDialogRef: MatDialogRef;\n\n constructor(private dialog: MatDialog) {}\n\n openSaveCurrentFiltersDialog(): void {\n this.saveAppliedFiltersDialogRef = this.dialog.open(SaveAppliedFiltersDialogComponent, { width: '400px' });\n this.saveAppliedFiltersDialogRef.afterClosed().subscribe((name) => {\n this.saveCurrentFilter.emit(name);\n });\n }\n\n openManageSavedFiltersDialog(): void {\n this.manageSavedFiltersDialogRef = this.dialog.open(ManageSavedFiltersDialogComponent, { width: '500px' });\n this.manageSavedFiltersDialogRef.componentInstance.savedFilters = this.options;\n this.manageSavedFiltersDialogRef.componentInstance.removeSavedFilter.subscribe((name: string) => {\n this.removeSavedFilter.emit(name);\n });\n }\n\n openExportFilterDialog(): void {\n this.exportFilterDialog.emit();\n }\n\n openImportFilterDialog(): void {\n this.importFilterDialog.emit();\n }\n}\n","import { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { FilterField, Filters } from './filters/filter';\nimport { SavedFilter } from './filter.service';\nimport { TabbedFilterField } from './filters/tabbed/filter-field-tabbed';\n\n@Component({\n selector: 'va-filter',\n template: `\n
    \n
    \n
    {{ '' + filters.title | translate }}
    \n \n
    \n
    \n \n \n

    {{ '' + section.title | translate }}

    \n keyboard_arrow_right\n keyboard_arrow_down\n
    \n
    \n
    \n \n
    \n
    \n \n
    \n \n `,\n styleUrls: ['filter.component.scss'],\n})\nexport class FilterComponent {\n @Input() showFilterSharing? = false;\n @Input() filters: Filters;\n @Input() savedFilters: Observable;\n @Output() fieldValueChanged = new EventEmitter();\n @Output() savedFilterSelected = new EventEmitter();\n @Output() saveCurrentFilter = new EventEmitter();\n @Output() removeSavedFilter = new EventEmitter();\n @Output() exportFilterDialog = new EventEmitter();\n @Output() importFilterDialog = new EventEmitter();\n\n getDisplayableFields(fields: FilterField[]): FilterField[] {\n return fields.filter((field: FilterField) => {\n return !(field instanceof TabbedFilterField);\n });\n }\n}\n","import { Component, EventEmitter, Input, Output, OnDestroy, OnInit } from '@angular/core';\nimport { Observable, Subscription } from 'rxjs';\n\nimport { FilterField, Filters } from './filters';\nimport { FilterService } from './filter.service';\nimport { TabbedFilterField } from './filters';\n\nimport { SavedFilter } from './filter.service';\nimport { TabFilterTheme } from './filters/tabbed/filter-field-tabbed.component';\nimport { Breakpoints, BreakpointState, BreakpointObserver } from '@angular/cdk/layout';\n\n@Component({\n selector: 'va-filter-container',\n template: `\n
    \n \n
    \n
    \n \n \n filter_list\n {{ 'FRONTEND.UIKIT.VA_FILTER.FILTERS' | translate }}\n \n \n
    \n
    \n \n
    \n
    \n
    \n \n
    {{ toolbarText }}
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n
    0 }\">\n \n
    \n \n
    \n
    \n
    \n
    \n `,\n styleUrls: ['filter-container.component.scss'],\n providers: [FilterService],\n})\nexport class FilterContainerComponent implements OnInit, OnDestroy {\n @Input() showFilterSharing? = false;\n @Input() searchable = true;\n @Input() toolbarText: string;\n @Input() showToolbar = true;\n @Input() searchDisabled = false;\n @Input() filtersDisabled = false;\n @Input() filterIsOpen = false;\n @Input() initialSearch = '';\n @Input() placeholder = '';\n subscriptions: Subscription[] = [];\n\n @Input() filters: Filters;\n @Input() savedFilters: Observable;\n @Input() theme: TabFilterTheme = 'gradient';\n @Input() useCustomCase = false;\n @Input() enabledSaveSearchTerm = false;\n @Input() contextKey = '';\n\n @Output() searchTermChanged = new EventEmitter();\n @Output() fieldValueChanged = new EventEmitter();\n\n @Output() savedFilterSelected = new EventEmitter();\n @Output() removeSavedFilter = new EventEmitter();\n @Output() saveCurrentFilter = new EventEmitter();\n @Output() exportFilterDialog = new EventEmitter();\n @Output() importFilterDialog = new EventEmitter();\n\n constructor(private breakPointObserver: BreakpointObserver) {}\n\n ngOnInit(): void {\n this.subscriptions.push(\n this.breakPointObserver.observe(Breakpoints.XSmall).subscribe((state: BreakpointState) => {\n if (state.matches) {\n this.filterIsOpen = false;\n }\n }),\n );\n }\n\n ngOnDestroy(): void {\n this.subscriptions.forEach((sub) => {\n sub.unsubscribe();\n });\n }\n\n hasSideBarFields(): boolean {\n if (this.filters != null) {\n return this.filters.fields.filter((field: FilterField) => !(field instanceof TabbedFilterField)).length > 0;\n } else {\n return false;\n }\n }\n\n toggleFilterOpen(): void {\n if (this.filtersDisabled) {\n return;\n }\n this.filterIsOpen = !this.filterIsOpen;\n }\n\n get tabbedFilters(): TabbedFilterField[] {\n if (this.filters != null) {\n return this.filters.fields.filter((field) => field instanceof TabbedFilterField) as TabbedFilterField[];\n } else {\n return [];\n }\n }\n\n handleFilterValueChanged(event: FilterField): void {\n this.fieldValueChanged.emit(event);\n }\n}\n","import { LayoutModule } from '@angular/cdk/layout';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { MatMomentDateModule } from '@angular/material-moment-adapter';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatChipsModule } from '@angular/material/chips';\nimport { MatDatepickerModule } from '@angular/material/datepicker';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatListModule } from '@angular/material/list';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatRadioModule } from '@angular/material/radio';\nimport { MatTabsModule } from '@angular/material/tabs';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { RouterModule } from '@angular/router';\nimport { LexiconModule } from '@galaxy/lexicon';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { GalaxyWrapModule } from '@vendasta/galaxy/galaxy-wrap';\nimport baseTranslation from '../assets/i18n/en_devel.json';\nimport { WEBLATE_COMPONENT_NAME } from '../constants';\nimport { VaSearchBoxModule } from '../search-box/va-search-box.module';\nimport { VaItemsAndStatusModule } from '../va-items-and-status/va-items-and-status.module';\nimport { VaMultiSelectModule } from '../va-multi-select/va-multi-select.module';\nimport { VaSearchSelectModule } from '../va-search-select/va-search-select.module';\nimport { AppliedFiltersBarComponent } from './applied-filters-bar.component';\nimport { ExportFilterDialogComponent } from './export-filter-dialog.component';\nimport { FilterContainerComponent } from './filter-container.component';\nimport { FilterComponent } from './filter.component';\nimport { CheckboxFilterFieldComponent } from './filters/checkbox/filter-field-checkbox.component';\nimport { DatePickerFilterFieldComponent } from './filters/date-picker/filter-field-date-picker.component';\nimport { FilterFieldComponent } from './filters/filter-field.component';\nimport { FilterFieldDirective } from './filters/filter.directive';\nimport { ItemsAndStatusFilterFieldComponent } from './filters/items-and-status/filter-field-items-and-status.component';\nimport { MultiItemsAndStatusFilterFieldComponent } from './filters/multi-items-and-status/filter-field-multi-items-and-status.component';\nimport { MultiSelectFilterFieldComponent } from './filters/multi-select/filter-field-multi-select.component';\nimport { RadioFilterFieldComponent } from './filters/radio/filter-field-radio.component';\nimport { RangeFilterFieldComponent } from './filters/range/filter-field-range.component';\nimport { SearchSelectFilterFieldComponent } from './filters/search-select/filter-field-search-select.component';\nimport { TabbedFilterFieldComponent } from './filters/tabbed/filter-field-tabbed.component';\nimport { TextFilterFieldComponent } from './filters/text/filter-field-text.component';\nimport { ImportFilterDialogComponent } from './import-filter-dialog.component';\nimport { ManageSavedFiltersDialogComponent } from './manage-saved-filters-dialog.component';\nimport { SaveAppliedFiltersDialogComponent } from './save-applied-filters-dialog.component';\nimport { SavedFiltersMenuComponent } from './saved-filters-menu.component';\n\n@NgModule({\n imports: [\n RouterModule,\n CommonModule,\n VaSearchBoxModule,\n VaSearchSelectModule,\n VaItemsAndStatusModule,\n VaMultiSelectModule,\n MatCheckboxModule,\n MatTabsModule,\n MatMenuModule,\n MatIconModule,\n MatRadioModule,\n MatButtonModule,\n MatInputModule,\n MatDialogModule,\n MatListModule,\n MatDatepickerModule,\n FormsModule,\n ReactiveFormsModule,\n TranslateModule,\n LexiconModule.forChild({\n componentName: WEBLATE_COMPONENT_NAME,\n baseTranslation: baseTranslation,\n }),\n MatMomentDateModule,\n LayoutModule,\n MatTooltipModule,\n GalaxyWrapModule,\n MatChipsModule,\n ],\n declarations: [\n FilterComponent,\n FilterFieldDirective,\n FilterContainerComponent,\n FilterFieldComponent,\n AppliedFiltersBarComponent,\n CheckboxFilterFieldComponent,\n DatePickerFilterFieldComponent,\n SearchSelectFilterFieldComponent,\n ItemsAndStatusFilterFieldComponent,\n MultiItemsAndStatusFilterFieldComponent,\n MultiSelectFilterFieldComponent,\n TextFilterFieldComponent,\n TabbedFilterFieldComponent,\n RadioFilterFieldComponent,\n SaveAppliedFiltersDialogComponent,\n ManageSavedFiltersDialogComponent,\n SavedFiltersMenuComponent,\n RangeFilterFieldComponent,\n ExportFilterDialogComponent,\n ImportFilterDialogComponent,\n ],\n exports: [\n FilterComponent,\n FilterContainerComponent,\n AppliedFiltersBarComponent,\n SavedFiltersMenuComponent,\n FilterFieldDirective,\n ExportFilterDialogComponent,\n ImportFilterDialogComponent,\n ],\n providers: [],\n})\nexport class VaFilterModule {}\n","import { Component, Input, Output, EventEmitter } from '@angular/core';\n\n@Component({\n selector: 'va-action-menu',\n template: `\n \n \n \n \n `,\n})\nexport class VaActionMenuComponent {\n @Input() icon = 'more_vert';\n @Input() color = 'rgba(0,0,0,0.87)';\n @Input() actions: string[];\n @Output() actionSelected = new EventEmitter();\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatMenuModule } from '@angular/material/menu';\n\nimport { VaActionMenuComponent } from './va-action-menu.component';\n\n@NgModule({\n imports: [CommonModule, MatButtonModule, MatIconModule, MatMenuModule],\n declarations: [VaActionMenuComponent],\n exports: [VaActionMenuComponent],\n})\nexport class VaActionMenuModule {}\n","export enum SortOrder {\n Ascending = 1,\n Descending = -1,\n None = 0,\n}\n\nexport declare interface SortDescriptor {\n fieldname: string;\n order: SortOrder;\n}\n","import { NgModule } from '@angular/core';\nimport { VaIconModule } from '../va-icon/icon.module';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatChipsModule } from '@angular/material/chips';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { CommonModule } from '@angular/common';\n\nimport { VaActionMenuModule } from '../va-action-menu/va-action-menu.module';\nimport { VaListComponent } from './va-list.component';\nimport { VaListItemComponent } from './list-item/va-list-item.component';\nimport { ExpandedViewDirective } from './list-item/expanded-view.directive';\n\n@NgModule({\n imports: [\n CommonModule,\n MatCheckboxModule,\n MatButtonModule,\n MatIconModule,\n MatSlideToggleModule,\n MatTooltipModule,\n MatProgressSpinnerModule,\n MatProgressBarModule,\n MatChipsModule,\n VaIconModule,\n VaActionMenuModule,\n ],\n declarations: [ExpandedViewDirective, VaListComponent, VaListItemComponent],\n exports: [VaListComponent, ExpandedViewDirective],\n})\nexport class VaListModule {}\n","/*\nNOTE:\nThis is the expected interface of the fields inputted into this component from the va-filter2-table\ncomponent. Changing any fields here would require changing fields in the va-filter2-table\ndefinitions respective interface. If the interface changes you might have to do some mapping or update\nthe implementation of the organizer to maintain functionality.\n/frontend/angular/projects/va-filter2-table/src/lib/va-table-definition/va-table-definition.ts\n*/\nexport enum Pinned {\n PINNED_UNSET = 0,\n PINNED_LEFT = 1,\n PINNED_RIGHT = 2,\n}\n\nexport interface ColumnDefinition {\n id: string;\n displayName: string;\n pinned?: Pinned;\n hidden?: boolean;\n}\n\nexport interface ColumnInfo {\n id: string;\n name: string;\n isVisible: boolean;\n pinned?: Pinned;\n}\n\nexport interface GroupDefinition {\n id: string;\n name: string;\n columns: string[];\n}\n\nexport interface GroupInfo {\n id: string;\n name: string;\n columns: ColumnInfo[];\n}\n","import { Injectable } from '@angular/core';\nimport { ColumnDefinition, ColumnInfo, GroupDefinition, GroupInfo, Pinned } from './advanced-column-organizer';\nimport { BehaviorSubject, combineLatest, Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport { moveItemInArray } from '@angular/cdk/drag-drop';\nimport { TranslateService } from '@ngx-translate/core';\n\n@Injectable()\nexport class AdvancedColumnOrganizerService {\n private searchTerm$$ = new BehaviorSubject('');\n searchTerm$: Observable = this.searchTerm$$.asObservable();\n\n private columnDefs$$ = new BehaviorSubject([]);\n columnDefs$: Observable = this.columnDefs$$.asObservable();\n\n private groupDefs$$ = new BehaviorSubject([]);\n groupDefs$: Observable = this.groupDefs$$.asObservable();\n\n private selectedOrderedColumns$$ = new BehaviorSubject([]);\n selectedOrderedColumns$: Observable = this.selectedOrderedColumns$$.asObservable();\n\n columnDefsByID$: Observable<{ [id: string]: ColumnDefinition }>;\n selectedColumns$: Observable;\n searchedGroups$: Observable;\n pinnedLeftColumns$: Observable;\n pinnedRightColumns$: Observable;\n\n translator: TranslateService;\n\n constructor(translator: TranslateService) {\n this.translator = translator;\n this.columnDefsByID$ = this.columnDefs$.pipe(\n map((columnDefs) => {\n const columnDefsByID: { [id: string]: ColumnDefinition } = {};\n columnDefs.map((cd) => {\n columnDefsByID[cd.id] = cd;\n });\n return columnDefsByID;\n }),\n );\n\n this.selectedColumns$ = this.getSelectedColumns$();\n this.searchedGroups$ = this.getSearchedGroups$();\n this.pinnedLeftColumns$ = this.getPinnedLeftColumns$();\n this.pinnedRightColumns$ = this.getPinnedRightColumns$();\n }\n\n configure(\n saveKey: string,\n colDefs: ColumnDefinition[],\n groupDefs: GroupDefinition[],\n useI18NTranslations: boolean,\n ): void {\n if (useI18NTranslations) {\n colDefs = (colDefs || []).map((cd) => {\n cd.displayName = this.translator.instant(cd.displayName);\n return cd;\n });\n groupDefs = (groupDefs || []).map((gd) => {\n gd.name = this.translator.instant(gd.name);\n return gd;\n });\n }\n\n this.columnDefs$$.next(colDefs);\n this.groupDefs$$.next(groupDefs);\n let selectedOrderedColumns: string[] = this.columnDefs$$.value\n .filter((c) => !c.pinned && !c.hidden)\n .map((c) => c.id);\n const storedConfigJson: string | null = localStorage.getItem(`${saveKey}-visible-column-ids`);\n if (storedConfigJson) {\n selectedOrderedColumns = JSON.parse(storedConfigJson);\n }\n this.selectedOrderedColumns$$.next(selectedOrderedColumns);\n }\n\n getPinnedLeftColumns$(): Observable {\n return this.pinnedColumns$(Pinned.PINNED_LEFT);\n }\n\n getSelectedColumns$(): Observable {\n return combineLatest([this.selectedOrderedColumns$, this.columnDefsByID$]).pipe(\n map(([selectedColumnIDs, keyedColumns]): ColumnInfo[] => {\n return selectedColumnIDs.map((id: string): ColumnInfo => {\n return {\n id: id,\n name: keyedColumns[id].displayName,\n isVisible: !keyedColumns[id]?.hidden,\n pinned: Pinned.PINNED_UNSET,\n };\n });\n }),\n );\n }\n\n getPinnedRightColumns$(): Observable {\n return this.pinnedColumns$(Pinned.PINNED_RIGHT);\n }\n\n pinnedColumns$(pinSide: Pinned): Observable {\n return this.columnDefs$.pipe(\n map((columnDefs: ColumnDefinition[]): ColumnInfo[] => {\n const pinnedColumns = columnDefs.filter((columnDef) => columnDef.pinned === pinSide);\n return pinnedColumns.map(\n (columnDef: ColumnDefinition): ColumnInfo => ({\n id: columnDef.id,\n name: columnDef.displayName,\n isVisible: true,\n pinned: pinSide,\n }),\n );\n }),\n );\n }\n\n getSearchedGroups$(): Observable {\n return combineLatest([\n this.groupDefs$,\n this.searchTerm$,\n this.selectedOrderedColumns$,\n this.columnDefsByID$,\n this.columnDefs$,\n ]).pipe(\n map(([groupDefs, searchTerm, selectedOrderedColumns, keyedColumns, allColumns]) => {\n if (!groupDefs || groupDefs.length <= 0) {\n groupDefs = [\n {\n name: this.translator.instant('FRONTEND.UIKIT.VA_MAT_TABLE.COLUMNS'),\n id: 'allColumns',\n columns: allColumns.map((c) => c.id),\n },\n ];\n }\n const groups: GroupInfo[] = groupDefs.map(\n (groupDef: GroupDefinition): GroupInfo => ({\n id: groupDef.id,\n name: groupDef.name,\n columns: groupDef.columns.map(\n (id: string): ColumnInfo => ({\n id: id,\n name: keyedColumns[id].displayName,\n isVisible:\n selectedOrderedColumns.indexOf(id) !== -1 ||\n keyedColumns[id].pinned === Pinned.PINNED_LEFT ||\n keyedColumns[id].pinned === Pinned.PINNED_RIGHT,\n pinned: keyedColumns[id].pinned,\n }),\n ),\n }),\n );\n return this.filterGroupsBySearchTerm(groups, searchTerm);\n }),\n );\n }\n\n updateSearchTerm(st: string): void {\n this.searchTerm$$.next(st);\n }\n\n filterGroupsBySearchTerm(groups: GroupInfo[], searchTerm: string): GroupInfo[] {\n const columnMatchesSearchTerm = (column, st) => column.name.toLowerCase().indexOf(st.toLowerCase()) !== -1;\n if (!searchTerm) {\n return groups;\n }\n return groups\n .filter((group) => {\n return group.columns.some((column) => columnMatchesSearchTerm(column, searchTerm));\n })\n .map(\n (group: GroupInfo): GroupInfo => ({\n ...group,\n columns: group.columns.filter((column) => columnMatchesSearchTerm(column, searchTerm)),\n }),\n );\n }\n\n setColumnVisibility(id: string, isVisible: boolean): void {\n const cols = this.selectedOrderedColumns$$.value;\n const index = cols.indexOf(id);\n if (isVisible) {\n if (index === -1) {\n cols.push(id);\n }\n } else {\n if (index !== -1) {\n cols.splice(index, 1);\n }\n }\n this.selectedOrderedColumns$$.next(cols);\n }\n\n save(saveName: string): void {\n if (!localStorage) {\n return;\n }\n\n if (saveName) {\n const selectedOrderedColumns: string[] = this.selectedOrderedColumns$$.getValue();\n localStorage.setItem(`${saveName}-visible-column-ids`, JSON.stringify(selectedOrderedColumns));\n }\n }\n\n selectAll(columnGroup: GroupInfo): void {\n columnGroup.columns\n .filter((column) => !column.pinned)\n .map((column) => {\n this.setColumnVisibility(column.id, true);\n });\n }\n\n deselectAll(columnGroup: GroupInfo): void {\n columnGroup.columns\n .filter((column) => !column.pinned)\n .map((column) => {\n this.setColumnVisibility(column.id, false);\n });\n }\n\n columnDroppedInList(prevIndex: number, curIndex: number): void {\n const columns: string[] = this.selectedOrderedColumns$$.getValue();\n moveItemInArray(columns, prevIndex, curIndex);\n this.selectedOrderedColumns$$.next(columns);\n }\n\n getSelectedColumns(): string[] {\n return this.selectedOrderedColumns$$.value;\n }\n}\n","import { Component, Inject } from '@angular/core';\nimport { AdvancedColumnOrganizerService } from './advanced-column-organizer.service';\nimport { GroupInfo, ColumnInfo, ColumnDefinition, GroupDefinition } from './advanced-column-organizer';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { BreakpointObserver } from '@angular/cdk/layout';\nimport { Observable } from 'rxjs';\nimport { CdkDragDrop } from '@angular/cdk/drag-drop';\n\n// @dynamic\n@Component({\n selector: 'va-mat-table-advanced-column-organizer',\n templateUrl: './advanced-column-organizer.component.html',\n styleUrls: ['./advanced-column-organizer.component.scss'],\n providers: [AdvancedColumnOrganizerService],\n})\nexport class AdvancedColumnOrganizerComponent {\n saveName: string;\n activeTab: string | null;\n selectedColumns: string[];\n\n constructor(\n private advancedColumnOrganizerService: AdvancedColumnOrganizerService,\n @Inject(MAT_DIALOG_DATA)\n public dialogData: {\n saveName: string;\n columnConfigs: ColumnDefinition[];\n groupConfigs: GroupDefinition[];\n useI18NTranslations: boolean;\n },\n public breakpointObserver: BreakpointObserver,\n public dialogRef: MatDialogRef,\n ) {\n this.saveName = dialogData.saveName;\n this.loadColumns();\n this.getActiveTab();\n }\n\n get selectedColumns$(): Observable {\n return this.advancedColumnOrganizerService.selectedColumns$;\n }\n\n get pinnedLeftColumns$(): Observable {\n return this.advancedColumnOrganizerService.pinnedLeftColumns$;\n }\n\n get pinnedRightColumns$(): Observable {\n return this.advancedColumnOrganizerService.pinnedRightColumns$;\n }\n\n get searchedGroups$(): Observable {\n return this.advancedColumnOrganizerService.searchedGroups$;\n }\n\n get searchTerm$(): Observable {\n return this.advancedColumnOrganizerService.searchTerm$;\n }\n\n updateSearchTerm(event: string): void {\n this.advancedColumnOrganizerService.updateSearchTerm(event);\n }\n\n setColumnVisibility(id: string, isVisible: boolean): void {\n this.advancedColumnOrganizerService.setColumnVisibility(id, isVisible);\n }\n\n columnDroppedInList(event: CdkDragDrop): void {\n this.advancedColumnOrganizerService.columnDroppedInList(event.item.data.columnIndex, event.currentIndex);\n }\n\n save(): void {\n this.selectedColumns = this.advancedColumnOrganizerService.getSelectedColumns();\n this.dialogRef.close(true);\n this.advancedColumnOrganizerService.save(this.saveName);\n }\n\n loadColumns(): void {\n this.advancedColumnOrganizerService.configure(\n this.saveName,\n this.dialogData.columnConfigs,\n this.dialogData.groupConfigs,\n this.dialogData.useI18NTranslations,\n );\n }\n\n selectAll(columnGroup: GroupInfo): void {\n this.advancedColumnOrganizerService.selectAll(columnGroup);\n }\n\n deselectAll(columnGroup: GroupInfo): void {\n this.advancedColumnOrganizerService.deselectAll(columnGroup);\n }\n\n onClose(): void {\n this.dialogRef.close();\n }\n\n isMobileScreen(): boolean {\n return this.breakpointObserver.isMatched('(max-width: 820px)');\n }\n\n setActiveTab(currentTab: string): void {\n sessionStorage.setItem('columnManagerCurrentTab', currentTab);\n }\n getActiveTab(): void {\n this.activeTab = sessionStorage.getItem('columnManagerCurrentTab');\n }\n}\n","\n

    \n Manage Columns\n \n

    \n\n\n \n \n
    \n
    \n \n
    \n\n
    \n \n
    \n
    \n
    \n\n \n \n
    \n \n \n
    \n \n
    \n
    \n\n \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n\n\n \n \n\n\n\n\n\n
    \n
    \n \n\n \n \n
    \n No columns matched '{{ searchTerm$ | async }}'. Please try another term.\n
    \n
    \n\n \n \n \n
    \n

    \n {{ columnGroup.name }}\n \n

    \n
      \n \n
    • \n 0\"\n (change)=\"setColumnVisibility(column.id, $event.checked)\"\n >\n {{ column.name }}\n \n
    • \n
      \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n\n\n\n
    \n
    Arrange Columns
    \n\n
    \n \n
    \n
    \n lock\n
    \n
    {{ column.name }}
    \n
    \n\n \n
    \n \n
    \n drag_indicator\n
    \n\n
    \n {{ columnInfo.name }}\n
    \n
    \n {{ columnInfo.name }}\n
    \n
    \n \n
    \n\n
    \n
    \n
    \n\n \n
    \n
    \n lock\n
    \n
    {{ column.name }}
    \n
    \n
    \n \n
    \n","import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { ColumnDefinition, GroupDefinition, Pinned } from './advanced-column-organizer';\nimport { take } from 'rxjs/operators';\nimport { AdvancedColumnOrganizerComponent } from './advanced-column-organizer.compontent';\n\nexport interface DialogData {\n saveName: string | undefined;\n columnConfigs: ColumnDefinition[];\n groupConfigs: GroupDefinition[];\n useI18NTranslations: boolean;\n}\n\n@Component({\n selector: 'va-mat-table-advanced-column-organizer-button',\n template: '',\n})\nexport class AdvancedColumnOrganizerButtonComponent implements OnInit {\n @Input() saveName?: string;\n @Input() columnConfigs: ColumnDefinition[];\n @Input() groupConfigs: GroupDefinition[];\n @Input() useI18NTranslations?: boolean;\n @Output() columnsChange: EventEmitter = new EventEmitter();\n\n constructor(private dialog: MatDialog) {}\n\n ngOnInit(): void {\n this.emitInitialVisibleColumns();\n }\n\n emitInitialVisibleColumns(): void {\n window.requestAnimationFrame(() => {\n if (this.saveName) {\n const storedVisibleColumns: string | null = localStorage.getItem(`${this.saveName}-visible-column-ids`);\n if (storedVisibleColumns) {\n try {\n const visibleColumns: string[] = JSON.parse(storedVisibleColumns);\n if (visibleColumns) {\n this.columnsChange.emit(visibleColumns);\n return;\n }\n } catch (error) {\n console.error('Could not parse storedVisibleColumns', error);\n }\n }\n }\n if (this.columnConfigs) {\n const cols = this.columnConfigs\n .filter((col) => !col.hidden && col.pinned != Pinned.PINNED_LEFT && col.pinned != Pinned.PINNED_RIGHT)\n .map((col) => col.id);\n this.columnsChange.emit(cols);\n }\n });\n }\n\n openManager(): void {\n const dialogData: DialogData = {\n saveName: this.saveName,\n columnConfigs: this.columnConfigs,\n groupConfigs: this.groupConfigs,\n useI18NTranslations: !!this.useI18NTranslations,\n };\n const dialogRef = this.dialog.open(AdvancedColumnOrganizerComponent, {\n width: '800px',\n panelClass: 'advanced-column-organizer-panel',\n autoFocus: false,\n data: dialogData,\n });\n dialogRef\n .afterClosed()\n .pipe(take(1))\n .subscribe((save) => {\n if (save) {\n this.columnsChange.emit(dialogRef.componentInstance.selectedColumns);\n }\n });\n }\n}\n","import { Injectable } from '@angular/core';\n\nexport interface ColumnInfo {\n id: string;\n name?: string;\n hidden?: boolean;\n}\n\n@Injectable()\nexport class ColumnSorterService {\n loadSavedColumnInfo(columnInfo: ColumnInfo[], saveName?: string): ColumnInfo[] | undefined {\n // Only load if a save name is passed in\n if (saveName) {\n if (!localStorage) {\n return;\n }\n\n const loadedInfoJSON = localStorage.getItem(`${saveName}-columns`);\n\n // Found save data, validate the data\n if (loadedInfoJSON) {\n return this.validateSavedData(columnInfo, JSON.parse(loadedInfoJSON), saveName);\n }\n\n this.saveColumnInfo(columnInfo, saveName);\n }\n return columnInfo;\n }\n\n private validateSavedData(\n passedInColumns: ColumnInfo[],\n loadedColumns: ColumnInfo[],\n saveName?: string,\n ): ColumnInfo[] {\n // Check to make sure all columns are accounted for\n // This will add any new columns to the end of the list\n passedInColumns.forEach((col) => {\n const colFound = loadedColumns.find((searchCol) => searchCol.id === col.id);\n if (!colFound) {\n loadedColumns.push(col);\n } else {\n // Update the saved data\n colFound.name = col.name;\n }\n });\n\n // Remove any columns that are no longer present\n loadedColumns = loadedColumns.filter((col) => !!passedInColumns.find((searchCol) => searchCol.id === col.id));\n\n // Save the new set of columns\n this.saveColumnInfo(loadedColumns, saveName);\n\n return loadedColumns;\n }\n\n saveColumnInfo(columnInfo: ColumnInfo[], saveName?: string): void {\n // Only save if a save name is passed in\n if (saveName) {\n if (!localStorage) {\n return;\n }\n\n localStorage.setItem(`${saveName}-columns`, JSON.stringify(columnInfo));\n }\n }\n}\n","import { CdkDragDrop, moveItemInArray } from '@angular/cdk/drag-drop';\nimport { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnChanges,\n OnInit,\n Output,\n SimpleChanges,\n ViewEncapsulation,\n} from '@angular/core';\nimport { map, shareReplay } from 'rxjs';\nimport { ColumnInfo, ColumnSorterService } from './column-sorter.service';\n\nexport interface ColumnSorterColumn {\n columnId: string;\n columnName: string;\n hidden?: boolean;\n}\n\n@Component({\n selector: 'va-mat-table-column-sorter, button[va-mat-table-column-sorter]',\n templateUrl: './column-sorter.component.html',\n styleUrls: ['./column-sorter.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [ColumnSorterService],\n})\nexport class ColumnSorterComponent implements OnInit, OnChanges, AfterViewInit {\n @Output()\n columnsChange: EventEmitter = new EventEmitter();\n @Input() iconName = 'view_column';\n @Input() buttonLabel: string;\n @Input()\n columns: string[];\n @Input()\n columnNames: string[];\n @Input()\n columnConfigs: ColumnSorterColumn[];\n @Input()\n saveName?: string;\n @Input()\n useI18NTranslations?: boolean;\n\n columnInfo: ColumnInfo[] | undefined;\n\n private columnsUpdated = false;\n private columnNamesUpdated = false;\n\n readonly isMobile$ = this.breakpointObserver.observe(Breakpoints.Handset).pipe(\n map((result) => result.matches),\n shareReplay({ refCount: true, bufferSize: 1 }),\n );\n\n constructor(\n private elementRef: ElementRef,\n private columnSorterService: ColumnSorterService,\n private readonly breakpointObserver: BreakpointObserver,\n ) {}\n\n ngOnInit(): void {\n this.calculateColumnInformation();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.columns) {\n this.columnsUpdated = true;\n }\n if (changes.columnNames) {\n this.columnNamesUpdated = true;\n }\n if ((this.columnsUpdated && this.columnNamesUpdated) || !!changes.columnConfigs) {\n this.calculateColumnInformation();\n this.columnsUpdated = false;\n this.columnNamesUpdated = false;\n }\n }\n\n ngAfterViewInit(): void {\n this.elementRef.nativeElement.classList += 'va-mat-button-no-input';\n }\n\n private calculateColumnInformation(): void {\n // If the column config is passed in, use that else use the passed in columns and names\n if (this.columnConfigs) {\n this.columnInfo = this.columnConfigs.map((colConfig) => {\n return {\n id: colConfig.columnId,\n name: colConfig.columnName,\n hidden: !!colConfig.hidden,\n };\n });\n } else {\n this.columnInfo = this.columns.map((currElement, index) => {\n return {\n id: currElement,\n name: this.columnNames[index],\n hidden: false,\n };\n });\n }\n this.columnInfo = this.columnSorterService.loadSavedColumnInfo(this.columnInfo, this.saveName);\n this.emitColumns(false);\n }\n\n columnMenuDropped(event: CdkDragDrop): void {\n moveItemInArray(this.columnInfo!, event.item.data.columnIndex, event.currentIndex);\n this.emitColumns(true);\n }\n\n toggleSelectedColumn(columnId: string): void {\n const colFound = this.columnInfo!.find((col) => col.id === columnId)!;\n colFound.hidden = !colFound.hidden;\n this.emitColumns(true);\n }\n\n private emitColumns(saveColumns: boolean): void {\n // Only emit the columns on the next animation frame available\n window.requestAnimationFrame(() => {\n this.columnsChange.emit(this.columnInfo!.filter((colInfo) => !colInfo.hidden).map((colInfo) => colInfo.id));\n if (saveColumns) {\n this.columnSorterService.saveColumnInfo(this.columnInfo!, this.saveName);\n }\n });\n }\n}\n","\n\n\n
    \n \n drag_indicator\n \n \n \n\n \n drag_indicator\n \n \n \n \n
    \n \n
    \n\n \n {{ name | translate }}\n \n \n {{ name }}\n \n\n","import { Component, ChangeDetectionStrategy } from '@angular/core';\n\n/**\n * @deprecated Use `VaFilteredMatTableComponent`\n */\n@Component({\n selector: 'va-mat-table',\n templateUrl: './va-mat-table.component.html',\n styleUrls: ['./va-mat-table.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class VaMaterialTableComponent {}\n","
    \n \n
    \n\n","import { DragDropModule } from '@angular/cdk/drag-drop';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatCardModule } from '@angular/material/card';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatTableModule } from '@angular/material/table';\nimport { MatTabsModule } from '@angular/material/tabs';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatSortModule } from '@angular/material/sort';\nimport { LexiconModule } from '@galaxy/lexicon';\nimport { TranslateModule } from '@ngx-translate/core';\nimport baseTranslation from '../assets/i18n/en_devel.json';\nimport { WEBLATE_COMPONENT_NAME } from '../constants';\nimport { VaSearchBoxModule } from '../search-box/va-search-box.module';\nimport { AdvancedColumnOrganizerButtonComponent } from './actions/advanced-column-organizer/advanced-column-organizer-button.component';\nimport { AdvancedColumnOrganizerComponent } from './actions/advanced-column-organizer/advanced-column-organizer.compontent';\nimport { ColumnSorterComponent } from './actions/column-sorter/column-sorter.component';\nimport { VaMaterialTableComponent } from './va-mat-table.component';\n\n@NgModule({\n declarations: [\n VaMaterialTableComponent,\n ColumnSorterComponent,\n AdvancedColumnOrganizerButtonComponent,\n AdvancedColumnOrganizerComponent,\n ],\n imports: [\n CommonModule,\n MatTableModule,\n MatSortModule,\n MatButtonModule,\n MatIconModule,\n MatCardModule,\n DragDropModule,\n MatMenuModule,\n MatCheckboxModule,\n TranslateModule,\n LexiconModule.forChild({\n componentName: WEBLATE_COMPONENT_NAME,\n baseTranslation: baseTranslation,\n }),\n MatDialogModule,\n VaSearchBoxModule,\n MatTabsModule,\n ],\n exports: [\n VaMaterialTableComponent,\n ColumnSorterComponent,\n AdvancedColumnOrganizerComponent,\n AdvancedColumnOrganizerButtonComponent,\n ],\n})\nexport class VaMaterialTableModule {}\n","import * as i0 from '@angular/core';\nimport { Component, ViewEncapsulation, ChangeDetectionStrategy, inject, ApplicationRef, createComponent, EnvironmentInjector, ANIMATION_MODULE_TYPE, booleanAttribute, Directive, Optional, Inject, Input, NgModule } from '@angular/core';\nimport { MatCommonModule } from '@angular/material/core';\nimport * as i1 from '@angular/cdk/a11y';\nimport { InteractivityChecker, A11yModule } from '@angular/cdk/a11y';\nimport { DOCUMENT } from '@angular/common';\nlet nextId = 0;\nconst BADGE_CONTENT_CLASS = 'mat-badge-content';\n/** Keeps track of the apps currently containing badges. */\nconst badgeApps = /*#__PURE__*/new Set();\n/**\n * Component used to load the structural styles of the badge.\n * @docs-private\n */\nlet _MatBadgeStyleLoader = /*#__PURE__*/(() => {\n class _MatBadgeStyleLoader {\n static {\n this.ɵfac = function _MatBadgeStyleLoader_Factory(t) {\n return new (t || _MatBadgeStyleLoader)();\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: _MatBadgeStyleLoader,\n selectors: [[\"ng-component\"]],\n standalone: true,\n features: [i0.ɵɵStandaloneFeature],\n decls: 0,\n vars: 0,\n template: function _MatBadgeStyleLoader_Template(rf, ctx) {},\n styles: [\".mat-badge{position:relative}.mat-badge.mat-badge{overflow:visible}.mat-badge-content{position:absolute;text-align:center;display:inline-block;transition:transform 200ms ease-in-out;transform:scale(0.6);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;box-sizing:border-box;pointer-events:none;background-color:var(--mat-badge-background-color);color:var(--mat-badge-text-color);font-family:var(--mat-badge-text-font);font-weight:var(--mat-badge-text-weight);border-radius:var(--mat-badge-container-shape)}.cdk-high-contrast-active .mat-badge-content{outline:solid 1px;border-radius:0}.mat-badge-above .mat-badge-content{bottom:100%}.mat-badge-below .mat-badge-content{top:100%}.mat-badge-before .mat-badge-content{right:100%}[dir=rtl] .mat-badge-before .mat-badge-content{right:auto;left:100%}.mat-badge-after .mat-badge-content{left:100%}[dir=rtl] .mat-badge-after .mat-badge-content{left:auto;right:100%}.mat-badge-disabled .mat-badge-content{background-color:var(--mat-badge-disabled-state-background-color);color:var(--mat-badge-disabled-state-text-color)}.mat-badge-hidden .mat-badge-content{display:none}.ng-animate-disabled .mat-badge-content,.mat-badge-content._mat-animation-noopable{transition:none}.mat-badge-content.mat-badge-active{transform:none}.mat-badge-small .mat-badge-content{width:var(--mat-badge-legacy-small-size-container-size, unset);height:var(--mat-badge-legacy-small-size-container-size, unset);min-width:var(--mat-badge-small-size-container-size, unset);min-height:var(--mat-badge-small-size-container-size, unset);line-height:var(--mat-badge-legacy-small-size-container-size, var(--mat-badge-small-size-container-size));padding:var(--mat-badge-small-size-container-padding);font-size:var(--mat-badge-small-size-text-size);margin:var(--mat-badge-small-size-container-offset)}.mat-badge-small.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-small-size-container-overlap-offset)}.mat-badge-medium .mat-badge-content{width:var(--mat-badge-legacy-container-size, unset);height:var(--mat-badge-legacy-container-size, unset);min-width:var(--mat-badge-container-size, unset);min-height:var(--mat-badge-container-size, unset);line-height:var(--mat-badge-legacy-container-size, var(--mat-badge-container-size));padding:var(--mat-badge-container-padding);font-size:var(--mat-badge-text-size);margin:var(--mat-badge-container-offset)}.mat-badge-medium.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-container-overlap-offset)}.mat-badge-large .mat-badge-content{width:var(--mat-badge-legacy-large-size-container-size, unset);height:var(--mat-badge-legacy-large-size-container-size, unset);min-width:var(--mat-badge-large-size-container-size, unset);min-height:var(--mat-badge-large-size-container-size, unset);line-height:var(--mat-badge-legacy-large-size-container-size, var(--mat-badge-large-size-container-size));padding:var(--mat-badge-large-size-container-padding);font-size:var(--mat-badge-large-size-text-size);margin:var(--mat-badge-large-size-container-offset)}.mat-badge-large.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-large-size-container-overlap-offset)}\"],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return _MatBadgeStyleLoader;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/** Directive to display a text badge. */\nlet MatBadge = /*#__PURE__*/(() => {\n class MatBadge {\n /** The color of the badge. Can be `primary`, `accent`, or `warn`. */\n get color() {\n return this._color;\n }\n set color(value) {\n this._setColor(value);\n this._color = value;\n }\n /** The content for the badge */\n get content() {\n return this._content;\n }\n set content(newContent) {\n this._updateRenderedContent(newContent);\n }\n /** Message used to describe the decorated element via aria-describedby */\n get description() {\n return this._description;\n }\n set description(newDescription) {\n this._updateDescription(newDescription);\n }\n constructor(_ngZone, _elementRef, _ariaDescriber, _renderer, _animationMode) {\n this._ngZone = _ngZone;\n this._elementRef = _elementRef;\n this._ariaDescriber = _ariaDescriber;\n this._renderer = _renderer;\n this._animationMode = _animationMode;\n this._color = 'primary';\n /** Whether the badge should overlap its contents or not */\n this.overlap = true;\n /**\n * Position the badge should reside.\n * Accepts any combination of 'above'|'below' and 'before'|'after'\n */\n this.position = 'above after';\n /** Size of the badge. Can be 'small', 'medium', or 'large'. */\n this.size = 'medium';\n /** Unique id for the badge */\n this._id = nextId++;\n /** Whether the OnInit lifecycle hook has run yet */\n this._isInitialized = false;\n /** InteractivityChecker to determine if the badge host is focusable. */\n this._interactivityChecker = inject(InteractivityChecker);\n this._document = inject(DOCUMENT);\n const appRef = inject(ApplicationRef);\n if (!badgeApps.has(appRef)) {\n badgeApps.add(appRef);\n const componentRef = createComponent(_MatBadgeStyleLoader, {\n environmentInjector: inject(EnvironmentInjector)\n });\n appRef.onDestroy(() => {\n badgeApps.delete(appRef);\n if (badgeApps.size === 0) {\n componentRef.destroy();\n }\n });\n }\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n const nativeElement = _elementRef.nativeElement;\n if (nativeElement.nodeType !== nativeElement.ELEMENT_NODE) {\n throw Error('matBadge must be attached to an element node.');\n }\n const matIconTagName = 'mat-icon';\n // Heads-up for developers to avoid putting matBadge on \n // as it is aria-hidden by default docs mention this at:\n // https://material.angular.io/components/badge/overview#accessibility\n if (nativeElement.tagName.toLowerCase() === matIconTagName && nativeElement.getAttribute('aria-hidden') === 'true') {\n console.warn(`Detected a matBadge on an \"aria-hidden\" \"\". ` + `Consider setting aria-hidden=\"false\" in order to surface the information assistive technology.` + `\\n${nativeElement.outerHTML}`);\n }\n }\n }\n /** Whether the badge is above the host or not */\n isAbove() {\n return this.position.indexOf('below') === -1;\n }\n /** Whether the badge is after the host or not */\n isAfter() {\n return this.position.indexOf('before') === -1;\n }\n /**\n * Gets the element into which the badge's content is being rendered. Undefined if the element\n * hasn't been created (e.g. if the badge doesn't have content).\n */\n getBadgeElement() {\n return this._badgeElement;\n }\n ngOnInit() {\n // We may have server-side rendered badge that we need to clear.\n // We need to do this in ngOnInit because the full content of the component\n // on which the badge is attached won't necessarily be in the DOM until this point.\n this._clearExistingBadges();\n if (this.content && !this._badgeElement) {\n this._badgeElement = this._createBadgeElement();\n this._updateRenderedContent(this.content);\n }\n this._isInitialized = true;\n }\n ngOnDestroy() {\n // ViewEngine only: when creating a badge through the Renderer, Angular remembers its index.\n // We have to destroy it ourselves, otherwise it'll be retained in memory.\n if (this._renderer.destroyNode) {\n this._renderer.destroyNode(this._badgeElement);\n this._inlineBadgeDescription?.remove();\n }\n this._ariaDescriber.removeDescription(this._elementRef.nativeElement, this.description);\n }\n /** Gets whether the badge's host element is interactive. */\n _isHostInteractive() {\n // Ignore visibility since it requires an expensive style caluclation.\n return this._interactivityChecker.isFocusable(this._elementRef.nativeElement, {\n ignoreVisibility: true\n });\n }\n /** Creates the badge element */\n _createBadgeElement() {\n const badgeElement = this._renderer.createElement('span');\n const activeClass = 'mat-badge-active';\n badgeElement.setAttribute('id', `mat-badge-content-${this._id}`);\n // The badge is aria-hidden because we don't want it to appear in the page's navigation\n // flow. Instead, we use the badge to describe the decorated element with aria-describedby.\n badgeElement.setAttribute('aria-hidden', 'true');\n badgeElement.classList.add(BADGE_CONTENT_CLASS);\n if (this._animationMode === 'NoopAnimations') {\n badgeElement.classList.add('_mat-animation-noopable');\n }\n this._elementRef.nativeElement.appendChild(badgeElement);\n // animate in after insertion\n if (typeof requestAnimationFrame === 'function' && this._animationMode !== 'NoopAnimations') {\n this._ngZone.runOutsideAngular(() => {\n requestAnimationFrame(() => {\n badgeElement.classList.add(activeClass);\n });\n });\n } else {\n badgeElement.classList.add(activeClass);\n }\n return badgeElement;\n }\n /** Update the text content of the badge element in the DOM, creating the element if necessary. */\n _updateRenderedContent(newContent) {\n const newContentNormalized = `${newContent ?? ''}`.trim();\n // Don't create the badge element if the directive isn't initialized because we want to\n // append the badge element to the *end* of the host element's content for backwards\n // compatibility.\n if (this._isInitialized && newContentNormalized && !this._badgeElement) {\n this._badgeElement = this._createBadgeElement();\n }\n if (this._badgeElement) {\n this._badgeElement.textContent = newContentNormalized;\n }\n this._content = newContentNormalized;\n }\n /** Updates the host element's aria description via AriaDescriber. */\n _updateDescription(newDescription) {\n // Always start by removing the aria-describedby; we will add a new one if necessary.\n this._ariaDescriber.removeDescription(this._elementRef.nativeElement, this.description);\n // NOTE: We only check whether the host is interactive here, which happens during\n // when then badge content changes. It is possible that the host changes\n // interactivity status separate from one of these. However, watching the interactivity\n // status of the host would require a `MutationObserver`, which is likely more code + overhead\n // than it's worth; from usages inside Google, we see that the vats majority of badges either\n // never change interactivity, or also set `matBadgeHidden` based on the same condition.\n if (!newDescription || this._isHostInteractive()) {\n this._removeInlineDescription();\n }\n this._description = newDescription;\n // We don't add `aria-describedby` for non-interactive hosts elements because we\n // instead insert the description inline.\n if (this._isHostInteractive()) {\n this._ariaDescriber.describe(this._elementRef.nativeElement, newDescription);\n } else {\n this._updateInlineDescription();\n }\n }\n _updateInlineDescription() {\n // Create the inline description element if it doesn't exist\n if (!this._inlineBadgeDescription) {\n this._inlineBadgeDescription = this._document.createElement('span');\n this._inlineBadgeDescription.classList.add('cdk-visually-hidden');\n }\n this._inlineBadgeDescription.textContent = this.description;\n this._badgeElement?.appendChild(this._inlineBadgeDescription);\n }\n _removeInlineDescription() {\n this._inlineBadgeDescription?.remove();\n this._inlineBadgeDescription = undefined;\n }\n /** Adds css theme class given the color to the component host */\n _setColor(colorPalette) {\n const classList = this._elementRef.nativeElement.classList;\n classList.remove(`mat-badge-${this._color}`);\n if (colorPalette) {\n classList.add(`mat-badge-${colorPalette}`);\n }\n }\n /** Clears any existing badges that might be left over from server-side rendering. */\n _clearExistingBadges() {\n // Only check direct children of this host element in order to avoid deleting\n // any badges that might exist in descendant elements.\n const badges = this._elementRef.nativeElement.querySelectorAll(`:scope > .${BADGE_CONTENT_CLASS}`);\n for (const badgeElement of Array.from(badges)) {\n if (badgeElement !== this._badgeElement) {\n badgeElement.remove();\n }\n }\n }\n static {\n this.ɵfac = function MatBadge_Factory(t) {\n return new (t || MatBadge)(i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1.AriaDescriber), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(ANIMATION_MODULE_TYPE, 8));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: MatBadge,\n selectors: [[\"\", \"matBadge\", \"\"]],\n hostAttrs: [1, \"mat-badge\"],\n hostVars: 20,\n hostBindings: function MatBadge_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵclassProp(\"mat-badge-overlap\", ctx.overlap)(\"mat-badge-above\", ctx.isAbove())(\"mat-badge-below\", !ctx.isAbove())(\"mat-badge-before\", !ctx.isAfter())(\"mat-badge-after\", ctx.isAfter())(\"mat-badge-small\", ctx.size === \"small\")(\"mat-badge-medium\", ctx.size === \"medium\")(\"mat-badge-large\", ctx.size === \"large\")(\"mat-badge-hidden\", ctx.hidden || !ctx.content)(\"mat-badge-disabled\", ctx.disabled);\n }\n },\n inputs: {\n color: [i0.ɵɵInputFlags.None, \"matBadgeColor\", \"color\"],\n overlap: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"matBadgeOverlap\", \"overlap\", booleanAttribute],\n disabled: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"matBadgeDisabled\", \"disabled\", booleanAttribute],\n position: [i0.ɵɵInputFlags.None, \"matBadgePosition\", \"position\"],\n content: [i0.ɵɵInputFlags.None, \"matBadge\", \"content\"],\n description: [i0.ɵɵInputFlags.None, \"matBadgeDescription\", \"description\"],\n size: [i0.ɵɵInputFlags.None, \"matBadgeSize\", \"size\"],\n hidden: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"matBadgeHidden\", \"hidden\", booleanAttribute]\n },\n standalone: true,\n features: [i0.ɵɵInputTransformsFeature]\n });\n }\n }\n return MatBadge;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet MatBadgeModule = /*#__PURE__*/(() => {\n class MatBadgeModule {\n static {\n this.ɵfac = function MatBadgeModule_Factory(t) {\n return new (t || MatBadgeModule)();\n };\n }\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: MatBadgeModule\n });\n }\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [A11yModule, MatCommonModule, MatCommonModule]\n });\n }\n }\n return MatBadgeModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MatBadge, MatBadgeModule };\n","import { Component, Input, ChangeDetectionStrategy } from '@angular/core';\n\n@Component({\n selector: 'va-status-banner',\n templateUrl: './va-status-banner.component.html',\n styleUrls: ['./va-status-banner.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class VaStatusBannerComponent {\n @Input() statusTitle: string;\n @Input() statusText: string;\n @Input() type: string;\n @Input() border = true;\n @Input() actionTitle: string;\n @Input() actionCallback: () => void;\n}\n","\n
    \n \n {{ type === 'warn' ? 'warning' : 'info outline' }}\n \n {{ statusTitle }}\n {{ statusText }}\n
    \n \n\n","import { NgModule } from '@angular/core';\nimport { MatIconModule } from '@angular/material/icon';\nimport { VaStatusBannerComponent } from './va-status-banner.component';\nimport { CommonModule } from '@angular/common';\n\n@NgModule({\n declarations: [VaStatusBannerComponent],\n imports: [CommonModule, MatIconModule],\n exports: [VaStatusBannerComponent],\n})\nexport class VaStatusBannerModule {}\n","import { Component, Input, OnInit } from '@angular/core';\n\n@Component({\n selector: 'uikit-list-stencil',\n template: `\n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n `,\n styles: [\n `\n .list-container {\n padding: 0;\n }\n .list-header {\n height: 40px;\n }\n .list-item-row {\n height: 50px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n `,\n ],\n})\nexport class ListStencilComponent implements OnInit {\n @Input() showHeader = true;\n @Input() numRows = 3;\n @Input() rowHeight = '51px'; // defaults to height of partner center business tab height (95px for marketplace)\n @Input() sidePadding = '17px'; // defaults to padding on partner center business padding (38px for marketplace)\n @Input() matElevation = 'mat-elevation-z2';\n\n rows: number[] = []; // this is to turn the number of rows into an arbitrary list so we can loop through them\n listItemRowStyles: any;\n\n ngOnInit(): void {\n for (let n = 0; n < this.numRows; n++) {\n this.rows.push(n);\n }\n\n // if you think this is gross i agree\n // if you think this is gross and actually have a solution hit me up otherwise just enjoy the magic.\n // determine the height of each row for the table\n\n this.listItemRowStyles = {\n height: `${this.rowHeight}`,\n padding: `0 ${this.sidePadding}`,\n };\n }\n}\n","import { NgModule } from '@angular/core';\nimport { MatCardModule } from '@angular/material/card';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatExpansionModule } from '@angular/material/expansion';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatSelectModule } from '@angular/material/select';\nimport { CommonModule } from '@angular/common';\n\nimport { CardStencilComponent } from './card-stencil.component';\nimport { CardListStencilComponent } from './card-list-stencil.component';\nimport { SearchBarStencilComponent } from './search-bar-stencil.component';\nimport { ListStencilComponent } from './list-stencil.component';\n\n@NgModule({\n imports: [\n CommonModule,\n MatCardModule,\n MatIconModule,\n MatInputModule,\n MatSelectModule,\n MatExpansionModule,\n MatCheckboxModule,\n ],\n declarations: [CardStencilComponent, CardListStencilComponent, SearchBarStencilComponent, ListStencilComponent],\n exports: [CardStencilComponent, CardListStencilComponent, SearchBarStencilComponent, ListStencilComponent],\n})\nexport class VaStencilsModule {}\n","import { Component, ChangeDetectionStrategy, Input } from '@angular/core';\nimport { Button } from './va-button';\nimport { ConfigurableUi } from '../../configurable-ui';\n\n@Component({\n selector: 'va-button',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n \n \n \n {{ config.title }}\n \n \n {{ config.title }}\n \n \n \n {{ config.icon }}\n \n \n \n \n \n \n \n \n {{ config.title }}\n \n \n {{ config.title }}\n \n \n \n \n {{ config.icon }}\n \n \n \n \n \n \n \n {{ config.title }}\n \n \n {{ config.title }}\n \n \n \n {{ config.icon }}\n \n \n \n \n \n `,\n})\nexport class VaButtonComponent implements ConfigurableUi {\n @Input() config: Button | Button[];\n\n get buttons(): Button[] {\n if (Array.isArray(this.config)) {\n return this.config;\n } else {\n return [this.config];\n }\n }\n\n clicked(button: Button): void {\n if (button.onClick) {\n button.onClick();\n }\n }\n}\n","import { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { VaIconModule } from '../../va-icon/icon.module';\nimport { VaButtonComponent } from './va-button.component';\nimport { GalaxyTooltipModule } from '@vendasta/galaxy/tooltip';\n\n@NgModule({\n imports: [\n CommonModule,\n RouterModule,\n VaIconModule,\n MatIconModule,\n MatTooltipModule,\n MatButtonModule,\n GalaxyTooltipModule,\n ],\n declarations: [VaButtonComponent],\n exports: [VaButtonComponent],\n})\nexport class VaButtonModule {}\n","import { Component, ChangeDetectionStrategy, Input } from '@angular/core';\nimport { Checkbox } from './va-checkbox';\n\n@Component({\n selector: 'va-checkbox',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n \n `,\n})\nexport class VaCheckboxComponent {\n @Input() config: Checkbox;\n}\n","import { CommonModule } from '@angular/common';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { NgModule } from '@angular/core';\nimport { VaCheckboxComponent } from './va-checkbox.component';\n\n@NgModule({\n imports: [CommonModule, MatCheckboxModule],\n declarations: [VaCheckboxComponent],\n exports: [VaCheckboxComponent],\n})\nexport class VaCheckboxModule {}\n","import { Component, Input } from '@angular/core';\nimport { Chip } from './va-chip';\n\n@Component({\n template: `\n \n \n {{ config.text }}\n \n \n `,\n})\nexport class VaChipComponent {\n @Input() config: Chip;\n}\n","import { CommonModule } from '@angular/common';\nimport { MatChipsModule } from '@angular/material/chips';\nimport { NgModule } from '@angular/core';\nimport { VaChipComponent } from './va-chip.component';\n\n@NgModule({\n imports: [CommonModule, MatChipsModule],\n declarations: [VaChipComponent],\n exports: [VaChipComponent],\n})\nexport class VaChipModule {}\n","import {\n ComponentFactoryResolver,\n ComponentRef,\n Directive,\n Input,\n OnChanges,\n OnInit,\n ViewContainerRef,\n} from '@angular/core';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[expandedView]',\n})\nexport class VaExpandDirective implements OnChanges, OnInit {\n @Input() item: any;\n @Input() view: any;\n\n component: ComponentRef;\n\n constructor(private resolver: ComponentFactoryResolver, private container: ViewContainerRef) {}\n\n ngOnChanges(): void {\n if (this.component) {\n this.component.instance.item = this.item;\n this.component.instance.view = this.view;\n }\n }\n\n ngOnInit(): void {\n const component = this.resolver.resolveComponentFactory(this.view);\n this.component = this.container.createComponent(component);\n this.component.instance.item = this.item;\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { VaExpandDirective } from './va-expand.directive';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [VaExpandDirective],\n exports: [VaExpandDirective],\n})\nexport class VaExpandModule {}\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { Menu, MenuItem } from './va-menu';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n styles: [\n `\n hr {\n width: unset;\n margin: 0;\n border: 0;\n border-top: 1px solid #e0e0e0;\n }\n ::ng-deep .mat-mdc-menu-content {\n padding-top: unset;\n padding-bottom: unset;\n }\n .menu-item {\n display: flex;\n align-items: center;\n }\n span.menu-item-text {\n flex-grow: 1;\n }\n mat-icon.right-icon {\n margin-right: 0;\n }\n .container {\n display: flex;\n align-items: center;\n gap: 8px;\n }\n `,\n ],\n template: `\n
    \n {{ title }}\n \n
    \n \n \n
    \n \n {{ menu.leftIcon }}\n \n {{ menu.text }}\n {{ menu.rightIcon }}\n \n \n {{ menu.leftIcon }}\n \n {{ menu.text }}\n {{ menu.rightIcon }}\n \n \n {{ menu.leftIcon }}\n \n {{ menu.text }}\n {{ menu.rightIcon }}\n \n
    \n
    \n `,\n})\nexport class VaMenuComponent {\n @Input() config: Menu;\n\n onClick(menuItem: MenuItem): void {\n if (menuItem.click) {\n menuItem.click();\n }\n }\n\n get triggerIcon(): string {\n return this.config.triggerIcon ? this.config.triggerIcon : 'more_vert';\n }\n\n get title(): string {\n return this.config.title ? this.config.title : '';\n }\n}\n","import { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { GalaxyTooltipModule } from '@vendasta/galaxy/tooltip';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { VaIconModule } from '../../va-icon/icon.module';\nimport { VaMenuComponent } from './va-menu.component';\n\n@NgModule({\n imports: [\n CommonModule,\n RouterModule,\n VaIconModule,\n MatIconModule,\n MatMenuModule,\n MatButtonModule,\n MatIconModule,\n GalaxyTooltipModule,\n ],\n declarations: [VaMenuComponent],\n exports: [VaMenuComponent],\n})\nexport class VaMenuModule {}\n","import { Component, Input } from '@angular/core';\nimport { Multiline } from './va-multiline';\n\n@Component({\n styleUrls: ['./va-multiline.component.scss'],\n template: `\n {{ config.title }}\n \n \n {{ config.title }}\n \n \n {{ config.title }}\n \n \n \n {{ config?.subtitle }}\n \n {{ config?.description }}\n `,\n})\nexport class VaMultilineComponent {\n @Input() config: Multiline;\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { VaMultilineComponent } from './va-multiline.component';\n\n@NgModule({\n imports: [CommonModule, RouterModule],\n declarations: [VaMultilineComponent],\n exports: [VaMultilineComponent],\n})\nexport class VaMultilineModule {}\n","import { Component, ChangeDetectionStrategy, Input } from '@angular/core';\nimport { ConfigurableUi } from '../../configurable-ui';\nimport { Switch } from './va-switch';\n\n@Component({\n selector: 'va-switch',\n changeDetection: ChangeDetectionStrategy.OnPush,\n styles: [\n `\n :host {\n display: flex;\n align-items: flex-start;\n }\n `,\n ],\n template: `\n \n {{ toggle.checked ? 'On' : 'Off' }}\n \n `,\n})\nexport class VaSwitchComponent implements ConfigurableUi {\n @Input() config: Switch;\n}\n","import { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { VaSwitchComponent } from './va-switch.component';\n\n@NgModule({\n imports: [CommonModule, MatSlideToggleModule],\n declarations: [VaSwitchComponent],\n exports: [VaSwitchComponent],\n})\nexport class VaSwitchModule {}\n","import { ComponentFactoryResolver, Directive, Input, OnInit, ViewContainerRef } from '@angular/core';\nimport { Cell } from './cell';\n\n@Directive({\n selector: '[vaCell]',\n})\nexport class CellDirective implements OnInit {\n @Input() cell: Cell;\n\n constructor(private resolver: ComponentFactoryResolver, private container: ViewContainerRef) {}\n\n ngOnInit(): void {\n const cf = this.resolver.resolveComponentFactory(this.cell.component);\n const c = this.container.createComponent(cf);\n c.instance.config = this.cell.config;\n }\n}\n","import { Observable, BehaviorSubject } from 'rxjs';\nimport { distinctUntilChanged, map } from 'rxjs/operators';\n\nimport { Cell } from './cells/cell';\n\nexport type RowStatusColor = 'blue' | 'green' | 'black' | 'red';\n\nexport interface ExpandRowView {\n item?: T;\n}\n\nexport interface SelectDescriptor {\n selectable: boolean;\n selectedItems?: T[];\n selectionChanged?: (selected: T[]) => void;\n selectAll?: boolean;\n}\n\nexport interface TableViewConfig {\n columns: ColumnDescriptor[];\n emptyText?: string;\n errorText?: string;\n rowStatusColorFor?: (item: T) => RowStatusColor;\n selection?: SelectDescriptor;\n loadMoreItemsTriggered?: () => void;\n loadMoreButtonText?: string;\n showLoadMoreButton?: boolean;\n fixedTable?: boolean;\n}\n\nexport interface ColumnConfig {\n minWidth?: number | string;\n maxWidth?: number | string;\n width?: string;\n}\n\nexport type ColumnAlignment = 'right' | 'left' | 'center';\n\nexport interface ColumnDescriptor {\n title: string;\n cellForItem: (item: T) => string | Cell;\n sortOn?: string;\n alignment?: ColumnAlignment;\n config?: ColumnConfig;\n hidden?: boolean;\n}\n\nexport class TableViewModel {\n private columns: ColumnDescriptor[];\n rowStatusColorFor?: (item: T) => RowStatusColor;\n emptyText = 'No results found.';\n loadMoreItemsTriggered?: () => void;\n loadMoreButtonText = 'Load More';\n fixedTable: boolean;\n showLoadMoreButton = false;\n selection?: SelectDescriptor;\n\n private store$ = new BehaviorSubject>({ columns: [] });\n private store = this.store$.asObservable().pipe(distinctUntilChanged());\n\n select>(name: I): Observable[I]> {\n return this.store.pipe(map((state) => state[name]));\n }\n\n constructor(config: TableViewConfig) {\n if (config.columns) {\n this.columns = config.columns;\n }\n if (config.emptyText) {\n this.emptyText = config.emptyText;\n }\n if (config.rowStatusColorFor) {\n this.rowStatusColorFor = config.rowStatusColorFor;\n }\n if (config.loadMoreItemsTriggered) {\n this.loadMoreItemsTriggered = config.loadMoreItemsTriggered;\n }\n if (config.loadMoreButtonText) {\n this.loadMoreButtonText = config.loadMoreButtonText;\n }\n if (config.showLoadMoreButton) {\n this.showLoadMoreButton = config.showLoadMoreButton;\n }\n if (config.fixedTable) {\n this.fixedTable = config.fixedTable;\n }\n if (config.selection) {\n this.selection = config.selection;\n }\n const value = this.store$.value;\n this.store$.next({ ...value, columns: [...value.columns, ...config.columns] });\n }\n\n addColumn(column: ColumnDescriptor): void {\n const currentColumns = this.store$.value.columns;\n const updatedColumns = [...currentColumns, column];\n const value = this.store$.value;\n this.store$.next({ ...value, columns: updatedColumns });\n }\n\n columnExists(columnTitle: string): boolean {\n return this.getColumnIndexWithTitle(columnTitle) !== -1;\n }\n\n private getColumnIndexWithTitle(columnTitle: string): number {\n const currentColumns = this.store$.value.columns;\n for (let i = 0; i < currentColumns.length; i++) {\n if (currentColumns[i].title === columnTitle) {\n return i;\n }\n }\n return -1;\n }\n\n addColumnAtIndex(column: ColumnDescriptor, index: number): void {\n const currentColumns = this.store$.value.columns;\n const updatedColumns = [...currentColumns.slice(0, index), column, ...currentColumns.slice(index)];\n\n const value = this.store$.value;\n this.store$.next({ ...value, columns: updatedColumns });\n }\n\n updateColumnTitled(title: string, newValue: Partial>): void {\n const currentColumns = this.store$.value.columns;\n const updatedColumns = currentColumns.map((column) => {\n if (column.title !== title) {\n return column;\n }\n return Object.assign({}, column, newValue);\n });\n\n const value = this.store$.value;\n this.store$.next({ ...value, columns: updatedColumns });\n }\n\n updateColumnAtIndex(index: number, newValue: Partial>): void {\n const currentColumns = this.store$.value.columns;\n const updatedColumns = currentColumns.map((column, columnIndex) => {\n if (columnIndex !== index) {\n return column;\n }\n return Object.assign({}, column, newValue);\n });\n\n const value = this.store$.value;\n this.store$.next({ ...value, columns: updatedColumns });\n }\n\n removeColumnWithTitle(title: string): void {\n const currentColumns = this.store$.value.columns;\n const deleteIndex = this.getColumnIndexWithTitle(title);\n\n if (deleteIndex !== -1) {\n const updatedColumns = [...currentColumns.slice(0, deleteIndex), ...currentColumns.slice(deleteIndex + 1)];\n\n const value = this.store$.value;\n this.store$.next({ ...value, columns: updatedColumns });\n }\n }\n\n removeColumnAtIndex(index: number): void {\n const currentColumns = this.store$.value.columns;\n const updatedColumns = [...currentColumns.slice(0, index), ...currentColumns.slice(index + 1)];\n\n const value = this.store$.value;\n this.store$.next({ ...value, columns: updatedColumns });\n }\n\n toggleColumnWithTitle(title: string): void {\n const currentColumns = this.store$.value.columns;\n const columnIndex = this.getColumnIndexWithTitle(title);\n\n if (columnIndex !== -1) {\n currentColumns[columnIndex].hidden = !currentColumns[columnIndex].hidden;\n const value = this.store$.value;\n this.store$.next({ ...value, columns: currentColumns });\n }\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { SortOrder, SortDescriptor } from '../sort/sort';\nimport { Cell } from './cells/cell';\nimport { ColumnConfig, ColumnDescriptor, TableViewModel } from './table';\n\n@Pipe({ name: 'getSortingIndicatorClass' })\nexport class GetSortingIndicatorClassPipe implements PipeTransform {\n transform(fieldname: string, sort: SortDescriptor): string {\n if (sort?.fieldname === fieldname) {\n return sort.order === SortOrder.Ascending ? 'arrow_upward' : 'arrow_downward';\n }\n return 'arrow_upward';\n }\n}\n\n@Pipe({ name: 'asTextCell' })\nexport class AsTextCellPipe implements PipeTransform {\n transform(cell: Cell | string): string | null {\n return typeof cell === 'string' ? cell : null;\n }\n}\n\n@Pipe({ name: 'asObjectCell' })\nexport class AsObjectCellPipe implements PipeTransform {\n transform(cell: Cell | string): Cell | null {\n return typeof cell !== 'string' ? cell : null;\n }\n}\n\nfunction computeWidth(width: string | number | undefined): string | null {\n if (typeof width === 'number') {\n return width.toString() + 'px';\n } else if (typeof width === 'string') {\n return width;\n }\n return null;\n}\n\n@Pipe({ name: 'getMinWidth' })\nexport class GetMinWidthPipe implements PipeTransform {\n transform(config: ColumnConfig): string | null {\n return config ? computeWidth(config.minWidth) : null;\n }\n}\n\n@Pipe({ name: 'getMaxWidth' })\nexport class GetMaxWidthPipe implements PipeTransform {\n transform(config: ColumnConfig): string | null {\n return config ? computeWidth(config.maxWidth) : null;\n }\n}\n\n@Pipe({ name: 'rowStatusCss' })\nexport class RowStatusCssPipe implements PipeTransform {\n transform(item: T, tableViewModel: TableViewModel): any {\n const statusColor = tableViewModel.rowStatusColorFor ? tableViewModel.rowStatusColorFor(item) : null;\n if (!statusColor) {\n return { 'feed-item-status': true };\n }\n\n switch (statusColor) {\n case 'blue':\n return { 'feed-item-status feed-item-status--blue': true };\n case 'black':\n return { 'feed-item-status feed-item-status--black': true };\n case 'green':\n return { 'feed-item-status feed-item-status--green': true };\n case 'red':\n return { 'feed-item-status feed-item-status--red': true };\n default:\n return { 'feed-item-status feed-item-status--blue': true };\n }\n }\n}\n\n@Pipe({ name: 'textDirection' })\nexport class TextDirectionPipe implements PipeTransform {\n transform(column: ColumnDescriptor): string {\n if (column.alignment) {\n if (column.alignment === 'left') {\n return 'flex-start';\n } else if (column.alignment === 'center') {\n return 'center';\n } else {\n return 'flex-end';\n }\n } else {\n return 'flex-start';\n }\n }\n}\n\n@Pipe({ name: 'isSortedProperty' })\nexport class IsSortedPropertyPipe implements PipeTransform {\n transform(column: ColumnDescriptor, sort: SortDescriptor): boolean {\n return sort?.fieldname === column?.sortOn;\n }\n}\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { SortDescriptor, SortOrder } from '../sort/sort';\nimport { Checkbox } from '../wrappers/va-checkbox/va-checkbox';\nimport { ExpandView } from '../wrappers/va-expand/va-expand.interface';\nimport { ColumnDescriptor, TableViewModel } from './table';\n\n/**\n * @deprecated Use `VaFilteredMatTableComponent`\n */\n@Component({\n selector: 'va-table',\n changeDetection: ChangeDetectionStrategy.OnPush,\n styleUrls: ['./table.component.scss'],\n template: `\n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n {{ column.title | translate }}\n \n {{ column.sortOn | getSortingIndicatorClass : sort }}\n
    \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n\n \n\n
    \n
    {{ tableViewModel.emptyText }}
    \n \n \n
    \n `,\n})\nexport class TableComponent implements OnInit {\n @Input() items: T[];\n @Input() tableViewModel: TableViewModel;\n @Input() fixedLayout = false;\n @Input() expandRowView: ExpandView;\n @Input() sort: SortDescriptor;\n @Input() showLoadMore: boolean;\n @Input() loadingMore: boolean;\n @Input() sorting: boolean;\n @Output() sortChanged = new EventEmitter();\n\n private expandViewVisbleIndex = -1;\n\n columns$: Observable[]>;\n\n get numberOfAdditionalColumns(): number {\n let index = 0;\n if (this.tableViewModel.selection) {\n index++;\n }\n if (this.expandRowView) {\n index++;\n }\n return index;\n }\n\n get loading(): boolean {\n return !this.items;\n }\n\n get empty(): boolean {\n return this.items ? this.items.length === 0 : true;\n }\n\n loadMoreClicked(): void {\n if (this.tableViewModel.loadMoreItemsTriggered) {\n this.tableViewModel.loadMoreItemsTriggered();\n }\n }\n\n ngOnInit(): void {\n if (this.tableViewModel) {\n this.columns$ = this.tableViewModel.select('columns');\n }\n }\n\n getExpandButtonIcon(index: number): string {\n return index === this.expandViewVisbleIndex ? 'keyboard_arrow_up' : 'keyboard_arrow_down';\n }\n\n expandViewVisible(index: number): boolean {\n return index === this.expandViewVisbleIndex;\n }\n\n /*\n * Sort\n */\n\n public columnHeaderClicked(column: ColumnDescriptor): void {\n if (column.sortOn) {\n this.sortOnProperty(column.sortOn);\n this.sortChanged.emit(this.sort);\n }\n }\n\n private sortOnProperty(property: string): void {\n if (this.sort) {\n if (this.sort.fieldname === property) {\n this.sort.order = this.sort.order === SortOrder.Ascending ? SortOrder.Descending : SortOrder.Ascending;\n } else {\n this.sort.fieldname = property;\n this.sort.order = SortOrder.Ascending;\n }\n }\n }\n\n /*\n * Selection\n */\n get selectAllCheckbox(): Checkbox {\n if (\n !this.tableViewModel ||\n !this.tableViewModel.selection ||\n !this.tableViewModel.selection.selectedItems ||\n !this.items\n ) {\n return {\n onClick: (checked) => this.toggleSelectAll(checked),\n };\n }\n const numSelected = this.tableViewModel.selection.selectedItems.length;\n const numTotal = this.items.length;\n return {\n onClick: (checked) => this.toggleSelectAll(checked),\n checked: numSelected === numTotal,\n indeterminate: numSelected > 0 && numSelected < numTotal,\n };\n }\n\n checkboxFor(item: T): Checkbox {\n return {\n disabled: false,\n onClick: () => this.select(item),\n checked: this.isSelected(item),\n indeterminate: false,\n };\n }\n\n public toggleExpandViewVisible(index: number): void {\n if (this.expandViewVisbleIndex === index) {\n this.expandViewVisbleIndex = -1;\n } else {\n this.expandViewVisbleIndex = index;\n }\n }\n\n private isSelected(item: T): boolean {\n if (\n this.tableViewModel.selection &&\n this.tableViewModel.selection.selectedItems &&\n this.tableViewModel.selection.selectedItems.length > 0\n ) {\n return this.tableViewModel.selection.selectedItems.indexOf(item) > -1 ? true : false;\n }\n return false;\n }\n\n private toggleSelectAll(checked: boolean): void {\n if (checked) {\n this.tableViewModel.selection!.selectedItems = [...this.items];\n } else {\n this.tableViewModel.selection!.selectedItems = [];\n }\n this.selectionChanged();\n }\n\n private select(item: T): void {\n if (!this.tableViewModel.selection!.selectedItems) {\n this.tableViewModel.selection!.selectedItems = [];\n }\n const index = this.tableViewModel.selection!.selectedItems.indexOf(item);\n if (index > -1) {\n this.tableViewModel.selection!.selectedItems.splice(index, 1);\n } else {\n this.tableViewModel.selection!.selectedItems.push(item);\n }\n this.selectionChanged();\n }\n\n private selectionChanged(): void {\n if (this.tableViewModel.selection!.selectionChanged) {\n this.tableViewModel.selection!.selectionChanged([...this.tableViewModel.selection!.selectedItems!]);\n }\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatCardModule } from '@angular/material/card';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatListModule } from '@angular/material/list';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\n\nimport { VaButtonModule } from '../wrappers/va-button/va-button.module';\nimport { VaCheckboxModule } from '../wrappers/va-checkbox/va-checkbox.module';\nimport { VaChipModule } from '../wrappers/va-chip/va-chip.module';\nimport { VaExpandModule } from '../wrappers/va-expand/va-expand.module';\nimport { VaMenuModule } from '../wrappers/va-menu/va-menu.module';\nimport { VaMultilineModule } from '../wrappers/va-multiline/va-multiline.module';\nimport { VaSwitchModule } from '../wrappers/va-switch/va-switch.module';\n\nimport { TranslateModule } from '@ngx-translate/core';\nimport { CellDirective } from './cells/cell.directive';\nimport { ColumnSelectorComponent } from './column-selector.component';\nimport { TableComponent } from './table.component';\nimport {\n AsObjectCellPipe,\n AsTextCellPipe,\n GetMaxWidthPipe,\n GetMinWidthPipe,\n GetSortingIndicatorClassPipe,\n IsSortedPropertyPipe,\n RowStatusCssPipe,\n TextDirectionPipe,\n} from './table.pipe';\n\n@NgModule({\n imports: [\n CommonModule,\n MatButtonModule,\n MatIconModule,\n MatProgressSpinnerModule,\n MatCheckboxModule,\n MatListModule,\n MatCardModule,\n VaButtonModule,\n VaCheckboxModule,\n VaExpandModule,\n VaMultilineModule,\n VaSwitchModule,\n VaMenuModule,\n VaChipModule,\n TranslateModule,\n ],\n declarations: [\n TableComponent,\n ColumnSelectorComponent,\n CellDirective,\n GetSortingIndicatorClassPipe,\n AsTextCellPipe,\n AsObjectCellPipe,\n GetMinWidthPipe,\n GetMaxWidthPipe,\n RowStatusCssPipe,\n TextDirectionPipe,\n IsSortedPropertyPipe,\n ],\n exports: [TableComponent, ColumnSelectorComponent],\n})\nexport class VaTableModule {}\n","import { Component, Inject } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { DomSanitizer } from '@angular/platform-browser';\nimport DOMPurify from 'dompurify';\n\n@Component({\n selector: 'va-cta-dialog',\n templateUrl: './get-pro-dialog.component.html',\n styleUrls: ['./get-pro-dialog.component.scss'],\n})\nexport class UpgradeCTADialogComponent {\n public isLoading = false;\n public hasActiveOrder = false;\n\n sanitizedSellingPoints: string[];\n\n constructor(\n public dialogRef: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) public config: UpgradeCTADialogConfig,\n private sanitizer: DomSanitizer,\n ) {\n this.sanitizedSellingPoints =\n this.config.keySellingPoints?.map((sellingPoint) => this.sanitizeSellingPoint(sellingPoint)) ?? [];\n }\n\n sanitizeSellingPoint(sellingPoint: string): string {\n return DOMPurify.sanitize(sellingPoint);\n }\n}\n\nexport interface UpgradeCTADialogConfig {\n imageText?: string;\n imageUrl?: string;\n editionName?: string;\n upgradeNowText?: string;\n price?: string;\n frequency?: string;\n keySellingPoints?: string[];\n templateSellingPoints?: TemplateSellingPoint[];\n ctaText?: string;\n activeOrderPrimaryText?: string;\n activeOrderSecondaryText?: string;\n activeOrderImageUrl?: string;\n}\n\nexport interface TemplateSellingPoint {\n text: string;\n template: object;\n}\n","
    \n \n
    \n \n
    \n \n \n
    \n
    \n
    {{ config.imageText | translate }}
    \n \n
    \n
    \n
    \n \n \n {{ config.editionName | translate }}\n \n \n
    \n {{ config.upgradeNowText | translate }}\n
    \n
    \n
    \n 10 }\">\n {{ config.price }}\n \n 10\n }\"\n >\n {{ config.frequency | translate }}\n \n
    \n
    \n
    \n check_circle_outline\n
    \n
    \n
    \n \n check_circle_outline\n {{ sellingPoint.text | translate: sellingPoint.template }}\n \n \n check_circle_outline\n {{ sellingPoint.text | translate }}\n \n
    \n
    \n \n
    \n
    \n
    \n \n
    \n \n \n {{ config.activeOrderPrimaryText | translate }}\n \n \n {{ config.activeOrderSecondaryText | translate }}\n \n
    \n
    \n
    \n
    \n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatChipsModule } from '@angular/material/chips';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { UpgradeCTADialogComponent } from './get-pro-dialog.component';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { LexiconModule } from '@galaxy/lexicon';\nimport baseTranslation from '../assets/i18n/en_devel.json';\nimport { WEBLATE_COMPONENT_NAME } from '../constants';\n\n@NgModule({\n imports: [\n CommonModule,\n MatDialogModule,\n MatIconModule,\n MatButtonModule,\n MatChipsModule,\n MatProgressSpinnerModule,\n TranslateModule,\n LexiconModule.forChild({\n componentName: WEBLATE_COMPONENT_NAME,\n baseTranslation: baseTranslation,\n }),\n ],\n exports: [UpgradeCTADialogComponent],\n declarations: [UpgradeCTADialogComponent],\n providers: [],\n})\nexport class UpgradeCTADialogModule {}\n","import { NgModule } from '@angular/core';\nimport { VaGoalTableComponent } from './goal-table.component';\nimport { MatCardModule } from '@angular/material/card';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatTableModule } from '@angular/material/table';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { VaCardsModule } from '../va-cards/va-cards.module';\nimport { CommonModule } from '@angular/common';\nimport { LexiconModule } from '@galaxy/lexicon';\nimport baseTranslation from '../assets/i18n/en_devel.json';\nimport { WEBLATE_COMPONENT_NAME } from '../constants';\n\n@NgModule({\n imports: [\n MatTableModule,\n TranslateModule,\n LexiconModule.forChild({\n componentName: WEBLATE_COMPONENT_NAME,\n baseTranslation: baseTranslation,\n }),\n VaCardsModule,\n CommonModule,\n MatCardModule,\n MatIconModule,\n ],\n exports: [VaGoalTableComponent],\n declarations: [VaGoalTableComponent],\n providers: [],\n})\nexport class VaGoalTableModule {}\n","import { Pipe, PipeTransform, SecurityContext } from '@angular/core';\nimport { DomSanitizer } from '@angular/platform-browser';\n\n@Pipe({ name: 'vaSanitize' })\nexport class VaSanitizePipe implements PipeTransform {\n constructor(private domSanitizer: DomSanitizer) {}\n\n transform(html: any): any {\n return this.domSanitizer.sanitize(SecurityContext.HTML, html);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { VaSanitizePipe } from './safe-html.pipe';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [VaSanitizePipe],\n exports: [VaSanitizePipe],\n})\nexport class VaSafeHtmlModule {}\n","import { NgIf } from '@angular/common';\nimport { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { VaLightboxConfig } from './lightbox.interface';\n\n/**\n * @deprecated Use {@link VaFullscreenLightboxService} instead.\n */\n@Component({\n selector: 'va-lightbox',\n templateUrl: 'lightbox.component.html',\n styleUrls: ['lightbox.component.scss'],\n standalone: true,\n imports: [NgIf, MatIconModule, MatButtonModule],\n})\nexport class VaLightboxComponent {\n @Input() useSrcSet = true;\n currentIndex: number;\n lightboxConfig: VaLightboxConfig;\n\n isVisible: boolean;\n\n @Output() closed: EventEmitter = new EventEmitter();\n\n open(config: VaLightboxConfig): void {\n this.lightboxConfig = config;\n this.currentIndex = config.index;\n this.isVisible = true;\n }\n\n getSrcSetForImage(image: string): string | null {\n if (!image) {\n return null;\n }\n return `${image}=s1360 1360w, ${image}=s680 680w`;\n }\n\n close(): void {\n this.isVisible = false;\n this.closed.emit();\n }\n\n previousImage(): void {\n const isFirstImage = this.currentIndex === 0;\n if (isFirstImage) {\n this.currentIndex = this.lightboxConfig.imageUrls.length - 1;\n } else {\n this.currentIndex--;\n }\n }\n\n nextImage(): void {\n const isLastImage = this.currentIndex === this.lightboxConfig.imageUrls.length - 1;\n if (isLastImage) {\n this.currentIndex = 0;\n } else {\n this.currentIndex++;\n }\n }\n}\n","\n
    \n
    \n \n
    \n \n \n
    \n \n
    \n
    \n \n
    \n\n","import { Dialog } from '@angular/cdk/dialog';\nimport { Injectable } from '@angular/core';\nimport { firstValueFrom } from 'rxjs';\nimport { VaLightboxComponent } from './lightbox.component';\nimport { VaLightboxConfig } from './lightbox.interface';\n\n@Injectable({ providedIn: 'root' })\nexport class VaFullscreenLightboxService {\n constructor(private readonly dialog: Dialog) {}\n\n async open(config: VaLightboxConfig): Promise {\n const ref = this.dialog.open(VaLightboxComponent, { data: config, height: '100%', width: '100%' });\n if (!ref.componentInstance) throw new Error('failed to load lightbox component');\n\n ref.componentInstance.open(config);\n await firstValueFrom(ref.componentInstance.closed.asObservable());\n ref.close();\n }\n}\n","import { NgForOf } from '@angular/common';\nimport { Component, Input } from '@angular/core';\nimport { VaFullscreenLightboxService } from '../lightbox/fullscreen-lightbox.service';\n\n@Component({\n selector: 'va-image-gallery',\n styleUrls: ['./image-gallery.component.scss'],\n template: `\n
    \n
    \n \n
    \n
    \n `,\n standalone: true,\n imports: [NgForOf],\n providers: [VaFullscreenLightboxService],\n})\nexport class VaImageGalleryComponent {\n @Input() imageUrls: string[];\n @Input() clickable = true;\n\n constructor(private lightbox: VaFullscreenLightboxService) {}\n\n getSrcsetImageUrls(imageUrl: string): string {\n return `${imageUrl}=s640 640w, ${imageUrl}=s1280 1280w, ${imageUrl}=s1920 1920w`;\n }\n\n onClick(index: number): void {\n if (this.clickable) {\n this.lightbox.open({ imageUrls: this.imageUrls, index: index });\n }\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { VaNavItemListComponent } from './nav-item-list.component';\n\n@NgModule({\n imports: [CommonModule, MatButtonModule, MatIconModule],\n declarations: [VaNavItemListComponent],\n exports: [VaNavItemListComponent],\n})\nexport class VaNavItemListModule {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { VaNavItemComponent } from './nav-item.component';\nimport { RouterModule } from '@angular/router';\n\n@NgModule({\n imports: [CommonModule, MatButtonModule, MatIconModule, RouterModule],\n declarations: [VaNavItemComponent],\n exports: [VaNavItemComponent],\n})\nexport class VaNavItemModule {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatSidenavModule } from '@angular/material/sidenav';\nimport { MatToolbarModule } from '@angular/material/toolbar';\nimport { VaNavComponent } from './nav.component';\n\n@NgModule({\n imports: [CommonModule, MatSidenavModule, MatButtonModule, MatToolbarModule, MatIconModule],\n declarations: [VaNavComponent],\n exports: [VaNavComponent],\n})\nexport class VaNavModule {}\n","import { Component, Directive, Output, EventEmitter, ElementRef, Input, HostListener } from '@angular/core';\n\n@Component({\n selector: 'va-nested-selector',\n template: `\n
    \n
    \n
    \n \n
    \n
    \n
    \n \n \n
    \n \n `,\n styles: [\n `\n .va-nested-selector {\n position: relative;\n }\n `,\n `\n .va-nested-selector-selector {\n background: #fff;\n border-radius: 2px;\n display: inline-block;\n position: absolute;\n width: 300px;\n box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);\n z-index: 10;\n }\n `,\n `\n .va-nested-selector-button {\n width: 200px;\n border-radius: 2px;\n background: #fff;\n color: #1880bf;\n border: 1px solid;\n cursor: pointer;\n padding: 5px;\n display: flex;\n }\n `,\n `\n .va-nested-selector-title {\n flex-grow: 1;\n }\n `,\n `\n .va-nested-selector-arrow {\n width: 15px;\n }\n `,\n `\n .va-nested-selector-max-height {\n overflow-y: auto;\n }\n `,\n ],\n})\nexport class VaNestedSelectorComponent {\n @Input() maxHeight: number;\n @Input() showSelector = false;\n @Output() showSelectorChange: EventEmitter = new EventEmitter();\n\n change(): void {\n this.showSelector = !this.showSelector;\n this.showSelectorChange.emit(this.showSelector);\n }\n\n hide(): void {\n this.showSelector = false;\n this.showSelectorChange.emit(this.showSelector);\n }\n}\n\n@Component({\n selector: 'va-nested-selector-title',\n template: `\n \n `,\n})\nexport class VaNestedSelectorTitleComponent {}\n\n@Component({\n selector: 'va-selector-nest',\n template: `\n \n `,\n})\nexport class VaNestedSelectorNestComponent {}\n\n@Component({\n selector: 'va-nested-selector-item',\n template: `\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n \n
    \n
    \n `,\n styles: [\n `\n .va-selector-content {\n flex-grow: 1;\n }\n `,\n `\n .va-selector-item {\n padding: 10px;\n width: 100%;\n cursor: pointer;\n display: flex;\n box-sizing: border-box;\n }\n `,\n `\n .va-selector-item:hover {\n background: #f6f6f6;\n }\n `,\n `\n .va-selector-nest {\n border-left: 10px solid #e1edf4;\n }\n `,\n `\n .va-selector-arrow {\n width: 15px;\n }\n `,\n ],\n})\nexport class VaNestedSelectorNestItemComponent {\n showNest = false;\n} // kebab selector should be a camel\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[hide-selector]',\n})\nexport class VaHideDirective {\n @Output() hideEvent: EventEmitter = new EventEmitter();\n\n constructor(private _eref: ElementRef) {}\n\n @HostListener('document: click', ['$event'])\n onClick(event: any): void {\n if (!this._eref.nativeElement.contains(event.target)) {\n this.hideEvent.emit(true);\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport {\n VaNestedSelectorComponent,\n VaNestedSelectorTitleComponent,\n VaNestedSelectorNestComponent,\n VaNestedSelectorNestItemComponent,\n VaHideDirective,\n} from './nested-selector';\n\n@NgModule({\n imports: [CommonModule],\n exports: [\n VaNestedSelectorComponent,\n VaNestedSelectorTitleComponent,\n VaNestedSelectorNestComponent,\n VaNestedSelectorNestItemComponent,\n VaHideDirective,\n ],\n declarations: [\n VaNestedSelectorComponent,\n VaNestedSelectorTitleComponent,\n VaNestedSelectorNestComponent,\n VaNestedSelectorNestItemComponent,\n VaHideDirective,\n ],\n})\nexport class VaNestedSelectorModule {}\n","import { Injectable } from '@angular/core';\nimport { Filters } from '../va-filter/filters/filter';\nimport { Breadcrumbs } from '../va-breadcrumbs/va-breadcrumbs';\nimport { Router, NavigationEnd } from '@angular/router';\nimport { BehaviorSubject, Subject, Observable } from 'rxjs';\nimport { map, filter, shareReplay } from 'rxjs/operators';\nimport { VaProductNavBadges } from './va-product-badges';\nimport { ActionButton } from './action-button';\nimport { VaProductNavItem } from './va-product-nav-item';\nimport { PageInformation } from './page-information';\n\n@Injectable()\nexport class VaProductNavService {\n private filters$$ = new BehaviorSubject(null);\n private infoSidebar$$ = new BehaviorSubject(null);\n private primaryActionButton$$ = new BehaviorSubject(null);\n private secondaryActionButton$$ = new BehaviorSubject(null);\n private breadcrumbs$$: BehaviorSubject = new BehaviorSubject([]);\n private navBadges$$: BehaviorSubject = new BehaviorSubject({});\n private search$$ = new BehaviorSubject(null);\n private showInfoIcon$$: BehaviorSubject = new BehaviorSubject(false);\n private _navItems: VaProductNavItem[];\n private scroll$$ = new BehaviorSubject(null);\n private toggleNav$$: Subject = new Subject();\n\n constructor(private router: Router) {}\n\n isSelected(navItem: VaProductNavItem, isChild: boolean): boolean {\n if (navItem.children && navItem.children.length > 0) {\n navItem.children.forEach((child) => (child.selected = this.isSelected(child, true)));\n return navItem.children.find((ch) => ch.selected) != null;\n } else {\n return this.router.isActive(navItem.url, isChild);\n }\n }\n\n setNavItems(navItems: VaProductNavItem[]): void {\n this._navItems = navItems;\n this.navItems.map((item) => {\n item.selected = this.isSelected(item, false);\n return item;\n });\n this.router.events\n .pipe(\n filter((event) => event instanceof NavigationEnd),\n map(() =>\n this.navItems.map((item) => {\n item.selected = this.isSelected(item, false);\n }),\n ),\n )\n .subscribe();\n }\n\n setFilters(filters: Filters | null): void {\n this.filters$$.next(filters);\n }\n\n setInfoSidebar(pageInfo: PageInformation | PageInformation[] | null): void {\n if (pageInfo === null) {\n pageInfo = [];\n } else if (!Array.isArray(pageInfo)) {\n pageInfo = [pageInfo];\n }\n this.infoSidebar$$.next(pageInfo);\n }\n\n setPrimaryActionButton(actionButton: ActionButton | null): void {\n this.primaryActionButton$$.next(actionButton);\n }\n\n setSecondaryActionButton(actionButton: ActionButton | null): void {\n this.secondaryActionButton$$.next(actionButton);\n }\n\n setBreadcrumbs(breadcrumbs: Breadcrumbs[]): void {\n this.breadcrumbs$$.next(breadcrumbs);\n }\n\n setNavBadges(navBadges: VaProductNavBadges): void {\n this.navBadges$$.next(navBadges);\n }\n\n setSearch(search: string | null): void {\n this.search$$.next(search);\n }\n\n setShowInfoIcon(flag: boolean): void {\n this.showInfoIcon$$.next(flag);\n }\n\n setScroll(scrollEvent: Event): void {\n this.scroll$$.next(scrollEvent);\n }\n\n toggleNav(): void {\n this.toggleNav$$.next(null);\n }\n\n get navItems(): VaProductNavItem[] {\n return this._navItems;\n }\n\n get breadcrumbs$(): Observable {\n return this.breadcrumbs$$.asObservable();\n }\n\n get primaryActionButton$(): Observable {\n return this.primaryActionButton$$.asObservable();\n }\n\n get secondaryActionButton$(): Observable {\n return this.secondaryActionButton$$.asObservable();\n }\n\n get infoSidebar$(): Observable {\n return this.infoSidebar$$.asObservable();\n }\n\n get filters$(): Observable {\n return this.filters$$.asObservable();\n }\n\n get navBadges$(): Observable {\n return this.navBadges$$.asObservable();\n }\n\n get search$(): Observable {\n return this.search$$.asObservable();\n }\n\n get showInfoIcon$(): Observable {\n return this.showInfoIcon$$.asObservable();\n }\n\n get scroll$(): Observable {\n return this.scroll$$.asObservable().pipe(shareReplay(1));\n }\n\n get toggleNav$(): Observable {\n return this.toggleNav$$.pipe(map((value) => value));\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ReplaySubject } from 'rxjs';\nimport { debounceTime, distinctUntilChanged, map, shareReplay } from 'rxjs/operators';\n\nexport interface Config {\n serviceProviderId: string;\n partnerId: string;\n marketId: string;\n accountId: string;\n groupPath?: string;\n appId: string;\n signOutNextUrl: string;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class AtlasConfigService {\n private config$$: ReplaySubject = new ReplaySubject(1);\n public config$ = this.config$$.asObservable().pipe(\n // Wait until changes stop before emitting\n debounceTime(10),\n // Check for changes based on actual contents rather than reference equality\n distinctUntilChanged((a, b) => JSON.stringify(a) === JSON.stringify(b)),\n shareReplay(1),\n );\n\n serviceProviderId$ = this.config$.pipe(\n map((config) => config.serviceProviderId),\n distinctUntilChanged(),\n shareReplay(1),\n );\n\n partnerId$ = this.config$.pipe(\n map((config) => config.partnerId),\n distinctUntilChanged(),\n shareReplay(1),\n );\n\n accountId$ = this.config$.pipe(\n map((config) => config.accountId),\n distinctUntilChanged(),\n shareReplay(1),\n );\n\n public initialize(\n serviceProviderId: string,\n partnerId: string,\n marketId: string,\n accountId: string,\n appId: string,\n signOutNextUrl: string,\n groupPath: string,\n ): void {\n this.config$$.next({\n serviceProviderId: serviceProviderId,\n partnerId: partnerId,\n marketId: marketId,\n accountId: accountId,\n groupPath: groupPath,\n appId: appId,\n signOutNextUrl: signOutNextUrl,\n });\n }\n}\n","import * as i0 from '@angular/core';\nimport { Injectable } from '@angular/core';\nimport * as i1 from '@angular/common/http';\nimport { HttpHeaders } from '@angular/common/http';\nimport { map } from 'rxjs/operators';\nconst environment = (window ? window['environment'] : 'prod') ?? 'prod';\nconst hostMap = {\n 'local': 'atlas-api.vendasta-local.com',\n 'test': '',\n 'demo': 'atlas-api-demo.apigateway.co',\n 'prod': 'atlas-api-prod.apigateway.co',\n 'production': 'atlas-api-prod.apigateway.co'\n};\nlet HostService = /*#__PURE__*/(() => {\n class HostService {\n get host() {\n return hostMap[environment.toLowerCase()];\n }\n get hostWithScheme() {\n return 'https://' + this.host;\n }\n }\n HostService.ɵfac = function HostService_Factory(t) {\n return new (t || HostService)();\n };\n HostService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: HostService,\n factory: HostService.ɵfac,\n providedIn: 'root'\n });\n return HostService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n// *********************************\n// Code generated by sdkgen\n// DO NOT EDIT!.\n//\n// Enums.\n// *********************************\nvar PlatformMode = /*#__PURE__*/function (PlatformMode) {\n PlatformMode[PlatformMode[\"WEB\"] = 0] = \"WEB\";\n PlatformMode[PlatformMode[\"MOBILE\"] = 1] = \"MOBILE\";\n return PlatformMode;\n}(PlatformMode || {});\nvar UITheme = /*#__PURE__*/function (UITheme) {\n UITheme[UITheme[\"UI_THEME_DARK\"] = 0] = \"UI_THEME_DARK\";\n UITheme[UITheme[\"UI_THEME_LIGHT\"] = 1] = \"UI_THEME_LIGHT\";\n return UITheme;\n}(UITheme || {});\nvar UserViewType = /*#__PURE__*/function (UserViewType) {\n UserViewType[UserViewType[\"USER_VIEW_TYPE_SMB\"] = 0] = \"USER_VIEW_TYPE_SMB\";\n UserViewType[UserViewType[\"USER_VIEW_TYPE_ADMIN\"] = 1] = \"USER_VIEW_TYPE_ADMIN\";\n return UserViewType;\n}(UserViewType || {});\n// *********************************\n// Code generated by sdkgen\n// DO NOT EDIT!.\n//\n// Enums Index.\n// *********************************\n\nfunction enumStringToValue$1(enumRef, value) {\n if (typeof value === 'number') {\n return value;\n }\n return enumRef[value];\n}\nclass Access {\n static fromProto(proto) {\n let m = new Access();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.scope !== 'undefined') {\n toReturn['scope'] = this.scope;\n }\n if (typeof this.public !== 'undefined') {\n toReturn['public'] = this.public;\n }\n return toReturn;\n }\n}\nfunction enumStringToValue(enumRef, value) {\n if (typeof value === 'number') {\n return value;\n }\n return enumRef[value];\n}\nclass AccountGroup {\n static fromProto(proto) {\n let m = new AccountGroup();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.accountGroupId !== 'undefined') {\n toReturn['accountGroupId'] = this.accountGroupId;\n }\n if (typeof this.name !== 'undefined') {\n toReturn['name'] = this.name;\n }\n if (typeof this.address !== 'undefined') {\n toReturn['address'] = this.address;\n }\n if (typeof this.activatedProductIds !== 'undefined') {\n toReturn['activatedProductIds'] = this.activatedProductIds;\n }\n if (typeof this.url !== 'undefined') {\n toReturn['url'] = this.url;\n }\n return toReturn;\n }\n}\nclass GetLocationsRequestAccountGroups {\n static fromProto(proto) {\n let m = new GetLocationsRequestAccountGroups();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.accountGroupIds !== 'undefined') {\n toReturn['accountGroupIds'] = this.accountGroupIds;\n }\n return toReturn;\n }\n}\nclass AssociatedLocationIDs {\n static fromProto(proto) {\n let m = new AssociatedLocationIDs();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.accountGroupIds !== 'undefined') {\n toReturn['accountGroupIds'] = this.accountGroupIds;\n }\n if (typeof this.groupPaths !== 'undefined') {\n toReturn['groupPaths'] = this.groupPaths;\n }\n return toReturn;\n }\n}\nclass Brand {\n static fromProto(proto) {\n let m = new Brand();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.name !== 'undefined') {\n toReturn['name'] = this.name;\n }\n if (typeof this.pathNodes !== 'undefined') {\n toReturn['pathNodes'] = this.pathNodes;\n }\n if (typeof this.hasAccess !== 'undefined') {\n toReturn['hasAccess'] = this.hasAccess;\n }\n if (typeof this.url !== 'undefined') {\n toReturn['url'] = this.url;\n }\n return toReturn;\n }\n}\nclass Branding {\n static fromProto(proto) {\n let m = new Branding();\n m = Object.assign(m, proto);\n if (proto.theme) {\n m.theme = enumStringToValue(UITheme, proto.theme);\n }\n if (proto.theming) {\n m.theming = Theming.fromProto(proto.theming);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.theme !== 'undefined') {\n toReturn['theme'] = this.theme;\n }\n if (typeof this.logoUrl !== 'undefined') {\n toReturn['logoUrl'] = this.logoUrl;\n }\n if (typeof this.partnerName !== 'undefined') {\n toReturn['partnerName'] = this.partnerName;\n }\n if (typeof this.centerName !== 'undefined') {\n toReturn['centerName'] = this.centerName;\n }\n if (typeof this.theming !== 'undefined' && this.theming !== null) {\n toReturn['theming'] = 'toApiJson' in this.theming ? this.theming.toApiJson() : this.theming;\n }\n if (typeof this.cobrandingLogoUrl !== 'undefined') {\n toReturn['cobrandingLogoUrl'] = this.cobrandingLogoUrl;\n }\n if (typeof this.marketName !== 'undefined') {\n toReturn['marketName'] = this.marketName;\n }\n return toReturn;\n }\n}\nclass CenterNavigationItem {\n static fromProto(proto) {\n let m = new CenterNavigationItem();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.name !== 'undefined') {\n toReturn['name'] = this.name;\n }\n if (typeof this.entryUrl !== 'undefined') {\n toReturn['entryUrl'] = this.entryUrl;\n }\n if (typeof this.centerId !== 'undefined') {\n toReturn['centerId'] = this.centerId;\n }\n return toReturn;\n }\n}\nclass ContactUsRequest {\n static fromProto(proto) {\n let m = new ContactUsRequest();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.accountGroupId !== 'undefined') {\n toReturn['accountGroupId'] = this.accountGroupId;\n }\n if (typeof this.message !== 'undefined') {\n toReturn['message'] = this.message;\n }\n return toReturn;\n }\n}\nclass DropdownItem {\n static fromProto(proto) {\n let m = new DropdownItem();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.url !== 'undefined') {\n toReturn['url'] = this.url;\n }\n if (typeof this.path !== 'undefined') {\n toReturn['path'] = this.path;\n }\n if (typeof this.translationId !== 'undefined') {\n toReturn['translationId'] = this.translationId;\n }\n if (typeof this.label !== 'undefined') {\n toReturn['label'] = this.label;\n }\n return toReturn;\n }\n}\nclass GetDataRequest {\n static fromProto(proto) {\n let m = new GetDataRequest();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.partnerId !== 'undefined') {\n toReturn['partnerId'] = this.partnerId;\n }\n if (typeof this.marketId !== 'undefined') {\n toReturn['marketId'] = this.marketId;\n }\n if (typeof this.accountGroupId !== 'undefined') {\n toReturn['accountGroupId'] = this.accountGroupId;\n }\n if (typeof this.signOutNextUrl !== 'undefined') {\n toReturn['signOutNextUrl'] = this.signOutNextUrl;\n }\n if (typeof this.groupPath !== 'undefined') {\n toReturn['groupPath'] = this.groupPath;\n }\n return toReturn;\n }\n}\nclass GetDataResponse {\n static fromProto(proto) {\n let m = new GetDataResponse();\n m = Object.assign(m, proto);\n if (proto.user) {\n m.user = proto.user.map(UserNavigationItem.fromProto);\n }\n if (proto.centers) {\n m.centers = proto.centers.map(CenterNavigationItem.fromProto);\n }\n if (proto.theme) {\n m.theme = enumStringToValue(UITheme, proto.theme);\n }\n if (proto.theming) {\n m.theming = Theming.fromProto(proto.theming);\n }\n if (proto.locationData) {\n m.locationData = LocationData.fromProto(proto.locationData);\n }\n if (proto.userSwitcherData) {\n m.userSwitcherData = proto.userSwitcherData.map(UserSwitcherData.fromProto);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.user !== 'undefined' && this.user !== null) {\n toReturn['user'] = 'toApiJson' in this.user ? this.user.toApiJson() : this.user;\n }\n if (typeof this.centers !== 'undefined' && this.centers !== null) {\n toReturn['centers'] = 'toApiJson' in this.centers ? this.centers.toApiJson() : this.centers;\n }\n if (typeof this.username !== 'undefined') {\n toReturn['username'] = this.username;\n }\n if (typeof this.email !== 'undefined') {\n toReturn['email'] = this.email;\n }\n if (typeof this.signOutUrl !== 'undefined') {\n toReturn['signOutUrl'] = this.signOutUrl;\n }\n if (typeof this.theme !== 'undefined') {\n toReturn['theme'] = this.theme;\n }\n if (typeof this.language !== 'undefined') {\n toReturn['language'] = this.language;\n }\n if (typeof this.theming !== 'undefined' && this.theming !== null) {\n toReturn['theming'] = 'toApiJson' in this.theming ? this.theming.toApiJson() : this.theming;\n }\n if (typeof this.notificationsEnabled !== 'undefined') {\n toReturn['notificationsEnabled'] = this.notificationsEnabled;\n }\n if (typeof this.userId !== 'undefined') {\n toReturn['userId'] = this.userId;\n }\n if (typeof this.locationData !== 'undefined' && this.locationData !== null) {\n toReturn['locationData'] = 'toApiJson' in this.locationData ? this.locationData.toApiJson() : this.locationData;\n }\n if (typeof this.impersonateeUsername !== 'undefined') {\n toReturn['impersonateeUsername'] = this.impersonateeUsername;\n }\n if (typeof this.emailVerified !== 'undefined') {\n toReturn['emailVerified'] = this.emailVerified;\n }\n if (typeof this.userSwitcherData !== 'undefined' && this.userSwitcherData !== null) {\n toReturn['userSwitcherData'] = 'toApiJson' in this.userSwitcherData ? this.userSwitcherData.toApiJson() : this.userSwitcherData;\n }\n if (typeof this.partnerName !== 'undefined') {\n toReturn['partnerName'] = this.partnerName;\n }\n return toReturn;\n }\n}\nclass GetDefaultLocationRequest {\n static fromProto(proto) {\n let m = new GetDefaultLocationRequest();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.partnerId !== 'undefined') {\n toReturn['partnerId'] = this.partnerId;\n }\n return toReturn;\n }\n}\nclass GetDefaultLocationResponse {\n static fromProto(proto) {\n let m = new GetDefaultLocationResponse();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.accountGroupId !== 'undefined') {\n toReturn['accountGroupId'] = this.accountGroupId;\n }\n if (typeof this.groupId !== 'undefined') {\n toReturn['groupId'] = this.groupId;\n }\n return toReturn;\n }\n}\nclass GetLanguageRequest {\n static fromProto(proto) {\n let m = new GetLanguageRequest();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n return toReturn;\n }\n}\nclass GetLanguageResponse {\n static fromProto(proto) {\n let m = new GetLanguageResponse();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.language !== 'undefined') {\n toReturn['language'] = this.language;\n }\n return toReturn;\n }\n}\nclass GetLocationsRequest {\n static fromProto(proto) {\n let m = new GetLocationsRequest();\n m = Object.assign(m, proto);\n if (proto.accountGroups) {\n m.accountGroups = GetLocationsRequestAccountGroups.fromProto(proto.accountGroups);\n }\n if (proto.groups) {\n m.groups = GetLocationsRequestGroups.fromProto(proto.groups);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.accountGroups !== 'undefined' && this.accountGroups !== null) {\n toReturn['accountGroups'] = 'toApiJson' in this.accountGroups ? this.accountGroups.toApiJson() : this.accountGroups;\n }\n if (typeof this.groups !== 'undefined' && this.groups !== null) {\n toReturn['groups'] = 'toApiJson' in this.groups ? this.groups.toApiJson() : this.groups;\n }\n return toReturn;\n }\n}\nclass GetLocationsResponse {\n static fromProto(proto) {\n let m = new GetLocationsResponse();\n m = Object.assign(m, proto);\n if (proto.locations) {\n m.locations = proto.locations.map(Location.fromProto);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.locations !== 'undefined' && this.locations !== null) {\n toReturn['locations'] = 'toApiJson' in this.locations ? this.locations.toApiJson() : this.locations;\n }\n return toReturn;\n }\n}\nclass GetNavigationDataRequest {\n static fromProto(proto) {\n let m = new GetNavigationDataRequest();\n m = Object.assign(m, proto);\n if (proto.platformMode) {\n m.platformMode = enumStringToValue(PlatformMode, proto.platformMode);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.accountGroupId !== 'undefined') {\n toReturn['accountGroupId'] = this.accountGroupId;\n }\n if (typeof this.groupPath !== 'undefined') {\n toReturn['groupPath'] = this.groupPath;\n }\n if (typeof this.partnerId !== 'undefined') {\n toReturn['partnerId'] = this.partnerId;\n }\n if (typeof this.marketId !== 'undefined') {\n toReturn['marketId'] = this.marketId;\n }\n if (typeof this.platformMode !== 'undefined') {\n toReturn['platformMode'] = this.platformMode;\n }\n return toReturn;\n }\n}\nclass GetNavigationDataResponse {\n static fromProto(proto) {\n let m = new GetNavigationDataResponse();\n m = Object.assign(m, proto);\n if (proto.branding) {\n m.branding = Branding.fromProto(proto.branding);\n }\n if (proto.salesInfo) {\n m.salesInfo = SalesInfo.fromProto(proto.salesInfo);\n }\n if (proto.pinnedItems) {\n m.pinnedItems = proto.pinnedItems.map(PinnedItem.fromProto);\n }\n if (proto.associatedLocationIds) {\n m.associatedLocationIds = AssociatedLocationIDs.fromProto(proto.associatedLocationIds);\n }\n if (proto.dropdownItems) {\n m.dropdownItems = proto.dropdownItems.map(DropdownItem.fromProto);\n }\n if (proto.userView) {\n m.userView = enumStringToValue(UserViewType, proto.userView);\n }\n if (proto.retentionConfig) {\n m.retentionConfig = RetentionConfig.fromProto(proto.retentionConfig);\n }\n if (proto.totalLocations) {\n m.totalLocations = TotalLocations.fromProto(proto.totalLocations);\n }\n if (proto.navigationItems) {\n m.navigationItems = proto.navigationItems.map(SideNavigationItem.fromProto);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.branding !== 'undefined' && this.branding !== null) {\n toReturn['branding'] = 'toApiJson' in this.branding ? this.branding.toApiJson() : this.branding;\n }\n if (typeof this.salesInfo !== 'undefined' && this.salesInfo !== null) {\n toReturn['salesInfo'] = 'toApiJson' in this.salesInfo ? this.salesInfo.toApiJson() : this.salesInfo;\n }\n if (typeof this.pinnedItems !== 'undefined' && this.pinnedItems !== null) {\n toReturn['pinnedItems'] = 'toApiJson' in this.pinnedItems ? this.pinnedItems.toApiJson() : this.pinnedItems;\n }\n if (typeof this.associatedLocationIds !== 'undefined' && this.associatedLocationIds !== null) {\n toReturn['associatedLocationIds'] = 'toApiJson' in this.associatedLocationIds ? this.associatedLocationIds.toApiJson() : this.associatedLocationIds;\n }\n if (typeof this.defaultLocation !== 'undefined') {\n toReturn['defaultLocation'] = this.defaultLocation;\n }\n if (typeof this.language !== 'undefined') {\n toReturn['language'] = this.language;\n }\n if (typeof this.dropdownItems !== 'undefined' && this.dropdownItems !== null) {\n toReturn['dropdownItems'] = 'toApiJson' in this.dropdownItems ? this.dropdownItems.toApiJson() : this.dropdownItems;\n }\n if (typeof this.currentBrandName !== 'undefined') {\n toReturn['currentBrandName'] = this.currentBrandName;\n }\n if (typeof this.userView !== 'undefined') {\n toReturn['userView'] = this.userView;\n }\n if (typeof this.retentionConfig !== 'undefined' && this.retentionConfig !== null) {\n toReturn['retentionConfig'] = 'toApiJson' in this.retentionConfig ? this.retentionConfig.toApiJson() : this.retentionConfig;\n }\n if (typeof this.totalLocations !== 'undefined' && this.totalLocations !== null) {\n toReturn['totalLocations'] = 'toApiJson' in this.totalLocations ? this.totalLocations.toApiJson() : this.totalLocations;\n }\n if (typeof this.userId !== 'undefined') {\n toReturn['userId'] = this.userId;\n }\n if (typeof this.businessAppBranding !== 'undefined') {\n toReturn['businessAppBranding'] = this.businessAppBranding;\n }\n if (typeof this.disableBusinessNav !== 'undefined') {\n toReturn['disableBusinessNav'] = this.disableBusinessNav;\n }\n if (typeof this.navigationItems !== 'undefined' && this.navigationItems !== null) {\n toReturn['navigationItems'] = 'toApiJson' in this.navigationItems ? this.navigationItems.toApiJson() : this.navigationItems;\n }\n return toReturn;\n }\n}\nclass GetPinsRequest {\n static fromProto(proto) {\n let m = new GetPinsRequest();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.identifier !== 'undefined') {\n toReturn['identifier'] = this.identifier;\n }\n return toReturn;\n }\n}\nclass GetPinsResponse {\n static fromProto(proto) {\n let m = new GetPinsResponse();\n m = Object.assign(m, proto);\n if (proto.items) {\n m.items = proto.items.map(PinnedItem.fromProto);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.items !== 'undefined' && this.items !== null) {\n toReturn['items'] = 'toApiJson' in this.items ? this.items.toApiJson() : this.items;\n }\n return toReturn;\n }\n}\nclass GetSalesInfoRequest {\n static fromProto(proto) {\n let m = new GetSalesInfoRequest();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.accountGroupId !== 'undefined') {\n toReturn['accountGroupId'] = this.accountGroupId;\n }\n if (typeof this.groupPath !== 'undefined') {\n toReturn['groupPath'] = this.groupPath;\n }\n return toReturn;\n }\n}\nclass GetSalesInfoResponse {\n static fromProto(proto) {\n let m = new GetSalesInfoResponse();\n m = Object.assign(m, proto);\n if (proto.salesInfo) {\n m.salesInfo = SalesInfo.fromProto(proto.salesInfo);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.salesInfo !== 'undefined' && this.salesInfo !== null) {\n toReturn['salesInfo'] = 'toApiJson' in this.salesInfo ? this.salesInfo.toApiJson() : this.salesInfo;\n }\n return toReturn;\n }\n}\nclass GetLocationsRequestGroups {\n static fromProto(proto) {\n let m = new GetLocationsRequestGroups();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.groupPaths !== 'undefined') {\n toReturn['groupPaths'] = this.groupPaths;\n }\n return toReturn;\n }\n}\nclass ListElevatedLocationsRequest {\n static fromProto(proto) {\n let m = new ListElevatedLocationsRequest();\n m = Object.assign(m, proto);\n if (proto.pageSize) {\n m.pageSize = parseInt(proto.pageSize, 10);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.partnerId !== 'undefined') {\n toReturn['partnerId'] = this.partnerId;\n }\n if (typeof this.cursor !== 'undefined') {\n toReturn['cursor'] = this.cursor;\n }\n if (typeof this.pageSize !== 'undefined') {\n toReturn['pageSize'] = this.pageSize;\n }\n if (typeof this.search !== 'undefined') {\n toReturn['search'] = this.search;\n }\n if (typeof this.accountGroups !== 'undefined') {\n toReturn['accountGroups'] = this.accountGroups;\n }\n if (typeof this.brands !== 'undefined') {\n toReturn['brands'] = this.brands;\n }\n return toReturn;\n }\n}\nclass ListElevatedLocationsResponse {\n static fromProto(proto) {\n let m = new ListElevatedLocationsResponse();\n m = Object.assign(m, proto);\n if (proto.locations) {\n m.locations = proto.locations.map(Location.fromProto);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.locations !== 'undefined' && this.locations !== null) {\n toReturn['locations'] = 'toApiJson' in this.locations ? this.locations.toApiJson() : this.locations;\n }\n if (typeof this.cursor !== 'undefined') {\n toReturn['cursor'] = this.cursor;\n }\n if (typeof this.hasMore !== 'undefined') {\n toReturn['hasMore'] = this.hasMore;\n }\n return toReturn;\n }\n}\nclass ListLocationsRequest {\n static fromProto(proto) {\n let m = new ListLocationsRequest();\n m = Object.assign(m, proto);\n if (proto.pageSize) {\n m.pageSize = parseInt(proto.pageSize, 10);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.partnerId !== 'undefined') {\n toReturn['partnerId'] = this.partnerId;\n }\n if (typeof this.cursor !== 'undefined') {\n toReturn['cursor'] = this.cursor;\n }\n if (typeof this.pageSize !== 'undefined') {\n toReturn['pageSize'] = this.pageSize;\n }\n if (typeof this.search !== 'undefined') {\n toReturn['search'] = this.search;\n }\n if (typeof this.includeAccountGroups !== 'undefined') {\n toReturn['includeAccountGroups'] = this.includeAccountGroups;\n }\n if (typeof this.includeBrands !== 'undefined') {\n toReturn['includeBrands'] = this.includeBrands;\n }\n return toReturn;\n }\n}\nclass ListLocationsResponse {\n static fromProto(proto) {\n let m = new ListLocationsResponse();\n m = Object.assign(m, proto);\n if (proto.locations) {\n m.locations = proto.locations.map(Location.fromProto);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.locations !== 'undefined' && this.locations !== null) {\n toReturn['locations'] = 'toApiJson' in this.locations ? this.locations.toApiJson() : this.locations;\n }\n if (typeof this.cursor !== 'undefined') {\n toReturn['cursor'] = this.cursor;\n }\n if (typeof this.hasMore !== 'undefined') {\n toReturn['hasMore'] = this.hasMore;\n }\n return toReturn;\n }\n}\nclass Location {\n static fromProto(proto) {\n let m = new Location();\n m = Object.assign(m, proto);\n if (proto.accountGroup) {\n m.accountGroup = AccountGroup.fromProto(proto.accountGroup);\n }\n if (proto.brand) {\n m.brand = Brand.fromProto(proto.brand);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.accountGroup !== 'undefined' && this.accountGroup !== null) {\n toReturn['accountGroup'] = 'toApiJson' in this.accountGroup ? this.accountGroup.toApiJson() : this.accountGroup;\n }\n if (typeof this.brand !== 'undefined' && this.brand !== null) {\n toReturn['brand'] = 'toApiJson' in this.brand ? this.brand.toApiJson() : this.brand;\n }\n return toReturn;\n }\n}\nclass LocationData {\n static fromProto(proto) {\n let m = new LocationData();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.businessName !== 'undefined') {\n toReturn['businessName'] = this.businessName;\n }\n if (typeof this.address !== 'undefined') {\n toReturn['address'] = this.address;\n }\n return toReturn;\n }\n}\nclass PinnedItem {\n static fromProto(proto) {\n let m = new PinnedItem();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.navigationId !== 'undefined') {\n toReturn['navigationId'] = this.navigationId;\n }\n return toReturn;\n }\n}\nclass RetentionConfig {\n static fromProto(proto) {\n let m = new RetentionConfig();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.cancellationNotificationEmail !== 'undefined') {\n toReturn['cancellationNotificationEmail'] = this.cancellationNotificationEmail;\n }\n return toReturn;\n }\n}\nclass SalesContact {\n static fromProto(proto) {\n let m = new SalesContact();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.salesPersonId !== 'undefined') {\n toReturn['salesPersonId'] = this.salesPersonId;\n }\n if (typeof this.email !== 'undefined') {\n toReturn['email'] = this.email;\n }\n if (typeof this.firstName !== 'undefined') {\n toReturn['firstName'] = this.firstName;\n }\n if (typeof this.lastName !== 'undefined') {\n toReturn['lastName'] = this.lastName;\n }\n if (typeof this.phoneNumber !== 'undefined') {\n toReturn['phoneNumber'] = this.phoneNumber;\n }\n if (typeof this.photoUrlSecure !== 'undefined') {\n toReturn['photoUrlSecure'] = this.photoUrlSecure;\n }\n if (typeof this.jobTitle !== 'undefined') {\n toReturn['jobTitle'] = this.jobTitle;\n }\n if (typeof this.country !== 'undefined') {\n toReturn['country'] = this.country;\n }\n if (typeof this.meetingBookingUrl !== 'undefined') {\n toReturn['meetingBookingUrl'] = this.meetingBookingUrl;\n }\n return toReturn;\n }\n}\nclass SalesInfo {\n static fromProto(proto) {\n let m = new SalesInfo();\n m = Object.assign(m, proto);\n if (proto.salesContact) {\n m.salesContact = SalesContact.fromProto(proto.salesContact);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.marketName !== 'undefined') {\n toReturn['marketName'] = this.marketName;\n }\n if (typeof this.salesContact !== 'undefined' && this.salesContact !== null) {\n toReturn['salesContact'] = 'toApiJson' in this.salesContact ? this.salesContact.toApiJson() : this.salesContact;\n }\n return toReturn;\n }\n}\nclass SetDefaultLocationRequest {\n static fromProto(proto) {\n let m = new SetDefaultLocationRequest();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.partnerId !== 'undefined') {\n toReturn['partnerId'] = this.partnerId;\n }\n if (typeof this.accountGroupId !== 'undefined') {\n toReturn['accountGroupId'] = this.accountGroupId;\n }\n if (typeof this.groupId !== 'undefined') {\n toReturn['groupId'] = this.groupId;\n }\n return toReturn;\n }\n}\nclass SetLanguageRequest {\n static fromProto(proto) {\n let m = new SetLanguageRequest();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.language !== 'undefined') {\n toReturn['language'] = this.language;\n }\n return toReturn;\n }\n}\nclass SetPinsRequest {\n static fromProto(proto) {\n let m = new SetPinsRequest();\n m = Object.assign(m, proto);\n if (proto.items) {\n m.items = proto.items.map(PinnedItem.fromProto);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.identifier !== 'undefined') {\n toReturn['identifier'] = this.identifier;\n }\n if (typeof this.items !== 'undefined' && this.items !== null) {\n toReturn['items'] = 'toApiJson' in this.items ? this.items.toApiJson() : this.items;\n }\n return toReturn;\n }\n}\nclass SideNavigationContainer {\n static fromProto(proto) {\n let m = new SideNavigationContainer();\n m = Object.assign(m, proto);\n if (proto.sideNavigationItems) {\n m.sideNavigationItems = proto.sideNavigationItems.map(SideNavigationItem.fromProto);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.translationId !== 'undefined') {\n toReturn['translationId'] = this.translationId;\n }\n if (typeof this.sideNavigationItems !== 'undefined' && this.sideNavigationItems !== null) {\n toReturn['sideNavigationItems'] = 'toApiJson' in this.sideNavigationItems ? this.sideNavigationItems.toApiJson() : this.sideNavigationItems;\n }\n if (typeof this.icon !== 'undefined') {\n toReturn['icon'] = this.icon;\n }\n if (typeof this.logoUrl !== 'undefined') {\n toReturn['logoUrl'] = this.logoUrl;\n }\n if (typeof this.label !== 'undefined') {\n toReturn['label'] = this.label;\n }\n if (typeof this.showIcon !== 'undefined') {\n toReturn['showIcon'] = this.showIcon;\n }\n if (typeof this.chipContent !== 'undefined') {\n toReturn['chipContent'] = this.chipContent;\n }\n if (typeof this.url !== 'undefined') {\n toReturn['url'] = this.url;\n }\n if (typeof this.pinnable !== 'undefined') {\n toReturn['pinnable'] = this.pinnable;\n }\n if (typeof this.navigationId !== 'undefined') {\n toReturn['navigationId'] = this.navigationId;\n }\n return toReturn;\n }\n}\nclass SideNavigationItem {\n static fromProto(proto) {\n let m = new SideNavigationItem();\n m = Object.assign(m, proto);\n if (proto.sideNavigationSection) {\n m.sideNavigationSection = SideNavigationSection.fromProto(proto.sideNavigationSection);\n }\n if (proto.sideNavigationContainer) {\n m.sideNavigationContainer = SideNavigationContainer.fromProto(proto.sideNavigationContainer);\n }\n if (proto.sideNavigationLink) {\n m.sideNavigationLink = SideNavigationLink.fromProto(proto.sideNavigationLink);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.sideNavigationSection !== 'undefined' && this.sideNavigationSection !== null) {\n toReturn['sideNavigationSection'] = 'toApiJson' in this.sideNavigationSection ? this.sideNavigationSection.toApiJson() : this.sideNavigationSection;\n }\n if (typeof this.sideNavigationContainer !== 'undefined' && this.sideNavigationContainer !== null) {\n toReturn['sideNavigationContainer'] = 'toApiJson' in this.sideNavigationContainer ? this.sideNavigationContainer.toApiJson() : this.sideNavigationContainer;\n }\n if (typeof this.sideNavigationLink !== 'undefined' && this.sideNavigationLink !== null) {\n toReturn['sideNavigationLink'] = 'toApiJson' in this.sideNavigationLink ? this.sideNavigationLink.toApiJson() : this.sideNavigationLink;\n }\n return toReturn;\n }\n}\nclass SideNavigationLink {\n static fromProto(proto) {\n let m = new SideNavigationLink();\n m = Object.assign(m, proto);\n if (proto.subLinks) {\n m.subLinks = proto.subLinks.map(SideNavigationLink.fromProto);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.navigationId !== 'undefined') {\n toReturn['navigationId'] = this.navigationId;\n }\n if (typeof this.url !== 'undefined') {\n toReturn['url'] = this.url;\n }\n if (typeof this.path !== 'undefined') {\n toReturn['path'] = this.path;\n }\n if (typeof this.serviceProviderId !== 'undefined') {\n toReturn['serviceProviderId'] = this.serviceProviderId;\n }\n if (typeof this.logoUrl !== 'undefined') {\n toReturn['logoUrl'] = this.logoUrl;\n }\n if (typeof this.icon !== 'undefined') {\n toReturn['icon'] = this.icon;\n }\n if (typeof this.translationId !== 'undefined') {\n toReturn['translationId'] = this.translationId;\n }\n if (typeof this.external !== 'undefined') {\n toReturn['external'] = this.external;\n }\n if (typeof this.label !== 'undefined') {\n toReturn['label'] = this.label;\n }\n if (typeof this.showIcon !== 'undefined') {\n toReturn['showIcon'] = this.showIcon;\n }\n if (typeof this.pinnable !== 'undefined') {\n toReturn['pinnable'] = this.pinnable;\n }\n if (typeof this.chipContent !== 'undefined') {\n toReturn['chipContent'] = this.chipContent;\n }\n if (typeof this.isTrial !== 'undefined') {\n toReturn['isTrial'] = this.isTrial;\n }\n if (typeof this.userRequired !== 'undefined') {\n toReturn['userRequired'] = this.userRequired;\n }\n if (typeof this.openInNewTab !== 'undefined') {\n toReturn['openInNewTab'] = this.openInNewTab;\n }\n if (typeof this.subLinks !== 'undefined' && this.subLinks !== null) {\n toReturn['subLinks'] = 'toApiJson' in this.subLinks ? this.subLinks.toApiJson() : this.subLinks;\n }\n if (typeof this.launchUrl !== 'undefined') {\n toReturn['launchUrl'] = this.launchUrl;\n }\n if (typeof this.descriptionTranslationId !== 'undefined') {\n toReturn['descriptionTranslationId'] = this.descriptionTranslationId;\n }\n return toReturn;\n }\n}\nclass SideNavigationSection {\n static fromProto(proto) {\n let m = new SideNavigationSection();\n m = Object.assign(m, proto);\n if (proto.sideNavigationItems) {\n m.sideNavigationItems = proto.sideNavigationItems.map(SideNavigationItem.fromProto);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.translationId !== 'undefined') {\n toReturn['translationId'] = this.translationId;\n }\n if (typeof this.sideNavigationItems !== 'undefined' && this.sideNavigationItems !== null) {\n toReturn['sideNavigationItems'] = 'toApiJson' in this.sideNavigationItems ? this.sideNavigationItems.toApiJson() : this.sideNavigationItems;\n }\n if (typeof this.label !== 'undefined') {\n toReturn['label'] = this.label;\n }\n if (typeof this.chipContent !== 'undefined') {\n toReturn['chipContent'] = this.chipContent;\n }\n return toReturn;\n }\n}\nclass Theming {\n static fromProto(proto) {\n let m = new Theming();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.primaryColor !== 'undefined') {\n toReturn['primaryColor'] = this.primaryColor;\n }\n if (typeof this.primaryHoverColor !== 'undefined') {\n toReturn['primaryHoverColor'] = this.primaryHoverColor;\n }\n if (typeof this.primaryActiveColor !== 'undefined') {\n toReturn['primaryActiveColor'] = this.primaryActiveColor;\n }\n if (typeof this.secondaryColor !== 'undefined') {\n toReturn['secondaryColor'] = this.secondaryColor;\n }\n if (typeof this.secondaryHoverColor !== 'undefined') {\n toReturn['secondaryHoverColor'] = this.secondaryHoverColor;\n }\n if (typeof this.secondaryActiveColor !== 'undefined') {\n toReturn['secondaryActiveColor'] = this.secondaryActiveColor;\n }\n if (typeof this.fontColor !== 'undefined') {\n toReturn['fontColor'] = this.fontColor;\n }\n if (typeof this.fontDisabledColor !== 'undefined') {\n toReturn['fontDisabledColor'] = this.fontDisabledColor;\n }\n if (typeof this.accentsColor !== 'undefined') {\n toReturn['accentsColor'] = this.accentsColor;\n }\n if (typeof this.accentsActiveColor !== 'undefined') {\n toReturn['accentsActiveColor'] = this.accentsActiveColor;\n }\n if (typeof this.focusColor !== 'undefined') {\n toReturn['focusColor'] = this.focusColor;\n }\n if (typeof this.borderColor !== 'undefined') {\n toReturn['borderColor'] = this.borderColor;\n }\n return toReturn;\n }\n}\nclass TotalLocations {\n static fromProto(proto) {\n let m = new TotalLocations();\n m = Object.assign(m, proto);\n if (proto.accounts) {\n m.accounts = parseInt(proto.accounts, 10);\n }\n if (proto.brands) {\n m.brands = parseInt(proto.brands, 10);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.accounts !== 'undefined') {\n toReturn['accounts'] = this.accounts;\n }\n if (typeof this.brands !== 'undefined') {\n toReturn['brands'] = this.brands;\n }\n return toReturn;\n }\n}\nclass UserNavigationItem {\n static fromProto(proto) {\n let m = new UserNavigationItem();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.text !== 'undefined') {\n toReturn['text'] = this.text;\n }\n if (typeof this.url !== 'undefined') {\n toReturn['url'] = this.url;\n }\n if (typeof this.routeId !== 'undefined') {\n toReturn['routeId'] = this.routeId;\n }\n return toReturn;\n }\n}\nclass UserSwitcherData {\n static fromProto(proto) {\n let m = new UserSwitcherData();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.userId !== 'undefined') {\n toReturn['userId'] = this.userId;\n }\n if (typeof this.partnerId !== 'undefined') {\n toReturn['partnerId'] = this.partnerId;\n }\n if (typeof this.partnerName !== 'undefined') {\n toReturn['partnerName'] = this.partnerName;\n }\n if (typeof this.entryUrl !== 'undefined') {\n toReturn['entryUrl'] = this.entryUrl;\n }\n return toReturn;\n }\n}\n\n// *********************************\n// Code generated by sdkgen\n// DO NOT EDIT!.\n//\n// Objects Index.\n// *********************************\n\n// *********************************\n// Code generated by sdkgen\n// DO NOT EDIT!.\n//\n// API Service.\n// *********************************\nlet AtlasApiService = /*#__PURE__*/(() => {\n class AtlasApiService {\n constructor(http, hostService) {\n this.http = http;\n this.hostService = hostService;\n this._host = this.hostService.hostWithScheme;\n }\n apiOptions() {\n return {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json'\n }),\n withCredentials: true\n };\n }\n getData(r) {\n const request = r.toApiJson ? r : new GetDataRequest(r);\n return this.http.post(this._host + \"/atlas.v1.Atlas/GetData\", request.toApiJson(), this.apiOptions()).pipe(map(resp => GetDataResponse.fromProto(resp)));\n }\n getNavigationData(r) {\n const request = r.toApiJson ? r : new GetNavigationDataRequest(r);\n return this.http.post(this._host + \"/atlas.v1.Atlas/GetNavigationData\", request.toApiJson(), this.apiOptions()).pipe(map(resp => GetNavigationDataResponse.fromProto(resp)));\n }\n getSalesInfo(r) {\n const request = r.toApiJson ? r : new GetSalesInfoRequest(r);\n return this.http.post(this._host + \"/atlas.v1.Atlas/GetSalesInfo\", request.toApiJson(), this.apiOptions()).pipe(map(resp => GetSalesInfoResponse.fromProto(resp)));\n }\n getLocations(r) {\n const request = r.toApiJson ? r : new GetLocationsRequest(r);\n return this.http.post(this._host + \"/atlas.v1.Atlas/GetLocations\", request.toApiJson(), this.apiOptions()).pipe(map(resp => GetLocationsResponse.fromProto(resp)));\n }\n listElevatedLocations(r) {\n const request = r.toApiJson ? r : new ListElevatedLocationsRequest(r);\n return this.http.post(this._host + \"/atlas.v1.Atlas/ListElevatedLocations\", request.toApiJson(), this.apiOptions()).pipe(map(resp => ListElevatedLocationsResponse.fromProto(resp)));\n }\n listLocations(r) {\n const request = r.toApiJson ? r : new ListLocationsRequest(r);\n return this.http.post(this._host + \"/atlas.v1.Atlas/ListLocations\", request.toApiJson(), this.apiOptions()).pipe(map(resp => ListLocationsResponse.fromProto(resp)));\n }\n contactUs(r) {\n const request = r.toApiJson ? r : new ContactUsRequest(r);\n return this.http.post(this._host + \"/atlas.v1.Atlas/ContactUs\", request.toApiJson(), {\n ...this.apiOptions(),\n observe: 'response'\n });\n }\n setDefaultLocation(r) {\n const request = r.toApiJson ? r : new SetDefaultLocationRequest(r);\n return this.http.post(this._host + \"/atlas.v1.Atlas/SetDefaultLocation\", request.toApiJson(), {\n ...this.apiOptions(),\n observe: 'response'\n });\n }\n getDefaultLocation(r) {\n const request = r.toApiJson ? r : new GetDefaultLocationRequest(r);\n return this.http.post(this._host + \"/atlas.v1.Atlas/GetDefaultLocation\", request.toApiJson(), this.apiOptions()).pipe(map(resp => GetDefaultLocationResponse.fromProto(resp)));\n }\n }\n AtlasApiService.ɵfac = function AtlasApiService_Factory(t) {\n return new (t || AtlasApiService)(i0.ɵɵinject(i1.HttpClient), i0.ɵɵinject(HostService));\n };\n AtlasApiService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: AtlasApiService,\n factory: AtlasApiService.ɵfac,\n providedIn: 'root'\n });\n return AtlasApiService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n// *********************************\n// Code generated by sdkgen\n// DO NOT EDIT!.\n//\n// API Service.\n// *********************************\nlet LanguagesApiService = /*#__PURE__*/(() => {\n class LanguagesApiService {\n constructor(http, hostService) {\n this.http = http;\n this.hostService = hostService;\n this._host = this.hostService.hostWithScheme;\n }\n apiOptions() {\n return {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json'\n }),\n withCredentials: true\n };\n }\n setLanguage(r) {\n const request = r.toApiJson ? r : new SetLanguageRequest(r);\n return this.http.post(this._host + \"/atlas.v1.Languages/SetLanguage\", request.toApiJson(), {\n ...this.apiOptions(),\n observe: 'response'\n });\n }\n getLanguage(r) {\n const request = r.toApiJson ? r : new GetLanguageRequest(r);\n return this.http.post(this._host + \"/atlas.v1.Languages/GetLanguage\", request.toApiJson(), this.apiOptions()).pipe(map(resp => GetLanguageResponse.fromProto(resp)));\n }\n }\n LanguagesApiService.ɵfac = function LanguagesApiService_Factory(t) {\n return new (t || LanguagesApiService)(i0.ɵɵinject(i1.HttpClient), i0.ɵɵinject(HostService));\n };\n LanguagesApiService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: LanguagesApiService,\n factory: LanguagesApiService.ɵfac,\n providedIn: 'root'\n });\n return LanguagesApiService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n// *********************************\n// Code generated by sdkgen\n// DO NOT EDIT!.\n//\n// API Service.\n// *********************************\nlet PinsApiService = /*#__PURE__*/(() => {\n class PinsApiService {\n constructor(http, hostService) {\n this.http = http;\n this.hostService = hostService;\n this._host = this.hostService.hostWithScheme;\n }\n apiOptions() {\n return {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json'\n }),\n withCredentials: true\n };\n }\n setPins(r) {\n const request = r.toApiJson ? r : new SetPinsRequest(r);\n return this.http.post(this._host + \"/atlas.v1.Pins/SetPins\", request.toApiJson(), {\n ...this.apiOptions(),\n observe: 'response'\n });\n }\n getPins(r) {\n const request = r.toApiJson ? r : new GetPinsRequest(r);\n return this.http.post(this._host + \"/atlas.v1.Pins/GetPins\", request.toApiJson(), this.apiOptions()).pipe(map(resp => GetPinsResponse.fromProto(resp)));\n }\n }\n PinsApiService.ɵfac = function PinsApiService_Factory(t) {\n return new (t || PinsApiService)(i0.ɵɵinject(i1.HttpClient), i0.ɵɵinject(HostService));\n };\n PinsApiService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: PinsApiService,\n factory: PinsApiService.ɵfac,\n providedIn: 'root'\n });\n return PinsApiService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n// *********************************\n// Code generated by sdkgen\n// DO NOT EDIT!.\n//\n// Index.\n// *********************************\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { Access, AccountGroup, AssociatedLocationIDs, AtlasApiService, Brand, Branding, CenterNavigationItem, ContactUsRequest, DropdownItem, GetDataRequest, GetDataResponse, GetDefaultLocationRequest, GetDefaultLocationResponse, GetLanguageRequest, GetLanguageResponse, GetLocationsRequest, GetLocationsRequestAccountGroups, GetLocationsRequestGroups, GetLocationsResponse, GetNavigationDataRequest, GetNavigationDataResponse, GetPinsRequest, GetPinsResponse, GetSalesInfoRequest, GetSalesInfoResponse, HostService, LanguagesApiService, ListElevatedLocationsRequest, ListElevatedLocationsResponse, ListLocationsRequest, ListLocationsResponse, Location, LocationData, PinnedItem, PinsApiService, PlatformMode, RetentionConfig, SalesContact, SalesInfo, SetDefaultLocationRequest, SetLanguageRequest, SetPinsRequest, SideNavigationContainer, SideNavigationItem, SideNavigationLink, SideNavigationSection, Theming, TotalLocations, UITheme, UserNavigationItem, UserSwitcherData, UserViewType };\n","export enum Language {\n AFRIKAANS = 'af',\n CZECH = 'cs',\n DUTCH = 'nl',\n ENGLISH = 'en',\n FRENCH = 'fr',\n FRENCH_CANADA = 'fr-ca',\n FRENCH_FRANCE = 'fr-fr',\n GERMAN = 'de',\n ITALIAN = 'it',\n JAPANESE = 'ja',\n PORTUGUESE = 'pt',\n RUSSIAN = 'ru',\n SPANISH_LATIN_AMERICA = 'es-419',\n}\n\nexport interface LanguageMapping {\n code: string;\n label: string;\n flag?: string;\n totalStrings?: number;\n translatedStrings?: number;\n}\n\nexport const LanguageMap: LanguageMapping[] = [\n { code: Language.ENGLISH, label: 'English', flag: '🇺🇸' },\n { code: Language.FRENCH_FRANCE, label: 'Français', flag: '🇫🇷' },\n { code: Language.FRENCH_CANADA, label: 'Français', flag: '🇨🇦' },\n { code: Language.CZECH, label: 'Čeština', flag: '🇨🇿' },\n { code: Language.DUTCH, label: 'Nederlands', flag: '🇳🇱' },\n { code: Language.GERMAN, label: 'Deutsch', flag: '🇧🇪' },\n { code: Language.ITALIAN, label: 'Italiano', flag: '🇮🇹' },\n { code: Language.SPANISH_LATIN_AMERICA, label: 'Español', flag: '🇪🇸' },\n];\n","import { HttpResponse } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport {\n AtlasApiService,\n CenterNavigationItem,\n GetDataRequest,\n GetDataResponse,\n LanguagesApiService,\n Theming,\n UITheme,\n UserNavigationItem,\n UserSwitcherData,\n} from '@vendasta/atlas';\nimport { Observable } from 'rxjs';\nimport { distinctUntilChanged, filter, map, shareReplay, startWith, switchMap, tap } from 'rxjs/operators';\nimport { AtlasConfigService, Config } from './config.service';\nimport { Language } from './language';\n\ninterface CachedGetDataResponse {\n locationId: string;\n partnerId: string;\n marketId: string;\n response: GetDataResponse;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class AtlasDataService {\n private navigationData$: Observable;\n public centerData$: Observable;\n public userData$: Observable;\n public username$: Observable;\n public impersonateeUsername$: Observable;\n public email$: Observable;\n public userId$: Observable;\n public signoutUrl$: Observable;\n public theme$: Observable;\n public theming$: Observable;\n public language$: Observable;\n public notificationsEnabled$: Observable;\n public businessName$: Observable;\n public address$: Observable;\n public userSwitcherData$: Observable;\n public partnerName$: Observable;\n\n constructor(\n private apiService: AtlasApiService,\n private cfgService: AtlasConfigService,\n private languageService: LanguagesApiService,\n ) {\n this.navigationData$ = this.cfgService.config$.pipe(\n filter(({ partnerId }) => !!partnerId),\n switchMap((config: Config) =>\n this.apiService\n .getData(\n new GetDataRequest({\n partnerId: config.partnerId,\n marketId: config.marketId,\n groupPath: config.groupPath,\n accountGroupId: config.accountId,\n signOutNextUrl: config.signOutNextUrl,\n }),\n )\n .pipe(\n filter((res: GetDataResponse) => JSON.stringify(res.toApiJson()) !== '{}'),\n map((res: GetDataResponse) => {\n const cache = {\n locationId: this.locationIdFromConfig(config),\n partnerId: config.partnerId,\n marketId: config.marketId,\n groupPath: config.groupPath,\n response: res,\n };\n return cache;\n }),\n tap((res) => this.rememberLastResponse(res)),\n startWith(this.getLastResponse()),\n filter(\n (res: CachedGetDataResponse) =>\n !!res &&\n res.locationId === this.locationIdFromConfig(config) &&\n res.partnerId === config.partnerId &&\n res.marketId === config.marketId,\n ),\n map((res: CachedGetDataResponse) => res.response),\n ),\n ),\n shareReplay(1),\n );\n\n this.centerData$ = this.navigationData$.pipe(\n map((res) => {\n if (!res.centers) {\n return [] as CenterNavigationItem[];\n }\n return res.centers;\n }),\n );\n\n this.userData$ = this.navigationData$.pipe(\n map((res) => {\n return res.user;\n }),\n );\n\n this.userSwitcherData$ = this.navigationData$.pipe(\n map((res) => {\n return res.userSwitcherData;\n }),\n );\n\n this.username$ = this.navigationData$.pipe(\n map((res) => {\n return res.username;\n }),\n distinctUntilChanged(),\n );\n\n this.partnerName$ = this.navigationData$.pipe(\n map((res) => {\n return res.partnerName;\n }),\n );\n\n this.impersonateeUsername$ = this.navigationData$.pipe(\n map((res) => {\n return res.impersonateeUsername;\n }),\n distinctUntilChanged(),\n );\n\n this.email$ = this.navigationData$.pipe(\n map((res) => {\n return res.email;\n }),\n distinctUntilChanged(),\n );\n\n this.userId$ = this.navigationData$.pipe(\n map((res) => {\n return res.userId;\n }),\n distinctUntilChanged(),\n );\n\n this.signoutUrl$ = this.navigationData$.pipe(\n map((res) => {\n return res.signOutUrl;\n }),\n distinctUntilChanged(),\n );\n\n this.notificationsEnabled$ = this.navigationData$.pipe(\n map((res) => !!res.notificationsEnabled),\n distinctUntilChanged(),\n );\n\n this.businessName$ = this.navigationData$.pipe(\n map((res) => res.locationData.businessName),\n distinctUntilChanged(),\n );\n\n this.address$ = this.navigationData$.pipe(\n map((res) => res.locationData.address),\n distinctUntilChanged(),\n );\n\n this.theming$ = this.navigationData$.pipe(\n map((res) => {\n if (res?.theme === UITheme.UI_THEME_LIGHT) {\n // default to light theme\n return new Theming({\n primaryColor: '#fff',\n primaryHoverColor: '#f0f0f0',\n primaryActiveColor: '#e1e1e1',\n secondaryColor: 'rgba(0, 0, 0, .04)',\n secondaryHoverColor: 'rgba(0, 0, 0, .04)',\n secondaryActiveColor: 'rgba(0, 0, 0, .1)',\n fontColor: 'rgba(0, 0, 0, 0.54)',\n fontDisabledColor: 'rgba(0, 0, 0, 0.25)',\n accentsColor: '#000',\n accentsActiveColor: '#057ec1',\n focusColor: '#bbdefb',\n borderColor: '#dadada',\n });\n } else {\n // no response or dark theme is set\n return new Theming({\n primaryColor: '#212121',\n primaryHoverColor: '#303030',\n primaryActiveColor: '#3f3f3f',\n secondaryColor: 'rgba(255, 255, 255, .04)',\n secondaryHoverColor: 'rgba(255, 255, 255, .04)',\n secondaryActiveColor: 'rgba(255, 255, 255, .1)',\n fontColor: 'rgba(255, 255, 255, 0.7)',\n fontDisabledColor: 'rgba(255,255,255, 0.50)',\n accentsColor: '#fff',\n accentsActiveColor: '#057ec1',\n focusColor: '#616161',\n borderColor: '#9a9b9a',\n });\n }\n }),\n distinctUntilChanged(),\n shareReplay(1),\n );\n\n this.language$ = this.navigationData$.pipe(\n map((res) => res.language || this.detectLanguageFromBrowser()),\n distinctUntilChanged(),\n );\n }\n\n setLanguage(language: string): Observable> {\n return this.languageService.setLanguage({ language }).pipe(\n tap(() => {\n const lastResponse = this.getLastResponse();\n if (lastResponse?.response) {\n lastResponse.response.language = language;\n this.rememberLastResponse(lastResponse);\n }\n }),\n );\n }\n\n private detectLanguageFromBrowser(): Language {\n const language = window.navigator.language;\n if (!language) {\n return Language.ENGLISH;\n }\n switch (language.toLowerCase()) {\n case Language.FRENCH:\n case Language.FRENCH_CANADA:\n return Language.FRENCH_CANADA;\n case Language.FRENCH_FRANCE:\n return Language.FRENCH_FRANCE;\n case Language.CZECH:\n return Language.CZECH;\n case Language.DUTCH:\n return Language.DUTCH;\n case Language.GERMAN:\n return Language.GERMAN;\n case Language.ITALIAN:\n return Language.ITALIAN;\n case Language.SPANISH_LATIN_AMERICA:\n return Language.SPANISH_LATIN_AMERICA;\n default:\n return Language.ENGLISH;\n }\n }\n\n private locationIdFromConfig(cfg: Config): string {\n return cfg.accountId || cfg.groupPath;\n }\n\n private rememberLastResponse(res: CachedGetDataResponse): void {\n localStorage.setItem(\n 'atlas-last-response',\n JSON.stringify({\n locationId: res.locationId,\n partnerId: res.partnerId,\n marketId: res.marketId,\n response: res.response.toApiJson(),\n }),\n );\n }\n\n private getLastResponse(): CachedGetDataResponse {\n const o: { locationId: string; partnerId: string; marketId: string; response: object } = JSON.parse(\n localStorage.getItem('atlas-last-response'),\n );\n if (!o || !o.response) {\n return null;\n }\n return {\n locationId: o.locationId,\n partnerId: o.partnerId,\n marketId: o.marketId,\n response: GetDataResponse.fromProto(o.response),\n };\n }\n}\n","import { Inject, Injectable, Optional } from '@angular/core';\nimport { LEXICON_ROOT_COMPONENT, LexiconApiService } from '@galaxy/lexicon';\nimport { getLocale, setLanguage } from '@vendasta/galaxy/i18n';\nimport { Observable, ReplaySubject, of } from 'rxjs';\nimport { map, shareReplay, switchMap, take } from 'rxjs/operators';\nimport { AtlasDataService } from './data.service';\nimport { LanguageMap, LanguageMapping } from './language';\n\n@Injectable({ providedIn: 'root' })\nexport class AtlasLanguageService {\n private language$$: ReplaySubject = new ReplaySubject(1);\n private internalLanguage$: Observable = this.language$$.asObservable();\n public language$: Observable = this.dataService.language$.pipe(\n switchMap((language: string) => {\n this.language$$.next(language);\n return this.internalLanguage$;\n }),\n shareReplay(1),\n );\n\n public languageList$: Observable;\n\n constructor(\n private dataService: AtlasDataService,\n @Optional() @Inject(LexiconApiService) lexiconService: LexiconApiService,\n @Optional() @Inject(LEXICON_ROOT_COMPONENT) lexiconRootComponent: string,\n ) {\n this.languageList$ = lexiconService\n ? lexiconService\n .getSupportedLanguages({\n componentName: lexiconRootComponent || '',\n })\n .pipe(\n map((response) => {\n if (response && response.languages) {\n return response.languages\n .map((l) => ({\n code: l.languageCode,\n label: l.languageName,\n total: l.languageStatistics.total,\n translated: l.languageStatistics.translated,\n }))\n .filter((l) => l.code !== 'meow');\n }\n }),\n )\n : of(LanguageMap);\n }\n\n getLanguage(): string {\n return getLocale();\n }\n\n setLanguage(language: string, updateConfig = true): void {\n setLanguage(language);\n this.language$$.next(language);\n if (updateConfig) {\n this.dataService\n .setLanguage(language)\n .pipe(take(1))\n .subscribe(() => {\n window.location.reload();\n });\n } else {\n // Reload immediately if we do not need to wait to update the user's language\n window.location.reload();\n }\n }\n}\n","import { registerVersion } from '@firebase/app';\nexport * from '@firebase/app';\nvar name = \"firebase\";\nvar version = \"10.7.1\";\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nregisterVersion(name, version, 'app');\n","import * as i0 from '@angular/core';\nimport { Version, Injectable } from '@angular/core';\nimport { getApps } from 'firebase/app';\nimport { queueScheduler, asyncScheduler, Observable } from 'rxjs';\nimport { tap, observeOn, subscribeOn } from 'rxjs/operators';\nconst VERSION = /*#__PURE__*/new Version('ANGULARFIRE2_VERSION');\nconst ɵisSupportedError = module => `The APP_INITIALIZER that is \"making\" isSupported() sync for the sake of convenient DI has not resolved in this\ncontext. Rather than injecting ${module} in the constructor, first ensure that ${module} is supported by calling\n\\`await isSupported()\\`, then retrieve the instance from the injector manually \\`injector.get(${module})\\`.`;\nfunction ɵgetDefaultInstanceOf(identifier, provided, defaultApp) {\n if (provided) {\n // Was provide* only called once? If so grab that\n if (provided.length === 1) {\n return provided[0];\n }\n const providedUsingDefaultApp = provided.filter(it => it.app === defaultApp);\n // Was provide* only called once, using the default app? If so use that\n if (providedUsingDefaultApp.length === 1) {\n return providedUsingDefaultApp[0];\n }\n }\n // Grab the default instance from the defaultApp\n const defaultAppWithContainer = defaultApp;\n const provider = defaultAppWithContainer.container.getProvider(identifier);\n return provider.getImmediate({\n optional: true\n });\n}\nconst ɵgetAllInstancesOf = (identifier, app) => {\n const apps = app ? [app] : getApps();\n const instances = [];\n apps.forEach(app => {\n const provider = app.container.getProvider(identifier);\n provider.instances.forEach(instance => {\n if (!instances.includes(instance)) {\n instances.push(instance);\n }\n });\n });\n return instances;\n};\nclass ɵAppCheckInstances {\n constructor() {\n return ɵgetAllInstancesOf(ɵAPP_CHECK_PROVIDER_NAME);\n }\n}\nconst ɵAPP_CHECK_PROVIDER_NAME = 'app-check';\n\n/* eslint-disable @typescript-eslint/ban-ts-comment */\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nfunction noop() {}\n/**\n * Schedules tasks so that they are invoked inside the Zone that is passed in the constructor.\n */\nclass ɵZoneScheduler {\n zone;\n delegate;\n constructor(zone, delegate = queueScheduler) {\n this.zone = zone;\n this.delegate = delegate;\n }\n now() {\n return this.delegate.now();\n }\n schedule(work, delay, state) {\n const targetZone = this.zone;\n // Wrap the specified work function to make sure that if nested scheduling takes place the\n // work is executed in the correct zone\n const workInZone = function (state) {\n targetZone.runGuarded(() => {\n work.apply(this, [state]);\n });\n };\n // Scheduling itself needs to be run in zone to ensure setInterval calls for async scheduling are done\n // inside the correct zone. This scheduler needs to schedule asynchronously always to ensure that\n // firebase emissions are never synchronous. Specifying a delay causes issues with the queueScheduler delegate.\n return this.delegate.schedule(workInZone, delay, state);\n }\n}\nclass BlockUntilFirstOperator {\n zone;\n // @ts-ignore\n task = null;\n constructor(zone) {\n this.zone = zone;\n }\n call(subscriber, source) {\n const unscheduleTask = this.unscheduleTask.bind(this);\n // @ts-ignore\n this.task = this.zone.run(() => Zone.current.scheduleMacroTask('firebaseZoneBlock', noop, {}, noop, noop));\n return source.pipe(tap({\n next: unscheduleTask,\n complete: unscheduleTask,\n error: unscheduleTask\n })).subscribe(subscriber).add(unscheduleTask);\n }\n unscheduleTask() {\n // maybe this is a race condition, invoke in a timeout\n // hold for 10ms while I try to figure out what is going on\n setTimeout(() => {\n if (this.task != null && this.task.state === 'scheduled') {\n this.task.invoke();\n this.task = null;\n }\n }, 10);\n }\n}\nlet ɵAngularFireSchedulers = /*#__PURE__*/(() => {\n class ɵAngularFireSchedulers {\n ngZone;\n outsideAngular;\n insideAngular;\n constructor(ngZone) {\n this.ngZone = ngZone;\n // @ts-ignore\n this.outsideAngular = ngZone.runOutsideAngular(() => new ɵZoneScheduler(Zone.current));\n // @ts-ignore\n this.insideAngular = ngZone.run(() => new ɵZoneScheduler(Zone.current, asyncScheduler));\n globalThis.ɵAngularFireScheduler ||= this;\n }\n static ɵfac = function ɵAngularFireSchedulers_Factory(t) {\n return new (t || ɵAngularFireSchedulers)(i0.ɵɵinject(i0.NgZone));\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: ɵAngularFireSchedulers,\n factory: ɵAngularFireSchedulers.ɵfac,\n providedIn: 'root'\n });\n }\n return ɵAngularFireSchedulers;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction getSchedulers() {\n const schedulers = globalThis.ɵAngularFireScheduler;\n if (!schedulers) {\n throw new Error(`Either AngularFireModule has not been provided in your AppModule (this can be done manually or implictly using\nprovideFirebaseApp) or you're calling an AngularFire method outside of an NgModule (which is not supported).`);\n }\n return schedulers;\n}\nfunction runOutsideAngular(fn) {\n return getSchedulers().ngZone.runOutsideAngular(() => fn());\n}\nfunction run(fn) {\n return getSchedulers().ngZone.run(() => fn());\n}\nfunction observeOutsideAngular(obs$) {\n return obs$.pipe(observeOn(getSchedulers().outsideAngular));\n}\nfunction observeInsideAngular(obs$) {\n return obs$.pipe(observeOn(getSchedulers().insideAngular));\n}\nfunction keepUnstableUntilFirst(obs$) {\n return ɵkeepUnstableUntilFirstFactory(getSchedulers())(obs$);\n}\n/**\n * Operator to block the zone until the first value has been emitted or the observable\n * has completed/errored. This is used to make sure that universal waits until the first\n * value from firebase but doesn't block the zone forever since the firebase subscription\n * is still alive.\n */\nfunction ɵkeepUnstableUntilFirstFactory(schedulers) {\n return function keepUnstableUntilFirst(obs$) {\n obs$ = obs$.lift(new BlockUntilFirstOperator(schedulers.ngZone));\n return obs$.pipe(\n // Run the subscribe body outside of Angular (e.g. calling Firebase SDK to add a listener to a change event)\n subscribeOn(schedulers.outsideAngular),\n // Run operators inside the angular zone (e.g. side effects via tap())\n observeOn(schedulers.insideAngular)\n // INVESTIGATE https://github.com/angular/angularfire/pull/2315\n // share()\n );\n };\n}\n// @ts-ignore\nconst zoneWrapFn = (it, macrotask) => {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const _this = this;\n // function() is needed for the arguments object\n return function () {\n const _arguments = arguments;\n if (macrotask) {\n setTimeout(() => {\n if (macrotask.state === 'scheduled') {\n macrotask.invoke();\n }\n }, 10);\n }\n return run(() => it.apply(_this, _arguments));\n };\n};\nconst ɵzoneWrap = (it, blockUntilFirst) => {\n // function() is needed for the arguments object\n return function () {\n // @ts-ignore\n let macrotask;\n const _arguments = arguments;\n // if this is a callback function, e.g, onSnapshot, we should create a microtask and invoke it\n // only once one of the callback functions is tripped.\n for (let i = 0; i < arguments.length; i++) {\n if (typeof _arguments[i] === 'function') {\n if (blockUntilFirst) {\n // @ts-ignore\n macrotask ||= run(() => Zone.current.scheduleMacroTask('firebaseZoneBlock', noop, {}, noop, noop));\n }\n // TODO create a microtask to track callback functions\n _arguments[i] = zoneWrapFn(_arguments[i], macrotask);\n }\n }\n const ret = runOutsideAngular(() => it.apply(this, _arguments));\n if (!blockUntilFirst) {\n if (ret instanceof Observable) {\n const schedulers = getSchedulers();\n return ret.pipe(subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular));\n } else {\n return run(() => ret);\n }\n }\n if (ret instanceof Observable) {\n return ret.pipe(keepUnstableUntilFirst);\n } else if (ret instanceof Promise) {\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n return run(() => new Promise((resolve, reject) => ret.then(it => run(() => resolve(it)), reason => run(() => reject(reason)))));\n } else if (typeof ret === 'function' && macrotask) {\n // Handle unsubscribe\n // function() is needed for the arguments object\n return function () {\n setTimeout(() => {\n if (macrotask && macrotask.state === 'scheduled') {\n macrotask.invoke();\n }\n }, 10);\n return ret.apply(this, arguments);\n };\n } else {\n // TODO how do we handle storage uploads in Zone? and other stuff with cancel() etc?\n return run(() => ret);\n }\n };\n};\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { VERSION, keepUnstableUntilFirst, observeInsideAngular, observeOutsideAngular, ɵAPP_CHECK_PROVIDER_NAME, ɵAngularFireSchedulers, ɵAppCheckInstances, ɵZoneScheduler, ɵgetAllInstancesOf, ɵgetDefaultInstanceOf, ɵisSupportedError, ɵkeepUnstableUntilFirstFactory, ɵzoneWrap };\n","import { getApps as getApps$1, getApp as getApp$1, registerVersion as registerVersion$1, deleteApp as deleteApp$1, initializeApp as initializeApp$1, onLog as onLog$1, setLogLevel as setLogLevel$1 } from 'firebase/app';\nexport * from 'firebase/app';\nimport { from, timer } from 'rxjs';\nimport { concatMap, distinct } from 'rxjs/operators';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, Optional, VERSION as VERSION$1, PLATFORM_ID, NgModule, Inject, NgZone, Injector } from '@angular/core';\nimport { VERSION, ɵAngularFireSchedulers, ɵzoneWrap } from '@angular/fire';\nclass FirebaseApp {\n constructor(app) {\n return app;\n }\n}\nclass FirebaseApps {\n constructor() {\n return getApps$1();\n }\n}\nconst firebaseApp$ = /*#__PURE__*/ /*#__PURE__*/timer(0, 300).pipe( /*#__PURE__*/concatMap(() => from(getApps$1())), /*#__PURE__*/distinct());\nfunction defaultFirebaseAppFactory(provided) {\n // Use the provided app, if there is only one, otherwise fetch the default app\n if (provided && provided.length === 1) {\n return provided[0];\n }\n return new FirebaseApp(getApp$1());\n}\n// With FIREBASE_APPS I wanted to capture the default app instance, if it is initialized by\n// the reserved URL; ɵPROVIDED_FIREBASE_APPS is not for public consumption and serves to ensure that all\n// provideFirebaseApp(...) calls are satisfied before FirebaseApp$ or FirebaseApp is resolved\nconst PROVIDED_FIREBASE_APPS = /*#__PURE__*/new InjectionToken('angularfire2._apps');\n// Injecting FirebaseApp will now only inject the default Firebase App\n// this allows allows beginners to import /__/firebase/init.js to auto initialize Firebase App\n// from the reserved URL.\nconst DEFAULT_FIREBASE_APP_PROVIDER = {\n provide: FirebaseApp,\n useFactory: defaultFirebaseAppFactory,\n deps: [[/*#__PURE__*/new Optional(), PROVIDED_FIREBASE_APPS]]\n};\nconst FIREBASE_APPS_PROVIDER = {\n provide: FirebaseApps,\n deps: [[/*#__PURE__*/new Optional(), PROVIDED_FIREBASE_APPS]]\n};\nfunction firebaseAppFactory(fn) {\n return (zone, injector) => {\n const app = zone.runOutsideAngular(() => fn(injector));\n return new FirebaseApp(app);\n };\n}\nlet FirebaseAppModule = /*#__PURE__*/(() => {\n class FirebaseAppModule {\n // eslint-disable-next-line @typescript-eslint/ban-types\n constructor(platformId) {\n registerVersion$1('angularfire', VERSION.full, 'core');\n registerVersion$1('angularfire', VERSION.full, 'app');\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\n registerVersion$1('angular', VERSION$1.full, platformId.toString());\n }\n static ɵfac = function FirebaseAppModule_Factory(t) {\n return new (t || FirebaseAppModule)(i0.ɵɵinject(PLATFORM_ID));\n };\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: FirebaseAppModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [DEFAULT_FIREBASE_APP_PROVIDER, FIREBASE_APPS_PROVIDER]\n });\n }\n return FirebaseAppModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n// Calling initializeApp({ ... }, 'name') multiple times will add more FirebaseApps into the FIREBASE_APPS\n// injection scope. This allows developers to more easily work with multiple Firebase Applications. Downside\n// is that DI for app name and options doesn't really make sense anymore.\nfunction provideFirebaseApp(fn, ...deps) {\n return {\n ngModule: FirebaseAppModule,\n providers: [{\n provide: PROVIDED_FIREBASE_APPS,\n useFactory: firebaseAppFactory(fn),\n multi: true,\n deps: [NgZone, Injector, ɵAngularFireSchedulers, ...deps]\n }]\n };\n}\n\n// DO NOT MODIFY, this file is autogenerated by tools/build.ts\nconst deleteApp = /*#__PURE__*/ɵzoneWrap(deleteApp$1, true);\nconst getApp = /*#__PURE__*/ɵzoneWrap(getApp$1, true);\nconst getApps = /*#__PURE__*/ɵzoneWrap(getApps$1, true);\nconst initializeApp = /*#__PURE__*/ɵzoneWrap(initializeApp$1, true);\nconst onLog = /*#__PURE__*/ɵzoneWrap(onLog$1, true);\nconst registerVersion = /*#__PURE__*/ɵzoneWrap(registerVersion$1, true);\nconst setLogLevel = /*#__PURE__*/ɵzoneWrap(setLogLevel$1, true);\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { FirebaseApp, FirebaseAppModule, FirebaseApps, deleteApp, firebaseApp$, getApp, getApps, initializeApp, onLog, provideFirebaseApp, registerVersion, setLogLevel };\n","import { _getProvider, getApp, _registerComponent, registerVersion } from '@firebase/app';\nimport { Component } from '@firebase/component';\nimport { Deferred, ErrorFactory, isIndexedDBAvailable, uuidv4, getGlobal, base64, issuedAtTime, calculateBackoffMillis, getModularInstance } from '@firebase/util';\nimport { Logger } from '@firebase/logger';\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst APP_CHECK_STATES = new Map();\nconst DEFAULT_STATE = {\n activated: false,\n tokenObservers: []\n};\nconst DEBUG_STATE = {\n initialized: false,\n enabled: false\n};\n/**\r\n * Gets a reference to the state object.\r\n */\nfunction getStateReference(app) {\n return APP_CHECK_STATES.get(app) || Object.assign({}, DEFAULT_STATE);\n}\n/**\r\n * Set once on initialization. The map should hold the same reference to the\r\n * same object until this entry is deleted.\r\n */\nfunction setInitialState(app, state) {\n APP_CHECK_STATES.set(app, state);\n return APP_CHECK_STATES.get(app);\n}\nfunction getDebugState() {\n return DEBUG_STATE;\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst BASE_ENDPOINT = 'https://content-firebaseappcheck.googleapis.com/v1';\nconst EXCHANGE_RECAPTCHA_TOKEN_METHOD = 'exchangeRecaptchaV3Token';\nconst EXCHANGE_RECAPTCHA_ENTERPRISE_TOKEN_METHOD = 'exchangeRecaptchaEnterpriseToken';\nconst EXCHANGE_DEBUG_TOKEN_METHOD = 'exchangeDebugToken';\nconst TOKEN_REFRESH_TIME = {\n /**\r\n * The offset time before token natural expiration to run the refresh.\r\n * This is currently 5 minutes.\r\n */\n OFFSET_DURATION: 5 * 60 * 1000,\n /**\r\n * This is the first retrial wait after an error. This is currently\r\n * 30 seconds.\r\n */\n RETRIAL_MIN_WAIT: 30 * 1000,\n /**\r\n * This is the maximum retrial wait, currently 16 minutes.\r\n */\n RETRIAL_MAX_WAIT: 16 * 60 * 1000\n};\n/**\r\n * One day in millis, for certain error code backoffs.\r\n */\nconst ONE_DAY = 24 * 60 * 60 * 1000;\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Port from auth proactiverefresh.js\r\n *\r\n */\n// TODO: move it to @firebase/util?\n// TODO: allow to config whether refresh should happen in the background\nclass Refresher {\n constructor(operation, retryPolicy, getWaitDuration, lowerBound, upperBound) {\n this.operation = operation;\n this.retryPolicy = retryPolicy;\n this.getWaitDuration = getWaitDuration;\n this.lowerBound = lowerBound;\n this.upperBound = upperBound;\n this.pending = null;\n this.nextErrorWaitInterval = lowerBound;\n if (lowerBound > upperBound) {\n throw new Error('Proactive refresh lower bound greater than upper bound!');\n }\n }\n start() {\n this.nextErrorWaitInterval = this.lowerBound;\n this.process(true).catch(() => {\n /* we don't care about the result */\n });\n }\n stop() {\n if (this.pending) {\n this.pending.reject('cancelled');\n this.pending = null;\n }\n }\n isRunning() {\n return !!this.pending;\n }\n async process(hasSucceeded) {\n this.stop();\n try {\n this.pending = new Deferred();\n this.pending.promise.catch(_e => {\n /* ignore */\n });\n await sleep(this.getNextRun(hasSucceeded));\n // Why do we resolve a promise, then immediate wait for it?\n // We do it to make the promise chain cancellable.\n // We can call stop() which rejects the promise before the following line execute, which makes\n // the code jump to the catch block.\n // TODO: unit test this\n this.pending.resolve();\n await this.pending.promise;\n this.pending = new Deferred();\n this.pending.promise.catch(_e => {\n /* ignore */\n });\n await this.operation();\n this.pending.resolve();\n await this.pending.promise;\n this.process(true).catch(() => {\n /* we don't care about the result */\n });\n } catch (error) {\n if (this.retryPolicy(error)) {\n this.process(false).catch(() => {\n /* we don't care about the result */\n });\n } else {\n this.stop();\n }\n }\n }\n getNextRun(hasSucceeded) {\n if (hasSucceeded) {\n // If last operation succeeded, reset next error wait interval and return\n // the default wait duration.\n this.nextErrorWaitInterval = this.lowerBound;\n // Return typical wait duration interval after a successful operation.\n return this.getWaitDuration();\n } else {\n // Get next error wait interval.\n const currentErrorWaitInterval = this.nextErrorWaitInterval;\n // Double interval for next consecutive error.\n this.nextErrorWaitInterval *= 2;\n // Make sure next wait interval does not exceed the maximum upper bound.\n if (this.nextErrorWaitInterval > this.upperBound) {\n this.nextErrorWaitInterval = this.upperBound;\n }\n return currentErrorWaitInterval;\n }\n }\n}\nfunction sleep(ms) {\n return new Promise(resolve => {\n setTimeout(resolve, ms);\n });\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst ERRORS = {\n [\"already-initialized\" /* AppCheckError.ALREADY_INITIALIZED */]: 'You have already called initializeAppCheck() for FirebaseApp {$appName} with ' + 'different options. To avoid this error, call initializeAppCheck() with the ' + 'same options as when it was originally called. This will return the ' + 'already initialized instance.',\n [\"use-before-activation\" /* AppCheckError.USE_BEFORE_ACTIVATION */]: 'App Check is being used before initializeAppCheck() is called for FirebaseApp {$appName}. ' + 'Call initializeAppCheck() before instantiating other Firebase services.',\n [\"fetch-network-error\" /* AppCheckError.FETCH_NETWORK_ERROR */]: 'Fetch failed to connect to a network. Check Internet connection. ' + 'Original error: {$originalErrorMessage}.',\n [\"fetch-parse-error\" /* AppCheckError.FETCH_PARSE_ERROR */]: 'Fetch client could not parse response.' + ' Original error: {$originalErrorMessage}.',\n [\"fetch-status-error\" /* AppCheckError.FETCH_STATUS_ERROR */]: 'Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.',\n [\"storage-open\" /* AppCheckError.STORAGE_OPEN */]: 'Error thrown when opening storage. Original error: {$originalErrorMessage}.',\n [\"storage-get\" /* AppCheckError.STORAGE_GET */]: 'Error thrown when reading from storage. Original error: {$originalErrorMessage}.',\n [\"storage-set\" /* AppCheckError.STORAGE_WRITE */]: 'Error thrown when writing to storage. Original error: {$originalErrorMessage}.',\n [\"recaptcha-error\" /* AppCheckError.RECAPTCHA_ERROR */]: 'ReCAPTCHA error.',\n [\"throttled\" /* AppCheckError.THROTTLED */]: `Requests throttled due to {$httpStatus} error. Attempts allowed again after {$time}`\n};\nconst ERROR_FACTORY = new ErrorFactory('appCheck', 'AppCheck', ERRORS);\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction getRecaptcha(isEnterprise = false) {\n var _a;\n if (isEnterprise) {\n return (_a = self.grecaptcha) === null || _a === void 0 ? void 0 : _a.enterprise;\n }\n return self.grecaptcha;\n}\nfunction ensureActivated(app) {\n if (!getStateReference(app).activated) {\n throw ERROR_FACTORY.create(\"use-before-activation\" /* AppCheckError.USE_BEFORE_ACTIVATION */, {\n appName: app.name\n });\n }\n}\nfunction getDurationString(durationInMillis) {\n const totalSeconds = Math.round(durationInMillis / 1000);\n const days = Math.floor(totalSeconds / (3600 * 24));\n const hours = Math.floor((totalSeconds - days * 3600 * 24) / 3600);\n const minutes = Math.floor((totalSeconds - days * 3600 * 24 - hours * 3600) / 60);\n const seconds = totalSeconds - days * 3600 * 24 - hours * 3600 - minutes * 60;\n let result = '';\n if (days) {\n result += pad(days) + 'd:';\n }\n if (hours) {\n result += pad(hours) + 'h:';\n }\n result += pad(minutes) + 'm:' + pad(seconds) + 's';\n return result;\n}\nfunction pad(value) {\n if (value === 0) {\n return '00';\n }\n return value >= 10 ? value.toString() : '0' + value;\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nasync function exchangeToken({\n url,\n body\n}, heartbeatServiceProvider) {\n const headers = {\n 'Content-Type': 'application/json'\n };\n // If heartbeat service exists, add heartbeat header string to the header.\n const heartbeatService = heartbeatServiceProvider.getImmediate({\n optional: true\n });\n if (heartbeatService) {\n const heartbeatsHeader = await heartbeatService.getHeartbeatsHeader();\n if (heartbeatsHeader) {\n headers['X-Firebase-Client'] = heartbeatsHeader;\n }\n }\n const options = {\n method: 'POST',\n body: JSON.stringify(body),\n headers\n };\n let response;\n try {\n response = await fetch(url, options);\n } catch (originalError) {\n throw ERROR_FACTORY.create(\"fetch-network-error\" /* AppCheckError.FETCH_NETWORK_ERROR */, {\n originalErrorMessage: originalError === null || originalError === void 0 ? void 0 : originalError.message\n });\n }\n if (response.status !== 200) {\n throw ERROR_FACTORY.create(\"fetch-status-error\" /* AppCheckError.FETCH_STATUS_ERROR */, {\n httpStatus: response.status\n });\n }\n let responseBody;\n try {\n // JSON parsing throws SyntaxError if the response body isn't a JSON string.\n responseBody = await response.json();\n } catch (originalError) {\n throw ERROR_FACTORY.create(\"fetch-parse-error\" /* AppCheckError.FETCH_PARSE_ERROR */, {\n originalErrorMessage: originalError === null || originalError === void 0 ? void 0 : originalError.message\n });\n }\n // Protobuf duration format.\n // https://developers.google.com/protocol-buffers/docs/reference/java/com/google/protobuf/Duration\n const match = responseBody.ttl.match(/^([\\d.]+)(s)$/);\n if (!match || !match[2] || isNaN(Number(match[1]))) {\n throw ERROR_FACTORY.create(\"fetch-parse-error\" /* AppCheckError.FETCH_PARSE_ERROR */, {\n originalErrorMessage: `ttl field (timeToLive) is not in standard Protobuf Duration ` + `format: ${responseBody.ttl}`\n });\n }\n const timeToLiveAsNumber = Number(match[1]) * 1000;\n const now = Date.now();\n return {\n token: responseBody.token,\n expireTimeMillis: now + timeToLiveAsNumber,\n issuedAtTimeMillis: now\n };\n}\nfunction getExchangeRecaptchaV3TokenRequest(app, reCAPTCHAToken) {\n const {\n projectId,\n appId,\n apiKey\n } = app.options;\n return {\n url: `${BASE_ENDPOINT}/projects/${projectId}/apps/${appId}:${EXCHANGE_RECAPTCHA_TOKEN_METHOD}?key=${apiKey}`,\n body: {\n 'recaptcha_v3_token': reCAPTCHAToken\n }\n };\n}\nfunction getExchangeRecaptchaEnterpriseTokenRequest(app, reCAPTCHAToken) {\n const {\n projectId,\n appId,\n apiKey\n } = app.options;\n return {\n url: `${BASE_ENDPOINT}/projects/${projectId}/apps/${appId}:${EXCHANGE_RECAPTCHA_ENTERPRISE_TOKEN_METHOD}?key=${apiKey}`,\n body: {\n 'recaptcha_enterprise_token': reCAPTCHAToken\n }\n };\n}\nfunction getExchangeDebugTokenRequest(app, debugToken) {\n const {\n projectId,\n appId,\n apiKey\n } = app.options;\n return {\n url: `${BASE_ENDPOINT}/projects/${projectId}/apps/${appId}:${EXCHANGE_DEBUG_TOKEN_METHOD}?key=${apiKey}`,\n body: {\n // eslint-disable-next-line\n debug_token: debugToken\n }\n };\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst DB_NAME = 'firebase-app-check-database';\nconst DB_VERSION = 1;\nconst STORE_NAME = 'firebase-app-check-store';\nconst DEBUG_TOKEN_KEY = 'debug-token';\nlet dbPromise = null;\nfunction getDBPromise() {\n if (dbPromise) {\n return dbPromise;\n }\n dbPromise = new Promise((resolve, reject) => {\n try {\n const request = indexedDB.open(DB_NAME, DB_VERSION);\n request.onsuccess = event => {\n resolve(event.target.result);\n };\n request.onerror = event => {\n var _a;\n reject(ERROR_FACTORY.create(\"storage-open\" /* AppCheckError.STORAGE_OPEN */, {\n originalErrorMessage: (_a = event.target.error) === null || _a === void 0 ? void 0 : _a.message\n }));\n };\n request.onupgradeneeded = event => {\n const db = event.target.result;\n // We don't use 'break' in this switch statement, the fall-through\n // behavior is what we want, because if there are multiple versions between\n // the old version and the current version, we want ALL the migrations\n // that correspond to those versions to run, not only the last one.\n // eslint-disable-next-line default-case\n switch (event.oldVersion) {\n case 0:\n db.createObjectStore(STORE_NAME, {\n keyPath: 'compositeKey'\n });\n }\n };\n } catch (e) {\n reject(ERROR_FACTORY.create(\"storage-open\" /* AppCheckError.STORAGE_OPEN */, {\n originalErrorMessage: e === null || e === void 0 ? void 0 : e.message\n }));\n }\n });\n return dbPromise;\n}\nfunction readTokenFromIndexedDB(app) {\n return read(computeKey(app));\n}\nfunction writeTokenToIndexedDB(app, token) {\n return write(computeKey(app), token);\n}\nfunction writeDebugTokenToIndexedDB(token) {\n return write(DEBUG_TOKEN_KEY, token);\n}\nfunction readDebugTokenFromIndexedDB() {\n return read(DEBUG_TOKEN_KEY);\n}\nasync function write(key, value) {\n const db = await getDBPromise();\n const transaction = db.transaction(STORE_NAME, 'readwrite');\n const store = transaction.objectStore(STORE_NAME);\n const request = store.put({\n compositeKey: key,\n value\n });\n return new Promise((resolve, reject) => {\n request.onsuccess = _event => {\n resolve();\n };\n transaction.onerror = event => {\n var _a;\n reject(ERROR_FACTORY.create(\"storage-set\" /* AppCheckError.STORAGE_WRITE */, {\n originalErrorMessage: (_a = event.target.error) === null || _a === void 0 ? void 0 : _a.message\n }));\n };\n });\n}\nasync function read(key) {\n const db = await getDBPromise();\n const transaction = db.transaction(STORE_NAME, 'readonly');\n const store = transaction.objectStore(STORE_NAME);\n const request = store.get(key);\n return new Promise((resolve, reject) => {\n request.onsuccess = event => {\n const result = event.target.result;\n if (result) {\n resolve(result.value);\n } else {\n resolve(undefined);\n }\n };\n transaction.onerror = event => {\n var _a;\n reject(ERROR_FACTORY.create(\"storage-get\" /* AppCheckError.STORAGE_GET */, {\n originalErrorMessage: (_a = event.target.error) === null || _a === void 0 ? void 0 : _a.message\n }));\n };\n });\n}\nfunction computeKey(app) {\n return `${app.options.appId}-${app.name}`;\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst logger = new Logger('@firebase/app-check');\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Always resolves. In case of an error reading from indexeddb, resolve with undefined\r\n */\nasync function readTokenFromStorage(app) {\n if (isIndexedDBAvailable()) {\n let token = undefined;\n try {\n token = await readTokenFromIndexedDB(app);\n } catch (e) {\n // swallow the error and return undefined\n logger.warn(`Failed to read token from IndexedDB. Error: ${e}`);\n }\n return token;\n }\n return undefined;\n}\n/**\r\n * Always resolves. In case of an error writing to indexeddb, print a warning and resolve the promise\r\n */\nfunction writeTokenToStorage(app, token) {\n if (isIndexedDBAvailable()) {\n return writeTokenToIndexedDB(app, token).catch(e => {\n // swallow the error and resolve the promise\n logger.warn(`Failed to write token to IndexedDB. Error: ${e}`);\n });\n }\n return Promise.resolve();\n}\nasync function readOrCreateDebugTokenFromStorage() {\n /**\r\n * Theoretically race condition can happen if we read, then write in 2 separate transactions.\r\n * But it won't happen here, because this function will be called exactly once.\r\n */\n let existingDebugToken = undefined;\n try {\n existingDebugToken = await readDebugTokenFromIndexedDB();\n } catch (_e) {\n // failed to read from indexeddb. We assume there is no existing debug token, and generate a new one.\n }\n if (!existingDebugToken) {\n // create a new debug token\n const newToken = uuidv4();\n // We don't need to block on writing to indexeddb\n // In case persistence failed, a new debug token will be generated everytime the page is refreshed.\n // It renders the debug token useless because you have to manually register(whitelist) the new token in the firebase console again and again.\n // If you see this error trying to use debug token, it probably means you are using a browser that doesn't support indexeddb.\n // You should switch to a different browser that supports indexeddb\n writeDebugTokenToIndexedDB(newToken).catch(e => logger.warn(`Failed to persist debug token to IndexedDB. Error: ${e}`));\n return newToken;\n } else {\n return existingDebugToken;\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction isDebugMode() {\n const debugState = getDebugState();\n return debugState.enabled;\n}\nasync function getDebugToken() {\n const state = getDebugState();\n if (state.enabled && state.token) {\n return state.token.promise;\n } else {\n // should not happen!\n throw Error(`\n Can't get debug token in production mode.\n `);\n }\n}\nfunction initializeDebugMode() {\n const globals = getGlobal();\n const debugState = getDebugState();\n // Set to true if this function has been called, whether or not\n // it enabled debug mode.\n debugState.initialized = true;\n if (typeof globals.FIREBASE_APPCHECK_DEBUG_TOKEN !== 'string' && globals.FIREBASE_APPCHECK_DEBUG_TOKEN !== true) {\n return;\n }\n debugState.enabled = true;\n const deferredToken = new Deferred();\n debugState.token = deferredToken;\n if (typeof globals.FIREBASE_APPCHECK_DEBUG_TOKEN === 'string') {\n deferredToken.resolve(globals.FIREBASE_APPCHECK_DEBUG_TOKEN);\n } else {\n deferredToken.resolve(readOrCreateDebugTokenFromStorage());\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n// Initial hardcoded value agreed upon across platforms for initial launch.\n// Format left open for possible dynamic error values and other fields in the future.\nconst defaultTokenErrorData = {\n error: 'UNKNOWN_ERROR'\n};\n/**\r\n * Stringify and base64 encode token error data.\r\n *\r\n * @param tokenError Error data, currently hardcoded.\r\n */\nfunction formatDummyToken(tokenErrorData) {\n return base64.encodeString(JSON.stringify(tokenErrorData), /* webSafe= */false);\n}\n/**\r\n * This function always resolves.\r\n * The result will contain an error field if there is any error.\r\n * In case there is an error, the token field in the result will be populated with a dummy value\r\n */\nasync function getToken$2(appCheck, forceRefresh = false) {\n const app = appCheck.app;\n ensureActivated(app);\n const state = getStateReference(app);\n /**\r\n * First check if there is a token in memory from a previous `getToken()` call.\r\n */\n let token = state.token;\n let error = undefined;\n /**\r\n * If an invalid token was found in memory, clear token from\r\n * memory and unset the local variable `token`.\r\n */\n if (token && !isValid(token)) {\n state.token = undefined;\n token = undefined;\n }\n /**\r\n * If there is no valid token in memory, try to load token from indexedDB.\r\n */\n if (!token) {\n // cachedTokenPromise contains the token found in IndexedDB or undefined if not found.\n const cachedToken = await state.cachedTokenPromise;\n if (cachedToken) {\n if (isValid(cachedToken)) {\n token = cachedToken;\n } else {\n // If there was an invalid token in the indexedDB cache, clear it.\n await writeTokenToStorage(app, undefined);\n }\n }\n }\n // Return the cached token (from either memory or indexedDB) if it's valid\n if (!forceRefresh && token && isValid(token)) {\n return {\n token: token.token\n };\n }\n // Only set to true if this `getToken()` call is making the actual\n // REST call to the exchange endpoint, versus waiting for an already\n // in-flight call (see debug and regular exchange endpoint paths below)\n let shouldCallListeners = false;\n /**\r\n * DEBUG MODE\r\n * If debug mode is set, and there is no cached token, fetch a new App\r\n * Check token using the debug token, and return it directly.\r\n */\n if (isDebugMode()) {\n // Avoid making another call to the exchange endpoint if one is in flight.\n if (!state.exchangeTokenPromise) {\n state.exchangeTokenPromise = exchangeToken(getExchangeDebugTokenRequest(app, await getDebugToken()), appCheck.heartbeatServiceProvider).finally(() => {\n // Clear promise when settled - either resolved or rejected.\n state.exchangeTokenPromise = undefined;\n });\n shouldCallListeners = true;\n }\n const tokenFromDebugExchange = await state.exchangeTokenPromise;\n // Write debug token to indexedDB.\n await writeTokenToStorage(app, tokenFromDebugExchange);\n // Write debug token to state.\n state.token = tokenFromDebugExchange;\n return {\n token: tokenFromDebugExchange.token\n };\n }\n /**\r\n * There are no valid tokens in memory or indexedDB and we are not in\r\n * debug mode.\r\n * Request a new token from the exchange endpoint.\r\n */\n try {\n // Avoid making another call to the exchange endpoint if one is in flight.\n if (!state.exchangeTokenPromise) {\n // state.provider is populated in initializeAppCheck()\n // ensureActivated() at the top of this function checks that\n // initializeAppCheck() has been called.\n state.exchangeTokenPromise = state.provider.getToken().finally(() => {\n // Clear promise when settled - either resolved or rejected.\n state.exchangeTokenPromise = undefined;\n });\n shouldCallListeners = true;\n }\n token = await getStateReference(app).exchangeTokenPromise;\n } catch (e) {\n if (e.code === `appCheck/${\"throttled\" /* AppCheckError.THROTTLED */}`) {\n // Warn if throttled, but do not treat it as an error.\n logger.warn(e.message);\n } else {\n // `getToken()` should never throw, but logging error text to console will aid debugging.\n logger.error(e);\n }\n // Always save error to be added to dummy token.\n error = e;\n }\n let interopTokenResult;\n if (!token) {\n // If token is undefined, there must be an error.\n // Return a dummy token along with the error.\n interopTokenResult = makeDummyTokenResult(error);\n } else if (error) {\n if (isValid(token)) {\n // It's also possible a valid token exists, but there's also an error.\n // (Such as if the token is almost expired, tries to refresh, and\n // the exchange request fails.)\n // We add a special error property here so that the refresher will\n // count this as a failed attempt and use the backoff instead of\n // retrying repeatedly with no delay, but any 3P listeners will not\n // be hindered in getting the still-valid token.\n interopTokenResult = {\n token: token.token,\n internalError: error\n };\n } else {\n // No invalid tokens should make it to this step. Memory and cached tokens\n // are checked. Other tokens are from fresh exchanges. But just in case.\n interopTokenResult = makeDummyTokenResult(error);\n }\n } else {\n interopTokenResult = {\n token: token.token\n };\n // write the new token to the memory state as well as the persistent storage.\n // Only do it if we got a valid new token\n state.token = token;\n await writeTokenToStorage(app, token);\n }\n if (shouldCallListeners) {\n notifyTokenListeners(app, interopTokenResult);\n }\n return interopTokenResult;\n}\n/**\r\n * Internal API for limited use tokens. Skips all FAC state and simply calls\r\n * the underlying provider.\r\n */\nasync function getLimitedUseToken$1(appCheck) {\n const app = appCheck.app;\n ensureActivated(app);\n const {\n provider\n } = getStateReference(app);\n if (isDebugMode()) {\n const debugToken = await getDebugToken();\n const {\n token\n } = await exchangeToken(getExchangeDebugTokenRequest(app, debugToken), appCheck.heartbeatServiceProvider);\n return {\n token\n };\n } else {\n // provider is definitely valid since we ensure AppCheck was activated\n const {\n token\n } = await provider.getToken();\n return {\n token\n };\n }\n}\nfunction addTokenListener(appCheck, type, listener, onError) {\n const {\n app\n } = appCheck;\n const state = getStateReference(app);\n const tokenObserver = {\n next: listener,\n error: onError,\n type\n };\n state.tokenObservers = [...state.tokenObservers, tokenObserver];\n // Invoke the listener async immediately if there is a valid token\n // in memory.\n if (state.token && isValid(state.token)) {\n const validToken = state.token;\n Promise.resolve().then(() => {\n listener({\n token: validToken.token\n });\n initTokenRefresher(appCheck);\n }).catch(() => {\n /* we don't care about exceptions thrown in listeners */\n });\n }\n /**\r\n * Wait for any cached token promise to resolve before starting the token\r\n * refresher. The refresher checks to see if there is an existing token\r\n * in state and calls the exchange endpoint if not. We should first let the\r\n * IndexedDB check have a chance to populate state if it can.\r\n *\r\n * Listener call isn't needed here because cachedTokenPromise will call any\r\n * listeners that exist when it resolves.\r\n */\n // state.cachedTokenPromise is always populated in `activate()`.\n void state.cachedTokenPromise.then(() => initTokenRefresher(appCheck));\n}\nfunction removeTokenListener(app, listener) {\n const state = getStateReference(app);\n const newObservers = state.tokenObservers.filter(tokenObserver => tokenObserver.next !== listener);\n if (newObservers.length === 0 && state.tokenRefresher && state.tokenRefresher.isRunning()) {\n state.tokenRefresher.stop();\n }\n state.tokenObservers = newObservers;\n}\n/**\r\n * Logic to create and start refresher as needed.\r\n */\nfunction initTokenRefresher(appCheck) {\n const {\n app\n } = appCheck;\n const state = getStateReference(app);\n // Create the refresher but don't start it if `isTokenAutoRefreshEnabled`\n // is not true.\n let refresher = state.tokenRefresher;\n if (!refresher) {\n refresher = createTokenRefresher(appCheck);\n state.tokenRefresher = refresher;\n }\n if (!refresher.isRunning() && state.isTokenAutoRefreshEnabled) {\n refresher.start();\n }\n}\nfunction createTokenRefresher(appCheck) {\n const {\n app\n } = appCheck;\n return new Refresher(\n // Keep in mind when this fails for any reason other than the ones\n // for which we should retry, it will effectively stop the proactive refresh.\n async () => {\n const state = getStateReference(app);\n // If there is no token, we will try to load it from storage and use it\n // If there is a token, we force refresh it because we know it's going to expire soon\n let result;\n if (!state.token) {\n result = await getToken$2(appCheck);\n } else {\n result = await getToken$2(appCheck, true);\n }\n /**\r\n * getToken() always resolves. In case the result has an error field defined, it means\r\n * the operation failed, and we should retry.\r\n */\n if (result.error) {\n throw result.error;\n }\n /**\r\n * A special `internalError` field reflects that there was an error\r\n * getting a new token from the exchange endpoint, but there's still a\r\n * previous token that's valid for now and this should be passed to 2P/3P\r\n * requests for a token. But we want this callback (`this.operation` in\r\n * `Refresher`) to throw in order to kick off the Refresher's retry\r\n * backoff. (Setting `hasSucceeded` to false.)\r\n */\n if (result.internalError) {\n throw result.internalError;\n }\n }, () => {\n return true;\n }, () => {\n const state = getStateReference(app);\n if (state.token) {\n // issuedAtTime + (50% * total TTL) + 5 minutes\n let nextRefreshTimeMillis = state.token.issuedAtTimeMillis + (state.token.expireTimeMillis - state.token.issuedAtTimeMillis) * 0.5 + 5 * 60 * 1000;\n // Do not allow refresh time to be past (expireTime - 5 minutes)\n const latestAllowableRefresh = state.token.expireTimeMillis - 5 * 60 * 1000;\n nextRefreshTimeMillis = Math.min(nextRefreshTimeMillis, latestAllowableRefresh);\n return Math.max(0, nextRefreshTimeMillis - Date.now());\n } else {\n return 0;\n }\n }, TOKEN_REFRESH_TIME.RETRIAL_MIN_WAIT, TOKEN_REFRESH_TIME.RETRIAL_MAX_WAIT);\n}\nfunction notifyTokenListeners(app, token) {\n const observers = getStateReference(app).tokenObservers;\n for (const observer of observers) {\n try {\n if (observer.type === \"EXTERNAL\" /* ListenerType.EXTERNAL */ && token.error != null) {\n // If this listener was added by a 3P call, send any token error to\n // the supplied error handler. A 3P observer always has an error\n // handler.\n observer.error(token.error);\n } else {\n // If the token has no error field, always return the token.\n // If this is a 2P listener, return the token, whether or not it\n // has an error field.\n observer.next(token);\n }\n } catch (e) {\n // Errors in the listener function itself are always ignored.\n }\n }\n}\nfunction isValid(token) {\n return token.expireTimeMillis - Date.now() > 0;\n}\nfunction makeDummyTokenResult(error) {\n return {\n token: formatDummyToken(defaultTokenErrorData),\n error\n };\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * AppCheck Service class.\r\n */\nclass AppCheckService {\n constructor(app, heartbeatServiceProvider) {\n this.app = app;\n this.heartbeatServiceProvider = heartbeatServiceProvider;\n }\n _delete() {\n const {\n tokenObservers\n } = getStateReference(this.app);\n for (const tokenObserver of tokenObservers) {\n removeTokenListener(this.app, tokenObserver.next);\n }\n return Promise.resolve();\n }\n}\nfunction factory(app, heartbeatServiceProvider) {\n return new AppCheckService(app, heartbeatServiceProvider);\n}\nfunction internalFactory(appCheck) {\n return {\n getToken: forceRefresh => getToken$2(appCheck, forceRefresh),\n getLimitedUseToken: () => getLimitedUseToken$1(appCheck),\n addTokenListener: listener => addTokenListener(appCheck, \"INTERNAL\" /* ListenerType.INTERNAL */, listener),\n removeTokenListener: listener => removeTokenListener(appCheck.app, listener)\n };\n}\nconst name = \"@firebase/app-check\";\nconst version = \"0.8.1\";\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst RECAPTCHA_URL = 'https://www.google.com/recaptcha/api.js';\nconst RECAPTCHA_ENTERPRISE_URL = 'https://www.google.com/recaptcha/enterprise.js';\nfunction initializeV3(app, siteKey) {\n const initialized = new Deferred();\n const state = getStateReference(app);\n state.reCAPTCHAState = {\n initialized\n };\n const divId = makeDiv(app);\n const grecaptcha = getRecaptcha(false);\n if (!grecaptcha) {\n loadReCAPTCHAV3Script(() => {\n const grecaptcha = getRecaptcha(false);\n if (!grecaptcha) {\n // it shouldn't happen.\n throw new Error('no recaptcha');\n }\n queueWidgetRender(app, siteKey, grecaptcha, divId, initialized);\n });\n } else {\n queueWidgetRender(app, siteKey, grecaptcha, divId, initialized);\n }\n return initialized.promise;\n}\nfunction initializeEnterprise(app, siteKey) {\n const initialized = new Deferred();\n const state = getStateReference(app);\n state.reCAPTCHAState = {\n initialized\n };\n const divId = makeDiv(app);\n const grecaptcha = getRecaptcha(true);\n if (!grecaptcha) {\n loadReCAPTCHAEnterpriseScript(() => {\n const grecaptcha = getRecaptcha(true);\n if (!grecaptcha) {\n // it shouldn't happen.\n throw new Error('no recaptcha');\n }\n queueWidgetRender(app, siteKey, grecaptcha, divId, initialized);\n });\n } else {\n queueWidgetRender(app, siteKey, grecaptcha, divId, initialized);\n }\n return initialized.promise;\n}\n/**\r\n * Add listener to render the widget and resolve the promise when\r\n * the grecaptcha.ready() event fires.\r\n */\nfunction queueWidgetRender(app, siteKey, grecaptcha, container, initialized) {\n grecaptcha.ready(() => {\n // Invisible widgets allow us to set a different siteKey for each widget,\n // so we use them to support multiple apps\n renderInvisibleWidget(app, siteKey, grecaptcha, container);\n initialized.resolve(grecaptcha);\n });\n}\n/**\r\n * Add invisible div to page.\r\n */\nfunction makeDiv(app) {\n const divId = `fire_app_check_${app.name}`;\n const invisibleDiv = document.createElement('div');\n invisibleDiv.id = divId;\n invisibleDiv.style.display = 'none';\n document.body.appendChild(invisibleDiv);\n return divId;\n}\nasync function getToken$1(app) {\n ensureActivated(app);\n // ensureActivated() guarantees that reCAPTCHAState is set\n const reCAPTCHAState = getStateReference(app).reCAPTCHAState;\n const recaptcha = await reCAPTCHAState.initialized.promise;\n return new Promise((resolve, _reject) => {\n // Updated after initialization is complete.\n const reCAPTCHAState = getStateReference(app).reCAPTCHAState;\n recaptcha.ready(() => {\n resolve(\n // widgetId is guaranteed to be available if reCAPTCHAState.initialized.promise resolved.\n recaptcha.execute(reCAPTCHAState.widgetId, {\n action: 'fire_app_check'\n }));\n });\n });\n}\n/**\r\n *\r\n * @param app\r\n * @param container - Id of a HTML element.\r\n */\nfunction renderInvisibleWidget(app, siteKey, grecaptcha, container) {\n const widgetId = grecaptcha.render(container, {\n sitekey: siteKey,\n size: 'invisible',\n // Success callback - set state\n callback: () => {\n getStateReference(app).reCAPTCHAState.succeeded = true;\n },\n // Failure callback - set state\n 'error-callback': () => {\n getStateReference(app).reCAPTCHAState.succeeded = false;\n }\n });\n const state = getStateReference(app);\n state.reCAPTCHAState = Object.assign(Object.assign({}, state.reCAPTCHAState), {\n // state.reCAPTCHAState is set in the initialize()\n widgetId\n });\n}\nfunction loadReCAPTCHAV3Script(onload) {\n const script = document.createElement('script');\n script.src = RECAPTCHA_URL;\n script.onload = onload;\n document.head.appendChild(script);\n}\nfunction loadReCAPTCHAEnterpriseScript(onload) {\n const script = document.createElement('script');\n script.src = RECAPTCHA_ENTERPRISE_URL;\n script.onload = onload;\n document.head.appendChild(script);\n}\n\n/**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * App Check provider that can obtain a reCAPTCHA V3 token and exchange it\r\n * for an App Check token.\r\n *\r\n * @public\r\n */\nclass ReCaptchaV3Provider {\n /**\r\n * Create a ReCaptchaV3Provider instance.\r\n * @param siteKey - ReCAPTCHA V3 siteKey.\r\n */\n constructor(_siteKey) {\n this._siteKey = _siteKey;\n /**\r\n * Throttle requests on certain error codes to prevent too many retries\r\n * in a short time.\r\n */\n this._throttleData = null;\n }\n /**\r\n * Returns an App Check token.\r\n * @internal\r\n */\n async getToken() {\n var _a, _b, _c;\n throwIfThrottled(this._throttleData);\n // Top-level `getToken()` has already checked that App Check is initialized\n // and therefore this._app and this._heartbeatServiceProvider are available.\n const attestedClaimsToken = await getToken$1(this._app).catch(_e => {\n // reCaptcha.execute() throws null which is not very descriptive.\n throw ERROR_FACTORY.create(\"recaptcha-error\" /* AppCheckError.RECAPTCHA_ERROR */);\n });\n // Check if a failure state was set by the recaptcha \"error-callback\".\n if (!((_a = getStateReference(this._app).reCAPTCHAState) === null || _a === void 0 ? void 0 : _a.succeeded)) {\n throw ERROR_FACTORY.create(\"recaptcha-error\" /* AppCheckError.RECAPTCHA_ERROR */);\n }\n let result;\n try {\n result = await exchangeToken(getExchangeRecaptchaV3TokenRequest(this._app, attestedClaimsToken), this._heartbeatServiceProvider);\n } catch (e) {\n if ((_b = e.code) === null || _b === void 0 ? void 0 : _b.includes(\"fetch-status-error\" /* AppCheckError.FETCH_STATUS_ERROR */)) {\n this._throttleData = setBackoff(Number((_c = e.customData) === null || _c === void 0 ? void 0 : _c.httpStatus), this._throttleData);\n throw ERROR_FACTORY.create(\"throttled\" /* AppCheckError.THROTTLED */, {\n time: getDurationString(this._throttleData.allowRequestsAfter - Date.now()),\n httpStatus: this._throttleData.httpStatus\n });\n } else {\n throw e;\n }\n }\n // If successful, clear throttle data.\n this._throttleData = null;\n return result;\n }\n /**\r\n * @internal\r\n */\n initialize(app) {\n this._app = app;\n this._heartbeatServiceProvider = _getProvider(app, 'heartbeat');\n initializeV3(app, this._siteKey).catch(() => {\n /* we don't care about the initialization result */\n });\n }\n /**\r\n * @internal\r\n */\n isEqual(otherProvider) {\n if (otherProvider instanceof ReCaptchaV3Provider) {\n return this._siteKey === otherProvider._siteKey;\n } else {\n return false;\n }\n }\n}\n/**\r\n * App Check provider that can obtain a reCAPTCHA Enterprise token and exchange it\r\n * for an App Check token.\r\n *\r\n * @public\r\n */\nclass ReCaptchaEnterpriseProvider {\n /**\r\n * Create a ReCaptchaEnterpriseProvider instance.\r\n * @param siteKey - reCAPTCHA Enterprise score-based site key.\r\n */\n constructor(_siteKey) {\n this._siteKey = _siteKey;\n /**\r\n * Throttle requests on certain error codes to prevent too many retries\r\n * in a short time.\r\n */\n this._throttleData = null;\n }\n /**\r\n * Returns an App Check token.\r\n * @internal\r\n */\n async getToken() {\n var _a, _b, _c;\n throwIfThrottled(this._throttleData);\n // Top-level `getToken()` has already checked that App Check is initialized\n // and therefore this._app and this._heartbeatServiceProvider are available.\n const attestedClaimsToken = await getToken$1(this._app).catch(_e => {\n // reCaptcha.execute() throws null which is not very descriptive.\n throw ERROR_FACTORY.create(\"recaptcha-error\" /* AppCheckError.RECAPTCHA_ERROR */);\n });\n // Check if a failure state was set by the recaptcha \"error-callback\".\n if (!((_a = getStateReference(this._app).reCAPTCHAState) === null || _a === void 0 ? void 0 : _a.succeeded)) {\n throw ERROR_FACTORY.create(\"recaptcha-error\" /* AppCheckError.RECAPTCHA_ERROR */);\n }\n let result;\n try {\n result = await exchangeToken(getExchangeRecaptchaEnterpriseTokenRequest(this._app, attestedClaimsToken), this._heartbeatServiceProvider);\n } catch (e) {\n if ((_b = e.code) === null || _b === void 0 ? void 0 : _b.includes(\"fetch-status-error\" /* AppCheckError.FETCH_STATUS_ERROR */)) {\n this._throttleData = setBackoff(Number((_c = e.customData) === null || _c === void 0 ? void 0 : _c.httpStatus), this._throttleData);\n throw ERROR_FACTORY.create(\"throttled\" /* AppCheckError.THROTTLED */, {\n time: getDurationString(this._throttleData.allowRequestsAfter - Date.now()),\n httpStatus: this._throttleData.httpStatus\n });\n } else {\n throw e;\n }\n }\n // If successful, clear throttle data.\n this._throttleData = null;\n return result;\n }\n /**\r\n * @internal\r\n */\n initialize(app) {\n this._app = app;\n this._heartbeatServiceProvider = _getProvider(app, 'heartbeat');\n initializeEnterprise(app, this._siteKey).catch(() => {\n /* we don't care about the initialization result */\n });\n }\n /**\r\n * @internal\r\n */\n isEqual(otherProvider) {\n if (otherProvider instanceof ReCaptchaEnterpriseProvider) {\n return this._siteKey === otherProvider._siteKey;\n } else {\n return false;\n }\n }\n}\n/**\r\n * Custom provider class.\r\n * @public\r\n */\nclass CustomProvider {\n constructor(_customProviderOptions) {\n this._customProviderOptions = _customProviderOptions;\n }\n /**\r\n * @internal\r\n */\n async getToken() {\n // custom provider\n const customToken = await this._customProviderOptions.getToken();\n // Try to extract IAT from custom token, in case this token is not\n // being newly issued. JWT timestamps are in seconds since epoch.\n const issuedAtTimeSeconds = issuedAtTime(customToken.token);\n // Very basic validation, use current timestamp as IAT if JWT\n // has no `iat` field or value is out of bounds.\n const issuedAtTimeMillis = issuedAtTimeSeconds !== null && issuedAtTimeSeconds < Date.now() && issuedAtTimeSeconds > 0 ? issuedAtTimeSeconds * 1000 : Date.now();\n return Object.assign(Object.assign({}, customToken), {\n issuedAtTimeMillis\n });\n }\n /**\r\n * @internal\r\n */\n initialize(app) {\n this._app = app;\n }\n /**\r\n * @internal\r\n */\n isEqual(otherProvider) {\n if (otherProvider instanceof CustomProvider) {\n return this._customProviderOptions.getToken.toString() === otherProvider._customProviderOptions.getToken.toString();\n } else {\n return false;\n }\n }\n}\n/**\r\n * Set throttle data to block requests until after a certain time\r\n * depending on the failed request's status code.\r\n * @param httpStatus - Status code of failed request.\r\n * @param throttleData - `ThrottleData` object containing previous throttle\r\n * data state.\r\n * @returns Data about current throttle state and expiration time.\r\n */\nfunction setBackoff(httpStatus, throttleData) {\n /**\r\n * Block retries for 1 day for the following error codes:\r\n *\r\n * 404: Likely malformed URL.\r\n *\r\n * 403:\r\n * - Attestation failed\r\n * - Wrong API key\r\n * - Project deleted\r\n */\n if (httpStatus === 404 || httpStatus === 403) {\n return {\n backoffCount: 1,\n allowRequestsAfter: Date.now() + ONE_DAY,\n httpStatus\n };\n } else {\n /**\r\n * For all other error codes, the time when it is ok to retry again\r\n * is based on exponential backoff.\r\n */\n const backoffCount = throttleData ? throttleData.backoffCount : 0;\n const backoffMillis = calculateBackoffMillis(backoffCount, 1000, 2);\n return {\n backoffCount: backoffCount + 1,\n allowRequestsAfter: Date.now() + backoffMillis,\n httpStatus\n };\n }\n}\nfunction throwIfThrottled(throttleData) {\n if (throttleData) {\n if (Date.now() - throttleData.allowRequestsAfter <= 0) {\n // If before, throw.\n throw ERROR_FACTORY.create(\"throttled\" /* AppCheckError.THROTTLED */, {\n time: getDurationString(throttleData.allowRequestsAfter - Date.now()),\n httpStatus: throttleData.httpStatus\n });\n }\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Activate App Check for the given app. Can be called only once per app.\r\n * @param app - the {@link @firebase/app#FirebaseApp} to activate App Check for\r\n * @param options - App Check initialization options\r\n * @public\r\n */\nfunction initializeAppCheck(app = getApp(), options) {\n app = getModularInstance(app);\n const provider = _getProvider(app, 'app-check');\n // Ensure initializeDebugMode() is only called once.\n if (!getDebugState().initialized) {\n initializeDebugMode();\n }\n // Log a message containing the debug token when `initializeAppCheck()`\n // is called in debug mode.\n if (isDebugMode()) {\n // Do not block initialization to get the token for the message.\n void getDebugToken().then(token =>\n // Not using logger because I don't think we ever want this accidentally hidden.\n console.log(`App Check debug token: ${token}. You will need to add it to your app's App Check settings in the Firebase console for it to work.`));\n }\n if (provider.isInitialized()) {\n const existingInstance = provider.getImmediate();\n const initialOptions = provider.getOptions();\n if (initialOptions.isTokenAutoRefreshEnabled === options.isTokenAutoRefreshEnabled && initialOptions.provider.isEqual(options.provider)) {\n return existingInstance;\n } else {\n throw ERROR_FACTORY.create(\"already-initialized\" /* AppCheckError.ALREADY_INITIALIZED */, {\n appName: app.name\n });\n }\n }\n const appCheck = provider.initialize({\n options\n });\n _activate(app, options.provider, options.isTokenAutoRefreshEnabled);\n // If isTokenAutoRefreshEnabled is false, do not send any requests to the\n // exchange endpoint without an explicit call from the user either directly\n // or through another Firebase library (storage, functions, etc.)\n if (getStateReference(app).isTokenAutoRefreshEnabled) {\n // Adding a listener will start the refresher and fetch a token if needed.\n // This gets a token ready and prevents a delay when an internal library\n // requests the token.\n // Listener function does not need to do anything, its base functionality\n // of calling getToken() already fetches token and writes it to memory/storage.\n addTokenListener(appCheck, \"INTERNAL\" /* ListenerType.INTERNAL */, () => {});\n }\n return appCheck;\n}\n/**\r\n * Activate App Check\r\n * @param app - Firebase app to activate App Check for.\r\n * @param provider - reCAPTCHA v3 provider or\r\n * custom token provider.\r\n * @param isTokenAutoRefreshEnabled - If true, the SDK automatically\r\n * refreshes App Check tokens as needed. If undefined, defaults to the\r\n * value of `app.automaticDataCollectionEnabled`, which defaults to\r\n * false and can be set in the app config.\r\n */\nfunction _activate(app, provider, isTokenAutoRefreshEnabled) {\n // Create an entry in the APP_CHECK_STATES map. Further changes should\n // directly mutate this object.\n const state = setInitialState(app, Object.assign({}, DEFAULT_STATE));\n state.activated = true;\n state.provider = provider; // Read cached token from storage if it exists and store it in memory.\n state.cachedTokenPromise = readTokenFromStorage(app).then(cachedToken => {\n if (cachedToken && isValid(cachedToken)) {\n state.token = cachedToken;\n // notify all listeners with the cached token\n notifyTokenListeners(app, {\n token: cachedToken.token\n });\n }\n return cachedToken;\n });\n // Use value of global `automaticDataCollectionEnabled` (which\n // itself defaults to false if not specified in config) if\n // `isTokenAutoRefreshEnabled` param was not provided by user.\n state.isTokenAutoRefreshEnabled = isTokenAutoRefreshEnabled === undefined ? app.automaticDataCollectionEnabled : isTokenAutoRefreshEnabled;\n state.provider.initialize(app);\n}\n/**\r\n * Set whether App Check will automatically refresh tokens as needed.\r\n *\r\n * @param appCheckInstance - The App Check service instance.\r\n * @param isTokenAutoRefreshEnabled - If true, the SDK automatically\r\n * refreshes App Check tokens as needed. This overrides any value set\r\n * during `initializeAppCheck()`.\r\n * @public\r\n */\nfunction setTokenAutoRefreshEnabled(appCheckInstance, isTokenAutoRefreshEnabled) {\n const app = appCheckInstance.app;\n const state = getStateReference(app);\n // This will exist if any product libraries have called\n // `addTokenListener()`\n if (state.tokenRefresher) {\n if (isTokenAutoRefreshEnabled === true) {\n state.tokenRefresher.start();\n } else {\n state.tokenRefresher.stop();\n }\n }\n state.isTokenAutoRefreshEnabled = isTokenAutoRefreshEnabled;\n}\n/**\r\n * Get the current App Check token. Attaches to the most recent\r\n * in-flight request if one is present. Returns null if no token\r\n * is present and no token requests are in-flight.\r\n *\r\n * @param appCheckInstance - The App Check service instance.\r\n * @param forceRefresh - If true, will always try to fetch a fresh token.\r\n * If false, will use a cached token if found in storage.\r\n * @public\r\n */\nasync function getToken(appCheckInstance, forceRefresh) {\n const result = await getToken$2(appCheckInstance, forceRefresh);\n if (result.error) {\n throw result.error;\n }\n return {\n token: result.token\n };\n}\n/**\r\n * Requests a Firebase App Check token. This method should be used\r\n * only if you need to authorize requests to a non-Firebase backend.\r\n *\r\n * Returns limited-use tokens that are intended for use with your\r\n * non-Firebase backend endpoints that are protected with\r\n * \r\n * Replay Protection. This method\r\n * does not affect the token generation behavior of the\r\n * #getAppCheckToken() method.\r\n *\r\n * @param appCheckInstance - The App Check service instance.\r\n * @returns The limited use token.\r\n * @public\r\n */\nfunction getLimitedUseToken(appCheckInstance) {\n return getLimitedUseToken$1(appCheckInstance);\n}\n/**\r\n * Wraps `addTokenListener`/`removeTokenListener` methods in an `Observer`\r\n * pattern for public use.\r\n */\nfunction onTokenChanged(appCheckInstance, onNextOrObserver, onError,\n/**\r\n * NOTE: Although an `onCompletion` callback can be provided, it will\r\n * never be called because the token stream is never-ending.\r\n * It is added only for API consistency with the observer pattern, which\r\n * we follow in JS APIs.\r\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nonCompletion) {\n let nextFn = () => {};\n let errorFn = () => {};\n if (onNextOrObserver.next != null) {\n nextFn = onNextOrObserver.next.bind(onNextOrObserver);\n } else {\n nextFn = onNextOrObserver;\n }\n if (onNextOrObserver.error != null) {\n errorFn = onNextOrObserver.error.bind(onNextOrObserver);\n } else if (onError) {\n errorFn = onError;\n }\n addTokenListener(appCheckInstance, \"EXTERNAL\" /* ListenerType.EXTERNAL */, nextFn, errorFn);\n return () => removeTokenListener(appCheckInstance.app, nextFn);\n}\n\n/**\r\n * The Firebase App Check Web SDK.\r\n *\r\n * @remarks\r\n * Firebase App Check does not work in a Node.js environment using `ReCaptchaV3Provider` or\r\n * `ReCaptchaEnterpriseProvider`, but can be used in Node.js if you use\r\n * `CustomProvider` and write your own attestation method.\r\n *\r\n * @packageDocumentation\r\n */\nconst APP_CHECK_NAME = 'app-check';\nconst APP_CHECK_NAME_INTERNAL = 'app-check-internal';\nfunction registerAppCheck() {\n // The public interface\n _registerComponent(new Component(APP_CHECK_NAME, container => {\n // getImmediate for FirebaseApp will always succeed\n const app = container.getProvider('app').getImmediate();\n const heartbeatServiceProvider = container.getProvider('heartbeat');\n return factory(app, heartbeatServiceProvider);\n }, \"PUBLIC\" /* ComponentType.PUBLIC */).setInstantiationMode(\"EXPLICIT\" /* InstantiationMode.EXPLICIT */)\n /**\r\n * Initialize app-check-internal after app-check is initialized to make AppCheck available to\r\n * other Firebase SDKs\r\n */.setInstanceCreatedCallback((container, _identifier, _appcheckService) => {\n container.getProvider(APP_CHECK_NAME_INTERNAL).initialize();\n }));\n // The internal interface used by other Firebase products\n _registerComponent(new Component(APP_CHECK_NAME_INTERNAL, container => {\n const appCheck = container.getProvider('app-check').getImmediate();\n return internalFactory(appCheck);\n }, \"PUBLIC\" /* ComponentType.PUBLIC */).setInstantiationMode(\"EXPLICIT\" /* InstantiationMode.EXPLICIT */));\n registerVersion(name, version);\n}\nregisterAppCheck();\nexport { CustomProvider, ReCaptchaEnterpriseProvider, ReCaptchaV3Provider, getLimitedUseToken, getToken, initializeAppCheck, onTokenChanged, setTokenAutoRefreshEnabled };\n","import { ɵAPP_CHECK_PROVIDER_NAME, ɵgetAllInstancesOf, ɵgetDefaultInstanceOf, ɵAppCheckInstances, VERSION, ɵAngularFireSchedulers, ɵzoneWrap } from '@angular/fire';\nexport { ɵAppCheckInstances as AppCheckInstances } from '@angular/fire';\nimport { from, timer } from 'rxjs';\nimport { concatMap, distinct } from 'rxjs/operators';\nimport { isPlatformServer } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, isDevMode, Optional, PLATFORM_ID, NgModule, NgZone, Injector } from '@angular/core';\nimport { FirebaseApp, FirebaseApps } from '@angular/fire/app';\nimport { registerVersion } from 'firebase/app';\nimport { getLimitedUseToken as getLimitedUseToken$1, getToken as getToken$1, initializeAppCheck as initializeAppCheck$1, onTokenChanged as onTokenChanged$1, setTokenAutoRefreshEnabled as setTokenAutoRefreshEnabled$1 } from 'firebase/app-check';\nexport * from 'firebase/app-check';\nclass AppCheck {\n constructor(appCheck) {\n return appCheck;\n }\n}\nconst appCheckInstance$ = /*#__PURE__*/ /*#__PURE__*/timer(0, 300).pipe( /*#__PURE__*/concatMap(() => from(ɵgetAllInstancesOf(ɵAPP_CHECK_PROVIDER_NAME))), /*#__PURE__*/distinct());\nconst PROVIDED_APP_CHECK_INSTANCES = /*#__PURE__*/new InjectionToken('angularfire2.app-check-instances');\nfunction defaultAppCheckInstanceFactory(provided, defaultApp) {\n const defaultAppCheck = ɵgetDefaultInstanceOf(ɵAPP_CHECK_PROVIDER_NAME, provided, defaultApp);\n return defaultAppCheck && new AppCheck(defaultAppCheck);\n}\nconst LOCALHOSTS = ['localhost', '0.0.0.0', '127.0.0.1'];\nconst isLocalhost = typeof window !== 'undefined' && /*#__PURE__*/LOCALHOSTS.includes(window.location.hostname);\nfunction appCheckInstanceFactory(fn) {\n return (zone, injector, platformId) => {\n // Node should use admin token provider, browser devmode and localhost should use debug token\n if (!isPlatformServer(platformId) && (isDevMode() || isLocalhost)) {\n globalThis.FIREBASE_APPCHECK_DEBUG_TOKEN ??= true;\n }\n const appCheck = zone.runOutsideAngular(() => fn(injector));\n return new AppCheck(appCheck);\n };\n}\nconst APP_CHECK_INSTANCES_PROVIDER = {\n provide: ɵAppCheckInstances,\n deps: [[/*#__PURE__*/new Optional(), PROVIDED_APP_CHECK_INSTANCES]]\n};\nconst DEFAULT_APP_CHECK_INSTANCE_PROVIDER = {\n provide: AppCheck,\n useFactory: defaultAppCheckInstanceFactory,\n deps: [[/*#__PURE__*/new Optional(), PROVIDED_APP_CHECK_INSTANCES], FirebaseApp, PLATFORM_ID]\n};\nlet AppCheckModule = /*#__PURE__*/(() => {\n class AppCheckModule {\n constructor() {\n registerVersion('angularfire', VERSION.full, 'app-check');\n }\n static ɵfac = function AppCheckModule_Factory(t) {\n return new (t || AppCheckModule)();\n };\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: AppCheckModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [DEFAULT_APP_CHECK_INSTANCE_PROVIDER, APP_CHECK_INSTANCES_PROVIDER]\n });\n }\n return AppCheckModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction provideAppCheck(fn, ...deps) {\n return {\n ngModule: AppCheckModule,\n providers: [{\n provide: PROVIDED_APP_CHECK_INSTANCES,\n useFactory: appCheckInstanceFactory(fn),\n multi: true,\n deps: [NgZone, Injector, PLATFORM_ID, ɵAngularFireSchedulers, FirebaseApps, ...deps]\n }]\n };\n}\n\n// DO NOT MODIFY, this file is autogenerated by tools/build.ts\nconst getLimitedUseToken = /*#__PURE__*/ɵzoneWrap(getLimitedUseToken$1, true);\nconst getToken = /*#__PURE__*/ɵzoneWrap(getToken$1, true);\nconst initializeAppCheck = /*#__PURE__*/ɵzoneWrap(initializeAppCheck$1, true);\nconst onTokenChanged = /*#__PURE__*/ɵzoneWrap(onTokenChanged$1, true);\nconst setTokenAutoRefreshEnabled = /*#__PURE__*/ɵzoneWrap(setTokenAutoRefreshEnabled$1, true);\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AppCheck, AppCheckModule, appCheckInstance$, getLimitedUseToken, getToken, initializeAppCheck, onTokenChanged, provideAppCheck, setTokenAutoRefreshEnabled };\n","import firebase from '@firebase/app-compat';\nexport { default } from '@firebase/app-compat';\nvar name = \"firebase\";\nvar version = \"10.7.1\";\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfirebase.registerVersion(name, version, 'app-compat');\n","import * as i0 from '@angular/core';\nimport { InjectionToken, isDevMode, NgZone, Optional, VERSION as VERSION$1, PLATFORM_ID, NgModule, Inject } from '@angular/core';\nimport { VERSION } from '@angular/fire';\nimport firebase from 'firebase/compat/app';\n\n// DEBUG quick debugger function for inline logging that typescript doesn't complain about\n// wrote it for debugging the ɵlazySDKProxy, commenting out for now; should consider exposing a\n// verbose mode for AngularFire in a future release that uses something like this in multiple places\n// usage: () => log('something') || returnValue\n// const log = (...args: any[]): false => { console.log(...args); return false }\n// The problem here are things like ngOnDestroy are missing, then triggering the service\n// rather than dig too far; I'm capturing these as I go.\nconst noopFunctions = ['ngOnDestroy'];\n// INVESTIGATE should we make the Proxy revokable and do some cleanup?\n// right now it's fairly simple but I'm sure this will grow in complexity\nconst ɵlazySDKProxy = (klass, observable, zone, options = {}) => {\n return new Proxy(klass, {\n get: (_, name) => zone.runOutsideAngular(() => {\n if (klass[name]) {\n if (options?.spy?.get) {\n options.spy.get(name, klass[name]);\n }\n return klass[name];\n }\n if (noopFunctions.indexOf(name) > -1) {\n return () => undefined;\n }\n const promise = observable.toPromise().then(mod => {\n const ret = mod?.[name];\n // TODO move to proper type guards\n if (typeof ret === 'function') {\n return ret.bind(mod);\n } else if (ret?.then) {\n return ret.then(res => zone.run(() => res));\n } else {\n return zone.run(() => ret);\n }\n });\n // recurse the proxy\n return new Proxy(() => undefined, {\n get: (_, name) => promise[name],\n // TODO handle callbacks as transparently as I can\n apply: (self, _, args) => promise.then(it => {\n const res = it?.(...args);\n if (options?.spy?.apply) {\n options.spy.apply(name, args, res);\n }\n return res;\n })\n });\n })\n });\n};\nconst ɵapplyMixins = (derivedCtor, constructors) => {\n constructors.forEach(baseCtor => {\n Object.getOwnPropertyNames(baseCtor.prototype || baseCtor).forEach(name => {\n Object.defineProperty(derivedCtor.prototype, name, Object.getOwnPropertyDescriptor(baseCtor.prototype || baseCtor, name));\n });\n });\n};\nclass FirebaseApp {\n constructor(app) {\n return app;\n }\n}\nconst FIREBASE_OPTIONS = /*#__PURE__*/new InjectionToken('angularfire2.app.options');\nconst FIREBASE_APP_NAME = /*#__PURE__*/new InjectionToken('angularfire2.app.name');\nfunction ɵfirebaseAppFactory(options, zone, nameOrConfig) {\n const name = typeof nameOrConfig === 'string' && nameOrConfig || '[DEFAULT]';\n const config = typeof nameOrConfig === 'object' && nameOrConfig || {};\n config.name = config.name || name;\n // Added any due to some inconsistency between @firebase/app and firebase types\n const existingApp = firebase.apps.filter(app => app && app.name === config.name)[0];\n // We support FirebaseConfig, initializeApp's public type only accepts string; need to cast as any\n // Could be solved with https://github.com/firebase/firebase-js-sdk/pull/1206\n const app = existingApp || zone.runOutsideAngular(() => firebase.initializeApp(options, config));\n try {\n if (JSON.stringify(options) !== JSON.stringify(app.options)) {\n const hmr = !!module.hot;\n log$1('error', `${app.name} Firebase App already initialized with different options${hmr ? ', you may need to reload as Firebase is not HMR aware.' : '.'}`);\n }\n } catch (e) {/* empty */}\n return new FirebaseApp(app);\n}\nconst log$1 = (level, ...args) => {\n if (isDevMode() && typeof console !== 'undefined') {\n // eslint-disable-next-line no-console\n console[level](...args);\n }\n};\nconst FIREBASE_APP_PROVIDER = {\n provide: FirebaseApp,\n useFactory: ɵfirebaseAppFactory,\n deps: [FIREBASE_OPTIONS, NgZone, [/*#__PURE__*/new Optional(), FIREBASE_APP_NAME]]\n};\nlet AngularFireModule = /*#__PURE__*/(() => {\n class AngularFireModule {\n static initializeApp(options, nameOrConfig) {\n return {\n ngModule: AngularFireModule,\n providers: [{\n provide: FIREBASE_OPTIONS,\n useValue: options\n }, {\n provide: FIREBASE_APP_NAME,\n useValue: nameOrConfig\n }]\n };\n }\n // eslint-disable-next-line @typescript-eslint/ban-types\n constructor(platformId) {\n firebase.registerVersion('angularfire', VERSION.full, 'core');\n firebase.registerVersion('angularfire', VERSION.full, 'app-compat');\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\n firebase.registerVersion('angular', VERSION$1.full, platformId.toString());\n }\n static ɵfac = function AngularFireModule_Factory(t) {\n return new (t || AngularFireModule)(i0.ɵɵinject(PLATFORM_ID));\n };\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: AngularFireModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [FIREBASE_APP_PROVIDER]\n });\n }\n return AngularFireModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction ɵcacheInstance(cacheKey, moduleName, appName, fn, deps) {\n const [, instance, cachedDeps] = globalThis.ɵAngularfireInstanceCache.find(it => it[0] === cacheKey) || [];\n if (instance) {\n if (!matchDep(deps, cachedDeps)) {\n log('error', `${moduleName} was already initialized on the ${appName} Firebase App with different settings.${IS_HMR ? ' You may need to reload as Firebase is not HMR aware.' : ''}`);\n log('warn', {\n is: deps,\n was: cachedDeps\n });\n }\n return instance;\n } else {\n const newInstance = fn();\n globalThis.ɵAngularfireInstanceCache.push([cacheKey, newInstance, deps]);\n return newInstance;\n }\n}\nfunction matchDep(a, b) {\n try {\n return a.toString() === b.toString();\n } catch (_) {\n return a === b;\n }\n}\nconst IS_HMR = typeof module !== 'undefined' && !!module.hot;\nconst log = (level, ...args) => {\n if (isDevMode() && typeof console !== 'undefined') {\n // eslint-disable-next-line no-console\n console[level](...args);\n }\n};\nglobalThis.ɵAngularfireInstanceCache ||= [];\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AngularFireModule, FIREBASE_APP_NAME, FIREBASE_OPTIONS, FirebaseApp, ɵapplyMixins, ɵcacheInstance, ɵfirebaseAppFactory, ɵlazySDKProxy };\n","import 'firebase/compat/auth';\nimport { isPlatformServer } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, PLATFORM_ID, Injectable, Inject, Optional, NgModule } from '@angular/core';\nimport * as i1 from '@angular/fire';\nimport { keepUnstableUntilFirst, VERSION } from '@angular/fire';\nimport * as i2 from '@angular/fire/app-check';\nimport { ɵcacheInstance, ɵfirebaseAppFactory, ɵlazySDKProxy, FIREBASE_OPTIONS, FIREBASE_APP_NAME, ɵapplyMixins } from '@angular/fire/compat';\nimport { Subject, of, Observable, from, merge } from 'rxjs';\nimport { observeOn, switchMap, map, shareReplay, first, switchMapTo, subscribeOn, filter } from 'rxjs/operators';\nimport firebase from 'firebase/compat/app';\n\n// DO NOT MODIFY, this file is autogenerated by tools/build.ts\n// Export a null object with the same keys as firebase/compat/auth, so Proxy can work with proxy-polyfill in Internet Explorer\nconst proxyPolyfillCompat = {\n name: null,\n config: null,\n emulatorConfig: null,\n app: null,\n applyActionCode: null,\n checkActionCode: null,\n confirmPasswordReset: null,\n createUserWithEmailAndPassword: null,\n currentUser: null,\n fetchSignInMethodsForEmail: null,\n isSignInWithEmailLink: null,\n getRedirectResult: null,\n languageCode: null,\n settings: null,\n onAuthStateChanged: null,\n onIdTokenChanged: null,\n sendSignInLinkToEmail: null,\n sendPasswordResetEmail: null,\n setPersistence: null,\n signInAndRetrieveDataWithCredential: null,\n signInAnonymously: null,\n signInWithCredential: null,\n signInWithCustomToken: null,\n signInWithEmailAndPassword: null,\n signInWithPhoneNumber: null,\n signInWithEmailLink: null,\n signInWithPopup: null,\n signInWithRedirect: null,\n signOut: null,\n tenantId: null,\n updateCurrentUser: null,\n useDeviceLanguage: null,\n useEmulator: null,\n verifyPasswordResetCode: null\n};\nconst USE_EMULATOR = /*#__PURE__*/new InjectionToken('angularfire2.auth.use-emulator');\nconst SETTINGS = /*#__PURE__*/new InjectionToken('angularfire2.auth.settings');\nconst TENANT_ID = /*#__PURE__*/new InjectionToken('angularfire2.auth.tenant-id');\nconst LANGUAGE_CODE = /*#__PURE__*/new InjectionToken('angularfire2.auth.langugage-code');\nconst USE_DEVICE_LANGUAGE = /*#__PURE__*/new InjectionToken('angularfire2.auth.use-device-language');\nconst PERSISTENCE = /*#__PURE__*/new InjectionToken('angularfire.auth.persistence');\nconst ɵauthFactory = (app, zone, useEmulator, tenantId, languageCode, useDeviceLanguage, settings, persistence) => ɵcacheInstance(`${app.name}.auth`, 'AngularFireAuth', app.name, () => {\n const auth = zone.runOutsideAngular(() => app.auth());\n if (useEmulator) {\n auth.useEmulator(...useEmulator);\n }\n if (tenantId) {\n auth.tenantId = tenantId;\n }\n auth.languageCode = languageCode;\n if (useDeviceLanguage) {\n auth.useDeviceLanguage();\n }\n if (settings) {\n for (const [k, v] of Object.entries(settings)) {\n auth.settings[k] = v;\n }\n }\n if (persistence) {\n auth.setPersistence(persistence);\n }\n return auth;\n}, [useEmulator, tenantId, languageCode, useDeviceLanguage, settings, persistence]);\nlet AngularFireAuth = /*#__PURE__*/(() => {\n class AngularFireAuth {\n /**\n * Observable of authentication state; as of Firebase 4.0 this is only triggered via sign-in/out\n */\n authState;\n /**\n * Observable of the currently signed-in user's JWT token used to identify the user to a Firebase service (or null).\n */\n idToken;\n /**\n * Observable of the currently signed-in user (or null).\n */\n user;\n /**\n * Observable of the currently signed-in user's IdTokenResult object which contains the ID token JWT string and other\n * helper properties for getting different data associated with the token as well as all the decoded payload claims\n * (or null).\n */\n idTokenResult;\n /**\n * Observable of the currently signed-in user's credential, or null\n */\n credential;\n constructor(options, name,\n // eslint-disable-next-line @typescript-eslint/ban-types\n platformId, zone, schedulers, useEmulator,\n // can't use the tuple here\n settings,\n // can't use firebase.auth.AuthSettings here\n tenantId, languageCode, useDeviceLanguage, persistence, _appCheckInstances) {\n const logins = new Subject();\n const auth = of(undefined).pipe(observeOn(schedulers.outsideAngular), switchMap(() => zone.runOutsideAngular(() => import('firebase/compat/auth'))), map(() => ɵfirebaseAppFactory(options, zone, name)), map(app => ɵauthFactory(app, zone, useEmulator, tenantId, languageCode, useDeviceLanguage, settings, persistence)), shareReplay({\n bufferSize: 1,\n refCount: false\n }));\n if (isPlatformServer(platformId)) {\n this.authState = this.user = this.idToken = this.idTokenResult = this.credential = of(null);\n } else {\n // HACK, as we're exporting auth.Auth, rather than auth, developers importing firebase.auth\n // (e.g, `import { auth } from 'firebase/compat/app'`) are getting an undefined auth object unexpectedly\n // as we're completely lazy. Let's eagerly load the Auth SDK here.\n // There could potentially be race conditions still... but this greatly decreases the odds while\n // we reevaluate the API.\n auth.pipe(first()).subscribe();\n const redirectResult = auth.pipe(switchMap(auth => auth.getRedirectResult().then(it => it, () => null)), keepUnstableUntilFirst, shareReplay({\n bufferSize: 1,\n refCount: false\n }));\n const authStateChanged = auth.pipe(switchMap(auth => new Observable(sub => ({\n unsubscribe: zone.runOutsideAngular(() => auth.onAuthStateChanged(next => sub.next(next), err => sub.error(err), () => sub.complete()))\n }))));\n const idTokenChanged = auth.pipe(switchMap(auth => new Observable(sub => ({\n unsubscribe: zone.runOutsideAngular(() => auth.onIdTokenChanged(next => sub.next(next), err => sub.error(err), () => sub.complete()))\n }))));\n this.authState = redirectResult.pipe(switchMapTo(authStateChanged), subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular));\n this.user = redirectResult.pipe(switchMapTo(idTokenChanged), subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular));\n this.idToken = this.user.pipe(switchMap(user => user ? from(user.getIdToken()) : of(null)));\n this.idTokenResult = this.user.pipe(switchMap(user => user ? from(user.getIdTokenResult()) : of(null)));\n this.credential = merge(redirectResult, logins,\n // pipe in null authState to make credential zipable, just a weird devexp if\n // authState and user go null to still have a credential\n this.authState.pipe(filter(it => !it))).pipe(\n // handle the { user: { } } when a user is already logged in, rather have null\n // TODO handle the type corcersion better\n map(credential => credential?.user ? credential : null), subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular));\n }\n return ɵlazySDKProxy(this, auth, zone, {\n spy: {\n apply: (name, _, val) => {\n // If they call a signIn or createUser function listen into the promise\n // this will give us the user credential, push onto the logins Subject\n // to be consumed in .credential\n if (name.startsWith('signIn') || name.startsWith('createUser')) {\n // TODO fix the types, the trouble is UserCredential has everything optional\n val.then(user => logins.next(user));\n }\n }\n }\n });\n }\n static ɵfac = function AngularFireAuth_Factory(t) {\n return new (t || AngularFireAuth)(i0.ɵɵinject(FIREBASE_OPTIONS), i0.ɵɵinject(FIREBASE_APP_NAME, 8), i0.ɵɵinject(PLATFORM_ID), i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(i1.ɵAngularFireSchedulers), i0.ɵɵinject(USE_EMULATOR, 8), i0.ɵɵinject(SETTINGS, 8), i0.ɵɵinject(TENANT_ID, 8), i0.ɵɵinject(LANGUAGE_CODE, 8), i0.ɵɵinject(USE_DEVICE_LANGUAGE, 8), i0.ɵɵinject(PERSISTENCE, 8), i0.ɵɵinject(i2.AppCheckInstances, 8));\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: AngularFireAuth,\n factory: AngularFireAuth.ɵfac,\n providedIn: 'any'\n });\n }\n return AngularFireAuth;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/*#__PURE__*/ɵapplyMixins(AngularFireAuth, [proxyPolyfillCompat]);\nlet AngularFireAuthModule = /*#__PURE__*/(() => {\n class AngularFireAuthModule {\n constructor() {\n firebase.registerVersion('angularfire', VERSION.full, 'auth-compat');\n }\n static ɵfac = function AngularFireAuthModule_Factory(t) {\n return new (t || AngularFireAuthModule)();\n };\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: AngularFireAuthModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [AngularFireAuth]\n });\n }\n return AngularFireAuthModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AngularFireAuth, AngularFireAuthModule, LANGUAGE_CODE, PERSISTENCE, SETTINGS, TENANT_ID, USE_DEVICE_LANGUAGE, USE_EMULATOR, ɵauthFactory };\n","import firebase from '@firebase/app-compat';\nimport { FirestoreError, Bytes, _isBase64Available, enableIndexedDbPersistence, enableMultiTabIndexedDbPersistence, clearIndexedDbPersistence, _DatabaseId, _logWarn, connectFirestoreEmulator, enableNetwork, disableNetwork, _validateIsNotUsedTogether, waitForPendingWrites, onSnapshotsInSync, collection, doc, collectionGroup, runTransaction, ensureFirestoreConfigured, WriteBatch as WriteBatch$1, executeWrite, loadBundle, namedQuery, DocumentSnapshot as DocumentSnapshot$1, DocumentReference as DocumentReference$1, _DocumentKey, refEqual, setDoc, updateDoc, deleteDoc, onSnapshot, getDocFromCache, getDocFromServer, getDoc, snapshotEqual, query, where, orderBy, limit, limitToLast, startAt, startAfter, endBefore, endAt, queryEqual, getDocsFromCache, getDocsFromServer, getDocs, QuerySnapshot as QuerySnapshot$1, addDoc, _cast, AbstractUserDataWriter, setLogLevel as setLogLevel$1, QueryDocumentSnapshot as QueryDocumentSnapshot$1, _debugAssert, FieldPath as FieldPath$1, _FieldPath, serverTimestamp, deleteField, arrayUnion, arrayRemove, increment, GeoPoint, Timestamp, CACHE_SIZE_UNLIMITED } from '@firebase/firestore';\nimport { getModularInstance } from '@firebase/util';\nimport { Component } from '@firebase/component';\nconst name = \"@firebase/firestore-compat\";\nconst version = \"0.3.23\";\n\n/**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction validateSetOptions(methodName, options) {\n if (options === undefined) {\n return {\n merge: false\n };\n }\n if (options.mergeFields !== undefined && options.merge !== undefined) {\n throw new FirestoreError('invalid-argument', `Invalid options passed to function ${methodName}(): You cannot ` + 'specify both \"merge\" and \"mergeFields\".');\n }\n return options;\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/** Helper function to assert Uint8Array is available at runtime. */\nfunction assertUint8ArrayAvailable() {\n if (typeof Uint8Array === 'undefined') {\n throw new FirestoreError('unimplemented', 'Uint8Arrays are not available in this environment.');\n }\n}\n/** Helper function to assert Base64 functions are available at runtime. */\nfunction assertBase64Available() {\n if (!_isBase64Available()) {\n throw new FirestoreError('unimplemented', 'Blobs are unavailable in Firestore in this environment.');\n }\n}\n/** Immutable class holding a blob (binary data) */\nclass Blob {\n constructor(_delegate) {\n this._delegate = _delegate;\n }\n static fromBase64String(base64) {\n assertBase64Available();\n return new Blob(Bytes.fromBase64String(base64));\n }\n static fromUint8Array(array) {\n assertUint8ArrayAvailable();\n return new Blob(Bytes.fromUint8Array(array));\n }\n toBase64() {\n assertBase64Available();\n return this._delegate.toBase64();\n }\n toUint8Array() {\n assertUint8ArrayAvailable();\n return this._delegate.toUint8Array();\n }\n isEqual(other) {\n return this._delegate.isEqual(other._delegate);\n }\n toString() {\n return 'Blob(base64: ' + this.toBase64() + ')';\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction isPartialObserver(obj) {\n return implementsAnyMethods(obj, ['next', 'error', 'complete']);\n}\n/**\r\n * Returns true if obj is an object and contains at least one of the specified\r\n * methods.\r\n */\nfunction implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n const object = obj;\n for (const method of methods) {\n if (method in object && typeof object[method] === 'function') {\n return true;\n }\n }\n return false;\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * The persistence provider included with the full Firestore SDK.\r\n */\nclass IndexedDbPersistenceProvider {\n enableIndexedDbPersistence(firestore, forceOwnership) {\n return enableIndexedDbPersistence(firestore._delegate, {\n forceOwnership\n });\n }\n enableMultiTabIndexedDbPersistence(firestore) {\n return enableMultiTabIndexedDbPersistence(firestore._delegate);\n }\n clearIndexedDbPersistence(firestore) {\n return clearIndexedDbPersistence(firestore._delegate);\n }\n}\n/**\r\n * Compat class for Firestore. Exposes Firestore Legacy API, but delegates\r\n * to the functional API of firestore-exp.\r\n */\nclass Firestore {\n constructor(databaseIdOrApp, _delegate, _persistenceProvider) {\n this._delegate = _delegate;\n this._persistenceProvider = _persistenceProvider;\n this.INTERNAL = {\n delete: () => this.terminate()\n };\n if (!(databaseIdOrApp instanceof _DatabaseId)) {\n this._appCompat = databaseIdOrApp;\n }\n }\n get _databaseId() {\n return this._delegate._databaseId;\n }\n settings(settingsLiteral) {\n const currentSettings = this._delegate._getSettings();\n if (!settingsLiteral.merge && currentSettings.host !== settingsLiteral.host) {\n _logWarn('You are overriding the original host. If you did not intend ' + 'to override your settings, use {merge: true}.');\n }\n if (settingsLiteral.merge) {\n settingsLiteral = Object.assign(Object.assign({}, currentSettings), settingsLiteral);\n // Remove the property from the settings once the merge is completed\n delete settingsLiteral.merge;\n }\n this._delegate._setSettings(settingsLiteral);\n }\n useEmulator(host, port, options = {}) {\n connectFirestoreEmulator(this._delegate, host, port, options);\n }\n enableNetwork() {\n return enableNetwork(this._delegate);\n }\n disableNetwork() {\n return disableNetwork(this._delegate);\n }\n enablePersistence(settings) {\n let synchronizeTabs = false;\n let experimentalForceOwningTab = false;\n if (settings) {\n synchronizeTabs = !!settings.synchronizeTabs;\n experimentalForceOwningTab = !!settings.experimentalForceOwningTab;\n _validateIsNotUsedTogether('synchronizeTabs', synchronizeTabs, 'experimentalForceOwningTab', experimentalForceOwningTab);\n }\n return synchronizeTabs ? this._persistenceProvider.enableMultiTabIndexedDbPersistence(this) : this._persistenceProvider.enableIndexedDbPersistence(this, experimentalForceOwningTab);\n }\n clearPersistence() {\n return this._persistenceProvider.clearIndexedDbPersistence(this);\n }\n terminate() {\n if (this._appCompat) {\n this._appCompat._removeServiceInstance('firestore-compat');\n this._appCompat._removeServiceInstance('firestore');\n }\n return this._delegate._delete();\n }\n waitForPendingWrites() {\n return waitForPendingWrites(this._delegate);\n }\n onSnapshotsInSync(arg) {\n return onSnapshotsInSync(this._delegate, arg);\n }\n get app() {\n if (!this._appCompat) {\n throw new FirestoreError('failed-precondition', \"Firestore was not initialized using the Firebase SDK. 'app' is \" + 'not available');\n }\n return this._appCompat;\n }\n collection(pathString) {\n try {\n return new CollectionReference(this, collection(this._delegate, pathString));\n } catch (e) {\n throw replaceFunctionName(e, 'collection()', 'Firestore.collection()');\n }\n }\n doc(pathString) {\n try {\n return new DocumentReference(this, doc(this._delegate, pathString));\n } catch (e) {\n throw replaceFunctionName(e, 'doc()', 'Firestore.doc()');\n }\n }\n collectionGroup(collectionId) {\n try {\n return new Query(this, collectionGroup(this._delegate, collectionId));\n } catch (e) {\n throw replaceFunctionName(e, 'collectionGroup()', 'Firestore.collectionGroup()');\n }\n }\n runTransaction(updateFunction) {\n return runTransaction(this._delegate, transaction => updateFunction(new Transaction(this, transaction)));\n }\n batch() {\n ensureFirestoreConfigured(this._delegate);\n return new WriteBatch(new WriteBatch$1(this._delegate, mutations => executeWrite(this._delegate, mutations)));\n }\n loadBundle(bundleData) {\n return loadBundle(this._delegate, bundleData);\n }\n namedQuery(name) {\n return namedQuery(this._delegate, name).then(expQuery => {\n if (!expQuery) {\n return null;\n }\n return new Query(this,\n // We can pass `expQuery` here directly since named queries don't have a UserDataConverter.\n // Otherwise, we would have to create a new ExpQuery and pass the old UserDataConverter.\n expQuery);\n });\n }\n}\nclass UserDataWriter extends AbstractUserDataWriter {\n constructor(firestore) {\n super();\n this.firestore = firestore;\n }\n convertBytes(bytes) {\n return new Blob(new Bytes(bytes));\n }\n convertReference(name) {\n const key = this.convertDocumentKey(name, this.firestore._databaseId);\n return DocumentReference.forKey(key, this.firestore, /* converter= */null);\n }\n}\nfunction setLogLevel(level) {\n setLogLevel$1(level);\n}\n/**\r\n * A reference to a transaction.\r\n */\nclass Transaction {\n constructor(_firestore, _delegate) {\n this._firestore = _firestore;\n this._delegate = _delegate;\n this._userDataWriter = new UserDataWriter(_firestore);\n }\n get(documentRef) {\n const ref = castReference(documentRef);\n return this._delegate.get(ref).then(result => new DocumentSnapshot(this._firestore, new DocumentSnapshot$1(this._firestore._delegate, this._userDataWriter, result._key, result._document, result.metadata, ref.converter)));\n }\n set(documentRef, data, options) {\n const ref = castReference(documentRef);\n if (options) {\n validateSetOptions('Transaction.set', options);\n this._delegate.set(ref, data, options);\n } else {\n this._delegate.set(ref, data);\n }\n return this;\n }\n update(documentRef, dataOrField, value, ...moreFieldsAndValues) {\n const ref = castReference(documentRef);\n if (arguments.length === 2) {\n this._delegate.update(ref, dataOrField);\n } else {\n this._delegate.update(ref, dataOrField, value, ...moreFieldsAndValues);\n }\n return this;\n }\n delete(documentRef) {\n const ref = castReference(documentRef);\n this._delegate.delete(ref);\n return this;\n }\n}\nclass WriteBatch {\n constructor(_delegate) {\n this._delegate = _delegate;\n }\n set(documentRef, data, options) {\n const ref = castReference(documentRef);\n if (options) {\n validateSetOptions('WriteBatch.set', options);\n this._delegate.set(ref, data, options);\n } else {\n this._delegate.set(ref, data);\n }\n return this;\n }\n update(documentRef, dataOrField, value, ...moreFieldsAndValues) {\n const ref = castReference(documentRef);\n if (arguments.length === 2) {\n this._delegate.update(ref, dataOrField);\n } else {\n this._delegate.update(ref, dataOrField, value, ...moreFieldsAndValues);\n }\n return this;\n }\n delete(documentRef) {\n const ref = castReference(documentRef);\n this._delegate.delete(ref);\n return this;\n }\n commit() {\n return this._delegate.commit();\n }\n}\n/**\r\n * Wraps a `PublicFirestoreDataConverter` translating the types from the\r\n * experimental SDK into corresponding types from the Classic SDK before passing\r\n * them to the wrapped converter.\r\n */\nclass FirestoreDataConverter {\n constructor(_firestore, _userDataWriter, _delegate) {\n this._firestore = _firestore;\n this._userDataWriter = _userDataWriter;\n this._delegate = _delegate;\n }\n fromFirestore(snapshot, options) {\n const expSnapshot = new QueryDocumentSnapshot$1(this._firestore._delegate, this._userDataWriter, snapshot._key, snapshot._document, snapshot.metadata, /* converter= */null);\n return this._delegate.fromFirestore(new QueryDocumentSnapshot(this._firestore, expSnapshot), options !== null && options !== void 0 ? options : {});\n }\n toFirestore(modelObject, options) {\n if (!options) {\n return this._delegate.toFirestore(modelObject);\n } else {\n return this._delegate.toFirestore(modelObject, options);\n }\n }\n // Use the same instance of `FirestoreDataConverter` for the given instances\n // of `Firestore` and `PublicFirestoreDataConverter` so that isEqual() will\n // compare equal for two objects created with the same converter instance.\n static getInstance(firestore, converter) {\n const converterMapByFirestore = FirestoreDataConverter.INSTANCES;\n let untypedConverterByConverter = converterMapByFirestore.get(firestore);\n if (!untypedConverterByConverter) {\n untypedConverterByConverter = new WeakMap();\n converterMapByFirestore.set(firestore, untypedConverterByConverter);\n }\n let instance = untypedConverterByConverter.get(converter);\n if (!instance) {\n instance = new FirestoreDataConverter(firestore, new UserDataWriter(firestore), converter);\n untypedConverterByConverter.set(converter, instance);\n }\n return instance;\n }\n}\nFirestoreDataConverter.INSTANCES = new WeakMap();\n/**\r\n * A reference to a particular document in a collection in the database.\r\n */\nclass DocumentReference {\n constructor(firestore, _delegate) {\n this.firestore = firestore;\n this._delegate = _delegate;\n this._userDataWriter = new UserDataWriter(firestore);\n }\n static forPath(path, firestore, converter) {\n if (path.length % 2 !== 0) {\n throw new FirestoreError('invalid-argument', 'Invalid document reference. Document ' + 'references must have an even number of segments, but ' + `${path.canonicalString()} has ${path.length}`);\n }\n return new DocumentReference(firestore, new DocumentReference$1(firestore._delegate, converter, new _DocumentKey(path)));\n }\n static forKey(key, firestore, converter) {\n return new DocumentReference(firestore, new DocumentReference$1(firestore._delegate, converter, key));\n }\n get id() {\n return this._delegate.id;\n }\n get parent() {\n return new CollectionReference(this.firestore, this._delegate.parent);\n }\n get path() {\n return this._delegate.path;\n }\n collection(pathString) {\n try {\n return new CollectionReference(this.firestore, collection(this._delegate, pathString));\n } catch (e) {\n throw replaceFunctionName(e, 'collection()', 'DocumentReference.collection()');\n }\n }\n isEqual(other) {\n other = getModularInstance(other);\n if (!(other instanceof DocumentReference$1)) {\n return false;\n }\n return refEqual(this._delegate, other);\n }\n set(value, options) {\n options = validateSetOptions('DocumentReference.set', options);\n try {\n if (options) {\n return setDoc(this._delegate, value, options);\n } else {\n return setDoc(this._delegate, value);\n }\n } catch (e) {\n throw replaceFunctionName(e, 'setDoc()', 'DocumentReference.set()');\n }\n }\n update(fieldOrUpdateData, value, ...moreFieldsAndValues) {\n try {\n if (arguments.length === 1) {\n return updateDoc(this._delegate, fieldOrUpdateData);\n } else {\n return updateDoc(this._delegate, fieldOrUpdateData, value, ...moreFieldsAndValues);\n }\n } catch (e) {\n throw replaceFunctionName(e, 'updateDoc()', 'DocumentReference.update()');\n }\n }\n delete() {\n return deleteDoc(this._delegate);\n }\n onSnapshot(...args) {\n const options = extractSnapshotOptions(args);\n const observer = wrapObserver(args, result => new DocumentSnapshot(this.firestore, new DocumentSnapshot$1(this.firestore._delegate, this._userDataWriter, result._key, result._document, result.metadata, this._delegate.converter)));\n return onSnapshot(this._delegate, options, observer);\n }\n get(options) {\n let snap;\n if ((options === null || options === void 0 ? void 0 : options.source) === 'cache') {\n snap = getDocFromCache(this._delegate);\n } else if ((options === null || options === void 0 ? void 0 : options.source) === 'server') {\n snap = getDocFromServer(this._delegate);\n } else {\n snap = getDoc(this._delegate);\n }\n return snap.then(result => new DocumentSnapshot(this.firestore, new DocumentSnapshot$1(this.firestore._delegate, this._userDataWriter, result._key, result._document, result.metadata, this._delegate.converter)));\n }\n withConverter(converter) {\n return new DocumentReference(this.firestore, converter ? this._delegate.withConverter(FirestoreDataConverter.getInstance(this.firestore, converter)) : this._delegate.withConverter(null));\n }\n}\n/**\r\n * Replaces the function name in an error thrown by the firestore-exp API\r\n * with the function names used in the classic API.\r\n */\nfunction replaceFunctionName(e, original, updated) {\n e.message = e.message.replace(original, updated);\n return e;\n}\n/**\r\n * Iterates the list of arguments from an `onSnapshot` call and returns the\r\n * first argument that may be an `SnapshotListenOptions` object. Returns an\r\n * empty object if none is found.\r\n */\nfunction extractSnapshotOptions(args) {\n for (const arg of args) {\n if (typeof arg === 'object' && !isPartialObserver(arg)) {\n return arg;\n }\n }\n return {};\n}\n/**\r\n * Creates an observer that can be passed to the firestore-exp SDK. The\r\n * observer converts all observed values into the format expected by the classic\r\n * SDK.\r\n *\r\n * @param args - The list of arguments from an `onSnapshot` call.\r\n * @param wrapper - The function that converts the firestore-exp type into the\r\n * type used by this shim.\r\n */\nfunction wrapObserver(args, wrapper) {\n var _a, _b;\n let userObserver;\n if (isPartialObserver(args[0])) {\n userObserver = args[0];\n } else if (isPartialObserver(args[1])) {\n userObserver = args[1];\n } else if (typeof args[0] === 'function') {\n userObserver = {\n next: args[0],\n error: args[1],\n complete: args[2]\n };\n } else {\n userObserver = {\n next: args[1],\n error: args[2],\n complete: args[3]\n };\n }\n return {\n next: val => {\n if (userObserver.next) {\n userObserver.next(wrapper(val));\n }\n },\n error: (_a = userObserver.error) === null || _a === void 0 ? void 0 : _a.bind(userObserver),\n complete: (_b = userObserver.complete) === null || _b === void 0 ? void 0 : _b.bind(userObserver)\n };\n}\nclass DocumentSnapshot {\n constructor(_firestore, _delegate) {\n this._firestore = _firestore;\n this._delegate = _delegate;\n }\n get ref() {\n return new DocumentReference(this._firestore, this._delegate.ref);\n }\n get id() {\n return this._delegate.id;\n }\n get metadata() {\n return this._delegate.metadata;\n }\n get exists() {\n return this._delegate.exists();\n }\n data(options) {\n return this._delegate.data(options);\n }\n get(fieldPath, options\n // We are using `any` here to avoid an explicit cast by our users.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ) {\n return this._delegate.get(fieldPath, options);\n }\n isEqual(other) {\n return snapshotEqual(this._delegate, other._delegate);\n }\n}\nclass QueryDocumentSnapshot extends DocumentSnapshot {\n data(options) {\n const data = this._delegate.data(options);\n if (this._delegate._converter) {\n // Undefined is a possible valid value from converter.\n return data;\n } else {\n _debugAssert(data !== undefined, 'Document in a QueryDocumentSnapshot should exist');\n return data;\n }\n }\n}\nclass Query {\n constructor(firestore, _delegate) {\n this.firestore = firestore;\n this._delegate = _delegate;\n this._userDataWriter = new UserDataWriter(firestore);\n }\n where(fieldPath, opStr, value) {\n try {\n // The \"as string\" cast is a little bit of a hack. `where` accepts the\n // FieldPath Compat type as input, but is not typed as such in order to\n // not expose this via our public typings file.\n return new Query(this.firestore, query(this._delegate, where(fieldPath, opStr, value)));\n } catch (e) {\n throw replaceFunctionName(e, /(orderBy|where)\\(\\)/, 'Query.$1()');\n }\n }\n orderBy(fieldPath, directionStr) {\n try {\n // The \"as string\" cast is a little bit of a hack. `orderBy` accepts the\n // FieldPath Compat type as input, but is not typed as such in order to\n // not expose this via our public typings file.\n return new Query(this.firestore, query(this._delegate, orderBy(fieldPath, directionStr)));\n } catch (e) {\n throw replaceFunctionName(e, /(orderBy|where)\\(\\)/, 'Query.$1()');\n }\n }\n limit(n) {\n try {\n return new Query(this.firestore, query(this._delegate, limit(n)));\n } catch (e) {\n throw replaceFunctionName(e, 'limit()', 'Query.limit()');\n }\n }\n limitToLast(n) {\n try {\n return new Query(this.firestore, query(this._delegate, limitToLast(n)));\n } catch (e) {\n throw replaceFunctionName(e, 'limitToLast()', 'Query.limitToLast()');\n }\n }\n startAt(...args) {\n try {\n return new Query(this.firestore, query(this._delegate, startAt(...args)));\n } catch (e) {\n throw replaceFunctionName(e, 'startAt()', 'Query.startAt()');\n }\n }\n startAfter(...args) {\n try {\n return new Query(this.firestore, query(this._delegate, startAfter(...args)));\n } catch (e) {\n throw replaceFunctionName(e, 'startAfter()', 'Query.startAfter()');\n }\n }\n endBefore(...args) {\n try {\n return new Query(this.firestore, query(this._delegate, endBefore(...args)));\n } catch (e) {\n throw replaceFunctionName(e, 'endBefore()', 'Query.endBefore()');\n }\n }\n endAt(...args) {\n try {\n return new Query(this.firestore, query(this._delegate, endAt(...args)));\n } catch (e) {\n throw replaceFunctionName(e, 'endAt()', 'Query.endAt()');\n }\n }\n isEqual(other) {\n return queryEqual(this._delegate, other._delegate);\n }\n get(options) {\n let query;\n if ((options === null || options === void 0 ? void 0 : options.source) === 'cache') {\n query = getDocsFromCache(this._delegate);\n } else if ((options === null || options === void 0 ? void 0 : options.source) === 'server') {\n query = getDocsFromServer(this._delegate);\n } else {\n query = getDocs(this._delegate);\n }\n return query.then(result => new QuerySnapshot(this.firestore, new QuerySnapshot$1(this.firestore._delegate, this._userDataWriter, this._delegate, result._snapshot)));\n }\n onSnapshot(...args) {\n const options = extractSnapshotOptions(args);\n const observer = wrapObserver(args, snap => new QuerySnapshot(this.firestore, new QuerySnapshot$1(this.firestore._delegate, this._userDataWriter, this._delegate, snap._snapshot)));\n return onSnapshot(this._delegate, options, observer);\n }\n withConverter(converter) {\n return new Query(this.firestore, converter ? this._delegate.withConverter(FirestoreDataConverter.getInstance(this.firestore, converter)) : this._delegate.withConverter(null));\n }\n}\nclass DocumentChange {\n constructor(_firestore, _delegate) {\n this._firestore = _firestore;\n this._delegate = _delegate;\n }\n get type() {\n return this._delegate.type;\n }\n get doc() {\n return new QueryDocumentSnapshot(this._firestore, this._delegate.doc);\n }\n get oldIndex() {\n return this._delegate.oldIndex;\n }\n get newIndex() {\n return this._delegate.newIndex;\n }\n}\nclass QuerySnapshot {\n constructor(_firestore, _delegate) {\n this._firestore = _firestore;\n this._delegate = _delegate;\n }\n get query() {\n return new Query(this._firestore, this._delegate.query);\n }\n get metadata() {\n return this._delegate.metadata;\n }\n get size() {\n return this._delegate.size;\n }\n get empty() {\n return this._delegate.empty;\n }\n get docs() {\n return this._delegate.docs.map(doc => new QueryDocumentSnapshot(this._firestore, doc));\n }\n docChanges(options) {\n return this._delegate.docChanges(options).map(docChange => new DocumentChange(this._firestore, docChange));\n }\n forEach(callback, thisArg) {\n this._delegate.forEach(snapshot => {\n callback.call(thisArg, new QueryDocumentSnapshot(this._firestore, snapshot));\n });\n }\n isEqual(other) {\n return snapshotEqual(this._delegate, other._delegate);\n }\n}\nclass CollectionReference extends Query {\n constructor(firestore, _delegate) {\n super(firestore, _delegate);\n this.firestore = firestore;\n this._delegate = _delegate;\n }\n get id() {\n return this._delegate.id;\n }\n get path() {\n return this._delegate.path;\n }\n get parent() {\n const docRef = this._delegate.parent;\n return docRef ? new DocumentReference(this.firestore, docRef) : null;\n }\n doc(documentPath) {\n try {\n if (documentPath === undefined) {\n // Call `doc` without `documentPath` if `documentPath` is `undefined`\n // as `doc` validates the number of arguments to prevent users from\n // accidentally passing `undefined`.\n return new DocumentReference(this.firestore, doc(this._delegate));\n } else {\n return new DocumentReference(this.firestore, doc(this._delegate, documentPath));\n }\n } catch (e) {\n throw replaceFunctionName(e, 'doc()', 'CollectionReference.doc()');\n }\n }\n add(data) {\n return addDoc(this._delegate, data).then(docRef => new DocumentReference(this.firestore, docRef));\n }\n isEqual(other) {\n return refEqual(this._delegate, other._delegate);\n }\n withConverter(converter) {\n return new CollectionReference(this.firestore, converter ? this._delegate.withConverter(FirestoreDataConverter.getInstance(this.firestore, converter)) : this._delegate.withConverter(null));\n }\n}\nfunction castReference(documentRef) {\n return _cast(documentRef, DocumentReference$1);\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n// The objects that are a part of this API are exposed to third-parties as\n// compiled javascript so we want to flag our private members with a leading\n// underscore to discourage their use.\n/**\r\n * A `FieldPath` refers to a field in a document. The path may consist of a\r\n * single field name (referring to a top-level field in the document), or a list\r\n * of field names (referring to a nested field in the document).\r\n */\nclass FieldPath {\n /**\r\n * Creates a FieldPath from the provided field names. If more than one field\r\n * name is provided, the path will point to a nested field in a document.\r\n *\r\n * @param fieldNames - A list of field names.\r\n */\n constructor(...fieldNames) {\n this._delegate = new FieldPath$1(...fieldNames);\n }\n static documentId() {\n /**\r\n * Internal Note: The backend doesn't technically support querying by\r\n * document ID. Instead it queries by the entire document name (full path\r\n * included), but in the cases we currently support documentId(), the net\r\n * effect is the same.\r\n */\n return new FieldPath(_FieldPath.keyField().canonicalString());\n }\n isEqual(other) {\n other = getModularInstance(other);\n if (!(other instanceof FieldPath$1)) {\n return false;\n }\n return this._delegate._internalPath.isEqual(other._internalPath);\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nclass FieldValue {\n constructor(_delegate) {\n this._delegate = _delegate;\n }\n static serverTimestamp() {\n const delegate = serverTimestamp();\n delegate._methodName = 'FieldValue.serverTimestamp';\n return new FieldValue(delegate);\n }\n static delete() {\n const delegate = deleteField();\n delegate._methodName = 'FieldValue.delete';\n return new FieldValue(delegate);\n }\n static arrayUnion(...elements) {\n const delegate = arrayUnion(...elements);\n delegate._methodName = 'FieldValue.arrayUnion';\n return new FieldValue(delegate);\n }\n static arrayRemove(...elements) {\n const delegate = arrayRemove(...elements);\n delegate._methodName = 'FieldValue.arrayRemove';\n return new FieldValue(delegate);\n }\n static increment(n) {\n const delegate = increment(n);\n delegate._methodName = 'FieldValue.increment';\n return new FieldValue(delegate);\n }\n isEqual(other) {\n return this._delegate.isEqual(other._delegate);\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst firestoreNamespace = {\n Firestore,\n GeoPoint,\n Timestamp,\n Blob,\n Transaction,\n WriteBatch,\n DocumentReference,\n DocumentSnapshot,\n Query,\n QueryDocumentSnapshot,\n QuerySnapshot,\n CollectionReference,\n FieldPath,\n FieldValue,\n setLogLevel,\n CACHE_SIZE_UNLIMITED\n};\n/**\r\n * Configures Firestore as part of the Firebase SDK by calling registerComponent.\r\n *\r\n * @param firebase - The FirebaseNamespace to register Firestore with\r\n * @param firestoreFactory - A factory function that returns a new Firestore\r\n * instance.\r\n */\nfunction configureForFirebase(firebase, firestoreFactory) {\n firebase.INTERNAL.registerComponent(new Component('firestore-compat', container => {\n const app = container.getProvider('app-compat').getImmediate();\n const firestoreExp = container.getProvider('firestore').getImmediate();\n return firestoreFactory(app, firestoreExp);\n }, 'PUBLIC').setServiceProps(Object.assign({}, firestoreNamespace)));\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Registers the main Firestore build with the components framework.\r\n * Persistence can be enabled via `firebase.firestore().enablePersistence()`.\r\n */\nfunction registerFirestore(instance) {\n configureForFirebase(instance, (app, firestoreExp) => new Firestore(app, firestoreExp, new IndexedDbPersistenceProvider()));\n instance.registerVersion(name, version);\n}\nregisterFirestore(firebase);\nexport { registerFirestore };\n","import { isPlatformServer } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, PLATFORM_ID, Injectable, Inject, Optional, NgModule } from '@angular/core';\nimport * as i1 from '@angular/fire';\nimport { keepUnstableUntilFirst, VERSION } from '@angular/fire';\nimport * as i3 from '@angular/fire/app-check';\nimport { ɵfirebaseAppFactory, ɵcacheInstance, FIREBASE_OPTIONS, FIREBASE_APP_NAME } from '@angular/fire/compat';\nimport * as i2 from '@angular/fire/compat/auth';\nimport { ɵauthFactory, USE_EMULATOR as USE_EMULATOR$1, SETTINGS as SETTINGS$1, TENANT_ID, LANGUAGE_CODE, USE_DEVICE_LANGUAGE, PERSISTENCE } from '@angular/fire/compat/auth';\nimport { Observable, asyncScheduler, from, of } from 'rxjs';\nimport { startWith, pairwise, map, scan, distinctUntilChanged, filter } from 'rxjs/operators';\nimport 'firebase/compat/auth';\nimport 'firebase/compat/firestore';\nimport firebase from 'firebase/compat/app';\nfunction _fromRef(ref, scheduler = asyncScheduler) {\n return new Observable(subscriber => {\n let unsubscribe;\n if (scheduler != null) {\n scheduler.schedule(() => {\n unsubscribe = ref.onSnapshot({\n includeMetadataChanges: true\n }, subscriber);\n });\n } else {\n unsubscribe = ref.onSnapshot({\n includeMetadataChanges: true\n }, subscriber);\n }\n return () => {\n if (unsubscribe != null) {\n unsubscribe();\n }\n };\n });\n}\nfunction fromRef(ref, scheduler) {\n return _fromRef(ref, scheduler);\n}\nfunction fromDocRef(ref, scheduler) {\n return fromRef(ref, scheduler).pipe(startWith(undefined), pairwise(), map(snapshots => {\n const [priorPayload, payload] = snapshots;\n if (!payload.exists) {\n return {\n payload,\n type: 'removed'\n };\n }\n if (!priorPayload?.exists) {\n return {\n payload,\n type: 'added'\n };\n }\n return {\n payload,\n type: 'modified'\n };\n }));\n}\nfunction fromCollectionRef(ref, scheduler) {\n return fromRef(ref, scheduler).pipe(map(payload => ({\n payload,\n type: 'query'\n })));\n}\n\n/**\n * AngularFirestoreDocument service\n *\n * This class creates a reference to a Firestore Document. A reference is provided in\n * in the constructor. The class is generic which gives you type safety for data update\n * methods and data streaming.\n *\n * This class uses Symbol.observable to transform into Observable using Observable.from().\n *\n * This class is rarely used directly and should be created from the AngularFirestore service.\n *\n * Example:\n *\n * const fakeStock = new AngularFirestoreDocument(doc('stocks/FAKE'));\n * await fakeStock.set({ name: 'FAKE', price: 0.01 });\n * fakeStock.valueChanges().map(snap => {\n * if(snap.exists) return snap.data();\n * return null;\n * }).subscribe(value => console.log(value));\n * // OR! Transform using Observable.from() and the data is unwrapped for you\n * Observable.from(fakeStock).subscribe(value => console.log(value));\n */\nclass AngularFirestoreDocument {\n ref;\n afs;\n /**\n * The constructor takes in a DocumentReference to provide wrapper methods\n * for data operations, data streaming, and Symbol.observable.\n */\n constructor(ref, afs) {\n this.ref = ref;\n this.afs = afs;\n }\n /**\n * Create or overwrite a single document.\n */\n set(data, options) {\n return this.ref.set(data, options);\n }\n /**\n * Update some fields of a document without overwriting the entire document.\n */\n update(data) {\n return this.ref.update(data);\n }\n /**\n * Delete a document.\n */\n delete() {\n return this.ref.delete();\n }\n /**\n * Create a reference to a sub-collection given a path and an optional query\n * function.\n */\n collection(path, queryFn) {\n const collectionRef = this.ref.collection(path);\n const {\n ref,\n query\n } = associateQuery(collectionRef, queryFn);\n return new AngularFirestoreCollection(ref, query, this.afs);\n }\n /**\n * Listen to snapshot updates from the document.\n */\n snapshotChanges() {\n const scheduledFromDocRef$ = fromDocRef(this.ref, this.afs.schedulers.outsideAngular);\n return scheduledFromDocRef$.pipe(keepUnstableUntilFirst);\n }\n valueChanges(options = {}) {\n return this.snapshotChanges().pipe(map(({\n payload\n }) => options.idField ? {\n ...payload.data(),\n ...{\n [options.idField]: payload.id\n }\n } : payload.data()));\n }\n /**\n * Retrieve the document once.\n */\n get(options) {\n return from(this.ref.get(options)).pipe(keepUnstableUntilFirst);\n }\n}\n\n/**\n * Return a stream of document changes on a query. These results are not in sort order but in\n * order of occurence.\n */\nfunction docChanges(query, scheduler) {\n return fromCollectionRef(query, scheduler).pipe(startWith(undefined), pairwise(), map(actionTuple => {\n const [priorAction, action] = actionTuple;\n const docChanges = action.payload.docChanges();\n const actions = docChanges.map(change => ({\n type: change.type,\n payload: change\n }));\n // the metadata has changed from the prior emission\n if (priorAction && JSON.stringify(priorAction.payload.metadata) !== JSON.stringify(action.payload.metadata)) {\n // go through all the docs in payload and figure out which ones changed\n action.payload.docs.forEach((currentDoc, currentIndex) => {\n const docChange = docChanges.find(d => d.doc.ref.isEqual(currentDoc.ref));\n const priorDoc = priorAction?.payload.docs.find(d => d.ref.isEqual(currentDoc.ref));\n if (docChange && JSON.stringify(docChange.doc.metadata) === JSON.stringify(currentDoc.metadata) || !docChange && priorDoc && JSON.stringify(priorDoc.metadata) === JSON.stringify(currentDoc.metadata)) {\n // document doesn't appear to have changed, don't log another action\n } else {\n // since the actions are processed in order just push onto the array\n actions.push({\n type: 'modified',\n payload: {\n oldIndex: currentIndex,\n newIndex: currentIndex,\n type: 'modified',\n doc: currentDoc\n }\n });\n }\n });\n }\n return actions;\n }));\n}\n/**\n * Return a stream of document changes on a query. These results are in sort order.\n */\nfunction sortedChanges(query, events, scheduler) {\n return docChanges(query, scheduler).pipe(scan((current, changes) => combineChanges(current, changes.map(it => it.payload), events), []), distinctUntilChanged(),\n // cut down on unneed change cycles\n map(changes => changes.map(c => ({\n type: c.type,\n payload: c\n }))));\n}\n/**\n * Combines the total result set from the current set of changes from an incoming set\n * of changes.\n */\nfunction combineChanges(current, changes, events) {\n changes.forEach(change => {\n // skip unwanted change types\n if (events.indexOf(change.type) > -1) {\n current = combineChange(current, change);\n }\n });\n return current;\n}\n/**\n * Splice arguments on top of a sliced array, to break top-level ===\n * this is useful for change-detection\n */\nfunction sliceAndSplice(original, start, deleteCount, ...args) {\n const returnArray = original.slice();\n returnArray.splice(start, deleteCount, ...args);\n return returnArray;\n}\n/**\n * Creates a new sorted array from a new change.\n * Build our own because we allow filtering of action types ('added', 'removed', 'modified') before scanning\n * and so we have greater control over change detection (by breaking ===)\n */\nfunction combineChange(combined, change) {\n switch (change.type) {\n case 'added':\n if (combined[change.newIndex] && combined[change.newIndex].doc.ref.isEqual(change.doc.ref)) {\n // Not sure why the duplicates are getting fired\n } else {\n return sliceAndSplice(combined, change.newIndex, 0, change);\n }\n break;\n case 'modified':\n if (combined[change.oldIndex] == null || combined[change.oldIndex].doc.ref.isEqual(change.doc.ref)) {\n // When an item changes position we first remove it\n // and then add it's new position\n if (change.oldIndex !== change.newIndex) {\n const copiedArray = combined.slice();\n copiedArray.splice(change.oldIndex, 1);\n copiedArray.splice(change.newIndex, 0, change);\n return copiedArray;\n } else {\n return sliceAndSplice(combined, change.newIndex, 1, change);\n }\n }\n break;\n case 'removed':\n if (combined[change.oldIndex] && combined[change.oldIndex].doc.ref.isEqual(change.doc.ref)) {\n return sliceAndSplice(combined, change.oldIndex, 1);\n }\n break;\n }\n return combined;\n}\nfunction validateEventsArray(events) {\n if (!events || events.length === 0) {\n events = ['added', 'removed', 'modified'];\n }\n return events;\n}\n/**\n * AngularFirestoreCollection service\n *\n * This class creates a reference to a Firestore Collection. A reference and a query are provided in\n * in the constructor. The query can be the unqueried reference if no query is desired.The class\n * is generic which gives you type safety for data update methods and data streaming.\n *\n * This class uses Symbol.observable to transform into Observable using Observable.from().\n *\n * This class is rarely used directly and should be created from the AngularFirestore service.\n *\n * Example:\n *\n * const collectionRef = firebase.firestore.collection('stocks');\n * const query = collectionRef.where('price', '>', '0.01');\n * const fakeStock = new AngularFirestoreCollection(collectionRef, query);\n *\n * // NOTE!: the updates are performed on the reference not the query\n * await fakeStock.add({ name: 'FAKE', price: 0.01 });\n *\n * // Subscribe to changes as snapshots. This provides you data updates as well as delta updates.\n * fakeStock.valueChanges().subscribe(value => console.log(value));\n */\nclass AngularFirestoreCollection {\n ref;\n query;\n afs;\n /**\n * The constructor takes in a CollectionReference and Query to provide wrapper methods\n * for data operations and data streaming.\n *\n * Note: Data operation methods are done on the reference not the query. This means\n * when you update data it is not updating data to the window of your query unless\n * the data fits the criteria of the query. See the AssociatedRefence type for details\n * on this implication.\n */\n constructor(ref, query, afs) {\n this.ref = ref;\n this.query = query;\n this.afs = afs;\n }\n /**\n * Listen to the latest change in the stream. This method returns changes\n * as they occur and they are not sorted by query order. This allows you to construct\n * your own data structure.\n */\n stateChanges(events) {\n let source = docChanges(this.query, this.afs.schedulers.outsideAngular);\n if (events && events.length > 0) {\n source = source.pipe(map(actions => actions.filter(change => events.indexOf(change.type) > -1)));\n }\n return source.pipe(\n // We want to filter out empty arrays, but always emit at first, so the developer knows\n // that the collection has been resolve; even if it's empty\n startWith(undefined), pairwise(), filter(([prior, current]) => current.length > 0 || !prior), map(([, current]) => current), keepUnstableUntilFirst);\n }\n /**\n * Create a stream of changes as they occur it time. This method is similar to stateChanges()\n * but it collects each event in an array over time.\n */\n auditTrail(events) {\n return this.stateChanges(events).pipe(scan((current, action) => [...current, ...action], []));\n }\n /**\n * Create a stream of synchronized changes. This method keeps the local array in sorted\n * query order.\n */\n snapshotChanges(events) {\n const validatedEvents = validateEventsArray(events);\n const scheduledSortedChanges$ = sortedChanges(this.query, validatedEvents, this.afs.schedulers.outsideAngular);\n return scheduledSortedChanges$.pipe(keepUnstableUntilFirst);\n }\n valueChanges(options = {}) {\n return fromCollectionRef(this.query, this.afs.schedulers.outsideAngular).pipe(map(actions => actions.payload.docs.map(a => {\n if (options.idField) {\n return {\n ...a.data(),\n ...{\n [options.idField]: a.id\n }\n };\n } else {\n return a.data();\n }\n })), keepUnstableUntilFirst);\n }\n /**\n * Retrieve the results of the query once.\n */\n get(options) {\n return from(this.query.get(options)).pipe(keepUnstableUntilFirst);\n }\n /**\n * Add data to a collection reference.\n *\n * Note: Data operation methods are done on the reference not the query. This means\n * when you update data it is not updating data to the window of your query unless\n * the data fits the criteria of the query.\n */\n add(data) {\n return this.ref.add(data);\n }\n /**\n * Create a reference to a single document in a collection.\n */\n doc(path) {\n // TODO is there a better way to solve this type issue\n return new AngularFirestoreDocument(this.ref.doc(path), this.afs);\n }\n}\n\n/**\n * AngularFirestoreCollectionGroup service\n *\n * This class holds a reference to a Firestore Collection Group Query.\n *\n * This class uses Symbol.observable to transform into Observable using Observable.from().\n *\n * This class is rarely used directly and should be created from the AngularFirestore service.\n *\n * Example:\n *\n * const collectionGroup = firebase.firestore.collectionGroup('stocks');\n * const query = collectionRef.where('price', '>', '0.01');\n * const fakeStock = new AngularFirestoreCollectionGroup(query, afs);\n *\n * // Subscribe to changes as snapshots. This provides you data updates as well as delta updates.\n * fakeStock.valueChanges().subscribe(value => console.log(value));\n */\nclass AngularFirestoreCollectionGroup {\n query;\n afs;\n /**\n * The constructor takes in a CollectionGroupQuery to provide wrapper methods\n * for data operations and data streaming.\n */\n constructor(query, afs) {\n this.query = query;\n this.afs = afs;\n }\n /**\n * Listen to the latest change in the stream. This method returns changes\n * as they occur and they are not sorted by query order. This allows you to construct\n * your own data structure.\n */\n stateChanges(events) {\n if (!events || events.length === 0) {\n return docChanges(this.query, this.afs.schedulers.outsideAngular).pipe(keepUnstableUntilFirst);\n }\n return docChanges(this.query, this.afs.schedulers.outsideAngular).pipe(map(actions => actions.filter(change => events.indexOf(change.type) > -1)), filter(changes => changes.length > 0), keepUnstableUntilFirst);\n }\n /**\n * Create a stream of changes as they occur it time. This method is similar to stateChanges()\n * but it collects each event in an array over time.\n */\n auditTrail(events) {\n return this.stateChanges(events).pipe(scan((current, action) => [...current, ...action], []));\n }\n /**\n * Create a stream of synchronized changes. This method keeps the local array in sorted\n * query order.\n */\n snapshotChanges(events) {\n const validatedEvents = validateEventsArray(events);\n const scheduledSortedChanges$ = sortedChanges(this.query, validatedEvents, this.afs.schedulers.outsideAngular);\n return scheduledSortedChanges$.pipe(keepUnstableUntilFirst);\n }\n valueChanges(options = {}) {\n const fromCollectionRefScheduled$ = fromCollectionRef(this.query, this.afs.schedulers.outsideAngular);\n return fromCollectionRefScheduled$.pipe(map(actions => actions.payload.docs.map(a => {\n if (options.idField) {\n return {\n [options.idField]: a.id,\n ...a.data()\n };\n } else {\n return a.data();\n }\n })), keepUnstableUntilFirst);\n }\n /**\n * Retrieve the results of the query once.\n */\n get(options) {\n return from(this.query.get(options)).pipe(keepUnstableUntilFirst);\n }\n}\n\n/**\n * The value of this token determines whether or not the firestore will have persistance enabled\n */\nconst ENABLE_PERSISTENCE = /*#__PURE__*/new InjectionToken('angularfire2.enableFirestorePersistence');\nconst PERSISTENCE_SETTINGS = /*#__PURE__*/new InjectionToken('angularfire2.firestore.persistenceSettings');\nconst SETTINGS = /*#__PURE__*/new InjectionToken('angularfire2.firestore.settings');\nconst USE_EMULATOR = /*#__PURE__*/new InjectionToken('angularfire2.firestore.use-emulator');\n/**\n * A utility methods for associating a collection reference with\n * a query.\n *\n * @param collectionRef - A collection reference to query\n * @param queryFn - The callback to create a query\n *\n * Example:\n * const { query, ref } = associateQuery(docRef.collection('items'), ref => {\n * return ref.where('age', '<', 200);\n * });\n */\nfunction associateQuery(collectionRef, queryFn = ref => ref) {\n const query = queryFn(collectionRef);\n const ref = collectionRef;\n return {\n query,\n ref\n };\n}\n/**\n * AngularFirestore Service\n *\n * This service is the main entry point for this feature module. It provides\n * an API for creating Collection and Reference services. These services can\n * then be used to do data updates and observable streams of the data.\n *\n * Example:\n *\n * import { Component } from '@angular/core';\n * import { AngularFirestore, AngularFirestoreCollection, AngularFirestoreDocument } from '@angular/fire/firestore';\n * import { Observable } from 'rxjs/Observable';\n * import { from } from 'rxjs/observable';\n *\n * @Component({\n * selector: 'app-my-component',\n * template: `\n *

    Items for {{ (profile | async)?.name }}\n *
      \n *
    • {{ item.name }}
    • \n *
    \n *
    \n * \n * \n *
    \n * `\n * })\n * export class MyComponent implements OnInit {\n *\n * // services for data operations and data streaming\n * private readonly itemsRef: AngularFirestoreCollection;\n * private readonly profileRef: AngularFirestoreDocument;\n *\n * // observables for template\n * items: Observable;\n * profile: Observable;\n *\n * // inject main service\n * constructor(private readonly afs: AngularFirestore) {}\n *\n * ngOnInit() {\n * this.itemsRef = afs.collection('items', ref => ref.where('user', '==', 'davideast').limit(10));\n * this.items = this.itemsRef.valueChanges().map(snap => snap.docs.map(data => doc.data()));\n * // this.items = from(this.itemsRef); // you can also do this with no mapping\n *\n * this.profileRef = afs.doc('users/davideast');\n * this.profile = this.profileRef.valueChanges();\n * }\n *\n * addItem(name: string) {\n * const user = 'davideast';\n * this.itemsRef.add({ name, user });\n * }\n * }\n */\nlet AngularFirestore = /*#__PURE__*/(() => {\n class AngularFirestore {\n schedulers;\n firestore;\n persistenceEnabled$;\n /**\n * Each Feature of AngularFire has a FirebaseApp injected. This way we\n * don't rely on the main Firebase App instance and we can create named\n * apps and use multiple apps.\n */\n constructor(options, name, shouldEnablePersistence, settings,\n // eslint-disable-next-line @typescript-eslint/ban-types\n platformId, zone, schedulers, persistenceSettings, _useEmulator, auth, useAuthEmulator, authSettings,\n // can't use firebase.auth.AuthSettings here\n tenantId, languageCode, useDeviceLanguage, persistence, _appCheckInstances) {\n this.schedulers = schedulers;\n const app = ɵfirebaseAppFactory(options, zone, name);\n const useEmulator = _useEmulator;\n if (auth) {\n ɵauthFactory(app, zone, useAuthEmulator, tenantId, languageCode, useDeviceLanguage, authSettings, persistence);\n }\n [this.firestore, this.persistenceEnabled$] = ɵcacheInstance(`${app.name}.firestore`, 'AngularFirestore', app.name, () => {\n const firestore = zone.runOutsideAngular(() => app.firestore());\n if (settings) {\n firestore.settings(settings);\n }\n if (useEmulator) {\n firestore.useEmulator(...useEmulator);\n }\n if (shouldEnablePersistence && !isPlatformServer(platformId)) {\n // We need to try/catch here because not all enablePersistence() failures are caught\n // https://github.com/firebase/firebase-js-sdk/issues/608\n const enablePersistence = () => {\n try {\n return from(firestore.enablePersistence(persistenceSettings || undefined).then(() => true, () => false));\n } catch (e) {\n if (typeof console !== 'undefined') {\n console.warn(e);\n }\n return of(false);\n }\n };\n return [firestore, zone.runOutsideAngular(enablePersistence)];\n } else {\n return [firestore, of(false)];\n }\n }, [settings, useEmulator, shouldEnablePersistence]);\n }\n collection(pathOrRef, queryFn) {\n let collectionRef;\n if (typeof pathOrRef === 'string') {\n collectionRef = this.firestore.collection(pathOrRef);\n } else {\n collectionRef = pathOrRef;\n }\n const {\n ref,\n query\n } = associateQuery(collectionRef, queryFn);\n const refInZone = this.schedulers.ngZone.run(() => ref);\n return new AngularFirestoreCollection(refInZone, query, this);\n }\n /**\n * Create a reference to a Firestore Collection Group based on a collectionId\n * and an optional query function to narrow the result\n * set.\n */\n collectionGroup(collectionId, queryGroupFn) {\n const queryFn = queryGroupFn || (ref => ref);\n const collectionGroup = this.firestore.collectionGroup(collectionId);\n return new AngularFirestoreCollectionGroup(queryFn(collectionGroup), this);\n }\n doc(pathOrRef) {\n let ref;\n if (typeof pathOrRef === 'string') {\n ref = this.firestore.doc(pathOrRef);\n } else {\n ref = pathOrRef;\n }\n const refInZone = this.schedulers.ngZone.run(() => ref);\n return new AngularFirestoreDocument(refInZone, this);\n }\n /**\n * Returns a generated Firestore Document Id.\n */\n createId() {\n return this.firestore.collection('_').doc().id;\n }\n static ɵfac = function AngularFirestore_Factory(t) {\n return new (t || AngularFirestore)(i0.ɵɵinject(FIREBASE_OPTIONS), i0.ɵɵinject(FIREBASE_APP_NAME, 8), i0.ɵɵinject(ENABLE_PERSISTENCE, 8), i0.ɵɵinject(SETTINGS, 8), i0.ɵɵinject(PLATFORM_ID), i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(i1.ɵAngularFireSchedulers), i0.ɵɵinject(PERSISTENCE_SETTINGS, 8), i0.ɵɵinject(USE_EMULATOR, 8), i0.ɵɵinject(i2.AngularFireAuth, 8), i0.ɵɵinject(USE_EMULATOR$1, 8), i0.ɵɵinject(SETTINGS$1, 8), i0.ɵɵinject(TENANT_ID, 8), i0.ɵɵinject(LANGUAGE_CODE, 8), i0.ɵɵinject(USE_DEVICE_LANGUAGE, 8), i0.ɵɵinject(PERSISTENCE, 8), i0.ɵɵinject(i3.AppCheckInstances, 8));\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: AngularFirestore,\n factory: AngularFirestore.ɵfac,\n providedIn: 'any'\n });\n }\n return AngularFirestore;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet AngularFirestoreModule = /*#__PURE__*/(() => {\n class AngularFirestoreModule {\n constructor() {\n firebase.registerVersion('angularfire', VERSION.full, 'fst-compat');\n }\n /**\n * Attempt to enable persistent storage, if possible\n */\n static enablePersistence(persistenceSettings) {\n return {\n ngModule: AngularFirestoreModule,\n providers: [{\n provide: ENABLE_PERSISTENCE,\n useValue: true\n }, {\n provide: PERSISTENCE_SETTINGS,\n useValue: persistenceSettings\n }]\n };\n }\n static ɵfac = function AngularFirestoreModule_Factory(t) {\n return new (t || AngularFirestoreModule)();\n };\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: AngularFirestoreModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [AngularFirestore]\n });\n }\n return AngularFirestoreModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AngularFirestore, AngularFirestoreCollection, AngularFirestoreCollectionGroup, AngularFirestoreDocument, AngularFirestoreModule, ENABLE_PERSISTENCE, PERSISTENCE_SETTINGS, SETTINGS, USE_EMULATOR, associateQuery, combineChange, combineChanges, docChanges, fromCollectionRef, fromDocRef, fromRef, sortedChanges, validateEventsArray };\n","import { Injectable } from '@angular/core';\nimport { Subject } from 'rxjs';\n\n@Injectable({ providedIn: 'root' })\nexport class AtlasMenuService {\n private closeMenuEventSource = new Subject();\n\n closeMenuEvent$ = this.closeMenuEventSource.asObservable();\n\n closeMenu(id: string): void {\n this.closeMenuEventSource.next(id);\n }\n}\n","import { Component, Input } from '@angular/core';\nimport { AtlasMenuService } from '../menu/menu.service';\n\n@Component({\n selector: 'atlas-menu-item',\n templateUrl: './menu-item.component.html',\n styleUrls: ['./menu-item.component.scss', '../common.scss'],\n})\nexport class MenuItemComponent {\n @Input() url: string;\n @Input() route: string;\n @Input() label: string;\n @Input() icon: string;\n @Input() closeOnClick = true;\n @Input() disabled: boolean;\n public parentMenuId: string;\n\n constructor(private menuService: AtlasMenuService) {}\n\n clicked(): void {\n if (this.closeOnClick) {\n this.menuService.closeMenu(this.parentMenuId);\n }\n }\n\n // This is a temporary solution for allowing the Academy/Community Conquer Local links to be opened in a new tab when click.\n isConquerLocalLink(url: string): boolean {\n const regEx = new RegExp('(academy|community).conquerlocal.com');\n return regEx.test(url);\n }\n}\n","\n \n \n {{ icon }}\n {{ label }}\n \n \n {{ icon }}\n {{ label }}\n \n \n {{ icon }}\n {{ label }}\n \n \n\n","import {\n AfterContentChecked,\n AfterViewInit,\n Component,\n ContentChildren,\n ElementRef,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ViewChild,\n} from '@angular/core';\nimport { BehaviorSubject, Subject, fromEvent } from 'rxjs';\nimport { filter, takeUntil } from 'rxjs/operators';\nimport { MenuItemComponent } from '../menu-item/menu-item.component';\n\nimport { AtlasMenuService } from './menu.service';\n\nclass Guid {\n static newGuid(): string {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c: string) => {\n // tslint:disable-next-line:no-bitwise\n const r = (Math.random() * 16) | 0,\n // tslint:disable-next-line: no-bitwise\n v = c === 'x' ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n }\n}\n\n@Component({\n selector: 'atlas-menu',\n templateUrl: './menu.component.html',\n styleUrls: ['./menu.component.scss', '../common.scss'],\n})\nexport class MenuComponent implements OnInit, AfterViewInit, OnDestroy, AfterContentChecked {\n @ViewChild('menu', { static: true }) menu: ElementRef;\n @ContentChildren(MenuItemComponent) menuItems: MenuItemComponent[];\n @Input() relative: boolean;\n @Input() anchorRight: boolean;\n @Input() anchorBottom: boolean;\n\n // eslint-disable-next-line @angular-eslint/no-output-on-prefix\n @Output() onClose: EventEmitter = new EventEmitter();\n // eslint-disable-next-line @angular-eslint/no-output-on-prefix\n @Output() onOpen: EventEmitter = new EventEmitter();\n private anchor: HTMLElement;\n\n public id: string;\n\n _destroyOpenSubscriptions$$: Subject = new Subject();\n _destroyed$$: Subject = new Subject();\n _open$$: BehaviorSubject = new BehaviorSubject(false);\n\n constructor(private elRef: ElementRef, private menuService: AtlasMenuService) {\n this.id = Guid.newGuid();\n }\n\n get isOpen(): boolean {\n return this._open$$.getValue();\n }\n\n set isOpen(isOpen: boolean) {\n this._open$$.next(isOpen);\n }\n\n ngOnInit(): void {\n if (this.relative) {\n this.elRef.nativeElement.parentElement.style.setProperty('position', 'relative');\n this.elRef.nativeElement.style.setProperty('position', 'absolute');\n this.elRef.nativeElement.style.setProperty('left', '0');\n this.elRef.nativeElement.style.setProperty('bottom', '0');\n this.elRef.nativeElement.style.setProperty('min-width', '100%');\n this.menu.nativeElement.style.setProperty('min-width', '100%');\n }\n }\n\n ngAfterContentChecked(): void {\n this.menuItems.map((tab: MenuItemComponent) => {\n tab.parentMenuId = this.id;\n });\n }\n\n ngAfterViewInit(): void {\n this.anchor = this.elRef.nativeElement.parentElement;\n\n this._open$$.pipe(takeUntil(this._destroyed$$)).subscribe((isOpen: boolean) => {\n if (isOpen) {\n this.elRef.nativeElement.style.setProperty('display', 'flex');\n fromEvent(document, 'click')\n .pipe(takeUntil(this._destroyOpenSubscriptions$$))\n .subscribe((event: MouseEvent) => {\n if (\n !(\n this.pointInBounds(event.clientX, event.clientY, this.menuRect) ||\n this.pointInBounds(event.clientX, event.clientY, this.anchorRect)\n )\n ) {\n this.isOpen = false;\n }\n });\n\n fromEvent(window, 'resize')\n .pipe(takeUntil(this._destroyOpenSubscriptions$$))\n .subscribe(() => {\n this.repositionMenu();\n });\n\n this.menuService.closeMenuEvent$.pipe(takeUntil(this._destroyOpenSubscriptions$$)).subscribe((id: string) => {\n if (this.isOpen && (!id || id === this.id)) {\n this.isOpen = false;\n }\n });\n this.onOpen.emit();\n } else {\n this._destroyOpenSubscriptions$$.next();\n this.onClose.emit();\n }\n });\n\n fromEvent(this.anchor, 'click')\n .pipe(\n takeUntil(this._destroyed$$),\n filter((event: MouseEvent) => this.pointInBounds(event.clientX, event.clientY, this.anchorRect)),\n )\n .subscribe(() => {\n this.toggleMenu();\n });\n }\n\n private get anchorRect(): DOMRect {\n return this.anchor.getBoundingClientRect() as DOMRect;\n }\n\n private get menuRect(): DOMRect {\n return this.menu.nativeElement.getBoundingClientRect() as DOMRect;\n }\n\n private pointInBounds(pointX: number, pointY: number, rect: DOMRect): boolean {\n return pointX >= rect.left && pointX <= rect.right && pointY >= rect.top && pointY <= rect.bottom;\n }\n\n private toggleMenu(): void {\n this.isOpen = !this.isOpen;\n this.repositionMenu();\n }\n\n private repositionMenu(): void {\n if (this.relative) {\n // tslint:disable-next-line: no-shadowed-variable\n let menuStyles = ``;\n if (this.anchorRight) {\n menuStyles += `right: 30px;`;\n }\n if (this.anchorBottom) {\n menuStyles += ` bottom: 0;`;\n } else {\n menuStyles += ` top: -30px;`;\n }\n this.menu.nativeElement.setAttribute('style', menuStyles);\n return;\n }\n if (!this.isOpen) {\n return;\n }\n let menuStyles = `top: ${this.anchorRect.bottom}px;`;\n if (window.innerWidth <= 600) {\n menuStyles += ` left: 0; width: 100%;`;\n this.menu.nativeElement.setAttribute('style', menuStyles);\n return;\n }\n if (window.innerWidth / 2 < this.anchorRect.left) {\n menuStyles += ` left: ${this.anchorRect.right}px;`;\n menuStyles += ` transform: translate(-100%, 0%);`;\n } else {\n menuStyles += ` left: ${this.anchorRect.left}px;`;\n }\n menuStyles += ` min-width: ${this.anchorRect.width}px`;\n this.menu.nativeElement.setAttribute('style', menuStyles);\n }\n\n ngOnDestroy(): void {\n this._destroyed$$.next();\n this._destroyed$$.complete();\n }\n}\n","\n \n\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'atlas-chip',\n templateUrl: './chip.component.html',\n styleUrls: ['./chip.component.scss'],\n})\nexport class ChipComponent {}\n","\n","import { Component, Input } from '@angular/core';\n\n@Component({\n selector: 'atlas-item',\n templateUrl: './item.component.html',\n styleUrls: ['./item.component.scss', '../common.scss'],\n})\nexport class ItemComponent {\n isInteractable: boolean;\n @Input() icon: string;\n @Input() set interactable(val: string) {\n this.isInteractable = val !== 'false';\n }\n @Input() badgeContent: string | number | null;\n @Input() iconText: string;\n @Input() customClass = '';\n}\n","\n
    \n {{ icon }}\n
    {{ iconText }}
    \n \n {{ badgeContent }}\n \n
    \n \n\n","import { Component, Input, OnChanges, OnInit } from '@angular/core';\nimport { CenterNavigationItem } from '@vendasta/atlas';\n\n@Component({\n selector: 'atlas-center-selector',\n templateUrl: './center-selector.component.html',\n styleUrls: ['./center-selector.component.scss'],\n})\nexport class CenterSelectorComponent implements OnInit, OnChanges {\n @Input() centerData: CenterNavigationItem[] = [];\n @Input() serviceProviderId: string;\n\n showSelector: boolean;\n\n ngOnInit(): void {\n this.calculateShowSelector();\n }\n\n ngOnChanges(): void {\n this.calculateShowSelector();\n }\n\n private calculateShowSelector(): void {\n if (!this.centerData) {\n return;\n }\n this.showSelector =\n this.centerData.filter((item: CenterNavigationItem) => {\n return item.centerId !== this.serviceProviderId;\n }).length > 0;\n }\n}\n","\n \n \n
    \n \n \n \n
    \n
    \n
    \n
    \n","import { Component, HostBinding } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\n@Component({\n selector: 'atlas-panel-content',\n templateUrl: './panel-content.component.html',\n styleUrls: ['./panel-content.component.scss'],\n})\nexport class PanelContentComponent {\n set collapsed(collapsed: boolean) {\n this.collapsed$$.next(collapsed);\n }\n\n private collapsed$$ = new BehaviorSubject(null);\n\n @HostBinding('class.atlas-panel-content__hidden')\n get isHidden(): boolean {\n return this.collapsed$$.getValue();\n }\n}\n","\n","import { Directive, ElementRef, HostListener, Renderer2 } from '@angular/core';\n\n@Directive({ selector: '[atlasIconButton]' })\nexport class IconButtonDirective {\n constructor(private el: ElementRef, private renderer: Renderer2) {\n renderer.setStyle(el.nativeElement, 'padding', '0');\n renderer.setStyle(el.nativeElement, 'min-width', '0');\n renderer.setStyle(el.nativeElement, 'width', '40px');\n renderer.setStyle(el.nativeElement, 'height', '40px');\n renderer.setStyle(el.nativeElement, 'flex-shrink', '0');\n renderer.setStyle(el.nativeElement, 'line-height', '40px');\n renderer.setStyle(el.nativeElement, 'border-radius', '50%');\n renderer.setStyle(el.nativeElement, 'box-sizing', 'border-box');\n renderer.setStyle(el.nativeElement, 'position', 'relative');\n renderer.setStyle(el.nativeElement, 'user-select', 'none');\n renderer.setStyle(el.nativeElement, 'cursor', 'pointer');\n renderer.setStyle(el.nativeElement, 'outline', '0');\n renderer.setStyle(el.nativeElement, 'border', 'none');\n renderer.setStyle(el.nativeElement, 'display', 'flex');\n renderer.setStyle(el.nativeElement, 'justify-content', 'center');\n renderer.setStyle(el.nativeElement, 'align-items', 'center');\n renderer.setStyle(el.nativeElement, 'white-space', 'nowrap');\n renderer.setStyle(el.nativeElement, 'text-decoration', 'none');\n renderer.setStyle(el.nativeElement, 'vertical-align', 'baseline');\n renderer.setStyle(el.nativeElement, 'text-align', 'center');\n renderer.setStyle(el.nativeElement, 'margin', '0');\n renderer.setStyle(el.nativeElement, 'overflow', 'visible');\n renderer.setStyle(el.nativeElement, 'color', 'inherit');\n renderer.setStyle(el.nativeElement, 'background', 'transparent');\n renderer.setStyle(\n el.nativeElement,\n 'transition',\n 'background-color 0.2s cubic-bezier(0.4, 0, 1, 1), color 0.15s ease-in-out',\n );\n }\n\n @HostListener('mouseover')\n @HostListener('mouseup')\n onMouseOver(): void {\n this.renderer.setStyle(this.el.nativeElement, 'background', 'var(--themingPrimaryHoverColor)');\n }\n\n @HostListener('mouseout')\n onMouseOut(): void {\n this.renderer.setStyle(this.el.nativeElement, 'background', 'transparent');\n }\n\n @HostListener('mousedown')\n onClick(): void {\n this.renderer.setStyle(this.el.nativeElement, 'background', 'var(--themingPrimaryActiveColor)');\n }\n}\n","import { Component, EventEmitter } from '@angular/core';\n\n@Component({\n selector: 'atlas-panel-header',\n templateUrl: './panel-header.component.html',\n styleUrls: ['./panel-header.component.scss'],\n})\nexport class PanelHeaderComponent {\n public collapsible: boolean;\n public collapsed: boolean;\n public collapsedChange: EventEmitter = new EventEmitter();\n\n collapseClicked(event: Event): void {\n event.stopPropagation();\n this.collapsed = !this.collapsed;\n this.collapsedChange.emit(this.collapsed);\n }\n}\n","\n\n \n\n","import {\n AfterContentInit,\n Component,\n ContentChild,\n HostBinding,\n Input,\n OnChanges,\n OnDestroy,\n SimpleChanges,\n} from '@angular/core';\nimport { BehaviorSubject, Observable, Subject } from 'rxjs';\nimport { distinctUntilChanged, takeUntil } from 'rxjs/operators';\nimport { PanelContentComponent } from './panel-content.component';\nimport { PanelHeaderComponent } from './panel-header.component';\n\n@Component({\n selector: 'atlas-panel',\n templateUrl: './panel.component.html',\n styleUrls: ['./panel.component.scss'],\n})\nexport class PanelComponent implements AfterContentInit, OnChanges, OnDestroy {\n @ContentChild(PanelHeaderComponent, { static: true }) header: PanelHeaderComponent;\n @ContentChild(PanelContentComponent, { static: true }) content: PanelContentComponent;\n\n private collapsed$$ = new BehaviorSubject(null);\n\n // Publicly observable state\n public collapsed$: Observable = this.collapsed$$;\n\n @Input() collapsible = false;\n get collapsed(): boolean {\n return this.collapsed$$.getValue();\n }\n\n @Input() set collapsed(collapsed: boolean) {\n this.collapsed$$.next(collapsed);\n }\n\n @HostBinding('class.atlas-panel__collapsed')\n get collapsedClass(): boolean {\n return this.collapsed$$.getValue();\n }\n\n private _destroyed$$: Subject = new Subject();\n\n updateChildrenCollapsed(collapsed: boolean): void {\n if (this.header) {\n this.header.collapsed = collapsed;\n }\n\n if (this.content) {\n this.content.collapsed = collapsed;\n }\n }\n\n ngAfterContentInit(): void {\n // Update header and content on collapse change\n this.collapsed$$.pipe(distinctUntilChanged(), takeUntil(this._destroyed$$)).subscribe((isCollapsed: boolean) => {\n this.updateChildrenCollapsed(isCollapsed);\n });\n\n this.updateChildrenCollapsed(this.collapsed);\n if (this.header) {\n this.header.collapsible = this.collapsible;\n // Allow header to update collapsed status\n this.header.collapsedChange\n .pipe(takeUntil(this._destroyed$$))\n .subscribe((isCollapsed) => this.collapsed$$.next(isCollapsed));\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.collapsible) {\n if (this.header) {\n this.header.collapsible = this.collapsible;\n }\n }\n }\n\n ngOnDestroy(): void {\n this._destroyed$$.next();\n this._destroyed$$.complete();\n }\n}\n","\n","import { Component, Input } from '@angular/core';\n\n@Component({\n selector: 'atlas-loader',\n templateUrl: './loader.component.html',\n styleUrls: ['./loader.component.scss'],\n})\nexport class LoaderComponent {\n @Input() size: number;\n @Input() thickness = 3;\n}\n","\n
    \n
    \n
    \n
    \n\n","import { Component, EventEmitter, Input, Output } from '@angular/core';\n\n@Component({\n selector: 'atlas-button',\n templateUrl: './button.component.html',\n styleUrls: ['./button.component.scss'],\n})\nexport class ButtonComponent {\n @Input() loading: boolean;\n @Input() disabled: boolean;\n @Input() raised: boolean;\n @Input() color: 'primary' | 'secondary' = 'secondary';\n\n // eslint-disable-next-line @angular-eslint/no-output-on-prefix\n @Output() onClick: EventEmitter = new EventEmitter();\n\n onButtonClick(event: Event): void {\n this.onClick.emit();\n event.stopPropagation();\n event.stopImmediatePropagation();\n }\n}\n","
    \n \n \n \n
    \n \n\n","import { Component, Input } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\n@Component({\n selector: 'atlas-checkbox',\n templateUrl: './checkbox.component.html',\n styleUrls: ['./checkbox.component.scss'],\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: CheckboxComponent, multi: true }],\n})\nexport class CheckboxComponent implements ControlValueAccessor {\n @Input() disabled: boolean;\n @Input() color: 'default' | 'primary' | 'secondary' = 'default';\n private innerValue: boolean;\n\n private changed = new Array<(value: boolean) => void>();\n private touched = new Array<() => void>();\n\n get value(): boolean {\n return this.innerValue;\n }\n\n set value(value: boolean) {\n if (this.innerValue !== value) {\n this.innerValue = value;\n this.changed.forEach((f) => f(value));\n }\n }\n\n touch(): void {\n this.touched.forEach((f) => f());\n }\n\n writeValue(value: boolean): void {\n this.innerValue = value;\n }\n\n registerOnChange(fn: (value: boolean) => void): void {\n this.changed.push(fn);\n }\n\n registerOnTouched(fn: () => void): void {\n this.touched.push(fn);\n }\n}\n","\n
    \n \n
    \n \n
    \n
    \n \n \n \n
    \n
    \n
    \n \n \n \n \n\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'atlas-ink-bar',\n templateUrl: './ink-bar.component.html',\n styleUrls: ['./ink-bar.component.scss'],\n})\nexport class InkBarComponent {}\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'atlas-modal-content',\n templateUrl: './modal-content.component.html',\n styleUrls: ['./modal-content.component.scss'],\n})\nexport class ModalContentComponent {}\n","\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'atlas-modal-footer',\n templateUrl: './modal-footer.component.html',\n styleUrls: ['./modal-footer.component.scss'],\n})\nexport class ModalFooterComponent {}\n","\n","import { Component, inject } from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\n\n@Component({\n selector: 'atlas-modal-header',\n templateUrl: './modal-header.component.html',\n styleUrls: ['./modal-header.component.scss'],\n})\nexport class ModalHeaderComponent {\n dialog = inject(MatDialogRef);\n\n close(): void {\n this.dialog.close();\n }\n}\n","\n\n","import { DialogRef } from '@angular/cdk/dialog';\nimport { BreakpointObserver } from '@angular/cdk/layout';\nimport { Component, inject, OnInit } from '@angular/core';\nimport { takeUntil } from 'rxjs/operators';\n\n@Component({\n selector: 'atlas-modal',\n templateUrl: './modal.component.html',\n styleUrls: ['./modal.component.scss'],\n})\nexport class ModalComponent implements OnInit {\n dialogRef = inject(DialogRef);\n observer = inject(BreakpointObserver);\n\n ngOnInit() {\n this.observer\n .observe('(max-width: 768px)')\n .pipe(takeUntil(this.dialogRef.closed))\n .subscribe((result) => {\n if (result.matches) {\n this.dialogRef.updateSize('100vw', '100vh');\n const surface = this.dialogRef.overlayRef.overlayElement.querySelector('.mdc-dialog__surface');\n surface.style.borderRadius = '0';\n }\n });\n }\n}\n","\n","import { ComponentType } from '@angular/cdk/portal';\nimport { inject, Injectable, TemplateRef } from '@angular/core';\nimport { MatDialog, MatDialogRef } from '@angular/material/dialog';\n\n@Injectable()\nexport class ModalService {\n dialog = inject(MatDialog);\n\n openList(componentOrTemplateRef: ComponentType | TemplateRef): MatDialogRef {\n return this.dialog.open(componentOrTemplateRef, {\n width: '800px',\n height: '90vh',\n maxWidth: '100vw',\n maxHeight: '100vh',\n autoFocus: false,\n });\n }\n\n openInformational(componentOrTemplateRef: ComponentType | TemplateRef): MatDialogRef {\n return this.dialog.open(componentOrTemplateRef, {\n width: '800px',\n maxWidth: '100vw',\n maxHeight: '100vh',\n autoFocus: false,\n });\n }\n\n openFullscreen(componentOrTemplateRef: ComponentType | TemplateRef): MatDialogRef {\n return this.dialog.open(componentOrTemplateRef, {\n width: '100vw',\n height: '100vh',\n maxWidth: '100vw',\n maxHeight: '100vh',\n autoFocus: false,\n });\n }\n}\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'atlas-panel-description',\n templateUrl: './panel-description.component.html',\n styleUrls: ['./panel-description.component.scss'],\n})\nexport class PanelDescriptionComponent {}\n","\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'atlas-panel-title',\n templateUrl: './panel-title.component.html',\n styleUrls: ['./panel-title.component.scss'],\n})\nexport class PanelTitleComponent {}\n","\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject, Observable } from 'rxjs';\nimport { map, shareReplay } from 'rxjs/operators';\n\nexport interface SnackbarOptions {\n duration: number;\n}\n\nexport interface SnackbarConfig {\n text: string;\n actionText: string;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class SnackbarService {\n private visible$$: BehaviorSubject = new BehaviorSubject(false);\n public visible$: Observable = this.visible$$.asObservable();\n private config$$: BehaviorSubject = new BehaviorSubject({ text: '', actionText: '' });\n private config$: Observable = this.config$$.asObservable();\n public text$: Observable;\n public actionText$: Observable;\n\n private timeoutHandle: number;\n\n constructor() {\n this.text$ = this.config$.pipe(\n map((config: SnackbarConfig) => config.text),\n shareReplay({ bufferSize: 1, refCount: true }),\n );\n this.actionText$ = this.config$.pipe(\n map((config: SnackbarConfig) => config.actionText),\n shareReplay({ bufferSize: 1, refCount: true }),\n );\n }\n\n show(text: string, actionText: string, config?: SnackbarOptions): void {\n if (this.visible$$.getValue()) {\n return;\n }\n this.config$$.next({ text: text, actionText: actionText });\n this.visible$$.next(true);\n this.timeoutHandle = window.setTimeout(this.close.bind(this), config && config.duration ? config.duration : 2000);\n }\n\n close(): void {\n if (!this.visible$$.getValue()) {\n return;\n }\n window.clearTimeout(this.timeoutHandle);\n this.visible$$.next(false);\n }\n}\n","import { Component, Input } from '@angular/core';\n\n@Component({\n selector: 'atlas-tab',\n templateUrl: './tab.component.html',\n styleUrls: ['./tab.component.scss'],\n})\nexport class TabComponent {\n @Input() label: string;\n}\n","\n","import {\n AfterViewInit,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnChanges,\n OnDestroy,\n Output,\n Renderer2,\n ViewChild,\n} from '@angular/core';\nimport { ReplaySubject, Subject } from 'rxjs';\nimport { filter, takeUntil } from 'rxjs/operators';\nimport { InkBarComponent } from '../ink-bar/ink-bar.component';\n\n@Component({\n selector: 'atlas-tab-header',\n templateUrl: './tab-header.component.html',\n styleUrls: ['./tab-header.component.scss'],\n})\nexport class TabHeaderComponent implements OnChanges, OnDestroy, AfterViewInit {\n @ViewChild(InkBarComponent, { read: ElementRef }) _inkBar: ElementRef;\n @Input() labels: string[];\n @Output() selected: EventEmitter = new EventEmitter();\n public activeLabel$$: ReplaySubject = new ReplaySubject(1);\n private _destroyed$$: Subject = new Subject();\n\n constructor(private renderer: Renderer2) {}\n\n ngAfterViewInit(): void {\n this.activeLabel$$\n .pipe(\n takeUntil(this._destroyed$$),\n filter((label: string) => !!label),\n )\n .subscribe((label: string) => {\n this.selected.emit(label);\n if (this._inkBar) {\n const activeTab: HTMLElement = document.getElementById(`atlas-navbar__tab__${label}`);\n this.renderer.setStyle(this._inkBar.nativeElement, 'visibility', 'visible');\n this.renderer.setStyle(this._inkBar.nativeElement, 'width', activeTab.clientWidth + 'px');\n this.renderer.setStyle(this._inkBar.nativeElement, 'left', activeTab.offsetLeft + 'px');\n }\n });\n }\n\n ngOnChanges(): void {\n if (this.labels && this.labels.length > 0) {\n this.activeLabel$$.next(this.labels[0]);\n }\n }\n\n setActive(label: string): void {\n this.activeLabel$$.next(label);\n }\n\n ngOnDestroy(): void {\n this._destroyed$$.next();\n this._destroyed$$.complete();\n }\n}\n"," 1\"\n>\n
    \n
    \n \n
    \n {{ label }}\n
    \n
    \n
    \n \n \n\n","import {\n AfterContentInit,\n Component,\n ContentChildren,\n ElementRef,\n EventEmitter,\n OnDestroy,\n Output,\n QueryList,\n Renderer2,\n} from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { TabComponent } from './tab.component';\n\n@Component({\n selector: 'atlas-tab-group',\n templateUrl: './tab-group.component.html',\n styleUrls: ['./tab-group.component.scss'],\n})\nexport class TabGroupComponent implements AfterContentInit, OnDestroy {\n @Output() selectionChange: EventEmitter = new EventEmitter();\n @ContentChildren(TabComponent, { read: ElementRef }) _tabs: QueryList;\n public tabLabels: string[] = [];\n private _destroyed$$: Subject = new Subject();\n\n constructor(private renderer: Renderer2) {}\n\n ngAfterContentInit(): void {\n this.tabLabels = this._tabs.map((tab: ElementRef) => tab.nativeElement.attributes.getNamedItem('label').value);\n this._tabs.changes.pipe(takeUntil(this._destroyed$$)).subscribe((tabs: ElementRef[]) => {\n this.tabLabels = tabs.map((tab: ElementRef) => tab.nativeElement.attributes.getNamedItem('label').value);\n });\n }\n\n setSelectedTab(selectedTab: string): void {\n this._tabs.forEach((tab: ElementRef) => {\n this.renderer.setStyle(\n tab.nativeElement,\n 'display',\n tab.nativeElement.attributes.getNamedItem('label').value === selectedTab ? 'inherit' : 'none',\n );\n });\n this.selectionChange.emit(selectedTab);\n }\n\n ngOnDestroy(): void {\n this._destroyed$$.next();\n this._destroyed$$.complete();\n }\n}\n","\n\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Forked code, allows for usage within our Angular elements without\n * dependency on @angular/material\n */\nimport { animate, AnimationTriggerMetadata, keyframes, state, style, transition, trigger } from '@angular/animations';\n\n/**\n * Animations used by MatTooltipDirective.\n * @docs-private\n */\nexport const matTooltipAnimations: {\n readonly tooltipState: AnimationTriggerMetadata;\n} = {\n /** Animation that transitions a tooltip in and out. */\n tooltipState: trigger('state', [\n state('initial, void, hidden', style({ opacity: 0, transform: 'scale(0)' })),\n state('visible', style({ transform: 'scale(1)' })),\n transition(\n '* => visible',\n animate(\n '200ms cubic-bezier(0, 0, 0.2, 1)',\n keyframes([\n style({ opacity: 0, transform: 'scale(0)', offset: 0 }),\n style({ opacity: 0.5, transform: 'scale(0.99)', offset: 0.5 }),\n style({ opacity: 1, transform: 'scale(1)', offset: 1 }),\n ]),\n ),\n ),\n transition('* => hidden', animate('100ms cubic-bezier(0, 0, 0.2, 1)', style({ opacity: 0 }))),\n ]),\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Forked code, allows for usage within our Angular elements without\n * dependency on @angular/material\n */\nimport { AnimationEvent } from '@angular/animations';\nimport { AriaDescriber, FocusMonitor } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';\nimport { BreakpointObserver, BreakpointState, Breakpoints } from '@angular/cdk/layout';\nimport {\n FlexibleConnectedPositionStrategy,\n HorizontalConnectionPos,\n OriginConnectionPosition,\n Overlay,\n OverlayConnectionPosition,\n OverlayRef,\n ScrollStrategy,\n VerticalConnectionPos,\n} from '@angular/cdk/overlay';\nimport { Platform, normalizePassiveListenerOptions } from '@angular/cdk/platform';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { ScrollDispatcher } from '@angular/cdk/scrolling';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Directive,\n ElementRef,\n HostBinding,\n Inject,\n InjectionToken,\n Input,\n NgZone,\n OnDestroy,\n OnInit,\n Optional,\n ViewContainerRef,\n ViewEncapsulation,\n} from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\nimport { take, takeUntil } from 'rxjs/operators';\n\nimport { matTooltipAnimations } from './tooltip-animations';\n\n/** Possible positions for a tooltip. */\nexport type TooltipPosition = 'left' | 'right' | 'above' | 'below' | 'before' | 'after';\n\n/**\n * Options for how the tooltip trigger should handle touch gestures.\n * See `MatTooltipDirective.touchGestures` for more information.\n */\nexport type TooltipTouchGestures = 'auto' | 'on' | 'off';\n\n/** Possible visibility states of a tooltip. */\nexport type TooltipVisibility = 'initial' | 'visible' | 'hidden';\n\n/** Time in ms to throttle repositioning after scroll events. */\nexport const SCROLL_THROTTLE_MS = 20;\n\n/** CSS class that will be attached to the overlay panel. */\nexport const TOOLTIP_PANEL_CLASS = 'atlas_navbar--tooltip-panel';\n\n/** Options used to bind passive event listeners. */\nconst passiveListenerOptions = normalizePassiveListenerOptions({ passive: true });\n\n/**\n * Time between the user putting the pointer on a tooltip\n * trigger and the long press event being fired.\n */\nconst LONGPRESS_DELAY = 500;\n\n/**\n * Creates an error to be thrown if the user supplied an invalid tooltip position.\n * @docs-private\n */\nexport function getMatTooltipInvalidPositionError(position: string): Error {\n return Error(`Tooltip position \"${position}\" is invalid.`);\n}\n\n/** Injection token that determines the scroll handling while a tooltip is visible. */\nexport const MAT_TOOLTIP_SCROLL_STRATEGY = new InjectionToken<() => ScrollStrategy>(\n 'atlas_navbar--tooltip-scroll-strategy',\n);\n\n/** @docs-private */\nexport function MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY(overlay: Overlay): () => ScrollStrategy {\n return () => overlay.scrollStrategies.reposition({ scrollThrottle: SCROLL_THROTTLE_MS });\n}\n\n/** @docs-private */\nexport const MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER = {\n provide: MAT_TOOLTIP_SCROLL_STRATEGY,\n deps: [Overlay],\n useFactory: MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY,\n};\n\n/** Default `atlasTooltip` options that can be overridden. */\nexport interface MatTooltipDefaultOptions {\n showDelay: number;\n hideDelay: number;\n touchendHideDelay: number;\n touchGestures?: TooltipTouchGestures;\n position?: TooltipPosition;\n}\n\n/** Injection token to be used to override the default options for `atlasTooltip`. */\nexport const MAT_TOOLTIP_DEFAULT_OPTIONS = new InjectionToken(\n 'atlas_navbar--tooltip-default-options',\n {\n providedIn: 'root',\n factory: MAT_TOOLTIP_DEFAULT_OPTIONS_FACTORY,\n },\n);\n\n/** @docs-private */\nexport function MAT_TOOLTIP_DEFAULT_OPTIONS_FACTORY(): MatTooltipDefaultOptions {\n return {\n showDelay: 0,\n hideDelay: 0,\n touchendHideDelay: 1500,\n };\n}\n\n/**\n * Directive that attaches a material design tooltip to the host element. Animates the showing and\n * hiding of a tooltip provided position (defaults to below the element).\n *\n * https://material.io/design/components/tooltips.html\n */\n@Directive({\n selector: '[atlasTooltip]',\n exportAs: 'atlasTooltip',\n})\nexport class MatTooltipDirective implements OnDestroy, OnInit {\n _overlayRef: OverlayRef | null;\n _tooltipInstance: TooltipComponent | null;\n\n private _portal: ComponentPortal;\n private _position: TooltipPosition = 'below';\n private _disabled = false;\n private _tooltipClass: string | string[] | Set | { [key: string]: any };\n private _scrollStrategy: () => ScrollStrategy;\n\n /** Allows the user to define the position of the tooltip relative to the parent element */\n @Input('atlasTooltipPosition')\n get position(): TooltipPosition {\n return this._position;\n }\n set position(value: TooltipPosition) {\n if (value !== this._position) {\n this._position = value;\n\n if (this._overlayRef) {\n this._updatePosition();\n\n if (this._tooltipInstance) {\n this._tooltipInstance.show(0);\n }\n\n this._overlayRef.updatePosition();\n }\n }\n }\n\n /** Disables the display of the tooltip. */\n @Input('atlasTooltipDisabled')\n get disabled(): boolean {\n return this._disabled;\n }\n // tslint:disable-next-line: typedef\n set disabled(value) {\n this._disabled = coerceBooleanProperty(value);\n\n // If tooltip is disabled, hide immediately.\n if (this._disabled) {\n this.hide(0);\n }\n }\n\n /** The default delay in ms before showing the tooltip after show is called */\n // tslint:disable-next-line:no-input-rename\n @Input('atlasTooltipShowDelay') showDelay = this._defaultOptions.showDelay;\n\n /** The default delay in ms before hiding the tooltip after hide is called */\n //tslint:disable-next-line:no-input-rename\n @Input('atlasTooltipHideDelay') hideDelay = this._defaultOptions.hideDelay;\n\n /**\n * How touch gestures should be handled by the tooltip. On touch devices the tooltip directive\n * uses a long press gesture to show and hide, however it can conflict with the native browser\n * gestures. To work around the conflict, Angular Material disables native gestures on the\n * trigger, but that might not be desirable on particular elements (e.g. inputs and draggable\n * elements). The different values for this option configure the touch event handling as follows:\n * - `auto` - Enables touch gestures for all elements, but tries to avoid conflicts with native\n * browser gestures on particular elements. In particular, it allows text selection on inputs\n * and textareas, and preserves the native browser dragging on elements marked as `draggable`.\n * - `on` - Enables touch gestures for all elements and disables native\n * browser gestures with no exceptions.\n * - `off` - Disables touch gestures. Note that this will prevent the tooltip from\n * showing on touch devices.\n */\n //tslint:disable-next-line:no-input-rename\n @Input('atlasTooltipTouchGestures') touchGestures: TooltipTouchGestures = 'auto';\n\n /** The message to be displayed in the tooltip */\n @Input('atlasTooltip')\n get message(): string {\n return this._message;\n }\n set message(value: string) {\n this._ariaDescriber.removeDescription(this._elementRef.nativeElement, this._message);\n\n // If the message is not a string (e.g. number), convert it to a string and trim it.\n this._message = value != null ? `${value}`.trim() : '';\n\n if (!this._message && this._isTooltipVisible()) {\n this.hide(0);\n } else {\n this._updateTooltipMessage();\n this._ngZone.runOutsideAngular(() => {\n // The `AriaDescriber` has some functionality that avoids adding a description if it's the\n // same as the `aria-label` of an element, however we can't know whether the tooltip trigger\n // has a data-bound `aria-label` or when it'll be set for the first time. We can avoid the\n // issue by deferring the description by a tick so Angular has time to set the `aria-label`.\n Promise.resolve().then(() => {\n this._ariaDescriber.describe(this._elementRef.nativeElement, this.message);\n });\n });\n }\n }\n private _message = '';\n\n /** Classes to be passed to the tooltip. Supports the same syntax as `ngClass`. */\n @Input('atlasTooltipClass')\n get tooltipClass(): string | string[] | Set | { [key: string]: any } {\n return this._tooltipClass;\n }\n set tooltipClass(value: string | string[] | Set | { [key: string]: any }) {\n this._tooltipClass = value;\n if (this._tooltipInstance) {\n this._setTooltipClass(this._tooltipClass);\n }\n }\n\n /** Manually-bound passive event listeners. */\n private _passiveListeners = new Map();\n\n /** Timer started at the last `touchstart` event. */\n private _touchstartTimeout = 0;\n\n /** Emits when the component is destroyed. */\n private readonly _destroyed = new Subject();\n\n constructor(\n private _overlay: Overlay,\n private _elementRef: ElementRef,\n private _scrollDispatcher: ScrollDispatcher,\n private _viewContainerRef: ViewContainerRef,\n private _ngZone: NgZone,\n private _platform: Platform,\n private _ariaDescriber: AriaDescriber,\n private _focusMonitor: FocusMonitor,\n @Inject(MAT_TOOLTIP_SCROLL_STRATEGY) scrollStrategy: any,\n @Optional() private _dir: Directionality,\n @Optional()\n @Inject(MAT_TOOLTIP_DEFAULT_OPTIONS)\n private _defaultOptions: MatTooltipDefaultOptions,\n /**\n * @deprecated _hammerLoader parameter to be removed.\n * @breaking-change 9.0.0\n */\n // Note that we need to give Angular something to inject here so it doesn't throw.\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n @Inject(ElementRef) _hammerLoader?: any,\n ) {\n this._scrollStrategy = scrollStrategy;\n\n if (_defaultOptions) {\n if (_defaultOptions.position) {\n this.position = _defaultOptions.position;\n }\n\n if (_defaultOptions.touchGestures) {\n this.touchGestures = _defaultOptions.touchGestures;\n }\n }\n\n _focusMonitor\n .monitor(_elementRef)\n .pipe(takeUntil(this._destroyed))\n .subscribe((origin) => {\n // Note that the focus monitor runs outside the Angular zone.\n if (!origin) {\n _ngZone.run(() => this.hide(0));\n } else if (origin === 'keyboard') {\n _ngZone.run(() => this.show());\n }\n });\n\n _ngZone.runOutsideAngular(() => {\n _elementRef.nativeElement.addEventListener('keydown', this._handleKeydown);\n });\n }\n\n /**\n * Setup styling-specific things\n */\n ngOnInit(): void {\n // This needs to happen in `ngOnInit` so the initial values for all inputs have been set.\n this._setupPointerEvents();\n }\n\n /**\n * Dispose the tooltip when destroyed.\n */\n ngOnDestroy(): void {\n const nativeElement = this._elementRef.nativeElement;\n\n window.clearTimeout(this._touchstartTimeout);\n\n if (this._overlayRef) {\n this._overlayRef.dispose();\n this._tooltipInstance = null;\n }\n\n // Clean up the event listeners set in the constructor\n nativeElement.removeEventListener('keydown', this._handleKeydown);\n this._passiveListeners.forEach((listener, event) => {\n nativeElement.removeEventListener(event, listener, passiveListenerOptions);\n });\n this._passiveListeners.clear();\n\n this._destroyed.next();\n this._destroyed.complete();\n\n this._ariaDescriber.removeDescription(nativeElement, this.message);\n this._focusMonitor.stopMonitoring(nativeElement);\n }\n\n /** Shows the tooltip after the delay in ms, defaults to tooltip-delay-show or 0ms if no input */\n show(delay: number = this.showDelay): void {\n if (\n this.disabled ||\n !this.message ||\n (this._isTooltipVisible() &&\n !!this._tooltipInstance &&\n !this._tooltipInstance._showTimeoutId &&\n !this._tooltipInstance._hideTimeoutId)\n ) {\n return;\n }\n\n const overlayRef = this._createOverlay();\n\n this._detach();\n this._portal = this._portal || new ComponentPortal(TooltipComponent, this._viewContainerRef);\n this._tooltipInstance = overlayRef.attach(this._portal).instance;\n this._tooltipInstance\n .afterHidden()\n .pipe(takeUntil(this._destroyed))\n .subscribe(() => this._detach());\n this._setTooltipClass(this._tooltipClass);\n this._updateTooltipMessage();\n this._tooltipInstance.show(delay);\n }\n\n /** Hides the tooltip after the delay in ms, defaults to tooltip-delay-hide or 0ms if no input */\n hide(delay: number = this.hideDelay): void {\n if (this._tooltipInstance) {\n this._tooltipInstance.hide(delay);\n }\n }\n\n /** Shows/hides the tooltip */\n toggle(): void {\n this._isTooltipVisible() ? this.hide() : this.show();\n }\n\n /** Returns true if the tooltip is currently visible to the user */\n _isTooltipVisible(): boolean {\n return !!this._tooltipInstance && this._tooltipInstance.isVisible();\n }\n\n /** Handles the keydown events on the host element. */\n private _handleKeydown = (e: KeyboardEvent) => {\n if (this._isTooltipVisible() && e.keyCode === ESCAPE && !hasModifierKey(e)) {\n e.preventDefault();\n e.stopPropagation();\n this._ngZone.run(() => this.hide(0));\n }\n };\n\n /** Create the overlay config and position strategy */\n private _createOverlay(): OverlayRef {\n if (this._overlayRef) {\n return this._overlayRef;\n }\n\n const scrollableAncestors = this._scrollDispatcher.getAncestorScrollContainers(this._elementRef);\n\n // Create connected position strategy that listens for scroll events to reposition.\n const strategy = this._overlay\n .position()\n .flexibleConnectedTo(this._elementRef)\n .withTransformOriginOn('.atlas_navbar--tooltip')\n .withFlexibleDimensions(false)\n .withViewportMargin(8)\n .withScrollableContainers(scrollableAncestors);\n\n strategy.positionChanges.pipe(takeUntil(this._destroyed)).subscribe((change) => {\n if (this._tooltipInstance) {\n if (change.scrollableViewProperties.isOverlayClipped && this._tooltipInstance.isVisible()) {\n // After position changes occur and the overlay is clipped by\n // a parent scrollable then close the tooltip.\n this._ngZone.run(() => this.hide(0));\n }\n }\n });\n\n this._overlayRef = this._overlay.create({\n direction: this._dir,\n positionStrategy: strategy,\n panelClass: TOOLTIP_PANEL_CLASS,\n scrollStrategy: this._scrollStrategy(),\n });\n\n this._updatePosition();\n\n this._overlayRef\n .detachments()\n .pipe(takeUntil(this._destroyed))\n .subscribe(() => this._detach());\n\n return this._overlayRef;\n }\n\n /** Detaches the currently-attached tooltip. */\n private _detach(): void {\n if (this._overlayRef && this._overlayRef.hasAttached()) {\n this._overlayRef.detach();\n }\n\n this._tooltipInstance = null;\n }\n\n /** Updates the position of the current tooltip. */\n private _updatePosition(): void {\n if (!this._overlayRef) {\n return;\n }\n const position = this._overlayRef.getConfig().positionStrategy as FlexibleConnectedPositionStrategy;\n const origin = this._getOrigin();\n const overlay = this._getOverlayPosition();\n\n position.withPositions([\n { ...origin.main, ...overlay.main },\n { ...origin.fallback, ...overlay.fallback },\n ]);\n }\n\n /**\n * Returns the origin position and a fallback position based on the user's position preference.\n * The fallback position is the inverse of the origin (e.g. `'below' -> 'above'`).\n */\n _getOrigin(): { main: OriginConnectionPosition; fallback: OriginConnectionPosition } {\n const isLtr = !this._dir || this._dir.value === 'ltr';\n const position = this.position;\n let originPosition: OriginConnectionPosition;\n\n if (position === 'above' || position === 'below') {\n originPosition = { originX: 'center', originY: position === 'above' ? 'top' : 'bottom' };\n } else if (position === 'before' || (position === 'left' && isLtr) || (position === 'right' && !isLtr)) {\n originPosition = { originX: 'start', originY: 'center' };\n } else if (position === 'after' || (position === 'right' && isLtr) || (position === 'left' && !isLtr)) {\n originPosition = { originX: 'end', originY: 'center' };\n } else {\n throw getMatTooltipInvalidPositionError(position);\n }\n\n const { x, y } = this._invertPosition(originPosition.originX, originPosition.originY);\n\n return {\n main: originPosition,\n fallback: { originX: x, originY: y },\n };\n }\n\n /** Returns the overlay position and a fallback position based on the user's preference */\n _getOverlayPosition(): { main: OverlayConnectionPosition; fallback: OverlayConnectionPosition } {\n const isLtr = !this._dir || this._dir.value === 'ltr';\n const position = this.position;\n let overlayPosition: OverlayConnectionPosition;\n\n if (position === 'above') {\n overlayPosition = { overlayX: 'center', overlayY: 'bottom' };\n } else if (position === 'below') {\n overlayPosition = { overlayX: 'center', overlayY: 'top' };\n } else if (position === 'before' || (position === 'left' && isLtr) || (position === 'right' && !isLtr)) {\n overlayPosition = { overlayX: 'end', overlayY: 'center' };\n } else if (position === 'after' || (position === 'right' && isLtr) || (position === 'left' && !isLtr)) {\n overlayPosition = { overlayX: 'start', overlayY: 'center' };\n } else {\n throw getMatTooltipInvalidPositionError(position);\n }\n\n const { x, y } = this._invertPosition(overlayPosition.overlayX, overlayPosition.overlayY);\n\n return {\n main: overlayPosition,\n fallback: { overlayX: x, overlayY: y },\n };\n }\n\n /** Updates the tooltip message and repositions the overlay according to the new message length */\n private _updateTooltipMessage(): void {\n // Must wait for the message to be painted to the tooltip so that the overlay can properly\n // calculate the correct positioning based on the size of the text.\n if (this._tooltipInstance) {\n this._tooltipInstance.message = this.message;\n this._tooltipInstance._markForCheck();\n\n this._ngZone.onMicrotaskEmpty\n .asObservable()\n .pipe(take(1), takeUntil(this._destroyed))\n .subscribe(() => {\n if (this._tooltipInstance) {\n if (this._overlayRef) {\n this._overlayRef.updatePosition();\n }\n }\n });\n }\n }\n\n /** Updates the tooltip class */\n private _setTooltipClass(tooltipClass: string | string[] | Set | { [key: string]: any }): void {\n if (this._tooltipInstance) {\n this._tooltipInstance.tooltipClass = tooltipClass;\n this._tooltipInstance._markForCheck();\n }\n }\n\n /** Inverts an overlay position. */\n private _invertPosition(x: HorizontalConnectionPos, y: VerticalConnectionPos): any {\n if (this.position === 'above' || this.position === 'below') {\n if (y === 'top') {\n y = 'bottom';\n } else if (y === 'bottom') {\n y = 'top';\n }\n } else {\n if (x === 'end') {\n x = 'start';\n } else if (x === 'start') {\n x = 'end';\n }\n }\n\n return { x, y };\n }\n\n /** Binds the pointer events to the tooltip trigger. */\n private _setupPointerEvents(): void {\n // The mouse events shouldn't be bound on mobile devices, because they can prevent the\n // first tap from firing its click event or can cause the tooltip to open for clicks.\n if (!this._platform.IOS && !this._platform.ANDROID) {\n this._passiveListeners.set('mouseenter', () => this.show()).set('mouseleave', () => this.hide());\n } else if (this.touchGestures !== 'off') {\n this._disableNativeGesturesIfNecessary();\n const touchendListener = () => {\n window.clearTimeout(this._touchstartTimeout);\n this.hide(this._defaultOptions.touchendHideDelay);\n };\n\n this._passiveListeners\n .set('touchend', touchendListener)\n .set('touchcancel', touchendListener)\n .set('touchstart', () => {\n // Note that it's important that we don't `preventDefault` here,\n // because it can prevent click events from firing on the element.\n window.clearTimeout(this._touchstartTimeout);\n this._touchstartTimeout = window.setTimeout(() => this.show(), LONGPRESS_DELAY);\n });\n }\n\n this._passiveListeners.forEach((listener, event) => {\n this._elementRef.nativeElement.addEventListener(event, listener, passiveListenerOptions);\n });\n }\n\n /** Disables the native browser gestures, based on how the tooltip has been configured. */\n private _disableNativeGesturesIfNecessary(): void {\n const element = this._elementRef.nativeElement;\n const style = element.style;\n const gestures = this.touchGestures;\n\n if (gestures !== 'off') {\n // If gestures are set to `auto`, we don't disable text selection on inputs and\n // textareas, because it prevents the user from typing into them on iOS Safari.\n if (gestures === 'on' || (element.nodeName !== 'INPUT' && element.nodeName !== 'TEXTAREA')) {\n style.userSelect = style.webkitUserSelect = (style as any).MozUserSelect = 'none';\n }\n\n // If we have `auto` gestures and the element uses native HTML dragging,\n // we don't set `-webkit-user-drag` because it prevents the native behavior.\n if (gestures === 'on' || !element.draggable) {\n (style as any).webkitUserDrag = 'none';\n }\n\n style.touchAction = 'none';\n }\n }\n}\n\n/**\n * Internal component that wraps the tooltip's content.\n * @docs-private\n */\n@Component({\n selector: 'atlas-tooltip-component',\n templateUrl: 'tooltip.html',\n styleUrls: ['tooltip.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [matTooltipAnimations.tooltipState],\n})\nexport class TooltipComponent implements OnDestroy {\n @HostBinding('[style.zoom]') _zoom: number | null = null;\n @HostBinding('(body:click)') _bodyClickEvent;\n @HostBinding('aria-hidden') _ariaHidden = 'true';\n /** Message to display in the tooltip */\n message: string;\n\n /** Classes to be added to the tooltip. Supports the same syntax as `ngClass`. */\n tooltipClass: string | string[] | Set | { [key: string]: any };\n\n /** The timeout ID of any current timer set to show the tooltip */\n _showTimeoutId = 0;\n\n /** The timeout ID of any current timer set to hide the tooltip */\n _hideTimeoutId = 0;\n\n /** Property watched by the animation framework to show or hide the tooltip */\n _visibility: TooltipVisibility = 'initial';\n\n /** Whether interactions on the page should close the tooltip */\n private _closeOnInteraction = false;\n\n /** Subject for notifying that the tooltip has been hidden from the view */\n private readonly _onHide: Subject = new Subject();\n\n /** Stream that emits whether the user has a handset-sized display. */\n _isHandset: Observable = this._breakpointObserver.observe(Breakpoints.Handset);\n\n constructor(private _changeDetectorRef: ChangeDetectorRef, private _breakpointObserver: BreakpointObserver) {\n this._zoom = this._visibility === 'visible' ? 1 : null;\n this._bodyClickEvent = this._handleBodyInteraction();\n }\n\n /**\n * Shows the tooltip with an animation originating from the provided origin\n * @param delay Amount of milliseconds to the delay showing the tooltip.\n */\n show(delay: number): void {\n // Cancel the delayed hide if it is scheduled\n if (this._hideTimeoutId) {\n window.clearTimeout(this._hideTimeoutId);\n this._hideTimeoutId = null;\n }\n\n // Body interactions should cancel the tooltip if there is a delay in showing.\n this._closeOnInteraction = true;\n this._showTimeoutId = window.setTimeout(() => {\n this._visibility = 'visible';\n this._showTimeoutId = null;\n\n // Mark for check so if any parent component has set the\n // ChangeDetectionStrategy to OnPush it will be checked anyways\n this._markForCheck();\n }, delay);\n }\n\n /**\n * Begins the animation to hide the tooltip after the provided delay in ms.\n * @param delay Amount of milliseconds to delay showing the tooltip.\n */\n hide(delay: number): void {\n // Cancel the delayed show if it is scheduled\n if (this._showTimeoutId) {\n window.clearTimeout(this._showTimeoutId);\n this._showTimeoutId = null;\n }\n\n this._hideTimeoutId = window.setTimeout(() => {\n this._visibility = 'hidden';\n this._hideTimeoutId = null;\n\n // Mark for check so if any parent component has set the\n // ChangeDetectionStrategy to OnPush it will be checked anyways\n this._markForCheck();\n }, delay);\n }\n\n /** Returns an observable that notifies when the tooltip has been hidden from view. */\n afterHidden(): Observable {\n return this._onHide.asObservable();\n }\n\n /** Whether the tooltip is being displayed. */\n isVisible(): boolean {\n return this._visibility === 'visible';\n }\n\n ngOnDestroy(): void {\n this._onHide.complete();\n }\n\n _animationStart(): void {\n this._closeOnInteraction = false;\n }\n\n _animationDone(event: AnimationEvent): void {\n const toState = event.toState as TooltipVisibility;\n\n if (toState === 'hidden' && !this.isVisible()) {\n this._onHide.next();\n }\n\n if (toState === 'visible' || toState === 'hidden') {\n this._closeOnInteraction = true;\n }\n }\n\n /**\n * Interactions on the HTML body should close the tooltip immediately as defined in the\n * material design spec.\n * https://material.io/design/components/tooltips.html#behavior\n */\n _handleBodyInteraction(): void {\n if (this._closeOnInteraction) {\n this.hide(0);\n }\n }\n\n /**\n * Marks that the tooltip needs to be checked in the next change detection run.\n * Mainly used for rendering the initial text before positioning a tooltip, which\n * can be problematic in components with OnPush change detection.\n */\n _markForCheck(): void {\n this._changeDetectorRef.markForCheck();\n }\n}\n","\n {{message}}\n\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Forked code, allows for usage within our Angular elements without\n * dependency on @angular/material\n */\n\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport {\n MatTooltipDirective as AtlasTooltipDirective,\n TooltipComponent as AtlasTooltipComponent,\n MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER as ATLAS_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER,\n} from './tooltip';\n\n@NgModule({\n imports: [A11yModule, CommonModule, OverlayModule],\n exports: [AtlasTooltipDirective, AtlasTooltipComponent],\n declarations: [AtlasTooltipDirective, AtlasTooltipComponent],\n providers: [ATLAS_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER],\n})\nexport class AtlasTooltipModule {}\n","import { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport { IAMService, UserIdentifier } from '@vendasta/iamv2';\n\n@Injectable({ providedIn: 'root' })\nexport class AtlasEmailVerificationService {\n constructor(private readonly iamService: IAMService) {}\n\n sendEmailVerificationEmail(\n email: string,\n partnerID: string,\n nextURL: string,\n nextURLText: string,\n ): Observable {\n return this.iamService\n .sendEmailVerification(\n new UserIdentifier({\n namespacedEmail: {\n email: email,\n namespace: partnerID,\n },\n }),\n '',\n nextURL,\n nextURLText,\n )\n .pipe(map(() => true));\n }\n}\n","import { HttpClient, HttpHeaders } from '@angular/common/http';\nimport { Component, inject } from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\nimport { BrandingV2Service } from '@galaxy/partner';\nimport { TranslateService } from '@ngx-translate/core';\nimport { HostService } from '@vendasta/atlas';\nimport { SnackbarService } from '@vendasta/galaxy/snackbar-service';\nimport { BehaviorSubject, combineLatest, Observable } from 'rxjs';\nimport { map, switchMap, take } from 'rxjs/operators';\nimport { AtlasConfigService, AtlasDataService } from '../../../core/src';\nimport { AtlasEmailVerificationService } from './email-verification.service';\nimport { DateFormat } from '@vendasta/galaxy/utility/date-utils';\n\n@Component({\n selector: 'atlas-email-verification',\n templateUrl: './email-verification.component.html',\n styleUrls: ['./email-verification.component.scss'],\n})\nexport class EmailVerificationComponent {\n static EMAIL_VERIFICATION_PARAM_ID = 'open_email_verification';\n DateFormat = DateFormat;\n sendingVerificationEmail$$ = new BehaviorSubject(false);\n sendingVerificationEmail$: Observable = this.sendingVerificationEmail$$.asObservable();\n email$: Observable = this.dataService.email$;\n partnerId$: Observable = this.configService.partnerId$;\n logoURL$ = this.partnerId$.pipe(\n switchMap((partnerId) => {\n return this.brandingService.getBranding(partnerId, '').pipe(\n take(1),\n map((branding) => branding.logoUrl),\n );\n }),\n );\n\n dialogRef = inject(MatDialogRef);\n verificationDeadline = new Date(Date.UTC(2023, 4, 16, 0, 0, 0));\n\n constructor(\n private dataService: AtlasDataService,\n private configService: AtlasConfigService,\n private emailVerificationService: AtlasEmailVerificationService,\n private translationService: TranslateService,\n private snackbarService: SnackbarService,\n private brandingService: BrandingV2Service,\n private http: HttpClient,\n private hostService: HostService,\n ) {}\n\n sendVerificationEmail(): void {\n this.sendingVerificationEmail$$.next(true);\n\n combineLatest([this.email$, this.partnerId$])\n .pipe(\n take(1),\n switchMap(([email, partnerId]) =>\n this.emailVerificationService.sendEmailVerificationEmail(email, partnerId, window.location.href, ''),\n ),\n switchMap(() => this.remindMeLaterEmailVerification()),\n )\n .subscribe(\n () => {\n this.sendingVerificationEmail$$.next(false);\n this.translationService.stream('EMAIL_VERIFICATION.EMAIL_SENT').subscribe((translation) => {\n this.snackbarService.openSuccessSnack(translation);\n this.dialogRef.close();\n });\n },\n () => {\n this.sendingVerificationEmail$$.next(false);\n this.translationService.stream('COMMON.ERROR_TRY_AGAIN').subscribe((translation) => {\n this.snackbarService.openErrorSnack(translation);\n this.dialogRef.close();\n });\n },\n );\n }\n\n remindMeLater(): void {\n this.remindMeLaterEmailVerification().subscribe(() => {\n this.dialogRef.close();\n });\n }\n\n private remindMeLaterEmailVerification() {\n return this.http.post(this.hostService.hostWithScheme + '/extend-email-verification-display-date', null, {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json',\n }),\n withCredentials: true,\n observe: 'response',\n });\n }\n}\n","\n\n
    \n
    \n
    \n
    \n
    \n {{ 'EMAIL_VERIFICATION.TITLE' | translate }}\n
    \n
    \n

    \n

    \n {{ 'EMAIL_VERIFICATION.CLICK_BELOW' | translate }}:\n {{ email$ | async }}\n

    \n
    \n
    \n \n \n {{ 'EMAIL_VERIFICATION.SEND_VERIFICATION_EMAIL' | translate }}\n \n \n \n \n \n \n {{ 'EMAIL_VERIFICATION.REMIND_ME_LATER' | translate }}\n \n \n \n \n
    \n
    \n
    \n
    \n
    \n {{ 'EMAIL_VERIFICATION.CONTACT_SUPPORT' | translate }}\n
    \n
    \n
    \n

    \n {{ 'EMAIL_VERIFICATION.CHECK_YOUR_INBOX' | translate }}\n

    \n

    \n \n

    \n
    \n","import { Component, EventEmitter, Input, OnChanges, Output } from '@angular/core';\nimport { AtlasLanguageService, LanguageMapping } from '../../../../../../core/src';\nimport { TranslateLoader, TranslateService } from '@ngx-translate/core';\nimport { combineLatest, Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\n@Component({\n selector: 'atlas-language-list-item',\n templateUrl: './language-list-item.component.html',\n styleUrls: ['./language-list-item.component.scss'],\n})\nexport class LanguageListItemComponent implements OnChanges {\n @Input() language: LanguageMapping;\n @Output() languageSelected: EventEmitter = new EventEmitter();\n\n isCurrentLanguage = this.languageService.language$.pipe(map((language) => language === this.language.code));\n public languageLabels$: Observable<{ current: string; target: string }>;\n\n constructor(\n private languageService: AtlasLanguageService,\n private translateService: TranslateService,\n private translateLoader: TranslateLoader,\n ) {}\n\n ngOnChanges(): void {\n this.languageLabels$ = combineLatest([\n this.translateService.stream(`LANGUAGE.${this.language.code.toLowerCase()}` || this.language.label),\n this.translateLoader.getTranslation(this.language.code),\n ]).pipe(\n map(([currentTranslation, targetTranslation]) => {\n const languageLabels = { current: currentTranslation, target: '' };\n ['LANGUAGE', this.language.code.toLowerCase()].forEach((key) => {\n if (key in targetTranslation) {\n targetTranslation = targetTranslation[key];\n }\n });\n if (typeof targetTranslation === 'string') {\n languageLabels.target = targetTranslation;\n }\n return languageLabels;\n }),\n );\n }\n\n selectLanguage(): void {\n this.languageSelected.emit(this.language.code);\n }\n}\n","\n \n \n \n\n
    \n \n
    \n\n check\n\n\n\n language\n \n {{ language.flag }}\n \n
    \n
    \n {{ labels.target | translate }}\n
    \n \n {{ labels.current | translate }}\n
    \n \n
    \n","import { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { LanguageMapping } from '../../../../../core/src';\n\n@Component({\n selector: 'atlas-language-list',\n templateUrl: './language-list.component.html',\n styleUrls: ['./language-list.component.scss'],\n})\nexport class LanguageListComponent {\n @Input() languages: LanguageMapping[] = [];\n @Output() languageSelected: EventEmitter = new EventEmitter();\n\n selectLanguage(language: string): void {\n this.languageSelected.emit(language);\n }\n}\n","\n","import { Component, Inject, Optional } from '@angular/core';\nimport { AtlasDataService, AtlasLanguageService } from '../../../../core/src';\nimport { LEXICON_TRANSLATE_PORTAL_URL } from '@galaxy/lexicon';\nimport { map } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\n\n@Component({\n selector: 'atlas-language-selector-modal',\n templateUrl: './language-selector-modal.component.html',\n styleUrls: ['./language-selector-modal.component.scss'],\n})\nexport class AtlasLanguageSelectorModalComponent {\n public readonly languages$ = this.languageService.languageList$.pipe(\n map((langs) => {\n return langs.sort((l1, l2) => l1.label.localeCompare(l2.label));\n }),\n );\n\n impersonating$ = this.dataService.impersonateeUsername$.pipe(map(Boolean));\n\n constructor(\n public languageService: AtlasLanguageService,\n private dataService: AtlasDataService,\n @Optional() @Inject(LEXICON_TRANSLATE_PORTAL_URL) public translatePortalUrl$: Observable,\n ) {}\n\n public languageSelected(language: string): void {\n this.languageService.setLanguage(language);\n }\n\n public urlIsExternal(url: string): boolean {\n return url.startsWith('http');\n }\n}\n","\n \n {{ 'SWITCH_LANGUAGE_MODAL.SWITCH_LANGUAGE' | translate }}\n \n \n
    \n \n {{ 'SWITCH_LANGUAGE_MODAL.IMPERSONATION_WARNING' | translate }}\n \n
    \n
    \n
    \n \n
    \n
    \n
    \n \n \n {{ 'SWITCH_LANGUAGE_MODAL.HELP_US_TRANSLATE' | translate }}\n \n \n {{ 'SWITCH_LANGUAGE_MODAL.VISIT_TRANSLATION_PORTAL' | translate }}\n \n \n {{ 'SWITCH_LANGUAGE_MODAL.VISIT_TRANSLATION_PORTAL' | translate }}\n open_in_new\n \n \n
    \n","{\n \"MENU_TOGGLE\": \"Menu\",\n \"DROPDOWN_MENU\": {\n \"SIGNED_IN_AS\": \"Signed in as\",\n \"IMPERSONATING_USER_AS\": \"as\",\n \"EMAIL_IS_VERIFIED\": \"Your email address is verified\",\n \"EMAIL_IS_UNVERIFIED\": \"Your email address is not verified\",\n \"SWITCH_USER\": \"Switch user\"\n },\n \"NOTIFICATIONS\": {\n \"TITLE\": \"Notifications\",\n \"LOAD_FAILURE\": \"Failed to load notifications.\",\n \"NO_NOTIFICATIONS\": \"You have no notifications.\",\n \"ACTIONS\": {\n \"SETTINGS\": \"Settings\",\n \"MARK_ALL_AS_READ\": \"Mark all as read\",\n \"MARK_AS_READ\": \"Mark as read\",\n \"MARK_AS_UNREAD\": \"Mark as unread\",\n \"TURN_OFF_NOTIFICATION\": \"Turn off notification\",\n \"TURN_ON_NOTIFICATION\": \"Turn on notification\",\n \"DISCARD_CHANGES\": \"Discard changes\",\n \"SAVE\": \"Save\",\n \"UNDO\": \"Undo\",\n \"DISMISS\": \"Dismiss\",\n \"CONFIGURE_SMB_SETTING\": \"Configure notification settings for this account.\"\n },\n \"EMPTY_NOTIFICATION_SETTING\": {\n \"TITLE\": \"No notification settings available\",\n \"TEXT\": \"Notifications are currently turned off. To start receiving notifications, contact your account representative.\"\n },\n \"UNSUBSCRIBE_TEXT\": \"You will no longer receive this notification.\",\n \"SUBSCRIBE_TEXT\": \"You will now receive this notification.\",\n \"SETTINGS\": {\n \"ALL_DISABLED\": \"All notifications have been disabled. Emails will not be received.\",\n \"NO_ACCESS\": \"You don't have access to any settings.\",\n \"LOAD_FAILURE\": \"Failed to load settings. Please try again.\",\n \"ACTIVITY_SETTINGS_DESCRIPTION\": \"These notifications are currently in beta, you can view and update your activity notification settings here\",\n \"BETA\": \"BETA\",\n \"DESCRIPTION\": {\n \"SOME_ON\": \"Some on\",\n \"ALL_ON\": \"All on\",\n \"ALL_OFF\": \"All off\",\n \"ALL_EVENTS\": \"All events\",\n \"ALL_EVENTS_TOOLTIP\": \"Notify me for all events of this type.\",\n \"ONLY_MY_EVENTS\": \"Only my events\",\n \"ONLY_MY_EVENTS_TOOLTIP\": \"Notify me only when an event directly involves me.\"\n },\n \"MEDIUMS\": {\n \"APP\": \"App\",\n \"EMAIL\": \"Email\",\n \"UNKNOWN\": \"Unknown\"\n },\n \"UNAVAILABLE\": \"notifications are not available\",\n \"SNACKBAR\": {\n \"UPDATED\": \"Your notification settings were updated.\",\n \"FAILURE\": \"An error occurred while trying to load your notification settings, please try again.\",\n \"SAVE_FAILURE\": \"An error occurred trying to save your notification settings, please retry.\"\n }\n }\n },\n \"VBC_NOTIFICATIONS\": {\n \"GLOBAL_SETTINGS\": \"Global settings\",\n \"REPORTS\": \"Reports\",\n \"GLOBALLY_DISABLED\": \"has been globally disabled\",\n \"MEDIUMS\": {\n \"IN_APP\": \"In-app\",\n \"INSTANT_EMAIL\": \"Instant email\",\n \"DIGEST_EMAIL\": \"Digest email\",\n \"WEEKLY_EMAIL\": \"Weekly email\",\n \"MONTHLY_EMAIL\": \"Monthly email\"\n }\n },\n \"COMMON\": {\n \"POWERED_BY\": \"Powered by\",\n \"ERROR_TRY_AGAIN\": \"An error occurred. Please try again.\"\n },\n \"USER_LANGUAGE_MODAL\": {\n \"PROMPT_WITH_BROWSER_LANG\": \"We noticed your browser language is set to {{browserLang}}, but your user profile language is set to {{userLang}}.\",\n \"PROMPT_WITHOUT_BROWSER_LANG\": \"Your user profile language is currently set to {{userLang}}.\",\n \"WANT_TO_SWITCH\": \"Would you like to confirm your language preferences? We won't ask again for this device.\",\n \"USE_BROWSER_LANGUAGE\": \"Switch to {{browserLang}}\",\n \"CONFIRM_USER_LANGUAGE\": \"Use {{userLang}}\",\n \"SEE_ALL_LANGUAGE_OPTIONS\": \"Select another language\"\n },\n \"LANGUAGE\": {\n \"en\": \"English\",\n \"fr\": \"French\",\n \"fr-ca\": \"French (Canada)\",\n \"cs\": \"Czech\",\n \"de\": \"German\",\n \"nl\": \"Dutch\",\n \"es-419\": \"Spanish (Latin America)\",\n \"pt\": \"Portuguese (Brazil)\",\n \"ru\": \"Russian\",\n \"ja\": \"Japanese\",\n \"it\": \"Italian\",\n \"af\": \"Afrikaans\"\n },\n \"SWITCH_LANGUAGE_MODAL\": {\n \"SWITCH_LANGUAGE\": \"Switch language\",\n \"SEARCH_LANGUAGES\": \"Search languages\",\n \"TO_SELECT\": \"to select\",\n \"TO_NAVIGATE\": \"to navigate\",\n \"TO_CLOSE\": \"to close\",\n \"HELP_US_TRANSLATE\": \"Is your preferred language missing from this list? Are the translations incomplete? Help us translate using the Weblate translation portal!\",\n \"VISIT_TRANSLATION_PORTAL\": \"Visit Weblate\",\n \"IMPERSONATION_WARNING\": \"You are currently impersonating a user. Changing the language will affect your browser, but not change the user's language.\"\n },\n \"EMAIL_VERIFICATION\": {\n \"TITLE\": \"Verify your email address\",\n \"TO_IMPROVE_SECURITY\": \"To improve security, you'll need to verify your email address to continue using your account.\",\n \"TO_IMPROVE_SECURITY_WITH_DEADLINE\": \"To improve security, you'll need to verify your email address before {{ verificationDeadline }} to continue using your account.\",\n \"CLICK_BELOW\": \"Click below to send a verification email to the following email\",\n \"SEND_VERIFICATION_EMAIL\": \"Send verification email\",\n \"REMIND_ME_LATER\": \"Remind me later\",\n \"EMAIL_SENT\": \"Email sent\",\n \"CHECK_YOUR_INBOX\": \"Check your inbox for an email like this\",\n \"CONTACT_SUPPORT\": \"Need help? Contact your support team\"\n },\n \"USER_SWITCHER_MODAL\": {\n \"CANCEL\": \"Cancel\"\n }\n}\n","import { Injectable } from '@angular/core';\nimport { EnvironmentService, Environment } from '@galaxy/core';\n\nconst demoHost = 'https://www.smblogin-demo.com';\nconst prodHost = 'https://www.smblogin.com';\n\n@Injectable({ providedIn: 'root' })\nexport class HostService {\n private _httpsHost: string;\n\n constructor(private environmentService: EnvironmentService) {}\n\n httpsHost(): string {\n if (this._httpsHost) {\n return this._httpsHost;\n }\n\n switch (this.environmentService.getEnvironment()) {\n case Environment.LOCAL:\n this._httpsHost = demoHost;\n break;\n case Environment.TEST:\n this._httpsHost = demoHost;\n break;\n case Environment.DEMO:\n this._httpsHost = demoHost;\n break;\n case Environment.PROD:\n this._httpsHost = prodHost;\n break;\n }\n return this._httpsHost;\n }\n}\n","import {\n ActivityInterface,\n GetSectionsRequestInterface,\n GetSectionsResponseInterface,\n ProductInterface,\n SaveSettingInterface,\n SaveSectionsRequestInterface,\n SectionContainerInterface,\n SectionInterface,\n GetByAccountGroupIdResponseInterface,\n GetByAccountGroupIdSettingInterface,\n GetByAccountGroupIdRequestInterface,\n} from '../interfaces/notifications.interface';\n\nexport class Section implements SectionInterface {\n id: string;\n localized_title: string;\n title: string;\n value: string[] | boolean;\n\n constructor(kwargs?: SectionInterface) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n\n static fromProto(proto: any): Section {\n let m = new Section();\n m = Object.assign(m, proto);\n return m;\n }\n}\n\nexport class Activity implements ActivityInterface {\n id: string;\n localized_title: string;\n tags: Section[];\n title: string;\n value: boolean;\n\n constructor(kwargs?: ActivityInterface) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n\n static fromProto(proto: any): Activity {\n let m = new Activity();\n m = Object.assign(m, proto);\n if (proto.tags) {\n m.tags = proto.tags.map(Section.fromProto);\n }\n return m;\n }\n}\n\nexport class Product implements ProductInterface {\n activities: Activity[];\n productId: string;\n title: string;\n\n constructor(kwargs?: ProductInterface) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n\n static fromProto(proto: any): Product {\n let m = new Product();\n m = Object.assign(m, proto);\n if (proto.activities) {\n m.activities = proto.activities.map(Activity.fromProto);\n }\n return m;\n }\n}\n\nexport class SectionContainer implements SectionContainerInterface {\n products: Product[];\n section: Section;\n\n constructor(kwargs?: SectionContainerInterface) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n\n static fromProto(proto: any): SectionContainer {\n let m = new SectionContainer();\n m = Object.assign(m, proto);\n if (proto.products) {\n m.products = proto.products.map(Product.fromProto);\n }\n if (proto.section) {\n m.section = Section.fromProto(proto.section);\n }\n return m;\n }\n}\n\nexport class GetSectionsResponse implements GetSectionsResponseInterface {\n data: SectionContainer[];\n\n constructor(kwargs?: GetSectionsResponseInterface) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n\n static fromProto(proto: any): GetSectionsResponse {\n let m = new GetSectionsResponse();\n m = Object.assign(m, proto);\n if (proto.data) {\n m.data = proto.data.map(SectionContainer.fromProto);\n }\n return m;\n }\n}\n\nexport class GetSectionsRequest implements GetSectionsRequestInterface {\n accountGroupId: string;\n email: string;\n partnerId: string;\n marketId: string;\n locale: string;\n\n constructor(kwargs?: GetSectionsRequestInterface) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n\n toApiJson(): object {\n if (\n typeof this.accountGroupId === 'undefined' &&\n typeof this.email === 'undefined' &&\n typeof this.partnerId === 'undefined' &&\n typeof this.marketId === 'undefined' &&\n typeof this.locale === 'undefined'\n ) {\n return {};\n }\n\n const toReturn: {\n [key: string]: any;\n } = {};\n\n if (typeof this.accountGroupId !== 'undefined') {\n toReturn.accountGroupId = this.accountGroupId;\n }\n if (typeof this.email !== 'undefined') {\n toReturn.email = this.email;\n }\n if (typeof this.partnerId !== 'undefined') {\n toReturn.partnerId = this.partnerId;\n }\n if (typeof this.marketId !== 'undefined') {\n toReturn.marketId = this.marketId;\n }\n if (typeof this.locale !== 'undefined') {\n toReturn.locale = this.locale;\n }\n return toReturn;\n }\n}\n\nexport class SaveSetting implements SaveSettingInterface {\n section: string;\n setting: string;\n valueFlag: boolean;\n\n constructor(kwargs?: SaveSettingInterface) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n\n toApiJson(): object {\n if (\n typeof this.section === 'undefined' &&\n typeof this.setting === 'undefined' &&\n typeof this.valueFlag === 'undefined'\n ) {\n return {};\n }\n\n const toReturn: {\n [key: string]: any;\n } = {};\n\n if (typeof this.section !== 'undefined') {\n toReturn.section = this.section;\n }\n if (typeof this.setting !== 'undefined') {\n toReturn.setting = this.setting;\n }\n if (typeof this.valueFlag !== 'undefined') {\n toReturn.valueFlag = this.valueFlag;\n }\n return toReturn;\n }\n}\n\nexport class SaveSectionsRequest implements SaveSectionsRequestInterface {\n accountGroupId: string;\n partnerId: string;\n section: string[];\n setting: string[];\n valueFlag: boolean[];\n\n constructor(kwargs?: SaveSectionsRequestInterface) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n\n toApiJson(): object {\n if (\n typeof this.accountGroupId === 'undefined' &&\n typeof this.partnerId === 'undefined' &&\n typeof this.section === 'undefined' &&\n typeof this.setting === 'undefined' &&\n typeof this.valueFlag === 'undefined'\n ) {\n return {};\n }\n\n const toReturn: {\n [key: string]: any;\n } = {};\n\n if (typeof this.accountGroupId !== 'undefined') {\n toReturn.accountGroupId = this.accountGroupId;\n }\n if (typeof this.partnerId !== 'undefined') {\n toReturn.partnerId = this.partnerId;\n }\n if (typeof this.section !== 'undefined') {\n toReturn.section = this.section;\n }\n if (typeof this.setting !== 'undefined') {\n toReturn.setting = this.setting;\n }\n if (typeof this.valueFlag !== 'undefined') {\n toReturn.valueFlag = this.valueFlag;\n }\n return toReturn;\n }\n}\n\nexport class GetByAccountGroupIdRequest implements GetByAccountGroupIdRequestInterface {\n accountGroupId: string;\n partnerId: string;\n\n constructor(kwargs?: GetByAccountGroupIdRequestInterface) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n\n toApiJson(): object {\n if (typeof this.accountGroupId === 'undefined' && typeof this.partnerId === 'undefined') {\n return {};\n }\n\n const toReturn: {\n [key: string]: any;\n } = {};\n\n if (typeof this.accountGroupId !== 'undefined') {\n toReturn.accountGroupId = this.accountGroupId;\n }\n if (typeof this.partnerId !== 'undefined') {\n toReturn.partnerId = this.partnerId;\n }\n return toReturn;\n }\n}\n\nexport class GetByAccountGroupIdSetting implements GetByAccountGroupIdSettingInterface {\n subjectId: string;\n unifiedUserId: string;\n notificationsEnabled: boolean;\n\n constructor(kwargs?: GetByAccountGroupIdSettingInterface) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n\n static fromProto(proto: any): GetByAccountGroupIdSetting {\n const m = new GetByAccountGroupIdSetting();\n if (proto.subject_id) {\n m.subjectId = proto.subject_id;\n }\n if (proto.unified_user_id) {\n m.unifiedUserId = proto.unified_user_id;\n }\n m.notificationsEnabled = proto.notifications_enabled || false;\n return m;\n }\n}\n\nexport class GetByAccountGroupIdResponse implements GetByAccountGroupIdResponseInterface {\n data: GetByAccountGroupIdSetting[];\n\n constructor(kwargs?: GetByAccountGroupIdResponseInterface) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n\n static fromProto(proto: any): GetByAccountGroupIdResponse {\n let m = new GetByAccountGroupIdResponse();\n m = Object.assign(m, proto);\n if (proto.data) {\n m.data = proto.data.map(GetByAccountGroupIdSetting.fromProto);\n }\n return m;\n }\n}\n","import { HttpClient, HttpResponse } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { map, share } from 'rxjs/operators';\nimport { HostService } from '../host.service';\nimport {\n GetByAccountGroupIdRequestInterface,\n GetByAccountGroupIdResponseInterface,\n GetSectionsRequestInterface,\n GetSectionsResponseInterface,\n SaveSectionsRequestInterface,\n} from './interfaces/notifications.interface';\nimport {\n GetByAccountGroupIdRequest,\n GetByAccountGroupIdResponse,\n GetSectionsRequest,\n GetSectionsResponse,\n SaveSectionsRequest,\n} from './objects/notifications';\n\n@Injectable({ providedIn: 'root' })\nexport class NotificationsApiService {\n constructor(private http: HttpClient, private hostService: HostService) {}\n\n getSections(r: GetSectionsRequest | GetSectionsRequestInterface): Observable {\n const request = (r as GetSectionsRequest).toApiJson ? (r as GetSectionsRequest) : new GetSectionsRequest(r);\n const url = new URL(this.hostService.httpsHost() + '/nsInternalApi/v3/notificationSettings/getSections/');\n const apiJson = request.toApiJson();\n for (const key in apiJson) {\n if (key in apiJson) {\n url.searchParams.append(key, apiJson[key]);\n }\n }\n return this.http.get(url.href, this.apiOptions()).pipe(\n map((resp) => GetSectionsResponse.fromProto(resp)),\n share(),\n );\n }\n\n saveSections(r: SaveSectionsRequest | SaveSectionsRequestInterface): Observable> {\n const request = (r as SaveSectionsRequest).toApiJson ? (r as SaveSectionsRequest) : new SaveSectionsRequest(r);\n return this.http\n .post(\n new URL(this.hostService.httpsHost() + '/nsInternalApi/v3/notificationSettings/sectionSetting/updateMulti/')\n .href,\n request.toApiJson(),\n this.apiOptions(),\n )\n .pipe(\n map(() => null),\n share(),\n );\n }\n\n getSettingsByAccountGroupId(\n r: GetByAccountGroupIdRequest | GetByAccountGroupIdRequestInterface,\n ): Observable {\n const request = (r as GetByAccountGroupIdRequest).toApiJson\n ? (r as GetByAccountGroupIdRequest)\n : new GetByAccountGroupIdRequest(r);\n const url = new URL(this.hostService.httpsHost() + '/nsInternalApi/v3/notificationSettings/getByAccountGroupId/');\n const apiJson = request.toApiJson();\n for (const key in apiJson) {\n if (key in apiJson) {\n url.searchParams.append(key, apiJson[key]);\n }\n }\n return this.http.get(url.href, this.apiOptions()).pipe(\n map((resp) => GetByAccountGroupIdResponse.fromProto(resp)),\n share(),\n );\n }\n\n private apiOptions(): { withCredentials: boolean } {\n return {\n withCredentials: true,\n };\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport { NotificationsApiService } from './_internal/notifications.api.service';\nimport { GetByAccountGroupIdResponse, GetSectionsResponse, SaveSetting } from './_internal/objects/notifications';\n\n@Injectable({ providedIn: 'root' })\nexport class NotificationsService {\n constructor(private apiService: NotificationsApiService) {}\n\n sections$(accountGroupId: string, email: string, partnerId: string, locale: string): Observable {\n return this.apiService.getSections({\n accountGroupId: accountGroupId,\n email: email,\n partnerId: partnerId,\n locale: locale,\n });\n }\n\n saveSections$(accountGroupId: string, partnerId: string, s: SaveSetting[]): Observable {\n const sections: string[] = new Array(s.length);\n const settings: string[] = new Array(s.length);\n const valueFlags: boolean[] = new Array(s.length);\n\n for (let i = 0; i < s.length; i++) {\n const setting = s[i];\n sections[i] = setting.section;\n settings[i] = setting.setting;\n valueFlags[i] = setting.valueFlag;\n }\n\n return this.apiService\n .saveSections({\n accountGroupId: accountGroupId,\n partnerId: partnerId,\n section: sections,\n setting: settings,\n valueFlag: valueFlags,\n })\n .pipe(map(() => true));\n }\n\n getByAccountGroupId$(partnerId: string, accountGroupId: string): Observable {\n return this.apiService.getSettingsByAccountGroupId({\n partnerId,\n accountGroupId,\n });\n }\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject, combineLatest, Observable, of } from 'rxjs';\nimport { catchError, map, shareReplay, switchMap, tap } from 'rxjs/operators';\nimport { AtlasConfigService, AtlasDataService, AtlasLanguageService, Language } from '../../core/src';\nimport { NotificationsService } from './vbc_sdk/notifications.service';\nimport { GetSectionsResponse, SectionContainer } from './vbc_sdk/_internal/objects/notifications';\n\n@Injectable({ providedIn: 'root' })\nexport class AtlasAccountNotificationService {\n public notificationSections$: Observable;\n public notificationSectionsErrors$: Observable;\n\n constructor(\n private dataService: AtlasDataService,\n private config: AtlasConfigService,\n private languageService: AtlasLanguageService,\n private notificationsService: NotificationsService,\n ) {\n const errors$$ = new BehaviorSubject(null);\n this.notificationSectionsErrors$ = errors$$;\n this.notificationSections$ = combineLatest([\n this.dataService.email$,\n this.config.partnerId$,\n this.config.accountId$,\n this.languageService.language$,\n ]).pipe(\n switchMap(([email, partnerId, accountGroupId, language]: [string, string, string, Language]) => {\n return this.notificationsService.sections$(accountGroupId, email, partnerId, language).pipe(\n // Clear any errors if we succeed\n tap(() => errors$$.next(null)),\n map((resp: GetSectionsResponse) => resp.data),\n catchError((err: any) => {\n errors$$.next(err);\n return of(null);\n }),\n );\n }),\n shareReplay({ bufferSize: 1, refCount: true }),\n );\n }\n}\n","import * as i0 from '@angular/core';\nimport { Injectable } from '@angular/core';\nimport { map } from 'rxjs/operators';\nimport * as i1 from '@angular/common/http';\nimport { HttpHeaders } from '@angular/common/http';\nfunction enumStringToValue$5(enumRef, value) {\n if (typeof value === 'number') {\n return value;\n }\n return enumRef[value];\n}\nclass Access {\n static fromProto(proto) {\n let m = new Access();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.scope !== 'undefined') {\n toReturn['scope'] = this.scope;\n }\n if (typeof this.public !== 'undefined') {\n toReturn['public'] = this.public;\n }\n return toReturn;\n }\n}\n\n// *********************************\n// Code generated by sdkgen\n// DO NOT EDIT!.\n//\n// Enums.\n// *********************************\nvar ContentType = /*#__PURE__*/function (ContentType) {\n ContentType[ContentType[\"CONTENT_TYPE_HTML\"] = 0] = \"CONTENT_TYPE_HTML\";\n ContentType[ContentType[\"CONTENT_TYPE_TEXT\"] = 1] = \"CONTENT_TYPE_TEXT\";\n return ContentType;\n}(ContentType || {});\nvar NotificationMedium = /*#__PURE__*/function (NotificationMedium) {\n NotificationMedium[NotificationMedium[\"NOTIFICATION_MEDIUM_WEB\"] = 0] = \"NOTIFICATION_MEDIUM_WEB\";\n NotificationMedium[NotificationMedium[\"NOTIFICATION_MEDIUM_EMAIL\"] = 1] = \"NOTIFICATION_MEDIUM_EMAIL\";\n return NotificationMedium;\n}(NotificationMedium || {});\nvar PersonaType = /*#__PURE__*/function (PersonaType) {\n PersonaType[PersonaType[\"PERSONA_TYPE_PARTNER\"] = 0] = \"PERSONA_TYPE_PARTNER\";\n PersonaType[PersonaType[\"PERSONA_TYPE_SALES_PERSON\"] = 1] = \"PERSONA_TYPE_SALES_PERSON\";\n PersonaType[PersonaType[\"PERSONA_TYPE_DIGITAL_AGENT\"] = 2] = \"PERSONA_TYPE_DIGITAL_AGENT\";\n PersonaType[PersonaType[\"PERSONA_TYPE_SMB\"] = 3] = \"PERSONA_TYPE_SMB\";\n return PersonaType;\n}(PersonaType || {});\n// *********************************\n// Code generated by sdkgen\n// DO NOT EDIT!.\n//\n// Enums.\n// *********************************\nvar NotificationStatus$1 = /*#__PURE__*/function (NotificationStatus) {\n NotificationStatus[NotificationStatus[\"NOTIFICATION_STATUS_ENABLED\"] = 0] = \"NOTIFICATION_STATUS_ENABLED\";\n NotificationStatus[NotificationStatus[\"NOTIFICATION_STATUS_DISABLED\"] = 1] = \"NOTIFICATION_STATUS_DISABLED\";\n return NotificationStatus;\n}(NotificationStatus$1 || {});\n// *********************************\n// Code generated by sdkgen\n// DO NOT EDIT!.\n//\n// Enums.\n// *********************************\nvar Status = /*#__PURE__*/function (Status) {\n Status[Status[\"STATUS_UNSET\"] = 0] = \"STATUS_UNSET\";\n Status[Status[\"STATUS_DEFAULT\"] = 1] = \"STATUS_DEFAULT\";\n Status[Status[\"STATUS_ENABLED\"] = 2] = \"STATUS_ENABLED\";\n Status[Status[\"STATUS_DISABLED\"] = 3] = \"STATUS_DISABLED\";\n return Status;\n}(Status || {});\n// *********************************\n// Code generated by sdkgen\n// DO NOT EDIT!.\n//\n// Enums Index.\n// *********************************\n\nfunction enumStringToValue$4(enumRef, value) {\n if (typeof value === 'number') {\n return value;\n }\n return enumRef[value];\n}\nclass AccessRequirement {\n static fromProto(proto) {\n let m = new AccessRequirement();\n m = Object.assign(m, proto);\n if (proto.resource) {\n m.resource = Resource.fromProto(proto.resource);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.resource !== 'undefined' && this.resource !== null) {\n toReturn['resource'] = 'toApiJson' in this.resource ? this.resource.toApiJson() : this.resource;\n }\n if (typeof this.scopeIds !== 'undefined') {\n toReturn['scopeIds'] = this.scopeIds;\n }\n return toReturn;\n }\n}\nclass MediumConfigurationBundleConfiguration {\n static fromProto(proto) {\n let m = new MediumConfigurationBundleConfiguration();\n m = Object.assign(m, proto);\n if (proto.contentTemplate) {\n m.contentTemplate = Template.fromProto(proto.contentTemplate);\n }\n if (proto.linkTemplate) {\n m.linkTemplate = Template.fromProto(proto.linkTemplate);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.window !== 'undefined') {\n toReturn['window'] = this.window;\n }\n if (typeof this.contentTemplate !== 'undefined' && this.contentTemplate !== null) {\n toReturn['contentTemplate'] = 'toApiJson' in this.contentTemplate ? this.contentTemplate.toApiJson() : this.contentTemplate;\n }\n if (typeof this.linkTemplate !== 'undefined' && this.linkTemplate !== null) {\n toReturn['linkTemplate'] = 'toApiJson' in this.linkTemplate ? this.linkTemplate.toApiJson() : this.linkTemplate;\n }\n return toReturn;\n }\n}\nclass NotificationTypeEmail {\n static fromProto(proto) {\n let m = new NotificationTypeEmail();\n m = Object.assign(m, proto);\n if (proto.contentTemplate) {\n m.contentTemplate = Template.fromProto(proto.contentTemplate);\n }\n if (proto.linkTemplate) {\n m.linkTemplate = Template.fromProto(proto.linkTemplate);\n }\n if (proto.subjectTemplate) {\n m.subjectTemplate = Template.fromProto(proto.subjectTemplate);\n }\n if (proto.from) {\n m.from = NotificationTypeEmailParticipantTemplate.fromProto(proto.from);\n }\n if (proto.contentType) {\n m.contentType = enumStringToValue$4(ContentType, proto.contentType);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.enabled !== 'undefined') {\n toReturn['enabled'] = this.enabled;\n }\n if (typeof this.contentTemplate !== 'undefined' && this.contentTemplate !== null) {\n toReturn['contentTemplate'] = 'toApiJson' in this.contentTemplate ? this.contentTemplate.toApiJson() : this.contentTemplate;\n }\n if (typeof this.linkTemplate !== 'undefined' && this.linkTemplate !== null) {\n toReturn['linkTemplate'] = 'toApiJson' in this.linkTemplate ? this.linkTemplate.toApiJson() : this.linkTemplate;\n }\n if (typeof this.subjectTemplate !== 'undefined' && this.subjectTemplate !== null) {\n toReturn['subjectTemplate'] = 'toApiJson' in this.subjectTemplate ? this.subjectTemplate.toApiJson() : this.subjectTemplate;\n }\n if (typeof this.from !== 'undefined' && this.from !== null) {\n toReturn['from'] = 'toApiJson' in this.from ? this.from.toApiJson() : this.from;\n }\n if (typeof this.contentType !== 'undefined') {\n toReturn['contentType'] = this.contentType;\n }\n if (typeof this.espId !== 'undefined') {\n toReturn['espId'] = this.espId;\n }\n if (typeof this.sampleData !== 'undefined') {\n toReturn['sampleData'] = this.sampleData;\n }\n return toReturn;\n }\n}\nclass MediumConfigurationEmailConfiguration {\n static fromProto(proto) {\n let m = new MediumConfigurationEmailConfiguration();\n m = Object.assign(m, proto);\n if (proto.contentTemplate) {\n m.contentTemplate = Template.fromProto(proto.contentTemplate);\n }\n if (proto.linkTemplate) {\n m.linkTemplate = Template.fromProto(proto.linkTemplate);\n }\n if (proto.subjectTemplate) {\n m.subjectTemplate = Template.fromProto(proto.subjectTemplate);\n }\n if (proto.from) {\n m.from = MediumConfigurationEmailConfigurationParticipantTemplate.fromProto(proto.from);\n }\n if (proto.contentType) {\n m.contentType = enumStringToValue$4(ContentType, proto.contentType);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.contentTemplate !== 'undefined' && this.contentTemplate !== null) {\n toReturn['contentTemplate'] = 'toApiJson' in this.contentTemplate ? this.contentTemplate.toApiJson() : this.contentTemplate;\n }\n if (typeof this.linkTemplate !== 'undefined' && this.linkTemplate !== null) {\n toReturn['linkTemplate'] = 'toApiJson' in this.linkTemplate ? this.linkTemplate.toApiJson() : this.linkTemplate;\n }\n if (typeof this.subjectTemplate !== 'undefined' && this.subjectTemplate !== null) {\n toReturn['subjectTemplate'] = 'toApiJson' in this.subjectTemplate ? this.subjectTemplate.toApiJson() : this.subjectTemplate;\n }\n if (typeof this.from !== 'undefined' && this.from !== null) {\n toReturn['from'] = 'toApiJson' in this.from ? this.from.toApiJson() : this.from;\n }\n if (typeof this.contentType !== 'undefined') {\n toReturn['contentType'] = this.contentType;\n }\n if (typeof this.espId !== 'undefined') {\n toReturn['espId'] = this.espId;\n }\n if (typeof this.sampleData !== 'undefined') {\n toReturn['sampleData'] = this.sampleData;\n }\n return toReturn;\n }\n}\nclass Hydrator {\n static fromProto(proto) {\n let m = new Hydrator();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.accountGroup !== 'undefined') {\n toReturn['accountGroup'] = this.accountGroup;\n }\n if (typeof this.salesperson !== 'undefined') {\n toReturn['salesperson'] = this.salesperson;\n }\n if (typeof this.product !== 'undefined') {\n toReturn['product'] = this.product;\n }\n if (typeof this.partnerBranding !== 'undefined') {\n toReturn['partnerBranding'] = this.partnerBranding;\n }\n if (typeof this.digitalAgent !== 'undefined') {\n toReturn['digitalAgent'] = this.digitalAgent;\n }\n if (typeof this.user !== 'undefined') {\n toReturn['user'] = this.user;\n }\n return toReturn;\n }\n}\nclass TemplateInlineTemplate {\n static fromProto(proto) {\n let m = new TemplateInlineTemplate();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.content !== 'undefined') {\n toReturn['content'] = this.content;\n }\n return toReturn;\n }\n}\nclass MediumConfiguration {\n static fromProto(proto) {\n let m = new MediumConfiguration();\n m = Object.assign(m, proto);\n if (proto.medium) {\n m.medium = enumStringToValue$4(NotificationMedium, proto.medium);\n }\n if (proto.bundleConfiguration) {\n m.bundleConfiguration = MediumConfigurationBundleConfiguration.fromProto(proto.bundleConfiguration);\n }\n if (proto.emailConfiguration) {\n m.emailConfiguration = MediumConfigurationEmailConfiguration.fromProto(proto.emailConfiguration);\n }\n if (proto.webConfiguration) {\n m.webConfiguration = MediumConfigurationWebConfiguration.fromProto(proto.webConfiguration);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.medium !== 'undefined') {\n toReturn['medium'] = this.medium;\n }\n if (typeof this.templateId !== 'undefined') {\n toReturn['templateId'] = this.templateId;\n }\n if (typeof this.linkTemplateId !== 'undefined') {\n toReturn['linkTemplateId'] = this.linkTemplateId;\n }\n if (typeof this.disabled !== 'undefined') {\n toReturn['disabled'] = this.disabled;\n }\n if (typeof this.bundleConfiguration !== 'undefined' && this.bundleConfiguration !== null) {\n toReturn['bundleConfiguration'] = 'toApiJson' in this.bundleConfiguration ? this.bundleConfiguration.toApiJson() : this.bundleConfiguration;\n }\n if (typeof this.emailConfiguration !== 'undefined' && this.emailConfiguration !== null) {\n toReturn['emailConfiguration'] = 'toApiJson' in this.emailConfiguration ? this.emailConfiguration.toApiJson() : this.emailConfiguration;\n }\n if (typeof this.webConfiguration !== 'undefined' && this.webConfiguration !== null) {\n toReturn['webConfiguration'] = 'toApiJson' in this.webConfiguration ? this.webConfiguration.toApiJson() : this.webConfiguration;\n }\n return toReturn;\n }\n}\nclass NotificationType {\n static fromProto(proto) {\n let m = new NotificationType();\n m = Object.assign(m, proto);\n if (proto.configurations) {\n m.configurations = proto.configurations.map(MediumConfiguration.fromProto);\n }\n if (proto.hydrators) {\n m.hydrators = proto.hydrators.map(Hydrator.fromProto);\n }\n if (proto.accessRequirements) {\n m.accessRequirements = proto.accessRequirements.map(AccessRequirement.fromProto);\n }\n if (proto.web) {\n m.web = NotificationTypeWeb.fromProto(proto.web);\n }\n if (proto.webBundle) {\n m.webBundle = NotificationTypeWebBundle.fromProto(proto.webBundle);\n }\n if (proto.email) {\n m.email = NotificationTypeEmail.fromProto(proto.email);\n }\n if (proto.personaAccessRequirements) {\n m.personaAccessRequirements = proto.personaAccessRequirements.map(v => enumStringToValue$4(PersonaType, v));\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.notificationTypeId !== 'undefined') {\n toReturn['notificationTypeId'] = this.notificationTypeId;\n }\n if (typeof this.category !== 'undefined') {\n toReturn['category'] = this.category;\n }\n if (typeof this.description !== 'undefined') {\n toReturn['description'] = this.description;\n }\n if (typeof this.name !== 'undefined') {\n toReturn['name'] = this.name;\n }\n if (typeof this.eventTypeId !== 'undefined') {\n toReturn['eventTypeId'] = this.eventTypeId;\n }\n if (typeof this.configurations !== 'undefined' && this.configurations !== null) {\n toReturn['configurations'] = 'toApiJson' in this.configurations ? this.configurations.toApiJson() : this.configurations;\n }\n if (typeof this.domainId !== 'undefined') {\n toReturn['domainId'] = this.domainId;\n }\n if (typeof this.hydrators !== 'undefined' && this.hydrators !== null) {\n toReturn['hydrators'] = 'toApiJson' in this.hydrators ? this.hydrators.toApiJson() : this.hydrators;\n }\n if (typeof this.accessRequirements !== 'undefined' && this.accessRequirements !== null) {\n toReturn['accessRequirements'] = 'toApiJson' in this.accessRequirements ? this.accessRequirements.toApiJson() : this.accessRequirements;\n }\n if (typeof this.web !== 'undefined' && this.web !== null) {\n toReturn['web'] = 'toApiJson' in this.web ? this.web.toApiJson() : this.web;\n }\n if (typeof this.webBundle !== 'undefined' && this.webBundle !== null) {\n toReturn['webBundle'] = 'toApiJson' in this.webBundle ? this.webBundle.toApiJson() : this.webBundle;\n }\n if (typeof this.email !== 'undefined' && this.email !== null) {\n toReturn['email'] = 'toApiJson' in this.email ? this.email.toApiJson() : this.email;\n }\n if (typeof this.personaAccessRequirements !== 'undefined') {\n toReturn['personaAccessRequirements'] = this.personaAccessRequirements;\n }\n if (typeof this.featureFlagId !== 'undefined') {\n toReturn['featureFlagId'] = this.featureFlagId;\n }\n if (typeof this.locales !== 'undefined') {\n toReturn['locales'] = this.locales;\n }\n return toReturn;\n }\n}\nclass MediumConfigurationEmailConfigurationParticipantTemplate {\n static fromProto(proto) {\n let m = new MediumConfigurationEmailConfigurationParticipantTemplate();\n m = Object.assign(m, proto);\n if (proto.nameTemplate) {\n m.nameTemplate = Template.fromProto(proto.nameTemplate);\n }\n if (proto.addressTemplate) {\n m.addressTemplate = Template.fromProto(proto.addressTemplate);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.nameTemplate !== 'undefined' && this.nameTemplate !== null) {\n toReturn['nameTemplate'] = 'toApiJson' in this.nameTemplate ? this.nameTemplate.toApiJson() : this.nameTemplate;\n }\n if (typeof this.addressTemplate !== 'undefined' && this.addressTemplate !== null) {\n toReturn['addressTemplate'] = 'toApiJson' in this.addressTemplate ? this.addressTemplate.toApiJson() : this.addressTemplate;\n }\n return toReturn;\n }\n}\nclass NotificationTypeEmailParticipantTemplate {\n static fromProto(proto) {\n let m = new NotificationTypeEmailParticipantTemplate();\n m = Object.assign(m, proto);\n if (proto.nameTemplate) {\n m.nameTemplate = Template.fromProto(proto.nameTemplate);\n }\n if (proto.addressTemplate) {\n m.addressTemplate = Template.fromProto(proto.addressTemplate);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.nameTemplate !== 'undefined' && this.nameTemplate !== null) {\n toReturn['nameTemplate'] = 'toApiJson' in this.nameTemplate ? this.nameTemplate.toApiJson() : this.nameTemplate;\n }\n if (typeof this.addressTemplate !== 'undefined' && this.addressTemplate !== null) {\n toReturn['addressTemplate'] = 'toApiJson' in this.addressTemplate ? this.addressTemplate.toApiJson() : this.addressTemplate;\n }\n return toReturn;\n }\n}\nclass Resource {\n static fromProto(proto) {\n let m = new Resource();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.id !== 'undefined') {\n toReturn['id'] = this.id;\n }\n return toReturn;\n }\n}\nclass Template {\n static fromProto(proto) {\n let m = new Template();\n m = Object.assign(m, proto);\n if (proto.inline) {\n m.inline = TemplateInlineTemplate.fromProto(proto.inline);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.id !== 'undefined') {\n toReturn['id'] = this.id;\n }\n if (typeof this.inline !== 'undefined' && this.inline !== null) {\n toReturn['inline'] = 'toApiJson' in this.inline ? this.inline.toApiJson() : this.inline;\n }\n return toReturn;\n }\n}\nclass NotificationTypeWeb {\n static fromProto(proto) {\n let m = new NotificationTypeWeb();\n m = Object.assign(m, proto);\n if (proto.contentTemplate) {\n m.contentTemplate = Template.fromProto(proto.contentTemplate);\n }\n if (proto.linkTemplate) {\n m.linkTemplate = Template.fromProto(proto.linkTemplate);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.enabled !== 'undefined') {\n toReturn['enabled'] = this.enabled;\n }\n if (typeof this.contentTemplate !== 'undefined' && this.contentTemplate !== null) {\n toReturn['contentTemplate'] = 'toApiJson' in this.contentTemplate ? this.contentTemplate.toApiJson() : this.contentTemplate;\n }\n if (typeof this.linkTemplate !== 'undefined' && this.linkTemplate !== null) {\n toReturn['linkTemplate'] = 'toApiJson' in this.linkTemplate ? this.linkTemplate.toApiJson() : this.linkTemplate;\n }\n if (typeof this.sampleData !== 'undefined') {\n toReturn['sampleData'] = this.sampleData;\n }\n return toReturn;\n }\n}\nclass NotificationTypeWebBundle {\n static fromProto(proto) {\n let m = new NotificationTypeWebBundle();\n m = Object.assign(m, proto);\n if (proto.contentTemplate) {\n m.contentTemplate = Template.fromProto(proto.contentTemplate);\n }\n if (proto.linkTemplate) {\n m.linkTemplate = Template.fromProto(proto.linkTemplate);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.enabled !== 'undefined') {\n toReturn['enabled'] = this.enabled;\n }\n if (typeof this.window !== 'undefined') {\n toReturn['window'] = this.window;\n }\n if (typeof this.contentTemplate !== 'undefined' && this.contentTemplate !== null) {\n toReturn['contentTemplate'] = 'toApiJson' in this.contentTemplate ? this.contentTemplate.toApiJson() : this.contentTemplate;\n }\n if (typeof this.linkTemplate !== 'undefined' && this.linkTemplate !== null) {\n toReturn['linkTemplate'] = 'toApiJson' in this.linkTemplate ? this.linkTemplate.toApiJson() : this.linkTemplate;\n }\n if (typeof this.sampleData !== 'undefined') {\n toReturn['sampleData'] = this.sampleData;\n }\n return toReturn;\n }\n}\nclass MediumConfigurationWebConfiguration {\n static fromProto(proto) {\n let m = new MediumConfigurationWebConfiguration();\n m = Object.assign(m, proto);\n if (proto.contentTemplate) {\n m.contentTemplate = Template.fromProto(proto.contentTemplate);\n }\n if (proto.linkTemplate) {\n m.linkTemplate = Template.fromProto(proto.linkTemplate);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.contentTemplate !== 'undefined' && this.contentTemplate !== null) {\n toReturn['contentTemplate'] = 'toApiJson' in this.contentTemplate ? this.contentTemplate.toApiJson() : this.contentTemplate;\n }\n if (typeof this.linkTemplate !== 'undefined' && this.linkTemplate !== null) {\n toReturn['linkTemplate'] = 'toApiJson' in this.linkTemplate ? this.linkTemplate.toApiJson() : this.linkTemplate;\n }\n if (typeof this.sampleData !== 'undefined') {\n toReturn['sampleData'] = this.sampleData;\n }\n return toReturn;\n }\n}\nfunction enumStringToValue$3(enumRef, value) {\n if (typeof value === 'number') {\n return value;\n }\n return enumRef[value];\n}\nclass NotificationContextAccountGroup {\n static fromProto(proto) {\n let m = new NotificationContextAccountGroup();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.accountGroupId !== 'undefined') {\n toReturn['accountGroupId'] = this.accountGroupId;\n }\n return toReturn;\n }\n}\nclass ListNotificationsRequestFilter {\n static fromProto(proto) {\n let m = new ListNotificationsRequestFilter();\n m = Object.assign(m, proto);\n if (proto.medium) {\n m.medium = enumStringToValue$3(NotificationMedium, proto.medium);\n }\n if (proto.context) {\n m.context = NotificationContext.fromProto(proto.context);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.medium !== 'undefined') {\n toReturn['medium'] = this.medium;\n }\n if (typeof this.context !== 'undefined' && this.context !== null) {\n toReturn['context'] = 'toApiJson' in this.context ? this.context.toApiJson() : this.context;\n }\n return toReturn;\n }\n}\nclass GetNotificationSettingsRequest {\n static fromProto(proto) {\n let m = new GetNotificationSettingsRequest();\n m = Object.assign(m, proto);\n if (proto.context) {\n m.context = NotificationContext.fromProto(proto.context);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.context !== 'undefined' && this.context !== null) {\n toReturn['context'] = 'toApiJson' in this.context ? this.context.toApiJson() : this.context;\n }\n if (typeof this.userId !== 'undefined') {\n toReturn['userId'] = this.userId;\n }\n if (typeof this.partnerId !== 'undefined') {\n toReturn['partnerId'] = this.partnerId;\n }\n return toReturn;\n }\n}\nclass GetNotificationSettingsResponse {\n static fromProto(proto) {\n let m = new GetNotificationSettingsResponse();\n m = Object.assign(m, proto);\n if (proto.notificationSettings) {\n m.notificationSettings = proto.notificationSettings.map(NotificationSetting.fromProto);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.notificationSettings !== 'undefined' && this.notificationSettings !== null) {\n toReturn['notificationSettings'] = 'toApiJson' in this.notificationSettings ? this.notificationSettings.toApiJson() : this.notificationSettings;\n }\n return toReturn;\n }\n}\nclass GetNotificationTypeSettingsRequest {\n static fromProto(proto) {\n let m = new GetNotificationTypeSettingsRequest();\n m = Object.assign(m, proto);\n if (proto.context) {\n m.context = NotificationTypeSettingContext.fromProto(proto.context);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.context !== 'undefined' && this.context !== null) {\n toReturn['context'] = 'toApiJson' in this.context ? this.context.toApiJson() : this.context;\n }\n return toReturn;\n }\n}\nclass GetNotificationTypeSettingsResponse {\n static fromProto(proto) {\n let m = new GetNotificationTypeSettingsResponse();\n m = Object.assign(m, proto);\n if (proto.settings) {\n m.settings = proto.settings.map(NotificationTypeSetting.fromProto);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.settings !== 'undefined' && this.settings !== null) {\n toReturn['settings'] = 'toApiJson' in this.settings ? this.settings.toApiJson() : this.settings;\n }\n return toReturn;\n }\n}\nclass GetOverviewRequest {\n static fromProto(proto) {\n let m = new GetOverviewRequest();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.token !== 'undefined') {\n toReturn['token'] = this.token;\n }\n return toReturn;\n }\n}\nclass GetOverviewResponse {\n static fromProto(proto) {\n let m = new GetOverviewResponse();\n m = Object.assign(m, proto);\n if (proto.type) {\n m.type = NotificationType.fromProto(proto.type);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.email !== 'undefined') {\n toReturn['email'] = this.email;\n }\n if (typeof this.type !== 'undefined' && this.type !== null) {\n toReturn['type'] = 'toApiJson' in this.type ? this.type.toApiJson() : this.type;\n }\n if (typeof this.partnerId !== 'undefined') {\n toReturn['partnerId'] = this.partnerId;\n }\n if (typeof this.marketId !== 'undefined') {\n toReturn['marketId'] = this.marketId;\n }\n return toReturn;\n }\n}\nclass ListNotificationTypesRequest {\n static fromProto(proto) {\n let m = new ListNotificationTypesRequest();\n m = Object.assign(m, proto);\n if (proto.context) {\n m.context = NotificationContext.fromProto(proto.context);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.context !== 'undefined' && this.context !== null) {\n toReturn['context'] = 'toApiJson' in this.context ? this.context.toApiJson() : this.context;\n }\n if (typeof this.partnerId !== 'undefined') {\n toReturn['partnerId'] = this.partnerId;\n }\n return toReturn;\n }\n}\nclass ListNotificationTypesResponse {\n static fromProto(proto) {\n let m = new ListNotificationTypesResponse();\n m = Object.assign(m, proto);\n if (proto.types) {\n m.types = proto.types.map(NotificationType.fromProto);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.types !== 'undefined' && this.types !== null) {\n toReturn['types'] = 'toApiJson' in this.types ? this.types.toApiJson() : this.types;\n }\n return toReturn;\n }\n}\nclass ListNotificationsRequest {\n static fromProto(proto) {\n let m = new ListNotificationsRequest();\n m = Object.assign(m, proto);\n if (proto.pageSize) {\n m.pageSize = parseInt(proto.pageSize, 10);\n }\n if (proto.filter) {\n m.filter = ListNotificationsRequestFilter.fromProto(proto.filter);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.pageSize !== 'undefined') {\n toReturn['pageSize'] = this.pageSize;\n }\n if (typeof this.cursor !== 'undefined') {\n toReturn['cursor'] = this.cursor;\n }\n if (typeof this.filter !== 'undefined' && this.filter !== null) {\n toReturn['filter'] = 'toApiJson' in this.filter ? this.filter.toApiJson() : this.filter;\n }\n if (typeof this.flatten !== 'undefined') {\n toReturn['flatten'] = this.flatten;\n }\n if (typeof this.partnerId !== 'undefined') {\n toReturn['partnerId'] = this.partnerId;\n }\n return toReturn;\n }\n}\nclass ListNotificationsResponse {\n static fromProto(proto) {\n let m = new ListNotificationsResponse();\n m = Object.assign(m, proto);\n if (proto.notifications) {\n m.notifications = proto.notifications.map(Notification.fromProto);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.notifications !== 'undefined' && this.notifications !== null) {\n toReturn['notifications'] = 'toApiJson' in this.notifications ? this.notifications.toApiJson() : this.notifications;\n }\n if (typeof this.nextCursor !== 'undefined') {\n toReturn['nextCursor'] = this.nextCursor;\n }\n if (typeof this.hasMore !== 'undefined') {\n toReturn['hasMore'] = this.hasMore;\n }\n return toReturn;\n }\n}\nclass Notification {\n static fromProto(proto) {\n let m = new Notification();\n m = Object.assign(m, proto);\n if (proto.created) {\n m.created = new Date(proto.created);\n }\n if (proto.web) {\n m.web = NotificationWebNotification.fromProto(proto.web);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.notificationId !== 'undefined') {\n toReturn['notificationId'] = this.notificationId;\n }\n if (typeof this.notificationTypeId !== 'undefined') {\n toReturn['notificationTypeId'] = this.notificationTypeId;\n }\n if (typeof this.link !== 'undefined') {\n toReturn['link'] = this.link;\n }\n if (typeof this.followed !== 'undefined') {\n toReturn['followed'] = this.followed;\n }\n if (typeof this.viewed !== 'undefined') {\n toReturn['viewed'] = this.viewed;\n }\n if (typeof this.created !== 'undefined' && this.created !== null) {\n toReturn['created'] = 'toApiJson' in this.created ? this.created.toApiJson() : this.created;\n }\n if (typeof this.web !== 'undefined' && this.web !== null) {\n toReturn['web'] = 'toApiJson' in this.web ? this.web.toApiJson() : this.web;\n }\n if (typeof this.partnerId !== 'undefined') {\n toReturn['partnerId'] = this.partnerId;\n }\n if (typeof this.marketId !== 'undefined') {\n toReturn['marketId'] = this.marketId;\n }\n if (typeof this.accountGroupId !== 'undefined') {\n toReturn['accountGroupId'] = this.accountGroupId;\n }\n return toReturn;\n }\n}\nclass NotificationContext {\n static fromProto(proto) {\n let m = new NotificationContext();\n m = Object.assign(m, proto);\n if (proto.partner) {\n m.partner = NotificationContextPartner.fromProto(proto.partner);\n }\n if (proto.accountGroup) {\n m.accountGroup = NotificationContextAccountGroup.fromProto(proto.accountGroup);\n }\n if (proto.user) {\n m.user = NotificationContextUser.fromProto(proto.user);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.partner !== 'undefined' && this.partner !== null) {\n toReturn['partner'] = 'toApiJson' in this.partner ? this.partner.toApiJson() : this.partner;\n }\n if (typeof this.accountGroup !== 'undefined' && this.accountGroup !== null) {\n toReturn['accountGroup'] = 'toApiJson' in this.accountGroup ? this.accountGroup.toApiJson() : this.accountGroup;\n }\n if (typeof this.user !== 'undefined' && this.user !== null) {\n toReturn['user'] = 'toApiJson' in this.user ? this.user.toApiJson() : this.user;\n }\n return toReturn;\n }\n}\nclass NotificationSetting {\n static fromProto(proto) {\n let m = new NotificationSetting();\n m = Object.assign(m, proto);\n if (proto.notificationMedium) {\n m.notificationMedium = enumStringToValue$3(NotificationMedium, proto.notificationMedium);\n }\n if (proto.status) {\n m.status = enumStringToValue$3(NotificationStatus$1, proto.status);\n }\n if (proto.context) {\n m.context = NotificationContext.fromProto(proto.context);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.notificationTypeId !== 'undefined') {\n toReturn['notificationTypeId'] = this.notificationTypeId;\n }\n if (typeof this.category !== 'undefined') {\n toReturn['category'] = this.category;\n }\n if (typeof this.description !== 'undefined') {\n toReturn['description'] = this.description;\n }\n if (typeof this.notificationMedium !== 'undefined') {\n toReturn['notificationMedium'] = this.notificationMedium;\n }\n if (typeof this.status !== 'undefined') {\n toReturn['status'] = this.status;\n }\n if (typeof this.context !== 'undefined' && this.context !== null) {\n toReturn['context'] = 'toApiJson' in this.context ? this.context.toApiJson() : this.context;\n }\n return toReturn;\n }\n}\nclass NotificationTypeSetting {\n static fromProto(proto) {\n let m = new NotificationTypeSetting();\n m = Object.assign(m, proto);\n if (proto.configurations) {\n m.configurations = proto.configurations.map(NotificationTypeSettingNotificationTypeSettingMediumConfiguration.fromProto);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.notificationTypeId !== 'undefined') {\n toReturn['notificationTypeId'] = this.notificationTypeId;\n }\n if (typeof this.configurations !== 'undefined' && this.configurations !== null) {\n toReturn['configurations'] = 'toApiJson' in this.configurations ? this.configurations.toApiJson() : this.configurations;\n }\n return toReturn;\n }\n}\nclass NotificationTypeSettingContext {\n static fromProto(proto) {\n let m = new NotificationTypeSettingContext();\n m = Object.assign(m, proto);\n if (proto.partner) {\n m.partner = NotificationTypeSettingContextNotificationTypeSettingContextPartner.fromProto(proto.partner);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.partner !== 'undefined' && this.partner !== null) {\n toReturn['partner'] = 'toApiJson' in this.partner ? this.partner.toApiJson() : this.partner;\n }\n return toReturn;\n }\n}\nclass NotificationTypeSettingContextNotificationTypeSettingContextPartner {\n static fromProto(proto) {\n let m = new NotificationTypeSettingContextNotificationTypeSettingContextPartner();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.partnerId !== 'undefined') {\n toReturn['partnerId'] = this.partnerId;\n }\n if (typeof this.marketId !== 'undefined') {\n toReturn['marketId'] = this.marketId;\n }\n return toReturn;\n }\n}\nclass NotificationTypeSettingNotificationTypeSettingMediumConfiguration {\n static fromProto(proto) {\n let m = new NotificationTypeSettingNotificationTypeSettingMediumConfiguration();\n m = Object.assign(m, proto);\n if (proto.medium) {\n m.medium = enumStringToValue$3(NotificationMedium, proto.medium);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.medium !== 'undefined') {\n toReturn['medium'] = this.medium;\n }\n if (typeof this.enabled !== 'undefined') {\n toReturn['enabled'] = this.enabled;\n }\n return toReturn;\n }\n}\nclass UpdateNotificationsRequestOperation {\n static fromProto(proto) {\n let m = new UpdateNotificationsRequestOperation();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.notificationId !== 'undefined') {\n toReturn['notificationId'] = this.notificationId;\n }\n if (typeof this.followed !== 'undefined') {\n toReturn['followed'] = this.followed;\n }\n if (typeof this.viewed !== 'undefined') {\n toReturn['viewed'] = this.viewed;\n }\n return toReturn;\n }\n}\nclass NotificationContextPartner {\n static fromProto(proto) {\n let m = new NotificationContextPartner();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.partnerId !== 'undefined') {\n toReturn['partnerId'] = this.partnerId;\n }\n return toReturn;\n }\n}\nclass SubscribeRequest {\n static fromProto(proto) {\n let m = new SubscribeRequest();\n m = Object.assign(m, proto);\n if (proto.context) {\n m.context = NotificationContext.fromProto(proto.context);\n }\n if (proto.notificationMedium) {\n m.notificationMedium = proto.notificationMedium.map(v => enumStringToValue$3(NotificationMedium, v));\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.notificationTypeId !== 'undefined') {\n toReturn['notificationTypeId'] = this.notificationTypeId;\n }\n if (typeof this.context !== 'undefined' && this.context !== null) {\n toReturn['context'] = 'toApiJson' in this.context ? this.context.toApiJson() : this.context;\n }\n if (typeof this.userId !== 'undefined') {\n toReturn['userId'] = this.userId;\n }\n if (typeof this.notificationMedium !== 'undefined') {\n toReturn['notificationMedium'] = this.notificationMedium;\n }\n return toReturn;\n }\n}\nclass UnsubscribeRequest {\n static fromProto(proto) {\n let m = new UnsubscribeRequest();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.token !== 'undefined') {\n toReturn['token'] = this.token;\n }\n return toReturn;\n }\n}\nclass UpdateNotificationSettingsRequestUpdateNotificationSettingsOperation {\n static fromProto(proto) {\n let m = new UpdateNotificationSettingsRequestUpdateNotificationSettingsOperation();\n m = Object.assign(m, proto);\n if (proto.notificationMedium) {\n m.notificationMedium = enumStringToValue$3(NotificationMedium, proto.notificationMedium);\n }\n if (proto.context) {\n m.context = NotificationContext.fromProto(proto.context);\n }\n if (proto.status) {\n m.status = enumStringToValue$3(NotificationStatus$1, proto.status);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.notificationTypeId !== 'undefined') {\n toReturn['notificationTypeId'] = this.notificationTypeId;\n }\n if (typeof this.notificationMedium !== 'undefined') {\n toReturn['notificationMedium'] = this.notificationMedium;\n }\n if (typeof this.context !== 'undefined' && this.context !== null) {\n toReturn['context'] = 'toApiJson' in this.context ? this.context.toApiJson() : this.context;\n }\n if (typeof this.status !== 'undefined') {\n toReturn['status'] = this.status;\n }\n if (typeof this.propagate !== 'undefined') {\n toReturn['propagate'] = this.propagate;\n }\n return toReturn;\n }\n}\nclass UpdateNotificationSettingsRequest {\n static fromProto(proto) {\n let m = new UpdateNotificationSettingsRequest();\n m = Object.assign(m, proto);\n if (proto.notificationSettings) {\n m.notificationSettings = proto.notificationSettings.map(UpdateNotificationSettingsRequestUpdateNotificationSettingsOperation.fromProto);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.notificationSettings !== 'undefined' && this.notificationSettings !== null) {\n toReturn['notificationSettings'] = 'toApiJson' in this.notificationSettings ? this.notificationSettings.toApiJson() : this.notificationSettings;\n }\n if (typeof this.userId !== 'undefined') {\n toReturn['userId'] = this.userId;\n }\n if (typeof this.partnerId !== 'undefined') {\n toReturn['partnerId'] = this.partnerId;\n }\n return toReturn;\n }\n}\nclass UpdateNotificationTypeSettingsRequestUpdateNotificationTypeSettingOperation {\n static fromProto(proto) {\n let m = new UpdateNotificationTypeSettingsRequestUpdateNotificationTypeSettingOperation();\n m = Object.assign(m, proto);\n if (proto.context) {\n m.context = NotificationTypeSettingContext.fromProto(proto.context);\n }\n if (proto.medium) {\n m.medium = enumStringToValue$3(NotificationMedium, proto.medium);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.notificationTypeId !== 'undefined') {\n toReturn['notificationTypeId'] = this.notificationTypeId;\n }\n if (typeof this.context !== 'undefined' && this.context !== null) {\n toReturn['context'] = 'toApiJson' in this.context ? this.context.toApiJson() : this.context;\n }\n if (typeof this.medium !== 'undefined') {\n toReturn['medium'] = this.medium;\n }\n if (typeof this.enabled !== 'undefined') {\n toReturn['enabled'] = this.enabled;\n }\n return toReturn;\n }\n}\nclass UpdateNotificationTypeSettingsRequest {\n static fromProto(proto) {\n let m = new UpdateNotificationTypeSettingsRequest();\n m = Object.assign(m, proto);\n if (proto.operations) {\n m.operations = proto.operations.map(UpdateNotificationTypeSettingsRequestUpdateNotificationTypeSettingOperation.fromProto);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.operations !== 'undefined' && this.operations !== null) {\n toReturn['operations'] = 'toApiJson' in this.operations ? this.operations.toApiJson() : this.operations;\n }\n return toReturn;\n }\n}\nclass UpdateNotificationsRequest {\n static fromProto(proto) {\n let m = new UpdateNotificationsRequest();\n m = Object.assign(m, proto);\n if (proto.operations) {\n m.operations = proto.operations.map(UpdateNotificationsRequestOperation.fromProto);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.operations !== 'undefined' && this.operations !== null) {\n toReturn['operations'] = 'toApiJson' in this.operations ? this.operations.toApiJson() : this.operations;\n }\n if (typeof this.partnerId !== 'undefined') {\n toReturn['partnerId'] = this.partnerId;\n }\n return toReturn;\n }\n}\nclass NotificationContextUser {\n static fromProto(proto) {\n let m = new NotificationContextUser();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.iamSubjectId !== 'undefined') {\n toReturn['iamSubjectId'] = this.iamSubjectId;\n }\n if (typeof this.userId !== 'undefined') {\n toReturn['userId'] = this.userId;\n }\n return toReturn;\n }\n}\nclass NotificationWebNotification {\n static fromProto(proto) {\n let m = new NotificationWebNotification();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.body !== 'undefined') {\n toReturn['body'] = this.body;\n }\n return toReturn;\n }\n}\nfunction enumStringToValue$2(enumRef, value) {\n if (typeof value === 'number') {\n return value;\n }\n return enumRef[value];\n}\nclass CreateTypeRequest {\n static fromProto(proto) {\n let m = new CreateTypeRequest();\n m = Object.assign(m, proto);\n if (proto.configurations) {\n m.configurations = proto.configurations.map(MediumConfiguration.fromProto);\n }\n if (proto.hydrators) {\n m.hydrators = proto.hydrators.map(Hydrator.fromProto);\n }\n if (proto.accessRequirements) {\n m.accessRequirements = proto.accessRequirements.map(AccessRequirement.fromProto);\n }\n if (proto.web) {\n m.web = NotificationTypeWeb.fromProto(proto.web);\n }\n if (proto.webBundle) {\n m.webBundle = NotificationTypeWebBundle.fromProto(proto.webBundle);\n }\n if (proto.email) {\n m.email = NotificationTypeEmail.fromProto(proto.email);\n }\n if (proto.personaAccessRequirements) {\n m.personaAccessRequirements = proto.personaAccessRequirements.map(v => enumStringToValue$2(PersonaType, v));\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.notificationTypeId !== 'undefined') {\n toReturn['notificationTypeId'] = this.notificationTypeId;\n }\n if (typeof this.category !== 'undefined') {\n toReturn['category'] = this.category;\n }\n if (typeof this.description !== 'undefined') {\n toReturn['description'] = this.description;\n }\n if (typeof this.name !== 'undefined') {\n toReturn['name'] = this.name;\n }\n if (typeof this.eventTypeId !== 'undefined') {\n toReturn['eventTypeId'] = this.eventTypeId;\n }\n if (typeof this.configurations !== 'undefined' && this.configurations !== null) {\n toReturn['configurations'] = 'toApiJson' in this.configurations ? this.configurations.toApiJson() : this.configurations;\n }\n if (typeof this.domainId !== 'undefined') {\n toReturn['domainId'] = this.domainId;\n }\n if (typeof this.hydrators !== 'undefined' && this.hydrators !== null) {\n toReturn['hydrators'] = 'toApiJson' in this.hydrators ? this.hydrators.toApiJson() : this.hydrators;\n }\n if (typeof this.accessRequirements !== 'undefined' && this.accessRequirements !== null) {\n toReturn['accessRequirements'] = 'toApiJson' in this.accessRequirements ? this.accessRequirements.toApiJson() : this.accessRequirements;\n }\n if (typeof this.web !== 'undefined' && this.web !== null) {\n toReturn['web'] = 'toApiJson' in this.web ? this.web.toApiJson() : this.web;\n }\n if (typeof this.webBundle !== 'undefined' && this.webBundle !== null) {\n toReturn['webBundle'] = 'toApiJson' in this.webBundle ? this.webBundle.toApiJson() : this.webBundle;\n }\n if (typeof this.email !== 'undefined' && this.email !== null) {\n toReturn['email'] = 'toApiJson' in this.email ? this.email.toApiJson() : this.email;\n }\n if (typeof this.personaAccessRequirements !== 'undefined') {\n toReturn['personaAccessRequirements'] = this.personaAccessRequirements;\n }\n if (typeof this.featureFlagId !== 'undefined') {\n toReturn['featureFlagId'] = this.featureFlagId;\n }\n if (typeof this.locales !== 'undefined') {\n toReturn['locales'] = this.locales;\n }\n return toReturn;\n }\n}\nclass DeleteTypeRequest {\n static fromProto(proto) {\n let m = new DeleteTypeRequest();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.notificationTypeId !== 'undefined') {\n toReturn['notificationTypeId'] = this.notificationTypeId;\n }\n return toReturn;\n }\n}\nclass UpdateTypeRequestUpdateNotificationTypeOperationEmail {\n static fromProto(proto) {\n let m = new UpdateTypeRequestUpdateNotificationTypeOperationEmail();\n m = Object.assign(m, proto);\n if (proto.contentTemplate) {\n m.contentTemplate = Template.fromProto(proto.contentTemplate);\n }\n if (proto.linkTemplate) {\n m.linkTemplate = Template.fromProto(proto.linkTemplate);\n }\n if (proto.subjectTemplate) {\n m.subjectTemplate = Template.fromProto(proto.subjectTemplate);\n }\n if (proto.from) {\n m.from = UpdateTypeRequestUpdateNotificationTypeOperationEmailParticipantTemplateOperation.fromProto(proto.from);\n }\n if (proto.contentType) {\n m.contentType = enumStringToValue$2(ContentType, proto.contentType);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.enabled !== 'undefined') {\n toReturn['enabled'] = this.enabled;\n }\n if (typeof this.contentTemplate !== 'undefined' && this.contentTemplate !== null) {\n toReturn['contentTemplate'] = 'toApiJson' in this.contentTemplate ? this.contentTemplate.toApiJson() : this.contentTemplate;\n }\n if (typeof this.linkTemplate !== 'undefined' && this.linkTemplate !== null) {\n toReturn['linkTemplate'] = 'toApiJson' in this.linkTemplate ? this.linkTemplate.toApiJson() : this.linkTemplate;\n }\n if (typeof this.subjectTemplate !== 'undefined' && this.subjectTemplate !== null) {\n toReturn['subjectTemplate'] = 'toApiJson' in this.subjectTemplate ? this.subjectTemplate.toApiJson() : this.subjectTemplate;\n }\n if (typeof this.from !== 'undefined' && this.from !== null) {\n toReturn['from'] = 'toApiJson' in this.from ? this.from.toApiJson() : this.from;\n }\n if (typeof this.contentType !== 'undefined') {\n toReturn['contentType'] = this.contentType;\n }\n if (typeof this.espId !== 'undefined') {\n toReturn['espId'] = this.espId;\n }\n if (typeof this.sampleData !== 'undefined') {\n toReturn['sampleData'] = this.sampleData;\n }\n return toReturn;\n }\n}\nclass PreviewRequestEvent {\n static fromProto(proto) {\n let m = new PreviewRequestEvent();\n m = Object.assign(m, proto);\n if (proto.emittedAt) {\n m.emittedAt = new Date(proto.emittedAt);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.eventTypeId !== 'undefined') {\n toReturn['eventTypeId'] = this.eventTypeId;\n }\n if (typeof this.emittedAt !== 'undefined' && this.emittedAt !== null) {\n toReturn['emittedAt'] = 'toApiJson' in this.emittedAt ? this.emittedAt.toApiJson() : this.emittedAt;\n }\n if (typeof this.data !== 'undefined') {\n toReturn['data'] = this.data;\n }\n return toReturn;\n }\n}\nclass GetTypeRequest {\n static fromProto(proto) {\n let m = new GetTypeRequest();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.notificationTypeId !== 'undefined') {\n toReturn['notificationTypeId'] = this.notificationTypeId;\n }\n return toReturn;\n }\n}\nclass GetTypeResponse {\n static fromProto(proto) {\n let m = new GetTypeResponse();\n m = Object.assign(m, proto);\n if (proto.type) {\n m.type = NotificationType.fromProto(proto.type);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.type !== 'undefined' && this.type !== null) {\n toReturn['type'] = 'toApiJson' in this.type ? this.type.toApiJson() : this.type;\n }\n return toReturn;\n }\n}\nclass ListTypesRequest {\n static fromProto(proto) {\n let m = new ListTypesRequest();\n m = Object.assign(m, proto);\n if (proto.pageSize) {\n m.pageSize = parseInt(proto.pageSize, 10);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.pageSize !== 'undefined') {\n toReturn['pageSize'] = this.pageSize;\n }\n if (typeof this.cursor !== 'undefined') {\n toReturn['cursor'] = this.cursor;\n }\n return toReturn;\n }\n}\nclass ListTypesResponse {\n static fromProto(proto) {\n let m = new ListTypesResponse();\n m = Object.assign(m, proto);\n if (proto.types) {\n m.types = proto.types.map(NotificationType.fromProto);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.types !== 'undefined' && this.types !== null) {\n toReturn['types'] = 'toApiJson' in this.types ? this.types.toApiJson() : this.types;\n }\n if (typeof this.hasMore !== 'undefined') {\n toReturn['hasMore'] = this.hasMore;\n }\n if (typeof this.nextCursor !== 'undefined') {\n toReturn['nextCursor'] = this.nextCursor;\n }\n return toReturn;\n }\n}\nclass UpdateTypeRequestUpdateNotificationTypeOperationMediumConfigurationOperation {\n static fromProto(proto) {\n let m = new UpdateTypeRequestUpdateNotificationTypeOperationMediumConfigurationOperation();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n return toReturn;\n }\n}\nclass UpdateTypeRequestUpdateNotificationTypeOperationEmailParticipantTemplateOperation {\n static fromProto(proto) {\n let m = new UpdateTypeRequestUpdateNotificationTypeOperationEmailParticipantTemplateOperation();\n m = Object.assign(m, proto);\n if (proto.nameTemplate) {\n m.nameTemplate = Template.fromProto(proto.nameTemplate);\n }\n if (proto.addressTemplate) {\n m.addressTemplate = Template.fromProto(proto.addressTemplate);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.nameTemplate !== 'undefined' && this.nameTemplate !== null) {\n toReturn['nameTemplate'] = 'toApiJson' in this.nameTemplate ? this.nameTemplate.toApiJson() : this.nameTemplate;\n }\n if (typeof this.addressTemplate !== 'undefined' && this.addressTemplate !== null) {\n toReturn['addressTemplate'] = 'toApiJson' in this.addressTemplate ? this.addressTemplate.toApiJson() : this.addressTemplate;\n }\n return toReturn;\n }\n}\nclass PreviewRequest {\n static fromProto(proto) {\n let m = new PreviewRequest();\n m = Object.assign(m, proto);\n if (proto.medium) {\n m.medium = enumStringToValue$2(NotificationMedium, proto.medium);\n }\n if (proto.event) {\n m.event = PreviewRequestEvent.fromProto(proto.event);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.notificationTypeId !== 'undefined') {\n toReturn['notificationTypeId'] = this.notificationTypeId;\n }\n if (typeof this.medium !== 'undefined') {\n toReturn['medium'] = this.medium;\n }\n if (typeof this.event !== 'undefined' && this.event !== null) {\n toReturn['event'] = 'toApiJson' in this.event ? this.event.toApiJson() : this.event;\n }\n return toReturn;\n }\n}\nclass ReleaseRequest {\n static fromProto(proto) {\n let m = new ReleaseRequest();\n m = Object.assign(m, proto);\n if (proto.medium) {\n m.medium = enumStringToValue$2(NotificationMedium, proto.medium);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.notificationTypeId !== 'undefined') {\n toReturn['notificationTypeId'] = this.notificationTypeId;\n }\n if (typeof this.userId !== 'undefined') {\n toReturn['userId'] = this.userId;\n }\n if (typeof this.medium !== 'undefined') {\n toReturn['medium'] = this.medium;\n }\n return toReturn;\n }\n}\nclass UpdateTypeRequestUpdateNotificationTypeOperationReplaceMediumConfiguration {\n static fromProto(proto) {\n let m = new UpdateTypeRequestUpdateNotificationTypeOperationReplaceMediumConfiguration();\n m = Object.assign(m, proto);\n if (proto.configuration) {\n m.configuration = MediumConfiguration.fromProto(proto.configuration);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.configuration !== 'undefined' && this.configuration !== null) {\n toReturn['configuration'] = 'toApiJson' in this.configuration ? this.configuration.toApiJson() : this.configuration;\n }\n return toReturn;\n }\n}\nclass UpdateTypeRequestUpdateNotificationTypeOperationSetAccessRequirements {\n static fromProto(proto) {\n let m = new UpdateTypeRequestUpdateNotificationTypeOperationSetAccessRequirements();\n m = Object.assign(m, proto);\n if (proto.accessRequirements) {\n m.accessRequirements = proto.accessRequirements.map(AccessRequirement.fromProto);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.accessRequirements !== 'undefined' && this.accessRequirements !== null) {\n toReturn['accessRequirements'] = 'toApiJson' in this.accessRequirements ? this.accessRequirements.toApiJson() : this.accessRequirements;\n }\n return toReturn;\n }\n}\nclass UpdateTypeRequestUpdateNotificationTypeOperationSetCategory {\n static fromProto(proto) {\n let m = new UpdateTypeRequestUpdateNotificationTypeOperationSetCategory();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.category !== 'undefined') {\n toReturn['category'] = this.category;\n }\n return toReturn;\n }\n}\nclass UpdateTypeRequestUpdateNotificationTypeOperationSetHydrators {\n static fromProto(proto) {\n let m = new UpdateTypeRequestUpdateNotificationTypeOperationSetHydrators();\n m = Object.assign(m, proto);\n if (proto.hydrators) {\n m.hydrators = proto.hydrators.map(Hydrator.fromProto);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.hydrators !== 'undefined' && this.hydrators !== null) {\n toReturn['hydrators'] = 'toApiJson' in this.hydrators ? this.hydrators.toApiJson() : this.hydrators;\n }\n return toReturn;\n }\n}\nclass UpdateTypeRequestUpdateNotificationTypeOperationSetLocales {\n static fromProto(proto) {\n let m = new UpdateTypeRequestUpdateNotificationTypeOperationSetLocales();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.locales !== 'undefined') {\n toReturn['locales'] = this.locales;\n }\n return toReturn;\n }\n}\nclass UpdateTypeRequestUpdateNotificationTypeOperationSetPersonaAccessRequirements {\n static fromProto(proto) {\n let m = new UpdateTypeRequestUpdateNotificationTypeOperationSetPersonaAccessRequirements();\n m = Object.assign(m, proto);\n if (proto.personaAccessRequirements) {\n m.personaAccessRequirements = proto.personaAccessRequirements.map(v => enumStringToValue$2(PersonaType, v));\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.personaAccessRequirements !== 'undefined') {\n toReturn['personaAccessRequirements'] = this.personaAccessRequirements;\n }\n return toReturn;\n }\n}\nclass UpdateTypeRequestUpdateNotificationTypeOperation {\n static fromProto(proto) {\n let m = new UpdateTypeRequestUpdateNotificationTypeOperation();\n m = Object.assign(m, proto);\n if (proto.category) {\n m.category = UpdateTypeRequestUpdateNotificationTypeOperationSetCategory.fromProto(proto.category);\n }\n if (proto.replaceMediumConfiguration) {\n m.replaceMediumConfiguration = UpdateTypeRequestUpdateNotificationTypeOperationReplaceMediumConfiguration.fromProto(proto.replaceMediumConfiguration);\n }\n if (proto.mediumConfiguration) {\n m.mediumConfiguration = UpdateTypeRequestUpdateNotificationTypeOperationMediumConfigurationOperation.fromProto(proto.mediumConfiguration);\n }\n if (proto.hydrators) {\n m.hydrators = UpdateTypeRequestUpdateNotificationTypeOperationSetHydrators.fromProto(proto.hydrators);\n }\n if (proto.accessRequirements) {\n m.accessRequirements = UpdateTypeRequestUpdateNotificationTypeOperationSetAccessRequirements.fromProto(proto.accessRequirements);\n }\n if (proto.web) {\n m.web = UpdateTypeRequestUpdateNotificationTypeOperationWeb.fromProto(proto.web);\n }\n if (proto.webBundle) {\n m.webBundle = UpdateTypeRequestUpdateNotificationTypeOperationWebBundle.fromProto(proto.webBundle);\n }\n if (proto.email) {\n m.email = UpdateTypeRequestUpdateNotificationTypeOperationEmail.fromProto(proto.email);\n }\n if (proto.personaAccessRequirements) {\n m.personaAccessRequirements = UpdateTypeRequestUpdateNotificationTypeOperationSetPersonaAccessRequirements.fromProto(proto.personaAccessRequirements);\n }\n if (proto.locales) {\n m.locales = UpdateTypeRequestUpdateNotificationTypeOperationSetLocales.fromProto(proto.locales);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.category !== 'undefined' && this.category !== null) {\n toReturn['category'] = 'toApiJson' in this.category ? this.category.toApiJson() : this.category;\n }\n if (typeof this.description !== 'undefined') {\n toReturn['description'] = this.description;\n }\n if (typeof this.replaceMediumConfiguration !== 'undefined' && this.replaceMediumConfiguration !== null) {\n toReturn['replaceMediumConfiguration'] = 'toApiJson' in this.replaceMediumConfiguration ? this.replaceMediumConfiguration.toApiJson() : this.replaceMediumConfiguration;\n }\n if (typeof this.mediumConfiguration !== 'undefined' && this.mediumConfiguration !== null) {\n toReturn['mediumConfiguration'] = 'toApiJson' in this.mediumConfiguration ? this.mediumConfiguration.toApiJson() : this.mediumConfiguration;\n }\n if (typeof this.domainId !== 'undefined') {\n toReturn['domainId'] = this.domainId;\n }\n if (typeof this.hydrators !== 'undefined' && this.hydrators !== null) {\n toReturn['hydrators'] = 'toApiJson' in this.hydrators ? this.hydrators.toApiJson() : this.hydrators;\n }\n if (typeof this.name !== 'undefined') {\n toReturn['name'] = this.name;\n }\n if (typeof this.accessRequirements !== 'undefined' && this.accessRequirements !== null) {\n toReturn['accessRequirements'] = 'toApiJson' in this.accessRequirements ? this.accessRequirements.toApiJson() : this.accessRequirements;\n }\n if (typeof this.web !== 'undefined' && this.web !== null) {\n toReturn['web'] = 'toApiJson' in this.web ? this.web.toApiJson() : this.web;\n }\n if (typeof this.webBundle !== 'undefined' && this.webBundle !== null) {\n toReturn['webBundle'] = 'toApiJson' in this.webBundle ? this.webBundle.toApiJson() : this.webBundle;\n }\n if (typeof this.email !== 'undefined' && this.email !== null) {\n toReturn['email'] = 'toApiJson' in this.email ? this.email.toApiJson() : this.email;\n }\n if (typeof this.personaAccessRequirements !== 'undefined' && this.personaAccessRequirements !== null) {\n toReturn['personaAccessRequirements'] = 'toApiJson' in this.personaAccessRequirements ? this.personaAccessRequirements.toApiJson() : this.personaAccessRequirements;\n }\n if (typeof this.featureFlagId !== 'undefined') {\n toReturn['featureFlagId'] = this.featureFlagId;\n }\n if (typeof this.locales !== 'undefined' && this.locales !== null) {\n toReturn['locales'] = 'toApiJson' in this.locales ? this.locales.toApiJson() : this.locales;\n }\n return toReturn;\n }\n}\nclass UpdateTypeRequest {\n static fromProto(proto) {\n let m = new UpdateTypeRequest();\n m = Object.assign(m, proto);\n if (proto.operations) {\n m.operations = proto.operations.map(UpdateTypeRequestUpdateNotificationTypeOperation.fromProto);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.notificationTypeId !== 'undefined') {\n toReturn['notificationTypeId'] = this.notificationTypeId;\n }\n if (typeof this.operations !== 'undefined' && this.operations !== null) {\n toReturn['operations'] = 'toApiJson' in this.operations ? this.operations.toApiJson() : this.operations;\n }\n return toReturn;\n }\n}\nclass UpdateTypeRequestUpdateNotificationTypeOperationWeb {\n static fromProto(proto) {\n let m = new UpdateTypeRequestUpdateNotificationTypeOperationWeb();\n m = Object.assign(m, proto);\n if (proto.contentTemplate) {\n m.contentTemplate = Template.fromProto(proto.contentTemplate);\n }\n if (proto.linkTemplate) {\n m.linkTemplate = Template.fromProto(proto.linkTemplate);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.enabled !== 'undefined') {\n toReturn['enabled'] = this.enabled;\n }\n if (typeof this.contentTemplate !== 'undefined' && this.contentTemplate !== null) {\n toReturn['contentTemplate'] = 'toApiJson' in this.contentTemplate ? this.contentTemplate.toApiJson() : this.contentTemplate;\n }\n if (typeof this.linkTemplate !== 'undefined' && this.linkTemplate !== null) {\n toReturn['linkTemplate'] = 'toApiJson' in this.linkTemplate ? this.linkTemplate.toApiJson() : this.linkTemplate;\n }\n if (typeof this.sampleData !== 'undefined') {\n toReturn['sampleData'] = this.sampleData;\n }\n return toReturn;\n }\n}\nclass UpdateTypeRequestUpdateNotificationTypeOperationWebBundle {\n static fromProto(proto) {\n let m = new UpdateTypeRequestUpdateNotificationTypeOperationWebBundle();\n m = Object.assign(m, proto);\n if (proto.contentTemplate) {\n m.contentTemplate = Template.fromProto(proto.contentTemplate);\n }\n if (proto.linkTemplate) {\n m.linkTemplate = Template.fromProto(proto.linkTemplate);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.enabled !== 'undefined') {\n toReturn['enabled'] = this.enabled;\n }\n if (typeof this.window !== 'undefined') {\n toReturn['window'] = this.window;\n }\n if (typeof this.contentTemplate !== 'undefined' && this.contentTemplate !== null) {\n toReturn['contentTemplate'] = 'toApiJson' in this.contentTemplate ? this.contentTemplate.toApiJson() : this.contentTemplate;\n }\n if (typeof this.linkTemplate !== 'undefined' && this.linkTemplate !== null) {\n toReturn['linkTemplate'] = 'toApiJson' in this.linkTemplate ? this.linkTemplate.toApiJson() : this.linkTemplate;\n }\n if (typeof this.sampleData !== 'undefined') {\n toReturn['sampleData'] = this.sampleData;\n }\n return toReturn;\n }\n}\nfunction enumStringToValue$1(enumRef, value) {\n if (typeof value === 'number') {\n return value;\n }\n return enumRef[value];\n}\nclass SaveNotificationRequest {\n static fromProto(proto) {\n let m = new SaveNotificationRequest();\n m = Object.assign(m, proto);\n if (proto.medium) {\n m.medium = enumStringToValue$1(NotificationMedium, proto.medium);\n }\n if (proto.notificationTime) {\n m.notificationTime = new Date(proto.notificationTime);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.notificationTypeId !== 'undefined') {\n toReturn['notificationTypeId'] = this.notificationTypeId;\n }\n if (typeof this.notificationId !== 'undefined') {\n toReturn['notificationId'] = this.notificationId;\n }\n if (typeof this.userId !== 'undefined') {\n toReturn['userId'] = this.userId;\n }\n if (typeof this.medium !== 'undefined') {\n toReturn['medium'] = this.medium;\n }\n if (typeof this.notificationTime !== 'undefined' && this.notificationTime !== null) {\n toReturn['notificationTime'] = 'toApiJson' in this.notificationTime ? this.notificationTime.toApiJson() : this.notificationTime;\n }\n if (typeof this.data !== 'undefined') {\n toReturn['data'] = this.data;\n }\n return toReturn;\n }\n}\nfunction enumStringToValue(enumRef, value) {\n if (typeof value === 'number') {\n return value;\n }\n return enumRef[value];\n}\nclass BulkUpdateRequest {\n static fromProto(proto) {\n let m = new BulkUpdateRequest();\n m = Object.assign(m, proto);\n if (proto.changes) {\n m.changes = Preference.fromProto(proto.changes);\n }\n if (proto.preferenceByIdentifiers) {\n m.preferenceByIdentifiers = BulkUpdateRequestByIdentifier.fromProto(proto.preferenceByIdentifiers);\n }\n if (proto.businessByUser) {\n m.businessByUser = BulkUpdateRequestByUser.fromProto(proto.businessByUser);\n }\n if (proto.businessByPartner) {\n m.businessByPartner = BulkUpdateRequestByPartner.fromProto(proto.businessByPartner);\n }\n if (proto.userByPartner) {\n m.userByPartner = BulkUpdateRequestByPartner.fromProto(proto.userByPartner);\n }\n if (proto.identifiers) {\n m.identifiers = proto.identifiers.map(Identifier.fromProto);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.changes !== 'undefined' && this.changes !== null) {\n toReturn['changes'] = 'toApiJson' in this.changes ? this.changes.toApiJson() : this.changes;\n }\n if (typeof this.preferenceByIdentifiers !== 'undefined' && this.preferenceByIdentifiers !== null) {\n toReturn['preferenceByIdentifiers'] = 'toApiJson' in this.preferenceByIdentifiers ? this.preferenceByIdentifiers.toApiJson() : this.preferenceByIdentifiers;\n }\n if (typeof this.businessByUser !== 'undefined' && this.businessByUser !== null) {\n toReturn['businessByUser'] = 'toApiJson' in this.businessByUser ? this.businessByUser.toApiJson() : this.businessByUser;\n }\n if (typeof this.businessByPartner !== 'undefined' && this.businessByPartner !== null) {\n toReturn['businessByPartner'] = 'toApiJson' in this.businessByPartner ? this.businessByPartner.toApiJson() : this.businessByPartner;\n }\n if (typeof this.userByPartner !== 'undefined' && this.userByPartner !== null) {\n toReturn['userByPartner'] = 'toApiJson' in this.userByPartner ? this.userByPartner.toApiJson() : this.userByPartner;\n }\n if (typeof this.identifiers !== 'undefined' && this.identifiers !== null) {\n toReturn['identifiers'] = 'toApiJson' in this.identifiers ? this.identifiers.toApiJson() : this.identifiers;\n }\n if (typeof this.partialIdentifiers !== 'undefined') {\n toReturn['partialIdentifiers'] = this.partialIdentifiers;\n }\n return toReturn;\n }\n}\nclass BulkUpdateResponse {\n static fromProto(proto) {\n let m = new BulkUpdateResponse();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.progressToken !== 'undefined') {\n toReturn['progressToken'] = this.progressToken;\n }\n return toReturn;\n }\n}\nclass BulkUpdateRequestByIdentifier {\n static fromProto(proto) {\n let m = new BulkUpdateRequestByIdentifier();\n m = Object.assign(m, proto);\n if (proto.identifiers) {\n m.identifiers = proto.identifiers.map(Identifier.fromProto);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.identifiers !== 'undefined' && this.identifiers !== null) {\n toReturn['identifiers'] = 'toApiJson' in this.identifiers ? this.identifiers.toApiJson() : this.identifiers;\n }\n return toReturn;\n }\n}\nclass BulkUpdateRequestByPartner {\n static fromProto(proto) {\n let m = new BulkUpdateRequestByPartner();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.partnerId !== 'undefined') {\n toReturn['partnerId'] = this.partnerId;\n }\n return toReturn;\n }\n}\nclass BulkUpdateRequestByUser {\n static fromProto(proto) {\n let m = new BulkUpdateRequestByUser();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.partnerId !== 'undefined') {\n toReturn['partnerId'] = this.partnerId;\n }\n if (typeof this.userIds !== 'undefined') {\n toReturn['userIds'] = this.userIds;\n }\n return toReturn;\n }\n}\nclass DeleteRequest {\n static fromProto(proto) {\n let m = new DeleteRequest();\n m = Object.assign(m, proto);\n if (proto.identifier) {\n m.identifier = Identifier.fromProto(proto.identifier);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.identifier !== 'undefined' && this.identifier !== null) {\n toReturn['identifier'] = 'toApiJson' in this.identifier ? this.identifier.toApiJson() : this.identifier;\n }\n return toReturn;\n }\n}\nclass DeleteResponse {\n static fromProto(proto) {\n let m = new DeleteResponse();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n return toReturn;\n }\n}\nclass GetRequest {\n static fromProto(proto) {\n let m = new GetRequest();\n m = Object.assign(m, proto);\n if (proto.identifier) {\n m.identifier = Identifier.fromProto(proto.identifier);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.identifier !== 'undefined' && this.identifier !== null) {\n toReturn['identifier'] = 'toApiJson' in this.identifier ? this.identifier.toApiJson() : this.identifier;\n }\n return toReturn;\n }\n}\nclass GetResponse {\n static fromProto(proto) {\n let m = new GetResponse();\n m = Object.assign(m, proto);\n if (proto.computed) {\n m.computed = Preference.fromProto(proto.computed);\n }\n if (proto.components) {\n m.components = proto.components.map(Preference.fromProto);\n }\n if (proto.defaults) {\n m.defaults = Preference.fromProto(proto.defaults);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.computed !== 'undefined' && this.computed !== null) {\n toReturn['computed'] = 'toApiJson' in this.computed ? this.computed.toApiJson() : this.computed;\n }\n if (typeof this.components !== 'undefined' && this.components !== null) {\n toReturn['components'] = 'toApiJson' in this.components ? this.components.toApiJson() : this.components;\n }\n if (typeof this.defaults !== 'undefined' && this.defaults !== null) {\n toReturn['defaults'] = 'toApiJson' in this.defaults ? this.defaults.toApiJson() : this.defaults;\n }\n if (typeof this.userNotificationsDisabled !== 'undefined') {\n toReturn['userNotificationsDisabled'] = this.userNotificationsDisabled;\n }\n return toReturn;\n }\n}\nclass Identifier {\n static fromProto(proto) {\n let m = new Identifier();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.partnerId !== 'undefined') {\n toReturn['partnerId'] = this.partnerId;\n }\n if (typeof this.marketId !== 'undefined') {\n toReturn['marketId'] = this.marketId;\n }\n if (typeof this.userId !== 'undefined') {\n toReturn['userId'] = this.userId;\n }\n if (typeof this.businessId !== 'undefined') {\n toReturn['businessId'] = this.businessId;\n }\n return toReturn;\n }\n}\nclass ListRequest {\n static fromProto(proto) {\n let m = new ListRequest();\n m = Object.assign(m, proto);\n if (proto.partialIdentifier) {\n m.partialIdentifier = Identifier.fromProto(proto.partialIdentifier);\n }\n if (proto.pageSize) {\n m.pageSize = parseInt(proto.pageSize, 10);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.partialIdentifier !== 'undefined' && this.partialIdentifier !== null) {\n toReturn['partialIdentifier'] = 'toApiJson' in this.partialIdentifier ? this.partialIdentifier.toApiJson() : this.partialIdentifier;\n }\n if (typeof this.cursor !== 'undefined') {\n toReturn['cursor'] = this.cursor;\n }\n if (typeof this.pageSize !== 'undefined') {\n toReturn['pageSize'] = this.pageSize;\n }\n return toReturn;\n }\n}\nclass ListResponse {\n static fromProto(proto) {\n let m = new ListResponse();\n m = Object.assign(m, proto);\n if (proto.computed) {\n m.computed = proto.computed.map(Preference.fromProto);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.computed !== 'undefined' && this.computed !== null) {\n toReturn['computed'] = 'toApiJson' in this.computed ? this.computed.toApiJson() : this.computed;\n }\n if (typeof this.cursor !== 'undefined') {\n toReturn['cursor'] = this.cursor;\n }\n if (typeof this.hasMore !== 'undefined') {\n toReturn['hasMore'] = this.hasMore;\n }\n return toReturn;\n }\n}\nclass NotificationStatus {\n static fromProto(proto) {\n let m = new NotificationStatus();\n m = Object.assign(m, proto);\n if (proto.status) {\n m.status = enumStringToValue(Status, proto.status);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.notificationId !== 'undefined') {\n toReturn['notificationId'] = this.notificationId;\n }\n if (typeof this.status !== 'undefined') {\n toReturn['status'] = this.status;\n }\n return toReturn;\n }\n}\nclass Preference {\n static fromProto(proto) {\n let m = new Preference();\n m = Object.assign(m, proto);\n if (proto.identifier) {\n m.identifier = Identifier.fromProto(proto.identifier);\n }\n if (proto.instantSettings) {\n m.instantSettings = proto.instantSettings.map(NotificationStatus.fromProto);\n }\n if (proto.digestSettings) {\n m.digestSettings = proto.digestSettings.map(NotificationStatus.fromProto);\n }\n if (proto.executiveReportSettings) {\n m.executiveReportSettings = proto.executiveReportSettings.map(NotificationStatus.fromProto);\n }\n if (proto.instant) {\n m.instant = enumStringToValue(Status, proto.instant);\n }\n if (proto.digest) {\n m.digest = enumStringToValue(Status, proto.digest);\n }\n if (proto.monthlyTaskReport) {\n m.monthlyTaskReport = enumStringToValue(Status, proto.monthlyTaskReport);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.identifier !== 'undefined' && this.identifier !== null) {\n toReturn['identifier'] = 'toApiJson' in this.identifier ? this.identifier.toApiJson() : this.identifier;\n }\n if (typeof this.instantSettings !== 'undefined' && this.instantSettings !== null) {\n toReturn['instantSettings'] = 'toApiJson' in this.instantSettings ? this.instantSettings.toApiJson() : this.instantSettings;\n }\n if (typeof this.digestSettings !== 'undefined' && this.digestSettings !== null) {\n toReturn['digestSettings'] = 'toApiJson' in this.digestSettings ? this.digestSettings.toApiJson() : this.digestSettings;\n }\n if (typeof this.executiveReportSettings !== 'undefined' && this.executiveReportSettings !== null) {\n toReturn['executiveReportSettings'] = 'toApiJson' in this.executiveReportSettings ? this.executiveReportSettings.toApiJson() : this.executiveReportSettings;\n }\n if (typeof this.instant !== 'undefined') {\n toReturn['instant'] = this.instant;\n }\n if (typeof this.digest !== 'undefined') {\n toReturn['digest'] = this.digest;\n }\n if (typeof this.monthlyTaskReport !== 'undefined') {\n toReturn['monthlyTaskReport'] = this.monthlyTaskReport;\n }\n return toReturn;\n }\n}\nclass UpdateRequest {\n static fromProto(proto) {\n let m = new UpdateRequest();\n m = Object.assign(m, proto);\n if (proto.identifier) {\n m.identifier = Identifier.fromProto(proto.identifier);\n }\n if (proto.changes) {\n m.changes = Preference.fromProto(proto.changes);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.identifier !== 'undefined' && this.identifier !== null) {\n toReturn['identifier'] = 'toApiJson' in this.identifier ? this.identifier.toApiJson() : this.identifier;\n }\n if (typeof this.changes !== 'undefined' && this.changes !== null) {\n toReturn['changes'] = 'toApiJson' in this.changes ? this.changes.toApiJson() : this.changes;\n }\n return toReturn;\n }\n}\nclass UpdateResponse {\n static fromProto(proto) {\n let m = new UpdateResponse();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n return toReturn;\n }\n}\n\n// *********************************\n// Code generated by sdkgen\n// DO NOT EDIT!.\n//\n// Objects Index.\n// *********************************\n\nconst environment = (window ? window['environment'] : 'prod') ?? 'prod';\nconst hostMap = {\n 'local': 'notifications-api.vendasta-local.com',\n 'test': '',\n 'demo': 'notifications-api-demo.apigateway.co',\n 'prod': 'notifications-api-prod.apigateway.co',\n 'production': 'notifications-api-prod.apigateway.co'\n};\nlet HostService = /*#__PURE__*/(() => {\n class HostService {\n get host() {\n return hostMap[environment.toLowerCase()];\n }\n get hostWithScheme() {\n return 'https://' + this.host;\n }\n }\n HostService.ɵfac = function HostService_Factory(t) {\n return new (t || HostService)();\n };\n HostService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: HostService,\n factory: HostService.ɵfac,\n providedIn: 'root'\n });\n return HostService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n// *********************************\n// Code generated by sdkgen\n// DO NOT EDIT!.\n//\n// API Service.\n// *********************************\nlet NotificationsApiService = /*#__PURE__*/(() => {\n class NotificationsApiService {\n constructor(http, hostService) {\n this.http = http;\n this.hostService = hostService;\n this._host = this.hostService.hostWithScheme;\n }\n apiOptions() {\n return {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json'\n }),\n withCredentials: true\n };\n }\n listNotificationTypes(r) {\n const request = r.toApiJson ? r : new ListNotificationTypesRequest(r);\n return this.http.post(this._host + \"/notifications.v1.Notifications/ListNotificationTypes\", request.toApiJson(), this.apiOptions()).pipe(map(resp => ListNotificationTypesResponse.fromProto(resp)));\n }\n getNotificationTypeSettings(r) {\n const request = r.toApiJson ? r : new GetNotificationTypeSettingsRequest(r);\n return this.http.post(this._host + \"/notifications.v1.Notifications/GetNotificationTypeSettings\", request.toApiJson(), this.apiOptions()).pipe(map(resp => GetNotificationTypeSettingsResponse.fromProto(resp)));\n }\n updateNotificationTypeSettings(r) {\n const request = r.toApiJson ? r : new UpdateNotificationTypeSettingsRequest(r);\n return this.http.post(this._host + \"/notifications.v1.Notifications/UpdateNotificationTypeSettings\", request.toApiJson(), {\n ...this.apiOptions(),\n observe: 'response'\n });\n }\n updateNotificationSettings(r) {\n const request = r.toApiJson ? r : new UpdateNotificationSettingsRequest(r);\n return this.http.post(this._host + \"/notifications.v1.Notifications/UpdateNotificationSettings\", request.toApiJson(), {\n ...this.apiOptions(),\n observe: 'response'\n });\n }\n getNotificationSettings(r) {\n const request = r.toApiJson ? r : new GetNotificationSettingsRequest(r);\n return this.http.post(this._host + \"/notifications.v1.Notifications/GetNotificationSettings\", request.toApiJson(), this.apiOptions()).pipe(map(resp => GetNotificationSettingsResponse.fromProto(resp)));\n }\n listNotifications(r) {\n const request = r.toApiJson ? r : new ListNotificationsRequest(r);\n return this.http.post(this._host + \"/notifications.v1.Notifications/ListNotifications\", request.toApiJson(), this.apiOptions()).pipe(map(resp => ListNotificationsResponse.fromProto(resp)));\n }\n updateNotifications(r) {\n const request = r.toApiJson ? r : new UpdateNotificationsRequest(r);\n return this.http.post(this._host + \"/notifications.v1.Notifications/UpdateNotifications\", request.toApiJson(), {\n ...this.apiOptions(),\n observe: 'response'\n });\n }\n subscribe(r) {\n const request = r.toApiJson ? r : new SubscribeRequest(r);\n return this.http.post(this._host + \"/notifications.v1.Notifications/Subscribe\", request.toApiJson(), {\n ...this.apiOptions(),\n observe: 'response'\n });\n }\n }\n NotificationsApiService.ɵfac = function NotificationsApiService_Factory(t) {\n return new (t || NotificationsApiService)(i0.ɵɵinject(i1.HttpClient), i0.ɵɵinject(HostService));\n };\n NotificationsApiService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: NotificationsApiService,\n factory: NotificationsApiService.ɵfac,\n providedIn: 'root'\n });\n return NotificationsApiService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet NotificationsService = /*#__PURE__*/(() => {\n class NotificationsService {\n constructor(apiService) {\n this.apiService = apiService;\n }\n list$(partnerId, pageSize, cursor, medium, flatten) {\n return this.apiService.listNotifications({\n pageSize: pageSize || 15,\n cursor: cursor,\n filter: {\n medium: medium\n },\n flatten: flatten,\n partnerId: partnerId\n });\n }\n listTypes$(partnerId) {\n return this.apiService.listNotificationTypes({\n partnerId: partnerId\n });\n }\n updateNotifications$(partnerId, operations) {\n return this.apiService.updateNotifications({\n operations: operations,\n partnerId: partnerId\n });\n }\n updateNotificationSetting$(partnerId, operations) {\n return this.apiService.updateNotificationSettings({\n notificationSettings: operations,\n partnerId: partnerId\n });\n }\n getNotificationSetting$(partnerId, context) {\n return this.apiService.getNotificationSettings({\n context: context,\n partnerId: partnerId\n }).pipe(map(resp => resp && resp.notificationSettings ? resp.notificationSettings : []), map(settings => settings.map(setting => {\n setting.notificationMedium = !setting.notificationMedium ? NotificationMedium.NOTIFICATION_MEDIUM_WEB : setting.notificationMedium;\n setting.status = !setting.status ? NotificationStatus$1.NOTIFICATION_STATUS_ENABLED : setting.status;\n return setting;\n })));\n }\n }\n NotificationsService.ɵfac = function NotificationsService_Factory(t) {\n return new (t || NotificationsService)(i0.ɵɵinject(NotificationsApiService));\n };\n NotificationsService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: NotificationsService,\n factory: NotificationsService.ɵfac,\n providedIn: 'root'\n });\n return NotificationsService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n// *********************************\n// Code generated by sdkgen\n// DO NOT EDIT!.\n//\n// API Service.\n// *********************************\nlet NotificationsAdminApiService = /*#__PURE__*/(() => {\n class NotificationsAdminApiService {\n constructor(http, hostService) {\n this.http = http;\n this.hostService = hostService;\n this._host = this.hostService.hostWithScheme;\n }\n apiOptions() {\n return {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json'\n }),\n withCredentials: true\n };\n }\n createType(r) {\n const request = r.toApiJson ? r : new CreateTypeRequest(r);\n return this.http.post(this._host + \"/notifications.v1.NotificationsAdmin/CreateType\", request.toApiJson(), {\n ...this.apiOptions(),\n observe: 'response'\n });\n }\n getType(r) {\n const request = r.toApiJson ? r : new GetTypeRequest(r);\n return this.http.post(this._host + \"/notifications.v1.NotificationsAdmin/GetType\", request.toApiJson(), this.apiOptions()).pipe(map(resp => GetTypeResponse.fromProto(resp)));\n }\n updateType(r) {\n const request = r.toApiJson ? r : new UpdateTypeRequest(r);\n return this.http.post(this._host + \"/notifications.v1.NotificationsAdmin/UpdateType\", request.toApiJson(), {\n ...this.apiOptions(),\n observe: 'response'\n });\n }\n deleteType(r) {\n const request = r.toApiJson ? r : new DeleteTypeRequest(r);\n return this.http.post(this._host + \"/notifications.v1.NotificationsAdmin/DeleteType\", request.toApiJson(), {\n ...this.apiOptions(),\n observe: 'response'\n });\n }\n listTypes(r) {\n const request = r.toApiJson ? r : new ListTypesRequest(r);\n return this.http.post(this._host + \"/notifications.v1.NotificationsAdmin/ListTypes\", request.toApiJson(), this.apiOptions()).pipe(map(resp => ListTypesResponse.fromProto(resp)));\n }\n release(r) {\n const request = r.toApiJson ? r : new ReleaseRequest(r);\n return this.http.post(this._host + \"/notifications.v1.NotificationsAdmin/Release\", request.toApiJson(), {\n ...this.apiOptions(),\n observe: 'response'\n });\n }\n preview(r) {\n const request = r.toApiJson ? r : new PreviewRequest(r);\n return this.http.post(this._host + \"/notifications.v1.NotificationsAdmin/Preview\", request.toApiJson(), {\n ...this.apiOptions(),\n observe: 'response'\n });\n }\n }\n NotificationsAdminApiService.ɵfac = function NotificationsAdminApiService_Factory(t) {\n return new (t || NotificationsAdminApiService)(i0.ɵɵinject(i1.HttpClient), i0.ɵɵinject(HostService));\n };\n NotificationsAdminApiService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: NotificationsAdminApiService,\n factory: NotificationsAdminApiService.ɵfac,\n providedIn: 'root'\n });\n return NotificationsAdminApiService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet NotificationsAdminService = /*#__PURE__*/(() => {\n class NotificationsAdminService {\n constructor(apiService) {\n this.apiService = apiService;\n }\n createType$(create) {\n return this.apiService.createType(create).pipe(map(() => {}));\n }\n getType$(typeId) {\n return this.apiService.getType({\n notificationTypeId: typeId\n }).pipe(map(resp => resp.type));\n }\n deleteType$(typeId) {\n return this.apiService.deleteType({\n notificationTypeId: typeId\n }).pipe(map(() => {}));\n }\n updateType$(typeId, operations) {\n return this.apiService.updateType({\n notificationTypeId: typeId,\n operations: operations\n }).pipe(map(() => {}));\n }\n listTypes$(pageSize, cursor) {\n return this.apiService.listTypes({\n pageSize: pageSize || 25,\n cursor: cursor\n });\n }\n releaseType$(typeId, medium, userIds) {\n return this.apiService.release({\n notificationTypeId: typeId,\n medium: medium,\n userId: userIds\n }).pipe(map(() => {}));\n }\n preview$(typeId, medium, event) {\n return this.apiService.preview({\n notificationTypeId: typeId,\n medium: medium,\n event: event\n }).pipe(map(() => {}));\n }\n }\n NotificationsAdminService.ɵfac = function NotificationsAdminService_Factory(t) {\n return new (t || NotificationsAdminService)(i0.ɵɵinject(NotificationsAdminApiService));\n };\n NotificationsAdminService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: NotificationsAdminService,\n factory: NotificationsAdminService.ɵfac,\n providedIn: 'root'\n });\n return NotificationsAdminService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction setName(name) {\n return {\n name: name || ''\n };\n}\nfunction setCategory(category) {\n return {\n category: {\n category: category\n }\n };\n}\nfunction setDescription(description) {\n return {\n description: description || ''\n };\n}\nfunction replaceMediumConfiguration(config) {\n return {\n replaceMediumConfiguration: config\n };\n}\nfunction setEmailEnabled(enabled) {\n return {\n email: {\n enabled: enabled\n }\n };\n}\nfunction setEmailContentTemplate(template) {\n return {\n email: {\n contentTemplate: template\n }\n };\n}\nfunction setEmailLinkTemplate(template) {\n return {\n email: {\n linkTemplate: template\n }\n };\n}\nfunction setEmailSubjectTemplate(template) {\n return {\n email: {\n subjectTemplate: template\n }\n };\n}\nfunction setEmailFromNameTemplate(template) {\n return {\n email: {\n from: {\n nameTemplate: template\n }\n }\n };\n}\nfunction setEmailFromAddressTemplate(template) {\n return {\n email: {\n from: {\n addressTemplate: template\n }\n }\n };\n}\nfunction setEmailContentType(contentType) {\n return {\n email: {\n contentType: contentType || ContentType.CONTENT_TYPE_HTML\n }\n };\n}\nfunction setEmailServiceProvider(serviceProvider) {\n return {\n email: {\n espId: serviceProvider || ''\n }\n };\n}\nfunction setEmailSample(sample) {\n return {\n email: {\n sampleData: sample ?? {}\n }\n };\n}\nfunction setWebEnabled(enabled) {\n return {\n web: {\n enabled: enabled\n }\n };\n}\nfunction setWebContentTemplate(template) {\n return {\n web: {\n contentTemplate: template\n }\n };\n}\nfunction setWebLinkTemplate(template) {\n return {\n web: {\n linkTemplate: template\n }\n };\n}\nfunction setWebSample(sample) {\n return {\n web: {\n sampleData: sample ?? {}\n }\n };\n}\nfunction setWebBundleEnabled(enabled) {\n return {\n webBundle: {\n enabled: enabled\n }\n };\n}\nfunction setWebBundleContentTemplate(template) {\n return {\n webBundle: {\n contentTemplate: template\n }\n };\n}\nfunction setWebBundleLinkTemplate(template) {\n return {\n webBundle: {\n linkTemplate: template\n }\n };\n}\nfunction setWebBundleSample(sample) {\n return {\n webBundle: {\n sampleData: sample ?? {}\n }\n };\n}\nfunction setWebBundleWindow(window) {\n return {\n webBundle: {\n window: window || '0s'\n }\n };\n}\nfunction setDomainId(domainId) {\n return {\n domainId: domainId || ''\n };\n}\nfunction setFeatureFlagId(id) {\n return {\n featureFlagId: id || ''\n };\n}\nfunction setLocales(locales) {\n return {\n locales: {\n locales: locales || []\n }\n };\n}\nfunction setHydrators(hydrators) {\n return {\n hydrators: {\n hydrators: hydrators\n }\n };\n}\nfunction setAccountGroupHydrator(enabled) {\n return {\n hydrators: {\n hydrators: [{\n accountGroup: enabled\n }]\n }\n };\n}\nfunction setSalespersonHydrator(enabled) {\n return {\n hydrators: {\n hydrators: [{\n salesperson: enabled\n }]\n }\n };\n}\nfunction setProductHydrator(enabled) {\n return {\n hydrators: {\n hydrators: [{\n product: enabled\n }]\n }\n };\n}\nfunction setPartnerBrandingHydrator(enabled) {\n return {\n hydrators: {\n hydrators: [{\n partnerBranding: enabled\n }]\n }\n };\n}\nfunction setAccessRequirement(accessRequirements) {\n return {\n accessRequirements: {\n accessRequirements: accessRequirements\n }\n };\n}\nfunction setPersonaAccessRequirements(personaTypes) {\n return {\n personaAccessRequirements: {\n personaAccessRequirements: personaTypes\n }\n };\n}\n\n// *********************************\n// Code generated by sdkgen\n// DO NOT EDIT!.\n//\n// API Service.\n// *********************************\nlet UnsubscribeApiService = /*#__PURE__*/(() => {\n class UnsubscribeApiService {\n constructor(http, hostService) {\n this.http = http;\n this.hostService = hostService;\n this._host = this.hostService.hostWithScheme;\n }\n apiOptions() {\n return {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json'\n }),\n withCredentials: true\n };\n }\n getOverview(r) {\n const request = r.toApiJson ? r : new GetOverviewRequest(r);\n return this.http.post(this._host + \"/notifications.v1.Unsubscribe/GetOverview\", request.toApiJson(), this.apiOptions()).pipe(map(resp => GetOverviewResponse.fromProto(resp)));\n }\n unsubscribe(r) {\n const request = r.toApiJson ? r : new UnsubscribeRequest(r);\n return this.http.post(this._host + \"/notifications.v1.Unsubscribe/Unsubscribe\", request.toApiJson(), {\n ...this.apiOptions(),\n observe: 'response'\n });\n }\n }\n UnsubscribeApiService.ɵfac = function UnsubscribeApiService_Factory(t) {\n return new (t || UnsubscribeApiService)(i0.ɵɵinject(i1.HttpClient), i0.ɵɵinject(HostService));\n };\n UnsubscribeApiService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: UnsubscribeApiService,\n factory: UnsubscribeApiService.ɵfac,\n providedIn: 'root'\n });\n return UnsubscribeApiService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet UnsubscribeService = /*#__PURE__*/(() => {\n class UnsubscribeService {\n constructor(api) {\n this.api = api;\n }\n getOverview$(token) {\n return this.api.getOverview({\n token\n });\n }\n unsubscribe$(token) {\n return this.api.unsubscribe({\n token\n });\n }\n }\n UnsubscribeService.ɵfac = function UnsubscribeService_Factory(t) {\n return new (t || UnsubscribeService)(i0.ɵɵinject(UnsubscribeApiService));\n };\n UnsubscribeService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: UnsubscribeService,\n factory: UnsubscribeService.ɵfac,\n providedIn: 'root'\n });\n return UnsubscribeService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n// *********************************\n// Code generated by sdkgen\n// DO NOT EDIT!.\n//\n// API Service.\n// *********************************\nlet LegacyNotificationPreferenceApiService = /*#__PURE__*/(() => {\n class LegacyNotificationPreferenceApiService {\n constructor(http, hostService) {\n this.http = http;\n this.hostService = hostService;\n this._host = this.hostService.hostWithScheme;\n }\n apiOptions() {\n return {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json'\n }),\n withCredentials: true\n };\n }\n get(r) {\n const request = r.toApiJson ? r : new GetRequest(r);\n return this.http.post(this._host + \"/notifications.v1.legacy.LegacyNotificationPreference/Get\", request.toApiJson(), this.apiOptions()).pipe(map(resp => GetResponse.fromProto(resp)));\n }\n list(r) {\n const request = r.toApiJson ? r : new ListRequest(r);\n return this.http.post(this._host + \"/notifications.v1.legacy.LegacyNotificationPreference/List\", request.toApiJson(), this.apiOptions()).pipe(map(resp => ListResponse.fromProto(resp)));\n }\n update(r) {\n const request = r.toApiJson ? r : new UpdateRequest(r);\n return this.http.post(this._host + \"/notifications.v1.legacy.LegacyNotificationPreference/Update\", request.toApiJson(), this.apiOptions()).pipe(map(resp => UpdateResponse.fromProto(resp)));\n }\n bulkUpdate(r) {\n const request = r.toApiJson ? r : new BulkUpdateRequest(r);\n return this.http.post(this._host + \"/notifications.v1.legacy.LegacyNotificationPreference/BulkUpdate\", request.toApiJson(), this.apiOptions()).pipe(map(resp => BulkUpdateResponse.fromProto(resp)));\n }\n delete(r) {\n const request = r.toApiJson ? r : new DeleteRequest(r);\n return this.http.post(this._host + \"/notifications.v1.legacy.LegacyNotificationPreference/Delete\", request.toApiJson(), this.apiOptions()).pipe(map(resp => DeleteResponse.fromProto(resp)));\n }\n }\n LegacyNotificationPreferenceApiService.ɵfac = function LegacyNotificationPreferenceApiService_Factory(t) {\n return new (t || LegacyNotificationPreferenceApiService)(i0.ɵɵinject(i1.HttpClient), i0.ɵɵinject(HostService));\n };\n LegacyNotificationPreferenceApiService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: LegacyNotificationPreferenceApiService,\n factory: LegacyNotificationPreferenceApiService.ɵfac,\n providedIn: 'root'\n });\n return LegacyNotificationPreferenceApiService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet LegacyNotificationPreferenceService = /*#__PURE__*/(() => {\n class LegacyNotificationPreferenceService {\n constructor(api) {\n this.api = api;\n }\n get$(partnerId, marketId, userId, businessId) {\n const req = {\n identifier: {\n partnerId,\n marketId,\n userId,\n businessId\n }\n };\n return this.api.get(req);\n }\n list$(partnerId, marketId, userId, businessId, cursor, pageSize) {\n const req = {\n partialIdentifier: {\n partnerId,\n marketId,\n userId,\n businessId\n },\n cursor,\n pageSize\n };\n return this.api.list(req);\n }\n update$(changes, partnerId, marketId, userId, businessId) {\n const req = {\n changes,\n identifier: {\n partnerId,\n marketId,\n userId,\n businessId\n }\n };\n return this.api.update(req);\n }\n delete$(partnerId, marketId, userId, businessId) {\n const req = {\n identifier: {\n partnerId,\n marketId,\n userId,\n businessId\n }\n };\n return this.api.delete(req);\n }\n //deprecated\n bulkUpdate$(changes, identifiers, partialIdentifiers) {\n const req = {\n changes,\n identifiers,\n partialIdentifiers\n };\n return this.api.bulkUpdate(req);\n }\n bulkUpdatePreferenceByIdentifier(changes, identifiers) {\n const req = {\n changes,\n identifiers\n };\n return this.api.bulkUpdate(req);\n }\n bulkUpdateBusinessByUser(changes, partnerId, userIds) {\n const req = {\n changes,\n businessByUser: {\n partnerId,\n userIds\n }\n };\n return this.api.bulkUpdate(req);\n }\n bulkUpdateBusinessByPartner(changes, partnerId) {\n const req = {\n changes,\n businessByPartner: {\n partnerId\n }\n };\n return this.api.bulkUpdate(req);\n }\n bulkUpdateUsersByPartner(changes, partnerId) {\n const req = {\n changes,\n userByPartner: {\n partnerId\n }\n };\n return this.api.bulkUpdate(req);\n }\n }\n LegacyNotificationPreferenceService.ɵfac = function LegacyNotificationPreferenceService_Factory(t) {\n return new (t || LegacyNotificationPreferenceService)(i0.ɵɵinject(LegacyNotificationPreferenceApiService));\n };\n LegacyNotificationPreferenceService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: LegacyNotificationPreferenceService,\n factory: LegacyNotificationPreferenceService.ɵfac,\n providedIn: 'root'\n });\n return LegacyNotificationPreferenceService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AccessRequirement, ContentType, GetNotificationSettingsResponse, Hydrator, LegacyNotificationPreferenceService, Status as LegacyStatus, ListNotificationTypesResponse, ListNotificationsResponse, ListTypesResponse, MediumConfiguration, NotificationMedium, NotificationSetting, NotificationStatus$1 as NotificationStatus, NotificationType, NotificationTypeEmail, NotificationTypeWeb, NotificationTypeWebBundle, NotificationsAdminService, NotificationsService, PersonaType, UnsubscribeService, setAccessRequirement, setCategory, setDescription, setDomainId, setEmailContentTemplate, setEmailContentType, setEmailEnabled, setEmailFromAddressTemplate, setEmailFromNameTemplate, setEmailLinkTemplate, setEmailSample, setEmailServiceProvider, setEmailSubjectTemplate, setFeatureFlagId, setHydrators, setLocales, setName, setPersonaAccessRequirements, setWebBundleContentTemplate, setWebBundleEnabled, setWebBundleLinkTemplate, setWebBundleSample, setWebBundleWindow, setWebContentTemplate, setWebEnabled, setWebLinkTemplate, setWebSample };\n","// remove specific html special characters from string\nexport function stripHtmlEscapeCharactersFromURL(url: string): string {\n const replaceMap = {\n '&': '&',\n };\n return url.replace(/&/g, (match) => replaceMap[match]);\n}\n","import { Injectable } from '@angular/core';\nimport {\n NotificationContextInterface,\n NotificationMedium,\n NotificationSetting,\n NotificationStatus,\n NotificationType,\n NotificationsService as NotificationsClientService,\n UpdateNotificationSettingsRequestUpdateNotificationSettingsOperationInterface,\n} from '@vendasta/notifications-sdk';\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport { Notification } from './notification';\nimport { stripHtmlEscapeCharactersFromURL } from './strip-html';\n\n@Injectable({ providedIn: 'root' })\nexport class NotificationsService {\n constructor(private notificationsService: NotificationsClientService) {}\n\n loadNotifications$(\n partnerId: string,\n pageSize?: number,\n cursor?: string,\n flatten?: boolean,\n medium?: NotificationMedium,\n ): Observable {\n return this.notificationsService.list$(partnerId, pageSize, cursor, medium, flatten).pipe(\n map((resp) => {\n if (!!resp && !!resp.notifications) {\n return {\n notifications: resp.notifications.map((n) => ({\n id: n.notificationId,\n notificationTypeId: n.notificationTypeId,\n body: n.web.body,\n eventTime: n.created,\n link: stripHtmlEscapeCharactersFromURL(n.link),\n viewed: n.viewed,\n followed: n.followed,\n partnerId: n.partnerId,\n marketId: n.marketId,\n accountGroupId: n.accountGroupId,\n })),\n hasMore: resp.hasMore,\n nextCursor: resp.nextCursor,\n };\n } else {\n return {\n notifications: [],\n hasMore: false,\n nextCursor: '',\n };\n }\n }),\n );\n }\n\n listNotificationTypes$(partnerId: string): Observable {\n return this.notificationsService.listTypes$(partnerId).pipe(\n map((resp) => (!!resp && !!resp.types ? resp.types : [])),\n map((resp) =>\n resp.map((nt) => {\n nt.configurations = nt.configurations.map((conf) => {\n if (!conf.medium) {\n conf.medium = NotificationMedium.NOTIFICATION_MEDIUM_WEB;\n }\n return conf;\n });\n return nt;\n }),\n ),\n );\n }\n\n /**\n * Mark the notifications as viewed\n */\n public viewed$(partnerId: string, notificationIds: Array): Observable> {\n const ops = notificationIds.map((id) => ({\n notificationId: id,\n viewed: true,\n }));\n return this.notificationsService.updateNotifications$(partnerId, ops);\n }\n\n /**\n * Mark notifications as followed\n */\n public followed$(\n partnerId: string,\n notificationIds: Array,\n followed: boolean,\n ): Observable> {\n const ops = notificationIds.map((id) => ({\n notificationId: id,\n followed: followed,\n }));\n return this.notificationsService.updateNotifications$(partnerId, ops);\n }\n\n /**\n * subscribe to a notification\n */\n public subscribe$(partnerId: string, setting: NotificationSetting): Observable> {\n const updated = Object.assign({}, setting);\n updated.status = NotificationStatus.NOTIFICATION_STATUS_ENABLED;\n return this.saveSettingMulti$(partnerId, [updated]);\n }\n\n /**\n * unsubscribe from a notification\n */\n public unsubscribe$(partnerId: string, setting: NotificationSetting): Observable> {\n const updated = Object.assign({}, setting);\n updated.status = NotificationStatus.NOTIFICATION_STATUS_DISABLED;\n return this.saveSettingMulti$(partnerId, [updated]);\n }\n\n /**\n * save multiple settings at once\n */\n public saveSettingMulti$(partnerId: string, settings: NotificationSetting[]): Observable> {\n const ops: UpdateNotificationSettingsRequestUpdateNotificationSettingsOperationInterface[] = [];\n settings.forEach((o) => {\n ops.push({\n notificationTypeId: o.notificationTypeId,\n notificationMedium: o.notificationMedium,\n context: o.context,\n status: o.status,\n });\n });\n return this.notificationsService.updateNotificationSetting$(partnerId, ops).pipe(map(() => ({})));\n }\n\n public settings$(partnerId: string, context?: NotificationContextInterface): Observable> {\n return this.notificationsService.getNotificationSetting$(partnerId, context);\n }\n\n // Get the status of a notification for specific notification type(For both web and email)\n public getNotificationSettingStatus$(\n partnerId: string,\n context: NotificationContextInterface,\n notificationTypeId: string,\n ): Observable {\n return this.notificationsService.getNotificationSetting$(partnerId, context).pipe(\n map((settings) => {\n const selectedSettings = settings.filter((s) => s.notificationTypeId === notificationTypeId);\n if (selectedSettings && selectedSettings.length > 0) {\n return !!selectedSettings.find(\n (selectedSetting) => selectedSetting.status === NotificationStatus.NOTIFICATION_STATUS_ENABLED,\n );\n }\n }),\n );\n }\n}\n\nexport interface ListNotificationsResponse {\n notifications: Notification[];\n nextCursor: string;\n hasMore: boolean;\n}\n","import { Component, Input } from '@angular/core';\nimport { TranslateService } from '@ngx-translate/core';\nimport { CenterNavigationItem } from '@vendasta/atlas';\nimport {\n MediumConfiguration,\n NotificationContextInterface,\n NotificationMedium,\n NotificationSetting,\n NotificationSettingInterface,\n NotificationStatus,\n NotificationType,\n NotificationTypeInterface,\n} from '@vendasta/notifications-sdk';\nimport { BehaviorSubject, combineLatest, Observable, of } from 'rxjs';\nimport { catchError, distinctUntilChanged, filter, map, shareReplay, switchMap, take, tap } from 'rxjs/operators';\nimport { AtlasConfigService, AtlasDataService } from '../../../../../core/src';\nimport { SnackbarService } from '../../../core-components/snackbar/snackbar.service';\nimport { NotificationsService } from '../../notifications.service';\n\nenum CategoryState {\n On = 0,\n Off = 1,\n Indeterminate = 2,\n}\n\nconst ACTIVITY_NOTIFICATION_TYPE_ID = 'business-center-activity';\n\n@Component({\n selector: 'atlas-notification-settings-form',\n templateUrl: './settings-form.component.html',\n styleUrls: ['./settings-form.component.scss'],\n})\nexport class SettingsFormComponent {\n @Input() set partnerId(partnerId: string) {\n this.partnerId$$.next(partnerId);\n }\n\n get partnerId(): string {\n return this.partnerId$$.getValue();\n }\n\n @Input() set userId(partnerId: string) {\n this.userId$$.next(partnerId);\n }\n\n get userId(): string {\n return this.userId$$.getValue();\n }\n\n private partnerId$$ = new BehaviorSubject(null);\n private userId$$ = new BehaviorSubject(null);\n\n private partnerIdContext$ = this.partnerId$$.asObservable().pipe(\n map((partnerId: string): NotificationContextInterface => {\n return { partner: { partnerId: partnerId } };\n }),\n distinctUntilChanged(),\n shareReplay(1),\n );\n\n private userIdContext$ = this.userId$$.asObservable().pipe(\n map((userId: string): NotificationContextInterface => {\n return { user: { userId: userId } };\n }),\n distinctUntilChanged(),\n shareReplay(1),\n );\n\n availableMedium = {\n App: NotificationMedium.NOTIFICATION_MEDIUM_WEB,\n Email: NotificationMedium.NOTIFICATION_MEDIUM_EMAIL,\n };\n enabledMedium: Map = new Map();\n\n public saving = false;\n\n private VBCCenterData$: Observable = this.dataService.centerData$.pipe(\n map((items: CenterNavigationItem[]) => items.find((item: CenterNavigationItem) => item.centerId === 'VBC')),\n shareReplay({ bufferSize: 1, refCount: true }),\n );\n activitySettingsURL$: Observable = combineLatest([this.config.accountId$, this.dataService.userId$]).pipe(\n map(([accountId, userId]: [string, string]) => {\n if (!accountId || !userId) {\n return '';\n }\n return `/account/location/${accountId}/settings/notifications/${userId}/settings`;\n }),\n );\n whitelabelledBusinessCenterName$: Observable = this.VBCCenterData$.pipe(\n filter((vbcCenterData: CenterNavigationItem) => !!vbcCenterData),\n map((vbcCenterData: CenterNavigationItem) => vbcCenterData.name),\n );\n\n sections: Map = new Map();\n checked: Map = new Map();\n rollbackCheckState: Map = new Map();\n error: boolean;\n\n partnerSettings$ = this.partnerIdContext$.pipe(\n filter((ctx) => !!ctx),\n switchMap((ctx) => this.notificationsService.settings$(this.partnerId, ctx)),\n catchError(() => {\n if (this.checked.size === 0) {\n this.snackbarService.show(\n this.translate.instant('NOTIFICATIONS.SETTINGS.SNACKBAR.FAILURE'),\n this.translate.instant('NOTIFICATIONS.ACTIONS.DISMISS'),\n { duration: 3000 },\n );\n this.error = true;\n }\n return of(null);\n }),\n filter((settings) => !!settings),\n tap((settings: NotificationSettingInterface[]) => {\n settings.forEach((setting) => {\n if (setting.context) {\n const enabled = setting.status === NotificationStatus.NOTIFICATION_STATUS_ENABLED;\n this.checked.set(this.checkboxId('partner', setting.notificationTypeId, setting.notificationMedium), enabled);\n }\n });\n this.rollbackCheckState = new Map(this.checked);\n }),\n );\n\n userSettings$ = this.userIdContext$.pipe(\n filter((ctx) => !!ctx),\n switchMap((ctx) => this.notificationsService.settings$(this.partnerId, ctx)),\n catchError(() => {\n if (this.checked.size === 0) {\n this.snackbarService.show(\n this.translate.instant('NOTIFICATIONS.SETTINGS.SNACKBAR.FAILURE'),\n this.translate.instant('NOTIFICATIONS.ACTIONS.DISMISS'),\n { duration: 3000 },\n );\n this.error = true;\n }\n return of(null);\n }),\n filter((settings) => !!settings),\n tap((settings: NotificationSettingInterface[]) => {\n settings.forEach((setting) => {\n if (setting.context) {\n const enabled = setting.status === NotificationStatus.NOTIFICATION_STATUS_ENABLED;\n this.checked.set(this.checkboxId('user', setting.notificationTypeId, setting.notificationMedium), enabled);\n }\n });\n this.rollbackCheckState = new Map(this.checked);\n }),\n );\n\n notificationTypes$ = this.partnerIdContext$.pipe(\n filter((ctx) => !!ctx),\n switchMap(() => this.notificationsService.listNotificationTypes$(this.partnerId)),\n catchError(() => {\n this.snackbarService.show(\n this.translate.instant('NOTIFICATIONS.SETTINGS.SNACKBAR.FAILURE'),\n this.translate.instant('NOTIFICATIONS.ACTIONS.DISMISS'),\n { duration: 3000 },\n );\n this.error = true;\n return of(null);\n }),\n filter((types) => !!types),\n tap((types: NotificationType[]) => {\n const out = new Map();\n const enabledMedium = new Map();\n\n types.forEach((t: NotificationType) => {\n // Skip the special activity notification type -- it will surfaced specially as a link to VBC\n if (t.notificationTypeId === ACTIVITY_NOTIFICATION_TYPE_ID) {\n return;\n }\n const k = t.category.join(' > ');\n let ts = out.get(k);\n if (ts === undefined) {\n ts = [];\n }\n ts.push(t);\n out.set(k, ts);\n\n t.configurations.forEach((conf: MediumConfiguration) => {\n if (conf.disabled) {\n return;\n }\n const enabledMediumForType = enabledMedium.get(t.notificationTypeId);\n const medium = conf.medium;\n if (enabledMediumForType === undefined) {\n enabledMedium.set(t.notificationTypeId, [medium]);\n } else {\n enabledMediumForType.push(medium);\n }\n });\n });\n this.sections = out;\n this.enabledMedium = enabledMedium;\n }),\n );\n\n hasActivityNotificationType$: Observable = this.notificationTypes$.pipe(\n map((types: NotificationType[]) =>\n types.some((t: NotificationType) => t.notificationTypeId === ACTIVITY_NOTIFICATION_TYPE_ID),\n ),\n );\n\n hasVBCData$: Observable = this.VBCCenterData$.pipe(\n map((vbcCenterData: CenterNavigationItem) => !!vbcCenterData),\n );\n\n showActivitySettings$: Observable = this.hasVBCData$.pipe(map((hasData) => hasData));\n\n formReady$ = combineLatest([this.partnerSettings$, this.userSettings$, this.notificationTypes$]);\n\n constructor(\n public notificationsService: NotificationsService,\n private translate: TranslateService,\n private snackbarService: SnackbarService,\n private dataService: AtlasDataService,\n private config: AtlasConfigService,\n ) {}\n\n clickCategoryIcon(category: string, event: Event): void {\n event.stopPropagation();\n const catState = this.getCategoryState(category);\n if (catState === CategoryState.On) {\n this.setEntireCategory(category, false);\n } else if (catState === CategoryState.Off) {\n this.setEntireCategory(category, true);\n } else {\n this.setEntireCategory(category, false);\n }\n }\n\n dirty(): boolean {\n let dirty = false;\n this.checked.forEach((v, k) => {\n const untouched = v === this.rollbackCheckState.get(k);\n if (!untouched) {\n dirty = true;\n }\n });\n return dirty;\n }\n\n private getCategoryState(category: string): CategoryState {\n const set = new Set();\n this.sections.get(category).forEach((type) => {\n const ownProps = Object.keys(this.availableMedium);\n let i = ownProps.length;\n const resArray = new Array(i);\n while (i--) {\n resArray[i] = [ownProps[i], this.availableMedium[ownProps[i]]];\n }\n for (const [, medium] of resArray) {\n const config = type.configurations.find((conf) => conf.medium === medium);\n if (config && config.disabled) {\n // If the config id disabled, don't include it in our check.\n continue;\n }\n set.add(this.checked.get(this.checkboxId('partner', type.notificationTypeId, medium)) || false);\n set.add(this.checked.get(this.checkboxId('user', type.notificationTypeId, medium)) || false);\n }\n });\n if (set.has(true) && set.has(false)) {\n return CategoryState.Indeterminate;\n }\n if (set.has(true)) {\n return CategoryState.On;\n }\n return CategoryState.Off;\n }\n\n getCategoryIcon(category: string): string {\n switch (this.getCategoryState(category)) {\n case CategoryState.Indeterminate:\n return 'notifications_none';\n case CategoryState.On:\n return 'notifications';\n default:\n return 'notifications_off';\n }\n }\n\n getCategoryEnabledState(category: string): string {\n switch (this.getCategoryState(category)) {\n case CategoryState.Indeterminate:\n return 'NOTIFICATIONS.SETTINGS.DESCRIPTION.SOME_ON';\n case CategoryState.On:\n return 'NOTIFICATIONS.SETTINGS.DESCRIPTION.ALL_ON';\n default:\n return 'NOTIFICATIONS.SETTINGS.DESCRIPTION.ALL_OFF';\n }\n }\n\n setEntireCategory(category: string, toggleState: boolean): void {\n const ts = this.sections.get(category);\n if (ts === undefined) {\n return;\n }\n\n ts.forEach((t) => {\n t.configurations.forEach((mediumConfig) => {\n this.checked.set(this.checkboxId('partner', t.notificationTypeId, mediumConfig.medium), toggleState);\n this.checked.set(this.checkboxId('user', t.notificationTypeId, mediumConfig.medium), toggleState);\n });\n });\n }\n\n public reset(): void {\n this.checked = new Map(this.rollbackCheckState);\n }\n\n public save(): void {\n this.saving = true;\n combineLatest([this.partnerIdContext$, this.userIdContext$])\n .pipe(\n take(1),\n map(([partnerContext, userContext]: [NotificationContextInterface, NotificationContextInterface]) => {\n const ns: NotificationSetting[] = [];\n this.checked.forEach((v, k) => {\n // Get the notification ID from the checkbox id. The format is notificationid-medium-type, so this strips off the medium and type.\n const notificationId = k.split('~').slice(0, 1).join('-');\n // This strips off the notification id from the check box id and casts it into a Notification Medium.\n const ids = k.split('~')[1].split('-');\n const medium: NotificationMedium = NotificationMedium[NotificationMedium[+ids[0]]];\n const setting: string = ids[1];\n if (setting === 'user') {\n ns.push(\n new NotificationSetting({\n notificationTypeId: notificationId,\n notificationMedium: medium,\n status: v\n ? NotificationStatus.NOTIFICATION_STATUS_ENABLED\n : NotificationStatus.NOTIFICATION_STATUS_DISABLED,\n context: userContext,\n }),\n );\n } else {\n ns.push(\n new NotificationSetting({\n notificationTypeId: notificationId,\n notificationMedium: medium,\n status: v\n ? NotificationStatus.NOTIFICATION_STATUS_ENABLED\n : NotificationStatus.NOTIFICATION_STATUS_DISABLED,\n context: partnerContext,\n }),\n );\n }\n });\n return ns;\n }),\n switchMap((ns: NotificationSetting[]) => this.notificationsService.saveSettingMulti$(this.partnerId, ns)),\n catchError(() => {\n this.snackbarService.show(\n this.translate.instant('NOTIFICATIONS.SETTINGS.SNACKBAR.SAVE_FAILURE'),\n this.translate.instant('NOTIFICATIONS.ACTIONS.DISMISS'),\n { duration: 3000 },\n );\n this.checked = new Map(this.rollbackCheckState);\n this.saving = false;\n return of(null);\n }),\n filter((resp) => !!resp),\n )\n .subscribe(() => {\n this.rollbackCheckState = new Map(this.checked);\n this.snackbarService.show(this.translate.instant('NOTIFICATIONS.SETTINGS.SNACKBAR.UPDATED'), null, {\n duration: 3000,\n });\n this.saving = false;\n });\n }\n\n isMediumEnabled(category: string, notificationTypeId: string, medium: NotificationMedium): boolean {\n const mediumForType = this.enabledMedium.get(notificationTypeId);\n if (!mediumForType) {\n return false;\n }\n return mediumForType.indexOf(medium) > -1;\n }\n\n checkboxId(setting: string, notificationTypeId: string, medium: NotificationMedium): string {\n return `${notificationTypeId}~${medium}-${setting}`;\n }\n\n getTranslationKeyForMedium(medium: NotificationMedium): string {\n switch (medium) {\n case NotificationMedium.NOTIFICATION_MEDIUM_WEB:\n return 'NOTIFICATIONS.SETTINGS.MEDIUMS.APP';\n case NotificationMedium.NOTIFICATION_MEDIUM_EMAIL:\n return 'NOTIFICATIONS.SETTINGS.MEDIUMS.EMAIL';\n default:\n return 'NOTIFICATIONS.SETTINGS.MEDIUMS.UNKNOWN';\n }\n }\n}\n","\n
    \n {{ 'NOTIFICATIONS.SETTINGS.NO_ACCESS' | translate }}\n
    \n\n \n \n \n
    \n
    \n {{ 'NOTIFICATIONS.SETTINGS.BETA' | translate }}\n \n
    \n
    \n
    \n
    \n
    \n\n \n \n \n \n \n \n {{ getCategoryIcon(typesByCategory.key) }}\n \n \n {{ typesByCategory.key }}\n \n \n \n {{ getCategoryEnabledState(typesByCategory.key) | translate }}\n \n
    \n
    \n \n {{ 'NOTIFICATIONS.SETTINGS.DESCRIPTION.ALL_EVENTS' | translate }}\n \n \n info_outline\n \n
    \n
    \n \n {{ 'NOTIFICATIONS.SETTINGS.DESCRIPTION.ONLY_MY_EVENTS' | translate }}\n \n \n info_outline\n \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    {{ t.name }}
    \n
    \n {{ t.description }}\n
    \n
    \n
    \n
    \n \n {{ 'NOTIFICATIONS.SETTINGS.DESCRIPTION.ALL_EVENTS' | translate }}\n \n \n \n {{ getTranslationKeyForMedium(medium.value) | translate }}\n \n \n
    \n
    \n
    \n \n {{ 'NOTIFICATIONS.SETTINGS.DESCRIPTION.ONLY_MY_EVENTS' | translate }}\n \n \n \n {{ getTranslationKeyForMedium(medium.value) | translate }}\n \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n\n\n
    \n \n
    \n
    \n
    \n error\n
    \n {{ 'NOTIFICATIONS.SETTINGS.LOAD_FAILURE' | translate }}\n
    \n
    \n","import { HttpErrorResponse } from '@angular/common/http';\nimport { Component, OnInit, ViewChild } from '@angular/core';\nimport { AtlasConfigService, AtlasDataService } from '../../../../core/src';\nimport { CenterNavigationItem } from '@vendasta/atlas';\nimport { combineLatest, Observable, of } from 'rxjs';\nimport { map, shareReplay, startWith, switchMap, take } from 'rxjs/operators';\nimport { AtlasAccountNotificationService } from '../../account-notification.service';\nimport { SectionContainer } from '../../vbc_sdk/_internal/objects/notifications';\nimport { AccountsFormComponent } from './accounts-form/accounts-form.component';\nimport { SettingsFormComponent } from './settings-form/settings-form.component';\nimport { FeatureFlagService } from '@galaxy/partner';\n\nenum Tab {\n PERSONAL = 'Personal',\n ACCOUNT = 'Account',\n}\n\nconst SHOW_IN_BUSINESS_APP_FLAG = 'notifications_in_business_app';\n\n@Component({\n selector: 'atlas-notification-settings',\n templateUrl: './settings.component.html',\n styleUrls: ['./settings.component.scss'],\n})\nexport class SettingsComponent implements OnInit {\n constructor(\n private config: AtlasConfigService,\n private data: AtlasDataService,\n private accountNotificationService: AtlasAccountNotificationService,\n private featureFlagService: FeatureFlagService,\n ) {}\n\n static SETTINGS_DIALOG_PARAM_ID = 'open_notification_settings';\n Tab = Tab;\n @ViewChild('settingsForm') settingsForm: SettingsFormComponent;\n @ViewChild('accountsForm') accountsForm: AccountsFormComponent;\n public partnerId$: Observable;\n public userId$: Observable;\n public accountGroupId$: Observable;\n public redirectUrl$: Observable;\n\n public accountsErrored = false;\n private selected: Tab;\n\n showInBizAppFlag$: Observable = this.config.partnerId$.pipe(\n switchMap((partnerId) => this.featureFlagService.batchGetStatus(partnerId, '', [SHOW_IN_BUSINESS_APP_FLAG])),\n map((features) => {\n return features[SHOW_IN_BUSINESS_APP_FLAG];\n }),\n );\n showNotifications$: Observable = combineLatest([this.data.centerData$, this.showInBizAppFlag$]).pipe(\n map(([centerData, showInBizAppFlag]) => {\n if (centerData.some((center: CenterNavigationItem) => center.centerId !== 'VBC')) {\n // we're not in business app\n return true;\n }\n return showInBizAppFlag;\n }),\n );\n\n public showAccountsTab$: Observable = combineLatest([\n this.config.accountId$,\n this.showNotifications$,\n this.accountNotificationService.notificationSections$,\n this.accountNotificationService.notificationSectionsErrors$,\n ]).pipe(\n map(\n ([accountGroupId, showNotifications, notificationSections, notificationSectionsError]: [\n string,\n boolean,\n SectionContainer[],\n HttpErrorResponse | null,\n ]) => {\n const showNotificationSection =\n !!notificationSections || (notificationSectionsError && notificationSectionsError.status !== 404);\n return !!accountGroupId && showNotificationSection && showNotifications;\n },\n ),\n );\n\n public showPersonalTab$: Observable = combineLatest([this.config.partnerId$, this.showNotifications$]).pipe(\n map(([partnerId, showNotifications]: [string, boolean]) => !!partnerId && showNotifications),\n );\n\n public showEmptyState$: Observable = combineLatest([this.showAccountsTab$, this.showPersonalTab$]).pipe(\n map(([account, personal]: [boolean, boolean]) => !account && !personal),\n startWith(false),\n );\n\n ngOnInit(): void {\n this.partnerId$ = this.config.partnerId$;\n this.userId$ = this.data.userId$;\n this.accountGroupId$ = this.config.accountId$;\n this.redirectUrl$ = combineLatest([this.accountGroupId$, this.userId$, this.data.centerData$]).pipe(\n map(([agid, uid, centerData]) => {\n const businessAppData = centerData.find((center: CenterNavigationItem) => center.name === 'Business App');\n if (businessAppData) {\n return (\n businessAppData.entryUrl + '&nextUrl=' + '/account/location/' + agid + '/settings/notifications/' + uid\n );\n } else {\n return null;\n }\n }),\n shareReplay(1),\n );\n\n combineLatest([this.showAccountsTab$, this.showPersonalTab$])\n .pipe(\n take(1),\n switchMap(([account, personal]) => {\n if (account && !personal) {\n return this.redirectUrl$;\n } else {\n return of(null);\n }\n }),\n )\n .subscribe((url) => {\n if (url) {\n window.location.href = url;\n }\n });\n }\n\n save(): void {\n if (this.selected === Tab.PERSONAL) {\n this.settingsForm.save();\n return;\n }\n this.accountsForm.save();\n }\n\n reset(): void {\n if (this.selected === Tab.PERSONAL) {\n this.settingsForm.reset();\n return;\n }\n this.accountsForm.reset();\n }\n\n disableActions(): boolean {\n if (this.selected === Tab.PERSONAL) {\n return this.settingsForm ? !this.settingsForm.dirty() : true;\n }\n return this.accountsForm ? !this.accountsForm.dirty() : true;\n }\n\n isSaving(): boolean {\n if (this.selected === Tab.PERSONAL) {\n return this.settingsForm ? this.settingsForm.saving : false;\n }\n return this.accountsForm ? this.accountsForm.saving : false;\n }\n\n setSelected(selected: string): void {\n this.selected = selected as Tab;\n }\n}\n","\n \n {{ 'NOTIFICATIONS.TITLE' | translate }}\n \n \n
    \n
    \n \n \n \n \n \n \n \n {{ 'NOTIFICATIONS.ACTIONS.CONFIGURE_SMB_SETTING' | translate }}\n \n \n \n \n \n \n {{ 'NOTIFICATIONS.EMPTY_NOTIFICATION_SETTING.TITLE' | translate }}\n \n

    {{ 'NOTIFICATIONS.EMPTY_NOTIFICATION_SETTING.TEXT' | translate }}

    \n
    \n
    \n
    \n
    \n
    \n
    \n \n \n refresh\n {{ 'NOTIFICATIONS.ACTIONS.DISCARD_CHANGES' | translate }}\n \n \n {{ 'NOTIFICATIONS.ACTIONS.SAVE' | translate }}\n \n \n
    \n","import { Injectable } from '@angular/core';\nimport { Theming } from '@vendasta/atlas';\n\n@Injectable({ providedIn: 'root' })\nexport class AtlasThemingService {\n public set theming(value: Theming) {\n if (!value) {\n return;\n }\n this.themingWrapper.style.setProperty('--themingPrimaryColor', value.primaryColor);\n this.themingWrapper.style.setProperty('--themingPrimaryHoverColor', value.primaryHoverColor);\n this.themingWrapper.style.setProperty('--themingPrimaryActiveColor', value.primaryActiveColor);\n this.themingWrapper.style.setProperty('--themingSecondaryColor', value.secondaryColor);\n this.themingWrapper.style.setProperty('--themingSecondaryHoverColor', value.secondaryHoverColor);\n this.themingWrapper.style.setProperty('--themingSecondaryActiveColor', value.secondaryActiveColor);\n this.themingWrapper.style.setProperty('--themingFontColor', value.fontColor);\n this.themingWrapper.style.setProperty('--themingFontDisabledColor', value.fontDisabledColor);\n this.themingWrapper.style.setProperty('--themingAccentsColor', value.accentsColor);\n this.themingWrapper.style.setProperty('--themingAccentsActiveColor', value.accentsActiveColor);\n this.themingWrapper.style.setProperty('--themingFocusColor', value.focusColor);\n this.themingWrapper.style.setProperty('--themingBorderColor', value.borderColor);\n }\n\n private themingWrapper = document.querySelector('body');\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject, Observable } from 'rxjs';\n\nimport { CustomUserDropdownItem } from '../user-dropdown/user-dropdown.interface';\n\n@Injectable({ providedIn: 'root' })\nexport class AtlasTopBarService {\n private hideCenters$$: BehaviorSubject = new BehaviorSubject(false);\n public hideCenters$: Observable = this.hideCenters$$.asObservable();\n\n private hideNotifications$$: BehaviorSubject = new BehaviorSubject(false);\n public hideNotifications$: Observable = this.hideNotifications$$.asObservable();\n\n private hideUserDropdown$$: BehaviorSubject = new BehaviorSubject(false);\n public hideUserDropdown$: Observable = this.hideUserDropdown$$.asObservable();\n\n private dropdownItems$$: BehaviorSubject = new BehaviorSubject(\n [],\n );\n public dropdownItems$: Observable = this.dropdownItems$$.asObservable();\n\n private showLanguageSelector$$: BehaviorSubject = new BehaviorSubject(false);\n public showLanguageSelector$: Observable = this.showLanguageSelector$$.asObservable();\n\n public setCenterVisibility(visibility: boolean): void {\n this.hideCenters$$.next(!visibility);\n }\n\n public setNotificationsVisibility(visibility: boolean): void {\n this.hideNotifications$$.next(!visibility);\n }\n\n public setUserDropdownVisibility(visibility: boolean): void {\n this.hideUserDropdown$$.next(!visibility);\n }\n\n public setDropdownItems(dropdownItems: CustomUserDropdownItem[]): void {\n this.dropdownItems$$.next(dropdownItems);\n }\n\n public setLanguageSelectorVisibility(visibility: boolean): void {\n this.showLanguageSelector$$.next(visibility);\n }\n}\n","import { Component } from '@angular/core';\nimport { TranslateLoader, TranslateService } from '@ngx-translate/core';\nimport { combineLatest, Observable, of } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport { AtlasDataService, AtlasLanguageService } from '../../../core/src';\nimport { ModalService } from '../core-components/modal/modal.service';\nimport { AtlasLanguageSelectorModalComponent } from '../language-selector/modal/language-selector-modal.component';\n\nconst USER_LANGUAGE_MODAL: { [key: string]: string } = {\n PROMPT_WITH_BROWSER_LANG:\n 'We noticed your browser language is set to {{browserLang}}, but your user profile language is set to {{userLang}}.',\n PROMPT_WITHOUT_BROWSER_LANG: 'Your user profile language is currently set to {{userLang}}.',\n WANT_TO_SWITCH: \"Would you like to confirm your language preferences? We won't ask again for this device.\",\n USE_BROWSER_LANGUAGE: 'Switch to {{browserLang}}',\n CONFIRM_USER_LANGUAGE: 'Use {{userLang}}',\n SEE_ALL_LANGUAGE_OPTIONS: 'Select another language',\n};\n\n@Component({\n selector: 'atlas-user-language-modal',\n templateUrl: './user-language-modal.component.html',\n styleUrls: ['./user-language-modal.component.scss'],\n})\nexport class AtlasUserLanguageModalComponent {\n public browserLanguage: string;\n public userLanguage$: Observable;\n public switching = false;\n public modalContent$: Observable<{\n userLanguageCode: string;\n promptText: string;\n browserButtonText: string;\n userButtonText: string;\n seeOptionsButtonText: string;\n }>;\n\n constructor(\n private dataService: AtlasDataService,\n private translateService: TranslateService,\n private translateLoader: TranslateLoader,\n public languageService: AtlasLanguageService,\n private modalService: ModalService,\n ) {\n this.browserLanguage = this.languageService.getLanguage();\n this.userLanguage$ = this.dataService.language$;\n this.modalContent$ = combineLatest([\n of(this.browserLanguage),\n this.userLanguage$,\n this.translateLoader.getTranslation(this.browserLanguage),\n this.translateService.stream('LANGUAGE'),\n ]).pipe(\n map(\n ([browserLanguageCode, userLanguageCode, modalTranslations, languageTranslations]: [\n string,\n string,\n any,\n any,\n ]) => {\n let languageNames, browserLanguage, userLanguage;\n if ('LANGUAGE' in modalTranslations) {\n languageNames = modalTranslations['LANGUAGE'];\n } else {\n languageNames = languageTranslations;\n }\n\n if (browserLanguageCode in languageNames) {\n browserLanguage = languageNames[browserLanguageCode];\n }\n if (userLanguageCode in languageNames) {\n userLanguage = languageNames[userLanguageCode];\n }\n if ('USER_LANGUAGE_MODAL' in modalTranslations) {\n modalTranslations = modalTranslations.USER_LANGUAGE_MODAL;\n } else {\n modalTranslations = USER_LANGUAGE_MODAL;\n }\n\n let prompt: string;\n if (browserLanguageCode) {\n prompt = modalTranslations.PROMPT_WITH_BROWSER_LANG.replace('{{userLang}}', userLanguage).replace(\n '{{browserLang}}',\n browserLanguage || browserLanguageCode,\n );\n } else {\n prompt = modalTranslations.PROMPT_WITHOUT_BROWSER_LANG.replace(\n '{{userLang}}',\n userLanguage || userLanguageCode,\n );\n }\n\n return {\n userLanguageCode: userLanguageCode,\n promptText: `${prompt} ${modalTranslations.WANT_TO_SWITCH}`,\n browserButtonText: (modalTranslations.USE_BROWSER_LANGUAGE as string).replace(\n '{{browserLang}}',\n browserLanguage || browserLanguageCode,\n ),\n userButtonText: (modalTranslations.CONFIRM_USER_LANGUAGE as string).replace(\n '{{userLang}}',\n userLanguage || userLanguageCode,\n ),\n seeOptionsButtonText: modalTranslations.SEE_ALL_LANGUAGE_OPTIONS as string,\n };\n },\n ),\n );\n }\n\n public setBrowserLang(): void {\n this.switchLanguage(this.browserLanguage, true);\n }\n\n public confirmUserLang(language: string): void {\n this.switchLanguage(language, false);\n }\n\n public switchLanguage(language: string, updateConfig?: boolean): void {\n this.switching = true;\n this.languageService.setLanguage(language, updateConfig);\n }\n\n public openLanguageSelector(): void {\n this.modalService.openInformational(AtlasLanguageSelectorModalComponent);\n }\n}\n","\n \n \n

    \n
    \n \n \n {{ modalContent.browserButtonText }}\n \n \n {{ modalContent.userButtonText }}\n \n \n {{ modalContent.seeOptionsButtonText }}\n \n \n
    \n \n \n \n
    \n","import { Injectable } from '@angular/core';\nimport { combineLatest, take } from 'rxjs';\nimport { AtlasDataService, AtlasLanguageService } from '../../../core/src';\nimport { ModalService } from '../core-components/modal/modal.service';\nimport { AtlasUserLanguageModalComponent } from './user-language-modal.component';\n\n@Injectable()\nexport class AtlasUserLanguageModalService {\n constructor(\n private dataService: AtlasDataService,\n private languageService: AtlasLanguageService,\n private modalService: ModalService,\n ) {}\n\n public init(): void {\n combineLatest([this.dataService.language$, this.dataService.impersonateeUsername$])\n .pipe(take(1))\n .subscribe(([userLanguage, impersonateeUsername]) => {\n const browserLanguage = this.languageService.getLanguage();\n if (\n !impersonateeUsername &&\n (!browserLanguage || browserLanguage.toLowerCase() !== userLanguage.toLowerCase())\n ) {\n this.modalService.openInformational(AtlasUserLanguageModalComponent);\n }\n });\n }\n}\n","import { ErrorFactory, isBrowserExtension, isMobileCordova, isReactNative, FirebaseError, querystring, getModularInstance, base64Decode, getUA, isIE, createSubscribe, deepEqual, querystringDecode, extractQuerystring, isEmpty, getExperimentalSetting, getDefaultEmulatorHost } from '@firebase/util';\nimport { SDK_VERSION, _getProvider, _registerComponent, registerVersion, getApp } from '@firebase/app';\nimport { Logger, LogLevel } from '@firebase/logger';\nimport { __rest } from 'tslib';\nimport { Component } from '@firebase/component';\n\n/**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * An enum of factors that may be used for multifactor authentication.\r\n *\r\n * @public\r\n */\nconst FactorId = {\n /** Phone as second factor */\n PHONE: 'phone',\n TOTP: 'totp'\n};\n/**\r\n * Enumeration of supported providers.\r\n *\r\n * @public\r\n */\nconst ProviderId = {\n /** Facebook provider ID */\n FACEBOOK: 'facebook.com',\n /** GitHub provider ID */\n GITHUB: 'github.com',\n /** Google provider ID */\n GOOGLE: 'google.com',\n /** Password provider */\n PASSWORD: 'password',\n /** Phone provider */\n PHONE: 'phone',\n /** Twitter provider ID */\n TWITTER: 'twitter.com'\n};\n/**\r\n * Enumeration of supported sign-in methods.\r\n *\r\n * @public\r\n */\nconst SignInMethod = {\n /** Email link sign in method */\n EMAIL_LINK: 'emailLink',\n /** Email/password sign in method */\n EMAIL_PASSWORD: 'password',\n /** Facebook sign in method */\n FACEBOOK: 'facebook.com',\n /** GitHub sign in method */\n GITHUB: 'github.com',\n /** Google sign in method */\n GOOGLE: 'google.com',\n /** Phone sign in method */\n PHONE: 'phone',\n /** Twitter sign in method */\n TWITTER: 'twitter.com'\n};\n/**\r\n * Enumeration of supported operation types.\r\n *\r\n * @public\r\n */\nconst OperationType = {\n /** Operation involving linking an additional provider to an already signed-in user. */\n LINK: 'link',\n /** Operation involving using a provider to reauthenticate an already signed-in user. */\n REAUTHENTICATE: 'reauthenticate',\n /** Operation involving signing in a user. */\n SIGN_IN: 'signIn'\n};\n/**\r\n * An enumeration of the possible email action types.\r\n *\r\n * @public\r\n */\nconst ActionCodeOperation = {\n /** The email link sign-in action. */\n EMAIL_SIGNIN: 'EMAIL_SIGNIN',\n /** The password reset action. */\n PASSWORD_RESET: 'PASSWORD_RESET',\n /** The email revocation action. */\n RECOVER_EMAIL: 'RECOVER_EMAIL',\n /** The revert second factor addition email action. */\n REVERT_SECOND_FACTOR_ADDITION: 'REVERT_SECOND_FACTOR_ADDITION',\n /** The revert second factor addition email action. */\n VERIFY_AND_CHANGE_EMAIL: 'VERIFY_AND_CHANGE_EMAIL',\n /** The email verification action. */\n VERIFY_EMAIL: 'VERIFY_EMAIL'\n};\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _debugErrorMap() {\n return {\n [\"admin-restricted-operation\" /* AuthErrorCode.ADMIN_ONLY_OPERATION */]: 'This operation is restricted to administrators only.',\n [\"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */]: '',\n [\"app-not-authorized\" /* AuthErrorCode.APP_NOT_AUTHORIZED */]: \"This app, identified by the domain where it's hosted, is not \" + 'authorized to use Firebase Authentication with the provided API key. ' + 'Review your key configuration in the Google API console.',\n [\"app-not-installed\" /* AuthErrorCode.APP_NOT_INSTALLED */]: 'The requested mobile application corresponding to the identifier (' + 'Android package name or iOS bundle ID) provided is not installed on ' + 'this device.',\n [\"captcha-check-failed\" /* AuthErrorCode.CAPTCHA_CHECK_FAILED */]: 'The reCAPTCHA response token provided is either invalid, expired, ' + 'already used or the domain associated with it does not match the list ' + 'of whitelisted domains.',\n [\"code-expired\" /* AuthErrorCode.CODE_EXPIRED */]: 'The SMS code has expired. Please re-send the verification code to try ' + 'again.',\n [\"cordova-not-ready\" /* AuthErrorCode.CORDOVA_NOT_READY */]: 'Cordova framework is not ready.',\n [\"cors-unsupported\" /* AuthErrorCode.CORS_UNSUPPORTED */]: 'This browser is not supported.',\n [\"credential-already-in-use\" /* AuthErrorCode.CREDENTIAL_ALREADY_IN_USE */]: 'This credential is already associated with a different user account.',\n [\"custom-token-mismatch\" /* AuthErrorCode.CREDENTIAL_MISMATCH */]: 'The custom token corresponds to a different audience.',\n [\"requires-recent-login\" /* AuthErrorCode.CREDENTIAL_TOO_OLD_LOGIN_AGAIN */]: 'This operation is sensitive and requires recent authentication. Log in ' + 'again before retrying this request.',\n [\"dependent-sdk-initialized-before-auth\" /* AuthErrorCode.DEPENDENT_SDK_INIT_BEFORE_AUTH */]: 'Another Firebase SDK was initialized and is trying to use Auth before Auth is ' + 'initialized. Please be sure to call `initializeAuth` or `getAuth` before ' + 'starting any other Firebase SDK.',\n [\"dynamic-link-not-activated\" /* AuthErrorCode.DYNAMIC_LINK_NOT_ACTIVATED */]: 'Please activate Dynamic Links in the Firebase Console and agree to the terms and ' + 'conditions.',\n [\"email-change-needs-verification\" /* AuthErrorCode.EMAIL_CHANGE_NEEDS_VERIFICATION */]: 'Multi-factor users must always have a verified email.',\n [\"email-already-in-use\" /* AuthErrorCode.EMAIL_EXISTS */]: 'The email address is already in use by another account.',\n [\"emulator-config-failed\" /* AuthErrorCode.EMULATOR_CONFIG_FAILED */]: 'Auth instance has already been used to make a network call. Auth can ' + 'no longer be configured to use the emulator. Try calling ' + '\"connectAuthEmulator()\" sooner.',\n [\"expired-action-code\" /* AuthErrorCode.EXPIRED_OOB_CODE */]: 'The action code has expired.',\n [\"cancelled-popup-request\" /* AuthErrorCode.EXPIRED_POPUP_REQUEST */]: 'This operation has been cancelled due to another conflicting popup being opened.',\n [\"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */]: 'An internal AuthError has occurred.',\n [\"invalid-app-credential\" /* AuthErrorCode.INVALID_APP_CREDENTIAL */]: 'The phone verification request contains an invalid application verifier.' + ' The reCAPTCHA token response is either invalid or expired.',\n [\"invalid-app-id\" /* AuthErrorCode.INVALID_APP_ID */]: 'The mobile app identifier is not registed for the current project.',\n [\"invalid-user-token\" /* AuthErrorCode.INVALID_AUTH */]: \"This user's credential isn't valid for this project. This can happen \" + \"if the user's token has been tampered with, or if the user isn't for \" + 'the project associated with this API key.',\n [\"invalid-auth-event\" /* AuthErrorCode.INVALID_AUTH_EVENT */]: 'An internal AuthError has occurred.',\n [\"invalid-verification-code\" /* AuthErrorCode.INVALID_CODE */]: 'The SMS verification code used to create the phone auth credential is ' + 'invalid. Please resend the verification code sms and be sure to use the ' + 'verification code provided by the user.',\n [\"invalid-continue-uri\" /* AuthErrorCode.INVALID_CONTINUE_URI */]: 'The continue URL provided in the request is invalid.',\n [\"invalid-cordova-configuration\" /* AuthErrorCode.INVALID_CORDOVA_CONFIGURATION */]: 'The following Cordova plugins must be installed to enable OAuth sign-in: ' + 'cordova-plugin-buildinfo, cordova-universal-links-plugin, ' + 'cordova-plugin-browsertab, cordova-plugin-inappbrowser and ' + 'cordova-plugin-customurlscheme.',\n [\"invalid-custom-token\" /* AuthErrorCode.INVALID_CUSTOM_TOKEN */]: 'The custom token format is incorrect. Please check the documentation.',\n [\"invalid-dynamic-link-domain\" /* AuthErrorCode.INVALID_DYNAMIC_LINK_DOMAIN */]: 'The provided dynamic link domain is not configured or authorized for the current project.',\n [\"invalid-email\" /* AuthErrorCode.INVALID_EMAIL */]: 'The email address is badly formatted.',\n [\"invalid-emulator-scheme\" /* AuthErrorCode.INVALID_EMULATOR_SCHEME */]: 'Emulator URL must start with a valid scheme (http:// or https://).',\n [\"invalid-api-key\" /* AuthErrorCode.INVALID_API_KEY */]: 'Your API key is invalid, please check you have copied it correctly.',\n [\"invalid-cert-hash\" /* AuthErrorCode.INVALID_CERT_HASH */]: 'The SHA-1 certificate hash provided is invalid.',\n [\"invalid-credential\" /* AuthErrorCode.INVALID_CREDENTIAL */]: 'The supplied auth credential is incorrect, malformed or has expired.',\n [\"invalid-message-payload\" /* AuthErrorCode.INVALID_MESSAGE_PAYLOAD */]: 'The email template corresponding to this action contains invalid characters in its message. ' + 'Please fix by going to the Auth email templates section in the Firebase Console.',\n [\"invalid-multi-factor-session\" /* AuthErrorCode.INVALID_MFA_SESSION */]: 'The request does not contain a valid proof of first factor successful sign-in.',\n [\"invalid-oauth-provider\" /* AuthErrorCode.INVALID_OAUTH_PROVIDER */]: 'EmailAuthProvider is not supported for this operation. This operation ' + 'only supports OAuth providers.',\n [\"invalid-oauth-client-id\" /* AuthErrorCode.INVALID_OAUTH_CLIENT_ID */]: 'The OAuth client ID provided is either invalid or does not match the ' + 'specified API key.',\n [\"unauthorized-domain\" /* AuthErrorCode.INVALID_ORIGIN */]: 'This domain is not authorized for OAuth operations for your Firebase ' + 'project. Edit the list of authorized domains from the Firebase console.',\n [\"invalid-action-code\" /* AuthErrorCode.INVALID_OOB_CODE */]: 'The action code is invalid. This can happen if the code is malformed, ' + 'expired, or has already been used.',\n [\"wrong-password\" /* AuthErrorCode.INVALID_PASSWORD */]: 'The password is invalid or the user does not have a password.',\n [\"invalid-persistence-type\" /* AuthErrorCode.INVALID_PERSISTENCE */]: 'The specified persistence type is invalid. It can only be local, session or none.',\n [\"invalid-phone-number\" /* AuthErrorCode.INVALID_PHONE_NUMBER */]: 'The format of the phone number provided is incorrect. Please enter the ' + 'phone number in a format that can be parsed into E.164 format. E.164 ' + 'phone numbers are written in the format [+][country code][subscriber ' + 'number including area code].',\n [\"invalid-provider-id\" /* AuthErrorCode.INVALID_PROVIDER_ID */]: 'The specified provider ID is invalid.',\n [\"invalid-recipient-email\" /* AuthErrorCode.INVALID_RECIPIENT_EMAIL */]: 'The email corresponding to this action failed to send as the provided ' + 'recipient email address is invalid.',\n [\"invalid-sender\" /* AuthErrorCode.INVALID_SENDER */]: 'The email template corresponding to this action contains an invalid sender email or name. ' + 'Please fix by going to the Auth email templates section in the Firebase Console.',\n [\"invalid-verification-id\" /* AuthErrorCode.INVALID_SESSION_INFO */]: 'The verification ID used to create the phone auth credential is invalid.',\n [\"invalid-tenant-id\" /* AuthErrorCode.INVALID_TENANT_ID */]: \"The Auth instance's tenant ID is invalid.\",\n [\"login-blocked\" /* AuthErrorCode.LOGIN_BLOCKED */]: 'Login blocked by user-provided method: {$originalMessage}',\n [\"missing-android-pkg-name\" /* AuthErrorCode.MISSING_ANDROID_PACKAGE_NAME */]: 'An Android Package Name must be provided if the Android App is required to be installed.',\n [\"auth-domain-config-required\" /* AuthErrorCode.MISSING_AUTH_DOMAIN */]: 'Be sure to include authDomain when calling firebase.initializeApp(), ' + 'by following the instructions in the Firebase console.',\n [\"missing-app-credential\" /* AuthErrorCode.MISSING_APP_CREDENTIAL */]: 'The phone verification request is missing an application verifier ' + 'assertion. A reCAPTCHA response token needs to be provided.',\n [\"missing-verification-code\" /* AuthErrorCode.MISSING_CODE */]: 'The phone auth credential was created with an empty SMS verification code.',\n [\"missing-continue-uri\" /* AuthErrorCode.MISSING_CONTINUE_URI */]: 'A continue URL must be provided in the request.',\n [\"missing-iframe-start\" /* AuthErrorCode.MISSING_IFRAME_START */]: 'An internal AuthError has occurred.',\n [\"missing-ios-bundle-id\" /* AuthErrorCode.MISSING_IOS_BUNDLE_ID */]: 'An iOS Bundle ID must be provided if an App Store ID is provided.',\n [\"missing-or-invalid-nonce\" /* AuthErrorCode.MISSING_OR_INVALID_NONCE */]: 'The request does not contain a valid nonce. This can occur if the ' + 'SHA-256 hash of the provided raw nonce does not match the hashed nonce ' + 'in the ID token payload.',\n [\"missing-password\" /* AuthErrorCode.MISSING_PASSWORD */]: 'A non-empty password must be provided',\n [\"missing-multi-factor-info\" /* AuthErrorCode.MISSING_MFA_INFO */]: 'No second factor identifier is provided.',\n [\"missing-multi-factor-session\" /* AuthErrorCode.MISSING_MFA_SESSION */]: 'The request is missing proof of first factor successful sign-in.',\n [\"missing-phone-number\" /* AuthErrorCode.MISSING_PHONE_NUMBER */]: 'To send verification codes, provide a phone number for the recipient.',\n [\"missing-verification-id\" /* AuthErrorCode.MISSING_SESSION_INFO */]: 'The phone auth credential was created with an empty verification ID.',\n [\"app-deleted\" /* AuthErrorCode.MODULE_DESTROYED */]: 'This instance of FirebaseApp has been deleted.',\n [\"multi-factor-info-not-found\" /* AuthErrorCode.MFA_INFO_NOT_FOUND */]: 'The user does not have a second factor matching the identifier provided.',\n [\"multi-factor-auth-required\" /* AuthErrorCode.MFA_REQUIRED */]: 'Proof of ownership of a second factor is required to complete sign-in.',\n [\"account-exists-with-different-credential\" /* AuthErrorCode.NEED_CONFIRMATION */]: 'An account already exists with the same email address but different ' + 'sign-in credentials. Sign in using a provider associated with this ' + 'email address.',\n [\"network-request-failed\" /* AuthErrorCode.NETWORK_REQUEST_FAILED */]: 'A network AuthError (such as timeout, interrupted connection or unreachable host) has occurred.',\n [\"no-auth-event\" /* AuthErrorCode.NO_AUTH_EVENT */]: 'An internal AuthError has occurred.',\n [\"no-such-provider\" /* AuthErrorCode.NO_SUCH_PROVIDER */]: 'User was not linked to an account with the given provider.',\n [\"null-user\" /* AuthErrorCode.NULL_USER */]: 'A null user object was provided as the argument for an operation which ' + 'requires a non-null user object.',\n [\"operation-not-allowed\" /* AuthErrorCode.OPERATION_NOT_ALLOWED */]: 'The given sign-in provider is disabled for this Firebase project. ' + 'Enable it in the Firebase console, under the sign-in method tab of the ' + 'Auth section.',\n [\"operation-not-supported-in-this-environment\" /* AuthErrorCode.OPERATION_NOT_SUPPORTED */]: 'This operation is not supported in the environment this application is ' + 'running on. \"location.protocol\" must be http, https or chrome-extension' + ' and web storage must be enabled.',\n [\"popup-blocked\" /* AuthErrorCode.POPUP_BLOCKED */]: 'Unable to establish a connection with the popup. It may have been blocked by the browser.',\n [\"popup-closed-by-user\" /* AuthErrorCode.POPUP_CLOSED_BY_USER */]: 'The popup has been closed by the user before finalizing the operation.',\n [\"provider-already-linked\" /* AuthErrorCode.PROVIDER_ALREADY_LINKED */]: 'User can only be linked to one identity for the given provider.',\n [\"quota-exceeded\" /* AuthErrorCode.QUOTA_EXCEEDED */]: \"The project's quota for this operation has been exceeded.\",\n [\"redirect-cancelled-by-user\" /* AuthErrorCode.REDIRECT_CANCELLED_BY_USER */]: 'The redirect operation has been cancelled by the user before finalizing.',\n [\"redirect-operation-pending\" /* AuthErrorCode.REDIRECT_OPERATION_PENDING */]: 'A redirect sign-in operation is already pending.',\n [\"rejected-credential\" /* AuthErrorCode.REJECTED_CREDENTIAL */]: 'The request contains malformed or mismatching credentials.',\n [\"second-factor-already-in-use\" /* AuthErrorCode.SECOND_FACTOR_ALREADY_ENROLLED */]: 'The second factor is already enrolled on this account.',\n [\"maximum-second-factor-count-exceeded\" /* AuthErrorCode.SECOND_FACTOR_LIMIT_EXCEEDED */]: 'The maximum allowed number of second factors on a user has been exceeded.',\n [\"tenant-id-mismatch\" /* AuthErrorCode.TENANT_ID_MISMATCH */]: \"The provided tenant ID does not match the Auth instance's tenant ID\",\n [\"timeout\" /* AuthErrorCode.TIMEOUT */]: 'The operation has timed out.',\n [\"user-token-expired\" /* AuthErrorCode.TOKEN_EXPIRED */]: \"The user's credential is no longer valid. The user must sign in again.\",\n [\"too-many-requests\" /* AuthErrorCode.TOO_MANY_ATTEMPTS_TRY_LATER */]: 'We have blocked all requests from this device due to unusual activity. ' + 'Try again later.',\n [\"unauthorized-continue-uri\" /* AuthErrorCode.UNAUTHORIZED_DOMAIN */]: 'The domain of the continue URL is not whitelisted. Please whitelist ' + 'the domain in the Firebase console.',\n [\"unsupported-first-factor\" /* AuthErrorCode.UNSUPPORTED_FIRST_FACTOR */]: 'Enrolling a second factor or signing in with a multi-factor account requires sign-in with a supported first factor.',\n [\"unsupported-persistence-type\" /* AuthErrorCode.UNSUPPORTED_PERSISTENCE */]: 'The current environment does not support the specified persistence type.',\n [\"unsupported-tenant-operation\" /* AuthErrorCode.UNSUPPORTED_TENANT_OPERATION */]: 'This operation is not supported in a multi-tenant context.',\n [\"unverified-email\" /* AuthErrorCode.UNVERIFIED_EMAIL */]: 'The operation requires a verified email.',\n [\"user-cancelled\" /* AuthErrorCode.USER_CANCELLED */]: 'The user did not grant your application the permissions it requested.',\n [\"user-not-found\" /* AuthErrorCode.USER_DELETED */]: 'There is no user record corresponding to this identifier. The user may ' + 'have been deleted.',\n [\"user-disabled\" /* AuthErrorCode.USER_DISABLED */]: 'The user account has been disabled by an administrator.',\n [\"user-mismatch\" /* AuthErrorCode.USER_MISMATCH */]: 'The supplied credentials do not correspond to the previously signed in user.',\n [\"user-signed-out\" /* AuthErrorCode.USER_SIGNED_OUT */]: '',\n [\"weak-password\" /* AuthErrorCode.WEAK_PASSWORD */]: 'The password must be 6 characters long or more.',\n [\"web-storage-unsupported\" /* AuthErrorCode.WEB_STORAGE_UNSUPPORTED */]: 'This browser is not supported or 3rd party cookies and data may be disabled.',\n [\"already-initialized\" /* AuthErrorCode.ALREADY_INITIALIZED */]: 'initializeAuth() has already been called with ' + 'different options. To avoid this error, call initializeAuth() with the ' + 'same options as when it was originally called, or call getAuth() to return the' + ' already initialized instance.',\n [\"missing-recaptcha-token\" /* AuthErrorCode.MISSING_RECAPTCHA_TOKEN */]: 'The reCAPTCHA token is missing when sending request to the backend.',\n [\"invalid-recaptcha-token\" /* AuthErrorCode.INVALID_RECAPTCHA_TOKEN */]: 'The reCAPTCHA token is invalid when sending request to the backend.',\n [\"invalid-recaptcha-action\" /* AuthErrorCode.INVALID_RECAPTCHA_ACTION */]: 'The reCAPTCHA action is invalid when sending request to the backend.',\n [\"recaptcha-not-enabled\" /* AuthErrorCode.RECAPTCHA_NOT_ENABLED */]: 'reCAPTCHA Enterprise integration is not enabled for this project.',\n [\"missing-client-type\" /* AuthErrorCode.MISSING_CLIENT_TYPE */]: 'The reCAPTCHA client type is missing when sending request to the backend.',\n [\"missing-recaptcha-version\" /* AuthErrorCode.MISSING_RECAPTCHA_VERSION */]: 'The reCAPTCHA version is missing when sending request to the backend.',\n [\"invalid-req-type\" /* AuthErrorCode.INVALID_REQ_TYPE */]: 'Invalid request parameters.',\n [\"invalid-recaptcha-version\" /* AuthErrorCode.INVALID_RECAPTCHA_VERSION */]: 'The reCAPTCHA version is invalid when sending request to the backend.',\n [\"unsupported-password-policy-schema-version\" /* AuthErrorCode.UNSUPPORTED_PASSWORD_POLICY_SCHEMA_VERSION */]: 'The password policy received from the backend uses a schema version that is not supported by this version of the Firebase SDK.',\n [\"password-does-not-meet-requirements\" /* AuthErrorCode.PASSWORD_DOES_NOT_MEET_REQUIREMENTS */]: 'The password does not meet the requirements.'\n };\n}\nfunction _prodErrorMap() {\n // We will include this one message in the prod error map since by the very\n // nature of this error, developers will never be able to see the message\n // using the debugErrorMap (which is installed during auth initialization).\n return {\n [\"dependent-sdk-initialized-before-auth\" /* AuthErrorCode.DEPENDENT_SDK_INIT_BEFORE_AUTH */]: 'Another Firebase SDK was initialized and is trying to use Auth before Auth is ' + 'initialized. Please be sure to call `initializeAuth` or `getAuth` before ' + 'starting any other Firebase SDK.'\n };\n}\n/**\r\n * A verbose error map with detailed descriptions for most error codes.\r\n *\r\n * See discussion at {@link AuthErrorMap}\r\n *\r\n * @public\r\n */\nconst debugErrorMap = _debugErrorMap;\n/**\r\n * A minimal error map with all verbose error messages stripped.\r\n *\r\n * See discussion at {@link AuthErrorMap}\r\n *\r\n * @public\r\n */\nconst prodErrorMap = _prodErrorMap;\nconst _DEFAULT_AUTH_ERROR_FACTORY = new ErrorFactory('auth', 'Firebase', _prodErrorMap());\n/**\r\n * A map of potential `Auth` error codes, for easier comparison with errors\r\n * thrown by the SDK.\r\n *\r\n * @remarks\r\n * Note that you can't tree-shake individual keys\r\n * in the map, so by using the map you might substantially increase your\r\n * bundle size.\r\n *\r\n * @public\r\n */\nconst AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY = {\n ADMIN_ONLY_OPERATION: 'auth/admin-restricted-operation',\n ARGUMENT_ERROR: 'auth/argument-error',\n APP_NOT_AUTHORIZED: 'auth/app-not-authorized',\n APP_NOT_INSTALLED: 'auth/app-not-installed',\n CAPTCHA_CHECK_FAILED: 'auth/captcha-check-failed',\n CODE_EXPIRED: 'auth/code-expired',\n CORDOVA_NOT_READY: 'auth/cordova-not-ready',\n CORS_UNSUPPORTED: 'auth/cors-unsupported',\n CREDENTIAL_ALREADY_IN_USE: 'auth/credential-already-in-use',\n CREDENTIAL_MISMATCH: 'auth/custom-token-mismatch',\n CREDENTIAL_TOO_OLD_LOGIN_AGAIN: 'auth/requires-recent-login',\n DEPENDENT_SDK_INIT_BEFORE_AUTH: 'auth/dependent-sdk-initialized-before-auth',\n DYNAMIC_LINK_NOT_ACTIVATED: 'auth/dynamic-link-not-activated',\n EMAIL_CHANGE_NEEDS_VERIFICATION: 'auth/email-change-needs-verification',\n EMAIL_EXISTS: 'auth/email-already-in-use',\n EMULATOR_CONFIG_FAILED: 'auth/emulator-config-failed',\n EXPIRED_OOB_CODE: 'auth/expired-action-code',\n EXPIRED_POPUP_REQUEST: 'auth/cancelled-popup-request',\n INTERNAL_ERROR: 'auth/internal-error',\n INVALID_API_KEY: 'auth/invalid-api-key',\n INVALID_APP_CREDENTIAL: 'auth/invalid-app-credential',\n INVALID_APP_ID: 'auth/invalid-app-id',\n INVALID_AUTH: 'auth/invalid-user-token',\n INVALID_AUTH_EVENT: 'auth/invalid-auth-event',\n INVALID_CERT_HASH: 'auth/invalid-cert-hash',\n INVALID_CODE: 'auth/invalid-verification-code',\n INVALID_CONTINUE_URI: 'auth/invalid-continue-uri',\n INVALID_CORDOVA_CONFIGURATION: 'auth/invalid-cordova-configuration',\n INVALID_CUSTOM_TOKEN: 'auth/invalid-custom-token',\n INVALID_DYNAMIC_LINK_DOMAIN: 'auth/invalid-dynamic-link-domain',\n INVALID_EMAIL: 'auth/invalid-email',\n INVALID_EMULATOR_SCHEME: 'auth/invalid-emulator-scheme',\n INVALID_IDP_RESPONSE: 'auth/invalid-credential',\n INVALID_LOGIN_CREDENTIALS: 'auth/invalid-credential',\n INVALID_MESSAGE_PAYLOAD: 'auth/invalid-message-payload',\n INVALID_MFA_SESSION: 'auth/invalid-multi-factor-session',\n INVALID_OAUTH_CLIENT_ID: 'auth/invalid-oauth-client-id',\n INVALID_OAUTH_PROVIDER: 'auth/invalid-oauth-provider',\n INVALID_OOB_CODE: 'auth/invalid-action-code',\n INVALID_ORIGIN: 'auth/unauthorized-domain',\n INVALID_PASSWORD: 'auth/wrong-password',\n INVALID_PERSISTENCE: 'auth/invalid-persistence-type',\n INVALID_PHONE_NUMBER: 'auth/invalid-phone-number',\n INVALID_PROVIDER_ID: 'auth/invalid-provider-id',\n INVALID_RECIPIENT_EMAIL: 'auth/invalid-recipient-email',\n INVALID_SENDER: 'auth/invalid-sender',\n INVALID_SESSION_INFO: 'auth/invalid-verification-id',\n INVALID_TENANT_ID: 'auth/invalid-tenant-id',\n MFA_INFO_NOT_FOUND: 'auth/multi-factor-info-not-found',\n MFA_REQUIRED: 'auth/multi-factor-auth-required',\n MISSING_ANDROID_PACKAGE_NAME: 'auth/missing-android-pkg-name',\n MISSING_APP_CREDENTIAL: 'auth/missing-app-credential',\n MISSING_AUTH_DOMAIN: 'auth/auth-domain-config-required',\n MISSING_CODE: 'auth/missing-verification-code',\n MISSING_CONTINUE_URI: 'auth/missing-continue-uri',\n MISSING_IFRAME_START: 'auth/missing-iframe-start',\n MISSING_IOS_BUNDLE_ID: 'auth/missing-ios-bundle-id',\n MISSING_OR_INVALID_NONCE: 'auth/missing-or-invalid-nonce',\n MISSING_MFA_INFO: 'auth/missing-multi-factor-info',\n MISSING_MFA_SESSION: 'auth/missing-multi-factor-session',\n MISSING_PHONE_NUMBER: 'auth/missing-phone-number',\n MISSING_SESSION_INFO: 'auth/missing-verification-id',\n MODULE_DESTROYED: 'auth/app-deleted',\n NEED_CONFIRMATION: 'auth/account-exists-with-different-credential',\n NETWORK_REQUEST_FAILED: 'auth/network-request-failed',\n NULL_USER: 'auth/null-user',\n NO_AUTH_EVENT: 'auth/no-auth-event',\n NO_SUCH_PROVIDER: 'auth/no-such-provider',\n OPERATION_NOT_ALLOWED: 'auth/operation-not-allowed',\n OPERATION_NOT_SUPPORTED: 'auth/operation-not-supported-in-this-environment',\n POPUP_BLOCKED: 'auth/popup-blocked',\n POPUP_CLOSED_BY_USER: 'auth/popup-closed-by-user',\n PROVIDER_ALREADY_LINKED: 'auth/provider-already-linked',\n QUOTA_EXCEEDED: 'auth/quota-exceeded',\n REDIRECT_CANCELLED_BY_USER: 'auth/redirect-cancelled-by-user',\n REDIRECT_OPERATION_PENDING: 'auth/redirect-operation-pending',\n REJECTED_CREDENTIAL: 'auth/rejected-credential',\n SECOND_FACTOR_ALREADY_ENROLLED: 'auth/second-factor-already-in-use',\n SECOND_FACTOR_LIMIT_EXCEEDED: 'auth/maximum-second-factor-count-exceeded',\n TENANT_ID_MISMATCH: 'auth/tenant-id-mismatch',\n TIMEOUT: 'auth/timeout',\n TOKEN_EXPIRED: 'auth/user-token-expired',\n TOO_MANY_ATTEMPTS_TRY_LATER: 'auth/too-many-requests',\n UNAUTHORIZED_DOMAIN: 'auth/unauthorized-continue-uri',\n UNSUPPORTED_FIRST_FACTOR: 'auth/unsupported-first-factor',\n UNSUPPORTED_PERSISTENCE: 'auth/unsupported-persistence-type',\n UNSUPPORTED_TENANT_OPERATION: 'auth/unsupported-tenant-operation',\n UNVERIFIED_EMAIL: 'auth/unverified-email',\n USER_CANCELLED: 'auth/user-cancelled',\n USER_DELETED: 'auth/user-not-found',\n USER_DISABLED: 'auth/user-disabled',\n USER_MISMATCH: 'auth/user-mismatch',\n USER_SIGNED_OUT: 'auth/user-signed-out',\n WEAK_PASSWORD: 'auth/weak-password',\n WEB_STORAGE_UNSUPPORTED: 'auth/web-storage-unsupported',\n ALREADY_INITIALIZED: 'auth/already-initialized',\n RECAPTCHA_NOT_ENABLED: 'auth/recaptcha-not-enabled',\n MISSING_RECAPTCHA_TOKEN: 'auth/missing-recaptcha-token',\n INVALID_RECAPTCHA_TOKEN: 'auth/invalid-recaptcha-token',\n INVALID_RECAPTCHA_ACTION: 'auth/invalid-recaptcha-action',\n MISSING_CLIENT_TYPE: 'auth/missing-client-type',\n MISSING_RECAPTCHA_VERSION: 'auth/missing-recaptcha-version',\n INVALID_RECAPTCHA_VERSION: 'auth/invalid-recaptcha-version',\n INVALID_REQ_TYPE: 'auth/invalid-req-type'\n};\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst logClient = new Logger('@firebase/auth');\nfunction _logWarn(msg, ...args) {\n if (logClient.logLevel <= LogLevel.WARN) {\n logClient.warn(`Auth (${SDK_VERSION}): ${msg}`, ...args);\n }\n}\nfunction _logError(msg, ...args) {\n if (logClient.logLevel <= LogLevel.ERROR) {\n logClient.error(`Auth (${SDK_VERSION}): ${msg}`, ...args);\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _fail(authOrCode, ...rest) {\n throw createErrorInternal(authOrCode, ...rest);\n}\nfunction _createError(authOrCode, ...rest) {\n return createErrorInternal(authOrCode, ...rest);\n}\nfunction _errorWithCustomMessage(auth, code, message) {\n const errorMap = Object.assign(Object.assign({}, prodErrorMap()), {\n [code]: message\n });\n const factory = new ErrorFactory('auth', 'Firebase', errorMap);\n return factory.create(code, {\n appName: auth.name\n });\n}\nfunction _assertInstanceOf(auth, object, instance) {\n const constructorInstance = instance;\n if (!(object instanceof constructorInstance)) {\n if (constructorInstance.name !== object.constructor.name) {\n _fail(auth, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n }\n throw _errorWithCustomMessage(auth, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */, `Type of ${object.constructor.name} does not match expected instance.` + `Did you pass a reference from a different Auth SDK?`);\n }\n}\nfunction createErrorInternal(authOrCode, ...rest) {\n if (typeof authOrCode !== 'string') {\n const code = rest[0];\n const fullParams = [...rest.slice(1)];\n if (fullParams[0]) {\n fullParams[0].appName = authOrCode.name;\n }\n return authOrCode._errorFactory.create(code, ...fullParams);\n }\n return _DEFAULT_AUTH_ERROR_FACTORY.create(authOrCode, ...rest);\n}\nfunction _assert(assertion, authOrCode, ...rest) {\n if (!assertion) {\n throw createErrorInternal(authOrCode, ...rest);\n }\n}\n/**\r\n * Unconditionally fails, throwing an internal error with the given message.\r\n *\r\n * @param failure type of failure encountered\r\n * @throws Error\r\n */\nfunction debugFail(failure) {\n // Log the failure in addition to throw an exception, just in case the\n // exception is swallowed.\n const message = `INTERNAL ASSERTION FAILED: ` + failure;\n _logError(message);\n // NOTE: We don't use FirebaseError here because these are internal failures\n // that cannot be handled by the user. (Also it would create a circular\n // dependency between the error and assert modules which doesn't work.)\n throw new Error(message);\n}\n/**\r\n * Fails if the given assertion condition is false, throwing an Error with the\r\n * given message if it did.\r\n *\r\n * @param assertion\r\n * @param message\r\n */\nfunction debugAssert(assertion, message) {\n if (!assertion) {\n debugFail(message);\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _getCurrentUrl() {\n var _a;\n return typeof self !== 'undefined' && ((_a = self.location) === null || _a === void 0 ? void 0 : _a.href) || '';\n}\nfunction _isHttpOrHttps() {\n return _getCurrentScheme() === 'http:' || _getCurrentScheme() === 'https:';\n}\nfunction _getCurrentScheme() {\n var _a;\n return typeof self !== 'undefined' && ((_a = self.location) === null || _a === void 0 ? void 0 : _a.protocol) || null;\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Determine whether the browser is working online\r\n */\nfunction _isOnline() {\n if (typeof navigator !== 'undefined' && navigator && 'onLine' in navigator && typeof navigator.onLine === 'boolean' && (\n // Apply only for traditional web apps and Chrome extensions.\n // This is especially true for Cordova apps which have unreliable\n // navigator.onLine behavior unless cordova-plugin-network-information is\n // installed which overwrites the native navigator.onLine value and\n // defines navigator.connection.\n _isHttpOrHttps() || isBrowserExtension() || 'connection' in navigator)) {\n return navigator.onLine;\n }\n // If we can't determine the state, assume it is online.\n return true;\n}\nfunction _getUserLanguage() {\n if (typeof navigator === 'undefined') {\n return null;\n }\n const navigatorLanguage = navigator;\n return (\n // Most reliable, but only supported in Chrome/Firefox.\n navigatorLanguage.languages && navigatorLanguage.languages[0] ||\n // Supported in most browsers, but returns the language of the browser\n // UI, not the language set in browser settings.\n navigatorLanguage.language ||\n // Couldn't determine language.\n null\n );\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * A structure to help pick between a range of long and short delay durations\r\n * depending on the current environment. In general, the long delay is used for\r\n * mobile environments whereas short delays are used for desktop environments.\r\n */\nclass Delay {\n constructor(shortDelay, longDelay) {\n this.shortDelay = shortDelay;\n this.longDelay = longDelay;\n // Internal error when improperly initialized.\n debugAssert(longDelay > shortDelay, 'Short delay should be less than long delay!');\n this.isMobile = isMobileCordova() || isReactNative();\n }\n get() {\n if (!_isOnline()) {\n // Pick the shorter timeout.\n return Math.min(5000 /* DelayMin.OFFLINE */, this.shortDelay);\n }\n // If running in a mobile environment, return the long delay, otherwise\n // return the short delay.\n // This could be improved in the future to dynamically change based on other\n // variables instead of just reading the current environment.\n return this.isMobile ? this.longDelay : this.shortDelay;\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _emulatorUrl(config, path) {\n debugAssert(config.emulator, 'Emulator should always be set here');\n const {\n url\n } = config.emulator;\n if (!path) {\n return url;\n }\n return `${url}${path.startsWith('/') ? path.slice(1) : path}`;\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nclass FetchProvider {\n static initialize(fetchImpl, headersImpl, responseImpl) {\n this.fetchImpl = fetchImpl;\n if (headersImpl) {\n this.headersImpl = headersImpl;\n }\n if (responseImpl) {\n this.responseImpl = responseImpl;\n }\n }\n static fetch() {\n if (this.fetchImpl) {\n return this.fetchImpl;\n }\n if (typeof self !== 'undefined' && 'fetch' in self) {\n return self.fetch;\n }\n if (typeof globalThis !== 'undefined' && globalThis.fetch) {\n return globalThis.fetch;\n }\n if (typeof fetch !== 'undefined') {\n return fetch;\n }\n debugFail('Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill');\n }\n static headers() {\n if (this.headersImpl) {\n return this.headersImpl;\n }\n if (typeof self !== 'undefined' && 'Headers' in self) {\n return self.Headers;\n }\n if (typeof globalThis !== 'undefined' && globalThis.Headers) {\n return globalThis.Headers;\n }\n if (typeof Headers !== 'undefined') {\n return Headers;\n }\n debugFail('Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill');\n }\n static response() {\n if (this.responseImpl) {\n return this.responseImpl;\n }\n if (typeof self !== 'undefined' && 'Response' in self) {\n return self.Response;\n }\n if (typeof globalThis !== 'undefined' && globalThis.Response) {\n return globalThis.Response;\n }\n if (typeof Response !== 'undefined') {\n return Response;\n }\n debugFail('Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill');\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Map from errors returned by the server to errors to developer visible errors\r\n */\nconst SERVER_ERROR_MAP = {\n // Custom token errors.\n [\"CREDENTIAL_MISMATCH\" /* ServerError.CREDENTIAL_MISMATCH */]: \"custom-token-mismatch\" /* AuthErrorCode.CREDENTIAL_MISMATCH */,\n\n // This can only happen if the SDK sends a bad request.\n [\"MISSING_CUSTOM_TOKEN\" /* ServerError.MISSING_CUSTOM_TOKEN */]: \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */,\n\n // Create Auth URI errors.\n [\"INVALID_IDENTIFIER\" /* ServerError.INVALID_IDENTIFIER */]: \"invalid-email\" /* AuthErrorCode.INVALID_EMAIL */,\n\n // This can only happen if the SDK sends a bad request.\n [\"MISSING_CONTINUE_URI\" /* ServerError.MISSING_CONTINUE_URI */]: \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */,\n\n // Sign in with email and password errors (some apply to sign up too).\n [\"INVALID_PASSWORD\" /* ServerError.INVALID_PASSWORD */]: \"wrong-password\" /* AuthErrorCode.INVALID_PASSWORD */,\n\n // This can only happen if the SDK sends a bad request.\n [\"MISSING_PASSWORD\" /* ServerError.MISSING_PASSWORD */]: \"missing-password\" /* AuthErrorCode.MISSING_PASSWORD */,\n\n // Thrown if Email Enumeration Protection is enabled in the project and the email or password is\n // invalid.\n [\"INVALID_LOGIN_CREDENTIALS\" /* ServerError.INVALID_LOGIN_CREDENTIALS */]: \"invalid-credential\" /* AuthErrorCode.INVALID_CREDENTIAL */,\n\n // Sign up with email and password errors.\n [\"EMAIL_EXISTS\" /* ServerError.EMAIL_EXISTS */]: \"email-already-in-use\" /* AuthErrorCode.EMAIL_EXISTS */,\n [\"PASSWORD_LOGIN_DISABLED\" /* ServerError.PASSWORD_LOGIN_DISABLED */]: \"operation-not-allowed\" /* AuthErrorCode.OPERATION_NOT_ALLOWED */,\n\n // Verify assertion for sign in with credential errors:\n [\"INVALID_IDP_RESPONSE\" /* ServerError.INVALID_IDP_RESPONSE */]: \"invalid-credential\" /* AuthErrorCode.INVALID_CREDENTIAL */,\n [\"INVALID_PENDING_TOKEN\" /* ServerError.INVALID_PENDING_TOKEN */]: \"invalid-credential\" /* AuthErrorCode.INVALID_CREDENTIAL */,\n [\"FEDERATED_USER_ID_ALREADY_LINKED\" /* ServerError.FEDERATED_USER_ID_ALREADY_LINKED */]: \"credential-already-in-use\" /* AuthErrorCode.CREDENTIAL_ALREADY_IN_USE */,\n\n // This can only happen if the SDK sends a bad request.\n [\"MISSING_REQ_TYPE\" /* ServerError.MISSING_REQ_TYPE */]: \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */,\n\n // Send Password reset email errors:\n [\"EMAIL_NOT_FOUND\" /* ServerError.EMAIL_NOT_FOUND */]: \"user-not-found\" /* AuthErrorCode.USER_DELETED */,\n [\"RESET_PASSWORD_EXCEED_LIMIT\" /* ServerError.RESET_PASSWORD_EXCEED_LIMIT */]: \"too-many-requests\" /* AuthErrorCode.TOO_MANY_ATTEMPTS_TRY_LATER */,\n [\"EXPIRED_OOB_CODE\" /* ServerError.EXPIRED_OOB_CODE */]: \"expired-action-code\" /* AuthErrorCode.EXPIRED_OOB_CODE */,\n [\"INVALID_OOB_CODE\" /* ServerError.INVALID_OOB_CODE */]: \"invalid-action-code\" /* AuthErrorCode.INVALID_OOB_CODE */,\n\n // This can only happen if the SDK sends a bad request.\n [\"MISSING_OOB_CODE\" /* ServerError.MISSING_OOB_CODE */]: \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */,\n\n // Operations that require ID token in request:\n [\"CREDENTIAL_TOO_OLD_LOGIN_AGAIN\" /* ServerError.CREDENTIAL_TOO_OLD_LOGIN_AGAIN */]: \"requires-recent-login\" /* AuthErrorCode.CREDENTIAL_TOO_OLD_LOGIN_AGAIN */,\n [\"INVALID_ID_TOKEN\" /* ServerError.INVALID_ID_TOKEN */]: \"invalid-user-token\" /* AuthErrorCode.INVALID_AUTH */,\n [\"TOKEN_EXPIRED\" /* ServerError.TOKEN_EXPIRED */]: \"user-token-expired\" /* AuthErrorCode.TOKEN_EXPIRED */,\n [\"USER_NOT_FOUND\" /* ServerError.USER_NOT_FOUND */]: \"user-token-expired\" /* AuthErrorCode.TOKEN_EXPIRED */,\n\n // Other errors.\n [\"TOO_MANY_ATTEMPTS_TRY_LATER\" /* ServerError.TOO_MANY_ATTEMPTS_TRY_LATER */]: \"too-many-requests\" /* AuthErrorCode.TOO_MANY_ATTEMPTS_TRY_LATER */,\n [\"PASSWORD_DOES_NOT_MEET_REQUIREMENTS\" /* ServerError.PASSWORD_DOES_NOT_MEET_REQUIREMENTS */]: \"password-does-not-meet-requirements\" /* AuthErrorCode.PASSWORD_DOES_NOT_MEET_REQUIREMENTS */,\n\n // Phone Auth related errors.\n [\"INVALID_CODE\" /* ServerError.INVALID_CODE */]: \"invalid-verification-code\" /* AuthErrorCode.INVALID_CODE */,\n [\"INVALID_SESSION_INFO\" /* ServerError.INVALID_SESSION_INFO */]: \"invalid-verification-id\" /* AuthErrorCode.INVALID_SESSION_INFO */,\n [\"INVALID_TEMPORARY_PROOF\" /* ServerError.INVALID_TEMPORARY_PROOF */]: \"invalid-credential\" /* AuthErrorCode.INVALID_CREDENTIAL */,\n [\"MISSING_SESSION_INFO\" /* ServerError.MISSING_SESSION_INFO */]: \"missing-verification-id\" /* AuthErrorCode.MISSING_SESSION_INFO */,\n [\"SESSION_EXPIRED\" /* ServerError.SESSION_EXPIRED */]: \"code-expired\" /* AuthErrorCode.CODE_EXPIRED */,\n\n // Other action code errors when additional settings passed.\n // MISSING_CONTINUE_URI is getting mapped to INTERNAL_ERROR above.\n // This is OK as this error will be caught by client side validation.\n [\"MISSING_ANDROID_PACKAGE_NAME\" /* ServerError.MISSING_ANDROID_PACKAGE_NAME */]: \"missing-android-pkg-name\" /* AuthErrorCode.MISSING_ANDROID_PACKAGE_NAME */,\n [\"UNAUTHORIZED_DOMAIN\" /* ServerError.UNAUTHORIZED_DOMAIN */]: \"unauthorized-continue-uri\" /* AuthErrorCode.UNAUTHORIZED_DOMAIN */,\n\n // getProjectConfig errors when clientId is passed.\n [\"INVALID_OAUTH_CLIENT_ID\" /* ServerError.INVALID_OAUTH_CLIENT_ID */]: \"invalid-oauth-client-id\" /* AuthErrorCode.INVALID_OAUTH_CLIENT_ID */,\n\n // User actions (sign-up or deletion) disabled errors.\n [\"ADMIN_ONLY_OPERATION\" /* ServerError.ADMIN_ONLY_OPERATION */]: \"admin-restricted-operation\" /* AuthErrorCode.ADMIN_ONLY_OPERATION */,\n\n // Multi factor related errors.\n [\"INVALID_MFA_PENDING_CREDENTIAL\" /* ServerError.INVALID_MFA_PENDING_CREDENTIAL */]: \"invalid-multi-factor-session\" /* AuthErrorCode.INVALID_MFA_SESSION */,\n [\"MFA_ENROLLMENT_NOT_FOUND\" /* ServerError.MFA_ENROLLMENT_NOT_FOUND */]: \"multi-factor-info-not-found\" /* AuthErrorCode.MFA_INFO_NOT_FOUND */,\n [\"MISSING_MFA_ENROLLMENT_ID\" /* ServerError.MISSING_MFA_ENROLLMENT_ID */]: \"missing-multi-factor-info\" /* AuthErrorCode.MISSING_MFA_INFO */,\n [\"MISSING_MFA_PENDING_CREDENTIAL\" /* ServerError.MISSING_MFA_PENDING_CREDENTIAL */]: \"missing-multi-factor-session\" /* AuthErrorCode.MISSING_MFA_SESSION */,\n [\"SECOND_FACTOR_EXISTS\" /* ServerError.SECOND_FACTOR_EXISTS */]: \"second-factor-already-in-use\" /* AuthErrorCode.SECOND_FACTOR_ALREADY_ENROLLED */,\n [\"SECOND_FACTOR_LIMIT_EXCEEDED\" /* ServerError.SECOND_FACTOR_LIMIT_EXCEEDED */]: \"maximum-second-factor-count-exceeded\" /* AuthErrorCode.SECOND_FACTOR_LIMIT_EXCEEDED */,\n\n // Blocking functions related errors.\n [\"BLOCKING_FUNCTION_ERROR_RESPONSE\" /* ServerError.BLOCKING_FUNCTION_ERROR_RESPONSE */]: \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */,\n\n // Recaptcha related errors.\n [\"RECAPTCHA_NOT_ENABLED\" /* ServerError.RECAPTCHA_NOT_ENABLED */]: \"recaptcha-not-enabled\" /* AuthErrorCode.RECAPTCHA_NOT_ENABLED */,\n [\"MISSING_RECAPTCHA_TOKEN\" /* ServerError.MISSING_RECAPTCHA_TOKEN */]: \"missing-recaptcha-token\" /* AuthErrorCode.MISSING_RECAPTCHA_TOKEN */,\n [\"INVALID_RECAPTCHA_TOKEN\" /* ServerError.INVALID_RECAPTCHA_TOKEN */]: \"invalid-recaptcha-token\" /* AuthErrorCode.INVALID_RECAPTCHA_TOKEN */,\n [\"INVALID_RECAPTCHA_ACTION\" /* ServerError.INVALID_RECAPTCHA_ACTION */]: \"invalid-recaptcha-action\" /* AuthErrorCode.INVALID_RECAPTCHA_ACTION */,\n [\"MISSING_CLIENT_TYPE\" /* ServerError.MISSING_CLIENT_TYPE */]: \"missing-client-type\" /* AuthErrorCode.MISSING_CLIENT_TYPE */,\n [\"MISSING_RECAPTCHA_VERSION\" /* ServerError.MISSING_RECAPTCHA_VERSION */]: \"missing-recaptcha-version\" /* AuthErrorCode.MISSING_RECAPTCHA_VERSION */,\n [\"INVALID_RECAPTCHA_VERSION\" /* ServerError.INVALID_RECAPTCHA_VERSION */]: \"invalid-recaptcha-version\" /* AuthErrorCode.INVALID_RECAPTCHA_VERSION */,\n [\"INVALID_REQ_TYPE\" /* ServerError.INVALID_REQ_TYPE */]: \"invalid-req-type\" /* AuthErrorCode.INVALID_REQ_TYPE */\n};\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst DEFAULT_API_TIMEOUT_MS = new Delay(30000, 60000);\nfunction _addTidIfNecessary(auth, request) {\n if (auth.tenantId && !request.tenantId) {\n return Object.assign(Object.assign({}, request), {\n tenantId: auth.tenantId\n });\n }\n return request;\n}\nasync function _performApiRequest(auth, method, path, request, customErrorMap = {}) {\n return _performFetchWithErrorHandling(auth, customErrorMap, async () => {\n let body = {};\n let params = {};\n if (request) {\n if (method === \"GET\" /* HttpMethod.GET */) {\n params = request;\n } else {\n body = {\n body: JSON.stringify(request)\n };\n }\n }\n const query = querystring(Object.assign({\n key: auth.config.apiKey\n }, params)).slice(1);\n const headers = await auth._getAdditionalHeaders();\n headers[\"Content-Type\" /* HttpHeader.CONTENT_TYPE */] = 'application/json';\n if (auth.languageCode) {\n headers[\"X-Firebase-Locale\" /* HttpHeader.X_FIREBASE_LOCALE */] = auth.languageCode;\n }\n return FetchProvider.fetch()(_getFinalTarget(auth, auth.config.apiHost, path, query), Object.assign({\n method,\n headers,\n referrerPolicy: 'no-referrer'\n }, body));\n });\n}\nasync function _performFetchWithErrorHandling(auth, customErrorMap, fetchFn) {\n auth._canInitEmulator = false;\n const errorMap = Object.assign(Object.assign({}, SERVER_ERROR_MAP), customErrorMap);\n try {\n const networkTimeout = new NetworkTimeout(auth);\n const response = await Promise.race([fetchFn(), networkTimeout.promise]);\n // If we've reached this point, the fetch succeeded and the networkTimeout\n // didn't throw; clear the network timeout delay so that Node won't hang\n networkTimeout.clearNetworkTimeout();\n const json = await response.json();\n if ('needConfirmation' in json) {\n throw _makeTaggedError(auth, \"account-exists-with-different-credential\" /* AuthErrorCode.NEED_CONFIRMATION */, json);\n }\n if (response.ok && !('errorMessage' in json)) {\n return json;\n } else {\n const errorMessage = response.ok ? json.errorMessage : json.error.message;\n const [serverErrorCode, serverErrorMessage] = errorMessage.split(' : ');\n if (serverErrorCode === \"FEDERATED_USER_ID_ALREADY_LINKED\" /* ServerError.FEDERATED_USER_ID_ALREADY_LINKED */) {\n throw _makeTaggedError(auth, \"credential-already-in-use\" /* AuthErrorCode.CREDENTIAL_ALREADY_IN_USE */, json);\n } else if (serverErrorCode === \"EMAIL_EXISTS\" /* ServerError.EMAIL_EXISTS */) {\n throw _makeTaggedError(auth, \"email-already-in-use\" /* AuthErrorCode.EMAIL_EXISTS */, json);\n } else if (serverErrorCode === \"USER_DISABLED\" /* ServerError.USER_DISABLED */) {\n throw _makeTaggedError(auth, \"user-disabled\" /* AuthErrorCode.USER_DISABLED */, json);\n }\n const authError = errorMap[serverErrorCode] || serverErrorCode.toLowerCase().replace(/[_\\s]+/g, '-');\n if (serverErrorMessage) {\n throw _errorWithCustomMessage(auth, authError, serverErrorMessage);\n } else {\n _fail(auth, authError);\n }\n }\n } catch (e) {\n if (e instanceof FirebaseError) {\n throw e;\n }\n // Changing this to a different error code will log user out when there is a network error\n // because we treat any error other than NETWORK_REQUEST_FAILED as token is invalid.\n // https://github.com/firebase/firebase-js-sdk/blob/4fbc73610d70be4e0852e7de63a39cb7897e8546/packages/auth/src/core/auth/auth_impl.ts#L309-L316\n _fail(auth, \"network-request-failed\" /* AuthErrorCode.NETWORK_REQUEST_FAILED */, {\n 'message': String(e)\n });\n }\n}\nasync function _performSignInRequest(auth, method, path, request, customErrorMap = {}) {\n const serverResponse = await _performApiRequest(auth, method, path, request, customErrorMap);\n if ('mfaPendingCredential' in serverResponse) {\n _fail(auth, \"multi-factor-auth-required\" /* AuthErrorCode.MFA_REQUIRED */, {\n _serverResponse: serverResponse\n });\n }\n return serverResponse;\n}\nfunction _getFinalTarget(auth, host, path, query) {\n const base = `${host}${path}?${query}`;\n if (!auth.config.emulator) {\n return `${auth.config.apiScheme}://${base}`;\n }\n return _emulatorUrl(auth.config, base);\n}\nfunction _parseEnforcementState(enforcementStateStr) {\n switch (enforcementStateStr) {\n case 'ENFORCE':\n return \"ENFORCE\" /* EnforcementState.ENFORCE */;\n case 'AUDIT':\n return \"AUDIT\" /* EnforcementState.AUDIT */;\n case 'OFF':\n return \"OFF\" /* EnforcementState.OFF */;\n default:\n return \"ENFORCEMENT_STATE_UNSPECIFIED\" /* EnforcementState.ENFORCEMENT_STATE_UNSPECIFIED */;\n }\n}\nclass NetworkTimeout {\n constructor(auth) {\n this.auth = auth;\n // Node timers and browser timers are fundamentally incompatible, but we\n // don't care about the value here\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.timer = null;\n this.promise = new Promise((_, reject) => {\n this.timer = setTimeout(() => {\n return reject(_createError(this.auth, \"network-request-failed\" /* AuthErrorCode.NETWORK_REQUEST_FAILED */));\n }, DEFAULT_API_TIMEOUT_MS.get());\n });\n }\n clearNetworkTimeout() {\n clearTimeout(this.timer);\n }\n}\nfunction _makeTaggedError(auth, code, response) {\n const errorParams = {\n appName: auth.name\n };\n if (response.email) {\n errorParams.email = response.email;\n }\n if (response.phoneNumber) {\n errorParams.phoneNumber = response.phoneNumber;\n }\n const error = _createError(auth, code, errorParams);\n // We know customData is defined on error because errorParams is defined\n error.customData._tokenResponse = response;\n return error;\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction isV2(grecaptcha) {\n return grecaptcha !== undefined && grecaptcha.getResponse !== undefined;\n}\nfunction isEnterprise(grecaptcha) {\n return grecaptcha !== undefined && grecaptcha.enterprise !== undefined;\n}\nclass RecaptchaConfig {\n constructor(response) {\n /**\r\n * The reCAPTCHA site key.\r\n */\n this.siteKey = '';\n /**\r\n * The list of providers and their enablement status for reCAPTCHA Enterprise.\r\n */\n this.recaptchaEnforcementState = [];\n if (response.recaptchaKey === undefined) {\n throw new Error('recaptchaKey undefined');\n }\n // Example response.recaptchaKey: \"projects/proj123/keys/sitekey123\"\n this.siteKey = response.recaptchaKey.split('/')[3];\n this.recaptchaEnforcementState = response.recaptchaEnforcementState;\n }\n /**\r\n * Returns the reCAPTCHA Enterprise enforcement state for the given provider.\r\n *\r\n * @param providerStr - The provider whose enforcement state is to be returned.\r\n * @returns The reCAPTCHA Enterprise enforcement state for the given provider.\r\n */\n getProviderEnforcementState(providerStr) {\n if (!this.recaptchaEnforcementState || this.recaptchaEnforcementState.length === 0) {\n return null;\n }\n for (const recaptchaEnforcementState of this.recaptchaEnforcementState) {\n if (recaptchaEnforcementState.provider && recaptchaEnforcementState.provider === providerStr) {\n return _parseEnforcementState(recaptchaEnforcementState.enforcementState);\n }\n }\n return null;\n }\n /**\r\n * Returns true if the reCAPTCHA Enterprise enforcement state for the provider is set to ENFORCE or AUDIT.\r\n *\r\n * @param providerStr - The provider whose enablement state is to be returned.\r\n * @returns Whether or not reCAPTCHA Enterprise protection is enabled for the given provider.\r\n */\n isProviderEnabled(providerStr) {\n return this.getProviderEnforcementState(providerStr) === \"ENFORCE\" /* EnforcementState.ENFORCE */ || this.getProviderEnforcementState(providerStr) === \"AUDIT\" /* EnforcementState.AUDIT */;\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nasync function getRecaptchaParams(auth) {\n return (await _performApiRequest(auth, \"GET\" /* HttpMethod.GET */, \"/v1/recaptchaParams\" /* Endpoint.GET_RECAPTCHA_PARAM */)).recaptchaSiteKey || '';\n}\nasync function getRecaptchaConfig(auth, request) {\n return _performApiRequest(auth, \"GET\" /* HttpMethod.GET */, \"/v2/recaptchaConfig\" /* Endpoint.GET_RECAPTCHA_CONFIG */, _addTidIfNecessary(auth, request));\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nasync function deleteAccount(auth, request) {\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:delete\" /* Endpoint.DELETE_ACCOUNT */, request);\n}\nasync function deleteLinkedAccounts(auth, request) {\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:update\" /* Endpoint.SET_ACCOUNT_INFO */, request);\n}\nasync function getAccountInfo(auth, request) {\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:lookup\" /* Endpoint.GET_ACCOUNT_INFO */, request);\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction utcTimestampToDateString(utcTimestamp) {\n if (!utcTimestamp) {\n return undefined;\n }\n try {\n // Convert to date object.\n const date = new Date(Number(utcTimestamp));\n // Test date is valid.\n if (!isNaN(date.getTime())) {\n // Convert to UTC date string.\n return date.toUTCString();\n }\n } catch (e) {\n // Do nothing. undefined will be returned.\n }\n return undefined;\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Returns a JSON Web Token (JWT) used to identify the user to a Firebase service.\r\n *\r\n * @remarks\r\n * Returns the current token if it has not expired or if it will not expire in the next five\r\n * minutes. Otherwise, this will refresh the token and return a new one.\r\n *\r\n * @param user - The user.\r\n * @param forceRefresh - Force refresh regardless of token expiration.\r\n *\r\n * @public\r\n */\nfunction getIdToken(user, forceRefresh = false) {\n return getModularInstance(user).getIdToken(forceRefresh);\n}\n/**\r\n * Returns a deserialized JSON Web Token (JWT) used to identify the user to a Firebase service.\r\n *\r\n * @remarks\r\n * Returns the current token if it has not expired or if it will not expire in the next five\r\n * minutes. Otherwise, this will refresh the token and return a new one.\r\n *\r\n * @param user - The user.\r\n * @param forceRefresh - Force refresh regardless of token expiration.\r\n *\r\n * @public\r\n */\nasync function getIdTokenResult(user, forceRefresh = false) {\n const userInternal = getModularInstance(user);\n const token = await userInternal.getIdToken(forceRefresh);\n const claims = _parseToken(token);\n _assert(claims && claims.exp && claims.auth_time && claims.iat, userInternal.auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n const firebase = typeof claims.firebase === 'object' ? claims.firebase : undefined;\n const signInProvider = firebase === null || firebase === void 0 ? void 0 : firebase['sign_in_provider'];\n return {\n claims,\n token,\n authTime: utcTimestampToDateString(secondsStringToMilliseconds(claims.auth_time)),\n issuedAtTime: utcTimestampToDateString(secondsStringToMilliseconds(claims.iat)),\n expirationTime: utcTimestampToDateString(secondsStringToMilliseconds(claims.exp)),\n signInProvider: signInProvider || null,\n signInSecondFactor: (firebase === null || firebase === void 0 ? void 0 : firebase['sign_in_second_factor']) || null\n };\n}\nfunction secondsStringToMilliseconds(seconds) {\n return Number(seconds) * 1000;\n}\nfunction _parseToken(token) {\n const [algorithm, payload, signature] = token.split('.');\n if (algorithm === undefined || payload === undefined || signature === undefined) {\n _logError('JWT malformed, contained fewer than 3 sections');\n return null;\n }\n try {\n const decoded = base64Decode(payload);\n if (!decoded) {\n _logError('Failed to decode base64 JWT payload');\n return null;\n }\n return JSON.parse(decoded);\n } catch (e) {\n _logError('Caught error parsing JWT payload as JSON', e === null || e === void 0 ? void 0 : e.toString());\n return null;\n }\n}\n/**\r\n * Extract expiresIn TTL from a token by subtracting the expiration from the issuance.\r\n */\nfunction _tokenExpiresIn(token) {\n const parsedToken = _parseToken(token);\n _assert(parsedToken, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n _assert(typeof parsedToken.exp !== 'undefined', \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n _assert(typeof parsedToken.iat !== 'undefined', \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n return Number(parsedToken.exp) - Number(parsedToken.iat);\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nasync function _logoutIfInvalidated(user, promise, bypassAuthState = false) {\n if (bypassAuthState) {\n return promise;\n }\n try {\n return await promise;\n } catch (e) {\n if (e instanceof FirebaseError && isUserInvalidated(e)) {\n if (user.auth.currentUser === user) {\n await user.auth.signOut();\n }\n }\n throw e;\n }\n}\nfunction isUserInvalidated({\n code\n}) {\n return code === `auth/${\"user-disabled\" /* AuthErrorCode.USER_DISABLED */}` || code === `auth/${\"user-token-expired\" /* AuthErrorCode.TOKEN_EXPIRED */}`;\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nclass ProactiveRefresh {\n constructor(user) {\n this.user = user;\n this.isRunning = false;\n // Node timers and browser timers return fundamentally different types.\n // We don't actually care what the value is but TS won't accept unknown and\n // we can't cast properly in both environments.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.timerId = null;\n this.errorBackoff = 30000 /* Duration.RETRY_BACKOFF_MIN */;\n }\n _start() {\n if (this.isRunning) {\n return;\n }\n this.isRunning = true;\n this.schedule();\n }\n _stop() {\n if (!this.isRunning) {\n return;\n }\n this.isRunning = false;\n if (this.timerId !== null) {\n clearTimeout(this.timerId);\n }\n }\n getInterval(wasError) {\n var _a;\n if (wasError) {\n const interval = this.errorBackoff;\n this.errorBackoff = Math.min(this.errorBackoff * 2, 960000 /* Duration.RETRY_BACKOFF_MAX */);\n return interval;\n } else {\n // Reset the error backoff\n this.errorBackoff = 30000 /* Duration.RETRY_BACKOFF_MIN */;\n const expTime = (_a = this.user.stsTokenManager.expirationTime) !== null && _a !== void 0 ? _a : 0;\n const interval = expTime - Date.now() - 300000 /* Duration.OFFSET */;\n return Math.max(0, interval);\n }\n }\n schedule(wasError = false) {\n if (!this.isRunning) {\n // Just in case...\n return;\n }\n const interval = this.getInterval(wasError);\n this.timerId = setTimeout(async () => {\n await this.iteration();\n }, interval);\n }\n async iteration() {\n try {\n await this.user.getIdToken(true);\n } catch (e) {\n // Only retry on network errors\n if ((e === null || e === void 0 ? void 0 : e.code) === `auth/${\"network-request-failed\" /* AuthErrorCode.NETWORK_REQUEST_FAILED */}`) {\n this.schedule( /* wasError */true);\n }\n return;\n }\n this.schedule();\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nclass UserMetadata {\n constructor(createdAt, lastLoginAt) {\n this.createdAt = createdAt;\n this.lastLoginAt = lastLoginAt;\n this._initializeTime();\n }\n _initializeTime() {\n this.lastSignInTime = utcTimestampToDateString(this.lastLoginAt);\n this.creationTime = utcTimestampToDateString(this.createdAt);\n }\n _copy(metadata) {\n this.createdAt = metadata.createdAt;\n this.lastLoginAt = metadata.lastLoginAt;\n this._initializeTime();\n }\n toJSON() {\n return {\n createdAt: this.createdAt,\n lastLoginAt: this.lastLoginAt\n };\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nasync function _reloadWithoutSaving(user) {\n var _a;\n const auth = user.auth;\n const idToken = await user.getIdToken();\n const response = await _logoutIfInvalidated(user, getAccountInfo(auth, {\n idToken\n }));\n _assert(response === null || response === void 0 ? void 0 : response.users.length, auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n const coreAccount = response.users[0];\n user._notifyReloadListener(coreAccount);\n const newProviderData = ((_a = coreAccount.providerUserInfo) === null || _a === void 0 ? void 0 : _a.length) ? extractProviderData(coreAccount.providerUserInfo) : [];\n const providerData = mergeProviderData(user.providerData, newProviderData);\n // Preserves the non-nonymous status of the stored user, even if no more\n // credentials (federated or email/password) are linked to the user. If\n // the user was previously anonymous, then use provider data to update.\n // On the other hand, if it was not anonymous before, it should never be\n // considered anonymous now.\n const oldIsAnonymous = user.isAnonymous;\n const newIsAnonymous = !(user.email && coreAccount.passwordHash) && !(providerData === null || providerData === void 0 ? void 0 : providerData.length);\n const isAnonymous = !oldIsAnonymous ? false : newIsAnonymous;\n const updates = {\n uid: coreAccount.localId,\n displayName: coreAccount.displayName || null,\n photoURL: coreAccount.photoUrl || null,\n email: coreAccount.email || null,\n emailVerified: coreAccount.emailVerified || false,\n phoneNumber: coreAccount.phoneNumber || null,\n tenantId: coreAccount.tenantId || null,\n providerData,\n metadata: new UserMetadata(coreAccount.createdAt, coreAccount.lastLoginAt),\n isAnonymous\n };\n Object.assign(user, updates);\n}\n/**\r\n * Reloads user account data, if signed in.\r\n *\r\n * @param user - The user.\r\n *\r\n * @public\r\n */\nasync function reload(user) {\n const userInternal = getModularInstance(user);\n await _reloadWithoutSaving(userInternal);\n // Even though the current user hasn't changed, update\n // current user will trigger a persistence update w/ the\n // new info.\n await userInternal.auth._persistUserIfCurrent(userInternal);\n userInternal.auth._notifyListenersIfCurrent(userInternal);\n}\nfunction mergeProviderData(original, newData) {\n const deduped = original.filter(o => !newData.some(n => n.providerId === o.providerId));\n return [...deduped, ...newData];\n}\nfunction extractProviderData(providers) {\n return providers.map(_a => {\n var {\n providerId\n } = _a,\n provider = __rest(_a, [\"providerId\"]);\n return {\n providerId,\n uid: provider.rawId || '',\n displayName: provider.displayName || null,\n email: provider.email || null,\n phoneNumber: provider.phoneNumber || null,\n photoURL: provider.photoUrl || null\n };\n });\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nasync function requestStsToken(auth, refreshToken) {\n const response = await _performFetchWithErrorHandling(auth, {}, async () => {\n const body = querystring({\n 'grant_type': 'refresh_token',\n 'refresh_token': refreshToken\n }).slice(1);\n const {\n tokenApiHost,\n apiKey\n } = auth.config;\n const url = _getFinalTarget(auth, tokenApiHost, \"/v1/token\" /* Endpoint.TOKEN */, `key=${apiKey}`);\n const headers = await auth._getAdditionalHeaders();\n headers[\"Content-Type\" /* HttpHeader.CONTENT_TYPE */] = 'application/x-www-form-urlencoded';\n return FetchProvider.fetch()(url, {\n method: \"POST\" /* HttpMethod.POST */,\n headers,\n body\n });\n });\n // The response comes back in snake_case. Convert to camel:\n return {\n accessToken: response.access_token,\n expiresIn: response.expires_in,\n refreshToken: response.refresh_token\n };\n}\nasync function revokeToken(auth, request) {\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v2/accounts:revokeToken\" /* Endpoint.REVOKE_TOKEN */, _addTidIfNecessary(auth, request));\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * We need to mark this class as internal explicitly to exclude it in the public typings, because\r\n * it references AuthInternal which has a circular dependency with UserInternal.\r\n *\r\n * @internal\r\n */\nclass StsTokenManager {\n constructor() {\n this.refreshToken = null;\n this.accessToken = null;\n this.expirationTime = null;\n }\n get isExpired() {\n return !this.expirationTime || Date.now() > this.expirationTime - 30000 /* Buffer.TOKEN_REFRESH */;\n }\n updateFromServerResponse(response) {\n _assert(response.idToken, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n _assert(typeof response.idToken !== 'undefined', \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n _assert(typeof response.refreshToken !== 'undefined', \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n const expiresIn = 'expiresIn' in response && typeof response.expiresIn !== 'undefined' ? Number(response.expiresIn) : _tokenExpiresIn(response.idToken);\n this.updateTokensAndExpiration(response.idToken, response.refreshToken, expiresIn);\n }\n async getToken(auth, forceRefresh = false) {\n _assert(!this.accessToken || this.refreshToken, auth, \"user-token-expired\" /* AuthErrorCode.TOKEN_EXPIRED */);\n if (!forceRefresh && this.accessToken && !this.isExpired) {\n return this.accessToken;\n }\n if (this.refreshToken) {\n await this.refresh(auth, this.refreshToken);\n return this.accessToken;\n }\n return null;\n }\n clearRefreshToken() {\n this.refreshToken = null;\n }\n async refresh(auth, oldToken) {\n const {\n accessToken,\n refreshToken,\n expiresIn\n } = await requestStsToken(auth, oldToken);\n this.updateTokensAndExpiration(accessToken, refreshToken, Number(expiresIn));\n }\n updateTokensAndExpiration(accessToken, refreshToken, expiresInSec) {\n this.refreshToken = refreshToken || null;\n this.accessToken = accessToken || null;\n this.expirationTime = Date.now() + expiresInSec * 1000;\n }\n static fromJSON(appName, object) {\n const {\n refreshToken,\n accessToken,\n expirationTime\n } = object;\n const manager = new StsTokenManager();\n if (refreshToken) {\n _assert(typeof refreshToken === 'string', \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */, {\n appName\n });\n manager.refreshToken = refreshToken;\n }\n if (accessToken) {\n _assert(typeof accessToken === 'string', \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */, {\n appName\n });\n manager.accessToken = accessToken;\n }\n if (expirationTime) {\n _assert(typeof expirationTime === 'number', \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */, {\n appName\n });\n manager.expirationTime = expirationTime;\n }\n return manager;\n }\n toJSON() {\n return {\n refreshToken: this.refreshToken,\n accessToken: this.accessToken,\n expirationTime: this.expirationTime\n };\n }\n _assign(stsTokenManager) {\n this.accessToken = stsTokenManager.accessToken;\n this.refreshToken = stsTokenManager.refreshToken;\n this.expirationTime = stsTokenManager.expirationTime;\n }\n _clone() {\n return Object.assign(new StsTokenManager(), this.toJSON());\n }\n _performRefresh() {\n return debugFail('not implemented');\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction assertStringOrUndefined(assertion, appName) {\n _assert(typeof assertion === 'string' || typeof assertion === 'undefined', \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */, {\n appName\n });\n}\nclass UserImpl {\n constructor(_a) {\n var {\n uid,\n auth,\n stsTokenManager\n } = _a,\n opt = __rest(_a, [\"uid\", \"auth\", \"stsTokenManager\"]);\n // For the user object, provider is always Firebase.\n this.providerId = \"firebase\" /* ProviderId.FIREBASE */;\n this.proactiveRefresh = new ProactiveRefresh(this);\n this.reloadUserInfo = null;\n this.reloadListener = null;\n this.uid = uid;\n this.auth = auth;\n this.stsTokenManager = stsTokenManager;\n this.accessToken = stsTokenManager.accessToken;\n this.displayName = opt.displayName || null;\n this.email = opt.email || null;\n this.emailVerified = opt.emailVerified || false;\n this.phoneNumber = opt.phoneNumber || null;\n this.photoURL = opt.photoURL || null;\n this.isAnonymous = opt.isAnonymous || false;\n this.tenantId = opt.tenantId || null;\n this.providerData = opt.providerData ? [...opt.providerData] : [];\n this.metadata = new UserMetadata(opt.createdAt || undefined, opt.lastLoginAt || undefined);\n }\n async getIdToken(forceRefresh) {\n const accessToken = await _logoutIfInvalidated(this, this.stsTokenManager.getToken(this.auth, forceRefresh));\n _assert(accessToken, this.auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n if (this.accessToken !== accessToken) {\n this.accessToken = accessToken;\n await this.auth._persistUserIfCurrent(this);\n this.auth._notifyListenersIfCurrent(this);\n }\n return accessToken;\n }\n getIdTokenResult(forceRefresh) {\n return getIdTokenResult(this, forceRefresh);\n }\n reload() {\n return reload(this);\n }\n _assign(user) {\n if (this === user) {\n return;\n }\n _assert(this.uid === user.uid, this.auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n this.displayName = user.displayName;\n this.photoURL = user.photoURL;\n this.email = user.email;\n this.emailVerified = user.emailVerified;\n this.phoneNumber = user.phoneNumber;\n this.isAnonymous = user.isAnonymous;\n this.tenantId = user.tenantId;\n this.providerData = user.providerData.map(userInfo => Object.assign({}, userInfo));\n this.metadata._copy(user.metadata);\n this.stsTokenManager._assign(user.stsTokenManager);\n }\n _clone(auth) {\n const newUser = new UserImpl(Object.assign(Object.assign({}, this), {\n auth,\n stsTokenManager: this.stsTokenManager._clone()\n }));\n newUser.metadata._copy(this.metadata);\n return newUser;\n }\n _onReload(callback) {\n // There should only ever be one listener, and that is a single instance of MultiFactorUser\n _assert(!this.reloadListener, this.auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n this.reloadListener = callback;\n if (this.reloadUserInfo) {\n this._notifyReloadListener(this.reloadUserInfo);\n this.reloadUserInfo = null;\n }\n }\n _notifyReloadListener(userInfo) {\n if (this.reloadListener) {\n this.reloadListener(userInfo);\n } else {\n // If no listener is subscribed yet, save the result so it's available when they do subscribe\n this.reloadUserInfo = userInfo;\n }\n }\n _startProactiveRefresh() {\n this.proactiveRefresh._start();\n }\n _stopProactiveRefresh() {\n this.proactiveRefresh._stop();\n }\n async _updateTokensIfNecessary(response, reload = false) {\n let tokensRefreshed = false;\n if (response.idToken && response.idToken !== this.stsTokenManager.accessToken) {\n this.stsTokenManager.updateFromServerResponse(response);\n tokensRefreshed = true;\n }\n if (reload) {\n await _reloadWithoutSaving(this);\n }\n await this.auth._persistUserIfCurrent(this);\n if (tokensRefreshed) {\n this.auth._notifyListenersIfCurrent(this);\n }\n }\n async delete() {\n const idToken = await this.getIdToken();\n await _logoutIfInvalidated(this, deleteAccount(this.auth, {\n idToken\n }));\n this.stsTokenManager.clearRefreshToken();\n // TODO: Determine if cancellable-promises are necessary to use in this class so that delete()\n // cancels pending actions...\n return this.auth.signOut();\n }\n toJSON() {\n return Object.assign(Object.assign({\n uid: this.uid,\n email: this.email || undefined,\n emailVerified: this.emailVerified,\n displayName: this.displayName || undefined,\n isAnonymous: this.isAnonymous,\n photoURL: this.photoURL || undefined,\n phoneNumber: this.phoneNumber || undefined,\n tenantId: this.tenantId || undefined,\n providerData: this.providerData.map(userInfo => Object.assign({}, userInfo)),\n stsTokenManager: this.stsTokenManager.toJSON(),\n // Redirect event ID must be maintained in case there is a pending\n // redirect event.\n _redirectEventId: this._redirectEventId\n }, this.metadata.toJSON()), {\n // Required for compatibility with the legacy SDK (go/firebase-auth-sdk-persistence-parsing):\n apiKey: this.auth.config.apiKey,\n appName: this.auth.name\n });\n }\n get refreshToken() {\n return this.stsTokenManager.refreshToken || '';\n }\n static _fromJSON(auth, object) {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n const displayName = (_a = object.displayName) !== null && _a !== void 0 ? _a : undefined;\n const email = (_b = object.email) !== null && _b !== void 0 ? _b : undefined;\n const phoneNumber = (_c = object.phoneNumber) !== null && _c !== void 0 ? _c : undefined;\n const photoURL = (_d = object.photoURL) !== null && _d !== void 0 ? _d : undefined;\n const tenantId = (_e = object.tenantId) !== null && _e !== void 0 ? _e : undefined;\n const _redirectEventId = (_f = object._redirectEventId) !== null && _f !== void 0 ? _f : undefined;\n const createdAt = (_g = object.createdAt) !== null && _g !== void 0 ? _g : undefined;\n const lastLoginAt = (_h = object.lastLoginAt) !== null && _h !== void 0 ? _h : undefined;\n const {\n uid,\n emailVerified,\n isAnonymous,\n providerData,\n stsTokenManager: plainObjectTokenManager\n } = object;\n _assert(uid && plainObjectTokenManager, auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n const stsTokenManager = StsTokenManager.fromJSON(this.name, plainObjectTokenManager);\n _assert(typeof uid === 'string', auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n assertStringOrUndefined(displayName, auth.name);\n assertStringOrUndefined(email, auth.name);\n _assert(typeof emailVerified === 'boolean', auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n _assert(typeof isAnonymous === 'boolean', auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n assertStringOrUndefined(phoneNumber, auth.name);\n assertStringOrUndefined(photoURL, auth.name);\n assertStringOrUndefined(tenantId, auth.name);\n assertStringOrUndefined(_redirectEventId, auth.name);\n assertStringOrUndefined(createdAt, auth.name);\n assertStringOrUndefined(lastLoginAt, auth.name);\n const user = new UserImpl({\n uid,\n auth,\n email,\n emailVerified,\n displayName,\n isAnonymous,\n photoURL,\n phoneNumber,\n tenantId,\n stsTokenManager,\n createdAt,\n lastLoginAt\n });\n if (providerData && Array.isArray(providerData)) {\n user.providerData = providerData.map(userInfo => Object.assign({}, userInfo));\n }\n if (_redirectEventId) {\n user._redirectEventId = _redirectEventId;\n }\n return user;\n }\n /**\r\n * Initialize a User from an idToken server response\r\n * @param auth\r\n * @param idTokenResponse\r\n */\n static async _fromIdTokenResponse(auth, idTokenResponse, isAnonymous = false) {\n const stsTokenManager = new StsTokenManager();\n stsTokenManager.updateFromServerResponse(idTokenResponse);\n // Initialize the Firebase Auth user.\n const user = new UserImpl({\n uid: idTokenResponse.localId,\n auth,\n stsTokenManager,\n isAnonymous\n });\n // Updates the user info and data and resolves with a user instance.\n await _reloadWithoutSaving(user);\n return user;\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst instanceCache = new Map();\nfunction _getInstance(cls) {\n debugAssert(cls instanceof Function, 'Expected a class definition');\n let instance = instanceCache.get(cls);\n if (instance) {\n debugAssert(instance instanceof cls, 'Instance stored in cache mismatched with class');\n return instance;\n }\n instance = new cls();\n instanceCache.set(cls, instance);\n return instance;\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nlet InMemoryPersistence = /*#__PURE__*/(() => {\n class InMemoryPersistence {\n constructor() {\n this.type = \"NONE\" /* PersistenceType.NONE */;\n this.storage = {};\n }\n async _isAvailable() {\n return true;\n }\n async _set(key, value) {\n this.storage[key] = value;\n }\n async _get(key) {\n const value = this.storage[key];\n return value === undefined ? null : value;\n }\n async _remove(key) {\n delete this.storage[key];\n }\n _addListener(_key, _listener) {\n // Listeners are not supported for in-memory storage since it cannot be shared across windows/workers\n return;\n }\n _removeListener(_key, _listener) {\n // Listeners are not supported for in-memory storage since it cannot be shared across windows/workers\n return;\n }\n }\n InMemoryPersistence.type = 'NONE';\n /**\r\n * An implementation of {@link Persistence} of type 'NONE'.\r\n *\r\n * @public\r\n */\n return InMemoryPersistence;\n})();\nconst inMemoryPersistence = InMemoryPersistence;\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _persistenceKeyName(key, apiKey, appName) {\n return `${\"firebase\" /* Namespace.PERSISTENCE */}:${key}:${apiKey}:${appName}`;\n}\nclass PersistenceUserManager {\n constructor(persistence, auth, userKey) {\n this.persistence = persistence;\n this.auth = auth;\n this.userKey = userKey;\n const {\n config,\n name\n } = this.auth;\n this.fullUserKey = _persistenceKeyName(this.userKey, config.apiKey, name);\n this.fullPersistenceKey = _persistenceKeyName(\"persistence\" /* KeyName.PERSISTENCE_USER */, config.apiKey, name);\n this.boundEventHandler = auth._onStorageEvent.bind(auth);\n this.persistence._addListener(this.fullUserKey, this.boundEventHandler);\n }\n setCurrentUser(user) {\n return this.persistence._set(this.fullUserKey, user.toJSON());\n }\n async getCurrentUser() {\n const blob = await this.persistence._get(this.fullUserKey);\n return blob ? UserImpl._fromJSON(this.auth, blob) : null;\n }\n removeCurrentUser() {\n return this.persistence._remove(this.fullUserKey);\n }\n savePersistenceForRedirect() {\n return this.persistence._set(this.fullPersistenceKey, this.persistence.type);\n }\n async setPersistence(newPersistence) {\n if (this.persistence === newPersistence) {\n return;\n }\n const currentUser = await this.getCurrentUser();\n await this.removeCurrentUser();\n this.persistence = newPersistence;\n if (currentUser) {\n return this.setCurrentUser(currentUser);\n }\n }\n delete() {\n this.persistence._removeListener(this.fullUserKey, this.boundEventHandler);\n }\n static async create(auth, persistenceHierarchy, userKey = \"authUser\" /* KeyName.AUTH_USER */) {\n if (!persistenceHierarchy.length) {\n return new PersistenceUserManager(_getInstance(inMemoryPersistence), auth, userKey);\n }\n // Eliminate any persistences that are not available\n const availablePersistences = (await Promise.all(persistenceHierarchy.map(async persistence => {\n if (await persistence._isAvailable()) {\n return persistence;\n }\n return undefined;\n }))).filter(persistence => persistence);\n // Fall back to the first persistence listed, or in memory if none available\n let selectedPersistence = availablePersistences[0] || _getInstance(inMemoryPersistence);\n const key = _persistenceKeyName(userKey, auth.config.apiKey, auth.name);\n // Pull out the existing user, setting the chosen persistence to that\n // persistence if the user exists.\n let userToMigrate = null;\n // Note, here we check for a user in _all_ persistences, not just the\n // ones deemed available. If we can migrate a user out of a broken\n // persistence, we will (but only if that persistence supports migration).\n for (const persistence of persistenceHierarchy) {\n try {\n const blob = await persistence._get(key);\n if (blob) {\n const user = UserImpl._fromJSON(auth, blob); // throws for unparsable blob (wrong format)\n if (persistence !== selectedPersistence) {\n userToMigrate = user;\n }\n selectedPersistence = persistence;\n break;\n }\n } catch (_a) {}\n }\n // If we find the user in a persistence that does support migration, use\n // that migration path (of only persistences that support migration)\n const migrationHierarchy = availablePersistences.filter(p => p._shouldAllowMigration);\n // If the persistence does _not_ allow migration, just finish off here\n if (!selectedPersistence._shouldAllowMigration || !migrationHierarchy.length) {\n return new PersistenceUserManager(selectedPersistence, auth, userKey);\n }\n selectedPersistence = migrationHierarchy[0];\n if (userToMigrate) {\n // This normally shouldn't throw since chosenPersistence.isAvailable() is true, but if it does\n // we'll just let it bubble to surface the error.\n await selectedPersistence._set(key, userToMigrate.toJSON());\n }\n // Attempt to clear the key in other persistences but ignore errors. This helps prevent issues\n // such as users getting stuck with a previous account after signing out and refreshing the tab.\n await Promise.all(persistenceHierarchy.map(async persistence => {\n if (persistence !== selectedPersistence) {\n try {\n await persistence._remove(key);\n } catch (_a) {}\n }\n }));\n return new PersistenceUserManager(selectedPersistence, auth, userKey);\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Determine the browser for the purposes of reporting usage to the API\r\n */\nfunction _getBrowserName(userAgent) {\n const ua = userAgent.toLowerCase();\n if (ua.includes('opera/') || ua.includes('opr/') || ua.includes('opios/')) {\n return \"Opera\" /* BrowserName.OPERA */;\n } else if (_isIEMobile(ua)) {\n // Windows phone IEMobile browser.\n return \"IEMobile\" /* BrowserName.IEMOBILE */;\n } else if (ua.includes('msie') || ua.includes('trident/')) {\n return \"IE\" /* BrowserName.IE */;\n } else if (ua.includes('edge/')) {\n return \"Edge\" /* BrowserName.EDGE */;\n } else if (_isFirefox(ua)) {\n return \"Firefox\" /* BrowserName.FIREFOX */;\n } else if (ua.includes('silk/')) {\n return \"Silk\" /* BrowserName.SILK */;\n } else if (_isBlackBerry(ua)) {\n // Blackberry browser.\n return \"Blackberry\" /* BrowserName.BLACKBERRY */;\n } else if (_isWebOS(ua)) {\n // WebOS default browser.\n return \"Webos\" /* BrowserName.WEBOS */;\n } else if (_isSafari(ua)) {\n return \"Safari\" /* BrowserName.SAFARI */;\n } else if ((ua.includes('chrome/') || _isChromeIOS(ua)) && !ua.includes('edge/')) {\n return \"Chrome\" /* BrowserName.CHROME */;\n } else if (_isAndroid(ua)) {\n // Android stock browser.\n return \"Android\" /* BrowserName.ANDROID */;\n } else {\n // Most modern browsers have name/version at end of user agent string.\n const re = /([a-zA-Z\\d\\.]+)\\/[a-zA-Z\\d\\.]*$/;\n const matches = userAgent.match(re);\n if ((matches === null || matches === void 0 ? void 0 : matches.length) === 2) {\n return matches[1];\n }\n }\n return \"Other\" /* BrowserName.OTHER */;\n}\nfunction _isFirefox(ua = getUA()) {\n return /firefox\\//i.test(ua);\n}\nfunction _isSafari(userAgent = getUA()) {\n const ua = userAgent.toLowerCase();\n return ua.includes('safari/') && !ua.includes('chrome/') && !ua.includes('crios/') && !ua.includes('android');\n}\nfunction _isChromeIOS(ua = getUA()) {\n return /crios\\//i.test(ua);\n}\nfunction _isIEMobile(ua = getUA()) {\n return /iemobile/i.test(ua);\n}\nfunction _isAndroid(ua = getUA()) {\n return /android/i.test(ua);\n}\nfunction _isBlackBerry(ua = getUA()) {\n return /blackberry/i.test(ua);\n}\nfunction _isWebOS(ua = getUA()) {\n return /webos/i.test(ua);\n}\nfunction _isIOS(ua = getUA()) {\n return /iphone|ipad|ipod/i.test(ua) || /macintosh/i.test(ua) && /mobile/i.test(ua);\n}\nfunction _isIOS7Or8(ua = getUA()) {\n return /(iPad|iPhone|iPod).*OS 7_\\d/i.test(ua) || /(iPad|iPhone|iPod).*OS 8_\\d/i.test(ua);\n}\nfunction _isIOSStandalone(ua = getUA()) {\n var _a;\n return _isIOS(ua) && !!((_a = window.navigator) === null || _a === void 0 ? void 0 : _a.standalone);\n}\nfunction _isIE10() {\n return isIE() && document.documentMode === 10;\n}\nfunction _isMobileBrowser(ua = getUA()) {\n // TODO: implement getBrowserName equivalent for OS.\n return _isIOS(ua) || _isAndroid(ua) || _isWebOS(ua) || _isBlackBerry(ua) || /windows phone/i.test(ua) || _isIEMobile(ua);\n}\nfunction _isIframe() {\n try {\n // Check that the current window is not the top window.\n // If so, return true.\n return !!(window && window !== window.top);\n } catch (e) {\n return false;\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/*\r\n * Determine the SDK version string\r\n */\nfunction _getClientVersion(clientPlatform, frameworks = []) {\n let reportedPlatform;\n switch (clientPlatform) {\n case \"Browser\" /* ClientPlatform.BROWSER */:\n // In a browser environment, report the browser name.\n reportedPlatform = _getBrowserName(getUA());\n break;\n case \"Worker\" /* ClientPlatform.WORKER */:\n // Technically a worker runs from a browser but we need to differentiate a\n // worker from a browser.\n // For example: Chrome-Worker/JsCore/4.9.1/FirebaseCore-web.\n reportedPlatform = `${_getBrowserName(getUA())}-${clientPlatform}`;\n break;\n default:\n reportedPlatform = clientPlatform;\n }\n const reportedFrameworks = frameworks.length ? frameworks.join(',') : 'FirebaseCore-web'; /* default value if no other framework is used */\n return `${reportedPlatform}/${\"JsCore\" /* ClientImplementation.CORE */}/${SDK_VERSION}/${reportedFrameworks}`;\n}\n\n/**\r\n * @license\r\n * Copyright 2022 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nclass AuthMiddlewareQueue {\n constructor(auth) {\n this.auth = auth;\n this.queue = [];\n }\n pushCallback(callback, onAbort) {\n // The callback could be sync or async. Wrap it into a\n // function that is always async.\n const wrappedCallback = user => new Promise((resolve, reject) => {\n try {\n const result = callback(user);\n // Either resolve with existing promise or wrap a non-promise\n // return value into a promise.\n resolve(result);\n } catch (e) {\n // Sync callback throws.\n reject(e);\n }\n });\n // Attach the onAbort if present\n wrappedCallback.onAbort = onAbort;\n this.queue.push(wrappedCallback);\n const index = this.queue.length - 1;\n return () => {\n // Unsubscribe. Replace with no-op. Do not remove from array, or it will disturb\n // indexing of other elements.\n this.queue[index] = () => Promise.resolve();\n };\n }\n async runMiddleware(nextUser) {\n if (this.auth.currentUser === nextUser) {\n return;\n }\n // While running the middleware, build a temporary stack of onAbort\n // callbacks to call if one middleware callback rejects.\n const onAbortStack = [];\n try {\n for (const beforeStateCallback of this.queue) {\n await beforeStateCallback(nextUser);\n // Only push the onAbort if the callback succeeds\n if (beforeStateCallback.onAbort) {\n onAbortStack.push(beforeStateCallback.onAbort);\n }\n }\n } catch (e) {\n // Run all onAbort, with separate try/catch to ignore any errors and\n // continue\n onAbortStack.reverse();\n for (const onAbort of onAbortStack) {\n try {\n onAbort();\n } catch (_) {\n /* swallow error */\n }\n }\n throw this.auth._errorFactory.create(\"login-blocked\" /* AuthErrorCode.LOGIN_BLOCKED */, {\n originalMessage: e === null || e === void 0 ? void 0 : e.message\n });\n }\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2023 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Fetches the password policy for the currently set tenant or the project if no tenant is set.\r\n *\r\n * @param auth Auth object.\r\n * @param request Password policy request.\r\n * @returns Password policy response.\r\n */\nasync function _getPasswordPolicy(auth, request = {}) {\n return _performApiRequest(auth, \"GET\" /* HttpMethod.GET */, \"/v2/passwordPolicy\" /* Endpoint.GET_PASSWORD_POLICY */, _addTidIfNecessary(auth, request));\n}\n\n/**\r\n * @license\r\n * Copyright 2023 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n// Minimum min password length enforced by the backend, even if no minimum length is set.\nconst MINIMUM_MIN_PASSWORD_LENGTH = 6;\n/**\r\n * Stores password policy requirements and provides password validation against the policy.\r\n *\r\n * @internal\r\n */\nclass PasswordPolicyImpl {\n constructor(response) {\n var _a, _b, _c, _d;\n // Only include custom strength options defined in the response.\n const responseOptions = response.customStrengthOptions;\n this.customStrengthOptions = {};\n // TODO: Remove once the backend is updated to include the minimum min password length instead of undefined when there is no minimum length set.\n this.customStrengthOptions.minPasswordLength = (_a = responseOptions.minPasswordLength) !== null && _a !== void 0 ? _a : MINIMUM_MIN_PASSWORD_LENGTH;\n if (responseOptions.maxPasswordLength) {\n this.customStrengthOptions.maxPasswordLength = responseOptions.maxPasswordLength;\n }\n if (responseOptions.containsLowercaseCharacter !== undefined) {\n this.customStrengthOptions.containsLowercaseLetter = responseOptions.containsLowercaseCharacter;\n }\n if (responseOptions.containsUppercaseCharacter !== undefined) {\n this.customStrengthOptions.containsUppercaseLetter = responseOptions.containsUppercaseCharacter;\n }\n if (responseOptions.containsNumericCharacter !== undefined) {\n this.customStrengthOptions.containsNumericCharacter = responseOptions.containsNumericCharacter;\n }\n if (responseOptions.containsNonAlphanumericCharacter !== undefined) {\n this.customStrengthOptions.containsNonAlphanumericCharacter = responseOptions.containsNonAlphanumericCharacter;\n }\n this.enforcementState = response.enforcementState;\n if (this.enforcementState === 'ENFORCEMENT_STATE_UNSPECIFIED') {\n this.enforcementState = 'OFF';\n }\n // Use an empty string if no non-alphanumeric characters are specified in the response.\n this.allowedNonAlphanumericCharacters = (_c = (_b = response.allowedNonAlphanumericCharacters) === null || _b === void 0 ? void 0 : _b.join('')) !== null && _c !== void 0 ? _c : '';\n this.forceUpgradeOnSignin = (_d = response.forceUpgradeOnSignin) !== null && _d !== void 0 ? _d : false;\n this.schemaVersion = response.schemaVersion;\n }\n validatePassword(password) {\n var _a, _b, _c, _d, _e, _f;\n const status = {\n isValid: true,\n passwordPolicy: this\n };\n // Check the password length and character options.\n this.validatePasswordLengthOptions(password, status);\n this.validatePasswordCharacterOptions(password, status);\n // Combine the status into single isValid property.\n status.isValid && (status.isValid = (_a = status.meetsMinPasswordLength) !== null && _a !== void 0 ? _a : true);\n status.isValid && (status.isValid = (_b = status.meetsMaxPasswordLength) !== null && _b !== void 0 ? _b : true);\n status.isValid && (status.isValid = (_c = status.containsLowercaseLetter) !== null && _c !== void 0 ? _c : true);\n status.isValid && (status.isValid = (_d = status.containsUppercaseLetter) !== null && _d !== void 0 ? _d : true);\n status.isValid && (status.isValid = (_e = status.containsNumericCharacter) !== null && _e !== void 0 ? _e : true);\n status.isValid && (status.isValid = (_f = status.containsNonAlphanumericCharacter) !== null && _f !== void 0 ? _f : true);\n return status;\n }\n /**\r\n * Validates that the password meets the length options for the policy.\r\n *\r\n * @param password Password to validate.\r\n * @param status Validation status.\r\n */\n validatePasswordLengthOptions(password, status) {\n const minPasswordLength = this.customStrengthOptions.minPasswordLength;\n const maxPasswordLength = this.customStrengthOptions.maxPasswordLength;\n if (minPasswordLength) {\n status.meetsMinPasswordLength = password.length >= minPasswordLength;\n }\n if (maxPasswordLength) {\n status.meetsMaxPasswordLength = password.length <= maxPasswordLength;\n }\n }\n /**\r\n * Validates that the password meets the character options for the policy.\r\n *\r\n * @param password Password to validate.\r\n * @param status Validation status.\r\n */\n validatePasswordCharacterOptions(password, status) {\n // Assign statuses for requirements even if the password is an empty string.\n this.updatePasswordCharacterOptionsStatuses(status, /* containsLowercaseCharacter= */false, /* containsUppercaseCharacter= */false, /* containsNumericCharacter= */false, /* containsNonAlphanumericCharacter= */false);\n let passwordChar;\n for (let i = 0; i < password.length; i++) {\n passwordChar = password.charAt(i);\n this.updatePasswordCharacterOptionsStatuses(status, /* containsLowercaseCharacter= */passwordChar >= 'a' && passwordChar <= 'z', /* containsUppercaseCharacter= */passwordChar >= 'A' && passwordChar <= 'Z', /* containsNumericCharacter= */passwordChar >= '0' && passwordChar <= '9', /* containsNonAlphanumericCharacter= */this.allowedNonAlphanumericCharacters.includes(passwordChar));\n }\n }\n /**\r\n * Updates the running validation status with the statuses for the character options.\r\n * Expected to be called each time a character is processed to update each option status\r\n * based on the current character.\r\n *\r\n * @param status Validation status.\r\n * @param containsLowercaseCharacter Whether the character is a lowercase letter.\r\n * @param containsUppercaseCharacter Whether the character is an uppercase letter.\r\n * @param containsNumericCharacter Whether the character is a numeric character.\r\n * @param containsNonAlphanumericCharacter Whether the character is a non-alphanumeric character.\r\n */\n updatePasswordCharacterOptionsStatuses(status, containsLowercaseCharacter, containsUppercaseCharacter, containsNumericCharacter, containsNonAlphanumericCharacter) {\n if (this.customStrengthOptions.containsLowercaseLetter) {\n status.containsLowercaseLetter || (status.containsLowercaseLetter = containsLowercaseCharacter);\n }\n if (this.customStrengthOptions.containsUppercaseLetter) {\n status.containsUppercaseLetter || (status.containsUppercaseLetter = containsUppercaseCharacter);\n }\n if (this.customStrengthOptions.containsNumericCharacter) {\n status.containsNumericCharacter || (status.containsNumericCharacter = containsNumericCharacter);\n }\n if (this.customStrengthOptions.containsNonAlphanumericCharacter) {\n status.containsNonAlphanumericCharacter || (status.containsNonAlphanumericCharacter = containsNonAlphanumericCharacter);\n }\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nclass AuthImpl {\n constructor(app, heartbeatServiceProvider, appCheckServiceProvider, config) {\n this.app = app;\n this.heartbeatServiceProvider = heartbeatServiceProvider;\n this.appCheckServiceProvider = appCheckServiceProvider;\n this.config = config;\n this.currentUser = null;\n this.emulatorConfig = null;\n this.operations = Promise.resolve();\n this.authStateSubscription = new Subscription(this);\n this.idTokenSubscription = new Subscription(this);\n this.beforeStateQueue = new AuthMiddlewareQueue(this);\n this.redirectUser = null;\n this.isProactiveRefreshEnabled = false;\n this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION = 1;\n // Any network calls will set this to true and prevent subsequent emulator\n // initialization\n this._canInitEmulator = true;\n this._isInitialized = false;\n this._deleted = false;\n this._initializationPromise = null;\n this._popupRedirectResolver = null;\n this._errorFactory = _DEFAULT_AUTH_ERROR_FACTORY;\n this._agentRecaptchaConfig = null;\n this._tenantRecaptchaConfigs = {};\n this._projectPasswordPolicy = null;\n this._tenantPasswordPolicies = {};\n // Tracks the last notified UID for state change listeners to prevent\n // repeated calls to the callbacks. Undefined means it's never been\n // called, whereas null means it's been called with a signed out user\n this.lastNotifiedUid = undefined;\n this.languageCode = null;\n this.tenantId = null;\n this.settings = {\n appVerificationDisabledForTesting: false\n };\n this.frameworks = [];\n this.name = app.name;\n this.clientVersion = config.sdkClientVersion;\n }\n _initializeWithPersistence(persistenceHierarchy, popupRedirectResolver) {\n if (popupRedirectResolver) {\n this._popupRedirectResolver = _getInstance(popupRedirectResolver);\n }\n // Have to check for app deletion throughout initialization (after each\n // promise resolution)\n this._initializationPromise = this.queue(async () => {\n var _a, _b;\n if (this._deleted) {\n return;\n }\n this.persistenceManager = await PersistenceUserManager.create(this, persistenceHierarchy);\n if (this._deleted) {\n return;\n }\n // Initialize the resolver early if necessary (only applicable to web:\n // this will cause the iframe to load immediately in certain cases)\n if ((_a = this._popupRedirectResolver) === null || _a === void 0 ? void 0 : _a._shouldInitProactively) {\n // If this fails, don't halt auth loading\n try {\n await this._popupRedirectResolver._initialize(this);\n } catch (e) {\n /* Ignore the error */\n }\n }\n await this.initializeCurrentUser(popupRedirectResolver);\n this.lastNotifiedUid = ((_b = this.currentUser) === null || _b === void 0 ? void 0 : _b.uid) || null;\n if (this._deleted) {\n return;\n }\n this._isInitialized = true;\n });\n return this._initializationPromise;\n }\n /**\r\n * If the persistence is changed in another window, the user manager will let us know\r\n */\n async _onStorageEvent() {\n if (this._deleted) {\n return;\n }\n const user = await this.assertedPersistence.getCurrentUser();\n if (!this.currentUser && !user) {\n // No change, do nothing (was signed out and remained signed out).\n return;\n }\n // If the same user is to be synchronized.\n if (this.currentUser && user && this.currentUser.uid === user.uid) {\n // Data update, simply copy data changes.\n this._currentUser._assign(user);\n // If tokens changed from previous user tokens, this will trigger\n // notifyAuthListeners_.\n await this.currentUser.getIdToken();\n return;\n }\n // Update current Auth state. Either a new login or logout.\n // Skip blocking callbacks, they should not apply to a change in another tab.\n await this._updateCurrentUser(user, /* skipBeforeStateCallbacks */true);\n }\n async initializeCurrentUser(popupRedirectResolver) {\n var _a;\n // First check to see if we have a pending redirect event.\n const previouslyStoredUser = await this.assertedPersistence.getCurrentUser();\n let futureCurrentUser = previouslyStoredUser;\n let needsTocheckMiddleware = false;\n if (popupRedirectResolver && this.config.authDomain) {\n await this.getOrInitRedirectPersistenceManager();\n const redirectUserEventId = (_a = this.redirectUser) === null || _a === void 0 ? void 0 : _a._redirectEventId;\n const storedUserEventId = futureCurrentUser === null || futureCurrentUser === void 0 ? void 0 : futureCurrentUser._redirectEventId;\n const result = await this.tryRedirectSignIn(popupRedirectResolver);\n // If the stored user (i.e. the old \"currentUser\") has a redirectId that\n // matches the redirect user, then we want to initially sign in with the\n // new user object from result.\n // TODO(samgho): More thoroughly test all of this\n if ((!redirectUserEventId || redirectUserEventId === storedUserEventId) && (result === null || result === void 0 ? void 0 : result.user)) {\n futureCurrentUser = result.user;\n needsTocheckMiddleware = true;\n }\n }\n // If no user in persistence, there is no current user. Set to null.\n if (!futureCurrentUser) {\n return this.directlySetCurrentUser(null);\n }\n if (!futureCurrentUser._redirectEventId) {\n // This isn't a redirect link operation, we can reload and bail.\n // First though, ensure that we check the middleware is happy.\n if (needsTocheckMiddleware) {\n try {\n await this.beforeStateQueue.runMiddleware(futureCurrentUser);\n } catch (e) {\n futureCurrentUser = previouslyStoredUser;\n // We know this is available since the bit is only set when the\n // resolver is available\n this._popupRedirectResolver._overrideRedirectResult(this, () => Promise.reject(e));\n }\n }\n if (futureCurrentUser) {\n return this.reloadAndSetCurrentUserOrClear(futureCurrentUser);\n } else {\n return this.directlySetCurrentUser(null);\n }\n }\n _assert(this._popupRedirectResolver, this, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n await this.getOrInitRedirectPersistenceManager();\n // If the redirect user's event ID matches the current user's event ID,\n // DO NOT reload the current user, otherwise they'll be cleared from storage.\n // This is important for the reauthenticateWithRedirect() flow.\n if (this.redirectUser && this.redirectUser._redirectEventId === futureCurrentUser._redirectEventId) {\n return this.directlySetCurrentUser(futureCurrentUser);\n }\n return this.reloadAndSetCurrentUserOrClear(futureCurrentUser);\n }\n async tryRedirectSignIn(redirectResolver) {\n // The redirect user needs to be checked (and signed in if available)\n // during auth initialization. All of the normal sign in and link/reauth\n // flows call back into auth and push things onto the promise queue. We\n // need to await the result of the redirect sign in *inside the promise\n // queue*. This presents a problem: we run into deadlock. See:\n // ┌> [Initialization] ─────┐\n // ┌> [] │\n // └─ [getRedirectResult] <─┘\n // where [] are tasks on the queue and arrows denote awaits\n // Initialization will never complete because it's waiting on something\n // that's waiting for initialization to complete!\n //\n // Instead, this method calls getRedirectResult() (stored in\n // _completeRedirectFn) with an optional parameter that instructs all of\n // the underlying auth operations to skip anything that mutates auth state.\n let result = null;\n try {\n // We know this._popupRedirectResolver is set since redirectResolver\n // is passed in. The _completeRedirectFn expects the unwrapped extern.\n result = await this._popupRedirectResolver._completeRedirectFn(this, redirectResolver, true);\n } catch (e) {\n // Swallow any errors here; the code can retrieve them in\n // getRedirectResult().\n await this._setRedirectUser(null);\n }\n return result;\n }\n async reloadAndSetCurrentUserOrClear(user) {\n try {\n await _reloadWithoutSaving(user);\n } catch (e) {\n if ((e === null || e === void 0 ? void 0 : e.code) !== `auth/${\"network-request-failed\" /* AuthErrorCode.NETWORK_REQUEST_FAILED */}`) {\n // Something's wrong with the user's token. Log them out and remove\n // them from storage\n return this.directlySetCurrentUser(null);\n }\n }\n return this.directlySetCurrentUser(user);\n }\n useDeviceLanguage() {\n this.languageCode = _getUserLanguage();\n }\n async _delete() {\n this._deleted = true;\n }\n async updateCurrentUser(userExtern) {\n // The public updateCurrentUser method needs to make a copy of the user,\n // and also check that the project matches\n const user = userExtern ? getModularInstance(userExtern) : null;\n if (user) {\n _assert(user.auth.config.apiKey === this.config.apiKey, this, \"invalid-user-token\" /* AuthErrorCode.INVALID_AUTH */);\n }\n return this._updateCurrentUser(user && user._clone(this));\n }\n async _updateCurrentUser(user, skipBeforeStateCallbacks = false) {\n if (this._deleted) {\n return;\n }\n if (user) {\n _assert(this.tenantId === user.tenantId, this, \"tenant-id-mismatch\" /* AuthErrorCode.TENANT_ID_MISMATCH */);\n }\n if (!skipBeforeStateCallbacks) {\n await this.beforeStateQueue.runMiddleware(user);\n }\n return this.queue(async () => {\n await this.directlySetCurrentUser(user);\n this.notifyAuthListeners();\n });\n }\n async signOut() {\n // Run first, to block _setRedirectUser() if any callbacks fail.\n await this.beforeStateQueue.runMiddleware(null);\n // Clear the redirect user when signOut is called\n if (this.redirectPersistenceManager || this._popupRedirectResolver) {\n await this._setRedirectUser(null);\n }\n // Prevent callbacks from being called again in _updateCurrentUser, as\n // they were already called in the first line.\n return this._updateCurrentUser(null, /* skipBeforeStateCallbacks */true);\n }\n setPersistence(persistence) {\n return this.queue(async () => {\n await this.assertedPersistence.setPersistence(_getInstance(persistence));\n });\n }\n _getRecaptchaConfig() {\n if (this.tenantId == null) {\n return this._agentRecaptchaConfig;\n } else {\n return this._tenantRecaptchaConfigs[this.tenantId];\n }\n }\n async validatePassword(password) {\n if (!this._getPasswordPolicyInternal()) {\n await this._updatePasswordPolicy();\n }\n // Password policy will be defined after fetching.\n const passwordPolicy = this._getPasswordPolicyInternal();\n // Check that the policy schema version is supported by the SDK.\n // TODO: Update this logic to use a max supported policy schema version once we have multiple schema versions.\n if (passwordPolicy.schemaVersion !== this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION) {\n return Promise.reject(this._errorFactory.create(\"unsupported-password-policy-schema-version\" /* AuthErrorCode.UNSUPPORTED_PASSWORD_POLICY_SCHEMA_VERSION */, {}));\n }\n return passwordPolicy.validatePassword(password);\n }\n _getPasswordPolicyInternal() {\n if (this.tenantId === null) {\n return this._projectPasswordPolicy;\n } else {\n return this._tenantPasswordPolicies[this.tenantId];\n }\n }\n async _updatePasswordPolicy() {\n const response = await _getPasswordPolicy(this);\n const passwordPolicy = new PasswordPolicyImpl(response);\n if (this.tenantId === null) {\n this._projectPasswordPolicy = passwordPolicy;\n } else {\n this._tenantPasswordPolicies[this.tenantId] = passwordPolicy;\n }\n }\n _getPersistence() {\n return this.assertedPersistence.persistence.type;\n }\n _updateErrorMap(errorMap) {\n this._errorFactory = new ErrorFactory('auth', 'Firebase', errorMap());\n }\n onAuthStateChanged(nextOrObserver, error, completed) {\n return this.registerStateListener(this.authStateSubscription, nextOrObserver, error, completed);\n }\n beforeAuthStateChanged(callback, onAbort) {\n return this.beforeStateQueue.pushCallback(callback, onAbort);\n }\n onIdTokenChanged(nextOrObserver, error, completed) {\n return this.registerStateListener(this.idTokenSubscription, nextOrObserver, error, completed);\n }\n authStateReady() {\n return new Promise((resolve, reject) => {\n if (this.currentUser) {\n resolve();\n } else {\n const unsubscribe = this.onAuthStateChanged(() => {\n unsubscribe();\n resolve();\n }, reject);\n }\n });\n }\n /**\r\n * Revokes the given access token. Currently only supports Apple OAuth access tokens.\r\n */\n async revokeAccessToken(token) {\n if (this.currentUser) {\n const idToken = await this.currentUser.getIdToken();\n // Generalize this to accept other providers once supported.\n const request = {\n providerId: 'apple.com',\n tokenType: \"ACCESS_TOKEN\" /* TokenType.ACCESS_TOKEN */,\n token,\n idToken\n };\n if (this.tenantId != null) {\n request.tenantId = this.tenantId;\n }\n await revokeToken(this, request);\n }\n }\n toJSON() {\n var _a;\n return {\n apiKey: this.config.apiKey,\n authDomain: this.config.authDomain,\n appName: this.name,\n currentUser: (_a = this._currentUser) === null || _a === void 0 ? void 0 : _a.toJSON()\n };\n }\n async _setRedirectUser(user, popupRedirectResolver) {\n const redirectManager = await this.getOrInitRedirectPersistenceManager(popupRedirectResolver);\n return user === null ? redirectManager.removeCurrentUser() : redirectManager.setCurrentUser(user);\n }\n async getOrInitRedirectPersistenceManager(popupRedirectResolver) {\n if (!this.redirectPersistenceManager) {\n const resolver = popupRedirectResolver && _getInstance(popupRedirectResolver) || this._popupRedirectResolver;\n _assert(resolver, this, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n this.redirectPersistenceManager = await PersistenceUserManager.create(this, [_getInstance(resolver._redirectPersistence)], \"redirectUser\" /* KeyName.REDIRECT_USER */);\n this.redirectUser = await this.redirectPersistenceManager.getCurrentUser();\n }\n return this.redirectPersistenceManager;\n }\n async _redirectUserForId(id) {\n var _a, _b;\n // Make sure we've cleared any pending persistence actions if we're not in\n // the initializer\n if (this._isInitialized) {\n await this.queue(async () => {});\n }\n if (((_a = this._currentUser) === null || _a === void 0 ? void 0 : _a._redirectEventId) === id) {\n return this._currentUser;\n }\n if (((_b = this.redirectUser) === null || _b === void 0 ? void 0 : _b._redirectEventId) === id) {\n return this.redirectUser;\n }\n return null;\n }\n async _persistUserIfCurrent(user) {\n if (user === this.currentUser) {\n return this.queue(async () => this.directlySetCurrentUser(user));\n }\n }\n /** Notifies listeners only if the user is current */\n _notifyListenersIfCurrent(user) {\n if (user === this.currentUser) {\n this.notifyAuthListeners();\n }\n }\n _key() {\n return `${this.config.authDomain}:${this.config.apiKey}:${this.name}`;\n }\n _startProactiveRefresh() {\n this.isProactiveRefreshEnabled = true;\n if (this.currentUser) {\n this._currentUser._startProactiveRefresh();\n }\n }\n _stopProactiveRefresh() {\n this.isProactiveRefreshEnabled = false;\n if (this.currentUser) {\n this._currentUser._stopProactiveRefresh();\n }\n }\n /** Returns the current user cast as the internal type */\n get _currentUser() {\n return this.currentUser;\n }\n notifyAuthListeners() {\n var _a, _b;\n if (!this._isInitialized) {\n return;\n }\n this.idTokenSubscription.next(this.currentUser);\n const currentUid = (_b = (_a = this.currentUser) === null || _a === void 0 ? void 0 : _a.uid) !== null && _b !== void 0 ? _b : null;\n if (this.lastNotifiedUid !== currentUid) {\n this.lastNotifiedUid = currentUid;\n this.authStateSubscription.next(this.currentUser);\n }\n }\n registerStateListener(subscription, nextOrObserver, error, completed) {\n if (this._deleted) {\n return () => {};\n }\n const cb = typeof nextOrObserver === 'function' ? nextOrObserver : nextOrObserver.next.bind(nextOrObserver);\n let isUnsubscribed = false;\n const promise = this._isInitialized ? Promise.resolve() : this._initializationPromise;\n _assert(promise, this, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n // The callback needs to be called asynchronously per the spec.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n promise.then(() => {\n if (isUnsubscribed) {\n return;\n }\n cb(this.currentUser);\n });\n if (typeof nextOrObserver === 'function') {\n const unsubscribe = subscription.addObserver(nextOrObserver, error, completed);\n return () => {\n isUnsubscribed = true;\n unsubscribe();\n };\n } else {\n const unsubscribe = subscription.addObserver(nextOrObserver);\n return () => {\n isUnsubscribed = true;\n unsubscribe();\n };\n }\n }\n /**\r\n * Unprotected (from race conditions) method to set the current user. This\r\n * should only be called from within a queued callback. This is necessary\r\n * because the queue shouldn't rely on another queued callback.\r\n */\n async directlySetCurrentUser(user) {\n if (this.currentUser && this.currentUser !== user) {\n this._currentUser._stopProactiveRefresh();\n }\n if (user && this.isProactiveRefreshEnabled) {\n user._startProactiveRefresh();\n }\n this.currentUser = user;\n if (user) {\n await this.assertedPersistence.setCurrentUser(user);\n } else {\n await this.assertedPersistence.removeCurrentUser();\n }\n }\n queue(action) {\n // In case something errors, the callback still should be called in order\n // to keep the promise chain alive\n this.operations = this.operations.then(action, action);\n return this.operations;\n }\n get assertedPersistence() {\n _assert(this.persistenceManager, this, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n return this.persistenceManager;\n }\n _logFramework(framework) {\n if (!framework || this.frameworks.includes(framework)) {\n return;\n }\n this.frameworks.push(framework);\n // Sort alphabetically so that \"FirebaseCore-web,FirebaseUI-web\" and\n // \"FirebaseUI-web,FirebaseCore-web\" aren't viewed as different.\n this.frameworks.sort();\n this.clientVersion = _getClientVersion(this.config.clientPlatform, this._getFrameworks());\n }\n _getFrameworks() {\n return this.frameworks;\n }\n async _getAdditionalHeaders() {\n var _a;\n // Additional headers on every request\n const headers = {\n [\"X-Client-Version\" /* HttpHeader.X_CLIENT_VERSION */]: this.clientVersion\n };\n if (this.app.options.appId) {\n headers[\"X-Firebase-gmpid\" /* HttpHeader.X_FIREBASE_GMPID */] = this.app.options.appId;\n }\n // If the heartbeat service exists, add the heartbeat string\n const heartbeatsHeader = await ((_a = this.heartbeatServiceProvider.getImmediate({\n optional: true\n })) === null || _a === void 0 ? void 0 : _a.getHeartbeatsHeader());\n if (heartbeatsHeader) {\n headers[\"X-Firebase-Client\" /* HttpHeader.X_FIREBASE_CLIENT */] = heartbeatsHeader;\n }\n // If the App Check service exists, add the App Check token in the headers\n const appCheckToken = await this._getAppCheckToken();\n if (appCheckToken) {\n headers[\"X-Firebase-AppCheck\" /* HttpHeader.X_FIREBASE_APP_CHECK */] = appCheckToken;\n }\n return headers;\n }\n async _getAppCheckToken() {\n var _a;\n const appCheckTokenResult = await ((_a = this.appCheckServiceProvider.getImmediate({\n optional: true\n })) === null || _a === void 0 ? void 0 : _a.getToken());\n if (appCheckTokenResult === null || appCheckTokenResult === void 0 ? void 0 : appCheckTokenResult.error) {\n // Context: appCheck.getToken() will never throw even if an error happened.\n // In the error case, a dummy token will be returned along with an error field describing\n // the error. In general, we shouldn't care about the error condition and just use\n // the token (actual or dummy) to send requests.\n _logWarn(`Error while retrieving App Check token: ${appCheckTokenResult.error}`);\n }\n return appCheckTokenResult === null || appCheckTokenResult === void 0 ? void 0 : appCheckTokenResult.token;\n }\n}\n/**\r\n * Method to be used to cast down to our private implmentation of Auth.\r\n * It will also handle unwrapping from the compat type if necessary\r\n *\r\n * @param auth Auth object passed in from developer\r\n */\nfunction _castAuth(auth) {\n return getModularInstance(auth);\n}\n/** Helper class to wrap subscriber logic */\nclass Subscription {\n constructor(auth) {\n this.auth = auth;\n this.observer = null;\n this.addObserver = createSubscribe(observer => this.observer = observer);\n }\n get next() {\n _assert(this.observer, this.auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n return this.observer.next.bind(this.observer);\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction getScriptParentElement() {\n var _a, _b;\n return (_b = (_a = document.getElementsByTagName('head')) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : document;\n}\nfunction _loadJS(url) {\n // TODO: consider adding timeout support & cancellation\n return new Promise((resolve, reject) => {\n const el = document.createElement('script');\n el.setAttribute('src', url);\n el.onload = resolve;\n el.onerror = e => {\n const error = _createError(\"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n error.customData = e;\n reject(error);\n };\n el.type = 'text/javascript';\n el.charset = 'UTF-8';\n getScriptParentElement().appendChild(el);\n });\n}\nfunction _generateCallbackName(prefix) {\n return `__${prefix}${Math.floor(Math.random() * 1000000)}`;\n}\n\n/* eslint-disable @typescript-eslint/no-require-imports */\nconst RECAPTCHA_ENTERPRISE_URL = 'https://www.google.com/recaptcha/enterprise.js?render=';\nconst RECAPTCHA_ENTERPRISE_VERIFIER_TYPE = 'recaptcha-enterprise';\nconst FAKE_TOKEN = 'NO_RECAPTCHA';\nclass RecaptchaEnterpriseVerifier {\n /**\r\n *\r\n * @param authExtern - The corresponding Firebase {@link Auth} instance.\r\n *\r\n */\n constructor(authExtern) {\n /**\r\n * Identifies the type of application verifier (e.g. \"recaptcha-enterprise\").\r\n */\n this.type = RECAPTCHA_ENTERPRISE_VERIFIER_TYPE;\n this.auth = _castAuth(authExtern);\n }\n /**\r\n * Executes the verification process.\r\n *\r\n * @returns A Promise for a token that can be used to assert the validity of a request.\r\n */\n async verify(action = 'verify', forceRefresh = false) {\n async function retrieveSiteKey(auth) {\n if (!forceRefresh) {\n if (auth.tenantId == null && auth._agentRecaptchaConfig != null) {\n return auth._agentRecaptchaConfig.siteKey;\n }\n if (auth.tenantId != null && auth._tenantRecaptchaConfigs[auth.tenantId] !== undefined) {\n return auth._tenantRecaptchaConfigs[auth.tenantId].siteKey;\n }\n }\n return new Promise(async (resolve, reject) => {\n getRecaptchaConfig(auth, {\n clientType: \"CLIENT_TYPE_WEB\" /* RecaptchaClientType.WEB */,\n version: \"RECAPTCHA_ENTERPRISE\" /* RecaptchaVersion.ENTERPRISE */\n }).then(response => {\n if (response.recaptchaKey === undefined) {\n reject(new Error('recaptcha Enterprise site key undefined'));\n } else {\n const config = new RecaptchaConfig(response);\n if (auth.tenantId == null) {\n auth._agentRecaptchaConfig = config;\n } else {\n auth._tenantRecaptchaConfigs[auth.tenantId] = config;\n }\n return resolve(config.siteKey);\n }\n }).catch(error => {\n reject(error);\n });\n });\n }\n function retrieveRecaptchaToken(siteKey, resolve, reject) {\n const grecaptcha = window.grecaptcha;\n if (isEnterprise(grecaptcha)) {\n grecaptcha.enterprise.ready(() => {\n grecaptcha.enterprise.execute(siteKey, {\n action\n }).then(token => {\n resolve(token);\n }).catch(() => {\n resolve(FAKE_TOKEN);\n });\n });\n } else {\n reject(Error('No reCAPTCHA enterprise script loaded.'));\n }\n }\n return new Promise((resolve, reject) => {\n retrieveSiteKey(this.auth).then(siteKey => {\n if (!forceRefresh && isEnterprise(window.grecaptcha)) {\n retrieveRecaptchaToken(siteKey, resolve, reject);\n } else {\n if (typeof window === 'undefined') {\n reject(new Error('RecaptchaVerifier is only supported in browser'));\n return;\n }\n _loadJS(RECAPTCHA_ENTERPRISE_URL + siteKey).then(() => {\n retrieveRecaptchaToken(siteKey, resolve, reject);\n }).catch(error => {\n reject(error);\n });\n }\n }).catch(error => {\n reject(error);\n });\n });\n }\n}\nasync function injectRecaptchaFields(auth, request, action, captchaResp = false) {\n const verifier = new RecaptchaEnterpriseVerifier(auth);\n let captchaResponse;\n try {\n captchaResponse = await verifier.verify(action);\n } catch (error) {\n captchaResponse = await verifier.verify(action, true);\n }\n const newRequest = Object.assign({}, request);\n if (!captchaResp) {\n Object.assign(newRequest, {\n captchaResponse\n });\n } else {\n Object.assign(newRequest, {\n 'captchaResp': captchaResponse\n });\n }\n Object.assign(newRequest, {\n 'clientType': \"CLIENT_TYPE_WEB\" /* RecaptchaClientType.WEB */\n });\n Object.assign(newRequest, {\n 'recaptchaVersion': \"RECAPTCHA_ENTERPRISE\" /* RecaptchaVersion.ENTERPRISE */\n });\n return newRequest;\n}\nasync function handleRecaptchaFlow(authInstance, request, actionName, actionMethod) {\n var _a;\n if ((_a = authInstance._getRecaptchaConfig()) === null || _a === void 0 ? void 0 : _a.isProviderEnabled(\"EMAIL_PASSWORD_PROVIDER\" /* RecaptchaProvider.EMAIL_PASSWORD_PROVIDER */)) {\n const requestWithRecaptcha = await injectRecaptchaFields(authInstance, request, actionName, actionName === \"getOobCode\" /* RecaptchaActionName.GET_OOB_CODE */);\n return actionMethod(authInstance, requestWithRecaptcha);\n } else {\n return actionMethod(authInstance, request).catch(async error => {\n if (error.code === `auth/${\"missing-recaptcha-token\" /* AuthErrorCode.MISSING_RECAPTCHA_TOKEN */}`) {\n console.log(`${actionName} is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow.`);\n const requestWithRecaptcha = await injectRecaptchaFields(authInstance, request, actionName, actionName === \"getOobCode\" /* RecaptchaActionName.GET_OOB_CODE */);\n return actionMethod(authInstance, requestWithRecaptcha);\n } else {\n return Promise.reject(error);\n }\n });\n }\n}\nasync function _initializeRecaptchaConfig(auth) {\n const authInternal = _castAuth(auth);\n const response = await getRecaptchaConfig(authInternal, {\n clientType: \"CLIENT_TYPE_WEB\" /* RecaptchaClientType.WEB */,\n version: \"RECAPTCHA_ENTERPRISE\" /* RecaptchaVersion.ENTERPRISE */\n });\n const config = new RecaptchaConfig(response);\n if (authInternal.tenantId == null) {\n authInternal._agentRecaptchaConfig = config;\n } else {\n authInternal._tenantRecaptchaConfigs[authInternal.tenantId] = config;\n }\n if (config.isProviderEnabled(\"EMAIL_PASSWORD_PROVIDER\" /* RecaptchaProvider.EMAIL_PASSWORD_PROVIDER */)) {\n const verifier = new RecaptchaEnterpriseVerifier(authInternal);\n void verifier.verify();\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Initializes an {@link Auth} instance with fine-grained control over\r\n * {@link Dependencies}.\r\n *\r\n * @remarks\r\n *\r\n * This function allows more control over the {@link Auth} instance than\r\n * {@link getAuth}. `getAuth` uses platform-specific defaults to supply\r\n * the {@link Dependencies}. In general, `getAuth` is the easiest way to\r\n * initialize Auth and works for most use cases. Use `initializeAuth` if you\r\n * need control over which persistence layer is used, or to minimize bundle\r\n * size if you're not using either `signInWithPopup` or `signInWithRedirect`.\r\n *\r\n * For example, if your app only uses anonymous accounts and you only want\r\n * accounts saved for the current session, initialize `Auth` with:\r\n *\r\n * ```js\r\n * const auth = initializeAuth(app, {\r\n * persistence: browserSessionPersistence,\r\n * popupRedirectResolver: undefined,\r\n * });\r\n * ```\r\n *\r\n * @public\r\n */\nfunction initializeAuth(app, deps) {\n const provider = _getProvider(app, 'auth');\n if (provider.isInitialized()) {\n const auth = provider.getImmediate();\n const initialOptions = provider.getOptions();\n if (deepEqual(initialOptions, deps !== null && deps !== void 0 ? deps : {})) {\n return auth;\n } else {\n _fail(auth, \"already-initialized\" /* AuthErrorCode.ALREADY_INITIALIZED */);\n }\n }\n const auth = provider.initialize({\n options: deps\n });\n return auth;\n}\nfunction _initializeAuthInstance(auth, deps) {\n const persistence = (deps === null || deps === void 0 ? void 0 : deps.persistence) || [];\n const hierarchy = (Array.isArray(persistence) ? persistence : [persistence]).map(_getInstance);\n if (deps === null || deps === void 0 ? void 0 : deps.errorMap) {\n auth._updateErrorMap(deps.errorMap);\n }\n // This promise is intended to float; auth initialization happens in the\n // background, meanwhile the auth object may be used by the app.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n auth._initializeWithPersistence(hierarchy, deps === null || deps === void 0 ? void 0 : deps.popupRedirectResolver);\n}\n\n/**\r\n * Changes the {@link Auth} instance to communicate with the Firebase Auth Emulator, instead of production\r\n * Firebase Auth services.\r\n *\r\n * @remarks\r\n * This must be called synchronously immediately following the first call to\r\n * {@link initializeAuth}. Do not use with production credentials as emulator\r\n * traffic is not encrypted.\r\n *\r\n *\r\n * @example\r\n * ```javascript\r\n * connectAuthEmulator(auth, 'http://127.0.0.1:9099', { disableWarnings: true });\r\n * ```\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param url - The URL at which the emulator is running (eg, 'http://localhost:9099').\r\n * @param options - Optional. `options.disableWarnings` defaults to `false`. Set it to\r\n * `true` to disable the warning banner attached to the DOM.\r\n *\r\n * @public\r\n */\nfunction connectAuthEmulator(auth, url, options) {\n const authInternal = _castAuth(auth);\n _assert(authInternal._canInitEmulator, authInternal, \"emulator-config-failed\" /* AuthErrorCode.EMULATOR_CONFIG_FAILED */);\n _assert(/^https?:\\/\\//.test(url), authInternal, \"invalid-emulator-scheme\" /* AuthErrorCode.INVALID_EMULATOR_SCHEME */);\n const disableWarnings = !!(options === null || options === void 0 ? void 0 : options.disableWarnings);\n const protocol = extractProtocol(url);\n const {\n host,\n port\n } = extractHostAndPort(url);\n const portStr = port === null ? '' : `:${port}`;\n // Always replace path with \"/\" (even if input url had no path at all, or had a different one).\n authInternal.config.emulator = {\n url: `${protocol}//${host}${portStr}/`\n };\n authInternal.settings.appVerificationDisabledForTesting = true;\n authInternal.emulatorConfig = Object.freeze({\n host,\n port,\n protocol: protocol.replace(':', ''),\n options: Object.freeze({\n disableWarnings\n })\n });\n if (!disableWarnings) {\n emitEmulatorWarning();\n }\n}\nfunction extractProtocol(url) {\n const protocolEnd = url.indexOf(':');\n return protocolEnd < 0 ? '' : url.substr(0, protocolEnd + 1);\n}\nfunction extractHostAndPort(url) {\n const protocol = extractProtocol(url);\n const authority = /(\\/\\/)?([^?#/]+)/.exec(url.substr(protocol.length)); // Between // and /, ? or #.\n if (!authority) {\n return {\n host: '',\n port: null\n };\n }\n const hostAndPort = authority[2].split('@').pop() || ''; // Strip out \"username:password@\".\n const bracketedIPv6 = /^(\\[[^\\]]+\\])(:|$)/.exec(hostAndPort);\n if (bracketedIPv6) {\n const host = bracketedIPv6[1];\n return {\n host,\n port: parsePort(hostAndPort.substr(host.length + 1))\n };\n } else {\n const [host, port] = hostAndPort.split(':');\n return {\n host,\n port: parsePort(port)\n };\n }\n}\nfunction parsePort(portStr) {\n if (!portStr) {\n return null;\n }\n const port = Number(portStr);\n if (isNaN(port)) {\n return null;\n }\n return port;\n}\nfunction emitEmulatorWarning() {\n function attachBanner() {\n const el = document.createElement('p');\n const sty = el.style;\n el.innerText = 'Running in emulator mode. Do not use with production credentials.';\n sty.position = 'fixed';\n sty.width = '100%';\n sty.backgroundColor = '#ffffff';\n sty.border = '.1em solid #000000';\n sty.color = '#b50000';\n sty.bottom = '0px';\n sty.left = '0px';\n sty.margin = '0px';\n sty.zIndex = '10000';\n sty.textAlign = 'center';\n el.classList.add('firebase-emulator-warning');\n document.body.appendChild(el);\n }\n if (typeof console !== 'undefined' && typeof console.info === 'function') {\n console.info('WARNING: You are using the Auth Emulator,' + ' which is intended for local testing only. Do not use with' + ' production credentials.');\n }\n if (typeof window !== 'undefined' && typeof document !== 'undefined') {\n if (document.readyState === 'loading') {\n window.addEventListener('DOMContentLoaded', attachBanner);\n } else {\n attachBanner();\n }\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Interface that represents the credentials returned by an {@link AuthProvider}.\r\n *\r\n * @remarks\r\n * Implementations specify the details about each auth provider's credential requirements.\r\n *\r\n * @public\r\n */\nclass AuthCredential {\n /** @internal */\n constructor(\n /**\r\n * The authentication provider ID for the credential.\r\n *\r\n * @remarks\r\n * For example, 'facebook.com', or 'google.com'.\r\n */\n providerId,\n /**\r\n * The authentication sign in method for the credential.\r\n *\r\n * @remarks\r\n * For example, {@link SignInMethod}.EMAIL_PASSWORD, or\r\n * {@link SignInMethod}.EMAIL_LINK. This corresponds to the sign-in method\r\n * identifier as returned in {@link fetchSignInMethodsForEmail}.\r\n */\n signInMethod) {\n this.providerId = providerId;\n this.signInMethod = signInMethod;\n }\n /**\r\n * Returns a JSON-serializable representation of this object.\r\n *\r\n * @returns a JSON-serializable representation of this object.\r\n */\n toJSON() {\n return debugFail('not implemented');\n }\n /** @internal */\n _getIdTokenResponse(_auth) {\n return debugFail('not implemented');\n }\n /** @internal */\n _linkToIdToken(_auth, _idToken) {\n return debugFail('not implemented');\n }\n /** @internal */\n _getReauthenticationResolver(_auth) {\n return debugFail('not implemented');\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nasync function resetPassword(auth, request) {\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:resetPassword\" /* Endpoint.RESET_PASSWORD */, _addTidIfNecessary(auth, request));\n}\nasync function updateEmailPassword(auth, request) {\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:update\" /* Endpoint.SET_ACCOUNT_INFO */, request);\n}\n// Used for linking an email/password account to an existing idToken. Uses the same request/response\n// format as updateEmailPassword.\nasync function linkEmailPassword(auth, request) {\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:signUp\" /* Endpoint.SIGN_UP */, request);\n}\nasync function applyActionCode$1(auth, request) {\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:update\" /* Endpoint.SET_ACCOUNT_INFO */, _addTidIfNecessary(auth, request));\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nasync function signInWithPassword(auth, request) {\n return _performSignInRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:signInWithPassword\" /* Endpoint.SIGN_IN_WITH_PASSWORD */, _addTidIfNecessary(auth, request));\n}\nasync function sendOobCode(auth, request) {\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:sendOobCode\" /* Endpoint.SEND_OOB_CODE */, _addTidIfNecessary(auth, request));\n}\nasync function sendEmailVerification$1(auth, request) {\n return sendOobCode(auth, request);\n}\nasync function sendPasswordResetEmail$1(auth, request) {\n return sendOobCode(auth, request);\n}\nasync function sendSignInLinkToEmail$1(auth, request) {\n return sendOobCode(auth, request);\n}\nasync function verifyAndChangeEmail(auth, request) {\n return sendOobCode(auth, request);\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nasync function signInWithEmailLink$1(auth, request) {\n return _performSignInRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:signInWithEmailLink\" /* Endpoint.SIGN_IN_WITH_EMAIL_LINK */, _addTidIfNecessary(auth, request));\n}\nasync function signInWithEmailLinkForLinking(auth, request) {\n return _performSignInRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:signInWithEmailLink\" /* Endpoint.SIGN_IN_WITH_EMAIL_LINK */, _addTidIfNecessary(auth, request));\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Interface that represents the credentials returned by {@link EmailAuthProvider} for\r\n * {@link ProviderId}.PASSWORD\r\n *\r\n * @remarks\r\n * Covers both {@link SignInMethod}.EMAIL_PASSWORD and\r\n * {@link SignInMethod}.EMAIL_LINK.\r\n *\r\n * @public\r\n */\nclass EmailAuthCredential extends AuthCredential {\n /** @internal */\n constructor( /** @internal */\n _email, /** @internal */\n _password, signInMethod, /** @internal */\n _tenantId = null) {\n super(\"password\" /* ProviderId.PASSWORD */, signInMethod);\n this._email = _email;\n this._password = _password;\n this._tenantId = _tenantId;\n }\n /** @internal */\n static _fromEmailAndPassword(email, password) {\n return new EmailAuthCredential(email, password, \"password\" /* SignInMethod.EMAIL_PASSWORD */);\n }\n /** @internal */\n static _fromEmailAndCode(email, oobCode, tenantId = null) {\n return new EmailAuthCredential(email, oobCode, \"emailLink\" /* SignInMethod.EMAIL_LINK */, tenantId);\n }\n /** {@inheritdoc AuthCredential.toJSON} */\n toJSON() {\n return {\n email: this._email,\n password: this._password,\n signInMethod: this.signInMethod,\n tenantId: this._tenantId\n };\n }\n /**\r\n * Static method to deserialize a JSON representation of an object into an {@link AuthCredential}.\r\n *\r\n * @param json - Either `object` or the stringified representation of the object. When string is\r\n * provided, `JSON.parse` would be called first.\r\n *\r\n * @returns If the JSON input does not represent an {@link AuthCredential}, null is returned.\r\n */\n static fromJSON(json) {\n const obj = typeof json === 'string' ? JSON.parse(json) : json;\n if ((obj === null || obj === void 0 ? void 0 : obj.email) && (obj === null || obj === void 0 ? void 0 : obj.password)) {\n if (obj.signInMethod === \"password\" /* SignInMethod.EMAIL_PASSWORD */) {\n return this._fromEmailAndPassword(obj.email, obj.password);\n } else if (obj.signInMethod === \"emailLink\" /* SignInMethod.EMAIL_LINK */) {\n return this._fromEmailAndCode(obj.email, obj.password, obj.tenantId);\n }\n }\n return null;\n }\n /** @internal */\n async _getIdTokenResponse(auth) {\n switch (this.signInMethod) {\n case \"password\" /* SignInMethod.EMAIL_PASSWORD */:\n const request = {\n returnSecureToken: true,\n email: this._email,\n password: this._password,\n clientType: \"CLIENT_TYPE_WEB\" /* RecaptchaClientType.WEB */\n };\n return handleRecaptchaFlow(auth, request, \"signInWithPassword\" /* RecaptchaActionName.SIGN_IN_WITH_PASSWORD */, signInWithPassword);\n case \"emailLink\" /* SignInMethod.EMAIL_LINK */:\n return signInWithEmailLink$1(auth, {\n email: this._email,\n oobCode: this._password\n });\n default:\n _fail(auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n }\n }\n /** @internal */\n async _linkToIdToken(auth, idToken) {\n switch (this.signInMethod) {\n case \"password\" /* SignInMethod.EMAIL_PASSWORD */:\n const request = {\n idToken,\n returnSecureToken: true,\n email: this._email,\n password: this._password,\n clientType: \"CLIENT_TYPE_WEB\" /* RecaptchaClientType.WEB */\n };\n return handleRecaptchaFlow(auth, request, \"signUpPassword\" /* RecaptchaActionName.SIGN_UP_PASSWORD */, linkEmailPassword);\n case \"emailLink\" /* SignInMethod.EMAIL_LINK */:\n return signInWithEmailLinkForLinking(auth, {\n idToken,\n email: this._email,\n oobCode: this._password\n });\n default:\n _fail(auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n }\n }\n /** @internal */\n _getReauthenticationResolver(auth) {\n return this._getIdTokenResponse(auth);\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nasync function signInWithIdp(auth, request) {\n return _performSignInRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:signInWithIdp\" /* Endpoint.SIGN_IN_WITH_IDP */, _addTidIfNecessary(auth, request));\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst IDP_REQUEST_URI$1 = 'http://localhost';\n/**\r\n * Represents the OAuth credentials returned by an {@link OAuthProvider}.\r\n *\r\n * @remarks\r\n * Implementations specify the details about each auth provider's credential requirements.\r\n *\r\n * @public\r\n */\nclass OAuthCredential extends AuthCredential {\n constructor() {\n super(...arguments);\n this.pendingToken = null;\n }\n /** @internal */\n static _fromParams(params) {\n const cred = new OAuthCredential(params.providerId, params.signInMethod);\n if (params.idToken || params.accessToken) {\n // OAuth 2 and either ID token or access token.\n if (params.idToken) {\n cred.idToken = params.idToken;\n }\n if (params.accessToken) {\n cred.accessToken = params.accessToken;\n }\n // Add nonce if available and no pendingToken is present.\n if (params.nonce && !params.pendingToken) {\n cred.nonce = params.nonce;\n }\n if (params.pendingToken) {\n cred.pendingToken = params.pendingToken;\n }\n } else if (params.oauthToken && params.oauthTokenSecret) {\n // OAuth 1 and OAuth token with token secret\n cred.accessToken = params.oauthToken;\n cred.secret = params.oauthTokenSecret;\n } else {\n _fail(\"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n }\n return cred;\n }\n /** {@inheritdoc AuthCredential.toJSON} */\n toJSON() {\n return {\n idToken: this.idToken,\n accessToken: this.accessToken,\n secret: this.secret,\n nonce: this.nonce,\n pendingToken: this.pendingToken,\n providerId: this.providerId,\n signInMethod: this.signInMethod\n };\n }\n /**\r\n * Static method to deserialize a JSON representation of an object into an\r\n * {@link AuthCredential}.\r\n *\r\n * @param json - Input can be either Object or the stringified representation of the object.\r\n * When string is provided, JSON.parse would be called first.\r\n *\r\n * @returns If the JSON input does not represent an {@link AuthCredential}, null is returned.\r\n */\n static fromJSON(json) {\n const obj = typeof json === 'string' ? JSON.parse(json) : json;\n const {\n providerId,\n signInMethod\n } = obj,\n rest = __rest(obj, [\"providerId\", \"signInMethod\"]);\n if (!providerId || !signInMethod) {\n return null;\n }\n const cred = new OAuthCredential(providerId, signInMethod);\n cred.idToken = rest.idToken || undefined;\n cred.accessToken = rest.accessToken || undefined;\n cred.secret = rest.secret;\n cred.nonce = rest.nonce;\n cred.pendingToken = rest.pendingToken || null;\n return cred;\n }\n /** @internal */\n _getIdTokenResponse(auth) {\n const request = this.buildRequest();\n return signInWithIdp(auth, request);\n }\n /** @internal */\n _linkToIdToken(auth, idToken) {\n const request = this.buildRequest();\n request.idToken = idToken;\n return signInWithIdp(auth, request);\n }\n /** @internal */\n _getReauthenticationResolver(auth) {\n const request = this.buildRequest();\n request.autoCreate = false;\n return signInWithIdp(auth, request);\n }\n buildRequest() {\n const request = {\n requestUri: IDP_REQUEST_URI$1,\n returnSecureToken: true\n };\n if (this.pendingToken) {\n request.pendingToken = this.pendingToken;\n } else {\n const postBody = {};\n if (this.idToken) {\n postBody['id_token'] = this.idToken;\n }\n if (this.accessToken) {\n postBody['access_token'] = this.accessToken;\n }\n if (this.secret) {\n postBody['oauth_token_secret'] = this.secret;\n }\n postBody['providerId'] = this.providerId;\n if (this.nonce && !this.pendingToken) {\n postBody['nonce'] = this.nonce;\n }\n request.postBody = querystring(postBody);\n }\n return request;\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nasync function sendPhoneVerificationCode(auth, request) {\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:sendVerificationCode\" /* Endpoint.SEND_VERIFICATION_CODE */, _addTidIfNecessary(auth, request));\n}\nasync function signInWithPhoneNumber$1(auth, request) {\n return _performSignInRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:signInWithPhoneNumber\" /* Endpoint.SIGN_IN_WITH_PHONE_NUMBER */, _addTidIfNecessary(auth, request));\n}\nasync function linkWithPhoneNumber$1(auth, request) {\n const response = await _performSignInRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:signInWithPhoneNumber\" /* Endpoint.SIGN_IN_WITH_PHONE_NUMBER */, _addTidIfNecessary(auth, request));\n if (response.temporaryProof) {\n throw _makeTaggedError(auth, \"account-exists-with-different-credential\" /* AuthErrorCode.NEED_CONFIRMATION */, response);\n }\n return response;\n}\nconst VERIFY_PHONE_NUMBER_FOR_EXISTING_ERROR_MAP_ = {\n [\"USER_NOT_FOUND\" /* ServerError.USER_NOT_FOUND */]: \"user-not-found\" /* AuthErrorCode.USER_DELETED */\n};\nasync function verifyPhoneNumberForExisting(auth, request) {\n const apiRequest = Object.assign(Object.assign({}, request), {\n operation: 'REAUTH'\n });\n return _performSignInRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:signInWithPhoneNumber\" /* Endpoint.SIGN_IN_WITH_PHONE_NUMBER */, _addTidIfNecessary(auth, apiRequest), VERIFY_PHONE_NUMBER_FOR_EXISTING_ERROR_MAP_);\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Represents the credentials returned by {@link PhoneAuthProvider}.\r\n *\r\n * @public\r\n */\nclass PhoneAuthCredential extends AuthCredential {\n constructor(params) {\n super(\"phone\" /* ProviderId.PHONE */, \"phone\" /* SignInMethod.PHONE */);\n this.params = params;\n }\n /** @internal */\n static _fromVerification(verificationId, verificationCode) {\n return new PhoneAuthCredential({\n verificationId,\n verificationCode\n });\n }\n /** @internal */\n static _fromTokenResponse(phoneNumber, temporaryProof) {\n return new PhoneAuthCredential({\n phoneNumber,\n temporaryProof\n });\n }\n /** @internal */\n _getIdTokenResponse(auth) {\n return signInWithPhoneNumber$1(auth, this._makeVerificationRequest());\n }\n /** @internal */\n _linkToIdToken(auth, idToken) {\n return linkWithPhoneNumber$1(auth, Object.assign({\n idToken\n }, this._makeVerificationRequest()));\n }\n /** @internal */\n _getReauthenticationResolver(auth) {\n return verifyPhoneNumberForExisting(auth, this._makeVerificationRequest());\n }\n /** @internal */\n _makeVerificationRequest() {\n const {\n temporaryProof,\n phoneNumber,\n verificationId,\n verificationCode\n } = this.params;\n if (temporaryProof && phoneNumber) {\n return {\n temporaryProof,\n phoneNumber\n };\n }\n return {\n sessionInfo: verificationId,\n code: verificationCode\n };\n }\n /** {@inheritdoc AuthCredential.toJSON} */\n toJSON() {\n const obj = {\n providerId: this.providerId\n };\n if (this.params.phoneNumber) {\n obj.phoneNumber = this.params.phoneNumber;\n }\n if (this.params.temporaryProof) {\n obj.temporaryProof = this.params.temporaryProof;\n }\n if (this.params.verificationCode) {\n obj.verificationCode = this.params.verificationCode;\n }\n if (this.params.verificationId) {\n obj.verificationId = this.params.verificationId;\n }\n return obj;\n }\n /** Generates a phone credential based on a plain object or a JSON string. */\n static fromJSON(json) {\n if (typeof json === 'string') {\n json = JSON.parse(json);\n }\n const {\n verificationId,\n verificationCode,\n phoneNumber,\n temporaryProof\n } = json;\n if (!verificationCode && !verificationId && !phoneNumber && !temporaryProof) {\n return null;\n }\n return new PhoneAuthCredential({\n verificationId,\n verificationCode,\n phoneNumber,\n temporaryProof\n });\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Maps the mode string in action code URL to Action Code Info operation.\r\n *\r\n * @param mode\r\n */\nfunction parseMode(mode) {\n switch (mode) {\n case 'recoverEmail':\n return \"RECOVER_EMAIL\" /* ActionCodeOperation.RECOVER_EMAIL */;\n case 'resetPassword':\n return \"PASSWORD_RESET\" /* ActionCodeOperation.PASSWORD_RESET */;\n case 'signIn':\n return \"EMAIL_SIGNIN\" /* ActionCodeOperation.EMAIL_SIGNIN */;\n case 'verifyEmail':\n return \"VERIFY_EMAIL\" /* ActionCodeOperation.VERIFY_EMAIL */;\n case 'verifyAndChangeEmail':\n return \"VERIFY_AND_CHANGE_EMAIL\" /* ActionCodeOperation.VERIFY_AND_CHANGE_EMAIL */;\n case 'revertSecondFactorAddition':\n return \"REVERT_SECOND_FACTOR_ADDITION\" /* ActionCodeOperation.REVERT_SECOND_FACTOR_ADDITION */;\n default:\n return null;\n }\n}\n/**\r\n * Helper to parse FDL links\r\n *\r\n * @param url\r\n */\nfunction parseDeepLink(url) {\n const link = querystringDecode(extractQuerystring(url))['link'];\n // Double link case (automatic redirect).\n const doubleDeepLink = link ? querystringDecode(extractQuerystring(link))['deep_link_id'] : null;\n // iOS custom scheme links.\n const iOSDeepLink = querystringDecode(extractQuerystring(url))['deep_link_id'];\n const iOSDoubleDeepLink = iOSDeepLink ? querystringDecode(extractQuerystring(iOSDeepLink))['link'] : null;\n return iOSDoubleDeepLink || iOSDeepLink || doubleDeepLink || link || url;\n}\n/**\r\n * A utility class to parse email action URLs such as password reset, email verification,\r\n * email link sign in, etc.\r\n *\r\n * @public\r\n */\nclass ActionCodeURL {\n /**\r\n * @param actionLink - The link from which to extract the URL.\r\n * @returns The {@link ActionCodeURL} object, or null if the link is invalid.\r\n *\r\n * @internal\r\n */\n constructor(actionLink) {\n var _a, _b, _c, _d, _e, _f;\n const searchParams = querystringDecode(extractQuerystring(actionLink));\n const apiKey = (_a = searchParams[\"apiKey\" /* QueryField.API_KEY */]) !== null && _a !== void 0 ? _a : null;\n const code = (_b = searchParams[\"oobCode\" /* QueryField.CODE */]) !== null && _b !== void 0 ? _b : null;\n const operation = parseMode((_c = searchParams[\"mode\" /* QueryField.MODE */]) !== null && _c !== void 0 ? _c : null);\n // Validate API key, code and mode.\n _assert(apiKey && code && operation, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n this.apiKey = apiKey;\n this.operation = operation;\n this.code = code;\n this.continueUrl = (_d = searchParams[\"continueUrl\" /* QueryField.CONTINUE_URL */]) !== null && _d !== void 0 ? _d : null;\n this.languageCode = (_e = searchParams[\"languageCode\" /* QueryField.LANGUAGE_CODE */]) !== null && _e !== void 0 ? _e : null;\n this.tenantId = (_f = searchParams[\"tenantId\" /* QueryField.TENANT_ID */]) !== null && _f !== void 0 ? _f : null;\n }\n /**\r\n * Parses the email action link string and returns an {@link ActionCodeURL} if the link is valid,\r\n * otherwise returns null.\r\n *\r\n * @param link - The email action link string.\r\n * @returns The {@link ActionCodeURL} object, or null if the link is invalid.\r\n *\r\n * @public\r\n */\n static parseLink(link) {\n const actionLink = parseDeepLink(link);\n try {\n return new ActionCodeURL(actionLink);\n } catch (_a) {\n return null;\n }\n }\n}\n/**\r\n * Parses the email action link string and returns an {@link ActionCodeURL} if\r\n * the link is valid, otherwise returns null.\r\n *\r\n * @public\r\n */\nfunction parseActionCodeURL(link) {\n return ActionCodeURL.parseLink(link);\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Provider for generating {@link EmailAuthCredential}.\r\n *\r\n * @public\r\n */\nlet EmailAuthProvider = /*#__PURE__*/(() => {\n class EmailAuthProvider {\n constructor() {\n /**\r\n * Always set to {@link ProviderId}.PASSWORD, even for email link.\r\n */\n this.providerId = EmailAuthProvider.PROVIDER_ID;\n }\n /**\r\n * Initialize an {@link AuthCredential} using an email and password.\r\n *\r\n * @example\r\n * ```javascript\r\n * const authCredential = EmailAuthProvider.credential(email, password);\r\n * const userCredential = await signInWithCredential(auth, authCredential);\r\n * ```\r\n *\r\n * @example\r\n * ```javascript\r\n * const userCredential = await signInWithEmailAndPassword(auth, email, password);\r\n * ```\r\n *\r\n * @param email - Email address.\r\n * @param password - User account password.\r\n * @returns The auth provider credential.\r\n */\n static credential(email, password) {\n return EmailAuthCredential._fromEmailAndPassword(email, password);\n }\n /**\r\n * Initialize an {@link AuthCredential} using an email and an email link after a sign in with\r\n * email link operation.\r\n *\r\n * @example\r\n * ```javascript\r\n * const authCredential = EmailAuthProvider.credentialWithLink(auth, email, emailLink);\r\n * const userCredential = await signInWithCredential(auth, authCredential);\r\n * ```\r\n *\r\n * @example\r\n * ```javascript\r\n * await sendSignInLinkToEmail(auth, email);\r\n * // Obtain emailLink from user.\r\n * const userCredential = await signInWithEmailLink(auth, email, emailLink);\r\n * ```\r\n *\r\n * @param auth - The {@link Auth} instance used to verify the link.\r\n * @param email - Email address.\r\n * @param emailLink - Sign-in email link.\r\n * @returns - The auth provider credential.\r\n */\n static credentialWithLink(email, emailLink) {\n const actionCodeUrl = ActionCodeURL.parseLink(emailLink);\n _assert(actionCodeUrl, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n return EmailAuthCredential._fromEmailAndCode(email, actionCodeUrl.code, actionCodeUrl.tenantId);\n }\n }\n /**\r\n * Always set to {@link ProviderId}.PASSWORD, even for email link.\r\n */\n\n /**\r\n * Always set to {@link SignInMethod}.EMAIL_PASSWORD.\r\n */\n\n /**\r\n * Always set to {@link SignInMethod}.EMAIL_LINK.\r\n */\n EmailAuthProvider.PROVIDER_ID = \"password\" /* ProviderId.PASSWORD */;\n\n EmailAuthProvider.EMAIL_PASSWORD_SIGN_IN_METHOD = \"password\" /* SignInMethod.EMAIL_PASSWORD */;\n\n EmailAuthProvider.EMAIL_LINK_SIGN_IN_METHOD = \"emailLink\" /* SignInMethod.EMAIL_LINK */;\n\n /**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n /**\r\n * The base class for all Federated providers (OAuth (including OIDC), SAML).\r\n *\r\n * This class is not meant to be instantiated directly.\r\n *\r\n * @public\r\n */\n return EmailAuthProvider;\n})();\nclass FederatedAuthProvider {\n /**\r\n * Constructor for generic OAuth providers.\r\n *\r\n * @param providerId - Provider for which credentials should be generated.\r\n */\n constructor(providerId) {\n this.providerId = providerId;\n /** @internal */\n this.defaultLanguageCode = null;\n /** @internal */\n this.customParameters = {};\n }\n /**\r\n * Set the language gode.\r\n *\r\n * @param languageCode - language code\r\n */\n setDefaultLanguage(languageCode) {\n this.defaultLanguageCode = languageCode;\n }\n /**\r\n * Sets the OAuth custom parameters to pass in an OAuth request for popup and redirect sign-in\r\n * operations.\r\n *\r\n * @remarks\r\n * For a detailed list, check the reserved required OAuth 2.0 parameters such as `client_id`,\r\n * `redirect_uri`, `scope`, `response_type`, and `state` are not allowed and will be ignored.\r\n *\r\n * @param customOAuthParameters - The custom OAuth parameters to pass in the OAuth request.\r\n */\n setCustomParameters(customOAuthParameters) {\n this.customParameters = customOAuthParameters;\n return this;\n }\n /**\r\n * Retrieve the current list of {@link CustomParameters}.\r\n */\n getCustomParameters() {\n return this.customParameters;\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Common code to all OAuth providers. This is separate from the\r\n * {@link OAuthProvider} so that child providers (like\r\n * {@link GoogleAuthProvider}) don't inherit the `credential` instance method.\r\n * Instead, they rely on a static `credential` method.\r\n */\nclass BaseOAuthProvider extends FederatedAuthProvider {\n constructor() {\n super(...arguments);\n /** @internal */\n this.scopes = [];\n }\n /**\r\n * Add an OAuth scope to the credential.\r\n *\r\n * @param scope - Provider OAuth scope to add.\r\n */\n addScope(scope) {\n // If not already added, add scope to list.\n if (!this.scopes.includes(scope)) {\n this.scopes.push(scope);\n }\n return this;\n }\n /**\r\n * Retrieve the current list of OAuth scopes.\r\n */\n getScopes() {\n return [...this.scopes];\n }\n}\n/**\r\n * Provider for generating generic {@link OAuthCredential}.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a redirect.\r\n * const provider = new OAuthProvider('google.com');\r\n * // Start a sign in process for an unauthenticated user.\r\n * provider.addScope('profile');\r\n * provider.addScope('email');\r\n * await signInWithRedirect(auth, provider);\r\n * // This will trigger a full page redirect away from your app\r\n *\r\n * // After returning from the redirect when your app initializes you can obtain the result\r\n * const result = await getRedirectResult(auth);\r\n * if (result) {\r\n * // This is the signed-in user\r\n * const user = result.user;\r\n * // This gives you a OAuth Access Token for the provider.\r\n * const credential = provider.credentialFromResult(auth, result);\r\n * const token = credential.accessToken;\r\n * }\r\n * ```\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a popup.\r\n * const provider = new OAuthProvider('google.com');\r\n * provider.addScope('profile');\r\n * provider.addScope('email');\r\n * const result = await signInWithPopup(auth, provider);\r\n *\r\n * // The signed-in user info.\r\n * const user = result.user;\r\n * // This gives you a OAuth Access Token for the provider.\r\n * const credential = provider.credentialFromResult(auth, result);\r\n * const token = credential.accessToken;\r\n * ```\r\n * @public\r\n */\nclass OAuthProvider extends BaseOAuthProvider {\n /**\r\n * Creates an {@link OAuthCredential} from a JSON string or a plain object.\r\n * @param json - A plain object or a JSON string\r\n */\n static credentialFromJSON(json) {\n const obj = typeof json === 'string' ? JSON.parse(json) : json;\n _assert('providerId' in obj && 'signInMethod' in obj, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n return OAuthCredential._fromParams(obj);\n }\n /**\r\n * Creates a {@link OAuthCredential} from a generic OAuth provider's access token or ID token.\r\n *\r\n * @remarks\r\n * The raw nonce is required when an ID token with a nonce field is provided. The SHA-256 hash of\r\n * the raw nonce must match the nonce field in the ID token.\r\n *\r\n * @example\r\n * ```javascript\r\n * // `googleUser` from the onsuccess Google Sign In callback.\r\n * // Initialize a generate OAuth provider with a `google.com` providerId.\r\n * const provider = new OAuthProvider('google.com');\r\n * const credential = provider.credential({\r\n * idToken: googleUser.getAuthResponse().id_token,\r\n * });\r\n * const result = await signInWithCredential(credential);\r\n * ```\r\n *\r\n * @param params - Either the options object containing the ID token, access token and raw nonce\r\n * or the ID token string.\r\n */\n credential(params) {\n return this._credential(Object.assign(Object.assign({}, params), {\n nonce: params.rawNonce\n }));\n }\n /** An internal credential method that accepts more permissive options */\n _credential(params) {\n _assert(params.idToken || params.accessToken, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n // For OAuthCredential, sign in method is same as providerId.\n return OAuthCredential._fromParams(Object.assign(Object.assign({}, params), {\n providerId: this.providerId,\n signInMethod: this.providerId\n }));\n }\n /**\r\n * Used to extract the underlying {@link OAuthCredential} from a {@link UserCredential}.\r\n *\r\n * @param userCredential - The user credential.\r\n */\n static credentialFromResult(userCredential) {\n return OAuthProvider.oauthCredentialFromTaggedObject(userCredential);\n }\n /**\r\n * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was\r\n * thrown during a sign-in, link, or reauthenticate operation.\r\n *\r\n * @param userCredential - The user credential.\r\n */\n static credentialFromError(error) {\n return OAuthProvider.oauthCredentialFromTaggedObject(error.customData || {});\n }\n static oauthCredentialFromTaggedObject({\n _tokenResponse: tokenResponse\n }) {\n if (!tokenResponse) {\n return null;\n }\n const {\n oauthIdToken,\n oauthAccessToken,\n oauthTokenSecret,\n pendingToken,\n nonce,\n providerId\n } = tokenResponse;\n if (!oauthAccessToken && !oauthTokenSecret && !oauthIdToken && !pendingToken) {\n return null;\n }\n if (!providerId) {\n return null;\n }\n try {\n return new OAuthProvider(providerId)._credential({\n idToken: oauthIdToken,\n accessToken: oauthAccessToken,\n nonce,\n pendingToken\n });\n } catch (e) {\n return null;\n }\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Provider for generating an {@link OAuthCredential} for {@link ProviderId}.FACEBOOK.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a redirect.\r\n * const provider = new FacebookAuthProvider();\r\n * // Start a sign in process for an unauthenticated user.\r\n * provider.addScope('user_birthday');\r\n * await signInWithRedirect(auth, provider);\r\n * // This will trigger a full page redirect away from your app\r\n *\r\n * // After returning from the redirect when your app initializes you can obtain the result\r\n * const result = await getRedirectResult(auth);\r\n * if (result) {\r\n * // This is the signed-in user\r\n * const user = result.user;\r\n * // This gives you a Facebook Access Token.\r\n * const credential = FacebookAuthProvider.credentialFromResult(result);\r\n * const token = credential.accessToken;\r\n * }\r\n * ```\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a popup.\r\n * const provider = new FacebookAuthProvider();\r\n * provider.addScope('user_birthday');\r\n * const result = await signInWithPopup(auth, provider);\r\n *\r\n * // The signed-in user info.\r\n * const user = result.user;\r\n * // This gives you a Facebook Access Token.\r\n * const credential = FacebookAuthProvider.credentialFromResult(result);\r\n * const token = credential.accessToken;\r\n * ```\r\n *\r\n * @public\r\n */\nlet FacebookAuthProvider = /*#__PURE__*/(() => {\n class FacebookAuthProvider extends BaseOAuthProvider {\n constructor() {\n super(\"facebook.com\" /* ProviderId.FACEBOOK */);\n }\n /**\r\n * Creates a credential for Facebook.\r\n *\r\n * @example\r\n * ```javascript\r\n * // `event` from the Facebook auth.authResponseChange callback.\r\n * const credential = FacebookAuthProvider.credential(event.authResponse.accessToken);\r\n * const result = await signInWithCredential(credential);\r\n * ```\r\n *\r\n * @param accessToken - Facebook access token.\r\n */\n static credential(accessToken) {\n return OAuthCredential._fromParams({\n providerId: FacebookAuthProvider.PROVIDER_ID,\n signInMethod: FacebookAuthProvider.FACEBOOK_SIGN_IN_METHOD,\n accessToken\n });\n }\n /**\r\n * Used to extract the underlying {@link OAuthCredential} from a {@link UserCredential}.\r\n *\r\n * @param userCredential - The user credential.\r\n */\n static credentialFromResult(userCredential) {\n return FacebookAuthProvider.credentialFromTaggedObject(userCredential);\n }\n /**\r\n * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was\r\n * thrown during a sign-in, link, or reauthenticate operation.\r\n *\r\n * @param userCredential - The user credential.\r\n */\n static credentialFromError(error) {\n return FacebookAuthProvider.credentialFromTaggedObject(error.customData || {});\n }\n static credentialFromTaggedObject({\n _tokenResponse: tokenResponse\n }) {\n if (!tokenResponse || !('oauthAccessToken' in tokenResponse)) {\n return null;\n }\n if (!tokenResponse.oauthAccessToken) {\n return null;\n }\n try {\n return FacebookAuthProvider.credential(tokenResponse.oauthAccessToken);\n } catch (_a) {\n return null;\n }\n }\n }\n /** Always set to {@link SignInMethod}.FACEBOOK. */\n\n /** Always set to {@link ProviderId}.FACEBOOK. */FacebookAuthProvider.FACEBOOK_SIGN_IN_METHOD = \"facebook.com\" /* SignInMethod.FACEBOOK */;\n\n FacebookAuthProvider.PROVIDER_ID = \"facebook.com\" /* ProviderId.FACEBOOK */;\n\n /**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n /**\r\n * Provider for generating an an {@link OAuthCredential} for {@link ProviderId}.GOOGLE.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a redirect.\r\n * const provider = new GoogleAuthProvider();\r\n * // Start a sign in process for an unauthenticated user.\r\n * provider.addScope('profile');\r\n * provider.addScope('email');\r\n * await signInWithRedirect(auth, provider);\r\n * // This will trigger a full page redirect away from your app\r\n *\r\n * // After returning from the redirect when your app initializes you can obtain the result\r\n * const result = await getRedirectResult(auth);\r\n * if (result) {\r\n * // This is the signed-in user\r\n * const user = result.user;\r\n * // This gives you a Google Access Token.\r\n * const credential = GoogleAuthProvider.credentialFromResult(result);\r\n * const token = credential.accessToken;\r\n * }\r\n * ```\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a popup.\r\n * const provider = new GoogleAuthProvider();\r\n * provider.addScope('profile');\r\n * provider.addScope('email');\r\n * const result = await signInWithPopup(auth, provider);\r\n *\r\n * // The signed-in user info.\r\n * const user = result.user;\r\n * // This gives you a Google Access Token.\r\n * const credential = GoogleAuthProvider.credentialFromResult(result);\r\n * const token = credential.accessToken;\r\n * ```\r\n *\r\n * @public\r\n */\n return FacebookAuthProvider;\n})();\nlet GoogleAuthProvider = /*#__PURE__*/(() => {\n class GoogleAuthProvider extends BaseOAuthProvider {\n constructor() {\n super(\"google.com\" /* ProviderId.GOOGLE */);\n this.addScope('profile');\n }\n /**\r\n * Creates a credential for Google. At least one of ID token and access token is required.\r\n *\r\n * @example\r\n * ```javascript\r\n * // \\`googleUser\\` from the onsuccess Google Sign In callback.\r\n * const credential = GoogleAuthProvider.credential(googleUser.getAuthResponse().id_token);\r\n * const result = await signInWithCredential(credential);\r\n * ```\r\n *\r\n * @param idToken - Google ID token.\r\n * @param accessToken - Google access token.\r\n */\n static credential(idToken, accessToken) {\n return OAuthCredential._fromParams({\n providerId: GoogleAuthProvider.PROVIDER_ID,\n signInMethod: GoogleAuthProvider.GOOGLE_SIGN_IN_METHOD,\n idToken,\n accessToken\n });\n }\n /**\r\n * Used to extract the underlying {@link OAuthCredential} from a {@link UserCredential}.\r\n *\r\n * @param userCredential - The user credential.\r\n */\n static credentialFromResult(userCredential) {\n return GoogleAuthProvider.credentialFromTaggedObject(userCredential);\n }\n /**\r\n * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was\r\n * thrown during a sign-in, link, or reauthenticate operation.\r\n *\r\n * @param userCredential - The user credential.\r\n */\n static credentialFromError(error) {\n return GoogleAuthProvider.credentialFromTaggedObject(error.customData || {});\n }\n static credentialFromTaggedObject({\n _tokenResponse: tokenResponse\n }) {\n if (!tokenResponse) {\n return null;\n }\n const {\n oauthIdToken,\n oauthAccessToken\n } = tokenResponse;\n if (!oauthIdToken && !oauthAccessToken) {\n // This could be an oauth 1 credential or a phone credential\n return null;\n }\n try {\n return GoogleAuthProvider.credential(oauthIdToken, oauthAccessToken);\n } catch (_a) {\n return null;\n }\n }\n }\n /** Always set to {@link SignInMethod}.GOOGLE. */\n\n /** Always set to {@link ProviderId}.GOOGLE. */GoogleAuthProvider.GOOGLE_SIGN_IN_METHOD = \"google.com\" /* SignInMethod.GOOGLE */;\n\n GoogleAuthProvider.PROVIDER_ID = \"google.com\" /* ProviderId.GOOGLE */;\n\n /**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n /**\r\n * Provider for generating an {@link OAuthCredential} for {@link ProviderId}.GITHUB.\r\n *\r\n * @remarks\r\n * GitHub requires an OAuth 2.0 redirect, so you can either handle the redirect directly, or use\r\n * the {@link signInWithPopup} handler:\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a redirect.\r\n * const provider = new GithubAuthProvider();\r\n * // Start a sign in process for an unauthenticated user.\r\n * provider.addScope('repo');\r\n * await signInWithRedirect(auth, provider);\r\n * // This will trigger a full page redirect away from your app\r\n *\r\n * // After returning from the redirect when your app initializes you can obtain the result\r\n * const result = await getRedirectResult(auth);\r\n * if (result) {\r\n * // This is the signed-in user\r\n * const user = result.user;\r\n * // This gives you a Github Access Token.\r\n * const credential = GithubAuthProvider.credentialFromResult(result);\r\n * const token = credential.accessToken;\r\n * }\r\n * ```\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a popup.\r\n * const provider = new GithubAuthProvider();\r\n * provider.addScope('repo');\r\n * const result = await signInWithPopup(auth, provider);\r\n *\r\n * // The signed-in user info.\r\n * const user = result.user;\r\n * // This gives you a Github Access Token.\r\n * const credential = GithubAuthProvider.credentialFromResult(result);\r\n * const token = credential.accessToken;\r\n * ```\r\n * @public\r\n */\n return GoogleAuthProvider;\n})();\nlet GithubAuthProvider = /*#__PURE__*/(() => {\n class GithubAuthProvider extends BaseOAuthProvider {\n constructor() {\n super(\"github.com\" /* ProviderId.GITHUB */);\n }\n /**\r\n * Creates a credential for Github.\r\n *\r\n * @param accessToken - Github access token.\r\n */\n static credential(accessToken) {\n return OAuthCredential._fromParams({\n providerId: GithubAuthProvider.PROVIDER_ID,\n signInMethod: GithubAuthProvider.GITHUB_SIGN_IN_METHOD,\n accessToken\n });\n }\n /**\r\n * Used to extract the underlying {@link OAuthCredential} from a {@link UserCredential}.\r\n *\r\n * @param userCredential - The user credential.\r\n */\n static credentialFromResult(userCredential) {\n return GithubAuthProvider.credentialFromTaggedObject(userCredential);\n }\n /**\r\n * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was\r\n * thrown during a sign-in, link, or reauthenticate operation.\r\n *\r\n * @param userCredential - The user credential.\r\n */\n static credentialFromError(error) {\n return GithubAuthProvider.credentialFromTaggedObject(error.customData || {});\n }\n static credentialFromTaggedObject({\n _tokenResponse: tokenResponse\n }) {\n if (!tokenResponse || !('oauthAccessToken' in tokenResponse)) {\n return null;\n }\n if (!tokenResponse.oauthAccessToken) {\n return null;\n }\n try {\n return GithubAuthProvider.credential(tokenResponse.oauthAccessToken);\n } catch (_a) {\n return null;\n }\n }\n }\n /** Always set to {@link SignInMethod}.GITHUB. */\n\n /** Always set to {@link ProviderId}.GITHUB. */GithubAuthProvider.GITHUB_SIGN_IN_METHOD = \"github.com\" /* SignInMethod.GITHUB */;\n\n GithubAuthProvider.PROVIDER_ID = \"github.com\" /* ProviderId.GITHUB */;\n\n /**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n return GithubAuthProvider;\n})();\nconst IDP_REQUEST_URI = 'http://localhost';\n/**\r\n * @public\r\n */\nclass SAMLAuthCredential extends AuthCredential {\n /** @internal */\n constructor(providerId, pendingToken) {\n super(providerId, providerId);\n this.pendingToken = pendingToken;\n }\n /** @internal */\n _getIdTokenResponse(auth) {\n const request = this.buildRequest();\n return signInWithIdp(auth, request);\n }\n /** @internal */\n _linkToIdToken(auth, idToken) {\n const request = this.buildRequest();\n request.idToken = idToken;\n return signInWithIdp(auth, request);\n }\n /** @internal */\n _getReauthenticationResolver(auth) {\n const request = this.buildRequest();\n request.autoCreate = false;\n return signInWithIdp(auth, request);\n }\n /** {@inheritdoc AuthCredential.toJSON} */\n toJSON() {\n return {\n signInMethod: this.signInMethod,\n providerId: this.providerId,\n pendingToken: this.pendingToken\n };\n }\n /**\r\n * Static method to deserialize a JSON representation of an object into an\r\n * {@link AuthCredential}.\r\n *\r\n * @param json - Input can be either Object or the stringified representation of the object.\r\n * When string is provided, JSON.parse would be called first.\r\n *\r\n * @returns If the JSON input does not represent an {@link AuthCredential}, null is returned.\r\n */\n static fromJSON(json) {\n const obj = typeof json === 'string' ? JSON.parse(json) : json;\n const {\n providerId,\n signInMethod,\n pendingToken\n } = obj;\n if (!providerId || !signInMethod || !pendingToken || providerId !== signInMethod) {\n return null;\n }\n return new SAMLAuthCredential(providerId, pendingToken);\n }\n /**\r\n * Helper static method to avoid exposing the constructor to end users.\r\n *\r\n * @internal\r\n */\n static _create(providerId, pendingToken) {\n return new SAMLAuthCredential(providerId, pendingToken);\n }\n buildRequest() {\n return {\n requestUri: IDP_REQUEST_URI,\n returnSecureToken: true,\n pendingToken: this.pendingToken\n };\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst SAML_PROVIDER_PREFIX = 'saml.';\n/**\r\n * An {@link AuthProvider} for SAML.\r\n *\r\n * @public\r\n */\nclass SAMLAuthProvider extends FederatedAuthProvider {\n /**\r\n * Constructor. The providerId must start with \"saml.\"\r\n * @param providerId - SAML provider ID.\r\n */\n constructor(providerId) {\n _assert(providerId.startsWith(SAML_PROVIDER_PREFIX), \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n super(providerId);\n }\n /**\r\n * Generates an {@link AuthCredential} from a {@link UserCredential} after a\r\n * successful SAML flow completes.\r\n *\r\n * @remarks\r\n *\r\n * For example, to get an {@link AuthCredential}, you could write the\r\n * following code:\r\n *\r\n * ```js\r\n * const userCredential = await signInWithPopup(auth, samlProvider);\r\n * const credential = SAMLAuthProvider.credentialFromResult(userCredential);\r\n * ```\r\n *\r\n * @param userCredential - The user credential.\r\n */\n static credentialFromResult(userCredential) {\n return SAMLAuthProvider.samlCredentialFromTaggedObject(userCredential);\n }\n /**\r\n * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was\r\n * thrown during a sign-in, link, or reauthenticate operation.\r\n *\r\n * @param userCredential - The user credential.\r\n */\n static credentialFromError(error) {\n return SAMLAuthProvider.samlCredentialFromTaggedObject(error.customData || {});\n }\n /**\r\n * Creates an {@link AuthCredential} from a JSON string or a plain object.\r\n * @param json - A plain object or a JSON string\r\n */\n static credentialFromJSON(json) {\n const credential = SAMLAuthCredential.fromJSON(json);\n _assert(credential, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n return credential;\n }\n static samlCredentialFromTaggedObject({\n _tokenResponse: tokenResponse\n }) {\n if (!tokenResponse) {\n return null;\n }\n const {\n pendingToken,\n providerId\n } = tokenResponse;\n if (!pendingToken || !providerId) {\n return null;\n }\n try {\n return SAMLAuthCredential._create(providerId, pendingToken);\n } catch (e) {\n return null;\n }\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Provider for generating an {@link OAuthCredential} for {@link ProviderId}.TWITTER.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a redirect.\r\n * const provider = new TwitterAuthProvider();\r\n * // Start a sign in process for an unauthenticated user.\r\n * await signInWithRedirect(auth, provider);\r\n * // This will trigger a full page redirect away from your app\r\n *\r\n * // After returning from the redirect when your app initializes you can obtain the result\r\n * const result = await getRedirectResult(auth);\r\n * if (result) {\r\n * // This is the signed-in user\r\n * const user = result.user;\r\n * // This gives you a Twitter Access Token and Secret.\r\n * const credential = TwitterAuthProvider.credentialFromResult(result);\r\n * const token = credential.accessToken;\r\n * const secret = credential.secret;\r\n * }\r\n * ```\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a popup.\r\n * const provider = new TwitterAuthProvider();\r\n * const result = await signInWithPopup(auth, provider);\r\n *\r\n * // The signed-in user info.\r\n * const user = result.user;\r\n * // This gives you a Twitter Access Token and Secret.\r\n * const credential = TwitterAuthProvider.credentialFromResult(result);\r\n * const token = credential.accessToken;\r\n * const secret = credential.secret;\r\n * ```\r\n *\r\n * @public\r\n */\nlet TwitterAuthProvider = /*#__PURE__*/(() => {\n class TwitterAuthProvider extends BaseOAuthProvider {\n constructor() {\n super(\"twitter.com\" /* ProviderId.TWITTER */);\n }\n /**\r\n * Creates a credential for Twitter.\r\n *\r\n * @param token - Twitter access token.\r\n * @param secret - Twitter secret.\r\n */\n static credential(token, secret) {\n return OAuthCredential._fromParams({\n providerId: TwitterAuthProvider.PROVIDER_ID,\n signInMethod: TwitterAuthProvider.TWITTER_SIGN_IN_METHOD,\n oauthToken: token,\n oauthTokenSecret: secret\n });\n }\n /**\r\n * Used to extract the underlying {@link OAuthCredential} from a {@link UserCredential}.\r\n *\r\n * @param userCredential - The user credential.\r\n */\n static credentialFromResult(userCredential) {\n return TwitterAuthProvider.credentialFromTaggedObject(userCredential);\n }\n /**\r\n * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was\r\n * thrown during a sign-in, link, or reauthenticate operation.\r\n *\r\n * @param userCredential - The user credential.\r\n */\n static credentialFromError(error) {\n return TwitterAuthProvider.credentialFromTaggedObject(error.customData || {});\n }\n static credentialFromTaggedObject({\n _tokenResponse: tokenResponse\n }) {\n if (!tokenResponse) {\n return null;\n }\n const {\n oauthAccessToken,\n oauthTokenSecret\n } = tokenResponse;\n if (!oauthAccessToken || !oauthTokenSecret) {\n return null;\n }\n try {\n return TwitterAuthProvider.credential(oauthAccessToken, oauthTokenSecret);\n } catch (_a) {\n return null;\n }\n }\n }\n /** Always set to {@link SignInMethod}.TWITTER. */\n\n /** Always set to {@link ProviderId}.TWITTER. */TwitterAuthProvider.TWITTER_SIGN_IN_METHOD = \"twitter.com\" /* SignInMethod.TWITTER */;\n\n TwitterAuthProvider.PROVIDER_ID = \"twitter.com\" /* ProviderId.TWITTER */;\n\n /**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n return TwitterAuthProvider;\n})();\nasync function signUp(auth, request) {\n return _performSignInRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:signUp\" /* Endpoint.SIGN_UP */, _addTidIfNecessary(auth, request));\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nclass UserCredentialImpl {\n constructor(params) {\n this.user = params.user;\n this.providerId = params.providerId;\n this._tokenResponse = params._tokenResponse;\n this.operationType = params.operationType;\n }\n static async _fromIdTokenResponse(auth, operationType, idTokenResponse, isAnonymous = false) {\n const user = await UserImpl._fromIdTokenResponse(auth, idTokenResponse, isAnonymous);\n const providerId = providerIdForResponse(idTokenResponse);\n const userCred = new UserCredentialImpl({\n user,\n providerId,\n _tokenResponse: idTokenResponse,\n operationType\n });\n return userCred;\n }\n static async _forOperation(user, operationType, response) {\n await user._updateTokensIfNecessary(response, /* reload */true);\n const providerId = providerIdForResponse(response);\n return new UserCredentialImpl({\n user,\n providerId,\n _tokenResponse: response,\n operationType\n });\n }\n}\nfunction providerIdForResponse(response) {\n if (response.providerId) {\n return response.providerId;\n }\n if ('phoneNumber' in response) {\n return \"phone\" /* ProviderId.PHONE */;\n }\n return null;\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Asynchronously signs in as an anonymous user.\r\n *\r\n * @remarks\r\n * If there is already an anonymous user signed in, that user will be returned; otherwise, a\r\n * new anonymous user identity will be created and returned.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n *\r\n * @public\r\n */\nasync function signInAnonymously(auth) {\n var _a;\n const authInternal = _castAuth(auth);\n await authInternal._initializationPromise;\n if ((_a = authInternal.currentUser) === null || _a === void 0 ? void 0 : _a.isAnonymous) {\n // If an anonymous user is already signed in, no need to sign them in again.\n return new UserCredentialImpl({\n user: authInternal.currentUser,\n providerId: null,\n operationType: \"signIn\" /* OperationType.SIGN_IN */\n });\n }\n const response = await signUp(authInternal, {\n returnSecureToken: true\n });\n const userCredential = await UserCredentialImpl._fromIdTokenResponse(authInternal, \"signIn\" /* OperationType.SIGN_IN */, response, true);\n await authInternal._updateCurrentUser(userCredential.user);\n return userCredential;\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nclass MultiFactorError extends FirebaseError {\n constructor(auth, error, operationType, user) {\n var _a;\n super(error.code, error.message);\n this.operationType = operationType;\n this.user = user;\n // https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work\n Object.setPrototypeOf(this, MultiFactorError.prototype);\n this.customData = {\n appName: auth.name,\n tenantId: (_a = auth.tenantId) !== null && _a !== void 0 ? _a : undefined,\n _serverResponse: error.customData._serverResponse,\n operationType\n };\n }\n static _fromErrorAndOperation(auth, error, operationType, user) {\n return new MultiFactorError(auth, error, operationType, user);\n }\n}\nfunction _processCredentialSavingMfaContextIfNecessary(auth, operationType, credential, user) {\n const idTokenProvider = operationType === \"reauthenticate\" /* OperationType.REAUTHENTICATE */ ? credential._getReauthenticationResolver(auth) : credential._getIdTokenResponse(auth);\n return idTokenProvider.catch(error => {\n if (error.code === `auth/${\"multi-factor-auth-required\" /* AuthErrorCode.MFA_REQUIRED */}`) {\n throw MultiFactorError._fromErrorAndOperation(auth, error, operationType, user);\n }\n throw error;\n });\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Takes a set of UserInfo provider data and converts it to a set of names\r\n */\nfunction providerDataAsNames(providerData) {\n return new Set(providerData.map(({\n providerId\n }) => providerId).filter(pid => !!pid));\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Unlinks a provider from a user account.\r\n *\r\n * @param user - The user.\r\n * @param providerId - The provider to unlink.\r\n *\r\n * @public\r\n */\nasync function unlink(user, providerId) {\n const userInternal = getModularInstance(user);\n await _assertLinkedStatus(true, userInternal, providerId);\n const {\n providerUserInfo\n } = await deleteLinkedAccounts(userInternal.auth, {\n idToken: await userInternal.getIdToken(),\n deleteProvider: [providerId]\n });\n const providersLeft = providerDataAsNames(providerUserInfo || []);\n userInternal.providerData = userInternal.providerData.filter(pd => providersLeft.has(pd.providerId));\n if (!providersLeft.has(\"phone\" /* ProviderId.PHONE */)) {\n userInternal.phoneNumber = null;\n }\n await userInternal.auth._persistUserIfCurrent(userInternal);\n return userInternal;\n}\nasync function _link$1(user, credential, bypassAuthState = false) {\n const response = await _logoutIfInvalidated(user, credential._linkToIdToken(user.auth, await user.getIdToken()), bypassAuthState);\n return UserCredentialImpl._forOperation(user, \"link\" /* OperationType.LINK */, response);\n}\nasync function _assertLinkedStatus(expected, user, provider) {\n await _reloadWithoutSaving(user);\n const providerIds = providerDataAsNames(user.providerData);\n const code = expected === false ? \"provider-already-linked\" /* AuthErrorCode.PROVIDER_ALREADY_LINKED */ : \"no-such-provider\" /* AuthErrorCode.NO_SUCH_PROVIDER */;\n _assert(providerIds.has(provider) === expected, user.auth, code);\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nasync function _reauthenticate(user, credential, bypassAuthState = false) {\n const {\n auth\n } = user;\n const operationType = \"reauthenticate\" /* OperationType.REAUTHENTICATE */;\n try {\n const response = await _logoutIfInvalidated(user, _processCredentialSavingMfaContextIfNecessary(auth, operationType, credential, user), bypassAuthState);\n _assert(response.idToken, auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n const parsed = _parseToken(response.idToken);\n _assert(parsed, auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n const {\n sub: localId\n } = parsed;\n _assert(user.uid === localId, auth, \"user-mismatch\" /* AuthErrorCode.USER_MISMATCH */);\n return UserCredentialImpl._forOperation(user, operationType, response);\n } catch (e) {\n // Convert user deleted error into user mismatch\n if ((e === null || e === void 0 ? void 0 : e.code) === `auth/${\"user-not-found\" /* AuthErrorCode.USER_DELETED */}`) {\n _fail(auth, \"user-mismatch\" /* AuthErrorCode.USER_MISMATCH */);\n }\n throw e;\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nasync function _signInWithCredential(auth, credential, bypassAuthState = false) {\n const operationType = \"signIn\" /* OperationType.SIGN_IN */;\n const response = await _processCredentialSavingMfaContextIfNecessary(auth, operationType, credential);\n const userCredential = await UserCredentialImpl._fromIdTokenResponse(auth, operationType, response);\n if (!bypassAuthState) {\n await auth._updateCurrentUser(userCredential.user);\n }\n return userCredential;\n}\n/**\r\n * Asynchronously signs in with the given credentials.\r\n *\r\n * @remarks\r\n * An {@link AuthProvider} can be used to generate the credential.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param credential - The auth credential.\r\n *\r\n * @public\r\n */\nasync function signInWithCredential(auth, credential) {\n return _signInWithCredential(_castAuth(auth), credential);\n}\n/**\r\n * Links the user account with the given credentials.\r\n *\r\n * @remarks\r\n * An {@link AuthProvider} can be used to generate the credential.\r\n *\r\n * @param user - The user.\r\n * @param credential - The auth credential.\r\n *\r\n * @public\r\n */\nasync function linkWithCredential(user, credential) {\n const userInternal = getModularInstance(user);\n await _assertLinkedStatus(false, userInternal, credential.providerId);\n return _link$1(userInternal, credential);\n}\n/**\r\n * Re-authenticates a user using a fresh credential.\r\n *\r\n * @remarks\r\n * Use before operations such as {@link updatePassword} that require tokens from recent sign-in\r\n * attempts. This method can be used to recover from a `CREDENTIAL_TOO_OLD_LOGIN_AGAIN` error\r\n * or a `TOKEN_EXPIRED` error.\r\n *\r\n * @param user - The user.\r\n * @param credential - The auth credential.\r\n *\r\n * @public\r\n */\nasync function reauthenticateWithCredential(user, credential) {\n return _reauthenticate(getModularInstance(user), credential);\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nasync function signInWithCustomToken$1(auth, request) {\n return _performSignInRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:signInWithCustomToken\" /* Endpoint.SIGN_IN_WITH_CUSTOM_TOKEN */, _addTidIfNecessary(auth, request));\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Asynchronously signs in using a custom token.\r\n *\r\n * @remarks\r\n * Custom tokens are used to integrate Firebase Auth with existing auth systems, and must\r\n * be generated by an auth backend using the\r\n * {@link https://firebase.google.com/docs/reference/admin/node/admin.auth.Auth#createcustomtoken | createCustomToken}\r\n * method in the {@link https://firebase.google.com/docs/auth/admin | Admin SDK} .\r\n *\r\n * Fails with an error if the token is invalid, expired, or not accepted by the Firebase Auth service.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param customToken - The custom token to sign in with.\r\n *\r\n * @public\r\n */\nasync function signInWithCustomToken(auth, customToken) {\n const authInternal = _castAuth(auth);\n const response = await signInWithCustomToken$1(authInternal, {\n token: customToken,\n returnSecureToken: true\n });\n const cred = await UserCredentialImpl._fromIdTokenResponse(authInternal, \"signIn\" /* OperationType.SIGN_IN */, response);\n await authInternal._updateCurrentUser(cred.user);\n return cred;\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nclass MultiFactorInfoImpl {\n constructor(factorId, response) {\n this.factorId = factorId;\n this.uid = response.mfaEnrollmentId;\n this.enrollmentTime = new Date(response.enrolledAt).toUTCString();\n this.displayName = response.displayName;\n }\n static _fromServerResponse(auth, enrollment) {\n if ('phoneInfo' in enrollment) {\n return PhoneMultiFactorInfoImpl._fromServerResponse(auth, enrollment);\n } else if ('totpInfo' in enrollment) {\n return TotpMultiFactorInfoImpl._fromServerResponse(auth, enrollment);\n }\n return _fail(auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n }\n}\nclass PhoneMultiFactorInfoImpl extends MultiFactorInfoImpl {\n constructor(response) {\n super(\"phone\" /* FactorId.PHONE */, response);\n this.phoneNumber = response.phoneInfo;\n }\n static _fromServerResponse(_auth, enrollment) {\n return new PhoneMultiFactorInfoImpl(enrollment);\n }\n}\nclass TotpMultiFactorInfoImpl extends MultiFactorInfoImpl {\n constructor(response) {\n super(\"totp\" /* FactorId.TOTP */, response);\n }\n static _fromServerResponse(_auth, enrollment) {\n return new TotpMultiFactorInfoImpl(enrollment);\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _setActionCodeSettingsOnRequest(auth, request, actionCodeSettings) {\n var _a;\n _assert(((_a = actionCodeSettings.url) === null || _a === void 0 ? void 0 : _a.length) > 0, auth, \"invalid-continue-uri\" /* AuthErrorCode.INVALID_CONTINUE_URI */);\n _assert(typeof actionCodeSettings.dynamicLinkDomain === 'undefined' || actionCodeSettings.dynamicLinkDomain.length > 0, auth, \"invalid-dynamic-link-domain\" /* AuthErrorCode.INVALID_DYNAMIC_LINK_DOMAIN */);\n request.continueUrl = actionCodeSettings.url;\n request.dynamicLinkDomain = actionCodeSettings.dynamicLinkDomain;\n request.canHandleCodeInApp = actionCodeSettings.handleCodeInApp;\n if (actionCodeSettings.iOS) {\n _assert(actionCodeSettings.iOS.bundleId.length > 0, auth, \"missing-ios-bundle-id\" /* AuthErrorCode.MISSING_IOS_BUNDLE_ID */);\n request.iOSBundleId = actionCodeSettings.iOS.bundleId;\n }\n if (actionCodeSettings.android) {\n _assert(actionCodeSettings.android.packageName.length > 0, auth, \"missing-android-pkg-name\" /* AuthErrorCode.MISSING_ANDROID_PACKAGE_NAME */);\n request.androidInstallApp = actionCodeSettings.android.installApp;\n request.androidMinimumVersionCode = actionCodeSettings.android.minimumVersion;\n request.androidPackageName = actionCodeSettings.android.packageName;\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Updates the password policy cached in the {@link Auth} instance if a policy is already\r\n * cached for the project or tenant.\r\n *\r\n * @remarks\r\n * We only fetch the password policy if the password did not meet policy requirements and\r\n * there is an existing policy cached. A developer must call validatePassword at least\r\n * once for the cache to be automatically updated.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n *\r\n * @private\r\n */\nasync function recachePasswordPolicy(auth) {\n const authInternal = _castAuth(auth);\n if (authInternal._getPasswordPolicyInternal()) {\n await authInternal._updatePasswordPolicy();\n }\n}\n/**\r\n * Sends a password reset email to the given email address. This method does not throw an error when\r\n * there's no user account with the given email address and\r\n * [Email Enumeration Protection](https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection) is enabled.\r\n *\r\n * @remarks\r\n * To complete the password reset, call {@link confirmPasswordReset} with the code supplied in\r\n * the email sent to the user, along with the new password specified by the user.\r\n *\r\n * @example\r\n * ```javascript\r\n * const actionCodeSettings = {\r\n * url: 'https://www.example.com/?email=user@example.com',\r\n * iOS: {\r\n * bundleId: 'com.example.ios'\r\n * },\r\n * android: {\r\n * packageName: 'com.example.android',\r\n * installApp: true,\r\n * minimumVersion: '12'\r\n * },\r\n * handleCodeInApp: true\r\n * };\r\n * await sendPasswordResetEmail(auth, 'user@example.com', actionCodeSettings);\r\n * // Obtain code from user.\r\n * await confirmPasswordReset('user@example.com', code);\r\n * ```\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param email - The user's email address.\r\n * @param actionCodeSettings - The {@link ActionCodeSettings}.\r\n *\r\n * @public\r\n */\nasync function sendPasswordResetEmail(auth, email, actionCodeSettings) {\n const authInternal = _castAuth(auth);\n const request = {\n requestType: \"PASSWORD_RESET\" /* ActionCodeOperation.PASSWORD_RESET */,\n email,\n clientType: \"CLIENT_TYPE_WEB\" /* RecaptchaClientType.WEB */\n };\n if (actionCodeSettings) {\n _setActionCodeSettingsOnRequest(authInternal, request, actionCodeSettings);\n }\n await handleRecaptchaFlow(authInternal, request, \"getOobCode\" /* RecaptchaActionName.GET_OOB_CODE */, sendPasswordResetEmail$1);\n}\n/**\r\n * Completes the password reset process, given a confirmation code and new password.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param oobCode - A confirmation code sent to the user.\r\n * @param newPassword - The new password.\r\n *\r\n * @public\r\n */\nasync function confirmPasswordReset(auth, oobCode, newPassword) {\n await resetPassword(getModularInstance(auth), {\n oobCode,\n newPassword\n }).catch(async error => {\n if (error.code === `auth/${\"password-does-not-meet-requirements\" /* AuthErrorCode.PASSWORD_DOES_NOT_MEET_REQUIREMENTS */}`) {\n void recachePasswordPolicy(auth);\n }\n throw error;\n });\n // Do not return the email.\n}\n/**\r\n * Applies a verification code sent to the user by email or other out-of-band mechanism.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param oobCode - A verification code sent to the user.\r\n *\r\n * @public\r\n */\nasync function applyActionCode(auth, oobCode) {\n await applyActionCode$1(getModularInstance(auth), {\n oobCode\n });\n}\n/**\r\n * Checks a verification code sent to the user by email or other out-of-band mechanism.\r\n *\r\n * @returns metadata about the code.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param oobCode - A verification code sent to the user.\r\n *\r\n * @public\r\n */\nasync function checkActionCode(auth, oobCode) {\n const authModular = getModularInstance(auth);\n const response = await resetPassword(authModular, {\n oobCode\n });\n // Email could be empty only if the request type is EMAIL_SIGNIN or\n // VERIFY_AND_CHANGE_EMAIL.\n // New email should not be empty if the request type is\n // VERIFY_AND_CHANGE_EMAIL.\n // Multi-factor info could not be empty if the request type is\n // REVERT_SECOND_FACTOR_ADDITION.\n const operation = response.requestType;\n _assert(operation, authModular, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n switch (operation) {\n case \"EMAIL_SIGNIN\" /* ActionCodeOperation.EMAIL_SIGNIN */:\n break;\n case \"VERIFY_AND_CHANGE_EMAIL\" /* ActionCodeOperation.VERIFY_AND_CHANGE_EMAIL */:\n _assert(response.newEmail, authModular, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n break;\n case \"REVERT_SECOND_FACTOR_ADDITION\" /* ActionCodeOperation.REVERT_SECOND_FACTOR_ADDITION */:\n _assert(response.mfaInfo, authModular, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n // fall through\n default:\n _assert(response.email, authModular, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n }\n // The multi-factor info for revert second factor addition\n let multiFactorInfo = null;\n if (response.mfaInfo) {\n multiFactorInfo = MultiFactorInfoImpl._fromServerResponse(_castAuth(authModular), response.mfaInfo);\n }\n return {\n data: {\n email: (response.requestType === \"VERIFY_AND_CHANGE_EMAIL\" /* ActionCodeOperation.VERIFY_AND_CHANGE_EMAIL */ ? response.newEmail : response.email) || null,\n previousEmail: (response.requestType === \"VERIFY_AND_CHANGE_EMAIL\" /* ActionCodeOperation.VERIFY_AND_CHANGE_EMAIL */ ? response.email : response.newEmail) || null,\n multiFactorInfo\n },\n operation\n };\n}\n/**\r\n * Checks a password reset code sent to the user by email or other out-of-band mechanism.\r\n *\r\n * @returns the user's email address if valid.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param code - A verification code sent to the user.\r\n *\r\n * @public\r\n */\nasync function verifyPasswordResetCode(auth, code) {\n const {\n data\n } = await checkActionCode(getModularInstance(auth), code);\n // Email should always be present since a code was sent to it\n return data.email;\n}\n/**\r\n * Creates a new user account associated with the specified email address and password.\r\n *\r\n * @remarks\r\n * On successful creation of the user account, this user will also be signed in to your application.\r\n *\r\n * User account creation can fail if the account already exists or the password is invalid.\r\n *\r\n * Note: The email address acts as a unique identifier for the user and enables an email-based\r\n * password reset. This function will create a new user account and set the initial user password.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param email - The user's email address.\r\n * @param password - The user's chosen password.\r\n *\r\n * @public\r\n */\nasync function createUserWithEmailAndPassword(auth, email, password) {\n const authInternal = _castAuth(auth);\n const request = {\n returnSecureToken: true,\n email,\n password,\n clientType: \"CLIENT_TYPE_WEB\" /* RecaptchaClientType.WEB */\n };\n const signUpResponse = handleRecaptchaFlow(authInternal, request, \"signUpPassword\" /* RecaptchaActionName.SIGN_UP_PASSWORD */, signUp);\n const response = await signUpResponse.catch(error => {\n if (error.code === `auth/${\"password-does-not-meet-requirements\" /* AuthErrorCode.PASSWORD_DOES_NOT_MEET_REQUIREMENTS */}`) {\n void recachePasswordPolicy(auth);\n }\n throw error;\n });\n const userCredential = await UserCredentialImpl._fromIdTokenResponse(authInternal, \"signIn\" /* OperationType.SIGN_IN */, response);\n await authInternal._updateCurrentUser(userCredential.user);\n return userCredential;\n}\n/**\r\n * Asynchronously signs in using an email and password.\r\n *\r\n * @remarks\r\n * Fails with an error if the email address and password do not match.\r\n * When [Email Enumeration Protection](https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection) is enabled,\r\n * this method fails with \"auth/invalid-credential\" in case of an invalid email/password.\r\n *\r\n * Note: The user's password is NOT the password used to access the user's email account. The\r\n * email address serves as a unique identifier for the user, and the password is used to access\r\n * the user's account in your Firebase project. See also: {@link createUserWithEmailAndPassword}.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param email - The users email address.\r\n * @param password - The users password.\r\n *\r\n * @public\r\n */\nfunction signInWithEmailAndPassword(auth, email, password) {\n return signInWithCredential(getModularInstance(auth), EmailAuthProvider.credential(email, password)).catch(async error => {\n if (error.code === `auth/${\"password-does-not-meet-requirements\" /* AuthErrorCode.PASSWORD_DOES_NOT_MEET_REQUIREMENTS */}`) {\n void recachePasswordPolicy(auth);\n }\n throw error;\n });\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Sends a sign-in email link to the user with the specified email.\r\n *\r\n * @remarks\r\n * The sign-in operation has to always be completed in the app unlike other out of band email\r\n * actions (password reset and email verifications). This is because, at the end of the flow,\r\n * the user is expected to be signed in and their Auth state persisted within the app.\r\n *\r\n * To complete sign in with the email link, call {@link signInWithEmailLink} with the email\r\n * address and the email link supplied in the email sent to the user.\r\n *\r\n * @example\r\n * ```javascript\r\n * const actionCodeSettings = {\r\n * url: 'https://www.example.com/?email=user@example.com',\r\n * iOS: {\r\n * bundleId: 'com.example.ios'\r\n * },\r\n * android: {\r\n * packageName: 'com.example.android',\r\n * installApp: true,\r\n * minimumVersion: '12'\r\n * },\r\n * handleCodeInApp: true\r\n * };\r\n * await sendSignInLinkToEmail(auth, 'user@example.com', actionCodeSettings);\r\n * // Obtain emailLink from the user.\r\n * if(isSignInWithEmailLink(auth, emailLink)) {\r\n * await signInWithEmailLink(auth, 'user@example.com', emailLink);\r\n * }\r\n * ```\r\n *\r\n * @param authInternal - The {@link Auth} instance.\r\n * @param email - The user's email address.\r\n * @param actionCodeSettings - The {@link ActionCodeSettings}.\r\n *\r\n * @public\r\n */\nasync function sendSignInLinkToEmail(auth, email, actionCodeSettings) {\n const authInternal = _castAuth(auth);\n const request = {\n requestType: \"EMAIL_SIGNIN\" /* ActionCodeOperation.EMAIL_SIGNIN */,\n email,\n clientType: \"CLIENT_TYPE_WEB\" /* RecaptchaClientType.WEB */\n };\n function setActionCodeSettings(request, actionCodeSettings) {\n _assert(actionCodeSettings.handleCodeInApp, authInternal, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n if (actionCodeSettings) {\n _setActionCodeSettingsOnRequest(authInternal, request, actionCodeSettings);\n }\n }\n setActionCodeSettings(request, actionCodeSettings);\n await handleRecaptchaFlow(authInternal, request, \"getOobCode\" /* RecaptchaActionName.GET_OOB_CODE */, sendSignInLinkToEmail$1);\n}\n/**\r\n * Checks if an incoming link is a sign-in with email link suitable for {@link signInWithEmailLink}.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param emailLink - The link sent to the user's email address.\r\n *\r\n * @public\r\n */\nfunction isSignInWithEmailLink(auth, emailLink) {\n const actionCodeUrl = ActionCodeURL.parseLink(emailLink);\n return (actionCodeUrl === null || actionCodeUrl === void 0 ? void 0 : actionCodeUrl.operation) === \"EMAIL_SIGNIN\" /* ActionCodeOperation.EMAIL_SIGNIN */;\n}\n/**\r\n * Asynchronously signs in using an email and sign-in email link.\r\n *\r\n * @remarks\r\n * If no link is passed, the link is inferred from the current URL.\r\n *\r\n * Fails with an error if the email address is invalid or OTP in email link expires.\r\n *\r\n * Note: Confirm the link is a sign-in email link before calling this method firebase.auth.Auth.isSignInWithEmailLink.\r\n *\r\n * @example\r\n * ```javascript\r\n * const actionCodeSettings = {\r\n * url: 'https://www.example.com/?email=user@example.com',\r\n * iOS: {\r\n * bundleId: 'com.example.ios'\r\n * },\r\n * android: {\r\n * packageName: 'com.example.android',\r\n * installApp: true,\r\n * minimumVersion: '12'\r\n * },\r\n * handleCodeInApp: true\r\n * };\r\n * await sendSignInLinkToEmail(auth, 'user@example.com', actionCodeSettings);\r\n * // Obtain emailLink from the user.\r\n * if(isSignInWithEmailLink(auth, emailLink)) {\r\n * await signInWithEmailLink(auth, 'user@example.com', emailLink);\r\n * }\r\n * ```\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param email - The user's email address.\r\n * @param emailLink - The link sent to the user's email address.\r\n *\r\n * @public\r\n */\nasync function signInWithEmailLink(auth, email, emailLink) {\n const authModular = getModularInstance(auth);\n const credential = EmailAuthProvider.credentialWithLink(email, emailLink || _getCurrentUrl());\n // Check if the tenant ID in the email link matches the tenant ID on Auth\n // instance.\n _assert(credential._tenantId === (authModular.tenantId || null), authModular, \"tenant-id-mismatch\" /* AuthErrorCode.TENANT_ID_MISMATCH */);\n return signInWithCredential(authModular, credential);\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nasync function createAuthUri(auth, request) {\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:createAuthUri\" /* Endpoint.CREATE_AUTH_URI */, _addTidIfNecessary(auth, request));\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Gets the list of possible sign in methods for the given email address. This method returns an\r\n * empty list when [Email Enumeration Protection](https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection) is enabled, irrespective of the number of\r\n * authentication methods available for the given email.\r\n *\r\n * @remarks\r\n * This is useful to differentiate methods of sign-in for the same provider, eg.\r\n * {@link EmailAuthProvider} which has 2 methods of sign-in,\r\n * {@link SignInMethod}.EMAIL_PASSWORD and\r\n * {@link SignInMethod}.EMAIL_LINK.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param email - The user's email address.\r\n *\r\n * Deprecated. Migrating off of this method is recommended as a security best-practice.\r\n * Learn more in the Identity Platform documentation for [Email Enumeration Protection](https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection).\r\n * @public\r\n */\nasync function fetchSignInMethodsForEmail(auth, email) {\n // createAuthUri returns an error if continue URI is not http or https.\n // For environments like Cordova, Chrome extensions, native frameworks, file\n // systems, etc, use http://localhost as continue URL.\n const continueUri = _isHttpOrHttps() ? _getCurrentUrl() : 'http://localhost';\n const request = {\n identifier: email,\n continueUri\n };\n const {\n signinMethods\n } = await createAuthUri(getModularInstance(auth), request);\n return signinMethods || [];\n}\n/**\r\n * Sends a verification email to a user.\r\n *\r\n * @remarks\r\n * The verification process is completed by calling {@link applyActionCode}.\r\n *\r\n * @example\r\n * ```javascript\r\n * const actionCodeSettings = {\r\n * url: 'https://www.example.com/?email=user@example.com',\r\n * iOS: {\r\n * bundleId: 'com.example.ios'\r\n * },\r\n * android: {\r\n * packageName: 'com.example.android',\r\n * installApp: true,\r\n * minimumVersion: '12'\r\n * },\r\n * handleCodeInApp: true\r\n * };\r\n * await sendEmailVerification(user, actionCodeSettings);\r\n * // Obtain code from the user.\r\n * await applyActionCode(auth, code);\r\n * ```\r\n *\r\n * @param user - The user.\r\n * @param actionCodeSettings - The {@link ActionCodeSettings}.\r\n *\r\n * @public\r\n */\nasync function sendEmailVerification(user, actionCodeSettings) {\n const userInternal = getModularInstance(user);\n const idToken = await user.getIdToken();\n const request = {\n requestType: \"VERIFY_EMAIL\" /* ActionCodeOperation.VERIFY_EMAIL */,\n idToken\n };\n if (actionCodeSettings) {\n _setActionCodeSettingsOnRequest(userInternal.auth, request, actionCodeSettings);\n }\n const {\n email\n } = await sendEmailVerification$1(userInternal.auth, request);\n if (email !== user.email) {\n await user.reload();\n }\n}\n/**\r\n * Sends a verification email to a new email address.\r\n *\r\n * @remarks\r\n * The user's email will be updated to the new one after being verified.\r\n *\r\n * If you have a custom email action handler, you can complete the verification process by calling\r\n * {@link applyActionCode}.\r\n *\r\n * @example\r\n * ```javascript\r\n * const actionCodeSettings = {\r\n * url: 'https://www.example.com/?email=user@example.com',\r\n * iOS: {\r\n * bundleId: 'com.example.ios'\r\n * },\r\n * android: {\r\n * packageName: 'com.example.android',\r\n * installApp: true,\r\n * minimumVersion: '12'\r\n * },\r\n * handleCodeInApp: true\r\n * };\r\n * await verifyBeforeUpdateEmail(user, 'newemail@example.com', actionCodeSettings);\r\n * // Obtain code from the user.\r\n * await applyActionCode(auth, code);\r\n * ```\r\n *\r\n * @param user - The user.\r\n * @param newEmail - The new email address to be verified before update.\r\n * @param actionCodeSettings - The {@link ActionCodeSettings}.\r\n *\r\n * @public\r\n */\nasync function verifyBeforeUpdateEmail(user, newEmail, actionCodeSettings) {\n const userInternal = getModularInstance(user);\n const idToken = await user.getIdToken();\n const request = {\n requestType: \"VERIFY_AND_CHANGE_EMAIL\" /* ActionCodeOperation.VERIFY_AND_CHANGE_EMAIL */,\n idToken,\n newEmail\n };\n if (actionCodeSettings) {\n _setActionCodeSettingsOnRequest(userInternal.auth, request, actionCodeSettings);\n }\n const {\n email\n } = await verifyAndChangeEmail(userInternal.auth, request);\n if (email !== user.email) {\n // If the local copy of the email on user is outdated, reload the\n // user.\n await user.reload();\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nasync function updateProfile$1(auth, request) {\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:update\" /* Endpoint.SET_ACCOUNT_INFO */, request);\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Updates a user's profile data.\r\n *\r\n * @param user - The user.\r\n * @param profile - The profile's `displayName` and `photoURL` to update.\r\n *\r\n * @public\r\n */\nasync function updateProfile(user, {\n displayName,\n photoURL: photoUrl\n}) {\n if (displayName === undefined && photoUrl === undefined) {\n return;\n }\n const userInternal = getModularInstance(user);\n const idToken = await userInternal.getIdToken();\n const profileRequest = {\n idToken,\n displayName,\n photoUrl,\n returnSecureToken: true\n };\n const response = await _logoutIfInvalidated(userInternal, updateProfile$1(userInternal.auth, profileRequest));\n userInternal.displayName = response.displayName || null;\n userInternal.photoURL = response.photoUrl || null;\n // Update the password provider as well\n const passwordProvider = userInternal.providerData.find(({\n providerId\n }) => providerId === \"password\" /* ProviderId.PASSWORD */);\n if (passwordProvider) {\n passwordProvider.displayName = userInternal.displayName;\n passwordProvider.photoURL = userInternal.photoURL;\n }\n await userInternal._updateTokensIfNecessary(response);\n}\n/**\r\n * Updates the user's email address.\r\n *\r\n * @remarks\r\n * An email will be sent to the original email address (if it was set) that allows to revoke the\r\n * email address change, in order to protect them from account hijacking.\r\n *\r\n * Important: this is a security sensitive operation that requires the user to have recently signed\r\n * in. If this requirement isn't met, ask the user to authenticate again and then call\r\n * {@link reauthenticateWithCredential}.\r\n *\r\n * @param user - The user.\r\n * @param newEmail - The new email address.\r\n *\r\n * Throws \"auth/operation-not-allowed\" error when [Email Enumeration Protection](https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection) is enabled.\r\n * Deprecated - Use {@link verifyBeforeUpdateEmail} instead.\r\n *\r\n * @public\r\n */\nfunction updateEmail(user, newEmail) {\n return updateEmailOrPassword(getModularInstance(user), newEmail, null);\n}\n/**\r\n * Updates the user's password.\r\n *\r\n * @remarks\r\n * Important: this is a security sensitive operation that requires the user to have recently signed\r\n * in. If this requirement isn't met, ask the user to authenticate again and then call\r\n * {@link reauthenticateWithCredential}.\r\n *\r\n * @param user - The user.\r\n * @param newPassword - The new password.\r\n *\r\n * @public\r\n */\nfunction updatePassword(user, newPassword) {\n return updateEmailOrPassword(getModularInstance(user), null, newPassword);\n}\nasync function updateEmailOrPassword(user, email, password) {\n const {\n auth\n } = user;\n const idToken = await user.getIdToken();\n const request = {\n idToken,\n returnSecureToken: true\n };\n if (email) {\n request.email = email;\n }\n if (password) {\n request.password = password;\n }\n const response = await _logoutIfInvalidated(user, updateEmailPassword(auth, request));\n await user._updateTokensIfNecessary(response, /* reload */true);\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Parse the `AdditionalUserInfo` from the ID token response.\r\n *\r\n */\nfunction _fromIdTokenResponse(idTokenResponse) {\n var _a, _b;\n if (!idTokenResponse) {\n return null;\n }\n const {\n providerId\n } = idTokenResponse;\n const profile = idTokenResponse.rawUserInfo ? JSON.parse(idTokenResponse.rawUserInfo) : {};\n const isNewUser = idTokenResponse.isNewUser || idTokenResponse.kind === \"identitytoolkit#SignupNewUserResponse\" /* IdTokenResponseKind.SignupNewUser */;\n if (!providerId && (idTokenResponse === null || idTokenResponse === void 0 ? void 0 : idTokenResponse.idToken)) {\n const signInProvider = (_b = (_a = _parseToken(idTokenResponse.idToken)) === null || _a === void 0 ? void 0 : _a.firebase) === null || _b === void 0 ? void 0 : _b['sign_in_provider'];\n if (signInProvider) {\n const filteredProviderId = signInProvider !== \"anonymous\" /* ProviderId.ANONYMOUS */ && signInProvider !== \"custom\" /* ProviderId.CUSTOM */ ? signInProvider : null;\n // Uses generic class in accordance with the legacy SDK.\n return new GenericAdditionalUserInfo(isNewUser, filteredProviderId);\n }\n }\n if (!providerId) {\n return null;\n }\n switch (providerId) {\n case \"facebook.com\" /* ProviderId.FACEBOOK */:\n return new FacebookAdditionalUserInfo(isNewUser, profile);\n case \"github.com\" /* ProviderId.GITHUB */:\n return new GithubAdditionalUserInfo(isNewUser, profile);\n case \"google.com\" /* ProviderId.GOOGLE */:\n return new GoogleAdditionalUserInfo(isNewUser, profile);\n case \"twitter.com\" /* ProviderId.TWITTER */:\n return new TwitterAdditionalUserInfo(isNewUser, profile, idTokenResponse.screenName || null);\n case \"custom\" /* ProviderId.CUSTOM */:\n case \"anonymous\" /* ProviderId.ANONYMOUS */:\n return new GenericAdditionalUserInfo(isNewUser, null);\n default:\n return new GenericAdditionalUserInfo(isNewUser, providerId, profile);\n }\n}\nclass GenericAdditionalUserInfo {\n constructor(isNewUser, providerId, profile = {}) {\n this.isNewUser = isNewUser;\n this.providerId = providerId;\n this.profile = profile;\n }\n}\nclass FederatedAdditionalUserInfoWithUsername extends GenericAdditionalUserInfo {\n constructor(isNewUser, providerId, profile, username) {\n super(isNewUser, providerId, profile);\n this.username = username;\n }\n}\nclass FacebookAdditionalUserInfo extends GenericAdditionalUserInfo {\n constructor(isNewUser, profile) {\n super(isNewUser, \"facebook.com\" /* ProviderId.FACEBOOK */, profile);\n }\n}\nclass GithubAdditionalUserInfo extends FederatedAdditionalUserInfoWithUsername {\n constructor(isNewUser, profile) {\n super(isNewUser, \"github.com\" /* ProviderId.GITHUB */, profile, typeof (profile === null || profile === void 0 ? void 0 : profile.login) === 'string' ? profile === null || profile === void 0 ? void 0 : profile.login : null);\n }\n}\nclass GoogleAdditionalUserInfo extends GenericAdditionalUserInfo {\n constructor(isNewUser, profile) {\n super(isNewUser, \"google.com\" /* ProviderId.GOOGLE */, profile);\n }\n}\nclass TwitterAdditionalUserInfo extends FederatedAdditionalUserInfoWithUsername {\n constructor(isNewUser, profile, screenName) {\n super(isNewUser, \"twitter.com\" /* ProviderId.TWITTER */, profile, screenName);\n }\n}\n/**\r\n * Extracts provider specific {@link AdditionalUserInfo} for the given credential.\r\n *\r\n * @param userCredential - The user credential.\r\n *\r\n * @public\r\n */\nfunction getAdditionalUserInfo(userCredential) {\n const {\n user,\n _tokenResponse\n } = userCredential;\n if (user.isAnonymous && !_tokenResponse) {\n // Handle the special case where signInAnonymously() gets called twice.\n // No network call is made so there's nothing to actually fill this in\n return {\n providerId: null,\n isNewUser: false,\n profile: null\n };\n }\n return _fromIdTokenResponse(_tokenResponse);\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n// Non-optional auth methods.\n/**\r\n * Changes the type of persistence on the {@link Auth} instance for the currently saved\r\n * `Auth` session and applies this type of persistence for future sign-in requests, including\r\n * sign-in with redirect requests.\r\n *\r\n * @remarks\r\n * This makes it easy for a user signing in to specify whether their session should be\r\n * remembered or not. It also makes it easier to never persist the `Auth` state for applications\r\n * that are shared by other users or have sensitive data.\r\n *\r\n * This method does not work in a Node.js environment.\r\n *\r\n * @example\r\n * ```javascript\r\n * setPersistence(auth, browserSessionPersistence);\r\n * ```\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param persistence - The {@link Persistence} to use.\r\n * @returns A `Promise` that resolves once the persistence change has completed\r\n *\r\n * @public\r\n */\nfunction setPersistence(auth, persistence) {\n return getModularInstance(auth).setPersistence(persistence);\n}\n/**\r\n * Loads the reCAPTCHA configuration into the `Auth` instance.\r\n *\r\n * @remarks\r\n * This will load the reCAPTCHA config, which indicates whether the reCAPTCHA\r\n * verification flow should be triggered for each auth provider, into the\r\n * current Auth session.\r\n *\r\n * If initializeRecaptchaConfig() is not invoked, the auth flow will always start\r\n * without reCAPTCHA verification. If the provider is configured to require reCAPTCHA\r\n * verification, the SDK will transparently load the reCAPTCHA config and restart the\r\n * auth flows.\r\n *\r\n * Thus, by calling this optional method, you will reduce the latency of future auth flows.\r\n * Loading the reCAPTCHA config early will also enhance the signal collected by reCAPTCHA.\r\n *\r\n * This method does not work in a Node.js environment.\r\n *\r\n * @example\r\n * ```javascript\r\n * initializeRecaptchaConfig(auth);\r\n * ```\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n *\r\n * @public\r\n */\nfunction initializeRecaptchaConfig(auth) {\n return _initializeRecaptchaConfig(auth);\n}\n/**\r\n * Validates the password against the password policy configured for the project or tenant.\r\n *\r\n * @remarks\r\n * If no tenant ID is set on the `Auth` instance, then this method will use the password\r\n * policy configured for the project. Otherwise, this method will use the policy configured\r\n * for the tenant. If a password policy has not been configured, then the default policy\r\n * configured for all projects will be used.\r\n *\r\n * If an auth flow fails because a submitted password does not meet the password policy\r\n * requirements and this method has previously been called, then this method will use the\r\n * most recent policy available when called again.\r\n *\r\n * @example\r\n * ```javascript\r\n * validatePassword(auth, 'some-password');\r\n * ```\r\n *\r\n * @param auth The {@link Auth} instance.\r\n * @param password The password to validate.\r\n *\r\n * @public\r\n */\nasync function validatePassword(auth, password) {\n const authInternal = _castAuth(auth);\n return authInternal.validatePassword(password);\n}\n/**\r\n * Adds an observer for changes to the signed-in user's ID token.\r\n *\r\n * @remarks\r\n * This includes sign-in, sign-out, and token refresh events.\r\n * This will not be triggered automatically upon ID token expiration. Use {@link User.getIdToken} to refresh the ID token.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param nextOrObserver - callback triggered on change.\r\n * @param error - Deprecated. This callback is never triggered. Errors\r\n * on signing in/out can be caught in promises returned from\r\n * sign-in/sign-out functions.\r\n * @param completed - Deprecated. This callback is never triggered.\r\n *\r\n * @public\r\n */\nfunction onIdTokenChanged(auth, nextOrObserver, error, completed) {\n return getModularInstance(auth).onIdTokenChanged(nextOrObserver, error, completed);\n}\n/**\r\n * Adds a blocking callback that runs before an auth state change\r\n * sets a new user.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param callback - callback triggered before new user value is set.\r\n * If this throws, it blocks the user from being set.\r\n * @param onAbort - callback triggered if a later `beforeAuthStateChanged()`\r\n * callback throws, allowing you to undo any side effects.\r\n */\nfunction beforeAuthStateChanged(auth, callback, onAbort) {\n return getModularInstance(auth).beforeAuthStateChanged(callback, onAbort);\n}\n/**\r\n * Adds an observer for changes to the user's sign-in state.\r\n *\r\n * @remarks\r\n * To keep the old behavior, see {@link onIdTokenChanged}.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param nextOrObserver - callback triggered on change.\r\n * @param error - Deprecated. This callback is never triggered. Errors\r\n * on signing in/out can be caught in promises returned from\r\n * sign-in/sign-out functions.\r\n * @param completed - Deprecated. This callback is never triggered.\r\n *\r\n * @public\r\n */\nfunction onAuthStateChanged(auth, nextOrObserver, error, completed) {\n return getModularInstance(auth).onAuthStateChanged(nextOrObserver, error, completed);\n}\n/**\r\n * Sets the current language to the default device/browser preference.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n *\r\n * @public\r\n */\nfunction useDeviceLanguage(auth) {\n getModularInstance(auth).useDeviceLanguage();\n}\n/**\r\n * Asynchronously sets the provided user as {@link Auth.currentUser} on the\r\n * {@link Auth} instance.\r\n *\r\n * @remarks\r\n * A new instance copy of the user provided will be made and set as currentUser.\r\n *\r\n * This will trigger {@link onAuthStateChanged} and {@link onIdTokenChanged} listeners\r\n * like other sign in methods.\r\n *\r\n * The operation fails with an error if the user to be updated belongs to a different Firebase\r\n * project.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param user - The new {@link User}.\r\n *\r\n * @public\r\n */\nfunction updateCurrentUser(auth, user) {\n return getModularInstance(auth).updateCurrentUser(user);\n}\n/**\r\n * Signs out the current user.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n *\r\n * @public\r\n */\nfunction signOut(auth) {\n return getModularInstance(auth).signOut();\n}\n/**\r\n * Revokes the given access token. Currently only supports Apple OAuth access tokens.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param token - The Apple OAuth access token.\r\n *\r\n * @public\r\n */\nfunction revokeAccessToken(auth, token) {\n const authInternal = _castAuth(auth);\n return authInternal.revokeAccessToken(token);\n}\n/**\r\n * Deletes and signs out the user.\r\n *\r\n * @remarks\r\n * Important: this is a security-sensitive operation that requires the user to have recently\r\n * signed in. If this requirement isn't met, ask the user to authenticate again and then call\r\n * {@link reauthenticateWithCredential}.\r\n *\r\n * @param user - The user.\r\n *\r\n * @public\r\n */\nasync function deleteUser(user) {\n return getModularInstance(user).delete();\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nclass MultiFactorSessionImpl {\n constructor(type, credential, user) {\n this.type = type;\n this.credential = credential;\n this.user = user;\n }\n static _fromIdtoken(idToken, user) {\n return new MultiFactorSessionImpl(\"enroll\" /* MultiFactorSessionType.ENROLL */, idToken, user);\n }\n static _fromMfaPendingCredential(mfaPendingCredential) {\n return new MultiFactorSessionImpl(\"signin\" /* MultiFactorSessionType.SIGN_IN */, mfaPendingCredential);\n }\n toJSON() {\n const key = this.type === \"enroll\" /* MultiFactorSessionType.ENROLL */ ? 'idToken' : 'pendingCredential';\n return {\n multiFactorSession: {\n [key]: this.credential\n }\n };\n }\n static fromJSON(obj) {\n var _a, _b;\n if (obj === null || obj === void 0 ? void 0 : obj.multiFactorSession) {\n if ((_a = obj.multiFactorSession) === null || _a === void 0 ? void 0 : _a.pendingCredential) {\n return MultiFactorSessionImpl._fromMfaPendingCredential(obj.multiFactorSession.pendingCredential);\n } else if ((_b = obj.multiFactorSession) === null || _b === void 0 ? void 0 : _b.idToken) {\n return MultiFactorSessionImpl._fromIdtoken(obj.multiFactorSession.idToken);\n }\n }\n return null;\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nclass MultiFactorResolverImpl {\n constructor(session, hints, signInResolver) {\n this.session = session;\n this.hints = hints;\n this.signInResolver = signInResolver;\n }\n /** @internal */\n static _fromError(authExtern, error) {\n const auth = _castAuth(authExtern);\n const serverResponse = error.customData._serverResponse;\n const hints = (serverResponse.mfaInfo || []).map(enrollment => MultiFactorInfoImpl._fromServerResponse(auth, enrollment));\n _assert(serverResponse.mfaPendingCredential, auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n const session = MultiFactorSessionImpl._fromMfaPendingCredential(serverResponse.mfaPendingCredential);\n return new MultiFactorResolverImpl(session, hints, async assertion => {\n const mfaResponse = await assertion._process(auth, session);\n // Clear out the unneeded fields from the old login response\n delete serverResponse.mfaInfo;\n delete serverResponse.mfaPendingCredential;\n // Use in the new token & refresh token in the old response\n const idTokenResponse = Object.assign(Object.assign({}, serverResponse), {\n idToken: mfaResponse.idToken,\n refreshToken: mfaResponse.refreshToken\n });\n // TODO: we should collapse this switch statement into UserCredentialImpl._forOperation and have it support the SIGN_IN case\n switch (error.operationType) {\n case \"signIn\" /* OperationType.SIGN_IN */:\n const userCredential = await UserCredentialImpl._fromIdTokenResponse(auth, error.operationType, idTokenResponse);\n await auth._updateCurrentUser(userCredential.user);\n return userCredential;\n case \"reauthenticate\" /* OperationType.REAUTHENTICATE */:\n _assert(error.user, auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n return UserCredentialImpl._forOperation(error.user, error.operationType, idTokenResponse);\n default:\n _fail(auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n }\n });\n }\n async resolveSignIn(assertionExtern) {\n const assertion = assertionExtern;\n return this.signInResolver(assertion);\n }\n}\n/**\r\n * Provides a {@link MultiFactorResolver} suitable for completion of a\r\n * multi-factor flow.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param error - The {@link MultiFactorError} raised during a sign-in, or\r\n * reauthentication operation.\r\n *\r\n * @public\r\n */\nfunction getMultiFactorResolver(auth, error) {\n var _a;\n const authModular = getModularInstance(auth);\n const errorInternal = error;\n _assert(error.customData.operationType, authModular, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n _assert((_a = errorInternal.customData._serverResponse) === null || _a === void 0 ? void 0 : _a.mfaPendingCredential, authModular, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n return MultiFactorResolverImpl._fromError(authModular, errorInternal);\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction startEnrollPhoneMfa(auth, request) {\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v2/accounts/mfaEnrollment:start\" /* Endpoint.START_MFA_ENROLLMENT */, _addTidIfNecessary(auth, request));\n}\nfunction finalizeEnrollPhoneMfa(auth, request) {\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v2/accounts/mfaEnrollment:finalize\" /* Endpoint.FINALIZE_MFA_ENROLLMENT */, _addTidIfNecessary(auth, request));\n}\nfunction startEnrollTotpMfa(auth, request) {\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v2/accounts/mfaEnrollment:start\" /* Endpoint.START_MFA_ENROLLMENT */, _addTidIfNecessary(auth, request));\n}\nfunction finalizeEnrollTotpMfa(auth, request) {\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v2/accounts/mfaEnrollment:finalize\" /* Endpoint.FINALIZE_MFA_ENROLLMENT */, _addTidIfNecessary(auth, request));\n}\nfunction withdrawMfa(auth, request) {\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v2/accounts/mfaEnrollment:withdraw\" /* Endpoint.WITHDRAW_MFA */, _addTidIfNecessary(auth, request));\n}\nclass MultiFactorUserImpl {\n constructor(user) {\n this.user = user;\n this.enrolledFactors = [];\n user._onReload(userInfo => {\n if (userInfo.mfaInfo) {\n this.enrolledFactors = userInfo.mfaInfo.map(enrollment => MultiFactorInfoImpl._fromServerResponse(user.auth, enrollment));\n }\n });\n }\n static _fromUser(user) {\n return new MultiFactorUserImpl(user);\n }\n async getSession() {\n return MultiFactorSessionImpl._fromIdtoken(await this.user.getIdToken(), this.user);\n }\n async enroll(assertionExtern, displayName) {\n const assertion = assertionExtern;\n const session = await this.getSession();\n const finalizeMfaResponse = await _logoutIfInvalidated(this.user, assertion._process(this.user.auth, session, displayName));\n // New tokens will be issued after enrollment of the new second factors.\n // They need to be updated on the user.\n await this.user._updateTokensIfNecessary(finalizeMfaResponse);\n // The user needs to be reloaded to get the new multi-factor information\n // from server. USER_RELOADED event will be triggered and `enrolledFactors`\n // will be updated.\n return this.user.reload();\n }\n async unenroll(infoOrUid) {\n const mfaEnrollmentId = typeof infoOrUid === 'string' ? infoOrUid : infoOrUid.uid;\n const idToken = await this.user.getIdToken();\n try {\n const idTokenResponse = await _logoutIfInvalidated(this.user, withdrawMfa(this.user.auth, {\n idToken,\n mfaEnrollmentId\n }));\n // Remove the second factor from the user's list.\n this.enrolledFactors = this.enrolledFactors.filter(({\n uid\n }) => uid !== mfaEnrollmentId);\n // Depending on whether the backend decided to revoke the user's session,\n // the tokenResponse may be empty. If the tokens were not updated (and they\n // are now invalid), reloading the user will discover this and invalidate\n // the user's state accordingly.\n await this.user._updateTokensIfNecessary(idTokenResponse);\n await this.user.reload();\n } catch (e) {\n throw e;\n }\n }\n}\nconst multiFactorUserCache = new WeakMap();\n/**\r\n * The {@link MultiFactorUser} corresponding to the user.\r\n *\r\n * @remarks\r\n * This is used to access all multi-factor properties and operations related to the user.\r\n *\r\n * @param user - The user.\r\n *\r\n * @public\r\n */\nfunction multiFactor(user) {\n const userModular = getModularInstance(user);\n if (!multiFactorUserCache.has(userModular)) {\n multiFactorUserCache.set(userModular, MultiFactorUserImpl._fromUser(userModular));\n }\n return multiFactorUserCache.get(userModular);\n}\nconst STORAGE_AVAILABLE_KEY = '__sak';\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n// There are two different browser persistence types: local and session.\n// Both have the same implementation but use a different underlying storage\n// object.\nclass BrowserPersistenceClass {\n constructor(storageRetriever, type) {\n this.storageRetriever = storageRetriever;\n this.type = type;\n }\n _isAvailable() {\n try {\n if (!this.storage) {\n return Promise.resolve(false);\n }\n this.storage.setItem(STORAGE_AVAILABLE_KEY, '1');\n this.storage.removeItem(STORAGE_AVAILABLE_KEY);\n return Promise.resolve(true);\n } catch (_a) {\n return Promise.resolve(false);\n }\n }\n _set(key, value) {\n this.storage.setItem(key, JSON.stringify(value));\n return Promise.resolve();\n }\n _get(key) {\n const json = this.storage.getItem(key);\n return Promise.resolve(json ? JSON.parse(json) : null);\n }\n _remove(key) {\n this.storage.removeItem(key);\n return Promise.resolve();\n }\n get storage() {\n return this.storageRetriever();\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _iframeCannotSyncWebStorage() {\n const ua = getUA();\n return _isSafari(ua) || _isIOS(ua);\n}\n// The polling period in case events are not supported\nconst _POLLING_INTERVAL_MS$1 = 1000;\n// The IE 10 localStorage cross tab synchronization delay in milliseconds\nconst IE10_LOCAL_STORAGE_SYNC_DELAY = 10;\nlet BrowserLocalPersistence = /*#__PURE__*/(() => {\n class BrowserLocalPersistence extends BrowserPersistenceClass {\n constructor() {\n super(() => window.localStorage, \"LOCAL\" /* PersistenceType.LOCAL */);\n this.boundEventHandler = (event, poll) => this.onStorageEvent(event, poll);\n this.listeners = {};\n this.localCache = {};\n // setTimeout return value is platform specific\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.pollTimer = null;\n // Safari or iOS browser and embedded in an iframe.\n this.safariLocalStorageNotSynced = _iframeCannotSyncWebStorage() && _isIframe();\n // Whether to use polling instead of depending on window events\n this.fallbackToPolling = _isMobileBrowser();\n this._shouldAllowMigration = true;\n }\n forAllChangedKeys(cb) {\n // Check all keys with listeners on them.\n for (const key of Object.keys(this.listeners)) {\n // Get value from localStorage.\n const newValue = this.storage.getItem(key);\n const oldValue = this.localCache[key];\n // If local map value does not match, trigger listener with storage event.\n // Differentiate this simulated event from the real storage event.\n if (newValue !== oldValue) {\n cb(key, oldValue, newValue);\n }\n }\n }\n onStorageEvent(event, poll = false) {\n // Key would be null in some situations, like when localStorage is cleared\n if (!event.key) {\n this.forAllChangedKeys((key, _oldValue, newValue) => {\n this.notifyListeners(key, newValue);\n });\n return;\n }\n const key = event.key;\n // Check the mechanism how this event was detected.\n // The first event will dictate the mechanism to be used.\n if (poll) {\n // Environment detects storage changes via polling.\n // Remove storage event listener to prevent possible event duplication.\n this.detachListener();\n } else {\n // Environment detects storage changes via storage event listener.\n // Remove polling listener to prevent possible event duplication.\n this.stopPolling();\n }\n // Safari embedded iframe. Storage event will trigger with the delta\n // changes but no changes will be applied to the iframe localStorage.\n if (this.safariLocalStorageNotSynced) {\n // Get current iframe page value.\n const storedValue = this.storage.getItem(key);\n // Value not synchronized, synchronize manually.\n if (event.newValue !== storedValue) {\n if (event.newValue !== null) {\n // Value changed from current value.\n this.storage.setItem(key, event.newValue);\n } else {\n // Current value deleted.\n this.storage.removeItem(key);\n }\n } else if (this.localCache[key] === event.newValue && !poll) {\n // Already detected and processed, do not trigger listeners again.\n return;\n }\n }\n const triggerListeners = () => {\n // Keep local map up to date in case storage event is triggered before\n // poll.\n const storedValue = this.storage.getItem(key);\n if (!poll && this.localCache[key] === storedValue) {\n // Real storage event which has already been detected, do nothing.\n // This seems to trigger in some IE browsers for some reason.\n return;\n }\n this.notifyListeners(key, storedValue);\n };\n const storedValue = this.storage.getItem(key);\n if (_isIE10() && storedValue !== event.newValue && event.newValue !== event.oldValue) {\n // IE 10 has this weird bug where a storage event would trigger with the\n // correct key, oldValue and newValue but localStorage.getItem(key) does\n // not yield the updated value until a few milliseconds. This ensures\n // this recovers from that situation.\n setTimeout(triggerListeners, IE10_LOCAL_STORAGE_SYNC_DELAY);\n } else {\n triggerListeners();\n }\n }\n notifyListeners(key, value) {\n this.localCache[key] = value;\n const listeners = this.listeners[key];\n if (listeners) {\n for (const listener of Array.from(listeners)) {\n listener(value ? JSON.parse(value) : value);\n }\n }\n }\n startPolling() {\n this.stopPolling();\n this.pollTimer = setInterval(() => {\n this.forAllChangedKeys((key, oldValue, newValue) => {\n this.onStorageEvent(new StorageEvent('storage', {\n key,\n oldValue,\n newValue\n }), /* poll */true);\n });\n }, _POLLING_INTERVAL_MS$1);\n }\n stopPolling() {\n if (this.pollTimer) {\n clearInterval(this.pollTimer);\n this.pollTimer = null;\n }\n }\n attachListener() {\n window.addEventListener('storage', this.boundEventHandler);\n }\n detachListener() {\n window.removeEventListener('storage', this.boundEventHandler);\n }\n _addListener(key, listener) {\n if (Object.keys(this.listeners).length === 0) {\n // Whether browser can detect storage event when it had already been pushed to the background.\n // This may happen in some mobile browsers. A localStorage change in the foreground window\n // will not be detected in the background window via the storage event.\n // This was detected in iOS 7.x mobile browsers\n if (this.fallbackToPolling) {\n this.startPolling();\n } else {\n this.attachListener();\n }\n }\n if (!this.listeners[key]) {\n this.listeners[key] = new Set();\n // Populate the cache to avoid spuriously triggering on first poll.\n this.localCache[key] = this.storage.getItem(key);\n }\n this.listeners[key].add(listener);\n }\n _removeListener(key, listener) {\n if (this.listeners[key]) {\n this.listeners[key].delete(listener);\n if (this.listeners[key].size === 0) {\n delete this.listeners[key];\n }\n }\n if (Object.keys(this.listeners).length === 0) {\n this.detachListener();\n this.stopPolling();\n }\n }\n // Update local cache on base operations:\n async _set(key, value) {\n await super._set(key, value);\n this.localCache[key] = JSON.stringify(value);\n }\n async _get(key) {\n const value = await super._get(key);\n this.localCache[key] = JSON.stringify(value);\n return value;\n }\n async _remove(key) {\n await super._remove(key);\n delete this.localCache[key];\n }\n }\n BrowserLocalPersistence.type = 'LOCAL';\n /**\r\n * An implementation of {@link Persistence} of type `LOCAL` using `localStorage`\r\n * for the underlying storage.\r\n *\r\n * @public\r\n */\n return BrowserLocalPersistence;\n})();\nconst browserLocalPersistence = BrowserLocalPersistence;\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nlet BrowserSessionPersistence = /*#__PURE__*/(() => {\n class BrowserSessionPersistence extends BrowserPersistenceClass {\n constructor() {\n super(() => window.sessionStorage, \"SESSION\" /* PersistenceType.SESSION */);\n }\n _addListener(_key, _listener) {\n // Listeners are not supported for session storage since it cannot be shared across windows\n return;\n }\n _removeListener(_key, _listener) {\n // Listeners are not supported for session storage since it cannot be shared across windows\n return;\n }\n }\n BrowserSessionPersistence.type = 'SESSION';\n /**\r\n * An implementation of {@link Persistence} of `SESSION` using `sessionStorage`\r\n * for the underlying storage.\r\n *\r\n * @public\r\n */\n return BrowserSessionPersistence;\n})();\nconst browserSessionPersistence = BrowserSessionPersistence;\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Shim for Promise.allSettled, note the slightly different format of `fulfilled` vs `status`.\r\n *\r\n * @param promises - Array of promises to wait on.\r\n */\nfunction _allSettled(promises) {\n return Promise.all(promises.map(async promise => {\n try {\n const value = await promise;\n return {\n fulfilled: true,\n value\n };\n } catch (reason) {\n return {\n fulfilled: false,\n reason\n };\n }\n }));\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Interface class for receiving messages.\r\n *\r\n */\nlet Receiver = /*#__PURE__*/(() => {\n class Receiver {\n constructor(eventTarget) {\n this.eventTarget = eventTarget;\n this.handlersMap = {};\n this.boundEventHandler = this.handleEvent.bind(this);\n }\n /**\r\n * Obtain an instance of a Receiver for a given event target, if none exists it will be created.\r\n *\r\n * @param eventTarget - An event target (such as window or self) through which the underlying\r\n * messages will be received.\r\n */\n static _getInstance(eventTarget) {\n // The results are stored in an array since objects can't be keys for other\n // objects. In addition, setting a unique property on an event target as a\n // hash map key may not be allowed due to CORS restrictions.\n const existingInstance = this.receivers.find(receiver => receiver.isListeningto(eventTarget));\n if (existingInstance) {\n return existingInstance;\n }\n const newInstance = new Receiver(eventTarget);\n this.receivers.push(newInstance);\n return newInstance;\n }\n isListeningto(eventTarget) {\n return this.eventTarget === eventTarget;\n }\n /**\r\n * Fans out a MessageEvent to the appropriate listeners.\r\n *\r\n * @remarks\r\n * Sends an {@link Status.ACK} upon receipt and a {@link Status.DONE} once all handlers have\r\n * finished processing.\r\n *\r\n * @param event - The MessageEvent.\r\n *\r\n */\n async handleEvent(event) {\n const messageEvent = event;\n const {\n eventId,\n eventType,\n data\n } = messageEvent.data;\n const handlers = this.handlersMap[eventType];\n if (!(handlers === null || handlers === void 0 ? void 0 : handlers.size)) {\n return;\n }\n messageEvent.ports[0].postMessage({\n status: \"ack\" /* _Status.ACK */,\n eventId,\n eventType\n });\n const promises = Array.from(handlers).map(async handler => handler(messageEvent.origin, data));\n const response = await _allSettled(promises);\n messageEvent.ports[0].postMessage({\n status: \"done\" /* _Status.DONE */,\n eventId,\n eventType,\n response\n });\n }\n /**\r\n * Subscribe an event handler for a particular event.\r\n *\r\n * @param eventType - Event name to subscribe to.\r\n * @param eventHandler - The event handler which should receive the events.\r\n *\r\n */\n _subscribe(eventType, eventHandler) {\n if (Object.keys(this.handlersMap).length === 0) {\n this.eventTarget.addEventListener('message', this.boundEventHandler);\n }\n if (!this.handlersMap[eventType]) {\n this.handlersMap[eventType] = new Set();\n }\n this.handlersMap[eventType].add(eventHandler);\n }\n /**\r\n * Unsubscribe an event handler from a particular event.\r\n *\r\n * @param eventType - Event name to unsubscribe from.\r\n * @param eventHandler - Optinoal event handler, if none provided, unsubscribe all handlers on this event.\r\n *\r\n */\n _unsubscribe(eventType, eventHandler) {\n if (this.handlersMap[eventType] && eventHandler) {\n this.handlersMap[eventType].delete(eventHandler);\n }\n if (!eventHandler || this.handlersMap[eventType].size === 0) {\n delete this.handlersMap[eventType];\n }\n if (Object.keys(this.handlersMap).length === 0) {\n this.eventTarget.removeEventListener('message', this.boundEventHandler);\n }\n }\n }\n Receiver.receivers = [];\n\n /**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n return Receiver;\n})();\nfunction _generateEventId(prefix = '', digits = 10) {\n let random = '';\n for (let i = 0; i < digits; i++) {\n random += Math.floor(Math.random() * 10);\n }\n return prefix + random;\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Interface for sending messages and waiting for a completion response.\r\n *\r\n */\nclass Sender {\n constructor(target) {\n this.target = target;\n this.handlers = new Set();\n }\n /**\r\n * Unsubscribe the handler and remove it from our tracking Set.\r\n *\r\n * @param handler - The handler to unsubscribe.\r\n */\n removeMessageHandler(handler) {\n if (handler.messageChannel) {\n handler.messageChannel.port1.removeEventListener('message', handler.onMessage);\n handler.messageChannel.port1.close();\n }\n this.handlers.delete(handler);\n }\n /**\r\n * Send a message to the Receiver located at {@link target}.\r\n *\r\n * @remarks\r\n * We'll first wait a bit for an ACK , if we get one we will wait significantly longer until the\r\n * receiver has had a chance to fully process the event.\r\n *\r\n * @param eventType - Type of event to send.\r\n * @param data - The payload of the event.\r\n * @param timeout - Timeout for waiting on an ACK from the receiver.\r\n *\r\n * @returns An array of settled promises from all the handlers that were listening on the receiver.\r\n */\n async _send(eventType, data, timeout = 50 /* _TimeoutDuration.ACK */) {\n const messageChannel = typeof MessageChannel !== 'undefined' ? new MessageChannel() : null;\n if (!messageChannel) {\n throw new Error(\"connection_unavailable\" /* _MessageError.CONNECTION_UNAVAILABLE */);\n }\n // Node timers and browser timers return fundamentally different types.\n // We don't actually care what the value is but TS won't accept unknown and\n // we can't cast properly in both environments.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let completionTimer;\n let handler;\n return new Promise((resolve, reject) => {\n const eventId = _generateEventId('', 20);\n messageChannel.port1.start();\n const ackTimer = setTimeout(() => {\n reject(new Error(\"unsupported_event\" /* _MessageError.UNSUPPORTED_EVENT */));\n }, timeout);\n handler = {\n messageChannel,\n onMessage(event) {\n const messageEvent = event;\n if (messageEvent.data.eventId !== eventId) {\n return;\n }\n switch (messageEvent.data.status) {\n case \"ack\" /* _Status.ACK */:\n // The receiver should ACK first.\n clearTimeout(ackTimer);\n completionTimer = setTimeout(() => {\n reject(new Error(\"timeout\" /* _MessageError.TIMEOUT */));\n }, 3000 /* _TimeoutDuration.COMPLETION */);\n break;\n case \"done\" /* _Status.DONE */:\n // Once the receiver's handlers are finished we will get the results.\n clearTimeout(completionTimer);\n resolve(messageEvent.data.response);\n break;\n default:\n clearTimeout(ackTimer);\n clearTimeout(completionTimer);\n reject(new Error(\"invalid_response\" /* _MessageError.INVALID_RESPONSE */));\n break;\n }\n }\n };\n this.handlers.add(handler);\n messageChannel.port1.addEventListener('message', handler.onMessage);\n this.target.postMessage({\n eventType,\n eventId,\n data\n }, [messageChannel.port2]);\n }).finally(() => {\n if (handler) {\n this.removeMessageHandler(handler);\n }\n });\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Lazy accessor for window, since the compat layer won't tree shake this out,\r\n * we need to make sure not to mess with window unless we have to\r\n */\nfunction _window() {\n return window;\n}\nfunction _setWindowLocation(url) {\n _window().location.href = url;\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _isWorker() {\n return typeof _window()['WorkerGlobalScope'] !== 'undefined' && typeof _window()['importScripts'] === 'function';\n}\nasync function _getActiveServiceWorker() {\n if (!(navigator === null || navigator === void 0 ? void 0 : navigator.serviceWorker)) {\n return null;\n }\n try {\n const registration = await navigator.serviceWorker.ready;\n return registration.active;\n } catch (_a) {\n return null;\n }\n}\nfunction _getServiceWorkerController() {\n var _a;\n return ((_a = navigator === null || navigator === void 0 ? void 0 : navigator.serviceWorker) === null || _a === void 0 ? void 0 : _a.controller) || null;\n}\nfunction _getWorkerGlobalScope() {\n return _isWorker() ? self : null;\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst DB_NAME = 'firebaseLocalStorageDb';\nconst DB_VERSION = 1;\nconst DB_OBJECTSTORE_NAME = 'firebaseLocalStorage';\nconst DB_DATA_KEYPATH = 'fbase_key';\n/**\r\n * Promise wrapper for IDBRequest\r\n *\r\n * Unfortunately we can't cleanly extend Promise since promises are not callable in ES6\r\n *\r\n */\nclass DBPromise {\n constructor(request) {\n this.request = request;\n }\n toPromise() {\n return new Promise((resolve, reject) => {\n this.request.addEventListener('success', () => {\n resolve(this.request.result);\n });\n this.request.addEventListener('error', () => {\n reject(this.request.error);\n });\n });\n }\n}\nfunction getObjectStore(db, isReadWrite) {\n return db.transaction([DB_OBJECTSTORE_NAME], isReadWrite ? 'readwrite' : 'readonly').objectStore(DB_OBJECTSTORE_NAME);\n}\nfunction _deleteDatabase() {\n const request = indexedDB.deleteDatabase(DB_NAME);\n return new DBPromise(request).toPromise();\n}\nfunction _openDatabase() {\n const request = indexedDB.open(DB_NAME, DB_VERSION);\n return new Promise((resolve, reject) => {\n request.addEventListener('error', () => {\n reject(request.error);\n });\n request.addEventListener('upgradeneeded', () => {\n const db = request.result;\n try {\n db.createObjectStore(DB_OBJECTSTORE_NAME, {\n keyPath: DB_DATA_KEYPATH\n });\n } catch (e) {\n reject(e);\n }\n });\n request.addEventListener('success', async () => {\n const db = request.result;\n // Strange bug that occurs in Firefox when multiple tabs are opened at the\n // same time. The only way to recover seems to be deleting the database\n // and re-initializing it.\n // https://github.com/firebase/firebase-js-sdk/issues/634\n if (!db.objectStoreNames.contains(DB_OBJECTSTORE_NAME)) {\n // Need to close the database or else you get a `blocked` event\n db.close();\n await _deleteDatabase();\n resolve(await _openDatabase());\n } else {\n resolve(db);\n }\n });\n });\n}\nasync function _putObject(db, key, value) {\n const request = getObjectStore(db, true).put({\n [DB_DATA_KEYPATH]: key,\n value\n });\n return new DBPromise(request).toPromise();\n}\nasync function getObject(db, key) {\n const request = getObjectStore(db, false).get(key);\n const data = await new DBPromise(request).toPromise();\n return data === undefined ? null : data.value;\n}\nfunction _deleteObject(db, key) {\n const request = getObjectStore(db, true).delete(key);\n return new DBPromise(request).toPromise();\n}\nconst _POLLING_INTERVAL_MS = 800;\nconst _TRANSACTION_RETRY_COUNT = 3;\nlet IndexedDBLocalPersistence = /*#__PURE__*/(() => {\n class IndexedDBLocalPersistence {\n constructor() {\n this.type = \"LOCAL\" /* PersistenceType.LOCAL */;\n this._shouldAllowMigration = true;\n this.listeners = {};\n this.localCache = {};\n // setTimeout return value is platform specific\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.pollTimer = null;\n this.pendingWrites = 0;\n this.receiver = null;\n this.sender = null;\n this.serviceWorkerReceiverAvailable = false;\n this.activeServiceWorker = null;\n // Fire & forget the service worker registration as it may never resolve\n this._workerInitializationPromise = this.initializeServiceWorkerMessaging().then(() => {}, () => {});\n }\n async _openDb() {\n if (this.db) {\n return this.db;\n }\n this.db = await _openDatabase();\n return this.db;\n }\n async _withRetries(op) {\n let numAttempts = 0;\n while (true) {\n try {\n const db = await this._openDb();\n return await op(db);\n } catch (e) {\n if (numAttempts++ > _TRANSACTION_RETRY_COUNT) {\n throw e;\n }\n if (this.db) {\n this.db.close();\n this.db = undefined;\n }\n // TODO: consider adding exponential backoff\n }\n }\n }\n /**\r\n * IndexedDB events do not propagate from the main window to the worker context. We rely on a\r\n * postMessage interface to send these events to the worker ourselves.\r\n */\n async initializeServiceWorkerMessaging() {\n return _isWorker() ? this.initializeReceiver() : this.initializeSender();\n }\n /**\r\n * As the worker we should listen to events from the main window.\r\n */\n async initializeReceiver() {\n this.receiver = Receiver._getInstance(_getWorkerGlobalScope());\n // Refresh from persistence if we receive a KeyChanged message.\n this.receiver._subscribe(\"keyChanged\" /* _EventType.KEY_CHANGED */, async (_origin, data) => {\n const keys = await this._poll();\n return {\n keyProcessed: keys.includes(data.key)\n };\n });\n // Let the sender know that we are listening so they give us more timeout.\n this.receiver._subscribe(\"ping\" /* _EventType.PING */, async (_origin, _data) => {\n return [\"keyChanged\" /* _EventType.KEY_CHANGED */];\n });\n }\n /**\r\n * As the main window, we should let the worker know when keys change (set and remove).\r\n *\r\n * @remarks\r\n * {@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/ready | ServiceWorkerContainer.ready}\r\n * may not resolve.\r\n */\n async initializeSender() {\n var _a, _b;\n // Check to see if there's an active service worker.\n this.activeServiceWorker = await _getActiveServiceWorker();\n if (!this.activeServiceWorker) {\n return;\n }\n this.sender = new Sender(this.activeServiceWorker);\n // Ping the service worker to check what events they can handle.\n const results = await this.sender._send(\"ping\" /* _EventType.PING */, {}, 800 /* _TimeoutDuration.LONG_ACK */);\n if (!results) {\n return;\n }\n if (((_a = results[0]) === null || _a === void 0 ? void 0 : _a.fulfilled) && ((_b = results[0]) === null || _b === void 0 ? void 0 : _b.value.includes(\"keyChanged\" /* _EventType.KEY_CHANGED */))) {\n this.serviceWorkerReceiverAvailable = true;\n }\n }\n /**\r\n * Let the worker know about a changed key, the exact key doesn't technically matter since the\r\n * worker will just trigger a full sync anyway.\r\n *\r\n * @remarks\r\n * For now, we only support one service worker per page.\r\n *\r\n * @param key - Storage key which changed.\r\n */\n async notifyServiceWorker(key) {\n if (!this.sender || !this.activeServiceWorker || _getServiceWorkerController() !== this.activeServiceWorker) {\n return;\n }\n try {\n await this.sender._send(\"keyChanged\" /* _EventType.KEY_CHANGED */, {\n key\n },\n // Use long timeout if receiver has previously responded to a ping from us.\n this.serviceWorkerReceiverAvailable ? 800 /* _TimeoutDuration.LONG_ACK */ : 50 /* _TimeoutDuration.ACK */);\n } catch (_a) {\n // This is a best effort approach. Ignore errors.\n }\n }\n async _isAvailable() {\n try {\n if (!indexedDB) {\n return false;\n }\n const db = await _openDatabase();\n await _putObject(db, STORAGE_AVAILABLE_KEY, '1');\n await _deleteObject(db, STORAGE_AVAILABLE_KEY);\n return true;\n } catch (_a) {}\n return false;\n }\n async _withPendingWrite(write) {\n this.pendingWrites++;\n try {\n await write();\n } finally {\n this.pendingWrites--;\n }\n }\n async _set(key, value) {\n return this._withPendingWrite(async () => {\n await this._withRetries(db => _putObject(db, key, value));\n this.localCache[key] = value;\n return this.notifyServiceWorker(key);\n });\n }\n async _get(key) {\n const obj = await this._withRetries(db => getObject(db, key));\n this.localCache[key] = obj;\n return obj;\n }\n async _remove(key) {\n return this._withPendingWrite(async () => {\n await this._withRetries(db => _deleteObject(db, key));\n delete this.localCache[key];\n return this.notifyServiceWorker(key);\n });\n }\n async _poll() {\n // TODO: check if we need to fallback if getAll is not supported\n const result = await this._withRetries(db => {\n const getAllRequest = getObjectStore(db, false).getAll();\n return new DBPromise(getAllRequest).toPromise();\n });\n if (!result) {\n return [];\n }\n // If we have pending writes in progress abort, we'll get picked up on the next poll\n if (this.pendingWrites !== 0) {\n return [];\n }\n const keys = [];\n const keysInResult = new Set();\n if (result.length !== 0) {\n for (const {\n fbase_key: key,\n value\n } of result) {\n keysInResult.add(key);\n if (JSON.stringify(this.localCache[key]) !== JSON.stringify(value)) {\n this.notifyListeners(key, value);\n keys.push(key);\n }\n }\n }\n for (const localKey of Object.keys(this.localCache)) {\n if (this.localCache[localKey] && !keysInResult.has(localKey)) {\n // Deleted\n this.notifyListeners(localKey, null);\n keys.push(localKey);\n }\n }\n return keys;\n }\n notifyListeners(key, newValue) {\n this.localCache[key] = newValue;\n const listeners = this.listeners[key];\n if (listeners) {\n for (const listener of Array.from(listeners)) {\n listener(newValue);\n }\n }\n }\n startPolling() {\n this.stopPolling();\n this.pollTimer = setInterval(async () => this._poll(), _POLLING_INTERVAL_MS);\n }\n stopPolling() {\n if (this.pollTimer) {\n clearInterval(this.pollTimer);\n this.pollTimer = null;\n }\n }\n _addListener(key, listener) {\n if (Object.keys(this.listeners).length === 0) {\n this.startPolling();\n }\n if (!this.listeners[key]) {\n this.listeners[key] = new Set();\n // Populate the cache to avoid spuriously triggering on first poll.\n void this._get(key); // This can happen in the background async and we can return immediately.\n }\n this.listeners[key].add(listener);\n }\n _removeListener(key, listener) {\n if (this.listeners[key]) {\n this.listeners[key].delete(listener);\n if (this.listeners[key].size === 0) {\n delete this.listeners[key];\n }\n }\n if (Object.keys(this.listeners).length === 0) {\n this.stopPolling();\n }\n }\n }\n IndexedDBLocalPersistence.type = 'LOCAL';\n /**\r\n * An implementation of {@link Persistence} of type `LOCAL` using `indexedDB`\r\n * for the underlying storage.\r\n *\r\n * @public\r\n */\n return IndexedDBLocalPersistence;\n})();\nconst indexedDBLocalPersistence = IndexedDBLocalPersistence;\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction startSignInPhoneMfa(auth, request) {\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v2/accounts/mfaSignIn:start\" /* Endpoint.START_MFA_SIGN_IN */, _addTidIfNecessary(auth, request));\n}\nfunction finalizeSignInPhoneMfa(auth, request) {\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v2/accounts/mfaSignIn:finalize\" /* Endpoint.FINALIZE_MFA_SIGN_IN */, _addTidIfNecessary(auth, request));\n}\nfunction finalizeSignInTotpMfa(auth, request) {\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v2/accounts/mfaSignIn:finalize\" /* Endpoint.FINALIZE_MFA_SIGN_IN */, _addTidIfNecessary(auth, request));\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst _SOLVE_TIME_MS = 500;\nconst _EXPIRATION_TIME_MS = 60000;\nconst _WIDGET_ID_START = 1000000000000;\nclass MockReCaptcha {\n constructor(auth) {\n this.auth = auth;\n this.counter = _WIDGET_ID_START;\n this._widgets = new Map();\n }\n render(container, parameters) {\n const id = this.counter;\n this._widgets.set(id, new MockWidget(container, this.auth.name, parameters || {}));\n this.counter++;\n return id;\n }\n reset(optWidgetId) {\n var _a;\n const id = optWidgetId || _WIDGET_ID_START;\n void ((_a = this._widgets.get(id)) === null || _a === void 0 ? void 0 : _a.delete());\n this._widgets.delete(id);\n }\n getResponse(optWidgetId) {\n var _a;\n const id = optWidgetId || _WIDGET_ID_START;\n return ((_a = this._widgets.get(id)) === null || _a === void 0 ? void 0 : _a.getResponse()) || '';\n }\n async execute(optWidgetId) {\n var _a;\n const id = optWidgetId || _WIDGET_ID_START;\n void ((_a = this._widgets.get(id)) === null || _a === void 0 ? void 0 : _a.execute());\n return '';\n }\n}\nclass MockWidget {\n constructor(containerOrId, appName, params) {\n this.params = params;\n this.timerId = null;\n this.deleted = false;\n this.responseToken = null;\n this.clickHandler = () => {\n this.execute();\n };\n const container = typeof containerOrId === 'string' ? document.getElementById(containerOrId) : containerOrId;\n _assert(container, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */, {\n appName\n });\n this.container = container;\n this.isVisible = this.params.size !== 'invisible';\n if (this.isVisible) {\n this.execute();\n } else {\n this.container.addEventListener('click', this.clickHandler);\n }\n }\n getResponse() {\n this.checkIfDeleted();\n return this.responseToken;\n }\n delete() {\n this.checkIfDeleted();\n this.deleted = true;\n if (this.timerId) {\n clearTimeout(this.timerId);\n this.timerId = null;\n }\n this.container.removeEventListener('click', this.clickHandler);\n }\n execute() {\n this.checkIfDeleted();\n if (this.timerId) {\n return;\n }\n this.timerId = window.setTimeout(() => {\n this.responseToken = generateRandomAlphaNumericString(50);\n const {\n callback,\n 'expired-callback': expiredCallback\n } = this.params;\n if (callback) {\n try {\n callback(this.responseToken);\n } catch (e) {}\n }\n this.timerId = window.setTimeout(() => {\n this.timerId = null;\n this.responseToken = null;\n if (expiredCallback) {\n try {\n expiredCallback();\n } catch (e) {}\n }\n if (this.isVisible) {\n this.execute();\n }\n }, _EXPIRATION_TIME_MS);\n }, _SOLVE_TIME_MS);\n }\n checkIfDeleted() {\n if (this.deleted) {\n throw new Error('reCAPTCHA mock was already deleted!');\n }\n }\n}\nfunction generateRandomAlphaNumericString(len) {\n const chars = [];\n const allowedChars = '1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n for (let i = 0; i < len; i++) {\n chars.push(allowedChars.charAt(Math.floor(Math.random() * allowedChars.length)));\n }\n return chars.join('');\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n// ReCaptcha will load using the same callback, so the callback function needs\n// to be kept around\nconst _JSLOAD_CALLBACK = _generateCallbackName('rcb');\nconst NETWORK_TIMEOUT_DELAY = new Delay(30000, 60000);\nconst RECAPTCHA_BASE = 'https://www.google.com/recaptcha/api.js?';\n/**\r\n * Loader for the GReCaptcha library. There should only ever be one of this.\r\n */\nclass ReCaptchaLoaderImpl {\n constructor() {\n var _a;\n this.hostLanguage = '';\n this.counter = 0;\n /**\r\n * Check for `render()` method. `window.grecaptcha` will exist if the Enterprise\r\n * version of the ReCAPTCHA script was loaded by someone else (e.g. App Check) but\r\n * `window.grecaptcha.render()` will not. Another load will add it.\r\n */\n this.librarySeparatelyLoaded = !!((_a = _window().grecaptcha) === null || _a === void 0 ? void 0 : _a.render);\n }\n load(auth, hl = '') {\n _assert(isHostLanguageValid(hl), auth, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n if (this.shouldResolveImmediately(hl) && isV2(_window().grecaptcha)) {\n return Promise.resolve(_window().grecaptcha);\n }\n return new Promise((resolve, reject) => {\n const networkTimeout = _window().setTimeout(() => {\n reject(_createError(auth, \"network-request-failed\" /* AuthErrorCode.NETWORK_REQUEST_FAILED */));\n }, NETWORK_TIMEOUT_DELAY.get());\n _window()[_JSLOAD_CALLBACK] = () => {\n _window().clearTimeout(networkTimeout);\n delete _window()[_JSLOAD_CALLBACK];\n const recaptcha = _window().grecaptcha;\n if (!recaptcha || !isV2(recaptcha)) {\n reject(_createError(auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */));\n return;\n }\n // Wrap the greptcha render function so that we know if the developer has\n // called it separately\n const render = recaptcha.render;\n recaptcha.render = (container, params) => {\n const widgetId = render(container, params);\n this.counter++;\n return widgetId;\n };\n this.hostLanguage = hl;\n resolve(recaptcha);\n };\n const url = `${RECAPTCHA_BASE}?${querystring({\n onload: _JSLOAD_CALLBACK,\n render: 'explicit',\n hl\n })}`;\n _loadJS(url).catch(() => {\n clearTimeout(networkTimeout);\n reject(_createError(auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */));\n });\n });\n }\n clearedOneInstance() {\n this.counter--;\n }\n shouldResolveImmediately(hl) {\n var _a;\n // We can resolve immediately if:\n // • grecaptcha is already defined AND (\n // 1. the requested language codes are the same OR\n // 2. there exists already a ReCaptcha on the page\n // 3. the library was already loaded by the app\n // In cases (2) and (3), we _can't_ reload as it would break the recaptchas\n // that are already in the page\n return !!((_a = _window().grecaptcha) === null || _a === void 0 ? void 0 : _a.render) && (hl === this.hostLanguage || this.counter > 0 || this.librarySeparatelyLoaded);\n }\n}\nfunction isHostLanguageValid(hl) {\n return hl.length <= 6 && /^\\s*[a-zA-Z0-9\\-]*\\s*$/.test(hl);\n}\nclass MockReCaptchaLoaderImpl {\n async load(auth) {\n return new MockReCaptcha(auth);\n }\n clearedOneInstance() {}\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst RECAPTCHA_VERIFIER_TYPE = 'recaptcha';\nconst DEFAULT_PARAMS = {\n theme: 'light',\n type: 'image'\n};\n/**\r\n * An {@link https://www.google.com/recaptcha/ | reCAPTCHA}-based application verifier.\r\n *\r\n * @remarks\r\n * `RecaptchaVerifier` does not work in a Node.js environment.\r\n *\r\n * @public\r\n */\nclass RecaptchaVerifier {\n /**\r\n * @param authExtern - The corresponding Firebase {@link Auth} instance.\r\n *\r\n * @param containerOrId - The reCAPTCHA container parameter.\r\n *\r\n * @remarks\r\n * This has different meaning depending on whether the reCAPTCHA is hidden or visible. For a\r\n * visible reCAPTCHA the container must be empty. If a string is used, it has to correspond to\r\n * an element ID. The corresponding element must also must be in the DOM at the time of\r\n * initialization.\r\n *\r\n * @param parameters - The optional reCAPTCHA parameters.\r\n *\r\n * @remarks\r\n * Check the reCAPTCHA docs for a comprehensive list. All parameters are accepted except for\r\n * the sitekey. Firebase Auth backend provisions a reCAPTCHA for each project and will\r\n * configure this upon rendering. For an invisible reCAPTCHA, a size key must have the value\r\n * 'invisible'.\r\n */\n constructor(authExtern, containerOrId, parameters = Object.assign({}, DEFAULT_PARAMS)) {\n this.parameters = parameters;\n /**\r\n * The application verifier type.\r\n *\r\n * @remarks\r\n * For a reCAPTCHA verifier, this is 'recaptcha'.\r\n */\n this.type = RECAPTCHA_VERIFIER_TYPE;\n this.destroyed = false;\n this.widgetId = null;\n this.tokenChangeListeners = new Set();\n this.renderPromise = null;\n this.recaptcha = null;\n this.auth = _castAuth(authExtern);\n this.isInvisible = this.parameters.size === 'invisible';\n _assert(typeof document !== 'undefined', this.auth, \"operation-not-supported-in-this-environment\" /* AuthErrorCode.OPERATION_NOT_SUPPORTED */);\n const container = typeof containerOrId === 'string' ? document.getElementById(containerOrId) : containerOrId;\n _assert(container, this.auth, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n this.container = container;\n this.parameters.callback = this.makeTokenCallback(this.parameters.callback);\n this._recaptchaLoader = this.auth.settings.appVerificationDisabledForTesting ? new MockReCaptchaLoaderImpl() : new ReCaptchaLoaderImpl();\n this.validateStartingState();\n // TODO: Figure out if sdk version is needed\n }\n /**\r\n * Waits for the user to solve the reCAPTCHA and resolves with the reCAPTCHA token.\r\n *\r\n * @returns A Promise for the reCAPTCHA token.\r\n */\n async verify() {\n this.assertNotDestroyed();\n const id = await this.render();\n const recaptcha = this.getAssertedRecaptcha();\n const response = recaptcha.getResponse(id);\n if (response) {\n return response;\n }\n return new Promise(resolve => {\n const tokenChange = token => {\n if (!token) {\n return; // Ignore token expirations.\n }\n this.tokenChangeListeners.delete(tokenChange);\n resolve(token);\n };\n this.tokenChangeListeners.add(tokenChange);\n if (this.isInvisible) {\n recaptcha.execute(id);\n }\n });\n }\n /**\r\n * Renders the reCAPTCHA widget on the page.\r\n *\r\n * @returns A Promise that resolves with the reCAPTCHA widget ID.\r\n */\n render() {\n try {\n this.assertNotDestroyed();\n } catch (e) {\n // This method returns a promise. Since it's not async (we want to return the\n // _same_ promise if rendering is still occurring), the API surface should\n // reject with the error rather than just throw\n return Promise.reject(e);\n }\n if (this.renderPromise) {\n return this.renderPromise;\n }\n this.renderPromise = this.makeRenderPromise().catch(e => {\n this.renderPromise = null;\n throw e;\n });\n return this.renderPromise;\n }\n /** @internal */\n _reset() {\n this.assertNotDestroyed();\n if (this.widgetId !== null) {\n this.getAssertedRecaptcha().reset(this.widgetId);\n }\n }\n /**\r\n * Clears the reCAPTCHA widget from the page and destroys the instance.\r\n */\n clear() {\n this.assertNotDestroyed();\n this.destroyed = true;\n this._recaptchaLoader.clearedOneInstance();\n if (!this.isInvisible) {\n this.container.childNodes.forEach(node => {\n this.container.removeChild(node);\n });\n }\n }\n validateStartingState() {\n _assert(!this.parameters.sitekey, this.auth, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n _assert(this.isInvisible || !this.container.hasChildNodes(), this.auth, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n _assert(typeof document !== 'undefined', this.auth, \"operation-not-supported-in-this-environment\" /* AuthErrorCode.OPERATION_NOT_SUPPORTED */);\n }\n makeTokenCallback(existing) {\n return token => {\n this.tokenChangeListeners.forEach(listener => listener(token));\n if (typeof existing === 'function') {\n existing(token);\n } else if (typeof existing === 'string') {\n const globalFunc = _window()[existing];\n if (typeof globalFunc === 'function') {\n globalFunc(token);\n }\n }\n };\n }\n assertNotDestroyed() {\n _assert(!this.destroyed, this.auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n }\n async makeRenderPromise() {\n await this.init();\n if (!this.widgetId) {\n let container = this.container;\n if (!this.isInvisible) {\n const guaranteedEmpty = document.createElement('div');\n container.appendChild(guaranteedEmpty);\n container = guaranteedEmpty;\n }\n this.widgetId = this.getAssertedRecaptcha().render(container, this.parameters);\n }\n return this.widgetId;\n }\n async init() {\n _assert(_isHttpOrHttps() && !_isWorker(), this.auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n await domReady();\n this.recaptcha = await this._recaptchaLoader.load(this.auth, this.auth.languageCode || undefined);\n const siteKey = await getRecaptchaParams(this.auth);\n _assert(siteKey, this.auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n this.parameters.sitekey = siteKey;\n }\n getAssertedRecaptcha() {\n _assert(this.recaptcha, this.auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n return this.recaptcha;\n }\n}\nfunction domReady() {\n let resolver = null;\n return new Promise(resolve => {\n if (document.readyState === 'complete') {\n resolve();\n return;\n }\n // Document not ready, wait for load before resolving.\n // Save resolver, so we can remove listener in case it was externally\n // cancelled.\n resolver = () => resolve();\n window.addEventListener('load', resolver);\n }).catch(e => {\n if (resolver) {\n window.removeEventListener('load', resolver);\n }\n throw e;\n });\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nclass ConfirmationResultImpl {\n constructor(verificationId, onConfirmation) {\n this.verificationId = verificationId;\n this.onConfirmation = onConfirmation;\n }\n confirm(verificationCode) {\n const authCredential = PhoneAuthCredential._fromVerification(this.verificationId, verificationCode);\n return this.onConfirmation(authCredential);\n }\n}\n/**\r\n * Asynchronously signs in using a phone number.\r\n *\r\n * @remarks\r\n * This method sends a code via SMS to the given\r\n * phone number, and returns a {@link ConfirmationResult}. After the user\r\n * provides the code sent to their phone, call {@link ConfirmationResult.confirm}\r\n * with the code to sign the user in.\r\n *\r\n * For abuse prevention, this method also requires a {@link ApplicationVerifier}.\r\n * This SDK includes a reCAPTCHA-based implementation, {@link RecaptchaVerifier}.\r\n * This function can work on other platforms that do not support the\r\n * {@link RecaptchaVerifier} (like React Native), but you need to use a\r\n * third-party {@link ApplicationVerifier} implementation.\r\n *\r\n * This method does not work in a Node.js environment.\r\n *\r\n * @example\r\n * ```javascript\r\n * // 'recaptcha-container' is the ID of an element in the DOM.\r\n * const applicationVerifier = new firebase.auth.RecaptchaVerifier('recaptcha-container');\r\n * const confirmationResult = await signInWithPhoneNumber(auth, phoneNumber, applicationVerifier);\r\n * // Obtain a verificationCode from the user.\r\n * const credential = await confirmationResult.confirm(verificationCode);\r\n * ```\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param phoneNumber - The user's phone number in E.164 format (e.g. +16505550101).\r\n * @param appVerifier - The {@link ApplicationVerifier}.\r\n *\r\n * @public\r\n */\nasync function signInWithPhoneNumber(auth, phoneNumber, appVerifier) {\n const authInternal = _castAuth(auth);\n const verificationId = await _verifyPhoneNumber(authInternal, phoneNumber, getModularInstance(appVerifier));\n return new ConfirmationResultImpl(verificationId, cred => signInWithCredential(authInternal, cred));\n}\n/**\r\n * Links the user account with the given phone number.\r\n *\r\n * @remarks\r\n * This method does not work in a Node.js environment.\r\n *\r\n * @param user - The user.\r\n * @param phoneNumber - The user's phone number in E.164 format (e.g. +16505550101).\r\n * @param appVerifier - The {@link ApplicationVerifier}.\r\n *\r\n * @public\r\n */\nasync function linkWithPhoneNumber(user, phoneNumber, appVerifier) {\n const userInternal = getModularInstance(user);\n await _assertLinkedStatus(false, userInternal, \"phone\" /* ProviderId.PHONE */);\n const verificationId = await _verifyPhoneNumber(userInternal.auth, phoneNumber, getModularInstance(appVerifier));\n return new ConfirmationResultImpl(verificationId, cred => linkWithCredential(userInternal, cred));\n}\n/**\r\n * Re-authenticates a user using a fresh phone credential.\r\n *\r\n * @remarks\r\n * Use before operations such as {@link updatePassword} that require tokens from recent sign-in attempts.\r\n *\r\n * This method does not work in a Node.js environment.\r\n *\r\n * @param user - The user.\r\n * @param phoneNumber - The user's phone number in E.164 format (e.g. +16505550101).\r\n * @param appVerifier - The {@link ApplicationVerifier}.\r\n *\r\n * @public\r\n */\nasync function reauthenticateWithPhoneNumber(user, phoneNumber, appVerifier) {\n const userInternal = getModularInstance(user);\n const verificationId = await _verifyPhoneNumber(userInternal.auth, phoneNumber, getModularInstance(appVerifier));\n return new ConfirmationResultImpl(verificationId, cred => reauthenticateWithCredential(userInternal, cred));\n}\n/**\r\n * Returns a verification ID to be used in conjunction with the SMS code that is sent.\r\n *\r\n */\nasync function _verifyPhoneNumber(auth, options, verifier) {\n var _a;\n const recaptchaToken = await verifier.verify();\n try {\n _assert(typeof recaptchaToken === 'string', auth, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n _assert(verifier.type === RECAPTCHA_VERIFIER_TYPE, auth, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n let phoneInfoOptions;\n if (typeof options === 'string') {\n phoneInfoOptions = {\n phoneNumber: options\n };\n } else {\n phoneInfoOptions = options;\n }\n if ('session' in phoneInfoOptions) {\n const session = phoneInfoOptions.session;\n if ('phoneNumber' in phoneInfoOptions) {\n _assert(session.type === \"enroll\" /* MultiFactorSessionType.ENROLL */, auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n const response = await startEnrollPhoneMfa(auth, {\n idToken: session.credential,\n phoneEnrollmentInfo: {\n phoneNumber: phoneInfoOptions.phoneNumber,\n recaptchaToken\n }\n });\n return response.phoneSessionInfo.sessionInfo;\n } else {\n _assert(session.type === \"signin\" /* MultiFactorSessionType.SIGN_IN */, auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n const mfaEnrollmentId = ((_a = phoneInfoOptions.multiFactorHint) === null || _a === void 0 ? void 0 : _a.uid) || phoneInfoOptions.multiFactorUid;\n _assert(mfaEnrollmentId, auth, \"missing-multi-factor-info\" /* AuthErrorCode.MISSING_MFA_INFO */);\n const response = await startSignInPhoneMfa(auth, {\n mfaPendingCredential: session.credential,\n mfaEnrollmentId,\n phoneSignInInfo: {\n recaptchaToken\n }\n });\n return response.phoneResponseInfo.sessionInfo;\n }\n } else {\n const {\n sessionInfo\n } = await sendPhoneVerificationCode(auth, {\n phoneNumber: phoneInfoOptions.phoneNumber,\n recaptchaToken\n });\n return sessionInfo;\n }\n } finally {\n verifier._reset();\n }\n}\n/**\r\n * Updates the user's phone number.\r\n *\r\n * @remarks\r\n * This method does not work in a Node.js environment.\r\n *\r\n * @example\r\n * ```\r\n * // 'recaptcha-container' is the ID of an element in the DOM.\r\n * const applicationVerifier = new RecaptchaVerifier('recaptcha-container');\r\n * const provider = new PhoneAuthProvider(auth);\r\n * const verificationId = await provider.verifyPhoneNumber('+16505550101', applicationVerifier);\r\n * // Obtain the verificationCode from the user.\r\n * const phoneCredential = PhoneAuthProvider.credential(verificationId, verificationCode);\r\n * await updatePhoneNumber(user, phoneCredential);\r\n * ```\r\n *\r\n * @param user - The user.\r\n * @param credential - A credential authenticating the new phone number.\r\n *\r\n * @public\r\n */\nasync function updatePhoneNumber(user, credential) {\n await _link$1(getModularInstance(user), credential);\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Provider for generating an {@link PhoneAuthCredential}.\r\n *\r\n * @remarks\r\n * `PhoneAuthProvider` does not work in a Node.js environment.\r\n *\r\n * @example\r\n * ```javascript\r\n * // 'recaptcha-container' is the ID of an element in the DOM.\r\n * const applicationVerifier = new RecaptchaVerifier('recaptcha-container');\r\n * const provider = new PhoneAuthProvider(auth);\r\n * const verificationId = await provider.verifyPhoneNumber('+16505550101', applicationVerifier);\r\n * // Obtain the verificationCode from the user.\r\n * const phoneCredential = PhoneAuthProvider.credential(verificationId, verificationCode);\r\n * const userCredential = await signInWithCredential(auth, phoneCredential);\r\n * ```\r\n *\r\n * @public\r\n */\nlet PhoneAuthProvider = /*#__PURE__*/(() => {\n class PhoneAuthProvider {\n /**\r\n * @param auth - The Firebase {@link Auth} instance in which sign-ins should occur.\r\n *\r\n */\n constructor(auth) {\n /** Always set to {@link ProviderId}.PHONE. */\n this.providerId = PhoneAuthProvider.PROVIDER_ID;\n this.auth = _castAuth(auth);\n }\n /**\r\n *\r\n * Starts a phone number authentication flow by sending a verification code to the given phone\r\n * number.\r\n *\r\n * @example\r\n * ```javascript\r\n * const provider = new PhoneAuthProvider(auth);\r\n * const verificationId = await provider.verifyPhoneNumber(phoneNumber, applicationVerifier);\r\n * // Obtain verificationCode from the user.\r\n * const authCredential = PhoneAuthProvider.credential(verificationId, verificationCode);\r\n * const userCredential = await signInWithCredential(auth, authCredential);\r\n * ```\r\n *\r\n * @example\r\n * An alternative flow is provided using the `signInWithPhoneNumber` method.\r\n * ```javascript\r\n * const confirmationResult = signInWithPhoneNumber(auth, phoneNumber, applicationVerifier);\r\n * // Obtain verificationCode from the user.\r\n * const userCredential = confirmationResult.confirm(verificationCode);\r\n * ```\r\n *\r\n * @param phoneInfoOptions - The user's {@link PhoneInfoOptions}. The phone number should be in\r\n * E.164 format (e.g. +16505550101).\r\n * @param applicationVerifier - For abuse prevention, this method also requires a\r\n * {@link ApplicationVerifier}. This SDK includes a reCAPTCHA-based implementation,\r\n * {@link RecaptchaVerifier}.\r\n *\r\n * @returns A Promise for a verification ID that can be passed to\r\n * {@link PhoneAuthProvider.credential} to identify this flow..\r\n */\n verifyPhoneNumber(phoneOptions, applicationVerifier) {\n return _verifyPhoneNumber(this.auth, phoneOptions, getModularInstance(applicationVerifier));\n }\n /**\r\n * Creates a phone auth credential, given the verification ID from\r\n * {@link PhoneAuthProvider.verifyPhoneNumber} and the code that was sent to the user's\r\n * mobile device.\r\n *\r\n * @example\r\n * ```javascript\r\n * const provider = new PhoneAuthProvider(auth);\r\n * const verificationId = provider.verifyPhoneNumber(phoneNumber, applicationVerifier);\r\n * // Obtain verificationCode from the user.\r\n * const authCredential = PhoneAuthProvider.credential(verificationId, verificationCode);\r\n * const userCredential = signInWithCredential(auth, authCredential);\r\n * ```\r\n *\r\n * @example\r\n * An alternative flow is provided using the `signInWithPhoneNumber` method.\r\n * ```javascript\r\n * const confirmationResult = await signInWithPhoneNumber(auth, phoneNumber, applicationVerifier);\r\n * // Obtain verificationCode from the user.\r\n * const userCredential = await confirmationResult.confirm(verificationCode);\r\n * ```\r\n *\r\n * @param verificationId - The verification ID returned from {@link PhoneAuthProvider.verifyPhoneNumber}.\r\n * @param verificationCode - The verification code sent to the user's mobile device.\r\n *\r\n * @returns The auth provider credential.\r\n */\n static credential(verificationId, verificationCode) {\n return PhoneAuthCredential._fromVerification(verificationId, verificationCode);\n }\n /**\r\n * Generates an {@link AuthCredential} from a {@link UserCredential}.\r\n * @param userCredential - The user credential.\r\n */\n static credentialFromResult(userCredential) {\n const credential = userCredential;\n return PhoneAuthProvider.credentialFromTaggedObject(credential);\n }\n /**\r\n * Returns an {@link AuthCredential} when passed an error.\r\n *\r\n * @remarks\r\n *\r\n * This method works for errors like\r\n * `auth/account-exists-with-different-credentials`. This is useful for\r\n * recovering when attempting to set a user's phone number but the number\r\n * in question is already tied to another account. For example, the following\r\n * code tries to update the current user's phone number, and if that\r\n * fails, links the user with the account associated with that number:\r\n *\r\n * ```js\r\n * const provider = new PhoneAuthProvider(auth);\r\n * const verificationId = await provider.verifyPhoneNumber(number, verifier);\r\n * try {\r\n * const code = ''; // Prompt the user for the verification code\r\n * await updatePhoneNumber(\r\n * auth.currentUser,\r\n * PhoneAuthProvider.credential(verificationId, code));\r\n * } catch (e) {\r\n * if ((e as FirebaseError)?.code === 'auth/account-exists-with-different-credential') {\r\n * const cred = PhoneAuthProvider.credentialFromError(e);\r\n * await linkWithCredential(auth.currentUser, cred);\r\n * }\r\n * }\r\n *\r\n * // At this point, auth.currentUser.phoneNumber === number.\r\n * ```\r\n *\r\n * @param error - The error to generate a credential from.\r\n */\n static credentialFromError(error) {\n return PhoneAuthProvider.credentialFromTaggedObject(error.customData || {});\n }\n static credentialFromTaggedObject({\n _tokenResponse: tokenResponse\n }) {\n if (!tokenResponse) {\n return null;\n }\n const {\n phoneNumber,\n temporaryProof\n } = tokenResponse;\n if (phoneNumber && temporaryProof) {\n return PhoneAuthCredential._fromTokenResponse(phoneNumber, temporaryProof);\n }\n return null;\n }\n }\n /** Always set to {@link ProviderId}.PHONE. */\n\n /** Always set to {@link SignInMethod}.PHONE. */PhoneAuthProvider.PROVIDER_ID = \"phone\" /* ProviderId.PHONE */;\n\n PhoneAuthProvider.PHONE_SIGN_IN_METHOD = \"phone\" /* SignInMethod.PHONE */;\n\n /**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n /**\r\n * Chooses a popup/redirect resolver to use. This prefers the override (which\r\n * is directly passed in), and falls back to the property set on the auth\r\n * object. If neither are available, this function errors w/ an argument error.\r\n */\n return PhoneAuthProvider;\n})();\nfunction _withDefaultResolver(auth, resolverOverride) {\n if (resolverOverride) {\n return _getInstance(resolverOverride);\n }\n _assert(auth._popupRedirectResolver, auth, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n return auth._popupRedirectResolver;\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nclass IdpCredential extends AuthCredential {\n constructor(params) {\n super(\"custom\" /* ProviderId.CUSTOM */, \"custom\" /* ProviderId.CUSTOM */);\n this.params = params;\n }\n _getIdTokenResponse(auth) {\n return signInWithIdp(auth, this._buildIdpRequest());\n }\n _linkToIdToken(auth, idToken) {\n return signInWithIdp(auth, this._buildIdpRequest(idToken));\n }\n _getReauthenticationResolver(auth) {\n return signInWithIdp(auth, this._buildIdpRequest());\n }\n _buildIdpRequest(idToken) {\n const request = {\n requestUri: this.params.requestUri,\n sessionId: this.params.sessionId,\n postBody: this.params.postBody,\n tenantId: this.params.tenantId,\n pendingToken: this.params.pendingToken,\n returnSecureToken: true,\n returnIdpCredential: true\n };\n if (idToken) {\n request.idToken = idToken;\n }\n return request;\n }\n}\nfunction _signIn(params) {\n return _signInWithCredential(params.auth, new IdpCredential(params), params.bypassAuthState);\n}\nfunction _reauth(params) {\n const {\n auth,\n user\n } = params;\n _assert(user, auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n return _reauthenticate(user, new IdpCredential(params), params.bypassAuthState);\n}\nasync function _link(params) {\n const {\n auth,\n user\n } = params;\n _assert(user, auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n return _link$1(user, new IdpCredential(params), params.bypassAuthState);\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Popup event manager. Handles the popup's entire lifecycle; listens to auth\r\n * events\r\n */\nclass AbstractPopupRedirectOperation {\n constructor(auth, filter, resolver, user, bypassAuthState = false) {\n this.auth = auth;\n this.resolver = resolver;\n this.user = user;\n this.bypassAuthState = bypassAuthState;\n this.pendingPromise = null;\n this.eventManager = null;\n this.filter = Array.isArray(filter) ? filter : [filter];\n }\n execute() {\n return new Promise(async (resolve, reject) => {\n this.pendingPromise = {\n resolve,\n reject\n };\n try {\n this.eventManager = await this.resolver._initialize(this.auth);\n await this.onExecution();\n this.eventManager.registerConsumer(this);\n } catch (e) {\n this.reject(e);\n }\n });\n }\n async onAuthEvent(event) {\n const {\n urlResponse,\n sessionId,\n postBody,\n tenantId,\n error,\n type\n } = event;\n if (error) {\n this.reject(error);\n return;\n }\n const params = {\n auth: this.auth,\n requestUri: urlResponse,\n sessionId: sessionId,\n tenantId: tenantId || undefined,\n postBody: postBody || undefined,\n user: this.user,\n bypassAuthState: this.bypassAuthState\n };\n try {\n this.resolve(await this.getIdpTask(type)(params));\n } catch (e) {\n this.reject(e);\n }\n }\n onError(error) {\n this.reject(error);\n }\n getIdpTask(type) {\n switch (type) {\n case \"signInViaPopup\" /* AuthEventType.SIGN_IN_VIA_POPUP */:\n case \"signInViaRedirect\" /* AuthEventType.SIGN_IN_VIA_REDIRECT */:\n return _signIn;\n case \"linkViaPopup\" /* AuthEventType.LINK_VIA_POPUP */:\n case \"linkViaRedirect\" /* AuthEventType.LINK_VIA_REDIRECT */:\n return _link;\n case \"reauthViaPopup\" /* AuthEventType.REAUTH_VIA_POPUP */:\n case \"reauthViaRedirect\" /* AuthEventType.REAUTH_VIA_REDIRECT */:\n return _reauth;\n default:\n _fail(this.auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n }\n }\n resolve(cred) {\n debugAssert(this.pendingPromise, 'Pending promise was never set');\n this.pendingPromise.resolve(cred);\n this.unregisterAndCleanUp();\n }\n reject(error) {\n debugAssert(this.pendingPromise, 'Pending promise was never set');\n this.pendingPromise.reject(error);\n this.unregisterAndCleanUp();\n }\n unregisterAndCleanUp() {\n if (this.eventManager) {\n this.eventManager.unregisterConsumer(this);\n }\n this.pendingPromise = null;\n this.cleanUp();\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst _POLL_WINDOW_CLOSE_TIMEOUT = new Delay(2000, 10000);\n/**\r\n * Authenticates a Firebase client using a popup-based OAuth authentication flow.\r\n *\r\n * @remarks\r\n * If succeeds, returns the signed in user along with the provider's credential. If sign in was\r\n * unsuccessful, returns an error object containing additional information about the error.\r\n *\r\n * This method does not work in a Node.js environment.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a popup.\r\n * const provider = new FacebookAuthProvider();\r\n * const result = await signInWithPopup(auth, provider);\r\n *\r\n * // The signed-in user info.\r\n * const user = result.user;\r\n * // This gives you a Facebook Access Token.\r\n * const credential = provider.credentialFromResult(auth, result);\r\n * const token = credential.accessToken;\r\n * ```\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param provider - The provider to authenticate. The provider has to be an {@link OAuthProvider}.\r\n * Non-OAuth providers like {@link EmailAuthProvider} will throw an error.\r\n * @param resolver - An instance of {@link PopupRedirectResolver}, optional\r\n * if already supplied to {@link initializeAuth} or provided by {@link getAuth}.\r\n *\r\n * @public\r\n */\nasync function signInWithPopup(auth, provider, resolver) {\n const authInternal = _castAuth(auth);\n _assertInstanceOf(auth, provider, FederatedAuthProvider);\n const resolverInternal = _withDefaultResolver(authInternal, resolver);\n const action = new PopupOperation(authInternal, \"signInViaPopup\" /* AuthEventType.SIGN_IN_VIA_POPUP */, provider, resolverInternal);\n return action.executeNotNull();\n}\n/**\r\n * Reauthenticates the current user with the specified {@link OAuthProvider} using a pop-up based\r\n * OAuth flow.\r\n *\r\n * @remarks\r\n * If the reauthentication is successful, the returned result will contain the user and the\r\n * provider's credential.\r\n *\r\n * This method does not work in a Node.js environment.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a popup.\r\n * const provider = new FacebookAuthProvider();\r\n * const result = await signInWithPopup(auth, provider);\r\n * // Reauthenticate using a popup.\r\n * await reauthenticateWithPopup(result.user, provider);\r\n * ```\r\n *\r\n * @param user - The user.\r\n * @param provider - The provider to authenticate. The provider has to be an {@link OAuthProvider}.\r\n * Non-OAuth providers like {@link EmailAuthProvider} will throw an error.\r\n * @param resolver - An instance of {@link PopupRedirectResolver}, optional\r\n * if already supplied to {@link initializeAuth} or provided by {@link getAuth}.\r\n *\r\n * @public\r\n */\nasync function reauthenticateWithPopup(user, provider, resolver) {\n const userInternal = getModularInstance(user);\n _assertInstanceOf(userInternal.auth, provider, FederatedAuthProvider);\n const resolverInternal = _withDefaultResolver(userInternal.auth, resolver);\n const action = new PopupOperation(userInternal.auth, \"reauthViaPopup\" /* AuthEventType.REAUTH_VIA_POPUP */, provider, resolverInternal, userInternal);\n return action.executeNotNull();\n}\n/**\r\n * Links the authenticated provider to the user account using a pop-up based OAuth flow.\r\n *\r\n * @remarks\r\n * If the linking is successful, the returned result will contain the user and the provider's credential.\r\n *\r\n * This method does not work in a Node.js environment.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using some other provider.\r\n * const result = await signInWithEmailAndPassword(auth, email, password);\r\n * // Link using a popup.\r\n * const provider = new FacebookAuthProvider();\r\n * await linkWithPopup(result.user, provider);\r\n * ```\r\n *\r\n * @param user - The user.\r\n * @param provider - The provider to authenticate. The provider has to be an {@link OAuthProvider}.\r\n * Non-OAuth providers like {@link EmailAuthProvider} will throw an error.\r\n * @param resolver - An instance of {@link PopupRedirectResolver}, optional\r\n * if already supplied to {@link initializeAuth} or provided by {@link getAuth}.\r\n *\r\n * @public\r\n */\nasync function linkWithPopup(user, provider, resolver) {\n const userInternal = getModularInstance(user);\n _assertInstanceOf(userInternal.auth, provider, FederatedAuthProvider);\n const resolverInternal = _withDefaultResolver(userInternal.auth, resolver);\n const action = new PopupOperation(userInternal.auth, \"linkViaPopup\" /* AuthEventType.LINK_VIA_POPUP */, provider, resolverInternal, userInternal);\n return action.executeNotNull();\n}\n/**\r\n * Popup event manager. Handles the popup's entire lifecycle; listens to auth\r\n * events\r\n *\r\n */\nlet PopupOperation = /*#__PURE__*/(() => {\n class PopupOperation extends AbstractPopupRedirectOperation {\n constructor(auth, filter, provider, resolver, user) {\n super(auth, filter, resolver, user);\n this.provider = provider;\n this.authWindow = null;\n this.pollId = null;\n if (PopupOperation.currentPopupAction) {\n PopupOperation.currentPopupAction.cancel();\n }\n PopupOperation.currentPopupAction = this;\n }\n async executeNotNull() {\n const result = await this.execute();\n _assert(result, this.auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n return result;\n }\n async onExecution() {\n debugAssert(this.filter.length === 1, 'Popup operations only handle one event');\n const eventId = _generateEventId();\n this.authWindow = await this.resolver._openPopup(this.auth, this.provider, this.filter[0],\n // There's always one, see constructor\n eventId);\n this.authWindow.associatedEvent = eventId;\n // Check for web storage support and origin validation _after_ the popup is\n // loaded. These operations are slow (~1 second or so) Rather than\n // waiting on them before opening the window, optimistically open the popup\n // and check for storage support at the same time. If storage support is\n // not available, this will cause the whole thing to reject properly. It\n // will also close the popup, but since the promise has already rejected,\n // the popup closed by user poll will reject into the void.\n this.resolver._originValidation(this.auth).catch(e => {\n this.reject(e);\n });\n this.resolver._isIframeWebStorageSupported(this.auth, isSupported => {\n if (!isSupported) {\n this.reject(_createError(this.auth, \"web-storage-unsupported\" /* AuthErrorCode.WEB_STORAGE_UNSUPPORTED */));\n }\n });\n // Handle user closure. Notice this does *not* use await\n this.pollUserCancellation();\n }\n get eventId() {\n var _a;\n return ((_a = this.authWindow) === null || _a === void 0 ? void 0 : _a.associatedEvent) || null;\n }\n cancel() {\n this.reject(_createError(this.auth, \"cancelled-popup-request\" /* AuthErrorCode.EXPIRED_POPUP_REQUEST */));\n }\n cleanUp() {\n if (this.authWindow) {\n this.authWindow.close();\n }\n if (this.pollId) {\n window.clearTimeout(this.pollId);\n }\n this.authWindow = null;\n this.pollId = null;\n PopupOperation.currentPopupAction = null;\n }\n pollUserCancellation() {\n const poll = () => {\n var _a, _b;\n if ((_b = (_a = this.authWindow) === null || _a === void 0 ? void 0 : _a.window) === null || _b === void 0 ? void 0 : _b.closed) {\n // Make sure that there is sufficient time for whatever action to\n // complete. The window could have closed but the sign in network\n // call could still be in flight. This is specifically true for\n // Firefox or if the opener is in an iframe, in which case the oauth\n // helper closes the popup.\n this.pollId = window.setTimeout(() => {\n this.pollId = null;\n this.reject(_createError(this.auth, \"popup-closed-by-user\" /* AuthErrorCode.POPUP_CLOSED_BY_USER */));\n }, 8000 /* _Timeout.AUTH_EVENT */);\n return;\n }\n this.pollId = window.setTimeout(poll, _POLL_WINDOW_CLOSE_TIMEOUT.get());\n };\n poll();\n }\n }\n // Only one popup is ever shown at once. The lifecycle of the current popup\n // can be managed / cancelled by the constructor.\n PopupOperation.currentPopupAction = null;\n\n /**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n return PopupOperation;\n})();\nconst PENDING_REDIRECT_KEY = 'pendingRedirect';\n// We only get one redirect outcome for any one auth, so just store it\n// in here.\nconst redirectOutcomeMap = new Map();\nclass RedirectAction extends AbstractPopupRedirectOperation {\n constructor(auth, resolver, bypassAuthState = false) {\n super(auth, [\"signInViaRedirect\" /* AuthEventType.SIGN_IN_VIA_REDIRECT */, \"linkViaRedirect\" /* AuthEventType.LINK_VIA_REDIRECT */, \"reauthViaRedirect\" /* AuthEventType.REAUTH_VIA_REDIRECT */, \"unknown\" /* AuthEventType.UNKNOWN */], resolver, undefined, bypassAuthState);\n this.eventId = null;\n }\n /**\r\n * Override the execute function; if we already have a redirect result, then\r\n * just return it.\r\n */\n async execute() {\n let readyOutcome = redirectOutcomeMap.get(this.auth._key());\n if (!readyOutcome) {\n try {\n const hasPendingRedirect = await _getAndClearPendingRedirectStatus(this.resolver, this.auth);\n const result = hasPendingRedirect ? await super.execute() : null;\n readyOutcome = () => Promise.resolve(result);\n } catch (e) {\n readyOutcome = () => Promise.reject(e);\n }\n redirectOutcomeMap.set(this.auth._key(), readyOutcome);\n }\n // If we're not bypassing auth state, the ready outcome should be set to\n // null.\n if (!this.bypassAuthState) {\n redirectOutcomeMap.set(this.auth._key(), () => Promise.resolve(null));\n }\n return readyOutcome();\n }\n async onAuthEvent(event) {\n if (event.type === \"signInViaRedirect\" /* AuthEventType.SIGN_IN_VIA_REDIRECT */) {\n return super.onAuthEvent(event);\n } else if (event.type === \"unknown\" /* AuthEventType.UNKNOWN */) {\n // This is a sentinel value indicating there's no pending redirect\n this.resolve(null);\n return;\n }\n if (event.eventId) {\n const user = await this.auth._redirectUserForId(event.eventId);\n if (user) {\n this.user = user;\n return super.onAuthEvent(event);\n } else {\n this.resolve(null);\n }\n }\n }\n async onExecution() {}\n cleanUp() {}\n}\nasync function _getAndClearPendingRedirectStatus(resolver, auth) {\n const key = pendingRedirectKey(auth);\n const persistence = resolverPersistence(resolver);\n if (!(await persistence._isAvailable())) {\n return false;\n }\n const hasPendingRedirect = (await persistence._get(key)) === 'true';\n await persistence._remove(key);\n return hasPendingRedirect;\n}\nasync function _setPendingRedirectStatus(resolver, auth) {\n return resolverPersistence(resolver)._set(pendingRedirectKey(auth), 'true');\n}\nfunction _clearRedirectOutcomes() {\n redirectOutcomeMap.clear();\n}\nfunction _overrideRedirectResult(auth, result) {\n redirectOutcomeMap.set(auth._key(), result);\n}\nfunction resolverPersistence(resolver) {\n return _getInstance(resolver._redirectPersistence);\n}\nfunction pendingRedirectKey(auth) {\n return _persistenceKeyName(PENDING_REDIRECT_KEY, auth.config.apiKey, auth.name);\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Authenticates a Firebase client using a full-page redirect flow.\r\n *\r\n * @remarks\r\n * To handle the results and errors for this operation, refer to {@link getRedirectResult}.\r\n * Follow the {@link https://firebase.google.com/docs/auth/web/redirect-best-practices\r\n * | best practices} when using {@link signInWithRedirect}.\r\n *\r\n * This method does not work in a Node.js environment.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a redirect.\r\n * const provider = new FacebookAuthProvider();\r\n * // You can add additional scopes to the provider:\r\n * provider.addScope('user_birthday');\r\n * // Start a sign in process for an unauthenticated user.\r\n * await signInWithRedirect(auth, provider);\r\n * // This will trigger a full page redirect away from your app\r\n *\r\n * // After returning from the redirect when your app initializes you can obtain the result\r\n * const result = await getRedirectResult(auth);\r\n * if (result) {\r\n * // This is the signed-in user\r\n * const user = result.user;\r\n * // This gives you a Facebook Access Token.\r\n * const credential = provider.credentialFromResult(auth, result);\r\n * const token = credential.accessToken;\r\n * }\r\n * // As this API can be used for sign-in, linking and reauthentication,\r\n * // check the operationType to determine what triggered this redirect\r\n * // operation.\r\n * const operationType = result.operationType;\r\n * ```\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param provider - The provider to authenticate. The provider has to be an {@link OAuthProvider}.\r\n * Non-OAuth providers like {@link EmailAuthProvider} will throw an error.\r\n * @param resolver - An instance of {@link PopupRedirectResolver}, optional\r\n * if already supplied to {@link initializeAuth} or provided by {@link getAuth}.\r\n *\r\n * @public\r\n */\nfunction signInWithRedirect(auth, provider, resolver) {\n return _signInWithRedirect(auth, provider, resolver);\n}\nasync function _signInWithRedirect(auth, provider, resolver) {\n const authInternal = _castAuth(auth);\n _assertInstanceOf(auth, provider, FederatedAuthProvider);\n // Wait for auth initialization to complete, this will process pending redirects and clear the\n // PENDING_REDIRECT_KEY in persistence. This should be completed before starting a new\n // redirect and creating a PENDING_REDIRECT_KEY entry.\n await authInternal._initializationPromise;\n const resolverInternal = _withDefaultResolver(authInternal, resolver);\n await _setPendingRedirectStatus(resolverInternal, authInternal);\n return resolverInternal._openRedirect(authInternal, provider, \"signInViaRedirect\" /* AuthEventType.SIGN_IN_VIA_REDIRECT */);\n}\n/**\r\n * Reauthenticates the current user with the specified {@link OAuthProvider} using a full-page redirect flow.\r\n * @remarks\r\n * To handle the results and errors for this operation, refer to {@link getRedirectResult}.\r\n * Follow the {@link https://firebase.google.com/docs/auth/web/redirect-best-practices\r\n * | best practices} when using {@link reauthenticateWithRedirect}.\r\n *\r\n * This method does not work in a Node.js environment.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a redirect.\r\n * const provider = new FacebookAuthProvider();\r\n * const result = await signInWithRedirect(auth, provider);\r\n * // This will trigger a full page redirect away from your app\r\n *\r\n * // After returning from the redirect when your app initializes you can obtain the result\r\n * const result = await getRedirectResult(auth);\r\n * // Reauthenticate using a redirect.\r\n * await reauthenticateWithRedirect(result.user, provider);\r\n * // This will again trigger a full page redirect away from your app\r\n *\r\n * // After returning from the redirect when your app initializes you can obtain the result\r\n * const result = await getRedirectResult(auth);\r\n * ```\r\n *\r\n * @param user - The user.\r\n * @param provider - The provider to authenticate. The provider has to be an {@link OAuthProvider}.\r\n * Non-OAuth providers like {@link EmailAuthProvider} will throw an error.\r\n * @param resolver - An instance of {@link PopupRedirectResolver}, optional\r\n * if already supplied to {@link initializeAuth} or provided by {@link getAuth}.\r\n *\r\n * @public\r\n */\nfunction reauthenticateWithRedirect(user, provider, resolver) {\n return _reauthenticateWithRedirect(user, provider, resolver);\n}\nasync function _reauthenticateWithRedirect(user, provider, resolver) {\n const userInternal = getModularInstance(user);\n _assertInstanceOf(userInternal.auth, provider, FederatedAuthProvider);\n // Wait for auth initialization to complete, this will process pending redirects and clear the\n // PENDING_REDIRECT_KEY in persistence. This should be completed before starting a new\n // redirect and creating a PENDING_REDIRECT_KEY entry.\n await userInternal.auth._initializationPromise;\n // Allow the resolver to error before persisting the redirect user\n const resolverInternal = _withDefaultResolver(userInternal.auth, resolver);\n await _setPendingRedirectStatus(resolverInternal, userInternal.auth);\n const eventId = await prepareUserForRedirect(userInternal);\n return resolverInternal._openRedirect(userInternal.auth, provider, \"reauthViaRedirect\" /* AuthEventType.REAUTH_VIA_REDIRECT */, eventId);\n}\n/**\r\n * Links the {@link OAuthProvider} to the user account using a full-page redirect flow.\r\n * @remarks\r\n * To handle the results and errors for this operation, refer to {@link getRedirectResult}.\r\n * Follow the {@link https://firebase.google.com/docs/auth/web/redirect-best-practices\r\n * | best practices} when using {@link linkWithRedirect}.\r\n *\r\n * This method does not work in a Node.js environment.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using some other provider.\r\n * const result = await signInWithEmailAndPassword(auth, email, password);\r\n * // Link using a redirect.\r\n * const provider = new FacebookAuthProvider();\r\n * await linkWithRedirect(result.user, provider);\r\n * // This will trigger a full page redirect away from your app\r\n *\r\n * // After returning from the redirect when your app initializes you can obtain the result\r\n * const result = await getRedirectResult(auth);\r\n * ```\r\n *\r\n * @param user - The user.\r\n * @param provider - The provider to authenticate. The provider has to be an {@link OAuthProvider}.\r\n * Non-OAuth providers like {@link EmailAuthProvider} will throw an error.\r\n * @param resolver - An instance of {@link PopupRedirectResolver}, optional\r\n * if already supplied to {@link initializeAuth} or provided by {@link getAuth}.\r\n *\r\n * @public\r\n */\nfunction linkWithRedirect(user, provider, resolver) {\n return _linkWithRedirect(user, provider, resolver);\n}\nasync function _linkWithRedirect(user, provider, resolver) {\n const userInternal = getModularInstance(user);\n _assertInstanceOf(userInternal.auth, provider, FederatedAuthProvider);\n // Wait for auth initialization to complete, this will process pending redirects and clear the\n // PENDING_REDIRECT_KEY in persistence. This should be completed before starting a new\n // redirect and creating a PENDING_REDIRECT_KEY entry.\n await userInternal.auth._initializationPromise;\n // Allow the resolver to error before persisting the redirect user\n const resolverInternal = _withDefaultResolver(userInternal.auth, resolver);\n await _assertLinkedStatus(false, userInternal, provider.providerId);\n await _setPendingRedirectStatus(resolverInternal, userInternal.auth);\n const eventId = await prepareUserForRedirect(userInternal);\n return resolverInternal._openRedirect(userInternal.auth, provider, \"linkViaRedirect\" /* AuthEventType.LINK_VIA_REDIRECT */, eventId);\n}\n/**\r\n * Returns a {@link UserCredential} from the redirect-based sign-in flow.\r\n *\r\n * @remarks\r\n * If sign-in succeeded, returns the signed in user. If sign-in was unsuccessful, fails with an\r\n * error. If no redirect operation was called, returns `null`.\r\n *\r\n * This method does not work in a Node.js environment.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a redirect.\r\n * const provider = new FacebookAuthProvider();\r\n * // You can add additional scopes to the provider:\r\n * provider.addScope('user_birthday');\r\n * // Start a sign in process for an unauthenticated user.\r\n * await signInWithRedirect(auth, provider);\r\n * // This will trigger a full page redirect away from your app\r\n *\r\n * // After returning from the redirect when your app initializes you can obtain the result\r\n * const result = await getRedirectResult(auth);\r\n * if (result) {\r\n * // This is the signed-in user\r\n * const user = result.user;\r\n * // This gives you a Facebook Access Token.\r\n * const credential = provider.credentialFromResult(auth, result);\r\n * const token = credential.accessToken;\r\n * }\r\n * // As this API can be used for sign-in, linking and reauthentication,\r\n * // check the operationType to determine what triggered this redirect\r\n * // operation.\r\n * const operationType = result.operationType;\r\n * ```\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param resolver - An instance of {@link PopupRedirectResolver}, optional\r\n * if already supplied to {@link initializeAuth} or provided by {@link getAuth}.\r\n *\r\n * @public\r\n */\nasync function getRedirectResult(auth, resolver) {\n await _castAuth(auth)._initializationPromise;\n return _getRedirectResult(auth, resolver, false);\n}\nasync function _getRedirectResult(auth, resolverExtern, bypassAuthState = false) {\n const authInternal = _castAuth(auth);\n const resolver = _withDefaultResolver(authInternal, resolverExtern);\n const action = new RedirectAction(authInternal, resolver, bypassAuthState);\n const result = await action.execute();\n if (result && !bypassAuthState) {\n delete result.user._redirectEventId;\n await authInternal._persistUserIfCurrent(result.user);\n await authInternal._setRedirectUser(null, resolverExtern);\n }\n return result;\n}\nasync function prepareUserForRedirect(user) {\n const eventId = _generateEventId(`${user.uid}:::`);\n user._redirectEventId = eventId;\n await user.auth._setRedirectUser(user);\n await user.auth._persistUserIfCurrent(user);\n return eventId;\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n// The amount of time to store the UIDs of seen events; this is\n// set to 10 min by default\nconst EVENT_DUPLICATION_CACHE_DURATION_MS = 10 * 60 * 1000;\nclass AuthEventManager {\n constructor(auth) {\n this.auth = auth;\n this.cachedEventUids = new Set();\n this.consumers = new Set();\n this.queuedRedirectEvent = null;\n this.hasHandledPotentialRedirect = false;\n this.lastProcessedEventTime = Date.now();\n }\n registerConsumer(authEventConsumer) {\n this.consumers.add(authEventConsumer);\n if (this.queuedRedirectEvent && this.isEventForConsumer(this.queuedRedirectEvent, authEventConsumer)) {\n this.sendToConsumer(this.queuedRedirectEvent, authEventConsumer);\n this.saveEventToCache(this.queuedRedirectEvent);\n this.queuedRedirectEvent = null;\n }\n }\n unregisterConsumer(authEventConsumer) {\n this.consumers.delete(authEventConsumer);\n }\n onEvent(event) {\n // Check if the event has already been handled\n if (this.hasEventBeenHandled(event)) {\n return false;\n }\n let handled = false;\n this.consumers.forEach(consumer => {\n if (this.isEventForConsumer(event, consumer)) {\n handled = true;\n this.sendToConsumer(event, consumer);\n this.saveEventToCache(event);\n }\n });\n if (this.hasHandledPotentialRedirect || !isRedirectEvent(event)) {\n // If we've already seen a redirect before, or this is a popup event,\n // bail now\n return handled;\n }\n this.hasHandledPotentialRedirect = true;\n // If the redirect wasn't handled, hang on to it\n if (!handled) {\n this.queuedRedirectEvent = event;\n handled = true;\n }\n return handled;\n }\n sendToConsumer(event, consumer) {\n var _a;\n if (event.error && !isNullRedirectEvent(event)) {\n const code = ((_a = event.error.code) === null || _a === void 0 ? void 0 : _a.split('auth/')[1]) || \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */;\n consumer.onError(_createError(this.auth, code));\n } else {\n consumer.onAuthEvent(event);\n }\n }\n isEventForConsumer(event, consumer) {\n const eventIdMatches = consumer.eventId === null || !!event.eventId && event.eventId === consumer.eventId;\n return consumer.filter.includes(event.type) && eventIdMatches;\n }\n hasEventBeenHandled(event) {\n if (Date.now() - this.lastProcessedEventTime >= EVENT_DUPLICATION_CACHE_DURATION_MS) {\n this.cachedEventUids.clear();\n }\n return this.cachedEventUids.has(eventUid(event));\n }\n saveEventToCache(event) {\n this.cachedEventUids.add(eventUid(event));\n this.lastProcessedEventTime = Date.now();\n }\n}\nfunction eventUid(e) {\n return [e.type, e.eventId, e.sessionId, e.tenantId].filter(v => v).join('-');\n}\nfunction isNullRedirectEvent({\n type,\n error\n}) {\n return type === \"unknown\" /* AuthEventType.UNKNOWN */ && (error === null || error === void 0 ? void 0 : error.code) === `auth/${\"no-auth-event\" /* AuthErrorCode.NO_AUTH_EVENT */}`;\n}\nfunction isRedirectEvent(event) {\n switch (event.type) {\n case \"signInViaRedirect\" /* AuthEventType.SIGN_IN_VIA_REDIRECT */:\n case \"linkViaRedirect\" /* AuthEventType.LINK_VIA_REDIRECT */:\n case \"reauthViaRedirect\" /* AuthEventType.REAUTH_VIA_REDIRECT */:\n return true;\n case \"unknown\" /* AuthEventType.UNKNOWN */:\n return isNullRedirectEvent(event);\n default:\n return false;\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nasync function _getProjectConfig(auth, request = {}) {\n return _performApiRequest(auth, \"GET\" /* HttpMethod.GET */, \"/v1/projects\" /* Endpoint.GET_PROJECT_CONFIG */, request);\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst IP_ADDRESS_REGEX = /^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$/;\nconst HTTP_REGEX = /^https?/;\nasync function _validateOrigin(auth) {\n // Skip origin validation if we are in an emulated environment\n if (auth.config.emulator) {\n return;\n }\n const {\n authorizedDomains\n } = await _getProjectConfig(auth);\n for (const domain of authorizedDomains) {\n try {\n if (matchDomain(domain)) {\n return;\n }\n } catch (_a) {\n // Do nothing if there's a URL error; just continue searching\n }\n }\n // In the old SDK, this error also provides helpful messages.\n _fail(auth, \"unauthorized-domain\" /* AuthErrorCode.INVALID_ORIGIN */);\n}\nfunction matchDomain(expected) {\n const currentUrl = _getCurrentUrl();\n const {\n protocol,\n hostname\n } = new URL(currentUrl);\n if (expected.startsWith('chrome-extension://')) {\n const ceUrl = new URL(expected);\n if (ceUrl.hostname === '' && hostname === '') {\n // For some reason we're not parsing chrome URLs properly\n return protocol === 'chrome-extension:' && expected.replace('chrome-extension://', '') === currentUrl.replace('chrome-extension://', '');\n }\n return protocol === 'chrome-extension:' && ceUrl.hostname === hostname;\n }\n if (!HTTP_REGEX.test(protocol)) {\n return false;\n }\n if (IP_ADDRESS_REGEX.test(expected)) {\n // The domain has to be exactly equal to the pattern, as an IP domain will\n // only contain the IP, no extra character.\n return hostname === expected;\n }\n // Dots in pattern should be escaped.\n const escapedDomainPattern = expected.replace(/\\./g, '\\\\.');\n // Non ip address domains.\n // domain.com = *.domain.com OR domain.com\n const re = new RegExp('^(.+\\\\.' + escapedDomainPattern + '|' + escapedDomainPattern + ')$', 'i');\n return re.test(hostname);\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst NETWORK_TIMEOUT = new Delay(30000, 60000);\n/**\r\n * Reset unlaoded GApi modules. If gapi.load fails due to a network error,\r\n * it will stop working after a retrial. This is a hack to fix this issue.\r\n */\nfunction resetUnloadedGapiModules() {\n // Clear last failed gapi.load state to force next gapi.load to first\n // load the failed gapi.iframes module.\n // Get gapix.beacon context.\n const beacon = _window().___jsl;\n // Get current hint.\n if (beacon === null || beacon === void 0 ? void 0 : beacon.H) {\n // Get gapi hint.\n for (const hint of Object.keys(beacon.H)) {\n // Requested modules.\n beacon.H[hint].r = beacon.H[hint].r || [];\n // Loaded modules.\n beacon.H[hint].L = beacon.H[hint].L || [];\n // Set requested modules to a copy of the loaded modules.\n beacon.H[hint].r = [...beacon.H[hint].L];\n // Clear pending callbacks.\n if (beacon.CP) {\n for (let i = 0; i < beacon.CP.length; i++) {\n // Remove all failed pending callbacks.\n beacon.CP[i] = null;\n }\n }\n }\n }\n}\nfunction loadGapi(auth) {\n return new Promise((resolve, reject) => {\n var _a, _b, _c;\n // Function to run when gapi.load is ready.\n function loadGapiIframe() {\n // The developer may have tried to previously run gapi.load and failed.\n // Run this to fix that.\n resetUnloadedGapiModules();\n gapi.load('gapi.iframes', {\n callback: () => {\n resolve(gapi.iframes.getContext());\n },\n ontimeout: () => {\n // The above reset may be sufficient, but having this reset after\n // failure ensures that if the developer calls gapi.load after the\n // connection is re-established and before another attempt to embed\n // the iframe, it would work and would not be broken because of our\n // failed attempt.\n // Timeout when gapi.iframes.Iframe not loaded.\n resetUnloadedGapiModules();\n reject(_createError(auth, \"network-request-failed\" /* AuthErrorCode.NETWORK_REQUEST_FAILED */));\n },\n timeout: NETWORK_TIMEOUT.get()\n });\n }\n if ((_b = (_a = _window().gapi) === null || _a === void 0 ? void 0 : _a.iframes) === null || _b === void 0 ? void 0 : _b.Iframe) {\n // If gapi.iframes.Iframe available, resolve.\n resolve(gapi.iframes.getContext());\n } else if (!!((_c = _window().gapi) === null || _c === void 0 ? void 0 : _c.load)) {\n // Gapi loader ready, load gapi.iframes.\n loadGapiIframe();\n } else {\n // Create a new iframe callback when this is called so as not to overwrite\n // any previous defined callback. This happens if this method is called\n // multiple times in parallel and could result in the later callback\n // overwriting the previous one. This would end up with a iframe\n // timeout.\n const cbName = _generateCallbackName('iframefcb');\n // GApi loader not available, dynamically load platform.js.\n _window()[cbName] = () => {\n // GApi loader should be ready.\n if (!!gapi.load) {\n loadGapiIframe();\n } else {\n // Gapi loader failed, throw error.\n reject(_createError(auth, \"network-request-failed\" /* AuthErrorCode.NETWORK_REQUEST_FAILED */));\n }\n };\n // Load GApi loader.\n return _loadJS(`https://apis.google.com/js/api.js?onload=${cbName}`).catch(e => reject(e));\n }\n }).catch(error => {\n // Reset cached promise to allow for retrial.\n cachedGApiLoader = null;\n throw error;\n });\n}\nlet cachedGApiLoader = null;\nfunction _loadGapi(auth) {\n cachedGApiLoader = cachedGApiLoader || loadGapi(auth);\n return cachedGApiLoader;\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst PING_TIMEOUT = new Delay(5000, 15000);\nconst IFRAME_PATH = '__/auth/iframe';\nconst EMULATED_IFRAME_PATH = 'emulator/auth/iframe';\nconst IFRAME_ATTRIBUTES = {\n style: {\n position: 'absolute',\n top: '-100px',\n width: '1px',\n height: '1px'\n },\n 'aria-hidden': 'true',\n tabindex: '-1'\n};\n// Map from apiHost to endpoint ID for passing into iframe. In current SDK, apiHost can be set to\n// anything (not from a list of endpoints with IDs as in legacy), so this is the closest we can get.\nconst EID_FROM_APIHOST = new Map([[\"identitytoolkit.googleapis.com\" /* DefaultConfig.API_HOST */, 'p'], ['staging-identitytoolkit.sandbox.googleapis.com', 's'], ['test-identitytoolkit.sandbox.googleapis.com', 't'] // test\n]);\nfunction getIframeUrl(auth) {\n const config = auth.config;\n _assert(config.authDomain, auth, \"auth-domain-config-required\" /* AuthErrorCode.MISSING_AUTH_DOMAIN */);\n const url = config.emulator ? _emulatorUrl(config, EMULATED_IFRAME_PATH) : `https://${auth.config.authDomain}/${IFRAME_PATH}`;\n const params = {\n apiKey: config.apiKey,\n appName: auth.name,\n v: SDK_VERSION\n };\n const eid = EID_FROM_APIHOST.get(auth.config.apiHost);\n if (eid) {\n params.eid = eid;\n }\n const frameworks = auth._getFrameworks();\n if (frameworks.length) {\n params.fw = frameworks.join(',');\n }\n return `${url}?${querystring(params).slice(1)}`;\n}\nasync function _openIframe(auth) {\n const context = await _loadGapi(auth);\n const gapi = _window().gapi;\n _assert(gapi, auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n return context.open({\n where: document.body,\n url: getIframeUrl(auth),\n messageHandlersFilter: gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER,\n attributes: IFRAME_ATTRIBUTES,\n dontclear: true\n }, iframe => new Promise(async (resolve, reject) => {\n await iframe.restyle({\n // Prevent iframe from closing on mouse out.\n setHideOnLeave: false\n });\n const networkError = _createError(auth, \"network-request-failed\" /* AuthErrorCode.NETWORK_REQUEST_FAILED */);\n // Confirm iframe is correctly loaded.\n // To fallback on failure, set a timeout.\n const networkErrorTimer = _window().setTimeout(() => {\n reject(networkError);\n }, PING_TIMEOUT.get());\n // Clear timer and resolve pending iframe ready promise.\n function clearTimerAndResolve() {\n _window().clearTimeout(networkErrorTimer);\n resolve(iframe);\n }\n // This returns an IThenable. However the reject part does not call\n // when the iframe is not loaded.\n iframe.ping(clearTimerAndResolve).then(clearTimerAndResolve, () => {\n reject(networkError);\n });\n }));\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst BASE_POPUP_OPTIONS = {\n location: 'yes',\n resizable: 'yes',\n statusbar: 'yes',\n toolbar: 'no'\n};\nconst DEFAULT_WIDTH = 500;\nconst DEFAULT_HEIGHT = 600;\nconst TARGET_BLANK = '_blank';\nconst FIREFOX_EMPTY_URL = 'http://localhost';\nclass AuthPopup {\n constructor(window) {\n this.window = window;\n this.associatedEvent = null;\n }\n close() {\n if (this.window) {\n try {\n this.window.close();\n } catch (e) {}\n }\n }\n}\nfunction _open(auth, url, name, width = DEFAULT_WIDTH, height = DEFAULT_HEIGHT) {\n const top = Math.max((window.screen.availHeight - height) / 2, 0).toString();\n const left = Math.max((window.screen.availWidth - width) / 2, 0).toString();\n let target = '';\n const options = Object.assign(Object.assign({}, BASE_POPUP_OPTIONS), {\n width: width.toString(),\n height: height.toString(),\n top,\n left\n });\n // Chrome iOS 7 and 8 is returning an undefined popup win when target is\n // specified, even though the popup is not necessarily blocked.\n const ua = getUA().toLowerCase();\n if (name) {\n target = _isChromeIOS(ua) ? TARGET_BLANK : name;\n }\n if (_isFirefox(ua)) {\n // Firefox complains when invalid URLs are popped out. Hacky way to bypass.\n url = url || FIREFOX_EMPTY_URL;\n // Firefox disables by default scrolling on popup windows, which can create\n // issues when the user has many Google accounts, for instance.\n options.scrollbars = 'yes';\n }\n const optionsString = Object.entries(options).reduce((accum, [key, value]) => `${accum}${key}=${value},`, '');\n if (_isIOSStandalone(ua) && target !== '_self') {\n openAsNewWindowIOS(url || '', target);\n return new AuthPopup(null);\n }\n // about:blank getting sanitized causing browsers like IE/Edge to display\n // brief error message before redirecting to handler.\n const newWin = window.open(url || '', target, optionsString);\n _assert(newWin, auth, \"popup-blocked\" /* AuthErrorCode.POPUP_BLOCKED */);\n // Flaky on IE edge, encapsulate with a try and catch.\n try {\n newWin.focus();\n } catch (e) {}\n return new AuthPopup(newWin);\n}\nfunction openAsNewWindowIOS(url, target) {\n const el = document.createElement('a');\n el.href = url;\n el.target = target;\n const click = document.createEvent('MouseEvent');\n click.initMouseEvent('click', true, true, window, 1, 0, 0, 0, 0, false, false, false, false, 1, null);\n el.dispatchEvent(click);\n}\n\n/**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * URL for Authentication widget which will initiate the OAuth handshake\r\n *\r\n * @internal\r\n */\nconst WIDGET_PATH = '__/auth/handler';\n/**\r\n * URL for emulated environment\r\n *\r\n * @internal\r\n */\nconst EMULATOR_WIDGET_PATH = 'emulator/auth/handler';\n/**\r\n * Fragment name for the App Check token that gets passed to the widget\r\n *\r\n * @internal\r\n */\nconst FIREBASE_APP_CHECK_FRAGMENT_ID = encodeURIComponent('fac');\nasync function _getRedirectUrl(auth, provider, authType, redirectUrl, eventId, additionalParams) {\n _assert(auth.config.authDomain, auth, \"auth-domain-config-required\" /* AuthErrorCode.MISSING_AUTH_DOMAIN */);\n _assert(auth.config.apiKey, auth, \"invalid-api-key\" /* AuthErrorCode.INVALID_API_KEY */);\n const params = {\n apiKey: auth.config.apiKey,\n appName: auth.name,\n authType,\n redirectUrl,\n v: SDK_VERSION,\n eventId\n };\n if (provider instanceof FederatedAuthProvider) {\n provider.setDefaultLanguage(auth.languageCode);\n params.providerId = provider.providerId || '';\n if (!isEmpty(provider.getCustomParameters())) {\n params.customParameters = JSON.stringify(provider.getCustomParameters());\n }\n // TODO set additionalParams from the provider as well?\n for (const [key, value] of Object.entries(additionalParams || {})) {\n params[key] = value;\n }\n }\n if (provider instanceof BaseOAuthProvider) {\n const scopes = provider.getScopes().filter(scope => scope !== '');\n if (scopes.length > 0) {\n params.scopes = scopes.join(',');\n }\n }\n if (auth.tenantId) {\n params.tid = auth.tenantId;\n }\n // TODO: maybe set eid as endipointId\n // TODO: maybe set fw as Frameworks.join(\",\")\n const paramsDict = params;\n for (const key of Object.keys(paramsDict)) {\n if (paramsDict[key] === undefined) {\n delete paramsDict[key];\n }\n }\n // Sets the App Check token to pass to the widget\n const appCheckToken = await auth._getAppCheckToken();\n const appCheckTokenFragment = appCheckToken ? `#${FIREBASE_APP_CHECK_FRAGMENT_ID}=${encodeURIComponent(appCheckToken)}` : '';\n // Start at index 1 to skip the leading '&' in the query string\n return `${getHandlerBase(auth)}?${querystring(paramsDict).slice(1)}${appCheckTokenFragment}`;\n}\nfunction getHandlerBase({\n config\n}) {\n if (!config.emulator) {\n return `https://${config.authDomain}/${WIDGET_PATH}`;\n }\n return _emulatorUrl(config, EMULATOR_WIDGET_PATH);\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * The special web storage event\r\n *\r\n */\nconst WEB_STORAGE_SUPPORT_KEY = 'webStorageSupport';\nclass BrowserPopupRedirectResolver {\n constructor() {\n this.eventManagers = {};\n this.iframes = {};\n this.originValidationPromises = {};\n this._redirectPersistence = browserSessionPersistence;\n this._completeRedirectFn = _getRedirectResult;\n this._overrideRedirectResult = _overrideRedirectResult;\n }\n // Wrapping in async even though we don't await anywhere in order\n // to make sure errors are raised as promise rejections\n async _openPopup(auth, provider, authType, eventId) {\n var _a;\n debugAssert((_a = this.eventManagers[auth._key()]) === null || _a === void 0 ? void 0 : _a.manager, '_initialize() not called before _openPopup()');\n const url = await _getRedirectUrl(auth, provider, authType, _getCurrentUrl(), eventId);\n return _open(auth, url, _generateEventId());\n }\n async _openRedirect(auth, provider, authType, eventId) {\n await this._originValidation(auth);\n const url = await _getRedirectUrl(auth, provider, authType, _getCurrentUrl(), eventId);\n _setWindowLocation(url);\n return new Promise(() => {});\n }\n _initialize(auth) {\n const key = auth._key();\n if (this.eventManagers[key]) {\n const {\n manager,\n promise\n } = this.eventManagers[key];\n if (manager) {\n return Promise.resolve(manager);\n } else {\n debugAssert(promise, 'If manager is not set, promise should be');\n return promise;\n }\n }\n const promise = this.initAndGetManager(auth);\n this.eventManagers[key] = {\n promise\n };\n // If the promise is rejected, the key should be removed so that the\n // operation can be retried later.\n promise.catch(() => {\n delete this.eventManagers[key];\n });\n return promise;\n }\n async initAndGetManager(auth) {\n const iframe = await _openIframe(auth);\n const manager = new AuthEventManager(auth);\n iframe.register('authEvent', iframeEvent => {\n _assert(iframeEvent === null || iframeEvent === void 0 ? void 0 : iframeEvent.authEvent, auth, \"invalid-auth-event\" /* AuthErrorCode.INVALID_AUTH_EVENT */);\n // TODO: Consider splitting redirect and popup events earlier on\n const handled = manager.onEvent(iframeEvent.authEvent);\n return {\n status: handled ? \"ACK\" /* GapiOutcome.ACK */ : \"ERROR\" /* GapiOutcome.ERROR */\n };\n }, gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER);\n this.eventManagers[auth._key()] = {\n manager\n };\n this.iframes[auth._key()] = iframe;\n return manager;\n }\n _isIframeWebStorageSupported(auth, cb) {\n const iframe = this.iframes[auth._key()];\n iframe.send(WEB_STORAGE_SUPPORT_KEY, {\n type: WEB_STORAGE_SUPPORT_KEY\n }, result => {\n var _a;\n const isSupported = (_a = result === null || result === void 0 ? void 0 : result[0]) === null || _a === void 0 ? void 0 : _a[WEB_STORAGE_SUPPORT_KEY];\n if (isSupported !== undefined) {\n cb(!!isSupported);\n }\n _fail(auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n }, gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER);\n }\n _originValidation(auth) {\n const key = auth._key();\n if (!this.originValidationPromises[key]) {\n this.originValidationPromises[key] = _validateOrigin(auth);\n }\n return this.originValidationPromises[key];\n }\n get _shouldInitProactively() {\n // Mobile browsers and Safari need to optimistically initialize\n return _isMobileBrowser() || _isSafari() || _isIOS();\n }\n}\n/**\r\n * An implementation of {@link PopupRedirectResolver} suitable for browser\r\n * based applications.\r\n *\r\n * @remarks\r\n * This method does not work in a Node.js environment.\r\n *\r\n * @public\r\n */\nconst browserPopupRedirectResolver = BrowserPopupRedirectResolver;\nclass MultiFactorAssertionImpl {\n constructor(factorId) {\n this.factorId = factorId;\n }\n _process(auth, session, displayName) {\n switch (session.type) {\n case \"enroll\" /* MultiFactorSessionType.ENROLL */:\n return this._finalizeEnroll(auth, session.credential, displayName);\n case \"signin\" /* MultiFactorSessionType.SIGN_IN */:\n return this._finalizeSignIn(auth, session.credential);\n default:\n return debugFail('unexpected MultiFactorSessionType');\n }\n }\n}\n\n/**\r\n * {@inheritdoc PhoneMultiFactorAssertion}\r\n *\r\n * @public\r\n */\nclass PhoneMultiFactorAssertionImpl extends MultiFactorAssertionImpl {\n constructor(credential) {\n super(\"phone\" /* FactorId.PHONE */);\n this.credential = credential;\n }\n /** @internal */\n static _fromCredential(credential) {\n return new PhoneMultiFactorAssertionImpl(credential);\n }\n /** @internal */\n _finalizeEnroll(auth, idToken, displayName) {\n return finalizeEnrollPhoneMfa(auth, {\n idToken,\n displayName,\n phoneVerificationInfo: this.credential._makeVerificationRequest()\n });\n }\n /** @internal */\n _finalizeSignIn(auth, mfaPendingCredential) {\n return finalizeSignInPhoneMfa(auth, {\n mfaPendingCredential,\n phoneVerificationInfo: this.credential._makeVerificationRequest()\n });\n }\n}\n/**\r\n * Provider for generating a {@link PhoneMultiFactorAssertion}.\r\n *\r\n * @public\r\n */\nlet PhoneMultiFactorGenerator = /*#__PURE__*/(() => {\n class PhoneMultiFactorGenerator {\n constructor() {}\n /**\r\n * Provides a {@link PhoneMultiFactorAssertion} to confirm ownership of the phone second factor.\r\n *\r\n * @remarks\r\n * This method does not work in a Node.js environment.\r\n *\r\n * @param phoneAuthCredential - A credential provided by {@link PhoneAuthProvider.credential}.\r\n * @returns A {@link PhoneMultiFactorAssertion} which can be used with\r\n * {@link MultiFactorResolver.resolveSignIn}\r\n */\n static assertion(credential) {\n return PhoneMultiFactorAssertionImpl._fromCredential(credential);\n }\n }\n /**\r\n * The identifier of the phone second factor: `phone`.\r\n */\n PhoneMultiFactorGenerator.FACTOR_ID = 'phone';\n\n /**\r\n * Provider for generating a {@link TotpMultiFactorAssertion}.\r\n *\r\n * @public\r\n */\n return PhoneMultiFactorGenerator;\n})();\nlet TotpMultiFactorGenerator = /*#__PURE__*/(() => {\n class TotpMultiFactorGenerator {\n /**\r\n * Provides a {@link TotpMultiFactorAssertion} to confirm ownership of\r\n * the TOTP (time-based one-time password) second factor.\r\n * This assertion is used to complete enrollment in TOTP second factor.\r\n *\r\n * @param secret A {@link TotpSecret} containing the shared secret key and other TOTP parameters.\r\n * @param oneTimePassword One-time password from TOTP App.\r\n * @returns A {@link TotpMultiFactorAssertion} which can be used with\r\n * {@link MultiFactorUser.enroll}.\r\n */\n static assertionForEnrollment(secret, oneTimePassword) {\n return TotpMultiFactorAssertionImpl._fromSecret(secret, oneTimePassword);\n }\n /**\r\n * Provides a {@link TotpMultiFactorAssertion} to confirm ownership of the TOTP second factor.\r\n * This assertion is used to complete signIn with TOTP as the second factor.\r\n *\r\n * @param enrollmentId identifies the enrolled TOTP second factor.\r\n * @param oneTimePassword One-time password from TOTP App.\r\n * @returns A {@link TotpMultiFactorAssertion} which can be used with\r\n * {@link MultiFactorResolver.resolveSignIn}.\r\n */\n static assertionForSignIn(enrollmentId, oneTimePassword) {\n return TotpMultiFactorAssertionImpl._fromEnrollmentId(enrollmentId, oneTimePassword);\n }\n /**\r\n * Returns a promise to {@link TotpSecret} which contains the TOTP shared secret key and other parameters.\r\n * Creates a TOTP secret as part of enrolling a TOTP second factor.\r\n * Used for generating a QR code URL or inputting into a TOTP app.\r\n * This method uses the auth instance corresponding to the user in the multiFactorSession.\r\n *\r\n * @param session The {@link MultiFactorSession} that the user is part of.\r\n * @returns A promise to {@link TotpSecret}.\r\n */\n static async generateSecret(session) {\n var _a;\n const mfaSession = session;\n _assert(typeof ((_a = mfaSession.user) === null || _a === void 0 ? void 0 : _a.auth) !== 'undefined', \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n const response = await startEnrollTotpMfa(mfaSession.user.auth, {\n idToken: mfaSession.credential,\n totpEnrollmentInfo: {}\n });\n return TotpSecret._fromStartTotpMfaEnrollmentResponse(response, mfaSession.user.auth);\n }\n }\n /**\r\n * The identifier of the TOTP second factor: `totp`.\r\n */\n TotpMultiFactorGenerator.FACTOR_ID = \"totp\" /* FactorId.TOTP */;\n return TotpMultiFactorGenerator;\n})();\nclass TotpMultiFactorAssertionImpl extends MultiFactorAssertionImpl {\n constructor(otp, enrollmentId, secret) {\n super(\"totp\" /* FactorId.TOTP */);\n this.otp = otp;\n this.enrollmentId = enrollmentId;\n this.secret = secret;\n }\n /** @internal */\n static _fromSecret(secret, otp) {\n return new TotpMultiFactorAssertionImpl(otp, undefined, secret);\n }\n /** @internal */\n static _fromEnrollmentId(enrollmentId, otp) {\n return new TotpMultiFactorAssertionImpl(otp, enrollmentId);\n }\n /** @internal */\n async _finalizeEnroll(auth, idToken, displayName) {\n _assert(typeof this.secret !== 'undefined', auth, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n return finalizeEnrollTotpMfa(auth, {\n idToken,\n displayName,\n totpVerificationInfo: this.secret._makeTotpVerificationInfo(this.otp)\n });\n }\n /** @internal */\n async _finalizeSignIn(auth, mfaPendingCredential) {\n _assert(this.enrollmentId !== undefined && this.otp !== undefined, auth, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n const totpVerificationInfo = {\n verificationCode: this.otp\n };\n return finalizeSignInTotpMfa(auth, {\n mfaPendingCredential,\n mfaEnrollmentId: this.enrollmentId,\n totpVerificationInfo\n });\n }\n}\n/**\r\n * Provider for generating a {@link TotpMultiFactorAssertion}.\r\n *\r\n * Stores the shared secret key and other parameters to generate time-based OTPs.\r\n * Implements methods to retrieve the shared secret key and generate a QR code URL.\r\n * @public\r\n */\nclass TotpSecret {\n // The public members are declared outside the constructor so the docs can be generated.\n constructor(secretKey, hashingAlgorithm, codeLength, codeIntervalSeconds, enrollmentCompletionDeadline, sessionInfo, auth) {\n this.sessionInfo = sessionInfo;\n this.auth = auth;\n this.secretKey = secretKey;\n this.hashingAlgorithm = hashingAlgorithm;\n this.codeLength = codeLength;\n this.codeIntervalSeconds = codeIntervalSeconds;\n this.enrollmentCompletionDeadline = enrollmentCompletionDeadline;\n }\n /** @internal */\n static _fromStartTotpMfaEnrollmentResponse(response, auth) {\n return new TotpSecret(response.totpSessionInfo.sharedSecretKey, response.totpSessionInfo.hashingAlgorithm, response.totpSessionInfo.verificationCodeLength, response.totpSessionInfo.periodSec, new Date(response.totpSessionInfo.finalizeEnrollmentTime).toUTCString(), response.totpSessionInfo.sessionInfo, auth);\n }\n /** @internal */\n _makeTotpVerificationInfo(otp) {\n return {\n sessionInfo: this.sessionInfo,\n verificationCode: otp\n };\n }\n /**\r\n * Returns a QR code URL as described in\r\n * https://github.com/google/google-authenticator/wiki/Key-Uri-Format\r\n * This can be displayed to the user as a QR code to be scanned into a TOTP app like Google Authenticator.\r\n * If the optional parameters are unspecified, an accountName of and issuer of are used.\r\n *\r\n * @param accountName the name of the account/app along with a user identifier.\r\n * @param issuer issuer of the TOTP (likely the app name).\r\n * @returns A QR code URL string.\r\n */\n generateQrCodeUrl(accountName, issuer) {\n var _a;\n let useDefaults = false;\n if (_isEmptyString(accountName) || _isEmptyString(issuer)) {\n useDefaults = true;\n }\n if (useDefaults) {\n if (_isEmptyString(accountName)) {\n accountName = ((_a = this.auth.currentUser) === null || _a === void 0 ? void 0 : _a.email) || 'unknownuser';\n }\n if (_isEmptyString(issuer)) {\n issuer = this.auth.name;\n }\n }\n return `otpauth://totp/${issuer}:${accountName}?secret=${this.secretKey}&issuer=${issuer}&algorithm=${this.hashingAlgorithm}&digits=${this.codeLength}`;\n }\n}\n/** @internal */\nfunction _isEmptyString(input) {\n return typeof input === 'undefined' || (input === null || input === void 0 ? void 0 : input.length) === 0;\n}\nvar name = \"@firebase/auth\";\nvar version = \"1.5.1\";\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nclass AuthInterop {\n constructor(auth) {\n this.auth = auth;\n this.internalListeners = new Map();\n }\n getUid() {\n var _a;\n this.assertAuthConfigured();\n return ((_a = this.auth.currentUser) === null || _a === void 0 ? void 0 : _a.uid) || null;\n }\n async getToken(forceRefresh) {\n this.assertAuthConfigured();\n await this.auth._initializationPromise;\n if (!this.auth.currentUser) {\n return null;\n }\n const accessToken = await this.auth.currentUser.getIdToken(forceRefresh);\n return {\n accessToken\n };\n }\n addAuthTokenListener(listener) {\n this.assertAuthConfigured();\n if (this.internalListeners.has(listener)) {\n return;\n }\n const unsubscribe = this.auth.onIdTokenChanged(user => {\n listener((user === null || user === void 0 ? void 0 : user.stsTokenManager.accessToken) || null);\n });\n this.internalListeners.set(listener, unsubscribe);\n this.updateProactiveRefresh();\n }\n removeAuthTokenListener(listener) {\n this.assertAuthConfigured();\n const unsubscribe = this.internalListeners.get(listener);\n if (!unsubscribe) {\n return;\n }\n this.internalListeners.delete(listener);\n unsubscribe();\n this.updateProactiveRefresh();\n }\n assertAuthConfigured() {\n _assert(this.auth._initializationPromise, \"dependent-sdk-initialized-before-auth\" /* AuthErrorCode.DEPENDENT_SDK_INIT_BEFORE_AUTH */);\n }\n updateProactiveRefresh() {\n if (this.internalListeners.size > 0) {\n this.auth._startProactiveRefresh();\n } else {\n this.auth._stopProactiveRefresh();\n }\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction getVersionForPlatform(clientPlatform) {\n switch (clientPlatform) {\n case \"Node\" /* ClientPlatform.NODE */:\n return 'node';\n case \"ReactNative\" /* ClientPlatform.REACT_NATIVE */:\n return 'rn';\n case \"Worker\" /* ClientPlatform.WORKER */:\n return 'webworker';\n case \"Cordova\" /* ClientPlatform.CORDOVA */:\n return 'cordova';\n default:\n return undefined;\n }\n}\n/** @internal */\nfunction registerAuth(clientPlatform) {\n _registerComponent(new Component(\"auth\" /* _ComponentName.AUTH */, (container, {\n options: deps\n }) => {\n const app = container.getProvider('app').getImmediate();\n const heartbeatServiceProvider = container.getProvider('heartbeat');\n const appCheckServiceProvider = container.getProvider('app-check-internal');\n const {\n apiKey,\n authDomain\n } = app.options;\n _assert(apiKey && !apiKey.includes(':'), \"invalid-api-key\" /* AuthErrorCode.INVALID_API_KEY */, {\n appName: app.name\n });\n const config = {\n apiKey,\n authDomain,\n clientPlatform,\n apiHost: \"identitytoolkit.googleapis.com\" /* DefaultConfig.API_HOST */,\n tokenApiHost: \"securetoken.googleapis.com\" /* DefaultConfig.TOKEN_API_HOST */,\n apiScheme: \"https\" /* DefaultConfig.API_SCHEME */,\n sdkClientVersion: _getClientVersion(clientPlatform)\n };\n const authInstance = new AuthImpl(app, heartbeatServiceProvider, appCheckServiceProvider, config);\n _initializeAuthInstance(authInstance, deps);\n return authInstance;\n }, \"PUBLIC\" /* ComponentType.PUBLIC */)\n /**\r\n * Auth can only be initialized by explicitly calling getAuth() or initializeAuth()\r\n * For why we do this, See go/firebase-next-auth-init\r\n */.setInstantiationMode(\"EXPLICIT\" /* InstantiationMode.EXPLICIT */)\n /**\r\n * Because all firebase products that depend on auth depend on auth-internal directly,\r\n * we need to initialize auth-internal after auth is initialized to make it available to other firebase products.\r\n */.setInstanceCreatedCallback((container, _instanceIdentifier, _instance) => {\n const authInternalProvider = container.getProvider(\"auth-internal\" /* _ComponentName.AUTH_INTERNAL */);\n authInternalProvider.initialize();\n }));\n _registerComponent(new Component(\"auth-internal\" /* _ComponentName.AUTH_INTERNAL */, container => {\n const auth = _castAuth(container.getProvider(\"auth\" /* _ComponentName.AUTH */).getImmediate());\n return (auth => new AuthInterop(auth))(auth);\n }, \"PRIVATE\" /* ComponentType.PRIVATE */).setInstantiationMode(\"EXPLICIT\" /* InstantiationMode.EXPLICIT */));\n registerVersion(name, version, getVersionForPlatform(clientPlatform));\n // BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation\n registerVersion(name, version, 'esm2017');\n}\n\n/**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst DEFAULT_ID_TOKEN_MAX_AGE = 5 * 60;\nconst authIdTokenMaxAge = getExperimentalSetting('authIdTokenMaxAge') || DEFAULT_ID_TOKEN_MAX_AGE;\nlet lastPostedIdToken = null;\nconst mintCookieFactory = url => async user => {\n const idTokenResult = user && (await user.getIdTokenResult());\n const idTokenAge = idTokenResult && (new Date().getTime() - Date.parse(idTokenResult.issuedAtTime)) / 1000;\n if (idTokenAge && idTokenAge > authIdTokenMaxAge) {\n return;\n }\n // Specifically trip null => undefined when logged out, to delete any existing cookie\n const idToken = idTokenResult === null || idTokenResult === void 0 ? void 0 : idTokenResult.token;\n if (lastPostedIdToken === idToken) {\n return;\n }\n lastPostedIdToken = idToken;\n await fetch(url, {\n method: idToken ? 'POST' : 'DELETE',\n headers: idToken ? {\n 'Authorization': `Bearer ${idToken}`\n } : {}\n });\n};\n/**\r\n * Returns the Auth instance associated with the provided {@link @firebase/app#FirebaseApp}.\r\n * If no instance exists, initializes an Auth instance with platform-specific default dependencies.\r\n *\r\n * @param app - The Firebase App.\r\n *\r\n * @public\r\n */\nfunction getAuth(app = getApp()) {\n const provider = _getProvider(app, 'auth');\n if (provider.isInitialized()) {\n return provider.getImmediate();\n }\n const auth = initializeAuth(app, {\n popupRedirectResolver: browserPopupRedirectResolver,\n persistence: [indexedDBLocalPersistence, browserLocalPersistence, browserSessionPersistence]\n });\n const authTokenSyncUrl = getExperimentalSetting('authTokenSyncURL');\n if (authTokenSyncUrl) {\n const mintCookie = mintCookieFactory(authTokenSyncUrl);\n beforeAuthStateChanged(auth, mintCookie, () => mintCookie(auth.currentUser));\n onIdTokenChanged(auth, user => mintCookie(user));\n }\n const authEmulatorHost = getDefaultEmulatorHost('auth');\n if (authEmulatorHost) {\n connectAuthEmulator(auth, `http://${authEmulatorHost}`);\n }\n return auth;\n}\nregisterAuth(\"Browser\" /* ClientPlatform.BROWSER */);\nexport { TwitterAuthProvider as $, ActionCodeOperation as A, updateCurrentUser as B, signOut as C, revokeAccessToken as D, deleteUser as E, FactorId as F, debugErrorMap as G, prodErrorMap as H, AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY as I, initializeAuth as J, connectAuthEmulator as K, AuthCredential as L, EmailAuthCredential as M, OAuthCredential as N, OperationType as O, PhoneAuthProvider as P, PhoneAuthCredential as Q, RecaptchaVerifier as R, SignInMethod as S, TotpMultiFactorGenerator as T, inMemoryPersistence as U, EmailAuthProvider as V, FacebookAuthProvider as W, GoogleAuthProvider as X, GithubAuthProvider as Y, OAuthProvider as Z, SAMLAuthProvider as _, browserSessionPersistence as a, signInAnonymously as a0, signInWithCredential as a1, linkWithCredential as a2, reauthenticateWithCredential as a3, signInWithCustomToken as a4, sendPasswordResetEmail as a5, confirmPasswordReset as a6, applyActionCode as a7, checkActionCode as a8, verifyPasswordResetCode as a9, _isIOS7Or8 as aA, _createError as aB, _assert as aC, AuthEventManager as aD, _getInstance as aE, _persistenceKeyName as aF, _getRedirectResult as aG, _overrideRedirectResult as aH, _clearRedirectOutcomes as aI, _castAuth as aJ, UserImpl as aK, AuthImpl as aL, _getClientVersion as aM, _generateEventId as aN, AuthPopup as aO, FetchProvider as aP, SAMLAuthCredential as aQ, createUserWithEmailAndPassword as aa, signInWithEmailAndPassword as ab, sendSignInLinkToEmail as ac, isSignInWithEmailLink as ad, signInWithEmailLink as ae, fetchSignInMethodsForEmail as af, sendEmailVerification as ag, verifyBeforeUpdateEmail as ah, ActionCodeURL as ai, parseActionCodeURL as aj, updateProfile as ak, updateEmail as al, updatePassword as am, getIdToken as an, getIdTokenResult as ao, unlink as ap, getAdditionalUserInfo as aq, reload as ar, getMultiFactorResolver as as, multiFactor as at, debugAssert as au, _isIOS as av, _isAndroid as aw, _fail as ax, _getRedirectUrl as ay, _getProjectConfig as az, browserLocalPersistence as b, signInWithPopup as c, linkWithPopup as d, reauthenticateWithPopup as e, signInWithRedirect as f, linkWithRedirect as g, reauthenticateWithRedirect as h, indexedDBLocalPersistence as i, getRedirectResult as j, browserPopupRedirectResolver as k, linkWithPhoneNumber as l, PhoneMultiFactorGenerator as m, TotpSecret as n, getAuth as o, ProviderId as p, setPersistence as q, reauthenticateWithPhoneNumber as r, signInWithPhoneNumber as s, initializeRecaptchaConfig as t, updatePhoneNumber as u, validatePassword as v, onIdTokenChanged as w, beforeAuthStateChanged as x, onAuthStateChanged as y, useDeviceLanguage as z };\n","import { ɵgetAllInstancesOf, ɵgetDefaultInstanceOf, VERSION, ɵAngularFireSchedulers, ɵAppCheckInstances, ɵzoneWrap } from '@angular/fire';\nimport { from, timer } from 'rxjs';\nimport { concatMap, distinct } from 'rxjs/operators';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, Optional, NgModule, NgZone, Injector } from '@angular/core';\nimport { FirebaseApp, FirebaseApps } from '@angular/fire/app';\nimport { registerVersion } from 'firebase/app';\nimport { authState as authState$1, user as user$1, idToken as idToken$1 } from 'rxfire/auth';\nimport { applyActionCode as applyActionCode$1, beforeAuthStateChanged as beforeAuthStateChanged$1, checkActionCode as checkActionCode$1, confirmPasswordReset as confirmPasswordReset$1, connectAuthEmulator as connectAuthEmulator$1, createUserWithEmailAndPassword as createUserWithEmailAndPassword$1, deleteUser as deleteUser$1, fetchSignInMethodsForEmail as fetchSignInMethodsForEmail$1, getAdditionalUserInfo as getAdditionalUserInfo$1, getAuth as getAuth$1, getIdToken as getIdToken$1, getIdTokenResult as getIdTokenResult$1, getMultiFactorResolver as getMultiFactorResolver$1, getRedirectResult as getRedirectResult$1, initializeAuth as initializeAuth$1, initializeRecaptchaConfig as initializeRecaptchaConfig$1, isSignInWithEmailLink as isSignInWithEmailLink$1, linkWithCredential as linkWithCredential$1, linkWithPhoneNumber as linkWithPhoneNumber$1, linkWithPopup as linkWithPopup$1, linkWithRedirect as linkWithRedirect$1, multiFactor as multiFactor$1, onAuthStateChanged as onAuthStateChanged$1, onIdTokenChanged as onIdTokenChanged$1, parseActionCodeURL as parseActionCodeURL$1, reauthenticateWithCredential as reauthenticateWithCredential$1, reauthenticateWithPhoneNumber as reauthenticateWithPhoneNumber$1, reauthenticateWithPopup as reauthenticateWithPopup$1, reauthenticateWithRedirect as reauthenticateWithRedirect$1, reload as reload$1, revokeAccessToken as revokeAccessToken$1, sendEmailVerification as sendEmailVerification$1, sendPasswordResetEmail as sendPasswordResetEmail$1, sendSignInLinkToEmail as sendSignInLinkToEmail$1, setPersistence as setPersistence$1, signInAnonymously as signInAnonymously$1, signInWithCredential as signInWithCredential$1, signInWithCustomToken as signInWithCustomToken$1, signInWithEmailAndPassword as signInWithEmailAndPassword$1, signInWithEmailLink as signInWithEmailLink$1, signInWithPhoneNumber as signInWithPhoneNumber$1, signInWithPopup as signInWithPopup$1, signInWithRedirect as signInWithRedirect$1, signOut as signOut$1, unlink as unlink$1, updateCurrentUser as updateCurrentUser$1, updateEmail as updateEmail$1, updatePassword as updatePassword$1, updatePhoneNumber as updatePhoneNumber$1, updateProfile as updateProfile$1, useDeviceLanguage as useDeviceLanguage$1, validatePassword as validatePassword$1, verifyBeforeUpdateEmail as verifyBeforeUpdateEmail$1, verifyPasswordResetCode as verifyPasswordResetCode$1 } from 'firebase/auth';\nexport * from 'firebase/auth';\nconst AUTH_PROVIDER_NAME = 'auth';\nclass Auth {\n constructor(auth) {\n return auth;\n }\n}\nclass AuthInstances {\n constructor() {\n return ɵgetAllInstancesOf(AUTH_PROVIDER_NAME);\n }\n}\nconst authInstance$ = /*#__PURE__*/ /*#__PURE__*/timer(0, 300).pipe( /*#__PURE__*/concatMap(() => from(ɵgetAllInstancesOf(AUTH_PROVIDER_NAME))), /*#__PURE__*/distinct());\nconst PROVIDED_AUTH_INSTANCES = /*#__PURE__*/new InjectionToken('angularfire2.auth-instances');\nfunction defaultAuthInstanceFactory(provided, defaultApp) {\n const defaultAuth = ɵgetDefaultInstanceOf(AUTH_PROVIDER_NAME, provided, defaultApp);\n return defaultAuth && new Auth(defaultAuth);\n}\nfunction authInstanceFactory(fn) {\n return (zone, injector) => {\n const auth = zone.runOutsideAngular(() => fn(injector));\n return new Auth(auth);\n };\n}\nconst AUTH_INSTANCES_PROVIDER = {\n provide: AuthInstances,\n deps: [[/*#__PURE__*/new Optional(), PROVIDED_AUTH_INSTANCES]]\n};\nconst DEFAULT_AUTH_INSTANCE_PROVIDER = {\n provide: Auth,\n useFactory: defaultAuthInstanceFactory,\n deps: [[/*#__PURE__*/new Optional(), PROVIDED_AUTH_INSTANCES], FirebaseApp]\n};\nlet AuthModule = /*#__PURE__*/(() => {\n class AuthModule {\n constructor() {\n registerVersion('angularfire', VERSION.full, 'auth');\n }\n static ɵfac = function AuthModule_Factory(t) {\n return new (t || AuthModule)();\n };\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: AuthModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [DEFAULT_AUTH_INSTANCE_PROVIDER, AUTH_INSTANCES_PROVIDER]\n });\n }\n return AuthModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction provideAuth(fn, ...deps) {\n return {\n ngModule: AuthModule,\n providers: [{\n provide: PROVIDED_AUTH_INSTANCES,\n useFactory: authInstanceFactory(fn),\n multi: true,\n deps: [NgZone, Injector, ɵAngularFireSchedulers, FirebaseApps, [new Optional(), ɵAppCheckInstances], ...deps]\n }]\n };\n}\n\n// DO NOT MODIFY, this file is autogenerated by tools/build.ts\nconst authState = /*#__PURE__*/ɵzoneWrap(authState$1, true);\nconst user = /*#__PURE__*/ɵzoneWrap(user$1, true);\nconst idToken = /*#__PURE__*/ɵzoneWrap(idToken$1, true);\n\n// DO NOT MODIFY, this file is autogenerated by tools/build.ts\nconst applyActionCode = /*#__PURE__*/ɵzoneWrap(applyActionCode$1, true);\nconst beforeAuthStateChanged = /*#__PURE__*/ɵzoneWrap(beforeAuthStateChanged$1, true);\nconst checkActionCode = /*#__PURE__*/ɵzoneWrap(checkActionCode$1, true);\nconst confirmPasswordReset = /*#__PURE__*/ɵzoneWrap(confirmPasswordReset$1, true);\nconst connectAuthEmulator = /*#__PURE__*/ɵzoneWrap(connectAuthEmulator$1, true);\nconst createUserWithEmailAndPassword = /*#__PURE__*/ɵzoneWrap(createUserWithEmailAndPassword$1, true);\nconst deleteUser = /*#__PURE__*/ɵzoneWrap(deleteUser$1, true);\nconst fetchSignInMethodsForEmail = /*#__PURE__*/ɵzoneWrap(fetchSignInMethodsForEmail$1, true);\nconst getAdditionalUserInfo = /*#__PURE__*/ɵzoneWrap(getAdditionalUserInfo$1, true);\nconst getAuth = /*#__PURE__*/ɵzoneWrap(getAuth$1, true);\nconst getIdToken = /*#__PURE__*/ɵzoneWrap(getIdToken$1, true);\nconst getIdTokenResult = /*#__PURE__*/ɵzoneWrap(getIdTokenResult$1, true);\nconst getMultiFactorResolver = /*#__PURE__*/ɵzoneWrap(getMultiFactorResolver$1, true);\nconst getRedirectResult = /*#__PURE__*/ɵzoneWrap(getRedirectResult$1, true);\nconst initializeAuth = /*#__PURE__*/ɵzoneWrap(initializeAuth$1, true);\nconst initializeRecaptchaConfig = /*#__PURE__*/ɵzoneWrap(initializeRecaptchaConfig$1, true);\nconst isSignInWithEmailLink = /*#__PURE__*/ɵzoneWrap(isSignInWithEmailLink$1, true);\nconst linkWithCredential = /*#__PURE__*/ɵzoneWrap(linkWithCredential$1, true);\nconst linkWithPhoneNumber = /*#__PURE__*/ɵzoneWrap(linkWithPhoneNumber$1, true);\nconst linkWithPopup = /*#__PURE__*/ɵzoneWrap(linkWithPopup$1, true);\nconst linkWithRedirect = /*#__PURE__*/ɵzoneWrap(linkWithRedirect$1, true);\nconst multiFactor = /*#__PURE__*/ɵzoneWrap(multiFactor$1, true);\nconst onAuthStateChanged = /*#__PURE__*/ɵzoneWrap(onAuthStateChanged$1, true);\nconst onIdTokenChanged = /*#__PURE__*/ɵzoneWrap(onIdTokenChanged$1, true);\nconst parseActionCodeURL = /*#__PURE__*/ɵzoneWrap(parseActionCodeURL$1, true);\nconst reauthenticateWithCredential = /*#__PURE__*/ɵzoneWrap(reauthenticateWithCredential$1, true);\nconst reauthenticateWithPhoneNumber = /*#__PURE__*/ɵzoneWrap(reauthenticateWithPhoneNumber$1, true);\nconst reauthenticateWithPopup = /*#__PURE__*/ɵzoneWrap(reauthenticateWithPopup$1, true);\nconst reauthenticateWithRedirect = /*#__PURE__*/ɵzoneWrap(reauthenticateWithRedirect$1, true);\nconst reload = /*#__PURE__*/ɵzoneWrap(reload$1, true);\nconst revokeAccessToken = /*#__PURE__*/ɵzoneWrap(revokeAccessToken$1, true);\nconst sendEmailVerification = /*#__PURE__*/ɵzoneWrap(sendEmailVerification$1, true);\nconst sendPasswordResetEmail = /*#__PURE__*/ɵzoneWrap(sendPasswordResetEmail$1, true);\nconst sendSignInLinkToEmail = /*#__PURE__*/ɵzoneWrap(sendSignInLinkToEmail$1, true);\nconst setPersistence = /*#__PURE__*/ɵzoneWrap(setPersistence$1, true);\nconst signInAnonymously = /*#__PURE__*/ɵzoneWrap(signInAnonymously$1, true);\nconst signInWithCredential = /*#__PURE__*/ɵzoneWrap(signInWithCredential$1, true);\nconst signInWithCustomToken = /*#__PURE__*/ɵzoneWrap(signInWithCustomToken$1, true);\nconst signInWithEmailAndPassword = /*#__PURE__*/ɵzoneWrap(signInWithEmailAndPassword$1, true);\nconst signInWithEmailLink = /*#__PURE__*/ɵzoneWrap(signInWithEmailLink$1, true);\nconst signInWithPhoneNumber = /*#__PURE__*/ɵzoneWrap(signInWithPhoneNumber$1, true);\nconst signInWithPopup = /*#__PURE__*/ɵzoneWrap(signInWithPopup$1, true);\nconst signInWithRedirect = /*#__PURE__*/ɵzoneWrap(signInWithRedirect$1, true);\nconst signOut = /*#__PURE__*/ɵzoneWrap(signOut$1, true);\nconst unlink = /*#__PURE__*/ɵzoneWrap(unlink$1, true);\nconst updateCurrentUser = /*#__PURE__*/ɵzoneWrap(updateCurrentUser$1, true);\nconst updateEmail = /*#__PURE__*/ɵzoneWrap(updateEmail$1, true);\nconst updatePassword = /*#__PURE__*/ɵzoneWrap(updatePassword$1, true);\nconst updatePhoneNumber = /*#__PURE__*/ɵzoneWrap(updatePhoneNumber$1, true);\nconst updateProfile = /*#__PURE__*/ɵzoneWrap(updateProfile$1, true);\nconst useDeviceLanguage = /*#__PURE__*/ɵzoneWrap(useDeviceLanguage$1, true);\nconst validatePassword = /*#__PURE__*/ɵzoneWrap(validatePassword$1, true);\nconst verifyBeforeUpdateEmail = /*#__PURE__*/ɵzoneWrap(verifyBeforeUpdateEmail$1, true);\nconst verifyPasswordResetCode = /*#__PURE__*/ɵzoneWrap(verifyPasswordResetCode$1, true);\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { Auth, AuthInstances, AuthModule, applyActionCode, authInstance$, authState, beforeAuthStateChanged, checkActionCode, confirmPasswordReset, connectAuthEmulator, createUserWithEmailAndPassword, deleteUser, fetchSignInMethodsForEmail, getAdditionalUserInfo, getAuth, getIdToken, getIdTokenResult, getMultiFactorResolver, getRedirectResult, idToken, initializeAuth, initializeRecaptchaConfig, isSignInWithEmailLink, linkWithCredential, linkWithPhoneNumber, linkWithPopup, linkWithRedirect, multiFactor, onAuthStateChanged, onIdTokenChanged, parseActionCodeURL, provideAuth, reauthenticateWithCredential, reauthenticateWithPhoneNumber, reauthenticateWithPopup, reauthenticateWithRedirect, reload, revokeAccessToken, sendEmailVerification, sendPasswordResetEmail, sendSignInLinkToEmail, setPersistence, signInAnonymously, signInWithCredential, signInWithCustomToken, signInWithEmailAndPassword, signInWithEmailLink, signInWithPhoneNumber, signInWithPopup, signInWithRedirect, signOut, unlink, updateCurrentUser, updateEmail, updatePassword, updatePhoneNumber, updateProfile, useDeviceLanguage, user, validatePassword, verifyBeforeUpdateEmail, verifyPasswordResetCode };\n","import { onSnapshot, refEqual, getCountFromServer } from 'firebase/firestore';\nimport { Observable, from, pipe } from 'rxjs';\nimport { map, scan, distinctUntilChanged, filter, startWith, pairwise } from 'rxjs/operators';\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\n\nvar __assign = function () {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nfunction __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\ntypeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\n/**\n * @license\n * Copyright 2018 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar DEFAULT_OPTIONS = {\n includeMetadataChanges: false\n};\nfunction fromRef(ref, options) {\n if (options === void 0) {\n options = DEFAULT_OPTIONS;\n }\n /* eslint-enable @typescript-eslint/no-explicit-any */\n return new Observable(function (subscriber) {\n var unsubscribe = onSnapshot(ref, options, {\n next: subscriber.next.bind(subscriber),\n error: subscriber.error.bind(subscriber),\n complete: subscriber.complete.bind(subscriber)\n });\n return {\n unsubscribe: unsubscribe\n };\n });\n}\n\n/**\n * @license\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction doc(ref) {\n return fromRef(ref, {\n includeMetadataChanges: true\n });\n}\n/**\n * Returns a stream of a document, mapped to its data payload and optionally the document ID\n * @param query\n * @param options\n */\nfunction docData(ref, options) {\n if (options === void 0) {\n options = {};\n }\n return doc(ref).pipe(map(function (snap) {\n return snapToData(snap, options);\n }));\n}\nfunction snapToData(snapshot, options) {\n var _a;\n if (options === void 0) {\n options = {};\n }\n var data = snapshot.data(options);\n // match the behavior of the JS SDK when the snapshot doesn't exist\n // it's possible with data converters too that the user didn't return an object\n if (!snapshot.exists() || typeof data !== 'object' || data === null || !options.idField) {\n return data;\n }\n return __assign(__assign({}, data), (_a = {}, _a[options.idField] = snapshot.id, _a));\n}\n\n/**\n * @license\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar ALL_EVENTS = ['added', 'modified', 'removed'];\n/**\n * Create an operator that determines if a the stream of document changes\n * are specified by the event filter. If the document change type is not\n * in specified events array, it will not be emitted.\n */\nvar filterEvents = function (events) {\n return filter(function (changes) {\n var hasChange = false;\n for (var i = 0; i < changes.length; i++) {\n var change = changes[i];\n if (events && events.indexOf(change.type) >= 0) {\n hasChange = true;\n break;\n }\n }\n return hasChange;\n });\n};\n/**\n * Splice arguments on top of a sliced array, to break top-level ===\n * this is useful for change-detection\n */\nfunction sliceAndSplice(original, start, deleteCount) {\n var args = [];\n for (var _i = 3; _i < arguments.length; _i++) {\n args[_i - 3] = arguments[_i];\n }\n var returnArray = original.slice();\n returnArray.splice.apply(returnArray, __spreadArray([start, deleteCount], args, false));\n return returnArray;\n}\n/**\n * Creates a new sorted array from a new change.\n * @param combined\n * @param change\n */\nfunction processIndividualChange(combined, change) {\n switch (change.type) {\n case 'added':\n if (combined[change.newIndex] && refEqual(combined[change.newIndex].doc.ref, change.doc.ref)) ;else {\n return sliceAndSplice(combined, change.newIndex, 0, change);\n }\n break;\n case 'modified':\n if (combined[change.oldIndex] == null || refEqual(combined[change.oldIndex].doc.ref, change.doc.ref)) {\n // When an item changes position we first remove it\n // and then add it's new position\n if (change.oldIndex !== change.newIndex) {\n var copiedArray = combined.slice();\n copiedArray.splice(change.oldIndex, 1);\n copiedArray.splice(change.newIndex, 0, change);\n return copiedArray;\n } else {\n return sliceAndSplice(combined, change.newIndex, 1, change);\n }\n }\n break;\n case 'removed':\n if (combined[change.oldIndex] && refEqual(combined[change.oldIndex].doc.ref, change.doc.ref)) {\n return sliceAndSplice(combined, change.oldIndex, 1);\n }\n break;\n }\n return combined;\n}\n/**\n * Combines the total result set from the current set of changes from an incoming set\n * of changes.\n * @param current\n * @param changes\n * @param events\n */\nfunction processDocumentChanges(current, changes, events) {\n if (events === void 0) {\n events = ALL_EVENTS;\n }\n changes.forEach(function (change) {\n // skip unwanted change types\n if (events.indexOf(change.type) > -1) {\n current = processIndividualChange(current, change);\n }\n });\n return current;\n}\n/**\n * Create an operator that allows you to compare the current emission with\n * the prior, even on first emission (where prior is undefined).\n */\nvar windowwise = function () {\n return pipe(startWith(undefined), pairwise());\n};\n/**\n * Given two snapshots does their metadata match?\n * @param a\n * @param b\n */\nvar metaDataEquals = function (a, b) {\n return JSON.stringify(a.metadata) === JSON.stringify(b.metadata);\n};\n/**\n * Create an operator that filters out empty changes. We provide the\n * ability to filter on events, which means all changes can be filtered out.\n * This creates an empty array and would be incorrect to emit.\n */\nvar filterEmptyUnlessFirst = function () {\n return pipe(windowwise(), filter(function (_a) {\n var prior = _a[0],\n current = _a[1];\n return current.length > 0 || prior === undefined;\n }), map(function (_a) {\n var current = _a[1];\n return current;\n }));\n};\n/**\n * Return a stream of document changes on a query. These results are not in sort order but in\n * order of occurence.\n * @param query\n */\nfunction collectionChanges(query, options) {\n if (options === void 0) {\n options = {};\n }\n return fromRef(query, {\n includeMetadataChanges: true\n }).pipe(windowwise(), map(function (_a) {\n var priorSnapshot = _a[0],\n currentSnapshot = _a[1];\n var docChanges = currentSnapshot.docChanges();\n if (priorSnapshot && !metaDataEquals(priorSnapshot, currentSnapshot)) {\n // the metadata has changed, docChanges() doesn't return metadata events, so let's\n // do it ourselves by scanning over all the docs and seeing if the metadata has changed\n // since either this docChanges() emission or the prior snapshot\n currentSnapshot.docs.forEach(function (currentDocSnapshot, currentIndex) {\n var currentDocChange = docChanges.find(function (c) {\n return refEqual(c.doc.ref, currentDocSnapshot.ref);\n });\n if (currentDocChange) {\n // if the doc is in the current changes and the metadata hasn't changed this doc\n if (metaDataEquals(currentDocChange.doc, currentDocSnapshot)) {\n return;\n }\n } else {\n // if there is a prior doc and the metadata hasn't changed skip this doc\n var priorDocSnapshot = priorSnapshot === null || priorSnapshot === void 0 ? void 0 : priorSnapshot.docs.find(function (d) {\n return refEqual(d.ref, currentDocSnapshot.ref);\n });\n if (priorDocSnapshot && metaDataEquals(priorDocSnapshot, currentDocSnapshot)) {\n return;\n }\n }\n docChanges.push({\n oldIndex: currentIndex,\n newIndex: currentIndex,\n type: 'modified',\n doc: currentDocSnapshot\n });\n });\n }\n return docChanges;\n }), filterEvents(options.events || ALL_EVENTS), filterEmptyUnlessFirst());\n}\n/**\n * Return a stream of document snapshots on a query. These results are in sort order.\n * @param query\n */\nfunction collection(query) {\n return fromRef(query, {\n includeMetadataChanges: true\n }).pipe(map(function (changes) {\n return changes.docs;\n }));\n}\n/**\n * Return a stream of document changes on a query. These results are in sort order.\n * @param query\n */\nfunction sortedChanges(query, options) {\n if (options === void 0) {\n options = {};\n }\n return collectionChanges(query, options).pipe(scan(function (current, changes) {\n return processDocumentChanges(current, changes, options.events);\n }, []), distinctUntilChanged());\n}\n/**\n * Create a stream of changes as they occur it time. This method is similar\n * to docChanges() but it collects each event in an array over time.\n */\nfunction auditTrail(query, options) {\n if (options === void 0) {\n options = {};\n }\n return collectionChanges(query, options).pipe(scan(function (current, action) {\n return __spreadArray(__spreadArray([], current, true), action, true);\n }, []));\n}\n/**\n * Returns a stream of documents mapped to their data payload, and optionally the document ID\n * @param query\n * @param options\n */\nfunction collectionData(query, options) {\n if (options === void 0) {\n options = {};\n }\n return collection(query).pipe(map(function (arr) {\n return arr.map(function (snap) {\n return snapToData(snap, options);\n });\n }));\n}\nfunction collectionCountSnap(query) {\n return from(getCountFromServer(query));\n}\nfunction collectionCount(query) {\n return collectionCountSnap(query).pipe(map(function (snap) {\n return snap.data().count;\n }));\n}\nexport { auditTrail, collection, collectionChanges, collectionCount, collectionCountSnap, collectionData, doc, docData, fromRef, snapToData, sortedChanges };\n","import { ɵgetAllInstancesOf, ɵgetDefaultInstanceOf, VERSION, ɵAngularFireSchedulers, ɵAppCheckInstances, ɵzoneWrap } from '@angular/fire';\nimport { from, timer } from 'rxjs';\nimport { concatMap, distinct } from 'rxjs/operators';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, Optional, NgModule, NgZone, Injector } from '@angular/core';\nimport { FirebaseApp, FirebaseApps } from '@angular/fire/app';\nimport { AuthInstances } from '@angular/fire/auth';\nimport { registerVersion } from 'firebase/app';\nimport { collectionChanges as collectionChanges$1, collection as collection$1, sortedChanges as sortedChanges$1, auditTrail as auditTrail$1, collectionData as collectionData$1, collectionCountSnap as collectionCountSnap$1, collectionCount as collectionCount$1, doc as doc$1, docData as docData$1, snapToData as snapToData$1, fromRef as fromRef$1 } from 'rxfire/firestore';\nimport { addDoc as addDoc$1, aggregateFieldEqual as aggregateFieldEqual$1, aggregateQuerySnapshotEqual as aggregateQuerySnapshotEqual$1, and as and$1, arrayRemove as arrayRemove$1, arrayUnion as arrayUnion$1, average as average$1, clearIndexedDbPersistence as clearIndexedDbPersistence$1, collection as collection$2, collectionGroup as collectionGroup$1, connectFirestoreEmulator as connectFirestoreEmulator$1, count as count$1, deleteAllPersistentCacheIndexes as deleteAllPersistentCacheIndexes$1, deleteDoc as deleteDoc$1, deleteField as deleteField$1, disableNetwork as disableNetwork$1, disablePersistentCacheIndexAutoCreation as disablePersistentCacheIndexAutoCreation$1, doc as doc$2, documentId as documentId$1, enableIndexedDbPersistence as enableIndexedDbPersistence$1, enableMultiTabIndexedDbPersistence as enableMultiTabIndexedDbPersistence$1, enableNetwork as enableNetwork$1, enablePersistentCacheIndexAutoCreation as enablePersistentCacheIndexAutoCreation$1, endAt as endAt$1, endBefore as endBefore$1, getAggregateFromServer as getAggregateFromServer$1, getCountFromServer as getCountFromServer$1, getDoc as getDoc$1, getDocFromCache as getDocFromCache$1, getDocFromServer as getDocFromServer$1, getDocs as getDocs$1, getDocsFromCache as getDocsFromCache$1, getDocsFromServer as getDocsFromServer$1, getFirestore as getFirestore$1, getPersistentCacheIndexManager as getPersistentCacheIndexManager$1, increment as increment$1, initializeFirestore as initializeFirestore$1, limit as limit$1, limitToLast as limitToLast$1, loadBundle as loadBundle$1, memoryEagerGarbageCollector as memoryEagerGarbageCollector$1, memoryLocalCache as memoryLocalCache$1, memoryLruGarbageCollector as memoryLruGarbageCollector$1, namedQuery as namedQuery$1, onSnapshot as onSnapshot$1, onSnapshotsInSync as onSnapshotsInSync$1, or as or$1, orderBy as orderBy$1, persistentLocalCache as persistentLocalCache$1, persistentMultipleTabManager as persistentMultipleTabManager$1, persistentSingleTabManager as persistentSingleTabManager$1, query as query$1, queryEqual as queryEqual$1, refEqual as refEqual$1, runTransaction as runTransaction$1, serverTimestamp as serverTimestamp$1, setDoc as setDoc$1, setIndexConfiguration as setIndexConfiguration$1, setLogLevel as setLogLevel$1, snapshotEqual as snapshotEqual$1, startAfter as startAfter$1, startAt as startAt$1, sum as sum$1, terminate as terminate$1, updateDoc as updateDoc$1, waitForPendingWrites as waitForPendingWrites$1, where as where$1, writeBatch as writeBatch$1 } from 'firebase/firestore';\nexport * from 'firebase/firestore';\nclass Firestore {\n constructor(firestore) {\n return firestore;\n }\n}\nconst FIRESTORE_PROVIDER_NAME = 'firestore';\nclass FirestoreInstances {\n constructor() {\n return ɵgetAllInstancesOf(FIRESTORE_PROVIDER_NAME);\n }\n}\nconst firestoreInstance$ = /*#__PURE__*/ /*#__PURE__*/timer(0, 300).pipe( /*#__PURE__*/concatMap(() => from(ɵgetAllInstancesOf(FIRESTORE_PROVIDER_NAME))), /*#__PURE__*/distinct());\nconst PROVIDED_FIRESTORE_INSTANCES = /*#__PURE__*/new InjectionToken('angularfire2.firestore-instances');\nfunction defaultFirestoreInstanceFactory(provided, defaultApp) {\n const defaultFirestore = ɵgetDefaultInstanceOf(FIRESTORE_PROVIDER_NAME, provided, defaultApp);\n return defaultFirestore && new Firestore(defaultFirestore);\n}\nfunction firestoreInstanceFactory(fn) {\n return (zone, injector) => {\n const firestore = zone.runOutsideAngular(() => fn(injector));\n return new Firestore(firestore);\n };\n}\nconst FIRESTORE_INSTANCES_PROVIDER = {\n provide: FirestoreInstances,\n deps: [[/*#__PURE__*/new Optional(), PROVIDED_FIRESTORE_INSTANCES]]\n};\nconst DEFAULT_FIRESTORE_INSTANCE_PROVIDER = {\n provide: Firestore,\n useFactory: defaultFirestoreInstanceFactory,\n deps: [[/*#__PURE__*/new Optional(), PROVIDED_FIRESTORE_INSTANCES], FirebaseApp]\n};\nlet FirestoreModule = /*#__PURE__*/(() => {\n class FirestoreModule {\n constructor() {\n registerVersion('angularfire', VERSION.full, 'fst');\n }\n static ɵfac = function FirestoreModule_Factory(t) {\n return new (t || FirestoreModule)();\n };\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: FirestoreModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [DEFAULT_FIRESTORE_INSTANCE_PROVIDER, FIRESTORE_INSTANCES_PROVIDER]\n });\n }\n return FirestoreModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction provideFirestore(fn, ...deps) {\n return {\n ngModule: FirestoreModule,\n providers: [{\n provide: PROVIDED_FIRESTORE_INSTANCES,\n useFactory: firestoreInstanceFactory(fn),\n multi: true,\n deps: [NgZone, Injector, ɵAngularFireSchedulers, FirebaseApps,\n // Firestore+Auth work better if Auth is loaded first\n [new Optional(), AuthInstances], [new Optional(), ɵAppCheckInstances], ...deps]\n }]\n };\n}\n\n// DO NOT MODIFY, this file is autogenerated by tools/build.ts\nconst collectionChanges = /*#__PURE__*/ɵzoneWrap(collectionChanges$1, true);\nconst collectionSnapshots = /*#__PURE__*/ɵzoneWrap(collection$1, true);\nconst sortedChanges = /*#__PURE__*/ɵzoneWrap(sortedChanges$1, true);\nconst auditTrail = /*#__PURE__*/ɵzoneWrap(auditTrail$1, true);\nconst collectionData = /*#__PURE__*/ɵzoneWrap(collectionData$1, true);\nconst collectionCountSnap = /*#__PURE__*/ɵzoneWrap(collectionCountSnap$1, true);\nconst collectionCount = /*#__PURE__*/ɵzoneWrap(collectionCount$1, true);\nconst docSnapshots = /*#__PURE__*/ɵzoneWrap(doc$1, true);\nconst docData = /*#__PURE__*/ɵzoneWrap(docData$1, true);\nconst snapToData = /*#__PURE__*/ɵzoneWrap(snapToData$1, true);\nconst fromRef = /*#__PURE__*/ɵzoneWrap(fromRef$1, true);\n\n// DO NOT MODIFY, this file is autogenerated by tools/build.ts\nconst addDoc = /*#__PURE__*/ɵzoneWrap(addDoc$1, true);\nconst aggregateFieldEqual = /*#__PURE__*/ɵzoneWrap(aggregateFieldEqual$1, true);\nconst aggregateQuerySnapshotEqual = /*#__PURE__*/ɵzoneWrap(aggregateQuerySnapshotEqual$1, true);\nconst and = /*#__PURE__*/ɵzoneWrap(and$1, true);\nconst arrayRemove = /*#__PURE__*/ɵzoneWrap(arrayRemove$1, true);\nconst arrayUnion = /*#__PURE__*/ɵzoneWrap(arrayUnion$1, true);\nconst average = /*#__PURE__*/ɵzoneWrap(average$1, true);\nconst clearIndexedDbPersistence = /*#__PURE__*/ɵzoneWrap(clearIndexedDbPersistence$1, true);\nconst collection = /*#__PURE__*/ɵzoneWrap(collection$2, true);\nconst collectionGroup = /*#__PURE__*/ɵzoneWrap(collectionGroup$1, true);\nconst connectFirestoreEmulator = /*#__PURE__*/ɵzoneWrap(connectFirestoreEmulator$1, true);\nconst count = /*#__PURE__*/ɵzoneWrap(count$1, true);\nconst deleteAllPersistentCacheIndexes = /*#__PURE__*/ɵzoneWrap(deleteAllPersistentCacheIndexes$1, true);\nconst deleteDoc = /*#__PURE__*/ɵzoneWrap(deleteDoc$1, true);\nconst deleteField = /*#__PURE__*/ɵzoneWrap(deleteField$1, true);\nconst disableNetwork = /*#__PURE__*/ɵzoneWrap(disableNetwork$1, true);\nconst disablePersistentCacheIndexAutoCreation = /*#__PURE__*/ɵzoneWrap(disablePersistentCacheIndexAutoCreation$1, true);\nconst doc = /*#__PURE__*/ɵzoneWrap(doc$2, true);\nconst documentId = /*#__PURE__*/ɵzoneWrap(documentId$1, true);\nconst enableIndexedDbPersistence = /*#__PURE__*/ɵzoneWrap(enableIndexedDbPersistence$1, true);\nconst enableMultiTabIndexedDbPersistence = /*#__PURE__*/ɵzoneWrap(enableMultiTabIndexedDbPersistence$1, true);\nconst enableNetwork = /*#__PURE__*/ɵzoneWrap(enableNetwork$1, true);\nconst enablePersistentCacheIndexAutoCreation = /*#__PURE__*/ɵzoneWrap(enablePersistentCacheIndexAutoCreation$1, true);\nconst endAt = /*#__PURE__*/ɵzoneWrap(endAt$1, true);\nconst endBefore = /*#__PURE__*/ɵzoneWrap(endBefore$1, true);\nconst getAggregateFromServer = /*#__PURE__*/ɵzoneWrap(getAggregateFromServer$1, true);\nconst getCountFromServer = /*#__PURE__*/ɵzoneWrap(getCountFromServer$1, true);\nconst getDoc = /*#__PURE__*/ɵzoneWrap(getDoc$1, true);\nconst getDocFromCache = /*#__PURE__*/ɵzoneWrap(getDocFromCache$1, true);\nconst getDocFromServer = /*#__PURE__*/ɵzoneWrap(getDocFromServer$1, true);\nconst getDocs = /*#__PURE__*/ɵzoneWrap(getDocs$1, true);\nconst getDocsFromCache = /*#__PURE__*/ɵzoneWrap(getDocsFromCache$1, true);\nconst getDocsFromServer = /*#__PURE__*/ɵzoneWrap(getDocsFromServer$1, true);\nconst getFirestore = /*#__PURE__*/ɵzoneWrap(getFirestore$1, true);\nconst getPersistentCacheIndexManager = /*#__PURE__*/ɵzoneWrap(getPersistentCacheIndexManager$1, true);\nconst increment = /*#__PURE__*/ɵzoneWrap(increment$1, true);\nconst initializeFirestore = /*#__PURE__*/ɵzoneWrap(initializeFirestore$1, true);\nconst limit = /*#__PURE__*/ɵzoneWrap(limit$1, true);\nconst limitToLast = /*#__PURE__*/ɵzoneWrap(limitToLast$1, true);\nconst loadBundle = /*#__PURE__*/ɵzoneWrap(loadBundle$1, true);\nconst memoryEagerGarbageCollector = /*#__PURE__*/ɵzoneWrap(memoryEagerGarbageCollector$1, true);\nconst memoryLocalCache = /*#__PURE__*/ɵzoneWrap(memoryLocalCache$1, true);\nconst memoryLruGarbageCollector = /*#__PURE__*/ɵzoneWrap(memoryLruGarbageCollector$1, true);\nconst namedQuery = /*#__PURE__*/ɵzoneWrap(namedQuery$1, true);\nconst onSnapshot = /*#__PURE__*/ɵzoneWrap(onSnapshot$1, true);\nconst onSnapshotsInSync = /*#__PURE__*/ɵzoneWrap(onSnapshotsInSync$1, true);\nconst or = /*#__PURE__*/ɵzoneWrap(or$1, true);\nconst orderBy = /*#__PURE__*/ɵzoneWrap(orderBy$1, true);\nconst persistentLocalCache = /*#__PURE__*/ɵzoneWrap(persistentLocalCache$1, true);\nconst persistentMultipleTabManager = /*#__PURE__*/ɵzoneWrap(persistentMultipleTabManager$1, true);\nconst persistentSingleTabManager = /*#__PURE__*/ɵzoneWrap(persistentSingleTabManager$1, true);\nconst query = /*#__PURE__*/ɵzoneWrap(query$1, true);\nconst queryEqual = /*#__PURE__*/ɵzoneWrap(queryEqual$1, true);\nconst refEqual = /*#__PURE__*/ɵzoneWrap(refEqual$1, true);\nconst runTransaction = /*#__PURE__*/ɵzoneWrap(runTransaction$1, true);\nconst serverTimestamp = /*#__PURE__*/ɵzoneWrap(serverTimestamp$1, true);\nconst setDoc = /*#__PURE__*/ɵzoneWrap(setDoc$1, true);\nconst setIndexConfiguration = /*#__PURE__*/ɵzoneWrap(setIndexConfiguration$1, true);\nconst setLogLevel = /*#__PURE__*/ɵzoneWrap(setLogLevel$1, true);\nconst snapshotEqual = /*#__PURE__*/ɵzoneWrap(snapshotEqual$1, true);\nconst startAfter = /*#__PURE__*/ɵzoneWrap(startAfter$1, true);\nconst startAt = /*#__PURE__*/ɵzoneWrap(startAt$1, true);\nconst sum = /*#__PURE__*/ɵzoneWrap(sum$1, true);\nconst terminate = /*#__PURE__*/ɵzoneWrap(terminate$1, true);\nconst updateDoc = /*#__PURE__*/ɵzoneWrap(updateDoc$1, true);\nconst waitForPendingWrites = /*#__PURE__*/ɵzoneWrap(waitForPendingWrites$1, true);\nconst where = /*#__PURE__*/ɵzoneWrap(where$1, true);\nconst writeBatch = /*#__PURE__*/ɵzoneWrap(writeBatch$1, true);\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { Firestore, FirestoreInstances, FirestoreModule, addDoc, aggregateFieldEqual, aggregateQuerySnapshotEqual, and, arrayRemove, arrayUnion, auditTrail, average, clearIndexedDbPersistence, collection, collectionChanges, collectionCount, collectionCountSnap, collectionData, collectionGroup, collectionSnapshots, connectFirestoreEmulator, count, deleteAllPersistentCacheIndexes, deleteDoc, deleteField, disableNetwork, disablePersistentCacheIndexAutoCreation, doc, docData, docSnapshots, documentId, enableIndexedDbPersistence, enableMultiTabIndexedDbPersistence, enableNetwork, enablePersistentCacheIndexAutoCreation, endAt, endBefore, firestoreInstance$, fromRef, getAggregateFromServer, getCountFromServer, getDoc, getDocFromCache, getDocFromServer, getDocs, getDocsFromCache, getDocsFromServer, getFirestore, getPersistentCacheIndexManager, increment, initializeFirestore, limit, limitToLast, loadBundle, memoryEagerGarbageCollector, memoryLocalCache, memoryLruGarbageCollector, namedQuery, onSnapshot, onSnapshotsInSync, or, orderBy, persistentLocalCache, persistentMultipleTabManager, persistentSingleTabManager, provideFirestore, query, queryEqual, refEqual, runTransaction, serverTimestamp, setDoc, setIndexConfiguration, setLogLevel, snapToData, snapshotEqual, sortedChanges, startAfter, startAt, sum, terminate, updateDoc, waitForPendingWrites, where, writeBatch };\n","import { Injectable } from '@angular/core';\nimport { Environment } from '@galaxy/core';\nimport { Realtime } from './interface';\nimport { query, collection, Query, Firestore } from 'firebase/firestore';\n\n@Injectable()\nexport class FirestoreDB implements Realtime {\n newChangeQuery(firestore: Firestore, env: Environment, email: string): Query {\n const environment = env === Environment.PROD ? 'prod' : 'demo';\n // firebase requires this to be something, however we can subscribe to a value change of an unknown document.\n email = email || '(unknown)';\n\n return query(collection(firestore, `env/${environment}/user/${email}/notification`)) as Query;\n }\n}\n","import { NotificationMedium, NotificationSetting } from '@vendasta/notifications-sdk';\n\nexport interface Notification {\n partnerId: string;\n marketId?: string;\n accountGroupId?: string;\n id: string;\n notificationTypeId: string;\n body: string;\n eventTime: Date;\n link: string; // TODO: Handle single page links\n viewed: boolean;\n followed: boolean;\n}\n\nexport function getSettingFromNotification(\n notification: Notification,\n settings: Array,\n medium?: NotificationMedium,\n): NotificationSetting {\n if (!notification) {\n return null;\n }\n if (!medium) {\n medium = NotificationMedium.NOTIFICATION_MEDIUM_WEB;\n }\n const settingsOfType = settings.filter((setting) => setting.notificationTypeId === notification.notificationTypeId);\n\n let accountGroupSetting: NotificationSetting;\n let marketSetting: NotificationSetting;\n let partnerSetting: NotificationSetting;\n settingsOfType.forEach((setting) => {\n if (setting.notificationMedium !== medium) {\n return;\n }\n // Check if this is an account group level setting\n if (\n notification.accountGroupId &&\n setting.context &&\n setting.context.accountGroup &&\n setting.context.accountGroup.accountGroupId === notification.accountGroupId\n ) {\n accountGroupSetting = setting;\n return;\n }\n if (notification.partnerId) {\n // Check if this is a market level setting\n if (\n notification.marketId &&\n setting.context &&\n setting.context.partner &&\n setting.context.partner.partnerId === notification.partnerId\n ) {\n marketSetting = setting;\n return;\n }\n // Check if this is a partner level setting\n if (setting.context && setting.context.partner && setting.context.partner.partnerId === notification.partnerId) {\n partnerSetting = setting;\n return;\n }\n }\n });\n return accountGroupSetting || marketSetting || partnerSetting || null;\n}\n","export enum SubscriptionState {\n Subscribe = 'subscribe',\n Unsubscribe = 'unsubscribe',\n}\n","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { NotificationSetting, NotificationStatus } from '@vendasta/notifications-sdk';\nimport { formatDistanceToNow } from 'date-fns';\nimport { Notification } from '../notification';\nimport { SubscriptionState } from '../subscription-state';\n\n@Component({\n selector: 'atlas-notification',\n templateUrl: './notification.component.html',\n styleUrls: ['./notification.component.scss', '../../common.scss'],\n})\nexport class NotificationComponent implements OnInit {\n @Input() notification: Notification;\n @Input() setting: NotificationSetting;\n @Input() visible: boolean;\n @Input() showContext: boolean;\n @Input() rollback: SubscriptionState = null;\n @Input() last: boolean;\n\n @Output() unsubscribe: EventEmitter = new EventEmitter();\n @Output() subscribe: EventEmitter = new EventEmitter();\n\n @Output() onclick: EventEmitter = new EventEmitter();\n @Output() read: EventEmitter = new EventEmitter();\n @Output() unread: EventEmitter = new EventEmitter();\n @Output() hover: EventEmitter = new EventEmitter();\n @Output() undo: EventEmitter = new EventEmitter();\n\n SubscriptionStatus = NotificationStatus;\n\n isHovering = false;\n menuOpen = false;\n relativeTime: string;\n body: string;\n target = '_self';\n\n ngOnInit(): void {\n this.relativeTime = formatDistanceToNow(this.notification.eventTime, { addSuffix: true });\n this.body = this.notification.body.trim();\n\n const host = window.location.hostname;\n const parser = document.createElement('a');\n parser.href = this.notification.link;\n this.target = host === parser.host ? '_self' : '_blank';\n }\n\n getDisplayContext(): string {\n return this.notification.partnerId;\n }\n\n getColorForValue(value: string): string {\n // determine an icon color based on a value\n const COLOR_CODES = [\n '#EF5350',\n '#42A5F5',\n '#66BB6A',\n '#FFA726',\n '#AB47BC',\n '#FFCA28',\n '#EC407A',\n '#26C6DA',\n '#FF7B57',\n ];\n let nameSum = 0;\n if (!value) {\n return '#808080';\n }\n for (let i = 0; i < value.length; i++) {\n nameSum += value[i].charCodeAt(0);\n }\n const index = nameSum % COLOR_CODES.length;\n\n return COLOR_CODES[index];\n }\n\n onHover(): void {\n this.hover.emit();\n this.isHovering = true;\n }\n\n onLeave(): void {\n this.isHovering = false;\n }\n\n markAsRead(): void {\n this.read.emit(this.notification.id);\n }\n\n markAsUnread(): void {\n this.unread.emit(this.notification.id);\n }\n\n clickNotification(): void {\n this.onclick.emit();\n }\n\n emitUndo(): void {\n this.undo.emit(this.notification);\n }\n\n unsubscribeFrom(): void {\n this.unsubscribe.emit(this.notification);\n }\n\n subscribeTo(): void {\n this.subscribe.emit(this.notification);\n }\n}\n","\n \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    {{ relativeTime }}
    \n \n {{ getDisplayContext() }}\n \n
    \n
    \n
    \n
    \n
    \n
    \n \n \n \n \n \n \n \n \n \n
    \n
    \n\n\n
    \n {{ 'NOTIFICATIONS.UNSUBSCRIBE_TEXT' | translate }}\n
    \n
    \n {{ 'NOTIFICATIONS.SUBSCRIBE_TEXT' | translate }}\n
    \n
    \n \n {{ 'NOTIFICATIONS.ACTIONS.UNDO' | translate }}\n \n
    \n\n","import { Component, EventEmitter, Output } from '@angular/core';\nimport { ModalService } from '../../core-components/modal/modal.service';\nimport { AtlasMenuService } from '../../menu/menu.service';\nimport { SettingsComponent } from '../settings/settings.component';\n\n@Component({\n selector: 'atlas-flyout',\n templateUrl: './flyout.component.html',\n styleUrls: ['./flyout.component.scss'],\n})\nexport class FlyoutComponent {\n @Output() markAllAsFollowed: EventEmitter = new EventEmitter();\n\n constructor(private menuService: AtlasMenuService, private modalService: ModalService) {}\n\n close(): void {\n this.menuService.closeMenu('');\n }\n\n markAllAsFollowedEvent(): void {\n this.markAllAsFollowed.emit();\n }\n\n openSettings(): void {\n this.modalService.openList(SettingsComponent);\n }\n}\n","
    \n
    \n {{ 'NOTIFICATIONS.TITLE' | translate }}\n
    \n
    \n \n settings\n \n \n drafts\n \n \n
    \n
    \n
    \n \n
    \n","import { Component, Input, OnInit, inject } from '@angular/core';\nimport { Title } from '@angular/platform-browser';\nimport { BehaviorSubject, Observable, Subscription, combineLatest, of } from 'rxjs';\nimport {\n buffer,\n catchError,\n filter,\n map,\n shareReplay,\n startWith,\n switchMap,\n take,\n takeWhile,\n tap,\n} from 'rxjs/operators';\n\nimport { FirestoreInstances } from '@angular/fire/firestore';\nimport { EnvironmentService } from '@galaxy/core';\nimport { NotificationMedium, NotificationSetting } from '@vendasta/notifications-sdk';\nimport { onSnapshot } from 'firebase/firestore';\nimport { FirestoreDB } from '../realtime/firestore';\nimport { Notification, getSettingFromNotification } from './notification';\nimport { NotificationsService } from './notifications.service';\nimport { SubscriptionState } from './subscription-state';\n\nconst getFirestore = (name: string) => {\n const fsi = inject(FirestoreInstances);\n return fsi.find((fs) => fs.app.name === name);\n};\n\n@Component({\n selector: 'atlas-notifications',\n templateUrl: './notifications.component.html',\n styleUrls: ['./notifications.component.scss'],\n})\nexport class NotificationsComponent implements OnInit {\n // Will show a badge beside each notification indicating which partner it came from.\n // This should only be turned on for users with access to multiple partners (like superusers).\n @Input() showContext: boolean;\n // This field should be provided on init, and updates to this field will not trigger data fetching\n @Input() partnerId: string;\n @Input() userId: string;\n\n public SubscriptionState = SubscriptionState;\n public notificationsBuffer$$: BehaviorSubject = new BehaviorSubject(null);\n public error$: Observable;\n public unviewed$: Observable;\n private open$$: BehaviorSubject = new BehaviorSubject(false);\n // This forces the notifications to reload if an action has been taken, such as marking as viewed, or following a link.\n private reload$$: BehaviorSubject = new BehaviorSubject(true);\n // Force the settings to update once they are modified by the user.\n private reloadSettings$$: BehaviorSubject = new BehaviorSubject(true);\n private settings$: Observable>;\n public settingsByNotification$: Observable>;\n private settingRollbackStates$$: BehaviorSubject<{ [key: string]: SubscriptionState }> = new BehaviorSubject({});\n private titleReg = /^\\((\\d+\\+?)\\)\\s/;\n private subscriptions: Subscription[] = [];\n private firestore = getFirestore('notifications');\n\n constructor(\n private notificationsService: NotificationsService,\n private envService: EnvironmentService,\n private titleService: Title,\n private readonly realtime: FirestoreDB,\n ) {\n this.settings$ = this.reloadSettings$$.pipe(\n switchMap(() => this.notificationsService.settings$(this.partnerId)),\n catchError(() => of([])),\n );\n this.settingsByNotification$ = combineLatest([this.notificationsBuffer$$, this.settings$]).pipe(\n map(([notifications, settings]) => {\n const settingsMap = {};\n notifications.forEach((notification) => {\n settingsMap[notification.id] = getSettingFromNotification(notification, settings);\n });\n return settingsMap;\n }),\n );\n }\n\n ngOnInit(): void {\n const collectionUpdateQuery = this.realtime.newChangeQuery(\n this.firestore,\n this.envService.getEnvironment(),\n this.userId,\n );\n\n const collectionUpdated$ = new Observable((observer) => {\n const unsubscribe = onSnapshot(\n collectionUpdateQuery,\n (snapshot) => {\n const data = snapshot.docs.map((doc) => doc.data());\n observer.next(data);\n },\n (error) => {\n console.warn('Error loading realtime notifications', error), observer.error(error);\n },\n );\n return () => unsubscribe();\n });\n\n const loadNotifications$ = combineLatest([collectionUpdated$, this.reload$$]).pipe(\n switchMap(() =>\n this.notificationsService.loadNotifications$(\n this.partnerId,\n null,\n null,\n false,\n NotificationMedium.NOTIFICATION_MEDIUM_WEB,\n ),\n ),\n filter((resp) => !!resp && !!resp.notifications),\n map((resp) => resp.notifications),\n shareReplay(1),\n );\n\n const flushBuffer$ = this.open$$.pipe(filter((open) => open));\n const notifications$ = loadNotifications$.pipe(\n buffer(flushBuffer$),\n filter((buf) => buf.length > 0),\n map((buf) => buf[buf.length - 1]),\n tap((notifications) => this.notificationsBuffer$$.next(notifications)),\n );\n this.error$ = loadNotifications$.pipe(\n startWith(false),\n map(() => false),\n catchError(() => of(true)),\n );\n this.unviewed$ = loadNotifications$.pipe(\n map((notifications) => notifications.filter((n) => !n.viewed).length),\n tap((count) => this.setUnviewedTitle(count)),\n );\n\n // We need to populate the notifications maually the first time, otherwise if the user opens the tray before the\n // loading is compelete, the response will be buffered and they will only see a spinner until they close and reopen\n loadNotifications$.pipe(take(1)).subscribe((notifications) => this.notificationsBuffer$$.next(notifications));\n // Subscribing to this keeps the notifications updated in the background.\n this.subscriptions.push(notifications$.subscribe());\n }\n\n public open(): void {\n this.open$$.next(true);\n this.markNotificationsAsViewed();\n }\n\n public close(): void {\n this.open$$.next(false);\n this.settingRollbackStates$$.next({});\n }\n\n private markNotificationsAsViewed(): void {\n this.notificationsBuffer$$\n .pipe(\n filter((notifications) => !!notifications),\n take(1),\n map((notifications) => notifications.filter((n) => !n.viewed)),\n map((notifications) => notifications.map((n) => n.id)),\n takeWhile((ids) => ids.length > 0),\n switchMap((ids) => this.notificationsService.viewed$(this.partnerId, ids)),\n tap(() => this.reload$$.next(true)),\n )\n .subscribe();\n }\n\n public getRollbackState(notification: Notification): Observable {\n return this.settingRollbackStates$$.pipe(\n map((states) => {\n return states[notification.id] || null;\n }),\n );\n }\n\n public follow(notification: Notification): void {\n if (!notification.followed) {\n this.setFollowed(notification.id, true);\n }\n }\n\n public setFollowed(notificationId: string, followed: boolean): void {\n this.notificationsService\n .followed$(this.partnerId, [notificationId], followed)\n .pipe(\n switchMap(() => this.notificationsBuffer$$),\n take(1),\n map((notifications) => {\n notifications.find((n) => n.id === notificationId).followed = followed;\n return notifications;\n }),\n tap((notifications) => this.notificationsBuffer$$.next(notifications)),\n )\n .subscribe(() => this.reload$$.next(true));\n }\n\n public updateSubscription(notificationId: string, setting: NotificationSetting, newState: SubscriptionState): void {\n this.setSubscriptionState(setting, newState)\n .pipe(\n switchMap(() => this.settingRollbackStates$$),\n catchError(() => of(null)),\n take(1),\n takeWhile((result) => result !== null),\n map((rollbackState) => ({\n ...rollbackState,\n [notificationId]:\n newState === SubscriptionState.Subscribe ? SubscriptionState.Unsubscribe : SubscriptionState.Subscribe,\n })),\n tap((rollbackState) => this.settingRollbackStates$$.next(rollbackState)),\n tap(() => this.reloadSettings$$.next(true)),\n )\n .subscribe();\n }\n\n public undo(notificationId: string, notificationSetting: NotificationSetting): void {\n this.settingRollbackStates$$\n .pipe(\n take(1),\n switchMap((state) => this.setSubscriptionState(notificationSetting, state[notificationId])),\n switchMap(() => this.settingRollbackStates$$),\n take(1),\n map((state) => {\n delete state[notificationId];\n return state;\n }),\n tap((state) => this.settingRollbackStates$$.next(state)),\n tap(() => this.reloadSettings$$.next(true)),\n )\n .subscribe();\n }\n\n private setSubscriptionState(\n setting: NotificationSetting,\n newState: SubscriptionState,\n ): Observable> {\n if (newState === SubscriptionState.Subscribe) {\n return this.notificationsService.subscribe$(this.partnerId, setting);\n } else {\n return this.notificationsService.unsubscribe$(this.partnerId, setting);\n }\n }\n\n private setUnviewedTitle(count: number): void {\n const title = this.titleService.getTitle();\n const matches = title.match(this.titleReg);\n if (!matches && count > 0) {\n this.titleService.setTitle('(' + count + ') ' + this.titleService.getTitle());\n return;\n }\n if (!!matches && matches.length > 1 && parseInt(matches[1], 10) !== count) {\n let replacement = '';\n if (count > 0) {\n replacement = '(' + count + ') ';\n }\n this.titleService.setTitle(title.replace(this.titleReg, replacement));\n }\n }\n\n public markAllAsFollowed(): void {\n this.notificationsBuffer$$\n .pipe(\n take(1),\n filter((notifications) => !!notifications),\n map((notifications) => notifications.filter((n) => !n.followed)),\n map((notifications) => notifications.map((n) => n.id)),\n takeWhile((ids) => ids.length > 0),\n switchMap((ids) => this.notificationsService.followed$(this.partnerId, ids, true)),\n switchMap(() => this.notificationsBuffer$$),\n take(1),\n map((notifications) => {\n notifications.map((n) => (n.followed = true));\n return notifications;\n }),\n tap((notifications) => this.notificationsBuffer$$.next(notifications)),\n )\n .subscribe(() => this.reload$$.next(true));\n }\n}\n","\n \n \n \n
    \n {{ 'NOTIFICATIONS.NO_NOTIFICATIONS' | translate }}\n
    \n 0\">\n \n \n \n \n \n \n
    \n
    \n
    \n
    \n\n\n
    \n {{ 'NOTIFICATIONS.LOAD_FAILURE' | translate }}\n
    \n
    \n \n
    \n
    \n","import { Component } from '@angular/core';\nimport { AtlasDataService } from '../../../core/src';\nimport { UserSwitcherData } from '@vendasta/atlas';\nimport { Observable } from 'rxjs';\nimport { MatDialogRef } from '@angular/material/dialog';\n\n@Component({\n selector: 'atlas-user-switcher-modal',\n templateUrl: './user-switcher-modal.component.html',\n styleUrl: './user-switcher-modal.component.scss',\n})\nexport class UserSwitcherModalComponent {\n constructor(private dataService: AtlasDataService, private dialogRef: MatDialogRef) {}\n\n userData$: Observable = this.dataService.userSwitcherData$;\n\n closeDialog(): void {\n this.dialogRef.close();\n }\n}\n","\n {{ 'DROPDOWN_MENU.SWITCH_USER' | translate }}\n \n \n \n
    \n
    \n {{ user.partnerName }}\n
    \n
    \n {{ user.partnerId }}\n
    \n
    \n
    \n
    \n
    \n \n \n \n
    \n","import { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { AtlasDataService, AtlasLanguageService, Language, LanguageMap, LanguageMapping } from '../../../core/src';\nimport { TranslateService } from '@ngx-translate/core';\nimport { UserNavigationItem, UserSwitcherData } from '@vendasta/atlas';\nimport { combineLatest, Observable } from 'rxjs';\nimport { map, shareReplay, withLatestFrom } from 'rxjs/operators';\nimport { ModalService } from '../core-components/modal/modal.service';\nimport { AtlasLanguageSelectorModalComponent } from '../language-selector/modal/language-selector-modal.component';\nimport { CustomUserDropdownItem } from './user-dropdown.interface';\nimport { UserSwitcherModalComponent } from '../user-switcher-modal/user-switcher-modal.component';\n\n@Component({\n selector: 'atlas-user-dropdown',\n templateUrl: './user-dropdown.component.html',\n styleUrls: ['./user-dropdown.component.scss'],\n})\nexport class UserDropdownComponent {\n @Input() username: string;\n @Input() impersonateeUsername: string;\n @Input() email: string;\n @Input() emailVerified: boolean;\n @Input() signOutUrl?: string;\n @Input() menuItems: UserNavigationItem[];\n @Input() extraMenuItems?: CustomUserDropdownItem[];\n @Input() showLanguageSelector?: boolean;\n @Input() userSwitcherData?: UserSwitcherData[];\n @Input() partnerName?: string;\n @Output() event: EventEmitter = new EventEmitter();\n currentLanguage$: Observable;\n languages: LanguageMapping[] = LanguageMap;\n languageLabel$: Observable;\n\n constructor(\n private languageService: AtlasLanguageService,\n private translateService: TranslateService,\n public apiService: AtlasDataService,\n private modalService: ModalService,\n ) {\n this.currentLanguage$ = combineLatest([this.languageService.language$, this.languageService.languageList$]).pipe(\n map(([currentLang, languageList]: [Language, LanguageMapping[]]) => {\n // toLowerCase to prevent miss matching between fr-CA with fr-ca\n const currentLangLower = currentLang.toLowerCase();\n return languageList?.find((l) => l.code.toLowerCase() === currentLangLower) || null;\n }),\n shareReplay({ bufferSize: 1, refCount: true }),\n );\n this.languageLabel$ = combineLatest([this.currentLanguage$, this.translateService.stream('LANGUAGE')]).pipe(\n withLatestFrom(this.languageService.language$),\n map(([[language, translations], fallbackCode]) => {\n if (language !== null) {\n return translations[language.code.toLowerCase()] || language.label;\n } else {\n return translations[fallbackCode];\n }\n }),\n );\n }\n\n // If a callback is provided, perform it. Otherwise navigate to the url provided.\n itemClick(menuItem: CustomUserDropdownItem): void {\n if (menuItem.callback) {\n menuItem.callback();\n } else if (menuItem.eventId) {\n this.event.emit(menuItem.eventId);\n }\n }\n\n setLanguage(language: LanguageMapping): void {\n const updateConfig = this.email && !this.impersonateeUsername;\n this.languageService.setLanguage(language.code, updateConfig);\n }\n\n intercept(event: Event): void {\n event.stopPropagation();\n }\n\n showSwitchLanguageDialog(): void {\n this.modalService.openList(AtlasLanguageSelectorModalComponent);\n }\n\n openUserSwitcher(): void {\n this.modalService.openInformational(UserSwitcherModalComponent);\n }\n}\n","\n \n \n \n {{ username }}\n arrow_drop_down\n \n \n \n \n
    \n
    {{ username }} as
    \n
    \n {{ impersonateeUsername }}\n
    \n
    \n arrow_drop_down\n
    \n
    \n
    \n \n \n \n person\n \n \n people_alt\n \n \n \n \n
    \n
    \n \n
    \n {{ 'DROPDOWN_MENU.SIGNED_IN_AS' | translate }}\n
    \n
    \n {{ email }}\n
    \n
    \n \n \n \n \n
    \n \n
    \n
    \n
    \n \n \n language\n \n {{ (currentLanguage$ | async)?.flag }}\n \n {{ languageLabel$ | async }}\n \n \n
    \n
    \n 0\">\n \n \n \n \n \n \n \n \n
    \n
    \n","import { Component, EventEmitter, Output } from '@angular/core';\nimport { CenterNavigationItem, UserNavigationItem, UserSwitcherData } from '@vendasta/atlas';\nimport { Observable, combineLatest, of } from 'rxjs';\nimport { catchError, distinctUntilChanged, map, shareReplay, startWith, switchMap } from 'rxjs/operators';\nimport { AtlasConfigService, AtlasDataService } from '../../../core/src';\nimport { CustomUserDropdownItem } from '../user-dropdown/user-dropdown.interface';\nimport { AtlasUserLanguageModalService } from '../user-language-modal/user-language-modal.service';\nimport { GetByAccountGroupIdSetting } from '../vbc_sdk/_internal/objects/notifications';\nimport { NotificationsService } from '../vbc_sdk/notifications.service';\nimport { AtlasTopBarService } from './top-bar.service';\n\n@Component({\n selector: 'atlas-top-bar',\n templateUrl: './top-bar.component.html',\n styleUrls: ['./top-bar.component.scss', '../common.scss'],\n providers: [AtlasUserLanguageModalService],\n})\nexport class AtlasTopBarComponent {\n @Output() event: EventEmitter = new EventEmitter();\n\n centerData$: Observable;\n userNavigationItems$: Observable;\n username$: Observable;\n impersonateeUsername$: Observable;\n partnerId$: Observable;\n email$: Observable;\n userId$: Observable;\n signOutUrl$: Observable;\n hideCenters$: Observable;\n hideUserDropdown$: Observable;\n showLanguageSelector$: Observable;\n serviceProviderId$: Observable;\n dropdownItems$: Observable;\n notificationsEnabled$: Observable;\n userSwitcherData$: Observable;\n partnerName$: Observable;\n\n constructor(\n private dataService: AtlasDataService,\n private topbarService: AtlasTopBarService,\n private configService: AtlasConfigService,\n private notificationsService: NotificationsService,\n private userLanguageModalService: AtlasUserLanguageModalService,\n ) {\n this.centerData$ = this.dataService.centerData$;\n this.userNavigationItems$ = this.dataService.userData$;\n this.username$ = this.dataService.username$;\n this.impersonateeUsername$ = this.dataService.impersonateeUsername$;\n this.email$ = this.dataService.email$;\n this.userId$ = this.dataService.userId$;\n this.signOutUrl$ = this.dataService.signoutUrl$;\n this.userSwitcherData$ = this.dataService.userSwitcherData$;\n this.partnerName$ = this.dataService.partnerName$;\n\n // Checks if the user only has VBC. This is a special case for notifications because users who only use VBC will\n // need to have a check performed to see if their VBC notifications are turned off.\n const onlyVBCAccess$: Observable = combineLatest([\n this.configService.accountId$,\n this.dataService.centerData$,\n ]).pipe(\n map(\n ([accountGroupId, centerData]: [string, CenterNavigationItem[]]) =>\n !!accountGroupId &&\n (centerData ? !centerData.find((center: CenterNavigationItem) => center.centerId !== 'VBC') : false),\n ),\n distinctUntilChanged(),\n );\n // If the state contains an account group id, we need to get the notifications settings to see if they are enabled\n // or not in Partner Center.\n const vbcNotificationSettings$: Observable = combineLatest(\n this.configService.partnerId$.pipe(distinctUntilChanged()),\n this.configService.accountId$.pipe(distinctUntilChanged()),\n ).pipe(\n switchMap(([partnerId, accountGroupId]: [string, string]) => {\n if (!!partnerId && !!accountGroupId) {\n return this.notificationsService\n .getByAccountGroupId$(partnerId, accountGroupId)\n .pipe(catchError(() => of(null)));\n }\n return of(null);\n }),\n map((resp) => (!!resp && !!resp.data ? resp.data : [])),\n // If there is not host defined for VBC, there is potential for getByAccountGroupId$ to never emit a value.\n // this will prevent notificationsEnabled$ combine latest from doing anything because it's going to sit there\n // waiting until this observable emits a value. In the case that there is not host set, we will assume there is\n // no VBC data to look at.\n startWith([]),\n shareReplay({ bufferSize: 1, refCount: true }),\n );\n const vbcNotificationsEnabled$: Observable = combineLatest(\n this.dataService.userId$,\n vbcNotificationSettings$,\n ).pipe(\n map(([userId, settings]: [string, GetByAccountGroupIdSetting[]]) =>\n settings ? settings.find((setting) => !!setting && setting.unifiedUserId === userId) : null,\n ),\n map((setting: GetByAccountGroupIdSetting): boolean => !!setting && !!setting.notificationsEnabled),\n distinctUntilChanged(),\n );\n this.notificationsEnabled$ = combineLatest([\n this.dataService.notificationsEnabled$,\n this.topbarService.hideNotifications$,\n vbcNotificationsEnabled$,\n onlyVBCAccess$,\n ]).pipe(\n map(\n ([dataNotificationsEnabled, hideNotifications, vbcNotificationsEnabled, onlyVBCAccess]: [\n boolean,\n boolean,\n boolean,\n boolean,\n ]) => {\n if (!dataNotificationsEnabled || hideNotifications) {\n return false;\n }\n if (onlyVBCAccess) {\n return vbcNotificationsEnabled;\n }\n return true;\n },\n ),\n );\n\n this.serviceProviderId$ = this.configService.serviceProviderId$;\n this.partnerId$ = this.configService.partnerId$;\n this.hideCenters$ = this.topbarService.hideCenters$;\n this.hideUserDropdown$ = combineLatest([\n this.topbarService.hideUserDropdown$,\n this.topbarService.dropdownItems$,\n this.dataService.email$,\n ]).pipe(\n map(([hideUserDropdown, dropdownItems, email]: [boolean, CustomUserDropdownItem[], string]) => {\n if (hideUserDropdown) {\n return true;\n }\n return !dropdownItems && !email;\n }),\n );\n this.showLanguageSelector$ = this.topbarService.showLanguageSelector$;\n this.dropdownItems$ = this.topbarService.dropdownItems$;\n\n this.userLanguageModalService.init();\n }\n\n propagateEvent(eventId: string): void {\n this.event.emit(eventId);\n }\n}\n","\n\n\n\n
    \n \n
    \n","import { HttpClient, HttpHeaders } from '@angular/common/http';\nimport {\n ApplicationRef,\n Component,\n ComponentRef,\n EventEmitter,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n SimpleChanges,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { SessionService } from '@galaxy/core';\nimport { HostService } from '@vendasta/atlas';\nimport { Observable, skipWhile, switchMap, take } from 'rxjs';\nimport { AtlasConfigService, AtlasDataService } from '../../../core/src';\nimport { ModalService } from '../core-components/modal/modal.service';\nimport { SnackbarComponent } from '../core-components/snackbar/snackbar.component';\nimport { EmailVerificationComponent } from '../email-verification/email-verification.component';\nimport { SettingsComponent } from '../notifications/settings/settings.component';\nimport { AtlasThemingService } from '../theming.service';\nimport { AtlasTopBarComponent } from '../top-bar/top-bar.component';\nimport { AtlasTopBarService } from '../top-bar/top-bar.service';\nimport { CustomUserDropdownItem } from '../user-dropdown/user-dropdown.interface';\n\nconst MODAL_CONTAINER_ID = 'atlas-navbar-modal-container';\n\n@Component({\n selector: 'atlas-navbar',\n templateUrl: './nav.component.html',\n styleUrls: ['./nav.component.scss', '../common.scss'],\n})\nexport class NavComponent implements OnInit, OnChanges, OnDestroy {\n @Input() accountId?: string;\n @Input() partnerId?: string;\n @Input() marketId?: string;\n @Input() groupPath?: string;\n @Input() signOutNextUrl?: string;\n @Input() serviceProviderId: string;\n @Input() dropdownItems?: string | CustomUserDropdownItem[];\n @Input() hideCenters?: string | boolean;\n @Input() hideNotifications?: string | boolean;\n @Input() showLanguageSelector?: string | boolean;\n @Input() disableUserDropdown?: string | boolean;\n @Output() event: EventEmitter = new EventEmitter();\n\n private topbar: ComponentRef;\n private snackbar: ComponentRef;\n\n constructor(\n private cfgService: AtlasConfigService,\n public apiService: AtlasDataService,\n private sessionService: SessionService,\n private appRef: ApplicationRef,\n private topbarService: AtlasTopBarService,\n private themingService: AtlasThemingService,\n private http: HttpClient,\n private hostService: HostService,\n private modalService: ModalService,\n ) {\n // Set up theming\n apiService.theming$.pipe(takeUntilDestroyed()).subscribe((theming) => {\n this.themingService.theming = theming;\n });\n }\n\n ngOnInit(): void {\n document.querySelector('body').style.setProperty('padding-top', '40px');\n\n this.parseDropdownItems();\n this.calculateHideCenters();\n this.calculateHideNotifications();\n this.calculateShowLanguageSelector();\n this.refreshConfig();\n\n if (window.location.search.indexOf(SettingsComponent.SETTINGS_DIALOG_PARAM_ID) >= 0) {\n this.modalService.openList(SettingsComponent);\n }\n\n this.getShouldShowEmailVerificationInterstitial().subscribe((resp) => {\n if (resp.display) {\n this.modalService.openFullscreen(EmailVerificationComponent);\n }\n });\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.dropdownItems) {\n this.parseDropdownItems();\n }\n if (changes.hideCenters) {\n this.calculateHideCenters();\n }\n if (changes.hideNotifications) {\n this.calculateHideNotifications();\n }\n if (changes.disableUserDropdown) {\n this.calculateHideUserDropdown();\n }\n if (changes.showLanguageSelector) {\n this.calculateShowLanguageSelector();\n }\n if (\n !!changes.partnerId ||\n !!changes.marketId ||\n !!changes.accountId ||\n !!changes.serviceProviderId ||\n !!changes.signOutNextUrl ||\n !!changes.groupPath\n ) {\n this.refreshConfig();\n }\n }\n\n ngOnDestroy(): void {\n if (this.topbar) {\n this.topbar.destroy();\n this.appRef.detachView(this.topbar.hostView);\n }\n\n if (this.snackbar) {\n this.snackbar.destroy();\n this.appRef.detachView(this.snackbar.hostView);\n }\n\n const modalContainer = document.getElementById(MODAL_CONTAINER_ID);\n if (modalContainer) {\n modalContainer.remove();\n }\n }\n\n propagateEvent(eventId: string): void {\n this.event.emit(eventId);\n }\n\n private parseDropdownItems(): void {\n if (typeof this.dropdownItems === 'object') {\n this.topbarService.setDropdownItems(this.dropdownItems as CustomUserDropdownItem[]);\n return;\n }\n if (!this.dropdownItems) {\n return;\n }\n try {\n const parsedItems: any = JSON.parse(this.dropdownItems);\n const dropdownItems: CustomUserDropdownItem[] = [];\n for (const item of parsedItems) {\n dropdownItems.push({\n label: item.label,\n url: item.url,\n eventId: item.eventId,\n });\n }\n this.topbarService.setDropdownItems(dropdownItems);\n } catch (e) {\n console.log('Failed to parse Dropdown Items. ' + e.message);\n }\n }\n\n private calculateHideCenters(): void {\n this.topbarService.setCenterVisibility(!(this.hideCenters === 'true' || this.hideCenters === true));\n }\n\n private calculateHideNotifications(): void {\n this.topbarService.setNotificationsVisibility(\n !(this.hideNotifications === 'true' || this.hideNotifications === true),\n );\n }\n\n private calculateHideUserDropdown(): void {\n this.topbarService.setUserDropdownVisibility(\n !(this.disableUserDropdown === 'true' || this.disableUserDropdown === true),\n );\n }\n\n private calculateShowLanguageSelector(): void {\n this.topbarService.setLanguageSelectorVisibility(\n this.showLanguageSelector === 'true' || this.showLanguageSelector === true,\n );\n }\n\n private refreshConfig(): void {\n this.cfgService.initialize(\n this.serviceProviderId,\n this.partnerId,\n this.marketId,\n this.accountId,\n this.serviceProviderId,\n this.signOutNextUrl,\n this.groupPath,\n );\n }\n\n getShouldShowEmailVerificationInterstitial(): Observable<{ display: boolean }> {\n const shouldDisplay = this.http.post<{ display: boolean }>(\n this.hostService.hostWithScheme + '/to-display-email-verification',\n null,\n {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json',\n }),\n withCredentials: true,\n },\n );\n return this.sessionService.getSessionId().pipe(\n skipWhile((sess) => !sess),\n switchMap(() => shouldDisplay),\n take(1),\n );\n }\n}\n","\n \n\n","import { Component, EventEmitter, Input, Output } from '@angular/core';\n\n@Component({\n selector: 'atlas-title',\n templateUrl: './title.component.html',\n styleUrls: ['./title.component.scss', '../common.scss'],\n})\nexport class TitleComponent {\n isInteractable: boolean;\n @Input() icon: string;\n @Input() set interactable(val: string) {\n this.isInteractable = val !== 'false';\n }\n\n // eslint-disable-next-line @angular-eslint/no-output-native\n @Output() click = new EventEmitter();\n}\n","
    \n \n \n {{ icon }}\n \n
    \n \n
    \n
    \n\n","export const firebaseConfig = {\n apiKey: 'AIzaSyC1B6OwyBcbFX1vlF6pxPUunC_yoge4ujo',\n authDomain: 'notifications-realtime.firebaseapp.com',\n databaseURL: 'https://notifications-realtime.firebaseio.com',\n projectId: 'notifications-realtime',\n storageBucket: 'notifications-realtime.appspot.com',\n messagingSenderId: '120235207080',\n};\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AngularFireAuthModule } from '@angular/fire/compat/auth';\nimport { AngularFirestoreModule } from '@angular/fire/compat/firestore';\nimport { FormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatSnackBarModule } from '@angular/material/snack-bar';\nimport { RouterModule } from '@angular/router';\nimport { LexiconModule } from '@galaxy/lexicon';\nimport { GalaxyAlertModule } from '@vendasta/galaxy/alert';\nimport { GalaxyButtonLoadingIndicatorModule } from '@vendasta/galaxy/button-loading-indicator';\nimport { GalaxyEmptyStateModule } from '@vendasta/galaxy/empty-state';\nimport { CenterSelectorComponent } from './center-selector/center-selector.component';\nimport { AccordionComponent } from './core-components/accordion/accordion.component';\nimport { ButtonComponent } from './core-components/button/button.component';\nimport { IconButtonDirective } from './core-components/button/icon-button.directive';\nimport { CheckboxComponent } from './core-components/checkbox/checkbox.component';\nimport { ChipComponent } from './core-components/chip/chip.component';\nimport { InkBarComponent } from './core-components/ink-bar/ink-bar.component';\nimport { LoaderComponent } from './core-components/loader/loader.component';\nimport { ModalContentComponent } from './core-components/modal/modal-content.component';\nimport { ModalFooterComponent } from './core-components/modal/modal-footer.component';\nimport { ModalHeaderComponent } from './core-components/modal/modal-header.component';\nimport { ModalComponent } from './core-components/modal/modal.component';\nimport { ModalService } from './core-components/modal/modal.service';\nimport { PanelContentComponent } from './core-components/panel/panel-content.component';\nimport { PanelDescriptionComponent } from './core-components/panel/panel-description.component';\nimport { PanelHeaderComponent } from './core-components/panel/panel-header.component';\nimport { PanelTitleComponent } from './core-components/panel/panel-title.component';\nimport { PanelComponent } from './core-components/panel/panel.component';\nimport { SlideToggleComponent } from './core-components/slide-toggle/slide-toggle.component';\nimport { SnackbarComponent } from './core-components/snackbar/snackbar.component';\nimport { TabGroupComponent } from './core-components/tab/tab-group.component';\nimport { TabHeaderComponent } from './core-components/tab/tab-header.component';\nimport { TabComponent } from './core-components/tab/tab.component';\nimport { AtlasTooltipModule } from './core-components/tooltip/tooltip-module';\nimport { EmailVerificationComponent } from './email-verification/email-verification.component';\nimport { SearchBoxComponent } from './form-controls/search-box/search-box.component';\nimport { ItemComponent } from './item/item.component';\nimport { AtlasLanguageSelectorComponent } from './language-selector/language-selector.component';\nimport { LanguageListItemComponent } from './language-selector/modal/language-list/language-list-item/language-list-item.component';\nimport { LanguageListComponent } from './language-selector/modal/language-list/language-list.component';\nimport { AtlasLanguageSelectorModalComponent } from './language-selector/modal/language-selector-modal.component';\nimport * as baseTranslation from './languages/en_devel.json';\nimport { MenuItemComponent } from './menu-item/menu-item.component';\nimport { MenuComponent } from './menu/menu.component';\nimport { NavComponent } from './nav/nav.component';\nimport { FlyoutComponent } from './notifications/flyout/flyout.component';\nimport { NotificationComponent } from './notifications/notification/notification.component';\nimport { NotificationsComponent } from './notifications/notifications.component';\nimport { AccountsFormSettingsComponent } from './notifications/settings/accounts-form/accounts-form-settings.component';\nimport { AccountsFormComponent } from './notifications/settings/accounts-form/accounts-form.component';\nimport { SettingsFormComponent } from './notifications/settings/settings-form/settings-form.component';\nimport { SettingsComponent } from './notifications/settings/settings.component';\nimport { FirestoreDB } from './realtime/firestore';\nimport { TitleComponent } from './title/title.component';\nimport { AtlasTopBarComponent } from './top-bar/top-bar.component';\nimport { UserDropdownComponent } from './user-dropdown/user-dropdown.component';\nimport { AtlasUserLanguageModalComponent } from './user-language-modal/user-language-modal.component';\nimport { GalaxyPipesModule } from '@vendasta/galaxy/pipes';\nimport { getApp, initializeApp, provideFirebaseApp } from '@angular/fire/app';\nimport { firebaseConfig } from './realtime/config';\nimport { getFirestore, provideFirestore } from '@angular/fire/firestore';\nimport { UserSwitcherModalComponent } from './user-switcher-modal/user-switcher-modal.component';\nimport { GalaxyBadgeModule } from '@vendasta/galaxy/badge';\n\n@NgModule({\n declarations: [\n NotificationsComponent,\n NotificationComponent,\n FlyoutComponent,\n CenterSelectorComponent,\n MenuComponent,\n MenuItemComponent,\n TitleComponent,\n NavComponent,\n UserDropdownComponent,\n ItemComponent,\n AtlasTopBarComponent,\n ChipComponent,\n CheckboxComponent,\n LoaderComponent,\n IconButtonDirective,\n AtlasLanguageSelectorComponent,\n AtlasLanguageSelectorModalComponent,\n AtlasUserLanguageModalComponent,\n LanguageListComponent,\n LanguageListItemComponent,\n ButtonComponent,\n ModalComponent,\n ModalContentComponent,\n ModalFooterComponent,\n ModalHeaderComponent,\n SettingsComponent,\n SettingsFormComponent,\n AccountsFormComponent,\n AccountsFormSettingsComponent,\n PanelComponent,\n AccordionComponent,\n PanelHeaderComponent,\n PanelContentComponent,\n PanelTitleComponent,\n PanelDescriptionComponent,\n SnackbarComponent,\n TabComponent,\n TabGroupComponent,\n TabHeaderComponent,\n InkBarComponent,\n SlideToggleComponent,\n SearchBoxComponent,\n EmailVerificationComponent,\n UserSwitcherModalComponent,\n ],\n exports: [\n NavComponent,\n ItemComponent,\n MenuComponent,\n MenuItemComponent,\n TitleComponent,\n AtlasLanguageSelectorComponent,\n ModalComponent,\n ModalContentComponent,\n ModalFooterComponent,\n ModalHeaderComponent,\n SettingsComponent,\n ],\n providers: [FirestoreDB, ModalService],\n imports: [\n CommonModule,\n RouterModule,\n AtlasTooltipModule,\n AngularFirestoreModule,\n AngularFireAuthModule,\n FormsModule,\n GalaxyAlertModule,\n GalaxyEmptyStateModule,\n MatIconModule,\n GalaxyButtonLoadingIndicatorModule,\n MatProgressSpinnerModule,\n MatButtonModule,\n MatSnackBarModule,\n LexiconModule.forChild({\n componentName: 'common/atlas',\n baseTranslation,\n }),\n MatDialogModule,\n GalaxyPipesModule,\n GalaxyBadgeModule,\n provideFirebaseApp(() => initializeApp(firebaseConfig, 'notifications')),\n provideFirestore(() => getFirestore(getApp('notifications'))),\n ],\n})\nexport class AtlasModule {}\n","import { NgModule, ModuleWithProviders } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport { RouterModule } from '@angular/router';\nimport { LayoutModule } from '@angular/cdk/layout';\nimport { MatBadgeModule } from '@angular/material/badge';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatChipsModule } from '@angular/material/chips';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatRadioModule } from '@angular/material/radio';\nimport { MatSidenavModule } from '@angular/material/sidenav';\nimport { MatToolbarModule } from '@angular/material/toolbar';\n\nimport { TranslateModule } from '@ngx-translate/core';\nimport { LexiconModule } from '@galaxy/lexicon';\nimport { VaBreadcrumbsModule } from '../va-breadcrumbs/va-breadcrumbs.module';\nimport { VaFilterModule } from '../va-filter/filter.module';\nimport { VaProductNavItemComponent } from './va-product-nav-item.component';\nimport { VaProductNavComponent, VaNavCustomSideContentDirective } from './va-product-nav.component';\nimport { MobileActionBarComponent } from './mobile-action-bar.component';\nimport { VaProductNavService } from './va-product-nav.service';\nimport baseTranslation from '../assets/i18n/en_devel.json';\nimport { WEBLATE_COMPONENT_NAME } from '../constants';\nimport { AtlasModule } from '@galaxy/atlas';\nimport { GalaxyBadgeModule } from '@vendasta/galaxy/badge';\n\nconst materialModules = [\n MatToolbarModule,\n MatIconModule,\n MatSidenavModule,\n MatButtonModule,\n MatMenuModule,\n MatRadioModule,\n MatBadgeModule,\n MatInputModule,\n MatChipsModule,\n];\n\n@NgModule({\n declarations: [\n VaProductNavComponent,\n VaProductNavItemComponent,\n VaNavCustomSideContentDirective,\n MobileActionBarComponent,\n ],\n imports: [\n RouterModule,\n CommonModule,\n FormsModule,\n LayoutModule,\n VaBreadcrumbsModule,\n VaFilterModule,\n TranslateModule,\n LexiconModule.forChild({\n componentName: WEBLATE_COMPONENT_NAME,\n baseTranslation: baseTranslation,\n }),\n materialModules,\n AtlasModule,\n GalaxyBadgeModule,\n ],\n exports: [VaProductNavComponent, VaProductNavItemComponent, VaNavCustomSideContentDirective],\n providers: [],\n})\nexport class VaProductNavModule {\n static forRoot(): ModuleWithProviders {\n return {\n ngModule: VaProductNavModule,\n providers: [VaProductNavService],\n };\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatRippleModule } from '@angular/material/core';\nimport { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from '@angular/material/dialog';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatRadioModule } from '@angular/material/radio';\nimport { MatTabsModule } from '@angular/material/tabs';\nimport { LexiconModule } from '@galaxy/lexicon';\nimport { TranslateModule } from '@ngx-translate/core';\nimport baseTranslation from '../assets/i18n/en_devel.json';\nimport { WEBLATE_COMPONENT_NAME } from '../constants';\nimport { UpgradeCTADialogModule } from '../get-pro-dialog/get-pro-dialog.module';\nimport { WelcomeComponent, WelcomeCustomActionDirective } from './welcome.component';\n\n@NgModule({\n imports: [\n CommonModule,\n TranslateModule,\n LexiconModule.forChild({\n componentName: WEBLATE_COMPONENT_NAME,\n baseTranslation: baseTranslation,\n }),\n MatButtonModule,\n MatIconModule,\n MatTabsModule,\n MatRadioModule,\n MatRippleModule,\n MatDialogModule,\n MatProgressSpinnerModule,\n UpgradeCTADialogModule,\n ],\n providers: [\n { provide: MatDialogRef, useValue: {} },\n { provide: MAT_DIALOG_DATA, useValue: [] },\n ],\n declarations: [WelcomeComponent, WelcomeCustomActionDirective],\n exports: [WelcomeComponent, WelcomeCustomActionDirective],\n})\nexport class WelcomeModule {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { CommonPipesModule } from './common-pipes/common-pipes.module';\nimport { UpgradeCTADialogModule } from './get-pro-dialog/get-pro-dialog.module';\nimport { VaGoalTableModule } from './goal-table/goal-table.module';\nimport { ProjectMilestonesModule } from './project-milestones/project-milestones.module';\nimport { VaSafeHtmlModule } from './safe-html/safe-html.module';\nimport { VaSearchBoxModule } from './search-box/va-search-box.module';\nimport { VaActionMenuModule } from './va-action-menu/va-action-menu.module';\nimport { VaBadgeModule } from './va-badge/va-badge.module';\nimport { VaBreadcrumbsModule } from './va-breadcrumbs/va-breadcrumbs.module';\nimport { VaCardsModule } from './va-cards/va-cards.module';\nimport { VaFilterChipsModule } from './va-filter-chips/va-filter-chips.module';\nimport { VaFilterModule } from './va-filter/filter.module';\nimport { VaIconModule } from './va-icon/icon.module';\nimport { VaImageGalleryComponent } from './va-image-gallery';\nimport { VaItemsAndStatusModule } from './va-items-and-status/va-items-and-status.module';\nimport { VaListModule } from './va-list/va-list.module';\nimport { VaMaterialTableModule } from './va-mat-table/va-mat-table.module';\nimport { VaMultiSelectModule } from './va-multi-select/va-multi-select.module';\nimport { VaNavItemListModule } from './va-nav/nav-item-list/nav-item-list.module';\nimport { VaNavItemModule } from './va-nav/nav-item/nav-item.module';\nimport { VaNavModule } from './va-nav/nav.module';\nimport { VaNestedSelectorModule } from './va-nested-selector/va-nested-selector.module';\nimport { VaProductNavModule } from './va-product-nav/va-product-nav.module';\nimport { VaSearchSelectModule } from './va-search-select/va-search-select.module';\nimport { VaStatusBannerModule } from './va-status-banner/va-status-banner.module';\nimport { VaStencilsModule } from './va-stencils/stencils.module';\nimport { VaTableModule } from './va-table/table.module';\nimport { WelcomeModule } from './va-welcome/welcome.module';\nimport { VaButtonModule } from './wrappers/va-button/va-button.module';\nimport { VaCheckboxModule } from './wrappers/va-checkbox/va-checkbox.module';\nimport { VaChipModule } from './wrappers/va-chip/va-chip.module';\nimport { VaExpandModule } from './wrappers/va-expand/va-expand.module';\nimport { VaMenuModule } from './wrappers/va-menu/va-menu.module';\nimport { VaMultilineModule } from './wrappers/va-multiline/va-multiline.module';\nimport { VaSwitchModule } from './wrappers/va-switch/va-switch.module';\n\nconst UIKIT_MODULES = [\n VaCardsModule,\n CommonModule,\n VaSearchBoxModule,\n VaIconModule,\n VaTableModule,\n VaButtonModule,\n VaCheckboxModule,\n VaMenuModule,\n VaExpandModule,\n VaSwitchModule,\n VaMultilineModule,\n VaFilterModule,\n VaItemsAndStatusModule,\n VaMultiSelectModule,\n VaSearchSelectModule,\n VaChipModule,\n VaSafeHtmlModule,\n VaImageGalleryComponent,\n VaListModule,\n VaActionMenuModule,\n VaNestedSelectorModule,\n VaBreadcrumbsModule,\n VaNavModule,\n VaNavItemModule,\n VaNavItemListModule,\n VaProductNavModule,\n VaStencilsModule,\n CommonPipesModule,\n VaBadgeModule,\n UpgradeCTADialogModule,\n WelcomeModule,\n VaMaterialTableModule,\n VaFilterChipsModule,\n VaStatusBannerModule,\n ProjectMilestonesModule,\n VaGoalTableModule,\n];\n\n@NgModule({\n imports: UIKIT_MODULES,\n exports: UIKIT_MODULES,\n})\nexport class UIKitModule {}\n","import { Component, Input } from '@angular/core';\nimport { I18NDescriptor } from '../../uikit.interface';\n\n@Component({\n selector: 'va-legend-item',\n templateUrl: './va-legend-item.component.html',\n styleUrls: ['./va-legend-item.component.scss'],\n})\nexport class VaLegendItemComponent {\n @Input() color: string;\n @Input() label: I18NDescriptor;\n @Input() valueLabel: string;\n}\n","
    \n{{ label.key | translate: label.params }}\n\n {{ valueLabel }}\n\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { VaLegendItemComponent } from './va-legend-item/va-legend-item.component';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { LexiconModule } from '@galaxy/lexicon';\nimport baseTranslation from '../assets/i18n/en_devel.json';\nimport { WEBLATE_COMPONENT_NAME } from '../constants';\n\n@NgModule({\n declarations: [VaLegendItemComponent],\n imports: [\n CommonModule,\n TranslateModule,\n LexiconModule.forChild({\n componentName: WEBLATE_COMPONENT_NAME,\n baseTranslation: baseTranslation,\n }),\n ],\n exports: [VaLegendItemComponent],\n})\nexport class VaChartModule {}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject, combineLatest, Observable, of, ReplaySubject } from 'rxjs';\nimport { distinctUntilChanged, map, shareReplay, startWith, switchMap, tap } from 'rxjs/operators';\n\nexport type ReloadVisibility = 'data-visible' | 'data-hidden';\n\nexport interface AsyncModel {\n showData$: Observable;\n showLoading$: Observable;\n showAlternateLoading$: Observable;\n showError$: Observable;\n\n setLoading(b: boolean): void;\n\n setErrored(b: boolean): void;\n\n setReloadVisibility(dataVisible: ReloadVisibility): void;\n}\n\nconst DEBUG = false;\n\n@Injectable()\nexport class AsyncUiModel implements AsyncModel {\n private readonly loading$$ = new ReplaySubject(1);\n private readonly reloadVisibility$$ = new BehaviorSubject('data-hidden');\n private readonly errored$$ = new ReplaySubject(1);\n readonly showData$: Observable;\n readonly showLoading$: Observable;\n readonly showAlternateLoading$: Observable;\n readonly showError$: Observable;\n\n constructor() {\n let loading$ = this.loading$$.asObservable();\n let errored$ = this.errored$$.asObservable();\n if (DEBUG) {\n loading$ = loading$.pipe(tap((v) => console.log('loading: ', v)));\n errored$ = errored$.pipe(tap((v) => console.log('error: ', v)));\n }\n loading$ = loading$.pipe(shareReplay(1));\n errored$ = errored$.pipe(shareReplay(1));\n\n const reloadVis$ = this.reloadVisibility$$.pipe(distinctUntilChanged(), shareReplay(1));\n\n const dataLoading$ = reloadVis$.pipe(\n switchMap((vis) => {\n if (vis === 'data-visible') {\n return of(false);\n }\n return loading$;\n }),\n );\n const showData$ = combineLatest([dataLoading$, errored$.pipe(startWith(false))]).pipe(\n map(([loading, errored]) => !loading && !errored),\n );\n this.showData$ = reloadVis$.pipe(\n switchMap((vis) => {\n if (vis === 'data-hidden') {\n return showData$.pipe(startWith(false));\n }\n return showData$;\n }),\n distinctUntilChanged(),\n );\n const baseLoading$ = loading$.pipe(startWith(true), shareReplay(1));\n this.showLoading$ = reloadVis$.pipe(\n switchMap((vis) => {\n if (vis === 'data-hidden') {\n return baseLoading$;\n }\n return of(false);\n }),\n distinctUntilChanged(),\n );\n this.showAlternateLoading$ = reloadVis$.pipe(\n switchMap((vis) => {\n if (vis === 'data-hidden') {\n return of(false);\n }\n return baseLoading$;\n }),\n distinctUntilChanged(),\n );\n this.showError$ = combineLatest([errored$, loading$]).pipe(\n map(([errored, loading]) => !loading && errored),\n shareReplay(1),\n startWith(false),\n distinctUntilChanged(),\n );\n }\n\n setLoading(b: boolean): void {\n this.loading$$.next(b);\n }\n\n setErrored(b: boolean): void {\n this.errored$$.next(b);\n }\n\n setReloadVisibility(v: ReloadVisibility): void {\n this.reloadVisibility$$.next(v);\n }\n}\n","import { ChangeDetectorRef, Directive, TemplateRef, ViewContainerRef } from '@angular/core';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[successData]',\n})\nexport class SuccessDataDirective {\n constructor(\n private readonly container: ViewContainerRef,\n private readonly template: TemplateRef,\n private readonly cdr: ChangeDetectorRef,\n ) {}\n\n public setData(data: T): void {\n this.container.clear();\n const ev = this.container.createEmbeddedView(this.template);\n ev.context.$implicit = data;\n this.cdr.detectChanges(); // mat-icons render text without this\n }\n}\n","import {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n Input,\n OnChanges,\n SimpleChanges,\n} from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport { AsyncUiModel, ReloadVisibility } from './async-ui.model';\nimport { SuccessDataDirective } from './success-data.directive';\n\n@Component({\n selector: 'uikit-async-ui',\n templateUrl: './async-ui.component.html',\n styleUrls: ['./async-ui.component.scss'],\n providers: [AsyncUiModel],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AsyncUiComponent implements OnChanges, AfterContentInit {\n @ContentChild(SuccessDataDirective) successChild: SuccessDataDirective;\n @Input() data: T;\n @Input() loading: boolean;\n @Input() error: boolean;\n @Input() reloadVisibility: ReloadVisibility = 'data-hidden';\n @Input() loadingMargin = '0';\n @Input() errorMargin = '0';\n\n /**\n * Internal use only\n */\n readonly _showData$: Observable = this.model.showData$;\n readonly _showLoading$: Observable = this.model.showLoading$;\n readonly _showError$: Observable = this.model.showError$;\n readonly _alternateLoadingVisibility$: Observable = this.model.showAlternateLoading$.pipe(\n map((v) => (v ? 'visible' : 'hidden')),\n );\n\n constructor(private readonly model: AsyncUiModel) {}\n\n ngOnChanges(changes: SimpleChanges): void {\n if ('data' in changes) {\n this.setDataOnChild(changes['data'].currentValue);\n }\n if ('loading' in changes) {\n this.model.setLoading(changes['loading'].currentValue);\n }\n if ('error' in changes) {\n this.model.setErrored(changes['error'].currentValue);\n }\n if ('reloadVisibility' in changes) {\n this.model.setReloadVisibility(changes['reloadVisibility'].currentValue);\n }\n }\n\n ngAfterContentInit(): void {\n this.setDataOnChild(this.data);\n }\n\n private setDataOnChild(data: T): void {\n if (!!this.successChild && !!data) {\n this.successChild.setData(data);\n }\n }\n}\n","\n \n\n
    \n \n
    \n
    \n
    \n \n
    \n \n \n \n
    \n
    \n
    \n \n
    \n \n \n \n
    \n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { EmptyStateModule } from '../empty-state/empty-state.module';\nimport { AsyncUiComponent } from './async-ui.component';\nimport { SuccessDataDirective } from './success-data.directive';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\n\n@NgModule({\n declarations: [AsyncUiComponent, SuccessDataDirective],\n imports: [CommonModule, MatProgressSpinnerModule, EmptyStateModule, MatProgressBarModule],\n exports: [AsyncUiComponent, SuccessDataDirective],\n})\nexport class AsyncUiModule {}\n","import { Injectable } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { ConfirmationData } from './confirmation-dialog.component';\n\ninterface DialogConfig {\n width: string;\n data: ConfirmationData;\n height?: string;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class ConfirmationService {\n constructor(private dialog: MatDialog) {}\n\n async confirm(options: ConfirmationData, height?: string): Promise {\n const { ConfirmationDialogComponent } = await import('./confirmation-dialog.component');\n const dialogConfig: DialogConfig = {\n width: '550px',\n data: options,\n };\n if (height) {\n dialogConfig.height = height;\n }\n const dialogRef = this.dialog.open(ConfirmationDialogComponent, dialogConfig);\n return await dialogRef.afterClosed().toPromise();\n }\n}\n","import dayjs from 'dayjs';\nimport UTC from 'dayjs/plugin/utc';\ndayjs.extend(UTC);\n\nexport class DateUtilities {\n public static stripTimeAndTimeZoneInfo(date: Date | string | null): Date | null {\n if (date === null) {\n return null;\n } else {\n return dayjs(dayjs.utc(date).format('YYYY-MM-DDT00:00:00')).toDate();\n }\n }\n}\n","import { Observable, of } from 'rxjs';\nimport { startWith, tap } from 'rxjs/operators';\nimport { LocalStorageService } from './local-storage.service';\nimport { Injectable } from '@angular/core';\n\n@Injectable({ providedIn: 'root' })\nexport class LocalRefreshingCacheService {\n /** Default expiry in Milliseconds */\n defaultExpires = 86400000; // 24Hrs\n\n constructor(private localstorage: LocalStorageService) {}\n /**\n * Get the Cache value and return it as a observable combined with the passed in Observable,\n * Refreshing the cache with the newest value from the observable.\n * @param key: the key of the value to be refreshed\n * @param value$: A observable value to be cached\n * @param expiry: Optional time to expire default is 24 hours\n */\n public getCacheValueAndRefresh(key: string, value$: Observable, expiry?: number): Observable {\n if (!key) {\n return of(undefined);\n }\n const cachedValue = this.getCacheValue(key);\n return value$.pipe(\n tap((newValue) => {\n this.setCacheValue(key, newValue, expiry);\n return newValue;\n }),\n startWith(cachedValue as T),\n );\n }\n\n /**\n * Update the Cached value for a key\n * @param key: the key to the value to be updated\n * @param newValue: a value to update the cache\n * @param expiry: (Optional) time to expire default is 24 hours\n */\n public setCacheValue(key: string, newValue: T, expiry?: number): T | undefined {\n if (!key) {\n return;\n }\n return this.setCacheRecord(key, newValue, expiry);\n }\n\n /**\n * Remove the Cached entry for the key\n * @param key: the key to the value to be removed\n */\n public deleteCacheValue(key: string): void {\n if (key) {\n this.localstorage.remove(key);\n }\n }\n\n /**\n * Get value for the specified key from the local storage or undefined\n * @param key: the key or type to get for\n */\n public getCacheValue(key: string): T | undefined {\n if (!key) {\n return undefined;\n }\n const cachedValue = this.getCacheRecord(key);\n if (cachedValue && cachedValue.value) {\n return cachedValue.value as T;\n }\n return undefined;\n }\n\n private getCacheRecord(key: string): CacheStorageRecord | null {\n let cachedValue = JSON.parse(this.localstorage.get(key)!) as CacheStorageRecord | null;\n // If it exists check its expiry time\n if (cachedValue && cachedValue.expires) {\n // If the expiry is past, nullify the value\n if (new Date(cachedValue.expires).getTime() < Date.now()) {\n this.localstorage.remove(key);\n cachedValue = null;\n }\n }\n return cachedValue;\n }\n\n private setCacheRecord(key: string, value: T, expires: number = this.defaultExpires): T {\n const _expires: Date = this.sanitizeAndGenerateDateExpiry(expires);\n this.localstorage.set(\n key,\n JSON.stringify({\n expires: _expires,\n value: value,\n }),\n );\n return value;\n }\n\n private sanitizeAndGenerateDateExpiry(expires: number): Date {\n const expiryDate: Date = new Date(Date.now() + Math.abs(expires));\n // Don't allow expiry dates in the past\n if (expiryDate.getTime() <= Date.now()) {\n return new Date(Date.now() + expires);\n }\n return expiryDate;\n }\n}\n\nexport interface CacheStorageRecord {\n expires: Date;\n value: T;\n}\n","import { Cell } from './cell';\nimport { VaButtonComponent } from '../../wrappers/va-button/va-button.component';\nimport { Button } from '../../wrappers/va-button/va-button';\n\nexport class ButtonCell implements Cell {\n component = VaButtonComponent;\n constructor(public config: Button | Button[]) {}\n}\n","import { Cell } from './cell';\nimport { Chip } from '../../wrappers/va-chip/va-chip';\nimport { VaChipComponent } from '../../wrappers/va-chip/va-chip.component';\n\nexport class ChipCell implements Cell {\n component = VaChipComponent;\n constructor(public config: Chip) {}\n}\n","import { Cell } from './cell';\nimport { VaMenuComponent } from '../../wrappers/va-menu/va-menu.component';\nimport { Menu } from '../../wrappers/va-menu/va-menu';\n\nexport class MenuCell implements Cell {\n component = VaMenuComponent;\n constructor(public config: Menu) {}\n}\n","import { Cell } from './cell';\nimport { VaMultilineComponent } from '../../wrappers/va-multiline/va-multiline.component';\nimport { Multiline } from '../../wrappers/va-multiline/va-multiline';\n\nexport class MultilineCell implements Cell {\n component = VaMultilineComponent;\n constructor(public config: Multiline) {}\n}\n","import { Cell } from './cell';\nimport { VaSwitchComponent } from '../../wrappers/va-switch/va-switch.component';\nimport { Switch } from '../../wrappers/va-switch/va-switch';\n\nexport class SwitchCell implements Cell {\n component = VaSwitchComponent;\n constructor(public config: Switch) {}\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { VImgComponent } from './v-img.component';\n\n@NgModule({\n declarations: [VImgComponent],\n imports: [CommonModule],\n exports: [VImgComponent],\n})\nexport class VImgModule {}\n"],"mappings":"84JAAA,IAAAA,GAAAC,GAAA,CAAAC,GAAAC,KAAA,EAAC,SAAUC,EAAG,EAAG,CACH,OAAOF,IAAnB,UAA6C,OAAOC,GAAtB,IAA+BA,GAAO,QAAU,EAAE,EAAkB,OAAO,QAArB,YAA+B,OAAO,IAAM,OAAO,CAAC,GAAKC,EAAmB,OAAO,WAAtB,IAAmC,WAAaA,GAAK,MAAM,MAAQ,EAAE,CACxN,GAAEF,GAAM,UAAY,CAClB,aAEA,IAAIE,EAAI,IACN,EAAI,IACJC,EAAI,KACJC,EAAI,cACJC,EAAI,SACJC,EAAI,SACJC,EAAI,OACJC,EAAI,MACJC,EAAI,OACJC,EAAI,QACJC,EAAI,UACJC,EAAI,OACJC,EAAI,OACJC,EAAI,eACJC,GAAI,6FACJC,GAAI,sFACJC,GAAI,CACF,KAAM,KACN,SAAU,2DAA2D,MAAM,GAA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B,GAAA,ECFlC,IAAO0C,GAAP,KAAiB,CAErBC,YAAmBC,EAAyB,CAAzB,KAAAA,OAAAA,EADnB,KAAAC,UAAYC,EACmC,GCF3C,IAAOC,GAAP,KAAe,CAEnBC,YAAmBC,EAAY,CAAZ,KAAAA,OAAAA,EADnB,KAAAC,UAAYC,EACsB,GCF9B,IAAOC,GAAP,KAAe,CAEnBC,YAAmBC,EAAY,CAAZ,KAAAA,OAAAA,EADnB,KAAAC,UAAYC,EACsB,GCF9B,IAAOC,GAAP,KAAoB,CAExBC,YAAmBC,EAAiB,CAAjB,KAAAA,OAAAA,EADnB,KAAAC,UAAYC,EAC2B,GCFnC,IAAOC,GAAP,KAAiB,CAErBC,YAAmBC,EAAc,CAAd,KAAAA,OAAAA,EADnB,KAAAC,UAAYC,EACwB,GCGtC,IAAaC,IAAU,IAAA,CAAjB,IAAOA,EAAP,MAAOA,CAAU,yCAAVA,EAAU,sBAAVA,CAAU,CAAA,0BAHXC,CAAY,CAAA,CAAA,EAGlB,IAAOD,EAAPE,SAAOF,CAAU,GAAA","names":["require_dayjs_min","__commonJSMin","exports","module","t","n","r","i","s","u","a","o","c","f","h","d","l","$","y","M","e","m","v","g","D","p","S","_","w","O","b","k","require_utc","__commonJSMin","exports","module","t","i","e","s","f","n","u","o","r","a","h","l","c","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵadvance","ɵɵtextInterpolate","ctx_r0","iconName","ɵɵelement","ɵɵproperty","svgIconName","title","ɵɵlistener","ɵɵrestoreView","_r2","ɵɵnextContext","ɵɵresetView","secondaryAction","ɵɵtextInterpolate1","ctaSecondaryText","_r3","primaryAction","ctaPrimaryText","EmptyStateComponent","constructor","ctaPrimaryEvent","EventEmitter","ctaSecondaryEvent","emit","selectors","inputs","outputs","ngContentSelectors","_c1","decls","vars","consts","template","rf","ctx","ɵɵtemplate","EmptyStateComponent_mat_icon_1_Template","EmptyStateComponent_mat_icon_2_Template","EmptyStateComponent_h1_3_Template","ɵɵprojection","EmptyStateComponent_button_6_Template","EmptyStateComponent_button_7_Template","_EmptyStateComponent","EmptyStateModule","CommonModule","MatIconModule","MatButtonModule","_EmptyStateModule","ConfirmationModule","CommonModule","MatButtonModule","MatDialogModule","_ConfirmationModule","en_devel_default","WEBLATE_COMPONENT_NAME","import_moment","DATE_FILTER_I18N_PATH","QUARTER_FILTER_I18N_PATH","DateFilterOptions","QuarterFilterOption","DATE_FILTERS","key","Custom","i18nKey","SevenDay","daysOffset","ThirtyDay","ThreeMonth","SixMonth","monthsOffset","TwelveMonth","SEASON_FILTERS","Month","Quarter","QUARTER_FILTERS","section","First_Quarter","startMonth","endMonth","Second_Quarter","Third_Quarter","Fourth_Quarter","DateRangeSelectorService","calculateStartDate","end","daysOffset","monthsOffset","date","moment","subtract","getEntryFor","key","DateFilterOptions","Month","Quarter","SEASON_FILTERS","find","entry","DATE_FILTERS","constructor","currentKey$$","BehaviorSubject","ThirtyDay","dateRangeFilter$$","compareDateRangeFilter$$","changeDatePickerType$$","currentCompareDate$$","currKeySub","subscribe","updateFilter","updateCompareFilter","ngOnDestroy","unsubscribe","getKey","getValue","setKey","newKey","next","getFilter","getCompareFilter","setAsCustom","customDates","compareDateRange","__spreadValues","compareDates","Custom","setAsMonthly","setAsQuarter","setDatePickerType","useComparableDatePicker","getDatePickerType","updatePanelCompareDate","startDate","endDate","updateCompareDate","getCompareDate","asObservable","i18nKey","start","utc","newFilter","startOf","toDate","endOf","transferStartDate","transferEndDate","diff","year","getFullYear","month","getMonth","compareYear","startMonth","compareRange","format","updateStartDate","factory","ɵfac","providedIn","_DateRangeSelectorService","import_moment","ɵɵelementStart","ɵɵelement","ɵɵelementEnd","ɵɵadvance","ɵɵpropertyInterpolate","ɵɵpipeBind1","ɵɵproperty","compareDate_r4","ɵɵlistener","option_r6","ɵɵrestoreView","_r5","$implicit","ctx_r2","ɵɵnextContext","ɵɵresetView","updateDateRangeData","key","ɵɵtext","ɵɵtextInterpolate1","i18nKey","ɵɵpipeBind2","option_r8","option_r9","$event","_r7","onMonthSelectChanged","value","ɵɵtemplate","DateRangeSelectorComponent_ng_container_5_div_26_mat_option_4_Template","DateRangeSelectorComponent_ng_container_5_div_26_mat_option_7_Template","currentMonth","monthList","currentYear","yearList","option_r11","section","option_r12","_r10","onQuarterSelectChanged","DateRangeSelectorComponent_ng_container_5_div_30_mat_option_3_Template","DateRangeSelectorComponent_ng_container_5_div_30_mat_option_6_Template","currentQuarter","quarters","ɵɵelementContainerStart","_r2","onCustomStartChange","onCustomEndChange","DateRangeSelectorComponent_ng_container_5_div_16_Template","ɵɵtwoWayListener","i0","ɵɵtwoWayBindingSet","selected","DateRangeSelectorComponent_ng_container_5_mat_radio_button_22_Template","updateSeasonDate","seasonOptions","DateRangeSelectorComponent_ng_container_5_div_26_Template","DateRangeSelectorComponent_ng_container_5_div_30_Template","start_r13","compareDateRange","start","end","end_r14","maxEndCompareDate","compareDateRange$","ɵɵtextInterpolate","ɵɵtwoWayProperty","filterOptions","seasonDatePickerType","option_r16","_r15","DateRangeSelectorComponent_ng_template_7_mat_radio_button_2_Template","start_r17","customDate","end_r18","maxEndDate","DateRangeSelectorComponent","constructor","dialogRef","data","dateRangeService","DATE_FILTERS","SEASON_FILTERS","moment","Date","QUARTER_FILTERS","month","toDate","QuarterFilterOption","First_Quarter","getFullYear","customDateSub","getCompareDate","ngOnInit","getKey","comparableDatePicker$","getDatePickerType","push","getFilter","subscribe","filter","getCompareFilter","getMonth","updatePanelCompareDate","DateFilterOptions","Quarter","find","entry","startMonth","initializeList","ngOnDestroy","forEach","subs","unsubscribe","submit","Custom","setAsCustom","Month","setAsMonthly","setAsQuarter","setKey","close","momentDate","date","selectedMonth","selectedYear","year","format","startOf","endOf","selectedQuarter","quarter","endMonth","selectedKey","updateStartDate","i","s","ɵɵdirectiveInject","MatDialogRef","MAT_DIALOG_DATA","DateRangeSelectorService","selectors","decls","vars","consts","template","rf","ctx","_r1","DateRangeSelectorComponent_ng_container_5_Template","DateRangeSelectorComponent_ng_template_7_Template","ɵɵtemplateRefExtractor","normalDatePicker_r19","_DateRangeSelectorComponent","DateRangeSelectorModule","CommonModule","MatDialogModule","MatRadioModule","MatDatepickerModule","FormsModule","MatFormFieldModule","TranslateModule","LexiconModule","forChild","componentName","WEBLATE_COMPONENT_NAME","baseTranslation","MatInputModule","MatButtonModule","MatIconModule","MatSelectModule","_DateRangeSelectorModule","Sizes","VaCardComponent","constructor","size","Sizes","OneThird","isOneThird","isHalf","Half","isTwoThird","TwoThirds","isFull","Full","selectors","hostVars","hostBindings","rf","ctx","ɵɵclassProp","ɵɵelementStart","ɵɵprojection","ɵɵelementEnd","_VaCardComponent","ɵɵelementContainerStart","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵadvance","ɵɵpropertyInterpolate","ɵɵpipeBind2","ctx_r0","info","key","params","ɵɵtextInterpolate1","subtitle","VaCardHeaderComponent","selectors","inputs","title","ngContentSelectors","_c0","decls","vars","consts","template","rf","ctx","ɵɵtemplate","VaCardHeaderComponent_ng_container_4_Template","VaCardHeaderComponent_mat_card_subtitle_5_Template","ɵɵprojection","ɵɵproperty","ɵɵpureFunction1","_c1","_VaCardHeaderComponent","ɵɵelementContainerStart","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵadvance","ɵɵtextInterpolate","ctx_r0","navigationIconName","ICON_CHEVRON_RIGHT","VaCardLinkButtonComponent","constructor","linkClick","EventEmitter","onClick","emit","selectors","inputs","text","iconUrl","url","outputs","ngContentSelectors","_c1","decls","vars","consts","template","rf","ctx","ɵɵlistener","ɵɵprojection","ɵɵtemplate","VaCardLinkButtonComponent_ng_container_6_Template","ɵɵpipeBind2","key","params","ɵɵproperty","_VaCardLinkButtonComponent","VaCardBreakLineComponent","selectors","decls","vars","template","rf","ctx","styles","_VaCardBreakLineComponent","ɵɵelementContainerStart","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵadvance","ɵɵtextInterpolate1","ɵɵpipeBind2","ctx_r0","title","key","params","VaCardContentComponent","selectors","inputs","ngContentSelectors","_c0","decls","vars","consts","template","rf","ctx","ɵɵtemplate","VaCardContentComponent_ng_container_0_Template","ɵɵprojection","ɵɵproperty","_VaCardContentComponent","VaCardBreakGroupComponent","selectors","ngContentSelectors","_c0","decls","vars","template","rf","ctx","ɵɵprojection","_VaCardBreakGroupComponent","VerticalLayoutDirective","constructor","isVertical","selectors","hostVars","hostBindings","rf","ctx","ɵɵclassProp","_VerticalLayoutDirective","HorizontalLayoutDirective","isHorizontal","_HorizontalLayoutDirective","DEFAULT_CURRENCY_CODE","DEFAULT_LOCALE","DisplayValuePipe","constructor","translateService","locale","updateValue","displayType","currencyPipe","CurrencyPipe","displayValue","transform","value","currencyCode","percentPipe","PercentPipe","digitsInfo","decimalPipe","DecimalPipe","instant","outOfValue","maxDecimalPlaces","undefined","onTranslationChange","subscribe","onLangChange","onDefaultLangChange","ngOnDestroy","unsubscribe","ɵɵdirectiveInject","TranslateService","pure","_DisplayValuePipe","ɵɵelementContainerStart","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵtemplate","NumberWithChangeComponent_div_4_ng_container_1_Template","NumberWithChangeComponent_div_4_ng_container_2_Template","ɵɵproperty","ɵɵpureFunction3","_c0","ctx_r0","changeInfo","previousPeriodChangeType","changeType","POSITIVE_CHANGE","NEGATIVE_CHANGE","NO_CHANGE","ɵɵadvance","previousPeriodChangeDirection","changeDirection","UPWARD_CHANGE","DOWNWARD_CHANGE","ɵɵtextInterpolate","ɵɵpipeBind1","previousPeriod","CHANGE_DIRECTION","CHANGE_TYPE","NumberWithChangeComponent","constructor","selectors","inputs","decls","vars","consts","template","rf","ctx","NumberWithChangeComponent_div_4_Template","ɵɵtextInterpolate1","currentPeriod","_NumberWithChangeComponent","formatPhoneNumber","phoneNumber","formatForInternational","countryCode","numberString","toString","formatting","newCountryCode","formatNumber","PhoneNumberFormatPipe","transform","pure","_PhoneNumberFormatPipe","InternationalPhoneNumberFormatPipe","_InternationalPhoneNumberFormatPipe","CommonPipesModule","InternationalPhoneNumberFormatPipe","PhoneNumberFormatPipe","DisplayValuePipe","_CommonPipesModule","VaCardsModule","CommonModule","MatCardModule","MatIconModule","TranslateModule","LexiconModule","forChild","componentName","WEBLATE_COMPONENT_NAME","baseTranslation","MatTooltipModule","CommonPipesModule","_VaCardsModule","getDefaults","defaults","changeDefaults","newDefaults","escapeTest","escapeReplace","escapeTestNoEncode","escapeReplaceNoEncode","escapeReplacements","getEscapeReplacement","ch","escape","html","encode","unescapeTest","unescape","_","n","caret","edit","regex","opt","obj","name","val","nonWordAndColonTest","originIndependentUrl","cleanUrl","sanitize","base","href","prot","resolveUrl","baseUrls","justDomain","protocol","domain","rtrim","relativeBase","noopTest","splitCells","tableRow","count","row","match","offset","str","escaped","curr","cells","i","c","invert","l","suffLen","currChar","findClosingBracket","b","level","checkSanitizeDeprecation","repeatString","pattern","result","outputLink","cap","link","raw","lexer","title","text","token","indentCodeCompensation","matchIndentToCode","indentToCode","node","matchIndentInNode","indentInNode","Tokenizer","options","src","trimmed","top","tokens","istask","ischecked","indent","blankLine","endsWithBlankLine","line","nextLine","rawLine","itemContents","endEarly","bull","isordered","list","itemRegex","t","nextBulletRegex","hrRegex","fencesBeginRegex","headingBeginRegex","spacers","hasMultipleLineBreaks","tag","item","j","k","trimmedUrl","rtrimSlash","lastParenIndex","linkLen","links","maskedSrc","prevChar","nextChar","lLength","rDelim","rLength","delimTotal","midDelimTotal","endReg","hasNonSpaceChars","hasSpaceCharsOnBothEnds","mangle","prevCapZero","smartypants","block","__spreadValues","__spreadProps","inline","out","Lexer","_Lexer","rules","next","leading","tabs","lastToken","cutSrc","lastParagraphClipped","extTokenizer","startIndex","tempSrc","tempStart","getStartIndex","errMsg","keepPrevChar","Renderer","code","infostring","lang","quote","slugger","id","body","ordered","start","type","startatt","checked","header","content","flags","TextRenderer","Slugger","value","originalSlug","isDryRun","slug","occurenceAccumulator","Parser","_Parser","l2","l3","cell","loose","itemBody","task","checkbox","ret","renderer","Hooks","markdown","onError","silent","async","callback","e","msg","parseMarkdown","parser","origOpt","marked","throwError","highlight","done","err","pending","args","extensions","pack","opts","ext","prevRenderer","prop","tokenizer","prevTokenizer","hooks","prevHook","arg","walkTokens","values","childTokens","setOptions","use","parseInline","parser","Parser","lexer","Lexer","_c0","BUTTON_TEXT_COPY","BUTTON_TEXT_COPIED","ClipboardButtonComponent","Subject","switchMap","merge","of","timer","mapTo","distinctUntilChanged","shareReplay","startWith","map","copied","ɵɵdefineComponent","rf","ctx","ɵɵelementStart","ɵɵpipe","ɵɵlistener","ɵɵtext","ɵɵelementEnd","ɵɵclassProp","ɵɵpipeBind1","ɵɵadvance","ɵɵtextInterpolate","AsyncPipe","ClipboardOptions","PrismPlugin","MarkedOptions","errorJoyPixelsNotLoaded","errorKatexNotLoaded","errorMermaidNotLoaded","errorClipboardNotLoaded","errorClipboardViewContainerRequired","errorSrcWithoutHttpClient","SECURITY_CONTEXT","InjectionToken","MarkdownService","platform","securityContext","http","clipboardOptions","options","sanitizer","Renderer","Subject","value","__spreadValues","markdown","decodeHtml","inline","emoji","mermaid","markedOptions","trimmed","decoded","emojified","marked","element","viewContainerRef","clipboard","katex","katexOptions","mermaidOptions","src","errorSrcWithoutHttpClient","map","isPlatformBrowser","noLanguageElements","x","html","textarea","renderer","extendedRenderer","defaultCode","code","language","isEscaped","urlProtocolIndex","urlWithoutProtocol","lastSlashIndex","lastUrlSegment","lastDotIndex","extension","errorJoyPixelsNotLoaded","errorKatexNotLoaded","errorClipboardNotLoaded","errorClipboardViewContainerRequired","buttonComponent","buttonTemplate","preElements","i","preElement","preWrapperElement","toolbarWrapperElement","embeddedViewRef","ClipboardButtonComponent","clipboardInstance","node","errorMermaidNotLoaded","mermaidElements","indentStart","line","lineIdentStart","ɵɵinject","PLATFORM_ID","SECURITY_CONTEXT","HttpClient","ClipboardOptions","MarkedOptions","DomSanitizer","ɵɵdefineInjectable","MarkdownComponent","markdownService","EventEmitter","takeUntil","parsedOptions","renderOptions","parsed","error","PrismPlugin","plugin","classes","option","attributeValue","attributeName","upperChars","str","n","ɵɵdirectiveInject","ElementRef","ViewContainerRef","ɵɵdefineComponent","ɵɵNgOnChangesFeature","_c0","rf","ctx","ɵɵprojectionDef","ɵɵprojection","MarkdownModule","markdownModuleConfig","MarkdownService","SECURITY_CONTEXT","SecurityContext","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","MermaidAPI","SecurityLevel","Theme","LogLevel","ɵɵelement","ɵɵproperty","ctx_r0","iconUrl","ɵɵsanitizeUrl","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵstyleProp","fontColor","ɵɵadvance","ɵɵtextInterpolate1","getAbbreviationForName","IconComponent","constructor","diameter","backgroundColor","borderColor","defaultAbbreviation","iconName","names","trim","split","filter","Boolean","length","getIconColorForName","COLOR_CODES","nameSum","defaultColor","i","charCodeAt","index","getIconSize","selectors","inputs","standalone","features","ɵɵStandaloneFeature","decls","vars","consts","template","rf","ctx","ɵɵtemplate","IconComponent_img_1_Template","IconComponent_span_2_Template","IconComponent_div_3_Template","NgStyle","NgIf","styles","_IconComponent","VaIconModule","_VaIconModule","ProjectMilestonesModule","CommonModule","MatCardModule","MatExpansionModule","MatIconModule","MatProgressBarModule","VaIconModule","MarkdownModule","_ProjectMilestonesModule","VaSearchInputDirective","constructor","elementRef","focus","nativeElement","selector","select","ɵɵdirectiveInject","ElementRef","selectors","standalone","_VaSearchInputDirective","LocalStorageService","get","name","browserSupport","localStorage","getItem","set","value","setItem","remove","removeItem","factory","ɵfac","providedIn","_LocalStorageService","SEARCH_TERM_FILTER","SearchBoxService","constructor","localStorageService","saveSearchTerm","contextKey","input","set","getSearchTerm","get","ɵɵinject","LocalStorageService","factory","ɵfac","providedIn","_SearchBoxService","SearchBoxComponent","constructor","searchBoxService","update","EventEmitter","submit","highlightWhenSelected","disabled","initial","enabledSaveSearchTerm","contextKey","placeholder","isSelected","ngOnInit","getSearchTerm","emit","submitSearch","term","saveSearchTerm","inputArea","selector","updateSearch","focusOnSearchBox","window","setTimeout","focus","ɵɵdirectiveInject","SearchBoxService","selectors","viewQuery","rf","ctx","VaSearchInputDirective","ɵɵelementStart","ɵɵlistener","ɵɵrestoreView","_r1","input_r2","ɵɵreference","ɵɵresetView","value","i0","ɵɵelementEnd","ɵɵtext","ɵɵproperty","ɵɵpureFunction3","_c0","ɵɵadvance","CommonModule","NgClass","FormsModule","MatIconModule","MatIcon","styles","changeDetection","_SearchBoxComponent","VaSearchBoxModule","SearchBoxComponent","_VaSearchBoxModule","VaBadgeComponent","selectors","inputs","color","ngContentSelectors","_c0","decls","vars","template","rf","ctx","ɵɵelementStart","ɵɵprojection","ɵɵelementEnd","ɵɵclassMapInterpolate1","_VaBadgeComponent","VaBadgeModule","_VaBadgeModule","NavigationOption","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵproperty","breadcrumb_r1","url","ɵɵadvance","ɵɵtextInterpolate1","ɵɵpipeBind1","text","ɵɵsanitizeUrl","ɵɵtemplate","VaBreadcrumbsComponent_li_1_a_1_Template","VaBreadcrumbsComponent_li_1_a_2_Template","VaBreadcrumbsComponent_li_1_span_3_Template","ɵɵpureFunction1","_c0","navigationOption","ctx_r1","NavigationOption_ROUTERLINK","NavigationOption_HREF","VaBreadcrumbsComponent","constructor","NavigationOption","ROUTERLINK","HREF","selectors","inputs","breadcrumbs","decls","vars","consts","template","rf","ctx","VaBreadcrumbsComponent_li_1_Template","_VaBreadcrumbsComponent","VaBreadcrumbsModule","CommonModule","RouterModule","TranslateModule","LexiconModule","forChild","componentName","WEBLATE_COMPONENT_NAME","baseTranslation","_VaBreadcrumbsModule","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵadvance","ɵɵtextInterpolate","ctx_r0","icon","ɵɵpipeBind1","text","key","ɵɵlistener","$event","ɵɵrestoreView","_r2","ɵɵnextContext","ɵɵresetView","emitDeleteEvent","VaFilterChipComponent","constructor","onClick","EventEmitter","onDelete","emitClickEvent","event","stopPropagation","emit","selectors","inputs","title","canDisable","id","outputs","decls","vars","consts","template","rf","ctx","ɵɵtemplate","VaFilterChipComponent_mat_icon_1_Template","VaFilterChipComponent_span_5_Template","VaFilterChipComponent_button_6_Template","VaFilterChipComponent_button_7_Template","ɵɵproperty","ɵɵtextInterpolate2","_VaFilterChipComponent","ɵɵelementStart","ɵɵlistener","ɵɵrestoreView","_r1","filter_r2","ɵɵnextContext","$implicit","ctx_r2","ɵɵresetView","onFilterMenuItemClick","id","ɵɵtext","ɵɵelementEnd","ɵɵadvance","ɵɵtextInterpolate1","ɵɵpipeBind1","title","key","ɵɵelementContainerStart","ɵɵtemplate","VaFilterChipContainerComponent_ng_container_2_button_1_Template","ɵɵproperty","canDisable","_r4","filter_r5","onClickFilter","onDisableFilter","icon","text","VaFilterChipContainerComponent_ng_container_6_va_filter_chip_1_Template","enabled","_r6","clearAll","filtersMenu_r7","VaFilterChipContainerComponent","constructor","dialog","onFilterClick","EventEmitter","onFilterDisable","onFilterDataChange","filters","filter","forEach","filterId","filterToDisable","find","emit","filterItem","requestAnimationFrame","openFilterDialog","data","component","width","height","closeSub","open","__spreadValues","afterClosed","subscribe","res","unsubscribe","ɵɵdirectiveInject","MatDialog","selectors","inputs","config","outputs","decls","vars","consts","template","rf","ctx","VaFilterChipContainerComponent_ng_container_2_Template","VaFilterChipContainerComponent_ng_container_6_Template","VaFilterChipContainerComponent_ng_container_7_Template","canAddAndRemove","_VaFilterChipContainerComponent","VaFilterChipsModule","CommonModule","MatIconModule","TranslateModule","LexiconModule","forChild","componentName","WEBLATE_COMPONENT_NAME","baseTranslation","CommonPipesModule","MatDialogModule","MatDividerModule","MatButtonModule","MatRippleModule","MatMenuModule","_VaFilterChipsModule","ɵɵelementStart","ɵɵlistener","$event","ɵɵrestoreView","_r2","ctx_r2","ɵɵnextContext","ɵɵresetView","searchTerm","ɵɵelementEnd","option_r5","_r4","$implicit","optionClicked","ɵɵtext","ɵɵadvance","ɵɵtextInterpolate1","ɵɵpipeBind1","optionText","STRING_CONTROL_ACCESSOR","provide","NG_VALUE_ACCESSOR","useExisting","forwardRef","SearchSelectComponent","multi","constructor","selection","EventEmitter","showSearch","sorted","width","ngOnInit","dropdownWidth","String","computedWidth","option","event","setValues","value","formControlProperty","selected","closeOnClick","isSelecting","emit","stopPropagation","displayProperty","placeholderText","selectedText","toggleActionItems","selectSearchClicked","selectSearch","nativeElement","contains","target","SearchBox","focusOnSearchBox","filteredOptions","term","options","sort","a","b","val1","val2","alwaysFirstValue","toLowerCase","localeCompare","filter","indexOf","dropdownIcon","selectClass","innerValue","v","onModelChange","writeValue","registerOnChange","fn","registerOnTouched","onTouch","selectors","viewQuery","rf","ctx","SearchBoxComponent","ɵɵresolveDocument","decls","vars","consts","template","i0","_r1","ɵɵtemplate","SearchSelectComponent_va_search_box_8_Template","SearchSelectComponent_li_10_Template","ɵɵstyleProp","ɵɵproperty","ɵɵtextInterpolate","_SearchSelectComponent","VaSearchSelectModule","CommonModule","VaSearchBoxModule","MatIconModule","TranslateModule","LexiconModule","forChild","componentName","WEBLATE_COMPONENT_NAME","baseTranslation","_VaSearchSelectModule","ɵɵelement","ɵɵelementStart","ɵɵlistener","$event","ɵɵrestoreView","_r1","ctx_r1","ɵɵnextContext","ɵɵresetView","changeItemStatus","ɵɵelementEnd","ɵɵproperty","statusMenuOptions","statusConfig","alwaysFirstValue","displayProperty","sorted","appliedSelection","status","placeholderText","closeSelectOnClick","_r3","changeItemEdition","editionMenuOptions","editionConfig","edition","defaultConfig","dropdownWidth","ItemsAndStatusComponent","constructor","selection","EventEmitter","itemConfig","item","addItemListItem","emit","itemMenuOptions","options","map","option","find","statuses","editions","selectors","inputs","outputs","decls","vars","consts","template","rf","ctx","ɵɵtemplate","ItemsAndStatusComponent_div_1_Template","ItemsAndStatusComponent_uikit_search_select_2_Template","ItemsAndStatusComponent_div_3_Template","ItemsAndStatusComponent_uikit_search_select_4_Template","ɵɵadvance","length","_ItemsAndStatusComponent","VaItemsAndStatusModule","CommonModule","VaSearchSelectModule","_VaItemsAndStatusModule","ɵɵelementStart","ɵɵlistener","option_r3","ɵɵrestoreView","_r2","$implicit","ctx_r3","ɵɵnextContext","ɵɵresetView","deselectOption","ɵɵtext","ɵɵelementEnd","ɵɵadvance","ɵɵtextInterpolate1","optionText","ɵɵelementContainer","ɵɵproperty","option_r5","searchFunc","PlainOption_r6","MatchedOption_r7","ɵɵpureFunction1","_c0","ɵɵtextInterpolate","option_r8","optionTextPreMatch","option_r9","optionTextMatch","optionTextPostMatch","VaMultiSelectComponent","constructor","cdr","selection","EventEmitter","selected","allowNew","limitResults","inputControl","FormControl","option","index","indexOf","splice","emit","detectChanges","optionSelected","event","value","push","setValue","displayProperty","toLowerCase","slice","length","filteredOptions","displayedOptions","options","filter","find","map","unshift","buildOption","name","ɵɵdirectiveInject","ChangeDetectorRef","selectors","inputs","placeholderText","outputs","decls","vars","consts","template","rf","ctx","ɵɵtemplate","VaMultiSelectComponent_mat_chip_row_5_Template","ɵɵelement","$event","i0","_r1","VaMultiSelectComponent_mat_option_9_Template","VaMultiSelectComponent_ng_template_10_Template","ɵɵtemplateRefExtractor","VaMultiSelectComponent_ng_template_12_Template","chipGrid_r10","auto_r11","_VaMultiSelectComponent","VaMultiSelectModule","CommonModule","MatIconModule","GalaxyWrapModule","MatSelectModule","MatInputModule","GalaxyFormFieldModule","FormsModule","MatAutocompleteModule","ReactiveFormsModule","MatChipsModule","_VaMultiSelectModule","subscribeFilterFieldToTranslator","field","translateService","changeDetector","nameKey","name","instant","stream","subscribe","translatedName","detectChanges","subscribeFilterSectionToTranslator","section","translator","cd","subscribeChildFields","title","subs","fields","forEach","push","subscribeToTranslator","FilterSection","constructor","options","title","type","fields","collapsed","fieldValuesObservable","map","field","valueObservable","reduce","previous","next","observableMerge","fieldOptionsObservable","optionsObservable","toggleCollapsed","subscribeToTranslator","translator","cd","attachToFields","subscribeFilterSectionToTranslator","FilterField","config","name","value","condition","id","toLowerCase","split","join","appliedTextPrefix","Observable","create","observer","valueChanged","pipe","share","optionsChanged","suffix","icon","disableTranslation","disableTranslations","changeValue","clearValue","setOptions","serializeValue","JSON","stringify","deserializeValue","urlParam","parse","appliedFieldDisplayText","appliedFieldText","subscribeFilterFieldToTranslator","Filters","innerSections","replace","section","applyFilters","items","filter","item","applyFiltersToItem","sections","hideSection","allFields","concat","activeFields","Array","isArray","length","Object","getOwnPropertyNames","Date","clearAll","forEach","setValueForField","find","f","setValueForFieldname","fieldname","i","filterBySection","doesPass","MultiItemsAndStatusFilterField","FilterField","constructor","config","type","options","itemSelectorConfig","statusSelectorConfig","editionSelectorConfig","value","updateValue","oldValue","newValue","indexOfExisting","findIndex","existing","item","valueChanged","removeValue","Array","isArray","index","indexOf","splice","clearValue","appliedFieldText","itemDisplayProperty","displayProperty","statusDisplayProperty","editionDisplayProperty","resultString","name","edition","status","serializeValue","length","map","part","join","deserializeValue","urlParam","valueList","split","matches","forEach","paramItem","paramStatus","paramEdition","matchingItem","find","option","matchingStatus","statuses","matchingEdition","editions","editionId","push","MultiSelectFilterField","FilterField","constructor","config","type","optionDisplayProperty","optionIdProperty","selected","placeholderText","limitResults","removeValue","value","Array","isArray","index","indexOf","splice","valueChanged","clearValue","appliedFieldText","buttonText","name","serializeValue","queryParam","forEach","item","substring","deserializeValue","urlParam","paramsList","split","options","filter","option","some","param","TabbedFilterField","FilterField","constructor","config","type","value","options","appliedFieldText","name","serializeValue","id","deserializeValue","urlParam","find","tab","subscribeRadioFilterFieldToTranslator","field","translateService","changeDetector","optionSubs","updateOptionNamesOnLanguageChange","key","stream","options","translateOptions","instant","subs","optionKeys","keys","map","k","name","push","subscribe","translated","zipTranslated","detectChanges","id","RadioFilterField","FilterField","constructor","config","type","valueChanged$$","Subject","valueChanged$","asObservable","value","options","appliedFieldText","name","serializeValue","id","deserializeValue","urlParam","find","radio","changeValue","valueChanged","next","subscribeToTranslator","translator","cd","superSubs","radioSubs","subscribeRadioFilterFieldToTranslator","concat","ɵɵelementStart","ɵɵtext","ɵɵlistener","ɵɵrestoreView","_r1","field_r2","ɵɵnextContext","$implicit","ctx_r2","ɵɵresetView","clearValue","ɵɵelementEnd","ɵɵadvance","ɵɵtextInterpolate1","appliedFieldDisplayText","value_r5","_r4","ɵɵelementContainerStart","ɵɵtemplate","AppliedFiltersBarComponent_div_0_ng_container_2_ng_container_2_mat_chip_option_1_Template","ɵɵproperty","value","AppliedFiltersBarComponent_div_0_ng_container_2_mat_chip_option_1_Template","AppliedFiltersBarComponent_div_0_ng_container_2_ng_container_2_Template","isArray","AppliedFiltersBarComponent_div_0_ng_container_2_Template","appliedFilters","AppliedFiltersBarComponent","constructor","fieldValueChanged","EventEmitter","Array","filters","activeFields","filter","field","TabbedFilterField","RadioFilterField","MultiItemsAndStatusFilterField","MultiSelectFilterField","removeValue","emit","selectors","inputs","outputs","decls","vars","consts","template","rf","ctx","AppliedFiltersBarComponent_div_0_Template","length","_AppliedFiltersBarComponent","FilterFieldComponent","constructor","filterApplied","EventEmitter","applyFilter","value","filterField","changeValue","emit","selectors","inputs","outputs","decls","vars","template","rf","ctx","encapsulation","_FilterFieldComponent","TextFilterFieldComponent","FilterFieldComponent","t","selectors","features","ɵɵInheritDefinitionFeature","decls","vars","consts","template","rf","ctx","ɵɵelementStart","ɵɵtwoWayListener","$event","i0","ɵɵtwoWayBindingSet","filterValue","ɵɵlistener","applyFilter","ɵɵelementEnd","ɵɵadvance","ɵɵproperty","ɵɵpipeBind1","filterField","name","ɵɵtwoWayProperty","_TextFilterFieldComponent","CheckboxFilterField","FilterField","constructor","type","clearValue","value","valueChanged","appliedFieldText","name","ɵɵelement","ɵɵproperty","ctx_r0","filterField","icon","url","ɵɵsanitizeUrl","width","height","CheckboxFilterFieldComponent","FilterFieldComponent","t","selectors","features","ɵɵInheritDefinitionFeature","decls","vars","consts","template","rf","ctx","ɵɵelementStart","ɵɵlistener","applyFilter","value","ɵɵelementEnd","ɵɵtemplate","CheckboxFilterFieldComponent_img_2_Template","ɵɵtext","ɵɵadvance","ɵɵtextInterpolate1","disableTranslation","name","ɵɵpipeBind1","suffix","_CheckboxFilterFieldComponent","moment","DatePickerFilterField","FilterField","constructor","type","appliedFieldText","name","Date","value","toISOString","toDateString","serializeValue","deserializeValue","urlParam","utc","DatePickerFilterFieldComponent","FilterFieldComponent","dateChange","event","applyFilter","value","t","selectors","features","ɵɵProvidersFeature","provide","MAT_DATE_LOCALE","useValue","getLocale","DateAdapter","useClass","DateFnsAdapter","MAT_DATE_FORMATS","MAT_DATE_FNS_FORMATS","ɵɵInheritDefinitionFeature","decls","vars","consts","template","rf","ctx","ɵɵelementStart","ɵɵlistener","ɵɵrestoreView","_r1","picker_r2","ɵɵreference","ɵɵresetView","open","$event","i0","ɵɵelementEnd","ɵɵtext","ɵɵelement","ɵɵadvance","ɵɵproperty","filterField","ɵɵtextInterpolate","ɵɵpipeBind1","name","_DatePickerFilterFieldComponent","MIN_WIDTH","SearchSelectFilterField","FilterField","constructor","config","type","options","optionDisplayProperty","placeholder","showSearch","undefined","title","dropdownWidth","width","closeOnClick","appliedFieldText","name","value","serializeValue","deserializeValue","urlParam","find","option","searchSelectFieldWidth","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵadvance","ɵɵtextInterpolate1","ɵɵpipeBind1","ctx_r0","filterField","title","SearchSelectFilterFieldComponent","FilterFieldComponent","t","selectors","features","ɵɵInheritDefinitionFeature","decls","vars","consts","template","rf","ctx","ɵɵtemplate","SearchSelectFilterFieldComponent_div_1_Template","ɵɵlistener","$event","applyFilter","ɵɵproperty","ɵɵpureFunction1","_c0","searchSelectFieldWidth","options","optionDisplayProperty","showSearch","value","placeholder","dropdownWidth","closeOnClick","_SearchSelectFilterFieldComponent","ItemsAndStatusFilterFieldComponent","FilterFieldComponent","newItemSelected","item","statusOptions","filterField","statusOptionsForItem","firstStatusOption","Array","isArray","changeValue","status","itemMenuOptions","options","map","option","t","selectors","features","ɵɵInheritDefinitionFeature","decls","vars","consts","template","rf","ctx","ɵɵelementStart","ɵɵlistener","$event","applyFilter","ɵɵelementEnd","ɵɵproperty","value","itemSelectorConfig","statusSelectorConfig","closeSelectOnClick","_ItemsAndStatusFilterFieldComponent","ɵɵelementStart","ɵɵlistener","$event","itemAndStatus_r2","ɵɵrestoreView","_r1","$implicit","ctx_r2","ɵɵnextContext","ɵɵresetView","updateItemAndStatus","ɵɵelementEnd","ɵɵproperty","filterField","options","itemSelectorConfig","statusSelectorConfig","editionSelectorConfig","_r4","addItemAndStatus","selectItemOptions","emptyItemAndStatus","MultiItemsAndStatusFilterFieldComponent","FilterFieldComponent","constructor","item","status","edition","oldValue","newValue","updateValue","filterApplied","emit","value","selectedValues","some","existingValue","editionId","push","applyFilter","filter","option","find","itemList","t","selectors","features","ɵɵInheritDefinitionFeature","decls","vars","consts","template","rf","ctx","ɵɵtemplate","MultiItemsAndStatusFilterFieldComponent_va_items_and_status_0_Template","MultiItemsAndStatusFilterFieldComponent_va_items_and_status_1_Template","ɵɵadvance","length","_MultiItemsAndStatusFilterFieldComponent","MultiSelectFilterFieldComponent","FilterFieldComponent","t","selectors","features","ɵɵInheritDefinitionFeature","decls","vars","consts","template","rf","ctx","ɵɵelementStart","ɵɵlistener","$event","applyFilter","ɵɵelementEnd","ɵɵproperty","filterField","options","value","optionDisplayProperty","placeholderText","limitResults","_MultiSelectFilterFieldComponent","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵadvance","ɵɵtextInterpolate","ɵɵpipeBind1","ctx_r1","filterField","name","ɵɵelement","ɵɵproperty","disableTranslation","tab_r3","ɵɵelementContainerStart","ɵɵtemplate","TabbedFilterFieldComponent_ng_container_3_mat_tab_1_Template","options","tab_r4","toUpperCase","TabbedFilterFieldComponent_ng_template_4_mat_tab_0_Template","TabbedFilterFieldComponent","FilterFieldComponent","constructor","useCustomCase","theme","changeTab","event","tab","index","applyFilter","selectedIndex","value","findIndex","id","getThemeClasses","t","selectors","inputs","features","ɵɵInheritDefinitionFeature","decls","vars","consts","template","rf","ctx","TabbedFilterFieldComponent_h3_1_Template","ɵɵlistener","$event","i0","ɵɵrestoreView","_r1","ɵɵresetView","TabbedFilterFieldComponent_ng_container_3_Template","TabbedFilterFieldComponent_ng_template_4_Template","ɵɵtemplateRefExtractor","length","UpperCase_r5","_TabbedFilterFieldComponent","ɵɵelementStart","ɵɵlistener","$event","ɵɵrestoreView","_r1","ctx_r1","ɵɵnextContext","ɵɵresetView","radioChange","ɵɵtext","ɵɵelementEnd","ɵɵproperty","radio_r3","id","ɵɵadvance","ɵɵtextInterpolate1","ɵɵpipeBind1","name","RadioFilterFieldComponent","FilterFieldComponent","constructor","updateValue","selectedRadio","filterField","value","applyFilter","ngOnInit","sub","valueChanged$","subscribe","event","newValue","options","find","v","changeValue","filterApplied","emit","ngOnDestroy","unsubscribe","t","selectors","features","ɵɵInheritDefinitionFeature","decls","vars","consts","template","rf","ctx","ɵɵtwoWayListener","i0","ɵɵtwoWayBindingSet","ɵɵtemplate","RadioFilterFieldComponent_mat_radio_button_1_Template","ɵɵtwoWayProperty","_RadioFilterFieldComponent","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵadvance","ɵɵtextInterpolate2","ctx_r0","filterField","bounds","minimum","maximum","RangeFilterFieldComponent","FilterFieldComponent","constructor","validators","Validators","required","pattern","minMaxValidator","bind","boundsValidator","minValueFormControl","UntypedFormControl","maxValueFormControl","ngAfterViewInit","revalidateForm","updateRange","isValid","value","applyFilter","handleKeyDown","$event","keyCode","updateValueAndValidity","onlySelf","emitEvent","invalid","control","valid","minMax","t","selectors","features","ɵɵInheritDefinitionFeature","decls","vars","consts","template","rf","ctx","ɵɵlistener","ɵɵtemplate","RangeFilterFieldComponent_mat_error_10_Template","RangeFilterFieldComponent_mat_error_11_Template","RangeFilterFieldComponent_mat_error_12_Template","RangeFilterFieldComponent_mat_error_13_Template","RangeFilterFieldComponent_mat_error_14_Template","RangeFilterFieldComponent_mat_error_15_Template","RangeFilterFieldComponent_mat_error_16_Template","ɵɵproperty","ɵɵtextInterpolate","suffix","hasError","_RangeFilterFieldComponent","FilterMap","checkbox","CheckboxFilterFieldComponent","SearchSelectFilterFieldComponent","DatePickerFilterFieldComponent","ItemsAndStatusFilterFieldComponent","MultiItemsAndStatusFilterFieldComponent","MultiSelectFilterFieldComponent","range","RangeFilterFieldComponent","radio","RadioFilterFieldComponent","text","TextFilterFieldComponent","FilterFieldDirective","constructor","container","filterApplied","EventEmitter","ngOnInit","component","initializeComponent","filterField","createComponent","type","instance","subscribe","value","emit","ɵɵdirectiveInject","ViewContainerRef","selectors","inputs","outputs","_FilterFieldDirective","URLParamService","constructor","router","route","location","appliedParams","events","pipe","filter","event","NavigationEnd","subscribe","applyParams","newParams","params","Object","assign","snapshot","queryParams","replaceState","window","pathname","serialize","removeParams","oldParams","currentParams","forEach","param","obj","keys","length","reduce","a","k","push","encodeURIComponent","join","ɵɵinject","Router","ActivatedRoute","Location","factory","ɵfac","providedIn","_URLParamService","LAST_APPLIED_FIELDS","EXPIRY_LAST_APPLIED_FIELDS","FilterService","constructor","route","paramService","localStorageService","lazyLoadedFields","initializationParams","_savedFilters","BehaviorSubject","batchChangedFields","_fieldValueChanges","setFilters","allFilters","disableSavedFilters","filters","fieldSubscription","fieldValuesObservable","subscribe","field","updateUrl","saveCurrentFilter","Date","now","isFieldIncludedInBatch","next","setLazyLoadedFields","params","getFilterValuesFromUrl","existingSavedFilters","get","id","savedFilters","JSON","parse","lastAppliedFields","serializedFields","updateFilterFields","fields","lazyFieldSubscription","fieldOptionsObservable","pipe","filter","some","lazyField","trackLazyLoadedFieldOptionChanges","asObservable","skipWhile","value","map","savedFilter","name","fieldValueChanges","expiry","currentlyAppliedFields","serializeFilters","getValue","existingSavedFilterIndex","findIndex","push","set","stringify","removeSavedFilter","splice","applySavedFilter","paramValues","snapshot","queryParams","decodeURIComponent","serializedFilters","filterParam","applyParams","removeParams","changedField","find","indexOfField","f","length","fieldsToUpdate","serializeAllActiveFields","activeFields","reduce","previous","current","serializeValue","forEach","index","fieldArray","key","newValue","deserializeValue","publishChanges","updateFilterField","clearValue","changeValue","exportFilterString","importFilterFields","importString","ngOnDestroy","unsubscribe","ɵɵinject","ActivatedRoute","URLParamService","LocalStorageService","factory","ɵfac","_FilterService","SaveAppliedFiltersDialogComponent","constructor","dialogRef","close","nameInput","nativeElement","value","ɵɵdirectiveInject","MatDialogRef","selectors","viewQuery","rf","ctx","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵlistener","i0","ɵɵrestoreView","_r1","ɵɵresetView","ɵɵadvance","ɵɵtextInterpolate","ɵɵpipeBind1","ɵɵproperty","ɵɵtextInterpolate1","_SaveAppliedFiltersDialogComponent","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵlistener","option_r2","ɵɵrestoreView","_r1","$implicit","ctx_r2","ɵɵnextContext","ɵɵresetView","removeSavedFilter","emit","name","ɵɵadvance","ɵɵtextInterpolate","ManageSavedFiltersDialogComponent","constructor","dialogRef","EventEmitter","ngOnInit","savedFilters","subscribe","closeDialogIfSavedFiltersEmpty","length","close","ɵɵdirectiveInject","MatDialogRef","selectors","inputs","outputs","decls","vars","consts","template","rf","ctx","ɵɵtemplate","ManageSavedFiltersDialogComponent_mat_list_item_5_Template","ɵɵpipeBind1","ɵɵproperty","_ManageSavedFiltersDialogComponent","ɵɵelementStart","ɵɵlistener","option_r3","ɵɵrestoreView","_r2","$implicit","ctx_r3","ɵɵnextContext","ɵɵresetView","selection","emit","ɵɵtext","ɵɵelementEnd","ɵɵadvance","ɵɵtextInterpolate1","name","ɵɵelement","ɵɵelementContainerStart","ɵɵtemplate","SavedFiltersMenuComponent_ng_container_7_button_1_Template","SavedFiltersMenuComponent_ng_container_7_hr_2_Template","ɵɵproperty","opts_r5","length","_r6","openImportFilterDialog","openExportFilterDialog","ɵɵpipeBind1","SavedFiltersMenuComponent","constructor","dialog","showFilterSharing","EventEmitter","saveCurrentFilter","removeSavedFilter","exportFilterDialog","importFilterDialog","openSaveCurrentFiltersDialog","saveAppliedFiltersDialogRef","open","SaveAppliedFiltersDialogComponent","width","afterClosed","subscribe","openManageSavedFiltersDialog","manageSavedFiltersDialogRef","ManageSavedFiltersDialogComponent","componentInstance","savedFilters","options","ɵɵdirectiveInject","MatDialog","selectors","inputs","outputs","decls","vars","consts","template","rf","ctx","SavedFiltersMenuComponent_ng_container_7_Template","i0","_r1","SavedFiltersMenuComponent_ng_container_20_Template","ɵɵpropertyInterpolate","menuRef_r7","tmp_6_0","_SavedFiltersMenuComponent","ɵɵelementStart","ɵɵlistener","$event","ɵɵrestoreView","_r1","ctx_r1","ɵɵnextContext","ɵɵresetView","savedFilterSelected","emit","saveCurrentFilter","removeSavedFilter","exportFilterDialog","importFilterDialog","ɵɵelementEnd","ɵɵproperty","showFilterSharing","savedFilters","ɵɵtext","ɵɵadvance","ɵɵtextInterpolate","ɵɵpipeBind1","section_r4","title","ɵɵelementContainerStart","_r5","fieldValueChanged","field_r6","_r3","$implicit","toggleCollapsed","ɵɵtemplate","FilterComponent_div_6_ng_container_1_p_2_Template","FilterComponent_div_6_ng_container_1_i_3_Template","FilterComponent_div_6_ng_container_1_i_4_Template","FilterComponent_div_6_ng_container_1_div_6_Template","ɵɵpureFunction2","_c0","collapsed","_c1","getDisplayableFields","fields","FilterComponent_div_6_ng_container_1_Template","hideSelectors","FilterComponent","constructor","EventEmitter","filter","field","TabbedFilterField","selectors","inputs","filters","outputs","decls","vars","consts","template","rf","ctx","FilterComponent_uikit_saved_filters_menu_5_Template","FilterComponent_div_6_Template","sections","_FilterComponent","ɵɵelementStart","ɵɵlistener","$event","ɵɵrestoreView","_r1","ctx_r1","ɵɵnextContext","ɵɵresetView","handleFilterValueChanged","ɵɵelementEnd","ɵɵproperty","field_r3","theme","useCustomCase","ɵɵelementContainerStart","_r4","toggleFilterOpen","ɵɵtext","ɵɵadvance","ɵɵpureFunction1","_c3","filterIsOpen","filtersDisabled","ɵɵtextInterpolate1","ɵɵpipeBind1","_r5","searchTermChanged","emit","initialSearch","searchDisabled","enabledSaveSearchTerm","contextKey","placeholder","ɵɵtemplate","FilterContainerComponent_div_2_ng_container_2_Template","ɵɵprojection","FilterContainerComponent_div_2_va_search_box_7_Template","hasSideBarFields","searchable","ɵɵtextInterpolate","toolbarText","_r6","savedFilterSelected","saveCurrentFilter","removeSavedFilter","fieldValueChanged","exportFilterDialog","importFilterDialog","_c4","showFilterSharing","filters","savedFilters","_r7","FilterContainerComponent","constructor","breakPointObserver","showToolbar","subscriptions","EventEmitter","ngOnInit","push","observe","Breakpoints","XSmall","subscribe","state","matches","ngOnDestroy","forEach","sub","unsubscribe","fields","filter","field","TabbedFilterField","length","tabbedFilters","event","ɵɵdirectiveInject","BreakpointObserver","selectors","inputs","outputs","features","ɵɵProvidersFeature","FilterService","ngContentSelectors","_c1","decls","vars","consts","template","rf","ctx","FilterContainerComponent_va_filter_tabbed_1_Template","FilterContainerComponent_div_2_Template","FilterContainerComponent_div_4_Template","FilterContainerComponent_va_applied_filters_bar_6_Template","_c2","activeFields","_FilterContainerComponent","VaFilterModule","RouterModule","CommonModule","VaSearchBoxModule","VaSearchSelectModule","VaItemsAndStatusModule","VaMultiSelectModule","MatCheckboxModule","MatTabsModule","MatMenuModule","MatIconModule","MatRadioModule","MatButtonModule","MatInputModule","MatDialogModule","MatListModule","MatDatepickerModule","FormsModule","ReactiveFormsModule","TranslateModule","LexiconModule","forChild","componentName","WEBLATE_COMPONENT_NAME","baseTranslation","MatMomentDateModule","LayoutModule","MatTooltipModule","GalaxyWrapModule","MatChipsModule","_VaFilterModule","ɵɵelementStart","ɵɵlistener","action_r2","ɵɵrestoreView","_r1","$implicit","ctx_r2","ɵɵnextContext","ɵɵresetView","actionSelected","emit","ɵɵtext","ɵɵelementEnd","ɵɵadvance","ɵɵtextInterpolate1","VaActionMenuComponent","constructor","icon","color","EventEmitter","selectors","inputs","actions","outputs","decls","vars","consts","template","rf","ctx","ɵɵtemplate","VaActionMenuComponent_button_5_Template","ɵɵproperty","menu_r4","ɵɵstyleProp","ɵɵtextInterpolate","_VaActionMenuComponent","VaActionMenuModule","CommonModule","MatButtonModule","MatIconModule","MatMenuModule","_VaActionMenuModule","SortOrder","VaListModule","CommonModule","MatCheckboxModule","MatButtonModule","MatIconModule","MatSlideToggleModule","MatTooltipModule","MatProgressSpinnerModule","MatProgressBarModule","MatChipsModule","VaIconModule","VaActionMenuModule","_VaListModule","Pinned","AdvancedColumnOrganizerService","constructor","translator","searchTerm$$","BehaviorSubject","searchTerm$","asObservable","columnDefs$$","columnDefs$","groupDefs$$","groupDefs$","selectedOrderedColumns$$","selectedOrderedColumns$","columnDefsByID$","pipe","map","columnDefs","columnDefsByID","cd","id","selectedColumns$","getSelectedColumns$","searchedGroups$","getSearchedGroups$","pinnedLeftColumns$","getPinnedLeftColumns$","pinnedRightColumns$","getPinnedRightColumns$","configure","saveKey","colDefs","groupDefs","useI18NTranslations","displayName","instant","gd","name","next","selectedOrderedColumns","value","filter","c","pinned","hidden","storedConfigJson","localStorage","getItem","JSON","parse","pinnedColumns$","Pinned","PINNED_LEFT","combineLatest","selectedColumnIDs","keyedColumns","isVisible","PINNED_UNSET","PINNED_RIGHT","pinSide","columnDef","searchTerm","allColumns","length","columns","groups","groupDef","indexOf","filterGroupsBySearchTerm","updateSearchTerm","st","columnMatchesSearchTerm","column","toLowerCase","group","some","__spreadProps","__spreadValues","setColumnVisibility","cols","index","push","splice","save","saveName","getValue","setItem","stringify","selectAll","columnGroup","deselectAll","columnDroppedInList","prevIndex","curIndex","moveItemInArray","getSelectedColumns","ɵɵinject","TranslateService","factory","ɵfac","_AdvancedColumnOrganizerService","ɵɵelementContainer","ɵɵelementContainerStart","ɵɵelementStart","ɵɵtemplate","AdvancedColumnOrganizerComponent_ng_container_6_ng_container_3_Template","ɵɵelementEnd","AdvancedColumnOrganizerComponent_ng_container_6_ng_container_5_Template","ɵɵadvance","ɵɵproperty","filtered_checkablelist_r2","filtered_dragable_list_r3","ɵɵlistener","$event","ɵɵrestoreView","_r4","ctx_r4","ɵɵnextContext","ɵɵresetView","setActiveTab","index","toString","AdvancedColumnOrganizerComponent_ng_container_7_ng_container_5_Template","AdvancedColumnOrganizerComponent_ng_container_7_ng_container_8_Template","activeTab","ɵɵtext","ɵɵtextInterpolate1","ɵɵpipeBind1","searchTerm$","AdvancedColumnOrganizerComponent_ng_template_13_ng_container_3_div_1_Template","searchedGroups_r7","length","column_r11","_r10","$implicit","setColumnVisibility","id","checked","isVisible","pinned","name","_r8","columnGroup_r9","selectAll","deselectAll","AdvancedColumnOrganizerComponent_ng_template_13_ng_container_5_ng_container_1_ng_container_11_Template","columns","AdvancedColumnOrganizerComponent_ng_template_13_ng_container_5_ng_container_1_Template","_r6","updateSearchTerm","AdvancedColumnOrganizerComponent_ng_template_13_ng_container_3_Template","AdvancedColumnOrganizerComponent_ng_template_13_ng_container_5_Template","searchedGroups$","ɵɵtextInterpolate","column_r12","columnInfo_r14","ɵɵelement","_r13","columnDroppedInList","AdvancedColumnOrganizerComponent_ng_template_15_div_7_div_4_Template","AdvancedColumnOrganizerComponent_ng_template_15_div_7_div_5_Template","AdvancedColumnOrganizerComponent_ng_template_15_div_7_div_10_Template","ɵɵpureFunction2","_c0","i_r15","isMobileScreen","column_r16","AdvancedColumnOrganizerComponent_ng_template_15_div_4_Template","AdvancedColumnOrganizerComponent_ng_template_15_div_7_Template","AdvancedColumnOrganizerComponent_ng_template_15_div_9_Template","pinnedLeftColumns$","selectedColumns$","pinnedRightColumns$","AdvancedColumnOrganizerComponent","constructor","advancedColumnOrganizerService","dialogData","breakpointObserver","dialogRef","saveName","loadColumns","getActiveTab","event","item","data","columnIndex","currentIndex","save","selectedColumns","getSelectedColumns","close","configure","columnConfigs","groupConfigs","useI18NTranslations","columnGroup","onClose","isMatched","currentTab","sessionStorage","setItem","getItem","ɵɵdirectiveInject","AdvancedColumnOrganizerService","MAT_DIALOG_DATA","BreakpointObserver","MatDialogRef","selectors","features","ɵɵProvidersFeature","decls","vars","consts","template","rf","ctx","i0","_r1","AdvancedColumnOrganizerComponent_ng_container_6_Template","AdvancedColumnOrganizerComponent_ng_container_7_Template","AdvancedColumnOrganizerComponent_ng_template_13_Template","ɵɵtemplateRefExtractor","AdvancedColumnOrganizerComponent_ng_template_15_Template","_AdvancedColumnOrganizerComponent","AdvancedColumnOrganizerButtonComponent","constructor","dialog","columnsChange","EventEmitter","ngOnInit","emitInitialVisibleColumns","window","requestAnimationFrame","saveName","storedVisibleColumns","localStorage","getItem","visibleColumns","JSON","parse","emit","error","console","columnConfigs","cols","filter","col","hidden","pinned","Pinned","PINNED_LEFT","PINNED_RIGHT","map","id","openManager","dialogData","groupConfigs","useI18NTranslations","dialogRef","open","AdvancedColumnOrganizerComponent","width","panelClass","autoFocus","data","afterClosed","pipe","take","subscribe","save","componentInstance","selectedColumns","ɵɵdirectiveInject","MatDialog","selectors","inputs","outputs","ngContentSelectors","_c0","decls","vars","consts","template","rf","ctx","ɵɵelementStart","ɵɵlistener","ɵɵprojection","ɵɵelementEnd","_AdvancedColumnOrganizerButtonComponent","ColumnSorterService","loadSavedColumnInfo","columnInfo","saveName","localStorage","loadedInfoJSON","getItem","validateSavedData","JSON","parse","saveColumnInfo","passedInColumns","loadedColumns","forEach","col","colFound","find","searchCol","id","name","push","filter","setItem","stringify","factory","ɵfac","_ColumnSorterService","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵproperty","columnMenu_r2","ɵɵadvance","ɵɵtextInterpolate","ctx_r0","iconName","ɵɵtextInterpolate1","buttonLabel","ɵɵelementContainer","ɵɵtemplate","ColumnSorterComponent_div_7_mat_card_5_ng_container_4_Template","column_r4","hidden","nameOutput_r5","ɵɵpureFunction1","_c1","name","ɵɵlistener","$event","ɵɵrestoreView","_r3","ɵɵnextContext","ɵɵresetView","columnMenuDropped","i0","stopPropagation","$implicit","toggleSelectedColumn","id","ColumnSorterComponent_div_7_ng_container_4_Template","ColumnSorterComponent_div_7_mat_card_5_Template","ɵɵpureFunction2","_c0","i_r6","ɵɵelementContainerStart","ɵɵpipeBind1","name_r7","ColumnSorterComponent_ng_template_8_ng_container_0_Template","ColumnSorterComponent_ng_template_8_ng_container_1_Template","useI18NTranslations","ColumnSorterComponent","constructor","elementRef","columnSorterService","breakpointObserver","columnsChange","EventEmitter","columnsUpdated","columnNamesUpdated","isMobile$","observe","Breakpoints","Handset","pipe","map","result","matches","shareReplay","refCount","bufferSize","ngOnInit","calculateColumnInformation","ngOnChanges","changes","columns","columnNames","columnConfigs","ngAfterViewInit","nativeElement","classList","columnInfo","colConfig","columnId","columnName","currElement","index","loadSavedColumnInfo","saveName","emitColumns","event","moveItemInArray","item","data","columnIndex","currentIndex","colFound","find","col","saveColumns","window","requestAnimationFrame","emit","filter","colInfo","saveColumnInfo","ɵɵdirectiveInject","ElementRef","ColumnSorterService","BreakpointObserver","selectors","inputs","outputs","features","ɵɵProvidersFeature","ɵɵNgOnChangesFeature","decls","vars","consts","template","rf","ctx","ColumnSorterComponent_button_0_Template","ColumnSorterComponent_button_2_Template","ColumnSorterComponent_div_7_Template","ColumnSorterComponent_ng_template_8_Template","ɵɵtemplateRefExtractor","_ColumnSorterComponent","VaMaterialTableComponent","selectors","ngContentSelectors","_c1","decls","vars","consts","template","rf","ctx","ɵɵelementStart","ɵɵprojection","ɵɵelementEnd","_VaMaterialTableComponent","VaMaterialTableModule","CommonModule","MatTableModule","MatSortModule","MatButtonModule","MatIconModule","MatCardModule","DragDropModule","MatMenuModule","MatCheckboxModule","TranslateModule","LexiconModule","forChild","componentName","WEBLATE_COMPONENT_NAME","baseTranslation","MatDialogModule","VaSearchBoxModule","MatTabsModule","_VaMaterialTableModule","nextId","BADGE_CONTENT_CLASS","badgeApps","_MatBadgeStyleLoader","__MatBadgeStyleLoader","t","ɵɵdefineComponent","ɵɵStandaloneFeature","rf","ctx","MatBadge","_MatBadge","value","newContent","newDescription","_ngZone","_elementRef","_ariaDescriber","_renderer","_animationMode","inject","InteractivityChecker","DOCUMENT","appRef","ApplicationRef","componentRef","createComponent","EnvironmentInjector","badgeElement","activeClass","newContentNormalized","colorPalette","classList","badges","ɵɵdirectiveInject","NgZone","ElementRef","AriaDescriber","Renderer2","ANIMATION_MODULE_TYPE","ɵɵdefineDirective","ɵɵclassProp","InputFlags","booleanAttribute","ɵɵInputTransformsFeature","MatBadgeModule","_MatBadgeModule","ɵɵdefineNgModule","ɵɵdefineInjector","A11yModule","MatCommonModule","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵadvance","ɵɵtextInterpolate","ctx_r0","statusTitle","ɵɵlistener","ɵɵrestoreView","_r2","ɵɵnextContext","ɵɵresetView","actionCallback","actionTitle","VaStatusBannerComponent","constructor","border","selectors","inputs","statusText","type","decls","vars","consts","template","rf","ctx","ɵɵtemplate","VaStatusBannerComponent_span_4_Template","VaStatusBannerComponent_div_7_Template","ɵɵproperty","ɵɵpureFunction3","_c0","ɵɵtextInterpolate1","ɵɵpureFunction1","_c1","_VaStatusBannerComponent","VaStatusBannerModule","CommonModule","MatIconModule","_VaStatusBannerModule","ɵɵelement","ɵɵelementStart","ɵɵelementEnd","ɵɵadvance","ɵɵproperty","ctx_r0","listItemRowStyles","ListStencilComponent","constructor","showHeader","numRows","rowHeight","sidePadding","matElevation","rows","ngOnInit","n","push","height","padding","selectors","inputs","decls","vars","consts","template","rf","ctx","ɵɵtemplate","ListStencilComponent_div_1_Template","ListStencilComponent_div_2_Template","_ListStencilComponent","VaStencilsModule","CommonModule","MatCardModule","MatIconModule","MatInputModule","MatSelectModule","MatExpansionModule","MatCheckboxModule","_VaStencilsModule","ɵɵelementStart","ɵɵlistener","ɵɵrestoreView","_r1","config_r2","ɵɵnextContext","$implicit","ctx_r2","ɵɵresetView","clicked","ɵɵtext","ɵɵelementEnd","ɵɵproperty","tooltip","tooltipPosition","color","disabled","ɵɵadvance","ɵɵtextInterpolate1","title","_r4","_r5","ɵɵstyleProp","iconColor","ɵɵtextInterpolate","icon","_r6","ɵɵelement","ɵɵclassMap","classIcon","ɵɵelementContainerStart","ɵɵtemplate","VaButtonComponent_ng_container_0_ng_container_1_ng_container_3_button_1_Template","VaButtonComponent_ng_container_0_ng_container_1_ng_container_3_button_2_Template","VaButtonComponent_ng_container_0_ng_container_1_button_1_Template","VaButtonComponent_ng_container_0_ng_container_1_button_2_Template","VaButtonComponent_ng_container_0_ng_container_1_ng_container_3_Template","type","link","url","ɵɵsanitizeUrl","target","_r7","VaButtonComponent_ng_container_0_ng_container_2_ng_container_3_mat_icon_2_Template","VaButtonComponent_ng_container_0_ng_container_2_ng_container_3_span_3_Template","VaButtonComponent_ng_container_0_ng_container_2_a_1_Template","VaButtonComponent_ng_container_0_ng_container_2_a_2_Template","VaButtonComponent_ng_container_0_ng_container_2_ng_container_3_Template","_r8","VaButtonComponent_ng_container_0_ng_container_3_ng_container_3_a_1_mat_icon_1_Template","VaButtonComponent_ng_container_0_ng_container_3_ng_container_3_a_1_span_2_Template","VaButtonComponent_ng_container_0_ng_container_3_ng_container_3_a_1_Template","VaButtonComponent_ng_container_0_ng_container_3_a_1_Template","VaButtonComponent_ng_container_0_ng_container_3_a_2_Template","VaButtonComponent_ng_container_0_ng_container_3_ng_container_3_Template","VaButtonComponent_ng_container_0_ng_container_1_Template","VaButtonComponent_ng_container_0_ng_container_2_Template","VaButtonComponent_ng_container_0_ng_container_3_Template","external","VaButtonComponent","buttons","Array","isArray","config","button","onClick","selectors","inputs","decls","vars","consts","template","rf","ctx","VaButtonComponent_ng_container_0_Template","_VaButtonComponent","VaButtonModule","CommonModule","RouterModule","VaIconModule","MatIconModule","MatTooltipModule","MatButtonModule","GalaxyTooltipModule","_VaButtonModule","VaCheckboxComponent","selectors","inputs","config","decls","vars","consts","template","rf","ctx","ɵɵelementStart","ɵɵlistener","$event","onClick","checked","ɵɵelementEnd","ɵɵproperty","disabled","indeterminate","_VaCheckboxComponent","VaCheckboxModule","CommonModule","MatCheckboxModule","_VaCheckboxModule","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵpropertyInterpolate","ctx_r0","config","color","ɵɵadvance","ɵɵtextInterpolate1","text","VaChipComponent","selectors","inputs","decls","vars","consts","template","rf","ctx","ɵɵtemplate","VaChipComponent_mat_chip_option_1_Template","ɵɵproperty","_VaChipComponent","VaChipModule","CommonModule","MatChipsModule","_VaChipModule","VaExpandDirective","constructor","resolver","container","ngOnChanges","component","instance","item","view","ngOnInit","resolveComponentFactory","createComponent","ɵɵdirectiveInject","ComponentFactoryResolver","ViewContainerRef","selectors","inputs","features","ɵɵNgOnChangesFeature","_VaExpandDirective","VaExpandModule","CommonModule","_VaExpandModule","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵadvance","ɵɵtextInterpolate","ctx_r0","title","ɵɵelement","menu_r3","leftIcon","ɵɵproperty","leftIconImageUrl","text","rightIcon","ɵɵlistener","ɵɵrestoreView","_r2","ɵɵnextContext","$implicit","ɵɵresetView","onClick","ɵɵtemplate","VaMenuComponent_ng_container_7_button_2_mat_icon_1_Template","VaMenuComponent_ng_container_7_button_2_va_icon_2_Template","VaMenuComponent_ng_container_7_button_2_mat_icon_5_Template","disabled","toolTip","_r4","VaMenuComponent_ng_container_7_a_3_mat_icon_1_Template","VaMenuComponent_ng_container_7_a_3_va_icon_2_Template","VaMenuComponent_ng_container_7_a_3_mat_icon_5_Template","link","url","target","_r5","VaMenuComponent_ng_container_7_a_4_mat_icon_1_Template","VaMenuComponent_ng_container_7_a_4_va_icon_2_Template","VaMenuComponent_ng_container_7_a_4_mat_icon_5_Template","ɵɵsanitizeUrl","ɵɵelementContainerStart","VaMenuComponent_ng_container_7_hr_1_Template","VaMenuComponent_ng_container_7_button_2_Template","VaMenuComponent_ng_container_7_a_3_Template","VaMenuComponent_ng_container_7_a_4_Template","showTopDivider","external","VaMenuComponent","menuItem","click","triggerIcon","config","selectors","inputs","decls","vars","consts","template","rf","ctx","VaMenuComponent_span_1_Template","VaMenuComponent_ng_container_7_Template","menuRef_r6","menuItems","_VaMenuComponent","VaMenuModule","CommonModule","RouterModule","VaIconModule","MatIconModule","MatMenuModule","MatButtonModule","GalaxyTooltipModule","_VaMenuModule","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵadvance","ɵɵtextInterpolate","ctx_r0","config","title","ɵɵproperty","link","url","target","queryParams","ɵɵtemplate","VaMultilineComponent_ng_template_1_a_0_Template","VaMultilineComponent_ng_template_1_a_1_Template","external","ɵɵstyleProp","description","ɵɵtextInterpolate1","subtitle","VaMultilineComponent","selectors","inputs","decls","vars","consts","template","rf","ctx","VaMultilineComponent_span_0_Template","VaMultilineComponent_ng_template_1_Template","ɵɵtemplateRefExtractor","VaMultilineComponent_span_3_Template","VaMultilineComponent_span_4_Template","titleWithUrl_r2","_VaMultilineComponent","VaMultilineModule","CommonModule","RouterModule","_VaMultilineModule","VaSwitchComponent","selectors","inputs","config","decls","vars","consts","template","rf","ctx","ɵɵelementStart","ɵɵlistener","$event","i0","ɵɵrestoreView","_r1","ɵɵresetView","onClick","checked","ɵɵtext","ɵɵelementEnd","ɵɵproperty","disabled","color","ɵɵadvance","ɵɵtextInterpolate1","toggle_r2","_VaSwitchComponent","VaSwitchModule","CommonModule","MatSlideToggleModule","_VaSwitchModule","CellDirective","constructor","resolver","container","ngOnInit","cf","resolveComponentFactory","cell","component","c","createComponent","instance","config","ɵɵdirectiveInject","ComponentFactoryResolver","ViewContainerRef","selectors","inputs","_CellDirective","TableViewModel","select","name","store","pipe","map","state","constructor","config","emptyText","loadMoreButtonText","showLoadMoreButton","store$","BehaviorSubject","columns","asObservable","distinctUntilChanged","rowStatusColorFor","loadMoreItemsTriggered","fixedTable","selection","value","next","__spreadProps","__spreadValues","addColumn","column","updatedColumns","columnExists","columnTitle","getColumnIndexWithTitle","currentColumns","i","length","title","addColumnAtIndex","index","slice","updateColumnTitled","newValue","Object","assign","updateColumnAtIndex","columnIndex","removeColumnWithTitle","deleteIndex","removeColumnAtIndex","toggleColumnWithTitle","hidden","GetSortingIndicatorClassPipe","transform","fieldname","sort","order","SortOrder","Ascending","pure","_GetSortingIndicatorClassPipe","AsTextCellPipe","cell","_AsTextCellPipe","AsObjectCellPipe","_AsObjectCellPipe","computeWidth","width","toString","GetMinWidthPipe","config","minWidth","_GetMinWidthPipe","GetMaxWidthPipe","maxWidth","_GetMaxWidthPipe","RowStatusCssPipe","item","tableViewModel","statusColor","rowStatusColorFor","_RowStatusCssPipe","TextDirectionPipe","column","alignment","_TextDirectionPipe","IsSortedPropertyPipe","sortOn","_IsSortedPropertyPipe","ɵɵelement","ɵɵstyleProp","column_r1","config","width","ɵɵelementContainerStart","ɵɵtemplate","TableComponent_table_0_colgroup_1_ng_container_1_col_1_Template","ɵɵadvance","ɵɵproperty","hidden","ɵɵelementStart","TableComponent_table_0_colgroup_1_ng_container_1_Template","ɵɵelementEnd","ɵɵpipeBind1","ctx_r1","columns$","selectAllCheckbox","ɵɵtext","ɵɵpureFunction1","_c0","ɵɵpipeBind2","column_r4","sort","ɵɵtextInterpolate1","sortOn","ɵɵlistener","ɵɵrestoreView","_r3","ɵɵnextContext","$implicit","ɵɵresetView","columnHeaderClicked","TableComponent_table_0_ng_container_5_th_1_mat_icon_7_Template","alignment","title","TableComponent_table_0_ng_container_5_th_1_Template","checkboxFor","item_r5","ɵɵtextInterpolate","textCell_r6","ɵɵelementContainer","objectCell_r7","TableComponent_table_0_ng_container_8_ng_container_4_td_1_ng_container_1_label_1_Template","TableComponent_table_0_ng_container_8_ng_container_4_td_1_ng_container_1_ng_container_3_Template","cell_r8","TableComponent_table_0_ng_container_8_ng_container_4_td_1_ng_container_1_Template","column_r9","cellForItem","TableComponent_table_0_ng_container_8_ng_container_4_td_1_Template","_r10","i_r11","index","toggleExpandViewVisible","getExpandButtonIcon","length","numberOfAdditionalColumns","expandRowView","TableComponent_table_0_ng_container_8_td_3_Template","TableComponent_table_0_ng_container_8_ng_container_4_Template","TableComponent_table_0_ng_container_8_td_6_Template","TableComponent_table_0_ng_container_8_tr_7_Template","tableViewModel","selection","selectable","expandViewVisible","TableComponent_table_0_colgroup_1_Template","TableComponent_table_0_th_4_Template","TableComponent_table_0_ng_container_5_Template","TableComponent_table_0_ng_container_8_Template","fixedLayout","sorting","selectAll","items","TableComponent_ng_container_2_div_1_span_1_Template","TableComponent_ng_container_2_div_1_Template","ɵɵpureFunction0","_c1","emptyText","_r12","loadMoreClicked","TableComponent","constructor","sortChanged","EventEmitter","expandViewVisbleIndex","loading","empty","loadMoreItemsTriggered","ngOnInit","select","column","sortOnProperty","emit","property","fieldname","order","SortOrder","Ascending","Descending","selectedItems","onClick","checked","toggleSelectAll","numSelected","numTotal","indeterminate","item","disabled","isSelected","indexOf","selectionChanged","splice","push","selectors","inputs","showLoadMore","loadingMore","outputs","decls","vars","consts","template","rf","ctx","TableComponent_table_0_Template","TableComponent_ng_container_2_Template","TableComponent_div_4_Template","TableComponent_button_5_Template","TableComponent_mat_spinner_6_Template","_TableComponent","VaTableModule","CommonModule","MatButtonModule","MatIconModule","MatProgressSpinnerModule","MatCheckboxModule","MatListModule","MatCardModule","VaButtonModule","VaCheckboxModule","VaExpandModule","VaMultilineModule","VaSwitchModule","VaMenuModule","VaChipModule","TranslateModule","_VaTableModule","import_dompurify","ɵɵelementStart","ɵɵelement","ɵɵelementEnd","ɵɵadvance","ɵɵproperty","ɵɵtext","ɵɵtextInterpolate1","ɵɵpipeBind1","ctx_r2","config","editionName","upgradeNowText","ɵɵpureFunction1","_c0","price","length","_c1","frequency","sellingPoint_r4","ɵɵsanitizeHtml","ɵɵelementContainerStart","ɵɵpipeBind2","sellingPoint_r5","text","template","ɵɵtemplate","UpgradeCTADialogComponent_ng_template_5_ng_container_0_div_15_ng_container_1_Template","UpgradeCTADialogComponent_ng_template_5_ng_container_0_div_15_ng_template_2_Template","ɵɵtemplateRefExtractor","undefined","noTemplate_r6","UpgradeCTADialogComponent_ng_template_5_ng_container_0_mat_chip_option_10_Template","UpgradeCTADialogComponent_ng_template_5_ng_container_0_div_11_Template","UpgradeCTADialogComponent_ng_template_5_ng_container_0_div_12_Template","UpgradeCTADialogComponent_ng_template_5_ng_container_0_div_14_Template","UpgradeCTADialogComponent_ng_template_5_ng_container_0_div_15_Template","ɵɵlistener","ɵɵrestoreView","_r2","ɵɵnextContext","ɵɵresetView","dialogRef","close","ɵɵtextInterpolate","imageText","imageUrl","ɵɵsanitizeUrl","sanitizedSellingPoints","templateSellingPoints","ctaText","activeOrderImageUrl","UpgradeCTADialogComponent_ng_template_5_ng_template_1_img_1_Template","activeOrderPrimaryText","activeOrderSecondaryText","UpgradeCTADialogComponent_ng_template_5_ng_container_0_Template","UpgradeCTADialogComponent_ng_template_5_ng_template_1_Template","hasActiveOrder","activeOrder_r7","UpgradeCTADialogComponent","constructor","sanitizer","isLoading","keySellingPoints","map","sellingPoint","sanitizeSellingPoint","DOMPurify","sanitize","ɵɵdirectiveInject","MatDialogRef","MAT_DIALOG_DATA","DomSanitizer","selectors","decls","vars","consts","rf","ctx","i0","_r1","UpgradeCTADialogComponent_div_4_Template","UpgradeCTADialogComponent_ng_template_5_Template","getPro_r8","_UpgradeCTADialogComponent","UpgradeCTADialogModule","CommonModule","MatDialogModule","MatIconModule","MatButtonModule","MatChipsModule","MatProgressSpinnerModule","TranslateModule","LexiconModule","forChild","componentName","WEBLATE_COMPONENT_NAME","baseTranslation","_UpgradeCTADialogModule","VaGoalTableModule","MatTableModule","TranslateModule","LexiconModule","forChild","componentName","WEBLATE_COMPONENT_NAME","baseTranslation","VaCardsModule","CommonModule","MatCardModule","MatIconModule","_VaGoalTableModule","VaSanitizePipe","constructor","domSanitizer","transform","html","sanitize","SecurityContext","HTML","ɵɵdirectiveInject","DomSanitizer","pure","_VaSanitizePipe","VaSafeHtmlModule","CommonModule","_VaSafeHtmlModule","ɵɵelementStart","ɵɵlistener","ɵɵrestoreView","_r3","ctx_r1","ɵɵnextContext","ɵɵresetView","previousImage","nextImage","ɵɵelementEnd","ɵɵproperty","getSrcSetForImage","lightboxConfig","imageUrls","currentIndex","ɵɵsanitizeUrl","_r4","_r1","close","ɵɵtext","ɵɵtemplate","VaLightboxComponent_div_0_img_6_Template","VaLightboxComponent_div_0_img_7_Template","ɵɵstyleProp","isVisible","ɵɵadvance","useSrcSet","VaLightboxComponent","constructor","closed","EventEmitter","open","config","index","image","emit","length","selectors","inputs","outputs","standalone","features","ɵɵStandaloneFeature","decls","vars","consts","template","rf","ctx","VaLightboxComponent_div_0_Template","NgIf","MatIconModule","MatIcon","MatButtonModule","MatFabButton","styles","_VaLightboxComponent","VaFullscreenLightboxService","constructor","dialog","open","config","__async","ref","VaLightboxComponent","data","height","width","componentInstance","Error","firstValueFrom","closed","asObservable","close","ɵɵinject","Dialog","factory","ɵfac","providedIn","_VaFullscreenLightboxService","ɵɵelementStart","ɵɵlistener","i_r2","ɵɵrestoreView","_r1","index","ctx_r2","ɵɵnextContext","ɵɵresetView","onClick","ɵɵelement","ɵɵelementEnd","ɵɵadvance","ɵɵproperty","imageUrl_r4","ɵɵsanitizeUrl","getSrcsetImageUrls","VaImageGalleryComponent","constructor","lightbox","clickable","imageUrl","open","imageUrls","ɵɵdirectiveInject","VaFullscreenLightboxService","selectors","inputs","standalone","features","ɵɵProvidersFeature","ɵɵStandaloneFeature","decls","vars","consts","template","rf","ctx","ɵɵtemplate","VaImageGalleryComponent_div_2_Template","NgForOf","styles","_VaImageGalleryComponent","VaNavItemListModule","CommonModule","MatButtonModule","MatIconModule","_VaNavItemListModule","VaNavItemModule","CommonModule","MatButtonModule","MatIconModule","RouterModule","_VaNavItemModule","VaNavModule","CommonModule","MatSidenavModule","MatButtonModule","MatToolbarModule","MatIconModule","_VaNavModule","ɵɵelementStart","ɵɵprojection","ɵɵelementEnd","ɵɵproperty","ɵɵpureFunction1","_c2","ctx_r0","maxHeight","_c3","ɵɵtext","ɵɵtemplate","VaNestedSelectorNestItemComponent_div_2_div_1_Template","VaNestedSelectorNestItemComponent_div_2_div_2_Template","ɵɵadvance","ctx_r1","showNest","contentNest_r3","children","length","VaNestedSelectorComponent","constructor","showSelector","showSelectorChange","EventEmitter","change","emit","hide","selectors","inputs","outputs","ngContentSelectors","_c1","decls","vars","consts","template","rf","ctx","ɵɵlistener","VaNestedSelectorComponent_div_6_Template","VaHideDirective","styles","_VaNestedSelectorComponent","VaNestedSelectorTitleComponent","_c4","_VaNestedSelectorTitleComponent","VaNestedSelectorNestComponent","_c6","_VaNestedSelectorNestComponent","VaNestedSelectorNestItemComponent","_c8","i0","ɵɵrestoreView","_r1","ɵɵresetView","VaNestedSelectorNestItemComponent_div_2_Template","_VaNestedSelectorNestItemComponent","_eref","hideEvent","onClick","event","nativeElement","contains","target","ɵɵdirectiveInject","ElementRef","hostBindings","$event","ɵɵresolveDocument","_VaHideDirective","VaNestedSelectorModule","CommonModule","_VaNestedSelectorModule","VaProductNavService","constructor","router","filters$$","BehaviorSubject","infoSidebar$$","primaryActionButton$$","secondaryActionButton$$","breadcrumbs$$","navBadges$$","search$$","showInfoIcon$$","scroll$$","toggleNav$$","Subject","isSelected","navItem","isChild","children","length","forEach","child","selected","find","ch","isActive","url","setNavItems","navItems","_navItems","map","item","events","pipe","filter","event","NavigationEnd","subscribe","setFilters","filters","next","setInfoSidebar","pageInfo","Array","isArray","setPrimaryActionButton","actionButton","setSecondaryActionButton","setBreadcrumbs","breadcrumbs","setNavBadges","navBadges","setSearch","search","setShowInfoIcon","flag","setScroll","scrollEvent","toggleNav","breadcrumbs$","asObservable","primaryActionButton$","secondaryActionButton$","infoSidebar$","filters$","navBadges$","search$","showInfoIcon$","scroll$","shareReplay","toggleNav$","value","ɵɵinject","Router","factory","ɵfac","_VaProductNavService","AtlasConfigService","constructor","config$$","ReplaySubject","config$","asObservable","pipe","debounceTime","distinctUntilChanged","a","b","JSON","stringify","shareReplay","serviceProviderId$","map","config","serviceProviderId","partnerId$","partnerId","accountId$","accountId","initialize","marketId","appId","signOutNextUrl","groupPath","next","factory","ɵfac","providedIn","_AtlasConfigService","environment","hostMap","HostService","ɵɵdefineInjectable","PlatformMode","UITheme","UserViewType","enumStringToValue","enumRef","value","AccountGroup","_AccountGroup","proto","m","kwargs","toReturn","GetLocationsRequestAccountGroups","_GetLocationsRequestAccountGroups","AssociatedLocationIDs","_AssociatedLocationIDs","Brand","_Brand","Branding","_Branding","UITheme","Theming","CenterNavigationItem","_CenterNavigationItem","ContactUsRequest","_ContactUsRequest","DropdownItem","_DropdownItem","GetDataRequest","_GetDataRequest","GetDataResponse","_GetDataResponse","UserNavigationItem","LocationData","UserSwitcherData","GetDefaultLocationRequest","_GetDefaultLocationRequest","GetDefaultLocationResponse","_GetDefaultLocationResponse","GetLanguageRequest","_GetLanguageRequest","GetLanguageResponse","_GetLanguageResponse","GetLocationsRequest","_GetLocationsRequest","GetLocationsRequestGroups","GetLocationsResponse","_GetLocationsResponse","Location","GetNavigationDataRequest","_GetNavigationDataRequest","PlatformMode","GetNavigationDataResponse","_GetNavigationDataResponse","SalesInfo","PinnedItem","UserViewType","RetentionConfig","TotalLocations","SideNavigationItem","GetSalesInfoRequest","_GetSalesInfoRequest","proto","m","kwargs","toReturn","GetSalesInfoResponse","_GetSalesInfoResponse","SalesInfo","GetLocationsRequestGroups","_GetLocationsRequestGroups","ListElevatedLocationsRequest","_ListElevatedLocationsRequest","ListElevatedLocationsResponse","_ListElevatedLocationsResponse","Location","ListLocationsRequest","_ListLocationsRequest","ListLocationsResponse","_ListLocationsResponse","_Location","AccountGroup","Brand","LocationData","_LocationData","PinnedItem","_PinnedItem","RetentionConfig","_RetentionConfig","SalesContact","_SalesContact","_SalesInfo","SetDefaultLocationRequest","_SetDefaultLocationRequest","SetLanguageRequest","_SetLanguageRequest","SideNavigationContainer","_SideNavigationContainer","proto","m","SideNavigationItem","kwargs","toReturn","_SideNavigationItem","SideNavigationSection","SideNavigationLink","_SideNavigationLink","_SideNavigationSection","Theming","_Theming","TotalLocations","_TotalLocations","UserNavigationItem","_UserNavigationItem","UserSwitcherData","_UserSwitcherData","AtlasApiService","http","hostService","HttpHeaders","r","request","GetDataRequest","map","resp","GetDataResponse","GetNavigationDataRequest","GetNavigationDataResponse","GetSalesInfoRequest","GetSalesInfoResponse","GetLocationsRequest","GetLocationsResponse","ListElevatedLocationsRequest","ListElevatedLocationsResponse","ListLocationsRequest","ListLocationsResponse","ContactUsRequest","__spreadProps","__spreadValues","SetDefaultLocationRequest","GetDefaultLocationRequest","GetDefaultLocationResponse","ɵɵinject","HttpClient","HostService","ɵɵdefineInjectable","LanguagesApiService","SetLanguageRequest","GetLanguageRequest","GetLanguageResponse","Language","LanguageMap","code","ENGLISH","label","flag","FRENCH_FRANCE","FRENCH_CANADA","CZECH","DUTCH","GERMAN","ITALIAN","SPANISH_LATIN_AMERICA","AtlasDataService","constructor","apiService","cfgService","languageService","navigationData$","config$","pipe","filter","partnerId","switchMap","config","getData","GetDataRequest","marketId","groupPath","accountGroupId","accountId","signOutNextUrl","res","JSON","stringify","toApiJson","map","locationId","locationIdFromConfig","response","tap","rememberLastResponse","startWith","getLastResponse","shareReplay","centerData$","centers","userData$","user","userSwitcherData$","userSwitcherData","username$","username","distinctUntilChanged","partnerName$","partnerName","impersonateeUsername$","impersonateeUsername","email$","email","userId$","userId","signoutUrl$","signOutUrl","notificationsEnabled$","notificationsEnabled","businessName$","locationData","businessName","address$","address","theming$","theme","UITheme","UI_THEME_LIGHT","Theming","primaryColor","primaryHoverColor","primaryActiveColor","secondaryColor","secondaryHoverColor","secondaryActiveColor","fontColor","fontDisabledColor","accentsColor","accentsActiveColor","focusColor","borderColor","language$","language","detectLanguageFromBrowser","setLanguage","lastResponse","window","navigator","Language","ENGLISH","toLowerCase","FRENCH","FRENCH_CANADA","FRENCH_FRANCE","CZECH","DUTCH","GERMAN","ITALIAN","SPANISH_LATIN_AMERICA","cfg","localStorage","setItem","o","parse","getItem","GetDataResponse","fromProto","ɵɵinject","AtlasApiService","AtlasConfigService","LanguagesApiService","factory","ɵfac","providedIn","_AtlasDataService","AtlasLanguageService","constructor","dataService","lexiconService","lexiconRootComponent","language$$","ReplaySubject","internalLanguage$","asObservable","language$","pipe","switchMap","language","next","shareReplay","languageList$","getSupportedLanguages","componentName","map","response","languages","l","code","languageCode","label","languageName","total","languageStatistics","translated","filter","of","LanguageMap","getLanguage","getLocale","setLanguage","updateConfig","take","subscribe","window","location","reload","ɵɵinject","AtlasDataService","LexiconApiService","LEXICON_ROOT_COMPONENT","factory","ɵfac","providedIn","_AtlasLanguageService","name","version","registerVersion","VERSION","Version","ɵgetDefaultInstanceOf","identifier","provided","defaultApp","providedUsingDefaultApp","it","ɵgetAllInstancesOf","app","apps","getApps","instances","instance","ɵAppCheckInstances","ɵAPP_CHECK_PROVIDER_NAME","noop","ɵZoneScheduler","zone","delegate","queueScheduler","work","delay","state","targetZone","workInZone","BlockUntilFirstOperator","subscriber","source","unscheduleTask","tap","ɵAngularFireSchedulers","ngZone","asyncScheduler","t","ɵɵinject","NgZone","ɵɵdefineInjectable","getSchedulers","schedulers","runOutsideAngular","fn","run","keepUnstableUntilFirst","obs$","ɵkeepUnstableUntilFirstFactory","getSchedulers","schedulers","BlockUntilFirstOperator","subscribeOn","observeOn","zoneWrapFn","it","macrotask","_arguments","run","ɵzoneWrap","blockUntilFirst","i","noop","ret","runOutsideAngular","Observable","resolve","reject","reason","FirebaseApp","app","FirebaseApps","getApps","defaultFirebaseAppFactory","provided","FirebaseApp","getApp","PROVIDED_FIREBASE_APPS","InjectionToken","DEFAULT_FIREBASE_APP_PROVIDER","Optional","FIREBASE_APPS_PROVIDER","FirebaseApps","firebaseAppFactory","fn","zone","injector","app","FirebaseAppModule","platformId","registerVersion","VERSION","t","ɵɵinject","PLATFORM_ID","ɵɵdefineNgModule","ɵɵdefineInjector","provideFirebaseApp","deps","NgZone","Injector","ɵAngularFireSchedulers","getApp","ɵzoneWrap","initializeApp","ɵzoneWrap","APP_CHECK_STATES","DEFAULT_STATE","DEBUG_STATE","getStateReference","app","getDebugState","DEBUG_STATE","BASE_ENDPOINT","EXCHANGE_DEBUG_TOKEN_METHOD","TOKEN_REFRESH_TIME","ONE_DAY","Refresher","operation","retryPolicy","getWaitDuration","lowerBound","upperBound","hasSucceeded","__async","Deferred","_e","sleep","error","currentErrorWaitInterval","ms","resolve","ERRORS","ERROR_FACTORY","ErrorFactory","ensureActivated","app","getStateReference","ERROR_FACTORY","exchangeToken","_0","_1","__async","url","body","heartbeatServiceProvider","headers","heartbeatService","heartbeatsHeader","options","response","originalError","ERROR_FACTORY","responseBody","match","timeToLiveAsNumber","now","getExchangeDebugTokenRequest","app","debugToken","projectId","appId","apiKey","BASE_ENDPOINT","EXCHANGE_DEBUG_TOKEN_METHOD","DB_NAME","DB_VERSION","STORE_NAME","dbPromise","getDBPromise","resolve","reject","request","DB_NAME","DB_VERSION","event","_a","ERROR_FACTORY","db","STORE_NAME","e","writeTokenToIndexedDB","app","token","write","computeKey","write","key","value","__async","transaction","getDBPromise","STORE_NAME","request","resolve","reject","_event","event","_a","ERROR_FACTORY","computeKey","app","logger","Logger","writeTokenToStorage","app","token","isIndexedDBAvailable","writeTokenToIndexedDB","e","logger","isDebugMode","getDebugState","getDebugToken","__async","state","defaultTokenErrorData","formatDummyToken","tokenErrorData","base64","getToken$2","appCheck","forceRefresh","__async","app","ensureActivated","state","getStateReference","token","error","isValid","cachedToken","writeTokenToStorage","shouldCallListeners","isDebugMode","exchangeToken","getExchangeDebugTokenRequest","getDebugToken","tokenFromDebugExchange","e","logger","interopTokenResult","makeDummyTokenResult","notifyTokenListeners","getLimitedUseToken$1","provider","debugToken","addTokenListener","type","listener","onError","tokenObserver","validToken","initTokenRefresher","removeTokenListener","newObservers","refresher","createTokenRefresher","Refresher","result","nextRefreshTimeMillis","latestAllowableRefresh","TOKEN_REFRESH_TIME","observers","observer","AppCheckService","heartbeatServiceProvider","tokenObservers","factory","internalFactory","name","version","APP_CHECK_NAME","APP_CHECK_NAME_INTERNAL","registerAppCheck","_registerComponent","Component","container","app","heartbeatServiceProvider","factory","_identifier","_appcheckService","appCheck","internalFactory","registerVersion","name","version","LOCALHOSTS","isLocalhost","name","version","firebase","noopFunctions","ɵlazySDKProxy","klass","observable","zone","options","_","name","promise","mod","ret","res","self","args","it","FirebaseApp","app","FIREBASE_OPTIONS","InjectionToken","FIREBASE_APP_NAME","ɵfirebaseAppFactory","options","zone","nameOrConfig","name","config","firebase","hmr","log$1","level","args","isDevMode","ɵcacheInstance","cacheKey","moduleName","appName","fn","deps","instance","cachedDeps","it","matchDep","log","IS_HMR","newInstance","a","b","level","args","isDevMode","USE_EMULATOR","InjectionToken","SETTINGS","TENANT_ID","LANGUAGE_CODE","USE_DEVICE_LANGUAGE","PERSISTENCE","ɵauthFactory","app","zone","useEmulator","tenantId","languageCode","useDeviceLanguage","settings","persistence","ɵcacheInstance","auth","k","v","AngularFireAuth","options","name","platformId","schedulers","_appCheckInstances","logins","Subject","of","observeOn","switchMap","map","ɵfirebaseAppFactory","shareReplay","isPlatformServer","first","redirectResult","it","keepUnstableUntilFirst","authStateChanged","Observable","sub","next","err","idTokenChanged","switchMapTo","subscribeOn","user","from","merge","filter","credential","ɵlazySDKProxy","_","val","t","ɵɵinject","FIREBASE_OPTIONS","FIREBASE_APP_NAME","PLATFORM_ID","NgZone","ɵAngularFireSchedulers","ɵAppCheckInstances","ɵɵdefineInjectable","AngularFireAuthModule","firebase","VERSION","ɵɵdefineNgModule","ɵɵdefineInjector","name","version","validateSetOptions","methodName","options","FirestoreError","assertUint8ArrayAvailable","assertBase64Available","__PRIVATE_isBase64Available","Blob","_Blob","_delegate","base64","Bytes","array","other","isPartialObserver","obj","implementsAnyMethods","methods","object","method","IndexedDbPersistenceProvider","firestore","forceOwnership","enableIndexedDbPersistence","enableMultiTabIndexedDbPersistence","clearIndexedDbPersistence","Firestore","databaseIdOrApp","_persistenceProvider","DatabaseId","settingsLiteral","currentSettings","__PRIVATE_logWarn","host","port","connectFirestoreEmulator","enableNetwork","disableNetwork","settings","synchronizeTabs","experimentalForceOwningTab","__PRIVATE_validateIsNotUsedTogether","waitForPendingWrites","arg","onSnapshotsInSync","pathString","CollectionReference","collection","e","replaceFunctionName","DocumentReference","doc","collectionId","Query","collectionGroup","updateFunction","runTransaction","transaction","Transaction","ensureFirestoreConfigured","WriteBatch","mutations","executeWrite","bundleData","loadBundle","namedQuery","expQuery","UserDataWriter","AbstractUserDataWriter","bytes","key","setLogLevel","level","_firestore","documentRef","ref","castReference","result","DocumentSnapshot","data","dataOrField","value","moreFieldsAndValues","FirestoreDataConverter","_FirestoreDataConverter","_userDataWriter","snapshot","expSnapshot","QueryDocumentSnapshot","modelObject","converter","converterMapByFirestore","untypedConverterByConverter","instance","_DocumentReference","path","DocumentKey","getModularInstance","refEqual","setDoc","fieldOrUpdateData","updateDoc","deleteDoc","args","extractSnapshotOptions","observer","wrapObserver","onSnapshot","snap","getDocFromCache","getDocFromServer","getDoc","original","updated","wrapper","_a","_b","userObserver","val","fieldPath","snapshotEqual","__PRIVATE_debugAssert","_Query","opStr","query","where","directionStr","orderBy","n","limit","limitToLast","startAt","startAfter","endBefore","endAt","queryEqual","getDocsFromCache","getDocsFromServer","getDocs","QuerySnapshot","DocumentChange","docChange","callback","thisArg","_CollectionReference","docRef","documentPath","addDoc","__PRIVATE_cast","FieldPath","_FieldPath","fieldNames","FieldPath$1","FieldValue","_FieldValue","delegate","serverTimestamp","deleteField","elements","arrayUnion","arrayRemove","increment","firestoreNamespace","GeoPoint","Timestamp","fe","configureForFirebase","firebase","firestoreFactory","Component","container","app","firestoreExp","registerFirestore","_fromRef","ref","scheduler","asyncScheduler","Observable","subscriber","unsubscribe","fromRef","fromDocRef","startWith","pairwise","map","snapshots","priorPayload","payload","fromCollectionRef","AngularFirestoreDocument","afs","data","options","path","queryFn","collectionRef","query","associateQuery","AngularFirestoreCollection","keepUnstableUntilFirst","__spreadProps","__spreadValues","from","docChanges","actionTuple","priorAction","action","actions","change","currentDoc","currentIndex","docChange","d","priorDoc","sortedChanges","events","scan","current","changes","combineChanges","it","distinctUntilChanged","c","combineChange","sliceAndSplice","original","start","deleteCount","args","returnArray","combined","copiedArray","validateEventsArray","source","filter","prior","validatedEvents","a","AngularFirestoreCollectionGroup","ENABLE_PERSISTENCE","InjectionToken","PERSISTENCE_SETTINGS","SETTINGS","USE_EMULATOR","AngularFirestore","name","shouldEnablePersistence","settings","platformId","zone","schedulers","persistenceSettings","_useEmulator","auth","useAuthEmulator","authSettings","tenantId","languageCode","useDeviceLanguage","persistence","_appCheckInstances","app","ɵfirebaseAppFactory","useEmulator","ɵauthFactory","ɵcacheInstance","firestore","isPlatformServer","enablePersistence","e","of","pathOrRef","refInZone","collectionId","queryGroupFn","collectionGroup","t","ɵɵinject","FIREBASE_OPTIONS","FIREBASE_APP_NAME","PLATFORM_ID","NgZone","ɵAngularFireSchedulers","AngularFireAuth","TENANT_ID","LANGUAGE_CODE","USE_DEVICE_LANGUAGE","PERSISTENCE","ɵAppCheckInstances","ɵɵdefineInjectable","AngularFirestoreModule","firebase","VERSION","ɵɵdefineNgModule","ɵɵdefineInjector","AtlasMenuService","constructor","closeMenuEventSource","Subject","closeMenuEvent$","asObservable","closeMenu","id","next","factory","ɵfac","providedIn","_AtlasMenuService","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵadvance","ɵɵtextInterpolate","ctx_r0","icon","ɵɵtemplate","MenuItemComponent_a_1_i_1_Template","ɵɵpropertyInterpolate","isConquerLocalLink","url","ɵɵproperty","ɵɵsanitizeUrl","ɵɵtextInterpolate1","label","MenuItemComponent_a_2_i_1_Template","route","MenuItemComponent_span_3_i_1_Template","MenuItemComponent","constructor","menuService","closeOnClick","clicked","closeMenu","parentMenuId","RegExp","test","ɵɵdirectiveInject","AtlasMenuService","selectors","inputs","disabled","ngContentSelectors","_c0","decls","vars","consts","template","rf","ctx","ɵɵlistener","MenuItemComponent_a_1_Template","MenuItemComponent_a_2_Template","MenuItemComponent_span_3_Template","ɵɵprojection","ɵɵclassProp","_MenuItemComponent","Guid","newGuid","replace","c","r","Math","random","toString","MenuComponent","constructor","elRef","menuService","onClose","EventEmitter","onOpen","_destroyOpenSubscriptions$$","Subject","_destroyed$$","_open$$","BehaviorSubject","id","isOpen","getValue","next","ngOnInit","relative","nativeElement","parentElement","style","setProperty","menu","ngAfterContentChecked","menuItems","map","tab","parentMenuId","ngAfterViewInit","anchor","pipe","takeUntil","subscribe","fromEvent","document","event","pointInBounds","clientX","clientY","menuRect","anchorRect","window","repositionMenu","closeMenuEvent$","emit","filter","toggleMenu","getBoundingClientRect","pointX","pointY","rect","left","right","top","bottom","menuStyles","anchorRight","anchorBottom","setAttribute","innerWidth","width","ngOnDestroy","complete","ɵɵdirectiveInject","ElementRef","AtlasMenuService","selectors","contentQueries","rf","ctx","dirIndex","MenuItemComponent","ɵɵelementStart","ɵɵprojection","ɵɵelementEnd","ɵɵclassProp","_MenuComponent","ChipComponent","selectors","ngContentSelectors","_c0","decls","vars","template","rf","ctx","ɵɵprojection","_ChipComponent","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵadvance","ɵɵtextInterpolate","ctx_r0","iconText","ɵɵtextInterpolate1","badgeContent","ɵɵtemplate","ItemComponent_div_1_div_3_Template","ItemComponent_div_1_atlas_chip_4_Template","icon","ɵɵproperty","ItemComponent","constructor","customClass","interactable","val","isInteractable","selectors","inputs","ngContentSelectors","_c0","decls","vars","consts","template","rf","ctx","ItemComponent_div_1_Template","ɵɵprojection","ɵɵclassProp","ɵɵpureFunction1","_c1","_ItemComponent","ɵɵelement","ɵɵproperty","navItem_r1","name","entryUrl","ɵɵelementContainerStart","ɵɵtemplate","CenterSelectorComponent_ng_container_0_ng_container_4_atlas_menu_item_1_Template","ɵɵadvance","centerId","ctx_r1","serviceProviderId","ɵɵelementStart","CenterSelectorComponent_ng_container_0_ng_container_4_Template","ɵɵelementEnd","centerData","CenterSelectorComponent","constructor","ngOnInit","calculateShowSelector","ngOnChanges","showSelector","filter","item","length","selectors","inputs","features","ɵɵNgOnChangesFeature","decls","vars","consts","template","rf","ctx","CenterSelectorComponent_ng_container_0_Template","_CenterSelectorComponent","PanelContentComponent","constructor","collapsed$$","BehaviorSubject","collapsed","next","isHidden","getValue","selectors","hostVars","hostBindings","rf","ctx","ɵɵclassProp","ɵɵprojection","_PanelContentComponent","IconButtonDirective","constructor","el","renderer","setStyle","nativeElement","onMouseOver","onMouseOut","onClick","ɵɵdirectiveInject","ElementRef","Renderer2","selectors","hostBindings","rf","ctx","ɵɵlistener","_IconButtonDirective","ɵɵelementStart","ɵɵlistener","$event","ɵɵrestoreView","_r1","ctx_r1","ɵɵnextContext","ɵɵresetView","collapseClicked","ɵɵtext","ɵɵelementEnd","ɵɵclassProp","collapsed","PanelHeaderComponent","constructor","collapsedChange","EventEmitter","event","stopPropagation","emit","selectors","ngContentSelectors","_c0","decls","vars","consts","template","rf","ctx","ɵɵprojection","ɵɵtemplate","PanelHeaderComponent_div_1_Template","ɵɵadvance","ɵɵproperty","collapsible","_PanelHeaderComponent","PanelComponent","constructor","collapsed$$","BehaviorSubject","collapsed$","collapsible","_destroyed$$","Subject","collapsed","getValue","next","collapsedClass","updateChildrenCollapsed","header","content","ngAfterContentInit","pipe","distinctUntilChanged","takeUntil","subscribe","isCollapsed","collapsedChange","ngOnChanges","changes","ngOnDestroy","complete","selectors","contentQueries","rf","ctx","dirIndex","PanelHeaderComponent","PanelContentComponent","ɵɵclassProp","ɵɵprojection","_PanelComponent","LoaderComponent","constructor","thickness","selectors","inputs","size","decls","vars","consts","template","rf","ctx","ɵɵelementStart","ɵɵelement","ɵɵelementEnd","ɵɵstyleProp","_LoaderComponent","ɵɵelement","ɵɵproperty","ButtonComponent","constructor","color","onClick","EventEmitter","onButtonClick","event","emit","stopPropagation","stopImmediatePropagation","selectors","inputs","loading","disabled","raised","outputs","ngContentSelectors","_c0","decls","vars","consts","template","rf","ctx","ɵɵelementStart","ɵɵlistener","$event","ɵɵprojection","ɵɵelementEnd","ɵɵtemplate","ButtonComponent_atlas_loader_4_Template","ɵɵadvance","ɵɵclassProp","_ButtonComponent","CheckboxComponent","constructor","color","changed","Array","touched","value","innerValue","forEach","f","touch","writeValue","registerOnChange","fn","push","registerOnTouched","selectors","inputs","disabled","features","ɵɵProvidersFeature","provide","NG_VALUE_ACCESSOR","useExisting","multi","ngContentSelectors","_c0","decls","vars","consts","template","rf","ctx","ɵɵelementStart","ɵɵelement","ɵɵlistener","ɵɵelementEnd","ɵɵprojection","ɵɵclassProp","ɵɵadvance","ɵɵproperty","_CheckboxComponent","InkBarComponent","selectors","decls","vars","template","rf","ctx","styles","_InkBarComponent","ModalContentComponent","selectors","ngContentSelectors","_c0","decls","vars","template","rf","ctx","ɵɵprojection","_ModalContentComponent","ModalFooterComponent","selectors","ngContentSelectors","_c0","decls","vars","template","rf","ctx","ɵɵprojection","_ModalFooterComponent","ModalHeaderComponent","constructor","dialog","inject","MatDialogRef","close","selectors","ngContentSelectors","_c0","decls","vars","consts","template","rf","ctx","ɵɵprojection","ɵɵelementStart","ɵɵlistener","ɵɵtext","ɵɵelementEnd","_ModalHeaderComponent","ModalComponent","constructor","dialogRef","inject","DialogRef","observer","BreakpointObserver","ngOnInit","observe","pipe","takeUntil","closed","subscribe","result","matches","updateSize","surface","overlayRef","overlayElement","querySelector","style","borderRadius","selectors","ngContentSelectors","_c0","decls","vars","template","rf","ctx","ɵɵprojection","_ModalComponent","ModalService","constructor","dialog","inject","MatDialog","openList","componentOrTemplateRef","open","width","height","maxWidth","maxHeight","autoFocus","openInformational","openFullscreen","factory","ɵfac","_ModalService","PanelDescriptionComponent","selectors","ngContentSelectors","_c0","decls","vars","template","rf","ctx","ɵɵprojection","_PanelDescriptionComponent","PanelTitleComponent","selectors","ngContentSelectors","_c0","decls","vars","template","rf","ctx","ɵɵprojection","_PanelTitleComponent","SnackbarService","constructor","visible$$","BehaviorSubject","visible$","asObservable","config$$","text","actionText","config$","text$","pipe","map","config","shareReplay","bufferSize","refCount","actionText$","show","getValue","next","timeoutHandle","window","setTimeout","close","bind","duration","clearTimeout","factory","ɵfac","providedIn","_SnackbarService","TabComponent","selectors","inputs","label","ngContentSelectors","_c0","decls","vars","template","rf","ctx","ɵɵprojection","_TabComponent","ɵɵelementStart","ɵɵlistener","label_r2","ɵɵrestoreView","_r1","$implicit","ctx_r2","ɵɵnextContext","ɵɵresetView","setActive","ɵɵtext","ɵɵelementEnd","ɵɵclassProp","ɵɵpipeBind1","activeLabel$$","ɵɵadvance","ɵɵtextInterpolate1","ɵɵtemplate","TabHeaderComponent_div_0_div_3_Template","ɵɵelement","ɵɵproperty","labels","TabHeaderComponent","constructor","renderer","selected","EventEmitter","ReplaySubject","_destroyed$$","Subject","ngAfterViewInit","pipe","takeUntil","filter","label","subscribe","emit","_inkBar","activeTab","document","getElementById","setStyle","nativeElement","clientWidth","offsetLeft","ngOnChanges","length","next","ngOnDestroy","complete","ɵɵdirectiveInject","Renderer2","selectors","viewQuery","rf","ctx","InkBarComponent","ElementRef","TabHeaderComponent_div_0_Template","_TabHeaderComponent","TabGroupComponent","constructor","renderer","selectionChange","EventEmitter","tabLabels","_destroyed$$","Subject","ngAfterContentInit","_tabs","map","tab","nativeElement","attributes","getNamedItem","value","changes","pipe","takeUntil","subscribe","tabs","setSelectedTab","selectedTab","forEach","setStyle","emit","ngOnDestroy","next","complete","ɵɵdirectiveInject","Renderer2","selectors","contentQueries","rf","ctx","dirIndex","TabComponent","ElementRef","ɵɵelementStart","ɵɵlistener","$event","ɵɵelementEnd","ɵɵprojection","ɵɵproperty","_TabGroupComponent","matTooltipAnimations","tooltipState","trigger","state","style","opacity","transform","transition","animate","keyframes","offset","SCROLL_THROTTLE_MS","TOOLTIP_PANEL_CLASS","passiveListenerOptions","normalizePassiveListenerOptions","passive","LONGPRESS_DELAY","getMatTooltipInvalidPositionError","position","Error","MAT_TOOLTIP_SCROLL_STRATEGY","InjectionToken","MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY","overlay","scrollStrategies","reposition","scrollThrottle","MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER","provide","deps","Overlay","useFactory","MAT_TOOLTIP_DEFAULT_OPTIONS","providedIn","factory","MAT_TOOLTIP_DEFAULT_OPTIONS_FACTORY","showDelay","hideDelay","touchendHideDelay","MatTooltipDirective","_position","value","_overlayRef","_updatePosition","_tooltipInstance","show","updatePosition","disabled","_disabled","coerceBooleanProperty","hide","message","_message","_ariaDescriber","removeDescription","_elementRef","nativeElement","trim","_isTooltipVisible","_updateTooltipMessage","_ngZone","runOutsideAngular","Promise","resolve","then","describe","tooltipClass","_tooltipClass","_setTooltipClass","constructor","_overlay","_scrollDispatcher","_viewContainerRef","_platform","_focusMonitor","scrollStrategy","_dir","_defaultOptions","_hammerLoader","touchGestures","_passiveListeners","Map","_touchstartTimeout","_destroyed","Subject","_handleKeydown","e","keyCode","ESCAPE","hasModifierKey","preventDefault","stopPropagation","run","_scrollStrategy","monitor","pipe","takeUntil","subscribe","origin","addEventListener","ngOnInit","_setupPointerEvents","ngOnDestroy","window","clearTimeout","dispose","removeEventListener","forEach","listener","event","clear","next","complete","stopMonitoring","delay","_showTimeoutId","_hideTimeoutId","overlayRef","_createOverlay","_detach","_portal","ComponentPortal","TooltipComponent","attach","instance","afterHidden","toggle","isVisible","scrollableAncestors","getAncestorScrollContainers","strategy","flexibleConnectedTo","withTransformOriginOn","withFlexibleDimensions","withViewportMargin","withScrollableContainers","positionChanges","change","scrollableViewProperties","isOverlayClipped","create","direction","positionStrategy","panelClass","detachments","hasAttached","detach","getConfig","_getOrigin","_getOverlayPosition","withPositions","__spreadValues","main","fallback","isLtr","originPosition","originX","originY","x","y","_invertPosition","overlayPosition","overlayX","overlayY","_markForCheck","onMicrotaskEmpty","asObservable","take","IOS","ANDROID","set","_disableNativeGesturesIfNecessary","touchendListener","setTimeout","element","style","gestures","nodeName","userSelect","webkitUserSelect","MozUserSelect","draggable","webkitUserDrag","touchAction","ɵɵdirectiveInject","ElementRef","ScrollDispatcher","ViewContainerRef","NgZone","Platform","AriaDescriber","FocusMonitor","Directionality","selectors","inputs","ɵɵInputFlags","None","exportAs","_MatTooltipDirective","_changeDetectorRef","_breakpointObserver","_zoom","_ariaHidden","_visibility","_closeOnInteraction","_onHide","_isHandset","observe","Breakpoints","Handset","_bodyClickEvent","_handleBodyInteraction","_animationStart","_animationDone","toState","markForCheck","ChangeDetectorRef","BreakpointObserver","hostVars","hostBindings","rf","ctx","ɵɵhostProperty","ɵɵelementStart","ɵɵlistener","$event","ɵɵtext","ɵɵelementEnd","ɵɵclassProp","tmp_0_0","ɵɵpipeBind1","matches","ɵɵproperty","ɵɵadvance","ɵɵtextInterpolate1","matTooltipAnimations","tooltipState","changeDetection","_TooltipComponent","AtlasTooltipModule","ATLAS_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER","imports","A11yModule","CommonModule","OverlayModule","_AtlasTooltipModule","AtlasEmailVerificationService","constructor","iamService","sendEmailVerificationEmail","email","partnerID","nextURL","nextURLText","sendEmailVerification","UserIdentifier","namespacedEmail","namespace","pipe","map","ɵɵinject","IAMService","factory","ɵfac","providedIn","_AtlasEmailVerificationService","ɵɵelementStart","ɵɵelement","ɵɵelementEnd","EmailVerificationComponent","constructor","dataService","configService","emailVerificationService","translationService","snackbarService","brandingService","http","hostService","DateFormat","sendingVerificationEmail$$","BehaviorSubject","sendingVerificationEmail$","asObservable","email$","partnerId$","logoURL$","pipe","switchMap","partnerId","getBranding","take","map","branding","logoUrl","dialogRef","inject","MatDialogRef","verificationDeadline","Date","UTC","sendVerificationEmail","next","combineLatest","email","sendEmailVerificationEmail","window","location","href","remindMeLaterEmailVerification","subscribe","stream","translation","openSuccessSnack","close","openErrorSnack","remindMeLater","post","hostWithScheme","headers","HttpHeaders","withCredentials","observe","_EmailVerificationComponent","EMAIL_VERIFICATION_PARAM_ID","ɵɵdirectiveInject","AtlasDataService","AtlasConfigService","AtlasEmailVerificationService","TranslateService","SnackbarService","BrandingV2Service","HttpClient","HostService","selectors","decls","vars","consts","template","rf","ctx","ɵɵtext","ɵɵlistener","i0","ɵɵrestoreView","_r1","ɵɵresetView","ɵɵtemplate","EmailVerificationComponent_ng_template_26_Template","ɵɵtemplateRefExtractor","EmailVerificationComponent_ng_template_31_Template","ɵɵpropertyInterpolate","ɵɵpipeBind1","ɵɵsanitizeUrl","ɵɵadvance","ɵɵtextInterpolate1","ɵɵproperty","ɵɵpipeBind2","ɵɵpureFunction1","_c0","medium","ɵɵsanitizeHtml","ɵɵtextInterpolate","ɵɵprojection","ɵɵelementStart","ɵɵlistener","ɵɵrestoreView","_r1","ctx_r1","ɵɵnextContext","ɵɵresetView","selectLanguage","ɵɵtemplate","LanguageListItemComponent_a_2_ng_content_1_Template","ɵɵelementEnd","ɵɵadvance","ɵɵproperty","item_r3","LanguageListItemComponent_div_4_ng_content_1_Template","ɵɵtext","ɵɵtextInterpolate1","language","flag","ɵɵpipeBind1","labels_r4","target","ɵɵpureFunction1","_c1","current","LanguageListItemComponent_ng_template_8_i_0_Template","LanguageListItemComponent_ng_template_8_span_1_Template","LanguageListItemComponent_ng_template_8_div_2_Template","languageLabels$","LanguageListItemComponent","constructor","languageService","translateService","translateLoader","languageSelected","EventEmitter","isCurrentLanguage","language$","pipe","map","code","ngOnChanges","combineLatest","stream","toLowerCase","label","getTranslation","currentTranslation","targetTranslation","languageLabels","forEach","key","emit","ɵɵdirectiveInject","AtlasLanguageService","TranslateService","TranslateLoader","selectors","inputs","outputs","features","ɵɵNgOnChangesFeature","ngContentSelectors","_c0","decls","vars","consts","template","rf","ctx","LanguageListItemComponent_a_2_Template","LanguageListItemComponent_div_4_Template","LanguageListItemComponent_i_6_Template","LanguageListItemComponent_ng_template_8_Template","ɵɵtemplateRefExtractor","ɵɵclassProp","_LanguageListItemComponent","ɵɵelementStart","ɵɵlistener","$event","ɵɵrestoreView","_r1","ctx_r1","ɵɵnextContext","ɵɵresetView","selectLanguage","ɵɵelementEnd","ɵɵproperty","language_r3","LanguageListComponent","constructor","languages","languageSelected","EventEmitter","language","emit","selectors","inputs","outputs","decls","vars","consts","template","rf","ctx","ɵɵtemplate","LanguageListComponent_atlas_language_list_item_0_Template","_LanguageListComponent","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵadvance","ɵɵproperty","ɵɵtextInterpolate1","ɵɵpipeBind1","translatePortalUrl_r1","ɵɵsanitizeUrl","ɵɵtemplate","AtlasLanguageSelectorModalComponent_atlas_modal_footer_11_a_4_Template","AtlasLanguageSelectorModalComponent_atlas_modal_footer_11_a_5_Template","ctx_r1","urlIsExternal","AtlasLanguageSelectorModalComponent","constructor","languageService","dataService","translatePortalUrl$","languages$","languageList$","pipe","map","langs","sort","l1","l2","label","localeCompare","impersonating$","impersonateeUsername$","Boolean","languageSelected","language","setLanguage","url","startsWith","ɵɵdirectiveInject","AtlasLanguageService","AtlasDataService","LEXICON_TRANSLATE_PORTAL_URL","selectors","decls","vars","consts","template","rf","ctx","AtlasLanguageSelectorModalComponent_div_5_Template","ɵɵlistener","$event","AtlasLanguageSelectorModalComponent_atlas_modal_footer_11_Template","_AtlasLanguageSelectorModalComponent","en_devel_exports","__export","COMMON","DROPDOWN_MENU","EMAIL_VERIFICATION","LANGUAGE","MENU_TOGGLE","NOTIFICATIONS","SWITCH_LANGUAGE_MODAL","USER_LANGUAGE_MODAL","USER_SWITCHER_MODAL","VBC_NOTIFICATIONS","en_devel_default","demoHost","prodHost","HostService","constructor","environmentService","httpsHost","_httpsHost","getEnvironment","Environment","LOCAL","TEST","DEMO","PROD","ɵɵinject","EnvironmentService","factory","ɵfac","providedIn","_HostService","Section","constructor","kwargs","Object","assign","fromProto","proto","m","Activity","tags","map","Product","activities","SectionContainer","products","section","GetSectionsResponse","data","GetSectionsRequest","toApiJson","accountGroupId","email","partnerId","marketId","locale","toReturn","SaveSectionsRequest","constructor","kwargs","Object","assign","toApiJson","accountGroupId","partnerId","section","setting","valueFlag","toReturn","GetByAccountGroupIdRequest","GetByAccountGroupIdSetting","fromProto","proto","m","subject_id","subjectId","unified_user_id","unifiedUserId","notificationsEnabled","notifications_enabled","GetByAccountGroupIdResponse","data","map","NotificationsApiService","constructor","http","hostService","getSections","r","request","toApiJson","GetSectionsRequest","url","URL","httpsHost","apiJson","key","searchParams","append","get","href","apiOptions","pipe","map","resp","GetSectionsResponse","fromProto","share","saveSections","SaveSectionsRequest","post","getSettingsByAccountGroupId","GetByAccountGroupIdRequest","GetByAccountGroupIdResponse","withCredentials","ɵɵinject","HttpClient","HostService","factory","ɵfac","providedIn","_NotificationsApiService","NotificationsService","constructor","apiService","sections$","accountGroupId","email","partnerId","locale","getSections","saveSections$","s","sections","Array","length","settings","valueFlags","i","setting","section","valueFlag","saveSections","pipe","map","getByAccountGroupId$","getSettingsByAccountGroupId","ɵɵinject","NotificationsApiService","factory","ɵfac","providedIn","_NotificationsService","AtlasAccountNotificationService","constructor","dataService","config","languageService","notificationsService","errors$$","BehaviorSubject","notificationSectionsErrors$","notificationSections$","combineLatest","email$","partnerId$","accountId$","language$","pipe","switchMap","email","partnerId","accountGroupId","language","sections$","tap","next","map","resp","data","catchError","err","of","shareReplay","bufferSize","refCount","ɵɵinject","AtlasDataService","AtlasConfigService","AtlasLanguageService","NotificationsService","factory","ɵfac","providedIn","_AtlasAccountNotificationService","ContentType","NotificationMedium","PersonaType","NotificationStatus$1","NotificationStatus","Status","enumStringToValue$4","enumRef","value","AccessRequirement","_AccessRequirement","proto","m","Resource","kwargs","toReturn","MediumConfigurationBundleConfiguration","_MediumConfigurationBundleConfiguration","Template","NotificationTypeEmail","_NotificationTypeEmail","NotificationTypeEmailParticipantTemplate","MediumConfigurationEmailConfiguration","_MediumConfigurationEmailConfiguration","MediumConfigurationEmailConfigurationParticipantTemplate","Hydrator","_Hydrator","TemplateInlineTemplate","_TemplateInlineTemplate","MediumConfiguration","_MediumConfiguration","MediumConfigurationWebConfiguration","NotificationType","_NotificationType","NotificationTypeWeb","NotificationTypeWebBundle","v","_MediumConfigurationEmailConfigurationParticipantTemplate","_NotificationTypeEmailParticipantTemplate","_Resource","_Template","_NotificationTypeWeb","_NotificationTypeWebBundle","_MediumConfigurationWebConfiguration","enumStringToValue$3","NotificationContextAccountGroup","_NotificationContextAccountGroup","ListNotificationsRequestFilter","_ListNotificationsRequestFilter","NotificationContext","GetNotificationSettingsRequest","_GetNotificationSettingsRequest","GetNotificationSettingsResponse","_GetNotificationSettingsResponse","NotificationSetting","GetNotificationTypeSettingsRequest","_GetNotificationTypeSettingsRequest","NotificationTypeSettingContext","GetNotificationTypeSettingsResponse","_GetNotificationTypeSettingsResponse","NotificationTypeSetting","ListNotificationTypesRequest","_ListNotificationTypesRequest","proto","m","NotificationContext","kwargs","toReturn","ListNotificationTypesResponse","_ListNotificationTypesResponse","NotificationType","ListNotificationsRequest","_ListNotificationsRequest","ListNotificationsRequestFilter","ListNotificationsResponse","_ListNotificationsResponse","Notification","_Notification","NotificationWebNotification","_NotificationContext","NotificationContextPartner","NotificationContextAccountGroup","NotificationContextUser","NotificationSetting","_NotificationSetting","enumStringToValue$3","NotificationMedium","NotificationStatus$1","NotificationTypeSetting","_NotificationTypeSetting","NotificationTypeSettingNotificationTypeSettingMediumConfiguration","NotificationTypeSettingContext","_NotificationTypeSettingContext","NotificationTypeSettingContextNotificationTypeSettingContextPartner","_NotificationTypeSettingContextNotificationTypeSettingContextPartner","_NotificationTypeSettingNotificationTypeSettingMediumConfiguration","UpdateNotificationsRequestOperation","_UpdateNotificationsRequestOperation","_NotificationContextPartner","SubscribeRequest","_SubscribeRequest","v","UpdateNotificationSettingsRequestUpdateNotificationSettingsOperation","_UpdateNotificationSettingsRequestUpdateNotificationSettingsOperation","proto","m","enumStringToValue$3","NotificationMedium","NotificationContext","NotificationStatus$1","kwargs","toReturn","UpdateNotificationSettingsRequest","_UpdateNotificationSettingsRequest","UpdateNotificationTypeSettingsRequestUpdateNotificationTypeSettingOperation","_UpdateNotificationTypeSettingsRequestUpdateNotificationTypeSettingOperation","NotificationTypeSettingContext","UpdateNotificationTypeSettingsRequest","_UpdateNotificationTypeSettingsRequest","UpdateNotificationsRequest","_UpdateNotificationsRequest","UpdateNotificationsRequestOperation","NotificationContextUser","_NotificationContextUser","NotificationWebNotification","_NotificationWebNotification","enumStringToValue","enumRef","value","BulkUpdateRequest","_BulkUpdateRequest","proto","m","Preference","BulkUpdateRequestByIdentifier","BulkUpdateRequestByUser","BulkUpdateRequestByPartner","Identifier","kwargs","toReturn","BulkUpdateResponse","_BulkUpdateResponse","_BulkUpdateRequestByIdentifier","_BulkUpdateRequestByPartner","_BulkUpdateRequestByUser","DeleteRequest","_DeleteRequest","DeleteResponse","_DeleteResponse","GetRequest","_GetRequest","GetResponse","_GetResponse","_Identifier","ListRequest","_ListRequest","ListResponse","_ListResponse","NotificationStatus","_NotificationStatus","Status","_Preference","UpdateRequest","_UpdateRequest","UpdateResponse","_UpdateResponse","environment","hostMap","HostService","ɵɵdefineInjectable","NotificationsApiService","http","hostService","HttpHeaders","r","request","ListNotificationTypesRequest","map","resp","ListNotificationTypesResponse","GetNotificationTypeSettingsRequest","GetNotificationTypeSettingsResponse","UpdateNotificationTypeSettingsRequest","__spreadProps","__spreadValues","UpdateNotificationSettingsRequest","GetNotificationSettingsRequest","GetNotificationSettingsResponse","ListNotificationsRequest","ListNotificationsResponse","UpdateNotificationsRequest","SubscribeRequest","ɵɵinject","HttpClient","NotificationsService","apiService","partnerId","pageSize","cursor","medium","flatten","operations","context","settings","setting","NotificationMedium","NotificationStatus$1","LegacyNotificationPreferenceApiService","http","hostService","HttpHeaders","r","request","GetRequest","map","resp","GetResponse","ListRequest","ListResponse","UpdateRequest","UpdateResponse","BulkUpdateRequest","BulkUpdateResponse","DeleteRequest","DeleteResponse","ɵɵinject","HttpClient","HostService","ɵɵdefineInjectable","LegacyNotificationPreferenceService","api","partnerId","marketId","userId","businessId","req","cursor","pageSize","changes","identifiers","partialIdentifiers","userIds","stripHtmlEscapeCharactersFromURL","url","replaceMap","replace","match","NotificationsService","constructor","notificationsService","loadNotifications$","partnerId","pageSize","cursor","flatten","medium","list$","pipe","map","resp","notifications","n","id","notificationId","notificationTypeId","body","web","eventTime","created","link","stripHtmlEscapeCharactersFromURL","viewed","followed","marketId","accountGroupId","hasMore","nextCursor","listNotificationTypes$","listTypes$","types","nt","configurations","conf","NotificationMedium","NOTIFICATION_MEDIUM_WEB","viewed$","notificationIds","ops","updateNotifications$","followed$","subscribe$","setting","updated","Object","assign","status","NotificationStatus","NOTIFICATION_STATUS_ENABLED","saveSettingMulti$","unsubscribe$","NOTIFICATION_STATUS_DISABLED","settings","forEach","o","push","notificationMedium","context","updateNotificationSetting$","settings$","getNotificationSetting$","getNotificationSettingStatus$","selectedSettings","filter","s","length","find","selectedSetting","ɵɵinject","factory","ɵfac","providedIn","_NotificationsService","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵadvance","ɵɵtextInterpolate1","ɵɵpipeBind1","ɵɵelement","ɵɵtextInterpolate","ɵɵproperty","ɵɵpipeBind2","ɵɵpureFunction1","_c0","url_r1","ɵɵsanitizeHtml","ɵɵelementContainerStart","ɵɵtemplate","SettingsFormComponent_ng_container_0_ng_container_3_atlas_panel_1_Template","ctx_r1","activitySettingsURL$","ɵɵlistener","$event","medium_r6","ɵɵrestoreView","_r5","$implicit","t_r7","ɵɵnextContext","ɵɵresetView","checked","set","checkboxId","notificationTypeId","value","get","isMediumEnabled","typesByCategory_r4","key","getTranslationKeyForMedium","medium_r9","_r8","SettingsFormComponent_ng_container_0_ng_container_5_section_28_atlas_checkbox_13_Template","SettingsFormComponent_ng_container_0_ng_container_5_section_28_atlas_checkbox_21_Template","name","description","availableMedium","_r3","clickCategoryIcon","SettingsFormComponent_ng_container_0_ng_container_5_section_28_Template","getCategoryIcon","getCategoryEnabledState","SettingsFormComponent_ng_container_0_div_1_Template","SettingsFormComponent_ng_container_0_ng_container_3_Template","SettingsFormComponent_ng_container_0_ng_container_5_Template","fr_r10","sections","size","error","showActivitySettings$","SettingsFormComponent_ng_template_2_div_0_Template","SettingsFormComponent_ng_template_2_div_1_Template","CategoryState","ACTIVITY_NOTIFICATION_TYPE_ID","SettingsFormComponent","partnerId","partnerId$$","next","getValue","userId","userId$$","constructor","notificationsService","translate","snackbarService","dataService","config","BehaviorSubject","partnerIdContext$","asObservable","pipe","map","partner","distinctUntilChanged","shareReplay","userIdContext$","user","App","NotificationMedium","NOTIFICATION_MEDIUM_WEB","Email","NOTIFICATION_MEDIUM_EMAIL","enabledMedium","Map","saving","VBCCenterData$","centerData$","items","find","item","centerId","bufferSize","refCount","combineLatest","accountId$","userId$","accountId","whitelabelledBusinessCenterName$","filter","vbcCenterData","rollbackCheckState","partnerSettings$","ctx","switchMap","settings$","catchError","show","instant","duration","of","settings","tap","forEach","setting","context","enabled","status","NotificationStatus","NOTIFICATION_STATUS_ENABLED","notificationMedium","userSettings$","notificationTypes$","listNotificationTypes$","types","out","t","k","category","join","ts","undefined","push","configurations","conf","disabled","enabledMediumForType","medium","hasActivityNotificationType$","some","hasVBCData$","hasData","formReady$","event","stopPropagation","catState","getCategoryState","On","setEntireCategory","Off","dirty","v","Set","type","ownProps","Object","keys","i","length","resArray","Array","add","has","Indeterminate","toggleState","mediumConfig","reset","save","take","partnerContext","userContext","ns","notificationId","split","slice","ids","NotificationSetting","NOTIFICATION_STATUS_DISABLED","saveSettingMulti$","resp","subscribe","mediumForType","indexOf","ɵɵdirectiveInject","NotificationsService","TranslateService","SnackbarService","AtlasDataService","AtlasConfigService","selectors","inputs","decls","vars","consts","template","rf","SettingsFormComponent_ng_container_0_Template","SettingsFormComponent_ng_template_2_Template","ɵɵtemplateRefExtractor","loading_r11","_SettingsFormComponent","ɵɵelementStart","ɵɵelement","ɵɵelementEnd","ɵɵadvance","ɵɵproperty","ɵɵpipeBind1","ctx_r0","partnerId$","userId$","ɵɵtext","ɵɵpropertyInterpolate","redirectUrl$","ɵɵsanitizeUrl","ɵɵtextInterpolate1","ɵɵtextInterpolate","Tab","SHOW_IN_BUSINESS_APP_FLAG","SettingsComponent","constructor","config","data","accountNotificationService","featureFlagService","accountsErrored","showInBizAppFlag$","pipe","switchMap","partnerId","batchGetStatus","map","features","showNotifications$","combineLatest","centerData$","centerData","showInBizAppFlag","some","center","centerId","showAccountsTab$","accountId$","notificationSections$","notificationSectionsErrors$","accountGroupId","showNotifications","notificationSections","notificationSectionsError","showNotificationSection","status","showPersonalTab$","showEmptyState$","account","personal","startWith","ngOnInit","accountGroupId$","agid","uid","businessAppData","find","name","entryUrl","shareReplay","take","of","subscribe","url","window","location","href","save","selected","PERSONAL","settingsForm","accountsForm","reset","disableActions","dirty","isSaving","saving","setSelected","_SettingsComponent","SETTINGS_DIALOG_PARAM_ID","ɵɵdirectiveInject","AtlasConfigService","AtlasDataService","AtlasAccountNotificationService","FeatureFlagService","selectors","viewQuery","rf","ctx","ɵɵlistener","$event","ɵɵtemplate","SettingsComponent_atlas_tab_8_Template","SettingsComponent_atlas_tab_10_Template","SettingsComponent_atlas_tab_13_Template","AtlasThemingService","constructor","themingWrapper","document","querySelector","theming","value","style","setProperty","primaryColor","primaryHoverColor","primaryActiveColor","secondaryColor","secondaryHoverColor","secondaryActiveColor","fontColor","fontDisabledColor","accentsColor","accentsActiveColor","focusColor","borderColor","factory","ɵfac","providedIn","_AtlasThemingService","AtlasTopBarService","constructor","hideCenters$$","BehaviorSubject","hideCenters$","asObservable","hideNotifications$$","hideNotifications$","hideUserDropdown$$","hideUserDropdown$","dropdownItems$$","dropdownItems$","showLanguageSelector$$","showLanguageSelector$","setCenterVisibility","visibility","next","setNotificationsVisibility","setUserDropdownVisibility","setDropdownItems","dropdownItems","setLanguageSelectorVisibility","factory","ɵfac","providedIn","_AtlasTopBarService","ɵɵelementStart","ɵɵlistener","ɵɵrestoreView","_r2","ctx_r2","ɵɵnextContext","ɵɵresetView","setBrowserLang","ɵɵtext","ɵɵelementEnd","ɵɵadvance","ɵɵtextInterpolate1","modalContent_r4","browserButtonText","ɵɵelementContainerStart","ɵɵelement","ɵɵtemplate","AtlasUserLanguageModalComponent_ng_container_1_atlas_button_4_Template","_r1","ngIf","confirmUserLang","userLanguageCode","openLanguageSelector","ɵɵproperty","promptText","ɵɵsanitizeHtml","browserLanguage","userButtonText","seeOptionsButtonText","USER_LANGUAGE_MODAL","PROMPT_WITH_BROWSER_LANG","PROMPT_WITHOUT_BROWSER_LANG","WANT_TO_SWITCH","USE_BROWSER_LANGUAGE","CONFIRM_USER_LANGUAGE","SEE_ALL_LANGUAGE_OPTIONS","AtlasUserLanguageModalComponent","constructor","dataService","translateService","translateLoader","languageService","modalService","switching","getLanguage","userLanguage$","language$","modalContent$","combineLatest","of","getTranslation","stream","pipe","map","browserLanguageCode","modalTranslations","languageTranslations","languageNames","userLanguage","prompt","replace","switchLanguage","language","updateConfig","setLanguage","openInformational","AtlasLanguageSelectorModalComponent","ɵɵdirectiveInject","AtlasDataService","TranslateService","TranslateLoader","AtlasLanguageService","ModalService","selectors","decls","vars","consts","template","rf","ctx","AtlasUserLanguageModalComponent_ng_container_1_Template","AtlasUserLanguageModalComponent_ng_template_3_Template","ɵɵtemplateRefExtractor","ɵɵpipeBind1","loading_r5","_AtlasUserLanguageModalComponent","AtlasUserLanguageModalService","constructor","dataService","languageService","modalService","init","combineLatest","language$","impersonateeUsername$","pipe","take","subscribe","userLanguage","impersonateeUsername","browserLanguage","getLanguage","toLowerCase","openInformational","AtlasUserLanguageModalComponent","ɵɵinject","AtlasDataService","AtlasLanguageService","ModalService","factory","ɵfac","_AtlasUserLanguageModalService","_prodErrorMap","prodErrorMap","_prodErrorMap","_DEFAULT_AUTH_ERROR_FACTORY","ErrorFactory","logClient","Logger","_logWarn","msg","args","LogLevel","SDK_VERSION","_logError","_fail","authOrCode","rest","createErrorInternal","_createError","_errorWithCustomMessage","auth","code","message","errorMap","prodErrorMap","ErrorFactory","createErrorInternal","authOrCode","rest","code","fullParams","_DEFAULT_AUTH_ERROR_FACTORY","_assert","assertion","debugFail","failure","message","_logError","debugAssert","_isHttpOrHttps","_getCurrentScheme","_a","_isOnline","isBrowserExtension","_getUserLanguage","navigatorLanguage","Delay","shortDelay","longDelay","debugAssert","isMobileCordova","isReactNative","_emulatorUrl","config","path","url","FetchProvider","fetchImpl","headersImpl","responseImpl","debugFail","SERVER_ERROR_MAP","DEFAULT_API_TIMEOUT_MS","_addTidIfNecessary","auth","request","_performApiRequest","_0","_1","_2","_3","__async","method","customErrorMap","_performFetchWithErrorHandling","body","params","query","querystring","headers","_getFinalTarget","fetchFn","errorMap","networkTimeout","NetworkTimeout","response","json","_makeTaggedError","errorMessage","serverErrorCode","serverErrorMessage","authError","_errorWithCustomMessage","_fail","e","FirebaseError","_getFinalTarget","auth","host","path","query","base","_emulatorUrl","NetworkTimeout","auth","_","reject","_createError","DEFAULT_API_TIMEOUT_MS","_makeTaggedError","code","response","errorParams","error","deleteAccount","auth","request","__async","_performApiRequest","getAccountInfo","auth","request","__async","_performApiRequest","utcTimestampToDateString","utcTimestamp","date","getIdTokenResult","user","forceRefresh","__async","userInternal","getModularInstance","token","claims","_parseToken","_assert","firebase","signInProvider","utcTimestampToDateString","secondsStringToMilliseconds","seconds","algorithm","payload","signature","_logError","decoded","base64Decode","e","_tokenExpiresIn","parsedToken","_logoutIfInvalidated","promise","bypassAuthState","FirebaseError","isUserInvalidated","code","ProactiveRefresh","wasError","_a","interval","UserMetadata","createdAt","lastLoginAt","metadata","_reloadWithoutSaving","auth","idToken","response","getAccountInfo","coreAccount","newProviderData","extractProviderData","providerData","mergeProviderData","oldIsAnonymous","newIsAnonymous","isAnonymous","updates","reload","original","newData","o","n","providers","providerId","provider","__rest","requestStsToken","refreshToken","_performFetchWithErrorHandling","body","querystring","tokenApiHost","apiKey","url","_getFinalTarget","headers","FetchProvider","revokeToken","request","_performApiRequest","_addTidIfNecessary","StsTokenManager","_StsTokenManager","expiresIn","oldToken","accessToken","expiresInSec","appName","object","expirationTime","manager","stsTokenManager","debugFail","assertStringOrUndefined","assertion","UserImpl","_UserImpl","uid","opt","userInfo","newUser","callback","tokensRefreshed","deleteAccount","_b","_c","_d","_e","_f","_g","_h","displayName","email","phoneNumber","photoURL","tenantId","_redirectEventId","emailVerified","plainObjectTokenManager","idTokenResponse","instanceCache","_getInstance","cls","debugAssert","instance","InMemoryPersistence","key","value","_key","_listener","inMemoryPersistence","_persistenceKeyName","PersistenceUserManager","_PersistenceUserManager","persistence","userKey","config","name","blob","newPersistence","currentUser","persistenceHierarchy","availablePersistences","selectedPersistence","userToMigrate","migrationHierarchy","p","_getBrowserName","userAgent","ua","_isIEMobile","_isFirefox","_isBlackBerry","_isWebOS","_isSafari","_isChromeIOS","_isAndroid","re","matches","getUA","_getClientVersion","clientPlatform","frameworks","reportedPlatform","_getBrowserName","getUA","reportedFrameworks","SDK_VERSION","AuthMiddlewareQueue","auth","callback","onAbort","wrappedCallback","user","resolve","reject","result","e","index","nextUser","__async","onAbortStack","beforeStateCallback","_getPasswordPolicy","_0","request","_performApiRequest","_addTidIfNecessary","MINIMUM_MIN_PASSWORD_LENGTH","PasswordPolicyImpl","response","_a","_b","_c","_d","responseOptions","password","_e","_f","status","minPasswordLength","maxPasswordLength","passwordChar","i","containsLowercaseCharacter","containsUppercaseCharacter","containsNumericCharacter","containsNonAlphanumericCharacter","AuthImpl","app","heartbeatServiceProvider","appCheckServiceProvider","config","Subscription","_DEFAULT_AUTH_ERROR_FACTORY","persistenceHierarchy","popupRedirectResolver","_getInstance","PersistenceUserManager","previouslyStoredUser","futureCurrentUser","needsTocheckMiddleware","redirectUserEventId","storedUserEventId","_assert","redirectResolver","_reloadWithoutSaving","_getUserLanguage","userExtern","getModularInstance","skipBeforeStateCallbacks","persistence","passwordPolicy","errorMap","ErrorFactory","nextOrObserver","error","completed","unsubscribe","token","idToken","revokeToken","redirectManager","resolver","id","currentUid","subscription","cb","isUnsubscribed","promise","action","framework","headers","heartbeatsHeader","appCheckToken","appCheckTokenResult","_logWarn","_castAuth","createSubscribe","observer","_generateCallbackName","prefix","_initializeAuthInstance","auth","deps","persistence","hierarchy","_getInstance","_JSLOAD_CALLBACK","_generateCallbackName","NETWORK_TIMEOUT_DELAY","Delay","_POLL_WINDOW_CLOSE_TIMEOUT","Delay","EVENT_DUPLICATION_CACHE_DURATION_MS","NETWORK_TIMEOUT","Delay","PING_TIMEOUT","Delay","FIREBASE_APP_CHECK_FRAGMENT_ID","name","version","AuthInterop","auth","_a","forceRefresh","__async","listener","unsubscribe","user","_assert","getVersionForPlatform","clientPlatform","registerAuth","_registerComponent","Component","container","deps","app","heartbeatServiceProvider","appCheckServiceProvider","apiKey","authDomain","config","_getClientVersion","authInstance","AuthImpl","_initializeAuthInstance","_instanceIdentifier","_instance","_castAuth","registerVersion","DEFAULT_ID_TOKEN_MAX_AGE","authIdTokenMaxAge","getExperimentalSetting","registerAuth","AUTH_PROVIDER_NAME","AuthInstances","ɵgetAllInstancesOf","AUTH_PROVIDER_NAME","__assign","t","s","i","n","p","DEFAULT_OPTIONS","fromRef","ref","options","Observable","subscriber","unsubscribe","onSnapshot","doc","docData","map","snap","snapToData","snapshot","_a","data","__assign","collection","query","fromRef","map","changes","collectionData","query","options","collection","map","arr","snap","snapToData","Firestore","firestore","FIRESTORE_PROVIDER_NAME","FirestoreInstances","ɵgetAllInstancesOf","PROVIDED_FIRESTORE_INSTANCES","InjectionToken","defaultFirestoreInstanceFactory","provided","defaultApp","defaultFirestore","ɵgetDefaultInstanceOf","FIRESTORE_PROVIDER_NAME","Firestore","firestoreInstanceFactory","fn","zone","injector","firestore","FIRESTORE_INSTANCES_PROVIDER","FirestoreInstances","Optional","DEFAULT_FIRESTORE_INSTANCE_PROVIDER","FirebaseApp","FirestoreModule","registerVersion","VERSION","t","ɵɵdefineNgModule","ɵɵdefineInjector","provideFirestore","deps","NgZone","Injector","ɵAngularFireSchedulers","FirebaseApps","AuthInstances","ɵAppCheckInstances","collectionData","ɵzoneWrap","docData","ɵzoneWrap","collection","ɵzoneWrap","doc","ɵzoneWrap","getFirestore","ɵzoneWrap","limit","ɵzoneWrap","orderBy","ɵzoneWrap","query","ɵzoneWrap","where","ɵzoneWrap","FirestoreDB","newChangeQuery","firestore","env","email","environment","Environment","PROD","query","collection","factory","ɵfac","_FirestoreDB","getSettingFromNotification","notification","settings","medium","NotificationMedium","NOTIFICATION_MEDIUM_WEB","settingsOfType","filter","setting","notificationTypeId","accountGroupSetting","marketSetting","partnerSetting","forEach","notificationMedium","accountGroupId","context","accountGroup","partnerId","marketId","partner","SubscriptionState","ɵɵelement","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵstyleProp","ctx_r1","getColorForValue","getDisplayContext","ɵɵadvance","ɵɵtextInterpolate1","ɵɵlistener","ɵɵrestoreView","_r3","ɵɵnextContext","ɵɵresetView","markAsUnread","ɵɵproperty","ɵɵpipeBind1","_r4","markAsRead","_r5","unsubscribeFrom","_r6","subscribeTo","ɵɵelementContainerStart","ɵɵtemplate","NotificationComponent_div_0_ng_container_18_atlas_menu_item_1_Template","NotificationComponent_div_0_ng_container_18_atlas_menu_item_2_Template","setting","status","SubscriptionStatus","NOTIFICATION_STATUS_ENABLED","NOTIFICATION_STATUS_DISABLED","_r1","onHover","onLeave","clickNotification","NotificationComponent_div_0_div_4_Template","NotificationComponent_div_0_atlas_chip_11_Template","NotificationComponent_div_0_button_14_Template","NotificationComponent_div_0_atlas_menu_item_16_Template","NotificationComponent_div_0_atlas_menu_item_17_Template","NotificationComponent_div_0_ng_container_18_Template","ɵɵpureFunction2","_c0","notification","followed","link","ɵɵsanitizeUrl","target","viewed","body","ɵɵsanitizeHtml","ɵɵtextInterpolate","relativeTime","showContext","isHovering","menuOpen","last","NotificationComponent_div_1_div_1_Template","NotificationComponent_div_1_div_2_Template","_r7","emitUndo","rollback","NotificationComponent","constructor","unsubscribe","EventEmitter","subscribe","onclick","read","unread","hover","undo","NotificationStatus","ngOnInit","formatDistanceToNow","eventTime","addSuffix","trim","host","window","location","hostname","parser","document","createElement","href","partnerId","value","COLOR_CODES","nameSum","i","length","charCodeAt","index","emit","id","selectors","inputs","visible","outputs","decls","vars","consts","template","rf","ctx","NotificationComponent_div_0_Template","NotificationComponent_div_1_Template","_NotificationComponent","FlyoutComponent","constructor","menuService","modalService","markAllAsFollowed","EventEmitter","close","closeMenu","markAllAsFollowedEvent","emit","openSettings","openList","SettingsComponent","ɵɵdirectiveInject","AtlasMenuService","ModalService","selectors","outputs","ngContentSelectors","_c0","decls","vars","consts","template","rf","ctx","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵlistener","ɵɵprojection","ɵɵadvance","ɵɵtextInterpolate1","ɵɵpipeBind1","ɵɵproperty","_FlyoutComponent","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵadvance","ɵɵtextInterpolate1","ɵɵpipeBind1","ɵɵelementContainerStart","ɵɵlistener","notification_r3","ɵɵrestoreView","_r2","$implicit","ctx_r3","ɵɵnextContext","ɵɵresetView","follow","$event","setFollowed","settings_r5","ngIf","updateSubscription","id","SubscriptionState","Subscribe","Unsubscribe","undo","ɵɵproperty","getRollbackState","showContext","last_r6","ɵɵtemplate","NotificationsComponent_ng_container_4_ng_container_2_ng_container_1_ng_container_1_Template","notifications_r7","NotificationsComponent_ng_container_4_ng_container_2_ng_container_1_Template","settingsByNotification$","loading_r8","NotificationsComponent_ng_container_4_div_1_Template","NotificationsComponent_ng_container_4_ng_container_2_Template","length","ɵɵelement","NotificationsComponent_ng_template_6_div_0_Template","NotificationsComponent_ng_template_6_div_2_Template","error$","getFirestore","name","inject","FirestoreInstances","find","fs","app","NotificationsComponent","constructor","notificationsService","envService","titleService","realtime","notificationsBuffer$$","BehaviorSubject","open$$","reload$$","reloadSettings$$","settingRollbackStates$$","titleReg","subscriptions","firestore","settings$","pipe","switchMap","partnerId","catchError","of","combineLatest","map","notifications","settings","settingsMap","forEach","notification","getSettingFromNotification","ngOnInit","collectionUpdateQuery","newChangeQuery","getEnvironment","userId","collectionUpdated$","Observable","observer","unsubscribe","onSnapshot","snapshot","data","docs","doc","next","error","console","warn","loadNotifications$","NotificationMedium","NOTIFICATION_MEDIUM_WEB","filter","resp","shareReplay","flushBuffer$","open","notifications$","buffer","buf","tap","startWith","unviewed$","n","viewed","count","setUnviewedTitle","take","subscribe","push","markNotificationsAsViewed","close","takeWhile","ids","viewed$","states","followed","notificationId","followed$","setting","newState","setSubscriptionState","result","rollbackState","__spreadProps","__spreadValues","notificationSetting","state","subscribe$","unsubscribe$","title","getTitle","matches","match","setTitle","parseInt","replacement","replace","markAllAsFollowed","ɵɵdirectiveInject","NotificationsService","EnvironmentService","Title","FirestoreDB","selectors","inputs","decls","vars","consts","template","rf","ctx","i0","_r1","NotificationsComponent_ng_container_4_Template","NotificationsComponent_ng_template_6_Template","ɵɵtemplateRefExtractor","_NotificationsComponent","ɵɵelementContainerStart","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵadvance","ɵɵproperty","user_r1","entryUrl","ɵɵsanitizeUrl","ɵɵtextInterpolate1","partnerName","partnerId","UserSwitcherModalComponent","constructor","dataService","dialogRef","userData$","userSwitcherData$","closeDialog","close","ɵɵdirectiveInject","AtlasDataService","MatDialogRef","selectors","decls","vars","consts","template","rf","ctx","ɵɵtemplate","UserSwitcherModalComponent_ng_container_5_Template","ɵɵlistener","ɵɵtextInterpolate","ɵɵpipeBind1","_UserSwitcherModalComponent","ɵɵelementContainerStart","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵadvance","ɵɵtextInterpolate1","ctx_r0","username","impersonateeUsername","ɵɵproperty","ɵɵpureFunction1","_c0","ɵɵpipeBind1","email","ɵɵtextInterpolate2","ɵɵtemplate","UserDropdownComponent_ng_container_12_div_1_Template","ɵɵelement","ɵɵlistener","ɵɵrestoreView","_r2","ɵɵnextContext","ɵɵresetView","openUserSwitcher","ɵɵtextInterpolate","partnerName","tmp_2_0","currentLanguage$","flag","_r3","showSwitchLanguageDialog","UserDropdownComponent_div_15_i_3_Template","UserDropdownComponent_div_15_span_5_Template","tmp_1_0","languageLabel$","menuItem_r4","label","url","route","_r5","$implicit","itemClick","UserDropdownComponent_ng_container_16_ng_container_1_atlas_menu_item_1_Template","UserDropdownComponent_ng_container_16_ng_container_1_atlas_menu_item_2_Template","callback","eventId","UserDropdownComponent_ng_container_16_ng_container_1_Template","extraMenuItems","menuItem_r6","text","signOutUrl","UserDropdownComponent","constructor","languageService","translateService","apiService","modalService","event","EventEmitter","languages","LanguageMap","combineLatest","language$","languageList$","pipe","map","currentLang","languageList","currentLangLower","toLowerCase","find","l","code","shareReplay","bufferSize","refCount","stream","withLatestFrom","language","translations","fallbackCode","menuItem","emit","setLanguage","updateConfig","intercept","stopPropagation","openList","AtlasLanguageSelectorModalComponent","openInformational","UserSwitcherModalComponent","ɵɵdirectiveInject","AtlasLanguageService","TranslateService","AtlasDataService","ModalService","selectors","inputs","emailVerified","menuItems","showLanguageSelector","userSwitcherData","outputs","decls","vars","consts","template","rf","ctx","UserDropdownComponent_ng_container_2_Template","UserDropdownComponent_ng_container_3_Template","UserDropdownComponent_ng_container_6_Template","UserDropdownComponent_ng_container_7_Template","$event","UserDropdownComponent_div_11_Template","UserDropdownComponent_ng_container_12_Template","UserDropdownComponent_ng_container_13_Template","UserDropdownComponent_div_14_Template","UserDropdownComponent_div_15_Template","UserDropdownComponent_ng_container_16_Template","UserDropdownComponent_atlas_menu_item_17_Template","UserDropdownComponent_atlas_menu_item_18_Template","length","_UserDropdownComponent","ɵɵelement","ɵɵproperty","ɵɵpipeBind1","ctx_r0","userId$","partnerId$","centerData$","serviceProviderId$","ɵɵelementContainerStart","ɵɵelementStart","ɵɵlistener","$event","ɵɵrestoreView","_r2","ɵɵnextContext","ɵɵresetView","propagateEvent","ɵɵelementEnd","ɵɵadvance","username$","email$","userNavigationItems$","signOutUrl$","dropdownItems$","showLanguageSelector$","impersonateeUsername$","userSwitcherData$","partnerName$","AtlasTopBarComponent","constructor","dataService","topbarService","configService","notificationsService","userLanguageModalService","event","EventEmitter","userData$","signoutUrl$","onlyVBCAccess$","combineLatest","accountId$","pipe","map","accountGroupId","centerData","find","center","centerId","distinctUntilChanged","vbcNotificationSettings$","switchMap","partnerId","getByAccountGroupId$","catchError","of","resp","data","startWith","shareReplay","bufferSize","refCount","vbcNotificationsEnabled$","userId","settings","setting","unifiedUserId","notificationsEnabled","notificationsEnabled$","hideNotifications$","dataNotificationsEnabled","hideNotifications","vbcNotificationsEnabled","onlyVBCAccess","hideCenters$","hideUserDropdown$","hideUserDropdown","dropdownItems","email","init","eventId","emit","ɵɵdirectiveInject","AtlasDataService","AtlasTopBarService","AtlasConfigService","NotificationsService","AtlasUserLanguageModalService","selectors","outputs","features","ɵɵProvidersFeature","ngContentSelectors","_c0","decls","vars","consts","template","rf","ctx","ɵɵprojection","ɵɵtemplate","AtlasTopBarComponent_atlas_notifications_1_Template","AtlasTopBarComponent_atlas_center_selector_3_Template","AtlasTopBarComponent_ng_container_5_Template","_AtlasTopBarComponent","MODAL_CONTAINER_ID","NavComponent","constructor","cfgService","apiService","sessionService","appRef","topbarService","themingService","http","hostService","modalService","event","EventEmitter","theming$","pipe","takeUntilDestroyed","subscribe","theming","ngOnInit","document","querySelector","style","setProperty","parseDropdownItems","calculateHideCenters","calculateHideNotifications","calculateShowLanguageSelector","refreshConfig","window","location","search","indexOf","SettingsComponent","SETTINGS_DIALOG_PARAM_ID","openList","getShouldShowEmailVerificationInterstitial","resp","display","openFullscreen","EmailVerificationComponent","ngOnChanges","changes","dropdownItems","hideCenters","hideNotifications","disableUserDropdown","calculateHideUserDropdown","showLanguageSelector","partnerId","marketId","accountId","serviceProviderId","signOutNextUrl","groupPath","ngOnDestroy","topbar","destroy","detachView","hostView","snackbar","modalContainer","getElementById","remove","propagateEvent","eventId","emit","setDropdownItems","parsedItems","JSON","parse","item","push","label","url","e","console","log","message","setCenterVisibility","setNotificationsVisibility","setUserDropdownVisibility","setLanguageSelectorVisibility","initialize","shouldDisplay","post","hostWithScheme","headers","HttpHeaders","withCredentials","getSessionId","skipWhile","sess","switchMap","take","ɵɵdirectiveInject","AtlasConfigService","AtlasDataService","SessionService","ApplicationRef","AtlasTopBarService","AtlasThemingService","HttpClient","HostService","ModalService","selectors","inputs","outputs","features","ɵɵNgOnChangesFeature","ngContentSelectors","_c0","decls","vars","template","rf","ctx","ɵɵelementStart","ɵɵprojection","ɵɵelementEnd","_NavComponent","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵadvance","ɵɵtextInterpolate1","ctx_r0","icon","TitleComponent","constructor","click","EventEmitter","interactable","val","isInteractable","selectors","inputs","outputs","ngContentSelectors","_c0","decls","vars","consts","template","rf","ctx","ɵɵtemplate","TitleComponent_i_2_Template","ɵɵprojection","ɵɵclassProp","ɵɵproperty","_TitleComponent","firebaseConfig","apiKey","authDomain","databaseURL","projectId","storageBucket","messagingSenderId","AtlasModule","FirestoreDB","ModalService","imports","CommonModule","RouterModule","AtlasTooltipModule","AngularFirestoreModule","AngularFireAuthModule","FormsModule","GalaxyAlertModule","GalaxyEmptyStateModule","MatIconModule","GalaxyButtonLoadingIndicatorModule","MatProgressSpinnerModule","MatButtonModule","MatSnackBarModule","LexiconModule","forChild","componentName","baseTranslation","MatDialogModule","GalaxyPipesModule","GalaxyBadgeModule","provideFirebaseApp","initializeApp","firebaseConfig","provideFirestore","getFirestore","getApp","_AtlasModule","materialModules","MatToolbarModule","MatIconModule","MatSidenavModule","MatButtonModule","MatMenuModule","MatRadioModule","MatBadgeModule","MatInputModule","MatChipsModule","VaProductNavModule","forRoot","ngModule","providers","VaProductNavService","RouterModule","CommonModule","FormsModule","LayoutModule","VaBreadcrumbsModule","VaFilterModule","TranslateModule","LexiconModule","forChild","componentName","WEBLATE_COMPONENT_NAME","baseTranslation","AtlasModule","GalaxyBadgeModule","_VaProductNavModule","WelcomeModule","provide","MatDialogRef","useValue","MAT_DIALOG_DATA","imports","CommonModule","TranslateModule","LexiconModule","forChild","componentName","WEBLATE_COMPONENT_NAME","baseTranslation","MatButtonModule","MatIconModule","MatTabsModule","MatRadioModule","MatRippleModule","MatDialogModule","MatProgressSpinnerModule","UpgradeCTADialogModule","_WelcomeModule","UIKitModule","VaCardsModule","CommonModule","VaSearchBoxModule","VaIconModule","VaTableModule","VaButtonModule","VaCheckboxModule","VaMenuModule","VaExpandModule","VaSwitchModule","VaMultilineModule","VaFilterModule","VaItemsAndStatusModule","VaMultiSelectModule","VaSearchSelectModule","VaChipModule","VaSafeHtmlModule","VaListModule","VaActionMenuModule","VaNestedSelectorModule","VaBreadcrumbsModule","VaNavModule","VaNavItemModule","VaNavItemListModule","VaProductNavModule","VaStencilsModule","CommonPipesModule","VaBadgeModule","UpgradeCTADialogModule","WelcomeModule","VaMaterialTableModule","VaFilterChipsModule","VaStatusBannerModule","ProjectMilestonesModule","VaGoalTableModule","_UIKitModule","ɵɵelementContainerStart","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵadvance","ɵɵtextInterpolate","ctx_r0","valueLabel","VaLegendItemComponent","selectors","inputs","color","label","decls","vars","consts","template","rf","ctx","ɵɵelement","ɵɵtemplate","VaLegendItemComponent_ng_container_4_Template","ɵɵstyleProp","ɵɵpipeBind2","key","params","ɵɵproperty","_VaLegendItemComponent","VaChartModule","CommonModule","TranslateModule","LexiconModule","forChild","componentName","WEBLATE_COMPONENT_NAME","baseTranslation","_VaChartModule","DEBUG","AsyncUiModel","constructor","loading$$","ReplaySubject","reloadVisibility$$","BehaviorSubject","errored$$","loading$","asObservable","errored$","pipe","tap","v","console","log","shareReplay","reloadVis$","distinctUntilChanged","dataLoading$","switchMap","vis","of","showData$","combineLatest","startWith","map","loading","errored","baseLoading$","showLoading$","showAlternateLoading$","showError$","setLoading","b","next","setErrored","setReloadVisibility","factory","ɵfac","_AsyncUiModel","SuccessDataDirective","constructor","container","template","cdr","setData","data","clear","ev","createEmbeddedView","context","$implicit","detectChanges","ɵɵdirectiveInject","ViewContainerRef","TemplateRef","ChangeDetectorRef","selectors","_SuccessDataDirective","ɵɵelementContainerStart","ɵɵelement","ɵɵadvance","ɵɵstyleProp","ɵɵpipeBind1","ctx_r0","_alternateLoadingVisibility$","ɵɵelementStart","ɵɵprojection","ɵɵelementEnd","ɵɵproperty","ɵɵpureFunction1","_c2","loadingMargin","ɵɵtemplate","AsyncUiComponent_div_3_ng_container_4_Template","loadRef_r2","children","length","errorMargin","AsyncUiComponent_div_5_ng_container_4_Template","errRef_r3","AsyncUiComponent","constructor","model","reloadVisibility","_showData$","showData$","_showLoading$","showLoading$","_showError$","showError$","showAlternateLoading$","pipe","map","v","ngOnChanges","changes","setDataOnChild","currentValue","setLoading","setErrored","setReloadVisibility","ngAfterContentInit","data","successChild","setData","ɵɵdirectiveInject","AsyncUiModel","selectors","contentQueries","rf","ctx","dirIndex","SuccessDataDirective","ɵɵNgOnChangesFeature","ngContentSelectors","_c1","decls","vars","consts","template","AsyncUiComponent_ng_container_0_Template","AsyncUiComponent_div_1_Template","AsyncUiComponent_div_3_Template","AsyncUiComponent_div_5_Template","_AsyncUiComponent","AsyncUiModule","CommonModule","MatProgressSpinnerModule","EmptyStateModule","MatProgressBarModule","_AsyncUiModule","ConfirmationService","constructor","dialog","confirm","options","height","__async","ConfirmationDialogComponent","dialogConfig","width","data","open","afterClosed","toPromise","ɵɵinject","MatDialog","factory","ɵfac","providedIn","_ConfirmationService","import_dayjs","import_utc","dayjs","extend","UTC","DateUtilities","stripTimeAndTimeZoneInfo","date","utc","format","toDate","LocalRefreshingCacheService","constructor","localstorage","defaultExpires","getCacheValueAndRefresh","key","value$","expiry","of","undefined","cachedValue","getCacheValue","pipe","tap","newValue","setCacheValue","startWith","setCacheRecord","deleteCacheValue","remove","getCacheRecord","value","JSON","parse","get","expires","Date","getTime","now","_expires","sanitizeAndGenerateDateExpiry","set","stringify","expiryDate","Math","abs","ɵɵinject","LocalStorageService","factory","ɵfac","providedIn","_LocalRefreshingCacheService","ButtonCell","constructor","config","component","VaButtonComponent","ChipCell","constructor","config","component","VaChipComponent","MenuCell","constructor","config","component","VaMenuComponent","MultilineCell","constructor","config","component","VaMultilineComponent","SwitchCell","constructor","config","component","VaSwitchComponent","VImgModule","CommonModule","_VImgModule"],"x_google_ignoreList":[0,1,32,33,108,150,154,155,156,157,158,159,160,161,162,163,228,240,241,242,243]}