@fluid-topics/ft-reader-saved-bookmarks 1.3.46 → 1.3.48

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.
@@ -350,7 +350,7 @@ Also for action icons.`,s.colorGray200),contentGlobalSubtle:t.extend("--ftds-con
350
350
  `;var Ht=C(k());var $s=C(k());var Xi=C($()),q=C(Q()),ge=C(k());var zi=C($());var Gi=zi.css`
351
351
  `;var en=class{addCommand(r,o=!1){R.commands.add(r,o)}consumeCommand(r){return R.commands.consume(r)}};window.FluidTopicsAppInfoStoreService=new en;var pe=C(k());var $i,Lt=class extends CustomEvent{constructor(r){super("ft-i18n-context-loaded",{detail:r})}},Jc=Symbol("clearAfterUnitTest"),Tr=class extends(0,pe.withEventBus)(ae){constructor(r){super(),this.messageContextProvider=r,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[$i]=()=>{this.defaultMessages={},this.cache=new pe.CacheRegistry,this.listeners={}},this.currentUiLocale=R.getState().uiLocale,R.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:r}=R.getState();this.currentUiLocale!==r&&(this.currentUiLocale=r,this.cache.clearAll(),this.notifyAll())}addContext(r){let o=r.name.toLowerCase();this.cache.setFinal(o,r),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(r,o){var n;if(r=r.toLowerCase(),o&&Object.keys(o).length>0){let a={...(n=this.defaultMessages[r])!==null&&n!==void 0?n:{},...o};(0,pe.deepEqual)(this.defaultMessages[r],a)||(this.defaultMessages[r]=a,await this.notify(r))}return this.fetchContext(r)}resolveContext(r){var o,n;return this.fetchContext(r),(n=(o=this.cache.getNow(r))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(r,o){let n=r.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(r,o,...n){var a;let i=r.toLowerCase(),c=this.resolveContext(i);return new pe.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},c).resolve(o,...n)}async fetchContext(r){let o=!this.cache.has(r),n;try{n=await this.cache.get(r,()=>this.messageContextProvider(this.currentUiLocale,r)),o&&await this.notify(r)}catch(a){!(a instanceof pe.CanceledPromiseError)&&o&&console.error(a)}return n}subscribe(r,o){var n;return r=r.toLowerCase(),this.listeners[r]=(n=this.listeners[r])!==null&&n!==void 0?n:new Set,this.listeners[r].add(o),()=>{var a;return(a=this.listeners[r])===null||a===void 0?void 0:a.delete(o)}}async notifyAll(){let r=Object.keys(this.listeners);document.body.dispatchEvent(new Lt({loadedContexts:r})),this.dispatchEvent(new Lt({loadedContexts:r})),await Promise.all(r.map(o=>this.notify(o,!1)))}async notify(r,o=!0){o&&(document.body.dispatchEvent(new Lt({loadedContexts:[r]})),this.dispatchEvent(new Lt({loadedContexts:[r]}))),this.listeners[r]!=null&&await Promise.all([...this.listeners[r].values()].map(n=>(0,pe.delay)(0).then(()=>n()).catch(()=>null)))}};$i=Jc;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Tr{constructor(){super(async(e,r)=>(await this.awaitApi).getFluidTopicsMessageContext(e,r))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Tr{constructor(){super(async(e,r)=>(await this.awaitApi).getCustomMessageContext(e,r))}});var It=window.FluidTopicsI18nService,Nr=window.FluidTopicsCustomI18nService;var ji=C(k()),tn=class{highlightHtml(r,o,n){(0,ji.highlightHtml)(r,o,n)}};window.FluidTopicsHighlightHtmlService=new tn;var Ki=C(k());var rn=class{isDate(r){var o,n,a,i;return(i=(a=((n=(o=R.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(l=>l.key===r))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(r,o){var n,a,i;return Ki.DateFormatter.format(r,(n=o?.locale)!==null&&n!==void 0?n:R.getState().uiLocale,(a=o?.longFormat)!==null&&a!==void 0?a:!1,(i=o?.withTime)!==null&&i!==void 0?i:!1)}};window.FluidTopicsDateService=new rn;var Vi=C(k());var Qt=class{static get(r,o){var n,a;let i=R.getState(),{lang:c,region:l}=(a=(n=i.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new Vi.SearchPlaceConverter(i.baseUrl,r??20,i.searchInAllLanguagesAllowed,o??`${c}-${l}`)}};var on=class{urlToSearchRequest(r){return Qt.get().parse(r)}searchRequestToUrl(r){return Qt.get().serialize(r)}};window.FluidTopicsUrlService=new on;var Fe=C(k());var nt=class e extends CustomEvent{constructor(r){super(e.eventName,{detail:{currentItem:r}})}};nt.eventName="change";var nn=class{itemName(r){return`fluid-topics-history-item-${r}`}get(r){let o=sessionStorage.getItem(this.itemName(r));return o?JSON.parse(o):void 0}set(r,o){sessionStorage.setItem(this.itemName(r),JSON.stringify(o))}},Zi=new nn;var Lr=class e extends Fe.WithEventBus{static build(){return new e(window.history,Zi,()=>window.location,!1)}constructor(r,o,n,a){var i,c;super(),this.history=r,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=r.pushState,this.realReplaceState=r.replaceState,this.initialIndex=(c=(i=r.state)===null||i===void 0?void 0:i.index)!==null&&c!==void 0?c:r.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(r,o=!1){let n=o&&this.currentIndex===r.index-1;this.currentState={...this.buildCurrentState(),...r},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Fe.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new nt(this.currentItem())),0)}installProxies(){let r=o=>(n,a,[i,c,l])=>{let u=o(),p={...u===this.currentIndex?this.currentState:void 0,...i,index:u,href:typeof l=="string"?l:(l??this.windowLocation()).href};n.apply(a,[p,c,l]),this.setCurrentState(p,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:r(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:r(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",r=>this.setCurrentState(r.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(r){for(let o=this.history.length-1;o>=0;o--)r?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(r){var o;let n={...this.buildCurrentState(),...r,index:this.currentIndex,title:(o=r?.title)!==null&&o!==void 0?o:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(r){this.addEventListener(nt.eventName,r)}removeHistoryChangeListener(r){this.removeEventListener(nt.eventName,r)}currentItem(){return(0,Fe.deepCopy)(this.currentState)}back(){let r=this.previousDifferentMajorPosition();r>=0?this.history.go(r-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,Fe.deepCopy)(this.states[this.previousDifferentMajorPosition()])}previousDifferentMajorPosition(){let r=this.currentIndex>0?this.currentIndex-1:0;for(;r>0&&!this.isDifferentMajorState(r);)r--;return r}forward(){let r=this.nextMajorPosition();r&&r<this.states.length?this.history.go(r-this.currentIndex):this.history.forward()}forwardItem(){let r=this.nextMajorPosition();if(r)return(0,Fe.deepCopy)(this.states[r])}nextMajorPosition(){let r=this.currentIndex;if(!(r>=this.states.length)){do r++;while(r<this.states.length&&!this.isDifferentMajorState(r));return this.getHigherPositionInTheSameState(r)}}getHigherPositionInTheSameState(r){var o;let n=(o=this.states[r])===null||o===void 0?void 0:o.majorStateId;if(!n)return r;let a=r,i=r+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var r,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(r=this.history.state)===null||r===void 0?void 0:r.title)!==null&&o!==void 0?o:document.title}}hasState(r){return this.states[r]!=null}isDifferentMajorState(r,o){var n;if(!this.hasState(r))return!1;let a=o??this.currentState.majorStateId,i=(n=this.states[r])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Lr.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e)});var qi=R;function Yi(e,r){var o;return qi.getState().authenticationRequired&&!(!((o=qi.getState().session)===null||o===void 0)&&o.sessionAuthenticated)?Promise.resolve(r):e()}var z=function(e,r,o,n){var a=arguments.length,i=a<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,r,o,n);else for(var l=e.length-1;l>=0;l--)(c=e[l])&&(i=(a<3?c(i):a>3?c(r,o,i):c(r,o))||i);return a>3&&i&&Object.defineProperty(r,o,i),i},B=class extends ge.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",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=()=>rt.get(),this.authenticationRequired=!1,this.messageContexts=[],this.cache=new ge.CacheRegistry,this.cleanSessionDebouncer=new ge.Debouncer,this.reloadConfiguration=()=>{this.cache.clear("availableContentLocales"),this.updateAvailableContentLocales()}}render(){return Xi.html`
352
352
  <slot></slot>
353
- `}connectedCallback(){super.connectedCallback(),R.addEventListener(tt.eventName,this.reloadConfiguration)}disconnectedCallback(){R.addEventListener(tt.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(r){var o,n,a,i,c,l,u;super.update(r),r.has("baseUrl")&&(R.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),r.has("apiIntegrationIdentifier")&&R.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),r.has("apiIntegrationAppVersion")&&R.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),r.has("uiLocale")&&R.actions.uiLocale(this.uiLocale),r.has("metadataConfiguration")&&R.actions.metadataConfiguration(this.metadataConfiguration),r.has("noCustom")&&R.actions.noCustom(this.noCustom),r.has("editorMode")&&R.actions.editorMode(this.editorMode),r.has("noCustomComponent")&&R.actions.noCustomComponent(this.noCustomComponent),r.has("session")&&R.actions.session(this.session),r.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(p=>It.addContext(p)),r.has("openExternalDocumentInNewTab")&&R.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),r.has("navigatorOnline")&&R.actions.navigatorOnline(this.navigatorOnline),r.has("forcedOffline")&&R.actions.forcedOffline(this.forcedOffline),r.has("localesConfiguration")&&(R.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),R.actions.availableUiLocales((a=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&a!==void 0?a:[]),R.actions.searchInAllLanguagesAllowed((c=(i=this.localesConfiguration)===null||i===void 0?void 0:i.allLanguagesAllowed)!==null&&c!==void 0?c:!1)),r.has("authenticationRequired")&&R.actions.authenticationRequired(this.authenticationRequired),r.has("availableContentLocales")&&R.actions.availableContentLocales((u=(l=this.availableContentLocales)===null||l===void 0?void 0:l.contentLocales)!==null&&u!==void 0?u:[]),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),this.availableContentLocales==null&&this.updateAvailableContentLocales())}async updateSession(){this.session=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},r.idleTimeoutInMillis),r})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}async updateAvailableContentLocales(){this.availableContentLocales=await this.cache.get("availableContentLocales",()=>Yi(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};B.elementDefinitions={};B.styles=Gi;z([(0,q.property)()],B.prototype,"baseUrl",void 0);z([(0,q.property)()],B.prototype,"apiIntegrationIdentifier",void 0);z([(0,q.property)()],B.prototype,"apiIntegrationAppVersion",void 0);z([(0,q.property)()],B.prototype,"uiLocale",void 0);z([(0,ge.jsonProperty)(null)],B.prototype,"availableUiLocales",void 0);z([(0,ge.jsonProperty)(null)],B.prototype,"metadataConfiguration",void 0);z([(0,q.property)({type:Boolean})],B.prototype,"editorMode",void 0);z([(0,q.property)({type:Boolean})],B.prototype,"noCustom",void 0);z([(0,q.property)({type:Boolean})],B.prototype,"openExternalDocumentInNewTab",void 0);z([(0,q.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],B.prototype,"noCustomComponent",void 0);z([(0,q.property)({type:Boolean})],B.prototype,"withManualResources",void 0);z([(0,q.property)({type:Boolean})],B.prototype,"navigatorOnline",void 0);z([(0,q.property)({type:Boolean})],B.prototype,"forcedOffline",void 0);z([(0,q.property)({type:Object})],B.prototype,"apiProvider",void 0);z([(0,q.property)({type:Boolean})],B.prototype,"authenticationRequired",void 0);z([(0,ge.jsonProperty)([])],B.prototype,"messageContexts",void 0);z([(0,ge.jsonProperty)(void 0)],B.prototype,"session",void 0);z([(0,q.state)()],B.prototype,"localesConfiguration",void 0);z([(0,q.state)()],B.prototype,"availableContentLocales",void 0);var Ln=C(Q());function Qc(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;let o,n,a;if(Array.isArray(e)){if(o=e.length,o!=r.length)return!1;for(n=o;n--!==0;)if(!Ir(e[n],r[n]))return!1;return!0}if(e instanceof Map&&r instanceof Map){if(e.size!==r.size)return!1;for(n of e.entries())if(!r.has(n[0]))return!1;for(n of e.entries())if(!Ir(n[1],r.get(n[0])))return!1;return!0}if(e instanceof Set&&r instanceof Set){if(e.size!==r.size)return!1;for(n of e.entries())if(!r.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();let i=c=>Object.keys(c).filter(l=>c[l]!=null);if(a=i(e),o=a.length,o!==i(r).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,a[n]))return!1;for(n=o;n--!==0;){let c=a[n];if(!Ir(e[c],r[c]))return!1}return!0}return e!==e&&r!==r||e==null&&r==null}function Ir(e,r){try{return Qc(e,r)}catch{return!1}}function er(e,r){return!Ir(e,r)}function _r(e,r){let o=n=>n[e]===!0;return n=>{if(o(n))return n;let a=r(n);return a[e]=!0,a}}var Ji=C(Q(),1);var an=e=>{let r=e??{};return(o,n)=>{var a;let i={hasChanged:er,attribute:!1,...r};(0,Ji.property)(i)(o,n);let c=o.constructor;c.reduxProperties=new Map(c.reduxProperties),c.reduxProperties.set(n,{selector:(a=r.selector)!==null&&a!==void 0?a:l=>l[n],store:r.store})}};var Pr=class{constructor(){this.queue=[]}add(r,o=!1){o&&this.clear(r.type),this.queue.push(r)}consume(r){let o=this.queue.find(n=>n.type===r);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(r){typeof r=="string"?this.queue=this.queue.filter(o=>o.type!==r):this.queue=this.queue.filter(o=>!r.test(o.type))}};var at=C(Q(),1);var Qi=C(Q(),1);function es(e,r){let o=()=>JSON.parse(JSON.stringify(e));return(0,Qi.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:er,...r??{}})}var kr=class{constructor(r=0){this.timeout=r,this.callbacks=[]}run(r,o){return this.callbacks=[r],this.debounce(o)}queue(r,o){return this.callbacks.push(r),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(r){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),r??this.timeout),this.promise}async runCallbacks(){var r,o;let n=[...this.callbacks];this.callbacks=[];let a=(r=this.rejectPromise)!==null&&r!==void 0?r:()=>null,i=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let c of n)try{await c()}catch(l){a(l);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 rs=C($(),1);var Dr=globalThis,el=Dr.ShadowRoot&&(Dr.ShadyCSS===void 0||Dr.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,eb=Symbol();var ts=(e,r)=>{if(el)e.adoptedStyleSheets=r.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of r){let n=document.createElement("style"),a=Dr.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=o.cssText,e.appendChild(n)}};var Br=class extends rs.LitElement{createRenderRoot(){let r=this.constructor;r.elementDefinitions&&!r.registry&&(r.registry=new CustomElementRegistry,Object.entries(r.elementDefinitions).forEach(([a,i])=>r.registry.define(a,i)));let o={...r.shadowRootOptions,customElements:r.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return ts(n,r.elementStyles),n}};function os(e,r,...o){var n;let a=e.querySelector(r);for(let i of o)a=(n=a?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return a}var Pt=function(e,r,o,n){var a=arguments.length,i=a<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,r,o,n);else for(var l=e.length-1;l>=0;l--)(c=e[l])&&(i=(a<3?c(i):a>3?c(r,o,i):c(r,o))||i);return a>3&&i&&Object.defineProperty(r,o,i),i},ss,ns=Symbol("constructorPrototype"),as=Symbol("constructorName"),cs=Symbol("exportpartsDebouncer"),is=Symbol("dynamicDependenciesLoaded"),_t=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};_t.eventName="exportparts-updated";var Ee=class extends Br{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[ss]=new kr(5),this.scheduleExportpartsUpdate=()=>{var r,o,n;(!((r=this.exportpartsPrefix)===null||r===void 0)&&r.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[cs].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)})},this[as]=this.constructor.name,this[ns]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[as]&&Object.setPrototypeOf(this,this[ns])}connectedCallback(){var r;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let o=this.constructor;o[is]||(o[is]=!0,this.importDynamicDependencies()),(r=this.shadowRoot)===null||r===void 0||r.addEventListener(_t.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var r;super.disconnectedCallback(),(r=this.shadowRoot)===null||r===void 0||r.removeEventListener(_t.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(r){super.updated(r),this.updateComplete.then(()=>{this.contentAvailableCallback(r),this.focusElementToFocus(r),this.applyCustomStylesheet(r),this.scheduleExportpartsUpdate(),r.has("exportparts")&&this.dispatchEvent(new _t)})}contentAvailableCallback(r){}focusElementToFocus(r){if(r.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:a}=this.elementToFocus;if(n!=null){let i=[...a??[],n];o=os(this.shadowRoot,...i)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(r){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(r.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)}}setExportpartsAttribute(r){var o,n,a,i,c,l;let u=m=>m!=null&&m.trim().length>0,p=r.filter(u).map(m=>m.trim());if(p.length===0){this.exportparts=void 0;return}let y=new Set;for(let m of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let x=(i=(a=m.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],b=(l=(c=m.getAttribute("exportparts"))===null||c===void 0?void 0:c.split(",").map(A=>A.split(":")[1]))!==null&&l!==void 0?l:[],v=[...x,...b].filter(u).map(A=>A.trim());for(let A of v)y.add(A)}if(y.size===0){this.exportparts=void 0;return}let f=[...y.values()].flatMap(m=>p.map(x=>`${m}:${x}--${m}`));this.exportparts=[...this.part,...f].join(", ")}};ss=cs;Pt([(0,at.property)()],Ee.prototype,"exportpartsPrefix",void 0);Pt([es([])],Ee.prototype,"exportpartsPrefixes",void 0);Pt([(0,at.property)({reflect:!0})],Ee.prototype,"exportparts",void 0);Pt([(0,at.property)()],Ee.prototype,"customStylesheet",void 0);Pt([(0,at.property)()],Ee.prototype,"elementToFocus",void 0);Pt([(0,at.state)()],Ee.prototype,"useAdoptedStyleSheets",void 0);function Mr(e){var r;return(r=e?.isFtReduxStore)!==null&&r!==void 0?r:!1}var tr=Symbol("internalReduxEventsUnsubscribers"),ze=Symbol("internalStoresUnsubscribers"),it=Symbol("internalStores"),tl=_r(Symbol("withRedux"),function(e){var r,o,n;class a extends e{constructor(){super(...arguments),this[r]=new Map,this[o]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(c){super.willUpdate(c),[...this.reduxConstructor.reduxReactiveProperties].some(l=>c.has(l))&&this.updateFromStores()}getUnnamedStore(){if(this[it].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[it].values()][0]}getStore(c){return c==null?this.getUnnamedStore():this[it].get(c)}addStore(c,l){var u;l=(u=l??c.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(l),this[it].set(l,c),this.subscribeToStore(l,c),this.updateFromStores()}removeStore(c){let l=typeof c=="string"?c:c.name;this.unsubscribeFromStore(l),this[it].delete(l)}setupStores(){this.unsubscribeFromStores(),this[it].forEach((c,l)=>this.subscribeToStore(l,c)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((c,l)=>{let u=this.constructor.getPropertyOptions(l);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:l)){let p=this.getStore(c.store);p&&(c.store?this[ze].has(c.store):this[ze].size>0)&&(this[l]=c.selector(p.getState(),this))}})}subscribeToStore(c,l){var u;this[ze].set(c,l.subscribe(()=>this.updateFromStores())),this[tr].set(c,[]),Mr(l)&&l.eventBus&&((u=this.reduxConstructor.reduxEventListeners)===null||u===void 0||u.forEach((p,y)=>{if(typeof this[y]=="function"&&(!p.store||l.name===p.store)){let f=m=>this[y](m);l.addEventListener(p.eventName,f),this[tr].get(c).push(()=>l.removeEventListener(p.eventName,f))}})),this.onStoreAvailable(c)}unsubscribeFromStores(){this[ze].forEach((c,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(c){var l;this[ze].has(c)&&this[ze].get(c)(),this[ze].delete(c),(l=this[tr].get(c))===null||l===void 0||l.forEach(u=>u()),this[tr].delete(c)}onStoreAvailable(c){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return r=ze,o=it,n=tr,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),ls=class extends tl(Ee){};function fe(e){for(var r=arguments.length,o=Array(r>1?r-1:0),n=1;n<r;n++)o[n-1]=arguments[n];if(0)var a,i;throw Error("[Immer] minified error nr: "+e+(o.length?" "+o.map(function(c){return"'"+c+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Ie(e){return!!e&&!!e[M]}function be(e){var r;return!!e&&(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)===ll}(e)||Array.isArray(e)||!!e[ms]||!!(!((r=e.constructor)===null||r===void 0)&&r[ms])||yn(e)||mn(e))}function st(e,r,o){o===void 0&&(o=!1),Bt(e)===0?(o?Object.keys:Dt)(e).forEach(function(n){o&&typeof n=="symbol"||r(n,e[n],e)}):e.forEach(function(n,a){return r(a,n,e)})}function Bt(e){var r=e[M];return r?r.i>3?r.i-4:r.i:Array.isArray(e)?1:yn(e)?2:mn(e)?3:0}function kt(e,r){return Bt(e)===2?e.has(r):Object.prototype.hasOwnProperty.call(e,r)}function rl(e,r){return Bt(e)===2?e.get(r):e[r]}function gs(e,r,o){var n=Bt(e);n===2?e.set(r,o):n===3?e.add(o):e[r]=o}function bs(e,r){return e===r?e!==0||1/e==1/r:e!=e&&r!=r}function yn(e){return sl&&e instanceof Map}function mn(e){return cl&&e instanceof Set}function Ge(e){return e.o||e.t}function gn(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var r=Ss(e);delete r[M];for(var o=Dt(r),n=0;n<o.length;n++){var a=o[n],i=r[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(r[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[a]})}return Object.create(Object.getPrototypeOf(e),r)}function bn(e,r){return r===void 0&&(r=!1),xn(e)||Ie(e)||!be(e)||(Bt(e)>1&&(e.set=e.add=e.clear=e.delete=ol),Object.freeze(e),r&&st(e,function(o,n){return bn(n,!0)},!0)),e}function ol(){fe(2)}function xn(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Ae(e){var r=hn[e];return r||fe(18,e),r}function nl(e,r){hn[e]||(hn[e]=r)}function un(){return or}function sn(e,r){r&&(Ae("Patches"),e.u=[],e.s=[],e.v=r)}function Ur(e){pn(e),e.p.forEach(al),e.p=null}function pn(e){e===or&&(or=e.l)}function ds(e){return or={p:[],l:or,h:e,m:!0,_:0}}function al(e){var r=e[M];r.i===0||r.i===1?r.j():r.g=!0}function cn(e,r){r._=r.p.length;var o=r.p[0],n=e!==void 0&&e!==o;return r.h.O||Ae("ES5").S(r,e,n),n?(o[M].P&&(Ur(r),fe(4)),be(e)&&(e=Hr(r,e),r.l||Wr(r,e)),r.u&&Ae("Patches").M(o[M].t,e,r.u,r.s)):e=Hr(r,o,[]),Ur(r),r.u&&r.v(r.u,r.s),e!==vs?e:void 0}function Hr(e,r,o){if(xn(r))return r;var n=r[M];if(!n)return st(r,function(l,u){return us(e,n,r,l,u,o)},!0),r;if(n.A!==e)return r;if(!n.P)return Wr(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=gn(n.k):n.o,i=a,c=!1;n.i===3&&(i=new Set(a),a.clear(),c=!0),st(i,function(l,u){return us(e,n,a,l,u,o,c)}),Wr(e,a,!1),o&&e.u&&Ae("Patches").N(n,o,e.u,e.s)}return n.o}function us(e,r,o,n,a,i,c){if(Ie(a)){var l=Hr(e,a,i&&r&&r.i!==3&&!kt(r.R,n)?i.concat(n):void 0);if(gs(o,n,l),!Ie(l))return;e.m=!1}else c&&o.add(a);if(be(a)&&!xn(a)){if(!e.h.D&&e._<1)return;Hr(e,a),r&&r.A.l||Wr(e,a)}}function Wr(e,r,o){o===void 0&&(o=!1),!e.l&&e.h.D&&e.m&&bn(r,o)}function ln(e,r){var o=e[M];return(o?Ge(o):e)[r]}function ps(e,r){if(r in e)for(var o=Object.getPrototypeOf(e);o;){var n=Object.getOwnPropertyDescriptor(o,r);if(n)return n;o=Object.getPrototypeOf(o)}}function $e(e){e.P||(e.P=!0,e.l&&$e(e.l))}function dn(e){e.o||(e.o=gn(e.t))}function fn(e,r,o){var n=yn(r)?Ae("MapSet").F(r,o):mn(r)?Ae("MapSet").T(r,o):e.O?function(a,i){var c=Array.isArray(a),l={i:c?1:0,A:i?i.A:un(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},u=l,p=nr;c&&(u=[l],p=rr);var y=Proxy.revocable(u,p),f=y.revoke,m=y.proxy;return l.k=m,l.j=f,m}(r,o):Ae("ES5").J(r,o);return(o?o.A:un()).p.push(n),n}function il(e){return Ie(e)||fe(22,e),function r(o){if(!be(o))return o;var n,a=o[M],i=Bt(o);if(a){if(!a.P&&(a.i<4||!Ae("ES5").K(a)))return a.t;a.I=!0,n=fs(o,i),a.I=!1}else n=fs(o,i);return st(n,function(c,l){a&&rl(a.t,c)===l||gs(n,c,r(l))}),i===3?new Set(n):n}(e)}function fs(e,r){switch(r){case 2:return new Map(e);case 3:return Array.from(e)}return gn(e)}function xs(){function e(c,l){var u=i[c];return u?u.enumerable=l:i[c]=u={configurable:!0,enumerable:l,get:function(){var p=this[M];return nr.get(p,c)},set:function(p){var y=this[M];nr.set(y,c,p)}},u}function r(c){for(var l=c.length-1;l>=0;l--){var u=c[l][M];if(!u.P)switch(u.i){case 5:n(u)&&$e(u);break;case 4:o(u)&&$e(u)}}}function o(c){for(var l=c.t,u=c.k,p=Dt(u),y=p.length-1;y>=0;y--){var f=p[y];if(f!==M){var m=l[f];if(m===void 0&&!kt(l,f))return!0;var x=u[f],b=x&&x[M];if(b?b.t!==m:!bs(x,m))return!0}}var v=!!l[M];return p.length!==Dt(l).length+(v?0:1)}function n(c){var l=c.k;if(l.length!==c.t.length)return!0;var u=Object.getOwnPropertyDescriptor(l,l.length-1);if(u&&!u.get)return!0;for(var p=0;p<l.length;p++)if(!l.hasOwnProperty(p))return!0;return!1}function a(c){c.g&&fe(3,JSON.stringify(Ge(c)))}var i={};nl("ES5",{J:function(c,l){var u=Array.isArray(c),p=function(f,m){if(f){for(var x=Array(m.length),b=0;b<m.length;b++)Object.defineProperty(x,""+b,e(b,!0));return x}var v=Ss(m);delete v[M];for(var A=Dt(v),E=0;E<A.length;E++){var w=A[E];v[w]=e(w,f||!!v[w].enumerable)}return Object.create(Object.getPrototypeOf(m),v)}(u,c),y={i:u?5:4,A:l?l.A:un(),P:!1,I:!1,R:{},l,t:c,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,M,{value:y,writable:!0}),p},S:function(c,l,u){u?Ie(l)&&l[M].A===c&&r(c.p):(c.u&&function p(y){if(y&&typeof y=="object"){var f=y[M];if(f){var m=f.t,x=f.k,b=f.R,v=f.i;if(v===4)st(x,function(I){I!==M&&(m[I]!==void 0||kt(m,I)?b[I]||p(x[I]):(b[I]=!0,$e(f)))}),st(m,function(I){x[I]!==void 0||kt(x,I)||(b[I]=!1,$e(f))});else if(v===5){if(n(f)&&($e(f),b.length=!0),x.length<m.length)for(var A=x.length;A<m.length;A++)b[A]=!1;else for(var E=m.length;E<x.length;E++)b[E]=!0;for(var w=Math.min(x.length,m.length),L=0;L<w;L++)x.hasOwnProperty(L)||(b[L]=!0),b[L]===void 0&&p(x[L])}}}}(c.p[0]),r(c.p))},K:function(c){return c.i===4?o(c):n(c)}})}var hs,or,vn=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",sl=typeof Map<"u",cl=typeof Set<"u",ys=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",vs=vn?Symbol.for("immer-nothing"):((hs={})["immer-nothing"]=!0,hs),ms=vn?Symbol.for("immer-draftable"):"__$immer_draftable",M=vn?Symbol.for("immer-state"):"__$immer_state";var ll=""+Object.prototype.constructor,Dt=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Ss=Object.getOwnPropertyDescriptors||function(e){var r={};return Dt(e).forEach(function(o){r[o]=Object.getOwnPropertyDescriptor(e,o)}),r},hn={},nr={get:function(e,r){if(r===M)return e;var o=Ge(e);if(!kt(o,r))return function(a,i,c){var l,u=ps(i,c);return u?"value"in u?u.value:(l=u.get)===null||l===void 0?void 0:l.call(a.k):void 0}(e,o,r);var n=o[r];return e.I||!be(n)?n:n===ln(e.t,r)?(dn(e),e.o[r]=fn(e.A.h,n,e)):n},has:function(e,r){return r in Ge(e)},ownKeys:function(e){return Reflect.ownKeys(Ge(e))},set:function(e,r,o){var n=ps(Ge(e),r);if(n?.set)return n.set.call(e.k,o),!0;if(!e.P){var a=ln(Ge(e),r),i=a?.[M];if(i&&i.t===o)return e.o[r]=o,e.R[r]=!1,!0;if(bs(o,a)&&(o!==void 0||kt(e.t,r)))return!0;dn(e),$e(e)}return e.o[r]===o&&(o!==void 0||r in e.o)||Number.isNaN(o)&&Number.isNaN(e.o[r])||(e.o[r]=o,e.R[r]=!0),!0},deleteProperty:function(e,r){return ln(e.t,r)!==void 0||r in e.t?(e.R[r]=!1,dn(e),$e(e)):delete e.R[r],e.o&&delete e.o[r],!0},getOwnPropertyDescriptor:function(e,r){var o=Ge(e),n=Reflect.getOwnPropertyDescriptor(o,r);return n&&{writable:!0,configurable:e.i!==1||r!=="length",enumerable:n.enumerable,value:o[r]}},defineProperty:function(){fe(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){fe(12)}},rr={};st(nr,function(e,r){rr[e]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}}),rr.deleteProperty=function(e,r){return rr.set.call(this,e,r,void 0)},rr.set=function(e,r,o){return nr.set.call(this,e[0],r,o,e[0])};var dl=function(){function e(o){var n=this;this.O=ys,this.D=!0,this.produce=function(a,i,c){if(typeof a=="function"&&typeof i!="function"){var l=i;i=a;var u=n;return function(v){var A=this;v===void 0&&(v=l);for(var E=arguments.length,w=Array(E>1?E-1:0),L=1;L<E;L++)w[L-1]=arguments[L];return u.produce(v,function(I){var _;return(_=i).call.apply(_,[A,I].concat(w))})}}var p;if(typeof i!="function"&&fe(6),c!==void 0&&typeof c!="function"&&fe(7),be(a)){var y=ds(n),f=fn(n,a,void 0),m=!0;try{p=i(f),m=!1}finally{m?Ur(y):pn(y)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(v){return sn(y,c),cn(v,y)},function(v){throw Ur(y),v}):(sn(y,c),cn(p,y))}if(!a||typeof a!="object"){if((p=i(a))===void 0&&(p=a),p===vs&&(p=void 0),n.D&&bn(p,!0),c){var x=[],b=[];Ae("Patches").M(a,p,x,b),c(x,b)}return p}fe(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(p){for(var y=arguments.length,f=Array(y>1?y-1:0),m=1;m<y;m++)f[m-1]=arguments[m];return n.produceWithPatches(p,function(x){return a.apply(void 0,[x].concat(f))})};var c,l,u=n.produce(a,i,function(p,y){c=p,l=y});return typeof Promise<"u"&&u instanceof Promise?u.then(function(p){return[p,c,l]}):[u,c,l]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var r=e.prototype;return r.createDraft=function(o){be(o)||fe(8),Ie(o)&&(o=il(o));var n=ds(this),a=fn(this,o,void 0);return a[M].C=!0,pn(n),a},r.finishDraft=function(o,n){var a=o&&o[M],i=a.A;return sn(i,n),cn(void 0,i)},r.setAutoFreeze=function(o){this.D=o},r.setUseProxies=function(o){o&&!ys&&fe(20),this.O=o},r.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 c=Ae("Patches").$;return Ie(o)?c(o,n):this.produce(o,function(l){return c(l,n)})},e}(),se=new dl,ul=se.produce,yb=se.produceWithPatches.bind(se),mb=se.setAutoFreeze.bind(se),gb=se.setUseProxies.bind(se),bb=se.applyPatches.bind(se),xb=se.createDraft.bind(se),vb=se.finishDraft.bind(se),Fr=ul;function ct(e){"@babel/helpers - typeof";return ct=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ct(e)}function Os(e,r){if(ct(e)!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var n=o.call(e,r||"default");if(ct(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Cs(e){var r=Os(e,"string");return ct(r)=="symbol"?r:r+""}function Es(e,r,o){return(r=Cs(r))in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o,e}function As(e,r){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),o.push.apply(o,n)}return o}function Sn(e){for(var r=1;r<arguments.length;r++){var o=arguments[r]!=null?arguments[r]:{};r%2?As(Object(o),!0).forEach(function(n){Es(e,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):As(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}function X(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var ws=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),On=function(){return Math.random().toString(36).substring(7).split("").join(".")},zr={INIT:"@@redux/INIT"+On(),REPLACE:"@@redux/REPLACE"+On(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+On()}};function pl(e){if(typeof e!="object"||e===null)return!1;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r}function Cn(e,r,o){var n;if(typeof r=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(X(0));if(typeof r=="function"&&typeof o>"u"&&(o=r,r=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(X(1));return o(Cn)(e,r)}if(typeof e!="function")throw new Error(X(2));var a=e,i=r,c=[],l=c,u=!1;function p(){l===c&&(l=c.slice())}function y(){if(u)throw new Error(X(3));return i}function f(v){if(typeof v!="function")throw new Error(X(4));if(u)throw new Error(X(5));var A=!0;return p(),l.push(v),function(){if(A){if(u)throw new Error(X(6));A=!1,p();var w=l.indexOf(v);l.splice(w,1),c=null}}}function m(v){if(!pl(v))throw new Error(X(7));if(typeof v.type>"u")throw new Error(X(8));if(u)throw new Error(X(9));try{u=!0,i=a(i,v)}finally{u=!1}for(var A=c=l,E=0;E<A.length;E++){var w=A[E];w()}return v}function x(v){if(typeof v!="function")throw new Error(X(10));a=v,m({type:zr.REPLACE})}function b(){var v,A=f;return v={subscribe:function(w){if(typeof w!="object"||w===null)throw new Error(X(11));function L(){w.next&&w.next(y())}L();var I=A(L);return{unsubscribe:I}}},v[ws]=function(){return this},v}return m({type:zr.INIT}),n={dispatch:m,subscribe:f,getState:y,replaceReducer:x},n[ws]=b,n}function fl(e){Object.keys(e).forEach(function(r){var o=e[r],n=o(void 0,{type:zr.INIT});if(typeof n>"u")throw new Error(X(12));if(typeof o(void 0,{type:zr.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(X(13))})}function Rs(e){for(var r=Object.keys(e),o={},n=0;n<r.length;n++){var a=r[n];typeof e[a]=="function"&&(o[a]=e[a])}var i=Object.keys(o),c,l;try{fl(o)}catch(u){l=u}return function(p,y){if(p===void 0&&(p={}),l)throw l;if(0)var f;for(var m=!1,x={},b=0;b<i.length;b++){var v=i[b],A=o[v],E=p[v],w=A(E,y);if(typeof w>"u"){var L=y&&y.type;throw new Error(X(14))}x[v]=w,m=m||w!==E}return m=m||i.length!==Object.keys(p).length,m?x:p}}function Mt(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return r.length===0?function(n){return n}:r.length===1?r[0]:r.reduce(function(n,a){return function(){return n(a.apply(void 0,arguments))}})}function Ts(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(X(15))},c={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=r.map(function(u){return u(c)});return i=Mt.apply(void 0,l)(a.dispatch),Sn(Sn({},a),{},{dispatch:i})}}}function Ns(e){var r=function(n){var a=n.dispatch,i=n.getState;return function(c){return function(l){return typeof l=="function"?l(a,i,e):c(l)}}};return r}var Ls=Ns();Ls.withExtraArgument=Ns;var En=Ls;var Ds=function(){var e=function(r,o){return e=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])},e(r,o)};return function(r,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");e(r,o);function n(){this.constructor=r}r.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),hl=function(e,r){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,c;return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(p){return function(y){return u([p,y])}}function u(p){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(i=p[0]&2?a.return:p[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,p[1])).done)return i;switch(a=0,i&&(p=[p[0]&2,i.value]),p[0]){case 0:case 1:i=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,a=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(p[0]===6||p[0]===2)){o=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]<i[3])){o.label=p[1];break}if(p[0]===6&&o.label<i[1]){o.label=i[1],i=p;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(p);break}i[2]&&o.ops.pop(),o.trys.pop();continue}p=r.call(e,o)}catch(y){p=[6,y],a=0}finally{n=i=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Ut=function(e,r){for(var o=0,n=r.length,a=e.length;o<n;o++,a++)e[a]=r[o];return e},yl=Object.defineProperty,ml=Object.defineProperties,gl=Object.getOwnPropertyDescriptors,Is=Object.getOwnPropertySymbols,bl=Object.prototype.hasOwnProperty,xl=Object.prototype.propertyIsEnumerable,_s=function(e,r,o){return r in e?yl(e,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[r]=o},je=function(e,r){for(var o in r||(r={}))bl.call(r,o)&&_s(e,o,r[o]);if(Is)for(var n=0,a=Is(r);n<a.length;n++){var o=a[n];xl.call(r,o)&&_s(e,o,r[o])}return e},An=function(e,r){return ml(e,gl(r))},vl=function(e,r,o){return new Promise(function(n,a){var i=function(u){try{l(o.next(u))}catch(p){a(p)}},c=function(u){try{l(o.throw(u))}catch(p){a(p)}},l=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(i,c)};l((o=o.apply(e,r)).next())})};var Sl=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Mt:Mt.apply(null,arguments)},Ub=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function Ol(e){if(typeof e!="object"||e===null)return!1;var r=Object.getPrototypeOf(e);if(r===null)return!0;for(var o=r;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return r===o}var Cl=function(e){Ds(r,e);function r(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=e.apply(this,o)||this;return Object.setPrototypeOf(a,r.prototype),a}return Object.defineProperty(r,Symbol.species,{get:function(){return r},enumerable:!1,configurable:!0}),r.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return e.prototype.concat.apply(this,o)},r.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(r.bind.apply(r,Ut([void 0],o[0].concat(this)))):new(r.bind.apply(r,Ut([void 0],o.concat(this))))},r}(Array),El=function(e){Ds(r,e);function r(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=e.apply(this,o)||this;return Object.setPrototypeOf(a,r.prototype),a}return Object.defineProperty(r,Symbol.species,{get:function(){return r},enumerable:!1,configurable:!0}),r.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return e.prototype.concat.apply(this,o)},r.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(r.bind.apply(r,Ut([void 0],o[0].concat(this)))):new(r.bind.apply(r,Ut([void 0],o.concat(this))))},r}(Array);function Tn(e){return be(e)?Fr(e,function(){}):e}function Al(e){return typeof e=="boolean"}function wl(){return function(r){return Rl(r)}}function Rl(e){e===void 0&&(e={});var r=e.thunk,o=r===void 0?!0:r,n=e.immutableCheck,a=n===void 0?!0:n,i=e.serializableCheck,c=i===void 0?!0:i,l=new Cl;if(o&&(Al(o)?l.push(En):l.push(En.withExtraArgument(o.extraArgument))),0){if(a)var u;if(c)var p}return l}var wn=!0;function Bs(e){var r=wl(),o=e||{},n=o.reducer,a=n===void 0?void 0:n,i=o.middleware,c=i===void 0?r():i,l=o.devTools,u=l===void 0?!0:l,p=o.preloadedState,y=p===void 0?void 0:p,f=o.enhancers,m=f===void 0?void 0:f,x;if(typeof a=="function")x=a;else if(Ol(a))x=Rs(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 b=c;if(typeof b=="function"&&(b=b(r),!wn&&!Array.isArray(b)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!wn&&b.some(function(I){return typeof I!="function"}))throw new Error("each middleware provided to configureStore must be a function");var v=Ts.apply(void 0,b),A=Mt;u&&(A=Sl(je({trace:!wn},typeof u=="object"&&u)));var E=new El(v),w=E;Array.isArray(m)?w=Ut([v],m):typeof m=="function"&&(w=m(E));var L=A.apply(void 0,w);return Cn(x,y,L)}function Ke(e,r){function o(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(r){var i=r.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return je(je({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:n[0]}}return o.toString=function(){return""+e},o.type=e,o.match=function(n){return n.type===e},o}function Ms(e){var r={},o=[],n,a={addCase:function(i,c){var l=typeof i=="string"?i:i.type;if(l in r)throw new Error("addCase cannot be called with two reducers for the same action type");return r[l]=c,a},addMatcher:function(i,c){return o.push({matcher:i,reducer:c}),a},addDefaultCase:function(i){return n=i,a}};return e(a),[r,o,n]}function Tl(e){return typeof e=="function"}function Nl(e,r,o,n){o===void 0&&(o=[]);var a=typeof r=="function"?Ms(r):[r,o,n],i=a[0],c=a[1],l=a[2],u;if(Tl(e))u=function(){return Tn(e())};else{var p=Tn(e);u=function(){return p}}function y(f,m){f===void 0&&(f=u());var x=Ut([i[m.type]],c.filter(function(b){var v=b.matcher;return v(m)}).map(function(b){var v=b.reducer;return v}));return x.filter(function(b){return!!b}).length===0&&(x=[l]),x.reduce(function(b,v){if(v)if(Ie(b)){var A=b,E=v(A,m);return E===void 0?b:E}else{if(be(b))return Fr(b,function(w){return v(w,m)});var E=v(b,m);if(E===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return E}return b},f)}return y.getInitialState=u,y}function Ll(e,r){return e+"/"+r}function Us(e){var r=e.name;if(!r)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof e.initialState=="function"?e.initialState:Tn(e.initialState),n=e.reducers||{},a=Object.keys(n),i={},c={},l={};a.forEach(function(y){var f=n[y],m=Ll(r,y),x,b;"reducer"in f?(x=f.reducer,b=f.prepare):x=f,i[y]=x,c[m]=x,l[y]=b?Ke(m,b):Ke(m)});function u(){var y=typeof e.extraReducers=="function"?Ms(e.extraReducers):[e.extraReducers],f=y[0],m=f===void 0?{}:f,x=y[1],b=x===void 0?[]:x,v=y[2],A=v===void 0?void 0:v,E=je(je({},m),c);return Nl(o,function(w){for(var L in E)w.addCase(L,E[L]);for(var I=0,_=b;I<_.length;I++){var ee=_[I];w.addMatcher(ee.matcher,ee.reducer)}A&&w.addDefaultCase(A)})}var p;return{name:r,reducer:function(y,f){return p||(p=u()),p(y,f)},actions:l,caseReducers:i,getInitialState:function(){return p||(p=u()),p.getInitialState()}}}var Il="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",_l=function(e){e===void 0&&(e=21);for(var r="",o=e;o--;)r+=Il[Math.random()*64|0];return r},Pl=["name","message","stack","code"],Rn=function(){function e(r,o){this.payload=r,this.meta=o}return e}(),Ps=function(){function e(r,o){this.payload=r,this.meta=o}return e}(),kl=function(e){if(typeof e=="object"&&e!==null){for(var r={},o=0,n=Pl;o<n.length;o++){var a=n[o];typeof e[a]=="string"&&(r[a]=e[a])}return r}return{message:String(e)}},zb=function(){function e(r,o,n){var a=Ke(r+"/fulfilled",function(y,f,m,x){return{payload:y,meta:An(je({},x||{}),{arg:m,requestId:f,requestStatus:"fulfilled"})}}),i=Ke(r+"/pending",function(y,f,m){return{payload:void 0,meta:An(je({},m||{}),{arg:f,requestId:y,requestStatus:"pending"})}}),c=Ke(r+"/rejected",function(y,f,m,x,b){return{payload:x,error:(n&&n.serializeError||kl)(y||"Rejected"),meta:An(je({},b||{}),{arg:m,requestId:f,rejectedWithValue:!!x,requestStatus:"rejected",aborted:y?.name==="AbortError",condition:y?.name==="ConditionError"})}}),l=!1,u=typeof AbortController<"u"?AbortController:function(){function y(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return y.prototype.abort=function(){},y}();function p(y){return function(f,m,x){var b=n?.idGenerator?n.idGenerator(y):_l(),v=new u,A,E=!1;function w(I){A=I,v.abort()}var L=function(){return vl(this,null,function(){var I,_,ee,Oe,J,Ce,K;return hl(this,function(h){switch(h.label){case 0:return h.trys.push([0,4,,5]),Oe=(I=n?.condition)==null?void 0:I.call(n,y,{getState:m,extra:x}),Bl(Oe)?[4,Oe]:[3,2];case 1:Oe=h.sent(),h.label=2;case 2:if(Oe===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return E=!0,J=new Promise(function(g,N){return v.signal.addEventListener("abort",function(){return N({name:"AbortError",message:A||"Aborted"})})}),f(i(b,y,(_=n?.getPendingMeta)==null?void 0:_.call(n,{requestId:b,arg:y},{getState:m,extra:x}))),[4,Promise.race([J,Promise.resolve(o(y,{dispatch:f,getState:m,extra:x,requestId:b,signal:v.signal,abort:w,rejectWithValue:function(g,N){return new Rn(g,N)},fulfillWithValue:function(g,N){return new Ps(g,N)}})).then(function(g){if(g instanceof Rn)throw g;return g instanceof Ps?a(g.payload,b,y,g.meta):a(g,b,y)})])];case 3:return ee=h.sent(),[3,5];case 4:return Ce=h.sent(),ee=Ce instanceof Rn?c(null,b,y,Ce.payload,Ce.meta):c(Ce,b,y),[3,5];case 5:return K=n&&!n.dispatchConditionRejection&&c.match(ee)&&ee.meta.condition,K||f(ee),[2,ee]}})})}();return Object.assign(L,{abort:w,requestId:b,arg:y,unwrap:function(){return L.then(Dl)}})}}return Object.assign(p,{pending:i,rejected:c,fulfilled:a,typePrefix:r})}return e.withTypes=function(){return e},e}();function Dl(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Bl(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Hs="listener",Ws="completed",Fs="cancelled",Gb="task-"+Fs,$b="task-"+Ws,jb=Hs+"-"+Fs,Kb=Hs+"-"+Ws;var Nn="listenerMiddleware";var Vb=Ke(Nn+"/add"),Zb=Ke(Nn+"/removeAll"),qb=Ke(Nn+"/remove");var ks,Yb=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(ks||(ks=Promise.resolve())).then(e).catch(function(r){return setTimeout(function(){throw r},0)})},Ml=function(e){return function(r){setTimeout(r,e)}},Xb=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Ml(10);xs();var Ul=_r(Symbol("withEventBus"),function(e,r){return class extends e{constructor(){super(...arguments),this.eventBus=r??document.createElement("span")}addEventListener(o,n,a){this.eventBus.addEventListener(o,n,a)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,a){this.eventBus.removeEventListener(o,n,a)}}}),Gr=class extends Ul(Object){};window.ftReduxStores||(window.ftReduxStores={});var zs=class e extends Gr{static get(r){var o;let n=typeof r=="string"?r:r.name,a=typeof r=="string"?void 0:r,i=window.ftReduxStores[n];if(Mr(i))return i;if(a==null)return;let c=Us({...a,reducers:(o=a.reducers)!==null&&o!==void 0?o:{}}),l=Bs({reducer:(u,p)=>p.type==="CLEAR_FT_REDUX_STORE"?c.getInitialState():typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__")?{...u,...p.overwrites}:c.reducer(u,p)});return window.ftReduxStores[a.name]=new e(c,l,a.eventBus)}constructor(r,o,n){super(),this.reduxSlice=r,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new Pr;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,c,l)=>{let u=c,p=i[u];return p?(...y)=>{let f=p(...y.map(a));return this.reduxStore.dispatch(f),f}:y=>{this.setState({[u]:a(y)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(r){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(r).join("_"),overwrites:r})}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(r){throw new Error("Not implemented yet.")}subscribe(r){return this.reduxStore.subscribe(r)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var $r=class{static format(r,o,n,a){return window.moment?window.moment(r).locale(o).format(this.getMomentDateFormat(n,a)):this.getIntlDateTime(r,o,n,a)}static getMomentDateFormat(r,o){return r?o?"lll":"ll":o?"L LT":"L"}static getIntlDateTime(r,o,n,a){let i=typeof r=="string"?new Date(r):r,c=new Intl.DateTimeFormat(o,{dateStyle:n?"medium":"short"}).format(i);if(!a)return c;let l=new Intl.DateTimeFormat(o,{timeStyle:"short"}).format(i);return`${c} ${l}`}static getTimezoneAsString(){let r=n=>String(Math.floor(n)).padStart(2,"0"),o=new Date().getTimezoneOffset();return`${o<0?"+":"-"}${r(Math.abs(o)/60)}:${r(Math.abs(o)%60)}`}};var Gs=C(k()),jr=function(e,r,o,n){var a=arguments.length,i=a<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,r,o,n);else for(var l=e.length-1;l>=0;l--)(c=e[l])&&(i=(a<3?c(i):a>3?c(r,o,i):c(r,o))||i);return a>3&&i&&Object.defineProperty(r,o,i),i},Sx=(0,Gs.applyMixinOnce)(Symbol("withDateFormat"),function(e){class r extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(R)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var a,i;return((i=(a=this.metadataDescriptors.find(l=>l.key===n))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?l=>$r.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return jr([(0,Ln.property)({type:Boolean})],r.prototype,"useLongDateFormat",void 0),jr([(0,Ln.property)({type:Boolean})],r.prototype,"useDateTimeFormat",void 0),jr([an({store:R.name,selector:o=>{var n,a;return(a=(n=o.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]}})],r.prototype,"metadataDescriptors",void 0),jr([an({store:R.name})],r.prototype,"uiLocale",void 0),r});(0,$s.customElement)("ft-app-context")(B);var Vs=C(Q());var In=class{fromLocalizableLabel(r){return r.type=="PLAIN_TEXT"?{message:r.text}:{key:r.key,custom:r.type=="LOCALIZED_CUSTOM",context:r.context,message:r.key}}fromAttribute(r){if(r!=null)try{return JSON.parse(r)}catch{if(this.isI18nKey(r)){let[n,a]=r.split(".");return{context:n,key:a,message:""}}return{message:r}}}toAttribute(r){if(r!=null)return JSON.stringify(r)}isI18nKey(r){return r.match(/^[\w-]+\.[\w-]+$/)}},js=new In;var Hl=function(e,r,o,n){var a=arguments.length,i=a<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,r,o,n);else for(var l=e.length-1;l>=0;l--)(c=e[l])&&(i=(a<3?c(i):a>3?c(r,o,i):c(r,o))||i);return a>3&&i&&Object.defineProperty(r,o,i),i},Wl=Symbol("i18nAttributes"),Fl=Symbol("i18nListAttributes"),Zs=Symbol("i18nProperties"),Kr=Symbol("i18nContexts"),ar=Symbol("i18nUnsubs"),Zr=(0,Ht.applyMixinOnce)(Symbol("withI18n"),function(e){var r,o;class n extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[r]=new Map,this[o]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?Nr:It}i18n(i){let{context:c,key:l,message:u}=i,{custom:p,args:y,argsProvider:f}=i;if(c&&l){this.hasI18nContext(c)||this.addI18nContext(c,void 0,p);let m=y??(f?f(this):[]);return this.getI18nService(p).resolveMessage(c,l,...m)}return u}async awaitI18n(i){let{context:c,custom:l}=i;return c&&await this.getI18nService(l).prepareContext(c),this.i18n(i)}customI18n(i,c){if(js.isI18nKey(i)){let[l,u]=i.split(".");return this.i18n({custom:!0,context:l,key:u,...c})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((c,l,u)=>i.has(l)||typeof c.argsProvider=="function"),this.updateI18nProperties(c=>typeof c.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((c,l,u)=>{var p;return((p=u?.context)===null||p===void 0?void 0:p.toLowerCase())===i}),this.updateI18nProperties(c=>c.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var c,l;let u=this,p=(y,f,m)=>m?.context&&m.key&&i(y,f,m)?{...m,message:this.i18n({context:m.context,key:m.key,custom:m.custom,...y})}:m;(c=this[Wl])===null||c===void 0||c.forEach((y,f)=>u[f]=p(y,f,u[f])),(l=this[Fl])===null||l===void 0||l.forEach((y,f)=>{var m;return u[f]=(m=u[f])===null||m===void 0?void 0:m.map(x=>p(y,f,x))})}updateI18nProperties(i){var c;(c=this[Zs])===null||c===void 0||c.forEach((l,u)=>{i(l,u)&&(this[u]=this.i18n(l))})}addI18nMessages(i,c,l){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,c,l)}addI18nContext(i,c,l){let u=(typeof i=="string"?i:i.name).toLowerCase();l=typeof i=="string"?l:i.custom,this[Kr].set(u,{isCustomContext:l}),this[ar].has(u)||this[ar].set(u,this.getI18nService(l).subscribe(u,()=>this.onI18nUpdate(u))),this.getI18nService(l).prepareContext(u,c)}hasI18nContext(i){return this[Kr].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Kr].forEach((i,c)=>this.addI18nContext(c,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[ar].forEach(i=>i()),this[ar].clear()}}return r=Kr,o=ar,Hl([(0,Vs.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),Ks=class extends Zr(Ht.FtLitElement){},Vr=class extends Zr(Ht.FtLitElementRedux){};var ir=function(e,r,o,n){var a=arguments.length,i=a<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,r,o,n);else for(var l=e.length-1;l>=0;l--)(c=e[l])&&(i=(a<3?c(i):a>3?c(r,o,i):c(r,o))||i);return a>3&&i&&Object.defineProperty(r,o,i),i},xe=class extends Vr{constructor(){super(),this.editorMode=!1,this.addStore(R)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":qr.nothing:qr.html`
353
+ `}connectedCallback(){super.connectedCallback(),R.addEventListener(tt.eventName,this.reloadConfiguration)}disconnectedCallback(){R.addEventListener(tt.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(r){var o,n,a,i,c,l,u;super.update(r),r.has("baseUrl")&&(R.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),r.has("apiIntegrationIdentifier")&&R.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),r.has("apiIntegrationAppVersion")&&R.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),r.has("uiLocale")&&R.actions.uiLocale(this.uiLocale),r.has("metadataConfiguration")&&R.actions.metadataConfiguration(this.metadataConfiguration),r.has("noCustom")&&R.actions.noCustom(this.noCustom),r.has("editorMode")&&R.actions.editorMode(this.editorMode),r.has("noCustomComponent")&&R.actions.noCustomComponent(this.noCustomComponent),r.has("session")&&R.actions.session(this.session),r.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(p=>It.addContext(p)),r.has("openExternalDocumentInNewTab")&&R.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),r.has("navigatorOnline")&&R.actions.navigatorOnline(this.navigatorOnline),r.has("forcedOffline")&&R.actions.forcedOffline(this.forcedOffline),r.has("localesConfiguration")&&(R.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),R.actions.availableUiLocales((a=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&a!==void 0?a:[]),R.actions.searchInAllLanguagesAllowed((c=(i=this.localesConfiguration)===null||i===void 0?void 0:i.allLanguagesAllowed)!==null&&c!==void 0?c:!1)),r.has("authenticationRequired")&&R.actions.authenticationRequired(this.authenticationRequired),r.has("availableContentLocales")&&R.actions.availableContentLocales((u=(l=this.availableContentLocales)===null||l===void 0?void 0:l.contentLocales)!==null&&u!==void 0?u:[]),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),this.availableContentLocales==null&&this.updateAvailableContentLocales())}async updateSession(){this.session=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},r.idleTimeoutInMillis),r})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}async updateAvailableContentLocales(){this.availableContentLocales=await this.cache.get("availableContentLocales",()=>Yi(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};B.elementDefinitions={};B.styles=Gi;z([(0,q.property)()],B.prototype,"baseUrl",void 0);z([(0,q.property)()],B.prototype,"apiIntegrationIdentifier",void 0);z([(0,q.property)()],B.prototype,"apiIntegrationAppVersion",void 0);z([(0,q.property)()],B.prototype,"uiLocale",void 0);z([(0,ge.jsonProperty)(null)],B.prototype,"availableUiLocales",void 0);z([(0,ge.jsonProperty)(null)],B.prototype,"metadataConfiguration",void 0);z([(0,q.property)({type:Boolean})],B.prototype,"editorMode",void 0);z([(0,q.property)({type:Boolean})],B.prototype,"noCustom",void 0);z([(0,q.property)({type:Boolean})],B.prototype,"openExternalDocumentInNewTab",void 0);z([(0,q.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],B.prototype,"noCustomComponent",void 0);z([(0,q.property)({type:Boolean})],B.prototype,"withManualResources",void 0);z([(0,q.property)({type:Boolean})],B.prototype,"navigatorOnline",void 0);z([(0,q.property)({type:Boolean})],B.prototype,"forcedOffline",void 0);z([(0,q.property)({type:Object})],B.prototype,"apiProvider",void 0);z([(0,q.property)({type:Boolean})],B.prototype,"authenticationRequired",void 0);z([(0,ge.jsonProperty)([])],B.prototype,"messageContexts",void 0);z([(0,ge.jsonProperty)(void 0)],B.prototype,"session",void 0);z([(0,q.state)()],B.prototype,"localesConfiguration",void 0);z([(0,q.state)()],B.prototype,"availableContentLocales",void 0);var Ln=C(Q());function Qc(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;let o,n,a;if(Array.isArray(e)){if(o=e.length,o!=r.length)return!1;for(n=o;n--!==0;)if(!Ir(e[n],r[n]))return!1;return!0}if(e instanceof Map&&r instanceof Map){if(e.size!==r.size)return!1;for(n of e.entries())if(!r.has(n[0]))return!1;for(n of e.entries())if(!Ir(n[1],r.get(n[0])))return!1;return!0}if(e instanceof Set&&r instanceof Set){if(e.size!==r.size)return!1;for(n of e.entries())if(!r.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();let i=c=>Object.keys(c).filter(l=>c[l]!=null);if(a=i(e),o=a.length,o!==i(r).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,a[n]))return!1;for(n=o;n--!==0;){let c=a[n];if(!Ir(e[c],r[c]))return!1}return!0}return e!==e&&r!==r||e==null&&r==null}function Ir(e,r){try{return Qc(e,r)}catch{return!1}}function er(e,r){return!Ir(e,r)}function _r(e,r){let o=n=>n[e]===!0;return n=>{if(o(n))return n;let a=r(n);return a[e]=!0,a}}var Ji=C(Q(),1);var an=e=>{let r=e??{};return(o,n)=>{var a;let i={hasChanged:er,attribute:!1,...r};(0,Ji.property)(i)(o,n);let c=o.constructor;c.reduxProperties=new Map(c.reduxProperties),c.reduxProperties.set(n,{selector:(a=r.selector)!==null&&a!==void 0?a:l=>l[n],store:r.store})}};var Pr=class{constructor(){this.queue=[]}add(r,o=!1){o&&this.clear(r.type),this.queue.push(r)}consume(r){let o=this.queue.find(n=>n.type===r);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(r){typeof r=="string"?this.queue=this.queue.filter(o=>o.type!==r):this.queue=this.queue.filter(o=>!r.test(o.type))}};var at=C(Q(),1);var Qi=C(Q(),1);function es(e,r){let o=()=>JSON.parse(JSON.stringify(e));return(0,Qi.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:er,...r??{}})}var kr=class{constructor(r=0){this.timeout=r,this.callbacks=[]}run(r,o){return this.callbacks=[r],this.debounce(o)}queue(r,o){return this.callbacks.push(r),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(r){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),r??this.timeout),this.promise}async runCallbacks(){var r,o;let n=[...this.callbacks];this.callbacks=[];let a=(r=this.rejectPromise)!==null&&r!==void 0?r:()=>null,i=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let c of n)try{await c()}catch(l){a(l);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 rs=C($(),1);var Dr=globalThis,el=Dr.ShadowRoot&&(Dr.ShadyCSS===void 0||Dr.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,eb=Symbol();var ts=(e,r)=>{if(el)e.adoptedStyleSheets=r.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of r){let n=document.createElement("style"),a=Dr.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=o.cssText,e.appendChild(n)}};var Br=class extends rs.LitElement{createRenderRoot(){let r=this.constructor;r.elementDefinitions&&!r.registry&&(r.registry=new CustomElementRegistry,Object.entries(r.elementDefinitions).forEach(([a,i])=>r.registry.define(a,i)));let o={...r.shadowRootOptions,customElements:r.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return ts(n,r.elementStyles),n}};function os(e,r,...o){var n;let a=e.querySelector(r);for(let i of o)a=(n=a?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return a}var Pt=function(e,r,o,n){var a=arguments.length,i=a<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,r,o,n);else for(var l=e.length-1;l>=0;l--)(c=e[l])&&(i=(a<3?c(i):a>3?c(r,o,i):c(r,o))||i);return a>3&&i&&Object.defineProperty(r,o,i),i},ss,ns=Symbol("constructorPrototype"),as=Symbol("constructorName"),cs=Symbol("exportpartsDebouncer"),is=Symbol("dynamicDependenciesLoaded"),_t=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};_t.eventName="exportparts-updated";var Ee=class extends Br{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[ss]=new kr(5),this.scheduleExportpartsUpdate=()=>{var r,o,n;(!((r=this.exportpartsPrefix)===null||r===void 0)&&r.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[cs].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)})},this[as]=this.constructor.name,this[ns]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[as]&&Object.setPrototypeOf(this,this[ns])}connectedCallback(){var r;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let o=this.constructor;o[is]||(o[is]=!0,this.importDynamicDependencies()),(r=this.shadowRoot)===null||r===void 0||r.addEventListener(_t.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var r;super.disconnectedCallback(),(r=this.shadowRoot)===null||r===void 0||r.removeEventListener(_t.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(r){super.updated(r),this.updateComplete.then(()=>{this.contentAvailableCallback(r),this.focusElementToFocus(r),this.applyCustomStylesheet(r),this.scheduleExportpartsUpdate(),r.has("exportparts")&&this.dispatchEvent(new _t)})}contentAvailableCallback(r){}focusElementToFocus(r){if(r.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:a}=this.elementToFocus;if(n!=null){let i=[...a??[],n];o=os(this.shadowRoot,...i)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(r){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(r.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)}}setExportpartsAttribute(r){var o,n,a,i,c,l;let u=m=>m!=null&&m.trim().length>0,p=r.filter(u).map(m=>m.trim());if(p.length===0){this.exportparts=void 0;return}let y=new Set;for(let m of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let x=(i=(a=m.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],b=(l=(c=m.getAttribute("exportparts"))===null||c===void 0?void 0:c.split(",").map(A=>A.split(":")[1]))!==null&&l!==void 0?l:[],v=[...x,...b].filter(u).map(A=>A.trim());for(let A of v)y.add(A)}if(y.size===0){this.exportparts=void 0;return}let f=[...y.values()].flatMap(m=>p.map(x=>`${m}:${x}--${m}`));this.exportparts=[...this.part,...f].join(", ")}};ss=cs;Pt([(0,at.property)()],Ee.prototype,"exportpartsPrefix",void 0);Pt([es([])],Ee.prototype,"exportpartsPrefixes",void 0);Pt([(0,at.property)({reflect:!0})],Ee.prototype,"exportparts",void 0);Pt([(0,at.property)()],Ee.prototype,"customStylesheet",void 0);Pt([(0,at.property)()],Ee.prototype,"elementToFocus",void 0);Pt([(0,at.state)()],Ee.prototype,"useAdoptedStyleSheets",void 0);function Mr(e){var r;return(r=e?.isFtReduxStore)!==null&&r!==void 0?r:!1}var tr=Symbol("internalReduxEventsUnsubscribers"),ze=Symbol("internalStoresUnsubscribers"),it=Symbol("internalStores"),tl=_r(Symbol("withRedux"),function(e){var r,o,n;class a extends e{constructor(){super(...arguments),this[r]=new Map,this[o]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(c){super.willUpdate(c),[...this.reduxConstructor.reduxReactiveProperties].some(l=>c.has(l))&&this.updateFromStores()}getUnnamedStore(){if(this[it].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[it].values()][0]}getStore(c){return c==null?this.getUnnamedStore():this[it].get(c)}addStore(c,l){var u;l=(u=l??c.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(l),this[it].set(l,c),this.subscribeToStore(l,c),this.updateFromStores()}removeStore(c){let l=typeof c=="string"?c:c.name;this.unsubscribeFromStore(l),this[it].delete(l)}setupStores(){this.unsubscribeFromStores(),this[it].forEach((c,l)=>this.subscribeToStore(l,c)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((c,l)=>{let u=this.constructor.getPropertyOptions(l);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:l)){let p=this.getStore(c.store);p&&(c.store?this[ze].has(c.store):this[ze].size>0)&&(this[l]=c.selector(p.getState(),this))}})}subscribeToStore(c,l){var u;this[ze].set(c,l.subscribe(()=>this.updateFromStores())),this[tr].set(c,[]),Mr(l)&&l.eventBus&&((u=this.reduxConstructor.reduxEventListeners)===null||u===void 0||u.forEach((p,y)=>{if(typeof this[y]=="function"&&(!p.store||l.name===p.store)){let f=m=>this[y](m);l.addEventListener(p.eventName,f),this[tr].get(c).push(()=>l.removeEventListener(p.eventName,f))}})),this.onStoreAvailable(c)}unsubscribeFromStores(){this[ze].forEach((c,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(c){var l;this[ze].has(c)&&this[ze].get(c)(),this[ze].delete(c),(l=this[tr].get(c))===null||l===void 0||l.forEach(u=>u()),this[tr].delete(c)}onStoreAvailable(c){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return r=ze,o=it,n=tr,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),ls=class extends tl(Ee){};function fe(e){for(var r=arguments.length,o=Array(r>1?r-1:0),n=1;n<r;n++)o[n-1]=arguments[n];if(0)var a,i;throw Error("[Immer] minified error nr: "+e+(o.length?" "+o.map(function(c){return"'"+c+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Ie(e){return!!e&&!!e[M]}function be(e){var r;return!!e&&(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)===ll}(e)||Array.isArray(e)||!!e[ms]||!!(!((r=e.constructor)===null||r===void 0)&&r[ms])||yn(e)||mn(e))}function st(e,r,o){o===void 0&&(o=!1),Bt(e)===0?(o?Object.keys:Dt)(e).forEach(function(n){o&&typeof n=="symbol"||r(n,e[n],e)}):e.forEach(function(n,a){return r(a,n,e)})}function Bt(e){var r=e[M];return r?r.i>3?r.i-4:r.i:Array.isArray(e)?1:yn(e)?2:mn(e)?3:0}function kt(e,r){return Bt(e)===2?e.has(r):Object.prototype.hasOwnProperty.call(e,r)}function rl(e,r){return Bt(e)===2?e.get(r):e[r]}function gs(e,r,o){var n=Bt(e);n===2?e.set(r,o):n===3?e.add(o):e[r]=o}function bs(e,r){return e===r?e!==0||1/e==1/r:e!=e&&r!=r}function yn(e){return sl&&e instanceof Map}function mn(e){return cl&&e instanceof Set}function Ge(e){return e.o||e.t}function gn(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var r=Ss(e);delete r[M];for(var o=Dt(r),n=0;n<o.length;n++){var a=o[n],i=r[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(r[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[a]})}return Object.create(Object.getPrototypeOf(e),r)}function bn(e,r){return r===void 0&&(r=!1),xn(e)||Ie(e)||!be(e)||(Bt(e)>1&&(e.set=e.add=e.clear=e.delete=ol),Object.freeze(e),r&&st(e,function(o,n){return bn(n,!0)},!0)),e}function ol(){fe(2)}function xn(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Ae(e){var r=hn[e];return r||fe(18,e),r}function nl(e,r){hn[e]||(hn[e]=r)}function un(){return or}function sn(e,r){r&&(Ae("Patches"),e.u=[],e.s=[],e.v=r)}function Ur(e){pn(e),e.p.forEach(al),e.p=null}function pn(e){e===or&&(or=e.l)}function ds(e){return or={p:[],l:or,h:e,m:!0,_:0}}function al(e){var r=e[M];r.i===0||r.i===1?r.j():r.g=!0}function cn(e,r){r._=r.p.length;var o=r.p[0],n=e!==void 0&&e!==o;return r.h.O||Ae("ES5").S(r,e,n),n?(o[M].P&&(Ur(r),fe(4)),be(e)&&(e=Hr(r,e),r.l||Wr(r,e)),r.u&&Ae("Patches").M(o[M].t,e,r.u,r.s)):e=Hr(r,o,[]),Ur(r),r.u&&r.v(r.u,r.s),e!==vs?e:void 0}function Hr(e,r,o){if(xn(r))return r;var n=r[M];if(!n)return st(r,function(l,u){return us(e,n,r,l,u,o)},!0),r;if(n.A!==e)return r;if(!n.P)return Wr(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=gn(n.k):n.o,i=a,c=!1;n.i===3&&(i=new Set(a),a.clear(),c=!0),st(i,function(l,u){return us(e,n,a,l,u,o,c)}),Wr(e,a,!1),o&&e.u&&Ae("Patches").N(n,o,e.u,e.s)}return n.o}function us(e,r,o,n,a,i,c){if(Ie(a)){var l=Hr(e,a,i&&r&&r.i!==3&&!kt(r.R,n)?i.concat(n):void 0);if(gs(o,n,l),!Ie(l))return;e.m=!1}else c&&o.add(a);if(be(a)&&!xn(a)){if(!e.h.D&&e._<1)return;Hr(e,a),r&&r.A.l||Wr(e,a)}}function Wr(e,r,o){o===void 0&&(o=!1),!e.l&&e.h.D&&e.m&&bn(r,o)}function ln(e,r){var o=e[M];return(o?Ge(o):e)[r]}function ps(e,r){if(r in e)for(var o=Object.getPrototypeOf(e);o;){var n=Object.getOwnPropertyDescriptor(o,r);if(n)return n;o=Object.getPrototypeOf(o)}}function $e(e){e.P||(e.P=!0,e.l&&$e(e.l))}function dn(e){e.o||(e.o=gn(e.t))}function fn(e,r,o){var n=yn(r)?Ae("MapSet").F(r,o):mn(r)?Ae("MapSet").T(r,o):e.O?function(a,i){var c=Array.isArray(a),l={i:c?1:0,A:i?i.A:un(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},u=l,p=nr;c&&(u=[l],p=rr);var y=Proxy.revocable(u,p),f=y.revoke,m=y.proxy;return l.k=m,l.j=f,m}(r,o):Ae("ES5").J(r,o);return(o?o.A:un()).p.push(n),n}function il(e){return Ie(e)||fe(22,e),function r(o){if(!be(o))return o;var n,a=o[M],i=Bt(o);if(a){if(!a.P&&(a.i<4||!Ae("ES5").K(a)))return a.t;a.I=!0,n=fs(o,i),a.I=!1}else n=fs(o,i);return st(n,function(c,l){a&&rl(a.t,c)===l||gs(n,c,r(l))}),i===3?new Set(n):n}(e)}function fs(e,r){switch(r){case 2:return new Map(e);case 3:return Array.from(e)}return gn(e)}function xs(){function e(c,l){var u=i[c];return u?u.enumerable=l:i[c]=u={configurable:!0,enumerable:l,get:function(){var p=this[M];return nr.get(p,c)},set:function(p){var y=this[M];nr.set(y,c,p)}},u}function r(c){for(var l=c.length-1;l>=0;l--){var u=c[l][M];if(!u.P)switch(u.i){case 5:n(u)&&$e(u);break;case 4:o(u)&&$e(u)}}}function o(c){for(var l=c.t,u=c.k,p=Dt(u),y=p.length-1;y>=0;y--){var f=p[y];if(f!==M){var m=l[f];if(m===void 0&&!kt(l,f))return!0;var x=u[f],b=x&&x[M];if(b?b.t!==m:!bs(x,m))return!0}}var v=!!l[M];return p.length!==Dt(l).length+(v?0:1)}function n(c){var l=c.k;if(l.length!==c.t.length)return!0;var u=Object.getOwnPropertyDescriptor(l,l.length-1);if(u&&!u.get)return!0;for(var p=0;p<l.length;p++)if(!l.hasOwnProperty(p))return!0;return!1}function a(c){c.g&&fe(3,JSON.stringify(Ge(c)))}var i={};nl("ES5",{J:function(c,l){var u=Array.isArray(c),p=function(f,m){if(f){for(var x=Array(m.length),b=0;b<m.length;b++)Object.defineProperty(x,""+b,e(b,!0));return x}var v=Ss(m);delete v[M];for(var A=Dt(v),E=0;E<A.length;E++){var w=A[E];v[w]=e(w,f||!!v[w].enumerable)}return Object.create(Object.getPrototypeOf(m),v)}(u,c),y={i:u?5:4,A:l?l.A:un(),P:!1,I:!1,R:{},l,t:c,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,M,{value:y,writable:!0}),p},S:function(c,l,u){u?Ie(l)&&l[M].A===c&&r(c.p):(c.u&&function p(y){if(y&&typeof y=="object"){var f=y[M];if(f){var m=f.t,x=f.k,b=f.R,v=f.i;if(v===4)st(x,function(I){I!==M&&(m[I]!==void 0||kt(m,I)?b[I]||p(x[I]):(b[I]=!0,$e(f)))}),st(m,function(I){x[I]!==void 0||kt(x,I)||(b[I]=!1,$e(f))});else if(v===5){if(n(f)&&($e(f),b.length=!0),x.length<m.length)for(var A=x.length;A<m.length;A++)b[A]=!1;else for(var E=m.length;E<x.length;E++)b[E]=!0;for(var w=Math.min(x.length,m.length),L=0;L<w;L++)x.hasOwnProperty(L)||(b[L]=!0),b[L]===void 0&&p(x[L])}}}}(c.p[0]),r(c.p))},K:function(c){return c.i===4?o(c):n(c)}})}var hs,or,vn=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",sl=typeof Map<"u",cl=typeof Set<"u",ys=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",vs=vn?Symbol.for("immer-nothing"):((hs={})["immer-nothing"]=!0,hs),ms=vn?Symbol.for("immer-draftable"):"__$immer_draftable",M=vn?Symbol.for("immer-state"):"__$immer_state";var ll=""+Object.prototype.constructor,Dt=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Ss=Object.getOwnPropertyDescriptors||function(e){var r={};return Dt(e).forEach(function(o){r[o]=Object.getOwnPropertyDescriptor(e,o)}),r},hn={},nr={get:function(e,r){if(r===M)return e;var o=Ge(e);if(!kt(o,r))return function(a,i,c){var l,u=ps(i,c);return u?"value"in u?u.value:(l=u.get)===null||l===void 0?void 0:l.call(a.k):void 0}(e,o,r);var n=o[r];return e.I||!be(n)?n:n===ln(e.t,r)?(dn(e),e.o[r]=fn(e.A.h,n,e)):n},has:function(e,r){return r in Ge(e)},ownKeys:function(e){return Reflect.ownKeys(Ge(e))},set:function(e,r,o){var n=ps(Ge(e),r);if(n?.set)return n.set.call(e.k,o),!0;if(!e.P){var a=ln(Ge(e),r),i=a?.[M];if(i&&i.t===o)return e.o[r]=o,e.R[r]=!1,!0;if(bs(o,a)&&(o!==void 0||kt(e.t,r)))return!0;dn(e),$e(e)}return e.o[r]===o&&(o!==void 0||r in e.o)||Number.isNaN(o)&&Number.isNaN(e.o[r])||(e.o[r]=o,e.R[r]=!0),!0},deleteProperty:function(e,r){return ln(e.t,r)!==void 0||r in e.t?(e.R[r]=!1,dn(e),$e(e)):delete e.R[r],e.o&&delete e.o[r],!0},getOwnPropertyDescriptor:function(e,r){var o=Ge(e),n=Reflect.getOwnPropertyDescriptor(o,r);return n&&{writable:!0,configurable:e.i!==1||r!=="length",enumerable:n.enumerable,value:o[r]}},defineProperty:function(){fe(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){fe(12)}},rr={};st(nr,function(e,r){rr[e]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}}),rr.deleteProperty=function(e,r){return rr.set.call(this,e,r,void 0)},rr.set=function(e,r,o){return nr.set.call(this,e[0],r,o,e[0])};var dl=function(){function e(o){var n=this;this.O=ys,this.D=!0,this.produce=function(a,i,c){if(typeof a=="function"&&typeof i!="function"){var l=i;i=a;var u=n;return function(v){var A=this;v===void 0&&(v=l);for(var E=arguments.length,w=Array(E>1?E-1:0),L=1;L<E;L++)w[L-1]=arguments[L];return u.produce(v,function(I){var _;return(_=i).call.apply(_,[A,I].concat(w))})}}var p;if(typeof i!="function"&&fe(6),c!==void 0&&typeof c!="function"&&fe(7),be(a)){var y=ds(n),f=fn(n,a,void 0),m=!0;try{p=i(f),m=!1}finally{m?Ur(y):pn(y)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(v){return sn(y,c),cn(v,y)},function(v){throw Ur(y),v}):(sn(y,c),cn(p,y))}if(!a||typeof a!="object"){if((p=i(a))===void 0&&(p=a),p===vs&&(p=void 0),n.D&&bn(p,!0),c){var x=[],b=[];Ae("Patches").M(a,p,x,b),c(x,b)}return p}fe(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(p){for(var y=arguments.length,f=Array(y>1?y-1:0),m=1;m<y;m++)f[m-1]=arguments[m];return n.produceWithPatches(p,function(x){return a.apply(void 0,[x].concat(f))})};var c,l,u=n.produce(a,i,function(p,y){c=p,l=y});return typeof Promise<"u"&&u instanceof Promise?u.then(function(p){return[p,c,l]}):[u,c,l]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var r=e.prototype;return r.createDraft=function(o){be(o)||fe(8),Ie(o)&&(o=il(o));var n=ds(this),a=fn(this,o,void 0);return a[M].C=!0,pn(n),a},r.finishDraft=function(o,n){var a=o&&o[M],i=a.A;return sn(i,n),cn(void 0,i)},r.setAutoFreeze=function(o){this.D=o},r.setUseProxies=function(o){o&&!ys&&fe(20),this.O=o},r.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 c=Ae("Patches").$;return Ie(o)?c(o,n):this.produce(o,function(l){return c(l,n)})},e}(),se=new dl,ul=se.produce,yb=se.produceWithPatches.bind(se),mb=se.setAutoFreeze.bind(se),gb=se.setUseProxies.bind(se),bb=se.applyPatches.bind(se),xb=se.createDraft.bind(se),vb=se.finishDraft.bind(se),Fr=ul;function ct(e){"@babel/helpers - typeof";return ct=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ct(e)}function Os(e,r){if(ct(e)!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var n=o.call(e,r||"default");if(ct(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Cs(e){var r=Os(e,"string");return ct(r)=="symbol"?r:r+""}function Es(e,r,o){return(r=Cs(r))in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o,e}function As(e,r){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),o.push.apply(o,n)}return o}function Sn(e){for(var r=1;r<arguments.length;r++){var o=arguments[r]!=null?arguments[r]:{};r%2?As(Object(o),!0).forEach(function(n){Es(e,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):As(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}function X(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var ws=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),On=function(){return Math.random().toString(36).substring(7).split("").join(".")},zr={INIT:"@@redux/INIT"+On(),REPLACE:"@@redux/REPLACE"+On(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+On()}};function pl(e){if(typeof e!="object"||e===null)return!1;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r}function Cn(e,r,o){var n;if(typeof r=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(X(0));if(typeof r=="function"&&typeof o>"u"&&(o=r,r=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(X(1));return o(Cn)(e,r)}if(typeof e!="function")throw new Error(X(2));var a=e,i=r,c=[],l=c,u=!1;function p(){l===c&&(l=c.slice())}function y(){if(u)throw new Error(X(3));return i}function f(v){if(typeof v!="function")throw new Error(X(4));if(u)throw new Error(X(5));var A=!0;return p(),l.push(v),function(){if(A){if(u)throw new Error(X(6));A=!1,p();var w=l.indexOf(v);l.splice(w,1),c=null}}}function m(v){if(!pl(v))throw new Error(X(7));if(typeof v.type>"u")throw new Error(X(8));if(u)throw new Error(X(9));try{u=!0,i=a(i,v)}finally{u=!1}for(var A=c=l,E=0;E<A.length;E++){var w=A[E];w()}return v}function x(v){if(typeof v!="function")throw new Error(X(10));a=v,m({type:zr.REPLACE})}function b(){var v,A=f;return v={subscribe:function(w){if(typeof w!="object"||w===null)throw new Error(X(11));function L(){w.next&&w.next(y())}L();var I=A(L);return{unsubscribe:I}}},v[ws]=function(){return this},v}return m({type:zr.INIT}),n={dispatch:m,subscribe:f,getState:y,replaceReducer:x},n[ws]=b,n}function fl(e){Object.keys(e).forEach(function(r){var o=e[r],n=o(void 0,{type:zr.INIT});if(typeof n>"u")throw new Error(X(12));if(typeof o(void 0,{type:zr.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(X(13))})}function Rs(e){for(var r=Object.keys(e),o={},n=0;n<r.length;n++){var a=r[n];typeof e[a]=="function"&&(o[a]=e[a])}var i=Object.keys(o),c,l;try{fl(o)}catch(u){l=u}return function(p,y){if(p===void 0&&(p={}),l)throw l;if(0)var f;for(var m=!1,x={},b=0;b<i.length;b++){var v=i[b],A=o[v],E=p[v],w=A(E,y);if(typeof w>"u"){var L=y&&y.type;throw new Error(X(14))}x[v]=w,m=m||w!==E}return m=m||i.length!==Object.keys(p).length,m?x:p}}function Mt(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return r.length===0?function(n){return n}:r.length===1?r[0]:r.reduce(function(n,a){return function(){return n(a.apply(void 0,arguments))}})}function Ts(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(X(15))},c={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=r.map(function(u){return u(c)});return i=Mt.apply(void 0,l)(a.dispatch),Sn(Sn({},a),{},{dispatch:i})}}}function Ns(e){var r=function(n){var a=n.dispatch,i=n.getState;return function(c){return function(l){return typeof l=="function"?l(a,i,e):c(l)}}};return r}var Ls=Ns();Ls.withExtraArgument=Ns;var En=Ls;var Ds=function(){var e=function(r,o){return e=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])},e(r,o)};return function(r,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");e(r,o);function n(){this.constructor=r}r.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),hl=function(e,r){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,c;return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(p){return function(y){return u([p,y])}}function u(p){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(i=p[0]&2?a.return:p[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,p[1])).done)return i;switch(a=0,i&&(p=[p[0]&2,i.value]),p[0]){case 0:case 1:i=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,a=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(p[0]===6||p[0]===2)){o=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]<i[3])){o.label=p[1];break}if(p[0]===6&&o.label<i[1]){o.label=i[1],i=p;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(p);break}i[2]&&o.ops.pop(),o.trys.pop();continue}p=r.call(e,o)}catch(y){p=[6,y],a=0}finally{n=i=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Ut=function(e,r){for(var o=0,n=r.length,a=e.length;o<n;o++,a++)e[a]=r[o];return e},yl=Object.defineProperty,ml=Object.defineProperties,gl=Object.getOwnPropertyDescriptors,Is=Object.getOwnPropertySymbols,bl=Object.prototype.hasOwnProperty,xl=Object.prototype.propertyIsEnumerable,_s=function(e,r,o){return r in e?yl(e,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[r]=o},je=function(e,r){for(var o in r||(r={}))bl.call(r,o)&&_s(e,o,r[o]);if(Is)for(var n=0,a=Is(r);n<a.length;n++){var o=a[n];xl.call(r,o)&&_s(e,o,r[o])}return e},An=function(e,r){return ml(e,gl(r))},vl=function(e,r,o){return new Promise(function(n,a){var i=function(u){try{l(o.next(u))}catch(p){a(p)}},c=function(u){try{l(o.throw(u))}catch(p){a(p)}},l=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(i,c)};l((o=o.apply(e,r)).next())})};var Sl=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Mt:Mt.apply(null,arguments)},Ub=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function Ol(e){if(typeof e!="object"||e===null)return!1;var r=Object.getPrototypeOf(e);if(r===null)return!0;for(var o=r;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return r===o}var Cl=function(e){Ds(r,e);function r(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=e.apply(this,o)||this;return Object.setPrototypeOf(a,r.prototype),a}return Object.defineProperty(r,Symbol.species,{get:function(){return r},enumerable:!1,configurable:!0}),r.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return e.prototype.concat.apply(this,o)},r.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(r.bind.apply(r,Ut([void 0],o[0].concat(this)))):new(r.bind.apply(r,Ut([void 0],o.concat(this))))},r}(Array),El=function(e){Ds(r,e);function r(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=e.apply(this,o)||this;return Object.setPrototypeOf(a,r.prototype),a}return Object.defineProperty(r,Symbol.species,{get:function(){return r},enumerable:!1,configurable:!0}),r.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return e.prototype.concat.apply(this,o)},r.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(r.bind.apply(r,Ut([void 0],o[0].concat(this)))):new(r.bind.apply(r,Ut([void 0],o.concat(this))))},r}(Array);function Tn(e){return be(e)?Fr(e,function(){}):e}function Al(e){return typeof e=="boolean"}function wl(){return function(r){return Rl(r)}}function Rl(e){e===void 0&&(e={});var r=e.thunk,o=r===void 0?!0:r,n=e.immutableCheck,a=n===void 0?!0:n,i=e.serializableCheck,c=i===void 0?!0:i,l=new Cl;if(o&&(Al(o)?l.push(En):l.push(En.withExtraArgument(o.extraArgument))),0){if(a)var u;if(c)var p}return l}var wn=!0;function Bs(e){var r=wl(),o=e||{},n=o.reducer,a=n===void 0?void 0:n,i=o.middleware,c=i===void 0?r():i,l=o.devTools,u=l===void 0?!0:l,p=o.preloadedState,y=p===void 0?void 0:p,f=o.enhancers,m=f===void 0?void 0:f,x;if(typeof a=="function")x=a;else if(Ol(a))x=Rs(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 b=c;if(typeof b=="function"&&(b=b(r),!wn&&!Array.isArray(b)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!wn&&b.some(function(I){return typeof I!="function"}))throw new Error("each middleware provided to configureStore must be a function");var v=Ts.apply(void 0,b),A=Mt;u&&(A=Sl(je({trace:!wn},typeof u=="object"&&u)));var E=new El(v),w=E;Array.isArray(m)?w=Ut([v],m):typeof m=="function"&&(w=m(E));var L=A.apply(void 0,w);return Cn(x,y,L)}function Ke(e,r){function o(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(r){var i=r.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return je(je({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:n[0]}}return o.toString=function(){return""+e},o.type=e,o.match=function(n){return n.type===e},o}function Ms(e){var r={},o=[],n,a={addCase:function(i,c){var l=typeof i=="string"?i:i.type;if(l in r)throw new Error("addCase cannot be called with two reducers for the same action type");return r[l]=c,a},addMatcher:function(i,c){return o.push({matcher:i,reducer:c}),a},addDefaultCase:function(i){return n=i,a}};return e(a),[r,o,n]}function Tl(e){return typeof e=="function"}function Nl(e,r,o,n){o===void 0&&(o=[]);var a=typeof r=="function"?Ms(r):[r,o,n],i=a[0],c=a[1],l=a[2],u;if(Tl(e))u=function(){return Tn(e())};else{var p=Tn(e);u=function(){return p}}function y(f,m){f===void 0&&(f=u());var x=Ut([i[m.type]],c.filter(function(b){var v=b.matcher;return v(m)}).map(function(b){var v=b.reducer;return v}));return x.filter(function(b){return!!b}).length===0&&(x=[l]),x.reduce(function(b,v){if(v)if(Ie(b)){var A=b,E=v(A,m);return E===void 0?b:E}else{if(be(b))return Fr(b,function(w){return v(w,m)});var E=v(b,m);if(E===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return E}return b},f)}return y.getInitialState=u,y}function Ll(e,r){return e+"/"+r}function Us(e){var r=e.name;if(!r)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof e.initialState=="function"?e.initialState:Tn(e.initialState),n=e.reducers||{},a=Object.keys(n),i={},c={},l={};a.forEach(function(y){var f=n[y],m=Ll(r,y),x,b;"reducer"in f?(x=f.reducer,b=f.prepare):x=f,i[y]=x,c[m]=x,l[y]=b?Ke(m,b):Ke(m)});function u(){var y=typeof e.extraReducers=="function"?Ms(e.extraReducers):[e.extraReducers],f=y[0],m=f===void 0?{}:f,x=y[1],b=x===void 0?[]:x,v=y[2],A=v===void 0?void 0:v,E=je(je({},m),c);return Nl(o,function(w){for(var L in E)w.addCase(L,E[L]);for(var I=0,_=b;I<_.length;I++){var ee=_[I];w.addMatcher(ee.matcher,ee.reducer)}A&&w.addDefaultCase(A)})}var p;return{name:r,reducer:function(y,f){return p||(p=u()),p(y,f)},actions:l,caseReducers:i,getInitialState:function(){return p||(p=u()),p.getInitialState()}}}var Il="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",_l=function(e){e===void 0&&(e=21);for(var r="",o=e;o--;)r+=Il[Math.random()*64|0];return r},Pl=["name","message","stack","code"],Rn=function(){function e(r,o){this.payload=r,this.meta=o}return e}(),Ps=function(){function e(r,o){this.payload=r,this.meta=o}return e}(),kl=function(e){if(typeof e=="object"&&e!==null){for(var r={},o=0,n=Pl;o<n.length;o++){var a=n[o];typeof e[a]=="string"&&(r[a]=e[a])}return r}return{message:String(e)}},zb=function(){function e(r,o,n){var a=Ke(r+"/fulfilled",function(y,f,m,x){return{payload:y,meta:An(je({},x||{}),{arg:m,requestId:f,requestStatus:"fulfilled"})}}),i=Ke(r+"/pending",function(y,f,m){return{payload:void 0,meta:An(je({},m||{}),{arg:f,requestId:y,requestStatus:"pending"})}}),c=Ke(r+"/rejected",function(y,f,m,x,b){return{payload:x,error:(n&&n.serializeError||kl)(y||"Rejected"),meta:An(je({},b||{}),{arg:m,requestId:f,rejectedWithValue:!!x,requestStatus:"rejected",aborted:y?.name==="AbortError",condition:y?.name==="ConditionError"})}}),l=!1,u=typeof AbortController<"u"?AbortController:function(){function y(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return y.prototype.abort=function(){},y}();function p(y){return function(f,m,x){var b=n?.idGenerator?n.idGenerator(y):_l(),v=new u,A,E=!1;function w(I){A=I,v.abort()}var L=function(){return vl(this,null,function(){var I,_,ee,Oe,J,Ce,K;return hl(this,function(h){switch(h.label){case 0:return h.trys.push([0,4,,5]),Oe=(I=n?.condition)==null?void 0:I.call(n,y,{getState:m,extra:x}),Bl(Oe)?[4,Oe]:[3,2];case 1:Oe=h.sent(),h.label=2;case 2:if(Oe===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return E=!0,J=new Promise(function(g,N){return v.signal.addEventListener("abort",function(){return N({name:"AbortError",message:A||"Aborted"})})}),f(i(b,y,(_=n?.getPendingMeta)==null?void 0:_.call(n,{requestId:b,arg:y},{getState:m,extra:x}))),[4,Promise.race([J,Promise.resolve(o(y,{dispatch:f,getState:m,extra:x,requestId:b,signal:v.signal,abort:w,rejectWithValue:function(g,N){return new Rn(g,N)},fulfillWithValue:function(g,N){return new Ps(g,N)}})).then(function(g){if(g instanceof Rn)throw g;return g instanceof Ps?a(g.payload,b,y,g.meta):a(g,b,y)})])];case 3:return ee=h.sent(),[3,5];case 4:return Ce=h.sent(),ee=Ce instanceof Rn?c(null,b,y,Ce.payload,Ce.meta):c(Ce,b,y),[3,5];case 5:return K=n&&!n.dispatchConditionRejection&&c.match(ee)&&ee.meta.condition,K||f(ee),[2,ee]}})})}();return Object.assign(L,{abort:w,requestId:b,arg:y,unwrap:function(){return L.then(Dl)}})}}return Object.assign(p,{pending:i,rejected:c,fulfilled:a,typePrefix:r})}return e.withTypes=function(){return e},e}();function Dl(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Bl(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Hs="listener",Ws="completed",Fs="cancelled",Gb="task-"+Fs,$b="task-"+Ws,jb=Hs+"-"+Fs,Kb=Hs+"-"+Ws;var Nn="listenerMiddleware";var Vb=Ke(Nn+"/add"),Zb=Ke(Nn+"/removeAll"),qb=Ke(Nn+"/remove");var ks,Yb=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(ks||(ks=Promise.resolve())).then(e).catch(function(r){return setTimeout(function(){throw r},0)})},Ml=function(e){return function(r){setTimeout(r,e)}},Xb=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Ml(10);xs();var Ul=_r(Symbol("withEventBus"),function(e,r){return class extends e{constructor(){super(...arguments),this.eventBus=r??document.createElement("span")}addEventListener(o,n,a){this.eventBus.addEventListener(o,n,a)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,a){this.eventBus.removeEventListener(o,n,a)}}}),Gr=class extends Ul(Object){};window.ftReduxStores||(window.ftReduxStores={});var zs=class e extends Gr{static get(r){var o;let n=typeof r=="string"?r:r.name,a=typeof r=="string"?void 0:r,i=window.ftReduxStores[n];if(Mr(i))return i;if(a==null)return;let c=Us({...a,reducers:(o=a.reducers)!==null&&o!==void 0?o:{}}),l=Bs({reducer:(u,p)=>p.type==="CLEAR_FT_REDUX_STORE"?c.getInitialState():typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__")?{...u,...p.overwrites}:c.reducer(u,p)});return window.ftReduxStores[a.name]=new e(c,l,a.eventBus)}constructor(r,o,n){super(),this.reduxSlice=r,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new Pr;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,c,l)=>{let u=c,p=i[u];return p?(...y)=>{let f=p(...y.map(a));return this.reduxStore.dispatch(f),f}:y=>{this.setState({[u]:a(y)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(r){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(r).join("_"),overwrites:r})}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(r){throw new Error("Not implemented yet.")}subscribe(r){return this.reduxStore.subscribe(r)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var $r=class{static format(r,o,n,a){return window.moment?window.moment(r).locale(o).format(this.getMomentDateFormat(n,a)):this.getIntlDateTime(r,o,n,a)}static getMomentDateFormat(r,o){return r?o?"lll":"ll":o?"L LT":"L"}static getIntlDateTime(r,o,n,a){let i=typeof r=="string"?new Date(r):r,c=new Intl.DateTimeFormat(o,{dateStyle:n?"medium":"short"}).format(i);if(!a)return c;let l=new Intl.DateTimeFormat(o,{timeStyle:"short"}).format(i);return`${c} ${l}`}static getTimezoneAsString(){let r=n=>String(Math.floor(n)).padStart(2,"0"),o=new Date().getTimezoneOffset();return`${o<0?"+":"-"}${r(Math.abs(o)/60)}:${r(Math.abs(o)%60)}`}};var Gs=C(k()),jr=function(e,r,o,n){var a=arguments.length,i=a<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,r,o,n);else for(var l=e.length-1;l>=0;l--)(c=e[l])&&(i=(a<3?c(i):a>3?c(r,o,i):c(r,o))||i);return a>3&&i&&Object.defineProperty(r,o,i),i},Sx=(0,Gs.applyMixinOnce)(Symbol("withDateFormat"),function(e){class r extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(R)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var a,i;return((i=(a=this.metadataDescriptors.find(l=>l.key===n))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?l=>$r.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return jr([(0,Ln.property)({type:Boolean})],r.prototype,"useLongDateFormat",void 0),jr([(0,Ln.property)({type:Boolean})],r.prototype,"useDateTimeFormat",void 0),jr([an({store:R.name,selector:o=>{var n,a;return(a=(n=o.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]}})],r.prototype,"metadataDescriptors",void 0),jr([an({store:R.name})],r.prototype,"uiLocale",void 0),r});(0,$s.customElement)("ft-app-context")(B);var Vs=C(Q());var In=class{fromLocalizableLabel(r){return r.type=="PLAIN_TEXT"?{message:r.text}:{key:r.key,custom:r.type=="LOCALIZED_CUSTOM",context:r.context,message:r.key}}fromAttribute(r){if(r!=null)try{return JSON.parse(r)}catch{if(this.isI18nKey(r)){let[n,a]=r.split(".");return{context:n,key:a,custom:!0,message:""}}return{message:r}}}toAttribute(r){if(r!=null)return JSON.stringify(r)}isI18nKey(r){return r.match(/^[\w-]+\.[\w-]+$/)}},js=new In;var Hl=function(e,r,o,n){var a=arguments.length,i=a<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,r,o,n);else for(var l=e.length-1;l>=0;l--)(c=e[l])&&(i=(a<3?c(i):a>3?c(r,o,i):c(r,o))||i);return a>3&&i&&Object.defineProperty(r,o,i),i},Wl=Symbol("i18nAttributes"),Fl=Symbol("i18nListAttributes"),Zs=Symbol("i18nProperties"),Kr=Symbol("i18nContexts"),ar=Symbol("i18nUnsubs"),Zr=(0,Ht.applyMixinOnce)(Symbol("withI18n"),function(e){var r,o;class n extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[r]=new Map,this[o]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?Nr:It}i18n(i){let{context:c,key:l,message:u}=i,{custom:p,args:y,argsProvider:f}=i;if(c&&l){this.hasI18nContext(c)||this.addI18nContext(c,void 0,p);let m=y??(f?f(this):[]);return this.getI18nService(p).resolveMessage(c,l,...m)}return u}async awaitI18n(i){let{context:c,custom:l}=i;return c&&await this.getI18nService(l).prepareContext(c),this.i18n(i)}customI18n(i,c){if(js.isI18nKey(i)){let[l,u]=i.split(".");return this.i18n({custom:!0,context:l,key:u,...c})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((c,l,u)=>i.has(l)||typeof c.argsProvider=="function"),this.updateI18nProperties(c=>typeof c.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((c,l,u)=>{var p;return((p=u?.context)===null||p===void 0?void 0:p.toLowerCase())===i}),this.updateI18nProperties(c=>c.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var c,l;let u=this,p=(y,f,m)=>m?.context&&m.key&&i(y,f,m)?{...m,message:this.i18n({context:m.context,key:m.key,custom:m.custom,...y})}:m;(c=this[Wl])===null||c===void 0||c.forEach((y,f)=>u[f]=p(y,f,u[f])),(l=this[Fl])===null||l===void 0||l.forEach((y,f)=>{var m;return u[f]=(m=u[f])===null||m===void 0?void 0:m.map(x=>p(y,f,x))})}updateI18nProperties(i){var c;(c=this[Zs])===null||c===void 0||c.forEach((l,u)=>{i(l,u)&&(this[u]=this.i18n(l))})}addI18nMessages(i,c,l){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,c,l)}addI18nContext(i,c,l){let u=(typeof i=="string"?i:i.name).toLowerCase();l=typeof i=="string"?l:i.custom,this[Kr].set(u,{isCustomContext:l}),this[ar].has(u)||this[ar].set(u,this.getI18nService(l).subscribe(u,()=>this.onI18nUpdate(u))),this.getI18nService(l).prepareContext(u,c)}hasI18nContext(i){return this[Kr].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Kr].forEach((i,c)=>this.addI18nContext(c,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[ar].forEach(i=>i()),this[ar].clear()}}return r=Kr,o=ar,Hl([(0,Vs.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),Ks=class extends Zr(Ht.FtLitElement){},Vr=class extends Zr(Ht.FtLitElementRedux){};var ir=function(e,r,o,n){var a=arguments.length,i=a<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,r,o,n);else for(var l=e.length-1;l>=0;l--)(c=e[l])&&(i=(a<3?c(i):a>3?c(r,o,i):c(r,o))||i);return a>3&&i&&Object.defineProperty(r,o,i),i},xe=class extends Vr{constructor(){super(),this.editorMode=!1,this.addStore(R)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":qr.nothing:qr.html`
354
354
  <span class="ft-i18n">
355
355
  ${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
356
356
  </span>
@@ -430,7 +430,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:r.extend("--ftds-con
430
430
  `;var Ml=k`
431
431
  `;var Ti=class{addCommand(e,o=!1){_.commands.add(e,o)}consumeCommand(e){return _.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Ti;var Dl,hr=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},Zp=Symbol("clearAfterUnitTest"),un=class extends lo(fe){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Dl]=()=>{this.defaultMessages={},this.cache=new Le,this.listeners={}},this.currentUiLocale=_.getState().uiLocale,_.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=_.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let o=e.name.toLowerCase();this.cache.setFinal(o,e),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,o){var n;if(e=e.toLowerCase(),o&&Object.keys(o).length>0){let a={...(n=this.defaultMessages[e])!==null&&n!==void 0?n:{},...o};le(this.defaultMessages[e],a)||(this.defaultMessages[e]=a,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var o,n;return this.fetchContext(e),(n=(o=this.cache.getNow(e))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(e,o){let n=e.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(e,o,...n){var a;let i=e.toLowerCase(),s=this.resolveContext(i);return new Br((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(o,...n)}async fetchContext(e){let o=!this.cache.has(e),n;try{n=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),o&&await this.notify(e)}catch(a){!(a instanceof dt)&&o&&console.error(a)}return n}subscribe(e,o){var n;return e=e.toLowerCase(),this.listeners[e]=(n=this.listeners[e])!==null&&n!==void 0?n:new Set,this.listeners[e].add(o),()=>{var a;return(a=this.listeners[e])===null||a===void 0?void 0:a.delete(o)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new hr({loadedContexts:e})),this.dispatchEvent(new hr({loadedContexts:e})),await Promise.all(e.map(o=>this.notify(o,!1)))}async notify(e,o=!0){o&&(document.body.dispatchEvent(new hr({loadedContexts:[e]})),this.dispatchEvent(new hr({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(n=>co(0).then(()=>n()).catch(()=>null)))}};Dl=Zp;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends un{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends un{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var mr=window.FluidTopicsI18nService,pn=window.FluidTopicsCustomI18nService;var Ni=class{highlightHtml(e,o,n){Na(e,o,n)}};window.FluidTopicsHighlightHtmlService=new Ni;var _i=class{isDate(e){var o,n,a,i;return(i=(a=((n=(o=_.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(l=>l.key===e))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(e,o){var n,a,i;return St.format(e,(n=o?.locale)!==null&&n!==void 0?n:_.getState().uiLocale,(a=o?.longFormat)!==null&&a!==void 0?a:!1,(i=o?.withTime)!==null&&i!==void 0?i:!1)}};window.FluidTopicsDateService=new _i;var Kr=class{static get(e,o){var n,a;let i=_.getState(),{lang:s,region:l}=(a=(n=i.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new Jt(i.baseUrl,e??20,i.searchInAllLanguagesAllowed,o??`${s}-${l}`)}};var Li=class{urlToSearchRequest(e){return Kr.get().parse(e)}searchRequestToUrl(e){return Kr.get().serialize(e)}};window.FluidTopicsUrlService=new Li;var Tt=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Tt.eventName="change";var Ii=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let o=sessionStorage.getItem(this.itemName(e));return o?JSON.parse(o):void 0}set(e,o){sessionStorage.setItem(this.itemName(e),JSON.stringify(o))}},Ul=new Ii;var fn=class t extends Be{static build(){return new t(window.history,Ul,()=>window.location,!1)}constructor(e,o,n,a){var i,s;super(),this.history=e,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(i=e.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(e,o=!1){let n=o&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),le(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Tt(this.currentItem())),0)}installProxies(){let e=o=>(n,a,[i,s,l])=>{let d=o(),p={...d===this.currentIndex?this.currentState:void 0,...i,index:d,href:typeof l=="string"?l:(l??this.windowLocation()).href};n.apply(a,[p,s,l]),this.setCurrentState(p,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let o=this.history.length-1;o>=0;o--)e?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(e){var o;let n={...this.buildCurrentState(),...e,index:this.currentIndex,title:(o=e?.title)!==null&&o!==void 0?o:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(e){this.addEventListener(Tt.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Tt.eventName,e)}currentItem(){return Rr(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return Rr(this.states[this.previousDifferentMajorPosition()])}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return Rr(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var o;let n=(o=this.states[e])===null||o===void 0?void 0:o.majorStateId;if(!n)return e;let a=e,i=e+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var e,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&o!==void 0?o:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,o){var n;if(!this.hasState(e))return!1;let a=o??this.currentState.majorStateId,i=(n=this.states[e])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=fn.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});var Bl=_;function Fl(t,e){var o;return Bl.getState().authenticationRequired&&!(!((o=Bl.getState().session)===null||o===void 0)&&o.sessionAuthenticated)?Promise.resolve(e):t()}var Q=function(t,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(a<3?s(i):a>3?s(e,o,i):s(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},K=class extends z{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>wt.get(),this.authenticationRequired=!1,this.messageContexts=[],this.cache=new Le,this.cleanSessionDebouncer=new de,this.reloadConfiguration=()=>{this.cache.clear("availableContentLocales"),this.updateAvailableContentLocales()}}render(){return Z`
432
432
  <slot></slot>
433
- `}connectedCallback(){super.connectedCallback(),_.addEventListener(At.eventName,this.reloadConfiguration)}disconnectedCallback(){_.addEventListener(At.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(e){var o,n,a,i,s,l,d;super.update(e),e.has("baseUrl")&&(_.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&_.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&_.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&_.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&_.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&_.actions.noCustom(this.noCustom),e.has("editorMode")&&_.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&_.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&_.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(p=>mr.addContext(p)),e.has("openExternalDocumentInNewTab")&&_.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&_.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&_.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(_.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),_.actions.availableUiLocales((a=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&a!==void 0?a:[]),_.actions.searchInAllLanguagesAllowed((s=(i=this.localesConfiguration)===null||i===void 0?void 0:i.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),e.has("authenticationRequired")&&_.actions.authenticationRequired(this.authenticationRequired),e.has("availableContentLocales")&&_.actions.availableContentLocales((d=(l=this.availableContentLocales)===null||l===void 0?void 0:l.contentLocales)!==null&&d!==void 0?d:[]),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),this.availableContentLocales==null&&this.updateAvailableContentLocales())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}async updateAvailableContentLocales(){this.availableContentLocales=await this.cache.get("availableContentLocales",()=>Fl(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};K.elementDefinitions={};K.styles=Ml;Q([w()],K.prototype,"baseUrl",void 0);Q([w()],K.prototype,"apiIntegrationIdentifier",void 0);Q([w()],K.prototype,"apiIntegrationAppVersion",void 0);Q([w()],K.prototype,"uiLocale",void 0);Q([ye(null)],K.prototype,"availableUiLocales",void 0);Q([ye(null)],K.prototype,"metadataConfiguration",void 0);Q([w({type:Boolean})],K.prototype,"editorMode",void 0);Q([w({type:Boolean})],K.prototype,"noCustom",void 0);Q([w({type:Boolean})],K.prototype,"openExternalDocumentInNewTab",void 0);Q([w({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],K.prototype,"noCustomComponent",void 0);Q([w({type:Boolean})],K.prototype,"withManualResources",void 0);Q([w({type:Boolean})],K.prototype,"navigatorOnline",void 0);Q([w({type:Boolean})],K.prototype,"forcedOffline",void 0);Q([w({type:Object})],K.prototype,"apiProvider",void 0);Q([w({type:Boolean})],K.prototype,"authenticationRequired",void 0);Q([ye([])],K.prototype,"messageContexts",void 0);Q([ye(void 0)],K.prototype,"session",void 0);Q([j()],K.prototype,"localesConfiguration",void 0);Q([j()],K.prototype,"availableContentLocales",void 0);var hn=function(t,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(a<3?s(i):a>3?s(e,o,i):s(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},OC=X(Symbol("withDateFormat"),function(t){class e extends t{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(_)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var a,i;return((i=(a=this.metadataDescriptors.find(l=>l.key===n))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?l=>St.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return hn([w({type:Boolean})],e.prototype,"useLongDateFormat",void 0),hn([w({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),hn([ke({store:_.name,selector:o=>{var n,a;return(a=(n=o.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]}})],e.prototype,"metadataDescriptors",void 0),hn([ke({store:_.name})],e.prototype,"uiLocale",void 0),e});ne("ft-app-context")(K);var Pi=class{fromLocalizableLabel(e){return e.type=="PLAIN_TEXT"?{message:e.text}:{key:e.key,custom:e.type=="LOCALIZED_CUSTOM",context:e.context,message:e.key}}fromAttribute(e){if(e!=null)try{return JSON.parse(e)}catch{if(this.isI18nKey(e)){let[n,a]=e.split(".");return{context:n,key:a,message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},$l=new Pi;var qp=function(t,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(a<3?s(i):a>3?s(e,o,i):s(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},Yp=Symbol("i18nAttributes"),Xp=Symbol("i18nListAttributes"),Wl=Symbol("i18nProperties"),mn=Symbol("i18nContexts"),Vr=Symbol("i18nUnsubs"),gn=X(Symbol("withI18n"),function(t){var e,o;class n extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[o]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?pn:mr}i18n(i){let{context:s,key:l,message:d}=i,{custom:p,args:h,argsProvider:f}=i;if(s&&l){this.hasI18nContext(s)||this.addI18nContext(s,void 0,p);let m=h??(f?f(this):[]);return this.getI18nService(p).resolveMessage(s,l,...m)}return d}async awaitI18n(i){let{context:s,custom:l}=i;return s&&await this.getI18nService(l).prepareContext(s),this.i18n(i)}customI18n(i,s){if($l.isI18nKey(i)){let[l,d]=i.split(".");return this.i18n({custom:!0,context:l,key:d,...s})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((s,l,d)=>i.has(l)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((s,l,d)=>{var p;return((p=d?.context)===null||p===void 0?void 0:p.toLowerCase())===i}),this.updateI18nProperties(s=>s.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var s,l;let d=this,p=(h,f,m)=>m?.context&&m.key&&i(h,f,m)?{...m,message:this.i18n({context:m.context,key:m.key,custom:m.custom,...h})}:m;(s=this[Yp])===null||s===void 0||s.forEach((h,f)=>d[f]=p(h,f,d[f])),(l=this[Xp])===null||l===void 0||l.forEach((h,f)=>{var m;return d[f]=(m=d[f])===null||m===void 0?void 0:m.map(b=>p(h,f,b))})}updateI18nProperties(i){var s;(s=this[Wl])===null||s===void 0||s.forEach((l,d)=>{i(l,d)&&(this[d]=this.i18n(l))})}addI18nMessages(i,s,l){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,s,l)}addI18nContext(i,s,l){let d=(typeof i=="string"?i:i.name).toLowerCase();l=typeof i=="string"?l:i.custom,this[mn].set(d,{isCustomContext:l}),this[Vr].has(d)||this[Vr].set(d,this.getI18nService(l).subscribe(d,()=>this.onI18nUpdate(d))),this.getI18nService(l).prepareContext(d,s)}hasI18nContext(i){return this[mn].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[mn].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Vr].forEach(i=>i()),this[Vr].clear()}}return e=mn,o=Vr,qp([w({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),Hl=class extends gn(z){},yn=class extends gn(gt){};var Zr=function(t,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(a<3?s(i):a>3?s(e,o,i):s(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},we=class extends yn{constructor(){super(),this.editorMode=!1,this.addStore(_)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":W:Z`
433
+ `}connectedCallback(){super.connectedCallback(),_.addEventListener(At.eventName,this.reloadConfiguration)}disconnectedCallback(){_.addEventListener(At.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(e){var o,n,a,i,s,l,d;super.update(e),e.has("baseUrl")&&(_.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&_.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&_.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&_.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&_.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&_.actions.noCustom(this.noCustom),e.has("editorMode")&&_.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&_.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&_.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(p=>mr.addContext(p)),e.has("openExternalDocumentInNewTab")&&_.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&_.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&_.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(_.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),_.actions.availableUiLocales((a=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&a!==void 0?a:[]),_.actions.searchInAllLanguagesAllowed((s=(i=this.localesConfiguration)===null||i===void 0?void 0:i.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),e.has("authenticationRequired")&&_.actions.authenticationRequired(this.authenticationRequired),e.has("availableContentLocales")&&_.actions.availableContentLocales((d=(l=this.availableContentLocales)===null||l===void 0?void 0:l.contentLocales)!==null&&d!==void 0?d:[]),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),this.availableContentLocales==null&&this.updateAvailableContentLocales())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}async updateAvailableContentLocales(){this.availableContentLocales=await this.cache.get("availableContentLocales",()=>Fl(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};K.elementDefinitions={};K.styles=Ml;Q([w()],K.prototype,"baseUrl",void 0);Q([w()],K.prototype,"apiIntegrationIdentifier",void 0);Q([w()],K.prototype,"apiIntegrationAppVersion",void 0);Q([w()],K.prototype,"uiLocale",void 0);Q([ye(null)],K.prototype,"availableUiLocales",void 0);Q([ye(null)],K.prototype,"metadataConfiguration",void 0);Q([w({type:Boolean})],K.prototype,"editorMode",void 0);Q([w({type:Boolean})],K.prototype,"noCustom",void 0);Q([w({type:Boolean})],K.prototype,"openExternalDocumentInNewTab",void 0);Q([w({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],K.prototype,"noCustomComponent",void 0);Q([w({type:Boolean})],K.prototype,"withManualResources",void 0);Q([w({type:Boolean})],K.prototype,"navigatorOnline",void 0);Q([w({type:Boolean})],K.prototype,"forcedOffline",void 0);Q([w({type:Object})],K.prototype,"apiProvider",void 0);Q([w({type:Boolean})],K.prototype,"authenticationRequired",void 0);Q([ye([])],K.prototype,"messageContexts",void 0);Q([ye(void 0)],K.prototype,"session",void 0);Q([j()],K.prototype,"localesConfiguration",void 0);Q([j()],K.prototype,"availableContentLocales",void 0);var hn=function(t,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(a<3?s(i):a>3?s(e,o,i):s(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},OC=X(Symbol("withDateFormat"),function(t){class e extends t{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(_)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var a,i;return((i=(a=this.metadataDescriptors.find(l=>l.key===n))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?l=>St.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return hn([w({type:Boolean})],e.prototype,"useLongDateFormat",void 0),hn([w({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),hn([ke({store:_.name,selector:o=>{var n,a;return(a=(n=o.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]}})],e.prototype,"metadataDescriptors",void 0),hn([ke({store:_.name})],e.prototype,"uiLocale",void 0),e});ne("ft-app-context")(K);var Pi=class{fromLocalizableLabel(e){return e.type=="PLAIN_TEXT"?{message:e.text}:{key:e.key,custom:e.type=="LOCALIZED_CUSTOM",context:e.context,message:e.key}}fromAttribute(e){if(e!=null)try{return JSON.parse(e)}catch{if(this.isI18nKey(e)){let[n,a]=e.split(".");return{context:n,key:a,custom:!0,message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},$l=new Pi;var qp=function(t,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(a<3?s(i):a>3?s(e,o,i):s(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},Yp=Symbol("i18nAttributes"),Xp=Symbol("i18nListAttributes"),Wl=Symbol("i18nProperties"),mn=Symbol("i18nContexts"),Vr=Symbol("i18nUnsubs"),gn=X(Symbol("withI18n"),function(t){var e,o;class n extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[o]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?pn:mr}i18n(i){let{context:s,key:l,message:d}=i,{custom:p,args:h,argsProvider:f}=i;if(s&&l){this.hasI18nContext(s)||this.addI18nContext(s,void 0,p);let m=h??(f?f(this):[]);return this.getI18nService(p).resolveMessage(s,l,...m)}return d}async awaitI18n(i){let{context:s,custom:l}=i;return s&&await this.getI18nService(l).prepareContext(s),this.i18n(i)}customI18n(i,s){if($l.isI18nKey(i)){let[l,d]=i.split(".");return this.i18n({custom:!0,context:l,key:d,...s})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((s,l,d)=>i.has(l)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((s,l,d)=>{var p;return((p=d?.context)===null||p===void 0?void 0:p.toLowerCase())===i}),this.updateI18nProperties(s=>s.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var s,l;let d=this,p=(h,f,m)=>m?.context&&m.key&&i(h,f,m)?{...m,message:this.i18n({context:m.context,key:m.key,custom:m.custom,...h})}:m;(s=this[Yp])===null||s===void 0||s.forEach((h,f)=>d[f]=p(h,f,d[f])),(l=this[Xp])===null||l===void 0||l.forEach((h,f)=>{var m;return d[f]=(m=d[f])===null||m===void 0?void 0:m.map(b=>p(h,f,b))})}updateI18nProperties(i){var s;(s=this[Wl])===null||s===void 0||s.forEach((l,d)=>{i(l,d)&&(this[d]=this.i18n(l))})}addI18nMessages(i,s,l){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,s,l)}addI18nContext(i,s,l){let d=(typeof i=="string"?i:i.name).toLowerCase();l=typeof i=="string"?l:i.custom,this[mn].set(d,{isCustomContext:l}),this[Vr].has(d)||this[Vr].set(d,this.getI18nService(l).subscribe(d,()=>this.onI18nUpdate(d))),this.getI18nService(l).prepareContext(d,s)}hasI18nContext(i){return this[mn].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[mn].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Vr].forEach(i=>i()),this[Vr].clear()}}return e=mn,o=Vr,qp([w({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),Hl=class extends gn(z){},yn=class extends gn(gt){};var Zr=function(t,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(a<3?s(i):a>3?s(e,o,i):s(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},we=class extends yn{constructor(){super(),this.editorMode=!1,this.addStore(_)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":W:Z`
434
434
  <span class="ft-i18n">
435
435
  ${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
436
436
  </span>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-reader-saved-bookmarks",
3
- "version": "1.3.46",
3
+ "version": "1.3.48",
4
4
  "description": "Display the list of saved bookmarks",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,11 +19,11 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-wc-utils": "1.3.46",
22
+ "@fluid-topics/ft-wc-utils": "1.3.48",
23
23
  "lit": "3.1.0"
24
24
  },
25
25
  "devDependencies": {
26
- "@fluid-topics/ft-wc-test-utils": "1.3.46"
26
+ "@fluid-topics/ft-wc-test-utils": "1.3.48"
27
27
  },
28
- "gitHead": "d6cf25d6ed0dead8c7aff4f94a493c35d12f1392"
28
+ "gitHead": "39b6d455dce42316360287db7fb6a16e0d3eeb93"
29
29
  }