@fluid-topics/ft-search-results-spellcheck 1.2.72 → 1.3.0
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.
|
@@ -134,7 +134,7 @@ Also for action icons.`,a.colorGray200),contentGlobalSubtle:e.extend("--ft-conte
|
|
|
134
134
|
`;var $t=E(L());var Ga=E(L());var bn=E(q()),j=E(Y()),Q=E(L());var yn=E(q());var gn=yn.css`
|
|
135
135
|
`;var St=E(L()),gi="ft-app-info",yr=class extends CustomEvent{constructor(t){super("authentication-change",{detail:t})}},mi={session:(r,t)=>{(0,St.deepEqual)(r.session,t.payload)||(r.session=t.payload,setTimeout(()=>w.dispatchEvent(new yr(t.payload)),0))}},w=St.FtReduxStore.get({name:gi,reducers:mi,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],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}});var ee=E(L());var gr=E(L());var Ee=class r{static get(t){let{baseUrl:o,apiIntegrationIdentifier:n}=w.getState(),i=t??n;if(o&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,i,!0)}static await(t){return new Promise(o=>{let n=r.get(t);if(n)o(n);else{let i=w.subscribe(()=>{n=r.get(t),n&&(i(),o(n))})}})}};var rt=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Ee.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Ee.await()}};var ae=class extends rt{constructor(t=!0,o){var n;super(o);let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new gr.CacheRegistry,this.cache=t?i.commonCache:new gr.CacheRegistry}clearCache(){this.cache.clearAll()}};var mn,bi=Symbol("clearAfterUnitTest"),Ot=class extends ae{constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[mn]=()=>{this.defaultMessages={},this.cache=new ee.CacheRegistry,this.listeners={}},this.currentUiLocale=w.getState().uiLocale,w.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=w.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 i={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...o};(0,ee.deepEqual)(this.defaultMessages[t],i)||(this.defaultMessages[t]=i,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 i;let c=t.toLowerCase(),l=this.resolveContext(c);return new ee.ParametrizedLabelResolver((i=this.defaultMessages[c])!==null&&i!==void 0?i:{},l).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))}catch(i){!(i instanceof ee.CanceledPromiseError)&&o&&console.error(i)}return o&&await this.notify(t),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 i;return(i=this.listeners[t])===null||i===void 0?void 0:i.delete(o)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map(t=>this.notify(t)))}async notify(t){this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(o=>(0,ee.delay)(0).then(()=>o()).catch(()=>null)))}};mn=bi;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Ot{constructor(){super(async(r,t)=>(await this.awaitApi).getFluidTopicsMessageContext(r,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Ot{constructor(){super(async(r,t)=>(await this.awaitApi).getCustomMessageContext(r,t))}});var je=window.FluidTopicsI18nService,Ct=window.FluidTopicsCustomI18nService;var H=function(r,t,o,n){var i=arguments.length,c=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(c=(i<3?l(c):i>3?l(t,o,c):l(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c},D=class extends Q.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>Ee.get(),this.messageContexts=[],this.cache=new Q.CacheRegistry,this.cleanSessionDebouncer=new Q.Debouncer}render(){return bn.html`
|
|
136
136
|
<slot></slot>
|
|
137
|
-
`}update(t){var o,n,i,c,l;super.update(t),t.has("baseUrl")&&(w.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&w.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&w.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&w.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&w.actions.noCustom(this.noCustom),t.has("editorMode")&&w.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&w.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&w.actions.session(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(d=>je.addContext(d)),t.has("openExternalDocumentInNewTab")&&w.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&w.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&w.actions.forcedOffline(this.forcedOffline),t.has("localesConfiguration")&&(w.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),w.actions.availableUiLocales((i=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&i!==void 0?i:[]),w.actions.searchInAllLanguagesAllowed((l=(c=this.localesConfiguration)===null||c===void 0?void 0:c.allLanguagesAllowed)!==null&&l!==void 0?l:!1)),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let 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())}};D.elementDefinitions={};D.styles=gn;H([(0,j.property)()],D.prototype,"baseUrl",void 0);H([(0,j.property)()],D.prototype,"apiIntegrationIdentifier",void 0);H([(0,j.property)()],D.prototype,"uiLocale",void 0);H([(0,Q.jsonProperty)(null)],D.prototype,"availableUiLocales",void 0);H([(0,Q.jsonProperty)(null)],D.prototype,"metadataConfiguration",void 0);H([(0,j.property)({type:Boolean})],D.prototype,"editorMode",void 0);H([(0,j.property)({type:Boolean})],D.prototype,"noCustom",void 0);H([(0,j.property)({type:Boolean})],D.prototype,"openExternalDocumentInNewTab",void 0);H([(0,j.property)({converter:{fromAttribute(r){return r==="false"?!1:r==="true"||(r??!1)}}})],D.prototype,"noCustomComponent",void 0);H([(0,j.property)({type:Boolean})],D.prototype,"withManualResources",void 0);H([(0,j.property)({type:Boolean})],D.prototype,"navigatorOnline",void 0);H([(0,j.property)({type:Boolean})],D.prototype,"forcedOffline",void 0);H([(0,j.property)({type:Object})],D.prototype,"apiProvider",void 0);H([(0,Q.jsonProperty)([])],D.prototype,"messageContexts",void 0);H([(0,Q.jsonProperty)(void 0)],D.prototype,"session",void 0);H([(0,j.state)()],D.prototype,"localesConfiguration",void 0);var ac=E(Y());function xi(r,t){if(r===t)return!0;if(r&&t&&typeof r=="object"&&typeof t=="object"){if(r.constructor!==t.constructor)return!1;var o,n,i;if(Array.isArray(r)){if(o=r.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!Et(r[n],t[n]))return!1;return!0}if(r instanceof Map&&t instanceof Map){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;for(n of r.entries())if(!Et(n[1],t.get(n[0])))return!1;return!0}if(r instanceof Set&&t instanceof Set){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;return!0}if(r.constructor===RegExp)return r.source===t.source&&r.flags===t.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===t.valueOf();let c=l=>Object.keys(l).filter(d=>l[d]!=null);if(i=c(r),o=i.length,o!==c(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=o;n--!==0;){let l=i[n];if(!Et(r[l],t[l]))return!1}return!0}return r!==r&&t!==t||r==null&&t==null}function Et(r,t){try{return xi(r,t)}catch{return!1}}function wt(r,t){return!Et(r,t)}var vi=E(Y(),1);var At=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 $e=E(Y(),1);var xn=E(Y(),1);function vn(r,t){let o=()=>JSON.parse(JSON.stringify(r));return(0,xn.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:wt,...t??{}})}var It=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,c=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let l of n)try{await l()}catch(d){i(d);return}c(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var On=E(q(),1);var Rt=globalThis,Si=Rt.ShadowRoot&&(Rt.ShadyCSS===void 0||Rt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,wp=Symbol();var Sn=(r,t)=>{if(Si)r.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of t){let n=document.createElement("style"),i=Rt.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,r.appendChild(n)}};var Nt=class extends On.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([i,c])=>t.registry.define(i,c)));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return Sn(n,t.elementStyles),n}};function Cn(r,t,...o){var n;let i=r.querySelector(t);for(let c of o)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(c);return i}var ot=function(r,t,o,n){var i=arguments.length,c=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(c=(i<3?l(c):i>3?l(t,o,c):l(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c},In,En=Symbol("constructorPrototype"),wn=Symbol("constructorName"),Rn=Symbol("exportpartsDebouncer"),An=Symbol("dynamicDependenciesLoaded"),ie=class extends Nt{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[In]=new It(5),this[wn]=this.constructor.name,this[En]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[wn]&&Object.setPrototypeOf(this,this[En])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let t=this.constructor;t[An]||(t[An]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate()})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let c=[...i??[],n];o=Cn(this.shadowRoot,...c)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var o,n,i;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(c=>c.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(c){console.error(c,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let c=document.createElement("style");c.classList.add("ft-lit-element--custom-stylesheet"),c.innerHTML=this.customStylesheet,this.shadowRoot.append(c)}}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[Rn].run(()=>{var i,c;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((c=this.exportpartsPrefixes)===null||c===void 0?void 0:c.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(t){var o,n,i,c,l,d;let u=g=>g!=null&&g.trim().length>0,p=t.filter(u).map(g=>g.trim());if(p.length===0){this.removeAttribute("exportparts");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 v=(c=(i=g.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&c!==void 0?c:[],b=(d=(l=g.getAttribute("exportparts"))===null||l===void 0?void 0:l.split(",").map(S=>S.split(":")[1]))!==null&&d!==void 0?d:[];new Array(...v,...b).filter(u).map(S=>S.trim()).forEach(S=>y.add(S))}if(y.size===0){this.removeAttribute("exportparts");return}let h=[...y.values()].flatMap(g=>p.map(v=>`${g}:${v}--${g}`));this.setAttribute("exportparts",[...this.part,...h].join(", "))}};In=Rn;ot([(0,$e.property)()],ie.prototype,"exportpartsPrefix",void 0);ot([vn([])],ie.prototype,"exportpartsPrefixes",void 0);ot([(0,$e.property)()],ie.prototype,"customStylesheet",void 0);ot([(0,$e.property)()],ie.prototype,"elementToFocus",void 0);ot([(0,$e.state)()],ie.prototype,"useAdoptedStyleSheets",void 0);function nt(r){var t;return(t=r?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Nn,Tn,Pn,at=Symbol("internalReduxEventsUnsubscribers"),ue=Symbol("internalStoresUnsubscribers"),we=Symbol("internalStores"),it=class extends ie{constructor(){super(...arguments),this[Nn]=new Map,this[Tn]=new Map,this[Pn]=new Map}get reduxConstructor(){return this.constructor}update(t){super.update(t),[...this.reduxConstructor.reduxReactiveProperties].some(o=>t.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[we].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[we].values()][0]}getStore(t){return t==null?this.getUnnamedStore():this[we].get(t)}addStore(t,o){var n;o=(n=o??(nt(t)?t.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this[we].set(o,t),this.subscribeToStore(o,t),this.updateFromStores()}removeStore(t){let o=typeof t=="string"?t:t.name;this.unsubscribeFromStore(o),this[we].delete(o)}setupStores(){this.unsubscribeFromStores(),this[we].forEach((t,o)=>this.subscribeToStore(o,t)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((t,o)=>{let n=this.constructor.getPropertyOptions(o);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:o)){let i=this.getStore(t.store);i&&(t.store?this[ue].has(t.store):this[ue].size>0)&&(this[o]=t.selector(i.getState(),this))}})}subscribeToStore(t,o){var n;this[ue].set(t,o.subscribe(()=>this.updateFromStores())),this[at].set(t,[]),nt(o)&&o.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((i,c)=>{if(typeof this[c]=="function"&&(!i.store||o.name===i.store)){let l=d=>this[c](d);o.addEventListener(i.eventName,l),this[at].get(t).push(()=>o.removeEventListener(i.eventName,l))}})),this.onStoreAvailable(t)}unsubscribeFromStores(){this[ue].forEach((t,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(t){var o;this[ue].has(t)&&this[ue].get(t)(),this[ue].delete(t),(o=this[at].get(t))===null||o===void 0||o.forEach(n=>n()),this[at].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};Nn=ue,Tn=we,Pn=at;it.reduxProperties=new Map;it.reduxReactiveProperties=new Set;it.reduxEventListeners=new Map;function V(r){for(var t=arguments.length,o=Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];if(0)var i,c;throw Error("[Immer] minified error nr: "+r+(o.length?" "+o.map(function(l){return"'"+l+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ce(r){return!!r&&!!r[k]}function X(r){var t;return!!r&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===Ni}(r)||Array.isArray(r)||!!r[Bn]||!!(!((t=r.constructor)===null||t===void 0)&&t[Bn])||wr(r)||Ar(r))}function Ae(r,t,o){o===void 0&&(o=!1),Ze(r)===0?(o?Object.keys:Ve)(r).forEach(function(n){o&&typeof n=="symbol"||t(n,r[n],r)}):r.forEach(function(n,i){return t(i,n,r)})}function Ze(r){var t=r[k];return t?t.i>3?t.i-4:t.i:Array.isArray(r)?1:wr(r)?2:Ar(r)?3:0}function Ke(r,t){return Ze(r)===2?r.has(t):Object.prototype.hasOwnProperty.call(r,t)}function Oi(r,t){return Ze(r)===2?r.get(t):r[t]}function Mn(r,t,o){var n=Ze(r);n===2?r.set(t,o):n===3?r.add(o):r[t]=o}function Wn(r,t){return r===t?r!==0||1/r==1/t:r!=r&&t!=t}function wr(r){return Ii&&r instanceof Map}function Ar(r){return Ri&&r instanceof Set}function pe(r){return r.o||r.t}function Ir(r){if(Array.isArray(r))return Array.prototype.slice.call(r);var t=Gn(r);delete t[k];for(var o=Ve(t),n=0;n<o.length;n++){var i=o[n],c=t[i];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(t[i]={configurable:!0,writable:!0,enumerable:c.enumerable,value:r[i]})}return Object.create(Object.getPrototypeOf(r),t)}function Rr(r,t){return t===void 0&&(t=!1),Nr(r)||ce(r)||!X(r)||(Ze(r)>1&&(r.set=r.add=r.clear=r.delete=Ci),Object.freeze(r),t&&Ae(r,function(o,n){return Rr(n,!0)},!0)),r}function Ci(){V(2)}function Nr(r){return r==null||typeof r!="object"||Object.isFrozen(r)}function te(r){var t=Er[r];return t||V(18,r),t}function Ei(r,t){Er[r]||(Er[r]=t)}function Sr(){return st}function mr(r,t){t&&(te("Patches"),r.u=[],r.s=[],r.v=t)}function Tt(r){Or(r),r.p.forEach(wi),r.p=null}function Or(r){r===st&&(st=r.l)}function _n(r){return st={p:[],l:st,h:r,m:!0,_:0}}function wi(r){var t=r[k];t.i===0||t.i===1?t.j():t.g=!0}function br(r,t){t._=t.p.length;var o=t.p[0],n=r!==void 0&&r!==o;return t.h.O||te("ES5").S(t,r,n),n?(o[k].P&&(Tt(t),V(4)),X(r)&&(r=Pt(t,r),t.l||_t(t,r)),t.u&&te("Patches").M(o[k].t,r,t.u,t.s)):r=Pt(t,o,[]),Tt(t),t.u&&t.v(t.u,t.s),r!==zn?r:void 0}function Pt(r,t,o){if(Nr(t))return t;var n=t[k];if(!n)return Ae(t,function(d,u){return Ln(r,n,t,d,u,o)},!0),t;if(n.A!==r)return t;if(!n.P)return _t(r,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=Ir(n.k):n.o,c=i,l=!1;n.i===3&&(c=new Set(i),i.clear(),l=!0),Ae(c,function(d,u){return Ln(r,n,i,d,u,o,l)}),_t(r,i,!1),o&&r.u&&te("Patches").N(n,o,r.u,r.s)}return n.o}function Ln(r,t,o,n,i,c,l){if(ce(i)){var d=Pt(r,i,c&&t&&t.i!==3&&!Ke(t.R,n)?c.concat(n):void 0);if(Mn(o,n,d),!ce(d))return;r.m=!1}else l&&o.add(i);if(X(i)&&!Nr(i)){if(!r.h.D&&r._<1)return;Pt(r,i),t&&t.A.l||_t(r,i)}}function _t(r,t,o){o===void 0&&(o=!1),!r.l&&r.h.D&&r.m&&Rr(t,o)}function xr(r,t){var o=r[k];return(o?pe(o):r)[t]}function kn(r,t){if(t in r)for(var o=Object.getPrototypeOf(r);o;){var n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=Object.getPrototypeOf(o)}}function fe(r){r.P||(r.P=!0,r.l&&fe(r.l))}function vr(r){r.o||(r.o=Ir(r.t))}function Cr(r,t,o){var n=wr(t)?te("MapSet").F(t,o):Ar(t)?te("MapSet").T(t,o):r.O?function(i,c){var l=Array.isArray(i),d={i:l?1:0,A:c?c.A:Sr(),P:!1,I:!1,R:{},l:c,t:i,k:null,o:null,j:null,C:!1},u=d,p=lt;l&&(u=[d],p=ct);var y=Proxy.revocable(u,p),h=y.revoke,g=y.proxy;return d.k=g,d.j=h,g}(t,o):te("ES5").J(t,o);return(o?o.A:Sr()).p.push(n),n}function Ai(r){return ce(r)||V(22,r),function t(o){if(!X(o))return o;var n,i=o[k],c=Ze(o);if(i){if(!i.P&&(i.i<4||!te("ES5").K(i)))return i.t;i.I=!0,n=Fn(o,c),i.I=!1}else n=Fn(o,c);return Ae(n,function(l,d){i&&Oi(i.t,l)===d||Mn(n,l,t(d))}),c===3?new Set(n):n}(r)}function Fn(r,t){switch(t){case 2:return new Map(r);case 3:return Array.from(r)}return Ir(r)}function Hn(){function r(l,d){var u=c[l];return u?u.enumerable=d:c[l]=u={configurable:!0,enumerable:d,get:function(){var p=this[k];return lt.get(p,l)},set:function(p){var y=this[k];lt.set(y,l,p)}},u}function t(l){for(var d=l.length-1;d>=0;d--){var u=l[d][k];if(!u.P)switch(u.i){case 5:n(u)&&fe(u);break;case 4:o(u)&&fe(u)}}}function o(l){for(var d=l.t,u=l.k,p=Ve(u),y=p.length-1;y>=0;y--){var h=p[y];if(h!==k){var g=d[h];if(g===void 0&&!Ke(d,h))return!0;var v=u[h],b=v&&v[k];if(b?b.t!==g:!Wn(v,g))return!0}}var S=!!d[k];return p.length!==Ve(d).length+(S?0:1)}function n(l){var d=l.k;if(d.length!==l.t.length)return!0;var u=Object.getOwnPropertyDescriptor(d,d.length-1);if(u&&!u.get)return!0;for(var p=0;p<d.length;p++)if(!d.hasOwnProperty(p))return!0;return!1}function i(l){l.g&&V(3,JSON.stringify(pe(l)))}var c={};Ei("ES5",{J:function(l,d){var u=Array.isArray(l),p=function(h,g){if(h){for(var v=Array(g.length),b=0;b<g.length;b++)Object.defineProperty(v,""+b,r(b,!0));return v}var S=Gn(g);delete S[k];for(var N=Ve(S),A=0;A<N.length;A++){var I=N[A];S[I]=r(I,h||!!S[I].enumerable)}return Object.create(Object.getPrototypeOf(g),S)}(u,l),y={i:u?5:4,A:d?d.A:Sr(),P:!1,I:!1,R:{},l:d,t:l,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,k,{value:y,writable:!0}),p},S:function(l,d,u){u?ce(d)&&d[k].A===l&&t(l.p):(l.u&&function p(y){if(y&&typeof y=="object"){var h=y[k];if(h){var g=h.t,v=h.k,b=h.R,S=h.i;if(S===4)Ae(v,function(T){T!==k&&(g[T]!==void 0||Ke(g,T)?b[T]||p(v[T]):(b[T]=!0,fe(h)))}),Ae(g,function(T){v[T]!==void 0||Ke(v,T)||(b[T]=!1,fe(h))});else if(S===5){if(n(h)&&(fe(h),b.length=!0),v.length<g.length)for(var N=v.length;N<g.length;N++)b[N]=!1;else for(var A=g.length;A<v.length;A++)b[A]=!0;for(var I=Math.min(v.length,g.length),_=0;_<I;_++)v.hasOwnProperty(_)||(b[_]=!0),b[_]===void 0&&p(v[_])}}}}(l.p[0]),t(l.p))},K:function(l){return l.i===4?o(l):n(l)}})}var Dn,st,Tr=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Ii=typeof Map<"u",Ri=typeof Set<"u",Un=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",zn=Tr?Symbol.for("immer-nothing"):((Dn={})["immer-nothing"]=!0,Dn),Bn=Tr?Symbol.for("immer-draftable"):"__$immer_draftable",k=Tr?Symbol.for("immer-state"):"__$immer_state";var Ni=""+Object.prototype.constructor,Ve=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:Object.getOwnPropertyNames,Gn=Object.getOwnPropertyDescriptors||function(r){var t={};return Ve(r).forEach(function(o){t[o]=Object.getOwnPropertyDescriptor(r,o)}),t},Er={},lt={get:function(r,t){if(t===k)return r;var o=pe(r);if(!Ke(o,t))return function(i,c,l){var d,u=kn(c,l);return u?"value"in u?u.value:(d=u.get)===null||d===void 0?void 0:d.call(i.k):void 0}(r,o,t);var n=o[t];return r.I||!X(n)?n:n===xr(r.t,t)?(vr(r),r.o[t]=Cr(r.A.h,n,r)):n},has:function(r,t){return t in pe(r)},ownKeys:function(r){return Reflect.ownKeys(pe(r))},set:function(r,t,o){var n=kn(pe(r),t);if(n?.set)return n.set.call(r.k,o),!0;if(!r.P){var i=xr(pe(r),t),c=i?.[k];if(c&&c.t===o)return r.o[t]=o,r.R[t]=!1,!0;if(Wn(o,i)&&(o!==void 0||Ke(r.t,t)))return!0;vr(r),fe(r)}return r.o[t]===o&&(o!==void 0||t in r.o)||Number.isNaN(o)&&Number.isNaN(r.o[t])||(r.o[t]=o,r.R[t]=!0),!0},deleteProperty:function(r,t){return xr(r.t,t)!==void 0||t in r.t?(r.R[t]=!1,vr(r),fe(r)):delete r.R[t],r.o&&delete r.o[t],!0},getOwnPropertyDescriptor:function(r,t){var o=pe(r),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{writable:!0,configurable:r.i!==1||t!=="length",enumerable:n.enumerable,value:o[t]}},defineProperty:function(){V(11)},getPrototypeOf:function(r){return Object.getPrototypeOf(r.t)},setPrototypeOf:function(){V(12)}},ct={};Ae(lt,function(r,t){ct[r]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),ct.deleteProperty=function(r,t){return ct.set.call(this,r,t,void 0)},ct.set=function(r,t,o){return lt.set.call(this,r[0],t,o,r[0])};var Ti=function(){function r(o){var n=this;this.O=Un,this.D=!0,this.produce=function(i,c,l){if(typeof i=="function"&&typeof c!="function"){var d=c;c=i;var u=n;return function(S){var N=this;S===void 0&&(S=d);for(var A=arguments.length,I=Array(A>1?A-1:0),_=1;_<A;_++)I[_-1]=arguments[_];return u.produce(S,function(T){var M;return(M=c).call.apply(M,[N,T].concat(I))})}}var p;if(typeof c!="function"&&V(6),l!==void 0&&typeof l!="function"&&V(7),X(i)){var y=_n(n),h=Cr(n,i,void 0),g=!0;try{p=c(h),g=!1}finally{g?Tt(y):Or(y)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(S){return mr(y,l),br(S,y)},function(S){throw Tt(y),S}):(mr(y,l),br(p,y))}if(!i||typeof i!="object"){if((p=c(i))===void 0&&(p=i),p===zn&&(p=void 0),n.D&&Rr(p,!0),l){var v=[],b=[];te("Patches").M(i,p,v,b),l(v,b)}return p}V(21,i)},this.produceWithPatches=function(i,c){if(typeof i=="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(v){return i.apply(void 0,[v].concat(h))})};var l,d,u=n.produce(i,c,function(p,y){l=p,d=y});return typeof Promise<"u"&&u instanceof Promise?u.then(function(p){return[p,l,d]}):[u,l,d]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var t=r.prototype;return t.createDraft=function(o){X(o)||V(8),ce(o)&&(o=Ai(o));var n=_n(this),i=Cr(this,o,void 0);return i[k].C=!0,Or(n),i},t.finishDraft=function(o,n){var i=o&&o[k],c=i.A;return mr(c,n),br(void 0,c)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!Un&&V(20),this.O=o},t.applyPatches=function(o,n){var i;for(i=n.length-1;i>=0;i--){var c=n[i];if(c.path.length===0&&c.op==="replace"){o=c.value;break}}i>-1&&(n=n.slice(i+1));var l=te("Patches").$;return ce(o)?l(o,n):this.produce(o,function(d){return l(d,n)})},r}(),$=new Ti,Pi=$.produce,Mp=$.produceWithPatches.bind($),Wp=$.setAutoFreeze.bind($),Hp=$.setUseProxies.bind($),zp=$.applyPatches.bind($),Gp=$.createDraft.bind($),jp=$.finishDraft.bind($),Lt=Pi;function Ie(r){"@babel/helpers - typeof";return Ie=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ie(r)}function jn(r,t){if(Ie(r)!="object"||!r)return r;var o=r[Symbol.toPrimitive];if(o!==void 0){var n=o.call(r,t||"default");if(Ie(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function $n(r){var t=jn(r,"string");return Ie(t)=="symbol"?t:t+""}function Kn(r,t,o){return(t=$n(t))in r?Object.defineProperty(r,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[t]=o,r}function Vn(r,t){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),o.push.apply(o,n)}return o}function Pr(r){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?Vn(Object(o),!0).forEach(function(n){Kn(r,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):Vn(Object(o)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(o,n))})}return r}function z(r){return"Minified Redux error #"+r+"; visit https://redux.js.org/Errors?code="+r+" for the full message or use the non-minified dev environment for full errors. "}var Zn=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),_r=function(){return Math.random().toString(36).substring(7).split("").join(".")},kt={INIT:"@@redux/INIT"+_r(),REPLACE:"@@redux/REPLACE"+_r(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+_r()}};function _i(r){if(typeof r!="object"||r===null)return!1;for(var t=r;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(r)===t}function Lr(r,t,o){var n;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(z(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(z(1));return o(Lr)(r,t)}if(typeof r!="function")throw new Error(z(2));var i=r,c=t,l=[],d=l,u=!1;function p(){d===l&&(d=l.slice())}function y(){if(u)throw new Error(z(3));return c}function h(S){if(typeof S!="function")throw new Error(z(4));if(u)throw new Error(z(5));var N=!0;return p(),d.push(S),function(){if(N){if(u)throw new Error(z(6));N=!1,p();var I=d.indexOf(S);d.splice(I,1),l=null}}}function g(S){if(!_i(S))throw new Error(z(7));if(typeof S.type>"u")throw new Error(z(8));if(u)throw new Error(z(9));try{u=!0,c=i(c,S)}finally{u=!1}for(var N=l=d,A=0;A<N.length;A++){var I=N[A];I()}return S}function v(S){if(typeof S!="function")throw new Error(z(10));i=S,g({type:kt.REPLACE})}function b(){var S,N=h;return S={subscribe:function(I){if(typeof I!="object"||I===null)throw new Error(z(11));function _(){I.next&&I.next(y())}_();var T=N(_);return{unsubscribe:T}}},S[Zn]=function(){return this},S}return g({type:kt.INIT}),n={dispatch:g,subscribe:h,getState:y,replaceReducer:v},n[Zn]=b,n}function Li(r){Object.keys(r).forEach(function(t){var o=r[t],n=o(void 0,{type:kt.INIT});if(typeof n>"u")throw new Error(z(12));if(typeof o(void 0,{type:kt.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(z(13))})}function qn(r){for(var t=Object.keys(r),o={},n=0;n<t.length;n++){var i=t[n];typeof r[i]=="function"&&(o[i]=r[i])}var c=Object.keys(o),l,d;try{Li(o)}catch(u){d=u}return function(p,y){if(p===void 0&&(p={}),d)throw d;if(0)var h;for(var g=!1,v={},b=0;b<c.length;b++){var S=c[b],N=o[S],A=p[S],I=N(A,y);if(typeof I>"u"){var _=y&&y.type;throw new Error(z(14))}v[S]=I,g=g||I!==A}return g=g||c.length!==Object.keys(p).length,g?v:p}}function qe(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function Yn(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),c=function(){throw new Error(z(15))},l={getState:i.getState,dispatch:function(){return c.apply(void 0,arguments)}},d=t.map(function(u){return u(l)});return c=qe.apply(void 0,d)(i.dispatch),Pr(Pr({},i),{},{dispatch:c})}}}function Qn(r){var t=function(n){var i=n.dispatch,c=n.getState;return function(l){return function(d){return typeof d=="function"?d(i,c,r):l(d)}}};return t}var Xn=Qn();Xn.withExtraArgument=Qn;var kr=Xn;var oa=function(){var r=function(t,o){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var c in i)Object.prototype.hasOwnProperty.call(i,c)&&(n[c]=i[c])},r(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");r(t,o);function n(){this.constructor=t}t.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),ki=function(r,t){var o={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},n,i,c,l;return l={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function d(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,i&&(c=p[0]&2?i.return:p[0]?i.throw||((c=i.return)&&c.call(i),0):i.next)&&!(c=c.call(i,p[1])).done)return c;switch(i=0,c&&(p=[p[0]&2,c.value]),p[0]){case 0:case 1:c=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,i=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(c=o.trys,!(c=c.length>0&&c[c.length-1])&&(p[0]===6||p[0]===2)){o=0;continue}if(p[0]===3&&(!c||p[1]>c[0]&&p[1]<c[3])){o.label=p[1];break}if(p[0]===6&&o.label<c[1]){o.label=c[1],c=p;break}if(c&&o.label<c[2]){o.label=c[2],o.ops.push(p);break}c[2]&&o.ops.pop(),o.trys.pop();continue}p=t.call(r,o)}catch(y){p=[6,y],i=0}finally{n=c=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Ye=function(r,t){for(var o=0,n=t.length,i=r.length;o<n;o++,i++)r[i]=t[o];return r},Fi=Object.defineProperty,Di=Object.defineProperties,Ui=Object.getOwnPropertyDescriptors,Jn=Object.getOwnPropertySymbols,Bi=Object.prototype.hasOwnProperty,Mi=Object.prototype.propertyIsEnumerable,ea=function(r,t,o){return t in r?Fi(r,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[t]=o},he=function(r,t){for(var o in t||(t={}))Bi.call(t,o)&&ea(r,o,t[o]);if(Jn)for(var n=0,i=Jn(t);n<i.length;n++){var o=i[n];Mi.call(t,o)&&ea(r,o,t[o])}return r},Fr=function(r,t){return Di(r,Ui(t))},Wi=function(r,t,o){return new Promise(function(n,i){var c=function(u){try{d(o.next(u))}catch(p){i(p)}},l=function(u){try{d(o.throw(u))}catch(p){i(p)}},d=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(c,l)};d((o=o.apply(r,t)).next())})};var Hi=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?qe:qe.apply(null,arguments)},lf=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(r){return r}};function zi(r){if(typeof r!="object"||r===null)return!1;var t=Object.getPrototypeOf(r);if(t===null)return!0;for(var o=t;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return t===o}var Gi=function(r){oa(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=r.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,Ye([void 0],o[0].concat(this)))):new(t.bind.apply(t,Ye([void 0],o.concat(this))))},t}(Array),ji=function(r){oa(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=r.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,Ye([void 0],o[0].concat(this)))):new(t.bind.apply(t,Ye([void 0],o.concat(this))))},t}(Array);function Br(r){return X(r)?Lt(r,function(){}):r}function $i(r){return typeof r=="boolean"}function Ki(){return function(t){return Vi(t)}}function Vi(r){r===void 0&&(r={});var t=r.thunk,o=t===void 0?!0:t,n=r.immutableCheck,i=n===void 0?!0:n,c=r.serializableCheck,l=c===void 0?!0:c,d=new Gi;if(o&&($i(o)?d.push(kr):d.push(kr.withExtraArgument(o.extraArgument))),0){if(i)var u;if(l)var p}return d}var Dr=!0;function na(r){var t=Ki(),o=r||{},n=o.reducer,i=n===void 0?void 0:n,c=o.middleware,l=c===void 0?t():c,d=o.devTools,u=d===void 0?!0:d,p=o.preloadedState,y=p===void 0?void 0:p,h=o.enhancers,g=h===void 0?void 0:h,v;if(typeof i=="function")v=i;else if(zi(i))v=qn(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var b=l;if(typeof b=="function"&&(b=b(t),!Dr&&!Array.isArray(b)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Dr&&b.some(function(T){return typeof T!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=Yn.apply(void 0,b),N=qe;u&&(N=Hi(he({trace:!Dr},typeof u=="object"&&u)));var A=new ji(S),I=A;Array.isArray(g)?I=Ye([S],g):typeof g=="function"&&(I=g(A));var _=N.apply(void 0,I);return Lr(v,y,_)}function ye(r,t){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(t){var c=t.apply(void 0,n);if(!c)throw new Error("prepareAction did not return an object");return he(he({type:r,payload:c.payload},"meta"in c&&{meta:c.meta}),"error"in c&&{error:c.error})}return{type:r,payload:n[0]}}return o.toString=function(){return""+r},o.type=r,o.match=function(n){return n.type===r},o}function aa(r){var t={},o=[],n,i={addCase:function(c,l){var d=typeof c=="string"?c:c.type;if(d in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[d]=l,i},addMatcher:function(c,l){return o.push({matcher:c,reducer:l}),i},addDefaultCase:function(c){return n=c,i}};return r(i),[t,o,n]}function Zi(r){return typeof r=="function"}function qi(r,t,o,n){o===void 0&&(o=[]);var i=typeof t=="function"?aa(t):[t,o,n],c=i[0],l=i[1],d=i[2],u;if(Zi(r))u=function(){return Br(r())};else{var p=Br(r);u=function(){return p}}function y(h,g){h===void 0&&(h=u());var v=Ye([c[g.type]],l.filter(function(b){var S=b.matcher;return S(g)}).map(function(b){var S=b.reducer;return S}));return v.filter(function(b){return!!b}).length===0&&(v=[d]),v.reduce(function(b,S){if(S)if(ce(b)){var N=b,A=S(N,g);return A===void 0?b:A}else{if(X(b))return Lt(b,function(I){return S(I,g)});var A=S(b,g);if(A===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return A}return b},h)}return y.getInitialState=u,y}function Yi(r,t){return r+"/"+t}function ia(r){var t=r.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof r.initialState=="function"?r.initialState:Br(r.initialState),n=r.reducers||{},i=Object.keys(n),c={},l={},d={};i.forEach(function(y){var h=n[y],g=Yi(t,y),v,b;"reducer"in h?(v=h.reducer,b=h.prepare):v=h,c[y]=v,l[g]=v,d[y]=b?ye(g,b):ye(g)});function u(){var y=typeof r.extraReducers=="function"?aa(r.extraReducers):[r.extraReducers],h=y[0],g=h===void 0?{}:h,v=y[1],b=v===void 0?[]:v,S=y[2],N=S===void 0?void 0:S,A=he(he({},g),l);return qi(o,function(I){for(var _ in A)I.addCase(_,A[_]);for(var T=0,M=b;T<M.length;T++){var Z=M[T];I.addMatcher(Z.matcher,Z.reducer)}N&&I.addDefaultCase(N)})}var p;return{name:t,reducer:function(y,h){return p||(p=u()),p(y,h)},actions:d,caseReducers:c,getInitialState:function(){return p||(p=u()),p.getInitialState()}}}var Qi="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Xi=function(r){r===void 0&&(r=21);for(var t="",o=r;o--;)t+=Qi[Math.random()*64|0];return t},Ji=["name","message","stack","code"],Ur=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),ta=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),ec=function(r){if(typeof r=="object"&&r!==null){for(var t={},o=0,n=Ji;o<n.length;o++){var i=n[o];typeof r[i]=="string"&&(t[i]=r[i])}return t}return{message:String(r)}},ff=function(){function r(t,o,n){var i=ye(t+"/fulfilled",function(y,h,g,v){return{payload:y,meta:Fr(he({},v||{}),{arg:g,requestId:h,requestStatus:"fulfilled"})}}),c=ye(t+"/pending",function(y,h,g){return{payload:void 0,meta:Fr(he({},g||{}),{arg:h,requestId:y,requestStatus:"pending"})}}),l=ye(t+"/rejected",function(y,h,g,v,b){return{payload:v,error:(n&&n.serializeError||ec)(y||"Rejected"),meta:Fr(he({},b||{}),{arg:g,requestId:h,rejectedWithValue:!!v,requestStatus:"rejected",aborted:y?.name==="AbortError",condition:y?.name==="ConditionError"})}}),d=!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,v){var b=n?.idGenerator?n.idGenerator(y):Xi(),S=new u,N,A=!1;function I(T){N=T,S.abort()}var _=function(){return Wi(this,null,function(){var T,M,Z,be,G,xe,Te;return ki(this,function(f){switch(f.label){case 0:return f.trys.push([0,4,,5]),be=(T=n?.condition)==null?void 0:T.call(n,y,{getState:g,extra:v}),rc(be)?[4,be]:[3,2];case 1:be=f.sent(),f.label=2;case 2:if(be===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return A=!0,G=new Promise(function(m,C){return S.signal.addEventListener("abort",function(){return C({name:"AbortError",message:N||"Aborted"})})}),h(c(b,y,(M=n?.getPendingMeta)==null?void 0:M.call(n,{requestId:b,arg:y},{getState:g,extra:v}))),[4,Promise.race([G,Promise.resolve(o(y,{dispatch:h,getState:g,extra:v,requestId:b,signal:S.signal,abort:I,rejectWithValue:function(m,C){return new Ur(m,C)},fulfillWithValue:function(m,C){return new ta(m,C)}})).then(function(m){if(m instanceof Ur)throw m;return m instanceof ta?i(m.payload,b,y,m.meta):i(m,b,y)})])];case 3:return Z=f.sent(),[3,5];case 4:return xe=f.sent(),Z=xe instanceof Ur?l(null,b,y,xe.payload,xe.meta):l(xe,b,y),[3,5];case 5:return Te=n&&!n.dispatchConditionRejection&&l.match(Z)&&Z.meta.condition,Te||h(Z),[2,Z]}})})}();return Object.assign(_,{abort:I,requestId:b,arg:y,unwrap:function(){return _.then(tc)}})}}return Object.assign(p,{pending:c,rejected:l,fulfilled:i,typePrefix:t})}return r.withTypes=function(){return r},r}();function tc(r){if(r.meta&&r.meta.rejectedWithValue)throw r.payload;if(r.error)throw r.error;return r.payload}function rc(r){return r!==null&&typeof r=="object"&&typeof r.then=="function"}var ca="listener",sa="completed",la="cancelled",hf="task-"+la,yf="task-"+sa,gf=ca+"-"+la,mf=ca+"-"+sa;var Mr="listenerMiddleware";var bf=ye(Mr+"/add"),xf=ye(Mr+"/removeAll"),vf=ye(Mr+"/remove");var ra,Sf=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(r){return(ra||(ra=Promise.resolve())).then(r).catch(function(t){return setTimeout(function(){throw t},0)})},oc=function(r){return function(t){setTimeout(t,r)}},Of=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:oc(10);Hn();function nc(r,t){return class extends r{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(o,n,i){this.eventBus.addEventListener(o,n,i)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,i){this.eventBus.removeEventListener(o,n,i)}}}var Ft=class extends nc(Object){};window.ftReduxStores||(window.ftReduxStores={});var da=class r extends Ft{static get(t){var o;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,c=window.ftReduxStores[n];if(nt(c))return c;if(i==null)return;let l=ia({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),d=na({reducer:(u,p)=>p.type==="CLEAR_FT_REDUX_STORE"?l.getInitialState():typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__")?{...u,...p.overwrites}:l.reducer(u,p)});return window.ftReduxStores[i.name]=new r(l,d,i.eventBus)}constructor(t,o,n){super(),this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new At;let i=c=>c!=null?JSON.parse(JSON.stringify(c)):c;this.actions=new Proxy(this.reduxSlice.actions,{get:(c,l,d)=>{let u=l,p=c[u];return p?(...y)=>{let h=p(...y.map(i));return this.reduxStore.dispatch(h),h}:y=>{this.setState({[u]:i(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 Ht=E(L());var cc=E(pa(),1);var fa;(function(r){r.black="black",r.green="green",r.blue="blue",r.purple="purple",r.red="red",r.orange="orange",r.yellow="yellow"})(fa||(fa={}));var ha;(function(r){r.OFFICIAL="OFFICIAL",r.PERSONAL="PERSONAL",r.SHARED="SHARED"})(ha||(ha={}));var ya;(function(r){r.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",r.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",r.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",r.PERSONAL_BOOK="PERSONAL_BOOK",r.MAP_ATTACHMENT="MAP_ATTACHMENT",r.RESOURCE="RESOURCE"})(ya||(ya={}));var ga;(function(r){r.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",r.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",r.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",r.PERSONAL_BOOK="PERSONAL_BOOK",r.MAP_ATTACHMENT="MAP_ATTACHMENT",r.RESOURCE="RESOURCE"})(ga||(ga={}));var ma;(function(r){r.LAST_WEEK="LAST_WEEK",r.LAST_MONTH="LAST_MONTH",r.LAST_QUARTER="LAST_QUARTER",r.LAST_YEAR="LAST_YEAR"})(ma||(ma={}));var ba;(function(r){r.VALUE="VALUE",r.DATE="DATE",r.RANGE="RANGE"})(ba||(ba={}));var xa;(function(r){r.BOOKMARK__CREATE="BOOKMARK__CREATE",r.BOOKMARK__DELETE="BOOKMARK__DELETE",r.CASE_DEFLECTION__START="CASE_DEFLECTION__START",r.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",r.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",r.COLLECTION__CREATE="COLLECTION__CREATE",r.COLLECTION__UPDATE="COLLECTION__UPDATE",r.COLLECTION__DELETE="COLLECTION__DELETE",r.DOCUMENT__DISPLAY="DOCUMENT__DISPLAY",r.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",r.DOCUMENT__PRINT="DOCUMENT__PRINT",r.DOCUMENT__PROCESS="DOCUMENT__PROCESS",r.DOCUMENT__RATE="DOCUMENT__RATE",r.DOCUMENT__SEARCH="DOCUMENT__SEARCH",r.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",r.DOCUMENT__UNRATE="DOCUMENT__UNRATE",r.FEEDBACK__SEND="FEEDBACK__SEND",r.GEN_AI__COMPLETED_QUERY="GEN_AI__COMPLETED_QUERY",r.GEN_AI__RATE="GEN_AI__RATE",r.GENAI_CASE_DEFLECTION__START="GENAI_CASE_DEFLECTION__START",r.GENAI_CASE_DEFLECTION__OPEN_TICKET="GENAI_CASE_DEFLECTION__OPEN_TICKET",r.KHUB__PROCESS="KHUB__PROCESS",r.KHUB__SEARCH="KHUB__SEARCH",r.LABELS__DOWNLOAD="LABELS__DOWNLOAD",r.LINK__SHARE="LINK__SHARE",r.PAGE__DISPLAY="PAGE__DISPLAY",r.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",r.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",r.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",r.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",r.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",r.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",r.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",r.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",r.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",r.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",r.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",r.TOPIC__DISPLAY="TOPIC__DISPLAY",r.TOPIC__RATE="TOPIC__RATE",r.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",r.TOPIC__UNRATE="TOPIC__UNRATE",r.USER__LOGIN="USER__LOGIN",r.USER__LOGOUT="USER__LOGOUT",r.HEARTBEAT="HEARTBEAT"})(xa||(xa={}));var va;(function(r){r.THIRD_PARTY="THIRD_PARTY",r.OFF_THE_GRID="OFF_THE_GRID",r.CONTENT_PACKAGER="CONTENT_PACKAGER",r.PAGES="PAGES",r.DESIGNED_READER="DESIGNED_READER"})(va||(va={}));var Sa;(function(r){r.HOMEPAGE="HOMEPAGE",r.CUSTOM="CUSTOM",r.HEADER="HEADER",r.READER="READER",r.TOPIC_TEMPLATE="TOPIC_TEMPLATE",r.SEARCH="SEARCH",r.SEARCH_RESULT="SEARCH_RESULT"})(Sa||(Sa={}));var Oa;(function(r){r.CLASSIC="CLASSIC",r.CUSTOM="CUSTOM",r.DESIGNER="DESIGNER"})(Oa||(Oa={}));var Ca;(function(r){r.AND="AND",r.OR="OR",r.MONOVALUED="MONOVALUED"})(Ca||(Ca={}));var Ea;(function(r){r.NONE="NONE",r.ALPHABET="ALPHABET",r.VERSION="VERSION"})(Ea||(Ea={}));var wa;(function(r){r.STARS="STARS",r.LIKE="LIKE",r.DICHOTOMOUS="DICHOTOMOUS",r.NO_RATING="NO_RATING"})(wa||(wa={}));var Aa;(function(r){r.LAST_WEEK="LAST_WEEK",r.LAST_MONTH="LAST_MONTH",r.LAST_QUARTER="LAST_QUARTER",r.LAST_YEAR="LAST_YEAR",r.CUSTOM="CUSTOM"})(Aa||(Aa={}));var Ia;(function(r){r.ASC="ASC",r.DESC="DESC"})(Ia||(Ia={}));var Ra;(function(r){r.ALPHA="ALPHA",r.NATURAL="NATURAL"})(Ra||(Ra={}));var Wr;(function(r){r.EVERYWHERE="EVERYWHERE",r.TITLE_ONLY="TITLE_ONLY",r.NONE="NONE"})(Wr||(Wr={}));var Na;(function(r){r.ARTICLE="ARTICLE",r.BOOK="BOOK",r.SHARED_BOOK="SHARED_BOOK"})(Na||(Na={}));var Ta;(function(r){r.FLUIDTOPICS="FLUIDTOPICS",r.EXTERNAL="EXTERNAL"})(Ta||(Ta={}));var Pa;(function(r){r.MAP="MAP",r.DOCUMENT="DOCUMENT",r.TOPIC="TOPIC",r.PERSONAL_BOOK="PERSONAL_BOOK",r.SHARED_BOOK="SHARED_BOOK"})(Pa||(Pa={}));var _a;(function(r){r.LAST_WEEK="LAST_WEEK",r.LAST_MONTH="LAST_MONTH",r.LAST_QUARTER="LAST_QUARTER",r.LAST_YEAR="LAST_YEAR"})(_a||(_a={}));var La;(function(r){r.MAP="MAP",r.DOCUMENT="DOCUMENT",r.TOPIC="TOPIC"})(La||(La={}));var Hr;(function(r){r.DEFAULT="DEFAULT",r.DOCUMENTS="DOCUMENTS",r.ALL_TOPICS="ALL_TOPICS",r.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Hr||(Hr={}));var U;(function(r){r.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",r.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",r.HTML_EXPORT_USER="HTML_EXPORT_USER",r.PDF_EXPORT_USER="PDF_EXPORT_USER",r.SAVED_SEARCH_USER="SAVED_SEARCH_USER",r.COLLECTION_USER="COLLECTION_USER",r.OFFLINE_USER="OFFLINE_USER",r.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",r.ANALYTICS_USER="ANALYTICS_USER",r.BETA_USER="BETA_USER",r.DEBUG_USER="DEBUG_USER",r.PRINT_USER="PRINT_USER",r.RATING_USER="RATING_USER",r.FEEDBACK_USER="FEEDBACK_USER",r.GENERATIVE_AI_USER="GENERATIVE_AI_USER",r.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",r.CONTENT_PUBLISHER="CONTENT_PUBLISHER",r.KHUB_ADMIN="KHUB_ADMIN",r.USERS_ADMIN="USERS_ADMIN",r.PORTAL_ADMIN="PORTAL_ADMIN",r.ADMIN="ADMIN"})(U||(U={}));var ka;(function(r){r.VALID="VALID",r.INVALID="INVALID"})(ka||(ka={}));var Fa;(function(r){r.JSON="JSON",r.TEXT="TEXT"})(Fa||(Fa={}));var Da;(function(r){r.TEXT="TEXT",r.HTML="HTML"})(Da||(Da={}));var ic={[U.PERSONAL_BOOK_SHARE_USER]:[U.PERSONAL_BOOK_USER],[U.HTML_EXPORT_USER]:[U.PERSONAL_BOOK_USER],[U.PDF_EXPORT_USER]:[U.PERSONAL_BOOK_USER],[U.KHUB_ADMIN]:[U.CONTENT_PUBLISHER],[U.ADMIN]:[U.KHUB_ADMIN,U.USERS_ADMIN,U.PORTAL_ADMIN],[U.GENERATIVE_AI_EXPORT_USER]:[U.GENERATIVE_AI_USER]};function Ua(r,t){return r===t||(ic[r]??[]).some(o=>Ua(o,t))}function Ba(r,t){return r==null?!1:(Array.isArray(r)?r:Array.isArray(r.roles)?r.roles:Array.isArray(r.profile?.roles)?r.profile.roles:[]).some(n=>Ua(n,t))}var Bt=class extends ae{async listMySearches(){let{session:t}=w.getState();return Ba(t,U.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var Mt=class extends ae{async listMyBookmarks(){let t=w.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var sc="ft-user-assets",Wt=Ht.FtReduxStore.get({name:sc,initialState:{savedSearches:void 0,bookmarks:void 0}}),zr=class{constructor(){this.currentSession=w.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Mt,this.savedSearchesService=new Bt,w.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=w.getState();(0,Ht.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Wt.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Wt.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();Wt.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Wt.actions.bookmarks(o)}}},bh=new zr;var Gr=class{addCommand(t,o=!1){w.commands.add(t,o)}consumeCommand(t){return w.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Gr;var Ma=E(L()),jr=class{highlightHtml(t,o,n){(0,Ma.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new jr;var Wa=E(L());var $r=class{isDate(t){var o,n,i,c;return(c=(i=((n=(o=w.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(d=>d.key===t))===null||i===void 0?void 0:i.date)!==null&&c!==void 0?c:!1}format(t,o){var n,i,c;return Wa.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:w.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(c=o?.withTime)!==null&&c!==void 0?c:!1)}};window.FluidTopicsDateService=new $r;var Ha=E(L());var Re=class{static get(t,o){var n,i,c,l;let d=w.getState(),{lang:u,region:p}=(i=(n=d.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new Ha.SearchPlaceConverter(d.baseUrl,(l=(c=window.FluidTopicsClientConfiguration)===null||c===void 0?void 0:c.predefinedSorts)!==null&&l!==void 0?l:{},t??20,d.searchInAllLanguagesAllowed,o??`${u}-${p}`)}};var Kr=class{urlToSearchRequest(t){return Re.get().parse(t)}searchRequestToUrl(t){return Re.get().serialize(t)}};window.FluidTopicsUrlService=new Kr;var me=E(L());var Ne=class r extends CustomEvent{constructor(t){super(r.eventName,{detail:{currentItem:t}})}};Ne.eventName="change";var Vr=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))}},za=new Vr;var zt=class r extends me.WithEventBus{static build(){return new r(window.history,za,()=>window.location,!1)}constructor(t,o,n,i){var c,l;super(),this.history=t,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(l=(c=t.state)===null||c===void 0?void 0:c.index)!==null&&l!==void 0?l:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}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,me.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Ne(this.currentItem())),0)}installProxies(){let t=o=>(n,i,[c,l,d])=>{let u=o(),p={...u===this.currentIndex?this.currentState:void 0,...c,index:u,href:typeof d=="string"?d:(d??this.windowLocation()).href};n.apply(i,[p,l,d]),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,o=!1){var n,i,c;let l={...this.buildCurrentState(),...t,index:this.currentIndex,title:(n=t?.title)!==null&&n!==void 0?n:this.currentState.title},d=o?(i=t?.majorState)!==null&&i!==void 0?i:this.currentState.majorState:(c=this.currentState.majorState)!==null&&c!==void 0?c:t?.majorState;d!=null&&(l.majorState=d),this.setCurrentState(l)}addHistoryChangeListener(t){this.addEventListener(Ne.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Ne.eventName,t)}currentItem(){return(0,me.deepCopy)(this.currentState)}back(){let t=this.previousMajorPosition();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,me.deepCopy)(this.states[this.previousMajorPosition()])}previousMajorPosition(){let t=this.currentIndex;for(;t>0&&!this.isMajorState(t);)t--;return this.previousExistingPosition(t)}forward(){let t=this.nextMajorPosition();t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){return(0,me.deepCopy)(this.states[this.nextMajorPosition()])}nextMajorPosition(){let t=this.currentIndex;do t++;while(t<this.states.length&&!this.isMajorState(t));do t++;while(t<this.states.length&&!this.isMajorState(t));return this.previousExistingPosition(t)}previousExistingPosition(t){let o=t;do o--;while(o>0&&!this.hasState(o));return o}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}isMajorState(t){var o,n;return this.hasState(t)&&((n=(o=this.states[t])===null||o===void 0?void 0:o.majorState)!==null&&n!==void 0?n:!0)}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=zt.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:r=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(r),removeHistoryChangeListener:r=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(r)});(0,Ga.customElement)("ft-app-context")(D);var Za=E(Y());var lc=E(L());function ja(r){return r.match(/^[\w-]+\.[\w-]+$/)}var dc=function(r,t,o,n){var i=arguments.length,c=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(c=(i<3?l(c):i>3?l(t,o,c):l(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c},$a=Symbol("i18nAttributes"),Ka=Symbol("i18nListAttributes"),qa=Symbol("i18nProperties"),Gt=Symbol("i18nContexts"),dt=Symbol("i18nUnsubs");function Kt(r){var t,o;class n extends r{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[o]=new Map}getI18nService(c){return c??this.useCustomMessageContexts?Ct:je}i18n(c){var l;this.hasI18nContext(c.context)||this.addI18nContext(c.context,void 0,c.custom);let d=(l=c.args)!==null&&l!==void 0?l:c.argsProvider?c.argsProvider(this):[];return this.getI18nService(c.custom).resolveMessage(c.context,c.key,...d)}customI18n(c,l){if(ja(c)){let[d,u]=c.split(".");return this.i18n({custom:!0,context:d,key:u,...l})||c}return c}firstUpdated(c){super.firstUpdated(c),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(c){super.update(c),this.updateI18nAttributes((l,d,u)=>c.has(d)||typeof l.argsProvider=="function"),this.updateI18nProperties(l=>typeof l.argsProvider=="function")}onI18nUpdate(c){this.updateI18nAttributes((l,d,u)=>{var p;return((p=u?.context)===null||p===void 0?void 0:p.toLowerCase())===c}),this.updateI18nProperties(l=>l.context.toLowerCase()===c),this.requestUpdate()}updateI18nAttributes(c){var l,d;let u=this,p=(y,h,g)=>g?.context&&g.key&&c(y,h,g)?{...g,message:this.i18n({context:g.context,key:g.key,...y})}:g;(l=this[$a])===null||l===void 0||l.forEach((y,h)=>u[h]=p(y,h,u[h])),(d=this[Ka])===null||d===void 0||d.forEach((y,h)=>{var g;return u[h]=(g=u[h])===null||g===void 0?void 0:g.map(v=>p(y,h,v))})}updateI18nProperties(c){var l;(l=this[qa])===null||l===void 0||l.forEach((d,u)=>{c(d,u)&&(this[u]=this.i18n(d))})}addI18nMessages(c,l,d){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(c,l,d)}addI18nContext(c,l,d){let u=(typeof c=="string"?c:c.name).toLowerCase();d=typeof c=="string"?d:c.custom,this[Gt].set(u,{isCustomContext:d}),this[dt].has(u)||this[dt].set(u,this.getI18nService(d).subscribe(u,()=>this.onI18nUpdate(u))),this.getI18nService(d).prepareContext(u,l)}hasI18nContext(c){return this[Gt].has(c.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Gt].forEach((c,l)=>this.addI18nContext(l,void 0,c.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[dt].forEach(c=>c()),this[dt].clear()}}return t=Gt,o=dt,dc([(0,Za.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}var Va=class extends Kt($t.FtLitElement){},jt=class extends Kt($t.FtLitElementRedux){};var ut=function(r,t,o,n){var i=arguments.length,c=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(c=(i<3?l(c):i>3?l(t,o,c):l(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c},J=class extends jt{constructor(){super(),this.editorMode=!1,this.addStore(w)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Vt.nothing:Vt.html`
|
|
137
|
+
`}update(t){var o,n,i,c,l;super.update(t),t.has("baseUrl")&&(w.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&w.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&w.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&w.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&w.actions.noCustom(this.noCustom),t.has("editorMode")&&w.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&w.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&w.actions.session(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(d=>je.addContext(d)),t.has("openExternalDocumentInNewTab")&&w.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&w.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&w.actions.forcedOffline(this.forcedOffline),t.has("localesConfiguration")&&(w.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),w.actions.availableUiLocales((i=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&i!==void 0?i:[]),w.actions.searchInAllLanguagesAllowed((l=(c=this.localesConfiguration)===null||c===void 0?void 0:c.allLanguagesAllowed)!==null&&l!==void 0?l:!1)),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let 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())}};D.elementDefinitions={};D.styles=gn;H([(0,j.property)()],D.prototype,"baseUrl",void 0);H([(0,j.property)()],D.prototype,"apiIntegrationIdentifier",void 0);H([(0,j.property)()],D.prototype,"uiLocale",void 0);H([(0,Q.jsonProperty)(null)],D.prototype,"availableUiLocales",void 0);H([(0,Q.jsonProperty)(null)],D.prototype,"metadataConfiguration",void 0);H([(0,j.property)({type:Boolean})],D.prototype,"editorMode",void 0);H([(0,j.property)({type:Boolean})],D.prototype,"noCustom",void 0);H([(0,j.property)({type:Boolean})],D.prototype,"openExternalDocumentInNewTab",void 0);H([(0,j.property)({converter:{fromAttribute(r){return r==="false"?!1:r==="true"||(r??!1)}}})],D.prototype,"noCustomComponent",void 0);H([(0,j.property)({type:Boolean})],D.prototype,"withManualResources",void 0);H([(0,j.property)({type:Boolean})],D.prototype,"navigatorOnline",void 0);H([(0,j.property)({type:Boolean})],D.prototype,"forcedOffline",void 0);H([(0,j.property)({type:Object})],D.prototype,"apiProvider",void 0);H([(0,Q.jsonProperty)([])],D.prototype,"messageContexts",void 0);H([(0,Q.jsonProperty)(void 0)],D.prototype,"session",void 0);H([(0,j.state)()],D.prototype,"localesConfiguration",void 0);var ac=E(Y());function xi(r,t){if(r===t)return!0;if(r&&t&&typeof r=="object"&&typeof t=="object"){if(r.constructor!==t.constructor)return!1;var o,n,i;if(Array.isArray(r)){if(o=r.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!Et(r[n],t[n]))return!1;return!0}if(r instanceof Map&&t instanceof Map){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;for(n of r.entries())if(!Et(n[1],t.get(n[0])))return!1;return!0}if(r instanceof Set&&t instanceof Set){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;return!0}if(r.constructor===RegExp)return r.source===t.source&&r.flags===t.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===t.valueOf();let c=l=>Object.keys(l).filter(d=>l[d]!=null);if(i=c(r),o=i.length,o!==c(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=o;n--!==0;){let l=i[n];if(!Et(r[l],t[l]))return!1}return!0}return r!==r&&t!==t||r==null&&t==null}function Et(r,t){try{return xi(r,t)}catch{return!1}}function wt(r,t){return!Et(r,t)}var vi=E(Y(),1);var At=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 $e=E(Y(),1);var xn=E(Y(),1);function vn(r,t){let o=()=>JSON.parse(JSON.stringify(r));return(0,xn.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:wt,...t??{}})}var It=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,c=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let l of n)try{await l()}catch(d){i(d);return}c(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var On=E(q(),1);var Rt=globalThis,Si=Rt.ShadowRoot&&(Rt.ShadyCSS===void 0||Rt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,wp=Symbol();var Sn=(r,t)=>{if(Si)r.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of t){let n=document.createElement("style"),i=Rt.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,r.appendChild(n)}};var Nt=class extends On.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([i,c])=>t.registry.define(i,c)));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return Sn(n,t.elementStyles),n}};function Cn(r,t,...o){var n;let i=r.querySelector(t);for(let c of o)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(c);return i}var ot=function(r,t,o,n){var i=arguments.length,c=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(c=(i<3?l(c):i>3?l(t,o,c):l(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c},In,En=Symbol("constructorPrototype"),wn=Symbol("constructorName"),Rn=Symbol("exportpartsDebouncer"),An=Symbol("dynamicDependenciesLoaded"),ie=class extends Nt{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[In]=new It(5),this[wn]=this.constructor.name,this[En]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[wn]&&Object.setPrototypeOf(this,this[En])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let t=this.constructor;t[An]||(t[An]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate()})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let c=[...i??[],n];o=Cn(this.shadowRoot,...c)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var o,n,i;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(c=>c.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(c){console.error(c,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let c=document.createElement("style");c.classList.add("ft-lit-element--custom-stylesheet"),c.innerHTML=this.customStylesheet,this.shadowRoot.append(c)}}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[Rn].run(()=>{var i,c;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((c=this.exportpartsPrefixes)===null||c===void 0?void 0:c.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(t){var o,n,i,c,l,d;let u=g=>g!=null&&g.trim().length>0,p=t.filter(u).map(g=>g.trim());if(p.length===0){this.removeAttribute("exportparts");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 v=(c=(i=g.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&c!==void 0?c:[],b=(d=(l=g.getAttribute("exportparts"))===null||l===void 0?void 0:l.split(",").map(S=>S.split(":")[1]))!==null&&d!==void 0?d:[];new Array(...v,...b).filter(u).map(S=>S.trim()).forEach(S=>y.add(S))}if(y.size===0){this.removeAttribute("exportparts");return}let h=[...y.values()].flatMap(g=>p.map(v=>`${g}:${v}--${g}`));this.setAttribute("exportparts",[...this.part,...h].join(", "))}};In=Rn;ot([(0,$e.property)()],ie.prototype,"exportpartsPrefix",void 0);ot([vn([])],ie.prototype,"exportpartsPrefixes",void 0);ot([(0,$e.property)()],ie.prototype,"customStylesheet",void 0);ot([(0,$e.property)()],ie.prototype,"elementToFocus",void 0);ot([(0,$e.state)()],ie.prototype,"useAdoptedStyleSheets",void 0);function nt(r){var t;return(t=r?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Nn,Tn,Pn,at=Symbol("internalReduxEventsUnsubscribers"),ue=Symbol("internalStoresUnsubscribers"),we=Symbol("internalStores"),it=class extends ie{constructor(){super(...arguments),this[Nn]=new Map,this[Tn]=new Map,this[Pn]=new Map}get reduxConstructor(){return this.constructor}update(t){super.update(t),[...this.reduxConstructor.reduxReactiveProperties].some(o=>t.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[we].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[we].values()][0]}getStore(t){return t==null?this.getUnnamedStore():this[we].get(t)}addStore(t,o){var n;o=(n=o??(nt(t)?t.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this[we].set(o,t),this.subscribeToStore(o,t),this.updateFromStores()}removeStore(t){let o=typeof t=="string"?t:t.name;this.unsubscribeFromStore(o),this[we].delete(o)}setupStores(){this.unsubscribeFromStores(),this[we].forEach((t,o)=>this.subscribeToStore(o,t)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((t,o)=>{let n=this.constructor.getPropertyOptions(o);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:o)){let i=this.getStore(t.store);i&&(t.store?this[ue].has(t.store):this[ue].size>0)&&(this[o]=t.selector(i.getState(),this))}})}subscribeToStore(t,o){var n;this[ue].set(t,o.subscribe(()=>this.updateFromStores())),this[at].set(t,[]),nt(o)&&o.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((i,c)=>{if(typeof this[c]=="function"&&(!i.store||o.name===i.store)){let l=d=>this[c](d);o.addEventListener(i.eventName,l),this[at].get(t).push(()=>o.removeEventListener(i.eventName,l))}})),this.onStoreAvailable(t)}unsubscribeFromStores(){this[ue].forEach((t,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(t){var o;this[ue].has(t)&&this[ue].get(t)(),this[ue].delete(t),(o=this[at].get(t))===null||o===void 0||o.forEach(n=>n()),this[at].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};Nn=ue,Tn=we,Pn=at;it.reduxProperties=new Map;it.reduxReactiveProperties=new Set;it.reduxEventListeners=new Map;function V(r){for(var t=arguments.length,o=Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];if(0)var i,c;throw Error("[Immer] minified error nr: "+r+(o.length?" "+o.map(function(l){return"'"+l+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ce(r){return!!r&&!!r[k]}function X(r){var t;return!!r&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===Ni}(r)||Array.isArray(r)||!!r[Bn]||!!(!((t=r.constructor)===null||t===void 0)&&t[Bn])||wr(r)||Ar(r))}function Ae(r,t,o){o===void 0&&(o=!1),Ze(r)===0?(o?Object.keys:Ve)(r).forEach(function(n){o&&typeof n=="symbol"||t(n,r[n],r)}):r.forEach(function(n,i){return t(i,n,r)})}function Ze(r){var t=r[k];return t?t.i>3?t.i-4:t.i:Array.isArray(r)?1:wr(r)?2:Ar(r)?3:0}function Ke(r,t){return Ze(r)===2?r.has(t):Object.prototype.hasOwnProperty.call(r,t)}function Oi(r,t){return Ze(r)===2?r.get(t):r[t]}function Mn(r,t,o){var n=Ze(r);n===2?r.set(t,o):n===3?r.add(o):r[t]=o}function Wn(r,t){return r===t?r!==0||1/r==1/t:r!=r&&t!=t}function wr(r){return Ii&&r instanceof Map}function Ar(r){return Ri&&r instanceof Set}function pe(r){return r.o||r.t}function Ir(r){if(Array.isArray(r))return Array.prototype.slice.call(r);var t=Gn(r);delete t[k];for(var o=Ve(t),n=0;n<o.length;n++){var i=o[n],c=t[i];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(t[i]={configurable:!0,writable:!0,enumerable:c.enumerable,value:r[i]})}return Object.create(Object.getPrototypeOf(r),t)}function Rr(r,t){return t===void 0&&(t=!1),Nr(r)||ce(r)||!X(r)||(Ze(r)>1&&(r.set=r.add=r.clear=r.delete=Ci),Object.freeze(r),t&&Ae(r,function(o,n){return Rr(n,!0)},!0)),r}function Ci(){V(2)}function Nr(r){return r==null||typeof r!="object"||Object.isFrozen(r)}function te(r){var t=Er[r];return t||V(18,r),t}function Ei(r,t){Er[r]||(Er[r]=t)}function Sr(){return st}function mr(r,t){t&&(te("Patches"),r.u=[],r.s=[],r.v=t)}function Tt(r){Or(r),r.p.forEach(wi),r.p=null}function Or(r){r===st&&(st=r.l)}function _n(r){return st={p:[],l:st,h:r,m:!0,_:0}}function wi(r){var t=r[k];t.i===0||t.i===1?t.j():t.g=!0}function br(r,t){t._=t.p.length;var o=t.p[0],n=r!==void 0&&r!==o;return t.h.O||te("ES5").S(t,r,n),n?(o[k].P&&(Tt(t),V(4)),X(r)&&(r=Pt(t,r),t.l||_t(t,r)),t.u&&te("Patches").M(o[k].t,r,t.u,t.s)):r=Pt(t,o,[]),Tt(t),t.u&&t.v(t.u,t.s),r!==zn?r:void 0}function Pt(r,t,o){if(Nr(t))return t;var n=t[k];if(!n)return Ae(t,function(d,u){return Ln(r,n,t,d,u,o)},!0),t;if(n.A!==r)return t;if(!n.P)return _t(r,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=Ir(n.k):n.o,c=i,l=!1;n.i===3&&(c=new Set(i),i.clear(),l=!0),Ae(c,function(d,u){return Ln(r,n,i,d,u,o,l)}),_t(r,i,!1),o&&r.u&&te("Patches").N(n,o,r.u,r.s)}return n.o}function Ln(r,t,o,n,i,c,l){if(ce(i)){var d=Pt(r,i,c&&t&&t.i!==3&&!Ke(t.R,n)?c.concat(n):void 0);if(Mn(o,n,d),!ce(d))return;r.m=!1}else l&&o.add(i);if(X(i)&&!Nr(i)){if(!r.h.D&&r._<1)return;Pt(r,i),t&&t.A.l||_t(r,i)}}function _t(r,t,o){o===void 0&&(o=!1),!r.l&&r.h.D&&r.m&&Rr(t,o)}function xr(r,t){var o=r[k];return(o?pe(o):r)[t]}function kn(r,t){if(t in r)for(var o=Object.getPrototypeOf(r);o;){var n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=Object.getPrototypeOf(o)}}function fe(r){r.P||(r.P=!0,r.l&&fe(r.l))}function vr(r){r.o||(r.o=Ir(r.t))}function Cr(r,t,o){var n=wr(t)?te("MapSet").F(t,o):Ar(t)?te("MapSet").T(t,o):r.O?function(i,c){var l=Array.isArray(i),d={i:l?1:0,A:c?c.A:Sr(),P:!1,I:!1,R:{},l:c,t:i,k:null,o:null,j:null,C:!1},u=d,p=lt;l&&(u=[d],p=ct);var y=Proxy.revocable(u,p),h=y.revoke,g=y.proxy;return d.k=g,d.j=h,g}(t,o):te("ES5").J(t,o);return(o?o.A:Sr()).p.push(n),n}function Ai(r){return ce(r)||V(22,r),function t(o){if(!X(o))return o;var n,i=o[k],c=Ze(o);if(i){if(!i.P&&(i.i<4||!te("ES5").K(i)))return i.t;i.I=!0,n=Fn(o,c),i.I=!1}else n=Fn(o,c);return Ae(n,function(l,d){i&&Oi(i.t,l)===d||Mn(n,l,t(d))}),c===3?new Set(n):n}(r)}function Fn(r,t){switch(t){case 2:return new Map(r);case 3:return Array.from(r)}return Ir(r)}function Hn(){function r(l,d){var u=c[l];return u?u.enumerable=d:c[l]=u={configurable:!0,enumerable:d,get:function(){var p=this[k];return lt.get(p,l)},set:function(p){var y=this[k];lt.set(y,l,p)}},u}function t(l){for(var d=l.length-1;d>=0;d--){var u=l[d][k];if(!u.P)switch(u.i){case 5:n(u)&&fe(u);break;case 4:o(u)&&fe(u)}}}function o(l){for(var d=l.t,u=l.k,p=Ve(u),y=p.length-1;y>=0;y--){var h=p[y];if(h!==k){var g=d[h];if(g===void 0&&!Ke(d,h))return!0;var v=u[h],b=v&&v[k];if(b?b.t!==g:!Wn(v,g))return!0}}var S=!!d[k];return p.length!==Ve(d).length+(S?0:1)}function n(l){var d=l.k;if(d.length!==l.t.length)return!0;var u=Object.getOwnPropertyDescriptor(d,d.length-1);if(u&&!u.get)return!0;for(var p=0;p<d.length;p++)if(!d.hasOwnProperty(p))return!0;return!1}function i(l){l.g&&V(3,JSON.stringify(pe(l)))}var c={};Ei("ES5",{J:function(l,d){var u=Array.isArray(l),p=function(h,g){if(h){for(var v=Array(g.length),b=0;b<g.length;b++)Object.defineProperty(v,""+b,r(b,!0));return v}var S=Gn(g);delete S[k];for(var N=Ve(S),A=0;A<N.length;A++){var I=N[A];S[I]=r(I,h||!!S[I].enumerable)}return Object.create(Object.getPrototypeOf(g),S)}(u,l),y={i:u?5:4,A:d?d.A:Sr(),P:!1,I:!1,R:{},l:d,t:l,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,k,{value:y,writable:!0}),p},S:function(l,d,u){u?ce(d)&&d[k].A===l&&t(l.p):(l.u&&function p(y){if(y&&typeof y=="object"){var h=y[k];if(h){var g=h.t,v=h.k,b=h.R,S=h.i;if(S===4)Ae(v,function(T){T!==k&&(g[T]!==void 0||Ke(g,T)?b[T]||p(v[T]):(b[T]=!0,fe(h)))}),Ae(g,function(T){v[T]!==void 0||Ke(v,T)||(b[T]=!1,fe(h))});else if(S===5){if(n(h)&&(fe(h),b.length=!0),v.length<g.length)for(var N=v.length;N<g.length;N++)b[N]=!1;else for(var A=g.length;A<v.length;A++)b[A]=!0;for(var I=Math.min(v.length,g.length),_=0;_<I;_++)v.hasOwnProperty(_)||(b[_]=!0),b[_]===void 0&&p(v[_])}}}}(l.p[0]),t(l.p))},K:function(l){return l.i===4?o(l):n(l)}})}var Dn,st,Tr=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Ii=typeof Map<"u",Ri=typeof Set<"u",Un=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",zn=Tr?Symbol.for("immer-nothing"):((Dn={})["immer-nothing"]=!0,Dn),Bn=Tr?Symbol.for("immer-draftable"):"__$immer_draftable",k=Tr?Symbol.for("immer-state"):"__$immer_state";var Ni=""+Object.prototype.constructor,Ve=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:Object.getOwnPropertyNames,Gn=Object.getOwnPropertyDescriptors||function(r){var t={};return Ve(r).forEach(function(o){t[o]=Object.getOwnPropertyDescriptor(r,o)}),t},Er={},lt={get:function(r,t){if(t===k)return r;var o=pe(r);if(!Ke(o,t))return function(i,c,l){var d,u=kn(c,l);return u?"value"in u?u.value:(d=u.get)===null||d===void 0?void 0:d.call(i.k):void 0}(r,o,t);var n=o[t];return r.I||!X(n)?n:n===xr(r.t,t)?(vr(r),r.o[t]=Cr(r.A.h,n,r)):n},has:function(r,t){return t in pe(r)},ownKeys:function(r){return Reflect.ownKeys(pe(r))},set:function(r,t,o){var n=kn(pe(r),t);if(n?.set)return n.set.call(r.k,o),!0;if(!r.P){var i=xr(pe(r),t),c=i?.[k];if(c&&c.t===o)return r.o[t]=o,r.R[t]=!1,!0;if(Wn(o,i)&&(o!==void 0||Ke(r.t,t)))return!0;vr(r),fe(r)}return r.o[t]===o&&(o!==void 0||t in r.o)||Number.isNaN(o)&&Number.isNaN(r.o[t])||(r.o[t]=o,r.R[t]=!0),!0},deleteProperty:function(r,t){return xr(r.t,t)!==void 0||t in r.t?(r.R[t]=!1,vr(r),fe(r)):delete r.R[t],r.o&&delete r.o[t],!0},getOwnPropertyDescriptor:function(r,t){var o=pe(r),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{writable:!0,configurable:r.i!==1||t!=="length",enumerable:n.enumerable,value:o[t]}},defineProperty:function(){V(11)},getPrototypeOf:function(r){return Object.getPrototypeOf(r.t)},setPrototypeOf:function(){V(12)}},ct={};Ae(lt,function(r,t){ct[r]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),ct.deleteProperty=function(r,t){return ct.set.call(this,r,t,void 0)},ct.set=function(r,t,o){return lt.set.call(this,r[0],t,o,r[0])};var Ti=function(){function r(o){var n=this;this.O=Un,this.D=!0,this.produce=function(i,c,l){if(typeof i=="function"&&typeof c!="function"){var d=c;c=i;var u=n;return function(S){var N=this;S===void 0&&(S=d);for(var A=arguments.length,I=Array(A>1?A-1:0),_=1;_<A;_++)I[_-1]=arguments[_];return u.produce(S,function(T){var M;return(M=c).call.apply(M,[N,T].concat(I))})}}var p;if(typeof c!="function"&&V(6),l!==void 0&&typeof l!="function"&&V(7),X(i)){var y=_n(n),h=Cr(n,i,void 0),g=!0;try{p=c(h),g=!1}finally{g?Tt(y):Or(y)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(S){return mr(y,l),br(S,y)},function(S){throw Tt(y),S}):(mr(y,l),br(p,y))}if(!i||typeof i!="object"){if((p=c(i))===void 0&&(p=i),p===zn&&(p=void 0),n.D&&Rr(p,!0),l){var v=[],b=[];te("Patches").M(i,p,v,b),l(v,b)}return p}V(21,i)},this.produceWithPatches=function(i,c){if(typeof i=="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(v){return i.apply(void 0,[v].concat(h))})};var l,d,u=n.produce(i,c,function(p,y){l=p,d=y});return typeof Promise<"u"&&u instanceof Promise?u.then(function(p){return[p,l,d]}):[u,l,d]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var t=r.prototype;return t.createDraft=function(o){X(o)||V(8),ce(o)&&(o=Ai(o));var n=_n(this),i=Cr(this,o,void 0);return i[k].C=!0,Or(n),i},t.finishDraft=function(o,n){var i=o&&o[k],c=i.A;return mr(c,n),br(void 0,c)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!Un&&V(20),this.O=o},t.applyPatches=function(o,n){var i;for(i=n.length-1;i>=0;i--){var c=n[i];if(c.path.length===0&&c.op==="replace"){o=c.value;break}}i>-1&&(n=n.slice(i+1));var l=te("Patches").$;return ce(o)?l(o,n):this.produce(o,function(d){return l(d,n)})},r}(),$=new Ti,Pi=$.produce,Mp=$.produceWithPatches.bind($),Wp=$.setAutoFreeze.bind($),Hp=$.setUseProxies.bind($),zp=$.applyPatches.bind($),Gp=$.createDraft.bind($),jp=$.finishDraft.bind($),Lt=Pi;function Ie(r){"@babel/helpers - typeof";return Ie=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ie(r)}function jn(r,t){if(Ie(r)!="object"||!r)return r;var o=r[Symbol.toPrimitive];if(o!==void 0){var n=o.call(r,t||"default");if(Ie(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function $n(r){var t=jn(r,"string");return Ie(t)=="symbol"?t:t+""}function Kn(r,t,o){return(t=$n(t))in r?Object.defineProperty(r,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[t]=o,r}function Vn(r,t){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),o.push.apply(o,n)}return o}function Pr(r){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?Vn(Object(o),!0).forEach(function(n){Kn(r,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):Vn(Object(o)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(o,n))})}return r}function z(r){return"Minified Redux error #"+r+"; visit https://redux.js.org/Errors?code="+r+" for the full message or use the non-minified dev environment for full errors. "}var Zn=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),_r=function(){return Math.random().toString(36).substring(7).split("").join(".")},kt={INIT:"@@redux/INIT"+_r(),REPLACE:"@@redux/REPLACE"+_r(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+_r()}};function _i(r){if(typeof r!="object"||r===null)return!1;for(var t=r;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(r)===t}function Lr(r,t,o){var n;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(z(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(z(1));return o(Lr)(r,t)}if(typeof r!="function")throw new Error(z(2));var i=r,c=t,l=[],d=l,u=!1;function p(){d===l&&(d=l.slice())}function y(){if(u)throw new Error(z(3));return c}function h(S){if(typeof S!="function")throw new Error(z(4));if(u)throw new Error(z(5));var N=!0;return p(),d.push(S),function(){if(N){if(u)throw new Error(z(6));N=!1,p();var I=d.indexOf(S);d.splice(I,1),l=null}}}function g(S){if(!_i(S))throw new Error(z(7));if(typeof S.type>"u")throw new Error(z(8));if(u)throw new Error(z(9));try{u=!0,c=i(c,S)}finally{u=!1}for(var N=l=d,A=0;A<N.length;A++){var I=N[A];I()}return S}function v(S){if(typeof S!="function")throw new Error(z(10));i=S,g({type:kt.REPLACE})}function b(){var S,N=h;return S={subscribe:function(I){if(typeof I!="object"||I===null)throw new Error(z(11));function _(){I.next&&I.next(y())}_();var T=N(_);return{unsubscribe:T}}},S[Zn]=function(){return this},S}return g({type:kt.INIT}),n={dispatch:g,subscribe:h,getState:y,replaceReducer:v},n[Zn]=b,n}function Li(r){Object.keys(r).forEach(function(t){var o=r[t],n=o(void 0,{type:kt.INIT});if(typeof n>"u")throw new Error(z(12));if(typeof o(void 0,{type:kt.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(z(13))})}function qn(r){for(var t=Object.keys(r),o={},n=0;n<t.length;n++){var i=t[n];typeof r[i]=="function"&&(o[i]=r[i])}var c=Object.keys(o),l,d;try{Li(o)}catch(u){d=u}return function(p,y){if(p===void 0&&(p={}),d)throw d;if(0)var h;for(var g=!1,v={},b=0;b<c.length;b++){var S=c[b],N=o[S],A=p[S],I=N(A,y);if(typeof I>"u"){var _=y&&y.type;throw new Error(z(14))}v[S]=I,g=g||I!==A}return g=g||c.length!==Object.keys(p).length,g?v:p}}function qe(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function Yn(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),c=function(){throw new Error(z(15))},l={getState:i.getState,dispatch:function(){return c.apply(void 0,arguments)}},d=t.map(function(u){return u(l)});return c=qe.apply(void 0,d)(i.dispatch),Pr(Pr({},i),{},{dispatch:c})}}}function Qn(r){var t=function(n){var i=n.dispatch,c=n.getState;return function(l){return function(d){return typeof d=="function"?d(i,c,r):l(d)}}};return t}var Xn=Qn();Xn.withExtraArgument=Qn;var kr=Xn;var oa=function(){var r=function(t,o){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var c in i)Object.prototype.hasOwnProperty.call(i,c)&&(n[c]=i[c])},r(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");r(t,o);function n(){this.constructor=t}t.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),ki=function(r,t){var o={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},n,i,c,l;return l={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function d(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,i&&(c=p[0]&2?i.return:p[0]?i.throw||((c=i.return)&&c.call(i),0):i.next)&&!(c=c.call(i,p[1])).done)return c;switch(i=0,c&&(p=[p[0]&2,c.value]),p[0]){case 0:case 1:c=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,i=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(c=o.trys,!(c=c.length>0&&c[c.length-1])&&(p[0]===6||p[0]===2)){o=0;continue}if(p[0]===3&&(!c||p[1]>c[0]&&p[1]<c[3])){o.label=p[1];break}if(p[0]===6&&o.label<c[1]){o.label=c[1],c=p;break}if(c&&o.label<c[2]){o.label=c[2],o.ops.push(p);break}c[2]&&o.ops.pop(),o.trys.pop();continue}p=t.call(r,o)}catch(y){p=[6,y],i=0}finally{n=c=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Ye=function(r,t){for(var o=0,n=t.length,i=r.length;o<n;o++,i++)r[i]=t[o];return r},Fi=Object.defineProperty,Di=Object.defineProperties,Ui=Object.getOwnPropertyDescriptors,Jn=Object.getOwnPropertySymbols,Bi=Object.prototype.hasOwnProperty,Mi=Object.prototype.propertyIsEnumerable,ea=function(r,t,o){return t in r?Fi(r,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[t]=o},he=function(r,t){for(var o in t||(t={}))Bi.call(t,o)&&ea(r,o,t[o]);if(Jn)for(var n=0,i=Jn(t);n<i.length;n++){var o=i[n];Mi.call(t,o)&&ea(r,o,t[o])}return r},Fr=function(r,t){return Di(r,Ui(t))},Wi=function(r,t,o){return new Promise(function(n,i){var c=function(u){try{d(o.next(u))}catch(p){i(p)}},l=function(u){try{d(o.throw(u))}catch(p){i(p)}},d=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(c,l)};d((o=o.apply(r,t)).next())})};var Hi=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?qe:qe.apply(null,arguments)},lf=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(r){return r}};function zi(r){if(typeof r!="object"||r===null)return!1;var t=Object.getPrototypeOf(r);if(t===null)return!0;for(var o=t;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return t===o}var Gi=function(r){oa(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=r.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,Ye([void 0],o[0].concat(this)))):new(t.bind.apply(t,Ye([void 0],o.concat(this))))},t}(Array),ji=function(r){oa(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=r.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,Ye([void 0],o[0].concat(this)))):new(t.bind.apply(t,Ye([void 0],o.concat(this))))},t}(Array);function Br(r){return X(r)?Lt(r,function(){}):r}function $i(r){return typeof r=="boolean"}function Ki(){return function(t){return Vi(t)}}function Vi(r){r===void 0&&(r={});var t=r.thunk,o=t===void 0?!0:t,n=r.immutableCheck,i=n===void 0?!0:n,c=r.serializableCheck,l=c===void 0?!0:c,d=new Gi;if(o&&($i(o)?d.push(kr):d.push(kr.withExtraArgument(o.extraArgument))),0){if(i)var u;if(l)var p}return d}var Dr=!0;function na(r){var t=Ki(),o=r||{},n=o.reducer,i=n===void 0?void 0:n,c=o.middleware,l=c===void 0?t():c,d=o.devTools,u=d===void 0?!0:d,p=o.preloadedState,y=p===void 0?void 0:p,h=o.enhancers,g=h===void 0?void 0:h,v;if(typeof i=="function")v=i;else if(zi(i))v=qn(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var b=l;if(typeof b=="function"&&(b=b(t),!Dr&&!Array.isArray(b)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Dr&&b.some(function(T){return typeof T!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=Yn.apply(void 0,b),N=qe;u&&(N=Hi(he({trace:!Dr},typeof u=="object"&&u)));var A=new ji(S),I=A;Array.isArray(g)?I=Ye([S],g):typeof g=="function"&&(I=g(A));var _=N.apply(void 0,I);return Lr(v,y,_)}function ye(r,t){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(t){var c=t.apply(void 0,n);if(!c)throw new Error("prepareAction did not return an object");return he(he({type:r,payload:c.payload},"meta"in c&&{meta:c.meta}),"error"in c&&{error:c.error})}return{type:r,payload:n[0]}}return o.toString=function(){return""+r},o.type=r,o.match=function(n){return n.type===r},o}function aa(r){var t={},o=[],n,i={addCase:function(c,l){var d=typeof c=="string"?c:c.type;if(d in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[d]=l,i},addMatcher:function(c,l){return o.push({matcher:c,reducer:l}),i},addDefaultCase:function(c){return n=c,i}};return r(i),[t,o,n]}function Zi(r){return typeof r=="function"}function qi(r,t,o,n){o===void 0&&(o=[]);var i=typeof t=="function"?aa(t):[t,o,n],c=i[0],l=i[1],d=i[2],u;if(Zi(r))u=function(){return Br(r())};else{var p=Br(r);u=function(){return p}}function y(h,g){h===void 0&&(h=u());var v=Ye([c[g.type]],l.filter(function(b){var S=b.matcher;return S(g)}).map(function(b){var S=b.reducer;return S}));return v.filter(function(b){return!!b}).length===0&&(v=[d]),v.reduce(function(b,S){if(S)if(ce(b)){var N=b,A=S(N,g);return A===void 0?b:A}else{if(X(b))return Lt(b,function(I){return S(I,g)});var A=S(b,g);if(A===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return A}return b},h)}return y.getInitialState=u,y}function Yi(r,t){return r+"/"+t}function ia(r){var t=r.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof r.initialState=="function"?r.initialState:Br(r.initialState),n=r.reducers||{},i=Object.keys(n),c={},l={},d={};i.forEach(function(y){var h=n[y],g=Yi(t,y),v,b;"reducer"in h?(v=h.reducer,b=h.prepare):v=h,c[y]=v,l[g]=v,d[y]=b?ye(g,b):ye(g)});function u(){var y=typeof r.extraReducers=="function"?aa(r.extraReducers):[r.extraReducers],h=y[0],g=h===void 0?{}:h,v=y[1],b=v===void 0?[]:v,S=y[2],N=S===void 0?void 0:S,A=he(he({},g),l);return qi(o,function(I){for(var _ in A)I.addCase(_,A[_]);for(var T=0,M=b;T<M.length;T++){var Z=M[T];I.addMatcher(Z.matcher,Z.reducer)}N&&I.addDefaultCase(N)})}var p;return{name:t,reducer:function(y,h){return p||(p=u()),p(y,h)},actions:d,caseReducers:c,getInitialState:function(){return p||(p=u()),p.getInitialState()}}}var Qi="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Xi=function(r){r===void 0&&(r=21);for(var t="",o=r;o--;)t+=Qi[Math.random()*64|0];return t},Ji=["name","message","stack","code"],Ur=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),ta=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),ec=function(r){if(typeof r=="object"&&r!==null){for(var t={},o=0,n=Ji;o<n.length;o++){var i=n[o];typeof r[i]=="string"&&(t[i]=r[i])}return t}return{message:String(r)}},ff=function(){function r(t,o,n){var i=ye(t+"/fulfilled",function(y,h,g,v){return{payload:y,meta:Fr(he({},v||{}),{arg:g,requestId:h,requestStatus:"fulfilled"})}}),c=ye(t+"/pending",function(y,h,g){return{payload:void 0,meta:Fr(he({},g||{}),{arg:h,requestId:y,requestStatus:"pending"})}}),l=ye(t+"/rejected",function(y,h,g,v,b){return{payload:v,error:(n&&n.serializeError||ec)(y||"Rejected"),meta:Fr(he({},b||{}),{arg:g,requestId:h,rejectedWithValue:!!v,requestStatus:"rejected",aborted:y?.name==="AbortError",condition:y?.name==="ConditionError"})}}),d=!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,v){var b=n?.idGenerator?n.idGenerator(y):Xi(),S=new u,N,A=!1;function I(T){N=T,S.abort()}var _=function(){return Wi(this,null,function(){var T,M,Z,be,G,xe,Te;return ki(this,function(f){switch(f.label){case 0:return f.trys.push([0,4,,5]),be=(T=n?.condition)==null?void 0:T.call(n,y,{getState:g,extra:v}),rc(be)?[4,be]:[3,2];case 1:be=f.sent(),f.label=2;case 2:if(be===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return A=!0,G=new Promise(function(m,C){return S.signal.addEventListener("abort",function(){return C({name:"AbortError",message:N||"Aborted"})})}),h(c(b,y,(M=n?.getPendingMeta)==null?void 0:M.call(n,{requestId:b,arg:y},{getState:g,extra:v}))),[4,Promise.race([G,Promise.resolve(o(y,{dispatch:h,getState:g,extra:v,requestId:b,signal:S.signal,abort:I,rejectWithValue:function(m,C){return new Ur(m,C)},fulfillWithValue:function(m,C){return new ta(m,C)}})).then(function(m){if(m instanceof Ur)throw m;return m instanceof ta?i(m.payload,b,y,m.meta):i(m,b,y)})])];case 3:return Z=f.sent(),[3,5];case 4:return xe=f.sent(),Z=xe instanceof Ur?l(null,b,y,xe.payload,xe.meta):l(xe,b,y),[3,5];case 5:return Te=n&&!n.dispatchConditionRejection&&l.match(Z)&&Z.meta.condition,Te||h(Z),[2,Z]}})})}();return Object.assign(_,{abort:I,requestId:b,arg:y,unwrap:function(){return _.then(tc)}})}}return Object.assign(p,{pending:c,rejected:l,fulfilled:i,typePrefix:t})}return r.withTypes=function(){return r},r}();function tc(r){if(r.meta&&r.meta.rejectedWithValue)throw r.payload;if(r.error)throw r.error;return r.payload}function rc(r){return r!==null&&typeof r=="object"&&typeof r.then=="function"}var ca="listener",sa="completed",la="cancelled",hf="task-"+la,yf="task-"+sa,gf=ca+"-"+la,mf=ca+"-"+sa;var Mr="listenerMiddleware";var bf=ye(Mr+"/add"),xf=ye(Mr+"/removeAll"),vf=ye(Mr+"/remove");var ra,Sf=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(r){return(ra||(ra=Promise.resolve())).then(r).catch(function(t){return setTimeout(function(){throw t},0)})},oc=function(r){return function(t){setTimeout(t,r)}},Of=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:oc(10);Hn();function nc(r,t){return class extends r{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(o,n,i){this.eventBus.addEventListener(o,n,i)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,i){this.eventBus.removeEventListener(o,n,i)}}}var Ft=class extends nc(Object){};window.ftReduxStores||(window.ftReduxStores={});var da=class r extends Ft{static get(t){var o;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,c=window.ftReduxStores[n];if(nt(c))return c;if(i==null)return;let l=ia({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),d=na({reducer:(u,p)=>p.type==="CLEAR_FT_REDUX_STORE"?l.getInitialState():typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__")?{...u,...p.overwrites}:l.reducer(u,p)});return window.ftReduxStores[i.name]=new r(l,d,i.eventBus)}constructor(t,o,n){super(),this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new At;let i=c=>c!=null?JSON.parse(JSON.stringify(c)):c;this.actions=new Proxy(this.reduxSlice.actions,{get:(c,l,d)=>{let u=l,p=c[u];return p?(...y)=>{let h=p(...y.map(i));return this.reduxStore.dispatch(h),h}:y=>{this.setState({[u]:i(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 Ht=E(L());var cc=E(pa(),1);var fa;(function(r){r.black="black",r.green="green",r.blue="blue",r.purple="purple",r.red="red",r.orange="orange",r.yellow="yellow"})(fa||(fa={}));var ha;(function(r){r.OFFICIAL="OFFICIAL",r.PERSONAL="PERSONAL",r.SHARED="SHARED"})(ha||(ha={}));var ya;(function(r){r.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",r.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",r.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",r.PERSONAL_BOOK="PERSONAL_BOOK",r.MAP_ATTACHMENT="MAP_ATTACHMENT",r.RESOURCE="RESOURCE"})(ya||(ya={}));var ga;(function(r){r.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",r.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",r.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",r.PERSONAL_BOOK="PERSONAL_BOOK",r.MAP_ATTACHMENT="MAP_ATTACHMENT",r.RESOURCE="RESOURCE"})(ga||(ga={}));var ma;(function(r){r.LAST_WEEK="LAST_WEEK",r.LAST_MONTH="LAST_MONTH",r.LAST_QUARTER="LAST_QUARTER",r.LAST_YEAR="LAST_YEAR"})(ma||(ma={}));var ba;(function(r){r.VALUE="VALUE",r.DATE="DATE",r.RANGE="RANGE"})(ba||(ba={}));var xa;(function(r){r.BOOKMARK__CREATE="BOOKMARK__CREATE",r.BOOKMARK__DELETE="BOOKMARK__DELETE",r.CASE_DEFLECTION__START="CASE_DEFLECTION__START",r.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",r.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",r.COLLECTION__CREATE="COLLECTION__CREATE",r.COLLECTION__UPDATE="COLLECTION__UPDATE",r.COLLECTION__DELETE="COLLECTION__DELETE",r.DOCUMENT__DISPLAY="DOCUMENT__DISPLAY",r.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",r.DOCUMENT__PRINT="DOCUMENT__PRINT",r.DOCUMENT__PROCESS="DOCUMENT__PROCESS",r.DOCUMENT__RATE="DOCUMENT__RATE",r.DOCUMENT__SEARCH="DOCUMENT__SEARCH",r.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",r.DOCUMENT__UNRATE="DOCUMENT__UNRATE",r.FEEDBACK__SEND="FEEDBACK__SEND",r.GEN_AI__COMPLETED_QUERY="GEN_AI__COMPLETED_QUERY",r.GEN_AI__RATE="GEN_AI__RATE",r.GENAI_CASE_DEFLECTION__START="GENAI_CASE_DEFLECTION__START",r.GENAI_CASE_DEFLECTION__OPEN_TICKET="GENAI_CASE_DEFLECTION__OPEN_TICKET",r.KHUB__PROCESS="KHUB__PROCESS",r.KHUB__SEARCH="KHUB__SEARCH",r.LABELS__DOWNLOAD="LABELS__DOWNLOAD",r.LINK__SHARE="LINK__SHARE",r.PAGE__DISPLAY="PAGE__DISPLAY",r.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",r.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",r.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",r.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",r.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",r.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",r.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",r.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",r.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",r.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",r.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",r.TOPIC__DISPLAY="TOPIC__DISPLAY",r.TOPIC__RATE="TOPIC__RATE",r.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",r.TOPIC__UNRATE="TOPIC__UNRATE",r.USER__LOGIN="USER__LOGIN",r.USER__LOGOUT="USER__LOGOUT",r.HEARTBEAT="HEARTBEAT"})(xa||(xa={}));var va;(function(r){r.THIRD_PARTY="THIRD_PARTY",r.OFF_THE_GRID="OFF_THE_GRID",r.CONTENT_PACKAGER="CONTENT_PACKAGER",r.PAGES="PAGES",r.DESIGNED_READER="DESIGNED_READER"})(va||(va={}));var Sa;(function(r){r.HOMEPAGE="HOMEPAGE",r.CUSTOM="CUSTOM",r.HEADER="HEADER",r.READER="READER",r.TOPIC_TEMPLATE="TOPIC_TEMPLATE",r.SEARCH="SEARCH",r.SEARCH_RESULT="SEARCH_RESULT"})(Sa||(Sa={}));var Oa;(function(r){r.CLASSIC="CLASSIC",r.CUSTOM="CUSTOM",r.DESIGNER="DESIGNER"})(Oa||(Oa={}));var Ca;(function(r){r.AND="AND",r.OR="OR",r.MONOVALUED="MONOVALUED"})(Ca||(Ca={}));var Ea;(function(r){r.NONE="NONE",r.ALPHABET="ALPHABET",r.VERSION="VERSION"})(Ea||(Ea={}));var wa;(function(r){r.STARS="STARS",r.LIKE="LIKE",r.DICHOTOMOUS="DICHOTOMOUS",r.NO_RATING="NO_RATING"})(wa||(wa={}));var Aa;(function(r){r.LAST_WEEK="LAST_WEEK",r.LAST_MONTH="LAST_MONTH",r.LAST_QUARTER="LAST_QUARTER",r.LAST_YEAR="LAST_YEAR",r.CUSTOM="CUSTOM"})(Aa||(Aa={}));var Ia;(function(r){r.ASC="ASC",r.DESC="DESC"})(Ia||(Ia={}));var Ra;(function(r){r.ALPHA="ALPHA",r.NATURAL="NATURAL"})(Ra||(Ra={}));var Wr;(function(r){r.EVERYWHERE="EVERYWHERE",r.TITLE_ONLY="TITLE_ONLY",r.NONE="NONE"})(Wr||(Wr={}));var Na;(function(r){r.ARTICLE="ARTICLE",r.BOOK="BOOK",r.SHARED_BOOK="SHARED_BOOK"})(Na||(Na={}));var Ta;(function(r){r.FLUIDTOPICS="FLUIDTOPICS",r.EXTERNAL="EXTERNAL"})(Ta||(Ta={}));var Pa;(function(r){r.MAP="MAP",r.DOCUMENT="DOCUMENT",r.TOPIC="TOPIC",r.PERSONAL_BOOK="PERSONAL_BOOK",r.SHARED_BOOK="SHARED_BOOK"})(Pa||(Pa={}));var _a;(function(r){r.LAST_WEEK="LAST_WEEK",r.LAST_MONTH="LAST_MONTH",r.LAST_QUARTER="LAST_QUARTER",r.LAST_YEAR="LAST_YEAR"})(_a||(_a={}));var La;(function(r){r.MAP="MAP",r.DOCUMENT="DOCUMENT",r.TOPIC="TOPIC"})(La||(La={}));var Hr;(function(r){r.DEFAULT="DEFAULT",r.DOCUMENTS="DOCUMENTS",r.ALL_TOPICS="ALL_TOPICS",r.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Hr||(Hr={}));var U;(function(r){r.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",r.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",r.HTML_EXPORT_USER="HTML_EXPORT_USER",r.PDF_EXPORT_USER="PDF_EXPORT_USER",r.SAVED_SEARCH_USER="SAVED_SEARCH_USER",r.COLLECTION_USER="COLLECTION_USER",r.OFFLINE_USER="OFFLINE_USER",r.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",r.ANALYTICS_USER="ANALYTICS_USER",r.BETA_USER="BETA_USER",r.DEBUG_USER="DEBUG_USER",r.PRINT_USER="PRINT_USER",r.RATING_USER="RATING_USER",r.FEEDBACK_USER="FEEDBACK_USER",r.GENERATIVE_AI_USER="GENERATIVE_AI_USER",r.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",r.CONTENT_PUBLISHER="CONTENT_PUBLISHER",r.KHUB_ADMIN="KHUB_ADMIN",r.USERS_ADMIN="USERS_ADMIN",r.PORTAL_ADMIN="PORTAL_ADMIN",r.ADMIN="ADMIN"})(U||(U={}));var ka;(function(r){r.VALID="VALID",r.INVALID="INVALID"})(ka||(ka={}));var Fa;(function(r){r.JSON="JSON",r.TEXT="TEXT"})(Fa||(Fa={}));var Da;(function(r){r.TEXT="TEXT",r.HTML="HTML"})(Da||(Da={}));var ic={[U.PERSONAL_BOOK_SHARE_USER]:[U.PERSONAL_BOOK_USER],[U.HTML_EXPORT_USER]:[U.PERSONAL_BOOK_USER],[U.PDF_EXPORT_USER]:[U.PERSONAL_BOOK_USER],[U.KHUB_ADMIN]:[U.CONTENT_PUBLISHER],[U.ADMIN]:[U.KHUB_ADMIN,U.USERS_ADMIN,U.PORTAL_ADMIN],[U.GENERATIVE_AI_EXPORT_USER]:[U.GENERATIVE_AI_USER]};function Ua(r,t){return r===t||(ic[r]??[]).some(o=>Ua(o,t))}function Ba(r,t){return r==null?!1:(Array.isArray(r)?r:Array.isArray(r.roles)?r.roles:Array.isArray(r.profile?.roles)?r.profile.roles:[]).some(n=>Ua(n,t))}var Bt=class extends ae{async listMySearches(){let{session:t}=w.getState();return Ba(t,U.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var Mt=class extends ae{async listMyBookmarks(){let t=w.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var sc="ft-user-assets",Wt=Ht.FtReduxStore.get({name:sc,initialState:{savedSearches:void 0,bookmarks:void 0}}),zr=class{constructor(){this.currentSession=w.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Mt,this.savedSearchesService=new Bt,w.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=w.getState();(0,Ht.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Wt.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Wt.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();Wt.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Wt.actions.bookmarks(o)}}},bh=new zr;var Gr=class{addCommand(t,o=!1){w.commands.add(t,o)}consumeCommand(t){return w.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Gr;var Ma=E(L()),jr=class{highlightHtml(t,o,n){(0,Ma.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new jr;var Wa=E(L());var $r=class{isDate(t){var o,n,i,c;return(c=(i=((n=(o=w.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(d=>d.key===t))===null||i===void 0?void 0:i.date)!==null&&c!==void 0?c:!1}format(t,o){var n,i,c;return Wa.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:w.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(c=o?.withTime)!==null&&c!==void 0?c:!1)}};window.FluidTopicsDateService=new $r;var Ha=E(L());var Re=class{static get(t,o){var n,i,c,l;let d=w.getState(),{lang:u,region:p}=(i=(n=d.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new Ha.SearchPlaceConverter(d.baseUrl,(l=(c=window.FluidTopicsClientConfiguration)===null||c===void 0?void 0:c.predefinedSorts)!==null&&l!==void 0?l:{},t??20,d.searchInAllLanguagesAllowed,o??`${u}-${p}`)}};var Kr=class{urlToSearchRequest(t){return Re.get().parse(t)}searchRequestToUrl(t){return Re.get().serialize(t)}};window.FluidTopicsUrlService=new Kr;var me=E(L());var Ne=class r extends CustomEvent{constructor(t){super(r.eventName,{detail:{currentItem:t}})}};Ne.eventName="change";var Vr=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))}},za=new Vr;var zt=class r extends me.WithEventBus{static build(){return new r(window.history,za,()=>window.location,!1)}constructor(t,o,n,i){var c,l;super(),this.history=t,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(l=(c=t.state)===null||c===void 0?void 0:c.index)!==null&&l!==void 0?l:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}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,me.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Ne(this.currentItem())),0)}installProxies(){let t=o=>(n,i,[c,l,d])=>{let u=o(),p={...u===this.currentIndex?this.currentState:void 0,...c,index:u,href:typeof d=="string"?d:(d??this.windowLocation()).href};n.apply(i,[p,l,d]),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(Ne.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Ne.eventName,t)}currentItem(){return(0,me.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,me.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,me.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 i=t,c=t+1;for(;this.states.length>c&&!this.isDifferentMajorState(c,n);)this.hasState(c)&&(i=c),c++;return i}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 i=o??this.currentState.majorStateId,c=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return c==null||c!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=zt.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:r=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(r),removeHistoryChangeListener:r=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(r)});(0,Ga.customElement)("ft-app-context")(D);var Za=E(Y());var lc=E(L());function ja(r){return r.match(/^[\w-]+\.[\w-]+$/)}var dc=function(r,t,o,n){var i=arguments.length,c=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(c=(i<3?l(c):i>3?l(t,o,c):l(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c},$a=Symbol("i18nAttributes"),Ka=Symbol("i18nListAttributes"),qa=Symbol("i18nProperties"),Gt=Symbol("i18nContexts"),dt=Symbol("i18nUnsubs");function Kt(r){var t,o;class n extends r{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[o]=new Map}getI18nService(c){return c??this.useCustomMessageContexts?Ct:je}i18n(c){var l;this.hasI18nContext(c.context)||this.addI18nContext(c.context,void 0,c.custom);let d=(l=c.args)!==null&&l!==void 0?l:c.argsProvider?c.argsProvider(this):[];return this.getI18nService(c.custom).resolveMessage(c.context,c.key,...d)}customI18n(c,l){if(ja(c)){let[d,u]=c.split(".");return this.i18n({custom:!0,context:d,key:u,...l})||c}return c}firstUpdated(c){super.firstUpdated(c),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(c){super.update(c),this.updateI18nAttributes((l,d,u)=>c.has(d)||typeof l.argsProvider=="function"),this.updateI18nProperties(l=>typeof l.argsProvider=="function")}onI18nUpdate(c){this.updateI18nAttributes((l,d,u)=>{var p;return((p=u?.context)===null||p===void 0?void 0:p.toLowerCase())===c}),this.updateI18nProperties(l=>l.context.toLowerCase()===c),this.requestUpdate()}updateI18nAttributes(c){var l,d;let u=this,p=(y,h,g)=>g?.context&&g.key&&c(y,h,g)?{...g,message:this.i18n({context:g.context,key:g.key,...y})}:g;(l=this[$a])===null||l===void 0||l.forEach((y,h)=>u[h]=p(y,h,u[h])),(d=this[Ka])===null||d===void 0||d.forEach((y,h)=>{var g;return u[h]=(g=u[h])===null||g===void 0?void 0:g.map(v=>p(y,h,v))})}updateI18nProperties(c){var l;(l=this[qa])===null||l===void 0||l.forEach((d,u)=>{c(d,u)&&(this[u]=this.i18n(d))})}addI18nMessages(c,l,d){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(c,l,d)}addI18nContext(c,l,d){let u=(typeof c=="string"?c:c.name).toLowerCase();d=typeof c=="string"?d:c.custom,this[Gt].set(u,{isCustomContext:d}),this[dt].has(u)||this[dt].set(u,this.getI18nService(d).subscribe(u,()=>this.onI18nUpdate(u))),this.getI18nService(d).prepareContext(u,l)}hasI18nContext(c){return this[Gt].has(c.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Gt].forEach((c,l)=>this.addI18nContext(l,void 0,c.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[dt].forEach(c=>c()),this[dt].clear()}}return t=Gt,o=dt,dc([(0,Za.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}var Va=class extends Kt($t.FtLitElement){},jt=class extends Kt($t.FtLitElementRedux){};var ut=function(r,t,o,n){var i=arguments.length,c=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(c=(i<3?l(c):i>3?l(t,o,c):l(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c},J=class extends jt{constructor(){super(),this.editorMode=!1,this.addStore(w)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Vt.nothing:Vt.html`
|
|
138
138
|
<span class="ft-i18n">
|
|
139
139
|
${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
|
|
140
140
|
</span>
|
|
@@ -201,7 +201,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:t.extend("--ft-conte
|
|
|
201
201
|
`;var Ic=F`
|
|
202
202
|
`;var Tu="ft-app-info",_a=class extends CustomEvent{constructor(e){super("authentication-change",{detail:e})}},Pu={session:(r,e)=>{J(r.session,e.payload)||(r.session=e.payload,setTimeout(()=>_.dispatchEvent(new _a(e.payload)),0))}},_=He.get({name:Tu,reducers:Pu,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],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}});var it=class r{static get(e){let{baseUrl:o,apiIntegrationIdentifier:n}=_.getState(),a=e??n;if(o&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,a,!0)}static await(e){return new Promise(o=>{let n=r.get(e);if(n)o(n);else{let a=_.subscribe(()=>{n=r.get(e),n&&(a(),o(n))})}})}};var yr=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:it.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):it.await()}};var Re=class extends yr{constructor(e=!0,o){var n;super(o);let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new le,this.cache=e?a.commonCache:new le}clearCache(){this.cache.clearAll()}};var Nc,_u=Symbol("clearAfterUnitTest"),Yr=class extends Re{constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Nc]=()=>{this.defaultMessages={},this.cache=new le,this.listeners={}},this.currentUiLocale=_.getState().uiLocale,_.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=_.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let o=e.name.toLowerCase();this.cache.setFinal(o,e),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,o){var n;if(e=e.toLowerCase(),o&&Object.keys(o).length>0){let a={...(n=this.defaultMessages[e])!==null&&n!==void 0?n:{},...o};J(this.defaultMessages[e],a)||(this.defaultMessages[e]=a,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var o,n;return this.fetchContext(e),(n=(o=this.cache.getNow(e))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(e,o){let n=e.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(e,o,...n){var a;let i=e.toLowerCase(),s=this.resolveContext(i);return new lr((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(o,...n)}async fetchContext(e){let o=!this.cache.has(e),n;try{n=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e))}catch(a){!(a instanceof _e)&&o&&console.error(a)}return o&&await this.notify(e),n}subscribe(e,o){var n;return e=e.toLowerCase(),this.listeners[e]=(n=this.listeners[e])!==null&&n!==void 0?n:new Set,this.listeners[e].add(o),()=>{var a;return(a=this.listeners[e])===null||a===void 0?void 0:a.delete(o)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map(e=>this.notify(e)))}async notify(e){this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(o=>Tr(0).then(()=>o()).catch(()=>null)))}};Nc=_u;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Yr{constructor(){super(async(r,e)=>(await this.awaitApi).getFluidTopicsMessageContext(r,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Yr{constructor(){super(async(r,e)=>(await this.awaitApi).getCustomMessageContext(r,e))}});var Ht=window.FluidTopicsI18nService,Qr=window.FluidTopicsCustomI18nService;var Y=function(r,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,o,n);else for(var l=r.length-1;l>=0;l--)(s=r[l])&&(i=(a<3?s(i):a>3?s(e,o,i):s(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},j=class extends V{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>it.get(),this.messageContexts=[],this.cache=new le,this.cleanSessionDebouncer=new Le}render(){return ge`
|
|
203
203
|
<slot></slot>
|
|
204
|
-
`}update(e){var o,n,a,i,s;super.update(e),e.has("baseUrl")&&(_.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&_.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("uiLocale")&&_.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&_.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&_.actions.noCustom(this.noCustom),e.has("editorMode")&&_.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&_.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&_.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(l=>Ht.addContext(l)),e.has("openExternalDocumentInNewTab")&&_.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&_.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&_.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(_.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),_.actions.availableUiLocales((a=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&a!==void 0?a:[]),_.actions.searchInAllLanguagesAllowed((s=(i=this.localesConfiguration)===null||i===void 0?void 0:i.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}};j.elementDefinitions={};j.styles=Ic;Y([k()],j.prototype,"baseUrl",void 0);Y([k()],j.prototype,"apiIntegrationIdentifier",void 0);Y([k()],j.prototype,"uiLocale",void 0);Y([de(null)],j.prototype,"availableUiLocales",void 0);Y([de(null)],j.prototype,"metadataConfiguration",void 0);Y([k({type:Boolean})],j.prototype,"editorMode",void 0);Y([k({type:Boolean})],j.prototype,"noCustom",void 0);Y([k({type:Boolean})],j.prototype,"openExternalDocumentInNewTab",void 0);Y([k({converter:{fromAttribute(r){return r==="false"?!1:r==="true"||(r??!1)}}})],j.prototype,"noCustomComponent",void 0);Y([k({type:Boolean})],j.prototype,"withManualResources",void 0);Y([k({type:Boolean})],j.prototype,"navigatorOnline",void 0);Y([k({type:Boolean})],j.prototype,"forcedOffline",void 0);Y([k({type:Object})],j.prototype,"apiProvider",void 0);Y([de([])],j.prototype,"messageContexts",void 0);Y([de(void 0)],j.prototype,"session",void 0);Y([se()],j.prototype,"localesConfiguration",void 0);var Jr=class extends Re{async listMySearches(){let{session:e}=_.getState();return rc(e,G.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var Xr=class extends Re{async listMyBookmarks(){let e=_.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var Lu="ft-user-assets",eo=He.get({name:Lu,initialState:{savedSearches:void 0,bookmarks:void 0}}),La=class{constructor(){this.currentSession=_.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Xr,this.savedSearchesService=new Jr,_.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:o}=_.getState();J((e=this.currentSession)===null||e===void 0?void 0:e.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),eo.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),eo.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();eo.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let o=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;eo.actions.bookmarks(o)}}},av=new La;var Fa=class{addCommand(e,o=!1){_.commands.add(e,o)}consumeCommand(e){return _.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Fa;var ka=class{highlightHtml(e,o,n){Bn(e,o,n)}};window.FluidTopicsHighlightHtmlService=new ka;var Da=class{isDate(e){var o,n,a,i;return(i=(a=((n=(o=_.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(l=>l.key===e))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(e,o){var n,a,i;return Tt.format(e,(n=o?.locale)!==null&&n!==void 0?n:_.getState().uiLocale,(a=o?.longFormat)!==null&&a!==void 0?a:!1,(i=o?.withTime)!==null&&i!==void 0?i:!1)}};window.FluidTopicsDateService=new Da;var st=class{static get(e,o){var n,a,i,s;let l=_.getState(),{lang:d,region:p}=(a=(n=l.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new Nt(l.baseUrl,(s=(i=window.FluidTopicsClientConfiguration)===null||i===void 0?void 0:i.predefinedSorts)!==null&&s!==void 0?s:{},e??20,l.searchInAllLanguagesAllowed,o??`${d}-${p}`)}};var Ua=class{urlToSearchRequest(e){return st.get().parse(e)}searchRequestToUrl(e){return st.get().serialize(e)}};window.FluidTopicsUrlService=new Ua;var ct=class r extends CustomEvent{constructor(e){super(r.eventName,{detail:{currentItem:e}})}};ct.eventName="change";var Ma=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let o=sessionStorage.getItem(this.itemName(e));return o?JSON.parse(o):void 0}set(e,o){sessionStorage.setItem(this.itemName(e),JSON.stringify(o))}},Tc=new Ma;var to=class r extends be{static build(){return new r(window.history,Tc,()=>window.location,!1)}constructor(e,o,n,a){var i,s;super(),this.history=e,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(i=e.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(e,o=!1){let n=o&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),J(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new ct(this.currentItem())),0)}installProxies(){let e=o=>(n,a,[i,s,l])=>{let d=o(),p={...d===this.currentIndex?this.currentState:void 0,...i,index:d,href:typeof l=="string"?l:(l??this.windowLocation()).href};n.apply(a,[p,s,l]),this.setCurrentState(p,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let o=this.history.length-1;o>=0;o--)e?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(e,o=!1){var n,a,i;let s={...this.buildCurrentState(),...e,index:this.currentIndex,title:(n=e?.title)!==null&&n!==void 0?n:this.currentState.title},l=o?(a=e?.majorState)!==null&&a!==void 0?a:this.currentState.majorState:(i=this.currentState.majorState)!==null&&i!==void 0?i:e?.majorState;l!=null&&(s.majorState=l),this.setCurrentState(s)}addHistoryChangeListener(e){this.addEventListener(ct.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(ct.eventName,e)}currentItem(){return Jt(this.currentState)}back(){let e=this.previousMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return Jt(this.states[this.previousMajorPosition()])}previousMajorPosition(){let e=this.currentIndex;for(;e>0&&!this.isMajorState(e);)e--;return this.previousExistingPosition(e)}forward(){let e=this.nextMajorPosition();e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){return Jt(this.states[this.nextMajorPosition()])}nextMajorPosition(){let e=this.currentIndex;do e++;while(e<this.states.length&&!this.isMajorState(e));do e++;while(e<this.states.length&&!this.isMajorState(e));return this.previousExistingPosition(e)}previousExistingPosition(e){let o=e;do o--;while(o>0&&!this.hasState(o));return o}buildCurrentState(){var e,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&o!==void 0?o:document.title}}hasState(e){return this.states[e]!=null}isMajorState(e){var o,n;return this.hasState(e)&&((n=(o=this.states[e])===null||o===void 0?void 0:o.majorState)!==null&&n!==void 0?n:!0)}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=to.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:r=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(r),removeHistoryChangeListener:r=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(r)});xe("ft-app-context")(j);function Pc(r){return r.match(/^[\w-]+\.[\w-]+$/)}var Fu=function(r,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,o,n);else for(var l=r.length-1;l>=0;l--)(s=r[l])&&(i=(a<3?s(i):a>3?s(e,o,i):s(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},_c=Symbol("i18nAttributes"),Lc=Symbol("i18nListAttributes"),kc=Symbol("i18nProperties"),ro=Symbol("i18nContexts"),gr=Symbol("i18nUnsubs");function no(r){var e,o;class n extends r{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[o]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?Qr:Ht}i18n(i){var s;this.hasI18nContext(i.context)||this.addI18nContext(i.context,void 0,i.custom);let l=(s=i.args)!==null&&s!==void 0?s:i.argsProvider?i.argsProvider(this):[];return this.getI18nService(i.custom).resolveMessage(i.context,i.key,...l)}customI18n(i,s){if(Pc(i)){let[l,d]=i.split(".");return this.i18n({custom:!0,context:l,key:d,...s})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((s,l,d)=>i.has(l)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((s,l,d)=>{var p;return((p=d?.context)===null||p===void 0?void 0:p.toLowerCase())===i}),this.updateI18nProperties(s=>s.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var s,l;let d=this,p=(h,f,g)=>g?.context&&g.key&&i(h,f,g)?{...g,message:this.i18n({context:g.context,key:g.key,...h})}:g;(s=this[_c])===null||s===void 0||s.forEach((h,f)=>d[f]=p(h,f,d[f])),(l=this[Lc])===null||l===void 0||l.forEach((h,f)=>{var g;return d[f]=(g=d[f])===null||g===void 0?void 0:g.map(m=>p(h,f,m))})}updateI18nProperties(i){var s;(s=this[kc])===null||s===void 0||s.forEach((l,d)=>{i(l,d)&&(this[d]=this.i18n(l))})}addI18nMessages(i,s,l){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,s,l)}addI18nContext(i,s,l){let d=(typeof i=="string"?i:i.name).toLowerCase();l=typeof i=="string"?l:i.custom,this[ro].set(d,{isCustomContext:l}),this[gr].has(d)||this[gr].set(d,this.getI18nService(l).subscribe(d,()=>this.onI18nUpdate(d))),this.getI18nService(l).prepareContext(d,s)}hasI18nContext(i){return this[ro].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[ro].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[gr].forEach(i=>i()),this[gr].clear()}}return e=ro,o=gr,Fu([k({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}var Fc=class extends no(V){},oo=class extends no(fe){};var mr=function(r,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,o,n);else for(var l=r.length-1;l>=0;l--)(s=r[l])&&(i=(a<3?s(i):a>3?s(e,o,i):s(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},ae=class extends oo{constructor(){super(),this.editorMode=!1,this.addStore(_)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":H:ge`
|
|
204
|
+
`}update(e){var o,n,a,i,s;super.update(e),e.has("baseUrl")&&(_.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&_.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("uiLocale")&&_.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&_.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&_.actions.noCustom(this.noCustom),e.has("editorMode")&&_.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&_.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&_.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(l=>Ht.addContext(l)),e.has("openExternalDocumentInNewTab")&&_.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&_.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&_.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(_.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),_.actions.availableUiLocales((a=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&a!==void 0?a:[]),_.actions.searchInAllLanguagesAllowed((s=(i=this.localesConfiguration)===null||i===void 0?void 0:i.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}};j.elementDefinitions={};j.styles=Ic;Y([k()],j.prototype,"baseUrl",void 0);Y([k()],j.prototype,"apiIntegrationIdentifier",void 0);Y([k()],j.prototype,"uiLocale",void 0);Y([de(null)],j.prototype,"availableUiLocales",void 0);Y([de(null)],j.prototype,"metadataConfiguration",void 0);Y([k({type:Boolean})],j.prototype,"editorMode",void 0);Y([k({type:Boolean})],j.prototype,"noCustom",void 0);Y([k({type:Boolean})],j.prototype,"openExternalDocumentInNewTab",void 0);Y([k({converter:{fromAttribute(r){return r==="false"?!1:r==="true"||(r??!1)}}})],j.prototype,"noCustomComponent",void 0);Y([k({type:Boolean})],j.prototype,"withManualResources",void 0);Y([k({type:Boolean})],j.prototype,"navigatorOnline",void 0);Y([k({type:Boolean})],j.prototype,"forcedOffline",void 0);Y([k({type:Object})],j.prototype,"apiProvider",void 0);Y([de([])],j.prototype,"messageContexts",void 0);Y([de(void 0)],j.prototype,"session",void 0);Y([se()],j.prototype,"localesConfiguration",void 0);var Jr=class extends Re{async listMySearches(){let{session:e}=_.getState();return rc(e,G.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var Xr=class extends Re{async listMyBookmarks(){let e=_.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var Lu="ft-user-assets",eo=He.get({name:Lu,initialState:{savedSearches:void 0,bookmarks:void 0}}),La=class{constructor(){this.currentSession=_.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Xr,this.savedSearchesService=new Jr,_.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:o}=_.getState();J((e=this.currentSession)===null||e===void 0?void 0:e.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),eo.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),eo.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();eo.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let o=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;eo.actions.bookmarks(o)}}},av=new La;var Fa=class{addCommand(e,o=!1){_.commands.add(e,o)}consumeCommand(e){return _.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Fa;var ka=class{highlightHtml(e,o,n){Bn(e,o,n)}};window.FluidTopicsHighlightHtmlService=new ka;var Da=class{isDate(e){var o,n,a,i;return(i=(a=((n=(o=_.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(l=>l.key===e))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(e,o){var n,a,i;return Tt.format(e,(n=o?.locale)!==null&&n!==void 0?n:_.getState().uiLocale,(a=o?.longFormat)!==null&&a!==void 0?a:!1,(i=o?.withTime)!==null&&i!==void 0?i:!1)}};window.FluidTopicsDateService=new Da;var st=class{static get(e,o){var n,a,i,s;let l=_.getState(),{lang:d,region:p}=(a=(n=l.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new Nt(l.baseUrl,(s=(i=window.FluidTopicsClientConfiguration)===null||i===void 0?void 0:i.predefinedSorts)!==null&&s!==void 0?s:{},e??20,l.searchInAllLanguagesAllowed,o??`${d}-${p}`)}};var Ua=class{urlToSearchRequest(e){return st.get().parse(e)}searchRequestToUrl(e){return st.get().serialize(e)}};window.FluidTopicsUrlService=new Ua;var ct=class r extends CustomEvent{constructor(e){super(r.eventName,{detail:{currentItem:e}})}};ct.eventName="change";var Ma=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let o=sessionStorage.getItem(this.itemName(e));return o?JSON.parse(o):void 0}set(e,o){sessionStorage.setItem(this.itemName(e),JSON.stringify(o))}},Tc=new Ma;var to=class r extends be{static build(){return new r(window.history,Tc,()=>window.location,!1)}constructor(e,o,n,a){var i,s;super(),this.history=e,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(i=e.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(e,o=!1){let n=o&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),J(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new ct(this.currentItem())),0)}installProxies(){let e=o=>(n,a,[i,s,l])=>{let d=o(),p={...d===this.currentIndex?this.currentState:void 0,...i,index:d,href:typeof l=="string"?l:(l??this.windowLocation()).href};n.apply(a,[p,s,l]),this.setCurrentState(p,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let o=this.history.length-1;o>=0;o--)e?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(e){var o;let n={...this.buildCurrentState(),...e,index:this.currentIndex,title:(o=e?.title)!==null&&o!==void 0?o:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(e){this.addEventListener(ct.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(ct.eventName,e)}currentItem(){return Jt(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 Jt(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 Jt(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var o;let n=(o=this.states[e])===null||o===void 0?void 0:o.majorStateId;if(!n)return e;let a=e,i=e+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var e,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&o!==void 0?o:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,o){var n;if(!this.hasState(e))return!1;let a=o??this.currentState.majorStateId,i=(n=this.states[e])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=to.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:r=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(r),removeHistoryChangeListener:r=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(r)});xe("ft-app-context")(j);function Pc(r){return r.match(/^[\w-]+\.[\w-]+$/)}var Fu=function(r,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,o,n);else for(var l=r.length-1;l>=0;l--)(s=r[l])&&(i=(a<3?s(i):a>3?s(e,o,i):s(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},_c=Symbol("i18nAttributes"),Lc=Symbol("i18nListAttributes"),kc=Symbol("i18nProperties"),ro=Symbol("i18nContexts"),gr=Symbol("i18nUnsubs");function no(r){var e,o;class n extends r{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[o]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?Qr:Ht}i18n(i){var s;this.hasI18nContext(i.context)||this.addI18nContext(i.context,void 0,i.custom);let l=(s=i.args)!==null&&s!==void 0?s:i.argsProvider?i.argsProvider(this):[];return this.getI18nService(i.custom).resolveMessage(i.context,i.key,...l)}customI18n(i,s){if(Pc(i)){let[l,d]=i.split(".");return this.i18n({custom:!0,context:l,key:d,...s})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((s,l,d)=>i.has(l)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((s,l,d)=>{var p;return((p=d?.context)===null||p===void 0?void 0:p.toLowerCase())===i}),this.updateI18nProperties(s=>s.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var s,l;let d=this,p=(h,f,g)=>g?.context&&g.key&&i(h,f,g)?{...g,message:this.i18n({context:g.context,key:g.key,...h})}:g;(s=this[_c])===null||s===void 0||s.forEach((h,f)=>d[f]=p(h,f,d[f])),(l=this[Lc])===null||l===void 0||l.forEach((h,f)=>{var g;return d[f]=(g=d[f])===null||g===void 0?void 0:g.map(m=>p(h,f,m))})}updateI18nProperties(i){var s;(s=this[kc])===null||s===void 0||s.forEach((l,d)=>{i(l,d)&&(this[d]=this.i18n(l))})}addI18nMessages(i,s,l){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,s,l)}addI18nContext(i,s,l){let d=(typeof i=="string"?i:i.name).toLowerCase();l=typeof i=="string"?l:i.custom,this[ro].set(d,{isCustomContext:l}),this[gr].has(d)||this[gr].set(d,this.getI18nService(l).subscribe(d,()=>this.onI18nUpdate(d))),this.getI18nService(l).prepareContext(d,s)}hasI18nContext(i){return this[ro].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[ro].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[gr].forEach(i=>i()),this[gr].clear()}}return e=ro,o=gr,Fu([k({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}var Fc=class extends no(V){},oo=class extends no(fe){};var mr=function(r,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,o,n);else for(var l=r.length-1;l>=0;l--)(s=r[l])&&(i=(a<3?s(i):a>3?s(e,o,i):s(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},ae=class extends oo{constructor(){super(),this.editorMode=!1,this.addStore(_)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":H:ge`
|
|
205
205
|
<span class="ft-i18n">
|
|
206
206
|
${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
|
|
207
207
|
</span>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-search-results-spellcheck",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Spellcheck component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-wc-utils": "1.
|
|
22
|
+
"@fluid-topics/ft-wc-utils": "1.3.0",
|
|
23
23
|
"@fluid-topics/public-api": "1.0.98",
|
|
24
24
|
"lit": "3.1.0"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "cc982effbf27c0483e03961ad450fd2057a108b2"
|
|
27
27
|
}
|