@fluid-topics/ft-page-layout 1.2.24 → 1.2.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1709,7 +1709,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:t.extend("--ft-conte
|
|
|
1709
1709
|
`;var wr=g(L());var bl=g(L());var Ac=g(_()),gt=g(Y()),Dt=g(L());var Oc=g(_());var wc=Oc.css`
|
|
1710
1710
|
`;var er=g(L()),rs="ft-app-info",an=class extends CustomEvent{constructor(e){super("authentication-change",{detail:e})}},ns={session:(o,e)=>{(0,er.deepEqual)(o.session,e.payload)||(o.session=e.payload,setTimeout(()=>P.dispatchEvent(new an(e.payload)),0))}},P=er.FtReduxStore.get({name:rs,reducers:ns,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1}});var ue=g(L());var cn=g(L());var $e=class o{static get(e){let{baseUrl:r,apiIntegrationIdentifier:n}=P.getState(),i=e??n;if(r&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,i,!0)}static await(e){return new Promise(r=>{let n=o.get(e);if(n)r(n);else{let i=P.subscribe(()=>{n=o.get(e),n&&(i(),r(n))})}})}};var fe=class{constructor(e=!0,r){var n;this.overrideApi=r;let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new cn.CacheRegistry,this.cache=e?i.commonCache:new cn.CacheRegistry}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:$e.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):$e.await()}clearCache(){this.cache.clearAll()}};var Ec,as=Symbol("clearAfterUnitTest"),or=class extends fe{constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Ec]=()=>{this.defaultMessages={},this.cache=new ue.CacheRegistry,this.listeners={}},this.currentUiLocale=P.getState().uiLocale,P.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=P.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var n;if(e=e.toLowerCase(),Object.keys(r).length>0){let i={...(n=this.defaultMessages[e])!==null&&n!==void 0?n:{},...r};(0,ue.deepEqual)(this.defaultMessages[e],i)||(this.defaultMessages[e]=i,await this.notify(e))}await this.fetchContext(e)}resolveContext(e){var r,n;return this.fetchContext(e),(n=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(e,r){let n=e.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(e,r,...n){var i;let a=e.toLowerCase(),l=this.resolveContext(a);return new ue.ParametrizedLabelResolver((i=this.defaultMessages[a])!==null&&i!==void 0?i:{},l).resolve(r,...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(r){console.error(r)}}subscribe(e,r){var n;return e=e.toLowerCase(),this.listeners[e]=(n=this.listeners[e])!==null&&n!==void 0?n:new Set,this.listeners[e].add(r),()=>{var i;return(i=this.listeners[e])===null||i===void 0?void 0:i.delete(r)}}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(r=>(0,ue.delay)(0).then(()=>r()).catch(()=>null)))}};Ec=as;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends or{constructor(){super(async(o,e)=>(await this.awaitApi).getFluidTopicsMessageContext(o,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends or{constructor(){super(async(o,e)=>(await this.awaitApi).getCustomMessageContext(o,e))}});var ke=window.FluidTopicsI18nService,Nc=window.FluidTopicsCustomI18nService;var ct=function(o,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(o,e,r,n);else for(var s=o.length-1;s>=0;s--)(l=o[s])&&(a=(i<3?l(a):i>3?l(e,r,a):l(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},V=class extends Dt.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=()=>$e.get(),this.messageContexts=[],this.cache=new Dt.CacheRegistry,this.cleanSessionDebouncer=new Dt.Debouncer}render(){return Ac.html`
|
|
1711
1711
|
<slot></slot>
|
|
1712
|
-
`}update(e){var r,n,i,a,l;super.update(e),e.has("baseUrl")&&(P.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&P.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("uiLocale")&&P.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&P.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&P.actions.noCustom(this.noCustom),e.has("editorMode")&&P.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&P.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&P.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(s=>ke.addContext(s)),e.has("openExternalDocumentInNewTab")&&P.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&P.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&P.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(P.actions.defaultLocales((r=this.localesConfiguration)===null||r===void 0?void 0:r.defaultLocales),P.actions.availableUiLocales((i=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&i!==void 0?i:[]),P.actions.searchInAllLanguagesAllowed((l=(a=this.localesConfiguration)===null||a===void 0?void 0:a.allLanguagesAllowed)!==null&&l!==void 0?l:!1)),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}};V.elementDefinitions={};V.styles=wc;ct([(0,gt.property)()],V.prototype,"baseUrl",void 0);ct([(0,gt.property)()],V.prototype,"apiIntegrationIdentifier",void 0);ct([(0,gt.property)()],V.prototype,"uiLocale",void 0);ct([(0,Dt.jsonProperty)(null)],V.prototype,"availableUiLocales",void 0);ct([(0,Dt.jsonProperty)(null)],V.prototype,"metadataConfiguration",void 0);ct([(0,gt.property)({type:Boolean})],V.prototype,"editorMode",void 0);ct([(0,gt.property)({type:Boolean})],V.prototype,"noCustom",void 0);ct([(0,gt.property)({type:Boolean})],V.prototype,"openExternalDocumentInNewTab",void 0);ct([(0,gt.property)({converter:{fromAttribute(o){return o==="false"?!1:o==="true"||(o??!1)}}})],V.prototype,"noCustomComponent",void 0);ct([(0,gt.property)({type:Boolean})],V.prototype,"withManualResources",void 0);ct([(0,gt.property)({type:Boolean})],V.prototype,"navigatorOnline",void 0);ct([(0,gt.property)({type:Boolean})],V.prototype,"forcedOffline",void 0);ct([(0,gt.property)({type:Object})],V.prototype,"apiProvider",void 0);ct([(0,Dt.jsonProperty)([])],V.prototype,"messageContexts",void 0);ct([(0,Dt.jsonProperty)(void 0)],V.prototype,"session",void 0);ct([(0,gt.state)()],V.prototype,"localesConfiguration",void 0);var Vs=g(Y());function is(o,e){if(o===e)return!0;if(o&&e&&typeof o=="object"&&typeof e=="object"){if(o.constructor!==e.constructor)return!1;var r,n,i;if(Array.isArray(o)){if(r=o.length,r!=e.length)return!1;for(n=r;n--!==0;)if(!rr(o[n],e[n]))return!1;return!0}if(o instanceof Map&&e instanceof Map){if(o.size!==e.size)return!1;for(n of o.entries())if(!e.has(n[0]))return!1;for(n of o.entries())if(!rr(n[1],e.get(n[0])))return!1;return!0}if(o instanceof Set&&e instanceof Set){if(o.size!==e.size)return!1;for(n of o.entries())if(!e.has(n[0]))return!1;return!0}if(o.constructor===RegExp)return o.source===e.source&&o.flags===e.flags;if(o.valueOf!==Object.prototype.valueOf)return o.valueOf()===e.valueOf();if(i=Object.keys(o),r=i.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[n]))return!1;for(n=r;n--!==0;){var a=i[n];if(!rr(o[a],e[a]))return!1}return!0}return o!==o&&e!==e}function rr(o,e){try{return is(o,e)}catch{return!1}}function nr(o,e){return!rr(o,e)}var cs=g(Y(),1);var ar=class{constructor(){this.queue=[]}add(e,r=!1){r&&(this.queue=this.queue.filter(n=>n.type!==e.type)),this.queue.push(e)}consume(e){let r=this.queue.find(n=>n.type===e);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}};var No=g(Y(),1);var Rc=g(Y(),1);function Lc(o,e){let r=()=>JSON.parse(JSON.stringify(o));return(0,Rc.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return r();try{return JSON.parse(n)}catch{return r()}},toAttribute:n=>JSON.stringify(n)},hasChanged:nr,...e??{}})}var ir=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,r){return this.callbacks=[e],this.debounce(r)}queue(e,r){return this.callbacks.push(e),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,r;let n=[...this.callbacks];this.callbacks=[];let i=(e=this.rejectPromise)!==null&&e!==void 0?e:()=>null,a=(r=this.resolvePromise)!==null&&r!==void 0?r:()=>null;this.clearPromise();for(let l of n)try{await l()}catch(s){i(s);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 Ic=g(_(),1);var cr=window,ls=cr.ShadowRoot&&(cr.ShadyCSS===void 0||cr.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,zg=Symbol();var Pc=(o,e)=>{ls?o.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet):e.forEach(r=>{let n=document.createElement("style"),i=cr.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,o.appendChild(n)})};var lr=class extends Ic.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 r={...e.shadowRootOptions,customElements:e.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return Pc(n,e.elementStyles),n}};var sr=function(o,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(o,e,r,n);else for(var s=o.length-1;s>=0;s--)(l=o[s])&&(a=(i<3?l(a):i>3?l(e,r,a):l(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Tc,$c=Symbol("constructorPrototype"),kc=Symbol("constructorName"),_c=Symbol("exportpartsDebouncer"),Bc=Symbol("dynamicDependenciesLoaded"),he=class extends lr{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Tc]=new ir(5),this[kc]=this.constructor.name,this[$c]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[kc]&&Object.setPrototypeOf(this,this[$c])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(r){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",r)}let e=this.constructor;e[Bc]||(e[Bc]=!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 r,n,i;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.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,r,n;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[_c].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 r,n,i,a,l,s;let f=m=>m!=null&&m.trim().length>0,p=e.filter(f).map(m=>m.trim());if(p.length===0){this.removeAttribute("exportparts");return}let h=new Set;for(let m of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let x=(a=(i=m.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&a!==void 0?a:[],b=(s=(l=m.getAttribute("exportparts"))===null||l===void 0?void 0:l.split(",").map(S=>S.split(":")[1]))!==null&&s!==void 0?s:[];new Array(...x,...b).filter(f).map(S=>S.trim()).forEach(S=>h.add(S))}if(h.size===0){this.removeAttribute("exportparts");return}let y=[...h.values()].flatMap(m=>p.map(x=>`${m}:${x}--${m}`));this.setAttribute("exportparts",[...this.part,...y].join(", "))}};Tc=_c;sr([(0,No.property)()],he.prototype,"exportpartsPrefix",void 0);sr([Lc([])],he.prototype,"exportpartsPrefixes",void 0);sr([(0,No.property)()],he.prototype,"customStylesheet",void 0);sr([(0,No.state)()],he.prototype,"useAdoptedStyleSheets",void 0);function Ao(o){var e;return(e=o?.isFtReduxStore)!==null&&e!==void 0?e:!1}var Wc,Dc,zc,Ro=Symbol("internalReduxEventsUnsubscribers"),ye=Symbol("internalStoresUnsubscribers"),Be=Symbol("internalStores"),Lo=class extends he{constructor(){super(...arguments),this[Wc]=new Map,this[Dc]=new Map,this[zc]=new Map}get reduxConstructor(){return this.constructor}update(e){super.update(e),[...this.reduxConstructor.reduxReactiveProperties].some(r=>e.has(r))&&this.updateFromStores()}getUnnamedStore(){if(this[Be].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Be].values()][0]}getStore(e){return e==null?this.getUnnamedStore():this[Be].get(e)}addStore(e,r){var n;r=(n=r??(Ao(e)?e.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(r),this[Be].set(r,e),this.subscribeToStore(r,e),this.updateFromStores()}removeStore(e){let r=typeof e=="string"?e:e.name;this.unsubscribeFromStore(r),this[Be].delete(r)}setupStores(){this.unsubscribeFromStores(),this[Be].forEach((e,r)=>this.subscribeToStore(r,e)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((e,r)=>{let n=this.constructor.getPropertyOptions(r);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:r)){let i=this.getStore(e.store);i&&(e.store?this[ye].has(e.store):this[ye].size>0)&&(this[r]=e.selector(i.getState(),this))}})}subscribeToStore(e,r){var n;this[ye].set(e,r.subscribe(()=>this.updateFromStores())),this[Ro].set(e,[]),Ao(r)&&r.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((i,a)=>{if(typeof this[a]=="function"&&(!i.store||r.name===i.store)){let l=s=>this[a](s);r.addEventListener(i.eventName,l),this[Ro].get(e).push(()=>r.removeEventListener(i.eventName,l))}})),this.onStoreAvailable(e)}unsubscribeFromStores(){this[ye].forEach((e,r)=>this.unsubscribeFromStore(r))}unsubscribeFromStore(e){var r;this[ye].has(e)&&this[ye].get(e)(),this[ye].delete(e),(r=this[Ro].get(e))===null||r===void 0||r.forEach(n=>n()),this[Ro].delete(e)}onStoreAvailable(e){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};Wc=ye,Dc=Be,zc=Ro;Lo.reduxProperties=new Map;Lo.reduxReactiveProperties=new Set;Lo.reduxEventListeners=new Map;function kt(o){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];if(0)var i,a;throw Error("[Immer] minified error nr: "+o+(r.length?" "+r.map(function(l){return"'"+l+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function te(o){return!!o&&!!o[U]}function zt(o){var e;return!!o&&(function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===ms}(o)||Array.isArray(o)||!!o[Vc]||!!(!((e=o.constructor)===null||e===void 0)&&e[Vc])||mn(o)||gn(o))}function Te(o,e,r){r===void 0&&(r=!1),no(o)===0?(r?Object.keys:ro)(o).forEach(function(n){r&&typeof n=="symbol"||e(n,o[n],o)}):o.forEach(function(n,i){return e(i,n,o)})}function no(o){var e=o[U];return e?e.i>3?e.i-4:e.i:Array.isArray(o)?1:mn(o)?2:gn(o)?3:0}function oo(o,e){return no(o)===2?o.has(e):Object.prototype.hasOwnProperty.call(o,e)}function ss(o,e){return no(o)===2?o.get(e):o[e]}function Kc(o,e,r){var n=no(o);n===2?o.set(e,r):n===3?o.add(r):o[e]=r}function Zc(o,e){return o===e?o!==0||1/o==1/e:o!=o&&e!=e}function mn(o){return hs&&o instanceof Map}function gn(o){return ys&&o instanceof Set}function me(o){return o.o||o.t}function bn(o){if(Array.isArray(o))return Array.prototype.slice.call(o);var e=Xc(o);delete e[U];for(var r=ro(e),n=0;n<r.length;n++){var i=r[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:o[i]})}return Object.create(Object.getPrototypeOf(o),e)}function xn(o,e){return e===void 0&&(e=!1),vn(o)||te(o)||!zt(o)||(no(o)>1&&(o.set=o.add=o.clear=o.delete=ds),Object.freeze(o),e&&Te(o,function(r,n){return xn(n,!0)},!0)),o}function ds(){kt(2)}function vn(o){return o==null||typeof o!="object"||Object.isFrozen(o)}function Gt(o){var e=yn[o];return e||kt(18,o),e}function ps(o,e){yn[o]||(yn[o]=e)}function fn(){return Io}function ln(o,e){e&&(Gt("Patches"),o.u=[],o.s=[],o.v=e)}function dr(o){un(o),o.p.forEach(fs),o.p=null}function un(o){o===Io&&(Io=o.l)}function Mc(o){return Io={p:[],l:Io,h:o,m:!0,_:0}}function fs(o){var e=o[U];e.i===0||e.i===1?e.j():e.g=!0}function sn(o,e){e._=e.p.length;var r=e.p[0],n=o!==void 0&&o!==r;return e.h.O||Gt("ES5").S(e,o,n),n?(r[U].P&&(dr(e),kt(4)),zt(o)&&(o=pr(e,o),e.l||fr(e,o)),e.u&&Gt("Patches").M(r[U].t,o,e.u,e.s)):o=pr(e,r,[]),dr(e),e.u&&e.v(e.u,e.s),o!==Yc?o:void 0}function pr(o,e,r){if(vn(e))return e;var n=e[U];if(!n)return Te(e,function(s,f){return Hc(o,n,e,s,f,r)},!0),e;if(n.A!==o)return e;if(!n.P)return fr(o,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=bn(n.k):n.o,a=i,l=!1;n.i===3&&(a=new Set(i),i.clear(),l=!0),Te(a,function(s,f){return Hc(o,n,i,s,f,r,l)}),fr(o,i,!1),r&&o.u&&Gt("Patches").N(n,r,o.u,o.s)}return n.o}function Hc(o,e,r,n,i,a,l){if(te(i)){var s=pr(o,i,a&&e&&e.i!==3&&!oo(e.R,n)?a.concat(n):void 0);if(Kc(r,n,s),!te(s))return;o.m=!1}else l&&r.add(i);if(zt(i)&&!vn(i)){if(!o.h.D&&o._<1)return;pr(o,i),e&&e.A.l||fr(o,i)}}function fr(o,e,r){r===void 0&&(r=!1),!o.l&&o.h.D&&o.m&&xn(e,r)}function dn(o,e){var r=o[U];return(r?me(r):o)[e]}function Uc(o,e){if(e in o)for(var r=Object.getPrototypeOf(o);r;){var n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Object.getPrototypeOf(r)}}function ge(o){o.P||(o.P=!0,o.l&&ge(o.l))}function pn(o){o.o||(o.o=bn(o.t))}function hn(o,e,r){var n=mn(e)?Gt("MapSet").F(e,r):gn(e)?Gt("MapSet").T(e,r):o.O?function(i,a){var l=Array.isArray(i),s={i:l?1:0,A:a?a.A:fn(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},f=s,p=$o;l&&(f=[s],p=Po);var h=Proxy.revocable(f,p),y=h.revoke,m=h.proxy;return s.k=m,s.j=y,m}(e,r):Gt("ES5").J(e,r);return(r?r.A:fn()).p.push(n),n}function us(o){return te(o)||kt(22,o),function e(r){if(!zt(r))return r;var n,i=r[U],a=no(r);if(i){if(!i.P&&(i.i<4||!Gt("ES5").K(i)))return i.t;i.I=!0,n=Fc(r,a),i.I=!1}else n=Fc(r,a);return Te(n,function(l,s){i&&ss(i.t,l)===s||Kc(n,l,e(s))}),a===3?new Set(n):n}(o)}function Fc(o,e){switch(e){case 2:return new Map(o);case 3:return Array.from(o)}return bn(o)}function qc(){function o(l,s){var f=a[l];return f?f.enumerable=s:a[l]=f={configurable:!0,enumerable:s,get:function(){var p=this[U];return $o.get(p,l)},set:function(p){var h=this[U];$o.set(h,l,p)}},f}function e(l){for(var s=l.length-1;s>=0;s--){var f=l[s][U];if(!f.P)switch(f.i){case 5:n(f)&&ge(f);break;case 4:r(f)&&ge(f)}}}function r(l){for(var s=l.t,f=l.k,p=ro(f),h=p.length-1;h>=0;h--){var y=p[h];if(y!==U){var m=s[y];if(m===void 0&&!oo(s,y))return!0;var x=f[y],b=x&&x[U];if(b?b.t!==m:!Zc(x,m))return!0}}var S=!!s[U];return p.length!==ro(s).length+(S?0:1)}function n(l){var s=l.k;if(s.length!==l.t.length)return!0;var f=Object.getOwnPropertyDescriptor(s,s.length-1);if(f&&!f.get)return!0;for(var p=0;p<s.length;p++)if(!s.hasOwnProperty(p))return!0;return!1}function i(l){l.g&&kt(3,JSON.stringify(me(l)))}var a={};ps("ES5",{J:function(l,s){var f=Array.isArray(l),p=function(y,m){if(y){for(var x=Array(m.length),b=0;b<m.length;b++)Object.defineProperty(x,""+b,o(b,!0));return x}var S=Xc(m);delete S[U];for(var R=ro(S),E=0;E<R.length;E++){var N=R[E];S[N]=o(N,y||!!S[N].enumerable)}return Object.create(Object.getPrototypeOf(m),S)}(f,l),h={i:f?5:4,A:s?s.A:fn(),P:!1,I:!1,R:{},l:s,t:l,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,U,{value:h,writable:!0}),p},S:function(l,s,f){f?te(s)&&s[U].A===l&&e(l.p):(l.u&&function p(h){if(h&&typeof h=="object"){var y=h[U];if(y){var m=y.t,x=y.k,b=y.R,S=y.i;if(S===4)Te(x,function(T){T!==U&&(m[T]!==void 0||oo(m,T)?b[T]||p(x[T]):(b[T]=!0,ge(y)))}),Te(m,function(T){x[T]!==void 0||oo(x,T)||(b[T]=!1,ge(y))});else if(S===5){if(n(y)&&(ge(y),b.length=!0),x.length<m.length)for(var R=x.length;R<m.length;R++)b[R]=!1;else for(var E=m.length;E<x.length;E++)b[E]=!0;for(var N=Math.min(x.length,m.length),I=0;I<N;I++)x.hasOwnProperty(I)||(b[I]=!0),b[I]===void 0&&p(x[I])}}}}(l.p[0]),e(l.p))},K:function(l){return l.i===4?r(l):n(l)}})}var Gc,Io,Sn=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",hs=typeof Map<"u",ys=typeof Set<"u",jc=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Yc=Sn?Symbol.for("immer-nothing"):((Gc={})["immer-nothing"]=!0,Gc),Vc=Sn?Symbol.for("immer-draftable"):"__$immer_draftable",U=Sn?Symbol.for("immer-state"):"__$immer_state";var ms=""+Object.prototype.constructor,ro=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(o){return Object.getOwnPropertyNames(o).concat(Object.getOwnPropertySymbols(o))}:Object.getOwnPropertyNames,Xc=Object.getOwnPropertyDescriptors||function(o){var e={};return ro(o).forEach(function(r){e[r]=Object.getOwnPropertyDescriptor(o,r)}),e},yn={},$o={get:function(o,e){if(e===U)return o;var r=me(o);if(!oo(r,e))return function(i,a,l){var s,f=Uc(a,l);return f?"value"in f?f.value:(s=f.get)===null||s===void 0?void 0:s.call(i.k):void 0}(o,r,e);var n=r[e];return o.I||!zt(n)?n:n===dn(o.t,e)?(pn(o),o.o[e]=hn(o.A.h,n,o)):n},has:function(o,e){return e in me(o)},ownKeys:function(o){return Reflect.ownKeys(me(o))},set:function(o,e,r){var n=Uc(me(o),e);if(n?.set)return n.set.call(o.k,r),!0;if(!o.P){var i=dn(me(o),e),a=i?.[U];if(a&&a.t===r)return o.o[e]=r,o.R[e]=!1,!0;if(Zc(r,i)&&(r!==void 0||oo(o.t,e)))return!0;pn(o),ge(o)}return o.o[e]===r&&(r!==void 0||e in o.o)||Number.isNaN(r)&&Number.isNaN(o.o[e])||(o.o[e]=r,o.R[e]=!0),!0},deleteProperty:function(o,e){return dn(o.t,e)!==void 0||e in o.t?(o.R[e]=!1,pn(o),ge(o)):delete o.R[e],o.o&&delete o.o[e],!0},getOwnPropertyDescriptor:function(o,e){var r=me(o),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:o.i!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty:function(){kt(11)},getPrototypeOf:function(o){return Object.getPrototypeOf(o.t)},setPrototypeOf:function(){kt(12)}},Po={};Te($o,function(o,e){Po[o]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Po.deleteProperty=function(o,e){return Po.set.call(this,o,e,void 0)},Po.set=function(o,e,r){return $o.set.call(this,o[0],e,r,o[0])};var gs=function(){function o(r){var n=this;this.O=jc,this.D=!0,this.produce=function(i,a,l){if(typeof i=="function"&&typeof a!="function"){var s=a;a=i;var f=n;return function(S){var R=this;S===void 0&&(S=s);for(var E=arguments.length,N=Array(E>1?E-1:0),I=1;I<E;I++)N[I-1]=arguments[I];return f.produce(S,function(T){var W;return(W=a).call.apply(W,[R,T].concat(N))})}}var p;if(typeof a!="function"&&kt(6),l!==void 0&&typeof l!="function"&&kt(7),zt(i)){var h=Mc(n),y=hn(n,i,void 0),m=!0;try{p=a(y),m=!1}finally{m?dr(h):un(h)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(S){return ln(h,l),sn(S,h)},function(S){throw dr(h),S}):(ln(h,l),sn(p,h))}if(!i||typeof i!="object"){if((p=a(i))===void 0&&(p=i),p===Yc&&(p=void 0),n.D&&xn(p,!0),l){var x=[],b=[];Gt("Patches").M(i,p,x,b),l(x,b)}return p}kt(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(p){for(var h=arguments.length,y=Array(h>1?h-1:0),m=1;m<h;m++)y[m-1]=arguments[m];return n.produceWithPatches(p,function(x){return i.apply(void 0,[x].concat(y))})};var l,s,f=n.produce(i,a,function(p,h){l=p,s=h});return typeof Promise<"u"&&f instanceof Promise?f.then(function(p){return[p,l,s]}):[f,l,s]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=o.prototype;return e.createDraft=function(r){zt(r)||kt(8),te(r)&&(r=us(r));var n=Mc(this),i=hn(this,r,void 0);return i[U].C=!0,un(n),i},e.finishDraft=function(r,n){var i=r&&r[U],a=i.A;return ln(a,n),sn(void 0,a)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!jc&&kt(20),this.O=r},e.applyPatches=function(r,n){var i;for(i=n.length-1;i>=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){r=a.value;break}}i>-1&&(n=n.slice(i+1));var l=Gt("Patches").$;return te(r)?l(r,n):this.produce(r,function(s){return l(s,n)})},o}(),Rt=new gs,bs=Rt.produce,Xg=Rt.produceWithPatches.bind(Rt),Jg=Rt.setAutoFreeze.bind(Rt),Qg=Rt.setUseProxies.bind(Rt),tb=Rt.applyPatches.bind(Rt),eb=Rt.createDraft.bind(Rt),ob=Rt.finishDraft.bind(Rt),ur=bs;function be(o){"@babel/helpers - typeof";return be=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},be(o)}function Cn(o,e){if(be(o)!=="object"||o===null)return o;var r=o[Symbol.toPrimitive];if(r!==void 0){var n=r.call(o,e||"default");if(be(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}function On(o){var e=Cn(o,"string");return be(e)==="symbol"?e:String(e)}function wn(o,e,r){return e=On(e),e in o?Object.defineProperty(o,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):o[e]=r,o}function Jc(o,e){var r=Object.keys(o);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(o);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(o,i).enumerable})),r.push.apply(r,n)}return r}function hr(o){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Jc(Object(r),!0).forEach(function(n){wn(o,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(r)):Jc(Object(r)).forEach(function(n){Object.defineProperty(o,n,Object.getOwnPropertyDescriptor(r,n))})}return o}function lt(o){return"Minified Redux error #"+o+"; visit https://redux.js.org/Errors?code="+o+" for the full message or use the non-minified dev environment for full errors. "}var Qc=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),En=function(){return Math.random().toString(36).substring(7).split("").join(".")},yr={INIT:"@@redux/INIT"+En(),REPLACE:"@@redux/REPLACE"+En(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+En()}};function xs(o){if(typeof o!="object"||o===null)return!1;for(var e=o;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(o)===e}function Nn(o,e,r){var n;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(lt(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(lt(1));return r(Nn)(o,e)}if(typeof o!="function")throw new Error(lt(2));var i=o,a=e,l=[],s=l,f=!1;function p(){s===l&&(s=l.slice())}function h(){if(f)throw new Error(lt(3));return a}function y(S){if(typeof S!="function")throw new Error(lt(4));if(f)throw new Error(lt(5));var R=!0;return p(),s.push(S),function(){if(R){if(f)throw new Error(lt(6));R=!1,p();var N=s.indexOf(S);s.splice(N,1),l=null}}}function m(S){if(!xs(S))throw new Error(lt(7));if(typeof S.type>"u")throw new Error(lt(8));if(f)throw new Error(lt(9));try{f=!0,a=i(a,S)}finally{f=!1}for(var R=l=s,E=0;E<R.length;E++){var N=R[E];N()}return S}function x(S){if(typeof S!="function")throw new Error(lt(10));i=S,m({type:yr.REPLACE})}function b(){var S,R=y;return S={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(lt(11));function I(){N.next&&N.next(h())}I();var T=R(I);return{unsubscribe:T}}},S[Qc]=function(){return this},S}return m({type:yr.INIT}),n={dispatch:m,subscribe:y,getState:h,replaceReducer:x},n[Qc]=b,n}function vs(o){Object.keys(o).forEach(function(e){var r=o[e],n=r(void 0,{type:yr.INIT});if(typeof n>"u")throw new Error(lt(12));if(typeof r(void 0,{type:yr.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(lt(13))})}function tl(o){for(var e=Object.keys(o),r={},n=0;n<e.length;n++){var i=e[n];typeof o[i]=="function"&&(r[i]=o[i])}var a=Object.keys(r),l,s;try{vs(r)}catch(f){s=f}return function(p,h){if(p===void 0&&(p={}),s)throw s;if(0)var y;for(var m=!1,x={},b=0;b<a.length;b++){var S=a[b],R=r[S],E=p[S],N=R(E,h);if(typeof N>"u"){var I=h&&h.type;throw new Error(lt(14))}x[S]=N,m=m||N!==E}return m=m||a.length!==Object.keys(p).length,m?x:p}}function ao(){for(var o=arguments.length,e=new Array(o),r=0;r<o;r++)e[r]=arguments[r];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 el(){for(var o=arguments.length,e=new Array(o),r=0;r<o;r++)e[r]=arguments[r];return function(n){return function(){var i=n.apply(void 0,arguments),a=function(){throw new Error(lt(15))},l={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},s=e.map(function(f){return f(l)});return a=ao.apply(void 0,s)(i.dispatch),hr(hr({},i),{},{dispatch:a})}}}function ol(o){var e=function(n){var i=n.dispatch,a=n.getState;return function(l){return function(s){return typeof s=="function"?s(i,a,o):l(s)}}};return e}var rl=ol();rl.withExtraArgument=ol;var An=rl;var ll=function(){var o=function(e,r){return o=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])},o(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");o(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ss=function(o,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,l;return l={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function s(p){return function(h){return f([p,h])}}function f(p){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=p[0]&2?i.return:p[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,p[1])).done)return a;switch(i=0,a&&(p=[p[0]&2,a.value]),p[0]){case 0:case 1:a=p;break;case 4:return r.label++,{value:p[1],done:!1};case 5:r.label++,i=p[1],p=[0];continue;case 7:p=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(p[0]===6||p[0]===2)){r=0;continue}if(p[0]===3&&(!a||p[1]>a[0]&&p[1]<a[3])){r.label=p[1];break}if(p[0]===6&&r.label<a[1]){r.label=a[1],a=p;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(p);break}a[2]&&r.ops.pop(),r.trys.pop();continue}p=e.call(o,r)}catch(h){p=[6,h],i=0}finally{n=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},io=function(o,e){for(var r=0,n=e.length,i=o.length;r<n;r++,i++)o[i]=e[r];return o},Cs=Object.defineProperty,Os=Object.defineProperties,ws=Object.getOwnPropertyDescriptors,nl=Object.getOwnPropertySymbols,Es=Object.prototype.hasOwnProperty,Ns=Object.prototype.propertyIsEnumerable,al=function(o,e,r){return e in o?Cs(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r},xe=function(o,e){for(var r in e||(e={}))Es.call(e,r)&&al(o,r,e[r]);if(nl)for(var n=0,i=nl(e);n<i.length;n++){var r=i[n];Ns.call(e,r)&&al(o,r,e[r])}return o},Rn=function(o,e){return Os(o,ws(e))},As=function(o,e,r){return new Promise(function(n,i){var a=function(f){try{s(r.next(f))}catch(p){i(p)}},l=function(f){try{s(r.throw(f))}catch(p){i(p)}},s=function(f){return f.done?n(f.value):Promise.resolve(f.value).then(a,l)};s((r=r.apply(o,e)).next())})};var Rs=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ao:ao.apply(null,arguments)},vb=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(o){return o}};function Ls(o){if(typeof o!="object"||o===null)return!1;var e=Object.getPrototypeOf(o);if(e===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return e===r}var Ps=function(o){ll(e,o);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=o.apply(this,r)||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 r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return o.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,io([void 0],r[0].concat(this)))):new(e.bind.apply(e,io([void 0],r.concat(this))))},e}(Array),Is=function(o){ll(e,o);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=o.apply(this,r)||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 r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return o.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,io([void 0],r[0].concat(this)))):new(e.bind.apply(e,io([void 0],r.concat(this))))},e}(Array);function In(o){return zt(o)?ur(o,function(){}):o}function $s(o){return typeof o=="boolean"}function ks(){return function(e){return Bs(e)}}function Bs(o){o===void 0&&(o={});var e=o.thunk,r=e===void 0?!0:e,n=o.immutableCheck,i=n===void 0?!0:n,a=o.serializableCheck,l=a===void 0?!0:a,s=new Ps;if(r&&($s(r)?s.push(An):s.push(An.withExtraArgument(r.extraArgument))),0){if(i)var f;if(l)var p}return s}var Ln=!0;function sl(o){var e=ks(),r=o||{},n=r.reducer,i=n===void 0?void 0:n,a=r.middleware,l=a===void 0?e():a,s=r.devTools,f=s===void 0?!0:s,p=r.preloadedState,h=p===void 0?void 0:p,y=r.enhancers,m=y===void 0?void 0:y,x;if(typeof i=="function")x=i;else if(Ls(i))x=tl(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var b=l;if(typeof b=="function"&&(b=b(e),!Ln&&!Array.isArray(b)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Ln&&b.some(function(T){return typeof T!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=el.apply(void 0,b),R=ao;f&&(R=Rs(xe({trace:!Ln},typeof f=="object"&&f)));var E=new Is(S),N=E;Array.isArray(m)?N=io([S],m):typeof m=="function"&&(N=m(E));var I=R.apply(void 0,N);return Nn(x,h,I)}function ve(o,e){function r(){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 xe(xe({type:o,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:o,payload:n[0]}}return r.toString=function(){return""+o},r.type=o,r.match=function(n){return n.type===o},r}function dl(o){var e={},r=[],n,i={addCase:function(a,l){var s=typeof a=="string"?a:a.type;if(s in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[s]=l,i},addMatcher:function(a,l){return r.push({matcher:a,reducer:l}),i},addDefaultCase:function(a){return n=a,i}};return o(i),[e,r,n]}function Ts(o){return typeof o=="function"}function _s(o,e,r,n){r===void 0&&(r=[]);var i=typeof e=="function"?dl(e):[e,r,n],a=i[0],l=i[1],s=i[2],f;if(Ts(o))f=function(){return In(o())};else{var p=In(o);f=function(){return p}}function h(y,m){y===void 0&&(y=f());var x=io([a[m.type]],l.filter(function(b){var S=b.matcher;return S(m)}).map(function(b){var S=b.reducer;return S}));return x.filter(function(b){return!!b}).length===0&&(x=[s]),x.reduce(function(b,S){if(S)if(te(b)){var R=b,E=S(R,m);return E===void 0?b:E}else{if(zt(b))return ur(b,function(N){return S(N,m)});var E=S(b,m);if(E===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return E}return b},y)}return h.getInitialState=f,h}function Ws(o,e){return o+"/"+e}function pl(o){var e=o.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof o.initialState=="function"?o.initialState:In(o.initialState),n=o.reducers||{},i=Object.keys(n),a={},l={},s={};i.forEach(function(h){var y=n[h],m=Ws(e,h),x,b;"reducer"in y?(x=y.reducer,b=y.prepare):x=y,a[h]=x,l[m]=x,s[h]=b?ve(m,b):ve(m)});function f(){var h=typeof o.extraReducers=="function"?dl(o.extraReducers):[o.extraReducers],y=h[0],m=y===void 0?{}:y,x=h[1],b=x===void 0?[]:x,S=h[2],R=S===void 0?void 0:S,E=xe(xe({},m),l);return _s(r,function(N){for(var I in E)N.addCase(I,E[I]);for(var T=0,W=b;T<W.length;T++){var Lt=W[T];N.addMatcher(Lt.matcher,Lt.reducer)}R&&N.addDefaultCase(R)})}var p;return{name:e,reducer:function(h,y){return p||(p=f()),p(h,y)},actions:s,caseReducers:a,getInitialState:function(){return p||(p=f()),p.getInitialState()}}}var Ds="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",zs=function(o){o===void 0&&(o=21);for(var e="",r=o;r--;)e+=Ds[Math.random()*64|0];return e},Ms=["name","message","stack","code"],Pn=function(){function o(e,r){this.payload=e,this.meta=r}return o}(),il=function(){function o(e,r){this.payload=e,this.meta=r}return o}(),Hs=function(o){if(typeof o=="object"&&o!==null){for(var e={},r=0,n=Ms;r<n.length;r++){var i=n[r];typeof o[i]=="string"&&(e[i]=o[i])}return e}return{message:String(o)}},wb=function(){function o(e,r,n){var i=ve(e+"/fulfilled",function(h,y,m,x){return{payload:h,meta:Rn(xe({},x||{}),{arg:m,requestId:y,requestStatus:"fulfilled"})}}),a=ve(e+"/pending",function(h,y,m){return{payload:void 0,meta:Rn(xe({},m||{}),{arg:y,requestId:h,requestStatus:"pending"})}}),l=ve(e+"/rejected",function(h,y,m,x,b){return{payload:x,error:(n&&n.serializeError||Hs)(h||"Rejected"),meta:Rn(xe({},b||{}),{arg:m,requestId:y,rejectedWithValue:!!x,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),s=!1,f=typeof AbortController<"u"?AbortController:function(){function h(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return h.prototype.abort=function(){},h}();function p(h){return function(y,m,x){var b=n?.idGenerator?n.idGenerator(h):zs(),S=new f,R,E=!1;function N(T){R=T,S.abort()}var I=function(){return As(this,null,function(){var T,W,Lt,oe,Pr,re,bt;return Ss(this,function(Pt){switch(Pt.label){case 0:return Pt.trys.push([0,4,,5]),oe=(T=n?.condition)==null?void 0:T.call(n,h,{getState:m,extra:x}),Fs(oe)?[4,oe]:[3,2];case 1:oe=Pt.sent(),Pt.label=2;case 2:if(oe===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return E=!0,Pr=new Promise(function(xt,Se){return S.signal.addEventListener("abort",function(){return Se({name:"AbortError",message:R||"Aborted"})})}),y(a(b,h,(W=n?.getPendingMeta)==null?void 0:W.call(n,{requestId:b,arg:h},{getState:m,extra:x}))),[4,Promise.race([Pr,Promise.resolve(r(h,{dispatch:y,getState:m,extra:x,requestId:b,signal:S.signal,abort:N,rejectWithValue:function(xt,Se){return new Pn(xt,Se)},fulfillWithValue:function(xt,Se){return new il(xt,Se)}})).then(function(xt){if(xt instanceof Pn)throw xt;return xt instanceof il?i(xt.payload,b,h,xt.meta):i(xt,b,h)})])];case 3:return Lt=Pt.sent(),[3,5];case 4:return re=Pt.sent(),Lt=re instanceof Pn?l(null,b,h,re.payload,re.meta):l(re,b,h),[3,5];case 5:return bt=n&&!n.dispatchConditionRejection&&l.match(Lt)&&Lt.meta.condition,bt||y(Lt),[2,Lt]}})})}();return Object.assign(I,{abort:N,requestId:b,arg:h,unwrap:function(){return I.then(Us)}})}}return Object.assign(p,{pending:a,rejected:l,fulfilled:i,typePrefix:e})}return o.withTypes=function(){return o},o}();function Us(o){if(o.meta&&o.meta.rejectedWithValue)throw o.payload;if(o.error)throw o.error;return o.payload}function Fs(o){return o!==null&&typeof o=="object"&&typeof o.then=="function"}var fl="listener",ul="completed",hl="cancelled",Eb="task-"+hl,Nb="task-"+ul,Ab=fl+"-"+hl,Rb=fl+"-"+ul;var $n="listenerMiddleware";var Lb=ve($n+"/add"),Pb=ve($n+"/removeAll"),Ib=ve($n+"/remove");var cl,$b=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(o){return(cl||(cl=Promise.resolve())).then(o).catch(function(e){return setTimeout(function(){throw e},0)})},Gs=function(o){return function(e){setTimeout(e,o)}},kb=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Gs(10);qc();function js(o,e){return class extends o{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(r,n,i){this.eventBus.addEventListener(r,n,i)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,i){this.eventBus.removeEventListener(r,n,i)}}}var mr=class extends js(Object){};window.ftReduxStores||(window.ftReduxStores={});var yl=class o extends mr{static get(e){var r;let n=typeof e=="string"?e:e.name,i=typeof e=="string"?void 0:e,a=window.ftReduxStores[n];if(Ao(a))return a;if(i==null)return;let l=pl({...i,reducers:(r=i.reducers)!==null&&r!==void 0?r:{}}),s=sl({reducer:(f,p)=>p.type==="CLEAR_FT_REDUX_STORE"?l.getInitialState():typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__")?{...f,...p.overwrites}:l.reducer(f,p)});return window.ftReduxStores[i.name]=new o(l,s)}constructor(e,r){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new ar;let n=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,a,l)=>{let s=a,f=i[s];return f?(...p)=>{let h=f(...p.map(n));return this.reduxStore.dispatch(h),h}:p=>{this.setState({[s]:n(p)})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var vr=g(L());var gr=class extends fe{async listMySearches(){let e=P.getState().session;return e?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var br=class extends fe{async listMyBookmarks(){let e=P.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var Ks="ft-user-assets",xr=vr.FtReduxStore.get({name:Ks,initialState:{savedSearches:void 0,bookmarks:void 0}}),kn=class{constructor(){this.currentSession=P.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new br,this.savedSearchesService=new gr,P.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=P.getState();(0,vr.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),xr.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),xr.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();xr.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 r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;xr.actions.bookmarks(r)}}},hx=new kn;var Bn=class{addCommand(e,r=!1){P.commands.add(e,r)}consumeCommand(e){return P.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Bn;var ml=g(L()),Tn=class{highlightHtml(e,r,n){(0,ml.highlightHtml)(e,r,n)}};window.FluidTopicsHighlightHtmlService=new Tn;var gl=g(L());var _n=class{isDate(e){var r,n,i,a;return(a=(i=((n=(r=P.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(s=>s.key===e))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1}format(e,r){var n,i,a;return gl.DateFormatter.format(e,(n=r?.locale)!==null&&n!==void 0?n:P.getState().uiLocale,(i=r?.longFormat)!==null&&i!==void 0?i:!1,(a=r?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new _n;var Zs=g(L());(0,bl.customElement)("ft-app-context")(V);var xl=g(Y()),qs=function(o,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(o,e,r,n);else for(var s=o.length-1;s>=0;s--)(l=o[s])&&(a=(i<3?l(a):i>3?l(e,r,a):l(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Wn=Symbol("i18nAttributes"),Dn=Symbol("i18nListAttributes"),Sr=Symbol("i18nProperties"),zn=Symbol("i18nManualContexts"),ko=Symbol("i18nUnsubs");function vl(o){var e,r;class n extends o{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[r]=new Map}get i18nService(){return this.useCustomMessageContexts?Nc:ke}i18n(a,l,...s){var f;if(typeof a=="string")return this.i18nService.resolveMessage(a,l,...s);let p=(f=a.args)!==null&&f!==void 0?f:a.argsProvider?a.argsProvider(this):[];return this.i18nService.resolveMessage(a.context,a.key,...p)}onI18nUpdate(a){var l,s,f;(l=this[Wn])===null||l===void 0||l.forEach((p,h)=>{let y=this.getI18nAttributeValue(h);y&&(this[h]=this.getI18nAttributeMessage(y,p,a))}),(s=this[Dn])===null||s===void 0||s.forEach((p,h)=>{let y=this.getI18nListAttributeValues(h);this[h]=y?.map(m=>this.getI18nAttributeMessage(m,p,a))}),(f=this[Sr])===null||f===void 0||f.forEach((p,h)=>{p.context.toLowerCase()===a.toLowerCase()&&(this[h]=this.i18n(p))}),setTimeout(()=>this.requestUpdate(),0)}buildI18nAttributeMessage(a,l){return{...a,message:this.i18n({context:a.context,key:a.key,...l})}}getI18nAttributeMessage(a,l,s){var f;let p=!s||((f=a.context)===null||f===void 0?void 0:f.toLowerCase())===s.toLowerCase();return a.context&&a.key&&p?this.buildI18nAttributeMessage(a,l):a}update(a){var l,s,f;super.update(a),(l=this[Wn])===null||l===void 0||l.forEach((p,h)=>{let y=this.getI18nAttributeValue(h);y?.context&&y.key&&(a.has(h)||p.argsProvider!=null)&&(this.addI18nContextIfNeeded(y,a,h),this[h]=this.getI18nAttributeMessage(y,p))}),(s=this[Dn])===null||s===void 0||s.forEach((p,h)=>{let y=this.getI18nListAttributeValues(h);(a.has(h)||p.argsProvider!=null)&&(this[h]=y?.map(m=>(this.addI18nContextIfNeeded(m,a,h),this.getI18nAttributeMessage(m,p))))}),(f=this[Sr])===null||f===void 0||f.forEach((p,h)=>{p.argsProvider!=null&&(this[h]=this.i18n(p))})}getI18nAttributeValue(a){return this[a]}getI18nListAttributeValues(a){return this[a]}addI18nContextIfNeeded(a,l,s){a.context&&a.key&&l.has(s)&&this.addI18nContext(a.context)}addI18nMessagesAndSubscribe(a,l){a=a.toLowerCase(),this[ko].has(a)||this[ko].set(a,this.i18nService.subscribe(a,()=>this.onI18nUpdate(a))),this.i18nService.prepareContext(a,l??{}),this.onI18nUpdate(a)}connectedCallback(){var a,l,s,f,p,h;super.connectedCallback(),new Set([...(l=(a=this[Sr])===null||a===void 0?void 0:a.values())!==null&&l!==void 0?l:[],...[...(f=(s=this[Wn])===null||s===void 0?void 0:s.keys())!==null&&f!==void 0?f:[]].map(y=>this.getI18nAttributeValue(y)),...[...(h=(p=this[Dn])===null||p===void 0?void 0:p.keys())!==null&&h!==void 0?h:[]].flatMap(y=>this.getI18nListAttributeValues(y))].map(y=>y?.context)).forEach(y=>y&&this.addI18nMessages(y)),this[zn].forEach((y,m)=>{this.addI18nMessages(m,y)})}addI18nMessages(a,l){this[zn].set(a,l??{}),this.addI18nMessagesAndSubscribe(a,l)}addI18nContext(a,l){this.addI18nMessages(typeof a=="string"?a:a.name,l)}disconnectedCallback(){super.disconnectedCallback(),this[ko].forEach(a=>a()),this[ko].clear()}}return e=zn,r=ko,qs([(0,xl.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}var Cr=class extends vl(wr.FtLitElement){},Or=class extends vl(wr.FtLitElementRedux){};var Bo=function(o,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(o,e,r,n);else for(var s=o.length-1;s>=0;s--)(l=o[s])&&(a=(i<3?l(a):i>3?l(e,r,a):l(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Mt=class extends Or{constructor(){super(),this.editorMode=!1,this.addStore(P)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Er.nothing:Er.html`
|
|
1712
|
+
`}update(e){var r,n,i,a,l;super.update(e),e.has("baseUrl")&&(P.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&P.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("uiLocale")&&P.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&P.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&P.actions.noCustom(this.noCustom),e.has("editorMode")&&P.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&P.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&P.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(s=>ke.addContext(s)),e.has("openExternalDocumentInNewTab")&&P.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&P.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&P.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(P.actions.defaultLocales((r=this.localesConfiguration)===null||r===void 0?void 0:r.defaultLocales),P.actions.availableUiLocales((i=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&i!==void 0?i:[]),P.actions.searchInAllLanguagesAllowed((l=(a=this.localesConfiguration)===null||a===void 0?void 0:a.allLanguagesAllowed)!==null&&l!==void 0?l:!1)),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}};V.elementDefinitions={};V.styles=wc;ct([(0,gt.property)()],V.prototype,"baseUrl",void 0);ct([(0,gt.property)()],V.prototype,"apiIntegrationIdentifier",void 0);ct([(0,gt.property)()],V.prototype,"uiLocale",void 0);ct([(0,Dt.jsonProperty)(null)],V.prototype,"availableUiLocales",void 0);ct([(0,Dt.jsonProperty)(null)],V.prototype,"metadataConfiguration",void 0);ct([(0,gt.property)({type:Boolean})],V.prototype,"editorMode",void 0);ct([(0,gt.property)({type:Boolean})],V.prototype,"noCustom",void 0);ct([(0,gt.property)({type:Boolean})],V.prototype,"openExternalDocumentInNewTab",void 0);ct([(0,gt.property)({converter:{fromAttribute(o){return o==="false"?!1:o==="true"||(o??!1)}}})],V.prototype,"noCustomComponent",void 0);ct([(0,gt.property)({type:Boolean})],V.prototype,"withManualResources",void 0);ct([(0,gt.property)({type:Boolean})],V.prototype,"navigatorOnline",void 0);ct([(0,gt.property)({type:Boolean})],V.prototype,"forcedOffline",void 0);ct([(0,gt.property)({type:Object})],V.prototype,"apiProvider",void 0);ct([(0,Dt.jsonProperty)([])],V.prototype,"messageContexts",void 0);ct([(0,Dt.jsonProperty)(void 0)],V.prototype,"session",void 0);ct([(0,gt.state)()],V.prototype,"localesConfiguration",void 0);var Vs=g(Y());function is(o,e){if(o===e)return!0;if(o&&e&&typeof o=="object"&&typeof e=="object"){if(o.constructor!==e.constructor)return!1;var r,n,i;if(Array.isArray(o)){if(r=o.length,r!=e.length)return!1;for(n=r;n--!==0;)if(!rr(o[n],e[n]))return!1;return!0}if(o instanceof Map&&e instanceof Map){if(o.size!==e.size)return!1;for(n of o.entries())if(!e.has(n[0]))return!1;for(n of o.entries())if(!rr(n[1],e.get(n[0])))return!1;return!0}if(o instanceof Set&&e instanceof Set){if(o.size!==e.size)return!1;for(n of o.entries())if(!e.has(n[0]))return!1;return!0}if(o.constructor===RegExp)return o.source===e.source&&o.flags===e.flags;if(o.valueOf!==Object.prototype.valueOf)return o.valueOf()===e.valueOf();let a=l=>Object.keys(l).filter(s=>l[s]!=null);if(i=a(o),r=i.length,r!==a(e).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[n]))return!1;for(n=r;n--!==0;){let l=i[n];if(!rr(o[l],e[l]))return!1}return!0}return o!==o&&e!==e||o==null&&e==null}function rr(o,e){try{return is(o,e)}catch{return!1}}function nr(o,e){return!rr(o,e)}var cs=g(Y(),1);var ar=class{constructor(){this.queue=[]}add(e,r=!1){r&&(this.queue=this.queue.filter(n=>n.type!==e.type)),this.queue.push(e)}consume(e){let r=this.queue.find(n=>n.type===e);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}};var No=g(Y(),1);var Rc=g(Y(),1);function Lc(o,e){let r=()=>JSON.parse(JSON.stringify(o));return(0,Rc.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return r();try{return JSON.parse(n)}catch{return r()}},toAttribute:n=>JSON.stringify(n)},hasChanged:nr,...e??{}})}var ir=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,r){return this.callbacks=[e],this.debounce(r)}queue(e,r){return this.callbacks.push(e),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,r;let n=[...this.callbacks];this.callbacks=[];let i=(e=this.rejectPromise)!==null&&e!==void 0?e:()=>null,a=(r=this.resolvePromise)!==null&&r!==void 0?r:()=>null;this.clearPromise();for(let l of n)try{await l()}catch(s){i(s);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 Ic=g(_(),1);var cr=window,ls=cr.ShadowRoot&&(cr.ShadyCSS===void 0||cr.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,zg=Symbol();var Pc=(o,e)=>{ls?o.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet):e.forEach(r=>{let n=document.createElement("style"),i=cr.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,o.appendChild(n)})};var lr=class extends Ic.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 r={...e.shadowRootOptions,customElements:e.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return Pc(n,e.elementStyles),n}};var sr=function(o,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(o,e,r,n);else for(var s=o.length-1;s>=0;s--)(l=o[s])&&(a=(i<3?l(a):i>3?l(e,r,a):l(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Tc,$c=Symbol("constructorPrototype"),kc=Symbol("constructorName"),_c=Symbol("exportpartsDebouncer"),Bc=Symbol("dynamicDependenciesLoaded"),he=class extends lr{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Tc]=new ir(5),this[kc]=this.constructor.name,this[$c]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[kc]&&Object.setPrototypeOf(this,this[$c])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(r){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",r)}let e=this.constructor;e[Bc]||(e[Bc]=!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 r,n,i;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.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,r,n;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[_c].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 r,n,i,a,l,s;let f=m=>m!=null&&m.trim().length>0,p=e.filter(f).map(m=>m.trim());if(p.length===0){this.removeAttribute("exportparts");return}let h=new Set;for(let m of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let x=(a=(i=m.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&a!==void 0?a:[],b=(s=(l=m.getAttribute("exportparts"))===null||l===void 0?void 0:l.split(",").map(S=>S.split(":")[1]))!==null&&s!==void 0?s:[];new Array(...x,...b).filter(f).map(S=>S.trim()).forEach(S=>h.add(S))}if(h.size===0){this.removeAttribute("exportparts");return}let y=[...h.values()].flatMap(m=>p.map(x=>`${m}:${x}--${m}`));this.setAttribute("exportparts",[...this.part,...y].join(", "))}};Tc=_c;sr([(0,No.property)()],he.prototype,"exportpartsPrefix",void 0);sr([Lc([])],he.prototype,"exportpartsPrefixes",void 0);sr([(0,No.property)()],he.prototype,"customStylesheet",void 0);sr([(0,No.state)()],he.prototype,"useAdoptedStyleSheets",void 0);function Ao(o){var e;return(e=o?.isFtReduxStore)!==null&&e!==void 0?e:!1}var Wc,Dc,zc,Ro=Symbol("internalReduxEventsUnsubscribers"),ye=Symbol("internalStoresUnsubscribers"),Be=Symbol("internalStores"),Lo=class extends he{constructor(){super(...arguments),this[Wc]=new Map,this[Dc]=new Map,this[zc]=new Map}get reduxConstructor(){return this.constructor}update(e){super.update(e),[...this.reduxConstructor.reduxReactiveProperties].some(r=>e.has(r))&&this.updateFromStores()}getUnnamedStore(){if(this[Be].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Be].values()][0]}getStore(e){return e==null?this.getUnnamedStore():this[Be].get(e)}addStore(e,r){var n;r=(n=r??(Ao(e)?e.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(r),this[Be].set(r,e),this.subscribeToStore(r,e),this.updateFromStores()}removeStore(e){let r=typeof e=="string"?e:e.name;this.unsubscribeFromStore(r),this[Be].delete(r)}setupStores(){this.unsubscribeFromStores(),this[Be].forEach((e,r)=>this.subscribeToStore(r,e)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((e,r)=>{let n=this.constructor.getPropertyOptions(r);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:r)){let i=this.getStore(e.store);i&&(e.store?this[ye].has(e.store):this[ye].size>0)&&(this[r]=e.selector(i.getState(),this))}})}subscribeToStore(e,r){var n;this[ye].set(e,r.subscribe(()=>this.updateFromStores())),this[Ro].set(e,[]),Ao(r)&&r.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((i,a)=>{if(typeof this[a]=="function"&&(!i.store||r.name===i.store)){let l=s=>this[a](s);r.addEventListener(i.eventName,l),this[Ro].get(e).push(()=>r.removeEventListener(i.eventName,l))}})),this.onStoreAvailable(e)}unsubscribeFromStores(){this[ye].forEach((e,r)=>this.unsubscribeFromStore(r))}unsubscribeFromStore(e){var r;this[ye].has(e)&&this[ye].get(e)(),this[ye].delete(e),(r=this[Ro].get(e))===null||r===void 0||r.forEach(n=>n()),this[Ro].delete(e)}onStoreAvailable(e){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};Wc=ye,Dc=Be,zc=Ro;Lo.reduxProperties=new Map;Lo.reduxReactiveProperties=new Set;Lo.reduxEventListeners=new Map;function kt(o){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];if(0)var i,a;throw Error("[Immer] minified error nr: "+o+(r.length?" "+r.map(function(l){return"'"+l+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function te(o){return!!o&&!!o[U]}function zt(o){var e;return!!o&&(function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===ms}(o)||Array.isArray(o)||!!o[Vc]||!!(!((e=o.constructor)===null||e===void 0)&&e[Vc])||mn(o)||gn(o))}function Te(o,e,r){r===void 0&&(r=!1),no(o)===0?(r?Object.keys:ro)(o).forEach(function(n){r&&typeof n=="symbol"||e(n,o[n],o)}):o.forEach(function(n,i){return e(i,n,o)})}function no(o){var e=o[U];return e?e.i>3?e.i-4:e.i:Array.isArray(o)?1:mn(o)?2:gn(o)?3:0}function oo(o,e){return no(o)===2?o.has(e):Object.prototype.hasOwnProperty.call(o,e)}function ss(o,e){return no(o)===2?o.get(e):o[e]}function Kc(o,e,r){var n=no(o);n===2?o.set(e,r):n===3?o.add(r):o[e]=r}function Zc(o,e){return o===e?o!==0||1/o==1/e:o!=o&&e!=e}function mn(o){return hs&&o instanceof Map}function gn(o){return ys&&o instanceof Set}function me(o){return o.o||o.t}function bn(o){if(Array.isArray(o))return Array.prototype.slice.call(o);var e=Xc(o);delete e[U];for(var r=ro(e),n=0;n<r.length;n++){var i=r[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:o[i]})}return Object.create(Object.getPrototypeOf(o),e)}function xn(o,e){return e===void 0&&(e=!1),vn(o)||te(o)||!zt(o)||(no(o)>1&&(o.set=o.add=o.clear=o.delete=ds),Object.freeze(o),e&&Te(o,function(r,n){return xn(n,!0)},!0)),o}function ds(){kt(2)}function vn(o){return o==null||typeof o!="object"||Object.isFrozen(o)}function Gt(o){var e=yn[o];return e||kt(18,o),e}function ps(o,e){yn[o]||(yn[o]=e)}function fn(){return Io}function ln(o,e){e&&(Gt("Patches"),o.u=[],o.s=[],o.v=e)}function dr(o){un(o),o.p.forEach(fs),o.p=null}function un(o){o===Io&&(Io=o.l)}function Mc(o){return Io={p:[],l:Io,h:o,m:!0,_:0}}function fs(o){var e=o[U];e.i===0||e.i===1?e.j():e.g=!0}function sn(o,e){e._=e.p.length;var r=e.p[0],n=o!==void 0&&o!==r;return e.h.O||Gt("ES5").S(e,o,n),n?(r[U].P&&(dr(e),kt(4)),zt(o)&&(o=pr(e,o),e.l||fr(e,o)),e.u&&Gt("Patches").M(r[U].t,o,e.u,e.s)):o=pr(e,r,[]),dr(e),e.u&&e.v(e.u,e.s),o!==Yc?o:void 0}function pr(o,e,r){if(vn(e))return e;var n=e[U];if(!n)return Te(e,function(s,f){return Hc(o,n,e,s,f,r)},!0),e;if(n.A!==o)return e;if(!n.P)return fr(o,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=bn(n.k):n.o,a=i,l=!1;n.i===3&&(a=new Set(i),i.clear(),l=!0),Te(a,function(s,f){return Hc(o,n,i,s,f,r,l)}),fr(o,i,!1),r&&o.u&&Gt("Patches").N(n,r,o.u,o.s)}return n.o}function Hc(o,e,r,n,i,a,l){if(te(i)){var s=pr(o,i,a&&e&&e.i!==3&&!oo(e.R,n)?a.concat(n):void 0);if(Kc(r,n,s),!te(s))return;o.m=!1}else l&&r.add(i);if(zt(i)&&!vn(i)){if(!o.h.D&&o._<1)return;pr(o,i),e&&e.A.l||fr(o,i)}}function fr(o,e,r){r===void 0&&(r=!1),!o.l&&o.h.D&&o.m&&xn(e,r)}function dn(o,e){var r=o[U];return(r?me(r):o)[e]}function Uc(o,e){if(e in o)for(var r=Object.getPrototypeOf(o);r;){var n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Object.getPrototypeOf(r)}}function ge(o){o.P||(o.P=!0,o.l&&ge(o.l))}function pn(o){o.o||(o.o=bn(o.t))}function hn(o,e,r){var n=mn(e)?Gt("MapSet").F(e,r):gn(e)?Gt("MapSet").T(e,r):o.O?function(i,a){var l=Array.isArray(i),s={i:l?1:0,A:a?a.A:fn(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},f=s,p=$o;l&&(f=[s],p=Po);var h=Proxy.revocable(f,p),y=h.revoke,m=h.proxy;return s.k=m,s.j=y,m}(e,r):Gt("ES5").J(e,r);return(r?r.A:fn()).p.push(n),n}function us(o){return te(o)||kt(22,o),function e(r){if(!zt(r))return r;var n,i=r[U],a=no(r);if(i){if(!i.P&&(i.i<4||!Gt("ES5").K(i)))return i.t;i.I=!0,n=Fc(r,a),i.I=!1}else n=Fc(r,a);return Te(n,function(l,s){i&&ss(i.t,l)===s||Kc(n,l,e(s))}),a===3?new Set(n):n}(o)}function Fc(o,e){switch(e){case 2:return new Map(o);case 3:return Array.from(o)}return bn(o)}function qc(){function o(l,s){var f=a[l];return f?f.enumerable=s:a[l]=f={configurable:!0,enumerable:s,get:function(){var p=this[U];return $o.get(p,l)},set:function(p){var h=this[U];$o.set(h,l,p)}},f}function e(l){for(var s=l.length-1;s>=0;s--){var f=l[s][U];if(!f.P)switch(f.i){case 5:n(f)&&ge(f);break;case 4:r(f)&&ge(f)}}}function r(l){for(var s=l.t,f=l.k,p=ro(f),h=p.length-1;h>=0;h--){var y=p[h];if(y!==U){var m=s[y];if(m===void 0&&!oo(s,y))return!0;var x=f[y],b=x&&x[U];if(b?b.t!==m:!Zc(x,m))return!0}}var S=!!s[U];return p.length!==ro(s).length+(S?0:1)}function n(l){var s=l.k;if(s.length!==l.t.length)return!0;var f=Object.getOwnPropertyDescriptor(s,s.length-1);if(f&&!f.get)return!0;for(var p=0;p<s.length;p++)if(!s.hasOwnProperty(p))return!0;return!1}function i(l){l.g&&kt(3,JSON.stringify(me(l)))}var a={};ps("ES5",{J:function(l,s){var f=Array.isArray(l),p=function(y,m){if(y){for(var x=Array(m.length),b=0;b<m.length;b++)Object.defineProperty(x,""+b,o(b,!0));return x}var S=Xc(m);delete S[U];for(var R=ro(S),E=0;E<R.length;E++){var N=R[E];S[N]=o(N,y||!!S[N].enumerable)}return Object.create(Object.getPrototypeOf(m),S)}(f,l),h={i:f?5:4,A:s?s.A:fn(),P:!1,I:!1,R:{},l:s,t:l,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,U,{value:h,writable:!0}),p},S:function(l,s,f){f?te(s)&&s[U].A===l&&e(l.p):(l.u&&function p(h){if(h&&typeof h=="object"){var y=h[U];if(y){var m=y.t,x=y.k,b=y.R,S=y.i;if(S===4)Te(x,function(T){T!==U&&(m[T]!==void 0||oo(m,T)?b[T]||p(x[T]):(b[T]=!0,ge(y)))}),Te(m,function(T){x[T]!==void 0||oo(x,T)||(b[T]=!1,ge(y))});else if(S===5){if(n(y)&&(ge(y),b.length=!0),x.length<m.length)for(var R=x.length;R<m.length;R++)b[R]=!1;else for(var E=m.length;E<x.length;E++)b[E]=!0;for(var N=Math.min(x.length,m.length),I=0;I<N;I++)x.hasOwnProperty(I)||(b[I]=!0),b[I]===void 0&&p(x[I])}}}}(l.p[0]),e(l.p))},K:function(l){return l.i===4?r(l):n(l)}})}var Gc,Io,Sn=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",hs=typeof Map<"u",ys=typeof Set<"u",jc=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Yc=Sn?Symbol.for("immer-nothing"):((Gc={})["immer-nothing"]=!0,Gc),Vc=Sn?Symbol.for("immer-draftable"):"__$immer_draftable",U=Sn?Symbol.for("immer-state"):"__$immer_state";var ms=""+Object.prototype.constructor,ro=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(o){return Object.getOwnPropertyNames(o).concat(Object.getOwnPropertySymbols(o))}:Object.getOwnPropertyNames,Xc=Object.getOwnPropertyDescriptors||function(o){var e={};return ro(o).forEach(function(r){e[r]=Object.getOwnPropertyDescriptor(o,r)}),e},yn={},$o={get:function(o,e){if(e===U)return o;var r=me(o);if(!oo(r,e))return function(i,a,l){var s,f=Uc(a,l);return f?"value"in f?f.value:(s=f.get)===null||s===void 0?void 0:s.call(i.k):void 0}(o,r,e);var n=r[e];return o.I||!zt(n)?n:n===dn(o.t,e)?(pn(o),o.o[e]=hn(o.A.h,n,o)):n},has:function(o,e){return e in me(o)},ownKeys:function(o){return Reflect.ownKeys(me(o))},set:function(o,e,r){var n=Uc(me(o),e);if(n?.set)return n.set.call(o.k,r),!0;if(!o.P){var i=dn(me(o),e),a=i?.[U];if(a&&a.t===r)return o.o[e]=r,o.R[e]=!1,!0;if(Zc(r,i)&&(r!==void 0||oo(o.t,e)))return!0;pn(o),ge(o)}return o.o[e]===r&&(r!==void 0||e in o.o)||Number.isNaN(r)&&Number.isNaN(o.o[e])||(o.o[e]=r,o.R[e]=!0),!0},deleteProperty:function(o,e){return dn(o.t,e)!==void 0||e in o.t?(o.R[e]=!1,pn(o),ge(o)):delete o.R[e],o.o&&delete o.o[e],!0},getOwnPropertyDescriptor:function(o,e){var r=me(o),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:o.i!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty:function(){kt(11)},getPrototypeOf:function(o){return Object.getPrototypeOf(o.t)},setPrototypeOf:function(){kt(12)}},Po={};Te($o,function(o,e){Po[o]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Po.deleteProperty=function(o,e){return Po.set.call(this,o,e,void 0)},Po.set=function(o,e,r){return $o.set.call(this,o[0],e,r,o[0])};var gs=function(){function o(r){var n=this;this.O=jc,this.D=!0,this.produce=function(i,a,l){if(typeof i=="function"&&typeof a!="function"){var s=a;a=i;var f=n;return function(S){var R=this;S===void 0&&(S=s);for(var E=arguments.length,N=Array(E>1?E-1:0),I=1;I<E;I++)N[I-1]=arguments[I];return f.produce(S,function(T){var W;return(W=a).call.apply(W,[R,T].concat(N))})}}var p;if(typeof a!="function"&&kt(6),l!==void 0&&typeof l!="function"&&kt(7),zt(i)){var h=Mc(n),y=hn(n,i,void 0),m=!0;try{p=a(y),m=!1}finally{m?dr(h):un(h)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(S){return ln(h,l),sn(S,h)},function(S){throw dr(h),S}):(ln(h,l),sn(p,h))}if(!i||typeof i!="object"){if((p=a(i))===void 0&&(p=i),p===Yc&&(p=void 0),n.D&&xn(p,!0),l){var x=[],b=[];Gt("Patches").M(i,p,x,b),l(x,b)}return p}kt(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(p){for(var h=arguments.length,y=Array(h>1?h-1:0),m=1;m<h;m++)y[m-1]=arguments[m];return n.produceWithPatches(p,function(x){return i.apply(void 0,[x].concat(y))})};var l,s,f=n.produce(i,a,function(p,h){l=p,s=h});return typeof Promise<"u"&&f instanceof Promise?f.then(function(p){return[p,l,s]}):[f,l,s]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=o.prototype;return e.createDraft=function(r){zt(r)||kt(8),te(r)&&(r=us(r));var n=Mc(this),i=hn(this,r,void 0);return i[U].C=!0,un(n),i},e.finishDraft=function(r,n){var i=r&&r[U],a=i.A;return ln(a,n),sn(void 0,a)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!jc&&kt(20),this.O=r},e.applyPatches=function(r,n){var i;for(i=n.length-1;i>=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){r=a.value;break}}i>-1&&(n=n.slice(i+1));var l=Gt("Patches").$;return te(r)?l(r,n):this.produce(r,function(s){return l(s,n)})},o}(),Rt=new gs,bs=Rt.produce,Xg=Rt.produceWithPatches.bind(Rt),Jg=Rt.setAutoFreeze.bind(Rt),Qg=Rt.setUseProxies.bind(Rt),tb=Rt.applyPatches.bind(Rt),eb=Rt.createDraft.bind(Rt),ob=Rt.finishDraft.bind(Rt),ur=bs;function be(o){"@babel/helpers - typeof";return be=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},be(o)}function Cn(o,e){if(be(o)!=="object"||o===null)return o;var r=o[Symbol.toPrimitive];if(r!==void 0){var n=r.call(o,e||"default");if(be(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}function On(o){var e=Cn(o,"string");return be(e)==="symbol"?e:String(e)}function wn(o,e,r){return e=On(e),e in o?Object.defineProperty(o,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):o[e]=r,o}function Jc(o,e){var r=Object.keys(o);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(o);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(o,i).enumerable})),r.push.apply(r,n)}return r}function hr(o){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Jc(Object(r),!0).forEach(function(n){wn(o,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(r)):Jc(Object(r)).forEach(function(n){Object.defineProperty(o,n,Object.getOwnPropertyDescriptor(r,n))})}return o}function lt(o){return"Minified Redux error #"+o+"; visit https://redux.js.org/Errors?code="+o+" for the full message or use the non-minified dev environment for full errors. "}var Qc=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),En=function(){return Math.random().toString(36).substring(7).split("").join(".")},yr={INIT:"@@redux/INIT"+En(),REPLACE:"@@redux/REPLACE"+En(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+En()}};function xs(o){if(typeof o!="object"||o===null)return!1;for(var e=o;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(o)===e}function Nn(o,e,r){var n;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(lt(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(lt(1));return r(Nn)(o,e)}if(typeof o!="function")throw new Error(lt(2));var i=o,a=e,l=[],s=l,f=!1;function p(){s===l&&(s=l.slice())}function h(){if(f)throw new Error(lt(3));return a}function y(S){if(typeof S!="function")throw new Error(lt(4));if(f)throw new Error(lt(5));var R=!0;return p(),s.push(S),function(){if(R){if(f)throw new Error(lt(6));R=!1,p();var N=s.indexOf(S);s.splice(N,1),l=null}}}function m(S){if(!xs(S))throw new Error(lt(7));if(typeof S.type>"u")throw new Error(lt(8));if(f)throw new Error(lt(9));try{f=!0,a=i(a,S)}finally{f=!1}for(var R=l=s,E=0;E<R.length;E++){var N=R[E];N()}return S}function x(S){if(typeof S!="function")throw new Error(lt(10));i=S,m({type:yr.REPLACE})}function b(){var S,R=y;return S={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(lt(11));function I(){N.next&&N.next(h())}I();var T=R(I);return{unsubscribe:T}}},S[Qc]=function(){return this},S}return m({type:yr.INIT}),n={dispatch:m,subscribe:y,getState:h,replaceReducer:x},n[Qc]=b,n}function vs(o){Object.keys(o).forEach(function(e){var r=o[e],n=r(void 0,{type:yr.INIT});if(typeof n>"u")throw new Error(lt(12));if(typeof r(void 0,{type:yr.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(lt(13))})}function tl(o){for(var e=Object.keys(o),r={},n=0;n<e.length;n++){var i=e[n];typeof o[i]=="function"&&(r[i]=o[i])}var a=Object.keys(r),l,s;try{vs(r)}catch(f){s=f}return function(p,h){if(p===void 0&&(p={}),s)throw s;if(0)var y;for(var m=!1,x={},b=0;b<a.length;b++){var S=a[b],R=r[S],E=p[S],N=R(E,h);if(typeof N>"u"){var I=h&&h.type;throw new Error(lt(14))}x[S]=N,m=m||N!==E}return m=m||a.length!==Object.keys(p).length,m?x:p}}function ao(){for(var o=arguments.length,e=new Array(o),r=0;r<o;r++)e[r]=arguments[r];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 el(){for(var o=arguments.length,e=new Array(o),r=0;r<o;r++)e[r]=arguments[r];return function(n){return function(){var i=n.apply(void 0,arguments),a=function(){throw new Error(lt(15))},l={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},s=e.map(function(f){return f(l)});return a=ao.apply(void 0,s)(i.dispatch),hr(hr({},i),{},{dispatch:a})}}}function ol(o){var e=function(n){var i=n.dispatch,a=n.getState;return function(l){return function(s){return typeof s=="function"?s(i,a,o):l(s)}}};return e}var rl=ol();rl.withExtraArgument=ol;var An=rl;var ll=function(){var o=function(e,r){return o=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])},o(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");o(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ss=function(o,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,l;return l={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function s(p){return function(h){return f([p,h])}}function f(p){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=p[0]&2?i.return:p[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,p[1])).done)return a;switch(i=0,a&&(p=[p[0]&2,a.value]),p[0]){case 0:case 1:a=p;break;case 4:return r.label++,{value:p[1],done:!1};case 5:r.label++,i=p[1],p=[0];continue;case 7:p=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(p[0]===6||p[0]===2)){r=0;continue}if(p[0]===3&&(!a||p[1]>a[0]&&p[1]<a[3])){r.label=p[1];break}if(p[0]===6&&r.label<a[1]){r.label=a[1],a=p;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(p);break}a[2]&&r.ops.pop(),r.trys.pop();continue}p=e.call(o,r)}catch(h){p=[6,h],i=0}finally{n=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},io=function(o,e){for(var r=0,n=e.length,i=o.length;r<n;r++,i++)o[i]=e[r];return o},Cs=Object.defineProperty,Os=Object.defineProperties,ws=Object.getOwnPropertyDescriptors,nl=Object.getOwnPropertySymbols,Es=Object.prototype.hasOwnProperty,Ns=Object.prototype.propertyIsEnumerable,al=function(o,e,r){return e in o?Cs(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r},xe=function(o,e){for(var r in e||(e={}))Es.call(e,r)&&al(o,r,e[r]);if(nl)for(var n=0,i=nl(e);n<i.length;n++){var r=i[n];Ns.call(e,r)&&al(o,r,e[r])}return o},Rn=function(o,e){return Os(o,ws(e))},As=function(o,e,r){return new Promise(function(n,i){var a=function(f){try{s(r.next(f))}catch(p){i(p)}},l=function(f){try{s(r.throw(f))}catch(p){i(p)}},s=function(f){return f.done?n(f.value):Promise.resolve(f.value).then(a,l)};s((r=r.apply(o,e)).next())})};var Rs=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ao:ao.apply(null,arguments)},vb=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(o){return o}};function Ls(o){if(typeof o!="object"||o===null)return!1;var e=Object.getPrototypeOf(o);if(e===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return e===r}var Ps=function(o){ll(e,o);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=o.apply(this,r)||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 r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return o.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,io([void 0],r[0].concat(this)))):new(e.bind.apply(e,io([void 0],r.concat(this))))},e}(Array),Is=function(o){ll(e,o);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=o.apply(this,r)||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 r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return o.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,io([void 0],r[0].concat(this)))):new(e.bind.apply(e,io([void 0],r.concat(this))))},e}(Array);function In(o){return zt(o)?ur(o,function(){}):o}function $s(o){return typeof o=="boolean"}function ks(){return function(e){return Bs(e)}}function Bs(o){o===void 0&&(o={});var e=o.thunk,r=e===void 0?!0:e,n=o.immutableCheck,i=n===void 0?!0:n,a=o.serializableCheck,l=a===void 0?!0:a,s=new Ps;if(r&&($s(r)?s.push(An):s.push(An.withExtraArgument(r.extraArgument))),0){if(i)var f;if(l)var p}return s}var Ln=!0;function sl(o){var e=ks(),r=o||{},n=r.reducer,i=n===void 0?void 0:n,a=r.middleware,l=a===void 0?e():a,s=r.devTools,f=s===void 0?!0:s,p=r.preloadedState,h=p===void 0?void 0:p,y=r.enhancers,m=y===void 0?void 0:y,x;if(typeof i=="function")x=i;else if(Ls(i))x=tl(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var b=l;if(typeof b=="function"&&(b=b(e),!Ln&&!Array.isArray(b)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Ln&&b.some(function(T){return typeof T!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=el.apply(void 0,b),R=ao;f&&(R=Rs(xe({trace:!Ln},typeof f=="object"&&f)));var E=new Is(S),N=E;Array.isArray(m)?N=io([S],m):typeof m=="function"&&(N=m(E));var I=R.apply(void 0,N);return Nn(x,h,I)}function ve(o,e){function r(){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 xe(xe({type:o,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:o,payload:n[0]}}return r.toString=function(){return""+o},r.type=o,r.match=function(n){return n.type===o},r}function dl(o){var e={},r=[],n,i={addCase:function(a,l){var s=typeof a=="string"?a:a.type;if(s in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[s]=l,i},addMatcher:function(a,l){return r.push({matcher:a,reducer:l}),i},addDefaultCase:function(a){return n=a,i}};return o(i),[e,r,n]}function Ts(o){return typeof o=="function"}function _s(o,e,r,n){r===void 0&&(r=[]);var i=typeof e=="function"?dl(e):[e,r,n],a=i[0],l=i[1],s=i[2],f;if(Ts(o))f=function(){return In(o())};else{var p=In(o);f=function(){return p}}function h(y,m){y===void 0&&(y=f());var x=io([a[m.type]],l.filter(function(b){var S=b.matcher;return S(m)}).map(function(b){var S=b.reducer;return S}));return x.filter(function(b){return!!b}).length===0&&(x=[s]),x.reduce(function(b,S){if(S)if(te(b)){var R=b,E=S(R,m);return E===void 0?b:E}else{if(zt(b))return ur(b,function(N){return S(N,m)});var E=S(b,m);if(E===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return E}return b},y)}return h.getInitialState=f,h}function Ws(o,e){return o+"/"+e}function pl(o){var e=o.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof o.initialState=="function"?o.initialState:In(o.initialState),n=o.reducers||{},i=Object.keys(n),a={},l={},s={};i.forEach(function(h){var y=n[h],m=Ws(e,h),x,b;"reducer"in y?(x=y.reducer,b=y.prepare):x=y,a[h]=x,l[m]=x,s[h]=b?ve(m,b):ve(m)});function f(){var h=typeof o.extraReducers=="function"?dl(o.extraReducers):[o.extraReducers],y=h[0],m=y===void 0?{}:y,x=h[1],b=x===void 0?[]:x,S=h[2],R=S===void 0?void 0:S,E=xe(xe({},m),l);return _s(r,function(N){for(var I in E)N.addCase(I,E[I]);for(var T=0,W=b;T<W.length;T++){var Lt=W[T];N.addMatcher(Lt.matcher,Lt.reducer)}R&&N.addDefaultCase(R)})}var p;return{name:e,reducer:function(h,y){return p||(p=f()),p(h,y)},actions:s,caseReducers:a,getInitialState:function(){return p||(p=f()),p.getInitialState()}}}var Ds="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",zs=function(o){o===void 0&&(o=21);for(var e="",r=o;r--;)e+=Ds[Math.random()*64|0];return e},Ms=["name","message","stack","code"],Pn=function(){function o(e,r){this.payload=e,this.meta=r}return o}(),il=function(){function o(e,r){this.payload=e,this.meta=r}return o}(),Hs=function(o){if(typeof o=="object"&&o!==null){for(var e={},r=0,n=Ms;r<n.length;r++){var i=n[r];typeof o[i]=="string"&&(e[i]=o[i])}return e}return{message:String(o)}},wb=function(){function o(e,r,n){var i=ve(e+"/fulfilled",function(h,y,m,x){return{payload:h,meta:Rn(xe({},x||{}),{arg:m,requestId:y,requestStatus:"fulfilled"})}}),a=ve(e+"/pending",function(h,y,m){return{payload:void 0,meta:Rn(xe({},m||{}),{arg:y,requestId:h,requestStatus:"pending"})}}),l=ve(e+"/rejected",function(h,y,m,x,b){return{payload:x,error:(n&&n.serializeError||Hs)(h||"Rejected"),meta:Rn(xe({},b||{}),{arg:m,requestId:y,rejectedWithValue:!!x,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),s=!1,f=typeof AbortController<"u"?AbortController:function(){function h(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return h.prototype.abort=function(){},h}();function p(h){return function(y,m,x){var b=n?.idGenerator?n.idGenerator(h):zs(),S=new f,R,E=!1;function N(T){R=T,S.abort()}var I=function(){return As(this,null,function(){var T,W,Lt,oe,Pr,re,bt;return Ss(this,function(Pt){switch(Pt.label){case 0:return Pt.trys.push([0,4,,5]),oe=(T=n?.condition)==null?void 0:T.call(n,h,{getState:m,extra:x}),Fs(oe)?[4,oe]:[3,2];case 1:oe=Pt.sent(),Pt.label=2;case 2:if(oe===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return E=!0,Pr=new Promise(function(xt,Se){return S.signal.addEventListener("abort",function(){return Se({name:"AbortError",message:R||"Aborted"})})}),y(a(b,h,(W=n?.getPendingMeta)==null?void 0:W.call(n,{requestId:b,arg:h},{getState:m,extra:x}))),[4,Promise.race([Pr,Promise.resolve(r(h,{dispatch:y,getState:m,extra:x,requestId:b,signal:S.signal,abort:N,rejectWithValue:function(xt,Se){return new Pn(xt,Se)},fulfillWithValue:function(xt,Se){return new il(xt,Se)}})).then(function(xt){if(xt instanceof Pn)throw xt;return xt instanceof il?i(xt.payload,b,h,xt.meta):i(xt,b,h)})])];case 3:return Lt=Pt.sent(),[3,5];case 4:return re=Pt.sent(),Lt=re instanceof Pn?l(null,b,h,re.payload,re.meta):l(re,b,h),[3,5];case 5:return bt=n&&!n.dispatchConditionRejection&&l.match(Lt)&&Lt.meta.condition,bt||y(Lt),[2,Lt]}})})}();return Object.assign(I,{abort:N,requestId:b,arg:h,unwrap:function(){return I.then(Us)}})}}return Object.assign(p,{pending:a,rejected:l,fulfilled:i,typePrefix:e})}return o.withTypes=function(){return o},o}();function Us(o){if(o.meta&&o.meta.rejectedWithValue)throw o.payload;if(o.error)throw o.error;return o.payload}function Fs(o){return o!==null&&typeof o=="object"&&typeof o.then=="function"}var fl="listener",ul="completed",hl="cancelled",Eb="task-"+hl,Nb="task-"+ul,Ab=fl+"-"+hl,Rb=fl+"-"+ul;var $n="listenerMiddleware";var Lb=ve($n+"/add"),Pb=ve($n+"/removeAll"),Ib=ve($n+"/remove");var cl,$b=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(o){return(cl||(cl=Promise.resolve())).then(o).catch(function(e){return setTimeout(function(){throw e},0)})},Gs=function(o){return function(e){setTimeout(e,o)}},kb=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Gs(10);qc();function js(o,e){return class extends o{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(r,n,i){this.eventBus.addEventListener(r,n,i)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,i){this.eventBus.removeEventListener(r,n,i)}}}var mr=class extends js(Object){};window.ftReduxStores||(window.ftReduxStores={});var yl=class o extends mr{static get(e){var r;let n=typeof e=="string"?e:e.name,i=typeof e=="string"?void 0:e,a=window.ftReduxStores[n];if(Ao(a))return a;if(i==null)return;let l=pl({...i,reducers:(r=i.reducers)!==null&&r!==void 0?r:{}}),s=sl({reducer:(f,p)=>p.type==="CLEAR_FT_REDUX_STORE"?l.getInitialState():typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__")?{...f,...p.overwrites}:l.reducer(f,p)});return window.ftReduxStores[i.name]=new o(l,s)}constructor(e,r){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new ar;let n=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,a,l)=>{let s=a,f=i[s];return f?(...p)=>{let h=f(...p.map(n));return this.reduxStore.dispatch(h),h}:p=>{this.setState({[s]:n(p)})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var vr=g(L());var gr=class extends fe{async listMySearches(){let e=P.getState().session;return e?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var br=class extends fe{async listMyBookmarks(){let e=P.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var Ks="ft-user-assets",xr=vr.FtReduxStore.get({name:Ks,initialState:{savedSearches:void 0,bookmarks:void 0}}),kn=class{constructor(){this.currentSession=P.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new br,this.savedSearchesService=new gr,P.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=P.getState();(0,vr.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),xr.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),xr.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();xr.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 r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;xr.actions.bookmarks(r)}}},hx=new kn;var Bn=class{addCommand(e,r=!1){P.commands.add(e,r)}consumeCommand(e){return P.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Bn;var ml=g(L()),Tn=class{highlightHtml(e,r,n){(0,ml.highlightHtml)(e,r,n)}};window.FluidTopicsHighlightHtmlService=new Tn;var gl=g(L());var _n=class{isDate(e){var r,n,i,a;return(a=(i=((n=(r=P.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(s=>s.key===e))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1}format(e,r){var n,i,a;return gl.DateFormatter.format(e,(n=r?.locale)!==null&&n!==void 0?n:P.getState().uiLocale,(i=r?.longFormat)!==null&&i!==void 0?i:!1,(a=r?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new _n;var Zs=g(L());(0,bl.customElement)("ft-app-context")(V);var xl=g(Y()),qs=function(o,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(o,e,r,n);else for(var s=o.length-1;s>=0;s--)(l=o[s])&&(a=(i<3?l(a):i>3?l(e,r,a):l(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Wn=Symbol("i18nAttributes"),Dn=Symbol("i18nListAttributes"),Sr=Symbol("i18nProperties"),zn=Symbol("i18nManualContexts"),ko=Symbol("i18nUnsubs");function vl(o){var e,r;class n extends o{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[r]=new Map}get i18nService(){return this.useCustomMessageContexts?Nc:ke}i18n(a,l,...s){var f;if(typeof a=="string")return this.i18nService.resolveMessage(a,l,...s);let p=(f=a.args)!==null&&f!==void 0?f:a.argsProvider?a.argsProvider(this):[];return this.i18nService.resolveMessage(a.context,a.key,...p)}onI18nUpdate(a){var l,s,f;(l=this[Wn])===null||l===void 0||l.forEach((p,h)=>{let y=this.getI18nAttributeValue(h);y&&(this[h]=this.getI18nAttributeMessage(y,p,a))}),(s=this[Dn])===null||s===void 0||s.forEach((p,h)=>{let y=this.getI18nListAttributeValues(h);this[h]=y?.map(m=>this.getI18nAttributeMessage(m,p,a))}),(f=this[Sr])===null||f===void 0||f.forEach((p,h)=>{p.context.toLowerCase()===a.toLowerCase()&&(this[h]=this.i18n(p))}),setTimeout(()=>this.requestUpdate(),0)}buildI18nAttributeMessage(a,l){return{...a,message:this.i18n({context:a.context,key:a.key,...l})}}getI18nAttributeMessage(a,l,s){var f;let p=!s||((f=a.context)===null||f===void 0?void 0:f.toLowerCase())===s.toLowerCase();return a.context&&a.key&&p?this.buildI18nAttributeMessage(a,l):a}update(a){var l,s,f;super.update(a),(l=this[Wn])===null||l===void 0||l.forEach((p,h)=>{let y=this.getI18nAttributeValue(h);y?.context&&y.key&&(a.has(h)||p.argsProvider!=null)&&(this.addI18nContextIfNeeded(y,a,h),this[h]=this.getI18nAttributeMessage(y,p))}),(s=this[Dn])===null||s===void 0||s.forEach((p,h)=>{let y=this.getI18nListAttributeValues(h);(a.has(h)||p.argsProvider!=null)&&(this[h]=y?.map(m=>(this.addI18nContextIfNeeded(m,a,h),this.getI18nAttributeMessage(m,p))))}),(f=this[Sr])===null||f===void 0||f.forEach((p,h)=>{p.argsProvider!=null&&(this[h]=this.i18n(p))})}getI18nAttributeValue(a){return this[a]}getI18nListAttributeValues(a){return this[a]}addI18nContextIfNeeded(a,l,s){a.context&&a.key&&l.has(s)&&this.addI18nContext(a.context)}addI18nMessagesAndSubscribe(a,l){a=a.toLowerCase(),this[ko].has(a)||this[ko].set(a,this.i18nService.subscribe(a,()=>this.onI18nUpdate(a))),this.i18nService.prepareContext(a,l??{}),this.onI18nUpdate(a)}connectedCallback(){var a,l,s,f,p,h;super.connectedCallback(),new Set([...(l=(a=this[Sr])===null||a===void 0?void 0:a.values())!==null&&l!==void 0?l:[],...[...(f=(s=this[Wn])===null||s===void 0?void 0:s.keys())!==null&&f!==void 0?f:[]].map(y=>this.getI18nAttributeValue(y)),...[...(h=(p=this[Dn])===null||p===void 0?void 0:p.keys())!==null&&h!==void 0?h:[]].flatMap(y=>this.getI18nListAttributeValues(y))].map(y=>y?.context)).forEach(y=>y&&this.addI18nMessages(y)),this[zn].forEach((y,m)=>{this.addI18nMessages(m,y)})}addI18nMessages(a,l){this[zn].set(a,l??{}),this.addI18nMessagesAndSubscribe(a,l)}addI18nContext(a,l){this.addI18nMessages(typeof a=="string"?a:a.name,l)}disconnectedCallback(){super.disconnectedCallback(),this[ko].forEach(a=>a()),this[ko].clear()}}return e=zn,r=ko,qs([(0,xl.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}var Cr=class extends vl(wr.FtLitElement){},Or=class extends vl(wr.FtLitElementRedux){};var Bo=function(o,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(o,e,r,n);else for(var s=o.length-1;s>=0;s--)(l=o[s])&&(a=(i<3?l(a):i>3?l(e,r,a):l(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Mt=class extends Or{constructor(){super(),this.editorMode=!1,this.addStore(P)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Er.nothing:Er.html`
|
|
1713
1713
|
<span class="ft-i18n">
|
|
1714
1714
|
${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}
|
|
1715
1715
|
</span>
|