@fluid-topics/ft-search-period-filter 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.
@@ -1807,7 +1807,7 @@ Also for action icons.`,s.colorGray200),contentGlobalSubtle:r.extend("--ft-conte
1807
1807
  `;var zo=g(I());var Jl=g(I());var ll=g($()),Ie=g(K()),Ve=g(I());var nl=g($());var al=nl.css`
1808
1808
  `;var vo=g(I()),id="ft-app-info",Nn=class extends CustomEvent{constructor(e){super("authentication-change",{detail:e})}},sd={session:(t,e)=>{(0,vo.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>k.dispatchEvent(new Nn(e.payload)),0))}},k=vo.FtReduxStore.get({name:id,reducers:sd,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 At=g(I());var Ln=g(I());var Xt=class t{static get(e){let{baseUrl:o,apiIntegrationIdentifier:n}=k.getState(),i=e??n;if(o&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,i,!0)}static await(e){return new Promise(o=>{let n=t.get(e);if(n)o(n);else{let i=k.subscribe(()=>{n=t.get(e),n&&(i(),o(n))})}})}};var yt=class{constructor(e=!0,o){var n;this.overrideApi=o;let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new Ln.CacheRegistry,this.cache=e?i.commonCache:new Ln.CacheRegistry}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Xt.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Xt.await()}clearCache(){this.cache.clearAll()}};var il,ld=Symbol("clearAfterUnitTest"),So=class extends yt{constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[il]=()=>{this.defaultMessages={},this.cache=new At.CacheRegistry,this.listeners={}},this.currentUiLocale=k.getState().uiLocale,k.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=k.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let o=e.name.toLowerCase();this.cache.setFinal(o,e),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,o){var n;if(e=e.toLowerCase(),Object.keys(o).length>0){let i={...(n=this.defaultMessages[e])!==null&&n!==void 0?n:{},...o};(0,At.deepEqual)(this.defaultMessages[e],i)||(this.defaultMessages[e]=i,await this.notify(e))}await this.fetchContext(e)}resolveContext(e){var o,n;return this.fetchContext(e),(n=(o=this.cache.getNow(e))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(e,o){let n=e.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(e,o,...n){var i;let a=e.toLowerCase(),l=this.resolveContext(a);return new At.ParametrizedLabelResolver((i=this.defaultMessages[a])!==null&&i!==void 0?i:{},l).resolve(o,...n)}async fetchContext(e){if(!this.cache.has(e))try{await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),await this.notify(e)}catch(o){console.error(o)}}subscribe(e,o){var n;return e=e.toLowerCase(),this.listeners[e]=(n=this.listeners[e])!==null&&n!==void 0?n:new Set,this.listeners[e].add(o),()=>{var i;return(i=this.listeners[e])===null||i===void 0?void 0:i.delete(o)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map(e=>this.notify(e)))}async notify(e){this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(o=>(0,At.delay)(0).then(()=>o()).catch(()=>null)))}};il=ld;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends So{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends So{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Qt=window.FluidTopicsI18nService,sl=window.FluidTopicsCustomI18nService;var ye=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(l=t[c])&&(a=(i<3?l(a):i>3?l(e,o,a):l(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},ee=class extends Ve.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=()=>Xt.get(),this.messageContexts=[],this.cache=new Ve.CacheRegistry,this.cleanSessionDebouncer=new Ve.Debouncer}render(){return ll.html`
1809
1809
  <slot></slot>
1810
- `}update(e){var o,n,i,a,l;super.update(e),e.has("baseUrl")&&(k.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&k.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("uiLocale")&&k.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&k.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&k.actions.noCustom(this.noCustom),e.has("editorMode")&&k.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&k.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&k.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(c=>Qt.addContext(c)),e.has("openExternalDocumentInNewTab")&&k.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&k.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&k.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(k.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),k.actions.availableUiLocales((i=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&i!==void 0?i:[]),k.actions.searchInAllLanguagesAllowed((l=(a=this.localesConfiguration)===null||a===void 0?void 0:a.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 e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}};ee.elementDefinitions={};ee.styles=al;ye([(0,Ie.property)()],ee.prototype,"baseUrl",void 0);ye([(0,Ie.property)()],ee.prototype,"apiIntegrationIdentifier",void 0);ye([(0,Ie.property)()],ee.prototype,"uiLocale",void 0);ye([(0,Ve.jsonProperty)(null)],ee.prototype,"availableUiLocales",void 0);ye([(0,Ve.jsonProperty)(null)],ee.prototype,"metadataConfiguration",void 0);ye([(0,Ie.property)({type:Boolean})],ee.prototype,"editorMode",void 0);ye([(0,Ie.property)({type:Boolean})],ee.prototype,"noCustom",void 0);ye([(0,Ie.property)({type:Boolean})],ee.prototype,"openExternalDocumentInNewTab",void 0);ye([(0,Ie.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],ee.prototype,"noCustomComponent",void 0);ye([(0,Ie.property)({type:Boolean})],ee.prototype,"withManualResources",void 0);ye([(0,Ie.property)({type:Boolean})],ee.prototype,"navigatorOnline",void 0);ye([(0,Ie.property)({type:Boolean})],ee.prototype,"forcedOffline",void 0);ye([(0,Ie.property)({type:Object})],ee.prototype,"apiProvider",void 0);ye([(0,Ve.jsonProperty)([])],ee.prototype,"messageContexts",void 0);ye([(0,Ve.jsonProperty)(void 0)],ee.prototype,"session",void 0);ye([(0,Ie.state)()],ee.prototype,"localesConfiguration",void 0);var qd=g(K());function cd(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var o,n,i;if(Array.isArray(t)){if(o=t.length,o!=e.length)return!1;for(n=o;n--!==0;)if(!Oo(t[n],e[n]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;for(n of t.entries())if(!Oo(n[1],e.get(n[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(i=Object.keys(t),o=i.length,o!==Object.keys(e).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[n]))return!1;for(n=o;n--!==0;){var a=i[n];if(!Oo(t[a],e[a]))return!1}return!0}return t!==t&&e!==e}function Oo(t,e){try{return cd(t,e)}catch{return!1}}function Co(t,e){return!Oo(t,e)}var dd=g(K(),1);var Eo=class{constructor(){this.queue=[]}add(e,o=!1){o&&(this.queue=this.queue.filter(n=>n.type!==e.type)),this.queue.push(e)}consume(e){let o=this.queue.find(n=>n.type===e);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}};var zr=g(K(),1);var cl=g(K(),1);function dl(t,e){let o=()=>JSON.parse(JSON.stringify(t));return(0,cl.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:Co,...e??{}})}var wo=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,o){return this.callbacks=[e],this.debounce(o)}queue(e,o){return this.callbacks.push(e),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,o;let n=[...this.callbacks];this.callbacks=[];let i=(e=this.rejectPromise)!==null&&e!==void 0?e:()=>null,a=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let l of n)try{await l()}catch(c){i(c);return}a(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var ul=g($(),1);var Ao=window,pd=Ao.ShadowRoot&&(Ao.ShadyCSS===void 0||Ao.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,lx=Symbol();var pl=(t,e)=>{pd?t.adoptedStyleSheets=e.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet):e.forEach(o=>{let n=document.createElement("style"),i=Ao.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,t.appendChild(n)})};var Ro=class extends ul.LitElement{createRenderRoot(){let e=this.constructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,Object.entries(e.elementDefinitions).forEach(([i,a])=>e.registry.define(i,a)));let o={...e.shadowRootOptions,customElements:e.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return pl(n,e.elementStyles),n}};var No=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(l=t[c])&&(a=(i<3?l(a):i>3?l(e,o,a):l(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},ml,fl=Symbol("constructorPrototype"),hl=Symbol("constructorName"),gl=Symbol("exportpartsDebouncer"),yl=Symbol("dynamicDependenciesLoaded"),Rt=class extends Ro{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[ml]=new wo(5),this[hl]=this.constructor.name,this[fl]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[hl]&&Object.setPrototypeOf(this,this[fl])}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 e=this.constructor;e[yl]||(e[yl]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate()})}contentAvailableCallback(e){}applyCustomStylesheet(e){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(a=>a.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(a){console.error(a,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let a=document.createElement("style");a.classList.add("ft-lit-element--custom-stylesheet"),a.innerHTML=this.customStylesheet,this.shadowRoot.append(a)}}scheduleExportpartsUpdate(){var e,o,n;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[gl].run(()=>{var i,a;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((a=this.exportpartsPrefixes)===null||a===void 0?void 0:a.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(e){var o,n,i,a,l,c;let u=b=>b!=null&&b.trim().length>0,p=e.filter(u).map(b=>b.trim());if(p.length===0){this.removeAttribute("exportparts");return}let y=new Set;for(let b of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let S=(a=(i=b.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&a!==void 0?a:[],v=(c=(l=b.getAttribute("exportparts"))===null||l===void 0?void 0:l.split(",").map(O=>O.split(":")[1]))!==null&&c!==void 0?c:[];new Array(...S,...v).filter(u).map(O=>O.trim()).forEach(O=>y.add(O))}if(y.size===0){this.removeAttribute("exportparts");return}let h=[...y.values()].flatMap(b=>p.map(S=>`${b}:${S}--${b}`));this.setAttribute("exportparts",[...this.part,...h].join(", "))}};ml=gl;No([(0,zr.property)()],Rt.prototype,"exportpartsPrefix",void 0);No([dl([])],Rt.prototype,"exportpartsPrefixes",void 0);No([(0,zr.property)()],Rt.prototype,"customStylesheet",void 0);No([(0,zr.state)()],Rt.prototype,"useAdoptedStyleSheets",void 0);function Hr(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var bl,xl,vl,Gr=Symbol("internalReduxEventsUnsubscribers"),Nt=Symbol("internalStoresUnsubscribers"),Jt=Symbol("internalStores"),Vr=class extends Rt{constructor(){super(...arguments),this[bl]=new Map,this[xl]=new Map,this[vl]=new Map}get reduxConstructor(){return this.constructor}update(e){super.update(e),[...this.reduxConstructor.reduxReactiveProperties].some(o=>e.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[Jt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Jt].values()][0]}getStore(e){return e==null?this.getUnnamedStore():this[Jt].get(e)}addStore(e,o){var n;o=(n=o??(Hr(e)?e.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this[Jt].set(o,e),this.subscribeToStore(o,e),this.updateFromStores()}removeStore(e){let o=typeof e=="string"?e:e.name;this.unsubscribeFromStore(o),this[Jt].delete(o)}setupStores(){this.unsubscribeFromStores(),this[Jt].forEach((e,o)=>this.subscribeToStore(o,e)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((e,o)=>{let n=this.constructor.getPropertyOptions(o);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:o)){let i=this.getStore(e.store);i&&(e.store?this[Nt].has(e.store):this[Nt].size>0)&&(this[o]=e.selector(i.getState(),this))}})}subscribeToStore(e,o){var n;this[Nt].set(e,o.subscribe(()=>this.updateFromStores())),this[Gr].set(e,[]),Hr(o)&&o.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((i,a)=>{if(typeof this[a]=="function"&&(!i.store||o.name===i.store)){let l=c=>this[a](c);o.addEventListener(i.eventName,l),this[Gr].get(e).push(()=>o.removeEventListener(i.eventName,l))}})),this.onStoreAvailable(e)}unsubscribeFromStores(){this[Nt].forEach((e,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(e){var o;this[Nt].has(e)&&this[Nt].get(e)(),this[Nt].delete(e),(o=this[Gr].get(e))===null||o===void 0||o.forEach(n=>n()),this[Gr].delete(e)}onStoreAvailable(e){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};bl=Nt,xl=Jt,vl=Gr;Vr.reduxProperties=new Map;Vr.reduxReactiveProperties=new Set;Vr.reduxEventListeners=new Map;function Ue(t){for(var e=arguments.length,o=Array(e>1?e-1:0),n=1;n<e;n++)o[n-1]=arguments[n];if(0)var i,a;throw Error("[Immer] minified error nr: "+t+(o.length?" "+o.map(function(l){return"'"+l+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function mt(t){return!!t&&!!t[X]}function je(t){var e;return!!t&&(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)===xd}(t)||Array.isArray(t)||!!t[Rl]||!!(!((e=t.constructor)===null||e===void 0)&&e[Rl])||Fn(t)||Mn(t))}function er(t,e,o){o===void 0&&(o=!1),Or(t)===0?(o?Object.keys:Sr)(t).forEach(function(n){o&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,i){return e(i,n,t)})}function Or(t){var e=t[X];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Fn(t)?2:Mn(t)?3:0}function vr(t,e){return Or(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function ud(t,e){return Or(t)===2?t.get(e):t[e]}function Nl(t,e,o){var n=Or(t);n===2?t.set(e,o):n===3?t.add(o):t[e]=o}function Ll(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function Fn(t){return gd&&t instanceof Map}function Mn(t){return bd&&t instanceof Set}function Lt(t){return t.o||t.t}function Un(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Pl(t);delete e[X];for(var o=Sr(e),n=0;n<o.length;n++){var i=o[n],a=e[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(e[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function Wn(t,e){return e===void 0&&(e=!1),zn(t)||mt(t)||!je(t)||(Or(t)>1&&(t.set=t.add=t.clear=t.delete=fd),Object.freeze(t),e&&er(t,function(o,n){return Wn(n,!0)},!0)),t}function fd(){Ue(2)}function zn(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function rt(t){var e=$n[t];return e||Ue(18,t),e}function hd(t,e){$n[t]||($n[t]=e)}function _n(){return Kr}function In(t,e){e&&(rt("Patches"),t.u=[],t.s=[],t.v=e)}function Lo(t){Dn(t),t.p.forEach(yd),t.p=null}function Dn(t){t===Kr&&(Kr=t.l)}function Sl(t){return Kr={p:[],l:Kr,h:t,m:!0,_:0}}function yd(t){var e=t[X];e.i===0||e.i===1?e.j():e.g=!0}function Tn(t,e){e._=e.p.length;var o=e.p[0],n=t!==void 0&&t!==o;return e.h.O||rt("ES5").S(e,t,n),n?(o[X].P&&(Lo(e),Ue(4)),je(t)&&(t=Io(e,t),e.l||To(e,t)),e.u&&rt("Patches").M(o[X].t,t,e.u,e.s)):t=Io(e,o,[]),Lo(e),e.u&&e.v(e.u,e.s),t!==Tl?t:void 0}function Io(t,e,o){if(zn(e))return e;var n=e[X];if(!n)return er(e,function(c,u){return Ol(t,n,e,c,u,o)},!0),e;if(n.A!==t)return e;if(!n.P)return To(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=Un(n.k):n.o,a=i,l=!1;n.i===3&&(a=new Set(i),i.clear(),l=!0),er(a,function(c,u){return Ol(t,n,i,c,u,o,l)}),To(t,i,!1),o&&t.u&&rt("Patches").N(n,o,t.u,t.s)}return n.o}function Ol(t,e,o,n,i,a,l){if(mt(i)){var c=Io(t,i,a&&e&&e.i!==3&&!vr(e.R,n)?a.concat(n):void 0);if(Nl(o,n,c),!mt(c))return;t.m=!1}else l&&o.add(i);if(je(i)&&!zn(i)){if(!t.h.D&&t._<1)return;Io(t,i),e&&e.A.l||To(t,i)}}function To(t,e,o){o===void 0&&(o=!1),!t.l&&t.h.D&&t.m&&Wn(e,o)}function Pn(t,e){var o=t[X];return(o?Lt(o):t)[e]}function Cl(t,e){if(e in t)for(var o=Object.getPrototypeOf(t);o;){var n=Object.getOwnPropertyDescriptor(o,e);if(n)return n;o=Object.getPrototypeOf(o)}}function It(t){t.P||(t.P=!0,t.l&&It(t.l))}function kn(t){t.o||(t.o=Un(t.t))}function Bn(t,e,o){var n=Fn(e)?rt("MapSet").F(e,o):Mn(e)?rt("MapSet").T(e,o):t.O?function(i,a){var l=Array.isArray(i),c={i:l?1:0,A:a?a.A:_n(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},u=c,p=Zr;l&&(u=[c],p=jr);var y=Proxy.revocable(u,p),h=y.revoke,b=y.proxy;return c.k=b,c.j=h,b}(e,o):rt("ES5").J(e,o);return(o?o.A:_n()).p.push(n),n}function md(t){return mt(t)||Ue(22,t),function e(o){if(!je(o))return o;var n,i=o[X],a=Or(o);if(i){if(!i.P&&(i.i<4||!rt("ES5").K(i)))return i.t;i.I=!0,n=El(o,a),i.I=!1}else n=El(o,a);return er(n,function(l,c){i&&ud(i.t,l)===c||Nl(n,l,e(c))}),a===3?new Set(n):n}(t)}function El(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Un(t)}function Il(){function t(l,c){var u=a[l];return u?u.enumerable=c:a[l]=u={configurable:!0,enumerable:c,get:function(){var p=this[X];return Zr.get(p,l)},set:function(p){var y=this[X];Zr.set(y,l,p)}},u}function e(l){for(var c=l.length-1;c>=0;c--){var u=l[c][X];if(!u.P)switch(u.i){case 5:n(u)&&It(u);break;case 4:o(u)&&It(u)}}}function o(l){for(var c=l.t,u=l.k,p=Sr(u),y=p.length-1;y>=0;y--){var h=p[y];if(h!==X){var b=c[h];if(b===void 0&&!vr(c,h))return!0;var S=u[h],v=S&&S[X];if(v?v.t!==b:!Ll(S,b))return!0}}var O=!!c[X];return p.length!==Sr(c).length+(O?0:1)}function n(l){var c=l.k;if(c.length!==l.t.length)return!0;var u=Object.getOwnPropertyDescriptor(c,c.length-1);if(u&&!u.get)return!0;for(var p=0;p<c.length;p++)if(!c.hasOwnProperty(p))return!0;return!1}function i(l){l.g&&Ue(3,JSON.stringify(Lt(l)))}var a={};hd("ES5",{J:function(l,c){var u=Array.isArray(l),p=function(h,b){if(h){for(var S=Array(b.length),v=0;v<b.length;v++)Object.defineProperty(S,""+v,t(v,!0));return S}var O=Pl(b);delete O[X];for(var T=Sr(O),N=0;N<T.length;N++){var L=T[N];O[L]=t(L,h||!!O[L].enumerable)}return Object.create(Object.getPrototypeOf(b),O)}(u,l),y={i:u?5:4,A:c?c.A:_n(),P:!1,I:!1,R:{},l:c,t:l,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,X,{value:y,writable:!0}),p},S:function(l,c,u){u?mt(c)&&c[X].A===l&&e(l.p):(l.u&&function p(y){if(y&&typeof y=="object"){var h=y[X];if(h){var b=h.t,S=h.k,v=h.R,O=h.i;if(O===4)er(S,function(B){B!==X&&(b[B]!==void 0||vr(b,B)?v[B]||p(S[B]):(v[B]=!0,It(h)))}),er(b,function(B){S[B]!==void 0||vr(S,B)||(v[B]=!1,It(h))});else if(O===5){if(n(h)&&(It(h),v.length=!0),S.length<b.length)for(var T=S.length;T<b.length;T++)v[T]=!1;else for(var N=b.length;N<S.length;N++)v[N]=!0;for(var L=Math.min(S.length,b.length),_=0;_<L;_++)S.hasOwnProperty(_)||(v[_]=!0),v[_]===void 0&&p(S[_])}}}}(l.p[0]),e(l.p))},K:function(l){return l.i===4?o(l):n(l)}})}var wl,Kr,Hn=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",gd=typeof Map<"u",bd=typeof Set<"u",Al=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Tl=Hn?Symbol.for("immer-nothing"):((wl={})["immer-nothing"]=!0,wl),Rl=Hn?Symbol.for("immer-draftable"):"__$immer_draftable",X=Hn?Symbol.for("immer-state"):"__$immer_state";var xd=""+Object.prototype.constructor,Sr=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Pl=Object.getOwnPropertyDescriptors||function(t){var e={};return Sr(t).forEach(function(o){e[o]=Object.getOwnPropertyDescriptor(t,o)}),e},$n={},Zr={get:function(t,e){if(e===X)return t;var o=Lt(t);if(!vr(o,e))return function(i,a,l){var c,u=Cl(a,l);return u?"value"in u?u.value:(c=u.get)===null||c===void 0?void 0:c.call(i.k):void 0}(t,o,e);var n=o[e];return t.I||!je(n)?n:n===Pn(t.t,e)?(kn(t),t.o[e]=Bn(t.A.h,n,t)):n},has:function(t,e){return e in Lt(t)},ownKeys:function(t){return Reflect.ownKeys(Lt(t))},set:function(t,e,o){var n=Cl(Lt(t),e);if(n?.set)return n.set.call(t.k,o),!0;if(!t.P){var i=Pn(Lt(t),e),a=i?.[X];if(a&&a.t===o)return t.o[e]=o,t.R[e]=!1,!0;if(Ll(o,i)&&(o!==void 0||vr(t.t,e)))return!0;kn(t),It(t)}return t.o[e]===o&&(o!==void 0||e in t.o)||Number.isNaN(o)&&Number.isNaN(t.o[e])||(t.o[e]=o,t.R[e]=!0),!0},deleteProperty:function(t,e){return Pn(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,kn(t),It(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var o=Lt(t),n=Reflect.getOwnPropertyDescriptor(o,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:o[e]}},defineProperty:function(){Ue(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Ue(12)}},jr={};er(Zr,function(t,e){jr[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),jr.deleteProperty=function(t,e){return jr.set.call(this,t,e,void 0)},jr.set=function(t,e,o){return Zr.set.call(this,t[0],e,o,t[0])};var vd=function(){function t(o){var n=this;this.O=Al,this.D=!0,this.produce=function(i,a,l){if(typeof i=="function"&&typeof a!="function"){var c=a;a=i;var u=n;return function(O){var T=this;O===void 0&&(O=c);for(var N=arguments.length,L=Array(N>1?N-1:0),_=1;_<N;_++)L[_-1]=arguments[_];return u.produce(O,function(B){var F;return(F=a).call.apply(F,[T,B].concat(L))})}}var p;if(typeof a!="function"&&Ue(6),l!==void 0&&typeof l!="function"&&Ue(7),je(i)){var y=Sl(n),h=Bn(n,i,void 0),b=!0;try{p=a(h),b=!1}finally{b?Lo(y):Dn(y)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(O){return In(y,l),Tn(O,y)},function(O){throw Lo(y),O}):(In(y,l),Tn(p,y))}if(!i||typeof i!="object"){if((p=a(i))===void 0&&(p=i),p===Tl&&(p=void 0),n.D&&Wn(p,!0),l){var S=[],v=[];rt("Patches").M(i,p,S,v),l(S,v)}return p}Ue(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(p){for(var y=arguments.length,h=Array(y>1?y-1:0),b=1;b<y;b++)h[b-1]=arguments[b];return n.produceWithPatches(p,function(S){return i.apply(void 0,[S].concat(h))})};var l,c,u=n.produce(i,a,function(p,y){l=p,c=y});return typeof Promise<"u"&&u instanceof Promise?u.then(function(p){return[p,l,c]}):[u,l,c]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var e=t.prototype;return e.createDraft=function(o){je(o)||Ue(8),mt(o)&&(o=md(o));var n=Sl(this),i=Bn(this,o,void 0);return i[X].C=!0,Dn(n),i},e.finishDraft=function(o,n){var i=o&&o[X],a=i.A;return In(a,n),Tn(void 0,a)},e.setAutoFreeze=function(o){this.D=o},e.setUseProxies=function(o){o&&!Al&&Ue(20),this.O=o},e.applyPatches=function(o,n){var i;for(i=n.length-1;i>=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){o=a.value;break}}i>-1&&(n=n.slice(i+1));var l=rt("Patches").$;return mt(o)?l(o,n):this.produce(o,function(c){return l(c,n)})},t}(),$e=new vd,Sd=$e.produce,vx=$e.produceWithPatches.bind($e),Sx=$e.setAutoFreeze.bind($e),Ox=$e.setUseProxies.bind($e),Cx=$e.applyPatches.bind($e),Ex=$e.createDraft.bind($e),wx=$e.finishDraft.bind($e),Po=Sd;function Tt(t){"@babel/helpers - typeof";return Tt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Tt(t)}function Gn(t,e){if(Tt(t)!=="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var n=o.call(t,e||"default");if(Tt(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Vn(t){var e=Gn(t,"string");return Tt(e)==="symbol"?e:String(e)}function jn(t,e,o){return e=Vn(e),e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function kl(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),o.push.apply(o,n)}return o}function ko(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?kl(Object(o),!0).forEach(function(n){jn(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):kl(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function me(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var _l=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Kn=function(){return Math.random().toString(36).substring(7).split("").join(".")},_o={INIT:"@@redux/INIT"+Kn(),REPLACE:"@@redux/REPLACE"+Kn(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Kn()}};function Od(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Zn(t,e,o){var n;if(typeof e=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(me(0));if(typeof e=="function"&&typeof o>"u"&&(o=e,e=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(me(1));return o(Zn)(t,e)}if(typeof t!="function")throw new Error(me(2));var i=t,a=e,l=[],c=l,u=!1;function p(){c===l&&(c=l.slice())}function y(){if(u)throw new Error(me(3));return a}function h(O){if(typeof O!="function")throw new Error(me(4));if(u)throw new Error(me(5));var T=!0;return p(),c.push(O),function(){if(T){if(u)throw new Error(me(6));T=!1,p();var L=c.indexOf(O);c.splice(L,1),l=null}}}function b(O){if(!Od(O))throw new Error(me(7));if(typeof O.type>"u")throw new Error(me(8));if(u)throw new Error(me(9));try{u=!0,a=i(a,O)}finally{u=!1}for(var T=l=c,N=0;N<T.length;N++){var L=T[N];L()}return O}function S(O){if(typeof O!="function")throw new Error(me(10));i=O,b({type:_o.REPLACE})}function v(){var O,T=h;return O={subscribe:function(L){if(typeof L!="object"||L===null)throw new Error(me(11));function _(){L.next&&L.next(y())}_();var B=T(_);return{unsubscribe:B}}},O[_l]=function(){return this},O}return b({type:_o.INIT}),n={dispatch:b,subscribe:h,getState:y,replaceReducer:S},n[_l]=v,n}function Cd(t){Object.keys(t).forEach(function(e){var o=t[e],n=o(void 0,{type:_o.INIT});if(typeof n>"u")throw new Error(me(12));if(typeof o(void 0,{type:_o.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(me(13))})}function Dl(t){for(var e=Object.keys(t),o={},n=0;n<e.length;n++){var i=e[n];typeof t[i]=="function"&&(o[i]=t[i])}var a=Object.keys(o),l,c;try{Cd(o)}catch(u){c=u}return function(p,y){if(p===void 0&&(p={}),c)throw c;if(0)var h;for(var b=!1,S={},v=0;v<a.length;v++){var O=a[v],T=o[O],N=p[O],L=T(N,y);if(typeof L>"u"){var _=y&&y.type;throw new Error(me(14))}S[O]=L,b=b||L!==N}return b=b||a.length!==Object.keys(p).length,b?S:p}}function Cr(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return e.length===0?function(n){return n}:e.length===1?e[0]:e.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function Bl(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),a=function(){throw new Error(me(15))},l={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},c=e.map(function(u){return u(l)});return a=Cr.apply(void 0,c)(i.dispatch),ko(ko({},i),{},{dispatch:a})}}}function $l(t){var e=function(n){var i=n.dispatch,a=n.getState;return function(l){return function(c){return typeof c=="function"?c(i,a,t):l(c)}}};return e}var Fl=$l();Fl.withExtraArgument=$l;var qn=Fl;var Hl=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,o)};return function(e,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");t(e,o);function n(){this.constructor=e}e.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),Ed=function(t,e){var o={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,l;return l={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function c(p){return function(y){return u([p,y])}}function u(p){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(a=p[0]&2?i.return:p[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,p[1])).done)return a;switch(i=0,a&&(p=[p[0]&2,a.value]),p[0]){case 0:case 1:a=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,i=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!(a=a.length>0&&a[a.length-1])&&(p[0]===6||p[0]===2)){o=0;continue}if(p[0]===3&&(!a||p[1]>a[0]&&p[1]<a[3])){o.label=p[1];break}if(p[0]===6&&o.label<a[1]){o.label=a[1],a=p;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(p);break}a[2]&&o.ops.pop(),o.trys.pop();continue}p=e.call(t,o)}catch(y){p=[6,y],i=0}finally{n=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Er=function(t,e){for(var o=0,n=e.length,i=t.length;o<n;o++,i++)t[i]=e[o];return t},wd=Object.defineProperty,Ad=Object.defineProperties,Rd=Object.getOwnPropertyDescriptors,Ml=Object.getOwnPropertySymbols,Nd=Object.prototype.hasOwnProperty,Ld=Object.prototype.propertyIsEnumerable,Ul=function(t,e,o){return e in t?wd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o},Pt=function(t,e){for(var o in e||(e={}))Nd.call(e,o)&&Ul(t,o,e[o]);if(Ml)for(var n=0,i=Ml(e);n<i.length;n++){var o=i[n];Ld.call(e,o)&&Ul(t,o,e[o])}return t},Yn=function(t,e){return Ad(t,Rd(e))},Id=function(t,e,o){return new Promise(function(n,i){var a=function(u){try{c(o.next(u))}catch(p){i(p)}},l=function(u){try{c(o.throw(u))}catch(p){i(p)}},c=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(a,l)};c((o=o.apply(t,e)).next())})};var Td=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Cr:Cr.apply(null,arguments)},Hx=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function Pd(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var o=e;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return e===o}var kd=function(t){Hl(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},e.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(e.bind.apply(e,Er([void 0],o[0].concat(this)))):new(e.bind.apply(e,Er([void 0],o.concat(this))))},e}(Array),_d=function(t){Hl(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},e.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(e.bind.apply(e,Er([void 0],o[0].concat(this)))):new(e.bind.apply(e,Er([void 0],o.concat(this))))},e}(Array);function Jn(t){return je(t)?Po(t,function(){}):t}function Dd(t){return typeof t=="boolean"}function Bd(){return function(e){return $d(e)}}function $d(t){t===void 0&&(t={});var e=t.thunk,o=e===void 0?!0:e,n=t.immutableCheck,i=n===void 0?!0:n,a=t.serializableCheck,l=a===void 0?!0:a,c=new kd;if(o&&(Dd(o)?c.push(qn):c.push(qn.withExtraArgument(o.extraArgument))),0){if(i)var u;if(l)var p}return c}var Xn=!0;function Gl(t){var e=Bd(),o=t||{},n=o.reducer,i=n===void 0?void 0:n,a=o.middleware,l=a===void 0?e():a,c=o.devTools,u=c===void 0?!0:c,p=o.preloadedState,y=p===void 0?void 0:p,h=o.enhancers,b=h===void 0?void 0:h,S;if(typeof i=="function")S=i;else if(Pd(i))S=Dl(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 v=l;if(typeof v=="function"&&(v=v(e),!Xn&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Xn&&v.some(function(B){return typeof B!="function"}))throw new Error("each middleware provided to configureStore must be a function");var O=Bl.apply(void 0,v),T=Cr;u&&(T=Td(Pt({trace:!Xn},typeof u=="object"&&u)));var N=new _d(O),L=N;Array.isArray(b)?L=Er([O],b):typeof b=="function"&&(L=b(N));var _=T.apply(void 0,L);return Zn(S,y,_)}function kt(t,e){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(e){var a=e.apply(void 0,n);if(!a)throw new Error("prepareAction did not return an object");return Pt(Pt({type:t,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:t,payload:n[0]}}return o.toString=function(){return""+t},o.type=t,o.match=function(n){return n.type===t},o}function Vl(t){var e={},o=[],n,i={addCase:function(a,l){var c=typeof a=="string"?a:a.type;if(c in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[c]=l,i},addMatcher:function(a,l){return o.push({matcher:a,reducer:l}),i},addDefaultCase:function(a){return n=a,i}};return t(i),[e,o,n]}function Fd(t){return typeof t=="function"}function Md(t,e,o,n){o===void 0&&(o=[]);var i=typeof e=="function"?Vl(e):[e,o,n],a=i[0],l=i[1],c=i[2],u;if(Fd(t))u=function(){return Jn(t())};else{var p=Jn(t);u=function(){return p}}function y(h,b){h===void 0&&(h=u());var S=Er([a[b.type]],l.filter(function(v){var O=v.matcher;return O(b)}).map(function(v){var O=v.reducer;return O}));return S.filter(function(v){return!!v}).length===0&&(S=[c]),S.reduce(function(v,O){if(O)if(mt(v)){var T=v,N=O(T,b);return N===void 0?v:N}else{if(je(v))return Po(v,function(L){return O(L,b)});var N=O(v,b);if(N===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return N}return v},h)}return y.getInitialState=u,y}function Ud(t,e){return t+"/"+e}function jl(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof t.initialState=="function"?t.initialState:Jn(t.initialState),n=t.reducers||{},i=Object.keys(n),a={},l={},c={};i.forEach(function(y){var h=n[y],b=Ud(e,y),S,v;"reducer"in h?(S=h.reducer,v=h.prepare):S=h,a[y]=S,l[b]=S,c[y]=v?kt(b,v):kt(b)});function u(){var y=typeof t.extraReducers=="function"?Vl(t.extraReducers):[t.extraReducers],h=y[0],b=h===void 0?{}:h,S=y[1],v=S===void 0?[]:S,O=y[2],T=O===void 0?void 0:O,N=Pt(Pt({},b),l);return Md(o,function(L){for(var _ in N)L.addCase(_,N[_]);for(var B=0,F=v;B<F.length;B++){var Oe=F[B];L.addMatcher(Oe.matcher,Oe.reducer)}T&&L.addDefaultCase(T)})}var p;return{name:e,reducer:function(y,h){return p||(p=u()),p(y,h)},actions:c,caseReducers:a,getInitialState:function(){return p||(p=u()),p.getInitialState()}}}var Wd="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",zd=function(t){t===void 0&&(t=21);for(var e="",o=t;o--;)e+=Wd[Math.random()*64|0];return e},Hd=["name","message","stack","code"],Qn=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Wl=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Gd=function(t){if(typeof t=="object"&&t!==null){for(var e={},o=0,n=Hd;o<n.length;o++){var i=n[o];typeof t[i]=="string"&&(e[i]=t[i])}return e}return{message:String(t)}},Kx=function(){function t(e,o,n){var i=kt(e+"/fulfilled",function(y,h,b,S){return{payload:y,meta:Yn(Pt({},S||{}),{arg:b,requestId:h,requestStatus:"fulfilled"})}}),a=kt(e+"/pending",function(y,h,b){return{payload:void 0,meta:Yn(Pt({},b||{}),{arg:h,requestId:y,requestStatus:"pending"})}}),l=kt(e+"/rejected",function(y,h,b,S,v){return{payload:S,error:(n&&n.serializeError||Gd)(y||"Rejected"),meta:Yn(Pt({},v||{}),{arg:b,requestId:h,rejectedWithValue:!!S,requestStatus:"rejected",aborted:y?.name==="AbortError",condition:y?.name==="ConditionError"})}}),c=!1,u=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 p(y){return function(h,b,S){var v=n?.idGenerator?n.idGenerator(y):zd(),O=new u,T,N=!1;function L(B){T=B,O.abort()}var _=function(){return Id(this,null,function(){var B,F,Oe,qe,ge,Ye,pe;return Ed(this,function(m){switch(m.label){case 0:return m.trys.push([0,4,,5]),qe=(B=n?.condition)==null?void 0:B.call(n,y,{getState:b,extra:S}),jd(qe)?[4,qe]:[3,2];case 1:qe=m.sent(),m.label=2;case 2:if(qe===!1||O.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return N=!0,ge=new Promise(function(x,P){return O.signal.addEventListener("abort",function(){return P({name:"AbortError",message:T||"Aborted"})})}),h(a(v,y,(F=n?.getPendingMeta)==null?void 0:F.call(n,{requestId:v,arg:y},{getState:b,extra:S}))),[4,Promise.race([ge,Promise.resolve(o(y,{dispatch:h,getState:b,extra:S,requestId:v,signal:O.signal,abort:L,rejectWithValue:function(x,P){return new Qn(x,P)},fulfillWithValue:function(x,P){return new Wl(x,P)}})).then(function(x){if(x instanceof Qn)throw x;return x instanceof Wl?i(x.payload,v,y,x.meta):i(x,v,y)})])];case 3:return Oe=m.sent(),[3,5];case 4:return Ye=m.sent(),Oe=Ye instanceof Qn?l(null,v,y,Ye.payload,Ye.meta):l(Ye,v,y),[3,5];case 5:return pe=n&&!n.dispatchConditionRejection&&l.match(Oe)&&Oe.meta.condition,pe||h(Oe),[2,Oe]}})})}();return Object.assign(_,{abort:L,requestId:v,arg:y,unwrap:function(){return _.then(Vd)}})}}return Object.assign(p,{pending:a,rejected:l,fulfilled:i,typePrefix:e})}return t.withTypes=function(){return t},t}();function Vd(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function jd(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Kl="listener",Zl="completed",ql="cancelled",Zx="task-"+ql,qx="task-"+Zl,Yx=Kl+"-"+ql,Xx=Kl+"-"+Zl;var ea="listenerMiddleware";var Qx=kt(ea+"/add"),Jx=kt(ea+"/removeAll"),ev=kt(ea+"/remove");var zl,tv=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(zl||(zl=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},Kd=function(t){return function(e){setTimeout(e,t)}},rv=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Kd(10);Il();function Zd(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??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 Do=class extends Zd(Object){};window.ftReduxStores||(window.ftReduxStores={});var Yl=class t extends Do{static get(e){var o;let n=typeof e=="string"?e:e.name,i=typeof e=="string"?void 0:e,a=window.ftReduxStores[n];if(Hr(a))return a;if(i==null)return;let l=jl({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),c=Gl({reducer:(u,p)=>p.type==="CLEAR_FT_REDUX_STORE"?l.getInitialState():typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__")?{...u,...p.overwrites}:l.reducer(u,p)});return window.ftReduxStores[i.name]=new t(l,c)}constructor(e,o){super(),this.reduxSlice=e,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new Eo;let n=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,a,l)=>{let c=a,u=i[c];return u?(...p)=>{let y=u(...p.map(n));return this.reduxStore.dispatch(y),y}:p=>{this.setState({[c]:n(p)})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}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(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var Mo=g(I());var Bo=class extends yt{async listMySearches(){let e=k.getState().session;return e?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var $o=class extends yt{async listMyBookmarks(){let e=k.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var Yd="ft-user-assets",Fo=Mo.FtReduxStore.get({name:Yd,initialState:{savedSearches:void 0,bookmarks:void 0}}),ta=class{constructor(){this.currentSession=k.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new $o,this.savedSearchesService=new Bo,k.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:o}=k.getState();(0,Mo.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Fo.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Fo.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Fo.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let o=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Fo.actions.bookmarks(o)}}},$v=new ta;var ra=class{addCommand(e,o=!1){k.commands.add(e,o)}consumeCommand(e){return k.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new ra;var Xl=g(I()),oa=class{highlightHtml(e,o,n){(0,Xl.highlightHtml)(e,o,n)}};window.FluidTopicsHighlightHtmlService=new oa;var Ql=g(I());var na=class{isDate(e){var o,n,i,a;return(a=(i=((n=(o=k.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(c=>c.key===e))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1}format(e,o){var n,i,a;return Ql.DateFormatter.format(e,(n=o?.locale)!==null&&n!==void 0?n:k.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(a=o?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new na;var Xd=g(I());(0,Jl.customElement)("ft-app-context")(ee);var tc=g(K()),Qd=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(l=t[c])&&(a=(i<3?l(a):i>3?l(e,o,a):l(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},aa=Symbol("i18nAttributes"),ia=Symbol("i18nListAttributes"),Uo=Symbol("i18nProperties"),sa=Symbol("i18nManualContexts"),qr=Symbol("i18nUnsubs");function Ho(t){var e,o;class n extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[o]=new Map}get i18nService(){return this.useCustomMessageContexts?sl:Qt}i18n(a,l,...c){var u;if(typeof a=="string")return this.i18nService.resolveMessage(a,l,...c);let p=(u=a.args)!==null&&u!==void 0?u:a.argsProvider?a.argsProvider(this):[];return this.i18nService.resolveMessage(a.context,a.key,...p)}onI18nUpdate(a){var l,c,u;(l=this[aa])===null||l===void 0||l.forEach((p,y)=>{let h=this.getI18nAttributeValue(y);h&&(this[y]=this.getI18nAttributeMessage(h,p,a))}),(c=this[ia])===null||c===void 0||c.forEach((p,y)=>{let h=this.getI18nListAttributeValues(y);this[y]=h?.map(b=>this.getI18nAttributeMessage(b,p,a))}),(u=this[Uo])===null||u===void 0||u.forEach((p,y)=>{p.context.toLowerCase()===a.toLowerCase()&&(this[y]=this.i18n(p))}),setTimeout(()=>this.requestUpdate(),0)}buildI18nAttributeMessage(a,l){return{...a,message:this.i18n({context:a.context,key:a.key,...l})}}getI18nAttributeMessage(a,l,c){var u;let p=!c||((u=a.context)===null||u===void 0?void 0:u.toLowerCase())===c.toLowerCase();return a.context&&a.key&&p?this.buildI18nAttributeMessage(a,l):a}update(a){var l,c,u;super.update(a),(l=this[aa])===null||l===void 0||l.forEach((p,y)=>{let h=this.getI18nAttributeValue(y);h?.context&&h.key&&(a.has(y)||p.argsProvider!=null)&&(this.addI18nContextIfNeeded(h,a,y),this[y]=this.getI18nAttributeMessage(h,p))}),(c=this[ia])===null||c===void 0||c.forEach((p,y)=>{let h=this.getI18nListAttributeValues(y);(a.has(y)||p.argsProvider!=null)&&(this[y]=h?.map(b=>(this.addI18nContextIfNeeded(b,a,y),this.getI18nAttributeMessage(b,p))))}),(u=this[Uo])===null||u===void 0||u.forEach((p,y)=>{p.argsProvider!=null&&(this[y]=this.i18n(p))})}getI18nAttributeValue(a){return this[a]}getI18nListAttributeValues(a){return this[a]}addI18nContextIfNeeded(a,l,c){a.context&&a.key&&l.has(c)&&this.addI18nContext(a.context)}addI18nMessagesAndSubscribe(a,l){a=a.toLowerCase(),this[qr].has(a)||this[qr].set(a,this.i18nService.subscribe(a,()=>this.onI18nUpdate(a))),this.i18nService.prepareContext(a,l??{}),this.onI18nUpdate(a)}connectedCallback(){var a,l,c,u,p,y;super.connectedCallback(),new Set([...(l=(a=this[Uo])===null||a===void 0?void 0:a.values())!==null&&l!==void 0?l:[],...[...(u=(c=this[aa])===null||c===void 0?void 0:c.keys())!==null&&u!==void 0?u:[]].map(h=>this.getI18nAttributeValue(h)),...[...(y=(p=this[ia])===null||p===void 0?void 0:p.keys())!==null&&y!==void 0?y:[]].flatMap(h=>this.getI18nListAttributeValues(h))].map(h=>h?.context)).forEach(h=>h&&this.addI18nMessages(h)),this[sa].forEach((h,b)=>{this.addI18nMessages(b,h)})}addI18nMessages(a,l){this[sa].set(a,l??{}),this.addI18nMessagesAndSubscribe(a,l)}addI18nContext(a,l){this.addI18nMessages(typeof a=="string"?a:a.name,l)}disconnectedCallback(){super.disconnectedCallback(),this[qr].forEach(a=>a()),this[qr].clear()}}return e=sa,o=qr,Qd([(0,tc.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}var ec=class extends Ho(zo.FtLitElement){},Wo=class extends Ho(zo.FtLitElementRedux){};var Yr=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(l=t[c])&&(a=(i<3?l(a):i>3?l(e,o,a):l(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},Ke=class extends Wo{constructor(){super(),this.editorMode=!1,this.addStore(k)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Go.nothing:Go.html`
1810
+ `}update(e){var o,n,i,a,l;super.update(e),e.has("baseUrl")&&(k.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&k.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("uiLocale")&&k.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&k.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&k.actions.noCustom(this.noCustom),e.has("editorMode")&&k.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&k.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&k.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(c=>Qt.addContext(c)),e.has("openExternalDocumentInNewTab")&&k.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&k.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&k.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(k.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),k.actions.availableUiLocales((i=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&i!==void 0?i:[]),k.actions.searchInAllLanguagesAllowed((l=(a=this.localesConfiguration)===null||a===void 0?void 0:a.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 e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}};ee.elementDefinitions={};ee.styles=al;ye([(0,Ie.property)()],ee.prototype,"baseUrl",void 0);ye([(0,Ie.property)()],ee.prototype,"apiIntegrationIdentifier",void 0);ye([(0,Ie.property)()],ee.prototype,"uiLocale",void 0);ye([(0,Ve.jsonProperty)(null)],ee.prototype,"availableUiLocales",void 0);ye([(0,Ve.jsonProperty)(null)],ee.prototype,"metadataConfiguration",void 0);ye([(0,Ie.property)({type:Boolean})],ee.prototype,"editorMode",void 0);ye([(0,Ie.property)({type:Boolean})],ee.prototype,"noCustom",void 0);ye([(0,Ie.property)({type:Boolean})],ee.prototype,"openExternalDocumentInNewTab",void 0);ye([(0,Ie.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],ee.prototype,"noCustomComponent",void 0);ye([(0,Ie.property)({type:Boolean})],ee.prototype,"withManualResources",void 0);ye([(0,Ie.property)({type:Boolean})],ee.prototype,"navigatorOnline",void 0);ye([(0,Ie.property)({type:Boolean})],ee.prototype,"forcedOffline",void 0);ye([(0,Ie.property)({type:Object})],ee.prototype,"apiProvider",void 0);ye([(0,Ve.jsonProperty)([])],ee.prototype,"messageContexts",void 0);ye([(0,Ve.jsonProperty)(void 0)],ee.prototype,"session",void 0);ye([(0,Ie.state)()],ee.prototype,"localesConfiguration",void 0);var qd=g(K());function cd(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var o,n,i;if(Array.isArray(t)){if(o=t.length,o!=e.length)return!1;for(n=o;n--!==0;)if(!Oo(t[n],e[n]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;for(n of t.entries())if(!Oo(n[1],e.get(n[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let a=l=>Object.keys(l).filter(c=>l[c]!=null);if(i=a(t),o=i.length,o!==a(e).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[n]))return!1;for(n=o;n--!==0;){let l=i[n];if(!Oo(t[l],e[l]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function Oo(t,e){try{return cd(t,e)}catch{return!1}}function Co(t,e){return!Oo(t,e)}var dd=g(K(),1);var Eo=class{constructor(){this.queue=[]}add(e,o=!1){o&&(this.queue=this.queue.filter(n=>n.type!==e.type)),this.queue.push(e)}consume(e){let o=this.queue.find(n=>n.type===e);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}};var zr=g(K(),1);var cl=g(K(),1);function dl(t,e){let o=()=>JSON.parse(JSON.stringify(t));return(0,cl.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:Co,...e??{}})}var wo=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,o){return this.callbacks=[e],this.debounce(o)}queue(e,o){return this.callbacks.push(e),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,o;let n=[...this.callbacks];this.callbacks=[];let i=(e=this.rejectPromise)!==null&&e!==void 0?e:()=>null,a=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let l of n)try{await l()}catch(c){i(c);return}a(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var ul=g($(),1);var Ao=window,pd=Ao.ShadowRoot&&(Ao.ShadyCSS===void 0||Ao.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,lx=Symbol();var pl=(t,e)=>{pd?t.adoptedStyleSheets=e.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet):e.forEach(o=>{let n=document.createElement("style"),i=Ao.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,t.appendChild(n)})};var Ro=class extends ul.LitElement{createRenderRoot(){let e=this.constructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,Object.entries(e.elementDefinitions).forEach(([i,a])=>e.registry.define(i,a)));let o={...e.shadowRootOptions,customElements:e.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return pl(n,e.elementStyles),n}};var No=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(l=t[c])&&(a=(i<3?l(a):i>3?l(e,o,a):l(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},ml,fl=Symbol("constructorPrototype"),hl=Symbol("constructorName"),gl=Symbol("exportpartsDebouncer"),yl=Symbol("dynamicDependenciesLoaded"),Rt=class extends Ro{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[ml]=new wo(5),this[hl]=this.constructor.name,this[fl]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[hl]&&Object.setPrototypeOf(this,this[fl])}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 e=this.constructor;e[yl]||(e[yl]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate()})}contentAvailableCallback(e){}applyCustomStylesheet(e){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(a=>a.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(a){console.error(a,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let a=document.createElement("style");a.classList.add("ft-lit-element--custom-stylesheet"),a.innerHTML=this.customStylesheet,this.shadowRoot.append(a)}}scheduleExportpartsUpdate(){var e,o,n;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[gl].run(()=>{var i,a;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((a=this.exportpartsPrefixes)===null||a===void 0?void 0:a.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(e){var o,n,i,a,l,c;let u=b=>b!=null&&b.trim().length>0,p=e.filter(u).map(b=>b.trim());if(p.length===0){this.removeAttribute("exportparts");return}let y=new Set;for(let b of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let S=(a=(i=b.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&a!==void 0?a:[],v=(c=(l=b.getAttribute("exportparts"))===null||l===void 0?void 0:l.split(",").map(O=>O.split(":")[1]))!==null&&c!==void 0?c:[];new Array(...S,...v).filter(u).map(O=>O.trim()).forEach(O=>y.add(O))}if(y.size===0){this.removeAttribute("exportparts");return}let h=[...y.values()].flatMap(b=>p.map(S=>`${b}:${S}--${b}`));this.setAttribute("exportparts",[...this.part,...h].join(", "))}};ml=gl;No([(0,zr.property)()],Rt.prototype,"exportpartsPrefix",void 0);No([dl([])],Rt.prototype,"exportpartsPrefixes",void 0);No([(0,zr.property)()],Rt.prototype,"customStylesheet",void 0);No([(0,zr.state)()],Rt.prototype,"useAdoptedStyleSheets",void 0);function Hr(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var bl,xl,vl,Gr=Symbol("internalReduxEventsUnsubscribers"),Nt=Symbol("internalStoresUnsubscribers"),Jt=Symbol("internalStores"),Vr=class extends Rt{constructor(){super(...arguments),this[bl]=new Map,this[xl]=new Map,this[vl]=new Map}get reduxConstructor(){return this.constructor}update(e){super.update(e),[...this.reduxConstructor.reduxReactiveProperties].some(o=>e.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[Jt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Jt].values()][0]}getStore(e){return e==null?this.getUnnamedStore():this[Jt].get(e)}addStore(e,o){var n;o=(n=o??(Hr(e)?e.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this[Jt].set(o,e),this.subscribeToStore(o,e),this.updateFromStores()}removeStore(e){let o=typeof e=="string"?e:e.name;this.unsubscribeFromStore(o),this[Jt].delete(o)}setupStores(){this.unsubscribeFromStores(),this[Jt].forEach((e,o)=>this.subscribeToStore(o,e)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((e,o)=>{let n=this.constructor.getPropertyOptions(o);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:o)){let i=this.getStore(e.store);i&&(e.store?this[Nt].has(e.store):this[Nt].size>0)&&(this[o]=e.selector(i.getState(),this))}})}subscribeToStore(e,o){var n;this[Nt].set(e,o.subscribe(()=>this.updateFromStores())),this[Gr].set(e,[]),Hr(o)&&o.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((i,a)=>{if(typeof this[a]=="function"&&(!i.store||o.name===i.store)){let l=c=>this[a](c);o.addEventListener(i.eventName,l),this[Gr].get(e).push(()=>o.removeEventListener(i.eventName,l))}})),this.onStoreAvailable(e)}unsubscribeFromStores(){this[Nt].forEach((e,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(e){var o;this[Nt].has(e)&&this[Nt].get(e)(),this[Nt].delete(e),(o=this[Gr].get(e))===null||o===void 0||o.forEach(n=>n()),this[Gr].delete(e)}onStoreAvailable(e){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};bl=Nt,xl=Jt,vl=Gr;Vr.reduxProperties=new Map;Vr.reduxReactiveProperties=new Set;Vr.reduxEventListeners=new Map;function Ue(t){for(var e=arguments.length,o=Array(e>1?e-1:0),n=1;n<e;n++)o[n-1]=arguments[n];if(0)var i,a;throw Error("[Immer] minified error nr: "+t+(o.length?" "+o.map(function(l){return"'"+l+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function mt(t){return!!t&&!!t[X]}function je(t){var e;return!!t&&(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)===xd}(t)||Array.isArray(t)||!!t[Rl]||!!(!((e=t.constructor)===null||e===void 0)&&e[Rl])||Fn(t)||Mn(t))}function er(t,e,o){o===void 0&&(o=!1),Or(t)===0?(o?Object.keys:Sr)(t).forEach(function(n){o&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,i){return e(i,n,t)})}function Or(t){var e=t[X];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Fn(t)?2:Mn(t)?3:0}function vr(t,e){return Or(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function ud(t,e){return Or(t)===2?t.get(e):t[e]}function Nl(t,e,o){var n=Or(t);n===2?t.set(e,o):n===3?t.add(o):t[e]=o}function Ll(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function Fn(t){return gd&&t instanceof Map}function Mn(t){return bd&&t instanceof Set}function Lt(t){return t.o||t.t}function Un(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Pl(t);delete e[X];for(var o=Sr(e),n=0;n<o.length;n++){var i=o[n],a=e[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(e[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function Wn(t,e){return e===void 0&&(e=!1),zn(t)||mt(t)||!je(t)||(Or(t)>1&&(t.set=t.add=t.clear=t.delete=fd),Object.freeze(t),e&&er(t,function(o,n){return Wn(n,!0)},!0)),t}function fd(){Ue(2)}function zn(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function rt(t){var e=$n[t];return e||Ue(18,t),e}function hd(t,e){$n[t]||($n[t]=e)}function _n(){return Kr}function In(t,e){e&&(rt("Patches"),t.u=[],t.s=[],t.v=e)}function Lo(t){Dn(t),t.p.forEach(yd),t.p=null}function Dn(t){t===Kr&&(Kr=t.l)}function Sl(t){return Kr={p:[],l:Kr,h:t,m:!0,_:0}}function yd(t){var e=t[X];e.i===0||e.i===1?e.j():e.g=!0}function Tn(t,e){e._=e.p.length;var o=e.p[0],n=t!==void 0&&t!==o;return e.h.O||rt("ES5").S(e,t,n),n?(o[X].P&&(Lo(e),Ue(4)),je(t)&&(t=Io(e,t),e.l||To(e,t)),e.u&&rt("Patches").M(o[X].t,t,e.u,e.s)):t=Io(e,o,[]),Lo(e),e.u&&e.v(e.u,e.s),t!==Tl?t:void 0}function Io(t,e,o){if(zn(e))return e;var n=e[X];if(!n)return er(e,function(c,u){return Ol(t,n,e,c,u,o)},!0),e;if(n.A!==t)return e;if(!n.P)return To(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=Un(n.k):n.o,a=i,l=!1;n.i===3&&(a=new Set(i),i.clear(),l=!0),er(a,function(c,u){return Ol(t,n,i,c,u,o,l)}),To(t,i,!1),o&&t.u&&rt("Patches").N(n,o,t.u,t.s)}return n.o}function Ol(t,e,o,n,i,a,l){if(mt(i)){var c=Io(t,i,a&&e&&e.i!==3&&!vr(e.R,n)?a.concat(n):void 0);if(Nl(o,n,c),!mt(c))return;t.m=!1}else l&&o.add(i);if(je(i)&&!zn(i)){if(!t.h.D&&t._<1)return;Io(t,i),e&&e.A.l||To(t,i)}}function To(t,e,o){o===void 0&&(o=!1),!t.l&&t.h.D&&t.m&&Wn(e,o)}function Pn(t,e){var o=t[X];return(o?Lt(o):t)[e]}function Cl(t,e){if(e in t)for(var o=Object.getPrototypeOf(t);o;){var n=Object.getOwnPropertyDescriptor(o,e);if(n)return n;o=Object.getPrototypeOf(o)}}function It(t){t.P||(t.P=!0,t.l&&It(t.l))}function kn(t){t.o||(t.o=Un(t.t))}function Bn(t,e,o){var n=Fn(e)?rt("MapSet").F(e,o):Mn(e)?rt("MapSet").T(e,o):t.O?function(i,a){var l=Array.isArray(i),c={i:l?1:0,A:a?a.A:_n(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},u=c,p=Zr;l&&(u=[c],p=jr);var y=Proxy.revocable(u,p),h=y.revoke,b=y.proxy;return c.k=b,c.j=h,b}(e,o):rt("ES5").J(e,o);return(o?o.A:_n()).p.push(n),n}function md(t){return mt(t)||Ue(22,t),function e(o){if(!je(o))return o;var n,i=o[X],a=Or(o);if(i){if(!i.P&&(i.i<4||!rt("ES5").K(i)))return i.t;i.I=!0,n=El(o,a),i.I=!1}else n=El(o,a);return er(n,function(l,c){i&&ud(i.t,l)===c||Nl(n,l,e(c))}),a===3?new Set(n):n}(t)}function El(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Un(t)}function Il(){function t(l,c){var u=a[l];return u?u.enumerable=c:a[l]=u={configurable:!0,enumerable:c,get:function(){var p=this[X];return Zr.get(p,l)},set:function(p){var y=this[X];Zr.set(y,l,p)}},u}function e(l){for(var c=l.length-1;c>=0;c--){var u=l[c][X];if(!u.P)switch(u.i){case 5:n(u)&&It(u);break;case 4:o(u)&&It(u)}}}function o(l){for(var c=l.t,u=l.k,p=Sr(u),y=p.length-1;y>=0;y--){var h=p[y];if(h!==X){var b=c[h];if(b===void 0&&!vr(c,h))return!0;var S=u[h],v=S&&S[X];if(v?v.t!==b:!Ll(S,b))return!0}}var O=!!c[X];return p.length!==Sr(c).length+(O?0:1)}function n(l){var c=l.k;if(c.length!==l.t.length)return!0;var u=Object.getOwnPropertyDescriptor(c,c.length-1);if(u&&!u.get)return!0;for(var p=0;p<c.length;p++)if(!c.hasOwnProperty(p))return!0;return!1}function i(l){l.g&&Ue(3,JSON.stringify(Lt(l)))}var a={};hd("ES5",{J:function(l,c){var u=Array.isArray(l),p=function(h,b){if(h){for(var S=Array(b.length),v=0;v<b.length;v++)Object.defineProperty(S,""+v,t(v,!0));return S}var O=Pl(b);delete O[X];for(var T=Sr(O),N=0;N<T.length;N++){var L=T[N];O[L]=t(L,h||!!O[L].enumerable)}return Object.create(Object.getPrototypeOf(b),O)}(u,l),y={i:u?5:4,A:c?c.A:_n(),P:!1,I:!1,R:{},l:c,t:l,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,X,{value:y,writable:!0}),p},S:function(l,c,u){u?mt(c)&&c[X].A===l&&e(l.p):(l.u&&function p(y){if(y&&typeof y=="object"){var h=y[X];if(h){var b=h.t,S=h.k,v=h.R,O=h.i;if(O===4)er(S,function(B){B!==X&&(b[B]!==void 0||vr(b,B)?v[B]||p(S[B]):(v[B]=!0,It(h)))}),er(b,function(B){S[B]!==void 0||vr(S,B)||(v[B]=!1,It(h))});else if(O===5){if(n(h)&&(It(h),v.length=!0),S.length<b.length)for(var T=S.length;T<b.length;T++)v[T]=!1;else for(var N=b.length;N<S.length;N++)v[N]=!0;for(var L=Math.min(S.length,b.length),_=0;_<L;_++)S.hasOwnProperty(_)||(v[_]=!0),v[_]===void 0&&p(S[_])}}}}(l.p[0]),e(l.p))},K:function(l){return l.i===4?o(l):n(l)}})}var wl,Kr,Hn=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",gd=typeof Map<"u",bd=typeof Set<"u",Al=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Tl=Hn?Symbol.for("immer-nothing"):((wl={})["immer-nothing"]=!0,wl),Rl=Hn?Symbol.for("immer-draftable"):"__$immer_draftable",X=Hn?Symbol.for("immer-state"):"__$immer_state";var xd=""+Object.prototype.constructor,Sr=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Pl=Object.getOwnPropertyDescriptors||function(t){var e={};return Sr(t).forEach(function(o){e[o]=Object.getOwnPropertyDescriptor(t,o)}),e},$n={},Zr={get:function(t,e){if(e===X)return t;var o=Lt(t);if(!vr(o,e))return function(i,a,l){var c,u=Cl(a,l);return u?"value"in u?u.value:(c=u.get)===null||c===void 0?void 0:c.call(i.k):void 0}(t,o,e);var n=o[e];return t.I||!je(n)?n:n===Pn(t.t,e)?(kn(t),t.o[e]=Bn(t.A.h,n,t)):n},has:function(t,e){return e in Lt(t)},ownKeys:function(t){return Reflect.ownKeys(Lt(t))},set:function(t,e,o){var n=Cl(Lt(t),e);if(n?.set)return n.set.call(t.k,o),!0;if(!t.P){var i=Pn(Lt(t),e),a=i?.[X];if(a&&a.t===o)return t.o[e]=o,t.R[e]=!1,!0;if(Ll(o,i)&&(o!==void 0||vr(t.t,e)))return!0;kn(t),It(t)}return t.o[e]===o&&(o!==void 0||e in t.o)||Number.isNaN(o)&&Number.isNaN(t.o[e])||(t.o[e]=o,t.R[e]=!0),!0},deleteProperty:function(t,e){return Pn(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,kn(t),It(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var o=Lt(t),n=Reflect.getOwnPropertyDescriptor(o,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:o[e]}},defineProperty:function(){Ue(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Ue(12)}},jr={};er(Zr,function(t,e){jr[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),jr.deleteProperty=function(t,e){return jr.set.call(this,t,e,void 0)},jr.set=function(t,e,o){return Zr.set.call(this,t[0],e,o,t[0])};var vd=function(){function t(o){var n=this;this.O=Al,this.D=!0,this.produce=function(i,a,l){if(typeof i=="function"&&typeof a!="function"){var c=a;a=i;var u=n;return function(O){var T=this;O===void 0&&(O=c);for(var N=arguments.length,L=Array(N>1?N-1:0),_=1;_<N;_++)L[_-1]=arguments[_];return u.produce(O,function(B){var F;return(F=a).call.apply(F,[T,B].concat(L))})}}var p;if(typeof a!="function"&&Ue(6),l!==void 0&&typeof l!="function"&&Ue(7),je(i)){var y=Sl(n),h=Bn(n,i,void 0),b=!0;try{p=a(h),b=!1}finally{b?Lo(y):Dn(y)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(O){return In(y,l),Tn(O,y)},function(O){throw Lo(y),O}):(In(y,l),Tn(p,y))}if(!i||typeof i!="object"){if((p=a(i))===void 0&&(p=i),p===Tl&&(p=void 0),n.D&&Wn(p,!0),l){var S=[],v=[];rt("Patches").M(i,p,S,v),l(S,v)}return p}Ue(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(p){for(var y=arguments.length,h=Array(y>1?y-1:0),b=1;b<y;b++)h[b-1]=arguments[b];return n.produceWithPatches(p,function(S){return i.apply(void 0,[S].concat(h))})};var l,c,u=n.produce(i,a,function(p,y){l=p,c=y});return typeof Promise<"u"&&u instanceof Promise?u.then(function(p){return[p,l,c]}):[u,l,c]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var e=t.prototype;return e.createDraft=function(o){je(o)||Ue(8),mt(o)&&(o=md(o));var n=Sl(this),i=Bn(this,o,void 0);return i[X].C=!0,Dn(n),i},e.finishDraft=function(o,n){var i=o&&o[X],a=i.A;return In(a,n),Tn(void 0,a)},e.setAutoFreeze=function(o){this.D=o},e.setUseProxies=function(o){o&&!Al&&Ue(20),this.O=o},e.applyPatches=function(o,n){var i;for(i=n.length-1;i>=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){o=a.value;break}}i>-1&&(n=n.slice(i+1));var l=rt("Patches").$;return mt(o)?l(o,n):this.produce(o,function(c){return l(c,n)})},t}(),$e=new vd,Sd=$e.produce,vx=$e.produceWithPatches.bind($e),Sx=$e.setAutoFreeze.bind($e),Ox=$e.setUseProxies.bind($e),Cx=$e.applyPatches.bind($e),Ex=$e.createDraft.bind($e),wx=$e.finishDraft.bind($e),Po=Sd;function Tt(t){"@babel/helpers - typeof";return Tt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Tt(t)}function Gn(t,e){if(Tt(t)!=="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var n=o.call(t,e||"default");if(Tt(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Vn(t){var e=Gn(t,"string");return Tt(e)==="symbol"?e:String(e)}function jn(t,e,o){return e=Vn(e),e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function kl(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),o.push.apply(o,n)}return o}function ko(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?kl(Object(o),!0).forEach(function(n){jn(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):kl(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function me(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var _l=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Kn=function(){return Math.random().toString(36).substring(7).split("").join(".")},_o={INIT:"@@redux/INIT"+Kn(),REPLACE:"@@redux/REPLACE"+Kn(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Kn()}};function Od(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Zn(t,e,o){var n;if(typeof e=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(me(0));if(typeof e=="function"&&typeof o>"u"&&(o=e,e=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(me(1));return o(Zn)(t,e)}if(typeof t!="function")throw new Error(me(2));var i=t,a=e,l=[],c=l,u=!1;function p(){c===l&&(c=l.slice())}function y(){if(u)throw new Error(me(3));return a}function h(O){if(typeof O!="function")throw new Error(me(4));if(u)throw new Error(me(5));var T=!0;return p(),c.push(O),function(){if(T){if(u)throw new Error(me(6));T=!1,p();var L=c.indexOf(O);c.splice(L,1),l=null}}}function b(O){if(!Od(O))throw new Error(me(7));if(typeof O.type>"u")throw new Error(me(8));if(u)throw new Error(me(9));try{u=!0,a=i(a,O)}finally{u=!1}for(var T=l=c,N=0;N<T.length;N++){var L=T[N];L()}return O}function S(O){if(typeof O!="function")throw new Error(me(10));i=O,b({type:_o.REPLACE})}function v(){var O,T=h;return O={subscribe:function(L){if(typeof L!="object"||L===null)throw new Error(me(11));function _(){L.next&&L.next(y())}_();var B=T(_);return{unsubscribe:B}}},O[_l]=function(){return this},O}return b({type:_o.INIT}),n={dispatch:b,subscribe:h,getState:y,replaceReducer:S},n[_l]=v,n}function Cd(t){Object.keys(t).forEach(function(e){var o=t[e],n=o(void 0,{type:_o.INIT});if(typeof n>"u")throw new Error(me(12));if(typeof o(void 0,{type:_o.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(me(13))})}function Dl(t){for(var e=Object.keys(t),o={},n=0;n<e.length;n++){var i=e[n];typeof t[i]=="function"&&(o[i]=t[i])}var a=Object.keys(o),l,c;try{Cd(o)}catch(u){c=u}return function(p,y){if(p===void 0&&(p={}),c)throw c;if(0)var h;for(var b=!1,S={},v=0;v<a.length;v++){var O=a[v],T=o[O],N=p[O],L=T(N,y);if(typeof L>"u"){var _=y&&y.type;throw new Error(me(14))}S[O]=L,b=b||L!==N}return b=b||a.length!==Object.keys(p).length,b?S:p}}function Cr(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return e.length===0?function(n){return n}:e.length===1?e[0]:e.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function Bl(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),a=function(){throw new Error(me(15))},l={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},c=e.map(function(u){return u(l)});return a=Cr.apply(void 0,c)(i.dispatch),ko(ko({},i),{},{dispatch:a})}}}function $l(t){var e=function(n){var i=n.dispatch,a=n.getState;return function(l){return function(c){return typeof c=="function"?c(i,a,t):l(c)}}};return e}var Fl=$l();Fl.withExtraArgument=$l;var qn=Fl;var Hl=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,o)};return function(e,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");t(e,o);function n(){this.constructor=e}e.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),Ed=function(t,e){var o={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,l;return l={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function c(p){return function(y){return u([p,y])}}function u(p){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(a=p[0]&2?i.return:p[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,p[1])).done)return a;switch(i=0,a&&(p=[p[0]&2,a.value]),p[0]){case 0:case 1:a=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,i=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!(a=a.length>0&&a[a.length-1])&&(p[0]===6||p[0]===2)){o=0;continue}if(p[0]===3&&(!a||p[1]>a[0]&&p[1]<a[3])){o.label=p[1];break}if(p[0]===6&&o.label<a[1]){o.label=a[1],a=p;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(p);break}a[2]&&o.ops.pop(),o.trys.pop();continue}p=e.call(t,o)}catch(y){p=[6,y],i=0}finally{n=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Er=function(t,e){for(var o=0,n=e.length,i=t.length;o<n;o++,i++)t[i]=e[o];return t},wd=Object.defineProperty,Ad=Object.defineProperties,Rd=Object.getOwnPropertyDescriptors,Ml=Object.getOwnPropertySymbols,Nd=Object.prototype.hasOwnProperty,Ld=Object.prototype.propertyIsEnumerable,Ul=function(t,e,o){return e in t?wd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o},Pt=function(t,e){for(var o in e||(e={}))Nd.call(e,o)&&Ul(t,o,e[o]);if(Ml)for(var n=0,i=Ml(e);n<i.length;n++){var o=i[n];Ld.call(e,o)&&Ul(t,o,e[o])}return t},Yn=function(t,e){return Ad(t,Rd(e))},Id=function(t,e,o){return new Promise(function(n,i){var a=function(u){try{c(o.next(u))}catch(p){i(p)}},l=function(u){try{c(o.throw(u))}catch(p){i(p)}},c=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(a,l)};c((o=o.apply(t,e)).next())})};var Td=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Cr:Cr.apply(null,arguments)},Hx=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function Pd(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var o=e;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return e===o}var kd=function(t){Hl(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},e.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(e.bind.apply(e,Er([void 0],o[0].concat(this)))):new(e.bind.apply(e,Er([void 0],o.concat(this))))},e}(Array),_d=function(t){Hl(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},e.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(e.bind.apply(e,Er([void 0],o[0].concat(this)))):new(e.bind.apply(e,Er([void 0],o.concat(this))))},e}(Array);function Jn(t){return je(t)?Po(t,function(){}):t}function Dd(t){return typeof t=="boolean"}function Bd(){return function(e){return $d(e)}}function $d(t){t===void 0&&(t={});var e=t.thunk,o=e===void 0?!0:e,n=t.immutableCheck,i=n===void 0?!0:n,a=t.serializableCheck,l=a===void 0?!0:a,c=new kd;if(o&&(Dd(o)?c.push(qn):c.push(qn.withExtraArgument(o.extraArgument))),0){if(i)var u;if(l)var p}return c}var Xn=!0;function Gl(t){var e=Bd(),o=t||{},n=o.reducer,i=n===void 0?void 0:n,a=o.middleware,l=a===void 0?e():a,c=o.devTools,u=c===void 0?!0:c,p=o.preloadedState,y=p===void 0?void 0:p,h=o.enhancers,b=h===void 0?void 0:h,S;if(typeof i=="function")S=i;else if(Pd(i))S=Dl(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 v=l;if(typeof v=="function"&&(v=v(e),!Xn&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Xn&&v.some(function(B){return typeof B!="function"}))throw new Error("each middleware provided to configureStore must be a function");var O=Bl.apply(void 0,v),T=Cr;u&&(T=Td(Pt({trace:!Xn},typeof u=="object"&&u)));var N=new _d(O),L=N;Array.isArray(b)?L=Er([O],b):typeof b=="function"&&(L=b(N));var _=T.apply(void 0,L);return Zn(S,y,_)}function kt(t,e){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(e){var a=e.apply(void 0,n);if(!a)throw new Error("prepareAction did not return an object");return Pt(Pt({type:t,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:t,payload:n[0]}}return o.toString=function(){return""+t},o.type=t,o.match=function(n){return n.type===t},o}function Vl(t){var e={},o=[],n,i={addCase:function(a,l){var c=typeof a=="string"?a:a.type;if(c in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[c]=l,i},addMatcher:function(a,l){return o.push({matcher:a,reducer:l}),i},addDefaultCase:function(a){return n=a,i}};return t(i),[e,o,n]}function Fd(t){return typeof t=="function"}function Md(t,e,o,n){o===void 0&&(o=[]);var i=typeof e=="function"?Vl(e):[e,o,n],a=i[0],l=i[1],c=i[2],u;if(Fd(t))u=function(){return Jn(t())};else{var p=Jn(t);u=function(){return p}}function y(h,b){h===void 0&&(h=u());var S=Er([a[b.type]],l.filter(function(v){var O=v.matcher;return O(b)}).map(function(v){var O=v.reducer;return O}));return S.filter(function(v){return!!v}).length===0&&(S=[c]),S.reduce(function(v,O){if(O)if(mt(v)){var T=v,N=O(T,b);return N===void 0?v:N}else{if(je(v))return Po(v,function(L){return O(L,b)});var N=O(v,b);if(N===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return N}return v},h)}return y.getInitialState=u,y}function Ud(t,e){return t+"/"+e}function jl(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof t.initialState=="function"?t.initialState:Jn(t.initialState),n=t.reducers||{},i=Object.keys(n),a={},l={},c={};i.forEach(function(y){var h=n[y],b=Ud(e,y),S,v;"reducer"in h?(S=h.reducer,v=h.prepare):S=h,a[y]=S,l[b]=S,c[y]=v?kt(b,v):kt(b)});function u(){var y=typeof t.extraReducers=="function"?Vl(t.extraReducers):[t.extraReducers],h=y[0],b=h===void 0?{}:h,S=y[1],v=S===void 0?[]:S,O=y[2],T=O===void 0?void 0:O,N=Pt(Pt({},b),l);return Md(o,function(L){for(var _ in N)L.addCase(_,N[_]);for(var B=0,F=v;B<F.length;B++){var Oe=F[B];L.addMatcher(Oe.matcher,Oe.reducer)}T&&L.addDefaultCase(T)})}var p;return{name:e,reducer:function(y,h){return p||(p=u()),p(y,h)},actions:c,caseReducers:a,getInitialState:function(){return p||(p=u()),p.getInitialState()}}}var Wd="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",zd=function(t){t===void 0&&(t=21);for(var e="",o=t;o--;)e+=Wd[Math.random()*64|0];return e},Hd=["name","message","stack","code"],Qn=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Wl=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Gd=function(t){if(typeof t=="object"&&t!==null){for(var e={},o=0,n=Hd;o<n.length;o++){var i=n[o];typeof t[i]=="string"&&(e[i]=t[i])}return e}return{message:String(t)}},Kx=function(){function t(e,o,n){var i=kt(e+"/fulfilled",function(y,h,b,S){return{payload:y,meta:Yn(Pt({},S||{}),{arg:b,requestId:h,requestStatus:"fulfilled"})}}),a=kt(e+"/pending",function(y,h,b){return{payload:void 0,meta:Yn(Pt({},b||{}),{arg:h,requestId:y,requestStatus:"pending"})}}),l=kt(e+"/rejected",function(y,h,b,S,v){return{payload:S,error:(n&&n.serializeError||Gd)(y||"Rejected"),meta:Yn(Pt({},v||{}),{arg:b,requestId:h,rejectedWithValue:!!S,requestStatus:"rejected",aborted:y?.name==="AbortError",condition:y?.name==="ConditionError"})}}),c=!1,u=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 p(y){return function(h,b,S){var v=n?.idGenerator?n.idGenerator(y):zd(),O=new u,T,N=!1;function L(B){T=B,O.abort()}var _=function(){return Id(this,null,function(){var B,F,Oe,qe,ge,Ye,pe;return Ed(this,function(m){switch(m.label){case 0:return m.trys.push([0,4,,5]),qe=(B=n?.condition)==null?void 0:B.call(n,y,{getState:b,extra:S}),jd(qe)?[4,qe]:[3,2];case 1:qe=m.sent(),m.label=2;case 2:if(qe===!1||O.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return N=!0,ge=new Promise(function(x,P){return O.signal.addEventListener("abort",function(){return P({name:"AbortError",message:T||"Aborted"})})}),h(a(v,y,(F=n?.getPendingMeta)==null?void 0:F.call(n,{requestId:v,arg:y},{getState:b,extra:S}))),[4,Promise.race([ge,Promise.resolve(o(y,{dispatch:h,getState:b,extra:S,requestId:v,signal:O.signal,abort:L,rejectWithValue:function(x,P){return new Qn(x,P)},fulfillWithValue:function(x,P){return new Wl(x,P)}})).then(function(x){if(x instanceof Qn)throw x;return x instanceof Wl?i(x.payload,v,y,x.meta):i(x,v,y)})])];case 3:return Oe=m.sent(),[3,5];case 4:return Ye=m.sent(),Oe=Ye instanceof Qn?l(null,v,y,Ye.payload,Ye.meta):l(Ye,v,y),[3,5];case 5:return pe=n&&!n.dispatchConditionRejection&&l.match(Oe)&&Oe.meta.condition,pe||h(Oe),[2,Oe]}})})}();return Object.assign(_,{abort:L,requestId:v,arg:y,unwrap:function(){return _.then(Vd)}})}}return Object.assign(p,{pending:a,rejected:l,fulfilled:i,typePrefix:e})}return t.withTypes=function(){return t},t}();function Vd(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function jd(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Kl="listener",Zl="completed",ql="cancelled",Zx="task-"+ql,qx="task-"+Zl,Yx=Kl+"-"+ql,Xx=Kl+"-"+Zl;var ea="listenerMiddleware";var Qx=kt(ea+"/add"),Jx=kt(ea+"/removeAll"),ev=kt(ea+"/remove");var zl,tv=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(zl||(zl=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},Kd=function(t){return function(e){setTimeout(e,t)}},rv=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Kd(10);Il();function Zd(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??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 Do=class extends Zd(Object){};window.ftReduxStores||(window.ftReduxStores={});var Yl=class t extends Do{static get(e){var o;let n=typeof e=="string"?e:e.name,i=typeof e=="string"?void 0:e,a=window.ftReduxStores[n];if(Hr(a))return a;if(i==null)return;let l=jl({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),c=Gl({reducer:(u,p)=>p.type==="CLEAR_FT_REDUX_STORE"?l.getInitialState():typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__")?{...u,...p.overwrites}:l.reducer(u,p)});return window.ftReduxStores[i.name]=new t(l,c)}constructor(e,o){super(),this.reduxSlice=e,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new Eo;let n=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,a,l)=>{let c=a,u=i[c];return u?(...p)=>{let y=u(...p.map(n));return this.reduxStore.dispatch(y),y}:p=>{this.setState({[c]:n(p)})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}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(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var Mo=g(I());var Bo=class extends yt{async listMySearches(){let e=k.getState().session;return e?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var $o=class extends yt{async listMyBookmarks(){let e=k.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var Yd="ft-user-assets",Fo=Mo.FtReduxStore.get({name:Yd,initialState:{savedSearches:void 0,bookmarks:void 0}}),ta=class{constructor(){this.currentSession=k.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new $o,this.savedSearchesService=new Bo,k.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:o}=k.getState();(0,Mo.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Fo.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Fo.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Fo.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let o=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Fo.actions.bookmarks(o)}}},$v=new ta;var ra=class{addCommand(e,o=!1){k.commands.add(e,o)}consumeCommand(e){return k.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new ra;var Xl=g(I()),oa=class{highlightHtml(e,o,n){(0,Xl.highlightHtml)(e,o,n)}};window.FluidTopicsHighlightHtmlService=new oa;var Ql=g(I());var na=class{isDate(e){var o,n,i,a;return(a=(i=((n=(o=k.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(c=>c.key===e))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1}format(e,o){var n,i,a;return Ql.DateFormatter.format(e,(n=o?.locale)!==null&&n!==void 0?n:k.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(a=o?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new na;var Xd=g(I());(0,Jl.customElement)("ft-app-context")(ee);var tc=g(K()),Qd=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(l=t[c])&&(a=(i<3?l(a):i>3?l(e,o,a):l(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},aa=Symbol("i18nAttributes"),ia=Symbol("i18nListAttributes"),Uo=Symbol("i18nProperties"),sa=Symbol("i18nManualContexts"),qr=Symbol("i18nUnsubs");function Ho(t){var e,o;class n extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[o]=new Map}get i18nService(){return this.useCustomMessageContexts?sl:Qt}i18n(a,l,...c){var u;if(typeof a=="string")return this.i18nService.resolveMessage(a,l,...c);let p=(u=a.args)!==null&&u!==void 0?u:a.argsProvider?a.argsProvider(this):[];return this.i18nService.resolveMessage(a.context,a.key,...p)}onI18nUpdate(a){var l,c,u;(l=this[aa])===null||l===void 0||l.forEach((p,y)=>{let h=this.getI18nAttributeValue(y);h&&(this[y]=this.getI18nAttributeMessage(h,p,a))}),(c=this[ia])===null||c===void 0||c.forEach((p,y)=>{let h=this.getI18nListAttributeValues(y);this[y]=h?.map(b=>this.getI18nAttributeMessage(b,p,a))}),(u=this[Uo])===null||u===void 0||u.forEach((p,y)=>{p.context.toLowerCase()===a.toLowerCase()&&(this[y]=this.i18n(p))}),setTimeout(()=>this.requestUpdate(),0)}buildI18nAttributeMessage(a,l){return{...a,message:this.i18n({context:a.context,key:a.key,...l})}}getI18nAttributeMessage(a,l,c){var u;let p=!c||((u=a.context)===null||u===void 0?void 0:u.toLowerCase())===c.toLowerCase();return a.context&&a.key&&p?this.buildI18nAttributeMessage(a,l):a}update(a){var l,c,u;super.update(a),(l=this[aa])===null||l===void 0||l.forEach((p,y)=>{let h=this.getI18nAttributeValue(y);h?.context&&h.key&&(a.has(y)||p.argsProvider!=null)&&(this.addI18nContextIfNeeded(h,a,y),this[y]=this.getI18nAttributeMessage(h,p))}),(c=this[ia])===null||c===void 0||c.forEach((p,y)=>{let h=this.getI18nListAttributeValues(y);(a.has(y)||p.argsProvider!=null)&&(this[y]=h?.map(b=>(this.addI18nContextIfNeeded(b,a,y),this.getI18nAttributeMessage(b,p))))}),(u=this[Uo])===null||u===void 0||u.forEach((p,y)=>{p.argsProvider!=null&&(this[y]=this.i18n(p))})}getI18nAttributeValue(a){return this[a]}getI18nListAttributeValues(a){return this[a]}addI18nContextIfNeeded(a,l,c){a.context&&a.key&&l.has(c)&&this.addI18nContext(a.context)}addI18nMessagesAndSubscribe(a,l){a=a.toLowerCase(),this[qr].has(a)||this[qr].set(a,this.i18nService.subscribe(a,()=>this.onI18nUpdate(a))),this.i18nService.prepareContext(a,l??{}),this.onI18nUpdate(a)}connectedCallback(){var a,l,c,u,p,y;super.connectedCallback(),new Set([...(l=(a=this[Uo])===null||a===void 0?void 0:a.values())!==null&&l!==void 0?l:[],...[...(u=(c=this[aa])===null||c===void 0?void 0:c.keys())!==null&&u!==void 0?u:[]].map(h=>this.getI18nAttributeValue(h)),...[...(y=(p=this[ia])===null||p===void 0?void 0:p.keys())!==null&&y!==void 0?y:[]].flatMap(h=>this.getI18nListAttributeValues(h))].map(h=>h?.context)).forEach(h=>h&&this.addI18nMessages(h)),this[sa].forEach((h,b)=>{this.addI18nMessages(b,h)})}addI18nMessages(a,l){this[sa].set(a,l??{}),this.addI18nMessagesAndSubscribe(a,l)}addI18nContext(a,l){this.addI18nMessages(typeof a=="string"?a:a.name,l)}disconnectedCallback(){super.disconnectedCallback(),this[qr].forEach(a=>a()),this[qr].clear()}}return e=sa,o=qr,Qd([(0,tc.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}var ec=class extends Ho(zo.FtLitElement){},Wo=class extends Ho(zo.FtLitElementRedux){};var Yr=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(l=t[c])&&(a=(i<3?l(a):i>3?l(e,o,a):l(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},Ke=class extends Wo{constructor(){super(),this.editorMode=!1,this.addStore(k)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Go.nothing:Go.html`
1811
1811
  <span class="ft-i18n">
1812
1812
  ${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}
1813
1813
  </span>