@fluid-topics/ft-reader-attachments 1.2.60 → 1.2.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -226,11 +226,11 @@
226
226
  .hide-download-icon [part="download-link"] {
227
227
  display: none;
228
228
  }
229
- `;var Po=E(I()),ko=E(Q());var Pt;(function(t){t.clusteringHelperCreated="clustering-helper-created",t.mapAttachmentsUpdate="map-attachments-update"})(Pt||(Pt={}));var Lo;(function(t){t.FEEDBACK="FEEDBACK",t.RATING="RATING",t.PRINT="PRINT",t.BOOKMARK="BOOKMARK",t.COLLECTIONS="COLLECTIONS",t.PERSONAL_BOOKS="PERSONAL_BOOKS"})(Lo||(Lo={}));var Zi=function(t,r,o,n){var i=arguments.length,c=i<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(t,r,o,n);else for(var d=t.length-1;d>=0;d--)(s=t[d])&&(c=(i<3?s(c):i>3?s(r,o,c):s(r,o))||c);return i>3&&c&&Object.defineProperty(r,o,c),c},vr=class extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}},xr=Symbol("registerInterval");function qi(t){var r;class o extends t{constructor(){super(...arguments),this[r]=0}setReaderStateManager(i){this.clearStateManager(),this.stateManager=i,this.addStore(i.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var i;return(i=this.stateManager)===null||i===void 0?void 0:i.service}connectedCallback(){super.connectedCallback(),this[xr]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[xr]):this.dispatchEvent(new vr)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return r=xr,Zi([(0,ko.state)()],o.prototype,"stateManager",void 0),o}var kt=class extends qi(Po.FtLitElementRedux){};var Wi=E(Uo());var Oa=E(I());var cr=E(Z()),sr=E(Q()),lr=E(I());var Bo=E(Z());var Mo=Bo.css`
229
+ `;var Po=E(I()),ko=E(Q());var Pt;(function(t){t.clusteringHelperCreated="clustering-helper-created",t.mapAttachmentsUpdate="map-attachments-update",t.visibleTopicChange="visible-topic-change"})(Pt||(Pt={}));var Lo;(function(t){t.FEEDBACK="FEEDBACK",t.RATING="RATING",t.PRINT="PRINT",t.BOOKMARK="BOOKMARK",t.COLLECTIONS="COLLECTIONS",t.PERSONAL_BOOKS="PERSONAL_BOOKS"})(Lo||(Lo={}));var Zi=function(t,r,o,n){var i=arguments.length,c=i<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(t,r,o,n);else for(var d=t.length-1;d>=0;d--)(s=t[d])&&(c=(i<3?s(c):i>3?s(r,o,c):s(r,o))||c);return i>3&&c&&Object.defineProperty(r,o,c),c},vr=class extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}},xr=Symbol("registerInterval");function qi(t){var r;class o extends t{constructor(){super(...arguments),this[r]=0}setReaderStateManager(i){this.clearStateManager(),this.stateManager=i,this.addStore(i.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var i;return(i=this.stateManager)===null||i===void 0?void 0:i.service}connectedCallback(){super.connectedCallback(),this[xr]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[xr]):this.dispatchEvent(new vr)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return r=xr,Zi([(0,ko.state)()],o.prototype,"stateManager",void 0),o}var kt=class extends qi(Po.FtLitElementRedux){};var Wi=E(Uo());var Oa=E(I());var cr=E(Z()),sr=E(Q()),lr=E(I());var Bo=E(Z());var Mo=Bo.css`
230
230
  `;var ar=E(I());var ya=E(I());var zo=E(Z()),Y=E(Q()),se=E(I());var Wo=E(Z());var Ho=Wo.css`
231
231
  `;var Dt=E(I()),Yi="ft-app-info",Sr=class extends CustomEvent{constructor(r){super("authentication-change",{detail:r})}},Xi={session:(t,r)=>{(0,Dt.deepEqual)(t.session,r.payload)||(t.session=r.payload,setTimeout(()=>w.dispatchEvent(new Sr(r.payload)),0))}},w=Dt.FtReduxStore.get({name:Yi,reducers:Xi,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 ue=E(I());var Or=E(I());var De=class t{static get(r){let{baseUrl:o,apiIntegrationIdentifier:n}=w.getState(),i=r??n;if(o&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,i,!0)}static await(r){return new Promise(o=>{let n=t.get(r);if(n)o(n);else{let i=w.subscribe(()=>{n=t.get(r),n&&(i(),o(n))})}})}};var ht=class{constructor(r){this.overrideApi=r}get api(){var r;return(r=this.overrideApi)!==null&&r!==void 0?r:De.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):De.await()}};var xe=class extends ht{constructor(r=!0,o){var n;super(o);let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new Or.CacheRegistry,this.cache=r?i.commonCache:new Or.CacheRegistry}clearCache(){this.cache.clearAll()}};var Fo,Qi=Symbol("clearAfterUnitTest"),Ut=class extends xe{constructor(r){super(),this.messageContextProvider=r,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Fo]=()=>{this.defaultMessages={},this.cache=new ue.CacheRegistry,this.listeners={}},this.currentUiLocale=w.getState().uiLocale,w.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:r}=w.getState();this.currentUiLocale!==r&&(this.currentUiLocale=r,this.cache.clearAll(),this.notifyAll())}addContext(r){let o=r.name.toLowerCase();this.cache.setFinal(o,r),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(r,o){var n;if(r=r.toLowerCase(),o&&Object.keys(o).length>0){let i={...(n=this.defaultMessages[r])!==null&&n!==void 0?n:{},...o};(0,ue.deepEqual)(this.defaultMessages[r],i)||(this.defaultMessages[r]=i,await this.notify(r))}return this.fetchContext(r)}resolveContext(r){var o,n;return this.fetchContext(r),(n=(o=this.cache.getNow(r))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(r,o){let n=r.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(r,o,...n){var i;let c=r.toLowerCase(),s=this.resolveContext(c);return new ue.ParametrizedLabelResolver((i=this.defaultMessages[c])!==null&&i!==void 0?i:{},s).resolve(o,...n)}async fetchContext(r){let o=!this.cache.has(r),n;try{n=await this.cache.get(r,()=>this.messageContextProvider(this.currentUiLocale,r))}catch(i){!(i instanceof ue.CanceledPromiseError)&&o&&console.error(i)}return o&&await this.notify(r),n}subscribe(r,o){var n;return r=r.toLowerCase(),this.listeners[r]=(n=this.listeners[r])!==null&&n!==void 0?n:new Set,this.listeners[r].add(o),()=>{var i;return(i=this.listeners[r])===null||i===void 0?void 0:i.delete(o)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map(r=>this.notify(r)))}async notify(r){this.listeners[r]!=null&&await Promise.all([...this.listeners[r].values()].map(o=>(0,ue.delay)(0).then(()=>o()).catch(()=>null)))}};Fo=Qi;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Ut{constructor(){super(async(t,r)=>(await this.awaitApi).getFluidTopicsMessageContext(t,r))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Ut{constructor(){super(async(t,r)=>(await this.awaitApi).getCustomMessageContext(t,r))}});var je=window.FluidTopicsI18nService,Bt=window.FluidTopicsCustomI18nService;var K=function(t,r,o,n){var i=arguments.length,c=i<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(t,r,o,n);else for(var d=t.length-1;d>=0;d--)(s=t[d])&&(c=(i<3?s(c):i>3?s(r,o,c):s(r,o))||c);return i>3&&c&&Object.defineProperty(r,o,c),c},M=class extends se.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=()=>De.get(),this.messageContexts=[],this.cache=new se.CacheRegistry,this.cleanSessionDebouncer=new se.Debouncer}render(){return zo.html`
232
232
  <slot></slot>
233
- `}update(r){var o,n,i,c,s;super.update(r),r.has("baseUrl")&&(w.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),r.has("apiIntegrationIdentifier")&&w.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),r.has("uiLocale")&&w.actions.uiLocale(this.uiLocale),r.has("metadataConfiguration")&&w.actions.metadataConfiguration(this.metadataConfiguration),r.has("noCustom")&&w.actions.noCustom(this.noCustom),r.has("editorMode")&&w.actions.editorMode(this.editorMode),r.has("noCustomComponent")&&w.actions.noCustomComponent(this.noCustomComponent),r.has("session")&&w.actions.session(this.session),r.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(d=>je.addContext(d)),r.has("openExternalDocumentInNewTab")&&w.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),r.has("navigatorOnline")&&w.actions.navigatorOnline(this.navigatorOnline),r.has("forcedOffline")&&w.actions.forcedOffline(this.forcedOffline),r.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((s=(c=this.localesConfiguration)===null||c===void 0?void 0:c.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 r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},r.idleTimeoutInMillis),r})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}};M.elementDefinitions={};M.styles=Ho;K([(0,Y.property)()],M.prototype,"baseUrl",void 0);K([(0,Y.property)()],M.prototype,"apiIntegrationIdentifier",void 0);K([(0,Y.property)()],M.prototype,"uiLocale",void 0);K([(0,se.jsonProperty)(null)],M.prototype,"availableUiLocales",void 0);K([(0,se.jsonProperty)(null)],M.prototype,"metadataConfiguration",void 0);K([(0,Y.property)({type:Boolean})],M.prototype,"editorMode",void 0);K([(0,Y.property)({type:Boolean})],M.prototype,"noCustom",void 0);K([(0,Y.property)({type:Boolean})],M.prototype,"openExternalDocumentInNewTab",void 0);K([(0,Y.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],M.prototype,"noCustomComponent",void 0);K([(0,Y.property)({type:Boolean})],M.prototype,"withManualResources",void 0);K([(0,Y.property)({type:Boolean})],M.prototype,"navigatorOnline",void 0);K([(0,Y.property)({type:Boolean})],M.prototype,"forcedOffline",void 0);K([(0,Y.property)({type:Object})],M.prototype,"apiProvider",void 0);K([(0,se.jsonProperty)([])],M.prototype,"messageContexts",void 0);K([(0,se.jsonProperty)(void 0)],M.prototype,"session",void 0);K([(0,Y.state)()],M.prototype,"localesConfiguration",void 0);var Wc=E(Q());function Ji(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var o,n,i;if(Array.isArray(t)){if(o=t.length,o!=r.length)return!1;for(n=o;n--!==0;)if(!Mt(t[n],r[n]))return!1;return!0}if(t instanceof Map&&r instanceof Map){if(t.size!==r.size)return!1;for(n of t.entries())if(!r.has(n[0]))return!1;for(n of t.entries())if(!Mt(n[1],r.get(n[0])))return!1;return!0}if(t instanceof Set&&r instanceof Set){if(t.size!==r.size)return!1;for(n of t.entries())if(!r.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();let c=s=>Object.keys(s).filter(d=>s[d]!=null);if(i=c(t),o=i.length,o!==c(r).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[n]))return!1;for(n=o;n--!==0;){let s=i[n];if(!Mt(t[s],r[s]))return!1}return!0}return t!==t&&r!==r||t==null&&r==null}function Mt(t,r){try{return Ji(t,r)}catch{return!1}}function Wt(t,r){return!Mt(t,r)}var ec=E(Q(),1);var Ht=class{constructor(){this.queue=[]}add(r,o=!1){o&&this.clear(r.type),this.queue.push(r)}consume(r){let o=this.queue.find(n=>n.type===r);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(r){typeof r=="string"?this.queue=this.queue.filter(o=>o.type!==r):this.queue=this.queue.filter(o=>!r.test(o.type))}};var Ke=E(Q(),1);var Go=E(Q(),1);function $o(t,r){let o=()=>JSON.parse(JSON.stringify(t));return(0,Go.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,...r??{}})}var Ft=class{constructor(r=0){this.timeout=r,this.callbacks=[]}run(r,o){return this.callbacks=[r],this.debounce(o)}queue(r,o){return this.callbacks.push(r),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(r){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),r??this.timeout),this.promise}async runCallbacks(){var r,o;let n=[...this.callbacks];this.callbacks=[];let i=(r=this.rejectPromise)!==null&&r!==void 0?r:()=>null,c=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let s of n)try{await s()}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 Ko=E(Z(),1);var zt=globalThis,tc=zt.ShadowRoot&&(zt.ShadyCSS===void 0||zt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Bs=Symbol();var jo=(t,r)=>{if(tc)t.adoptedStyleSheets=r.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of r){let n=document.createElement("style"),i=zt.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,t.appendChild(n)}};var Gt=class extends Ko.LitElement{createRenderRoot(){let r=this.constructor;r.elementDefinitions&&!r.registry&&(r.registry=new CustomElementRegistry,Object.entries(r.elementDefinitions).forEach(([i,c])=>r.registry.define(i,c)));let o={...r.shadowRootOptions,customElements:r.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return jo(n,r.elementStyles),n}};function Vo(t,r,...o){var n;let i=t.querySelector(r);for(let c of o)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(c);return i}var yt=function(t,r,o,n){var i=arguments.length,c=i<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(t,r,o,n);else for(var d=t.length-1;d>=0;d--)(s=t[d])&&(c=(i<3?s(c):i>3?s(r,o,c):s(r,o))||c);return i>3&&c&&Object.defineProperty(r,o,c),c},Xo,Zo=Symbol("constructorPrototype"),qo=Symbol("constructorName"),Qo=Symbol("exportpartsDebouncer"),Yo=Symbol("dynamicDependenciesLoaded"),he=class extends Gt{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Xo]=new Ft(5),this[qo]=this.constructor.name,this[Zo]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[qo]&&Object.setPrototypeOf(this,this[Zo])}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 r=this.constructor;r[Yo]||(r[Yo]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(r){super.updated(r),this.updateComplete.then(()=>{this.contentAvailableCallback(r),this.focusElementToFocus(r),this.applyCustomStylesheet(r),this.scheduleExportpartsUpdate()})}contentAvailableCallback(r){}focusElementToFocus(r){if(r.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let c=[...i??[],n];o=Vo(this.shadowRoot,...c)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(r){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(r.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 r,o,n;(!((r=this.exportpartsPrefix)===null||r===void 0)&&r.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[Qo].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(r){var o,n,i,c,s,d;let p=m=>m!=null&&m.trim().length>0,u=r.filter(p).map(m=>m.trim());if(u.length===0){this.removeAttribute("exportparts");return}let h=new Set;for(let m of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let S=(c=(i=m.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&c!==void 0?c:[],x=(d=(s=m.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(O=>O.split(":")[1]))!==null&&d!==void 0?d:[];new Array(...S,...x).filter(p).map(O=>O.trim()).forEach(O=>h.add(O))}if(h.size===0){this.removeAttribute("exportparts");return}let y=[...h.values()].flatMap(m=>u.map(S=>`${m}:${S}--${m}`));this.setAttribute("exportparts",[...this.part,...y].join(", "))}};Xo=Qo;yt([(0,Ke.property)()],he.prototype,"exportpartsPrefix",void 0);yt([$o([])],he.prototype,"exportpartsPrefixes",void 0);yt([(0,Ke.property)()],he.prototype,"customStylesheet",void 0);yt([(0,Ke.property)()],he.prototype,"elementToFocus",void 0);yt([(0,Ke.state)()],he.prototype,"useAdoptedStyleSheets",void 0);function mt(t){var r;return(r=t?.isFtReduxStore)!==null&&r!==void 0?r:!1}var Jo,en,tn,gt=Symbol("internalReduxEventsUnsubscribers"),ve=Symbol("internalStoresUnsubscribers"),Ue=Symbol("internalStores"),bt=class extends he{constructor(){super(...arguments),this[Jo]=new Map,this[en]=new Map,this[tn]=new Map}get reduxConstructor(){return this.constructor}update(r){super.update(r),[...this.reduxConstructor.reduxReactiveProperties].some(o=>r.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[Ue].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ue].values()][0]}getStore(r){return r==null?this.getUnnamedStore():this[Ue].get(r)}addStore(r,o){var n;o=(n=o??(mt(r)?r.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this[Ue].set(o,r),this.subscribeToStore(o,r),this.updateFromStores()}removeStore(r){let o=typeof r=="string"?r:r.name;this.unsubscribeFromStore(o),this[Ue].delete(o)}setupStores(){this.unsubscribeFromStores(),this[Ue].forEach((r,o)=>this.subscribeToStore(o,r)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((r,o)=>{let n=this.constructor.getPropertyOptions(o);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:o)){let i=this.getStore(r.store);i&&(r.store?this[ve].has(r.store):this[ve].size>0)&&(this[o]=r.selector(i.getState(),this))}})}subscribeToStore(r,o){var n;this[ve].set(r,o.subscribe(()=>this.updateFromStores())),this[gt].set(r,[]),mt(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 s=d=>this[c](d);o.addEventListener(i.eventName,s),this[gt].get(r).push(()=>o.removeEventListener(i.eventName,s))}})),this.onStoreAvailable(r)}unsubscribeFromStores(){this[ve].forEach((r,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(r){var o;this[ve].has(r)&&this[ve].get(r)(),this[ve].delete(r),(o=this[gt].get(r))===null||o===void 0||o.forEach(n=>n()),this[gt].delete(r)}onStoreAvailable(r){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};Jo=ve,en=Ue,tn=gt;bt.reduxProperties=new Map;bt.reduxReactiveProperties=new Set;bt.reduxEventListeners=new Map;function oe(t){for(var r=arguments.length,o=Array(r>1?r-1:0),n=1;n<r;n++)o[n-1]=arguments[n];if(0)var i,c;throw Error("[Immer] minified error nr: "+t+(o.length?" "+o.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ye(t){return!!t&&!!t[U]}function le(t){var r;return!!t&&(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)===lc}(t)||Array.isArray(t)||!!t[ln]||!!(!((r=t.constructor)===null||r===void 0)&&r[ln])||Ir(t)||Lr(t))}function Be(t,r,o){o===void 0&&(o=!1),qe(t)===0?(o?Object.keys:Ze)(t).forEach(function(n){o&&typeof n=="symbol"||r(n,t[n],t)}):t.forEach(function(n,i){return r(i,n,t)})}function qe(t){var r=t[U];return r?r.i>3?r.i-4:r.i:Array.isArray(t)?1:Ir(t)?2:Lr(t)?3:0}function Ve(t,r){return qe(t)===2?t.has(r):Object.prototype.hasOwnProperty.call(t,r)}function rc(t,r){return qe(t)===2?t.get(r):t[r]}function dn(t,r,o){var n=qe(t);n===2?t.set(r,o):n===3?t.add(o):t[r]=o}function pn(t,r){return t===r?t!==0||1/t==1/r:t!=t&&r!=r}function Ir(t){return cc&&t instanceof Map}function Lr(t){return sc&&t instanceof Set}function Se(t){return t.o||t.t}function Pr(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var r=hn(t);delete r[U];for(var o=Ze(r),n=0;n<o.length;n++){var i=o[n],c=r[i];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(r[i]={configurable:!0,writable:!0,enumerable:c.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),r)}function kr(t,r){return r===void 0&&(r=!1),Dr(t)||ye(t)||!le(t)||(qe(t)>1&&(t.set=t.add=t.clear=t.delete=oc),Object.freeze(t),r&&Be(t,function(o,n){return kr(n,!0)},!0)),t}function oc(){oe(2)}function Dr(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function fe(t){var r=Tr[t];return r||oe(18,t),r}function nc(t,r){Tr[t]||(Tr[t]=r)}function Nr(){return vt}function Er(t,r){r&&(fe("Patches"),t.u=[],t.s=[],t.v=r)}function $t(t){Rr(t),t.p.forEach(ac),t.p=null}function Rr(t){t===vt&&(vt=t.l)}function rn(t){return vt={p:[],l:vt,h:t,m:!0,_:0}}function ac(t){var r=t[U];r.i===0||r.i===1?r.j():r.g=!0}function Cr(t,r){r._=r.p.length;var o=r.p[0],n=t!==void 0&&t!==o;return r.h.O||fe("ES5").S(r,t,n),n?(o[U].P&&($t(r),oe(4)),le(t)&&(t=jt(r,t),r.l||Kt(r,t)),r.u&&fe("Patches").M(o[U].t,t,r.u,r.s)):t=jt(r,o,[]),$t(r),r.u&&r.v(r.u,r.s),t!==fn?t:void 0}function jt(t,r,o){if(Dr(r))return r;var n=r[U];if(!n)return Be(r,function(d,p){return on(t,n,r,d,p,o)},!0),r;if(n.A!==t)return r;if(!n.P)return Kt(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=Pr(n.k):n.o,c=i,s=!1;n.i===3&&(c=new Set(i),i.clear(),s=!0),Be(c,function(d,p){return on(t,n,i,d,p,o,s)}),Kt(t,i,!1),o&&t.u&&fe("Patches").N(n,o,t.u,t.s)}return n.o}function on(t,r,o,n,i,c,s){if(ye(i)){var d=jt(t,i,c&&r&&r.i!==3&&!Ve(r.R,n)?c.concat(n):void 0);if(dn(o,n,d),!ye(d))return;t.m=!1}else s&&o.add(i);if(le(i)&&!Dr(i)){if(!t.h.D&&t._<1)return;jt(t,i),r&&r.A.l||Kt(t,i)}}function Kt(t,r,o){o===void 0&&(o=!1),!t.l&&t.h.D&&t.m&&kr(r,o)}function Ar(t,r){var o=t[U];return(o?Se(o):t)[r]}function nn(t,r){if(r in t)for(var o=Object.getPrototypeOf(t);o;){var n=Object.getOwnPropertyDescriptor(o,r);if(n)return n;o=Object.getPrototypeOf(o)}}function Oe(t){t.P||(t.P=!0,t.l&&Oe(t.l))}function wr(t){t.o||(t.o=Pr(t.t))}function _r(t,r,o){var n=Ir(r)?fe("MapSet").F(r,o):Lr(r)?fe("MapSet").T(r,o):t.O?function(i,c){var s=Array.isArray(i),d={i:s?1:0,A:c?c.A:Nr(),P:!1,I:!1,R:{},l:c,t:i,k:null,o:null,j:null,C:!1},p=d,u=St;s&&(p=[d],u=xt);var h=Proxy.revocable(p,u),y=h.revoke,m=h.proxy;return d.k=m,d.j=y,m}(r,o):fe("ES5").J(r,o);return(o?o.A:Nr()).p.push(n),n}function ic(t){return ye(t)||oe(22,t),function r(o){if(!le(o))return o;var n,i=o[U],c=qe(o);if(i){if(!i.P&&(i.i<4||!fe("ES5").K(i)))return i.t;i.I=!0,n=an(o,c),i.I=!1}else n=an(o,c);return Be(n,function(s,d){i&&rc(i.t,s)===d||dn(n,s,r(d))}),c===3?new Set(n):n}(t)}function an(t,r){switch(r){case 2:return new Map(t);case 3:return Array.from(t)}return Pr(t)}function un(){function t(s,d){var p=c[s];return p?p.enumerable=d:c[s]=p={configurable:!0,enumerable:d,get:function(){var u=this[U];return St.get(u,s)},set:function(u){var h=this[U];St.set(h,s,u)}},p}function r(s){for(var d=s.length-1;d>=0;d--){var p=s[d][U];if(!p.P)switch(p.i){case 5:n(p)&&Oe(p);break;case 4:o(p)&&Oe(p)}}}function o(s){for(var d=s.t,p=s.k,u=Ze(p),h=u.length-1;h>=0;h--){var y=u[h];if(y!==U){var m=d[y];if(m===void 0&&!Ve(d,y))return!0;var S=p[y],x=S&&S[U];if(x?x.t!==m:!pn(S,m))return!0}}var O=!!d[U];return u.length!==Ze(d).length+(O?0:1)}function n(s){var d=s.k;if(d.length!==s.t.length)return!0;var p=Object.getOwnPropertyDescriptor(d,d.length-1);if(p&&!p.get)return!0;for(var u=0;u<d.length;u++)if(!d.hasOwnProperty(u))return!0;return!1}function i(s){s.g&&oe(3,JSON.stringify(Se(s)))}var c={};nc("ES5",{J:function(s,d){var p=Array.isArray(s),u=function(y,m){if(y){for(var S=Array(m.length),x=0;x<m.length;x++)Object.defineProperty(S,""+x,t(x,!0));return S}var O=hn(m);delete O[U];for(var T=Ze(O),N=0;N<T.length;N++){var R=T[N];O[R]=t(R,y||!!O[R].enumerable)}return Object.create(Object.getPrototypeOf(m),O)}(p,s),h={i:p?5:4,A:d?d.A:Nr(),P:!1,I:!1,R:{},l:d,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,U,{value:h,writable:!0}),u},S:function(s,d,p){p?ye(d)&&d[U].A===s&&r(s.p):(s.u&&function u(h){if(h&&typeof h=="object"){var y=h[U];if(y){var m=y.t,S=y.k,x=y.R,O=y.i;if(O===4)Be(S,function(L){L!==U&&(m[L]!==void 0||Ve(m,L)?x[L]||u(S[L]):(x[L]=!0,Oe(y)))}),Be(m,function(L){S[L]!==void 0||Ve(S,L)||(x[L]=!1,Oe(y))});else if(O===5){if(n(y)&&(Oe(y),x.length=!0),S.length<m.length)for(var T=S.length;T<m.length;T++)x[T]=!1;else for(var N=m.length;N<S.length;N++)x[N]=!0;for(var R=Math.min(S.length,m.length),k=0;k<R;k++)S.hasOwnProperty(k)||(x[k]=!0),x[k]===void 0&&u(S[k])}}}}(s.p[0]),r(s.p))},K:function(s){return s.i===4?o(s):n(s)}})}var cn,vt,Ur=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",cc=typeof Map<"u",sc=typeof Set<"u",sn=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",fn=Ur?Symbol.for("immer-nothing"):((cn={})["immer-nothing"]=!0,cn),ln=Ur?Symbol.for("immer-draftable"):"__$immer_draftable",U=Ur?Symbol.for("immer-state"):"__$immer_state";var lc=""+Object.prototype.constructor,Ze=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,hn=Object.getOwnPropertyDescriptors||function(t){var r={};return Ze(t).forEach(function(o){r[o]=Object.getOwnPropertyDescriptor(t,o)}),r},Tr={},St={get:function(t,r){if(r===U)return t;var o=Se(t);if(!Ve(o,r))return function(i,c,s){var d,p=nn(c,s);return p?"value"in p?p.value:(d=p.get)===null||d===void 0?void 0:d.call(i.k):void 0}(t,o,r);var n=o[r];return t.I||!le(n)?n:n===Ar(t.t,r)?(wr(t),t.o[r]=_r(t.A.h,n,t)):n},has:function(t,r){return r in Se(t)},ownKeys:function(t){return Reflect.ownKeys(Se(t))},set:function(t,r,o){var n=nn(Se(t),r);if(n?.set)return n.set.call(t.k,o),!0;if(!t.P){var i=Ar(Se(t),r),c=i?.[U];if(c&&c.t===o)return t.o[r]=o,t.R[r]=!1,!0;if(pn(o,i)&&(o!==void 0||Ve(t.t,r)))return!0;wr(t),Oe(t)}return t.o[r]===o&&(o!==void 0||r in t.o)||Number.isNaN(o)&&Number.isNaN(t.o[r])||(t.o[r]=o,t.R[r]=!0),!0},deleteProperty:function(t,r){return Ar(t.t,r)!==void 0||r in t.t?(t.R[r]=!1,wr(t),Oe(t)):delete t.R[r],t.o&&delete t.o[r],!0},getOwnPropertyDescriptor:function(t,r){var o=Se(t),n=Reflect.getOwnPropertyDescriptor(o,r);return n&&{writable:!0,configurable:t.i!==1||r!=="length",enumerable:n.enumerable,value:o[r]}},defineProperty:function(){oe(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){oe(12)}},xt={};Be(St,function(t,r){xt[t]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}}),xt.deleteProperty=function(t,r){return xt.set.call(this,t,r,void 0)},xt.set=function(t,r,o){return St.set.call(this,t[0],r,o,t[0])};var dc=function(){function t(o){var n=this;this.O=sn,this.D=!0,this.produce=function(i,c,s){if(typeof i=="function"&&typeof c!="function"){var d=c;c=i;var p=n;return function(O){var T=this;O===void 0&&(O=d);for(var N=arguments.length,R=Array(N>1?N-1:0),k=1;k<N;k++)R[k-1]=arguments[k];return p.produce(O,function(L){var G;return(G=c).call.apply(G,[T,L].concat(R))})}}var u;if(typeof c!="function"&&oe(6),s!==void 0&&typeof s!="function"&&oe(7),le(i)){var h=rn(n),y=_r(n,i,void 0),m=!0;try{u=c(y),m=!1}finally{m?$t(h):Rr(h)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(O){return Er(h,s),Cr(O,h)},function(O){throw $t(h),O}):(Er(h,s),Cr(u,h))}if(!i||typeof i!="object"){if((u=c(i))===void 0&&(u=i),u===fn&&(u=void 0),n.D&&kr(u,!0),s){var S=[],x=[];fe("Patches").M(i,u,S,x),s(S,x)}return u}oe(21,i)},this.produceWithPatches=function(i,c){if(typeof i=="function")return function(u){for(var h=arguments.length,y=Array(h>1?h-1:0),m=1;m<h;m++)y[m-1]=arguments[m];return n.produceWithPatches(u,function(S){return i.apply(void 0,[S].concat(y))})};var s,d,p=n.produce(i,c,function(u,h){s=u,d=h});return typeof Promise<"u"&&p instanceof Promise?p.then(function(u){return[u,s,d]}):[p,s,d]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var r=t.prototype;return r.createDraft=function(o){le(o)||oe(8),ye(o)&&(o=ic(o));var n=rn(this),i=_r(this,o,void 0);return i[U].C=!0,Rr(n),i},r.finishDraft=function(o,n){var i=o&&o[U],c=i.A;return Er(c,n),Cr(void 0,c)},r.setAutoFreeze=function(o){this.D=o},r.setUseProxies=function(o){o&&!sn&&oe(20),this.O=o},r.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 s=fe("Patches").$;return ye(o)?s(o,n):this.produce(o,function(d){return s(d,n)})},t}(),J=new dc,pc=J.produce,Xs=J.produceWithPatches.bind(J),Qs=J.setAutoFreeze.bind(J),Js=J.setUseProxies.bind(J),el=J.applyPatches.bind(J),tl=J.createDraft.bind(J),rl=J.finishDraft.bind(J),Vt=pc;function Me(t){"@babel/helpers - typeof";return Me=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Me(t)}function yn(t,r){if(Me(t)!="object"||!t)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var n=o.call(t,r||"default");if(Me(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}function mn(t){var r=yn(t,"string");return Me(r)=="symbol"?r:r+""}function gn(t,r,o){return(r=mn(r))in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function bn(t,r){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),o.push.apply(o,n)}return o}function Br(t){for(var r=1;r<arguments.length;r++){var o=arguments[r]!=null?arguments[r]:{};r%2?bn(Object(o),!0).forEach(function(n){gn(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):bn(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function V(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var xn=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Mr=function(){return Math.random().toString(36).substring(7).split("").join(".")},Zt={INIT:"@@redux/INIT"+Mr(),REPLACE:"@@redux/REPLACE"+Mr(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Mr()}};function uc(t){if(typeof t!="object"||t===null)return!1;for(var r=t;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(t)===r}function Wr(t,r,o){var n;if(typeof r=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(V(0));if(typeof r=="function"&&typeof o>"u"&&(o=r,r=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(V(1));return o(Wr)(t,r)}if(typeof t!="function")throw new Error(V(2));var i=t,c=r,s=[],d=s,p=!1;function u(){d===s&&(d=s.slice())}function h(){if(p)throw new Error(V(3));return c}function y(O){if(typeof O!="function")throw new Error(V(4));if(p)throw new Error(V(5));var T=!0;return u(),d.push(O),function(){if(T){if(p)throw new Error(V(6));T=!1,u();var R=d.indexOf(O);d.splice(R,1),s=null}}}function m(O){if(!uc(O))throw new Error(V(7));if(typeof O.type>"u")throw new Error(V(8));if(p)throw new Error(V(9));try{p=!0,c=i(c,O)}finally{p=!1}for(var T=s=d,N=0;N<T.length;N++){var R=T[N];R()}return O}function S(O){if(typeof O!="function")throw new Error(V(10));i=O,m({type:Zt.REPLACE})}function x(){var O,T=y;return O={subscribe:function(R){if(typeof R!="object"||R===null)throw new Error(V(11));function k(){R.next&&R.next(h())}k();var L=T(k);return{unsubscribe:L}}},O[xn]=function(){return this},O}return m({type:Zt.INIT}),n={dispatch:m,subscribe:y,getState:h,replaceReducer:S},n[xn]=x,n}function fc(t){Object.keys(t).forEach(function(r){var o=t[r],n=o(void 0,{type:Zt.INIT});if(typeof n>"u")throw new Error(V(12));if(typeof o(void 0,{type:Zt.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(V(13))})}function vn(t){for(var r=Object.keys(t),o={},n=0;n<r.length;n++){var i=r[n];typeof t[i]=="function"&&(o[i]=t[i])}var c=Object.keys(o),s,d;try{fc(o)}catch(p){d=p}return function(u,h){if(u===void 0&&(u={}),d)throw d;if(0)var y;for(var m=!1,S={},x=0;x<c.length;x++){var O=c[x],T=o[O],N=u[O],R=T(N,h);if(typeof R>"u"){var k=h&&h.type;throw new Error(V(14))}S[O]=R,m=m||R!==N}return m=m||c.length!==Object.keys(u).length,m?S:u}}function Ye(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return r.length===0?function(n){return n}:r.length===1?r[0]:r.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function Sn(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),c=function(){throw new Error(V(15))},s={getState:i.getState,dispatch:function(){return c.apply(void 0,arguments)}},d=r.map(function(p){return p(s)});return c=Ye.apply(void 0,d)(i.dispatch),Br(Br({},i),{},{dispatch:c})}}}function On(t){var r=function(n){var i=n.dispatch,c=n.getState;return function(s){return function(d){return typeof d=="function"?d(i,c,t):s(d)}}};return r}var En=On();En.withExtraArgument=On;var Hr=En;var Rn=function(){var t=function(r,o){return t=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])},t(r,o)};return function(r,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");t(r,o);function n(){this.constructor=r}r.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),hc=function(t,r){var o={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},n,i,c,s;return s={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function d(u){return function(h){return p([u,h])}}function p(u){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(c=u[0]&2?i.return:u[0]?i.throw||((c=i.return)&&c.call(i),0):i.next)&&!(c=c.call(i,u[1])).done)return c;switch(i=0,c&&(u=[u[0]&2,c.value]),u[0]){case 0:case 1:c=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,i=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(c=o.trys,!(c=c.length>0&&c[c.length-1])&&(u[0]===6||u[0]===2)){o=0;continue}if(u[0]===3&&(!c||u[1]>c[0]&&u[1]<c[3])){o.label=u[1];break}if(u[0]===6&&o.label<c[1]){o.label=c[1],c=u;break}if(c&&o.label<c[2]){o.label=c[2],o.ops.push(u);break}c[2]&&o.ops.pop(),o.trys.pop();continue}u=r.call(t,o)}catch(h){u=[6,h],i=0}finally{n=c=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},Xe=function(t,r){for(var o=0,n=r.length,i=t.length;o<n;o++,i++)t[i]=r[o];return t},yc=Object.defineProperty,mc=Object.defineProperties,gc=Object.getOwnPropertyDescriptors,Cn=Object.getOwnPropertySymbols,bc=Object.prototype.hasOwnProperty,xc=Object.prototype.propertyIsEnumerable,An=function(t,r,o){return r in t?yc(t,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[r]=o},Ee=function(t,r){for(var o in r||(r={}))bc.call(r,o)&&An(t,o,r[o]);if(Cn)for(var n=0,i=Cn(r);n<i.length;n++){var o=i[n];xc.call(r,o)&&An(t,o,r[o])}return t},Fr=function(t,r){return mc(t,gc(r))},vc=function(t,r,o){return new Promise(function(n,i){var c=function(p){try{d(o.next(p))}catch(u){i(u)}},s=function(p){try{d(o.throw(p))}catch(u){i(u)}},d=function(p){return p.done?n(p.value):Promise.resolve(p.value).then(c,s)};d((o=o.apply(t,r)).next())})};var Sc=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ye:Ye.apply(null,arguments)},vl=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function Oc(t){if(typeof t!="object"||t===null)return!1;var r=Object.getPrototypeOf(t);if(r===null)return!0;for(var o=r;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return r===o}var Ec=function(t){Rn(r,t);function r(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,r.prototype),i}return Object.defineProperty(r,Symbol.species,{get:function(){return r},enumerable:!1,configurable:!0}),r.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},r.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(r.bind.apply(r,Xe([void 0],o[0].concat(this)))):new(r.bind.apply(r,Xe([void 0],o.concat(this))))},r}(Array),Cc=function(t){Rn(r,t);function r(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,r.prototype),i}return Object.defineProperty(r,Symbol.species,{get:function(){return r},enumerable:!1,configurable:!0}),r.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},r.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(r.bind.apply(r,Xe([void 0],o[0].concat(this)))):new(r.bind.apply(r,Xe([void 0],o.concat(this))))},r}(Array);function $r(t){return le(t)?Vt(t,function(){}):t}function Ac(t){return typeof t=="boolean"}function wc(){return function(r){return Nc(r)}}function Nc(t){t===void 0&&(t={});var r=t.thunk,o=r===void 0?!0:r,n=t.immutableCheck,i=n===void 0?!0:n,c=t.serializableCheck,s=c===void 0?!0:c,d=new Ec;if(o&&(Ac(o)?d.push(Hr):d.push(Hr.withExtraArgument(o.extraArgument))),0){if(i)var p;if(s)var u}return d}var zr=!0;function _n(t){var r=wc(),o=t||{},n=o.reducer,i=n===void 0?void 0:n,c=o.middleware,s=c===void 0?r():c,d=o.devTools,p=d===void 0?!0:d,u=o.preloadedState,h=u===void 0?void 0:u,y=o.enhancers,m=y===void 0?void 0:y,S;if(typeof i=="function")S=i;else if(Oc(i))S=vn(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 x=s;if(typeof x=="function"&&(x=x(r),!zr&&!Array.isArray(x)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!zr&&x.some(function(L){return typeof L!="function"}))throw new Error("each middleware provided to configureStore must be a function");var O=Sn.apply(void 0,x),T=Ye;p&&(T=Sc(Ee({trace:!zr},typeof p=="object"&&p)));var N=new Cc(O),R=N;Array.isArray(m)?R=Xe([O],m):typeof m=="function"&&(R=m(N));var k=T.apply(void 0,R);return Wr(S,h,k)}function Ce(t,r){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(r){var c=r.apply(void 0,n);if(!c)throw new Error("prepareAction did not return an object");return Ee(Ee({type:t,payload:c.payload},"meta"in c&&{meta:c.meta}),"error"in c&&{error:c.error})}return{type:t,payload:n[0]}}return o.toString=function(){return""+t},o.type=t,o.match=function(n){return n.type===t},o}function Tn(t){var r={},o=[],n,i={addCase:function(c,s){var d=typeof c=="string"?c:c.type;if(d in r)throw new Error("addCase cannot be called with two reducers for the same action type");return r[d]=s,i},addMatcher:function(c,s){return o.push({matcher:c,reducer:s}),i},addDefaultCase:function(c){return n=c,i}};return t(i),[r,o,n]}function Rc(t){return typeof t=="function"}function _c(t,r,o,n){o===void 0&&(o=[]);var i=typeof r=="function"?Tn(r):[r,o,n],c=i[0],s=i[1],d=i[2],p;if(Rc(t))p=function(){return $r(t())};else{var u=$r(t);p=function(){return u}}function h(y,m){y===void 0&&(y=p());var S=Xe([c[m.type]],s.filter(function(x){var O=x.matcher;return O(m)}).map(function(x){var O=x.reducer;return O}));return S.filter(function(x){return!!x}).length===0&&(S=[d]),S.reduce(function(x,O){if(O)if(ye(x)){var T=x,N=O(T,m);return N===void 0?x:N}else{if(le(x))return Vt(x,function(R){return O(R,m)});var N=O(x,m);if(N===void 0){if(x===null)return x;throw Error("A case reducer on a non-draftable value must not return undefined")}return N}return x},y)}return h.getInitialState=p,h}function Tc(t,r){return t+"/"+r}function In(t){var r=t.name;if(!r)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof t.initialState=="function"?t.initialState:$r(t.initialState),n=t.reducers||{},i=Object.keys(n),c={},s={},d={};i.forEach(function(h){var y=n[h],m=Tc(r,h),S,x;"reducer"in y?(S=y.reducer,x=y.prepare):S=y,c[h]=S,s[m]=S,d[h]=x?Ce(m,x):Ce(m)});function p(){var h=typeof t.extraReducers=="function"?Tn(t.extraReducers):[t.extraReducers],y=h[0],m=y===void 0?{}:y,S=h[1],x=S===void 0?[]:S,O=h[2],T=O===void 0?void 0:O,N=Ee(Ee({},m),s);return _c(o,function(R){for(var k in N)R.addCase(k,N[k]);for(var L=0,G=x;L<G.length;L++){var ie=G[L];R.addMatcher(ie.matcher,ie.reducer)}T&&R.addDefaultCase(T)})}var u;return{name:r,reducer:function(h,y){return u||(u=p()),u(h,y)},actions:d,caseReducers:c,getInitialState:function(){return u||(u=p()),u.getInitialState()}}}var Ic="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Lc=function(t){t===void 0&&(t=21);for(var r="",o=t;o--;)r+=Ic[Math.random()*64|0];return r},Pc=["name","message","stack","code"],Gr=function(){function t(r,o){this.payload=r,this.meta=o}return t}(),wn=function(){function t(r,o){this.payload=r,this.meta=o}return t}(),kc=function(t){if(typeof t=="object"&&t!==null){for(var r={},o=0,n=Pc;o<n.length;o++){var i=n[o];typeof t[i]=="string"&&(r[i]=t[i])}return r}return{message:String(t)}},Cl=function(){function t(r,o,n){var i=Ce(r+"/fulfilled",function(h,y,m,S){return{payload:h,meta:Fr(Ee({},S||{}),{arg:m,requestId:y,requestStatus:"fulfilled"})}}),c=Ce(r+"/pending",function(h,y,m){return{payload:void 0,meta:Fr(Ee({},m||{}),{arg:y,requestId:h,requestStatus:"pending"})}}),s=Ce(r+"/rejected",function(h,y,m,S,x){return{payload:S,error:(n&&n.serializeError||kc)(h||"Rejected"),meta:Fr(Ee({},x||{}),{arg:m,requestId:y,rejectedWithValue:!!S,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),d=!1,p=typeof AbortController<"u"?AbortController:function(){function h(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return h.prototype.abort=function(){},h}();function u(h){return function(y,m,S){var x=n?.idGenerator?n.idGenerator(h):Lc(),O=new p,T,N=!1;function R(L){T=L,O.abort()}var k=function(){return vc(this,null,function(){var L,G,ie,Ie,q,Le,$e;return hc(this,function(f){switch(f.label){case 0:return f.trys.push([0,4,,5]),Ie=(L=n?.condition)==null?void 0:L.call(n,h,{getState:m,extra:S}),Uc(Ie)?[4,Ie]:[3,2];case 1:Ie=f.sent(),f.label=2;case 2:if(Ie===!1||O.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return N=!0,q=new Promise(function(g,A){return O.signal.addEventListener("abort",function(){return A({name:"AbortError",message:T||"Aborted"})})}),y(c(x,h,(G=n?.getPendingMeta)==null?void 0:G.call(n,{requestId:x,arg:h},{getState:m,extra:S}))),[4,Promise.race([q,Promise.resolve(o(h,{dispatch:y,getState:m,extra:S,requestId:x,signal:O.signal,abort:R,rejectWithValue:function(g,A){return new Gr(g,A)},fulfillWithValue:function(g,A){return new wn(g,A)}})).then(function(g){if(g instanceof Gr)throw g;return g instanceof wn?i(g.payload,x,h,g.meta):i(g,x,h)})])];case 3:return ie=f.sent(),[3,5];case 4:return Le=f.sent(),ie=Le instanceof Gr?s(null,x,h,Le.payload,Le.meta):s(Le,x,h),[3,5];case 5:return $e=n&&!n.dispatchConditionRejection&&s.match(ie)&&ie.meta.condition,$e||y(ie),[2,ie]}})})}();return Object.assign(k,{abort:R,requestId:x,arg:h,unwrap:function(){return k.then(Dc)}})}}return Object.assign(u,{pending:c,rejected:s,fulfilled:i,typePrefix:r})}return t.withTypes=function(){return t},t}();function Dc(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Uc(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Ln="listener",Pn="completed",kn="cancelled",Al="task-"+kn,wl="task-"+Pn,Nl=Ln+"-"+kn,Rl=Ln+"-"+Pn;var jr="listenerMiddleware";var _l=Ce(jr+"/add"),Tl=Ce(jr+"/removeAll"),Il=Ce(jr+"/remove");var Nn,Ll=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(Nn||(Nn=Promise.resolve())).then(t).catch(function(r){return setTimeout(function(){throw r},0)})},Bc=function(t){return function(r){setTimeout(r,t)}},Pl=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Bc(10);un();function Mc(t,r){return class extends t{constructor(){super(...arguments),this.eventBus=r??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 qt=class extends Mc(Object){};window.ftReduxStores||(window.ftReduxStores={});var Dn=class t extends qt{static get(r){var o;let n=typeof r=="string"?r:r.name,i=typeof r=="string"?void 0:r,c=window.ftReduxStores[n];if(mt(c))return c;if(i==null)return;let s=In({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),d=_n({reducer:(p,u)=>u.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__")?{...p,...u.overwrites}:s.reducer(p,u)});return window.ftReduxStores[i.name]=new t(s,d,i.eventBus)}constructor(r,o,n){super(),this.reduxSlice=r,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new Ht;let i=c=>c!=null?JSON.parse(JSON.stringify(c)):c;this.actions=new Proxy(this.reduxSlice.actions,{get:(c,s,d)=>{let p=s,u=c[p];return u?(...h)=>{let y=u(...h.map(i));return this.reduxStore.dispatch(y),y}:h=>{this.setState({[p]:i(h)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(r){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(r).join("_"),overwrites:r})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(r){throw new Error("Not implemented yet.")}subscribe(r){return this.reduxStore.subscribe(r)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var tr=E(I());var Fc=E(Bn(),1);var Mn;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Mn||(Mn={}));var Wn;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(Wn||(Wn={}));var Hn;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.MAP_ATTACHMENT="MAP_ATTACHMENT",t.RESOURCE="RESOURCE"})(Hn||(Hn={}));var Fn;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Fn||(Fn={}));var zn;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(zn||(zn={}));var Gn;(function(t){t.BOOKMARK__CREATE="BOOKMARK__CREATE",t.BOOKMARK__DELETE="BOOKMARK__DELETE",t.CASE_DEFLECTION__START="CASE_DEFLECTION__START",t.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",t.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.DOCUMENT__DISPLAY="DOCUMENT__DISPLAY",t.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",t.DOCUMENT__PRINT="DOCUMENT__PRINT",t.DOCUMENT__PROCESS="DOCUMENT__PROCESS",t.DOCUMENT__RATE="DOCUMENT__RATE",t.DOCUMENT__SEARCH="DOCUMENT__SEARCH",t.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",t.DOCUMENT__UNRATE="DOCUMENT__UNRATE",t.FEEDBACK__SEND="FEEDBACK__SEND",t.GEN_AI__COMPLETED_QUERY="GEN_AI__COMPLETED_QUERY",t.GEN_AI__RATE="GEN_AI__RATE",t.GENAI_CASE_DEFLECTION__START="GENAI_CASE_DEFLECTION__START",t.GENAI_CASE_DEFLECTION__OPEN_TICKET="GENAI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_CONTEXT_MENU="SEARCH_RESULT__OPEN_CONTEXT_MENU",t.TOPIC__DISPLAY="TOPIC__DISPLAY",t.TOPIC__RATE="TOPIC__RATE",t.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",t.TOPIC__UNRATE="TOPIC__UNRATE",t.USER__LOGIN="USER__LOGIN",t.USER__LOGOUT="USER__LOGOUT",t.HEARTBEAT="HEARTBEAT"})(Gn||(Gn={}));var $n;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})($n||($n={}));var jn;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT"})(jn||(jn={}));var Kn;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Kn||(Kn={}));var Vn;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Vn||(Vn={}));var Zn;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Zn||(Zn={}));var qn;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(qn||(qn={}));var Yn;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(Yn||(Yn={}));var Xn;(function(t){t.ASC="ASC",t.DESC="DESC"})(Xn||(Xn={}));var Qn;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Qn||(Qn={}));var Jn;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Jn||(Jn={}));var ea;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK"})(ea||(ea={}));var ta;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(ta||(ta={}));var ra;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"})(ra||(ra={}));var oa;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(oa||(oa={}));var na;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"})(na||(na={}));var aa;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(aa||(aa={}));var F;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(F||(F={}));var ia;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(ia||(ia={}));var ca;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(ca||(ca={}));var sa;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(sa||(sa={}));var Hc={[F.PERSONAL_BOOK_SHARE_USER]:[F.PERSONAL_BOOK_USER],[F.HTML_EXPORT_USER]:[F.PERSONAL_BOOK_USER],[F.PDF_EXPORT_USER]:[F.PERSONAL_BOOK_USER],[F.KHUB_ADMIN]:[F.CONTENT_PUBLISHER],[F.ADMIN]:[F.KHUB_ADMIN,F.USERS_ADMIN,F.PORTAL_ADMIN],[F.GENERATIVE_AI_EXPORT_USER]:[F.GENERATIVE_AI_USER]};function la(t,r){return t===r||(Hc[t]??[]).some(o=>la(o,r))}function da(t,r){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(n=>la(n,r))}var Qt=class extends xe{async listMySearches(){let{session:r}=w.getState();return da(r,F.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(r.profile.userId),5*60*1e3):[]}};var Jt=class extends xe{async listMyBookmarks(){let r=w.getState().session;return r?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(r.profile.userId),5*60*1e3):[]}};var zc="ft-user-assets",er=tr.FtReduxStore.get({name:zc,initialState:{savedSearches:void 0,bookmarks:void 0}}),Kr=class{constructor(){this.currentSession=w.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Jt,this.savedSearchesService=new Qt,w.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var r;let{session:o}=w.getState();(0,tr.deepEqual)((r=this.currentSession)===null||r===void 0?void 0:r.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),er.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),er.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let r=await this.savedSearchesService.listMySearches();er.actions.savedSearches(r)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var r;if(this.bookmarksAreUsed){let o=!((r=this.currentSession)===null||r===void 0)&&r.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;er.actions.bookmarks(o)}}},_d=new Kr;var Vr=class{addCommand(r,o=!1){w.commands.add(r,o)}consumeCommand(r){return w.commands.consume(r)}};window.FluidTopicsAppInfoStoreService=new Vr;var pa=E(I()),Zr=class{highlightHtml(r,o,n){(0,pa.highlightHtml)(r,o,n)}};window.FluidTopicsHighlightHtmlService=new Zr;var ua=E(I());var qr=class{isDate(r){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===r))===null||i===void 0?void 0:i.date)!==null&&c!==void 0?c:!1}format(r,o){var n,i,c;return ua.DateFormatter.format(r,(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 qr;var fa=E(I());var Ot=class{static get(r,o){var n,i,c,s;let d=w.getState(),{lang:p,region:u}=(i=(n=d.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new fa.SearchPlaceConverter(d.baseUrl,(s=(c=window.FluidTopicsClientConfiguration)===null||c===void 0?void 0:c.predefinedSorts)!==null&&s!==void 0?s:{},r??20,d.searchInAllLanguagesAllowed,o??`${p}-${u}`)}};var Yr=class{urlToSearchRequest(r){return Ot.get().parse(r)}searchRequestToUrl(r){return Ot.get().serialize(r)}};window.FluidTopicsUrlService=new Yr;var we=E(I());var We=class t extends CustomEvent{constructor(r){super(t.eventName,{detail:{currentItem:r}})}};We.eventName="change";var Xr=class{itemName(r){return`fluid-topics-history-item-${r}`}get(r){let o=sessionStorage.getItem(this.itemName(r));return o?JSON.parse(o):void 0}set(r,o){sessionStorage.setItem(this.itemName(r),JSON.stringify(o))}},ha=new Xr;var rr=class t extends we.WithEventBus{static build(){return new t(window.history,ha,()=>window.location,!1)}constructor(r,o,n,i){var c,s;super(),this.history=r,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=r.pushState,this.realReplaceState=r.replaceState,this.initialIndex=(s=(c=r.state)===null||c===void 0?void 0:c.index)!==null&&s!==void 0?s:r.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(r,o=!1){let n=o&&this.currentIndex===r.index-1;this.currentState={...this.buildCurrentState(),...r},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,we.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new We(this.currentItem())),0)}installProxies(){let r=o=>(n,i,[c,s,d])=>{let p=o(),u={...p===this.currentIndex?this.currentState:void 0,...c,index:p,href:typeof d=="string"?d:(d??this.windowLocation()).href};n.apply(i,[u,s,d]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:r(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:r(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",r=>this.setCurrentState(r.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(r){for(let o=this.history.length-1;o>=0;o--)r?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(r,o=!1){var n,i,c;let s={...this.buildCurrentState(),...r,index:this.currentIndex,title:(n=r?.title)!==null&&n!==void 0?n:this.currentState.title},d=o?(i=r?.majorState)!==null&&i!==void 0?i:this.currentState.majorState:(c=this.currentState.majorState)!==null&&c!==void 0?c:r?.majorState;d!=null&&(s.majorState=d),this.setCurrentState(s)}addHistoryChangeListener(r){this.addEventListener(We.eventName,r)}removeHistoryChangeListener(r){this.removeEventListener(We.eventName,r)}currentItem(){return(0,we.deepCopy)(this.currentState)}back(){let r=this.previousMajorPosition();r>=0?this.history.go(r-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,we.deepCopy)(this.states[this.previousMajorPosition()])}previousMajorPosition(){let r=this.currentIndex;for(;r>0&&!this.isMajorState(r);)r--;return this.previousExistingPosition(r)}forward(){let r=this.nextMajorPosition();r<this.states.length?this.history.go(r-this.currentIndex):this.history.forward()}forwardItem(){return(0,we.deepCopy)(this.states[this.nextMajorPosition()])}nextMajorPosition(){let r=this.currentIndex;do r++;while(r<this.states.length&&!this.isMajorState(r));do r++;while(r<this.states.length&&!this.isMajorState(r));return this.previousExistingPosition(r)}previousExistingPosition(r){let o=r;do o--;while(o>0&&!this.hasState(o));return o}buildCurrentState(){var r,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(r=this.history.state)===null||r===void 0?void 0:r.title)!==null&&o!==void 0?o:document.title}}hasState(r){return this.states[r]!=null}isMajorState(r){var o,n;return this.hasState(r)&&((n=(o=this.states[r])===null||o===void 0?void 0:o.majorState)!==null&&n!==void 0?n:!0)}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=rr.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});(0,ya.customElement)("ft-app-context")(M);var va=E(Q());var Gc=E(I());function ma(t){return t.match(/^[\w-]+\.[\w-]+$/)}var $c=function(t,r,o,n){var i=arguments.length,c=i<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(t,r,o,n);else for(var d=t.length-1;d>=0;d--)(s=t[d])&&(c=(i<3?s(c):i>3?s(r,o,c):s(r,o))||c);return i>3&&c&&Object.defineProperty(r,o,c),c},ga=Symbol("i18nAttributes"),ba=Symbol("i18nListAttributes"),Sa=Symbol("i18nProperties"),or=Symbol("i18nContexts"),Et=Symbol("i18nUnsubs");function ir(t){var r,o;class n extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[r]=new Map,this[o]=new Map}getI18nService(c){return c??this.useCustomMessageContexts?Bt:je}i18n(c){var s;this.hasI18nContext(c.context)||this.addI18nContext(c.context,void 0,c.custom);let d=(s=c.args)!==null&&s!==void 0?s:c.argsProvider?c.argsProvider(this):[];return this.getI18nService(c.custom).resolveMessage(c.context,c.key,...d)}customI18n(c,s){if(ma(c)){let[d,p]=c.split(".");return this.i18n({custom:!0,context:d,key:p,...s})||c}return c}firstUpdated(c){super.firstUpdated(c),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(c){super.update(c),this.updateI18nAttributes((s,d,p)=>c.has(d)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(c){this.updateI18nAttributes((s,d,p)=>{var u;return((u=p?.context)===null||u===void 0?void 0:u.toLowerCase())===c}),this.updateI18nProperties(s=>s.context.toLowerCase()===c),this.requestUpdate()}updateI18nAttributes(c){var s,d;let p=this,u=(h,y,m)=>m?.context&&m.key&&c(h,y,m)?{...m,message:this.i18n({context:m.context,key:m.key,...h})}:m;(s=this[ga])===null||s===void 0||s.forEach((h,y)=>p[y]=u(h,y,p[y])),(d=this[ba])===null||d===void 0||d.forEach((h,y)=>{var m;return p[y]=(m=p[y])===null||m===void 0?void 0:m.map(S=>u(h,y,S))})}updateI18nProperties(c){var s;(s=this[Sa])===null||s===void 0||s.forEach((d,p)=>{c(d,p)&&(this[p]=this.i18n(d))})}addI18nMessages(c,s,d){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(c,s,d)}addI18nContext(c,s,d){let p=(typeof c=="string"?c:c.name).toLowerCase();d=typeof c=="string"?d:c.custom,this[or].set(p,{isCustomContext:d}),this[Et].has(p)||this[Et].set(p,this.getI18nService(d).subscribe(p,()=>this.onI18nUpdate(p))),this.getI18nService(d).prepareContext(p,s)}hasI18nContext(c){return this[or].has(c.toLowerCase())}connectedCallback(){super.connectedCallback(),this[or].forEach((c,s)=>this.addI18nContext(s,void 0,c.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Et].forEach(c=>c()),this[Et].clear()}}return r=or,o=Et,$c([(0,va.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}var xa=class extends ir(ar.FtLitElement){},nr=class extends ir(ar.FtLitElementRedux){};var Ct=function(t,r,o,n){var i=arguments.length,c=i<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(t,r,o,n);else for(var d=t.length-1;d>=0;d--)(s=t[d])&&(c=(i<3?s(c):i>3?s(r,o,c):s(r,o))||c);return i>3&&c&&Object.defineProperty(r,o,c),c},de=class extends nr{constructor(){super(),this.editorMode=!1,this.addStore(w)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":cr.nothing:cr.html`
233
+ `}update(r){var o,n,i,c,s;super.update(r),r.has("baseUrl")&&(w.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),r.has("apiIntegrationIdentifier")&&w.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),r.has("uiLocale")&&w.actions.uiLocale(this.uiLocale),r.has("metadataConfiguration")&&w.actions.metadataConfiguration(this.metadataConfiguration),r.has("noCustom")&&w.actions.noCustom(this.noCustom),r.has("editorMode")&&w.actions.editorMode(this.editorMode),r.has("noCustomComponent")&&w.actions.noCustomComponent(this.noCustomComponent),r.has("session")&&w.actions.session(this.session),r.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(d=>je.addContext(d)),r.has("openExternalDocumentInNewTab")&&w.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),r.has("navigatorOnline")&&w.actions.navigatorOnline(this.navigatorOnline),r.has("forcedOffline")&&w.actions.forcedOffline(this.forcedOffline),r.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((s=(c=this.localesConfiguration)===null||c===void 0?void 0:c.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 r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},r.idleTimeoutInMillis),r})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}};M.elementDefinitions={};M.styles=Ho;K([(0,Y.property)()],M.prototype,"baseUrl",void 0);K([(0,Y.property)()],M.prototype,"apiIntegrationIdentifier",void 0);K([(0,Y.property)()],M.prototype,"uiLocale",void 0);K([(0,se.jsonProperty)(null)],M.prototype,"availableUiLocales",void 0);K([(0,se.jsonProperty)(null)],M.prototype,"metadataConfiguration",void 0);K([(0,Y.property)({type:Boolean})],M.prototype,"editorMode",void 0);K([(0,Y.property)({type:Boolean})],M.prototype,"noCustom",void 0);K([(0,Y.property)({type:Boolean})],M.prototype,"openExternalDocumentInNewTab",void 0);K([(0,Y.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],M.prototype,"noCustomComponent",void 0);K([(0,Y.property)({type:Boolean})],M.prototype,"withManualResources",void 0);K([(0,Y.property)({type:Boolean})],M.prototype,"navigatorOnline",void 0);K([(0,Y.property)({type:Boolean})],M.prototype,"forcedOffline",void 0);K([(0,Y.property)({type:Object})],M.prototype,"apiProvider",void 0);K([(0,se.jsonProperty)([])],M.prototype,"messageContexts",void 0);K([(0,se.jsonProperty)(void 0)],M.prototype,"session",void 0);K([(0,Y.state)()],M.prototype,"localesConfiguration",void 0);var Wc=E(Q());function Ji(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var o,n,i;if(Array.isArray(t)){if(o=t.length,o!=r.length)return!1;for(n=o;n--!==0;)if(!Mt(t[n],r[n]))return!1;return!0}if(t instanceof Map&&r instanceof Map){if(t.size!==r.size)return!1;for(n of t.entries())if(!r.has(n[0]))return!1;for(n of t.entries())if(!Mt(n[1],r.get(n[0])))return!1;return!0}if(t instanceof Set&&r instanceof Set){if(t.size!==r.size)return!1;for(n of t.entries())if(!r.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();let c=s=>Object.keys(s).filter(d=>s[d]!=null);if(i=c(t),o=i.length,o!==c(r).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[n]))return!1;for(n=o;n--!==0;){let s=i[n];if(!Mt(t[s],r[s]))return!1}return!0}return t!==t&&r!==r||t==null&&r==null}function Mt(t,r){try{return Ji(t,r)}catch{return!1}}function Wt(t,r){return!Mt(t,r)}var ec=E(Q(),1);var Ht=class{constructor(){this.queue=[]}add(r,o=!1){o&&this.clear(r.type),this.queue.push(r)}consume(r){let o=this.queue.find(n=>n.type===r);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(r){typeof r=="string"?this.queue=this.queue.filter(o=>o.type!==r):this.queue=this.queue.filter(o=>!r.test(o.type))}};var Ke=E(Q(),1);var Go=E(Q(),1);function $o(t,r){let o=()=>JSON.parse(JSON.stringify(t));return(0,Go.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,...r??{}})}var Ft=class{constructor(r=0){this.timeout=r,this.callbacks=[]}run(r,o){return this.callbacks=[r],this.debounce(o)}queue(r,o){return this.callbacks.push(r),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(r){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),r??this.timeout),this.promise}async runCallbacks(){var r,o;let n=[...this.callbacks];this.callbacks=[];let i=(r=this.rejectPromise)!==null&&r!==void 0?r:()=>null,c=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let s of n)try{await s()}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 Ko=E(Z(),1);var zt=globalThis,tc=zt.ShadowRoot&&(zt.ShadyCSS===void 0||zt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Bs=Symbol();var jo=(t,r)=>{if(tc)t.adoptedStyleSheets=r.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of r){let n=document.createElement("style"),i=zt.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,t.appendChild(n)}};var Gt=class extends Ko.LitElement{createRenderRoot(){let r=this.constructor;r.elementDefinitions&&!r.registry&&(r.registry=new CustomElementRegistry,Object.entries(r.elementDefinitions).forEach(([i,c])=>r.registry.define(i,c)));let o={...r.shadowRootOptions,customElements:r.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return jo(n,r.elementStyles),n}};function Vo(t,r,...o){var n;let i=t.querySelector(r);for(let c of o)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(c);return i}var yt=function(t,r,o,n){var i=arguments.length,c=i<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(t,r,o,n);else for(var d=t.length-1;d>=0;d--)(s=t[d])&&(c=(i<3?s(c):i>3?s(r,o,c):s(r,o))||c);return i>3&&c&&Object.defineProperty(r,o,c),c},Xo,Zo=Symbol("constructorPrototype"),qo=Symbol("constructorName"),Qo=Symbol("exportpartsDebouncer"),Yo=Symbol("dynamicDependenciesLoaded"),he=class extends Gt{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Xo]=new Ft(5),this[qo]=this.constructor.name,this[Zo]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[qo]&&Object.setPrototypeOf(this,this[Zo])}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 r=this.constructor;r[Yo]||(r[Yo]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(r){super.updated(r),this.updateComplete.then(()=>{this.contentAvailableCallback(r),this.focusElementToFocus(r),this.applyCustomStylesheet(r),this.scheduleExportpartsUpdate()})}contentAvailableCallback(r){}focusElementToFocus(r){if(r.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let c=[...i??[],n];o=Vo(this.shadowRoot,...c)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(r){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(r.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 r,o,n;(!((r=this.exportpartsPrefix)===null||r===void 0)&&r.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[Qo].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(r){var o,n,i,c,s,d;let p=m=>m!=null&&m.trim().length>0,u=r.filter(p).map(m=>m.trim());if(u.length===0){this.removeAttribute("exportparts");return}let h=new Set;for(let m of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let S=(c=(i=m.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&c!==void 0?c:[],x=(d=(s=m.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(O=>O.split(":")[1]))!==null&&d!==void 0?d:[];new Array(...S,...x).filter(p).map(O=>O.trim()).forEach(O=>h.add(O))}if(h.size===0){this.removeAttribute("exportparts");return}let y=[...h.values()].flatMap(m=>u.map(S=>`${m}:${S}--${m}`));this.setAttribute("exportparts",[...this.part,...y].join(", "))}};Xo=Qo;yt([(0,Ke.property)()],he.prototype,"exportpartsPrefix",void 0);yt([$o([])],he.prototype,"exportpartsPrefixes",void 0);yt([(0,Ke.property)()],he.prototype,"customStylesheet",void 0);yt([(0,Ke.property)()],he.prototype,"elementToFocus",void 0);yt([(0,Ke.state)()],he.prototype,"useAdoptedStyleSheets",void 0);function mt(t){var r;return(r=t?.isFtReduxStore)!==null&&r!==void 0?r:!1}var Jo,en,tn,gt=Symbol("internalReduxEventsUnsubscribers"),ve=Symbol("internalStoresUnsubscribers"),Ue=Symbol("internalStores"),bt=class extends he{constructor(){super(...arguments),this[Jo]=new Map,this[en]=new Map,this[tn]=new Map}get reduxConstructor(){return this.constructor}update(r){super.update(r),[...this.reduxConstructor.reduxReactiveProperties].some(o=>r.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[Ue].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ue].values()][0]}getStore(r){return r==null?this.getUnnamedStore():this[Ue].get(r)}addStore(r,o){var n;o=(n=o??(mt(r)?r.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this[Ue].set(o,r),this.subscribeToStore(o,r),this.updateFromStores()}removeStore(r){let o=typeof r=="string"?r:r.name;this.unsubscribeFromStore(o),this[Ue].delete(o)}setupStores(){this.unsubscribeFromStores(),this[Ue].forEach((r,o)=>this.subscribeToStore(o,r)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((r,o)=>{let n=this.constructor.getPropertyOptions(o);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:o)){let i=this.getStore(r.store);i&&(r.store?this[ve].has(r.store):this[ve].size>0)&&(this[o]=r.selector(i.getState(),this))}})}subscribeToStore(r,o){var n;this[ve].set(r,o.subscribe(()=>this.updateFromStores())),this[gt].set(r,[]),mt(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 s=d=>this[c](d);o.addEventListener(i.eventName,s),this[gt].get(r).push(()=>o.removeEventListener(i.eventName,s))}})),this.onStoreAvailable(r)}unsubscribeFromStores(){this[ve].forEach((r,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(r){var o;this[ve].has(r)&&this[ve].get(r)(),this[ve].delete(r),(o=this[gt].get(r))===null||o===void 0||o.forEach(n=>n()),this[gt].delete(r)}onStoreAvailable(r){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};Jo=ve,en=Ue,tn=gt;bt.reduxProperties=new Map;bt.reduxReactiveProperties=new Set;bt.reduxEventListeners=new Map;function oe(t){for(var r=arguments.length,o=Array(r>1?r-1:0),n=1;n<r;n++)o[n-1]=arguments[n];if(0)var i,c;throw Error("[Immer] minified error nr: "+t+(o.length?" "+o.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ye(t){return!!t&&!!t[U]}function le(t){var r;return!!t&&(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)===lc}(t)||Array.isArray(t)||!!t[ln]||!!(!((r=t.constructor)===null||r===void 0)&&r[ln])||Ir(t)||Lr(t))}function Be(t,r,o){o===void 0&&(o=!1),qe(t)===0?(o?Object.keys:Ze)(t).forEach(function(n){o&&typeof n=="symbol"||r(n,t[n],t)}):t.forEach(function(n,i){return r(i,n,t)})}function qe(t){var r=t[U];return r?r.i>3?r.i-4:r.i:Array.isArray(t)?1:Ir(t)?2:Lr(t)?3:0}function Ve(t,r){return qe(t)===2?t.has(r):Object.prototype.hasOwnProperty.call(t,r)}function rc(t,r){return qe(t)===2?t.get(r):t[r]}function dn(t,r,o){var n=qe(t);n===2?t.set(r,o):n===3?t.add(o):t[r]=o}function pn(t,r){return t===r?t!==0||1/t==1/r:t!=t&&r!=r}function Ir(t){return cc&&t instanceof Map}function Lr(t){return sc&&t instanceof Set}function Se(t){return t.o||t.t}function Pr(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var r=hn(t);delete r[U];for(var o=Ze(r),n=0;n<o.length;n++){var i=o[n],c=r[i];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(r[i]={configurable:!0,writable:!0,enumerable:c.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),r)}function kr(t,r){return r===void 0&&(r=!1),Dr(t)||ye(t)||!le(t)||(qe(t)>1&&(t.set=t.add=t.clear=t.delete=oc),Object.freeze(t),r&&Be(t,function(o,n){return kr(n,!0)},!0)),t}function oc(){oe(2)}function Dr(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function fe(t){var r=Tr[t];return r||oe(18,t),r}function nc(t,r){Tr[t]||(Tr[t]=r)}function Nr(){return vt}function Er(t,r){r&&(fe("Patches"),t.u=[],t.s=[],t.v=r)}function $t(t){Rr(t),t.p.forEach(ac),t.p=null}function Rr(t){t===vt&&(vt=t.l)}function rn(t){return vt={p:[],l:vt,h:t,m:!0,_:0}}function ac(t){var r=t[U];r.i===0||r.i===1?r.j():r.g=!0}function Cr(t,r){r._=r.p.length;var o=r.p[0],n=t!==void 0&&t!==o;return r.h.O||fe("ES5").S(r,t,n),n?(o[U].P&&($t(r),oe(4)),le(t)&&(t=jt(r,t),r.l||Kt(r,t)),r.u&&fe("Patches").M(o[U].t,t,r.u,r.s)):t=jt(r,o,[]),$t(r),r.u&&r.v(r.u,r.s),t!==fn?t:void 0}function jt(t,r,o){if(Dr(r))return r;var n=r[U];if(!n)return Be(r,function(d,p){return on(t,n,r,d,p,o)},!0),r;if(n.A!==t)return r;if(!n.P)return Kt(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=Pr(n.k):n.o,c=i,s=!1;n.i===3&&(c=new Set(i),i.clear(),s=!0),Be(c,function(d,p){return on(t,n,i,d,p,o,s)}),Kt(t,i,!1),o&&t.u&&fe("Patches").N(n,o,t.u,t.s)}return n.o}function on(t,r,o,n,i,c,s){if(ye(i)){var d=jt(t,i,c&&r&&r.i!==3&&!Ve(r.R,n)?c.concat(n):void 0);if(dn(o,n,d),!ye(d))return;t.m=!1}else s&&o.add(i);if(le(i)&&!Dr(i)){if(!t.h.D&&t._<1)return;jt(t,i),r&&r.A.l||Kt(t,i)}}function Kt(t,r,o){o===void 0&&(o=!1),!t.l&&t.h.D&&t.m&&kr(r,o)}function Ar(t,r){var o=t[U];return(o?Se(o):t)[r]}function nn(t,r){if(r in t)for(var o=Object.getPrototypeOf(t);o;){var n=Object.getOwnPropertyDescriptor(o,r);if(n)return n;o=Object.getPrototypeOf(o)}}function Oe(t){t.P||(t.P=!0,t.l&&Oe(t.l))}function wr(t){t.o||(t.o=Pr(t.t))}function _r(t,r,o){var n=Ir(r)?fe("MapSet").F(r,o):Lr(r)?fe("MapSet").T(r,o):t.O?function(i,c){var s=Array.isArray(i),d={i:s?1:0,A:c?c.A:Nr(),P:!1,I:!1,R:{},l:c,t:i,k:null,o:null,j:null,C:!1},p=d,u=St;s&&(p=[d],u=xt);var h=Proxy.revocable(p,u),y=h.revoke,m=h.proxy;return d.k=m,d.j=y,m}(r,o):fe("ES5").J(r,o);return(o?o.A:Nr()).p.push(n),n}function ic(t){return ye(t)||oe(22,t),function r(o){if(!le(o))return o;var n,i=o[U],c=qe(o);if(i){if(!i.P&&(i.i<4||!fe("ES5").K(i)))return i.t;i.I=!0,n=an(o,c),i.I=!1}else n=an(o,c);return Be(n,function(s,d){i&&rc(i.t,s)===d||dn(n,s,r(d))}),c===3?new Set(n):n}(t)}function an(t,r){switch(r){case 2:return new Map(t);case 3:return Array.from(t)}return Pr(t)}function un(){function t(s,d){var p=c[s];return p?p.enumerable=d:c[s]=p={configurable:!0,enumerable:d,get:function(){var u=this[U];return St.get(u,s)},set:function(u){var h=this[U];St.set(h,s,u)}},p}function r(s){for(var d=s.length-1;d>=0;d--){var p=s[d][U];if(!p.P)switch(p.i){case 5:n(p)&&Oe(p);break;case 4:o(p)&&Oe(p)}}}function o(s){for(var d=s.t,p=s.k,u=Ze(p),h=u.length-1;h>=0;h--){var y=u[h];if(y!==U){var m=d[y];if(m===void 0&&!Ve(d,y))return!0;var S=p[y],x=S&&S[U];if(x?x.t!==m:!pn(S,m))return!0}}var O=!!d[U];return u.length!==Ze(d).length+(O?0:1)}function n(s){var d=s.k;if(d.length!==s.t.length)return!0;var p=Object.getOwnPropertyDescriptor(d,d.length-1);if(p&&!p.get)return!0;for(var u=0;u<d.length;u++)if(!d.hasOwnProperty(u))return!0;return!1}function i(s){s.g&&oe(3,JSON.stringify(Se(s)))}var c={};nc("ES5",{J:function(s,d){var p=Array.isArray(s),u=function(y,m){if(y){for(var S=Array(m.length),x=0;x<m.length;x++)Object.defineProperty(S,""+x,t(x,!0));return S}var O=hn(m);delete O[U];for(var T=Ze(O),N=0;N<T.length;N++){var R=T[N];O[R]=t(R,y||!!O[R].enumerable)}return Object.create(Object.getPrototypeOf(m),O)}(p,s),h={i:p?5:4,A:d?d.A:Nr(),P:!1,I:!1,R:{},l:d,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,U,{value:h,writable:!0}),u},S:function(s,d,p){p?ye(d)&&d[U].A===s&&r(s.p):(s.u&&function u(h){if(h&&typeof h=="object"){var y=h[U];if(y){var m=y.t,S=y.k,x=y.R,O=y.i;if(O===4)Be(S,function(L){L!==U&&(m[L]!==void 0||Ve(m,L)?x[L]||u(S[L]):(x[L]=!0,Oe(y)))}),Be(m,function(L){S[L]!==void 0||Ve(S,L)||(x[L]=!1,Oe(y))});else if(O===5){if(n(y)&&(Oe(y),x.length=!0),S.length<m.length)for(var T=S.length;T<m.length;T++)x[T]=!1;else for(var N=m.length;N<S.length;N++)x[N]=!0;for(var R=Math.min(S.length,m.length),k=0;k<R;k++)S.hasOwnProperty(k)||(x[k]=!0),x[k]===void 0&&u(S[k])}}}}(s.p[0]),r(s.p))},K:function(s){return s.i===4?o(s):n(s)}})}var cn,vt,Ur=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",cc=typeof Map<"u",sc=typeof Set<"u",sn=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",fn=Ur?Symbol.for("immer-nothing"):((cn={})["immer-nothing"]=!0,cn),ln=Ur?Symbol.for("immer-draftable"):"__$immer_draftable",U=Ur?Symbol.for("immer-state"):"__$immer_state";var lc=""+Object.prototype.constructor,Ze=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,hn=Object.getOwnPropertyDescriptors||function(t){var r={};return Ze(t).forEach(function(o){r[o]=Object.getOwnPropertyDescriptor(t,o)}),r},Tr={},St={get:function(t,r){if(r===U)return t;var o=Se(t);if(!Ve(o,r))return function(i,c,s){var d,p=nn(c,s);return p?"value"in p?p.value:(d=p.get)===null||d===void 0?void 0:d.call(i.k):void 0}(t,o,r);var n=o[r];return t.I||!le(n)?n:n===Ar(t.t,r)?(wr(t),t.o[r]=_r(t.A.h,n,t)):n},has:function(t,r){return r in Se(t)},ownKeys:function(t){return Reflect.ownKeys(Se(t))},set:function(t,r,o){var n=nn(Se(t),r);if(n?.set)return n.set.call(t.k,o),!0;if(!t.P){var i=Ar(Se(t),r),c=i?.[U];if(c&&c.t===o)return t.o[r]=o,t.R[r]=!1,!0;if(pn(o,i)&&(o!==void 0||Ve(t.t,r)))return!0;wr(t),Oe(t)}return t.o[r]===o&&(o!==void 0||r in t.o)||Number.isNaN(o)&&Number.isNaN(t.o[r])||(t.o[r]=o,t.R[r]=!0),!0},deleteProperty:function(t,r){return Ar(t.t,r)!==void 0||r in t.t?(t.R[r]=!1,wr(t),Oe(t)):delete t.R[r],t.o&&delete t.o[r],!0},getOwnPropertyDescriptor:function(t,r){var o=Se(t),n=Reflect.getOwnPropertyDescriptor(o,r);return n&&{writable:!0,configurable:t.i!==1||r!=="length",enumerable:n.enumerable,value:o[r]}},defineProperty:function(){oe(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){oe(12)}},xt={};Be(St,function(t,r){xt[t]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}}),xt.deleteProperty=function(t,r){return xt.set.call(this,t,r,void 0)},xt.set=function(t,r,o){return St.set.call(this,t[0],r,o,t[0])};var dc=function(){function t(o){var n=this;this.O=sn,this.D=!0,this.produce=function(i,c,s){if(typeof i=="function"&&typeof c!="function"){var d=c;c=i;var p=n;return function(O){var T=this;O===void 0&&(O=d);for(var N=arguments.length,R=Array(N>1?N-1:0),k=1;k<N;k++)R[k-1]=arguments[k];return p.produce(O,function(L){var G;return(G=c).call.apply(G,[T,L].concat(R))})}}var u;if(typeof c!="function"&&oe(6),s!==void 0&&typeof s!="function"&&oe(7),le(i)){var h=rn(n),y=_r(n,i,void 0),m=!0;try{u=c(y),m=!1}finally{m?$t(h):Rr(h)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(O){return Er(h,s),Cr(O,h)},function(O){throw $t(h),O}):(Er(h,s),Cr(u,h))}if(!i||typeof i!="object"){if((u=c(i))===void 0&&(u=i),u===fn&&(u=void 0),n.D&&kr(u,!0),s){var S=[],x=[];fe("Patches").M(i,u,S,x),s(S,x)}return u}oe(21,i)},this.produceWithPatches=function(i,c){if(typeof i=="function")return function(u){for(var h=arguments.length,y=Array(h>1?h-1:0),m=1;m<h;m++)y[m-1]=arguments[m];return n.produceWithPatches(u,function(S){return i.apply(void 0,[S].concat(y))})};var s,d,p=n.produce(i,c,function(u,h){s=u,d=h});return typeof Promise<"u"&&p instanceof Promise?p.then(function(u){return[u,s,d]}):[p,s,d]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var r=t.prototype;return r.createDraft=function(o){le(o)||oe(8),ye(o)&&(o=ic(o));var n=rn(this),i=_r(this,o,void 0);return i[U].C=!0,Rr(n),i},r.finishDraft=function(o,n){var i=o&&o[U],c=i.A;return Er(c,n),Cr(void 0,c)},r.setAutoFreeze=function(o){this.D=o},r.setUseProxies=function(o){o&&!sn&&oe(20),this.O=o},r.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 s=fe("Patches").$;return ye(o)?s(o,n):this.produce(o,function(d){return s(d,n)})},t}(),J=new dc,pc=J.produce,Xs=J.produceWithPatches.bind(J),Qs=J.setAutoFreeze.bind(J),Js=J.setUseProxies.bind(J),el=J.applyPatches.bind(J),tl=J.createDraft.bind(J),rl=J.finishDraft.bind(J),Vt=pc;function Me(t){"@babel/helpers - typeof";return Me=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Me(t)}function yn(t,r){if(Me(t)!="object"||!t)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var n=o.call(t,r||"default");if(Me(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}function mn(t){var r=yn(t,"string");return Me(r)=="symbol"?r:r+""}function gn(t,r,o){return(r=mn(r))in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function bn(t,r){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),o.push.apply(o,n)}return o}function Br(t){for(var r=1;r<arguments.length;r++){var o=arguments[r]!=null?arguments[r]:{};r%2?bn(Object(o),!0).forEach(function(n){gn(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):bn(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function V(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var xn=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Mr=function(){return Math.random().toString(36).substring(7).split("").join(".")},Zt={INIT:"@@redux/INIT"+Mr(),REPLACE:"@@redux/REPLACE"+Mr(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Mr()}};function uc(t){if(typeof t!="object"||t===null)return!1;for(var r=t;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(t)===r}function Wr(t,r,o){var n;if(typeof r=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(V(0));if(typeof r=="function"&&typeof o>"u"&&(o=r,r=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(V(1));return o(Wr)(t,r)}if(typeof t!="function")throw new Error(V(2));var i=t,c=r,s=[],d=s,p=!1;function u(){d===s&&(d=s.slice())}function h(){if(p)throw new Error(V(3));return c}function y(O){if(typeof O!="function")throw new Error(V(4));if(p)throw new Error(V(5));var T=!0;return u(),d.push(O),function(){if(T){if(p)throw new Error(V(6));T=!1,u();var R=d.indexOf(O);d.splice(R,1),s=null}}}function m(O){if(!uc(O))throw new Error(V(7));if(typeof O.type>"u")throw new Error(V(8));if(p)throw new Error(V(9));try{p=!0,c=i(c,O)}finally{p=!1}for(var T=s=d,N=0;N<T.length;N++){var R=T[N];R()}return O}function S(O){if(typeof O!="function")throw new Error(V(10));i=O,m({type:Zt.REPLACE})}function x(){var O,T=y;return O={subscribe:function(R){if(typeof R!="object"||R===null)throw new Error(V(11));function k(){R.next&&R.next(h())}k();var L=T(k);return{unsubscribe:L}}},O[xn]=function(){return this},O}return m({type:Zt.INIT}),n={dispatch:m,subscribe:y,getState:h,replaceReducer:S},n[xn]=x,n}function fc(t){Object.keys(t).forEach(function(r){var o=t[r],n=o(void 0,{type:Zt.INIT});if(typeof n>"u")throw new Error(V(12));if(typeof o(void 0,{type:Zt.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(V(13))})}function vn(t){for(var r=Object.keys(t),o={},n=0;n<r.length;n++){var i=r[n];typeof t[i]=="function"&&(o[i]=t[i])}var c=Object.keys(o),s,d;try{fc(o)}catch(p){d=p}return function(u,h){if(u===void 0&&(u={}),d)throw d;if(0)var y;for(var m=!1,S={},x=0;x<c.length;x++){var O=c[x],T=o[O],N=u[O],R=T(N,h);if(typeof R>"u"){var k=h&&h.type;throw new Error(V(14))}S[O]=R,m=m||R!==N}return m=m||c.length!==Object.keys(u).length,m?S:u}}function Ye(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return r.length===0?function(n){return n}:r.length===1?r[0]:r.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function Sn(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),c=function(){throw new Error(V(15))},s={getState:i.getState,dispatch:function(){return c.apply(void 0,arguments)}},d=r.map(function(p){return p(s)});return c=Ye.apply(void 0,d)(i.dispatch),Br(Br({},i),{},{dispatch:c})}}}function On(t){var r=function(n){var i=n.dispatch,c=n.getState;return function(s){return function(d){return typeof d=="function"?d(i,c,t):s(d)}}};return r}var En=On();En.withExtraArgument=On;var Hr=En;var Rn=function(){var t=function(r,o){return t=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])},t(r,o)};return function(r,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");t(r,o);function n(){this.constructor=r}r.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),hc=function(t,r){var o={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},n,i,c,s;return s={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function d(u){return function(h){return p([u,h])}}function p(u){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(c=u[0]&2?i.return:u[0]?i.throw||((c=i.return)&&c.call(i),0):i.next)&&!(c=c.call(i,u[1])).done)return c;switch(i=0,c&&(u=[u[0]&2,c.value]),u[0]){case 0:case 1:c=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,i=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(c=o.trys,!(c=c.length>0&&c[c.length-1])&&(u[0]===6||u[0]===2)){o=0;continue}if(u[0]===3&&(!c||u[1]>c[0]&&u[1]<c[3])){o.label=u[1];break}if(u[0]===6&&o.label<c[1]){o.label=c[1],c=u;break}if(c&&o.label<c[2]){o.label=c[2],o.ops.push(u);break}c[2]&&o.ops.pop(),o.trys.pop();continue}u=r.call(t,o)}catch(h){u=[6,h],i=0}finally{n=c=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},Xe=function(t,r){for(var o=0,n=r.length,i=t.length;o<n;o++,i++)t[i]=r[o];return t},yc=Object.defineProperty,mc=Object.defineProperties,gc=Object.getOwnPropertyDescriptors,Cn=Object.getOwnPropertySymbols,bc=Object.prototype.hasOwnProperty,xc=Object.prototype.propertyIsEnumerable,An=function(t,r,o){return r in t?yc(t,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[r]=o},Ee=function(t,r){for(var o in r||(r={}))bc.call(r,o)&&An(t,o,r[o]);if(Cn)for(var n=0,i=Cn(r);n<i.length;n++){var o=i[n];xc.call(r,o)&&An(t,o,r[o])}return t},Fr=function(t,r){return mc(t,gc(r))},vc=function(t,r,o){return new Promise(function(n,i){var c=function(p){try{d(o.next(p))}catch(u){i(u)}},s=function(p){try{d(o.throw(p))}catch(u){i(u)}},d=function(p){return p.done?n(p.value):Promise.resolve(p.value).then(c,s)};d((o=o.apply(t,r)).next())})};var Sc=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ye:Ye.apply(null,arguments)},vl=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function Oc(t){if(typeof t!="object"||t===null)return!1;var r=Object.getPrototypeOf(t);if(r===null)return!0;for(var o=r;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return r===o}var Ec=function(t){Rn(r,t);function r(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,r.prototype),i}return Object.defineProperty(r,Symbol.species,{get:function(){return r},enumerable:!1,configurable:!0}),r.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},r.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(r.bind.apply(r,Xe([void 0],o[0].concat(this)))):new(r.bind.apply(r,Xe([void 0],o.concat(this))))},r}(Array),Cc=function(t){Rn(r,t);function r(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,r.prototype),i}return Object.defineProperty(r,Symbol.species,{get:function(){return r},enumerable:!1,configurable:!0}),r.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},r.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(r.bind.apply(r,Xe([void 0],o[0].concat(this)))):new(r.bind.apply(r,Xe([void 0],o.concat(this))))},r}(Array);function $r(t){return le(t)?Vt(t,function(){}):t}function Ac(t){return typeof t=="boolean"}function wc(){return function(r){return Nc(r)}}function Nc(t){t===void 0&&(t={});var r=t.thunk,o=r===void 0?!0:r,n=t.immutableCheck,i=n===void 0?!0:n,c=t.serializableCheck,s=c===void 0?!0:c,d=new Ec;if(o&&(Ac(o)?d.push(Hr):d.push(Hr.withExtraArgument(o.extraArgument))),0){if(i)var p;if(s)var u}return d}var zr=!0;function _n(t){var r=wc(),o=t||{},n=o.reducer,i=n===void 0?void 0:n,c=o.middleware,s=c===void 0?r():c,d=o.devTools,p=d===void 0?!0:d,u=o.preloadedState,h=u===void 0?void 0:u,y=o.enhancers,m=y===void 0?void 0:y,S;if(typeof i=="function")S=i;else if(Oc(i))S=vn(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 x=s;if(typeof x=="function"&&(x=x(r),!zr&&!Array.isArray(x)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!zr&&x.some(function(L){return typeof L!="function"}))throw new Error("each middleware provided to configureStore must be a function");var O=Sn.apply(void 0,x),T=Ye;p&&(T=Sc(Ee({trace:!zr},typeof p=="object"&&p)));var N=new Cc(O),R=N;Array.isArray(m)?R=Xe([O],m):typeof m=="function"&&(R=m(N));var k=T.apply(void 0,R);return Wr(S,h,k)}function Ce(t,r){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(r){var c=r.apply(void 0,n);if(!c)throw new Error("prepareAction did not return an object");return Ee(Ee({type:t,payload:c.payload},"meta"in c&&{meta:c.meta}),"error"in c&&{error:c.error})}return{type:t,payload:n[0]}}return o.toString=function(){return""+t},o.type=t,o.match=function(n){return n.type===t},o}function Tn(t){var r={},o=[],n,i={addCase:function(c,s){var d=typeof c=="string"?c:c.type;if(d in r)throw new Error("addCase cannot be called with two reducers for the same action type");return r[d]=s,i},addMatcher:function(c,s){return o.push({matcher:c,reducer:s}),i},addDefaultCase:function(c){return n=c,i}};return t(i),[r,o,n]}function Rc(t){return typeof t=="function"}function _c(t,r,o,n){o===void 0&&(o=[]);var i=typeof r=="function"?Tn(r):[r,o,n],c=i[0],s=i[1],d=i[2],p;if(Rc(t))p=function(){return $r(t())};else{var u=$r(t);p=function(){return u}}function h(y,m){y===void 0&&(y=p());var S=Xe([c[m.type]],s.filter(function(x){var O=x.matcher;return O(m)}).map(function(x){var O=x.reducer;return O}));return S.filter(function(x){return!!x}).length===0&&(S=[d]),S.reduce(function(x,O){if(O)if(ye(x)){var T=x,N=O(T,m);return N===void 0?x:N}else{if(le(x))return Vt(x,function(R){return O(R,m)});var N=O(x,m);if(N===void 0){if(x===null)return x;throw Error("A case reducer on a non-draftable value must not return undefined")}return N}return x},y)}return h.getInitialState=p,h}function Tc(t,r){return t+"/"+r}function In(t){var r=t.name;if(!r)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof t.initialState=="function"?t.initialState:$r(t.initialState),n=t.reducers||{},i=Object.keys(n),c={},s={},d={};i.forEach(function(h){var y=n[h],m=Tc(r,h),S,x;"reducer"in y?(S=y.reducer,x=y.prepare):S=y,c[h]=S,s[m]=S,d[h]=x?Ce(m,x):Ce(m)});function p(){var h=typeof t.extraReducers=="function"?Tn(t.extraReducers):[t.extraReducers],y=h[0],m=y===void 0?{}:y,S=h[1],x=S===void 0?[]:S,O=h[2],T=O===void 0?void 0:O,N=Ee(Ee({},m),s);return _c(o,function(R){for(var k in N)R.addCase(k,N[k]);for(var L=0,G=x;L<G.length;L++){var ie=G[L];R.addMatcher(ie.matcher,ie.reducer)}T&&R.addDefaultCase(T)})}var u;return{name:r,reducer:function(h,y){return u||(u=p()),u(h,y)},actions:d,caseReducers:c,getInitialState:function(){return u||(u=p()),u.getInitialState()}}}var Ic="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Lc=function(t){t===void 0&&(t=21);for(var r="",o=t;o--;)r+=Ic[Math.random()*64|0];return r},Pc=["name","message","stack","code"],Gr=function(){function t(r,o){this.payload=r,this.meta=o}return t}(),wn=function(){function t(r,o){this.payload=r,this.meta=o}return t}(),kc=function(t){if(typeof t=="object"&&t!==null){for(var r={},o=0,n=Pc;o<n.length;o++){var i=n[o];typeof t[i]=="string"&&(r[i]=t[i])}return r}return{message:String(t)}},Cl=function(){function t(r,o,n){var i=Ce(r+"/fulfilled",function(h,y,m,S){return{payload:h,meta:Fr(Ee({},S||{}),{arg:m,requestId:y,requestStatus:"fulfilled"})}}),c=Ce(r+"/pending",function(h,y,m){return{payload:void 0,meta:Fr(Ee({},m||{}),{arg:y,requestId:h,requestStatus:"pending"})}}),s=Ce(r+"/rejected",function(h,y,m,S,x){return{payload:S,error:(n&&n.serializeError||kc)(h||"Rejected"),meta:Fr(Ee({},x||{}),{arg:m,requestId:y,rejectedWithValue:!!S,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),d=!1,p=typeof AbortController<"u"?AbortController:function(){function h(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return h.prototype.abort=function(){},h}();function u(h){return function(y,m,S){var x=n?.idGenerator?n.idGenerator(h):Lc(),O=new p,T,N=!1;function R(L){T=L,O.abort()}var k=function(){return vc(this,null,function(){var L,G,ie,Ie,q,Le,$e;return hc(this,function(f){switch(f.label){case 0:return f.trys.push([0,4,,5]),Ie=(L=n?.condition)==null?void 0:L.call(n,h,{getState:m,extra:S}),Uc(Ie)?[4,Ie]:[3,2];case 1:Ie=f.sent(),f.label=2;case 2:if(Ie===!1||O.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return N=!0,q=new Promise(function(g,A){return O.signal.addEventListener("abort",function(){return A({name:"AbortError",message:T||"Aborted"})})}),y(c(x,h,(G=n?.getPendingMeta)==null?void 0:G.call(n,{requestId:x,arg:h},{getState:m,extra:S}))),[4,Promise.race([q,Promise.resolve(o(h,{dispatch:y,getState:m,extra:S,requestId:x,signal:O.signal,abort:R,rejectWithValue:function(g,A){return new Gr(g,A)},fulfillWithValue:function(g,A){return new wn(g,A)}})).then(function(g){if(g instanceof Gr)throw g;return g instanceof wn?i(g.payload,x,h,g.meta):i(g,x,h)})])];case 3:return ie=f.sent(),[3,5];case 4:return Le=f.sent(),ie=Le instanceof Gr?s(null,x,h,Le.payload,Le.meta):s(Le,x,h),[3,5];case 5:return $e=n&&!n.dispatchConditionRejection&&s.match(ie)&&ie.meta.condition,$e||y(ie),[2,ie]}})})}();return Object.assign(k,{abort:R,requestId:x,arg:h,unwrap:function(){return k.then(Dc)}})}}return Object.assign(u,{pending:c,rejected:s,fulfilled:i,typePrefix:r})}return t.withTypes=function(){return t},t}();function Dc(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Uc(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Ln="listener",Pn="completed",kn="cancelled",Al="task-"+kn,wl="task-"+Pn,Nl=Ln+"-"+kn,Rl=Ln+"-"+Pn;var jr="listenerMiddleware";var _l=Ce(jr+"/add"),Tl=Ce(jr+"/removeAll"),Il=Ce(jr+"/remove");var Nn,Ll=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(Nn||(Nn=Promise.resolve())).then(t).catch(function(r){return setTimeout(function(){throw r},0)})},Bc=function(t){return function(r){setTimeout(r,t)}},Pl=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Bc(10);un();function Mc(t,r){return class extends t{constructor(){super(...arguments),this.eventBus=r??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 qt=class extends Mc(Object){};window.ftReduxStores||(window.ftReduxStores={});var Dn=class t extends qt{static get(r){var o;let n=typeof r=="string"?r:r.name,i=typeof r=="string"?void 0:r,c=window.ftReduxStores[n];if(mt(c))return c;if(i==null)return;let s=In({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),d=_n({reducer:(p,u)=>u.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__")?{...p,...u.overwrites}:s.reducer(p,u)});return window.ftReduxStores[i.name]=new t(s,d,i.eventBus)}constructor(r,o,n){super(),this.reduxSlice=r,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new Ht;let i=c=>c!=null?JSON.parse(JSON.stringify(c)):c;this.actions=new Proxy(this.reduxSlice.actions,{get:(c,s,d)=>{let p=s,u=c[p];return u?(...h)=>{let y=u(...h.map(i));return this.reduxStore.dispatch(y),y}:h=>{this.setState({[p]:i(h)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(r){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(r).join("_"),overwrites:r})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(r){throw new Error("Not implemented yet.")}subscribe(r){return this.reduxStore.subscribe(r)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var tr=E(I());var Fc=E(Bn(),1);var Mn;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Mn||(Mn={}));var Wn;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(Wn||(Wn={}));var Hn;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.MAP_ATTACHMENT="MAP_ATTACHMENT",t.RESOURCE="RESOURCE"})(Hn||(Hn={}));var Fn;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Fn||(Fn={}));var zn;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(zn||(zn={}));var Gn;(function(t){t.BOOKMARK__CREATE="BOOKMARK__CREATE",t.BOOKMARK__DELETE="BOOKMARK__DELETE",t.CASE_DEFLECTION__START="CASE_DEFLECTION__START",t.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",t.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.DOCUMENT__DISPLAY="DOCUMENT__DISPLAY",t.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",t.DOCUMENT__PRINT="DOCUMENT__PRINT",t.DOCUMENT__PROCESS="DOCUMENT__PROCESS",t.DOCUMENT__RATE="DOCUMENT__RATE",t.DOCUMENT__SEARCH="DOCUMENT__SEARCH",t.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",t.DOCUMENT__UNRATE="DOCUMENT__UNRATE",t.FEEDBACK__SEND="FEEDBACK__SEND",t.GEN_AI__COMPLETED_QUERY="GEN_AI__COMPLETED_QUERY",t.GEN_AI__RATE="GEN_AI__RATE",t.GENAI_CASE_DEFLECTION__START="GENAI_CASE_DEFLECTION__START",t.GENAI_CASE_DEFLECTION__OPEN_TICKET="GENAI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",t.TOPIC__DISPLAY="TOPIC__DISPLAY",t.TOPIC__RATE="TOPIC__RATE",t.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",t.TOPIC__UNRATE="TOPIC__UNRATE",t.USER__LOGIN="USER__LOGIN",t.USER__LOGOUT="USER__LOGOUT",t.HEARTBEAT="HEARTBEAT"})(Gn||(Gn={}));var $n;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})($n||($n={}));var jn;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT"})(jn||(jn={}));var Kn;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Kn||(Kn={}));var Vn;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Vn||(Vn={}));var Zn;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Zn||(Zn={}));var qn;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(qn||(qn={}));var Yn;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(Yn||(Yn={}));var Xn;(function(t){t.ASC="ASC",t.DESC="DESC"})(Xn||(Xn={}));var Qn;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Qn||(Qn={}));var Jn;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Jn||(Jn={}));var ea;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK"})(ea||(ea={}));var ta;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(ta||(ta={}));var ra;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"})(ra||(ra={}));var oa;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(oa||(oa={}));var na;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"})(na||(na={}));var aa;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(aa||(aa={}));var F;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(F||(F={}));var ia;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(ia||(ia={}));var ca;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(ca||(ca={}));var sa;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(sa||(sa={}));var Hc={[F.PERSONAL_BOOK_SHARE_USER]:[F.PERSONAL_BOOK_USER],[F.HTML_EXPORT_USER]:[F.PERSONAL_BOOK_USER],[F.PDF_EXPORT_USER]:[F.PERSONAL_BOOK_USER],[F.KHUB_ADMIN]:[F.CONTENT_PUBLISHER],[F.ADMIN]:[F.KHUB_ADMIN,F.USERS_ADMIN,F.PORTAL_ADMIN],[F.GENERATIVE_AI_EXPORT_USER]:[F.GENERATIVE_AI_USER]};function la(t,r){return t===r||(Hc[t]??[]).some(o=>la(o,r))}function da(t,r){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(n=>la(n,r))}var Qt=class extends xe{async listMySearches(){let{session:r}=w.getState();return da(r,F.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(r.profile.userId),5*60*1e3):[]}};var Jt=class extends xe{async listMyBookmarks(){let r=w.getState().session;return r?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(r.profile.userId),5*60*1e3):[]}};var zc="ft-user-assets",er=tr.FtReduxStore.get({name:zc,initialState:{savedSearches:void 0,bookmarks:void 0}}),Kr=class{constructor(){this.currentSession=w.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Jt,this.savedSearchesService=new Qt,w.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var r;let{session:o}=w.getState();(0,tr.deepEqual)((r=this.currentSession)===null||r===void 0?void 0:r.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),er.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),er.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let r=await this.savedSearchesService.listMySearches();er.actions.savedSearches(r)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var r;if(this.bookmarksAreUsed){let o=!((r=this.currentSession)===null||r===void 0)&&r.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;er.actions.bookmarks(o)}}},_d=new Kr;var Vr=class{addCommand(r,o=!1){w.commands.add(r,o)}consumeCommand(r){return w.commands.consume(r)}};window.FluidTopicsAppInfoStoreService=new Vr;var pa=E(I()),Zr=class{highlightHtml(r,o,n){(0,pa.highlightHtml)(r,o,n)}};window.FluidTopicsHighlightHtmlService=new Zr;var ua=E(I());var qr=class{isDate(r){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===r))===null||i===void 0?void 0:i.date)!==null&&c!==void 0?c:!1}format(r,o){var n,i,c;return ua.DateFormatter.format(r,(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 qr;var fa=E(I());var Ot=class{static get(r,o){var n,i,c,s;let d=w.getState(),{lang:p,region:u}=(i=(n=d.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new fa.SearchPlaceConverter(d.baseUrl,(s=(c=window.FluidTopicsClientConfiguration)===null||c===void 0?void 0:c.predefinedSorts)!==null&&s!==void 0?s:{},r??20,d.searchInAllLanguagesAllowed,o??`${p}-${u}`)}};var Yr=class{urlToSearchRequest(r){return Ot.get().parse(r)}searchRequestToUrl(r){return Ot.get().serialize(r)}};window.FluidTopicsUrlService=new Yr;var we=E(I());var We=class t extends CustomEvent{constructor(r){super(t.eventName,{detail:{currentItem:r}})}};We.eventName="change";var Xr=class{itemName(r){return`fluid-topics-history-item-${r}`}get(r){let o=sessionStorage.getItem(this.itemName(r));return o?JSON.parse(o):void 0}set(r,o){sessionStorage.setItem(this.itemName(r),JSON.stringify(o))}},ha=new Xr;var rr=class t extends we.WithEventBus{static build(){return new t(window.history,ha,()=>window.location,!1)}constructor(r,o,n,i){var c,s;super(),this.history=r,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=r.pushState,this.realReplaceState=r.replaceState,this.initialIndex=(s=(c=r.state)===null||c===void 0?void 0:c.index)!==null&&s!==void 0?s:r.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(r,o=!1){let n=o&&this.currentIndex===r.index-1;this.currentState={...this.buildCurrentState(),...r},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,we.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new We(this.currentItem())),0)}installProxies(){let r=o=>(n,i,[c,s,d])=>{let p=o(),u={...p===this.currentIndex?this.currentState:void 0,...c,index:p,href:typeof d=="string"?d:(d??this.windowLocation()).href};n.apply(i,[u,s,d]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:r(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:r(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",r=>this.setCurrentState(r.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(r){for(let o=this.history.length-1;o>=0;o--)r?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(r,o=!1){var n,i,c;let s={...this.buildCurrentState(),...r,index:this.currentIndex,title:(n=r?.title)!==null&&n!==void 0?n:this.currentState.title},d=o?(i=r?.majorState)!==null&&i!==void 0?i:this.currentState.majorState:(c=this.currentState.majorState)!==null&&c!==void 0?c:r?.majorState;d!=null&&(s.majorState=d),this.setCurrentState(s)}addHistoryChangeListener(r){this.addEventListener(We.eventName,r)}removeHistoryChangeListener(r){this.removeEventListener(We.eventName,r)}currentItem(){return(0,we.deepCopy)(this.currentState)}back(){let r=this.previousMajorPosition();r>=0?this.history.go(r-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,we.deepCopy)(this.states[this.previousMajorPosition()])}previousMajorPosition(){let r=this.currentIndex;for(;r>0&&!this.isMajorState(r);)r--;return this.previousExistingPosition(r)}forward(){let r=this.nextMajorPosition();r<this.states.length?this.history.go(r-this.currentIndex):this.history.forward()}forwardItem(){return(0,we.deepCopy)(this.states[this.nextMajorPosition()])}nextMajorPosition(){let r=this.currentIndex;do r++;while(r<this.states.length&&!this.isMajorState(r));do r++;while(r<this.states.length&&!this.isMajorState(r));return this.previousExistingPosition(r)}previousExistingPosition(r){let o=r;do o--;while(o>0&&!this.hasState(o));return o}buildCurrentState(){var r,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(r=this.history.state)===null||r===void 0?void 0:r.title)!==null&&o!==void 0?o:document.title}}hasState(r){return this.states[r]!=null}isMajorState(r){var o,n;return this.hasState(r)&&((n=(o=this.states[r])===null||o===void 0?void 0:o.majorState)!==null&&n!==void 0?n:!0)}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=rr.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});(0,ya.customElement)("ft-app-context")(M);var va=E(Q());var Gc=E(I());function ma(t){return t.match(/^[\w-]+\.[\w-]+$/)}var $c=function(t,r,o,n){var i=arguments.length,c=i<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(t,r,o,n);else for(var d=t.length-1;d>=0;d--)(s=t[d])&&(c=(i<3?s(c):i>3?s(r,o,c):s(r,o))||c);return i>3&&c&&Object.defineProperty(r,o,c),c},ga=Symbol("i18nAttributes"),ba=Symbol("i18nListAttributes"),Sa=Symbol("i18nProperties"),or=Symbol("i18nContexts"),Et=Symbol("i18nUnsubs");function ir(t){var r,o;class n extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[r]=new Map,this[o]=new Map}getI18nService(c){return c??this.useCustomMessageContexts?Bt:je}i18n(c){var s;this.hasI18nContext(c.context)||this.addI18nContext(c.context,void 0,c.custom);let d=(s=c.args)!==null&&s!==void 0?s:c.argsProvider?c.argsProvider(this):[];return this.getI18nService(c.custom).resolveMessage(c.context,c.key,...d)}customI18n(c,s){if(ma(c)){let[d,p]=c.split(".");return this.i18n({custom:!0,context:d,key:p,...s})||c}return c}firstUpdated(c){super.firstUpdated(c),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(c){super.update(c),this.updateI18nAttributes((s,d,p)=>c.has(d)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(c){this.updateI18nAttributes((s,d,p)=>{var u;return((u=p?.context)===null||u===void 0?void 0:u.toLowerCase())===c}),this.updateI18nProperties(s=>s.context.toLowerCase()===c),this.requestUpdate()}updateI18nAttributes(c){var s,d;let p=this,u=(h,y,m)=>m?.context&&m.key&&c(h,y,m)?{...m,message:this.i18n({context:m.context,key:m.key,...h})}:m;(s=this[ga])===null||s===void 0||s.forEach((h,y)=>p[y]=u(h,y,p[y])),(d=this[ba])===null||d===void 0||d.forEach((h,y)=>{var m;return p[y]=(m=p[y])===null||m===void 0?void 0:m.map(S=>u(h,y,S))})}updateI18nProperties(c){var s;(s=this[Sa])===null||s===void 0||s.forEach((d,p)=>{c(d,p)&&(this[p]=this.i18n(d))})}addI18nMessages(c,s,d){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(c,s,d)}addI18nContext(c,s,d){let p=(typeof c=="string"?c:c.name).toLowerCase();d=typeof c=="string"?d:c.custom,this[or].set(p,{isCustomContext:d}),this[Et].has(p)||this[Et].set(p,this.getI18nService(d).subscribe(p,()=>this.onI18nUpdate(p))),this.getI18nService(d).prepareContext(p,s)}hasI18nContext(c){return this[or].has(c.toLowerCase())}connectedCallback(){super.connectedCallback(),this[or].forEach((c,s)=>this.addI18nContext(s,void 0,c.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Et].forEach(c=>c()),this[Et].clear()}}return r=or,o=Et,$c([(0,va.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}var xa=class extends ir(ar.FtLitElement){},nr=class extends ir(ar.FtLitElementRedux){};var Ct=function(t,r,o,n){var i=arguments.length,c=i<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(t,r,o,n);else for(var d=t.length-1;d>=0;d--)(s=t[d])&&(c=(i<3?s(c):i>3?s(r,o,c):s(r,o))||c);return i>3&&c&&Object.defineProperty(r,o,c),c},de=class extends nr{constructor(){super(),this.editorMode=!1,this.addStore(w)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":cr.nothing:cr.html`
234
234
  <span class="ft-i18n">
235
235
  ${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
236
236
  </span>