@fluid-topics/ft-copy-block 1.2.24 → 1.2.26

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.
@@ -1099,7 +1099,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:t.extend("--ft-conte
1099
1099
  `;var Ko=O(k());var hc=O(k());var wi=O(M()),ot=O(Y()),gt=O(k());var vi=O(M());var Si=vi.css`
1100
1100
  `;var Co=O(k()),tl="ft-app-info",Cr=class extends CustomEvent{constructor(o){super("authentication-change",{detail:o})}},el={session:(e,o)=>{(0,Co.deepEqual)(e.session,o.payload)||(e.session=o.payload,setTimeout(()=>L.dispatchEvent(new Cr(o.payload)),0))}},L=Co.FtReduxStore.get({name:tl,reducers:el,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1}});var Ft=O(k());var wr=O(k());var ie=class e{static get(o){let{baseUrl:r,apiIntegrationIdentifier:n}=L.getState(),a=o??n;if(r&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,a,!0)}static await(o){return new Promise(r=>{let n=e.get(o);if(n)r(n);else{let a=L.subscribe(()=>{n=e.get(o),n&&(a(),r(n))})}})}};var Gt=class{constructor(o=!0,r){var n;this.overrideApi=r;let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new wr.CacheRegistry,this.cache=o?a.commonCache:new wr.CacheRegistry}get api(){var o;return(o=this.overrideApi)!==null&&o!==void 0?o:ie.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):ie.await()}clearCache(){this.cache.clearAll()}};var Oi,ol=Symbol("clearAfterUnitTest"),wo=class extends Gt{constructor(o){super(),this.messageContextProvider=o,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Oi]=()=>{this.defaultMessages={},this.cache=new Ft.CacheRegistry,this.listeners={}},this.currentUiLocale=L.getState().uiLocale,L.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:o}=L.getState();this.currentUiLocale!==o&&(this.currentUiLocale=o,this.cache.clearAll(),this.notifyAll())}addContext(o){let r=o.name.toLowerCase();this.cache.setFinal(r,o),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(o,r){var n;if(o=o.toLowerCase(),Object.keys(r).length>0){let a={...(n=this.defaultMessages[o])!==null&&n!==void 0?n:{},...r};(0,Ft.deepEqual)(this.defaultMessages[o],a)||(this.defaultMessages[o]=a,await this.notify(o))}await this.fetchContext(o)}resolveContext(o){var r,n;return this.fetchContext(o),(n=(r=this.cache.getNow(o))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(o,r){let n=o.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(o,r,...n){var a;let i=o.toLowerCase(),l=this.resolveContext(i);return new Ft.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},l).resolve(r,...n)}async fetchContext(o){if(!this.cache.has(o))try{await this.cache.get(o,()=>this.messageContextProvider(this.currentUiLocale,o)),await this.notify(o)}catch(r){console.error(r)}}subscribe(o,r){var n;return o=o.toLowerCase(),this.listeners[o]=(n=this.listeners[o])!==null&&n!==void 0?n:new Set,this.listeners[o].add(r),()=>{var a;return(a=this.listeners[o])===null||a===void 0?void 0:a.delete(r)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map(o=>this.notify(o)))}async notify(o){this.listeners[o]!=null&&await Promise.all([...this.listeners[o].values()].map(r=>(0,Ft.delay)(0).then(()=>r()).catch(()=>null)))}};Oi=ol;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends wo{constructor(){super(async(e,o)=>(await this.awaitApi).getFluidTopicsMessageContext(e,o))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends wo{constructor(){super(async(e,o)=>(await this.awaitApi).getCustomMessageContext(e,o))}});var ce=window.FluidTopicsI18nService,Ci=window.FluidTopicsCustomI18nService;var q=function(e,o,r,n){var a=arguments.length,i=a<3?o:n===null?n=Object.getOwnPropertyDescriptor(o,r):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,o,r,n);else for(var d=e.length-1;d>=0;d--)(l=e[d])&&(i=(a<3?l(i):a>3?l(o,r,i):l(o,r))||i);return a>3&&i&&Object.defineProperty(o,r,i),i},U=class extends gt.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>ie.get(),this.messageContexts=[],this.cache=new gt.CacheRegistry,this.cleanSessionDebouncer=new gt.Debouncer}render(){return wi.html`
1101
1101
  <slot></slot>
1102
- `}update(o){var r,n,a,i,l;super.update(o),o.has("baseUrl")&&(L.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),o.has("apiIntegrationIdentifier")&&L.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),o.has("uiLocale")&&L.actions.uiLocale(this.uiLocale),o.has("metadataConfiguration")&&L.actions.metadataConfiguration(this.metadataConfiguration),o.has("noCustom")&&L.actions.noCustom(this.noCustom),o.has("editorMode")&&L.actions.editorMode(this.editorMode),o.has("noCustomComponent")&&L.actions.noCustomComponent(this.noCustomComponent),o.has("session")&&L.actions.session(this.session),o.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(d=>ce.addContext(d)),o.has("openExternalDocumentInNewTab")&&L.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),o.has("navigatorOnline")&&L.actions.navigatorOnline(this.navigatorOnline),o.has("forcedOffline")&&L.actions.forcedOffline(this.forcedOffline),o.has("localesConfiguration")&&(L.actions.defaultLocales((r=this.localesConfiguration)===null||r===void 0?void 0:r.defaultLocales),L.actions.availableUiLocales((a=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&a!==void 0?a:[]),L.actions.searchInAllLanguagesAllowed((l=(i=this.localesConfiguration)===null||i===void 0?void 0:i.allLanguagesAllowed)!==null&&l!==void 0?l:!1)),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let o=await this.apiProvider().getCurrentSession();return o.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},o.idleTimeoutInMillis),o})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}};U.elementDefinitions={};U.styles=Si;q([(0,ot.property)()],U.prototype,"baseUrl",void 0);q([(0,ot.property)()],U.prototype,"apiIntegrationIdentifier",void 0);q([(0,ot.property)()],U.prototype,"uiLocale",void 0);q([(0,gt.jsonProperty)(null)],U.prototype,"availableUiLocales",void 0);q([(0,gt.jsonProperty)(null)],U.prototype,"metadataConfiguration",void 0);q([(0,ot.property)({type:Boolean})],U.prototype,"editorMode",void 0);q([(0,ot.property)({type:Boolean})],U.prototype,"noCustom",void 0);q([(0,ot.property)({type:Boolean})],U.prototype,"openExternalDocumentInNewTab",void 0);q([(0,ot.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],U.prototype,"noCustomComponent",void 0);q([(0,ot.property)({type:Boolean})],U.prototype,"withManualResources",void 0);q([(0,ot.property)({type:Boolean})],U.prototype,"navigatorOnline",void 0);q([(0,ot.property)({type:Boolean})],U.prototype,"forcedOffline",void 0);q([(0,ot.property)({type:Object})],U.prototype,"apiProvider",void 0);q([(0,gt.jsonProperty)([])],U.prototype,"messageContexts",void 0);q([(0,gt.jsonProperty)(void 0)],U.prototype,"session",void 0);q([(0,ot.state)()],U.prototype,"localesConfiguration",void 0);var Gl=O(Y());function rl(e,o){if(e===o)return!0;if(e&&o&&typeof e=="object"&&typeof o=="object"){if(e.constructor!==o.constructor)return!1;var r,n,a;if(Array.isArray(e)){if(r=e.length,r!=o.length)return!1;for(n=r;n--!==0;)if(!Eo(e[n],o[n]))return!1;return!0}if(e instanceof Map&&o instanceof Map){if(e.size!==o.size)return!1;for(n of e.entries())if(!o.has(n[0]))return!1;for(n of e.entries())if(!Eo(n[1],o.get(n[0])))return!1;return!0}if(e instanceof Set&&o instanceof Set){if(e.size!==o.size)return!1;for(n of e.entries())if(!o.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===o.source&&e.flags===o.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===o.valueOf();if(a=Object.keys(e),r=a.length,r!==Object.keys(o).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(o,a[n]))return!1;for(n=r;n--!==0;){var i=a[n];if(!Eo(e[i],o[i]))return!1}return!0}return e!==e&&o!==o}function Eo(e,o){try{return rl(e,o)}catch{return!1}}function No(e,o){return!Eo(e,o)}var nl=O(Y(),1);var Ao=class{constructor(){this.queue=[]}add(o,r=!1){r&&(this.queue=this.queue.filter(n=>n.type!==o.type)),this.queue.push(o)}consume(o){let r=this.queue.find(n=>n.type===o);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}};var Ve=O(Y(),1);var Ei=O(Y(),1);function Ni(e,o){let r=()=>JSON.parse(JSON.stringify(e));return(0,Ei.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return r();try{return JSON.parse(n)}catch{return r()}},toAttribute:n=>JSON.stringify(n)},hasChanged:No,...o??{}})}var Ro=class{constructor(o=0){this.timeout=o,this.callbacks=[]}run(o,r){return this.callbacks=[o],this.debounce(r)}queue(o,r){return this.callbacks.push(o),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(o){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),o??this.timeout),this.promise}async runCallbacks(){var o,r;let n=[...this.callbacks];this.callbacks=[];let a=(o=this.rejectPromise)!==null&&o!==void 0?o:()=>null,i=(r=this.resolvePromise)!==null&&r!==void 0?r:()=>null;this.clearPromise();for(let l of n)try{await l()}catch(d){a(d);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Ri=O(M(),1);var Lo=window,al=Lo.ShadowRoot&&(Lo.ShadyCSS===void 0||Lo.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Wh=Symbol();var Ai=(e,o)=>{al?e.adoptedStyleSheets=o.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet):o.forEach(r=>{let n=document.createElement("style"),a=Lo.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=r.cssText,e.appendChild(n)})};var Po=class extends Ri.LitElement{createRenderRoot(){let o=this.constructor;o.elementDefinitions&&!o.registry&&(o.registry=new CustomElementRegistry,Object.entries(o.elementDefinitions).forEach(([a,i])=>o.registry.define(a,i)));let r={...o.shadowRootOptions,customElements:o.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return Ai(n,o.elementStyles),n}};var Io=function(e,o,r,n){var a=arguments.length,i=a<3?o:n===null?n=Object.getOwnPropertyDescriptor(o,r):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,o,r,n);else for(var d=e.length-1;d>=0;d--)(l=e[d])&&(i=(a<3?l(i):a>3?l(o,r,i):l(o,r))||i);return a>3&&i&&Object.defineProperty(o,r,i),i},ki,Li=Symbol("constructorPrototype"),Pi=Symbol("constructorName"),Ti=Symbol("exportpartsDebouncer"),Ii=Symbol("dynamicDependenciesLoaded"),jt=class extends Po{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[ki]=new Ro(5),this[Pi]=this.constructor.name,this[Li]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Pi]&&Object.setPrototypeOf(this,this[Li])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(r){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",r)}let o=this.constructor;o[Ii]||(o[Ii]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(o){super.updated(o),this.updateComplete.then(()=>{this.contentAvailableCallback(o),this.applyCustomStylesheet(o),this.scheduleExportpartsUpdate()})}contentAvailableCallback(o){}applyCustomStylesheet(o){var r,n,a;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(o.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}scheduleExportpartsUpdate(){var o,r,n;(!((o=this.exportpartsPrefix)===null||o===void 0)&&o.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[Ti].run(()=>{var a,i;!((a=this.exportpartsPrefix)===null||a===void 0)&&a.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(o){var r,n,a,i,l,d;let p=m=>m!=null&&m.trim().length>0,f=o.filter(p).map(m=>m.trim());if(f.length===0){this.removeAttribute("exportparts");return}let y=new Set;for(let m of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let b=(i=(a=m.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],g=(d=(l=m.getAttribute("exportparts"))===null||l===void 0?void 0:l.split(",").map(v=>v.split(":")[1]))!==null&&d!==void 0?d:[];new Array(...b,...g).filter(p).map(v=>v.trim()).forEach(v=>y.add(v))}if(y.size===0){this.removeAttribute("exportparts");return}let h=[...y.values()].flatMap(m=>f.map(b=>`${m}:${b}--${m}`));this.setAttribute("exportparts",[...this.part,...h].join(", "))}};ki=Ti;Io([(0,Ve.property)()],jt.prototype,"exportpartsPrefix",void 0);Io([Ni([])],jt.prototype,"exportpartsPrefixes",void 0);Io([(0,Ve.property)()],jt.prototype,"customStylesheet",void 0);Io([(0,Ve.state)()],jt.prototype,"useAdoptedStyleSheets",void 0);function Ye(e){var o;return(o=e?.isFtReduxStore)!==null&&o!==void 0?o:!1}var Bi,_i,Wi,qe=Symbol("internalReduxEventsUnsubscribers"),Kt=Symbol("internalStoresUnsubscribers"),le=Symbol("internalStores"),Xe=class extends jt{constructor(){super(...arguments),this[Bi]=new Map,this[_i]=new Map,this[Wi]=new Map}get reduxConstructor(){return this.constructor}update(o){super.update(o),[...this.reduxConstructor.reduxReactiveProperties].some(r=>o.has(r))&&this.updateFromStores()}getUnnamedStore(){if(this[le].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[le].values()][0]}getStore(o){return o==null?this.getUnnamedStore():this[le].get(o)}addStore(o,r){var n;r=(n=r??(Ye(o)?o.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(r),this[le].set(r,o),this.subscribeToStore(r,o),this.updateFromStores()}removeStore(o){let r=typeof o=="string"?o:o.name;this.unsubscribeFromStore(r),this[le].delete(r)}setupStores(){this.unsubscribeFromStores(),this[le].forEach((o,r)=>this.subscribeToStore(r,o)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((o,r)=>{let n=this.constructor.getPropertyOptions(r);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:r)){let a=this.getStore(o.store);a&&(o.store?this[Kt].has(o.store):this[Kt].size>0)&&(this[r]=o.selector(a.getState(),this))}})}subscribeToStore(o,r){var n;this[Kt].set(o,r.subscribe(()=>this.updateFromStores())),this[qe].set(o,[]),Ye(r)&&r.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((a,i)=>{if(typeof this[i]=="function"&&(!a.store||r.name===a.store)){let l=d=>this[i](d);r.addEventListener(a.eventName,l),this[qe].get(o).push(()=>r.removeEventListener(a.eventName,l))}})),this.onStoreAvailable(o)}unsubscribeFromStores(){this[Kt].forEach((o,r)=>this.unsubscribeFromStore(r))}unsubscribeFromStore(o){var r;this[Kt].has(o)&&this[Kt].get(o)(),this[Kt].delete(o),(r=this[qe].get(o))===null||r===void 0||r.forEach(n=>n()),this[qe].delete(o)}onStoreAvailable(o){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};Bi=Kt,_i=le,Wi=qe;Xe.reduxProperties=new Map;Xe.reduxReactiveProperties=new Set;Xe.reduxEventListeners=new Map;function pt(e){for(var o=arguments.length,r=Array(o>1?o-1:0),n=1;n<o;n++)r[n-1]=arguments[n];if(0)var a,i;throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map(function(l){return"'"+l+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Tt(e){return!!e&&!!e[D]}function bt(e){var o;return!!e&&(function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===ul}(e)||Array.isArray(e)||!!e[Gi]||!!(!((o=e.constructor)===null||o===void 0)&&o[Gi])||Tr(e)||Br(e))}function se(e,o,r){r===void 0&&(r=!1),Le(e)===0?(r?Object.keys:Re)(e).forEach(function(n){r&&typeof n=="symbol"||o(n,e[n],e)}):e.forEach(function(n,a){return o(a,n,e)})}function Le(e){var o=e[D];return o?o.i>3?o.i-4:o.i:Array.isArray(e)?1:Tr(e)?2:Br(e)?3:0}function Ae(e,o){return Le(e)===2?e.has(o):Object.prototype.hasOwnProperty.call(e,o)}function il(e,o){return Le(e)===2?e.get(o):e[o]}function Fi(e,o,r){var n=Le(e);n===2?e.set(o,r):n===3?e.add(r):e[o]=r}function ji(e,o){return e===o?e!==0||1/e==1/o:e!=e&&o!=o}function Tr(e){return fl&&e instanceof Map}function Br(e){return pl&&e instanceof Set}function Zt(e){return e.o||e.t}function _r(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var o=Vi(e);delete o[D];for(var r=Re(o),n=0;n<r.length;n++){var a=r[n],i=o[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(o[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[a]})}return Object.create(Object.getPrototypeOf(e),o)}function Wr(e,o){return o===void 0&&(o=!1),$r(e)||Tt(e)||!bt(e)||(Le(e)>1&&(e.set=e.add=e.clear=e.delete=cl),Object.freeze(e),o&&se(e,function(r,n){return Wr(n,!0)},!0)),e}function cl(){pt(2)}function $r(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function wt(e){var o=kr[e];return o||pt(18,e),o}function ll(e,o){kr[e]||(kr[e]=o)}function Lr(){return Qe}function Er(e,o){o&&(wt("Patches"),e.u=[],e.s=[],e.v=o)}function ko(e){Pr(e),e.p.forEach(sl),e.p=null}function Pr(e){e===Qe&&(Qe=e.l)}function $i(e){return Qe={p:[],l:Qe,h:e,m:!0,_:0}}function sl(e){var o=e[D];o.i===0||o.i===1?o.j():o.g=!0}function Nr(e,o){o._=o.p.length;var r=o.p[0],n=e!==void 0&&e!==r;return o.h.O||wt("ES5").S(o,e,n),n?(r[D].P&&(ko(o),pt(4)),bt(e)&&(e=To(o,e),o.l||Bo(o,e)),o.u&&wt("Patches").M(r[D].t,e,o.u,o.s)):e=To(o,r,[]),ko(o),o.u&&o.v(o.u,o.s),e!==Zi?e:void 0}function To(e,o,r){if($r(o))return o;var n=o[D];if(!n)return se(o,function(d,p){return Di(e,n,o,d,p,r)},!0),o;if(n.A!==e)return o;if(!n.P)return Bo(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=_r(n.k):n.o,i=a,l=!1;n.i===3&&(i=new Set(a),a.clear(),l=!0),se(i,function(d,p){return Di(e,n,a,d,p,r,l)}),Bo(e,a,!1),r&&e.u&&wt("Patches").N(n,r,e.u,e.s)}return n.o}function Di(e,o,r,n,a,i,l){if(Tt(a)){var d=To(e,a,i&&o&&o.i!==3&&!Ae(o.R,n)?i.concat(n):void 0);if(Fi(r,n,d),!Tt(d))return;e.m=!1}else l&&r.add(a);if(bt(a)&&!$r(a)){if(!e.h.D&&e._<1)return;To(e,a),o&&o.A.l||Bo(e,a)}}function Bo(e,o,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&Wr(o,r)}function Ar(e,o){var r=e[D];return(r?Zt(r):e)[o]}function Mi(e,o){if(o in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,o);if(n)return n;r=Object.getPrototypeOf(r)}}function Vt(e){e.P||(e.P=!0,e.l&&Vt(e.l))}function Rr(e){e.o||(e.o=_r(e.t))}function Ir(e,o,r){var n=Tr(o)?wt("MapSet").F(o,r):Br(o)?wt("MapSet").T(o,r):e.O?function(a,i){var l=Array.isArray(a),d={i:l?1:0,A:i?i.A:Lr(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},p=d,f=to;l&&(p=[d],f=Je);var y=Proxy.revocable(p,f),h=y.revoke,m=y.proxy;return d.k=m,d.j=h,m}(o,r):wt("ES5").J(o,r);return(r?r.A:Lr()).p.push(n),n}function dl(e){return Tt(e)||pt(22,e),function o(r){if(!bt(r))return r;var n,a=r[D],i=Le(r);if(a){if(!a.P&&(a.i<4||!wt("ES5").K(a)))return a.t;a.I=!0,n=zi(r,i),a.I=!1}else n=zi(r,i);return se(n,function(l,d){a&&il(a.t,l)===d||Fi(n,l,o(d))}),i===3?new Set(n):n}(e)}function zi(e,o){switch(o){case 2:return new Map(e);case 3:return Array.from(e)}return _r(e)}function Ki(){function e(l,d){var p=i[l];return p?p.enumerable=d:i[l]=p={configurable:!0,enumerable:d,get:function(){var f=this[D];return to.get(f,l)},set:function(f){var y=this[D];to.set(y,l,f)}},p}function o(l){for(var d=l.length-1;d>=0;d--){var p=l[d][D];if(!p.P)switch(p.i){case 5:n(p)&&Vt(p);break;case 4:r(p)&&Vt(p)}}}function r(l){for(var d=l.t,p=l.k,f=Re(p),y=f.length-1;y>=0;y--){var h=f[y];if(h!==D){var m=d[h];if(m===void 0&&!Ae(d,h))return!0;var b=p[h],g=b&&b[D];if(g?g.t!==m:!ji(b,m))return!0}}var v=!!d[D];return f.length!==Re(d).length+(v?0:1)}function n(l){var d=l.k;if(d.length!==l.t.length)return!0;var p=Object.getOwnPropertyDescriptor(d,d.length-1);if(p&&!p.get)return!0;for(var f=0;f<d.length;f++)if(!d.hasOwnProperty(f))return!0;return!1}function a(l){l.g&&pt(3,JSON.stringify(Zt(l)))}var i={};ll("ES5",{J:function(l,d){var p=Array.isArray(l),f=function(h,m){if(h){for(var b=Array(m.length),g=0;g<m.length;g++)Object.defineProperty(b,""+g,e(g,!0));return b}var v=Vi(m);delete v[D];for(var R=Re(v),E=0;E<R.length;E++){var N=R[E];v[N]=e(N,h||!!v[N].enumerable)}return Object.create(Object.getPrototypeOf(m),v)}(p,l),y={i:p?5:4,A:d?d.A:Lr(),P:!1,I:!1,R:{},l:d,t:l,k:f,o:null,g:!1,C:!1};return Object.defineProperty(f,D,{value:y,writable:!0}),f},S:function(l,d,p){p?Tt(d)&&d[D].A===l&&o(l.p):(l.u&&function f(y){if(y&&typeof y=="object"){var h=y[D];if(h){var m=h.t,b=h.k,g=h.R,v=h.i;if(v===4)se(b,function(T){T!==D&&(m[T]!==void 0||Ae(m,T)?g[T]||f(b[T]):(g[T]=!0,Vt(h)))}),se(m,function(T){b[T]!==void 0||Ae(b,T)||(g[T]=!1,Vt(h))});else if(v===5){if(n(h)&&(Vt(h),g.length=!0),b.length<m.length)for(var R=b.length;R<m.length;R++)g[R]=!1;else for(var E=m.length;E<b.length;E++)g[E]=!0;for(var N=Math.min(b.length,m.length),P=0;P<N;P++)b.hasOwnProperty(P)||(g[P]=!0),g[P]===void 0&&f(b[P])}}}}(l.p[0]),o(l.p))},K:function(l){return l.i===4?r(l):n(l)}})}var Ui,Qe,Dr=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",fl=typeof Map<"u",pl=typeof Set<"u",Hi=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Zi=Dr?Symbol.for("immer-nothing"):((Ui={})["immer-nothing"]=!0,Ui),Gi=Dr?Symbol.for("immer-draftable"):"__$immer_draftable",D=Dr?Symbol.for("immer-state"):"__$immer_state";var ul=""+Object.prototype.constructor,Re=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Vi=Object.getOwnPropertyDescriptors||function(e){var o={};return Re(e).forEach(function(r){o[r]=Object.getOwnPropertyDescriptor(e,r)}),o},kr={},to={get:function(e,o){if(o===D)return e;var r=Zt(e);if(!Ae(r,o))return function(a,i,l){var d,p=Mi(i,l);return p?"value"in p?p.value:(d=p.get)===null||d===void 0?void 0:d.call(a.k):void 0}(e,r,o);var n=r[o];return e.I||!bt(n)?n:n===Ar(e.t,o)?(Rr(e),e.o[o]=Ir(e.A.h,n,e)):n},has:function(e,o){return o in Zt(e)},ownKeys:function(e){return Reflect.ownKeys(Zt(e))},set:function(e,o,r){var n=Mi(Zt(e),o);if(n?.set)return n.set.call(e.k,r),!0;if(!e.P){var a=Ar(Zt(e),o),i=a?.[D];if(i&&i.t===r)return e.o[o]=r,e.R[o]=!1,!0;if(ji(r,a)&&(r!==void 0||Ae(e.t,o)))return!0;Rr(e),Vt(e)}return e.o[o]===r&&(r!==void 0||o in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[o])||(e.o[o]=r,e.R[o]=!0),!0},deleteProperty:function(e,o){return Ar(e.t,o)!==void 0||o in e.t?(e.R[o]=!1,Rr(e),Vt(e)):delete e.R[o],e.o&&delete e.o[o],!0},getOwnPropertyDescriptor:function(e,o){var r=Zt(e),n=Reflect.getOwnPropertyDescriptor(r,o);return n&&{writable:!0,configurable:e.i!==1||o!=="length",enumerable:n.enumerable,value:r[o]}},defineProperty:function(){pt(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){pt(12)}},Je={};se(to,function(e,o){Je[e]=function(){return arguments[0]=arguments[0][0],o.apply(this,arguments)}}),Je.deleteProperty=function(e,o){return Je.set.call(this,e,o,void 0)},Je.set=function(e,o,r){return to.set.call(this,e[0],o,r,e[0])};var yl=function(){function e(r){var n=this;this.O=Hi,this.D=!0,this.produce=function(a,i,l){if(typeof a=="function"&&typeof i!="function"){var d=i;i=a;var p=n;return function(v){var R=this;v===void 0&&(v=d);for(var E=arguments.length,N=Array(E>1?E-1:0),P=1;P<E;P++)N[P-1]=arguments[P];return p.produce(v,function(T){var B;return(B=i).call.apply(B,[R,T].concat(N))})}}var f;if(typeof i!="function"&&pt(6),l!==void 0&&typeof l!="function"&&pt(7),bt(a)){var y=$i(n),h=Ir(n,a,void 0),m=!0;try{f=i(h),m=!1}finally{m?ko(y):Pr(y)}return typeof Promise<"u"&&f instanceof Promise?f.then(function(v){return Er(y,l),Nr(v,y)},function(v){throw ko(y),v}):(Er(y,l),Nr(f,y))}if(!a||typeof a!="object"){if((f=i(a))===void 0&&(f=a),f===Zi&&(f=void 0),n.D&&Wr(f,!0),l){var b=[],g=[];wt("Patches").M(a,f,b,g),l(b,g)}return f}pt(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(f){for(var y=arguments.length,h=Array(y>1?y-1:0),m=1;m<y;m++)h[m-1]=arguments[m];return n.produceWithPatches(f,function(b){return a.apply(void 0,[b].concat(h))})};var l,d,p=n.produce(a,i,function(f,y){l=f,d=y});return typeof Promise<"u"&&p instanceof Promise?p.then(function(f){return[f,l,d]}):[p,l,d]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var o=e.prototype;return o.createDraft=function(r){bt(r)||pt(8),Tt(r)&&(r=dl(r));var n=$i(this),a=Ir(this,r,void 0);return a[D].C=!0,Pr(n),a},o.finishDraft=function(r,n){var a=r&&r[D],i=a.A;return Er(i,n),Nr(void 0,i)},o.setAutoFreeze=function(r){this.D=r},o.setUseProxies=function(r){r&&!Hi&&pt(20),this.O=r},o.applyPatches=function(r,n){var a;for(a=n.length-1;a>=0;a--){var i=n[a];if(i.path.length===0&&i.op==="replace"){r=i.value;break}}a>-1&&(n=n.slice(a+1));var l=wt("Patches").$;return Tt(r)?l(r,n):this.produce(r,function(d){return l(d,n)})},e}(),it=new yl,hl=it.produce,Vh=it.produceWithPatches.bind(it),Yh=it.setAutoFreeze.bind(it),qh=it.setUseProxies.bind(it),Xh=it.applyPatches.bind(it),Jh=it.createDraft.bind(it),Qh=it.finishDraft.bind(it),_o=hl;function Yt(e){"@babel/helpers - typeof";return Yt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Yt(e)}function Mr(e,o){if(Yt(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,o||"default");if(Yt(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(e)}function zr(e){var o=Mr(e,"string");return Yt(o)==="symbol"?o:String(o)}function Ur(e,o,r){return o=zr(o),o in e?Object.defineProperty(e,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[o]=r,e}function Yi(e,o){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);o&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Wo(e){for(var o=1;o<arguments.length;o++){var r=arguments[o]!=null?arguments[o]:{};o%2?Yi(Object(r),!0).forEach(function(n){Ur(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yi(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function X(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 qi=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Hr=function(){return Math.random().toString(36).substring(7).split("").join(".")},$o={INIT:"@@redux/INIT"+Hr(),REPLACE:"@@redux/REPLACE"+Hr(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Hr()}};function ml(e){if(typeof e!="object"||e===null)return!1;for(var o=e;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return Object.getPrototypeOf(e)===o}function Gr(e,o,r){var n;if(typeof o=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(X(0));if(typeof o=="function"&&typeof r>"u"&&(r=o,o=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(X(1));return r(Gr)(e,o)}if(typeof e!="function")throw new Error(X(2));var a=e,i=o,l=[],d=l,p=!1;function f(){d===l&&(d=l.slice())}function y(){if(p)throw new Error(X(3));return i}function h(v){if(typeof v!="function")throw new Error(X(4));if(p)throw new Error(X(5));var R=!0;return f(),d.push(v),function(){if(R){if(p)throw new Error(X(6));R=!1,f();var N=d.indexOf(v);d.splice(N,1),l=null}}}function m(v){if(!ml(v))throw new Error(X(7));if(typeof v.type>"u")throw new Error(X(8));if(p)throw new Error(X(9));try{p=!0,i=a(i,v)}finally{p=!1}for(var R=l=d,E=0;E<R.length;E++){var N=R[E];N()}return v}function b(v){if(typeof v!="function")throw new Error(X(10));a=v,m({type:$o.REPLACE})}function g(){var v,R=h;return v={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(X(11));function P(){N.next&&N.next(y())}P();var T=R(P);return{unsubscribe:T}}},v[qi]=function(){return this},v}return m({type:$o.INIT}),n={dispatch:m,subscribe:h,getState:y,replaceReducer:b},n[qi]=g,n}function gl(e){Object.keys(e).forEach(function(o){var r=e[o],n=r(void 0,{type:$o.INIT});if(typeof n>"u")throw new Error(X(12));if(typeof r(void 0,{type:$o.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(X(13))})}function Xi(e){for(var o=Object.keys(e),r={},n=0;n<o.length;n++){var a=o[n];typeof e[a]=="function"&&(r[a]=e[a])}var i=Object.keys(r),l,d;try{gl(r)}catch(p){d=p}return function(f,y){if(f===void 0&&(f={}),d)throw d;if(0)var h;for(var m=!1,b={},g=0;g<i.length;g++){var v=i[g],R=r[v],E=f[v],N=R(E,y);if(typeof N>"u"){var P=y&&y.type;throw new Error(X(14))}b[v]=N,m=m||N!==E}return m=m||i.length!==Object.keys(f).length,m?b:f}}function Pe(){for(var e=arguments.length,o=new Array(e),r=0;r<e;r++)o[r]=arguments[r];return o.length===0?function(n){return n}:o.length===1?o[0]:o.reduce(function(n,a){return function(){return n(a.apply(void 0,arguments))}})}function Ji(){for(var e=arguments.length,o=new Array(e),r=0;r<e;r++)o[r]=arguments[r];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(X(15))},l={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},d=o.map(function(p){return p(l)});return i=Pe.apply(void 0,d)(a.dispatch),Wo(Wo({},a),{},{dispatch:i})}}}function Qi(e){var o=function(n){var a=n.dispatch,i=n.getState;return function(l){return function(d){return typeof d=="function"?d(a,i,e):l(d)}}};return o}var tc=Qi();tc.withExtraArgument=Qi;var Fr=tc;var ac=function(){var e=function(o,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(n[i]=a[i])},e(o,r)};return function(o,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(o,r);function n(){this.constructor=o}o.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),bl=function(e,o){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,l;return l={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function d(f){return function(y){return p([f,y])}}function p(f){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,a&&(i=f[0]&2?a.return:f[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,f[1])).done)return i;switch(a=0,i&&(f=[f[0]&2,i.value]),f[0]){case 0:case 1:i=f;break;case 4:return r.label++,{value:f[1],done:!1};case 5:r.label++,a=f[1],f=[0];continue;case 7:f=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(f[0]===6||f[0]===2)){r=0;continue}if(f[0]===3&&(!i||f[1]>i[0]&&f[1]<i[3])){r.label=f[1];break}if(f[0]===6&&r.label<i[1]){r.label=i[1],i=f;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(f);break}i[2]&&r.ops.pop(),r.trys.pop();continue}f=o.call(e,r)}catch(y){f=[6,y],a=0}finally{n=i=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},Ie=function(e,o){for(var r=0,n=o.length,a=e.length;r<n;r++,a++)e[a]=o[r];return e},xl=Object.defineProperty,vl=Object.defineProperties,Sl=Object.getOwnPropertyDescriptors,ec=Object.getOwnPropertySymbols,Ol=Object.prototype.hasOwnProperty,Cl=Object.prototype.propertyIsEnumerable,oc=function(e,o,r){return o in e?xl(e,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[o]=r},qt=function(e,o){for(var r in o||(o={}))Ol.call(o,r)&&oc(e,r,o[r]);if(ec)for(var n=0,a=ec(o);n<a.length;n++){var r=a[n];Cl.call(o,r)&&oc(e,r,o[r])}return e},jr=function(e,o){return vl(e,Sl(o))},wl=function(e,o,r){return new Promise(function(n,a){var i=function(p){try{d(r.next(p))}catch(f){a(f)}},l=function(p){try{d(r.throw(p))}catch(f){a(f)}},d=function(p){return p.done?n(p.value):Promise.resolve(p.value).then(i,l)};d((r=r.apply(e,o)).next())})};var El=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Pe:Pe.apply(null,arguments)},gm=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function Nl(e){if(typeof e!="object"||e===null)return!1;var o=Object.getPrototypeOf(e);if(o===null)return!0;for(var r=o;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return o===r}var Al=function(e){ac(o,e);function o(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=e.apply(this,r)||this;return Object.setPrototypeOf(a,o.prototype),a}return Object.defineProperty(o,Symbol.species,{get:function(){return o},enumerable:!1,configurable:!0}),o.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},o.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(o.bind.apply(o,Ie([void 0],r[0].concat(this)))):new(o.bind.apply(o,Ie([void 0],r.concat(this))))},o}(Array),Rl=function(e){ac(o,e);function o(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=e.apply(this,r)||this;return Object.setPrototypeOf(a,o.prototype),a}return Object.defineProperty(o,Symbol.species,{get:function(){return o},enumerable:!1,configurable:!0}),o.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},o.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(o.bind.apply(o,Ie([void 0],r[0].concat(this)))):new(o.bind.apply(o,Ie([void 0],r.concat(this))))},o}(Array);function Vr(e){return bt(e)?_o(e,function(){}):e}function Ll(e){return typeof e=="boolean"}function Pl(){return function(o){return Il(o)}}function Il(e){e===void 0&&(e={});var o=e.thunk,r=o===void 0?!0:o,n=e.immutableCheck,a=n===void 0?!0:n,i=e.serializableCheck,l=i===void 0?!0:i,d=new Al;if(r&&(Ll(r)?d.push(Fr):d.push(Fr.withExtraArgument(r.extraArgument))),0){if(a)var p;if(l)var f}return d}var Kr=!0;function ic(e){var o=Pl(),r=e||{},n=r.reducer,a=n===void 0?void 0:n,i=r.middleware,l=i===void 0?o():i,d=r.devTools,p=d===void 0?!0:d,f=r.preloadedState,y=f===void 0?void 0:f,h=r.enhancers,m=h===void 0?void 0:h,b;if(typeof a=="function")b=a;else if(Nl(a))b=Xi(a);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var g=l;if(typeof g=="function"&&(g=g(o),!Kr&&!Array.isArray(g)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Kr&&g.some(function(T){return typeof T!="function"}))throw new Error("each middleware provided to configureStore must be a function");var v=Ji.apply(void 0,g),R=Pe;p&&(R=El(qt({trace:!Kr},typeof p=="object"&&p)));var E=new Rl(v),N=E;Array.isArray(m)?N=Ie([v],m):typeof m=="function"&&(N=m(E));var P=R.apply(void 0,N);return Gr(b,y,P)}function Xt(e,o){function r(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(o){var i=o.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return qt(qt({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=function(){return""+e},r.type=e,r.match=function(n){return n.type===e},r}function cc(e){var o={},r=[],n,a={addCase:function(i,l){var d=typeof i=="string"?i:i.type;if(d in o)throw new Error("addCase cannot be called with two reducers for the same action type");return o[d]=l,a},addMatcher:function(i,l){return r.push({matcher:i,reducer:l}),a},addDefaultCase:function(i){return n=i,a}};return e(a),[o,r,n]}function kl(e){return typeof e=="function"}function Tl(e,o,r,n){r===void 0&&(r=[]);var a=typeof o=="function"?cc(o):[o,r,n],i=a[0],l=a[1],d=a[2],p;if(kl(e))p=function(){return Vr(e())};else{var f=Vr(e);p=function(){return f}}function y(h,m){h===void 0&&(h=p());var b=Ie([i[m.type]],l.filter(function(g){var v=g.matcher;return v(m)}).map(function(g){var v=g.reducer;return v}));return b.filter(function(g){return!!g}).length===0&&(b=[d]),b.reduce(function(g,v){if(v)if(Tt(g)){var R=g,E=v(R,m);return E===void 0?g:E}else{if(bt(g))return _o(g,function(N){return v(N,m)});var E=v(g,m);if(E===void 0){if(g===null)return g;throw Error("A case reducer on a non-draftable value must not return undefined")}return E}return g},h)}return y.getInitialState=p,y}function Bl(e,o){return e+"/"+o}function lc(e){var o=e.name;if(!o)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof e.initialState=="function"?e.initialState:Vr(e.initialState),n=e.reducers||{},a=Object.keys(n),i={},l={},d={};a.forEach(function(y){var h=n[y],m=Bl(o,y),b,g;"reducer"in h?(b=h.reducer,g=h.prepare):b=h,i[y]=b,l[m]=b,d[y]=g?Xt(m,g):Xt(m)});function p(){var y=typeof e.extraReducers=="function"?cc(e.extraReducers):[e.extraReducers],h=y[0],m=h===void 0?{}:h,b=y[1],g=b===void 0?[]:b,v=y[2],R=v===void 0?void 0:v,E=qt(qt({},m),l);return Tl(r,function(N){for(var P in E)N.addCase(P,E[P]);for(var T=0,B=g;T<B.length;T++){var ct=B[T];N.addMatcher(ct.matcher,ct.reducer)}R&&N.addDefaultCase(R)})}var f;return{name:o,reducer:function(y,h){return f||(f=p()),f(y,h)},actions:d,caseReducers:i,getInitialState:function(){return f||(f=p()),f.getInitialState()}}}var _l="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Wl=function(e){e===void 0&&(e=21);for(var o="",r=e;r--;)o+=_l[Math.random()*64|0];return o},$l=["name","message","stack","code"],Zr=function(){function e(o,r){this.payload=o,this.meta=r}return e}(),rc=function(){function e(o,r){this.payload=o,this.meta=r}return e}(),Dl=function(e){if(typeof e=="object"&&e!==null){for(var o={},r=0,n=$l;r<n.length;r++){var a=n[r];typeof e[a]=="string"&&(o[a]=e[a])}return o}return{message:String(e)}},Sm=function(){function e(o,r,n){var a=Xt(o+"/fulfilled",function(y,h,m,b){return{payload:y,meta:jr(qt({},b||{}),{arg:m,requestId:h,requestStatus:"fulfilled"})}}),i=Xt(o+"/pending",function(y,h,m){return{payload:void 0,meta:jr(qt({},m||{}),{arg:h,requestId:y,requestStatus:"pending"})}}),l=Xt(o+"/rejected",function(y,h,m,b,g){return{payload:b,error:(n&&n.serializeError||Dl)(y||"Rejected"),meta:jr(qt({},g||{}),{arg:m,requestId:h,rejectedWithValue:!!b,requestStatus:"rejected",aborted:y?.name==="AbortError",condition:y?.name==="ConditionError"})}}),d=!1,p=typeof AbortController<"u"?AbortController:function(){function y(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return y.prototype.abort=function(){},y}();function f(y){return function(h,m,b){var g=n?.idGenerator?n.idGenerator(y):Wl(),v=new p,R,E=!1;function N(T){R=T,v.abort()}var P=function(){return wl(this,null,function(){var T,B,ct,Bt,Jo,_t,rt;return bl(this,function(lt){switch(lt.label){case 0:return lt.trys.push([0,4,,5]),Bt=(T=n?.condition)==null?void 0:T.call(n,y,{getState:m,extra:b}),zl(Bt)?[4,Bt]:[3,2];case 1:Bt=lt.sent(),lt.label=2;case 2:if(Bt===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return E=!0,Jo=new Promise(function(nt,Jt){return v.signal.addEventListener("abort",function(){return Jt({name:"AbortError",message:R||"Aborted"})})}),h(i(g,y,(B=n?.getPendingMeta)==null?void 0:B.call(n,{requestId:g,arg:y},{getState:m,extra:b}))),[4,Promise.race([Jo,Promise.resolve(r(y,{dispatch:h,getState:m,extra:b,requestId:g,signal:v.signal,abort:N,rejectWithValue:function(nt,Jt){return new Zr(nt,Jt)},fulfillWithValue:function(nt,Jt){return new rc(nt,Jt)}})).then(function(nt){if(nt instanceof Zr)throw nt;return nt instanceof rc?a(nt.payload,g,y,nt.meta):a(nt,g,y)})])];case 3:return ct=lt.sent(),[3,5];case 4:return _t=lt.sent(),ct=_t instanceof Zr?l(null,g,y,_t.payload,_t.meta):l(_t,g,y),[3,5];case 5:return rt=n&&!n.dispatchConditionRejection&&l.match(ct)&&ct.meta.condition,rt||h(ct),[2,ct]}})})}();return Object.assign(P,{abort:N,requestId:g,arg:y,unwrap:function(){return P.then(Ml)}})}}return Object.assign(f,{pending:i,rejected:l,fulfilled:a,typePrefix:o})}return e.withTypes=function(){return e},e}();function Ml(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function zl(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var sc="listener",dc="completed",fc="cancelled",Om="task-"+fc,Cm="task-"+dc,wm=sc+"-"+fc,Em=sc+"-"+dc;var Yr="listenerMiddleware";var Nm=Xt(Yr+"/add"),Am=Xt(Yr+"/removeAll"),Rm=Xt(Yr+"/remove");var nc,Lm=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(nc||(nc=Promise.resolve())).then(e).catch(function(o){return setTimeout(function(){throw o},0)})},Ul=function(e){return function(o){setTimeout(o,e)}},Pm=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Ul(10);Ki();function Hl(e,o){return class extends e{constructor(){super(...arguments),this.eventBus=o??document.createElement("span")}addEventListener(r,n,a){this.eventBus.addEventListener(r,n,a)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,a){this.eventBus.removeEventListener(r,n,a)}}}var Do=class extends Hl(Object){};window.ftReduxStores||(window.ftReduxStores={});var pc=class e extends Do{static get(o){var r;let n=typeof o=="string"?o:o.name,a=typeof o=="string"?void 0:o,i=window.ftReduxStores[n];if(Ye(i))return i;if(a==null)return;let l=lc({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),d=ic({reducer:(p,f)=>f.type==="CLEAR_FT_REDUX_STORE"?l.getInitialState():typeof f.type=="string"&&f.type.startsWith("DEFAULT_VALUE_SETTER__")?{...p,...f.overwrites}:l.reducer(p,f)});return window.ftReduxStores[a.name]=new e(l,d)}constructor(o,r){super(),this.reduxSlice=o,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Ao;let n=a=>a!=null?JSON.parse(JSON.stringify(a)):a;this.actions=new Proxy(this.reduxSlice.actions,{get:(a,i,l)=>{let d=i,p=a[d];return p?(...f)=>{let y=p(...f.map(n));return this.reduxStore.dispatch(y),y}:f=>{this.setState({[d]:n(f)})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(o){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(o).join("_"),overwrites:o})}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(o){throw new Error("Not implemented yet.")}subscribe(o){return this.reduxStore.subscribe(o)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var Ho=O(k());var Mo=class extends Gt{async listMySearches(){let o=L.getState().session;return o?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(o.profile.userId),5*60*1e3):[]}};var zo=class extends Gt{async listMyBookmarks(){let o=L.getState().session;return o?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(o.profile.userId),5*60*1e3):[]}};var Fl="ft-user-assets",Uo=Ho.FtReduxStore.get({name:Fl,initialState:{savedSearches:void 0,bookmarks:void 0}}),qr=class{constructor(){this.currentSession=L.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new zo,this.savedSearchesService=new Mo,L.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var o;let{session:r}=L.getState();(0,Ho.deepEqual)((o=this.currentSession)===null||o===void 0?void 0:o.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Uo.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Uo.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let o=await this.savedSearchesService.listMySearches();Uo.actions.savedSearches(o)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var o;if(this.bookmarksAreUsed){let r=!((o=this.currentSession)===null||o===void 0)&&o.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Uo.actions.bookmarks(r)}}},fg=new qr;var Xr=class{addCommand(o,r=!1){L.commands.add(o,r)}consumeCommand(o){return L.commands.consume(o)}};window.FluidTopicsAppInfoStoreService=new Xr;var uc=O(k()),Jr=class{highlightHtml(o,r,n){(0,uc.highlightHtml)(o,r,n)}};window.FluidTopicsHighlightHtmlService=new Jr;var yc=O(k());var Qr=class{isDate(o){var r,n,a,i;return(i=(a=((n=(r=L.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(d=>d.key===o))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(o,r){var n,a,i;return yc.DateFormatter.format(o,(n=r?.locale)!==null&&n!==void 0?n:L.getState().uiLocale,(a=r?.longFormat)!==null&&a!==void 0?a:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1)}};window.FluidTopicsDateService=new Qr;var jl=O(k());(0,hc.customElement)("ft-app-context")(U);var mc=O(Y()),Kl=function(e,o,r,n){var a=arguments.length,i=a<3?o:n===null?n=Object.getOwnPropertyDescriptor(o,r):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,o,r,n);else for(var d=e.length-1;d>=0;d--)(l=e[d])&&(i=(a<3?l(i):a>3?l(o,r,i):l(o,r))||i);return a>3&&i&&Object.defineProperty(o,r,i),i},tn=Symbol("i18nAttributes"),en=Symbol("i18nListAttributes"),Go=Symbol("i18nProperties"),on=Symbol("i18nManualContexts"),eo=Symbol("i18nUnsubs");function gc(e){var o,r;class n extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[o]=new Map,this[r]=new Map}get i18nService(){return this.useCustomMessageContexts?Ci:ce}i18n(i,l,...d){var p;if(typeof i=="string")return this.i18nService.resolveMessage(i,l,...d);let f=(p=i.args)!==null&&p!==void 0?p:i.argsProvider?i.argsProvider(this):[];return this.i18nService.resolveMessage(i.context,i.key,...f)}onI18nUpdate(i){var l,d,p;(l=this[tn])===null||l===void 0||l.forEach((f,y)=>{let h=this.getI18nAttributeValue(y);h&&(this[y]=this.getI18nAttributeMessage(h,f,i))}),(d=this[en])===null||d===void 0||d.forEach((f,y)=>{let h=this.getI18nListAttributeValues(y);this[y]=h?.map(m=>this.getI18nAttributeMessage(m,f,i))}),(p=this[Go])===null||p===void 0||p.forEach((f,y)=>{f.context.toLowerCase()===i.toLowerCase()&&(this[y]=this.i18n(f))}),setTimeout(()=>this.requestUpdate(),0)}buildI18nAttributeMessage(i,l){return{...i,message:this.i18n({context:i.context,key:i.key,...l})}}getI18nAttributeMessage(i,l,d){var p;let f=!d||((p=i.context)===null||p===void 0?void 0:p.toLowerCase())===d.toLowerCase();return i.context&&i.key&&f?this.buildI18nAttributeMessage(i,l):i}update(i){var l,d,p;super.update(i),(l=this[tn])===null||l===void 0||l.forEach((f,y)=>{let h=this.getI18nAttributeValue(y);h?.context&&h.key&&(i.has(y)||f.argsProvider!=null)&&(this.addI18nContextIfNeeded(h,i,y),this[y]=this.getI18nAttributeMessage(h,f))}),(d=this[en])===null||d===void 0||d.forEach((f,y)=>{let h=this.getI18nListAttributeValues(y);(i.has(y)||f.argsProvider!=null)&&(this[y]=h?.map(m=>(this.addI18nContextIfNeeded(m,i,y),this.getI18nAttributeMessage(m,f))))}),(p=this[Go])===null||p===void 0||p.forEach((f,y)=>{f.argsProvider!=null&&(this[y]=this.i18n(f))})}getI18nAttributeValue(i){return this[i]}getI18nListAttributeValues(i){return this[i]}addI18nContextIfNeeded(i,l,d){i.context&&i.key&&l.has(d)&&this.addI18nContext(i.context)}addI18nMessagesAndSubscribe(i,l){i=i.toLowerCase(),this[eo].has(i)||this[eo].set(i,this.i18nService.subscribe(i,()=>this.onI18nUpdate(i))),this.i18nService.prepareContext(i,l??{}),this.onI18nUpdate(i)}connectedCallback(){var i,l,d,p,f,y;super.connectedCallback(),new Set([...(l=(i=this[Go])===null||i===void 0?void 0:i.values())!==null&&l!==void 0?l:[],...[...(p=(d=this[tn])===null||d===void 0?void 0:d.keys())!==null&&p!==void 0?p:[]].map(h=>this.getI18nAttributeValue(h)),...[...(y=(f=this[en])===null||f===void 0?void 0:f.keys())!==null&&y!==void 0?y:[]].flatMap(h=>this.getI18nListAttributeValues(h))].map(h=>h?.context)).forEach(h=>h&&this.addI18nMessages(h)),this[on].forEach((h,m)=>{this.addI18nMessages(m,h)})}addI18nMessages(i,l){this[on].set(i,l??{}),this.addI18nMessagesAndSubscribe(i,l)}addI18nContext(i,l){this.addI18nMessages(typeof i=="string"?i:i.name,l)}disconnectedCallback(){super.disconnectedCallback(),this[eo].forEach(i=>i()),this[eo].clear()}}return o=on,r=eo,Kl([(0,mc.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}var Fo=class extends gc(Ko.FtLitElement){},jo=class extends gc(Ko.FtLitElementRedux){};var oo=function(e,o,r,n){var a=arguments.length,i=a<3?o:n===null?n=Object.getOwnPropertyDescriptor(o,r):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,o,r,n);else for(var d=e.length-1;d>=0;d--)(l=e[d])&&(i=(a<3?l(i):a>3?l(o,r,i):l(o,r))||i);return a>3&&i&&Object.defineProperty(o,r,i),i},xt=class extends jo{constructor(){super(),this.editorMode=!1,this.addStore(L)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Zo.nothing:Zo.html`
1102
+ `}update(o){var r,n,a,i,l;super.update(o),o.has("baseUrl")&&(L.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),o.has("apiIntegrationIdentifier")&&L.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),o.has("uiLocale")&&L.actions.uiLocale(this.uiLocale),o.has("metadataConfiguration")&&L.actions.metadataConfiguration(this.metadataConfiguration),o.has("noCustom")&&L.actions.noCustom(this.noCustom),o.has("editorMode")&&L.actions.editorMode(this.editorMode),o.has("noCustomComponent")&&L.actions.noCustomComponent(this.noCustomComponent),o.has("session")&&L.actions.session(this.session),o.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(d=>ce.addContext(d)),o.has("openExternalDocumentInNewTab")&&L.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),o.has("navigatorOnline")&&L.actions.navigatorOnline(this.navigatorOnline),o.has("forcedOffline")&&L.actions.forcedOffline(this.forcedOffline),o.has("localesConfiguration")&&(L.actions.defaultLocales((r=this.localesConfiguration)===null||r===void 0?void 0:r.defaultLocales),L.actions.availableUiLocales((a=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&a!==void 0?a:[]),L.actions.searchInAllLanguagesAllowed((l=(i=this.localesConfiguration)===null||i===void 0?void 0:i.allLanguagesAllowed)!==null&&l!==void 0?l:!1)),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let o=await this.apiProvider().getCurrentSession();return o.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},o.idleTimeoutInMillis),o})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}};U.elementDefinitions={};U.styles=Si;q([(0,ot.property)()],U.prototype,"baseUrl",void 0);q([(0,ot.property)()],U.prototype,"apiIntegrationIdentifier",void 0);q([(0,ot.property)()],U.prototype,"uiLocale",void 0);q([(0,gt.jsonProperty)(null)],U.prototype,"availableUiLocales",void 0);q([(0,gt.jsonProperty)(null)],U.prototype,"metadataConfiguration",void 0);q([(0,ot.property)({type:Boolean})],U.prototype,"editorMode",void 0);q([(0,ot.property)({type:Boolean})],U.prototype,"noCustom",void 0);q([(0,ot.property)({type:Boolean})],U.prototype,"openExternalDocumentInNewTab",void 0);q([(0,ot.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],U.prototype,"noCustomComponent",void 0);q([(0,ot.property)({type:Boolean})],U.prototype,"withManualResources",void 0);q([(0,ot.property)({type:Boolean})],U.prototype,"navigatorOnline",void 0);q([(0,ot.property)({type:Boolean})],U.prototype,"forcedOffline",void 0);q([(0,ot.property)({type:Object})],U.prototype,"apiProvider",void 0);q([(0,gt.jsonProperty)([])],U.prototype,"messageContexts",void 0);q([(0,gt.jsonProperty)(void 0)],U.prototype,"session",void 0);q([(0,ot.state)()],U.prototype,"localesConfiguration",void 0);var Gl=O(Y());function rl(e,o){if(e===o)return!0;if(e&&o&&typeof e=="object"&&typeof o=="object"){if(e.constructor!==o.constructor)return!1;var r,n,a;if(Array.isArray(e)){if(r=e.length,r!=o.length)return!1;for(n=r;n--!==0;)if(!Eo(e[n],o[n]))return!1;return!0}if(e instanceof Map&&o instanceof Map){if(e.size!==o.size)return!1;for(n of e.entries())if(!o.has(n[0]))return!1;for(n of e.entries())if(!Eo(n[1],o.get(n[0])))return!1;return!0}if(e instanceof Set&&o instanceof Set){if(e.size!==o.size)return!1;for(n of e.entries())if(!o.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===o.source&&e.flags===o.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===o.valueOf();let i=l=>Object.keys(l).filter(d=>l[d]!=null);if(a=i(e),r=a.length,r!==i(o).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(o,a[n]))return!1;for(n=r;n--!==0;){let l=a[n];if(!Eo(e[l],o[l]))return!1}return!0}return e!==e&&o!==o||e==null&&o==null}function Eo(e,o){try{return rl(e,o)}catch{return!1}}function No(e,o){return!Eo(e,o)}var nl=O(Y(),1);var Ao=class{constructor(){this.queue=[]}add(o,r=!1){r&&(this.queue=this.queue.filter(n=>n.type!==o.type)),this.queue.push(o)}consume(o){let r=this.queue.find(n=>n.type===o);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}};var Ve=O(Y(),1);var Ei=O(Y(),1);function Ni(e,o){let r=()=>JSON.parse(JSON.stringify(e));return(0,Ei.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return r();try{return JSON.parse(n)}catch{return r()}},toAttribute:n=>JSON.stringify(n)},hasChanged:No,...o??{}})}var Ro=class{constructor(o=0){this.timeout=o,this.callbacks=[]}run(o,r){return this.callbacks=[o],this.debounce(r)}queue(o,r){return this.callbacks.push(o),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(o){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),o??this.timeout),this.promise}async runCallbacks(){var o,r;let n=[...this.callbacks];this.callbacks=[];let a=(o=this.rejectPromise)!==null&&o!==void 0?o:()=>null,i=(r=this.resolvePromise)!==null&&r!==void 0?r:()=>null;this.clearPromise();for(let l of n)try{await l()}catch(d){a(d);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Ri=O(M(),1);var Lo=window,al=Lo.ShadowRoot&&(Lo.ShadyCSS===void 0||Lo.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Wh=Symbol();var Ai=(e,o)=>{al?e.adoptedStyleSheets=o.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet):o.forEach(r=>{let n=document.createElement("style"),a=Lo.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=r.cssText,e.appendChild(n)})};var Po=class extends Ri.LitElement{createRenderRoot(){let o=this.constructor;o.elementDefinitions&&!o.registry&&(o.registry=new CustomElementRegistry,Object.entries(o.elementDefinitions).forEach(([a,i])=>o.registry.define(a,i)));let r={...o.shadowRootOptions,customElements:o.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return Ai(n,o.elementStyles),n}};var Io=function(e,o,r,n){var a=arguments.length,i=a<3?o:n===null?n=Object.getOwnPropertyDescriptor(o,r):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,o,r,n);else for(var d=e.length-1;d>=0;d--)(l=e[d])&&(i=(a<3?l(i):a>3?l(o,r,i):l(o,r))||i);return a>3&&i&&Object.defineProperty(o,r,i),i},ki,Li=Symbol("constructorPrototype"),Pi=Symbol("constructorName"),Ti=Symbol("exportpartsDebouncer"),Ii=Symbol("dynamicDependenciesLoaded"),jt=class extends Po{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[ki]=new Ro(5),this[Pi]=this.constructor.name,this[Li]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Pi]&&Object.setPrototypeOf(this,this[Li])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(r){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",r)}let o=this.constructor;o[Ii]||(o[Ii]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(o){super.updated(o),this.updateComplete.then(()=>{this.contentAvailableCallback(o),this.applyCustomStylesheet(o),this.scheduleExportpartsUpdate()})}contentAvailableCallback(o){}applyCustomStylesheet(o){var r,n,a;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(o.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}scheduleExportpartsUpdate(){var o,r,n;(!((o=this.exportpartsPrefix)===null||o===void 0)&&o.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[Ti].run(()=>{var a,i;!((a=this.exportpartsPrefix)===null||a===void 0)&&a.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(o){var r,n,a,i,l,d;let p=m=>m!=null&&m.trim().length>0,f=o.filter(p).map(m=>m.trim());if(f.length===0){this.removeAttribute("exportparts");return}let y=new Set;for(let m of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let b=(i=(a=m.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],g=(d=(l=m.getAttribute("exportparts"))===null||l===void 0?void 0:l.split(",").map(v=>v.split(":")[1]))!==null&&d!==void 0?d:[];new Array(...b,...g).filter(p).map(v=>v.trim()).forEach(v=>y.add(v))}if(y.size===0){this.removeAttribute("exportparts");return}let h=[...y.values()].flatMap(m=>f.map(b=>`${m}:${b}--${m}`));this.setAttribute("exportparts",[...this.part,...h].join(", "))}};ki=Ti;Io([(0,Ve.property)()],jt.prototype,"exportpartsPrefix",void 0);Io([Ni([])],jt.prototype,"exportpartsPrefixes",void 0);Io([(0,Ve.property)()],jt.prototype,"customStylesheet",void 0);Io([(0,Ve.state)()],jt.prototype,"useAdoptedStyleSheets",void 0);function Ye(e){var o;return(o=e?.isFtReduxStore)!==null&&o!==void 0?o:!1}var Bi,_i,Wi,qe=Symbol("internalReduxEventsUnsubscribers"),Kt=Symbol("internalStoresUnsubscribers"),le=Symbol("internalStores"),Xe=class extends jt{constructor(){super(...arguments),this[Bi]=new Map,this[_i]=new Map,this[Wi]=new Map}get reduxConstructor(){return this.constructor}update(o){super.update(o),[...this.reduxConstructor.reduxReactiveProperties].some(r=>o.has(r))&&this.updateFromStores()}getUnnamedStore(){if(this[le].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[le].values()][0]}getStore(o){return o==null?this.getUnnamedStore():this[le].get(o)}addStore(o,r){var n;r=(n=r??(Ye(o)?o.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(r),this[le].set(r,o),this.subscribeToStore(r,o),this.updateFromStores()}removeStore(o){let r=typeof o=="string"?o:o.name;this.unsubscribeFromStore(r),this[le].delete(r)}setupStores(){this.unsubscribeFromStores(),this[le].forEach((o,r)=>this.subscribeToStore(r,o)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((o,r)=>{let n=this.constructor.getPropertyOptions(r);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:r)){let a=this.getStore(o.store);a&&(o.store?this[Kt].has(o.store):this[Kt].size>0)&&(this[r]=o.selector(a.getState(),this))}})}subscribeToStore(o,r){var n;this[Kt].set(o,r.subscribe(()=>this.updateFromStores())),this[qe].set(o,[]),Ye(r)&&r.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((a,i)=>{if(typeof this[i]=="function"&&(!a.store||r.name===a.store)){let l=d=>this[i](d);r.addEventListener(a.eventName,l),this[qe].get(o).push(()=>r.removeEventListener(a.eventName,l))}})),this.onStoreAvailable(o)}unsubscribeFromStores(){this[Kt].forEach((o,r)=>this.unsubscribeFromStore(r))}unsubscribeFromStore(o){var r;this[Kt].has(o)&&this[Kt].get(o)(),this[Kt].delete(o),(r=this[qe].get(o))===null||r===void 0||r.forEach(n=>n()),this[qe].delete(o)}onStoreAvailable(o){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};Bi=Kt,_i=le,Wi=qe;Xe.reduxProperties=new Map;Xe.reduxReactiveProperties=new Set;Xe.reduxEventListeners=new Map;function pt(e){for(var o=arguments.length,r=Array(o>1?o-1:0),n=1;n<o;n++)r[n-1]=arguments[n];if(0)var a,i;throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map(function(l){return"'"+l+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Tt(e){return!!e&&!!e[D]}function bt(e){var o;return!!e&&(function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===ul}(e)||Array.isArray(e)||!!e[Gi]||!!(!((o=e.constructor)===null||o===void 0)&&o[Gi])||Tr(e)||Br(e))}function se(e,o,r){r===void 0&&(r=!1),Le(e)===0?(r?Object.keys:Re)(e).forEach(function(n){r&&typeof n=="symbol"||o(n,e[n],e)}):e.forEach(function(n,a){return o(a,n,e)})}function Le(e){var o=e[D];return o?o.i>3?o.i-4:o.i:Array.isArray(e)?1:Tr(e)?2:Br(e)?3:0}function Ae(e,o){return Le(e)===2?e.has(o):Object.prototype.hasOwnProperty.call(e,o)}function il(e,o){return Le(e)===2?e.get(o):e[o]}function Fi(e,o,r){var n=Le(e);n===2?e.set(o,r):n===3?e.add(r):e[o]=r}function ji(e,o){return e===o?e!==0||1/e==1/o:e!=e&&o!=o}function Tr(e){return fl&&e instanceof Map}function Br(e){return pl&&e instanceof Set}function Zt(e){return e.o||e.t}function _r(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var o=Vi(e);delete o[D];for(var r=Re(o),n=0;n<r.length;n++){var a=r[n],i=o[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(o[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[a]})}return Object.create(Object.getPrototypeOf(e),o)}function Wr(e,o){return o===void 0&&(o=!1),$r(e)||Tt(e)||!bt(e)||(Le(e)>1&&(e.set=e.add=e.clear=e.delete=cl),Object.freeze(e),o&&se(e,function(r,n){return Wr(n,!0)},!0)),e}function cl(){pt(2)}function $r(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function wt(e){var o=kr[e];return o||pt(18,e),o}function ll(e,o){kr[e]||(kr[e]=o)}function Lr(){return Qe}function Er(e,o){o&&(wt("Patches"),e.u=[],e.s=[],e.v=o)}function ko(e){Pr(e),e.p.forEach(sl),e.p=null}function Pr(e){e===Qe&&(Qe=e.l)}function $i(e){return Qe={p:[],l:Qe,h:e,m:!0,_:0}}function sl(e){var o=e[D];o.i===0||o.i===1?o.j():o.g=!0}function Nr(e,o){o._=o.p.length;var r=o.p[0],n=e!==void 0&&e!==r;return o.h.O||wt("ES5").S(o,e,n),n?(r[D].P&&(ko(o),pt(4)),bt(e)&&(e=To(o,e),o.l||Bo(o,e)),o.u&&wt("Patches").M(r[D].t,e,o.u,o.s)):e=To(o,r,[]),ko(o),o.u&&o.v(o.u,o.s),e!==Zi?e:void 0}function To(e,o,r){if($r(o))return o;var n=o[D];if(!n)return se(o,function(d,p){return Di(e,n,o,d,p,r)},!0),o;if(n.A!==e)return o;if(!n.P)return Bo(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=_r(n.k):n.o,i=a,l=!1;n.i===3&&(i=new Set(a),a.clear(),l=!0),se(i,function(d,p){return Di(e,n,a,d,p,r,l)}),Bo(e,a,!1),r&&e.u&&wt("Patches").N(n,r,e.u,e.s)}return n.o}function Di(e,o,r,n,a,i,l){if(Tt(a)){var d=To(e,a,i&&o&&o.i!==3&&!Ae(o.R,n)?i.concat(n):void 0);if(Fi(r,n,d),!Tt(d))return;e.m=!1}else l&&r.add(a);if(bt(a)&&!$r(a)){if(!e.h.D&&e._<1)return;To(e,a),o&&o.A.l||Bo(e,a)}}function Bo(e,o,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&Wr(o,r)}function Ar(e,o){var r=e[D];return(r?Zt(r):e)[o]}function Mi(e,o){if(o in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,o);if(n)return n;r=Object.getPrototypeOf(r)}}function Vt(e){e.P||(e.P=!0,e.l&&Vt(e.l))}function Rr(e){e.o||(e.o=_r(e.t))}function Ir(e,o,r){var n=Tr(o)?wt("MapSet").F(o,r):Br(o)?wt("MapSet").T(o,r):e.O?function(a,i){var l=Array.isArray(a),d={i:l?1:0,A:i?i.A:Lr(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},p=d,f=to;l&&(p=[d],f=Je);var y=Proxy.revocable(p,f),h=y.revoke,m=y.proxy;return d.k=m,d.j=h,m}(o,r):wt("ES5").J(o,r);return(r?r.A:Lr()).p.push(n),n}function dl(e){return Tt(e)||pt(22,e),function o(r){if(!bt(r))return r;var n,a=r[D],i=Le(r);if(a){if(!a.P&&(a.i<4||!wt("ES5").K(a)))return a.t;a.I=!0,n=zi(r,i),a.I=!1}else n=zi(r,i);return se(n,function(l,d){a&&il(a.t,l)===d||Fi(n,l,o(d))}),i===3?new Set(n):n}(e)}function zi(e,o){switch(o){case 2:return new Map(e);case 3:return Array.from(e)}return _r(e)}function Ki(){function e(l,d){var p=i[l];return p?p.enumerable=d:i[l]=p={configurable:!0,enumerable:d,get:function(){var f=this[D];return to.get(f,l)},set:function(f){var y=this[D];to.set(y,l,f)}},p}function o(l){for(var d=l.length-1;d>=0;d--){var p=l[d][D];if(!p.P)switch(p.i){case 5:n(p)&&Vt(p);break;case 4:r(p)&&Vt(p)}}}function r(l){for(var d=l.t,p=l.k,f=Re(p),y=f.length-1;y>=0;y--){var h=f[y];if(h!==D){var m=d[h];if(m===void 0&&!Ae(d,h))return!0;var b=p[h],g=b&&b[D];if(g?g.t!==m:!ji(b,m))return!0}}var v=!!d[D];return f.length!==Re(d).length+(v?0:1)}function n(l){var d=l.k;if(d.length!==l.t.length)return!0;var p=Object.getOwnPropertyDescriptor(d,d.length-1);if(p&&!p.get)return!0;for(var f=0;f<d.length;f++)if(!d.hasOwnProperty(f))return!0;return!1}function a(l){l.g&&pt(3,JSON.stringify(Zt(l)))}var i={};ll("ES5",{J:function(l,d){var p=Array.isArray(l),f=function(h,m){if(h){for(var b=Array(m.length),g=0;g<m.length;g++)Object.defineProperty(b,""+g,e(g,!0));return b}var v=Vi(m);delete v[D];for(var R=Re(v),E=0;E<R.length;E++){var N=R[E];v[N]=e(N,h||!!v[N].enumerable)}return Object.create(Object.getPrototypeOf(m),v)}(p,l),y={i:p?5:4,A:d?d.A:Lr(),P:!1,I:!1,R:{},l:d,t:l,k:f,o:null,g:!1,C:!1};return Object.defineProperty(f,D,{value:y,writable:!0}),f},S:function(l,d,p){p?Tt(d)&&d[D].A===l&&o(l.p):(l.u&&function f(y){if(y&&typeof y=="object"){var h=y[D];if(h){var m=h.t,b=h.k,g=h.R,v=h.i;if(v===4)se(b,function(T){T!==D&&(m[T]!==void 0||Ae(m,T)?g[T]||f(b[T]):(g[T]=!0,Vt(h)))}),se(m,function(T){b[T]!==void 0||Ae(b,T)||(g[T]=!1,Vt(h))});else if(v===5){if(n(h)&&(Vt(h),g.length=!0),b.length<m.length)for(var R=b.length;R<m.length;R++)g[R]=!1;else for(var E=m.length;E<b.length;E++)g[E]=!0;for(var N=Math.min(b.length,m.length),P=0;P<N;P++)b.hasOwnProperty(P)||(g[P]=!0),g[P]===void 0&&f(b[P])}}}}(l.p[0]),o(l.p))},K:function(l){return l.i===4?r(l):n(l)}})}var Ui,Qe,Dr=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",fl=typeof Map<"u",pl=typeof Set<"u",Hi=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Zi=Dr?Symbol.for("immer-nothing"):((Ui={})["immer-nothing"]=!0,Ui),Gi=Dr?Symbol.for("immer-draftable"):"__$immer_draftable",D=Dr?Symbol.for("immer-state"):"__$immer_state";var ul=""+Object.prototype.constructor,Re=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Vi=Object.getOwnPropertyDescriptors||function(e){var o={};return Re(e).forEach(function(r){o[r]=Object.getOwnPropertyDescriptor(e,r)}),o},kr={},to={get:function(e,o){if(o===D)return e;var r=Zt(e);if(!Ae(r,o))return function(a,i,l){var d,p=Mi(i,l);return p?"value"in p?p.value:(d=p.get)===null||d===void 0?void 0:d.call(a.k):void 0}(e,r,o);var n=r[o];return e.I||!bt(n)?n:n===Ar(e.t,o)?(Rr(e),e.o[o]=Ir(e.A.h,n,e)):n},has:function(e,o){return o in Zt(e)},ownKeys:function(e){return Reflect.ownKeys(Zt(e))},set:function(e,o,r){var n=Mi(Zt(e),o);if(n?.set)return n.set.call(e.k,r),!0;if(!e.P){var a=Ar(Zt(e),o),i=a?.[D];if(i&&i.t===r)return e.o[o]=r,e.R[o]=!1,!0;if(ji(r,a)&&(r!==void 0||Ae(e.t,o)))return!0;Rr(e),Vt(e)}return e.o[o]===r&&(r!==void 0||o in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[o])||(e.o[o]=r,e.R[o]=!0),!0},deleteProperty:function(e,o){return Ar(e.t,o)!==void 0||o in e.t?(e.R[o]=!1,Rr(e),Vt(e)):delete e.R[o],e.o&&delete e.o[o],!0},getOwnPropertyDescriptor:function(e,o){var r=Zt(e),n=Reflect.getOwnPropertyDescriptor(r,o);return n&&{writable:!0,configurable:e.i!==1||o!=="length",enumerable:n.enumerable,value:r[o]}},defineProperty:function(){pt(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){pt(12)}},Je={};se(to,function(e,o){Je[e]=function(){return arguments[0]=arguments[0][0],o.apply(this,arguments)}}),Je.deleteProperty=function(e,o){return Je.set.call(this,e,o,void 0)},Je.set=function(e,o,r){return to.set.call(this,e[0],o,r,e[0])};var yl=function(){function e(r){var n=this;this.O=Hi,this.D=!0,this.produce=function(a,i,l){if(typeof a=="function"&&typeof i!="function"){var d=i;i=a;var p=n;return function(v){var R=this;v===void 0&&(v=d);for(var E=arguments.length,N=Array(E>1?E-1:0),P=1;P<E;P++)N[P-1]=arguments[P];return p.produce(v,function(T){var B;return(B=i).call.apply(B,[R,T].concat(N))})}}var f;if(typeof i!="function"&&pt(6),l!==void 0&&typeof l!="function"&&pt(7),bt(a)){var y=$i(n),h=Ir(n,a,void 0),m=!0;try{f=i(h),m=!1}finally{m?ko(y):Pr(y)}return typeof Promise<"u"&&f instanceof Promise?f.then(function(v){return Er(y,l),Nr(v,y)},function(v){throw ko(y),v}):(Er(y,l),Nr(f,y))}if(!a||typeof a!="object"){if((f=i(a))===void 0&&(f=a),f===Zi&&(f=void 0),n.D&&Wr(f,!0),l){var b=[],g=[];wt("Patches").M(a,f,b,g),l(b,g)}return f}pt(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(f){for(var y=arguments.length,h=Array(y>1?y-1:0),m=1;m<y;m++)h[m-1]=arguments[m];return n.produceWithPatches(f,function(b){return a.apply(void 0,[b].concat(h))})};var l,d,p=n.produce(a,i,function(f,y){l=f,d=y});return typeof Promise<"u"&&p instanceof Promise?p.then(function(f){return[f,l,d]}):[p,l,d]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var o=e.prototype;return o.createDraft=function(r){bt(r)||pt(8),Tt(r)&&(r=dl(r));var n=$i(this),a=Ir(this,r,void 0);return a[D].C=!0,Pr(n),a},o.finishDraft=function(r,n){var a=r&&r[D],i=a.A;return Er(i,n),Nr(void 0,i)},o.setAutoFreeze=function(r){this.D=r},o.setUseProxies=function(r){r&&!Hi&&pt(20),this.O=r},o.applyPatches=function(r,n){var a;for(a=n.length-1;a>=0;a--){var i=n[a];if(i.path.length===0&&i.op==="replace"){r=i.value;break}}a>-1&&(n=n.slice(a+1));var l=wt("Patches").$;return Tt(r)?l(r,n):this.produce(r,function(d){return l(d,n)})},e}(),it=new yl,hl=it.produce,Vh=it.produceWithPatches.bind(it),Yh=it.setAutoFreeze.bind(it),qh=it.setUseProxies.bind(it),Xh=it.applyPatches.bind(it),Jh=it.createDraft.bind(it),Qh=it.finishDraft.bind(it),_o=hl;function Yt(e){"@babel/helpers - typeof";return Yt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Yt(e)}function Mr(e,o){if(Yt(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,o||"default");if(Yt(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(e)}function zr(e){var o=Mr(e,"string");return Yt(o)==="symbol"?o:String(o)}function Ur(e,o,r){return o=zr(o),o in e?Object.defineProperty(e,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[o]=r,e}function Yi(e,o){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);o&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Wo(e){for(var o=1;o<arguments.length;o++){var r=arguments[o]!=null?arguments[o]:{};o%2?Yi(Object(r),!0).forEach(function(n){Ur(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yi(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function X(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 qi=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Hr=function(){return Math.random().toString(36).substring(7).split("").join(".")},$o={INIT:"@@redux/INIT"+Hr(),REPLACE:"@@redux/REPLACE"+Hr(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Hr()}};function ml(e){if(typeof e!="object"||e===null)return!1;for(var o=e;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return Object.getPrototypeOf(e)===o}function Gr(e,o,r){var n;if(typeof o=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(X(0));if(typeof o=="function"&&typeof r>"u"&&(r=o,o=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(X(1));return r(Gr)(e,o)}if(typeof e!="function")throw new Error(X(2));var a=e,i=o,l=[],d=l,p=!1;function f(){d===l&&(d=l.slice())}function y(){if(p)throw new Error(X(3));return i}function h(v){if(typeof v!="function")throw new Error(X(4));if(p)throw new Error(X(5));var R=!0;return f(),d.push(v),function(){if(R){if(p)throw new Error(X(6));R=!1,f();var N=d.indexOf(v);d.splice(N,1),l=null}}}function m(v){if(!ml(v))throw new Error(X(7));if(typeof v.type>"u")throw new Error(X(8));if(p)throw new Error(X(9));try{p=!0,i=a(i,v)}finally{p=!1}for(var R=l=d,E=0;E<R.length;E++){var N=R[E];N()}return v}function b(v){if(typeof v!="function")throw new Error(X(10));a=v,m({type:$o.REPLACE})}function g(){var v,R=h;return v={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(X(11));function P(){N.next&&N.next(y())}P();var T=R(P);return{unsubscribe:T}}},v[qi]=function(){return this},v}return m({type:$o.INIT}),n={dispatch:m,subscribe:h,getState:y,replaceReducer:b},n[qi]=g,n}function gl(e){Object.keys(e).forEach(function(o){var r=e[o],n=r(void 0,{type:$o.INIT});if(typeof n>"u")throw new Error(X(12));if(typeof r(void 0,{type:$o.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(X(13))})}function Xi(e){for(var o=Object.keys(e),r={},n=0;n<o.length;n++){var a=o[n];typeof e[a]=="function"&&(r[a]=e[a])}var i=Object.keys(r),l,d;try{gl(r)}catch(p){d=p}return function(f,y){if(f===void 0&&(f={}),d)throw d;if(0)var h;for(var m=!1,b={},g=0;g<i.length;g++){var v=i[g],R=r[v],E=f[v],N=R(E,y);if(typeof N>"u"){var P=y&&y.type;throw new Error(X(14))}b[v]=N,m=m||N!==E}return m=m||i.length!==Object.keys(f).length,m?b:f}}function Pe(){for(var e=arguments.length,o=new Array(e),r=0;r<e;r++)o[r]=arguments[r];return o.length===0?function(n){return n}:o.length===1?o[0]:o.reduce(function(n,a){return function(){return n(a.apply(void 0,arguments))}})}function Ji(){for(var e=arguments.length,o=new Array(e),r=0;r<e;r++)o[r]=arguments[r];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(X(15))},l={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},d=o.map(function(p){return p(l)});return i=Pe.apply(void 0,d)(a.dispatch),Wo(Wo({},a),{},{dispatch:i})}}}function Qi(e){var o=function(n){var a=n.dispatch,i=n.getState;return function(l){return function(d){return typeof d=="function"?d(a,i,e):l(d)}}};return o}var tc=Qi();tc.withExtraArgument=Qi;var Fr=tc;var ac=function(){var e=function(o,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(n[i]=a[i])},e(o,r)};return function(o,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(o,r);function n(){this.constructor=o}o.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),bl=function(e,o){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,l;return l={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function d(f){return function(y){return p([f,y])}}function p(f){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,a&&(i=f[0]&2?a.return:f[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,f[1])).done)return i;switch(a=0,i&&(f=[f[0]&2,i.value]),f[0]){case 0:case 1:i=f;break;case 4:return r.label++,{value:f[1],done:!1};case 5:r.label++,a=f[1],f=[0];continue;case 7:f=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(f[0]===6||f[0]===2)){r=0;continue}if(f[0]===3&&(!i||f[1]>i[0]&&f[1]<i[3])){r.label=f[1];break}if(f[0]===6&&r.label<i[1]){r.label=i[1],i=f;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(f);break}i[2]&&r.ops.pop(),r.trys.pop();continue}f=o.call(e,r)}catch(y){f=[6,y],a=0}finally{n=i=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},Ie=function(e,o){for(var r=0,n=o.length,a=e.length;r<n;r++,a++)e[a]=o[r];return e},xl=Object.defineProperty,vl=Object.defineProperties,Sl=Object.getOwnPropertyDescriptors,ec=Object.getOwnPropertySymbols,Ol=Object.prototype.hasOwnProperty,Cl=Object.prototype.propertyIsEnumerable,oc=function(e,o,r){return o in e?xl(e,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[o]=r},qt=function(e,o){for(var r in o||(o={}))Ol.call(o,r)&&oc(e,r,o[r]);if(ec)for(var n=0,a=ec(o);n<a.length;n++){var r=a[n];Cl.call(o,r)&&oc(e,r,o[r])}return e},jr=function(e,o){return vl(e,Sl(o))},wl=function(e,o,r){return new Promise(function(n,a){var i=function(p){try{d(r.next(p))}catch(f){a(f)}},l=function(p){try{d(r.throw(p))}catch(f){a(f)}},d=function(p){return p.done?n(p.value):Promise.resolve(p.value).then(i,l)};d((r=r.apply(e,o)).next())})};var El=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Pe:Pe.apply(null,arguments)},gm=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function Nl(e){if(typeof e!="object"||e===null)return!1;var o=Object.getPrototypeOf(e);if(o===null)return!0;for(var r=o;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return o===r}var Al=function(e){ac(o,e);function o(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=e.apply(this,r)||this;return Object.setPrototypeOf(a,o.prototype),a}return Object.defineProperty(o,Symbol.species,{get:function(){return o},enumerable:!1,configurable:!0}),o.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},o.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(o.bind.apply(o,Ie([void 0],r[0].concat(this)))):new(o.bind.apply(o,Ie([void 0],r.concat(this))))},o}(Array),Rl=function(e){ac(o,e);function o(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=e.apply(this,r)||this;return Object.setPrototypeOf(a,o.prototype),a}return Object.defineProperty(o,Symbol.species,{get:function(){return o},enumerable:!1,configurable:!0}),o.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},o.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(o.bind.apply(o,Ie([void 0],r[0].concat(this)))):new(o.bind.apply(o,Ie([void 0],r.concat(this))))},o}(Array);function Vr(e){return bt(e)?_o(e,function(){}):e}function Ll(e){return typeof e=="boolean"}function Pl(){return function(o){return Il(o)}}function Il(e){e===void 0&&(e={});var o=e.thunk,r=o===void 0?!0:o,n=e.immutableCheck,a=n===void 0?!0:n,i=e.serializableCheck,l=i===void 0?!0:i,d=new Al;if(r&&(Ll(r)?d.push(Fr):d.push(Fr.withExtraArgument(r.extraArgument))),0){if(a)var p;if(l)var f}return d}var Kr=!0;function ic(e){var o=Pl(),r=e||{},n=r.reducer,a=n===void 0?void 0:n,i=r.middleware,l=i===void 0?o():i,d=r.devTools,p=d===void 0?!0:d,f=r.preloadedState,y=f===void 0?void 0:f,h=r.enhancers,m=h===void 0?void 0:h,b;if(typeof a=="function")b=a;else if(Nl(a))b=Xi(a);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var g=l;if(typeof g=="function"&&(g=g(o),!Kr&&!Array.isArray(g)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Kr&&g.some(function(T){return typeof T!="function"}))throw new Error("each middleware provided to configureStore must be a function");var v=Ji.apply(void 0,g),R=Pe;p&&(R=El(qt({trace:!Kr},typeof p=="object"&&p)));var E=new Rl(v),N=E;Array.isArray(m)?N=Ie([v],m):typeof m=="function"&&(N=m(E));var P=R.apply(void 0,N);return Gr(b,y,P)}function Xt(e,o){function r(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(o){var i=o.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return qt(qt({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=function(){return""+e},r.type=e,r.match=function(n){return n.type===e},r}function cc(e){var o={},r=[],n,a={addCase:function(i,l){var d=typeof i=="string"?i:i.type;if(d in o)throw new Error("addCase cannot be called with two reducers for the same action type");return o[d]=l,a},addMatcher:function(i,l){return r.push({matcher:i,reducer:l}),a},addDefaultCase:function(i){return n=i,a}};return e(a),[o,r,n]}function kl(e){return typeof e=="function"}function Tl(e,o,r,n){r===void 0&&(r=[]);var a=typeof o=="function"?cc(o):[o,r,n],i=a[0],l=a[1],d=a[2],p;if(kl(e))p=function(){return Vr(e())};else{var f=Vr(e);p=function(){return f}}function y(h,m){h===void 0&&(h=p());var b=Ie([i[m.type]],l.filter(function(g){var v=g.matcher;return v(m)}).map(function(g){var v=g.reducer;return v}));return b.filter(function(g){return!!g}).length===0&&(b=[d]),b.reduce(function(g,v){if(v)if(Tt(g)){var R=g,E=v(R,m);return E===void 0?g:E}else{if(bt(g))return _o(g,function(N){return v(N,m)});var E=v(g,m);if(E===void 0){if(g===null)return g;throw Error("A case reducer on a non-draftable value must not return undefined")}return E}return g},h)}return y.getInitialState=p,y}function Bl(e,o){return e+"/"+o}function lc(e){var o=e.name;if(!o)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof e.initialState=="function"?e.initialState:Vr(e.initialState),n=e.reducers||{},a=Object.keys(n),i={},l={},d={};a.forEach(function(y){var h=n[y],m=Bl(o,y),b,g;"reducer"in h?(b=h.reducer,g=h.prepare):b=h,i[y]=b,l[m]=b,d[y]=g?Xt(m,g):Xt(m)});function p(){var y=typeof e.extraReducers=="function"?cc(e.extraReducers):[e.extraReducers],h=y[0],m=h===void 0?{}:h,b=y[1],g=b===void 0?[]:b,v=y[2],R=v===void 0?void 0:v,E=qt(qt({},m),l);return Tl(r,function(N){for(var P in E)N.addCase(P,E[P]);for(var T=0,B=g;T<B.length;T++){var ct=B[T];N.addMatcher(ct.matcher,ct.reducer)}R&&N.addDefaultCase(R)})}var f;return{name:o,reducer:function(y,h){return f||(f=p()),f(y,h)},actions:d,caseReducers:i,getInitialState:function(){return f||(f=p()),f.getInitialState()}}}var _l="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Wl=function(e){e===void 0&&(e=21);for(var o="",r=e;r--;)o+=_l[Math.random()*64|0];return o},$l=["name","message","stack","code"],Zr=function(){function e(o,r){this.payload=o,this.meta=r}return e}(),rc=function(){function e(o,r){this.payload=o,this.meta=r}return e}(),Dl=function(e){if(typeof e=="object"&&e!==null){for(var o={},r=0,n=$l;r<n.length;r++){var a=n[r];typeof e[a]=="string"&&(o[a]=e[a])}return o}return{message:String(e)}},Sm=function(){function e(o,r,n){var a=Xt(o+"/fulfilled",function(y,h,m,b){return{payload:y,meta:jr(qt({},b||{}),{arg:m,requestId:h,requestStatus:"fulfilled"})}}),i=Xt(o+"/pending",function(y,h,m){return{payload:void 0,meta:jr(qt({},m||{}),{arg:h,requestId:y,requestStatus:"pending"})}}),l=Xt(o+"/rejected",function(y,h,m,b,g){return{payload:b,error:(n&&n.serializeError||Dl)(y||"Rejected"),meta:jr(qt({},g||{}),{arg:m,requestId:h,rejectedWithValue:!!b,requestStatus:"rejected",aborted:y?.name==="AbortError",condition:y?.name==="ConditionError"})}}),d=!1,p=typeof AbortController<"u"?AbortController:function(){function y(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return y.prototype.abort=function(){},y}();function f(y){return function(h,m,b){var g=n?.idGenerator?n.idGenerator(y):Wl(),v=new p,R,E=!1;function N(T){R=T,v.abort()}var P=function(){return wl(this,null,function(){var T,B,ct,Bt,Jo,_t,rt;return bl(this,function(lt){switch(lt.label){case 0:return lt.trys.push([0,4,,5]),Bt=(T=n?.condition)==null?void 0:T.call(n,y,{getState:m,extra:b}),zl(Bt)?[4,Bt]:[3,2];case 1:Bt=lt.sent(),lt.label=2;case 2:if(Bt===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return E=!0,Jo=new Promise(function(nt,Jt){return v.signal.addEventListener("abort",function(){return Jt({name:"AbortError",message:R||"Aborted"})})}),h(i(g,y,(B=n?.getPendingMeta)==null?void 0:B.call(n,{requestId:g,arg:y},{getState:m,extra:b}))),[4,Promise.race([Jo,Promise.resolve(r(y,{dispatch:h,getState:m,extra:b,requestId:g,signal:v.signal,abort:N,rejectWithValue:function(nt,Jt){return new Zr(nt,Jt)},fulfillWithValue:function(nt,Jt){return new rc(nt,Jt)}})).then(function(nt){if(nt instanceof Zr)throw nt;return nt instanceof rc?a(nt.payload,g,y,nt.meta):a(nt,g,y)})])];case 3:return ct=lt.sent(),[3,5];case 4:return _t=lt.sent(),ct=_t instanceof Zr?l(null,g,y,_t.payload,_t.meta):l(_t,g,y),[3,5];case 5:return rt=n&&!n.dispatchConditionRejection&&l.match(ct)&&ct.meta.condition,rt||h(ct),[2,ct]}})})}();return Object.assign(P,{abort:N,requestId:g,arg:y,unwrap:function(){return P.then(Ml)}})}}return Object.assign(f,{pending:i,rejected:l,fulfilled:a,typePrefix:o})}return e.withTypes=function(){return e},e}();function Ml(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function zl(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var sc="listener",dc="completed",fc="cancelled",Om="task-"+fc,Cm="task-"+dc,wm=sc+"-"+fc,Em=sc+"-"+dc;var Yr="listenerMiddleware";var Nm=Xt(Yr+"/add"),Am=Xt(Yr+"/removeAll"),Rm=Xt(Yr+"/remove");var nc,Lm=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(nc||(nc=Promise.resolve())).then(e).catch(function(o){return setTimeout(function(){throw o},0)})},Ul=function(e){return function(o){setTimeout(o,e)}},Pm=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Ul(10);Ki();function Hl(e,o){return class extends e{constructor(){super(...arguments),this.eventBus=o??document.createElement("span")}addEventListener(r,n,a){this.eventBus.addEventListener(r,n,a)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,a){this.eventBus.removeEventListener(r,n,a)}}}var Do=class extends Hl(Object){};window.ftReduxStores||(window.ftReduxStores={});var pc=class e extends Do{static get(o){var r;let n=typeof o=="string"?o:o.name,a=typeof o=="string"?void 0:o,i=window.ftReduxStores[n];if(Ye(i))return i;if(a==null)return;let l=lc({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),d=ic({reducer:(p,f)=>f.type==="CLEAR_FT_REDUX_STORE"?l.getInitialState():typeof f.type=="string"&&f.type.startsWith("DEFAULT_VALUE_SETTER__")?{...p,...f.overwrites}:l.reducer(p,f)});return window.ftReduxStores[a.name]=new e(l,d)}constructor(o,r){super(),this.reduxSlice=o,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Ao;let n=a=>a!=null?JSON.parse(JSON.stringify(a)):a;this.actions=new Proxy(this.reduxSlice.actions,{get:(a,i,l)=>{let d=i,p=a[d];return p?(...f)=>{let y=p(...f.map(n));return this.reduxStore.dispatch(y),y}:f=>{this.setState({[d]:n(f)})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(o){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(o).join("_"),overwrites:o})}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(o){throw new Error("Not implemented yet.")}subscribe(o){return this.reduxStore.subscribe(o)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var Ho=O(k());var Mo=class extends Gt{async listMySearches(){let o=L.getState().session;return o?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(o.profile.userId),5*60*1e3):[]}};var zo=class extends Gt{async listMyBookmarks(){let o=L.getState().session;return o?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(o.profile.userId),5*60*1e3):[]}};var Fl="ft-user-assets",Uo=Ho.FtReduxStore.get({name:Fl,initialState:{savedSearches:void 0,bookmarks:void 0}}),qr=class{constructor(){this.currentSession=L.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new zo,this.savedSearchesService=new Mo,L.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var o;let{session:r}=L.getState();(0,Ho.deepEqual)((o=this.currentSession)===null||o===void 0?void 0:o.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Uo.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Uo.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let o=await this.savedSearchesService.listMySearches();Uo.actions.savedSearches(o)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var o;if(this.bookmarksAreUsed){let r=!((o=this.currentSession)===null||o===void 0)&&o.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Uo.actions.bookmarks(r)}}},fg=new qr;var Xr=class{addCommand(o,r=!1){L.commands.add(o,r)}consumeCommand(o){return L.commands.consume(o)}};window.FluidTopicsAppInfoStoreService=new Xr;var uc=O(k()),Jr=class{highlightHtml(o,r,n){(0,uc.highlightHtml)(o,r,n)}};window.FluidTopicsHighlightHtmlService=new Jr;var yc=O(k());var Qr=class{isDate(o){var r,n,a,i;return(i=(a=((n=(r=L.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(d=>d.key===o))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(o,r){var n,a,i;return yc.DateFormatter.format(o,(n=r?.locale)!==null&&n!==void 0?n:L.getState().uiLocale,(a=r?.longFormat)!==null&&a!==void 0?a:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1)}};window.FluidTopicsDateService=new Qr;var jl=O(k());(0,hc.customElement)("ft-app-context")(U);var mc=O(Y()),Kl=function(e,o,r,n){var a=arguments.length,i=a<3?o:n===null?n=Object.getOwnPropertyDescriptor(o,r):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,o,r,n);else for(var d=e.length-1;d>=0;d--)(l=e[d])&&(i=(a<3?l(i):a>3?l(o,r,i):l(o,r))||i);return a>3&&i&&Object.defineProperty(o,r,i),i},tn=Symbol("i18nAttributes"),en=Symbol("i18nListAttributes"),Go=Symbol("i18nProperties"),on=Symbol("i18nManualContexts"),eo=Symbol("i18nUnsubs");function gc(e){var o,r;class n extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[o]=new Map,this[r]=new Map}get i18nService(){return this.useCustomMessageContexts?Ci:ce}i18n(i,l,...d){var p;if(typeof i=="string")return this.i18nService.resolveMessage(i,l,...d);let f=(p=i.args)!==null&&p!==void 0?p:i.argsProvider?i.argsProvider(this):[];return this.i18nService.resolveMessage(i.context,i.key,...f)}onI18nUpdate(i){var l,d,p;(l=this[tn])===null||l===void 0||l.forEach((f,y)=>{let h=this.getI18nAttributeValue(y);h&&(this[y]=this.getI18nAttributeMessage(h,f,i))}),(d=this[en])===null||d===void 0||d.forEach((f,y)=>{let h=this.getI18nListAttributeValues(y);this[y]=h?.map(m=>this.getI18nAttributeMessage(m,f,i))}),(p=this[Go])===null||p===void 0||p.forEach((f,y)=>{f.context.toLowerCase()===i.toLowerCase()&&(this[y]=this.i18n(f))}),setTimeout(()=>this.requestUpdate(),0)}buildI18nAttributeMessage(i,l){return{...i,message:this.i18n({context:i.context,key:i.key,...l})}}getI18nAttributeMessage(i,l,d){var p;let f=!d||((p=i.context)===null||p===void 0?void 0:p.toLowerCase())===d.toLowerCase();return i.context&&i.key&&f?this.buildI18nAttributeMessage(i,l):i}update(i){var l,d,p;super.update(i),(l=this[tn])===null||l===void 0||l.forEach((f,y)=>{let h=this.getI18nAttributeValue(y);h?.context&&h.key&&(i.has(y)||f.argsProvider!=null)&&(this.addI18nContextIfNeeded(h,i,y),this[y]=this.getI18nAttributeMessage(h,f))}),(d=this[en])===null||d===void 0||d.forEach((f,y)=>{let h=this.getI18nListAttributeValues(y);(i.has(y)||f.argsProvider!=null)&&(this[y]=h?.map(m=>(this.addI18nContextIfNeeded(m,i,y),this.getI18nAttributeMessage(m,f))))}),(p=this[Go])===null||p===void 0||p.forEach((f,y)=>{f.argsProvider!=null&&(this[y]=this.i18n(f))})}getI18nAttributeValue(i){return this[i]}getI18nListAttributeValues(i){return this[i]}addI18nContextIfNeeded(i,l,d){i.context&&i.key&&l.has(d)&&this.addI18nContext(i.context)}addI18nMessagesAndSubscribe(i,l){i=i.toLowerCase(),this[eo].has(i)||this[eo].set(i,this.i18nService.subscribe(i,()=>this.onI18nUpdate(i))),this.i18nService.prepareContext(i,l??{}),this.onI18nUpdate(i)}connectedCallback(){var i,l,d,p,f,y;super.connectedCallback(),new Set([...(l=(i=this[Go])===null||i===void 0?void 0:i.values())!==null&&l!==void 0?l:[],...[...(p=(d=this[tn])===null||d===void 0?void 0:d.keys())!==null&&p!==void 0?p:[]].map(h=>this.getI18nAttributeValue(h)),...[...(y=(f=this[en])===null||f===void 0?void 0:f.keys())!==null&&y!==void 0?y:[]].flatMap(h=>this.getI18nListAttributeValues(h))].map(h=>h?.context)).forEach(h=>h&&this.addI18nMessages(h)),this[on].forEach((h,m)=>{this.addI18nMessages(m,h)})}addI18nMessages(i,l){this[on].set(i,l??{}),this.addI18nMessagesAndSubscribe(i,l)}addI18nContext(i,l){this.addI18nMessages(typeof i=="string"?i:i.name,l)}disconnectedCallback(){super.disconnectedCallback(),this[eo].forEach(i=>i()),this[eo].clear()}}return o=on,r=eo,Kl([(0,mc.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}var Fo=class extends gc(Ko.FtLitElement){},jo=class extends gc(Ko.FtLitElementRedux){};var oo=function(e,o,r,n){var a=arguments.length,i=a<3?o:n===null?n=Object.getOwnPropertyDescriptor(o,r):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,o,r,n);else for(var d=e.length-1;d>=0;d--)(l=e[d])&&(i=(a<3?l(i):a>3?l(o,r,i):l(o,r))||i);return a>3&&i&&Object.defineProperty(o,r,i),i},xt=class extends jo{constructor(){super(),this.editorMode=!1,this.addStore(L)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Zo.nothing:Zo.html`
1103
1103
  <span class="ft-i18n">
1104
1104
  ${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}
1105
1105
  </span>