@fluid-topics/ft-search-language-filter 1.3.61 → 1.3.62
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.
|
@@ -1308,7 +1308,7 @@ If it declares any Font Awesome CSS pseudo-elements, they will not be rendered a
|
|
|
1308
1308
|
`;var ma=E(P()),gh="ft-app-info",wt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};wt.eventName="authentication-change";var yh={session:(e,t)=>{(0,ma.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>R.dispatchEvent(new wt(t.payload)),0))}},R=ma.FtReduxStore.get({name:gh,reducers:yh,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var Wn=E(P());var _t=class e{static get(t){let{baseUrl:a,apiIntegrationIdentifier:o}=R.getState(),n=t??o;if(a&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(a,n,!0)}static await(t){return new Promise(a=>{let o=e.get(t);if(o)a(o);else{let n=R.subscribe(()=>{o=e.get(t),o&&(n(),a(o))})}})}};var ga=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:_t.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):_t.await()}};var ge=class extends ga{constructor(t=!0,a){var o;super(a),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[f])=>l.localeCompare(f)));let n=this.constructor;n.commonCache=(o=n.commonCache)!==null&&o!==void 0?o:new Wn.CacheRegistry,this.cache=t?n.commonCache:new Wn.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((a,o)=>0|31*a+o.charCodeAt(0),0))}};var ya=class extends ge{async listMyBookmarks(){let t=R.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var $n=class{addCommand(t,a=!1){R.commands.add(t,a)}consumeCommand(t){return R.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new $n;var Ee=E(P());var E2,rr=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},bh=Symbol("clearAfterUnitTest"),ba=class extends(0,Ee.withEventBus)(ge){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[E2]=()=>{this.defaultMessages={},this.cache=new Ee.CacheRegistry,this.listeners={}},this.currentUiLocale=R.getState().uiLocale,R.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=R.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let a=t.name.toLowerCase();this.cache.setFinal(a,t),this.notify(a)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,a){var o;if(t=t.toLowerCase(),a&&Object.keys(a).length>0){let n={...(o=this.defaultMessages[t])!==null&&o!==void 0?o:{},...a};(0,Ee.deepEqual)(this.defaultMessages[t],n)||(this.defaultMessages[t]=n,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var a,o;return this.fetchContext(t),(o=(a=this.cache.getNow(t))===null||a===void 0?void 0:a.messages)!==null&&o!==void 0?o:{}}resolveRawMessage(t,a){let o=t.toLowerCase();return this.resolveContext(o)[a]}resolveMessage(t,a,...o){var n;let i=t.toLowerCase(),s=this.resolveContext(i);return new Ee.ParametrizedLabelResolver((n=this.defaultMessages[i])!==null&&n!==void 0?n:{},s).resolve(a,...o)}async fetchContext(t){let a=!this.cache.has(t),o;try{o=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),a&&await this.notify(t)}catch(n){!(n instanceof Ee.CanceledPromiseError)&&a&&console.error(n)}return o}subscribe(t,a){var o;return t=t.toLowerCase(),this.listeners[t]=(o=this.listeners[t])!==null&&o!==void 0?o:new Set,this.listeners[t].add(a),()=>{var n;return(n=this.listeners[t])===null||n===void 0?void 0:n.delete(a)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new rr({loadedContexts:t})),this.dispatchEvent(new rr({loadedContexts:t})),await Promise.all(t.map(a=>this.notify(a,!1)))}async notify(t,a=!0){a&&(document.body.dispatchEvent(new rr({loadedContexts:[t]})),this.dispatchEvent(new rr({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(o=>(0,Ee.delay)(0).then(()=>o()).catch(()=>null)))}};E2=bh;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends ba{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends ba{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var ar=window.FluidTopicsI18nService,va=window.FluidTopicsCustomI18nService;var L2=E(P()),jn=class{highlightHtml(t,a,o){(0,L2.highlightHtml)(t,a,o)}};window.FluidTopicsHighlightHtmlService=new jn;var xa=class extends ge{async listMySearches(){let{session:t}=R.getState();return x2(t,ae.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var A2=E(P());var Kn=class{isDate(t){var a,o,n,i;return(i=(n=((o=(a=R.getState().metadataConfiguration)===null||a===void 0?void 0:a.descriptors)!==null&&o!==void 0?o:[]).find(l=>l.key===t))===null||n===void 0?void 0:n.date)!==null&&i!==void 0?i:!1}format(t,a){var o,n,i;return A2.DateFormatter.format(t,(o=a?.locale)!==null&&o!==void 0?o:R.getState().uiLocale,(n=a?.longFormat)!==null&&n!==void 0?n:!1,(i=a?.withTime)!==null&&i!==void 0?i:!1)}};window.FluidTopicsDateService=new Kn;var O2=E(P());var zr=class{static get(t,a){var o,n;let i=R.getState(),{lang:s,region:l}=(n=(o=i.defaultLocales)===null||o===void 0?void 0:o.defaultContentLocale)!==null&&n!==void 0?n:{lang:"en",region:"US"};return new O2.SearchPlaceConverter(i.baseUrl,t??20,i.searchInAllLanguagesAllowed,a??`${s}-${l}`)}};var Vn=class{urlToSearchRequest(t){return zr.get().parse(t)}searchRequestToUrl(t){return zr.get().serialize(t)}};window.FluidTopicsUrlService=new Vn;var lt=E(P());var Mt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};Mt.eventName="change";var Zn=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let a=sessionStorage.getItem(this.itemName(t));return a?JSON.parse(a):void 0}set(t,a){sessionStorage.setItem(this.itemName(t),JSON.stringify(a))}},R2=new Zn;var Sa=class e extends lt.WithEventBus{static build(){return new e(window.history,R2,()=>window.location,!1)}constructor(t,a,o,n){var i,s;super(),this.history=t,this.historyStorage=a,this.windowLocation=o,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(s=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(n)}setCurrentState(t,a=!1){let o=a&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,o&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,lt.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Mt(this.currentItem())),0)}installProxies(){let t=a=>(o,n,[i,s,l])=>{let f=a(),p={...f===this.currentIndex?this.currentState:void 0,...i,index:f,href:typeof l=="string"?l:(l??this.windowLocation()).href};o.apply(n,[p,s,l]),this.setCurrentState(p,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.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(t){for(let a=this.history.length-1;a>=0;a--)t?this.states[a]=this.historyStorage.get(a):setTimeout(()=>this.states[a]=this.historyStorage.get(a),this.history.length-a)}updateCurrentState(t){var a;let o={...this.buildCurrentState(),...t,index:this.currentIndex,title:(a=t?.title)!==null&&a!==void 0?a:this.currentState.title};this.setCurrentState(o)}addHistoryChangeListener(t){this.addEventListener(Mt.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Mt.eventName,t)}currentItem(){return(0,lt.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,lt.deepCopy)(this.states[this.previousDifferentMajorPosition()])}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,lt.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var a;let o=(a=this.states[t])===null||a===void 0?void 0:a.majorStateId;if(!o)return t;let n=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,o);)this.hasState(i)&&(n=i),i++;return n}buildCurrentState(){var t,a;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(a=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&a!==void 0?a:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,a){var o;if(!this.hasState(t))return!1;let n=a??this.currentState.majorStateId,i=(o=this.states[t])===null||o===void 0?void 0:o.majorStateId;return i==null||i!=n}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Sa.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)});function N2(e,t){let{authenticationRequired:a,session:o}=R.getState();return a&&!o?.sessionAuthenticated?Promise.resolve(t):e()}var oe=function(e,t,a,o){var n=arguments.length,i=n<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,a):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,a,o);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(n<3?s(i):n>3?s(t,a,i):s(t,a))||i);return n>3&&i&&Object.defineProperty(t,a,i),i},Z=class extends Me.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=()=>_t.get(),this.authenticationRequired=!1,this.messageContexts=[],this.cache=new Me.CacheRegistry,this.cleanSessionDebouncer=new Me.Debouncer,this.reloadConfiguration=()=>{this.cache.clear("availableContentLocales"),this.updateAvailableContentLocales()}}render(){return w2.html`
|
|
1309
1309
|
<slot></slot>
|
|
1310
1310
|
`}connectedCallback(){super.connectedCallback(),R.addEventListener(wt.eventName,this.reloadConfiguration)}disconnectedCallback(){R.addEventListener(wt.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(t){var a,o,n,i,s,l,f;super.update(t),t.has("baseUrl")&&(R.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&R.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&R.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&R.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&R.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&R.actions.noCustom(this.noCustom),t.has("editorMode")&&R.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&R.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&R.actions.session(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(p=>ar.addContext(p)),t.has("openExternalDocumentInNewTab")&&R.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&R.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&R.actions.forcedOffline(this.forcedOffline),t.has("localesConfiguration")&&(R.actions.defaultLocales((a=this.localesConfiguration)===null||a===void 0?void 0:a.defaultLocales),R.actions.availableUiLocales((n=(o=this.localesConfiguration)===null||o===void 0?void 0:o.availableUiLocales)!==null&&n!==void 0?n:[]),R.actions.searchInAllLanguagesAllowed((s=(i=this.localesConfiguration)===null||i===void 0?void 0:i.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),t.has("authenticationRequired")&&R.actions.authenticationRequired(this.authenticationRequired),t.has("availableContentLocales")&&R.actions.availableContentLocales((f=(l=this.availableContentLocales)===null||l===void 0?void 0:l.contentLocales)!==null&&f!==void 0?f:[]),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 t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},t.idleTimeoutInMillis),t})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}async updateAvailableContentLocales(){this.availableContentLocales=await this.cache.get("availableContentLocales",()=>N2(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};Z.elementDefinitions={};Z.styles=C2;oe([(0,fe.property)()],Z.prototype,"baseUrl",void 0);oe([(0,fe.property)()],Z.prototype,"apiIntegrationIdentifier",void 0);oe([(0,fe.property)()],Z.prototype,"apiIntegrationAppVersion",void 0);oe([(0,fe.property)()],Z.prototype,"uiLocale",void 0);oe([(0,Me.jsonProperty)(null)],Z.prototype,"availableUiLocales",void 0);oe([(0,Me.jsonProperty)(null)],Z.prototype,"metadataConfiguration",void 0);oe([(0,fe.property)({type:Boolean})],Z.prototype,"editorMode",void 0);oe([(0,fe.property)({type:Boolean})],Z.prototype,"noCustom",void 0);oe([(0,fe.property)({type:Boolean})],Z.prototype,"openExternalDocumentInNewTab",void 0);oe([(0,fe.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],Z.prototype,"noCustomComponent",void 0);oe([(0,fe.property)({type:Boolean})],Z.prototype,"withManualResources",void 0);oe([(0,fe.property)({type:Boolean})],Z.prototype,"navigatorOnline",void 0);oe([(0,fe.property)({type:Boolean})],Z.prototype,"forcedOffline",void 0);oe([(0,fe.property)({type:Object})],Z.prototype,"apiProvider",void 0);oe([(0,fe.property)({type:Boolean})],Z.prototype,"authenticationRequired",void 0);oe([(0,Me.jsonProperty)([])],Z.prototype,"messageContexts",void 0);oe([(0,Me.jsonProperty)(void 0)],Z.prototype,"session",void 0);oe([(0,fe.state)()],Z.prototype,"localesConfiguration",void 0);oe([(0,fe.state)()],Z.prototype,"availableContentLocales",void 0);var vi=E(ie());function vh(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let a,o,n;if(Array.isArray(e)){if(a=e.length,a!=t.length)return!1;for(o=a;o--!==0;)if(!Ca(e[o],t[o]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o of e.entries())if(!t.has(o[0]))return!1;for(o of e.entries())if(!Ca(o[1],t.get(o[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o of e.entries())if(!t.has(o[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let i=s=>Object.keys(s).filter(l=>s[l]!=null);if(n=i(e),a=n.length,a!==i(t).length)return!1;for(o=a;o--!==0;)if(!Object.prototype.hasOwnProperty.call(t,n[o]))return!1;for(o=a;o--!==0;){let s=n[o];if(!Ca(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Ca(e,t){try{return vh(e,t)}catch{return!1}}function Ir(e,t){return!Ca(e,t)}function Ea(e,t){let a=o=>o[e]===!0;return o=>{if(a(o))return o;let n=t(o);return n[e]=!0,n}}var _2=E(ie(),1);var qn=e=>{let t=e??{};return(a,o)=>{var n;let i={hasChanged:Ir,attribute:!1,...t};(0,_2.property)(i)(a,o);let s=a.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(o,{selector:(n=t.selector)!==null&&n!==void 0?n:l=>l[o],store:t.store})}};var La=class{constructor(){this.queue=[]}add(t,a=!1){a&&this.clear(t.type),this.queue.push(t)}consume(t){let a=this.queue.find(o=>o.type===t);return a&&(this.queue=this.queue.filter(o=>o!==a)),a}clear(t){typeof t=="string"?this.queue=this.queue.filter(a=>a.type!==t):this.queue=this.queue.filter(a=>!t.test(a.type))}};var Tt=E(ie(),1);var M2=E(ie(),1);function T2(e,t){let a=()=>JSON.parse(JSON.stringify(e));return(0,M2.property)({type:Object,converter:{fromAttribute:o=>{if(o==null)return a();try{return JSON.parse(o)}catch{return a()}},toAttribute:o=>JSON.stringify(o)},hasChanged:Ir,...t??{}})}var Aa=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,a){return this.callbacks=[t],this.debounce(a)}queue(t,a){return this.callbacks.push(t),this.debounce(a)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((a,o)=>{this.resolvePromise=a,this.rejectPromise=o})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,a;let o=[...this.callbacks];this.callbacks=[];let n=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,i=(a=this.resolvePromise)!==null&&a!==void 0?a:()=>null;this.clearPromise();for(let s of o)try{await s()}catch(l){n(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 I2=E(Q(),1);var Oa=globalThis,xh=Oa.ShadowRoot&&(Oa.ShadyCSS===void 0||Oa.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,gS=Symbol();var z2=(e,t)=>{if(xh)e.adoptedStyleSheets=t.map(a=>a instanceof CSSStyleSheet?a:a.styleSheet);else for(let a of t){let o=document.createElement("style"),n=Oa.litNonce;n!==void 0&&o.setAttribute("nonce",n),o.textContent=a.cssText,e.appendChild(o)}};var Ra=class extends I2.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([n,i])=>t.registry.define(n,i)));let a={...t.shadowRootOptions,customElements:t.registry},o=this.renderOptions.creationScope=this.attachShadow(a);return z2(o,t.elementStyles),o}};function P2(e,t,...a){var o;let n=e.querySelector(t);for(let i of a)n=(o=n?.shadowRoot)===null||o===void 0?void 0:o.querySelector(i);return n}var nr=function(e,t,a,o){var n=arguments.length,i=n<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,a):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,a,o);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(n<3?s(i):n>3?s(t,a,i):s(t,a))||i);return n>3&&i&&Object.defineProperty(t,a,i),i},B2,k2=Symbol("constructorPrototype"),D2=Symbol("constructorName"),H2=Symbol("exportpartsDebouncer"),U2=Symbol("dynamicDependenciesLoaded"),or=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};or.eventName="exportparts-updated";var De=class extends Ra{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[B2]=new Aa(5),this.scheduleExportpartsUpdate=()=>{var t,a,o;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(o=(a=this.exportpartsPrefixes)===null||a===void 0?void 0:a.length)!==null&&o!==void 0&&o)&&this[H2].run(()=>{var n,i;!((n=this.exportpartsPrefix)===null||n===void 0)&&n.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[D2]=this.constructor.name,this[k2]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[D2]&&Object.setPrototypeOf(this,this[k2])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let a=this.constructor;a[U2]||(a[U2]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(or.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(or.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new or)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:a,selector:o,shadowPath:n}=this.elementToFocus;if(o!=null){let i=[...n??[],o];a=P2(this.shadowRoot,...i)}a?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||a?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var a,o,n;if(((o=(a=this.shadowRoot)===null||a===void 0?void 0:a.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&o!==void 0?o:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((n=this.customStylesheet)!==null&&n!==void 0?n:"")}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(t){var a,o,n,i,s,l;let f=b=>b!=null&&b.trim().length>0,p=t.filter(f).map(b=>b.trim());if(p.length===0){this.exportparts=void 0;return}let g=new Set;for(let b of(o=(a=this.shadowRoot)===null||a===void 0?void 0:a.querySelectorAll("[part],[exportparts]"))!==null&&o!==void 0?o:[]){let v=(i=(n=b.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&i!==void 0?i:[],S=(l=(s=b.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(_=>_.split(":")[1]))!==null&&l!==void 0?l:[],L=[...v,...S].filter(f).map(_=>_.trim());for(let _ of L)g.add(_)}if(g.size===0){this.exportparts=void 0;return}let m=[...g.values()].flatMap(b=>p.map(v=>`${b}:${v}--${b}`));this.exportparts=[...this.part,...m].join(", ")}};B2=H2;nr([(0,Tt.property)()],De.prototype,"exportpartsPrefix",void 0);nr([T2([])],De.prototype,"exportpartsPrefixes",void 0);nr([(0,Tt.property)({reflect:!0})],De.prototype,"exportparts",void 0);nr([(0,Tt.property)()],De.prototype,"customStylesheet",void 0);nr([(0,Tt.property)()],De.prototype,"elementToFocus",void 0);nr([(0,Tt.state)()],De.prototype,"useAdoptedStyleSheets",void 0);function Na(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Pr=Symbol("internalReduxEventsUnsubscribers"),dt=Symbol("internalStoresUnsubscribers"),zt=Symbol("internalStores"),Sh=Ea(Symbol("withRedux"),function(e){var t,a,o;class n extends e{constructor(){super(...arguments),this[t]=new Map,this[a]=new Map,this[o]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(l=>s.has(l))&&this.updateFromStores()}getUnnamedStore(){if(this[zt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[zt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[zt].get(s)}addStore(s,l){var f;l=(f=l??s.name)!==null&&f!==void 0?f:"default-store",this.unsubscribeFromStore(l),this[zt].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[zt].delete(l)}setupStores(){this.unsubscribeFromStores(),this[zt].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let f=this.constructor.getPropertyOptions(l);if(!f?.attribute||!this.hasAttribute(typeof f?.attribute=="string"?f.attribute:l)){let p=this.getStore(s.store);p&&(s.store?this[dt].has(s.store):this[dt].size>0)&&(this[l]=s.selector(p.getState(),this))}})}subscribeToStore(s,l){var f;this[dt].set(s,l.subscribe(()=>this.updateFromStores())),this[Pr].set(s,[]),Na(l)&&l.eventBus&&((f=this.reduxConstructor.reduxEventListeners)===null||f===void 0||f.forEach((p,g)=>{if(typeof this[g]=="function"&&(!p.store||l.name===p.store)){let m=b=>this[g](b);l.addEventListener(p.eventName,m),this[Pr].get(s).push(()=>l.removeEventListener(p.eventName,m))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[dt].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[dt].has(s)&&this[dt].get(s)(),this[dt].delete(s),(l=this[Pr].get(s))===null||l===void 0||l.forEach(f=>f()),this[Pr].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=dt,a=zt,o=Pr,n.reduxProperties=new Map,n.reduxReactiveProperties=new Set,n.reduxEventListeners=new Map,n}),G2=class extends Sh(De){};function Le(e){for(var t=arguments.length,a=Array(t>1?t-1:0),o=1;o<t;o++)a[o-1]=arguments[o];if(0)var n,i;throw Error("[Immer] minified error nr: "+e+(a.length?" "+a.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function qe(e){return!!e&&!!e[Y]}function Te(e){var t;return!!e&&(function(a){if(!a||typeof a!="object")return!1;var o=Object.getPrototypeOf(a);if(o===null)return!0;var n=Object.hasOwnProperty.call(o,"constructor")&&o.constructor;return n===Object||typeof n=="function"&&Function.toString.call(n)===wh}(e)||Array.isArray(e)||!!e[Z2]||!!(!((t=e.constructor)===null||t===void 0)&&t[Z2])||oi(e)||ni(e))}function It(e,t,a){a===void 0&&(a=!1),cr(e)===0?(a?Object.keys:sr)(e).forEach(function(o){a&&typeof o=="symbol"||t(o,e[o],e)}):e.forEach(function(o,n){return t(n,o,e)})}function cr(e){var t=e[Y];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:oi(e)?2:ni(e)?3:0}function ir(e,t){return cr(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Ch(e,t){return cr(e)===2?e.get(t):e[t]}function q2(e,t,a){var o=cr(e);o===2?e.set(t,a):o===3?e.add(a):e[t]=a}function Y2(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function oi(e){return Rh&&e instanceof Map}function ni(e){return Nh&&e instanceof Set}function ft(e){return e.o||e.t}function ii(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=J2(e);delete t[Y];for(var a=sr(t),o=0;o<a.length;o++){var n=a[o],i=t[n];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[n]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[n]})}return Object.create(Object.getPrototypeOf(e),t)}function si(e,t){return t===void 0&&(t=!1),ci(e)||qe(e)||!Te(e)||(cr(e)>1&&(e.set=e.add=e.clear=e.delete=Eh),Object.freeze(e),t&&It(e,function(a,o){return si(o,!0)},!0)),e}function Eh(){Le(2)}function ci(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Ue(e){var t=ai[e];return t||Le(18,e),t}function Lh(e,t){ai[e]||(ai[e]=t)}function ei(){return Dr}function Yn(e,t){t&&(Ue("Patches"),e.u=[],e.s=[],e.v=t)}function wa(e){ti(e),e.p.forEach(Ah),e.p=null}function ti(e){e===Dr&&(Dr=e.l)}function F2(e){return Dr={p:[],l:Dr,h:e,m:!0,_:0}}function Ah(e){var t=e[Y];t.i===0||t.i===1?t.j():t.g=!0}function Xn(e,t){t._=t.p.length;var a=t.p[0],o=e!==void 0&&e!==a;return t.h.O||Ue("ES5").S(t,e,o),o?(a[Y].P&&(wa(t),Le(4)),Te(e)&&(e=_a(t,e),t.l||Ma(t,e)),t.u&&Ue("Patches").M(a[Y].t,e,t.u,t.s)):e=_a(t,a,[]),wa(t),t.u&&t.v(t.u,t.s),e!==Q2?e:void 0}function _a(e,t,a){if(ci(t))return t;var o=t[Y];if(!o)return It(t,function(l,f){return W2(e,o,t,l,f,a)},!0),t;if(o.A!==e)return t;if(!o.P)return Ma(e,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var n=o.i===4||o.i===5?o.o=ii(o.k):o.o,i=n,s=!1;o.i===3&&(i=new Set(n),n.clear(),s=!0),It(i,function(l,f){return W2(e,o,n,l,f,a,s)}),Ma(e,n,!1),a&&e.u&&Ue("Patches").N(o,a,e.u,e.s)}return o.o}function W2(e,t,a,o,n,i,s){if(qe(n)){var l=_a(e,n,i&&t&&t.i!==3&&!ir(t.R,o)?i.concat(o):void 0);if(q2(a,o,l),!qe(l))return;e.m=!1}else s&&a.add(n);if(Te(n)&&!ci(n)){if(!e.h.D&&e._<1)return;_a(e,n),t&&t.A.l||Ma(e,n)}}function Ma(e,t,a){a===void 0&&(a=!1),!e.l&&e.h.D&&e.m&&si(t,a)}function Qn(e,t){var a=e[Y];return(a?ft(a):e)[t]}function $2(e,t){if(t in e)for(var a=Object.getPrototypeOf(e);a;){var o=Object.getOwnPropertyDescriptor(a,t);if(o)return o;a=Object.getPrototypeOf(a)}}function ut(e){e.P||(e.P=!0,e.l&&ut(e.l))}function Jn(e){e.o||(e.o=ii(e.t))}function ri(e,t,a){var o=oi(t)?Ue("MapSet").F(t,a):ni(t)?Ue("MapSet").T(t,a):e.O?function(n,i){var s=Array.isArray(n),l={i:s?1:0,A:i?i.A:ei(),P:!1,I:!1,R:{},l:i,t:n,k:null,o:null,j:null,C:!1},f=l,p=Ur;s&&(f=[l],p=kr);var g=Proxy.revocable(f,p),m=g.revoke,b=g.proxy;return l.k=b,l.j=m,b}(t,a):Ue("ES5").J(t,a);return(a?a.A:ei()).p.push(o),o}function Oh(e){return qe(e)||Le(22,e),function t(a){if(!Te(a))return a;var o,n=a[Y],i=cr(a);if(n){if(!n.P&&(n.i<4||!Ue("ES5").K(n)))return n.t;n.I=!0,o=j2(a,i),n.I=!1}else o=j2(a,i);return It(o,function(s,l){n&&Ch(n.t,s)===l||q2(o,s,t(l))}),i===3?new Set(o):o}(e)}function j2(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return ii(e)}function X2(){function e(s,l){var f=i[s];return f?f.enumerable=l:i[s]=f={configurable:!0,enumerable:l,get:function(){var p=this[Y];return Ur.get(p,s)},set:function(p){var g=this[Y];Ur.set(g,s,p)}},f}function t(s){for(var l=s.length-1;l>=0;l--){var f=s[l][Y];if(!f.P)switch(f.i){case 5:o(f)&&ut(f);break;case 4:a(f)&&ut(f)}}}function a(s){for(var l=s.t,f=s.k,p=sr(f),g=p.length-1;g>=0;g--){var m=p[g];if(m!==Y){var b=l[m];if(b===void 0&&!ir(l,m))return!0;var v=f[m],S=v&&v[Y];if(S?S.t!==b:!Y2(v,b))return!0}}var L=!!l[Y];return p.length!==sr(l).length+(L?0:1)}function o(s){var l=s.k;if(l.length!==s.t.length)return!0;var f=Object.getOwnPropertyDescriptor(l,l.length-1);if(f&&!f.get)return!0;for(var p=0;p<l.length;p++)if(!l.hasOwnProperty(p))return!0;return!1}function n(s){s.g&&Le(3,JSON.stringify(ft(s)))}var i={};Lh("ES5",{J:function(s,l){var f=Array.isArray(s),p=function(m,b){if(m){for(var v=Array(b.length),S=0;S<b.length;S++)Object.defineProperty(v,""+S,e(S,!0));return v}var L=J2(b);delete L[Y];for(var _=sr(L),N=0;N<_.length;N++){var M=_[N];L[M]=e(M,m||!!L[M].enumerable)}return Object.create(Object.getPrototypeOf(b),L)}(f,s),g={i:f?5:4,A:l?l.A:ei(),P:!1,I:!1,R:{},l,t:s,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,Y,{value:g,writable:!0}),p},S:function(s,l,f){f?qe(l)&&l[Y].A===s&&t(s.p):(s.u&&function p(g){if(g&&typeof g=="object"){var m=g[Y];if(m){var b=m.t,v=m.k,S=m.R,L=m.i;if(L===4)It(v,function(H){H!==Y&&(b[H]!==void 0||ir(b,H)?S[H]||p(v[H]):(S[H]=!0,ut(m)))}),It(b,function(H){v[H]!==void 0||ir(v,H)||(S[H]=!1,ut(m))});else if(L===5){if(o(m)&&(ut(m),S.length=!0),v.length<b.length)for(var _=v.length;_<b.length;_++)S[_]=!1;else for(var N=b.length;N<v.length;N++)S[N]=!0;for(var M=Math.min(v.length,b.length),U=0;U<M;U++)v.hasOwnProperty(U)||(S[U]=!0),S[U]===void 0&&p(v[U])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?a(s):o(s)}})}var K2,Dr,li=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Rh=typeof Map<"u",Nh=typeof Set<"u",V2=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Q2=li?Symbol.for("immer-nothing"):((K2={})["immer-nothing"]=!0,K2),Z2=li?Symbol.for("immer-draftable"):"__$immer_draftable",Y=li?Symbol.for("immer-state"):"__$immer_state";var wh=""+Object.prototype.constructor,sr=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,J2=Object.getOwnPropertyDescriptors||function(e){var t={};return sr(e).forEach(function(a){t[a]=Object.getOwnPropertyDescriptor(e,a)}),t},ai={},Ur={get:function(e,t){if(t===Y)return e;var a=ft(e);if(!ir(a,t))return function(n,i,s){var l,f=$2(i,s);return f?"value"in f?f.value:(l=f.get)===null||l===void 0?void 0:l.call(n.k):void 0}(e,a,t);var o=a[t];return e.I||!Te(o)?o:o===Qn(e.t,t)?(Jn(e),e.o[t]=ri(e.A.h,o,e)):o},has:function(e,t){return t in ft(e)},ownKeys:function(e){return Reflect.ownKeys(ft(e))},set:function(e,t,a){var o=$2(ft(e),t);if(o?.set)return o.set.call(e.k,a),!0;if(!e.P){var n=Qn(ft(e),t),i=n?.[Y];if(i&&i.t===a)return e.o[t]=a,e.R[t]=!1,!0;if(Y2(a,n)&&(a!==void 0||ir(e.t,t)))return!0;Jn(e),ut(e)}return e.o[t]===a&&(a!==void 0||t in e.o)||Number.isNaN(a)&&Number.isNaN(e.o[t])||(e.o[t]=a,e.R[t]=!0),!0},deleteProperty:function(e,t){return Qn(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,Jn(e),ut(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var a=ft(e),o=Reflect.getOwnPropertyDescriptor(a,t);return o&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:o.enumerable,value:a[t]}},defineProperty:function(){Le(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Le(12)}},kr={};It(Ur,function(e,t){kr[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),kr.deleteProperty=function(e,t){return kr.set.call(this,e,t,void 0)},kr.set=function(e,t,a){return Ur.set.call(this,e[0],t,a,e[0])};var _h=function(){function e(a){var o=this;this.O=V2,this.D=!0,this.produce=function(n,i,s){if(typeof n=="function"&&typeof i!="function"){var l=i;i=n;var f=o;return function(L){var _=this;L===void 0&&(L=l);for(var N=arguments.length,M=Array(N>1?N-1:0),U=1;U<N;U++)M[U-1]=arguments[U];return f.produce(L,function(H){var W;return(W=i).call.apply(W,[_,H].concat(M))})}}var p;if(typeof i!="function"&&Le(6),s!==void 0&&typeof s!="function"&&Le(7),Te(n)){var g=F2(o),m=ri(o,n,void 0),b=!0;try{p=i(m),b=!1}finally{b?wa(g):ti(g)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(L){return Yn(g,s),Xn(L,g)},function(L){throw wa(g),L}):(Yn(g,s),Xn(p,g))}if(!n||typeof n!="object"){if((p=i(n))===void 0&&(p=n),p===Q2&&(p=void 0),o.D&&si(p,!0),s){var v=[],S=[];Ue("Patches").M(n,p,v,S),s(v,S)}return p}Le(21,n)},this.produceWithPatches=function(n,i){if(typeof n=="function")return function(p){for(var g=arguments.length,m=Array(g>1?g-1:0),b=1;b<g;b++)m[b-1]=arguments[b];return o.produceWithPatches(p,function(v){return n.apply(void 0,[v].concat(m))})};var s,l,f=o.produce(n,i,function(p,g){s=p,l=g});return typeof Promise<"u"&&f instanceof Promise?f.then(function(p){return[p,s,l]}):[f,s,l]},typeof a?.useProxies=="boolean"&&this.setUseProxies(a.useProxies),typeof a?.autoFreeze=="boolean"&&this.setAutoFreeze(a.autoFreeze)}var t=e.prototype;return t.createDraft=function(a){Te(a)||Le(8),qe(a)&&(a=Oh(a));var o=F2(this),n=ri(this,a,void 0);return n[Y].C=!0,ti(o),n},t.finishDraft=function(a,o){var n=a&&a[Y],i=n.A;return Yn(i,o),Xn(void 0,i)},t.setAutoFreeze=function(a){this.D=a},t.setUseProxies=function(a){a&&!V2&&Le(20),this.O=a},t.applyPatches=function(a,o){var n;for(n=o.length-1;n>=0;n--){var i=o[n];if(i.path.length===0&&i.op==="replace"){a=i.value;break}}n>-1&&(o=o.slice(n+1));var s=Ue("Patches").$;return qe(a)?s(a,o):this.produce(a,function(l){return s(l,o)})},e}(),ve=new _h,Mh=ve.produce,MS=ve.produceWithPatches.bind(ve),TS=ve.setAutoFreeze.bind(ve),zS=ve.setUseProxies.bind(ve),IS=ve.applyPatches.bind(ve),PS=ve.createDraft.bind(ve),kS=ve.finishDraft.bind(ve),Ta=Mh;function Pt(e){"@babel/helpers - typeof";return Pt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pt(e)}function e4(e,t){if(Pt(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var o=a.call(e,t||"default");if(Pt(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function t4(e){var t=e4(e,"string");return Pt(t)=="symbol"?t:t+""}function r4(e,t,a){return(t=t4(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function a4(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),a.push.apply(a,o)}return a}function di(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?a4(Object(a),!0).forEach(function(o){r4(e,o,a[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):a4(Object(a)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(a,o))})}return e}function pe(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 o4=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),fi=function(){return Math.random().toString(36).substring(7).split("").join(".")},za={INIT:"@@redux/INIT"+fi(),REPLACE:"@@redux/REPLACE"+fi(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+fi()}};function Th(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function ui(e,t,a){var o;if(typeof t=="function"&&typeof a=="function"||typeof a=="function"&&typeof arguments[3]=="function")throw new Error(pe(0));if(typeof t=="function"&&typeof a>"u"&&(a=t,t=void 0),typeof a<"u"){if(typeof a!="function")throw new Error(pe(1));return a(ui)(e,t)}if(typeof e!="function")throw new Error(pe(2));var n=e,i=t,s=[],l=s,f=!1;function p(){l===s&&(l=s.slice())}function g(){if(f)throw new Error(pe(3));return i}function m(L){if(typeof L!="function")throw new Error(pe(4));if(f)throw new Error(pe(5));var _=!0;return p(),l.push(L),function(){if(_){if(f)throw new Error(pe(6));_=!1,p();var M=l.indexOf(L);l.splice(M,1),s=null}}}function b(L){if(!Th(L))throw new Error(pe(7));if(typeof L.type>"u")throw new Error(pe(8));if(f)throw new Error(pe(9));try{f=!0,i=n(i,L)}finally{f=!1}for(var _=s=l,N=0;N<_.length;N++){var M=_[N];M()}return L}function v(L){if(typeof L!="function")throw new Error(pe(10));n=L,b({type:za.REPLACE})}function S(){var L,_=m;return L={subscribe:function(M){if(typeof M!="object"||M===null)throw new Error(pe(11));function U(){M.next&&M.next(g())}U();var H=_(U);return{unsubscribe:H}}},L[o4]=function(){return this},L}return b({type:za.INIT}),o={dispatch:b,subscribe:m,getState:g,replaceReducer:v},o[o4]=S,o}function zh(e){Object.keys(e).forEach(function(t){var a=e[t],o=a(void 0,{type:za.INIT});if(typeof o>"u")throw new Error(pe(12));if(typeof a(void 0,{type:za.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(pe(13))})}function n4(e){for(var t=Object.keys(e),a={},o=0;o<t.length;o++){var n=t[o];typeof e[n]=="function"&&(a[n]=e[n])}var i=Object.keys(a),s,l;try{zh(a)}catch(f){l=f}return function(p,g){if(p===void 0&&(p={}),l)throw l;if(0)var m;for(var b=!1,v={},S=0;S<i.length;S++){var L=i[S],_=a[L],N=p[L],M=_(N,g);if(typeof M>"u"){var U=g&&g.type;throw new Error(pe(14))}v[L]=M,b=b||M!==N}return b=b||i.length!==Object.keys(p).length,b?v:p}}function lr(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return t.length===0?function(o){return o}:t.length===1?t[0]:t.reduce(function(o,n){return function(){return o(n.apply(void 0,arguments))}})}function i4(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return function(o){return function(){var n=o.apply(void 0,arguments),i=function(){throw new Error(pe(15))},s={getState:n.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=t.map(function(f){return f(s)});return i=lr.apply(void 0,l)(n.dispatch),di(di({},n),{},{dispatch:i})}}}function s4(e){var t=function(o){var n=o.dispatch,i=o.getState;return function(s){return function(l){return typeof l=="function"?l(n,i,e):s(l)}}};return t}var c4=s4();c4.withExtraArgument=s4;var pi=c4;var p4=function(){var e=function(t,a){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,n){o.__proto__=n}||function(o,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(o[i]=n[i])},e(t,a)};return function(t,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");e(t,a);function o(){this.constructor=t}t.prototype=a===null?Object.create(a):(o.prototype=a.prototype,new o)}}(),Ih=function(e,t){var a={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,n,i,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(p){return function(g){return f([p,g])}}function f(p){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,n&&(i=p[0]&2?n.return:p[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,p[1])).done)return i;switch(n=0,i&&(p=[p[0]&2,i.value]),p[0]){case 0:case 1:i=p;break;case 4:return a.label++,{value:p[1],done:!1};case 5:a.label++,n=p[1],p=[0];continue;case 7:p=a.ops.pop(),a.trys.pop();continue;default:if(i=a.trys,!(i=i.length>0&&i[i.length-1])&&(p[0]===6||p[0]===2)){a=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]<i[3])){a.label=p[1];break}if(p[0]===6&&a.label<i[1]){a.label=i[1],i=p;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(p);break}i[2]&&a.ops.pop(),a.trys.pop();continue}p=t.call(e,a)}catch(g){p=[6,g],n=0}finally{o=i=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},dr=function(e,t){for(var a=0,o=t.length,n=e.length;a<o;a++,n++)e[n]=t[a];return e},Ph=Object.defineProperty,kh=Object.defineProperties,Dh=Object.getOwnPropertyDescriptors,l4=Object.getOwnPropertySymbols,Uh=Object.prototype.hasOwnProperty,Bh=Object.prototype.propertyIsEnumerable,d4=function(e,t,a){return t in e?Ph(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a},pt=function(e,t){for(var a in t||(t={}))Uh.call(t,a)&&d4(e,a,t[a]);if(l4)for(var o=0,n=l4(t);o<n.length;o++){var a=n[o];Bh.call(t,a)&&d4(e,a,t[a])}return e},hi=function(e,t){return kh(e,Dh(t))},Hh=function(e,t,a){return new Promise(function(o,n){var i=function(f){try{l(a.next(f))}catch(p){n(p)}},s=function(f){try{l(a.throw(f))}catch(p){n(p)}},l=function(f){return f.done?o(f.value):Promise.resolve(f.value).then(i,s)};l((a=a.apply(e,t)).next())})};var Gh=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?lr:lr.apply(null,arguments)},eC=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function Fh(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var a=t;Object.getPrototypeOf(a)!==null;)a=Object.getPrototypeOf(a);return t===a}var Wh=function(e){p4(t,e);function t(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];var n=e.apply(this,a)||this;return Object.setPrototypeOf(n,t.prototype),n}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];return e.prototype.concat.apply(this,a)},t.prototype.prepend=function(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];return a.length===1&&Array.isArray(a[0])?new(t.bind.apply(t,dr([void 0],a[0].concat(this)))):new(t.bind.apply(t,dr([void 0],a.concat(this))))},t}(Array),$h=function(e){p4(t,e);function t(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];var n=e.apply(this,a)||this;return Object.setPrototypeOf(n,t.prototype),n}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];return e.prototype.concat.apply(this,a)},t.prototype.prepend=function(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];return a.length===1&&Array.isArray(a[0])?new(t.bind.apply(t,dr([void 0],a[0].concat(this)))):new(t.bind.apply(t,dr([void 0],a.concat(this))))},t}(Array);function yi(e){return Te(e)?Ta(e,function(){}):e}function jh(e){return typeof e=="boolean"}function Kh(){return function(t){return Vh(t)}}function Vh(e){e===void 0&&(e={});var t=e.thunk,a=t===void 0?!0:t,o=e.immutableCheck,n=o===void 0?!0:o,i=e.serializableCheck,s=i===void 0?!0:i,l=new Wh;if(a&&(jh(a)?l.push(pi):l.push(pi.withExtraArgument(a.extraArgument))),0){if(n)var f;if(s)var p}return l}var mi=!0;function h4(e){var t=Kh(),a=e||{},o=a.reducer,n=o===void 0?void 0:o,i=a.middleware,s=i===void 0?t():i,l=a.devTools,f=l===void 0?!0:l,p=a.preloadedState,g=p===void 0?void 0:p,m=a.enhancers,b=m===void 0?void 0:m,v;if(typeof n=="function")v=n;else if(Fh(n))v=n4(n);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 S=s;if(typeof S=="function"&&(S=S(t),!mi&&!Array.isArray(S)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!mi&&S.some(function(H){return typeof H!="function"}))throw new Error("each middleware provided to configureStore must be a function");var L=i4.apply(void 0,S),_=lr;f&&(_=Gh(pt({trace:!mi},typeof f=="object"&&f)));var N=new $h(L),M=N;Array.isArray(b)?M=dr([L],b):typeof b=="function"&&(M=b(N));var U=_.apply(void 0,M);return ui(v,g,U)}function ht(e,t){function a(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];if(t){var i=t.apply(void 0,o);if(!i)throw new Error("prepareAction did not return an object");return pt(pt({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:o[0]}}return a.toString=function(){return""+e},a.type=e,a.match=function(o){return o.type===e},a}function m4(e){var t={},a=[],o,n={addCase:function(i,s){var l=typeof i=="string"?i:i.type;if(l in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[l]=s,n},addMatcher:function(i,s){return a.push({matcher:i,reducer:s}),n},addDefaultCase:function(i){return o=i,n}};return e(n),[t,a,o]}function Zh(e){return typeof e=="function"}function qh(e,t,a,o){a===void 0&&(a=[]);var n=typeof t=="function"?m4(t):[t,a,o],i=n[0],s=n[1],l=n[2],f;if(Zh(e))f=function(){return yi(e())};else{var p=yi(e);f=function(){return p}}function g(m,b){m===void 0&&(m=f());var v=dr([i[b.type]],s.filter(function(S){var L=S.matcher;return L(b)}).map(function(S){var L=S.reducer;return L}));return v.filter(function(S){return!!S}).length===0&&(v=[l]),v.reduce(function(S,L){if(L)if(qe(S)){var _=S,N=L(_,b);return N===void 0?S:N}else{if(Te(S))return Ta(S,function(M){return L(M,b)});var N=L(S,b);if(N===void 0){if(S===null)return S;throw Error("A case reducer on a non-draftable value must not return undefined")}return N}return S},m)}return g.getInitialState=f,g}function Yh(e,t){return e+"/"+t}function g4(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var a=typeof e.initialState=="function"?e.initialState:yi(e.initialState),o=e.reducers||{},n=Object.keys(o),i={},s={},l={};n.forEach(function(g){var m=o[g],b=Yh(t,g),v,S;"reducer"in m?(v=m.reducer,S=m.prepare):v=m,i[g]=v,s[b]=v,l[g]=S?ht(b,S):ht(b)});function f(){var g=typeof e.extraReducers=="function"?m4(e.extraReducers):[e.extraReducers],m=g[0],b=m===void 0?{}:m,v=g[1],S=v===void 0?[]:v,L=g[2],_=L===void 0?void 0:L,N=pt(pt({},b),s);return qh(a,function(M){for(var U in N)M.addCase(U,N[U]);for(var H=0,W=S;H<W.length;H++){var he=W[H];M.addMatcher(he.matcher,he.reducer)}_&&M.addDefaultCase(_)})}var p;return{name:t,reducer:function(g,m){return p||(p=f()),p(g,m)},actions:l,caseReducers:i,getInitialState:function(){return p||(p=f()),p.getInitialState()}}}var Xh="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Qh=function(e){e===void 0&&(e=21);for(var t="",a=e;a--;)t+=Xh[Math.random()*64|0];return t},Jh=["name","message","stack","code"],gi=function(){function e(t,a){this.payload=t,this.meta=a}return e}(),f4=function(){function e(t,a){this.payload=t,this.meta=a}return e}(),em=function(e){if(typeof e=="object"&&e!==null){for(var t={},a=0,o=Jh;a<o.length;a++){var n=o[a];typeof e[n]=="string"&&(t[n]=e[n])}return t}return{message:String(e)}},oC=function(){function e(t,a,o){var n=ht(t+"/fulfilled",function(g,m,b,v){return{payload:g,meta:hi(pt({},v||{}),{arg:b,requestId:m,requestStatus:"fulfilled"})}}),i=ht(t+"/pending",function(g,m,b){return{payload:void 0,meta:hi(pt({},b||{}),{arg:m,requestId:g,requestStatus:"pending"})}}),s=ht(t+"/rejected",function(g,m,b,v,S){return{payload:v,error:(o&&o.serializeError||em)(g||"Rejected"),meta:hi(pt({},S||{}),{arg:b,requestId:m,rejectedWithValue:!!v,requestStatus:"rejected",aborted:g?.name==="AbortError",condition:g?.name==="ConditionError"})}}),l=!1,f=typeof AbortController<"u"?AbortController:function(){function g(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return g.prototype.abort=function(){},g}();function p(g){return function(m,b,v){var S=o?.idGenerator?o.idGenerator(g):Qh(),L=new f,_,N=!1;function M(H){_=H,L.abort()}var U=function(){return Hh(this,null,function(){var H,W,he,Be,ne,He,kt;return Ih(this,function(y){switch(y.label){case 0:return y.trys.push([0,4,,5]),Be=(H=o?.condition)==null?void 0:H.call(o,g,{getState:b,extra:v}),rm(Be)?[4,Be]:[3,2];case 1:Be=y.sent(),y.label=2;case 2:if(Be===!1||L.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return N=!0,ne=new Promise(function(x,z){return L.signal.addEventListener("abort",function(){return z({name:"AbortError",message:_||"Aborted"})})}),m(i(S,g,(W=o?.getPendingMeta)==null?void 0:W.call(o,{requestId:S,arg:g},{getState:b,extra:v}))),[4,Promise.race([ne,Promise.resolve(a(g,{dispatch:m,getState:b,extra:v,requestId:S,signal:L.signal,abort:M,rejectWithValue:function(x,z){return new gi(x,z)},fulfillWithValue:function(x,z){return new f4(x,z)}})).then(function(x){if(x instanceof gi)throw x;return x instanceof f4?n(x.payload,S,g,x.meta):n(x,S,g)})])];case 3:return he=y.sent(),[3,5];case 4:return He=y.sent(),he=He instanceof gi?s(null,S,g,He.payload,He.meta):s(He,S,g),[3,5];case 5:return kt=o&&!o.dispatchConditionRejection&&s.match(he)&&he.meta.condition,kt||m(he),[2,he]}})})}();return Object.assign(U,{abort:M,requestId:S,arg:g,unwrap:function(){return U.then(tm)}})}}return Object.assign(p,{pending:i,rejected:s,fulfilled:n,typePrefix:t})}return e.withTypes=function(){return e},e}();function tm(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function rm(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var y4="listener",b4="completed",v4="cancelled",nC="task-"+v4,iC="task-"+b4,sC=y4+"-"+v4,cC=y4+"-"+b4;var bi="listenerMiddleware";var lC=ht(bi+"/add"),dC=ht(bi+"/removeAll"),fC=ht(bi+"/remove");var u4,uC=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(u4||(u4=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},am=function(e){return function(t){setTimeout(t,e)}},pC=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:am(10);X2();var om=Ea(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(a,o,n){this.eventBus.addEventListener(a,o,n)}dispatchEvent(a){return this.eventBus.dispatchEvent(a)}removeEventListener(a,o,n){this.eventBus.removeEventListener(a,o,n)}}}),Ia=class extends om(Object){};window.ftReduxStores||(window.ftReduxStores={});var x4=class e extends Ia{static get(t){var a;let o=typeof t=="string"?t:t.name,n=typeof t=="string"?void 0:t,i=window.ftReduxStores[o];if(Na(i))return i;if(n==null)return;let s=g4({...n,reducers:(a=n.reducers)!==null&&a!==void 0?a:{}}),l=h4({reducer:(f,p)=>p.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__")?{...f,...p.overwrites}:s.reducer(f,p)});return window.ftReduxStores[n.name]=new e(s,l,n.eventBus)}constructor(t,a,o){super(),this.reduxSlice=t,this.reduxStore=a,this.isFtReduxStore=!0,this.commands=new La;let n=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,l)=>{let f=s,p=i[f];return p?(...g)=>{let m=p(...g.map(n));return this.reduxStore.dispatch(m),m}:g=>{this.setState({[f]:n(g)})}}}),this.eventBus=o??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var Pa=class{static format(t,a,o,n){return window.moment?window.moment(t).locale(a).format(this.getMomentDateFormat(o,n)):this.getIntlDateTime(t,a,o,n)}static getMomentDateFormat(t,a){return t?a?"lll":"ll":a?"L LT":"L"}static getIntlDateTime(t,a,o,n){let i=typeof t=="string"?new Date(t):t,s=new Intl.DateTimeFormat(a,{dateStyle:o?"medium":"short"}).format(i);if(!n)return s;let l=new Intl.DateTimeFormat(a,{timeStyle:"short"}).format(i);return`${s} ${l}`}static getTimezoneAsString(){let t=o=>String(Math.floor(o)).padStart(2,"0"),a=new Date().getTimezoneOffset();return`${a<0?"+":"-"}${t(Math.abs(a)/60)}:${t(Math.abs(a)%60)}`}};var S4=E(P()),ka=function(e,t,a,o){var n=arguments.length,i=n<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,a):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,a,o);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(n<3?s(i):n>3?s(t,a,i):s(t,a))||i);return n>3&&i&&Object.defineProperty(t,a,i),i},BC=(0,S4.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...o){super(o),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(R)}dateFormatOptionsChanged(o){return o.has("metadataDescriptors")||o.has("useLongDateFormat")||o.has("useDateTimeFormat")||o.has("uiLocale")}getDateFormatter(o){var n,i;return((i=(n=this.metadataDescriptors.find(l=>l.key===o))===null||n===void 0?void 0:n.date)!==null&&i!==void 0?i:!1)?l=>Pa.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return ka([(0,vi.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),ka([(0,vi.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),ka([qn({store:R.name,selector:a=>{var o,n;return(n=(o=a.metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]}})],t.prototype,"metadataDescriptors",void 0),ka([qn({store:R.name})],t.prototype,"uiLocale",void 0),t});var Ba=E(P());var Da=class extends ge{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=R.getState().session;return!!t?.sessionAuthenticated}};var Ua=class extends ge{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=R.getState().session;return!!t?.sessionAuthenticated}};var nm="ft-user-assets",im={setAssetCount:(e,t)=>{let{userAssetType:a,count:o}=t.payload.assetCount;e.assetCounts.allAsset[a]=o},clearAssetCount:e=>{Object.values(Ce).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let a=t.payload.mapId;e.assetCounts.bookmarkByMap[a]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:a,mapId:o,asset:n}=t.payload;Si(e,a,[...xi(e,a),n]),C4(e,a,1,o),E4(e,n)},editAsset:(e,t)=>{let{assetType:a,asset:o}=t.payload;Si(e,a,xi(e,a).map(n=>n.id===o.id?o:n)),E4(e,o)},removeAsset:(e,t)=>{let{assetType:a,mapId:o,assetId:n}=t.payload;Si(e,a,xi(e,a).filter(i=>i.id!==n)),C4(e,a,-1,o)}},L4={[Ce.SEARCHES]:"savedSearches",[Ce.BOOKMARKS]:"bookmarks",[Ce.BOOKS]:void 0,[Ce.COLLECTIONS]:void 0},xi=(e,t)=>{var a;let o=L4[t];return o?(a=e[o])!==null&&a!==void 0?a:[]:[]},Si=(e,t,a)=>{let o=L4[t];o&&(e[o]=a)},C4=(e,t,a,o)=>{let n=e.assetCounts.allAsset[t];if(n!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,n+a),t===Ce.BOOKMARKS&&o)){let i=e.assetCounts.bookmarkByMap[o];e.assetCounts.bookmarkByMap[o]=Math.max(0,i+a)}},E4=(e,t)=>{let a=e.assetLabels.map(n=>n.title),o=t.labels.filter(n=>!a.includes(n)).map(n=>({title:n}));e.assetLabels.push(...o)},xe=Ba.FtReduxStore.get({name:nm,reducers:im,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Ce).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Ci=class{constructor(t=new Da,a=new Ua){this.assetCountsService=t,this.assetLabelsService=a,this.currentSession=R.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new ya,this.savedSearchesService=new xa,R.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:a}=R.getState();(0,Ba.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,a?.profile)||(this.currentSession=a,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),xe.actions.clearAssetCount(),xe.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),xe.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),xe.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();xe.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();xe.actions.assetLabels(t)}async loadAssetCount(t){let a=await this.assetCountsService.getUserAssetCount(t);a&&xe.actions.setAssetCount({assetCount:a})}async loadBookmarkByMapId(t){let a=await this.assetCountsService.getUserBookmarkCountByMap(t);a&&xe.actions.setBookmarkCountByMap({count:a.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let a=Object.keys(xe.getState().assetCounts.bookmarkByMap).length!==0;t===Ce.BOOKMARKS&&a&&xe.actions.clearBookmarkCountByMap(),xe.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let a=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;xe.actions.bookmarks(a)}}},sm=new Ci;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=sm);(0,A4.customElement)("ft-app-context")(Z);var Ei=class e extends Event{constructor(){super(e.eventName)}};Ei.eventName="search-context-clear-all-filters";var O4=function(e,t,a,o){var n=arguments.length,i=n<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,a):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,a,o);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(n<3?s(i):n>3?s(t,a,i):s(t,a))||i);return n>3&&i&&Object.defineProperty(t,a,i),i},Oi=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},R4=Symbol("registerInterval"),Li=Symbol("registerAttempts"),cm=40,lm=(0,fr.applyMixinOnce)(Symbol("toFtSearchComponent"),function(e){class t extends e{constructor(){super(...arguments),this.neededSearchRequests=[]}willUpdate(o){var n,i,s;super.willUpdate(o),o.has("neededSearchRequests")&&((n=this.stateManager)===null||n===void 0||n.unregisterComponent(this,(i=o.get("neededSearchRequests"))!==null&&i!==void 0?i:[]),(s=this.stateManager)===null||s===void 0||s.registerComponent(this,this.neededSearchRequests))}setSearchStateManager(o){this.clearStateManager(),this.stateManager=o,this.stateManager.registerComponent(this,this.neededSearchRequests),this.addStore(o.store,"search")}clearStateManager(){this.stateManager&&(this.stateManager.unregisterComponent(this,this.neededSearchRequests),this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[Li]=0,this.tryToRegisterToContext(),this[R4]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null||this[Li]>cm?window.clearInterval(this[R4]):(this[Li]++,this.dispatchEvent(new Oi))}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return O4([(0,Ai.state)()],t.prototype,"stateManager",void 0),O4([(0,Ai.state)({hasChanged:fr.hasChanged})],t.prototype,"neededSearchRequests",void 0),t}),Ha=class extends lm(fr.FtLitElementRedux){};var I4=E(P());var $a=E(Q()),ja=E(ie()),Ka=E(P());var N4=E(Q());var w4=N4.css`
|
|
1311
|
-
`;var ur=E(P());var T4=E(ie());var Ri=class{fromLocalizableLabel(t){return t.type=="PLAIN_TEXT"?{message:t.text}:{key:t.key,custom:t.type=="LOCALIZED_CUSTOM",context:t.context,message:t.key}}fromAttribute(t){if(t!=null)try{return JSON.parse(t)}catch{if(this.isI18nKey(t)){let[o
|
|
1311
|
+
`;var ur=E(P());var T4=E(ie());var Ri=class{fromLocalizableLabel(t){return t.type=="PLAIN_TEXT"?{message:t.text}:{key:t.key,custom:t.type=="LOCALIZED_CUSTOM",context:t.context,message:t.key}}fromAttribute(t){if(t!=null)try{return JSON.parse(t)}catch{if(this.isI18nKey(t)){let[a,o]=t.split(".");return{context:a,key:o,custom:a!=="officialContext",message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},_4=new Ri;var dm=function(e,t,a,o){var n=arguments.length,i=n<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,a):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,a,o);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(n<3?s(i):n>3?s(t,a,i):s(t,a))||i);return n>3&&i&&Object.defineProperty(t,a,i),i},fm=Symbol("i18nAttributes"),um=Symbol("i18nListAttributes"),z4=Symbol("i18nProperties"),Ga=Symbol("i18nContexts"),Hr=Symbol("i18nUnsubs"),Wa=(0,ur.applyMixinOnce)(Symbol("withI18n"),function(e){var t,a;class o extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[a]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?va:ar}i18n(i){let{context:s,key:l,message:f}=i,{custom:p,args:g,argsProvider:m}=i;if(s&&l){this.hasI18nContext(s)||this.addI18nContext(s,void 0,p);let b=g??(m?m(this):[]);return this.getI18nService(p).resolveMessage(s,l,...b)}return f}async awaitI18n(i){let{context:s,custom:l}=i;return s&&await this.getI18nService(l).prepareContext(s),this.i18n(i)}customI18n(i,s){if(_4.isI18nKey(i)){let[l,f]=i.split(".");return this.i18n({custom:!0,context:l,key:f,...s})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((s,l,f)=>i.has(l)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((s,l,f)=>{var p;return((p=f?.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 f=this,p=(g,m,b)=>b?.context&&b.key&&i(g,m,b)?{...b,message:this.i18n({context:b.context,key:b.key,custom:b.custom,...g})}:b;(s=this[fm])===null||s===void 0||s.forEach((g,m)=>f[m]=p(g,m,f[m])),(l=this[um])===null||l===void 0||l.forEach((g,m)=>{var b;return f[m]=(b=f[m])===null||b===void 0?void 0:b.map(v=>p(g,m,v))})}updateI18nProperties(i){var s;(s=this[z4])===null||s===void 0||s.forEach((l,f)=>{i(l,f)&&(this[f]=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 f=(typeof i=="string"?i:i.name).toLowerCase();l=typeof i=="string"?l:i.custom,this[Ga].set(f,{isCustomContext:l}),this[Hr].has(f)||this[Hr].set(f,this.getI18nService(l).subscribe(f,()=>this.onI18nUpdate(f))),this.getI18nService(l).prepareContext(f,s)}hasI18nContext(i){return this[Ga].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Ga].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Hr].forEach(i=>i()),this[Hr].clear()}}return t=Ga,a=Hr,dm([(0,T4.property)({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}),M4=class extends Wa(ur.FtLitElement){},Fa=class extends Wa(ur.FtLitElementRedux){};var Gr=function(e,t,a,o){var n=arguments.length,i=n<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,a):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,a,o);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(n<3?s(i):n>3?s(t,a,i):s(t,a))||i);return n>3&&i&&Object.defineProperty(t,a,i),i},ze=class extends Fa{constructor(){super(),this.editorMode=!1,this.addStore(R)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":$a.nothing:$a.html`
|
|
1312
1312
|
<span class="ft-i18n">
|
|
1313
1313
|
${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
|
|
1314
1314
|
</span>
|