@fluid-topics/ftds-period-picker 2.2.55 → 2.2.57
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 fu=Object.create;var Ys=Object.defineProperty;var pu=Object.getOwnPropertyDescriptor;var mu=Object.getOwnPropertyNames;var hu=Object.getPrototypeOf,gu=Object.prototype.hasOwnProperty;var Fr=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var yu=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of mu(t))!gu.call(e,a)&&a!==r&&Ys(e,a,{get:()=>t[a],enumerable:!(n=pu(t,a))||n.enumerable});return e};var b=(e,t,r)=>(r=e!=null?fu(hu(e)):{},yu(t||!e||!e.__esModule?Ys(r,"default",{value:e,enumerable:!0}):r,e));var _=Fr((_m,Xs)=>{Xs.exports=ftGlobals.wcUtils});var $=Fr((zm,Qs)=>{Qs.exports=ftGlobals.lit});var Z=Fr((Im,Js)=>{Js.exports=ftGlobals.litDecorators});var Ja=Fr((Tm,ec)=>{ec.exports=ftGlobals.litRepeat});var Je=Fr((Q7,i1)=>{i1.exports=ftGlobals.litClassMap});var a2=Fr((cv,n2)=>{n2.exports=ftGlobals.litUnsafeHTML});var lu=b(_());var yn=b($()),qe=b(Z());function it(e,t,r){return e?t(e):r?.(e)}var Q4=b(Ja()),mt=b(_());var vi=b(Z());var tc=b(Z(),1);var ei=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)},bu=e=>({fromAttribute:t=>{if(t==null)return Oo(e);try{return JSON.parse(t)}catch{return Oo(e)}},toAttribute:t=>JSON.stringify(t)});function rc(e,t){return(0,tc.property)({type:Object,converter:bu(e),hasChanged:wo,...t??{}})}function xu(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(!Ur(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(!Ur(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(!Ur(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Ur(e,t){try{return xu(e,t)}catch{return!1}}function wo(e,t){return!Ur(e,t)}function Oo(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function xn(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 oc=b(Z(),1);var ti=e=>{let t=e??{};return(r,n)=>{var a;let i={hasChanged:wo,attribute:!1,...t};(0,oc.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 vn=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 nr=b(Z(),1);var Sn=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 En=b($(),1);var Cn=class extends En.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,En.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){ei(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 nc(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 Hr=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},cc,ac=Symbol("constructorPrototype"),ic=Symbol("constructorName"),lc=Symbol("exportpartsDebouncer"),sc=Symbol("dynamicDependenciesLoaded"),Br=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};Br.eventName="exportparts-updated";var yt=class extends Cn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[cc]=new Sn(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[lc].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[ic]=this.constructor.name,this[ac]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[ic]&&Object.setPrototypeOf(this,this[ac])}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[sc]||(r[sc]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Br.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Br.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 Br)})}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=nc(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 g=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:[],w=(l=(a=x.getAttribute("exportparts"))===null||a===void 0?void 0:a.split(",").map(O=>O.split(":")[1]))!==null&&l!==void 0?l:[],R=[...v,...w].filter(u).map(O=>O.trim());for(let O of R)g.add(O)}if(g.size===0){this.exportparts=void 0;return}let h=[...g.values()].flatMap(x=>m.map(v=>`${x}:${v}--${x}`));this.exportparts=[...this.part,...h].join(", ")}};cc=lc;Hr([(0,nr.property)()],yt.prototype,"exportpartsPrefix",void 0);Hr([rc([])],yt.prototype,"exportpartsPrefixes",void 0);Hr([(0,nr.property)({reflect:!0})],yt.prototype,"exportparts",void 0);Hr([(0,nr.property)()],yt.prototype,"customStylesheet",void 0);Hr([(0,nr.property)()],yt.prototype,"elementToFocus",void 0);Hr([(0,nr.state)()],yt.prototype,"useAdoptedStyleSheets",void 0);function Ln(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Ro=Symbol("internalReduxEventsUnsubscribers"),Bt=Symbol("internalStoresUnsubscribers"),ar=Symbol("internalStores"),vu=xn(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[ar].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[ar].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[ar].get(s)}addStore(s,l){var u;l=(u=l??s.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(l),this[ar].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[ar].delete(l)}setupStores(){this.unsubscribeFromStores(),this[ar].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[Bt].has(s.store):this[Bt].size>0)&&(this[l]=s.selector(m.getState(),this))}})}subscribeToStore(s,l){var u,m;this[Bt].set(s,l.subscribe(()=>this.updateFromStores())),this[Ro].set(s,[]),Ln(l)&&(!((u=l.deprecatedKeys)===null||u===void 0)&&u.length&&this.reduxConstructor.reduxProperties.forEach((g,h)=>{this.getStore(g.store)===l&&l.deprecatedKeys.includes(h)&&console.warn("Element",this,"is subscribed to deprecated key",h,"in store",l.name)}),l.eventBus&&((m=this.reduxConstructor.reduxEventListeners)===null||m===void 0||m.forEach((g,h)=>{if(typeof this[h]=="function"&&(!g.store||l.name===g.store)){let x=v=>this[h](v);l.addEventListener(g.eventName,x),this[Ro].get(s).push(()=>l.removeEventListener(g.eventName,x))}}))),this.onStoreAvailable(s)}unsubscribeFromStores(){this[Bt].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[Bt].has(s)&&this[Bt].get(s)(),this[Bt].delete(s),(l=this[Ro].get(s))===null||l===void 0||l.forEach(u=>u()),this[Ro].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=Bt,r=ar,n=Ro,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),dc=class extends vu(yt){};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 Su=typeof Symbol=="function"&&Symbol.observable||"@@observable",uc=Su,ri=()=>Math.random().toString(36).substring(7).split("").join("."),Cu={INIT:`@@redux/INIT${ri()}`,REPLACE:`@@redux/REPLACE${ri()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ri()}`},An=Cu;function On(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 oi(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(oi)(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((O,z)=>{s.set(z,O)}))}function g(){if(u)throw new Error(ve(3));return a}function h(O){if(typeof O!="function")throw new Error(ve(4));if(u)throw new Error(ve(5));let z=!0;m();let P=l++;return s.set(P,O),function(){if(z){if(u)throw new Error(ve(6));z=!1,m(),s.delete(P),i=null}}}function x(O){if(!On(O))throw new Error(ve(7));if(typeof O.type>"u")throw new Error(ve(8));if(typeof O.type!="string")throw new Error(ve(17));if(u)throw new Error(ve(9));try{u=!0,a=n(a,O)}finally{u=!1}return(i=s).forEach(P=>{P()}),O}function v(O){if(typeof O!="function")throw new Error(ve(10));n=O,x({type:An.REPLACE})}function w(){let O=h;return{subscribe(z){if(typeof z!="object"||z===null)throw new Error(ve(11));function P(){let D=z;D.next&&D.next(g())}return P(),{unsubscribe:O(P)}},[uc](){return this}}}return x({type:An.INIT}),{dispatch:x,subscribe:h,getState:g,replaceReducer:v,[uc]:w}}function Eu(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:An.INIT})>"u")throw new Error(ve(12));if(typeof r(void 0,{type:An.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ve(13))})}function ni(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{Eu(r)}catch(s){i=s}return function(l={},u){if(i)throw i;let m=!1,g={};for(let h=0;h<n.length;h++){let x=n[h],v=r[x],w=l[x],R=v(w,u);if(typeof R>"u"){let O=u&&u.type;throw new Error(ve(14))}g[x]=R,m=m||R!==w}return m=m||n.length!==Object.keys(l).length,m?g:l}}function _o(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function fc(...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=_o(...l)(a.dispatch),{...a,dispatch:i}}}function pc(e){return On(e)&&"type"in e&&typeof e.type=="string"}var Cc=Symbol.for("immer-nothing"),mc=Symbol.for("immer-draftable"),Re=Symbol.for("immer-state");function st(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Fe=Object,Wr=Fe.getPrototypeOf,zn="constructor",Pn="prototype",ci="configurable",In="enumerable",Rn="writable",zo="value",bt=e=>!!e&&!!e[Re];function Ue(e){return e?Ec(e)||$n(e)||!!e[mc]||!!e[zn]?.[mc]||Fn(e)||ko(e):!1}var Lu=Fe[Pn][zn].toString(),hc=new WeakMap;function Ec(e){if(!e||!gi(e))return!1;let t=Wr(e);if(t===null||t===Fe[Pn])return!0;let r=Fe.hasOwnProperty.call(t,zn)&&t[zn];if(r===Object)return!0;if(!Gr(r))return!1;let n=hc.get(r);return n===void 0&&(n=Function.toString.call(r),hc.set(r,n)),n===Lu}function Dn(e,t,r=!0){Mo(e)===0?(r?Reflect.ownKeys(e):Fe.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((n,a)=>t(a,n,e))}function Mo(e){let t=e[Re];return t?t.type_:$n(e)?1:Fn(e)?2:ko(e)?3:0}var ai=(e,t,r=Mo(e))=>r===2?e.has(t):Fe[Pn].hasOwnProperty.call(e,t),li=(e,t,r=Mo(e))=>r===2?e.get(t):e[t],Nn=(e,t,r,n=Mo(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function Au(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var $n=Array.isArray,Fn=e=>e instanceof Map,ko=e=>e instanceof Set,gi=e=>typeof e=="object",Gr=e=>typeof e=="function",ii=e=>typeof e=="boolean";function Ou(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var wt=e=>e.copy_||e.base_;var yi=e=>e.modified_?e.copy_:e.base_;function di(e,t){if(Fn(e))return new Map(e);if(ko(e))return new Set(e);if($n(e))return Array[Pn].slice.call(e);let r=Ec(e);if(t===!0||t==="class_only"&&!r){let n=Fe.getOwnPropertyDescriptors(e);delete n[Re];let a=Reflect.ownKeys(n);for(let i=0;i<a.length;i++){let s=a[i],l=n[s];l[Rn]===!1&&(l[Rn]=!0,l[ci]=!0),(l.get||l.set)&&(n[s]={[ci]:!0,[Rn]:!0,[In]:l[In],[zo]:e[s]})}return Fe.create(Wr(e),n)}else{let n=Wr(e);if(n!==null&&r)return{...e};let a=Fe.create(n);return Fe.assign(a,e)}}function Un(e,t=!1){return Bn(e)||bt(e)||!Ue(e)||(Mo(e)>1&&Fe.defineProperties(e,{set:wn,add:wn,clear:wn,delete:wn}),Fe.freeze(e),t&&Dn(e,(r,n)=>{Un(n,!0)},!1)),e}function wu(){st(2)}var wn={[zo]:wu};function Bn(e){return e===null||!gi(e)?!0:Fe.isFrozen(e)}var Mn="MapSet",ui="Patches",gc="ArrayMethods",Lc={};function ir(e){let t=Lc[e];return t||st(0,e),t}var yc=e=>!!Lc[e];var Io,Ac=()=>Io,Ru=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:yc(Mn)?ir(Mn):void 0,arrayMethodsPlugin_:yc(gc)?ir(gc):void 0});function bc(e,t){t&&(e.patchPlugin_=ir(ui),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function fi(e){pi(e),e.drafts_.forEach(_u),e.drafts_=null}function pi(e){e===Io&&(Io=e.parent_)}var xc=e=>Io=Ru(Io,e);function _u(e){let t=e[Re];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function vc(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(e!==void 0&&e!==r){r[Re].modified_&&(fi(t),st(4)),Ue(e)&&(e=Sc(t,e));let{patchPlugin_:a}=t;a&&a.generateReplacementPatches_(r[Re].base_,e,t)}else e=Sc(t,r);return zu(t,e,!0),fi(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Cc?e:void 0}function Sc(e,t){if(Bn(t))return t;let r=t[Re];if(!r)return kn(t,e.handledSet_,e);if(!Hn(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);Rc(r,e)}return r.copy_}function zu(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Un(t,r)}function Oc(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Hn=(e,t)=>e.scope_===t,Iu=[];function wc(e,t,r,n){let a=wt(e),i=e.type_;if(n!==void 0&&li(a,n,i)===t){Nn(a,n,r,i);return}if(!e.draftLocations_){let l=e.draftLocations_=new Map;Dn(a,(u,m)=>{if(bt(m)){let g=l.get(m)||[];g.push(u),l.set(m,g)}})}let s=e.draftLocations_.get(t)??Iu;for(let l of s)Nn(a,l,r,i)}function Nu(e,t,r){e.callbacks_.push(function(a){let i=t;if(!i||!Hn(i,a))return;a.mapSetPlugin_?.fixSetContents(i);let s=yi(i);wc(e,i.draft_??i,s,r),Rc(i,a)})}function Rc(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)}Oc(e)}}function Mu(e,t,r){let{scope_:n}=e;if(bt(r)){let a=r[Re];Hn(a,n)&&a.callbacks_.push(function(){_n(e);let s=yi(a);wc(e,r,s,t)})}else Ue(r)&&e.callbacks_.push(function(){let i=wt(e);e.type_===3?i.has(r)&&kn(r,n.handledSet_,n):li(i,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&kn(li(e.copy_,t,e.type_),n.handledSet_,n)})}function kn(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||bt(e)||t.has(e)||!Ue(e)||Bn(e)||(t.add(e),Dn(e,(n,a)=>{if(bt(a)){let i=a[Re];if(Hn(i,r)){let s=yi(i);Nn(e,n,s,e.type_),Oc(i)}}else Ue(a)&&kn(a,t,r)})),e}function ku(e,t){let r=$n(e),n={type_:r?1:0,scope_:t?t.scope_:Ac(),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=Tn;r&&(a=[n],i=No);let{revoke:s,proxy:l}=Proxy.revocable(a,i);return n.draft_=l,n.revoke_=s,[l,n]}var Tn={get(e,t){if(t===Re)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=wt(e);if(!ai(a,t,e.type_))return Pu(e,a,t);let i=a[t];if(e.finalized_||!Ue(i)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&Ou(t))return i;if(i===si(e.base_,t)||Tu(e,t,i)){_n(e);let s=e.type_===1?+t:t,l=hi(e.scope_,i,e,s);return e.copy_[s]=l}return i},has(e,t){return t in wt(e)},ownKeys(e){return Reflect.ownKeys(wt(e))},set(e,t,r){let n=_c(wt(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let a=si(wt(e),t),i=a?.[Re];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_.delete(t),!0;if(Au(r,a)&&(r!==void 0||ai(e.base_,t,e.type_)))return!0;_n(e),mi(e)}return e.copy_[t]===r&&(r!==void 0||ai(e.copy_,t,e.type_))||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),Mu(e,t,r)),!0},deleteProperty(e,t){return _n(e),si(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),mi(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=wt(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[Rn]:!0,[ci]:e.type_!==1||t!=="length",[In]:n[In],[zo]:r[t]}},defineProperty(){st(11)},getPrototypeOf(e){return Wr(e.base_)},setPrototypeOf(){st(12)}},No={};for(let e in Tn){let t=Tn[e];No[e]=function(){let r=arguments;return r[0]=r[0][0],t.apply(this,r)}}No.deleteProperty=function(e,t){return No.set.call(this,e,t,void 0)};No.set=function(e,t,r){return Tn.set.call(this,e[0],t,r,e[0])};function si(e,t){let r=e[Re];return(r?wt(r):e)[t]}function Tu(e,t,r){return e.type_!==1||!e.allIndicesReassigned_||!Ue(r)||r[Re]?!1:e.baseRefs_.has(r)}function Pu(e,t,r){let n=_c(t,r);return n?zo in n?n[zo]:n.get?.call(e.draft_):void 0}function _c(e,t){if(!(t in e))return;let r=Wr(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Wr(r)}}function mi(e){e.modified_||(e.modified_=!0,e.parent_&&mi(e.parent_))}function _n(e){e.copy_||(e.assigned_=new Map,e.copy_=di(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Du=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(Gr(t)&&!Gr(r)){let i=r;r=t;let s=this;return function(u=i,...m){return s.produce(u,g=>r.call(this,g,...m))}}Gr(r)||st(6),n!==void 0&&!Gr(n)&&st(7);let a;if(Ue(t)){let i=xc(this),s=hi(i,t,void 0),l=!0;try{a=r(s),l=!1}finally{l?fi(i):pi(i)}return bc(i,n),vc(a,i)}else if(!t||!gi(t)){if(a=r(t),a===void 0&&(a=t),a===Cc&&(a=void 0),this.autoFreeze_&&Un(a,!0),n){let i=[],s=[];ir(ui).generateReplacementPatches_(t,a,{patches_:i,inversePatches_:s}),n(i,s)}return a}else st(1,t)},this.produceWithPatches=(t,r)=>{if(Gr(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]},ii(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),ii(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),ii(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Ue(e)||st(8),bt(e)&&(e=zc(e));let t=xc(this),r=hi(t,e,void 0);return r[Re].isManual_=!0,pi(t),r}finishDraft(e,t){let r=e&&e[Re];(!r||!r.isManual_)&&st(9);let{scope_:n}=r;return bc(n,t),vc(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=ir(ui).applyPatches_;return bt(e)?n(e,t):this.produce(e,a=>n(a,t))}};function hi(e,t,r,n){let[a,i]=Fn(t)?ir(Mn).proxyMap_(t,r):ko(t)?ir(Mn).proxySet_(t,r):ku(t,r);return(r?.scope_??Ac()).drafts_.push(a),i.callbacks_=r?.callbacks_??[],i.key_=n,r&&n!==void 0?Nu(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 zc(e){return bt(e)||st(10,e),Ic(e)}function Ic(e){if(!Ue(e)||Bn(e))return e;let t=e[Re],r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=di(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=di(e,!0);let a=r;return ko(r)&&(r=new Set),Dn(a,(i,s)=>{Nn(r,i,Ic(s))},n),t&&(t.finalized_=!1),r}var $u=globalThis.Iterator,a8=typeof $u?.from=="function";var Fu=new Du,bi=Fu.produce;function Nc(e){return({dispatch:r,getState:n})=>a=>i=>typeof i=="function"?i(r,n,e):a(i)}var Mc=Nc(),kc=Nc;var Uu=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?_o:_o.apply(null,arguments)};typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;function Po(e,t){function r(...n){if(t){let a=t(...n);if(!a)throw new Error(xt(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=>n!=null&&n.type===e&&pc(n),r}var Dc=class To extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,To.prototype)}static get[Symbol.species](){return To}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new To(...t[0].concat(this)):new To(...t.concat(this))}};function Tc(e){return Ue(e)?bi(e,()=>{}):e}function Gn(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 Dc;return r&&(Bu(r)?s.push(Mc):s.push(kc(r.extraArgument))),s},Gu="RTK_autoBatch";var Pc=e=>t=>{setTimeout(t,e)},Wu=(e,t,r)=>n=>{let a=!1,i,s,l=()=>{a||(a=!0,t?.(i),clearTimeout(s),n())};i=e(l),s=setTimeout(l,r)},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,window.cancelAnimationFrame,100):Pc(10):e.type==="callback"?e.queueNotification:Pc(e.timeout),m=()=>{s=!1,i&&(i=!1,l.forEach(g=>g()))};return Object.assign({},n,{subscribe(g){let h=()=>a&&g(),x=n.subscribe(h);return l.add(g),()=>{x(),l.delete(g)}},dispatch(g){try{return a=!g?.meta?.[Gu],i=!a,i&&(s||(s=!0,u(m))),n.dispatch(g)}finally{a=!0}}})},ju=e=>function(r){let{autoBatch:n=!0}=r??{},a=new Dc(e);return n&&a.push(Vu(typeof n=="object"?n:void 0)),a};function $c(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(On(r))u=ni(r);else throw new Error(xt(1));let m;typeof n=="function"?m=n(t):m=t();let g=_o;a&&(g=Uu({trace:!1,...typeof a=="object"&&a}));let h=fc(...m),x=ju(h),v=typeof l=="function"?l(x):x(),w=g(...v);return oi(u,s,w)}function Fc(e){let t={},r=[],n,a={addCase(i,s){let l=typeof i=="string"?i:i.type;if(!l)throw new Error(xt(28));if(l in t)throw new Error(xt(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=()=>Tc(e());else{let u=Tc(e);i=()=>u}function s(u,m,g){if(bt(u)){let h=m(u,g);return h===void 0?u:h}else{if(Ue(u))return bi(u,h=>m(h,g));{let h=m(u,g);if(h===void 0){if(u===null)return u;throw new Error(xt(9))}return h}}}function l(u=i(),m){let g=r[m.type],h;for(let{matcher:x,reducer:v}of n)x(m)&&v&&(h??=[]).push(v);if(!g&&!h)return a?s(u,a,m):u;if(g&&(u=s(u,g,m)),h)for(let x of h)u=s(u,x,m);return u}return l.getInitialState=i,l}var qu=Symbol.for("rtk-slice-createasyncthunk");function Yu(e,t){return`${e}/${t}`}function Xu({creators:e}={}){let t=e?.asyncThunk?.[qu];return function(n){let{name:a,reducerPath:i=a}=n;if(!a)throw new Error(xt(11));typeof process<"u";let s=(typeof n.reducers=="function"?n.reducers(Ju()):n.reducers)||{},l=Object.keys(s),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},m={addCase(I,D){let B=typeof I=="string"?I:I.type;if(!B)throw new Error(xt(12));if(B in u.sliceCaseReducersByType)throw new Error(xt(13));return u.sliceCaseReducersByType[B]=D,m},addMatcher(I,D){return u.sliceMatchers.push({matcher:I,reducer:D}),m},exposeAction(I,D){return u.actionCreators[I]=D,m},exposeCaseReducer(I,D){return u.sliceCaseReducersByName[I]=D,m}};l.forEach(I=>{let D=s[I],B={reducerName:I,type:Yu(a,I),createNotation:typeof n.reducers=="function"};tf(D)?of(B,D,m,t):ef(B,D,m)});function g(){let[I={},D=[],B=void 0]=typeof n.extraReducers=="function"?Fc(n.extraReducers):[n.extraReducers],K={...I,...u.sliceCaseReducersByType};return Zu(n.initialState,ye=>{for(let re in K)ye.addCase(re,K[re]);for(let re of u.sliceMatchers)ye.addMatcher(re.matcher,re.reducer);for(let re of D)ye.addMatcher(re.matcher,re.reducer);B&&ye.addDefaultCase(B)})}let h=I=>I,x=new Map,v=new WeakMap,w;function R(I,D){return w||(w=g()),w(I,D)}function O(){return w||(w=g()),w.getInitialState()}function z(I,D=!1){function B(ye){let re=ye[I];return typeof re>"u"&&D&&(re=Gn(v,B,O)),re}function K(ye=h){return Gn(Gn(x,D,()=>new WeakMap),ye,()=>{let re={};for(let[Ot,we]of Object.entries(n.selectors??{}))re[Ot]=Qu(we,ye,()=>Gn(v,ye,O),D);return re})}return{reducerPath:I,getSelectors:K,get selectors(){return K(B)},selectSlice:B}}let P={name:a,reducer:R,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:O,...z(i),injectInto(I,{reducerPath:D,...B}={}){let K=D??i;return I.inject({reducerPath:K,reducer:R},B),{...P,...z(K,!0)}}};return P}}function Qu(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=Xu();function Ju(){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 ef({type:e,reducerName:t,createNotation:r},n,a){let i,s;if("reducer"in n){if(r&&!rf(n))throw new Error(xt(17));i=n.reducer,s=n.prepare}else i=n;a.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,s?Po(e,s):Po(e))}function tf(e){return e._reducerDefinitionType==="asyncThunk"}function rf(e){return e._reducerDefinitionType==="reducerWithPrepare"}function of({type:e,reducerName:t},r,n,a){if(!a)throw new Error(xt(18));let{payloadCreator:i,fulfilled:s,pending:l,rejected:u,settled:m,options:g}=r,h=a(e,i,g);n.exposeAction(t,h),s&&n.addCase(h.fulfilled,s),l&&n.addCase(h.pending,l),u&&n.addCase(h.rejected,u),m&&n.addMatcher(h.settled,m),n.exposeCaseReducer(t,{fulfilled:s||Wn,pending:l||Wn,rejected:u||Wn,settled:m||Wn})}function Wn(){}var Bc="listener",Hc="completed",Gc="cancelled",p8=`task-${Gc}`,m8=`task-${Hc}`,h8=`${Bc}-${Gc}`,g8=`${Bc}-${Hc}`;var{assign:Wc}=Object;var xi="listenerMiddleware";var nf=Wc(Po(`${xi}/add`),{withTypes:()=>nf}),y8=Po(`${xi}/removeAll`),af=Wc(Po(`${xi}/remove`),{withTypes:()=>af});function xt(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 sf=xn(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)}}}),Vn=class extends sf(Object){};window.ftReduxStores||(window.ftReduxStores={});var Vc=class e extends Vn{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(Ln(i))return i;if(a==null)return;let s=Uc({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),l=$c({reducer:(u,m)=>{if(m.type==="CLEAR_FT_REDUX_STORE"){let g=Oo(s.getInitialState());for(let h of m.keeping)g[h]=(u??g)[h];return g}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 vn,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,g=s[m];return g?(...h)=>{let x=g(...h.map(i));return this.reduxStore.dispatch(x),x}:h=>{let x=m,v=this.getState()[x];Ur(v,h)||this.setState({[x]:i(h)})}}}),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 jn=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 Kn=b(_()),cf="ft-app-info",sr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};sr.eventName="authentication-change";var Do=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Do.eventName="ui-locale-changed";var lf={session:(e,t)=>{(0,Kn.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>U.dispatchEvent(new sr(t.payload)),0))}},U=Kn.FtReduxStore.get({name:cf,reducers:lf,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(_()),Zn=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},V8=(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=>jn.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Zn([(0,vi.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Zn([(0,vi.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Zn([ti({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),Zn([ti({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 ue;(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"})(ue||(ue={}));var Ye;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(Ye||(Ye={}));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 df={[ue.PERSONAL_BOOK_SHARE_USER]:[ue.PERSONAL_BOOK_USER],[ue.HTML_EXPORT_USER]:[ue.PERSONAL_BOOK_USER],[ue.PDF_EXPORT_USER]:[ue.PERSONAL_BOOK_USER],[ue.KHUB_ADMIN]:[ue.CONTENT_PUBLISHER],[ue.ADMIN]:[ue.KHUB_ADMIN,ue.USERS_ADMIN,ue.PORTAL_ADMIN,ue.BEHAVIOR_DATA_USER],[ue.GENERATIVE_AI_EXPORT_USER]:[ue.GENERATIVE_AI_USER]};function kl(e,t){return e===t||(df[e]??[]).some(r=>kl(r,t))}function Si(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=>Si(e,r))}var Jn=b(_());var Ci=b(_());var cr=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 Vr=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:cr.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):cr.await()}};var Be=class extends Vr{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 Ci.CacheRegistry,this.cache=t?a.commonCache:new Ci.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 qn=class extends Be{async listMySearches(){let{session:t}=U.getState();return Si(t,ue.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var Yn=class extends Be{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 Xn=class extends Be{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(`/api/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(`/api/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=U.getState().session;return!!t?.sessionAuthenticated}};var Qn=class extends Be{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await(await this.awaitApi).get("/api/user/assets/labels")).labels,this.CACHE_DURATION):[]}isAuthenticated(){let t=U.getState().session;return!!t?.sessionAuthenticated}};var uf="ft-user-assets",ff={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(Ye).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;Li(e,r,[...Ei(e,r),a]),Pl(e,r,1,n),Dl(e,a)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;Li(e,r,Ei(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;Li(e,r,Ei(e,r).filter(i=>i.id!==a)),Pl(e,r,-1,n)}},$l={[Ye.SEARCHES]:"savedSearches",[Ye.BOOKMARKS]:"bookmarks",[Ye.BOOKS]:void 0,[Ye.COLLECTIONS]:void 0},Ei=(e,t)=>{var r;let n=$l[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},Li=(e,t,r)=>{let n=$l[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===Ye.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)},Ie=Jn.FtReduxStore.get({name:uf,reducers:ff,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Ye).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Ai=class{constructor(t=new Xn,r=new Qn){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=U.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Yn,this.savedSearchesService=new qn,U.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=U.getState();(0,Jn.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(),Ie.actions.clearAssetCount(),Ie.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Ie.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Ie.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();Ie.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();Ie.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&Ie.getState().assetCounts.allAsset[t]!==r.count&&Ie.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&Ie.getState().assetCounts.bookmarkByMap[t]!==r.count&&Ie.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(Ie.getState().assetCounts.bookmarkByMap).length!==0;t===Ye.BOOKMARKS&&r&&Ie.actions.clearBookmarkCountByMap(),Ie.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;Ie.actions.bookmarks(r)}}},pf=new Ai;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=pf);var Oi=class{addCommand(t,r=!1){U.commands.add(t,r)}consumeCommand(t){return U.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Oi;var Xe=b(_());var Fl,jr=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},mf=Symbol("clearAfterUnitTest"),ea=class extends(0,Xe.withEventBus)(Be){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Fl]=()=>{this.defaultMessages={},this.cache=new Xe.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,Xe.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 Xe.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 Xe.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 jr({loadedContexts:t})),this.dispatchEvent(new jr({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new jr({loadedContexts:[t]})),this.dispatchEvent(new jr({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,Xe.delay)(0).then(()=>n()).catch(()=>null)))}};Fl=mf;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends ea{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends ea{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Kr=window.FluidTopicsI18nService,ta=window.FluidTopicsCustomI18nService;var Ul=b(_()),wi=class{highlightHtml(t,r,n){(0,Ul.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new wi;var Bl=b(_());var Ri=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 Ri;var Hl=b(_());var $o=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 _i=class{urlToSearchRequest(t){return $o.get().parse(t)}searchRequestToUrl(t){return $o.get().serialize(t)}};window.FluidTopicsUrlService=new _i;var Rt=b(_());var lr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{nextLocation:t}})}};lr.eventName="before-location-change";var dr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};dr.eventName="change";var zi=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 zi;var ra=class e extends Rt.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,Rt.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new dr(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 lr(u);this.dispatchEvent(m);let g=r(),h={...g===this.currentIndex?this.currentState:void 0,...i,index:g,href:m.detail.nextLocation.href};n.apply(a,[h,s,h.href]),this.setCurrentState(h,!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(lr.eventName,t)}removeBeforeLocationChangeListener(t){this.removeEventListener(lr.eventName,t)}addHistoryChangeListener(t){this.addEventListener(dr.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(dr.eventName,t)}currentItem(){return(0,Rt.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,Rt.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,Rt.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,Rt.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=ra.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($());var Vl=Wl.css`
|
|
1
|
+
"use strict";(()=>{var fu=Object.create;var Ys=Object.defineProperty;var pu=Object.getOwnPropertyDescriptor;var mu=Object.getOwnPropertyNames;var hu=Object.getPrototypeOf,gu=Object.prototype.hasOwnProperty;var Fr=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var yu=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of mu(t))!gu.call(e,a)&&a!==r&&Ys(e,a,{get:()=>t[a],enumerable:!(n=pu(t,a))||n.enumerable});return e};var b=(e,t,r)=>(r=e!=null?fu(hu(e)):{},yu(t||!e||!e.__esModule?Ys(r,"default",{value:e,enumerable:!0}):r,e));var _=Fr((_m,Xs)=>{Xs.exports=ftGlobals.wcUtils});var $=Fr((zm,Qs)=>{Qs.exports=ftGlobals.lit});var Z=Fr((Im,Js)=>{Js.exports=ftGlobals.litDecorators});var Ja=Fr((Tm,ec)=>{ec.exports=ftGlobals.litRepeat});var Je=Fr((Q7,i1)=>{i1.exports=ftGlobals.litClassMap});var a2=Fr((cv,n2)=>{n2.exports=ftGlobals.litUnsafeHTML});var lu=b(_());var yn=b($()),qe=b(Z());function it(e,t,r){return e?t(e):r?.(e)}var Q4=b(Ja()),mt=b(_());var vi=b(Z());var tc=b(Z(),1);var ei=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)},bu=e=>({fromAttribute:t=>{if(t==null)return Oo(e);try{return JSON.parse(t)}catch{return Oo(e)}},toAttribute:t=>JSON.stringify(t)});function rc(e,t){return(0,tc.property)({type:Object,converter:bu(e),hasChanged:wo,...t??{}})}function xu(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(!Ur(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(!Ur(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(!Ur(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Ur(e,t){try{return xu(e,t)}catch{return!1}}function wo(e,t){return!Ur(e,t)}function Oo(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function xn(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 oc=b(Z(),1);var ti=e=>{let t=e??{};return(r,n)=>{var a;let i={hasChanged:wo,attribute:!1,...t};(0,oc.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 vn=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 nr=b(Z(),1);var Sn=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 En=b($(),1);var Cn=class extends En.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,En.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){ei(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 nc(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 Hr=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},cc,ac=Symbol("constructorPrototype"),ic=Symbol("constructorName"),lc=Symbol("exportpartsDebouncer"),sc=Symbol("dynamicDependenciesLoaded"),Br=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};Br.eventName="exportparts-updated";var yt=class extends Cn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[cc]=new Sn(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[lc].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[ic]=this.constructor.name,this[ac]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[ic]&&Object.setPrototypeOf(this,this[ac])}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[sc]||(r[sc]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Br.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Br.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 Br)})}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=nc(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 g=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:[],w=(l=(a=x.getAttribute("exportparts"))===null||a===void 0?void 0:a.split(",").map(O=>O.split(":")[1]))!==null&&l!==void 0?l:[],R=[...v,...w].filter(u).map(O=>O.trim());for(let O of R)g.add(O)}if(g.size===0){this.exportparts=void 0;return}let h=[...g.values()].flatMap(x=>m.map(v=>`${x}:${v}--${x}`));this.exportparts=[...this.part,...h].join(", ")}};cc=lc;Hr([(0,nr.property)()],yt.prototype,"exportpartsPrefix",void 0);Hr([rc([])],yt.prototype,"exportpartsPrefixes",void 0);Hr([(0,nr.property)({reflect:!0})],yt.prototype,"exportparts",void 0);Hr([(0,nr.property)()],yt.prototype,"customStylesheet",void 0);Hr([(0,nr.property)()],yt.prototype,"elementToFocus",void 0);Hr([(0,nr.state)()],yt.prototype,"useAdoptedStyleSheets",void 0);function Ln(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Ro=Symbol("internalReduxEventsUnsubscribers"),Bt=Symbol("internalStoresUnsubscribers"),ar=Symbol("internalStores"),vu=xn(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[ar].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[ar].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[ar].get(s)}addStore(s,l){var u;l=(u=l??s.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(l),this[ar].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[ar].delete(l)}setupStores(){this.unsubscribeFromStores(),this[ar].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[Bt].has(s.store):this[Bt].size>0)&&(this[l]=s.selector(m.getState(),this))}})}subscribeToStore(s,l){var u,m;this[Bt].set(s,l.subscribe(()=>this.updateFromStores())),this[Ro].set(s,[]),Ln(l)&&(!((u=l.deprecatedKeys)===null||u===void 0)&&u.length&&this.reduxConstructor.reduxProperties.forEach((g,h)=>{this.getStore(g.store)===l&&l.deprecatedKeys.includes(h)&&console.warn("Element",this,"is subscribed to deprecated key",h,"in store",l.name)}),l.eventBus&&((m=this.reduxConstructor.reduxEventListeners)===null||m===void 0||m.forEach((g,h)=>{if(typeof this[h]=="function"&&(!g.store||l.name===g.store)){let x=v=>this[h](v);l.addEventListener(g.eventName,x),this[Ro].get(s).push(()=>l.removeEventListener(g.eventName,x))}}))),this.onStoreAvailable(s)}unsubscribeFromStores(){this[Bt].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[Bt].has(s)&&this[Bt].get(s)(),this[Bt].delete(s),(l=this[Ro].get(s))===null||l===void 0||l.forEach(u=>u()),this[Ro].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=Bt,r=ar,n=Ro,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),dc=class extends vu(yt){};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 Su=typeof Symbol=="function"&&Symbol.observable||"@@observable",uc=Su,ri=()=>Math.random().toString(36).substring(7).split("").join("."),Cu={INIT:`@@redux/INIT${ri()}`,REPLACE:`@@redux/REPLACE${ri()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ri()}`},An=Cu;function On(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 oi(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(oi)(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((O,z)=>{s.set(z,O)}))}function g(){if(u)throw new Error(ve(3));return a}function h(O){if(typeof O!="function")throw new Error(ve(4));if(u)throw new Error(ve(5));let z=!0;m();let P=l++;return s.set(P,O),function(){if(z){if(u)throw new Error(ve(6));z=!1,m(),s.delete(P),i=null}}}function x(O){if(!On(O))throw new Error(ve(7));if(typeof O.type>"u")throw new Error(ve(8));if(typeof O.type!="string")throw new Error(ve(17));if(u)throw new Error(ve(9));try{u=!0,a=n(a,O)}finally{u=!1}return(i=s).forEach(P=>{P()}),O}function v(O){if(typeof O!="function")throw new Error(ve(10));n=O,x({type:An.REPLACE})}function w(){let O=h;return{subscribe(z){if(typeof z!="object"||z===null)throw new Error(ve(11));function P(){let D=z;D.next&&D.next(g())}return P(),{unsubscribe:O(P)}},[uc](){return this}}}return x({type:An.INIT}),{dispatch:x,subscribe:h,getState:g,replaceReducer:v,[uc]:w}}function Eu(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:An.INIT})>"u")throw new Error(ve(12));if(typeof r(void 0,{type:An.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ve(13))})}function ni(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{Eu(r)}catch(s){i=s}return function(l={},u){if(i)throw i;let m=!1,g={};for(let h=0;h<n.length;h++){let x=n[h],v=r[x],w=l[x],R=v(w,u);if(typeof R>"u"){let O=u&&u.type;throw new Error(ve(14))}g[x]=R,m=m||R!==w}return m=m||n.length!==Object.keys(l).length,m?g:l}}function _o(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function fc(...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=_o(...l)(a.dispatch),{...a,dispatch:i}}}function pc(e){return On(e)&&"type"in e&&typeof e.type=="string"}var Cc=Symbol.for("immer-nothing"),mc=Symbol.for("immer-draftable"),Re=Symbol.for("immer-state");function st(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Fe=Object,Wr=Fe.getPrototypeOf,zn="constructor",Pn="prototype",ci="configurable",In="enumerable",Rn="writable",zo="value",bt=e=>!!e&&!!e[Re];function Ue(e){return e?Ec(e)||$n(e)||!!e[mc]||!!e[zn]?.[mc]||Fn(e)||ko(e):!1}var Lu=Fe[Pn][zn].toString(),hc=new WeakMap;function Ec(e){if(!e||!gi(e))return!1;let t=Wr(e);if(t===null||t===Fe[Pn])return!0;let r=Fe.hasOwnProperty.call(t,zn)&&t[zn];if(r===Object)return!0;if(!Gr(r))return!1;let n=hc.get(r);return n===void 0&&(n=Function.toString.call(r),hc.set(r,n)),n===Lu}function Dn(e,t,r=!0){Mo(e)===0?(r?Reflect.ownKeys(e):Fe.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((n,a)=>t(a,n,e))}function Mo(e){let t=e[Re];return t?t.type_:$n(e)?1:Fn(e)?2:ko(e)?3:0}var ai=(e,t,r=Mo(e))=>r===2?e.has(t):Fe[Pn].hasOwnProperty.call(e,t),li=(e,t,r=Mo(e))=>r===2?e.get(t):e[t],Nn=(e,t,r,n=Mo(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function Au(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var $n=Array.isArray,Fn=e=>e instanceof Map,ko=e=>e instanceof Set,gi=e=>typeof e=="object",Gr=e=>typeof e=="function",ii=e=>typeof e=="boolean";function Ou(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var wt=e=>e.copy_||e.base_;var yi=e=>e.modified_?e.copy_:e.base_;function di(e,t){if(Fn(e))return new Map(e);if(ko(e))return new Set(e);if($n(e))return Array[Pn].slice.call(e);let r=Ec(e);if(t===!0||t==="class_only"&&!r){let n=Fe.getOwnPropertyDescriptors(e);delete n[Re];let a=Reflect.ownKeys(n);for(let i=0;i<a.length;i++){let s=a[i],l=n[s];l[Rn]===!1&&(l[Rn]=!0,l[ci]=!0),(l.get||l.set)&&(n[s]={[ci]:!0,[Rn]:!0,[In]:l[In],[zo]:e[s]})}return Fe.create(Wr(e),n)}else{let n=Wr(e);if(n!==null&&r)return{...e};let a=Fe.create(n);return Fe.assign(a,e)}}function Un(e,t=!1){return Bn(e)||bt(e)||!Ue(e)||(Mo(e)>1&&Fe.defineProperties(e,{set:wn,add:wn,clear:wn,delete:wn}),Fe.freeze(e),t&&Dn(e,(r,n)=>{Un(n,!0)},!1)),e}function wu(){st(2)}var wn={[zo]:wu};function Bn(e){return e===null||!gi(e)?!0:Fe.isFrozen(e)}var Mn="MapSet",ui="Patches",gc="ArrayMethods",Lc={};function ir(e){let t=Lc[e];return t||st(0,e),t}var yc=e=>!!Lc[e];var Io,Ac=()=>Io,Ru=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:yc(Mn)?ir(Mn):void 0,arrayMethodsPlugin_:yc(gc)?ir(gc):void 0});function bc(e,t){t&&(e.patchPlugin_=ir(ui),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function fi(e){pi(e),e.drafts_.forEach(_u),e.drafts_=null}function pi(e){e===Io&&(Io=e.parent_)}var xc=e=>Io=Ru(Io,e);function _u(e){let t=e[Re];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function vc(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(e!==void 0&&e!==r){r[Re].modified_&&(fi(t),st(4)),Ue(e)&&(e=Sc(t,e));let{patchPlugin_:a}=t;a&&a.generateReplacementPatches_(r[Re].base_,e,t)}else e=Sc(t,r);return zu(t,e,!0),fi(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Cc?e:void 0}function Sc(e,t){if(Bn(t))return t;let r=t[Re];if(!r)return kn(t,e.handledSet_,e);if(!Hn(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);Rc(r,e)}return r.copy_}function zu(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Un(t,r)}function Oc(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Hn=(e,t)=>e.scope_===t,Iu=[];function wc(e,t,r,n){let a=wt(e),i=e.type_;if(n!==void 0&&li(a,n,i)===t){Nn(a,n,r,i);return}if(!e.draftLocations_){let l=e.draftLocations_=new Map;Dn(a,(u,m)=>{if(bt(m)){let g=l.get(m)||[];g.push(u),l.set(m,g)}})}let s=e.draftLocations_.get(t)??Iu;for(let l of s)Nn(a,l,r,i)}function Nu(e,t,r){e.callbacks_.push(function(a){let i=t;if(!i||!Hn(i,a))return;a.mapSetPlugin_?.fixSetContents(i);let s=yi(i);wc(e,i.draft_??i,s,r),Rc(i,a)})}function Rc(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)}Oc(e)}}function Mu(e,t,r){let{scope_:n}=e;if(bt(r)){let a=r[Re];Hn(a,n)&&a.callbacks_.push(function(){_n(e);let s=yi(a);wc(e,r,s,t)})}else Ue(r)&&e.callbacks_.push(function(){let i=wt(e);e.type_===3?i.has(r)&&kn(r,n.handledSet_,n):li(i,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&kn(li(e.copy_,t,e.type_),n.handledSet_,n)})}function kn(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||bt(e)||t.has(e)||!Ue(e)||Bn(e)||(t.add(e),Dn(e,(n,a)=>{if(bt(a)){let i=a[Re];if(Hn(i,r)){let s=yi(i);Nn(e,n,s,e.type_),Oc(i)}}else Ue(a)&&kn(a,t,r)})),e}function ku(e,t){let r=$n(e),n={type_:r?1:0,scope_:t?t.scope_:Ac(),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=Tn;r&&(a=[n],i=No);let{revoke:s,proxy:l}=Proxy.revocable(a,i);return n.draft_=l,n.revoke_=s,[l,n]}var Tn={get(e,t){if(t===Re)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=wt(e);if(!ai(a,t,e.type_))return Pu(e,a,t);let i=a[t];if(e.finalized_||!Ue(i)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&Ou(t))return i;if(i===si(e.base_,t)||Tu(e,t,i)){_n(e);let s=e.type_===1?+t:t,l=hi(e.scope_,i,e,s);return e.copy_[s]=l}return i},has(e,t){return t in wt(e)},ownKeys(e){return Reflect.ownKeys(wt(e))},set(e,t,r){let n=_c(wt(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let a=si(wt(e),t),i=a?.[Re];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_.delete(t),!0;if(Au(r,a)&&(r!==void 0||ai(e.base_,t,e.type_)))return!0;_n(e),mi(e)}return e.copy_[t]===r&&(r!==void 0||ai(e.copy_,t,e.type_))||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),Mu(e,t,r)),!0},deleteProperty(e,t){return _n(e),si(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),mi(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=wt(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[Rn]:!0,[ci]:e.type_!==1||t!=="length",[In]:n[In],[zo]:r[t]}},defineProperty(){st(11)},getPrototypeOf(e){return Wr(e.base_)},setPrototypeOf(){st(12)}},No={};for(let e in Tn){let t=Tn[e];No[e]=function(){let r=arguments;return r[0]=r[0][0],t.apply(this,r)}}No.deleteProperty=function(e,t){return No.set.call(this,e,t,void 0)};No.set=function(e,t,r){return Tn.set.call(this,e[0],t,r,e[0])};function si(e,t){let r=e[Re];return(r?wt(r):e)[t]}function Tu(e,t,r){return e.type_!==1||!e.allIndicesReassigned_||!Ue(r)||r[Re]?!1:e.baseRefs_.has(r)}function Pu(e,t,r){let n=_c(t,r);return n?zo in n?n[zo]:n.get?.call(e.draft_):void 0}function _c(e,t){if(!(t in e))return;let r=Wr(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Wr(r)}}function mi(e){e.modified_||(e.modified_=!0,e.parent_&&mi(e.parent_))}function _n(e){e.copy_||(e.assigned_=new Map,e.copy_=di(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Du=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(Gr(t)&&!Gr(r)){let i=r;r=t;let s=this;return function(u=i,...m){return s.produce(u,g=>r.call(this,g,...m))}}Gr(r)||st(6),n!==void 0&&!Gr(n)&&st(7);let a;if(Ue(t)){let i=xc(this),s=hi(i,t,void 0),l=!0;try{a=r(s),l=!1}finally{l?fi(i):pi(i)}return bc(i,n),vc(a,i)}else if(!t||!gi(t)){if(a=r(t),a===void 0&&(a=t),a===Cc&&(a=void 0),this.autoFreeze_&&Un(a,!0),n){let i=[],s=[];ir(ui).generateReplacementPatches_(t,a,{patches_:i,inversePatches_:s}),n(i,s)}return a}else st(1,t)},this.produceWithPatches=(t,r)=>{if(Gr(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]},ii(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),ii(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),ii(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Ue(e)||st(8),bt(e)&&(e=zc(e));let t=xc(this),r=hi(t,e,void 0);return r[Re].isManual_=!0,pi(t),r}finishDraft(e,t){let r=e&&e[Re];(!r||!r.isManual_)&&st(9);let{scope_:n}=r;return bc(n,t),vc(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=ir(ui).applyPatches_;return bt(e)?n(e,t):this.produce(e,a=>n(a,t))}};function hi(e,t,r,n){let[a,i]=Fn(t)?ir(Mn).proxyMap_(t,r):ko(t)?ir(Mn).proxySet_(t,r):ku(t,r);return(r?.scope_??Ac()).drafts_.push(a),i.callbacks_=r?.callbacks_??[],i.key_=n,r&&n!==void 0?Nu(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 zc(e){return bt(e)||st(10,e),Ic(e)}function Ic(e){if(!Ue(e)||Bn(e))return e;let t=e[Re],r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=di(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=di(e,!0);let a=r;return ko(r)&&(r=new Set),Dn(a,(i,s)=>{Nn(r,i,Ic(s))},n),t&&(t.finalized_=!1),r}var $u=globalThis.Iterator,a8=typeof $u?.from=="function";var Fu=new Du,bi=Fu.produce;function Nc(e){return({dispatch:r,getState:n})=>a=>i=>typeof i=="function"?i(r,n,e):a(i)}var Mc=Nc(),kc=Nc;var Uu=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?_o:_o.apply(null,arguments)};typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;function Po(e,t){function r(...n){if(t){let a=t(...n);if(!a)throw new Error(xt(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=>n!=null&&n.type===e&&pc(n),r}var Dc=class To extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,To.prototype)}static get[Symbol.species](){return To}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new To(...t[0].concat(this)):new To(...t.concat(this))}};function Tc(e){return Ue(e)?bi(e,()=>{}):e}function Gn(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 Dc;return r&&(Bu(r)?s.push(Mc):s.push(kc(r.extraArgument))),s},Gu="RTK_autoBatch";var Pc=e=>t=>{setTimeout(t,e)},Wu=(e,t,r)=>n=>{let a=!1,i,s,l=()=>{a||(a=!0,t?.(i),clearTimeout(s),n())};i=e(l),s=setTimeout(l,r)},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,window.cancelAnimationFrame,100):Pc(10):e.type==="callback"?e.queueNotification:Pc(e.timeout),m=()=>{s=!1,i&&(i=!1,l.forEach(g=>g()))};return Object.assign({},n,{subscribe(g){let h=()=>a&&g(),x=n.subscribe(h);return l.add(g),()=>{x(),l.delete(g)}},dispatch(g){try{return a=!g?.meta?.[Gu],i=!a,i&&(s||(s=!0,u(m))),n.dispatch(g)}finally{a=!0}}})},ju=e=>function(r){let{autoBatch:n=!0}=r??{},a=new Dc(e);return n&&a.push(Vu(typeof n=="object"?n:void 0)),a};function $c(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(On(r))u=ni(r);else throw new Error(xt(1));let m;typeof n=="function"?m=n(t):m=t();let g=_o;a&&(g=Uu({trace:!1,...typeof a=="object"&&a}));let h=fc(...m),x=ju(h),v=typeof l=="function"?l(x):x(),w=g(...v);return oi(u,s,w)}function Fc(e){let t={},r=[],n,a={addCase(i,s){let l=typeof i=="string"?i:i.type;if(!l)throw new Error(xt(28));if(l in t)throw new Error(xt(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=()=>Tc(e());else{let u=Tc(e);i=()=>u}function s(u,m,g){if(bt(u)){let h=m(u,g);return h===void 0?u:h}else{if(Ue(u))return bi(u,h=>m(h,g));{let h=m(u,g);if(h===void 0){if(u===null)return u;throw new Error(xt(9))}return h}}}function l(u=i(),m){let g=r[m.type],h;for(let{matcher:x,reducer:v}of n)x(m)&&v&&(h??=[]).push(v);if(!g&&!h)return a?s(u,a,m):u;if(g&&(u=s(u,g,m)),h)for(let x of h)u=s(u,x,m);return u}return l.getInitialState=i,l}var qu=Symbol.for("rtk-slice-createasyncthunk");function Yu(e,t){return`${e}/${t}`}function Xu({creators:e}={}){let t=e?.asyncThunk?.[qu];return function(n){let{name:a,reducerPath:i=a}=n;if(!a)throw new Error(xt(11));typeof process<"u";let s=(typeof n.reducers=="function"?n.reducers(Ju()):n.reducers)||{},l=Object.keys(s),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},m={addCase(I,D){let B=typeof I=="string"?I:I.type;if(!B)throw new Error(xt(12));if(B in u.sliceCaseReducersByType)throw new Error(xt(13));return u.sliceCaseReducersByType[B]=D,m},addMatcher(I,D){return u.sliceMatchers.push({matcher:I,reducer:D}),m},exposeAction(I,D){return u.actionCreators[I]=D,m},exposeCaseReducer(I,D){return u.sliceCaseReducersByName[I]=D,m}};l.forEach(I=>{let D=s[I],B={reducerName:I,type:Yu(a,I),createNotation:typeof n.reducers=="function"};tf(D)?of(B,D,m,t):ef(B,D,m)});function g(){let[I={},D=[],B=void 0]=typeof n.extraReducers=="function"?Fc(n.extraReducers):[n.extraReducers],K={...I,...u.sliceCaseReducersByType};return Zu(n.initialState,ye=>{for(let re in K)ye.addCase(re,K[re]);for(let re of u.sliceMatchers)ye.addMatcher(re.matcher,re.reducer);for(let re of D)ye.addMatcher(re.matcher,re.reducer);B&&ye.addDefaultCase(B)})}let h=I=>I,x=new Map,v=new WeakMap,w;function R(I,D){return w||(w=g()),w(I,D)}function O(){return w||(w=g()),w.getInitialState()}function z(I,D=!1){function B(ye){let re=ye[I];return typeof re>"u"&&D&&(re=Gn(v,B,O)),re}function K(ye=h){return Gn(Gn(x,D,()=>new WeakMap),ye,()=>{let re={};for(let[Ot,we]of Object.entries(n.selectors??{}))re[Ot]=Qu(we,ye,()=>Gn(v,ye,O),D);return re})}return{reducerPath:I,getSelectors:K,get selectors(){return K(B)},selectSlice:B}}let P={name:a,reducer:R,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:O,...z(i),injectInto(I,{reducerPath:D,...B}={}){let K=D??i;return I.inject({reducerPath:K,reducer:R},B),{...P,...z(K,!0)}}};return P}}function Qu(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=Xu();function Ju(){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 ef({type:e,reducerName:t,createNotation:r},n,a){let i,s;if("reducer"in n){if(r&&!rf(n))throw new Error(xt(17));i=n.reducer,s=n.prepare}else i=n;a.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,s?Po(e,s):Po(e))}function tf(e){return e._reducerDefinitionType==="asyncThunk"}function rf(e){return e._reducerDefinitionType==="reducerWithPrepare"}function of({type:e,reducerName:t},r,n,a){if(!a)throw new Error(xt(18));let{payloadCreator:i,fulfilled:s,pending:l,rejected:u,settled:m,options:g}=r,h=a(e,i,g);n.exposeAction(t,h),s&&n.addCase(h.fulfilled,s),l&&n.addCase(h.pending,l),u&&n.addCase(h.rejected,u),m&&n.addMatcher(h.settled,m),n.exposeCaseReducer(t,{fulfilled:s||Wn,pending:l||Wn,rejected:u||Wn,settled:m||Wn})}function Wn(){}var Bc="listener",Hc="completed",Gc="cancelled",p8=`task-${Gc}`,m8=`task-${Hc}`,h8=`${Bc}-${Gc}`,g8=`${Bc}-${Hc}`;var{assign:Wc}=Object;var xi="listenerMiddleware";var nf=Wc(Po(`${xi}/add`),{withTypes:()=>nf}),y8=Po(`${xi}/removeAll`),af=Wc(Po(`${xi}/remove`),{withTypes:()=>af});function xt(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 sf=xn(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)}}}),Vn=class extends sf(Object){};window.ftReduxStores||(window.ftReduxStores={});var Vc=class e extends Vn{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(Ln(i))return i;if(a==null)return;let s=Uc({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),l=$c({reducer:(u,m)=>{if(m.type==="CLEAR_FT_REDUX_STORE"){let g=Oo(s.getInitialState());for(let h of m.keeping)g[h]=(u??g)[h];return g}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 vn,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,g=s[m];return g?(...h)=>{let x=g(...h.map(i));return this.reduxStore.dispatch(x),x}:h=>{let x=m,v=this.getState()[x];Ur(v,h)||this.setState({[x]:i(h)})}}}),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 jn=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 Kn=b(_()),cf="ft-app-info",sr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};sr.eventName="authentication-change";var Do=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Do.eventName="ui-locale-changed";var lf={session:(e,t)=>{(0,Kn.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>U.dispatchEvent(new sr(t.payload)),0))}},U=Kn.FtReduxStore.get({name:cf,reducers:lf,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(_()),Zn=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},V8=(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=>jn.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Zn([(0,vi.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Zn([(0,vi.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Zn([ti({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),Zn([ti({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.TOPIC_COMPARISON="TOPIC_COMPARISON",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 ue;(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.ORG_MANAGER="ORG_MANAGER",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(ue||(ue={}));var Ye;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(Ye||(Ye={}));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 df={[ue.PERSONAL_BOOK_SHARE_USER]:[ue.PERSONAL_BOOK_USER],[ue.HTML_EXPORT_USER]:[ue.PERSONAL_BOOK_USER],[ue.PDF_EXPORT_USER]:[ue.PERSONAL_BOOK_USER],[ue.KHUB_ADMIN]:[ue.CONTENT_PUBLISHER],[ue.ADMIN]:[ue.KHUB_ADMIN,ue.USERS_ADMIN,ue.PORTAL_ADMIN,ue.BEHAVIOR_DATA_USER],[ue.GENERATIVE_AI_EXPORT_USER]:[ue.GENERATIVE_AI_USER]};function kl(e,t){return e===t||(df[e]??[]).some(r=>kl(r,t))}function Si(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=>Si(e,r))}var Jn=b(_());var Ci=b(_());var cr=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 Vr=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:cr.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):cr.await()}};var Be=class extends Vr{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 Ci.CacheRegistry,this.cache=t?a.commonCache:new Ci.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 qn=class extends Be{async listMySearches(){let{session:t}=U.getState();return Si(t,ue.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var Yn=class extends Be{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 Xn=class extends Be{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(`/api/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(`/api/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=U.getState().session;return!!t?.sessionAuthenticated}};var Qn=class extends Be{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await(await this.awaitApi).get("/api/user/assets/labels")).labels,this.CACHE_DURATION):[]}isAuthenticated(){let t=U.getState().session;return!!t?.sessionAuthenticated}};var uf="ft-user-assets",ff={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(Ye).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;Li(e,r,[...Ei(e,r),a]),Pl(e,r,1,n),Dl(e,a)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;Li(e,r,Ei(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;Li(e,r,Ei(e,r).filter(i=>i.id!==a)),Pl(e,r,-1,n)}},$l={[Ye.SEARCHES]:"savedSearches",[Ye.BOOKMARKS]:"bookmarks",[Ye.BOOKS]:void 0,[Ye.COLLECTIONS]:void 0},Ei=(e,t)=>{var r;let n=$l[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},Li=(e,t,r)=>{let n=$l[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===Ye.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)},Ie=Jn.FtReduxStore.get({name:uf,reducers:ff,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Ye).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Ai=class{constructor(t=new Xn,r=new Qn){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=U.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Yn,this.savedSearchesService=new qn,U.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=U.getState();(0,Jn.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(),Ie.actions.clearAssetCount(),Ie.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Ie.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Ie.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();Ie.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();Ie.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&Ie.getState().assetCounts.allAsset[t]!==r.count&&Ie.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&Ie.getState().assetCounts.bookmarkByMap[t]!==r.count&&Ie.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(Ie.getState().assetCounts.bookmarkByMap).length!==0;t===Ye.BOOKMARKS&&r&&Ie.actions.clearBookmarkCountByMap(),Ie.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;Ie.actions.bookmarks(r)}}},pf=new Ai;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=pf);var Oi=class{addCommand(t,r=!1){U.commands.add(t,r)}consumeCommand(t){return U.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Oi;var Xe=b(_());var Fl,jr=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},mf=Symbol("clearAfterUnitTest"),ea=class extends(0,Xe.withEventBus)(Be){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Fl]=()=>{this.defaultMessages={},this.cache=new Xe.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,Xe.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 Xe.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 Xe.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 jr({loadedContexts:t})),this.dispatchEvent(new jr({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new jr({loadedContexts:[t]})),this.dispatchEvent(new jr({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,Xe.delay)(0).then(()=>n()).catch(()=>null)))}};Fl=mf;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends ea{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends ea{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Kr=window.FluidTopicsI18nService,ta=window.FluidTopicsCustomI18nService;var Ul=b(_()),wi=class{highlightHtml(t,r,n){(0,Ul.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new wi;var Bl=b(_());var Ri=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 Ri;var Hl=b(_());var $o=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 _i=class{urlToSearchRequest(t){return $o.get().parse(t)}searchRequestToUrl(t){return $o.get().serialize(t)}};window.FluidTopicsUrlService=new _i;var Rt=b(_());var lr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{nextLocation:t}})}};lr.eventName="before-location-change";var dr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};dr.eventName="change";var zi=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 zi;var ra=class e extends Rt.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,Rt.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new dr(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 lr(u);this.dispatchEvent(m);let g=r(),h={...g===this.currentIndex?this.currentState:void 0,...i,index:g,href:m.detail.nextLocation.href};n.apply(a,[h,s,h.href]),this.setCurrentState(h,!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(lr.eventName,t)}removeBeforeLocationChangeListener(t){this.removeEventListener(lr.eventName,t)}addHistoryChangeListener(t){this.addEventListener(dr.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(dr.eventName,t)}currentItem(){return(0,Rt.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,Rt.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,Rt.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,Rt.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=ra.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($());var Vl=Wl.css`
|
|
2
2
|
`;var Zl=b($()),Ne=b(Z()),fr=b(_());var vt=b(_());function jl(e,t){let{authenticationRequired:r,session:n}=U.getState();return r&&!n?.sessionAuthenticated?Promise.resolve(t):e()}var oa=class extends Vr{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var Ii=class e extends vt.FtStateManager{static build(t){return new e(U,t)}constructor(t,r){super(),this.store=t,this.cache=new vt.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new oa,this.knownContexts=new vt.AbstractRegistry,this.knownCustomComponents=new vt.AbstractRegistry,this.cleanSessionDebouncer=new vt.Debouncer,this.reloadConfiguration=()=>{var n;(n=this.cache)===null||n===void 0||n.clear("availableContentLocales"),this.updateAvailableContentLocales()},this.reloadDebouncer=new vt.Debouncer(500),this.apiProvider=r??(()=>cr.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}addListeners(){this.store.addEventListener(sr.eventName,this.reloadConfiguration)}removeListeners(){this.store.removeEventListener(sr.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 Do(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=Ii.build();var ur=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 Fo=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 ur(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 fr.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 Fo}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=>Kr.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,Ne.property)()],J.prototype,"baseUrl",void 0);be([(0,Ne.property)()],J.prototype,"tenantId",void 0);be([(0,Ne.property)()],J.prototype,"apiIntegrationIdentifier",void 0);be([(0,Ne.property)()],J.prototype,"apiIntegrationAppVersion",void 0);be([(0,Ne.property)()],J.prototype,"uiLocale",void 0);be([(0,fr.jsonProperty)(null)],J.prototype,"availableUiLocales",void 0);be([(0,fr.jsonProperty)(null)],J.prototype,"metadataConfiguration",void 0);be([(0,Ne.property)({type:Boolean})],J.prototype,"editorMode",void 0);be([(0,Ne.property)({type:Boolean})],J.prototype,"noCustom",void 0);be([(0,Ne.property)({type:Boolean})],J.prototype,"openExternalDocumentInNewTab",void 0);be([(0,Ne.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],J.prototype,"noCustomComponent",void 0);be([(0,Ne.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],J.prototype,"noCustomCode",void 0);be([(0,Ne.property)({type:Boolean})],J.prototype,"withManualResources",void 0);be([(0,Ne.property)({type:Boolean})],J.prototype,"navigatorOnline",void 0);be([(0,Ne.property)({type:Boolean})],J.prototype,"forcedOffline",void 0);be([(0,Ne.property)({type:Boolean})],J.prototype,"authenticationRequired",void 0);be([(0,fr.jsonProperty)([])],J.prototype,"messageContexts",void 0);be([(0,fr.jsonProperty)(void 0)],J.prototype,"session",void 0);var Yl=b(_());var ql={"ft-app-context":J};(0,Yl.customElements)(ql);var Zr=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?ta:Kr}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 Yr=b(_());var Xl=b(Z());var Ni=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-]+$/)}},qr=new Ni;var yf=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},Bo=Symbol("i18nAttributes"),Ql=Symbol("i18nListAttributes"),Ho=Symbol("i18nProperties"),na=Symbol("i18nContexts"),Uo=Symbol("i18nUnsubs"),Ht=(0,Yr.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?ta:Kr}i18n(i){let{context:s,key:l,message:u}=i,{custom:m,args:g,argsProvider:h}=i;if(s&&l){this.hasI18nContext(s)||this.addI18nContext(s,void 0,m);let x=g??(h?h(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(qr.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=(g,h,x)=>x?.context&&x.key&&i(g,h,x)?{...x,message:this.i18n({context:x.context,key:x.key,custom:x.custom,...g})}:x;(s=this[Bo])===null||s===void 0||s.forEach((g,h)=>u[h]=m(g,h,u[h])),(l=this[Ql])===null||l===void 0||l.forEach((g,h)=>{var x;return u[h]=(x=u[h])===null||x===void 0?void 0:x.map(v=>m(g,h,v))})}updateI18nProperties(i){var s;(s=this[Ho])===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[na].set(u,{isCustomContext:l}),this[Uo].has(u)||this[Uo].set(u,this.getI18nService(l).subscribe(u,()=>this.onI18nUpdate(u))),this.getI18nService(l).prepareContext(u,s)}hasI18nContext(i){return this[na].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[na].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Uo].forEach(i=>i()),this[Uo].clear()}}return t=na,r=Uo,yf([(0,Xl.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),aa=class extends Ht(Yr.FtLitElement){},ia=class extends Ht(Yr.FtLitElementRedux){};var Go=(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[Ho]=(i=r[Ho])!==null&&i!==void 0?i:new Map,r[Ho].set(n,s)};var Jl=b($());var e1=Jl.css`
|