@fluid-topics/ft-search-period-filter 1.1.100 → 1.1.101
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.
|
@@ -1565,7 +1565,7 @@ Also for action icons.`,l.colorGray200),contentGlobalSubtle:r.extend("--ft-conte
|
|
|
1565
1565
|
`;var $o=y(N());var Hl=y(N());var Qs=y(D()),Ue=y(G()),Ve=y(N());var Zs=y(D());var qs=Zs.css`
|
|
1566
1566
|
`;var mo=y(N()),jc="ft-app-info",bn=class extends CustomEvent{constructor(e){super("authentication-change",{detail:e})}},Gc={session:(t,e)=>{(0,mo.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>k.eventBus.dispatchEvent(new bn(e.payload)),0))}},k=mo.FtReduxStore.get({name:jc,reducers:Gc,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],metadataConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1}});var vt=y(N());var xn=y(N());var Wt=class t{static get(e){let{baseUrl:o,apiIntegrationIdentifier:n}=k.getState(),i=e??n;if(o&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,i,!0)}static await(e){return new Promise(o=>{let n=t.get(e);if(n)o(n);else{let i=k.subscribe(()=>{n=t.get(e),n&&(i(),o(n))})}})}};var pt=class{constructor(e=!0,o){var n;this.overrideApi=o;let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new xn.CacheRegistry,this.cache=e?i.commonCache:new xn.CacheRegistry}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Wt.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Wt.await()}clearCache(){this.cache.clearAll()}};var Ys,Kc=Symbol("clearAfterUnitTest"),yo=class extends pt{constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Ys]=()=>{this.defaultMessages={},this.cache=new vt.CacheRegistry,this.listeners={}},this.currentUiLocale=k.getState().uiLocale,k.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=k.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let o=e.name.toLowerCase();this.cache.setFinal(o,e),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,o){var n;if(e=e.toLowerCase(),Object.keys(o).length>0){let i={...(n=this.defaultMessages[e])!==null&&n!==void 0?n:{},...o};(0,vt.deepEqual)(this.defaultMessages[e],i)||(this.defaultMessages[e]=i,await this.notify(e))}await this.fetchContext(e)}resolveMessage(e,o,...n){var i,a,s;e=e.toLowerCase(),this.fetchContext(e);let c=(a=(i=this.cache.getNow(e))===null||i===void 0?void 0:i.messages)!==null&&a!==void 0?a:{};return new vt.ParametrizedLabelResolver((s=this.defaultMessages[e])!==null&&s!==void 0?s:{},c).resolve(o,...n)}async fetchContext(e){if(!this.cache.has(e))try{await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),await this.notify(e)}catch(o){console.error(o)}}subscribe(e,o){var n;return e=e.toLowerCase(),this.listeners[e]=(n=this.listeners[e])!==null&&n!==void 0?n:new Set,this.listeners[e].add(o),()=>{var i;return(i=this.listeners[e])===null||i===void 0?void 0:i.delete(o)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map(e=>this.notify(e)))}async notify(e){this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(o=>(0,vt.delay)(0).then(()=>o()).catch(()=>null)))}};Ys=Kc;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends yo{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends yo{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var ur=window.FluidTopicsI18nService,Xs=window.FluidTopicsCustomI18nService;var ge=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},J=class extends Ve.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>Wt.get(),this.messageContexts=[],this.cache=new Ve.CacheRegistry,this.cleanSessionDebouncer=new Ve.Debouncer}render(){return Qs.html`
|
|
1567
1567
|
<slot></slot>
|
|
1568
|
-
`}update(e){super.update(e),e.has("baseUrl")&&(k.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&k.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("uiLocale")&&k.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&k.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&k.actions.noCustom(this.noCustom),e.has("editorMode")&&k.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&k.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&k.actions.session(this.session),e.has("availableUiLocales")&&k.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(o=>ur.addContext(o)),e.has("openExternalDocumentInNewTab")&&k.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&k.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&k.actions.forcedOffline(this.forcedOffline),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){!this.withManualResources&&this.apiProvider()&&(this.session==null&&this.updateSession(),this.availableUiLocales==null&&this.updateUiLocales(),this.metadataConfiguration==null&&this.updateMetadataConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateUiLocales(){this.availableUiLocales=await this.cache.get("availableUiLocales",()=>this.apiProvider().getAvailableUiLocales())}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}};J.elementDefinitions={};J.styles=qs;ge([(0,Ue.property)()],J.prototype,"baseUrl",void 0);ge([(0,Ue.property)()],J.prototype,"apiIntegrationIdentifier",void 0);ge([(0,Ue.property)()],J.prototype,"uiLocale",void 0);ge([(0,Ve.jsonProperty)(null)],J.prototype,"availableUiLocales",void 0);ge([(0,Ve.jsonProperty)(null)],J.prototype,"metadataConfiguration",void 0);ge([(0,Ue.property)({type:Boolean})],J.prototype,"editorMode",void 0);ge([(0,Ue.property)({type:Boolean})],J.prototype,"noCustom",void 0);ge([(0,Ue.property)({type:Boolean})],J.prototype,"openExternalDocumentInNewTab",void 0);ge([(0,Ue.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],J.prototype,"noCustomComponent",void 0);ge([(0,Ue.property)({type:Boolean})],J.prototype,"withManualResources",void 0);ge([(0,Ue.property)({type:Boolean})],J.prototype,"navigatorOnline",void 0);ge([(0,Ue.property)({type:Boolean})],J.prototype,"forcedOffline",void 0);ge([(0,Ue.property)({type:Object})],J.prototype,"apiProvider",void 0);ge([(0,Ve.jsonProperty)([])],J.prototype,"messageContexts",void 0);ge([(0,Ve.jsonProperty)(void 0)],J.prototype,"session",void 0);var kd=y(G());function Zc(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var o,n,i;if(Array.isArray(t)){if(o=t.length,o!=e.length)return!1;for(n=o;n--!==0;)if(!go(t[n],e[n]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;for(n of t.entries())if(!go(n[1],e.get(n[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(i=Object.keys(t),o=i.length,o!==Object.keys(e).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[n]))return!1;for(n=o;n--!==0;){var a=i[n];if(!go(t[a],e[a]))return!1}return!0}return t!==t&&e!==e}function go(t,e){try{return Zc(t,e)}catch{return!1}}function vn(t,e){return!go(t,e)}var qc=y(G(),1);var bo=class{constructor(){this.queue=[]}add(e,o=!1){o&&(this.queue=this.queue.filter(n=>n.type!==e.type)),this.queue.push(e)}consume(e){let o=this.queue.find(n=>n.type===e);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}};var Br=y(G(),1);var Js=y(G(),1);function el(t,e){let o=()=>JSON.parse(JSON.stringify(t));return(0,Js.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:vn,...e??{}})}var xo=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,o){return this.callbacks=[e],this.debounce(o)}queue(e,o){return this.callbacks.push(e),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,o;let n=[...this.callbacks];this.callbacks=[];let i=(e=this.rejectPromise)!==null&&e!==void 0?e:()=>null,a=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let s of n)try{await s()}catch(c){i(c);return}a(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var rl=y(D(),1);var vo=window,Yc=vo.ShadowRoot&&(vo.ShadyCSS===void 0||vo.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,bb=Symbol();var tl=(t,e)=>{Yc?t.adoptedStyleSheets=e.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet):e.forEach(o=>{let n=document.createElement("style"),i=vo.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,t.appendChild(n)})};var So=class extends rl.LitElement{createRenderRoot(){let e=this.constructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,Object.entries(e.elementDefinitions).forEach(([i,a])=>e.registry.define(i,a)));let o={...e.shadowRootOptions,customElements:e.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return tl(n,e.elementStyles),n}};var Oo=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},al,ol=Symbol("constructorPrototype"),nl=Symbol("constructorName"),sl=Symbol("exportpartsDebouncer"),il=Symbol("dynamicDependenciesLoaded"),St=class extends So{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[al]=new xo(5),this[nl]=this.constructor.name,this[ol]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[nl]&&Object.setPrototypeOf(this,this[ol])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let e=this.constructor;e[il]||(e[il]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate()})}contentAvailableCallback(e){}applyCustomStylesheet(e){var o,n,i;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(a=>a.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(a){console.error(a,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let a=document.createElement("style");a.classList.add("ft-lit-element--custom-stylesheet"),a.innerHTML=this.customStylesheet,this.shadowRoot.append(a)}}scheduleExportpartsUpdate(){var e,o,n;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[sl].run(()=>{var i,a;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((a=this.exportpartsPrefixes)===null||a===void 0?void 0:a.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(e){var o,n,i,a,s,c;let p=g=>g!=null&&g.trim().length>0,f=e.filter(p).map(g=>g.trim());if(f.length===0){this.removeAttribute("exportparts");return}let u=new Set;for(let g of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let x=(a=(i=g.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&a!==void 0?a:[],b=(c=(s=g.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(S=>S.split(":")[1]))!==null&&c!==void 0?c:[];new Array(...x,...b).filter(p).map(S=>S.trim()).forEach(S=>u.add(S))}if(u.size===0){this.removeAttribute("exportparts");return}let m=[...u.values()].flatMap(g=>f.map(x=>`${g}:${x}--${g}`));this.setAttribute("exportparts",[...this.part,...m].join(", "))}};al=sl;Oo([(0,Br.property)()],St.prototype,"exportpartsPrefix",void 0);Oo([el([])],St.prototype,"exportpartsPrefixes",void 0);Oo([(0,Br.property)()],St.prototype,"customStylesheet",void 0);Oo([(0,Br.state)()],St.prototype,"useAdoptedStyleSheets",void 0);function Ur(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var ll,cl,dl,Co=Symbol("internalReduxEventsUnsubscribers"),Ot=Symbol("internalStoresUnsubscribers"),Ht=Symbol("internalStores"),Mr=class extends St{constructor(){super(...arguments),this[ll]=new Map,this[cl]=new Map,this[dl]=[]}get reduxConstructor(){return this.constructor}update(e){super.update(e),[...this.reduxConstructor.reduxReactiveProperties].some(o=>e.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[Ht].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ht].values()][0]}getStore(e){return e==null?this.getUnnamedStore():this[Ht].get(e)}addStore(e,o){var n;o=(n=o??(Ur(e)?e.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this.setupStore(o,e)}removeStore(e){let o=typeof e=="string"?e:e.name;this.unsubscribeFromStore(o),this[Ht].delete(o)}setupStore(e,o){this[Ht].set(e,o),this.subscribeToStore(e,o),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[Ht].forEach((e,o)=>this.subscribeToStore(o,e)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((e,o)=>{let n=this.constructor.getPropertyOptions(o);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:o)){let i=this.getStore(e.store);i&&(e.store?this[Ot].has(e.store):this[Ot].size>0)&&(this[o]=e.selector(i.getState(),this))}})}subscribeToStore(e,o){var n;this[Ot].set(e,o.subscribe(()=>this.updateFromStores())),Ur(o)&&o.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((i,a)=>{if(typeof this[a]=="function"&&(!i.store||o.name===i.store)){let s=c=>this[a](c);o.eventBus.addEventListener(i.eventName,s),this[Co].push(()=>o.eventBus.removeEventListener(i.eventName,s))}})),this.onStoreAvailable(e)}unsubscribeFromStores(){this[Ot].forEach((e,o)=>this.unsubscribeFromStore(o)),this[Co].forEach(e=>e()),this[Co]=[]}unsubscribeFromStore(e){this[Ot].has(e)&&this[Ot].get(e)(),this[Ot].delete(e)}onStoreAvailable(e){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};ll=Ot,cl=Ht,dl=Co;Mr.reduxProperties=new Map;Mr.reduxReactiveProperties=new Set;Mr.reduxEventListeners=new Map;function Me(t){for(var e=arguments.length,o=Array(e>1?e-1:0),n=1;n<e;n++)o[n-1]=arguments[n];if(0)var i,a;throw Error("[Immer] minified error nr: "+t+(o.length?" "+o.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ft(t){return!!t&&!!t[q]}function je(t){var e;return!!t&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===nd}(t)||Array.isArray(t)||!!t[gl]||!!(!((e=t.constructor)===null||e===void 0)&&e[gl])||Ln(t)||Tn(t))}function Vt(t,e,o){o===void 0&&(o=!1),yr(t)===0?(o?Object.keys:mr)(t).forEach(function(n){o&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,i){return e(i,n,t)})}function yr(t){var e=t[q];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Ln(t)?2:Tn(t)?3:0}function hr(t,e){return yr(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Xc(t,e){return yr(t)===2?t.get(e):t[e]}function bl(t,e,o){var n=yr(t);n===2?t.set(e,o):n===3?t.add(o):t[e]=o}function xl(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function Ln(t){return rd&&t instanceof Map}function Tn(t){return od&&t instanceof Set}function Ct(t){return t.o||t.t}function Pn(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Ol(t);delete e[q];for(var o=mr(e),n=0;n<o.length;n++){var i=o[n],a=e[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(e[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function In(t,e){return e===void 0&&(e=!1),kn(t)||ft(t)||!je(t)||(yr(t)>1&&(t.set=t.add=t.clear=t.delete=Qc),Object.freeze(t),e&&Vt(t,function(o,n){return In(n,!0)},!0)),t}function Qc(){Me(2)}function kn(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function Je(t){var e=Nn[t];return e||Me(18,t),e}function Jc(t,e){Nn[t]||(Nn[t]=e)}function wn(){return zr}function Sn(t,e){e&&(Je("Patches"),t.u=[],t.s=[],t.v=e)}function Eo(t){An(t),t.p.forEach(ed),t.p=null}function An(t){t===zr&&(zr=t.l)}function pl(t){return zr={p:[],l:zr,h:t,m:!0,_:0}}function ed(t){var e=t[q];e.i===0||e.i===1?e.j():e.g=!0}function On(t,e){e._=e.p.length;var o=e.p[0],n=t!==void 0&&t!==o;return e.h.O||Je("ES5").S(e,t,n),n?(o[q].P&&(Eo(e),Me(4)),je(t)&&(t=wo(e,t),e.l||Ao(e,t)),e.u&&Je("Patches").M(o[q].t,t,e.u,e.s)):t=wo(e,o,[]),Eo(e),e.u&&e.v(e.u,e.s),t!==Sl?t:void 0}function wo(t,e,o){if(kn(e))return e;var n=e[q];if(!n)return Vt(e,function(c,p){return fl(t,n,e,c,p,o)},!0),e;if(n.A!==t)return e;if(!n.P)return Ao(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=Pn(n.k):n.o,a=i,s=!1;n.i===3&&(a=new Set(i),i.clear(),s=!0),Vt(a,function(c,p){return fl(t,n,i,c,p,o,s)}),Ao(t,i,!1),o&&t.u&&Je("Patches").N(n,o,t.u,t.s)}return n.o}function fl(t,e,o,n,i,a,s){if(ft(i)){var c=wo(t,i,a&&e&&e.i!==3&&!hr(e.R,n)?a.concat(n):void 0);if(bl(o,n,c),!ft(c))return;t.m=!1}else s&&o.add(i);if(je(i)&&!kn(i)){if(!t.h.D&&t._<1)return;wo(t,i),e&&e.A.l||Ao(t,i)}}function Ao(t,e,o){o===void 0&&(o=!1),!t.l&&t.h.D&&t.m&&In(e,o)}function Cn(t,e){var o=t[q];return(o?Ct(o):t)[e]}function ul(t,e){if(e in t)for(var o=Object.getPrototypeOf(t);o;){var n=Object.getOwnPropertyDescriptor(o,e);if(n)return n;o=Object.getPrototypeOf(o)}}function Et(t){t.P||(t.P=!0,t.l&&Et(t.l))}function En(t){t.o||(t.o=Pn(t.t))}function Rn(t,e,o){var n=Ln(e)?Je("MapSet").F(e,o):Tn(e)?Je("MapSet").T(e,o):t.O?function(i,a){var s=Array.isArray(i),c={i:s?1:0,A:a?a.A:wn(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},p=c,f=Wr;s&&(p=[c],f=Fr);var u=Proxy.revocable(p,f),m=u.revoke,g=u.proxy;return c.k=g,c.j=m,g}(e,o):Je("ES5").J(e,o);return(o?o.A:wn()).p.push(n),n}function td(t){return ft(t)||Me(22,t),function e(o){if(!je(o))return o;var n,i=o[q],a=yr(o);if(i){if(!i.P&&(i.i<4||!Je("ES5").K(i)))return i.t;i.I=!0,n=hl(o,a),i.I=!1}else n=hl(o,a);return Vt(n,function(s,c){i&&Xc(i.t,s)===c||bl(n,s,e(c))}),a===3?new Set(n):n}(t)}function hl(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Pn(t)}function vl(){function t(s,c){var p=a[s];return p?p.enumerable=c:a[s]=p={configurable:!0,enumerable:c,get:function(){var f=this[q];return Wr.get(f,s)},set:function(f){var u=this[q];Wr.set(u,s,f)}},p}function e(s){for(var c=s.length-1;c>=0;c--){var p=s[c][q];if(!p.P)switch(p.i){case 5:n(p)&&Et(p);break;case 4:o(p)&&Et(p)}}}function o(s){for(var c=s.t,p=s.k,f=mr(p),u=f.length-1;u>=0;u--){var m=f[u];if(m!==q){var g=c[m];if(g===void 0&&!hr(c,m))return!0;var x=p[m],b=x&&x[q];if(b?b.t!==g:!xl(x,g))return!0}}var S=!!c[q];return f.length!==mr(c).length+(S?0:1)}function n(s){var c=s.k;if(c.length!==s.t.length)return!0;var p=Object.getOwnPropertyDescriptor(c,c.length-1);if(p&&!p.get)return!0;for(var f=0;f<c.length;f++)if(!c.hasOwnProperty(f))return!0;return!1}function i(s){s.g&&Me(3,JSON.stringify(Ct(s)))}var a={};Jc("ES5",{J:function(s,c){var p=Array.isArray(s),f=function(m,g){if(m){for(var x=Array(g.length),b=0;b<g.length;b++)Object.defineProperty(x,""+b,t(b,!0));return x}var S=Ol(g);delete S[q];for(var L=mr(S),A=0;A<L.length;A++){var R=L[A];S[R]=t(R,m||!!S[R].enumerable)}return Object.create(Object.getPrototypeOf(g),S)}(p,s),u={i:p?5:4,A:c?c.A:wn(),P:!1,I:!1,R:{},l:c,t:s,k:f,o:null,g:!1,C:!1};return Object.defineProperty(f,q,{value:u,writable:!0}),f},S:function(s,c,p){p?ft(c)&&c[q].A===s&&e(s.p):(s.u&&function f(u){if(u&&typeof u=="object"){var m=u[q];if(m){var g=m.t,x=m.k,b=m.R,S=m.i;if(S===4)Vt(x,function(P){P!==q&&(g[P]!==void 0||hr(g,P)?b[P]||f(x[P]):(b[P]=!0,Et(m)))}),Vt(g,function(P){x[P]!==void 0||hr(x,P)||(b[P]=!1,Et(m))});else if(S===5){if(n(m)&&(Et(m),b.length=!0),x.length<g.length)for(var L=x.length;L<g.length;L++)b[L]=!1;else for(var A=g.length;A<x.length;A++)b[A]=!0;for(var R=Math.min(x.length,g.length),I=0;I<R;I++)x.hasOwnProperty(I)||(b[I]=!0),b[I]===void 0&&f(x[I])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?o(s):n(s)}})}var ml,zr,_n=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",rd=typeof Map<"u",od=typeof Set<"u",yl=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Sl=_n?Symbol.for("immer-nothing"):((ml={})["immer-nothing"]=!0,ml),gl=_n?Symbol.for("immer-draftable"):"__$immer_draftable",q=_n?Symbol.for("immer-state"):"__$immer_state";var nd=""+Object.prototype.constructor,mr=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Ol=Object.getOwnPropertyDescriptors||function(t){var e={};return mr(t).forEach(function(o){e[o]=Object.getOwnPropertyDescriptor(t,o)}),e},Nn={},Wr={get:function(t,e){if(e===q)return t;var o=Ct(t);if(!hr(o,e))return function(i,a,s){var c,p=ul(a,s);return p?"value"in p?p.value:(c=p.get)===null||c===void 0?void 0:c.call(i.k):void 0}(t,o,e);var n=o[e];return t.I||!je(n)?n:n===Cn(t.t,e)?(En(t),t.o[e]=Rn(t.A.h,n,t)):n},has:function(t,e){return e in Ct(t)},ownKeys:function(t){return Reflect.ownKeys(Ct(t))},set:function(t,e,o){var n=ul(Ct(t),e);if(n?.set)return n.set.call(t.k,o),!0;if(!t.P){var i=Cn(Ct(t),e),a=i?.[q];if(a&&a.t===o)return t.o[e]=o,t.R[e]=!1,!0;if(xl(o,i)&&(o!==void 0||hr(t.t,e)))return!0;En(t),Et(t)}return t.o[e]===o&&(o!==void 0||e in t.o)||Number.isNaN(o)&&Number.isNaN(t.o[e])||(t.o[e]=o,t.R[e]=!0),!0},deleteProperty:function(t,e){return Cn(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,En(t),Et(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var o=Ct(t),n=Reflect.getOwnPropertyDescriptor(o,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:o[e]}},defineProperty:function(){Me(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Me(12)}},Fr={};Vt(Wr,function(t,e){Fr[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Fr.deleteProperty=function(t,e){return Fr.set.call(this,t,e,void 0)},Fr.set=function(t,e,o){return Wr.set.call(this,t[0],e,o,t[0])};var id=function(){function t(o){var n=this;this.O=yl,this.D=!0,this.produce=function(i,a,s){if(typeof i=="function"&&typeof a!="function"){var c=a;a=i;var p=n;return function(S){var L=this;S===void 0&&(S=c);for(var A=arguments.length,R=Array(A>1?A-1:0),I=1;I<A;I++)R[I-1]=arguments[I];return p.produce(S,function(P){var F;return(F=a).call.apply(F,[L,P].concat(R))})}}var f;if(typeof a!="function"&&Me(6),s!==void 0&&typeof s!="function"&&Me(7),je(i)){var u=pl(n),m=Rn(n,i,void 0),g=!0;try{f=a(m),g=!1}finally{g?Eo(u):An(u)}return typeof Promise<"u"&&f instanceof Promise?f.then(function(S){return Sn(u,s),On(S,u)},function(S){throw Eo(u),S}):(Sn(u,s),On(f,u))}if(!i||typeof i!="object"){if((f=a(i))===void 0&&(f=i),f===Sl&&(f=void 0),n.D&&In(f,!0),s){var x=[],b=[];Je("Patches").M(i,f,x,b),s(x,b)}return f}Me(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(f){for(var u=arguments.length,m=Array(u>1?u-1:0),g=1;g<u;g++)m[g-1]=arguments[g];return n.produceWithPatches(f,function(x){return i.apply(void 0,[x].concat(m))})};var s,c,p=n.produce(i,a,function(f,u){s=f,c=u});return typeof Promise<"u"&&p instanceof Promise?p.then(function(f){return[f,s,c]}):[p,s,c]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var e=t.prototype;return e.createDraft=function(o){je(o)||Me(8),ft(o)&&(o=td(o));var n=pl(this),i=Rn(this,o,void 0);return i[q].C=!0,An(n),i},e.finishDraft=function(o,n){var i=o&&o[q],a=i.A;return Sn(a,n),On(void 0,a)},e.setAutoFreeze=function(o){this.D=o},e.setUseProxies=function(o){o&&!yl&&Me(20),this.O=o},e.applyPatches=function(o,n){var i;for(i=n.length-1;i>=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){o=a.value;break}}i>-1&&(n=n.slice(i+1));var s=Je("Patches").$;return ft(o)?s(o,n):this.produce(o,function(c){return s(c,n)})},t}(),ke=new id,ad=ke.produce,Tb=ke.produceWithPatches.bind(ke),Pb=ke.setAutoFreeze.bind(ke),Ib=ke.setUseProxies.bind(ke),kb=ke.applyPatches.bind(ke),_b=ke.createDraft.bind(ke),Db=ke.finishDraft.bind(ke),Ro=ad;function wt(t){"@babel/helpers - typeof";return wt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wt(t)}function Dn(t,e){if(wt(t)!=="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var n=o.call(t,e||"default");if(wt(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function $n(t){var e=Dn(t,"string");return wt(e)==="symbol"?e:String(e)}function Bn(t,e,o){return e=$n(e),e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function Cl(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),o.push.apply(o,n)}return o}function No(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?Cl(Object(o),!0).forEach(function(n){Bn(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):Cl(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function pe(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var El=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Un=function(){return Math.random().toString(36).substring(7).split("").join(".")},Lo={INIT:"@@redux/INIT"+Un(),REPLACE:"@@redux/REPLACE"+Un(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Un()}};function sd(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Mn(t,e,o){var n;if(typeof e=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(pe(0));if(typeof e=="function"&&typeof o>"u"&&(o=e,e=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(pe(1));return o(Mn)(t,e)}if(typeof t!="function")throw new Error(pe(2));var i=t,a=e,s=[],c=s,p=!1;function f(){c===s&&(c=s.slice())}function u(){if(p)throw new Error(pe(3));return a}function m(S){if(typeof S!="function")throw new Error(pe(4));if(p)throw new Error(pe(5));var L=!0;return f(),c.push(S),function(){if(L){if(p)throw new Error(pe(6));L=!1,f();var R=c.indexOf(S);c.splice(R,1),s=null}}}function g(S){if(!sd(S))throw new Error(pe(7));if(typeof S.type>"u")throw new Error(pe(8));if(p)throw new Error(pe(9));try{p=!0,a=i(a,S)}finally{p=!1}for(var L=s=c,A=0;A<L.length;A++){var R=L[A];R()}return S}function x(S){if(typeof S!="function")throw new Error(pe(10));i=S,g({type:Lo.REPLACE})}function b(){var S,L=m;return S={subscribe:function(R){if(typeof R!="object"||R===null)throw new Error(pe(11));function I(){R.next&&R.next(u())}I();var P=L(I);return{unsubscribe:P}}},S[El]=function(){return this},S}return g({type:Lo.INIT}),n={dispatch:g,subscribe:m,getState:u,replaceReducer:x},n[El]=b,n}function ld(t){Object.keys(t).forEach(function(e){var o=t[e],n=o(void 0,{type:Lo.INIT});if(typeof n>"u")throw new Error(pe(12));if(typeof o(void 0,{type:Lo.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(pe(13))})}function wl(t){for(var e=Object.keys(t),o={},n=0;n<e.length;n++){var i=e[n];typeof t[i]=="function"&&(o[i]=t[i])}var a=Object.keys(o),s,c;try{ld(o)}catch(p){c=p}return function(f,u){if(f===void 0&&(f={}),c)throw c;if(0)var m;for(var g=!1,x={},b=0;b<a.length;b++){var S=a[b],L=o[S],A=f[S],R=L(A,u);if(typeof R>"u"){var I=u&&u.type;throw new Error(pe(14))}x[S]=R,g=g||R!==A}return g=g||a.length!==Object.keys(f).length,g?x:f}}function gr(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return e.length===0?function(n){return n}:e.length===1?e[0]:e.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function Al(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),a=function(){throw new Error(pe(15))},s={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},c=e.map(function(p){return p(s)});return a=gr.apply(void 0,c)(i.dispatch),No(No({},i),{},{dispatch:a})}}}function Rl(t){var e=function(n){var i=n.dispatch,a=n.getState;return function(s){return function(c){return typeof c=="function"?c(i,a,t):s(c)}}};return e}var Nl=Rl();Nl.withExtraArgument=Rl;var Fn=Nl;var kl=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,o)};return function(e,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");t(e,o);function n(){this.constructor=e}e.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),cd=function(t,e){var o={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(f){return function(u){return p([f,u])}}function p(f){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(a=f[0]&2?i.return:f[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,f[1])).done)return a;switch(i=0,a&&(f=[f[0]&2,a.value]),f[0]){case 0:case 1:a=f;break;case 4:return o.label++,{value:f[1],done:!1};case 5:o.label++,i=f[1],f=[0];continue;case 7:f=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!(a=a.length>0&&a[a.length-1])&&(f[0]===6||f[0]===2)){o=0;continue}if(f[0]===3&&(!a||f[1]>a[0]&&f[1]<a[3])){o.label=f[1];break}if(f[0]===6&&o.label<a[1]){o.label=a[1],a=f;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(f);break}a[2]&&o.ops.pop(),o.trys.pop();continue}f=e.call(t,o)}catch(u){f=[6,u],i=0}finally{n=a=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},br=function(t,e){for(var o=0,n=e.length,i=t.length;o<n;o++,i++)t[i]=e[o];return t},dd=Object.defineProperty,pd=Object.defineProperties,fd=Object.getOwnPropertyDescriptors,Ll=Object.getOwnPropertySymbols,ud=Object.prototype.hasOwnProperty,hd=Object.prototype.propertyIsEnumerable,Tl=function(t,e,o){return e in t?dd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o},At=function(t,e){for(var o in e||(e={}))ud.call(e,o)&&Tl(t,o,e[o]);if(Ll)for(var n=0,i=Ll(e);n<i.length;n++){var o=i[n];hd.call(e,o)&&Tl(t,o,e[o])}return t},zn=function(t,e){return pd(t,fd(e))},md=function(t,e,o){return new Promise(function(n,i){var a=function(p){try{c(o.next(p))}catch(f){i(f)}},s=function(p){try{c(o.throw(p))}catch(f){i(f)}},c=function(p){return p.done?n(p.value):Promise.resolve(p.value).then(a,s)};c((o=o.apply(t,e)).next())})};var yd=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?gr:gr.apply(null,arguments)},Jb=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function gd(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var o=e;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return e===o}var bd=function(t){kl(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},e.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(e.bind.apply(e,br([void 0],o[0].concat(this)))):new(e.bind.apply(e,br([void 0],o.concat(this))))},e}(Array),xd=function(t){kl(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},e.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(e.bind.apply(e,br([void 0],o[0].concat(this)))):new(e.bind.apply(e,br([void 0],o.concat(this))))},e}(Array);function Vn(t){return je(t)?Ro(t,function(){}):t}function vd(t){return typeof t=="boolean"}function Sd(){return function(e){return Od(e)}}function Od(t){t===void 0&&(t={});var e=t.thunk,o=e===void 0?!0:e,n=t.immutableCheck,i=n===void 0?!0:n,a=t.serializableCheck,s=a===void 0?!0:a,c=new bd;if(o&&(vd(o)?c.push(Fn):c.push(Fn.withExtraArgument(o.extraArgument))),0){if(i)var p;if(s)var f}return c}var Wn=!0;function _l(t){var e=Sd(),o=t||{},n=o.reducer,i=n===void 0?void 0:n,a=o.middleware,s=a===void 0?e():a,c=o.devTools,p=c===void 0?!0:c,f=o.preloadedState,u=f===void 0?void 0:f,m=o.enhancers,g=m===void 0?void 0:m,x;if(typeof i=="function")x=i;else if(gd(i))x=wl(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=s;if(typeof b=="function"&&(b=b(e),!Wn&&!Array.isArray(b)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Wn&&b.some(function(P){return typeof P!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=Al.apply(void 0,b),L=gr;p&&(L=yd(At({trace:!Wn},typeof p=="object"&&p)));var A=new xd(S),R=A;Array.isArray(g)?R=br([S],g):typeof g=="function"&&(R=g(A));var I=L.apply(void 0,R);return Mn(x,u,I)}function Rt(t,e){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(e){var a=e.apply(void 0,n);if(!a)throw new Error("prepareAction did not return an object");return At(At({type:t,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:t,payload:n[0]}}return o.toString=function(){return""+t},o.type=t,o.match=function(n){return n.type===t},o}function Dl(t){var e={},o=[],n,i={addCase:function(a,s){var c=typeof a=="string"?a:a.type;if(c in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[c]=s,i},addMatcher:function(a,s){return o.push({matcher:a,reducer:s}),i},addDefaultCase:function(a){return n=a,i}};return t(i),[e,o,n]}function Cd(t){return typeof t=="function"}function Ed(t,e,o,n){o===void 0&&(o=[]);var i=typeof e=="function"?Dl(e):[e,o,n],a=i[0],s=i[1],c=i[2],p;if(Cd(t))p=function(){return Vn(t())};else{var f=Vn(t);p=function(){return f}}function u(m,g){m===void 0&&(m=p());var x=br([a[g.type]],s.filter(function(b){var S=b.matcher;return S(g)}).map(function(b){var S=b.reducer;return S}));return x.filter(function(b){return!!b}).length===0&&(x=[c]),x.reduce(function(b,S){if(S)if(ft(b)){var L=b,A=S(L,g);return A===void 0?b:A}else{if(je(b))return Ro(b,function(R){return S(R,g)});var A=S(b,g);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},m)}return u.getInitialState=p,u}function wd(t,e){return t+"/"+e}function $l(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof t.initialState=="function"?t.initialState:Vn(t.initialState),n=t.reducers||{},i=Object.keys(n),a={},s={},c={};i.forEach(function(u){var m=n[u],g=wd(e,u),x,b;"reducer"in m?(x=m.reducer,b=m.prepare):x=m,a[u]=x,s[g]=x,c[u]=b?Rt(g,b):Rt(g)});function p(){var u=typeof t.extraReducers=="function"?Dl(t.extraReducers):[t.extraReducers],m=u[0],g=m===void 0?{}:m,x=u[1],b=x===void 0?[]:x,S=u[2],L=S===void 0?void 0:S,A=At(At({},g),s);return Ed(o,function(R){for(var I in A)R.addCase(I,A[I]);for(var P=0,F=b;P<F.length;P++){var be=F[P];R.addMatcher(be.matcher,be.reducer)}L&&R.addDefaultCase(L)})}var f;return{name:e,reducer:function(u,m){return f||(f=p()),f(u,m)},actions:c,caseReducers:a,getInitialState:function(){return f||(f=p()),f.getInitialState()}}}var Ad="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Rd=function(t){t===void 0&&(t=21);for(var e="",o=t;o--;)e+=Ad[Math.random()*64|0];return e},Nd=["name","message","stack","code"],Hn=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Pl=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Ld=function(t){if(typeof t=="object"&&t!==null){for(var e={},o=0,n=Nd;o<n.length;o++){var i=n[o];typeof t[i]=="string"&&(e[i]=t[i])}return e}return{message:String(t)}},ox=function(){function t(e,o,n){var i=Rt(e+"/fulfilled",function(u,m,g,x){return{payload:u,meta:zn(At({},x||{}),{arg:g,requestId:m,requestStatus:"fulfilled"})}}),a=Rt(e+"/pending",function(u,m,g){return{payload:void 0,meta:zn(At({},g||{}),{arg:m,requestId:u,requestStatus:"pending"})}}),s=Rt(e+"/rejected",function(u,m,g,x,b){return{payload:x,error:(n&&n.serializeError||Ld)(u||"Rejected"),meta:zn(At({},b||{}),{arg:g,requestId:m,rejectedWithValue:!!x,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"})}}),c=!1,p=typeof AbortController<"u"?AbortController:function(){function u(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return u.prototype.abort=function(){},u}();function f(u){return function(m,g,x){var b=n?.idGenerator?n.idGenerator(u):Rd(),S=new p,L,A=!1;function R(P){L=P,S.abort()}var I=function(){return md(this,null,function(){var P,F,be,re,vr,De,h;return cd(this,function(v){switch(v.label){case 0:return v.trys.push([0,4,,5]),re=(P=n?.condition)==null?void 0:P.call(n,u,{getState:g,extra:x}),Pd(re)?[4,re]:[3,2];case 1:re=v.sent(),v.label=2;case 2:if(re===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return A=!0,vr=new Promise(function(T,j){return S.signal.addEventListener("abort",function(){return j({name:"AbortError",message:L||"Aborted"})})}),m(a(b,u,(F=n?.getPendingMeta)==null?void 0:F.call(n,{requestId:b,arg:u},{getState:g,extra:x}))),[4,Promise.race([vr,Promise.resolve(o(u,{dispatch:m,getState:g,extra:x,requestId:b,signal:S.signal,abort:R,rejectWithValue:function(T,j){return new Hn(T,j)},fulfillWithValue:function(T,j){return new Pl(T,j)}})).then(function(T){if(T instanceof Hn)throw T;return T instanceof Pl?i(T.payload,b,u,T.meta):i(T,b,u)})])];case 3:return be=v.sent(),[3,5];case 4:return De=v.sent(),be=De instanceof Hn?s(null,b,u,De.payload,De.meta):s(De,b,u),[3,5];case 5:return h=n&&!n.dispatchConditionRejection&&s.match(be)&&be.meta.condition,h||m(be),[2,be]}})})}();return Object.assign(I,{abort:R,requestId:b,arg:u,unwrap:function(){return I.then(Td)}})}}return Object.assign(f,{pending:a,rejected:s,fulfilled:i,typePrefix:e})}return t.withTypes=function(){return t},t}();function Td(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Pd(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Bl="listener",Ul="completed",Ml="cancelled",nx="task-"+Ml,ix="task-"+Ul,ax=Bl+"-"+Ml,sx=Bl+"-"+Ul;var jn="listenerMiddleware";var lx=Rt(jn+"/add"),cx=Rt(jn+"/removeAll"),dx=Rt(jn+"/remove");var Il,px=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(Il||(Il=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},Id=function(t){return function(e){setTimeout(e,t)}},fx=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Id(10);vl();window.ftReduxStores||(window.ftReduxStores={});var Fl=class t{static get(e){var o;let n=typeof e=="string"?e:e.name,i=typeof e=="string"?void 0:e,a=window.ftReduxStores[n];if(Ur(a))return a;if(i==null)return;let s=$l({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),c=_l({reducer:(p,f)=>f.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof f.type=="string"&&f.type.startsWith("DEFAULT_VALUE_SETTER__")?{...p,...f.overwrites}:s.reducer(p,f)});return window.ftReduxStores[i.name]=new t(s,c)}constructor(e,o){this.reduxSlice=e,this.reduxStore=o,this.isFtReduxStore=!0,this.eventBus=document.createElement("event-bus"),this.commands=new bo,this.actions=new Proxy(this.reduxSlice.actions,{get:(n,i,a)=>{let s=i,c=n[s];return c?(...p)=>{let f=c(...p);return this.reduxStore.dispatch(f),f}:p=>{this.setState({[s]:p})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var ko=y(N());var To=class extends pt{async listMySearches(){let e=k.getState().session;return e?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var Po=class extends pt{async listMyBookmarks(){let e=k.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var _d="ft-user-assets",Io=ko.FtReduxStore.get({name:_d,initialState:{savedSearches:void 0,bookmarks:void 0}}),Gn=class{constructor(){this.currentSession=k.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Po,this.savedSearchesService=new To,k.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:o}=k.getState();(0,ko.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Io.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Io.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Io.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let o=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Io.actions.bookmarks(o)}}},zx=new Gn;var Kn=class{addCommand(e,o=!1){k.commands.add(e,o)}consumeCommand(e){return k.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Kn;var zl=y(N()),Zn=class{highlightHtml(e,o){(0,zl.highlightHtml)(e,o)}};window.FluidTopicsHighlightHtmlService=new Zn;var Wl=y(N());var qn=class{isDate(e){var o,n,i,a;return(a=(i=((n=(o=k.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(c=>c.key===e))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1}format(e,o){var n,i,a;return Wl.DateFormatter.format(e,(n=o?.locale)!==null&&n!==void 0?n:k.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(a=o?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new qn;(0,Hl.customElement)("ft-app-context")(J);var jl=y(G()),Dd=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},Yn=Symbol("i18nAttributes"),_o=Symbol("i18nProperties"),Hr=Symbol("i18nUnsubs");function Bo(t){var e;class o extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map}get i18nService(){return this.useCustomMessageContexts?Xs:ur}i18n(i,a,...s){var c;if(typeof i=="string")return this.i18nService.resolveMessage(i,a,...s);let p=(c=i.args)!==null&&c!==void 0?c:i.argsProvider?i.argsProvider(this):[];return this.i18nService.resolveMessage(i.context,i.key,...p)}onI18nUpdate(i){var a,s;(a=this[Yn])===null||a===void 0||a.forEach((c,p)=>{var f;let u=this.getI18nAttributeValue(p);((f=u?.context)===null||f===void 0?void 0:f.toLowerCase())===i.toLowerCase()&&this.updateI18nAttributeMessage(p,u,c)}),(s=this[_o])===null||s===void 0||s.forEach((c,p)=>{c.context.toLowerCase()===i.toLowerCase()&&(this[p]=this.i18n(c))}),setTimeout(()=>this.requestUpdate(),0)}updateI18nAttributeMessage(i,a,s){this[i]={...a,message:this.i18n({context:a.context,key:a.key,...s})}}update(i){var a,s;super.update(i),(a=this[Yn])===null||a===void 0||a.forEach((c,p)=>{let f=this.getI18nAttributeValue(p);f?.context&&f.key&&(i.has(p)||c.argsProvider!=null)&&(i.has(p)&&this.addI18nContext(f.context),this.updateI18nAttributeMessage(p,f,c))}),(s=this[_o])===null||s===void 0||s.forEach((c,p)=>{c.argsProvider!=null&&(this[p]=this.i18n(c))})}getI18nAttributeValue(i){return this[i]}connectedCallback(){var i,a,s,c;super.connectedCallback(),new Set([...(a=(i=this[_o])===null||i===void 0?void 0:i.values())!==null&&a!==void 0?a:[],...[...(c=(s=this[Yn])===null||s===void 0?void 0:s.keys())!==null&&c!==void 0?c:[]].map(p=>this.getI18nAttributeValue(p))].map(p=>p?.context)).forEach(p=>p&&this.addI18nMessages(p))}addI18nMessages(i,a){i=i.toLowerCase(),this[Hr].has(i)||this[Hr].set(i,this.i18nService.subscribe(i,()=>this.onI18nUpdate(i))),this.i18nService.prepareContext(i,a??{}),this.onI18nUpdate(i)}addI18nContext(i,a){this.addI18nMessages(typeof i=="string"?i:i.name,a)}disconnectedCallback(){super.disconnectedCallback(),this[Hr].forEach(i=>i()),this[Hr].clear()}}return e=Hr,Dd([(0,jl.property)({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}var Vl=class extends Bo($o.FtLitElement){},Do=class extends Bo($o.FtLitElementRedux){};var Vr=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},Ge=class extends Do{constructor(){super(),this.editorMode=!1,this.addStore(k)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Uo.nothing:Uo.html`
|
|
1568
|
+
`}update(e){super.update(e),e.has("baseUrl")&&(k.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&k.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("uiLocale")&&k.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&k.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&k.actions.noCustom(this.noCustom),e.has("editorMode")&&k.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&k.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&k.actions.session(this.session),e.has("availableUiLocales")&&k.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(o=>ur.addContext(o)),e.has("openExternalDocumentInNewTab")&&k.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&k.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&k.actions.forcedOffline(this.forcedOffline),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){!this.withManualResources&&this.apiProvider()&&(this.session==null&&this.updateSession(),this.availableUiLocales==null&&this.updateUiLocales(),this.metadataConfiguration==null&&this.updateMetadataConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateUiLocales(){this.availableUiLocales=await this.cache.get("availableUiLocales",()=>this.apiProvider().getAvailableUiLocales())}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}};J.elementDefinitions={};J.styles=qs;ge([(0,Ue.property)()],J.prototype,"baseUrl",void 0);ge([(0,Ue.property)()],J.prototype,"apiIntegrationIdentifier",void 0);ge([(0,Ue.property)()],J.prototype,"uiLocale",void 0);ge([(0,Ve.jsonProperty)(null)],J.prototype,"availableUiLocales",void 0);ge([(0,Ve.jsonProperty)(null)],J.prototype,"metadataConfiguration",void 0);ge([(0,Ue.property)({type:Boolean})],J.prototype,"editorMode",void 0);ge([(0,Ue.property)({type:Boolean})],J.prototype,"noCustom",void 0);ge([(0,Ue.property)({type:Boolean})],J.prototype,"openExternalDocumentInNewTab",void 0);ge([(0,Ue.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],J.prototype,"noCustomComponent",void 0);ge([(0,Ue.property)({type:Boolean})],J.prototype,"withManualResources",void 0);ge([(0,Ue.property)({type:Boolean})],J.prototype,"navigatorOnline",void 0);ge([(0,Ue.property)({type:Boolean})],J.prototype,"forcedOffline",void 0);ge([(0,Ue.property)({type:Object})],J.prototype,"apiProvider",void 0);ge([(0,Ve.jsonProperty)([])],J.prototype,"messageContexts",void 0);ge([(0,Ve.jsonProperty)(void 0)],J.prototype,"session",void 0);var kd=y(G());function Zc(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var o,n,i;if(Array.isArray(t)){if(o=t.length,o!=e.length)return!1;for(n=o;n--!==0;)if(!go(t[n],e[n]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;for(n of t.entries())if(!go(n[1],e.get(n[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(i=Object.keys(t),o=i.length,o!==Object.keys(e).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[n]))return!1;for(n=o;n--!==0;){var a=i[n];if(!go(t[a],e[a]))return!1}return!0}return t!==t&&e!==e}function go(t,e){try{return Zc(t,e)}catch{return!1}}function vn(t,e){return!go(t,e)}var qc=y(G(),1);var bo=class{constructor(){this.queue=[]}add(e,o=!1){o&&(this.queue=this.queue.filter(n=>n.type!==e.type)),this.queue.push(e)}consume(e){let o=this.queue.find(n=>n.type===e);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}};var Br=y(G(),1);var Js=y(G(),1);function el(t,e){let o=()=>JSON.parse(JSON.stringify(t));return(0,Js.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:vn,...e??{}})}var xo=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,o){return this.callbacks=[e],this.debounce(o)}queue(e,o){return this.callbacks.push(e),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,o;let n=[...this.callbacks];this.callbacks=[];let i=(e=this.rejectPromise)!==null&&e!==void 0?e:()=>null,a=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let s of n)try{await s()}catch(c){i(c);return}a(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var rl=y(D(),1);var vo=window,Yc=vo.ShadowRoot&&(vo.ShadyCSS===void 0||vo.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,bb=Symbol();var tl=(t,e)=>{Yc?t.adoptedStyleSheets=e.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet):e.forEach(o=>{let n=document.createElement("style"),i=vo.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,t.appendChild(n)})};var So=class extends rl.LitElement{createRenderRoot(){let e=this.constructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,Object.entries(e.elementDefinitions).forEach(([i,a])=>e.registry.define(i,a)));let o={...e.shadowRootOptions,customElements:e.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return tl(n,e.elementStyles),n}};var Oo=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},al,ol=Symbol("constructorPrototype"),nl=Symbol("constructorName"),sl=Symbol("exportpartsDebouncer"),il=Symbol("dynamicDependenciesLoaded"),St=class extends So{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[al]=new xo(5),this[nl]=this.constructor.name,this[ol]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[nl]&&Object.setPrototypeOf(this,this[ol])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let e=this.constructor;e[il]||(e[il]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate()})}contentAvailableCallback(e){}applyCustomStylesheet(e){var o,n,i;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(a=>a.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(a){console.error(a,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let a=document.createElement("style");a.classList.add("ft-lit-element--custom-stylesheet"),a.innerHTML=this.customStylesheet,this.shadowRoot.append(a)}}scheduleExportpartsUpdate(){var e,o,n;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[sl].run(()=>{var i,a;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((a=this.exportpartsPrefixes)===null||a===void 0?void 0:a.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(e){var o,n,i,a,s,c;let p=g=>g!=null&&g.trim().length>0,f=e.filter(p).map(g=>g.trim());if(f.length===0){this.removeAttribute("exportparts");return}let u=new Set;for(let g of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let x=(a=(i=g.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&a!==void 0?a:[],b=(c=(s=g.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(S=>S.split(":")[1]))!==null&&c!==void 0?c:[];new Array(...x,...b).filter(p).map(S=>S.trim()).forEach(S=>u.add(S))}if(u.size===0){this.removeAttribute("exportparts");return}let m=[...u.values()].flatMap(g=>f.map(x=>`${g}:${x}--${g}`));this.setAttribute("exportparts",[...this.part,...m].join(", "))}};al=sl;Oo([(0,Br.property)()],St.prototype,"exportpartsPrefix",void 0);Oo([el([])],St.prototype,"exportpartsPrefixes",void 0);Oo([(0,Br.property)()],St.prototype,"customStylesheet",void 0);Oo([(0,Br.state)()],St.prototype,"useAdoptedStyleSheets",void 0);function Ur(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var ll,cl,dl,Co=Symbol("internalReduxEventsUnsubscribers"),Ot=Symbol("internalStoresUnsubscribers"),Ht=Symbol("internalStores"),Mr=class extends St{constructor(){super(...arguments),this[ll]=new Map,this[cl]=new Map,this[dl]=[]}get reduxConstructor(){return this.constructor}update(e){super.update(e),[...this.reduxConstructor.reduxReactiveProperties].some(o=>e.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[Ht].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ht].values()][0]}getStore(e){return e==null?this.getUnnamedStore():this[Ht].get(e)}addStore(e,o){var n;o=(n=o??(Ur(e)?e.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this.setupStore(o,e)}removeStore(e){let o=typeof e=="string"?e:e.name;this.unsubscribeFromStore(o),this[Ht].delete(o)}setupStore(e,o){this[Ht].set(e,o),this.subscribeToStore(e,o),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[Ht].forEach((e,o)=>this.subscribeToStore(o,e)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((e,o)=>{let n=this.constructor.getPropertyOptions(o);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:o)){let i=this.getStore(e.store);i&&(e.store?this[Ot].has(e.store):this[Ot].size>0)&&(this[o]=e.selector(i.getState(),this))}})}subscribeToStore(e,o){var n;this[Ot].set(e,o.subscribe(()=>this.updateFromStores())),Ur(o)&&o.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((i,a)=>{if(typeof this[a]=="function"&&(!i.store||o.name===i.store)){let s=c=>this[a](c);o.eventBus.addEventListener(i.eventName,s),this[Co].push(()=>o.eventBus.removeEventListener(i.eventName,s))}})),this.onStoreAvailable(e)}unsubscribeFromStores(){this[Ot].forEach((e,o)=>this.unsubscribeFromStore(o)),this[Co].forEach(e=>e()),this[Co]=[]}unsubscribeFromStore(e){this[Ot].has(e)&&this[Ot].get(e)(),this[Ot].delete(e)}onStoreAvailable(e){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};ll=Ot,cl=Ht,dl=Co;Mr.reduxProperties=new Map;Mr.reduxReactiveProperties=new Set;Mr.reduxEventListeners=new Map;function Me(t){for(var e=arguments.length,o=Array(e>1?e-1:0),n=1;n<e;n++)o[n-1]=arguments[n];if(0)var i,a;throw Error("[Immer] minified error nr: "+t+(o.length?" "+o.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ft(t){return!!t&&!!t[q]}function je(t){var e;return!!t&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===nd}(t)||Array.isArray(t)||!!t[gl]||!!(!((e=t.constructor)===null||e===void 0)&&e[gl])||Ln(t)||Tn(t))}function Vt(t,e,o){o===void 0&&(o=!1),yr(t)===0?(o?Object.keys:mr)(t).forEach(function(n){o&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,i){return e(i,n,t)})}function yr(t){var e=t[q];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Ln(t)?2:Tn(t)?3:0}function hr(t,e){return yr(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Xc(t,e){return yr(t)===2?t.get(e):t[e]}function bl(t,e,o){var n=yr(t);n===2?t.set(e,o):n===3?t.add(o):t[e]=o}function xl(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function Ln(t){return rd&&t instanceof Map}function Tn(t){return od&&t instanceof Set}function Ct(t){return t.o||t.t}function Pn(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Ol(t);delete e[q];for(var o=mr(e),n=0;n<o.length;n++){var i=o[n],a=e[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(e[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function In(t,e){return e===void 0&&(e=!1),kn(t)||ft(t)||!je(t)||(yr(t)>1&&(t.set=t.add=t.clear=t.delete=Qc),Object.freeze(t),e&&Vt(t,function(o,n){return In(n,!0)},!0)),t}function Qc(){Me(2)}function kn(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function Je(t){var e=Nn[t];return e||Me(18,t),e}function Jc(t,e){Nn[t]||(Nn[t]=e)}function wn(){return zr}function Sn(t,e){e&&(Je("Patches"),t.u=[],t.s=[],t.v=e)}function Eo(t){An(t),t.p.forEach(ed),t.p=null}function An(t){t===zr&&(zr=t.l)}function pl(t){return zr={p:[],l:zr,h:t,m:!0,_:0}}function ed(t){var e=t[q];e.i===0||e.i===1?e.j():e.g=!0}function On(t,e){e._=e.p.length;var o=e.p[0],n=t!==void 0&&t!==o;return e.h.O||Je("ES5").S(e,t,n),n?(o[q].P&&(Eo(e),Me(4)),je(t)&&(t=wo(e,t),e.l||Ao(e,t)),e.u&&Je("Patches").M(o[q].t,t,e.u,e.s)):t=wo(e,o,[]),Eo(e),e.u&&e.v(e.u,e.s),t!==Sl?t:void 0}function wo(t,e,o){if(kn(e))return e;var n=e[q];if(!n)return Vt(e,function(c,p){return fl(t,n,e,c,p,o)},!0),e;if(n.A!==t)return e;if(!n.P)return Ao(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=Pn(n.k):n.o,a=i,s=!1;n.i===3&&(a=new Set(i),i.clear(),s=!0),Vt(a,function(c,p){return fl(t,n,i,c,p,o,s)}),Ao(t,i,!1),o&&t.u&&Je("Patches").N(n,o,t.u,t.s)}return n.o}function fl(t,e,o,n,i,a,s){if(ft(i)){var c=wo(t,i,a&&e&&e.i!==3&&!hr(e.R,n)?a.concat(n):void 0);if(bl(o,n,c),!ft(c))return;t.m=!1}else s&&o.add(i);if(je(i)&&!kn(i)){if(!t.h.D&&t._<1)return;wo(t,i),e&&e.A.l||Ao(t,i)}}function Ao(t,e,o){o===void 0&&(o=!1),!t.l&&t.h.D&&t.m&&In(e,o)}function Cn(t,e){var o=t[q];return(o?Ct(o):t)[e]}function ul(t,e){if(e in t)for(var o=Object.getPrototypeOf(t);o;){var n=Object.getOwnPropertyDescriptor(o,e);if(n)return n;o=Object.getPrototypeOf(o)}}function Et(t){t.P||(t.P=!0,t.l&&Et(t.l))}function En(t){t.o||(t.o=Pn(t.t))}function Rn(t,e,o){var n=Ln(e)?Je("MapSet").F(e,o):Tn(e)?Je("MapSet").T(e,o):t.O?function(i,a){var s=Array.isArray(i),c={i:s?1:0,A:a?a.A:wn(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},p=c,f=Wr;s&&(p=[c],f=Fr);var u=Proxy.revocable(p,f),m=u.revoke,g=u.proxy;return c.k=g,c.j=m,g}(e,o):Je("ES5").J(e,o);return(o?o.A:wn()).p.push(n),n}function td(t){return ft(t)||Me(22,t),function e(o){if(!je(o))return o;var n,i=o[q],a=yr(o);if(i){if(!i.P&&(i.i<4||!Je("ES5").K(i)))return i.t;i.I=!0,n=hl(o,a),i.I=!1}else n=hl(o,a);return Vt(n,function(s,c){i&&Xc(i.t,s)===c||bl(n,s,e(c))}),a===3?new Set(n):n}(t)}function hl(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Pn(t)}function vl(){function t(s,c){var p=a[s];return p?p.enumerable=c:a[s]=p={configurable:!0,enumerable:c,get:function(){var f=this[q];return Wr.get(f,s)},set:function(f){var u=this[q];Wr.set(u,s,f)}},p}function e(s){for(var c=s.length-1;c>=0;c--){var p=s[c][q];if(!p.P)switch(p.i){case 5:n(p)&&Et(p);break;case 4:o(p)&&Et(p)}}}function o(s){for(var c=s.t,p=s.k,f=mr(p),u=f.length-1;u>=0;u--){var m=f[u];if(m!==q){var g=c[m];if(g===void 0&&!hr(c,m))return!0;var x=p[m],b=x&&x[q];if(b?b.t!==g:!xl(x,g))return!0}}var S=!!c[q];return f.length!==mr(c).length+(S?0:1)}function n(s){var c=s.k;if(c.length!==s.t.length)return!0;var p=Object.getOwnPropertyDescriptor(c,c.length-1);if(p&&!p.get)return!0;for(var f=0;f<c.length;f++)if(!c.hasOwnProperty(f))return!0;return!1}function i(s){s.g&&Me(3,JSON.stringify(Ct(s)))}var a={};Jc("ES5",{J:function(s,c){var p=Array.isArray(s),f=function(m,g){if(m){for(var x=Array(g.length),b=0;b<g.length;b++)Object.defineProperty(x,""+b,t(b,!0));return x}var S=Ol(g);delete S[q];for(var L=mr(S),A=0;A<L.length;A++){var R=L[A];S[R]=t(R,m||!!S[R].enumerable)}return Object.create(Object.getPrototypeOf(g),S)}(p,s),u={i:p?5:4,A:c?c.A:wn(),P:!1,I:!1,R:{},l:c,t:s,k:f,o:null,g:!1,C:!1};return Object.defineProperty(f,q,{value:u,writable:!0}),f},S:function(s,c,p){p?ft(c)&&c[q].A===s&&e(s.p):(s.u&&function f(u){if(u&&typeof u=="object"){var m=u[q];if(m){var g=m.t,x=m.k,b=m.R,S=m.i;if(S===4)Vt(x,function(P){P!==q&&(g[P]!==void 0||hr(g,P)?b[P]||f(x[P]):(b[P]=!0,Et(m)))}),Vt(g,function(P){x[P]!==void 0||hr(x,P)||(b[P]=!1,Et(m))});else if(S===5){if(n(m)&&(Et(m),b.length=!0),x.length<g.length)for(var L=x.length;L<g.length;L++)b[L]=!1;else for(var A=g.length;A<x.length;A++)b[A]=!0;for(var R=Math.min(x.length,g.length),I=0;I<R;I++)x.hasOwnProperty(I)||(b[I]=!0),b[I]===void 0&&f(x[I])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?o(s):n(s)}})}var ml,zr,_n=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",rd=typeof Map<"u",od=typeof Set<"u",yl=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Sl=_n?Symbol.for("immer-nothing"):((ml={})["immer-nothing"]=!0,ml),gl=_n?Symbol.for("immer-draftable"):"__$immer_draftable",q=_n?Symbol.for("immer-state"):"__$immer_state";var nd=""+Object.prototype.constructor,mr=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Ol=Object.getOwnPropertyDescriptors||function(t){var e={};return mr(t).forEach(function(o){e[o]=Object.getOwnPropertyDescriptor(t,o)}),e},Nn={},Wr={get:function(t,e){if(e===q)return t;var o=Ct(t);if(!hr(o,e))return function(i,a,s){var c,p=ul(a,s);return p?"value"in p?p.value:(c=p.get)===null||c===void 0?void 0:c.call(i.k):void 0}(t,o,e);var n=o[e];return t.I||!je(n)?n:n===Cn(t.t,e)?(En(t),t.o[e]=Rn(t.A.h,n,t)):n},has:function(t,e){return e in Ct(t)},ownKeys:function(t){return Reflect.ownKeys(Ct(t))},set:function(t,e,o){var n=ul(Ct(t),e);if(n?.set)return n.set.call(t.k,o),!0;if(!t.P){var i=Cn(Ct(t),e),a=i?.[q];if(a&&a.t===o)return t.o[e]=o,t.R[e]=!1,!0;if(xl(o,i)&&(o!==void 0||hr(t.t,e)))return!0;En(t),Et(t)}return t.o[e]===o&&(o!==void 0||e in t.o)||Number.isNaN(o)&&Number.isNaN(t.o[e])||(t.o[e]=o,t.R[e]=!0),!0},deleteProperty:function(t,e){return Cn(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,En(t),Et(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var o=Ct(t),n=Reflect.getOwnPropertyDescriptor(o,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:o[e]}},defineProperty:function(){Me(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Me(12)}},Fr={};Vt(Wr,function(t,e){Fr[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Fr.deleteProperty=function(t,e){return Fr.set.call(this,t,e,void 0)},Fr.set=function(t,e,o){return Wr.set.call(this,t[0],e,o,t[0])};var id=function(){function t(o){var n=this;this.O=yl,this.D=!0,this.produce=function(i,a,s){if(typeof i=="function"&&typeof a!="function"){var c=a;a=i;var p=n;return function(S){var L=this;S===void 0&&(S=c);for(var A=arguments.length,R=Array(A>1?A-1:0),I=1;I<A;I++)R[I-1]=arguments[I];return p.produce(S,function(P){var F;return(F=a).call.apply(F,[L,P].concat(R))})}}var f;if(typeof a!="function"&&Me(6),s!==void 0&&typeof s!="function"&&Me(7),je(i)){var u=pl(n),m=Rn(n,i,void 0),g=!0;try{f=a(m),g=!1}finally{g?Eo(u):An(u)}return typeof Promise<"u"&&f instanceof Promise?f.then(function(S){return Sn(u,s),On(S,u)},function(S){throw Eo(u),S}):(Sn(u,s),On(f,u))}if(!i||typeof i!="object"){if((f=a(i))===void 0&&(f=i),f===Sl&&(f=void 0),n.D&&In(f,!0),s){var x=[],b=[];Je("Patches").M(i,f,x,b),s(x,b)}return f}Me(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(f){for(var u=arguments.length,m=Array(u>1?u-1:0),g=1;g<u;g++)m[g-1]=arguments[g];return n.produceWithPatches(f,function(x){return i.apply(void 0,[x].concat(m))})};var s,c,p=n.produce(i,a,function(f,u){s=f,c=u});return typeof Promise<"u"&&p instanceof Promise?p.then(function(f){return[f,s,c]}):[p,s,c]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var e=t.prototype;return e.createDraft=function(o){je(o)||Me(8),ft(o)&&(o=td(o));var n=pl(this),i=Rn(this,o,void 0);return i[q].C=!0,An(n),i},e.finishDraft=function(o,n){var i=o&&o[q],a=i.A;return Sn(a,n),On(void 0,a)},e.setAutoFreeze=function(o){this.D=o},e.setUseProxies=function(o){o&&!yl&&Me(20),this.O=o},e.applyPatches=function(o,n){var i;for(i=n.length-1;i>=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){o=a.value;break}}i>-1&&(n=n.slice(i+1));var s=Je("Patches").$;return ft(o)?s(o,n):this.produce(o,function(c){return s(c,n)})},t}(),ke=new id,ad=ke.produce,Tb=ke.produceWithPatches.bind(ke),Pb=ke.setAutoFreeze.bind(ke),Ib=ke.setUseProxies.bind(ke),kb=ke.applyPatches.bind(ke),_b=ke.createDraft.bind(ke),Db=ke.finishDraft.bind(ke),Ro=ad;function wt(t){"@babel/helpers - typeof";return wt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wt(t)}function Dn(t,e){if(wt(t)!=="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var n=o.call(t,e||"default");if(wt(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function $n(t){var e=Dn(t,"string");return wt(e)==="symbol"?e:String(e)}function Bn(t,e,o){return e=$n(e),e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function Cl(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),o.push.apply(o,n)}return o}function No(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?Cl(Object(o),!0).forEach(function(n){Bn(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):Cl(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function pe(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var El=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Un=function(){return Math.random().toString(36).substring(7).split("").join(".")},Lo={INIT:"@@redux/INIT"+Un(),REPLACE:"@@redux/REPLACE"+Un(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Un()}};function sd(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Mn(t,e,o){var n;if(typeof e=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(pe(0));if(typeof e=="function"&&typeof o>"u"&&(o=e,e=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(pe(1));return o(Mn)(t,e)}if(typeof t!="function")throw new Error(pe(2));var i=t,a=e,s=[],c=s,p=!1;function f(){c===s&&(c=s.slice())}function u(){if(p)throw new Error(pe(3));return a}function m(S){if(typeof S!="function")throw new Error(pe(4));if(p)throw new Error(pe(5));var L=!0;return f(),c.push(S),function(){if(L){if(p)throw new Error(pe(6));L=!1,f();var R=c.indexOf(S);c.splice(R,1),s=null}}}function g(S){if(!sd(S))throw new Error(pe(7));if(typeof S.type>"u")throw new Error(pe(8));if(p)throw new Error(pe(9));try{p=!0,a=i(a,S)}finally{p=!1}for(var L=s=c,A=0;A<L.length;A++){var R=L[A];R()}return S}function x(S){if(typeof S!="function")throw new Error(pe(10));i=S,g({type:Lo.REPLACE})}function b(){var S,L=m;return S={subscribe:function(R){if(typeof R!="object"||R===null)throw new Error(pe(11));function I(){R.next&&R.next(u())}I();var P=L(I);return{unsubscribe:P}}},S[El]=function(){return this},S}return g({type:Lo.INIT}),n={dispatch:g,subscribe:m,getState:u,replaceReducer:x},n[El]=b,n}function ld(t){Object.keys(t).forEach(function(e){var o=t[e],n=o(void 0,{type:Lo.INIT});if(typeof n>"u")throw new Error(pe(12));if(typeof o(void 0,{type:Lo.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(pe(13))})}function wl(t){for(var e=Object.keys(t),o={},n=0;n<e.length;n++){var i=e[n];typeof t[i]=="function"&&(o[i]=t[i])}var a=Object.keys(o),s,c;try{ld(o)}catch(p){c=p}return function(f,u){if(f===void 0&&(f={}),c)throw c;if(0)var m;for(var g=!1,x={},b=0;b<a.length;b++){var S=a[b],L=o[S],A=f[S],R=L(A,u);if(typeof R>"u"){var I=u&&u.type;throw new Error(pe(14))}x[S]=R,g=g||R!==A}return g=g||a.length!==Object.keys(f).length,g?x:f}}function gr(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return e.length===0?function(n){return n}:e.length===1?e[0]:e.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function Al(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),a=function(){throw new Error(pe(15))},s={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},c=e.map(function(p){return p(s)});return a=gr.apply(void 0,c)(i.dispatch),No(No({},i),{},{dispatch:a})}}}function Rl(t){var e=function(n){var i=n.dispatch,a=n.getState;return function(s){return function(c){return typeof c=="function"?c(i,a,t):s(c)}}};return e}var Nl=Rl();Nl.withExtraArgument=Rl;var Fn=Nl;var kl=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,o)};return function(e,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");t(e,o);function n(){this.constructor=e}e.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),cd=function(t,e){var o={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(f){return function(u){return p([f,u])}}function p(f){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(a=f[0]&2?i.return:f[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,f[1])).done)return a;switch(i=0,a&&(f=[f[0]&2,a.value]),f[0]){case 0:case 1:a=f;break;case 4:return o.label++,{value:f[1],done:!1};case 5:o.label++,i=f[1],f=[0];continue;case 7:f=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!(a=a.length>0&&a[a.length-1])&&(f[0]===6||f[0]===2)){o=0;continue}if(f[0]===3&&(!a||f[1]>a[0]&&f[1]<a[3])){o.label=f[1];break}if(f[0]===6&&o.label<a[1]){o.label=a[1],a=f;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(f);break}a[2]&&o.ops.pop(),o.trys.pop();continue}f=e.call(t,o)}catch(u){f=[6,u],i=0}finally{n=a=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},br=function(t,e){for(var o=0,n=e.length,i=t.length;o<n;o++,i++)t[i]=e[o];return t},dd=Object.defineProperty,pd=Object.defineProperties,fd=Object.getOwnPropertyDescriptors,Ll=Object.getOwnPropertySymbols,ud=Object.prototype.hasOwnProperty,hd=Object.prototype.propertyIsEnumerable,Tl=function(t,e,o){return e in t?dd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o},At=function(t,e){for(var o in e||(e={}))ud.call(e,o)&&Tl(t,o,e[o]);if(Ll)for(var n=0,i=Ll(e);n<i.length;n++){var o=i[n];hd.call(e,o)&&Tl(t,o,e[o])}return t},zn=function(t,e){return pd(t,fd(e))},md=function(t,e,o){return new Promise(function(n,i){var a=function(p){try{c(o.next(p))}catch(f){i(f)}},s=function(p){try{c(o.throw(p))}catch(f){i(f)}},c=function(p){return p.done?n(p.value):Promise.resolve(p.value).then(a,s)};c((o=o.apply(t,e)).next())})};var yd=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?gr:gr.apply(null,arguments)},Jb=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function gd(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var o=e;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return e===o}var bd=function(t){kl(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},e.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(e.bind.apply(e,br([void 0],o[0].concat(this)))):new(e.bind.apply(e,br([void 0],o.concat(this))))},e}(Array),xd=function(t){kl(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},e.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(e.bind.apply(e,br([void 0],o[0].concat(this)))):new(e.bind.apply(e,br([void 0],o.concat(this))))},e}(Array);function Vn(t){return je(t)?Ro(t,function(){}):t}function vd(t){return typeof t=="boolean"}function Sd(){return function(e){return Od(e)}}function Od(t){t===void 0&&(t={});var e=t.thunk,o=e===void 0?!0:e,n=t.immutableCheck,i=n===void 0?!0:n,a=t.serializableCheck,s=a===void 0?!0:a,c=new bd;if(o&&(vd(o)?c.push(Fn):c.push(Fn.withExtraArgument(o.extraArgument))),0){if(i)var p;if(s)var f}return c}var Wn=!0;function _l(t){var e=Sd(),o=t||{},n=o.reducer,i=n===void 0?void 0:n,a=o.middleware,s=a===void 0?e():a,c=o.devTools,p=c===void 0?!0:c,f=o.preloadedState,u=f===void 0?void 0:f,m=o.enhancers,g=m===void 0?void 0:m,x;if(typeof i=="function")x=i;else if(gd(i))x=wl(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=s;if(typeof b=="function"&&(b=b(e),!Wn&&!Array.isArray(b)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Wn&&b.some(function(P){return typeof P!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=Al.apply(void 0,b),L=gr;p&&(L=yd(At({trace:!Wn},typeof p=="object"&&p)));var A=new xd(S),R=A;Array.isArray(g)?R=br([S],g):typeof g=="function"&&(R=g(A));var I=L.apply(void 0,R);return Mn(x,u,I)}function Rt(t,e){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(e){var a=e.apply(void 0,n);if(!a)throw new Error("prepareAction did not return an object");return At(At({type:t,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:t,payload:n[0]}}return o.toString=function(){return""+t},o.type=t,o.match=function(n){return n.type===t},o}function Dl(t){var e={},o=[],n,i={addCase:function(a,s){var c=typeof a=="string"?a:a.type;if(c in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[c]=s,i},addMatcher:function(a,s){return o.push({matcher:a,reducer:s}),i},addDefaultCase:function(a){return n=a,i}};return t(i),[e,o,n]}function Cd(t){return typeof t=="function"}function Ed(t,e,o,n){o===void 0&&(o=[]);var i=typeof e=="function"?Dl(e):[e,o,n],a=i[0],s=i[1],c=i[2],p;if(Cd(t))p=function(){return Vn(t())};else{var f=Vn(t);p=function(){return f}}function u(m,g){m===void 0&&(m=p());var x=br([a[g.type]],s.filter(function(b){var S=b.matcher;return S(g)}).map(function(b){var S=b.reducer;return S}));return x.filter(function(b){return!!b}).length===0&&(x=[c]),x.reduce(function(b,S){if(S)if(ft(b)){var L=b,A=S(L,g);return A===void 0?b:A}else{if(je(b))return Ro(b,function(R){return S(R,g)});var A=S(b,g);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},m)}return u.getInitialState=p,u}function wd(t,e){return t+"/"+e}function $l(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof t.initialState=="function"?t.initialState:Vn(t.initialState),n=t.reducers||{},i=Object.keys(n),a={},s={},c={};i.forEach(function(u){var m=n[u],g=wd(e,u),x,b;"reducer"in m?(x=m.reducer,b=m.prepare):x=m,a[u]=x,s[g]=x,c[u]=b?Rt(g,b):Rt(g)});function p(){var u=typeof t.extraReducers=="function"?Dl(t.extraReducers):[t.extraReducers],m=u[0],g=m===void 0?{}:m,x=u[1],b=x===void 0?[]:x,S=u[2],L=S===void 0?void 0:S,A=At(At({},g),s);return Ed(o,function(R){for(var I in A)R.addCase(I,A[I]);for(var P=0,F=b;P<F.length;P++){var be=F[P];R.addMatcher(be.matcher,be.reducer)}L&&R.addDefaultCase(L)})}var f;return{name:e,reducer:function(u,m){return f||(f=p()),f(u,m)},actions:c,caseReducers:a,getInitialState:function(){return f||(f=p()),f.getInitialState()}}}var Ad="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Rd=function(t){t===void 0&&(t=21);for(var e="",o=t;o--;)e+=Ad[Math.random()*64|0];return e},Nd=["name","message","stack","code"],Hn=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Pl=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Ld=function(t){if(typeof t=="object"&&t!==null){for(var e={},o=0,n=Nd;o<n.length;o++){var i=n[o];typeof t[i]=="string"&&(e[i]=t[i])}return e}return{message:String(t)}},ox=function(){function t(e,o,n){var i=Rt(e+"/fulfilled",function(u,m,g,x){return{payload:u,meta:zn(At({},x||{}),{arg:g,requestId:m,requestStatus:"fulfilled"})}}),a=Rt(e+"/pending",function(u,m,g){return{payload:void 0,meta:zn(At({},g||{}),{arg:m,requestId:u,requestStatus:"pending"})}}),s=Rt(e+"/rejected",function(u,m,g,x,b){return{payload:x,error:(n&&n.serializeError||Ld)(u||"Rejected"),meta:zn(At({},b||{}),{arg:g,requestId:m,rejectedWithValue:!!x,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"})}}),c=!1,p=typeof AbortController<"u"?AbortController:function(){function u(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return u.prototype.abort=function(){},u}();function f(u){return function(m,g,x){var b=n?.idGenerator?n.idGenerator(u):Rd(),S=new p,L,A=!1;function R(P){L=P,S.abort()}var I=function(){return md(this,null,function(){var P,F,be,re,vr,De,h;return cd(this,function(v){switch(v.label){case 0:return v.trys.push([0,4,,5]),re=(P=n?.condition)==null?void 0:P.call(n,u,{getState:g,extra:x}),Pd(re)?[4,re]:[3,2];case 1:re=v.sent(),v.label=2;case 2:if(re===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return A=!0,vr=new Promise(function(T,j){return S.signal.addEventListener("abort",function(){return j({name:"AbortError",message:L||"Aborted"})})}),m(a(b,u,(F=n?.getPendingMeta)==null?void 0:F.call(n,{requestId:b,arg:u},{getState:g,extra:x}))),[4,Promise.race([vr,Promise.resolve(o(u,{dispatch:m,getState:g,extra:x,requestId:b,signal:S.signal,abort:R,rejectWithValue:function(T,j){return new Hn(T,j)},fulfillWithValue:function(T,j){return new Pl(T,j)}})).then(function(T){if(T instanceof Hn)throw T;return T instanceof Pl?i(T.payload,b,u,T.meta):i(T,b,u)})])];case 3:return be=v.sent(),[3,5];case 4:return De=v.sent(),be=De instanceof Hn?s(null,b,u,De.payload,De.meta):s(De,b,u),[3,5];case 5:return h=n&&!n.dispatchConditionRejection&&s.match(be)&&be.meta.condition,h||m(be),[2,be]}})})}();return Object.assign(I,{abort:R,requestId:b,arg:u,unwrap:function(){return I.then(Td)}})}}return Object.assign(f,{pending:a,rejected:s,fulfilled:i,typePrefix:e})}return t.withTypes=function(){return t},t}();function Td(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Pd(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Bl="listener",Ul="completed",Ml="cancelled",nx="task-"+Ml,ix="task-"+Ul,ax=Bl+"-"+Ml,sx=Bl+"-"+Ul;var jn="listenerMiddleware";var lx=Rt(jn+"/add"),cx=Rt(jn+"/removeAll"),dx=Rt(jn+"/remove");var Il,px=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(Il||(Il=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},Id=function(t){return function(e){setTimeout(e,t)}},fx=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Id(10);vl();window.ftReduxStores||(window.ftReduxStores={});var Fl=class t{static get(e){var o;let n=typeof e=="string"?e:e.name,i=typeof e=="string"?void 0:e,a=window.ftReduxStores[n];if(Ur(a))return a;if(i==null)return;let s=$l({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),c=_l({reducer:(p,f)=>f.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof f.type=="string"&&f.type.startsWith("DEFAULT_VALUE_SETTER__")?{...p,...f.overwrites}:s.reducer(p,f)});return window.ftReduxStores[i.name]=new t(s,c)}constructor(e,o){this.reduxSlice=e,this.reduxStore=o,this.isFtReduxStore=!0,this.eventBus=document.createElement("event-bus"),this.commands=new bo,this.actions=new Proxy(this.reduxSlice.actions,{get:(n,i,a)=>{let s=i,c=n[s];return c?(...p)=>{let f=c(...p);return this.reduxStore.dispatch(f),f}:p=>{this.setState({[s]:p})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var ko=y(N());var To=class extends pt{async listMySearches(){let e=k.getState().session;return e?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var Po=class extends pt{async listMyBookmarks(){let e=k.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var _d="ft-user-assets",Io=ko.FtReduxStore.get({name:_d,initialState:{savedSearches:void 0,bookmarks:void 0}}),Gn=class{constructor(){this.currentSession=k.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Po,this.savedSearchesService=new To,k.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:o}=k.getState();(0,ko.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Io.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Io.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Io.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let o=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Io.actions.bookmarks(o)}}},zx=new Gn;var Kn=class{addCommand(e,o=!1){k.commands.add(e,o)}consumeCommand(e){return k.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Kn;var zl=y(N()),Zn=class{highlightHtml(e,o,n){(0,zl.highlightHtml)(e,o,n)}};window.FluidTopicsHighlightHtmlService=new Zn;var Wl=y(N());var qn=class{isDate(e){var o,n,i,a;return(a=(i=((n=(o=k.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(c=>c.key===e))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1}format(e,o){var n,i,a;return Wl.DateFormatter.format(e,(n=o?.locale)!==null&&n!==void 0?n:k.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(a=o?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new qn;(0,Hl.customElement)("ft-app-context")(J);var jl=y(G()),Dd=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},Yn=Symbol("i18nAttributes"),_o=Symbol("i18nProperties"),Hr=Symbol("i18nUnsubs");function Bo(t){var e;class o extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map}get i18nService(){return this.useCustomMessageContexts?Xs:ur}i18n(i,a,...s){var c;if(typeof i=="string")return this.i18nService.resolveMessage(i,a,...s);let p=(c=i.args)!==null&&c!==void 0?c:i.argsProvider?i.argsProvider(this):[];return this.i18nService.resolveMessage(i.context,i.key,...p)}onI18nUpdate(i){var a,s;(a=this[Yn])===null||a===void 0||a.forEach((c,p)=>{var f;let u=this.getI18nAttributeValue(p);((f=u?.context)===null||f===void 0?void 0:f.toLowerCase())===i.toLowerCase()&&this.updateI18nAttributeMessage(p,u,c)}),(s=this[_o])===null||s===void 0||s.forEach((c,p)=>{c.context.toLowerCase()===i.toLowerCase()&&(this[p]=this.i18n(c))}),setTimeout(()=>this.requestUpdate(),0)}updateI18nAttributeMessage(i,a,s){this[i]={...a,message:this.i18n({context:a.context,key:a.key,...s})}}update(i){var a,s;super.update(i),(a=this[Yn])===null||a===void 0||a.forEach((c,p)=>{let f=this.getI18nAttributeValue(p);f?.context&&f.key&&(i.has(p)||c.argsProvider!=null)&&(i.has(p)&&this.addI18nContext(f.context),this.updateI18nAttributeMessage(p,f,c))}),(s=this[_o])===null||s===void 0||s.forEach((c,p)=>{c.argsProvider!=null&&(this[p]=this.i18n(c))})}getI18nAttributeValue(i){return this[i]}connectedCallback(){var i,a,s,c;super.connectedCallback(),new Set([...(a=(i=this[_o])===null||i===void 0?void 0:i.values())!==null&&a!==void 0?a:[],...[...(c=(s=this[Yn])===null||s===void 0?void 0:s.keys())!==null&&c!==void 0?c:[]].map(p=>this.getI18nAttributeValue(p))].map(p=>p?.context)).forEach(p=>p&&this.addI18nMessages(p))}addI18nMessages(i,a){i=i.toLowerCase(),this[Hr].has(i)||this[Hr].set(i,this.i18nService.subscribe(i,()=>this.onI18nUpdate(i))),this.i18nService.prepareContext(i,a??{}),this.onI18nUpdate(i)}addI18nContext(i,a){this.addI18nMessages(typeof i=="string"?i:i.name,a)}disconnectedCallback(){super.disconnectedCallback(),this[Hr].forEach(i=>i()),this[Hr].clear()}}return e=Hr,Dd([(0,jl.property)({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}var Vl=class extends Bo($o.FtLitElement){},Do=class extends Bo($o.FtLitElementRedux){};var Vr=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},Ge=class extends Do{constructor(){super(),this.editorMode=!1,this.addStore(k)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Uo.nothing:Uo.html`
|
|
1569
1569
|
<span class="ft-i18n">
|
|
1570
1570
|
${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}
|
|
1571
1571
|
</span>
|