@fluid-topics/ft-reader-saved-bookmarks 2.2.26 → 2.2.27
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,go.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 we.file_format:this.resolvedIcon=(t=h[n.replace("-","_").toUpperCase()])!==null&&t!==void 0?t:n;break;case we.material:this.resolvedIcon=this.value||Mt.nothing;break;default:this.resolvedIcon=(r=dt[n.replace("-","_").toUpperCase()])!==null&&r!==void 0?r:n;break}}firstUpdated(t){super.firstUpdated(t),setTimeout(()=>this.resolveIcon())}};X.elementDefinitions={};X.styles=fo;It([(0,Te.property)()],X.prototype,"variant",void 0);It([(0,Te.property)()],X.prototype,"value",void 0);It([(0,Te.property)({reflect:!0,attribute:"aria-hidden"})],X.prototype,"ariaHidden",void 0);It([(0,Te.state)()],X.prototype,"resolvedIcon",void 0);It([(0,Te.query)("slot")],X.prototype,"slottedContent",void 0);var vo=y(C());var xo={"ft-icon":X};(0,vo.customElements)(xo);var ri=y(z());var Eo=y(z(),1);var Mn=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)},Vc=e=>({fromAttribute:t=>{if(t==null)return Ut(e);try{return JSON.parse(t)}catch{return Ut(e)}},toAttribute:t=>JSON.stringify(t)});function Ao(e,t){return(0,Eo.property)({type:Object,converter:Vc(e),hasChanged:$t,...t??{}})}function jc(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(!pt(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(!pt(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(!pt(e[o],t[o]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function pt(e,t){try{return jc(e,t)}catch{return!1}}function $t(e,t){return!pt(e,t)}function Ut(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function gr(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 bo=y(z(),1);var In=e=>{let t=e??{};return(r,n)=>{var i;let s={hasChanged:$t,attribute:!1,...t};(0,bo.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 xr=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 Xe=y(z(),1);var vr=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 Ar=y(V(),1);var Er=class extends Ar.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,Ar.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 So(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 ht=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},To,_o=Symbol("constructorPrototype"),Co=Symbol("constructorName"),Oo=Symbol("exportpartsDebouncer"),wo=Symbol("dynamicDependenciesLoaded"),ft=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};ft.eventName="exportparts-updated";var pe=class extends Er{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[To]=new vr(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[Oo].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[Co]=this.constructor.name,this[_o]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Co]&&Object.setPrototypeOf(this,this[_o])}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[wo]||(r[wo]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(ft.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(ft.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 ft)})}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=So(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(", ")}};To=Oo;ht([(0,Xe.property)()],pe.prototype,"exportpartsPrefix",void 0);ht([Ao([])],pe.prototype,"exportpartsPrefixes",void 0);ht([(0,Xe.property)({reflect:!0})],pe.prototype,"exportparts",void 0);ht([(0,Xe.property)()],pe.prototype,"customStylesheet",void 0);ht([(0,Xe.property)()],pe.prototype,"elementToFocus",void 0);ht([(0,Xe.state)()],pe.prototype,"useAdoptedStyleSheets",void 0);function br(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Bt=Symbol("internalReduxEventsUnsubscribers"),Oe=Symbol("internalStoresUnsubscribers"),Je=Symbol("internalStores"),zc=gr(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[Je].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Je].values()][0]}getStore(o){return o==null?this.getUnnamedStore():this[Je].get(o)}addStore(o,a){var c;a=(c=a??o.name)!==null&&c!==void 0?c:"default-store",this.unsubscribeFromStore(a),this[Je].set(a,o),this.subscribeToStore(a,o),this.updateFromStores()}removeStore(o){let a=typeof o=="string"?o:o.name;this.unsubscribeFromStore(a),this[Je].delete(a)}setupStores(){this.unsubscribeFromStores(),this[Je].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[Oe].has(o.store):this[Oe].size>0)&&(this[a]=o.selector(l.getState(),this))}})}subscribeToStore(o,a){var c;this[Oe].set(o,a.subscribe(()=>this.updateFromStores())),this[Bt].set(o,[]),br(a)&&a.eventBus&&((c=this.reduxConstructor.reduxEventListeners)===null||c===void 0||c.forEach((l,u)=>{if(typeof this[u]=="function"&&(!l.store||a.name===l.store)){let d=p=>this[u](p);a.addEventListener(l.eventName,d),this[Bt].get(o).push(()=>a.removeEventListener(l.eventName,d))}})),this.onStoreAvailable(o)}unsubscribeFromStores(){this[Oe].forEach((o,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(o){var a;this[Oe].has(o)&&this[Oe].get(o)(),this[Oe].delete(o),(a=this[Bt].get(o))===null||a===void 0||a.forEach(c=>c()),this[Bt].delete(o)}onStoreAvailable(o){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=Oe,r=Je,n=Bt,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),Ro=class extends zc(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 Kc=typeof Symbol=="function"&&Symbol.observable||"@@observable",No=Kc,Un=()=>Math.random().toString(36).substring(7).split("").join("."),Wc={INIT:`@@redux/INIT${Un()}`,REPLACE:`@@redux/REPLACE${Un()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Un()}`},Sr=Wc;function _r(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(!_r(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:Sr.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)}},[No](){return this}}}return p({type:Sr.INIT}),{dispatch:p,subscribe:d,getState:u,replaceReducer:m,[No]:v}}function Gc(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Sr.INIT})>"u")throw new Error(B(12));if(typeof r(void 0,{type:Sr.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{Gc(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 Ht(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function Lo(...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=Ht(...a)(i.dispatch),{...i,dispatch:s}}}function ko(e){return _r(e)&&"type"in e&&typeof e.type=="string"}var Fo=Symbol.for("immer-nothing"),Do=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,yt=J.getPrototypeOf,Or="constructor",Pr="prototype",jn="configurable",Rr="enumerable",wr="writable",Ft="value",fe=e=>!!e&&!!e[F];function Q(e){return e?Vo(e)||Ir(e)||!!e[Do]||!!e[Or]?.[Do]||Ur(e)||$r(e):!1}var qc=J[Pr][Or].toString(),Po=new WeakMap;function Vo(e){if(!e||!Jn(e))return!1;let t=yt(e);if(t===null||t===J[Pr])return!0;let r=J.hasOwnProperty.call(t,Or)&&t[Or];if(r===Object)return!0;if(!mt(r))return!1;let n=Po.get(r);return n===void 0&&(n=Function.toString.call(r),Po.set(r,n)),n===qc}function Mr(e,t,r=!0){zt(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 zt(e){let t=e[F];return t?t.type_:Ir(e)?1:Ur(e)?2:$r(e)?3:0}var Hn=(e,t,r=zt(e))=>r===2?e.has(t):J[Pr].hasOwnProperty.call(e,t),zn=(e,t,r=zt(e))=>r===2?e.get(t):e[t],Nr=(e,t,r,n=zt(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function Yc(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Ir=Array.isArray,Ur=e=>e instanceof Map,$r=e=>e instanceof Set,Jn=e=>typeof e=="object",mt=e=>typeof e=="function",Fn=e=>typeof e=="boolean";function Xc(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var Ee=e=>e.copy_||e.base_;var Qn=e=>e.modified_?e.copy_:e.base_;function Kn(e,t){if(Ur(e))return new Map(e);if($r(e))return new Set(e);if(Ir(e))return Array[Pr].slice.call(e);let r=Vo(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[wr]===!1&&(a[wr]=!0,a[jn]=!0),(a.get||a.set)&&(n[o]={[jn]:!0,[wr]:!0,[Rr]:a[Rr],[Ft]:e[o]})}return J.create(yt(e),n)}else{let n=yt(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)||(zt(e)>1&&J.defineProperties(e,{set:Cr,add:Cr,clear:Cr,delete:Cr}),J.freeze(e),t&&Mr(e,(r,n)=>{Br(n,!0)},!1)),e}function Jc(){ce(2)}var Cr={[Ft]:Jc};function Hr(e){return e===null||!Jn(e)?!0:J.isFrozen(e)}var Lr="MapSet",Wn="Patches",Mo="ArrayMethods",jo={};function Qe(e){let t=jo[e];return t||ce(0,e),t}var Io=e=>!!jo[e];var Vt,zo=()=>Vt,Qc=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Io(Lr)?Qe(Lr):void 0,arrayMethodsPlugin_:Io(Mo)?Qe(Mo):void 0});function Uo(e,t){t&&(e.patchPlugin_=Qe(Wn),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Gn(e){qn(e),e.drafts_.forEach(Zc),e.drafts_=null}function qn(e){e===Vt&&(Vt=e.parent_)}var $o=e=>Vt=Qc(Vt,e);function Zc(e){let t=e[F];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Bo(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=Ho(t,e));let{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(r[F].base_,e,t)}else e=Ho(t,r);return el(t,e,!0),Gn(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Fo?e:void 0}function Ho(e,t){if(Hr(t))return t;let r=t[F];if(!r)return kr(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);Go(r,e)}return r.copy_}function el(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Br(t,r)}function Ko(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Fr=(e,t)=>e.scope_===t,tl=[];function Wo(e,t,r,n){let i=Ee(e),s=e.type_;if(n!==void 0&&zn(i,n,s)===t){Nr(i,n,r,s);return}if(!e.draftLocations_){let a=e.draftLocations_=new Map;Mr(i,(c,l)=>{if(fe(l)){let u=a.get(l)||[];u.push(c),a.set(l,u)}})}let o=e.draftLocations_.get(t)??tl;for(let a of o)Nr(i,a,r,s)}function rl(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);Wo(e,s.draft_??s,o,r),Go(s,i)})}function Go(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)}Ko(e)}}function nl(e,t,r){let{scope_:n}=e;if(fe(r)){let i=r[F];Fr(i,n)&&i.callbacks_.push(function(){Tr(e);let o=Qn(i);Wo(e,r,o,t)})}else Q(r)&&e.callbacks_.push(function(){let s=Ee(e);e.type_===3?s.has(r)&&kr(r,n.handledSet_,n):zn(s,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&kr(zn(e.copy_,t,e.type_),n.handledSet_,n)})}function kr(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||fe(e)||t.has(e)||!Q(e)||Hr(e)||(t.add(e),Mr(e,(n,i)=>{if(fe(i)){let s=i[F];if(Fr(s,r)){let o=Qn(s);Nr(e,n,o,e.type_),Ko(s)}}else Q(i)&&kr(i,t,r)})),e}function il(e,t){let r=Ir(e),n={type_:r?1:0,scope_:t?t.scope_:zo(),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=Dr;r&&(i=[n],s=jt);let{revoke:o,proxy:a}=Proxy.revocable(i,s);return n.draft_=a,n.revoke_=o,[a,n]}var Dr={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=Ee(e);if(!Hn(i,t,e.type_))return ol(e,i,t);let s=i[t];if(e.finalized_||!Q(s)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&Xc(t))return s;if(s===Vn(e.base_,t)||sl(e,t,s)){Tr(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 Ee(e)},ownKeys(e){return Reflect.ownKeys(Ee(e))},set(e,t,r){let n=qo(Ee(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let i=Vn(Ee(e),t),s=i?.[F];if(s&&s.base_===r)return e.copy_[t]=r,e.assigned_.delete(t),!0;if(Yc(r,i)&&(r!==void 0||Hn(e.base_,t,e.type_)))return!0;Tr(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),nl(e,t,r)),!0},deleteProperty(e,t){return Tr(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=Ee(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[wr]:!0,[jn]:e.type_!==1||t!=="length",[Rr]:n[Rr],[Ft]:r[t]}},defineProperty(){ce(11)},getPrototypeOf(e){return yt(e.base_)},setPrototypeOf(){ce(12)}},jt={};for(let e in Dr){let t=Dr[e];jt[e]=function(){let r=arguments;return r[0]=r[0][0],t.apply(this,r)}}jt.deleteProperty=function(e,t){return jt.set.call(this,e,t,void 0)};jt.set=function(e,t,r){return Dr.set.call(this,e[0],t,r,e[0])};function Vn(e,t){let r=e[F];return(r?Ee(r):e)[t]}function sl(e,t,r){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!Q(r)||r[F]?!1:e.baseRefs_.has(r)}function ol(e,t,r){let n=qo(t,r);return n?Ft in n?n[Ft]:n.get?.call(e.draft_):void 0}function qo(e,t){if(!(t in e))return;let r=yt(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=yt(r)}}function Yn(e){e.modified_||(e.modified_=!0,e.parent_&&Yn(e.parent_))}function Tr(e){e.copy_||(e.assigned_=new Map,e.copy_=Kn(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var al=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(mt(t)&&!mt(r)){let s=r;r=t;let o=this;return function(c=s,...l){return o.produce(c,u=>r.call(this,u,...l))}}mt(r)||ce(6),n!==void 0&&!mt(n)&&ce(7);let i;if(Q(t)){let s=$o(this),o=Xn(s,t,void 0),a=!0;try{i=r(o),a=!1}finally{a?Gn(s):qn(s)}return Uo(s,n),Bo(i,s)}else if(!t||!Jn(t)){if(i=r(t),i===void 0&&(i=t),i===Fo&&(i=void 0),this.autoFreeze_&&Br(i,!0),n){let s=[],o=[];Qe(Wn).generateReplacementPatches_(t,i,{patches_:s,inversePatches_:o}),n(s,o)}return i}else ce(1,t)},this.produceWithPatches=(t,r)=>{if(mt(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=Yo(e));let t=$o(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 Uo(n,t),Bo(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=Qe(Wn).applyPatches_;return fe(e)?n(e,t):this.produce(e,i=>n(i,t))}};function Xn(e,t,r,n){let[i,s]=Ur(t)?Qe(Lr).proxyMap_(t,r):$r(t)?Qe(Lr).proxySet_(t,r):il(t,r);return(r?.scope_??zo()).drafts_.push(i),s.callbacks_=r?.callbacks_??[],s.key_=n,r&&n!==void 0?rl(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 Yo(e){return fe(e)||ce(10,e),Xo(e)}function Xo(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);return Mr(r,(i,s)=>{Nr(r,i,Xo(s))},n),t&&(t.finalized_=!1),r}var cl=globalThis.Iterator,Pp=typeof cl?.from=="function";var ll=new al,Zn=ll.produce;function Jo(e){return({dispatch:r,getState:n})=>i=>s=>typeof s=="function"?s(r,n,e):i(s)}var Qo=Jo(),Zo=Jo;var ul=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ht:Ht.apply(null,arguments)};typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var dl=e=>e&&typeof e.match=="function";function Re(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=>ko(n)&&n.type===e,r}var ia=class Kt extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Kt.prototype)}static get[Symbol.species](){return Kt}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Kt(...t[0].concat(this)):new Kt(...t.concat(this))}};function ea(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 pl(e){return typeof e=="boolean"}var fl=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:s=!0}=t??{},o=new ia;return r&&(pl(r)?o.push(Qo):o.push(Zo(r.extraArgument))),o},hl="RTK_autoBatch";var ta=e=>t=>{setTimeout(t,e)},ml=(e,t)=>r=>{let n=!1,i,s,o=()=>{n||(n=!0,cancelAnimationFrame(i),clearTimeout(s),r())};i=e(o),s=setTimeout(o,t)},yl=(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?ml(window.requestAnimationFrame,100):ta(10):e.type==="callback"?e.queueNotification:ta(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?.[hl],s=!i,s&&(o||(o=!0,c(l))),n.dispatch(u)}finally{i=!0}}})},gl=e=>function(r){let{autoBatch:n=!0}=r??{},i=new ia(e);return n&&i.push(yl(typeof n=="object"?n:void 0)),i};function sa(e){let t=fl(),{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(_r(r))c=Bn(r);else throw new Error(he(1));let l;typeof n=="function"?l=n(t):l=t();let u=Ht;i&&(u=ul({trace:!1,...typeof i=="object"&&i}));let d=Lo(...l),p=gl(d),m=typeof a=="function"?a(p):p(),v=u(...m);return $n(c,o,v)}function oa(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 xl(e){return typeof e=="function"}function vl(e,t){let[r,n,i]=oa(t),s;if(xl(e))s=()=>ea(e());else{let a=ea(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 El=(e,t)=>dl(e)?e.match(t):e(t);function Al(...e){return t=>e.some(r=>El(r,t))}var bl="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Sl=(e=21)=>{let t="",r=e;for(;r--;)t+=bl[Math.random()*64|0];return t},_l=["name","message","stack","code"],ei=class{payload;meta;_type;constructor(e,t){this.payload=e,this.meta=t}},ra=class{payload;meta;_type;constructor(e,t){this.payload=e,this.meta=t}},Cl=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of _l)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},na="External signal was aborted",wl=(()=>{function e(t,r,n){let i=Re(t+"/fulfilled",(c,l,u,d)=>({payload:c,meta:{...d||{},arg:u,requestId:l,requestStatus:"fulfilled"}})),s=Re(t+"/pending",(c,l,u)=>({payload:void 0,meta:{...u||{},arg:l,requestId:c,requestStatus:"pending"}})),o=Re(t+"/rejected",(c,l,u,d,p)=>({payload:d,error:(n&&n.serializeError||Cl)(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):Sl(),v=new AbortController,b,x;function S(E){x=E,v.abort()}l&&(l.aborted?S(na):l.addEventListener("abort",()=>S(na),{once:!0}));let T=(async function(){let E;try{let A=n?.condition?.(c,{getState:d,extra:p});if(Ol(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 ra(w,D))})).then(w=>{if(w instanceof ei)throw w;return w instanceof ra?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(Tl)}})}}return Object.assign(a,{pending:s,rejected:o,fulfilled:i,settled:Al(o,i),typePrefix:t})}return e.withTypes=()=>e,e})();function Tl(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Ol(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var aa=Symbol.for("rtk-slice-createasyncthunk"),Vp={[aa]:wl};function Rl(e,t){return`${e}/${t}`}function Nl({creators:e}={}){let t=e?.asyncThunk?.[aa];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(kl()):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:Rl(i,E),createNotation:typeof n.reducers=="function"};Pl(A)?Il(O,A,l,t):Dl(O,A,l)});function u(){let[E={},A=[],O=void 0]=typeof n.extraReducers=="function"?oa(n.extraReducers):[n.extraReducers],w={...E,...c.sliceCaseReducersByType};return vl(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[ir,Z]of Object.entries(n.selectors??{}))H[ir]=Ll(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 Ll(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 ca=Nl();function kl(){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 Dl({type:e,reducerName:t,createNotation:r},n,i){let s,o;if("reducer"in n){if(r&&!Ml(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?Re(e,o):Re(e))}function Pl(e){return e._reducerDefinitionType==="asyncThunk"}function Ml(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Il({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 la="listener",ua="completed",da="cancelled",jp=`task-${da}`,zp=`task-${ua}`,Kp=`${la}-${da}`,Wp=`${la}-${ua}`;var{assign:pa}=Object;var ti="listenerMiddleware";var Ul=pa(Re(`${ti}/add`),{withTypes:()=>Ul}),Gp=Re(`${ti}/removeAll`),$l=pa(Re(`${ti}/remove`),{withTypes:()=>$l});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 Bl=gr(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 Bl(Object){};window.ftReduxStores||(window.ftReduxStores={});var fa=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(br(s))return s;if(i==null)return;let o=ca({...i,reducers:(r=i.reducers)!==null&&r!==void 0?r:{}}),a=sa({reducer:(c,l)=>{if(l.type==="CLEAR_FT_REDUX_STORE"){let u=Ut(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)}constructor(t,r,n){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new xr,this.injectInto=(s,o)=>this.reduxSlice.injectInto(s,o),this.selectSlice=s=>this.reduxSlice.selectSlice(s);let i=s=>s!=null?JSON.parse(JSON.stringify(s)):s;this.actions=new Proxy(this.reduxSlice.actions,{get:(s,o,a)=>{let c=o,l=s[c];return l?(...u)=>{let d=l(...u.map(i));return this.reduxStore.dispatch(d),d}:u=>{let d=c,p=this.getState()[d];pt(p,u)||this.setState({[d]:i(u)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};var 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 ha=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},Sf=(0,ha.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 ma,gt=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Hl=Symbol("clearAfterUnitTest"),Gr=class extends(0,re.withEventBus)(Y){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[ma]=()=>{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 gt({loadedContexts:t})),this.dispatchEvent(new gt({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new gt({loadedContexts:[t]})),this.dispatchEvent(new gt({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,re.delay)(0).then(()=>n()).catch(()=>null)))}};ma=Hl;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 xt=window.FluidTopicsI18nService,qr=window.FluidTopicsCustomI18nService;var ya=y(C()),ii=class{highlightHtml(t,r,n){(0,ya.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new ii;var ga=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 ga.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 xa=y(C());var Wt=class{static get(t,r){var n,i,s,o;let a=_.getState(),{lang:c,region:l}=(o=(i=(n=a.localesConfiguration)===null||n===void 0?void 0:n.defaultLocales)===null||i===void 0?void 0:i.defaultContentLocale)!==null&&o!==void 0?o:{lang:"en",region:"US"};return new xa.SearchPlaceConverter(a.baseUrl,t??20,(s=a.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,r??`${c}-${l}`)}};var oi=class{urlToSearchRequest(t){return Wt.get().parse(t)}searchRequestToUrl(t){return Wt.get().serialize(t)}};window.FluidTopicsUrlService=new oi;var Ae=y(C());var Ze=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{nextLocation:t}})}};Ze.eventName="before-location-change";var et=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};et.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))}},va=new ai;var Yr=class e extends Ae.WithEventBus{static build(){return new e(window.history,va,()=>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,Ae.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new et(this.currentItem())),0)}installProxies(){let t=r=>(n,i,[s,o,a])=>{let c=new Ze(new URL(typeof a=="string"?a:(a??this.windowLocation()).href,window.location.origin));this.dispatchEvent(c);let l=r(),u={...l===this.currentIndex?this.currentState:void 0,...s,index:l,href:c.detail.nextLocation.href};n.apply(i,[u,o,u.href]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addBeforeLocationChangeListener(t){this.addEventListener(Ze.eventName,t)}removeBeforeLocationChangeListener(t){this.removeEventListener(Ze.eventName,t)}addHistoryChangeListener(t){this.addEventListener(et.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(et.eventName,t)}currentItem(){return(0,Ae.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,Ae.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,Ae.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,Ae.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 Ea=y(V());var Aa=Ea.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 we.file_format:this.resolvedIcon=(t=h[n.replace("-","_").toUpperCase()])!==null&&t!==void 0?t:n;break;case we.material:this.resolvedIcon=this.value||Mt.nothing;break;default:this.resolvedIcon=(r=dt[n.replace("-","_").toUpperCase()])!==null&&r!==void 0?r:n;break}}firstUpdated(t){super.firstUpdated(t),setTimeout(()=>this.resolveIcon())}};X.elementDefinitions={};X.styles=fo;It([(0,Te.property)()],X.prototype,"variant",void 0);It([(0,Te.property)()],X.prototype,"value",void 0);It([(0,Te.property)({reflect:!0,attribute:"aria-hidden"})],X.prototype,"ariaHidden",void 0);It([(0,Te.state)()],X.prototype,"resolvedIcon",void 0);It([(0,Te.query)("slot")],X.prototype,"slottedContent",void 0);var vo=y(C());var xo={"ft-icon":X};(0,vo.customElements)(xo);var ri=y(z());var Eo=y(z(),1);var Mn=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)},Vc=e=>({fromAttribute:t=>{if(t==null)return Ut(e);try{return JSON.parse(t)}catch{return Ut(e)}},toAttribute:t=>JSON.stringify(t)});function Ao(e,t){return(0,Eo.property)({type:Object,converter:Vc(e),hasChanged:$t,...t??{}})}function jc(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(!pt(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(!pt(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(!pt(e[o],t[o]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function pt(e,t){try{return jc(e,t)}catch{return!1}}function $t(e,t){return!pt(e,t)}function Ut(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function gr(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 bo=y(z(),1);var In=e=>{let t=e??{};return(r,n)=>{var i;let s={hasChanged:$t,attribute:!1,...t};(0,bo.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 xr=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 Xe=y(z(),1);var vr=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 Ar=y(V(),1);var Er=class extends Ar.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,Ar.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 So(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 ht=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},To,_o=Symbol("constructorPrototype"),Co=Symbol("constructorName"),Oo=Symbol("exportpartsDebouncer"),wo=Symbol("dynamicDependenciesLoaded"),ft=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};ft.eventName="exportparts-updated";var pe=class extends Er{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[To]=new vr(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[Oo].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[Co]=this.constructor.name,this[_o]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Co]&&Object.setPrototypeOf(this,this[_o])}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[wo]||(r[wo]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(ft.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(ft.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 ft)})}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=So(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(", ")}};To=Oo;ht([(0,Xe.property)()],pe.prototype,"exportpartsPrefix",void 0);ht([Ao([])],pe.prototype,"exportpartsPrefixes",void 0);ht([(0,Xe.property)({reflect:!0})],pe.prototype,"exportparts",void 0);ht([(0,Xe.property)()],pe.prototype,"customStylesheet",void 0);ht([(0,Xe.property)()],pe.prototype,"elementToFocus",void 0);ht([(0,Xe.state)()],pe.prototype,"useAdoptedStyleSheets",void 0);function br(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Bt=Symbol("internalReduxEventsUnsubscribers"),Oe=Symbol("internalStoresUnsubscribers"),Je=Symbol("internalStores"),zc=gr(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[Je].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Je].values()][0]}getStore(o){return o==null?this.getUnnamedStore():this[Je].get(o)}addStore(o,a){var c;a=(c=a??o.name)!==null&&c!==void 0?c:"default-store",this.unsubscribeFromStore(a),this[Je].set(a,o),this.subscribeToStore(a,o),this.updateFromStores()}removeStore(o){let a=typeof o=="string"?o:o.name;this.unsubscribeFromStore(a),this[Je].delete(a)}setupStores(){this.unsubscribeFromStores(),this[Je].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[Oe].has(o.store):this[Oe].size>0)&&(this[a]=o.selector(l.getState(),this))}})}subscribeToStore(o,a){var c,l;this[Oe].set(o,a.subscribe(()=>this.updateFromStores())),this[Bt].set(o,[]),br(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[Bt].get(o).push(()=>a.removeEventListener(u.eventName,p))}}))),this.onStoreAvailable(o)}unsubscribeFromStores(){this[Oe].forEach((o,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(o){var a;this[Oe].has(o)&&this[Oe].get(o)(),this[Oe].delete(o),(a=this[Bt].get(o))===null||a===void 0||a.forEach(c=>c()),this[Bt].delete(o)}onStoreAvailable(o){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=Oe,r=Je,n=Bt,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),Ro=class extends zc(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 Kc=typeof Symbol=="function"&&Symbol.observable||"@@observable",No=Kc,Un=()=>Math.random().toString(36).substring(7).split("").join("."),Wc={INIT:`@@redux/INIT${Un()}`,REPLACE:`@@redux/REPLACE${Un()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Un()}`},Sr=Wc;function _r(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(!_r(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:Sr.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)}},[No](){return this}}}return p({type:Sr.INIT}),{dispatch:p,subscribe:d,getState:u,replaceReducer:m,[No]:v}}function Gc(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Sr.INIT})>"u")throw new Error(B(12));if(typeof r(void 0,{type:Sr.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{Gc(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 Ht(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function Lo(...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=Ht(...a)(i.dispatch),{...i,dispatch:s}}}function ko(e){return _r(e)&&"type"in e&&typeof e.type=="string"}var Fo=Symbol.for("immer-nothing"),Do=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,yt=J.getPrototypeOf,Or="constructor",Pr="prototype",jn="configurable",Rr="enumerable",wr="writable",Ft="value",fe=e=>!!e&&!!e[F];function Q(e){return e?Vo(e)||Ir(e)||!!e[Do]||!!e[Or]?.[Do]||Ur(e)||$r(e):!1}var qc=J[Pr][Or].toString(),Po=new WeakMap;function Vo(e){if(!e||!Jn(e))return!1;let t=yt(e);if(t===null||t===J[Pr])return!0;let r=J.hasOwnProperty.call(t,Or)&&t[Or];if(r===Object)return!0;if(!mt(r))return!1;let n=Po.get(r);return n===void 0&&(n=Function.toString.call(r),Po.set(r,n)),n===qc}function Mr(e,t,r=!0){zt(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 zt(e){let t=e[F];return t?t.type_:Ir(e)?1:Ur(e)?2:$r(e)?3:0}var Hn=(e,t,r=zt(e))=>r===2?e.has(t):J[Pr].hasOwnProperty.call(e,t),zn=(e,t,r=zt(e))=>r===2?e.get(t):e[t],Nr=(e,t,r,n=zt(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function Yc(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Ir=Array.isArray,Ur=e=>e instanceof Map,$r=e=>e instanceof Set,Jn=e=>typeof e=="object",mt=e=>typeof e=="function",Fn=e=>typeof e=="boolean";function Xc(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var Ee=e=>e.copy_||e.base_;var Qn=e=>e.modified_?e.copy_:e.base_;function Kn(e,t){if(Ur(e))return new Map(e);if($r(e))return new Set(e);if(Ir(e))return Array[Pr].slice.call(e);let r=Vo(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[wr]===!1&&(a[wr]=!0,a[jn]=!0),(a.get||a.set)&&(n[o]={[jn]:!0,[wr]:!0,[Rr]:a[Rr],[Ft]:e[o]})}return J.create(yt(e),n)}else{let n=yt(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)||(zt(e)>1&&J.defineProperties(e,{set:Cr,add:Cr,clear:Cr,delete:Cr}),J.freeze(e),t&&Mr(e,(r,n)=>{Br(n,!0)},!1)),e}function Jc(){ce(2)}var Cr={[Ft]:Jc};function Hr(e){return e===null||!Jn(e)?!0:J.isFrozen(e)}var Lr="MapSet",Wn="Patches",Mo="ArrayMethods",jo={};function Qe(e){let t=jo[e];return t||ce(0,e),t}var Io=e=>!!jo[e];var Vt,zo=()=>Vt,Qc=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Io(Lr)?Qe(Lr):void 0,arrayMethodsPlugin_:Io(Mo)?Qe(Mo):void 0});function Uo(e,t){t&&(e.patchPlugin_=Qe(Wn),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Gn(e){qn(e),e.drafts_.forEach(Zc),e.drafts_=null}function qn(e){e===Vt&&(Vt=e.parent_)}var $o=e=>Vt=Qc(Vt,e);function Zc(e){let t=e[F];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Bo(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=Ho(t,e));let{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(r[F].base_,e,t)}else e=Ho(t,r);return el(t,e,!0),Gn(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Fo?e:void 0}function Ho(e,t){if(Hr(t))return t;let r=t[F];if(!r)return kr(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);Go(r,e)}return r.copy_}function el(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Br(t,r)}function Ko(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Fr=(e,t)=>e.scope_===t,tl=[];function Wo(e,t,r,n){let i=Ee(e),s=e.type_;if(n!==void 0&&zn(i,n,s)===t){Nr(i,n,r,s);return}if(!e.draftLocations_){let a=e.draftLocations_=new Map;Mr(i,(c,l)=>{if(fe(l)){let u=a.get(l)||[];u.push(c),a.set(l,u)}})}let o=e.draftLocations_.get(t)??tl;for(let a of o)Nr(i,a,r,s)}function rl(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);Wo(e,s.draft_??s,o,r),Go(s,i)})}function Go(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)}Ko(e)}}function nl(e,t,r){let{scope_:n}=e;if(fe(r)){let i=r[F];Fr(i,n)&&i.callbacks_.push(function(){Tr(e);let o=Qn(i);Wo(e,r,o,t)})}else Q(r)&&e.callbacks_.push(function(){let s=Ee(e);e.type_===3?s.has(r)&&kr(r,n.handledSet_,n):zn(s,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&kr(zn(e.copy_,t,e.type_),n.handledSet_,n)})}function kr(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||fe(e)||t.has(e)||!Q(e)||Hr(e)||(t.add(e),Mr(e,(n,i)=>{if(fe(i)){let s=i[F];if(Fr(s,r)){let o=Qn(s);Nr(e,n,o,e.type_),Ko(s)}}else Q(i)&&kr(i,t,r)})),e}function il(e,t){let r=Ir(e),n={type_:r?1:0,scope_:t?t.scope_:zo(),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=Dr;r&&(i=[n],s=jt);let{revoke:o,proxy:a}=Proxy.revocable(i,s);return n.draft_=a,n.revoke_=o,[a,n]}var Dr={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=Ee(e);if(!Hn(i,t,e.type_))return ol(e,i,t);let s=i[t];if(e.finalized_||!Q(s)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&Xc(t))return s;if(s===Vn(e.base_,t)||sl(e,t,s)){Tr(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 Ee(e)},ownKeys(e){return Reflect.ownKeys(Ee(e))},set(e,t,r){let n=qo(Ee(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let i=Vn(Ee(e),t),s=i?.[F];if(s&&s.base_===r)return e.copy_[t]=r,e.assigned_.delete(t),!0;if(Yc(r,i)&&(r!==void 0||Hn(e.base_,t,e.type_)))return!0;Tr(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),nl(e,t,r)),!0},deleteProperty(e,t){return Tr(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=Ee(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[wr]:!0,[jn]:e.type_!==1||t!=="length",[Rr]:n[Rr],[Ft]:r[t]}},defineProperty(){ce(11)},getPrototypeOf(e){return yt(e.base_)},setPrototypeOf(){ce(12)}},jt={};for(let e in Dr){let t=Dr[e];jt[e]=function(){let r=arguments;return r[0]=r[0][0],t.apply(this,r)}}jt.deleteProperty=function(e,t){return jt.set.call(this,e,t,void 0)};jt.set=function(e,t,r){return Dr.set.call(this,e[0],t,r,e[0])};function Vn(e,t){let r=e[F];return(r?Ee(r):e)[t]}function sl(e,t,r){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!Q(r)||r[F]?!1:e.baseRefs_.has(r)}function ol(e,t,r){let n=qo(t,r);return n?Ft in n?n[Ft]:n.get?.call(e.draft_):void 0}function qo(e,t){if(!(t in e))return;let r=yt(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=yt(r)}}function Yn(e){e.modified_||(e.modified_=!0,e.parent_&&Yn(e.parent_))}function Tr(e){e.copy_||(e.assigned_=new Map,e.copy_=Kn(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var al=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(mt(t)&&!mt(r)){let s=r;r=t;let o=this;return function(c=s,...l){return o.produce(c,u=>r.call(this,u,...l))}}mt(r)||ce(6),n!==void 0&&!mt(n)&&ce(7);let i;if(Q(t)){let s=$o(this),o=Xn(s,t,void 0),a=!0;try{i=r(o),a=!1}finally{a?Gn(s):qn(s)}return Uo(s,n),Bo(i,s)}else if(!t||!Jn(t)){if(i=r(t),i===void 0&&(i=t),i===Fo&&(i=void 0),this.autoFreeze_&&Br(i,!0),n){let s=[],o=[];Qe(Wn).generateReplacementPatches_(t,i,{patches_:s,inversePatches_:o}),n(s,o)}return i}else ce(1,t)},this.produceWithPatches=(t,r)=>{if(mt(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=Yo(e));let t=$o(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 Uo(n,t),Bo(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=Qe(Wn).applyPatches_;return fe(e)?n(e,t):this.produce(e,i=>n(i,t))}};function Xn(e,t,r,n){let[i,s]=Ur(t)?Qe(Lr).proxyMap_(t,r):$r(t)?Qe(Lr).proxySet_(t,r):il(t,r);return(r?.scope_??zo()).drafts_.push(i),s.callbacks_=r?.callbacks_??[],s.key_=n,r&&n!==void 0?rl(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 Yo(e){return fe(e)||ce(10,e),Xo(e)}function Xo(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);return Mr(r,(i,s)=>{Nr(r,i,Xo(s))},n),t&&(t.finalized_=!1),r}var cl=globalThis.Iterator,Pp=typeof cl?.from=="function";var ll=new al,Zn=ll.produce;function Jo(e){return({dispatch:r,getState:n})=>i=>s=>typeof s=="function"?s(r,n,e):i(s)}var Qo=Jo(),Zo=Jo;var ul=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ht:Ht.apply(null,arguments)};typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var dl=e=>e&&typeof e.match=="function";function Re(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=>ko(n)&&n.type===e,r}var ia=class Kt extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Kt.prototype)}static get[Symbol.species](){return Kt}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Kt(...t[0].concat(this)):new Kt(...t.concat(this))}};function ea(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 pl(e){return typeof e=="boolean"}var fl=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:s=!0}=t??{},o=new ia;return r&&(pl(r)?o.push(Qo):o.push(Zo(r.extraArgument))),o},hl="RTK_autoBatch";var ta=e=>t=>{setTimeout(t,e)},ml=(e,t)=>r=>{let n=!1,i,s,o=()=>{n||(n=!0,cancelAnimationFrame(i),clearTimeout(s),r())};i=e(o),s=setTimeout(o,t)},yl=(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?ml(window.requestAnimationFrame,100):ta(10):e.type==="callback"?e.queueNotification:ta(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?.[hl],s=!i,s&&(o||(o=!0,c(l))),n.dispatch(u)}finally{i=!0}}})},gl=e=>function(r){let{autoBatch:n=!0}=r??{},i=new ia(e);return n&&i.push(yl(typeof n=="object"?n:void 0)),i};function sa(e){let t=fl(),{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(_r(r))c=Bn(r);else throw new Error(he(1));let l;typeof n=="function"?l=n(t):l=t();let u=Ht;i&&(u=ul({trace:!1,...typeof i=="object"&&i}));let d=Lo(...l),p=gl(d),m=typeof a=="function"?a(p):p(),v=u(...m);return $n(c,o,v)}function oa(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 xl(e){return typeof e=="function"}function vl(e,t){let[r,n,i]=oa(t),s;if(xl(e))s=()=>ea(e());else{let a=ea(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 El=(e,t)=>dl(e)?e.match(t):e(t);function Al(...e){return t=>e.some(r=>El(r,t))}var bl="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Sl=(e=21)=>{let t="",r=e;for(;r--;)t+=bl[Math.random()*64|0];return t},_l=["name","message","stack","code"],ei=class{payload;meta;_type;constructor(e,t){this.payload=e,this.meta=t}},ra=class{payload;meta;_type;constructor(e,t){this.payload=e,this.meta=t}},Cl=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of _l)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},na="External signal was aborted",wl=(()=>{function e(t,r,n){let i=Re(t+"/fulfilled",(c,l,u,d)=>({payload:c,meta:{...d||{},arg:u,requestId:l,requestStatus:"fulfilled"}})),s=Re(t+"/pending",(c,l,u)=>({payload:void 0,meta:{...u||{},arg:l,requestId:c,requestStatus:"pending"}})),o=Re(t+"/rejected",(c,l,u,d,p)=>({payload:d,error:(n&&n.serializeError||Cl)(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):Sl(),v=new AbortController,b,x;function S(E){x=E,v.abort()}l&&(l.aborted?S(na):l.addEventListener("abort",()=>S(na),{once:!0}));let T=(async function(){let E;try{let A=n?.condition?.(c,{getState:d,extra:p});if(Ol(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 ra(w,D))})).then(w=>{if(w instanceof ei)throw w;return w instanceof ra?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(Tl)}})}}return Object.assign(a,{pending:s,rejected:o,fulfilled:i,settled:Al(o,i),typePrefix:t})}return e.withTypes=()=>e,e})();function Tl(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Ol(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var aa=Symbol.for("rtk-slice-createasyncthunk"),Vp={[aa]:wl};function Rl(e,t){return`${e}/${t}`}function Nl({creators:e}={}){let t=e?.asyncThunk?.[aa];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(kl()):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:Rl(i,E),createNotation:typeof n.reducers=="function"};Pl(A)?Il(O,A,l,t):Dl(O,A,l)});function u(){let[E={},A=[],O=void 0]=typeof n.extraReducers=="function"?oa(n.extraReducers):[n.extraReducers],w={...E,...c.sliceCaseReducersByType};return vl(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[ir,Z]of Object.entries(n.selectors??{}))H[ir]=Ll(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 Ll(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 ca=Nl();function kl(){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 Dl({type:e,reducerName:t,createNotation:r},n,i){let s,o;if("reducer"in n){if(r&&!Ml(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?Re(e,o):Re(e))}function Pl(e){return e._reducerDefinitionType==="asyncThunk"}function Ml(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Il({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 la="listener",ua="completed",da="cancelled",jp=`task-${da}`,zp=`task-${ua}`,Kp=`${la}-${da}`,Wp=`${la}-${ua}`;var{assign:pa}=Object;var ti="listenerMiddleware";var Ul=pa(Re(`${ti}/add`),{withTypes:()=>Ul}),Gp=Re(`${ti}/removeAll`),$l=pa(Re(`${ti}/remove`),{withTypes:()=>$l});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 Bl=gr(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 Bl(Object){};window.ftReduxStores||(window.ftReduxStores={});var fa=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(br(s))return s;if(i==null)return;let o=ca({...i,reducers:(r=i.reducers)!==null&&r!==void 0?r:{}}),a=sa({reducer:(c,l)=>{if(l.type==="CLEAR_FT_REDUX_STORE"){let u=Ut(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 xr,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];pt(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 ha=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},Sf=(0,ha.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 ma,gt=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Hl=Symbol("clearAfterUnitTest"),Gr=class extends(0,re.withEventBus)(Y){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[ma]=()=>{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 gt({loadedContexts:t})),this.dispatchEvent(new gt({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new gt({loadedContexts:[t]})),this.dispatchEvent(new gt({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,re.delay)(0).then(()=>n()).catch(()=>null)))}};ma=Hl;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 xt=window.FluidTopicsI18nService,qr=window.FluidTopicsCustomI18nService;var ya=y(C()),ii=class{highlightHtml(t,r,n){(0,ya.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new ii;var ga=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 ga.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 xa=y(C());var Wt=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 xa.SearchPlaceConverter(n,t??20,i?.allLanguagesAllowed,r,s)}};var oi=class{urlToSearchRequest(t){return Wt.get().parse(t)}searchRequestToUrl(t){return Wt.get().serialize(t)}};window.FluidTopicsUrlService=new oi;var Ae=y(C());var Ze=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{nextLocation:t}})}};Ze.eventName="before-location-change";var et=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};et.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))}},va=new ai;var Yr=class e extends Ae.WithEventBus{static build(){return new e(window.history,va,()=>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,Ae.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new et(this.currentItem())),0)}installProxies(){let t=r=>(n,i,[s,o,a])=>{let c=new Ze(new URL(typeof a=="string"?a:(a??this.windowLocation()).href,window.location.origin));this.dispatchEvent(c);let l=r(),u={...l===this.currentIndex?this.currentState:void 0,...s,index:l,href:c.detail.nextLocation.href};n.apply(i,[u,o,u.href]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addBeforeLocationChangeListener(t){this.addEventListener(Ze.eventName,t)}removeBeforeLocationChangeListener(t){this.removeEventListener(Ze.eventName,t)}addHistoryChangeListener(t){this.addEventListener(et.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(et.eventName,t)}currentItem(){return(0,Ae.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,Ae.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,Ae.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,Ae.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 Ea=y(V());var Aa=Ea.css`
|
|
330
330
|
`;var _a=y(V()),j=y(z()),nt=y(C());var tt=y(C());function ba(e,t){let{authenticationRequired:r,session:n}=_.getState();return r&&!n?.sessionAuthenticated?Promise.resolve(t):e()}var Xr=class extends ut{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var ci=class e extends tt.FtStateManager{static build(t){return new e(_,t)}constructor(t,r){super(),this.store=t,this.cache=new tt.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new Xr,this.cleanSessionDebouncer=new tt.Debouncer,this.reloadConfiguration=()=>{var n;(n=this.cache)===null||n===void 0||n.clear("availableContentLocales"),this.updateAvailableContentLocales()},this.reloadDebouncer=new tt.Debouncer(500),this.apiProvider=r??(()=>qe.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}addListeners(){this.store.addEventListener(Ge.eventName,this.reloadConfiguration)}removeListeners(){this.store.removeEventListener(Ge.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",()=>ba(()=>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 Dt(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 Xs(_.getState().session,...t)}},Sa=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 Gt=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=Sa,this.contextRoot=new Gt}render(){return _a.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=>xt.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=Aa;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 wa=y(C());var Ca={"ft-app-context":R};(0,wa.customElements)(Ca);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:xt}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 Et=y(C());var Ta=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-]+$/)}},vt=new li;var jl=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},Yt=Symbol("i18nAttributes"),Oa=Symbol("i18nListAttributes"),Ra=Symbol("i18nProperties"),Qr=Symbol("i18nContexts"),qt=Symbol("i18nUnsubs"),tn=(0,Et.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:xt}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(vt.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[Yt])===null||o===void 0||o.forEach((u,d)=>c[d]=l(u,d,c[d])),(a=this[Oa])===null||a===void 0||a.forEach((u,d)=>{var 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[Ra])===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[qt].has(c)||this[qt].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[qt].forEach(s=>s()),this[qt].clear()}}return t=Qr,r=qt,jl([(0,Ta.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),Zr=class extends tn(Et.FtLitElement){},en=class extends tn(Et.FtLitElementRedux){};var Na=y(V());var La=Na.css`
|