@fluid-topics/ft-search-results 1.2.24 → 1.2.26

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.
@@ -7,7 +7,7 @@
7
7
  `;var Dn=O(T()),Bn=O(j());var zt=O(T());var So=O(T());var Ai=O(Co(),1);var Eo;(function(r){r.black="black",r.green="green",r.blue="blue",r.purple="purple",r.red="red",r.orange="orange",r.yellow="yellow"})(Eo||(Eo={}));var wo;(function(r){r.OFFICIAL="OFFICIAL",r.PERSONAL="PERSONAL",r.SHARED="SHARED"})(wo||(wo={}));var Ao;(function(r){r.THIRD_PARTY="THIRD_PARTY",r.OFF_THE_GRID="OFF_THE_GRID",r.CONTENT_PACKAGER="CONTENT_PACKAGER",r.PAGES="PAGES",r.DESIGNED_READER="DESIGNED_READER"})(Ao||(Ao={}));var No;(function(r){r.HOMEPAGE="HOMEPAGE",r.CUSTOM="CUSTOM",r.HEADER="HEADER",r.READER="READER",r.TOPIC_TEMPLATE="TOPIC_TEMPLATE",r.SEARCH="SEARCH",r.SEARCH_RESULT="SEARCH_RESULT"})(No||(No={}));var Io;(function(r){r.CLASSIC="CLASSIC",r.CUSTOM="CUSTOM",r.DESIGNER="DESIGNER"})(Io||(Io={}));var Ro;(function(r){r.AND="AND",r.OR="OR",r.MONOVALUED="MONOVALUED"})(Ro||(Ro={}));var Po;(function(r){r.NONE="NONE",r.ALPHABET="ALPHABET",r.VERSION="VERSION"})(Po||(Po={}));var Lo;(function(r){r.STARS="STARS",r.LIKE="LIKE",r.DICHOTOMOUS="DICHOTOMOUS",r.NO_RATING="NO_RATING"})(Lo||(Lo={}));var To;(function(r){r.LAST_WEEK="LAST_WEEK",r.LAST_MONTH="LAST_MONTH",r.LAST_QUARTER="LAST_QUARTER",r.LAST_YEAR="LAST_YEAR",r.CUSTOM="CUSTOM"})(To||(To={}));var ko;(function(r){r.ASC="ASC",r.DESC="DESC"})(ko||(ko={}));var Fo;(function(r){r.ALPHA="ALPHA",r.NATURAL="NATURAL"})(Fo||(Fo={}));var cr;(function(r){r.EVERYWHERE="EVERYWHERE",r.TITLE_ONLY="TITLE_ONLY",r.NONE="NONE"})(cr||(cr={}));var _o;(function(r){r.ARTICLE="ARTICLE",r.BOOK="BOOK",r.SHARED_BOOK="SHARED_BOOK"})(_o||(_o={}));var vt;(function(r){r.FLUIDTOPICS="FLUIDTOPICS",r.EXTERNAL="EXTERNAL"})(vt||(vt={}));var Uo;(function(r){r.MAP="MAP",r.DOCUMENT="DOCUMENT",r.TOPIC="TOPIC",r.PERSONAL_BOOK="PERSONAL_BOOK",r.SHARED_BOOK="SHARED_BOOK"})(Uo||(Uo={}));var Do;(function(r){r.LAST_WEEK="LAST_WEEK",r.LAST_MONTH="LAST_MONTH",r.LAST_QUARTER="LAST_QUARTER",r.LAST_YEAR="LAST_YEAR"})(Do||(Do={}));var _e;(function(r){r.MAP="MAP",r.DOCUMENT="DOCUMENT",r.TOPIC="TOPIC"})(_e||(_e={}));var lr;(function(r){r.DEFAULT="DEFAULT",r.DOCUMENTS="DOCUMENTS",r.ALL_TOPICS="ALL_TOPICS",r.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(lr||(lr={}));var D;(function(r){r.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",r.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",r.HTML_EXPORT_USER="HTML_EXPORT_USER",r.PDF_EXPORT_USER="PDF_EXPORT_USER",r.SAVED_SEARCH_USER="SAVED_SEARCH_USER",r.COLLECTION_USER="COLLECTION_USER",r.OFFLINE_USER="OFFLINE_USER",r.ANALYTICS_USER="ANALYTICS_USER",r.BETA_USER="BETA_USER",r.DEBUG_USER="DEBUG_USER",r.PRINT_USER="PRINT_USER",r.RATING_USER="RATING_USER",r.FEEDBACK_USER="FEEDBACK_USER",r.GENERATIVE_AI_USER="GENERATIVE_AI_USER",r.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",r.CONTENT_PUBLISHER="CONTENT_PUBLISHER",r.KHUB_ADMIN="KHUB_ADMIN",r.USERS_ADMIN="USERS_ADMIN",r.PORTAL_ADMIN="PORTAL_ADMIN",r.ADMIN="ADMIN",r.DEVELOPER="DEVELOPER"})(D||(D={}));var Bo;(function(r){r.VALID="VALID",r.INVALID="INVALID"})(Bo||(Bo={}));var Mo;(function(r){r.TEXT="TEXT",r.HTML="HTML"})(Mo||(Mo={}));var Gs={[D.PERSONAL_BOOK_SHARE_USER]:[D.PERSONAL_BOOK_USER],[D.HTML_EXPORT_USER]:[D.PERSONAL_BOOK_USER],[D.PDF_EXPORT_USER]:[D.PERSONAL_BOOK_USER],[D.KHUB_ADMIN]:[D.CONTENT_PUBLISHER],[D.ADMIN]:[D.KHUB_ADMIN,D.USERS_ADMIN,D.PORTAL_ADMIN],[D.DEVELOPER]:[D.BETA_USER,D.DEBUG_USER],[D.GENERATIVE_AI_EXPORT_USER]:[D.GENERATIVE_AI_USER]};var Un=O(T());var Go=O(z()),K=O(j()),Q=O(T());var Wo=O(z());var zo=Wo.css`
8
8
  `;var St=O(T()),Ni="ft-app-info",dr=class extends CustomEvent{constructor(t){super("authentication-change",{detail:t})}},Ii={session:(r,t)=>{(0,St.deepEqual)(r.session,t.payload)||(r.session=t.payload,setTimeout(()=>w.dispatchEvent(new dr(t.payload)),0))}},w=St.FtReduxStore.get({name:Ni,reducers:Ii,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1}});var le=O(T());var ur=O(T());var Ce=class r{static get(t){let{baseUrl:o,apiIntegrationIdentifier:n}=w.getState(),i=t??n;if(o&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,i,!0)}static await(t){return new Promise(o=>{let n=r.get(t);if(n)o(n);else{let i=w.subscribe(()=>{n=r.get(t),n&&(i(),o(n))})}})}};var oe=class{constructor(t=!0,o){var n;this.overrideApi=o;let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new ur.CacheRegistry,this.cache=t?i.commonCache:new ur.CacheRegistry}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Ce.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Ce.await()}clearCache(){this.cache.clearAll()}};var Ho,Ri=Symbol("clearAfterUnitTest"),Ot=class extends oe{constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Ho]=()=>{this.defaultMessages={},this.cache=new le.CacheRegistry,this.listeners={}},this.currentUiLocale=w.getState().uiLocale,w.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=w.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let o=t.name.toLowerCase();this.cache.setFinal(o,t),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,o){var n;if(t=t.toLowerCase(),Object.keys(o).length>0){let i={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...o};(0,le.deepEqual)(this.defaultMessages[t],i)||(this.defaultMessages[t]=i,await this.notify(t))}await this.fetchContext(t)}resolveContext(t){var o,n;return this.fetchContext(t),(n=(o=this.cache.getNow(t))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,o){let n=t.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(t,o,...n){var i;let s=t.toLowerCase(),l=this.resolveContext(s);return new le.ParametrizedLabelResolver((i=this.defaultMessages[s])!==null&&i!==void 0?i:{},l).resolve(o,...n)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),await this.notify(t)}catch(o){console.error(o)}}subscribe(t,o){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(o),()=>{var i;return(i=this.listeners[t])===null||i===void 0?void 0:i.delete(o)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map(t=>this.notify(t)))}async notify(t){this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(o=>(0,le.delay)(0).then(()=>o()).catch(()=>null)))}};Ho=Ri;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Ot{constructor(){super(async(r,t)=>(await this.awaitApi).getFluidTopicsMessageContext(r,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Ot{constructor(){super(async(r,t)=>(await this.awaitApi).getCustomMessageContext(r,t))}});var Ee=window.FluidTopicsI18nService,$o=window.FluidTopicsCustomI18nService;var H=function(r,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(s=(i<3?l(s):i>3?l(t,o,s):l(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},U=class extends Q.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>Ce.get(),this.messageContexts=[],this.cache=new Q.CacheRegistry,this.cleanSessionDebouncer=new Q.Debouncer}render(){return Go.html`
9
9
  <slot></slot>
10
- `}update(t){var o,n,i,s,l;super.update(t),t.has("baseUrl")&&(w.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&w.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&w.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&w.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&w.actions.noCustom(this.noCustom),t.has("editorMode")&&w.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&w.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&w.actions.session(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(d=>Ee.addContext(d)),t.has("openExternalDocumentInNewTab")&&w.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&w.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&w.actions.forcedOffline(this.forcedOffline),t.has("localesConfiguration")&&(w.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),w.actions.availableUiLocales((i=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&i!==void 0?i:[]),w.actions.searchInAllLanguagesAllowed((l=(s=this.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed)!==null&&l!==void 0?l:!1)),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},t.idleTimeoutInMillis),t})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}};U.elementDefinitions={};U.styles=zo;H([(0,K.property)()],U.prototype,"baseUrl",void 0);H([(0,K.property)()],U.prototype,"apiIntegrationIdentifier",void 0);H([(0,K.property)()],U.prototype,"uiLocale",void 0);H([(0,Q.jsonProperty)(null)],U.prototype,"availableUiLocales",void 0);H([(0,Q.jsonProperty)(null)],U.prototype,"metadataConfiguration",void 0);H([(0,K.property)({type:Boolean})],U.prototype,"editorMode",void 0);H([(0,K.property)({type:Boolean})],U.prototype,"noCustom",void 0);H([(0,K.property)({type:Boolean})],U.prototype,"openExternalDocumentInNewTab",void 0);H([(0,K.property)({converter:{fromAttribute(r){return r==="false"?!1:r==="true"||(r??!1)}}})],U.prototype,"noCustomComponent",void 0);H([(0,K.property)({type:Boolean})],U.prototype,"withManualResources",void 0);H([(0,K.property)({type:Boolean})],U.prototype,"navigatorOnline",void 0);H([(0,K.property)({type:Boolean})],U.prototype,"forcedOffline",void 0);H([(0,K.property)({type:Object})],U.prototype,"apiProvider",void 0);H([(0,Q.jsonProperty)([])],U.prototype,"messageContexts",void 0);H([(0,Q.jsonProperty)(void 0)],U.prototype,"session",void 0);H([(0,K.state)()],U.prototype,"localesConfiguration",void 0);var gs=O(j());function Pi(r,t){if(r===t)return!0;if(r&&t&&typeof r=="object"&&typeof t=="object"){if(r.constructor!==t.constructor)return!1;var o,n,i;if(Array.isArray(r)){if(o=r.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!Ct(r[n],t[n]))return!1;return!0}if(r instanceof Map&&t instanceof Map){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;for(n of r.entries())if(!Ct(n[1],t.get(n[0])))return!1;return!0}if(r instanceof Set&&t instanceof Set){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;return!0}if(r.constructor===RegExp)return r.source===t.source&&r.flags===t.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===t.valueOf();if(i=Object.keys(r),o=i.length,o!==Object.keys(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=o;n--!==0;){var s=i[n];if(!Ct(r[s],t[s]))return!1}return!0}return r!==r&&t!==t}function Ct(r,t){try{return Pi(r,t)}catch{return!1}}function Et(r,t){return!Ct(r,t)}var Li=O(j(),1);var wt=class{constructor(){this.queue=[]}add(t,o=!1){o&&(this.queue=this.queue.filter(n=>n.type!==t.type)),this.queue.push(t)}consume(t){let o=this.queue.find(n=>n.type===t);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}};var rt=O(j(),1);var jo=O(j(),1);function Ko(r,t){let o=()=>JSON.parse(JSON.stringify(r));return(0,jo.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return o();try{return JSON.parse(n)}catch{return o()}},toAttribute:n=>JSON.stringify(n)},hasChanged:Et,...t??{}})}var At=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,s=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let l of n)try{await l()}catch(d){i(d);return}s(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Zo=O(z(),1);var Nt=window,Ti=Nt.ShadowRoot&&(Nt.ShadyCSS===void 0||Nt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Cc=Symbol();var Vo=(r,t)=>{Ti?r.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet):t.forEach(o=>{let n=document.createElement("style"),i=Nt.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,r.appendChild(n)})};var It=class extends Zo.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([i,s])=>t.registry.define(i,s)));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return Vo(n,t.elementStyles),n}};var Rt=function(r,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(s=(i<3?l(s):i>3?l(t,o,s):l(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Qo,qo=Symbol("constructorPrototype"),Yo=Symbol("constructorName"),Jo=Symbol("exportpartsDebouncer"),Xo=Symbol("dynamicDependenciesLoaded"),de=class extends It{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Qo]=new At(5),this[Yo]=this.constructor.name,this[qo]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Yo]&&Object.setPrototypeOf(this,this[qo])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let t=this.constructor;t[Xo]||(t[Xo]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate()})}contentAvailableCallback(t){}applyCustomStylesheet(t){var o,n,i;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(s=>s.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(s){console.error(s,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let s=document.createElement("style");s.classList.add("ft-lit-element--custom-stylesheet"),s.innerHTML=this.customStylesheet,this.shadowRoot.append(s)}}scheduleExportpartsUpdate(){var t,o,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[Jo].run(()=>{var i,s;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((s=this.exportpartsPrefixes)===null||s===void 0?void 0:s.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(t){var o,n,i,s,l,d;let p=m=>m!=null&&m.trim().length>0,u=t.filter(p).map(m=>m.trim());if(u.length===0){this.removeAttribute("exportparts");return}let y=new Set;for(let m of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let v=(s=(i=m.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&s!==void 0?s:[],b=(d=(l=m.getAttribute("exportparts"))===null||l===void 0?void 0:l.split(",").map(S=>S.split(":")[1]))!==null&&d!==void 0?d:[];new Array(...v,...b).filter(p).map(S=>S.trim()).forEach(S=>y.add(S))}if(y.size===0){this.removeAttribute("exportparts");return}let h=[...y.values()].flatMap(m=>u.map(v=>`${m}:${v}--${m}`));this.setAttribute("exportparts",[...this.part,...h].join(", "))}};Qo=Jo;Rt([(0,rt.property)()],de.prototype,"exportpartsPrefix",void 0);Rt([Ko([])],de.prototype,"exportpartsPrefixes",void 0);Rt([(0,rt.property)()],de.prototype,"customStylesheet",void 0);Rt([(0,rt.state)()],de.prototype,"useAdoptedStyleSheets",void 0);function ot(r){var t;return(t=r?.isFtReduxStore)!==null&&t!==void 0?t:!1}var en,tn,rn,nt=Symbol("internalReduxEventsUnsubscribers"),ue=Symbol("internalStoresUnsubscribers"),we=Symbol("internalStores"),at=class extends de{constructor(){super(...arguments),this[en]=new Map,this[tn]=new Map,this[rn]=new Map}get reduxConstructor(){return this.constructor}update(t){super.update(t),[...this.reduxConstructor.reduxReactiveProperties].some(o=>t.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[we].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[we].values()][0]}getStore(t){return t==null?this.getUnnamedStore():this[we].get(t)}addStore(t,o){var n;o=(n=o??(ot(t)?t.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this[we].set(o,t),this.subscribeToStore(o,t),this.updateFromStores()}removeStore(t){let o=typeof t=="string"?t:t.name;this.unsubscribeFromStore(o),this[we].delete(o)}setupStores(){this.unsubscribeFromStores(),this[we].forEach((t,o)=>this.subscribeToStore(o,t)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((t,o)=>{let n=this.constructor.getPropertyOptions(o);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:o)){let i=this.getStore(t.store);i&&(t.store?this[ue].has(t.store):this[ue].size>0)&&(this[o]=t.selector(i.getState(),this))}})}subscribeToStore(t,o){var n;this[ue].set(t,o.subscribe(()=>this.updateFromStores())),this[nt].set(t,[]),ot(o)&&o.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((i,s)=>{if(typeof this[s]=="function"&&(!i.store||o.name===i.store)){let l=d=>this[s](d);o.addEventListener(i.eventName,l),this[nt].get(t).push(()=>o.removeEventListener(i.eventName,l))}})),this.onStoreAvailable(t)}unsubscribeFromStores(){this[ue].forEach((t,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(t){var o;this[ue].has(t)&&this[ue].get(t)(),this[ue].delete(t),(o=this[nt].get(t))===null||o===void 0||o.forEach(n=>n()),this[nt].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};en=ue,tn=we,rn=nt;at.reduxProperties=new Map;at.reduxReactiveProperties=new Set;at.reduxEventListeners=new Map;function Z(r){for(var t=arguments.length,o=Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];if(0)var i,s;throw Error("[Immer] minified error nr: "+r+(o.length?" "+o.map(function(l){return"'"+l+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ne(r){return!!r&&!!r[F]}function J(r){var t;return!!r&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===Wi}(r)||Array.isArray(r)||!!r[dn]||!!(!((t=r.constructor)===null||t===void 0)&&t[dn])||vr(r)||Sr(r))}function Ae(r,t,o){o===void 0&&(o=!1),Be(r)===0?(o?Object.keys:De)(r).forEach(function(n){o&&typeof n=="symbol"||t(n,r[n],r)}):r.forEach(function(n,i){return t(i,n,r)})}function Be(r){var t=r[F];return t?t.i>3?t.i-4:t.i:Array.isArray(r)?1:vr(r)?2:Sr(r)?3:0}function Ue(r,t){return Be(r)===2?r.has(t):Object.prototype.hasOwnProperty.call(r,t)}function ki(r,t){return Be(r)===2?r.get(t):r[t]}function un(r,t,o){var n=Be(r);n===2?r.set(t,o):n===3?r.add(o):r[t]=o}function pn(r,t){return r===t?r!==0||1/r==1/t:r!=r&&t!=t}function vr(r){return Bi&&r instanceof Map}function Sr(r){return Mi&&r instanceof Set}function pe(r){return r.o||r.t}function Or(r){if(Array.isArray(r))return Array.prototype.slice.call(r);var t=yn(r);delete t[F];for(var o=De(t),n=0;n<o.length;n++){var i=o[n],s=t[i];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(t[i]={configurable:!0,writable:!0,enumerable:s.enumerable,value:r[i]})}return Object.create(Object.getPrototypeOf(r),t)}function Cr(r,t){return t===void 0&&(t=!1),Er(r)||ne(r)||!J(r)||(Be(r)>1&&(r.set=r.add=r.clear=r.delete=Fi),Object.freeze(r),t&&Ae(r,function(o,n){return Cr(n,!0)},!0)),r}function Fi(){Z(2)}function Er(r){return r==null||typeof r!="object"||Object.isFrozen(r)}function re(r){var t=xr[r];return t||Z(18,r),t}function _i(r,t){xr[r]||(xr[r]=t)}function gr(){return st}function pr(r,t){t&&(re("Patches"),r.u=[],r.s=[],r.v=t)}function Pt(r){mr(r),r.p.forEach(Ui),r.p=null}function mr(r){r===st&&(st=r.l)}function on(r){return st={p:[],l:st,h:r,m:!0,_:0}}function Ui(r){var t=r[F];t.i===0||t.i===1?t.j():t.g=!0}function fr(r,t){t._=t.p.length;var o=t.p[0],n=r!==void 0&&r!==o;return t.h.O||re("ES5").S(t,r,n),n?(o[F].P&&(Pt(t),Z(4)),J(r)&&(r=Lt(t,r),t.l||Tt(t,r)),t.u&&re("Patches").M(o[F].t,r,t.u,t.s)):r=Lt(t,o,[]),Pt(t),t.u&&t.v(t.u,t.s),r!==hn?r:void 0}function Lt(r,t,o){if(Er(t))return t;var n=t[F];if(!n)return Ae(t,function(d,p){return nn(r,n,t,d,p,o)},!0),t;if(n.A!==r)return t;if(!n.P)return Tt(r,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=Or(n.k):n.o,s=i,l=!1;n.i===3&&(s=new Set(i),i.clear(),l=!0),Ae(s,function(d,p){return nn(r,n,i,d,p,o,l)}),Tt(r,i,!1),o&&r.u&&re("Patches").N(n,o,r.u,r.s)}return n.o}function nn(r,t,o,n,i,s,l){if(ne(i)){var d=Lt(r,i,s&&t&&t.i!==3&&!Ue(t.R,n)?s.concat(n):void 0);if(un(o,n,d),!ne(d))return;r.m=!1}else l&&o.add(i);if(J(i)&&!Er(i)){if(!r.h.D&&r._<1)return;Lt(r,i),t&&t.A.l||Tt(r,i)}}function Tt(r,t,o){o===void 0&&(o=!1),!r.l&&r.h.D&&r.m&&Cr(t,o)}function hr(r,t){var o=r[F];return(o?pe(o):r)[t]}function an(r,t){if(t in r)for(var o=Object.getPrototypeOf(r);o;){var n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=Object.getPrototypeOf(o)}}function fe(r){r.P||(r.P=!0,r.l&&fe(r.l))}function yr(r){r.o||(r.o=Or(r.t))}function br(r,t,o){var n=vr(t)?re("MapSet").F(t,o):Sr(t)?re("MapSet").T(t,o):r.O?function(i,s){var l=Array.isArray(i),d={i:l?1:0,A:s?s.A:gr(),P:!1,I:!1,R:{},l:s,t:i,k:null,o:null,j:null,C:!1},p=d,u=ct;l&&(p=[d],u=it);var y=Proxy.revocable(p,u),h=y.revoke,m=y.proxy;return d.k=m,d.j=h,m}(t,o):re("ES5").J(t,o);return(o?o.A:gr()).p.push(n),n}function Di(r){return ne(r)||Z(22,r),function t(o){if(!J(o))return o;var n,i=o[F],s=Be(o);if(i){if(!i.P&&(i.i<4||!re("ES5").K(i)))return i.t;i.I=!0,n=sn(o,s),i.I=!1}else n=sn(o,s);return Ae(n,function(l,d){i&&ki(i.t,l)===d||un(n,l,t(d))}),s===3?new Set(n):n}(r)}function sn(r,t){switch(t){case 2:return new Map(r);case 3:return Array.from(r)}return Or(r)}function fn(){function r(l,d){var p=s[l];return p?p.enumerable=d:s[l]=p={configurable:!0,enumerable:d,get:function(){var u=this[F];return ct.get(u,l)},set:function(u){var y=this[F];ct.set(y,l,u)}},p}function t(l){for(var d=l.length-1;d>=0;d--){var p=l[d][F];if(!p.P)switch(p.i){case 5:n(p)&&fe(p);break;case 4:o(p)&&fe(p)}}}function o(l){for(var d=l.t,p=l.k,u=De(p),y=u.length-1;y>=0;y--){var h=u[y];if(h!==F){var m=d[h];if(m===void 0&&!Ue(d,h))return!0;var v=p[h],b=v&&v[F];if(b?b.t!==m:!pn(v,m))return!0}}var S=!!d[F];return u.length!==De(d).length+(S?0:1)}function n(l){var d=l.k;if(d.length!==l.t.length)return!0;var p=Object.getOwnPropertyDescriptor(d,d.length-1);if(p&&!p.get)return!0;for(var u=0;u<d.length;u++)if(!d.hasOwnProperty(u))return!0;return!1}function i(l){l.g&&Z(3,JSON.stringify(pe(l)))}var s={};_i("ES5",{J:function(l,d){var p=Array.isArray(l),u=function(h,m){if(h){for(var v=Array(m.length),b=0;b<m.length;b++)Object.defineProperty(v,""+b,r(b,!0));return v}var S=yn(m);delete S[F];for(var R=De(S),A=0;A<R.length;A++){var N=R[A];S[N]=r(N,h||!!S[N].enumerable)}return Object.create(Object.getPrototypeOf(m),S)}(p,l),y={i:p?5:4,A:d?d.A:gr(),P:!1,I:!1,R:{},l:d,t:l,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,F,{value:y,writable:!0}),u},S:function(l,d,p){p?ne(d)&&d[F].A===l&&t(l.p):(l.u&&function u(y){if(y&&typeof y=="object"){var h=y[F];if(h){var m=h.t,v=h.k,b=h.R,S=h.i;if(S===4)Ae(v,function(P){P!==F&&(m[P]!==void 0||Ue(m,P)?b[P]||u(v[P]):(b[P]=!0,fe(h)))}),Ae(m,function(P){v[P]!==void 0||Ue(v,P)||(b[P]=!1,fe(h))});else if(S===5){if(n(h)&&(fe(h),b.length=!0),v.length<m.length)for(var R=v.length;R<m.length;R++)b[R]=!1;else for(var A=m.length;A<v.length;A++)b[A]=!0;for(var N=Math.min(v.length,m.length),k=0;k<N;k++)v.hasOwnProperty(k)||(b[k]=!0),b[k]===void 0&&u(v[k])}}}}(l.p[0]),t(l.p))},K:function(l){return l.i===4?o(l):n(l)}})}var cn,st,wr=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Bi=typeof Map<"u",Mi=typeof Set<"u",ln=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",hn=wr?Symbol.for("immer-nothing"):((cn={})["immer-nothing"]=!0,cn),dn=wr?Symbol.for("immer-draftable"):"__$immer_draftable",F=wr?Symbol.for("immer-state"):"__$immer_state";var Wi=""+Object.prototype.constructor,De=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:Object.getOwnPropertyNames,yn=Object.getOwnPropertyDescriptors||function(r){var t={};return De(r).forEach(function(o){t[o]=Object.getOwnPropertyDescriptor(r,o)}),t},xr={},ct={get:function(r,t){if(t===F)return r;var o=pe(r);if(!Ue(o,t))return function(i,s,l){var d,p=an(s,l);return p?"value"in p?p.value:(d=p.get)===null||d===void 0?void 0:d.call(i.k):void 0}(r,o,t);var n=o[t];return r.I||!J(n)?n:n===hr(r.t,t)?(yr(r),r.o[t]=br(r.A.h,n,r)):n},has:function(r,t){return t in pe(r)},ownKeys:function(r){return Reflect.ownKeys(pe(r))},set:function(r,t,o){var n=an(pe(r),t);if(n?.set)return n.set.call(r.k,o),!0;if(!r.P){var i=hr(pe(r),t),s=i?.[F];if(s&&s.t===o)return r.o[t]=o,r.R[t]=!1,!0;if(pn(o,i)&&(o!==void 0||Ue(r.t,t)))return!0;yr(r),fe(r)}return r.o[t]===o&&(o!==void 0||t in r.o)||Number.isNaN(o)&&Number.isNaN(r.o[t])||(r.o[t]=o,r.R[t]=!0),!0},deleteProperty:function(r,t){return hr(r.t,t)!==void 0||t in r.t?(r.R[t]=!1,yr(r),fe(r)):delete r.R[t],r.o&&delete r.o[t],!0},getOwnPropertyDescriptor:function(r,t){var o=pe(r),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{writable:!0,configurable:r.i!==1||t!=="length",enumerable:n.enumerable,value:o[t]}},defineProperty:function(){Z(11)},getPrototypeOf:function(r){return Object.getPrototypeOf(r.t)},setPrototypeOf:function(){Z(12)}},it={};Ae(ct,function(r,t){it[r]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),it.deleteProperty=function(r,t){return it.set.call(this,r,t,void 0)},it.set=function(r,t,o){return ct.set.call(this,r[0],t,o,r[0])};var zi=function(){function r(o){var n=this;this.O=ln,this.D=!0,this.produce=function(i,s,l){if(typeof i=="function"&&typeof s!="function"){var d=s;s=i;var p=n;return function(S){var R=this;S===void 0&&(S=d);for(var A=arguments.length,N=Array(A>1?A-1:0),k=1;k<A;k++)N[k-1]=arguments[k];return p.produce(S,function(P){var M;return(M=s).call.apply(M,[R,P].concat(N))})}}var u;if(typeof s!="function"&&Z(6),l!==void 0&&typeof l!="function"&&Z(7),J(i)){var y=on(n),h=br(n,i,void 0),m=!0;try{u=s(h),m=!1}finally{m?Pt(y):mr(y)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(S){return pr(y,l),fr(S,y)},function(S){throw Pt(y),S}):(pr(y,l),fr(u,y))}if(!i||typeof i!="object"){if((u=s(i))===void 0&&(u=i),u===hn&&(u=void 0),n.D&&Cr(u,!0),l){var v=[],b=[];re("Patches").M(i,u,v,b),l(v,b)}return u}Z(21,i)},this.produceWithPatches=function(i,s){if(typeof i=="function")return function(u){for(var y=arguments.length,h=Array(y>1?y-1:0),m=1;m<y;m++)h[m-1]=arguments[m];return n.produceWithPatches(u,function(v){return i.apply(void 0,[v].concat(h))})};var l,d,p=n.produce(i,s,function(u,y){l=u,d=y});return typeof Promise<"u"&&p instanceof Promise?p.then(function(u){return[u,l,d]}):[p,l,d]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var t=r.prototype;return t.createDraft=function(o){J(o)||Z(8),ne(o)&&(o=Di(o));var n=on(this),i=br(this,o,void 0);return i[F].C=!0,mr(n),i},t.finishDraft=function(o,n){var i=o&&o[F],s=i.A;return pr(s,n),fr(void 0,s)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!ln&&Z(20),this.O=o},t.applyPatches=function(o,n){var i;for(i=n.length-1;i>=0;i--){var s=n[i];if(s.path.length===0&&s.op==="replace"){o=s.value;break}}i>-1&&(n=n.slice(i+1));var l=re("Patches").$;return ne(o)?l(o,n):this.produce(o,function(d){return l(d,n)})},r}(),V=new zi,Hi=V.produce,_c=V.produceWithPatches.bind(V),Uc=V.setAutoFreeze.bind(V),Dc=V.setUseProxies.bind(V),Bc=V.applyPatches.bind(V),Mc=V.createDraft.bind(V),Wc=V.finishDraft.bind(V),kt=Hi;function he(r){"@babel/helpers - typeof";return he=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},he(r)}function Ar(r,t){if(he(r)!=="object"||r===null)return r;var o=r[Symbol.toPrimitive];if(o!==void 0){var n=o.call(r,t||"default");if(he(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function Nr(r){var t=Ar(r,"string");return he(t)==="symbol"?t:String(t)}function Ir(r,t,o){return t=Nr(t),t in r?Object.defineProperty(r,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[t]=o,r}function gn(r,t){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),o.push.apply(o,n)}return o}function Ft(r){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?gn(Object(o),!0).forEach(function(n){Ir(r,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):gn(Object(o)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(o,n))})}return r}function $(r){return"Minified Redux error #"+r+"; visit https://redux.js.org/Errors?code="+r+" for the full message or use the non-minified dev environment for full errors. "}var mn=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Rr=function(){return Math.random().toString(36).substring(7).split("").join(".")},_t={INIT:"@@redux/INIT"+Rr(),REPLACE:"@@redux/REPLACE"+Rr(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Rr()}};function $i(r){if(typeof r!="object"||r===null)return!1;for(var t=r;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(r)===t}function Pr(r,t,o){var n;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error($(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error($(1));return o(Pr)(r,t)}if(typeof r!="function")throw new Error($(2));var i=r,s=t,l=[],d=l,p=!1;function u(){d===l&&(d=l.slice())}function y(){if(p)throw new Error($(3));return s}function h(S){if(typeof S!="function")throw new Error($(4));if(p)throw new Error($(5));var R=!0;return u(),d.push(S),function(){if(R){if(p)throw new Error($(6));R=!1,u();var N=d.indexOf(S);d.splice(N,1),l=null}}}function m(S){if(!$i(S))throw new Error($(7));if(typeof S.type>"u")throw new Error($(8));if(p)throw new Error($(9));try{p=!0,s=i(s,S)}finally{p=!1}for(var R=l=d,A=0;A<R.length;A++){var N=R[A];N()}return S}function v(S){if(typeof S!="function")throw new Error($(10));i=S,m({type:_t.REPLACE})}function b(){var S,R=h;return S={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error($(11));function k(){N.next&&N.next(y())}k();var P=R(k);return{unsubscribe:P}}},S[mn]=function(){return this},S}return m({type:_t.INIT}),n={dispatch:m,subscribe:h,getState:y,replaceReducer:v},n[mn]=b,n}function Gi(r){Object.keys(r).forEach(function(t){var o=r[t],n=o(void 0,{type:_t.INIT});if(typeof n>"u")throw new Error($(12));if(typeof o(void 0,{type:_t.PROBE_UNKNOWN_ACTION()})>"u")throw new Error($(13))})}function bn(r){for(var t=Object.keys(r),o={},n=0;n<t.length;n++){var i=t[n];typeof r[i]=="function"&&(o[i]=r[i])}var s=Object.keys(o),l,d;try{Gi(o)}catch(p){d=p}return function(u,y){if(u===void 0&&(u={}),d)throw d;if(0)var h;for(var m=!1,v={},b=0;b<s.length;b++){var S=s[b],R=o[S],A=u[S],N=R(A,y);if(typeof N>"u"){var k=y&&y.type;throw new Error($(14))}v[S]=N,m=m||N!==A}return m=m||s.length!==Object.keys(u).length,m?v:u}}function Me(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function xn(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),s=function(){throw new Error($(15))},l={getState:i.getState,dispatch:function(){return s.apply(void 0,arguments)}},d=t.map(function(p){return p(l)});return s=Me.apply(void 0,d)(i.dispatch),Ft(Ft({},i),{},{dispatch:s})}}}function vn(r){var t=function(n){var i=n.dispatch,s=n.getState;return function(l){return function(d){return typeof d=="function"?d(i,s,r):l(d)}}};return t}var Sn=vn();Sn.withExtraArgument=vn;var Lr=Sn;var An=function(){var r=function(t,o){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");r(t,o);function n(){this.constructor=t}t.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),ji=function(r,t){var o={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,l;return l={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function d(u){return function(y){return p([u,y])}}function p(u){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(s=u[0]&2?i.return:u[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,u[1])).done)return s;switch(i=0,s&&(u=[u[0]&2,s.value]),u[0]){case 0:case 1:s=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,i=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(s=o.trys,!(s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){o=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){o.label=u[1];break}if(u[0]===6&&o.label<s[1]){o.label=s[1],s=u;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(u);break}s[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(r,o)}catch(y){u=[6,y],i=0}finally{n=s=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},We=function(r,t){for(var o=0,n=t.length,i=r.length;o<n;o++,i++)r[i]=t[o];return r},Ki=Object.defineProperty,Vi=Object.defineProperties,Zi=Object.getOwnPropertyDescriptors,On=Object.getOwnPropertySymbols,qi=Object.prototype.hasOwnProperty,Yi=Object.prototype.propertyIsEnumerable,Cn=function(r,t,o){return t in r?Ki(r,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[t]=o},ye=function(r,t){for(var o in t||(t={}))qi.call(t,o)&&Cn(r,o,t[o]);if(On)for(var n=0,i=On(t);n<i.length;n++){var o=i[n];Yi.call(t,o)&&Cn(r,o,t[o])}return r},Tr=function(r,t){return Vi(r,Zi(t))},Xi=function(r,t,o){return new Promise(function(n,i){var s=function(p){try{d(o.next(p))}catch(u){i(u)}},l=function(p){try{d(o.throw(p))}catch(u){i(u)}},d=function(p){return p.done?n(p.value):Promise.resolve(p.value).then(s,l)};d((o=o.apply(r,t)).next())})};var Qi=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Me:Me.apply(null,arguments)},nl=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(r){return r}};function Ji(r){if(typeof r!="object"||r===null)return!1;var t=Object.getPrototypeOf(r);if(t===null)return!0;for(var o=t;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return t===o}var es=function(r){An(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=r.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,We([void 0],o[0].concat(this)))):new(t.bind.apply(t,We([void 0],o.concat(this))))},t}(Array),ts=function(r){An(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=r.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,We([void 0],o[0].concat(this)))):new(t.bind.apply(t,We([void 0],o.concat(this))))},t}(Array);function _r(r){return J(r)?kt(r,function(){}):r}function rs(r){return typeof r=="boolean"}function os(){return function(t){return ns(t)}}function ns(r){r===void 0&&(r={});var t=r.thunk,o=t===void 0?!0:t,n=r.immutableCheck,i=n===void 0?!0:n,s=r.serializableCheck,l=s===void 0?!0:s,d=new es;if(o&&(rs(o)?d.push(Lr):d.push(Lr.withExtraArgument(o.extraArgument))),0){if(i)var p;if(l)var u}return d}var kr=!0;function Nn(r){var t=os(),o=r||{},n=o.reducer,i=n===void 0?void 0:n,s=o.middleware,l=s===void 0?t():s,d=o.devTools,p=d===void 0?!0:d,u=o.preloadedState,y=u===void 0?void 0:u,h=o.enhancers,m=h===void 0?void 0:h,v;if(typeof i=="function")v=i;else if(Ji(i))v=bn(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var b=l;if(typeof b=="function"&&(b=b(t),!kr&&!Array.isArray(b)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!kr&&b.some(function(P){return typeof P!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=xn.apply(void 0,b),R=Me;p&&(R=Qi(ye({trace:!kr},typeof p=="object"&&p)));var A=new ts(S),N=A;Array.isArray(m)?N=We([S],m):typeof m=="function"&&(N=m(A));var k=R.apply(void 0,N);return Pr(v,y,k)}function ge(r,t){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(t){var s=t.apply(void 0,n);if(!s)throw new Error("prepareAction did not return an object");return ye(ye({type:r,payload:s.payload},"meta"in s&&{meta:s.meta}),"error"in s&&{error:s.error})}return{type:r,payload:n[0]}}return o.toString=function(){return""+r},o.type=r,o.match=function(n){return n.type===r},o}function In(r){var t={},o=[],n,i={addCase:function(s,l){var d=typeof s=="string"?s:s.type;if(d in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[d]=l,i},addMatcher:function(s,l){return o.push({matcher:s,reducer:l}),i},addDefaultCase:function(s){return n=s,i}};return r(i),[t,o,n]}function as(r){return typeof r=="function"}function is(r,t,o,n){o===void 0&&(o=[]);var i=typeof t=="function"?In(t):[t,o,n],s=i[0],l=i[1],d=i[2],p;if(as(r))p=function(){return _r(r())};else{var u=_r(r);p=function(){return u}}function y(h,m){h===void 0&&(h=p());var v=We([s[m.type]],l.filter(function(b){var S=b.matcher;return S(m)}).map(function(b){var S=b.reducer;return S}));return v.filter(function(b){return!!b}).length===0&&(v=[d]),v.reduce(function(b,S){if(S)if(ne(b)){var R=b,A=S(R,m);return A===void 0?b:A}else{if(J(b))return kt(b,function(N){return S(N,m)});var A=S(b,m);if(A===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return A}return b},h)}return y.getInitialState=p,y}function ss(r,t){return r+"/"+t}function Rn(r){var t=r.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof r.initialState=="function"?r.initialState:_r(r.initialState),n=r.reducers||{},i=Object.keys(n),s={},l={},d={};i.forEach(function(y){var h=n[y],m=ss(t,y),v,b;"reducer"in h?(v=h.reducer,b=h.prepare):v=h,s[y]=v,l[m]=v,d[y]=b?ge(m,b):ge(m)});function p(){var y=typeof r.extraReducers=="function"?In(r.extraReducers):[r.extraReducers],h=y[0],m=h===void 0?{}:h,v=y[1],b=v===void 0?[]:v,S=y[2],R=S===void 0?void 0:S,A=ye(ye({},m),l);return is(o,function(N){for(var k in A)N.addCase(k,A[k]);for(var P=0,M=b;P<M.length;P++){var X=M[P];N.addMatcher(X.matcher,X.reducer)}R&&N.addDefaultCase(R)})}var u;return{name:t,reducer:function(y,h){return u||(u=p()),u(y,h)},actions:d,caseReducers:s,getInitialState:function(){return u||(u=p()),u.getInitialState()}}}var cs="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ls=function(r){r===void 0&&(r=21);for(var t="",o=r;o--;)t+=cs[Math.random()*64|0];return t},ds=["name","message","stack","code"],Fr=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),En=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),us=function(r){if(typeof r=="object"&&r!==null){for(var t={},o=0,n=ds;o<n.length;o++){var i=n[o];typeof r[i]=="string"&&(t[i]=r[i])}return t}return{message:String(r)}},cl=function(){function r(t,o,n){var i=ge(t+"/fulfilled",function(y,h,m,v){return{payload:y,meta:Tr(ye({},v||{}),{arg:m,requestId:h,requestStatus:"fulfilled"})}}),s=ge(t+"/pending",function(y,h,m){return{payload:void 0,meta:Tr(ye({},m||{}),{arg:h,requestId:y,requestStatus:"pending"})}}),l=ge(t+"/rejected",function(y,h,m,v,b){return{payload:v,error:(n&&n.serializeError||us)(y||"Rejected"),meta:Tr(ye({},b||{}),{arg:m,requestId:h,rejectedWithValue:!!v,requestStatus:"rejected",aborted:y?.name==="AbortError",condition:y?.name==="ConditionError"})}}),d=!1,p=typeof AbortController<"u"?AbortController:function(){function y(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return y.prototype.abort=function(){},y}();function u(y){return function(h,m,v){var b=n?.idGenerator?n.idGenerator(y):ls(),S=new p,R,A=!1;function N(P){R=P,S.abort()}var k=function(){return Xi(this,null,function(){var P,M,X,ve,G,Se,Te;return ji(this,function(f){switch(f.label){case 0:return f.trys.push([0,4,,5]),ve=(P=n?.condition)==null?void 0:P.call(n,y,{getState:m,extra:v}),fs(ve)?[4,ve]:[3,2];case 1:ve=f.sent(),f.label=2;case 2:if(ve===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return A=!0,G=new Promise(function(g,E){return S.signal.addEventListener("abort",function(){return E({name:"AbortError",message:R||"Aborted"})})}),h(s(b,y,(M=n?.getPendingMeta)==null?void 0:M.call(n,{requestId:b,arg:y},{getState:m,extra:v}))),[4,Promise.race([G,Promise.resolve(o(y,{dispatch:h,getState:m,extra:v,requestId:b,signal:S.signal,abort:N,rejectWithValue:function(g,E){return new Fr(g,E)},fulfillWithValue:function(g,E){return new En(g,E)}})).then(function(g){if(g instanceof Fr)throw g;return g instanceof En?i(g.payload,b,y,g.meta):i(g,b,y)})])];case 3:return X=f.sent(),[3,5];case 4:return Se=f.sent(),X=Se instanceof Fr?l(null,b,y,Se.payload,Se.meta):l(Se,b,y),[3,5];case 5:return Te=n&&!n.dispatchConditionRejection&&l.match(X)&&X.meta.condition,Te||h(X),[2,X]}})})}();return Object.assign(k,{abort:N,requestId:b,arg:y,unwrap:function(){return k.then(ps)}})}}return Object.assign(u,{pending:s,rejected:l,fulfilled:i,typePrefix:t})}return r.withTypes=function(){return r},r}();function ps(r){if(r.meta&&r.meta.rejectedWithValue)throw r.payload;if(r.error)throw r.error;return r.payload}function fs(r){return r!==null&&typeof r=="object"&&typeof r.then=="function"}var Pn="listener",Ln="completed",Tn="cancelled",ll="task-"+Tn,dl="task-"+Ln,ul=Pn+"-"+Tn,pl=Pn+"-"+Ln;var Ur="listenerMiddleware";var fl=ge(Ur+"/add"),hl=ge(Ur+"/removeAll"),yl=ge(Ur+"/remove");var wn,gl=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(r){return(wn||(wn=Promise.resolve())).then(r).catch(function(t){return setTimeout(function(){throw t},0)})},hs=function(r){return function(t){setTimeout(t,r)}},ml=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:hs(10);fn();function ys(r,t){return class extends r{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(o,n,i){this.eventBus.addEventListener(o,n,i)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,i){this.eventBus.removeEventListener(o,n,i)}}}var Ut=class extends ys(Object){};window.ftReduxStores||(window.ftReduxStores={});var kn=class r extends Ut{static get(t){var o;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,s=window.ftReduxStores[n];if(ot(s))return s;if(i==null)return;let l=Rn({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),d=Nn({reducer:(p,u)=>u.type==="CLEAR_FT_REDUX_STORE"?l.getInitialState():typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__")?{...p,...u.overwrites}:l.reducer(p,u)});return window.ftReduxStores[i.name]=new r(l,d)}constructor(t,o){super(),this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new wt;let n=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,l)=>{let d=s,p=i[d];return p?(...u)=>{let y=p(...u.map(n));return this.reduxStore.dispatch(y),y}:u=>{this.setState({[d]:n(u)})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),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()}};var Wt=O(T());var Dt=class extends oe{async listMySearches(){let t=w.getState().session;return t?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var Bt=class extends oe{async listMyBookmarks(){let t=w.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var ms="ft-user-assets",Mt=Wt.FtReduxStore.get({name:ms,initialState:{savedSearches:void 0,bookmarks:void 0}}),Dr=class{constructor(){this.currentSession=w.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Bt,this.savedSearchesService=new Dt,w.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=w.getState();(0,Wt.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Mt.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Mt.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();Mt.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Mt.actions.bookmarks(o)}}},Ql=new Dr;var Br=class{addCommand(t,o=!1){w.commands.add(t,o)}consumeCommand(t){return w.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Br;var Fn=O(T()),Mr=class{highlightHtml(t,o,n){(0,Fn.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new Mr;var _n=O(T());var Wr=class{isDate(t){var o,n,i,s;return(s=(i=((n=(o=w.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(d=>d.key===t))===null||i===void 0?void 0:i.date)!==null&&s!==void 0?s:!1}format(t,o){var n,i,s;return _n.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:w.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(s=o?.withTime)!==null&&s!==void 0?s:!1)}};window.FluidTopicsDateService=new Wr;var bs=O(T());(0,Un.customElement)("ft-app-context")(U);var zr=class r extends Event{constructor(){super(r.eventName)}};zr.eventName="search-context-clear-all-filters";var xs=function(r,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(s=(i<3?l(s):i>3?l(t,o,s):l(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},$r=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},Hr=Symbol("registerInterval");function vs(r){var t;class o extends r{constructor(){super(...arguments),this[t]=0}setSearchStateManager(i){this.clearStateManager(),this.stateManager=i,this.addStore(i.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[Hr]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[Hr]):this.dispatchEvent(new $r)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return t=Hr,xs([(0,Bn.state)()],o.prototype,"stateManager",void 0),o}var ze=class extends vs(Dn.FtLitElementRedux){};var $n=O(T());var zn=O(z()),lt=O(j()),Hn=O(T());var Mn=O(z());var Wn=Mn.css`
10
+ `}update(t){var o,n,i,s,l;super.update(t),t.has("baseUrl")&&(w.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&w.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&w.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&w.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&w.actions.noCustom(this.noCustom),t.has("editorMode")&&w.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&w.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&w.actions.session(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(d=>Ee.addContext(d)),t.has("openExternalDocumentInNewTab")&&w.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&w.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&w.actions.forcedOffline(this.forcedOffline),t.has("localesConfiguration")&&(w.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),w.actions.availableUiLocales((i=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&i!==void 0?i:[]),w.actions.searchInAllLanguagesAllowed((l=(s=this.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed)!==null&&l!==void 0?l:!1)),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},t.idleTimeoutInMillis),t})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}};U.elementDefinitions={};U.styles=zo;H([(0,K.property)()],U.prototype,"baseUrl",void 0);H([(0,K.property)()],U.prototype,"apiIntegrationIdentifier",void 0);H([(0,K.property)()],U.prototype,"uiLocale",void 0);H([(0,Q.jsonProperty)(null)],U.prototype,"availableUiLocales",void 0);H([(0,Q.jsonProperty)(null)],U.prototype,"metadataConfiguration",void 0);H([(0,K.property)({type:Boolean})],U.prototype,"editorMode",void 0);H([(0,K.property)({type:Boolean})],U.prototype,"noCustom",void 0);H([(0,K.property)({type:Boolean})],U.prototype,"openExternalDocumentInNewTab",void 0);H([(0,K.property)({converter:{fromAttribute(r){return r==="false"?!1:r==="true"||(r??!1)}}})],U.prototype,"noCustomComponent",void 0);H([(0,K.property)({type:Boolean})],U.prototype,"withManualResources",void 0);H([(0,K.property)({type:Boolean})],U.prototype,"navigatorOnline",void 0);H([(0,K.property)({type:Boolean})],U.prototype,"forcedOffline",void 0);H([(0,K.property)({type:Object})],U.prototype,"apiProvider",void 0);H([(0,Q.jsonProperty)([])],U.prototype,"messageContexts",void 0);H([(0,Q.jsonProperty)(void 0)],U.prototype,"session",void 0);H([(0,K.state)()],U.prototype,"localesConfiguration",void 0);var gs=O(j());function Pi(r,t){if(r===t)return!0;if(r&&t&&typeof r=="object"&&typeof t=="object"){if(r.constructor!==t.constructor)return!1;var o,n,i;if(Array.isArray(r)){if(o=r.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!Ct(r[n],t[n]))return!1;return!0}if(r instanceof Map&&t instanceof Map){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;for(n of r.entries())if(!Ct(n[1],t.get(n[0])))return!1;return!0}if(r instanceof Set&&t instanceof Set){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;return!0}if(r.constructor===RegExp)return r.source===t.source&&r.flags===t.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===t.valueOf();let s=l=>Object.keys(l).filter(d=>l[d]!=null);if(i=s(r),o=i.length,o!==s(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=o;n--!==0;){let l=i[n];if(!Ct(r[l],t[l]))return!1}return!0}return r!==r&&t!==t||r==null&&t==null}function Ct(r,t){try{return Pi(r,t)}catch{return!1}}function Et(r,t){return!Ct(r,t)}var Li=O(j(),1);var wt=class{constructor(){this.queue=[]}add(t,o=!1){o&&(this.queue=this.queue.filter(n=>n.type!==t.type)),this.queue.push(t)}consume(t){let o=this.queue.find(n=>n.type===t);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}};var rt=O(j(),1);var jo=O(j(),1);function Ko(r,t){let o=()=>JSON.parse(JSON.stringify(r));return(0,jo.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return o();try{return JSON.parse(n)}catch{return o()}},toAttribute:n=>JSON.stringify(n)},hasChanged:Et,...t??{}})}var At=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,s=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let l of n)try{await l()}catch(d){i(d);return}s(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Zo=O(z(),1);var Nt=window,Ti=Nt.ShadowRoot&&(Nt.ShadyCSS===void 0||Nt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Cc=Symbol();var Vo=(r,t)=>{Ti?r.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet):t.forEach(o=>{let n=document.createElement("style"),i=Nt.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,r.appendChild(n)})};var It=class extends Zo.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([i,s])=>t.registry.define(i,s)));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return Vo(n,t.elementStyles),n}};var Rt=function(r,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(s=(i<3?l(s):i>3?l(t,o,s):l(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Qo,qo=Symbol("constructorPrototype"),Yo=Symbol("constructorName"),Jo=Symbol("exportpartsDebouncer"),Xo=Symbol("dynamicDependenciesLoaded"),de=class extends It{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Qo]=new At(5),this[Yo]=this.constructor.name,this[qo]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Yo]&&Object.setPrototypeOf(this,this[qo])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let t=this.constructor;t[Xo]||(t[Xo]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate()})}contentAvailableCallback(t){}applyCustomStylesheet(t){var o,n,i;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(s=>s.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(s){console.error(s,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let s=document.createElement("style");s.classList.add("ft-lit-element--custom-stylesheet"),s.innerHTML=this.customStylesheet,this.shadowRoot.append(s)}}scheduleExportpartsUpdate(){var t,o,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[Jo].run(()=>{var i,s;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((s=this.exportpartsPrefixes)===null||s===void 0?void 0:s.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(t){var o,n,i,s,l,d;let p=m=>m!=null&&m.trim().length>0,u=t.filter(p).map(m=>m.trim());if(u.length===0){this.removeAttribute("exportparts");return}let y=new Set;for(let m of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let v=(s=(i=m.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&s!==void 0?s:[],b=(d=(l=m.getAttribute("exportparts"))===null||l===void 0?void 0:l.split(",").map(S=>S.split(":")[1]))!==null&&d!==void 0?d:[];new Array(...v,...b).filter(p).map(S=>S.trim()).forEach(S=>y.add(S))}if(y.size===0){this.removeAttribute("exportparts");return}let h=[...y.values()].flatMap(m=>u.map(v=>`${m}:${v}--${m}`));this.setAttribute("exportparts",[...this.part,...h].join(", "))}};Qo=Jo;Rt([(0,rt.property)()],de.prototype,"exportpartsPrefix",void 0);Rt([Ko([])],de.prototype,"exportpartsPrefixes",void 0);Rt([(0,rt.property)()],de.prototype,"customStylesheet",void 0);Rt([(0,rt.state)()],de.prototype,"useAdoptedStyleSheets",void 0);function ot(r){var t;return(t=r?.isFtReduxStore)!==null&&t!==void 0?t:!1}var en,tn,rn,nt=Symbol("internalReduxEventsUnsubscribers"),ue=Symbol("internalStoresUnsubscribers"),we=Symbol("internalStores"),at=class extends de{constructor(){super(...arguments),this[en]=new Map,this[tn]=new Map,this[rn]=new Map}get reduxConstructor(){return this.constructor}update(t){super.update(t),[...this.reduxConstructor.reduxReactiveProperties].some(o=>t.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[we].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[we].values()][0]}getStore(t){return t==null?this.getUnnamedStore():this[we].get(t)}addStore(t,o){var n;o=(n=o??(ot(t)?t.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this[we].set(o,t),this.subscribeToStore(o,t),this.updateFromStores()}removeStore(t){let o=typeof t=="string"?t:t.name;this.unsubscribeFromStore(o),this[we].delete(o)}setupStores(){this.unsubscribeFromStores(),this[we].forEach((t,o)=>this.subscribeToStore(o,t)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((t,o)=>{let n=this.constructor.getPropertyOptions(o);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:o)){let i=this.getStore(t.store);i&&(t.store?this[ue].has(t.store):this[ue].size>0)&&(this[o]=t.selector(i.getState(),this))}})}subscribeToStore(t,o){var n;this[ue].set(t,o.subscribe(()=>this.updateFromStores())),this[nt].set(t,[]),ot(o)&&o.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((i,s)=>{if(typeof this[s]=="function"&&(!i.store||o.name===i.store)){let l=d=>this[s](d);o.addEventListener(i.eventName,l),this[nt].get(t).push(()=>o.removeEventListener(i.eventName,l))}})),this.onStoreAvailable(t)}unsubscribeFromStores(){this[ue].forEach((t,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(t){var o;this[ue].has(t)&&this[ue].get(t)(),this[ue].delete(t),(o=this[nt].get(t))===null||o===void 0||o.forEach(n=>n()),this[nt].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};en=ue,tn=we,rn=nt;at.reduxProperties=new Map;at.reduxReactiveProperties=new Set;at.reduxEventListeners=new Map;function Z(r){for(var t=arguments.length,o=Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];if(0)var i,s;throw Error("[Immer] minified error nr: "+r+(o.length?" "+o.map(function(l){return"'"+l+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ne(r){return!!r&&!!r[F]}function J(r){var t;return!!r&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===Wi}(r)||Array.isArray(r)||!!r[dn]||!!(!((t=r.constructor)===null||t===void 0)&&t[dn])||vr(r)||Sr(r))}function Ae(r,t,o){o===void 0&&(o=!1),Be(r)===0?(o?Object.keys:De)(r).forEach(function(n){o&&typeof n=="symbol"||t(n,r[n],r)}):r.forEach(function(n,i){return t(i,n,r)})}function Be(r){var t=r[F];return t?t.i>3?t.i-4:t.i:Array.isArray(r)?1:vr(r)?2:Sr(r)?3:0}function Ue(r,t){return Be(r)===2?r.has(t):Object.prototype.hasOwnProperty.call(r,t)}function ki(r,t){return Be(r)===2?r.get(t):r[t]}function un(r,t,o){var n=Be(r);n===2?r.set(t,o):n===3?r.add(o):r[t]=o}function pn(r,t){return r===t?r!==0||1/r==1/t:r!=r&&t!=t}function vr(r){return Bi&&r instanceof Map}function Sr(r){return Mi&&r instanceof Set}function pe(r){return r.o||r.t}function Or(r){if(Array.isArray(r))return Array.prototype.slice.call(r);var t=yn(r);delete t[F];for(var o=De(t),n=0;n<o.length;n++){var i=o[n],s=t[i];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(t[i]={configurable:!0,writable:!0,enumerable:s.enumerable,value:r[i]})}return Object.create(Object.getPrototypeOf(r),t)}function Cr(r,t){return t===void 0&&(t=!1),Er(r)||ne(r)||!J(r)||(Be(r)>1&&(r.set=r.add=r.clear=r.delete=Fi),Object.freeze(r),t&&Ae(r,function(o,n){return Cr(n,!0)},!0)),r}function Fi(){Z(2)}function Er(r){return r==null||typeof r!="object"||Object.isFrozen(r)}function re(r){var t=xr[r];return t||Z(18,r),t}function _i(r,t){xr[r]||(xr[r]=t)}function gr(){return st}function pr(r,t){t&&(re("Patches"),r.u=[],r.s=[],r.v=t)}function Pt(r){mr(r),r.p.forEach(Ui),r.p=null}function mr(r){r===st&&(st=r.l)}function on(r){return st={p:[],l:st,h:r,m:!0,_:0}}function Ui(r){var t=r[F];t.i===0||t.i===1?t.j():t.g=!0}function fr(r,t){t._=t.p.length;var o=t.p[0],n=r!==void 0&&r!==o;return t.h.O||re("ES5").S(t,r,n),n?(o[F].P&&(Pt(t),Z(4)),J(r)&&(r=Lt(t,r),t.l||Tt(t,r)),t.u&&re("Patches").M(o[F].t,r,t.u,t.s)):r=Lt(t,o,[]),Pt(t),t.u&&t.v(t.u,t.s),r!==hn?r:void 0}function Lt(r,t,o){if(Er(t))return t;var n=t[F];if(!n)return Ae(t,function(d,p){return nn(r,n,t,d,p,o)},!0),t;if(n.A!==r)return t;if(!n.P)return Tt(r,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=Or(n.k):n.o,s=i,l=!1;n.i===3&&(s=new Set(i),i.clear(),l=!0),Ae(s,function(d,p){return nn(r,n,i,d,p,o,l)}),Tt(r,i,!1),o&&r.u&&re("Patches").N(n,o,r.u,r.s)}return n.o}function nn(r,t,o,n,i,s,l){if(ne(i)){var d=Lt(r,i,s&&t&&t.i!==3&&!Ue(t.R,n)?s.concat(n):void 0);if(un(o,n,d),!ne(d))return;r.m=!1}else l&&o.add(i);if(J(i)&&!Er(i)){if(!r.h.D&&r._<1)return;Lt(r,i),t&&t.A.l||Tt(r,i)}}function Tt(r,t,o){o===void 0&&(o=!1),!r.l&&r.h.D&&r.m&&Cr(t,o)}function hr(r,t){var o=r[F];return(o?pe(o):r)[t]}function an(r,t){if(t in r)for(var o=Object.getPrototypeOf(r);o;){var n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=Object.getPrototypeOf(o)}}function fe(r){r.P||(r.P=!0,r.l&&fe(r.l))}function yr(r){r.o||(r.o=Or(r.t))}function br(r,t,o){var n=vr(t)?re("MapSet").F(t,o):Sr(t)?re("MapSet").T(t,o):r.O?function(i,s){var l=Array.isArray(i),d={i:l?1:0,A:s?s.A:gr(),P:!1,I:!1,R:{},l:s,t:i,k:null,o:null,j:null,C:!1},p=d,u=ct;l&&(p=[d],u=it);var y=Proxy.revocable(p,u),h=y.revoke,m=y.proxy;return d.k=m,d.j=h,m}(t,o):re("ES5").J(t,o);return(o?o.A:gr()).p.push(n),n}function Di(r){return ne(r)||Z(22,r),function t(o){if(!J(o))return o;var n,i=o[F],s=Be(o);if(i){if(!i.P&&(i.i<4||!re("ES5").K(i)))return i.t;i.I=!0,n=sn(o,s),i.I=!1}else n=sn(o,s);return Ae(n,function(l,d){i&&ki(i.t,l)===d||un(n,l,t(d))}),s===3?new Set(n):n}(r)}function sn(r,t){switch(t){case 2:return new Map(r);case 3:return Array.from(r)}return Or(r)}function fn(){function r(l,d){var p=s[l];return p?p.enumerable=d:s[l]=p={configurable:!0,enumerable:d,get:function(){var u=this[F];return ct.get(u,l)},set:function(u){var y=this[F];ct.set(y,l,u)}},p}function t(l){for(var d=l.length-1;d>=0;d--){var p=l[d][F];if(!p.P)switch(p.i){case 5:n(p)&&fe(p);break;case 4:o(p)&&fe(p)}}}function o(l){for(var d=l.t,p=l.k,u=De(p),y=u.length-1;y>=0;y--){var h=u[y];if(h!==F){var m=d[h];if(m===void 0&&!Ue(d,h))return!0;var v=p[h],b=v&&v[F];if(b?b.t!==m:!pn(v,m))return!0}}var S=!!d[F];return u.length!==De(d).length+(S?0:1)}function n(l){var d=l.k;if(d.length!==l.t.length)return!0;var p=Object.getOwnPropertyDescriptor(d,d.length-1);if(p&&!p.get)return!0;for(var u=0;u<d.length;u++)if(!d.hasOwnProperty(u))return!0;return!1}function i(l){l.g&&Z(3,JSON.stringify(pe(l)))}var s={};_i("ES5",{J:function(l,d){var p=Array.isArray(l),u=function(h,m){if(h){for(var v=Array(m.length),b=0;b<m.length;b++)Object.defineProperty(v,""+b,r(b,!0));return v}var S=yn(m);delete S[F];for(var R=De(S),A=0;A<R.length;A++){var N=R[A];S[N]=r(N,h||!!S[N].enumerable)}return Object.create(Object.getPrototypeOf(m),S)}(p,l),y={i:p?5:4,A:d?d.A:gr(),P:!1,I:!1,R:{},l:d,t:l,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,F,{value:y,writable:!0}),u},S:function(l,d,p){p?ne(d)&&d[F].A===l&&t(l.p):(l.u&&function u(y){if(y&&typeof y=="object"){var h=y[F];if(h){var m=h.t,v=h.k,b=h.R,S=h.i;if(S===4)Ae(v,function(P){P!==F&&(m[P]!==void 0||Ue(m,P)?b[P]||u(v[P]):(b[P]=!0,fe(h)))}),Ae(m,function(P){v[P]!==void 0||Ue(v,P)||(b[P]=!1,fe(h))});else if(S===5){if(n(h)&&(fe(h),b.length=!0),v.length<m.length)for(var R=v.length;R<m.length;R++)b[R]=!1;else for(var A=m.length;A<v.length;A++)b[A]=!0;for(var N=Math.min(v.length,m.length),k=0;k<N;k++)v.hasOwnProperty(k)||(b[k]=!0),b[k]===void 0&&u(v[k])}}}}(l.p[0]),t(l.p))},K:function(l){return l.i===4?o(l):n(l)}})}var cn,st,wr=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Bi=typeof Map<"u",Mi=typeof Set<"u",ln=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",hn=wr?Symbol.for("immer-nothing"):((cn={})["immer-nothing"]=!0,cn),dn=wr?Symbol.for("immer-draftable"):"__$immer_draftable",F=wr?Symbol.for("immer-state"):"__$immer_state";var Wi=""+Object.prototype.constructor,De=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:Object.getOwnPropertyNames,yn=Object.getOwnPropertyDescriptors||function(r){var t={};return De(r).forEach(function(o){t[o]=Object.getOwnPropertyDescriptor(r,o)}),t},xr={},ct={get:function(r,t){if(t===F)return r;var o=pe(r);if(!Ue(o,t))return function(i,s,l){var d,p=an(s,l);return p?"value"in p?p.value:(d=p.get)===null||d===void 0?void 0:d.call(i.k):void 0}(r,o,t);var n=o[t];return r.I||!J(n)?n:n===hr(r.t,t)?(yr(r),r.o[t]=br(r.A.h,n,r)):n},has:function(r,t){return t in pe(r)},ownKeys:function(r){return Reflect.ownKeys(pe(r))},set:function(r,t,o){var n=an(pe(r),t);if(n?.set)return n.set.call(r.k,o),!0;if(!r.P){var i=hr(pe(r),t),s=i?.[F];if(s&&s.t===o)return r.o[t]=o,r.R[t]=!1,!0;if(pn(o,i)&&(o!==void 0||Ue(r.t,t)))return!0;yr(r),fe(r)}return r.o[t]===o&&(o!==void 0||t in r.o)||Number.isNaN(o)&&Number.isNaN(r.o[t])||(r.o[t]=o,r.R[t]=!0),!0},deleteProperty:function(r,t){return hr(r.t,t)!==void 0||t in r.t?(r.R[t]=!1,yr(r),fe(r)):delete r.R[t],r.o&&delete r.o[t],!0},getOwnPropertyDescriptor:function(r,t){var o=pe(r),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{writable:!0,configurable:r.i!==1||t!=="length",enumerable:n.enumerable,value:o[t]}},defineProperty:function(){Z(11)},getPrototypeOf:function(r){return Object.getPrototypeOf(r.t)},setPrototypeOf:function(){Z(12)}},it={};Ae(ct,function(r,t){it[r]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),it.deleteProperty=function(r,t){return it.set.call(this,r,t,void 0)},it.set=function(r,t,o){return ct.set.call(this,r[0],t,o,r[0])};var zi=function(){function r(o){var n=this;this.O=ln,this.D=!0,this.produce=function(i,s,l){if(typeof i=="function"&&typeof s!="function"){var d=s;s=i;var p=n;return function(S){var R=this;S===void 0&&(S=d);for(var A=arguments.length,N=Array(A>1?A-1:0),k=1;k<A;k++)N[k-1]=arguments[k];return p.produce(S,function(P){var M;return(M=s).call.apply(M,[R,P].concat(N))})}}var u;if(typeof s!="function"&&Z(6),l!==void 0&&typeof l!="function"&&Z(7),J(i)){var y=on(n),h=br(n,i,void 0),m=!0;try{u=s(h),m=!1}finally{m?Pt(y):mr(y)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(S){return pr(y,l),fr(S,y)},function(S){throw Pt(y),S}):(pr(y,l),fr(u,y))}if(!i||typeof i!="object"){if((u=s(i))===void 0&&(u=i),u===hn&&(u=void 0),n.D&&Cr(u,!0),l){var v=[],b=[];re("Patches").M(i,u,v,b),l(v,b)}return u}Z(21,i)},this.produceWithPatches=function(i,s){if(typeof i=="function")return function(u){for(var y=arguments.length,h=Array(y>1?y-1:0),m=1;m<y;m++)h[m-1]=arguments[m];return n.produceWithPatches(u,function(v){return i.apply(void 0,[v].concat(h))})};var l,d,p=n.produce(i,s,function(u,y){l=u,d=y});return typeof Promise<"u"&&p instanceof Promise?p.then(function(u){return[u,l,d]}):[p,l,d]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var t=r.prototype;return t.createDraft=function(o){J(o)||Z(8),ne(o)&&(o=Di(o));var n=on(this),i=br(this,o,void 0);return i[F].C=!0,mr(n),i},t.finishDraft=function(o,n){var i=o&&o[F],s=i.A;return pr(s,n),fr(void 0,s)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!ln&&Z(20),this.O=o},t.applyPatches=function(o,n){var i;for(i=n.length-1;i>=0;i--){var s=n[i];if(s.path.length===0&&s.op==="replace"){o=s.value;break}}i>-1&&(n=n.slice(i+1));var l=re("Patches").$;return ne(o)?l(o,n):this.produce(o,function(d){return l(d,n)})},r}(),V=new zi,Hi=V.produce,_c=V.produceWithPatches.bind(V),Uc=V.setAutoFreeze.bind(V),Dc=V.setUseProxies.bind(V),Bc=V.applyPatches.bind(V),Mc=V.createDraft.bind(V),Wc=V.finishDraft.bind(V),kt=Hi;function he(r){"@babel/helpers - typeof";return he=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},he(r)}function Ar(r,t){if(he(r)!=="object"||r===null)return r;var o=r[Symbol.toPrimitive];if(o!==void 0){var n=o.call(r,t||"default");if(he(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function Nr(r){var t=Ar(r,"string");return he(t)==="symbol"?t:String(t)}function Ir(r,t,o){return t=Nr(t),t in r?Object.defineProperty(r,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[t]=o,r}function gn(r,t){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),o.push.apply(o,n)}return o}function Ft(r){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?gn(Object(o),!0).forEach(function(n){Ir(r,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):gn(Object(o)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(o,n))})}return r}function $(r){return"Minified Redux error #"+r+"; visit https://redux.js.org/Errors?code="+r+" for the full message or use the non-minified dev environment for full errors. "}var mn=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Rr=function(){return Math.random().toString(36).substring(7).split("").join(".")},_t={INIT:"@@redux/INIT"+Rr(),REPLACE:"@@redux/REPLACE"+Rr(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Rr()}};function $i(r){if(typeof r!="object"||r===null)return!1;for(var t=r;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(r)===t}function Pr(r,t,o){var n;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error($(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error($(1));return o(Pr)(r,t)}if(typeof r!="function")throw new Error($(2));var i=r,s=t,l=[],d=l,p=!1;function u(){d===l&&(d=l.slice())}function y(){if(p)throw new Error($(3));return s}function h(S){if(typeof S!="function")throw new Error($(4));if(p)throw new Error($(5));var R=!0;return u(),d.push(S),function(){if(R){if(p)throw new Error($(6));R=!1,u();var N=d.indexOf(S);d.splice(N,1),l=null}}}function m(S){if(!$i(S))throw new Error($(7));if(typeof S.type>"u")throw new Error($(8));if(p)throw new Error($(9));try{p=!0,s=i(s,S)}finally{p=!1}for(var R=l=d,A=0;A<R.length;A++){var N=R[A];N()}return S}function v(S){if(typeof S!="function")throw new Error($(10));i=S,m({type:_t.REPLACE})}function b(){var S,R=h;return S={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error($(11));function k(){N.next&&N.next(y())}k();var P=R(k);return{unsubscribe:P}}},S[mn]=function(){return this},S}return m({type:_t.INIT}),n={dispatch:m,subscribe:h,getState:y,replaceReducer:v},n[mn]=b,n}function Gi(r){Object.keys(r).forEach(function(t){var o=r[t],n=o(void 0,{type:_t.INIT});if(typeof n>"u")throw new Error($(12));if(typeof o(void 0,{type:_t.PROBE_UNKNOWN_ACTION()})>"u")throw new Error($(13))})}function bn(r){for(var t=Object.keys(r),o={},n=0;n<t.length;n++){var i=t[n];typeof r[i]=="function"&&(o[i]=r[i])}var s=Object.keys(o),l,d;try{Gi(o)}catch(p){d=p}return function(u,y){if(u===void 0&&(u={}),d)throw d;if(0)var h;for(var m=!1,v={},b=0;b<s.length;b++){var S=s[b],R=o[S],A=u[S],N=R(A,y);if(typeof N>"u"){var k=y&&y.type;throw new Error($(14))}v[S]=N,m=m||N!==A}return m=m||s.length!==Object.keys(u).length,m?v:u}}function Me(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function xn(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),s=function(){throw new Error($(15))},l={getState:i.getState,dispatch:function(){return s.apply(void 0,arguments)}},d=t.map(function(p){return p(l)});return s=Me.apply(void 0,d)(i.dispatch),Ft(Ft({},i),{},{dispatch:s})}}}function vn(r){var t=function(n){var i=n.dispatch,s=n.getState;return function(l){return function(d){return typeof d=="function"?d(i,s,r):l(d)}}};return t}var Sn=vn();Sn.withExtraArgument=vn;var Lr=Sn;var An=function(){var r=function(t,o){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");r(t,o);function n(){this.constructor=t}t.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),ji=function(r,t){var o={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,l;return l={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function d(u){return function(y){return p([u,y])}}function p(u){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(s=u[0]&2?i.return:u[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,u[1])).done)return s;switch(i=0,s&&(u=[u[0]&2,s.value]),u[0]){case 0:case 1:s=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,i=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(s=o.trys,!(s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){o=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){o.label=u[1];break}if(u[0]===6&&o.label<s[1]){o.label=s[1],s=u;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(u);break}s[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(r,o)}catch(y){u=[6,y],i=0}finally{n=s=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},We=function(r,t){for(var o=0,n=t.length,i=r.length;o<n;o++,i++)r[i]=t[o];return r},Ki=Object.defineProperty,Vi=Object.defineProperties,Zi=Object.getOwnPropertyDescriptors,On=Object.getOwnPropertySymbols,qi=Object.prototype.hasOwnProperty,Yi=Object.prototype.propertyIsEnumerable,Cn=function(r,t,o){return t in r?Ki(r,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[t]=o},ye=function(r,t){for(var o in t||(t={}))qi.call(t,o)&&Cn(r,o,t[o]);if(On)for(var n=0,i=On(t);n<i.length;n++){var o=i[n];Yi.call(t,o)&&Cn(r,o,t[o])}return r},Tr=function(r,t){return Vi(r,Zi(t))},Xi=function(r,t,o){return new Promise(function(n,i){var s=function(p){try{d(o.next(p))}catch(u){i(u)}},l=function(p){try{d(o.throw(p))}catch(u){i(u)}},d=function(p){return p.done?n(p.value):Promise.resolve(p.value).then(s,l)};d((o=o.apply(r,t)).next())})};var Qi=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Me:Me.apply(null,arguments)},nl=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(r){return r}};function Ji(r){if(typeof r!="object"||r===null)return!1;var t=Object.getPrototypeOf(r);if(t===null)return!0;for(var o=t;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return t===o}var es=function(r){An(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=r.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,We([void 0],o[0].concat(this)))):new(t.bind.apply(t,We([void 0],o.concat(this))))},t}(Array),ts=function(r){An(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=r.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,We([void 0],o[0].concat(this)))):new(t.bind.apply(t,We([void 0],o.concat(this))))},t}(Array);function _r(r){return J(r)?kt(r,function(){}):r}function rs(r){return typeof r=="boolean"}function os(){return function(t){return ns(t)}}function ns(r){r===void 0&&(r={});var t=r.thunk,o=t===void 0?!0:t,n=r.immutableCheck,i=n===void 0?!0:n,s=r.serializableCheck,l=s===void 0?!0:s,d=new es;if(o&&(rs(o)?d.push(Lr):d.push(Lr.withExtraArgument(o.extraArgument))),0){if(i)var p;if(l)var u}return d}var kr=!0;function Nn(r){var t=os(),o=r||{},n=o.reducer,i=n===void 0?void 0:n,s=o.middleware,l=s===void 0?t():s,d=o.devTools,p=d===void 0?!0:d,u=o.preloadedState,y=u===void 0?void 0:u,h=o.enhancers,m=h===void 0?void 0:h,v;if(typeof i=="function")v=i;else if(Ji(i))v=bn(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var b=l;if(typeof b=="function"&&(b=b(t),!kr&&!Array.isArray(b)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!kr&&b.some(function(P){return typeof P!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=xn.apply(void 0,b),R=Me;p&&(R=Qi(ye({trace:!kr},typeof p=="object"&&p)));var A=new ts(S),N=A;Array.isArray(m)?N=We([S],m):typeof m=="function"&&(N=m(A));var k=R.apply(void 0,N);return Pr(v,y,k)}function ge(r,t){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(t){var s=t.apply(void 0,n);if(!s)throw new Error("prepareAction did not return an object");return ye(ye({type:r,payload:s.payload},"meta"in s&&{meta:s.meta}),"error"in s&&{error:s.error})}return{type:r,payload:n[0]}}return o.toString=function(){return""+r},o.type=r,o.match=function(n){return n.type===r},o}function In(r){var t={},o=[],n,i={addCase:function(s,l){var d=typeof s=="string"?s:s.type;if(d in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[d]=l,i},addMatcher:function(s,l){return o.push({matcher:s,reducer:l}),i},addDefaultCase:function(s){return n=s,i}};return r(i),[t,o,n]}function as(r){return typeof r=="function"}function is(r,t,o,n){o===void 0&&(o=[]);var i=typeof t=="function"?In(t):[t,o,n],s=i[0],l=i[1],d=i[2],p;if(as(r))p=function(){return _r(r())};else{var u=_r(r);p=function(){return u}}function y(h,m){h===void 0&&(h=p());var v=We([s[m.type]],l.filter(function(b){var S=b.matcher;return S(m)}).map(function(b){var S=b.reducer;return S}));return v.filter(function(b){return!!b}).length===0&&(v=[d]),v.reduce(function(b,S){if(S)if(ne(b)){var R=b,A=S(R,m);return A===void 0?b:A}else{if(J(b))return kt(b,function(N){return S(N,m)});var A=S(b,m);if(A===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return A}return b},h)}return y.getInitialState=p,y}function ss(r,t){return r+"/"+t}function Rn(r){var t=r.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof r.initialState=="function"?r.initialState:_r(r.initialState),n=r.reducers||{},i=Object.keys(n),s={},l={},d={};i.forEach(function(y){var h=n[y],m=ss(t,y),v,b;"reducer"in h?(v=h.reducer,b=h.prepare):v=h,s[y]=v,l[m]=v,d[y]=b?ge(m,b):ge(m)});function p(){var y=typeof r.extraReducers=="function"?In(r.extraReducers):[r.extraReducers],h=y[0],m=h===void 0?{}:h,v=y[1],b=v===void 0?[]:v,S=y[2],R=S===void 0?void 0:S,A=ye(ye({},m),l);return is(o,function(N){for(var k in A)N.addCase(k,A[k]);for(var P=0,M=b;P<M.length;P++){var X=M[P];N.addMatcher(X.matcher,X.reducer)}R&&N.addDefaultCase(R)})}var u;return{name:t,reducer:function(y,h){return u||(u=p()),u(y,h)},actions:d,caseReducers:s,getInitialState:function(){return u||(u=p()),u.getInitialState()}}}var cs="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ls=function(r){r===void 0&&(r=21);for(var t="",o=r;o--;)t+=cs[Math.random()*64|0];return t},ds=["name","message","stack","code"],Fr=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),En=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),us=function(r){if(typeof r=="object"&&r!==null){for(var t={},o=0,n=ds;o<n.length;o++){var i=n[o];typeof r[i]=="string"&&(t[i]=r[i])}return t}return{message:String(r)}},cl=function(){function r(t,o,n){var i=ge(t+"/fulfilled",function(y,h,m,v){return{payload:y,meta:Tr(ye({},v||{}),{arg:m,requestId:h,requestStatus:"fulfilled"})}}),s=ge(t+"/pending",function(y,h,m){return{payload:void 0,meta:Tr(ye({},m||{}),{arg:h,requestId:y,requestStatus:"pending"})}}),l=ge(t+"/rejected",function(y,h,m,v,b){return{payload:v,error:(n&&n.serializeError||us)(y||"Rejected"),meta:Tr(ye({},b||{}),{arg:m,requestId:h,rejectedWithValue:!!v,requestStatus:"rejected",aborted:y?.name==="AbortError",condition:y?.name==="ConditionError"})}}),d=!1,p=typeof AbortController<"u"?AbortController:function(){function y(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return y.prototype.abort=function(){},y}();function u(y){return function(h,m,v){var b=n?.idGenerator?n.idGenerator(y):ls(),S=new p,R,A=!1;function N(P){R=P,S.abort()}var k=function(){return Xi(this,null,function(){var P,M,X,ve,G,Se,Te;return ji(this,function(f){switch(f.label){case 0:return f.trys.push([0,4,,5]),ve=(P=n?.condition)==null?void 0:P.call(n,y,{getState:m,extra:v}),fs(ve)?[4,ve]:[3,2];case 1:ve=f.sent(),f.label=2;case 2:if(ve===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return A=!0,G=new Promise(function(g,E){return S.signal.addEventListener("abort",function(){return E({name:"AbortError",message:R||"Aborted"})})}),h(s(b,y,(M=n?.getPendingMeta)==null?void 0:M.call(n,{requestId:b,arg:y},{getState:m,extra:v}))),[4,Promise.race([G,Promise.resolve(o(y,{dispatch:h,getState:m,extra:v,requestId:b,signal:S.signal,abort:N,rejectWithValue:function(g,E){return new Fr(g,E)},fulfillWithValue:function(g,E){return new En(g,E)}})).then(function(g){if(g instanceof Fr)throw g;return g instanceof En?i(g.payload,b,y,g.meta):i(g,b,y)})])];case 3:return X=f.sent(),[3,5];case 4:return Se=f.sent(),X=Se instanceof Fr?l(null,b,y,Se.payload,Se.meta):l(Se,b,y),[3,5];case 5:return Te=n&&!n.dispatchConditionRejection&&l.match(X)&&X.meta.condition,Te||h(X),[2,X]}})})}();return Object.assign(k,{abort:N,requestId:b,arg:y,unwrap:function(){return k.then(ps)}})}}return Object.assign(u,{pending:s,rejected:l,fulfilled:i,typePrefix:t})}return r.withTypes=function(){return r},r}();function ps(r){if(r.meta&&r.meta.rejectedWithValue)throw r.payload;if(r.error)throw r.error;return r.payload}function fs(r){return r!==null&&typeof r=="object"&&typeof r.then=="function"}var Pn="listener",Ln="completed",Tn="cancelled",ll="task-"+Tn,dl="task-"+Ln,ul=Pn+"-"+Tn,pl=Pn+"-"+Ln;var Ur="listenerMiddleware";var fl=ge(Ur+"/add"),hl=ge(Ur+"/removeAll"),yl=ge(Ur+"/remove");var wn,gl=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(r){return(wn||(wn=Promise.resolve())).then(r).catch(function(t){return setTimeout(function(){throw t},0)})},hs=function(r){return function(t){setTimeout(t,r)}},ml=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:hs(10);fn();function ys(r,t){return class extends r{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(o,n,i){this.eventBus.addEventListener(o,n,i)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,i){this.eventBus.removeEventListener(o,n,i)}}}var Ut=class extends ys(Object){};window.ftReduxStores||(window.ftReduxStores={});var kn=class r extends Ut{static get(t){var o;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,s=window.ftReduxStores[n];if(ot(s))return s;if(i==null)return;let l=Rn({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),d=Nn({reducer:(p,u)=>u.type==="CLEAR_FT_REDUX_STORE"?l.getInitialState():typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__")?{...p,...u.overwrites}:l.reducer(p,u)});return window.ftReduxStores[i.name]=new r(l,d)}constructor(t,o){super(),this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new wt;let n=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,l)=>{let d=s,p=i[d];return p?(...u)=>{let y=p(...u.map(n));return this.reduxStore.dispatch(y),y}:u=>{this.setState({[d]:n(u)})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),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()}};var Wt=O(T());var Dt=class extends oe{async listMySearches(){let t=w.getState().session;return t?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var Bt=class extends oe{async listMyBookmarks(){let t=w.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var ms="ft-user-assets",Mt=Wt.FtReduxStore.get({name:ms,initialState:{savedSearches:void 0,bookmarks:void 0}}),Dr=class{constructor(){this.currentSession=w.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Bt,this.savedSearchesService=new Dt,w.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=w.getState();(0,Wt.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Mt.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Mt.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();Mt.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Mt.actions.bookmarks(o)}}},Ql=new Dr;var Br=class{addCommand(t,o=!1){w.commands.add(t,o)}consumeCommand(t){return w.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Br;var Fn=O(T()),Mr=class{highlightHtml(t,o,n){(0,Fn.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new Mr;var _n=O(T());var Wr=class{isDate(t){var o,n,i,s;return(s=(i=((n=(o=w.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(d=>d.key===t))===null||i===void 0?void 0:i.date)!==null&&s!==void 0?s:!1}format(t,o){var n,i,s;return _n.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:w.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(s=o?.withTime)!==null&&s!==void 0?s:!1)}};window.FluidTopicsDateService=new Wr;var bs=O(T());(0,Un.customElement)("ft-app-context")(U);var zr=class r extends Event{constructor(){super(r.eventName)}};zr.eventName="search-context-clear-all-filters";var xs=function(r,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(s=(i<3?l(s):i>3?l(t,o,s):l(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},$r=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},Hr=Symbol("registerInterval");function vs(r){var t;class o extends r{constructor(){super(...arguments),this[t]=0}setSearchStateManager(i){this.clearStateManager(),this.stateManager=i,this.addStore(i.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[Hr]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[Hr]):this.dispatchEvent(new $r)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return t=Hr,xs([(0,Bn.state)()],o.prototype,"stateManager",void 0),o}var ze=class extends vs(Dn.FtLitElementRedux){};var $n=O(T());var zn=O(z()),lt=O(j()),Hn=O(T());var Mn=O(z());var Wn=Mn.css`
11
11
  a {
12
12
  color: inherit;
13
13
  text-decoration: inherit;