@fluid-topics/ft-reader-saved-bookmarks 2.2.39 → 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.
@@ -326,7 +326,7 @@
326
326
  ${(0,xo.unsafeHTML)(this.resolvedIcon)}
327
327
  <slot ?hidden=${r}></slot>
328
328
  </i>
329
- `}getTextContent(){var t,r;return(r=(t=this.slottedContent)===null||t===void 0?void 0:t.assignedNodes().map(n=>n.textContent).join("").trim())!==null&&r!==void 0?r:""}update(t){super.update(t),["value","variant"].some(r=>t.has(r))&&this.resolveIcon()}resolveIcon(){var t,r;let n=this.value||this.getTextContent();switch(this.variant){case Te.file_format:this.resolvedIcon=(t=h[n.replace("-","_").toUpperCase()])!==null&&t!==void 0?t:n;break;case Te.material:this.resolvedIcon=this.value||It.nothing;break;default:this.resolvedIcon=(r=pt[n.replace("-","_").toUpperCase()])!==null&&r!==void 0?r:n;break}}firstUpdated(t){super.firstUpdated(t),setTimeout(()=>this.resolveIcon())}};X.elementDefinitions={};X.styles=ho;Ut([(0,Oe.property)()],X.prototype,"variant",void 0);Ut([(0,Oe.property)()],X.prototype,"value",void 0);Ut([(0,Oe.property)({reflect:!0,attribute:"aria-hidden"})],X.prototype,"ariaHidden",void 0);Ut([(0,Oe.state)()],X.prototype,"resolvedIcon",void 0);Ut([(0,Oe.query)("slot")],X.prototype,"slottedContent",void 0);var Eo=y(C());var vo={"ft-icon":X};(0,Eo.customElements)(vo);var ri=y(z());var Ao=y(z(),1);var Mn=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)},jc=e=>({fromAttribute:t=>{if(t==null)return $t(e);try{return JSON.parse(t)}catch{return $t(e)}},toAttribute:t=>JSON.stringify(t)});function bo(e,t){return(0,Ao.property)({type:Object,converter:jc(e),hasChanged:Bt,...t??{}})}function zc(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,n;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!ft(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!ft(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let i=o=>Object.keys(o).filter(a=>o[a]!=null),s=i(e);if(r=s.length,r!==i(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[n]))return!1;for(n=r;n--!==0;){let o=s[n];if(!ft(e[o],t[o]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function ft(e,t){try{return zc(e,t)}catch{return!1}}function Bt(e,t){return!ft(e,t)}function $t(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function xr(e,t){let r=n=>n[e]===!0;return n=>{if(r(n))return n;let i=t(n);return i[e]=!0,i}}var So=y(z(),1);var In=e=>{let t=e??{};return(r,n)=>{var i;let s={hasChanged:Bt,attribute:!1,...t};(0,So.property)(s)(r,n);let o=r.constructor;o.reduxProperties=new Map(o.reduxProperties),o.reduxProperties.set(n,{selector:(i=t.selector)!==null&&i!==void 0?i:(a=>a[n]),store:t.store})}};var vr=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(n=>n.type===t);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var Je=y(z(),1);var Er=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),s=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let o of n)try{await o()}catch(a){i(a);return}s(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var br=y(V(),1);var Ar=class extends br.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let r={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return(0,br.adoptStyles)(n,t.elementStyles),n}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([r,n])=>this.defineScopedElement(r,n))}static defineScopedElement(t,r){Mn(t)(r),this.canDefineScopedElement(t)&&this.registry.define(t,r)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,r){this.scopedRegistryConstructor.defineScopedElement(t,r)}};function _o(e,t,...r){var n;let i=e.querySelector(t);for(let s of r)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(s);return i}var mt=function(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s},Oo,Co=Symbol("constructorPrototype"),wo=Symbol("constructorName"),Ro=Symbol("exportpartsDebouncer"),To=Symbol("dynamicDependenciesLoaded"),ht=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};ht.eventName="exportparts-updated";var pe=class extends Ar{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Oo]=new Er(5),this.scheduleExportpartsUpdate=()=>{var t,r,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[Ro].run(()=>{var i,s;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((s=this.exportpartsPrefixes)===null||s===void 0?void 0:s.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[wo]=this.constructor.name,this[Co]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[wo]&&Object.setPrototypeOf(this,this[Co])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let r=this.constructor;r[To]||(r[To]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(ht.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(ht.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new ht)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let s=[...i??[],n];r=_o(this.shadowRoot,...s)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,i;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(s=>s.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(s){console.error(s,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let s=document.createElement("style");s.classList.add("ft-lit-element--custom-stylesheet"),s.innerHTML=this.customStylesheet,this.shadowRoot.append(s)}}setExportpartsAttribute(t){var r,n,i,s,o,a;let c=p=>p!=null&&p.trim().length>0,l=t.filter(c).map(p=>p.trim());if(l.length===0){this.exportparts=void 0;return}let u=new Set;for(let p of(s=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&s!==void 0?s:[]){let m=(o=(n=p.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&o!==void 0?o:[],v=(a=(i=p.getAttribute("exportparts"))===null||i===void 0?void 0:i.split(",").map(x=>x.split(":")[1]))!==null&&a!==void 0?a:[],b=[...m,...v].filter(c).map(x=>x.trim());for(let x of b)u.add(x)}if(u.size===0){this.exportparts=void 0;return}let d=[...u.values()].flatMap(p=>l.map(m=>`${p}:${m}--${p}`));this.exportparts=[...this.part,...d].join(", ")}};Oo=Ro;mt([(0,Je.property)()],pe.prototype,"exportpartsPrefix",void 0);mt([bo([])],pe.prototype,"exportpartsPrefixes",void 0);mt([(0,Je.property)({reflect:!0})],pe.prototype,"exportparts",void 0);mt([(0,Je.property)()],pe.prototype,"customStylesheet",void 0);mt([(0,Je.property)()],pe.prototype,"elementToFocus",void 0);mt([(0,Je.state)()],pe.prototype,"useAdoptedStyleSheets",void 0);function Sr(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Ht=Symbol("internalReduxEventsUnsubscribers"),Re=Symbol("internalStoresUnsubscribers"),Qe=Symbol("internalStores"),Kc=xr(Symbol("withRedux"),function(e){var t,r,n;class i extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(o){super.willUpdate(o),[...this.reduxConstructor.reduxReactiveProperties].some(a=>o.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[Qe].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Qe].values()][0]}getStore(o){return o==null?this.getUnnamedStore():this[Qe].get(o)}addStore(o,a){var c;a=(c=a??o.name)!==null&&c!==void 0?c:"default-store",this.unsubscribeFromStore(a),this[Qe].set(a,o),this.subscribeToStore(a,o),this.updateFromStores()}removeStore(o){let a=typeof o=="string"?o:o.name;this.unsubscribeFromStore(a),this[Qe].delete(a)}setupStores(){this.unsubscribeFromStores(),this[Qe].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[Ht].set(o,[]),Sr(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 p=m=>this[d](m);a.addEventListener(u.eventName,p),this[Ht].get(o).push(()=>a.removeEventListener(u.eventName,p))}}))),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[Ht].get(o))===null||a===void 0||a.forEach(c=>c()),this[Ht].delete(o)}onStoreAvailable(o){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=Re,r=Qe,n=Ht,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),No=class extends Kc(pe){};function B(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Wc=typeof Symbol=="function"&&Symbol.observable||"@@observable",Lo=Wc,Un=()=>Math.random().toString(36).substring(7).split("").join("."),Gc={INIT:`@@redux/INIT${Un()}`,REPLACE:`@@redux/REPLACE${Un()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Un()}`},_r=Gc;function Cr(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function $n(e,t,r){if(typeof e!="function")throw new Error(B(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(B(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(B(1));return r($n)(e,t)}let n=e,i=t,s=new Map,o=s,a=0,c=!1;function l(){o===s&&(o=new Map,s.forEach((x,S)=>{o.set(S,x)}))}function u(){if(c)throw new Error(B(3));return i}function d(x){if(typeof x!="function")throw new Error(B(4));if(c)throw new Error(B(5));let S=!0;l();let T=a++;return o.set(T,x),function(){if(S){if(c)throw new Error(B(6));S=!1,l(),o.delete(T),s=null}}}function p(x){if(!Cr(x))throw new Error(B(7));if(typeof x.type>"u")throw new Error(B(8));if(typeof x.type!="string")throw new Error(B(17));if(c)throw new Error(B(9));try{c=!0,i=n(i,x)}finally{c=!1}return(s=o).forEach(T=>{T()}),x}function m(x){if(typeof x!="function")throw new Error(B(10));n=x,p({type:_r.REPLACE})}function v(){let x=d;return{subscribe(S){if(typeof S!="object"||S===null)throw new Error(B(11));function T(){let A=S;A.next&&A.next(u())}return T(),{unsubscribe:x(T)}},[Lo](){return this}}}return p({type:_r.INIT}),{dispatch:p,subscribe:d,getState:u,replaceReducer:m,[Lo]:v}}function qc(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:_r.INIT})>"u")throw new Error(B(12));if(typeof r(void 0,{type:_r.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(B(13))})}function Bn(e){let t=Object.keys(e),r={};for(let o=0;o<t.length;o++){let a=t[o];typeof e[a]=="function"&&(r[a]=e[a])}let n=Object.keys(r),i,s;try{qc(r)}catch(o){s=o}return function(a={},c){if(s)throw s;let l=!1,u={};for(let d=0;d<n.length;d++){let p=n[d],m=r[p],v=a[p],b=m(v,c);if(typeof b>"u"){let x=c&&c.type;throw new Error(B(14))}u[p]=b,l=l||b!==v}return l=l||n.length!==Object.keys(a).length,l?u:a}}function Ft(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function ko(...e){return t=>(r,n)=>{let i=t(r,n),s=()=>{throw new Error(B(15))},o={getState:i.getState,dispatch:(c,...l)=>s(c,...l)},a=e.map(c=>c(o));return s=Ft(...a)(i.dispatch),{...i,dispatch:s}}}function Do(e){return Cr(e)&&"type"in e&&typeof e.type=="string"}var Vo=Symbol.for("immer-nothing"),Po=Symbol.for("immer-draftable"),F=Symbol.for("immer-state");function ce(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var J=Object,gt=J.getPrototypeOf,Rr="constructor",Mr="prototype",jn="configurable",Nr="enumerable",Tr="writable",Vt="value",fe=e=>!!e&&!!e[F];function Q(e){return e?jo(e)||Ur(e)||!!e[Po]||!!e[Rr]?.[Po]||$r(e)||Wt(e):!1}var Yc=J[Mr][Rr].toString(),Mo=new WeakMap;function jo(e){if(!e||!Jn(e))return!1;let t=gt(e);if(t===null||t===J[Mr])return!0;let r=J.hasOwnProperty.call(t,Rr)&&t[Rr];if(r===Object)return!0;if(!yt(r))return!1;let n=Mo.get(r);return n===void 0&&(n=Function.toString.call(r),Mo.set(r,n)),n===Yc}function Ir(e,t,r=!0){Kt(e)===0?(r?Reflect.ownKeys(e):J.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function Kt(e){let t=e[F];return t?t.type_:Ur(e)?1:$r(e)?2:Wt(e)?3:0}var Hn=(e,t,r=Kt(e))=>r===2?e.has(t):J[Mr].hasOwnProperty.call(e,t),zn=(e,t,r=Kt(e))=>r===2?e.get(t):e[t],Lr=(e,t,r,n=Kt(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function Xc(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Ur=Array.isArray,$r=e=>e instanceof Map,Wt=e=>e instanceof Set,Jn=e=>typeof e=="object",yt=e=>typeof e=="function",Fn=e=>typeof e=="boolean";function Jc(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var Ae=e=>e.copy_||e.base_;var Qn=e=>e.modified_?e.copy_:e.base_;function Kn(e,t){if($r(e))return new Map(e);if(Wt(e))return new Set(e);if(Ur(e))return Array[Mr].slice.call(e);let r=jo(e);if(t===!0||t==="class_only"&&!r){let n=J.getOwnPropertyDescriptors(e);delete n[F];let i=Reflect.ownKeys(n);for(let s=0;s<i.length;s++){let o=i[s],a=n[o];a[Tr]===!1&&(a[Tr]=!0,a[jn]=!0),(a.get||a.set)&&(n[o]={[jn]:!0,[Tr]:!0,[Nr]:a[Nr],[Vt]:e[o]})}return J.create(gt(e),n)}else{let n=gt(e);if(n!==null&&r)return{...e};let i=J.create(n);return J.assign(i,e)}}function Br(e,t=!1){return Hr(e)||fe(e)||!Q(e)||(Kt(e)>1&&J.defineProperties(e,{set:wr,add:wr,clear:wr,delete:wr}),J.freeze(e),t&&Ir(e,(r,n)=>{Br(n,!0)},!1)),e}function Qc(){ce(2)}var wr={[Vt]:Qc};function Hr(e){return e===null||!Jn(e)?!0:J.isFrozen(e)}var kr="MapSet",Wn="Patches",Io="ArrayMethods",zo={};function Ze(e){let t=zo[e];return t||ce(0,e),t}var Uo=e=>!!zo[e];var jt,Ko=()=>jt,Zc=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Uo(kr)?Ze(kr):void 0,arrayMethodsPlugin_:Uo(Io)?Ze(Io):void 0});function $o(e,t){t&&(e.patchPlugin_=Ze(Wn),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Gn(e){qn(e),e.drafts_.forEach(el),e.drafts_=null}function qn(e){e===jt&&(jt=e.parent_)}var Bo=e=>jt=Zc(jt,e);function el(e){let t=e[F];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Ho(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(e!==void 0&&e!==r){r[F].modified_&&(Gn(t),ce(4)),Q(e)&&(e=Fo(t,e));let{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(r[F].base_,e,t)}else e=Fo(t,r);return tl(t,e,!0),Gn(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Vo?e:void 0}function Fo(e,t){if(Hr(t))return t;let r=t[F];if(!r)return Dr(t,e.handledSet_,e);if(!Fr(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);qo(r,e)}return r.copy_}function tl(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Br(t,r)}function Wo(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Fr=(e,t)=>e.scope_===t,rl=[];function Go(e,t,r,n){let i=Ae(e),s=e.type_;if(n!==void 0&&zn(i,n,s)===t){Lr(i,n,r,s);return}if(!e.draftLocations_){let a=e.draftLocations_=new Map;Ir(i,(c,l)=>{if(fe(l)){let u=a.get(l)||[];u.push(c),a.set(l,u)}})}let o=e.draftLocations_.get(t)??rl;for(let a of o)Lr(i,a,r,s)}function nl(e,t,r){e.callbacks_.push(function(i){let s=t;if(!s||!Fr(s,i))return;i.mapSetPlugin_?.fixSetContents(s);let o=Qn(s);Go(e,s.draft_??s,o,r),qo(s,i)})}function qo(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let i=n.getPath(e);i&&n.generatePatches_(e,i,t)}Wo(e)}}function il(e,t,r){let{scope_:n}=e;if(fe(r)){let i=r[F];Fr(i,n)&&i.callbacks_.push(function(){Or(e);let o=Qn(i);Go(e,r,o,t)})}else Q(r)&&e.callbacks_.push(function(){let s=Ae(e);e.type_===3?s.has(r)&&Dr(r,n.handledSet_,n):zn(s,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Dr(zn(e.copy_,t,e.type_),n.handledSet_,n)})}function Dr(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||fe(e)||t.has(e)||!Q(e)||Hr(e)||(t.add(e),Ir(e,(n,i)=>{if(fe(i)){let s=i[F];if(Fr(s,r)){let o=Qn(s);Lr(e,n,o,e.type_),Wo(s)}}else Q(i)&&Dr(i,t,r)})),e}function sl(e,t){let r=Ur(e),n={type_:r?1:0,scope_:t?t.scope_:Ko(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=n,s=Pr;r&&(i=[n],s=zt);let{revoke:o,proxy:a}=Proxy.revocable(i,s);return n.draft_=a,n.revoke_=o,[a,n]}var Pr={get(e,t){if(t===F)return e;let r=e.scope_.arrayMethodsPlugin_,n=e.type_===1&&typeof t=="string";if(n&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);let i=Ae(e);if(!Hn(i,t,e.type_))return al(e,i,t);let s=i[t];if(e.finalized_||!Q(s)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&Jc(t))return s;if(s===Vn(e.base_,t)||ol(e,t,s)){Or(e);let o=e.type_===1?+t:t,a=Xn(e.scope_,s,e,o);return e.copy_[o]=a}return s},has(e,t){return t in Ae(e)},ownKeys(e){return Reflect.ownKeys(Ae(e))},set(e,t,r){let n=Yo(Ae(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let i=Vn(Ae(e),t),s=i?.[F];if(s&&s.base_===r)return e.copy_[t]=r,e.assigned_.delete(t),!0;if(Xc(r,i)&&(r!==void 0||Hn(e.base_,t,e.type_)))return!0;Or(e),Yn(e)}return e.copy_[t]===r&&(r!==void 0||Hn(e.copy_,t,e.type_))||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),il(e,t,r)),!0},deleteProperty(e,t){return Or(e),Vn(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Yn(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Ae(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[Tr]:!0,[jn]:e.type_!==1||t!=="length",[Nr]:n[Nr],[Vt]:r[t]}},defineProperty(){ce(11)},getPrototypeOf(e){return gt(e.base_)},setPrototypeOf(){ce(12)}},zt={};for(let e in Pr){let t=Pr[e];zt[e]=function(){let r=arguments;return r[0]=r[0][0],t.apply(this,r)}}zt.deleteProperty=function(e,t){return zt.set.call(this,e,t,void 0)};zt.set=function(e,t,r){return Pr.set.call(this,e[0],t,r,e[0])};function Vn(e,t){let r=e[F];return(r?Ae(r):e)[t]}function ol(e,t,r){return e.type_!==1||!e.allIndicesReassigned_||!Q(r)||r[F]?!1:e.baseRefs_.has(r)}function al(e,t,r){let n=Yo(t,r);return n?Vt in n?n[Vt]:n.get?.call(e.draft_):void 0}function Yo(e,t){if(!(t in e))return;let r=gt(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=gt(r)}}function Yn(e){e.modified_||(e.modified_=!0,e.parent_&&Yn(e.parent_))}function Or(e){e.copy_||(e.assigned_=new Map,e.copy_=Kn(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var cl=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(yt(t)&&!yt(r)){let s=r;r=t;let o=this;return function(c=s,...l){return o.produce(c,u=>r.call(this,u,...l))}}yt(r)||ce(6),n!==void 0&&!yt(n)&&ce(7);let i;if(Q(t)){let s=Bo(this),o=Xn(s,t,void 0),a=!0;try{i=r(o),a=!1}finally{a?Gn(s):qn(s)}return $o(s,n),Ho(i,s)}else if(!t||!Jn(t)){if(i=r(t),i===void 0&&(i=t),i===Vo&&(i=void 0),this.autoFreeze_&&Br(i,!0),n){let s=[],o=[];Ze(Wn).generateReplacementPatches_(t,i,{patches_:s,inversePatches_:o}),n(s,o)}return i}else ce(1,t)},this.produceWithPatches=(t,r)=>{if(yt(t))return(o,...a)=>this.produceWithPatches(o,c=>t(c,...a));let n,i;return[this.produce(t,r,(o,a)=>{n=o,i=a}),n,i]},Fn(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Fn(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Fn(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Q(e)||ce(8),fe(e)&&(e=Xo(e));let t=Bo(this),r=Xn(t,e,void 0);return r[F].isManual_=!0,qn(t),r}finishDraft(e,t){let r=e&&e[F];(!r||!r.isManual_)&&ce(9);let{scope_:n}=r;return $o(n,t),Ho(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let i=t[r];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}r>-1&&(t=t.slice(r+1));let n=Ze(Wn).applyPatches_;return fe(e)?n(e,t):this.produce(e,i=>n(i,t))}};function Xn(e,t,r,n){let[i,s]=$r(t)?Ze(kr).proxyMap_(t,r):Wt(t)?Ze(kr).proxySet_(t,r):sl(t,r);return(r?.scope_??Ko()).drafts_.push(i),s.callbacks_=r?.callbacks_??[],s.key_=n,r&&n!==void 0?nl(r,s,n):s.callbacks_.push(function(c){c.mapSetPlugin_?.fixSetContents(s);let{patchPlugin_:l}=c;s.modified_&&l&&l.generatePatches_(s,[],c)}),i}function Xo(e){return fe(e)||ce(10,e),Jo(e)}function Jo(e){if(!Q(e)||Hr(e))return e;let t=e[F],r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Kn(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Kn(e,!0);let i=r;return Wt(r)&&(r=new Set),Ir(i,(s,o)=>{Lr(r,s,Jo(o))},n),t&&(t.finalized_=!1),r}var ll=globalThis.Iterator,Mp=typeof ll?.from=="function";var ul=new cl,Zn=ul.produce;function Qo(e){return({dispatch:r,getState:n})=>i=>s=>typeof s=="function"?s(r,n,e):i(s)}var Zo=Qo(),ea=Qo;var dl=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ft:Ft.apply(null,arguments)};typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var pl=e=>e&&typeof e.match=="function";function Ne(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(he(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>Do(n)&&n.type===e,r}var sa=class Gt extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Gt.prototype)}static get[Symbol.species](){return Gt}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Gt(...t[0].concat(this)):new Gt(...t.concat(this))}};function ta(e){return Q(e)?Zn(e,()=>{}):e}function Vr(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function fl(e){return typeof e=="boolean"}var hl=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:s=!0}=t??{},o=new sa;return r&&(fl(r)?o.push(Zo):o.push(ea(r.extraArgument))),o},ml="RTK_autoBatch";var ra=e=>t=>{setTimeout(t,e)},yl=(e,t)=>r=>{let n=!1,i,s,o=()=>{n||(n=!0,cancelAnimationFrame(i),clearTimeout(s),r())};i=e(o),s=setTimeout(o,t)},gl=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),i=!0,s=!1,o=!1,a=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?yl(window.requestAnimationFrame,100):ra(10):e.type==="callback"?e.queueNotification:ra(e.timeout),l=()=>{o=!1,s&&(s=!1,a.forEach(u=>u()))};return Object.assign({},n,{subscribe(u){let d=()=>i&&u(),p=n.subscribe(d);return a.add(u),()=>{p(),a.delete(u)}},dispatch(u){try{return i=!u?.meta?.[ml],s=!i,s&&(o||(o=!0,c(l))),n.dispatch(u)}finally{i=!0}}})},xl=e=>function(r){let{autoBatch:n=!0}=r??{},i=new sa(e);return n&&i.push(gl(typeof n=="object"?n:void 0)),i};function oa(e){let t=hl(),{reducer:r=void 0,middleware:n,devTools:i=!0,duplicateMiddlewareCheck:s=!0,preloadedState:o=void 0,enhancers:a=void 0}=e||{},c;if(typeof r=="function")c=r;else if(Cr(r))c=Bn(r);else throw new Error(he(1));let l;typeof n=="function"?l=n(t):l=t();let u=Ft;i&&(u=dl({trace:!1,...typeof i=="object"&&i}));let d=ko(...l),p=xl(d),m=typeof a=="function"?a(p):p(),v=u(...m);return $n(c,o,v)}function aa(e){let t={},r=[],n,i={addCase(s,o){let a=typeof s=="string"?s:s.type;if(!a)throw new Error(he(28));if(a in t)throw new Error(he(29));return t[a]=o,i},addAsyncThunk(s,o){return o.pending&&(t[s.pending.type]=o.pending),o.rejected&&(t[s.rejected.type]=o.rejected),o.fulfilled&&(t[s.fulfilled.type]=o.fulfilled),o.settled&&r.push({matcher:s.settled,reducer:o.settled}),i},addMatcher(s,o){return r.push({matcher:s,reducer:o}),i},addDefaultCase(s){return n=s,i}};return e(i),[t,r,n]}function vl(e){return typeof e=="function"}function El(e,t){let[r,n,i]=aa(t),s;if(vl(e))s=()=>ta(e());else{let a=ta(e);s=()=>a}function o(a=s(),c){let l=[r[c.type],...n.filter(({matcher:u})=>u(c)).map(({reducer:u})=>u)];return l.filter(u=>!!u).length===0&&(l=[i]),l.reduce((u,d)=>{if(d)if(fe(u)){let p=d(u,c);return p===void 0?u:p}else{if(Q(u))return Zn(u,p=>d(p,c));{let p=d(u,c);if(p===void 0){if(u===null)return u;throw new Error(he(9))}return p}}return u},a)}return o.getInitialState=s,o}var Al=(e,t)=>pl(e)?e.match(t):e(t);function bl(...e){return t=>e.some(r=>Al(r,t))}var Sl="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",_l=(e=21)=>{let t="",r=e;for(;r--;)t+=Sl[Math.random()*64|0];return t},Cl=["name","message","stack","code"],ei=class{payload;meta;_type;constructor(e,t){this.payload=e,this.meta=t}},na=class{payload;meta;_type;constructor(e,t){this.payload=e,this.meta=t}},wl=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of Cl)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},ia="External signal was aborted",Tl=(()=>{function e(t,r,n){let i=Ne(t+"/fulfilled",(c,l,u,d)=>({payload:c,meta:{...d||{},arg:u,requestId:l,requestStatus:"fulfilled"}})),s=Ne(t+"/pending",(c,l,u)=>({payload:void 0,meta:{...u||{},arg:l,requestId:c,requestStatus:"pending"}})),o=Ne(t+"/rejected",(c,l,u,d,p)=>({payload:d,error:(n&&n.serializeError||wl)(c||"Rejected"),meta:{...p||{},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,p)=>{let m=n?.idGenerator?n.idGenerator(c):_l(),v=new AbortController,b,x;function S(E){x=E,v.abort()}l&&(l.aborted?S(ia):l.addEventListener("abort",()=>S(ia),{once:!0}));let T=(async function(){let E;try{let A=n?.condition?.(c,{getState:d,extra:p});if(Rl(A)&&(A=await A),A===!1)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};if(v.signal.aborted)throw{name:"AbortError",message:x||"Aborted"};let O=new Promise((w,D)=>{b=()=>{D({name:"AbortError",message:x||"Aborted"})},v.signal.addEventListener("abort",b,{once:!0})});u(s(m,c,n?.getPendingMeta?.({requestId:m,arg:c},{getState:d,extra:p}))),E=await Promise.race([O,Promise.resolve(r(c,{dispatch:u,getState:d,extra:p,requestId:m,signal:v.signal,abort:S,rejectWithValue:((w,D)=>new ei(w,D)),fulfillWithValue:((w,D)=>new na(w,D))})).then(w=>{if(w instanceof ei)throw w;return w instanceof na?i(w.payload,m,c,w.meta):i(w,m,c)})])}catch(A){E=A instanceof ei?o(null,m,c,A.payload,A.meta):o(A,m,c)}finally{b&&v.signal.removeEventListener("abort",b)}return n&&!n.dispatchConditionRejection&&o.match(E)&&E.meta.condition||u(E),E})();return Object.assign(T,{abort:S,requestId:m,arg:c,unwrap(){return T.then(Ol)}})}}return Object.assign(a,{pending:s,rejected:o,fulfilled:i,settled:bl(o,i),typePrefix:t})}return e.withTypes=()=>e,e})();function Ol(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Rl(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var ca=Symbol.for("rtk-slice-createasyncthunk"),jp={[ca]:Tl};function Nl(e,t){return`${e}/${t}`}function Ll({creators:e}={}){let t=e?.asyncThunk?.[ca];return function(n){let{name:i,reducerPath:s=i}=n;if(!i)throw new Error(he(11));typeof process<"u";let o=(typeof n.reducers=="function"?n.reducers(Dl()):n.reducers)||{},a=Object.keys(o),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},l={addCase(E,A){let O=typeof E=="string"?E:E.type;if(!O)throw new Error(he(12));if(O in c.sliceCaseReducersByType)throw new Error(he(13));return c.sliceCaseReducersByType[O]=A,l},addMatcher(E,A){return c.sliceMatchers.push({matcher:E,reducer:A}),l},exposeAction(E,A){return c.actionCreators[E]=A,l},exposeCaseReducer(E,A){return c.sliceCaseReducersByName[E]=A,l}};a.forEach(E=>{let A=o[E],O={reducerName:E,type:Nl(i,E),createNotation:typeof n.reducers=="function"};Ml(A)?Ul(O,A,l,t):Pl(O,A,l)});function u(){let[E={},A=[],O=void 0]=typeof n.extraReducers=="function"?aa(n.extraReducers):[n.extraReducers],w={...E,...c.sliceCaseReducersByType};return El(n.initialState,D=>{for(let H in w)D.addCase(H,w[H]);for(let H of c.sliceMatchers)D.addMatcher(H.matcher,H.reducer);for(let H of A)D.addMatcher(H.matcher,H.reducer);O&&D.addDefaultCase(O)})}let d=E=>E,p=new Map,m=new WeakMap,v;function b(E,A){return v||(v=u()),v(E,A)}function x(){return v||(v=u()),v.getInitialState()}function S(E,A=!1){function O(D){let H=D[E];return typeof H>"u"&&A&&(H=Vr(m,O,x)),H}function w(D=d){return Vr(Vr(p,A,()=>new WeakMap),D,()=>{let H={};for(let[or,Z]of Object.entries(n.selectors??{}))H[or]=kl(Z,D,()=>Vr(m,D,x),A);return H})}return{reducerPath:E,getSelectors:w,get selectors(){return w(O)},selectSlice:O}}let T={name:i,reducer:b,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:x,...S(s),injectInto(E,{reducerPath:A,...O}={}){let w=A??s;return E.inject({reducerPath:w,reducer:b},O),{...T,...S(w,!0)}}};return T}}function kl(e,t,r,n){function i(s,...o){let a=t(s);return typeof a>"u"&&n&&(a=r()),e(a,...o)}return i.unwrapped=e,i}var la=Ll();function Dl(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function Pl({type:e,reducerName:t,createNotation:r},n,i){let s,o;if("reducer"in n){if(r&&!Il(n))throw new Error(he(17));s=n.reducer,o=n.prepare}else s=n;i.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,o?Ne(e,o):Ne(e))}function Ml(e){return e._reducerDefinitionType==="asyncThunk"}function Il(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Ul({type:e,reducerName:t},r,n,i){if(!i)throw new Error(he(18));let{payloadCreator:s,fulfilled:o,pending:a,rejected:c,settled:l,options:u}=r,d=i(e,s,u);n.exposeAction(t,d),o&&n.addCase(d.fulfilled,o),a&&n.addCase(d.pending,a),c&&n.addCase(d.rejected,c),l&&n.addMatcher(d.settled,l),n.exposeCaseReducer(t,{fulfilled:o||jr,pending:a||jr,rejected:c||jr,settled:l||jr})}function jr(){}var ua="listener",da="completed",pa="cancelled",zp=`task-${pa}`,Kp=`task-${da}`,Wp=`${ua}-${pa}`,Gp=`${ua}-${da}`;var{assign:fa}=Object;var ti="listenerMiddleware";var $l=fa(Ne(`${ti}/add`),{withTypes:()=>$l}),qp=Ne(`${ti}/removeAll`),Bl=fa(Ne(`${ti}/remove`),{withTypes:()=>Bl});function he(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Hl=xr(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,i){this.eventBus.addEventListener(r,n,i)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,i){this.eventBus.removeEventListener(r,n,i)}}}),zr=class extends Hl(Object){};window.ftReduxStores||(window.ftReduxStores={});var ha=class e extends zr{static get(t){var r;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,s=window.ftReduxStores[n];if(Sr(s))return s;if(i==null)return;let o=la({...i,reducers:(r=i.reducers)!==null&&r!==void 0?r:{}}),a=oa({reducer:(c,l)=>{if(l.type==="CLEAR_FT_REDUX_STORE"){let u=$t(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[i.name]=new e(o,a,i.eventBus,i.deprecatedKeys)}constructor(t,r,n,i){super(),this.reduxSlice=t,this.reduxStore=r,this.deprecatedKeys=i,this.isFtReduxStore=!0,this.commands=new vr,this.injectInto=(o,a)=>this.reduxSlice.injectInto(o,a),this.selectSlice=o=>this.reduxSlice.selectSlice(o);let s=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 p=u(...d.map(s));return this.reduxStore.dispatch(p),p}:d=>{let p=l,m=this.getState()[p];ft(m,d)||this.setState({[p]:s(d)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};var Kr=class{static format(t,r,n,i,s){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(n,i,!!s)):this.getIntlDateTime(t,r,n,i,!!s)}static getMomentDateFormat(t,r,n){return n?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,n,i,s){let o=typeof t=="string"?new Date(t):t,a=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(o),c=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(o);return s?c:i?`${a} ${c}`:a}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var ma=y(C()),Wr=function(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s},_f=(0,ma.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(_)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var i,s;return((s=(i=this.metadataDescriptors.find(a=>a.key===n))===null||i===void 0?void 0:i.date)!==null&&s!==void 0?s:!1)?a=>Kr.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Wr([(0,ri.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Wr([(0,ri.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Wr([In({store:_.name,selector:r=>{var n,i;return(i=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&i!==void 0?i:[]}})],t.prototype,"metadataDescriptors",void 0),Wr([In({store:_.name})],t.prototype,"uiLocale",void 0),t});var ni=class{addCommand(t,r=!1){_.commands.add(t,r)}consumeCommand(t){return _.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new ni;var re=y(C());var ya,xt=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Fl=Symbol("clearAfterUnitTest"),Gr=class extends(0,re.withEventBus)(Y){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[ya]=()=>{this.defaultMessages={},this.cache=new re.CacheRegistry,this.listeners={}},this.currentUiLocale=_.getState().uiLocale,_.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=_.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var n;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let i={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,re.deepEqual)(this.defaultMessages[t],i)||(this.defaultMessages[t]=i,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,n;return this.fetchContext(t),(n=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,r){let n=t.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(t,r,...n){var i;let s=t.toLowerCase(),o=this.resolveContext(s);return new re.ParametrizedLabelResolver((i=this.defaultMessages[s])!==null&&i!==void 0?i:{},o).resolve(r,...n)}async fetchContext(t){let r=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(i){!(i instanceof re.CanceledPromiseError)&&r&&console.error(i)}return n}subscribe(t,r){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(r),()=>{var i;return(i=this.listeners[t])===null||i===void 0?void 0:i.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new xt({loadedContexts:t})),this.dispatchEvent(new xt({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new xt({loadedContexts:[t]})),this.dispatchEvent(new xt({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,re.delay)(0).then(()=>n()).catch(()=>null)))}};ya=Fl;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Gr{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Gr{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var vt=window.FluidTopicsI18nService,qr=window.FluidTopicsCustomI18nService;var ga=y(C()),ii=class{highlightHtml(t,r,n){(0,ga.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new ii;var xa=y(C());var si=class{isDate(t){var r,n,i,s;return(s=(n=((i=(r=_.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&i!==void 0?i:[]).find(a=>a.key===t))===null||n===void 0?void 0:n.date)!==null&&s!==void 0?s:!1}format(t,r){var n,i,s,o;if(t==null)return"";try{return xa.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:_.getState().uiLocale,(i=r?.longFormat)!==null&&i!==void 0?i:!1,(s=r?.withTime)!==null&&s!==void 0?s:!1,(o=r?.onlyTime)!==null&&o!==void 0?o:!1)}catch(a){throw console.error(`Date ${JSON.stringify(t)} is not valid`,a),a}}};window.FluidTopicsDateService=new si;var va=y(C());var qt=class{static get(t,r,{baseUrl:n,localesConfiguration:i,availableContentLocales:s}=_.getState()){var o;if(!r||s.length>0&&!s.some(a=>a.lang===r)){let a=i?.defaultLocales.defaultContentLocale;r=a?`${a.lang}-${a.region}`:(o=s[0])===null||o===void 0?void 0:o.lang}return new va.SearchPlaceConverter(n,t??20,i?.allLanguagesAllowed,r,s)}};var oi=class{urlToSearchRequest(t){return qt.get().parse(t)}searchRequestToUrl(t){return qt.get().serialize(t)}};window.FluidTopicsUrlService=new oi;var be=y(C());var et=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{nextLocation:t}})}};et.eventName="before-location-change";var tt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};tt.eventName="change";var ai=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let r=sessionStorage.getItem(this.itemName(t));return r?JSON.parse(r):void 0}set(t,r){sessionStorage.setItem(this.itemName(t),JSON.stringify(r))}},Ea=new ai;var Yr=class e extends be.WithEventBus{static build(){return new e(window.history,Ea,()=>window.location,!1)}constructor(t,r,n,i){var s,o;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(o=(s=t.state)===null||s===void 0?void 0:s.index)!==null&&o!==void 0?o:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(t,r=!1){let n=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,be.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new tt(this.currentItem())),0)}installProxies(){let t=r=>(n,i,[s,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 et(c);this.dispatchEvent(l);let u=r(),d={...u===this.currentIndex?this.currentState:void 0,...s,index:u,href:l.detail.nextLocation.href};n.apply(i,[d,o,d.href]),this.setCurrentState(d,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addBeforeLocationChangeListener(t){this.addEventListener(et.eventName,t)}removeBeforeLocationChangeListener(t){this.removeEventListener(et.eventName,t)}addHistoryChangeListener(t){this.addEventListener(tt.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(tt.eventName,t)}currentItem(){return(0,be.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,be.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,be.deepCopy)(r.find(n=>t(n)))}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,be.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let n=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!n)return t;let i=t,s=t+1;for(;this.states.length>s&&!this.isDifferentMajorState(s,n);)this.hasState(s)&&(i=s),s++;return i}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var n;if(!this.hasState(t))return!1;let i=r??this.currentState.majorStateId,s=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return s==null||s!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Yr.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e),addBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(e),removeBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(e)});var Aa=y(V());var ba=Aa.css`
329
+ `}getTextContent(){var t,r;return(r=(t=this.slottedContent)===null||t===void 0?void 0:t.assignedNodes().map(n=>n.textContent).join("").trim())!==null&&r!==void 0?r:""}update(t){super.update(t),["value","variant"].some(r=>t.has(r))&&this.resolveIcon()}resolveIcon(){var t,r;let n=this.value||this.getTextContent();switch(this.variant){case Te.file_format:this.resolvedIcon=(t=h[n.replace("-","_").toUpperCase()])!==null&&t!==void 0?t:n;break;case Te.material:this.resolvedIcon=this.value||It.nothing;break;default:this.resolvedIcon=(r=pt[n.replace("-","_").toUpperCase()])!==null&&r!==void 0?r:n;break}}firstUpdated(t){super.firstUpdated(t),setTimeout(()=>this.resolveIcon())}};X.elementDefinitions={};X.styles=ho;Ut([(0,Oe.property)()],X.prototype,"variant",void 0);Ut([(0,Oe.property)()],X.prototype,"value",void 0);Ut([(0,Oe.property)({reflect:!0,attribute:"aria-hidden"})],X.prototype,"ariaHidden",void 0);Ut([(0,Oe.state)()],X.prototype,"resolvedIcon",void 0);Ut([(0,Oe.query)("slot")],X.prototype,"slottedContent",void 0);var Eo=y(C());var vo={"ft-icon":X};(0,Eo.customElements)(vo);var ri=y(z());var Ao=y(z(),1);var Mn=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)},jc=e=>({fromAttribute:t=>{if(t==null)return $t(e);try{return JSON.parse(t)}catch{return $t(e)}},toAttribute:t=>JSON.stringify(t)});function bo(e,t){return(0,Ao.property)({type:Object,converter:jc(e),hasChanged:Bt,...t??{}})}function zc(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,n;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!ft(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!ft(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let i=o=>Object.keys(o).filter(a=>o[a]!=null),s=i(e);if(r=s.length,r!==i(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[n]))return!1;for(n=r;n--!==0;){let o=s[n];if(!ft(e[o],t[o]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function ft(e,t){try{return zc(e,t)}catch{return!1}}function Bt(e,t){return!ft(e,t)}function $t(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function xr(e,t){let r=n=>n[e]===!0;return n=>{if(r(n))return n;let i=t(n);return i[e]=!0,i}}var So=y(z(),1);var In=e=>{let t=e??{};return(r,n)=>{var i;let s={hasChanged:Bt,attribute:!1,...t};(0,So.property)(s)(r,n);let o=r.constructor;o.reduxProperties=new Map(o.reduxProperties),o.reduxProperties.set(n,{selector:(i=t.selector)!==null&&i!==void 0?i:(a=>a[n]),store:t.store})}};var vr=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(n=>n.type===t);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var Je=y(z(),1);var Er=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),s=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let o of n)try{await o()}catch(a){i(a);return}s(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var br=y(V(),1);var Ar=class extends br.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let r={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return(0,br.adoptStyles)(n,t.elementStyles),n}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([r,n])=>this.defineScopedElement(r,n))}static defineScopedElement(t,r){Mn(t)(r),this.canDefineScopedElement(t)&&this.registry.define(t,r)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,r){this.scopedRegistryConstructor.defineScopedElement(t,r)}};function _o(e,t,...r){var n;let i=e.querySelector(t);for(let s of r)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(s);return i}var mt=function(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s},Oo,Co=Symbol("constructorPrototype"),wo=Symbol("constructorName"),Ro=Symbol("exportpartsDebouncer"),To=Symbol("dynamicDependenciesLoaded"),ht=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};ht.eventName="exportparts-updated";var pe=class extends Ar{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Oo]=new Er(5),this.scheduleExportpartsUpdate=()=>{var t,r,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[Ro].run(()=>{var i,s;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((s=this.exportpartsPrefixes)===null||s===void 0?void 0:s.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[wo]=this.constructor.name,this[Co]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[wo]&&Object.setPrototypeOf(this,this[Co])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let r=this.constructor;r[To]||(r[To]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(ht.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(ht.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new ht)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let s=[...i??[],n];r=_o(this.shadowRoot,...s)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,i;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(s=>s.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(s){console.error(s,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let s=document.createElement("style");s.classList.add("ft-lit-element--custom-stylesheet"),s.innerHTML=this.customStylesheet,this.shadowRoot.append(s)}}setExportpartsAttribute(t){var r,n,i,s,o,a;let c=p=>p!=null&&p.trim().length>0,l=t.filter(c).map(p=>p.trim());if(l.length===0){this.exportparts=void 0;return}let u=new Set;for(let p of(s=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&s!==void 0?s:[]){let m=(o=(n=p.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&o!==void 0?o:[],v=(a=(i=p.getAttribute("exportparts"))===null||i===void 0?void 0:i.split(",").map(x=>x.split(":")[1]))!==null&&a!==void 0?a:[],b=[...m,...v].filter(c).map(x=>x.trim());for(let x of b)u.add(x)}if(u.size===0){this.exportparts=void 0;return}let d=[...u.values()].flatMap(p=>l.map(m=>`${p}:${m}--${p}`));this.exportparts=[...this.part,...d].join(", ")}};Oo=Ro;mt([(0,Je.property)()],pe.prototype,"exportpartsPrefix",void 0);mt([bo([])],pe.prototype,"exportpartsPrefixes",void 0);mt([(0,Je.property)({reflect:!0})],pe.prototype,"exportparts",void 0);mt([(0,Je.property)()],pe.prototype,"customStylesheet",void 0);mt([(0,Je.property)()],pe.prototype,"elementToFocus",void 0);mt([(0,Je.state)()],pe.prototype,"useAdoptedStyleSheets",void 0);function Sr(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Ht=Symbol("internalReduxEventsUnsubscribers"),Re=Symbol("internalStoresUnsubscribers"),Qe=Symbol("internalStores"),Kc=xr(Symbol("withRedux"),function(e){var t,r,n;class i extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(o){super.willUpdate(o),[...this.reduxConstructor.reduxReactiveProperties].some(a=>o.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[Qe].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Qe].values()][0]}getStore(o){return o==null?this.getUnnamedStore():this[Qe].get(o)}addStore(o,a){var c;a=(c=a??o.name)!==null&&c!==void 0?c:"default-store",this.unsubscribeFromStore(a),this[Qe].set(a,o),this.subscribeToStore(a,o),this.updateFromStores()}removeStore(o){let a=typeof o=="string"?o:o.name;this.unsubscribeFromStore(a),this[Qe].delete(a)}setupStores(){this.unsubscribeFromStores(),this[Qe].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[Ht].set(o,[]),Sr(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 p=m=>this[d](m);a.addEventListener(u.eventName,p),this[Ht].get(o).push(()=>a.removeEventListener(u.eventName,p))}}))),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[Ht].get(o))===null||a===void 0||a.forEach(c=>c()),this[Ht].delete(o)}onStoreAvailable(o){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=Re,r=Qe,n=Ht,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),No=class extends Kc(pe){};function B(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Wc=typeof Symbol=="function"&&Symbol.observable||"@@observable",Lo=Wc,Un=()=>Math.random().toString(36).substring(7).split("").join("."),Gc={INIT:`@@redux/INIT${Un()}`,REPLACE:`@@redux/REPLACE${Un()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Un()}`},_r=Gc;function Cr(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function $n(e,t,r){if(typeof e!="function")throw new Error(B(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(B(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(B(1));return r($n)(e,t)}let n=e,i=t,s=new Map,o=s,a=0,c=!1;function l(){o===s&&(o=new Map,s.forEach((x,S)=>{o.set(S,x)}))}function u(){if(c)throw new Error(B(3));return i}function d(x){if(typeof x!="function")throw new Error(B(4));if(c)throw new Error(B(5));let S=!0;l();let T=a++;return o.set(T,x),function(){if(S){if(c)throw new Error(B(6));S=!1,l(),o.delete(T),s=null}}}function p(x){if(!Cr(x))throw new Error(B(7));if(typeof x.type>"u")throw new Error(B(8));if(typeof x.type!="string")throw new Error(B(17));if(c)throw new Error(B(9));try{c=!0,i=n(i,x)}finally{c=!1}return(s=o).forEach(T=>{T()}),x}function m(x){if(typeof x!="function")throw new Error(B(10));n=x,p({type:_r.REPLACE})}function v(){let x=d;return{subscribe(S){if(typeof S!="object"||S===null)throw new Error(B(11));function T(){let A=S;A.next&&A.next(u())}return T(),{unsubscribe:x(T)}},[Lo](){return this}}}return p({type:_r.INIT}),{dispatch:p,subscribe:d,getState:u,replaceReducer:m,[Lo]:v}}function qc(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:_r.INIT})>"u")throw new Error(B(12));if(typeof r(void 0,{type:_r.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(B(13))})}function Bn(e){let t=Object.keys(e),r={};for(let o=0;o<t.length;o++){let a=t[o];typeof e[a]=="function"&&(r[a]=e[a])}let n=Object.keys(r),i,s;try{qc(r)}catch(o){s=o}return function(a={},c){if(s)throw s;let l=!1,u={};for(let d=0;d<n.length;d++){let p=n[d],m=r[p],v=a[p],b=m(v,c);if(typeof b>"u"){let x=c&&c.type;throw new Error(B(14))}u[p]=b,l=l||b!==v}return l=l||n.length!==Object.keys(a).length,l?u:a}}function Ft(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function ko(...e){return t=>(r,n)=>{let i=t(r,n),s=()=>{throw new Error(B(15))},o={getState:i.getState,dispatch:(c,...l)=>s(c,...l)},a=e.map(c=>c(o));return s=Ft(...a)(i.dispatch),{...i,dispatch:s}}}function Do(e){return Cr(e)&&"type"in e&&typeof e.type=="string"}var Vo=Symbol.for("immer-nothing"),Po=Symbol.for("immer-draftable"),F=Symbol.for("immer-state");function ce(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var J=Object,gt=J.getPrototypeOf,Rr="constructor",Mr="prototype",jn="configurable",Nr="enumerable",Tr="writable",Vt="value",fe=e=>!!e&&!!e[F];function Q(e){return e?jo(e)||Ur(e)||!!e[Po]||!!e[Rr]?.[Po]||$r(e)||Wt(e):!1}var Yc=J[Mr][Rr].toString(),Mo=new WeakMap;function jo(e){if(!e||!Jn(e))return!1;let t=gt(e);if(t===null||t===J[Mr])return!0;let r=J.hasOwnProperty.call(t,Rr)&&t[Rr];if(r===Object)return!0;if(!yt(r))return!1;let n=Mo.get(r);return n===void 0&&(n=Function.toString.call(r),Mo.set(r,n)),n===Yc}function Ir(e,t,r=!0){Kt(e)===0?(r?Reflect.ownKeys(e):J.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function Kt(e){let t=e[F];return t?t.type_:Ur(e)?1:$r(e)?2:Wt(e)?3:0}var Hn=(e,t,r=Kt(e))=>r===2?e.has(t):J[Mr].hasOwnProperty.call(e,t),zn=(e,t,r=Kt(e))=>r===2?e.get(t):e[t],Lr=(e,t,r,n=Kt(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function Xc(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Ur=Array.isArray,$r=e=>e instanceof Map,Wt=e=>e instanceof Set,Jn=e=>typeof e=="object",yt=e=>typeof e=="function",Fn=e=>typeof e=="boolean";function Jc(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var Ae=e=>e.copy_||e.base_;var Qn=e=>e.modified_?e.copy_:e.base_;function Kn(e,t){if($r(e))return new Map(e);if(Wt(e))return new Set(e);if(Ur(e))return Array[Mr].slice.call(e);let r=jo(e);if(t===!0||t==="class_only"&&!r){let n=J.getOwnPropertyDescriptors(e);delete n[F];let i=Reflect.ownKeys(n);for(let s=0;s<i.length;s++){let o=i[s],a=n[o];a[Tr]===!1&&(a[Tr]=!0,a[jn]=!0),(a.get||a.set)&&(n[o]={[jn]:!0,[Tr]:!0,[Nr]:a[Nr],[Vt]:e[o]})}return J.create(gt(e),n)}else{let n=gt(e);if(n!==null&&r)return{...e};let i=J.create(n);return J.assign(i,e)}}function Br(e,t=!1){return Hr(e)||fe(e)||!Q(e)||(Kt(e)>1&&J.defineProperties(e,{set:wr,add:wr,clear:wr,delete:wr}),J.freeze(e),t&&Ir(e,(r,n)=>{Br(n,!0)},!1)),e}function Qc(){ce(2)}var wr={[Vt]:Qc};function Hr(e){return e===null||!Jn(e)?!0:J.isFrozen(e)}var kr="MapSet",Wn="Patches",Io="ArrayMethods",zo={};function Ze(e){let t=zo[e];return t||ce(0,e),t}var Uo=e=>!!zo[e];var jt,Ko=()=>jt,Zc=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Uo(kr)?Ze(kr):void 0,arrayMethodsPlugin_:Uo(Io)?Ze(Io):void 0});function $o(e,t){t&&(e.patchPlugin_=Ze(Wn),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Gn(e){qn(e),e.drafts_.forEach(el),e.drafts_=null}function qn(e){e===jt&&(jt=e.parent_)}var Bo=e=>jt=Zc(jt,e);function el(e){let t=e[F];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Ho(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(e!==void 0&&e!==r){r[F].modified_&&(Gn(t),ce(4)),Q(e)&&(e=Fo(t,e));let{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(r[F].base_,e,t)}else e=Fo(t,r);return tl(t,e,!0),Gn(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Vo?e:void 0}function Fo(e,t){if(Hr(t))return t;let r=t[F];if(!r)return Dr(t,e.handledSet_,e);if(!Fr(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);qo(r,e)}return r.copy_}function tl(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Br(t,r)}function Wo(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Fr=(e,t)=>e.scope_===t,rl=[];function Go(e,t,r,n){let i=Ae(e),s=e.type_;if(n!==void 0&&zn(i,n,s)===t){Lr(i,n,r,s);return}if(!e.draftLocations_){let a=e.draftLocations_=new Map;Ir(i,(c,l)=>{if(fe(l)){let u=a.get(l)||[];u.push(c),a.set(l,u)}})}let o=e.draftLocations_.get(t)??rl;for(let a of o)Lr(i,a,r,s)}function nl(e,t,r){e.callbacks_.push(function(i){let s=t;if(!s||!Fr(s,i))return;i.mapSetPlugin_?.fixSetContents(s);let o=Qn(s);Go(e,s.draft_??s,o,r),qo(s,i)})}function qo(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let i=n.getPath(e);i&&n.generatePatches_(e,i,t)}Wo(e)}}function il(e,t,r){let{scope_:n}=e;if(fe(r)){let i=r[F];Fr(i,n)&&i.callbacks_.push(function(){Or(e);let o=Qn(i);Go(e,r,o,t)})}else Q(r)&&e.callbacks_.push(function(){let s=Ae(e);e.type_===3?s.has(r)&&Dr(r,n.handledSet_,n):zn(s,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Dr(zn(e.copy_,t,e.type_),n.handledSet_,n)})}function Dr(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||fe(e)||t.has(e)||!Q(e)||Hr(e)||(t.add(e),Ir(e,(n,i)=>{if(fe(i)){let s=i[F];if(Fr(s,r)){let o=Qn(s);Lr(e,n,o,e.type_),Wo(s)}}else Q(i)&&Dr(i,t,r)})),e}function sl(e,t){let r=Ur(e),n={type_:r?1:0,scope_:t?t.scope_:Ko(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=n,s=Pr;r&&(i=[n],s=zt);let{revoke:o,proxy:a}=Proxy.revocable(i,s);return n.draft_=a,n.revoke_=o,[a,n]}var Pr={get(e,t){if(t===F)return e;let r=e.scope_.arrayMethodsPlugin_,n=e.type_===1&&typeof t=="string";if(n&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);let i=Ae(e);if(!Hn(i,t,e.type_))return al(e,i,t);let s=i[t];if(e.finalized_||!Q(s)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&Jc(t))return s;if(s===Vn(e.base_,t)||ol(e,t,s)){Or(e);let o=e.type_===1?+t:t,a=Xn(e.scope_,s,e,o);return e.copy_[o]=a}return s},has(e,t){return t in Ae(e)},ownKeys(e){return Reflect.ownKeys(Ae(e))},set(e,t,r){let n=Yo(Ae(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let i=Vn(Ae(e),t),s=i?.[F];if(s&&s.base_===r)return e.copy_[t]=r,e.assigned_.delete(t),!0;if(Xc(r,i)&&(r!==void 0||Hn(e.base_,t,e.type_)))return!0;Or(e),Yn(e)}return e.copy_[t]===r&&(r!==void 0||Hn(e.copy_,t,e.type_))||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),il(e,t,r)),!0},deleteProperty(e,t){return Or(e),Vn(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Yn(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Ae(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[Tr]:!0,[jn]:e.type_!==1||t!=="length",[Nr]:n[Nr],[Vt]:r[t]}},defineProperty(){ce(11)},getPrototypeOf(e){return gt(e.base_)},setPrototypeOf(){ce(12)}},zt={};for(let e in Pr){let t=Pr[e];zt[e]=function(){let r=arguments;return r[0]=r[0][0],t.apply(this,r)}}zt.deleteProperty=function(e,t){return zt.set.call(this,e,t,void 0)};zt.set=function(e,t,r){return Pr.set.call(this,e[0],t,r,e[0])};function Vn(e,t){let r=e[F];return(r?Ae(r):e)[t]}function ol(e,t,r){return e.type_!==1||!e.allIndicesReassigned_||!Q(r)||r[F]?!1:e.baseRefs_.has(r)}function al(e,t,r){let n=Yo(t,r);return n?Vt in n?n[Vt]:n.get?.call(e.draft_):void 0}function Yo(e,t){if(!(t in e))return;let r=gt(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=gt(r)}}function Yn(e){e.modified_||(e.modified_=!0,e.parent_&&Yn(e.parent_))}function Or(e){e.copy_||(e.assigned_=new Map,e.copy_=Kn(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var cl=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(yt(t)&&!yt(r)){let s=r;r=t;let o=this;return function(c=s,...l){return o.produce(c,u=>r.call(this,u,...l))}}yt(r)||ce(6),n!==void 0&&!yt(n)&&ce(7);let i;if(Q(t)){let s=Bo(this),o=Xn(s,t,void 0),a=!0;try{i=r(o),a=!1}finally{a?Gn(s):qn(s)}return $o(s,n),Ho(i,s)}else if(!t||!Jn(t)){if(i=r(t),i===void 0&&(i=t),i===Vo&&(i=void 0),this.autoFreeze_&&Br(i,!0),n){let s=[],o=[];Ze(Wn).generateReplacementPatches_(t,i,{patches_:s,inversePatches_:o}),n(s,o)}return i}else ce(1,t)},this.produceWithPatches=(t,r)=>{if(yt(t))return(o,...a)=>this.produceWithPatches(o,c=>t(c,...a));let n,i;return[this.produce(t,r,(o,a)=>{n=o,i=a}),n,i]},Fn(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Fn(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Fn(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Q(e)||ce(8),fe(e)&&(e=Xo(e));let t=Bo(this),r=Xn(t,e,void 0);return r[F].isManual_=!0,qn(t),r}finishDraft(e,t){let r=e&&e[F];(!r||!r.isManual_)&&ce(9);let{scope_:n}=r;return $o(n,t),Ho(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let i=t[r];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}r>-1&&(t=t.slice(r+1));let n=Ze(Wn).applyPatches_;return fe(e)?n(e,t):this.produce(e,i=>n(i,t))}};function Xn(e,t,r,n){let[i,s]=$r(t)?Ze(kr).proxyMap_(t,r):Wt(t)?Ze(kr).proxySet_(t,r):sl(t,r);return(r?.scope_??Ko()).drafts_.push(i),s.callbacks_=r?.callbacks_??[],s.key_=n,r&&n!==void 0?nl(r,s,n):s.callbacks_.push(function(c){c.mapSetPlugin_?.fixSetContents(s);let{patchPlugin_:l}=c;s.modified_&&l&&l.generatePatches_(s,[],c)}),i}function Xo(e){return fe(e)||ce(10,e),Jo(e)}function Jo(e){if(!Q(e)||Hr(e))return e;let t=e[F],r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Kn(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Kn(e,!0);let i=r;return Wt(r)&&(r=new Set),Ir(i,(s,o)=>{Lr(r,s,Jo(o))},n),t&&(t.finalized_=!1),r}var ll=globalThis.Iterator,Mp=typeof ll?.from=="function";var ul=new cl,Zn=ul.produce;function Qo(e){return({dispatch:r,getState:n})=>i=>s=>typeof s=="function"?s(r,n,e):i(s)}var Zo=Qo(),ea=Qo;var dl=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ft:Ft.apply(null,arguments)};typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var pl=e=>e&&typeof e.match=="function";function Ne(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(he(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>Do(n)&&n.type===e,r}var sa=class Gt extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Gt.prototype)}static get[Symbol.species](){return Gt}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Gt(...t[0].concat(this)):new Gt(...t.concat(this))}};function ta(e){return Q(e)?Zn(e,()=>{}):e}function Vr(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function fl(e){return typeof e=="boolean"}var hl=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:s=!0}=t??{},o=new sa;return r&&(fl(r)?o.push(Zo):o.push(ea(r.extraArgument))),o},ml="RTK_autoBatch";var ra=e=>t=>{setTimeout(t,e)},yl=(e,t)=>r=>{let n=!1,i,s,o=()=>{n||(n=!0,cancelAnimationFrame(i),clearTimeout(s),r())};i=e(o),s=setTimeout(o,t)},gl=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),i=!0,s=!1,o=!1,a=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?yl(window.requestAnimationFrame,100):ra(10):e.type==="callback"?e.queueNotification:ra(e.timeout),l=()=>{o=!1,s&&(s=!1,a.forEach(u=>u()))};return Object.assign({},n,{subscribe(u){let d=()=>i&&u(),p=n.subscribe(d);return a.add(u),()=>{p(),a.delete(u)}},dispatch(u){try{return i=!u?.meta?.[ml],s=!i,s&&(o||(o=!0,c(l))),n.dispatch(u)}finally{i=!0}}})},xl=e=>function(r){let{autoBatch:n=!0}=r??{},i=new sa(e);return n&&i.push(gl(typeof n=="object"?n:void 0)),i};function oa(e){let t=hl(),{reducer:r=void 0,middleware:n,devTools:i=!0,duplicateMiddlewareCheck:s=!0,preloadedState:o=void 0,enhancers:a=void 0}=e||{},c;if(typeof r=="function")c=r;else if(Cr(r))c=Bn(r);else throw new Error(he(1));let l;typeof n=="function"?l=n(t):l=t();let u=Ft;i&&(u=dl({trace:!1,...typeof i=="object"&&i}));let d=ko(...l),p=xl(d),m=typeof a=="function"?a(p):p(),v=u(...m);return $n(c,o,v)}function aa(e){let t={},r=[],n,i={addCase(s,o){let a=typeof s=="string"?s:s.type;if(!a)throw new Error(he(28));if(a in t)throw new Error(he(29));return t[a]=o,i},addAsyncThunk(s,o){return o.pending&&(t[s.pending.type]=o.pending),o.rejected&&(t[s.rejected.type]=o.rejected),o.fulfilled&&(t[s.fulfilled.type]=o.fulfilled),o.settled&&r.push({matcher:s.settled,reducer:o.settled}),i},addMatcher(s,o){return r.push({matcher:s,reducer:o}),i},addDefaultCase(s){return n=s,i}};return e(i),[t,r,n]}function vl(e){return typeof e=="function"}function El(e,t){let[r,n,i]=aa(t),s;if(vl(e))s=()=>ta(e());else{let a=ta(e);s=()=>a}function o(a=s(),c){let l=[r[c.type],...n.filter(({matcher:u})=>u(c)).map(({reducer:u})=>u)];return l.filter(u=>!!u).length===0&&(l=[i]),l.reduce((u,d)=>{if(d)if(fe(u)){let p=d(u,c);return p===void 0?u:p}else{if(Q(u))return Zn(u,p=>d(p,c));{let p=d(u,c);if(p===void 0){if(u===null)return u;throw new Error(he(9))}return p}}return u},a)}return o.getInitialState=s,o}var Al=(e,t)=>pl(e)?e.match(t):e(t);function bl(...e){return t=>e.some(r=>Al(r,t))}var Sl="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",_l=(e=21)=>{let t="",r=e;for(;r--;)t+=Sl[Math.random()*64|0];return t},Cl=["name","message","stack","code"],ei=class{payload;meta;_type;constructor(e,t){this.payload=e,this.meta=t}},na=class{payload;meta;_type;constructor(e,t){this.payload=e,this.meta=t}},wl=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of Cl)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},ia="External signal was aborted",Tl=(()=>{function e(t,r,n){let i=Ne(t+"/fulfilled",(c,l,u,d)=>({payload:c,meta:{...d||{},arg:u,requestId:l,requestStatus:"fulfilled"}})),s=Ne(t+"/pending",(c,l,u)=>({payload:void 0,meta:{...u||{},arg:l,requestId:c,requestStatus:"pending"}})),o=Ne(t+"/rejected",(c,l,u,d,p)=>({payload:d,error:(n&&n.serializeError||wl)(c||"Rejected"),meta:{...p||{},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,p)=>{let m=n?.idGenerator?n.idGenerator(c):_l(),v=new AbortController,b,x;function S(E){x=E,v.abort()}l&&(l.aborted?S(ia):l.addEventListener("abort",()=>S(ia),{once:!0}));let T=(async function(){let E;try{let A=n?.condition?.(c,{getState:d,extra:p});if(Rl(A)&&(A=await A),A===!1)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};if(v.signal.aborted)throw{name:"AbortError",message:x||"Aborted"};let O=new Promise((w,D)=>{b=()=>{D({name:"AbortError",message:x||"Aborted"})},v.signal.addEventListener("abort",b,{once:!0})});u(s(m,c,n?.getPendingMeta?.({requestId:m,arg:c},{getState:d,extra:p}))),E=await Promise.race([O,Promise.resolve(r(c,{dispatch:u,getState:d,extra:p,requestId:m,signal:v.signal,abort:S,rejectWithValue:((w,D)=>new ei(w,D)),fulfillWithValue:((w,D)=>new na(w,D))})).then(w=>{if(w instanceof ei)throw w;return w instanceof na?i(w.payload,m,c,w.meta):i(w,m,c)})])}catch(A){E=A instanceof ei?o(null,m,c,A.payload,A.meta):o(A,m,c)}finally{b&&v.signal.removeEventListener("abort",b)}return n&&!n.dispatchConditionRejection&&o.match(E)&&E.meta.condition||u(E),E})();return Object.assign(T,{abort:S,requestId:m,arg:c,unwrap(){return T.then(Ol)}})}}return Object.assign(a,{pending:s,rejected:o,fulfilled:i,settled:bl(o,i),typePrefix:t})}return e.withTypes=()=>e,e})();function Ol(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Rl(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var ca=Symbol.for("rtk-slice-createasyncthunk"),jp={[ca]:Tl};function Nl(e,t){return`${e}/${t}`}function Ll({creators:e}={}){let t=e?.asyncThunk?.[ca];return function(n){let{name:i,reducerPath:s=i}=n;if(!i)throw new Error(he(11));typeof process<"u";let o=(typeof n.reducers=="function"?n.reducers(Dl()):n.reducers)||{},a=Object.keys(o),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},l={addCase(E,A){let O=typeof E=="string"?E:E.type;if(!O)throw new Error(he(12));if(O in c.sliceCaseReducersByType)throw new Error(he(13));return c.sliceCaseReducersByType[O]=A,l},addMatcher(E,A){return c.sliceMatchers.push({matcher:E,reducer:A}),l},exposeAction(E,A){return c.actionCreators[E]=A,l},exposeCaseReducer(E,A){return c.sliceCaseReducersByName[E]=A,l}};a.forEach(E=>{let A=o[E],O={reducerName:E,type:Nl(i,E),createNotation:typeof n.reducers=="function"};Ml(A)?Ul(O,A,l,t):Pl(O,A,l)});function u(){let[E={},A=[],O=void 0]=typeof n.extraReducers=="function"?aa(n.extraReducers):[n.extraReducers],w={...E,...c.sliceCaseReducersByType};return El(n.initialState,D=>{for(let H in w)D.addCase(H,w[H]);for(let H of c.sliceMatchers)D.addMatcher(H.matcher,H.reducer);for(let H of A)D.addMatcher(H.matcher,H.reducer);O&&D.addDefaultCase(O)})}let d=E=>E,p=new Map,m=new WeakMap,v;function b(E,A){return v||(v=u()),v(E,A)}function x(){return v||(v=u()),v.getInitialState()}function S(E,A=!1){function O(D){let H=D[E];return typeof H>"u"&&A&&(H=Vr(m,O,x)),H}function w(D=d){return Vr(Vr(p,A,()=>new WeakMap),D,()=>{let H={};for(let[or,Z]of Object.entries(n.selectors??{}))H[or]=kl(Z,D,()=>Vr(m,D,x),A);return H})}return{reducerPath:E,getSelectors:w,get selectors(){return w(O)},selectSlice:O}}let T={name:i,reducer:b,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:x,...S(s),injectInto(E,{reducerPath:A,...O}={}){let w=A??s;return E.inject({reducerPath:w,reducer:b},O),{...T,...S(w,!0)}}};return T}}function kl(e,t,r,n){function i(s,...o){let a=t(s);return typeof a>"u"&&n&&(a=r()),e(a,...o)}return i.unwrapped=e,i}var la=Ll();function Dl(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function Pl({type:e,reducerName:t,createNotation:r},n,i){let s,o;if("reducer"in n){if(r&&!Il(n))throw new Error(he(17));s=n.reducer,o=n.prepare}else s=n;i.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,o?Ne(e,o):Ne(e))}function Ml(e){return e._reducerDefinitionType==="asyncThunk"}function Il(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Ul({type:e,reducerName:t},r,n,i){if(!i)throw new Error(he(18));let{payloadCreator:s,fulfilled:o,pending:a,rejected:c,settled:l,options:u}=r,d=i(e,s,u);n.exposeAction(t,d),o&&n.addCase(d.fulfilled,o),a&&n.addCase(d.pending,a),c&&n.addCase(d.rejected,c),l&&n.addMatcher(d.settled,l),n.exposeCaseReducer(t,{fulfilled:o||jr,pending:a||jr,rejected:c||jr,settled:l||jr})}function jr(){}var ua="listener",da="completed",pa="cancelled",zp=`task-${pa}`,Kp=`task-${da}`,Wp=`${ua}-${pa}`,Gp=`${ua}-${da}`;var{assign:fa}=Object;var ti="listenerMiddleware";var $l=fa(Ne(`${ti}/add`),{withTypes:()=>$l}),qp=Ne(`${ti}/removeAll`),Bl=fa(Ne(`${ti}/remove`),{withTypes:()=>Bl});function he(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Hl=xr(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,i){this.eventBus.addEventListener(r,n,i)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,i){this.eventBus.removeEventListener(r,n,i)}}}),zr=class extends Hl(Object){};window.ftReduxStores||(window.ftReduxStores={});var ha=class e extends zr{static get(t){var r;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,s=window.ftReduxStores[n];if(Sr(s))return s;if(i==null)return;let o=la({...i,reducers:(r=i.reducers)!==null&&r!==void 0?r:{}}),a=oa({reducer:(c,l)=>{if(l.type==="CLEAR_FT_REDUX_STORE"){let u=$t(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[i.name]=new e(o,a,i.eventBus,i.deprecatedKeys)}constructor(t,r,n,i){super(),this.reduxSlice=t,this.reduxStore=r,this.deprecatedKeys=i,this.isFtReduxStore=!0,this.commands=new vr,this.injectInto=(o,a)=>this.reduxSlice.injectInto(o,a),this.selectSlice=o=>this.reduxSlice.selectSlice(o);let s=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 p=u(...d.map(s));return this.reduxStore.dispatch(p),p}:d=>{let p=l,m=this.getState()[p];ft(m,d)||this.setState({[p]:s(d)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};var Kr=class{static format(t,r,n,i,s){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(n,i,!!s)):this.getIntlDateTime(t,r,n,i,!!s)}static getMomentDateFormat(t,r,n){return n?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,n,i,s){let o=typeof t=="string"?new Date(t):t,a=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(o),c=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(o);return s?c:i?`${a} ${c}`:a}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var ma=y(C()),Wr=function(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s},_f=(0,ma.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(_)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var i,s;return((s=(i=this.metadataDescriptors.find(a=>a.key===n))===null||i===void 0?void 0:i.date)!==null&&s!==void 0?s:!1)?a=>Kr.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Wr([(0,ri.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Wr([(0,ri.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Wr([In({store:_.name,selector:r=>{var n,i;return(i=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&i!==void 0?i:[]}})],t.prototype,"metadataDescriptors",void 0),Wr([In({store:_.name})],t.prototype,"uiLocale",void 0),t});var ni=class{addCommand(t,r=!1){_.commands.add(t,r)}consumeCommand(t){return _.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new ni;var re=y(C());var ya,xt=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Fl=Symbol("clearAfterUnitTest"),Gr=class extends(0,re.withEventBus)(Y){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[ya]=()=>{this.defaultMessages={},this.cache=new re.CacheRegistry,this.listeners={}},this.currentUiLocale=_.getState().uiLocale,_.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=_.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var n;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let i={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,re.deepEqual)(this.defaultMessages[t],i)||(this.defaultMessages[t]=i,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,n;return this.fetchContext(t),(n=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,r){let n=t.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(t,r,...n){var i;let s=t.toLowerCase(),o=this.resolveContext(s);return new re.ParametrizedLabelResolver((i=this.defaultMessages[s])!==null&&i!==void 0?i:{},o).resolve(r,...n)}async fetchContext(t){let r=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(i){!(i instanceof re.CanceledPromiseError)&&r&&console.error(i)}return n}subscribe(t,r){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(r),()=>{var i;return(i=this.listeners[t])===null||i===void 0?void 0:i.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new xt({loadedContexts:t})),this.dispatchEvent(new xt({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new xt({loadedContexts:[t]})),this.dispatchEvent(new xt({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,re.delay)(0).then(()=>n()).catch(()=>null)))}};ya=Fl;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Gr{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Gr{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var vt=window.FluidTopicsI18nService,qr=window.FluidTopicsCustomI18nService;var ga=y(C()),ii=class{highlightHtml(t,r,n){(0,ga.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new ii;var xa=y(C());var si=class{isDate(t){var r,n,i,s;return(s=(n=((i=(r=_.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&i!==void 0?i:[]).find(a=>a.key===t))===null||n===void 0?void 0:n.date)!==null&&s!==void 0?s:!1}format(t,r){var n,i,s,o;if(t==null)return"";try{return xa.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:_.getState().uiLocale,(i=r?.longFormat)!==null&&i!==void 0?i:!1,(s=r?.withTime)!==null&&s!==void 0?s:!1,(o=r?.onlyTime)!==null&&o!==void 0?o:!1)}catch(a){throw console.error(`Date ${JSON.stringify(t)} is not valid`,a),a}}};window.FluidTopicsDateService=new si;var va=y(C());var qt=class{static get(t,r,{baseUrl:n,localesConfiguration:i,availableContentLocales:s}=_.getState()){var o;if(r==="all"&&i?.allLanguagesAllowed)r=void 0;else if(!r||s.length>0&&!s.some(a=>a.lang===r)){let a=i?.defaultLocales.defaultContentLocale;r=a?`${a.lang}-${a.region}`:(o=s[0])===null||o===void 0?void 0:o.lang}return new va.SearchPlaceConverter(n,t??20,i?.allLanguagesAllowed,r,s)}};var oi=class{urlToSearchRequest(t){return qt.get().parse(t)}searchRequestToUrl(t){return qt.get().serialize(t)}};window.FluidTopicsUrlService=new oi;var be=y(C());var et=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{nextLocation:t}})}};et.eventName="before-location-change";var tt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};tt.eventName="change";var ai=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let r=sessionStorage.getItem(this.itemName(t));return r?JSON.parse(r):void 0}set(t,r){sessionStorage.setItem(this.itemName(t),JSON.stringify(r))}},Ea=new ai;var Yr=class e extends be.WithEventBus{static build(){return new e(window.history,Ea,()=>window.location,!1)}constructor(t,r,n,i){var s,o;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(o=(s=t.state)===null||s===void 0?void 0:s.index)!==null&&o!==void 0?o:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(t,r=!1){let n=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,be.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new tt(this.currentItem())),0)}installProxies(){let t=r=>(n,i,[s,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 et(c);this.dispatchEvent(l);let u=r(),d={...u===this.currentIndex?this.currentState:void 0,...s,index:u,href:l.detail.nextLocation.href};n.apply(i,[d,o,d.href]),this.setCurrentState(d,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addBeforeLocationChangeListener(t){this.addEventListener(et.eventName,t)}removeBeforeLocationChangeListener(t){this.removeEventListener(et.eventName,t)}addHistoryChangeListener(t){this.addEventListener(tt.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(tt.eventName,t)}currentItem(){return(0,be.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,be.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,be.deepCopy)(r.find(n=>t(n)))}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,be.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let n=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!n)return t;let i=t,s=t+1;for(;this.states.length>s&&!this.isDifferentMajorState(s,n);)this.hasState(s)&&(i=s),s++;return i}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var n;if(!this.hasState(t))return!1;let i=r??this.currentState.majorStateId,s=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return s==null||s!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Yr.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e),addBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(e),removeBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(e)});var Aa=y(V());var ba=Aa.css`
330
330
  `;var Ca=y(V()),j=y(z()),nt=y(C());var me=y(C());function Sa(e,t){let{authenticationRequired:r,session:n}=_.getState();return r&&!n?.sessionAuthenticated?Promise.resolve(t):e()}var Xr=class extends dt{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var ci=class e extends me.FtStateManager{static build(t){return new e(_,t)}constructor(t,r){super(),this.store=t,this.cache=new me.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new Xr,this.knownContexts=new me.AbstractRegistry,this.knownCustomComponents=new me.AbstractRegistry,this.cleanSessionDebouncer=new me.Debouncer,this.reloadConfiguration=()=>{var n;(n=this.cache)===null||n===void 0||n.clear("availableContentLocales"),this.updateAvailableContentLocales()},this.reloadDebouncer=new me.Debouncer(500),this.apiProvider=r??(()=>Ye.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}addListeners(){this.store.addEventListener(qe.eventName,this.reloadConfiguration)}removeListeners(){this.store.removeEventListener(qe.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.store.getState().localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let t=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},r.idleTimeoutInMillis),r});this.setSession(t)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var t;let r=await this.cache.get("availableContentLocales",()=>Sa(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((t=r.contentLocales)!==null&&t!==void 0?t:[])}setStickyFilters(t){this.store.actions.stickyFilters(t)}setBaseUrl(t){this.store.actions.baseUrl(t),window.fluidTopicsBaseUrl=t}setTenantId(t){this.store.actions.tenantId(t)}setApiIntegrationIdentifier(t){this.store.actions.apiIntegrationIdentifier(t)}setApiIntegrationAppVersion(t){this.store.actions.apiIntegrationAppVersion(t)}setUiLocale(t){this.store.actions.uiLocale(t)}setLocalesConfiguration(t){this.store.actions.localesConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(t){this.store.actions.availableContentLocales(t),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(t,r){this.userLocaleService.updateUiLocale({uiLocale:t,contentLocale:r}).then(n=>{n.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new Pt(n)))}).catch(()=>{})}setMetadataConfiguration(t){this.store.actions.metadataConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setNoCustom(t){this.store.actions.noCustom(t)}setEditorMode(t){this.store.actions.editorMode(t)}setNoCustomComponent(t){this.store.actions.noCustomComponent(t)}setNoCustomCode(t){this.store.actions.noCustomCode(t)}setSession(t){this.store.actions.session(t),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(t){this.store.actions.openExternalDocumentInNewTab(t)}setNavigatorOnline(t){this.store.actions.navigatorOnline(t)}setForcedOffline(t){this.store.actions.forcedOffline(t)}setAuthenticationRequired(t){this.store.actions.authenticationRequired(t)}userHasAnyRole(...t){return Js(_.getState().session,...t)}},_a=ci.build();var rt=class extends Event{constructor(t,r,n,i){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=r,this.callback=n,this.subscribe=i??!1}};var Yt=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{let r=this.pendingContextRequests.get(t.context);if(r===void 0)return;this.pendingContextRequests.delete(t.context);let{requests:n}=r;for(let{elementRef:i,callbackRef:s}of n){let o=i.deref(),a=s.deref();o===void 0||a===void 0||o.dispatchEvent(new rt(t.context,o,a,!0))}},this.onContextRequest=t=>{if(t.subscribe!==!0)return;let r=t.contextTarget??t.composedPath()[0],n=t.callback,i=this.pendingContextRequests.get(t.context);i===void 0&&this.pendingContextRequests.set(t.context,i={callbacks:new WeakMap,requests:[]});let s=i.callbacks.get(r);s===void 0&&i.callbacks.set(r,s=new WeakSet),s.has(n)||(s.add(n),i.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(n)}))}}attach(t){t.addEventListener("context-request",this.onContextRequest),t.addEventListener("context-provider",this.onContextProvider)}detach(t){t.removeEventListener("context-request",this.onContextRequest),t.removeEventListener("context-provider",this.onContextProvider)}};var U=function(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s},R=class extends nt.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=_a,this.contextRoot=new Yt}render(){return Ca.html`
331
331
  <slot></slot>
332
332
  `}connectedCallback(){super.connectedCallback(),this.stateManager.addListeners(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.stateManager.removeListeners(),this.contextRoot.detach(document.body)}update(t){var r;super.update(t),t.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),t.has("tenantId")&&this.stateManager.setTenantId(this.tenantId),t.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),t.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),t.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),t.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),t.has("noCustomCode")&&this.stateManager.setNoCustomCode(this.noCustomCode),t.has("session")&&this.stateManager.setSession(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(n=>vt.addContext(n)),t.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),t.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),t.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};R.elementDefinitions={};R.styles=ba;U([(0,j.property)()],R.prototype,"baseUrl",void 0);U([(0,j.property)()],R.prototype,"tenantId",void 0);U([(0,j.property)()],R.prototype,"apiIntegrationIdentifier",void 0);U([(0,j.property)()],R.prototype,"apiIntegrationAppVersion",void 0);U([(0,j.property)()],R.prototype,"uiLocale",void 0);U([(0,nt.jsonProperty)(null)],R.prototype,"availableUiLocales",void 0);U([(0,nt.jsonProperty)(null)],R.prototype,"metadataConfiguration",void 0);U([(0,j.property)({type:Boolean})],R.prototype,"editorMode",void 0);U([(0,j.property)({type:Boolean})],R.prototype,"noCustom",void 0);U([(0,j.property)({type:Boolean})],R.prototype,"openExternalDocumentInNewTab",void 0);U([(0,j.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],R.prototype,"noCustomComponent",void 0);U([(0,j.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],R.prototype,"noCustomCode",void 0);U([(0,j.property)({type:Boolean})],R.prototype,"withManualResources",void 0);U([(0,j.property)({type:Boolean})],R.prototype,"navigatorOnline",void 0);U([(0,j.property)({type:Boolean})],R.prototype,"forcedOffline",void 0);U([(0,j.property)({type:Boolean})],R.prototype,"authenticationRequired",void 0);U([(0,nt.jsonProperty)([])],R.prototype,"messageContexts",void 0);U([(0,nt.jsonProperty)(void 0)],R.prototype,"session",void 0);var Ta=y(C());var wa={"ft-app-context":R};(0,Ta.customElements)(wa);var Jr=class e{static build(t){return new e(t)}static buildCustom(t){return new e(t,!0)}static fromGwt(t){return new e(t)}get service(){return this.custom?qr:vt}constructor(t,r=!1){this.name=t,this.custom=r,this.properties=new Proxy({},{get:(n,i)=>{let s=i;return o=>({context:this.name,key:s,custom:this.custom,args:typeof o=="function"?void 0:o,argsProvider:typeof o=="function"?o:void 0})}}),this.messages=new Proxy({},{get:(n,i)=>(...s)=>this.service.resolveMessage(this.name,i,...s)}),this.rawMessages=new Proxy({},{get:(n,i)=>this.service.resolveRawMessage(this.name,i)}),this.keys=new Proxy({},{get:(n,i)=>()=>i}),this.attributes=new Proxy({},{get:(n,i)=>()=>({context:this.name,key:i,message:this.service.resolveRawMessage(this.name,i)})})}};var At=y(C());var Oa=y(z());var li=class{fromLocalizableLabel(t){return t.type=="PLAIN_TEXT"?{message:t.text}:{key:t.key,custom:t.type=="LOCALIZED_CUSTOM",context:t.context,message:t.key}}fromAttribute(t){if(t!=null)try{return JSON.parse(t)}catch{if(this.isI18nKey(t)){let[r,n]=t.split(".");return{context:r,key:n,custom:r!=="officialContext",message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},Et=new li;var zl=function(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s},Jt=Symbol("i18nAttributes"),Ra=Symbol("i18nListAttributes"),Na=Symbol("i18nProperties"),Qr=Symbol("i18nContexts"),Xt=Symbol("i18nUnsubs"),tn=(0,At.applyMixinOnce)(Symbol("withI18n"),function(e){var t,r;class n extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[r]=new Map}getI18nService(s){return s??this.useCustomMessageContexts?qr:vt}i18n(s){let{context:o,key:a,message:c}=s,{custom:l,args:u,argsProvider:d}=s;if(o&&a){this.hasI18nContext(o)||this.addI18nContext(o,void 0,l);let p=u??(d?d(this):[]);return this.getI18nService(l).resolveMessage(o,a,...p)}return c}async awaitI18n(s){let{context:o,custom:a}=s;return o&&await this.getI18nService(a).prepareContext(o),this.i18n(s)}customI18n(s,o){if(Et.isI18nKey(s)){let[a,c]=s.split(".");return this.i18n({custom:!0,context:a,key:c,...o})||s}return s}firstUpdated(s){super.firstUpdated(s),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(s){super.update(s),this.updateI18nAttributes((o,a,c)=>s.has(a)||typeof o.argsProvider=="function"),this.updateI18nProperties(o=>typeof o.argsProvider=="function")}onI18nUpdate(s){this.updateI18nAttributes((o,a,c)=>{var l;return((l=c?.context)===null||l===void 0?void 0:l.toLowerCase())===s}),this.updateI18nProperties(o=>o.context.toLowerCase()===s),this.requestUpdate()}updateI18nAttributes(s){var o,a;let c=this,l=(u,d,p)=>p?.context&&p.key&&s(u,d,p)?{...p,message:this.i18n({context:p.context,key:p.key,custom:p.custom,...u})}:p;(o=this[Jt])===null||o===void 0||o.forEach((u,d)=>c[d]=l(u,d,c[d])),(a=this[Ra])===null||a===void 0||a.forEach((u,d)=>{var p;return c[d]=(p=c[d])===null||p===void 0?void 0:p.map(m=>l(u,d,m))})}updateI18nProperties(s){var o;(o=this[Na])===null||o===void 0||o.forEach((a,c)=>{s(a,c)&&(this[c]=this.i18n(a))})}addI18nMessages(s,o,a){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(s,o,a)}addI18nContext(s,o,a){let c=(typeof s=="string"?s:s.name).toLowerCase();a=typeof s=="string"?a:s.custom,this[Qr].set(c,{isCustomContext:a}),this[Xt].has(c)||this[Xt].set(c,this.getI18nService(a).subscribe(c,()=>this.onI18nUpdate(c))),this.getI18nService(a).prepareContext(c,o)}hasI18nContext(s){return this[Qr].has(s.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Qr].forEach((s,o)=>this.addI18nContext(o,void 0,s.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Xt].forEach(s=>s()),this[Xt].clear()}}return t=Qr,r=Xt,zl([(0,Oa.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),Zr=class extends tn(At.FtLitElement){},en=class extends tn(At.FtLitElementRedux){};var La=y(V());var ka=La.css`