@fluid-topics/ft-search-period-filter 1.3.3 → 1.3.4
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.
|
@@ -1832,7 +1832,7 @@ Also for action icons.`,s.colorGray200),contentGlobalSubtle:r.extend("--ft-conte
|
|
|
1832
1832
|
|
|
1833
1833
|
`;var jc=b(T());var Qo=b($()),Jo=b(K()),en=b(T());var ll=b($());var cl=ll.css`
|
|
1834
1834
|
`;var Yo=b(T());var Fc=b(T());var fl=b($()),Ie=b(K()),Ke=b(T());var dl=b($());var ul=dl.css`
|
|
1835
|
-
`;var wo=b(T()),Id="ft-app-info",Eo=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Eo.eventName="authentication-change";var Pd={session:(t,e)=>{(0,wo.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>P.dispatchEvent(new Eo(e.payload)),0))}},P=wo.FtReduxStore.get({name:Id,reducers:Pd,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 at=b(T());var $n=b(T());var Yt=class t{static get(e){let{baseUrl:o,apiIntegrationIdentifier:n}=P.getState(),a=e??n;if(o&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,a,!0)}static await(e){return new Promise(o=>{let n=t.get(e);if(n)o(n);else{let a=P.subscribe(()=>{n=t.get(e),n&&(a(),o(n))})}})}};var jr=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Yt.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Yt.await()}};var mt=class extends jr{constructor(e=!0,o){var n;super(o);let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new $n.CacheRegistry,this.cache=e?a.commonCache:new $n.CacheRegistry}clearCache(){this.cache.clearAll()}};var pl,kd=Symbol("clearAfterUnitTest"),Ao=class extends mt{constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[pl]=()=>{this.defaultMessages={},this.cache=new at.CacheRegistry,this.listeners={}},this.currentUiLocale=P.getState().uiLocale,P.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=P.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let o=e.name.toLowerCase();this.cache.setFinal(o,e),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,o){var n;if(e=e.toLowerCase(),o&&Object.keys(o).length>0){let a={...(n=this.defaultMessages[e])!==null&&n!==void 0?n:{},...o};(0,at.deepEqual)(this.defaultMessages[e],a)||(this.defaultMessages[e]=a,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var o,n;return this.fetchContext(e),(n=(o=this.cache.getNow(e))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(e,o){let n=e.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(e,o,...n){var a;let i=e.toLowerCase(),l=this.resolveContext(i);return new at.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},l).resolve(o,...n)}async fetchContext(e){let o=!this.cache.has(e),n;try{n=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e))}catch(a){!(a instanceof at.CanceledPromiseError)&&o&&console.error(a)}return
|
|
1835
|
+
`;var wo=b(T()),Id="ft-app-info",Eo=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Eo.eventName="authentication-change";var Pd={session:(t,e)=>{(0,wo.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>P.dispatchEvent(new Eo(e.payload)),0))}},P=wo.FtReduxStore.get({name:Id,reducers:Pd,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 at=b(T());var $n=b(T());var Yt=class t{static get(e){let{baseUrl:o,apiIntegrationIdentifier:n}=P.getState(),a=e??n;if(o&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,a,!0)}static await(e){return new Promise(o=>{let n=t.get(e);if(n)o(n);else{let a=P.subscribe(()=>{n=t.get(e),n&&(a(),o(n))})}})}};var jr=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Yt.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Yt.await()}};var mt=class extends jr{constructor(e=!0,o){var n;super(o);let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new $n.CacheRegistry,this.cache=e?a.commonCache:new $n.CacheRegistry}clearCache(){this.cache.clearAll()}};var pl,kd=Symbol("clearAfterUnitTest"),Ao=class extends mt{constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[pl]=()=>{this.defaultMessages={},this.cache=new at.CacheRegistry,this.listeners={}},this.currentUiLocale=P.getState().uiLocale,P.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=P.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let o=e.name.toLowerCase();this.cache.setFinal(o,e),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,o){var n;if(e=e.toLowerCase(),o&&Object.keys(o).length>0){let a={...(n=this.defaultMessages[e])!==null&&n!==void 0?n:{},...o};(0,at.deepEqual)(this.defaultMessages[e],a)||(this.defaultMessages[e]=a,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var o,n;return this.fetchContext(e),(n=(o=this.cache.getNow(e))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(e,o){let n=e.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(e,o,...n){var a;let i=e.toLowerCase(),l=this.resolveContext(i);return new at.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},l).resolve(o,...n)}async fetchContext(e){let o=!this.cache.has(e),n;try{n=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),o&&await this.notify(e)}catch(a){!(a instanceof at.CanceledPromiseError)&&o&&console.error(a)}return n}subscribe(e,o){var n;return e=e.toLowerCase(),this.listeners[e]=(n=this.listeners[e])!==null&&n!==void 0?n:new Set,this.listeners[e].add(o),()=>{var a;return(a=this.listeners[e])===null||a===void 0?void 0:a.delete(o)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map(e=>this.notify(e)))}async notify(e){this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(o=>(0,at.delay)(0).then(()=>o()).catch(()=>null)))}};pl=kd;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Ao{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Ao{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Sr=window.FluidTopicsI18nService,Ro=window.FluidTopicsCustomI18nService;var be=function(t,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(l=t[c])&&(i=(a<3?l(i):a>3?l(e,o,i):l(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},ee=class extends Ke.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=()=>Yt.get(),this.messageContexts=[],this.cache=new Ke.CacheRegistry,this.cleanSessionDebouncer=new Ke.Debouncer}render(){return fl.html`
|
|
1836
1836
|
<slot></slot>
|
|
1837
1837
|
`}update(e){var o,n,a,i,l;super.update(e),e.has("baseUrl")&&(P.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&P.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("uiLocale")&&P.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&P.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&P.actions.noCustom(this.noCustom),e.has("editorMode")&&P.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&P.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&P.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(c=>Sr.addContext(c)),e.has("openExternalDocumentInNewTab")&&P.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&P.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&P.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(P.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),P.actions.availableUiLocales((a=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&a!==void 0?a:[]),P.actions.searchInAllLanguagesAllowed((l=(i=this.localesConfiguration)===null||i===void 0?void 0:i.allLanguagesAllowed)!==null&&l!==void 0?l:!1)),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}};ee.elementDefinitions={};ee.styles=ul;be([(0,Ie.property)()],ee.prototype,"baseUrl",void 0);be([(0,Ie.property)()],ee.prototype,"apiIntegrationIdentifier",void 0);be([(0,Ie.property)()],ee.prototype,"uiLocale",void 0);be([(0,Ke.jsonProperty)(null)],ee.prototype,"availableUiLocales",void 0);be([(0,Ke.jsonProperty)(null)],ee.prototype,"metadataConfiguration",void 0);be([(0,Ie.property)({type:Boolean})],ee.prototype,"editorMode",void 0);be([(0,Ie.property)({type:Boolean})],ee.prototype,"noCustom",void 0);be([(0,Ie.property)({type:Boolean})],ee.prototype,"openExternalDocumentInNewTab",void 0);be([(0,Ie.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],ee.prototype,"noCustomComponent",void 0);be([(0,Ie.property)({type:Boolean})],ee.prototype,"withManualResources",void 0);be([(0,Ie.property)({type:Boolean})],ee.prototype,"navigatorOnline",void 0);be([(0,Ie.property)({type:Boolean})],ee.prototype,"forcedOffline",void 0);be([(0,Ie.property)({type:Object})],ee.prototype,"apiProvider",void 0);be([(0,Ke.jsonProperty)([])],ee.prototype,"messageContexts",void 0);be([(0,Ke.jsonProperty)(void 0)],ee.prototype,"session",void 0);be([(0,Ie.state)()],ee.prototype,"localesConfiguration",void 0);var Su=b(K());function Dd(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var o,n,a;if(Array.isArray(t)){if(o=t.length,o!=e.length)return!1;for(n=o;n--!==0;)if(!No(t[n],e[n]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;for(n of t.entries())if(!No(n[1],e.get(n[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let i=l=>Object.keys(l).filter(c=>l[c]!=null);if(a=i(t),o=a.length,o!==i(e).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,a[n]))return!1;for(n=o;n--!==0;){let l=a[n];if(!No(t[l],e[l]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function No(t,e){try{return Dd(t,e)}catch{return!1}}function To(t,e){return!No(t,e)}var Bd=b(K(),1);var Lo=class{constructor(){this.queue=[]}add(e,o=!1){o&&this.clear(e.type),this.queue.push(e)}consume(e){let o=this.queue.find(n=>n.type===e);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(e){typeof e=="string"?this.queue=this.queue.filter(o=>o.type!==e):this.queue=this.queue.filter(o=>!e.test(o.type))}};var Or=b(K(),1);var hl=b(K(),1);function yl(t,e){let o=()=>JSON.parse(JSON.stringify(t));return(0,hl.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:To,...e??{}})}var _o=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,o){return this.callbacks=[e],this.debounce(o)}queue(e,o){return this.callbacks.push(e),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,o;let n=[...this.callbacks];this.callbacks=[];let a=(e=this.rejectPromise)!==null&&e!==void 0?e:()=>null,i=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let l of n)try{await l()}catch(c){a(c);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var gl=b($(),1);var Io=globalThis,$d=Io.ShadowRoot&&(Io.ShadyCSS===void 0||Io.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Qx=Symbol();var ml=(t,e)=>{if($d)t.adoptedStyleSheets=e.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of e){let n=document.createElement("style"),a=Io.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=o.cssText,t.appendChild(n)}};var Po=class extends gl.LitElement{createRenderRoot(){let e=this.constructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,Object.entries(e.elementDefinitions).forEach(([a,i])=>e.registry.define(a,i)));let o={...e.shadowRootOptions,customElements:e.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return ml(n,e.elementStyles),n}};function bl(t,e,...o){var n;let a=t.querySelector(e);for(let i of o)a=(n=a?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return a}var Vr=function(t,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(l=t[c])&&(i=(a<3?l(i):a>3?l(e,o,i):l(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},Ol,xl=Symbol("constructorPrototype"),vl=Symbol("constructorName"),Cl=Symbol("exportpartsDebouncer"),Sl=Symbol("dynamicDependenciesLoaded"),gt=class extends Po{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Ol]=new _o(5),this[vl]=this.constructor.name,this[xl]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[vl]&&Object.setPrototypeOf(this,this[xl])}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 e=this.constructor;e[Sl]||(e[Sl]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate()})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:a}=this.elementToFocus;if(n!=null){let i=[...a??[],n];o=bl(this.shadowRoot,...i)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var o,n,a;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}scheduleExportpartsUpdate(){var e,o,n;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[Cl].run(()=>{var a,i;!((a=this.exportpartsPrefix)===null||a===void 0)&&a.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(e){var o,n,a,i,l,c;let u=g=>g!=null&&g.trim().length>0,p=e.filter(u).map(g=>g.trim());if(p.length===0){this.removeAttribute("exportparts");return}let m=new Set;for(let g of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let S=(i=(a=g.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],v=(c=(l=g.getAttribute("exportparts"))===null||l===void 0?void 0:l.split(",").map(C=>C.split(":")[1]))!==null&&c!==void 0?c:[];new Array(...S,...v).filter(u).map(C=>C.trim()).forEach(C=>m.add(C))}if(m.size===0){this.removeAttribute("exportparts");return}let y=[...m.values()].flatMap(g=>p.map(S=>`${g}:${S}--${g}`));this.setAttribute("exportparts",[...this.part,...y].join(", "))}};Ol=Cl;Vr([(0,Or.property)()],gt.prototype,"exportpartsPrefix",void 0);Vr([yl([])],gt.prototype,"exportpartsPrefixes",void 0);Vr([(0,Or.property)()],gt.prototype,"customStylesheet",void 0);Vr([(0,Or.property)()],gt.prototype,"elementToFocus",void 0);Vr([(0,Or.state)()],gt.prototype,"useAdoptedStyleSheets",void 0);function Kr(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var El,wl,Al,Zr=Symbol("internalReduxEventsUnsubscribers"),Tt=Symbol("internalStoresUnsubscribers"),Xt=Symbol("internalStores"),qr=class extends gt{constructor(){super(...arguments),this[El]=new Map,this[wl]=new Map,this[Al]=new Map}get reduxConstructor(){return this.constructor}update(e){super.update(e),[...this.reduxConstructor.reduxReactiveProperties].some(o=>e.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[Xt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Xt].values()][0]}getStore(e){return e==null?this.getUnnamedStore():this[Xt].get(e)}addStore(e,o){var n;o=(n=o??(Kr(e)?e.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this[Xt].set(o,e),this.subscribeToStore(o,e),this.updateFromStores()}removeStore(e){let o=typeof e=="string"?e:e.name;this.unsubscribeFromStore(o),this[Xt].delete(o)}setupStores(){this.unsubscribeFromStores(),this[Xt].forEach((e,o)=>this.subscribeToStore(o,e)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((e,o)=>{let n=this.constructor.getPropertyOptions(o);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:o)){let a=this.getStore(e.store);a&&(e.store?this[Tt].has(e.store):this[Tt].size>0)&&(this[o]=e.selector(a.getState(),this))}})}subscribeToStore(e,o){var n;this[Tt].set(e,o.subscribe(()=>this.updateFromStores())),this[Zr].set(e,[]),Kr(o)&&o.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((a,i)=>{if(typeof this[i]=="function"&&(!a.store||o.name===a.store)){let l=c=>this[i](c);o.addEventListener(a.eventName,l),this[Zr].get(e).push(()=>o.removeEventListener(a.eventName,l))}})),this.onStoreAvailable(e)}unsubscribeFromStores(){this[Tt].forEach((e,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(e){var o;this[Tt].has(e)&&this[Tt].get(e)(),this[Tt].delete(e),(o=this[Zr].get(e))===null||o===void 0||o.forEach(n=>n()),this[Zr].delete(e)}onStoreAvailable(e){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};El=Tt,wl=Xt,Al=Zr;qr.reduxProperties=new Map;qr.reduxReactiveProperties=new Set;qr.reduxEventListeners=new Map;function He(t){for(var e=arguments.length,o=Array(e>1?e-1:0),n=1;n<e;n++)o[n-1]=arguments[n];if(0)var a,i;throw Error("[Immer] minified error nr: "+t+(o.length?" "+o.map(function(l){return"'"+l+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function bt(t){return!!t&&!!t[X]}function Ze(t){var e;return!!t&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===jd}(t)||Array.isArray(t)||!!t[Pl]||!!(!((e=t.constructor)===null||e===void 0)&&e[Pl])||Vn(t)||Kn(t))}function Qt(t,e,o){o===void 0&&(o=!1),wr(t)===0?(o?Object.keys:Er)(t).forEach(function(n){o&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,a){return e(a,n,t)})}function wr(t){var e=t[X];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Vn(t)?2:Kn(t)?3:0}function Cr(t,e){return wr(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Fd(t,e){return wr(t)===2?t.get(e):t[e]}function kl(t,e,o){var n=wr(t);n===2?t.set(e,o):n===3?t.add(o):t[e]=o}function Dl(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function Vn(t){return Wd&&t instanceof Map}function Kn(t){return Gd&&t instanceof Set}function Lt(t){return t.o||t.t}function Zn(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Fl(t);delete e[X];for(var o=Er(e),n=0;n<o.length;n++){var a=o[n],i=e[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(e[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:t[a]})}return Object.create(Object.getPrototypeOf(t),e)}function qn(t,e){return e===void 0&&(e=!1),Yn(t)||bt(t)||!Ze(t)||(wr(t)>1&&(t.set=t.add=t.clear=t.delete=Ud),Object.freeze(t),e&&Qt(t,function(o,n){return qn(n,!0)},!0)),t}function Ud(){He(2)}function Yn(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function it(t){var e=jn[t];return e||He(18,t),e}function Md(t,e){jn[t]||(jn[t]=e)}function zn(){return Xr}function Fn(t,e){e&&(it("Patches"),t.u=[],t.s=[],t.v=e)}function ko(t){Wn(t),t.p.forEach(Hd),t.p=null}function Wn(t){t===Xr&&(Xr=t.l)}function Rl(t){return Xr={p:[],l:Xr,h:t,m:!0,_:0}}function Hd(t){var e=t[X];e.i===0||e.i===1?e.j():e.g=!0}function Un(t,e){e._=e.p.length;var o=e.p[0],n=t!==void 0&&t!==o;return e.h.O||it("ES5").S(e,t,n),n?(o[X].P&&(ko(e),He(4)),Ze(t)&&(t=Do(e,t),e.l||Bo(e,t)),e.u&&it("Patches").M(o[X].t,t,e.u,e.s)):t=Do(e,o,[]),ko(e),e.u&&e.v(e.u,e.s),t!==$l?t:void 0}function Do(t,e,o){if(Yn(e))return e;var n=e[X];if(!n)return Qt(e,function(c,u){return Nl(t,n,e,c,u,o)},!0),e;if(n.A!==t)return e;if(!n.P)return Bo(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=Zn(n.k):n.o,i=a,l=!1;n.i===3&&(i=new Set(a),a.clear(),l=!0),Qt(i,function(c,u){return Nl(t,n,a,c,u,o,l)}),Bo(t,a,!1),o&&t.u&&it("Patches").N(n,o,t.u,t.s)}return n.o}function Nl(t,e,o,n,a,i,l){if(bt(a)){var c=Do(t,a,i&&e&&e.i!==3&&!Cr(e.R,n)?i.concat(n):void 0);if(kl(o,n,c),!bt(c))return;t.m=!1}else l&&o.add(a);if(Ze(a)&&!Yn(a)){if(!t.h.D&&t._<1)return;Do(t,a),e&&e.A.l||Bo(t,a)}}function Bo(t,e,o){o===void 0&&(o=!1),!t.l&&t.h.D&&t.m&&qn(e,o)}function Mn(t,e){var o=t[X];return(o?Lt(o):t)[e]}function Tl(t,e){if(e in t)for(var o=Object.getPrototypeOf(t);o;){var n=Object.getOwnPropertyDescriptor(o,e);if(n)return n;o=Object.getPrototypeOf(o)}}function _t(t){t.P||(t.P=!0,t.l&&_t(t.l))}function Hn(t){t.o||(t.o=Zn(t.t))}function Gn(t,e,o){var n=Vn(e)?it("MapSet").F(e,o):Kn(e)?it("MapSet").T(e,o):t.O?function(a,i){var l=Array.isArray(a),c={i:l?1:0,A:i?i.A:zn(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},u=c,p=Qr;l&&(u=[c],p=Yr);var m=Proxy.revocable(u,p),y=m.revoke,g=m.proxy;return c.k=g,c.j=y,g}(e,o):it("ES5").J(e,o);return(o?o.A:zn()).p.push(n),n}function zd(t){return bt(t)||He(22,t),function e(o){if(!Ze(o))return o;var n,a=o[X],i=wr(o);if(a){if(!a.P&&(a.i<4||!it("ES5").K(a)))return a.t;a.I=!0,n=Ll(o,i),a.I=!1}else n=Ll(o,i);return Qt(n,function(l,c){a&&Fd(a.t,l)===c||kl(n,l,e(c))}),i===3?new Set(n):n}(t)}function Ll(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Zn(t)}function Bl(){function t(l,c){var u=i[l];return u?u.enumerable=c:i[l]=u={configurable:!0,enumerable:c,get:function(){var p=this[X];return Qr.get(p,l)},set:function(p){var m=this[X];Qr.set(m,l,p)}},u}function e(l){for(var c=l.length-1;c>=0;c--){var u=l[c][X];if(!u.P)switch(u.i){case 5:n(u)&&_t(u);break;case 4:o(u)&&_t(u)}}}function o(l){for(var c=l.t,u=l.k,p=Er(u),m=p.length-1;m>=0;m--){var y=p[m];if(y!==X){var g=c[y];if(g===void 0&&!Cr(c,y))return!0;var S=u[y],v=S&&S[X];if(v?v.t!==g:!Dl(S,g))return!0}}var C=!!c[X];return p.length!==Er(c).length+(C?0:1)}function n(l){var c=l.k;if(c.length!==l.t.length)return!0;var u=Object.getOwnPropertyDescriptor(c,c.length-1);if(u&&!u.get)return!0;for(var p=0;p<c.length;p++)if(!c.hasOwnProperty(p))return!0;return!1}function a(l){l.g&&He(3,JSON.stringify(Lt(l)))}var i={};Md("ES5",{J:function(l,c){var u=Array.isArray(l),p=function(y,g){if(y){for(var S=Array(g.length),v=0;v<g.length;v++)Object.defineProperty(S,""+v,t(v,!0));return S}var C=Fl(g);delete C[X];for(var _=Er(C),N=0;N<_.length;N++){var L=_[N];C[L]=t(L,y||!!C[L].enumerable)}return Object.create(Object.getPrototypeOf(g),C)}(u,l),m={i:u?5:4,A:c?c.A:zn(),P:!1,I:!1,R:{},l:c,t:l,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,X,{value:m,writable:!0}),p},S:function(l,c,u){u?bt(c)&&c[X].A===l&&e(l.p):(l.u&&function p(m){if(m&&typeof m=="object"){var y=m[X];if(y){var g=y.t,S=y.k,v=y.R,C=y.i;if(C===4)Qt(S,function(B){B!==X&&(g[B]!==void 0||Cr(g,B)?v[B]||p(S[B]):(v[B]=!0,_t(y)))}),Qt(g,function(B){S[B]!==void 0||Cr(S,B)||(v[B]=!1,_t(y))});else if(C===5){if(n(y)&&(_t(y),v.length=!0),S.length<g.length)for(var _=S.length;_<g.length;_++)v[_]=!1;else for(var N=g.length;N<S.length;N++)v[N]=!0;for(var L=Math.min(S.length,g.length),k=0;k<L;k++)S.hasOwnProperty(k)||(v[k]=!0),v[k]===void 0&&p(S[k])}}}}(l.p[0]),e(l.p))},K:function(l){return l.i===4?o(l):n(l)}})}var _l,Xr,Xn=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Wd=typeof Map<"u",Gd=typeof Set<"u",Il=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",$l=Xn?Symbol.for("immer-nothing"):((_l={})["immer-nothing"]=!0,_l),Pl=Xn?Symbol.for("immer-draftable"):"__$immer_draftable",X=Xn?Symbol.for("immer-state"):"__$immer_state";var jd=""+Object.prototype.constructor,Er=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Fl=Object.getOwnPropertyDescriptors||function(t){var e={};return Er(t).forEach(function(o){e[o]=Object.getOwnPropertyDescriptor(t,o)}),e},jn={},Qr={get:function(t,e){if(e===X)return t;var o=Lt(t);if(!Cr(o,e))return function(a,i,l){var c,u=Tl(i,l);return u?"value"in u?u.value:(c=u.get)===null||c===void 0?void 0:c.call(a.k):void 0}(t,o,e);var n=o[e];return t.I||!Ze(n)?n:n===Mn(t.t,e)?(Hn(t),t.o[e]=Gn(t.A.h,n,t)):n},has:function(t,e){return e in Lt(t)},ownKeys:function(t){return Reflect.ownKeys(Lt(t))},set:function(t,e,o){var n=Tl(Lt(t),e);if(n?.set)return n.set.call(t.k,o),!0;if(!t.P){var a=Mn(Lt(t),e),i=a?.[X];if(i&&i.t===o)return t.o[e]=o,t.R[e]=!1,!0;if(Dl(o,a)&&(o!==void 0||Cr(t.t,e)))return!0;Hn(t),_t(t)}return t.o[e]===o&&(o!==void 0||e in t.o)||Number.isNaN(o)&&Number.isNaN(t.o[e])||(t.o[e]=o,t.R[e]=!0),!0},deleteProperty:function(t,e){return Mn(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Hn(t),_t(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var o=Lt(t),n=Reflect.getOwnPropertyDescriptor(o,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:o[e]}},defineProperty:function(){He(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){He(12)}},Yr={};Qt(Qr,function(t,e){Yr[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Yr.deleteProperty=function(t,e){return Yr.set.call(this,t,e,void 0)},Yr.set=function(t,e,o){return Qr.set.call(this,t[0],e,o,t[0])};var Vd=function(){function t(o){var n=this;this.O=Il,this.D=!0,this.produce=function(a,i,l){if(typeof a=="function"&&typeof i!="function"){var c=i;i=a;var u=n;return function(C){var _=this;C===void 0&&(C=c);for(var N=arguments.length,L=Array(N>1?N-1:0),k=1;k<N;k++)L[k-1]=arguments[k];return u.produce(C,function(B){var F;return(F=i).call.apply(F,[_,B].concat(L))})}}var p;if(typeof i!="function"&&He(6),l!==void 0&&typeof l!="function"&&He(7),Ze(a)){var m=Rl(n),y=Gn(n,a,void 0),g=!0;try{p=i(y),g=!1}finally{g?ko(m):Wn(m)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(C){return Fn(m,l),Un(C,m)},function(C){throw ko(m),C}):(Fn(m,l),Un(p,m))}if(!a||typeof a!="object"){if((p=i(a))===void 0&&(p=a),p===$l&&(p=void 0),n.D&&qn(p,!0),l){var S=[],v=[];it("Patches").M(a,p,S,v),l(S,v)}return p}He(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(p){for(var m=arguments.length,y=Array(m>1?m-1:0),g=1;g<m;g++)y[g-1]=arguments[g];return n.produceWithPatches(p,function(S){return a.apply(void 0,[S].concat(y))})};var l,c,u=n.produce(a,i,function(p,m){l=p,c=m});return typeof Promise<"u"&&u instanceof Promise?u.then(function(p){return[p,l,c]}):[u,l,c]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var e=t.prototype;return e.createDraft=function(o){Ze(o)||He(8),bt(o)&&(o=zd(o));var n=Rl(this),a=Gn(this,o,void 0);return a[X].C=!0,Wn(n),a},e.finishDraft=function(o,n){var a=o&&o[X],i=a.A;return Fn(i,n),Un(void 0,i)},e.setAutoFreeze=function(o){this.D=o},e.setUseProxies=function(o){o&&!Il&&He(20),this.O=o},e.applyPatches=function(o,n){var a;for(a=n.length-1;a>=0;a--){var i=n[a];if(i.path.length===0&&i.op==="replace"){o=i.value;break}}a>-1&&(n=n.slice(a+1));var l=it("Patches").$;return bt(o)?l(o,n):this.produce(o,function(c){return l(c,n)})},t}(),Ue=new Vd,Kd=Ue.produce,pv=Ue.produceWithPatches.bind(Ue),fv=Ue.setAutoFreeze.bind(Ue),hv=Ue.setUseProxies.bind(Ue),yv=Ue.applyPatches.bind(Ue),mv=Ue.createDraft.bind(Ue),gv=Ue.finishDraft.bind(Ue),$o=Kd;function Jt(t){"@babel/helpers - typeof";return Jt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jt(t)}function Ul(t,e){if(Jt(t)!="object"||!t)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var n=o.call(t,e||"default");if(Jt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ml(t){var e=Ul(t,"string");return Jt(e)=="symbol"?e:e+""}function Hl(t,e,o){return(e=Ml(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function zl(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),o.push.apply(o,n)}return o}function Qn(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?zl(Object(o),!0).forEach(function(n){Hl(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):zl(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function xe(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 Wl=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Jn=function(){return Math.random().toString(36).substring(7).split("").join(".")},Fo={INIT:"@@redux/INIT"+Jn(),REPLACE:"@@redux/REPLACE"+Jn(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Jn()}};function Zd(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function ea(t,e,o){var n;if(typeof e=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(xe(0));if(typeof e=="function"&&typeof o>"u"&&(o=e,e=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(xe(1));return o(ea)(t,e)}if(typeof t!="function")throw new Error(xe(2));var a=t,i=e,l=[],c=l,u=!1;function p(){c===l&&(c=l.slice())}function m(){if(u)throw new Error(xe(3));return i}function y(C){if(typeof C!="function")throw new Error(xe(4));if(u)throw new Error(xe(5));var _=!0;return p(),c.push(C),function(){if(_){if(u)throw new Error(xe(6));_=!1,p();var L=c.indexOf(C);c.splice(L,1),l=null}}}function g(C){if(!Zd(C))throw new Error(xe(7));if(typeof C.type>"u")throw new Error(xe(8));if(u)throw new Error(xe(9));try{u=!0,i=a(i,C)}finally{u=!1}for(var _=l=c,N=0;N<_.length;N++){var L=_[N];L()}return C}function S(C){if(typeof C!="function")throw new Error(xe(10));a=C,g({type:Fo.REPLACE})}function v(){var C,_=y;return C={subscribe:function(L){if(typeof L!="object"||L===null)throw new Error(xe(11));function k(){L.next&&L.next(m())}k();var B=_(k);return{unsubscribe:B}}},C[Wl]=function(){return this},C}return g({type:Fo.INIT}),n={dispatch:g,subscribe:y,getState:m,replaceReducer:S},n[Wl]=v,n}function qd(t){Object.keys(t).forEach(function(e){var o=t[e],n=o(void 0,{type:Fo.INIT});if(typeof n>"u")throw new Error(xe(12));if(typeof o(void 0,{type:Fo.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(xe(13))})}function Gl(t){for(var e=Object.keys(t),o={},n=0;n<e.length;n++){var a=e[n];typeof t[a]=="function"&&(o[a]=t[a])}var i=Object.keys(o),l,c;try{qd(o)}catch(u){c=u}return function(p,m){if(p===void 0&&(p={}),c)throw c;if(0)var y;for(var g=!1,S={},v=0;v<i.length;v++){var C=i[v],_=o[C],N=p[C],L=_(N,m);if(typeof L>"u"){var k=m&&m.type;throw new Error(xe(14))}S[C]=L,g=g||L!==N}return g=g||i.length!==Object.keys(p).length,g?S:p}}function Ar(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return e.length===0?function(n){return n}:e.length===1?e[0]:e.reduce(function(n,a){return function(){return n(a.apply(void 0,arguments))}})}function jl(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(xe(15))},l={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},c=e.map(function(u){return u(l)});return i=Ar.apply(void 0,c)(a.dispatch),Qn(Qn({},a),{},{dispatch:i})}}}function Vl(t){var e=function(n){var a=n.dispatch,i=n.getState;return function(l){return function(c){return typeof c=="function"?c(a,i,t):l(c)}}};return e}var Kl=Vl();Kl.withExtraArgument=Vl;var ta=Kl;var Ql=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(n[i]=a[i])},t(e,o)};return function(e,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");t(e,o);function n(){this.constructor=e}e.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),Yd=function(t,e){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,l;return l={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function c(p){return function(m){return u([p,m])}}function u(p){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(i=p[0]&2?a.return:p[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,p[1])).done)return i;switch(a=0,i&&(p=[p[0]&2,i.value]),p[0]){case 0:case 1:i=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,a=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(p[0]===6||p[0]===2)){o=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]<i[3])){o.label=p[1];break}if(p[0]===6&&o.label<i[1]){o.label=i[1],i=p;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(p);break}i[2]&&o.ops.pop(),o.trys.pop();continue}p=e.call(t,o)}catch(m){p=[6,m],a=0}finally{n=i=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Rr=function(t,e){for(var o=0,n=e.length,a=t.length;o<n;o++,a++)t[a]=e[o];return t},Xd=Object.defineProperty,Qd=Object.defineProperties,Jd=Object.getOwnPropertyDescriptors,Zl=Object.getOwnPropertySymbols,eu=Object.prototype.hasOwnProperty,tu=Object.prototype.propertyIsEnumerable,ql=function(t,e,o){return e in t?Xd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o},It=function(t,e){for(var o in e||(e={}))eu.call(e,o)&&ql(t,o,e[o]);if(Zl)for(var n=0,a=Zl(e);n<a.length;n++){var o=a[n];tu.call(e,o)&&ql(t,o,e[o])}return t},ra=function(t,e){return Qd(t,Jd(e))},ru=function(t,e,o){return new Promise(function(n,a){var i=function(u){try{c(o.next(u))}catch(p){a(p)}},l=function(u){try{c(o.throw(u))}catch(p){a(p)}},c=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(i,l)};c((o=o.apply(t,e)).next())})};var ou=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ar:Ar.apply(null,arguments)},Dv=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function nu(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var o=e;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return e===o}var au=function(t){Ql(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=t.apply(this,o)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},e.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(e.bind.apply(e,Rr([void 0],o[0].concat(this)))):new(e.bind.apply(e,Rr([void 0],o.concat(this))))},e}(Array),iu=function(t){Ql(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=t.apply(this,o)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},e.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(e.bind.apply(e,Rr([void 0],o[0].concat(this)))):new(e.bind.apply(e,Rr([void 0],o.concat(this))))},e}(Array);function aa(t){return Ze(t)?$o(t,function(){}):t}function su(t){return typeof t=="boolean"}function lu(){return function(e){return cu(e)}}function cu(t){t===void 0&&(t={});var e=t.thunk,o=e===void 0?!0:e,n=t.immutableCheck,a=n===void 0?!0:n,i=t.serializableCheck,l=i===void 0?!0:i,c=new au;if(o&&(su(o)?c.push(ta):c.push(ta.withExtraArgument(o.extraArgument))),0){if(a)var u;if(l)var p}return c}var oa=!0;function Jl(t){var e=lu(),o=t||{},n=o.reducer,a=n===void 0?void 0:n,i=o.middleware,l=i===void 0?e():i,c=o.devTools,u=c===void 0?!0:c,p=o.preloadedState,m=p===void 0?void 0:p,y=o.enhancers,g=y===void 0?void 0:y,S;if(typeof a=="function")S=a;else if(nu(a))S=Gl(a);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var v=l;if(typeof v=="function"&&(v=v(e),!oa&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!oa&&v.some(function(B){return typeof B!="function"}))throw new Error("each middleware provided to configureStore must be a function");var C=jl.apply(void 0,v),_=Ar;u&&(_=ou(It({trace:!oa},typeof u=="object"&&u)));var N=new iu(C),L=N;Array.isArray(g)?L=Rr([C],g):typeof g=="function"&&(L=g(N));var k=_.apply(void 0,L);return ea(S,m,k)}function Pt(t,e){function o(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(e){var i=e.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return It(It({type:t,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.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 ec(t){var e={},o=[],n,a={addCase:function(i,l){var c=typeof i=="string"?i:i.type;if(c in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[c]=l,a},addMatcher:function(i,l){return o.push({matcher:i,reducer:l}),a},addDefaultCase:function(i){return n=i,a}};return t(a),[e,o,n]}function du(t){return typeof t=="function"}function uu(t,e,o,n){o===void 0&&(o=[]);var a=typeof e=="function"?ec(e):[e,o,n],i=a[0],l=a[1],c=a[2],u;if(du(t))u=function(){return aa(t())};else{var p=aa(t);u=function(){return p}}function m(y,g){y===void 0&&(y=u());var S=Rr([i[g.type]],l.filter(function(v){var C=v.matcher;return C(g)}).map(function(v){var C=v.reducer;return C}));return S.filter(function(v){return!!v}).length===0&&(S=[c]),S.reduce(function(v,C){if(C)if(bt(v)){var _=v,N=C(_,g);return N===void 0?v:N}else{if(Ze(v))return $o(v,function(L){return C(L,g)});var N=C(v,g);if(N===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return N}return v},y)}return m.getInitialState=u,m}function pu(t,e){return t+"/"+e}function tc(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof t.initialState=="function"?t.initialState:aa(t.initialState),n=t.reducers||{},a=Object.keys(n),i={},l={},c={};a.forEach(function(m){var y=n[m],g=pu(e,m),S,v;"reducer"in y?(S=y.reducer,v=y.prepare):S=y,i[m]=S,l[g]=S,c[m]=v?Pt(g,v):Pt(g)});function u(){var m=typeof t.extraReducers=="function"?ec(t.extraReducers):[t.extraReducers],y=m[0],g=y===void 0?{}:y,S=m[1],v=S===void 0?[]:S,C=m[2],_=C===void 0?void 0:C,N=It(It({},g),l);return uu(o,function(L){for(var k in N)L.addCase(k,N[k]);for(var B=0,F=v;B<F.length;B++){var we=F[B];L.addMatcher(we.matcher,we.reducer)}_&&L.addDefaultCase(_)})}var p;return{name:e,reducer:function(m,y){return p||(p=u()),p(m,y)},actions:c,caseReducers:i,getInitialState:function(){return p||(p=u()),p.getInitialState()}}}var fu="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",hu=function(t){t===void 0&&(t=21);for(var e="",o=t;o--;)e+=fu[Math.random()*64|0];return e},yu=["name","message","stack","code"],na=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Yl=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),mu=function(t){if(typeof t=="object"&&t!==null){for(var e={},o=0,n=yu;o<n.length;o++){var a=n[o];typeof t[a]=="string"&&(e[a]=t[a])}return e}return{message:String(t)}},Uv=function(){function t(e,o,n){var a=Pt(e+"/fulfilled",function(m,y,g,S){return{payload:m,meta:ra(It({},S||{}),{arg:g,requestId:y,requestStatus:"fulfilled"})}}),i=Pt(e+"/pending",function(m,y,g){return{payload:void 0,meta:ra(It({},g||{}),{arg:y,requestId:m,requestStatus:"pending"})}}),l=Pt(e+"/rejected",function(m,y,g,S,v){return{payload:S,error:(n&&n.serializeError||mu)(m||"Rejected"),meta:ra(It({},v||{}),{arg:g,requestId:y,rejectedWithValue:!!S,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"})}}),c=!1,u=typeof AbortController<"u"?AbortController:function(){function m(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return m.prototype.abort=function(){},m}();function p(m){return function(y,g,S){var v=n?.idGenerator?n.idGenerator(m):hu(),C=new u,_,N=!1;function L(B){_=B,C.abort()}var k=function(){return ru(this,null,function(){var B,F,we,Xe,ve,Qe,ue;return Yd(this,function(h){switch(h.label){case 0:return h.trys.push([0,4,,5]),Xe=(B=n?.condition)==null?void 0:B.call(n,m,{getState:g,extra:S}),bu(Xe)?[4,Xe]:[3,2];case 1:Xe=h.sent(),h.label=2;case 2:if(Xe===!1||C.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return N=!0,ve=new Promise(function(x,I){return C.signal.addEventListener("abort",function(){return I({name:"AbortError",message:_||"Aborted"})})}),y(i(v,m,(F=n?.getPendingMeta)==null?void 0:F.call(n,{requestId:v,arg:m},{getState:g,extra:S}))),[4,Promise.race([ve,Promise.resolve(o(m,{dispatch:y,getState:g,extra:S,requestId:v,signal:C.signal,abort:L,rejectWithValue:function(x,I){return new na(x,I)},fulfillWithValue:function(x,I){return new Yl(x,I)}})).then(function(x){if(x instanceof na)throw x;return x instanceof Yl?a(x.payload,v,m,x.meta):a(x,v,m)})])];case 3:return we=h.sent(),[3,5];case 4:return Qe=h.sent(),we=Qe instanceof na?l(null,v,m,Qe.payload,Qe.meta):l(Qe,v,m),[3,5];case 5:return ue=n&&!n.dispatchConditionRejection&&l.match(we)&&we.meta.condition,ue||y(we),[2,we]}})})}();return Object.assign(k,{abort:L,requestId:v,arg:m,unwrap:function(){return k.then(gu)}})}}return Object.assign(p,{pending:i,rejected:l,fulfilled:a,typePrefix:e})}return t.withTypes=function(){return t},t}();function gu(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function bu(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var rc="listener",oc="completed",nc="cancelled",Mv="task-"+nc,Hv="task-"+oc,zv=rc+"-"+nc,Wv=rc+"-"+oc;var ia="listenerMiddleware";var Gv=Pt(ia+"/add"),jv=Pt(ia+"/removeAll"),Vv=Pt(ia+"/remove");var Xl,Kv=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(Xl||(Xl=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},xu=function(t){return function(e){setTimeout(e,t)}},Zv=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:xu(10);Bl();function vu(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(o,n,a){this.eventBus.addEventListener(o,n,a)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,a){this.eventBus.removeEventListener(o,n,a)}}}var Uo=class extends vu(Object){};window.ftReduxStores||(window.ftReduxStores={});var ac=class t extends Uo{static get(e){var o;let n=typeof e=="string"?e:e.name,a=typeof e=="string"?void 0:e,i=window.ftReduxStores[n];if(Kr(i))return i;if(a==null)return;let l=tc({...a,reducers:(o=a.reducers)!==null&&o!==void 0?o:{}}),c=Jl({reducer:(u,p)=>p.type==="CLEAR_FT_REDUX_STORE"?l.getInitialState():typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__")?{...u,...p.overwrites}:l.reducer(u,p)});return window.ftReduxStores[a.name]=new t(l,c,a.eventBus)}constructor(e,o,n){super(),this.reduxSlice=e,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new Lo;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,l,c)=>{let u=l,p=i[u];return p?(...m)=>{let y=p(...m.map(a));return this.reduxStore.dispatch(y),y}:m=>{this.setState({[u]:a(m)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}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(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var Vo=b(T());var Cu=b(sc(),1);var lc;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(lc||(lc={}));var cc;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(cc||(cc={}));var dc;(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"})(dc||(dc={}));var uc;(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"})(uc||(uc={}));var pc;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(pc||(pc={}));var fc;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(fc||(fc={}));var hc;(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"})(hc||(hc={}));var yc;(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"})(yc||(yc={}));var mc;(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"})(mc||(mc={}));var gc;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(gc||(gc={}));var bc;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(bc||(bc={}));var xc;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(xc||(xc={}));var vc;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(vc||(vc={}));var Sc;(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"})(Sc||(Sc={}));var Oc;(function(t){t.ASC="ASC",t.DESC="DESC"})(Oc||(Oc={}));var Cc;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Cc||(Cc={}));var sa;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(sa||(sa={}));var Ec;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK"})(Ec||(Ec={}));var wc;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(wc||(wc={}));var Ac;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"})(Ac||(Ac={}));var zo;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(zo||(zo={}));var Rc;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"})(Rc||(Rc={}));var la;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(la||(la={}));var se;(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"})(se||(se={}));var Nc;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(Nc||(Nc={}));var Tc;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Tc||(Tc={}));var Lc;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Lc||(Lc={}));var _c;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(_c||(_c={}));var Ou={[se.PERSONAL_BOOK_SHARE_USER]:[se.PERSONAL_BOOK_USER],[se.HTML_EXPORT_USER]:[se.PERSONAL_BOOK_USER],[se.PDF_EXPORT_USER]:[se.PERSONAL_BOOK_USER],[se.KHUB_ADMIN]:[se.CONTENT_PUBLISHER],[se.ADMIN]:[se.KHUB_ADMIN,se.USERS_ADMIN,se.PORTAL_ADMIN],[se.GENERATIVE_AI_EXPORT_USER]:[se.GENERATIVE_AI_USER]};function Ic(t,e){return t===e||(Ou[t]??[]).some(o=>Ic(o,e))}function Pc(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(n=>Ic(n,e))}var Wo=class extends mt{async listMySearches(){let{session:e}=P.getState();return Pc(e,se.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var Go=class extends mt{async listMyBookmarks(){let e=P.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var Eu="ft-user-assets",jo=Vo.FtReduxStore.get({name:Eu,initialState:{savedSearches:void 0,bookmarks:void 0}}),ca=class{constructor(){this.currentSession=P.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Go,this.savedSearchesService=new Wo,P.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:o}=P.getState();(0,Vo.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),jo.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),jo.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();jo.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let o=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;jo.actions.bookmarks(o)}}},G0=new ca;var da=class{addCommand(e,o=!1){P.commands.add(e,o)}consumeCommand(e){return P.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new da;var kc=b(T()),ua=class{highlightHtml(e,o,n){(0,kc.highlightHtml)(e,o,n)}};window.FluidTopicsHighlightHtmlService=new ua;var Dc=b(T());var pa=class{isDate(e){var o,n,a,i;return(i=(a=((n=(o=P.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(c=>c.key===e))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(e,o){var n,a,i;return Dc.DateFormatter.format(e,(n=o?.locale)!==null&&n!==void 0?n:P.getState().uiLocale,(a=o?.longFormat)!==null&&a!==void 0?a:!1,(i=o?.withTime)!==null&&i!==void 0?i:!1)}};window.FluidTopicsDateService=new pa;var Bc=b(T());var Jr=class{static get(e,o){var n,a,i,l;let c=P.getState(),{lang:u,region:p}=(a=(n=c.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new Bc.SearchPlaceConverter(c.baseUrl,(l=(i=window.FluidTopicsClientConfiguration)===null||i===void 0?void 0:i.predefinedSorts)!==null&&l!==void 0?l:{},e??20,c.searchInAllLanguagesAllowed,o??`${u}-${p}`)}};var fa=class{urlToSearchRequest(e){return Jr.get().parse(e)}searchRequestToUrl(e){return Jr.get().serialize(e)}};window.FluidTopicsUrlService=new fa;var Dt=b(T());var er=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};er.eventName="change";var ha=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let o=sessionStorage.getItem(this.itemName(e));return o?JSON.parse(o):void 0}set(e,o){sessionStorage.setItem(this.itemName(e),JSON.stringify(o))}},$c=new ha;var Ko=class t extends Dt.WithEventBus{static build(){return new t(window.history,$c,()=>window.location,!1)}constructor(e,o,n,a){var i,l;super(),this.history=e,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(l=(i=e.state)===null||i===void 0?void 0:i.index)!==null&&l!==void 0?l:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(e,o=!1){let n=o&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Dt.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new er(this.currentItem())),0)}installProxies(){let e=o=>(n,a,[i,l,c])=>{let u=o(),p={...u===this.currentIndex?this.currentState:void 0,...i,index:u,href:typeof c=="string"?c:(c??this.windowLocation()).href};n.apply(a,[p,l,c]),this.setCurrentState(p,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let o=this.history.length-1;o>=0;o--)e?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(e){var o;let n={...this.buildCurrentState(),...e,index:this.currentIndex,title:(o=e?.title)!==null&&o!==void 0?o:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(e){this.addEventListener(er.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(er.eventName,e)}currentItem(){return(0,Dt.deepCopy)(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,Dt.deepCopy)(this.states[this.previousDifferentMajorPosition()])}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return(0,Dt.deepCopy)(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var o;let n=(o=this.states[e])===null||o===void 0?void 0:o.majorStateId;if(!n)return e;let a=e,i=e+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var e,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&o!==void 0?o:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,o){var n;if(!this.hasState(e))return!1;let a=o??this.currentState.majorStateId,i=(n=this.states[e])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Ko.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,Fc.customElement)("ft-app-context")(ee);var Wc=b(K());var wu=b(T());function Uc(t){return t.match(/^[\w-]+\.[\w-]+$/)}var Au=function(t,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(l=t[c])&&(i=(a<3?l(i):a>3?l(e,o,i):l(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},Mc=Symbol("i18nAttributes"),Hc=Symbol("i18nListAttributes"),Gc=Symbol("i18nProperties"),Zo=Symbol("i18nContexts"),eo=Symbol("i18nUnsubs");function Xo(t){var e,o;class n extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[o]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?Ro:Sr}i18n(i){var l;this.hasI18nContext(i.context)||this.addI18nContext(i.context,void 0,i.custom);let c=(l=i.args)!==null&&l!==void 0?l:i.argsProvider?i.argsProvider(this):[];return this.getI18nService(i.custom).resolveMessage(i.context,i.key,...c)}customI18n(i,l){if(Uc(i)){let[c,u]=i.split(".");return this.i18n({custom:!0,context:c,key:u,...l})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((l,c,u)=>i.has(c)||typeof l.argsProvider=="function"),this.updateI18nProperties(l=>typeof l.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((l,c,u)=>{var p;return((p=u?.context)===null||p===void 0?void 0:p.toLowerCase())===i}),this.updateI18nProperties(l=>l.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var l,c;let u=this,p=(m,y,g)=>g?.context&&g.key&&i(m,y,g)?{...g,message:this.i18n({context:g.context,key:g.key,...m})}:g;(l=this[Mc])===null||l===void 0||l.forEach((m,y)=>u[y]=p(m,y,u[y])),(c=this[Hc])===null||c===void 0||c.forEach((m,y)=>{var g;return u[y]=(g=u[y])===null||g===void 0?void 0:g.map(S=>p(m,y,S))})}updateI18nProperties(i){var l;(l=this[Gc])===null||l===void 0||l.forEach((c,u)=>{i(c,u)&&(this[u]=this.i18n(c))})}addI18nMessages(i,l,c){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,l,c)}addI18nContext(i,l,c){let u=(typeof i=="string"?i:i.name).toLowerCase();c=typeof i=="string"?c:i.custom,this[Zo].set(u,{isCustomContext:c}),this[eo].has(u)||this[eo].set(u,this.getI18nService(c).subscribe(u,()=>this.onI18nUpdate(u))),this.getI18nService(c).prepareContext(u,l)}hasI18nContext(i){return this[Zo].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Zo].forEach((i,l)=>this.addI18nContext(l,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[eo].forEach(i=>i()),this[eo].clear()}}return e=Zo,o=eo,Au([(0,Wc.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}var zc=class extends Xo(Yo.FtLitElement){},qo=class extends Xo(Yo.FtLitElementRedux){};var to=function(t,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(l=t[c])&&(i=(a<3?l(i):a>3?l(e,o,i):l(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},qe=class extends qo{constructor(){super(),this.editorMode=!1,this.addStore(P)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Qo.nothing:Qo.html`
|
|
1838
1838
|
<span class="ft-i18n">
|