@fluid-topics/ft-search-result-metadata 1.3.46 → 1.3.47
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.
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
`;var uo=b(I()),Bd="ft-app-info",kt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};kt.eventName="authentication-change";var Md={session:(e,t)=>{(0,uo.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>R.dispatchEvent(new kt(t.payload)),0))}},R=uo.FtReduxStore.get({name:Bd,reducers:Md,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 Tn=b(I());var Dt=class e{static get(t){let{baseUrl:o,apiIntegrationIdentifier:n}=R.getState(),a=t??n;if(o&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,a,!0)}static await(t){return new Promise(o=>{let n=e.get(t);if(n)o(n);else{let a=R.subscribe(()=>{n=e.get(t),n&&(a(),o(n))})}})}};var po=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Dt.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Dt.await()}};var Oe=class extends po{constructor(t=!0,o){var n;super(o),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([c],[u])=>c.localeCompare(u)));let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new Tn.CacheRegistry,this.cache=t?a.commonCache:new Tn.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0))}};var fo=class extends Oe{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 Ln=class{addCommand(t,o=!1){R.commands.add(t,o)}consumeCommand(t){return R.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Ln;var Ue=b(I());var rs,Yt=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},$d=Symbol("clearAfterUnitTest"),ho=class extends(0,Ue.withEventBus)(Oe){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[rs]=()=>{this.defaultMessages={},this.cache=new Ue.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 o=t.name.toLowerCase();this.cache.setFinal(o,t),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,o){var n;if(t=t.toLowerCase(),o&&Object.keys(o).length>0){let a={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...o};(0,Ue.deepEqual)(this.defaultMessages[t],a)||(this.defaultMessages[t]=a,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var o,n;return this.fetchContext(t),(n=(o=this.cache.getNow(t))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,o){let n=t.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(t,o,...n){var a;let i=t.toLowerCase(),s=this.resolveContext(i);return new Ue.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(o,...n)}async fetchContext(t){let o=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),o&&await this.notify(t)}catch(a){!(a instanceof Ue.CanceledPromiseError)&&o&&console.error(a)}return n}subscribe(t,o){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(o),()=>{var a;return(a=this.listeners[t])===null||a===void 0?void 0:a.delete(o)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new Yt({loadedContexts:t})),this.dispatchEvent(new Yt({loadedContexts:t})),await Promise.all(t.map(o=>this.notify(o,!1)))}async notify(t,o=!0){o&&(document.body.dispatchEvent(new Yt({loadedContexts:[t]})),this.dispatchEvent(new Yt({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,Ue.delay)(0).then(()=>n()).catch(()=>null)))}};rs=$d;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends ho{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends ho{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Xt=window.FluidTopicsI18nService,yo=window.FluidTopicsCustomI18nService;var os=b(I()),Nn=class{highlightHtml(t,o,n){(0,os.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new Nn;var mo=class extends Oe{async listMySearches(){let{session:t}=R.getState();return Ji(t,se.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var ns=b(I());var In=class{isDate(t){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(c=>c.key===t))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(t,o){var n,a,i;return ns.DateFormatter.format(t,(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 In;var as=b(I());var Pr=class{static get(t,o){var n,a;let i=R.getState(),{lang:s,region:c}=(a=(n=i.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new as.SearchPlaceConverter(i.baseUrl,t??20,i.searchInAllLanguagesAllowed,o??`${s}-${c}`)}};var _n=class{urlToSearchRequest(t){return Pr.get().parse(t)}searchRequestToUrl(t){return Pr.get().serialize(t)}};window.FluidTopicsUrlService=new _n;var ht=b(I());var Bt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};Bt.eventName="change";var Pn=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let o=sessionStorage.getItem(this.itemName(t));return o?JSON.parse(o):void 0}set(t,o){sessionStorage.setItem(this.itemName(t),JSON.stringify(o))}},is=new Pn;var go=class e extends ht.WithEventBus{static build(){return new e(window.history,is,()=>window.location,!1)}constructor(t,o,n,a){var i,s;super(),this.history=t,this.historyStorage=o,this.windowLocation=n,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(a)}setCurrentState(t,o=!1){let n=o&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},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,ht.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Bt(this.currentItem())),0)}installProxies(){let t=o=>(n,a,[i,s,c])=>{let u=o(),p={...u===this.currentIndex?this.currentState:void 0,...i,index:u,href:typeof c=="string"?c:(c??this.windowLocation()).href};n.apply(a,[p,s,c]),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 o=this.history.length-1;o>=0;o--)t?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(t){var o;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(o=t?.title)!==null&&o!==void 0?o:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(t){this.addEventListener(Bt.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Bt.eventName,t)}currentItem(){return(0,ht.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,ht.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,ht.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 o;let n=(o=this.states[t])===null||o===void 0?void 0:o.majorStateId;if(!n)return t;let a=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var t,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&o!==void 0?o:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,o){var n;if(!this.hasState(t))return!1;let a=o??this.currentState.majorStateId,i=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=go.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 ss=R;function ls(e,t){var o;return ss.getState().authenticationRequired&&!(!((o=ss.getState().session)===null||o===void 0)&&o.sessionAuthenticated)?Promise.resolve(t):e()}var le=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},V=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=()=>Dt.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 cs.html`
|
|
16
16
|
<slot></slot>
|
|
17
17
|
`}connectedCallback(){super.connectedCallback(),R.addEventListener(kt.eventName,this.reloadConfiguration)}disconnectedCallback(){R.addEventListener(kt.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(t){var o,n,a,i,s,c,u;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=>Xt.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((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((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((u=(c=this.availableContentLocales)===null||c===void 0?void 0:c.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 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",()=>ls(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};V.elementDefinitions={};V.styles=ts;le([(0,fe.property)()],V.prototype,"baseUrl",void 0);le([(0,fe.property)()],V.prototype,"apiIntegrationIdentifier",void 0);le([(0,fe.property)()],V.prototype,"apiIntegrationAppVersion",void 0);le([(0,fe.property)()],V.prototype,"uiLocale",void 0);le([(0,Ge.jsonProperty)(null)],V.prototype,"availableUiLocales",void 0);le([(0,Ge.jsonProperty)(null)],V.prototype,"metadataConfiguration",void 0);le([(0,fe.property)({type:Boolean})],V.prototype,"editorMode",void 0);le([(0,fe.property)({type:Boolean})],V.prototype,"noCustom",void 0);le([(0,fe.property)({type:Boolean})],V.prototype,"openExternalDocumentInNewTab",void 0);le([(0,fe.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],V.prototype,"noCustomComponent",void 0);le([(0,fe.property)({type:Boolean})],V.prototype,"withManualResources",void 0);le([(0,fe.property)({type:Boolean})],V.prototype,"navigatorOnline",void 0);le([(0,fe.property)({type:Boolean})],V.prototype,"forcedOffline",void 0);le([(0,fe.property)({type:Object})],V.prototype,"apiProvider",void 0);le([(0,fe.property)({type:Boolean})],V.prototype,"authenticationRequired",void 0);le([(0,Ge.jsonProperty)([])],V.prototype,"messageContexts",void 0);le([(0,Ge.jsonProperty)(void 0)],V.prototype,"session",void 0);le([(0,fe.state)()],V.prototype,"localesConfiguration",void 0);le([(0,fe.state)()],V.prototype,"availableContentLocales",void 0);var na=b(Y());function Ud(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let o,n,a;if(Array.isArray(e)){if(o=e.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!bo(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!bo(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[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(c=>s[c]!=null);if(a=i(e),o=a.length,o!==i(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,a[n]))return!1;for(n=o;n--!==0;){let s=a[n];if(!bo(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function bo(e,t){try{return Ud(e,t)}catch{return!1}}function kr(e,t){return!bo(e,t)}function xo(e,t){let o=n=>n[e]===!0;return n=>{if(o(n))return n;let a=t(n);return a[e]=!0,a}}var ds=b(Y(),1);var kn=e=>{let t=e??{};return(o,n)=>{var a;let i={hasChanged:kr,attribute:!1,...t};(0,ds.property)(i)(o,n);let s=o.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(a=t.selector)!==null&&a!==void 0?a:c=>c[n],store:t.store})}};var vo=class{constructor(){this.queue=[]}add(t,o=!1){o&&this.clear(t.type),this.queue.push(t)}consume(t){let o=this.queue.find(n=>n.type===t);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(t){typeof t=="string"?this.queue=this.queue.filter(o=>o.type!==t):this.queue=this.queue.filter(o=>!t.test(o.type))}};var Mt=b(Y(),1);var us=b(Y(),1);function ps(e,t){let o=()=>JSON.parse(JSON.stringify(e));return(0,us.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:kr,...t??{}})}var So=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let n=[...this.callbacks];this.callbacks=[];let a=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,i=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let s of n)try{await s()}catch(c){a(c);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 hs=b(z(),1);var Co=globalThis,Fd=Co.ShadowRoot&&(Co.ShadyCSS===void 0||Co.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Vf=Symbol();var fs=(e,t)=>{if(Fd)e.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of t){let n=document.createElement("style"),a=Co.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=o.cssText,e.appendChild(n)}};var Oo=class extends hs.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([a,i])=>t.registry.define(a,i)));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return fs(n,t.elementStyles),n}};function ys(e,t,...o){var n;let a=e.querySelector(t);for(let i of o)a=(n=a?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return a}var Jt=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},xs,ms=Symbol("constructorPrototype"),gs=Symbol("constructorName"),vs=Symbol("exportpartsDebouncer"),bs=Symbol("dynamicDependenciesLoaded"),Qt=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};Qt.eventName="exportparts-updated";var tt=class extends Oo{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[xs]=new So(5),this.scheduleExportpartsUpdate=()=>{var t,o,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[vs].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[gs]=this.constructor.name,this[ms]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[gs]&&Object.setPrototypeOf(this,this[ms])}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(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let o=this.constructor;o[bs]||(o[bs]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Qt.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Qt.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 Qt)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:a}=this.elementToFocus;if(n!=null){let i=[...a??[],n];o=ys(this.shadowRoot,...i)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var o,n,a;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}setExportpartsAttribute(t){var o,n,a,i,s,c;let u=g=>g!=null&&g.trim().length>0,p=t.filter(u).map(g=>g.trim());if(p.length===0){this.exportparts=void 0;return}let y=new Set;for(let g of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let S=(i=(a=g.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],v=(c=(s=g.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(L=>L.split(":")[1]))!==null&&c!==void 0?c:[],O=[...S,...v].filter(u).map(L=>L.trim());for(let L of O)y.add(L)}if(y.size===0){this.exportparts=void 0;return}let h=[...y.values()].flatMap(g=>p.map(S=>`${g}:${S}--${g}`));this.exportparts=[...this.part,...h].join(", ")}};xs=vs;Jt([(0,Mt.property)()],tt.prototype,"exportpartsPrefix",void 0);Jt([ps([])],tt.prototype,"exportpartsPrefixes",void 0);Jt([(0,Mt.property)({reflect:!0})],tt.prototype,"exportparts",void 0);Jt([(0,Mt.property)()],tt.prototype,"customStylesheet",void 0);Jt([(0,Mt.property)()],tt.prototype,"elementToFocus",void 0);Jt([(0,Mt.state)()],tt.prototype,"useAdoptedStyleSheets",void 0);function Eo(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Dr=Symbol("internalReduxEventsUnsubscribers"),yt=Symbol("internalStoresUnsubscribers"),$t=Symbol("internalStores"),zd=xo(Symbol("withRedux"),function(e){var t,o,n;class a extends e{constructor(){super(...arguments),this[t]=new Map,this[o]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(c=>s.has(c))&&this.updateFromStores()}getUnnamedStore(){if(this[$t].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[$t].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[$t].get(s)}addStore(s,c){var u;c=(u=c??s.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(c),this[$t].set(c,s),this.subscribeToStore(c,s),this.updateFromStores()}removeStore(s){let c=typeof s=="string"?s:s.name;this.unsubscribeFromStore(c),this[$t].delete(c)}setupStores(){this.unsubscribeFromStores(),this[$t].forEach((s,c)=>this.subscribeToStore(c,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,c)=>{let u=this.constructor.getPropertyOptions(c);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:c)){let p=this.getStore(s.store);p&&(s.store?this[yt].has(s.store):this[yt].size>0)&&(this[c]=s.selector(p.getState(),this))}})}subscribeToStore(s,c){var u;this[yt].set(s,c.subscribe(()=>this.updateFromStores())),this[Dr].set(s,[]),Eo(c)&&c.eventBus&&((u=this.reduxConstructor.reduxEventListeners)===null||u===void 0||u.forEach((p,y)=>{if(typeof this[y]=="function"&&(!p.store||c.name===p.store)){let h=g=>this[y](g);c.addEventListener(p.eventName,h),this[Dr].get(s).push(()=>c.removeEventListener(p.eventName,h))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[yt].forEach((s,c)=>this.unsubscribeFromStore(c))}unsubscribeFromStore(s){var c;this[yt].has(s)&&this[yt].get(s)(),this[yt].delete(s),(c=this[Dr].get(s))===null||c===void 0||c.forEach(u=>u()),this[Dr].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=yt,o=$t,n=Dr,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),Ss=class extends zd(tt){};function Fe(e){for(var t=arguments.length,o=Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];if(0)var a,i;throw Error("[Immer] minified error nr: "+e+(o.length?" "+o.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function it(e){return!!e&&!!e[K]}function je(e){var t;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)===qd}(e)||Array.isArray(e)||!!e[Ts]||!!(!((t=e.constructor)===null||t===void 0)&&t[Ts])||Wn(e)||Gn(e))}function Ut(e,t,o){o===void 0&&(o=!1),rr(e)===0?(o?Object.keys:tr)(e).forEach(function(n){o&&typeof n=="symbol"||t(n,e[n],e)}):e.forEach(function(n,a){return t(a,n,e)})}function rr(e){var t=e[K];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Wn(e)?2:Gn(e)?3:0}function er(e,t){return rr(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Hd(e,t){return rr(e)===2?e.get(t):e[t]}function Ls(e,t,o){var n=rr(e);n===2?e.set(t,o):n===3?e.add(o):e[t]=o}function Ns(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Wn(e){return Kd&&e instanceof Map}function Gn(e){return Zd&&e instanceof Set}function mt(e){return e.o||e.t}function jn(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Ps(e);delete t[K];for(var o=tr(t),n=0;n<o.length;n++){var a=o[n],i=t[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[a]})}return Object.create(Object.getPrototypeOf(e),t)}function Vn(e,t){return t===void 0&&(t=!1),Kn(e)||it(e)||!je(e)||(rr(e)>1&&(e.set=e.add=e.clear=e.delete=Wd),Object.freeze(e),t&&Ut(e,function(o,n){return Vn(n,!0)},!0)),e}function Wd(){Fe(2)}function Kn(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function rt(e){var t=Hn[e];return t||Fe(18,e),t}function Gd(e,t){Hn[e]||(Hn[e]=t)}function Un(){return Mr}function Dn(e,t){t&&(rt("Patches"),e.u=[],e.s=[],e.v=t)}function Ao(e){Fn(e),e.p.forEach(jd),e.p=null}function Fn(e){e===Mr&&(Mr=e.l)}function Cs(e){return Mr={p:[],l:Mr,h:e,m:!0,_:0}}function jd(e){var t=e[K];t.i===0||t.i===1?t.j():t.g=!0}function Bn(e,t){t._=t.p.length;var o=t.p[0],n=e!==void 0&&e!==o;return t.h.O||rt("ES5").S(t,e,n),n?(o[K].P&&(Ao(t),Fe(4)),je(e)&&(e=wo(t,e),t.l||Ro(t,e)),t.u&&rt("Patches").M(o[K].t,e,t.u,t.s)):e=wo(t,o,[]),Ao(t),t.u&&t.v(t.u,t.s),e!==_s?e:void 0}function wo(e,t,o){if(Kn(t))return t;var n=t[K];if(!n)return Ut(t,function(c,u){return Os(e,n,t,c,u,o)},!0),t;if(n.A!==e)return t;if(!n.P)return Ro(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=jn(n.k):n.o,i=a,s=!1;n.i===3&&(i=new Set(a),a.clear(),s=!0),Ut(i,function(c,u){return Os(e,n,a,c,u,o,s)}),Ro(e,a,!1),o&&e.u&&rt("Patches").N(n,o,e.u,e.s)}return n.o}function Os(e,t,o,n,a,i,s){if(it(a)){var c=wo(e,a,i&&t&&t.i!==3&&!er(t.R,n)?i.concat(n):void 0);if(Ls(o,n,c),!it(c))return;e.m=!1}else s&&o.add(a);if(je(a)&&!Kn(a)){if(!e.h.D&&e._<1)return;wo(e,a),t&&t.A.l||Ro(e,a)}}function Ro(e,t,o){o===void 0&&(o=!1),!e.l&&e.h.D&&e.m&&Vn(t,o)}function Mn(e,t){var o=e[K];return(o?mt(o):e)[t]}function Es(e,t){if(t in e)for(var o=Object.getPrototypeOf(e);o;){var n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=Object.getPrototypeOf(o)}}function gt(e){e.P||(e.P=!0,e.l&>(e.l))}function $n(e){e.o||(e.o=jn(e.t))}function zn(e,t,o){var n=Wn(t)?rt("MapSet").F(t,o):Gn(t)?rt("MapSet").T(t,o):e.O?function(a,i){var s=Array.isArray(a),c={i:s?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=c,p=$r;s&&(u=[c],p=Br);var y=Proxy.revocable(u,p),h=y.revoke,g=y.proxy;return c.k=g,c.j=h,g}(t,o):rt("ES5").J(t,o);return(o?o.A:Un()).p.push(n),n}function Vd(e){return it(e)||Fe(22,e),function t(o){if(!je(o))return o;var n,a=o[K],i=rr(o);if(a){if(!a.P&&(a.i<4||!rt("ES5").K(a)))return a.t;a.I=!0,n=As(o,i),a.I=!1}else n=As(o,i);return Ut(n,function(s,c){a&&Hd(a.t,s)===c||Ls(n,s,t(c))}),i===3?new Set(n):n}(e)}function As(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return jn(e)}function Is(){function e(s,c){var u=i[s];return u?u.enumerable=c:i[s]=u={configurable:!0,enumerable:c,get:function(){var p=this[K];return $r.get(p,s)},set:function(p){var y=this[K];$r.set(y,s,p)}},u}function t(s){for(var c=s.length-1;c>=0;c--){var u=s[c][K];if(!u.P)switch(u.i){case 5:n(u)&>(u);break;case 4:o(u)&>(u)}}}function o(s){for(var c=s.t,u=s.k,p=tr(u),y=p.length-1;y>=0;y--){var h=p[y];if(h!==K){var g=c[h];if(g===void 0&&!er(c,h))return!0;var S=u[h],v=S&&S[K];if(v?v.t!==g:!Ns(S,g))return!0}}var O=!!c[K];return p.length!==tr(c).length+(O?0:1)}function n(s){var c=s.k;if(c.length!==s.t.length)return!0;var u=Object.getOwnPropertyDescriptor(c,c.length-1);if(u&&!u.get)return!0;for(var p=0;p<c.length;p++)if(!c.hasOwnProperty(p))return!0;return!1}function a(s){s.g&&Fe(3,JSON.stringify(mt(s)))}var i={};Gd("ES5",{J:function(s,c){var u=Array.isArray(s),p=function(h,g){if(h){for(var S=Array(g.length),v=0;v<g.length;v++)Object.defineProperty(S,""+v,e(v,!0));return S}var O=Ps(g);delete O[K];for(var L=tr(O),T=0;T<L.length;T++){var N=L[T];O[N]=e(N,h||!!O[N].enumerable)}return Object.create(Object.getPrototypeOf(g),O)}(u,s),y={i:u?5:4,A:c?c.A:Un(),P:!1,I:!1,R:{},l:c,t:s,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,K,{value:y,writable:!0}),p},S:function(s,c,u){u?it(c)&&c[K].A===s&&t(s.p):(s.u&&function p(y){if(y&&typeof y=="object"){var h=y[K];if(h){var g=h.t,S=h.k,v=h.R,O=h.i;if(O===4)Ut(S,function($){$!==K&&(g[$]!==void 0||er(g,$)?v[$]||p(S[$]):(v[$]=!0,gt(h)))}),Ut(g,function($){S[$]!==void 0||er(S,$)||(v[$]=!1,gt(h))});else if(O===5){if(n(h)&&(gt(h),v.length=!0),S.length<g.length)for(var L=S.length;L<g.length;L++)v[L]=!1;else for(var T=g.length;T<S.length;T++)v[T]=!0;for(var N=Math.min(S.length,g.length),D=0;D<N;D++)S.hasOwnProperty(D)||(v[D]=!0),v[D]===void 0&&p(S[D])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?o(s):n(s)}})}var ws,Mr,Zn=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Kd=typeof Map<"u",Zd=typeof Set<"u",Rs=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",_s=Zn?Symbol.for("immer-nothing"):((ws={})["immer-nothing"]=!0,ws),Ts=Zn?Symbol.for("immer-draftable"):"__$immer_draftable",K=Zn?Symbol.for("immer-state"):"__$immer_state";var qd=""+Object.prototype.constructor,tr=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Ps=Object.getOwnPropertyDescriptors||function(e){var t={};return tr(e).forEach(function(o){t[o]=Object.getOwnPropertyDescriptor(e,o)}),t},Hn={},$r={get:function(e,t){if(t===K)return e;var o=mt(e);if(!er(o,t))return function(a,i,s){var c,u=Es(i,s);return u?"value"in u?u.value:(c=u.get)===null||c===void 0?void 0:c.call(a.k):void 0}(e,o,t);var n=o[t];return e.I||!je(n)?n:n===Mn(e.t,t)?($n(e),e.o[t]=zn(e.A.h,n,e)):n},has:function(e,t){return t in mt(e)},ownKeys:function(e){return Reflect.ownKeys(mt(e))},set:function(e,t,o){var n=Es(mt(e),t);if(n?.set)return n.set.call(e.k,o),!0;if(!e.P){var a=Mn(mt(e),t),i=a?.[K];if(i&&i.t===o)return e.o[t]=o,e.R[t]=!1,!0;if(Ns(o,a)&&(o!==void 0||er(e.t,t)))return!0;$n(e),gt(e)}return e.o[t]===o&&(o!==void 0||t in e.o)||Number.isNaN(o)&&Number.isNaN(e.o[t])||(e.o[t]=o,e.R[t]=!0),!0},deleteProperty:function(e,t){return Mn(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,$n(e),gt(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var o=mt(e),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:o[t]}},defineProperty:function(){Fe(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Fe(12)}},Br={};Ut($r,function(e,t){Br[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Br.deleteProperty=function(e,t){return Br.set.call(this,e,t,void 0)},Br.set=function(e,t,o){return $r.set.call(this,e[0],t,o,e[0])};var Yd=function(){function e(o){var n=this;this.O=Rs,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var c=i;i=a;var u=n;return function(O){var L=this;O===void 0&&(O=c);for(var T=arguments.length,N=Array(T>1?T-1:0),D=1;D<T;D++)N[D-1]=arguments[D];return u.produce(O,function($){var U;return(U=i).call.apply(U,[L,$].concat(N))})}}var p;if(typeof i!="function"&&Fe(6),s!==void 0&&typeof s!="function"&&Fe(7),je(a)){var y=Cs(n),h=zn(n,a,void 0),g=!0;try{p=i(h),g=!1}finally{g?Ao(y):Fn(y)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(O){return Dn(y,s),Bn(O,y)},function(O){throw Ao(y),O}):(Dn(y,s),Bn(p,y))}if(!a||typeof a!="object"){if((p=i(a))===void 0&&(p=a),p===_s&&(p=void 0),n.D&&Vn(p,!0),s){var S=[],v=[];rt("Patches").M(a,p,S,v),s(S,v)}return p}Fe(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(p){for(var y=arguments.length,h=Array(y>1?y-1:0),g=1;g<y;g++)h[g-1]=arguments[g];return n.produceWithPatches(p,function(S){return a.apply(void 0,[S].concat(h))})};var s,c,u=n.produce(a,i,function(p,y){s=p,c=y});return typeof Promise<"u"&&u instanceof Promise?u.then(function(p){return[p,s,c]}):[u,s,c]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var t=e.prototype;return t.createDraft=function(o){je(o)||Fe(8),it(o)&&(o=Vd(o));var n=Cs(this),a=zn(this,o,void 0);return a[K].C=!0,Fn(n),a},t.finishDraft=function(o,n){var a=o&&o[K],i=a.A;return Dn(i,n),Bn(void 0,i)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!Rs&&Fe(20),this.O=o},t.applyPatches=function(o,n){var a;for(a=n.length-1;a>=0;a--){var i=n[a];if(i.path.length===0&&i.op==="replace"){o=i.value;break}}a>-1&&(n=n.slice(a+1));var s=rt("Patches").$;return it(o)?s(o,n):this.produce(o,function(c){return s(c,n)})},e}(),Pe=new Yd,Xd=Pe.produce,sh=Pe.produceWithPatches.bind(Pe),lh=Pe.setAutoFreeze.bind(Pe),ch=Pe.setUseProxies.bind(Pe),dh=Pe.applyPatches.bind(Pe),uh=Pe.createDraft.bind(Pe),ph=Pe.finishDraft.bind(Pe),To=Xd;function Ft(e){"@babel/helpers - typeof";return Ft=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},Ft(e)}function ks(e,t){if(Ft(e)!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var n=o.call(e,t||"default");if(Ft(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ds(e){var t=ks(e,"string");return Ft(t)=="symbol"?t:t+""}function Bs(e,t,o){return(t=Ds(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function Ms(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),o.push.apply(o,n)}return o}function qn(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?Ms(Object(o),!0).forEach(function(n){Bs(e,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Ms(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}function me(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 $s=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Yn=function(){return Math.random().toString(36).substring(7).split("").join(".")},Lo={INIT:"@@redux/INIT"+Yn(),REPLACE:"@@redux/REPLACE"+Yn(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Yn()}};function Qd(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 Xn(e,t,o){var n;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(me(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(me(1));return o(Xn)(e,t)}if(typeof e!="function")throw new Error(me(2));var a=e,i=t,s=[],c=s,u=!1;function p(){c===s&&(c=s.slice())}function y(){if(u)throw new Error(me(3));return i}function h(O){if(typeof O!="function")throw new Error(me(4));if(u)throw new Error(me(5));var L=!0;return p(),c.push(O),function(){if(L){if(u)throw new Error(me(6));L=!1,p();var N=c.indexOf(O);c.splice(N,1),s=null}}}function g(O){if(!Qd(O))throw new Error(me(7));if(typeof O.type>"u")throw new Error(me(8));if(u)throw new Error(me(9));try{u=!0,i=a(i,O)}finally{u=!1}for(var L=s=c,T=0;T<L.length;T++){var N=L[T];N()}return O}function S(O){if(typeof O!="function")throw new Error(me(10));a=O,g({type:Lo.REPLACE})}function v(){var O,L=h;return O={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(me(11));function D(){N.next&&N.next(y())}D();var $=L(D);return{unsubscribe:$}}},O[$s]=function(){return this},O}return g({type:Lo.INIT}),n={dispatch:g,subscribe:h,getState:y,replaceReducer:S},n[$s]=v,n}function Jd(e){Object.keys(e).forEach(function(t){var o=e[t],n=o(void 0,{type:Lo.INIT});if(typeof n>"u")throw new Error(me(12));if(typeof o(void 0,{type:Lo.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(me(13))})}function Us(e){for(var t=Object.keys(e),o={},n=0;n<t.length;n++){var a=t[n];typeof e[a]=="function"&&(o[a]=e[a])}var i=Object.keys(o),s,c;try{Jd(o)}catch(u){c=u}return function(p,y){if(p===void 0&&(p={}),c)throw c;if(0)var h;for(var g=!1,S={},v=0;v<i.length;v++){var O=i[v],L=o[O],T=p[O],N=L(T,y);if(typeof N>"u"){var D=y&&y.type;throw new Error(me(14))}S[O]=N,g=g||N!==T}return g=g||i.length!==Object.keys(p).length,g?S:p}}function or(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,a){return function(){return n(a.apply(void 0,arguments))}})}function Fs(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(me(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},c=t.map(function(u){return u(s)});return i=or.apply(void 0,c)(a.dispatch),qn(qn({},a),{},{dispatch:i})}}}function zs(e){var t=function(n){var a=n.dispatch,i=n.getState;return function(s){return function(c){return typeof c=="function"?c(a,i,e):s(c)}}};return t}var Hs=zs();Hs.withExtraArgument=zs;var Qn=Hs;var Ks=function(){var e=function(t,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(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");e(t,o);function n(){this.constructor=t}t.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),eu=function(e,t){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(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=t.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}}},nr=function(e,t){for(var o=0,n=t.length,a=e.length;o<n;o++,a++)e[a]=t[o];return e},tu=Object.defineProperty,ru=Object.defineProperties,ou=Object.getOwnPropertyDescriptors,Ws=Object.getOwnPropertySymbols,nu=Object.prototype.hasOwnProperty,au=Object.prototype.propertyIsEnumerable,Gs=function(e,t,o){return t in e?tu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o},bt=function(e,t){for(var o in t||(t={}))nu.call(t,o)&&Gs(e,o,t[o]);if(Ws)for(var n=0,a=Ws(t);n<a.length;n++){var o=a[n];au.call(t,o)&&Gs(e,o,t[o])}return e},Jn=function(e,t){return ru(e,ou(t))},iu=function(e,t,o){return new Promise(function(n,a){var i=function(u){try{c(o.next(u))}catch(p){a(p)}},s=function(u){try{c(o.throw(u))}catch(p){a(p)}},c=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(i,s)};c((o=o.apply(e,t)).next())})};var su=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?or:or.apply(null,arguments)},Nh=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function lu(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var o=t;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return t===o}var cu=function(e){Ks(t,e);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=e.apply(this,o)||this;return Object.setPrototypeOf(a,t.prototype),a}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return e.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,nr([void 0],o[0].concat(this)))):new(t.bind.apply(t,nr([void 0],o.concat(this))))},t}(Array),du=function(e){Ks(t,e);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=e.apply(this,o)||this;return Object.setPrototypeOf(a,t.prototype),a}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return e.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,nr([void 0],o[0].concat(this)))):new(t.bind.apply(t,nr([void 0],o.concat(this))))},t}(Array);function ra(e){return je(e)?To(e,function(){}):e}function uu(e){return typeof e=="boolean"}function pu(){return function(t){return fu(t)}}function fu(e){e===void 0&&(e={});var t=e.thunk,o=t===void 0?!0:t,n=e.immutableCheck,a=n===void 0?!0:n,i=e.serializableCheck,s=i===void 0?!0:i,c=new cu;if(o&&(uu(o)?c.push(Qn):c.push(Qn.withExtraArgument(o.extraArgument))),0){if(a)var u;if(s)var p}return c}var ea=!0;function Zs(e){var t=pu(),o=e||{},n=o.reducer,a=n===void 0?void 0:n,i=o.middleware,s=i===void 0?t():i,c=o.devTools,u=c===void 0?!0:c,p=o.preloadedState,y=p===void 0?void 0:p,h=o.enhancers,g=h===void 0?void 0:h,S;if(typeof a=="function")S=a;else if(lu(a))S=Us(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 v=s;if(typeof v=="function"&&(v=v(t),!ea&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!ea&&v.some(function($){return typeof $!="function"}))throw new Error("each middleware provided to configureStore must be a function");var O=Fs.apply(void 0,v),L=or;u&&(L=su(bt({trace:!ea},typeof u=="object"&&u)));var T=new du(O),N=T;Array.isArray(g)?N=nr([O],g):typeof g=="function"&&(N=g(T));var D=L.apply(void 0,N);return Xn(S,y,D)}function xt(e,t){function o(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(t){var i=t.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return bt(bt({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 qs(e){var t={},o=[],n,a={addCase:function(i,s){var c=typeof i=="string"?i:i.type;if(c in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[c]=s,a},addMatcher:function(i,s){return o.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return n=i,a}};return e(a),[t,o,n]}function hu(e){return typeof e=="function"}function yu(e,t,o,n){o===void 0&&(o=[]);var a=typeof t=="function"?qs(t):[t,o,n],i=a[0],s=a[1],c=a[2],u;if(hu(e))u=function(){return ra(e())};else{var p=ra(e);u=function(){return p}}function y(h,g){h===void 0&&(h=u());var S=nr([i[g.type]],s.filter(function(v){var O=v.matcher;return O(g)}).map(function(v){var O=v.reducer;return O}));return S.filter(function(v){return!!v}).length===0&&(S=[c]),S.reduce(function(v,O){if(O)if(it(v)){var L=v,T=O(L,g);return T===void 0?v:T}else{if(je(v))return To(v,function(N){return O(N,g)});var T=O(v,g);if(T===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return T}return v},h)}return y.getInitialState=u,y}function mu(e,t){return e+"/"+t}function Ys(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof e.initialState=="function"?e.initialState:ra(e.initialState),n=e.reducers||{},a=Object.keys(n),i={},s={},c={};a.forEach(function(y){var h=n[y],g=mu(t,y),S,v;"reducer"in h?(S=h.reducer,v=h.prepare):S=h,i[y]=S,s[g]=S,c[y]=v?xt(g,v):xt(g)});function u(){var y=typeof e.extraReducers=="function"?qs(e.extraReducers):[e.extraReducers],h=y[0],g=h===void 0?{}:h,S=y[1],v=S===void 0?[]:S,O=y[2],L=O===void 0?void 0:O,T=bt(bt({},g),s);return yu(o,function(N){for(var D in T)N.addCase(D,T[D]);for(var $=0,U=v;$<U.length;$++){var Ce=U[$];N.addMatcher(Ce.matcher,Ce.reducer)}L&&N.addDefaultCase(L)})}var p;return{name:t,reducer:function(y,h){return p||(p=u()),p(y,h)},actions:c,caseReducers:i,getInitialState:function(){return p||(p=u()),p.getInitialState()}}}var gu="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",bu=function(e){e===void 0&&(e=21);for(var t="",o=e;o--;)t+=gu[Math.random()*64|0];return t},xu=["name","message","stack","code"],ta=function(){function e(t,o){this.payload=t,this.meta=o}return e}(),js=function(){function e(t,o){this.payload=t,this.meta=o}return e}(),vu=function(e){if(typeof e=="object"&&e!==null){for(var t={},o=0,n=xu;o<n.length;o++){var a=n[o];typeof e[a]=="string"&&(t[a]=e[a])}return t}return{message:String(e)}},kh=function(){function e(t,o,n){var a=xt(t+"/fulfilled",function(y,h,g,S){return{payload:y,meta:Jn(bt({},S||{}),{arg:g,requestId:h,requestStatus:"fulfilled"})}}),i=xt(t+"/pending",function(y,h,g){return{payload:void 0,meta:Jn(bt({},g||{}),{arg:h,requestId:y,requestStatus:"pending"})}}),s=xt(t+"/rejected",function(y,h,g,S,v){return{payload:S,error:(n&&n.serializeError||vu)(y||"Rejected"),meta:Jn(bt({},v||{}),{arg:g,requestId:h,rejectedWithValue:!!S,requestStatus:"rejected",aborted:y?.name==="AbortError",condition:y?.name==="ConditionError"})}}),c=!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(h,g,S){var v=n?.idGenerator?n.idGenerator(y):bu(),O=new u,L,T=!1;function N($){L=$,O.abort()}var D=function(){return iu(this,null,function(){var $,U,Ce,Je,ve,et,ue;return eu(this,function(m){switch(m.label){case 0:return m.trys.push([0,4,,5]),Je=($=n?.condition)==null?void 0:$.call(n,y,{getState:g,extra:S}),Cu(Je)?[4,Je]:[3,2];case 1:Je=m.sent(),m.label=2;case 2:if(Je===!1||O.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return T=!0,ve=new Promise(function(x,P){return O.signal.addEventListener("abort",function(){return P({name:"AbortError",message:L||"Aborted"})})}),h(i(v,y,(U=n?.getPendingMeta)==null?void 0:U.call(n,{requestId:v,arg:y},{getState:g,extra:S}))),[4,Promise.race([ve,Promise.resolve(o(y,{dispatch:h,getState:g,extra:S,requestId:v,signal:O.signal,abort:N,rejectWithValue:function(x,P){return new ta(x,P)},fulfillWithValue:function(x,P){return new js(x,P)}})).then(function(x){if(x instanceof ta)throw x;return x instanceof js?a(x.payload,v,y,x.meta):a(x,v,y)})])];case 3:return Ce=m.sent(),[3,5];case 4:return et=m.sent(),Ce=et instanceof ta?s(null,v,y,et.payload,et.meta):s(et,v,y),[3,5];case 5:return ue=n&&!n.dispatchConditionRejection&&s.match(Ce)&&Ce.meta.condition,ue||h(Ce),[2,Ce]}})})}();return Object.assign(D,{abort:N,requestId:v,arg:y,unwrap:function(){return D.then(Su)}})}}return Object.assign(p,{pending:i,rejected:s,fulfilled:a,typePrefix:t})}return e.withTypes=function(){return e},e}();function Su(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Cu(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Xs="listener",Qs="completed",Js="cancelled",Dh="task-"+Js,Bh="task-"+Qs,Mh=Xs+"-"+Js,$h=Xs+"-"+Qs;var oa="listenerMiddleware";var Uh=xt(oa+"/add"),Fh=xt(oa+"/removeAll"),zh=xt(oa+"/remove");var Vs,Hh=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(Vs||(Vs=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},Ou=function(e){return function(t){setTimeout(t,e)}},Wh=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Ou(10);Is();var Eu=xo(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??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)}}}),No=class extends Eu(Object){};window.ftReduxStores||(window.ftReduxStores={});var el=class e extends No{static get(t){var o;let n=typeof t=="string"?t:t.name,a=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(Eo(i))return i;if(a==null)return;let s=Ys({...a,reducers:(o=a.reducers)!==null&&o!==void 0?o:{}}),c=Zs({reducer:(u,p)=>p.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__")?{...u,...p.overwrites}:s.reducer(u,p)});return window.ftReduxStores[a.name]=new e(s,c,a.eventBus)}constructor(t,o,n){super(),this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new vo;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,c)=>{let u=s,p=i[u];return p?(...y)=>{let h=p(...y.map(a));return this.reduxStore.dispatch(h),h}:y=>{this.setState({[u]:a(y)})}}}),this.eventBus=n??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 Io=class{static format(t,o,n,a){return window.moment?window.moment(t).locale(o).format(this.getMomentDateFormat(n,a)):this.getIntlDateTime(t,o,n,a)}static getMomentDateFormat(t,o){return t?o?"lll":"ll":o?"L LT":"L"}static getIntlDateTime(t,o,n,a){let i=typeof t=="string"?new Date(t):t,s=new Intl.DateTimeFormat(o,{dateStyle:n?"medium":"short"}).format(i);if(!a)return s;let c=new Intl.DateTimeFormat(o,{timeStyle:"short"}).format(i);return`${s} ${c}`}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),o=new Date().getTimezoneOffset();return`${o<0?"+":"-"}${t(Math.abs(o)/60)}:${t(Math.abs(o)%60)}`}};var tl=b(I()),_o=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},rl=(0,tl.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t 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(c=>c.key===n))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?c=>Io.format(c,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return _o([(0,na.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),_o([(0,na.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),_o([kn({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:[]}})],t.prototype,"metadataDescriptors",void 0),_o([kn({store:R.name})],t.prototype,"uiLocale",void 0),t});var Do=b(I());var Po=class extends Oe{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 ko=class extends Oe{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 Au="ft-user-assets",wu={setAssetCount:(e,t)=>{let{userAssetType:o,count:n}=t.payload.assetCount;e.assetCounts.allAsset[o]=n},clearAssetCount:e=>{Object.values($e).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let o=t.payload.mapId;e.assetCounts.bookmarkByMap[o]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:o,mapId:n,asset:a}=t.payload;ia(e,o,[...aa(e,o),a]),ol(e,o,1,n),nl(e,a)},editAsset:(e,t)=>{let{assetType:o,asset:n}=t.payload;ia(e,o,aa(e,o).map(a=>a.id===n.id?n:a)),nl(e,n)},removeAsset:(e,t)=>{let{assetType:o,mapId:n,assetId:a}=t.payload;ia(e,o,aa(e,o).filter(i=>i.id!==a)),ol(e,o,-1,n)}},al={[$e.SEARCHES]:"savedSearches",[$e.BOOKMARKS]:"bookmarks",[$e.BOOKS]:void 0,[$e.COLLECTIONS]:void 0},aa=(e,t)=>{var o;let n=al[t];return n?(o=e[n])!==null&&o!==void 0?o:[]:[]},ia=(e,t,o)=>{let n=al[t];n&&(e[n]=o)},ol=(e,t,o,n)=>{let a=e.assetCounts.allAsset[t];if(a!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,a+o),t===$e.BOOKMARKS&&n)){let i=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,i+o)}},nl=(e,t)=>{let o=e.assetLabels.map(a=>a.title),n=t.labels.filter(a=>!o.includes(a)).map(a=>({title:a}));e.assetLabels.push(...n)},ke=Do.FtReduxStore.get({name:Au,reducers:wu,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values($e).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),sa=class{constructor(t=new Po,o=new ko){this.assetCountsService=t,this.assetLabelsService=o,this.currentSession=R.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new fo,this.savedSearchesService=new mo,R.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=R.getState();(0,Do.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),ke.actions.clearAssetCount(),ke.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),ke.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),ke.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();ke.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();ke.actions.assetLabels(t)}async loadAssetCount(t){let o=await this.assetCountsService.getUserAssetCount(t);o&&ke.actions.setAssetCount({assetCount:o})}async loadBookmarkByMapId(t){let o=await this.assetCountsService.getUserBookmarkCountByMap(t);o&&ke.actions.setBookmarkCountByMap({count:o.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let o=Object.keys(ke.getState().assetCounts.bookmarkByMap).length!==0;t===$e.BOOKMARKS&&o&&ke.actions.clearBookmarkCountByMap(),ke.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 o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;ke.actions.bookmarks(o)}}},Ru=new sa;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Ru);(0,il.customElement)("ft-app-context")(V);var la=class e extends Event{constructor(){super(e.eventName)}};la.eventName="search-context-clear-all-filters";var Tu=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},da=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},sl=Symbol("registerInterval"),ca=Symbol("registerAttempts"),Lu=40,Nu=(0,$o.applyMixinOnce)(Symbol("toFtSearchComponent"),function(e){class t extends e{setSearchStateManager(n){this.clearStateManager(),this.stateManager=n,this.addStore(n.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[ca]=0,this[sl]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null||this[ca]>Lu?window.clearInterval(this[sl]):(this[ca]++,this.dispatchEvent(new da))}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return Tu([(0,ll.state)()],t.prototype,"stateManager",void 0),t}),Mo=class extends Nu($o.FtLitElementRedux){};var Fo=b(Y()),Uo=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},pa=class extends Event{constructor(){super("register-ft-search-result-component",{bubbles:!0,composed:!0})}},ua=Symbol("registerInterval"),Iu=(0,Ho.applyMixinOnce)(Symbol("toFtSearchResultComponent"),function(e){var t;class o extends e{constructor(){super(...arguments),this[t]=0}setResultStateManager(a){this.resultStateManager=a}unregisterResultStateManager(){this.resultStateManager&&(this.resultStateManager.unregisterComponent(this),this.resultStateManager=void 0)}connectedCallback(){super.connectedCallback(),this[ua]=window.setInterval(()=>this.tryToRegisterToResultContext(),50)}tryToRegisterToResultContext(){this.result!=null?window.clearInterval(this[ua]):this.dispatchEvent(new pa)}disconnectedCallback(){super.disconnectedCallback(),this.unregisterResultStateManager()}}return t=ua,Uo([(0,Fo.property)({attribute:!1})],o.prototype,"cluster",void 0),Uo([(0,Fo.property)({attribute:!1})],o.prototype,"result",void 0),Uo([(0,Ho.numberProperty)()],o.prototype,"rank",void 0),Uo([(0,Fo.property)({attribute:!1,type:Boolean})],o.prototype,"openResultInNewTab",void 0),o}),zo=class extends Iu(Mo){};var yl=b(I());var Vo=b(z()),Ko=b(Y()),Zo=b(I());var cl=b(z());var dl=cl.css`
|
|
18
|
-
`;var ar=b(I());var fl=b(Y());var fa=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[n,a]=t.split(".");return{context:n,key:a,message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},ul=new fa;var _u=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},Pu=Symbol("i18nAttributes"),ku=Symbol("i18nListAttributes"),hl=Symbol("i18nProperties"),Wo=Symbol("i18nContexts"),Ur=Symbol("i18nUnsubs"),jo=(0,ar.applyMixinOnce)(Symbol("withI18n"),function(e){var t,o;class n extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[o]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?yo:Xt}i18n(i){let{context:s,key:c,message:u}=i,{custom:p,args:y,argsProvider:h}=i;if(s&&c){this.hasI18nContext(s)||this.addI18nContext(s,void 0,p);let g=y??(h?h(this):[]);return this.getI18nService(p).resolveMessage(s,c,...g)}return u}async awaitI18n(i){let{context:s,custom:c}=i;return s&&await this.getI18nService(c).prepareContext(s),this.i18n(i)}customI18n(i,s){if(ul.isI18nKey(i)){let[c,u]=i.split(".");return this.i18n({custom:!0,context:c,key:u,...s})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((s,c,u)=>i.has(c)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((s,c,u)=>{var p;return((p=u?.context)===null||p===void 0?void 0:p.toLowerCase())===i}),this.updateI18nProperties(s=>s.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var s,c;let u=this,p=(y,h,g)=>g?.context&&g.key&&i(y,h,g)?{...g,message:this.i18n({context:g.context,key:g.key,custom:g.custom,...y})}:g;(s=this[Pu])===null||s===void 0||s.forEach((y,h)=>u[h]=p(y,h,u[h])),(c=this[ku])===null||c===void 0||c.forEach((y,h)=>{var g;return u[h]=(g=u[h])===null||g===void 0?void 0:g.map(S=>p(y,h,S))})}updateI18nProperties(i){var s;(s=this[hl])===null||s===void 0||s.forEach((c,u)=>{i(c,u)&&(this[u]=this.i18n(c))})}addI18nMessages(i,s,c){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,s,c)}addI18nContext(i,s,c){let u=(typeof i=="string"?i:i.name).toLowerCase();c=typeof i=="string"?c:i.custom,this[Wo].set(u,{isCustomContext:c}),this[Ur].has(u)||this[Ur].set(u,this.getI18nService(c).subscribe(u,()=>this.onI18nUpdate(u))),this.getI18nService(c).prepareContext(u,s)}hasI18nContext(i){return this[Wo].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Wo].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Ur].forEach(i=>i()),this[Ur].clear()}}return t=Wo,o=Ur,_u([(0,fl.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),pl=class extends jo(ar.FtLitElement){},Go=class extends jo(ar.FtLitElementRedux){};var Fr=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},Ve=class extends Go{constructor(){super(),this.editorMode=!1,this.addStore(R)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Vo.nothing:Vo.html`
|
|
18
|
+
`;var ar=b(I());var fl=b(Y());var fa=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[n,a]=t.split(".");return{context:n,key:a,custom:!0,message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},ul=new fa;var _u=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},Pu=Symbol("i18nAttributes"),ku=Symbol("i18nListAttributes"),hl=Symbol("i18nProperties"),Wo=Symbol("i18nContexts"),Ur=Symbol("i18nUnsubs"),jo=(0,ar.applyMixinOnce)(Symbol("withI18n"),function(e){var t,o;class n extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[o]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?yo:Xt}i18n(i){let{context:s,key:c,message:u}=i,{custom:p,args:y,argsProvider:h}=i;if(s&&c){this.hasI18nContext(s)||this.addI18nContext(s,void 0,p);let g=y??(h?h(this):[]);return this.getI18nService(p).resolveMessage(s,c,...g)}return u}async awaitI18n(i){let{context:s,custom:c}=i;return s&&await this.getI18nService(c).prepareContext(s),this.i18n(i)}customI18n(i,s){if(ul.isI18nKey(i)){let[c,u]=i.split(".");return this.i18n({custom:!0,context:c,key:u,...s})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((s,c,u)=>i.has(c)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((s,c,u)=>{var p;return((p=u?.context)===null||p===void 0?void 0:p.toLowerCase())===i}),this.updateI18nProperties(s=>s.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var s,c;let u=this,p=(y,h,g)=>g?.context&&g.key&&i(y,h,g)?{...g,message:this.i18n({context:g.context,key:g.key,custom:g.custom,...y})}:g;(s=this[Pu])===null||s===void 0||s.forEach((y,h)=>u[h]=p(y,h,u[h])),(c=this[ku])===null||c===void 0||c.forEach((y,h)=>{var g;return u[h]=(g=u[h])===null||g===void 0?void 0:g.map(S=>p(y,h,S))})}updateI18nProperties(i){var s;(s=this[hl])===null||s===void 0||s.forEach((c,u)=>{i(c,u)&&(this[u]=this.i18n(c))})}addI18nMessages(i,s,c){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,s,c)}addI18nContext(i,s,c){let u=(typeof i=="string"?i:i.name).toLowerCase();c=typeof i=="string"?c:i.custom,this[Wo].set(u,{isCustomContext:c}),this[Ur].has(u)||this[Ur].set(u,this.getI18nService(c).subscribe(u,()=>this.onI18nUpdate(u))),this.getI18nService(c).prepareContext(u,s)}hasI18nContext(i){return this[Wo].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Wo].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Ur].forEach(i=>i()),this[Ur].clear()}}return t=Wo,o=Ur,_u([(0,fl.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),pl=class extends jo(ar.FtLitElement){},Go=class extends jo(ar.FtLitElementRedux){};var Fr=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},Ve=class extends Go{constructor(){super(),this.editorMode=!1,this.addStore(R)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Vo.nothing:Vo.html`
|
|
19
19
|
<span class="ft-i18n">
|
|
20
20
|
${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
|
|
21
21
|
</span>
|
|
@@ -98,7 +98,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:o.extend("--ftds-con
|
|
|
98
98
|
`;var Hf="ft-app-info",tr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};tr.eventName="authentication-change";var zf={session:(t,e)=>{De(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>P.dispatchEvent(new tr(e.payload)),0))}},P=_t.get({name:Hf,reducers:zf,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 rr=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:n}=P.getState(),i=e??n;if(r&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,i,!0)}static await(e){return new Promise(r=>{let n=t.get(e);if(n)r(n);else{let i=P.subscribe(()=>{n=t.get(e),n&&(i(),r(n))})}})}};var Fn=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:rr.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):rr.await()}};var Re=class extends Fn{constructor(e=!0,r){var n;super(r),this.sortObjectFields=(a,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[d])=>l.localeCompare(d)));let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new rt,this.cache=e?i.commonCache:new rt}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var Un=class extends Re{async listMyBookmarks(){let e=P.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var cs=class{addCommand(e,r=!1){P.commands.add(e,r)}consumeCommand(e){return P.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new cs;var Xc,Nr=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},Wf=Symbol("clearAfterUnitTest"),Hn=class extends jo(Re){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Xc]=()=>{this.defaultMessages={},this.cache=new rt,this.listeners={}},this.currentUiLocale=P.getState().uiLocale,P.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=P.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var n;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let i={...(n=this.defaultMessages[e])!==null&&n!==void 0?n:{},...r};De(this.defaultMessages[e],i)||(this.defaultMessages[e]=i,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,n;return this.fetchContext(e),(n=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(e,r){let n=e.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(e,r,...n){var i;let a=e.toLowerCase(),s=this.resolveContext(a);return new bo((i=this.defaultMessages[a])!==null&&i!==void 0?i:{},s).resolve(r,...n)}async fetchContext(e){let r=!this.cache.has(e),n;try{n=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(i){!(i instanceof vt)&&r&&console.error(i)}return n}subscribe(e,r){var n;return e=e.toLowerCase(),this.listeners[e]=(n=this.listeners[e])!==null&&n!==void 0?n:new Set,this.listeners[e].add(r),()=>{var i;return(i=this.listeners[e])===null||i===void 0?void 0:i.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new Nr({loadedContexts:e})),this.dispatchEvent(new Nr({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new Nr({loadedContexts:[e]})),this.dispatchEvent(new Nr({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(n=>Vo(0).then(()=>n()).catch(()=>null)))}};Xc=Wf;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Hn{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Hn{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Pr=window.FluidTopicsI18nService,zn=window.FluidTopicsCustomI18nService;var ds=class{highlightHtml(e,r,n){ya(e,r,n)}};window.FluidTopicsHighlightHtmlService=new ds;var Wn=class extends Re{async listMySearches(){let{session:e}=P.getState();return Hc(e,fe.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var us=class{isDate(e){var r,n,i,a;return(a=(i=((n=(r=P.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(l=>l.key===e))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1}format(e,r){var n,i,a;return Jt.format(e,(n=r?.locale)!==null&&n!==void 0?n:P.getState().uiLocale,(i=r?.longFormat)!==null&&i!==void 0?i:!1,(a=r?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new us;var Ao=class{static get(e,r){var n,i;let a=P.getState(),{lang:s,region:l}=(i=(n=a.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new _r(a.baseUrl,e??20,a.searchInAllLanguagesAllowed,r??`${s}-${l}`)}};var ps=class{urlToSearchRequest(e){return Ao.get().parse(e)}searchRequestToUrl(e){return Ao.get().serialize(e)}};window.FluidTopicsUrlService=new ps;var or=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};or.eventName="change";var fs=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let r=sessionStorage.getItem(this.itemName(e));return r?JSON.parse(r):void 0}set(e,r){sessionStorage.setItem(this.itemName(e),JSON.stringify(r))}},Jc=new fs;var Vn=class t extends ut{static build(){return new t(window.history,Jc,()=>window.location,!1)}constructor(e,r,n,i){var a,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(a=e.state)===null||a===void 0?void 0:a.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(e,r=!1){let n=r&&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),De(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new or(this.currentItem())),0)}installProxies(){let e=r=>(n,i,[a,s,l])=>{let d=r(),p={...d===this.currentIndex?this.currentState:void 0,...a,index:d,href:typeof l=="string"?l:(l??this.windowLocation()).href};n.apply(i,[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 r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let n={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(e){this.addEventListener(or.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(or.eventName,e)}currentItem(){return io(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 io(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 io(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 r;let n=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!n)return e;let i=e,a=e+1;for(;this.states.length>a&&!this.isDifferentMajorState(a,n);)this.hasState(a)&&(i=a),a++;return i}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var n;if(!this.hasState(e))return!1;let i=r??this.currentState.majorStateId,a=(n=this.states[e])===null||n===void 0?void 0:n.majorStateId;return a==null||a!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Vn.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 Qc=P;function ed(t,e){var r;return Qc.getState().authenticationRequired&&!(!((r=Qc.getState().session)===null||r===void 0)&&r.sessionAuthenticated)?Promise.resolve(e):t()}var he=function(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},re=class extends W{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=()=>rr.get(),this.authenticationRequired=!1,this.messageContexts=[],this.cache=new rt,this.cleanSessionDebouncer=new Oe,this.reloadConfiguration=()=>{this.cache.clear("availableContentLocales"),this.updateAvailableContentLocales()}}render(){return D`
|
|
99
99
|
<slot></slot>
|
|
100
100
|
`}connectedCallback(){super.connectedCallback(),P.addEventListener(tr.eventName,this.reloadConfiguration)}disconnectedCallback(){P.addEventListener(tr.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(e){var r,n,i,a,s,l,d;super.update(e),e.has("baseUrl")&&(P.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&P.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&P.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&P.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&P.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&P.actions.noCustom(this.noCustom),e.has("editorMode")&&P.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&P.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&P.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(p=>Pr.addContext(p)),e.has("openExternalDocumentInNewTab")&&P.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&P.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&P.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(P.actions.defaultLocales((r=this.localesConfiguration)===null||r===void 0?void 0:r.defaultLocales),P.actions.availableUiLocales((i=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&i!==void 0?i:[]),P.actions.searchInAllLanguagesAllowed((s=(a=this.localesConfiguration)===null||a===void 0?void 0:a.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),e.has("authenticationRequired")&&P.actions.authenticationRequired(this.authenticationRequired),e.has("availableContentLocales")&&P.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",()=>ed(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};re.elementDefinitions={};re.styles=Yc;he([b()],re.prototype,"baseUrl",void 0);he([b()],re.prototype,"apiIntegrationIdentifier",void 0);he([b()],re.prototype,"apiIntegrationAppVersion",void 0);he([b()],re.prototype,"uiLocale",void 0);he([Ee(null)],re.prototype,"availableUiLocales",void 0);he([Ee(null)],re.prototype,"metadataConfiguration",void 0);he([b({type:Boolean})],re.prototype,"editorMode",void 0);he([b({type:Boolean})],re.prototype,"noCustom",void 0);he([b({type:Boolean})],re.prototype,"openExternalDocumentInNewTab",void 0);he([b({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],re.prototype,"noCustomComponent",void 0);he([b({type:Boolean})],re.prototype,"withManualResources",void 0);he([b({type:Boolean})],re.prototype,"navigatorOnline",void 0);he([b({type:Boolean})],re.prototype,"forcedOffline",void 0);he([b({type:Object})],re.prototype,"apiProvider",void 0);he([b({type:Boolean})],re.prototype,"authenticationRequired",void 0);he([Ee([])],re.prototype,"messageContexts",void 0);he([Ee(void 0)],re.prototype,"session",void 0);he([j()],re.prototype,"localesConfiguration",void 0);he([j()],re.prototype,"availableContentLocales",void 0);var jn=function(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},td=ce(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(P)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var i,a;return((a=(i=this.metadataDescriptors.find(l=>l.key===n))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1)?l=>Jt.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return jn([b({type:Boolean})],e.prototype,"useLongDateFormat",void 0),jn([b({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),jn([it({store:P.name,selector:r=>{var n,i;return(i=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&i!==void 0?i:[]}})],e.prototype,"metadataDescriptors",void 0),jn([it({store:P.name})],e.prototype,"uiLocale",void 0),e});var Gn=class extends Re{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=P.getState().session;return!!e?.sessionAuthenticated}};var Kn=class extends Re{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 e=P.getState().session;return!!e?.sessionAuthenticated}};var Vf="ft-user-assets",jf={setAssetCount:(t,e)=>{let{userAssetType:r,count:n}=e.payload.assetCount;t.assetCounts.allAsset[r]=n},clearAssetCount:t=>{Object.values(We).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:n,asset:i}=e.payload;ms(t,r,[...hs(t,r),i]),rd(t,r,1,n),od(t,i)},editAsset:(t,e)=>{let{assetType:r,asset:n}=e.payload;ms(t,r,hs(t,r).map(i=>i.id===n.id?n:i)),od(t,n)},removeAsset:(t,e)=>{let{assetType:r,mapId:n,assetId:i}=e.payload;ms(t,r,hs(t,r).filter(a=>a.id!==i)),rd(t,r,-1,n)}},nd={[We.SEARCHES]:"savedSearches",[We.BOOKMARKS]:"bookmarks",[We.BOOKS]:void 0,[We.COLLECTIONS]:void 0},hs=(t,e)=>{var r;let n=nd[e];return n?(r=t[n])!==null&&r!==void 0?r:[]:[]},ms=(t,e,r)=>{let n=nd[e];n&&(t[n]=r)},rd=(t,e,r,n)=>{let i=t.assetCounts.allAsset[e];if(i!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,i+r),e===We.BOOKMARKS&&n)){let a=t.assetCounts.bookmarkByMap[n];t.assetCounts.bookmarkByMap[n]=Math.max(0,a+r)}},od=(t,e)=>{let r=t.assetLabels.map(i=>i.title),n=e.labels.filter(i=>!r.includes(i)).map(i=>({title:i}));t.assetLabels.push(...n)},Fe=_t.get({name:Vf,reducers:jf,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(We).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),ys=class{constructor(e=new Gn,r=new Kn){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=P.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Un,this.savedSearchesService=new Wn,P.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=P.getState();De((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),Fe.actions.clearAssetCount(),Fe.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Fe.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Fe.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Fe.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();Fe.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&Fe.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&Fe.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(Fe.getState().assetCounts.bookmarkByMap).length!==0;e===We.BOOKMARKS&&r&&Fe.actions.clearBookmarkCountByMap(),Fe.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Fe.actions.bookmarks(r)}}},Gf=new ys;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Gf);X("ft-app-context")(re);var gs=class t extends Event{constructor(){super(t.eventName)}};gs.eventName="search-context-clear-all-filters";var Kf=function(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},xs=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},id=Symbol("registerInterval"),bs=Symbol("registerAttempts"),Zf=40,qf=ce(Symbol("toFtSearchComponent"),function(t){class e extends t{setSearchStateManager(n){this.clearStateManager(),this.stateManager=n,this.addStore(n.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[bs]=0,this[id]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null||this[bs]>Zf?window.clearInterval(this[id]):(this[bs]++,this.dispatchEvent(new xs))}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return Kf([j()],e.prototype,"stateManager",void 0),e}),Zn=class extends qf(Zt){};var qn=function(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Ss=class extends Event{constructor(){super("register-ft-search-result-component",{bubbles:!0,composed:!0})}},vs=Symbol("registerInterval"),Yf=ce(Symbol("toFtSearchResultComponent"),function(t){var e;class r extends t{constructor(){super(...arguments),this[e]=0}setResultStateManager(i){this.resultStateManager=i}unregisterResultStateManager(){this.resultStateManager&&(this.resultStateManager.unregisterComponent(this),this.resultStateManager=void 0)}connectedCallback(){super.connectedCallback(),this[vs]=window.setInterval(()=>this.tryToRegisterToResultContext(),50)}tryToRegisterToResultContext(){this.result!=null?window.clearInterval(this[vs]):this.dispatchEvent(new Ss)}disconnectedCallback(){super.disconnectedCallback(),this.unregisterResultStateManager()}}return e=vs,qn([b({attribute:!1})],r.prototype,"cluster",void 0),qn([b({attribute:!1})],r.prototype,"result",void 0),qn([fr()],r.prototype,"rank",void 0),qn([b({attribute:!1,type:Boolean})],r.prototype,"openResultInNewTab",void 0),r}),Yn=class extends Yf(Zn){};var ad=I`
|
|
101
|
-
`;var Cs=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,i]=e.split(".");return{context:n,key:i,message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},sd=new Cs;var Xf=function(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Jf=Symbol("i18nAttributes"),Qf=Symbol("i18nListAttributes"),cd=Symbol("i18nProperties"),Xn=Symbol("i18nContexts"),Ro=Symbol("i18nUnsubs"),Qn=ce(Symbol("withI18n"),function(t){var e,r;class n extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[r]=new Map}getI18nService(a){return a??this.useCustomMessageContexts?zn:Pr}i18n(a){let{context:s,key:l,message:d}=a,{custom:p,args:h,argsProvider:f}=a;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(a){let{context:s,custom:l}=a;return s&&await this.getI18nService(l).prepareContext(s),this.i18n(a)}customI18n(a,s){if(sd.isI18nKey(a)){let[l,d]=a.split(".");return this.i18n({custom:!0,context:l,key:d,...s})||a}return a}firstUpdated(a){super.firstUpdated(a),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(a){super.update(a),this.updateI18nAttributes((s,l,d)=>a.has(l)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(a){this.updateI18nAttributes((s,l,d)=>{var p;return((p=d?.context)===null||p===void 0?void 0:p.toLowerCase())===a}),this.updateI18nProperties(s=>s.context.toLowerCase()===a),this.requestUpdate()}updateI18nAttributes(a){var s,l;let d=this,p=(h,f,m)=>m?.context&&m.key&&a(h,f,m)?{...m,message:this.i18n({context:m.context,key:m.key,custom:m.custom,...h})}:m;(s=this[Jf])===null||s===void 0||s.forEach((h,f)=>d[f]=p(h,f,d[f])),(l=this[Qf])===null||l===void 0||l.forEach((h,f)=>{var m;return d[f]=(m=d[f])===null||m===void 0?void 0:m.map(v=>p(h,f,v))})}updateI18nProperties(a){var s;(s=this[cd])===null||s===void 0||s.forEach((l,d)=>{a(l,d)&&(this[d]=this.i18n(l))})}addI18nMessages(a,s,l){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(a,s,l)}addI18nContext(a,s,l){let d=(typeof a=="string"?a:a.name).toLowerCase();l=typeof a=="string"?l:a.custom,this[Xn].set(d,{isCustomContext:l}),this[Ro].has(d)||this[Ro].set(d,this.getI18nService(l).subscribe(d,()=>this.onI18nUpdate(d))),this.getI18nService(l).prepareContext(d,s)}hasI18nContext(a){return this[Xn].has(a.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Xn].forEach((a,s)=>this.addI18nContext(s,void 0,a.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Ro].forEach(a=>a()),this[Ro].clear()}}return e=Xn,r=Ro,Xf([b({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),ld=class extends Qn(W){},Jn=class extends Qn(Zt){};var To=function(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Ye=class extends Jn{constructor(){super(),this.editorMode=!1,this.addStore(P)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":z:D`
|
|
101
|
+
`;var Cs=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,i]=e.split(".");return{context:n,key:i,custom:!0,message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},sd=new Cs;var Xf=function(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Jf=Symbol("i18nAttributes"),Qf=Symbol("i18nListAttributes"),cd=Symbol("i18nProperties"),Xn=Symbol("i18nContexts"),Ro=Symbol("i18nUnsubs"),Qn=ce(Symbol("withI18n"),function(t){var e,r;class n extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[r]=new Map}getI18nService(a){return a??this.useCustomMessageContexts?zn:Pr}i18n(a){let{context:s,key:l,message:d}=a,{custom:p,args:h,argsProvider:f}=a;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(a){let{context:s,custom:l}=a;return s&&await this.getI18nService(l).prepareContext(s),this.i18n(a)}customI18n(a,s){if(sd.isI18nKey(a)){let[l,d]=a.split(".");return this.i18n({custom:!0,context:l,key:d,...s})||a}return a}firstUpdated(a){super.firstUpdated(a),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(a){super.update(a),this.updateI18nAttributes((s,l,d)=>a.has(l)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(a){this.updateI18nAttributes((s,l,d)=>{var p;return((p=d?.context)===null||p===void 0?void 0:p.toLowerCase())===a}),this.updateI18nProperties(s=>s.context.toLowerCase()===a),this.requestUpdate()}updateI18nAttributes(a){var s,l;let d=this,p=(h,f,m)=>m?.context&&m.key&&a(h,f,m)?{...m,message:this.i18n({context:m.context,key:m.key,custom:m.custom,...h})}:m;(s=this[Jf])===null||s===void 0||s.forEach((h,f)=>d[f]=p(h,f,d[f])),(l=this[Qf])===null||l===void 0||l.forEach((h,f)=>{var m;return d[f]=(m=d[f])===null||m===void 0?void 0:m.map(v=>p(h,f,v))})}updateI18nProperties(a){var s;(s=this[cd])===null||s===void 0||s.forEach((l,d)=>{a(l,d)&&(this[d]=this.i18n(l))})}addI18nMessages(a,s,l){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(a,s,l)}addI18nContext(a,s,l){let d=(typeof a=="string"?a:a.name).toLowerCase();l=typeof a=="string"?l:a.custom,this[Xn].set(d,{isCustomContext:l}),this[Ro].has(d)||this[Ro].set(d,this.getI18nService(l).subscribe(d,()=>this.onI18nUpdate(d))),this.getI18nService(l).prepareContext(d,s)}hasI18nContext(a){return this[Xn].has(a.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Xn].forEach((a,s)=>this.addI18nContext(s,void 0,a.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Ro].forEach(a=>a()),this[Ro].clear()}}return e=Xn,r=Ro,Xf([b({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),ld=class extends Qn(W){},Jn=class extends Qn(Zt){};var To=function(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Ye=class extends Jn{constructor(){super(),this.editorMode=!1,this.addStore(P)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":z:D`
|
|
102
102
|
<span class="ft-i18n">
|
|
103
103
|
${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
|
|
104
104
|
</span>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-search-result-metadata",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.47",
|
|
4
4
|
"description": "Search result metadata for integrated search component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,16 +19,16 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-chip": "1.3.
|
|
23
|
-
"@fluid-topics/ft-floating-menu": "1.3.
|
|
24
|
-
"@fluid-topics/ft-search-result-context": "1.3.
|
|
25
|
-
"@fluid-topics/ft-tooltip": "1.3.
|
|
26
|
-
"@fluid-topics/ft-wc-utils": "1.3.
|
|
22
|
+
"@fluid-topics/ft-chip": "1.3.47",
|
|
23
|
+
"@fluid-topics/ft-floating-menu": "1.3.47",
|
|
24
|
+
"@fluid-topics/ft-search-result-context": "1.3.47",
|
|
25
|
+
"@fluid-topics/ft-tooltip": "1.3.47",
|
|
26
|
+
"@fluid-topics/ft-wc-utils": "1.3.47",
|
|
27
27
|
"lit": "3.1.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@fluid-topics/ft-wc-test-utils": "1.3.
|
|
30
|
+
"@fluid-topics/ft-wc-test-utils": "1.3.47",
|
|
31
31
|
"@fluid-topics/public-api": "1.0.110"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "16ac56d62f3a88a3b03cbc92bcd04dd91951a015"
|
|
34
34
|
}
|