@fluid-topics/ft-search-result-missing-terms 2.2.40 → 2.2.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
[part="missing-term"] {
|
|
3
3
|
text-decoration: line-through;
|
|
4
4
|
}
|
|
5
|
-
`;var Dr=y(B());var _n=y(B(),1);var pr=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)},Eo=t=>({fromAttribute:e=>{if(e==null)return ze(t);try{return JSON.parse(e)}catch{return ze(t)}},toAttribute:e=>JSON.stringify(e)});function Cn(t,e){return(0,_n.property)({type:Object,converter:Eo(t),hasChanged:Ke,...e??{}})}function vo(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let r,n;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(n=r;n--!==0;)if(!Ie(t[n],e[n]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;for(n of t.entries())if(!Ie(n[1],e.get(n[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let s=o=>Object.keys(o).filter(a=>o[a]!=null),i=s(t);if(r=i.length,r!==s(e).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[n]))return!1;for(n=r;n--!==0;){let o=i[n];if(!Ie(t[o],e[o]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function Ie(t,e){try{return vo(t,e)}catch{return!1}}function Ke(t,e){return!Ie(t,e)}function ze(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function ut(t,e){let r=n=>n[t]===!0;return n=>{if(r(n))return n;let s=e(n);return s[t]=!0,s}}var wn=y(B(),1);var hr=t=>{let e=t??{};return(r,n)=>{var s;let i={hasChanged:Ke,attribute:!1,...e};(0,wn.property)(i)(r,n);let o=r.constructor;o.reduxProperties=new Map(o.reduxProperties),o.reduxProperties.set(n,{selector:(s=e.selector)!==null&&s!==void 0?s:(a=>a[n]),store:e.store})}};var dt=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(n=>n.type===e);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}};var ce=y(B(),1);var pt=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,r){return this.callbacks=[e],this.debounce(r)}queue(e,r){return this.callbacks.push(e),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,r;let n=[...this.callbacks];this.callbacks=[];let s=(e=this.rejectPromise)!==null&&e!==void 0?e:(()=>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 ft=y(X(),1);var ht=class extends ft.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let e=this.scopedRegistryConstructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,e.defineScopedElements(e.elementDefinitions));let r={...e.shadowRootOptions,customElements:e.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return(0,ft.adoptStyles)(n,e.elementStyles),n}static canDefineScopedElement(e){return!!this.registry&&!this.registry.get(e)}static defineScopedElements(e){Object.entries(e).forEach(([r,n])=>this.defineScopedElement(r,n))}static defineScopedElement(e,r){pr(e)(r),this.canDefineScopedElement(e)&&this.registry.define(e,r)}canDefineScopedElement(e){return this.scopedRegistryConstructor.canDefineScopedElement(e)}defineScopedElements(e){this.scopedRegistryConstructor.defineScopedElements(e)}defineScopedElement(e,r){this.scopedRegistryConstructor.defineScopedElement(e,r)}};function Tn(t,e,...r){var n;let s=t.querySelector(e);for(let i of r)s=(n=s?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return s}var Me=function(t,e,r,n){var s=arguments.length,i=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(i=(s<3?o(i):s>3?o(e,r,i):o(e,r))||i);return s>3&&i&&Object.defineProperty(e,r,i),i},kn,On=Symbol("constructorPrototype"),Rn=Symbol("constructorName"),Mn=Symbol("exportpartsDebouncer"),In=Symbol("dynamicDependenciesLoaded"),ke=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};ke.eventName="exportparts-updated";var W=class extends ht{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[kn]=new pt(5),this.scheduleExportpartsUpdate=()=>{var e,r,n;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[Mn].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[Rn]=this.constructor.name,this[On]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Rn]&&Object.setPrototypeOf(this,this[On])}connectedCallback(){var e;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[In]||(r[In]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(ke.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(ke.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate(),e.has("exportparts")&&this.dispatchEvent(new ke)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:s}=this.elementToFocus;if(n!=null){let i=[...s??[],n];r=Tn(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){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(e.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(e){var r,n,s,i,o,a;let c=h=>h!=null&&h.trim().length>0,l=e.filter(c).map(h=>h.trim());if(l.length===0){this.exportparts=void 0;return}let u=new Set;for(let h of(i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&i!==void 0?i:[]){let g=(o=(n=h.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&o!==void 0?o:[],A=(a=(s=h.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(v=>v.split(":")[1]))!==null&&a!==void 0?a:[],O=[...g,...A].filter(c).map(v=>v.trim());for(let v of O)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(", ")}};kn=Mn;Me([(0,ce.property)()],W.prototype,"exportpartsPrefix",void 0);Me([Cn([])],W.prototype,"exportpartsPrefixes",void 0);Me([(0,ce.property)({reflect:!0})],W.prototype,"exportparts",void 0);Me([(0,ce.property)()],W.prototype,"customStylesheet",void 0);Me([(0,ce.property)()],W.prototype,"elementToFocus",void 0);Me([(0,ce.state)()],W.prototype,"useAdoptedStyleSheets",void 0);function yt(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var We=Symbol("internalReduxEventsUnsubscribers"),re=Symbol("internalStoresUnsubscribers"),le=Symbol("internalStores"),Ao=ut(Symbol("withRedux"),function(t){var e,r,n;class s extends t{constructor(){super(...arguments),this[e]=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[le].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[le].values()][0]}getStore(o){return o==null?this.getUnnamedStore():this[le].get(o)}addStore(o,a){var c;a=(c=a??o.name)!==null&&c!==void 0?c:"default-store",this.unsubscribeFromStore(a),this[le].set(a,o),this.subscribeToStore(a,o),this.updateFromStores()}removeStore(o){let a=typeof o=="string"?o:o.name;this.unsubscribeFromStore(a),this[le].delete(a)}setupStores(){this.unsubscribeFromStores(),this[le].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[re].has(o.store):this[re].size>0)&&(this[a]=o.selector(l.getState(),this))}})}subscribeToStore(o,a){var c,l;this[re].set(o,a.subscribe(()=>this.updateFromStores())),this[We].set(o,[]),yt(a)&&(!((c=a.deprecatedKeys)===null||c===void 0)&&c.length&&this.reduxConstructor.reduxProperties.forEach((u,d)=>{this.getStore(u.store)===a&&a.deprecatedKeys.includes(d)&&console.warn("Element",this,"is subscribed to deprecated key",d,"in store",a.name)}),a.eventBus&&((l=this.reduxConstructor.reduxEventListeners)===null||l===void 0||l.forEach((u,d)=>{if(typeof this[d]=="function"&&(!u.store||a.name===u.store)){let h=g=>this[d](g);a.addEventListener(u.eventName,h),this[We].get(o).push(()=>a.removeEventListener(u.eventName,h))}}))),this.onStoreAvailable(o)}unsubscribeFromStores(){this[re].forEach((o,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(o){var a;this[re].has(o)&&this[re].get(o)(),this[re].delete(o),(a=this[We].get(o))===null||a===void 0||a.forEach(c=>c()),this[We].delete(o)}onStoreAvailable(o){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=re,r=le,n=We,s.reduxProperties=new Map,s.reduxReactiveProperties=new Set,s.reduxEventListeners=new Map,s}),Dn=class extends Ao(W){};function k(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 xo=typeof Symbol=="function"&&Symbol.observable||"@@observable",Nn=xo,fr=()=>Math.random().toString(36).substring(7).split("").join("."),bo={INIT:`@@redux/INIT${fr()}`,REPLACE:`@@redux/REPLACE${fr()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${fr()}`},mt=bo;function gt(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 yr(t,e,r){if(typeof t!="function")throw new Error(k(2));if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(k(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(k(1));return r(yr)(t,e)}let n=t,s=e,i=new Map,o=i,a=0,c=!1;function l(){o===i&&(o=new Map,i.forEach((v,R)=>{o.set(R,v)}))}function u(){if(c)throw new Error(k(3));return s}function d(v){if(typeof v!="function")throw new Error(k(4));if(c)throw new Error(k(5));let R=!0;l();let U=a++;return o.set(U,v),function(){if(R){if(c)throw new Error(k(6));R=!1,l(),o.delete(U),i=null}}}function h(v){if(!gt(v))throw new Error(k(7));if(typeof v.type>"u")throw new Error(k(8));if(typeof v.type!="string")throw new Error(k(17));if(c)throw new Error(k(9));try{c=!0,s=n(s,v)}finally{c=!1}return(i=o).forEach(U=>{U()}),v}function g(v){if(typeof v!="function")throw new Error(k(10));n=v,h({type:mt.REPLACE})}function A(){let v=d;return{subscribe(R){if(typeof R!="object"||R===null)throw new Error(k(11));function U(){let E=R;E.next&&E.next(u())}return U(),{unsubscribe:v(U)}},[Nn](){return this}}}return h({type:mt.INIT}),{dispatch:h,subscribe:d,getState:u,replaceReducer:g,[Nn]:A}}function _o(t){Object.keys(t).forEach(e=>{let r=t[e];if(typeof r(void 0,{type:mt.INIT})>"u")throw new Error(k(12));if(typeof r(void 0,{type:mt.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(k(13))})}function mr(t){let e=Object.keys(t),r={};for(let o=0;o<e.length;o++){let a=e[o];typeof t[a]=="function"&&(r[a]=t[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],A=a[h],O=g(A,c);if(typeof O>"u"){let v=c&&c.type;throw new Error(k(14))}u[h]=O,l=l||O!==A}return l=l||n.length!==Object.keys(a).length,l?u:a}}function Ge(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,r)=>(...n)=>e(r(...n)))}function Ln(...t){return e=>(r,n)=>{let s=e(r,n),i=()=>{throw new Error(k(15))},o={getState:s.getState,dispatch:(c,...l)=>i(c,...l)},a=t.map(c=>c(o));return i=Ge(...a)(s.dispatch),{...s,dispatch:i}}}function Pn(t){return gt(t)&&"type"in t&&typeof t.type=="string"}var zn=Symbol.for("immer-nothing"),Fn=Symbol.for("immer-draftable"),D=Symbol.for("immer-state");function K(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var $=Object,Ne=$.getPrototypeOf,At="constructor",Tt="prototype",vr="configurable",xt="enumerable",Et="writable",Qe="value",G=t=>!!t&&!!t[D];function H(t){return t?Kn(t)||Rt(t)||!!t[Fn]||!!t[At]?.[Fn]||It(t)||Ze(t):!1}var Co=$[Tt][At].toString(),Un=new WeakMap;function Kn(t){if(!t||!Or(t))return!1;let e=Ne(t);if(e===null||e===$[Tt])return!0;let r=$.hasOwnProperty.call(e,At)&&e[At];if(r===Object)return!0;if(!De(r))return!1;let n=Un.get(r);return n===void 0&&(n=Function.toString.call(r),Un.set(r,n)),n===Co}function Ot(t,e,r=!0){Je(t)===0?(r?Reflect.ownKeys(t):$.keys(t)).forEach(s=>{e(s,t[s],t)}):t.forEach((n,s)=>e(s,n,t))}function Je(t){let e=t[D];return e?e.type_:Rt(t)?1:It(t)?2:Ze(t)?3:0}var gr=(t,e,r=Je(t))=>r===2?t.has(e):$[Tt].hasOwnProperty.call(t,e),Ar=(t,e,r=Je(t))=>r===2?t.get(e):t[e],bt=(t,e,r,n=Je(t))=>{n===2?t.set(e,r):n===3?t.add(r):t[e]=r};function wo(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}var Rt=Array.isArray,It=t=>t instanceof Map,Ze=t=>t instanceof Set,Or=t=>typeof t=="object",De=t=>typeof t=="function",Sr=t=>typeof t=="boolean";function To(t){let e=+t;return Number.isInteger(e)&&String(e)===t}var J=t=>t.copy_||t.base_;var Rr=t=>t.modified_?t.copy_:t.base_;function xr(t,e){if(It(t))return new Map(t);if(Ze(t))return new Set(t);if(Rt(t))return Array[Tt].slice.call(t);let r=Kn(t);if(e===!0||e==="class_only"&&!r){let n=$.getOwnPropertyDescriptors(t);delete n[D];let s=Reflect.ownKeys(n);for(let i=0;i<s.length;i++){let o=s[i],a=n[o];a[Et]===!1&&(a[Et]=!0,a[vr]=!0),(a.get||a.set)&&(n[o]={[vr]:!0,[Et]:!0,[xt]:a[xt],[Qe]:t[o]})}return $.create(Ne(t),n)}else{let n=Ne(t);if(n!==null&&r)return{...t};let s=$.create(n);return $.assign(s,t)}}function kt(t,e=!1){return Mt(t)||G(t)||!H(t)||(Je(t)>1&&$.defineProperties(t,{set:St,add:St,clear:St,delete:St}),$.freeze(t),e&&Ot(t,(r,n)=>{kt(n,!0)},!1)),t}function Oo(){K(2)}var St={[Qe]:Oo};function Mt(t){return t===null||!Or(t)?!0:$.isFrozen(t)}var _t="MapSet",br="Patches",$n="ArrayMethods",Wn={};function ue(t){let e=Wn[t];return e||K(0,t),e}var Hn=t=>!!Wn[t];var Ye,Gn=()=>Ye,Ro=(t,e)=>({drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Hn(_t)?ue(_t):void 0,arrayMethodsPlugin_:Hn($n)?ue($n):void 0});function Bn(t,e){e&&(t.patchPlugin_=ue(br),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function _r(t){Cr(t),t.drafts_.forEach(Io),t.drafts_=null}function Cr(t){t===Ye&&(Ye=t.parent_)}var jn=t=>Ye=Ro(Ye,t);function Io(t){let e=t[D];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function Vn(t,e){e.unfinalizedDrafts_=e.drafts_.length;let r=e.drafts_[0];if(t!==void 0&&t!==r){r[D].modified_&&(_r(e),K(4)),H(t)&&(t=qn(e,t));let{patchPlugin_:s}=e;s&&s.generateReplacementPatches_(r[D].base_,t,e)}else t=qn(e,r);return ko(e,t,!0),_r(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==zn?t:void 0}function qn(t,e){if(Mt(e))return e;let r=e[D];if(!r)return Ct(e,t.handledSet_,t);if(!Dt(r,t))return e;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(t);Xn(r,t)}return r.copy_}function ko(t,e,r=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&kt(e,r)}function Qn(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}var Dt=(t,e)=>t.scope_===e,Mo=[];function Yn(t,e,r,n){let s=J(t),i=t.type_;if(n!==void 0&&Ar(s,n,i)===e){bt(s,n,r,i);return}if(!t.draftLocations_){let a=t.draftLocations_=new Map;Ot(s,(c,l)=>{if(G(l)){let u=a.get(l)||[];u.push(c),a.set(l,u)}})}let o=t.draftLocations_.get(e)??Mo;for(let a of o)bt(s,a,r,i)}function Do(t,e,r){t.callbacks_.push(function(s){let i=e;if(!i||!Dt(i,s))return;s.mapSetPlugin_?.fixSetContents(i);let o=Rr(i);Yn(t,i.draft_??i,o,r),Xn(i,s)})}function Xn(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 s=n.getPath(t);s&&n.generatePatches_(t,s,e)}Qn(t)}}function No(t,e,r){let{scope_:n}=t;if(G(r)){let s=r[D];Dt(s,n)&&s.callbacks_.push(function(){vt(t);let o=Rr(s);Yn(t,r,o,e)})}else H(r)&&t.callbacks_.push(function(){let i=J(t);t.type_===3?i.has(r)&&Ct(r,n.handledSet_,n):Ar(i,e,t.type_)===r&&n.drafts_.length>1&&(t.assigned_.get(e)??!1)===!0&&t.copy_&&Ct(Ar(t.copy_,e,t.type_),n.handledSet_,n)})}function Ct(t,e,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||G(t)||e.has(t)||!H(t)||Mt(t)||(e.add(t),Ot(t,(n,s)=>{if(G(s)){let i=s[D];if(Dt(i,r)){let o=Rr(i);bt(t,n,o,t.type_),Qn(i)}}else H(s)&&Ct(s,e,r)})),t}function Lo(t,e){let r=Rt(t),n={type_:r?1:0,scope_:e?e.scope_:Gn(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},s=n,i=wt;r&&(s=[n],i=Xe);let{revoke:o,proxy:a}=Proxy.revocable(s,i);return n.draft_=a,n.revoke_=o,[a,n]}var wt={get(t,e){if(e===D)return t;let r=t.scope_.arrayMethodsPlugin_,n=t.type_===1&&typeof e=="string";if(n&&r?.isArrayOperationMethod(e))return r.createMethodInterceptor(t,e);let s=J(t);if(!gr(s,e,t.type_))return Fo(t,s,e);let i=s[e];if(t.finalized_||!H(i)||n&&t.operationMethod&&r?.isMutatingArrayMethod(t.operationMethod)&&To(e))return i;if(i===Er(t.base_,e)||Po(t,e,i)){vt(t);let o=t.type_===1?+e:e,a=Tr(t.scope_,i,t,o);return t.copy_[o]=a}return i},has(t,e){return e in J(t)},ownKeys(t){return Reflect.ownKeys(J(t))},set(t,e,r){let n=Jn(J(t),e);if(n?.set)return n.set.call(t.draft_,r),!0;if(!t.modified_){let s=Er(J(t),e),i=s?.[D];if(i&&i.base_===r)return t.copy_[e]=r,t.assigned_.delete(e),!0;if(wo(r,s)&&(r!==void 0||gr(t.base_,e,t.type_)))return!0;vt(t),wr(t)}return t.copy_[e]===r&&(r!==void 0||gr(t.copy_,e,t.type_))||Number.isNaN(r)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=r,t.assigned_.set(e,!0),No(t,e,r)),!0},deleteProperty(t,e){return vt(t),Er(t.base_,e)!==void 0||e in t.base_?(t.assigned_.set(e,!1),wr(t)):t.assigned_.delete(e),t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){let r=J(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{[Et]:!0,[vr]:t.type_!==1||e!=="length",[xt]:n[xt],[Qe]:r[e]}},defineProperty(){K(11)},getPrototypeOf(t){return Ne(t.base_)},setPrototypeOf(){K(12)}},Xe={};for(let t in wt){let e=wt[t];Xe[t]=function(){let r=arguments;return r[0]=r[0][0],e.apply(this,r)}}Xe.deleteProperty=function(t,e){return Xe.set.call(this,t,e,void 0)};Xe.set=function(t,e,r){return wt.set.call(this,t[0],e,r,t[0])};function Er(t,e){let r=t[D];return(r?J(r):t)[e]}function Po(t,e,r){return t.type_!==1||!t.allIndicesReassigned_||!H(r)||r[D]?!1:t.baseRefs_.has(r)}function Fo(t,e,r){let n=Jn(e,r);return n?Qe in n?n[Qe]:n.get?.call(t.draft_):void 0}function Jn(t,e){if(!(e in t))return;let r=Ne(t);for(;r;){let n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Ne(r)}}function wr(t){t.modified_||(t.modified_=!0,t.parent_&&wr(t.parent_))}function vt(t){t.copy_||(t.assigned_=new Map,t.copy_=xr(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var Uo=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,r,n)=>{if(De(e)&&!De(r)){let i=r;r=e;let o=this;return function(c=i,...l){return o.produce(c,u=>r.call(this,u,...l))}}De(r)||K(6),n!==void 0&&!De(n)&&K(7);let s;if(H(e)){let i=jn(this),o=Tr(i,e,void 0),a=!0;try{s=r(o),a=!1}finally{a?_r(i):Cr(i)}return Bn(i,n),Vn(s,i)}else if(!e||!Or(e)){if(s=r(e),s===void 0&&(s=e),s===zn&&(s=void 0),this.autoFreeze_&&kt(s,!0),n){let i=[],o=[];ue(br).generateReplacementPatches_(e,s,{patches_:i,inversePatches_:o}),n(i,o)}return s}else K(1,e)},this.produceWithPatches=(e,r)=>{if(De(e))return(o,...a)=>this.produceWithPatches(o,c=>e(c,...a));let n,s;return[this.produce(e,r,(o,a)=>{n=o,s=a}),n,s]},Sr(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Sr(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Sr(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){H(t)||K(8),G(t)&&(t=Zn(t));let e=jn(this),r=Tr(e,t,void 0);return r[D].isManual_=!0,Cr(e),r}finishDraft(t,e){let r=t&&t[D];(!r||!r.isManual_)&&K(9);let{scope_:n}=r;return Bn(n,e),Vn(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 r;for(r=e.length-1;r>=0;r--){let s=e[r];if(s.path.length===0&&s.op==="replace"){t=s.value;break}}r>-1&&(e=e.slice(r+1));let n=ue(br).applyPatches_;return G(t)?n(t,e):this.produce(t,s=>n(s,e))}};function Tr(t,e,r,n){let[s,i]=It(e)?ue(_t).proxyMap_(e,r):Ze(e)?ue(_t).proxySet_(e,r):Lo(e,r);return(r?.scope_??Gn()).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 Zn(t){return G(t)||K(10,t),es(t)}function es(t){if(!H(t)||Mt(t))return t;let e=t[D],r,n=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,r=xr(t,e.scope_.immer_.useStrictShallowCopy_),n=e.scope_.immer_.shouldUseStrictIteration()}else r=xr(t,!0);let s=r;return Ze(r)&&(r=new Set),Ot(s,(i,o)=>{bt(r,i,es(o))},n),e&&(e.finalized_=!1),r}var $o=globalThis.Iterator,Ec=typeof $o?.from=="function";var Ho=new Uo,Ir=Ho.produce;function ts(t){return({dispatch:r,getState:n})=>s=>i=>typeof i=="function"?i(r,n,t):s(i)}var rs=ts(),ns=ts;var Bo=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ge:Ge.apply(null,arguments)};typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var jo=t=>t&&typeof t.match=="function";function ne(t,e){function r(...n){if(e){let s=e(...n);if(!s)throw new Error(Q(0));return{type:t,payload:s.payload,..."meta"in s&&{meta:s.meta},..."error"in s&&{error:s.error}}}return{type:t,payload:n[0]}}return r.toString=()=>`${t}`,r.type=t,r.match=n=>Pn(n)&&n.type===t,r}var cs=class et extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,et.prototype)}static get[Symbol.species](){return et}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new et(...e[0].concat(this)):new et(...e.concat(this))}};function ss(t){return H(t)?Ir(t,()=>{}):t}function Nt(t,e,r){return t.has(e)?t.get(e):t.set(e,r(e)).get(e)}function Vo(t){return typeof t=="boolean"}var qo=()=>function(e){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:s=!0,actionCreatorCheck:i=!0}=e??{},o=new cs;return r&&(Vo(r)?o.push(rs):o.push(ns(r.extraArgument))),o},zo="RTK_autoBatch";var is=t=>e=>{setTimeout(e,t)},Ko=(t,e)=>r=>{let n=!1,s,i,o=()=>{n||(n=!0,cancelAnimationFrame(s),clearTimeout(i),r())};s=t(o),i=setTimeout(o,e)},Wo=(t={type:"raf"})=>e=>(...r)=>{let n=e(...r),s=!0,i=!1,o=!1,a=new Set,c=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?Ko(window.requestAnimationFrame,100):is(10):t.type==="callback"?t.queueNotification:is(t.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=t=>function(r){let{autoBatch:n=!0}=r??{},s=new cs(t);return n&&s.push(Wo(typeof n=="object"?n:void 0)),s};function ls(t){let e=qo(),{reducer:r=void 0,middleware:n,devTools:s=!0,duplicateMiddlewareCheck:i=!0,preloadedState:o=void 0,enhancers:a=void 0}=t||{},c;if(typeof r=="function")c=r;else if(gt(r))c=mr(r);else throw new Error(Q(1));let l;typeof n=="function"?l=n(e):l=e();let u=Ge;s&&(u=Bo({trace:!1,...typeof s=="object"&&s}));let d=Ln(...l),h=Go(d),g=typeof a=="function"?a(h):h(),A=u(...g);return yr(c,o,A)}function us(t){let e={},r=[],n,s={addCase(i,o){let a=typeof i=="string"?i:i.type;if(!a)throw new Error(Q(28));if(a in e)throw new Error(Q(29));return e[a]=o,s},addAsyncThunk(i,o){return o.pending&&(e[i.pending.type]=o.pending),o.rejected&&(e[i.rejected.type]=o.rejected),o.fulfilled&&(e[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 t(s),[e,r,n]}function Qo(t){return typeof t=="function"}function Yo(t,e){let[r,n,s]=us(e),i;if(Qo(t))i=()=>ss(t());else{let a=ss(t);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 h=d(u,c);return h===void 0?u:h}else{if(H(u))return Ir(u,h=>d(h,c));{let h=d(u,c);if(h===void 0){if(u===null)return u;throw new Error(Q(9))}return h}}return u},a)}return o.getInitialState=i,o}var Xo=(t,e)=>jo(t)?t.match(e):t(e);function Jo(...t){return e=>t.some(r=>Xo(r,e))}var Zo="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ea=(t=21)=>{let e="",r=t;for(;r--;)e+=Zo[Math.random()*64|0];return e},ta=["name","message","stack","code"],kr=class{payload;meta;_type;constructor(t,e){this.payload=t,this.meta=e}},os=class{payload;meta;_type;constructor(t,e){this.payload=t,this.meta=e}},ra=t=>{if(typeof t=="object"&&t!==null){let e={};for(let r of ta)typeof t[r]=="string"&&(e[r]=t[r]);return e}return{message:String(t)}},as="External signal was aborted",na=(()=>{function t(e,r,n){let s=ne(e+"/fulfilled",(c,l,u,d)=>({payload:c,meta:{...d||{},arg:u,requestId:l,requestStatus:"fulfilled"}})),i=ne(e+"/pending",(c,l,u)=>({payload:void 0,meta:{...u||{},arg:l,requestId:c,requestStatus:"pending"}})),o=ne(e+"/rejected",(c,l,u,d,h)=>({payload:d,error:(n&&n.serializeError||ra)(c||"Rejected"),meta:{...h||{},arg:u,requestId:l,rejectedWithValue:d!==void 0,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(),A=new AbortController,O,v;function R(S){v=S,A.abort()}l&&(l.aborted?R(as):l.addEventListener("abort",()=>R(as),{once:!0}));let U=(async function(){let S;try{let E=n?.condition?.(c,{getState:d,extra:h});if(ia(E)&&(E=await E),E===!1)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};if(A.signal.aborted)throw{name:"AbortError",message:v||"Aborted"};let I=new Promise((C,M)=>{O=()=>{M({name:"AbortError",message:v||"Aborted"})},A.signal.addEventListener("abort",O,{once:!0})});u(i(g,c,n?.getPendingMeta?.({requestId:g,arg:c},{getState:d,extra:h}))),S=await Promise.race([I,Promise.resolve(r(c,{dispatch:u,getState:d,extra:h,requestId:g,signal:A.signal,abort:R,rejectWithValue:((C,M)=>new kr(C,M)),fulfillWithValue:((C,M)=>new os(C,M))})).then(C=>{if(C instanceof kr)throw C;return C instanceof os?s(C.payload,g,c,C.meta):s(C,g,c)})])}catch(E){S=E instanceof kr?o(null,g,c,E.payload,E.meta):o(E,g,c)}finally{O&&A.signal.removeEventListener("abort",O)}return n&&!n.dispatchConditionRejection&&o.match(S)&&S.meta.condition||u(S),S})();return Object.assign(U,{abort:R,requestId:g,arg:c,unwrap(){return U.then(sa)}})}}return Object.assign(a,{pending:i,rejected:o,fulfilled:s,settled:Jo(o,s),typePrefix:e})}return t.withTypes=()=>t,t})();function sa(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function ia(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var ds=Symbol.for("rtk-slice-createasyncthunk"),Tc={[ds]:na};function oa(t,e){return`${t}/${e}`}function aa({creators:t}={}){let e=t?.asyncThunk?.[ds];return function(n){let{name:s,reducerPath:i=s}=n;if(!s)throw new Error(Q(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,E){let I=typeof S=="string"?S:S.type;if(!I)throw new Error(Q(12));if(I in c.sliceCaseReducersByType)throw new Error(Q(13));return c.sliceCaseReducersByType[I]=E,l},addMatcher(S,E){return c.sliceMatchers.push({matcher:S,reducer:E}),l},exposeAction(S,E){return c.actionCreators[S]=E,l},exposeCaseReducer(S,E){return c.sliceCaseReducersByName[S]=E,l}};a.forEach(S=>{let E=o[S],I={reducerName:S,type:oa(s,S),createNotation:typeof n.reducers=="function"};da(E)?ha(I,E,l,e):ua(I,E,l)});function u(){let[S={},E=[],I=void 0]=typeof n.extraReducers=="function"?us(n.extraReducers):[n.extraReducers],C={...S,...c.sliceCaseReducersByType};return Yo(n.initialState,M=>{for(let N in C)M.addCase(N,C[N]);for(let N of c.sliceMatchers)M.addMatcher(N.matcher,N.reducer);for(let N of E)M.addMatcher(N.matcher,N.reducer);I&&M.addDefaultCase(I)})}let d=S=>S,h=new Map,g=new WeakMap,A;function O(S,E){return A||(A=u()),A(S,E)}function v(){return A||(A=u()),A.getInitialState()}function R(S,E=!1){function I(M){let N=M[S];return typeof N>"u"&&E&&(N=Nt(g,I,v)),N}function C(M=d){return Nt(Nt(h,E,()=>new WeakMap),M,()=>{let N={};for(let[uo,po]of Object.entries(n.selectors??{}))N[uo]=ca(po,M,()=>Nt(g,M,v),E);return N})}return{reducerPath:S,getSelectors:C,get selectors(){return C(I)},selectSlice:I}}let U={name:s,reducer:O,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:v,...R(i),injectInto(S,{reducerPath:E,...I}={}){let C=E??i;return S.inject({reducerPath:C,reducer:O},I),{...U,...R(C,!0)}}};return U}}function ca(t,e,r,n){function s(i,...o){let a=e(i);return typeof a>"u"&&n&&(a=r()),t(a,...o)}return s.unwrapped=t,s}var ps=aa();function la(){function t(e,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...r}}return t.withTypes=()=>t,{reducer(e){return Object.assign({[e.name](...r){return e(...r)}}[e.name],{_reducerDefinitionType:"reducer"})},preparedReducer(e,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:r}},asyncThunk:t}}function ua({type:t,reducerName:e,createNotation:r},n,s){let i,o;if("reducer"in n){if(r&&!pa(n))throw new Error(Q(17));i=n.reducer,o=n.prepare}else i=n;s.addCase(t,i).exposeCaseReducer(e,i).exposeAction(e,o?ne(t,o):ne(t))}function da(t){return t._reducerDefinitionType==="asyncThunk"}function pa(t){return t._reducerDefinitionType==="reducerWithPrepare"}function ha({type:t,reducerName:e},r,n,s){if(!s)throw new Error(Q(18));let{payloadCreator:i,fulfilled:o,pending:a,rejected:c,settled:l,options:u}=r,d=s(t,i,u);n.exposeAction(e,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(e,{fulfilled:o||Lt,pending:a||Lt,rejected:c||Lt,settled:l||Lt})}function Lt(){}var hs="listener",fs="completed",ys="cancelled",Oc=`task-${ys}`,Rc=`task-${fs}`,Ic=`${hs}-${ys}`,kc=`${hs}-${fs}`;var{assign:ms}=Object;var Mr="listenerMiddleware";var fa=ms(ne(`${Mr}/add`),{withTypes:()=>fa}),Mc=ne(`${Mr}/removeAll`),ya=ms(ne(`${Mr}/remove`),{withTypes:()=>ya});function Q(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. `}var ma=ut(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??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)}}}),Pt=class extends ma(Object){};window.ftReduxStores||(window.ftReduxStores={});var gs=class t extends Pt{static get(e){var r;let n=typeof e=="string"?e:e.name,s=typeof e=="string"?void 0:e,i=window.ftReduxStores[n];if(yt(i))return i;if(s==null)return;let o=ps({...s,reducers:(r=s.reducers)!==null&&r!==void 0?r:{}}),a=ls({reducer:(c,l)=>{if(l.type==="CLEAR_FT_REDUX_STORE"){let u=ze(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 t(o,a,s.eventBus,s.deprecatedKeys)}constructor(e,r,n,s){super(),this.reduxSlice=e,this.reduxStore=r,this.deprecatedKeys=s,this.isFtReduxStore=!0,this.commands=new dt,this.injectInto=(o,a)=>this.reduxSlice.injectInto(o,a),this.selectSlice=o=>this.reduxSlice.selectSlice(o);let i=o=>o!=null?JSON.parse(JSON.stringify(o)):o;this.actions=new Proxy(this.reduxSlice.actions,{get:(o,a,c)=>{let l=a,u=o[l];return u?(...d)=>{let h=u(...d.map(i));return this.reduxStore.dispatch(h),h}:d=>{let h=l,g=this.getState()[h];Ie(g,d)||this.setState({[h]:i(d)})}}}),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()}};var Ft=class{static format(e,r,n,s,i){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(n,s,!!i)):this.getIntlDateTime(e,r,n,s,!!i)}static getMomentDateFormat(e,r,n){return n?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,n,s,i){let o=typeof e=="string"?new Date(e):e,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 e=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var Ut=y(x()),ga="ft-app-info",se=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};se.eventName="authentication-change";var tt=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};tt.eventName="ui-locale-changed";var Sa={session:(t,e)=>{(0,Ut.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>m.dispatchEvent(new se(e.payload)),0))}},m=Ut.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 Ss=y(x()),$t=function(t,e,r,n){var s=arguments.length,i=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(i=(s<3?o(i):s>3?o(e,r,i):o(e,r))||i);return s>3&&i&&Object.defineProperty(e,r,i),i},cl=(0,Ss.applyMixinOnce)(Symbol("withDateFormat"),function(t){class e extends t{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=>Ft.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return $t([(0,Dr.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),$t([(0,Dr.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),$t([hr({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:[]}})],e.prototype,"metadataDescriptors",void 0),$t([hr({store:m.name})],e.prototype,"uiLocale",void 0),e});var Es;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Es||(Es={}));var vs;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(vs||(vs={}));var As;(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"})(As||(As={}));var xs;(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"})(xs||(xs={}));var bs;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(bs||(bs={}));var _s;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(_s||(_s={}));var Cs;(function(t){t.PUBLISHED="PUBLISHED",t.AI="AI"})(Cs||(Cs={}));var ws;(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"})(ws||(ws={}));var Ts;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(Ts||(Ts={}));var Os;(function(t){t.METADATA_FILTER="METADATA_FILTER",t.ACCESS_RIGHTS_FILTER="ACCESS_RIGHTS_FILTER"})(Os||(Os={}));var Rs;(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",t.DOC_DIFF="DOC_DIFF"})(Rs||(Rs={}));var Is;(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"})(Is||(Is={}));var ks;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(ks||(ks={}));var Ms;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Ms||(Ms={}));var Ds;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Ds||(Ds={}));var Ns;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Ns||(Ns={}));var Ls;(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"})(Ls||(Ls={}));var Nr;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(Nr||(Nr={}));var Ps;(function(t){t.ASC="ASC",t.DESC="DESC"})(Ps||(Ps={}));var Fs;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Fs||(Fs={}));var Lr;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Lr||(Lr={}));var Us;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Us||(Us={}));var $s;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})($s||($s={}));var Hs;(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"})(Hs||(Hs={}));var Bs;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Bs||(Bs={}));var js;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(js||(js={}));var Pr;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Pr||(Pr={}));var Vs;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Vs||(Vs={}));var _;(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"})(_||(_={}));var j;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(j||(j={}));var qs;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(qs||(qs={}));var zs;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(zs||(zs={}));var Ks;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Ks||(Ks={}));var Ws;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Ws||(Ws={}));var Gs;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Gs||(Gs={}));var Qs;(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"})(Qs||(Qs={}));var Ys;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(Ys||(Ys={}));var Xs;(function(t){t.CHAT="CHAT",t.COMPLETION="COMPLETION",t.RAG="RAG",t.AGENT="AGENT"})(Xs||(Xs={}));var Js;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(Js||(Js={}));var Zs;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(Zs||(Zs={}));var ei;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(ei||(ei={}));var ti;(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"})(ti||(ti={}));var ri;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(ri||(ri={}));var Ea={[_.PERSONAL_BOOK_SHARE_USER]:[_.PERSONAL_BOOK_USER],[_.HTML_EXPORT_USER]:[_.PERSONAL_BOOK_USER],[_.PDF_EXPORT_USER]:[_.PERSONAL_BOOK_USER],[_.KHUB_ADMIN]:[_.CONTENT_PUBLISHER],[_.ADMIN]:[_.KHUB_ADMIN,_.USERS_ADMIN,_.PORTAL_ADMIN,_.BEHAVIOR_DATA_USER],[_.GENERATIVE_AI_EXPORT_USER]:[_.GENERATIVE_AI_USER]};function ni(t,e){return t===e||(Ea[t]??[]).some(r=>ni(r,e))}function Ht(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=>ni(n,e))}function si(t,...e){return t==null?!1:e.some(r=>Ht(t,r))}var zt=y(x());var Fr=y(x());var de=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:n}=m.getState(),s=e??n;if(r&&s&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,s,!0)}static await(e){return new Promise(r=>{let n=t.get(e);if(n)r(n);else{let s=m.subscribe(()=>{n=t.get(e),n&&(s(),r(n))})}})}};var Le=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:de.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):de.await()}};var F=class extends Le{constructor(e=!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 Fr.CacheRegistry,this.cache=e?s.commonCache:new Fr.CacheRegistry}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var Bt=class extends F{async listMySearches(){let{session:e}=m.getState();return Ht(e,_.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var jt=class extends F{async listMyBookmarks(){let e=m.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}};var Vt=class extends F{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=m.getState().session;return!!e?.sessionAuthenticated}};var qt=class extends F{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 e=m.getState().session;return!!e?.sessionAuthenticated}};var va="ft-user-assets",Aa={setAssetCount:(t,e)=>{let{userAssetType:r,count:n}=e.payload.assetCount;t.assetCounts.allAsset[r]=n},clearAssetCount:t=>{Object.values(j).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:n,asset:s}=e.payload;$r(t,r,[...Ur(t,r),s]),ii(t,r,1,n),oi(t,s)},editAsset:(t,e)=>{let{assetType:r,asset:n}=e.payload;$r(t,r,Ur(t,r).map(s=>s.id===n.id?n:s)),oi(t,n)},removeAsset:(t,e)=>{let{assetType:r,mapId:n,assetId:s}=e.payload;$r(t,r,Ur(t,r).filter(i=>i.id!==s)),ii(t,r,-1,n)}},ai={[j.SEARCHES]:"savedSearches",[j.BOOKMARKS]:"bookmarks",[j.BOOKS]:void 0,[j.COLLECTIONS]:void 0},Ur=(t,e)=>{var r;let n=ai[e];return n?(r=t[n])!==null&&r!==void 0?r:[]:[]},$r=(t,e,r)=>{let n=ai[e];n&&(t[n]=r)},ii=(t,e,r,n)=>{let s=t.assetCounts.allAsset[e];if(s!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,s+r),e===j.BOOKMARKS&&n)){let i=t.assetCounts.bookmarkByMap[n];t.assetCounts.bookmarkByMap[n]=Math.max(0,i+r)}},oi=(t,e)=>{let r=t.assetLabels.map(s=>s.title),n=e.labels.filter(s=>!r.includes(s)).map(s=>({title:s}));t.assetLabels.push(...n)},L=zt.FtReduxStore.get({name:va,reducers:Aa,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(j).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Hr=class{constructor(e=new Vt,r=new qt){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=m.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new jt,this.savedSearchesService=new Bt,m.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=m.getState();(0,zt.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),L.actions.clearAssetCount(),L.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),L.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),L.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();L.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();L.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&L.getState().assetCounts.allAsset[e]!==r.count&&L.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&L.getState().assetCounts.bookmarkByMap[e]!==r.count&&L.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(L.getState().assetCounts.bookmarkByMap).length!==0;e===j.BOOKMARKS&&r&&L.actions.clearBookmarkCountByMap(),L.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;L.actions.bookmarks(r)}}},xa=new Hr;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=xa);var Br=class{addCommand(e,r=!1){m.commands.add(e,r)}consumeCommand(e){return m.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Br;var V=y(x());var ci,Pe=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},ba=Symbol("clearAfterUnitTest"),Kt=class extends(0,V.withEventBus)(F){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[ci]=()=>{this.defaultMessages={},this.cache=new V.CacheRegistry,this.listeners={}},this.currentUiLocale=m.getState().uiLocale,m.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=m.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var n;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let s={...(n=this.defaultMessages[e])!==null&&n!==void 0?n:{},...r};(0,V.deepEqual)(this.defaultMessages[e],s)||(this.defaultMessages[e]=s,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,n;return this.fetchContext(e),(n=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(e,r){let n=e.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(e,r,...n){var s;let i=e.toLowerCase(),o=this.resolveContext(i);return new V.ParametrizedLabelResolver((s=this.defaultMessages[i])!==null&&s!==void 0?s:{},o).resolve(r,...n)}async fetchContext(e){let r=!this.cache.has(e),n;try{n=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(s){!(s instanceof V.CanceledPromiseError)&&r&&console.error(s)}return n}subscribe(e,r){var n;return e=e.toLowerCase(),this.listeners[e]=(n=this.listeners[e])!==null&&n!==void 0?n:new Set,this.listeners[e].add(r),()=>{var s;return(s=this.listeners[e])===null||s===void 0?void 0:s.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new Pe({loadedContexts:e})),this.dispatchEvent(new Pe({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new Pe({loadedContexts:[e]})),this.dispatchEvent(new Pe({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(n=>(0,V.delay)(0).then(()=>n()).catch(()=>null)))}};ci=ba;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Kt{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Kt{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Fe=window.FluidTopicsI18nService,Wt=window.FluidTopicsCustomI18nService;var li=y(x()),jr=class{highlightHtml(e,r,n){(0,li.highlightHtml)(e,r,n)}};window.FluidTopicsHighlightHtmlService=new jr;var ui=y(x());var Vr=class{isDate(e){var r,n,s,i;return(i=(n=((s=(r=m.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&s!==void 0?s:[]).find(a=>a.key===e))===null||n===void 0?void 0:n.date)!==null&&i!==void 0?i:!1}format(e,r){var n,s,i,o;if(e==null)return"";try{return ui.DateFormatter.format(e,(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(e)} is not valid`,a),a}}};window.FluidTopicsDateService=new Vr;var di=y(x());var rt=class{static get(e,r,{baseUrl:n,localesConfiguration:s,availableContentLocales:i}=m.getState()){var o;if(!r||i.length>0&&!i.some(a=>a.lang===r)){let a=s?.defaultLocales.defaultContentLocale;r=a?`${a.lang}-${a.region}`:(o=i[0])===null||o===void 0?void 0:o.lang}return new di.SearchPlaceConverter(n,e??20,s?.allLanguagesAllowed,r,i)}};var qr=class{urlToSearchRequest(e){return rt.get().parse(e)}searchRequestToUrl(e){return rt.get().serialize(e)}};window.FluidTopicsUrlService=new qr;var Z=y(x());var pe=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{nextLocation:e}})}};pe.eventName="before-location-change";var he=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};he.eventName="change";var zr=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let r=sessionStorage.getItem(this.itemName(e));return r?JSON.parse(r):void 0}set(e,r){sessionStorage.setItem(this.itemName(e),JSON.stringify(r))}},pi=new zr;var Gt=class t extends Z.WithEventBus{static build(){return new t(window.history,pi,()=>window.location,!1)}constructor(e,r,n,s){var i,o;super(),this.history=e,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(o=(i=e.state)===null||i===void 0?void 0:i.index)!==null&&o!==void 0?o:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(s)}setCurrentState(e,r=!1){let n=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Z.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new he(this.currentItem())),0)}installProxies(){let e=r=>(n,s,[i,o,a])=>{let c=new URL(typeof a=="string"?a:(a??this.windowLocation()).href,window.location.origin!=="null"?window.location.origin:void 0),l=new pe(c);this.dispatchEvent(l);let u=r(),d={...u===this.currentIndex?this.currentState:void 0,...i,index:u,href:l.detail.nextLocation.href};n.apply(s,[d,o,d.href]),this.setCurrentState(d,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let n={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addBeforeLocationChangeListener(e){this.addEventListener(pe.eventName,e)}removeBeforeLocationChangeListener(e){this.removeEventListener(pe.eventName,e)}addHistoryChangeListener(e){this.addEventListener(he.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(he.eventName,e)}currentItem(){return(0,Z.deepCopy)(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,Z.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,Z.deepCopy)(r.find(n=>e(n)))}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return(0,Z.deepCopy)(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let n=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!n)return e;let s=e,i=e+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(s=i),i++;return s}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var n;if(!this.hasState(e))return!1;let s=r??this.currentState.majorStateId,i=(n=this.states[e])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=s}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Gt.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:t=>window.FluidTopicsInternalHistoryService.backwardItemMatching(t),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t),addBeforeLocationChangeListener:t=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(t),removeBeforeLocationChangeListener:t=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(t)});var hi=y(X());var fi=hi.css`
|
|
5
|
+
`;var Dr=y(B());var _n=y(B(),1);var pr=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)},Eo=t=>({fromAttribute:e=>{if(e==null)return ze(t);try{return JSON.parse(e)}catch{return ze(t)}},toAttribute:e=>JSON.stringify(e)});function Cn(t,e){return(0,_n.property)({type:Object,converter:Eo(t),hasChanged:Ke,...e??{}})}function vo(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let r,n;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(n=r;n--!==0;)if(!Ie(t[n],e[n]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;for(n of t.entries())if(!Ie(n[1],e.get(n[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let s=o=>Object.keys(o).filter(a=>o[a]!=null),i=s(t);if(r=i.length,r!==s(e).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[n]))return!1;for(n=r;n--!==0;){let o=i[n];if(!Ie(t[o],e[o]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function Ie(t,e){try{return vo(t,e)}catch{return!1}}function Ke(t,e){return!Ie(t,e)}function ze(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function ut(t,e){let r=n=>n[t]===!0;return n=>{if(r(n))return n;let s=e(n);return s[t]=!0,s}}var wn=y(B(),1);var hr=t=>{let e=t??{};return(r,n)=>{var s;let i={hasChanged:Ke,attribute:!1,...e};(0,wn.property)(i)(r,n);let o=r.constructor;o.reduxProperties=new Map(o.reduxProperties),o.reduxProperties.set(n,{selector:(s=e.selector)!==null&&s!==void 0?s:(a=>a[n]),store:e.store})}};var dt=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(n=>n.type===e);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}};var ce=y(B(),1);var pt=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,r){return this.callbacks=[e],this.debounce(r)}queue(e,r){return this.callbacks.push(e),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,r;let n=[...this.callbacks];this.callbacks=[];let s=(e=this.rejectPromise)!==null&&e!==void 0?e:(()=>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 ft=y(X(),1);var ht=class extends ft.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let e=this.scopedRegistryConstructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,e.defineScopedElements(e.elementDefinitions));let r={...e.shadowRootOptions,customElements:e.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return(0,ft.adoptStyles)(n,e.elementStyles),n}static canDefineScopedElement(e){return!!this.registry&&!this.registry.get(e)}static defineScopedElements(e){Object.entries(e).forEach(([r,n])=>this.defineScopedElement(r,n))}static defineScopedElement(e,r){pr(e)(r),this.canDefineScopedElement(e)&&this.registry.define(e,r)}canDefineScopedElement(e){return this.scopedRegistryConstructor.canDefineScopedElement(e)}defineScopedElements(e){this.scopedRegistryConstructor.defineScopedElements(e)}defineScopedElement(e,r){this.scopedRegistryConstructor.defineScopedElement(e,r)}};function Tn(t,e,...r){var n;let s=t.querySelector(e);for(let i of r)s=(n=s?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return s}var Me=function(t,e,r,n){var s=arguments.length,i=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(i=(s<3?o(i):s>3?o(e,r,i):o(e,r))||i);return s>3&&i&&Object.defineProperty(e,r,i),i},kn,On=Symbol("constructorPrototype"),Rn=Symbol("constructorName"),Mn=Symbol("exportpartsDebouncer"),In=Symbol("dynamicDependenciesLoaded"),ke=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};ke.eventName="exportparts-updated";var W=class extends ht{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[kn]=new pt(5),this.scheduleExportpartsUpdate=()=>{var e,r,n;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[Mn].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[Rn]=this.constructor.name,this[On]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Rn]&&Object.setPrototypeOf(this,this[On])}connectedCallback(){var e;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[In]||(r[In]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(ke.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(ke.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate(),e.has("exportparts")&&this.dispatchEvent(new ke)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:s}=this.elementToFocus;if(n!=null){let i=[...s??[],n];r=Tn(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){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(e.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(e){var r,n,s,i,o,a;let c=h=>h!=null&&h.trim().length>0,l=e.filter(c).map(h=>h.trim());if(l.length===0){this.exportparts=void 0;return}let u=new Set;for(let h of(i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&i!==void 0?i:[]){let g=(o=(n=h.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&o!==void 0?o:[],A=(a=(s=h.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(v=>v.split(":")[1]))!==null&&a!==void 0?a:[],O=[...g,...A].filter(c).map(v=>v.trim());for(let v of O)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(", ")}};kn=Mn;Me([(0,ce.property)()],W.prototype,"exportpartsPrefix",void 0);Me([Cn([])],W.prototype,"exportpartsPrefixes",void 0);Me([(0,ce.property)({reflect:!0})],W.prototype,"exportparts",void 0);Me([(0,ce.property)()],W.prototype,"customStylesheet",void 0);Me([(0,ce.property)()],W.prototype,"elementToFocus",void 0);Me([(0,ce.state)()],W.prototype,"useAdoptedStyleSheets",void 0);function yt(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var We=Symbol("internalReduxEventsUnsubscribers"),re=Symbol("internalStoresUnsubscribers"),le=Symbol("internalStores"),Ao=ut(Symbol("withRedux"),function(t){var e,r,n;class s extends t{constructor(){super(...arguments),this[e]=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[le].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[le].values()][0]}getStore(o){return o==null?this.getUnnamedStore():this[le].get(o)}addStore(o,a){var c;a=(c=a??o.name)!==null&&c!==void 0?c:"default-store",this.unsubscribeFromStore(a),this[le].set(a,o),this.subscribeToStore(a,o),this.updateFromStores()}removeStore(o){let a=typeof o=="string"?o:o.name;this.unsubscribeFromStore(a),this[le].delete(a)}setupStores(){this.unsubscribeFromStores(),this[le].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[re].has(o.store):this[re].size>0)&&(this[a]=o.selector(l.getState(),this))}})}subscribeToStore(o,a){var c,l;this[re].set(o,a.subscribe(()=>this.updateFromStores())),this[We].set(o,[]),yt(a)&&(!((c=a.deprecatedKeys)===null||c===void 0)&&c.length&&this.reduxConstructor.reduxProperties.forEach((u,d)=>{this.getStore(u.store)===a&&a.deprecatedKeys.includes(d)&&console.warn("Element",this,"is subscribed to deprecated key",d,"in store",a.name)}),a.eventBus&&((l=this.reduxConstructor.reduxEventListeners)===null||l===void 0||l.forEach((u,d)=>{if(typeof this[d]=="function"&&(!u.store||a.name===u.store)){let h=g=>this[d](g);a.addEventListener(u.eventName,h),this[We].get(o).push(()=>a.removeEventListener(u.eventName,h))}}))),this.onStoreAvailable(o)}unsubscribeFromStores(){this[re].forEach((o,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(o){var a;this[re].has(o)&&this[re].get(o)(),this[re].delete(o),(a=this[We].get(o))===null||a===void 0||a.forEach(c=>c()),this[We].delete(o)}onStoreAvailable(o){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=re,r=le,n=We,s.reduxProperties=new Map,s.reduxReactiveProperties=new Set,s.reduxEventListeners=new Map,s}),Dn=class extends Ao(W){};function k(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 xo=typeof Symbol=="function"&&Symbol.observable||"@@observable",Nn=xo,fr=()=>Math.random().toString(36).substring(7).split("").join("."),bo={INIT:`@@redux/INIT${fr()}`,REPLACE:`@@redux/REPLACE${fr()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${fr()}`},mt=bo;function gt(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 yr(t,e,r){if(typeof t!="function")throw new Error(k(2));if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(k(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(k(1));return r(yr)(t,e)}let n=t,s=e,i=new Map,o=i,a=0,c=!1;function l(){o===i&&(o=new Map,i.forEach((v,R)=>{o.set(R,v)}))}function u(){if(c)throw new Error(k(3));return s}function d(v){if(typeof v!="function")throw new Error(k(4));if(c)throw new Error(k(5));let R=!0;l();let U=a++;return o.set(U,v),function(){if(R){if(c)throw new Error(k(6));R=!1,l(),o.delete(U),i=null}}}function h(v){if(!gt(v))throw new Error(k(7));if(typeof v.type>"u")throw new Error(k(8));if(typeof v.type!="string")throw new Error(k(17));if(c)throw new Error(k(9));try{c=!0,s=n(s,v)}finally{c=!1}return(i=o).forEach(U=>{U()}),v}function g(v){if(typeof v!="function")throw new Error(k(10));n=v,h({type:mt.REPLACE})}function A(){let v=d;return{subscribe(R){if(typeof R!="object"||R===null)throw new Error(k(11));function U(){let E=R;E.next&&E.next(u())}return U(),{unsubscribe:v(U)}},[Nn](){return this}}}return h({type:mt.INIT}),{dispatch:h,subscribe:d,getState:u,replaceReducer:g,[Nn]:A}}function _o(t){Object.keys(t).forEach(e=>{let r=t[e];if(typeof r(void 0,{type:mt.INIT})>"u")throw new Error(k(12));if(typeof r(void 0,{type:mt.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(k(13))})}function mr(t){let e=Object.keys(t),r={};for(let o=0;o<e.length;o++){let a=e[o];typeof t[a]=="function"&&(r[a]=t[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],A=a[h],O=g(A,c);if(typeof O>"u"){let v=c&&c.type;throw new Error(k(14))}u[h]=O,l=l||O!==A}return l=l||n.length!==Object.keys(a).length,l?u:a}}function Ge(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,r)=>(...n)=>e(r(...n)))}function Ln(...t){return e=>(r,n)=>{let s=e(r,n),i=()=>{throw new Error(k(15))},o={getState:s.getState,dispatch:(c,...l)=>i(c,...l)},a=t.map(c=>c(o));return i=Ge(...a)(s.dispatch),{...s,dispatch:i}}}function Pn(t){return gt(t)&&"type"in t&&typeof t.type=="string"}var zn=Symbol.for("immer-nothing"),Fn=Symbol.for("immer-draftable"),D=Symbol.for("immer-state");function K(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var $=Object,Ne=$.getPrototypeOf,At="constructor",Tt="prototype",vr="configurable",xt="enumerable",Et="writable",Qe="value",G=t=>!!t&&!!t[D];function H(t){return t?Kn(t)||Rt(t)||!!t[Fn]||!!t[At]?.[Fn]||It(t)||Ze(t):!1}var Co=$[Tt][At].toString(),Un=new WeakMap;function Kn(t){if(!t||!Or(t))return!1;let e=Ne(t);if(e===null||e===$[Tt])return!0;let r=$.hasOwnProperty.call(e,At)&&e[At];if(r===Object)return!0;if(!De(r))return!1;let n=Un.get(r);return n===void 0&&(n=Function.toString.call(r),Un.set(r,n)),n===Co}function Ot(t,e,r=!0){Je(t)===0?(r?Reflect.ownKeys(t):$.keys(t)).forEach(s=>{e(s,t[s],t)}):t.forEach((n,s)=>e(s,n,t))}function Je(t){let e=t[D];return e?e.type_:Rt(t)?1:It(t)?2:Ze(t)?3:0}var gr=(t,e,r=Je(t))=>r===2?t.has(e):$[Tt].hasOwnProperty.call(t,e),Ar=(t,e,r=Je(t))=>r===2?t.get(e):t[e],bt=(t,e,r,n=Je(t))=>{n===2?t.set(e,r):n===3?t.add(r):t[e]=r};function wo(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}var Rt=Array.isArray,It=t=>t instanceof Map,Ze=t=>t instanceof Set,Or=t=>typeof t=="object",De=t=>typeof t=="function",Sr=t=>typeof t=="boolean";function To(t){let e=+t;return Number.isInteger(e)&&String(e)===t}var J=t=>t.copy_||t.base_;var Rr=t=>t.modified_?t.copy_:t.base_;function xr(t,e){if(It(t))return new Map(t);if(Ze(t))return new Set(t);if(Rt(t))return Array[Tt].slice.call(t);let r=Kn(t);if(e===!0||e==="class_only"&&!r){let n=$.getOwnPropertyDescriptors(t);delete n[D];let s=Reflect.ownKeys(n);for(let i=0;i<s.length;i++){let o=s[i],a=n[o];a[Et]===!1&&(a[Et]=!0,a[vr]=!0),(a.get||a.set)&&(n[o]={[vr]:!0,[Et]:!0,[xt]:a[xt],[Qe]:t[o]})}return $.create(Ne(t),n)}else{let n=Ne(t);if(n!==null&&r)return{...t};let s=$.create(n);return $.assign(s,t)}}function kt(t,e=!1){return Mt(t)||G(t)||!H(t)||(Je(t)>1&&$.defineProperties(t,{set:St,add:St,clear:St,delete:St}),$.freeze(t),e&&Ot(t,(r,n)=>{kt(n,!0)},!1)),t}function Oo(){K(2)}var St={[Qe]:Oo};function Mt(t){return t===null||!Or(t)?!0:$.isFrozen(t)}var _t="MapSet",br="Patches",$n="ArrayMethods",Wn={};function ue(t){let e=Wn[t];return e||K(0,t),e}var Hn=t=>!!Wn[t];var Ye,Gn=()=>Ye,Ro=(t,e)=>({drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Hn(_t)?ue(_t):void 0,arrayMethodsPlugin_:Hn($n)?ue($n):void 0});function Bn(t,e){e&&(t.patchPlugin_=ue(br),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function _r(t){Cr(t),t.drafts_.forEach(Io),t.drafts_=null}function Cr(t){t===Ye&&(Ye=t.parent_)}var jn=t=>Ye=Ro(Ye,t);function Io(t){let e=t[D];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function Vn(t,e){e.unfinalizedDrafts_=e.drafts_.length;let r=e.drafts_[0];if(t!==void 0&&t!==r){r[D].modified_&&(_r(e),K(4)),H(t)&&(t=qn(e,t));let{patchPlugin_:s}=e;s&&s.generateReplacementPatches_(r[D].base_,t,e)}else t=qn(e,r);return ko(e,t,!0),_r(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==zn?t:void 0}function qn(t,e){if(Mt(e))return e;let r=e[D];if(!r)return Ct(e,t.handledSet_,t);if(!Dt(r,t))return e;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(t);Xn(r,t)}return r.copy_}function ko(t,e,r=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&kt(e,r)}function Qn(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}var Dt=(t,e)=>t.scope_===e,Mo=[];function Yn(t,e,r,n){let s=J(t),i=t.type_;if(n!==void 0&&Ar(s,n,i)===e){bt(s,n,r,i);return}if(!t.draftLocations_){let a=t.draftLocations_=new Map;Ot(s,(c,l)=>{if(G(l)){let u=a.get(l)||[];u.push(c),a.set(l,u)}})}let o=t.draftLocations_.get(e)??Mo;for(let a of o)bt(s,a,r,i)}function Do(t,e,r){t.callbacks_.push(function(s){let i=e;if(!i||!Dt(i,s))return;s.mapSetPlugin_?.fixSetContents(i);let o=Rr(i);Yn(t,i.draft_??i,o,r),Xn(i,s)})}function Xn(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 s=n.getPath(t);s&&n.generatePatches_(t,s,e)}Qn(t)}}function No(t,e,r){let{scope_:n}=t;if(G(r)){let s=r[D];Dt(s,n)&&s.callbacks_.push(function(){vt(t);let o=Rr(s);Yn(t,r,o,e)})}else H(r)&&t.callbacks_.push(function(){let i=J(t);t.type_===3?i.has(r)&&Ct(r,n.handledSet_,n):Ar(i,e,t.type_)===r&&n.drafts_.length>1&&(t.assigned_.get(e)??!1)===!0&&t.copy_&&Ct(Ar(t.copy_,e,t.type_),n.handledSet_,n)})}function Ct(t,e,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||G(t)||e.has(t)||!H(t)||Mt(t)||(e.add(t),Ot(t,(n,s)=>{if(G(s)){let i=s[D];if(Dt(i,r)){let o=Rr(i);bt(t,n,o,t.type_),Qn(i)}}else H(s)&&Ct(s,e,r)})),t}function Lo(t,e){let r=Rt(t),n={type_:r?1:0,scope_:e?e.scope_:Gn(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},s=n,i=wt;r&&(s=[n],i=Xe);let{revoke:o,proxy:a}=Proxy.revocable(s,i);return n.draft_=a,n.revoke_=o,[a,n]}var wt={get(t,e){if(e===D)return t;let r=t.scope_.arrayMethodsPlugin_,n=t.type_===1&&typeof e=="string";if(n&&r?.isArrayOperationMethod(e))return r.createMethodInterceptor(t,e);let s=J(t);if(!gr(s,e,t.type_))return Fo(t,s,e);let i=s[e];if(t.finalized_||!H(i)||n&&t.operationMethod&&r?.isMutatingArrayMethod(t.operationMethod)&&To(e))return i;if(i===Er(t.base_,e)||Po(t,e,i)){vt(t);let o=t.type_===1?+e:e,a=Tr(t.scope_,i,t,o);return t.copy_[o]=a}return i},has(t,e){return e in J(t)},ownKeys(t){return Reflect.ownKeys(J(t))},set(t,e,r){let n=Jn(J(t),e);if(n?.set)return n.set.call(t.draft_,r),!0;if(!t.modified_){let s=Er(J(t),e),i=s?.[D];if(i&&i.base_===r)return t.copy_[e]=r,t.assigned_.delete(e),!0;if(wo(r,s)&&(r!==void 0||gr(t.base_,e,t.type_)))return!0;vt(t),wr(t)}return t.copy_[e]===r&&(r!==void 0||gr(t.copy_,e,t.type_))||Number.isNaN(r)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=r,t.assigned_.set(e,!0),No(t,e,r)),!0},deleteProperty(t,e){return vt(t),Er(t.base_,e)!==void 0||e in t.base_?(t.assigned_.set(e,!1),wr(t)):t.assigned_.delete(e),t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){let r=J(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{[Et]:!0,[vr]:t.type_!==1||e!=="length",[xt]:n[xt],[Qe]:r[e]}},defineProperty(){K(11)},getPrototypeOf(t){return Ne(t.base_)},setPrototypeOf(){K(12)}},Xe={};for(let t in wt){let e=wt[t];Xe[t]=function(){let r=arguments;return r[0]=r[0][0],e.apply(this,r)}}Xe.deleteProperty=function(t,e){return Xe.set.call(this,t,e,void 0)};Xe.set=function(t,e,r){return wt.set.call(this,t[0],e,r,t[0])};function Er(t,e){let r=t[D];return(r?J(r):t)[e]}function Po(t,e,r){return t.type_!==1||!t.allIndicesReassigned_||!H(r)||r[D]?!1:t.baseRefs_.has(r)}function Fo(t,e,r){let n=Jn(e,r);return n?Qe in n?n[Qe]:n.get?.call(t.draft_):void 0}function Jn(t,e){if(!(e in t))return;let r=Ne(t);for(;r;){let n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Ne(r)}}function wr(t){t.modified_||(t.modified_=!0,t.parent_&&wr(t.parent_))}function vt(t){t.copy_||(t.assigned_=new Map,t.copy_=xr(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var Uo=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,r,n)=>{if(De(e)&&!De(r)){let i=r;r=e;let o=this;return function(c=i,...l){return o.produce(c,u=>r.call(this,u,...l))}}De(r)||K(6),n!==void 0&&!De(n)&&K(7);let s;if(H(e)){let i=jn(this),o=Tr(i,e,void 0),a=!0;try{s=r(o),a=!1}finally{a?_r(i):Cr(i)}return Bn(i,n),Vn(s,i)}else if(!e||!Or(e)){if(s=r(e),s===void 0&&(s=e),s===zn&&(s=void 0),this.autoFreeze_&&kt(s,!0),n){let i=[],o=[];ue(br).generateReplacementPatches_(e,s,{patches_:i,inversePatches_:o}),n(i,o)}return s}else K(1,e)},this.produceWithPatches=(e,r)=>{if(De(e))return(o,...a)=>this.produceWithPatches(o,c=>e(c,...a));let n,s;return[this.produce(e,r,(o,a)=>{n=o,s=a}),n,s]},Sr(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Sr(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Sr(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){H(t)||K(8),G(t)&&(t=Zn(t));let e=jn(this),r=Tr(e,t,void 0);return r[D].isManual_=!0,Cr(e),r}finishDraft(t,e){let r=t&&t[D];(!r||!r.isManual_)&&K(9);let{scope_:n}=r;return Bn(n,e),Vn(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 r;for(r=e.length-1;r>=0;r--){let s=e[r];if(s.path.length===0&&s.op==="replace"){t=s.value;break}}r>-1&&(e=e.slice(r+1));let n=ue(br).applyPatches_;return G(t)?n(t,e):this.produce(t,s=>n(s,e))}};function Tr(t,e,r,n){let[s,i]=It(e)?ue(_t).proxyMap_(e,r):Ze(e)?ue(_t).proxySet_(e,r):Lo(e,r);return(r?.scope_??Gn()).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 Zn(t){return G(t)||K(10,t),es(t)}function es(t){if(!H(t)||Mt(t))return t;let e=t[D],r,n=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,r=xr(t,e.scope_.immer_.useStrictShallowCopy_),n=e.scope_.immer_.shouldUseStrictIteration()}else r=xr(t,!0);let s=r;return Ze(r)&&(r=new Set),Ot(s,(i,o)=>{bt(r,i,es(o))},n),e&&(e.finalized_=!1),r}var $o=globalThis.Iterator,Ec=typeof $o?.from=="function";var Ho=new Uo,Ir=Ho.produce;function ts(t){return({dispatch:r,getState:n})=>s=>i=>typeof i=="function"?i(r,n,t):s(i)}var rs=ts(),ns=ts;var Bo=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ge:Ge.apply(null,arguments)};typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var jo=t=>t&&typeof t.match=="function";function ne(t,e){function r(...n){if(e){let s=e(...n);if(!s)throw new Error(Q(0));return{type:t,payload:s.payload,..."meta"in s&&{meta:s.meta},..."error"in s&&{error:s.error}}}return{type:t,payload:n[0]}}return r.toString=()=>`${t}`,r.type=t,r.match=n=>Pn(n)&&n.type===t,r}var cs=class et extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,et.prototype)}static get[Symbol.species](){return et}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new et(...e[0].concat(this)):new et(...e.concat(this))}};function ss(t){return H(t)?Ir(t,()=>{}):t}function Nt(t,e,r){return t.has(e)?t.get(e):t.set(e,r(e)).get(e)}function Vo(t){return typeof t=="boolean"}var qo=()=>function(e){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:s=!0,actionCreatorCheck:i=!0}=e??{},o=new cs;return r&&(Vo(r)?o.push(rs):o.push(ns(r.extraArgument))),o},zo="RTK_autoBatch";var is=t=>e=>{setTimeout(e,t)},Ko=(t,e)=>r=>{let n=!1,s,i,o=()=>{n||(n=!0,cancelAnimationFrame(s),clearTimeout(i),r())};s=t(o),i=setTimeout(o,e)},Wo=(t={type:"raf"})=>e=>(...r)=>{let n=e(...r),s=!0,i=!1,o=!1,a=new Set,c=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?Ko(window.requestAnimationFrame,100):is(10):t.type==="callback"?t.queueNotification:is(t.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=t=>function(r){let{autoBatch:n=!0}=r??{},s=new cs(t);return n&&s.push(Wo(typeof n=="object"?n:void 0)),s};function ls(t){let e=qo(),{reducer:r=void 0,middleware:n,devTools:s=!0,duplicateMiddlewareCheck:i=!0,preloadedState:o=void 0,enhancers:a=void 0}=t||{},c;if(typeof r=="function")c=r;else if(gt(r))c=mr(r);else throw new Error(Q(1));let l;typeof n=="function"?l=n(e):l=e();let u=Ge;s&&(u=Bo({trace:!1,...typeof s=="object"&&s}));let d=Ln(...l),h=Go(d),g=typeof a=="function"?a(h):h(),A=u(...g);return yr(c,o,A)}function us(t){let e={},r=[],n,s={addCase(i,o){let a=typeof i=="string"?i:i.type;if(!a)throw new Error(Q(28));if(a in e)throw new Error(Q(29));return e[a]=o,s},addAsyncThunk(i,o){return o.pending&&(e[i.pending.type]=o.pending),o.rejected&&(e[i.rejected.type]=o.rejected),o.fulfilled&&(e[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 t(s),[e,r,n]}function Qo(t){return typeof t=="function"}function Yo(t,e){let[r,n,s]=us(e),i;if(Qo(t))i=()=>ss(t());else{let a=ss(t);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 h=d(u,c);return h===void 0?u:h}else{if(H(u))return Ir(u,h=>d(h,c));{let h=d(u,c);if(h===void 0){if(u===null)return u;throw new Error(Q(9))}return h}}return u},a)}return o.getInitialState=i,o}var Xo=(t,e)=>jo(t)?t.match(e):t(e);function Jo(...t){return e=>t.some(r=>Xo(r,e))}var Zo="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ea=(t=21)=>{let e="",r=t;for(;r--;)e+=Zo[Math.random()*64|0];return e},ta=["name","message","stack","code"],kr=class{payload;meta;_type;constructor(t,e){this.payload=t,this.meta=e}},os=class{payload;meta;_type;constructor(t,e){this.payload=t,this.meta=e}},ra=t=>{if(typeof t=="object"&&t!==null){let e={};for(let r of ta)typeof t[r]=="string"&&(e[r]=t[r]);return e}return{message:String(t)}},as="External signal was aborted",na=(()=>{function t(e,r,n){let s=ne(e+"/fulfilled",(c,l,u,d)=>({payload:c,meta:{...d||{},arg:u,requestId:l,requestStatus:"fulfilled"}})),i=ne(e+"/pending",(c,l,u)=>({payload:void 0,meta:{...u||{},arg:l,requestId:c,requestStatus:"pending"}})),o=ne(e+"/rejected",(c,l,u,d,h)=>({payload:d,error:(n&&n.serializeError||ra)(c||"Rejected"),meta:{...h||{},arg:u,requestId:l,rejectedWithValue:d!==void 0,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(),A=new AbortController,O,v;function R(S){v=S,A.abort()}l&&(l.aborted?R(as):l.addEventListener("abort",()=>R(as),{once:!0}));let U=(async function(){let S;try{let E=n?.condition?.(c,{getState:d,extra:h});if(ia(E)&&(E=await E),E===!1)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};if(A.signal.aborted)throw{name:"AbortError",message:v||"Aborted"};let I=new Promise((C,M)=>{O=()=>{M({name:"AbortError",message:v||"Aborted"})},A.signal.addEventListener("abort",O,{once:!0})});u(i(g,c,n?.getPendingMeta?.({requestId:g,arg:c},{getState:d,extra:h}))),S=await Promise.race([I,Promise.resolve(r(c,{dispatch:u,getState:d,extra:h,requestId:g,signal:A.signal,abort:R,rejectWithValue:((C,M)=>new kr(C,M)),fulfillWithValue:((C,M)=>new os(C,M))})).then(C=>{if(C instanceof kr)throw C;return C instanceof os?s(C.payload,g,c,C.meta):s(C,g,c)})])}catch(E){S=E instanceof kr?o(null,g,c,E.payload,E.meta):o(E,g,c)}finally{O&&A.signal.removeEventListener("abort",O)}return n&&!n.dispatchConditionRejection&&o.match(S)&&S.meta.condition||u(S),S})();return Object.assign(U,{abort:R,requestId:g,arg:c,unwrap(){return U.then(sa)}})}}return Object.assign(a,{pending:i,rejected:o,fulfilled:s,settled:Jo(o,s),typePrefix:e})}return t.withTypes=()=>t,t})();function sa(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function ia(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var ds=Symbol.for("rtk-slice-createasyncthunk"),Tc={[ds]:na};function oa(t,e){return`${t}/${e}`}function aa({creators:t}={}){let e=t?.asyncThunk?.[ds];return function(n){let{name:s,reducerPath:i=s}=n;if(!s)throw new Error(Q(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,E){let I=typeof S=="string"?S:S.type;if(!I)throw new Error(Q(12));if(I in c.sliceCaseReducersByType)throw new Error(Q(13));return c.sliceCaseReducersByType[I]=E,l},addMatcher(S,E){return c.sliceMatchers.push({matcher:S,reducer:E}),l},exposeAction(S,E){return c.actionCreators[S]=E,l},exposeCaseReducer(S,E){return c.sliceCaseReducersByName[S]=E,l}};a.forEach(S=>{let E=o[S],I={reducerName:S,type:oa(s,S),createNotation:typeof n.reducers=="function"};da(E)?ha(I,E,l,e):ua(I,E,l)});function u(){let[S={},E=[],I=void 0]=typeof n.extraReducers=="function"?us(n.extraReducers):[n.extraReducers],C={...S,...c.sliceCaseReducersByType};return Yo(n.initialState,M=>{for(let N in C)M.addCase(N,C[N]);for(let N of c.sliceMatchers)M.addMatcher(N.matcher,N.reducer);for(let N of E)M.addMatcher(N.matcher,N.reducer);I&&M.addDefaultCase(I)})}let d=S=>S,h=new Map,g=new WeakMap,A;function O(S,E){return A||(A=u()),A(S,E)}function v(){return A||(A=u()),A.getInitialState()}function R(S,E=!1){function I(M){let N=M[S];return typeof N>"u"&&E&&(N=Nt(g,I,v)),N}function C(M=d){return Nt(Nt(h,E,()=>new WeakMap),M,()=>{let N={};for(let[uo,po]of Object.entries(n.selectors??{}))N[uo]=ca(po,M,()=>Nt(g,M,v),E);return N})}return{reducerPath:S,getSelectors:C,get selectors(){return C(I)},selectSlice:I}}let U={name:s,reducer:O,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:v,...R(i),injectInto(S,{reducerPath:E,...I}={}){let C=E??i;return S.inject({reducerPath:C,reducer:O},I),{...U,...R(C,!0)}}};return U}}function ca(t,e,r,n){function s(i,...o){let a=e(i);return typeof a>"u"&&n&&(a=r()),t(a,...o)}return s.unwrapped=t,s}var ps=aa();function la(){function t(e,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...r}}return t.withTypes=()=>t,{reducer(e){return Object.assign({[e.name](...r){return e(...r)}}[e.name],{_reducerDefinitionType:"reducer"})},preparedReducer(e,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:r}},asyncThunk:t}}function ua({type:t,reducerName:e,createNotation:r},n,s){let i,o;if("reducer"in n){if(r&&!pa(n))throw new Error(Q(17));i=n.reducer,o=n.prepare}else i=n;s.addCase(t,i).exposeCaseReducer(e,i).exposeAction(e,o?ne(t,o):ne(t))}function da(t){return t._reducerDefinitionType==="asyncThunk"}function pa(t){return t._reducerDefinitionType==="reducerWithPrepare"}function ha({type:t,reducerName:e},r,n,s){if(!s)throw new Error(Q(18));let{payloadCreator:i,fulfilled:o,pending:a,rejected:c,settled:l,options:u}=r,d=s(t,i,u);n.exposeAction(e,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(e,{fulfilled:o||Lt,pending:a||Lt,rejected:c||Lt,settled:l||Lt})}function Lt(){}var hs="listener",fs="completed",ys="cancelled",Oc=`task-${ys}`,Rc=`task-${fs}`,Ic=`${hs}-${ys}`,kc=`${hs}-${fs}`;var{assign:ms}=Object;var Mr="listenerMiddleware";var fa=ms(ne(`${Mr}/add`),{withTypes:()=>fa}),Mc=ne(`${Mr}/removeAll`),ya=ms(ne(`${Mr}/remove`),{withTypes:()=>ya});function Q(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. `}var ma=ut(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??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)}}}),Pt=class extends ma(Object){};window.ftReduxStores||(window.ftReduxStores={});var gs=class t extends Pt{static get(e){var r;let n=typeof e=="string"?e:e.name,s=typeof e=="string"?void 0:e,i=window.ftReduxStores[n];if(yt(i))return i;if(s==null)return;let o=ps({...s,reducers:(r=s.reducers)!==null&&r!==void 0?r:{}}),a=ls({reducer:(c,l)=>{if(l.type==="CLEAR_FT_REDUX_STORE"){let u=ze(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 t(o,a,s.eventBus,s.deprecatedKeys)}constructor(e,r,n,s){super(),this.reduxSlice=e,this.reduxStore=r,this.deprecatedKeys=s,this.isFtReduxStore=!0,this.commands=new dt,this.injectInto=(o,a)=>this.reduxSlice.injectInto(o,a),this.selectSlice=o=>this.reduxSlice.selectSlice(o);let i=o=>o!=null?JSON.parse(JSON.stringify(o)):o;this.actions=new Proxy(this.reduxSlice.actions,{get:(o,a,c)=>{let l=a,u=o[l];return u?(...d)=>{let h=u(...d.map(i));return this.reduxStore.dispatch(h),h}:d=>{let h=l,g=this.getState()[h];Ie(g,d)||this.setState({[h]:i(d)})}}}),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()}};var Ft=class{static format(e,r,n,s,i){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(n,s,!!i)):this.getIntlDateTime(e,r,n,s,!!i)}static getMomentDateFormat(e,r,n){return n?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,n,s,i){let o=typeof e=="string"?new Date(e):e,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 e=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var Ut=y(x()),ga="ft-app-info",se=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};se.eventName="authentication-change";var tt=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};tt.eventName="ui-locale-changed";var Sa={session:(t,e)=>{(0,Ut.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>m.dispatchEvent(new se(e.payload)),0))}},m=Ut.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 Ss=y(x()),$t=function(t,e,r,n){var s=arguments.length,i=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(i=(s<3?o(i):s>3?o(e,r,i):o(e,r))||i);return s>3&&i&&Object.defineProperty(e,r,i),i},cl=(0,Ss.applyMixinOnce)(Symbol("withDateFormat"),function(t){class e extends t{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=>Ft.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return $t([(0,Dr.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),$t([(0,Dr.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),$t([hr({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:[]}})],e.prototype,"metadataDescriptors",void 0),$t([hr({store:m.name})],e.prototype,"uiLocale",void 0),e});var Es;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Es||(Es={}));var vs;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(vs||(vs={}));var As;(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"})(As||(As={}));var xs;(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"})(xs||(xs={}));var bs;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(bs||(bs={}));var _s;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(_s||(_s={}));var Cs;(function(t){t.PUBLISHED="PUBLISHED",t.AI="AI"})(Cs||(Cs={}));var ws;(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"})(ws||(ws={}));var Ts;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(Ts||(Ts={}));var Os;(function(t){t.METADATA_FILTER="METADATA_FILTER",t.ACCESS_RIGHTS_FILTER="ACCESS_RIGHTS_FILTER"})(Os||(Os={}));var Rs;(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",t.DOC_DIFF="DOC_DIFF"})(Rs||(Rs={}));var Is;(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"})(Is||(Is={}));var ks;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(ks||(ks={}));var Ms;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Ms||(Ms={}));var Ds;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Ds||(Ds={}));var Ns;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Ns||(Ns={}));var Ls;(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"})(Ls||(Ls={}));var Nr;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(Nr||(Nr={}));var Ps;(function(t){t.ASC="ASC",t.DESC="DESC"})(Ps||(Ps={}));var Fs;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Fs||(Fs={}));var Lr;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Lr||(Lr={}));var Us;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Us||(Us={}));var $s;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})($s||($s={}));var Hs;(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"})(Hs||(Hs={}));var Bs;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Bs||(Bs={}));var js;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(js||(js={}));var Pr;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Pr||(Pr={}));var Vs;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Vs||(Vs={}));var _;(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"})(_||(_={}));var j;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(j||(j={}));var qs;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(qs||(qs={}));var zs;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(zs||(zs={}));var Ks;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Ks||(Ks={}));var Ws;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Ws||(Ws={}));var Gs;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Gs||(Gs={}));var Qs;(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"})(Qs||(Qs={}));var Ys;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(Ys||(Ys={}));var Xs;(function(t){t.CHAT="CHAT",t.COMPLETION="COMPLETION",t.RAG="RAG",t.AGENT="AGENT"})(Xs||(Xs={}));var Js;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(Js||(Js={}));var Zs;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(Zs||(Zs={}));var ei;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(ei||(ei={}));var ti;(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"})(ti||(ti={}));var ri;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(ri||(ri={}));var Ea={[_.PERSONAL_BOOK_SHARE_USER]:[_.PERSONAL_BOOK_USER],[_.HTML_EXPORT_USER]:[_.PERSONAL_BOOK_USER],[_.PDF_EXPORT_USER]:[_.PERSONAL_BOOK_USER],[_.KHUB_ADMIN]:[_.CONTENT_PUBLISHER],[_.ADMIN]:[_.KHUB_ADMIN,_.USERS_ADMIN,_.PORTAL_ADMIN,_.BEHAVIOR_DATA_USER],[_.GENERATIVE_AI_EXPORT_USER]:[_.GENERATIVE_AI_USER]};function ni(t,e){return t===e||(Ea[t]??[]).some(r=>ni(r,e))}function Ht(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=>ni(n,e))}function si(t,...e){return t==null?!1:e.some(r=>Ht(t,r))}var zt=y(x());var Fr=y(x());var de=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:n}=m.getState(),s=e??n;if(r&&s&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,s,!0)}static await(e){return new Promise(r=>{let n=t.get(e);if(n)r(n);else{let s=m.subscribe(()=>{n=t.get(e),n&&(s(),r(n))})}})}};var Le=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:de.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):de.await()}};var F=class extends Le{constructor(e=!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 Fr.CacheRegistry,this.cache=e?s.commonCache:new Fr.CacheRegistry}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var Bt=class extends F{async listMySearches(){let{session:e}=m.getState();return Ht(e,_.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var jt=class extends F{async listMyBookmarks(){let e=m.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}};var Vt=class extends F{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=m.getState().session;return!!e?.sessionAuthenticated}};var qt=class extends F{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 e=m.getState().session;return!!e?.sessionAuthenticated}};var va="ft-user-assets",Aa={setAssetCount:(t,e)=>{let{userAssetType:r,count:n}=e.payload.assetCount;t.assetCounts.allAsset[r]=n},clearAssetCount:t=>{Object.values(j).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:n,asset:s}=e.payload;$r(t,r,[...Ur(t,r),s]),ii(t,r,1,n),oi(t,s)},editAsset:(t,e)=>{let{assetType:r,asset:n}=e.payload;$r(t,r,Ur(t,r).map(s=>s.id===n.id?n:s)),oi(t,n)},removeAsset:(t,e)=>{let{assetType:r,mapId:n,assetId:s}=e.payload;$r(t,r,Ur(t,r).filter(i=>i.id!==s)),ii(t,r,-1,n)}},ai={[j.SEARCHES]:"savedSearches",[j.BOOKMARKS]:"bookmarks",[j.BOOKS]:void 0,[j.COLLECTIONS]:void 0},Ur=(t,e)=>{var r;let n=ai[e];return n?(r=t[n])!==null&&r!==void 0?r:[]:[]},$r=(t,e,r)=>{let n=ai[e];n&&(t[n]=r)},ii=(t,e,r,n)=>{let s=t.assetCounts.allAsset[e];if(s!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,s+r),e===j.BOOKMARKS&&n)){let i=t.assetCounts.bookmarkByMap[n];t.assetCounts.bookmarkByMap[n]=Math.max(0,i+r)}},oi=(t,e)=>{let r=t.assetLabels.map(s=>s.title),n=e.labels.filter(s=>!r.includes(s)).map(s=>({title:s}));t.assetLabels.push(...n)},L=zt.FtReduxStore.get({name:va,reducers:Aa,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(j).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Hr=class{constructor(e=new Vt,r=new qt){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=m.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new jt,this.savedSearchesService=new Bt,m.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=m.getState();(0,zt.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),L.actions.clearAssetCount(),L.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),L.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),L.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();L.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();L.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&L.getState().assetCounts.allAsset[e]!==r.count&&L.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&L.getState().assetCounts.bookmarkByMap[e]!==r.count&&L.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(L.getState().assetCounts.bookmarkByMap).length!==0;e===j.BOOKMARKS&&r&&L.actions.clearBookmarkCountByMap(),L.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;L.actions.bookmarks(r)}}},xa=new Hr;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=xa);var Br=class{addCommand(e,r=!1){m.commands.add(e,r)}consumeCommand(e){return m.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Br;var V=y(x());var ci,Pe=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},ba=Symbol("clearAfterUnitTest"),Kt=class extends(0,V.withEventBus)(F){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[ci]=()=>{this.defaultMessages={},this.cache=new V.CacheRegistry,this.listeners={}},this.currentUiLocale=m.getState().uiLocale,m.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=m.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var n;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let s={...(n=this.defaultMessages[e])!==null&&n!==void 0?n:{},...r};(0,V.deepEqual)(this.defaultMessages[e],s)||(this.defaultMessages[e]=s,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,n;return this.fetchContext(e),(n=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(e,r){let n=e.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(e,r,...n){var s;let i=e.toLowerCase(),o=this.resolveContext(i);return new V.ParametrizedLabelResolver((s=this.defaultMessages[i])!==null&&s!==void 0?s:{},o).resolve(r,...n)}async fetchContext(e){let r=!this.cache.has(e),n;try{n=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(s){!(s instanceof V.CanceledPromiseError)&&r&&console.error(s)}return n}subscribe(e,r){var n;return e=e.toLowerCase(),this.listeners[e]=(n=this.listeners[e])!==null&&n!==void 0?n:new Set,this.listeners[e].add(r),()=>{var s;return(s=this.listeners[e])===null||s===void 0?void 0:s.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new Pe({loadedContexts:e})),this.dispatchEvent(new Pe({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new Pe({loadedContexts:[e]})),this.dispatchEvent(new Pe({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(n=>(0,V.delay)(0).then(()=>n()).catch(()=>null)))}};ci=ba;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Kt{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Kt{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Fe=window.FluidTopicsI18nService,Wt=window.FluidTopicsCustomI18nService;var li=y(x()),jr=class{highlightHtml(e,r,n){(0,li.highlightHtml)(e,r,n)}};window.FluidTopicsHighlightHtmlService=new jr;var ui=y(x());var Vr=class{isDate(e){var r,n,s,i;return(i=(n=((s=(r=m.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&s!==void 0?s:[]).find(a=>a.key===e))===null||n===void 0?void 0:n.date)!==null&&i!==void 0?i:!1}format(e,r){var n,s,i,o;if(e==null)return"";try{return ui.DateFormatter.format(e,(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(e)} is not valid`,a),a}}};window.FluidTopicsDateService=new Vr;var di=y(x());var rt=class{static get(e,r,{baseUrl:n,localesConfiguration:s,availableContentLocales:i}=m.getState()){var o;if(r==="all"&&s?.allLanguagesAllowed)r=void 0;else if(!r||i.length>0&&!i.some(a=>a.lang===r)){let a=s?.defaultLocales.defaultContentLocale;r=a?`${a.lang}-${a.region}`:(o=i[0])===null||o===void 0?void 0:o.lang}return new di.SearchPlaceConverter(n,e??20,s?.allLanguagesAllowed,r,i)}};var qr=class{urlToSearchRequest(e){return rt.get().parse(e)}searchRequestToUrl(e){return rt.get().serialize(e)}};window.FluidTopicsUrlService=new qr;var Z=y(x());var pe=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{nextLocation:e}})}};pe.eventName="before-location-change";var he=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};he.eventName="change";var zr=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let r=sessionStorage.getItem(this.itemName(e));return r?JSON.parse(r):void 0}set(e,r){sessionStorage.setItem(this.itemName(e),JSON.stringify(r))}},pi=new zr;var Gt=class t extends Z.WithEventBus{static build(){return new t(window.history,pi,()=>window.location,!1)}constructor(e,r,n,s){var i,o;super(),this.history=e,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(o=(i=e.state)===null||i===void 0?void 0:i.index)!==null&&o!==void 0?o:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(s)}setCurrentState(e,r=!1){let n=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Z.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new he(this.currentItem())),0)}installProxies(){let e=r=>(n,s,[i,o,a])=>{let c=new URL(typeof a=="string"?a:(a??this.windowLocation()).href,window.location.origin!=="null"?window.location.origin:void 0),l=new pe(c);this.dispatchEvent(l);let u=r(),d={...u===this.currentIndex?this.currentState:void 0,...i,index:u,href:l.detail.nextLocation.href};n.apply(s,[d,o,d.href]),this.setCurrentState(d,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let n={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addBeforeLocationChangeListener(e){this.addEventListener(pe.eventName,e)}removeBeforeLocationChangeListener(e){this.removeEventListener(pe.eventName,e)}addHistoryChangeListener(e){this.addEventListener(he.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(he.eventName,e)}currentItem(){return(0,Z.deepCopy)(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,Z.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,Z.deepCopy)(r.find(n=>e(n)))}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return(0,Z.deepCopy)(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let n=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!n)return e;let s=e,i=e+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(s=i),i++;return s}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var n;if(!this.hasState(e))return!1;let s=r??this.currentState.majorStateId,i=(n=this.states[e])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=s}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Gt.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:t=>window.FluidTopicsInternalHistoryService.backwardItemMatching(t),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t),addBeforeLocationChangeListener:t=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(t),removeBeforeLocationChangeListener:t=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(t)});var hi=y(X());var fi=hi.css`
|
|
6
6
|
`;var mi=y(X()),P=y(B()),ye=y(x());var Y=y(x());function yi(t,e){let{authenticationRequired:r,session:n}=m.getState();return r&&!n?.sessionAuthenticated?Promise.resolve(e):t()}var Qt=class extends Le{async updateUiLocale(e){return(await this.awaitApi).updateUiLocale(e)}};var Kr=class t extends Y.FtStateManager{static build(e){return new t(m,e)}constructor(e,r){super(),this.store=e,this.cache=new Y.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new Qt,this.knownContexts=new Y.AbstractRegistry,this.knownCustomComponents=new Y.AbstractRegistry,this.cleanSessionDebouncer=new Y.Debouncer,this.reloadConfiguration=()=>{var n;(n=this.cache)===null||n===void 0||n.clear("availableContentLocales"),this.updateAvailableContentLocales()},this.reloadDebouncer=new Y.Debouncer(500),this.apiProvider=r??(()=>de.get())}setWithManualResources(e){this.withManualResources=e,this.updateIfNeeded()}addListeners(){this.store.addEventListener(se.eventName,this.reloadConfiguration)}removeListeners(){this.store.removeEventListener(se.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 e=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(e)}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 e;let r=await this.cache.get("availableContentLocales",()=>yi(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((e=r.contentLocales)!==null&&e!==void 0?e:[])}setStickyFilters(e){this.store.actions.stickyFilters(e)}setBaseUrl(e){this.store.actions.baseUrl(e),window.fluidTopicsBaseUrl=e}setTenantId(e){this.store.actions.tenantId(e)}setApiIntegrationIdentifier(e){this.store.actions.apiIntegrationIdentifier(e)}setApiIntegrationAppVersion(e){this.store.actions.apiIntegrationAppVersion(e)}setUiLocale(e){this.store.actions.uiLocale(e)}setLocalesConfiguration(e){this.store.actions.localesConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(e){this.store.actions.availableContentLocales(e),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(e,r){this.userLocaleService.updateUiLocale({uiLocale:e,contentLocale:r}).then(n=>{n.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new tt(n)))}).catch(()=>{})}setMetadataConfiguration(e){this.store.actions.metadataConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setNoCustom(e){this.store.actions.noCustom(e)}setEditorMode(e){this.store.actions.editorMode(e)}setNoCustomComponent(e){this.store.actions.noCustomComponent(e)}setNoCustomCode(e){this.store.actions.noCustomCode(e)}setSession(e){this.store.actions.session(e),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(e){this.store.actions.openExternalDocumentInNewTab(e)}setNavigatorOnline(e){this.store.actions.navigatorOnline(e)}setForcedOffline(e){this.store.actions.forcedOffline(e)}setAuthenticationRequired(e){this.store.actions.authenticationRequired(e)}userHasAnyRole(...e){return si(m.getState().session,...e)}},Wr=Kr.build();var fe=class extends Event{constructor(e,r,n,s){super("context-request",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=r,this.callback=n,this.subscribe=s??!1}};var nt=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=e=>{let r=this.pendingContextRequests.get(e.context);if(r===void 0)return;this.pendingContextRequests.delete(e.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 fe(e.context,o,a,!0))}},this.onContextRequest=e=>{if(e.subscribe!==!0)return;let r=e.contextTarget??e.composedPath()[0],n=e.callback,s=this.pendingContextRequests.get(e.context);s===void 0&&this.pendingContextRequests.set(e.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(e){e.addEventListener("context-request",this.onContextRequest),e.addEventListener("context-provider",this.onContextProvider)}detach(e){e.removeEventListener("context-request",this.onContextRequest),e.removeEventListener("context-provider",this.onContextProvider)}};var w=function(t,e,r,n){var s=arguments.length,i=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(i=(s<3?o(i):s>3?o(e,r,i):o(e,r))||i);return s>3&&i&&Object.defineProperty(e,r,i),i},b=class extends ye.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=Wr,this.contextRoot=new nt}render(){return mi.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(e){var r;super.update(e),e.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),e.has("tenantId")&&this.stateManager.setTenantId(this.tenantId),e.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),e.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),e.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),e.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),e.has("noCustomCode")&&this.stateManager.setNoCustomCode(this.noCustomCode),e.has("session")&&this.stateManager.setSession(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(n=>Fe.addContext(n)),e.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),e.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),e.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};b.elementDefinitions={};b.styles=fi;w([(0,P.property)()],b.prototype,"baseUrl",void 0);w([(0,P.property)()],b.prototype,"tenantId",void 0);w([(0,P.property)()],b.prototype,"apiIntegrationIdentifier",void 0);w([(0,P.property)()],b.prototype,"apiIntegrationAppVersion",void 0);w([(0,P.property)()],b.prototype,"uiLocale",void 0);w([(0,ye.jsonProperty)(null)],b.prototype,"availableUiLocales",void 0);w([(0,ye.jsonProperty)(null)],b.prototype,"metadataConfiguration",void 0);w([(0,P.property)({type:Boolean})],b.prototype,"editorMode",void 0);w([(0,P.property)({type:Boolean})],b.prototype,"noCustom",void 0);w([(0,P.property)({type:Boolean})],b.prototype,"openExternalDocumentInNewTab",void 0);w([(0,P.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],b.prototype,"noCustomComponent",void 0);w([(0,P.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],b.prototype,"noCustomCode",void 0);w([(0,P.property)({type:Boolean})],b.prototype,"withManualResources",void 0);w([(0,P.property)({type:Boolean})],b.prototype,"navigatorOnline",void 0);w([(0,P.property)({type:Boolean})],b.prototype,"forcedOffline",void 0);w([(0,P.property)({type:Boolean})],b.prototype,"authenticationRequired",void 0);w([(0,ye.jsonProperty)([])],b.prototype,"messageContexts",void 0);w([(0,ye.jsonProperty)(void 0)],b.prototype,"session",void 0);var Si=y(x());var gi={"ft-app-context":b};(0,Si.customElements)(gi);var Yt=class t{static build(e){return new t(e)}static buildCustom(e){return new t(e,!0)}static fromGwt(e){return new t(e)}get service(){return this.custom?Wt:Fe}constructor(e,r=!1){this.name=e,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 Ue=y(x());var Ai=y(B());var Gr=class{fromLocalizableLabel(e){return e.type=="PLAIN_TEXT"?{message:e.text}:{key:e.key,custom:e.type=="LOCALIZED_CUSTOM",context:e.context,message:e.key}}fromAttribute(e){if(e!=null)try{return JSON.parse(e)}catch{if(this.isI18nKey(e)){let[r,n]=e.split(".");return{context:r,key:n,custom:r!=="officialContext",message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},Ei=new Gr;var wa=function(t,e,r,n){var s=arguments.length,i=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(i=(s<3?o(i):s>3?o(e,r,i):o(e,r))||i);return s>3&&i&&Object.defineProperty(e,r,i),i},Ta=Symbol("i18nAttributes"),Oa=Symbol("i18nListAttributes"),xi=Symbol("i18nProperties"),Xt=Symbol("i18nContexts"),st=Symbol("i18nUnsubs"),Zt=(0,Ue.applyMixinOnce)(Symbol("withI18n"),function(t){var e,r;class n extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[r]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?Wt:Fe}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(Ei.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[xi])===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[Xt].set(c,{isCustomContext:a}),this[st].has(c)||this[st].set(c,this.getI18nService(a).subscribe(c,()=>this.onI18nUpdate(c))),this.getI18nService(a).prepareContext(c,o)}hasI18nContext(i){return this[Xt].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Xt].forEach((i,o)=>this.addI18nContext(o,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[st].forEach(i=>i()),this[st].clear()}}return e=Xt,r=st,wa([(0,Ai.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),vi=class extends Zt(Ue.FtLitElement){},Jt=class extends Zt(Ue.FtLitElementRedux){};var bi=y(X());var _i=bi.css`
|