@fluid-topics/ft-reader-topic-content 1.3.61 → 1.3.62
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.
|
@@ -658,7 +658,7 @@ If it declares any Font Awesome CSS pseudo-elements, they will not be rendered a
|
|
|
658
658
|
`;var pt=R(k());var Cs=R(k());var M4=R(re()),F=R(Q()),ue=R(k());var Hi=R(re());var ji=Hi.css`
|
|
659
659
|
`;var nr=R(k()),nf="ft-app-info",Ke=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Ke.eventName="authentication-change";var sf={session:(e,t)=>{(0,nr.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>L.dispatchEvent(new Ke(t.payload)),0))}},L=nr.FtReduxStore.get({name:nf,reducers:sf,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var Ha=R(k());var Ve=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:a}=L.getState(),n=t??a;if(r&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,n,!0)}static await(t){return new Promise(r=>{let a=e.get(t);if(a)r(a);else{let n=L.subscribe(()=>{a=e.get(t),a&&(n(),r(a))})}})}};var ir=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Ve.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Ve.await()}};var Z=class extends ir{constructor(t=!0,r){var a;super(r),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([o],[c])=>o.localeCompare(c)));let n=this.constructor;n.commonCache=(a=n.commonCache)!==null&&a!==void 0?a:new Ha.CacheRegistry,this.cache=t?n.commonCache:new Ha.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,a)=>0|31*r+a.charCodeAt(0),0))}};var sr=class extends Z{async listMyBookmarks(){let t=L.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var ja=class{addCommand(t,r=!1){L.commands.add(t,r)}consumeCommand(t){return L.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new ja;var ae=R(k());var Bi,at=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},of=Symbol("clearAfterUnitTest"),or=class extends(0,ae.withEventBus)(Z){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Bi]=()=>{this.defaultMessages={},this.cache=new ae.CacheRegistry,this.listeners={}},this.currentUiLocale=L.getState().uiLocale,L.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=L.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var a;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let n={...(a=this.defaultMessages[t])!==null&&a!==void 0?a:{},...r};(0,ae.deepEqual)(this.defaultMessages[t],n)||(this.defaultMessages[t]=n,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,a;return this.fetchContext(t),(a=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&a!==void 0?a:{}}resolveRawMessage(t,r){let a=t.toLowerCase();return this.resolveContext(a)[r]}resolveMessage(t,r,...a){var n;let i=t.toLowerCase(),s=this.resolveContext(i);return new ae.ParametrizedLabelResolver((n=this.defaultMessages[i])!==null&&n!==void 0?n:{},s).resolve(r,...a)}async fetchContext(t){let r=!this.cache.has(t),a;try{a=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(n){!(n instanceof ae.CanceledPromiseError)&&r&&console.error(n)}return a}subscribe(t,r){var a;return t=t.toLowerCase(),this.listeners[t]=(a=this.listeners[t])!==null&&a!==void 0?a:new Set,this.listeners[t].add(r),()=>{var n;return(n=this.listeners[t])===null||n===void 0?void 0:n.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new at({loadedContexts:t})),this.dispatchEvent(new at({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new at({loadedContexts:[t]})),this.dispatchEvent(new at({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(a=>(0,ae.delay)(0).then(()=>a()).catch(()=>null)))}};Bi=of;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends or{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends or{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var nt=window.FluidTopicsI18nService,cr=window.FluidTopicsCustomI18nService;var Ki=R(k()),Ba=class{highlightHtml(t,r,a){(0,Ki.highlightHtml)(t,r,a)}};window.FluidTopicsHighlightHtmlService=new Ba;var lf=R(Wi(),1);var $i;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})($i||($i={}));var Fi;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(Fi||(Fi={}));var qi;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(qi||(qi={}));var Yi;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(Yi||(Yi={}));var Xi;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Xi||(Xi={}));var Qi;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(Qi||(Qi={}));var Ji;(function(e){e.BOOKMARK__CREATE="BOOKMARK__CREATE",e.BOOKMARK__DELETE="BOOKMARK__DELETE",e.CASE_DEFLECTION__START="CASE_DEFLECTION__START",e.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",e.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",e.CHATBOT__RATE="CHATBOT__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__AI_TRANSLATE="DOCUMENT__AI_TRANSLATE",e.DOCUMENT__DISPLAY="DOCUMENT__DISPLAY",e.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",e.DOCUMENT__PRINT="DOCUMENT__PRINT",e.DOCUMENT__PROCESS="DOCUMENT__PROCESS",e.DOCUMENT__RATE="DOCUMENT__RATE",e.DOCUMENT__SEARCH="DOCUMENT__SEARCH",e.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",e.DOCUMENT__UNRATE="DOCUMENT__UNRATE",e.FEEDBACK__SEND="FEEDBACK__SEND",e.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",e.KHUB__PROCESS="KHUB__PROCESS",e.KHUB__SEARCH="KHUB__SEARCH",e.LABELS__DOWNLOAD="LABELS__DOWNLOAD",e.LINK__SHARE="LINK__SHARE",e.PAGE__DISPLAY="PAGE__DISPLAY",e.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",e.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",e.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",e.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",e.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",e.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",e.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",e.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",e.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",e.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",e.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",e.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",e.TOPIC__DISPLAY="TOPIC__DISPLAY",e.TOPIC__RATE="TOPIC__RATE",e.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",e.TOPIC__UNRATE="TOPIC__UNRATE",e.USER__LOGIN="USER__LOGIN",e.USER__LOGOUT="USER__LOGOUT",e.HEARTBEAT="HEARTBEAT"})(Ji||(Ji={}));var Zi;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER"})(Zi||(Zi={}));var e4;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",e.LINK_PREVIEW="LINK_PREVIEW"})(e4||(e4={}));var t4;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(t4||(t4={}));var r4;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(r4||(r4={}));var a4;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(a4||(a4={}));var n4;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(n4||(n4={}));var i4;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(i4||(i4={}));var s4;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(s4||(s4={}));var o4;(function(e){e.ASC="ASC",e.DESC="DESC"})(o4||(o4={}));var c4;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(c4||(c4={}));var l4;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(l4||(l4={}));var u4;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(u4||(u4={}));var f4;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(f4||(f4={}));var d4;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(d4||(d4={}));var p4;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(p4||(p4={}));var h4;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(h4||(h4={}));var m4;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(m4||(m4={}));var v4;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(v4||(v4={}));var j;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(j||(j={}));var ne;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(ne||(ne={}));var g4;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(g4||(g4={}));var y4;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(y4||(y4={}));var A4;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(A4||(A4={}));var b4;(function(e){e.USER="USER",e.ASSISTANT="ASSISTANT"})(b4||(b4={}));var E4;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(E4||(E4={}));var L4;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(L4||(L4={}));var cf={[j.PERSONAL_BOOK_SHARE_USER]:[j.PERSONAL_BOOK_USER],[j.HTML_EXPORT_USER]:[j.PERSONAL_BOOK_USER],[j.PDF_EXPORT_USER]:[j.PERSONAL_BOOK_USER],[j.KHUB_ADMIN]:[j.CONTENT_PUBLISHER],[j.ADMIN]:[j.KHUB_ADMIN,j.USERS_ADMIN,j.PORTAL_ADMIN],[j.GENERATIVE_AI_EXPORT_USER]:[j.GENERATIVE_AI_USER]};function S4(e,t){return e===t||(cf[e]??[]).some(r=>S4(r,t))}function x4(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(a=>S4(a,t))}var fr=class extends Z{async listMySearches(){let{session:t}=L.getState();return x4(t,j.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var C4=R(k());var Ka=class{isDate(t){var r,a,n,i;return(i=(n=((a=(r=L.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&a!==void 0?a:[]).find(o=>o.key===t))===null||n===void 0?void 0:n.date)!==null&&i!==void 0?i:!1}format(t,r){var a,n,i;return C4.DateFormatter.format(t,(a=r?.locale)!==null&&a!==void 0?a:L.getState().uiLocale,(n=r?.longFormat)!==null&&n!==void 0?n:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1)}};window.FluidTopicsDateService=new Ka;var _4=R(k());var Rt=class{static get(t,r){var a,n;let i=L.getState(),{lang:s,region:o}=(n=(a=i.defaultLocales)===null||a===void 0?void 0:a.defaultContentLocale)!==null&&n!==void 0?n:{lang:"en",region:"US"};return new _4.SearchPlaceConverter(i.baseUrl,t??20,i.searchInAllLanguagesAllowed,r??`${s}-${o}`)}};var Va=class{urlToSearchRequest(t){return Rt.get().parse(t)}searchRequestToUrl(t){return Rt.get().serialize(t)}};window.FluidTopicsUrlService=new Va;var we=R(k());var We=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};We.eventName="change";var Wa=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let r=sessionStorage.getItem(this.itemName(t));return r?JSON.parse(r):void 0}set(t,r){sessionStorage.setItem(this.itemName(t),JSON.stringify(r))}},R4=new Wa;var dr=class e extends we.WithEventBus{static build(){return new e(window.history,R4,()=>window.location,!1)}constructor(t,r,a,n){var i,s;super(),this.history=t,this.historyStorage=r,this.windowLocation=a,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(s=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(n)}setCurrentState(t,r=!1){let a=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,a&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,we.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new We(this.currentItem())),0)}installProxies(){let t=r=>(a,n,[i,s,o])=>{let c=r(),f={...c===this.currentIndex?this.currentState:void 0,...i,index:c,href:typeof o=="string"?o:(o??this.windowLocation()).href};a.apply(n,[f,s,o]),this.setCurrentState(f,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let a={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(a)}addHistoryChangeListener(t){this.addEventListener(We.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(We.eventName,t)}currentItem(){return(0,we.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,we.deepCopy)(this.states[this.previousDifferentMajorPosition()])}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,we.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let a=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!a)return t;let n=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,a);)this.hasState(i)&&(n=i),i++;return n}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var a;if(!this.hasState(t))return!1;let n=r??this.currentState.majorStateId,i=(a=this.states[t])===null||a===void 0?void 0:a.majorStateId;return i==null||i!=n}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=dr.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e)});function O4(e,t){let{authenticationRequired:r,session:a}=L.getState();return r&&!a?.sessionAuthenticated?Promise.resolve(t):e()}var B=function(e,t,r,a){var n=arguments.length,i=n<3?t:a===null?a=Object.getOwnPropertyDescriptor(t,r):a,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,a);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(i=(n<3?s(i):n>3?s(t,r,i):s(t,r))||i);return n>3&&i&&Object.defineProperty(t,r,i),i},D=class extends ue.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>Ve.get(),this.authenticationRequired=!1,this.messageContexts=[],this.cache=new ue.CacheRegistry,this.cleanSessionDebouncer=new ue.Debouncer,this.reloadConfiguration=()=>{this.cache.clear("availableContentLocales"),this.updateAvailableContentLocales()}}render(){return M4.html`
|
|
660
660
|
<slot></slot>
|
|
661
|
-
`}connectedCallback(){super.connectedCallback(),L.addEventListener(Ke.eventName,this.reloadConfiguration)}disconnectedCallback(){L.addEventListener(Ke.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(t){var r,a,n,i,s,o,c;super.update(t),t.has("baseUrl")&&(L.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&L.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&L.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&L.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&L.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&L.actions.noCustom(this.noCustom),t.has("editorMode")&&L.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&L.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&L.actions.session(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(f=>nt.addContext(f)),t.has("openExternalDocumentInNewTab")&&L.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&L.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&L.actions.forcedOffline(this.forcedOffline),t.has("localesConfiguration")&&(L.actions.defaultLocales((r=this.localesConfiguration)===null||r===void 0?void 0:r.defaultLocales),L.actions.availableUiLocales((n=(a=this.localesConfiguration)===null||a===void 0?void 0:a.availableUiLocales)!==null&&n!==void 0?n:[]),L.actions.searchInAllLanguagesAllowed((s=(i=this.localesConfiguration)===null||i===void 0?void 0:i.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),t.has("authenticationRequired")&&L.actions.authenticationRequired(this.authenticationRequired),t.has("availableContentLocales")&&L.actions.availableContentLocales((c=(o=this.availableContentLocales)===null||o===void 0?void 0:o.contentLocales)!==null&&c!==void 0?c:[]),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),this.availableContentLocales==null&&this.updateAvailableContentLocales())}async updateSession(){this.session=await this.cache.get("session",async()=>{let t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},t.idleTimeoutInMillis),t})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}async updateAvailableContentLocales(){this.availableContentLocales=await this.cache.get("availableContentLocales",()=>O4(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};D.elementDefinitions={};D.styles=ji;B([(0,F.property)()],D.prototype,"baseUrl",void 0);B([(0,F.property)()],D.prototype,"apiIntegrationIdentifier",void 0);B([(0,F.property)()],D.prototype,"apiIntegrationAppVersion",void 0);B([(0,F.property)()],D.prototype,"uiLocale",void 0);B([(0,ue.jsonProperty)(null)],D.prototype,"availableUiLocales",void 0);B([(0,ue.jsonProperty)(null)],D.prototype,"metadataConfiguration",void 0);B([(0,F.property)({type:Boolean})],D.prototype,"editorMode",void 0);B([(0,F.property)({type:Boolean})],D.prototype,"noCustom",void 0);B([(0,F.property)({type:Boolean})],D.prototype,"openExternalDocumentInNewTab",void 0);B([(0,F.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],D.prototype,"noCustomComponent",void 0);B([(0,F.property)({type:Boolean})],D.prototype,"withManualResources",void 0);B([(0,F.property)({type:Boolean})],D.prototype,"navigatorOnline",void 0);B([(0,F.property)({type:Boolean})],D.prototype,"forcedOffline",void 0);B([(0,F.property)({type:Object})],D.prototype,"apiProvider",void 0);B([(0,F.property)({type:Boolean})],D.prototype,"authenticationRequired",void 0);B([(0,ue.jsonProperty)([])],D.prototype,"messageContexts",void 0);B([(0,ue.jsonProperty)(void 0)],D.prototype,"session",void 0);B([(0,F.state)()],D.prototype,"localesConfiguration",void 0);B([(0,F.state)()],D.prototype,"availableContentLocales",void 0);var v1=R(Q());function uf(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,a,n;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(a=r;a--!==0;)if(!pr(e[a],t[a]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(a of e.entries())if(!t.has(a[0]))return!1;for(a of e.entries())if(!pr(a[1],t.get(a[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(a of e.entries())if(!t.has(a[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let i=s=>Object.keys(s).filter(o=>s[o]!=null);if(n=i(e),r=n.length,r!==i(t).length)return!1;for(a=r;a--!==0;)if(!Object.prototype.hasOwnProperty.call(t,n[a]))return!1;for(a=r;a--!==0;){let s=n[a];if(!pr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function pr(e,t){try{return uf(e,t)}catch{return!1}}function Ot(e,t){return!pr(e,t)}function hr(e,t){let r=a=>a[e]===!0;return a=>{if(r(a))return a;let n=t(a);return n[e]=!0,n}}var T4=R(Q(),1);var $a=e=>{let t=e??{};return(r,a)=>{var n;let i={hasChanged:Ot,attribute:!1,...t};(0,T4.property)(i)(r,a);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(a,{selector:(n=t.selector)!==null&&n!==void 0?n:o=>o[a],store:t.store})}};var mr=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(a=>a.type===t);return r&&(this.queue=this.queue.filter(a=>a!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var $e=R(Q(),1);var N4=R(Q(),1);function w4(e,t){let r=()=>JSON.parse(JSON.stringify(e));return(0,N4.property)({type:Object,converter:{fromAttribute:a=>{if(a==null)return r();try{return JSON.parse(a)}catch{return r()}},toAttribute:a=>JSON.stringify(a)},hasChanged:Ot,...t??{}})}var vr=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,a)=>{this.resolvePromise=r,this.rejectPromise=a})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let a=[...this.callbacks];this.callbacks=[];let n=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,i=(r=this.resolvePromise)!==null&&r!==void 0?r:()=>null;this.clearPromise();for(let s of a)try{await s()}catch(o){n(o);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 z4=R(re(),1);var gr=globalThis,ff=gr.ShadowRoot&&(gr.ShadyCSS===void 0||gr.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,I9=Symbol();var P4=(e,t)=>{if(ff)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let a=document.createElement("style"),n=gr.litNonce;n!==void 0&&a.setAttribute("nonce",n),a.textContent=r.cssText,e.appendChild(a)}};var yr=class extends z4.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([n,i])=>t.registry.define(n,i)));let r={...t.shadowRootOptions,customElements:t.registry},a=this.renderOptions.creationScope=this.attachShadow(r);return P4(a,t.elementStyles),a}};function k4(e,t,...r){var a;let n=e.querySelector(t);for(let i of r)n=(a=n?.shadowRoot)===null||a===void 0?void 0:a.querySelector(i);return n}var ot=function(e,t,r,a){var n=arguments.length,i=n<3?t:a===null?a=Object.getOwnPropertyDescriptor(t,r):a,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,a);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(i=(n<3?s(i):n>3?s(t,r,i):s(t,r))||i);return n>3&&i&&Object.defineProperty(t,r,i),i},G4,I4=Symbol("constructorPrototype"),D4=Symbol("constructorName"),H4=Symbol("exportpartsDebouncer"),U4=Symbol("dynamicDependenciesLoaded"),st=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};st.eventName="exportparts-updated";var me=class extends yr{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[G4]=new vr(5),this.scheduleExportpartsUpdate=()=>{var t,r,a;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(a=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&a!==void 0&&a)&&this[H4].run(()=>{var n,i;!((n=this.exportpartsPrefix)===null||n===void 0)&&n.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[D4]=this.constructor.name,this[I4]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[D4]&&Object.setPrototypeOf(this,this[I4])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(a){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",a)}let r=this.constructor;r[U4]||(r[U4]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(st.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(st.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new st)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:a,shadowPath:n}=this.elementToFocus;if(a!=null){let i=[...n??[],a];r=k4(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,a,n;if(((a=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&a!==void 0?a:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((n=this.customStylesheet)!==null&&n!==void 0?n:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}setExportpartsAttribute(t){var r,a,n,i,s,o;let c=m=>m!=null&&m.trim().length>0,f=t.filter(c).map(m=>m.trim());if(f.length===0){this.exportparts=void 0;return}let d=new Set;for(let m of(a=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&a!==void 0?a:[]){let g=(i=(n=m.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&i!==void 0?i:[],A=(o=(s=m.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(C=>C.split(":")[1]))!==null&&o!==void 0?o:[],b=[...g,...A].filter(c).map(C=>C.trim());for(let C of b)d.add(C)}if(d.size===0){this.exportparts=void 0;return}let p=[...d.values()].flatMap(m=>f.map(g=>`${m}:${g}--${m}`));this.exportparts=[...this.part,...p].join(", ")}};G4=H4;ot([(0,$e.property)()],me.prototype,"exportpartsPrefix",void 0);ot([w4([])],me.prototype,"exportpartsPrefixes",void 0);ot([(0,$e.property)({reflect:!0})],me.prototype,"exportparts",void 0);ot([(0,$e.property)()],me.prototype,"customStylesheet",void 0);ot([(0,$e.property)()],me.prototype,"elementToFocus",void 0);ot([(0,$e.state)()],me.prototype,"useAdoptedStyleSheets",void 0);function Ar(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Mt=Symbol("internalReduxEventsUnsubscribers"),Pe=Symbol("internalStoresUnsubscribers"),Fe=Symbol("internalStores"),df=hr(Symbol("withRedux"),function(e){var t,r,a;class n extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[a]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(o=>s.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[Fe].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Fe].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Fe].get(s)}addStore(s,o){var c;o=(c=o??s.name)!==null&&c!==void 0?c:"default-store",this.unsubscribeFromStore(o),this[Fe].set(o,s),this.subscribeToStore(o,s),this.updateFromStores()}removeStore(s){let o=typeof s=="string"?s:s.name;this.unsubscribeFromStore(o),this[Fe].delete(o)}setupStores(){this.unsubscribeFromStores(),this[Fe].forEach((s,o)=>this.subscribeToStore(o,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,o)=>{let c=this.constructor.getPropertyOptions(o);if(!c?.attribute||!this.hasAttribute(typeof c?.attribute=="string"?c.attribute:o)){let f=this.getStore(s.store);f&&(s.store?this[Pe].has(s.store):this[Pe].size>0)&&(this[o]=s.selector(f.getState(),this))}})}subscribeToStore(s,o){var c;this[Pe].set(s,o.subscribe(()=>this.updateFromStores())),this[Mt].set(s,[]),Ar(o)&&o.eventBus&&((c=this.reduxConstructor.reduxEventListeners)===null||c===void 0||c.forEach((f,d)=>{if(typeof this[d]=="function"&&(!f.store||o.name===f.store)){let p=m=>this[d](m);o.addEventListener(f.eventName,p),this[Mt].get(s).push(()=>o.removeEventListener(f.eventName,p))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[Pe].forEach((s,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(s){var o;this[Pe].has(s)&&this[Pe].get(s)(),this[Pe].delete(s),(o=this[Mt].get(s))===null||o===void 0||o.forEach(c=>c()),this[Mt].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=Pe,r=Fe,a=Mt,n.reduxProperties=new Map,n.reduxReactiveProperties=new Set,n.reduxEventListeners=new Map,n}),j4=class extends df(me){};function ie(e){for(var t=arguments.length,r=Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];if(0)var n,i;throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function xe(e){return!!e&&!!e[U]}function fe(e){var t;return!!e&&(function(r){if(!r||typeof r!="object")return!1;var a=Object.getPrototypeOf(r);if(a===null)return!0;var n=Object.hasOwnProperty.call(a,"constructor")&&a.constructor;return n===Object||typeof n=="function"&&Function.toString.call(n)===bf}(e)||Array.isArray(e)||!!e[q4]||!!(!((t=e.constructor)===null||t===void 0)&&t[q4])||t1(e)||r1(e))}function qe(e,t,r){r===void 0&&(r=!1),ut(e)===0?(r?Object.keys:lt)(e).forEach(function(a){r&&typeof a=="symbol"||t(a,e[a],e)}):e.forEach(function(a,n){return t(n,a,e)})}function ut(e){var t=e[U];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:t1(e)?2:r1(e)?3:0}function ct(e,t){return ut(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function pf(e,t){return ut(e)===2?e.get(t):e[t]}function Y4(e,t,r){var a=ut(e);a===2?e.set(t,r):a===3?e.add(r):e[t]=r}function X4(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function t1(e){return yf&&e instanceof Map}function r1(e){return Af&&e instanceof Set}function ze(e){return e.o||e.t}function a1(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Z4(e);delete t[U];for(var r=lt(t),a=0;a<r.length;a++){var n=r[a],i=t[n];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[n]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[n]})}return Object.create(Object.getPrototypeOf(e),t)}function n1(e,t){return t===void 0&&(t=!1),i1(e)||xe(e)||!fe(e)||(ut(e)>1&&(e.set=e.add=e.clear=e.delete=hf),Object.freeze(e),t&&qe(e,function(r,a){return n1(a,!0)},!0)),e}function hf(){ie(2)}function i1(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function ve(e){var t=e1[e];return t||ie(18,e),t}function mf(e,t){e1[e]||(e1[e]=t)}function Qa(){return Nt}function Fa(e,t){t&&(ve("Patches"),e.u=[],e.s=[],e.v=t)}function br(e){Ja(e),e.p.forEach(vf),e.p=null}function Ja(e){e===Nt&&(Nt=e.l)}function B4(e){return Nt={p:[],l:Nt,h:e,m:!0,_:0}}function vf(e){var t=e[U];t.i===0||t.i===1?t.j():t.g=!0}function qa(e,t){t._=t.p.length;var r=t.p[0],a=e!==void 0&&e!==r;return t.h.O||ve("ES5").S(t,e,a),a?(r[U].P&&(br(t),ie(4)),fe(e)&&(e=Er(t,e),t.l||Lr(t,e)),t.u&&ve("Patches").M(r[U].t,e,t.u,t.s)):e=Er(t,r,[]),br(t),t.u&&t.v(t.u,t.s),e!==J4?e:void 0}function Er(e,t,r){if(i1(t))return t;var a=t[U];if(!a)return qe(t,function(o,c){return K4(e,a,t,o,c,r)},!0),t;if(a.A!==e)return t;if(!a.P)return Lr(e,a.t,!0),a.t;if(!a.I){a.I=!0,a.A._--;var n=a.i===4||a.i===5?a.o=a1(a.k):a.o,i=n,s=!1;a.i===3&&(i=new Set(n),n.clear(),s=!0),qe(i,function(o,c){return K4(e,a,n,o,c,r,s)}),Lr(e,n,!1),r&&e.u&&ve("Patches").N(a,r,e.u,e.s)}return a.o}function K4(e,t,r,a,n,i,s){if(xe(n)){var o=Er(e,n,i&&t&&t.i!==3&&!ct(t.R,a)?i.concat(a):void 0);if(Y4(r,a,o),!xe(o))return;e.m=!1}else s&&r.add(n);if(fe(n)&&!i1(n)){if(!e.h.D&&e._<1)return;Er(e,n),t&&t.A.l||Lr(e,n)}}function Lr(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&n1(t,r)}function Ya(e,t){var r=e[U];return(r?ze(r):e)[t]}function V4(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var a=Object.getOwnPropertyDescriptor(r,t);if(a)return a;r=Object.getPrototypeOf(r)}}function ke(e){e.P||(e.P=!0,e.l&&ke(e.l))}function Xa(e){e.o||(e.o=a1(e.t))}function Za(e,t,r){var a=t1(t)?ve("MapSet").F(t,r):r1(t)?ve("MapSet").T(t,r):e.O?function(n,i){var s=Array.isArray(n),o={i:s?1:0,A:i?i.A:Qa(),P:!1,I:!1,R:{},l:i,t:n,k:null,o:null,j:null,C:!1},c=o,f=wt;s&&(c=[o],f=Tt);var d=Proxy.revocable(c,f),p=d.revoke,m=d.proxy;return o.k=m,o.j=p,m}(t,r):ve("ES5").J(t,r);return(r?r.A:Qa()).p.push(a),a}function gf(e){return xe(e)||ie(22,e),function t(r){if(!fe(r))return r;var a,n=r[U],i=ut(r);if(n){if(!n.P&&(n.i<4||!ve("ES5").K(n)))return n.t;n.I=!0,a=W4(r,i),n.I=!1}else a=W4(r,i);return qe(a,function(s,o){n&&pf(n.t,s)===o||Y4(a,s,t(o))}),i===3?new Set(a):a}(e)}function W4(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return a1(e)}function Q4(){function e(s,o){var c=i[s];return c?c.enumerable=o:i[s]=c={configurable:!0,enumerable:o,get:function(){var f=this[U];return wt.get(f,s)},set:function(f){var d=this[U];wt.set(d,s,f)}},c}function t(s){for(var o=s.length-1;o>=0;o--){var c=s[o][U];if(!c.P)switch(c.i){case 5:a(c)&&ke(c);break;case 4:r(c)&&ke(c)}}}function r(s){for(var o=s.t,c=s.k,f=lt(c),d=f.length-1;d>=0;d--){var p=f[d];if(p!==U){var m=o[p];if(m===void 0&&!ct(o,p))return!0;var g=c[p],A=g&&g[U];if(A?A.t!==m:!X4(g,m))return!0}}var b=!!o[U];return f.length!==lt(o).length+(b?0:1)}function a(s){var o=s.k;if(o.length!==s.t.length)return!0;var c=Object.getOwnPropertyDescriptor(o,o.length-1);if(c&&!c.get)return!0;for(var f=0;f<o.length;f++)if(!o.hasOwnProperty(f))return!0;return!1}function n(s){s.g&&ie(3,JSON.stringify(ze(s)))}var i={};mf("ES5",{J:function(s,o){var c=Array.isArray(s),f=function(p,m){if(p){for(var g=Array(m.length),A=0;A<m.length;A++)Object.defineProperty(g,""+A,e(A,!0));return g}var b=Z4(m);delete b[U];for(var C=lt(b),S=0;S<C.length;S++){var _=C[S];b[_]=e(_,p||!!b[_].enumerable)}return Object.create(Object.getPrototypeOf(m),b)}(c,s),d={i:c?5:4,A:o?o.A:Qa(),P:!1,I:!1,R:{},l:o,t:s,k:f,o:null,g:!1,C:!1};return Object.defineProperty(f,U,{value:d,writable:!0}),f},S:function(s,o,c){c?xe(o)&&o[U].A===s&&t(s.p):(s.u&&function f(d){if(d&&typeof d=="object"){var p=d[U];if(p){var m=p.t,g=p.k,A=p.R,b=p.i;if(b===4)qe(g,function(N){N!==U&&(m[N]!==void 0||ct(m,N)?A[N]||f(g[N]):(A[N]=!0,ke(p)))}),qe(m,function(N){g[N]!==void 0||ct(g,N)||(A[N]=!1,ke(p))});else if(b===5){if(a(p)&&(ke(p),A.length=!0),g.length<m.length)for(var C=g.length;C<m.length;C++)A[C]=!1;else for(var S=m.length;S<g.length;S++)A[S]=!0;for(var _=Math.min(g.length,m.length),T=0;T<_;T++)g.hasOwnProperty(T)||(A[T]=!0),A[T]===void 0&&f(g[T])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?r(s):a(s)}})}var $4,Nt,s1=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",yf=typeof Map<"u",Af=typeof Set<"u",F4=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",J4=s1?Symbol.for("immer-nothing"):(($4={})["immer-nothing"]=!0,$4),q4=s1?Symbol.for("immer-draftable"):"__$immer_draftable",U=s1?Symbol.for("immer-state"):"__$immer_state";var bf=""+Object.prototype.constructor,lt=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Z4=Object.getOwnPropertyDescriptors||function(e){var t={};return lt(e).forEach(function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)}),t},e1={},wt={get:function(e,t){if(t===U)return e;var r=ze(e);if(!ct(r,t))return function(n,i,s){var o,c=V4(i,s);return c?"value"in c?c.value:(o=c.get)===null||o===void 0?void 0:o.call(n.k):void 0}(e,r,t);var a=r[t];return e.I||!fe(a)?a:a===Ya(e.t,t)?(Xa(e),e.o[t]=Za(e.A.h,a,e)):a},has:function(e,t){return t in ze(e)},ownKeys:function(e){return Reflect.ownKeys(ze(e))},set:function(e,t,r){var a=V4(ze(e),t);if(a?.set)return a.set.call(e.k,r),!0;if(!e.P){var n=Ya(ze(e),t),i=n?.[U];if(i&&i.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(X4(r,n)&&(r!==void 0||ct(e.t,t)))return!0;Xa(e),ke(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return Ya(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,Xa(e),ke(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=ze(e),a=Reflect.getOwnPropertyDescriptor(r,t);return a&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:a.enumerable,value:r[t]}},defineProperty:function(){ie(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){ie(12)}},Tt={};qe(wt,function(e,t){Tt[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Tt.deleteProperty=function(e,t){return Tt.set.call(this,e,t,void 0)},Tt.set=function(e,t,r){return wt.set.call(this,e[0],t,r,e[0])};var Ef=function(){function e(r){var a=this;this.O=F4,this.D=!0,this.produce=function(n,i,s){if(typeof n=="function"&&typeof i!="function"){var o=i;i=n;var c=a;return function(b){var C=this;b===void 0&&(b=o);for(var S=arguments.length,_=Array(S>1?S-1:0),T=1;T<S;T++)_[T-1]=arguments[T];return c.produce(b,function(N){var P;return(P=i).call.apply(P,[C,N].concat(_))})}}var f;if(typeof i!="function"&&ie(6),s!==void 0&&typeof s!="function"&&ie(7),fe(n)){var d=B4(a),p=Za(a,n,void 0),m=!0;try{f=i(p),m=!1}finally{m?br(d):Ja(d)}return typeof Promise<"u"&&f instanceof Promise?f.then(function(b){return Fa(d,s),qa(b,d)},function(b){throw br(d),b}):(Fa(d,s),qa(f,d))}if(!n||typeof n!="object"){if((f=i(n))===void 0&&(f=n),f===J4&&(f=void 0),a.D&&n1(f,!0),s){var g=[],A=[];ve("Patches").M(n,f,g,A),s(g,A)}return f}ie(21,n)},this.produceWithPatches=function(n,i){if(typeof n=="function")return function(f){for(var d=arguments.length,p=Array(d>1?d-1:0),m=1;m<d;m++)p[m-1]=arguments[m];return a.produceWithPatches(f,function(g){return n.apply(void 0,[g].concat(p))})};var s,o,c=a.produce(n,i,function(f,d){s=f,o=d});return typeof Promise<"u"&&c instanceof Promise?c.then(function(f){return[f,s,o]}):[c,s,o]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){fe(r)||ie(8),xe(r)&&(r=gf(r));var a=B4(this),n=Za(this,r,void 0);return n[U].C=!0,Ja(a),n},t.finishDraft=function(r,a){var n=r&&r[U],i=n.A;return Fa(i,a),qa(void 0,i)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!F4&&ie(20),this.O=r},t.applyPatches=function(r,a){var n;for(n=a.length-1;n>=0;n--){var i=a[n];if(i.path.length===0&&i.op==="replace"){r=i.value;break}}n>-1&&(a=a.slice(n+1));var s=ve("Patches").$;return xe(r)?s(r,a):this.produce(r,function(o){return s(o,a)})},e}(),ee=new Ef,Lf=ee.produce,Q9=ee.produceWithPatches.bind(ee),J9=ee.setAutoFreeze.bind(ee),Z9=ee.setUseProxies.bind(ee),ed=ee.applyPatches.bind(ee),td=ee.createDraft.bind(ee),rd=ee.finishDraft.bind(ee),Sr=Lf;function Ye(e){"@babel/helpers - typeof";return Ye=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ye(e)}function es(e,t){if(Ye(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t||"default");if(Ye(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ts(e){var t=es(e,"string");return Ye(t)=="symbol"?t:t+""}function rs(e,t,r){return(t=ts(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function as(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,a)}return r}function o1(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?as(Object(r),!0).forEach(function(a){rs(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):as(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function q(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 ns=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),c1=function(){return Math.random().toString(36).substring(7).split("").join(".")},xr={INIT:"@@redux/INIT"+c1(),REPLACE:"@@redux/REPLACE"+c1(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+c1()}};function Sf(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function l1(e,t,r){var a;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(q(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(q(1));return r(l1)(e,t)}if(typeof e!="function")throw new Error(q(2));var n=e,i=t,s=[],o=s,c=!1;function f(){o===s&&(o=s.slice())}function d(){if(c)throw new Error(q(3));return i}function p(b){if(typeof b!="function")throw new Error(q(4));if(c)throw new Error(q(5));var C=!0;return f(),o.push(b),function(){if(C){if(c)throw new Error(q(6));C=!1,f();var _=o.indexOf(b);o.splice(_,1),s=null}}}function m(b){if(!Sf(b))throw new Error(q(7));if(typeof b.type>"u")throw new Error(q(8));if(c)throw new Error(q(9));try{c=!0,i=n(i,b)}finally{c=!1}for(var C=s=o,S=0;S<C.length;S++){var _=C[S];_()}return b}function g(b){if(typeof b!="function")throw new Error(q(10));n=b,m({type:xr.REPLACE})}function A(){var b,C=p;return b={subscribe:function(_){if(typeof _!="object"||_===null)throw new Error(q(11));function T(){_.next&&_.next(d())}T();var N=C(T);return{unsubscribe:N}}},b[ns]=function(){return this},b}return m({type:xr.INIT}),a={dispatch:m,subscribe:p,getState:d,replaceReducer:g},a[ns]=A,a}function xf(e){Object.keys(e).forEach(function(t){var r=e[t],a=r(void 0,{type:xr.INIT});if(typeof a>"u")throw new Error(q(12));if(typeof r(void 0,{type:xr.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(q(13))})}function is(e){for(var t=Object.keys(e),r={},a=0;a<t.length;a++){var n=t[a];typeof e[n]=="function"&&(r[n]=e[n])}var i=Object.keys(r),s,o;try{xf(r)}catch(c){o=c}return function(f,d){if(f===void 0&&(f={}),o)throw o;if(0)var p;for(var m=!1,g={},A=0;A<i.length;A++){var b=i[A],C=r[b],S=f[b],_=C(S,d);if(typeof _>"u"){var T=d&&d.type;throw new Error(q(14))}g[b]=_,m=m||_!==S}return m=m||i.length!==Object.keys(f).length,m?g:f}}function ft(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.length===0?function(a){return a}:t.length===1?t[0]:t.reduce(function(a,n){return function(){return a(n.apply(void 0,arguments))}})}function ss(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(a){return function(){var n=a.apply(void 0,arguments),i=function(){throw new Error(q(15))},s={getState:n.getState,dispatch:function(){return i.apply(void 0,arguments)}},o=t.map(function(c){return c(s)});return i=ft.apply(void 0,o)(n.dispatch),o1(o1({},n),{},{dispatch:i})}}}function os(e){var t=function(a){var n=a.dispatch,i=a.getState;return function(s){return function(o){return typeof o=="function"?o(n,i,e):s(o)}}};return t}var cs=os();cs.withExtraArgument=os;var u1=cs;var ps=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,n){a.__proto__=n}||function(a,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(a[i]=n[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function a(){this.constructor=t}t.prototype=r===null?Object.create(r):(a.prototype=r.prototype,new a)}}(),Cf=function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},a,n,i,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(f){return function(d){return c([f,d])}}function c(f){if(a)throw new TypeError("Generator is already executing.");for(;r;)try{if(a=1,n&&(i=f[0]&2?n.return:f[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,f[1])).done)return i;switch(n=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++,n=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=t.call(e,r)}catch(d){f=[6,d],n=0}finally{a=i=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},dt=function(e,t){for(var r=0,a=t.length,n=e.length;r<a;r++,n++)e[n]=t[r];return e},_f=Object.defineProperty,Rf=Object.defineProperties,Of=Object.getOwnPropertyDescriptors,ls=Object.getOwnPropertySymbols,Mf=Object.prototype.hasOwnProperty,Tf=Object.prototype.propertyIsEnumerable,us=function(e,t,r){return t in e?_f(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},Ie=function(e,t){for(var r in t||(t={}))Mf.call(t,r)&&us(e,r,t[r]);if(ls)for(var a=0,n=ls(t);a<n.length;a++){var r=n[a];Tf.call(t,r)&&us(e,r,t[r])}return e},f1=function(e,t){return Rf(e,Of(t))},Nf=function(e,t,r){return new Promise(function(a,n){var i=function(c){try{o(r.next(c))}catch(f){n(f)}},s=function(c){try{o(r.throw(c))}catch(f){n(f)}},o=function(c){return c.done?a(c.value):Promise.resolve(c.value).then(i,s)};o((r=r.apply(e,t)).next())})};var wf=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ft:ft.apply(null,arguments)},bd=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function Pf(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var r=t;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return t===r}var zf=function(e){ps(t,e);function t(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];var n=e.apply(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,dt([void 0],r[0].concat(this)))):new(t.bind.apply(t,dt([void 0],r.concat(this))))},t}(Array),kf=function(e){ps(t,e);function t(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];var n=e.apply(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,dt([void 0],r[0].concat(this)))):new(t.bind.apply(t,dt([void 0],r.concat(this))))},t}(Array);function h1(e){return fe(e)?Sr(e,function(){}):e}function If(e){return typeof e=="boolean"}function Df(){return function(t){return Uf(t)}}function Uf(e){e===void 0&&(e={});var t=e.thunk,r=t===void 0?!0:t,a=e.immutableCheck,n=a===void 0?!0:a,i=e.serializableCheck,s=i===void 0?!0:i,o=new zf;if(r&&(If(r)?o.push(u1):o.push(u1.withExtraArgument(r.extraArgument))),0){if(n)var c;if(s)var f}return o}var d1=!0;function hs(e){var t=Df(),r=e||{},a=r.reducer,n=a===void 0?void 0:a,i=r.middleware,s=i===void 0?t():i,o=r.devTools,c=o===void 0?!0:o,f=r.preloadedState,d=f===void 0?void 0:f,p=r.enhancers,m=p===void 0?void 0:p,g;if(typeof n=="function")g=n;else if(Pf(n))g=is(n);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 A=s;if(typeof A=="function"&&(A=A(t),!d1&&!Array.isArray(A)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!d1&&A.some(function(N){return typeof N!="function"}))throw new Error("each middleware provided to configureStore must be a function");var b=ss.apply(void 0,A),C=ft;c&&(C=wf(Ie({trace:!d1},typeof c=="object"&&c)));var S=new kf(b),_=S;Array.isArray(m)?_=dt([b],m):typeof m=="function"&&(_=m(S));var T=C.apply(void 0,_);return l1(g,d,T)}function De(e,t){function r(){for(var a=[],n=0;n<arguments.length;n++)a[n]=arguments[n];if(t){var i=t.apply(void 0,a);if(!i)throw new Error("prepareAction did not return an object");return Ie(Ie({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:a[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(a){return a.type===e},r}function ms(e){var t={},r=[],a,n={addCase:function(i,s){var o=typeof i=="string"?i:i.type;if(o in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[o]=s,n},addMatcher:function(i,s){return r.push({matcher:i,reducer:s}),n},addDefaultCase:function(i){return a=i,n}};return e(n),[t,r,a]}function Gf(e){return typeof e=="function"}function Hf(e,t,r,a){r===void 0&&(r=[]);var n=typeof t=="function"?ms(t):[t,r,a],i=n[0],s=n[1],o=n[2],c;if(Gf(e))c=function(){return h1(e())};else{var f=h1(e);c=function(){return f}}function d(p,m){p===void 0&&(p=c());var g=dt([i[m.type]],s.filter(function(A){var b=A.matcher;return b(m)}).map(function(A){var b=A.reducer;return b}));return g.filter(function(A){return!!A}).length===0&&(g=[o]),g.reduce(function(A,b){if(b)if(xe(A)){var C=A,S=b(C,m);return S===void 0?A:S}else{if(fe(A))return Sr(A,function(_){return b(_,m)});var S=b(A,m);if(S===void 0){if(A===null)return A;throw Error("A case reducer on a non-draftable value must not return undefined")}return S}return A},p)}return d.getInitialState=c,d}function jf(e,t){return e+"/"+t}function vs(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof e.initialState=="function"?e.initialState:h1(e.initialState),a=e.reducers||{},n=Object.keys(a),i={},s={},o={};n.forEach(function(d){var p=a[d],m=jf(t,d),g,A;"reducer"in p?(g=p.reducer,A=p.prepare):g=p,i[d]=g,s[m]=g,o[d]=A?De(m,A):De(m)});function c(){var d=typeof e.extraReducers=="function"?ms(e.extraReducers):[e.extraReducers],p=d[0],m=p===void 0?{}:p,g=d[1],A=g===void 0?[]:g,b=d[2],C=b===void 0?void 0:b,S=Ie(Ie({},m),s);return Hf(r,function(_){for(var T in S)_.addCase(T,S[T]);for(var N=0,P=A;N<P.length;N++){var Y=P[N];_.addMatcher(Y.matcher,Y.reducer)}C&&_.addDefaultCase(C)})}var f;return{name:t,reducer:function(d,p){return f||(f=c()),f(d,p)},actions:o,caseReducers:i,getInitialState:function(){return f||(f=c()),f.getInitialState()}}}var Bf="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Kf=function(e){e===void 0&&(e=21);for(var t="",r=e;r--;)t+=Bf[Math.random()*64|0];return t},Vf=["name","message","stack","code"],p1=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),fs=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),Wf=function(e){if(typeof e=="object"&&e!==null){for(var t={},r=0,a=Vf;r<a.length;r++){var n=a[r];typeof e[n]=="string"&&(t[n]=e[n])}return t}return{message:String(e)}},xd=function(){function e(t,r,a){var n=De(t+"/fulfilled",function(d,p,m,g){return{payload:d,meta:f1(Ie({},g||{}),{arg:m,requestId:p,requestStatus:"fulfilled"})}}),i=De(t+"/pending",function(d,p,m){return{payload:void 0,meta:f1(Ie({},m||{}),{arg:p,requestId:d,requestStatus:"pending"})}}),s=De(t+"/rejected",function(d,p,m,g,A){return{payload:g,error:(a&&a.serializeError||Wf)(d||"Rejected"),meta:f1(Ie({},A||{}),{arg:m,requestId:p,rejectedWithValue:!!g,requestStatus:"rejected",aborted:d?.name==="AbortError",condition:d?.name==="ConditionError"})}}),o=!1,c=typeof AbortController<"u"?AbortController:function(){function d(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return d.prototype.abort=function(){},d}();function f(d){return function(p,m,g){var A=a?.idGenerator?a.idGenerator(d):Kf(),b=new c,C,S=!1;function _(N){C=N,b.abort()}var T=function(){return Nf(this,null,function(){var N,P,Y,ye,K,Ae,Xe;return Cf(this,function(h){switch(h.label){case 0:return h.trys.push([0,4,,5]),ye=(N=a?.condition)==null?void 0:N.call(a,d,{getState:m,extra:g}),Ff(ye)?[4,ye]:[3,2];case 1:ye=h.sent(),h.label=2;case 2:if(ye===!1||b.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return S=!0,K=new Promise(function(v,O){return b.signal.addEventListener("abort",function(){return O({name:"AbortError",message:C||"Aborted"})})}),p(i(A,d,(P=a?.getPendingMeta)==null?void 0:P.call(a,{requestId:A,arg:d},{getState:m,extra:g}))),[4,Promise.race([K,Promise.resolve(r(d,{dispatch:p,getState:m,extra:g,requestId:A,signal:b.signal,abort:_,rejectWithValue:function(v,O){return new p1(v,O)},fulfillWithValue:function(v,O){return new fs(v,O)}})).then(function(v){if(v instanceof p1)throw v;return v instanceof fs?n(v.payload,A,d,v.meta):n(v,A,d)})])];case 3:return Y=h.sent(),[3,5];case 4:return Ae=h.sent(),Y=Ae instanceof p1?s(null,A,d,Ae.payload,Ae.meta):s(Ae,A,d),[3,5];case 5:return Xe=a&&!a.dispatchConditionRejection&&s.match(Y)&&Y.meta.condition,Xe||p(Y),[2,Y]}})})}();return Object.assign(T,{abort:_,requestId:A,arg:d,unwrap:function(){return T.then($f)}})}}return Object.assign(f,{pending:i,rejected:s,fulfilled:n,typePrefix:t})}return e.withTypes=function(){return e},e}();function $f(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Ff(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var gs="listener",ys="completed",As="cancelled",Cd="task-"+As,_d="task-"+ys,Rd=gs+"-"+As,Od=gs+"-"+ys;var m1="listenerMiddleware";var Md=De(m1+"/add"),Td=De(m1+"/removeAll"),Nd=De(m1+"/remove");var ds,wd=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(ds||(ds=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},qf=function(e){return function(t){setTimeout(t,e)}},Pd=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:qf(10);Q4();var Yf=hr(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,a,n){this.eventBus.addEventListener(r,a,n)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,a,n){this.eventBus.removeEventListener(r,a,n)}}}),Cr=class extends Yf(Object){};window.ftReduxStores||(window.ftReduxStores={});var bs=class e extends Cr{static get(t){var r;let a=typeof t=="string"?t:t.name,n=typeof t=="string"?void 0:t,i=window.ftReduxStores[a];if(Ar(i))return i;if(n==null)return;let s=vs({...n,reducers:(r=n.reducers)!==null&&r!==void 0?r:{}}),o=hs({reducer:(c,f)=>f.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof f.type=="string"&&f.type.startsWith("DEFAULT_VALUE_SETTER__")?{...c,...f.overwrites}:s.reducer(c,f)});return window.ftReduxStores[n.name]=new e(s,o,n.eventBus)}constructor(t,r,a){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new mr;let n=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,o)=>{let c=s,f=i[c];return f?(...d)=>{let p=f(...d.map(n));return this.reduxStore.dispatch(p),p}:d=>{this.setState({[c]:n(d)})}}}),this.eventBus=a??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var _r=class{static format(t,r,a,n){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(a,n)):this.getIntlDateTime(t,r,a,n)}static getMomentDateFormat(t,r){return t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,a,n){let i=typeof t=="string"?new Date(t):t,s=new Intl.DateTimeFormat(r,{dateStyle:a?"medium":"short"}).format(i);if(!n)return s;let o=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(i);return`${s} ${o}`}static getTimezoneAsString(){let t=a=>String(Math.floor(a)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var Es=R(k()),Rr=function(e,t,r,a){var n=arguments.length,i=n<3?t:a===null?a=Object.getOwnPropertyDescriptor(t,r):a,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,a);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(i=(n<3?s(i):n>3?s(t,r,i):s(t,r))||i);return n>3&&i&&Object.defineProperty(t,r,i),i},ip=(0,Es.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...a){super(a),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(L)}dateFormatOptionsChanged(a){return a.has("metadataDescriptors")||a.has("useLongDateFormat")||a.has("useDateTimeFormat")||a.has("uiLocale")}getDateFormatter(a){var n,i;return((i=(n=this.metadataDescriptors.find(o=>o.key===a))===null||n===void 0?void 0:n.date)!==null&&i!==void 0?i:!1)?o=>_r.format(o,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Rr([(0,v1.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Rr([(0,v1.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Rr([$a({store:L.name,selector:r=>{var a,n;return(n=(a=r.metadataConfiguration)===null||a===void 0?void 0:a.descriptors)!==null&&n!==void 0?n:[]}})],t.prototype,"metadataDescriptors",void 0),Rr([$a({store:L.name})],t.prototype,"uiLocale",void 0),t});var Tr=R(k());var Or=class extends Z{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=L.getState().session;return!!t?.sessionAuthenticated}};var Mr=class extends Z{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=L.getState().session;return!!t?.sessionAuthenticated}};var Xf="ft-user-assets",Qf={setAssetCount:(e,t)=>{let{userAssetType:r,count:a}=t.payload.assetCount;e.assetCounts.allAsset[r]=a},clearAssetCount:e=>{Object.values(ne).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:r,mapId:a,asset:n}=t.payload;y1(e,r,[...g1(e,r),n]),Ls(e,r,1,a),Ss(e,n)},editAsset:(e,t)=>{let{assetType:r,asset:a}=t.payload;y1(e,r,g1(e,r).map(n=>n.id===a.id?a:n)),Ss(e,a)},removeAsset:(e,t)=>{let{assetType:r,mapId:a,assetId:n}=t.payload;y1(e,r,g1(e,r).filter(i=>i.id!==n)),Ls(e,r,-1,a)}},xs={[ne.SEARCHES]:"savedSearches",[ne.BOOKMARKS]:"bookmarks",[ne.BOOKS]:void 0,[ne.COLLECTIONS]:void 0},g1=(e,t)=>{var r;let a=xs[t];return a?(r=e[a])!==null&&r!==void 0?r:[]:[]},y1=(e,t,r)=>{let a=xs[t];a&&(e[a]=r)},Ls=(e,t,r,a)=>{let n=e.assetCounts.allAsset[t];if(n!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,n+r),t===ne.BOOKMARKS&&a)){let i=e.assetCounts.bookmarkByMap[a];e.assetCounts.bookmarkByMap[a]=Math.max(0,i+r)}},Ss=(e,t)=>{let r=e.assetLabels.map(n=>n.title),a=t.labels.filter(n=>!r.includes(n)).map(n=>({title:n}));e.assetLabels.push(...a)},te=Tr.FtReduxStore.get({name:Xf,reducers:Qf,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(ne).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),A1=class{constructor(t=new Or,r=new Mr){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=L.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new sr,this.savedSearchesService=new fr,L.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=L.getState();(0,Tr.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),te.actions.clearAssetCount(),te.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),te.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),te.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();te.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();te.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&te.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&te.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(te.getState().assetCounts.bookmarkByMap).length!==0;t===ne.BOOKMARKS&&r&&te.actions.clearBookmarkCountByMap(),te.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;te.actions.bookmarks(r)}}},Jf=new A1;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Jf);(0,Cs.customElement)("ft-app-context")(D);var Os=R(Q());var b1=class{fromLocalizableLabel(t){return t.type=="PLAIN_TEXT"?{message:t.text}:{key:t.key,custom:t.type=="LOCALIZED_CUSTOM",context:t.context,message:t.key}}fromAttribute(t){if(t!=null)try{return JSON.parse(t)}catch{if(this.isI18nKey(t)){let[a,n]=t.split(".");return{context:a,key:n,custom:!0,message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},_s=new b1;var Zf=function(e,t,r,a){var n=arguments.length,i=n<3?t:a===null?a=Object.getOwnPropertyDescriptor(t,r):a,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,a);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(i=(n<3?s(i):n>3?s(t,r,i):s(t,r))||i);return n>3&&i&&Object.defineProperty(t,r,i),i},e7=Symbol("i18nAttributes"),t7=Symbol("i18nListAttributes"),Ms=Symbol("i18nProperties"),Nr=Symbol("i18nContexts"),Pt=Symbol("i18nUnsubs"),Ts=(0,pt.applyMixinOnce)(Symbol("withI18n"),function(e){var t,r;class a extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[r]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?cr:nt}i18n(i){let{context:s,key:o,message:c}=i,{custom:f,args:d,argsProvider:p}=i;if(s&&o){this.hasI18nContext(s)||this.addI18nContext(s,void 0,f);let m=d??(p?p(this):[]);return this.getI18nService(f).resolveMessage(s,o,...m)}return c}async awaitI18n(i){let{context:s,custom:o}=i;return s&&await this.getI18nService(o).prepareContext(s),this.i18n(i)}customI18n(i,s){if(_s.isI18nKey(i)){let[o,c]=i.split(".");return this.i18n({custom:!0,context:o,key:c,...s})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((s,o,c)=>i.has(o)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((s,o,c)=>{var f;return((f=c?.context)===null||f===void 0?void 0:f.toLowerCase())===i}),this.updateI18nProperties(s=>s.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var s,o;let c=this,f=(d,p,m)=>m?.context&&m.key&&i(d,p,m)?{...m,message:this.i18n({context:m.context,key:m.key,custom:m.custom,...d})}:m;(s=this[e7])===null||s===void 0||s.forEach((d,p)=>c[p]=f(d,p,c[p])),(o=this[t7])===null||o===void 0||o.forEach((d,p)=>{var m;return c[p]=(m=c[p])===null||m===void 0?void 0:m.map(g=>f(d,p,g))})}updateI18nProperties(i){var s;(s=this[Ms])===null||s===void 0||s.forEach((o,c)=>{i(o,c)&&(this[c]=this.i18n(o))})}addI18nMessages(i,s,o){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,s,o)}addI18nContext(i,s,o){let c=(typeof i=="string"?i:i.name).toLowerCase();o=typeof i=="string"?o:i.custom,this[Nr].set(c,{isCustomContext:o}),this[Pt].has(c)||this[Pt].set(c,this.getI18nService(o).subscribe(c,()=>this.onI18nUpdate(c))),this.getI18nService(o).prepareContext(c,s)}hasI18nContext(i){return this[Nr].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Nr].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Pt].forEach(i=>i()),this[Pt].clear()}}return t=Nr,r=Pt,Zf([(0,Os.property)({type:Boolean})],a.prototype,"useCustomMessageContexts",void 0),a}),Rs=class extends Ts(pt.FtLitElement){},wr=class extends Ts(pt.FtLitElementRedux){};var zt=function(e,t,r,a){var n=arguments.length,i=n<3?t:a===null?a=Object.getOwnPropertyDescriptor(t,r):a,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,a);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(i=(n<3?s(i):n>3?s(t,r,i):s(t,r))||i);return n>3&&i&&Object.defineProperty(t,r,i),i},de=class extends wr{constructor(){super(),this.editorMode=!1,this.addStore(L)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Pr.nothing:Pr.html`
|
|
661
|
+
`}connectedCallback(){super.connectedCallback(),L.addEventListener(Ke.eventName,this.reloadConfiguration)}disconnectedCallback(){L.addEventListener(Ke.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(t){var r,a,n,i,s,o,c;super.update(t),t.has("baseUrl")&&(L.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&L.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&L.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&L.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&L.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&L.actions.noCustom(this.noCustom),t.has("editorMode")&&L.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&L.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&L.actions.session(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(f=>nt.addContext(f)),t.has("openExternalDocumentInNewTab")&&L.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&L.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&L.actions.forcedOffline(this.forcedOffline),t.has("localesConfiguration")&&(L.actions.defaultLocales((r=this.localesConfiguration)===null||r===void 0?void 0:r.defaultLocales),L.actions.availableUiLocales((n=(a=this.localesConfiguration)===null||a===void 0?void 0:a.availableUiLocales)!==null&&n!==void 0?n:[]),L.actions.searchInAllLanguagesAllowed((s=(i=this.localesConfiguration)===null||i===void 0?void 0:i.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),t.has("authenticationRequired")&&L.actions.authenticationRequired(this.authenticationRequired),t.has("availableContentLocales")&&L.actions.availableContentLocales((c=(o=this.availableContentLocales)===null||o===void 0?void 0:o.contentLocales)!==null&&c!==void 0?c:[]),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),this.availableContentLocales==null&&this.updateAvailableContentLocales())}async updateSession(){this.session=await this.cache.get("session",async()=>{let t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},t.idleTimeoutInMillis),t})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}async updateAvailableContentLocales(){this.availableContentLocales=await this.cache.get("availableContentLocales",()=>O4(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};D.elementDefinitions={};D.styles=ji;B([(0,F.property)()],D.prototype,"baseUrl",void 0);B([(0,F.property)()],D.prototype,"apiIntegrationIdentifier",void 0);B([(0,F.property)()],D.prototype,"apiIntegrationAppVersion",void 0);B([(0,F.property)()],D.prototype,"uiLocale",void 0);B([(0,ue.jsonProperty)(null)],D.prototype,"availableUiLocales",void 0);B([(0,ue.jsonProperty)(null)],D.prototype,"metadataConfiguration",void 0);B([(0,F.property)({type:Boolean})],D.prototype,"editorMode",void 0);B([(0,F.property)({type:Boolean})],D.prototype,"noCustom",void 0);B([(0,F.property)({type:Boolean})],D.prototype,"openExternalDocumentInNewTab",void 0);B([(0,F.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],D.prototype,"noCustomComponent",void 0);B([(0,F.property)({type:Boolean})],D.prototype,"withManualResources",void 0);B([(0,F.property)({type:Boolean})],D.prototype,"navigatorOnline",void 0);B([(0,F.property)({type:Boolean})],D.prototype,"forcedOffline",void 0);B([(0,F.property)({type:Object})],D.prototype,"apiProvider",void 0);B([(0,F.property)({type:Boolean})],D.prototype,"authenticationRequired",void 0);B([(0,ue.jsonProperty)([])],D.prototype,"messageContexts",void 0);B([(0,ue.jsonProperty)(void 0)],D.prototype,"session",void 0);B([(0,F.state)()],D.prototype,"localesConfiguration",void 0);B([(0,F.state)()],D.prototype,"availableContentLocales",void 0);var v1=R(Q());function uf(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,a,n;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(a=r;a--!==0;)if(!pr(e[a],t[a]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(a of e.entries())if(!t.has(a[0]))return!1;for(a of e.entries())if(!pr(a[1],t.get(a[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(a of e.entries())if(!t.has(a[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let i=s=>Object.keys(s).filter(o=>s[o]!=null);if(n=i(e),r=n.length,r!==i(t).length)return!1;for(a=r;a--!==0;)if(!Object.prototype.hasOwnProperty.call(t,n[a]))return!1;for(a=r;a--!==0;){let s=n[a];if(!pr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function pr(e,t){try{return uf(e,t)}catch{return!1}}function Ot(e,t){return!pr(e,t)}function hr(e,t){let r=a=>a[e]===!0;return a=>{if(r(a))return a;let n=t(a);return n[e]=!0,n}}var T4=R(Q(),1);var $a=e=>{let t=e??{};return(r,a)=>{var n;let i={hasChanged:Ot,attribute:!1,...t};(0,T4.property)(i)(r,a);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(a,{selector:(n=t.selector)!==null&&n!==void 0?n:o=>o[a],store:t.store})}};var mr=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(a=>a.type===t);return r&&(this.queue=this.queue.filter(a=>a!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var $e=R(Q(),1);var N4=R(Q(),1);function w4(e,t){let r=()=>JSON.parse(JSON.stringify(e));return(0,N4.property)({type:Object,converter:{fromAttribute:a=>{if(a==null)return r();try{return JSON.parse(a)}catch{return r()}},toAttribute:a=>JSON.stringify(a)},hasChanged:Ot,...t??{}})}var vr=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,a)=>{this.resolvePromise=r,this.rejectPromise=a})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let a=[...this.callbacks];this.callbacks=[];let n=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,i=(r=this.resolvePromise)!==null&&r!==void 0?r:()=>null;this.clearPromise();for(let s of a)try{await s()}catch(o){n(o);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 z4=R(re(),1);var gr=globalThis,ff=gr.ShadowRoot&&(gr.ShadyCSS===void 0||gr.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,I9=Symbol();var P4=(e,t)=>{if(ff)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let a=document.createElement("style"),n=gr.litNonce;n!==void 0&&a.setAttribute("nonce",n),a.textContent=r.cssText,e.appendChild(a)}};var yr=class extends z4.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([n,i])=>t.registry.define(n,i)));let r={...t.shadowRootOptions,customElements:t.registry},a=this.renderOptions.creationScope=this.attachShadow(r);return P4(a,t.elementStyles),a}};function k4(e,t,...r){var a;let n=e.querySelector(t);for(let i of r)n=(a=n?.shadowRoot)===null||a===void 0?void 0:a.querySelector(i);return n}var ot=function(e,t,r,a){var n=arguments.length,i=n<3?t:a===null?a=Object.getOwnPropertyDescriptor(t,r):a,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,a);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(i=(n<3?s(i):n>3?s(t,r,i):s(t,r))||i);return n>3&&i&&Object.defineProperty(t,r,i),i},G4,I4=Symbol("constructorPrototype"),D4=Symbol("constructorName"),H4=Symbol("exportpartsDebouncer"),U4=Symbol("dynamicDependenciesLoaded"),st=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};st.eventName="exportparts-updated";var me=class extends yr{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[G4]=new vr(5),this.scheduleExportpartsUpdate=()=>{var t,r,a;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(a=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&a!==void 0&&a)&&this[H4].run(()=>{var n,i;!((n=this.exportpartsPrefix)===null||n===void 0)&&n.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[D4]=this.constructor.name,this[I4]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[D4]&&Object.setPrototypeOf(this,this[I4])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(a){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",a)}let r=this.constructor;r[U4]||(r[U4]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(st.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(st.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new st)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:a,shadowPath:n}=this.elementToFocus;if(a!=null){let i=[...n??[],a];r=k4(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,a,n;if(((a=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&a!==void 0?a:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((n=this.customStylesheet)!==null&&n!==void 0?n:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}setExportpartsAttribute(t){var r,a,n,i,s,o;let c=m=>m!=null&&m.trim().length>0,f=t.filter(c).map(m=>m.trim());if(f.length===0){this.exportparts=void 0;return}let d=new Set;for(let m of(a=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&a!==void 0?a:[]){let g=(i=(n=m.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&i!==void 0?i:[],A=(o=(s=m.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(C=>C.split(":")[1]))!==null&&o!==void 0?o:[],b=[...g,...A].filter(c).map(C=>C.trim());for(let C of b)d.add(C)}if(d.size===0){this.exportparts=void 0;return}let p=[...d.values()].flatMap(m=>f.map(g=>`${m}:${g}--${m}`));this.exportparts=[...this.part,...p].join(", ")}};G4=H4;ot([(0,$e.property)()],me.prototype,"exportpartsPrefix",void 0);ot([w4([])],me.prototype,"exportpartsPrefixes",void 0);ot([(0,$e.property)({reflect:!0})],me.prototype,"exportparts",void 0);ot([(0,$e.property)()],me.prototype,"customStylesheet",void 0);ot([(0,$e.property)()],me.prototype,"elementToFocus",void 0);ot([(0,$e.state)()],me.prototype,"useAdoptedStyleSheets",void 0);function Ar(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Mt=Symbol("internalReduxEventsUnsubscribers"),Pe=Symbol("internalStoresUnsubscribers"),Fe=Symbol("internalStores"),df=hr(Symbol("withRedux"),function(e){var t,r,a;class n extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[a]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(o=>s.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[Fe].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Fe].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Fe].get(s)}addStore(s,o){var c;o=(c=o??s.name)!==null&&c!==void 0?c:"default-store",this.unsubscribeFromStore(o),this[Fe].set(o,s),this.subscribeToStore(o,s),this.updateFromStores()}removeStore(s){let o=typeof s=="string"?s:s.name;this.unsubscribeFromStore(o),this[Fe].delete(o)}setupStores(){this.unsubscribeFromStores(),this[Fe].forEach((s,o)=>this.subscribeToStore(o,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,o)=>{let c=this.constructor.getPropertyOptions(o);if(!c?.attribute||!this.hasAttribute(typeof c?.attribute=="string"?c.attribute:o)){let f=this.getStore(s.store);f&&(s.store?this[Pe].has(s.store):this[Pe].size>0)&&(this[o]=s.selector(f.getState(),this))}})}subscribeToStore(s,o){var c;this[Pe].set(s,o.subscribe(()=>this.updateFromStores())),this[Mt].set(s,[]),Ar(o)&&o.eventBus&&((c=this.reduxConstructor.reduxEventListeners)===null||c===void 0||c.forEach((f,d)=>{if(typeof this[d]=="function"&&(!f.store||o.name===f.store)){let p=m=>this[d](m);o.addEventListener(f.eventName,p),this[Mt].get(s).push(()=>o.removeEventListener(f.eventName,p))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[Pe].forEach((s,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(s){var o;this[Pe].has(s)&&this[Pe].get(s)(),this[Pe].delete(s),(o=this[Mt].get(s))===null||o===void 0||o.forEach(c=>c()),this[Mt].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=Pe,r=Fe,a=Mt,n.reduxProperties=new Map,n.reduxReactiveProperties=new Set,n.reduxEventListeners=new Map,n}),j4=class extends df(me){};function ie(e){for(var t=arguments.length,r=Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];if(0)var n,i;throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function xe(e){return!!e&&!!e[U]}function fe(e){var t;return!!e&&(function(r){if(!r||typeof r!="object")return!1;var a=Object.getPrototypeOf(r);if(a===null)return!0;var n=Object.hasOwnProperty.call(a,"constructor")&&a.constructor;return n===Object||typeof n=="function"&&Function.toString.call(n)===bf}(e)||Array.isArray(e)||!!e[q4]||!!(!((t=e.constructor)===null||t===void 0)&&t[q4])||t1(e)||r1(e))}function qe(e,t,r){r===void 0&&(r=!1),ut(e)===0?(r?Object.keys:lt)(e).forEach(function(a){r&&typeof a=="symbol"||t(a,e[a],e)}):e.forEach(function(a,n){return t(n,a,e)})}function ut(e){var t=e[U];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:t1(e)?2:r1(e)?3:0}function ct(e,t){return ut(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function pf(e,t){return ut(e)===2?e.get(t):e[t]}function Y4(e,t,r){var a=ut(e);a===2?e.set(t,r):a===3?e.add(r):e[t]=r}function X4(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function t1(e){return yf&&e instanceof Map}function r1(e){return Af&&e instanceof Set}function ze(e){return e.o||e.t}function a1(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Z4(e);delete t[U];for(var r=lt(t),a=0;a<r.length;a++){var n=r[a],i=t[n];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[n]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[n]})}return Object.create(Object.getPrototypeOf(e),t)}function n1(e,t){return t===void 0&&(t=!1),i1(e)||xe(e)||!fe(e)||(ut(e)>1&&(e.set=e.add=e.clear=e.delete=hf),Object.freeze(e),t&&qe(e,function(r,a){return n1(a,!0)},!0)),e}function hf(){ie(2)}function i1(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function ve(e){var t=e1[e];return t||ie(18,e),t}function mf(e,t){e1[e]||(e1[e]=t)}function Qa(){return Nt}function Fa(e,t){t&&(ve("Patches"),e.u=[],e.s=[],e.v=t)}function br(e){Ja(e),e.p.forEach(vf),e.p=null}function Ja(e){e===Nt&&(Nt=e.l)}function B4(e){return Nt={p:[],l:Nt,h:e,m:!0,_:0}}function vf(e){var t=e[U];t.i===0||t.i===1?t.j():t.g=!0}function qa(e,t){t._=t.p.length;var r=t.p[0],a=e!==void 0&&e!==r;return t.h.O||ve("ES5").S(t,e,a),a?(r[U].P&&(br(t),ie(4)),fe(e)&&(e=Er(t,e),t.l||Lr(t,e)),t.u&&ve("Patches").M(r[U].t,e,t.u,t.s)):e=Er(t,r,[]),br(t),t.u&&t.v(t.u,t.s),e!==J4?e:void 0}function Er(e,t,r){if(i1(t))return t;var a=t[U];if(!a)return qe(t,function(o,c){return K4(e,a,t,o,c,r)},!0),t;if(a.A!==e)return t;if(!a.P)return Lr(e,a.t,!0),a.t;if(!a.I){a.I=!0,a.A._--;var n=a.i===4||a.i===5?a.o=a1(a.k):a.o,i=n,s=!1;a.i===3&&(i=new Set(n),n.clear(),s=!0),qe(i,function(o,c){return K4(e,a,n,o,c,r,s)}),Lr(e,n,!1),r&&e.u&&ve("Patches").N(a,r,e.u,e.s)}return a.o}function K4(e,t,r,a,n,i,s){if(xe(n)){var o=Er(e,n,i&&t&&t.i!==3&&!ct(t.R,a)?i.concat(a):void 0);if(Y4(r,a,o),!xe(o))return;e.m=!1}else s&&r.add(n);if(fe(n)&&!i1(n)){if(!e.h.D&&e._<1)return;Er(e,n),t&&t.A.l||Lr(e,n)}}function Lr(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&n1(t,r)}function Ya(e,t){var r=e[U];return(r?ze(r):e)[t]}function V4(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var a=Object.getOwnPropertyDescriptor(r,t);if(a)return a;r=Object.getPrototypeOf(r)}}function ke(e){e.P||(e.P=!0,e.l&&ke(e.l))}function Xa(e){e.o||(e.o=a1(e.t))}function Za(e,t,r){var a=t1(t)?ve("MapSet").F(t,r):r1(t)?ve("MapSet").T(t,r):e.O?function(n,i){var s=Array.isArray(n),o={i:s?1:0,A:i?i.A:Qa(),P:!1,I:!1,R:{},l:i,t:n,k:null,o:null,j:null,C:!1},c=o,f=wt;s&&(c=[o],f=Tt);var d=Proxy.revocable(c,f),p=d.revoke,m=d.proxy;return o.k=m,o.j=p,m}(t,r):ve("ES5").J(t,r);return(r?r.A:Qa()).p.push(a),a}function gf(e){return xe(e)||ie(22,e),function t(r){if(!fe(r))return r;var a,n=r[U],i=ut(r);if(n){if(!n.P&&(n.i<4||!ve("ES5").K(n)))return n.t;n.I=!0,a=W4(r,i),n.I=!1}else a=W4(r,i);return qe(a,function(s,o){n&&pf(n.t,s)===o||Y4(a,s,t(o))}),i===3?new Set(a):a}(e)}function W4(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return a1(e)}function Q4(){function e(s,o){var c=i[s];return c?c.enumerable=o:i[s]=c={configurable:!0,enumerable:o,get:function(){var f=this[U];return wt.get(f,s)},set:function(f){var d=this[U];wt.set(d,s,f)}},c}function t(s){for(var o=s.length-1;o>=0;o--){var c=s[o][U];if(!c.P)switch(c.i){case 5:a(c)&&ke(c);break;case 4:r(c)&&ke(c)}}}function r(s){for(var o=s.t,c=s.k,f=lt(c),d=f.length-1;d>=0;d--){var p=f[d];if(p!==U){var m=o[p];if(m===void 0&&!ct(o,p))return!0;var g=c[p],A=g&&g[U];if(A?A.t!==m:!X4(g,m))return!0}}var b=!!o[U];return f.length!==lt(o).length+(b?0:1)}function a(s){var o=s.k;if(o.length!==s.t.length)return!0;var c=Object.getOwnPropertyDescriptor(o,o.length-1);if(c&&!c.get)return!0;for(var f=0;f<o.length;f++)if(!o.hasOwnProperty(f))return!0;return!1}function n(s){s.g&&ie(3,JSON.stringify(ze(s)))}var i={};mf("ES5",{J:function(s,o){var c=Array.isArray(s),f=function(p,m){if(p){for(var g=Array(m.length),A=0;A<m.length;A++)Object.defineProperty(g,""+A,e(A,!0));return g}var b=Z4(m);delete b[U];for(var C=lt(b),S=0;S<C.length;S++){var _=C[S];b[_]=e(_,p||!!b[_].enumerable)}return Object.create(Object.getPrototypeOf(m),b)}(c,s),d={i:c?5:4,A:o?o.A:Qa(),P:!1,I:!1,R:{},l:o,t:s,k:f,o:null,g:!1,C:!1};return Object.defineProperty(f,U,{value:d,writable:!0}),f},S:function(s,o,c){c?xe(o)&&o[U].A===s&&t(s.p):(s.u&&function f(d){if(d&&typeof d=="object"){var p=d[U];if(p){var m=p.t,g=p.k,A=p.R,b=p.i;if(b===4)qe(g,function(N){N!==U&&(m[N]!==void 0||ct(m,N)?A[N]||f(g[N]):(A[N]=!0,ke(p)))}),qe(m,function(N){g[N]!==void 0||ct(g,N)||(A[N]=!1,ke(p))});else if(b===5){if(a(p)&&(ke(p),A.length=!0),g.length<m.length)for(var C=g.length;C<m.length;C++)A[C]=!1;else for(var S=m.length;S<g.length;S++)A[S]=!0;for(var _=Math.min(g.length,m.length),T=0;T<_;T++)g.hasOwnProperty(T)||(A[T]=!0),A[T]===void 0&&f(g[T])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?r(s):a(s)}})}var $4,Nt,s1=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",yf=typeof Map<"u",Af=typeof Set<"u",F4=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",J4=s1?Symbol.for("immer-nothing"):(($4={})["immer-nothing"]=!0,$4),q4=s1?Symbol.for("immer-draftable"):"__$immer_draftable",U=s1?Symbol.for("immer-state"):"__$immer_state";var bf=""+Object.prototype.constructor,lt=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Z4=Object.getOwnPropertyDescriptors||function(e){var t={};return lt(e).forEach(function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)}),t},e1={},wt={get:function(e,t){if(t===U)return e;var r=ze(e);if(!ct(r,t))return function(n,i,s){var o,c=V4(i,s);return c?"value"in c?c.value:(o=c.get)===null||o===void 0?void 0:o.call(n.k):void 0}(e,r,t);var a=r[t];return e.I||!fe(a)?a:a===Ya(e.t,t)?(Xa(e),e.o[t]=Za(e.A.h,a,e)):a},has:function(e,t){return t in ze(e)},ownKeys:function(e){return Reflect.ownKeys(ze(e))},set:function(e,t,r){var a=V4(ze(e),t);if(a?.set)return a.set.call(e.k,r),!0;if(!e.P){var n=Ya(ze(e),t),i=n?.[U];if(i&&i.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(X4(r,n)&&(r!==void 0||ct(e.t,t)))return!0;Xa(e),ke(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return Ya(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,Xa(e),ke(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=ze(e),a=Reflect.getOwnPropertyDescriptor(r,t);return a&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:a.enumerable,value:r[t]}},defineProperty:function(){ie(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){ie(12)}},Tt={};qe(wt,function(e,t){Tt[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Tt.deleteProperty=function(e,t){return Tt.set.call(this,e,t,void 0)},Tt.set=function(e,t,r){return wt.set.call(this,e[0],t,r,e[0])};var Ef=function(){function e(r){var a=this;this.O=F4,this.D=!0,this.produce=function(n,i,s){if(typeof n=="function"&&typeof i!="function"){var o=i;i=n;var c=a;return function(b){var C=this;b===void 0&&(b=o);for(var S=arguments.length,_=Array(S>1?S-1:0),T=1;T<S;T++)_[T-1]=arguments[T];return c.produce(b,function(N){var P;return(P=i).call.apply(P,[C,N].concat(_))})}}var f;if(typeof i!="function"&&ie(6),s!==void 0&&typeof s!="function"&&ie(7),fe(n)){var d=B4(a),p=Za(a,n,void 0),m=!0;try{f=i(p),m=!1}finally{m?br(d):Ja(d)}return typeof Promise<"u"&&f instanceof Promise?f.then(function(b){return Fa(d,s),qa(b,d)},function(b){throw br(d),b}):(Fa(d,s),qa(f,d))}if(!n||typeof n!="object"){if((f=i(n))===void 0&&(f=n),f===J4&&(f=void 0),a.D&&n1(f,!0),s){var g=[],A=[];ve("Patches").M(n,f,g,A),s(g,A)}return f}ie(21,n)},this.produceWithPatches=function(n,i){if(typeof n=="function")return function(f){for(var d=arguments.length,p=Array(d>1?d-1:0),m=1;m<d;m++)p[m-1]=arguments[m];return a.produceWithPatches(f,function(g){return n.apply(void 0,[g].concat(p))})};var s,o,c=a.produce(n,i,function(f,d){s=f,o=d});return typeof Promise<"u"&&c instanceof Promise?c.then(function(f){return[f,s,o]}):[c,s,o]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){fe(r)||ie(8),xe(r)&&(r=gf(r));var a=B4(this),n=Za(this,r,void 0);return n[U].C=!0,Ja(a),n},t.finishDraft=function(r,a){var n=r&&r[U],i=n.A;return Fa(i,a),qa(void 0,i)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!F4&&ie(20),this.O=r},t.applyPatches=function(r,a){var n;for(n=a.length-1;n>=0;n--){var i=a[n];if(i.path.length===0&&i.op==="replace"){r=i.value;break}}n>-1&&(a=a.slice(n+1));var s=ve("Patches").$;return xe(r)?s(r,a):this.produce(r,function(o){return s(o,a)})},e}(),ee=new Ef,Lf=ee.produce,Q9=ee.produceWithPatches.bind(ee),J9=ee.setAutoFreeze.bind(ee),Z9=ee.setUseProxies.bind(ee),ed=ee.applyPatches.bind(ee),td=ee.createDraft.bind(ee),rd=ee.finishDraft.bind(ee),Sr=Lf;function Ye(e){"@babel/helpers - typeof";return Ye=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ye(e)}function es(e,t){if(Ye(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t||"default");if(Ye(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ts(e){var t=es(e,"string");return Ye(t)=="symbol"?t:t+""}function rs(e,t,r){return(t=ts(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function as(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,a)}return r}function o1(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?as(Object(r),!0).forEach(function(a){rs(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):as(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function q(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 ns=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),c1=function(){return Math.random().toString(36).substring(7).split("").join(".")},xr={INIT:"@@redux/INIT"+c1(),REPLACE:"@@redux/REPLACE"+c1(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+c1()}};function Sf(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function l1(e,t,r){var a;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(q(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(q(1));return r(l1)(e,t)}if(typeof e!="function")throw new Error(q(2));var n=e,i=t,s=[],o=s,c=!1;function f(){o===s&&(o=s.slice())}function d(){if(c)throw new Error(q(3));return i}function p(b){if(typeof b!="function")throw new Error(q(4));if(c)throw new Error(q(5));var C=!0;return f(),o.push(b),function(){if(C){if(c)throw new Error(q(6));C=!1,f();var _=o.indexOf(b);o.splice(_,1),s=null}}}function m(b){if(!Sf(b))throw new Error(q(7));if(typeof b.type>"u")throw new Error(q(8));if(c)throw new Error(q(9));try{c=!0,i=n(i,b)}finally{c=!1}for(var C=s=o,S=0;S<C.length;S++){var _=C[S];_()}return b}function g(b){if(typeof b!="function")throw new Error(q(10));n=b,m({type:xr.REPLACE})}function A(){var b,C=p;return b={subscribe:function(_){if(typeof _!="object"||_===null)throw new Error(q(11));function T(){_.next&&_.next(d())}T();var N=C(T);return{unsubscribe:N}}},b[ns]=function(){return this},b}return m({type:xr.INIT}),a={dispatch:m,subscribe:p,getState:d,replaceReducer:g},a[ns]=A,a}function xf(e){Object.keys(e).forEach(function(t){var r=e[t],a=r(void 0,{type:xr.INIT});if(typeof a>"u")throw new Error(q(12));if(typeof r(void 0,{type:xr.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(q(13))})}function is(e){for(var t=Object.keys(e),r={},a=0;a<t.length;a++){var n=t[a];typeof e[n]=="function"&&(r[n]=e[n])}var i=Object.keys(r),s,o;try{xf(r)}catch(c){o=c}return function(f,d){if(f===void 0&&(f={}),o)throw o;if(0)var p;for(var m=!1,g={},A=0;A<i.length;A++){var b=i[A],C=r[b],S=f[b],_=C(S,d);if(typeof _>"u"){var T=d&&d.type;throw new Error(q(14))}g[b]=_,m=m||_!==S}return m=m||i.length!==Object.keys(f).length,m?g:f}}function ft(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.length===0?function(a){return a}:t.length===1?t[0]:t.reduce(function(a,n){return function(){return a(n.apply(void 0,arguments))}})}function ss(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(a){return function(){var n=a.apply(void 0,arguments),i=function(){throw new Error(q(15))},s={getState:n.getState,dispatch:function(){return i.apply(void 0,arguments)}},o=t.map(function(c){return c(s)});return i=ft.apply(void 0,o)(n.dispatch),o1(o1({},n),{},{dispatch:i})}}}function os(e){var t=function(a){var n=a.dispatch,i=a.getState;return function(s){return function(o){return typeof o=="function"?o(n,i,e):s(o)}}};return t}var cs=os();cs.withExtraArgument=os;var u1=cs;var ps=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,n){a.__proto__=n}||function(a,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(a[i]=n[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function a(){this.constructor=t}t.prototype=r===null?Object.create(r):(a.prototype=r.prototype,new a)}}(),Cf=function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},a,n,i,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(f){return function(d){return c([f,d])}}function c(f){if(a)throw new TypeError("Generator is already executing.");for(;r;)try{if(a=1,n&&(i=f[0]&2?n.return:f[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,f[1])).done)return i;switch(n=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++,n=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=t.call(e,r)}catch(d){f=[6,d],n=0}finally{a=i=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},dt=function(e,t){for(var r=0,a=t.length,n=e.length;r<a;r++,n++)e[n]=t[r];return e},_f=Object.defineProperty,Rf=Object.defineProperties,Of=Object.getOwnPropertyDescriptors,ls=Object.getOwnPropertySymbols,Mf=Object.prototype.hasOwnProperty,Tf=Object.prototype.propertyIsEnumerable,us=function(e,t,r){return t in e?_f(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},Ie=function(e,t){for(var r in t||(t={}))Mf.call(t,r)&&us(e,r,t[r]);if(ls)for(var a=0,n=ls(t);a<n.length;a++){var r=n[a];Tf.call(t,r)&&us(e,r,t[r])}return e},f1=function(e,t){return Rf(e,Of(t))},Nf=function(e,t,r){return new Promise(function(a,n){var i=function(c){try{o(r.next(c))}catch(f){n(f)}},s=function(c){try{o(r.throw(c))}catch(f){n(f)}},o=function(c){return c.done?a(c.value):Promise.resolve(c.value).then(i,s)};o((r=r.apply(e,t)).next())})};var wf=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ft:ft.apply(null,arguments)},bd=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function Pf(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var r=t;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return t===r}var zf=function(e){ps(t,e);function t(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];var n=e.apply(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,dt([void 0],r[0].concat(this)))):new(t.bind.apply(t,dt([void 0],r.concat(this))))},t}(Array),kf=function(e){ps(t,e);function t(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];var n=e.apply(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,dt([void 0],r[0].concat(this)))):new(t.bind.apply(t,dt([void 0],r.concat(this))))},t}(Array);function h1(e){return fe(e)?Sr(e,function(){}):e}function If(e){return typeof e=="boolean"}function Df(){return function(t){return Uf(t)}}function Uf(e){e===void 0&&(e={});var t=e.thunk,r=t===void 0?!0:t,a=e.immutableCheck,n=a===void 0?!0:a,i=e.serializableCheck,s=i===void 0?!0:i,o=new zf;if(r&&(If(r)?o.push(u1):o.push(u1.withExtraArgument(r.extraArgument))),0){if(n)var c;if(s)var f}return o}var d1=!0;function hs(e){var t=Df(),r=e||{},a=r.reducer,n=a===void 0?void 0:a,i=r.middleware,s=i===void 0?t():i,o=r.devTools,c=o===void 0?!0:o,f=r.preloadedState,d=f===void 0?void 0:f,p=r.enhancers,m=p===void 0?void 0:p,g;if(typeof n=="function")g=n;else if(Pf(n))g=is(n);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 A=s;if(typeof A=="function"&&(A=A(t),!d1&&!Array.isArray(A)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!d1&&A.some(function(N){return typeof N!="function"}))throw new Error("each middleware provided to configureStore must be a function");var b=ss.apply(void 0,A),C=ft;c&&(C=wf(Ie({trace:!d1},typeof c=="object"&&c)));var S=new kf(b),_=S;Array.isArray(m)?_=dt([b],m):typeof m=="function"&&(_=m(S));var T=C.apply(void 0,_);return l1(g,d,T)}function De(e,t){function r(){for(var a=[],n=0;n<arguments.length;n++)a[n]=arguments[n];if(t){var i=t.apply(void 0,a);if(!i)throw new Error("prepareAction did not return an object");return Ie(Ie({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:a[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(a){return a.type===e},r}function ms(e){var t={},r=[],a,n={addCase:function(i,s){var o=typeof i=="string"?i:i.type;if(o in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[o]=s,n},addMatcher:function(i,s){return r.push({matcher:i,reducer:s}),n},addDefaultCase:function(i){return a=i,n}};return e(n),[t,r,a]}function Gf(e){return typeof e=="function"}function Hf(e,t,r,a){r===void 0&&(r=[]);var n=typeof t=="function"?ms(t):[t,r,a],i=n[0],s=n[1],o=n[2],c;if(Gf(e))c=function(){return h1(e())};else{var f=h1(e);c=function(){return f}}function d(p,m){p===void 0&&(p=c());var g=dt([i[m.type]],s.filter(function(A){var b=A.matcher;return b(m)}).map(function(A){var b=A.reducer;return b}));return g.filter(function(A){return!!A}).length===0&&(g=[o]),g.reduce(function(A,b){if(b)if(xe(A)){var C=A,S=b(C,m);return S===void 0?A:S}else{if(fe(A))return Sr(A,function(_){return b(_,m)});var S=b(A,m);if(S===void 0){if(A===null)return A;throw Error("A case reducer on a non-draftable value must not return undefined")}return S}return A},p)}return d.getInitialState=c,d}function jf(e,t){return e+"/"+t}function vs(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof e.initialState=="function"?e.initialState:h1(e.initialState),a=e.reducers||{},n=Object.keys(a),i={},s={},o={};n.forEach(function(d){var p=a[d],m=jf(t,d),g,A;"reducer"in p?(g=p.reducer,A=p.prepare):g=p,i[d]=g,s[m]=g,o[d]=A?De(m,A):De(m)});function c(){var d=typeof e.extraReducers=="function"?ms(e.extraReducers):[e.extraReducers],p=d[0],m=p===void 0?{}:p,g=d[1],A=g===void 0?[]:g,b=d[2],C=b===void 0?void 0:b,S=Ie(Ie({},m),s);return Hf(r,function(_){for(var T in S)_.addCase(T,S[T]);for(var N=0,P=A;N<P.length;N++){var Y=P[N];_.addMatcher(Y.matcher,Y.reducer)}C&&_.addDefaultCase(C)})}var f;return{name:t,reducer:function(d,p){return f||(f=c()),f(d,p)},actions:o,caseReducers:i,getInitialState:function(){return f||(f=c()),f.getInitialState()}}}var Bf="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Kf=function(e){e===void 0&&(e=21);for(var t="",r=e;r--;)t+=Bf[Math.random()*64|0];return t},Vf=["name","message","stack","code"],p1=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),fs=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),Wf=function(e){if(typeof e=="object"&&e!==null){for(var t={},r=0,a=Vf;r<a.length;r++){var n=a[r];typeof e[n]=="string"&&(t[n]=e[n])}return t}return{message:String(e)}},xd=function(){function e(t,r,a){var n=De(t+"/fulfilled",function(d,p,m,g){return{payload:d,meta:f1(Ie({},g||{}),{arg:m,requestId:p,requestStatus:"fulfilled"})}}),i=De(t+"/pending",function(d,p,m){return{payload:void 0,meta:f1(Ie({},m||{}),{arg:p,requestId:d,requestStatus:"pending"})}}),s=De(t+"/rejected",function(d,p,m,g,A){return{payload:g,error:(a&&a.serializeError||Wf)(d||"Rejected"),meta:f1(Ie({},A||{}),{arg:m,requestId:p,rejectedWithValue:!!g,requestStatus:"rejected",aborted:d?.name==="AbortError",condition:d?.name==="ConditionError"})}}),o=!1,c=typeof AbortController<"u"?AbortController:function(){function d(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return d.prototype.abort=function(){},d}();function f(d){return function(p,m,g){var A=a?.idGenerator?a.idGenerator(d):Kf(),b=new c,C,S=!1;function _(N){C=N,b.abort()}var T=function(){return Nf(this,null,function(){var N,P,Y,ye,K,Ae,Xe;return Cf(this,function(h){switch(h.label){case 0:return h.trys.push([0,4,,5]),ye=(N=a?.condition)==null?void 0:N.call(a,d,{getState:m,extra:g}),Ff(ye)?[4,ye]:[3,2];case 1:ye=h.sent(),h.label=2;case 2:if(ye===!1||b.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return S=!0,K=new Promise(function(v,O){return b.signal.addEventListener("abort",function(){return O({name:"AbortError",message:C||"Aborted"})})}),p(i(A,d,(P=a?.getPendingMeta)==null?void 0:P.call(a,{requestId:A,arg:d},{getState:m,extra:g}))),[4,Promise.race([K,Promise.resolve(r(d,{dispatch:p,getState:m,extra:g,requestId:A,signal:b.signal,abort:_,rejectWithValue:function(v,O){return new p1(v,O)},fulfillWithValue:function(v,O){return new fs(v,O)}})).then(function(v){if(v instanceof p1)throw v;return v instanceof fs?n(v.payload,A,d,v.meta):n(v,A,d)})])];case 3:return Y=h.sent(),[3,5];case 4:return Ae=h.sent(),Y=Ae instanceof p1?s(null,A,d,Ae.payload,Ae.meta):s(Ae,A,d),[3,5];case 5:return Xe=a&&!a.dispatchConditionRejection&&s.match(Y)&&Y.meta.condition,Xe||p(Y),[2,Y]}})})}();return Object.assign(T,{abort:_,requestId:A,arg:d,unwrap:function(){return T.then($f)}})}}return Object.assign(f,{pending:i,rejected:s,fulfilled:n,typePrefix:t})}return e.withTypes=function(){return e},e}();function $f(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Ff(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var gs="listener",ys="completed",As="cancelled",Cd="task-"+As,_d="task-"+ys,Rd=gs+"-"+As,Od=gs+"-"+ys;var m1="listenerMiddleware";var Md=De(m1+"/add"),Td=De(m1+"/removeAll"),Nd=De(m1+"/remove");var ds,wd=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(ds||(ds=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},qf=function(e){return function(t){setTimeout(t,e)}},Pd=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:qf(10);Q4();var Yf=hr(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,a,n){this.eventBus.addEventListener(r,a,n)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,a,n){this.eventBus.removeEventListener(r,a,n)}}}),Cr=class extends Yf(Object){};window.ftReduxStores||(window.ftReduxStores={});var bs=class e extends Cr{static get(t){var r;let a=typeof t=="string"?t:t.name,n=typeof t=="string"?void 0:t,i=window.ftReduxStores[a];if(Ar(i))return i;if(n==null)return;let s=vs({...n,reducers:(r=n.reducers)!==null&&r!==void 0?r:{}}),o=hs({reducer:(c,f)=>f.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof f.type=="string"&&f.type.startsWith("DEFAULT_VALUE_SETTER__")?{...c,...f.overwrites}:s.reducer(c,f)});return window.ftReduxStores[n.name]=new e(s,o,n.eventBus)}constructor(t,r,a){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new mr;let n=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,o)=>{let c=s,f=i[c];return f?(...d)=>{let p=f(...d.map(n));return this.reduxStore.dispatch(p),p}:d=>{this.setState({[c]:n(d)})}}}),this.eventBus=a??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var _r=class{static format(t,r,a,n){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(a,n)):this.getIntlDateTime(t,r,a,n)}static getMomentDateFormat(t,r){return t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,a,n){let i=typeof t=="string"?new Date(t):t,s=new Intl.DateTimeFormat(r,{dateStyle:a?"medium":"short"}).format(i);if(!n)return s;let o=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(i);return`${s} ${o}`}static getTimezoneAsString(){let t=a=>String(Math.floor(a)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var Es=R(k()),Rr=function(e,t,r,a){var n=arguments.length,i=n<3?t:a===null?a=Object.getOwnPropertyDescriptor(t,r):a,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,a);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(i=(n<3?s(i):n>3?s(t,r,i):s(t,r))||i);return n>3&&i&&Object.defineProperty(t,r,i),i},ip=(0,Es.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...a){super(a),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(L)}dateFormatOptionsChanged(a){return a.has("metadataDescriptors")||a.has("useLongDateFormat")||a.has("useDateTimeFormat")||a.has("uiLocale")}getDateFormatter(a){var n,i;return((i=(n=this.metadataDescriptors.find(o=>o.key===a))===null||n===void 0?void 0:n.date)!==null&&i!==void 0?i:!1)?o=>_r.format(o,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Rr([(0,v1.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Rr([(0,v1.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Rr([$a({store:L.name,selector:r=>{var a,n;return(n=(a=r.metadataConfiguration)===null||a===void 0?void 0:a.descriptors)!==null&&n!==void 0?n:[]}})],t.prototype,"metadataDescriptors",void 0),Rr([$a({store:L.name})],t.prototype,"uiLocale",void 0),t});var Tr=R(k());var Or=class extends Z{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=L.getState().session;return!!t?.sessionAuthenticated}};var Mr=class extends Z{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=L.getState().session;return!!t?.sessionAuthenticated}};var Xf="ft-user-assets",Qf={setAssetCount:(e,t)=>{let{userAssetType:r,count:a}=t.payload.assetCount;e.assetCounts.allAsset[r]=a},clearAssetCount:e=>{Object.values(ne).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:r,mapId:a,asset:n}=t.payload;y1(e,r,[...g1(e,r),n]),Ls(e,r,1,a),Ss(e,n)},editAsset:(e,t)=>{let{assetType:r,asset:a}=t.payload;y1(e,r,g1(e,r).map(n=>n.id===a.id?a:n)),Ss(e,a)},removeAsset:(e,t)=>{let{assetType:r,mapId:a,assetId:n}=t.payload;y1(e,r,g1(e,r).filter(i=>i.id!==n)),Ls(e,r,-1,a)}},xs={[ne.SEARCHES]:"savedSearches",[ne.BOOKMARKS]:"bookmarks",[ne.BOOKS]:void 0,[ne.COLLECTIONS]:void 0},g1=(e,t)=>{var r;let a=xs[t];return a?(r=e[a])!==null&&r!==void 0?r:[]:[]},y1=(e,t,r)=>{let a=xs[t];a&&(e[a]=r)},Ls=(e,t,r,a)=>{let n=e.assetCounts.allAsset[t];if(n!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,n+r),t===ne.BOOKMARKS&&a)){let i=e.assetCounts.bookmarkByMap[a];e.assetCounts.bookmarkByMap[a]=Math.max(0,i+r)}},Ss=(e,t)=>{let r=e.assetLabels.map(n=>n.title),a=t.labels.filter(n=>!r.includes(n)).map(n=>({title:n}));e.assetLabels.push(...a)},te=Tr.FtReduxStore.get({name:Xf,reducers:Qf,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(ne).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),A1=class{constructor(t=new Or,r=new Mr){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=L.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new sr,this.savedSearchesService=new fr,L.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=L.getState();(0,Tr.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),te.actions.clearAssetCount(),te.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),te.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),te.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();te.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();te.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&te.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&te.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(te.getState().assetCounts.bookmarkByMap).length!==0;t===ne.BOOKMARKS&&r&&te.actions.clearBookmarkCountByMap(),te.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;te.actions.bookmarks(r)}}},Jf=new A1;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Jf);(0,Cs.customElement)("ft-app-context")(D);var Os=R(Q());var b1=class{fromLocalizableLabel(t){return t.type=="PLAIN_TEXT"?{message:t.text}:{key:t.key,custom:t.type=="LOCALIZED_CUSTOM",context:t.context,message:t.key}}fromAttribute(t){if(t!=null)try{return JSON.parse(t)}catch{if(this.isI18nKey(t)){let[r,a]=t.split(".");return{context:r,key:a,custom:r!=="officialContext",message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},_s=new b1;var Zf=function(e,t,r,a){var n=arguments.length,i=n<3?t:a===null?a=Object.getOwnPropertyDescriptor(t,r):a,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,a);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(i=(n<3?s(i):n>3?s(t,r,i):s(t,r))||i);return n>3&&i&&Object.defineProperty(t,r,i),i},e7=Symbol("i18nAttributes"),t7=Symbol("i18nListAttributes"),Ms=Symbol("i18nProperties"),Nr=Symbol("i18nContexts"),Pt=Symbol("i18nUnsubs"),Ts=(0,pt.applyMixinOnce)(Symbol("withI18n"),function(e){var t,r;class a extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[r]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?cr:nt}i18n(i){let{context:s,key:o,message:c}=i,{custom:f,args:d,argsProvider:p}=i;if(s&&o){this.hasI18nContext(s)||this.addI18nContext(s,void 0,f);let m=d??(p?p(this):[]);return this.getI18nService(f).resolveMessage(s,o,...m)}return c}async awaitI18n(i){let{context:s,custom:o}=i;return s&&await this.getI18nService(o).prepareContext(s),this.i18n(i)}customI18n(i,s){if(_s.isI18nKey(i)){let[o,c]=i.split(".");return this.i18n({custom:!0,context:o,key:c,...s})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((s,o,c)=>i.has(o)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((s,o,c)=>{var f;return((f=c?.context)===null||f===void 0?void 0:f.toLowerCase())===i}),this.updateI18nProperties(s=>s.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var s,o;let c=this,f=(d,p,m)=>m?.context&&m.key&&i(d,p,m)?{...m,message:this.i18n({context:m.context,key:m.key,custom:m.custom,...d})}:m;(s=this[e7])===null||s===void 0||s.forEach((d,p)=>c[p]=f(d,p,c[p])),(o=this[t7])===null||o===void 0||o.forEach((d,p)=>{var m;return c[p]=(m=c[p])===null||m===void 0?void 0:m.map(g=>f(d,p,g))})}updateI18nProperties(i){var s;(s=this[Ms])===null||s===void 0||s.forEach((o,c)=>{i(o,c)&&(this[c]=this.i18n(o))})}addI18nMessages(i,s,o){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,s,o)}addI18nContext(i,s,o){let c=(typeof i=="string"?i:i.name).toLowerCase();o=typeof i=="string"?o:i.custom,this[Nr].set(c,{isCustomContext:o}),this[Pt].has(c)||this[Pt].set(c,this.getI18nService(o).subscribe(c,()=>this.onI18nUpdate(c))),this.getI18nService(o).prepareContext(c,s)}hasI18nContext(i){return this[Nr].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Nr].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Pt].forEach(i=>i()),this[Pt].clear()}}return t=Nr,r=Pt,Zf([(0,Os.property)({type:Boolean})],a.prototype,"useCustomMessageContexts",void 0),a}),Rs=class extends Ts(pt.FtLitElement){},wr=class extends Ts(pt.FtLitElementRedux){};var zt=function(e,t,r,a){var n=arguments.length,i=n<3?t:a===null?a=Object.getOwnPropertyDescriptor(t,r):a,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,a);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(i=(n<3?s(i):n>3?s(t,r,i):s(t,r))||i);return n>3&&i&&Object.defineProperty(t,r,i),i},de=class extends wr{constructor(){super(),this.editorMode=!1,this.addStore(L)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Pr.nothing:Pr.html`
|
|
662
662
|
<span class="ft-i18n">
|
|
663
663
|
${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
|
|
664
664
|
</span>
|