@fluid-topics/ft-search-result-missing-terms 2.2.15 → 2.2.16

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.
@@ -2,7 +2,7 @@
2
2
  [part="missing-term"] {
3
3
  text-decoration: line-through;
4
4
  }
5
- `;var Ir=y(B());var bn=y(B(),1);var lr=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)};function _n(e,t){return(0,bn.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return qe(e);try{return JSON.parse(r)}catch{return qe(e)}},toAttribute:r=>JSON.stringify(r)},hasChanged:ze,...t??{}})}function vo(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(!Re(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(!Re(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 s=o=>Object.keys(o).filter(a=>o[a]!=null),i=s(e);if(r=i.length,r!==s(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 o=i[n];if(!Re(e[o],t[o]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Re(e,t){try{return vo(e,t)}catch{return!1}}function ze(e,t){return!Re(e,t)}function qe(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function at(e,t){let r=n=>n[e]===!0;return n=>{if(r(n))return n;let s=t(n);return s[e]=!0,s}}var Cn=y(B(),1);var ur=e=>{let t=e??{};return(r,n)=>{var s;let i={hasChanged:ze,attribute:!1,...t};(0,Cn.property)(i)(r,n);let o=r.constructor;o.reduxProperties=new Map(o.reduxProperties),o.reduxProperties.set(n,{selector:(s=t.selector)!==null&&s!==void 0?s:(a=>a[n]),store:t.store})}};var ct=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 oe=y(B(),1);var lt=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 s=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),i=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let o of n)try{await o()}catch(a){s(a);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 Tn=y(Q(),1);var ut=globalThis,Eo=ut.ShadowRoot&&(ut.ShadyCSS===void 0||ut.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var wn=(e,t)=>{if(Eo)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let n=document.createElement("style"),s=ut.litNonce;s!==void 0&&n.setAttribute("nonce",s),n.textContent=r.cssText,e.appendChild(n)}};var dt=class extends Tn.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 wn(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){lr(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 On(e,t,...r){var n;let s=e.querySelector(t);for(let i of r)s=(n=s?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return s}var ke=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},Mn,Rn=Symbol("constructorPrototype"),In=Symbol("constructorName"),Dn=Symbol("exportpartsDebouncer"),kn=Symbol("dynamicDependenciesLoaded"),Ie=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};Ie.eventName="exportparts-updated";var W=class extends dt{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Mn]=new lt(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[Dn].run(()=>{var s,i;!((s=this.exportpartsPrefix)===null||s===void 0)&&s.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[In]=this.constructor.name,this[Rn]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[In]&&Object.setPrototypeOf(this,this[Rn])}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[kn]||(r[kn]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Ie.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Ie.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 Ie)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:s}=this.elementToFocus;if(n!=null){let i=[...s??[],n];r=On(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,s;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((s=this.customStylesheet)!==null&&s!==void 0?s:"")}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,s,i,o,a;let c=h=>h!=null&&h.trim().length>0,l=t.filter(c).map(h=>h.trim());if(l.length===0){this.exportparts=void 0;return}let u=new Set;for(let h of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let g=(i=(s=h.getAttribute("part"))===null||s===void 0?void 0:s.split(" "))!==null&&i!==void 0?i:[],E=(a=(o=h.getAttribute("exportparts"))===null||o===void 0?void 0:o.split(",").map(v=>v.split(":")[1]))!==null&&a!==void 0?a:[],I=[...g,...E].filter(c).map(v=>v.trim());for(let v of I)u.add(v)}if(u.size===0){this.exportparts=void 0;return}let d=[...u.values()].flatMap(h=>l.map(g=>`${h}:${g}--${h}`));this.exportparts=[...this.part,...d].join(", ")}};Mn=Dn;ke([(0,oe.property)()],W.prototype,"exportpartsPrefix",void 0);ke([_n([])],W.prototype,"exportpartsPrefixes",void 0);ke([(0,oe.property)({reflect:!0})],W.prototype,"exportparts",void 0);ke([(0,oe.property)()],W.prototype,"customStylesheet",void 0);ke([(0,oe.property)()],W.prototype,"elementToFocus",void 0);ke([(0,oe.state)()],W.prototype,"useAdoptedStyleSheets",void 0);function pt(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Ke=Symbol("internalReduxEventsUnsubscribers"),te=Symbol("internalStoresUnsubscribers"),ae=Symbol("internalStores"),Ao=at(Symbol("withRedux"),function(e){var t,r,n;class s extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(o){super.willUpdate(o),[...this.reduxConstructor.reduxReactiveProperties].some(a=>o.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[ae].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[ae].values()][0]}getStore(o){return o==null?this.getUnnamedStore():this[ae].get(o)}addStore(o,a){var c;a=(c=a??o.name)!==null&&c!==void 0?c:"default-store",this.unsubscribeFromStore(a),this[ae].set(a,o),this.subscribeToStore(a,o),this.updateFromStores()}removeStore(o){let a=typeof o=="string"?o:o.name;this.unsubscribeFromStore(a),this[ae].delete(a)}setupStores(){this.unsubscribeFromStores(),this[ae].forEach((o,a)=>this.subscribeToStore(a,o)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((o,a)=>{let c=this.constructor.getPropertyOptions(a);if(!c?.attribute||!this.hasAttribute(typeof c?.attribute=="string"?c.attribute:a)){let l=this.getStore(o.store);l&&(o.store?this[te].has(o.store):this[te].size>0)&&(this[a]=o.selector(l.getState(),this))}})}subscribeToStore(o,a){var c;this[te].set(o,a.subscribe(()=>this.updateFromStores())),this[Ke].set(o,[]),pt(a)&&a.eventBus&&((c=this.reduxConstructor.reduxEventListeners)===null||c===void 0||c.forEach((l,u)=>{if(typeof this[u]=="function"&&(!l.store||a.name===l.store)){let d=h=>this[u](h);a.addEventListener(l.eventName,d),this[Ke].get(o).push(()=>a.removeEventListener(l.eventName,d))}})),this.onStoreAvailable(o)}unsubscribeFromStores(){this[te].forEach((o,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(o){var a;this[te].has(o)&&this[te].get(o)(),this[te].delete(o),(a=this[Ke].get(o))===null||a===void 0||a.forEach(c=>c()),this[Ke].delete(o)}onStoreAvailable(o){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=te,r=ae,n=Ke,s.reduxProperties=new Map,s.reduxReactiveProperties=new Set,s.reduxEventListeners=new Map,s}),Nn=class extends Ao(W){};function M(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 xo=typeof Symbol=="function"&&Symbol.observable||"@@observable",Ln=xo,dr=()=>Math.random().toString(36).substring(7).split("").join("."),bo={INIT:`@@redux/INIT${dr()}`,REPLACE:`@@redux/REPLACE${dr()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${dr()}`},ht=bo;function ft(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 pr(e,t,r){if(typeof e!="function")throw new Error(M(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(M(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(M(1));return r(pr)(e,t)}let n=e,s=t,i=new Map,o=i,a=0,c=!1;function l(){o===i&&(o=new Map,i.forEach((v,k)=>{o.set(k,v)}))}function u(){if(c)throw new Error(M(3));return s}function d(v){if(typeof v!="function")throw new Error(M(4));if(c)throw new Error(M(5));let k=!0;l();let F=a++;return o.set(F,v),function(){if(k){if(c)throw new Error(M(6));k=!1,l(),o.delete(F),i=null}}}function h(v){if(!ft(v))throw new Error(M(7));if(typeof v.type>"u")throw new Error(M(8));if(typeof v.type!="string")throw new Error(M(17));if(c)throw new Error(M(9));try{c=!0,s=n(s,v)}finally{c=!1}return(i=o).forEach(F=>{F()}),v}function g(v){if(typeof v!="function")throw new Error(M(10));n=v,h({type:ht.REPLACE})}function E(){let v=d;return{subscribe(k){if(typeof k!="object"||k===null)throw new Error(M(11));function F(){let A=k;A.next&&A.next(u())}return F(),{unsubscribe:v(F)}},[Ln](){return this}}}return h({type:ht.INIT}),{dispatch:h,subscribe:d,getState:u,replaceReducer:g,[Ln]:E}}function _o(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:ht.INIT})>"u")throw new Error(M(12));if(typeof r(void 0,{type:ht.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(M(13))})}function Pn(e){let t=Object.keys(e),r={};for(let o=0;o<t.length;o++){let a=t[o];typeof e[a]=="function"&&(r[a]=e[a])}let n=Object.keys(r),s,i;try{_o(r)}catch(o){i=o}return function(a={},c){if(i)throw i;let l=!1,u={};for(let d=0;d<n.length;d++){let h=n[d],g=r[h],E=a[h],I=g(E,c);if(typeof I>"u"){let v=c&&c.type;throw new Error(M(14))}u[h]=I,l=l||I!==E}return l=l||n.length!==Object.keys(a).length,l?u:a}}function We(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function Fn(...e){return t=>(r,n)=>{let s=t(r,n),i=()=>{throw new Error(M(15))},o={getState:s.getState,dispatch:(c,...l)=>i(c,...l)},a=e.map(c=>c(o));return i=We(...a)(s.dispatch),{...s,dispatch:i}}}function Un(e){return ft(e)&&"type"in e&&typeof e.type=="string"}var Wn=Symbol.for("immer-nothing"),$n=Symbol.for("immer-draftable"),D=Symbol.for("immer-state");function z(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var U=Object,De=U.getPrototypeOf,St="constructor",_t="prototype",mr="configurable",vt="enumerable",mt="writable",Ge="value",G=e=>!!e&&!!e[D];function $(e){return e?Gn(e)||wt(e)||!!e[$n]||!!e[St]?.[$n]||Tt(e)||Ot(e):!1}var Co=U[_t][St].toString(),Bn=new WeakMap;function Gn(e){if(!e||!_r(e))return!1;let t=De(e);if(t===null||t===U[_t])return!0;let r=U.hasOwnProperty.call(t,St)&&t[St];if(r===Object)return!0;if(!Me(r))return!1;let n=Bn.get(r);return n===void 0&&(n=Function.toString.call(r),Bn.set(r,n)),n===Co}function Ct(e,t,r=!0){Xe(e)===0?(r?Reflect.ownKeys(e):U.keys(e)).forEach(s=>{t(s,e[s],e)}):e.forEach((n,s)=>t(s,n,e))}function Xe(e){let t=e[D];return t?t.type_:wt(e)?1:Tt(e)?2:Ot(e)?3:0}var hr=(e,t,r=Xe(e))=>r===2?e.has(t):U[_t].hasOwnProperty.call(e,t),gr=(e,t,r=Xe(e))=>r===2?e.get(t):e[t],Et=(e,t,r,n=Xe(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function wo(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var wt=Array.isArray,Tt=e=>e instanceof Map,Ot=e=>e instanceof Set,_r=e=>typeof e=="object",Me=e=>typeof e=="function",fr=e=>typeof e=="boolean";function To(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var Y=e=>e.copy_||e.base_;var Cr=e=>e.modified_?e.copy_:e.base_;function Sr(e,t){if(Tt(e))return new Map(e);if(Ot(e))return new Set(e);if(wt(e))return Array[_t].slice.call(e);let r=Gn(e);if(t===!0||t==="class_only"&&!r){let n=U.getOwnPropertyDescriptors(e);delete n[D];let s=Reflect.ownKeys(n);for(let i=0;i<s.length;i++){let o=s[i],a=n[o];a[mt]===!1&&(a[mt]=!0,a[mr]=!0),(a.get||a.set)&&(n[o]={[mr]:!0,[mt]:!0,[vt]:a[vt],[Ge]:e[o]})}return U.create(De(e),n)}else{let n=De(e);if(n!==null&&r)return{...e};let s=U.create(n);return U.assign(s,e)}}function wr(e,t=!1){return Rt(e)||G(e)||!$(e)||(Xe(e)>1&&U.defineProperties(e,{set:yt,add:yt,clear:yt,delete:yt}),U.freeze(e),t&&Ct(e,(r,n)=>{wr(n,!0)},!1)),e}function Oo(){z(2)}var yt={[Ge]:Oo};function Rt(e){return e===null||!_r(e)?!0:U.isFrozen(e)}var At="MapSet",vr="Patches",Hn="ArrayMethods",Qn={};function ce(e){let t=Qn[e];return t||z(0,e),t}var jn=e=>!!Qn[e];var Qe,Yn=()=>Qe,Ro=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:jn(At)?ce(At):void 0,arrayMethodsPlugin_:jn(Hn)?ce(Hn):void 0});function Vn(e,t){t&&(e.patchPlugin_=ce(vr),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Er(e){Ar(e),e.drafts_.forEach(Io),e.drafts_=null}function Ar(e){e===Qe&&(Qe=e.parent_)}var qn=e=>Qe=Ro(Qe,e);function Io(e){let t=e[D];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function zn(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(e!==void 0&&e!==r){r[D].modified_&&(Er(t),z(4)),$(e)&&(e=Kn(t,e));let{patchPlugin_:s}=t;s&&s.generateReplacementPatches_(r[D].base_,e,t)}else e=Kn(t,r);return ko(t,e,!0),Er(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Wn?e:void 0}function Kn(e,t){if(Rt(t))return t;let r=t[D];if(!r)return xt(t,e.handledSet_,e);if(!It(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);Zn(r,e)}return r.copy_}function ko(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&wr(t,r)}function Xn(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var It=(e,t)=>e.scope_===t,Mo=[];function Jn(e,t,r,n){let s=Y(e),i=e.type_;if(n!==void 0&&gr(s,n,i)===t){Et(s,n,r,i);return}if(!e.draftLocations_){let a=e.draftLocations_=new Map;Ct(s,(c,l)=>{if(G(l)){let u=a.get(l)||[];u.push(c),a.set(l,u)}})}let o=e.draftLocations_.get(t)??Mo;for(let a of o)Et(s,a,r,i)}function Do(e,t,r){e.callbacks_.push(function(s){let i=t;if(!i||!It(i,s))return;s.mapSetPlugin_?.fixSetContents(i);let o=Cr(i);Jn(e,i.draft_??i,o,r),Zn(i,s)})}function Zn(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 s=n.getPath(e);s&&n.generatePatches_(e,s,t)}Xn(e)}}function No(e,t,r){let{scope_:n}=e;if(G(r)){let s=r[D];It(s,n)&&s.callbacks_.push(function(){gt(e);let o=Cr(s);Jn(e,r,o,t)})}else $(r)&&e.callbacks_.push(function(){let i=Y(e);e.type_===3?i.has(r)&&xt(r,n.handledSet_,n):gr(i,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&xt(gr(e.copy_,t,e.type_),n.handledSet_,n)})}function xt(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||G(e)||t.has(e)||!$(e)||Rt(e)||(t.add(e),Ct(e,(n,s)=>{if(G(s)){let i=s[D];if(It(i,r)){let o=Cr(i);Et(e,n,o,e.type_),Xn(i)}}else $(s)&&xt(s,t,r)})),e}function Lo(e,t){let r=wt(e),n={type_:r?1:0,scope_:t?t.scope_:Yn(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},s=n,i=bt;r&&(s=[n],i=Ye);let{revoke:o,proxy:a}=Proxy.revocable(s,i);return n.draft_=a,n.revoke_=o,[a,n]}var bt={get(e,t){if(t===D)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 s=Y(e);if(!hr(s,t,e.type_))return Fo(e,s,t);let i=s[t];if(e.finalized_||!$(i)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&To(t))return i;if(i===yr(e.base_,t)||Po(e,t,i)){gt(e);let o=e.type_===1?+t:t,a=br(e.scope_,i,e,o);return e.copy_[o]=a}return i},has(e,t){return t in Y(e)},ownKeys(e){return Reflect.ownKeys(Y(e))},set(e,t,r){let n=es(Y(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let s=yr(Y(e),t),i=s?.[D];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(wo(r,s)&&(r!==void 0||hr(e.base_,t,e.type_)))return!0;gt(e),xr(e)}return e.copy_[t]===r&&(r!==void 0||hr(e.copy_,t,e.type_))||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),No(e,t,r)),!0},deleteProperty(e,t){return gt(e),yr(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),xr(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Y(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[mt]:!0,[mr]:e.type_!==1||t!=="length",[vt]:n[vt],[Ge]:r[t]}},defineProperty(){z(11)},getPrototypeOf(e){return De(e.base_)},setPrototypeOf(){z(12)}},Ye={};for(let e in bt){let t=bt[e];Ye[e]=function(){let r=arguments;return r[0]=r[0][0],t.apply(this,r)}}Ye.deleteProperty=function(e,t){return Ye.set.call(this,e,t,void 0)};Ye.set=function(e,t,r){return bt.set.call(this,e[0],t,r,e[0])};function yr(e,t){let r=e[D];return(r?Y(r):e)[t]}function Po(e,t,r){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!$(r)||r[D]?!1:e.baseRefs_.has(r)}function Fo(e,t,r){let n=es(t,r);return n?Ge in n?n[Ge]:n.get?.call(e.draft_):void 0}function es(e,t){if(!(t in e))return;let r=De(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=De(r)}}function xr(e){e.modified_||(e.modified_=!0,e.parent_&&xr(e.parent_))}function gt(e){e.copy_||(e.assigned_=new Map,e.copy_=Sr(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Uo=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(Me(t)&&!Me(r)){let i=r;r=t;let o=this;return function(c=i,...l){return o.produce(c,u=>r.call(this,u,...l))}}Me(r)||z(6),n!==void 0&&!Me(n)&&z(7);let s;if($(t)){let i=qn(this),o=br(i,t,void 0),a=!0;try{s=r(o),a=!1}finally{a?Er(i):Ar(i)}return Vn(i,n),zn(s,i)}else if(!t||!_r(t)){if(s=r(t),s===void 0&&(s=t),s===Wn&&(s=void 0),this.autoFreeze_&&wr(s,!0),n){let i=[],o=[];ce(vr).generateReplacementPatches_(t,s,{patches_:i,inversePatches_:o}),n(i,o)}return s}else z(1,t)},this.produceWithPatches=(t,r)=>{if(Me(t))return(o,...a)=>this.produceWithPatches(o,c=>t(c,...a));let n,s;return[this.produce(t,r,(o,a)=>{n=o,s=a}),n,s]},fr(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),fr(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),fr(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){$(e)||z(8),G(e)&&(e=ts(e));let t=qn(this),r=br(t,e,void 0);return r[D].isManual_=!0,Ar(t),r}finishDraft(e,t){let r=e&&e[D];(!r||!r.isManual_)&&z(9);let{scope_:n}=r;return Vn(n,t),zn(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 s=t[r];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}r>-1&&(t=t.slice(r+1));let n=ce(vr).applyPatches_;return G(e)?n(e,t):this.produce(e,s=>n(s,t))}};function br(e,t,r,n){let[s,i]=Tt(t)?ce(At).proxyMap_(t,r):Ot(t)?ce(At).proxySet_(t,r):Lo(t,r);return(r?.scope_??Yn()).drafts_.push(s),i.callbacks_=r?.callbacks_??[],i.key_=n,r&&n!==void 0?Do(r,i,n):i.callbacks_.push(function(c){c.mapSetPlugin_?.fixSetContents(i);let{patchPlugin_:l}=c;i.modified_&&l&&l.generatePatches_(i,[],c)}),s}function ts(e){return G(e)||z(10,e),rs(e)}function rs(e){if(!$(e)||Rt(e))return e;let t=e[D],r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Sr(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Sr(e,!0);return Ct(r,(s,i)=>{Et(r,s,rs(i))},n),t&&(t.finalized_=!1),r}var $o=globalThis.Iterator,Ac=typeof $o?.from=="function";var Bo=new Uo,Tr=Bo.produce;function ns(e){return({dispatch:r,getState:n})=>s=>i=>typeof i=="function"?i(r,n,e):s(i)}var ss=ns(),is=ns;var Ho=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?We:We.apply(null,arguments)},Oc=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},jo=e=>e&&typeof e.match=="function";function re(e,t){function r(...n){if(t){let s=t(...n);if(!s)throw new Error(X(0));return{type:e,payload:s.payload,..."meta"in s&&{meta:s.meta},..."error"in s&&{error:s.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>Un(n)&&n.type===e,r}var us=class Je extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Je.prototype)}static get[Symbol.species](){return Je}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Je(...t[0].concat(this)):new Je(...t.concat(this))}};function os(e){return $(e)?Tr(e,()=>{}):e}function kt(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function Vo(e){return typeof e=="boolean"}var qo=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:s=!0,actionCreatorCheck:i=!0}=t??{},o=new us;return r&&(Vo(r)?o.push(ss):o.push(is(r.extraArgument))),o},zo="RTK_autoBatch";var as=e=>t=>{setTimeout(t,e)},Ko=(e,t)=>r=>{let n=!1,s=()=>{n||(n=!0,cancelAnimationFrame(i),clearTimeout(o),r())},i=e(s),o=setTimeout(s,t)},Wo=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),s=!0,i=!1,o=!1,a=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?Ko(window.requestAnimationFrame,100):as(10):e.type==="callback"?e.queueNotification:as(e.timeout),l=()=>{o=!1,i&&(i=!1,a.forEach(u=>u()))};return Object.assign({},n,{subscribe(u){let d=()=>s&&u(),h=n.subscribe(d);return a.add(u),()=>{h(),a.delete(u)}},dispatch(u){try{return s=!u?.meta?.[zo],i=!s,i&&(o||(o=!0,c(l))),n.dispatch(u)}finally{s=!0}}})},Go=e=>function(r){let{autoBatch:n=!0}=r??{},s=new us(e);return n&&s.push(Wo(typeof n=="object"?n:void 0)),s};function ds(e){let t=qo(),{reducer:r=void 0,middleware:n,devTools:s=!0,duplicateMiddlewareCheck:i=!0,preloadedState:o=void 0,enhancers:a=void 0}=e||{},c;if(typeof r=="function")c=r;else if(ft(r))c=Pn(r);else throw new Error(X(1));let l;typeof n=="function"?l=n(t):l=t();let u=We;s&&(u=Ho({trace:!1,...typeof s=="object"&&s}));let d=Fn(...l),h=Go(d),g=typeof a=="function"?a(h):h(),E=u(...g);return pr(c,o,E)}function ps(e){let t={},r=[],n,s={addCase(i,o){let a=typeof i=="string"?i:i.type;if(!a)throw new Error(X(28));if(a in t)throw new Error(X(29));return t[a]=o,s},addAsyncThunk(i,o){return o.pending&&(t[i.pending.type]=o.pending),o.rejected&&(t[i.rejected.type]=o.rejected),o.fulfilled&&(t[i.fulfilled.type]=o.fulfilled),o.settled&&r.push({matcher:i.settled,reducer:o.settled}),s},addMatcher(i,o){return r.push({matcher:i,reducer:o}),s},addDefaultCase(i){return n=i,s}};return e(s),[t,r,n]}function Qo(e){return typeof e=="function"}function Yo(e,t){let[r,n,s]=ps(t),i;if(Qo(e))i=()=>os(e());else{let a=os(e);i=()=>a}function o(a=i(),c){let l=[r[c.type],...n.filter(({matcher:u})=>u(c)).map(({reducer:u})=>u)];return l.filter(u=>!!u).length===0&&(l=[s]),l.reduce((u,d)=>{if(d)if(G(u)){let g=d(u,c);return g===void 0?u:g}else{if($(u))return Tr(u,h=>d(h,c));{let h=d(u,c);if(h===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return h}}return u},a)}return o.getInitialState=i,o}var Xo=(e,t)=>jo(e)?e.match(t):e(t);function Jo(...e){return t=>e.some(r=>Xo(r,t))}var Zo="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ea=(e=21)=>{let t="",r=e;for(;r--;)t+=Zo[Math.random()*64|0];return t},ta=["name","message","stack","code"],Or=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},cs=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},ra=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of ta)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},ls="External signal was aborted",na=(()=>{function e(t,r,n){let s=re(t+"/fulfilled",(c,l,u,d)=>({payload:c,meta:{...d||{},arg:u,requestId:l,requestStatus:"fulfilled"}})),i=re(t+"/pending",(c,l,u)=>({payload:void 0,meta:{...u||{},arg:l,requestId:c,requestStatus:"pending"}})),o=re(t+"/rejected",(c,l,u,d,h)=>({payload:d,error:(n&&n.serializeError||ra)(c||"Rejected"),meta:{...h||{},arg:u,requestId:l,rejectedWithValue:!!d,requestStatus:"rejected",aborted:c?.name==="AbortError",condition:c?.name==="ConditionError"}}));function a(c,{signal:l}={}){return(u,d,h)=>{let g=n?.idGenerator?n.idGenerator(c):ea(),E=new AbortController,I,v;function k(S){v=S,E.abort()}l&&(l.aborted?k(ls):l.addEventListener("abort",()=>k(ls),{once:!0}));let F=(async function(){let S;try{let x=n?.condition?.(c,{getState:d,extra:h});if(ia(x)&&(x=await x),x===!1||E.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let K=new Promise((C,T)=>{I=()=>{T({name:"AbortError",message:v||"Aborted"})},E.signal.addEventListener("abort",I,{once:!0})});u(i(g,c,n?.getPendingMeta?.({requestId:g,arg:c},{getState:d,extra:h}))),S=await Promise.race([K,Promise.resolve(r(c,{dispatch:u,getState:d,extra:h,requestId:g,signal:E.signal,abort:k,rejectWithValue:((C,T)=>new Or(C,T)),fulfillWithValue:((C,T)=>new cs(C,T))})).then(C=>{if(C instanceof Or)throw C;return C instanceof cs?s(C.payload,g,c,C.meta):s(C,g,c)})])}catch(x){S=x instanceof Or?o(null,g,c,x.payload,x.meta):o(x,g,c)}finally{I&&E.signal.removeEventListener("abort",I)}return n&&!n.dispatchConditionRejection&&o.match(S)&&S.meta.condition||u(S),S})();return Object.assign(F,{abort:k,requestId:g,arg:c,unwrap(){return F.then(sa)}})}}return Object.assign(a,{pending:i,rejected:o,fulfilled:s,settled:Jo(o,s),typePrefix:t})}return e.withTypes=()=>e,e})();function sa(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function ia(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var hs=Symbol.for("rtk-slice-createasyncthunk"),Ic={[hs]:na};function oa(e,t){return`${e}/${t}`}function aa({creators:e}={}){let t=e?.asyncThunk?.[hs];return function(n){let{name:s,reducerPath:i=s}=n;if(!s)throw new Error(X(11));typeof process<"u";let o=(typeof n.reducers=="function"?n.reducers(la()):n.reducers)||{},a=Object.keys(o),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},l={addCase(S,A){let x=typeof S=="string"?S:S.type;if(!x)throw new Error(X(12));if(x in c.sliceCaseReducersByType)throw new Error(X(13));return c.sliceCaseReducersByType[x]=A,l},addMatcher(S,A){return c.sliceMatchers.push({matcher:S,reducer:A}),l},exposeAction(S,A){return c.actionCreators[S]=A,l},exposeCaseReducer(S,A){return c.sliceCaseReducersByName[S]=A,l}};a.forEach(S=>{let A=o[S],x={reducerName:S,type:oa(s,S),createNotation:typeof n.reducers=="function"};da(A)?ha(x,A,l,t):ua(x,A,l)});function u(){let[S={},A=[],x=void 0]=typeof n.extraReducers=="function"?ps(n.extraReducers):[n.extraReducers],K={...S,...c.sliceCaseReducersByType};return Yo(n.initialState,C=>{for(let T in K)C.addCase(T,K[T]);for(let T of c.sliceMatchers)C.addMatcher(T.matcher,T.reducer);for(let T of A)C.addMatcher(T.matcher,T.reducer);x&&C.addDefaultCase(x)})}let d=S=>S,h=new Map,g=new WeakMap,E;function I(S,A){return E||(E=u()),E(S,A)}function v(){return E||(E=u()),E.getInitialState()}function k(S,A=!1){function x(C){let T=C[S];return typeof T>"u"&&A&&(T=kt(g,x,v)),T}function K(C=d){let T=kt(h,A,()=>new WeakMap);return kt(T,C,()=>{let fn={};for(let[uo,po]of Object.entries(n.selectors??{}))fn[uo]=ca(po,C,()=>kt(g,C,v),A);return fn})}return{reducerPath:S,getSelectors:K,get selectors(){return K(x)},selectSlice:x}}let F={name:s,reducer:I,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:v,...k(i),injectInto(S,{reducerPath:A,...x}={}){let K=A??i;return S.inject({reducerPath:K,reducer:I},x),{...F,...k(K,!0)}}};return F}}function ca(e,t,r,n){function s(i,...o){let a=t(i);return typeof a>"u"&&n&&(a=r()),e(a,...o)}return s.unwrapped=e,s}var fs=aa();function la(){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 ua({type:e,reducerName:t,createNotation:r},n,s){let i,o;if("reducer"in n){if(r&&!pa(n))throw new Error(X(17));i=n.reducer,o=n.prepare}else i=n;s.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,o?re(e,o):re(e))}function da(e){return e._reducerDefinitionType==="asyncThunk"}function pa(e){return e._reducerDefinitionType==="reducerWithPrepare"}function ha({type:e,reducerName:t},r,n,s){if(!s)throw new Error(X(18));let{payloadCreator:i,fulfilled:o,pending:a,rejected:c,settled:l,options:u}=r,d=s(e,i,u);n.exposeAction(t,d),o&&n.addCase(d.fulfilled,o),a&&n.addCase(d.pending,a),c&&n.addCase(d.rejected,c),l&&n.addMatcher(d.settled,l),n.exposeCaseReducer(t,{fulfilled:o||Mt,pending:a||Mt,rejected:c||Mt,settled:l||Mt})}function Mt(){}var ys="listener",ms="completed",gs="cancelled",kc=`task-${gs}`,Mc=`task-${ms}`,Dc=`${ys}-${gs}`,Nc=`${ys}-${ms}`;var{assign:Ss}=Object;var Rr="listenerMiddleware";var fa=Ss(re(`${Rr}/add`),{withTypes:()=>fa}),Lc=re(`${Rr}/removeAll`),ya=Ss(re(`${Rr}/remove`),{withTypes:()=>ya});function X(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 ma=at(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,s){this.eventBus.addEventListener(r,n,s)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,s){this.eventBus.removeEventListener(r,n,s)}}}),Dt=class extends ma(Object){};window.ftReduxStores||(window.ftReduxStores={});var vs=class e extends Dt{static get(t){var r;let n=typeof t=="string"?t:t.name,s=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(pt(i))return i;if(s==null)return;let o=fs({...s,reducers:(r=s.reducers)!==null&&r!==void 0?r:{}}),a=ds({reducer:(c,l)=>{if(l.type==="CLEAR_FT_REDUX_STORE"){let u=qe(o.getInitialState());for(let d of l.keeping)u[d]=(c??u)[d];return u}else if(typeof l.type=="string"&&l.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...c,...l.overwrites};return o.reducer(c,l)}});return window.ftReduxStores[s.name]=new e(o,a,s.eventBus)}constructor(t,r,n){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new ct,this.injectInto=(i,o)=>this.reduxSlice.injectInto(i,o),this.selectSlice=i=>this.reduxSlice.selectSlice(i);let s=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,o,a)=>{let c=o,l=i[c];return l?(...u)=>{let d=l(...u.map(s));return this.reduxStore.dispatch(d),d}:u=>{let d=c,h=this.getState()[d];Re(h,u)||this.setState({[d]:s(u)})}}}),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 Nt=class{static format(t,r,n,s,i){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(n,s,!!i)):this.getIntlDateTime(t,r,n,s,!!i)}static getMomentDateFormat(t,r,n){return n?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,n,s,i){let o=typeof t=="string"?new Date(t):t,a=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(o),c=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(o);return i?c:s?`${a} ${c}`:a}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 Lt=y(b()),ga="ft-app-info",ne=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};ne.eventName="authentication-change";var Ze=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Ze.eventName="ui-locale-changed";var Sa={session:(e,t)=>{(0,Lt.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>m.dispatchEvent(new ne(t.payload)),0))}},m=Lt.FtReduxStore.get({name:ga,reducers:Sa,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 Es=y(b()),Pt=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},dl=(0,Es.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(m)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var s,i;return((i=(s=this.metadataDescriptors.find(a=>a.key===n))===null||s===void 0?void 0:s.date)!==null&&i!==void 0?i:!1)?a=>Nt.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Pt([(0,Ir.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Pt([(0,Ir.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Pt([ur({store:m.name,selector:r=>{var n,s;return(s=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&s!==void 0?s:[]}})],t.prototype,"metadataDescriptors",void 0),Pt([ur({store:m.name})],t.prototype,"uiLocale",void 0),t});var As;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(As||(As={}));var xs;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(xs||(xs={}));var bs;(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"})(bs||(bs={}));var _s;(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"})(_s||(_s={}));var Cs;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Cs||(Cs={}));var ws;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(ws||(ws={}));var Ts;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(Ts||(Ts={}));var Os;(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"})(Os||(Os={}));var Rs;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(Rs||(Rs={}));var Is;(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"})(Is||(Is={}));var ks;(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"})(ks||(ks={}));var Ms;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(Ms||(Ms={}));var Ds;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(Ds||(Ds={}));var Ns;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(Ns||(Ns={}));var Ls;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(Ls||(Ls={}));var Ps;(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"})(Ps||(Ps={}));var kr;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(kr||(kr={}));var Fs;(function(e){e.ASC="ASC",e.DESC="DESC"})(Fs||(Fs={}));var Us;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(Us||(Us={}));var Mr;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(Mr||(Mr={}));var $s;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})($s||($s={}));var Bs;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(Bs||(Bs={}));var Hs;(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"})(Hs||(Hs={}));var js;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(js||(js={}));var Vs;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Vs||(Vs={}));var Dr;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Dr||(Dr={}));var qs;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(qs||(qs={}));var w;(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"})(w||(w={}));var H;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(H||(H={}));var zs;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(zs||(zs={}));var Ks;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(Ks||(Ks={}));var Ws;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(Ws||(Ws={}));var Gs;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SUMMARY="SUMMARY",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.DOCUMENTATION="DOCUMENTATION",e.OTHER="OTHER"})(Gs||(Gs={}));var Qs;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(Qs||(Qs={}));var Ys;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Ys||(Ys={}));var Xs;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Xs||(Xs={}));var Js;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(Js||(Js={}));var Zs;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(Zs||(Zs={}));var ei;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(ei||(ei={}));var ti;(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"})(ti||(ti={}));var ri;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(ri||(ri={}));var va={[w.PERSONAL_BOOK_SHARE_USER]:[w.PERSONAL_BOOK_USER],[w.HTML_EXPORT_USER]:[w.PERSONAL_BOOK_USER],[w.PDF_EXPORT_USER]:[w.PERSONAL_BOOK_USER],[w.KHUB_ADMIN]:[w.CONTENT_PUBLISHER],[w.ADMIN]:[w.KHUB_ADMIN,w.USERS_ADMIN,w.PORTAL_ADMIN,w.BEHAVIOR_DATA_USER],[w.GENERATIVE_AI_EXPORT_USER]:[w.GENERATIVE_AI_USER]};function ni(e,t){return e===t||(va[e]??[]).some(r=>ni(r,t))}function Nr(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=>ni(n,t))}var Ht=y(b());var Lr=y(b());var le=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=m.getState(),s=t??n;if(r&&s&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,s,!0)}static await(t){return new Promise(r=>{let n=e.get(t);if(n)r(n);else{let s=m.subscribe(()=>{n=e.get(t),n&&(s(),r(n))})}})}};var Ne=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:le.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):le.await()}};var P=class extends Ne{constructor(t=!0,r){var n;super(r),this.sortObjectFields=(i,o)=>typeof o!="object"||o==null||Array.isArray(o)?o:Object.fromEntries(Object.entries(o).sort(([a],[c])=>a.localeCompare(c)));let s=this.constructor;s.commonCache=(n=s.commonCache)!==null&&n!==void 0?n:new Lr.CacheRegistry,this.cache=t?s.commonCache:new Lr.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 Ft=class extends P{async listMySearches(){let{session:t}=m.getState();return Nr(t,w.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var Ut=class extends P{async listMyBookmarks(){let t=m.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var $t=class extends P{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=m.getState().session;return!!t?.sessionAuthenticated}};var Bt=class extends P{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=m.getState().session;return!!t?.sessionAuthenticated}};var Ea="ft-user-assets",Aa={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(H).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:s}=t.payload;Fr(e,r,[...Pr(e,r),s]),si(e,r,1,n),ii(e,s)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;Fr(e,r,Pr(e,r).map(s=>s.id===n.id?n:s)),ii(e,n)},removeAsset:(e,t)=>{let{assetType:r,mapId:n,assetId:s}=t.payload;Fr(e,r,Pr(e,r).filter(i=>i.id!==s)),si(e,r,-1,n)}},oi={[H.SEARCHES]:"savedSearches",[H.BOOKMARKS]:"bookmarks",[H.BOOKS]:void 0,[H.COLLECTIONS]:void 0},Pr=(e,t)=>{var r;let n=oi[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},Fr=(e,t,r)=>{let n=oi[t];n&&(e[n]=r)},si=(e,t,r,n)=>{let s=e.assetCounts.allAsset[t];if(s!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,s+r),t===H.BOOKMARKS&&n)){let i=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,i+r)}},ii=(e,t)=>{let r=e.assetLabels.map(s=>s.title),n=t.labels.filter(s=>!r.includes(s)).map(s=>({title:s}));e.assetLabels.push(...n)},N=Ht.FtReduxStore.get({name:Ea,reducers:Aa,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(H).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Ur=class{constructor(t=new $t,r=new Bt){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=m.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Ut,this.savedSearchesService=new Ft,m.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=m.getState();(0,Ht.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(),N.actions.clearAssetCount(),N.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),N.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),N.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();N.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();N.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&N.getState().assetCounts.allAsset[t]!==r.count&&N.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&N.getState().assetCounts.bookmarkByMap[t]!==r.count&&N.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(N.getState().assetCounts.bookmarkByMap).length!==0;t===H.BOOKMARKS&&r&&N.actions.clearBookmarkCountByMap(),N.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;N.actions.bookmarks(r)}}},xa=new Ur;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=xa);var $r=class{addCommand(t,r=!1){m.commands.add(t,r)}consumeCommand(t){return m.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new $r;var j=y(b());var ai,Le=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},ba=Symbol("clearAfterUnitTest"),jt=class extends(0,j.withEventBus)(P){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[ai]=()=>{this.defaultMessages={},this.cache=new j.CacheRegistry,this.listeners={}},this.currentUiLocale=m.getState().uiLocale,m.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=m.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 s={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,j.deepEqual)(this.defaultMessages[t],s)||(this.defaultMessages[t]=s,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 s;let i=t.toLowerCase(),o=this.resolveContext(i);return new j.ParametrizedLabelResolver((s=this.defaultMessages[i])!==null&&s!==void 0?s:{},o).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(s){!(s instanceof j.CanceledPromiseError)&&r&&console.error(s)}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 s;return(s=this.listeners[t])===null||s===void 0?void 0:s.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new Le({loadedContexts:t})),this.dispatchEvent(new Le({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new Le({loadedContexts:[t]})),this.dispatchEvent(new Le({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,j.delay)(0).then(()=>n()).catch(()=>null)))}};ai=ba;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends jt{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends jt{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Pe=window.FluidTopicsI18nService,Vt=window.FluidTopicsCustomI18nService;var ci=y(b()),Br=class{highlightHtml(t,r,n){(0,ci.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new Br;var li=y(b());var Hr=class{isDate(t){var r,n,s,i;return(i=(s=((n=(r=m.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(a=>a.key===t))===null||s===void 0?void 0:s.date)!==null&&i!==void 0?i:!1}format(t,r){var n,s,i,o;if(t==null)return"";try{return li.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:m.getState().uiLocale,(s=r?.longFormat)!==null&&s!==void 0?s:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1,(o=r?.onlyTime)!==null&&o!==void 0?o:!1)}catch(a){throw console.error(`Date ${JSON.stringify(t)} is not valid`,a),a}}};window.FluidTopicsDateService=new Hr;var ui=y(b());var et=class{static get(t,r){var n,s,i,o;let a=m.getState(),{lang:c,region:l}=(i=(s=(n=a.localesConfiguration)===null||n===void 0?void 0:n.defaultLocales)===null||s===void 0?void 0:s.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new ui.SearchPlaceConverter(a.baseUrl,t??20,(o=a.localesConfiguration)===null||o===void 0?void 0:o.allLanguagesAllowed,r??`${c}-${l}`)}};var jr=class{urlToSearchRequest(t){return et.get().parse(t)}searchRequestToUrl(t){return et.get().serialize(t)}};window.FluidTopicsUrlService=new jr;var J=y(b());var ue=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{nextLocation:t}})}};ue.eventName="before-location-change";var de=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};de.eventName="change";var Vr=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))}},di=new Vr;var qt=class e extends J.WithEventBus{static build(){return new e(window.history,di,()=>window.location,!1)}constructor(t,r,n,s){var i,o;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(o=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&o!==void 0?o:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(s)}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,J.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new de(this.currentItem())),0)}installProxies(){let t=r=>(n,s,[i,o,a])=>{let c=new ue(new URL(typeof a=="string"?a:(a??this.windowLocation()).href,window.location.origin));this.dispatchEvent(c);let l=r(),u={...l===this.currentIndex?this.currentState:void 0,...i,index:l,href:c.detail.nextLocation.href};n.apply(s,[u,o,u.href]),this.setCurrentState(u,!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(ue.eventName,t)}removeBeforeLocationChangeListener(t){this.removeEventListener(ue.eventName,t)}addHistoryChangeListener(t){this.addEventListener(de.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(de.eventName,t)}currentItem(){return(0,J.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,J.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,J.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,J.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 s=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(s=i),i++;return s}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 s=r??this.currentState.majorStateId,i=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=s}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=qt.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 pi=y(Q());var hi=pi.css`
5
+ `;var Ir=y(B());var bn=y(B(),1);var lr=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)};function _n(e,t){return(0,bn.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return qe(e);try{return JSON.parse(r)}catch{return qe(e)}},toAttribute:r=>JSON.stringify(r)},hasChanged:ze,...t??{}})}function vo(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(!Re(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(!Re(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 s=o=>Object.keys(o).filter(a=>o[a]!=null),i=s(e);if(r=i.length,r!==s(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 o=i[n];if(!Re(e[o],t[o]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Re(e,t){try{return vo(e,t)}catch{return!1}}function ze(e,t){return!Re(e,t)}function qe(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function at(e,t){let r=n=>n[e]===!0;return n=>{if(r(n))return n;let s=t(n);return s[e]=!0,s}}var Cn=y(B(),1);var ur=e=>{let t=e??{};return(r,n)=>{var s;let i={hasChanged:ze,attribute:!1,...t};(0,Cn.property)(i)(r,n);let o=r.constructor;o.reduxProperties=new Map(o.reduxProperties),o.reduxProperties.set(n,{selector:(s=t.selector)!==null&&s!==void 0?s:(a=>a[n]),store:t.store})}};var ct=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 oe=y(B(),1);var lt=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 s=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),i=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let o of n)try{await o()}catch(a){s(a);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 Tn=y(Q(),1);var ut=globalThis,Eo=ut.ShadowRoot&&(ut.ShadyCSS===void 0||ut.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var wn=(e,t)=>{if(Eo)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let n=document.createElement("style"),s=ut.litNonce;s!==void 0&&n.setAttribute("nonce",s),n.textContent=r.cssText,e.appendChild(n)}};var dt=class extends Tn.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 wn(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){lr(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 On(e,t,...r){var n;let s=e.querySelector(t);for(let i of r)s=(n=s?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return s}var ke=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},Mn,Rn=Symbol("constructorPrototype"),In=Symbol("constructorName"),Dn=Symbol("exportpartsDebouncer"),kn=Symbol("dynamicDependenciesLoaded"),Ie=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};Ie.eventName="exportparts-updated";var W=class extends dt{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Mn]=new lt(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[Dn].run(()=>{var s,i;!((s=this.exportpartsPrefix)===null||s===void 0)&&s.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[In]=this.constructor.name,this[Rn]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[In]&&Object.setPrototypeOf(this,this[Rn])}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[kn]||(r[kn]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Ie.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Ie.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 Ie)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:s}=this.elementToFocus;if(n!=null){let i=[...s??[],n];r=On(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,s;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((s=this.customStylesheet)!==null&&s!==void 0?s:"")}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,s,i,o,a;let c=h=>h!=null&&h.trim().length>0,l=t.filter(c).map(h=>h.trim());if(l.length===0){this.exportparts=void 0;return}let u=new Set;for(let h of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let g=(i=(s=h.getAttribute("part"))===null||s===void 0?void 0:s.split(" "))!==null&&i!==void 0?i:[],E=(a=(o=h.getAttribute("exportparts"))===null||o===void 0?void 0:o.split(",").map(v=>v.split(":")[1]))!==null&&a!==void 0?a:[],I=[...g,...E].filter(c).map(v=>v.trim());for(let v of I)u.add(v)}if(u.size===0){this.exportparts=void 0;return}let d=[...u.values()].flatMap(h=>l.map(g=>`${h}:${g}--${h}`));this.exportparts=[...this.part,...d].join(", ")}};Mn=Dn;ke([(0,oe.property)()],W.prototype,"exportpartsPrefix",void 0);ke([_n([])],W.prototype,"exportpartsPrefixes",void 0);ke([(0,oe.property)({reflect:!0})],W.prototype,"exportparts",void 0);ke([(0,oe.property)()],W.prototype,"customStylesheet",void 0);ke([(0,oe.property)()],W.prototype,"elementToFocus",void 0);ke([(0,oe.state)()],W.prototype,"useAdoptedStyleSheets",void 0);function pt(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Ke=Symbol("internalReduxEventsUnsubscribers"),te=Symbol("internalStoresUnsubscribers"),ae=Symbol("internalStores"),Ao=at(Symbol("withRedux"),function(e){var t,r,n;class s extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(o){super.willUpdate(o),[...this.reduxConstructor.reduxReactiveProperties].some(a=>o.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[ae].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[ae].values()][0]}getStore(o){return o==null?this.getUnnamedStore():this[ae].get(o)}addStore(o,a){var c;a=(c=a??o.name)!==null&&c!==void 0?c:"default-store",this.unsubscribeFromStore(a),this[ae].set(a,o),this.subscribeToStore(a,o),this.updateFromStores()}removeStore(o){let a=typeof o=="string"?o:o.name;this.unsubscribeFromStore(a),this[ae].delete(a)}setupStores(){this.unsubscribeFromStores(),this[ae].forEach((o,a)=>this.subscribeToStore(a,o)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((o,a)=>{let c=this.constructor.getPropertyOptions(a);if(!c?.attribute||!this.hasAttribute(typeof c?.attribute=="string"?c.attribute:a)){let l=this.getStore(o.store);l&&(o.store?this[te].has(o.store):this[te].size>0)&&(this[a]=o.selector(l.getState(),this))}})}subscribeToStore(o,a){var c;this[te].set(o,a.subscribe(()=>this.updateFromStores())),this[Ke].set(o,[]),pt(a)&&a.eventBus&&((c=this.reduxConstructor.reduxEventListeners)===null||c===void 0||c.forEach((l,u)=>{if(typeof this[u]=="function"&&(!l.store||a.name===l.store)){let d=h=>this[u](h);a.addEventListener(l.eventName,d),this[Ke].get(o).push(()=>a.removeEventListener(l.eventName,d))}})),this.onStoreAvailable(o)}unsubscribeFromStores(){this[te].forEach((o,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(o){var a;this[te].has(o)&&this[te].get(o)(),this[te].delete(o),(a=this[Ke].get(o))===null||a===void 0||a.forEach(c=>c()),this[Ke].delete(o)}onStoreAvailable(o){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=te,r=ae,n=Ke,s.reduxProperties=new Map,s.reduxReactiveProperties=new Set,s.reduxEventListeners=new Map,s}),Nn=class extends Ao(W){};function M(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 xo=typeof Symbol=="function"&&Symbol.observable||"@@observable",Ln=xo,dr=()=>Math.random().toString(36).substring(7).split("").join("."),bo={INIT:`@@redux/INIT${dr()}`,REPLACE:`@@redux/REPLACE${dr()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${dr()}`},ht=bo;function ft(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 pr(e,t,r){if(typeof e!="function")throw new Error(M(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(M(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(M(1));return r(pr)(e,t)}let n=e,s=t,i=new Map,o=i,a=0,c=!1;function l(){o===i&&(o=new Map,i.forEach((v,k)=>{o.set(k,v)}))}function u(){if(c)throw new Error(M(3));return s}function d(v){if(typeof v!="function")throw new Error(M(4));if(c)throw new Error(M(5));let k=!0;l();let F=a++;return o.set(F,v),function(){if(k){if(c)throw new Error(M(6));k=!1,l(),o.delete(F),i=null}}}function h(v){if(!ft(v))throw new Error(M(7));if(typeof v.type>"u")throw new Error(M(8));if(typeof v.type!="string")throw new Error(M(17));if(c)throw new Error(M(9));try{c=!0,s=n(s,v)}finally{c=!1}return(i=o).forEach(F=>{F()}),v}function g(v){if(typeof v!="function")throw new Error(M(10));n=v,h({type:ht.REPLACE})}function E(){let v=d;return{subscribe(k){if(typeof k!="object"||k===null)throw new Error(M(11));function F(){let A=k;A.next&&A.next(u())}return F(),{unsubscribe:v(F)}},[Ln](){return this}}}return h({type:ht.INIT}),{dispatch:h,subscribe:d,getState:u,replaceReducer:g,[Ln]:E}}function _o(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:ht.INIT})>"u")throw new Error(M(12));if(typeof r(void 0,{type:ht.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(M(13))})}function Pn(e){let t=Object.keys(e),r={};for(let o=0;o<t.length;o++){let a=t[o];typeof e[a]=="function"&&(r[a]=e[a])}let n=Object.keys(r),s,i;try{_o(r)}catch(o){i=o}return function(a={},c){if(i)throw i;let l=!1,u={};for(let d=0;d<n.length;d++){let h=n[d],g=r[h],E=a[h],I=g(E,c);if(typeof I>"u"){let v=c&&c.type;throw new Error(M(14))}u[h]=I,l=l||I!==E}return l=l||n.length!==Object.keys(a).length,l?u:a}}function We(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function Fn(...e){return t=>(r,n)=>{let s=t(r,n),i=()=>{throw new Error(M(15))},o={getState:s.getState,dispatch:(c,...l)=>i(c,...l)},a=e.map(c=>c(o));return i=We(...a)(s.dispatch),{...s,dispatch:i}}}function Un(e){return ft(e)&&"type"in e&&typeof e.type=="string"}var Wn=Symbol.for("immer-nothing"),$n=Symbol.for("immer-draftable"),D=Symbol.for("immer-state");function z(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var U=Object,De=U.getPrototypeOf,St="constructor",_t="prototype",mr="configurable",vt="enumerable",mt="writable",Ge="value",G=e=>!!e&&!!e[D];function $(e){return e?Gn(e)||wt(e)||!!e[$n]||!!e[St]?.[$n]||Tt(e)||Ot(e):!1}var Co=U[_t][St].toString(),Bn=new WeakMap;function Gn(e){if(!e||!_r(e))return!1;let t=De(e);if(t===null||t===U[_t])return!0;let r=U.hasOwnProperty.call(t,St)&&t[St];if(r===Object)return!0;if(!Me(r))return!1;let n=Bn.get(r);return n===void 0&&(n=Function.toString.call(r),Bn.set(r,n)),n===Co}function Ct(e,t,r=!0){Xe(e)===0?(r?Reflect.ownKeys(e):U.keys(e)).forEach(s=>{t(s,e[s],e)}):e.forEach((n,s)=>t(s,n,e))}function Xe(e){let t=e[D];return t?t.type_:wt(e)?1:Tt(e)?2:Ot(e)?3:0}var hr=(e,t,r=Xe(e))=>r===2?e.has(t):U[_t].hasOwnProperty.call(e,t),gr=(e,t,r=Xe(e))=>r===2?e.get(t):e[t],Et=(e,t,r,n=Xe(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function wo(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var wt=Array.isArray,Tt=e=>e instanceof Map,Ot=e=>e instanceof Set,_r=e=>typeof e=="object",Me=e=>typeof e=="function",fr=e=>typeof e=="boolean";function To(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var Y=e=>e.copy_||e.base_;var Cr=e=>e.modified_?e.copy_:e.base_;function Sr(e,t){if(Tt(e))return new Map(e);if(Ot(e))return new Set(e);if(wt(e))return Array[_t].slice.call(e);let r=Gn(e);if(t===!0||t==="class_only"&&!r){let n=U.getOwnPropertyDescriptors(e);delete n[D];let s=Reflect.ownKeys(n);for(let i=0;i<s.length;i++){let o=s[i],a=n[o];a[mt]===!1&&(a[mt]=!0,a[mr]=!0),(a.get||a.set)&&(n[o]={[mr]:!0,[mt]:!0,[vt]:a[vt],[Ge]:e[o]})}return U.create(De(e),n)}else{let n=De(e);if(n!==null&&r)return{...e};let s=U.create(n);return U.assign(s,e)}}function wr(e,t=!1){return Rt(e)||G(e)||!$(e)||(Xe(e)>1&&U.defineProperties(e,{set:yt,add:yt,clear:yt,delete:yt}),U.freeze(e),t&&Ct(e,(r,n)=>{wr(n,!0)},!1)),e}function Oo(){z(2)}var yt={[Ge]:Oo};function Rt(e){return e===null||!_r(e)?!0:U.isFrozen(e)}var At="MapSet",vr="Patches",Hn="ArrayMethods",Qn={};function ce(e){let t=Qn[e];return t||z(0,e),t}var jn=e=>!!Qn[e];var Qe,Yn=()=>Qe,Ro=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:jn(At)?ce(At):void 0,arrayMethodsPlugin_:jn(Hn)?ce(Hn):void 0});function Vn(e,t){t&&(e.patchPlugin_=ce(vr),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Er(e){Ar(e),e.drafts_.forEach(Io),e.drafts_=null}function Ar(e){e===Qe&&(Qe=e.parent_)}var qn=e=>Qe=Ro(Qe,e);function Io(e){let t=e[D];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function zn(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(e!==void 0&&e!==r){r[D].modified_&&(Er(t),z(4)),$(e)&&(e=Kn(t,e));let{patchPlugin_:s}=t;s&&s.generateReplacementPatches_(r[D].base_,e,t)}else e=Kn(t,r);return ko(t,e,!0),Er(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Wn?e:void 0}function Kn(e,t){if(Rt(t))return t;let r=t[D];if(!r)return xt(t,e.handledSet_,e);if(!It(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);Zn(r,e)}return r.copy_}function ko(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&wr(t,r)}function Xn(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var It=(e,t)=>e.scope_===t,Mo=[];function Jn(e,t,r,n){let s=Y(e),i=e.type_;if(n!==void 0&&gr(s,n,i)===t){Et(s,n,r,i);return}if(!e.draftLocations_){let a=e.draftLocations_=new Map;Ct(s,(c,l)=>{if(G(l)){let u=a.get(l)||[];u.push(c),a.set(l,u)}})}let o=e.draftLocations_.get(t)??Mo;for(let a of o)Et(s,a,r,i)}function Do(e,t,r){e.callbacks_.push(function(s){let i=t;if(!i||!It(i,s))return;s.mapSetPlugin_?.fixSetContents(i);let o=Cr(i);Jn(e,i.draft_??i,o,r),Zn(i,s)})}function Zn(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 s=n.getPath(e);s&&n.generatePatches_(e,s,t)}Xn(e)}}function No(e,t,r){let{scope_:n}=e;if(G(r)){let s=r[D];It(s,n)&&s.callbacks_.push(function(){gt(e);let o=Cr(s);Jn(e,r,o,t)})}else $(r)&&e.callbacks_.push(function(){let i=Y(e);e.type_===3?i.has(r)&&xt(r,n.handledSet_,n):gr(i,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&xt(gr(e.copy_,t,e.type_),n.handledSet_,n)})}function xt(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||G(e)||t.has(e)||!$(e)||Rt(e)||(t.add(e),Ct(e,(n,s)=>{if(G(s)){let i=s[D];if(It(i,r)){let o=Cr(i);Et(e,n,o,e.type_),Xn(i)}}else $(s)&&xt(s,t,r)})),e}function Lo(e,t){let r=wt(e),n={type_:r?1:0,scope_:t?t.scope_:Yn(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},s=n,i=bt;r&&(s=[n],i=Ye);let{revoke:o,proxy:a}=Proxy.revocable(s,i);return n.draft_=a,n.revoke_=o,[a,n]}var bt={get(e,t){if(t===D)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 s=Y(e);if(!hr(s,t,e.type_))return Fo(e,s,t);let i=s[t];if(e.finalized_||!$(i)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&To(t))return i;if(i===yr(e.base_,t)||Po(e,t,i)){gt(e);let o=e.type_===1?+t:t,a=br(e.scope_,i,e,o);return e.copy_[o]=a}return i},has(e,t){return t in Y(e)},ownKeys(e){return Reflect.ownKeys(Y(e))},set(e,t,r){let n=es(Y(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let s=yr(Y(e),t),i=s?.[D];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(wo(r,s)&&(r!==void 0||hr(e.base_,t,e.type_)))return!0;gt(e),xr(e)}return e.copy_[t]===r&&(r!==void 0||hr(e.copy_,t,e.type_))||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),No(e,t,r)),!0},deleteProperty(e,t){return gt(e),yr(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),xr(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Y(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[mt]:!0,[mr]:e.type_!==1||t!=="length",[vt]:n[vt],[Ge]:r[t]}},defineProperty(){z(11)},getPrototypeOf(e){return De(e.base_)},setPrototypeOf(){z(12)}},Ye={};for(let e in bt){let t=bt[e];Ye[e]=function(){let r=arguments;return r[0]=r[0][0],t.apply(this,r)}}Ye.deleteProperty=function(e,t){return Ye.set.call(this,e,t,void 0)};Ye.set=function(e,t,r){return bt.set.call(this,e[0],t,r,e[0])};function yr(e,t){let r=e[D];return(r?Y(r):e)[t]}function Po(e,t,r){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!$(r)||r[D]?!1:e.baseRefs_.has(r)}function Fo(e,t,r){let n=es(t,r);return n?Ge in n?n[Ge]:n.get?.call(e.draft_):void 0}function es(e,t){if(!(t in e))return;let r=De(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=De(r)}}function xr(e){e.modified_||(e.modified_=!0,e.parent_&&xr(e.parent_))}function gt(e){e.copy_||(e.assigned_=new Map,e.copy_=Sr(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Uo=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(Me(t)&&!Me(r)){let i=r;r=t;let o=this;return function(c=i,...l){return o.produce(c,u=>r.call(this,u,...l))}}Me(r)||z(6),n!==void 0&&!Me(n)&&z(7);let s;if($(t)){let i=qn(this),o=br(i,t,void 0),a=!0;try{s=r(o),a=!1}finally{a?Er(i):Ar(i)}return Vn(i,n),zn(s,i)}else if(!t||!_r(t)){if(s=r(t),s===void 0&&(s=t),s===Wn&&(s=void 0),this.autoFreeze_&&wr(s,!0),n){let i=[],o=[];ce(vr).generateReplacementPatches_(t,s,{patches_:i,inversePatches_:o}),n(i,o)}return s}else z(1,t)},this.produceWithPatches=(t,r)=>{if(Me(t))return(o,...a)=>this.produceWithPatches(o,c=>t(c,...a));let n,s;return[this.produce(t,r,(o,a)=>{n=o,s=a}),n,s]},fr(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),fr(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),fr(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){$(e)||z(8),G(e)&&(e=ts(e));let t=qn(this),r=br(t,e,void 0);return r[D].isManual_=!0,Ar(t),r}finishDraft(e,t){let r=e&&e[D];(!r||!r.isManual_)&&z(9);let{scope_:n}=r;return Vn(n,t),zn(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 s=t[r];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}r>-1&&(t=t.slice(r+1));let n=ce(vr).applyPatches_;return G(e)?n(e,t):this.produce(e,s=>n(s,t))}};function br(e,t,r,n){let[s,i]=Tt(t)?ce(At).proxyMap_(t,r):Ot(t)?ce(At).proxySet_(t,r):Lo(t,r);return(r?.scope_??Yn()).drafts_.push(s),i.callbacks_=r?.callbacks_??[],i.key_=n,r&&n!==void 0?Do(r,i,n):i.callbacks_.push(function(c){c.mapSetPlugin_?.fixSetContents(i);let{patchPlugin_:l}=c;i.modified_&&l&&l.generatePatches_(i,[],c)}),s}function ts(e){return G(e)||z(10,e),rs(e)}function rs(e){if(!$(e)||Rt(e))return e;let t=e[D],r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Sr(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Sr(e,!0);return Ct(r,(s,i)=>{Et(r,s,rs(i))},n),t&&(t.finalized_=!1),r}var $o=globalThis.Iterator,Ac=typeof $o?.from=="function";var Bo=new Uo,Tr=Bo.produce;function ns(e){return({dispatch:r,getState:n})=>s=>i=>typeof i=="function"?i(r,n,e):s(i)}var ss=ns(),is=ns;var Ho=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?We:We.apply(null,arguments)},Oc=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},jo=e=>e&&typeof e.match=="function";function re(e,t){function r(...n){if(t){let s=t(...n);if(!s)throw new Error(X(0));return{type:e,payload:s.payload,..."meta"in s&&{meta:s.meta},..."error"in s&&{error:s.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>Un(n)&&n.type===e,r}var us=class Je extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Je.prototype)}static get[Symbol.species](){return Je}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Je(...t[0].concat(this)):new Je(...t.concat(this))}};function os(e){return $(e)?Tr(e,()=>{}):e}function kt(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function Vo(e){return typeof e=="boolean"}var qo=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:s=!0,actionCreatorCheck:i=!0}=t??{},o=new us;return r&&(Vo(r)?o.push(ss):o.push(is(r.extraArgument))),o},zo="RTK_autoBatch";var as=e=>t=>{setTimeout(t,e)},Ko=(e,t)=>r=>{let n=!1,s=()=>{n||(n=!0,cancelAnimationFrame(i),clearTimeout(o),r())},i=e(s),o=setTimeout(s,t)},Wo=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),s=!0,i=!1,o=!1,a=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?Ko(window.requestAnimationFrame,100):as(10):e.type==="callback"?e.queueNotification:as(e.timeout),l=()=>{o=!1,i&&(i=!1,a.forEach(u=>u()))};return Object.assign({},n,{subscribe(u){let d=()=>s&&u(),h=n.subscribe(d);return a.add(u),()=>{h(),a.delete(u)}},dispatch(u){try{return s=!u?.meta?.[zo],i=!s,i&&(o||(o=!0,c(l))),n.dispatch(u)}finally{s=!0}}})},Go=e=>function(r){let{autoBatch:n=!0}=r??{},s=new us(e);return n&&s.push(Wo(typeof n=="object"?n:void 0)),s};function ds(e){let t=qo(),{reducer:r=void 0,middleware:n,devTools:s=!0,duplicateMiddlewareCheck:i=!0,preloadedState:o=void 0,enhancers:a=void 0}=e||{},c;if(typeof r=="function")c=r;else if(ft(r))c=Pn(r);else throw new Error(X(1));let l;typeof n=="function"?l=n(t):l=t();let u=We;s&&(u=Ho({trace:!1,...typeof s=="object"&&s}));let d=Fn(...l),h=Go(d),g=typeof a=="function"?a(h):h(),E=u(...g);return pr(c,o,E)}function ps(e){let t={},r=[],n,s={addCase(i,o){let a=typeof i=="string"?i:i.type;if(!a)throw new Error(X(28));if(a in t)throw new Error(X(29));return t[a]=o,s},addAsyncThunk(i,o){return o.pending&&(t[i.pending.type]=o.pending),o.rejected&&(t[i.rejected.type]=o.rejected),o.fulfilled&&(t[i.fulfilled.type]=o.fulfilled),o.settled&&r.push({matcher:i.settled,reducer:o.settled}),s},addMatcher(i,o){return r.push({matcher:i,reducer:o}),s},addDefaultCase(i){return n=i,s}};return e(s),[t,r,n]}function Qo(e){return typeof e=="function"}function Yo(e,t){let[r,n,s]=ps(t),i;if(Qo(e))i=()=>os(e());else{let a=os(e);i=()=>a}function o(a=i(),c){let l=[r[c.type],...n.filter(({matcher:u})=>u(c)).map(({reducer:u})=>u)];return l.filter(u=>!!u).length===0&&(l=[s]),l.reduce((u,d)=>{if(d)if(G(u)){let g=d(u,c);return g===void 0?u:g}else{if($(u))return Tr(u,h=>d(h,c));{let h=d(u,c);if(h===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return h}}return u},a)}return o.getInitialState=i,o}var Xo=(e,t)=>jo(e)?e.match(t):e(t);function Jo(...e){return t=>e.some(r=>Xo(r,t))}var Zo="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ea=(e=21)=>{let t="",r=e;for(;r--;)t+=Zo[Math.random()*64|0];return t},ta=["name","message","stack","code"],Or=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},cs=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},ra=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of ta)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},ls="External signal was aborted",na=(()=>{function e(t,r,n){let s=re(t+"/fulfilled",(c,l,u,d)=>({payload:c,meta:{...d||{},arg:u,requestId:l,requestStatus:"fulfilled"}})),i=re(t+"/pending",(c,l,u)=>({payload:void 0,meta:{...u||{},arg:l,requestId:c,requestStatus:"pending"}})),o=re(t+"/rejected",(c,l,u,d,h)=>({payload:d,error:(n&&n.serializeError||ra)(c||"Rejected"),meta:{...h||{},arg:u,requestId:l,rejectedWithValue:!!d,requestStatus:"rejected",aborted:c?.name==="AbortError",condition:c?.name==="ConditionError"}}));function a(c,{signal:l}={}){return(u,d,h)=>{let g=n?.idGenerator?n.idGenerator(c):ea(),E=new AbortController,I,v;function k(S){v=S,E.abort()}l&&(l.aborted?k(ls):l.addEventListener("abort",()=>k(ls),{once:!0}));let F=(async function(){let S;try{let x=n?.condition?.(c,{getState:d,extra:h});if(ia(x)&&(x=await x),x===!1||E.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let K=new Promise((C,T)=>{I=()=>{T({name:"AbortError",message:v||"Aborted"})},E.signal.addEventListener("abort",I,{once:!0})});u(i(g,c,n?.getPendingMeta?.({requestId:g,arg:c},{getState:d,extra:h}))),S=await Promise.race([K,Promise.resolve(r(c,{dispatch:u,getState:d,extra:h,requestId:g,signal:E.signal,abort:k,rejectWithValue:((C,T)=>new Or(C,T)),fulfillWithValue:((C,T)=>new cs(C,T))})).then(C=>{if(C instanceof Or)throw C;return C instanceof cs?s(C.payload,g,c,C.meta):s(C,g,c)})])}catch(x){S=x instanceof Or?o(null,g,c,x.payload,x.meta):o(x,g,c)}finally{I&&E.signal.removeEventListener("abort",I)}return n&&!n.dispatchConditionRejection&&o.match(S)&&S.meta.condition||u(S),S})();return Object.assign(F,{abort:k,requestId:g,arg:c,unwrap(){return F.then(sa)}})}}return Object.assign(a,{pending:i,rejected:o,fulfilled:s,settled:Jo(o,s),typePrefix:t})}return e.withTypes=()=>e,e})();function sa(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function ia(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var hs=Symbol.for("rtk-slice-createasyncthunk"),Ic={[hs]:na};function oa(e,t){return`${e}/${t}`}function aa({creators:e}={}){let t=e?.asyncThunk?.[hs];return function(n){let{name:s,reducerPath:i=s}=n;if(!s)throw new Error(X(11));typeof process<"u";let o=(typeof n.reducers=="function"?n.reducers(la()):n.reducers)||{},a=Object.keys(o),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},l={addCase(S,A){let x=typeof S=="string"?S:S.type;if(!x)throw new Error(X(12));if(x in c.sliceCaseReducersByType)throw new Error(X(13));return c.sliceCaseReducersByType[x]=A,l},addMatcher(S,A){return c.sliceMatchers.push({matcher:S,reducer:A}),l},exposeAction(S,A){return c.actionCreators[S]=A,l},exposeCaseReducer(S,A){return c.sliceCaseReducersByName[S]=A,l}};a.forEach(S=>{let A=o[S],x={reducerName:S,type:oa(s,S),createNotation:typeof n.reducers=="function"};da(A)?ha(x,A,l,t):ua(x,A,l)});function u(){let[S={},A=[],x=void 0]=typeof n.extraReducers=="function"?ps(n.extraReducers):[n.extraReducers],K={...S,...c.sliceCaseReducersByType};return Yo(n.initialState,C=>{for(let T in K)C.addCase(T,K[T]);for(let T of c.sliceMatchers)C.addMatcher(T.matcher,T.reducer);for(let T of A)C.addMatcher(T.matcher,T.reducer);x&&C.addDefaultCase(x)})}let d=S=>S,h=new Map,g=new WeakMap,E;function I(S,A){return E||(E=u()),E(S,A)}function v(){return E||(E=u()),E.getInitialState()}function k(S,A=!1){function x(C){let T=C[S];return typeof T>"u"&&A&&(T=kt(g,x,v)),T}function K(C=d){let T=kt(h,A,()=>new WeakMap);return kt(T,C,()=>{let fn={};for(let[uo,po]of Object.entries(n.selectors??{}))fn[uo]=ca(po,C,()=>kt(g,C,v),A);return fn})}return{reducerPath:S,getSelectors:K,get selectors(){return K(x)},selectSlice:x}}let F={name:s,reducer:I,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:v,...k(i),injectInto(S,{reducerPath:A,...x}={}){let K=A??i;return S.inject({reducerPath:K,reducer:I},x),{...F,...k(K,!0)}}};return F}}function ca(e,t,r,n){function s(i,...o){let a=t(i);return typeof a>"u"&&n&&(a=r()),e(a,...o)}return s.unwrapped=e,s}var fs=aa();function la(){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 ua({type:e,reducerName:t,createNotation:r},n,s){let i,o;if("reducer"in n){if(r&&!pa(n))throw new Error(X(17));i=n.reducer,o=n.prepare}else i=n;s.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,o?re(e,o):re(e))}function da(e){return e._reducerDefinitionType==="asyncThunk"}function pa(e){return e._reducerDefinitionType==="reducerWithPrepare"}function ha({type:e,reducerName:t},r,n,s){if(!s)throw new Error(X(18));let{payloadCreator:i,fulfilled:o,pending:a,rejected:c,settled:l,options:u}=r,d=s(e,i,u);n.exposeAction(t,d),o&&n.addCase(d.fulfilled,o),a&&n.addCase(d.pending,a),c&&n.addCase(d.rejected,c),l&&n.addMatcher(d.settled,l),n.exposeCaseReducer(t,{fulfilled:o||Mt,pending:a||Mt,rejected:c||Mt,settled:l||Mt})}function Mt(){}var ys="listener",ms="completed",gs="cancelled",kc=`task-${gs}`,Mc=`task-${ms}`,Dc=`${ys}-${gs}`,Nc=`${ys}-${ms}`;var{assign:Ss}=Object;var Rr="listenerMiddleware";var fa=Ss(re(`${Rr}/add`),{withTypes:()=>fa}),Lc=re(`${Rr}/removeAll`),ya=Ss(re(`${Rr}/remove`),{withTypes:()=>ya});function X(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 ma=at(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,s){this.eventBus.addEventListener(r,n,s)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,s){this.eventBus.removeEventListener(r,n,s)}}}),Dt=class extends ma(Object){};window.ftReduxStores||(window.ftReduxStores={});var vs=class e extends Dt{static get(t){var r;let n=typeof t=="string"?t:t.name,s=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(pt(i))return i;if(s==null)return;let o=fs({...s,reducers:(r=s.reducers)!==null&&r!==void 0?r:{}}),a=ds({reducer:(c,l)=>{if(l.type==="CLEAR_FT_REDUX_STORE"){let u=qe(o.getInitialState());for(let d of l.keeping)u[d]=(c??u)[d];return u}else if(typeof l.type=="string"&&l.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...c,...l.overwrites};return o.reducer(c,l)}});return window.ftReduxStores[s.name]=new e(o,a,s.eventBus)}constructor(t,r,n){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new ct,this.injectInto=(i,o)=>this.reduxSlice.injectInto(i,o),this.selectSlice=i=>this.reduxSlice.selectSlice(i);let s=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,o,a)=>{let c=o,l=i[c];return l?(...u)=>{let d=l(...u.map(s));return this.reduxStore.dispatch(d),d}:u=>{let d=c,h=this.getState()[d];Re(h,u)||this.setState({[d]:s(u)})}}}),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 Nt=class{static format(t,r,n,s,i){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(n,s,!!i)):this.getIntlDateTime(t,r,n,s,!!i)}static getMomentDateFormat(t,r,n){return n?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,n,s,i){let o=typeof t=="string"?new Date(t):t,a=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(o),c=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(o);return i?c:s?`${a} ${c}`:a}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 Lt=y(b()),ga="ft-app-info",ne=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};ne.eventName="authentication-change";var Ze=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Ze.eventName="ui-locale-changed";var Sa={session:(e,t)=>{(0,Lt.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>m.dispatchEvent(new ne(t.payload)),0))}},m=Lt.FtReduxStore.get({name:ga,reducers:Sa,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 Es=y(b()),Pt=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},dl=(0,Es.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(m)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var s,i;return((i=(s=this.metadataDescriptors.find(a=>a.key===n))===null||s===void 0?void 0:s.date)!==null&&i!==void 0?i:!1)?a=>Nt.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Pt([(0,Ir.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Pt([(0,Ir.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Pt([ur({store:m.name,selector:r=>{var n,s;return(s=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&s!==void 0?s:[]}})],t.prototype,"metadataDescriptors",void 0),Pt([ur({store:m.name})],t.prototype,"uiLocale",void 0),t});var As;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(As||(As={}));var xs;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(xs||(xs={}));var bs;(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"})(bs||(bs={}));var _s;(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"})(_s||(_s={}));var Cs;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Cs||(Cs={}));var ws;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(ws||(ws={}));var Ts;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(Ts||(Ts={}));var Os;(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"})(Os||(Os={}));var Rs;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(Rs||(Rs={}));var Is;(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"})(Is||(Is={}));var ks;(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"})(ks||(ks={}));var Ms;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(Ms||(Ms={}));var Ds;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(Ds||(Ds={}));var Ns;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(Ns||(Ns={}));var Ls;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(Ls||(Ls={}));var Ps;(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"})(Ps||(Ps={}));var kr;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(kr||(kr={}));var Fs;(function(e){e.ASC="ASC",e.DESC="DESC"})(Fs||(Fs={}));var Us;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(Us||(Us={}));var Mr;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(Mr||(Mr={}));var $s;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})($s||($s={}));var Bs;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(Bs||(Bs={}));var Hs;(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"})(Hs||(Hs={}));var js;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(js||(js={}));var Vs;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Vs||(Vs={}));var Dr;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Dr||(Dr={}));var qs;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(qs||(qs={}));var w;(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"})(w||(w={}));var H;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(H||(H={}));var zs;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(zs||(zs={}));var Ks;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(Ks||(Ks={}));var Ws;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(Ws||(Ws={}));var Gs;(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"})(Gs||(Gs={}));var Qs;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(Qs||(Qs={}));var Ys;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Ys||(Ys={}));var Xs;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Xs||(Xs={}));var Js;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(Js||(Js={}));var Zs;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(Zs||(Zs={}));var ei;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(ei||(ei={}));var ti;(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"})(ti||(ti={}));var ri;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(ri||(ri={}));var va={[w.PERSONAL_BOOK_SHARE_USER]:[w.PERSONAL_BOOK_USER],[w.HTML_EXPORT_USER]:[w.PERSONAL_BOOK_USER],[w.PDF_EXPORT_USER]:[w.PERSONAL_BOOK_USER],[w.KHUB_ADMIN]:[w.CONTENT_PUBLISHER],[w.ADMIN]:[w.KHUB_ADMIN,w.USERS_ADMIN,w.PORTAL_ADMIN,w.BEHAVIOR_DATA_USER],[w.GENERATIVE_AI_EXPORT_USER]:[w.GENERATIVE_AI_USER]};function ni(e,t){return e===t||(va[e]??[]).some(r=>ni(r,t))}function Nr(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=>ni(n,t))}var Ht=y(b());var Lr=y(b());var le=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=m.getState(),s=t??n;if(r&&s&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,s,!0)}static await(t){return new Promise(r=>{let n=e.get(t);if(n)r(n);else{let s=m.subscribe(()=>{n=e.get(t),n&&(s(),r(n))})}})}};var Ne=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:le.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):le.await()}};var P=class extends Ne{constructor(t=!0,r){var n;super(r),this.sortObjectFields=(i,o)=>typeof o!="object"||o==null||Array.isArray(o)?o:Object.fromEntries(Object.entries(o).sort(([a],[c])=>a.localeCompare(c)));let s=this.constructor;s.commonCache=(n=s.commonCache)!==null&&n!==void 0?n:new Lr.CacheRegistry,this.cache=t?s.commonCache:new Lr.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 Ft=class extends P{async listMySearches(){let{session:t}=m.getState();return Nr(t,w.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var Ut=class extends P{async listMyBookmarks(){let t=m.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var $t=class extends P{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=m.getState().session;return!!t?.sessionAuthenticated}};var Bt=class extends P{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=m.getState().session;return!!t?.sessionAuthenticated}};var Ea="ft-user-assets",Aa={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(H).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:s}=t.payload;Fr(e,r,[...Pr(e,r),s]),si(e,r,1,n),ii(e,s)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;Fr(e,r,Pr(e,r).map(s=>s.id===n.id?n:s)),ii(e,n)},removeAsset:(e,t)=>{let{assetType:r,mapId:n,assetId:s}=t.payload;Fr(e,r,Pr(e,r).filter(i=>i.id!==s)),si(e,r,-1,n)}},oi={[H.SEARCHES]:"savedSearches",[H.BOOKMARKS]:"bookmarks",[H.BOOKS]:void 0,[H.COLLECTIONS]:void 0},Pr=(e,t)=>{var r;let n=oi[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},Fr=(e,t,r)=>{let n=oi[t];n&&(e[n]=r)},si=(e,t,r,n)=>{let s=e.assetCounts.allAsset[t];if(s!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,s+r),t===H.BOOKMARKS&&n)){let i=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,i+r)}},ii=(e,t)=>{let r=e.assetLabels.map(s=>s.title),n=t.labels.filter(s=>!r.includes(s)).map(s=>({title:s}));e.assetLabels.push(...n)},N=Ht.FtReduxStore.get({name:Ea,reducers:Aa,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(H).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Ur=class{constructor(t=new $t,r=new Bt){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=m.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Ut,this.savedSearchesService=new Ft,m.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=m.getState();(0,Ht.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(),N.actions.clearAssetCount(),N.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),N.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),N.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();N.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();N.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&N.getState().assetCounts.allAsset[t]!==r.count&&N.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&N.getState().assetCounts.bookmarkByMap[t]!==r.count&&N.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(N.getState().assetCounts.bookmarkByMap).length!==0;t===H.BOOKMARKS&&r&&N.actions.clearBookmarkCountByMap(),N.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;N.actions.bookmarks(r)}}},xa=new Ur;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=xa);var $r=class{addCommand(t,r=!1){m.commands.add(t,r)}consumeCommand(t){return m.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new $r;var j=y(b());var ai,Le=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},ba=Symbol("clearAfterUnitTest"),jt=class extends(0,j.withEventBus)(P){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[ai]=()=>{this.defaultMessages={},this.cache=new j.CacheRegistry,this.listeners={}},this.currentUiLocale=m.getState().uiLocale,m.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=m.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 s={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,j.deepEqual)(this.defaultMessages[t],s)||(this.defaultMessages[t]=s,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 s;let i=t.toLowerCase(),o=this.resolveContext(i);return new j.ParametrizedLabelResolver((s=this.defaultMessages[i])!==null&&s!==void 0?s:{},o).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(s){!(s instanceof j.CanceledPromiseError)&&r&&console.error(s)}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 s;return(s=this.listeners[t])===null||s===void 0?void 0:s.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new Le({loadedContexts:t})),this.dispatchEvent(new Le({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new Le({loadedContexts:[t]})),this.dispatchEvent(new Le({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,j.delay)(0).then(()=>n()).catch(()=>null)))}};ai=ba;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends jt{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends jt{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Pe=window.FluidTopicsI18nService,Vt=window.FluidTopicsCustomI18nService;var ci=y(b()),Br=class{highlightHtml(t,r,n){(0,ci.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new Br;var li=y(b());var Hr=class{isDate(t){var r,n,s,i;return(i=(s=((n=(r=m.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(a=>a.key===t))===null||s===void 0?void 0:s.date)!==null&&i!==void 0?i:!1}format(t,r){var n,s,i,o;if(t==null)return"";try{return li.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:m.getState().uiLocale,(s=r?.longFormat)!==null&&s!==void 0?s:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1,(o=r?.onlyTime)!==null&&o!==void 0?o:!1)}catch(a){throw console.error(`Date ${JSON.stringify(t)} is not valid`,a),a}}};window.FluidTopicsDateService=new Hr;var ui=y(b());var et=class{static get(t,r){var n,s,i,o;let a=m.getState(),{lang:c,region:l}=(i=(s=(n=a.localesConfiguration)===null||n===void 0?void 0:n.defaultLocales)===null||s===void 0?void 0:s.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new ui.SearchPlaceConverter(a.baseUrl,t??20,(o=a.localesConfiguration)===null||o===void 0?void 0:o.allLanguagesAllowed,r??`${c}-${l}`)}};var jr=class{urlToSearchRequest(t){return et.get().parse(t)}searchRequestToUrl(t){return et.get().serialize(t)}};window.FluidTopicsUrlService=new jr;var J=y(b());var ue=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{nextLocation:t}})}};ue.eventName="before-location-change";var de=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};de.eventName="change";var Vr=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))}},di=new Vr;var qt=class e extends J.WithEventBus{static build(){return new e(window.history,di,()=>window.location,!1)}constructor(t,r,n,s){var i,o;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(o=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&o!==void 0?o:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(s)}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,J.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new de(this.currentItem())),0)}installProxies(){let t=r=>(n,s,[i,o,a])=>{let c=new ue(new URL(typeof a=="string"?a:(a??this.windowLocation()).href,window.location.origin));this.dispatchEvent(c);let l=r(),u={...l===this.currentIndex?this.currentState:void 0,...i,index:l,href:c.detail.nextLocation.href};n.apply(s,[u,o,u.href]),this.setCurrentState(u,!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(ue.eventName,t)}removeBeforeLocationChangeListener(t){this.removeEventListener(ue.eventName,t)}addHistoryChangeListener(t){this.addEventListener(de.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(de.eventName,t)}currentItem(){return(0,J.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,J.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,J.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,J.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 s=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(s=i),i++;return s}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 s=r??this.currentState.majorStateId,i=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=s}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=qt.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 pi=y(Q());var hi=pi.css`
6
6
  `;var yi=y(Q()),L=y(B()),fe=y(b());var pe=y(b());function fi(e,t){let{authenticationRequired:r,session:n}=m.getState();return r&&!n?.sessionAuthenticated?Promise.resolve(t):e()}var zt=class extends Ne{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var qr=class e extends pe.FtStateManager{static build(t){return new e(m,t)}constructor(t,r){super(),this.store=t,this.cache=new pe.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new zt,this.cleanSessionDebouncer=new pe.Debouncer,this.reloadConfiguration=()=>{var n;(n=this.cache)===null||n===void 0||n.clear("availableContentLocales"),this.updateAvailableContentLocales()},this.reloadDebouncer=new pe.Debouncer(500),this.apiProvider=r??(()=>le.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}addListeners(){this.store.addEventListener(ne.eventName,this.reloadConfiguration)}removeListeners(){this.store.removeEventListener(ne.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",()=>fi(()=>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 Ze(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)}},zr=qr.build();var he=class extends Event{constructor(t,r,n,s){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=r,this.callback=n,this.subscribe=s??!1}};var tt=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:s,callbackRef:i}of n){let o=s.deref(),a=i.deref();o===void 0||a===void 0||o.dispatchEvent(new he(t.context,o,a,!0))}},this.onContextRequest=t=>{if(t.subscribe!==!0)return;let r=t.contextTarget??t.composedPath()[0],n=t.callback,s=this.pendingContextRequests.get(t.context);s===void 0&&this.pendingContextRequests.set(t.context,s={callbacks:new WeakMap,requests:[]});let i=s.callbacks.get(r);i===void 0&&s.callbacks.set(r,i=new WeakSet),i.has(n)||(i.add(n),s.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 O=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},_=class extends fe.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=zr,this.contextRoot=new tt}render(){return yi.html`
7
7
  <slot></slot>
8
8
  `}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=>Pe.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())}};_.elementDefinitions={};_.styles=hi;O([(0,L.property)()],_.prototype,"baseUrl",void 0);O([(0,L.property)()],_.prototype,"tenantId",void 0);O([(0,L.property)()],_.prototype,"apiIntegrationIdentifier",void 0);O([(0,L.property)()],_.prototype,"apiIntegrationAppVersion",void 0);O([(0,L.property)()],_.prototype,"uiLocale",void 0);O([(0,fe.jsonProperty)(null)],_.prototype,"availableUiLocales",void 0);O([(0,fe.jsonProperty)(null)],_.prototype,"metadataConfiguration",void 0);O([(0,L.property)({type:Boolean})],_.prototype,"editorMode",void 0);O([(0,L.property)({type:Boolean})],_.prototype,"noCustom",void 0);O([(0,L.property)({type:Boolean})],_.prototype,"openExternalDocumentInNewTab",void 0);O([(0,L.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],_.prototype,"noCustomComponent",void 0);O([(0,L.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],_.prototype,"noCustomCode",void 0);O([(0,L.property)({type:Boolean})],_.prototype,"withManualResources",void 0);O([(0,L.property)({type:Boolean})],_.prototype,"navigatorOnline",void 0);O([(0,L.property)({type:Boolean})],_.prototype,"forcedOffline",void 0);O([(0,L.property)({type:Boolean})],_.prototype,"authenticationRequired",void 0);O([(0,fe.jsonProperty)([])],_.prototype,"messageContexts",void 0);O([(0,fe.jsonProperty)(void 0)],_.prototype,"session",void 0);var gi=y(b());var mi={"ft-app-context":_};(0,gi.customElements)(mi);var Kt=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?Vt:Pe}constructor(t,r=!1){this.name=t,this.custom=r,this.properties=new Proxy({},{get:(n,s)=>{let i=s;return o=>({context:this.name,key:i,custom:this.custom,args:typeof o=="function"?void 0:o,argsProvider:typeof o=="function"?o:void 0})}}),this.messages=new Proxy({},{get:(n,s)=>(...i)=>this.service.resolveMessage(this.name,s,...i)}),this.rawMessages=new Proxy({},{get:(n,s)=>this.service.resolveRawMessage(this.name,s)}),this.keys=new Proxy({},{get:(n,s)=>()=>s}),this.attributes=new Proxy({},{get:(n,s)=>()=>({context:this.name,key:s,message:this.service.resolveRawMessage(this.name,s)})})}};var Fe=y(b());var Ei=y(B());var Kr=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-]+$/)}},Si=new Kr;var wa=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},Ta=Symbol("i18nAttributes"),Oa=Symbol("i18nListAttributes"),Ai=Symbol("i18nProperties"),Wt=Symbol("i18nContexts"),rt=Symbol("i18nUnsubs"),Qt=(0,Fe.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?Vt:Pe}i18n(i){let{context:o,key:a,message:c}=i,{custom:l,args:u,argsProvider:d}=i;if(o&&a){this.hasI18nContext(o)||this.addI18nContext(o,void 0,l);let h=u??(d?d(this):[]);return this.getI18nService(l).resolveMessage(o,a,...h)}return c}async awaitI18n(i){let{context:o,custom:a}=i;return o&&await this.getI18nService(a).prepareContext(o),this.i18n(i)}customI18n(i,o){if(Si.isI18nKey(i)){let[a,c]=i.split(".");return this.i18n({custom:!0,context:a,key:c,...o})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((o,a,c)=>i.has(a)||typeof o.argsProvider=="function"),this.updateI18nProperties(o=>typeof o.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((o,a,c)=>{var l;return((l=c?.context)===null||l===void 0?void 0:l.toLowerCase())===i}),this.updateI18nProperties(o=>o.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var o,a;let c=this,l=(u,d,h)=>h?.context&&h.key&&i(u,d,h)?{...h,message:this.i18n({context:h.context,key:h.key,custom:h.custom,...u})}:h;(o=this[Ta])===null||o===void 0||o.forEach((u,d)=>c[d]=l(u,d,c[d])),(a=this[Oa])===null||a===void 0||a.forEach((u,d)=>{var h;return c[d]=(h=c[d])===null||h===void 0?void 0:h.map(g=>l(u,d,g))})}updateI18nProperties(i){var o;(o=this[Ai])===null||o===void 0||o.forEach((a,c)=>{i(a,c)&&(this[c]=this.i18n(a))})}addI18nMessages(i,o,a){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,o,a)}addI18nContext(i,o,a){let c=(typeof i=="string"?i:i.name).toLowerCase();a=typeof i=="string"?a:i.custom,this[Wt].set(c,{isCustomContext:a}),this[rt].has(c)||this[rt].set(c,this.getI18nService(a).subscribe(c,()=>this.onI18nUpdate(c))),this.getI18nService(a).prepareContext(c,o)}hasI18nContext(i){return this[Wt].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Wt].forEach((i,o)=>this.addI18nContext(o,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[rt].forEach(i=>i()),this[rt].clear()}}return t=Wt,r=rt,wa([(0,Ei.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),vi=class extends Qt(Fe.FtLitElement){},Gt=class extends Qt(Fe.FtLitElementRedux){};var xi=y(Q());var bi=xi.css`
@@ -44,7 +44,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:r.extend("--ftds-con
44
44
  input::-webkit-search-results-decoration {
45
45
  display: none;
46
46
  }
47
- `;var Us={};var Yn={};P(Yn,{ParametrizedLabelResolver:()=>hr});var hr=class t{constructor(e,o){this.defaultLabels=e,this.labels=o}resolve(e,...o){var n,i;e=this.resolvePluralKey(e,o);let a=(i=(n=this.labels[e])!==null&&n!==void 0?n:this.defaultLabels[e])!==null&&i!==void 0?i:"";return t.replaceParameters(a,...o)}static replaceParameters(e,...o){return o.forEach((n,i)=>e=e.replace(new RegExp(`\\{${i}([^}]*)\\}`,"g"),(a,s)=>t.formatValue(n,s))),e}resolvePluralKey(e,o){for(let n of o)if(typeof n=="number"){let i=`${String(e)}[\\=${n}]`;if(i in this.labels||i in this.defaultLabels)return i}return e}static formatValue(e,o){return e instanceof Date?t.formatDate(e,o):e??""}static formatDate(e,o){let n=i=>o?.includes("date")?e.toLocaleDateString(i):o?.includes("time")?e.toLocaleTimeString(i):e.toLocaleString(i);try{return n(document.documentElement.lang)}catch{return n()}}};var gi={};P(gi,{FtCommandQueue:()=>mr,FtLitElementRedux:()=>_e,FtReduxStore:()=>$e,FtStateManager:()=>Ut,ReduxWatcher:()=>Cr,clearAllStores:()=>Xp,isFtReduxStore:()=>Ft,redux:()=>Pt,reduxEventListener:()=>np,reduxReactive:()=>op,watch:()=>ef,withRedux:()=>Bs});var op=()=>(t,e)=>{var o;let n=t.constructor;n.reduxReactiveProperties=new Set(n.reduxReactiveProperties),(o=n.reduxReactiveProperties)===null||o===void 0||o.add(e)},Pt=t=>{let e=t??{};return(o,n)=>{var i;let a={hasChanged:de,attribute:!1,...e};C(a)(o,n);let s=o.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(i=e.selector)!==null&&i!==void 0?i:(l=>l[n]),store:e.store})}},np=t=>(e,o)=>{let n=e.constructor;n.reduxEventListeners=new Map(n.reduxEventListeners),n.reduxEventListeners.set(o,t)};var mr=class{constructor(){this.queue=[]}add(e,o=!1){o&&this.clear(e.type),this.queue.push(e)}consume(e){let o=this.queue.find(n=>n.type===e);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(e){typeof e=="string"?this.queue=this.queue.filter(o=>o.type!==e):this.queue=this.queue.filter(o=>!e.test(o.type))}};function Ft(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var gr=Symbol("internalReduxEventsUnsubscribers"),Ue=Symbol("internalStoresUnsubscribers"),et=Symbol("internalStores"),Bs=$(Symbol("withRedux"),function(t){var e,o,n;class i extends t{constructor(){super(...arguments),this[e]=new Map,this[o]=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[et].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[et].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[et].get(s)}addStore(s,l){var d;l=(d=l??s.name)!==null&&d!==void 0?d:"default-store",this.unsubscribeFromStore(l),this[et].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[et].delete(l)}setupStores(){this.unsubscribeFromStores(),this[et].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let d=this.constructor.getPropertyOptions(l);if(!d?.attribute||!this.hasAttribute(typeof d?.attribute=="string"?d.attribute:l)){let p=this.getStore(s.store);p&&(s.store?this[Ue].has(s.store):this[Ue].size>0)&&(this[l]=s.selector(p.getState(),this))}})}subscribeToStore(s,l){var d;this[Ue].set(s,l.subscribe(()=>this.updateFromStores())),this[gr].set(s,[]),Ft(l)&&l.eventBus&&((d=this.reduxConstructor.reduxEventListeners)===null||d===void 0||d.forEach((p,h)=>{if(typeof this[h]=="function"&&(!p.store||l.name===p.store)){let f=m=>this[h](m);l.addEventListener(p.eventName,f),this[gr].get(s).push(()=>l.removeEventListener(p.eventName,f))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[Ue].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[Ue].has(s)&&this[Ue].get(s)(),this[Ue].delete(s),(l=this[gr].get(s))===null||l===void 0||l.forEach(d=>d()),this[gr].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=Ue,o=et,n=gr,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),_e=class extends Bs(G){};function j(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var ip=typeof Symbol=="function"&&Symbol.observable||"@@observable",$s=ip,Qn=()=>Math.random().toString(36).substring(7).split("").join("."),ap={INIT:`@@redux/INIT${Qn()}`,REPLACE:`@@redux/REPLACE${Qn()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Qn()}`},Jr=ap;function Xr(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function Jn(t,e,o){if(typeof t!="function")throw new Error(j(2));if(typeof e=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(j(0));if(typeof e=="function"&&typeof o>"u"&&(o=e,e=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(j(1));return o(Jn)(t,e)}let n=t,i=e,a=new Map,s=a,l=0,d=!1;function p(){s===a&&(s=new Map,a.forEach((v,w)=>{s.set(w,v)}))}function h(){if(d)throw new Error(j(3));return i}function f(v){if(typeof v!="function")throw new Error(j(4));if(d)throw new Error(j(5));let w=!0;p();let N=l++;return s.set(N,v),function(){if(w){if(d)throw new Error(j(6));w=!1,p(),s.delete(N),a=null}}}function m(v){if(!Xr(v))throw new Error(j(7));if(typeof v.type>"u")throw new Error(j(8));if(typeof v.type!="string")throw new Error(j(17));if(d)throw new Error(j(9));try{d=!0,i=n(i,v)}finally{d=!1}return(a=s).forEach(N=>{N()}),v}function b(v){if(typeof v!="function")throw new Error(j(10));n=v,m({type:Jr.REPLACE})}function S(){let v=f;return{subscribe(w){if(typeof w!="object"||w===null)throw new Error(j(11));function N(){let y=w;y.next&&y.next(h())}return N(),{unsubscribe:v(N)}},[$s](){return this}}}return m({type:Jr.INIT}),{dispatch:m,subscribe:f,getState:h,replaceReducer:b,[$s]:S}}function sp(t){Object.keys(t).forEach(e=>{let o=t[e];if(typeof o(void 0,{type:Jr.INIT})>"u")throw new Error(j(12));if(typeof o(void 0,{type:Jr.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(j(13))})}function zs(t){let e=Object.keys(t),o={};for(let s=0;s<e.length;s++){let l=e[s];typeof t[l]=="function"&&(o[l]=t[l])}let n=Object.keys(o),i,a;try{sp(o)}catch(s){a=s}return function(l={},d){if(a)throw a;let p=!1,h={};for(let f=0;f<n.length;f++){let m=n[f],b=o[m],S=l[m],E=b(S,d);if(typeof E>"u"){let v=d&&d.type;throw new Error(j(14))}h[m]=E,p=p||E!==S}return p=p||n.length!==Object.keys(l).length,p?h:l}}function yr(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,o)=>(...n)=>e(o(...n)))}function Hs(...t){return e=>(o,n)=>{let i=e(o,n),a=()=>{throw new Error(j(15))},s={getState:i.getState,dispatch:(d,...p)=>a(d,...p)},l=t.map(d=>d(s));return a=yr(...l)(i.dispatch),{...i,dispatch:a}}}function Ws(t){return Xr(t)&&"type"in t&&typeof t.type=="string"}var Js=Symbol.for("immer-nothing"),Vs=Symbol.for("immer-draftable"),Z=Symbol.for("immer-state");function fe(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var te=Object,Dt=te.getPrototypeOf,oo="constructor",lo="prototype",ri="configurable",no="enumerable",to="writable",br="value",ve=t=>!!t&&!!t[Z];function re(t){return t?Xs(t)||po(t)||!!t[Vs]||!!t[oo]?.[Vs]||fo(t)||ho(t):!1}var cp=te[lo][oo].toString(),Gs=new WeakMap;function Xs(t){if(!t||!di(t))return!1;let e=Dt(t);if(e===null||e===te[lo])return!0;let o=te.hasOwnProperty.call(e,oo)&&e[oo];if(o===Object)return!0;if(!Mt(o))return!1;let n=Gs.get(o);return n===void 0&&(n=Function.toString.call(o),Gs.set(o,n)),n===cp}function uo(t,e,o=!0){vr(t)===0?(o?Reflect.ownKeys(t):te.keys(t)).forEach(i=>{e(i,t[i],t)}):t.forEach((n,i)=>e(i,n,t))}function vr(t){let e=t[Z];return e?e.type_:po(t)?1:fo(t)?2:ho(t)?3:0}var Xn=(t,e,o=vr(t))=>o===2?t.has(e):te[lo].hasOwnProperty.call(t,e),oi=(t,e,o=vr(t))=>o===2?t.get(e):t[e],io=(t,e,o,n=vr(t))=>{n===2?t.set(e,o):n===3?t.add(o):t[e]=o};function lp(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}var po=Array.isArray,fo=t=>t instanceof Map,ho=t=>t instanceof Set,di=t=>typeof t=="object",Mt=t=>typeof t=="function",ei=t=>typeof t=="boolean";function dp(t){let e=+t;return Number.isInteger(e)&&String(e)===t}var Ie=t=>t.copy_||t.base_;var ui=t=>t.modified_?t.copy_:t.base_;function ni(t,e){if(fo(t))return new Map(t);if(ho(t))return new Set(t);if(po(t))return Array[lo].slice.call(t);let o=Xs(t);if(e===!0||e==="class_only"&&!o){let n=te.getOwnPropertyDescriptors(t);delete n[Z];let i=Reflect.ownKeys(n);for(let a=0;a<i.length;a++){let s=i[a],l=n[s];l[to]===!1&&(l[to]=!0,l[ri]=!0),(l.get||l.set)&&(n[s]={[ri]:!0,[to]:!0,[no]:l[no],[br]:t[s]})}return te.create(Dt(t),n)}else{let n=Dt(t);if(n!==null&&o)return{...t};let i=te.create(n);return te.assign(i,t)}}function pi(t,e=!1){return mo(t)||ve(t)||!re(t)||(vr(t)>1&&te.defineProperties(t,{set:eo,add:eo,clear:eo,delete:eo}),te.freeze(t),e&&uo(t,(o,n)=>{pi(n,!0)},!1)),t}function up(){fe(2)}var eo={[br]:up};function mo(t){return t===null||!di(t)?!0:te.isFrozen(t)}var ao="MapSet",ii="Patches",js="ArrayMethods",ec={};function tt(t){let e=ec[t];return e||fe(0,t),e}var Ks=t=>!!ec[t];var xr,tc=()=>xr,pp=(t,e)=>({drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Ks(ao)?tt(ao):void 0,arrayMethodsPlugin_:Ks(js)?tt(js):void 0});function qs(t,e){e&&(t.patchPlugin_=tt(ii),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function ai(t){si(t),t.drafts_.forEach(fp),t.drafts_=null}function si(t){t===xr&&(xr=t.parent_)}var Zs=t=>xr=pp(xr,t);function fp(t){let e=t[Z];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function Ys(t,e){e.unfinalizedDrafts_=e.drafts_.length;let o=e.drafts_[0];if(t!==void 0&&t!==o){o[Z].modified_&&(ai(e),fe(4)),re(t)&&(t=Qs(e,t));let{patchPlugin_:i}=e;i&&i.generateReplacementPatches_(o[Z].base_,t,e)}else t=Qs(e,o);return hp(e,t,!0),ai(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==Js?t:void 0}function Qs(t,e){if(mo(e))return e;let o=e[Z];if(!o)return so(e,t.handledSet_,t);if(!go(o,t))return e;if(!o.modified_)return o.base_;if(!o.finalized_){let{callbacks_:n}=o;if(n)for(;n.length>0;)n.pop()(t);nc(o,t)}return o.copy_}function hp(t,e,o=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&pi(e,o)}function rc(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}var go=(t,e)=>t.scope_===e,mp=[];function oc(t,e,o,n){let i=Ie(t),a=t.type_;if(n!==void 0&&oi(i,n,a)===e){io(i,n,o,a);return}if(!t.draftLocations_){let l=t.draftLocations_=new Map;uo(i,(d,p)=>{if(ve(p)){let h=l.get(p)||[];h.push(d),l.set(p,h)}})}let s=t.draftLocations_.get(e)??mp;for(let l of s)io(i,l,o,a)}function gp(t,e,o){t.callbacks_.push(function(i){let a=e;if(!a||!go(a,i))return;i.mapSetPlugin_?.fixSetContents(a);let s=ui(a);oc(t,a.draft_??a,s,o),nc(a,i)})}function nc(t,e){if(t.modified_&&!t.finalized_&&(t.type_===3||t.type_===1&&t.allIndicesReassigned_||(t.assigned_?.size??0)>0)){let{patchPlugin_:n}=e;if(n){let i=n.getPath(t);i&&n.generatePatches_(t,i,e)}rc(t)}}function yp(t,e,o){let{scope_:n}=t;if(ve(o)){let i=o[Z];go(i,n)&&i.callbacks_.push(function(){ro(t);let s=ui(i);oc(t,o,s,e)})}else re(o)&&t.callbacks_.push(function(){let a=Ie(t);t.type_===3?a.has(o)&&so(o,n.handledSet_,n):oi(a,e,t.type_)===o&&n.drafts_.length>1&&(t.assigned_.get(e)??!1)===!0&&t.copy_&&so(oi(t.copy_,e,t.type_),n.handledSet_,n)})}function so(t,e,o){return!o.immer_.autoFreeze_&&o.unfinalizedDrafts_<1||ve(t)||e.has(t)||!re(t)||mo(t)||(e.add(t),uo(t,(n,i)=>{if(ve(i)){let a=i[Z];if(go(a,o)){let s=ui(a);io(t,n,s,t.type_),rc(a)}}else re(i)&&so(i,e,o)})),t}function bp(t,e){let o=po(t),n={type_:o?1:0,scope_:e?e.scope_:tc(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=n,a=co;o&&(i=[n],a=Sr);let{revoke:s,proxy:l}=Proxy.revocable(i,a);return n.draft_=l,n.revoke_=s,[l,n]}var co={get(t,e){if(e===Z)return t;let o=t.scope_.arrayMethodsPlugin_,n=t.type_===1&&typeof e=="string";if(n&&o?.isArrayOperationMethod(e))return o.createMethodInterceptor(t,e);let i=Ie(t);if(!Xn(i,e,t.type_))return Sp(t,i,e);let a=i[e];if(t.finalized_||!re(a)||n&&t.operationMethod&&o?.isMutatingArrayMethod(t.operationMethod)&&dp(e))return a;if(a===ti(t.base_,e)||xp(t,e,a)){ro(t);let s=t.type_===1?+e:e,l=li(t.scope_,a,t,s);return t.copy_[s]=l}return a},has(t,e){return e in Ie(t)},ownKeys(t){return Reflect.ownKeys(Ie(t))},set(t,e,o){let n=ic(Ie(t),e);if(n?.set)return n.set.call(t.draft_,o),!0;if(!t.modified_){let i=ti(Ie(t),e),a=i?.[Z];if(a&&a.base_===o)return t.copy_[e]=o,t.assigned_.set(e,!1),!0;if(lp(o,i)&&(o!==void 0||Xn(t.base_,e,t.type_)))return!0;ro(t),ci(t)}return t.copy_[e]===o&&(o!==void 0||Xn(t.copy_,e,t.type_))||Number.isNaN(o)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=o,t.assigned_.set(e,!0),yp(t,e,o)),!0},deleteProperty(t,e){return ro(t),ti(t.base_,e)!==void 0||e in t.base_?(t.assigned_.set(e,!1),ci(t)):t.assigned_.delete(e),t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){let o=Ie(t),n=Reflect.getOwnPropertyDescriptor(o,e);return n&&{[to]:!0,[ri]:t.type_!==1||e!=="length",[no]:n[no],[br]:o[e]}},defineProperty(){fe(11)},getPrototypeOf(t){return Dt(t.base_)},setPrototypeOf(){fe(12)}},Sr={};for(let t in co){let e=co[t];Sr[t]=function(){let o=arguments;return o[0]=o[0][0],e.apply(this,o)}}Sr.deleteProperty=function(t,e){return Sr.set.call(this,t,e,void 0)};Sr.set=function(t,e,o){return co.set.call(this,t[0],e,o,t[0])};function ti(t,e){let o=t[Z];return(o?Ie(o):t)[e]}function xp(t,e,o){return t.type_!==1||!t.allIndicesReassigned_||t.assigned_?.get(e)||!re(o)||o[Z]?!1:t.baseRefs_.has(o)}function Sp(t,e,o){let n=ic(e,o);return n?br in n?n[br]:n.get?.call(t.draft_):void 0}function ic(t,e){if(!(e in t))return;let o=Dt(t);for(;o;){let n=Object.getOwnPropertyDescriptor(o,e);if(n)return n;o=Dt(o)}}function ci(t){t.modified_||(t.modified_=!0,t.parent_&&ci(t.parent_))}function ro(t){t.copy_||(t.assigned_=new Map,t.copy_=ni(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var vp=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,o,n)=>{if(Mt(e)&&!Mt(o)){let a=o;o=e;let s=this;return function(d=a,...p){return s.produce(d,h=>o.call(this,h,...p))}}Mt(o)||fe(6),n!==void 0&&!Mt(n)&&fe(7);let i;if(re(e)){let a=Zs(this),s=li(a,e,void 0),l=!0;try{i=o(s),l=!1}finally{l?ai(a):si(a)}return qs(a,n),Ys(i,a)}else if(!e||!di(e)){if(i=o(e),i===void 0&&(i=e),i===Js&&(i=void 0),this.autoFreeze_&&pi(i,!0),n){let a=[],s=[];tt(ii).generateReplacementPatches_(e,i,{patches_:a,inversePatches_:s}),n(a,s)}return i}else fe(1,e)},this.produceWithPatches=(e,o)=>{if(Mt(e))return(s,...l)=>this.produceWithPatches(s,d=>e(d,...l));let n,i;return[this.produce(e,o,(s,l)=>{n=s,i=l}),n,i]},ei(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),ei(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),ei(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){re(t)||fe(8),ve(t)&&(t=ac(t));let e=Zs(this),o=li(e,t,void 0);return o[Z].isManual_=!0,si(e),o}finishDraft(t,e){let o=t&&t[Z];(!o||!o.isManual_)&&fe(9);let{scope_:n}=o;return qs(n,e),Ys(void 0,n)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,e){let o;for(o=e.length-1;o>=0;o--){let i=e[o];if(i.path.length===0&&i.op==="replace"){t=i.value;break}}o>-1&&(e=e.slice(o+1));let n=tt(ii).applyPatches_;return ve(t)?n(t,e):this.produce(t,i=>n(i,e))}};function li(t,e,o,n){let[i,a]=fo(e)?tt(ao).proxyMap_(e,o):ho(e)?tt(ao).proxySet_(e,o):bp(e,o);return(o?.scope_??tc()).drafts_.push(i),a.callbacks_=o?.callbacks_??[],a.key_=n,o&&n!==void 0?gp(o,a,n):a.callbacks_.push(function(d){d.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:p}=d;a.modified_&&p&&p.generatePatches_(a,[],d)}),i}function ac(t){return ve(t)||fe(10,t),sc(t)}function sc(t){if(!re(t)||mo(t))return t;let e=t[Z],o,n=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,o=ni(t,e.scope_.immer_.useStrictShallowCopy_),n=e.scope_.immer_.shouldUseStrictIteration()}else o=ni(t,!0);return uo(o,(i,a)=>{io(o,i,sc(a))},n),e&&(e.finalized_=!1),o}var Ep=globalThis.Iterator,Lx=typeof Ep?.from=="function";var Cp=new vp,fi=Cp.produce;function cc(t){return({dispatch:o,getState:n})=>i=>a=>typeof a=="function"?a(o,n,t):i(a)}var lc=cc(),dc=cc;var wp=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?yr:yr.apply(null,arguments)},Bx=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}},Op=t=>t&&typeof t.match=="function";function Be(t,e){function o(...n){if(e){let i=e(...n);if(!i)throw new Error(Te(0));return{type:t,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:t,payload:n[0]}}return o.toString=()=>`${t}`,o.type=t,o.match=n=>Ws(n)&&n.type===t,o}var mc=class Er extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,Er.prototype)}static get[Symbol.species](){return Er}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new Er(...e[0].concat(this)):new Er(...e.concat(this))}};function uc(t){return re(t)?fi(t,()=>{}):t}function yo(t,e,o){return t.has(e)?t.get(e):t.set(e,o(e)).get(e)}function Ap(t){return typeof t=="boolean"}var Rp=()=>function(e){let{thunk:o=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:a=!0}=e??{},s=new mc;return o&&(Ap(o)?s.push(lc):s.push(dc(o.extraArgument))),s},_p="RTK_autoBatch";var pc=t=>e=>{setTimeout(e,t)},Ip=(t,e)=>o=>{let n=!1,i=()=>{n||(n=!0,cancelAnimationFrame(a),clearTimeout(s),o())},a=t(i),s=setTimeout(i,e)},Tp=(t={type:"raf"})=>e=>(...o)=>{let n=e(...o),i=!0,a=!1,s=!1,l=new Set,d=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?Ip(window.requestAnimationFrame,100):pc(10):t.type==="callback"?t.queueNotification:pc(t.timeout),p=()=>{s=!1,a&&(a=!1,l.forEach(h=>h()))};return Object.assign({},n,{subscribe(h){let f=()=>i&&h(),m=n.subscribe(f);return l.add(h),()=>{m(),l.delete(h)}},dispatch(h){try{return i=!h?.meta?.[_p],a=!i,a&&(s||(s=!0,d(p))),n.dispatch(h)}finally{i=!0}}})},kp=t=>function(o){let{autoBatch:n=!0}=o??{},i=new mc(t);return n&&i.push(Tp(typeof n=="object"?n:void 0)),i};function gc(t){let e=Rp(),{reducer:o=void 0,middleware:n,devTools:i=!0,duplicateMiddlewareCheck:a=!0,preloadedState:s=void 0,enhancers:l=void 0}=t||{},d;if(typeof o=="function")d=o;else if(Xr(o))d=zs(o);else throw new Error(Te(1));let p;typeof n=="function"?p=n(e):p=e();let h=yr;i&&(h=wp({trace:!1,...typeof i=="object"&&i}));let f=Hs(...p),m=kp(f),b=typeof l=="function"?l(m):m(),S=h(...b);return Jn(d,s,S)}function yc(t){let e={},o=[],n,i={addCase(a,s){let l=typeof a=="string"?a:a.type;if(!l)throw new Error(Te(28));if(l in e)throw new Error(Te(29));return e[l]=s,i},addAsyncThunk(a,s){return s.pending&&(e[a.pending.type]=s.pending),s.rejected&&(e[a.rejected.type]=s.rejected),s.fulfilled&&(e[a.fulfilled.type]=s.fulfilled),s.settled&&o.push({matcher:a.settled,reducer:s.settled}),i},addMatcher(a,s){return o.push({matcher:a,reducer:s}),i},addDefaultCase(a){return n=a,i}};return t(i),[e,o,n]}function Lp(t){return typeof t=="function"}function Np(t,e){let[o,n,i]=yc(e),a;if(Lp(t))a=()=>uc(t());else{let l=uc(t);a=()=>l}function s(l=a(),d){let p=[o[d.type],...n.filter(({matcher:h})=>h(d)).map(({reducer:h})=>h)];return p.filter(h=>!!h).length===0&&(p=[i]),p.reduce((h,f)=>{if(f)if(ve(h)){let b=f(h,d);return b===void 0?h:b}else{if(re(h))return fi(h,m=>f(m,d));{let m=f(h,d);if(m===void 0){if(h===null)return h;throw Error("A case reducer on a non-draftable value must not return undefined")}return m}}return h},l)}return s.getInitialState=a,s}var Pp=(t,e)=>Op(t)?t.match(e):t(e);function Fp(...t){return e=>t.some(o=>Pp(o,e))}var Mp="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Dp=(t=21)=>{let e="",o=t;for(;o--;)e+=Mp[Math.random()*64|0];return e},Up=["name","message","stack","code"],hi=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},fc=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},Bp=t=>{if(typeof t=="object"&&t!==null){let e={};for(let o of Up)typeof t[o]=="string"&&(e[o]=t[o]);return e}return{message:String(t)}},hc="External signal was aborted",$p=(()=>{function t(e,o,n){let i=Be(e+"/fulfilled",(d,p,h,f)=>({payload:d,meta:{...f||{},arg:h,requestId:p,requestStatus:"fulfilled"}})),a=Be(e+"/pending",(d,p,h)=>({payload:void 0,meta:{...h||{},arg:p,requestId:d,requestStatus:"pending"}})),s=Be(e+"/rejected",(d,p,h,f,m)=>({payload:f,error:(n&&n.serializeError||Bp)(d||"Rejected"),meta:{...m||{},arg:h,requestId:p,rejectedWithValue:!!f,requestStatus:"rejected",aborted:d?.name==="AbortError",condition:d?.name==="ConditionError"}}));function l(d,{signal:p}={}){return(h,f,m)=>{let b=n?.idGenerator?n.idGenerator(d):Dp(),S=new AbortController,E,v;function w(g){v=g,S.abort()}p&&(p.aborted?w(hc):p.addEventListener("abort",()=>w(hc),{once:!0}));let N=(async function(){let g;try{let x=n?.condition?.(d,{getState:f,extra:m});if(Hp(x)&&(x=await x),x===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let _=new Promise((I,R)=>{E=()=>{R({name:"AbortError",message:v||"Aborted"})},S.signal.addEventListener("abort",E,{once:!0})});h(a(b,d,n?.getPendingMeta?.({requestId:b,arg:d},{getState:f,extra:m}))),g=await Promise.race([_,Promise.resolve(o(d,{dispatch:h,getState:f,extra:m,requestId:b,signal:S.signal,abort:w,rejectWithValue:((I,R)=>new hi(I,R)),fulfillWithValue:((I,R)=>new fc(I,R))})).then(I=>{if(I instanceof hi)throw I;return I instanceof fc?i(I.payload,b,d,I.meta):i(I,b,d)})])}catch(x){g=x instanceof hi?s(null,b,d,x.payload,x.meta):s(x,b,d)}finally{E&&S.signal.removeEventListener("abort",E)}return n&&!n.dispatchConditionRejection&&s.match(g)&&g.meta.condition||h(g),g})();return Object.assign(N,{abort:w,requestId:b,arg:d,unwrap(){return N.then(zp)}})}}return Object.assign(l,{pending:a,rejected:s,fulfilled:i,settled:Fp(s,i),typePrefix:e})}return t.withTypes=()=>t,t})();function zp(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Hp(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var bc=Symbol.for("rtk-slice-createasyncthunk"),zx={[bc]:$p};function Wp(t,e){return`${t}/${e}`}function Vp({creators:t}={}){let e=t?.asyncThunk?.[bc];return function(n){let{name:i,reducerPath:a=i}=n;if(!i)throw new Error(Te(11));typeof process<"u";let s=(typeof n.reducers=="function"?n.reducers(jp()):n.reducers)||{},l=Object.keys(s),d={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},p={addCase(g,y){let x=typeof g=="string"?g:g.type;if(!x)throw new Error(Te(12));if(x in d.sliceCaseReducersByType)throw new Error(Te(13));return d.sliceCaseReducersByType[x]=y,p},addMatcher(g,y){return d.sliceMatchers.push({matcher:g,reducer:y}),p},exposeAction(g,y){return d.actionCreators[g]=y,p},exposeCaseReducer(g,y){return d.sliceCaseReducersByName[g]=y,p}};l.forEach(g=>{let y=s[g],x={reducerName:g,type:Wp(i,g),createNotation:typeof n.reducers=="function"};qp(y)?Yp(x,y,p,e):Kp(x,y,p)});function h(){let[g={},y=[],x=void 0]=typeof n.extraReducers=="function"?yc(n.extraReducers):[n.extraReducers],_={...g,...d.sliceCaseReducersByType};return Np(n.initialState,I=>{for(let R in _)I.addCase(R,_[R]);for(let R of d.sliceMatchers)I.addMatcher(R.matcher,R.reducer);for(let R of y)I.addMatcher(R.matcher,R.reducer);x&&I.addDefaultCase(x)})}let f=g=>g,m=new Map,b=new WeakMap,S;function E(g,y){return S||(S=h()),S(g,y)}function v(){return S||(S=h()),S.getInitialState()}function w(g,y=!1){function x(I){let R=I[g];return typeof R>"u"&&y&&(R=yo(b,x,v)),R}function _(I=f){let R=yo(m,y,()=>new WeakMap);return yo(R,I,()=>{let F={};for(let[A,T]of Object.entries(n.selectors??{}))F[A]=Gp(T,I,()=>yo(b,I,v),y);return F})}return{reducerPath:g,getSelectors:_,get selectors(){return _(x)},selectSlice:x}}let N={name:i,reducer:E,actions:d.actionCreators,caseReducers:d.sliceCaseReducersByName,getInitialState:v,...w(a),injectInto(g,{reducerPath:y,...x}={}){let _=y??a;return g.inject({reducerPath:_,reducer:E},x),{...N,...w(_,!0)}}};return N}}function Gp(t,e,o,n){function i(a,...s){let l=e(a);return typeof l>"u"&&n&&(l=o()),t(l,...s)}return i.unwrapped=t,i}var xc=Vp();function jp(){function t(e,o){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...o}}return t.withTypes=()=>t,{reducer(e){return Object.assign({[e.name](...o){return e(...o)}}[e.name],{_reducerDefinitionType:"reducer"})},preparedReducer(e,o){return{_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:o}},asyncThunk:t}}function Kp({type:t,reducerName:e,createNotation:o},n,i){let a,s;if("reducer"in n){if(o&&!Zp(n))throw new Error(Te(17));a=n.reducer,s=n.prepare}else a=n;i.addCase(t,a).exposeCaseReducer(e,a).exposeAction(e,s?Be(t,s):Be(t))}function qp(t){return t._reducerDefinitionType==="asyncThunk"}function Zp(t){return t._reducerDefinitionType==="reducerWithPrepare"}function Yp({type:t,reducerName:e},o,n,i){if(!i)throw new Error(Te(18));let{payloadCreator:a,fulfilled:s,pending:l,rejected:d,settled:p,options:h}=o,f=i(t,a,h);n.exposeAction(e,f),s&&n.addCase(f.fulfilled,s),l&&n.addCase(f.pending,l),d&&n.addCase(f.rejected,d),p&&n.addMatcher(f.settled,p),n.exposeCaseReducer(e,{fulfilled:s||bo,pending:l||bo,rejected:d||bo,settled:p||bo})}function bo(){}var Sc="listener",vc="completed",Ec="cancelled",Hx=`task-${Ec}`,Wx=`task-${vc}`,Vx=`${Sc}-${Ec}`,Gx=`${Sc}-${vc}`;var{assign:Cc}=Object;var mi="listenerMiddleware";var Qp=Cc(Be(`${mi}/add`),{withTypes:()=>Qp}),jx=Be(`${mi}/removeAll`),Jp=Cc(Be(`${mi}/remove`),{withTypes:()=>Jp});function Te(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}window.ftReduxStores||(window.ftReduxStores={});var $e=class t extends we{static get(e){var o;let n=typeof e=="string"?e:e.name,i=typeof e=="string"?void 0:e,a=window.ftReduxStores[n];if(Ft(a))return a;if(i==null)return;let s=xc({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),l=gc({reducer:(d,p)=>{if(p.type==="CLEAR_FT_REDUX_STORE"){let h=ie(s.getInitialState());for(let f of p.keeping)h[f]=(d??h)[f];return h}else if(typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...d,...p.overwrites};return s.reducer(d,p)}});return window.ftReduxStores[i.name]=new t(s,l,i.eventBus)}constructor(e,o,n){super(),this.reduxSlice=e,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new mr,this.injectInto=(a,s)=>this.reduxSlice.injectInto(a,s),this.selectSlice=a=>this.reduxSlice.selectSlice(a);let i=a=>a!=null?JSON.parse(JSON.stringify(a)):a;this.actions=new Proxy(this.reduxSlice.actions,{get:(a,s,l)=>{let d=s,p=a[d];return p?(...h)=>{let f=p(...h.map(i));return this.reduxStore.dispatch(f),f}:h=>{let f=d,m=this.getState()[f];Y(m,h)||this.setState({[f]:i(h)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};function Xp(){var t;for(let e of Object.values((t=window.ftReduxStores)!==null&&t!==void 0?t:{}))Ft(e)&&e.clear()}var Cr=class{constructor(e,o,n){this.store=e,this.valueSelector=o,this.callback=n}watch(){return this.stop(),this.lastValue=this.valueSelector(this.store.getState()),this.unsubscribe=this.store.subscribe(()=>{let e=this.store.getState(),o=this.valueSelector(e);de(this.lastValue,o)&&(this.callback(o,e),this.lastValue=o)}),this}stop(){return this.unsubscribe!=null&&(this.unsubscribe(),this.unsubscribe=void 0),this.lastValue=void 0,this}};function ef(t,e,o){return new Cr(t,e,o).watch()}var Ut=class{constructor(){this.requestConsumers=new Map}getOrCreateRequestConsumers(e){var o;return(o=this.requestConsumers.get(e))!==null&&o!==void 0?o:this.requestConsumers.set(e,new Set).get(e)}registerComponent(e,o){for(let n of o)this.getOrCreateRequestConsumers(n).add(e).size==1&&this.onNewNeededRequest(n)}unregisterComponent(e,o){for(let n of o)this.getOrCreateRequestConsumers(n).delete(e)}isRequestNeeded(e){return this.getOrCreateRequestConsumers(e).size>0}};var xi={};P(xi,{scrollHelper:()=>tf});var yi,xo=new Map,bi=class{lock(e,o){if(o){let n=xo.get(o);if(n==null||n===e)return xo.set(o,e),o}}release(e,o){o&&xo.get(o)===e&&xo.delete(o)}findFirstScrollableParent(e){var o;let n,i;for(let a of dn(e)){let s=a,l=this.elementCanScroll(s);if(l&&s.clientHeight&&s.clientHeight<s.scrollHeight){n=s;break}else l&&i==null&&(i=s)}return(o=n??i)!==null&&o!==void 0?o:document.body}elementCanScroll(e){try{return["auto","scroll"].includes(getComputedStyle(e).overflowY)&&!["contents"].includes(getComputedStyle(e).display)}catch{return!1}}getAbsoluteScrollOffset(e,o){var n,i;let a=0;for(;o&&o.offsetParent!==e.offsetParent;)a+=(n=o.offsetTop)!==null&&n!==void 0?n:0,o=o.offsetParent;return a+((i=o?.offsetTop)!==null&&i!==void 0?i:0)-e.offsetTop}computeTopOffsetRatio(e,o){if(typeof e=="number")return e;switch(e){case"end":return 1;case"center":return .5;case"nearest":return o;default:return 0}}scrollIntoViewIfPossible(e,o){let n=this.findFirstScrollableParent(e);if(e&&this.lock(this,n)){let i=this.getAbsoluteScrollOffset(n,e),a=i-n.clientHeight+e.clientHeight,s=i,l=Fe(0,(s-n.scrollTop)/(s-a),1),d=this.computeTopOffsetRatio(o?.position,l)*(a-s)+s;n.scrollTo({behavior:o?.behavior,top:d})}else console.warn("Could not scroll element into view because the scrollable parent is already locked",e,n);this.release(this,n)}};window.FluidTopicsScrollHelper=(yi=window.FluidTopicsScrollHelper)!==null&&yi!==void 0?yi:new bi;var tf=window.FluidTopicsScrollHelper;var Ei={};P(Ei,{SearchPlaceConverter:()=>$t,SearchPlaceQueryParams:()=>k,isSearchPlaceQueryParams:()=>dl,serializeRequest:()=>sf});var rf=t=>typeof t=="object"&&t!=null;var of=t=>typeof t=="number",So=t=>typeof t=="string",qc=t=>rf(t)&&So(t.endpoint)&&So(t.method)&&So(t.statusText)&&So(t.body)&&of(t.status),wc;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(wc||(wc={}));var Oc;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(Oc||(Oc={}));var Ac;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(Ac||(Ac={}));var Rc;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(Rc||(Rc={}));var _c;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(_c||(_c={}));var Ic;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(Ic||(Ic={}));var Tc;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(Tc||(Tc={}));var kc;(function(t){t.BOOKMARK__CREATE="BOOKMARK__CREATE",t.BOOKMARK__DELETE="BOOKMARK__DELETE",t.CASE_DEFLECTION__START="CASE_DEFLECTION__START",t.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",t.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",t.CHATBOT__RATE="CHATBOT__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",t.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",t.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",t.DOCUMENT__PRINT="DOCUMENT__PRINT",t.DOCUMENT__PROCESS="DOCUMENT__PROCESS",t.DOCUMENT__RATE="DOCUMENT__RATE",t.DOCUMENT__SEARCH="DOCUMENT__SEARCH",t.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",t.DOCUMENT__UNRATE="DOCUMENT__UNRATE",t.FEEDBACK__SEND="FEEDBACK__SEND",t.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",t.AI__RATE="AI__RATE",t.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",t.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",t.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",t.TOPIC__RATE="TOPIC__RATE",t.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",t.TOPIC__UNRATE="TOPIC__UNRATE",t.USER__LOGIN="USER__LOGIN",t.USER__LOGOUT="USER__LOGOUT",t.HEARTBEAT="HEARTBEAT"})(kc||(kc={}));var Lc;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(Lc||(Lc={}));var Nc;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(Nc||(Nc={}));var Pc;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT",t.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",t.LINK_PREVIEW="LINK_PREVIEW",t.UD_VIEWER="UD_VIEWER",t.ASSET_VIEWER="ASSET_VIEWER"})(Pc||(Pc={}));var Fc;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Fc||(Fc={}));var Mc;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Mc||(Mc={}));var Dc;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Dc||(Dc={}));var Uc;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Uc||(Uc={}));var Bc;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(Bc||(Bc={}));var rt;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(rt||(rt={}));var $c;(function(t){t.ASC="ASC",t.DESC="DESC"})($c||($c={}));var zc;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(zc||(zc={}));var vo;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(vo||(vo={}));var Zc=t=>Object.keys(vo).includes(t);var Hc;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Hc||(Hc={}));var Wc;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Wc||(Wc={}));var Vc;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Vc||(Vc={}));var Bt;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Bt||(Bt={}));var Yc=t=>Object.keys(Bt).includes(t);var Gc;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Gc||(Gc={}));var Si;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Si||(Si={}));var jc;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(jc||(jc={}));var z;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(z||(z={}));var ae;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(ae||(ae={}));var Kc;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(Kc||(Kc={}));var Qc;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(Qc||(Qc={}));var Jc;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Jc||(Jc={}));var Xc;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SUMMARY="SUMMARY",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.DOCUMENTATION="DOCUMENTATION",t.OTHER="OTHER"})(Xc||(Xc={}));var el;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(el||(el={}));var tl;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(tl||(tl={}));var rl;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(rl||(rl={}));var ol;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(ol||(ol={}));var nl;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(nl||(nl={}));var il;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(il||(il={}));var al;(function(t){t.SOURCES="SOURCES",t.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",t.VOCABULARIES="VOCABULARIES",t.METADATA="METADATA",t.PRETTY_URL="PRETTY_URL",t.ACCESS_RULE="ACCESS_RULE",t.DESIGNED_PAGES="DESIGNED_PAGES",t.THEME_STUDIO="THEME_STUDIO",t.PORTAL_GENERAL="PORTAL_GENERAL",t.ASSETS="ASSETS",t.CODE_LIBRARY="CODE_LIBRARY",t.THEME="THEME",t.CONTENT_STYLES="CONTENT_STYLES",t.HOMEPAGE="HOMEPAGE",t.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",t.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",t.PORTAL_METADATA="PORTAL_METADATA",t.LANGUAGES="LANGUAGES",t.PRINT_TEMPLATES="PRINT_TEMPLATES",t.OFFLINE="OFFLINE",t.CUSTOM_JS="CUSTOM_JS",t.CONFIDENTIALITY="CONFIDENTIALITY",t.NOTIFICATIONS="NOTIFICATIONS"})(al||(al={}));var sl;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(sl||(sl={}));var nf={[z.PERSONAL_BOOK_SHARE_USER]:[z.PERSONAL_BOOK_USER],[z.HTML_EXPORT_USER]:[z.PERSONAL_BOOK_USER],[z.PDF_EXPORT_USER]:[z.PERSONAL_BOOK_USER],[z.KHUB_ADMIN]:[z.CONTENT_PUBLISHER],[z.ADMIN]:[z.KHUB_ADMIN,z.USERS_ADMIN,z.PORTAL_ADMIN,z.BEHAVIOR_DATA_USER],[z.GENERATIVE_AI_EXPORT_USER]:[z.GENERATIVE_AI_USER]};function cl(t,e){return t===e||(nf[t]??[]).some(o=>cl(o,e))}function vi(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(n=>cl(n,e))}function af(t){return`"${t}"`}function ll(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function sf(t,e){return new $t(t).serialize(e)}var k;(function(t){t.LOCALE="content-lang",t.QUERY="query",t.SCOPE="scope",t.FILTERS="filters",t.VIRTUAL_FIELD="virtual-field",t.PERIOD="period",t.VALUE_FILTERS="value-filters",t.NEGATIVE_VALUE_FILTERS="negative-value-filters",t.DATE_FILTERS="date-filters",t.RANGE_FILTERS="range-filters",t.SORT="sort",t.PER_PAGE="per-page",t.KEYWORD_MATCH="keyword-match"})(k||(k={}));var cf=new Set(Object.values(k));function dl(t){return cf.has(t)}var $t=class{constructor(e,o=20,n=!1,i="en-US"){this.baseUrl=e,this.defaultPerPage=o,this.allLanguagesAllowed=n,this.defaultContentLocale=i,this.scopeMapping={documents:"DOCUMENTS",topics:"ALL_TOPICS"},this.filtersEscapeMapping=[["*","\\*","[ft-escaped-star-character]"],["~","\\\\~","[ft-escaped-tilde-character]"],["_","\\\\\\\\_","[ft-escaped-underscore-character]"]]}serialize(e,o){return this.serializeToCurrentPageIfPossible(e,o??"/search")}serializeToCurrentPageIfPossible(e,o){let n=o==null||o.trim().length===0,i=new URL(n?window.location.href:`${this.baseUrl.replace(/\/+$/,"")}${o}`);return i.search=this.toURLSearchParams(e),i.toString()}toURLSearchParams(e,o=!1){var n,i,a,s,l,d,p,h,f,m,b,S,E;let v=new URLSearchParams;e.contentLocale?(!o||e.contentLocale!==this.defaultContentLocale)&&v.append(k.LOCALE,e.contentLocale):v.append(k.LOCALE,this.allLanguagesAllowed?"all":this.defaultContentLocale),((n=e.query)===null||n===void 0?void 0:n.length)>0&&v.append(k.QUERY,e.query);let w=R=>{var F,A;let T=((A=(F=R.valueFilter)===null||F===void 0?void 0:F.values)!==null&&A!==void 0?A:[]).map(B=>this.escapeFilters(B)).map(B=>af(ll(B))).join("_");return`${R.key}~${T}`},N=(a=(i=e.metadataFilters)===null||i===void 0?void 0:i.filter(R=>R.valueFilter&&!R.valueFilter.negative))!==null&&a!==void 0?a:[];N.length>0&&v.append(k.VALUE_FILTERS,N.map(w).join("*"));let g=(l=(s=e.metadataFilters)===null||s===void 0?void 0:s.filter(R=>R.valueFilter&&R.valueFilter.negative))!==null&&l!==void 0?l:[];g.length>0&&v.append(k.NEGATIVE_VALUE_FILTERS,g.map(w).join("*"));let y=(p=(d=e.metadataFilters)===null||d===void 0?void 0:d.filter(R=>R.dateFilter))!==null&&p!==void 0?p:[];if(y.length>0){let R=y.map(F=>{var A;return`${F.key}~${(A=F.dateFilter)===null||A===void 0?void 0:A.type.toLowerCase()}`}).join("*");v.append(k.DATE_FILTERS,R)}let x=(f=(h=e.metadataFilters)===null||h===void 0?void 0:h.filter(R=>R.rangeFilter))!==null&&f!==void 0?f:[];if(x.length>0){let R=x.map(F=>{var A,T;return`${F.key}~${(A=F.rangeFilter)===null||A===void 0?void 0:A.from}_${(T=F.rangeFilter)===null||T===void 0?void 0:T.to}`}).join("*");v.append(k.RANGE_FILTERS,R)}e.virtualField&&e.virtualField!=="EVERYWHERE"&&v.append(k.VIRTUAL_FIELD,e.virtualField.toLowerCase()),e.scope&&e.scope!=="DEFAULT"&&v.append(k.SCOPE,e.scope.toLowerCase()),e.sortId!=null&&v.append(k.SORT,e.sortId),!((m=e.paging)===null||m===void 0)&&m.perPage&&((S=(b=e.paging)===null||b===void 0?void 0:b.perPage)!==null&&S!==void 0?S:this.defaultPerPage)!=this.defaultPerPage&&v.append(k.PER_PAGE,String(e.paging.perPage)),e.keywordMatch!=null&&v.append(k.KEYWORD_MATCH,e.keywordMatch.toLowerCase());let _=(E=e.otherQueryParams)!==null&&E!==void 0?E:{};for(let R in _)v.append(R,_[R]);let I=new Array;return v.forEach((R,F)=>{I.push(this.encodeQueryString(F)+"="+this.encodeQueryString(R))}),encodeURI(I.join("&")).replace(/#/g,"%23")}encodeQueryString(e){return encodeURIComponent(e).replace(/%20/g,"+")}parse(e){var o;let n=e.split("?"),i=this.fromURLSearchParams(n.slice(1).join("?")),a=n[0].split("/search/")[1];return a==null?i:{...i,scope:(o=this.scopeMapping[a])!==null&&o!==void 0?o:i.scope}}fromURLSearchParams(e){var o,n,i,a,s,l;try{e=decodeURI(e).replace(/%23/g,"#")}catch(w){console.warn("Could not decode search request query params, fallback on raw value",w)}let d=new URLSearchParams(e),p=d.get(k.LOCALE)==="all"?void 0:d.get(k.LOCALE),h=((o=d.get(k.VIRTUAL_FIELD))!==null&&o!==void 0?o:"EVERYWHERE").toUpperCase(),f=(n=d.get(k.SORT))===null||n===void 0?void 0:n.toLowerCase(),m=(i=d.get(k.SCOPE))!==null&&i!==void 0?i:"default",b=+((a=d.get(k.PER_PAGE))!==null&&a!==void 0?a:this.defaultPerPage),S=d.get(k.KEYWORD_MATCH),E=S?S.toUpperCase()===rt.MANDATORY?rt.MANDATORY:rt.OPTIONAL:void 0,v={};for(let w of d.keys())dl(w)||(v[w]=d.get(w));return{contentLocale:p??(this.allLanguagesAllowed?void 0:this.defaultContentLocale),query:(s=d.get(k.QUERY))!==null&&s!==void 0?s:"",scope:(l=this.scopeMapping[m])!==null&&l!==void 0?l:"DEFAULT",virtualField:Zc(h)?h:"EVERYWHERE",sortId:f,metadataFilters:this.parseCompatFilters(d),facets:[],paging:{page:1,perPage:Fe(1,isNaN(b)?this.defaultPerPage:b,1e3)},keywordMatch:E,otherQueryParams:v}}parseCompatFilters(e){var o,n,i,a,s,l,d;let p=[];return e.has(k.FILTERS)&&(p=this.parseValueFilters((o=e.get(k.FILTERS))!==null&&o!==void 0?o:"")),(n=e.has(k.PERIOD))!==null&&n!==void 0&&n&&(p=[...p,...this.parseLegacyPeriodFilter(((i=e.get(k.PERIOD))!==null&&i!==void 0?i:"").toUpperCase())]),[...p,...this.parseValueFilters((a=e.get(k.VALUE_FILTERS))!==null&&a!==void 0?a:""),...this.parseValueFilters((s=e.get(k.NEGATIVE_VALUE_FILTERS))!==null&&s!==void 0?s:"",!0),...this.parseDateFilters((l=e.get(k.DATE_FILTERS))!==null&&l!==void 0?l:""),...this.parseRangeFilters((d=e.get(k.RANGE_FILTERS))!==null&&d!==void 0?d:"")]}splitUnknownFilter(e){return this.superEscapeFilters(e).split("*").map(o=>o.split("~"))}parseValueFilters(e,o=!1){return e.length===0?[]:this.splitUnknownFilter(e).map(n=>({key:n[0],valueFilter:{values:n[1].split("_").map(ll).map(i=>this.unescapeFilterValue(i)),negative:o}}))}parseDateFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(o=>({key:o[0],dateFilter:{type:Bt[o[1].toUpperCase()]}}))}parseRangeFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(o=>({key:o[0],rangeFilter:{from:o[1].split("_")[0],to:o[1].split("_")[1]}}))}escapeFilters(e){for(let[o,n,i]of this.filtersEscapeMapping)e=e.replaceAll(o,n);return e}superEscapeFilters(e){for(let[o,n,i]of this.filtersEscapeMapping)e=e.replaceAll(n,i);return e}unescapeFilterValue(e){for(let[o,n,i]of this.filtersEscapeMapping)e=e.replaceAll(i,o);return e}parseLegacyPeriodFilter(e){if(Yc(e))return[{key:"ft:lastEdition",dateFilter:{type:Bt[e]}}];if(e.startsWith("CUSTOM_")){let[o,n,i]=e.split("_");return[{key:"ft:lastEdition",rangeFilter:{from:n,to:i}}]}return[]}static clearSearchParamsInUrl(e){let o=new URL(e);return[k.LOCALE,k.FILTERS,k.VALUE_FILTERS,k.NEGATIVE_VALUE_FILTERS,k.DATE_FILTERS,k.RANGE_FILTERS].forEach(i=>{o.searchParams.delete(i)}),o.toString()}static updateLocaleParamInUrl(e,o){let n=new URL(e);return n.searchParams.delete(k.LOCALE),o!==void 0&&n.searchParams.append(k.LOCALE,o),n.toString()}};var wi={};P(wi,{toFtFormComponent:()=>lf});var Ci=Symbol("elementInternals"),lf=$(Symbol("toFtFormComponent"),function(t){class e extends t{static get formAssociated(){return!0}get form(){return this[Ci].form}constructor(...n){super(n),this[Ci]=this.attachInternals()}setFormValue(n){this[Ci].setFormValue(n)}}return e});var Oi={};P(Oi,{DateFormatter:()=>ot});var ot=class{static format(e,o,n,i,a){return window.moment?window.moment(e).locale(o).format(this.getMomentDateFormat(n,i,!!a)):this.getIntlDateTime(e,o,n,i,!!a)}static getMomentDateFormat(e,o,n){return n?"LT":e?o?"lll":"ll":o?"L LT":"L"}static getIntlDateTime(e,o,n,i,a){let s=typeof e=="string"?new Date(e):e,l=new Intl.DateTimeFormat(o,{dateStyle:n?"medium":"short"}).format(s),d=new Intl.DateTimeFormat(o,{timeStyle:"short"}).format(s);return a?d:i?`${l} ${d}`:l}static getTimezoneAsString(){let e=n=>String(Math.floor(n)).padStart(2,"0"),o=new Date().getTimezoneOffset();return`${o<0?"+":"-"}${e(Math.abs(o)/60)}:${e(Math.abs(o)%60)}`}};var Ri={};P(Ri,{ALL_KEYS_VALUE:()=>Ai,SameWindowStorageEvent:()=>zt});var Ai="__all__",zt=class extends CustomEvent{constructor(e,o,n){super("same-window-storage",{detail:{key:e,oldValue:o,newValue:n}})}keyMatch(e){return this.detail.key.includes(e)||this.detail.key==Ai}};Storage.prototype.setItem=new Proxy(Storage.prototype.setItem,{apply(t,e,o){let n=e.getItem(o[0]);Reflect.apply(t,e,o),window.dispatchEvent(new zt(o[0],n,o[1]))}});Storage.prototype.removeItem=new Proxy(Storage.prototype.removeItem,{apply(t,e,o){let n=e.getItem(o[0]);Reflect.apply(t,e,o),window.dispatchEvent(new zt(o[0],n))}});Storage.prototype.clear=new Proxy(Storage.prototype.clear,{apply(t,e,o){Reflect.apply(t,e,o),window.dispatchEvent(new zt(Ai))}});var Ii={};P(Ii,{FocusMainContentEvent:()=>_i});var _i=class extends Event{constructor(){super("ft-focus-main-content",{composed:!0,bubbles:!0})}};var ul={};window.FluidTopicsA11yHints={isKeyboardNavigation:!1,lastPressedKey:""};function df(t){(t.key==="Enter"||t.key===" "||t.key==="Tab")&&(window.FluidTopicsA11yHints.isKeyboardNavigation=!0),window.FluidTopicsA11yHints.lastPressedKey=t.key}function uf(t){window.FluidTopicsA11yHints.isKeyboardNavigation=t.detail==0}document.addEventListener("keydown",df);document.addEventListener("click",uf);var pl=M`
47
+ `;var Us={};var Yn={};P(Yn,{ParametrizedLabelResolver:()=>hr});var hr=class t{constructor(e,o){this.defaultLabels=e,this.labels=o}resolve(e,...o){var n,i;e=this.resolvePluralKey(e,o);let a=(i=(n=this.labels[e])!==null&&n!==void 0?n:this.defaultLabels[e])!==null&&i!==void 0?i:"";return t.replaceParameters(a,...o)}static replaceParameters(e,...o){return o.forEach((n,i)=>e=e.replace(new RegExp(`\\{${i}([^}]*)\\}`,"g"),(a,s)=>t.formatValue(n,s))),e}resolvePluralKey(e,o){for(let n of o)if(typeof n=="number"){let i=`${String(e)}[\\=${n}]`;if(i in this.labels||i in this.defaultLabels)return i}return e}static formatValue(e,o){return e instanceof Date?t.formatDate(e,o):e??""}static formatDate(e,o){let n=i=>o?.includes("date")?e.toLocaleDateString(i):o?.includes("time")?e.toLocaleTimeString(i):e.toLocaleString(i);try{return n(document.documentElement.lang)}catch{return n()}}};var gi={};P(gi,{FtCommandQueue:()=>mr,FtLitElementRedux:()=>_e,FtReduxStore:()=>$e,FtStateManager:()=>Ut,ReduxWatcher:()=>Cr,clearAllStores:()=>Xp,isFtReduxStore:()=>Ft,redux:()=>Pt,reduxEventListener:()=>np,reduxReactive:()=>op,watch:()=>ef,withRedux:()=>Bs});var op=()=>(t,e)=>{var o;let n=t.constructor;n.reduxReactiveProperties=new Set(n.reduxReactiveProperties),(o=n.reduxReactiveProperties)===null||o===void 0||o.add(e)},Pt=t=>{let e=t??{};return(o,n)=>{var i;let a={hasChanged:de,attribute:!1,...e};C(a)(o,n);let s=o.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(i=e.selector)!==null&&i!==void 0?i:(l=>l[n]),store:e.store})}},np=t=>(e,o)=>{let n=e.constructor;n.reduxEventListeners=new Map(n.reduxEventListeners),n.reduxEventListeners.set(o,t)};var mr=class{constructor(){this.queue=[]}add(e,o=!1){o&&this.clear(e.type),this.queue.push(e)}consume(e){let o=this.queue.find(n=>n.type===e);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(e){typeof e=="string"?this.queue=this.queue.filter(o=>o.type!==e):this.queue=this.queue.filter(o=>!e.test(o.type))}};function Ft(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var gr=Symbol("internalReduxEventsUnsubscribers"),Ue=Symbol("internalStoresUnsubscribers"),et=Symbol("internalStores"),Bs=$(Symbol("withRedux"),function(t){var e,o,n;class i extends t{constructor(){super(...arguments),this[e]=new Map,this[o]=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[et].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[et].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[et].get(s)}addStore(s,l){var d;l=(d=l??s.name)!==null&&d!==void 0?d:"default-store",this.unsubscribeFromStore(l),this[et].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[et].delete(l)}setupStores(){this.unsubscribeFromStores(),this[et].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let d=this.constructor.getPropertyOptions(l);if(!d?.attribute||!this.hasAttribute(typeof d?.attribute=="string"?d.attribute:l)){let p=this.getStore(s.store);p&&(s.store?this[Ue].has(s.store):this[Ue].size>0)&&(this[l]=s.selector(p.getState(),this))}})}subscribeToStore(s,l){var d;this[Ue].set(s,l.subscribe(()=>this.updateFromStores())),this[gr].set(s,[]),Ft(l)&&l.eventBus&&((d=this.reduxConstructor.reduxEventListeners)===null||d===void 0||d.forEach((p,h)=>{if(typeof this[h]=="function"&&(!p.store||l.name===p.store)){let f=m=>this[h](m);l.addEventListener(p.eventName,f),this[gr].get(s).push(()=>l.removeEventListener(p.eventName,f))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[Ue].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[Ue].has(s)&&this[Ue].get(s)(),this[Ue].delete(s),(l=this[gr].get(s))===null||l===void 0||l.forEach(d=>d()),this[gr].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=Ue,o=et,n=gr,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),_e=class extends Bs(G){};function j(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var ip=typeof Symbol=="function"&&Symbol.observable||"@@observable",$s=ip,Qn=()=>Math.random().toString(36).substring(7).split("").join("."),ap={INIT:`@@redux/INIT${Qn()}`,REPLACE:`@@redux/REPLACE${Qn()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Qn()}`},Jr=ap;function Xr(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function Jn(t,e,o){if(typeof t!="function")throw new Error(j(2));if(typeof e=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(j(0));if(typeof e=="function"&&typeof o>"u"&&(o=e,e=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(j(1));return o(Jn)(t,e)}let n=t,i=e,a=new Map,s=a,l=0,d=!1;function p(){s===a&&(s=new Map,a.forEach((v,w)=>{s.set(w,v)}))}function h(){if(d)throw new Error(j(3));return i}function f(v){if(typeof v!="function")throw new Error(j(4));if(d)throw new Error(j(5));let w=!0;p();let N=l++;return s.set(N,v),function(){if(w){if(d)throw new Error(j(6));w=!1,p(),s.delete(N),a=null}}}function m(v){if(!Xr(v))throw new Error(j(7));if(typeof v.type>"u")throw new Error(j(8));if(typeof v.type!="string")throw new Error(j(17));if(d)throw new Error(j(9));try{d=!0,i=n(i,v)}finally{d=!1}return(a=s).forEach(N=>{N()}),v}function b(v){if(typeof v!="function")throw new Error(j(10));n=v,m({type:Jr.REPLACE})}function S(){let v=f;return{subscribe(w){if(typeof w!="object"||w===null)throw new Error(j(11));function N(){let y=w;y.next&&y.next(h())}return N(),{unsubscribe:v(N)}},[$s](){return this}}}return m({type:Jr.INIT}),{dispatch:m,subscribe:f,getState:h,replaceReducer:b,[$s]:S}}function sp(t){Object.keys(t).forEach(e=>{let o=t[e];if(typeof o(void 0,{type:Jr.INIT})>"u")throw new Error(j(12));if(typeof o(void 0,{type:Jr.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(j(13))})}function zs(t){let e=Object.keys(t),o={};for(let s=0;s<e.length;s++){let l=e[s];typeof t[l]=="function"&&(o[l]=t[l])}let n=Object.keys(o),i,a;try{sp(o)}catch(s){a=s}return function(l={},d){if(a)throw a;let p=!1,h={};for(let f=0;f<n.length;f++){let m=n[f],b=o[m],S=l[m],E=b(S,d);if(typeof E>"u"){let v=d&&d.type;throw new Error(j(14))}h[m]=E,p=p||E!==S}return p=p||n.length!==Object.keys(l).length,p?h:l}}function yr(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,o)=>(...n)=>e(o(...n)))}function Hs(...t){return e=>(o,n)=>{let i=e(o,n),a=()=>{throw new Error(j(15))},s={getState:i.getState,dispatch:(d,...p)=>a(d,...p)},l=t.map(d=>d(s));return a=yr(...l)(i.dispatch),{...i,dispatch:a}}}function Ws(t){return Xr(t)&&"type"in t&&typeof t.type=="string"}var Js=Symbol.for("immer-nothing"),Vs=Symbol.for("immer-draftable"),Z=Symbol.for("immer-state");function fe(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var te=Object,Dt=te.getPrototypeOf,oo="constructor",lo="prototype",ri="configurable",no="enumerable",to="writable",br="value",ve=t=>!!t&&!!t[Z];function re(t){return t?Xs(t)||po(t)||!!t[Vs]||!!t[oo]?.[Vs]||fo(t)||ho(t):!1}var cp=te[lo][oo].toString(),Gs=new WeakMap;function Xs(t){if(!t||!di(t))return!1;let e=Dt(t);if(e===null||e===te[lo])return!0;let o=te.hasOwnProperty.call(e,oo)&&e[oo];if(o===Object)return!0;if(!Mt(o))return!1;let n=Gs.get(o);return n===void 0&&(n=Function.toString.call(o),Gs.set(o,n)),n===cp}function uo(t,e,o=!0){vr(t)===0?(o?Reflect.ownKeys(t):te.keys(t)).forEach(i=>{e(i,t[i],t)}):t.forEach((n,i)=>e(i,n,t))}function vr(t){let e=t[Z];return e?e.type_:po(t)?1:fo(t)?2:ho(t)?3:0}var Xn=(t,e,o=vr(t))=>o===2?t.has(e):te[lo].hasOwnProperty.call(t,e),oi=(t,e,o=vr(t))=>o===2?t.get(e):t[e],io=(t,e,o,n=vr(t))=>{n===2?t.set(e,o):n===3?t.add(o):t[e]=o};function lp(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}var po=Array.isArray,fo=t=>t instanceof Map,ho=t=>t instanceof Set,di=t=>typeof t=="object",Mt=t=>typeof t=="function",ei=t=>typeof t=="boolean";function dp(t){let e=+t;return Number.isInteger(e)&&String(e)===t}var Ie=t=>t.copy_||t.base_;var ui=t=>t.modified_?t.copy_:t.base_;function ni(t,e){if(fo(t))return new Map(t);if(ho(t))return new Set(t);if(po(t))return Array[lo].slice.call(t);let o=Xs(t);if(e===!0||e==="class_only"&&!o){let n=te.getOwnPropertyDescriptors(t);delete n[Z];let i=Reflect.ownKeys(n);for(let a=0;a<i.length;a++){let s=i[a],l=n[s];l[to]===!1&&(l[to]=!0,l[ri]=!0),(l.get||l.set)&&(n[s]={[ri]:!0,[to]:!0,[no]:l[no],[br]:t[s]})}return te.create(Dt(t),n)}else{let n=Dt(t);if(n!==null&&o)return{...t};let i=te.create(n);return te.assign(i,t)}}function pi(t,e=!1){return mo(t)||ve(t)||!re(t)||(vr(t)>1&&te.defineProperties(t,{set:eo,add:eo,clear:eo,delete:eo}),te.freeze(t),e&&uo(t,(o,n)=>{pi(n,!0)},!1)),t}function up(){fe(2)}var eo={[br]:up};function mo(t){return t===null||!di(t)?!0:te.isFrozen(t)}var ao="MapSet",ii="Patches",js="ArrayMethods",ec={};function tt(t){let e=ec[t];return e||fe(0,t),e}var Ks=t=>!!ec[t];var xr,tc=()=>xr,pp=(t,e)=>({drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Ks(ao)?tt(ao):void 0,arrayMethodsPlugin_:Ks(js)?tt(js):void 0});function qs(t,e){e&&(t.patchPlugin_=tt(ii),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function ai(t){si(t),t.drafts_.forEach(fp),t.drafts_=null}function si(t){t===xr&&(xr=t.parent_)}var Zs=t=>xr=pp(xr,t);function fp(t){let e=t[Z];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function Ys(t,e){e.unfinalizedDrafts_=e.drafts_.length;let o=e.drafts_[0];if(t!==void 0&&t!==o){o[Z].modified_&&(ai(e),fe(4)),re(t)&&(t=Qs(e,t));let{patchPlugin_:i}=e;i&&i.generateReplacementPatches_(o[Z].base_,t,e)}else t=Qs(e,o);return hp(e,t,!0),ai(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==Js?t:void 0}function Qs(t,e){if(mo(e))return e;let o=e[Z];if(!o)return so(e,t.handledSet_,t);if(!go(o,t))return e;if(!o.modified_)return o.base_;if(!o.finalized_){let{callbacks_:n}=o;if(n)for(;n.length>0;)n.pop()(t);nc(o,t)}return o.copy_}function hp(t,e,o=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&pi(e,o)}function rc(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}var go=(t,e)=>t.scope_===e,mp=[];function oc(t,e,o,n){let i=Ie(t),a=t.type_;if(n!==void 0&&oi(i,n,a)===e){io(i,n,o,a);return}if(!t.draftLocations_){let l=t.draftLocations_=new Map;uo(i,(d,p)=>{if(ve(p)){let h=l.get(p)||[];h.push(d),l.set(p,h)}})}let s=t.draftLocations_.get(e)??mp;for(let l of s)io(i,l,o,a)}function gp(t,e,o){t.callbacks_.push(function(i){let a=e;if(!a||!go(a,i))return;i.mapSetPlugin_?.fixSetContents(a);let s=ui(a);oc(t,a.draft_??a,s,o),nc(a,i)})}function nc(t,e){if(t.modified_&&!t.finalized_&&(t.type_===3||t.type_===1&&t.allIndicesReassigned_||(t.assigned_?.size??0)>0)){let{patchPlugin_:n}=e;if(n){let i=n.getPath(t);i&&n.generatePatches_(t,i,e)}rc(t)}}function yp(t,e,o){let{scope_:n}=t;if(ve(o)){let i=o[Z];go(i,n)&&i.callbacks_.push(function(){ro(t);let s=ui(i);oc(t,o,s,e)})}else re(o)&&t.callbacks_.push(function(){let a=Ie(t);t.type_===3?a.has(o)&&so(o,n.handledSet_,n):oi(a,e,t.type_)===o&&n.drafts_.length>1&&(t.assigned_.get(e)??!1)===!0&&t.copy_&&so(oi(t.copy_,e,t.type_),n.handledSet_,n)})}function so(t,e,o){return!o.immer_.autoFreeze_&&o.unfinalizedDrafts_<1||ve(t)||e.has(t)||!re(t)||mo(t)||(e.add(t),uo(t,(n,i)=>{if(ve(i)){let a=i[Z];if(go(a,o)){let s=ui(a);io(t,n,s,t.type_),rc(a)}}else re(i)&&so(i,e,o)})),t}function bp(t,e){let o=po(t),n={type_:o?1:0,scope_:e?e.scope_:tc(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=n,a=co;o&&(i=[n],a=Sr);let{revoke:s,proxy:l}=Proxy.revocable(i,a);return n.draft_=l,n.revoke_=s,[l,n]}var co={get(t,e){if(e===Z)return t;let o=t.scope_.arrayMethodsPlugin_,n=t.type_===1&&typeof e=="string";if(n&&o?.isArrayOperationMethod(e))return o.createMethodInterceptor(t,e);let i=Ie(t);if(!Xn(i,e,t.type_))return Sp(t,i,e);let a=i[e];if(t.finalized_||!re(a)||n&&t.operationMethod&&o?.isMutatingArrayMethod(t.operationMethod)&&dp(e))return a;if(a===ti(t.base_,e)||xp(t,e,a)){ro(t);let s=t.type_===1?+e:e,l=li(t.scope_,a,t,s);return t.copy_[s]=l}return a},has(t,e){return e in Ie(t)},ownKeys(t){return Reflect.ownKeys(Ie(t))},set(t,e,o){let n=ic(Ie(t),e);if(n?.set)return n.set.call(t.draft_,o),!0;if(!t.modified_){let i=ti(Ie(t),e),a=i?.[Z];if(a&&a.base_===o)return t.copy_[e]=o,t.assigned_.set(e,!1),!0;if(lp(o,i)&&(o!==void 0||Xn(t.base_,e,t.type_)))return!0;ro(t),ci(t)}return t.copy_[e]===o&&(o!==void 0||Xn(t.copy_,e,t.type_))||Number.isNaN(o)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=o,t.assigned_.set(e,!0),yp(t,e,o)),!0},deleteProperty(t,e){return ro(t),ti(t.base_,e)!==void 0||e in t.base_?(t.assigned_.set(e,!1),ci(t)):t.assigned_.delete(e),t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){let o=Ie(t),n=Reflect.getOwnPropertyDescriptor(o,e);return n&&{[to]:!0,[ri]:t.type_!==1||e!=="length",[no]:n[no],[br]:o[e]}},defineProperty(){fe(11)},getPrototypeOf(t){return Dt(t.base_)},setPrototypeOf(){fe(12)}},Sr={};for(let t in co){let e=co[t];Sr[t]=function(){let o=arguments;return o[0]=o[0][0],e.apply(this,o)}}Sr.deleteProperty=function(t,e){return Sr.set.call(this,t,e,void 0)};Sr.set=function(t,e,o){return co.set.call(this,t[0],e,o,t[0])};function ti(t,e){let o=t[Z];return(o?Ie(o):t)[e]}function xp(t,e,o){return t.type_!==1||!t.allIndicesReassigned_||t.assigned_?.get(e)||!re(o)||o[Z]?!1:t.baseRefs_.has(o)}function Sp(t,e,o){let n=ic(e,o);return n?br in n?n[br]:n.get?.call(t.draft_):void 0}function ic(t,e){if(!(e in t))return;let o=Dt(t);for(;o;){let n=Object.getOwnPropertyDescriptor(o,e);if(n)return n;o=Dt(o)}}function ci(t){t.modified_||(t.modified_=!0,t.parent_&&ci(t.parent_))}function ro(t){t.copy_||(t.assigned_=new Map,t.copy_=ni(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var vp=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,o,n)=>{if(Mt(e)&&!Mt(o)){let a=o;o=e;let s=this;return function(d=a,...p){return s.produce(d,h=>o.call(this,h,...p))}}Mt(o)||fe(6),n!==void 0&&!Mt(n)&&fe(7);let i;if(re(e)){let a=Zs(this),s=li(a,e,void 0),l=!0;try{i=o(s),l=!1}finally{l?ai(a):si(a)}return qs(a,n),Ys(i,a)}else if(!e||!di(e)){if(i=o(e),i===void 0&&(i=e),i===Js&&(i=void 0),this.autoFreeze_&&pi(i,!0),n){let a=[],s=[];tt(ii).generateReplacementPatches_(e,i,{patches_:a,inversePatches_:s}),n(a,s)}return i}else fe(1,e)},this.produceWithPatches=(e,o)=>{if(Mt(e))return(s,...l)=>this.produceWithPatches(s,d=>e(d,...l));let n,i;return[this.produce(e,o,(s,l)=>{n=s,i=l}),n,i]},ei(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),ei(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),ei(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){re(t)||fe(8),ve(t)&&(t=ac(t));let e=Zs(this),o=li(e,t,void 0);return o[Z].isManual_=!0,si(e),o}finishDraft(t,e){let o=t&&t[Z];(!o||!o.isManual_)&&fe(9);let{scope_:n}=o;return qs(n,e),Ys(void 0,n)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,e){let o;for(o=e.length-1;o>=0;o--){let i=e[o];if(i.path.length===0&&i.op==="replace"){t=i.value;break}}o>-1&&(e=e.slice(o+1));let n=tt(ii).applyPatches_;return ve(t)?n(t,e):this.produce(t,i=>n(i,e))}};function li(t,e,o,n){let[i,a]=fo(e)?tt(ao).proxyMap_(e,o):ho(e)?tt(ao).proxySet_(e,o):bp(e,o);return(o?.scope_??tc()).drafts_.push(i),a.callbacks_=o?.callbacks_??[],a.key_=n,o&&n!==void 0?gp(o,a,n):a.callbacks_.push(function(d){d.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:p}=d;a.modified_&&p&&p.generatePatches_(a,[],d)}),i}function ac(t){return ve(t)||fe(10,t),sc(t)}function sc(t){if(!re(t)||mo(t))return t;let e=t[Z],o,n=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,o=ni(t,e.scope_.immer_.useStrictShallowCopy_),n=e.scope_.immer_.shouldUseStrictIteration()}else o=ni(t,!0);return uo(o,(i,a)=>{io(o,i,sc(a))},n),e&&(e.finalized_=!1),o}var Ep=globalThis.Iterator,Lx=typeof Ep?.from=="function";var Cp=new vp,fi=Cp.produce;function cc(t){return({dispatch:o,getState:n})=>i=>a=>typeof a=="function"?a(o,n,t):i(a)}var lc=cc(),dc=cc;var wp=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?yr:yr.apply(null,arguments)},Bx=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}},Op=t=>t&&typeof t.match=="function";function Be(t,e){function o(...n){if(e){let i=e(...n);if(!i)throw new Error(Te(0));return{type:t,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:t,payload:n[0]}}return o.toString=()=>`${t}`,o.type=t,o.match=n=>Ws(n)&&n.type===t,o}var mc=class Er extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,Er.prototype)}static get[Symbol.species](){return Er}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new Er(...e[0].concat(this)):new Er(...e.concat(this))}};function uc(t){return re(t)?fi(t,()=>{}):t}function yo(t,e,o){return t.has(e)?t.get(e):t.set(e,o(e)).get(e)}function Ap(t){return typeof t=="boolean"}var Rp=()=>function(e){let{thunk:o=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:a=!0}=e??{},s=new mc;return o&&(Ap(o)?s.push(lc):s.push(dc(o.extraArgument))),s},_p="RTK_autoBatch";var pc=t=>e=>{setTimeout(e,t)},Ip=(t,e)=>o=>{let n=!1,i=()=>{n||(n=!0,cancelAnimationFrame(a),clearTimeout(s),o())},a=t(i),s=setTimeout(i,e)},Tp=(t={type:"raf"})=>e=>(...o)=>{let n=e(...o),i=!0,a=!1,s=!1,l=new Set,d=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?Ip(window.requestAnimationFrame,100):pc(10):t.type==="callback"?t.queueNotification:pc(t.timeout),p=()=>{s=!1,a&&(a=!1,l.forEach(h=>h()))};return Object.assign({},n,{subscribe(h){let f=()=>i&&h(),m=n.subscribe(f);return l.add(h),()=>{m(),l.delete(h)}},dispatch(h){try{return i=!h?.meta?.[_p],a=!i,a&&(s||(s=!0,d(p))),n.dispatch(h)}finally{i=!0}}})},kp=t=>function(o){let{autoBatch:n=!0}=o??{},i=new mc(t);return n&&i.push(Tp(typeof n=="object"?n:void 0)),i};function gc(t){let e=Rp(),{reducer:o=void 0,middleware:n,devTools:i=!0,duplicateMiddlewareCheck:a=!0,preloadedState:s=void 0,enhancers:l=void 0}=t||{},d;if(typeof o=="function")d=o;else if(Xr(o))d=zs(o);else throw new Error(Te(1));let p;typeof n=="function"?p=n(e):p=e();let h=yr;i&&(h=wp({trace:!1,...typeof i=="object"&&i}));let f=Hs(...p),m=kp(f),b=typeof l=="function"?l(m):m(),S=h(...b);return Jn(d,s,S)}function yc(t){let e={},o=[],n,i={addCase(a,s){let l=typeof a=="string"?a:a.type;if(!l)throw new Error(Te(28));if(l in e)throw new Error(Te(29));return e[l]=s,i},addAsyncThunk(a,s){return s.pending&&(e[a.pending.type]=s.pending),s.rejected&&(e[a.rejected.type]=s.rejected),s.fulfilled&&(e[a.fulfilled.type]=s.fulfilled),s.settled&&o.push({matcher:a.settled,reducer:s.settled}),i},addMatcher(a,s){return o.push({matcher:a,reducer:s}),i},addDefaultCase(a){return n=a,i}};return t(i),[e,o,n]}function Lp(t){return typeof t=="function"}function Np(t,e){let[o,n,i]=yc(e),a;if(Lp(t))a=()=>uc(t());else{let l=uc(t);a=()=>l}function s(l=a(),d){let p=[o[d.type],...n.filter(({matcher:h})=>h(d)).map(({reducer:h})=>h)];return p.filter(h=>!!h).length===0&&(p=[i]),p.reduce((h,f)=>{if(f)if(ve(h)){let b=f(h,d);return b===void 0?h:b}else{if(re(h))return fi(h,m=>f(m,d));{let m=f(h,d);if(m===void 0){if(h===null)return h;throw Error("A case reducer on a non-draftable value must not return undefined")}return m}}return h},l)}return s.getInitialState=a,s}var Pp=(t,e)=>Op(t)?t.match(e):t(e);function Fp(...t){return e=>t.some(o=>Pp(o,e))}var Mp="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Dp=(t=21)=>{let e="",o=t;for(;o--;)e+=Mp[Math.random()*64|0];return e},Up=["name","message","stack","code"],hi=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},fc=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},Bp=t=>{if(typeof t=="object"&&t!==null){let e={};for(let o of Up)typeof t[o]=="string"&&(e[o]=t[o]);return e}return{message:String(t)}},hc="External signal was aborted",$p=(()=>{function t(e,o,n){let i=Be(e+"/fulfilled",(d,p,h,f)=>({payload:d,meta:{...f||{},arg:h,requestId:p,requestStatus:"fulfilled"}})),a=Be(e+"/pending",(d,p,h)=>({payload:void 0,meta:{...h||{},arg:p,requestId:d,requestStatus:"pending"}})),s=Be(e+"/rejected",(d,p,h,f,m)=>({payload:f,error:(n&&n.serializeError||Bp)(d||"Rejected"),meta:{...m||{},arg:h,requestId:p,rejectedWithValue:!!f,requestStatus:"rejected",aborted:d?.name==="AbortError",condition:d?.name==="ConditionError"}}));function l(d,{signal:p}={}){return(h,f,m)=>{let b=n?.idGenerator?n.idGenerator(d):Dp(),S=new AbortController,E,v;function w(g){v=g,S.abort()}p&&(p.aborted?w(hc):p.addEventListener("abort",()=>w(hc),{once:!0}));let N=(async function(){let g;try{let x=n?.condition?.(d,{getState:f,extra:m});if(Hp(x)&&(x=await x),x===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let _=new Promise((I,R)=>{E=()=>{R({name:"AbortError",message:v||"Aborted"})},S.signal.addEventListener("abort",E,{once:!0})});h(a(b,d,n?.getPendingMeta?.({requestId:b,arg:d},{getState:f,extra:m}))),g=await Promise.race([_,Promise.resolve(o(d,{dispatch:h,getState:f,extra:m,requestId:b,signal:S.signal,abort:w,rejectWithValue:((I,R)=>new hi(I,R)),fulfillWithValue:((I,R)=>new fc(I,R))})).then(I=>{if(I instanceof hi)throw I;return I instanceof fc?i(I.payload,b,d,I.meta):i(I,b,d)})])}catch(x){g=x instanceof hi?s(null,b,d,x.payload,x.meta):s(x,b,d)}finally{E&&S.signal.removeEventListener("abort",E)}return n&&!n.dispatchConditionRejection&&s.match(g)&&g.meta.condition||h(g),g})();return Object.assign(N,{abort:w,requestId:b,arg:d,unwrap(){return N.then(zp)}})}}return Object.assign(l,{pending:a,rejected:s,fulfilled:i,settled:Fp(s,i),typePrefix:e})}return t.withTypes=()=>t,t})();function zp(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Hp(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var bc=Symbol.for("rtk-slice-createasyncthunk"),zx={[bc]:$p};function Wp(t,e){return`${t}/${e}`}function Vp({creators:t}={}){let e=t?.asyncThunk?.[bc];return function(n){let{name:i,reducerPath:a=i}=n;if(!i)throw new Error(Te(11));typeof process<"u";let s=(typeof n.reducers=="function"?n.reducers(jp()):n.reducers)||{},l=Object.keys(s),d={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},p={addCase(g,y){let x=typeof g=="string"?g:g.type;if(!x)throw new Error(Te(12));if(x in d.sliceCaseReducersByType)throw new Error(Te(13));return d.sliceCaseReducersByType[x]=y,p},addMatcher(g,y){return d.sliceMatchers.push({matcher:g,reducer:y}),p},exposeAction(g,y){return d.actionCreators[g]=y,p},exposeCaseReducer(g,y){return d.sliceCaseReducersByName[g]=y,p}};l.forEach(g=>{let y=s[g],x={reducerName:g,type:Wp(i,g),createNotation:typeof n.reducers=="function"};qp(y)?Yp(x,y,p,e):Kp(x,y,p)});function h(){let[g={},y=[],x=void 0]=typeof n.extraReducers=="function"?yc(n.extraReducers):[n.extraReducers],_={...g,...d.sliceCaseReducersByType};return Np(n.initialState,I=>{for(let R in _)I.addCase(R,_[R]);for(let R of d.sliceMatchers)I.addMatcher(R.matcher,R.reducer);for(let R of y)I.addMatcher(R.matcher,R.reducer);x&&I.addDefaultCase(x)})}let f=g=>g,m=new Map,b=new WeakMap,S;function E(g,y){return S||(S=h()),S(g,y)}function v(){return S||(S=h()),S.getInitialState()}function w(g,y=!1){function x(I){let R=I[g];return typeof R>"u"&&y&&(R=yo(b,x,v)),R}function _(I=f){let R=yo(m,y,()=>new WeakMap);return yo(R,I,()=>{let F={};for(let[A,T]of Object.entries(n.selectors??{}))F[A]=Gp(T,I,()=>yo(b,I,v),y);return F})}return{reducerPath:g,getSelectors:_,get selectors(){return _(x)},selectSlice:x}}let N={name:i,reducer:E,actions:d.actionCreators,caseReducers:d.sliceCaseReducersByName,getInitialState:v,...w(a),injectInto(g,{reducerPath:y,...x}={}){let _=y??a;return g.inject({reducerPath:_,reducer:E},x),{...N,...w(_,!0)}}};return N}}function Gp(t,e,o,n){function i(a,...s){let l=e(a);return typeof l>"u"&&n&&(l=o()),t(l,...s)}return i.unwrapped=t,i}var xc=Vp();function jp(){function t(e,o){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...o}}return t.withTypes=()=>t,{reducer(e){return Object.assign({[e.name](...o){return e(...o)}}[e.name],{_reducerDefinitionType:"reducer"})},preparedReducer(e,o){return{_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:o}},asyncThunk:t}}function Kp({type:t,reducerName:e,createNotation:o},n,i){let a,s;if("reducer"in n){if(o&&!Zp(n))throw new Error(Te(17));a=n.reducer,s=n.prepare}else a=n;i.addCase(t,a).exposeCaseReducer(e,a).exposeAction(e,s?Be(t,s):Be(t))}function qp(t){return t._reducerDefinitionType==="asyncThunk"}function Zp(t){return t._reducerDefinitionType==="reducerWithPrepare"}function Yp({type:t,reducerName:e},o,n,i){if(!i)throw new Error(Te(18));let{payloadCreator:a,fulfilled:s,pending:l,rejected:d,settled:p,options:h}=o,f=i(t,a,h);n.exposeAction(e,f),s&&n.addCase(f.fulfilled,s),l&&n.addCase(f.pending,l),d&&n.addCase(f.rejected,d),p&&n.addMatcher(f.settled,p),n.exposeCaseReducer(e,{fulfilled:s||bo,pending:l||bo,rejected:d||bo,settled:p||bo})}function bo(){}var Sc="listener",vc="completed",Ec="cancelled",Hx=`task-${Ec}`,Wx=`task-${vc}`,Vx=`${Sc}-${Ec}`,Gx=`${Sc}-${vc}`;var{assign:Cc}=Object;var mi="listenerMiddleware";var Qp=Cc(Be(`${mi}/add`),{withTypes:()=>Qp}),jx=Be(`${mi}/removeAll`),Jp=Cc(Be(`${mi}/remove`),{withTypes:()=>Jp});function Te(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}window.ftReduxStores||(window.ftReduxStores={});var $e=class t extends we{static get(e){var o;let n=typeof e=="string"?e:e.name,i=typeof e=="string"?void 0:e,a=window.ftReduxStores[n];if(Ft(a))return a;if(i==null)return;let s=xc({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),l=gc({reducer:(d,p)=>{if(p.type==="CLEAR_FT_REDUX_STORE"){let h=ie(s.getInitialState());for(let f of p.keeping)h[f]=(d??h)[f];return h}else if(typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...d,...p.overwrites};return s.reducer(d,p)}});return window.ftReduxStores[i.name]=new t(s,l,i.eventBus)}constructor(e,o,n){super(),this.reduxSlice=e,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new mr,this.injectInto=(a,s)=>this.reduxSlice.injectInto(a,s),this.selectSlice=a=>this.reduxSlice.selectSlice(a);let i=a=>a!=null?JSON.parse(JSON.stringify(a)):a;this.actions=new Proxy(this.reduxSlice.actions,{get:(a,s,l)=>{let d=s,p=a[d];return p?(...h)=>{let f=p(...h.map(i));return this.reduxStore.dispatch(f),f}:h=>{let f=d,m=this.getState()[f];Y(m,h)||this.setState({[f]:i(h)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};function Xp(){var t;for(let e of Object.values((t=window.ftReduxStores)!==null&&t!==void 0?t:{}))Ft(e)&&e.clear()}var Cr=class{constructor(e,o,n){this.store=e,this.valueSelector=o,this.callback=n}watch(){return this.stop(),this.lastValue=this.valueSelector(this.store.getState()),this.unsubscribe=this.store.subscribe(()=>{let e=this.store.getState(),o=this.valueSelector(e);de(this.lastValue,o)&&(this.callback(o,e),this.lastValue=o)}),this}stop(){return this.unsubscribe!=null&&(this.unsubscribe(),this.unsubscribe=void 0),this.lastValue=void 0,this}};function ef(t,e,o){return new Cr(t,e,o).watch()}var Ut=class{constructor(){this.requestConsumers=new Map}getOrCreateRequestConsumers(e){var o;return(o=this.requestConsumers.get(e))!==null&&o!==void 0?o:this.requestConsumers.set(e,new Set).get(e)}registerComponent(e,o){for(let n of o)this.getOrCreateRequestConsumers(n).add(e).size==1&&this.onNewNeededRequest(n)}unregisterComponent(e,o){for(let n of o)this.getOrCreateRequestConsumers(n).delete(e)}isRequestNeeded(e){return this.getOrCreateRequestConsumers(e).size>0}};var xi={};P(xi,{scrollHelper:()=>tf});var yi,xo=new Map,bi=class{lock(e,o){if(o){let n=xo.get(o);if(n==null||n===e)return xo.set(o,e),o}}release(e,o){o&&xo.get(o)===e&&xo.delete(o)}findFirstScrollableParent(e){var o;let n,i;for(let a of dn(e)){let s=a,l=this.elementCanScroll(s);if(l&&s.clientHeight&&s.clientHeight<s.scrollHeight){n=s;break}else l&&i==null&&(i=s)}return(o=n??i)!==null&&o!==void 0?o:document.body}elementCanScroll(e){try{return["auto","scroll"].includes(getComputedStyle(e).overflowY)&&!["contents"].includes(getComputedStyle(e).display)}catch{return!1}}getAbsoluteScrollOffset(e,o){var n,i;let a=0;for(;o&&o.offsetParent!==e.offsetParent;)a+=(n=o.offsetTop)!==null&&n!==void 0?n:0,o=o.offsetParent;return a+((i=o?.offsetTop)!==null&&i!==void 0?i:0)-e.offsetTop}computeTopOffsetRatio(e,o){if(typeof e=="number")return e;switch(e){case"end":return 1;case"center":return .5;case"nearest":return o;default:return 0}}scrollIntoViewIfPossible(e,o){let n=this.findFirstScrollableParent(e);if(e&&this.lock(this,n)){let i=this.getAbsoluteScrollOffset(n,e),a=i-n.clientHeight+e.clientHeight,s=i,l=Fe(0,(s-n.scrollTop)/(s-a),1),d=this.computeTopOffsetRatio(o?.position,l)*(a-s)+s;n.scrollTo({behavior:o?.behavior,top:d})}else console.warn("Could not scroll element into view because the scrollable parent is already locked",e,n);this.release(this,n)}};window.FluidTopicsScrollHelper=(yi=window.FluidTopicsScrollHelper)!==null&&yi!==void 0?yi:new bi;var tf=window.FluidTopicsScrollHelper;var Ei={};P(Ei,{SearchPlaceConverter:()=>$t,SearchPlaceQueryParams:()=>k,isSearchPlaceQueryParams:()=>dl,serializeRequest:()=>sf});var rf=t=>typeof t=="object"&&t!=null;var of=t=>typeof t=="number",So=t=>typeof t=="string",qc=t=>rf(t)&&So(t.endpoint)&&So(t.method)&&So(t.statusText)&&So(t.body)&&of(t.status),wc;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(wc||(wc={}));var Oc;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(Oc||(Oc={}));var Ac;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(Ac||(Ac={}));var Rc;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(Rc||(Rc={}));var _c;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(_c||(_c={}));var Ic;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(Ic||(Ic={}));var Tc;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(Tc||(Tc={}));var kc;(function(t){t.BOOKMARK__CREATE="BOOKMARK__CREATE",t.BOOKMARK__DELETE="BOOKMARK__DELETE",t.CASE_DEFLECTION__START="CASE_DEFLECTION__START",t.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",t.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",t.CHATBOT__RATE="CHATBOT__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",t.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",t.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",t.DOCUMENT__PRINT="DOCUMENT__PRINT",t.DOCUMENT__PROCESS="DOCUMENT__PROCESS",t.DOCUMENT__RATE="DOCUMENT__RATE",t.DOCUMENT__SEARCH="DOCUMENT__SEARCH",t.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",t.DOCUMENT__UNRATE="DOCUMENT__UNRATE",t.FEEDBACK__SEND="FEEDBACK__SEND",t.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",t.AI__RATE="AI__RATE",t.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",t.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",t.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",t.TOPIC__RATE="TOPIC__RATE",t.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",t.TOPIC__UNRATE="TOPIC__UNRATE",t.USER__LOGIN="USER__LOGIN",t.USER__LOGOUT="USER__LOGOUT",t.HEARTBEAT="HEARTBEAT"})(kc||(kc={}));var Lc;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(Lc||(Lc={}));var Nc;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(Nc||(Nc={}));var Pc;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT",t.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",t.LINK_PREVIEW="LINK_PREVIEW",t.UD_VIEWER="UD_VIEWER",t.ASSET_VIEWER="ASSET_VIEWER"})(Pc||(Pc={}));var Fc;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Fc||(Fc={}));var Mc;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Mc||(Mc={}));var Dc;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Dc||(Dc={}));var Uc;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Uc||(Uc={}));var Bc;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(Bc||(Bc={}));var rt;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(rt||(rt={}));var $c;(function(t){t.ASC="ASC",t.DESC="DESC"})($c||($c={}));var zc;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(zc||(zc={}));var vo;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(vo||(vo={}));var Zc=t=>Object.keys(vo).includes(t);var Hc;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Hc||(Hc={}));var Wc;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Wc||(Wc={}));var Vc;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Vc||(Vc={}));var Bt;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Bt||(Bt={}));var Yc=t=>Object.keys(Bt).includes(t);var Gc;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Gc||(Gc={}));var Si;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Si||(Si={}));var jc;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(jc||(jc={}));var z;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(z||(z={}));var ae;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(ae||(ae={}));var Kc;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(Kc||(Kc={}));var Qc;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(Qc||(Qc={}));var Jc;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Jc||(Jc={}));var Xc;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.DOCUMENTATION="DOCUMENTATION",t.OTHER="OTHER"})(Xc||(Xc={}));var el;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(el||(el={}));var tl;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(tl||(tl={}));var rl;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(rl||(rl={}));var ol;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(ol||(ol={}));var nl;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(nl||(nl={}));var il;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(il||(il={}));var al;(function(t){t.SOURCES="SOURCES",t.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",t.VOCABULARIES="VOCABULARIES",t.METADATA="METADATA",t.PRETTY_URL="PRETTY_URL",t.ACCESS_RULE="ACCESS_RULE",t.DESIGNED_PAGES="DESIGNED_PAGES",t.THEME_STUDIO="THEME_STUDIO",t.PORTAL_GENERAL="PORTAL_GENERAL",t.ASSETS="ASSETS",t.CODE_LIBRARY="CODE_LIBRARY",t.THEME="THEME",t.CONTENT_STYLES="CONTENT_STYLES",t.HOMEPAGE="HOMEPAGE",t.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",t.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",t.PORTAL_METADATA="PORTAL_METADATA",t.LANGUAGES="LANGUAGES",t.PRINT_TEMPLATES="PRINT_TEMPLATES",t.OFFLINE="OFFLINE",t.CUSTOM_JS="CUSTOM_JS",t.CONFIDENTIALITY="CONFIDENTIALITY",t.NOTIFICATIONS="NOTIFICATIONS"})(al||(al={}));var sl;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(sl||(sl={}));var nf={[z.PERSONAL_BOOK_SHARE_USER]:[z.PERSONAL_BOOK_USER],[z.HTML_EXPORT_USER]:[z.PERSONAL_BOOK_USER],[z.PDF_EXPORT_USER]:[z.PERSONAL_BOOK_USER],[z.KHUB_ADMIN]:[z.CONTENT_PUBLISHER],[z.ADMIN]:[z.KHUB_ADMIN,z.USERS_ADMIN,z.PORTAL_ADMIN,z.BEHAVIOR_DATA_USER],[z.GENERATIVE_AI_EXPORT_USER]:[z.GENERATIVE_AI_USER]};function cl(t,e){return t===e||(nf[t]??[]).some(o=>cl(o,e))}function vi(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(n=>cl(n,e))}function af(t){return`"${t}"`}function ll(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function sf(t,e){return new $t(t).serialize(e)}var k;(function(t){t.LOCALE="content-lang",t.QUERY="query",t.SCOPE="scope",t.FILTERS="filters",t.VIRTUAL_FIELD="virtual-field",t.PERIOD="period",t.VALUE_FILTERS="value-filters",t.NEGATIVE_VALUE_FILTERS="negative-value-filters",t.DATE_FILTERS="date-filters",t.RANGE_FILTERS="range-filters",t.SORT="sort",t.PER_PAGE="per-page",t.KEYWORD_MATCH="keyword-match"})(k||(k={}));var cf=new Set(Object.values(k));function dl(t){return cf.has(t)}var $t=class{constructor(e,o=20,n=!1,i="en-US"){this.baseUrl=e,this.defaultPerPage=o,this.allLanguagesAllowed=n,this.defaultContentLocale=i,this.scopeMapping={documents:"DOCUMENTS",topics:"ALL_TOPICS"},this.filtersEscapeMapping=[["*","\\*","[ft-escaped-star-character]"],["~","\\\\~","[ft-escaped-tilde-character]"],["_","\\\\\\\\_","[ft-escaped-underscore-character]"]]}serialize(e,o){return this.serializeToCurrentPageIfPossible(e,o??"/search")}serializeToCurrentPageIfPossible(e,o){let n=o==null||o.trim().length===0,i=new URL(n?window.location.href:`${this.baseUrl.replace(/\/+$/,"")}${o}`);return i.search=this.toURLSearchParams(e),i.toString()}toURLSearchParams(e,o=!1){var n,i,a,s,l,d,p,h,f,m,b,S,E;let v=new URLSearchParams;e.contentLocale?(!o||e.contentLocale!==this.defaultContentLocale)&&v.append(k.LOCALE,e.contentLocale):v.append(k.LOCALE,this.allLanguagesAllowed?"all":this.defaultContentLocale),((n=e.query)===null||n===void 0?void 0:n.length)>0&&v.append(k.QUERY,e.query);let w=R=>{var F,A;let T=((A=(F=R.valueFilter)===null||F===void 0?void 0:F.values)!==null&&A!==void 0?A:[]).map(B=>this.escapeFilters(B)).map(B=>af(ll(B))).join("_");return`${R.key}~${T}`},N=(a=(i=e.metadataFilters)===null||i===void 0?void 0:i.filter(R=>R.valueFilter&&!R.valueFilter.negative))!==null&&a!==void 0?a:[];N.length>0&&v.append(k.VALUE_FILTERS,N.map(w).join("*"));let g=(l=(s=e.metadataFilters)===null||s===void 0?void 0:s.filter(R=>R.valueFilter&&R.valueFilter.negative))!==null&&l!==void 0?l:[];g.length>0&&v.append(k.NEGATIVE_VALUE_FILTERS,g.map(w).join("*"));let y=(p=(d=e.metadataFilters)===null||d===void 0?void 0:d.filter(R=>R.dateFilter))!==null&&p!==void 0?p:[];if(y.length>0){let R=y.map(F=>{var A;return`${F.key}~${(A=F.dateFilter)===null||A===void 0?void 0:A.type.toLowerCase()}`}).join("*");v.append(k.DATE_FILTERS,R)}let x=(f=(h=e.metadataFilters)===null||h===void 0?void 0:h.filter(R=>R.rangeFilter))!==null&&f!==void 0?f:[];if(x.length>0){let R=x.map(F=>{var A,T;return`${F.key}~${(A=F.rangeFilter)===null||A===void 0?void 0:A.from}_${(T=F.rangeFilter)===null||T===void 0?void 0:T.to}`}).join("*");v.append(k.RANGE_FILTERS,R)}e.virtualField&&e.virtualField!=="EVERYWHERE"&&v.append(k.VIRTUAL_FIELD,e.virtualField.toLowerCase()),e.scope&&e.scope!=="DEFAULT"&&v.append(k.SCOPE,e.scope.toLowerCase()),e.sortId!=null&&v.append(k.SORT,e.sortId),!((m=e.paging)===null||m===void 0)&&m.perPage&&((S=(b=e.paging)===null||b===void 0?void 0:b.perPage)!==null&&S!==void 0?S:this.defaultPerPage)!=this.defaultPerPage&&v.append(k.PER_PAGE,String(e.paging.perPage)),e.keywordMatch!=null&&v.append(k.KEYWORD_MATCH,e.keywordMatch.toLowerCase());let _=(E=e.otherQueryParams)!==null&&E!==void 0?E:{};for(let R in _)v.append(R,_[R]);let I=new Array;return v.forEach((R,F)=>{I.push(this.encodeQueryString(F)+"="+this.encodeQueryString(R))}),encodeURI(I.join("&")).replace(/#/g,"%23")}encodeQueryString(e){return encodeURIComponent(e).replace(/%20/g,"+")}parse(e){var o;let n=e.split("?"),i=this.fromURLSearchParams(n.slice(1).join("?")),a=n[0].split("/search/")[1];return a==null?i:{...i,scope:(o=this.scopeMapping[a])!==null&&o!==void 0?o:i.scope}}fromURLSearchParams(e){var o,n,i,a,s,l;try{e=decodeURI(e).replace(/%23/g,"#")}catch(w){console.warn("Could not decode search request query params, fallback on raw value",w)}let d=new URLSearchParams(e),p=d.get(k.LOCALE)==="all"?void 0:d.get(k.LOCALE),h=((o=d.get(k.VIRTUAL_FIELD))!==null&&o!==void 0?o:"EVERYWHERE").toUpperCase(),f=(n=d.get(k.SORT))===null||n===void 0?void 0:n.toLowerCase(),m=(i=d.get(k.SCOPE))!==null&&i!==void 0?i:"default",b=+((a=d.get(k.PER_PAGE))!==null&&a!==void 0?a:this.defaultPerPage),S=d.get(k.KEYWORD_MATCH),E=S?S.toUpperCase()===rt.MANDATORY?rt.MANDATORY:rt.OPTIONAL:void 0,v={};for(let w of d.keys())dl(w)||(v[w]=d.get(w));return{contentLocale:p??(this.allLanguagesAllowed?void 0:this.defaultContentLocale),query:(s=d.get(k.QUERY))!==null&&s!==void 0?s:"",scope:(l=this.scopeMapping[m])!==null&&l!==void 0?l:"DEFAULT",virtualField:Zc(h)?h:"EVERYWHERE",sortId:f,metadataFilters:this.parseCompatFilters(d),facets:[],paging:{page:1,perPage:Fe(1,isNaN(b)?this.defaultPerPage:b,1e3)},keywordMatch:E,otherQueryParams:v}}parseCompatFilters(e){var o,n,i,a,s,l,d;let p=[];return e.has(k.FILTERS)&&(p=this.parseValueFilters((o=e.get(k.FILTERS))!==null&&o!==void 0?o:"")),(n=e.has(k.PERIOD))!==null&&n!==void 0&&n&&(p=[...p,...this.parseLegacyPeriodFilter(((i=e.get(k.PERIOD))!==null&&i!==void 0?i:"").toUpperCase())]),[...p,...this.parseValueFilters((a=e.get(k.VALUE_FILTERS))!==null&&a!==void 0?a:""),...this.parseValueFilters((s=e.get(k.NEGATIVE_VALUE_FILTERS))!==null&&s!==void 0?s:"",!0),...this.parseDateFilters((l=e.get(k.DATE_FILTERS))!==null&&l!==void 0?l:""),...this.parseRangeFilters((d=e.get(k.RANGE_FILTERS))!==null&&d!==void 0?d:"")]}splitUnknownFilter(e){return this.superEscapeFilters(e).split("*").map(o=>o.split("~"))}parseValueFilters(e,o=!1){return e.length===0?[]:this.splitUnknownFilter(e).map(n=>({key:n[0],valueFilter:{values:n[1].split("_").map(ll).map(i=>this.unescapeFilterValue(i)),negative:o}}))}parseDateFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(o=>({key:o[0],dateFilter:{type:Bt[o[1].toUpperCase()]}}))}parseRangeFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(o=>({key:o[0],rangeFilter:{from:o[1].split("_")[0],to:o[1].split("_")[1]}}))}escapeFilters(e){for(let[o,n,i]of this.filtersEscapeMapping)e=e.replaceAll(o,n);return e}superEscapeFilters(e){for(let[o,n,i]of this.filtersEscapeMapping)e=e.replaceAll(n,i);return e}unescapeFilterValue(e){for(let[o,n,i]of this.filtersEscapeMapping)e=e.replaceAll(i,o);return e}parseLegacyPeriodFilter(e){if(Yc(e))return[{key:"ft:lastEdition",dateFilter:{type:Bt[e]}}];if(e.startsWith("CUSTOM_")){let[o,n,i]=e.split("_");return[{key:"ft:lastEdition",rangeFilter:{from:n,to:i}}]}return[]}static clearSearchParamsInUrl(e){let o=new URL(e);return[k.LOCALE,k.FILTERS,k.VALUE_FILTERS,k.NEGATIVE_VALUE_FILTERS,k.DATE_FILTERS,k.RANGE_FILTERS].forEach(i=>{o.searchParams.delete(i)}),o.toString()}static updateLocaleParamInUrl(e,o){let n=new URL(e);return n.searchParams.delete(k.LOCALE),o!==void 0&&n.searchParams.append(k.LOCALE,o),n.toString()}};var wi={};P(wi,{toFtFormComponent:()=>lf});var Ci=Symbol("elementInternals"),lf=$(Symbol("toFtFormComponent"),function(t){class e extends t{static get formAssociated(){return!0}get form(){return this[Ci].form}constructor(...n){super(n),this[Ci]=this.attachInternals()}setFormValue(n){this[Ci].setFormValue(n)}}return e});var Oi={};P(Oi,{DateFormatter:()=>ot});var ot=class{static format(e,o,n,i,a){return window.moment?window.moment(e).locale(o).format(this.getMomentDateFormat(n,i,!!a)):this.getIntlDateTime(e,o,n,i,!!a)}static getMomentDateFormat(e,o,n){return n?"LT":e?o?"lll":"ll":o?"L LT":"L"}static getIntlDateTime(e,o,n,i,a){let s=typeof e=="string"?new Date(e):e,l=new Intl.DateTimeFormat(o,{dateStyle:n?"medium":"short"}).format(s),d=new Intl.DateTimeFormat(o,{timeStyle:"short"}).format(s);return a?d:i?`${l} ${d}`:l}static getTimezoneAsString(){let e=n=>String(Math.floor(n)).padStart(2,"0"),o=new Date().getTimezoneOffset();return`${o<0?"+":"-"}${e(Math.abs(o)/60)}:${e(Math.abs(o)%60)}`}};var Ri={};P(Ri,{ALL_KEYS_VALUE:()=>Ai,SameWindowStorageEvent:()=>zt});var Ai="__all__",zt=class extends CustomEvent{constructor(e,o,n){super("same-window-storage",{detail:{key:e,oldValue:o,newValue:n}})}keyMatch(e){return this.detail.key.includes(e)||this.detail.key==Ai}};Storage.prototype.setItem=new Proxy(Storage.prototype.setItem,{apply(t,e,o){let n=e.getItem(o[0]);Reflect.apply(t,e,o),window.dispatchEvent(new zt(o[0],n,o[1]))}});Storage.prototype.removeItem=new Proxy(Storage.prototype.removeItem,{apply(t,e,o){let n=e.getItem(o[0]);Reflect.apply(t,e,o),window.dispatchEvent(new zt(o[0],n))}});Storage.prototype.clear=new Proxy(Storage.prototype.clear,{apply(t,e,o){Reflect.apply(t,e,o),window.dispatchEvent(new zt(Ai))}});var Ii={};P(Ii,{FocusMainContentEvent:()=>_i});var _i=class extends Event{constructor(){super("ft-focus-main-content",{composed:!0,bubbles:!0})}};var ul={};window.FluidTopicsA11yHints={isKeyboardNavigation:!1,lastPressedKey:""};function df(t){(t.key==="Enter"||t.key===" "||t.key==="Tab")&&(window.FluidTopicsA11yHints.isKeyboardNavigation=!0),window.FluidTopicsA11yHints.lastPressedKey=t.key}function uf(t){window.FluidTopicsA11yHints.isKeyboardNavigation=t.detail==0}document.addEventListener("keydown",df);document.addEventListener("click",uf);var pl=M`
48
48
  .sr-only {
49
49
  position:absolute;
50
50
  left:-10000px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-search-result-missing-terms",
3
- "version": "2.2.15",
3
+ "version": "2.2.16",
4
4
  "description": "A component displaying the missing terms of the query in a search results",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,8 +19,8 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-wc-utils": "2.2.15",
22
+ "@fluid-topics/ft-wc-utils": "2.2.16",
23
23
  "lit": "3.3.3"
24
24
  },
25
- "gitHead": "7fed0188675c448361c4f688602549554f99c045"
25
+ "gitHead": "c461a5d4f16255f9dd084cb26b2f988702693e2f"
26
26
  }