@fluid-topics/ftds-period-picker 2.2.40 → 2.2.41
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(()=>{var uu=Object.create;var Ks=Object.defineProperty;var fu=Object.getOwnPropertyDescriptor;var pu=Object.getOwnPropertyNames;var mu=Object.getPrototypeOf,hu=Object.prototype.hasOwnProperty;var Fr=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var gu=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of pu(t))!hu.call(e,a)&&a!==r&&Ks(e,a,{get:()=>t[a],enumerable:!(n=fu(t,a))||n.enumerable});return e};var b=(e,t,r)=>(r=e!=null?uu(mu(e)):{},gu(t||!e||!e.__esModule?Ks(r,"default",{value:e,enumerable:!0}):r,e));var R=Fr((Pm,Zs)=>{Zs.exports=ftGlobals.wcUtils});var F=Fr((Dm,qs)=>{qs.exports=ftGlobals.lit});var Z=Fr((Fm,Ys)=>{Ys.exports=ftGlobals.litDecorators});var Ya=Fr((Hm,Xs)=>{Xs.exports=ftGlobals.litRepeat});var Qe=Fr((cg,i1)=>{i1.exports=ftGlobals.litClassMap});var M2=Fr((uS,N2)=>{N2.exports=ftGlobals.litUnsafeHTML});var cu=b(R());var hn=b(F()),Ke=b(Z());function at(e,t,r){return e?t(e):r?.(e)}var X4=b(Ya()),ft=b(R());var bi=b(Z());var Qs=b(Z(),1);var Xa=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)},yu=e=>({fromAttribute:t=>{if(t==null)return Eo(e);try{return JSON.parse(t)}catch{return Eo(e)}},toAttribute:t=>JSON.stringify(t)});function Js(e,t){return(0,Qs.property)({type:Object,converter:yu(e),hasChanged:Lo,...t??{}})}function bu(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,n;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!$r(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!$r(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let a=s=>Object.keys(s).filter(l=>s[l]!=null),i=a(e);if(r=i.length,r!==a(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){let s=i[n];if(!$r(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function $r(e,t){try{return bu(e,t)}catch{return!1}}function Lo(e,t){return!$r(e,t)}function Eo(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function yn(e,t){let r=n=>n[e]===!0;return n=>{if(r(n))return n;let a=t(n);return a[e]=!0,a}}var ec=b(Z(),1);var Qa=e=>{let t=e??{};return(r,n)=>{var a;let i={hasChanged:Lo,attribute:!1,...t};(0,ec.property)(i)(r,n);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(a=t.selector)!==null&&a!==void 0?a:(l=>l[n]),store:t.store})}};var bn=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(n=>n.type===t);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var or=b(Z(),1);var xn=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let n=[...this.callbacks];this.callbacks=[];let a=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),i=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let s of n)try{await s()}catch(l){a(l);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Sn=b(F(),1);var vn=class extends Sn.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let r={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return(0,Sn.adoptStyles)(n,t.elementStyles),n}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([r,n])=>this.defineScopedElement(r,n))}static defineScopedElement(t,r){Xa(t)(r),this.canDefineScopedElement(t)&&this.registry.define(t,r)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,r){this.scopedRegistryConstructor.defineScopedElement(t,r)}};function tc(e,t,...r){var n;let a=e.querySelector(t);for(let i of r)a=(n=a?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return a}var Br=function(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},ac,rc=Symbol("constructorPrototype"),oc=Symbol("constructorName"),ic=Symbol("exportpartsDebouncer"),nc=Symbol("dynamicDependenciesLoaded"),Ur=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};Ur.eventName="exportparts-updated";var ht=class extends vn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[ac]=new xn(5),this.scheduleExportpartsUpdate=()=>{var t,r,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[ic].run(()=>{var a,i;!((a=this.exportpartsPrefix)===null||a===void 0)&&a.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[oc]=this.constructor.name,this[rc]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[oc]&&Object.setPrototypeOf(this,this[rc])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let r=this.constructor;r[nc]||(r[nc]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Ur.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Ur.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new Ur)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:a}=this.elementToFocus;if(n!=null){let i=[...a??[],n];r=tc(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,a;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}setExportpartsAttribute(t){var r,n,a,i,s,l;let u=x=>x!=null&&x.trim().length>0,m=t.filter(u).map(x=>x.trim());if(m.length===0){this.exportparts=void 0;return}let h=new Set;for(let x of(i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&i!==void 0?i:[]){let v=(s=(n=x.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&s!==void 0?s:[],O=(l=(a=x.getAttribute("exportparts"))===null||a===void 0?void 0:a.split(",").map(w=>w.split(":")[1]))!==null&&l!==void 0?l:[],_=[...v,...O].filter(u).map(w=>w.trim());for(let w of _)h.add(w)}if(h.size===0){this.exportparts=void 0;return}let g=[...h.values()].flatMap(x=>m.map(v=>`${x}:${v}--${x}`));this.exportparts=[...this.part,...g].join(", ")}};ac=ic;Br([(0,or.property)()],ht.prototype,"exportpartsPrefix",void 0);Br([Js([])],ht.prototype,"exportpartsPrefixes",void 0);Br([(0,or.property)({reflect:!0})],ht.prototype,"exportparts",void 0);Br([(0,or.property)()],ht.prototype,"customStylesheet",void 0);Br([(0,or.property)()],ht.prototype,"elementToFocus",void 0);Br([(0,or.state)()],ht.prototype,"useAdoptedStyleSheets",void 0);function Cn(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Ao=Symbol("internalReduxEventsUnsubscribers"),Ft=Symbol("internalStoresUnsubscribers"),nr=Symbol("internalStores"),xu=yn(Symbol("withRedux"),function(e){var t,r,n;class a extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(l=>s.has(l))&&this.updateFromStores()}getUnnamedStore(){if(this[nr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[nr].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[nr].get(s)}addStore(s,l){var u;l=(u=l??s.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(l),this[nr].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[nr].delete(l)}setupStores(){this.unsubscribeFromStores(),this[nr].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let u=this.constructor.getPropertyOptions(l);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:l)){let m=this.getStore(s.store);m&&(s.store?this[Ft].has(s.store):this[Ft].size>0)&&(this[l]=s.selector(m.getState(),this))}})}subscribeToStore(s,l){var u,m;this[Ft].set(s,l.subscribe(()=>this.updateFromStores())),this[Ao].set(s,[]),Cn(l)&&(!((u=l.deprecatedKeys)===null||u===void 0)&&u.length&&this.reduxConstructor.reduxProperties.forEach((h,g)=>{this.getStore(h.store)===l&&l.deprecatedKeys.includes(g)&&console.warn("Element",this,"is subscribed to deprecated key",g,"in store",l.name)}),l.eventBus&&((m=this.reduxConstructor.reduxEventListeners)===null||m===void 0||m.forEach((h,g)=>{if(typeof this[g]=="function"&&(!h.store||l.name===h.store)){let x=v=>this[g](v);l.addEventListener(h.eventName,x),this[Ao].get(s).push(()=>l.removeEventListener(h.eventName,x))}}))),this.onStoreAvailable(s)}unsubscribeFromStores(){this[Ft].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[Ft].has(s)&&this[Ft].get(s)(),this[Ft].delete(s),(l=this[Ao].get(s))===null||l===void 0||l.forEach(u=>u()),this[Ao].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=Ft,r=nr,n=Ao,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),sc=class extends xu(ht){};function ve(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var vu=typeof Symbol=="function"&&Symbol.observable||"@@observable",cc=vu,Ja=()=>Math.random().toString(36).substring(7).split("").join("."),Su={INIT:`@@redux/INIT${Ja()}`,REPLACE:`@@redux/REPLACE${Ja()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Ja()}`},En=Su;function Ln(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function ei(e,t,r){if(typeof e!="function")throw new Error(ve(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(ve(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(ve(1));return r(ei)(e,t)}let n=e,a=t,i=new Map,s=i,l=0,u=!1;function m(){s===i&&(s=new Map,i.forEach((w,M)=>{s.set(M,w)}))}function h(){if(u)throw new Error(ve(3));return a}function g(w){if(typeof w!="function")throw new Error(ve(4));if(u)throw new Error(ve(5));let M=!0;m();let D=l++;return s.set(D,w),function(){if(M){if(u)throw new Error(ve(6));M=!1,m(),s.delete(D),i=null}}}function x(w){if(!Ln(w))throw new Error(ve(7));if(typeof w.type>"u")throw new Error(ve(8));if(typeof w.type!="string")throw new Error(ve(17));if(u)throw new Error(ve(9));try{u=!0,a=n(a,w)}finally{u=!1}return(i=s).forEach(D=>{D()}),w}function v(w){if(typeof w!="function")throw new Error(ve(10));n=w,x({type:En.REPLACE})}function O(){let w=g;return{subscribe(M){if(typeof M!="object"||M===null)throw new Error(ve(11));function D(){let k=M;k.next&&k.next(h())}return D(),{unsubscribe:w(D)}},[cc](){return this}}}return x({type:En.INIT}),{dispatch:x,subscribe:g,getState:h,replaceReducer:v,[cc]:O}}function Cu(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:En.INIT})>"u")throw new Error(ve(12));if(typeof r(void 0,{type:En.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ve(13))})}function ti(e){let t=Object.keys(e),r={};for(let s=0;s<t.length;s++){let l=t[s];typeof e[l]=="function"&&(r[l]=e[l])}let n=Object.keys(r),a,i;try{Cu(r)}catch(s){i=s}return function(l={},u){if(i)throw i;let m=!1,h={};for(let g=0;g<n.length;g++){let x=n[g],v=r[x],O=l[x],_=v(O,u);if(typeof _>"u"){let w=u&&u.type;throw new Error(ve(14))}h[x]=_,m=m||_!==O}return m=m||n.length!==Object.keys(l).length,m?h:l}}function Oo(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function lc(...e){return t=>(r,n)=>{let a=t(r,n),i=()=>{throw new Error(ve(15))},s={getState:a.getState,dispatch:(u,...m)=>i(u,...m)},l=e.map(u=>u(s));return i=Oo(...l)(a.dispatch),{...a,dispatch:i}}}function dc(e){return Ln(e)&&"type"in e&&typeof e.type=="string"}var xc=Symbol.for("immer-nothing"),uc=Symbol.for("immer-draftable"),we=Symbol.for("immer-state");function it(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Pe=Object,Gr=Pe.getPrototypeOf,Rn="constructor",kn="prototype",ai="configurable",_n="enumerable",On="writable",wo="value",gt=e=>!!e&&!!e[we];function De(e){return e?vc(e)||Pn(e)||!!e[uc]||!!e[Rn]?.[uc]||Dn(e)||Io(e):!1}var Eu=Pe[kn][Rn].toString(),fc=new WeakMap;function vc(e){if(!e||!pi(e))return!1;let t=Gr(e);if(t===null||t===Pe[kn])return!0;let r=Pe.hasOwnProperty.call(t,Rn)&&t[Rn];if(r===Object)return!0;if(!Hr(r))return!1;let n=fc.get(r);return n===void 0&&(n=Function.toString.call(r),fc.set(r,n)),n===Eu}function Tn(e,t,r=!0){zo(e)===0?(r?Reflect.ownKeys(e):Pe.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((n,a)=>t(a,n,e))}function zo(e){let t=e[we];return t?t.type_:Pn(e)?1:Dn(e)?2:Io(e)?3:0}var ri=(e,t,r=zo(e))=>r===2?e.has(t):Pe[kn].hasOwnProperty.call(e,t),ii=(e,t,r=zo(e))=>r===2?e.get(t):e[t],zn=(e,t,r,n=zo(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function Lu(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Pn=Array.isArray,Dn=e=>e instanceof Map,Io=e=>e instanceof Set,pi=e=>typeof e=="object",Hr=e=>typeof e=="function",oi=e=>typeof e=="boolean";function Au(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var At=e=>e.copy_||e.base_;var mi=e=>e.modified_?e.copy_:e.base_;function si(e,t){if(Dn(e))return new Map(e);if(Io(e))return new Set(e);if(Pn(e))return Array[kn].slice.call(e);let r=vc(e);if(t===!0||t==="class_only"&&!r){let n=Pe.getOwnPropertyDescriptors(e);delete n[we];let a=Reflect.ownKeys(n);for(let i=0;i<a.length;i++){let s=a[i],l=n[s];l[On]===!1&&(l[On]=!0,l[ai]=!0),(l.get||l.set)&&(n[s]={[ai]:!0,[On]:!0,[_n]:l[_n],[wo]:e[s]})}return Pe.create(Gr(e),n)}else{let n=Gr(e);if(n!==null&&r)return{...e};let a=Pe.create(n);return Pe.assign(a,e)}}function Fn(e,t=!1){return $n(e)||gt(e)||!De(e)||(zo(e)>1&&Pe.defineProperties(e,{set:An,add:An,clear:An,delete:An}),Pe.freeze(e),t&&Tn(e,(r,n)=>{Fn(n,!0)},!1)),e}function Ou(){it(2)}var An={[wo]:Ou};function $n(e){return e===null||!pi(e)?!0:Pe.isFrozen(e)}var In="MapSet",ci="Patches",pc="ArrayMethods",Sc={};function ar(e){let t=Sc[e];return t||it(0,e),t}var mc=e=>!!Sc[e];var Ro,Cc=()=>Ro,wu=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:mc(In)?ar(In):void 0,arrayMethodsPlugin_:mc(pc)?ar(pc):void 0});function hc(e,t){t&&(e.patchPlugin_=ar(ci),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function li(e){di(e),e.drafts_.forEach(Ru),e.drafts_=null}function di(e){e===Ro&&(Ro=e.parent_)}var gc=e=>Ro=wu(Ro,e);function Ru(e){let t=e[we];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function yc(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(e!==void 0&&e!==r){r[we].modified_&&(li(t),it(4)),De(e)&&(e=bc(t,e));let{patchPlugin_:a}=t;a&&a.generateReplacementPatches_(r[we].base_,e,t)}else e=bc(t,r);return _u(t,e,!0),li(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==xc?e:void 0}function bc(e,t){if($n(t))return t;let r=t[we];if(!r)return Nn(t,e.handledSet_,e);if(!Un(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);Ac(r,e)}return r.copy_}function _u(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Fn(t,r)}function Ec(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Un=(e,t)=>e.scope_===t,zu=[];function Lc(e,t,r,n){let a=At(e),i=e.type_;if(n!==void 0&&ii(a,n,i)===t){zn(a,n,r,i);return}if(!e.draftLocations_){let l=e.draftLocations_=new Map;Tn(a,(u,m)=>{if(gt(m)){let h=l.get(m)||[];h.push(u),l.set(m,h)}})}let s=e.draftLocations_.get(t)??zu;for(let l of s)zn(a,l,r,i)}function Iu(e,t,r){e.callbacks_.push(function(a){let i=t;if(!i||!Un(i,a))return;a.mapSetPlugin_?.fixSetContents(i);let s=mi(i);Lc(e,i.draft_??i,s,r),Ac(i,a)})}function Ac(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let a=n.getPath(e);a&&n.generatePatches_(e,a,t)}Ec(e)}}function Nu(e,t,r){let{scope_:n}=e;if(gt(r)){let a=r[we];Un(a,n)&&a.callbacks_.push(function(){wn(e);let s=mi(a);Lc(e,r,s,t)})}else De(r)&&e.callbacks_.push(function(){let i=At(e);e.type_===3?i.has(r)&&Nn(r,n.handledSet_,n):ii(i,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Nn(ii(e.copy_,t,e.type_),n.handledSet_,n)})}function Nn(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||gt(e)||t.has(e)||!De(e)||$n(e)||(t.add(e),Tn(e,(n,a)=>{if(gt(a)){let i=a[we];if(Un(i,r)){let s=mi(i);zn(e,n,s,e.type_),Ec(i)}}else De(a)&&Nn(a,t,r)})),e}function Mu(e,t){let r=Pn(e),n={type_:r?1:0,scope_:t?t.scope_:Cc(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},a=n,i=Mn;r&&(a=[n],i=_o);let{revoke:s,proxy:l}=Proxy.revocable(a,i);return n.draft_=l,n.revoke_=s,[l,n]}var Mn={get(e,t){if(t===we)return e;let r=e.scope_.arrayMethodsPlugin_,n=e.type_===1&&typeof t=="string";if(n&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);let a=At(e);if(!ri(a,t,e.type_))return Tu(e,a,t);let i=a[t];if(e.finalized_||!De(i)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&Au(t))return i;if(i===ni(e.base_,t)||ku(e,t,i)){wn(e);let s=e.type_===1?+t:t,l=fi(e.scope_,i,e,s);return e.copy_[s]=l}return i},has(e,t){return t in At(e)},ownKeys(e){return Reflect.ownKeys(At(e))},set(e,t,r){let n=Oc(At(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let a=ni(At(e),t),i=a?.[we];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_.delete(t),!0;if(Lu(r,a)&&(r!==void 0||ri(e.base_,t,e.type_)))return!0;wn(e),ui(e)}return e.copy_[t]===r&&(r!==void 0||ri(e.copy_,t,e.type_))||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),Nu(e,t,r)),!0},deleteProperty(e,t){return wn(e),ni(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),ui(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=At(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[On]:!0,[ai]:e.type_!==1||t!=="length",[_n]:n[_n],[wo]:r[t]}},defineProperty(){it(11)},getPrototypeOf(e){return Gr(e.base_)},setPrototypeOf(){it(12)}},_o={};for(let e in Mn){let t=Mn[e];_o[e]=function(){let r=arguments;return r[0]=r[0][0],t.apply(this,r)}}_o.deleteProperty=function(e,t){return _o.set.call(this,e,t,void 0)};_o.set=function(e,t,r){return Mn.set.call(this,e[0],t,r,e[0])};function ni(e,t){let r=e[we];return(r?At(r):e)[t]}function ku(e,t,r){return e.type_!==1||!e.allIndicesReassigned_||!De(r)||r[we]?!1:e.baseRefs_.has(r)}function Tu(e,t,r){let n=Oc(t,r);return n?wo in n?n[wo]:n.get?.call(e.draft_):void 0}function Oc(e,t){if(!(t in e))return;let r=Gr(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Gr(r)}}function ui(e){e.modified_||(e.modified_=!0,e.parent_&&ui(e.parent_))}function wn(e){e.copy_||(e.assigned_=new Map,e.copy_=si(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Pu=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(Hr(t)&&!Hr(r)){let i=r;r=t;let s=this;return function(u=i,...m){return s.produce(u,h=>r.call(this,h,...m))}}Hr(r)||it(6),n!==void 0&&!Hr(n)&&it(7);let a;if(De(t)){let i=gc(this),s=fi(i,t,void 0),l=!0;try{a=r(s),l=!1}finally{l?li(i):di(i)}return hc(i,n),yc(a,i)}else if(!t||!pi(t)){if(a=r(t),a===void 0&&(a=t),a===xc&&(a=void 0),this.autoFreeze_&&Fn(a,!0),n){let i=[],s=[];ar(ci).generateReplacementPatches_(t,a,{patches_:i,inversePatches_:s}),n(i,s)}return a}else it(1,t)},this.produceWithPatches=(t,r)=>{if(Hr(t))return(s,...l)=>this.produceWithPatches(s,u=>t(u,...l));let n,a;return[this.produce(t,r,(s,l)=>{n=s,a=l}),n,a]},oi(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),oi(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),oi(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){De(e)||it(8),gt(e)&&(e=wc(e));let t=gc(this),r=fi(t,e,void 0);return r[we].isManual_=!0,di(t),r}finishDraft(e,t){let r=e&&e[we];(!r||!r.isManual_)&&it(9);let{scope_:n}=r;return hc(n,t),yc(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let a=t[r];if(a.path.length===0&&a.op==="replace"){e=a.value;break}}r>-1&&(t=t.slice(r+1));let n=ar(ci).applyPatches_;return gt(e)?n(e,t):this.produce(e,a=>n(a,t))}};function fi(e,t,r,n){let[a,i]=Dn(t)?ar(In).proxyMap_(t,r):Io(t)?ar(In).proxySet_(t,r):Mu(t,r);return(r?.scope_??Cc()).drafts_.push(a),i.callbacks_=r?.callbacks_??[],i.key_=n,r&&n!==void 0?Iu(r,i,n):i.callbacks_.push(function(u){u.mapSetPlugin_?.fixSetContents(i);let{patchPlugin_:m}=u;i.modified_&&m&&m.generatePatches_(i,[],u)}),a}function wc(e){return gt(e)||it(10,e),Rc(e)}function Rc(e){if(!De(e)||$n(e))return e;let t=e[we],r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=si(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=si(e,!0);let a=r;return Io(r)&&(r=new Set),Tn(a,(i,s)=>{zn(r,i,Rc(s))},n),t&&(t.finalized_=!1),r}var Du=globalThis.Iterator,f8=typeof Du?.from=="function";var Fu=new Pu,hi=Fu.produce;function _c(e){return({dispatch:r,getState:n})=>a=>i=>typeof i=="function"?i(r,n,e):a(i)}var zc=_c(),Ic=_c;var $u=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Oo:Oo.apply(null,arguments)};typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var Uu=e=>e&&typeof e.match=="function";function $t(e,t){function r(...n){if(t){let a=t(...n);if(!a)throw new Error(yt(0));return{type:e,payload:a.payload,..."meta"in a&&{meta:a.meta},..."error"in a&&{error:a.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>dc(n)&&n.type===e,r}var Pc=class No extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,No.prototype)}static get[Symbol.species](){return No}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new No(...t[0].concat(this)):new No(...t.concat(this))}};function Nc(e){return De(e)?hi(e,()=>{}):e}function Bn(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function Bu(e){return typeof e=="boolean"}var Hu=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:a=!0,actionCreatorCheck:i=!0}=t??{},s=new Pc;return r&&(Bu(r)?s.push(zc):s.push(Ic(r.extraArgument))),s},Gu="RTK_autoBatch";var Mc=e=>t=>{setTimeout(t,e)},Wu=(e,t)=>r=>{let n=!1,a,i,s=()=>{n||(n=!0,cancelAnimationFrame(a),clearTimeout(i),r())};a=e(s),i=setTimeout(s,t)},Vu=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),a=!0,i=!1,s=!1,l=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?Wu(window.requestAnimationFrame,100):Mc(10):e.type==="callback"?e.queueNotification:Mc(e.timeout),m=()=>{s=!1,i&&(i=!1,l.forEach(h=>h()))};return Object.assign({},n,{subscribe(h){let g=()=>a&&h(),x=n.subscribe(g);return l.add(h),()=>{x(),l.delete(h)}},dispatch(h){try{return a=!h?.meta?.[Gu],i=!a,i&&(s||(s=!0,u(m))),n.dispatch(h)}finally{a=!0}}})},ju=e=>function(r){let{autoBatch:n=!0}=r??{},a=new Pc(e);return n&&a.push(Vu(typeof n=="object"?n:void 0)),a};function Dc(e){let t=Hu(),{reducer:r=void 0,middleware:n,devTools:a=!0,duplicateMiddlewareCheck:i=!0,preloadedState:s=void 0,enhancers:l=void 0}=e||{},u;if(typeof r=="function")u=r;else if(Ln(r))u=ti(r);else throw new Error(yt(1));let m;typeof n=="function"?m=n(t):m=t();let h=Oo;a&&(h=$u({trace:!1,...typeof a=="object"&&a}));let g=lc(...m),x=ju(g),v=typeof l=="function"?l(x):x(),O=h(...v);return ei(u,s,O)}function Fc(e){let t={},r=[],n,a={addCase(i,s){let l=typeof i=="string"?i:i.type;if(!l)throw new Error(yt(28));if(l in t)throw new Error(yt(29));return t[l]=s,a},addAsyncThunk(i,s){return s.pending&&(t[i.pending.type]=s.pending),s.rejected&&(t[i.rejected.type]=s.rejected),s.fulfilled&&(t[i.fulfilled.type]=s.fulfilled),s.settled&&r.push({matcher:i.settled,reducer:s.settled}),a},addMatcher(i,s){return r.push({matcher:i,reducer:s}),a},addDefaultCase(i){return n=i,a}};return e(a),[t,r,n]}function Ku(e){return typeof e=="function"}function Zu(e,t){let[r,n,a]=Fc(t),i;if(Ku(e))i=()=>Nc(e());else{let l=Nc(e);i=()=>l}function s(l=i(),u){let m=[r[u.type],...n.filter(({matcher:h})=>h(u)).map(({reducer:h})=>h)];return m.filter(h=>!!h).length===0&&(m=[a]),m.reduce((h,g)=>{if(g)if(gt(h)){let x=g(h,u);return x===void 0?h:x}else{if(De(h))return hi(h,x=>g(x,u));{let x=g(h,u);if(x===void 0){if(h===null)return h;throw new Error(yt(9))}return x}}return h},l)}return s.getInitialState=i,s}var qu=(e,t)=>Uu(e)?e.match(t):e(t);function Yu(...e){return t=>e.some(r=>qu(r,t))}var Xu="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Qu=(e=21)=>{let t="",r=e;for(;r--;)t+=Xu[Math.random()*64|0];return t},Ju=["name","message","stack","code"],gi=class{payload;meta;_type;constructor(e,t){this.payload=e,this.meta=t}},kc=class{payload;meta;_type;constructor(e,t){this.payload=e,this.meta=t}},ef=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of Ju)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},Tc="External signal was aborted",tf=(()=>{function e(t,r,n){let a=$t(t+"/fulfilled",(u,m,h,g)=>({payload:u,meta:{...g||{},arg:h,requestId:m,requestStatus:"fulfilled"}})),i=$t(t+"/pending",(u,m,h)=>({payload:void 0,meta:{...h||{},arg:m,requestId:u,requestStatus:"pending"}})),s=$t(t+"/rejected",(u,m,h,g,x)=>({payload:g,error:(n&&n.serializeError||ef)(u||"Rejected"),meta:{...x||{},arg:h,requestId:m,rejectedWithValue:g!==void 0,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"}}));function l(u,{signal:m}={}){return(h,g,x)=>{let v=n?.idGenerator?n.idGenerator(u):Qu(),O=new AbortController,_,w;function M(z){w=z,O.abort()}m&&(m.aborted?M(Tc):m.addEventListener("abort",()=>M(Tc),{once:!0}));let D=(async function(){let z;try{let k=n?.condition?.(u,{getState:g,extra:x});if(of(k)&&(k=await k),k===!1)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};if(O.signal.aborted)throw{name:"AbortError",message:w||"Aborted"};let B=new Promise((G,ce)=>{_=()=>{ce({name:"AbortError",message:w||"Aborted"})},O.signal.addEventListener("abort",_,{once:!0})});h(i(v,u,n?.getPendingMeta?.({requestId:v,arg:u},{getState:g,extra:x}))),z=await Promise.race([B,Promise.resolve(r(u,{dispatch:h,getState:g,extra:x,requestId:v,signal:O.signal,abort:M,rejectWithValue:((G,ce)=>new gi(G,ce)),fulfillWithValue:((G,ce)=>new kc(G,ce))})).then(G=>{if(G instanceof gi)throw G;return G instanceof kc?a(G.payload,v,u,G.meta):a(G,v,u)})])}catch(k){z=k instanceof gi?s(null,v,u,k.payload,k.meta):s(k,v,u)}finally{_&&O.signal.removeEventListener("abort",_)}return n&&!n.dispatchConditionRejection&&s.match(z)&&z.meta.condition||h(z),z})();return Object.assign(D,{abort:M,requestId:v,arg:u,unwrap(){return D.then(rf)}})}}return Object.assign(l,{pending:i,rejected:s,fulfilled:a,settled:Yu(s,a),typePrefix:t})}return e.withTypes=()=>e,e})();function rf(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function of(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var $c=Symbol.for("rtk-slice-createasyncthunk"),v8={[$c]:tf};function nf(e,t){return`${e}/${t}`}function af({creators:e}={}){let t=e?.asyncThunk?.[$c];return function(n){let{name:a,reducerPath:i=a}=n;if(!a)throw new Error(yt(11));typeof process<"u";let s=(typeof n.reducers=="function"?n.reducers(cf()):n.reducers)||{},l=Object.keys(s),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},m={addCase(z,k){let B=typeof z=="string"?z:z.type;if(!B)throw new Error(yt(12));if(B in u.sliceCaseReducersByType)throw new Error(yt(13));return u.sliceCaseReducersByType[B]=k,m},addMatcher(z,k){return u.sliceMatchers.push({matcher:z,reducer:k}),m},exposeAction(z,k){return u.actionCreators[z]=k,m},exposeCaseReducer(z,k){return u.sliceCaseReducersByName[z]=k,m}};l.forEach(z=>{let k=s[z],B={reducerName:z,type:nf(a,z),createNotation:typeof n.reducers=="function"};df(k)?ff(B,k,m,t):lf(B,k,m)});function h(){let[z={},k=[],B=void 0]=typeof n.extraReducers=="function"?Fc(n.extraReducers):[n.extraReducers],G={...z,...u.sliceCaseReducersByType};return Zu(n.initialState,ce=>{for(let ue in G)ce.addCase(ue,G[ue]);for(let ue of u.sliceMatchers)ce.addMatcher(ue.matcher,ue.reducer);for(let ue of k)ce.addMatcher(ue.matcher,ue.reducer);B&&ce.addDefaultCase(B)})}let g=z=>z,x=new Map,v=new WeakMap,O;function _(z,k){return O||(O=h()),O(z,k)}function w(){return O||(O=h()),O.getInitialState()}function M(z,k=!1){function B(ce){let ue=ce[z];return typeof ue>"u"&&k&&(ue=Bn(v,B,w)),ue}function G(ce=g){return Bn(Bn(x,k,()=>new WeakMap),ce,()=>{let ue={};for(let[Dr,Ze]of Object.entries(n.selectors??{}))ue[Dr]=sf(Ze,ce,()=>Bn(v,ce,w),k);return ue})}return{reducerPath:z,getSelectors:G,get selectors(){return G(B)},selectSlice:B}}let D={name:a,reducer:_,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:w,...M(i),injectInto(z,{reducerPath:k,...B}={}){let G=k??i;return z.inject({reducerPath:G,reducer:_},B),{...D,...M(G,!0)}}};return D}}function sf(e,t,r,n){function a(i,...s){let l=t(i);return typeof l>"u"&&n&&(l=r()),e(l,...s)}return a.unwrapped=e,a}var Uc=af();function cf(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function lf({type:e,reducerName:t,createNotation:r},n,a){let i,s;if("reducer"in n){if(r&&!uf(n))throw new Error(yt(17));i=n.reducer,s=n.prepare}else i=n;a.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,s?$t(e,s):$t(e))}function df(e){return e._reducerDefinitionType==="asyncThunk"}function uf(e){return e._reducerDefinitionType==="reducerWithPrepare"}function ff({type:e,reducerName:t},r,n,a){if(!a)throw new Error(yt(18));let{payloadCreator:i,fulfilled:s,pending:l,rejected:u,settled:m,options:h}=r,g=a(e,i,h);n.exposeAction(t,g),s&&n.addCase(g.fulfilled,s),l&&n.addCase(g.pending,l),u&&n.addCase(g.rejected,u),m&&n.addMatcher(g.settled,m),n.exposeCaseReducer(t,{fulfilled:s||Hn,pending:l||Hn,rejected:u||Hn,settled:m||Hn})}function Hn(){}var Bc="listener",Hc="completed",Gc="cancelled",S8=`task-${Gc}`,C8=`task-${Hc}`,E8=`${Bc}-${Gc}`,L8=`${Bc}-${Hc}`;var{assign:Wc}=Object;var yi="listenerMiddleware";var pf=Wc($t(`${yi}/add`),{withTypes:()=>pf}),A8=$t(`${yi}/removeAll`),mf=Wc($t(`${yi}/remove`),{withTypes:()=>mf});function yt(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var hf=yn(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,a){this.eventBus.addEventListener(r,n,a)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,a){this.eventBus.removeEventListener(r,n,a)}}}),Gn=class extends hf(Object){};window.ftReduxStores||(window.ftReduxStores={});var Vc=class e extends Gn{static get(t){var r;let n=typeof t=="string"?t:t.name,a=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(Cn(i))return i;if(a==null)return;let s=Uc({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),l=Dc({reducer:(u,m)=>{if(m.type==="CLEAR_FT_REDUX_STORE"){let h=Eo(s.getInitialState());for(let g of m.keeping)h[g]=(u??h)[g];return h}else if(typeof m.type=="string"&&m.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...u,...m.overwrites};return s.reducer(u,m)}});return window.ftReduxStores[a.name]=new e(s,l,a.eventBus,a.deprecatedKeys)}constructor(t,r,n,a){super(),this.reduxSlice=t,this.reduxStore=r,this.deprecatedKeys=a,this.isFtReduxStore=!0,this.commands=new bn,this.injectInto=(s,l)=>this.reduxSlice.injectInto(s,l),this.selectSlice=s=>this.reduxSlice.selectSlice(s);let i=s=>s!=null?JSON.parse(JSON.stringify(s)):s;this.actions=new Proxy(this.reduxSlice.actions,{get:(s,l,u)=>{let m=l,h=s[m];return h?(...g)=>{let x=h(...g.map(i));return this.reduxStore.dispatch(x),x}:g=>{let x=m,v=this.getState()[x];$r(v,g)||this.setState({[x]:i(g)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};var Wn=class{static format(t,r,n,a,i){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(n,a,!!i)):this.getIntlDateTime(t,r,n,a,!!i)}static getMomentDateFormat(t,r,n){return n?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,n,a,i){let s=typeof t=="string"?new Date(t):t,l=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(s),u=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return i?u:a?`${l} ${u}`:l}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var Vn=b(R()),gf="ft-app-info",ir=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};ir.eventName="authentication-change";var Mo=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Mo.eventName="ui-locale-changed";var yf={session:(e,t)=>{(0,Vn.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>U.dispatchEvent(new ir(t.payload)),0))}},U=Vn.FtReduxStore.get({name:gf,reducers:yf,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,noCustomCode:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1,stickyFilters:void 0}});var jc=b(R()),jn=function(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},th=(0,jc.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(U)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var a,i;return((i=(a=this.metadataDescriptors.find(l=>l.key===n))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?l=>Wn.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return jn([(0,bi.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),jn([(0,bi.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),jn([Qa({store:U.name,selector:r=>{var n,a;return(a=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]}})],t.prototype,"metadataDescriptors",void 0),jn([Qa({store:U.name})],t.prototype,"uiLocale",void 0),t});var Kc;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(Kc||(Kc={}));var Zc;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(Zc||(Zc={}));var qc;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(qc||(qc={}));var Yc;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(Yc||(Yc={}));var Xc;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Xc||(Xc={}));var Qc;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(Qc||(Qc={}));var Jc;(function(e){e.PUBLISHED="PUBLISHED",e.AI="AI"})(Jc||(Jc={}));var el;(function(e){e.BOOKMARK__CREATE="BOOKMARK__CREATE",e.BOOKMARK__DELETE="BOOKMARK__DELETE",e.CASE_DEFLECTION__START="CASE_DEFLECTION__START",e.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",e.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",e.CHATBOT__RATE="CHATBOT__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",e.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",e.DOCUMENT__PRINT="DOCUMENT__PRINT",e.DOCUMENT__PROCESS="DOCUMENT__PROCESS",e.DOCUMENT__RATE="DOCUMENT__RATE",e.DOCUMENT__SEARCH="DOCUMENT__SEARCH",e.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",e.DOCUMENT__UNRATE="DOCUMENT__UNRATE",e.FEEDBACK__SEND="FEEDBACK__SEND",e.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",e.KHUB__PROCESS="KHUB__PROCESS",e.KHUB__SEARCH="KHUB__SEARCH",e.LABELS__DOWNLOAD="LABELS__DOWNLOAD",e.LINK__SHARE="LINK__SHARE",e.PAGE__DISPLAY="PAGE__DISPLAY",e.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",e.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",e.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",e.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",e.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",e.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",e.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",e.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",e.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",e.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",e.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",e.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",e.TOPIC__RATE="TOPIC__RATE",e.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",e.TOPIC__UNRATE="TOPIC__UNRATE",e.USER__LOGIN="USER__LOGIN",e.USER__LOGOUT="USER__LOGOUT",e.HEARTBEAT="HEARTBEAT"})(el||(el={}));var tl;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(tl||(tl={}));var rl;(function(e){e.METADATA_FILTER="METADATA_FILTER",e.ACCESS_RIGHTS_FILTER="ACCESS_RIGHTS_FILTER"})(rl||(rl={}));var ol;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER",e.DOC_DIFF="DOC_DIFF"})(ol||(ol={}));var nl;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",e.LINK_PREVIEW="LINK_PREVIEW",e.UD_VIEWER="UD_VIEWER",e.ASSET_VIEWER="ASSET_VIEWER"})(nl||(nl={}));var al;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(al||(al={}));var il;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(il||(il={}));var sl;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(sl||(sl={}));var cl;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(cl||(cl={}));var ll;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(ll||(ll={}));var dl;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(dl||(dl={}));var ul;(function(e){e.ASC="ASC",e.DESC="DESC"})(ul||(ul={}));var fl;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(fl||(fl={}));var pl;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(pl||(pl={}));var ml;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(ml||(ml={}));var hl;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(hl||(hl={}));var gl;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(gl||(gl={}));var yl;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(yl||(yl={}));var bl;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(bl||(bl={}));var xl;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(xl||(xl={}));var vl;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(vl||(vl={}));var fe;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(fe||(fe={}));var qe;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(qe||(qe={}));var Sl;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(Sl||(Sl={}));var Cl;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(Cl||(Cl={}));var El;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(El||(El={}));var Ll;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Ll||(Ll={}));var Al;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Al||(Al={}));var Ol;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.DOCUMENTATION="DOCUMENTATION",e.OTHER="OTHER"})(Ol||(Ol={}));var wl;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(wl||(wl={}));var Rl;(function(e){e.CHAT="CHAT",e.COMPLETION="COMPLETION",e.RAG="RAG",e.AGENT="AGENT"})(Rl||(Rl={}));var _l;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(_l||(_l={}));var zl;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(zl||(zl={}));var Il;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(Il||(Il={}));var Nl;(function(e){e.SOURCES="SOURCES",e.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",e.VOCABULARIES="VOCABULARIES",e.METADATA="METADATA",e.PRETTY_URL="PRETTY_URL",e.ACCESS_RULE="ACCESS_RULE",e.DESIGNED_PAGES="DESIGNED_PAGES",e.THEME_STUDIO="THEME_STUDIO",e.PORTAL_GENERAL="PORTAL_GENERAL",e.ASSETS="ASSETS",e.CODE_LIBRARY="CODE_LIBRARY",e.THEME="THEME",e.CONTENT_STYLES="CONTENT_STYLES",e.HOMEPAGE="HOMEPAGE",e.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",e.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",e.PORTAL_METADATA="PORTAL_METADATA",e.LANGUAGES="LANGUAGES",e.PRINT_TEMPLATES="PRINT_TEMPLATES",e.OFFLINE="OFFLINE",e.CUSTOM_JS="CUSTOM_JS",e.CONFIDENTIALITY="CONFIDENTIALITY",e.NOTIFICATIONS="NOTIFICATIONS"})(Nl||(Nl={}));var Ml;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Ml||(Ml={}));var bf={[fe.PERSONAL_BOOK_SHARE_USER]:[fe.PERSONAL_BOOK_USER],[fe.HTML_EXPORT_USER]:[fe.PERSONAL_BOOK_USER],[fe.PDF_EXPORT_USER]:[fe.PERSONAL_BOOK_USER],[fe.KHUB_ADMIN]:[fe.CONTENT_PUBLISHER],[fe.ADMIN]:[fe.KHUB_ADMIN,fe.USERS_ADMIN,fe.PORTAL_ADMIN,fe.BEHAVIOR_DATA_USER],[fe.GENERATIVE_AI_EXPORT_USER]:[fe.GENERATIVE_AI_USER]};function kl(e,t){return e===t||(bf[e]??[]).some(r=>kl(r,t))}function xi(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(n=>kl(n,t))}function Tl(e,...t){return e==null?!1:t.some(r=>xi(e,r))}var Xn=b(R());var vi=b(R());var sr=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=U.getState(),a=t??n;if(r&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,a,!0)}static await(t){return new Promise(r=>{let n=e.get(t);if(n)r(n);else{let a=U.subscribe(()=>{n=e.get(t),n&&(a(),r(n))})}})}};var Wr=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:sr.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):sr.await()}};var Fe=class extends Wr{constructor(t=!0,r){var n;super(r),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[u])=>l.localeCompare(u)));let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new vi.CacheRegistry,this.cache=t?a.commonCache:new vi.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var Kn=class extends Fe{async listMySearches(){let{session:t}=U.getState();return xi(t,fe.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var Zn=class extends Fe{async listMyBookmarks(){let t=U.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var qn=class extends Fe{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=U.getState().session;return!!t?.sessionAuthenticated}};var Yn=class extends Fe{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=U.getState().session;return!!t?.sessionAuthenticated}};var xf="ft-user-assets",vf={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(qe).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:r,mapId:n,asset:a}=t.payload;Ci(e,r,[...Si(e,r),a]),Pl(e,r,1,n),Dl(e,a)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;Ci(e,r,Si(e,r).map(a=>a.id===n.id?n:a)),Dl(e,n)},removeAsset:(e,t)=>{let{assetType:r,mapId:n,assetId:a}=t.payload;Ci(e,r,Si(e,r).filter(i=>i.id!==a)),Pl(e,r,-1,n)}},Fl={[qe.SEARCHES]:"savedSearches",[qe.BOOKMARKS]:"bookmarks",[qe.BOOKS]:void 0,[qe.COLLECTIONS]:void 0},Si=(e,t)=>{var r;let n=Fl[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},Ci=(e,t,r)=>{let n=Fl[t];n&&(e[n]=r)},Pl=(e,t,r,n)=>{let a=e.assetCounts.allAsset[t];if(a!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,a+r),t===qe.BOOKMARKS&&n)){let i=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,i+r)}},Dl=(e,t)=>{let r=e.assetLabels.map(a=>a.title),n=t.labels.filter(a=>!r.includes(a)).map(a=>({title:a}));e.assetLabels.push(...n)},_e=Xn.FtReduxStore.get({name:xf,reducers:vf,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(qe).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Ei=class{constructor(t=new qn,r=new Yn){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=U.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Zn,this.savedSearchesService=new Kn,U.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=U.getState();(0,Xn.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),_e.actions.clearAssetCount(),_e.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),_e.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),_e.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();_e.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();_e.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&_e.getState().assetCounts.allAsset[t]!==r.count&&_e.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&_e.getState().assetCounts.bookmarkByMap[t]!==r.count&&_e.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(_e.getState().assetCounts.bookmarkByMap).length!==0;t===qe.BOOKMARKS&&r&&_e.actions.clearBookmarkCountByMap(),_e.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;_e.actions.bookmarks(r)}}},Sf=new Ei;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Sf);var Li=class{addCommand(t,r=!1){U.commands.add(t,r)}consumeCommand(t){return U.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Li;var Ye=b(R());var $l,Vr=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Cf=Symbol("clearAfterUnitTest"),Qn=class extends(0,Ye.withEventBus)(Fe){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[$l]=()=>{this.defaultMessages={},this.cache=new Ye.CacheRegistry,this.listeners={}},this.currentUiLocale=U.getState().uiLocale,U.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=U.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var n;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let a={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,Ye.deepEqual)(this.defaultMessages[t],a)||(this.defaultMessages[t]=a,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,n;return this.fetchContext(t),(n=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,r){let n=t.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(t,r,...n){var a;let i=t.toLowerCase(),s=this.resolveContext(i);return new Ye.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(r,...n)}async fetchContext(t){let r=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(a){!(a instanceof Ye.CanceledPromiseError)&&r&&console.error(a)}return n}subscribe(t,r){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(r),()=>{var a;return(a=this.listeners[t])===null||a===void 0?void 0:a.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new Vr({loadedContexts:t})),this.dispatchEvent(new Vr({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new Vr({loadedContexts:[t]})),this.dispatchEvent(new Vr({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,Ye.delay)(0).then(()=>n()).catch(()=>null)))}};$l=Cf;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Qn{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Qn{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var jr=window.FluidTopicsI18nService,Jn=window.FluidTopicsCustomI18nService;var Ul=b(R()),Ai=class{highlightHtml(t,r,n){(0,Ul.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new Ai;var Bl=b(R());var Oi=class{isDate(t){var r,n,a,i;return(i=(n=((a=(r=U.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&a!==void 0?a:[]).find(l=>l.key===t))===null||n===void 0?void 0:n.date)!==null&&i!==void 0?i:!1}format(t,r){var n,a,i,s;if(t==null)return"";try{return Bl.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:U.getState().uiLocale,(a=r?.longFormat)!==null&&a!==void 0?a:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(l){throw console.error(`Date ${JSON.stringify(t)} is not valid`,l),l}}};window.FluidTopicsDateService=new Oi;var Hl=b(R());var ko=class{static get(t,r,{baseUrl:n,localesConfiguration:a,availableContentLocales:i}=U.getState()){var s;if(!r||i.length>0&&!i.some(l=>l.lang===r)){let l=a?.defaultLocales.defaultContentLocale;r=l?`${l.lang}-${l.region}`:(s=i[0])===null||s===void 0?void 0:s.lang}return new Hl.SearchPlaceConverter(n,t??20,a?.allLanguagesAllowed,r,i)}};var wi=class{urlToSearchRequest(t){return ko.get().parse(t)}searchRequestToUrl(t){return ko.get().serialize(t)}};window.FluidTopicsUrlService=new wi;var Ot=b(R());var cr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{nextLocation:t}})}};cr.eventName="before-location-change";var lr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};lr.eventName="change";var Ri=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let r=sessionStorage.getItem(this.itemName(t));return r?JSON.parse(r):void 0}set(t,r){sessionStorage.setItem(this.itemName(t),JSON.stringify(r))}},Gl=new Ri;var ea=class e extends Ot.WithEventBus{static build(){return new e(window.history,Gl,()=>window.location,!1)}constructor(t,r,n,a){var i,s;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(s=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(t,r=!1){let n=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Ot.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new lr(this.currentItem())),0)}installProxies(){let t=r=>(n,a,[i,s,l])=>{let u=new URL(typeof l=="string"?l:(l??this.windowLocation()).href,window.location.origin!=="null"?window.location.origin:void 0),m=new cr(u);this.dispatchEvent(m);let h=r(),g={...h===this.currentIndex?this.currentState:void 0,...i,index:h,href:m.detail.nextLocation.href};n.apply(a,[g,s,g.href]),this.setCurrentState(g,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addBeforeLocationChangeListener(t){this.addEventListener(cr.eventName,t)}removeBeforeLocationChangeListener(t){this.removeEventListener(cr.eventName,t)}addHistoryChangeListener(t){this.addEventListener(lr.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(lr.eventName,t)}currentItem(){return(0,Ot.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,Ot.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,Ot.deepCopy)(r.find(n=>t(n)))}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,Ot.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let n=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!n)return t;let a=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var n;if(!this.hasState(t))return!1;let a=r??this.currentState.majorStateId,i=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=ea.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e),addBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(e),removeBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(e)});var Wl=b(F());var Vl=Wl.css`
|
|
1
|
+
"use strict";(()=>{var uu=Object.create;var Ks=Object.defineProperty;var fu=Object.getOwnPropertyDescriptor;var pu=Object.getOwnPropertyNames;var mu=Object.getPrototypeOf,hu=Object.prototype.hasOwnProperty;var Fr=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var gu=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of pu(t))!hu.call(e,a)&&a!==r&&Ks(e,a,{get:()=>t[a],enumerable:!(n=fu(t,a))||n.enumerable});return e};var b=(e,t,r)=>(r=e!=null?uu(mu(e)):{},gu(t||!e||!e.__esModule?Ks(r,"default",{value:e,enumerable:!0}):r,e));var R=Fr((Pm,Zs)=>{Zs.exports=ftGlobals.wcUtils});var F=Fr((Dm,qs)=>{qs.exports=ftGlobals.lit});var Z=Fr((Fm,Ys)=>{Ys.exports=ftGlobals.litDecorators});var Ya=Fr((Hm,Xs)=>{Xs.exports=ftGlobals.litRepeat});var Qe=Fr((cg,i1)=>{i1.exports=ftGlobals.litClassMap});var M2=Fr((uS,N2)=>{N2.exports=ftGlobals.litUnsafeHTML});var cu=b(R());var hn=b(F()),Ke=b(Z());function at(e,t,r){return e?t(e):r?.(e)}var X4=b(Ya()),ft=b(R());var bi=b(Z());var Qs=b(Z(),1);var Xa=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)},yu=e=>({fromAttribute:t=>{if(t==null)return Eo(e);try{return JSON.parse(t)}catch{return Eo(e)}},toAttribute:t=>JSON.stringify(t)});function Js(e,t){return(0,Qs.property)({type:Object,converter:yu(e),hasChanged:Lo,...t??{}})}function bu(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,n;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!$r(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!$r(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let a=s=>Object.keys(s).filter(l=>s[l]!=null),i=a(e);if(r=i.length,r!==a(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){let s=i[n];if(!$r(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function $r(e,t){try{return bu(e,t)}catch{return!1}}function Lo(e,t){return!$r(e,t)}function Eo(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function yn(e,t){let r=n=>n[e]===!0;return n=>{if(r(n))return n;let a=t(n);return a[e]=!0,a}}var ec=b(Z(),1);var Qa=e=>{let t=e??{};return(r,n)=>{var a;let i={hasChanged:Lo,attribute:!1,...t};(0,ec.property)(i)(r,n);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(a=t.selector)!==null&&a!==void 0?a:(l=>l[n]),store:t.store})}};var bn=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(n=>n.type===t);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var or=b(Z(),1);var xn=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let n=[...this.callbacks];this.callbacks=[];let a=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),i=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let s of n)try{await s()}catch(l){a(l);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Sn=b(F(),1);var vn=class extends Sn.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let r={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return(0,Sn.adoptStyles)(n,t.elementStyles),n}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([r,n])=>this.defineScopedElement(r,n))}static defineScopedElement(t,r){Xa(t)(r),this.canDefineScopedElement(t)&&this.registry.define(t,r)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,r){this.scopedRegistryConstructor.defineScopedElement(t,r)}};function tc(e,t,...r){var n;let a=e.querySelector(t);for(let i of r)a=(n=a?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return a}var Br=function(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},ac,rc=Symbol("constructorPrototype"),oc=Symbol("constructorName"),ic=Symbol("exportpartsDebouncer"),nc=Symbol("dynamicDependenciesLoaded"),Ur=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};Ur.eventName="exportparts-updated";var ht=class extends vn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[ac]=new xn(5),this.scheduleExportpartsUpdate=()=>{var t,r,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[ic].run(()=>{var a,i;!((a=this.exportpartsPrefix)===null||a===void 0)&&a.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[oc]=this.constructor.name,this[rc]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[oc]&&Object.setPrototypeOf(this,this[rc])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let r=this.constructor;r[nc]||(r[nc]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Ur.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Ur.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new Ur)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:a}=this.elementToFocus;if(n!=null){let i=[...a??[],n];r=tc(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,a;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}setExportpartsAttribute(t){var r,n,a,i,s,l;let u=x=>x!=null&&x.trim().length>0,m=t.filter(u).map(x=>x.trim());if(m.length===0){this.exportparts=void 0;return}let h=new Set;for(let x of(i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&i!==void 0?i:[]){let v=(s=(n=x.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&s!==void 0?s:[],O=(l=(a=x.getAttribute("exportparts"))===null||a===void 0?void 0:a.split(",").map(w=>w.split(":")[1]))!==null&&l!==void 0?l:[],_=[...v,...O].filter(u).map(w=>w.trim());for(let w of _)h.add(w)}if(h.size===0){this.exportparts=void 0;return}let g=[...h.values()].flatMap(x=>m.map(v=>`${x}:${v}--${x}`));this.exportparts=[...this.part,...g].join(", ")}};ac=ic;Br([(0,or.property)()],ht.prototype,"exportpartsPrefix",void 0);Br([Js([])],ht.prototype,"exportpartsPrefixes",void 0);Br([(0,or.property)({reflect:!0})],ht.prototype,"exportparts",void 0);Br([(0,or.property)()],ht.prototype,"customStylesheet",void 0);Br([(0,or.property)()],ht.prototype,"elementToFocus",void 0);Br([(0,or.state)()],ht.prototype,"useAdoptedStyleSheets",void 0);function Cn(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Ao=Symbol("internalReduxEventsUnsubscribers"),Ft=Symbol("internalStoresUnsubscribers"),nr=Symbol("internalStores"),xu=yn(Symbol("withRedux"),function(e){var t,r,n;class a extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(l=>s.has(l))&&this.updateFromStores()}getUnnamedStore(){if(this[nr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[nr].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[nr].get(s)}addStore(s,l){var u;l=(u=l??s.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(l),this[nr].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[nr].delete(l)}setupStores(){this.unsubscribeFromStores(),this[nr].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let u=this.constructor.getPropertyOptions(l);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:l)){let m=this.getStore(s.store);m&&(s.store?this[Ft].has(s.store):this[Ft].size>0)&&(this[l]=s.selector(m.getState(),this))}})}subscribeToStore(s,l){var u,m;this[Ft].set(s,l.subscribe(()=>this.updateFromStores())),this[Ao].set(s,[]),Cn(l)&&(!((u=l.deprecatedKeys)===null||u===void 0)&&u.length&&this.reduxConstructor.reduxProperties.forEach((h,g)=>{this.getStore(h.store)===l&&l.deprecatedKeys.includes(g)&&console.warn("Element",this,"is subscribed to deprecated key",g,"in store",l.name)}),l.eventBus&&((m=this.reduxConstructor.reduxEventListeners)===null||m===void 0||m.forEach((h,g)=>{if(typeof this[g]=="function"&&(!h.store||l.name===h.store)){let x=v=>this[g](v);l.addEventListener(h.eventName,x),this[Ao].get(s).push(()=>l.removeEventListener(h.eventName,x))}}))),this.onStoreAvailable(s)}unsubscribeFromStores(){this[Ft].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[Ft].has(s)&&this[Ft].get(s)(),this[Ft].delete(s),(l=this[Ao].get(s))===null||l===void 0||l.forEach(u=>u()),this[Ao].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=Ft,r=nr,n=Ao,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),sc=class extends xu(ht){};function ve(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var vu=typeof Symbol=="function"&&Symbol.observable||"@@observable",cc=vu,Ja=()=>Math.random().toString(36).substring(7).split("").join("."),Su={INIT:`@@redux/INIT${Ja()}`,REPLACE:`@@redux/REPLACE${Ja()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Ja()}`},En=Su;function Ln(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function ei(e,t,r){if(typeof e!="function")throw new Error(ve(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(ve(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(ve(1));return r(ei)(e,t)}let n=e,a=t,i=new Map,s=i,l=0,u=!1;function m(){s===i&&(s=new Map,i.forEach((w,M)=>{s.set(M,w)}))}function h(){if(u)throw new Error(ve(3));return a}function g(w){if(typeof w!="function")throw new Error(ve(4));if(u)throw new Error(ve(5));let M=!0;m();let D=l++;return s.set(D,w),function(){if(M){if(u)throw new Error(ve(6));M=!1,m(),s.delete(D),i=null}}}function x(w){if(!Ln(w))throw new Error(ve(7));if(typeof w.type>"u")throw new Error(ve(8));if(typeof w.type!="string")throw new Error(ve(17));if(u)throw new Error(ve(9));try{u=!0,a=n(a,w)}finally{u=!1}return(i=s).forEach(D=>{D()}),w}function v(w){if(typeof w!="function")throw new Error(ve(10));n=w,x({type:En.REPLACE})}function O(){let w=g;return{subscribe(M){if(typeof M!="object"||M===null)throw new Error(ve(11));function D(){let k=M;k.next&&k.next(h())}return D(),{unsubscribe:w(D)}},[cc](){return this}}}return x({type:En.INIT}),{dispatch:x,subscribe:g,getState:h,replaceReducer:v,[cc]:O}}function Cu(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:En.INIT})>"u")throw new Error(ve(12));if(typeof r(void 0,{type:En.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ve(13))})}function ti(e){let t=Object.keys(e),r={};for(let s=0;s<t.length;s++){let l=t[s];typeof e[l]=="function"&&(r[l]=e[l])}let n=Object.keys(r),a,i;try{Cu(r)}catch(s){i=s}return function(l={},u){if(i)throw i;let m=!1,h={};for(let g=0;g<n.length;g++){let x=n[g],v=r[x],O=l[x],_=v(O,u);if(typeof _>"u"){let w=u&&u.type;throw new Error(ve(14))}h[x]=_,m=m||_!==O}return m=m||n.length!==Object.keys(l).length,m?h:l}}function Oo(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function lc(...e){return t=>(r,n)=>{let a=t(r,n),i=()=>{throw new Error(ve(15))},s={getState:a.getState,dispatch:(u,...m)=>i(u,...m)},l=e.map(u=>u(s));return i=Oo(...l)(a.dispatch),{...a,dispatch:i}}}function dc(e){return Ln(e)&&"type"in e&&typeof e.type=="string"}var xc=Symbol.for("immer-nothing"),uc=Symbol.for("immer-draftable"),we=Symbol.for("immer-state");function it(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Pe=Object,Gr=Pe.getPrototypeOf,Rn="constructor",kn="prototype",ai="configurable",_n="enumerable",On="writable",wo="value",gt=e=>!!e&&!!e[we];function De(e){return e?vc(e)||Pn(e)||!!e[uc]||!!e[Rn]?.[uc]||Dn(e)||Io(e):!1}var Eu=Pe[kn][Rn].toString(),fc=new WeakMap;function vc(e){if(!e||!pi(e))return!1;let t=Gr(e);if(t===null||t===Pe[kn])return!0;let r=Pe.hasOwnProperty.call(t,Rn)&&t[Rn];if(r===Object)return!0;if(!Hr(r))return!1;let n=fc.get(r);return n===void 0&&(n=Function.toString.call(r),fc.set(r,n)),n===Eu}function Tn(e,t,r=!0){zo(e)===0?(r?Reflect.ownKeys(e):Pe.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((n,a)=>t(a,n,e))}function zo(e){let t=e[we];return t?t.type_:Pn(e)?1:Dn(e)?2:Io(e)?3:0}var ri=(e,t,r=zo(e))=>r===2?e.has(t):Pe[kn].hasOwnProperty.call(e,t),ii=(e,t,r=zo(e))=>r===2?e.get(t):e[t],zn=(e,t,r,n=zo(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function Lu(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Pn=Array.isArray,Dn=e=>e instanceof Map,Io=e=>e instanceof Set,pi=e=>typeof e=="object",Hr=e=>typeof e=="function",oi=e=>typeof e=="boolean";function Au(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var At=e=>e.copy_||e.base_;var mi=e=>e.modified_?e.copy_:e.base_;function si(e,t){if(Dn(e))return new Map(e);if(Io(e))return new Set(e);if(Pn(e))return Array[kn].slice.call(e);let r=vc(e);if(t===!0||t==="class_only"&&!r){let n=Pe.getOwnPropertyDescriptors(e);delete n[we];let a=Reflect.ownKeys(n);for(let i=0;i<a.length;i++){let s=a[i],l=n[s];l[On]===!1&&(l[On]=!0,l[ai]=!0),(l.get||l.set)&&(n[s]={[ai]:!0,[On]:!0,[_n]:l[_n],[wo]:e[s]})}return Pe.create(Gr(e),n)}else{let n=Gr(e);if(n!==null&&r)return{...e};let a=Pe.create(n);return Pe.assign(a,e)}}function Fn(e,t=!1){return $n(e)||gt(e)||!De(e)||(zo(e)>1&&Pe.defineProperties(e,{set:An,add:An,clear:An,delete:An}),Pe.freeze(e),t&&Tn(e,(r,n)=>{Fn(n,!0)},!1)),e}function Ou(){it(2)}var An={[wo]:Ou};function $n(e){return e===null||!pi(e)?!0:Pe.isFrozen(e)}var In="MapSet",ci="Patches",pc="ArrayMethods",Sc={};function ar(e){let t=Sc[e];return t||it(0,e),t}var mc=e=>!!Sc[e];var Ro,Cc=()=>Ro,wu=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:mc(In)?ar(In):void 0,arrayMethodsPlugin_:mc(pc)?ar(pc):void 0});function hc(e,t){t&&(e.patchPlugin_=ar(ci),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function li(e){di(e),e.drafts_.forEach(Ru),e.drafts_=null}function di(e){e===Ro&&(Ro=e.parent_)}var gc=e=>Ro=wu(Ro,e);function Ru(e){let t=e[we];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function yc(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(e!==void 0&&e!==r){r[we].modified_&&(li(t),it(4)),De(e)&&(e=bc(t,e));let{patchPlugin_:a}=t;a&&a.generateReplacementPatches_(r[we].base_,e,t)}else e=bc(t,r);return _u(t,e,!0),li(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==xc?e:void 0}function bc(e,t){if($n(t))return t;let r=t[we];if(!r)return Nn(t,e.handledSet_,e);if(!Un(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);Ac(r,e)}return r.copy_}function _u(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Fn(t,r)}function Ec(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Un=(e,t)=>e.scope_===t,zu=[];function Lc(e,t,r,n){let a=At(e),i=e.type_;if(n!==void 0&&ii(a,n,i)===t){zn(a,n,r,i);return}if(!e.draftLocations_){let l=e.draftLocations_=new Map;Tn(a,(u,m)=>{if(gt(m)){let h=l.get(m)||[];h.push(u),l.set(m,h)}})}let s=e.draftLocations_.get(t)??zu;for(let l of s)zn(a,l,r,i)}function Iu(e,t,r){e.callbacks_.push(function(a){let i=t;if(!i||!Un(i,a))return;a.mapSetPlugin_?.fixSetContents(i);let s=mi(i);Lc(e,i.draft_??i,s,r),Ac(i,a)})}function Ac(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let a=n.getPath(e);a&&n.generatePatches_(e,a,t)}Ec(e)}}function Nu(e,t,r){let{scope_:n}=e;if(gt(r)){let a=r[we];Un(a,n)&&a.callbacks_.push(function(){wn(e);let s=mi(a);Lc(e,r,s,t)})}else De(r)&&e.callbacks_.push(function(){let i=At(e);e.type_===3?i.has(r)&&Nn(r,n.handledSet_,n):ii(i,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Nn(ii(e.copy_,t,e.type_),n.handledSet_,n)})}function Nn(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||gt(e)||t.has(e)||!De(e)||$n(e)||(t.add(e),Tn(e,(n,a)=>{if(gt(a)){let i=a[we];if(Un(i,r)){let s=mi(i);zn(e,n,s,e.type_),Ec(i)}}else De(a)&&Nn(a,t,r)})),e}function Mu(e,t){let r=Pn(e),n={type_:r?1:0,scope_:t?t.scope_:Cc(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},a=n,i=Mn;r&&(a=[n],i=_o);let{revoke:s,proxy:l}=Proxy.revocable(a,i);return n.draft_=l,n.revoke_=s,[l,n]}var Mn={get(e,t){if(t===we)return e;let r=e.scope_.arrayMethodsPlugin_,n=e.type_===1&&typeof t=="string";if(n&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);let a=At(e);if(!ri(a,t,e.type_))return Tu(e,a,t);let i=a[t];if(e.finalized_||!De(i)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&Au(t))return i;if(i===ni(e.base_,t)||ku(e,t,i)){wn(e);let s=e.type_===1?+t:t,l=fi(e.scope_,i,e,s);return e.copy_[s]=l}return i},has(e,t){return t in At(e)},ownKeys(e){return Reflect.ownKeys(At(e))},set(e,t,r){let n=Oc(At(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let a=ni(At(e),t),i=a?.[we];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_.delete(t),!0;if(Lu(r,a)&&(r!==void 0||ri(e.base_,t,e.type_)))return!0;wn(e),ui(e)}return e.copy_[t]===r&&(r!==void 0||ri(e.copy_,t,e.type_))||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),Nu(e,t,r)),!0},deleteProperty(e,t){return wn(e),ni(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),ui(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=At(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[On]:!0,[ai]:e.type_!==1||t!=="length",[_n]:n[_n],[wo]:r[t]}},defineProperty(){it(11)},getPrototypeOf(e){return Gr(e.base_)},setPrototypeOf(){it(12)}},_o={};for(let e in Mn){let t=Mn[e];_o[e]=function(){let r=arguments;return r[0]=r[0][0],t.apply(this,r)}}_o.deleteProperty=function(e,t){return _o.set.call(this,e,t,void 0)};_o.set=function(e,t,r){return Mn.set.call(this,e[0],t,r,e[0])};function ni(e,t){let r=e[we];return(r?At(r):e)[t]}function ku(e,t,r){return e.type_!==1||!e.allIndicesReassigned_||!De(r)||r[we]?!1:e.baseRefs_.has(r)}function Tu(e,t,r){let n=Oc(t,r);return n?wo in n?n[wo]:n.get?.call(e.draft_):void 0}function Oc(e,t){if(!(t in e))return;let r=Gr(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Gr(r)}}function ui(e){e.modified_||(e.modified_=!0,e.parent_&&ui(e.parent_))}function wn(e){e.copy_||(e.assigned_=new Map,e.copy_=si(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Pu=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(Hr(t)&&!Hr(r)){let i=r;r=t;let s=this;return function(u=i,...m){return s.produce(u,h=>r.call(this,h,...m))}}Hr(r)||it(6),n!==void 0&&!Hr(n)&&it(7);let a;if(De(t)){let i=gc(this),s=fi(i,t,void 0),l=!0;try{a=r(s),l=!1}finally{l?li(i):di(i)}return hc(i,n),yc(a,i)}else if(!t||!pi(t)){if(a=r(t),a===void 0&&(a=t),a===xc&&(a=void 0),this.autoFreeze_&&Fn(a,!0),n){let i=[],s=[];ar(ci).generateReplacementPatches_(t,a,{patches_:i,inversePatches_:s}),n(i,s)}return a}else it(1,t)},this.produceWithPatches=(t,r)=>{if(Hr(t))return(s,...l)=>this.produceWithPatches(s,u=>t(u,...l));let n,a;return[this.produce(t,r,(s,l)=>{n=s,a=l}),n,a]},oi(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),oi(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),oi(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){De(e)||it(8),gt(e)&&(e=wc(e));let t=gc(this),r=fi(t,e,void 0);return r[we].isManual_=!0,di(t),r}finishDraft(e,t){let r=e&&e[we];(!r||!r.isManual_)&&it(9);let{scope_:n}=r;return hc(n,t),yc(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let a=t[r];if(a.path.length===0&&a.op==="replace"){e=a.value;break}}r>-1&&(t=t.slice(r+1));let n=ar(ci).applyPatches_;return gt(e)?n(e,t):this.produce(e,a=>n(a,t))}};function fi(e,t,r,n){let[a,i]=Dn(t)?ar(In).proxyMap_(t,r):Io(t)?ar(In).proxySet_(t,r):Mu(t,r);return(r?.scope_??Cc()).drafts_.push(a),i.callbacks_=r?.callbacks_??[],i.key_=n,r&&n!==void 0?Iu(r,i,n):i.callbacks_.push(function(u){u.mapSetPlugin_?.fixSetContents(i);let{patchPlugin_:m}=u;i.modified_&&m&&m.generatePatches_(i,[],u)}),a}function wc(e){return gt(e)||it(10,e),Rc(e)}function Rc(e){if(!De(e)||$n(e))return e;let t=e[we],r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=si(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=si(e,!0);let a=r;return Io(r)&&(r=new Set),Tn(a,(i,s)=>{zn(r,i,Rc(s))},n),t&&(t.finalized_=!1),r}var Du=globalThis.Iterator,f8=typeof Du?.from=="function";var Fu=new Pu,hi=Fu.produce;function _c(e){return({dispatch:r,getState:n})=>a=>i=>typeof i=="function"?i(r,n,e):a(i)}var zc=_c(),Ic=_c;var $u=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Oo:Oo.apply(null,arguments)};typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var Uu=e=>e&&typeof e.match=="function";function $t(e,t){function r(...n){if(t){let a=t(...n);if(!a)throw new Error(yt(0));return{type:e,payload:a.payload,..."meta"in a&&{meta:a.meta},..."error"in a&&{error:a.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>dc(n)&&n.type===e,r}var Pc=class No extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,No.prototype)}static get[Symbol.species](){return No}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new No(...t[0].concat(this)):new No(...t.concat(this))}};function Nc(e){return De(e)?hi(e,()=>{}):e}function Bn(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function Bu(e){return typeof e=="boolean"}var Hu=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:a=!0,actionCreatorCheck:i=!0}=t??{},s=new Pc;return r&&(Bu(r)?s.push(zc):s.push(Ic(r.extraArgument))),s},Gu="RTK_autoBatch";var Mc=e=>t=>{setTimeout(t,e)},Wu=(e,t)=>r=>{let n=!1,a,i,s=()=>{n||(n=!0,cancelAnimationFrame(a),clearTimeout(i),r())};a=e(s),i=setTimeout(s,t)},Vu=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),a=!0,i=!1,s=!1,l=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?Wu(window.requestAnimationFrame,100):Mc(10):e.type==="callback"?e.queueNotification:Mc(e.timeout),m=()=>{s=!1,i&&(i=!1,l.forEach(h=>h()))};return Object.assign({},n,{subscribe(h){let g=()=>a&&h(),x=n.subscribe(g);return l.add(h),()=>{x(),l.delete(h)}},dispatch(h){try{return a=!h?.meta?.[Gu],i=!a,i&&(s||(s=!0,u(m))),n.dispatch(h)}finally{a=!0}}})},ju=e=>function(r){let{autoBatch:n=!0}=r??{},a=new Pc(e);return n&&a.push(Vu(typeof n=="object"?n:void 0)),a};function Dc(e){let t=Hu(),{reducer:r=void 0,middleware:n,devTools:a=!0,duplicateMiddlewareCheck:i=!0,preloadedState:s=void 0,enhancers:l=void 0}=e||{},u;if(typeof r=="function")u=r;else if(Ln(r))u=ti(r);else throw new Error(yt(1));let m;typeof n=="function"?m=n(t):m=t();let h=Oo;a&&(h=$u({trace:!1,...typeof a=="object"&&a}));let g=lc(...m),x=ju(g),v=typeof l=="function"?l(x):x(),O=h(...v);return ei(u,s,O)}function Fc(e){let t={},r=[],n,a={addCase(i,s){let l=typeof i=="string"?i:i.type;if(!l)throw new Error(yt(28));if(l in t)throw new Error(yt(29));return t[l]=s,a},addAsyncThunk(i,s){return s.pending&&(t[i.pending.type]=s.pending),s.rejected&&(t[i.rejected.type]=s.rejected),s.fulfilled&&(t[i.fulfilled.type]=s.fulfilled),s.settled&&r.push({matcher:i.settled,reducer:s.settled}),a},addMatcher(i,s){return r.push({matcher:i,reducer:s}),a},addDefaultCase(i){return n=i,a}};return e(a),[t,r,n]}function Ku(e){return typeof e=="function"}function Zu(e,t){let[r,n,a]=Fc(t),i;if(Ku(e))i=()=>Nc(e());else{let l=Nc(e);i=()=>l}function s(l=i(),u){let m=[r[u.type],...n.filter(({matcher:h})=>h(u)).map(({reducer:h})=>h)];return m.filter(h=>!!h).length===0&&(m=[a]),m.reduce((h,g)=>{if(g)if(gt(h)){let x=g(h,u);return x===void 0?h:x}else{if(De(h))return hi(h,x=>g(x,u));{let x=g(h,u);if(x===void 0){if(h===null)return h;throw new Error(yt(9))}return x}}return h},l)}return s.getInitialState=i,s}var qu=(e,t)=>Uu(e)?e.match(t):e(t);function Yu(...e){return t=>e.some(r=>qu(r,t))}var Xu="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Qu=(e=21)=>{let t="",r=e;for(;r--;)t+=Xu[Math.random()*64|0];return t},Ju=["name","message","stack","code"],gi=class{payload;meta;_type;constructor(e,t){this.payload=e,this.meta=t}},kc=class{payload;meta;_type;constructor(e,t){this.payload=e,this.meta=t}},ef=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of Ju)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},Tc="External signal was aborted",tf=(()=>{function e(t,r,n){let a=$t(t+"/fulfilled",(u,m,h,g)=>({payload:u,meta:{...g||{},arg:h,requestId:m,requestStatus:"fulfilled"}})),i=$t(t+"/pending",(u,m,h)=>({payload:void 0,meta:{...h||{},arg:m,requestId:u,requestStatus:"pending"}})),s=$t(t+"/rejected",(u,m,h,g,x)=>({payload:g,error:(n&&n.serializeError||ef)(u||"Rejected"),meta:{...x||{},arg:h,requestId:m,rejectedWithValue:g!==void 0,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"}}));function l(u,{signal:m}={}){return(h,g,x)=>{let v=n?.idGenerator?n.idGenerator(u):Qu(),O=new AbortController,_,w;function M(z){w=z,O.abort()}m&&(m.aborted?M(Tc):m.addEventListener("abort",()=>M(Tc),{once:!0}));let D=(async function(){let z;try{let k=n?.condition?.(u,{getState:g,extra:x});if(of(k)&&(k=await k),k===!1)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};if(O.signal.aborted)throw{name:"AbortError",message:w||"Aborted"};let B=new Promise((G,ce)=>{_=()=>{ce({name:"AbortError",message:w||"Aborted"})},O.signal.addEventListener("abort",_,{once:!0})});h(i(v,u,n?.getPendingMeta?.({requestId:v,arg:u},{getState:g,extra:x}))),z=await Promise.race([B,Promise.resolve(r(u,{dispatch:h,getState:g,extra:x,requestId:v,signal:O.signal,abort:M,rejectWithValue:((G,ce)=>new gi(G,ce)),fulfillWithValue:((G,ce)=>new kc(G,ce))})).then(G=>{if(G instanceof gi)throw G;return G instanceof kc?a(G.payload,v,u,G.meta):a(G,v,u)})])}catch(k){z=k instanceof gi?s(null,v,u,k.payload,k.meta):s(k,v,u)}finally{_&&O.signal.removeEventListener("abort",_)}return n&&!n.dispatchConditionRejection&&s.match(z)&&z.meta.condition||h(z),z})();return Object.assign(D,{abort:M,requestId:v,arg:u,unwrap(){return D.then(rf)}})}}return Object.assign(l,{pending:i,rejected:s,fulfilled:a,settled:Yu(s,a),typePrefix:t})}return e.withTypes=()=>e,e})();function rf(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function of(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var $c=Symbol.for("rtk-slice-createasyncthunk"),v8={[$c]:tf};function nf(e,t){return`${e}/${t}`}function af({creators:e}={}){let t=e?.asyncThunk?.[$c];return function(n){let{name:a,reducerPath:i=a}=n;if(!a)throw new Error(yt(11));typeof process<"u";let s=(typeof n.reducers=="function"?n.reducers(cf()):n.reducers)||{},l=Object.keys(s),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},m={addCase(z,k){let B=typeof z=="string"?z:z.type;if(!B)throw new Error(yt(12));if(B in u.sliceCaseReducersByType)throw new Error(yt(13));return u.sliceCaseReducersByType[B]=k,m},addMatcher(z,k){return u.sliceMatchers.push({matcher:z,reducer:k}),m},exposeAction(z,k){return u.actionCreators[z]=k,m},exposeCaseReducer(z,k){return u.sliceCaseReducersByName[z]=k,m}};l.forEach(z=>{let k=s[z],B={reducerName:z,type:nf(a,z),createNotation:typeof n.reducers=="function"};df(k)?ff(B,k,m,t):lf(B,k,m)});function h(){let[z={},k=[],B=void 0]=typeof n.extraReducers=="function"?Fc(n.extraReducers):[n.extraReducers],G={...z,...u.sliceCaseReducersByType};return Zu(n.initialState,ce=>{for(let ue in G)ce.addCase(ue,G[ue]);for(let ue of u.sliceMatchers)ce.addMatcher(ue.matcher,ue.reducer);for(let ue of k)ce.addMatcher(ue.matcher,ue.reducer);B&&ce.addDefaultCase(B)})}let g=z=>z,x=new Map,v=new WeakMap,O;function _(z,k){return O||(O=h()),O(z,k)}function w(){return O||(O=h()),O.getInitialState()}function M(z,k=!1){function B(ce){let ue=ce[z];return typeof ue>"u"&&k&&(ue=Bn(v,B,w)),ue}function G(ce=g){return Bn(Bn(x,k,()=>new WeakMap),ce,()=>{let ue={};for(let[Dr,Ze]of Object.entries(n.selectors??{}))ue[Dr]=sf(Ze,ce,()=>Bn(v,ce,w),k);return ue})}return{reducerPath:z,getSelectors:G,get selectors(){return G(B)},selectSlice:B}}let D={name:a,reducer:_,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:w,...M(i),injectInto(z,{reducerPath:k,...B}={}){let G=k??i;return z.inject({reducerPath:G,reducer:_},B),{...D,...M(G,!0)}}};return D}}function sf(e,t,r,n){function a(i,...s){let l=t(i);return typeof l>"u"&&n&&(l=r()),e(l,...s)}return a.unwrapped=e,a}var Uc=af();function cf(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function lf({type:e,reducerName:t,createNotation:r},n,a){let i,s;if("reducer"in n){if(r&&!uf(n))throw new Error(yt(17));i=n.reducer,s=n.prepare}else i=n;a.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,s?$t(e,s):$t(e))}function df(e){return e._reducerDefinitionType==="asyncThunk"}function uf(e){return e._reducerDefinitionType==="reducerWithPrepare"}function ff({type:e,reducerName:t},r,n,a){if(!a)throw new Error(yt(18));let{payloadCreator:i,fulfilled:s,pending:l,rejected:u,settled:m,options:h}=r,g=a(e,i,h);n.exposeAction(t,g),s&&n.addCase(g.fulfilled,s),l&&n.addCase(g.pending,l),u&&n.addCase(g.rejected,u),m&&n.addMatcher(g.settled,m),n.exposeCaseReducer(t,{fulfilled:s||Hn,pending:l||Hn,rejected:u||Hn,settled:m||Hn})}function Hn(){}var Bc="listener",Hc="completed",Gc="cancelled",S8=`task-${Gc}`,C8=`task-${Hc}`,E8=`${Bc}-${Gc}`,L8=`${Bc}-${Hc}`;var{assign:Wc}=Object;var yi="listenerMiddleware";var pf=Wc($t(`${yi}/add`),{withTypes:()=>pf}),A8=$t(`${yi}/removeAll`),mf=Wc($t(`${yi}/remove`),{withTypes:()=>mf});function yt(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var hf=yn(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,a){this.eventBus.addEventListener(r,n,a)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,a){this.eventBus.removeEventListener(r,n,a)}}}),Gn=class extends hf(Object){};window.ftReduxStores||(window.ftReduxStores={});var Vc=class e extends Gn{static get(t){var r;let n=typeof t=="string"?t:t.name,a=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(Cn(i))return i;if(a==null)return;let s=Uc({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),l=Dc({reducer:(u,m)=>{if(m.type==="CLEAR_FT_REDUX_STORE"){let h=Eo(s.getInitialState());for(let g of m.keeping)h[g]=(u??h)[g];return h}else if(typeof m.type=="string"&&m.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...u,...m.overwrites};return s.reducer(u,m)}});return window.ftReduxStores[a.name]=new e(s,l,a.eventBus,a.deprecatedKeys)}constructor(t,r,n,a){super(),this.reduxSlice=t,this.reduxStore=r,this.deprecatedKeys=a,this.isFtReduxStore=!0,this.commands=new bn,this.injectInto=(s,l)=>this.reduxSlice.injectInto(s,l),this.selectSlice=s=>this.reduxSlice.selectSlice(s);let i=s=>s!=null?JSON.parse(JSON.stringify(s)):s;this.actions=new Proxy(this.reduxSlice.actions,{get:(s,l,u)=>{let m=l,h=s[m];return h?(...g)=>{let x=h(...g.map(i));return this.reduxStore.dispatch(x),x}:g=>{let x=m,v=this.getState()[x];$r(v,g)||this.setState({[x]:i(g)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};var Wn=class{static format(t,r,n,a,i){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(n,a,!!i)):this.getIntlDateTime(t,r,n,a,!!i)}static getMomentDateFormat(t,r,n){return n?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,n,a,i){let s=typeof t=="string"?new Date(t):t,l=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(s),u=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return i?u:a?`${l} ${u}`:l}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var Vn=b(R()),gf="ft-app-info",ir=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};ir.eventName="authentication-change";var Mo=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Mo.eventName="ui-locale-changed";var yf={session:(e,t)=>{(0,Vn.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>U.dispatchEvent(new ir(t.payload)),0))}},U=Vn.FtReduxStore.get({name:gf,reducers:yf,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,noCustomCode:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1,stickyFilters:void 0}});var jc=b(R()),jn=function(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},th=(0,jc.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(U)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var a,i;return((i=(a=this.metadataDescriptors.find(l=>l.key===n))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?l=>Wn.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return jn([(0,bi.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),jn([(0,bi.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),jn([Qa({store:U.name,selector:r=>{var n,a;return(a=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]}})],t.prototype,"metadataDescriptors",void 0),jn([Qa({store:U.name})],t.prototype,"uiLocale",void 0),t});var Kc;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(Kc||(Kc={}));var Zc;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(Zc||(Zc={}));var qc;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(qc||(qc={}));var Yc;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(Yc||(Yc={}));var Xc;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Xc||(Xc={}));var Qc;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(Qc||(Qc={}));var Jc;(function(e){e.PUBLISHED="PUBLISHED",e.AI="AI"})(Jc||(Jc={}));var el;(function(e){e.BOOKMARK__CREATE="BOOKMARK__CREATE",e.BOOKMARK__DELETE="BOOKMARK__DELETE",e.CASE_DEFLECTION__START="CASE_DEFLECTION__START",e.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",e.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",e.CHATBOT__RATE="CHATBOT__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",e.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",e.DOCUMENT__PRINT="DOCUMENT__PRINT",e.DOCUMENT__PROCESS="DOCUMENT__PROCESS",e.DOCUMENT__RATE="DOCUMENT__RATE",e.DOCUMENT__SEARCH="DOCUMENT__SEARCH",e.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",e.DOCUMENT__UNRATE="DOCUMENT__UNRATE",e.FEEDBACK__SEND="FEEDBACK__SEND",e.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",e.KHUB__PROCESS="KHUB__PROCESS",e.KHUB__SEARCH="KHUB__SEARCH",e.LABELS__DOWNLOAD="LABELS__DOWNLOAD",e.LINK__SHARE="LINK__SHARE",e.PAGE__DISPLAY="PAGE__DISPLAY",e.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",e.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",e.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",e.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",e.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",e.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",e.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",e.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",e.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",e.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",e.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",e.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",e.TOPIC__RATE="TOPIC__RATE",e.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",e.TOPIC__UNRATE="TOPIC__UNRATE",e.USER__LOGIN="USER__LOGIN",e.USER__LOGOUT="USER__LOGOUT",e.HEARTBEAT="HEARTBEAT"})(el||(el={}));var tl;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(tl||(tl={}));var rl;(function(e){e.METADATA_FILTER="METADATA_FILTER",e.ACCESS_RIGHTS_FILTER="ACCESS_RIGHTS_FILTER"})(rl||(rl={}));var ol;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER",e.DOC_DIFF="DOC_DIFF"})(ol||(ol={}));var nl;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",e.LINK_PREVIEW="LINK_PREVIEW",e.UD_VIEWER="UD_VIEWER",e.ASSET_VIEWER="ASSET_VIEWER"})(nl||(nl={}));var al;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(al||(al={}));var il;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(il||(il={}));var sl;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(sl||(sl={}));var cl;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(cl||(cl={}));var ll;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(ll||(ll={}));var dl;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(dl||(dl={}));var ul;(function(e){e.ASC="ASC",e.DESC="DESC"})(ul||(ul={}));var fl;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(fl||(fl={}));var pl;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(pl||(pl={}));var ml;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(ml||(ml={}));var hl;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(hl||(hl={}));var gl;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(gl||(gl={}));var yl;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(yl||(yl={}));var bl;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(bl||(bl={}));var xl;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(xl||(xl={}));var vl;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(vl||(vl={}));var fe;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(fe||(fe={}));var qe;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(qe||(qe={}));var Sl;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(Sl||(Sl={}));var Cl;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(Cl||(Cl={}));var El;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(El||(El={}));var Ll;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Ll||(Ll={}));var Al;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Al||(Al={}));var Ol;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.DOCUMENTATION="DOCUMENTATION",e.OTHER="OTHER"})(Ol||(Ol={}));var wl;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(wl||(wl={}));var Rl;(function(e){e.CHAT="CHAT",e.COMPLETION="COMPLETION",e.RAG="RAG",e.AGENT="AGENT"})(Rl||(Rl={}));var _l;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(_l||(_l={}));var zl;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(zl||(zl={}));var Il;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(Il||(Il={}));var Nl;(function(e){e.SOURCES="SOURCES",e.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",e.VOCABULARIES="VOCABULARIES",e.METADATA="METADATA",e.PRETTY_URL="PRETTY_URL",e.ACCESS_RULE="ACCESS_RULE",e.DESIGNED_PAGES="DESIGNED_PAGES",e.THEME_STUDIO="THEME_STUDIO",e.PORTAL_GENERAL="PORTAL_GENERAL",e.ASSETS="ASSETS",e.CODE_LIBRARY="CODE_LIBRARY",e.THEME="THEME",e.CONTENT_STYLES="CONTENT_STYLES",e.HOMEPAGE="HOMEPAGE",e.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",e.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",e.PORTAL_METADATA="PORTAL_METADATA",e.LANGUAGES="LANGUAGES",e.PRINT_TEMPLATES="PRINT_TEMPLATES",e.OFFLINE="OFFLINE",e.CUSTOM_JS="CUSTOM_JS",e.CONFIDENTIALITY="CONFIDENTIALITY",e.NOTIFICATIONS="NOTIFICATIONS"})(Nl||(Nl={}));var Ml;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Ml||(Ml={}));var bf={[fe.PERSONAL_BOOK_SHARE_USER]:[fe.PERSONAL_BOOK_USER],[fe.HTML_EXPORT_USER]:[fe.PERSONAL_BOOK_USER],[fe.PDF_EXPORT_USER]:[fe.PERSONAL_BOOK_USER],[fe.KHUB_ADMIN]:[fe.CONTENT_PUBLISHER],[fe.ADMIN]:[fe.KHUB_ADMIN,fe.USERS_ADMIN,fe.PORTAL_ADMIN,fe.BEHAVIOR_DATA_USER],[fe.GENERATIVE_AI_EXPORT_USER]:[fe.GENERATIVE_AI_USER]};function kl(e,t){return e===t||(bf[e]??[]).some(r=>kl(r,t))}function xi(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(n=>kl(n,t))}function Tl(e,...t){return e==null?!1:t.some(r=>xi(e,r))}var Xn=b(R());var vi=b(R());var sr=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=U.getState(),a=t??n;if(r&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,a,!0)}static await(t){return new Promise(r=>{let n=e.get(t);if(n)r(n);else{let a=U.subscribe(()=>{n=e.get(t),n&&(a(),r(n))})}})}};var Wr=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:sr.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):sr.await()}};var Fe=class extends Wr{constructor(t=!0,r){var n;super(r),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[u])=>l.localeCompare(u)));let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new vi.CacheRegistry,this.cache=t?a.commonCache:new vi.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var Kn=class extends Fe{async listMySearches(){let{session:t}=U.getState();return xi(t,fe.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var Zn=class extends Fe{async listMyBookmarks(){let t=U.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var qn=class extends Fe{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=U.getState().session;return!!t?.sessionAuthenticated}};var Yn=class extends Fe{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=U.getState().session;return!!t?.sessionAuthenticated}};var xf="ft-user-assets",vf={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(qe).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:r,mapId:n,asset:a}=t.payload;Ci(e,r,[...Si(e,r),a]),Pl(e,r,1,n),Dl(e,a)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;Ci(e,r,Si(e,r).map(a=>a.id===n.id?n:a)),Dl(e,n)},removeAsset:(e,t)=>{let{assetType:r,mapId:n,assetId:a}=t.payload;Ci(e,r,Si(e,r).filter(i=>i.id!==a)),Pl(e,r,-1,n)}},Fl={[qe.SEARCHES]:"savedSearches",[qe.BOOKMARKS]:"bookmarks",[qe.BOOKS]:void 0,[qe.COLLECTIONS]:void 0},Si=(e,t)=>{var r;let n=Fl[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},Ci=(e,t,r)=>{let n=Fl[t];n&&(e[n]=r)},Pl=(e,t,r,n)=>{let a=e.assetCounts.allAsset[t];if(a!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,a+r),t===qe.BOOKMARKS&&n)){let i=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,i+r)}},Dl=(e,t)=>{let r=e.assetLabels.map(a=>a.title),n=t.labels.filter(a=>!r.includes(a)).map(a=>({title:a}));e.assetLabels.push(...n)},_e=Xn.FtReduxStore.get({name:xf,reducers:vf,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(qe).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Ei=class{constructor(t=new qn,r=new Yn){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=U.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Zn,this.savedSearchesService=new Kn,U.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=U.getState();(0,Xn.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),_e.actions.clearAssetCount(),_e.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),_e.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),_e.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();_e.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();_e.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&_e.getState().assetCounts.allAsset[t]!==r.count&&_e.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&_e.getState().assetCounts.bookmarkByMap[t]!==r.count&&_e.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(_e.getState().assetCounts.bookmarkByMap).length!==0;t===qe.BOOKMARKS&&r&&_e.actions.clearBookmarkCountByMap(),_e.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;_e.actions.bookmarks(r)}}},Sf=new Ei;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Sf);var Li=class{addCommand(t,r=!1){U.commands.add(t,r)}consumeCommand(t){return U.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Li;var Ye=b(R());var $l,Vr=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Cf=Symbol("clearAfterUnitTest"),Qn=class extends(0,Ye.withEventBus)(Fe){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[$l]=()=>{this.defaultMessages={},this.cache=new Ye.CacheRegistry,this.listeners={}},this.currentUiLocale=U.getState().uiLocale,U.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=U.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var n;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let a={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,Ye.deepEqual)(this.defaultMessages[t],a)||(this.defaultMessages[t]=a,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,n;return this.fetchContext(t),(n=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,r){let n=t.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(t,r,...n){var a;let i=t.toLowerCase(),s=this.resolveContext(i);return new Ye.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(r,...n)}async fetchContext(t){let r=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(a){!(a instanceof Ye.CanceledPromiseError)&&r&&console.error(a)}return n}subscribe(t,r){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(r),()=>{var a;return(a=this.listeners[t])===null||a===void 0?void 0:a.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new Vr({loadedContexts:t})),this.dispatchEvent(new Vr({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new Vr({loadedContexts:[t]})),this.dispatchEvent(new Vr({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,Ye.delay)(0).then(()=>n()).catch(()=>null)))}};$l=Cf;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Qn{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Qn{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var jr=window.FluidTopicsI18nService,Jn=window.FluidTopicsCustomI18nService;var Ul=b(R()),Ai=class{highlightHtml(t,r,n){(0,Ul.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new Ai;var Bl=b(R());var Oi=class{isDate(t){var r,n,a,i;return(i=(n=((a=(r=U.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&a!==void 0?a:[]).find(l=>l.key===t))===null||n===void 0?void 0:n.date)!==null&&i!==void 0?i:!1}format(t,r){var n,a,i,s;if(t==null)return"";try{return Bl.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:U.getState().uiLocale,(a=r?.longFormat)!==null&&a!==void 0?a:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(l){throw console.error(`Date ${JSON.stringify(t)} is not valid`,l),l}}};window.FluidTopicsDateService=new Oi;var Hl=b(R());var ko=class{static get(t,r,{baseUrl:n,localesConfiguration:a,availableContentLocales:i}=U.getState()){var s;if(r==="all"&&a?.allLanguagesAllowed)r=void 0;else if(!r||i.length>0&&!i.some(l=>l.lang===r)){let l=a?.defaultLocales.defaultContentLocale;r=l?`${l.lang}-${l.region}`:(s=i[0])===null||s===void 0?void 0:s.lang}return new Hl.SearchPlaceConverter(n,t??20,a?.allLanguagesAllowed,r,i)}};var wi=class{urlToSearchRequest(t){return ko.get().parse(t)}searchRequestToUrl(t){return ko.get().serialize(t)}};window.FluidTopicsUrlService=new wi;var Ot=b(R());var cr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{nextLocation:t}})}};cr.eventName="before-location-change";var lr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};lr.eventName="change";var Ri=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let r=sessionStorage.getItem(this.itemName(t));return r?JSON.parse(r):void 0}set(t,r){sessionStorage.setItem(this.itemName(t),JSON.stringify(r))}},Gl=new Ri;var ea=class e extends Ot.WithEventBus{static build(){return new e(window.history,Gl,()=>window.location,!1)}constructor(t,r,n,a){var i,s;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(s=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(t,r=!1){let n=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Ot.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new lr(this.currentItem())),0)}installProxies(){let t=r=>(n,a,[i,s,l])=>{let u=new URL(typeof l=="string"?l:(l??this.windowLocation()).href,window.location.origin!=="null"?window.location.origin:void 0),m=new cr(u);this.dispatchEvent(m);let h=r(),g={...h===this.currentIndex?this.currentState:void 0,...i,index:h,href:m.detail.nextLocation.href};n.apply(a,[g,s,g.href]),this.setCurrentState(g,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addBeforeLocationChangeListener(t){this.addEventListener(cr.eventName,t)}removeBeforeLocationChangeListener(t){this.removeEventListener(cr.eventName,t)}addHistoryChangeListener(t){this.addEventListener(lr.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(lr.eventName,t)}currentItem(){return(0,Ot.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,Ot.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,Ot.deepCopy)(r.find(n=>t(n)))}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,Ot.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let n=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!n)return t;let a=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var n;if(!this.hasState(t))return!1;let a=r??this.currentState.majorStateId,i=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=ea.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e),addBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(e),removeBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(e)});var Wl=b(F());var Vl=Wl.css`
|
|
2
2
|
`;var Zl=b(F()),ze=b(Z()),ur=b(R());var bt=b(R());function jl(e,t){let{authenticationRequired:r,session:n}=U.getState();return r&&!n?.sessionAuthenticated?Promise.resolve(t):e()}var ta=class extends Wr{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var _i=class e extends bt.FtStateManager{static build(t){return new e(U,t)}constructor(t,r){super(),this.store=t,this.cache=new bt.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new ta,this.knownContexts=new bt.AbstractRegistry,this.knownCustomComponents=new bt.AbstractRegistry,this.cleanSessionDebouncer=new bt.Debouncer,this.reloadConfiguration=()=>{var n;(n=this.cache)===null||n===void 0||n.clear("availableContentLocales"),this.updateAvailableContentLocales()},this.reloadDebouncer=new bt.Debouncer(500),this.apiProvider=r??(()=>sr.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}addListeners(){this.store.addEventListener(ir.eventName,this.reloadConfiguration)}removeListeners(){this.store.removeEventListener(ir.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.store.getState().localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let t=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},r.idleTimeoutInMillis),r});this.setSession(t)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var t;let r=await this.cache.get("availableContentLocales",()=>jl(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((t=r.contentLocales)!==null&&t!==void 0?t:[])}setStickyFilters(t){this.store.actions.stickyFilters(t)}setBaseUrl(t){this.store.actions.baseUrl(t),window.fluidTopicsBaseUrl=t}setTenantId(t){this.store.actions.tenantId(t)}setApiIntegrationIdentifier(t){this.store.actions.apiIntegrationIdentifier(t)}setApiIntegrationAppVersion(t){this.store.actions.apiIntegrationAppVersion(t)}setUiLocale(t){this.store.actions.uiLocale(t)}setLocalesConfiguration(t){this.store.actions.localesConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(t){this.store.actions.availableContentLocales(t),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(t,r){this.userLocaleService.updateUiLocale({uiLocale:t,contentLocale:r}).then(n=>{n.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new Mo(n)))}).catch(()=>{})}setMetadataConfiguration(t){this.store.actions.metadataConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setNoCustom(t){this.store.actions.noCustom(t)}setEditorMode(t){this.store.actions.editorMode(t)}setNoCustomComponent(t){this.store.actions.noCustomComponent(t)}setNoCustomCode(t){this.store.actions.noCustomCode(t)}setSession(t){this.store.actions.session(t),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(t){this.store.actions.openExternalDocumentInNewTab(t)}setNavigatorOnline(t){this.store.actions.navigatorOnline(t)}setForcedOffline(t){this.store.actions.forcedOffline(t)}setAuthenticationRequired(t){this.store.actions.authenticationRequired(t)}userHasAnyRole(...t){return Tl(U.getState().session,...t)}},Kl=_i.build();var dr=class extends Event{constructor(t,r,n,a){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=r,this.callback=n,this.subscribe=a??!1}};var To=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{let r=this.pendingContextRequests.get(t.context);if(r===void 0)return;this.pendingContextRequests.delete(t.context);let{requests:n}=r;for(let{elementRef:a,callbackRef:i}of n){let s=a.deref(),l=i.deref();s===void 0||l===void 0||s.dispatchEvent(new dr(t.context,s,l,!0))}},this.onContextRequest=t=>{if(t.subscribe!==!0)return;let r=t.contextTarget??t.composedPath()[0],n=t.callback,a=this.pendingContextRequests.get(t.context);a===void 0&&this.pendingContextRequests.set(t.context,a={callbacks:new WeakMap,requests:[]});let i=a.callbacks.get(r);i===void 0&&a.callbacks.set(r,i=new WeakSet),i.has(n)||(i.add(n),a.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(n)}))}}attach(t){t.addEventListener("context-request",this.onContextRequest),t.addEventListener("context-provider",this.onContextProvider)}detach(t){t.removeEventListener("context-request",this.onContextRequest),t.removeEventListener("context-provider",this.onContextProvider)}};var be=function(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},J=class extends ur.FtLitElementRedux{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.noCustomCode=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=Kl,this.contextRoot=new To}render(){return Zl.html`
|
|
3
3
|
<slot></slot>
|
|
4
4
|
`}connectedCallback(){super.connectedCallback(),this.stateManager.addListeners(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.stateManager.removeListeners(),this.contextRoot.detach(document.body)}update(t){var r;super.update(t),t.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),t.has("tenantId")&&this.stateManager.setTenantId(this.tenantId),t.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),t.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),t.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),t.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),t.has("noCustomCode")&&this.stateManager.setNoCustomCode(this.noCustomCode),t.has("session")&&this.stateManager.setSession(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(n=>jr.addContext(n)),t.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),t.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),t.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};J.elementDefinitions={};J.styles=Vl;be([(0,ze.property)()],J.prototype,"baseUrl",void 0);be([(0,ze.property)()],J.prototype,"tenantId",void 0);be([(0,ze.property)()],J.prototype,"apiIntegrationIdentifier",void 0);be([(0,ze.property)()],J.prototype,"apiIntegrationAppVersion",void 0);be([(0,ze.property)()],J.prototype,"uiLocale",void 0);be([(0,ur.jsonProperty)(null)],J.prototype,"availableUiLocales",void 0);be([(0,ur.jsonProperty)(null)],J.prototype,"metadataConfiguration",void 0);be([(0,ze.property)({type:Boolean})],J.prototype,"editorMode",void 0);be([(0,ze.property)({type:Boolean})],J.prototype,"noCustom",void 0);be([(0,ze.property)({type:Boolean})],J.prototype,"openExternalDocumentInNewTab",void 0);be([(0,ze.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],J.prototype,"noCustomComponent",void 0);be([(0,ze.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],J.prototype,"noCustomCode",void 0);be([(0,ze.property)({type:Boolean})],J.prototype,"withManualResources",void 0);be([(0,ze.property)({type:Boolean})],J.prototype,"navigatorOnline",void 0);be([(0,ze.property)({type:Boolean})],J.prototype,"forcedOffline",void 0);be([(0,ze.property)({type:Boolean})],J.prototype,"authenticationRequired",void 0);be([(0,ur.jsonProperty)([])],J.prototype,"messageContexts",void 0);be([(0,ur.jsonProperty)(void 0)],J.prototype,"session",void 0);var Yl=b(R());var ql={"ft-app-context":J};(0,Yl.customElements)(ql);var Kr=class e{static build(t){return new e(t)}static buildCustom(t){return new e(t,!0)}static fromGwt(t){return new e(t)}get service(){return this.custom?Jn:jr}constructor(t,r=!1){this.name=t,this.custom=r,this.properties=new Proxy({},{get:(n,a)=>{let i=a;return s=>({context:this.name,key:i,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(n,a)=>(...i)=>this.service.resolveMessage(this.name,a,...i)}),this.rawMessages=new Proxy({},{get:(n,a)=>this.service.resolveRawMessage(this.name,a)}),this.keys=new Proxy({},{get:(n,a)=>()=>a}),this.attributes=new Proxy({},{get:(n,a)=>()=>({context:this.name,key:a,message:this.service.resolveRawMessage(this.name,a)})})}};var qr=b(R());var Xl=b(Z());var zi=class{fromLocalizableLabel(t){return t.type=="PLAIN_TEXT"?{message:t.text}:{key:t.key,custom:t.type=="LOCALIZED_CUSTOM",context:t.context,message:t.key}}fromAttribute(t){if(t!=null)try{return JSON.parse(t)}catch{if(this.isI18nKey(t)){let[r,n]=t.split(".");return{context:r,key:n,custom:r!=="officialContext",message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},Zr=new zi;var Af=function(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},Do=Symbol("i18nAttributes"),Ql=Symbol("i18nListAttributes"),Fo=Symbol("i18nProperties"),ra=Symbol("i18nContexts"),Po=Symbol("i18nUnsubs"),Ut=(0,qr.applyMixinOnce)(Symbol("withI18n"),function(e){var t,r;class n extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[r]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?Jn:jr}i18n(i){let{context:s,key:l,message:u}=i,{custom:m,args:h,argsProvider:g}=i;if(s&&l){this.hasI18nContext(s)||this.addI18nContext(s,void 0,m);let x=h??(g?g(this):[]);return this.getI18nService(m).resolveMessage(s,l,...x)}return u}async awaitI18n(i){let{context:s,custom:l}=i;return s&&await this.getI18nService(l).prepareContext(s),this.i18n(i)}customI18n(i,s){if(Zr.isI18nKey(i)){let[l,u]=i.split(".");return this.i18n({custom:!0,context:l,key:u,...s})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((s,l,u)=>i.has(l)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((s,l,u)=>{var m;return((m=u?.context)===null||m===void 0?void 0:m.toLowerCase())===i}),this.updateI18nProperties(s=>s.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var s,l;let u=this,m=(h,g,x)=>x?.context&&x.key&&i(h,g,x)?{...x,message:this.i18n({context:x.context,key:x.key,custom:x.custom,...h})}:x;(s=this[Do])===null||s===void 0||s.forEach((h,g)=>u[g]=m(h,g,u[g])),(l=this[Ql])===null||l===void 0||l.forEach((h,g)=>{var x;return u[g]=(x=u[g])===null||x===void 0?void 0:x.map(v=>m(h,g,v))})}updateI18nProperties(i){var s;(s=this[Fo])===null||s===void 0||s.forEach((l,u)=>{i(l,u)&&(this[u]=this.i18n(l))})}addI18nMessages(i,s,l){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,s,l)}addI18nContext(i,s,l){let u=(typeof i=="string"?i:i.name).toLowerCase();l=typeof i=="string"?l:i.custom,this[ra].set(u,{isCustomContext:l}),this[Po].has(u)||this[Po].set(u,this.getI18nService(l).subscribe(u,()=>this.onI18nUpdate(u))),this.getI18nService(l).prepareContext(u,s)}hasI18nContext(i){return this[ra].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[ra].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Po].forEach(i=>i()),this[Po].clear()}}return t=ra,r=Po,Af([(0,Xl.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),oa=class extends Ut(qr.FtLitElement){},na=class extends Ut(qr.FtLitElementRedux){};var $o=(e,t)=>(r,n)=>{var a,i;r.constructor.createProperty(n,t??{attribute:!1,type:String});let s={...e,key:(a=e.key)!==null&&a!==void 0?a:n};r[Fo]=(i=r[Fo])!==null&&i!==void 0?i:new Map,r[Fo].set(n,s)};var Jl=b(F());var e1=Jl.css`
|