@fluid-topics/ft-reader-page-title 1.1.100 → 1.1.102
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.
|
@@ -116,7 +116,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:e.extend("--ft-conte
|
|
|
116
116
|
`}};q.styles=[Po,ko,Wo,Lo,Fo,zo,_o,Uo,To,Do,Bo,...Mo];$o([(0,Ht.property)()],q.prototype,"element",void 0);$o([(0,Ht.property)()],q.prototype,"variant",void 0);(0,Ho.customElement)("ft-typography")(q);var Mn=O(P());var qo=O(D()),_=O(B()),M=O(P());var Ko=O(D());var Zo=Ko.css`
|
|
117
117
|
`;var rt=O(P()),sa="ft-app-info",Kt=class extends CustomEvent{constructor(t){super("authentication-change",{detail:t})}},da={session:(r,t)=>{(0,rt.deepEqual)(r.session,t.payload)||(r.session=t.payload,setTimeout(()=>S.eventBus.dispatchEvent(new Kt(t.payload)),0))}},S=rt.FtReduxStore.get({name:sa,reducers:da,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],metadataConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1}});var te=O(P());var Zt=O(P());var ue=class r{static get(t){let{baseUrl:o,apiIntegrationIdentifier:n}=S.getState(),a=t??n;if(o&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,a,!0)}static await(t){return new Promise(o=>{let n=r.get(t);if(n)o(n);else{let a=S.subscribe(()=>{n=r.get(t),n&&(a(),o(n))})}})}};var ee=class{constructor(t=!0,o){var n;this.overrideApi=o;let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new Zt.CacheRegistry,this.cache=t?a.commonCache:new Zt.CacheRegistry}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:ue.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):ue.await()}clearCache(){this.cache.clearAll()}};var Go,fa=Symbol("clearAfterUnitTest"),ot=class extends ee{constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Go]=()=>{this.defaultMessages={},this.cache=new te.CacheRegistry,this.listeners={}},this.currentUiLocale=S.getState().uiLocale,S.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=S.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let o=t.name.toLowerCase();this.cache.setFinal(o,t),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,o){var n;if(t=t.toLowerCase(),Object.keys(o).length>0){let a={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...o};(0,te.deepEqual)(this.defaultMessages[t],a)||(this.defaultMessages[t]=a,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,o,...n){var a,i,l;t=t.toLowerCase(),this.fetchContext(t);let d=(i=(a=this.cache.getNow(t))===null||a===void 0?void 0:a.messages)!==null&&i!==void 0?i:{};return new te.ParametrizedLabelResolver((l=this.defaultMessages[t])!==null&&l!==void 0?l:{},d).resolve(o,...n)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),await this.notify(t)}catch(o){console.error(o)}}subscribe(t,o){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(o),()=>{var a;return(a=this.listeners[t])===null||a===void 0?void 0:a.delete(o)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map(t=>this.notify(t)))}async notify(t){this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(o=>(0,te.delay)(0).then(()=>o()).catch(()=>null)))}};Go=fa;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends ot{constructor(){super(async(r,t)=>(await this.awaitApi).getFluidTopicsMessageContext(r,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends ot{constructor(){super(async(r,t)=>(await this.awaitApi).getCustomMessageContext(r,t))}});var Ae=window.FluidTopicsI18nService,Vo=window.FluidTopicsCustomI18nService;var L=function(r,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(i=(a<3?l(i):a>3?l(t,o,i):l(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},R=class extends M.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=()=>ue.get(),this.messageContexts=[],this.cache=new M.CacheRegistry,this.cleanSessionDebouncer=new M.Debouncer}render(){return qo.html`
|
|
118
118
|
<slot></slot>
|
|
119
|
-
`}update(t){super.update(t),t.has("baseUrl")&&(S.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&S.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&S.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&S.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&S.actions.noCustom(this.noCustom),t.has("editorMode")&&S.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&S.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&S.actions.session(this.session),t.has("availableUiLocales")&&S.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(o=>Ae.addContext(o)),t.has("openExternalDocumentInNewTab")&&S.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&S.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&S.actions.forcedOffline(this.forcedOffline),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){!this.withManualResources&&this.apiProvider()&&(this.session==null&&this.updateSession(),this.availableUiLocales==null&&this.updateUiLocales(),this.metadataConfiguration==null&&this.updateMetadataConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},t.idleTimeoutInMillis),t})}async updateUiLocales(){this.availableUiLocales=await this.cache.get("availableUiLocales",()=>this.apiProvider().getAvailableUiLocales())}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}};R.elementDefinitions={};R.styles=Zo;L([(0,_.property)()],R.prototype,"baseUrl",void 0);L([(0,_.property)()],R.prototype,"apiIntegrationIdentifier",void 0);L([(0,_.property)()],R.prototype,"uiLocale",void 0);L([(0,M.jsonProperty)(null)],R.prototype,"availableUiLocales",void 0);L([(0,M.jsonProperty)(null)],R.prototype,"metadataConfiguration",void 0);L([(0,_.property)({type:Boolean})],R.prototype,"editorMode",void 0);L([(0,_.property)({type:Boolean})],R.prototype,"noCustom",void 0);L([(0,_.property)({type:Boolean})],R.prototype,"openExternalDocumentInNewTab",void 0);L([(0,_.property)({converter:{fromAttribute(r){return r==="false"?!1:r==="true"||(r??!1)}}})],R.prototype,"noCustomComponent",void 0);L([(0,_.property)({type:Boolean})],R.prototype,"withManualResources",void 0);L([(0,_.property)({type:Boolean})],R.prototype,"navigatorOnline",void 0);L([(0,_.property)({type:Boolean})],R.prototype,"forcedOffline",void 0);L([(0,_.property)({type:Object})],R.prototype,"apiProvider",void 0);L([(0,M.jsonProperty)([])],R.prototype,"messageContexts",void 0);L([(0,M.jsonProperty)(void 0)],R.prototype,"session",void 0);var Xa=O(B());function ua(r,t){if(r===t)return!0;if(r&&t&&typeof r=="object"&&typeof t=="object"){if(r.constructor!==t.constructor)return!1;var o,n,a;if(Array.isArray(r)){if(o=r.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!nt(r[n],t[n]))return!1;return!0}if(r instanceof Map&&t instanceof Map){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;for(n of r.entries())if(!nt(n[1],t.get(n[0])))return!1;return!0}if(r instanceof Set&&t instanceof Set){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;return!0}if(r.constructor===RegExp)return r.source===t.source&&r.flags===t.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===t.valueOf();if(a=Object.keys(r),o=a.length,o!==Object.keys(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,a[n]))return!1;for(n=o;n--!==0;){var i=a[n];if(!nt(r[i],t[i]))return!1}return!0}return r!==r&&t!==t}function nt(r,t){try{return ua(r,t)}catch{return!1}}function Gt(r,t){return!nt(r,t)}var pa=O(B(),1);var at=class{constructor(){this.queue=[]}add(t,o=!1){o&&(this.queue=this.queue.filter(n=>n.type!==t.type)),this.queue.push(t)}consume(t){let o=this.queue.find(n=>n.type===t);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}};var Me=O(B(),1);var Yo=O(B(),1);function Xo(r,t){let o=()=>JSON.parse(JSON.stringify(r));return(0,Yo.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return o();try{return JSON.parse(n)}catch{return o()}},toAttribute:n=>JSON.stringify(n)},hasChanged:Gt,...t??{}})}var it=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let n=[...this.callbacks];this.callbacks=[];let a=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,i=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let l of n)try{await l()}catch(d){a(d);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Qo=O(D(),1);var ct=window,ha=ct.ShadowRoot&&(ct.ShadyCSS===void 0||ct.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Nd=Symbol();var Jo=(r,t)=>{ha?r.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet):t.forEach(o=>{let n=document.createElement("style"),a=ct.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=o.cssText,r.appendChild(n)})};var lt=class extends Qo.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([a,i])=>t.registry.define(a,i)));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return Jo(n,t.elementStyles),n}};var st=function(r,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(i=(a<3?l(i):a>3?l(t,o,i):l(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},on,en=Symbol("constructorPrototype"),tn=Symbol("constructorName"),nn=Symbol("exportpartsDebouncer"),rn=Symbol("dynamicDependenciesLoaded"),re=class extends lt{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[on]=new it(5),this[tn]=this.constructor.name,this[en]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[tn]&&Object.setPrototypeOf(this,this[en])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let t=this.constructor;t[rn]||(t[rn]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate()})}contentAvailableCallback(t){}applyCustomStylesheet(t){var o,n,a;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}scheduleExportpartsUpdate(){var t,o,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[nn].run(()=>{var a,i;!((a=this.exportpartsPrefix)===null||a===void 0)&&a.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(t){var o,n,a,i,l,d;let f=y=>y!=null&&y.trim().length>0,u=t.filter(f).map(y=>y.trim());if(u.length===0){this.removeAttribute("exportparts");return}let p=new Set;for(let y of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let b=(i=(a=y.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],g=(d=(l=y.getAttribute("exportparts"))===null||l===void 0?void 0:l.split(",").map(x=>x.split(":")[1]))!==null&&d!==void 0?d:[];new Array(...b,...g).filter(f).map(x=>x.trim()).forEach(x=>p.add(x))}if(p.size===0){this.removeAttribute("exportparts");return}let h=[...p.values()].flatMap(y=>u.map(b=>`${y}:${b}--${y}`));this.setAttribute("exportparts",[...this.part,...h].join(", "))}};on=nn;st([(0,Me.property)()],re.prototype,"exportpartsPrefix",void 0);st([Xo([])],re.prototype,"exportpartsPrefixes",void 0);st([(0,Me.property)()],re.prototype,"customStylesheet",void 0);st([(0,Me.state)()],re.prototype,"useAdoptedStyleSheets",void 0);function $e(r){var t;return(t=r?.isFtReduxStore)!==null&&t!==void 0?t:!1}var an,cn,ln,dt=Symbol("internalReduxEventsUnsubscribers"),oe=Symbol("internalStoresUnsubscribers"),pe=Symbol("internalStores"),je=class extends re{constructor(){super(...arguments),this[an]=new Map,this[cn]=new Map,this[ln]=[]}get reduxConstructor(){return this.constructor}update(t){super.update(t),[...this.reduxConstructor.reduxReactiveProperties].some(o=>t.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[pe].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[pe].values()][0]}getStore(t){return t==null?this.getUnnamedStore():this[pe].get(t)}addStore(t,o){var n;o=(n=o??($e(t)?t.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this.setupStore(o,t)}removeStore(t){let o=typeof t=="string"?t:t.name;this.unsubscribeFromStore(o),this[pe].delete(o)}setupStore(t,o){this[pe].set(t,o),this.subscribeToStore(t,o),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[pe].forEach((t,o)=>this.subscribeToStore(o,t)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((t,o)=>{let n=this.constructor.getPropertyOptions(o);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:o)){let a=this.getStore(t.store);a&&(t.store?this[oe].has(t.store):this[oe].size>0)&&(this[o]=t.selector(a.getState(),this))}})}subscribeToStore(t,o){var n;this[oe].set(t,o.subscribe(()=>this.updateFromStores())),$e(o)&&o.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((a,i)=>{if(typeof this[i]=="function"&&(!a.store||o.name===a.store)){let l=d=>this[i](d);o.eventBus.addEventListener(a.eventName,l),this[dt].push(()=>o.eventBus.removeEventListener(a.eventName,l))}})),this.onStoreAvailable(t)}unsubscribeFromStores(){this[oe].forEach((t,o)=>this.unsubscribeFromStore(o)),this[dt].forEach(t=>t()),this[dt]=[]}unsubscribeFromStore(t){this[oe].has(t)&&this[oe].get(t)(),this[oe].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};an=oe,cn=pe,ln=dt;je.reduxProperties=new Map;je.reduxReactiveProperties=new Set;je.reduxEventListeners=new Map;function U(r){for(var t=arguments.length,o=Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];if(0)var a,i;throw Error("[Immer] minified error nr: "+r+(o.length?" "+o.map(function(l){return"'"+l+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Y(r){return!!r&&!!r[I]}function $(r){var t;return!!r&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===Oa}(r)||Array.isArray(r)||!!r[yn]||!!(!((t=r.constructor)===null||t===void 0)&&t[yn])||rr(r)||or(r))}function he(r,t,o){o===void 0&&(o=!1),ke(r)===0?(o?Object.keys:Pe)(r).forEach(function(n){o&&typeof n=="symbol"||t(n,r[n],r)}):r.forEach(function(n,a){return t(a,n,r)})}function ke(r){var t=r[I];return t?t.i>3?t.i-4:t.i:Array.isArray(r)?1:rr(r)?2:or(r)?3:0}function Re(r,t){return ke(r)===2?r.has(t):Object.prototype.hasOwnProperty.call(r,t)}function ya(r,t){return ke(r)===2?r.get(t):r[t]}function gn(r,t,o){var n=ke(r);n===2?r.set(t,o):n===3?r.add(o):r[t]=o}function mn(r,t){return r===t?r!==0||1/r==1/t:r!=r&&t!=t}function rr(r){return va&&r instanceof Map}function or(r){return Sa&&r instanceof Set}function ne(r){return r.o||r.t}function nr(r){if(Array.isArray(r))return Array.prototype.slice.call(r);var t=vn(r);delete t[I];for(var o=Pe(t),n=0;n<o.length;n++){var a=o[n],i=t[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:r[a]})}return Object.create(Object.getPrototypeOf(r),t)}function ar(r,t){return t===void 0&&(t=!1),ir(r)||Y(r)||!$(r)||(ke(r)>1&&(r.set=r.add=r.clear=r.delete=ga),Object.freeze(r),t&&he(r,function(o,n){return ar(n,!0)},!0)),r}function ga(){U(2)}function ir(r){return r==null||typeof r!="object"||Object.isFrozen(r)}function H(r){var t=tr[r];return t||U(18,r),t}function ma(r,t){tr[r]||(tr[r]=t)}function Jt(){return Ke}function Vt(r,t){t&&(H("Patches"),r.u=[],r.s=[],r.v=t)}function ft(r){Qt(r),r.p.forEach(ba),r.p=null}function Qt(r){r===Ke&&(Ke=r.l)}function sn(r){return Ke={p:[],l:Ke,h:r,m:!0,_:0}}function ba(r){var t=r[I];t.i===0||t.i===1?t.j():t.g=!0}function qt(r,t){t._=t.p.length;var o=t.p[0],n=r!==void 0&&r!==o;return t.h.O||H("ES5").S(t,r,n),n?(o[I].P&&(ft(t),U(4)),$(r)&&(r=ut(t,r),t.l||pt(t,r)),t.u&&H("Patches").M(o[I].t,r,t.u,t.s)):r=ut(t,o,[]),ft(t),t.u&&t.v(t.u,t.s),r!==xn?r:void 0}function ut(r,t,o){if(ir(t))return t;var n=t[I];if(!n)return he(t,function(d,f){return dn(r,n,t,d,f,o)},!0),t;if(n.A!==r)return t;if(!n.P)return pt(r,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=nr(n.k):n.o,i=a,l=!1;n.i===3&&(i=new Set(a),a.clear(),l=!0),he(i,function(d,f){return dn(r,n,a,d,f,o,l)}),pt(r,a,!1),o&&r.u&&H("Patches").N(n,o,r.u,r.s)}return n.o}function dn(r,t,o,n,a,i,l){if(Y(a)){var d=ut(r,a,i&&t&&t.i!==3&&!Re(t.R,n)?i.concat(n):void 0);if(gn(o,n,d),!Y(d))return;r.m=!1}else l&&o.add(a);if($(a)&&!ir(a)){if(!r.h.D&&r._<1)return;ut(r,a),t&&t.A.l||pt(r,a)}}function pt(r,t,o){o===void 0&&(o=!1),!r.l&&r.h.D&&r.m&&ar(t,o)}function Yt(r,t){var o=r[I];return(o?ne(o):r)[t]}function fn(r,t){if(t in r)for(var o=Object.getPrototypeOf(r);o;){var n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=Object.getPrototypeOf(o)}}function ae(r){r.P||(r.P=!0,r.l&&ae(r.l))}function Xt(r){r.o||(r.o=nr(r.t))}function er(r,t,o){var n=rr(t)?H("MapSet").F(t,o):or(t)?H("MapSet").T(t,o):r.O?function(a,i){var l=Array.isArray(a),d={i:l?1:0,A:i?i.A:Jt(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},f=d,u=Ze;l&&(f=[d],u=He);var p=Proxy.revocable(f,u),h=p.revoke,y=p.proxy;return d.k=y,d.j=h,y}(t,o):H("ES5").J(t,o);return(o?o.A:Jt()).p.push(n),n}function xa(r){return Y(r)||U(22,r),function t(o){if(!$(o))return o;var n,a=o[I],i=ke(o);if(a){if(!a.P&&(a.i<4||!H("ES5").K(a)))return a.t;a.I=!0,n=un(o,i),a.I=!1}else n=un(o,i);return he(n,function(l,d){a&&ya(a.t,l)===d||gn(n,l,t(d))}),i===3?new Set(n):n}(r)}function un(r,t){switch(t){case 2:return new Map(r);case 3:return Array.from(r)}return nr(r)}function bn(){function r(l,d){var f=i[l];return f?f.enumerable=d:i[l]=f={configurable:!0,enumerable:d,get:function(){var u=this[I];return Ze.get(u,l)},set:function(u){var p=this[I];Ze.set(p,l,u)}},f}function t(l){for(var d=l.length-1;d>=0;d--){var f=l[d][I];if(!f.P)switch(f.i){case 5:n(f)&&ae(f);break;case 4:o(f)&&ae(f)}}}function o(l){for(var d=l.t,f=l.k,u=Pe(f),p=u.length-1;p>=0;p--){var h=u[p];if(h!==I){var y=d[h];if(y===void 0&&!Re(d,h))return!0;var b=f[h],g=b&&b[I];if(g?g.t!==y:!mn(b,y))return!0}}var x=!!d[I];return u.length!==Pe(d).length+(x?0:1)}function n(l){var d=l.k;if(d.length!==l.t.length)return!0;var f=Object.getOwnPropertyDescriptor(d,d.length-1);if(f&&!f.get)return!0;for(var u=0;u<d.length;u++)if(!d.hasOwnProperty(u))return!0;return!1}function a(l){l.g&&U(3,JSON.stringify(ne(l)))}var i={};ma("ES5",{J:function(l,d){var f=Array.isArray(l),u=function(h,y){if(h){for(var b=Array(y.length),g=0;g<y.length;g++)Object.defineProperty(b,""+g,r(g,!0));return b}var x=vn(y);delete x[I];for(var N=Pe(x),C=0;C<N.length;C++){var w=N[C];x[w]=r(w,h||!!x[w].enumerable)}return Object.create(Object.getPrototypeOf(y),x)}(f,l),p={i:f?5:4,A:d?d.A:Jt(),P:!1,I:!1,R:{},l:d,t:l,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,I,{value:p,writable:!0}),u},S:function(l,d,f){f?Y(d)&&d[I].A===l&&t(l.p):(l.u&&function u(p){if(p&&typeof p=="object"){var h=p[I];if(h){var y=h.t,b=h.k,g=h.R,x=h.i;if(x===4)he(b,function(E){E!==I&&(y[E]!==void 0||Re(y,E)?g[E]||u(b[E]):(g[E]=!0,ae(h)))}),he(y,function(E){b[E]!==void 0||Re(b,E)||(g[E]=!1,ae(h))});else if(x===5){if(n(h)&&(ae(h),g.length=!0),b.length<y.length)for(var N=b.length;N<y.length;N++)g[N]=!1;else for(var C=y.length;C<b.length;C++)g[C]=!0;for(var w=Math.min(b.length,y.length),A=0;A<w;A++)b.hasOwnProperty(A)||(g[A]=!0),g[A]===void 0&&u(b[A])}}}}(l.p[0]),t(l.p))},K:function(l){return l.i===4?o(l):n(l)}})}var pn,Ke,cr=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",va=typeof Map<"u",Sa=typeof Set<"u",hn=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",xn=cr?Symbol.for("immer-nothing"):((pn={})["immer-nothing"]=!0,pn),yn=cr?Symbol.for("immer-draftable"):"__$immer_draftable",I=cr?Symbol.for("immer-state"):"__$immer_state";var Oa=""+Object.prototype.constructor,Pe=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:Object.getOwnPropertyNames,vn=Object.getOwnPropertyDescriptors||function(r){var t={};return Pe(r).forEach(function(o){t[o]=Object.getOwnPropertyDescriptor(r,o)}),t},tr={},Ze={get:function(r,t){if(t===I)return r;var o=ne(r);if(!Re(o,t))return function(a,i,l){var d,f=fn(i,l);return f?"value"in f?f.value:(d=f.get)===null||d===void 0?void 0:d.call(a.k):void 0}(r,o,t);var n=o[t];return r.I||!$(n)?n:n===Yt(r.t,t)?(Xt(r),r.o[t]=er(r.A.h,n,r)):n},has:function(r,t){return t in ne(r)},ownKeys:function(r){return Reflect.ownKeys(ne(r))},set:function(r,t,o){var n=fn(ne(r),t);if(n?.set)return n.set.call(r.k,o),!0;if(!r.P){var a=Yt(ne(r),t),i=a?.[I];if(i&&i.t===o)return r.o[t]=o,r.R[t]=!1,!0;if(mn(o,a)&&(o!==void 0||Re(r.t,t)))return!0;Xt(r),ae(r)}return r.o[t]===o&&(o!==void 0||t in r.o)||Number.isNaN(o)&&Number.isNaN(r.o[t])||(r.o[t]=o,r.R[t]=!0),!0},deleteProperty:function(r,t){return Yt(r.t,t)!==void 0||t in r.t?(r.R[t]=!1,Xt(r),ae(r)):delete r.R[t],r.o&&delete r.o[t],!0},getOwnPropertyDescriptor:function(r,t){var o=ne(r),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{writable:!0,configurable:r.i!==1||t!=="length",enumerable:n.enumerable,value:o[t]}},defineProperty:function(){U(11)},getPrototypeOf:function(r){return Object.getPrototypeOf(r.t)},setPrototypeOf:function(){U(12)}},He={};he(Ze,function(r,t){He[r]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),He.deleteProperty=function(r,t){return He.set.call(this,r,t,void 0)},He.set=function(r,t,o){return Ze.set.call(this,r[0],t,o,r[0])};var Ca=function(){function r(o){var n=this;this.O=hn,this.D=!0,this.produce=function(a,i,l){if(typeof a=="function"&&typeof i!="function"){var d=i;i=a;var f=n;return function(x){var N=this;x===void 0&&(x=d);for(var C=arguments.length,w=Array(C>1?C-1:0),A=1;A<C;A++)w[A-1]=arguments[A];return f.produce(x,function(E){var X;return(X=i).call.apply(X,[N,E].concat(w))})}}var u;if(typeof i!="function"&&U(6),l!==void 0&&typeof l!="function"&&U(7),$(a)){var p=sn(n),h=er(n,a,void 0),y=!0;try{u=i(h),y=!1}finally{y?ft(p):Qt(p)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(x){return Vt(p,l),qt(x,p)},function(x){throw ft(p),x}):(Vt(p,l),qt(u,p))}if(!a||typeof a!="object"){if((u=i(a))===void 0&&(u=a),u===xn&&(u=void 0),n.D&&ar(u,!0),l){var b=[],g=[];H("Patches").M(a,u,b,g),l(b,g)}return u}U(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(u){for(var p=arguments.length,h=Array(p>1?p-1:0),y=1;y<p;y++)h[y-1]=arguments[y];return n.produceWithPatches(u,function(b){return a.apply(void 0,[b].concat(h))})};var l,d,f=n.produce(a,i,function(u,p){l=u,d=p});return typeof Promise<"u"&&f instanceof Promise?f.then(function(u){return[u,l,d]}):[f,l,d]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var t=r.prototype;return t.createDraft=function(o){$(o)||U(8),Y(o)&&(o=xa(o));var n=sn(this),a=er(this,o,void 0);return a[I].C=!0,Qt(n),a},t.finishDraft=function(o,n){var a=o&&o[I],i=a.A;return Vt(i,n),qt(void 0,i)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!hn&&U(20),this.O=o},t.applyPatches=function(o,n){var a;for(a=n.length-1;a>=0;a--){var i=n[a];if(i.path.length===0&&i.op==="replace"){o=i.value;break}}a>-1&&(n=n.slice(a+1));var l=H("Patches").$;return Y(o)?l(o,n):this.produce(o,function(d){return l(d,n)})},r}(),F=new Ca,wa=F.produce,Ud=F.produceWithPatches.bind(F),Td=F.setAutoFreeze.bind(F),Dd=F.setUseProxies.bind(F),Bd=F.applyPatches.bind(F),Md=F.createDraft.bind(F),$d=F.finishDraft.bind(F),ht=wa;function ie(r){"@babel/helpers - typeof";return ie=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ie(r)}function lr(r,t){if(ie(r)!=="object"||r===null)return r;var o=r[Symbol.toPrimitive];if(o!==void 0){var n=o.call(r,t||"default");if(ie(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function sr(r){var t=lr(r,"string");return ie(t)==="symbol"?t:String(t)}function dr(r,t,o){return t=sr(t),t in r?Object.defineProperty(r,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[t]=o,r}function Sn(r,t){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),o.push.apply(o,n)}return o}function yt(r){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?Sn(Object(o),!0).forEach(function(n){dr(r,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):Sn(Object(o)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(o,n))})}return r}function W(r){return"Minified Redux error #"+r+"; visit https://redux.js.org/Errors?code="+r+" for the full message or use the non-minified dev environment for full errors. "}var On=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),fr=function(){return Math.random().toString(36).substring(7).split("").join(".")},gt={INIT:"@@redux/INIT"+fr(),REPLACE:"@@redux/REPLACE"+fr(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+fr()}};function Na(r){if(typeof r!="object"||r===null)return!1;for(var t=r;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(r)===t}function ur(r,t,o){var n;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(W(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(W(1));return o(ur)(r,t)}if(typeof r!="function")throw new Error(W(2));var a=r,i=t,l=[],d=l,f=!1;function u(){d===l&&(d=l.slice())}function p(){if(f)throw new Error(W(3));return i}function h(x){if(typeof x!="function")throw new Error(W(4));if(f)throw new Error(W(5));var N=!0;return u(),d.push(x),function(){if(N){if(f)throw new Error(W(6));N=!1,u();var w=d.indexOf(x);d.splice(w,1),l=null}}}function y(x){if(!Na(x))throw new Error(W(7));if(typeof x.type>"u")throw new Error(W(8));if(f)throw new Error(W(9));try{f=!0,i=a(i,x)}finally{f=!1}for(var N=l=d,C=0;C<N.length;C++){var w=N[C];w()}return x}function b(x){if(typeof x!="function")throw new Error(W(10));a=x,y({type:gt.REPLACE})}function g(){var x,N=h;return x={subscribe:function(w){if(typeof w!="object"||w===null)throw new Error(W(11));function A(){w.next&&w.next(p())}A();var E=N(A);return{unsubscribe:E}}},x[On]=function(){return this},x}return y({type:gt.INIT}),n={dispatch:y,subscribe:h,getState:p,replaceReducer:b},n[On]=g,n}function Ea(r){Object.keys(r).forEach(function(t){var o=r[t],n=o(void 0,{type:gt.INIT});if(typeof n>"u")throw new Error(W(12));if(typeof o(void 0,{type:gt.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(W(13))})}function Cn(r){for(var t=Object.keys(r),o={},n=0;n<t.length;n++){var a=t[n];typeof r[a]=="function"&&(o[a]=r[a])}var i=Object.keys(o),l,d;try{Ea(o)}catch(f){d=f}return function(u,p){if(u===void 0&&(u={}),d)throw d;if(0)var h;for(var y=!1,b={},g=0;g<i.length;g++){var x=i[g],N=o[x],C=u[x],w=N(C,p);if(typeof w>"u"){var A=p&&p.type;throw new Error(W(14))}b[x]=w,y=y||w!==C}return y=y||i.length!==Object.keys(u).length,y?b:u}}function We(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,a){return function(){return n(a.apply(void 0,arguments))}})}function wn(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(W(15))},l={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},d=t.map(function(f){return f(l)});return i=We.apply(void 0,d)(a.dispatch),yt(yt({},a),{},{dispatch:i})}}}function Nn(r){var t=function(n){var a=n.dispatch,i=n.getState;return function(l){return function(d){return typeof d=="function"?d(a,i,r):l(d)}}};return t}var En=Nn();En.withExtraArgument=Nn;var pr=En;var kn=function(){var r=function(t,o){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(n[i]=a[i])},r(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");r(t,o);function n(){this.constructor=t}t.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),Ia=function(r,t){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,l;return l={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function d(u){return function(p){return f([u,p])}}function f(u){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(i=u[0]&2?a.return:u[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,u[1])).done)return i;switch(a=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,a=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){o=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){o.label=u[1];break}if(u[0]===6&&o.label<i[1]){o.label=i[1],i=u;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(u);break}i[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(r,o)}catch(p){u=[6,p],a=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},Le=function(r,t){for(var o=0,n=t.length,a=r.length;o<n;o++,a++)r[a]=t[o];return r},Aa=Object.defineProperty,Ra=Object.defineProperties,Pa=Object.getOwnPropertyDescriptors,In=Object.getOwnPropertySymbols,ka=Object.prototype.hasOwnProperty,Wa=Object.prototype.propertyIsEnumerable,An=function(r,t,o){return t in r?Aa(r,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[t]=o},ce=function(r,t){for(var o in t||(t={}))ka.call(t,o)&&An(r,o,t[o]);if(In)for(var n=0,a=In(t);n<a.length;n++){var o=a[n];Wa.call(t,o)&&An(r,o,t[o])}return r},hr=function(r,t){return Ra(r,Pa(t))},La=function(r,t,o){return new Promise(function(n,a){var i=function(f){try{d(o.next(f))}catch(u){a(u)}},l=function(f){try{d(o.throw(f))}catch(u){a(u)}},d=function(f){return f.done?n(f.value):Promise.resolve(f.value).then(i,l)};d((o=o.apply(r,t)).next())})};var Fa=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?We:We.apply(null,arguments)},cf=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(r){return r}};function za(r){if(typeof r!="object"||r===null)return!1;var t=Object.getPrototypeOf(r);if(t===null)return!0;for(var o=t;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return t===o}var _a=function(r){kn(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=r.apply(this,o)||this;return Object.setPrototypeOf(a,t.prototype),a}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,Le([void 0],o[0].concat(this)))):new(t.bind.apply(t,Le([void 0],o.concat(this))))},t}(Array),Ua=function(r){kn(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=r.apply(this,o)||this;return Object.setPrototypeOf(a,t.prototype),a}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,Le([void 0],o[0].concat(this)))):new(t.bind.apply(t,Le([void 0],o.concat(this))))},t}(Array);function mr(r){return $(r)?ht(r,function(){}):r}function Ta(r){return typeof r=="boolean"}function Da(){return function(t){return Ba(t)}}function Ba(r){r===void 0&&(r={});var t=r.thunk,o=t===void 0?!0:t,n=r.immutableCheck,a=n===void 0?!0:n,i=r.serializableCheck,l=i===void 0?!0:i,d=new _a;if(o&&(Ta(o)?d.push(pr):d.push(pr.withExtraArgument(o.extraArgument))),0){if(a)var f;if(l)var u}return d}var yr=!0;function Wn(r){var t=Da(),o=r||{},n=o.reducer,a=n===void 0?void 0:n,i=o.middleware,l=i===void 0?t():i,d=o.devTools,f=d===void 0?!0:d,u=o.preloadedState,p=u===void 0?void 0:u,h=o.enhancers,y=h===void 0?void 0:h,b;if(typeof a=="function")b=a;else if(za(a))b=Cn(a);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 g=l;if(typeof g=="function"&&(g=g(t),!yr&&!Array.isArray(g)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!yr&&g.some(function(E){return typeof E!="function"}))throw new Error("each middleware provided to configureStore must be a function");var x=wn.apply(void 0,g),N=We;f&&(N=Fa(ce({trace:!yr},typeof f=="object"&&f)));var C=new Ua(x),w=C;Array.isArray(y)?w=Le([x],y):typeof y=="function"&&(w=y(C));var A=N.apply(void 0,w);return ur(b,p,A)}function le(r,t){function o(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(t){var i=t.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return ce(ce({type:r,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:r,payload:n[0]}}return o.toString=function(){return""+r},o.type=r,o.match=function(n){return n.type===r},o}function Ln(r){var t={},o=[],n,a={addCase:function(i,l){var d=typeof i=="string"?i:i.type;if(d in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[d]=l,a},addMatcher:function(i,l){return o.push({matcher:i,reducer:l}),a},addDefaultCase:function(i){return n=i,a}};return r(a),[t,o,n]}function Ma(r){return typeof r=="function"}function $a(r,t,o,n){o===void 0&&(o=[]);var a=typeof t=="function"?Ln(t):[t,o,n],i=a[0],l=a[1],d=a[2],f;if(Ma(r))f=function(){return mr(r())};else{var u=mr(r);f=function(){return u}}function p(h,y){h===void 0&&(h=f());var b=Le([i[y.type]],l.filter(function(g){var x=g.matcher;return x(y)}).map(function(g){var x=g.reducer;return x}));return b.filter(function(g){return!!g}).length===0&&(b=[d]),b.reduce(function(g,x){if(x)if(Y(g)){var N=g,C=x(N,y);return C===void 0?g:C}else{if($(g))return ht(g,function(w){return x(w,y)});var C=x(g,y);if(C===void 0){if(g===null)return g;throw Error("A case reducer on a non-draftable value must not return undefined")}return C}return g},h)}return p.getInitialState=f,p}function ja(r,t){return r+"/"+t}function Fn(r){var t=r.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof r.initialState=="function"?r.initialState:mr(r.initialState),n=r.reducers||{},a=Object.keys(n),i={},l={},d={};a.forEach(function(p){var h=n[p],y=ja(t,p),b,g;"reducer"in h?(b=h.reducer,g=h.prepare):b=h,i[p]=b,l[y]=b,d[p]=g?le(y,g):le(y)});function f(){var p=typeof r.extraReducers=="function"?Ln(r.extraReducers):[r.extraReducers],h=p[0],y=h===void 0?{}:h,b=p[1],g=b===void 0?[]:b,x=p[2],N=x===void 0?void 0:x,C=ce(ce({},y),l);return $a(o,function(w){for(var A in C)w.addCase(A,C[A]);for(var E=0,X=g;E<X.length;E++){var Z=X[E];w.addMatcher(Z.matcher,Z.reducer)}N&&w.addDefaultCase(N)})}var u;return{name:t,reducer:function(p,h){return u||(u=f()),u(p,h)},actions:d,caseReducers:i,getInitialState:function(){return u||(u=f()),u.getInitialState()}}}var Ha="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ka=function(r){r===void 0&&(r=21);for(var t="",o=r;o--;)t+=Ha[Math.random()*64|0];return t},Za=["name","message","stack","code"],gr=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),Rn=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),Ga=function(r){if(typeof r=="object"&&r!==null){for(var t={},o=0,n=Za;o<n.length;o++){var a=n[o];typeof r[a]=="string"&&(t[a]=r[a])}return t}return{message:String(r)}},ff=function(){function r(t,o,n){var a=le(t+"/fulfilled",function(p,h,y,b){return{payload:p,meta:hr(ce({},b||{}),{arg:y,requestId:h,requestStatus:"fulfilled"})}}),i=le(t+"/pending",function(p,h,y){return{payload:void 0,meta:hr(ce({},y||{}),{arg:h,requestId:p,requestStatus:"pending"})}}),l=le(t+"/rejected",function(p,h,y,b,g){return{payload:b,error:(n&&n.serializeError||Ga)(p||"Rejected"),meta:hr(ce({},g||{}),{arg:y,requestId:h,rejectedWithValue:!!b,requestStatus:"rejected",aborted:p?.name==="AbortError",condition:p?.name==="ConditionError"})}}),d=!1,f=typeof AbortController<"u"?AbortController:function(){function p(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return p.prototype.abort=function(){},p}();function u(p){return function(h,y,b){var g=n?.idGenerator?n.idGenerator(p):Ka(),x=new f,N,C=!1;function w(E){N=E,x.abort()}var A=function(){return La(this,null,function(){var E,X,Z,Fe,Er,ze,Ir;return Ia(this,function(ye){switch(ye.label){case 0:return ye.trys.push([0,4,,5]),Fe=(E=n?.condition)==null?void 0:E.call(n,p,{getState:y,extra:b}),qa(Fe)?[4,Fe]:[3,2];case 1:Fe=ye.sent(),ye.label=2;case 2:if(Fe===!1||x.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return C=!0,Er=new Promise(function(T,_e){return x.signal.addEventListener("abort",function(){return _e({name:"AbortError",message:N||"Aborted"})})}),h(i(g,p,(X=n?.getPendingMeta)==null?void 0:X.call(n,{requestId:g,arg:p},{getState:y,extra:b}))),[4,Promise.race([Er,Promise.resolve(o(p,{dispatch:h,getState:y,extra:b,requestId:g,signal:x.signal,abort:w,rejectWithValue:function(T,_e){return new gr(T,_e)},fulfillWithValue:function(T,_e){return new Rn(T,_e)}})).then(function(T){if(T instanceof gr)throw T;return T instanceof Rn?a(T.payload,g,p,T.meta):a(T,g,p)})])];case 3:return Z=ye.sent(),[3,5];case 4:return ze=ye.sent(),Z=ze instanceof gr?l(null,g,p,ze.payload,ze.meta):l(ze,g,p),[3,5];case 5:return Ir=n&&!n.dispatchConditionRejection&&l.match(Z)&&Z.meta.condition,Ir||h(Z),[2,Z]}})})}();return Object.assign(A,{abort:w,requestId:g,arg:p,unwrap:function(){return A.then(Va)}})}}return Object.assign(u,{pending:i,rejected:l,fulfilled:a,typePrefix:t})}return r.withTypes=function(){return r},r}();function Va(r){if(r.meta&&r.meta.rejectedWithValue)throw r.payload;if(r.error)throw r.error;return r.payload}function qa(r){return r!==null&&typeof r=="object"&&typeof r.then=="function"}var zn="listener",_n="completed",Un="cancelled",uf="task-"+Un,pf="task-"+_n,hf=zn+"-"+Un,yf=zn+"-"+_n;var br="listenerMiddleware";var gf=le(br+"/add"),mf=le(br+"/removeAll"),bf=le(br+"/remove");var Pn,xf=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(r){return(Pn||(Pn=Promise.resolve())).then(r).catch(function(t){return setTimeout(function(){throw t},0)})},Ya=function(r){return function(t){setTimeout(t,r)}},vf=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Ya(10);bn();window.ftReduxStores||(window.ftReduxStores={});var Tn=class r{static get(t){var o;let n=typeof t=="string"?t:t.name,a=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if($e(i))return i;if(a==null)return;let l=Fn({...a,reducers:(o=a.reducers)!==null&&o!==void 0?o:{}}),d=Wn({reducer:(f,u)=>u.type==="CLEAR_FT_REDUX_STORE"?l.getInitialState():typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__")?{...f,...u.overwrites}:l.reducer(f,u)});return window.ftReduxStores[a.name]=new r(l,d)}constructor(t,o){this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.eventBus=document.createElement("event-bus"),this.commands=new at,this.actions=new Proxy(this.reduxSlice.actions,{get:(n,a,i)=>{let l=a,d=n[l];return d?(...f)=>{let u=d(...f);return this.reduxStore.dispatch(u),u}:f=>{this.setState({[l]:f})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var vt=O(P());var mt=class extends ee{async listMySearches(){let t=S.getState().session;return t?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var bt=class extends ee{async listMyBookmarks(){let t=S.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var Ja="ft-user-assets",xt=vt.FtReduxStore.get({name:Ja,initialState:{savedSearches:void 0,bookmarks:void 0}}),xr=class{constructor(){this.currentSession=S.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new bt,this.savedSearchesService=new mt,S.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=S.getState();(0,vt.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),xt.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),xt.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();xt.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;xt.actions.bookmarks(o)}}},qf=new xr;var vr=class{addCommand(t,o=!1){S.commands.add(t,o)}consumeCommand(t){return S.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new vr;var Dn=O(P()),Sr=class{highlightHtml(t,o){(0,Dn.highlightHtml)(t,o)}};window.FluidTopicsHighlightHtmlService=new Sr;var Bn=O(P());var Or=class{isDate(t){var o,n,a,i;return(i=(a=((n=(o=S.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(d=>d.key===t))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(t,o){var n,a,i;return Bn.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:S.getState().uiLocale,(a=o?.longFormat)!==null&&a!==void 0?a:!1,(i=o?.withTime)!==null&&i!==void 0?i:!1)}};window.FluidTopicsDateService=new Or;(0,Mn.customElement)("ft-app-context")(R);var Zn=O(P());var Nt=O(D()),Et=O(B()),It=O(P());var $n=O(D());var jn=$n.css`
|
|
119
|
+
`}update(t){super.update(t),t.has("baseUrl")&&(S.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&S.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&S.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&S.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&S.actions.noCustom(this.noCustom),t.has("editorMode")&&S.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&S.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&S.actions.session(this.session),t.has("availableUiLocales")&&S.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(o=>Ae.addContext(o)),t.has("openExternalDocumentInNewTab")&&S.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&S.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&S.actions.forcedOffline(this.forcedOffline),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){!this.withManualResources&&this.apiProvider()&&(this.session==null&&this.updateSession(),this.availableUiLocales==null&&this.updateUiLocales(),this.metadataConfiguration==null&&this.updateMetadataConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},t.idleTimeoutInMillis),t})}async updateUiLocales(){this.availableUiLocales=await this.cache.get("availableUiLocales",()=>this.apiProvider().getAvailableUiLocales())}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}};R.elementDefinitions={};R.styles=Zo;L([(0,_.property)()],R.prototype,"baseUrl",void 0);L([(0,_.property)()],R.prototype,"apiIntegrationIdentifier",void 0);L([(0,_.property)()],R.prototype,"uiLocale",void 0);L([(0,M.jsonProperty)(null)],R.prototype,"availableUiLocales",void 0);L([(0,M.jsonProperty)(null)],R.prototype,"metadataConfiguration",void 0);L([(0,_.property)({type:Boolean})],R.prototype,"editorMode",void 0);L([(0,_.property)({type:Boolean})],R.prototype,"noCustom",void 0);L([(0,_.property)({type:Boolean})],R.prototype,"openExternalDocumentInNewTab",void 0);L([(0,_.property)({converter:{fromAttribute(r){return r==="false"?!1:r==="true"||(r??!1)}}})],R.prototype,"noCustomComponent",void 0);L([(0,_.property)({type:Boolean})],R.prototype,"withManualResources",void 0);L([(0,_.property)({type:Boolean})],R.prototype,"navigatorOnline",void 0);L([(0,_.property)({type:Boolean})],R.prototype,"forcedOffline",void 0);L([(0,_.property)({type:Object})],R.prototype,"apiProvider",void 0);L([(0,M.jsonProperty)([])],R.prototype,"messageContexts",void 0);L([(0,M.jsonProperty)(void 0)],R.prototype,"session",void 0);var Xa=O(B());function ua(r,t){if(r===t)return!0;if(r&&t&&typeof r=="object"&&typeof t=="object"){if(r.constructor!==t.constructor)return!1;var o,n,a;if(Array.isArray(r)){if(o=r.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!nt(r[n],t[n]))return!1;return!0}if(r instanceof Map&&t instanceof Map){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;for(n of r.entries())if(!nt(n[1],t.get(n[0])))return!1;return!0}if(r instanceof Set&&t instanceof Set){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;return!0}if(r.constructor===RegExp)return r.source===t.source&&r.flags===t.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===t.valueOf();if(a=Object.keys(r),o=a.length,o!==Object.keys(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,a[n]))return!1;for(n=o;n--!==0;){var i=a[n];if(!nt(r[i],t[i]))return!1}return!0}return r!==r&&t!==t}function nt(r,t){try{return ua(r,t)}catch{return!1}}function Gt(r,t){return!nt(r,t)}var pa=O(B(),1);var at=class{constructor(){this.queue=[]}add(t,o=!1){o&&(this.queue=this.queue.filter(n=>n.type!==t.type)),this.queue.push(t)}consume(t){let o=this.queue.find(n=>n.type===t);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}};var Me=O(B(),1);var Yo=O(B(),1);function Xo(r,t){let o=()=>JSON.parse(JSON.stringify(r));return(0,Yo.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return o();try{return JSON.parse(n)}catch{return o()}},toAttribute:n=>JSON.stringify(n)},hasChanged:Gt,...t??{}})}var it=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let n=[...this.callbacks];this.callbacks=[];let a=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,i=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let l of n)try{await l()}catch(d){a(d);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Qo=O(D(),1);var ct=window,ha=ct.ShadowRoot&&(ct.ShadyCSS===void 0||ct.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Nd=Symbol();var Jo=(r,t)=>{ha?r.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet):t.forEach(o=>{let n=document.createElement("style"),a=ct.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=o.cssText,r.appendChild(n)})};var lt=class extends Qo.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([a,i])=>t.registry.define(a,i)));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return Jo(n,t.elementStyles),n}};var st=function(r,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(i=(a<3?l(i):a>3?l(t,o,i):l(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},on,en=Symbol("constructorPrototype"),tn=Symbol("constructorName"),nn=Symbol("exportpartsDebouncer"),rn=Symbol("dynamicDependenciesLoaded"),re=class extends lt{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[on]=new it(5),this[tn]=this.constructor.name,this[en]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[tn]&&Object.setPrototypeOf(this,this[en])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let t=this.constructor;t[rn]||(t[rn]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate()})}contentAvailableCallback(t){}applyCustomStylesheet(t){var o,n,a;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}scheduleExportpartsUpdate(){var t,o,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[nn].run(()=>{var a,i;!((a=this.exportpartsPrefix)===null||a===void 0)&&a.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(t){var o,n,a,i,l,d;let f=y=>y!=null&&y.trim().length>0,u=t.filter(f).map(y=>y.trim());if(u.length===0){this.removeAttribute("exportparts");return}let p=new Set;for(let y of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let b=(i=(a=y.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],g=(d=(l=y.getAttribute("exportparts"))===null||l===void 0?void 0:l.split(",").map(x=>x.split(":")[1]))!==null&&d!==void 0?d:[];new Array(...b,...g).filter(f).map(x=>x.trim()).forEach(x=>p.add(x))}if(p.size===0){this.removeAttribute("exportparts");return}let h=[...p.values()].flatMap(y=>u.map(b=>`${y}:${b}--${y}`));this.setAttribute("exportparts",[...this.part,...h].join(", "))}};on=nn;st([(0,Me.property)()],re.prototype,"exportpartsPrefix",void 0);st([Xo([])],re.prototype,"exportpartsPrefixes",void 0);st([(0,Me.property)()],re.prototype,"customStylesheet",void 0);st([(0,Me.state)()],re.prototype,"useAdoptedStyleSheets",void 0);function $e(r){var t;return(t=r?.isFtReduxStore)!==null&&t!==void 0?t:!1}var an,cn,ln,dt=Symbol("internalReduxEventsUnsubscribers"),oe=Symbol("internalStoresUnsubscribers"),pe=Symbol("internalStores"),je=class extends re{constructor(){super(...arguments),this[an]=new Map,this[cn]=new Map,this[ln]=[]}get reduxConstructor(){return this.constructor}update(t){super.update(t),[...this.reduxConstructor.reduxReactiveProperties].some(o=>t.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[pe].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[pe].values()][0]}getStore(t){return t==null?this.getUnnamedStore():this[pe].get(t)}addStore(t,o){var n;o=(n=o??($e(t)?t.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this.setupStore(o,t)}removeStore(t){let o=typeof t=="string"?t:t.name;this.unsubscribeFromStore(o),this[pe].delete(o)}setupStore(t,o){this[pe].set(t,o),this.subscribeToStore(t,o),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[pe].forEach((t,o)=>this.subscribeToStore(o,t)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((t,o)=>{let n=this.constructor.getPropertyOptions(o);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:o)){let a=this.getStore(t.store);a&&(t.store?this[oe].has(t.store):this[oe].size>0)&&(this[o]=t.selector(a.getState(),this))}})}subscribeToStore(t,o){var n;this[oe].set(t,o.subscribe(()=>this.updateFromStores())),$e(o)&&o.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((a,i)=>{if(typeof this[i]=="function"&&(!a.store||o.name===a.store)){let l=d=>this[i](d);o.eventBus.addEventListener(a.eventName,l),this[dt].push(()=>o.eventBus.removeEventListener(a.eventName,l))}})),this.onStoreAvailable(t)}unsubscribeFromStores(){this[oe].forEach((t,o)=>this.unsubscribeFromStore(o)),this[dt].forEach(t=>t()),this[dt]=[]}unsubscribeFromStore(t){this[oe].has(t)&&this[oe].get(t)(),this[oe].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};an=oe,cn=pe,ln=dt;je.reduxProperties=new Map;je.reduxReactiveProperties=new Set;je.reduxEventListeners=new Map;function U(r){for(var t=arguments.length,o=Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];if(0)var a,i;throw Error("[Immer] minified error nr: "+r+(o.length?" "+o.map(function(l){return"'"+l+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Y(r){return!!r&&!!r[I]}function $(r){var t;return!!r&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===Oa}(r)||Array.isArray(r)||!!r[yn]||!!(!((t=r.constructor)===null||t===void 0)&&t[yn])||rr(r)||or(r))}function he(r,t,o){o===void 0&&(o=!1),ke(r)===0?(o?Object.keys:Pe)(r).forEach(function(n){o&&typeof n=="symbol"||t(n,r[n],r)}):r.forEach(function(n,a){return t(a,n,r)})}function ke(r){var t=r[I];return t?t.i>3?t.i-4:t.i:Array.isArray(r)?1:rr(r)?2:or(r)?3:0}function Re(r,t){return ke(r)===2?r.has(t):Object.prototype.hasOwnProperty.call(r,t)}function ya(r,t){return ke(r)===2?r.get(t):r[t]}function gn(r,t,o){var n=ke(r);n===2?r.set(t,o):n===3?r.add(o):r[t]=o}function mn(r,t){return r===t?r!==0||1/r==1/t:r!=r&&t!=t}function rr(r){return va&&r instanceof Map}function or(r){return Sa&&r instanceof Set}function ne(r){return r.o||r.t}function nr(r){if(Array.isArray(r))return Array.prototype.slice.call(r);var t=vn(r);delete t[I];for(var o=Pe(t),n=0;n<o.length;n++){var a=o[n],i=t[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:r[a]})}return Object.create(Object.getPrototypeOf(r),t)}function ar(r,t){return t===void 0&&(t=!1),ir(r)||Y(r)||!$(r)||(ke(r)>1&&(r.set=r.add=r.clear=r.delete=ga),Object.freeze(r),t&&he(r,function(o,n){return ar(n,!0)},!0)),r}function ga(){U(2)}function ir(r){return r==null||typeof r!="object"||Object.isFrozen(r)}function H(r){var t=tr[r];return t||U(18,r),t}function ma(r,t){tr[r]||(tr[r]=t)}function Jt(){return Ke}function Vt(r,t){t&&(H("Patches"),r.u=[],r.s=[],r.v=t)}function ft(r){Qt(r),r.p.forEach(ba),r.p=null}function Qt(r){r===Ke&&(Ke=r.l)}function sn(r){return Ke={p:[],l:Ke,h:r,m:!0,_:0}}function ba(r){var t=r[I];t.i===0||t.i===1?t.j():t.g=!0}function qt(r,t){t._=t.p.length;var o=t.p[0],n=r!==void 0&&r!==o;return t.h.O||H("ES5").S(t,r,n),n?(o[I].P&&(ft(t),U(4)),$(r)&&(r=ut(t,r),t.l||pt(t,r)),t.u&&H("Patches").M(o[I].t,r,t.u,t.s)):r=ut(t,o,[]),ft(t),t.u&&t.v(t.u,t.s),r!==xn?r:void 0}function ut(r,t,o){if(ir(t))return t;var n=t[I];if(!n)return he(t,function(d,f){return dn(r,n,t,d,f,o)},!0),t;if(n.A!==r)return t;if(!n.P)return pt(r,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=nr(n.k):n.o,i=a,l=!1;n.i===3&&(i=new Set(a),a.clear(),l=!0),he(i,function(d,f){return dn(r,n,a,d,f,o,l)}),pt(r,a,!1),o&&r.u&&H("Patches").N(n,o,r.u,r.s)}return n.o}function dn(r,t,o,n,a,i,l){if(Y(a)){var d=ut(r,a,i&&t&&t.i!==3&&!Re(t.R,n)?i.concat(n):void 0);if(gn(o,n,d),!Y(d))return;r.m=!1}else l&&o.add(a);if($(a)&&!ir(a)){if(!r.h.D&&r._<1)return;ut(r,a),t&&t.A.l||pt(r,a)}}function pt(r,t,o){o===void 0&&(o=!1),!r.l&&r.h.D&&r.m&&ar(t,o)}function Yt(r,t){var o=r[I];return(o?ne(o):r)[t]}function fn(r,t){if(t in r)for(var o=Object.getPrototypeOf(r);o;){var n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=Object.getPrototypeOf(o)}}function ae(r){r.P||(r.P=!0,r.l&&ae(r.l))}function Xt(r){r.o||(r.o=nr(r.t))}function er(r,t,o){var n=rr(t)?H("MapSet").F(t,o):or(t)?H("MapSet").T(t,o):r.O?function(a,i){var l=Array.isArray(a),d={i:l?1:0,A:i?i.A:Jt(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},f=d,u=Ze;l&&(f=[d],u=He);var p=Proxy.revocable(f,u),h=p.revoke,y=p.proxy;return d.k=y,d.j=h,y}(t,o):H("ES5").J(t,o);return(o?o.A:Jt()).p.push(n),n}function xa(r){return Y(r)||U(22,r),function t(o){if(!$(o))return o;var n,a=o[I],i=ke(o);if(a){if(!a.P&&(a.i<4||!H("ES5").K(a)))return a.t;a.I=!0,n=un(o,i),a.I=!1}else n=un(o,i);return he(n,function(l,d){a&&ya(a.t,l)===d||gn(n,l,t(d))}),i===3?new Set(n):n}(r)}function un(r,t){switch(t){case 2:return new Map(r);case 3:return Array.from(r)}return nr(r)}function bn(){function r(l,d){var f=i[l];return f?f.enumerable=d:i[l]=f={configurable:!0,enumerable:d,get:function(){var u=this[I];return Ze.get(u,l)},set:function(u){var p=this[I];Ze.set(p,l,u)}},f}function t(l){for(var d=l.length-1;d>=0;d--){var f=l[d][I];if(!f.P)switch(f.i){case 5:n(f)&&ae(f);break;case 4:o(f)&&ae(f)}}}function o(l){for(var d=l.t,f=l.k,u=Pe(f),p=u.length-1;p>=0;p--){var h=u[p];if(h!==I){var y=d[h];if(y===void 0&&!Re(d,h))return!0;var b=f[h],g=b&&b[I];if(g?g.t!==y:!mn(b,y))return!0}}var x=!!d[I];return u.length!==Pe(d).length+(x?0:1)}function n(l){var d=l.k;if(d.length!==l.t.length)return!0;var f=Object.getOwnPropertyDescriptor(d,d.length-1);if(f&&!f.get)return!0;for(var u=0;u<d.length;u++)if(!d.hasOwnProperty(u))return!0;return!1}function a(l){l.g&&U(3,JSON.stringify(ne(l)))}var i={};ma("ES5",{J:function(l,d){var f=Array.isArray(l),u=function(h,y){if(h){for(var b=Array(y.length),g=0;g<y.length;g++)Object.defineProperty(b,""+g,r(g,!0));return b}var x=vn(y);delete x[I];for(var N=Pe(x),C=0;C<N.length;C++){var w=N[C];x[w]=r(w,h||!!x[w].enumerable)}return Object.create(Object.getPrototypeOf(y),x)}(f,l),p={i:f?5:4,A:d?d.A:Jt(),P:!1,I:!1,R:{},l:d,t:l,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,I,{value:p,writable:!0}),u},S:function(l,d,f){f?Y(d)&&d[I].A===l&&t(l.p):(l.u&&function u(p){if(p&&typeof p=="object"){var h=p[I];if(h){var y=h.t,b=h.k,g=h.R,x=h.i;if(x===4)he(b,function(E){E!==I&&(y[E]!==void 0||Re(y,E)?g[E]||u(b[E]):(g[E]=!0,ae(h)))}),he(y,function(E){b[E]!==void 0||Re(b,E)||(g[E]=!1,ae(h))});else if(x===5){if(n(h)&&(ae(h),g.length=!0),b.length<y.length)for(var N=b.length;N<y.length;N++)g[N]=!1;else for(var C=y.length;C<b.length;C++)g[C]=!0;for(var w=Math.min(b.length,y.length),A=0;A<w;A++)b.hasOwnProperty(A)||(g[A]=!0),g[A]===void 0&&u(b[A])}}}}(l.p[0]),t(l.p))},K:function(l){return l.i===4?o(l):n(l)}})}var pn,Ke,cr=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",va=typeof Map<"u",Sa=typeof Set<"u",hn=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",xn=cr?Symbol.for("immer-nothing"):((pn={})["immer-nothing"]=!0,pn),yn=cr?Symbol.for("immer-draftable"):"__$immer_draftable",I=cr?Symbol.for("immer-state"):"__$immer_state";var Oa=""+Object.prototype.constructor,Pe=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:Object.getOwnPropertyNames,vn=Object.getOwnPropertyDescriptors||function(r){var t={};return Pe(r).forEach(function(o){t[o]=Object.getOwnPropertyDescriptor(r,o)}),t},tr={},Ze={get:function(r,t){if(t===I)return r;var o=ne(r);if(!Re(o,t))return function(a,i,l){var d,f=fn(i,l);return f?"value"in f?f.value:(d=f.get)===null||d===void 0?void 0:d.call(a.k):void 0}(r,o,t);var n=o[t];return r.I||!$(n)?n:n===Yt(r.t,t)?(Xt(r),r.o[t]=er(r.A.h,n,r)):n},has:function(r,t){return t in ne(r)},ownKeys:function(r){return Reflect.ownKeys(ne(r))},set:function(r,t,o){var n=fn(ne(r),t);if(n?.set)return n.set.call(r.k,o),!0;if(!r.P){var a=Yt(ne(r),t),i=a?.[I];if(i&&i.t===o)return r.o[t]=o,r.R[t]=!1,!0;if(mn(o,a)&&(o!==void 0||Re(r.t,t)))return!0;Xt(r),ae(r)}return r.o[t]===o&&(o!==void 0||t in r.o)||Number.isNaN(o)&&Number.isNaN(r.o[t])||(r.o[t]=o,r.R[t]=!0),!0},deleteProperty:function(r,t){return Yt(r.t,t)!==void 0||t in r.t?(r.R[t]=!1,Xt(r),ae(r)):delete r.R[t],r.o&&delete r.o[t],!0},getOwnPropertyDescriptor:function(r,t){var o=ne(r),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{writable:!0,configurable:r.i!==1||t!=="length",enumerable:n.enumerable,value:o[t]}},defineProperty:function(){U(11)},getPrototypeOf:function(r){return Object.getPrototypeOf(r.t)},setPrototypeOf:function(){U(12)}},He={};he(Ze,function(r,t){He[r]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),He.deleteProperty=function(r,t){return He.set.call(this,r,t,void 0)},He.set=function(r,t,o){return Ze.set.call(this,r[0],t,o,r[0])};var Ca=function(){function r(o){var n=this;this.O=hn,this.D=!0,this.produce=function(a,i,l){if(typeof a=="function"&&typeof i!="function"){var d=i;i=a;var f=n;return function(x){var N=this;x===void 0&&(x=d);for(var C=arguments.length,w=Array(C>1?C-1:0),A=1;A<C;A++)w[A-1]=arguments[A];return f.produce(x,function(E){var X;return(X=i).call.apply(X,[N,E].concat(w))})}}var u;if(typeof i!="function"&&U(6),l!==void 0&&typeof l!="function"&&U(7),$(a)){var p=sn(n),h=er(n,a,void 0),y=!0;try{u=i(h),y=!1}finally{y?ft(p):Qt(p)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(x){return Vt(p,l),qt(x,p)},function(x){throw ft(p),x}):(Vt(p,l),qt(u,p))}if(!a||typeof a!="object"){if((u=i(a))===void 0&&(u=a),u===xn&&(u=void 0),n.D&&ar(u,!0),l){var b=[],g=[];H("Patches").M(a,u,b,g),l(b,g)}return u}U(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(u){for(var p=arguments.length,h=Array(p>1?p-1:0),y=1;y<p;y++)h[y-1]=arguments[y];return n.produceWithPatches(u,function(b){return a.apply(void 0,[b].concat(h))})};var l,d,f=n.produce(a,i,function(u,p){l=u,d=p});return typeof Promise<"u"&&f instanceof Promise?f.then(function(u){return[u,l,d]}):[f,l,d]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var t=r.prototype;return t.createDraft=function(o){$(o)||U(8),Y(o)&&(o=xa(o));var n=sn(this),a=er(this,o,void 0);return a[I].C=!0,Qt(n),a},t.finishDraft=function(o,n){var a=o&&o[I],i=a.A;return Vt(i,n),qt(void 0,i)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!hn&&U(20),this.O=o},t.applyPatches=function(o,n){var a;for(a=n.length-1;a>=0;a--){var i=n[a];if(i.path.length===0&&i.op==="replace"){o=i.value;break}}a>-1&&(n=n.slice(a+1));var l=H("Patches").$;return Y(o)?l(o,n):this.produce(o,function(d){return l(d,n)})},r}(),F=new Ca,wa=F.produce,Ud=F.produceWithPatches.bind(F),Td=F.setAutoFreeze.bind(F),Dd=F.setUseProxies.bind(F),Bd=F.applyPatches.bind(F),Md=F.createDraft.bind(F),$d=F.finishDraft.bind(F),ht=wa;function ie(r){"@babel/helpers - typeof";return ie=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ie(r)}function lr(r,t){if(ie(r)!=="object"||r===null)return r;var o=r[Symbol.toPrimitive];if(o!==void 0){var n=o.call(r,t||"default");if(ie(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function sr(r){var t=lr(r,"string");return ie(t)==="symbol"?t:String(t)}function dr(r,t,o){return t=sr(t),t in r?Object.defineProperty(r,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[t]=o,r}function Sn(r,t){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),o.push.apply(o,n)}return o}function yt(r){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?Sn(Object(o),!0).forEach(function(n){dr(r,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):Sn(Object(o)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(o,n))})}return r}function W(r){return"Minified Redux error #"+r+"; visit https://redux.js.org/Errors?code="+r+" for the full message or use the non-minified dev environment for full errors. "}var On=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),fr=function(){return Math.random().toString(36).substring(7).split("").join(".")},gt={INIT:"@@redux/INIT"+fr(),REPLACE:"@@redux/REPLACE"+fr(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+fr()}};function Na(r){if(typeof r!="object"||r===null)return!1;for(var t=r;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(r)===t}function ur(r,t,o){var n;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(W(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(W(1));return o(ur)(r,t)}if(typeof r!="function")throw new Error(W(2));var a=r,i=t,l=[],d=l,f=!1;function u(){d===l&&(d=l.slice())}function p(){if(f)throw new Error(W(3));return i}function h(x){if(typeof x!="function")throw new Error(W(4));if(f)throw new Error(W(5));var N=!0;return u(),d.push(x),function(){if(N){if(f)throw new Error(W(6));N=!1,u();var w=d.indexOf(x);d.splice(w,1),l=null}}}function y(x){if(!Na(x))throw new Error(W(7));if(typeof x.type>"u")throw new Error(W(8));if(f)throw new Error(W(9));try{f=!0,i=a(i,x)}finally{f=!1}for(var N=l=d,C=0;C<N.length;C++){var w=N[C];w()}return x}function b(x){if(typeof x!="function")throw new Error(W(10));a=x,y({type:gt.REPLACE})}function g(){var x,N=h;return x={subscribe:function(w){if(typeof w!="object"||w===null)throw new Error(W(11));function A(){w.next&&w.next(p())}A();var E=N(A);return{unsubscribe:E}}},x[On]=function(){return this},x}return y({type:gt.INIT}),n={dispatch:y,subscribe:h,getState:p,replaceReducer:b},n[On]=g,n}function Ea(r){Object.keys(r).forEach(function(t){var o=r[t],n=o(void 0,{type:gt.INIT});if(typeof n>"u")throw new Error(W(12));if(typeof o(void 0,{type:gt.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(W(13))})}function Cn(r){for(var t=Object.keys(r),o={},n=0;n<t.length;n++){var a=t[n];typeof r[a]=="function"&&(o[a]=r[a])}var i=Object.keys(o),l,d;try{Ea(o)}catch(f){d=f}return function(u,p){if(u===void 0&&(u={}),d)throw d;if(0)var h;for(var y=!1,b={},g=0;g<i.length;g++){var x=i[g],N=o[x],C=u[x],w=N(C,p);if(typeof w>"u"){var A=p&&p.type;throw new Error(W(14))}b[x]=w,y=y||w!==C}return y=y||i.length!==Object.keys(u).length,y?b:u}}function We(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,a){return function(){return n(a.apply(void 0,arguments))}})}function wn(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(W(15))},l={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},d=t.map(function(f){return f(l)});return i=We.apply(void 0,d)(a.dispatch),yt(yt({},a),{},{dispatch:i})}}}function Nn(r){var t=function(n){var a=n.dispatch,i=n.getState;return function(l){return function(d){return typeof d=="function"?d(a,i,r):l(d)}}};return t}var En=Nn();En.withExtraArgument=Nn;var pr=En;var kn=function(){var r=function(t,o){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(n[i]=a[i])},r(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");r(t,o);function n(){this.constructor=t}t.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),Ia=function(r,t){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,l;return l={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function d(u){return function(p){return f([u,p])}}function f(u){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(i=u[0]&2?a.return:u[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,u[1])).done)return i;switch(a=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,a=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){o=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){o.label=u[1];break}if(u[0]===6&&o.label<i[1]){o.label=i[1],i=u;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(u);break}i[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(r,o)}catch(p){u=[6,p],a=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},Le=function(r,t){for(var o=0,n=t.length,a=r.length;o<n;o++,a++)r[a]=t[o];return r},Aa=Object.defineProperty,Ra=Object.defineProperties,Pa=Object.getOwnPropertyDescriptors,In=Object.getOwnPropertySymbols,ka=Object.prototype.hasOwnProperty,Wa=Object.prototype.propertyIsEnumerable,An=function(r,t,o){return t in r?Aa(r,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[t]=o},ce=function(r,t){for(var o in t||(t={}))ka.call(t,o)&&An(r,o,t[o]);if(In)for(var n=0,a=In(t);n<a.length;n++){var o=a[n];Wa.call(t,o)&&An(r,o,t[o])}return r},hr=function(r,t){return Ra(r,Pa(t))},La=function(r,t,o){return new Promise(function(n,a){var i=function(f){try{d(o.next(f))}catch(u){a(u)}},l=function(f){try{d(o.throw(f))}catch(u){a(u)}},d=function(f){return f.done?n(f.value):Promise.resolve(f.value).then(i,l)};d((o=o.apply(r,t)).next())})};var Fa=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?We:We.apply(null,arguments)},cf=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(r){return r}};function za(r){if(typeof r!="object"||r===null)return!1;var t=Object.getPrototypeOf(r);if(t===null)return!0;for(var o=t;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return t===o}var _a=function(r){kn(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=r.apply(this,o)||this;return Object.setPrototypeOf(a,t.prototype),a}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,Le([void 0],o[0].concat(this)))):new(t.bind.apply(t,Le([void 0],o.concat(this))))},t}(Array),Ua=function(r){kn(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=r.apply(this,o)||this;return Object.setPrototypeOf(a,t.prototype),a}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,Le([void 0],o[0].concat(this)))):new(t.bind.apply(t,Le([void 0],o.concat(this))))},t}(Array);function mr(r){return $(r)?ht(r,function(){}):r}function Ta(r){return typeof r=="boolean"}function Da(){return function(t){return Ba(t)}}function Ba(r){r===void 0&&(r={});var t=r.thunk,o=t===void 0?!0:t,n=r.immutableCheck,a=n===void 0?!0:n,i=r.serializableCheck,l=i===void 0?!0:i,d=new _a;if(o&&(Ta(o)?d.push(pr):d.push(pr.withExtraArgument(o.extraArgument))),0){if(a)var f;if(l)var u}return d}var yr=!0;function Wn(r){var t=Da(),o=r||{},n=o.reducer,a=n===void 0?void 0:n,i=o.middleware,l=i===void 0?t():i,d=o.devTools,f=d===void 0?!0:d,u=o.preloadedState,p=u===void 0?void 0:u,h=o.enhancers,y=h===void 0?void 0:h,b;if(typeof a=="function")b=a;else if(za(a))b=Cn(a);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 g=l;if(typeof g=="function"&&(g=g(t),!yr&&!Array.isArray(g)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!yr&&g.some(function(E){return typeof E!="function"}))throw new Error("each middleware provided to configureStore must be a function");var x=wn.apply(void 0,g),N=We;f&&(N=Fa(ce({trace:!yr},typeof f=="object"&&f)));var C=new Ua(x),w=C;Array.isArray(y)?w=Le([x],y):typeof y=="function"&&(w=y(C));var A=N.apply(void 0,w);return ur(b,p,A)}function le(r,t){function o(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(t){var i=t.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return ce(ce({type:r,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:r,payload:n[0]}}return o.toString=function(){return""+r},o.type=r,o.match=function(n){return n.type===r},o}function Ln(r){var t={},o=[],n,a={addCase:function(i,l){var d=typeof i=="string"?i:i.type;if(d in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[d]=l,a},addMatcher:function(i,l){return o.push({matcher:i,reducer:l}),a},addDefaultCase:function(i){return n=i,a}};return r(a),[t,o,n]}function Ma(r){return typeof r=="function"}function $a(r,t,o,n){o===void 0&&(o=[]);var a=typeof t=="function"?Ln(t):[t,o,n],i=a[0],l=a[1],d=a[2],f;if(Ma(r))f=function(){return mr(r())};else{var u=mr(r);f=function(){return u}}function p(h,y){h===void 0&&(h=f());var b=Le([i[y.type]],l.filter(function(g){var x=g.matcher;return x(y)}).map(function(g){var x=g.reducer;return x}));return b.filter(function(g){return!!g}).length===0&&(b=[d]),b.reduce(function(g,x){if(x)if(Y(g)){var N=g,C=x(N,y);return C===void 0?g:C}else{if($(g))return ht(g,function(w){return x(w,y)});var C=x(g,y);if(C===void 0){if(g===null)return g;throw Error("A case reducer on a non-draftable value must not return undefined")}return C}return g},h)}return p.getInitialState=f,p}function ja(r,t){return r+"/"+t}function Fn(r){var t=r.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof r.initialState=="function"?r.initialState:mr(r.initialState),n=r.reducers||{},a=Object.keys(n),i={},l={},d={};a.forEach(function(p){var h=n[p],y=ja(t,p),b,g;"reducer"in h?(b=h.reducer,g=h.prepare):b=h,i[p]=b,l[y]=b,d[p]=g?le(y,g):le(y)});function f(){var p=typeof r.extraReducers=="function"?Ln(r.extraReducers):[r.extraReducers],h=p[0],y=h===void 0?{}:h,b=p[1],g=b===void 0?[]:b,x=p[2],N=x===void 0?void 0:x,C=ce(ce({},y),l);return $a(o,function(w){for(var A in C)w.addCase(A,C[A]);for(var E=0,X=g;E<X.length;E++){var Z=X[E];w.addMatcher(Z.matcher,Z.reducer)}N&&w.addDefaultCase(N)})}var u;return{name:t,reducer:function(p,h){return u||(u=f()),u(p,h)},actions:d,caseReducers:i,getInitialState:function(){return u||(u=f()),u.getInitialState()}}}var Ha="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ka=function(r){r===void 0&&(r=21);for(var t="",o=r;o--;)t+=Ha[Math.random()*64|0];return t},Za=["name","message","stack","code"],gr=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),Rn=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),Ga=function(r){if(typeof r=="object"&&r!==null){for(var t={},o=0,n=Za;o<n.length;o++){var a=n[o];typeof r[a]=="string"&&(t[a]=r[a])}return t}return{message:String(r)}},ff=function(){function r(t,o,n){var a=le(t+"/fulfilled",function(p,h,y,b){return{payload:p,meta:hr(ce({},b||{}),{arg:y,requestId:h,requestStatus:"fulfilled"})}}),i=le(t+"/pending",function(p,h,y){return{payload:void 0,meta:hr(ce({},y||{}),{arg:h,requestId:p,requestStatus:"pending"})}}),l=le(t+"/rejected",function(p,h,y,b,g){return{payload:b,error:(n&&n.serializeError||Ga)(p||"Rejected"),meta:hr(ce({},g||{}),{arg:y,requestId:h,rejectedWithValue:!!b,requestStatus:"rejected",aborted:p?.name==="AbortError",condition:p?.name==="ConditionError"})}}),d=!1,f=typeof AbortController<"u"?AbortController:function(){function p(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return p.prototype.abort=function(){},p}();function u(p){return function(h,y,b){var g=n?.idGenerator?n.idGenerator(p):Ka(),x=new f,N,C=!1;function w(E){N=E,x.abort()}var A=function(){return La(this,null,function(){var E,X,Z,Fe,Er,ze,Ir;return Ia(this,function(ye){switch(ye.label){case 0:return ye.trys.push([0,4,,5]),Fe=(E=n?.condition)==null?void 0:E.call(n,p,{getState:y,extra:b}),qa(Fe)?[4,Fe]:[3,2];case 1:Fe=ye.sent(),ye.label=2;case 2:if(Fe===!1||x.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return C=!0,Er=new Promise(function(T,_e){return x.signal.addEventListener("abort",function(){return _e({name:"AbortError",message:N||"Aborted"})})}),h(i(g,p,(X=n?.getPendingMeta)==null?void 0:X.call(n,{requestId:g,arg:p},{getState:y,extra:b}))),[4,Promise.race([Er,Promise.resolve(o(p,{dispatch:h,getState:y,extra:b,requestId:g,signal:x.signal,abort:w,rejectWithValue:function(T,_e){return new gr(T,_e)},fulfillWithValue:function(T,_e){return new Rn(T,_e)}})).then(function(T){if(T instanceof gr)throw T;return T instanceof Rn?a(T.payload,g,p,T.meta):a(T,g,p)})])];case 3:return Z=ye.sent(),[3,5];case 4:return ze=ye.sent(),Z=ze instanceof gr?l(null,g,p,ze.payload,ze.meta):l(ze,g,p),[3,5];case 5:return Ir=n&&!n.dispatchConditionRejection&&l.match(Z)&&Z.meta.condition,Ir||h(Z),[2,Z]}})})}();return Object.assign(A,{abort:w,requestId:g,arg:p,unwrap:function(){return A.then(Va)}})}}return Object.assign(u,{pending:i,rejected:l,fulfilled:a,typePrefix:t})}return r.withTypes=function(){return r},r}();function Va(r){if(r.meta&&r.meta.rejectedWithValue)throw r.payload;if(r.error)throw r.error;return r.payload}function qa(r){return r!==null&&typeof r=="object"&&typeof r.then=="function"}var zn="listener",_n="completed",Un="cancelled",uf="task-"+Un,pf="task-"+_n,hf=zn+"-"+Un,yf=zn+"-"+_n;var br="listenerMiddleware";var gf=le(br+"/add"),mf=le(br+"/removeAll"),bf=le(br+"/remove");var Pn,xf=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(r){return(Pn||(Pn=Promise.resolve())).then(r).catch(function(t){return setTimeout(function(){throw t},0)})},Ya=function(r){return function(t){setTimeout(t,r)}},vf=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Ya(10);bn();window.ftReduxStores||(window.ftReduxStores={});var Tn=class r{static get(t){var o;let n=typeof t=="string"?t:t.name,a=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if($e(i))return i;if(a==null)return;let l=Fn({...a,reducers:(o=a.reducers)!==null&&o!==void 0?o:{}}),d=Wn({reducer:(f,u)=>u.type==="CLEAR_FT_REDUX_STORE"?l.getInitialState():typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__")?{...f,...u.overwrites}:l.reducer(f,u)});return window.ftReduxStores[a.name]=new r(l,d)}constructor(t,o){this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.eventBus=document.createElement("event-bus"),this.commands=new at,this.actions=new Proxy(this.reduxSlice.actions,{get:(n,a,i)=>{let l=a,d=n[l];return d?(...f)=>{let u=d(...f);return this.reduxStore.dispatch(u),u}:f=>{this.setState({[l]:f})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var vt=O(P());var mt=class extends ee{async listMySearches(){let t=S.getState().session;return t?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var bt=class extends ee{async listMyBookmarks(){let t=S.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var Ja="ft-user-assets",xt=vt.FtReduxStore.get({name:Ja,initialState:{savedSearches:void 0,bookmarks:void 0}}),xr=class{constructor(){this.currentSession=S.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new bt,this.savedSearchesService=new mt,S.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=S.getState();(0,vt.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),xt.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),xt.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();xt.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;xt.actions.bookmarks(o)}}},qf=new xr;var vr=class{addCommand(t,o=!1){S.commands.add(t,o)}consumeCommand(t){return S.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new vr;var Dn=O(P()),Sr=class{highlightHtml(t,o,n){(0,Dn.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new Sr;var Bn=O(P());var Or=class{isDate(t){var o,n,a,i;return(i=(a=((n=(o=S.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(d=>d.key===t))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(t,o){var n,a,i;return Bn.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:S.getState().uiLocale,(a=o?.longFormat)!==null&&a!==void 0?a:!1,(i=o?.withTime)!==null&&i!==void 0?i:!1)}};window.FluidTopicsDateService=new Or;(0,Mn.customElement)("ft-app-context")(R);var Zn=O(P());var Nt=O(D()),Et=O(B()),It=O(P());var $n=O(D());var jn=$n.css`
|
|
120
120
|
`;var Ct=O(P());var Kn=O(B()),Qa=function(r,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(i=(a<3?l(i):a>3?l(t,o,i):l(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},Cr=Symbol("i18nAttributes"),St=Symbol("i18nProperties"),Ge=Symbol("i18nUnsubs");function wt(r){var t;class o extends r{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map}get i18nService(){return this.useCustomMessageContexts?Vo:Ae}i18n(a,i,...l){var d;if(typeof a=="string")return this.i18nService.resolveMessage(a,i,...l);let f=(d=a.args)!==null&&d!==void 0?d:a.argsProvider?a.argsProvider(this):[];return this.i18nService.resolveMessage(a.context,a.key,...f)}onI18nUpdate(a){var i,l;(i=this[Cr])===null||i===void 0||i.forEach((d,f)=>{var u;let p=this.getI18nAttributeValue(f);((u=p?.context)===null||u===void 0?void 0:u.toLowerCase())===a.toLowerCase()&&this.updateI18nAttributeMessage(f,p,d)}),(l=this[St])===null||l===void 0||l.forEach((d,f)=>{d.context.toLowerCase()===a.toLowerCase()&&(this[f]=this.i18n(d))}),setTimeout(()=>this.requestUpdate(),0)}updateI18nAttributeMessage(a,i,l){this[a]={...i,message:this.i18n({context:i.context,key:i.key,...l})}}update(a){var i,l;super.update(a),(i=this[Cr])===null||i===void 0||i.forEach((d,f)=>{let u=this.getI18nAttributeValue(f);u?.context&&u.key&&(a.has(f)||d.argsProvider!=null)&&(a.has(f)&&this.addI18nContext(u.context),this.updateI18nAttributeMessage(f,u,d))}),(l=this[St])===null||l===void 0||l.forEach((d,f)=>{d.argsProvider!=null&&(this[f]=this.i18n(d))})}getI18nAttributeValue(a){return this[a]}connectedCallback(){var a,i,l,d;super.connectedCallback(),new Set([...(i=(a=this[St])===null||a===void 0?void 0:a.values())!==null&&i!==void 0?i:[],...[...(d=(l=this[Cr])===null||l===void 0?void 0:l.keys())!==null&&d!==void 0?d:[]].map(f=>this.getI18nAttributeValue(f))].map(f=>f?.context)).forEach(f=>f&&this.addI18nMessages(f))}addI18nMessages(a,i){a=a.toLowerCase(),this[Ge].has(a)||this[Ge].set(a,this.i18nService.subscribe(a,()=>this.onI18nUpdate(a))),this.i18nService.prepareContext(a,i??{}),this.onI18nUpdate(a)}addI18nContext(a,i){this.addI18nMessages(typeof a=="string"?a:a.name,i)}disconnectedCallback(){super.disconnectedCallback(),this[Ge].forEach(a=>a()),this[Ge].clear()}}return t=Ge,Qa([(0,Kn.property)({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}var Hn=class extends wt(Ct.FtLitElement){},Ot=class extends wt(Ct.FtLitElementRedux){};var Ve=function(r,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(i=(a<3?l(i):a>3?l(t,o,i):l(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},j=class extends Ot{constructor(){super(),this.editorMode=!1,this.addStore(S)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Nt.nothing:Nt.html`
|
|
121
121
|
<span class="ft-i18n">
|
|
122
122
|
${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}
|