@fluid-topics/ft-search-results-spellcheck 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.
|
@@ -134,7 +134,7 @@ Also for action icons.`,a.colorGray200),contentGlobalSubtle:e.extend("--ft-conte
|
|
|
134
134
|
`;var Mt=E(_());var la=E(_());var mn=E(q()),G=E(Y()),Q=E(_());var fn=E(q());var hn=fn.css`
|
|
135
135
|
`;var gt=E(_()),Qa="ft-app-info",sr=class extends CustomEvent{constructor(t){super("authentication-change",{detail:t})}},Xa={session:(r,t)=>{(0,gt.deepEqual)(r.session,t.payload)||(r.session=t.payload,setTimeout(()=>w.dispatchEvent(new sr(t.payload)),0))}},w=gt.FtReduxStore.get({name:Qa,reducers:Xa,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1}});var le=E(_());var lr=E(_());var Ee=class r{static get(t){let{baseUrl:o,apiIntegrationIdentifier:n}=w.getState(),i=t??n;if(o&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,i,!0)}static await(t){return new Promise(o=>{let n=r.get(t);if(n)o(n);else{let i=w.subscribe(()=>{n=r.get(t),n&&(i(),o(n))})}})}};var ne=class{constructor(t=!0,o){var n;this.overrideApi=o;let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new lr.CacheRegistry,this.cache=t?i.commonCache:new lr.CacheRegistry}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Ee.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Ee.await()}clearCache(){this.cache.clearAll()}};var yn,Ja=Symbol("clearAfterUnitTest"),mt=class extends ne{constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[yn]=()=>{this.defaultMessages={},this.cache=new le.CacheRegistry,this.listeners={}},this.currentUiLocale=w.getState().uiLocale,w.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=w.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let o=t.name.toLowerCase();this.cache.setFinal(o,t),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,o){var n;if(t=t.toLowerCase(),Object.keys(o).length>0){let i={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...o};(0,le.deepEqual)(this.defaultMessages[t],i)||(this.defaultMessages[t]=i,await this.notify(t))}await this.fetchContext(t)}resolveContext(t){var o,n;return this.fetchContext(t),(n=(o=this.cache.getNow(t))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,o){let n=t.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(t,o,...n){var i;let c=t.toLowerCase(),l=this.resolveContext(c);return new le.ParametrizedLabelResolver((i=this.defaultMessages[c])!==null&&i!==void 0?i:{},l).resolve(o,...n)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),await this.notify(t)}catch(o){console.error(o)}}subscribe(t,o){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(o),()=>{var i;return(i=this.listeners[t])===null||i===void 0?void 0:i.delete(o)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map(t=>this.notify(t)))}async notify(t){this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(o=>(0,le.delay)(0).then(()=>o()).catch(()=>null)))}};yn=Ja;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends mt{constructor(){super(async(r,t)=>(await this.awaitApi).getFluidTopicsMessageContext(r,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends mt{constructor(){super(async(r,t)=>(await this.awaitApi).getCustomMessageContext(r,t))}});var we=window.FluidTopicsI18nService,gn=window.FluidTopicsCustomI18nService;var z=function(r,t,o,n){var i=arguments.length,c=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(c=(i<3?l(c):i>3?l(t,o,c):l(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c},U=class extends Q.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>Ee.get(),this.messageContexts=[],this.cache=new Q.CacheRegistry,this.cleanSessionDebouncer=new Q.Debouncer}render(){return mn.html`
|
|
136
136
|
<slot></slot>
|
|
137
|
-
`}update(t){var o,n,i,c,l;super.update(t),t.has("baseUrl")&&(w.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&w.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&w.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&w.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&w.actions.noCustom(this.noCustom),t.has("editorMode")&&w.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&w.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&w.actions.session(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(d=>we.addContext(d)),t.has("openExternalDocumentInNewTab")&&w.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&w.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&w.actions.forcedOffline(this.forcedOffline),t.has("localesConfiguration")&&(w.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),w.actions.availableUiLocales((i=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&i!==void 0?i:[]),w.actions.searchInAllLanguagesAllowed((l=(c=this.localesConfiguration)===null||c===void 0?void 0:c.allLanguagesAllowed)!==null&&l!==void 0?l:!1)),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},t.idleTimeoutInMillis),t})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}};U.elementDefinitions={};U.styles=hn;z([(0,G.property)()],U.prototype,"baseUrl",void 0);z([(0,G.property)()],U.prototype,"apiIntegrationIdentifier",void 0);z([(0,G.property)()],U.prototype,"uiLocale",void 0);z([(0,Q.jsonProperty)(null)],U.prototype,"availableUiLocales",void 0);z([(0,Q.jsonProperty)(null)],U.prototype,"metadataConfiguration",void 0);z([(0,G.property)({type:Boolean})],U.prototype,"editorMode",void 0);z([(0,G.property)({type:Boolean})],U.prototype,"noCustom",void 0);z([(0,G.property)({type:Boolean})],U.prototype,"openExternalDocumentInNewTab",void 0);z([(0,G.property)({converter:{fromAttribute(r){return r==="false"?!1:r==="true"||(r??!1)}}})],U.prototype,"noCustomComponent",void 0);z([(0,G.property)({type:Boolean})],U.prototype,"withManualResources",void 0);z([(0,G.property)({type:Boolean})],U.prototype,"navigatorOnline",void 0);z([(0,G.property)({type:Boolean})],U.prototype,"forcedOffline",void 0);z([(0,G.property)({type:Object})],U.prototype,"apiProvider",void 0);z([(0,Q.jsonProperty)([])],U.prototype,"messageContexts",void 0);z([(0,Q.jsonProperty)(void 0)],U.prototype,"session",void 0);z([(0,G.state)()],U.prototype,"localesConfiguration",void 0);var Wi=E(Y());function ei(r,t){if(r===t)return!0;if(r&&t&&typeof r=="object"&&typeof t=="object"){if(r.constructor!==t.constructor)return!1;var o,n,i;if(Array.isArray(r)){if(o=r.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!bt(r[n],t[n]))return!1;return!0}if(r instanceof Map&&t instanceof Map){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;for(n of r.entries())if(!bt(n[1],t.get(n[0])))return!1;return!0}if(r instanceof Set&&t instanceof Set){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;return!0}if(r.constructor===RegExp)return r.source===t.source&&r.flags===t.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===t.valueOf();if(i=Object.keys(r),o=i.length,o!==Object.keys(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=o;n--!==0;){var c=i[n];if(!bt(r[c],t[c]))return!1}return!0}return r!==r&&t!==t}function bt(r,t){try{return ei(r,t)}catch{return!1}}function xt(r,t){return!bt(r,t)}var ti=E(Y(),1);var vt=class{constructor(){this.queue=[]}add(t,o=!1){o&&(this.queue=this.queue.filter(n=>n.type!==t.type)),this.queue.push(t)}consume(t){let o=this.queue.find(n=>n.type===t);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}};var Xe=E(Y(),1);var bn=E(Y(),1);function xn(r,t){let o=()=>JSON.parse(JSON.stringify(r));return(0,bn.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:xt,...t??{}})}var St=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,c=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let l of n)try{await l()}catch(d){i(d);return}c(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Sn=E(q(),1);var Ot=window,ri=Ot.ShadowRoot&&(Ot.ShadyCSS===void 0||Ot.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Hu=Symbol();var vn=(r,t)=>{ri?r.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet):t.forEach(o=>{let n=document.createElement("style"),i=Ot.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,r.appendChild(n)})};var Ct=class extends Sn.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([i,c])=>t.registry.define(i,c)));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return vn(n,t.elementStyles),n}};var Et=function(r,t,o,n){var i=arguments.length,c=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(c=(i<3?l(c):i>3?l(t,o,c):l(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c},wn,On=Symbol("constructorPrototype"),Cn=Symbol("constructorName"),An=Symbol("exportpartsDebouncer"),En=Symbol("dynamicDependenciesLoaded"),de=class extends Ct{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[wn]=new St(5),this[Cn]=this.constructor.name,this[On]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Cn]&&Object.setPrototypeOf(this,this[On])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let t=this.constructor;t[En]||(t[En]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate()})}contentAvailableCallback(t){}applyCustomStylesheet(t){var o,n,i;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(c=>c.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(c){console.error(c,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let c=document.createElement("style");c.classList.add("ft-lit-element--custom-stylesheet"),c.innerHTML=this.customStylesheet,this.shadowRoot.append(c)}}scheduleExportpartsUpdate(){var t,o,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[An].run(()=>{var i,c;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((c=this.exportpartsPrefixes)===null||c===void 0?void 0:c.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(t){var o,n,i,c,l,d;let p=m=>m!=null&&m.trim().length>0,u=t.filter(p).map(m=>m.trim());if(u.length===0){this.removeAttribute("exportparts");return}let y=new Set;for(let m of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let v=(c=(i=m.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&c!==void 0?c:[],b=(d=(l=m.getAttribute("exportparts"))===null||l===void 0?void 0:l.split(",").map(S=>S.split(":")[1]))!==null&&d!==void 0?d:[];new Array(...v,...b).filter(p).map(S=>S.trim()).forEach(S=>y.add(S))}if(y.size===0){this.removeAttribute("exportparts");return}let h=[...y.values()].flatMap(m=>u.map(v=>`${m}:${v}--${m}`));this.setAttribute("exportparts",[...this.part,...h].join(", "))}};wn=An;Et([(0,Xe.property)()],de.prototype,"exportpartsPrefix",void 0);Et([xn([])],de.prototype,"exportpartsPrefixes",void 0);Et([(0,Xe.property)()],de.prototype,"customStylesheet",void 0);Et([(0,Xe.state)()],de.prototype,"useAdoptedStyleSheets",void 0);function Je(r){var t;return(t=r?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Nn,In,Rn,et=Symbol("internalReduxEventsUnsubscribers"),ue=Symbol("internalStoresUnsubscribers"),Ae=Symbol("internalStores"),tt=class extends de{constructor(){super(...arguments),this[Nn]=new Map,this[In]=new Map,this[Rn]=new Map}get reduxConstructor(){return this.constructor}update(t){super.update(t),[...this.reduxConstructor.reduxReactiveProperties].some(o=>t.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[Ae].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ae].values()][0]}getStore(t){return t==null?this.getUnnamedStore():this[Ae].get(t)}addStore(t,o){var n;o=(n=o??(Je(t)?t.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this[Ae].set(o,t),this.subscribeToStore(o,t),this.updateFromStores()}removeStore(t){let o=typeof t=="string"?t:t.name;this.unsubscribeFromStore(o),this[Ae].delete(o)}setupStores(){this.unsubscribeFromStores(),this[Ae].forEach((t,o)=>this.subscribeToStore(o,t)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((t,o)=>{let n=this.constructor.getPropertyOptions(o);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:o)){let i=this.getStore(t.store);i&&(t.store?this[ue].has(t.store):this[ue].size>0)&&(this[o]=t.selector(i.getState(),this))}})}subscribeToStore(t,o){var n;this[ue].set(t,o.subscribe(()=>this.updateFromStores())),this[et].set(t,[]),Je(o)&&o.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((i,c)=>{if(typeof this[c]=="function"&&(!i.store||o.name===i.store)){let l=d=>this[c](d);o.addEventListener(i.eventName,l),this[et].get(t).push(()=>o.removeEventListener(i.eventName,l))}})),this.onStoreAvailable(t)}unsubscribeFromStores(){this[ue].forEach((t,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(t){var o;this[ue].has(t)&&this[ue].get(t)(),this[ue].delete(t),(o=this[et].get(t))===null||o===void 0||o.forEach(n=>n()),this[et].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};Nn=ue,In=Ae,Rn=et;tt.reduxProperties=new Map;tt.reduxReactiveProperties=new Set;tt.reduxEventListeners=new Map;function V(r){for(var t=arguments.length,o=Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];if(0)var i,c;throw Error("[Immer] minified error nr: "+r+(o.length?" "+o.map(function(l){return"'"+l+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ae(r){return!!r&&!!r[F]}function X(r){var t;return!!r&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===di}(r)||Array.isArray(r)||!!r[Un]||!!(!((t=r.constructor)===null||t===void 0)&&t[Un])||br(r)||xr(r))}function Ne(r,t,o){o===void 0&&(o=!1),Ge(r)===0?(o?Object.keys:$e)(r).forEach(function(n){o&&typeof n=="symbol"||t(n,r[n],r)}):r.forEach(function(n,i){return t(i,n,r)})}function Ge(r){var t=r[F];return t?t.i>3?t.i-4:t.i:Array.isArray(r)?1:br(r)?2:xr(r)?3:0}function He(r,t){return Ge(r)===2?r.has(t):Object.prototype.hasOwnProperty.call(r,t)}function oi(r,t){return Ge(r)===2?r.get(t):r[t]}function Dn(r,t,o){var n=Ge(r);n===2?r.set(t,o):n===3?r.add(o):r[t]=o}function Bn(r,t){return r===t?r!==0||1/r==1/t:r!=r&&t!=t}function br(r){return si&&r instanceof Map}function xr(r){return li&&r instanceof Set}function pe(r){return r.o||r.t}function vr(r){if(Array.isArray(r))return Array.prototype.slice.call(r);var t=zn(r);delete t[F];for(var o=$e(t),n=0;n<o.length;n++){var i=o[n],c=t[i];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(t[i]={configurable:!0,writable:!0,enumerable:c.enumerable,value:r[i]})}return Object.create(Object.getPrototypeOf(r),t)}function Sr(r,t){return t===void 0&&(t=!1),Or(r)||ae(r)||!X(r)||(Ge(r)>1&&(r.set=r.add=r.clear=r.delete=ni),Object.freeze(r),t&&Ne(r,function(o,n){return Sr(n,!0)},!0)),r}function ni(){V(2)}function Or(r){return r==null||typeof r!="object"||Object.isFrozen(r)}function ee(r){var t=mr[r];return t||V(18,r),t}function ai(r,t){mr[r]||(mr[r]=t)}function hr(){return ot}function dr(r,t){t&&(ee("Patches"),r.u=[],r.s=[],r.v=t)}function wt(r){yr(r),r.p.forEach(ii),r.p=null}function yr(r){r===ot&&(ot=r.l)}function Ln(r){return ot={p:[],l:ot,h:r,m:!0,_:0}}function ii(r){var t=r[F];t.i===0||t.i===1?t.j():t.g=!0}function ur(r,t){t._=t.p.length;var o=t.p[0],n=r!==void 0&&r!==o;return t.h.O||ee("ES5").S(t,r,n),n?(o[F].P&&(wt(t),V(4)),X(r)&&(r=At(t,r),t.l||Nt(t,r)),t.u&&ee("Patches").M(o[F].t,r,t.u,t.s)):r=At(t,o,[]),wt(t),t.u&&t.v(t.u,t.s),r!==Wn?r:void 0}function At(r,t,o){if(Or(t))return t;var n=t[F];if(!n)return Ne(t,function(d,p){return Pn(r,n,t,d,p,o)},!0),t;if(n.A!==r)return t;if(!n.P)return Nt(r,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=vr(n.k):n.o,c=i,l=!1;n.i===3&&(c=new Set(i),i.clear(),l=!0),Ne(c,function(d,p){return Pn(r,n,i,d,p,o,l)}),Nt(r,i,!1),o&&r.u&&ee("Patches").N(n,o,r.u,r.s)}return n.o}function Pn(r,t,o,n,i,c,l){if(ae(i)){var d=At(r,i,c&&t&&t.i!==3&&!He(t.R,n)?c.concat(n):void 0);if(Dn(o,n,d),!ae(d))return;r.m=!1}else l&&o.add(i);if(X(i)&&!Or(i)){if(!r.h.D&&r._<1)return;At(r,i),t&&t.A.l||Nt(r,i)}}function Nt(r,t,o){o===void 0&&(o=!1),!r.l&&r.h.D&&r.m&&Sr(t,o)}function pr(r,t){var o=r[F];return(o?pe(o):r)[t]}function kn(r,t){if(t in r)for(var o=Object.getPrototypeOf(r);o;){var n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=Object.getPrototypeOf(o)}}function fe(r){r.P||(r.P=!0,r.l&&fe(r.l))}function fr(r){r.o||(r.o=vr(r.t))}function gr(r,t,o){var n=br(t)?ee("MapSet").F(t,o):xr(t)?ee("MapSet").T(t,o):r.O?function(i,c){var l=Array.isArray(i),d={i:l?1:0,A:c?c.A:hr(),P:!1,I:!1,R:{},l:c,t:i,k:null,o:null,j:null,C:!1},p=d,u=nt;l&&(p=[d],u=rt);var y=Proxy.revocable(p,u),h=y.revoke,m=y.proxy;return d.k=m,d.j=h,m}(t,o):ee("ES5").J(t,o);return(o?o.A:hr()).p.push(n),n}function ci(r){return ae(r)||V(22,r),function t(o){if(!X(o))return o;var n,i=o[F],c=Ge(o);if(i){if(!i.P&&(i.i<4||!ee("ES5").K(i)))return i.t;i.I=!0,n=Fn(o,c),i.I=!1}else n=Fn(o,c);return Ne(n,function(l,d){i&&oi(i.t,l)===d||Dn(n,l,t(d))}),c===3?new Set(n):n}(r)}function Fn(r,t){switch(t){case 2:return new Map(r);case 3:return Array.from(r)}return vr(r)}function Mn(){function r(l,d){var p=c[l];return p?p.enumerable=d:c[l]=p={configurable:!0,enumerable:d,get:function(){var u=this[F];return nt.get(u,l)},set:function(u){var y=this[F];nt.set(y,l,u)}},p}function t(l){for(var d=l.length-1;d>=0;d--){var p=l[d][F];if(!p.P)switch(p.i){case 5:n(p)&&fe(p);break;case 4:o(p)&&fe(p)}}}function o(l){for(var d=l.t,p=l.k,u=$e(p),y=u.length-1;y>=0;y--){var h=u[y];if(h!==F){var m=d[h];if(m===void 0&&!He(d,h))return!0;var v=p[h],b=v&&v[F];if(b?b.t!==m:!Bn(v,m))return!0}}var S=!!d[F];return u.length!==$e(d).length+(S?0:1)}function n(l){var d=l.k;if(d.length!==l.t.length)return!0;var p=Object.getOwnPropertyDescriptor(d,d.length-1);if(p&&!p.get)return!0;for(var u=0;u<d.length;u++)if(!d.hasOwnProperty(u))return!0;return!1}function i(l){l.g&&V(3,JSON.stringify(pe(l)))}var c={};ai("ES5",{J:function(l,d){var p=Array.isArray(l),u=function(h,m){if(h){for(var v=Array(m.length),b=0;b<m.length;b++)Object.defineProperty(v,""+b,r(b,!0));return v}var S=zn(m);delete S[F];for(var R=$e(S),A=0;A<R.length;A++){var N=R[A];S[N]=r(N,h||!!S[N].enumerable)}return Object.create(Object.getPrototypeOf(m),S)}(p,l),y={i:p?5:4,A:d?d.A:hr(),P:!1,I:!1,R:{},l:d,t:l,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,F,{value:y,writable:!0}),u},S:function(l,d,p){p?ae(d)&&d[F].A===l&&t(l.p):(l.u&&function u(y){if(y&&typeof y=="object"){var h=y[F];if(h){var m=h.t,v=h.k,b=h.R,S=h.i;if(S===4)Ne(v,function(L){L!==F&&(m[L]!==void 0||He(m,L)?b[L]||u(v[L]):(b[L]=!0,fe(h)))}),Ne(m,function(L){v[L]!==void 0||He(v,L)||(b[L]=!1,fe(h))});else if(S===5){if(n(h)&&(fe(h),b.length=!0),v.length<m.length)for(var R=v.length;R<m.length;R++)b[R]=!1;else for(var A=m.length;A<v.length;A++)b[A]=!0;for(var N=Math.min(v.length,m.length),k=0;k<N;k++)v.hasOwnProperty(k)||(b[k]=!0),b[k]===void 0&&u(v[k])}}}}(l.p[0]),t(l.p))},K:function(l){return l.i===4?o(l):n(l)}})}var Tn,ot,Cr=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",si=typeof Map<"u",li=typeof Set<"u",_n=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Wn=Cr?Symbol.for("immer-nothing"):((Tn={})["immer-nothing"]=!0,Tn),Un=Cr?Symbol.for("immer-draftable"):"__$immer_draftable",F=Cr?Symbol.for("immer-state"):"__$immer_state";var di=""+Object.prototype.constructor,$e=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:Object.getOwnPropertyNames,zn=Object.getOwnPropertyDescriptors||function(r){var t={};return $e(r).forEach(function(o){t[o]=Object.getOwnPropertyDescriptor(r,o)}),t},mr={},nt={get:function(r,t){if(t===F)return r;var o=pe(r);if(!He(o,t))return function(i,c,l){var d,p=kn(c,l);return p?"value"in p?p.value:(d=p.get)===null||d===void 0?void 0:d.call(i.k):void 0}(r,o,t);var n=o[t];return r.I||!X(n)?n:n===pr(r.t,t)?(fr(r),r.o[t]=gr(r.A.h,n,r)):n},has:function(r,t){return t in pe(r)},ownKeys:function(r){return Reflect.ownKeys(pe(r))},set:function(r,t,o){var n=kn(pe(r),t);if(n?.set)return n.set.call(r.k,o),!0;if(!r.P){var i=pr(pe(r),t),c=i?.[F];if(c&&c.t===o)return r.o[t]=o,r.R[t]=!1,!0;if(Bn(o,i)&&(o!==void 0||He(r.t,t)))return!0;fr(r),fe(r)}return r.o[t]===o&&(o!==void 0||t in r.o)||Number.isNaN(o)&&Number.isNaN(r.o[t])||(r.o[t]=o,r.R[t]=!0),!0},deleteProperty:function(r,t){return pr(r.t,t)!==void 0||t in r.t?(r.R[t]=!1,fr(r),fe(r)):delete r.R[t],r.o&&delete r.o[t],!0},getOwnPropertyDescriptor:function(r,t){var o=pe(r),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{writable:!0,configurable:r.i!==1||t!=="length",enumerable:n.enumerable,value:o[t]}},defineProperty:function(){V(11)},getPrototypeOf:function(r){return Object.getPrototypeOf(r.t)},setPrototypeOf:function(){V(12)}},rt={};Ne(nt,function(r,t){rt[r]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),rt.deleteProperty=function(r,t){return rt.set.call(this,r,t,void 0)},rt.set=function(r,t,o){return nt.set.call(this,r[0],t,o,r[0])};var ui=function(){function r(o){var n=this;this.O=_n,this.D=!0,this.produce=function(i,c,l){if(typeof i=="function"&&typeof c!="function"){var d=c;c=i;var p=n;return function(S){var R=this;S===void 0&&(S=d);for(var A=arguments.length,N=Array(A>1?A-1:0),k=1;k<A;k++)N[k-1]=arguments[k];return p.produce(S,function(L){var M;return(M=c).call.apply(M,[R,L].concat(N))})}}var u;if(typeof c!="function"&&V(6),l!==void 0&&typeof l!="function"&&V(7),X(i)){var y=Ln(n),h=gr(n,i,void 0),m=!0;try{u=c(h),m=!1}finally{m?wt(y):yr(y)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(S){return dr(y,l),ur(S,y)},function(S){throw wt(y),S}):(dr(y,l),ur(u,y))}if(!i||typeof i!="object"){if((u=c(i))===void 0&&(u=i),u===Wn&&(u=void 0),n.D&&Sr(u,!0),l){var v=[],b=[];ee("Patches").M(i,u,v,b),l(v,b)}return u}V(21,i)},this.produceWithPatches=function(i,c){if(typeof i=="function")return function(u){for(var y=arguments.length,h=Array(y>1?y-1:0),m=1;m<y;m++)h[m-1]=arguments[m];return n.produceWithPatches(u,function(v){return i.apply(void 0,[v].concat(h))})};var l,d,p=n.produce(i,c,function(u,y){l=u,d=y});return typeof Promise<"u"&&p instanceof Promise?p.then(function(u){return[u,l,d]}):[p,l,d]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var t=r.prototype;return t.createDraft=function(o){X(o)||V(8),ae(o)&&(o=ci(o));var n=Ln(this),i=gr(this,o,void 0);return i[F].C=!0,yr(n),i},t.finishDraft=function(o,n){var i=o&&o[F],c=i.A;return dr(c,n),ur(void 0,c)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!_n&&V(20),this.O=o},t.applyPatches=function(o,n){var i;for(i=n.length-1;i>=0;i--){var c=n[i];if(c.path.length===0&&c.op==="replace"){o=c.value;break}}i>-1&&(n=n.slice(i+1));var l=ee("Patches").$;return ae(o)?l(o,n):this.produce(o,function(d){return l(d,n)})},r}(),j=new ui,pi=j.produce,ep=j.produceWithPatches.bind(j),tp=j.setAutoFreeze.bind(j),rp=j.setUseProxies.bind(j),op=j.applyPatches.bind(j),np=j.createDraft.bind(j),ap=j.finishDraft.bind(j),It=pi;function he(r){"@babel/helpers - typeof";return he=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},he(r)}function Er(r,t){if(he(r)!=="object"||r===null)return r;var o=r[Symbol.toPrimitive];if(o!==void 0){var n=o.call(r,t||"default");if(he(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function wr(r){var t=Er(r,"string");return he(t)==="symbol"?t:String(t)}function Ar(r,t,o){return t=wr(t),t in r?Object.defineProperty(r,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[t]=o,r}function Hn(r,t){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),o.push.apply(o,n)}return o}function Rt(r){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?Hn(Object(o),!0).forEach(function(n){Ar(r,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):Hn(Object(o)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(o,n))})}return r}function H(r){return"Minified Redux error #"+r+"; visit https://redux.js.org/Errors?code="+r+" for the full message or use the non-minified dev environment for full errors. "}var $n=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Nr=function(){return Math.random().toString(36).substring(7).split("").join(".")},Lt={INIT:"@@redux/INIT"+Nr(),REPLACE:"@@redux/REPLACE"+Nr(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Nr()}};function fi(r){if(typeof r!="object"||r===null)return!1;for(var t=r;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(r)===t}function Ir(r,t,o){var n;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(H(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(H(1));return o(Ir)(r,t)}if(typeof r!="function")throw new Error(H(2));var i=r,c=t,l=[],d=l,p=!1;function u(){d===l&&(d=l.slice())}function y(){if(p)throw new Error(H(3));return c}function h(S){if(typeof S!="function")throw new Error(H(4));if(p)throw new Error(H(5));var R=!0;return u(),d.push(S),function(){if(R){if(p)throw new Error(H(6));R=!1,u();var N=d.indexOf(S);d.splice(N,1),l=null}}}function m(S){if(!fi(S))throw new Error(H(7));if(typeof S.type>"u")throw new Error(H(8));if(p)throw new Error(H(9));try{p=!0,c=i(c,S)}finally{p=!1}for(var R=l=d,A=0;A<R.length;A++){var N=R[A];N()}return S}function v(S){if(typeof S!="function")throw new Error(H(10));i=S,m({type:Lt.REPLACE})}function b(){var S,R=h;return S={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(H(11));function k(){N.next&&N.next(y())}k();var L=R(k);return{unsubscribe:L}}},S[$n]=function(){return this},S}return m({type:Lt.INIT}),n={dispatch:m,subscribe:h,getState:y,replaceReducer:v},n[$n]=b,n}function hi(r){Object.keys(r).forEach(function(t){var o=r[t],n=o(void 0,{type:Lt.INIT});if(typeof n>"u")throw new Error(H(12));if(typeof o(void 0,{type:Lt.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(H(13))})}function Gn(r){for(var t=Object.keys(r),o={},n=0;n<t.length;n++){var i=t[n];typeof r[i]=="function"&&(o[i]=r[i])}var c=Object.keys(o),l,d;try{hi(o)}catch(p){d=p}return function(u,y){if(u===void 0&&(u={}),d)throw d;if(0)var h;for(var m=!1,v={},b=0;b<c.length;b++){var S=c[b],R=o[S],A=u[S],N=R(A,y);if(typeof N>"u"){var k=y&&y.type;throw new Error(H(14))}v[S]=N,m=m||N!==A}return m=m||c.length!==Object.keys(u).length,m?v:u}}function je(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function jn(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),c=function(){throw new Error(H(15))},l={getState:i.getState,dispatch:function(){return c.apply(void 0,arguments)}},d=t.map(function(p){return p(l)});return c=je.apply(void 0,d)(i.dispatch),Rt(Rt({},i),{},{dispatch:c})}}}function Kn(r){var t=function(n){var i=n.dispatch,c=n.getState;return function(l){return function(d){return typeof d=="function"?d(i,c,r):l(d)}}};return t}var Vn=Kn();Vn.withExtraArgument=Kn;var Rr=Vn;var Xn=function(){var r=function(t,o){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var c in i)Object.prototype.hasOwnProperty.call(i,c)&&(n[c]=i[c])},r(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");r(t,o);function n(){this.constructor=t}t.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),yi=function(r,t){var o={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},n,i,c,l;return l={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function d(u){return function(y){return p([u,y])}}function p(u){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(c=u[0]&2?i.return:u[0]?i.throw||((c=i.return)&&c.call(i),0):i.next)&&!(c=c.call(i,u[1])).done)return c;switch(i=0,c&&(u=[u[0]&2,c.value]),u[0]){case 0:case 1:c=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,i=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(c=o.trys,!(c=c.length>0&&c[c.length-1])&&(u[0]===6||u[0]===2)){o=0;continue}if(u[0]===3&&(!c||u[1]>c[0]&&u[1]<c[3])){o.label=u[1];break}if(u[0]===6&&o.label<c[1]){o.label=c[1],c=u;break}if(c&&o.label<c[2]){o.label=c[2],o.ops.push(u);break}c[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(r,o)}catch(y){u=[6,y],i=0}finally{n=c=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},Ke=function(r,t){for(var o=0,n=t.length,i=r.length;o<n;o++,i++)r[i]=t[o];return r},gi=Object.defineProperty,mi=Object.defineProperties,bi=Object.getOwnPropertyDescriptors,Zn=Object.getOwnPropertySymbols,xi=Object.prototype.hasOwnProperty,vi=Object.prototype.propertyIsEnumerable,qn=function(r,t,o){return t in r?gi(r,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[t]=o},ye=function(r,t){for(var o in t||(t={}))xi.call(t,o)&&qn(r,o,t[o]);if(Zn)for(var n=0,i=Zn(t);n<i.length;n++){var o=i[n];vi.call(t,o)&&qn(r,o,t[o])}return r},Lr=function(r,t){return mi(r,bi(t))},Si=function(r,t,o){return new Promise(function(n,i){var c=function(p){try{d(o.next(p))}catch(u){i(u)}},l=function(p){try{d(o.throw(p))}catch(u){i(u)}},d=function(p){return p.done?n(p.value):Promise.resolve(p.value).then(c,l)};d((o=o.apply(r,t)).next())})};var Oi=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?je:je.apply(null,arguments)},Cp=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(r){return r}};function Ci(r){if(typeof r!="object"||r===null)return!1;var t=Object.getPrototypeOf(r);if(t===null)return!0;for(var o=t;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return t===o}var Ei=function(r){Xn(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=r.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,Ke([void 0],o[0].concat(this)))):new(t.bind.apply(t,Ke([void 0],o.concat(this))))},t}(Array),wi=function(r){Xn(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=r.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,Ke([void 0],o[0].concat(this)))):new(t.bind.apply(t,Ke([void 0],o.concat(this))))},t}(Array);function Fr(r){return X(r)?It(r,function(){}):r}function Ai(r){return typeof r=="boolean"}function Ni(){return function(t){return Ii(t)}}function Ii(r){r===void 0&&(r={});var t=r.thunk,o=t===void 0?!0:t,n=r.immutableCheck,i=n===void 0?!0:n,c=r.serializableCheck,l=c===void 0?!0:c,d=new Ei;if(o&&(Ai(o)?d.push(Rr):d.push(Rr.withExtraArgument(o.extraArgument))),0){if(i)var p;if(l)var u}return d}var Pr=!0;function Jn(r){var t=Ni(),o=r||{},n=o.reducer,i=n===void 0?void 0:n,c=o.middleware,l=c===void 0?t():c,d=o.devTools,p=d===void 0?!0:d,u=o.preloadedState,y=u===void 0?void 0:u,h=o.enhancers,m=h===void 0?void 0:h,v;if(typeof i=="function")v=i;else if(Ci(i))v=Gn(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var b=l;if(typeof b=="function"&&(b=b(t),!Pr&&!Array.isArray(b)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Pr&&b.some(function(L){return typeof L!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=jn.apply(void 0,b),R=je;p&&(R=Oi(ye({trace:!Pr},typeof p=="object"&&p)));var A=new wi(S),N=A;Array.isArray(m)?N=Ke([S],m):typeof m=="function"&&(N=m(A));var k=R.apply(void 0,N);return Ir(v,y,k)}function ge(r,t){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(t){var c=t.apply(void 0,n);if(!c)throw new Error("prepareAction did not return an object");return ye(ye({type:r,payload:c.payload},"meta"in c&&{meta:c.meta}),"error"in c&&{error:c.error})}return{type:r,payload:n[0]}}return o.toString=function(){return""+r},o.type=r,o.match=function(n){return n.type===r},o}function ea(r){var t={},o=[],n,i={addCase:function(c,l){var d=typeof c=="string"?c:c.type;if(d in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[d]=l,i},addMatcher:function(c,l){return o.push({matcher:c,reducer:l}),i},addDefaultCase:function(c){return n=c,i}};return r(i),[t,o,n]}function Ri(r){return typeof r=="function"}function Li(r,t,o,n){o===void 0&&(o=[]);var i=typeof t=="function"?ea(t):[t,o,n],c=i[0],l=i[1],d=i[2],p;if(Ri(r))p=function(){return Fr(r())};else{var u=Fr(r);p=function(){return u}}function y(h,m){h===void 0&&(h=p());var v=Ke([c[m.type]],l.filter(function(b){var S=b.matcher;return S(m)}).map(function(b){var S=b.reducer;return S}));return v.filter(function(b){return!!b}).length===0&&(v=[d]),v.reduce(function(b,S){if(S)if(ae(b)){var R=b,A=S(R,m);return A===void 0?b:A}else{if(X(b))return It(b,function(N){return S(N,m)});var A=S(b,m);if(A===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return A}return b},h)}return y.getInitialState=p,y}function Pi(r,t){return r+"/"+t}function ta(r){var t=r.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof r.initialState=="function"?r.initialState:Fr(r.initialState),n=r.reducers||{},i=Object.keys(n),c={},l={},d={};i.forEach(function(y){var h=n[y],m=Pi(t,y),v,b;"reducer"in h?(v=h.reducer,b=h.prepare):v=h,c[y]=v,l[m]=v,d[y]=b?ge(m,b):ge(m)});function p(){var y=typeof r.extraReducers=="function"?ea(r.extraReducers):[r.extraReducers],h=y[0],m=h===void 0?{}:h,v=y[1],b=v===void 0?[]:v,S=y[2],R=S===void 0?void 0:S,A=ye(ye({},m),l);return Li(o,function(N){for(var k in A)N.addCase(k,A[k]);for(var L=0,M=b;L<M.length;L++){var Z=M[L];N.addMatcher(Z.matcher,Z.reducer)}R&&N.addDefaultCase(R)})}var u;return{name:t,reducer:function(y,h){return u||(u=p()),u(y,h)},actions:d,caseReducers:c,getInitialState:function(){return u||(u=p()),u.getInitialState()}}}var ki="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Fi=function(r){r===void 0&&(r=21);for(var t="",o=r;o--;)t+=ki[Math.random()*64|0];return t},Ti=["name","message","stack","code"],kr=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),Yn=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),_i=function(r){if(typeof r=="object"&&r!==null){for(var t={},o=0,n=Ti;o<n.length;o++){var i=n[o];typeof r[i]=="string"&&(t[i]=r[i])}return t}return{message:String(r)}},Np=function(){function r(t,o,n){var i=ge(t+"/fulfilled",function(y,h,m,v){return{payload:y,meta:Lr(ye({},v||{}),{arg:m,requestId:h,requestStatus:"fulfilled"})}}),c=ge(t+"/pending",function(y,h,m){return{payload:void 0,meta:Lr(ye({},m||{}),{arg:h,requestId:y,requestStatus:"pending"})}}),l=ge(t+"/rejected",function(y,h,m,v,b){return{payload:v,error:(n&&n.serializeError||_i)(y||"Rejected"),meta:Lr(ye({},b||{}),{arg:m,requestId:h,rejectedWithValue:!!v,requestStatus:"rejected",aborted:y?.name==="AbortError",condition:y?.name==="ConditionError"})}}),d=!1,p=typeof AbortController<"u"?AbortController:function(){function y(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return y.prototype.abort=function(){},y}();function u(y){return function(h,m,v){var b=n?.idGenerator?n.idGenerator(y):Fi(),S=new p,R,A=!1;function N(L){R=L,S.abort()}var k=function(){return Si(this,null,function(){var L,M,Z,be,$,xe,Ie;return yi(this,function(f){switch(f.label){case 0:return f.trys.push([0,4,,5]),be=(L=n?.condition)==null?void 0:L.call(n,y,{getState:m,extra:v}),Di(be)?[4,be]:[3,2];case 1:be=f.sent(),f.label=2;case 2:if(be===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return A=!0,$=new Promise(function(g,C){return S.signal.addEventListener("abort",function(){return C({name:"AbortError",message:R||"Aborted"})})}),h(c(b,y,(M=n?.getPendingMeta)==null?void 0:M.call(n,{requestId:b,arg:y},{getState:m,extra:v}))),[4,Promise.race([$,Promise.resolve(o(y,{dispatch:h,getState:m,extra:v,requestId:b,signal:S.signal,abort:N,rejectWithValue:function(g,C){return new kr(g,C)},fulfillWithValue:function(g,C){return new Yn(g,C)}})).then(function(g){if(g instanceof kr)throw g;return g instanceof Yn?i(g.payload,b,y,g.meta):i(g,b,y)})])];case 3:return Z=f.sent(),[3,5];case 4:return xe=f.sent(),Z=xe instanceof kr?l(null,b,y,xe.payload,xe.meta):l(xe,b,y),[3,5];case 5:return Ie=n&&!n.dispatchConditionRejection&&l.match(Z)&&Z.meta.condition,Ie||h(Z),[2,Z]}})})}();return Object.assign(k,{abort:N,requestId:b,arg:y,unwrap:function(){return k.then(Ui)}})}}return Object.assign(u,{pending:c,rejected:l,fulfilled:i,typePrefix:t})}return r.withTypes=function(){return r},r}();function Ui(r){if(r.meta&&r.meta.rejectedWithValue)throw r.payload;if(r.error)throw r.error;return r.payload}function Di(r){return r!==null&&typeof r=="object"&&typeof r.then=="function"}var ra="listener",oa="completed",na="cancelled",Ip="task-"+na,Rp="task-"+oa,Lp=ra+"-"+na,Pp=ra+"-"+oa;var Tr="listenerMiddleware";var kp=ge(Tr+"/add"),Fp=ge(Tr+"/removeAll"),Tp=ge(Tr+"/remove");var Qn,_p=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(r){return(Qn||(Qn=Promise.resolve())).then(r).catch(function(t){return setTimeout(function(){throw t},0)})},Bi=function(r){return function(t){setTimeout(t,r)}},Up=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Bi(10);Mn();function Mi(r,t){return class extends r{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(o,n,i){this.eventBus.addEventListener(o,n,i)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,i){this.eventBus.removeEventListener(o,n,i)}}}var Pt=class extends Mi(Object){};window.ftReduxStores||(window.ftReduxStores={});var aa=class r extends Pt{static get(t){var o;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,c=window.ftReduxStores[n];if(Je(c))return c;if(i==null)return;let l=ta({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),d=Jn({reducer:(p,u)=>u.type==="CLEAR_FT_REDUX_STORE"?l.getInitialState():typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__")?{...p,...u.overwrites}:l.reducer(p,u)});return window.ftReduxStores[i.name]=new r(l,d)}constructor(t,o){super(),this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new vt;let n=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,c,l)=>{let d=c,p=i[d];return p?(...u)=>{let y=p(...u.map(n));return this.reduxStore.dispatch(y),y}:u=>{this.setState({[d]:n(u)})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var _t=E(_());var kt=class extends ne{async listMySearches(){let t=w.getState().session;return t?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var Ft=class extends ne{async listMyBookmarks(){let t=w.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var zi="ft-user-assets",Tt=_t.FtReduxStore.get({name:zi,initialState:{savedSearches:void 0,bookmarks:void 0}}),_r=class{constructor(){this.currentSession=w.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Ft,this.savedSearchesService=new kt,w.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=w.getState();(0,_t.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Tt.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Tt.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();Tt.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Tt.actions.bookmarks(o)}}},bf=new _r;var Ur=class{addCommand(t,o=!1){w.commands.add(t,o)}consumeCommand(t){return w.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Ur;var ia=E(_()),Dr=class{highlightHtml(t,o,n){(0,ia.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new Dr;var ca=E(_());var Br=class{isDate(t){var o,n,i,c;return(c=(i=((n=(o=w.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(d=>d.key===t))===null||i===void 0?void 0:i.date)!==null&&c!==void 0?c:!1}format(t,o){var n,i,c;return ca.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:w.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(c=o?.withTime)!==null&&c!==void 0?c:!1)}};window.FluidTopicsDateService=new Br;var sa=E(_());var Ut=class{static get(t,o){var n,i,c,l;let d=w.getState(),{lang:p,region:u}=(i=(n=d.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new sa.SearchPlaceConverter(d.baseUrl,(l=(c=window.FluidTopicsClientConfiguration)===null||c===void 0?void 0:c.predefinedSorts)!==null&&l!==void 0?l:{},t??20,d.searchInAllLanguagesAllowed,o??`${p}-${u}`)}};(0,la.customElement)("ft-app-context")(U);var ua=E(Y()),Hi=function(r,t,o,n){var i=arguments.length,c=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(c=(i<3?l(c):i>3?l(t,o,c):l(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c},Mr=Symbol("i18nAttributes"),Wr=Symbol("i18nListAttributes"),Dt=Symbol("i18nProperties"),zr=Symbol("i18nManualContexts"),at=Symbol("i18nUnsubs");function Wt(r){var t,o;class n extends r{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[o]=new Map}get i18nService(){return this.useCustomMessageContexts?gn:we}i18n(c,l,...d){var p;if(typeof c=="string")return this.i18nService.resolveMessage(c,l,...d);let u=(p=c.args)!==null&&p!==void 0?p:c.argsProvider?c.argsProvider(this):[];return this.i18nService.resolveMessage(c.context,c.key,...u)}onI18nUpdate(c){var l,d,p;(l=this[Mr])===null||l===void 0||l.forEach((u,y)=>{let h=this.getI18nAttributeValue(y);h&&(this[y]=this.getI18nAttributeMessage(h,u,c))}),(d=this[Wr])===null||d===void 0||d.forEach((u,y)=>{let h=this.getI18nListAttributeValues(y);this[y]=h?.map(m=>this.getI18nAttributeMessage(m,u,c))}),(p=this[Dt])===null||p===void 0||p.forEach((u,y)=>{u.context.toLowerCase()===c.toLowerCase()&&(this[y]=this.i18n(u))}),setTimeout(()=>this.requestUpdate(),0)}buildI18nAttributeMessage(c,l){return{...c,message:this.i18n({context:c.context,key:c.key,...l})}}getI18nAttributeMessage(c,l,d){var p;let u=!d||((p=c.context)===null||p===void 0?void 0:p.toLowerCase())===d.toLowerCase();return c.context&&c.key&&u?this.buildI18nAttributeMessage(c,l):c}update(c){var l,d,p;super.update(c),(l=this[Mr])===null||l===void 0||l.forEach((u,y)=>{let h=this.getI18nAttributeValue(y);h?.context&&h.key&&(c.has(y)||u.argsProvider!=null)&&(this.addI18nContextIfNeeded(h,c,y),this[y]=this.getI18nAttributeMessage(h,u))}),(d=this[Wr])===null||d===void 0||d.forEach((u,y)=>{let h=this.getI18nListAttributeValues(y);(c.has(y)||u.argsProvider!=null)&&(this[y]=h?.map(m=>(this.addI18nContextIfNeeded(m,c,y),this.getI18nAttributeMessage(m,u))))}),(p=this[Dt])===null||p===void 0||p.forEach((u,y)=>{u.argsProvider!=null&&(this[y]=this.i18n(u))})}getI18nAttributeValue(c){return this[c]}getI18nListAttributeValues(c){return this[c]}addI18nContextIfNeeded(c,l,d){c.context&&c.key&&l.has(d)&&this.addI18nContext(c.context)}addI18nMessagesAndSubscribe(c,l){c=c.toLowerCase(),this[at].has(c)||this[at].set(c,this.i18nService.subscribe(c,()=>this.onI18nUpdate(c))),this.i18nService.prepareContext(c,l??{}),this.onI18nUpdate(c)}connectedCallback(){var c,l,d,p,u,y;super.connectedCallback(),new Set([...(l=(c=this[Dt])===null||c===void 0?void 0:c.values())!==null&&l!==void 0?l:[],...[...(p=(d=this[Mr])===null||d===void 0?void 0:d.keys())!==null&&p!==void 0?p:[]].map(h=>this.getI18nAttributeValue(h)),...[...(y=(u=this[Wr])===null||u===void 0?void 0:u.keys())!==null&&y!==void 0?y:[]].flatMap(h=>this.getI18nListAttributeValues(h))].map(h=>h?.context)).forEach(h=>h&&this.addI18nMessages(h)),this[zr].forEach((h,m)=>{this.addI18nMessages(m,h)})}addI18nMessages(c,l){this[zr].set(c,l??{}),this.addI18nMessagesAndSubscribe(c,l)}addI18nContext(c,l){this.addI18nMessages(typeof c=="string"?c:c.name,l)}disconnectedCallback(){super.disconnectedCallback(),this[at].forEach(c=>c()),this[at].clear()}}return t=zr,o=at,Hi([(0,ua.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}var da=class extends Wt(Mt.FtLitElement){},Bt=class extends Wt(Mt.FtLitElementRedux){};var it=function(r,t,o,n){var i=arguments.length,c=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(c=(i<3?l(c):i>3?l(t,o,c):l(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c},J=class extends Bt{constructor(){super(),this.editorMode=!1,this.addStore(w)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":zt.nothing:zt.html`
|
|
137
|
+
`}update(t){var o,n,i,c,l;super.update(t),t.has("baseUrl")&&(w.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&w.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&w.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&w.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&w.actions.noCustom(this.noCustom),t.has("editorMode")&&w.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&w.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&w.actions.session(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(d=>we.addContext(d)),t.has("openExternalDocumentInNewTab")&&w.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&w.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&w.actions.forcedOffline(this.forcedOffline),t.has("localesConfiguration")&&(w.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),w.actions.availableUiLocales((i=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&i!==void 0?i:[]),w.actions.searchInAllLanguagesAllowed((l=(c=this.localesConfiguration)===null||c===void 0?void 0:c.allLanguagesAllowed)!==null&&l!==void 0?l:!1)),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},t.idleTimeoutInMillis),t})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}};U.elementDefinitions={};U.styles=hn;z([(0,G.property)()],U.prototype,"baseUrl",void 0);z([(0,G.property)()],U.prototype,"apiIntegrationIdentifier",void 0);z([(0,G.property)()],U.prototype,"uiLocale",void 0);z([(0,Q.jsonProperty)(null)],U.prototype,"availableUiLocales",void 0);z([(0,Q.jsonProperty)(null)],U.prototype,"metadataConfiguration",void 0);z([(0,G.property)({type:Boolean})],U.prototype,"editorMode",void 0);z([(0,G.property)({type:Boolean})],U.prototype,"noCustom",void 0);z([(0,G.property)({type:Boolean})],U.prototype,"openExternalDocumentInNewTab",void 0);z([(0,G.property)({converter:{fromAttribute(r){return r==="false"?!1:r==="true"||(r??!1)}}})],U.prototype,"noCustomComponent",void 0);z([(0,G.property)({type:Boolean})],U.prototype,"withManualResources",void 0);z([(0,G.property)({type:Boolean})],U.prototype,"navigatorOnline",void 0);z([(0,G.property)({type:Boolean})],U.prototype,"forcedOffline",void 0);z([(0,G.property)({type:Object})],U.prototype,"apiProvider",void 0);z([(0,Q.jsonProperty)([])],U.prototype,"messageContexts",void 0);z([(0,Q.jsonProperty)(void 0)],U.prototype,"session",void 0);z([(0,G.state)()],U.prototype,"localesConfiguration",void 0);var Wi=E(Y());function ei(r,t){if(r===t)return!0;if(r&&t&&typeof r=="object"&&typeof t=="object"){if(r.constructor!==t.constructor)return!1;var o,n,i;if(Array.isArray(r)){if(o=r.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!bt(r[n],t[n]))return!1;return!0}if(r instanceof Map&&t instanceof Map){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;for(n of r.entries())if(!bt(n[1],t.get(n[0])))return!1;return!0}if(r instanceof Set&&t instanceof Set){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;return!0}if(r.constructor===RegExp)return r.source===t.source&&r.flags===t.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===t.valueOf();let c=l=>Object.keys(l).filter(d=>l[d]!=null);if(i=c(r),o=i.length,o!==c(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=o;n--!==0;){let l=i[n];if(!bt(r[l],t[l]))return!1}return!0}return r!==r&&t!==t||r==null&&t==null}function bt(r,t){try{return ei(r,t)}catch{return!1}}function xt(r,t){return!bt(r,t)}var ti=E(Y(),1);var vt=class{constructor(){this.queue=[]}add(t,o=!1){o&&(this.queue=this.queue.filter(n=>n.type!==t.type)),this.queue.push(t)}consume(t){let o=this.queue.find(n=>n.type===t);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}};var Xe=E(Y(),1);var bn=E(Y(),1);function xn(r,t){let o=()=>JSON.parse(JSON.stringify(r));return(0,bn.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:xt,...t??{}})}var St=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,c=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let l of n)try{await l()}catch(d){i(d);return}c(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Sn=E(q(),1);var Ot=window,ri=Ot.ShadowRoot&&(Ot.ShadyCSS===void 0||Ot.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Hu=Symbol();var vn=(r,t)=>{ri?r.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet):t.forEach(o=>{let n=document.createElement("style"),i=Ot.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,r.appendChild(n)})};var Ct=class extends Sn.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([i,c])=>t.registry.define(i,c)));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return vn(n,t.elementStyles),n}};var Et=function(r,t,o,n){var i=arguments.length,c=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(c=(i<3?l(c):i>3?l(t,o,c):l(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c},wn,On=Symbol("constructorPrototype"),Cn=Symbol("constructorName"),An=Symbol("exportpartsDebouncer"),En=Symbol("dynamicDependenciesLoaded"),de=class extends Ct{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[wn]=new St(5),this[Cn]=this.constructor.name,this[On]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Cn]&&Object.setPrototypeOf(this,this[On])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let t=this.constructor;t[En]||(t[En]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate()})}contentAvailableCallback(t){}applyCustomStylesheet(t){var o,n,i;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(c=>c.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(c){console.error(c,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let c=document.createElement("style");c.classList.add("ft-lit-element--custom-stylesheet"),c.innerHTML=this.customStylesheet,this.shadowRoot.append(c)}}scheduleExportpartsUpdate(){var t,o,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[An].run(()=>{var i,c;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((c=this.exportpartsPrefixes)===null||c===void 0?void 0:c.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(t){var o,n,i,c,l,d;let p=m=>m!=null&&m.trim().length>0,u=t.filter(p).map(m=>m.trim());if(u.length===0){this.removeAttribute("exportparts");return}let y=new Set;for(let m of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let v=(c=(i=m.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&c!==void 0?c:[],b=(d=(l=m.getAttribute("exportparts"))===null||l===void 0?void 0:l.split(",").map(S=>S.split(":")[1]))!==null&&d!==void 0?d:[];new Array(...v,...b).filter(p).map(S=>S.trim()).forEach(S=>y.add(S))}if(y.size===0){this.removeAttribute("exportparts");return}let h=[...y.values()].flatMap(m=>u.map(v=>`${m}:${v}--${m}`));this.setAttribute("exportparts",[...this.part,...h].join(", "))}};wn=An;Et([(0,Xe.property)()],de.prototype,"exportpartsPrefix",void 0);Et([xn([])],de.prototype,"exportpartsPrefixes",void 0);Et([(0,Xe.property)()],de.prototype,"customStylesheet",void 0);Et([(0,Xe.state)()],de.prototype,"useAdoptedStyleSheets",void 0);function Je(r){var t;return(t=r?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Nn,In,Rn,et=Symbol("internalReduxEventsUnsubscribers"),ue=Symbol("internalStoresUnsubscribers"),Ae=Symbol("internalStores"),tt=class extends de{constructor(){super(...arguments),this[Nn]=new Map,this[In]=new Map,this[Rn]=new Map}get reduxConstructor(){return this.constructor}update(t){super.update(t),[...this.reduxConstructor.reduxReactiveProperties].some(o=>t.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[Ae].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ae].values()][0]}getStore(t){return t==null?this.getUnnamedStore():this[Ae].get(t)}addStore(t,o){var n;o=(n=o??(Je(t)?t.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this[Ae].set(o,t),this.subscribeToStore(o,t),this.updateFromStores()}removeStore(t){let o=typeof t=="string"?t:t.name;this.unsubscribeFromStore(o),this[Ae].delete(o)}setupStores(){this.unsubscribeFromStores(),this[Ae].forEach((t,o)=>this.subscribeToStore(o,t)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((t,o)=>{let n=this.constructor.getPropertyOptions(o);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:o)){let i=this.getStore(t.store);i&&(t.store?this[ue].has(t.store):this[ue].size>0)&&(this[o]=t.selector(i.getState(),this))}})}subscribeToStore(t,o){var n;this[ue].set(t,o.subscribe(()=>this.updateFromStores())),this[et].set(t,[]),Je(o)&&o.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((i,c)=>{if(typeof this[c]=="function"&&(!i.store||o.name===i.store)){let l=d=>this[c](d);o.addEventListener(i.eventName,l),this[et].get(t).push(()=>o.removeEventListener(i.eventName,l))}})),this.onStoreAvailable(t)}unsubscribeFromStores(){this[ue].forEach((t,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(t){var o;this[ue].has(t)&&this[ue].get(t)(),this[ue].delete(t),(o=this[et].get(t))===null||o===void 0||o.forEach(n=>n()),this[et].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};Nn=ue,In=Ae,Rn=et;tt.reduxProperties=new Map;tt.reduxReactiveProperties=new Set;tt.reduxEventListeners=new Map;function V(r){for(var t=arguments.length,o=Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];if(0)var i,c;throw Error("[Immer] minified error nr: "+r+(o.length?" "+o.map(function(l){return"'"+l+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ae(r){return!!r&&!!r[F]}function X(r){var t;return!!r&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===di}(r)||Array.isArray(r)||!!r[Un]||!!(!((t=r.constructor)===null||t===void 0)&&t[Un])||br(r)||xr(r))}function Ne(r,t,o){o===void 0&&(o=!1),Ge(r)===0?(o?Object.keys:$e)(r).forEach(function(n){o&&typeof n=="symbol"||t(n,r[n],r)}):r.forEach(function(n,i){return t(i,n,r)})}function Ge(r){var t=r[F];return t?t.i>3?t.i-4:t.i:Array.isArray(r)?1:br(r)?2:xr(r)?3:0}function He(r,t){return Ge(r)===2?r.has(t):Object.prototype.hasOwnProperty.call(r,t)}function oi(r,t){return Ge(r)===2?r.get(t):r[t]}function Dn(r,t,o){var n=Ge(r);n===2?r.set(t,o):n===3?r.add(o):r[t]=o}function Bn(r,t){return r===t?r!==0||1/r==1/t:r!=r&&t!=t}function br(r){return si&&r instanceof Map}function xr(r){return li&&r instanceof Set}function pe(r){return r.o||r.t}function vr(r){if(Array.isArray(r))return Array.prototype.slice.call(r);var t=zn(r);delete t[F];for(var o=$e(t),n=0;n<o.length;n++){var i=o[n],c=t[i];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(t[i]={configurable:!0,writable:!0,enumerable:c.enumerable,value:r[i]})}return Object.create(Object.getPrototypeOf(r),t)}function Sr(r,t){return t===void 0&&(t=!1),Or(r)||ae(r)||!X(r)||(Ge(r)>1&&(r.set=r.add=r.clear=r.delete=ni),Object.freeze(r),t&&Ne(r,function(o,n){return Sr(n,!0)},!0)),r}function ni(){V(2)}function Or(r){return r==null||typeof r!="object"||Object.isFrozen(r)}function ee(r){var t=mr[r];return t||V(18,r),t}function ai(r,t){mr[r]||(mr[r]=t)}function hr(){return ot}function dr(r,t){t&&(ee("Patches"),r.u=[],r.s=[],r.v=t)}function wt(r){yr(r),r.p.forEach(ii),r.p=null}function yr(r){r===ot&&(ot=r.l)}function Ln(r){return ot={p:[],l:ot,h:r,m:!0,_:0}}function ii(r){var t=r[F];t.i===0||t.i===1?t.j():t.g=!0}function ur(r,t){t._=t.p.length;var o=t.p[0],n=r!==void 0&&r!==o;return t.h.O||ee("ES5").S(t,r,n),n?(o[F].P&&(wt(t),V(4)),X(r)&&(r=At(t,r),t.l||Nt(t,r)),t.u&&ee("Patches").M(o[F].t,r,t.u,t.s)):r=At(t,o,[]),wt(t),t.u&&t.v(t.u,t.s),r!==Wn?r:void 0}function At(r,t,o){if(Or(t))return t;var n=t[F];if(!n)return Ne(t,function(d,p){return Pn(r,n,t,d,p,o)},!0),t;if(n.A!==r)return t;if(!n.P)return Nt(r,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=vr(n.k):n.o,c=i,l=!1;n.i===3&&(c=new Set(i),i.clear(),l=!0),Ne(c,function(d,p){return Pn(r,n,i,d,p,o,l)}),Nt(r,i,!1),o&&r.u&&ee("Patches").N(n,o,r.u,r.s)}return n.o}function Pn(r,t,o,n,i,c,l){if(ae(i)){var d=At(r,i,c&&t&&t.i!==3&&!He(t.R,n)?c.concat(n):void 0);if(Dn(o,n,d),!ae(d))return;r.m=!1}else l&&o.add(i);if(X(i)&&!Or(i)){if(!r.h.D&&r._<1)return;At(r,i),t&&t.A.l||Nt(r,i)}}function Nt(r,t,o){o===void 0&&(o=!1),!r.l&&r.h.D&&r.m&&Sr(t,o)}function pr(r,t){var o=r[F];return(o?pe(o):r)[t]}function kn(r,t){if(t in r)for(var o=Object.getPrototypeOf(r);o;){var n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=Object.getPrototypeOf(o)}}function fe(r){r.P||(r.P=!0,r.l&&fe(r.l))}function fr(r){r.o||(r.o=vr(r.t))}function gr(r,t,o){var n=br(t)?ee("MapSet").F(t,o):xr(t)?ee("MapSet").T(t,o):r.O?function(i,c){var l=Array.isArray(i),d={i:l?1:0,A:c?c.A:hr(),P:!1,I:!1,R:{},l:c,t:i,k:null,o:null,j:null,C:!1},p=d,u=nt;l&&(p=[d],u=rt);var y=Proxy.revocable(p,u),h=y.revoke,m=y.proxy;return d.k=m,d.j=h,m}(t,o):ee("ES5").J(t,o);return(o?o.A:hr()).p.push(n),n}function ci(r){return ae(r)||V(22,r),function t(o){if(!X(o))return o;var n,i=o[F],c=Ge(o);if(i){if(!i.P&&(i.i<4||!ee("ES5").K(i)))return i.t;i.I=!0,n=Fn(o,c),i.I=!1}else n=Fn(o,c);return Ne(n,function(l,d){i&&oi(i.t,l)===d||Dn(n,l,t(d))}),c===3?new Set(n):n}(r)}function Fn(r,t){switch(t){case 2:return new Map(r);case 3:return Array.from(r)}return vr(r)}function Mn(){function r(l,d){var p=c[l];return p?p.enumerable=d:c[l]=p={configurable:!0,enumerable:d,get:function(){var u=this[F];return nt.get(u,l)},set:function(u){var y=this[F];nt.set(y,l,u)}},p}function t(l){for(var d=l.length-1;d>=0;d--){var p=l[d][F];if(!p.P)switch(p.i){case 5:n(p)&&fe(p);break;case 4:o(p)&&fe(p)}}}function o(l){for(var d=l.t,p=l.k,u=$e(p),y=u.length-1;y>=0;y--){var h=u[y];if(h!==F){var m=d[h];if(m===void 0&&!He(d,h))return!0;var v=p[h],b=v&&v[F];if(b?b.t!==m:!Bn(v,m))return!0}}var S=!!d[F];return u.length!==$e(d).length+(S?0:1)}function n(l){var d=l.k;if(d.length!==l.t.length)return!0;var p=Object.getOwnPropertyDescriptor(d,d.length-1);if(p&&!p.get)return!0;for(var u=0;u<d.length;u++)if(!d.hasOwnProperty(u))return!0;return!1}function i(l){l.g&&V(3,JSON.stringify(pe(l)))}var c={};ai("ES5",{J:function(l,d){var p=Array.isArray(l),u=function(h,m){if(h){for(var v=Array(m.length),b=0;b<m.length;b++)Object.defineProperty(v,""+b,r(b,!0));return v}var S=zn(m);delete S[F];for(var R=$e(S),A=0;A<R.length;A++){var N=R[A];S[N]=r(N,h||!!S[N].enumerable)}return Object.create(Object.getPrototypeOf(m),S)}(p,l),y={i:p?5:4,A:d?d.A:hr(),P:!1,I:!1,R:{},l:d,t:l,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,F,{value:y,writable:!0}),u},S:function(l,d,p){p?ae(d)&&d[F].A===l&&t(l.p):(l.u&&function u(y){if(y&&typeof y=="object"){var h=y[F];if(h){var m=h.t,v=h.k,b=h.R,S=h.i;if(S===4)Ne(v,function(L){L!==F&&(m[L]!==void 0||He(m,L)?b[L]||u(v[L]):(b[L]=!0,fe(h)))}),Ne(m,function(L){v[L]!==void 0||He(v,L)||(b[L]=!1,fe(h))});else if(S===5){if(n(h)&&(fe(h),b.length=!0),v.length<m.length)for(var R=v.length;R<m.length;R++)b[R]=!1;else for(var A=m.length;A<v.length;A++)b[A]=!0;for(var N=Math.min(v.length,m.length),k=0;k<N;k++)v.hasOwnProperty(k)||(b[k]=!0),b[k]===void 0&&u(v[k])}}}}(l.p[0]),t(l.p))},K:function(l){return l.i===4?o(l):n(l)}})}var Tn,ot,Cr=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",si=typeof Map<"u",li=typeof Set<"u",_n=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Wn=Cr?Symbol.for("immer-nothing"):((Tn={})["immer-nothing"]=!0,Tn),Un=Cr?Symbol.for("immer-draftable"):"__$immer_draftable",F=Cr?Symbol.for("immer-state"):"__$immer_state";var di=""+Object.prototype.constructor,$e=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:Object.getOwnPropertyNames,zn=Object.getOwnPropertyDescriptors||function(r){var t={};return $e(r).forEach(function(o){t[o]=Object.getOwnPropertyDescriptor(r,o)}),t},mr={},nt={get:function(r,t){if(t===F)return r;var o=pe(r);if(!He(o,t))return function(i,c,l){var d,p=kn(c,l);return p?"value"in p?p.value:(d=p.get)===null||d===void 0?void 0:d.call(i.k):void 0}(r,o,t);var n=o[t];return r.I||!X(n)?n:n===pr(r.t,t)?(fr(r),r.o[t]=gr(r.A.h,n,r)):n},has:function(r,t){return t in pe(r)},ownKeys:function(r){return Reflect.ownKeys(pe(r))},set:function(r,t,o){var n=kn(pe(r),t);if(n?.set)return n.set.call(r.k,o),!0;if(!r.P){var i=pr(pe(r),t),c=i?.[F];if(c&&c.t===o)return r.o[t]=o,r.R[t]=!1,!0;if(Bn(o,i)&&(o!==void 0||He(r.t,t)))return!0;fr(r),fe(r)}return r.o[t]===o&&(o!==void 0||t in r.o)||Number.isNaN(o)&&Number.isNaN(r.o[t])||(r.o[t]=o,r.R[t]=!0),!0},deleteProperty:function(r,t){return pr(r.t,t)!==void 0||t in r.t?(r.R[t]=!1,fr(r),fe(r)):delete r.R[t],r.o&&delete r.o[t],!0},getOwnPropertyDescriptor:function(r,t){var o=pe(r),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{writable:!0,configurable:r.i!==1||t!=="length",enumerable:n.enumerable,value:o[t]}},defineProperty:function(){V(11)},getPrototypeOf:function(r){return Object.getPrototypeOf(r.t)},setPrototypeOf:function(){V(12)}},rt={};Ne(nt,function(r,t){rt[r]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),rt.deleteProperty=function(r,t){return rt.set.call(this,r,t,void 0)},rt.set=function(r,t,o){return nt.set.call(this,r[0],t,o,r[0])};var ui=function(){function r(o){var n=this;this.O=_n,this.D=!0,this.produce=function(i,c,l){if(typeof i=="function"&&typeof c!="function"){var d=c;c=i;var p=n;return function(S){var R=this;S===void 0&&(S=d);for(var A=arguments.length,N=Array(A>1?A-1:0),k=1;k<A;k++)N[k-1]=arguments[k];return p.produce(S,function(L){var M;return(M=c).call.apply(M,[R,L].concat(N))})}}var u;if(typeof c!="function"&&V(6),l!==void 0&&typeof l!="function"&&V(7),X(i)){var y=Ln(n),h=gr(n,i,void 0),m=!0;try{u=c(h),m=!1}finally{m?wt(y):yr(y)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(S){return dr(y,l),ur(S,y)},function(S){throw wt(y),S}):(dr(y,l),ur(u,y))}if(!i||typeof i!="object"){if((u=c(i))===void 0&&(u=i),u===Wn&&(u=void 0),n.D&&Sr(u,!0),l){var v=[],b=[];ee("Patches").M(i,u,v,b),l(v,b)}return u}V(21,i)},this.produceWithPatches=function(i,c){if(typeof i=="function")return function(u){for(var y=arguments.length,h=Array(y>1?y-1:0),m=1;m<y;m++)h[m-1]=arguments[m];return n.produceWithPatches(u,function(v){return i.apply(void 0,[v].concat(h))})};var l,d,p=n.produce(i,c,function(u,y){l=u,d=y});return typeof Promise<"u"&&p instanceof Promise?p.then(function(u){return[u,l,d]}):[p,l,d]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var t=r.prototype;return t.createDraft=function(o){X(o)||V(8),ae(o)&&(o=ci(o));var n=Ln(this),i=gr(this,o,void 0);return i[F].C=!0,yr(n),i},t.finishDraft=function(o,n){var i=o&&o[F],c=i.A;return dr(c,n),ur(void 0,c)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!_n&&V(20),this.O=o},t.applyPatches=function(o,n){var i;for(i=n.length-1;i>=0;i--){var c=n[i];if(c.path.length===0&&c.op==="replace"){o=c.value;break}}i>-1&&(n=n.slice(i+1));var l=ee("Patches").$;return ae(o)?l(o,n):this.produce(o,function(d){return l(d,n)})},r}(),j=new ui,pi=j.produce,ep=j.produceWithPatches.bind(j),tp=j.setAutoFreeze.bind(j),rp=j.setUseProxies.bind(j),op=j.applyPatches.bind(j),np=j.createDraft.bind(j),ap=j.finishDraft.bind(j),It=pi;function he(r){"@babel/helpers - typeof";return he=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},he(r)}function Er(r,t){if(he(r)!=="object"||r===null)return r;var o=r[Symbol.toPrimitive];if(o!==void 0){var n=o.call(r,t||"default");if(he(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function wr(r){var t=Er(r,"string");return he(t)==="symbol"?t:String(t)}function Ar(r,t,o){return t=wr(t),t in r?Object.defineProperty(r,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[t]=o,r}function Hn(r,t){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),o.push.apply(o,n)}return o}function Rt(r){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?Hn(Object(o),!0).forEach(function(n){Ar(r,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):Hn(Object(o)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(o,n))})}return r}function H(r){return"Minified Redux error #"+r+"; visit https://redux.js.org/Errors?code="+r+" for the full message or use the non-minified dev environment for full errors. "}var $n=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Nr=function(){return Math.random().toString(36).substring(7).split("").join(".")},Lt={INIT:"@@redux/INIT"+Nr(),REPLACE:"@@redux/REPLACE"+Nr(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Nr()}};function fi(r){if(typeof r!="object"||r===null)return!1;for(var t=r;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(r)===t}function Ir(r,t,o){var n;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(H(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(H(1));return o(Ir)(r,t)}if(typeof r!="function")throw new Error(H(2));var i=r,c=t,l=[],d=l,p=!1;function u(){d===l&&(d=l.slice())}function y(){if(p)throw new Error(H(3));return c}function h(S){if(typeof S!="function")throw new Error(H(4));if(p)throw new Error(H(5));var R=!0;return u(),d.push(S),function(){if(R){if(p)throw new Error(H(6));R=!1,u();var N=d.indexOf(S);d.splice(N,1),l=null}}}function m(S){if(!fi(S))throw new Error(H(7));if(typeof S.type>"u")throw new Error(H(8));if(p)throw new Error(H(9));try{p=!0,c=i(c,S)}finally{p=!1}for(var R=l=d,A=0;A<R.length;A++){var N=R[A];N()}return S}function v(S){if(typeof S!="function")throw new Error(H(10));i=S,m({type:Lt.REPLACE})}function b(){var S,R=h;return S={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(H(11));function k(){N.next&&N.next(y())}k();var L=R(k);return{unsubscribe:L}}},S[$n]=function(){return this},S}return m({type:Lt.INIT}),n={dispatch:m,subscribe:h,getState:y,replaceReducer:v},n[$n]=b,n}function hi(r){Object.keys(r).forEach(function(t){var o=r[t],n=o(void 0,{type:Lt.INIT});if(typeof n>"u")throw new Error(H(12));if(typeof o(void 0,{type:Lt.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(H(13))})}function Gn(r){for(var t=Object.keys(r),o={},n=0;n<t.length;n++){var i=t[n];typeof r[i]=="function"&&(o[i]=r[i])}var c=Object.keys(o),l,d;try{hi(o)}catch(p){d=p}return function(u,y){if(u===void 0&&(u={}),d)throw d;if(0)var h;for(var m=!1,v={},b=0;b<c.length;b++){var S=c[b],R=o[S],A=u[S],N=R(A,y);if(typeof N>"u"){var k=y&&y.type;throw new Error(H(14))}v[S]=N,m=m||N!==A}return m=m||c.length!==Object.keys(u).length,m?v:u}}function je(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function jn(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),c=function(){throw new Error(H(15))},l={getState:i.getState,dispatch:function(){return c.apply(void 0,arguments)}},d=t.map(function(p){return p(l)});return c=je.apply(void 0,d)(i.dispatch),Rt(Rt({},i),{},{dispatch:c})}}}function Kn(r){var t=function(n){var i=n.dispatch,c=n.getState;return function(l){return function(d){return typeof d=="function"?d(i,c,r):l(d)}}};return t}var Vn=Kn();Vn.withExtraArgument=Kn;var Rr=Vn;var Xn=function(){var r=function(t,o){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var c in i)Object.prototype.hasOwnProperty.call(i,c)&&(n[c]=i[c])},r(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");r(t,o);function n(){this.constructor=t}t.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),yi=function(r,t){var o={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},n,i,c,l;return l={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function d(u){return function(y){return p([u,y])}}function p(u){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(c=u[0]&2?i.return:u[0]?i.throw||((c=i.return)&&c.call(i),0):i.next)&&!(c=c.call(i,u[1])).done)return c;switch(i=0,c&&(u=[u[0]&2,c.value]),u[0]){case 0:case 1:c=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,i=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(c=o.trys,!(c=c.length>0&&c[c.length-1])&&(u[0]===6||u[0]===2)){o=0;continue}if(u[0]===3&&(!c||u[1]>c[0]&&u[1]<c[3])){o.label=u[1];break}if(u[0]===6&&o.label<c[1]){o.label=c[1],c=u;break}if(c&&o.label<c[2]){o.label=c[2],o.ops.push(u);break}c[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(r,o)}catch(y){u=[6,y],i=0}finally{n=c=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},Ke=function(r,t){for(var o=0,n=t.length,i=r.length;o<n;o++,i++)r[i]=t[o];return r},gi=Object.defineProperty,mi=Object.defineProperties,bi=Object.getOwnPropertyDescriptors,Zn=Object.getOwnPropertySymbols,xi=Object.prototype.hasOwnProperty,vi=Object.prototype.propertyIsEnumerable,qn=function(r,t,o){return t in r?gi(r,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[t]=o},ye=function(r,t){for(var o in t||(t={}))xi.call(t,o)&&qn(r,o,t[o]);if(Zn)for(var n=0,i=Zn(t);n<i.length;n++){var o=i[n];vi.call(t,o)&&qn(r,o,t[o])}return r},Lr=function(r,t){return mi(r,bi(t))},Si=function(r,t,o){return new Promise(function(n,i){var c=function(p){try{d(o.next(p))}catch(u){i(u)}},l=function(p){try{d(o.throw(p))}catch(u){i(u)}},d=function(p){return p.done?n(p.value):Promise.resolve(p.value).then(c,l)};d((o=o.apply(r,t)).next())})};var Oi=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?je:je.apply(null,arguments)},Cp=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(r){return r}};function Ci(r){if(typeof r!="object"||r===null)return!1;var t=Object.getPrototypeOf(r);if(t===null)return!0;for(var o=t;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return t===o}var Ei=function(r){Xn(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=r.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,Ke([void 0],o[0].concat(this)))):new(t.bind.apply(t,Ke([void 0],o.concat(this))))},t}(Array),wi=function(r){Xn(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=r.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,Ke([void 0],o[0].concat(this)))):new(t.bind.apply(t,Ke([void 0],o.concat(this))))},t}(Array);function Fr(r){return X(r)?It(r,function(){}):r}function Ai(r){return typeof r=="boolean"}function Ni(){return function(t){return Ii(t)}}function Ii(r){r===void 0&&(r={});var t=r.thunk,o=t===void 0?!0:t,n=r.immutableCheck,i=n===void 0?!0:n,c=r.serializableCheck,l=c===void 0?!0:c,d=new Ei;if(o&&(Ai(o)?d.push(Rr):d.push(Rr.withExtraArgument(o.extraArgument))),0){if(i)var p;if(l)var u}return d}var Pr=!0;function Jn(r){var t=Ni(),o=r||{},n=o.reducer,i=n===void 0?void 0:n,c=o.middleware,l=c===void 0?t():c,d=o.devTools,p=d===void 0?!0:d,u=o.preloadedState,y=u===void 0?void 0:u,h=o.enhancers,m=h===void 0?void 0:h,v;if(typeof i=="function")v=i;else if(Ci(i))v=Gn(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var b=l;if(typeof b=="function"&&(b=b(t),!Pr&&!Array.isArray(b)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Pr&&b.some(function(L){return typeof L!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=jn.apply(void 0,b),R=je;p&&(R=Oi(ye({trace:!Pr},typeof p=="object"&&p)));var A=new wi(S),N=A;Array.isArray(m)?N=Ke([S],m):typeof m=="function"&&(N=m(A));var k=R.apply(void 0,N);return Ir(v,y,k)}function ge(r,t){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(t){var c=t.apply(void 0,n);if(!c)throw new Error("prepareAction did not return an object");return ye(ye({type:r,payload:c.payload},"meta"in c&&{meta:c.meta}),"error"in c&&{error:c.error})}return{type:r,payload:n[0]}}return o.toString=function(){return""+r},o.type=r,o.match=function(n){return n.type===r},o}function ea(r){var t={},o=[],n,i={addCase:function(c,l){var d=typeof c=="string"?c:c.type;if(d in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[d]=l,i},addMatcher:function(c,l){return o.push({matcher:c,reducer:l}),i},addDefaultCase:function(c){return n=c,i}};return r(i),[t,o,n]}function Ri(r){return typeof r=="function"}function Li(r,t,o,n){o===void 0&&(o=[]);var i=typeof t=="function"?ea(t):[t,o,n],c=i[0],l=i[1],d=i[2],p;if(Ri(r))p=function(){return Fr(r())};else{var u=Fr(r);p=function(){return u}}function y(h,m){h===void 0&&(h=p());var v=Ke([c[m.type]],l.filter(function(b){var S=b.matcher;return S(m)}).map(function(b){var S=b.reducer;return S}));return v.filter(function(b){return!!b}).length===0&&(v=[d]),v.reduce(function(b,S){if(S)if(ae(b)){var R=b,A=S(R,m);return A===void 0?b:A}else{if(X(b))return It(b,function(N){return S(N,m)});var A=S(b,m);if(A===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return A}return b},h)}return y.getInitialState=p,y}function Pi(r,t){return r+"/"+t}function ta(r){var t=r.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof r.initialState=="function"?r.initialState:Fr(r.initialState),n=r.reducers||{},i=Object.keys(n),c={},l={},d={};i.forEach(function(y){var h=n[y],m=Pi(t,y),v,b;"reducer"in h?(v=h.reducer,b=h.prepare):v=h,c[y]=v,l[m]=v,d[y]=b?ge(m,b):ge(m)});function p(){var y=typeof r.extraReducers=="function"?ea(r.extraReducers):[r.extraReducers],h=y[0],m=h===void 0?{}:h,v=y[1],b=v===void 0?[]:v,S=y[2],R=S===void 0?void 0:S,A=ye(ye({},m),l);return Li(o,function(N){for(var k in A)N.addCase(k,A[k]);for(var L=0,M=b;L<M.length;L++){var Z=M[L];N.addMatcher(Z.matcher,Z.reducer)}R&&N.addDefaultCase(R)})}var u;return{name:t,reducer:function(y,h){return u||(u=p()),u(y,h)},actions:d,caseReducers:c,getInitialState:function(){return u||(u=p()),u.getInitialState()}}}var ki="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Fi=function(r){r===void 0&&(r=21);for(var t="",o=r;o--;)t+=ki[Math.random()*64|0];return t},Ti=["name","message","stack","code"],kr=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),Yn=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),_i=function(r){if(typeof r=="object"&&r!==null){for(var t={},o=0,n=Ti;o<n.length;o++){var i=n[o];typeof r[i]=="string"&&(t[i]=r[i])}return t}return{message:String(r)}},Np=function(){function r(t,o,n){var i=ge(t+"/fulfilled",function(y,h,m,v){return{payload:y,meta:Lr(ye({},v||{}),{arg:m,requestId:h,requestStatus:"fulfilled"})}}),c=ge(t+"/pending",function(y,h,m){return{payload:void 0,meta:Lr(ye({},m||{}),{arg:h,requestId:y,requestStatus:"pending"})}}),l=ge(t+"/rejected",function(y,h,m,v,b){return{payload:v,error:(n&&n.serializeError||_i)(y||"Rejected"),meta:Lr(ye({},b||{}),{arg:m,requestId:h,rejectedWithValue:!!v,requestStatus:"rejected",aborted:y?.name==="AbortError",condition:y?.name==="ConditionError"})}}),d=!1,p=typeof AbortController<"u"?AbortController:function(){function y(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return y.prototype.abort=function(){},y}();function u(y){return function(h,m,v){var b=n?.idGenerator?n.idGenerator(y):Fi(),S=new p,R,A=!1;function N(L){R=L,S.abort()}var k=function(){return Si(this,null,function(){var L,M,Z,be,$,xe,Ie;return yi(this,function(f){switch(f.label){case 0:return f.trys.push([0,4,,5]),be=(L=n?.condition)==null?void 0:L.call(n,y,{getState:m,extra:v}),Di(be)?[4,be]:[3,2];case 1:be=f.sent(),f.label=2;case 2:if(be===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return A=!0,$=new Promise(function(g,C){return S.signal.addEventListener("abort",function(){return C({name:"AbortError",message:R||"Aborted"})})}),h(c(b,y,(M=n?.getPendingMeta)==null?void 0:M.call(n,{requestId:b,arg:y},{getState:m,extra:v}))),[4,Promise.race([$,Promise.resolve(o(y,{dispatch:h,getState:m,extra:v,requestId:b,signal:S.signal,abort:N,rejectWithValue:function(g,C){return new kr(g,C)},fulfillWithValue:function(g,C){return new Yn(g,C)}})).then(function(g){if(g instanceof kr)throw g;return g instanceof Yn?i(g.payload,b,y,g.meta):i(g,b,y)})])];case 3:return Z=f.sent(),[3,5];case 4:return xe=f.sent(),Z=xe instanceof kr?l(null,b,y,xe.payload,xe.meta):l(xe,b,y),[3,5];case 5:return Ie=n&&!n.dispatchConditionRejection&&l.match(Z)&&Z.meta.condition,Ie||h(Z),[2,Z]}})})}();return Object.assign(k,{abort:N,requestId:b,arg:y,unwrap:function(){return k.then(Ui)}})}}return Object.assign(u,{pending:c,rejected:l,fulfilled:i,typePrefix:t})}return r.withTypes=function(){return r},r}();function Ui(r){if(r.meta&&r.meta.rejectedWithValue)throw r.payload;if(r.error)throw r.error;return r.payload}function Di(r){return r!==null&&typeof r=="object"&&typeof r.then=="function"}var ra="listener",oa="completed",na="cancelled",Ip="task-"+na,Rp="task-"+oa,Lp=ra+"-"+na,Pp=ra+"-"+oa;var Tr="listenerMiddleware";var kp=ge(Tr+"/add"),Fp=ge(Tr+"/removeAll"),Tp=ge(Tr+"/remove");var Qn,_p=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(r){return(Qn||(Qn=Promise.resolve())).then(r).catch(function(t){return setTimeout(function(){throw t},0)})},Bi=function(r){return function(t){setTimeout(t,r)}},Up=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Bi(10);Mn();function Mi(r,t){return class extends r{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(o,n,i){this.eventBus.addEventListener(o,n,i)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,i){this.eventBus.removeEventListener(o,n,i)}}}var Pt=class extends Mi(Object){};window.ftReduxStores||(window.ftReduxStores={});var aa=class r extends Pt{static get(t){var o;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,c=window.ftReduxStores[n];if(Je(c))return c;if(i==null)return;let l=ta({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),d=Jn({reducer:(p,u)=>u.type==="CLEAR_FT_REDUX_STORE"?l.getInitialState():typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__")?{...p,...u.overwrites}:l.reducer(p,u)});return window.ftReduxStores[i.name]=new r(l,d)}constructor(t,o){super(),this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new vt;let n=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,c,l)=>{let d=c,p=i[d];return p?(...u)=>{let y=p(...u.map(n));return this.reduxStore.dispatch(y),y}:u=>{this.setState({[d]:n(u)})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var _t=E(_());var kt=class extends ne{async listMySearches(){let t=w.getState().session;return t?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var Ft=class extends ne{async listMyBookmarks(){let t=w.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var zi="ft-user-assets",Tt=_t.FtReduxStore.get({name:zi,initialState:{savedSearches:void 0,bookmarks:void 0}}),_r=class{constructor(){this.currentSession=w.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Ft,this.savedSearchesService=new kt,w.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=w.getState();(0,_t.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Tt.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Tt.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();Tt.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Tt.actions.bookmarks(o)}}},bf=new _r;var Ur=class{addCommand(t,o=!1){w.commands.add(t,o)}consumeCommand(t){return w.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Ur;var ia=E(_()),Dr=class{highlightHtml(t,o,n){(0,ia.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new Dr;var ca=E(_());var Br=class{isDate(t){var o,n,i,c;return(c=(i=((n=(o=w.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(d=>d.key===t))===null||i===void 0?void 0:i.date)!==null&&c!==void 0?c:!1}format(t,o){var n,i,c;return ca.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:w.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(c=o?.withTime)!==null&&c!==void 0?c:!1)}};window.FluidTopicsDateService=new Br;var sa=E(_());var Ut=class{static get(t,o){var n,i,c,l;let d=w.getState(),{lang:p,region:u}=(i=(n=d.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new sa.SearchPlaceConverter(d.baseUrl,(l=(c=window.FluidTopicsClientConfiguration)===null||c===void 0?void 0:c.predefinedSorts)!==null&&l!==void 0?l:{},t??20,d.searchInAllLanguagesAllowed,o??`${p}-${u}`)}};(0,la.customElement)("ft-app-context")(U);var ua=E(Y()),Hi=function(r,t,o,n){var i=arguments.length,c=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(c=(i<3?l(c):i>3?l(t,o,c):l(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c},Mr=Symbol("i18nAttributes"),Wr=Symbol("i18nListAttributes"),Dt=Symbol("i18nProperties"),zr=Symbol("i18nManualContexts"),at=Symbol("i18nUnsubs");function Wt(r){var t,o;class n extends r{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[o]=new Map}get i18nService(){return this.useCustomMessageContexts?gn:we}i18n(c,l,...d){var p;if(typeof c=="string")return this.i18nService.resolveMessage(c,l,...d);let u=(p=c.args)!==null&&p!==void 0?p:c.argsProvider?c.argsProvider(this):[];return this.i18nService.resolveMessage(c.context,c.key,...u)}onI18nUpdate(c){var l,d,p;(l=this[Mr])===null||l===void 0||l.forEach((u,y)=>{let h=this.getI18nAttributeValue(y);h&&(this[y]=this.getI18nAttributeMessage(h,u,c))}),(d=this[Wr])===null||d===void 0||d.forEach((u,y)=>{let h=this.getI18nListAttributeValues(y);this[y]=h?.map(m=>this.getI18nAttributeMessage(m,u,c))}),(p=this[Dt])===null||p===void 0||p.forEach((u,y)=>{u.context.toLowerCase()===c.toLowerCase()&&(this[y]=this.i18n(u))}),setTimeout(()=>this.requestUpdate(),0)}buildI18nAttributeMessage(c,l){return{...c,message:this.i18n({context:c.context,key:c.key,...l})}}getI18nAttributeMessage(c,l,d){var p;let u=!d||((p=c.context)===null||p===void 0?void 0:p.toLowerCase())===d.toLowerCase();return c.context&&c.key&&u?this.buildI18nAttributeMessage(c,l):c}update(c){var l,d,p;super.update(c),(l=this[Mr])===null||l===void 0||l.forEach((u,y)=>{let h=this.getI18nAttributeValue(y);h?.context&&h.key&&(c.has(y)||u.argsProvider!=null)&&(this.addI18nContextIfNeeded(h,c,y),this[y]=this.getI18nAttributeMessage(h,u))}),(d=this[Wr])===null||d===void 0||d.forEach((u,y)=>{let h=this.getI18nListAttributeValues(y);(c.has(y)||u.argsProvider!=null)&&(this[y]=h?.map(m=>(this.addI18nContextIfNeeded(m,c,y),this.getI18nAttributeMessage(m,u))))}),(p=this[Dt])===null||p===void 0||p.forEach((u,y)=>{u.argsProvider!=null&&(this[y]=this.i18n(u))})}getI18nAttributeValue(c){return this[c]}getI18nListAttributeValues(c){return this[c]}addI18nContextIfNeeded(c,l,d){c.context&&c.key&&l.has(d)&&this.addI18nContext(c.context)}addI18nMessagesAndSubscribe(c,l){c=c.toLowerCase(),this[at].has(c)||this[at].set(c,this.i18nService.subscribe(c,()=>this.onI18nUpdate(c))),this.i18nService.prepareContext(c,l??{}),this.onI18nUpdate(c)}connectedCallback(){var c,l,d,p,u,y;super.connectedCallback(),new Set([...(l=(c=this[Dt])===null||c===void 0?void 0:c.values())!==null&&l!==void 0?l:[],...[...(p=(d=this[Mr])===null||d===void 0?void 0:d.keys())!==null&&p!==void 0?p:[]].map(h=>this.getI18nAttributeValue(h)),...[...(y=(u=this[Wr])===null||u===void 0?void 0:u.keys())!==null&&y!==void 0?y:[]].flatMap(h=>this.getI18nListAttributeValues(h))].map(h=>h?.context)).forEach(h=>h&&this.addI18nMessages(h)),this[zr].forEach((h,m)=>{this.addI18nMessages(m,h)})}addI18nMessages(c,l){this[zr].set(c,l??{}),this.addI18nMessagesAndSubscribe(c,l)}addI18nContext(c,l){this.addI18nMessages(typeof c=="string"?c:c.name,l)}disconnectedCallback(){super.disconnectedCallback(),this[at].forEach(c=>c()),this[at].clear()}}return t=zr,o=at,Hi([(0,ua.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}var da=class extends Wt(Mt.FtLitElement){},Bt=class extends Wt(Mt.FtLitElementRedux){};var it=function(r,t,o,n){var i=arguments.length,c=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(c=(i<3?l(c):i>3?l(t,o,c):l(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c},J=class extends Bt{constructor(){super(),this.editorMode=!1,this.addStore(w)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":zt.nothing:zt.html`
|
|
138
138
|
<span class="ft-i18n">
|
|
139
139
|
${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}
|
|
140
140
|
</span>
|