@fluid-topics/ft-reader-topic-content 1.0.54 → 1.0.56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,7 +11,7 @@ export declare class FtReaderTopicContent extends FtReaderTopicComponent impleme
11
11
  contentPreprocessor: (content: string) => string;
12
12
  onContentAvailable: (container: HTMLElement, shadowRoot: ShadowRoot) => void;
13
13
  protected render(): import("lit-html").TemplateResult<1>;
14
- protected updated(props: PropertyValues): void;
14
+ protected update(props: PropertyValues): void;
15
15
  private updateContent;
16
16
  protected contentAvailableCallback(props: PropertyValues): void;
17
17
  protected onStoreAvailable(): void;
@@ -34,8 +34,8 @@ class FtReaderTopicContent extends FtReaderTopicComponent {
34
34
  </section>
35
35
  `;
36
36
  }
37
- updated(props) {
38
- super.updated(props);
37
+ update(props) {
38
+ super.update(props);
39
39
  if (props.has("map") || props.has("tocNode")) {
40
40
  this.updateContent();
41
41
  }
@@ -45,7 +45,7 @@ class FtReaderTopicContent extends FtReaderTopicComponent {
45
45
  this.error = undefined;
46
46
  this.content = undefined;
47
47
  if (this.map && this.tocNode) {
48
- (_a = this.service) === null || _a === void 0 ? void 0 : _a.getTopicContent(this.tocNode.contentId).then(content => this.content = content || "<div class=\"empty-topic\"></div>").catch(e => this.error = e);
48
+ (_a = this.service) === null || _a === void 0 ? void 0 : _a.getTopicContent(this.tocNode).then(content => this.content = content || "<div class=\"empty-topic\"></div>").catch(e => this.error = e);
49
49
  }
50
50
  }
51
51
  contentAvailableCallback(props) {
@@ -72,7 +72,7 @@
72
72
  `,S=i.css`
73
73
  `,I=e.FtReduxStore.get({name:"ft-app-info",reducers:{setBaseUrl:(t,e)=>{t.baseUrl=e.payload},setApiIntegrationIdentifier:(t,e)=>{t.apiIntegrationIdentifier=e.payload},setUiLocale:(t,e)=>{t.uiLocale=e.payload},setAvailableUiLocales:(t,e)=>{t.availableUiLocales=e.payload},setEditorMode:(t,e)=>{t.editorMode=e.payload},setNoCustom:(t,e)=>{t.noCustom=e.payload},setNoCustomComponent:(t,e)=>{t.noCustomComponent=e.payload},setSession:(t,e)=>{t.session=e.payload}},initialState:{uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],editorMode:!1,noCustom:!1,noCustomComponent:!1}});class M{static build(t){const{baseUrl:e,apiIntegrationIdentifier:i}=I.getState(),s=null!=t?t:i;if(e&&s&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(e,s,!0)}static get(t){var e;return null!=t?M.build(t):null!==(e=M.API)&&void 0!==e?e:M.API=M.build()}static await(t){return new Promise((e=>{let i=M.get(t);if(i)e(i);else{const s=I.subscribe((()=>{i=M.get(t),i&&(s(),e(i))}))}}))}}var O;const N=Symbol("clearAfterUnitTest");class A{constructor(t){this.messageContextProvider=t,this.defaultMessages={},this.cache=new e.CacheRegistry,this.listeners={},this.currentUiLocale="",this[O]=()=>{this.defaultMessages={},this.cache=new e.CacheRegistry,this.listeners={}},this.currentUiLocale=I.getState().uiLocale,I.subscribe((()=>this.clearWhenUiLocaleChanges()))}clearWhenUiLocaleChanges(){const{uiLocale:t}=I.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){const e=t.name.toLowerCase();this.cache.setFinal(e,t),this.notify(e)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,i){var s;if(t=t.toLowerCase(),Object.keys(i).length>0){const o={...null!==(s=this.defaultMessages[t])&&void 0!==s?s:{},...i};e.deepEqual(this.defaultMessages[t],o)||(this.defaultMessages[t]=o,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,i,...s){var o,n,a;t=t.toLowerCase(),this.fetchContext(t);const r=null!==(n=null===(o=this.cache.getNow(t))||void 0===o?void 0:o.messages)&&void 0!==n?n:{};return new e.ParametrizedLabelResolver(null!==(a=this.defaultMessages[t])&&void 0!==a?a:{},r).resolve(i,...s)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,(()=>this.messageContextProvider(this.currentUiLocale,t))),await this.notify(t)}catch(t){console.error(t)}}subscribe(t,e){var i;return t=t.toLowerCase(),this.listeners[t]=null!==(i=this.listeners[t])&&void 0!==i?i:new Set,this.listeners[t].add(e),()=>{var i;return null===(i=this.listeners[t])||void 0===i?void 0:i.delete(e)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map((t=>this.notify(t))))}async notify(t){null!=this.listeners[t]&&await Promise.all([...this.listeners[t].values()].map((t=>e.delay(0).then((()=>t())).catch((()=>null)))))}}O=N,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new A((async(t,e)=>(await M.await()).getFluidTopicsMessageContext(t,e)))),null==window.FluidTopicsCustomI18nService&&(window.FluidTopicsCustomI18nService=new A((async(t,e)=>(await M.await()).getCustomMessageContext(t,e))));const T=window.FluidTopicsI18nService,z=window.FluidTopicsCustomI18nService;var L=function(t,e,i,s){for(var o,n=arguments.length,a=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,r=t.length-1;r>=0;r--)(o=t[r])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class B extends e.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.availableUiLocales=[],this.editorMode=!1,this.noCustom=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.messageContexts=[],this.apiProvider=()=>M.get(),this.cache=new e.CacheRegistry,this.cleanSessionDebouncer=new e.Debouncer}render(){return i.html`
74
74
  <slot></slot>
75
- `}updated(t){super.updated(t),t.has("baseUrl")&&I.actions.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&I.actions.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&I.actions.setUiLocale(this.uiLocale),t.has("noCustom")&&I.actions.setNoCustom(this.noCustom),t.has("editorMode")&&I.actions.setEditorMode(this.editorMode),t.has("noCustomComponent")&&I.actions.setNoCustomComponent(this.noCustomComponent),t.has("session")&&I.actions.setSession(this.session),t.has("availableUiLocales")&&I.actions.setAvailableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>T.addContext(t))),setTimeout((()=>this.updateIfNeeded()))}async updateIfNeeded(){const t=this.apiProvider();!this.withManualResources&&t&&(null==this.session&&(this.session=await this.cache.get("session",(async()=>{const e=await t.getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>{this.cache.clear("session"),this.session=void 0}),e.idleTimeoutInMillis),e}))),null==this.availableUiLocales&&(this.availableUiLocales=await this.cache.get("availableUiLocales",(()=>t.getAvailableUiLocales()))))}}B.elementDefinitions={},B.styles=S,L([s.property()],B.prototype,"baseUrl",void 0),L([s.property()],B.prototype,"apiIntegrationIdentifier",void 0),L([s.property()],B.prototype,"uiLocale",void 0),L([e.jsonProperty([])],B.prototype,"availableUiLocales",void 0),L([s.property({type:Boolean})],B.prototype,"editorMode",void 0),L([s.property({type:Boolean})],B.prototype,"noCustom",void 0),L([s.property({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],B.prototype,"noCustomComponent",void 0),L([s.property({type:Boolean})],B.prototype,"withManualResources",void 0),L([e.jsonProperty([])],B.prototype,"messageContexts",void 0),L([e.jsonProperty(void 0)],B.prototype,"session",void 0),L([s.property({type:Object})],B.prototype,"apiProvider",void 0);class P{async listMySearches(){var t;return(null===(t=I.getState().session)||void 0===t?void 0:t.sessionAuthenticated)?(await M.await()).listMySearches(I.getState().session.profile.userId):[]}}const W=new e.CacheRegistry;class E{async listMyBookmarks(){return W.get("bookmarks",(async()=>(await M.await()).listMyBookmarks(I.getState().session.profile.userId)))}clearCache(){W.clear("bookmarks")}}const G=e.FtReduxStore.get({name:"ft-user-assets",initialState:{savedSearches:void 0,bookmarks:void 0}});new class{constructor(){this.currentSession=I.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new E,I.subscribe((()=>this.reloadWhenUserSessionChanges()))}reloadWhenUserSessionChanges(){var t;const{session:i}=I.getState();e.deepEqual(null===(t=this.currentSession)||void 0===t?void 0:t.profile,null==i?void 0:i.profile)||(this.currentSession=i,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){G.actions.savedSearches(void 0)}clearMyBookmarks(){G.actions.bookmarks(void 0)}async reloadMySearches(){const t=new P,e=await t.listMySearches();G.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){const e=(null===(t=this.currentSession)||void 0===t?void 0:t.sessionAuthenticated)?await this.bookmarksService.listMyBookmarks():void 0;G.actions.bookmarks(e)}}},e.customElement("ft-app-context")(B);var R=function(t,e,i,s){for(var o,n=arguments.length,a=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,r=t.length-1;r>=0;r--)(o=t[r])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};const K=Symbol("i18nProperties"),q=Symbol("i18nUnsubs");function D(t){var e;class i extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map}get i18nService(){return this.useCustomMessageContexts?z:T}i18n(t,e,...i){var s;if("string"==typeof t)return this.i18nService.resolveMessage(t,e,...i);const o=null!==(s=t.args)&&void 0!==s?s:t.argsProvider?t.argsProvider(this):[];return this.i18nService.resolveMessage(t.context,t.key,...o)}onI18nUpdate(t){var e;null===(e=this[K])||void 0===e||e.forEach(((e,i)=>{e.context.toLowerCase()===t.toLowerCase()&&(this[i]=this.i18n(e))})),setTimeout((()=>this.requestUpdate()),0)}updated(t){var e;super.updated(t),null===(e=this[K])||void 0===e||e.forEach(((t,e)=>{null!=t.argsProvider&&(this[e]=this.i18n(t))}))}connectedCallback(){super.connectedCallback(),null!=this[K]&&new Set([...this[K].values()].map((t=>t.context))).forEach((t=>this.addI18nMessages(t)))}addI18nMessages(t,e){t=t.toLowerCase(),this[q].has(t)||this[q].set(t,this.i18nService.subscribe(t,(()=>this.onI18nUpdate(t)))),this.i18nService.prepareContext(t,null!=e?e:{})}addI18nContext(t,e){this.addI18nMessages(t.name,e)}disconnectedCallback(){super.disconnectedCallback(),this[q].forEach((t=>t())),this[q].clear()}}return e=q,R([s.property({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}class _ extends(D(e.FtLitElement)){}class F extends(D(e.FtLitElementRedux)){}var Z=function(t,e,i,s){for(var o,n=arguments.length,a=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,r=t.length-1;r>=0;r--)(o=t[r])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class H extends F{constructor(){super(),this.editorMode=!1,this.addStore(I)}render(){return this.key&&this.context?i.html`
75
+ `}update(t){super.update(t),t.has("baseUrl")&&I.actions.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&I.actions.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&I.actions.setUiLocale(this.uiLocale),t.has("noCustom")&&I.actions.setNoCustom(this.noCustom),t.has("editorMode")&&I.actions.setEditorMode(this.editorMode),t.has("noCustomComponent")&&I.actions.setNoCustomComponent(this.noCustomComponent),t.has("session")&&I.actions.setSession(this.session),t.has("availableUiLocales")&&I.actions.setAvailableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>T.addContext(t))),setTimeout((()=>this.updateIfNeeded()))}async updateIfNeeded(){const t=this.apiProvider();!this.withManualResources&&t&&(null==this.session&&(this.session=await this.cache.get("session",(async()=>{const e=await t.getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>{this.cache.clear("session"),this.session=void 0}),e.idleTimeoutInMillis),e}))),null==this.availableUiLocales&&(this.availableUiLocales=await this.cache.get("availableUiLocales",(()=>t.getAvailableUiLocales()))))}}B.elementDefinitions={},B.styles=S,L([s.property()],B.prototype,"baseUrl",void 0),L([s.property()],B.prototype,"apiIntegrationIdentifier",void 0),L([s.property()],B.prototype,"uiLocale",void 0),L([e.jsonProperty([])],B.prototype,"availableUiLocales",void 0),L([s.property({type:Boolean})],B.prototype,"editorMode",void 0),L([s.property({type:Boolean})],B.prototype,"noCustom",void 0),L([s.property({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],B.prototype,"noCustomComponent",void 0),L([s.property({type:Boolean})],B.prototype,"withManualResources",void 0),L([e.jsonProperty([])],B.prototype,"messageContexts",void 0),L([e.jsonProperty(void 0)],B.prototype,"session",void 0),L([s.property({type:Object})],B.prototype,"apiProvider",void 0);class P{async listMySearches(){var t;return(null===(t=I.getState().session)||void 0===t?void 0:t.sessionAuthenticated)?(await M.await()).listMySearches(I.getState().session.profile.userId):[]}}const W=new e.CacheRegistry;class E{async listMyBookmarks(){return W.get("bookmarks",(async()=>(await M.await()).listMyBookmarks(I.getState().session.profile.userId)))}clearCache(){W.clear("bookmarks")}}const G=e.FtReduxStore.get({name:"ft-user-assets",initialState:{savedSearches:void 0,bookmarks:void 0}});new class{constructor(){this.currentSession=I.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new E,I.subscribe((()=>this.reloadWhenUserSessionChanges()))}reloadWhenUserSessionChanges(){var t;const{session:i}=I.getState();e.deepEqual(null===(t=this.currentSession)||void 0===t?void 0:t.profile,null==i?void 0:i.profile)||(this.currentSession=i,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){G.actions.savedSearches(void 0)}clearMyBookmarks(){G.actions.bookmarks(void 0)}async reloadMySearches(){const t=new P,e=await t.listMySearches();G.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){const e=(null===(t=this.currentSession)||void 0===t?void 0:t.sessionAuthenticated)?await this.bookmarksService.listMyBookmarks():void 0;G.actions.bookmarks(e)}}},e.customElement("ft-app-context")(B);var R=function(t,e,i,s){for(var o,n=arguments.length,a=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,r=t.length-1;r>=0;r--)(o=t[r])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};const K=Symbol("i18nProperties"),q=Symbol("i18nUnsubs");function D(t){var e;class i extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map}get i18nService(){return this.useCustomMessageContexts?z:T}i18n(t,e,...i){var s;if("string"==typeof t)return this.i18nService.resolveMessage(t,e,...i);const o=null!==(s=t.args)&&void 0!==s?s:t.argsProvider?t.argsProvider(this):[];return this.i18nService.resolveMessage(t.context,t.key,...o)}onI18nUpdate(t){var e;null===(e=this[K])||void 0===e||e.forEach(((e,i)=>{e.context.toLowerCase()===t.toLowerCase()&&(this[i]=this.i18n(e))})),setTimeout((()=>this.requestUpdate()),0)}update(t){var e;super.update(t),null===(e=this[K])||void 0===e||e.forEach(((t,e)=>{null!=t.argsProvider&&(this[e]=this.i18n(t))}))}connectedCallback(){super.connectedCallback(),null!=this[K]&&new Set([...this[K].values()].map((t=>t.context))).forEach((t=>this.addI18nMessages(t)))}addI18nMessages(t,e){t=t.toLowerCase(),this[q].has(t)||this[q].set(t,this.i18nService.subscribe(t,(()=>this.onI18nUpdate(t)))),this.i18nService.prepareContext(t,null!=e?e:{})}addI18nContext(t,e){this.addI18nMessages(t.name,e)}disconnectedCallback(){super.disconnectedCallback(),this[q].forEach((t=>t())),this[q].clear()}}return e=q,R([s.property({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}class _ extends(D(e.FtLitElement)){}class F extends(D(e.FtLitElementRedux)){}var Z=function(t,e,i,s){for(var o,n=arguments.length,a=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,r=t.length-1;r>=0;r--)(o=t[r])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class H extends F{constructor(){super(),this.editorMode=!1,this.addStore(I)}render(){return this.key&&this.context?i.html`
76
76
  <span class="ft-i18n">
77
77
  ${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}
78
78
  </span>
@@ -85,7 +85,7 @@
85
85
  </section>
86
86
  `:i.html`
87
87
  <section class="topic-loading"></section>
88
- `}updated(t){super.updated(t),(t.has("map")||t.has("tocNode"))&&this.updateContent()}updateContent(){var t;this.error=void 0,this.content=void 0,this.map&&this.tocNode&&(null===(t=this.service)||void 0===t||t.getTopicContent(this.tocNode.contentId).then((t=>this.content=t||'<div class="empty-topic"></div>')).catch((t=>this.error=t)))}contentAvailableCallback(t){var e,i,s,o,n,a,r;if(super.contentAvailableCallback(t),!this.disableContextInteractions&&(null===(e=this.scrollTarget)||void 0===e?void 0:e.section)&&(null===(i=this.tocNode)||void 0===i?void 0:i.tocId)&&(null===(s=this.tocNode)||void 0===s?void 0:s.tocId)===this.scrollTarget.tocId&&this.content){(null!==(n=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelector(`[id="${this.scrollTarget.section}"], [name="${this.scrollTarget.section}"]`))&&void 0!==n?n:this).scrollIntoView({block:"start"}),null===(a=this.stateManager)||void 0===a||a.scrollDone()}const l=null===(r=this.shadowRoot)||void 0===r?void 0:r.querySelector("section.topic");l&&this.onContentAvailable(l,this.shadowRoot)}onStoreAvailable(){super.onStoreAvailable(),this.updateContent()}renderTopicContent(){var t,e,s,n;if(this.error)return i.html`
88
+ `}update(t){super.update(t),(t.has("map")||t.has("tocNode"))&&this.updateContent()}updateContent(){var t;this.error=void 0,this.content=void 0,this.map&&this.tocNode&&(null===(t=this.service)||void 0===t||t.getTopicContent(this.tocNode).then((t=>this.content=t||'<div class="empty-topic"></div>')).catch((t=>this.error=t)))}contentAvailableCallback(t){var e,i,s,o,n,a,r;if(super.contentAvailableCallback(t),!this.disableContextInteractions&&(null===(e=this.scrollTarget)||void 0===e?void 0:e.section)&&(null===(i=this.tocNode)||void 0===i?void 0:i.tocId)&&(null===(s=this.tocNode)||void 0===s?void 0:s.tocId)===this.scrollTarget.tocId&&this.content){(null!==(n=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelector(`[id="${this.scrollTarget.section}"], [name="${this.scrollTarget.section}"]`))&&void 0!==n?n:this).scrollIntoView({block:"start"}),null===(a=this.stateManager)||void 0===a||a.scrollDone()}const l=null===(r=this.shadowRoot)||void 0===r?void 0:r.querySelector("section.topic");l&&this.onContentAvailable(l,this.shadowRoot)}onStoreAvailable(){super.onStoreAvailable(),this.updateContent()}renderTopicContent(){var t,e,s,n;if(this.error)return i.html`
89
89
  <div class="topic-on-error">
90
90
  <ft-icon>WARNING</ft-icon>
91
91
  <div>
@@ -89,7 +89,7 @@ var ft,ht;let dt=class extends k{constructor(){super(...arguments),this.renderOp
89
89
  display: inline-block;
90
90
  width: 0;
91
91
  }
92
- `;class Et{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var i,n;t=this.resolvePluralKey(t,e);let r=null!==(n=null!==(i=this.labels[t])&&void 0!==i?i:this.defaultLabels[t])&&void 0!==n?n:"";return e.forEach(((t,e)=>r=r.replace(new RegExp(`\\{${e}([^}]*)\\}`,"g"),((e,i)=>this.formatValue(t,i))))),r}resolvePluralKey(t,e){for(let i of e)if("number"==typeof i){const e=`${String(t)}[\\=${i}]`;if(e in this.labels||e in this.defaultLabels)return e}return t}formatValue(t,e){return t instanceof Date?this.formatDate(t,e):null!=t?t:""}formatDate(t,e){const i=i=>(null==e?void 0:e.includes("date"))?t.toLocaleDateString(i):(null==e?void 0:e.includes("time"))?t.toLocaleTimeString(i):t.toLocaleString(i);try{return i(document.documentElement.lang)}catch(t){return i()}}}function jt(t){var e;return null!==(e=null==t?void 0:t.isFtReduxStore)&&void 0!==e&&e}var Ct,Nt,Rt;const kt=Symbol("internalReduxEventsUnsubscribers"),Mt=Symbol("internalStoresUnsubscribers"),At=Symbol("internalStores");class Ut extends St{constructor(){super(...arguments),this[Ct]=new Map,this[Nt]=new Map,this[Rt]=[]}updated(t){var e;super.updated(t),(null===(e=this.reduxReactiveProperties)||void 0===e?void 0:e.some((e=>t.has(e))))&&this.updateFromStores()}getUnnamedStore(){if(this[At].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[At].values()][0]}getStore(t){return null==t?this.getUnnamedStore():this[At].get(t)}addStore(t,e){var i;e=null!==(i=null!=e?e:jt(t)?t.name:void 0)&&void 0!==i?i:"default-store",this.unsubscribeFromStore(e),this.setupStore(e,t)}removeStore(t){const e="string"==typeof t?t:t.name;this.unsubscribeFromStore(e),this[At].delete(e)}setupStore(t,e){this[At].set(t,e),this.subscribeToStore(t,e),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[At].forEach(((t,e)=>this.subscribeToStore(e,t))),this.updateFromStores()}updateFromStores(){this.reduxProperties&&this.reduxProperties.forEach(((t,e)=>{const i=this.constructor.getPropertyOptions(e);if(!(null==i?void 0:i.attribute)||!this.hasAttribute("string"==typeof(null==i?void 0:i.attribute)?i.attribute:e)){const i=this.getStore(t.store);i&&(t.store?this[Mt].has(t.store):this[Mt].size>0)&&(this[e]=t.selector(i.getState(),this))}}))}subscribeToStore(t,e){var i;this[Mt].set(t,e.subscribe((()=>this.updateFromStores()))),jt(e)&&e.eventBus&&(null===(i=this.reduxEventListeners)||void 0===i||i.forEach(((t,i)=>{if("function"==typeof this[i]&&(!t.store||e.name===t.store)){const n=t=>this[i](t);e.eventBus.addEventListener(t.eventName,n),this[kt].push((()=>e.eventBus.removeEventListener(t.eventName,n)))}}))),this.onStoreAvailable(t)}unsubscribeFromStores(){this[Mt].forEach(((t,e)=>this.unsubscribeFromStore(e))),this[kt].forEach((t=>t())),this[kt]=[]}unsubscribeFromStore(t){this[Mt].has(t)&&this[Mt].get(t)(),this[Mt].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}function $t(t){for(var e=arguments.length,i=Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];throw Error("[Immer] minified error nr: "+t+(i.length?" "+i.map((function(t){return"'"+t+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Pt(t){return!!t&&!!t[we]}function Tt(t){var e;return!!t&&(function(t){if(!t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;var i=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return i===Object||"function"==typeof i&&Function.toString.call(i)===ge}(t)||Array.isArray(t)||!!t[me]||!!(null===(e=t.constructor)||void 0===e?void 0:e[me])||Dt(t)||Wt(t))}function _t(t,e,i){void 0===i&&(i=!1),0===Lt(t)?(i?Object.keys:Oe)(t).forEach((function(n){i&&"symbol"==typeof n||e(n,t[n],t)})):t.forEach((function(i,n){return e(n,i,t)}))}function Lt(t){var e=t[we];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Dt(t)?2:Wt(t)?3:0}function Ft(t,e){return 2===Lt(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function It(t,e,i){var n=Lt(t);2===n?t.set(e,i):3===n?t.add(i):t[e]=i}function Bt(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function Dt(t){return pe&&t instanceof Map}function Wt(t){return be&&t instanceof Set}function Kt(t){return t.o||t.t}function zt(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Se(t);delete e[we];for(var i=Oe(e),n=0;n<i.length;n++){var r=i[n],o=e[r];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(e[r]={configurable:!0,writable:!0,enumerable:o.enumerable,value:t[r]})}return Object.create(Object.getPrototypeOf(t),e)}function Ht(t,e){return void 0===e&&(e=!1),Vt(t)||Pt(t)||!Tt(t)||(Lt(t)>1&&(t.set=t.add=t.clear=t.delete=qt),Object.freeze(t),e&&_t(t,(function(t,e){return Ht(e,!0)}),!0)),t}function qt(){$t(2)}function Vt(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function Jt(t){var e=Ee[t];return e||$t(18,t),e}function Zt(){return de}function Xt(t,e){e&&(Jt("Patches"),t.u=[],t.s=[],t.v=e)}function Gt(t){Qt(t),t.p.forEach(te),t.p=null}function Qt(t){t===de&&(de=t.l)}function Yt(t){return de={p:[],l:de,h:t,m:!0,_:0}}function te(t){var e=t[we];0===e.i||1===e.i?e.j():e.g=!0}function ee(t,e){e._=e.p.length;var i=e.p[0],n=void 0!==t&&t!==i;return e.h.O||Jt("ES5").S(e,t,n),n?(i[we].P&&(Gt(e),$t(4)),Tt(t)&&(t=ie(e,t),e.l||re(e,t)),e.u&&Jt("Patches").M(i[we].t,t,e.u,e.s)):t=ie(e,i,[]),Gt(e),e.u&&e.v(e.u,e.s),t!==ye?t:void 0}function ie(t,e,i){if(Vt(e))return e;var n=e[we];if(!n)return _t(e,(function(r,o){return ne(t,n,e,r,o,i)}),!0),e;if(n.A!==t)return e;if(!n.P)return re(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var r=4===n.i||5===n.i?n.o=zt(n.k):n.o,o=r,s=!1;3===n.i&&(o=new Set(r),r.clear(),s=!0),_t(o,(function(e,o){return ne(t,n,r,e,o,i,s)})),re(t,r,!1),i&&t.u&&Jt("Patches").N(n,i,t.u,t.s)}return n.o}function ne(t,e,i,n,r,o,s){if(Pt(r)){var a=ie(t,r,o&&e&&3!==e.i&&!Ft(e.R,n)?o.concat(n):void 0);if(It(i,n,a),!Pt(a))return;t.m=!1}else s&&i.add(r);if(Tt(r)&&!Vt(r)){if(!t.h.D&&t._<1)return;ie(t,r),e&&e.A.l||re(t,r)}}function re(t,e,i){void 0===i&&(i=!1),!t.l&&t.h.D&&t.m&&Ht(e,i)}function oe(t,e){var i=t[we];return(i?Kt(i):t)[e]}function se(t,e){if(e in t)for(var i=Object.getPrototypeOf(t);i;){var n=Object.getOwnPropertyDescriptor(i,e);if(n)return n;i=Object.getPrototypeOf(i)}}function ae(t){t.P||(t.P=!0,t.l&&ae(t.l))}function ce(t){t.o||(t.o=zt(t.t))}function ue(t,e,i){var n=Dt(e)?Jt("MapSet").F(e,i):Wt(e)?Jt("MapSet").T(e,i):t.O?function(t,e){var i=Array.isArray(t),n={i:i?1:0,A:e?e.A:Zt(),P:!1,I:!1,R:{},l:e,t,k:null,o:null,j:null,C:!1},r=n,o=je;i&&(r=[n],o=Ce);var s=Proxy.revocable(r,o),a=s.revoke,c=s.proxy;return n.k=c,n.j=a,c}(e,i):Jt("ES5").J(e,i);return(i?i.A:Zt()).p.push(n),n}function le(t){return Pt(t)||$t(22,t),function t(e){if(!Tt(e))return e;var i,n=e[we],r=Lt(e);if(n){if(!n.P&&(n.i<4||!Jt("ES5").K(n)))return n.t;n.I=!0,i=fe(e,r),n.I=!1}else i=fe(e,r);return _t(i,(function(e,r){n&&function(t,e){return 2===Lt(t)?t.get(e):t[e]}(n.t,e)===r||It(i,e,t(r))})),3===r?new Set(i):i}(t)}function fe(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return zt(t)}Ct=Mt,Nt=At,Rt=kt;var he,de,ve="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),pe="undefined"!=typeof Map,be="undefined"!=typeof Set,xe="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,ye=ve?Symbol.for("immer-nothing"):((he={})["immer-nothing"]=!0,he),me=ve?Symbol.for("immer-draftable"):"__$immer_draftable",we=ve?Symbol.for("immer-state"):"__$immer_state",ge=""+Object.prototype.constructor,Oe="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Se=Object.getOwnPropertyDescriptors||function(t){var e={};return Oe(t).forEach((function(i){e[i]=Object.getOwnPropertyDescriptor(t,i)})),e},Ee={},je={get:function(t,e){if(e===we)return t;var i=Kt(t);if(!Ft(i,e))return function(t,e,i){var n,r=se(e,i);return r?"value"in r?r.value:null===(n=r.get)||void 0===n?void 0:n.call(t.k):void 0}(t,i,e);var n=i[e];return t.I||!Tt(n)?n:n===oe(t.t,e)?(ce(t),t.o[e]=ue(t.A.h,n,t)):n},has:function(t,e){return e in Kt(t)},ownKeys:function(t){return Reflect.ownKeys(Kt(t))},set:function(t,e,i){var n=se(Kt(t),e);if(null==n?void 0:n.set)return n.set.call(t.k,i),!0;if(!t.P){var r=oe(Kt(t),e),o=null==r?void 0:r[we];if(o&&o.t===i)return t.o[e]=i,t.R[e]=!1,!0;if(Bt(i,r)&&(void 0!==i||Ft(t.t,e)))return!0;ce(t),ae(t)}return t.o[e]===i&&(void 0!==i||e in t.o)||Number.isNaN(i)&&Number.isNaN(t.o[e])||(t.o[e]=i,t.R[e]=!0),!0},deleteProperty:function(t,e){return void 0!==oe(t.t,e)||e in t.t?(t.R[e]=!1,ce(t),ae(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var i=Kt(t),n=Reflect.getOwnPropertyDescriptor(i,e);return n?{writable:!0,configurable:1!==t.i||"length"!==e,enumerable:n.enumerable,value:i[e]}:n},defineProperty:function(){$t(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){$t(12)}},Ce={};_t(je,(function(t,e){Ce[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),Ce.deleteProperty=function(t,e){return Ce.set.call(this,t,e,void 0)},Ce.set=function(t,e,i){return je.set.call(this,t[0],e,i,t[0])};var Ne=function(){function t(t){var e=this;this.O=xe,this.D=!0,this.produce=function(t,i,n){if("function"==typeof t&&"function"!=typeof i){var r=i;i=t;var o=e;return function(t){var e=this;void 0===t&&(t=r);for(var n=arguments.length,s=Array(n>1?n-1:0),a=1;a<n;a++)s[a-1]=arguments[a];return o.produce(t,(function(t){var n;return(n=i).call.apply(n,[e,t].concat(s))}))}}var s;if("function"!=typeof i&&$t(6),void 0!==n&&"function"!=typeof n&&$t(7),Tt(t)){var a=Yt(e),c=ue(e,t,void 0),u=!0;try{s=i(c),u=!1}finally{u?Gt(a):Qt(a)}return"undefined"!=typeof Promise&&s instanceof Promise?s.then((function(t){return Xt(a,n),ee(t,a)}),(function(t){throw Gt(a),t})):(Xt(a,n),ee(s,a))}if(!t||"object"!=typeof t){if(void 0===(s=i(t))&&(s=t),s===ye&&(s=void 0),e.D&&Ht(s,!0),n){var l=[],f=[];Jt("Patches").M(t,s,l,f),n(l,f)}return s}$t(21,t)},this.produceWithPatches=function(t,i){if("function"==typeof t)return function(i){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return e.produceWithPatches(i,(function(e){return t.apply(void 0,[e].concat(r))}))};var n,r,o=e.produce(t,i,(function(t,e){n=t,r=e}));return"undefined"!=typeof Promise&&o instanceof Promise?o.then((function(t){return[t,n,r]})):[o,n,r]},"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze)}var e=t.prototype;return e.createDraft=function(t){Tt(t)||$t(8),Pt(t)&&(t=le(t));var e=Yt(this),i=ue(this,t,void 0);return i[we].C=!0,Qt(e),i},e.finishDraft=function(t,e){var i=(t&&t[we]).A;return Xt(i,e),ee(void 0,i)},e.setAutoFreeze=function(t){this.D=t},e.setUseProxies=function(t){t&&!xe&&$t(20),this.O=t},e.applyPatches=function(t,e){var i;for(i=e.length-1;i>=0;i--){var n=e[i];if(0===n.path.length&&"replace"===n.op){t=n.value;break}}i>-1&&(e=e.slice(i+1));var r=Jt("Patches").$;return Pt(t)?r(t,e):this.produce(t,(function(t){return r(t,e)}))},t}(),Re=new Ne,ke=Re.produce;function Me(t){return Me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Me(t)}function Ae(t){var e=function(t,e){if("object"!==Me(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!==Me(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Me(e)?e:String(e)}function Ue(t,e,i){return(e=Ae(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function $e(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Pe(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?$e(Object(i),!0).forEach((function(e){Ue(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):$e(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function Te(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}Re.produceWithPatches.bind(Re),Re.setAutoFreeze.bind(Re),Re.setUseProxies.bind(Re),Re.applyPatches.bind(Re),Re.createDraft.bind(Re),Re.finishDraft.bind(Re);var _e="function"==typeof Symbol&&Symbol.observable||"@@observable",Le=function(){return Math.random().toString(36).substring(7).split("").join(".")},Fe={INIT:"@@redux/INIT"+Le(),REPLACE:"@@redux/REPLACE"+Le(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Le()}};function Ie(t,e,i){var n;if("function"==typeof e&&"function"==typeof i||"function"==typeof i&&"function"==typeof arguments[3])throw new Error(Te(0));if("function"==typeof e&&void 0===i&&(i=e,e=void 0),void 0!==i){if("function"!=typeof i)throw new Error(Te(1));return i(Ie)(t,e)}if("function"!=typeof t)throw new Error(Te(2));var r=t,o=e,s=[],a=s,c=!1;function u(){a===s&&(a=s.slice())}function l(){if(c)throw new Error(Te(3));return o}function f(t){if("function"!=typeof t)throw new Error(Te(4));if(c)throw new Error(Te(5));var e=!0;return u(),a.push(t),function(){if(e){if(c)throw new Error(Te(6));e=!1,u();var i=a.indexOf(t);a.splice(i,1),s=null}}}function h(t){if(!function(t){if("object"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}(t))throw new Error(Te(7));if(void 0===t.type)throw new Error(Te(8));if(c)throw new Error(Te(9));try{c=!0,o=r(o,t)}finally{c=!1}for(var e=s=a,i=0;i<e.length;i++){(0,e[i])()}return t}return h({type:Fe.INIT}),(n={dispatch:h,subscribe:f,getState:l,replaceReducer:function(t){if("function"!=typeof t)throw new Error(Te(10));r=t,h({type:Fe.REPLACE})}})[_e]=function(){var t,e=f;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(Te(11));function i(){t.next&&t.next(l())}return i(),{unsubscribe:e(i)}}})[_e]=function(){return this},t},n}function Be(t){for(var e=Object.keys(t),i={},n=0;n<e.length;n++){var r=e[n];"function"==typeof t[r]&&(i[r]=t[r])}var o,s=Object.keys(i);try{!function(t){Object.keys(t).forEach((function(e){var i=t[e];if(void 0===i(void 0,{type:Fe.INIT}))throw new Error(Te(12));if(void 0===i(void 0,{type:Fe.PROBE_UNKNOWN_ACTION()}))throw new Error(Te(13))}))}(i)}catch(t){o=t}return function(t,e){if(void 0===t&&(t={}),o)throw o;for(var n=!1,r={},a=0;a<s.length;a++){var c=s[a],u=i[c],l=t[c],f=u(l,e);if(void 0===f)throw e&&e.type,new Error(Te(14));r[c]=f,n=n||f!==l}return(n=n||s.length!==Object.keys(t).length)?r:t}}function De(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce((function(t,e){return function(){return t(e.apply(void 0,arguments))}}))}function We(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return function(t){return function(){var i=t.apply(void 0,arguments),n=function(){throw new Error(Te(15))},r={getState:i.getState,dispatch:function(){return n.apply(void 0,arguments)}},o=e.map((function(t){return t(r)}));return n=De.apply(void 0,o)(i.dispatch),Pe(Pe({},i),{},{dispatch:n})}}}function Ke(t){return function(e){var i=e.dispatch,n=e.getState;return function(e){return function(r){return"function"==typeof r?r(i,n,t):e(r)}}}}var ze=Ke();ze.withExtraArgument=Ke;var He,qe=ze,Ve=(He=function(t,e){return He=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},He(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}He(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),Je=function(t,e){var i,n,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,n&&(r=2&o[0]?n.return:o[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,o[1])).done)return r;switch(n=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(r=s.trys,(r=r.length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],n=0}finally{i=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},Ze=function(t,e){for(var i=0,n=e.length,r=t.length;i<n;i++,r++)t[r]=e[i];return t},Xe=Object.defineProperty,Ge=Object.defineProperties,Qe=Object.getOwnPropertyDescriptors,Ye=Object.getOwnPropertySymbols,ti=Object.prototype.hasOwnProperty,ei=Object.prototype.propertyIsEnumerable,ii=function(t,e,i){return e in t?Xe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i},ni=function(t,e){for(var i in e||(e={}))ti.call(e,i)&&ii(t,i,e[i]);if(Ye)for(var n=0,r=Ye(e);n<r.length;n++){i=r[n];ei.call(e,i)&&ii(t,i,e[i])}return t},ri=function(t,e){return Ge(t,Qe(e))},oi="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?De:De.apply(null,arguments)};var si=function(t){function e(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];var r=t.apply(this,i)||this;return Object.setPrototypeOf(r,e.prototype),r}return Ve(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,Ze([void 0],t[0].concat(this)))):new(e.bind.apply(e,Ze([void 0],t.concat(this))))},e}(Array),ai=function(t){function e(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];var r=t.apply(this,i)||this;return Object.setPrototypeOf(r,e.prototype),r}return Ve(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,Ze([void 0],t[0].concat(this)))):new(e.bind.apply(e,Ze([void 0],t.concat(this))))},e}(Array);function ci(t){return Tt(t)?ke(t,(function(){})):t}function ui(){return function(t){return function(t){void 0===t&&(t={});var e=t.thunk,i=void 0===e||e;t.immutableCheck,t.serializableCheck;var n=new si;i&&(!function(t){return"boolean"==typeof t}(i)?n.push(qe.withExtraArgument(i.extraArgument)):n.push(qe));return n}(t)}}function li(t){var e,i=ui(),n=t||{},r=n.reducer,o=void 0===r?void 0:r,s=n.middleware,a=void 0===s?i():s,c=n.devTools,u=void 0===c||c,l=n.preloadedState,f=void 0===l?void 0:l,h=n.enhancers,d=void 0===h?void 0:h;if("function"==typeof o)e=o;else{if(!function(t){if("object"!=typeof t||null===t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;for(var i=e;null!==Object.getPrototypeOf(i);)i=Object.getPrototypeOf(i);return e===i}(o))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');e=Be(o)}var v=a;"function"==typeof v&&(v=v(i));var p=We.apply(void 0,v),b=De;u&&(b=oi(ni({trace:!1},"object"==typeof u&&u)));var x=new ai(p),y=x;return Array.isArray(d)?y=Ze([p],d):"function"==typeof d&&(y=d(x)),Ie(e,f,b.apply(void 0,y))}function fi(t,e){function i(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];if(e){var r=e.apply(void 0,i);if(!r)throw new Error("prepareAction did not return an object");return ni(ni({type:t,payload:r.payload},"meta"in r&&{meta:r.meta}),"error"in r&&{error:r.error})}return{type:t,payload:i[0]}}return i.toString=function(){return""+t},i.type=t,i.match=function(e){return e.type===t},i}function hi(t){var e,i={},n=[],r={addCase:function(t,e){var n="string"==typeof t?t:t.type;if(n in i)throw new Error("addCase cannot be called with two reducers for the same action type");return i[n]=e,r},addMatcher:function(t,e){return n.push({matcher:t,reducer:e}),r},addDefaultCase:function(t){return e=t,r}};return t(r),[i,n,e]}function di(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");var i,n="function"==typeof t.initialState?t.initialState:ci(t.initialState),r=t.reducers||{},o=Object.keys(r),s={},a={},c={};function u(){var e="function"==typeof t.extraReducers?hi(t.extraReducers):[t.extraReducers],i=e[0],r=void 0===i?{}:i,o=e[1],s=void 0===o?[]:o,c=e[2],u=void 0===c?void 0:c,l=ni(ni({},r),a);return function(t,e,i,n){void 0===i&&(i=[]);var r,o="function"==typeof e?hi(e):[e,i,n],s=o[0],a=o[1],c=o[2];if(function(t){return"function"==typeof t}(t))r=function(){return ci(t())};else{var u=ci(t);r=function(){return u}}function l(t,e){void 0===t&&(t=r());var i=Ze([s[e.type]],a.filter((function(t){return(0,t.matcher)(e)})).map((function(t){return t.reducer})));return 0===i.filter((function(t){return!!t})).length&&(i=[c]),i.reduce((function(t,i){if(i){var n;if(Pt(t))return void 0===(n=i(t,e))?t:n;if(Tt(t))return ke(t,(function(t){return i(t,e)}));if(void 0===(n=i(t,e))){if(null===t)return t;throw Error("A case reducer on a non-draftable value must not return undefined")}return n}return t}),t)}return l.getInitialState=r,l}(n,(function(t){for(var e in l)t.addCase(e,l[e]);for(var i=0,n=s;i<n.length;i++){var r=n[i];t.addMatcher(r.matcher,r.reducer)}u&&t.addDefaultCase(u)}))}return o.forEach((function(t){var i,n,o=r[t],u=e+"/"+t;"reducer"in o?(i=o.reducer,n=o.prepare):i=o,s[t]=i,a[u]=i,c[t]=n?fi(u,n):fi(u)})),{name:e,reducer:function(t,e){return i||(i=u()),i(t,e)},actions:c,caseReducers:s,getInitialState:function(){return i||(i=u()),i.getInitialState()}}}var vi=["name","message","stack","code"],pi=function(t,e){this.payload=t,this.meta=e},bi=function(t,e){this.payload=t,this.meta=e},xi=function(t){if("object"==typeof t&&null!==t){for(var e={},i=0,n=vi;i<n.length;i++){var r=n[i];"string"==typeof t[r]&&(e[r]=t[r])}return e}return{message:String(t)}};function yi(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}!function(){function t(t,e,i){var n=fi(t+"/fulfilled",(function(t,e,i,n){return{payload:t,meta:ri(ni({},n||{}),{arg:i,requestId:e,requestStatus:"fulfilled"})}})),r=fi(t+"/pending",(function(t,e,i){return{payload:void 0,meta:ri(ni({},i||{}),{arg:e,requestId:t,requestStatus:"pending"})}})),o=fi(t+"/rejected",(function(t,e,n,r,o){return{payload:r,error:(i&&i.serializeError||xi)(t||"Rejected"),meta:ri(ni({},o||{}),{arg:n,requestId:e,rejectedWithValue:!!r,requestStatus:"rejected",aborted:"AbortError"===(null==t?void 0:t.name),condition:"ConditionError"===(null==t?void 0:t.name)})}})),s="undefined"!=typeof AbortController?AbortController:function(){function t(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return t.prototype.abort=function(){},t}();return Object.assign((function(t){return function(a,c,u){var l,f=(null==i?void 0:i.idGenerator)?i.idGenerator(t):function(t){void 0===t&&(t=21);for(var e="",i=t;i--;)e+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return e}(),h=new s;function d(t){l=t,h.abort()}var v=function(){return s=this,v=null,p=function(){var s,v,p,b,x,y;return Je(this,(function(m){switch(m.label){case 0:return m.trys.push([0,4,,5]),b=null==(s=null==i?void 0:i.condition)?void 0:s.call(i,t,{getState:c,extra:u}),null===(w=b)||"object"!=typeof w||"function"!=typeof w.then?[3,2]:[4,b];case 1:b=m.sent(),m.label=2;case 2:if(!1===b||h.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return x=new Promise((function(t,e){return h.signal.addEventListener("abort",(function(){return e({name:"AbortError",message:l||"Aborted"})}))})),a(r(f,t,null==(v=null==i?void 0:i.getPendingMeta)?void 0:v.call(i,{requestId:f,arg:t},{getState:c,extra:u}))),[4,Promise.race([x,Promise.resolve(e(t,{dispatch:a,getState:c,extra:u,requestId:f,signal:h.signal,abort:d,rejectWithValue:function(t,e){return new pi(t,e)},fulfillWithValue:function(t,e){return new bi(t,e)}})).then((function(e){if(e instanceof pi)throw e;return e instanceof bi?n(e.payload,f,t,e.meta):n(e,f,t)}))])];case 3:return p=m.sent(),[3,5];case 4:return y=m.sent(),p=y instanceof pi?o(null,f,t,y.payload,y.meta):o(y,f,t),[3,5];case 5:return i&&!i.dispatchConditionRejection&&o.match(p)&&p.meta.condition||a(p),[2,p]}var w}))},new Promise((function(t,e){var i=function(t){try{r(p.next(t))}catch(t){e(t)}},n=function(t){try{r(p.throw(t))}catch(t){e(t)}},r=function(e){return e.done?t(e.value):Promise.resolve(e.value).then(i,n)};r((p=p.apply(s,v)).next())}));var s,v,p}();return Object.assign(v,{abort:d,requestId:f,arg:t,unwrap:function(){return v.then(yi)}})}}),{pending:r,rejected:o,fulfilled:n,typePrefix:t})}t.withTypes=function(){return t}}();var mi="listenerMiddleware";fi(mi+"/add"),fi(mi+"/removeAll"),fi(mi+"/remove"),"function"==typeof queueMicrotask&&queueMicrotask.bind("undefined"!=typeof window?window:"undefined"!=typeof global?global:globalThis),function(){function t(t,e){var i=r[t];return i?i.enumerable=e:r[t]=i={configurable:!0,enumerable:e,get:function(){var e=this[we];return je.get(e,t)},set:function(e){var i=this[we];je.set(i,t,e)}},i}function e(t){for(var e=t.length-1;e>=0;e--){var r=t[e][we];if(!r.P)switch(r.i){case 5:n(r)&&ae(r);break;case 4:i(r)&&ae(r)}}}function i(t){for(var e=t.t,i=t.k,n=Oe(i),r=n.length-1;r>=0;r--){var o=n[r];if(o!==we){var s=e[o];if(void 0===s&&!Ft(e,o))return!0;var a=i[o],c=a&&a[we];if(c?c.t!==s:!Bt(a,s))return!0}}var u=!!e[we];return n.length!==Oe(e).length+(u?0:1)}function n(t){var e=t.k;if(e.length!==t.t.length)return!0;var i=Object.getOwnPropertyDescriptor(e,e.length-1);if(i&&!i.get)return!0;for(var n=0;n<e.length;n++)if(!e.hasOwnProperty(n))return!0;return!1}var r={};!function(t,e){Ee[t]||(Ee[t]=e)}("ES5",{J:function(e,i){var n=Array.isArray(e),r=function(e,i){if(e){for(var n=Array(i.length),r=0;r<i.length;r++)Object.defineProperty(n,""+r,t(r,!0));return n}var o=Se(i);delete o[we];for(var s=Oe(o),a=0;a<s.length;a++){var c=s[a];o[c]=t(c,e||!!o[c].enumerable)}return Object.create(Object.getPrototypeOf(i),o)}(n,e),o={i:n?5:4,A:i?i.A:Zt(),P:!1,I:!1,R:{},l:i,t:e,k:r,o:null,g:!1,C:!1};return Object.defineProperty(r,we,{value:o,writable:!0}),r},S:function(t,i,r){r?Pt(i)&&i[we].A===t&&e(t.p):(t.u&&function t(e){if(e&&"object"==typeof e){var i=e[we];if(i){var r=i.t,o=i.k,s=i.R,a=i.i;if(4===a)_t(o,(function(e){e!==we&&(void 0!==r[e]||Ft(r,e)?s[e]||t(o[e]):(s[e]=!0,ae(i)))})),_t(r,(function(t){void 0!==o[t]||Ft(o,t)||(s[t]=!1,ae(i))}));else if(5===a){if(n(i)&&(ae(i),s.length=!0),o.length<r.length)for(var c=o.length;c<r.length;c++)s[c]=!1;else for(var u=r.length;u<o.length;u++)s[u]=!0;for(var l=Math.min(o.length,r.length),f=0;f<l;f++)o.hasOwnProperty(f)||(s[f]=!0),void 0===s[f]&&t(o[f])}}}}(t.p[0]),e(t.p))},K:function(t){return 4===t.i?i(t):n(t)}})}(),window.ftReduxStores||(window.ftReduxStores={});class wi{static get(t){var e;const i="string"==typeof t?t:t.name,n="string"==typeof t?void 0:t,r=window.ftReduxStores[i];if(jt(r))return r;if(null==n)return;const o=di({...n,reducers:null!==(e=n.reducers)&&void 0!==e?e:{}}),s=li({reducer:(t,e)=>{var i;switch(e.type){case"CLEAR_FT_REDUX_STORE":return o.getInitialState();case"DEFAULT_STATE_FIELDS_VALUES_SETTER":return{...t,...null!==(i=e.overwrites)&&void 0!==i?i:{}};default:return o.reducer(t,e)}}});return window.ftReduxStores[n.name]=new wi(o,s)}constructor(t,e){this.reduxSlice=t,this.reduxStore=e,this.isFtReduxStore=!0,this.eventBus=document.createElement("event-bus"),this.actions=new Proxy(this.reduxSlice.actions,{get:(t,e,i)=>{const n=e,r=t[n];return r?(...t)=>{const e=r(...t);return this.reduxStore.dispatch(e),e}:t=>{this.setState({[n]:t})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_STATE_FIELDS_VALUES_SETTER",overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}}const gi=t=>{const e=null!=t?t:{};return(t,i)=>{var n;const r={hasChanged:(t,e)=>!u(t,e),attribute:!1,...e};s(r)(t,i);const o=t;o.reduxProperties=o.reduxProperties||new Map,o.reduxProperties.set(i,{selector:null!==(n=e.selector)&&void 0!==n?n:t=>t[i],store:e.store})}};var Oi,Si;navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(Si=null===(Oi=window.safari)||void 0===Oi?void 0:Oi.pushNotification)||void 0===Si||Si.toString());const Ei={colorError:pt.external(bt.colorError,"Design system"),fontFamily:pt.external(bt.contentFont,"Design system")},ji=y`
92
+ `;class Et{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var i,n;t=this.resolvePluralKey(t,e);let r=null!==(n=null!==(i=this.labels[t])&&void 0!==i?i:this.defaultLabels[t])&&void 0!==n?n:"";return e.forEach(((t,e)=>r=r.replace(new RegExp(`\\{${e}([^}]*)\\}`,"g"),((e,i)=>this.formatValue(t,i))))),r}resolvePluralKey(t,e){for(let i of e)if("number"==typeof i){const e=`${String(t)}[\\=${i}]`;if(e in this.labels||e in this.defaultLabels)return e}return t}formatValue(t,e){return t instanceof Date?this.formatDate(t,e):null!=t?t:""}formatDate(t,e){const i=i=>(null==e?void 0:e.includes("date"))?t.toLocaleDateString(i):(null==e?void 0:e.includes("time"))?t.toLocaleTimeString(i):t.toLocaleString(i);try{return i(document.documentElement.lang)}catch(t){return i()}}}function jt(t){var e;return null!==(e=null==t?void 0:t.isFtReduxStore)&&void 0!==e&&e}var Ct,Nt,Rt;const kt=Symbol("internalReduxEventsUnsubscribers"),Mt=Symbol("internalStoresUnsubscribers"),At=Symbol("internalStores");class Ut extends St{constructor(){super(...arguments),this[Ct]=new Map,this[Nt]=new Map,this[Rt]=[]}update(t){var e;super.update(t),(null===(e=this.reduxReactiveProperties)||void 0===e?void 0:e.some((e=>t.has(e))))&&this.updateFromStores()}getUnnamedStore(){if(this[At].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[At].values()][0]}getStore(t){return null==t?this.getUnnamedStore():this[At].get(t)}addStore(t,e){var i;e=null!==(i=null!=e?e:jt(t)?t.name:void 0)&&void 0!==i?i:"default-store",this.unsubscribeFromStore(e),this.setupStore(e,t)}removeStore(t){const e="string"==typeof t?t:t.name;this.unsubscribeFromStore(e),this[At].delete(e)}setupStore(t,e){this[At].set(t,e),this.subscribeToStore(t,e),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[At].forEach(((t,e)=>this.subscribeToStore(e,t))),this.updateFromStores()}updateFromStores(){this.reduxProperties&&this.reduxProperties.forEach(((t,e)=>{const i=this.constructor.getPropertyOptions(e);if(!(null==i?void 0:i.attribute)||!this.hasAttribute("string"==typeof(null==i?void 0:i.attribute)?i.attribute:e)){const i=this.getStore(t.store);i&&(t.store?this[Mt].has(t.store):this[Mt].size>0)&&(this[e]=t.selector(i.getState(),this))}}))}subscribeToStore(t,e){var i;this[Mt].set(t,e.subscribe((()=>this.updateFromStores()))),jt(e)&&e.eventBus&&(null===(i=this.reduxEventListeners)||void 0===i||i.forEach(((t,i)=>{if("function"==typeof this[i]&&(!t.store||e.name===t.store)){const n=t=>this[i](t);e.eventBus.addEventListener(t.eventName,n),this[kt].push((()=>e.eventBus.removeEventListener(t.eventName,n)))}}))),this.onStoreAvailable(t)}unsubscribeFromStores(){this[Mt].forEach(((t,e)=>this.unsubscribeFromStore(e))),this[kt].forEach((t=>t())),this[kt]=[]}unsubscribeFromStore(t){this[Mt].has(t)&&this[Mt].get(t)(),this[Mt].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}function $t(t){for(var e=arguments.length,i=Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];throw Error("[Immer] minified error nr: "+t+(i.length?" "+i.map((function(t){return"'"+t+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Pt(t){return!!t&&!!t[we]}function Tt(t){var e;return!!t&&(function(t){if(!t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;var i=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return i===Object||"function"==typeof i&&Function.toString.call(i)===ge}(t)||Array.isArray(t)||!!t[me]||!!(null===(e=t.constructor)||void 0===e?void 0:e[me])||Dt(t)||Wt(t))}function _t(t,e,i){void 0===i&&(i=!1),0===Lt(t)?(i?Object.keys:Oe)(t).forEach((function(n){i&&"symbol"==typeof n||e(n,t[n],t)})):t.forEach((function(i,n){return e(n,i,t)}))}function Lt(t){var e=t[we];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Dt(t)?2:Wt(t)?3:0}function Ft(t,e){return 2===Lt(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function It(t,e,i){var n=Lt(t);2===n?t.set(e,i):3===n?t.add(i):t[e]=i}function Bt(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function Dt(t){return pe&&t instanceof Map}function Wt(t){return be&&t instanceof Set}function Kt(t){return t.o||t.t}function zt(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Se(t);delete e[we];for(var i=Oe(e),n=0;n<i.length;n++){var r=i[n],o=e[r];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(e[r]={configurable:!0,writable:!0,enumerable:o.enumerable,value:t[r]})}return Object.create(Object.getPrototypeOf(t),e)}function Ht(t,e){return void 0===e&&(e=!1),Vt(t)||Pt(t)||!Tt(t)||(Lt(t)>1&&(t.set=t.add=t.clear=t.delete=qt),Object.freeze(t),e&&_t(t,(function(t,e){return Ht(e,!0)}),!0)),t}function qt(){$t(2)}function Vt(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function Jt(t){var e=Ee[t];return e||$t(18,t),e}function Zt(){return de}function Xt(t,e){e&&(Jt("Patches"),t.u=[],t.s=[],t.v=e)}function Gt(t){Qt(t),t.p.forEach(te),t.p=null}function Qt(t){t===de&&(de=t.l)}function Yt(t){return de={p:[],l:de,h:t,m:!0,_:0}}function te(t){var e=t[we];0===e.i||1===e.i?e.j():e.g=!0}function ee(t,e){e._=e.p.length;var i=e.p[0],n=void 0!==t&&t!==i;return e.h.O||Jt("ES5").S(e,t,n),n?(i[we].P&&(Gt(e),$t(4)),Tt(t)&&(t=ie(e,t),e.l||re(e,t)),e.u&&Jt("Patches").M(i[we].t,t,e.u,e.s)):t=ie(e,i,[]),Gt(e),e.u&&e.v(e.u,e.s),t!==ye?t:void 0}function ie(t,e,i){if(Vt(e))return e;var n=e[we];if(!n)return _t(e,(function(r,o){return ne(t,n,e,r,o,i)}),!0),e;if(n.A!==t)return e;if(!n.P)return re(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var r=4===n.i||5===n.i?n.o=zt(n.k):n.o,o=r,s=!1;3===n.i&&(o=new Set(r),r.clear(),s=!0),_t(o,(function(e,o){return ne(t,n,r,e,o,i,s)})),re(t,r,!1),i&&t.u&&Jt("Patches").N(n,i,t.u,t.s)}return n.o}function ne(t,e,i,n,r,o,s){if(Pt(r)){var a=ie(t,r,o&&e&&3!==e.i&&!Ft(e.R,n)?o.concat(n):void 0);if(It(i,n,a),!Pt(a))return;t.m=!1}else s&&i.add(r);if(Tt(r)&&!Vt(r)){if(!t.h.D&&t._<1)return;ie(t,r),e&&e.A.l||re(t,r)}}function re(t,e,i){void 0===i&&(i=!1),!t.l&&t.h.D&&t.m&&Ht(e,i)}function oe(t,e){var i=t[we];return(i?Kt(i):t)[e]}function se(t,e){if(e in t)for(var i=Object.getPrototypeOf(t);i;){var n=Object.getOwnPropertyDescriptor(i,e);if(n)return n;i=Object.getPrototypeOf(i)}}function ae(t){t.P||(t.P=!0,t.l&&ae(t.l))}function ce(t){t.o||(t.o=zt(t.t))}function ue(t,e,i){var n=Dt(e)?Jt("MapSet").F(e,i):Wt(e)?Jt("MapSet").T(e,i):t.O?function(t,e){var i=Array.isArray(t),n={i:i?1:0,A:e?e.A:Zt(),P:!1,I:!1,R:{},l:e,t,k:null,o:null,j:null,C:!1},r=n,o=je;i&&(r=[n],o=Ce);var s=Proxy.revocable(r,o),a=s.revoke,c=s.proxy;return n.k=c,n.j=a,c}(e,i):Jt("ES5").J(e,i);return(i?i.A:Zt()).p.push(n),n}function le(t){return Pt(t)||$t(22,t),function t(e){if(!Tt(e))return e;var i,n=e[we],r=Lt(e);if(n){if(!n.P&&(n.i<4||!Jt("ES5").K(n)))return n.t;n.I=!0,i=fe(e,r),n.I=!1}else i=fe(e,r);return _t(i,(function(e,r){n&&function(t,e){return 2===Lt(t)?t.get(e):t[e]}(n.t,e)===r||It(i,e,t(r))})),3===r?new Set(i):i}(t)}function fe(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return zt(t)}Ct=Mt,Nt=At,Rt=kt;var he,de,ve="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),pe="undefined"!=typeof Map,be="undefined"!=typeof Set,xe="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,ye=ve?Symbol.for("immer-nothing"):((he={})["immer-nothing"]=!0,he),me=ve?Symbol.for("immer-draftable"):"__$immer_draftable",we=ve?Symbol.for("immer-state"):"__$immer_state",ge=""+Object.prototype.constructor,Oe="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Se=Object.getOwnPropertyDescriptors||function(t){var e={};return Oe(t).forEach((function(i){e[i]=Object.getOwnPropertyDescriptor(t,i)})),e},Ee={},je={get:function(t,e){if(e===we)return t;var i=Kt(t);if(!Ft(i,e))return function(t,e,i){var n,r=se(e,i);return r?"value"in r?r.value:null===(n=r.get)||void 0===n?void 0:n.call(t.k):void 0}(t,i,e);var n=i[e];return t.I||!Tt(n)?n:n===oe(t.t,e)?(ce(t),t.o[e]=ue(t.A.h,n,t)):n},has:function(t,e){return e in Kt(t)},ownKeys:function(t){return Reflect.ownKeys(Kt(t))},set:function(t,e,i){var n=se(Kt(t),e);if(null==n?void 0:n.set)return n.set.call(t.k,i),!0;if(!t.P){var r=oe(Kt(t),e),o=null==r?void 0:r[we];if(o&&o.t===i)return t.o[e]=i,t.R[e]=!1,!0;if(Bt(i,r)&&(void 0!==i||Ft(t.t,e)))return!0;ce(t),ae(t)}return t.o[e]===i&&(void 0!==i||e in t.o)||Number.isNaN(i)&&Number.isNaN(t.o[e])||(t.o[e]=i,t.R[e]=!0),!0},deleteProperty:function(t,e){return void 0!==oe(t.t,e)||e in t.t?(t.R[e]=!1,ce(t),ae(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var i=Kt(t),n=Reflect.getOwnPropertyDescriptor(i,e);return n?{writable:!0,configurable:1!==t.i||"length"!==e,enumerable:n.enumerable,value:i[e]}:n},defineProperty:function(){$t(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){$t(12)}},Ce={};_t(je,(function(t,e){Ce[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),Ce.deleteProperty=function(t,e){return Ce.set.call(this,t,e,void 0)},Ce.set=function(t,e,i){return je.set.call(this,t[0],e,i,t[0])};var Ne=function(){function t(t){var e=this;this.O=xe,this.D=!0,this.produce=function(t,i,n){if("function"==typeof t&&"function"!=typeof i){var r=i;i=t;var o=e;return function(t){var e=this;void 0===t&&(t=r);for(var n=arguments.length,s=Array(n>1?n-1:0),a=1;a<n;a++)s[a-1]=arguments[a];return o.produce(t,(function(t){var n;return(n=i).call.apply(n,[e,t].concat(s))}))}}var s;if("function"!=typeof i&&$t(6),void 0!==n&&"function"!=typeof n&&$t(7),Tt(t)){var a=Yt(e),c=ue(e,t,void 0),u=!0;try{s=i(c),u=!1}finally{u?Gt(a):Qt(a)}return"undefined"!=typeof Promise&&s instanceof Promise?s.then((function(t){return Xt(a,n),ee(t,a)}),(function(t){throw Gt(a),t})):(Xt(a,n),ee(s,a))}if(!t||"object"!=typeof t){if(void 0===(s=i(t))&&(s=t),s===ye&&(s=void 0),e.D&&Ht(s,!0),n){var l=[],f=[];Jt("Patches").M(t,s,l,f),n(l,f)}return s}$t(21,t)},this.produceWithPatches=function(t,i){if("function"==typeof t)return function(i){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return e.produceWithPatches(i,(function(e){return t.apply(void 0,[e].concat(r))}))};var n,r,o=e.produce(t,i,(function(t,e){n=t,r=e}));return"undefined"!=typeof Promise&&o instanceof Promise?o.then((function(t){return[t,n,r]})):[o,n,r]},"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze)}var e=t.prototype;return e.createDraft=function(t){Tt(t)||$t(8),Pt(t)&&(t=le(t));var e=Yt(this),i=ue(this,t,void 0);return i[we].C=!0,Qt(e),i},e.finishDraft=function(t,e){var i=(t&&t[we]).A;return Xt(i,e),ee(void 0,i)},e.setAutoFreeze=function(t){this.D=t},e.setUseProxies=function(t){t&&!xe&&$t(20),this.O=t},e.applyPatches=function(t,e){var i;for(i=e.length-1;i>=0;i--){var n=e[i];if(0===n.path.length&&"replace"===n.op){t=n.value;break}}i>-1&&(e=e.slice(i+1));var r=Jt("Patches").$;return Pt(t)?r(t,e):this.produce(t,(function(t){return r(t,e)}))},t}(),Re=new Ne,ke=Re.produce;function Me(t){return Me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Me(t)}function Ae(t){var e=function(t,e){if("object"!==Me(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!==Me(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Me(e)?e:String(e)}function Ue(t,e,i){return(e=Ae(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function $e(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Pe(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?$e(Object(i),!0).forEach((function(e){Ue(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):$e(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function Te(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}Re.produceWithPatches.bind(Re),Re.setAutoFreeze.bind(Re),Re.setUseProxies.bind(Re),Re.applyPatches.bind(Re),Re.createDraft.bind(Re),Re.finishDraft.bind(Re);var _e="function"==typeof Symbol&&Symbol.observable||"@@observable",Le=function(){return Math.random().toString(36).substring(7).split("").join(".")},Fe={INIT:"@@redux/INIT"+Le(),REPLACE:"@@redux/REPLACE"+Le(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Le()}};function Ie(t,e,i){var n;if("function"==typeof e&&"function"==typeof i||"function"==typeof i&&"function"==typeof arguments[3])throw new Error(Te(0));if("function"==typeof e&&void 0===i&&(i=e,e=void 0),void 0!==i){if("function"!=typeof i)throw new Error(Te(1));return i(Ie)(t,e)}if("function"!=typeof t)throw new Error(Te(2));var r=t,o=e,s=[],a=s,c=!1;function u(){a===s&&(a=s.slice())}function l(){if(c)throw new Error(Te(3));return o}function f(t){if("function"!=typeof t)throw new Error(Te(4));if(c)throw new Error(Te(5));var e=!0;return u(),a.push(t),function(){if(e){if(c)throw new Error(Te(6));e=!1,u();var i=a.indexOf(t);a.splice(i,1),s=null}}}function h(t){if(!function(t){if("object"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}(t))throw new Error(Te(7));if(void 0===t.type)throw new Error(Te(8));if(c)throw new Error(Te(9));try{c=!0,o=r(o,t)}finally{c=!1}for(var e=s=a,i=0;i<e.length;i++){(0,e[i])()}return t}return h({type:Fe.INIT}),(n={dispatch:h,subscribe:f,getState:l,replaceReducer:function(t){if("function"!=typeof t)throw new Error(Te(10));r=t,h({type:Fe.REPLACE})}})[_e]=function(){var t,e=f;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(Te(11));function i(){t.next&&t.next(l())}return i(),{unsubscribe:e(i)}}})[_e]=function(){return this},t},n}function Be(t){for(var e=Object.keys(t),i={},n=0;n<e.length;n++){var r=e[n];"function"==typeof t[r]&&(i[r]=t[r])}var o,s=Object.keys(i);try{!function(t){Object.keys(t).forEach((function(e){var i=t[e];if(void 0===i(void 0,{type:Fe.INIT}))throw new Error(Te(12));if(void 0===i(void 0,{type:Fe.PROBE_UNKNOWN_ACTION()}))throw new Error(Te(13))}))}(i)}catch(t){o=t}return function(t,e){if(void 0===t&&(t={}),o)throw o;for(var n=!1,r={},a=0;a<s.length;a++){var c=s[a],u=i[c],l=t[c],f=u(l,e);if(void 0===f)throw e&&e.type,new Error(Te(14));r[c]=f,n=n||f!==l}return(n=n||s.length!==Object.keys(t).length)?r:t}}function De(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce((function(t,e){return function(){return t(e.apply(void 0,arguments))}}))}function We(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return function(t){return function(){var i=t.apply(void 0,arguments),n=function(){throw new Error(Te(15))},r={getState:i.getState,dispatch:function(){return n.apply(void 0,arguments)}},o=e.map((function(t){return t(r)}));return n=De.apply(void 0,o)(i.dispatch),Pe(Pe({},i),{},{dispatch:n})}}}function Ke(t){return function(e){var i=e.dispatch,n=e.getState;return function(e){return function(r){return"function"==typeof r?r(i,n,t):e(r)}}}}var ze=Ke();ze.withExtraArgument=Ke;var He,qe=ze,Ve=(He=function(t,e){return He=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},He(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}He(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),Je=function(t,e){var i,n,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,n&&(r=2&o[0]?n.return:o[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,o[1])).done)return r;switch(n=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(r=s.trys,(r=r.length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],n=0}finally{i=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},Ze=function(t,e){for(var i=0,n=e.length,r=t.length;i<n;i++,r++)t[r]=e[i];return t},Xe=Object.defineProperty,Ge=Object.defineProperties,Qe=Object.getOwnPropertyDescriptors,Ye=Object.getOwnPropertySymbols,ti=Object.prototype.hasOwnProperty,ei=Object.prototype.propertyIsEnumerable,ii=function(t,e,i){return e in t?Xe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i},ni=function(t,e){for(var i in e||(e={}))ti.call(e,i)&&ii(t,i,e[i]);if(Ye)for(var n=0,r=Ye(e);n<r.length;n++){i=r[n];ei.call(e,i)&&ii(t,i,e[i])}return t},ri=function(t,e){return Ge(t,Qe(e))},oi="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?De:De.apply(null,arguments)};var si=function(t){function e(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];var r=t.apply(this,i)||this;return Object.setPrototypeOf(r,e.prototype),r}return Ve(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,Ze([void 0],t[0].concat(this)))):new(e.bind.apply(e,Ze([void 0],t.concat(this))))},e}(Array),ai=function(t){function e(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];var r=t.apply(this,i)||this;return Object.setPrototypeOf(r,e.prototype),r}return Ve(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,Ze([void 0],t[0].concat(this)))):new(e.bind.apply(e,Ze([void 0],t.concat(this))))},e}(Array);function ci(t){return Tt(t)?ke(t,(function(){})):t}function ui(){return function(t){return function(t){void 0===t&&(t={});var e=t.thunk,i=void 0===e||e;t.immutableCheck,t.serializableCheck;var n=new si;i&&(!function(t){return"boolean"==typeof t}(i)?n.push(qe.withExtraArgument(i.extraArgument)):n.push(qe));return n}(t)}}function li(t){var e,i=ui(),n=t||{},r=n.reducer,o=void 0===r?void 0:r,s=n.middleware,a=void 0===s?i():s,c=n.devTools,u=void 0===c||c,l=n.preloadedState,f=void 0===l?void 0:l,h=n.enhancers,d=void 0===h?void 0:h;if("function"==typeof o)e=o;else{if(!function(t){if("object"!=typeof t||null===t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;for(var i=e;null!==Object.getPrototypeOf(i);)i=Object.getPrototypeOf(i);return e===i}(o))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');e=Be(o)}var v=a;"function"==typeof v&&(v=v(i));var p=We.apply(void 0,v),b=De;u&&(b=oi(ni({trace:!1},"object"==typeof u&&u)));var x=new ai(p),y=x;return Array.isArray(d)?y=Ze([p],d):"function"==typeof d&&(y=d(x)),Ie(e,f,b.apply(void 0,y))}function fi(t,e){function i(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];if(e){var r=e.apply(void 0,i);if(!r)throw new Error("prepareAction did not return an object");return ni(ni({type:t,payload:r.payload},"meta"in r&&{meta:r.meta}),"error"in r&&{error:r.error})}return{type:t,payload:i[0]}}return i.toString=function(){return""+t},i.type=t,i.match=function(e){return e.type===t},i}function hi(t){var e,i={},n=[],r={addCase:function(t,e){var n="string"==typeof t?t:t.type;if(n in i)throw new Error("addCase cannot be called with two reducers for the same action type");return i[n]=e,r},addMatcher:function(t,e){return n.push({matcher:t,reducer:e}),r},addDefaultCase:function(t){return e=t,r}};return t(r),[i,n,e]}function di(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");var i,n="function"==typeof t.initialState?t.initialState:ci(t.initialState),r=t.reducers||{},o=Object.keys(r),s={},a={},c={};function u(){var e="function"==typeof t.extraReducers?hi(t.extraReducers):[t.extraReducers],i=e[0],r=void 0===i?{}:i,o=e[1],s=void 0===o?[]:o,c=e[2],u=void 0===c?void 0:c,l=ni(ni({},r),a);return function(t,e,i,n){void 0===i&&(i=[]);var r,o="function"==typeof e?hi(e):[e,i,n],s=o[0],a=o[1],c=o[2];if(function(t){return"function"==typeof t}(t))r=function(){return ci(t())};else{var u=ci(t);r=function(){return u}}function l(t,e){void 0===t&&(t=r());var i=Ze([s[e.type]],a.filter((function(t){return(0,t.matcher)(e)})).map((function(t){return t.reducer})));return 0===i.filter((function(t){return!!t})).length&&(i=[c]),i.reduce((function(t,i){if(i){var n;if(Pt(t))return void 0===(n=i(t,e))?t:n;if(Tt(t))return ke(t,(function(t){return i(t,e)}));if(void 0===(n=i(t,e))){if(null===t)return t;throw Error("A case reducer on a non-draftable value must not return undefined")}return n}return t}),t)}return l.getInitialState=r,l}(n,(function(t){for(var e in l)t.addCase(e,l[e]);for(var i=0,n=s;i<n.length;i++){var r=n[i];t.addMatcher(r.matcher,r.reducer)}u&&t.addDefaultCase(u)}))}return o.forEach((function(t){var i,n,o=r[t],u=e+"/"+t;"reducer"in o?(i=o.reducer,n=o.prepare):i=o,s[t]=i,a[u]=i,c[t]=n?fi(u,n):fi(u)})),{name:e,reducer:function(t,e){return i||(i=u()),i(t,e)},actions:c,caseReducers:s,getInitialState:function(){return i||(i=u()),i.getInitialState()}}}var vi=["name","message","stack","code"],pi=function(t,e){this.payload=t,this.meta=e},bi=function(t,e){this.payload=t,this.meta=e},xi=function(t){if("object"==typeof t&&null!==t){for(var e={},i=0,n=vi;i<n.length;i++){var r=n[i];"string"==typeof t[r]&&(e[r]=t[r])}return e}return{message:String(t)}};function yi(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}!function(){function t(t,e,i){var n=fi(t+"/fulfilled",(function(t,e,i,n){return{payload:t,meta:ri(ni({},n||{}),{arg:i,requestId:e,requestStatus:"fulfilled"})}})),r=fi(t+"/pending",(function(t,e,i){return{payload:void 0,meta:ri(ni({},i||{}),{arg:e,requestId:t,requestStatus:"pending"})}})),o=fi(t+"/rejected",(function(t,e,n,r,o){return{payload:r,error:(i&&i.serializeError||xi)(t||"Rejected"),meta:ri(ni({},o||{}),{arg:n,requestId:e,rejectedWithValue:!!r,requestStatus:"rejected",aborted:"AbortError"===(null==t?void 0:t.name),condition:"ConditionError"===(null==t?void 0:t.name)})}})),s="undefined"!=typeof AbortController?AbortController:function(){function t(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return t.prototype.abort=function(){},t}();return Object.assign((function(t){return function(a,c,u){var l,f=(null==i?void 0:i.idGenerator)?i.idGenerator(t):function(t){void 0===t&&(t=21);for(var e="",i=t;i--;)e+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return e}(),h=new s;function d(t){l=t,h.abort()}var v=function(){return s=this,v=null,p=function(){var s,v,p,b,x,y;return Je(this,(function(m){switch(m.label){case 0:return m.trys.push([0,4,,5]),b=null==(s=null==i?void 0:i.condition)?void 0:s.call(i,t,{getState:c,extra:u}),null===(w=b)||"object"!=typeof w||"function"!=typeof w.then?[3,2]:[4,b];case 1:b=m.sent(),m.label=2;case 2:if(!1===b||h.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return x=new Promise((function(t,e){return h.signal.addEventListener("abort",(function(){return e({name:"AbortError",message:l||"Aborted"})}))})),a(r(f,t,null==(v=null==i?void 0:i.getPendingMeta)?void 0:v.call(i,{requestId:f,arg:t},{getState:c,extra:u}))),[4,Promise.race([x,Promise.resolve(e(t,{dispatch:a,getState:c,extra:u,requestId:f,signal:h.signal,abort:d,rejectWithValue:function(t,e){return new pi(t,e)},fulfillWithValue:function(t,e){return new bi(t,e)}})).then((function(e){if(e instanceof pi)throw e;return e instanceof bi?n(e.payload,f,t,e.meta):n(e,f,t)}))])];case 3:return p=m.sent(),[3,5];case 4:return y=m.sent(),p=y instanceof pi?o(null,f,t,y.payload,y.meta):o(y,f,t),[3,5];case 5:return i&&!i.dispatchConditionRejection&&o.match(p)&&p.meta.condition||a(p),[2,p]}var w}))},new Promise((function(t,e){var i=function(t){try{r(p.next(t))}catch(t){e(t)}},n=function(t){try{r(p.throw(t))}catch(t){e(t)}},r=function(e){return e.done?t(e.value):Promise.resolve(e.value).then(i,n)};r((p=p.apply(s,v)).next())}));var s,v,p}();return Object.assign(v,{abort:d,requestId:f,arg:t,unwrap:function(){return v.then(yi)}})}}),{pending:r,rejected:o,fulfilled:n,typePrefix:t})}t.withTypes=function(){return t}}();var mi="listenerMiddleware";fi(mi+"/add"),fi(mi+"/removeAll"),fi(mi+"/remove"),"function"==typeof queueMicrotask&&queueMicrotask.bind("undefined"!=typeof window?window:"undefined"!=typeof global?global:globalThis),function(){function t(t,e){var i=r[t];return i?i.enumerable=e:r[t]=i={configurable:!0,enumerable:e,get:function(){var e=this[we];return je.get(e,t)},set:function(e){var i=this[we];je.set(i,t,e)}},i}function e(t){for(var e=t.length-1;e>=0;e--){var r=t[e][we];if(!r.P)switch(r.i){case 5:n(r)&&ae(r);break;case 4:i(r)&&ae(r)}}}function i(t){for(var e=t.t,i=t.k,n=Oe(i),r=n.length-1;r>=0;r--){var o=n[r];if(o!==we){var s=e[o];if(void 0===s&&!Ft(e,o))return!0;var a=i[o],c=a&&a[we];if(c?c.t!==s:!Bt(a,s))return!0}}var u=!!e[we];return n.length!==Oe(e).length+(u?0:1)}function n(t){var e=t.k;if(e.length!==t.t.length)return!0;var i=Object.getOwnPropertyDescriptor(e,e.length-1);if(i&&!i.get)return!0;for(var n=0;n<e.length;n++)if(!e.hasOwnProperty(n))return!0;return!1}var r={};!function(t,e){Ee[t]||(Ee[t]=e)}("ES5",{J:function(e,i){var n=Array.isArray(e),r=function(e,i){if(e){for(var n=Array(i.length),r=0;r<i.length;r++)Object.defineProperty(n,""+r,t(r,!0));return n}var o=Se(i);delete o[we];for(var s=Oe(o),a=0;a<s.length;a++){var c=s[a];o[c]=t(c,e||!!o[c].enumerable)}return Object.create(Object.getPrototypeOf(i),o)}(n,e),o={i:n?5:4,A:i?i.A:Zt(),P:!1,I:!1,R:{},l:i,t:e,k:r,o:null,g:!1,C:!1};return Object.defineProperty(r,we,{value:o,writable:!0}),r},S:function(t,i,r){r?Pt(i)&&i[we].A===t&&e(t.p):(t.u&&function t(e){if(e&&"object"==typeof e){var i=e[we];if(i){var r=i.t,o=i.k,s=i.R,a=i.i;if(4===a)_t(o,(function(e){e!==we&&(void 0!==r[e]||Ft(r,e)?s[e]||t(o[e]):(s[e]=!0,ae(i)))})),_t(r,(function(t){void 0!==o[t]||Ft(o,t)||(s[t]=!1,ae(i))}));else if(5===a){if(n(i)&&(ae(i),s.length=!0),o.length<r.length)for(var c=o.length;c<r.length;c++)s[c]=!1;else for(var u=r.length;u<o.length;u++)s[u]=!0;for(var l=Math.min(o.length,r.length),f=0;f<l;f++)o.hasOwnProperty(f)||(s[f]=!0),void 0===s[f]&&t(o[f])}}}}(t.p[0]),e(t.p))},K:function(t){return 4===t.i?i(t):n(t)}})}(),window.ftReduxStores||(window.ftReduxStores={});class wi{static get(t){var e;const i="string"==typeof t?t:t.name,n="string"==typeof t?void 0:t,r=window.ftReduxStores[i];if(jt(r))return r;if(null==n)return;const o=di({...n,reducers:null!==(e=n.reducers)&&void 0!==e?e:{}}),s=li({reducer:(t,e)=>{var i;switch(e.type){case"CLEAR_FT_REDUX_STORE":return o.getInitialState();case"DEFAULT_STATE_FIELDS_VALUES_SETTER":return{...t,...null!==(i=e.overwrites)&&void 0!==i?i:{}};default:return o.reducer(t,e)}}});return window.ftReduxStores[n.name]=new wi(o,s)}constructor(t,e){this.reduxSlice=t,this.reduxStore=e,this.isFtReduxStore=!0,this.eventBus=document.createElement("event-bus"),this.actions=new Proxy(this.reduxSlice.actions,{get:(t,e,i)=>{const n=e,r=t[n];return r?(...t)=>{const e=r(...t);return this.reduxStore.dispatch(e),e}:t=>{this.setState({[n]:t})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_STATE_FIELDS_VALUES_SETTER",overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}}const gi=t=>{const e=null!=t?t:{};return(t,i)=>{var n;const r={hasChanged:(t,e)=>!u(t,e),attribute:!1,...e};s(r)(t,i);const o=t;o.reduxProperties=o.reduxProperties||new Map,o.reduxProperties.set(i,{selector:null!==(n=e.selector)&&void 0!==n?n:t=>t[i],store:e.store})}};var Oi,Si;navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(Si=null===(Oi=window.safari)||void 0===Oi?void 0:Oi.pushNotification)||void 0===Si||Si.toString());const Ei={colorError:pt.external(bt.colorError,"Design system"),fontFamily:pt.external(bt.contentFont,"Design system")},ji=y`
93
93
  .topic {
94
94
  font-family: ${Ei.fontFamily};
95
95
  overflow-x: auto;
@@ -179,7 +179,7 @@ function(t,e){return(({finisher:t,descriptor:e})=>(i,n)=>{var r;if(void 0===n){c
179
179
  `,Xi=y`
180
180
  `,Gi=wi.get({name:"ft-app-info",reducers:{setBaseUrl:(t,e)=>{t.baseUrl=e.payload},setApiIntegrationIdentifier:(t,e)=>{t.apiIntegrationIdentifier=e.payload},setUiLocale:(t,e)=>{t.uiLocale=e.payload},setAvailableUiLocales:(t,e)=>{t.availableUiLocales=e.payload},setEditorMode:(t,e)=>{t.editorMode=e.payload},setNoCustom:(t,e)=>{t.noCustom=e.payload},setNoCustomComponent:(t,e)=>{t.noCustomComponent=e.payload},setSession:(t,e)=>{t.session=e.payload}},initialState:{uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],editorMode:!1,noCustom:!1,noCustomComponent:!1}});class Qi{static build(t){const{baseUrl:e,apiIntegrationIdentifier:i}=Gi.getState(),n=null!=t?t:i;if(e&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(e,n,!0)}static get(t){var e;return null!=t?Qi.build(t):null!==(e=Qi.API)&&void 0!==e?e:Qi.API=Qi.build()}static await(t){return new Promise((e=>{let i=Qi.get(t);if(i)e(i);else{const n=Gi.subscribe((()=>{i=Qi.get(t),i&&(n(),e(i))}))}}))}}var Yi;const tn=Symbol("clearAfterUnitTest");class en{constructor(t){this.messageContextProvider=t,this.defaultMessages={},this.cache=new n,this.listeners={},this.currentUiLocale="",this[Yi]=()=>{this.defaultMessages={},this.cache=new n,this.listeners={}},this.currentUiLocale=Gi.getState().uiLocale,Gi.subscribe((()=>this.clearWhenUiLocaleChanges()))}clearWhenUiLocaleChanges(){const{uiLocale:t}=Gi.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){const e=t.name.toLowerCase();this.cache.setFinal(e,t),this.notify(e)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,e){var i;if(t=t.toLowerCase(),Object.keys(e).length>0){const n={...null!==(i=this.defaultMessages[t])&&void 0!==i?i:{},...e};u(this.defaultMessages[t],n)||(this.defaultMessages[t]=n,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,e,...i){var n,r,o;t=t.toLowerCase(),this.fetchContext(t);const s=null!==(r=null===(n=this.cache.getNow(t))||void 0===n?void 0:n.messages)&&void 0!==r?r:{};return new Et(null!==(o=this.defaultMessages[t])&&void 0!==o?o:{},s).resolve(e,...i)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,(()=>this.messageContextProvider(this.currentUiLocale,t))),await this.notify(t)}catch(t){console.error(t)}}subscribe(t,e){var i;return t=t.toLowerCase(),this.listeners[t]=null!==(i=this.listeners[t])&&void 0!==i?i:new Set,this.listeners[t].add(e),()=>{var i;return null===(i=this.listeners[t])||void 0===i?void 0:i.delete(e)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map((t=>this.notify(t))))}async notify(t){null!=this.listeners[t]&&await Promise.all([...this.listeners[t].values()].map((t=>{return(e=0,new Promise((t=>setTimeout(t,e)))).then((()=>t())).catch((()=>null));var e})))}}Yi=tn,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new en((async(t,e)=>(await Qi.await()).getFluidTopicsMessageContext(t,e)))),null==window.FluidTopicsCustomI18nService&&(window.FluidTopicsCustomI18nService=new en((async(t,e)=>(await Qi.await()).getCustomMessageContext(t,e))));const nn=window.FluidTopicsI18nService,rn=window.FluidTopicsCustomI18nService;var on=function(t,e,i,n){for(var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};class sn extends St{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.availableUiLocales=[],this.editorMode=!1,this.noCustom=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.messageContexts=[],this.apiProvider=()=>Qi.get(),this.cache=new n,this.cleanSessionDebouncer=new r}render(){return X`
181
181
  <slot></slot>
182
- `}updated(t){super.updated(t),t.has("baseUrl")&&Gi.actions.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&Gi.actions.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&Gi.actions.setUiLocale(this.uiLocale),t.has("noCustom")&&Gi.actions.setNoCustom(this.noCustom),t.has("editorMode")&&Gi.actions.setEditorMode(this.editorMode),t.has("noCustomComponent")&&Gi.actions.setNoCustomComponent(this.noCustomComponent),t.has("session")&&Gi.actions.setSession(this.session),t.has("availableUiLocales")&&Gi.actions.setAvailableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>nn.addContext(t))),setTimeout((()=>this.updateIfNeeded()))}async updateIfNeeded(){const t=this.apiProvider();!this.withManualResources&&t&&(null==this.session&&(this.session=await this.cache.get("session",(async()=>{const e=await t.getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>{this.cache.clear("session"),this.session=void 0}),e.idleTimeoutInMillis),e}))),null==this.availableUiLocales&&(this.availableUiLocales=await this.cache.get("availableUiLocales",(()=>t.getAvailableUiLocales()))))}}sn.elementDefinitions={},sn.styles=Xi,on([s()],sn.prototype,"baseUrl",void 0),on([s()],sn.prototype,"apiIntegrationIdentifier",void 0),on([s()],sn.prototype,"uiLocale",void 0),on([f([])],sn.prototype,"availableUiLocales",void 0),on([s({type:Boolean})],sn.prototype,"editorMode",void 0),on([s({type:Boolean})],sn.prototype,"noCustom",void 0),on([s({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],sn.prototype,"noCustomComponent",void 0),on([s({type:Boolean})],sn.prototype,"withManualResources",void 0),on([f([])],sn.prototype,"messageContexts",void 0),on([f(void 0)],sn.prototype,"session",void 0),on([s({type:Object})],sn.prototype,"apiProvider",void 0);class an{async listMySearches(){var t;return(null===(t=Gi.getState().session)||void 0===t?void 0:t.sessionAuthenticated)?(await Qi.await()).listMySearches(Gi.getState().session.profile.userId):[]}}const cn=new n;class un{async listMyBookmarks(){return cn.get("bookmarks",(async()=>(await Qi.await()).listMyBookmarks(Gi.getState().session.profile.userId)))}clearCache(){cn.clear("bookmarks")}}const ln=wi.get({name:"ft-user-assets",initialState:{savedSearches:void 0,bookmarks:void 0}});new class{constructor(){this.currentSession=Gi.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new un,Gi.subscribe((()=>this.reloadWhenUserSessionChanges()))}reloadWhenUserSessionChanges(){var t;const{session:e}=Gi.getState();u(null===(t=this.currentSession)||void 0===t?void 0:t.profile,null==e?void 0:e.profile)||(this.currentSession=e,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){ln.actions.savedSearches(void 0)}clearMyBookmarks(){ln.actions.bookmarks(void 0)}async reloadMySearches(){const t=new an,e=await t.listMySearches();ln.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){const e=(null===(t=this.currentSession)||void 0===t?void 0:t.sessionAuthenticated)?await this.bookmarksService.listMyBookmarks():void 0;ln.actions.bookmarks(e)}}},l("ft-app-context")(sn);var fn=function(t,e,i,n){for(var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};const hn=Symbol("i18nProperties"),dn=Symbol("i18nUnsubs");function vn(t){var e;class i extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map}get i18nService(){return this.useCustomMessageContexts?rn:nn}i18n(t,e,...i){var n;if("string"==typeof t)return this.i18nService.resolveMessage(t,e,...i);const r=null!==(n=t.args)&&void 0!==n?n:t.argsProvider?t.argsProvider(this):[];return this.i18nService.resolveMessage(t.context,t.key,...r)}onI18nUpdate(t){var e;null===(e=this[hn])||void 0===e||e.forEach(((e,i)=>{e.context.toLowerCase()===t.toLowerCase()&&(this[i]=this.i18n(e))})),setTimeout((()=>this.requestUpdate()),0)}updated(t){var e;super.updated(t),null===(e=this[hn])||void 0===e||e.forEach(((t,e)=>{null!=t.argsProvider&&(this[e]=this.i18n(t))}))}connectedCallback(){super.connectedCallback(),null!=this[hn]&&new Set([...this[hn].values()].map((t=>t.context))).forEach((t=>this.addI18nMessages(t)))}addI18nMessages(t,e){t=t.toLowerCase(),this[dn].has(t)||this[dn].set(t,this.i18nService.subscribe(t,(()=>this.onI18nUpdate(t)))),this.i18nService.prepareContext(t,null!=e?e:{})}addI18nContext(t,e){this.addI18nMessages(t.name,e)}disconnectedCallback(){super.disconnectedCallback(),this[dn].forEach((t=>t())),this[dn].clear()}}return e=dn,fn([s({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}class pn extends(vn(St)){}class bn extends(vn(Ut)){}var xn=function(t,e,i,n){for(var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};class yn extends bn{constructor(){super(),this.editorMode=!1,this.addStore(Gi)}render(){return this.key&&this.context?X`
182
+ `}update(t){super.update(t),t.has("baseUrl")&&Gi.actions.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&Gi.actions.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&Gi.actions.setUiLocale(this.uiLocale),t.has("noCustom")&&Gi.actions.setNoCustom(this.noCustom),t.has("editorMode")&&Gi.actions.setEditorMode(this.editorMode),t.has("noCustomComponent")&&Gi.actions.setNoCustomComponent(this.noCustomComponent),t.has("session")&&Gi.actions.setSession(this.session),t.has("availableUiLocales")&&Gi.actions.setAvailableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>nn.addContext(t))),setTimeout((()=>this.updateIfNeeded()))}async updateIfNeeded(){const t=this.apiProvider();!this.withManualResources&&t&&(null==this.session&&(this.session=await this.cache.get("session",(async()=>{const e=await t.getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>{this.cache.clear("session"),this.session=void 0}),e.idleTimeoutInMillis),e}))),null==this.availableUiLocales&&(this.availableUiLocales=await this.cache.get("availableUiLocales",(()=>t.getAvailableUiLocales()))))}}sn.elementDefinitions={},sn.styles=Xi,on([s()],sn.prototype,"baseUrl",void 0),on([s()],sn.prototype,"apiIntegrationIdentifier",void 0),on([s()],sn.prototype,"uiLocale",void 0),on([f([])],sn.prototype,"availableUiLocales",void 0),on([s({type:Boolean})],sn.prototype,"editorMode",void 0),on([s({type:Boolean})],sn.prototype,"noCustom",void 0),on([s({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],sn.prototype,"noCustomComponent",void 0),on([s({type:Boolean})],sn.prototype,"withManualResources",void 0),on([f([])],sn.prototype,"messageContexts",void 0),on([f(void 0)],sn.prototype,"session",void 0),on([s({type:Object})],sn.prototype,"apiProvider",void 0);class an{async listMySearches(){var t;return(null===(t=Gi.getState().session)||void 0===t?void 0:t.sessionAuthenticated)?(await Qi.await()).listMySearches(Gi.getState().session.profile.userId):[]}}const cn=new n;class un{async listMyBookmarks(){return cn.get("bookmarks",(async()=>(await Qi.await()).listMyBookmarks(Gi.getState().session.profile.userId)))}clearCache(){cn.clear("bookmarks")}}const ln=wi.get({name:"ft-user-assets",initialState:{savedSearches:void 0,bookmarks:void 0}});new class{constructor(){this.currentSession=Gi.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new un,Gi.subscribe((()=>this.reloadWhenUserSessionChanges()))}reloadWhenUserSessionChanges(){var t;const{session:e}=Gi.getState();u(null===(t=this.currentSession)||void 0===t?void 0:t.profile,null==e?void 0:e.profile)||(this.currentSession=e,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){ln.actions.savedSearches(void 0)}clearMyBookmarks(){ln.actions.bookmarks(void 0)}async reloadMySearches(){const t=new an,e=await t.listMySearches();ln.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){const e=(null===(t=this.currentSession)||void 0===t?void 0:t.sessionAuthenticated)?await this.bookmarksService.listMyBookmarks():void 0;ln.actions.bookmarks(e)}}},l("ft-app-context")(sn);var fn=function(t,e,i,n){for(var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};const hn=Symbol("i18nProperties"),dn=Symbol("i18nUnsubs");function vn(t){var e;class i extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map}get i18nService(){return this.useCustomMessageContexts?rn:nn}i18n(t,e,...i){var n;if("string"==typeof t)return this.i18nService.resolveMessage(t,e,...i);const r=null!==(n=t.args)&&void 0!==n?n:t.argsProvider?t.argsProvider(this):[];return this.i18nService.resolveMessage(t.context,t.key,...r)}onI18nUpdate(t){var e;null===(e=this[hn])||void 0===e||e.forEach(((e,i)=>{e.context.toLowerCase()===t.toLowerCase()&&(this[i]=this.i18n(e))})),setTimeout((()=>this.requestUpdate()),0)}update(t){var e;super.update(t),null===(e=this[hn])||void 0===e||e.forEach(((t,e)=>{null!=t.argsProvider&&(this[e]=this.i18n(t))}))}connectedCallback(){super.connectedCallback(),null!=this[hn]&&new Set([...this[hn].values()].map((t=>t.context))).forEach((t=>this.addI18nMessages(t)))}addI18nMessages(t,e){t=t.toLowerCase(),this[dn].has(t)||this[dn].set(t,this.i18nService.subscribe(t,(()=>this.onI18nUpdate(t)))),this.i18nService.prepareContext(t,null!=e?e:{})}addI18nContext(t,e){this.addI18nMessages(t.name,e)}disconnectedCallback(){super.disconnectedCallback(),this[dn].forEach((t=>t())),this[dn].clear()}}return e=dn,fn([s({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}class pn extends(vn(St)){}class bn extends(vn(Ut)){}var xn=function(t,e,i,n){for(var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};class yn extends bn{constructor(){super(),this.editorMode=!1,this.addStore(Gi)}render(){return this.key&&this.context?X`
183
183
  <span class="ft-i18n">
184
184
  ${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}
185
185
  </span>
@@ -192,7 +192,7 @@ function(t,e){return(({finisher:t,descriptor:e})=>(i,n)=>{var r;if(void 0===n){c
192
192
  </section>
193
193
  `:X`
194
194
  <section class="topic-loading"></section>
195
- `}updated(t){super.updated(t),(t.has("map")||t.has("tocNode"))&&this.updateContent()}updateContent(){var t;this.error=void 0,this.content=void 0,this.map&&this.tocNode&&(null===(t=this.service)||void 0===t||t.getTopicContent(this.tocNode.contentId).then((t=>this.content=t||'<div class="empty-topic"></div>')).catch((t=>this.error=t)))}contentAvailableCallback(t){var e,i,n,r,o,s,a;if(super.contentAvailableCallback(t),!this.disableContextInteractions&&(null===(e=this.scrollTarget)||void 0===e?void 0:e.section)&&(null===(i=this.tocNode)||void 0===i?void 0:i.tocId)&&(null===(n=this.tocNode)||void 0===n?void 0:n.tocId)===this.scrollTarget.tocId&&this.content){(null!==(o=null===(r=this.shadowRoot)||void 0===r?void 0:r.querySelector(`[id="${this.scrollTarget.section}"], [name="${this.scrollTarget.section}"]`))&&void 0!==o?o:this).scrollIntoView({block:"start"}),null===(s=this.stateManager)||void 0===s||s.scrollDone()}const c=null===(a=this.shadowRoot)||void 0===a?void 0:a.querySelector("section.topic");c&&this.onContentAvailable(c,this.shadowRoot)}onStoreAvailable(){super.onStoreAvailable(),this.updateContent()}renderTopicContent(){var t,e,i,n;if(this.error)return X`
195
+ `}update(t){super.update(t),(t.has("map")||t.has("tocNode"))&&this.updateContent()}updateContent(){var t;this.error=void 0,this.content=void 0,this.map&&this.tocNode&&(null===(t=this.service)||void 0===t||t.getTopicContent(this.tocNode).then((t=>this.content=t||'<div class="empty-topic"></div>')).catch((t=>this.error=t)))}contentAvailableCallback(t){var e,i,n,r,o,s,a;if(super.contentAvailableCallback(t),!this.disableContextInteractions&&(null===(e=this.scrollTarget)||void 0===e?void 0:e.section)&&(null===(i=this.tocNode)||void 0===i?void 0:i.tocId)&&(null===(n=this.tocNode)||void 0===n?void 0:n.tocId)===this.scrollTarget.tocId&&this.content){(null!==(o=null===(r=this.shadowRoot)||void 0===r?void 0:r.querySelector(`[id="${this.scrollTarget.section}"], [name="${this.scrollTarget.section}"]`))&&void 0!==o?o:this).scrollIntoView({block:"start"}),null===(s=this.stateManager)||void 0===s||s.scrollDone()}const c=null===(a=this.shadowRoot)||void 0===a?void 0:a.querySelector("section.topic");c&&this.onContentAvailable(c,this.shadowRoot)}onStoreAvailable(){super.onStoreAvailable(),this.updateContent()}renderTopicContent(){var t,e,i,n;if(this.error)return X`
196
196
  <div class="topic-on-error">
197
197
  <ft-icon>WARNING</ft-icon>
198
198
  <div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-reader-topic-content",
3
- "version": "1.0.54",
3
+ "version": "1.0.56",
4
4
  "description": "Content of a topic in integrated reader.",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,14 +19,14 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-chip": "1.0.54",
23
- "@fluid-topics/ft-i18n": "1.0.54",
24
- "@fluid-topics/ft-reader-context": "1.0.54",
25
- "@fluid-topics/ft-reader-topic-context": "1.0.54",
26
- "@fluid-topics/ft-tooltip": "1.0.54",
27
- "@fluid-topics/ft-wc-utils": "1.0.54",
28
- "@fluid-topics/public-api": "1.0.44",
22
+ "@fluid-topics/ft-chip": "1.0.56",
23
+ "@fluid-topics/ft-i18n": "1.0.56",
24
+ "@fluid-topics/ft-reader-context": "1.0.56",
25
+ "@fluid-topics/ft-reader-topic-context": "1.0.56",
26
+ "@fluid-topics/ft-tooltip": "1.0.56",
27
+ "@fluid-topics/ft-wc-utils": "1.0.56",
28
+ "@fluid-topics/public-api": "1.0.45",
29
29
  "lit": "2.7.2"
30
30
  },
31
- "gitHead": "d1045741e4bd9965f6a8319b4df0534b7eec46ba"
31
+ "gitHead": "da00d6ea6bfc74fef8c6687f383355e35a26289b"
32
32
  }